diff --git a/experiment/images/bg.jpg b/experiment/images/bg.jpg new file mode 100644 index 0000000..a5e29a2 Binary files /dev/null and b/experiment/images/bg.jpg differ diff --git a/experiment/images/panel.jpg b/experiment/images/panel.jpg new file mode 100644 index 0000000..79a2c21 Binary files /dev/null and b/experiment/images/panel.jpg differ diff --git a/experiment/simulation/css/main.5ef1ae1d.css b/experiment/simulation/css/main.5ef1ae1d.css index 1ce04c2..e840fc6 100644 --- a/experiment/simulation/css/main.5ef1ae1d.css +++ b/experiment/simulation/css/main.5ef1ae1d.css @@ -1,2 +1,97 @@ -@import url(https://fonts.googleapis.com/css2?family=Roboto&display=swap);body{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif;margin:0}code{font-family:source-code-pro,Menlo,Monaco,Consolas,Courier New,monospace}.App{text-align:center}.inputcard{background-color:#5c7586;margin-top:10%}.listcard{background-color:#ede4e0}.transaction-history-link{cursor:pointer;text-decoration:none}.my-custom-card{height:200px;width:200px}.qtytext{height:10%;width:30%}.qty{width:10%}.inputbtn{background-color:#3667a6}.inputbtn,.inputbtn:hover{color:#fff;font-family:Roboto,sans-serif}.inputbtn:hover{background-color:#173966}.card-title{font-weight:700px}.card-title,.title{font-family:Montserrat,sans-serif}.title{font-weight:700;margin-top:10px}.main-tilte{margin-bottom:20px}.addbtn{margin-right:-30px}.App{background-color:currentColor;height:100vh}.card-body-receipt{overflow:hidden;padding:0}.slick-slider{padding-left:38px;width:800px}.slick-dots{bottom:106px}input::-webkit-inner-spin-button{-webkit-appearance:none}.heading{margin-bottom:20px;margin-top:20px;text-align:center}.customWidth{margin:0 auto}.btn1{margin:10px}.table{margin-bottom:30px} -/*# sourceMappingURL=main.5ef1ae1d.css.map*/ \ No newline at end of file +@import url(https://fonts.googleapis.com/css2?family=Roboto&display=swap); +body { + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen, + Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue, sans-serif; + margin: 0; +} +code { + font-family: source-code-pro, Menlo, Monaco, Consolas, Courier New, monospace; +} +.App { + text-align: center; +} +.inputcard { + background-color: #5c7586; + margin-top: 10%; +} +.listcard { + background-color: #ede4e0; +} +.transaction-history-link { + cursor: pointer; + text-decoration: none; +} +.my-custom-card { + height: 200px; + width: 200px; +} +.qtytext { + height: 10%; + width: 30%; +} +.qty { + width: 10%; +} +.inputbtn { + background-color: #3667a6; +} +.inputbtn, +.inputbtn:hover { + color: #fff; + font-family: Roboto, sans-serif; +} +.inputbtn:hover { + background-color: #173966; +} +.card-title { + font-weight: 700px; +} +.card-title, +.title { + font-family: Montserrat, sans-serif; +} +.title { + font-weight: 700; + margin-top: 10px; +} +.main-tilte { + margin-bottom: 20px; +} +.addbtn { + margin-right: -30px; +} +.App { + background-color: currentColor; + height: 100vh; +} +.card-body-receipt { + overflow: hidden; + padding: 0; +} +.slick-slider { + padding-left: 38px; + width: 800px; +} +.slick-dots { + bottom: 106px; +} +input::-webkit-inner-spin-button { + -webkit-appearance: none; +} +.heading { + margin-bottom: 20px; + margin-top: 20px; + text-align: center; +} +.customWidth { + margin: 0 auto; +} +.btn1 { + margin: 10px; +} +.table { + margin-bottom: 30px; +} +/*# sourceMappingURL=main.5ef1ae1d.css.map*/ diff --git a/experiment/simulation/images/cubeText1.jpg b/experiment/simulation/images/cubeText1.jpg new file mode 100644 index 0000000..0c9159e Binary files /dev/null and b/experiment/simulation/images/cubeText1.jpg differ diff --git a/experiment/simulation/index.html b/experiment/simulation/index.html index c44fc55..ff410cd 100644 --- a/experiment/simulation/index.html +++ b/experiment/simulation/index.html @@ -2,7 +2,7 @@ - + - + React App - - + + diff --git a/experiment/simulation/js/main.2ba1ee00.js b/experiment/simulation/js/main.2ba1ee00.js new file mode 100644 index 0000000..9583bbc --- /dev/null +++ b/experiment/simulation/js/main.2ba1ee00.js @@ -0,0 +1,144021 @@ +/*! For license information please see main.2ba1ee00.js.LICENSE.txt */ +(function () { + var e = { + 3361: function (e, t, n) { + "use strict"; + n.d(t, { + Z: function () { + return ie; + }, + }); + var r = (function () { + function e(e) { + var t = this; + (this._insertTag = function (e) { + var n; + (n = + 0 === t.tags.length + ? t.insertionPoint + ? t.insertionPoint.nextSibling + : t.prepend + ? t.container.firstChild + : t.before + : t.tags[t.tags.length - 1].nextSibling), + t.container.insertBefore(e, n), + t.tags.push(e); + }), + (this.isSpeedy = void 0 === e.speedy || e.speedy), + (this.tags = []), + (this.ctr = 0), + (this.nonce = e.nonce), + (this.key = e.key), + (this.container = e.container), + (this.prepend = e.prepend), + (this.insertionPoint = e.insertionPoint), + (this.before = null); + } + var t = e.prototype; + return ( + (t.hydrate = function (e) { + e.forEach(this._insertTag); + }), + (t.insert = function (e) { + this.ctr % (this.isSpeedy ? 65e3 : 1) === 0 && + this._insertTag( + (function (e) { + var t = document.createElement("style"); + return ( + t.setAttribute("data-emotion", e.key), + void 0 !== e.nonce && t.setAttribute("nonce", e.nonce), + t.appendChild(document.createTextNode("")), + t.setAttribute("data-s", ""), + t + ); + })(this) + ); + var t = this.tags[this.tags.length - 1]; + if (this.isSpeedy) { + var n = (function (e) { + if (e.sheet) return e.sheet; + for (var t = 0; t < document.styleSheets.length; t++) + if (document.styleSheets[t].ownerNode === e) + return document.styleSheets[t]; + })(t); + try { + n.insertRule(e, n.cssRules.length); + } catch (r) { + 0; + } + } else t.appendChild(document.createTextNode(e)); + this.ctr++; + }), + (t.flush = function () { + this.tags.forEach(function (e) { + return e.parentNode && e.parentNode.removeChild(e); + }), + (this.tags = []), + (this.ctr = 0); + }), + e + ); + })(), + i = Math.abs, + a = String.fromCharCode, + o = Object.assign; + function s(e) { + return e.trim(); + } + function l(e, t, n) { + return e.replace(t, n); + } + function u(e, t) { + return e.indexOf(t); + } + function c(e, t) { + return 0 | e.charCodeAt(t); + } + function f(e, t, n) { + return e.slice(t, n); + } + function d(e) { + return e.length; + } + function h(e) { + return e.length; + } + function p(e, t) { + return t.push(e), e; + } + var v = 1, + m = 1, + g = 0, + A = 0, + y = 0, + b = ""; + function x(e, t, n, r, i, a, o) { + return { + value: e, + root: t, + parent: n, + type: r, + props: i, + children: a, + line: v, + column: m, + length: o, + return: "", + }; + } + function S(e, t) { + return o( + x("", null, null, "", null, null, 0), + e, + { length: -e.length }, + t + ); + } + function E() { + return ( + (y = A > 0 ? c(b, --A) : 0), m--, 10 === y && ((m = 1), v--), y + ); + } + function _() { + return ( + (y = A < g ? c(b, A++) : 0), m++, 10 === y && ((m = 1), v++), y + ); + } + function C() { + return c(b, A); + } + function w() { + return A; + } + function T(e, t) { + return f(b, e, t); + } + function M(e) { + switch (e) { + case 0: + case 9: + case 10: + case 13: + case 32: + return 5; + case 33: + case 43: + case 44: + case 47: + case 62: + case 64: + case 126: + case 59: + case 123: + case 125: + return 4; + case 58: + return 3; + case 34: + case 39: + case 40: + case 91: + return 2; + case 41: + case 93: + return 1; + } + return 0; + } + function I(e) { + return (v = m = 1), (g = d((b = e))), (A = 0), []; + } + function k(e) { + return (b = ""), e; + } + function R(e) { + return s(T(A - 1, L(91 === e ? e + 2 : 40 === e ? e + 1 : e))); + } + function B(e) { + for (; (y = C()) && y < 33; ) _(); + return M(e) > 2 || M(y) > 3 ? "" : " "; + } + function P(e, t) { + for ( + ; + --t && + _() && + !(y < 48 || y > 102 || (y > 57 && y < 65) || (y > 70 && y < 97)); + + ); + return T(e, w() + (t < 6 && 32 == C() && 32 == _())); + } + function L(e) { + for (; _(); ) + switch (y) { + case e: + return A; + case 34: + case 39: + 34 !== e && 39 !== e && L(y); + break; + case 40: + 41 === e && L(e); + break; + case 92: + _(); + } + return A; + } + function D(e, t) { + for (; _() && e + y !== 57 && (e + y !== 84 || 47 !== C()); ); + return "/*" + T(t, A - 1) + "*" + a(47 === e ? e : _()); + } + function U(e) { + for (; !M(C()); ) _(); + return T(e, A); + } + var F = "-ms-", + O = "-moz-", + N = "-webkit-", + G = "comm", + Z = "rule", + z = "decl", + Q = "@keyframes"; + function H(e, t) { + for (var n = "", r = h(e), i = 0; i < r; i++) + n += t(e[i], i, e, t) || ""; + return n; + } + function V(e, t, n, r) { + switch (e.type) { + case "@layer": + if (e.children.length) break; + case "@import": + case z: + return (e.return = e.return || e.value); + case G: + return ""; + case Q: + return (e.return = e.value + "{" + H(e.children, r) + "}"); + case Z: + e.value = e.props.join(","); + } + return d((n = H(e.children, r))) + ? (e.return = e.value + "{" + n + "}") + : ""; + } + function j(e) { + return k(W("", null, null, null, [""], (e = I(e)), 0, [0], e)); + } + function W(e, t, n, r, i, o, s, f, h) { + for ( + var v = 0, + m = 0, + g = s, + A = 0, + y = 0, + b = 0, + x = 1, + S = 1, + T = 1, + M = 0, + I = "", + k = i, + L = o, + F = r, + O = I; + S; + + ) + switch (((b = M), (M = _()))) { + case 40: + if (108 != b && 58 == c(O, g - 1)) { + -1 != u((O += l(R(M), "&", "&\f")), "&\f") && (T = -1); + break; + } + case 34: + case 39: + case 91: + O += R(M); + break; + case 9: + case 10: + case 13: + case 32: + O += B(b); + break; + case 92: + O += P(w() - 1, 7); + continue; + case 47: + switch (C()) { + case 42: + case 47: + p(Y(D(_(), w()), t, n), h); + break; + default: + O += "/"; + } + break; + case 123 * x: + f[v++] = d(O) * T; + case 125 * x: + case 59: + case 0: + switch (M) { + case 0: + case 125: + S = 0; + case 59 + m: + -1 == T && (O = l(O, /\f/g, "")), + y > 0 && + d(O) - g && + p( + y > 32 + ? q(O + ";", r, n, g - 1) + : q(l(O, " ", "") + ";", r, n, g - 2), + h + ); + break; + case 59: + O += ";"; + default: + if ( + (p( + (F = X(O, t, n, v, m, i, f, I, (k = []), (L = []), g)), + o + ), + 123 === M) + ) + if (0 === m) W(O, t, F, F, k, o, g, f, L); + else + switch (99 === A && 110 === c(O, 3) ? 100 : A) { + case 100: + case 108: + case 109: + case 115: + W( + e, + F, + F, + r && + p(X(e, F, F, 0, 0, i, f, I, i, (k = []), g), L), + i, + L, + g, + f, + r ? k : L + ); + break; + default: + W(O, F, F, F, [""], L, 0, f, L); + } + } + (v = m = y = 0), (x = T = 1), (I = O = ""), (g = s); + break; + case 58: + (g = 1 + d(O)), (y = b); + default: + if (x < 1) + if (123 == M) --x; + else if (125 == M && 0 == x++ && 125 == E()) continue; + switch (((O += a(M)), M * x)) { + case 38: + T = m > 0 ? 1 : ((O += "\f"), -1); + break; + case 44: + (f[v++] = (d(O) - 1) * T), (T = 1); + break; + case 64: + 45 === C() && (O += R(_())), + (A = C()), + (m = g = d((I = O += U(w())))), + M++; + break; + case 45: + 45 === b && 2 == d(O) && (x = 0); + } + } + return o; + } + function X(e, t, n, r, a, o, u, c, d, p, v) { + for ( + var m = a - 1, + g = 0 === a ? o : [""], + A = h(g), + y = 0, + b = 0, + S = 0; + y < r; + ++y + ) + for ( + var E = 0, _ = f(e, m + 1, (m = i((b = u[y])))), C = e; + E < A; + ++E + ) + (C = s(b > 0 ? g[E] + " " + _ : l(_, /&\f/g, g[E]))) && + (d[S++] = C); + return x(e, t, n, 0 === a ? Z : c, d, p, v); + } + function Y(e, t, n) { + return x(e, t, n, G, a(y), f(e, 2, -2), 0); + } + function q(e, t, n, r) { + return x(e, t, n, z, f(e, 0, r), f(e, r + 1, -1), r); + } + var J = function (e, t, n) { + for ( + var r = 0, i = 0; + (r = i), (i = C()), 38 === r && 12 === i && (t[n] = 1), !M(i); + + ) + _(); + return T(e, A); + }, + K = function (e, t) { + return k( + (function (e, t) { + var n = -1, + r = 44; + do { + switch (M(r)) { + case 0: + 38 === r && 12 === C() && (t[n] = 1), + (e[n] += J(A - 1, t, n)); + break; + case 2: + e[n] += R(r); + break; + case 4: + if (44 === r) { + (e[++n] = 58 === C() ? "&\f" : ""), + (t[n] = e[n].length); + break; + } + default: + e[n] += a(r); + } + } while ((r = _())); + return e; + })(I(e), t) + ); + }, + $ = new WeakMap(), + ee = function (e) { + if ("rule" === e.type && e.parent && !(e.length < 1)) { + for ( + var t = e.value, + n = e.parent, + r = e.column === n.column && e.line === n.line; + "rule" !== n.type; + + ) + if (!(n = n.parent)) return; + if ( + (1 !== e.props.length || 58 === t.charCodeAt(0) || $.get(n)) && + !r + ) { + $.set(e, !0); + for ( + var i = [], a = K(t, i), o = n.props, s = 0, l = 0; + s < a.length; + s++ + ) + for (var u = 0; u < o.length; u++, l++) + e.props[l] = i[s] + ? a[s].replace(/&\f/g, o[u]) + : o[u] + " " + a[s]; + } + } + }, + te = function (e) { + if ("decl" === e.type) { + var t = e.value; + 108 === t.charCodeAt(0) && + 98 === t.charCodeAt(2) && + ((e.return = ""), (e.value = "")); + } + }; + function ne(e, t) { + switch ( + (function (e, t) { + return 45 ^ c(e, 0) + ? (((((((t << 2) ^ c(e, 0)) << 2) ^ c(e, 1)) << 2) ^ c(e, 2)) << + 2) ^ + c(e, 3) + : 0; + })(e, t) + ) { + case 5103: + return N + "print-" + e + e; + case 5737: + case 4201: + case 3177: + case 3433: + case 1641: + case 4457: + case 2921: + case 5572: + case 6356: + case 5844: + case 3191: + case 6645: + case 3005: + case 6391: + case 5879: + case 5623: + case 6135: + case 4599: + case 4855: + case 4215: + case 6389: + case 5109: + case 5365: + case 5621: + case 3829: + return N + e + e; + case 5349: + case 4246: + case 4810: + case 6968: + case 2756: + return N + e + O + e + F + e + e; + case 6828: + case 4268: + return N + e + F + e + e; + case 6165: + return N + e + F + "flex-" + e + e; + case 5187: + return ( + N + + e + + l(e, /(\w+).+(:[^]+)/, N + "box-$1$2" + F + "flex-$1$2") + + e + ); + case 5443: + return N + e + F + "flex-item-" + l(e, /flex-|-self/, "") + e; + case 4675: + return ( + N + + e + + F + + "flex-line-pack" + + l(e, /align-content|flex-|-self/, "") + + e + ); + case 5548: + return N + e + F + l(e, "shrink", "negative") + e; + case 5292: + return N + e + F + l(e, "basis", "preferred-size") + e; + case 6060: + return ( + N + + "box-" + + l(e, "-grow", "") + + N + + e + + F + + l(e, "grow", "positive") + + e + ); + case 4554: + return N + l(e, /([^-])(transform)/g, "$1" + N + "$2") + e; + case 6187: + return ( + l( + l(l(e, /(zoom-|grab)/, N + "$1"), /(image-set)/, N + "$1"), + e, + "" + ) + e + ); + case 5495: + case 3959: + return l(e, /(image-set\([^]*)/, N + "$1$`$1"); + case 4968: + return ( + l( + l( + e, + /(.+:)(flex-)?(.*)/, + N + "box-pack:$3" + F + "flex-pack:$3" + ), + /s.+-b[^;]+/, + "justify" + ) + + N + + e + + e + ); + case 4095: + case 3583: + case 4068: + case 2532: + return l(e, /(.+)-inline(.+)/, N + "$1$2") + e; + case 8116: + case 7059: + case 5753: + case 5535: + case 5445: + case 5701: + case 4933: + case 4677: + case 5533: + case 5789: + case 5021: + case 4765: + if (d(e) - 1 - t > 6) + switch (c(e, t + 1)) { + case 109: + if (45 !== c(e, t + 4)) break; + case 102: + return ( + l( + e, + /(.+:)(.+)-([^]+)/, + "$1" + + N + + "$2-$3$1" + + O + + (108 == c(e, t + 3) ? "$3" : "$2-$3") + ) + e + ); + case 115: + return ~u(e, "stretch") + ? ne(l(e, "stretch", "fill-available"), t) + e + : e; + } + break; + case 4949: + if (115 !== c(e, t + 1)) break; + case 6444: + switch (c(e, d(e) - 3 - (~u(e, "!important") && 10))) { + case 107: + return l(e, ":", ":" + N) + e; + case 101: + return ( + l( + e, + /(.+:)([^;!]+)(;|!.+)?/, + "$1" + + N + + (45 === c(e, 14) ? "inline-" : "") + + "box$3$1" + + N + + "$2$3$1" + + F + + "$2box$3" + ) + e + ); + } + break; + case 5936: + switch (c(e, t + 11)) { + case 114: + return N + e + F + l(e, /[svh]\w+-[tblr]{2}/, "tb") + e; + case 108: + return N + e + F + l(e, /[svh]\w+-[tblr]{2}/, "tb-rl") + e; + case 45: + return N + e + F + l(e, /[svh]\w+-[tblr]{2}/, "lr") + e; + } + return N + e + F + e + e; + } + return e; + } + var re = [ + function (e, t, n, r) { + if (e.length > -1 && !e.return) + switch (e.type) { + case z: + e.return = ne(e.value, e.length); + break; + case Q: + return H([S(e, { value: l(e.value, "@", "@" + N) })], r); + case Z: + if (e.length) + return (function (e, t) { + return e.map(t).join(""); + })(e.props, function (t) { + switch ( + (function (e, t) { + return (e = t.exec(e)) ? e[0] : e; + })(t, /(::plac\w+|:read-\w+)/) + ) { + case ":read-only": + case ":read-write": + return H( + [ + S(e, { + props: [l(t, /:(read-\w+)/, ":-moz-$1")], + }), + ], + r + ); + case "::placeholder": + return H( + [ + S(e, { + props: [ + l(t, /:(plac\w+)/, ":" + N + "input-$1"), + ], + }), + S(e, { + props: [l(t, /:(plac\w+)/, ":-moz-$1")], + }), + S(e, { + props: [l(t, /:(plac\w+)/, F + "input-$1")], + }), + ], + r + ); + } + return ""; + }); + } + }, + ], + ie = function (e) { + var t = e.key; + if ("css" === t) { + var n = document.querySelectorAll( + "style[data-emotion]:not([data-s])" + ); + Array.prototype.forEach.call(n, function (e) { + -1 !== e.getAttribute("data-emotion").indexOf(" ") && + (document.head.appendChild(e), e.setAttribute("data-s", "")); + }); + } + var i = e.stylisPlugins || re; + var a, + o, + s = {}, + l = []; + (a = e.container || document.head), + Array.prototype.forEach.call( + document.querySelectorAll('style[data-emotion^="' + t + ' "]'), + function (e) { + for ( + var t = e.getAttribute("data-emotion").split(" "), n = 1; + n < t.length; + n++ + ) + s[t[n]] = !0; + l.push(e); + } + ); + var u, + c, + f = [ + V, + ((c = function (e) { + u.insert(e); + }), + function (e) { + e.root || ((e = e.return) && c(e)); + }), + ], + d = (function (e) { + var t = h(e); + return function (n, r, i, a) { + for (var o = "", s = 0; s < t; s++) + o += e[s](n, r, i, a) || ""; + return o; + }; + })([ee, te].concat(i, f)); + o = function (e, t, n, r) { + (u = n), + H(j(e ? e + "{" + t.styles + "}" : t.styles), d), + r && (p.inserted[t.name] = !0); + }; + var p = { + key: t, + sheet: new r({ + key: t, + container: a, + nonce: e.nonce, + speedy: e.speedy, + prepend: e.prepend, + insertionPoint: e.insertionPoint, + }), + nonce: e.nonce, + inserted: s, + registered: {}, + insert: o, + }; + return p.sheet.hydrate(l), p; + }; + }, + 9791: function (e, t, n) { + "use strict"; + n.d(t, { + Z: function () { + return a; + }, + }); + var r = n(9797), + i = + /^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/, + a = (0, r.Z)(function (e) { + return ( + i.test(e) || + (111 === e.charCodeAt(0) && + 110 === e.charCodeAt(1) && + e.charCodeAt(2) < 91) + ); + }); + }, + 9797: function (e, t, n) { + "use strict"; + function r(e) { + var t = Object.create(null); + return function (n) { + return void 0 === t[n] && (t[n] = e(n)), t[n]; + }; + } + n.d(t, { + Z: function () { + return r; + }, + }); + }, + 2564: function (e, t, n) { + "use strict"; + n.d(t, { + T: function () { + return l; + }, + i: function () { + return a; + }, + w: function () { + return s; + }, + }); + var r = n(2791), + i = n(3361), + a = (n(9140), n(2561), !0), + o = r.createContext( + "undefined" !== typeof HTMLElement ? (0, i.Z)({ key: "css" }) : null + ); + o.Provider; + var s = function (e) { + return (0, r.forwardRef)(function (t, n) { + var i = (0, r.useContext)(o); + return e(t, i, n); + }); + }; + a || + (s = function (e) { + return function (t) { + var n = (0, r.useContext)(o); + return null === n + ? ((n = (0, i.Z)({ key: "css" })), + r.createElement(o.Provider, { value: n }, e(t, n))) + : e(t, n); + }; + }); + var l = r.createContext({}); + }, + 9140: function (e, t, n) { + "use strict"; + n.d(t, { + O: function () { + return p; + }, + }); + var r = { + animationIterationCount: 1, + aspectRatio: 1, + borderImageOutset: 1, + borderImageSlice: 1, + borderImageWidth: 1, + boxFlex: 1, + boxFlexGroup: 1, + boxOrdinalGroup: 1, + columnCount: 1, + columns: 1, + flex: 1, + flexGrow: 1, + flexPositive: 1, + flexShrink: 1, + flexNegative: 1, + flexOrder: 1, + gridRow: 1, + gridRowEnd: 1, + gridRowSpan: 1, + gridRowStart: 1, + gridColumn: 1, + gridColumnEnd: 1, + gridColumnSpan: 1, + gridColumnStart: 1, + msGridRow: 1, + msGridRowSpan: 1, + msGridColumn: 1, + msGridColumnSpan: 1, + fontWeight: 1, + lineHeight: 1, + opacity: 1, + order: 1, + orphans: 1, + tabSize: 1, + widows: 1, + zIndex: 1, + zoom: 1, + WebkitLineClamp: 1, + fillOpacity: 1, + floodOpacity: 1, + stopOpacity: 1, + strokeDasharray: 1, + strokeDashoffset: 1, + strokeMiterlimit: 1, + strokeOpacity: 1, + strokeWidth: 1, + }, + i = n(9797), + a = /[A-Z]|^ms/g, + o = /_EMO_([^_]+?)_([^]*?)_EMO_/g, + s = function (e) { + return 45 === e.charCodeAt(1); + }, + l = function (e) { + return null != e && "boolean" !== typeof e; + }, + u = (0, i.Z)(function (e) { + return s(e) ? e : e.replace(a, "-$&").toLowerCase(); + }), + c = function (e, t) { + switch (e) { + case "animation": + case "animationName": + if ("string" === typeof t) + return t.replace(o, function (e, t, n) { + return (d = { name: t, styles: n, next: d }), t; + }); + } + return 1 === r[e] || s(e) || "number" !== typeof t || 0 === t + ? t + : t + "px"; + }; + function f(e, t, n) { + if (null == n) return ""; + if (void 0 !== n.__emotion_styles) return n; + switch (typeof n) { + case "boolean": + return ""; + case "object": + if (1 === n.anim) + return ( + (d = { name: n.name, styles: n.styles, next: d }), n.name + ); + if (void 0 !== n.styles) { + var r = n.next; + if (void 0 !== r) + for (; void 0 !== r; ) + (d = { name: r.name, styles: r.styles, next: d }), + (r = r.next); + return n.styles + ";"; + } + return (function (e, t, n) { + var r = ""; + if (Array.isArray(n)) + for (var i = 0; i < n.length; i++) r += f(e, t, n[i]) + ";"; + else + for (var a in n) { + var o = n[a]; + if ("object" !== typeof o) + null != t && void 0 !== t[o] + ? (r += a + "{" + t[o] + "}") + : l(o) && (r += u(a) + ":" + c(a, o) + ";"); + else if ( + !Array.isArray(o) || + "string" !== typeof o[0] || + (null != t && void 0 !== t[o[0]]) + ) { + var s = f(e, t, o); + switch (a) { + case "animation": + case "animationName": + r += u(a) + ":" + s + ";"; + break; + default: + r += a + "{" + s + "}"; + } + } else + for (var d = 0; d < o.length; d++) + l(o[d]) && (r += u(a) + ":" + c(a, o[d]) + ";"); + } + return r; + })(e, t, n); + case "function": + if (void 0 !== e) { + var i = d, + a = n(e); + return (d = i), f(e, t, a); + } + } + if (null == t) return n; + var o = t[n]; + return void 0 !== o ? o : n; + } + var d, + h = /label:\s*([^\s;\n{]+)\s*(;|$)/g; + var p = function (e, t, n) { + if ( + 1 === e.length && + "object" === typeof e[0] && + null !== e[0] && + void 0 !== e[0].styles + ) + return e[0]; + var r = !0, + i = ""; + d = void 0; + var a = e[0]; + null == a || void 0 === a.raw + ? ((r = !1), (i += f(n, t, a))) + : (i += a[0]); + for (var o = 1; o < e.length; o++) + (i += f(n, t, e[o])), r && (i += a[o]); + h.lastIndex = 0; + for (var s, l = ""; null !== (s = h.exec(i)); ) l += "-" + s[1]; + var u = + (function (e) { + for (var t, n = 0, r = 0, i = e.length; i >= 4; ++r, i -= 4) + (t = + 1540483477 * + (65535 & + (t = + (255 & e.charCodeAt(r)) | + ((255 & e.charCodeAt(++r)) << 8) | + ((255 & e.charCodeAt(++r)) << 16) | + ((255 & e.charCodeAt(++r)) << 24))) + + ((59797 * (t >>> 16)) << 16)), + (n = + (1540483477 * (65535 & (t ^= t >>> 24)) + + ((59797 * (t >>> 16)) << 16)) ^ + (1540483477 * (65535 & n) + ((59797 * (n >>> 16)) << 16))); + switch (i) { + case 3: + n ^= (255 & e.charCodeAt(r + 2)) << 16; + case 2: + n ^= (255 & e.charCodeAt(r + 1)) << 8; + case 1: + n = + 1540483477 * (65535 & (n ^= 255 & e.charCodeAt(r))) + + ((59797 * (n >>> 16)) << 16); + } + return ( + ((n = + 1540483477 * (65535 & (n ^= n >>> 13)) + + ((59797 * (n >>> 16)) << 16)) ^ + (n >>> 15)) >>> + 0 + ).toString(36); + })(i) + l; + return { name: u, styles: i, next: d }; + }; + }, + 2561: function (e, t, n) { + "use strict"; + var r; + n.d(t, { + L: function () { + return o; + }, + j: function () { + return s; + }, + }); + var i = n(2791), + a = + !!(r || (r = n.t(i, 2))).useInsertionEffect && + (r || (r = n.t(i, 2))).useInsertionEffect, + o = + a || + function (e) { + return e(); + }, + s = a || i.useLayoutEffect; + }, + 5438: function (e, t, n) { + "use strict"; + n.d(t, { + My: function () { + return a; + }, + fp: function () { + return r; + }, + hC: function () { + return i; + }, + }); + function r(e, t, n) { + var r = ""; + return ( + n.split(" ").forEach(function (n) { + void 0 !== e[n] ? t.push(e[n] + ";") : (r += n + " "); + }), + r + ); + } + var i = function (e, t, n) { + var r = e.key + "-" + t.name; + !1 === n && + void 0 === e.registered[r] && + (e.registered[r] = t.styles); + }, + a = function (e, t, n) { + i(e, t, n); + var r = e.key + "-" + t.name; + if (void 0 === e.inserted[t.name]) { + var a = t; + do { + e.insert(t === a ? "." + r : "", a, e.sheet, !0), (a = a.next); + } while (void 0 !== a); + } + }; + }, + 9823: function (e, t, n) { + "use strict"; + var r = n(4836); + t.Z = void 0; + var i = r(n(5649)), + a = n(184), + o = (0, i.default)( + (0, a.jsx)("path", { + d: "M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z", + }), + "Close" + ); + t.Z = o; + }, + 1981: function (e, t, n) { + "use strict"; + var r = n(4836); + t.Z = void 0; + var i = r(n(5649)), + a = n(184), + o = (0, i.default)( + (0, a.jsx)("path", { + d: "M13 3c-4.97 0-9 4.03-9 9H1l3.89 3.89.07.14L9 12H6c0-3.87 3.13-7 7-7s7 3.13 7 7-3.13 7-7 7c-1.93 0-3.68-.79-4.94-2.06l-1.42 1.42C8.27 19.99 10.51 21 13 21c4.97 0 9-4.03 9-9s-4.03-9-9-9zm-1 5v5l4.28 2.54.72-1.21-3.5-2.08V8H12z", + }), + "History" + ); + t.Z = o; + }, + 3950: function (e, t, n) { + "use strict"; + var r = n(4836); + t.Z = void 0; + var i = r(n(5649)), + a = n(184), + o = (0, i.default)( + (0, a.jsx)("path", { + d: "M17.65 6.35C16.2 4.9 14.21 4 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08c-.82 2.33-3.04 4-5.65 4-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4l-2.35 2.35z", + }), + "Refresh" + ); + t.Z = o; + }, + 5649: function (e, t, n) { + "use strict"; + Object.defineProperty(t, "__esModule", { value: !0 }), + Object.defineProperty(t, "default", { + enumerable: !0, + get: function () { + return r.createSvgIcon; + }, + }); + var r = n(4421); + }, + 4591: function (e, t, n) { + "use strict"; + n.d(t, { + Z: function () { + return Z; + }, + }); + var r = n(7462), + i = n(3366), + a = n(6189), + o = n(2466), + s = n(5080), + l = n(7416), + u = n(104), + c = n(4942); + function f(e, t) { + var n; + return (0, r.Z)( + { + toolbar: + ((n = { minHeight: 56 }), + (0, c.Z)(n, e.up("xs"), { + "@media (orientation: landscape)": { minHeight: 48 }, + }), + (0, c.Z)(n, e.up("sm"), { minHeight: 64 }), + n), + }, + t + ); + } + var d = n(2065), + h = { black: "#000", white: "#fff" }, + p = { + 50: "#fafafa", + 100: "#f5f5f5", + 200: "#eeeeee", + 300: "#e0e0e0", + 400: "#bdbdbd", + 500: "#9e9e9e", + 600: "#757575", + 700: "#616161", + 800: "#424242", + 900: "#212121", + A100: "#f5f5f5", + A200: "#eeeeee", + A400: "#bdbdbd", + A700: "#616161", + }, + v = { + 50: "#f3e5f5", + 100: "#e1bee7", + 200: "#ce93d8", + 300: "#ba68c8", + 400: "#ab47bc", + 500: "#9c27b0", + 600: "#8e24aa", + 700: "#7b1fa2", + 800: "#6a1b9a", + 900: "#4a148c", + A100: "#ea80fc", + A200: "#e040fb", + A400: "#d500f9", + A700: "#aa00ff", + }, + m = { + 50: "#ffebee", + 100: "#ffcdd2", + 200: "#ef9a9a", + 300: "#e57373", + 400: "#ef5350", + 500: "#f44336", + 600: "#e53935", + 700: "#d32f2f", + 800: "#c62828", + 900: "#b71c1c", + A100: "#ff8a80", + A200: "#ff5252", + A400: "#ff1744", + A700: "#d50000", + }, + g = { + 50: "#fff3e0", + 100: "#ffe0b2", + 200: "#ffcc80", + 300: "#ffb74d", + 400: "#ffa726", + 500: "#ff9800", + 600: "#fb8c00", + 700: "#f57c00", + 800: "#ef6c00", + 900: "#e65100", + A100: "#ffd180", + A200: "#ffab40", + A400: "#ff9100", + A700: "#ff6d00", + }, + A = { + 50: "#e3f2fd", + 100: "#bbdefb", + 200: "#90caf9", + 300: "#64b5f6", + 400: "#42a5f5", + 500: "#2196f3", + 600: "#1e88e5", + 700: "#1976d2", + 800: "#1565c0", + 900: "#0d47a1", + A100: "#82b1ff", + A200: "#448aff", + A400: "#2979ff", + A700: "#2962ff", + }, + y = { + 50: "#e1f5fe", + 100: "#b3e5fc", + 200: "#81d4fa", + 300: "#4fc3f7", + 400: "#29b6f6", + 500: "#03a9f4", + 600: "#039be5", + 700: "#0288d1", + 800: "#0277bd", + 900: "#01579b", + A100: "#80d8ff", + A200: "#40c4ff", + A400: "#00b0ff", + A700: "#0091ea", + }, + b = { + 50: "#e8f5e9", + 100: "#c8e6c9", + 200: "#a5d6a7", + 300: "#81c784", + 400: "#66bb6a", + 500: "#4caf50", + 600: "#43a047", + 700: "#388e3c", + 800: "#2e7d32", + 900: "#1b5e20", + A100: "#b9f6ca", + A200: "#69f0ae", + A400: "#00e676", + A700: "#00c853", + }, + x = ["mode", "contrastThreshold", "tonalOffset"], + S = { + text: { + primary: "rgba(0, 0, 0, 0.87)", + secondary: "rgba(0, 0, 0, 0.6)", + disabled: "rgba(0, 0, 0, 0.38)", + }, + divider: "rgba(0, 0, 0, 0.12)", + background: { paper: h.white, default: h.white }, + action: { + active: "rgba(0, 0, 0, 0.54)", + hover: "rgba(0, 0, 0, 0.04)", + hoverOpacity: 0.04, + selected: "rgba(0, 0, 0, 0.08)", + selectedOpacity: 0.08, + disabled: "rgba(0, 0, 0, 0.26)", + disabledBackground: "rgba(0, 0, 0, 0.12)", + disabledOpacity: 0.38, + focus: "rgba(0, 0, 0, 0.12)", + focusOpacity: 0.12, + activatedOpacity: 0.12, + }, + }, + E = { + text: { + primary: h.white, + secondary: "rgba(255, 255, 255, 0.7)", + disabled: "rgba(255, 255, 255, 0.5)", + icon: "rgba(255, 255, 255, 0.5)", + }, + divider: "rgba(255, 255, 255, 0.12)", + background: { paper: "#121212", default: "#121212" }, + action: { + active: h.white, + hover: "rgba(255, 255, 255, 0.08)", + hoverOpacity: 0.08, + selected: "rgba(255, 255, 255, 0.16)", + selectedOpacity: 0.16, + disabled: "rgba(255, 255, 255, 0.3)", + disabledBackground: "rgba(255, 255, 255, 0.12)", + disabledOpacity: 0.38, + focus: "rgba(255, 255, 255, 0.12)", + focusOpacity: 0.12, + activatedOpacity: 0.24, + }, + }; + function _(e, t, n, r) { + var i = r.light || r, + a = r.dark || 1.5 * r; + e[t] || + (e.hasOwnProperty(n) + ? (e[t] = e[n]) + : "light" === t + ? (e.light = (0, d.$n)(e.main, i)) + : "dark" === t && (e.dark = (0, d._j)(e.main, a))); + } + function C(e) { + var t = e.mode, + n = void 0 === t ? "light" : t, + s = e.contrastThreshold, + l = void 0 === s ? 3 : s, + u = e.tonalOffset, + c = void 0 === u ? 0.2 : u, + f = (0, i.Z)(e, x), + C = + e.primary || + (function () { + return "dark" === + (arguments.length > 0 && void 0 !== arguments[0] + ? arguments[0] + : "light") + ? { main: A[200], light: A[50], dark: A[400] } + : { main: A[700], light: A[400], dark: A[800] }; + })(n), + w = + e.secondary || + (function () { + return "dark" === + (arguments.length > 0 && void 0 !== arguments[0] + ? arguments[0] + : "light") + ? { main: v[200], light: v[50], dark: v[400] } + : { main: v[500], light: v[300], dark: v[700] }; + })(n), + T = + e.error || + (function () { + return "dark" === + (arguments.length > 0 && void 0 !== arguments[0] + ? arguments[0] + : "light") + ? { main: m[500], light: m[300], dark: m[700] } + : { main: m[700], light: m[400], dark: m[800] }; + })(n), + M = + e.info || + (function () { + return "dark" === + (arguments.length > 0 && void 0 !== arguments[0] + ? arguments[0] + : "light") + ? { main: y[400], light: y[300], dark: y[700] } + : { main: y[700], light: y[500], dark: y[900] }; + })(n), + I = + e.success || + (function () { + return "dark" === + (arguments.length > 0 && void 0 !== arguments[0] + ? arguments[0] + : "light") + ? { main: b[400], light: b[300], dark: b[700] } + : { main: b[800], light: b[500], dark: b[900] }; + })(n), + k = + e.warning || + (function () { + return "dark" === + (arguments.length > 0 && void 0 !== arguments[0] + ? arguments[0] + : "light") + ? { main: g[400], light: g[300], dark: g[700] } + : { main: "#ed6c02", light: g[500], dark: g[900] }; + })(n); + function R(e) { + return (0, d.mi)(e, E.text.primary) >= l + ? E.text.primary + : S.text.primary; + } + var B = function (e) { + var t = e.color, + n = e.name, + i = e.mainShade, + o = void 0 === i ? 500 : i, + s = e.lightShade, + l = void 0 === s ? 300 : s, + u = e.darkShade, + f = void 0 === u ? 700 : u; + if ( + (!(t = (0, r.Z)({}, t)).main && t[o] && (t.main = t[o]), + !t.hasOwnProperty("main")) + ) + throw new Error((0, a.Z)(11, n ? " (".concat(n, ")") : "", o)); + if ("string" !== typeof t.main) + throw new Error( + (0, a.Z)( + 12, + n ? " (".concat(n, ")") : "", + JSON.stringify(t.main) + ) + ); + return ( + _(t, "light", l, c), + _(t, "dark", f, c), + t.contrastText || (t.contrastText = R(t.main)), + t + ); + }, + P = { dark: E, light: S }; + return (0, o.Z)( + (0, r.Z)( + { + common: (0, r.Z)({}, h), + mode: n, + primary: B({ color: C, name: "primary" }), + secondary: B({ + color: w, + name: "secondary", + mainShade: "A400", + lightShade: "A200", + darkShade: "A700", + }), + error: B({ color: T, name: "error" }), + warning: B({ color: k, name: "warning" }), + info: B({ color: M, name: "info" }), + success: B({ color: I, name: "success" }), + grey: p, + contrastThreshold: l, + getContrastText: R, + augmentColor: B, + tonalOffset: c, + }, + P[n] + ), + f + ); + } + var w = [ + "fontFamily", + "fontSize", + "fontWeightLight", + "fontWeightRegular", + "fontWeightMedium", + "fontWeightBold", + "htmlFontSize", + "allVariants", + "pxToRem", + ]; + var T = { textTransform: "uppercase" }, + M = '"Roboto", "Helvetica", "Arial", sans-serif'; + function I(e, t) { + var n = "function" === typeof t ? t(e) : t, + a = n.fontFamily, + s = void 0 === a ? M : a, + l = n.fontSize, + u = void 0 === l ? 14 : l, + c = n.fontWeightLight, + f = void 0 === c ? 300 : c, + d = n.fontWeightRegular, + h = void 0 === d ? 400 : d, + p = n.fontWeightMedium, + v = void 0 === p ? 500 : p, + m = n.fontWeightBold, + g = void 0 === m ? 700 : m, + A = n.htmlFontSize, + y = void 0 === A ? 16 : A, + b = n.allVariants, + x = n.pxToRem, + S = (0, i.Z)(n, w); + var E = u / 14, + _ = + x || + function (e) { + return "".concat((e / y) * E, "rem"); + }, + C = function (e, t, n, i, a) { + return (0, r.Z)( + { fontFamily: s, fontWeight: e, fontSize: _(t), lineHeight: n }, + s === M + ? { + letterSpacing: "".concat( + ((o = i / t), Math.round(1e5 * o) / 1e5), + "em" + ), + } + : {}, + a, + b + ); + var o; + }, + I = { + h1: C(f, 96, 1.167, -1.5), + h2: C(f, 60, 1.2, -0.5), + h3: C(h, 48, 1.167, 0), + h4: C(h, 34, 1.235, 0.25), + h5: C(h, 24, 1.334, 0), + h6: C(v, 20, 1.6, 0.15), + subtitle1: C(h, 16, 1.75, 0.15), + subtitle2: C(v, 14, 1.57, 0.1), + body1: C(h, 16, 1.5, 0.15), + body2: C(h, 14, 1.43, 0.15), + button: C(v, 14, 1.75, 0.4, T), + caption: C(h, 12, 1.66, 0.4), + overline: C(h, 12, 2.66, 1, T), + inherit: { + fontFamily: "inherit", + fontWeight: "inherit", + fontSize: "inherit", + lineHeight: "inherit", + letterSpacing: "inherit", + }, + }; + return (0, o.Z)( + (0, r.Z)( + { + htmlFontSize: y, + pxToRem: _, + fontFamily: s, + fontSize: u, + fontWeightLight: f, + fontWeightRegular: h, + fontWeightMedium: v, + fontWeightBold: g, + }, + I + ), + S, + { clone: !1 } + ); + } + function k() { + return [ + "" + .concat(arguments.length <= 0 ? void 0 : arguments[0], "px ") + .concat(arguments.length <= 1 ? void 0 : arguments[1], "px ") + .concat(arguments.length <= 2 ? void 0 : arguments[2], "px ") + .concat( + arguments.length <= 3 ? void 0 : arguments[3], + "px rgba(0,0,0," + ) + .concat(0.2, ")"), + "" + .concat(arguments.length <= 4 ? void 0 : arguments[4], "px ") + .concat(arguments.length <= 5 ? void 0 : arguments[5], "px ") + .concat(arguments.length <= 6 ? void 0 : arguments[6], "px ") + .concat( + arguments.length <= 7 ? void 0 : arguments[7], + "px rgba(0,0,0," + ) + .concat(0.14, ")"), + "" + .concat(arguments.length <= 8 ? void 0 : arguments[8], "px ") + .concat(arguments.length <= 9 ? void 0 : arguments[9], "px ") + .concat(arguments.length <= 10 ? void 0 : arguments[10], "px ") + .concat( + arguments.length <= 11 ? void 0 : arguments[11], + "px rgba(0,0,0," + ) + .concat(0.12, ")"), + ].join(","); + } + var R = [ + "none", + k(0, 2, 1, -1, 0, 1, 1, 0, 0, 1, 3, 0), + k(0, 3, 1, -2, 0, 2, 2, 0, 0, 1, 5, 0), + k(0, 3, 3, -2, 0, 3, 4, 0, 0, 1, 8, 0), + k(0, 2, 4, -1, 0, 4, 5, 0, 0, 1, 10, 0), + k(0, 3, 5, -1, 0, 5, 8, 0, 0, 1, 14, 0), + k(0, 3, 5, -1, 0, 6, 10, 0, 0, 1, 18, 0), + k(0, 4, 5, -2, 0, 7, 10, 1, 0, 2, 16, 1), + k(0, 5, 5, -3, 0, 8, 10, 1, 0, 3, 14, 2), + k(0, 5, 6, -3, 0, 9, 12, 1, 0, 3, 16, 2), + k(0, 6, 6, -3, 0, 10, 14, 1, 0, 4, 18, 3), + k(0, 6, 7, -4, 0, 11, 15, 1, 0, 4, 20, 3), + k(0, 7, 8, -4, 0, 12, 17, 2, 0, 5, 22, 4), + k(0, 7, 8, -4, 0, 13, 19, 2, 0, 5, 24, 4), + k(0, 7, 9, -4, 0, 14, 21, 2, 0, 5, 26, 4), + k(0, 8, 9, -5, 0, 15, 22, 2, 0, 6, 28, 5), + k(0, 8, 10, -5, 0, 16, 24, 2, 0, 6, 30, 5), + k(0, 8, 11, -5, 0, 17, 26, 2, 0, 6, 32, 5), + k(0, 9, 11, -5, 0, 18, 28, 2, 0, 7, 34, 6), + k(0, 9, 12, -6, 0, 19, 29, 2, 0, 7, 36, 6), + k(0, 10, 13, -6, 0, 20, 31, 3, 0, 8, 38, 7), + k(0, 10, 13, -6, 0, 21, 33, 3, 0, 8, 40, 7), + k(0, 10, 14, -6, 0, 22, 35, 3, 0, 8, 42, 7), + k(0, 11, 14, -7, 0, 23, 36, 3, 0, 9, 44, 8), + k(0, 11, 15, -7, 0, 24, 38, 3, 0, 9, 46, 8), + ], + B = ["duration", "easing", "delay"], + P = { + easeInOut: "cubic-bezier(0.4, 0, 0.2, 1)", + easeOut: "cubic-bezier(0.0, 0, 0.2, 1)", + easeIn: "cubic-bezier(0.4, 0, 1, 1)", + sharp: "cubic-bezier(0.4, 0, 0.6, 1)", + }, + L = { + shortest: 150, + shorter: 200, + short: 250, + standard: 300, + complex: 375, + enteringScreen: 225, + leavingScreen: 195, + }; + function D(e) { + return "".concat(Math.round(e), "ms"); + } + function U(e) { + if (!e) return 0; + var t = e / 36; + return Math.round(10 * (4 + 15 * Math.pow(t, 0.25) + t / 5)); + } + function F(e) { + var t = (0, r.Z)({}, P, e.easing), + n = (0, r.Z)({}, L, e.duration); + return (0, r.Z)( + { + getAutoHeightDuration: U, + create: function () { + var e = + arguments.length > 0 && void 0 !== arguments[0] + ? arguments[0] + : ["all"], + r = + arguments.length > 1 && void 0 !== arguments[1] + ? arguments[1] + : {}, + a = r.duration, + o = void 0 === a ? n.standard : a, + s = r.easing, + l = void 0 === s ? t.easeInOut : s, + u = r.delay, + c = void 0 === u ? 0 : u; + (0, i.Z)(r, B); + return (Array.isArray(e) ? e : [e]) + .map(function (e) { + return "" + .concat(e, " ") + .concat("string" === typeof o ? o : D(o), " ") + .concat(l, " ") + .concat("string" === typeof c ? c : D(c)); + }) + .join(","); + }, + }, + e, + { easing: t, duration: n } + ); + } + var O = { + mobileStepper: 1e3, + fab: 1050, + speedDial: 1050, + appBar: 1100, + drawer: 1200, + modal: 1300, + snackbar: 1400, + tooltip: 1500, + }, + N = [ + "breakpoints", + "mixins", + "spacing", + "palette", + "transitions", + "typography", + "shape", + ]; + function G() { + var e = + arguments.length > 0 && void 0 !== arguments[0] + ? arguments[0] + : {}, + t = e.mixins, + n = void 0 === t ? {} : t, + c = e.palette, + d = void 0 === c ? {} : c, + h = e.transitions, + p = void 0 === h ? {} : h, + v = e.typography, + m = void 0 === v ? {} : v, + g = (0, i.Z)(e, N); + if (e.vars) throw new Error((0, a.Z)(18)); + var A = C(d), + y = (0, s.Z)(e), + b = (0, o.Z)(y, { + mixins: f(y.breakpoints, n), + palette: A, + shadows: R.slice(), + typography: I(A, m), + transitions: F(p), + zIndex: (0, r.Z)({}, O), + }); + b = (0, o.Z)(b, g); + for ( + var x = arguments.length, S = new Array(x > 1 ? x - 1 : 0), E = 1; + E < x; + E++ + ) + S[E - 1] = arguments[E]; + return ( + ((b = S.reduce(function (e, t) { + return (0, o.Z)(e, t); + }, b)).unstable_sxConfig = (0, r.Z)( + {}, + l.Z, + null == g ? void 0 : g.unstable_sxConfig + )), + (b.unstable_sx = function (e) { + return (0, u.Z)({ sx: e, theme: this }); + }), + b + ); + } + var Z = G(); + }, + 988: function (e, t) { + "use strict"; + t.Z = "$$material"; + }, + 724: function (e, t, n) { + "use strict"; + n.d(t, { + ZP: function () { + return O; + }, + FO: function () { + return D; + }, + Dz: function () { + return U; + }, + }); + var r = n(9439), + i = n(3433), + a = n(3366), + o = n(7462), + s = n(2791), + l = n(9791), + u = n(2564), + c = n(5438), + f = n(9140), + d = n(2561), + h = l.Z, + p = function (e) { + return "theme" !== e; + }, + v = function (e) { + return "string" === typeof e && e.charCodeAt(0) > 96 ? h : p; + }, + m = function (e, t, n) { + var r; + if (t) { + var i = t.shouldForwardProp; + r = + e.__emotion_forwardProp && i + ? function (t) { + return e.__emotion_forwardProp(t) && i(t); + } + : i; + } + return ( + "function" !== typeof r && n && (r = e.__emotion_forwardProp), r + ); + }, + g = function (e) { + var t = e.cache, + n = e.serialized, + r = e.isStringTag; + return ( + (0, c.hC)(t, n, r), + (0, d.L)(function () { + return (0, c.My)(t, n, r); + }), + null + ); + }, + A = function e(t, n) { + var r, + i, + a = t.__emotion_real === t, + l = (a && t.__emotion_base) || t; + void 0 !== n && ((r = n.label), (i = n.target)); + var d = m(t, n, a), + h = d || v(l), + p = !h("as"); + return function () { + var A = arguments, + y = + a && void 0 !== t.__emotion_styles + ? t.__emotion_styles.slice(0) + : []; + if ( + (void 0 !== r && y.push("label:" + r + ";"), + null == A[0] || void 0 === A[0].raw) + ) + y.push.apply(y, A); + else { + 0, y.push(A[0][0]); + for (var b = A.length, x = 1; x < b; x++) y.push(A[x], A[0][x]); + } + var S = (0, u.w)(function (e, t, n) { + var r = (p && e.as) || l, + a = "", + o = [], + m = e; + if (null == e.theme) { + for (var A in ((m = {}), e)) m[A] = e[A]; + m.theme = s.useContext(u.T); + } + "string" === typeof e.className + ? (a = (0, c.fp)(t.registered, o, e.className)) + : null != e.className && (a = e.className + " "); + var b = (0, f.O)(y.concat(o), t.registered, m); + (a += t.key + "-" + b.name), void 0 !== i && (a += " " + i); + var x = p && void 0 === d ? v(r) : h, + S = {}; + for (var E in e) (p && "as" === E) || (x(E) && (S[E] = e[E])); + return ( + (S.className = a), + (S.ref = n), + s.createElement( + s.Fragment, + null, + s.createElement(g, { + cache: t, + serialized: b, + isStringTag: "string" === typeof r, + }), + s.createElement(r, S) + ) + ); + }); + return ( + (S.displayName = + void 0 !== r + ? r + : "Styled(" + + ("string" === typeof l + ? l + : l.displayName || l.name || "Component") + + ")"), + (S.defaultProps = t.defaultProps), + (S.__emotion_real = S), + (S.__emotion_base = l), + (S.__emotion_styles = y), + (S.__emotion_forwardProp = d), + Object.defineProperty(S, "toString", { + value: function () { + return "." + i; + }, + }), + (S.withComponent = function (t, r) { + return e( + t, + (0, o.Z)({}, n, r, { shouldForwardProp: m(S, r, !0) }) + ).apply(void 0, y); + }), + S + ); + }; + }.bind(); + [ + "a", + "abbr", + "address", + "area", + "article", + "aside", + "audio", + "b", + "base", + "bdi", + "bdo", + "big", + "blockquote", + "body", + "br", + "button", + "canvas", + "caption", + "cite", + "code", + "col", + "colgroup", + "data", + "datalist", + "dd", + "del", + "details", + "dfn", + "dialog", + "div", + "dl", + "dt", + "em", + "embed", + "fieldset", + "figcaption", + "figure", + "footer", + "form", + "h1", + "h2", + "h3", + "h4", + "h5", + "h6", + "head", + "header", + "hgroup", + "hr", + "html", + "i", + "iframe", + "img", + "input", + "ins", + "kbd", + "keygen", + "label", + "legend", + "li", + "link", + "main", + "map", + "mark", + "marquee", + "menu", + "menuitem", + "meta", + "meter", + "nav", + "noscript", + "object", + "ol", + "optgroup", + "option", + "output", + "p", + "param", + "picture", + "pre", + "progress", + "q", + "rp", + "rt", + "ruby", + "s", + "samp", + "script", + "section", + "select", + "small", + "source", + "span", + "strong", + "style", + "sub", + "summary", + "sup", + "table", + "tbody", + "td", + "textarea", + "tfoot", + "th", + "thead", + "time", + "title", + "tr", + "track", + "u", + "ul", + "var", + "video", + "wbr", + "circle", + "clipPath", + "defs", + "ellipse", + "foreignObject", + "g", + "image", + "line", + "linearGradient", + "mask", + "path", + "pattern", + "polygon", + "polyline", + "radialGradient", + "rect", + "stop", + "svg", + "text", + "tspan", + ].forEach(function (e) { + A[e] = A(e); + }); + var y = n(2466), + b = n(5080), + x = n(1122), + S = ["variant"]; + function E(e) { + return 0 === e.length; + } + function _(e) { + var t = e.variant, + n = (0, a.Z)(e, S), + r = t || ""; + return ( + Object.keys(n) + .sort() + .forEach(function (t) { + r += + "color" === t + ? E(r) + ? e[t] + : (0, x.Z)(e[t]) + : "" + .concat(E(r) ? t : (0, x.Z)(t)) + .concat((0, x.Z)(e[t].toString())); + }), + r + ); + } + var C = n(104), + w = [ + "name", + "slot", + "skipVariantsResolver", + "skipSx", + "overridesResolver", + ]; + var T = function (e) { + var t = {}; + return ( + e && + e.forEach(function (e) { + var n = _(e.props); + t[n] = e.style; + }), + t + ); + }, + M = function (e, t, n) { + var r = e.ownerState, + i = void 0 === r ? {} : r, + a = []; + return ( + n && + n.forEach(function (n) { + var r = !0; + Object.keys(n.props).forEach(function (t) { + i[t] !== n.props[t] && e[t] !== n.props[t] && (r = !1); + }), + r && a.push(t[_(n.props)]); + }), + a + ); + }; + function I(e) { + return ( + "ownerState" !== e && "theme" !== e && "sx" !== e && "as" !== e + ); + } + var k = (0, b.Z)(); + function R(e) { + var t, + n = e.defaultTheme, + r = e.theme, + i = e.themeId; + return (t = r), 0 === Object.keys(t).length ? n : r[i] || r; + } + var B = function (e) { + var t, + n = e.styledArg, + r = e.props, + a = e.defaultTheme, + s = e.themeId, + l = n( + (0, o.Z)({}, r, { + theme: R((0, o.Z)({}, r, { defaultTheme: a, themeId: s })), + }) + ); + if ((l && l.variants && ((t = l.variants), delete l.variants), t)) { + var u = M(r, T(t), t); + return [l].concat((0, i.Z)(u)); + } + return l; + }; + var P = n(4591), + L = n(988), + D = function (e) { + return I(e) && "classes" !== e; + }, + U = I, + F = (function () { + var e = + arguments.length > 0 && void 0 !== arguments[0] + ? arguments[0] + : {}, + t = e.themeId, + n = e.defaultTheme, + s = void 0 === n ? k : n, + l = e.rootShouldForwardProp, + u = void 0 === l ? I : l, + c = e.slotShouldForwardProp, + f = void 0 === c ? I : c, + d = function (e) { + return (0, C.Z)( + (0, o.Z)({}, e, { + theme: R((0, o.Z)({}, e, { defaultTheme: s, themeId: t })), + }) + ); + }; + return ( + (d.__mui_systemSx = !0), + function (e) { + var n = + arguments.length > 1 && void 0 !== arguments[1] + ? arguments[1] + : {}; + !(function (e, t) { + Array.isArray(e.__emotion_styles) && + (e.__emotion_styles = t(e.__emotion_styles)); + })(e, function (e) { + return e.filter(function (e) { + return !(null != e && e.__mui_systemSx); + }); + }); + var l, + c, + h = n.name, + p = n.slot, + v = n.skipVariantsResolver, + m = n.skipSx, + g = n.overridesResolver, + b = + void 0 === g + ? (l = (c = p) + ? c.charAt(0).toLowerCase() + c.slice(1) + : c) + ? function (e, t) { + return t[l]; + } + : null + : g, + x = (0, a.Z)(n, w), + S = + void 0 !== v + ? v + : (p && "Root" !== p && "root" !== p) || !1, + E = m || !1; + var _ = I; + "Root" === p || "root" === p + ? (_ = u) + : p + ? (_ = f) + : (function (e) { + return "string" === typeof e && e.charCodeAt(0) > 96; + })(e) && (_ = void 0); + var C = (function (e, t) { + return A(e, t); + })( + e, + (0, o.Z)({ shouldForwardProp: _, label: undefined }, x) + ), + k = function (n) { + for ( + var a = arguments.length, + l = new Array(a > 1 ? a - 1 : 0), + u = 1; + u < a; + u++ + ) + l[u - 1] = arguments[u]; + var c, + f = l + ? l.map(function (e) { + if ( + "function" === typeof e && + e.__emotion_real !== e + ) + return function (n) { + return B({ + styledArg: e, + props: n, + defaultTheme: s, + themeId: t, + }); + }; + if ((0, y.P)(e)) { + var n, + r = e; + return ( + e && + e.variants && + ((n = e.variants), + delete r.variants, + (r = function (t) { + var r = e; + return ( + M(t, T(n), n).forEach(function (e) { + r = (0, y.Z)(r, e); + }), + r + ); + })), + r + ); + } + return e; + }) + : [], + p = n; + (0, y.P)(n) + ? n && + n.variants && + ((c = n.variants), + delete p.variants, + (p = function (e) { + var t = n; + return ( + M(e, T(c), c).forEach(function (e) { + t = (0, y.Z)(t, e); + }), + t + ); + })) + : "function" === typeof n && + n.__emotion_real !== n && + (p = function (e) { + return B({ + styledArg: n, + props: e, + defaultTheme: s, + themeId: t, + }); + }); + h && + b && + f.push(function (e) { + var n = R( + (0, o.Z)({}, e, { defaultTheme: s, themeId: t }) + ), + i = (function (e, t) { + return t.components && + t.components[e] && + t.components[e].styleOverrides + ? t.components[e].styleOverrides + : null; + })(h, n); + if (i) { + var a = {}; + return ( + Object.entries(i).forEach(function (t) { + var i = (0, r.Z)(t, 2), + s = i[0], + l = i[1]; + a[s] = + "function" === typeof l + ? l((0, o.Z)({}, e, { theme: n })) + : l; + }), + b(e, a) + ); + } + return null; + }), + h && + !S && + f.push(function (e) { + var n = R( + (0, o.Z)({}, e, { defaultTheme: s, themeId: t }) + ); + return (function (e, t, n, r) { + var i, + a = + null == n || + null == (i = n.components) || + null == (i = i[r]) + ? void 0 + : i.variants; + return M(e, t, a); + })( + e, + (function (e, t) { + var n = []; + return ( + t && + t.components && + t.components[e] && + t.components[e].variants && + (n = t.components[e].variants), + T(n) + ); + })(h, n), + n, + h + ); + }), + E || f.push(d); + var v = f.length - l.length; + if (Array.isArray(n) && v > 0) { + var m = new Array(v).fill(""); + (p = [].concat((0, i.Z)(n), (0, i.Z)(m))).raw = [].concat( + (0, i.Z)(n.raw), + (0, i.Z)(m) + ); + } + var g = C.apply(void 0, [p].concat((0, i.Z)(f))); + return e.muiName && (g.muiName = e.muiName), g; + }; + return C.withConfig && (k.withConfig = C.withConfig), k; + } + ); + })({ themeId: L.Z, defaultTheme: P.Z, rootShouldForwardProp: D }), + O = F; + }, + 1046: function (e, t, n) { + "use strict"; + n.d(t, { + Z: function () { + return l; + }, + }); + var r = n(5735); + var i = n(418); + function a(e) { + var t = e.props, + n = e.name, + a = e.defaultTheme, + o = e.themeId, + s = (0, i.Z)(a); + o && (s = s[o] || s); + var l = (function (e) { + var t = e.theme, + n = e.name, + i = e.props; + return t && + t.components && + t.components[n] && + t.components[n].defaultProps + ? (0, r.Z)(t.components[n].defaultProps, i) + : i; + })({ theme: s, name: n, props: t }); + return l; + } + var o = n(4591), + s = n(988); + function l(e) { + return a({ + props: e.props, + name: e.name, + defaultTheme: o.Z, + themeId: s.Z, + }); + } + }, + 4036: function (e, t, n) { + "use strict"; + var r = n(1122); + t.Z = r.Z; + }, + 9201: function (e, t, n) { + "use strict"; + n.d(t, { + Z: function () { + return y; + }, + }); + var r = n(7462), + i = n(2791), + a = n(3366), + o = n(3733), + s = n(4419), + l = n(4036), + u = n(1046), + c = n(724), + f = n(5878), + d = n(1217); + function h(e) { + return (0, d.Z)("MuiSvgIcon", e); + } + (0, f.Z)("MuiSvgIcon", [ + "root", + "colorPrimary", + "colorSecondary", + "colorAction", + "colorError", + "colorDisabled", + "fontSizeInherit", + "fontSizeSmall", + "fontSizeMedium", + "fontSizeLarge", + ]); + var p = n(184), + v = [ + "children", + "className", + "color", + "component", + "fontSize", + "htmlColor", + "inheritViewBox", + "titleAccess", + "viewBox", + ], + m = (0, c.ZP)("svg", { + name: "MuiSvgIcon", + slot: "Root", + overridesResolver: function (e, t) { + var n = e.ownerState; + return [ + t.root, + "inherit" !== n.color && t["color".concat((0, l.Z)(n.color))], + t["fontSize".concat((0, l.Z)(n.fontSize))], + ]; + }, + })(function (e) { + var t, + n, + r, + i, + a, + o, + s, + l, + u, + c, + f, + d, + h, + p = e.theme, + v = e.ownerState; + return { + userSelect: "none", + width: "1em", + height: "1em", + display: "inline-block", + fill: v.hasSvgAsChild ? void 0 : "currentColor", + flexShrink: 0, + transition: + null == (t = p.transitions) || null == (n = t.create) + ? void 0 + : n.call(t, "fill", { + duration: + null == (r = p.transitions) || null == (r = r.duration) + ? void 0 + : r.shorter, + }), + fontSize: { + inherit: "inherit", + small: + (null == (i = p.typography) || null == (a = i.pxToRem) + ? void 0 + : a.call(i, 20)) || "1.25rem", + medium: + (null == (o = p.typography) || null == (s = o.pxToRem) + ? void 0 + : s.call(o, 24)) || "1.5rem", + large: + (null == (l = p.typography) || null == (u = l.pxToRem) + ? void 0 + : u.call(l, 35)) || "2.1875rem", + }[v.fontSize], + color: + null != + (c = + null == (f = (p.vars || p).palette) || + null == (f = f[v.color]) + ? void 0 + : f.main) + ? c + : { + action: + null == (d = (p.vars || p).palette) || + null == (d = d.action) + ? void 0 + : d.active, + disabled: + null == (h = (p.vars || p).palette) || + null == (h = h.action) + ? void 0 + : h.disabled, + inherit: void 0, + }[v.color], + }; + }), + g = i.forwardRef(function (e, t) { + var n = (0, u.Z)({ props: e, name: "MuiSvgIcon" }), + c = n.children, + f = n.className, + d = n.color, + g = void 0 === d ? "inherit" : d, + A = n.component, + y = void 0 === A ? "svg" : A, + b = n.fontSize, + x = void 0 === b ? "medium" : b, + S = n.htmlColor, + E = n.inheritViewBox, + _ = void 0 !== E && E, + C = n.titleAccess, + w = n.viewBox, + T = void 0 === w ? "0 0 24 24" : w, + M = (0, a.Z)(n, v), + I = i.isValidElement(c) && "svg" === c.type, + k = (0, r.Z)({}, n, { + color: g, + component: y, + fontSize: x, + instanceFontSize: e.fontSize, + inheritViewBox: _, + viewBox: T, + hasSvgAsChild: I, + }), + R = {}; + _ || (R.viewBox = T); + var B = (function (e) { + var t = e.color, + n = e.fontSize, + r = e.classes, + i = { + root: [ + "root", + "inherit" !== t && "color".concat((0, l.Z)(t)), + "fontSize".concat((0, l.Z)(n)), + ], + }; + return (0, s.Z)(i, h, r); + })(k); + return (0, + p.jsxs)(m, (0, r.Z)({ as: y, className: (0, o.Z)(B.root, f), focusable: "false", color: S, "aria-hidden": !C || void 0, role: C ? "img" : void 0, ref: t }, R, M, I && c.props, { ownerState: k, children: [I ? c.props.children : c, C ? (0, p.jsx)("title", { children: C }) : null] })); + }); + g.muiName = "SvgIcon"; + var A = g; + function y(e, t) { + function n(n, i) { + return (0, p.jsx)( + A, + (0, r.Z)({ "data-testid": "".concat(t, "Icon"), ref: i }, n, { + children: e, + }) + ); + } + return (n.muiName = A.muiName), i.memo(i.forwardRef(n)); + } + }, + 3199: function (e, t, n) { + "use strict"; + var r = n(2254); + t.Z = r.Z; + }, + 4421: function (e, t, n) { + "use strict"; + n.r(t), + n.d(t, { + capitalize: function () { + return i.Z; + }, + createChainedFunction: function () { + return a; + }, + createSvgIcon: function () { + return o.Z; + }, + debounce: function () { + return s.Z; + }, + deprecatedPropType: function () { + return l; + }, + isMuiElement: function () { + return u.Z; + }, + ownerDocument: function () { + return c.Z; + }, + ownerWindow: function () { + return f.Z; + }, + requirePropFactory: function () { + return d; + }, + setRef: function () { + return h; + }, + unstable_ClassNameGenerator: function () { + return x; + }, + unstable_useEnhancedEffect: function () { + return p.Z; + }, + unstable_useId: function () { + return v.Z; + }, + unsupportedProp: function () { + return m; + }, + useControlled: function () { + return g.Z; + }, + useEventCallback: function () { + return A.Z; + }, + useForkRef: function () { + return y.Z; + }, + useIsFocusVisible: function () { + return b.Z; + }, + }); + var r = n(5902), + i = n(4036), + a = n(8949).Z, + o = n(9201), + s = n(3199); + var l = function (e, t) { + return function () { + return null; + }; + }, + u = n(9103), + c = n(8301), + f = n(7602); + n(7462); + var d = function (e, t) { + return function () { + return null; + }; + }, + h = n(2971).Z, + p = n(162), + v = n(7384); + var m = function (e, t, n, r, i) { + return null; + }, + g = n(5158), + A = n(9683), + y = n(2071), + b = n(3031), + x = { + configure: function (e) { + r.Z.configure(e); + }, + }; + }, + 9103: function (e, t, n) { + "use strict"; + n.d(t, { + Z: function () { + return i; + }, + }); + var r = n(2791); + var i = function (e, t) { + var n, i; + return ( + r.isValidElement(e) && + -1 !== + t.indexOf( + null != (n = e.type.muiName) + ? n + : null == (i = e.type) || + null == (i = i._payload) || + null == (i = i.value) + ? void 0 + : i.muiName + ) + ); + }; + }, + 8301: function (e, t, n) { + "use strict"; + var r = n(4913); + t.Z = r.Z; + }, + 7602: function (e, t, n) { + "use strict"; + var r = n(5202); + t.Z = r.Z; + }, + 5158: function (e, t, n) { + "use strict"; + n.d(t, { + Z: function () { + return a; + }, + }); + var r = n(9439), + i = n(2791); + var a = function (e) { + var t = e.controlled, + n = e.default, + a = (e.name, e.state, i.useRef(void 0 !== t).current), + o = i.useState(n), + s = (0, r.Z)(o, 2), + l = s[0], + u = s[1]; + return [ + a ? t : l, + i.useCallback(function (e) { + a || u(e); + }, []), + ]; + }; + }, + 162: function (e, t, n) { + "use strict"; + var r = n(2876); + t.Z = r.Z; + }, + 9683: function (e, t, n) { + "use strict"; + var r = n(7054); + t.Z = r.Z; + }, + 2071: function (e, t, n) { + "use strict"; + var r = n(6117); + t.Z = r.Z; + }, + 7384: function (e, t, n) { + "use strict"; + var r = n(8252); + t.Z = r.Z; + }, + 3031: function (e, t, n) { + "use strict"; + n.d(t, { + Z: function () { + return d; + }, + }); + var r, + i = n(2791), + a = !0, + o = !1, + s = { + text: !0, + search: !0, + url: !0, + tel: !0, + email: !0, + password: !0, + number: !0, + date: !0, + month: !0, + week: !0, + time: !0, + datetime: !0, + "datetime-local": !0, + }; + function l(e) { + e.metaKey || e.altKey || e.ctrlKey || (a = !0); + } + function u() { + a = !1; + } + function c() { + "hidden" === this.visibilityState && o && (a = !0); + } + function f(e) { + var t = e.target; + try { + return t.matches(":focus-visible"); + } catch (n) {} + return ( + a || + (function (e) { + var t = e.type, + n = e.tagName; + return ( + !("INPUT" !== n || !s[t] || e.readOnly) || + ("TEXTAREA" === n && !e.readOnly) || + !!e.isContentEditable + ); + })(t) + ); + } + var d = function () { + var e = i.useCallback(function (e) { + var t; + null != e && + ((t = e.ownerDocument).addEventListener("keydown", l, !0), + t.addEventListener("mousedown", u, !0), + t.addEventListener("pointerdown", u, !0), + t.addEventListener("touchstart", u, !0), + t.addEventListener("visibilitychange", c, !0)); + }, []), + t = i.useRef(!1); + return { + isFocusVisibleRef: t, + onFocus: function (e) { + return !!f(e) && ((t.current = !0), !0); + }, + onBlur: function () { + return ( + !!t.current && + ((o = !0), + window.clearTimeout(r), + (r = window.setTimeout(function () { + o = !1; + }, 100)), + (t.current = !1), + !0) + ); + }, + ref: e, + }; + }; + }, + 1184: function (e, t, n) { + "use strict"; + n.d(t, { + L7: function () { + return s; + }, + VO: function () { + return r; + }, + W8: function () { + return o; + }, + k9: function () { + return a; + }, + }); + var r = { xs: 0, sm: 600, md: 900, lg: 1200, xl: 1536 }, + i = { + keys: ["xs", "sm", "md", "lg", "xl"], + up: function (e) { + return "@media (min-width:".concat(r[e], "px)"); + }, + }; + function a(e, t, n) { + var a = e.theme || {}; + if (Array.isArray(t)) { + var o = a.breakpoints || i; + return t.reduce(function (e, r, i) { + return (e[o.up(o.keys[i])] = n(t[i])), e; + }, {}); + } + if ("object" === typeof t) { + var s = a.breakpoints || i; + return Object.keys(t).reduce(function (e, i) { + if (-1 !== Object.keys(s.values || r).indexOf(i)) { + e[s.up(i)] = n(t[i], i); + } else { + var a = i; + e[a] = t[a]; + } + return e; + }, {}); + } + return n(t); + } + function o() { + var e, + t = + arguments.length > 0 && void 0 !== arguments[0] + ? arguments[0] + : {}; + return ( + (null == (e = t.keys) + ? void 0 + : e.reduce(function (e, n) { + return (e[t.up(n)] = {}), e; + }, {})) || {} + ); + } + function s(e, t) { + return e.reduce(function (e, t) { + var n = e[t]; + return (!n || 0 === Object.keys(n).length) && delete e[t], e; + }, t); + } + }, + 2065: function (e, t, n) { + "use strict"; + n.d(t, { + $n: function () { + return f; + }, + Fq: function () { + return u; + }, + _j: function () { + return c; + }, + mi: function () { + return l; + }, + }); + var r = n(6189); + function i(e) { + var t = + arguments.length > 1 && void 0 !== arguments[1] + ? arguments[1] + : 0, + n = + arguments.length > 2 && void 0 !== arguments[2] + ? arguments[2] + : 1; + return Math.min(Math.max(t, e), n); + } + function a(e) { + if (e.type) return e; + if ("#" === e.charAt(0)) + return a( + (function (e) { + e = e.slice(1); + var t = new RegExp( + ".{1,".concat(e.length >= 6 ? 2 : 1, "}"), + "g" + ), + n = e.match(t); + return ( + n && + 1 === n[0].length && + (n = n.map(function (e) { + return e + e; + })), + n + ? "rgb".concat(4 === n.length ? "a" : "", "(").concat( + n + .map(function (e, t) { + return t < 3 + ? parseInt(e, 16) + : Math.round((parseInt(e, 16) / 255) * 1e3) / 1e3; + }) + .join(", "), + ")" + ) + : "" + ); + })(e) + ); + var t = e.indexOf("("), + n = e.substring(0, t); + if (-1 === ["rgb", "rgba", "hsl", "hsla", "color"].indexOf(n)) + throw new Error((0, r.Z)(9, e)); + var i, + o = e.substring(t + 1, e.length - 1); + if ("color" === n) { + if ( + ((i = (o = o.split(" ")).shift()), + 4 === o.length && + "/" === o[3].charAt(0) && + (o[3] = o[3].slice(1)), + -1 === + [ + "srgb", + "display-p3", + "a98-rgb", + "prophoto-rgb", + "rec-2020", + ].indexOf(i)) + ) + throw new Error((0, r.Z)(10, i)); + } else o = o.split(","); + return { + type: n, + values: (o = o.map(function (e) { + return parseFloat(e); + })), + colorSpace: i, + }; + } + function o(e) { + var t = e.type, + n = e.colorSpace, + r = e.values; + return ( + -1 !== t.indexOf("rgb") + ? (r = r.map(function (e, t) { + return t < 3 ? parseInt(e, 10) : e; + })) + : -1 !== t.indexOf("hsl") && + ((r[1] = "".concat(r[1], "%")), (r[2] = "".concat(r[2], "%"))), + (r = + -1 !== t.indexOf("color") + ? "".concat(n, " ").concat(r.join(" ")) + : "".concat(r.join(", "))), + "".concat(t, "(").concat(r, ")") + ); + } + function s(e) { + var t = + "hsl" === (e = a(e)).type || "hsla" === e.type + ? a( + (function (e) { + var t = (e = a(e)).values, + n = t[0], + r = t[1] / 100, + i = t[2] / 100, + s = r * Math.min(i, 1 - i), + l = function (e) { + var t = + arguments.length > 1 && void 0 !== arguments[1] + ? arguments[1] + : (e + n / 30) % 12; + return i - s * Math.max(Math.min(t - 3, 9 - t, 1), -1); + }, + u = "rgb", + c = [ + Math.round(255 * l(0)), + Math.round(255 * l(8)), + Math.round(255 * l(4)), + ]; + return ( + "hsla" === e.type && ((u += "a"), c.push(t[3])), + o({ type: u, values: c }) + ); + })(e) + ).values + : e.values; + return ( + (t = t.map(function (t) { + return ( + "color" !== e.type && (t /= 255), + t <= 0.03928 ? t / 12.92 : Math.pow((t + 0.055) / 1.055, 2.4) + ); + })), + Number((0.2126 * t[0] + 0.7152 * t[1] + 0.0722 * t[2]).toFixed(3)) + ); + } + function l(e, t) { + var n = s(e), + r = s(t); + return (Math.max(n, r) + 0.05) / (Math.min(n, r) + 0.05); + } + function u(e, t) { + return ( + (e = a(e)), + (t = i(t)), + ("rgb" !== e.type && "hsl" !== e.type) || (e.type += "a"), + "color" === e.type + ? (e.values[3] = "/".concat(t)) + : (e.values[3] = t), + o(e) + ); + } + function c(e, t) { + if (((e = a(e)), (t = i(t)), -1 !== e.type.indexOf("hsl"))) + e.values[2] *= 1 - t; + else if ( + -1 !== e.type.indexOf("rgb") || + -1 !== e.type.indexOf("color") + ) + for (var n = 0; n < 3; n += 1) e.values[n] *= 1 - t; + return o(e); + } + function f(e, t) { + if (((e = a(e)), (t = i(t)), -1 !== e.type.indexOf("hsl"))) + e.values[2] += (100 - e.values[2]) * t; + else if (-1 !== e.type.indexOf("rgb")) + for (var n = 0; n < 3; n += 1) + e.values[n] += (255 - e.values[n]) * t; + else if (-1 !== e.type.indexOf("color")) + for (var r = 0; r < 3; r += 1) e.values[r] += (1 - e.values[r]) * t; + return o(e); + } + }, + 5080: function (e, t, n) { + "use strict"; + n.d(t, { + Z: function () { + return p; + }, + }); + var r = n(7462), + i = n(3366), + a = n(2466), + o = n(4942), + s = ["values", "unit", "step"], + l = function (e) { + var t = + Object.keys(e).map(function (t) { + return { key: t, val: e[t] }; + }) || []; + return ( + t.sort(function (e, t) { + return e.val - t.val; + }), + t.reduce(function (e, t) { + return (0, r.Z)({}, e, (0, o.Z)({}, t.key, t.val)); + }, {}) + ); + }; + var u = { borderRadius: 4 }, + c = n(5682); + var f = n(104), + d = n(7416), + h = ["breakpoints", "palette", "spacing", "shape"]; + var p = function () { + for ( + var e = + arguments.length > 0 && void 0 !== arguments[0] + ? arguments[0] + : {}, + t = e.breakpoints, + n = void 0 === t ? {} : t, + o = e.palette, + p = void 0 === o ? {} : o, + v = e.spacing, + m = e.shape, + g = void 0 === m ? {} : m, + A = (0, i.Z)(e, h), + y = (function (e) { + var t = e.values, + n = + void 0 === t + ? { xs: 0, sm: 600, md: 900, lg: 1200, xl: 1536 } + : t, + a = e.unit, + o = void 0 === a ? "px" : a, + u = e.step, + c = void 0 === u ? 5 : u, + f = (0, i.Z)(e, s), + d = l(n), + h = Object.keys(d); + function p(e) { + var t = "number" === typeof n[e] ? n[e] : e; + return "@media (min-width:".concat(t).concat(o, ")"); + } + function v(e) { + var t = "number" === typeof n[e] ? n[e] : e; + return "@media (max-width:" + .concat(t - c / 100) + .concat(o, ")"); + } + function m(e, t) { + var r = h.indexOf(t); + return ( + "@media (min-width:" + .concat("number" === typeof n[e] ? n[e] : e) + .concat(o, ") and ") + + "(max-width:" + .concat( + (-1 !== r && "number" === typeof n[h[r]] + ? n[h[r]] + : t) - + c / 100 + ) + .concat(o, ")") + ); + } + return (0, r.Z)( + { + keys: h, + values: d, + up: p, + down: v, + between: m, + only: function (e) { + return h.indexOf(e) + 1 < h.length + ? m(e, h[h.indexOf(e) + 1]) + : p(e); + }, + not: function (e) { + var t = h.indexOf(e); + return 0 === t + ? p(h[1]) + : t === h.length - 1 + ? v(h[t]) + : m(e, h[h.indexOf(e) + 1]).replace( + "@media", + "@media not all and" + ); + }, + unit: o, + }, + f + ); + })(n), + b = (function () { + var e = + arguments.length > 0 && void 0 !== arguments[0] + ? arguments[0] + : 8; + if (e.mui) return e; + var t = (0, c.hB)({ spacing: e }), + n = function () { + for ( + var e = arguments.length, n = new Array(e), r = 0; + r < e; + r++ + ) + n[r] = arguments[r]; + return (0 === n.length ? [1] : n) + .map(function (e) { + var n = t(e); + return "number" === typeof n ? "".concat(n, "px") : n; + }) + .join(" "); + }; + return (n.mui = !0), n; + })(v), + x = (0, a.Z)( + { + breakpoints: y, + direction: "ltr", + components: {}, + palette: (0, r.Z)({ mode: "light" }, p), + spacing: b, + shape: (0, r.Z)({}, u, g), + }, + A + ), + S = arguments.length, + E = new Array(S > 1 ? S - 1 : 0), + _ = 1; + _ < S; + _++ + ) + E[_ - 1] = arguments[_]; + return ( + ((x = E.reduce(function (e, t) { + return (0, a.Z)(e, t); + }, x)).unstable_sxConfig = (0, r.Z)( + {}, + d.Z, + null == A ? void 0 : A.unstable_sxConfig + )), + (x.unstable_sx = function (e) { + return (0, f.Z)({ sx: e, theme: this }); + }), + x + ); + }; + }, + 8247: function (e, t, n) { + "use strict"; + var r = n(2466); + t.Z = function (e, t) { + return t ? (0, r.Z)(e, t, { clone: !1 }) : e; + }; + }, + 5682: function (e, t, n) { + "use strict"; + n.d(t, { + hB: function () { + return v; + }, + eI: function () { + return p; + }, + NA: function () { + return m; + }, + e6: function () { + return y; + }, + o3: function () { + return b; + }, + }); + var r = n(9439), + i = n(1184), + a = n(8529), + o = n(8247); + var s = { m: "margin", p: "padding" }, + l = { + t: "Top", + r: "Right", + b: "Bottom", + l: "Left", + x: ["Left", "Right"], + y: ["Top", "Bottom"], + }, + u = { marginX: "mx", marginY: "my", paddingX: "px", paddingY: "py" }, + c = (function (e) { + var t = {}; + return function (n) { + return void 0 === t[n] && (t[n] = e(n)), t[n]; + }; + })(function (e) { + if (e.length > 2) { + if (!u[e]) return [e]; + e = u[e]; + } + var t = e.split(""), + n = (0, r.Z)(t, 2), + i = n[0], + a = n[1], + o = s[i], + c = l[a] || ""; + return Array.isArray(c) + ? c.map(function (e) { + return o + e; + }) + : [o + c]; + }), + f = [ + "m", + "mt", + "mr", + "mb", + "ml", + "mx", + "my", + "margin", + "marginTop", + "marginRight", + "marginBottom", + "marginLeft", + "marginX", + "marginY", + "marginInline", + "marginInlineStart", + "marginInlineEnd", + "marginBlock", + "marginBlockStart", + "marginBlockEnd", + ], + d = [ + "p", + "pt", + "pr", + "pb", + "pl", + "px", + "py", + "padding", + "paddingTop", + "paddingRight", + "paddingBottom", + "paddingLeft", + "paddingX", + "paddingY", + "paddingInline", + "paddingInlineStart", + "paddingInlineEnd", + "paddingBlock", + "paddingBlockStart", + "paddingBlockEnd", + ], + h = [].concat(f, d); + function p(e, t, n, r) { + var i, + o = null != (i = (0, a.DW)(e, t, !1)) ? i : n; + return "number" === typeof o + ? function (e) { + return "string" === typeof e ? e : o * e; + } + : Array.isArray(o) + ? function (e) { + return "string" === typeof e ? e : o[e]; + } + : "function" === typeof o + ? o + : function () {}; + } + function v(e) { + return p(e, "spacing", 8); + } + function m(e, t) { + if ("string" === typeof t || null == t) return t; + var n = e(Math.abs(t)); + return t >= 0 ? n : "number" === typeof n ? -n : "-".concat(n); + } + function g(e, t, n, r) { + if (-1 === t.indexOf(n)) return null; + var a = (function (e, t) { + return function (n) { + return e.reduce(function (e, r) { + return (e[r] = m(t, n)), e; + }, {}); + }; + })(c(n), r), + o = e[n]; + return (0, i.k9)(e, o, a); + } + function A(e, t) { + var n = v(e.theme); + return Object.keys(e) + .map(function (r) { + return g(e, t, r, n); + }) + .reduce(o.Z, {}); + } + function y(e) { + return A(e, f); + } + function b(e) { + return A(e, d); + } + function x(e) { + return A(e, h); + } + (y.propTypes = {}), + (y.filterProps = f), + (b.propTypes = {}), + (b.filterProps = d), + (x.propTypes = {}), + (x.filterProps = h); + }, + 8529: function (e, t, n) { + "use strict"; + n.d(t, { + DW: function () { + return o; + }, + Jq: function () { + return s; + }, + }); + var r = n(4942), + i = n(1122), + a = n(1184); + function o(e, t) { + var n = + !(arguments.length > 2 && void 0 !== arguments[2]) || arguments[2]; + if (!t || "string" !== typeof t) return null; + if (e && e.vars && n) { + var r = "vars." + .concat(t) + .split(".") + .reduce(function (e, t) { + return e && e[t] ? e[t] : null; + }, e); + if (null != r) return r; + } + return t.split(".").reduce(function (e, t) { + return e && null != e[t] ? e[t] : null; + }, e); + } + function s(e, t, n) { + var r, + i = + arguments.length > 3 && void 0 !== arguments[3] + ? arguments[3] + : n; + return ( + (r = + "function" === typeof e + ? e(n) + : Array.isArray(e) + ? e[n] || i + : o(e, n) || i), + t && (r = t(r, i, e)), + r + ); + } + t.ZP = function (e) { + var t = e.prop, + n = e.cssProperty, + l = void 0 === n ? e.prop : n, + u = e.themeKey, + c = e.transform, + f = function (e) { + if (null == e[t]) return null; + var n = e[t], + f = o(e.theme, u) || {}; + return (0, a.k9)(e, n, function (e) { + var n = s(f, c, e); + return ( + e === n && + "string" === typeof e && + (n = s( + f, + c, + "".concat(t).concat("default" === e ? "" : (0, i.Z)(e)), + e + )), + !1 === l ? n : (0, r.Z)({}, l, n) + ); + }); + }; + return (f.propTypes = {}), (f.filterProps = [t]), f; + }; + }, + 7416: function (e, t, n) { + "use strict"; + n.d(t, { + Z: function () { + return R; + }, + }); + var r = n(5682), + i = n(8529), + a = n(8247); + var o = function () { + for (var e = arguments.length, t = new Array(e), n = 0; n < e; n++) + t[n] = arguments[n]; + var r = t.reduce(function (e, t) { + return ( + t.filterProps.forEach(function (n) { + e[n] = t; + }), + e + ); + }, {}), + i = function (e) { + return Object.keys(e).reduce(function (t, n) { + return r[n] ? (0, a.Z)(t, r[n](e)) : t; + }, {}); + }; + return ( + (i.propTypes = {}), + (i.filterProps = t.reduce(function (e, t) { + return e.concat(t.filterProps); + }, [])), + i + ); + }, + s = n(1184); + function l(e) { + return "number" !== typeof e ? e : "".concat(e, "px solid"); + } + var u = (0, i.ZP)({ + prop: "border", + themeKey: "borders", + transform: l, + }), + c = (0, i.ZP)({ + prop: "borderTop", + themeKey: "borders", + transform: l, + }), + f = (0, i.ZP)({ + prop: "borderRight", + themeKey: "borders", + transform: l, + }), + d = (0, i.ZP)({ + prop: "borderBottom", + themeKey: "borders", + transform: l, + }), + h = (0, i.ZP)({ + prop: "borderLeft", + themeKey: "borders", + transform: l, + }), + p = (0, i.ZP)({ prop: "borderColor", themeKey: "palette" }), + v = (0, i.ZP)({ prop: "borderTopColor", themeKey: "palette" }), + m = (0, i.ZP)({ prop: "borderRightColor", themeKey: "palette" }), + g = (0, i.ZP)({ prop: "borderBottomColor", themeKey: "palette" }), + A = (0, i.ZP)({ prop: "borderLeftColor", themeKey: "palette" }), + y = function (e) { + if (void 0 !== e.borderRadius && null !== e.borderRadius) { + var t = (0, r.eI)( + e.theme, + "shape.borderRadius", + 4, + "borderRadius" + ); + return (0, s.k9)(e, e.borderRadius, function (e) { + return { borderRadius: (0, r.NA)(t, e) }; + }); + } + return null; + }; + (y.propTypes = {}), (y.filterProps = ["borderRadius"]); + o(u, c, f, d, h, p, v, m, g, A, y); + var b = function (e) { + if (void 0 !== e.gap && null !== e.gap) { + var t = (0, r.eI)(e.theme, "spacing", 8, "gap"); + return (0, s.k9)(e, e.gap, function (e) { + return { gap: (0, r.NA)(t, e) }; + }); + } + return null; + }; + (b.propTypes = {}), (b.filterProps = ["gap"]); + var x = function (e) { + if (void 0 !== e.columnGap && null !== e.columnGap) { + var t = (0, r.eI)(e.theme, "spacing", 8, "columnGap"); + return (0, s.k9)(e, e.columnGap, function (e) { + return { columnGap: (0, r.NA)(t, e) }; + }); + } + return null; + }; + (x.propTypes = {}), (x.filterProps = ["columnGap"]); + var S = function (e) { + if (void 0 !== e.rowGap && null !== e.rowGap) { + var t = (0, r.eI)(e.theme, "spacing", 8, "rowGap"); + return (0, s.k9)(e, e.rowGap, function (e) { + return { rowGap: (0, r.NA)(t, e) }; + }); + } + return null; + }; + (S.propTypes = {}), (S.filterProps = ["rowGap"]); + o( + b, + x, + S, + (0, i.ZP)({ prop: "gridColumn" }), + (0, i.ZP)({ prop: "gridRow" }), + (0, i.ZP)({ prop: "gridAutoFlow" }), + (0, i.ZP)({ prop: "gridAutoColumns" }), + (0, i.ZP)({ prop: "gridAutoRows" }), + (0, i.ZP)({ prop: "gridTemplateColumns" }), + (0, i.ZP)({ prop: "gridTemplateRows" }), + (0, i.ZP)({ prop: "gridTemplateAreas" }), + (0, i.ZP)({ prop: "gridArea" }) + ); + function E(e, t) { + return "grey" === t ? t : e; + } + o( + (0, i.ZP)({ prop: "color", themeKey: "palette", transform: E }), + (0, i.ZP)({ + prop: "bgcolor", + cssProperty: "backgroundColor", + themeKey: "palette", + transform: E, + }), + (0, i.ZP)({ + prop: "backgroundColor", + themeKey: "palette", + transform: E, + }) + ); + function _(e) { + return e <= 1 && 0 !== e ? "".concat(100 * e, "%") : e; + } + var C = (0, i.ZP)({ prop: "width", transform: _ }), + w = function (e) { + if (void 0 !== e.maxWidth && null !== e.maxWidth) { + return (0, s.k9)(e, e.maxWidth, function (t) { + var n, + r, + i = + (null == (n = e.theme) || + null == (n = n.breakpoints) || + null == (n = n.values) + ? void 0 + : n[t]) || s.VO[t]; + return i + ? "px" !== + (null == (r = e.theme) || null == (r = r.breakpoints) + ? void 0 + : r.unit) + ? { + maxWidth: "".concat(i).concat(e.theme.breakpoints.unit), + } + : { maxWidth: i } + : { maxWidth: _(t) }; + }); + } + return null; + }; + w.filterProps = ["maxWidth"]; + var T = (0, i.ZP)({ prop: "minWidth", transform: _ }), + M = (0, i.ZP)({ prop: "height", transform: _ }), + I = (0, i.ZP)({ prop: "maxHeight", transform: _ }), + k = (0, i.ZP)({ prop: "minHeight", transform: _ }), + R = + ((0, i.ZP)({ prop: "size", cssProperty: "width", transform: _ }), + (0, i.ZP)({ prop: "size", cssProperty: "height", transform: _ }), + o(C, w, T, M, I, k, (0, i.ZP)({ prop: "boxSizing" })), + { + border: { themeKey: "borders", transform: l }, + borderTop: { themeKey: "borders", transform: l }, + borderRight: { themeKey: "borders", transform: l }, + borderBottom: { themeKey: "borders", transform: l }, + borderLeft: { themeKey: "borders", transform: l }, + borderColor: { themeKey: "palette" }, + borderTopColor: { themeKey: "palette" }, + borderRightColor: { themeKey: "palette" }, + borderBottomColor: { themeKey: "palette" }, + borderLeftColor: { themeKey: "palette" }, + borderRadius: { themeKey: "shape.borderRadius", style: y }, + color: { themeKey: "palette", transform: E }, + bgcolor: { + themeKey: "palette", + cssProperty: "backgroundColor", + transform: E, + }, + backgroundColor: { themeKey: "palette", transform: E }, + p: { style: r.o3 }, + pt: { style: r.o3 }, + pr: { style: r.o3 }, + pb: { style: r.o3 }, + pl: { style: r.o3 }, + px: { style: r.o3 }, + py: { style: r.o3 }, + padding: { style: r.o3 }, + paddingTop: { style: r.o3 }, + paddingRight: { style: r.o3 }, + paddingBottom: { style: r.o3 }, + paddingLeft: { style: r.o3 }, + paddingX: { style: r.o3 }, + paddingY: { style: r.o3 }, + paddingInline: { style: r.o3 }, + paddingInlineStart: { style: r.o3 }, + paddingInlineEnd: { style: r.o3 }, + paddingBlock: { style: r.o3 }, + paddingBlockStart: { style: r.o3 }, + paddingBlockEnd: { style: r.o3 }, + m: { style: r.e6 }, + mt: { style: r.e6 }, + mr: { style: r.e6 }, + mb: { style: r.e6 }, + ml: { style: r.e6 }, + mx: { style: r.e6 }, + my: { style: r.e6 }, + margin: { style: r.e6 }, + marginTop: { style: r.e6 }, + marginRight: { style: r.e6 }, + marginBottom: { style: r.e6 }, + marginLeft: { style: r.e6 }, + marginX: { style: r.e6 }, + marginY: { style: r.e6 }, + marginInline: { style: r.e6 }, + marginInlineStart: { style: r.e6 }, + marginInlineEnd: { style: r.e6 }, + marginBlock: { style: r.e6 }, + marginBlockStart: { style: r.e6 }, + marginBlockEnd: { style: r.e6 }, + displayPrint: { + cssProperty: !1, + transform: function (e) { + return { "@media print": { display: e } }; + }, + }, + display: {}, + overflow: {}, + textOverflow: {}, + visibility: {}, + whiteSpace: {}, + flexBasis: {}, + flexDirection: {}, + flexWrap: {}, + justifyContent: {}, + alignItems: {}, + alignContent: {}, + order: {}, + flex: {}, + flexGrow: {}, + flexShrink: {}, + alignSelf: {}, + justifyItems: {}, + justifySelf: {}, + gap: { style: b }, + rowGap: { style: S }, + columnGap: { style: x }, + gridColumn: {}, + gridRow: {}, + gridAutoFlow: {}, + gridAutoColumns: {}, + gridAutoRows: {}, + gridTemplateColumns: {}, + gridTemplateRows: {}, + gridTemplateAreas: {}, + gridArea: {}, + position: {}, + zIndex: { themeKey: "zIndex" }, + top: {}, + right: {}, + bottom: {}, + left: {}, + boxShadow: { themeKey: "shadows" }, + width: { transform: _ }, + maxWidth: { style: w }, + minWidth: { transform: _ }, + height: { transform: _ }, + maxHeight: { transform: _ }, + minHeight: { transform: _ }, + boxSizing: {}, + fontFamily: { themeKey: "typography" }, + fontSize: { themeKey: "typography" }, + fontStyle: { themeKey: "typography" }, + fontWeight: { themeKey: "typography" }, + letterSpacing: {}, + textTransform: {}, + lineHeight: {}, + textAlign: {}, + typography: { cssProperty: !1, themeKey: "typography" }, + }); + }, + 104: function (e, t, n) { + "use strict"; + var r = n(4942), + i = n(1122), + a = n(8247), + o = n(8529), + s = n(1184), + l = n(7416); + var u = (function () { + function e(e, t, n, a) { + var l, + u = ((l = {}), (0, r.Z)(l, e, t), (0, r.Z)(l, "theme", n), l), + c = a[e]; + if (!c) return (0, r.Z)({}, e, t); + var f = c.cssProperty, + d = void 0 === f ? e : f, + h = c.themeKey, + p = c.transform, + v = c.style; + if (null == t) return null; + if ("typography" === h && "inherit" === t) + return (0, r.Z)({}, e, t); + var m = (0, o.DW)(n, h) || {}; + if (v) return v(u); + return (0, s.k9)(u, t, function (t) { + var n = (0, o.Jq)(m, p, t); + return ( + t === n && + "string" === typeof t && + (n = (0, o.Jq)( + m, + p, + "".concat(e).concat("default" === t ? "" : (0, i.Z)(t)), + t + )), + !1 === d ? n : (0, r.Z)({}, d, n) + ); + }); + } + return function t(n) { + var i, + o = n || {}, + u = o.sx, + c = o.theme, + f = void 0 === c ? {} : c; + if (!u) return null; + var d = null != (i = f.unstable_sxConfig) ? i : l.Z; + function h(n) { + var i = n; + if ("function" === typeof n) i = n(f); + else if ("object" !== typeof n) return n; + if (!i) return null; + var o = (0, s.W8)(f.breakpoints), + l = Object.keys(o), + u = o; + return ( + Object.keys(i).forEach(function (n) { + var o, + l, + c = + ((o = i[n]), (l = f), "function" === typeof o ? o(l) : o); + if (null !== c && void 0 !== c) + if ("object" === typeof c) + if (d[n]) u = (0, a.Z)(u, e(n, c, f, d)); + else { + var h = (0, s.k9)({ theme: f }, c, function (e) { + return (0, r.Z)({}, n, e); + }); + !(function () { + for ( + var e = arguments.length, t = new Array(e), n = 0; + n < e; + n++ + ) + t[n] = arguments[n]; + var r = t.reduce(function (e, t) { + return e.concat(Object.keys(t)); + }, []), + i = new Set(r); + return t.every(function (e) { + return i.size === Object.keys(e).length; + }); + })(h, c) + ? (u = (0, a.Z)(u, h)) + : (u[n] = t({ sx: c, theme: f })); + } + else u = (0, a.Z)(u, e(n, c, f, d)); + }), + (0, s.L7)(l, u) + ); + } + return Array.isArray(u) ? u.map(h) : h(u); + }; + })(); + (u.filterProps = ["sx"]), (t.Z = u); + }, + 418: function (e, t, n) { + "use strict"; + var r = n(5080), + i = n(9120), + a = (0, r.Z)(); + t.Z = function () { + var e = + arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : a; + return (0, i.Z)(e); + }; + }, + 9120: function (e, t, n) { + "use strict"; + var r = n(2791), + i = n(2564); + t.Z = function () { + var e, + t = + arguments.length > 0 && void 0 !== arguments[0] + ? arguments[0] + : null, + n = r.useContext(i.T); + return n && ((e = n), 0 !== Object.keys(e).length) ? n : t; + }; + }, + 5902: function (e, t) { + "use strict"; + var n = function (e) { + return e; + }, + r = (function () { + var e = n; + return { + configure: function (t) { + e = t; + }, + generate: function (t) { + return e(t); + }, + reset: function () { + e = n; + }, + }; + })(); + t.Z = r; + }, + 1122: function (e, t, n) { + "use strict"; + n.d(t, { + Z: function () { + return i; + }, + }); + var r = n(6189); + function i(e) { + if ("string" !== typeof e) throw new Error((0, r.Z)(7)); + return e.charAt(0).toUpperCase() + e.slice(1); + } + }, + 4419: function (e, t, n) { + "use strict"; + function r(e, t) { + var n = + arguments.length > 2 && void 0 !== arguments[2] + ? arguments[2] + : void 0, + r = {}; + return ( + Object.keys(e).forEach(function (i) { + r[i] = e[i] + .reduce(function (e, r) { + if (r) { + var i = t(r); + "" !== i && e.push(i), n && n[r] && e.push(n[r]); + } + return e; + }, []) + .join(" "); + }), + r + ); + } + n.d(t, { + Z: function () { + return r; + }, + }); + }, + 8949: function (e, t, n) { + "use strict"; + function r() { + for (var e = arguments.length, t = new Array(e), n = 0; n < e; n++) + t[n] = arguments[n]; + return t.reduce( + function (e, t) { + return null == t + ? e + : function () { + for ( + var n = arguments.length, r = new Array(n), i = 0; + i < n; + i++ + ) + r[i] = arguments[i]; + e.apply(this, r), t.apply(this, r); + }; + }, + function () {} + ); + } + n.d(t, { + Z: function () { + return r; + }, + }); + }, + 2254: function (e, t, n) { + "use strict"; + function r(e) { + var t, + n = + arguments.length > 1 && void 0 !== arguments[1] + ? arguments[1] + : 166; + function r() { + for ( + var r = this, i = arguments.length, a = new Array(i), o = 0; + o < i; + o++ + ) + a[o] = arguments[o]; + clearTimeout(t), + (t = setTimeout(function () { + e.apply(r, a); + }, n)); + } + return ( + (r.clear = function () { + clearTimeout(t); + }), + r + ); + } + n.d(t, { + Z: function () { + return r; + }, + }); + }, + 2466: function (e, t, n) { + "use strict"; + n.d(t, { + P: function () { + return i; + }, + Z: function () { + return o; + }, + }); + var r = n(7462); + function i(e) { + return ( + null !== e && "object" === typeof e && e.constructor === Object + ); + } + function a(e) { + if (!i(e)) return e; + var t = {}; + return ( + Object.keys(e).forEach(function (n) { + t[n] = a(e[n]); + }), + t + ); + } + function o(e, t) { + var n = + arguments.length > 2 && void 0 !== arguments[2] + ? arguments[2] + : { clone: !0 }, + s = n.clone ? (0, r.Z)({}, e) : e; + return ( + i(e) && + i(t) && + Object.keys(t).forEach(function (r) { + "__proto__" !== r && + (i(t[r]) && r in e && i(e[r]) + ? (s[r] = o(e[r], t[r], n)) + : n.clone + ? (s[r] = i(t[r]) ? a(t[r]) : t[r]) + : (s[r] = t[r])); + }), + s + ); + } + }, + 6189: function (e, t, n) { + "use strict"; + function r(e) { + for ( + var t = "https://mui.com/production-error/?code=" + e, n = 1; + n < arguments.length; + n += 1 + ) + t += "&args[]=" + encodeURIComponent(arguments[n]); + return ( + "Minified MUI error #" + + e + + "; visit " + + t + + " for the full message." + ); + } + n.d(t, { + Z: function () { + return r; + }, + }); + }, + 1217: function (e, t, n) { + "use strict"; + n.d(t, { + Z: function () { + return a; + }, + }); + var r = n(5902), + i = { + active: "active", + checked: "checked", + completed: "completed", + disabled: "disabled", + error: "error", + expanded: "expanded", + focused: "focused", + focusVisible: "focusVisible", + open: "open", + readOnly: "readOnly", + required: "required", + selected: "selected", + }; + function a(e, t) { + var n = + arguments.length > 2 && void 0 !== arguments[2] + ? arguments[2] + : "Mui", + a = i[t]; + return a + ? "".concat(n, "-").concat(a) + : "".concat(r.Z.generate(e), "-").concat(t); + } + }, + 5878: function (e, t, n) { + "use strict"; + n.d(t, { + Z: function () { + return i; + }, + }); + var r = n(1217); + function i(e, t) { + var n = + arguments.length > 2 && void 0 !== arguments[2] + ? arguments[2] + : "Mui", + i = {}; + return ( + t.forEach(function (t) { + i[t] = (0, r.Z)(e, t, n); + }), + i + ); + } + }, + 4913: function (e, t, n) { + "use strict"; + function r(e) { + return (e && e.ownerDocument) || document; + } + n.d(t, { + Z: function () { + return r; + }, + }); + }, + 5202: function (e, t, n) { + "use strict"; + n.d(t, { + Z: function () { + return i; + }, + }); + var r = n(4913); + function i(e) { + return (0, r.Z)(e).defaultView || window; + } + }, + 5735: function (e, t, n) { + "use strict"; + n.d(t, { + Z: function () { + return i; + }, + }); + var r = n(7462); + function i(e, t) { + var n = (0, r.Z)({}, t); + return ( + Object.keys(e).forEach(function (a) { + if (a.toString().match(/^(components|slots)$/)) + n[a] = (0, r.Z)({}, e[a], n[a]); + else if (a.toString().match(/^(componentsProps|slotProps)$/)) { + var o = e[a] || {}, + s = t[a]; + (n[a] = {}), + s && Object.keys(s) + ? o && Object.keys(o) + ? ((n[a] = (0, r.Z)({}, s)), + Object.keys(o).forEach(function (e) { + n[a][e] = i(o[e], s[e]); + })) + : (n[a] = s) + : (n[a] = o); + } else void 0 === n[a] && (n[a] = e[a]); + }), + n + ); + } + }, + 2971: function (e, t, n) { + "use strict"; + function r(e, t) { + "function" === typeof e ? e(t) : e && (e.current = t); + } + n.d(t, { + Z: function () { + return r; + }, + }); + }, + 2876: function (e, t, n) { + "use strict"; + var r = n(2791), + i = "undefined" !== typeof window ? r.useLayoutEffect : r.useEffect; + t.Z = i; + }, + 7054: function (e, t, n) { + "use strict"; + var r = n(2791), + i = n(2876); + t.Z = function (e) { + var t = r.useRef(e); + return ( + (0, i.Z)(function () { + t.current = e; + }), + r.useCallback(function () { + return t.current.apply(void 0, arguments); + }, []) + ); + }; + }, + 6117: function (e, t, n) { + "use strict"; + n.d(t, { + Z: function () { + return a; + }, + }); + var r = n(2791), + i = n(2971); + function a() { + for (var e = arguments.length, t = new Array(e), n = 0; n < e; n++) + t[n] = arguments[n]; + return r.useMemo(function () { + return t.every(function (e) { + return null == e; + }) + ? null + : function (e) { + t.forEach(function (t) { + (0, i.Z)(t, e); + }); + }; + }, t); + } + }, + 8252: function (e, t, n) { + "use strict"; + var r; + n.d(t, { + Z: function () { + return l; + }, + }); + var i = n(9439), + a = n(2791), + o = 0; + var s = (r || (r = n.t(a, 2)))["useId".toString()]; + function l(e) { + if (void 0 !== s) { + var t = s(); + return null != e ? e : t; + } + return (function (e) { + var t = a.useState(e), + n = (0, i.Z)(t, 2), + r = n[0], + s = n[1], + l = e || r; + return ( + a.useEffect( + function () { + null == r && s("mui-".concat((o += 1))); + }, + [r] + ), + l + ); + })(e); + } + }, + 1694: function (e, t) { + var n; + !(function () { + "use strict"; + var r = {}.hasOwnProperty; + function i() { + for (var e = [], t = 0; t < arguments.length; t++) { + var n = arguments[t]; + if (n) { + var a = typeof n; + if ("string" === a || "number" === a) e.push(n); + else if (Array.isArray(n)) { + if (n.length) { + var o = i.apply(null, n); + o && e.push(o); + } + } else if ("object" === a) { + if ( + n.toString !== Object.prototype.toString && + !n.toString.toString().includes("[native code]") + ) { + e.push(n.toString()); + continue; + } + for (var s in n) r.call(n, s) && n[s] && e.push(s); + } + } + } + return e.join(" "); + } + e.exports + ? ((i.default = i), (e.exports = i)) + : void 0 === + (n = function () { + return i; + }.apply(t, [])) || (e.exports = n); + })(); + }, + 7494: function (e) { + function t(e, t, n) { + var r, i, a, o, s; + function l() { + var u = Date.now() - o; + u < t && u >= 0 + ? (r = setTimeout(l, t - u)) + : ((r = null), n || ((s = e.apply(a, i)), (a = i = null))); + } + null == t && (t = 100); + var u = function () { + (a = this), (i = arguments), (o = Date.now()); + var u = n && !r; + return ( + r || (r = setTimeout(l, t)), + u && ((s = e.apply(a, i)), (a = i = null)), + s + ); + }; + return ( + (u.clear = function () { + r && (clearTimeout(r), (r = null)); + }), + (u.flush = function () { + r && + ((s = e.apply(a, i)), + (a = i = null), + clearTimeout(r), + (r = null)); + }), + u + ); + } + (t.debounce = t), (e.exports = t); + }, + 2244: function (e, t, n) { + var r = n(7447), + i = n(8051).each; + function a(e, t) { + (this.query = e), + (this.isUnconditional = t), + (this.handlers = []), + (this.mql = window.matchMedia(e)); + var n = this; + (this.listener = function (e) { + (n.mql = e.currentTarget || e), n.assess(); + }), + this.mql.addListener(this.listener); + } + (a.prototype = { + constuctor: a, + addHandler: function (e) { + var t = new r(e); + this.handlers.push(t), this.matches() && t.on(); + }, + removeHandler: function (e) { + var t = this.handlers; + i(t, function (n, r) { + if (n.equals(e)) return n.destroy(), !t.splice(r, 1); + }); + }, + matches: function () { + return this.mql.matches || this.isUnconditional; + }, + clear: function () { + i(this.handlers, function (e) { + e.destroy(); + }), + this.mql.removeListener(this.listener), + (this.handlers.length = 0); + }, + assess: function () { + var e = this.matches() ? "on" : "off"; + i(this.handlers, function (t) { + t[e](); + }); + }, + }), + (e.exports = a); + }, + 4e3: function (e, t, n) { + var r = n(2244), + i = n(8051), + a = i.each, + o = i.isFunction, + s = i.isArray; + function l() { + if (!window.matchMedia) + throw new Error( + "matchMedia not present, legacy browsers require a polyfill" + ); + (this.queries = {}), + (this.browserIsIncapable = !window.matchMedia("only all").matches); + } + (l.prototype = { + constructor: l, + register: function (e, t, n) { + var i = this.queries, + l = n && this.browserIsIncapable; + return ( + i[e] || (i[e] = new r(e, l)), + o(t) && (t = { match: t }), + s(t) || (t = [t]), + a(t, function (t) { + o(t) && (t = { match: t }), i[e].addHandler(t); + }), + this + ); + }, + unregister: function (e, t) { + var n = this.queries[e]; + return ( + n && + (t ? n.removeHandler(t) : (n.clear(), delete this.queries[e])), + this + ); + }, + }), + (e.exports = l); + }, + 7447: function (e) { + function t(e) { + (this.options = e), !e.deferSetup && this.setup(); + } + (t.prototype = { + constructor: t, + setup: function () { + this.options.setup && this.options.setup(), (this.initialised = !0); + }, + on: function () { + !this.initialised && this.setup(), + this.options.match && this.options.match(); + }, + off: function () { + this.options.unmatch && this.options.unmatch(); + }, + destroy: function () { + this.options.destroy ? this.options.destroy() : this.off(); + }, + equals: function (e) { + return this.options === e || this.options.match === e; + }, + }), + (e.exports = t); + }, + 8051: function (e) { + e.exports = { + isFunction: function (e) { + return "function" === typeof e; + }, + isArray: function (e) { + return "[object Array]" === Object.prototype.toString.apply(e); + }, + each: function (e, t) { + for (var n = 0, r = e.length; n < r && !1 !== t(e[n], n); n++); + }, + }; + }, + 8153: function (e, t, n) { + var r = n(4e3); + e.exports = new r(); + }, + 2110: function (e, t, n) { + "use strict"; + var r = n(8309), + i = { + childContextTypes: !0, + contextType: !0, + contextTypes: !0, + defaultProps: !0, + displayName: !0, + getDefaultProps: !0, + getDerivedStateFromError: !0, + getDerivedStateFromProps: !0, + mixins: !0, + propTypes: !0, + type: !0, + }, + a = { + name: !0, + length: !0, + prototype: !0, + caller: !0, + callee: !0, + arguments: !0, + arity: !0, + }, + o = { + $$typeof: !0, + compare: !0, + defaultProps: !0, + displayName: !0, + propTypes: !0, + type: !0, + }, + s = {}; + function l(e) { + return r.isMemo(e) ? o : s[e.$$typeof] || i; + } + (s[r.ForwardRef] = { + $$typeof: !0, + render: !0, + defaultProps: !0, + displayName: !0, + propTypes: !0, + }), + (s[r.Memo] = o); + var u = Object.defineProperty, + c = Object.getOwnPropertyNames, + f = Object.getOwnPropertySymbols, + d = Object.getOwnPropertyDescriptor, + h = Object.getPrototypeOf, + p = Object.prototype; + e.exports = function e(t, n, r) { + if ("string" !== typeof n) { + if (p) { + var i = h(n); + i && i !== p && e(t, i, r); + } + var o = c(n); + f && (o = o.concat(f(n))); + for (var s = l(t), v = l(n), m = 0; m < o.length; ++m) { + var g = o[m]; + if (!a[g] && (!r || !r[g]) && (!v || !v[g]) && (!s || !s[g])) { + var A = d(n, g); + try { + u(t, g, A); + } catch (y) {} + } + } + } + return t; + }; + }, + 746: function (e, t) { + "use strict"; + var n = "function" === typeof Symbol && Symbol.for, + r = n ? Symbol.for("react.element") : 60103, + i = n ? Symbol.for("react.portal") : 60106, + a = n ? Symbol.for("react.fragment") : 60107, + o = n ? Symbol.for("react.strict_mode") : 60108, + s = n ? Symbol.for("react.profiler") : 60114, + l = n ? Symbol.for("react.provider") : 60109, + u = n ? Symbol.for("react.context") : 60110, + c = n ? Symbol.for("react.async_mode") : 60111, + f = n ? Symbol.for("react.concurrent_mode") : 60111, + d = n ? Symbol.for("react.forward_ref") : 60112, + h = n ? Symbol.for("react.suspense") : 60113, + p = n ? Symbol.for("react.suspense_list") : 60120, + v = n ? Symbol.for("react.memo") : 60115, + m = n ? Symbol.for("react.lazy") : 60116, + g = n ? Symbol.for("react.block") : 60121, + A = n ? Symbol.for("react.fundamental") : 60117, + y = n ? Symbol.for("react.responder") : 60118, + b = n ? Symbol.for("react.scope") : 60119; + function x(e) { + if ("object" === typeof e && null !== e) { + var t = e.$$typeof; + switch (t) { + case r: + switch ((e = e.type)) { + case c: + case f: + case a: + case s: + case o: + case h: + return e; + default: + switch ((e = e && e.$$typeof)) { + case u: + case d: + case m: + case v: + case l: + return e; + default: + return t; + } + } + case i: + return t; + } + } + } + function S(e) { + return x(e) === f; + } + (t.AsyncMode = c), + (t.ConcurrentMode = f), + (t.ContextConsumer = u), + (t.ContextProvider = l), + (t.Element = r), + (t.ForwardRef = d), + (t.Fragment = a), + (t.Lazy = m), + (t.Memo = v), + (t.Portal = i), + (t.Profiler = s), + (t.StrictMode = o), + (t.Suspense = h), + (t.isAsyncMode = function (e) { + return S(e) || x(e) === c; + }), + (t.isConcurrentMode = S), + (t.isContextConsumer = function (e) { + return x(e) === u; + }), + (t.isContextProvider = function (e) { + return x(e) === l; + }), + (t.isElement = function (e) { + return "object" === typeof e && null !== e && e.$$typeof === r; + }), + (t.isForwardRef = function (e) { + return x(e) === d; + }), + (t.isFragment = function (e) { + return x(e) === a; + }), + (t.isLazy = function (e) { + return x(e) === m; + }), + (t.isMemo = function (e) { + return x(e) === v; + }), + (t.isPortal = function (e) { + return x(e) === i; + }), + (t.isProfiler = function (e) { + return x(e) === s; + }), + (t.isStrictMode = function (e) { + return x(e) === o; + }), + (t.isSuspense = function (e) { + return x(e) === h; + }), + (t.isValidElementType = function (e) { + return ( + "string" === typeof e || + "function" === typeof e || + e === a || + e === f || + e === s || + e === o || + e === h || + e === p || + ("object" === typeof e && + null !== e && + (e.$$typeof === m || + e.$$typeof === v || + e.$$typeof === l || + e.$$typeof === u || + e.$$typeof === d || + e.$$typeof === A || + e.$$typeof === y || + e.$$typeof === b || + e.$$typeof === g)) + ); + }), + (t.typeOf = x); + }, + 8309: function (e, t, n) { + "use strict"; + e.exports = n(746); + }, + 5477: function (e, t, n) { + var r = n(2806), + i = function (e) { + var t = "", + n = Object.keys(e); + return ( + n.forEach(function (i, a) { + var o = e[i]; + (function (e) { + return /[height|width]$/.test(e); + })((i = r(i))) && + "number" === typeof o && + (o += "px"), + (t += + !0 === o + ? i + : !1 === o + ? "not " + i + : "(" + i + ": " + o + ")"), + a < n.length - 1 && (t += " and "); + }), + t + ); + }; + e.exports = function (e) { + var t = ""; + return "string" === typeof e + ? e + : e instanceof Array + ? (e.forEach(function (n, r) { + (t += i(n)), r < e.length - 1 && (t += ", "); + }), + t) + : i(e); + }; + }, + 5095: function (e, t, n) { + var r = NaN, + i = "[object Symbol]", + a = /^\s+|\s+$/g, + o = /^[-+]0x[0-9a-f]+$/i, + s = /^0b[01]+$/i, + l = /^0o[0-7]+$/i, + u = parseInt, + c = "object" == typeof n.g && n.g && n.g.Object === Object && n.g, + f = "object" == typeof self && self && self.Object === Object && self, + d = c || f || Function("return this")(), + h = Object.prototype.toString, + p = Math.max, + v = Math.min, + m = function () { + return d.Date.now(); + }; + function g(e) { + var t = typeof e; + return !!e && ("object" == t || "function" == t); + } + function A(e) { + if ("number" == typeof e) return e; + if ( + (function (e) { + return ( + "symbol" == typeof e || + ((function (e) { + return !!e && "object" == typeof e; + })(e) && + h.call(e) == i) + ); + })(e) + ) + return r; + if (g(e)) { + var t = "function" == typeof e.valueOf ? e.valueOf() : e; + e = g(t) ? t + "" : t; + } + if ("string" != typeof e) return 0 === e ? e : +e; + e = e.replace(a, ""); + var n = s.test(e); + return n || l.test(e) ? u(e.slice(2), n ? 2 : 8) : o.test(e) ? r : +e; + } + e.exports = function (e, t, n) { + var r, + i, + a, + o, + s, + l, + u = 0, + c = !1, + f = !1, + d = !0; + if ("function" != typeof e) + throw new TypeError("Expected a function"); + function h(t) { + var n = r, + a = i; + return (r = i = void 0), (u = t), (o = e.apply(a, n)); + } + function y(e) { + var n = e - l; + return void 0 === l || n >= t || n < 0 || (f && e - u >= a); + } + function b() { + var e = m(); + if (y(e)) return x(e); + s = setTimeout( + b, + (function (e) { + var n = t - (e - l); + return f ? v(n, a - (e - u)) : n; + })(e) + ); + } + function x(e) { + return (s = void 0), d && r ? h(e) : ((r = i = void 0), o); + } + function S() { + var e = m(), + n = y(e); + if (((r = arguments), (i = this), (l = e), n)) { + if (void 0 === s) + return (function (e) { + return (u = e), (s = setTimeout(b, t)), c ? h(e) : o; + })(l); + if (f) return (s = setTimeout(b, t)), h(l); + } + return void 0 === s && (s = setTimeout(b, t)), o; + } + return ( + (t = A(t) || 0), + g(n) && + ((c = !!n.leading), + (a = (f = "maxWait" in n) ? p(A(n.maxWait) || 0, t) : a), + (d = "trailing" in n ? !!n.trailing : d)), + (S.cancel = function () { + void 0 !== s && clearTimeout(s), + (u = 0), + (r = l = i = s = void 0); + }), + (S.flush = function () { + return void 0 === s ? o : x(m()); + }), + S + ); + }; + }, + 7235: function (e, t) { + !(function (e) { + "use strict"; + function t() {} + function n(e, n) { + (this.dv = new DataView(e)), + (this.offset = 0), + (this.littleEndian = void 0 === n || n), + (this.encoder = new t()); + } + function r() {} + function i() {} + (t.prototype.s2u = function (e) { + for (var t = this.s2uTable, n = "", r = 0; r < e.length; ) { + var i = e[r++]; + if ( + (!((i >= 0 && i <= 126) || (i >= 161 && i <= 223)) && + r < e.length && + (i = (i << 8) | e[r++]), + void 0 === t[i]) + ) + return console.error("unknown char code " + i + "."), n; + n += String.fromCharCode(t[i]); + } + return n; + }), + (t.prototype.s2uTable = { + 0: 0, + 1: 1, + 2: 2, + 3: 3, + 4: 4, + 5: 5, + 6: 6, + 7: 7, + 8: 8, + 9: 9, + 10: 10, + 11: 11, + 12: 12, + 13: 13, + 14: 14, + 15: 15, + 16: 16, + 17: 17, + 18: 18, + 19: 19, + 20: 20, + 21: 21, + 22: 22, + 23: 23, + 24: 24, + 25: 25, + 26: 26, + 27: 27, + 28: 28, + 29: 29, + 30: 30, + 31: 31, + 32: 32, + 33: 33, + 34: 34, + 35: 35, + 36: 36, + 37: 37, + 38: 38, + 39: 39, + 40: 40, + 41: 41, + 42: 42, + 43: 43, + 44: 44, + 45: 45, + 46: 46, + 47: 47, + 48: 48, + 49: 49, + 50: 50, + 51: 51, + 52: 52, + 53: 53, + 54: 54, + 55: 55, + 56: 56, + 57: 57, + 58: 58, + 59: 59, + 60: 60, + 61: 61, + 62: 62, + 63: 63, + 64: 64, + 65: 65, + 66: 66, + 67: 67, + 68: 68, + 69: 69, + 70: 70, + 71: 71, + 72: 72, + 73: 73, + 74: 74, + 75: 75, + 76: 76, + 77: 77, + 78: 78, + 79: 79, + 80: 80, + 81: 81, + 82: 82, + 83: 83, + 84: 84, + 85: 85, + 86: 86, + 87: 87, + 88: 88, + 89: 89, + 90: 90, + 91: 91, + 92: 92, + 93: 93, + 94: 94, + 95: 95, + 96: 96, + 97: 97, + 98: 98, + 99: 99, + 100: 100, + 101: 101, + 102: 102, + 103: 103, + 104: 104, + 105: 105, + 106: 106, + 107: 107, + 108: 108, + 109: 109, + 110: 110, + 111: 111, + 112: 112, + 113: 113, + 114: 114, + 115: 115, + 116: 116, + 117: 117, + 118: 118, + 119: 119, + 120: 120, + 121: 121, + 122: 122, + 123: 123, + 124: 124, + 125: 125, + 126: 126, + 161: 65377, + 162: 65378, + 163: 65379, + 164: 65380, + 165: 65381, + 166: 65382, + 167: 65383, + 168: 65384, + 169: 65385, + 170: 65386, + 171: 65387, + 172: 65388, + 173: 65389, + 174: 65390, + 175: 65391, + 176: 65392, + 177: 65393, + 178: 65394, + 179: 65395, + 180: 65396, + 181: 65397, + 182: 65398, + 183: 65399, + 184: 65400, + 185: 65401, + 186: 65402, + 187: 65403, + 188: 65404, + 189: 65405, + 190: 65406, + 191: 65407, + 192: 65408, + 193: 65409, + 194: 65410, + 195: 65411, + 196: 65412, + 197: 65413, + 198: 65414, + 199: 65415, + 200: 65416, + 201: 65417, + 202: 65418, + 203: 65419, + 204: 65420, + 205: 65421, + 206: 65422, + 207: 65423, + 208: 65424, + 209: 65425, + 210: 65426, + 211: 65427, + 212: 65428, + 213: 65429, + 214: 65430, + 215: 65431, + 216: 65432, + 217: 65433, + 218: 65434, + 219: 65435, + 220: 65436, + 221: 65437, + 222: 65438, + 223: 65439, + 33088: 12288, + 33089: 12289, + 33090: 12290, + 33091: 65292, + 33092: 65294, + 33093: 12539, + 33094: 65306, + 33095: 65307, + 33096: 65311, + 33097: 65281, + 33098: 12443, + 33099: 12444, + 33100: 180, + 33101: 65344, + 33102: 168, + 33103: 65342, + 33104: 65507, + 33105: 65343, + 33106: 12541, + 33107: 12542, + 33108: 12445, + 33109: 12446, + 33110: 12291, + 33111: 20189, + 33112: 12293, + 33113: 12294, + 33114: 12295, + 33115: 12540, + 33116: 8213, + 33117: 8208, + 33118: 65295, + 33119: 65340, + 33120: 65374, + 33121: 8741, + 33122: 65372, + 33123: 8230, + 33124: 8229, + 33125: 8216, + 33126: 8217, + 33127: 8220, + 33128: 8221, + 33129: 65288, + 33130: 65289, + 33131: 12308, + 33132: 12309, + 33133: 65339, + 33134: 65341, + 33135: 65371, + 33136: 65373, + 33137: 12296, + 33138: 12297, + 33139: 12298, + 33140: 12299, + 33141: 12300, + 33142: 12301, + 33143: 12302, + 33144: 12303, + 33145: 12304, + 33146: 12305, + 33147: 65291, + 33148: 65293, + 33149: 177, + 33150: 215, + 33152: 247, + 33153: 65309, + 33154: 8800, + 33155: 65308, + 33156: 65310, + 33157: 8806, + 33158: 8807, + 33159: 8734, + 33160: 8756, + 33161: 9794, + 33162: 9792, + 33163: 176, + 33164: 8242, + 33165: 8243, + 33166: 8451, + 33167: 65509, + 33168: 65284, + 33169: 65504, + 33170: 65505, + 33171: 65285, + 33172: 65283, + 33173: 65286, + 33174: 65290, + 33175: 65312, + 33176: 167, + 33177: 9734, + 33178: 9733, + 33179: 9675, + 33180: 9679, + 33181: 9678, + 33182: 9671, + 33183: 9670, + 33184: 9633, + 33185: 9632, + 33186: 9651, + 33187: 9650, + 33188: 9661, + 33189: 9660, + 33190: 8251, + 33191: 12306, + 33192: 8594, + 33193: 8592, + 33194: 8593, + 33195: 8595, + 33196: 12307, + 33208: 8712, + 33209: 8715, + 33210: 8838, + 33211: 8839, + 33212: 8834, + 33213: 8835, + 33214: 8746, + 33215: 8745, + 33224: 8743, + 33225: 8744, + 33226: 65506, + 33227: 8658, + 33228: 8660, + 33229: 8704, + 33230: 8707, + 33242: 8736, + 33243: 8869, + 33244: 8978, + 33245: 8706, + 33246: 8711, + 33247: 8801, + 33248: 8786, + 33249: 8810, + 33250: 8811, + 33251: 8730, + 33252: 8765, + 33253: 8733, + 33254: 8757, + 33255: 8747, + 33256: 8748, + 33264: 8491, + 33265: 8240, + 33266: 9839, + 33267: 9837, + 33268: 9834, + 33269: 8224, + 33270: 8225, + 33271: 182, + 33276: 9711, + 33359: 65296, + 33360: 65297, + 33361: 65298, + 33362: 65299, + 33363: 65300, + 33364: 65301, + 33365: 65302, + 33366: 65303, + 33367: 65304, + 33368: 65305, + 33376: 65313, + 33377: 65314, + 33378: 65315, + 33379: 65316, + 33380: 65317, + 33381: 65318, + 33382: 65319, + 33383: 65320, + 33384: 65321, + 33385: 65322, + 33386: 65323, + 33387: 65324, + 33388: 65325, + 33389: 65326, + 33390: 65327, + 33391: 65328, + 33392: 65329, + 33393: 65330, + 33394: 65331, + 33395: 65332, + 33396: 65333, + 33397: 65334, + 33398: 65335, + 33399: 65336, + 33400: 65337, + 33401: 65338, + 33409: 65345, + 33410: 65346, + 33411: 65347, + 33412: 65348, + 33413: 65349, + 33414: 65350, + 33415: 65351, + 33416: 65352, + 33417: 65353, + 33418: 65354, + 33419: 65355, + 33420: 65356, + 33421: 65357, + 33422: 65358, + 33423: 65359, + 33424: 65360, + 33425: 65361, + 33426: 65362, + 33427: 65363, + 33428: 65364, + 33429: 65365, + 33430: 65366, + 33431: 65367, + 33432: 65368, + 33433: 65369, + 33434: 65370, + 33439: 12353, + 33440: 12354, + 33441: 12355, + 33442: 12356, + 33443: 12357, + 33444: 12358, + 33445: 12359, + 33446: 12360, + 33447: 12361, + 33448: 12362, + 33449: 12363, + 33450: 12364, + 33451: 12365, + 33452: 12366, + 33453: 12367, + 33454: 12368, + 33455: 12369, + 33456: 12370, + 33457: 12371, + 33458: 12372, + 33459: 12373, + 33460: 12374, + 33461: 12375, + 33462: 12376, + 33463: 12377, + 33464: 12378, + 33465: 12379, + 33466: 12380, + 33467: 12381, + 33468: 12382, + 33469: 12383, + 33470: 12384, + 33471: 12385, + 33472: 12386, + 33473: 12387, + 33474: 12388, + 33475: 12389, + 33476: 12390, + 33477: 12391, + 33478: 12392, + 33479: 12393, + 33480: 12394, + 33481: 12395, + 33482: 12396, + 33483: 12397, + 33484: 12398, + 33485: 12399, + 33486: 12400, + 33487: 12401, + 33488: 12402, + 33489: 12403, + 33490: 12404, + 33491: 12405, + 33492: 12406, + 33493: 12407, + 33494: 12408, + 33495: 12409, + 33496: 12410, + 33497: 12411, + 33498: 12412, + 33499: 12413, + 33500: 12414, + 33501: 12415, + 33502: 12416, + 33503: 12417, + 33504: 12418, + 33505: 12419, + 33506: 12420, + 33507: 12421, + 33508: 12422, + 33509: 12423, + 33510: 12424, + 33511: 12425, + 33512: 12426, + 33513: 12427, + 33514: 12428, + 33515: 12429, + 33516: 12430, + 33517: 12431, + 33518: 12432, + 33519: 12433, + 33520: 12434, + 33521: 12435, + 33600: 12449, + 33601: 12450, + 33602: 12451, + 33603: 12452, + 33604: 12453, + 33605: 12454, + 33606: 12455, + 33607: 12456, + 33608: 12457, + 33609: 12458, + 33610: 12459, + 33611: 12460, + 33612: 12461, + 33613: 12462, + 33614: 12463, + 33615: 12464, + 33616: 12465, + 33617: 12466, + 33618: 12467, + 33619: 12468, + 33620: 12469, + 33621: 12470, + 33622: 12471, + 33623: 12472, + 33624: 12473, + 33625: 12474, + 33626: 12475, + 33627: 12476, + 33628: 12477, + 33629: 12478, + 33630: 12479, + 33631: 12480, + 33632: 12481, + 33633: 12482, + 33634: 12483, + 33635: 12484, + 33636: 12485, + 33637: 12486, + 33638: 12487, + 33639: 12488, + 33640: 12489, + 33641: 12490, + 33642: 12491, + 33643: 12492, + 33644: 12493, + 33645: 12494, + 33646: 12495, + 33647: 12496, + 33648: 12497, + 33649: 12498, + 33650: 12499, + 33651: 12500, + 33652: 12501, + 33653: 12502, + 33654: 12503, + 33655: 12504, + 33656: 12505, + 33657: 12506, + 33658: 12507, + 33659: 12508, + 33660: 12509, + 33661: 12510, + 33662: 12511, + 33664: 12512, + 33665: 12513, + 33666: 12514, + 33667: 12515, + 33668: 12516, + 33669: 12517, + 33670: 12518, + 33671: 12519, + 33672: 12520, + 33673: 12521, + 33674: 12522, + 33675: 12523, + 33676: 12524, + 33677: 12525, + 33678: 12526, + 33679: 12527, + 33680: 12528, + 33681: 12529, + 33682: 12530, + 33683: 12531, + 33684: 12532, + 33685: 12533, + 33686: 12534, + 33695: 913, + 33696: 914, + 33697: 915, + 33698: 916, + 33699: 917, + 33700: 918, + 33701: 919, + 33702: 920, + 33703: 921, + 33704: 922, + 33705: 923, + 33706: 924, + 33707: 925, + 33708: 926, + 33709: 927, + 33710: 928, + 33711: 929, + 33712: 931, + 33713: 932, + 33714: 933, + 33715: 934, + 33716: 935, + 33717: 936, + 33718: 937, + 33727: 945, + 33728: 946, + 33729: 947, + 33730: 948, + 33731: 949, + 33732: 950, + 33733: 951, + 33734: 952, + 33735: 953, + 33736: 954, + 33737: 955, + 33738: 956, + 33739: 957, + 33740: 958, + 33741: 959, + 33742: 960, + 33743: 961, + 33744: 963, + 33745: 964, + 33746: 965, + 33747: 966, + 33748: 967, + 33749: 968, + 33750: 969, + 33856: 1040, + 33857: 1041, + 33858: 1042, + 33859: 1043, + 33860: 1044, + 33861: 1045, + 33862: 1025, + 33863: 1046, + 33864: 1047, + 33865: 1048, + 33866: 1049, + 33867: 1050, + 33868: 1051, + 33869: 1052, + 33870: 1053, + 33871: 1054, + 33872: 1055, + 33873: 1056, + 33874: 1057, + 33875: 1058, + 33876: 1059, + 33877: 1060, + 33878: 1061, + 33879: 1062, + 33880: 1063, + 33881: 1064, + 33882: 1065, + 33883: 1066, + 33884: 1067, + 33885: 1068, + 33886: 1069, + 33887: 1070, + 33888: 1071, + 33904: 1072, + 33905: 1073, + 33906: 1074, + 33907: 1075, + 33908: 1076, + 33909: 1077, + 33910: 1105, + 33911: 1078, + 33912: 1079, + 33913: 1080, + 33914: 1081, + 33915: 1082, + 33916: 1083, + 33917: 1084, + 33918: 1085, + 33920: 1086, + 33921: 1087, + 33922: 1088, + 33923: 1089, + 33924: 1090, + 33925: 1091, + 33926: 1092, + 33927: 1093, + 33928: 1094, + 33929: 1095, + 33930: 1096, + 33931: 1097, + 33932: 1098, + 33933: 1099, + 33934: 1100, + 33935: 1101, + 33936: 1102, + 33937: 1103, + 33951: 9472, + 33952: 9474, + 33953: 9484, + 33954: 9488, + 33955: 9496, + 33956: 9492, + 33957: 9500, + 33958: 9516, + 33959: 9508, + 33960: 9524, + 33961: 9532, + 33962: 9473, + 33963: 9475, + 33964: 9487, + 33965: 9491, + 33966: 9499, + 33967: 9495, + 33968: 9507, + 33969: 9523, + 33970: 9515, + 33971: 9531, + 33972: 9547, + 33973: 9504, + 33974: 9519, + 33975: 9512, + 33976: 9527, + 33977: 9535, + 33978: 9501, + 33979: 9520, + 33980: 9509, + 33981: 9528, + 33982: 9538, + 34624: 9312, + 34625: 9313, + 34626: 9314, + 34627: 9315, + 34628: 9316, + 34629: 9317, + 34630: 9318, + 34631: 9319, + 34632: 9320, + 34633: 9321, + 34634: 9322, + 34635: 9323, + 34636: 9324, + 34637: 9325, + 34638: 9326, + 34639: 9327, + 34640: 9328, + 34641: 9329, + 34642: 9330, + 34643: 9331, + 34644: 8544, + 34645: 8545, + 34646: 8546, + 34647: 8547, + 34648: 8548, + 34649: 8549, + 34650: 8550, + 34651: 8551, + 34652: 8552, + 34653: 8553, + 34655: 13129, + 34656: 13076, + 34657: 13090, + 34658: 13133, + 34659: 13080, + 34660: 13095, + 34661: 13059, + 34662: 13110, + 34663: 13137, + 34664: 13143, + 34665: 13069, + 34666: 13094, + 34667: 13091, + 34668: 13099, + 34669: 13130, + 34670: 13115, + 34671: 13212, + 34672: 13213, + 34673: 13214, + 34674: 13198, + 34675: 13199, + 34676: 13252, + 34677: 13217, + 34686: 13179, + 34688: 12317, + 34689: 12319, + 34690: 8470, + 34691: 13261, + 34692: 8481, + 34693: 12964, + 34694: 12965, + 34695: 12966, + 34696: 12967, + 34697: 12968, + 34698: 12849, + 34699: 12850, + 34700: 12857, + 34701: 13182, + 34702: 13181, + 34703: 13180, + 34704: 8786, + 34705: 8801, + 34706: 8747, + 34707: 8750, + 34708: 8721, + 34709: 8730, + 34710: 8869, + 34711: 8736, + 34712: 8735, + 34713: 8895, + 34714: 8757, + 34715: 8745, + 34716: 8746, + 34975: 20124, + 34976: 21782, + 34977: 23043, + 34978: 38463, + 34979: 21696, + 34980: 24859, + 34981: 25384, + 34982: 23030, + 34983: 36898, + 34984: 33909, + 34985: 33564, + 34986: 31312, + 34987: 24746, + 34988: 25569, + 34989: 28197, + 34990: 26093, + 34991: 33894, + 34992: 33446, + 34993: 39925, + 34994: 26771, + 34995: 22311, + 34996: 26017, + 34997: 25201, + 34998: 23451, + 34999: 22992, + 35e3: 34427, + 35001: 39156, + 35002: 32098, + 35003: 32190, + 35004: 39822, + 35005: 25110, + 35006: 31903, + 35007: 34999, + 35008: 23433, + 35009: 24245, + 35010: 25353, + 35011: 26263, + 35012: 26696, + 35013: 38343, + 35014: 38797, + 35015: 26447, + 35016: 20197, + 35017: 20234, + 35018: 20301, + 35019: 20381, + 35020: 20553, + 35021: 22258, + 35022: 22839, + 35023: 22996, + 35024: 23041, + 35025: 23561, + 35026: 24799, + 35027: 24847, + 35028: 24944, + 35029: 26131, + 35030: 26885, + 35031: 28858, + 35032: 30031, + 35033: 30064, + 35034: 31227, + 35035: 32173, + 35036: 32239, + 35037: 32963, + 35038: 33806, + 35039: 34915, + 35040: 35586, + 35041: 36949, + 35042: 36986, + 35043: 21307, + 35044: 20117, + 35045: 20133, + 35046: 22495, + 35047: 32946, + 35048: 37057, + 35049: 30959, + 35050: 19968, + 35051: 22769, + 35052: 28322, + 35053: 36920, + 35054: 31282, + 35055: 33576, + 35056: 33419, + 35057: 39983, + 35058: 20801, + 35059: 21360, + 35060: 21693, + 35061: 21729, + 35062: 22240, + 35063: 23035, + 35064: 24341, + 35065: 39154, + 35066: 28139, + 35067: 32996, + 35068: 34093, + 35136: 38498, + 35137: 38512, + 35138: 38560, + 35139: 38907, + 35140: 21515, + 35141: 21491, + 35142: 23431, + 35143: 28879, + 35144: 32701, + 35145: 36802, + 35146: 38632, + 35147: 21359, + 35148: 40284, + 35149: 31418, + 35150: 19985, + 35151: 30867, + 35152: 33276, + 35153: 28198, + 35154: 22040, + 35155: 21764, + 35156: 27421, + 35157: 34074, + 35158: 39995, + 35159: 23013, + 35160: 21417, + 35161: 28006, + 35162: 29916, + 35163: 38287, + 35164: 22082, + 35165: 20113, + 35166: 36939, + 35167: 38642, + 35168: 33615, + 35169: 39180, + 35170: 21473, + 35171: 21942, + 35172: 23344, + 35173: 24433, + 35174: 26144, + 35175: 26355, + 35176: 26628, + 35177: 27704, + 35178: 27891, + 35179: 27945, + 35180: 29787, + 35181: 30408, + 35182: 31310, + 35183: 38964, + 35184: 33521, + 35185: 34907, + 35186: 35424, + 35187: 37613, + 35188: 28082, + 35189: 30123, + 35190: 30410, + 35191: 39365, + 35192: 24742, + 35193: 35585, + 35194: 36234, + 35195: 38322, + 35196: 27022, + 35197: 21421, + 35198: 20870, + 35200: 22290, + 35201: 22576, + 35202: 22852, + 35203: 23476, + 35204: 24310, + 35205: 24616, + 35206: 25513, + 35207: 25588, + 35208: 27839, + 35209: 28436, + 35210: 28814, + 35211: 28948, + 35212: 29017, + 35213: 29141, + 35214: 29503, + 35215: 32257, + 35216: 33398, + 35217: 33489, + 35218: 34199, + 35219: 36960, + 35220: 37467, + 35221: 40219, + 35222: 22633, + 35223: 26044, + 35224: 27738, + 35225: 29989, + 35226: 20985, + 35227: 22830, + 35228: 22885, + 35229: 24448, + 35230: 24540, + 35231: 25276, + 35232: 26106, + 35233: 27178, + 35234: 27431, + 35235: 27572, + 35236: 29579, + 35237: 32705, + 35238: 35158, + 35239: 40236, + 35240: 40206, + 35241: 40644, + 35242: 23713, + 35243: 27798, + 35244: 33659, + 35245: 20740, + 35246: 23627, + 35247: 25014, + 35248: 33222, + 35249: 26742, + 35250: 29281, + 35251: 20057, + 35252: 20474, + 35253: 21368, + 35254: 24681, + 35255: 28201, + 35256: 31311, + 35257: 38899, + 35258: 19979, + 35259: 21270, + 35260: 20206, + 35261: 20309, + 35262: 20285, + 35263: 20385, + 35264: 20339, + 35265: 21152, + 35266: 21487, + 35267: 22025, + 35268: 22799, + 35269: 23233, + 35270: 23478, + 35271: 23521, + 35272: 31185, + 35273: 26247, + 35274: 26524, + 35275: 26550, + 35276: 27468, + 35277: 27827, + 35278: 28779, + 35279: 29634, + 35280: 31117, + 35281: 31166, + 35282: 31292, + 35283: 31623, + 35284: 33457, + 35285: 33499, + 35286: 33540, + 35287: 33655, + 35288: 33775, + 35289: 33747, + 35290: 34662, + 35291: 35506, + 35292: 22057, + 35293: 36008, + 35294: 36838, + 35295: 36942, + 35296: 38686, + 35297: 34442, + 35298: 20420, + 35299: 23784, + 35300: 25105, + 35301: 29273, + 35302: 30011, + 35303: 33253, + 35304: 33469, + 35305: 34558, + 35306: 36032, + 35307: 38597, + 35308: 39187, + 35309: 39381, + 35310: 20171, + 35311: 20250, + 35312: 35299, + 35313: 22238, + 35314: 22602, + 35315: 22730, + 35316: 24315, + 35317: 24555, + 35318: 24618, + 35319: 24724, + 35320: 24674, + 35321: 25040, + 35322: 25106, + 35323: 25296, + 35324: 25913, + 35392: 39745, + 35393: 26214, + 35394: 26800, + 35395: 28023, + 35396: 28784, + 35397: 30028, + 35398: 30342, + 35399: 32117, + 35400: 33445, + 35401: 34809, + 35402: 38283, + 35403: 38542, + 35404: 35997, + 35405: 20977, + 35406: 21182, + 35407: 22806, + 35408: 21683, + 35409: 23475, + 35410: 23830, + 35411: 24936, + 35412: 27010, + 35413: 28079, + 35414: 30861, + 35415: 33995, + 35416: 34903, + 35417: 35442, + 35418: 37799, + 35419: 39608, + 35420: 28012, + 35421: 39336, + 35422: 34521, + 35423: 22435, + 35424: 26623, + 35425: 34510, + 35426: 37390, + 35427: 21123, + 35428: 22151, + 35429: 21508, + 35430: 24275, + 35431: 25313, + 35432: 25785, + 35433: 26684, + 35434: 26680, + 35435: 27579, + 35436: 29554, + 35437: 30906, + 35438: 31339, + 35439: 35226, + 35440: 35282, + 35441: 36203, + 35442: 36611, + 35443: 37101, + 35444: 38307, + 35445: 38548, + 35446: 38761, + 35447: 23398, + 35448: 23731, + 35449: 27005, + 35450: 38989, + 35451: 38990, + 35452: 25499, + 35453: 31520, + 35454: 27179, + 35456: 27263, + 35457: 26806, + 35458: 39949, + 35459: 28511, + 35460: 21106, + 35461: 21917, + 35462: 24688, + 35463: 25324, + 35464: 27963, + 35465: 28167, + 35466: 28369, + 35467: 33883, + 35468: 35088, + 35469: 36676, + 35470: 19988, + 35471: 39993, + 35472: 21494, + 35473: 26907, + 35474: 27194, + 35475: 38788, + 35476: 26666, + 35477: 20828, + 35478: 31427, + 35479: 33970, + 35480: 37340, + 35481: 37772, + 35482: 22107, + 35483: 40232, + 35484: 26658, + 35485: 33541, + 35486: 33841, + 35487: 31909, + 35488: 21e3, + 35489: 33477, + 35490: 29926, + 35491: 20094, + 35492: 20355, + 35493: 20896, + 35494: 23506, + 35495: 21002, + 35496: 21208, + 35497: 21223, + 35498: 24059, + 35499: 21914, + 35500: 22570, + 35501: 23014, + 35502: 23436, + 35503: 23448, + 35504: 23515, + 35505: 24178, + 35506: 24185, + 35507: 24739, + 35508: 24863, + 35509: 24931, + 35510: 25022, + 35511: 25563, + 35512: 25954, + 35513: 26577, + 35514: 26707, + 35515: 26874, + 35516: 27454, + 35517: 27475, + 35518: 27735, + 35519: 28450, + 35520: 28567, + 35521: 28485, + 35522: 29872, + 35523: 29976, + 35524: 30435, + 35525: 30475, + 35526: 31487, + 35527: 31649, + 35528: 31777, + 35529: 32233, + 35530: 32566, + 35531: 32752, + 35532: 32925, + 35533: 33382, + 35534: 33694, + 35535: 35251, + 35536: 35532, + 35537: 36011, + 35538: 36996, + 35539: 37969, + 35540: 38291, + 35541: 38289, + 35542: 38306, + 35543: 38501, + 35544: 38867, + 35545: 39208, + 35546: 33304, + 35547: 20024, + 35548: 21547, + 35549: 23736, + 35550: 24012, + 35551: 29609, + 35552: 30284, + 35553: 30524, + 35554: 23721, + 35555: 32747, + 35556: 36107, + 35557: 38593, + 35558: 38929, + 35559: 38996, + 35560: 39e3, + 35561: 20225, + 35562: 20238, + 35563: 21361, + 35564: 21916, + 35565: 22120, + 35566: 22522, + 35567: 22855, + 35568: 23305, + 35569: 23492, + 35570: 23696, + 35571: 24076, + 35572: 24190, + 35573: 24524, + 35574: 25582, + 35575: 26426, + 35576: 26071, + 35577: 26082, + 35578: 26399, + 35579: 26827, + 35580: 26820, + 35648: 27231, + 35649: 24112, + 35650: 27589, + 35651: 27671, + 35652: 27773, + 35653: 30079, + 35654: 31048, + 35655: 23395, + 35656: 31232, + 35657: 32e3, + 35658: 24509, + 35659: 35215, + 35660: 35352, + 35661: 36020, + 35662: 36215, + 35663: 36556, + 35664: 36637, + 35665: 39138, + 35666: 39438, + 35667: 39740, + 35668: 20096, + 35669: 20605, + 35670: 20736, + 35671: 22931, + 35672: 23452, + 35673: 25135, + 35674: 25216, + 35675: 25836, + 35676: 27450, + 35677: 29344, + 35678: 30097, + 35679: 31047, + 35680: 32681, + 35681: 34811, + 35682: 35516, + 35683: 35696, + 35684: 25516, + 35685: 33738, + 35686: 38816, + 35687: 21513, + 35688: 21507, + 35689: 21931, + 35690: 26708, + 35691: 27224, + 35692: 35440, + 35693: 30759, + 35694: 26485, + 35695: 40653, + 35696: 21364, + 35697: 23458, + 35698: 33050, + 35699: 34384, + 35700: 36870, + 35701: 19992, + 35702: 20037, + 35703: 20167, + 35704: 20241, + 35705: 21450, + 35706: 21560, + 35707: 23470, + 35708: 24339, + 35709: 24613, + 35710: 25937, + 35712: 26429, + 35713: 27714, + 35714: 27762, + 35715: 27875, + 35716: 28792, + 35717: 29699, + 35718: 31350, + 35719: 31406, + 35720: 31496, + 35721: 32026, + 35722: 31998, + 35723: 32102, + 35724: 26087, + 35725: 29275, + 35726: 21435, + 35727: 23621, + 35728: 24040, + 35729: 25298, + 35730: 25312, + 35731: 25369, + 35732: 28192, + 35733: 34394, + 35734: 35377, + 35735: 36317, + 35736: 37624, + 35737: 28417, + 35738: 31142, + 35739: 39770, + 35740: 20136, + 35741: 20139, + 35742: 20140, + 35743: 20379, + 35744: 20384, + 35745: 20689, + 35746: 20807, + 35747: 31478, + 35748: 20849, + 35749: 20982, + 35750: 21332, + 35751: 21281, + 35752: 21375, + 35753: 21483, + 35754: 21932, + 35755: 22659, + 35756: 23777, + 35757: 24375, + 35758: 24394, + 35759: 24623, + 35760: 24656, + 35761: 24685, + 35762: 25375, + 35763: 25945, + 35764: 27211, + 35765: 27841, + 35766: 29378, + 35767: 29421, + 35768: 30703, + 35769: 33016, + 35770: 33029, + 35771: 33288, + 35772: 34126, + 35773: 37111, + 35774: 37857, + 35775: 38911, + 35776: 39255, + 35777: 39514, + 35778: 20208, + 35779: 20957, + 35780: 23597, + 35781: 26241, + 35782: 26989, + 35783: 23616, + 35784: 26354, + 35785: 26997, + 35786: 29577, + 35787: 26704, + 35788: 31873, + 35789: 20677, + 35790: 21220, + 35791: 22343, + 35792: 24062, + 35793: 37670, + 35794: 26020, + 35795: 27427, + 35796: 27453, + 35797: 29748, + 35798: 31105, + 35799: 31165, + 35800: 31563, + 35801: 32202, + 35802: 33465, + 35803: 33740, + 35804: 34943, + 35805: 35167, + 35806: 35641, + 35807: 36817, + 35808: 37329, + 35809: 21535, + 35810: 37504, + 35811: 20061, + 35812: 20534, + 35813: 21477, + 35814: 21306, + 35815: 29399, + 35816: 29590, + 35817: 30697, + 35818: 33510, + 35819: 36527, + 35820: 39366, + 35821: 39368, + 35822: 39378, + 35823: 20855, + 35824: 24858, + 35825: 34398, + 35826: 21936, + 35827: 31354, + 35828: 20598, + 35829: 23507, + 35830: 36935, + 35831: 38533, + 35832: 20018, + 35833: 27355, + 35834: 37351, + 35835: 23633, + 35836: 23624, + 35904: 25496, + 35905: 31391, + 35906: 27795, + 35907: 38772, + 35908: 36705, + 35909: 31402, + 35910: 29066, + 35911: 38536, + 35912: 31874, + 35913: 26647, + 35914: 32368, + 35915: 26705, + 35916: 37740, + 35917: 21234, + 35918: 21531, + 35919: 34219, + 35920: 35347, + 35921: 32676, + 35922: 36557, + 35923: 37089, + 35924: 21350, + 35925: 34952, + 35926: 31041, + 35927: 20418, + 35928: 20670, + 35929: 21009, + 35930: 20804, + 35931: 21843, + 35932: 22317, + 35933: 29674, + 35934: 22411, + 35935: 22865, + 35936: 24418, + 35937: 24452, + 35938: 24693, + 35939: 24950, + 35940: 24935, + 35941: 25001, + 35942: 25522, + 35943: 25658, + 35944: 25964, + 35945: 26223, + 35946: 26690, + 35947: 28179, + 35948: 30054, + 35949: 31293, + 35950: 31995, + 35951: 32076, + 35952: 32153, + 35953: 32331, + 35954: 32619, + 35955: 33550, + 35956: 33610, + 35957: 34509, + 35958: 35336, + 35959: 35427, + 35960: 35686, + 35961: 36605, + 35962: 38938, + 35963: 40335, + 35964: 33464, + 35965: 36814, + 35966: 39912, + 35968: 21127, + 35969: 25119, + 35970: 25731, + 35971: 28608, + 35972: 38553, + 35973: 26689, + 35974: 20625, + 35975: 27424, + 35976: 27770, + 35977: 28500, + 35978: 31348, + 35979: 32080, + 35980: 34880, + 35981: 35363, + 35982: 26376, + 35983: 20214, + 35984: 20537, + 35985: 20518, + 35986: 20581, + 35987: 20860, + 35988: 21048, + 35989: 21091, + 35990: 21927, + 35991: 22287, + 35992: 22533, + 35993: 23244, + 35994: 24314, + 35995: 25010, + 35996: 25080, + 35997: 25331, + 35998: 25458, + 35999: 26908, + 36e3: 27177, + 36001: 29309, + 36002: 29356, + 36003: 29486, + 36004: 30740, + 36005: 30831, + 36006: 32121, + 36007: 30476, + 36008: 32937, + 36009: 35211, + 36010: 35609, + 36011: 36066, + 36012: 36562, + 36013: 36963, + 36014: 37749, + 36015: 38522, + 36016: 38997, + 36017: 39443, + 36018: 40568, + 36019: 20803, + 36020: 21407, + 36021: 21427, + 36022: 24187, + 36023: 24358, + 36024: 28187, + 36025: 28304, + 36026: 29572, + 36027: 29694, + 36028: 32067, + 36029: 33335, + 36030: 35328, + 36031: 35578, + 36032: 38480, + 36033: 20046, + 36034: 20491, + 36035: 21476, + 36036: 21628, + 36037: 22266, + 36038: 22993, + 36039: 23396, + 36040: 24049, + 36041: 24235, + 36042: 24359, + 36043: 25144, + 36044: 25925, + 36045: 26543, + 36046: 28246, + 36047: 29392, + 36048: 31946, + 36049: 34996, + 36050: 32929, + 36051: 32993, + 36052: 33776, + 36053: 34382, + 36054: 35463, + 36055: 36328, + 36056: 37431, + 36057: 38599, + 36058: 39015, + 36059: 40723, + 36060: 20116, + 36061: 20114, + 36062: 20237, + 36063: 21320, + 36064: 21577, + 36065: 21566, + 36066: 23087, + 36067: 24460, + 36068: 24481, + 36069: 24735, + 36070: 26791, + 36071: 27278, + 36072: 29786, + 36073: 30849, + 36074: 35486, + 36075: 35492, + 36076: 35703, + 36077: 37264, + 36078: 20062, + 36079: 39881, + 36080: 20132, + 36081: 20348, + 36082: 20399, + 36083: 20505, + 36084: 20502, + 36085: 20809, + 36086: 20844, + 36087: 21151, + 36088: 21177, + 36089: 21246, + 36090: 21402, + 36091: 21475, + 36092: 21521, + 36160: 21518, + 36161: 21897, + 36162: 22353, + 36163: 22434, + 36164: 22909, + 36165: 23380, + 36166: 23389, + 36167: 23439, + 36168: 24037, + 36169: 24039, + 36170: 24055, + 36171: 24184, + 36172: 24195, + 36173: 24218, + 36174: 24247, + 36175: 24344, + 36176: 24658, + 36177: 24908, + 36178: 25239, + 36179: 25304, + 36180: 25511, + 36181: 25915, + 36182: 26114, + 36183: 26179, + 36184: 26356, + 36185: 26477, + 36186: 26657, + 36187: 26775, + 36188: 27083, + 36189: 27743, + 36190: 27946, + 36191: 28009, + 36192: 28207, + 36193: 28317, + 36194: 30002, + 36195: 30343, + 36196: 30828, + 36197: 31295, + 36198: 31968, + 36199: 32005, + 36200: 32024, + 36201: 32094, + 36202: 32177, + 36203: 32789, + 36204: 32771, + 36205: 32943, + 36206: 32945, + 36207: 33108, + 36208: 33167, + 36209: 33322, + 36210: 33618, + 36211: 34892, + 36212: 34913, + 36213: 35611, + 36214: 36002, + 36215: 36092, + 36216: 37066, + 36217: 37237, + 36218: 37489, + 36219: 30783, + 36220: 37628, + 36221: 38308, + 36222: 38477, + 36224: 38917, + 36225: 39321, + 36226: 39640, + 36227: 40251, + 36228: 21083, + 36229: 21163, + 36230: 21495, + 36231: 21512, + 36232: 22741, + 36233: 25335, + 36234: 28640, + 36235: 35946, + 36236: 36703, + 36237: 40633, + 36238: 20811, + 36239: 21051, + 36240: 21578, + 36241: 22269, + 36242: 31296, + 36243: 37239, + 36244: 40288, + 36245: 40658, + 36246: 29508, + 36247: 28425, + 36248: 33136, + 36249: 29969, + 36250: 24573, + 36251: 24794, + 36252: 39592, + 36253: 29403, + 36254: 36796, + 36255: 27492, + 36256: 38915, + 36257: 20170, + 36258: 22256, + 36259: 22372, + 36260: 22718, + 36261: 23130, + 36262: 24680, + 36263: 25031, + 36264: 26127, + 36265: 26118, + 36266: 26681, + 36267: 26801, + 36268: 28151, + 36269: 30165, + 36270: 32058, + 36271: 33390, + 36272: 39746, + 36273: 20123, + 36274: 20304, + 36275: 21449, + 36276: 21766, + 36277: 23919, + 36278: 24038, + 36279: 24046, + 36280: 26619, + 36281: 27801, + 36282: 29811, + 36283: 30722, + 36284: 35408, + 36285: 37782, + 36286: 35039, + 36287: 22352, + 36288: 24231, + 36289: 25387, + 36290: 20661, + 36291: 20652, + 36292: 20877, + 36293: 26368, + 36294: 21705, + 36295: 22622, + 36296: 22971, + 36297: 23472, + 36298: 24425, + 36299: 25165, + 36300: 25505, + 36301: 26685, + 36302: 27507, + 36303: 28168, + 36304: 28797, + 36305: 37319, + 36306: 29312, + 36307: 30741, + 36308: 30758, + 36309: 31085, + 36310: 25998, + 36311: 32048, + 36312: 33756, + 36313: 35009, + 36314: 36617, + 36315: 38555, + 36316: 21092, + 36317: 22312, + 36318: 26448, + 36319: 32618, + 36320: 36001, + 36321: 20916, + 36322: 22338, + 36323: 38442, + 36324: 22586, + 36325: 27018, + 36326: 32948, + 36327: 21682, + 36328: 23822, + 36329: 22524, + 36330: 30869, + 36331: 40442, + 36332: 20316, + 36333: 21066, + 36334: 21643, + 36335: 25662, + 36336: 26152, + 36337: 26388, + 36338: 26613, + 36339: 31364, + 36340: 31574, + 36341: 32034, + 36342: 37679, + 36343: 26716, + 36344: 39853, + 36345: 31545, + 36346: 21273, + 36347: 20874, + 36348: 21047, + 36416: 23519, + 36417: 25334, + 36418: 25774, + 36419: 25830, + 36420: 26413, + 36421: 27578, + 36422: 34217, + 36423: 38609, + 36424: 30352, + 36425: 39894, + 36426: 25420, + 36427: 37638, + 36428: 39851, + 36429: 30399, + 36430: 26194, + 36431: 19977, + 36432: 20632, + 36433: 21442, + 36434: 23665, + 36435: 24808, + 36436: 25746, + 36437: 25955, + 36438: 26719, + 36439: 29158, + 36440: 29642, + 36441: 29987, + 36442: 31639, + 36443: 32386, + 36444: 34453, + 36445: 35715, + 36446: 36059, + 36447: 37240, + 36448: 39184, + 36449: 26028, + 36450: 26283, + 36451: 27531, + 36452: 20181, + 36453: 20180, + 36454: 20282, + 36455: 20351, + 36456: 21050, + 36457: 21496, + 36458: 21490, + 36459: 21987, + 36460: 22235, + 36461: 22763, + 36462: 22987, + 36463: 22985, + 36464: 23039, + 36465: 23376, + 36466: 23629, + 36467: 24066, + 36468: 24107, + 36469: 24535, + 36470: 24605, + 36471: 25351, + 36472: 25903, + 36473: 23388, + 36474: 26031, + 36475: 26045, + 36476: 26088, + 36477: 26525, + 36478: 27490, + 36480: 27515, + 36481: 27663, + 36482: 29509, + 36483: 31049, + 36484: 31169, + 36485: 31992, + 36486: 32025, + 36487: 32043, + 36488: 32930, + 36489: 33026, + 36490: 33267, + 36491: 35222, + 36492: 35422, + 36493: 35433, + 36494: 35430, + 36495: 35468, + 36496: 35566, + 36497: 36039, + 36498: 36060, + 36499: 38604, + 36500: 39164, + 36501: 27503, + 36502: 20107, + 36503: 20284, + 36504: 20365, + 36505: 20816, + 36506: 23383, + 36507: 23546, + 36508: 24904, + 36509: 25345, + 36510: 26178, + 36511: 27425, + 36512: 28363, + 36513: 27835, + 36514: 29246, + 36515: 29885, + 36516: 30164, + 36517: 30913, + 36518: 31034, + 36519: 32780, + 36520: 32819, + 36521: 33258, + 36522: 33940, + 36523: 36766, + 36524: 27728, + 36525: 40575, + 36526: 24335, + 36527: 35672, + 36528: 40235, + 36529: 31482, + 36530: 36600, + 36531: 23437, + 36532: 38635, + 36533: 19971, + 36534: 21489, + 36535: 22519, + 36536: 22833, + 36537: 23241, + 36538: 23460, + 36539: 24713, + 36540: 28287, + 36541: 28422, + 36542: 30142, + 36543: 36074, + 36544: 23455, + 36545: 34048, + 36546: 31712, + 36547: 20594, + 36548: 26612, + 36549: 33437, + 36550: 23649, + 36551: 34122, + 36552: 32286, + 36553: 33294, + 36554: 20889, + 36555: 23556, + 36556: 25448, + 36557: 36198, + 36558: 26012, + 36559: 29038, + 36560: 31038, + 36561: 32023, + 36562: 32773, + 36563: 35613, + 36564: 36554, + 36565: 36974, + 36566: 34503, + 36567: 37034, + 36568: 20511, + 36569: 21242, + 36570: 23610, + 36571: 26451, + 36572: 28796, + 36573: 29237, + 36574: 37196, + 36575: 37320, + 36576: 37675, + 36577: 33509, + 36578: 23490, + 36579: 24369, + 36580: 24825, + 36581: 20027, + 36582: 21462, + 36583: 23432, + 36584: 25163, + 36585: 26417, + 36586: 27530, + 36587: 29417, + 36588: 29664, + 36589: 31278, + 36590: 33131, + 36591: 36259, + 36592: 37202, + 36593: 39318, + 36594: 20754, + 36595: 21463, + 36596: 21610, + 36597: 23551, + 36598: 25480, + 36599: 27193, + 36600: 32172, + 36601: 38656, + 36602: 22234, + 36603: 21454, + 36604: 21608, + 36672: 23447, + 36673: 23601, + 36674: 24030, + 36675: 20462, + 36676: 24833, + 36677: 25342, + 36678: 27954, + 36679: 31168, + 36680: 31179, + 36681: 32066, + 36682: 32333, + 36683: 32722, + 36684: 33261, + 36685: 33311, + 36686: 33936, + 36687: 34886, + 36688: 35186, + 36689: 35728, + 36690: 36468, + 36691: 36655, + 36692: 36913, + 36693: 37195, + 36694: 37228, + 36695: 38598, + 36696: 37276, + 36697: 20160, + 36698: 20303, + 36699: 20805, + 36700: 21313, + 36701: 24467, + 36702: 25102, + 36703: 26580, + 36704: 27713, + 36705: 28171, + 36706: 29539, + 36707: 32294, + 36708: 37325, + 36709: 37507, + 36710: 21460, + 36711: 22809, + 36712: 23487, + 36713: 28113, + 36714: 31069, + 36715: 32302, + 36716: 31899, + 36717: 22654, + 36718: 29087, + 36719: 20986, + 36720: 34899, + 36721: 36848, + 36722: 20426, + 36723: 23803, + 36724: 26149, + 36725: 30636, + 36726: 31459, + 36727: 33308, + 36728: 39423, + 36729: 20934, + 36730: 24490, + 36731: 26092, + 36732: 26991, + 36733: 27529, + 36734: 28147, + 36736: 28310, + 36737: 28516, + 36738: 30462, + 36739: 32020, + 36740: 24033, + 36741: 36981, + 36742: 37255, + 36743: 38918, + 36744: 20966, + 36745: 21021, + 36746: 25152, + 36747: 26257, + 36748: 26329, + 36749: 28186, + 36750: 24246, + 36751: 32210, + 36752: 32626, + 36753: 26360, + 36754: 34223, + 36755: 34295, + 36756: 35576, + 36757: 21161, + 36758: 21465, + 36759: 22899, + 36760: 24207, + 36761: 24464, + 36762: 24661, + 36763: 37604, + 36764: 38500, + 36765: 20663, + 36766: 20767, + 36767: 21213, + 36768: 21280, + 36769: 21319, + 36770: 21484, + 36771: 21736, + 36772: 21830, + 36773: 21809, + 36774: 22039, + 36775: 22888, + 36776: 22974, + 36777: 23100, + 36778: 23477, + 36779: 23558, + 36780: 23567, + 36781: 23569, + 36782: 23578, + 36783: 24196, + 36784: 24202, + 36785: 24288, + 36786: 24432, + 36787: 25215, + 36788: 25220, + 36789: 25307, + 36790: 25484, + 36791: 25463, + 36792: 26119, + 36793: 26124, + 36794: 26157, + 36795: 26230, + 36796: 26494, + 36797: 26786, + 36798: 27167, + 36799: 27189, + 36800: 27836, + 36801: 28040, + 36802: 28169, + 36803: 28248, + 36804: 28988, + 36805: 28966, + 36806: 29031, + 36807: 30151, + 36808: 30465, + 36809: 30813, + 36810: 30977, + 36811: 31077, + 36812: 31216, + 36813: 31456, + 36814: 31505, + 36815: 31911, + 36816: 32057, + 36817: 32918, + 36818: 33750, + 36819: 33931, + 36820: 34121, + 36821: 34909, + 36822: 35059, + 36823: 35359, + 36824: 35388, + 36825: 35412, + 36826: 35443, + 36827: 35937, + 36828: 36062, + 36829: 37284, + 36830: 37478, + 36831: 37758, + 36832: 37912, + 36833: 38556, + 36834: 38808, + 36835: 19978, + 36836: 19976, + 36837: 19998, + 36838: 20055, + 36839: 20887, + 36840: 21104, + 36841: 22478, + 36842: 22580, + 36843: 22732, + 36844: 23330, + 36845: 24120, + 36846: 24773, + 36847: 25854, + 36848: 26465, + 36849: 26454, + 36850: 27972, + 36851: 29366, + 36852: 30067, + 36853: 31331, + 36854: 33976, + 36855: 35698, + 36856: 37304, + 36857: 37664, + 36858: 22065, + 36859: 22516, + 36860: 39166, + 36928: 25325, + 36929: 26893, + 36930: 27542, + 36931: 29165, + 36932: 32340, + 36933: 32887, + 36934: 33394, + 36935: 35302, + 36936: 39135, + 36937: 34645, + 36938: 36785, + 36939: 23611, + 36940: 20280, + 36941: 20449, + 36942: 20405, + 36943: 21767, + 36944: 23072, + 36945: 23517, + 36946: 23529, + 36947: 24515, + 36948: 24910, + 36949: 25391, + 36950: 26032, + 36951: 26187, + 36952: 26862, + 36953: 27035, + 36954: 28024, + 36955: 28145, + 36956: 30003, + 36957: 30137, + 36958: 30495, + 36959: 31070, + 36960: 31206, + 36961: 32051, + 36962: 33251, + 36963: 33455, + 36964: 34218, + 36965: 35242, + 36966: 35386, + 36967: 36523, + 36968: 36763, + 36969: 36914, + 36970: 37341, + 36971: 38663, + 36972: 20154, + 36973: 20161, + 36974: 20995, + 36975: 22645, + 36976: 22764, + 36977: 23563, + 36978: 29978, + 36979: 23613, + 36980: 33102, + 36981: 35338, + 36982: 36805, + 36983: 38499, + 36984: 38765, + 36985: 31525, + 36986: 35535, + 36987: 38920, + 36988: 37218, + 36989: 22259, + 36990: 21416, + 36992: 36887, + 36993: 21561, + 36994: 22402, + 36995: 24101, + 36996: 25512, + 36997: 27700, + 36998: 28810, + 36999: 30561, + 37e3: 31883, + 37001: 32736, + 37002: 34928, + 37003: 36930, + 37004: 37204, + 37005: 37648, + 37006: 37656, + 37007: 38543, + 37008: 29790, + 37009: 39620, + 37010: 23815, + 37011: 23913, + 37012: 25968, + 37013: 26530, + 37014: 36264, + 37015: 38619, + 37016: 25454, + 37017: 26441, + 37018: 26905, + 37019: 33733, + 37020: 38935, + 37021: 38592, + 37022: 35070, + 37023: 28548, + 37024: 25722, + 37025: 23544, + 37026: 19990, + 37027: 28716, + 37028: 30045, + 37029: 26159, + 37030: 20932, + 37031: 21046, + 37032: 21218, + 37033: 22995, + 37034: 24449, + 37035: 24615, + 37036: 25104, + 37037: 25919, + 37038: 25972, + 37039: 26143, + 37040: 26228, + 37041: 26866, + 37042: 26646, + 37043: 27491, + 37044: 28165, + 37045: 29298, + 37046: 29983, + 37047: 30427, + 37048: 31934, + 37049: 32854, + 37050: 22768, + 37051: 35069, + 37052: 35199, + 37053: 35488, + 37054: 35475, + 37055: 35531, + 37056: 36893, + 37057: 37266, + 37058: 38738, + 37059: 38745, + 37060: 25993, + 37061: 31246, + 37062: 33030, + 37063: 38587, + 37064: 24109, + 37065: 24796, + 37066: 25114, + 37067: 26021, + 37068: 26132, + 37069: 26512, + 37070: 30707, + 37071: 31309, + 37072: 31821, + 37073: 32318, + 37074: 33034, + 37075: 36012, + 37076: 36196, + 37077: 36321, + 37078: 36447, + 37079: 30889, + 37080: 20999, + 37081: 25305, + 37082: 25509, + 37083: 25666, + 37084: 25240, + 37085: 35373, + 37086: 31363, + 37087: 31680, + 37088: 35500, + 37089: 38634, + 37090: 32118, + 37091: 33292, + 37092: 34633, + 37093: 20185, + 37094: 20808, + 37095: 21315, + 37096: 21344, + 37097: 23459, + 37098: 23554, + 37099: 23574, + 37100: 24029, + 37101: 25126, + 37102: 25159, + 37103: 25776, + 37104: 26643, + 37105: 26676, + 37106: 27849, + 37107: 27973, + 37108: 27927, + 37109: 26579, + 37110: 28508, + 37111: 29006, + 37112: 29053, + 37113: 26059, + 37114: 31359, + 37115: 31661, + 37116: 32218, + 37184: 32330, + 37185: 32680, + 37186: 33146, + 37187: 33307, + 37188: 33337, + 37189: 34214, + 37190: 35438, + 37191: 36046, + 37192: 36341, + 37193: 36984, + 37194: 36983, + 37195: 37549, + 37196: 37521, + 37197: 38275, + 37198: 39854, + 37199: 21069, + 37200: 21892, + 37201: 28472, + 37202: 28982, + 37203: 20840, + 37204: 31109, + 37205: 32341, + 37206: 33203, + 37207: 31950, + 37208: 22092, + 37209: 22609, + 37210: 23720, + 37211: 25514, + 37212: 26366, + 37213: 26365, + 37214: 26970, + 37215: 29401, + 37216: 30095, + 37217: 30094, + 37218: 30990, + 37219: 31062, + 37220: 31199, + 37221: 31895, + 37222: 32032, + 37223: 32068, + 37224: 34311, + 37225: 35380, + 37226: 38459, + 37227: 36961, + 37228: 40736, + 37229: 20711, + 37230: 21109, + 37231: 21452, + 37232: 21474, + 37233: 20489, + 37234: 21930, + 37235: 22766, + 37236: 22863, + 37237: 29245, + 37238: 23435, + 37239: 23652, + 37240: 21277, + 37241: 24803, + 37242: 24819, + 37243: 25436, + 37244: 25475, + 37245: 25407, + 37246: 25531, + 37248: 25805, + 37249: 26089, + 37250: 26361, + 37251: 24035, + 37252: 27085, + 37253: 27133, + 37254: 28437, + 37255: 29157, + 37256: 20105, + 37257: 30185, + 37258: 30456, + 37259: 31379, + 37260: 31967, + 37261: 32207, + 37262: 32156, + 37263: 32865, + 37264: 33609, + 37265: 33624, + 37266: 33900, + 37267: 33980, + 37268: 34299, + 37269: 35013, + 37270: 36208, + 37271: 36865, + 37272: 36973, + 37273: 37783, + 37274: 38684, + 37275: 39442, + 37276: 20687, + 37277: 22679, + 37278: 24974, + 37279: 33235, + 37280: 34101, + 37281: 36104, + 37282: 36896, + 37283: 20419, + 37284: 20596, + 37285: 21063, + 37286: 21363, + 37287: 24687, + 37288: 25417, + 37289: 26463, + 37290: 28204, + 37291: 36275, + 37292: 36895, + 37293: 20439, + 37294: 23646, + 37295: 36042, + 37296: 26063, + 37297: 32154, + 37298: 21330, + 37299: 34966, + 37300: 20854, + 37301: 25539, + 37302: 23384, + 37303: 23403, + 37304: 23562, + 37305: 25613, + 37306: 26449, + 37307: 36956, + 37308: 20182, + 37309: 22810, + 37310: 22826, + 37311: 27760, + 37312: 35409, + 37313: 21822, + 37314: 22549, + 37315: 22949, + 37316: 24816, + 37317: 25171, + 37318: 26561, + 37319: 33333, + 37320: 26965, + 37321: 38464, + 37322: 39364, + 37323: 39464, + 37324: 20307, + 37325: 22534, + 37326: 23550, + 37327: 32784, + 37328: 23729, + 37329: 24111, + 37330: 24453, + 37331: 24608, + 37332: 24907, + 37333: 25140, + 37334: 26367, + 37335: 27888, + 37336: 28382, + 37337: 32974, + 37338: 33151, + 37339: 33492, + 37340: 34955, + 37341: 36024, + 37342: 36864, + 37343: 36910, + 37344: 38538, + 37345: 40667, + 37346: 39899, + 37347: 20195, + 37348: 21488, + 37349: 22823, + 37350: 31532, + 37351: 37261, + 37352: 38988, + 37353: 40441, + 37354: 28381, + 37355: 28711, + 37356: 21331, + 37357: 21828, + 37358: 23429, + 37359: 25176, + 37360: 25246, + 37361: 25299, + 37362: 27810, + 37363: 28655, + 37364: 29730, + 37365: 35351, + 37366: 37944, + 37367: 28609, + 37368: 35582, + 37369: 33592, + 37370: 20967, + 37371: 34552, + 37372: 21482, + 37440: 21481, + 37441: 20294, + 37442: 36948, + 37443: 36784, + 37444: 22890, + 37445: 33073, + 37446: 24061, + 37447: 31466, + 37448: 36799, + 37449: 26842, + 37450: 35895, + 37451: 29432, + 37452: 40008, + 37453: 27197, + 37454: 35504, + 37455: 20025, + 37456: 21336, + 37457: 22022, + 37458: 22374, + 37459: 25285, + 37460: 25506, + 37461: 26086, + 37462: 27470, + 37463: 28129, + 37464: 28251, + 37465: 28845, + 37466: 30701, + 37467: 31471, + 37468: 31658, + 37469: 32187, + 37470: 32829, + 37471: 32966, + 37472: 34507, + 37473: 35477, + 37474: 37723, + 37475: 22243, + 37476: 22727, + 37477: 24382, + 37478: 26029, + 37479: 26262, + 37480: 27264, + 37481: 27573, + 37482: 30007, + 37483: 35527, + 37484: 20516, + 37485: 30693, + 37486: 22320, + 37487: 24347, + 37488: 24677, + 37489: 26234, + 37490: 27744, + 37491: 30196, + 37492: 31258, + 37493: 32622, + 37494: 33268, + 37495: 34584, + 37496: 36933, + 37497: 39347, + 37498: 31689, + 37499: 30044, + 37500: 31481, + 37501: 31569, + 37502: 33988, + 37504: 36880, + 37505: 31209, + 37506: 31378, + 37507: 33590, + 37508: 23265, + 37509: 30528, + 37510: 20013, + 37511: 20210, + 37512: 23449, + 37513: 24544, + 37514: 25277, + 37515: 26172, + 37516: 26609, + 37517: 27880, + 37518: 34411, + 37519: 34935, + 37520: 35387, + 37521: 37198, + 37522: 37619, + 37523: 39376, + 37524: 27159, + 37525: 28710, + 37526: 29482, + 37527: 33511, + 37528: 33879, + 37529: 36015, + 37530: 19969, + 37531: 20806, + 37532: 20939, + 37533: 21899, + 37534: 23541, + 37535: 24086, + 37536: 24115, + 37537: 24193, + 37538: 24340, + 37539: 24373, + 37540: 24427, + 37541: 24500, + 37542: 25074, + 37543: 25361, + 37544: 26274, + 37545: 26397, + 37546: 28526, + 37547: 29266, + 37548: 30010, + 37549: 30522, + 37550: 32884, + 37551: 33081, + 37552: 33144, + 37553: 34678, + 37554: 35519, + 37555: 35548, + 37556: 36229, + 37557: 36339, + 37558: 37530, + 37559: 38263, + 37560: 38914, + 37561: 40165, + 37562: 21189, + 37563: 25431, + 37564: 30452, + 37565: 26389, + 37566: 27784, + 37567: 29645, + 37568: 36035, + 37569: 37806, + 37570: 38515, + 37571: 27941, + 37572: 22684, + 37573: 26894, + 37574: 27084, + 37575: 36861, + 37576: 37786, + 37577: 30171, + 37578: 36890, + 37579: 22618, + 37580: 26626, + 37581: 25524, + 37582: 27131, + 37583: 20291, + 37584: 28460, + 37585: 26584, + 37586: 36795, + 37587: 34086, + 37588: 32180, + 37589: 37716, + 37590: 26943, + 37591: 28528, + 37592: 22378, + 37593: 22775, + 37594: 23340, + 37595: 32044, + 37596: 29226, + 37597: 21514, + 37598: 37347, + 37599: 40372, + 37600: 20141, + 37601: 20302, + 37602: 20572, + 37603: 20597, + 37604: 21059, + 37605: 35998, + 37606: 21576, + 37607: 22564, + 37608: 23450, + 37609: 24093, + 37610: 24213, + 37611: 24237, + 37612: 24311, + 37613: 24351, + 37614: 24716, + 37615: 25269, + 37616: 25402, + 37617: 25552, + 37618: 26799, + 37619: 27712, + 37620: 30855, + 37621: 31118, + 37622: 31243, + 37623: 32224, + 37624: 33351, + 37625: 35330, + 37626: 35558, + 37627: 36420, + 37628: 36883, + 37696: 37048, + 37697: 37165, + 37698: 37336, + 37699: 40718, + 37700: 27877, + 37701: 25688, + 37702: 25826, + 37703: 25973, + 37704: 28404, + 37705: 30340, + 37706: 31515, + 37707: 36969, + 37708: 37841, + 37709: 28346, + 37710: 21746, + 37711: 24505, + 37712: 25764, + 37713: 36685, + 37714: 36845, + 37715: 37444, + 37716: 20856, + 37717: 22635, + 37718: 22825, + 37719: 23637, + 37720: 24215, + 37721: 28155, + 37722: 32399, + 37723: 29980, + 37724: 36028, + 37725: 36578, + 37726: 39003, + 37727: 28857, + 37728: 20253, + 37729: 27583, + 37730: 28593, + 37731: 3e4, + 37732: 38651, + 37733: 20814, + 37734: 21520, + 37735: 22581, + 37736: 22615, + 37737: 22956, + 37738: 23648, + 37739: 24466, + 37740: 26007, + 37741: 26460, + 37742: 28193, + 37743: 30331, + 37744: 33759, + 37745: 36077, + 37746: 36884, + 37747: 37117, + 37748: 37709, + 37749: 30757, + 37750: 30778, + 37751: 21162, + 37752: 24230, + 37753: 22303, + 37754: 22900, + 37755: 24594, + 37756: 20498, + 37757: 20826, + 37758: 20908, + 37760: 20941, + 37761: 20992, + 37762: 21776, + 37763: 22612, + 37764: 22616, + 37765: 22871, + 37766: 23445, + 37767: 23798, + 37768: 23947, + 37769: 24764, + 37770: 25237, + 37771: 25645, + 37772: 26481, + 37773: 26691, + 37774: 26812, + 37775: 26847, + 37776: 30423, + 37777: 28120, + 37778: 28271, + 37779: 28059, + 37780: 28783, + 37781: 29128, + 37782: 24403, + 37783: 30168, + 37784: 31095, + 37785: 31561, + 37786: 31572, + 37787: 31570, + 37788: 31958, + 37789: 32113, + 37790: 21040, + 37791: 33891, + 37792: 34153, + 37793: 34276, + 37794: 35342, + 37795: 35588, + 37796: 35910, + 37797: 36367, + 37798: 36867, + 37799: 36879, + 37800: 37913, + 37801: 38518, + 37802: 38957, + 37803: 39472, + 37804: 38360, + 37805: 20685, + 37806: 21205, + 37807: 21516, + 37808: 22530, + 37809: 23566, + 37810: 24999, + 37811: 25758, + 37812: 27934, + 37813: 30643, + 37814: 31461, + 37815: 33012, + 37816: 33796, + 37817: 36947, + 37818: 37509, + 37819: 23776, + 37820: 40199, + 37821: 21311, + 37822: 24471, + 37823: 24499, + 37824: 28060, + 37825: 29305, + 37826: 30563, + 37827: 31167, + 37828: 31716, + 37829: 27602, + 37830: 29420, + 37831: 35501, + 37832: 26627, + 37833: 27233, + 37834: 20984, + 37835: 31361, + 37836: 26932, + 37837: 23626, + 37838: 40182, + 37839: 33515, + 37840: 23493, + 37841: 37193, + 37842: 28702, + 37843: 22136, + 37844: 23663, + 37845: 24775, + 37846: 25958, + 37847: 27788, + 37848: 35930, + 37849: 36929, + 37850: 38931, + 37851: 21585, + 37852: 26311, + 37853: 37389, + 37854: 22856, + 37855: 37027, + 37856: 20869, + 37857: 20045, + 37858: 20970, + 37859: 34201, + 37860: 35598, + 37861: 28760, + 37862: 25466, + 37863: 37707, + 37864: 26978, + 37865: 39348, + 37866: 32260, + 37867: 30071, + 37868: 21335, + 37869: 26976, + 37870: 36575, + 37871: 38627, + 37872: 27741, + 37873: 20108, + 37874: 23612, + 37875: 24336, + 37876: 36841, + 37877: 21250, + 37878: 36049, + 37879: 32905, + 37880: 34425, + 37881: 24319, + 37882: 26085, + 37883: 20083, + 37884: 20837, + 37952: 22914, + 37953: 23615, + 37954: 38894, + 37955: 20219, + 37956: 22922, + 37957: 24525, + 37958: 35469, + 37959: 28641, + 37960: 31152, + 37961: 31074, + 37962: 23527, + 37963: 33905, + 37964: 29483, + 37965: 29105, + 37966: 24180, + 37967: 24565, + 37968: 25467, + 37969: 25754, + 37970: 29123, + 37971: 31896, + 37972: 20035, + 37973: 24316, + 37974: 20043, + 37975: 22492, + 37976: 22178, + 37977: 24745, + 37978: 28611, + 37979: 32013, + 37980: 33021, + 37981: 33075, + 37982: 33215, + 37983: 36786, + 37984: 35223, + 37985: 34468, + 37986: 24052, + 37987: 25226, + 37988: 25773, + 37989: 35207, + 37990: 26487, + 37991: 27874, + 37992: 27966, + 37993: 29750, + 37994: 30772, + 37995: 23110, + 37996: 32629, + 37997: 33453, + 37998: 39340, + 37999: 20467, + 38e3: 24259, + 38001: 25309, + 38002: 25490, + 38003: 25943, + 38004: 26479, + 38005: 30403, + 38006: 29260, + 38007: 32972, + 38008: 32954, + 38009: 36649, + 38010: 37197, + 38011: 20493, + 38012: 22521, + 38013: 23186, + 38014: 26757, + 38016: 26995, + 38017: 29028, + 38018: 29437, + 38019: 36023, + 38020: 22770, + 38021: 36064, + 38022: 38506, + 38023: 36889, + 38024: 34687, + 38025: 31204, + 38026: 30695, + 38027: 33833, + 38028: 20271, + 38029: 21093, + 38030: 21338, + 38031: 25293, + 38032: 26575, + 38033: 27850, + 38034: 30333, + 38035: 31636, + 38036: 31893, + 38037: 33334, + 38038: 34180, + 38039: 36843, + 38040: 26333, + 38041: 28448, + 38042: 29190, + 38043: 32283, + 38044: 33707, + 38045: 39361, + 38046: 40614, + 38047: 20989, + 38048: 31665, + 38049: 30834, + 38050: 31672, + 38051: 32903, + 38052: 31560, + 38053: 27368, + 38054: 24161, + 38055: 32908, + 38056: 30033, + 38057: 30048, + 38058: 20843, + 38059: 37474, + 38060: 28300, + 38061: 30330, + 38062: 37271, + 38063: 39658, + 38064: 20240, + 38065: 32624, + 38066: 25244, + 38067: 31567, + 38068: 38309, + 38069: 40169, + 38070: 22138, + 38071: 22617, + 38072: 34532, + 38073: 38588, + 38074: 20276, + 38075: 21028, + 38076: 21322, + 38077: 21453, + 38078: 21467, + 38079: 24070, + 38080: 25644, + 38081: 26001, + 38082: 26495, + 38083: 27710, + 38084: 27726, + 38085: 29256, + 38086: 29359, + 38087: 29677, + 38088: 30036, + 38089: 32321, + 38090: 33324, + 38091: 34281, + 38092: 36009, + 38093: 31684, + 38094: 37318, + 38095: 29033, + 38096: 38930, + 38097: 39151, + 38098: 25405, + 38099: 26217, + 38100: 30058, + 38101: 30436, + 38102: 30928, + 38103: 34115, + 38104: 34542, + 38105: 21290, + 38106: 21329, + 38107: 21542, + 38108: 22915, + 38109: 24199, + 38110: 24444, + 38111: 24754, + 38112: 25161, + 38113: 25209, + 38114: 25259, + 38115: 26e3, + 38116: 27604, + 38117: 27852, + 38118: 30130, + 38119: 30382, + 38120: 30865, + 38121: 31192, + 38122: 32203, + 38123: 32631, + 38124: 32933, + 38125: 34987, + 38126: 35513, + 38127: 36027, + 38128: 36991, + 38129: 38750, + 38130: 39131, + 38131: 27147, + 38132: 31800, + 38133: 20633, + 38134: 23614, + 38135: 24494, + 38136: 26503, + 38137: 27608, + 38138: 29749, + 38139: 30473, + 38140: 32654, + 38208: 40763, + 38209: 26570, + 38210: 31255, + 38211: 21305, + 38212: 30091, + 38213: 39661, + 38214: 24422, + 38215: 33181, + 38216: 33777, + 38217: 32920, + 38218: 24380, + 38219: 24517, + 38220: 30050, + 38221: 31558, + 38222: 36924, + 38223: 26727, + 38224: 23019, + 38225: 23195, + 38226: 32016, + 38227: 30334, + 38228: 35628, + 38229: 20469, + 38230: 24426, + 38231: 27161, + 38232: 27703, + 38233: 28418, + 38234: 29922, + 38235: 31080, + 38236: 34920, + 38237: 35413, + 38238: 35961, + 38239: 24287, + 38240: 25551, + 38241: 30149, + 38242: 31186, + 38243: 33495, + 38244: 37672, + 38245: 37618, + 38246: 33948, + 38247: 34541, + 38248: 39981, + 38249: 21697, + 38250: 24428, + 38251: 25996, + 38252: 27996, + 38253: 28693, + 38254: 36007, + 38255: 36051, + 38256: 38971, + 38257: 25935, + 38258: 29942, + 38259: 19981, + 38260: 20184, + 38261: 22496, + 38262: 22827, + 38263: 23142, + 38264: 23500, + 38265: 20904, + 38266: 24067, + 38267: 24220, + 38268: 24598, + 38269: 25206, + 38270: 25975, + 38272: 26023, + 38273: 26222, + 38274: 28014, + 38275: 29238, + 38276: 31526, + 38277: 33104, + 38278: 33178, + 38279: 33433, + 38280: 35676, + 38281: 36e3, + 38282: 36070, + 38283: 36212, + 38284: 38428, + 38285: 38468, + 38286: 20398, + 38287: 25771, + 38288: 27494, + 38289: 33310, + 38290: 33889, + 38291: 34154, + 38292: 37096, + 38293: 23553, + 38294: 26963, + 38295: 39080, + 38296: 33914, + 38297: 34135, + 38298: 20239, + 38299: 21103, + 38300: 24489, + 38301: 24133, + 38302: 26381, + 38303: 31119, + 38304: 33145, + 38305: 35079, + 38306: 35206, + 38307: 28149, + 38308: 24343, + 38309: 25173, + 38310: 27832, + 38311: 20175, + 38312: 29289, + 38313: 39826, + 38314: 20998, + 38315: 21563, + 38316: 22132, + 38317: 22707, + 38318: 24996, + 38319: 25198, + 38320: 28954, + 38321: 22894, + 38322: 31881, + 38323: 31966, + 38324: 32027, + 38325: 38640, + 38326: 25991, + 38327: 32862, + 38328: 19993, + 38329: 20341, + 38330: 20853, + 38331: 22592, + 38332: 24163, + 38333: 24179, + 38334: 24330, + 38335: 26564, + 38336: 20006, + 38337: 34109, + 38338: 38281, + 38339: 38491, + 38340: 31859, + 38341: 38913, + 38342: 20731, + 38343: 22721, + 38344: 30294, + 38345: 30887, + 38346: 21029, + 38347: 30629, + 38348: 34065, + 38349: 31622, + 38350: 20559, + 38351: 22793, + 38352: 29255, + 38353: 31687, + 38354: 32232, + 38355: 36794, + 38356: 36820, + 38357: 36941, + 38358: 20415, + 38359: 21193, + 38360: 23081, + 38361: 24321, + 38362: 38829, + 38363: 20445, + 38364: 33303, + 38365: 37610, + 38366: 22275, + 38367: 25429, + 38368: 27497, + 38369: 29995, + 38370: 35036, + 38371: 36628, + 38372: 31298, + 38373: 21215, + 38374: 22675, + 38375: 24917, + 38376: 25098, + 38377: 26286, + 38378: 27597, + 38379: 31807, + 38380: 33769, + 38381: 20515, + 38382: 20472, + 38383: 21253, + 38384: 21574, + 38385: 22577, + 38386: 22857, + 38387: 23453, + 38388: 23792, + 38389: 23791, + 38390: 23849, + 38391: 24214, + 38392: 25265, + 38393: 25447, + 38394: 25918, + 38395: 26041, + 38396: 26379, + 38464: 27861, + 38465: 27873, + 38466: 28921, + 38467: 30770, + 38468: 32299, + 38469: 32990, + 38470: 33459, + 38471: 33804, + 38472: 34028, + 38473: 34562, + 38474: 35090, + 38475: 35370, + 38476: 35914, + 38477: 37030, + 38478: 37586, + 38479: 39165, + 38480: 40179, + 38481: 40300, + 38482: 20047, + 38483: 20129, + 38484: 20621, + 38485: 21078, + 38486: 22346, + 38487: 22952, + 38488: 24125, + 38489: 24536, + 38490: 24537, + 38491: 25151, + 38492: 26292, + 38493: 26395, + 38494: 26576, + 38495: 26834, + 38496: 20882, + 38497: 32033, + 38498: 32938, + 38499: 33192, + 38500: 35584, + 38501: 35980, + 38502: 36031, + 38503: 37502, + 38504: 38450, + 38505: 21536, + 38506: 38956, + 38507: 21271, + 38508: 20693, + 38509: 21340, + 38510: 22696, + 38511: 25778, + 38512: 26420, + 38513: 29287, + 38514: 30566, + 38515: 31302, + 38516: 37350, + 38517: 21187, + 38518: 27809, + 38519: 27526, + 38520: 22528, + 38521: 24140, + 38522: 22868, + 38523: 26412, + 38524: 32763, + 38525: 20961, + 38526: 30406, + 38528: 25705, + 38529: 30952, + 38530: 39764, + 38531: 40635, + 38532: 22475, + 38533: 22969, + 38534: 26151, + 38535: 26522, + 38536: 27598, + 38537: 21737, + 38538: 27097, + 38539: 24149, + 38540: 33180, + 38541: 26517, + 38542: 39850, + 38543: 26622, + 38544: 40018, + 38545: 26717, + 38546: 20134, + 38547: 20451, + 38548: 21448, + 38549: 25273, + 38550: 26411, + 38551: 27819, + 38552: 36804, + 38553: 20397, + 38554: 32365, + 38555: 40639, + 38556: 19975, + 38557: 24930, + 38558: 28288, + 38559: 28459, + 38560: 34067, + 38561: 21619, + 38562: 26410, + 38563: 39749, + 38564: 24051, + 38565: 31637, + 38566: 23724, + 38567: 23494, + 38568: 34588, + 38569: 28234, + 38570: 34001, + 38571: 31252, + 38572: 33032, + 38573: 22937, + 38574: 31885, + 38575: 27665, + 38576: 30496, + 38577: 21209, + 38578: 22818, + 38579: 28961, + 38580: 29279, + 38581: 30683, + 38582: 38695, + 38583: 40289, + 38584: 26891, + 38585: 23167, + 38586: 23064, + 38587: 20901, + 38588: 21517, + 38589: 21629, + 38590: 26126, + 38591: 30431, + 38592: 36855, + 38593: 37528, + 38594: 40180, + 38595: 23018, + 38596: 29277, + 38597: 28357, + 38598: 20813, + 38599: 26825, + 38600: 32191, + 38601: 32236, + 38602: 38754, + 38603: 40634, + 38604: 25720, + 38605: 27169, + 38606: 33538, + 38607: 22916, + 38608: 23391, + 38609: 27611, + 38610: 29467, + 38611: 30450, + 38612: 32178, + 38613: 32791, + 38614: 33945, + 38615: 20786, + 38616: 26408, + 38617: 40665, + 38618: 30446, + 38619: 26466, + 38620: 21247, + 38621: 39173, + 38622: 23588, + 38623: 25147, + 38624: 31870, + 38625: 36016, + 38626: 21839, + 38627: 24758, + 38628: 32011, + 38629: 38272, + 38630: 21249, + 38631: 20063, + 38632: 20918, + 38633: 22812, + 38634: 29242, + 38635: 32822, + 38636: 37326, + 38637: 24357, + 38638: 30690, + 38639: 21380, + 38640: 24441, + 38641: 32004, + 38642: 34220, + 38643: 35379, + 38644: 36493, + 38645: 38742, + 38646: 26611, + 38647: 34222, + 38648: 37971, + 38649: 24841, + 38650: 24840, + 38651: 27833, + 38652: 30290, + 38720: 35565, + 38721: 36664, + 38722: 21807, + 38723: 20305, + 38724: 20778, + 38725: 21191, + 38726: 21451, + 38727: 23461, + 38728: 24189, + 38729: 24736, + 38730: 24962, + 38731: 25558, + 38732: 26377, + 38733: 26586, + 38734: 28263, + 38735: 28044, + 38736: 29494, + 38737: 29495, + 38738: 30001, + 38739: 31056, + 38740: 35029, + 38741: 35480, + 38742: 36938, + 38743: 37009, + 38744: 37109, + 38745: 38596, + 38746: 34701, + 38747: 22805, + 38748: 20104, + 38749: 20313, + 38750: 19982, + 38751: 35465, + 38752: 36671, + 38753: 38928, + 38754: 20653, + 38755: 24188, + 38756: 22934, + 38757: 23481, + 38758: 24248, + 38759: 25562, + 38760: 25594, + 38761: 25793, + 38762: 26332, + 38763: 26954, + 38764: 27096, + 38765: 27915, + 38766: 28342, + 38767: 29076, + 38768: 29992, + 38769: 31407, + 38770: 32650, + 38771: 32768, + 38772: 33865, + 38773: 33993, + 38774: 35201, + 38775: 35617, + 38776: 36362, + 38777: 36965, + 38778: 38525, + 38779: 39178, + 38780: 24958, + 38781: 25233, + 38782: 27442, + 38784: 27779, + 38785: 28020, + 38786: 32716, + 38787: 32764, + 38788: 28096, + 38789: 32645, + 38790: 34746, + 38791: 35064, + 38792: 26469, + 38793: 33713, + 38794: 38972, + 38795: 38647, + 38796: 27931, + 38797: 32097, + 38798: 33853, + 38799: 37226, + 38800: 20081, + 38801: 21365, + 38802: 23888, + 38803: 27396, + 38804: 28651, + 38805: 34253, + 38806: 34349, + 38807: 35239, + 38808: 21033, + 38809: 21519, + 38810: 23653, + 38811: 26446, + 38812: 26792, + 38813: 29702, + 38814: 29827, + 38815: 30178, + 38816: 35023, + 38817: 35041, + 38818: 37324, + 38819: 38626, + 38820: 38520, + 38821: 24459, + 38822: 29575, + 38823: 31435, + 38824: 33870, + 38825: 25504, + 38826: 30053, + 38827: 21129, + 38828: 27969, + 38829: 28316, + 38830: 29705, + 38831: 30041, + 38832: 30827, + 38833: 31890, + 38834: 38534, + 38835: 31452, + 38836: 40845, + 38837: 20406, + 38838: 24942, + 38839: 26053, + 38840: 34396, + 38841: 20102, + 38842: 20142, + 38843: 20698, + 38844: 20001, + 38845: 20940, + 38846: 23534, + 38847: 26009, + 38848: 26753, + 38849: 28092, + 38850: 29471, + 38851: 30274, + 38852: 30637, + 38853: 31260, + 38854: 31975, + 38855: 33391, + 38856: 35538, + 38857: 36988, + 38858: 37327, + 38859: 38517, + 38860: 38936, + 38861: 21147, + 38862: 32209, + 38863: 20523, + 38864: 21400, + 38865: 26519, + 38866: 28107, + 38867: 29136, + 38868: 29747, + 38869: 33256, + 38870: 36650, + 38871: 38563, + 38872: 40023, + 38873: 40607, + 38874: 29792, + 38875: 22593, + 38876: 28057, + 38877: 32047, + 38878: 39006, + 38879: 20196, + 38880: 20278, + 38881: 20363, + 38882: 20919, + 38883: 21169, + 38884: 23994, + 38885: 24604, + 38886: 29618, + 38887: 31036, + 38888: 33491, + 38889: 37428, + 38890: 38583, + 38891: 38646, + 38892: 38666, + 38893: 40599, + 38894: 40802, + 38895: 26278, + 38896: 27508, + 38897: 21015, + 38898: 21155, + 38899: 28872, + 38900: 35010, + 38901: 24265, + 38902: 24651, + 38903: 24976, + 38904: 28451, + 38905: 29001, + 38906: 31806, + 38907: 32244, + 38908: 32879, + 38976: 34030, + 38977: 36899, + 38978: 37676, + 38979: 21570, + 38980: 39791, + 38981: 27347, + 38982: 28809, + 38983: 36034, + 38984: 36335, + 38985: 38706, + 38986: 21172, + 38987: 23105, + 38988: 24266, + 38989: 24324, + 38990: 26391, + 38991: 27004, + 38992: 27028, + 38993: 28010, + 38994: 28431, + 38995: 29282, + 38996: 29436, + 38997: 31725, + 38998: 32769, + 38999: 32894, + 39e3: 34635, + 39001: 37070, + 39002: 20845, + 39003: 40595, + 39004: 31108, + 39005: 32907, + 39006: 37682, + 39007: 35542, + 39008: 20525, + 39009: 21644, + 39010: 35441, + 39011: 27498, + 39012: 36036, + 39013: 33031, + 39014: 24785, + 39015: 26528, + 39016: 40434, + 39017: 20121, + 39018: 20120, + 39019: 39952, + 39020: 35435, + 39021: 34241, + 39022: 34152, + 39023: 26880, + 39024: 28286, + 39025: 30871, + 39026: 33109, + 39071: 24332, + 39072: 19984, + 39073: 19989, + 39074: 20010, + 39075: 20017, + 39076: 20022, + 39077: 20028, + 39078: 20031, + 39079: 20034, + 39080: 20054, + 39081: 20056, + 39082: 20098, + 39083: 20101, + 39084: 35947, + 39085: 20106, + 39086: 33298, + 39087: 24333, + 39088: 20110, + 39089: 20126, + 39090: 20127, + 39091: 20128, + 39092: 20130, + 39093: 20144, + 39094: 20147, + 39095: 20150, + 39096: 20174, + 39097: 20173, + 39098: 20164, + 39099: 20166, + 39100: 20162, + 39101: 20183, + 39102: 20190, + 39103: 20205, + 39104: 20191, + 39105: 20215, + 39106: 20233, + 39107: 20314, + 39108: 20272, + 39109: 20315, + 39110: 20317, + 39111: 20311, + 39112: 20295, + 39113: 20342, + 39114: 20360, + 39115: 20367, + 39116: 20376, + 39117: 20347, + 39118: 20329, + 39119: 20336, + 39120: 20369, + 39121: 20335, + 39122: 20358, + 39123: 20374, + 39124: 20760, + 39125: 20436, + 39126: 20447, + 39127: 20430, + 39128: 20440, + 39129: 20443, + 39130: 20433, + 39131: 20442, + 39132: 20432, + 39133: 20452, + 39134: 20453, + 39135: 20506, + 39136: 20520, + 39137: 20500, + 39138: 20522, + 39139: 20517, + 39140: 20485, + 39141: 20252, + 39142: 20470, + 39143: 20513, + 39144: 20521, + 39145: 20524, + 39146: 20478, + 39147: 20463, + 39148: 20497, + 39149: 20486, + 39150: 20547, + 39151: 20551, + 39152: 26371, + 39153: 20565, + 39154: 20560, + 39155: 20552, + 39156: 20570, + 39157: 20566, + 39158: 20588, + 39159: 20600, + 39160: 20608, + 39161: 20634, + 39162: 20613, + 39163: 20660, + 39164: 20658, + 39232: 20681, + 39233: 20682, + 39234: 20659, + 39235: 20674, + 39236: 20694, + 39237: 20702, + 39238: 20709, + 39239: 20717, + 39240: 20707, + 39241: 20718, + 39242: 20729, + 39243: 20725, + 39244: 20745, + 39245: 20737, + 39246: 20738, + 39247: 20758, + 39248: 20757, + 39249: 20756, + 39250: 20762, + 39251: 20769, + 39252: 20794, + 39253: 20791, + 39254: 20796, + 39255: 20795, + 39256: 20799, + 39257: 20800, + 39258: 20818, + 39259: 20812, + 39260: 20820, + 39261: 20834, + 39262: 31480, + 39263: 20841, + 39264: 20842, + 39265: 20846, + 39266: 20864, + 39267: 20866, + 39268: 22232, + 39269: 20876, + 39270: 20873, + 39271: 20879, + 39272: 20881, + 39273: 20883, + 39274: 20885, + 39275: 20886, + 39276: 20900, + 39277: 20902, + 39278: 20898, + 39279: 20905, + 39280: 20906, + 39281: 20907, + 39282: 20915, + 39283: 20913, + 39284: 20914, + 39285: 20912, + 39286: 20917, + 39287: 20925, + 39288: 20933, + 39289: 20937, + 39290: 20955, + 39291: 20960, + 39292: 34389, + 39293: 20969, + 39294: 20973, + 39296: 20976, + 39297: 20981, + 39298: 20990, + 39299: 20996, + 39300: 21003, + 39301: 21012, + 39302: 21006, + 39303: 21031, + 39304: 21034, + 39305: 21038, + 39306: 21043, + 39307: 21049, + 39308: 21071, + 39309: 21060, + 39310: 21067, + 39311: 21068, + 39312: 21086, + 39313: 21076, + 39314: 21098, + 39315: 21108, + 39316: 21097, + 39317: 21107, + 39318: 21119, + 39319: 21117, + 39320: 21133, + 39321: 21140, + 39322: 21138, + 39323: 21105, + 39324: 21128, + 39325: 21137, + 39326: 36776, + 39327: 36775, + 39328: 21164, + 39329: 21165, + 39330: 21180, + 39331: 21173, + 39332: 21185, + 39333: 21197, + 39334: 21207, + 39335: 21214, + 39336: 21219, + 39337: 21222, + 39338: 39149, + 39339: 21216, + 39340: 21235, + 39341: 21237, + 39342: 21240, + 39343: 21241, + 39344: 21254, + 39345: 21256, + 39346: 30008, + 39347: 21261, + 39348: 21264, + 39349: 21263, + 39350: 21269, + 39351: 21274, + 39352: 21283, + 39353: 21295, + 39354: 21297, + 39355: 21299, + 39356: 21304, + 39357: 21312, + 39358: 21318, + 39359: 21317, + 39360: 19991, + 39361: 21321, + 39362: 21325, + 39363: 20950, + 39364: 21342, + 39365: 21353, + 39366: 21358, + 39367: 22808, + 39368: 21371, + 39369: 21367, + 39370: 21378, + 39371: 21398, + 39372: 21408, + 39373: 21414, + 39374: 21413, + 39375: 21422, + 39376: 21424, + 39377: 21430, + 39378: 21443, + 39379: 31762, + 39380: 38617, + 39381: 21471, + 39382: 26364, + 39383: 29166, + 39384: 21486, + 39385: 21480, + 39386: 21485, + 39387: 21498, + 39388: 21505, + 39389: 21565, + 39390: 21568, + 39391: 21548, + 39392: 21549, + 39393: 21564, + 39394: 21550, + 39395: 21558, + 39396: 21545, + 39397: 21533, + 39398: 21582, + 39399: 21647, + 39400: 21621, + 39401: 21646, + 39402: 21599, + 39403: 21617, + 39404: 21623, + 39405: 21616, + 39406: 21650, + 39407: 21627, + 39408: 21632, + 39409: 21622, + 39410: 21636, + 39411: 21648, + 39412: 21638, + 39413: 21703, + 39414: 21666, + 39415: 21688, + 39416: 21669, + 39417: 21676, + 39418: 21700, + 39419: 21704, + 39420: 21672, + 39488: 21675, + 39489: 21698, + 39490: 21668, + 39491: 21694, + 39492: 21692, + 39493: 21720, + 39494: 21733, + 39495: 21734, + 39496: 21775, + 39497: 21780, + 39498: 21757, + 39499: 21742, + 39500: 21741, + 39501: 21754, + 39502: 21730, + 39503: 21817, + 39504: 21824, + 39505: 21859, + 39506: 21836, + 39507: 21806, + 39508: 21852, + 39509: 21829, + 39510: 21846, + 39511: 21847, + 39512: 21816, + 39513: 21811, + 39514: 21853, + 39515: 21913, + 39516: 21888, + 39517: 21679, + 39518: 21898, + 39519: 21919, + 39520: 21883, + 39521: 21886, + 39522: 21912, + 39523: 21918, + 39524: 21934, + 39525: 21884, + 39526: 21891, + 39527: 21929, + 39528: 21895, + 39529: 21928, + 39530: 21978, + 39531: 21957, + 39532: 21983, + 39533: 21956, + 39534: 21980, + 39535: 21988, + 39536: 21972, + 39537: 22036, + 39538: 22007, + 39539: 22038, + 39540: 22014, + 39541: 22013, + 39542: 22043, + 39543: 22009, + 39544: 22094, + 39545: 22096, + 39546: 29151, + 39547: 22068, + 39548: 22070, + 39549: 22066, + 39550: 22072, + 39552: 22123, + 39553: 22116, + 39554: 22063, + 39555: 22124, + 39556: 22122, + 39557: 22150, + 39558: 22144, + 39559: 22154, + 39560: 22176, + 39561: 22164, + 39562: 22159, + 39563: 22181, + 39564: 22190, + 39565: 22198, + 39566: 22196, + 39567: 22210, + 39568: 22204, + 39569: 22209, + 39570: 22211, + 39571: 22208, + 39572: 22216, + 39573: 22222, + 39574: 22225, + 39575: 22227, + 39576: 22231, + 39577: 22254, + 39578: 22265, + 39579: 22272, + 39580: 22271, + 39581: 22276, + 39582: 22281, + 39583: 22280, + 39584: 22283, + 39585: 22285, + 39586: 22291, + 39587: 22296, + 39588: 22294, + 39589: 21959, + 39590: 22300, + 39591: 22310, + 39592: 22327, + 39593: 22328, + 39594: 22350, + 39595: 22331, + 39596: 22336, + 39597: 22351, + 39598: 22377, + 39599: 22464, + 39600: 22408, + 39601: 22369, + 39602: 22399, + 39603: 22409, + 39604: 22419, + 39605: 22432, + 39606: 22451, + 39607: 22436, + 39608: 22442, + 39609: 22448, + 39610: 22467, + 39611: 22470, + 39612: 22484, + 39613: 22482, + 39614: 22483, + 39615: 22538, + 39616: 22486, + 39617: 22499, + 39618: 22539, + 39619: 22553, + 39620: 22557, + 39621: 22642, + 39622: 22561, + 39623: 22626, + 39624: 22603, + 39625: 22640, + 39626: 27584, + 39627: 22610, + 39628: 22589, + 39629: 22649, + 39630: 22661, + 39631: 22713, + 39632: 22687, + 39633: 22699, + 39634: 22714, + 39635: 22750, + 39636: 22715, + 39637: 22712, + 39638: 22702, + 39639: 22725, + 39640: 22739, + 39641: 22737, + 39642: 22743, + 39643: 22745, + 39644: 22744, + 39645: 22757, + 39646: 22748, + 39647: 22756, + 39648: 22751, + 39649: 22767, + 39650: 22778, + 39651: 22777, + 39652: 22779, + 39653: 22780, + 39654: 22781, + 39655: 22786, + 39656: 22794, + 39657: 22800, + 39658: 22811, + 39659: 26790, + 39660: 22821, + 39661: 22828, + 39662: 22829, + 39663: 22834, + 39664: 22840, + 39665: 22846, + 39666: 31442, + 39667: 22869, + 39668: 22864, + 39669: 22862, + 39670: 22874, + 39671: 22872, + 39672: 22882, + 39673: 22880, + 39674: 22887, + 39675: 22892, + 39676: 22889, + 39744: 22904, + 39745: 22913, + 39746: 22941, + 39747: 20318, + 39748: 20395, + 39749: 22947, + 39750: 22962, + 39751: 22982, + 39752: 23016, + 39753: 23004, + 39754: 22925, + 39755: 23001, + 39756: 23002, + 39757: 23077, + 39758: 23071, + 39759: 23057, + 39760: 23068, + 39761: 23049, + 39762: 23066, + 39763: 23104, + 39764: 23148, + 39765: 23113, + 39766: 23093, + 39767: 23094, + 39768: 23138, + 39769: 23146, + 39770: 23194, + 39771: 23228, + 39772: 23230, + 39773: 23243, + 39774: 23234, + 39775: 23229, + 39776: 23267, + 39777: 23255, + 39778: 23270, + 39779: 23273, + 39780: 23254, + 39781: 23290, + 39782: 23291, + 39783: 23308, + 39784: 23307, + 39785: 23318, + 39786: 23346, + 39787: 23248, + 39788: 23338, + 39789: 23350, + 39790: 23358, + 39791: 23363, + 39792: 23365, + 39793: 23360, + 39794: 23377, + 39795: 23381, + 39796: 23386, + 39797: 23387, + 39798: 23397, + 39799: 23401, + 39800: 23408, + 39801: 23411, + 39802: 23413, + 39803: 23416, + 39804: 25992, + 39805: 23418, + 39806: 23424, + 39808: 23427, + 39809: 23462, + 39810: 23480, + 39811: 23491, + 39812: 23495, + 39813: 23497, + 39814: 23508, + 39815: 23504, + 39816: 23524, + 39817: 23526, + 39818: 23522, + 39819: 23518, + 39820: 23525, + 39821: 23531, + 39822: 23536, + 39823: 23542, + 39824: 23539, + 39825: 23557, + 39826: 23559, + 39827: 23560, + 39828: 23565, + 39829: 23571, + 39830: 23584, + 39831: 23586, + 39832: 23592, + 39833: 23608, + 39834: 23609, + 39835: 23617, + 39836: 23622, + 39837: 23630, + 39838: 23635, + 39839: 23632, + 39840: 23631, + 39841: 23409, + 39842: 23660, + 39843: 23662, + 39844: 20066, + 39845: 23670, + 39846: 23673, + 39847: 23692, + 39848: 23697, + 39849: 23700, + 39850: 22939, + 39851: 23723, + 39852: 23739, + 39853: 23734, + 39854: 23740, + 39855: 23735, + 39856: 23749, + 39857: 23742, + 39858: 23751, + 39859: 23769, + 39860: 23785, + 39861: 23805, + 39862: 23802, + 39863: 23789, + 39864: 23948, + 39865: 23786, + 39866: 23819, + 39867: 23829, + 39868: 23831, + 39869: 23900, + 39870: 23839, + 39871: 23835, + 39872: 23825, + 39873: 23828, + 39874: 23842, + 39875: 23834, + 39876: 23833, + 39877: 23832, + 39878: 23884, + 39879: 23890, + 39880: 23886, + 39881: 23883, + 39882: 23916, + 39883: 23923, + 39884: 23926, + 39885: 23943, + 39886: 23940, + 39887: 23938, + 39888: 23970, + 39889: 23965, + 39890: 23980, + 39891: 23982, + 39892: 23997, + 39893: 23952, + 39894: 23991, + 39895: 23996, + 39896: 24009, + 39897: 24013, + 39898: 24019, + 39899: 24018, + 39900: 24022, + 39901: 24027, + 39902: 24043, + 39903: 24050, + 39904: 24053, + 39905: 24075, + 39906: 24090, + 39907: 24089, + 39908: 24081, + 39909: 24091, + 39910: 24118, + 39911: 24119, + 39912: 24132, + 39913: 24131, + 39914: 24128, + 39915: 24142, + 39916: 24151, + 39917: 24148, + 39918: 24159, + 39919: 24162, + 39920: 24164, + 39921: 24135, + 39922: 24181, + 39923: 24182, + 39924: 24186, + 39925: 40636, + 39926: 24191, + 39927: 24224, + 39928: 24257, + 39929: 24258, + 39930: 24264, + 39931: 24272, + 39932: 24271, + 4e4: 24278, + 40001: 24291, + 40002: 24285, + 40003: 24282, + 40004: 24283, + 40005: 24290, + 40006: 24289, + 40007: 24296, + 40008: 24297, + 40009: 24300, + 40010: 24305, + 40011: 24307, + 40012: 24304, + 40013: 24308, + 40014: 24312, + 40015: 24318, + 40016: 24323, + 40017: 24329, + 40018: 24413, + 40019: 24412, + 40020: 24331, + 40021: 24337, + 40022: 24342, + 40023: 24361, + 40024: 24365, + 40025: 24376, + 40026: 24385, + 40027: 24392, + 40028: 24396, + 40029: 24398, + 40030: 24367, + 40031: 24401, + 40032: 24406, + 40033: 24407, + 40034: 24409, + 40035: 24417, + 40036: 24429, + 40037: 24435, + 40038: 24439, + 40039: 24451, + 40040: 24450, + 40041: 24447, + 40042: 24458, + 40043: 24456, + 40044: 24465, + 40045: 24455, + 40046: 24478, + 40047: 24473, + 40048: 24472, + 40049: 24480, + 40050: 24488, + 40051: 24493, + 40052: 24508, + 40053: 24534, + 40054: 24571, + 40055: 24548, + 40056: 24568, + 40057: 24561, + 40058: 24541, + 40059: 24755, + 40060: 24575, + 40061: 24609, + 40062: 24672, + 40064: 24601, + 40065: 24592, + 40066: 24617, + 40067: 24590, + 40068: 24625, + 40069: 24603, + 40070: 24597, + 40071: 24619, + 40072: 24614, + 40073: 24591, + 40074: 24634, + 40075: 24666, + 40076: 24641, + 40077: 24682, + 40078: 24695, + 40079: 24671, + 40080: 24650, + 40081: 24646, + 40082: 24653, + 40083: 24675, + 40084: 24643, + 40085: 24676, + 40086: 24642, + 40087: 24684, + 40088: 24683, + 40089: 24665, + 40090: 24705, + 40091: 24717, + 40092: 24807, + 40093: 24707, + 40094: 24730, + 40095: 24708, + 40096: 24731, + 40097: 24726, + 40098: 24727, + 40099: 24722, + 40100: 24743, + 40101: 24715, + 40102: 24801, + 40103: 24760, + 40104: 24800, + 40105: 24787, + 40106: 24756, + 40107: 24560, + 40108: 24765, + 40109: 24774, + 40110: 24757, + 40111: 24792, + 40112: 24909, + 40113: 24853, + 40114: 24838, + 40115: 24822, + 40116: 24823, + 40117: 24832, + 40118: 24820, + 40119: 24826, + 40120: 24835, + 40121: 24865, + 40122: 24827, + 40123: 24817, + 40124: 24845, + 40125: 24846, + 40126: 24903, + 40127: 24894, + 40128: 24872, + 40129: 24871, + 40130: 24906, + 40131: 24895, + 40132: 24892, + 40133: 24876, + 40134: 24884, + 40135: 24893, + 40136: 24898, + 40137: 24900, + 40138: 24947, + 40139: 24951, + 40140: 24920, + 40141: 24921, + 40142: 24922, + 40143: 24939, + 40144: 24948, + 40145: 24943, + 40146: 24933, + 40147: 24945, + 40148: 24927, + 40149: 24925, + 40150: 24915, + 40151: 24949, + 40152: 24985, + 40153: 24982, + 40154: 24967, + 40155: 25004, + 40156: 24980, + 40157: 24986, + 40158: 24970, + 40159: 24977, + 40160: 25003, + 40161: 25006, + 40162: 25036, + 40163: 25034, + 40164: 25033, + 40165: 25079, + 40166: 25032, + 40167: 25027, + 40168: 25030, + 40169: 25018, + 40170: 25035, + 40171: 32633, + 40172: 25037, + 40173: 25062, + 40174: 25059, + 40175: 25078, + 40176: 25082, + 40177: 25076, + 40178: 25087, + 40179: 25085, + 40180: 25084, + 40181: 25086, + 40182: 25088, + 40183: 25096, + 40184: 25097, + 40185: 25101, + 40186: 25100, + 40187: 25108, + 40188: 25115, + 40256: 25118, + 40257: 25121, + 40258: 25130, + 40259: 25134, + 40260: 25136, + 40261: 25138, + 40262: 25139, + 40263: 25153, + 40264: 25166, + 40265: 25182, + 40266: 25187, + 40267: 25179, + 40268: 25184, + 40269: 25192, + 40270: 25212, + 40271: 25218, + 40272: 25225, + 40273: 25214, + 40274: 25234, + 40275: 25235, + 40276: 25238, + 40277: 25300, + 40278: 25219, + 40279: 25236, + 40280: 25303, + 40281: 25297, + 40282: 25275, + 40283: 25295, + 40284: 25343, + 40285: 25286, + 40286: 25812, + 40287: 25288, + 40288: 25308, + 40289: 25292, + 40290: 25290, + 40291: 25282, + 40292: 25287, + 40293: 25243, + 40294: 25289, + 40295: 25356, + 40296: 25326, + 40297: 25329, + 40298: 25383, + 40299: 25346, + 40300: 25352, + 40301: 25327, + 40302: 25333, + 40303: 25424, + 40304: 25406, + 40305: 25421, + 40306: 25628, + 40307: 25423, + 40308: 25494, + 40309: 25486, + 40310: 25472, + 40311: 25515, + 40312: 25462, + 40313: 25507, + 40314: 25487, + 40315: 25481, + 40316: 25503, + 40317: 25525, + 40318: 25451, + 40320: 25449, + 40321: 25534, + 40322: 25577, + 40323: 25536, + 40324: 25542, + 40325: 25571, + 40326: 25545, + 40327: 25554, + 40328: 25590, + 40329: 25540, + 40330: 25622, + 40331: 25652, + 40332: 25606, + 40333: 25619, + 40334: 25638, + 40335: 25654, + 40336: 25885, + 40337: 25623, + 40338: 25640, + 40339: 25615, + 40340: 25703, + 40341: 25711, + 40342: 25718, + 40343: 25678, + 40344: 25898, + 40345: 25749, + 40346: 25747, + 40347: 25765, + 40348: 25769, + 40349: 25736, + 40350: 25788, + 40351: 25818, + 40352: 25810, + 40353: 25797, + 40354: 25799, + 40355: 25787, + 40356: 25816, + 40357: 25794, + 40358: 25841, + 40359: 25831, + 40360: 33289, + 40361: 25824, + 40362: 25825, + 40363: 25260, + 40364: 25827, + 40365: 25839, + 40366: 25900, + 40367: 25846, + 40368: 25844, + 40369: 25842, + 40370: 25850, + 40371: 25856, + 40372: 25853, + 40373: 25880, + 40374: 25884, + 40375: 25861, + 40376: 25892, + 40377: 25891, + 40378: 25899, + 40379: 25908, + 40380: 25909, + 40381: 25911, + 40382: 25910, + 40383: 25912, + 40384: 30027, + 40385: 25928, + 40386: 25942, + 40387: 25941, + 40388: 25933, + 40389: 25944, + 40390: 25950, + 40391: 25949, + 40392: 25970, + 40393: 25976, + 40394: 25986, + 40395: 25987, + 40396: 35722, + 40397: 26011, + 40398: 26015, + 40399: 26027, + 40400: 26039, + 40401: 26051, + 40402: 26054, + 40403: 26049, + 40404: 26052, + 40405: 26060, + 40406: 26066, + 40407: 26075, + 40408: 26073, + 40409: 26080, + 40410: 26081, + 40411: 26097, + 40412: 26482, + 40413: 26122, + 40414: 26115, + 40415: 26107, + 40416: 26483, + 40417: 26165, + 40418: 26166, + 40419: 26164, + 40420: 26140, + 40421: 26191, + 40422: 26180, + 40423: 26185, + 40424: 26177, + 40425: 26206, + 40426: 26205, + 40427: 26212, + 40428: 26215, + 40429: 26216, + 40430: 26207, + 40431: 26210, + 40432: 26224, + 40433: 26243, + 40434: 26248, + 40435: 26254, + 40436: 26249, + 40437: 26244, + 40438: 26264, + 40439: 26269, + 40440: 26305, + 40441: 26297, + 40442: 26313, + 40443: 26302, + 40444: 26300, + 40512: 26308, + 40513: 26296, + 40514: 26326, + 40515: 26330, + 40516: 26336, + 40517: 26175, + 40518: 26342, + 40519: 26345, + 40520: 26352, + 40521: 26357, + 40522: 26359, + 40523: 26383, + 40524: 26390, + 40525: 26398, + 40526: 26406, + 40527: 26407, + 40528: 38712, + 40529: 26414, + 40530: 26431, + 40531: 26422, + 40532: 26433, + 40533: 26424, + 40534: 26423, + 40535: 26438, + 40536: 26462, + 40537: 26464, + 40538: 26457, + 40539: 26467, + 40540: 26468, + 40541: 26505, + 40542: 26480, + 40543: 26537, + 40544: 26492, + 40545: 26474, + 40546: 26508, + 40547: 26507, + 40548: 26534, + 40549: 26529, + 40550: 26501, + 40551: 26551, + 40552: 26607, + 40553: 26548, + 40554: 26604, + 40555: 26547, + 40556: 26601, + 40557: 26552, + 40558: 26596, + 40559: 26590, + 40560: 26589, + 40561: 26594, + 40562: 26606, + 40563: 26553, + 40564: 26574, + 40565: 26566, + 40566: 26599, + 40567: 27292, + 40568: 26654, + 40569: 26694, + 40570: 26665, + 40571: 26688, + 40572: 26701, + 40573: 26674, + 40574: 26702, + 40576: 26803, + 40577: 26667, + 40578: 26713, + 40579: 26723, + 40580: 26743, + 40581: 26751, + 40582: 26783, + 40583: 26767, + 40584: 26797, + 40585: 26772, + 40586: 26781, + 40587: 26779, + 40588: 26755, + 40589: 27310, + 40590: 26809, + 40591: 26740, + 40592: 26805, + 40593: 26784, + 40594: 26810, + 40595: 26895, + 40596: 26765, + 40597: 26750, + 40598: 26881, + 40599: 26826, + 40600: 26888, + 40601: 26840, + 40602: 26914, + 40603: 26918, + 40604: 26849, + 40605: 26892, + 40606: 26829, + 40607: 26836, + 40608: 26855, + 40609: 26837, + 40610: 26934, + 40611: 26898, + 40612: 26884, + 40613: 26839, + 40614: 26851, + 40615: 26917, + 40616: 26873, + 40617: 26848, + 40618: 26863, + 40619: 26920, + 40620: 26922, + 40621: 26906, + 40622: 26915, + 40623: 26913, + 40624: 26822, + 40625: 27001, + 40626: 26999, + 40627: 26972, + 40628: 27e3, + 40629: 26987, + 40630: 26964, + 40631: 27006, + 40632: 26990, + 40633: 26937, + 40634: 26996, + 40635: 26941, + 40636: 26969, + 40637: 26928, + 40638: 26977, + 40639: 26974, + 40640: 26973, + 40641: 27009, + 40642: 26986, + 40643: 27058, + 40644: 27054, + 40645: 27088, + 40646: 27071, + 40647: 27073, + 40648: 27091, + 40649: 27070, + 40650: 27086, + 40651: 23528, + 40652: 27082, + 40653: 27101, + 40654: 27067, + 40655: 27075, + 40656: 27047, + 40657: 27182, + 40658: 27025, + 40659: 27040, + 40660: 27036, + 40661: 27029, + 40662: 27060, + 40663: 27102, + 40664: 27112, + 40665: 27138, + 40666: 27163, + 40667: 27135, + 40668: 27402, + 40669: 27129, + 40670: 27122, + 40671: 27111, + 40672: 27141, + 40673: 27057, + 40674: 27166, + 40675: 27117, + 40676: 27156, + 40677: 27115, + 40678: 27146, + 40679: 27154, + 40680: 27329, + 40681: 27171, + 40682: 27155, + 40683: 27204, + 40684: 27148, + 40685: 27250, + 40686: 27190, + 40687: 27256, + 40688: 27207, + 40689: 27234, + 40690: 27225, + 40691: 27238, + 40692: 27208, + 40693: 27192, + 40694: 27170, + 40695: 27280, + 40696: 27277, + 40697: 27296, + 40698: 27268, + 40699: 27298, + 40700: 27299, + 40768: 27287, + 40769: 34327, + 40770: 27323, + 40771: 27331, + 40772: 27330, + 40773: 27320, + 40774: 27315, + 40775: 27308, + 40776: 27358, + 40777: 27345, + 40778: 27359, + 40779: 27306, + 40780: 27354, + 40781: 27370, + 40782: 27387, + 40783: 27397, + 40784: 34326, + 40785: 27386, + 40786: 27410, + 40787: 27414, + 40788: 39729, + 40789: 27423, + 40790: 27448, + 40791: 27447, + 40792: 30428, + 40793: 27449, + 40794: 39150, + 40795: 27463, + 40796: 27459, + 40797: 27465, + 40798: 27472, + 40799: 27481, + 40800: 27476, + 40801: 27483, + 40802: 27487, + 40803: 27489, + 40804: 27512, + 40805: 27513, + 40806: 27519, + 40807: 27520, + 40808: 27524, + 40809: 27523, + 40810: 27533, + 40811: 27544, + 40812: 27541, + 40813: 27550, + 40814: 27556, + 40815: 27562, + 40816: 27563, + 40817: 27567, + 40818: 27570, + 40819: 27569, + 40820: 27571, + 40821: 27575, + 40822: 27580, + 40823: 27590, + 40824: 27595, + 40825: 27603, + 40826: 27615, + 40827: 27628, + 40828: 27627, + 40829: 27635, + 40830: 27631, + 40832: 40638, + 40833: 27656, + 40834: 27667, + 40835: 27668, + 40836: 27675, + 40837: 27684, + 40838: 27683, + 40839: 27742, + 40840: 27733, + 40841: 27746, + 40842: 27754, + 40843: 27778, + 40844: 27789, + 40845: 27802, + 40846: 27777, + 40847: 27803, + 40848: 27774, + 40849: 27752, + 40850: 27763, + 40851: 27794, + 40852: 27792, + 40853: 27844, + 40854: 27889, + 40855: 27859, + 40856: 27837, + 40857: 27863, + 40858: 27845, + 40859: 27869, + 40860: 27822, + 40861: 27825, + 40862: 27838, + 40863: 27834, + 40864: 27867, + 40865: 27887, + 40866: 27865, + 40867: 27882, + 40868: 27935, + 40869: 34893, + 40870: 27958, + 40871: 27947, + 40872: 27965, + 40873: 27960, + 40874: 27929, + 40875: 27957, + 40876: 27955, + 40877: 27922, + 40878: 27916, + 40879: 28003, + 40880: 28051, + 40881: 28004, + 40882: 27994, + 40883: 28025, + 40884: 27993, + 40885: 28046, + 40886: 28053, + 40887: 28644, + 40888: 28037, + 40889: 28153, + 40890: 28181, + 40891: 28170, + 40892: 28085, + 40893: 28103, + 40894: 28134, + 40895: 28088, + 40896: 28102, + 40897: 28140, + 40898: 28126, + 40899: 28108, + 40900: 28136, + 40901: 28114, + 40902: 28101, + 40903: 28154, + 40904: 28121, + 40905: 28132, + 40906: 28117, + 40907: 28138, + 40908: 28142, + 40909: 28205, + 40910: 28270, + 40911: 28206, + 40912: 28185, + 40913: 28274, + 40914: 28255, + 40915: 28222, + 40916: 28195, + 40917: 28267, + 40918: 28203, + 40919: 28278, + 40920: 28237, + 40921: 28191, + 40922: 28227, + 40923: 28218, + 40924: 28238, + 40925: 28196, + 40926: 28415, + 40927: 28189, + 40928: 28216, + 40929: 28290, + 40930: 28330, + 40931: 28312, + 40932: 28361, + 40933: 28343, + 40934: 28371, + 40935: 28349, + 40936: 28335, + 40937: 28356, + 40938: 28338, + 40939: 28372, + 40940: 28373, + 40941: 28303, + 40942: 28325, + 40943: 28354, + 40944: 28319, + 40945: 28481, + 40946: 28433, + 40947: 28748, + 40948: 28396, + 40949: 28408, + 40950: 28414, + 40951: 28479, + 40952: 28402, + 40953: 28465, + 40954: 28399, + 40955: 28466, + 40956: 28364, + 57408: 28478, + 57409: 28435, + 57410: 28407, + 57411: 28550, + 57412: 28538, + 57413: 28536, + 57414: 28545, + 57415: 28544, + 57416: 28527, + 57417: 28507, + 57418: 28659, + 57419: 28525, + 57420: 28546, + 57421: 28540, + 57422: 28504, + 57423: 28558, + 57424: 28561, + 57425: 28610, + 57426: 28518, + 57427: 28595, + 57428: 28579, + 57429: 28577, + 57430: 28580, + 57431: 28601, + 57432: 28614, + 57433: 28586, + 57434: 28639, + 57435: 28629, + 57436: 28652, + 57437: 28628, + 57438: 28632, + 57439: 28657, + 57440: 28654, + 57441: 28635, + 57442: 28681, + 57443: 28683, + 57444: 28666, + 57445: 28689, + 57446: 28673, + 57447: 28687, + 57448: 28670, + 57449: 28699, + 57450: 28698, + 57451: 28532, + 57452: 28701, + 57453: 28696, + 57454: 28703, + 57455: 28720, + 57456: 28734, + 57457: 28722, + 57458: 28753, + 57459: 28771, + 57460: 28825, + 57461: 28818, + 57462: 28847, + 57463: 28913, + 57464: 28844, + 57465: 28856, + 57466: 28851, + 57467: 28846, + 57468: 28895, + 57469: 28875, + 57470: 28893, + 57472: 28889, + 57473: 28937, + 57474: 28925, + 57475: 28956, + 57476: 28953, + 57477: 29029, + 57478: 29013, + 57479: 29064, + 57480: 29030, + 57481: 29026, + 57482: 29004, + 57483: 29014, + 57484: 29036, + 57485: 29071, + 57486: 29179, + 57487: 29060, + 57488: 29077, + 57489: 29096, + 57490: 29100, + 57491: 29143, + 57492: 29113, + 57493: 29118, + 57494: 29138, + 57495: 29129, + 57496: 29140, + 57497: 29134, + 57498: 29152, + 57499: 29164, + 57500: 29159, + 57501: 29173, + 57502: 29180, + 57503: 29177, + 57504: 29183, + 57505: 29197, + 57506: 29200, + 57507: 29211, + 57508: 29224, + 57509: 29229, + 57510: 29228, + 57511: 29232, + 57512: 29234, + 57513: 29243, + 57514: 29244, + 57515: 29247, + 57516: 29248, + 57517: 29254, + 57518: 29259, + 57519: 29272, + 57520: 29300, + 57521: 29310, + 57522: 29314, + 57523: 29313, + 57524: 29319, + 57525: 29330, + 57526: 29334, + 57527: 29346, + 57528: 29351, + 57529: 29369, + 57530: 29362, + 57531: 29379, + 57532: 29382, + 57533: 29380, + 57534: 29390, + 57535: 29394, + 57536: 29410, + 57537: 29408, + 57538: 29409, + 57539: 29433, + 57540: 29431, + 57541: 20495, + 57542: 29463, + 57543: 29450, + 57544: 29468, + 57545: 29462, + 57546: 29469, + 57547: 29492, + 57548: 29487, + 57549: 29481, + 57550: 29477, + 57551: 29502, + 57552: 29518, + 57553: 29519, + 57554: 40664, + 57555: 29527, + 57556: 29546, + 57557: 29544, + 57558: 29552, + 57559: 29560, + 57560: 29557, + 57561: 29563, + 57562: 29562, + 57563: 29640, + 57564: 29619, + 57565: 29646, + 57566: 29627, + 57567: 29632, + 57568: 29669, + 57569: 29678, + 57570: 29662, + 57571: 29858, + 57572: 29701, + 57573: 29807, + 57574: 29733, + 57575: 29688, + 57576: 29746, + 57577: 29754, + 57578: 29781, + 57579: 29759, + 57580: 29791, + 57581: 29785, + 57582: 29761, + 57583: 29788, + 57584: 29801, + 57585: 29808, + 57586: 29795, + 57587: 29802, + 57588: 29814, + 57589: 29822, + 57590: 29835, + 57591: 29854, + 57592: 29863, + 57593: 29898, + 57594: 29903, + 57595: 29908, + 57596: 29681, + 57664: 29920, + 57665: 29923, + 57666: 29927, + 57667: 29929, + 57668: 29934, + 57669: 29938, + 57670: 29936, + 57671: 29937, + 57672: 29944, + 57673: 29943, + 57674: 29956, + 57675: 29955, + 57676: 29957, + 57677: 29964, + 57678: 29966, + 57679: 29965, + 57680: 29973, + 57681: 29971, + 57682: 29982, + 57683: 29990, + 57684: 29996, + 57685: 30012, + 57686: 30020, + 57687: 30029, + 57688: 30026, + 57689: 30025, + 57690: 30043, + 57691: 30022, + 57692: 30042, + 57693: 30057, + 57694: 30052, + 57695: 30055, + 57696: 30059, + 57697: 30061, + 57698: 30072, + 57699: 30070, + 57700: 30086, + 57701: 30087, + 57702: 30068, + 57703: 30090, + 57704: 30089, + 57705: 30082, + 57706: 30100, + 57707: 30106, + 57708: 30109, + 57709: 30117, + 57710: 30115, + 57711: 30146, + 57712: 30131, + 57713: 30147, + 57714: 30133, + 57715: 30141, + 57716: 30136, + 57717: 30140, + 57718: 30129, + 57719: 30157, + 57720: 30154, + 57721: 30162, + 57722: 30169, + 57723: 30179, + 57724: 30174, + 57725: 30206, + 57726: 30207, + 57728: 30204, + 57729: 30209, + 57730: 30192, + 57731: 30202, + 57732: 30194, + 57733: 30195, + 57734: 30219, + 57735: 30221, + 57736: 30217, + 57737: 30239, + 57738: 30247, + 57739: 30240, + 57740: 30241, + 57741: 30242, + 57742: 30244, + 57743: 30260, + 57744: 30256, + 57745: 30267, + 57746: 30279, + 57747: 30280, + 57748: 30278, + 57749: 30300, + 57750: 30296, + 57751: 30305, + 57752: 30306, + 57753: 30312, + 57754: 30313, + 57755: 30314, + 57756: 30311, + 57757: 30316, + 57758: 30320, + 57759: 30322, + 57760: 30326, + 57761: 30328, + 57762: 30332, + 57763: 30336, + 57764: 30339, + 57765: 30344, + 57766: 30347, + 57767: 30350, + 57768: 30358, + 57769: 30355, + 57770: 30361, + 57771: 30362, + 57772: 30384, + 57773: 30388, + 57774: 30392, + 57775: 30393, + 57776: 30394, + 57777: 30402, + 57778: 30413, + 57779: 30422, + 57780: 30418, + 57781: 30430, + 57782: 30433, + 57783: 30437, + 57784: 30439, + 57785: 30442, + 57786: 34351, + 57787: 30459, + 57788: 30472, + 57789: 30471, + 57790: 30468, + 57791: 30505, + 57792: 30500, + 57793: 30494, + 57794: 30501, + 57795: 30502, + 57796: 30491, + 57797: 30519, + 57798: 30520, + 57799: 30535, + 57800: 30554, + 57801: 30568, + 57802: 30571, + 57803: 30555, + 57804: 30565, + 57805: 30591, + 57806: 30590, + 57807: 30585, + 57808: 30606, + 57809: 30603, + 57810: 30609, + 57811: 30624, + 57812: 30622, + 57813: 30640, + 57814: 30646, + 57815: 30649, + 57816: 30655, + 57817: 30652, + 57818: 30653, + 57819: 30651, + 57820: 30663, + 57821: 30669, + 57822: 30679, + 57823: 30682, + 57824: 30684, + 57825: 30691, + 57826: 30702, + 57827: 30716, + 57828: 30732, + 57829: 30738, + 57830: 31014, + 57831: 30752, + 57832: 31018, + 57833: 30789, + 57834: 30862, + 57835: 30836, + 57836: 30854, + 57837: 30844, + 57838: 30874, + 57839: 30860, + 57840: 30883, + 57841: 30901, + 57842: 30890, + 57843: 30895, + 57844: 30929, + 57845: 30918, + 57846: 30923, + 57847: 30932, + 57848: 30910, + 57849: 30908, + 57850: 30917, + 57851: 30922, + 57852: 30956, + 57920: 30951, + 57921: 30938, + 57922: 30973, + 57923: 30964, + 57924: 30983, + 57925: 30994, + 57926: 30993, + 57927: 31001, + 57928: 31020, + 57929: 31019, + 57930: 31040, + 57931: 31072, + 57932: 31063, + 57933: 31071, + 57934: 31066, + 57935: 31061, + 57936: 31059, + 57937: 31098, + 57938: 31103, + 57939: 31114, + 57940: 31133, + 57941: 31143, + 57942: 40779, + 57943: 31146, + 57944: 31150, + 57945: 31155, + 57946: 31161, + 57947: 31162, + 57948: 31177, + 57949: 31189, + 57950: 31207, + 57951: 31212, + 57952: 31201, + 57953: 31203, + 57954: 31240, + 57955: 31245, + 57956: 31256, + 57957: 31257, + 57958: 31264, + 57959: 31263, + 57960: 31104, + 57961: 31281, + 57962: 31291, + 57963: 31294, + 57964: 31287, + 57965: 31299, + 57966: 31319, + 57967: 31305, + 57968: 31329, + 57969: 31330, + 57970: 31337, + 57971: 40861, + 57972: 31344, + 57973: 31353, + 57974: 31357, + 57975: 31368, + 57976: 31383, + 57977: 31381, + 57978: 31384, + 57979: 31382, + 57980: 31401, + 57981: 31432, + 57982: 31408, + 57984: 31414, + 57985: 31429, + 57986: 31428, + 57987: 31423, + 57988: 36995, + 57989: 31431, + 57990: 31434, + 57991: 31437, + 57992: 31439, + 57993: 31445, + 57994: 31443, + 57995: 31449, + 57996: 31450, + 57997: 31453, + 57998: 31457, + 57999: 31458, + 58e3: 31462, + 58001: 31469, + 58002: 31472, + 58003: 31490, + 58004: 31503, + 58005: 31498, + 58006: 31494, + 58007: 31539, + 58008: 31512, + 58009: 31513, + 58010: 31518, + 58011: 31541, + 58012: 31528, + 58013: 31542, + 58014: 31568, + 58015: 31610, + 58016: 31492, + 58017: 31565, + 58018: 31499, + 58019: 31564, + 58020: 31557, + 58021: 31605, + 58022: 31589, + 58023: 31604, + 58024: 31591, + 58025: 31600, + 58026: 31601, + 58027: 31596, + 58028: 31598, + 58029: 31645, + 58030: 31640, + 58031: 31647, + 58032: 31629, + 58033: 31644, + 58034: 31642, + 58035: 31627, + 58036: 31634, + 58037: 31631, + 58038: 31581, + 58039: 31641, + 58040: 31691, + 58041: 31681, + 58042: 31692, + 58043: 31695, + 58044: 31668, + 58045: 31686, + 58046: 31709, + 58047: 31721, + 58048: 31761, + 58049: 31764, + 58050: 31718, + 58051: 31717, + 58052: 31840, + 58053: 31744, + 58054: 31751, + 58055: 31763, + 58056: 31731, + 58057: 31735, + 58058: 31767, + 58059: 31757, + 58060: 31734, + 58061: 31779, + 58062: 31783, + 58063: 31786, + 58064: 31775, + 58065: 31799, + 58066: 31787, + 58067: 31805, + 58068: 31820, + 58069: 31811, + 58070: 31828, + 58071: 31823, + 58072: 31808, + 58073: 31824, + 58074: 31832, + 58075: 31839, + 58076: 31844, + 58077: 31830, + 58078: 31845, + 58079: 31852, + 58080: 31861, + 58081: 31875, + 58082: 31888, + 58083: 31908, + 58084: 31917, + 58085: 31906, + 58086: 31915, + 58087: 31905, + 58088: 31912, + 58089: 31923, + 58090: 31922, + 58091: 31921, + 58092: 31918, + 58093: 31929, + 58094: 31933, + 58095: 31936, + 58096: 31941, + 58097: 31938, + 58098: 31960, + 58099: 31954, + 58100: 31964, + 58101: 31970, + 58102: 39739, + 58103: 31983, + 58104: 31986, + 58105: 31988, + 58106: 31990, + 58107: 31994, + 58108: 32006, + 58176: 32002, + 58177: 32028, + 58178: 32021, + 58179: 32010, + 58180: 32069, + 58181: 32075, + 58182: 32046, + 58183: 32050, + 58184: 32063, + 58185: 32053, + 58186: 32070, + 58187: 32115, + 58188: 32086, + 58189: 32078, + 58190: 32114, + 58191: 32104, + 58192: 32110, + 58193: 32079, + 58194: 32099, + 58195: 32147, + 58196: 32137, + 58197: 32091, + 58198: 32143, + 58199: 32125, + 58200: 32155, + 58201: 32186, + 58202: 32174, + 58203: 32163, + 58204: 32181, + 58205: 32199, + 58206: 32189, + 58207: 32171, + 58208: 32317, + 58209: 32162, + 58210: 32175, + 58211: 32220, + 58212: 32184, + 58213: 32159, + 58214: 32176, + 58215: 32216, + 58216: 32221, + 58217: 32228, + 58218: 32222, + 58219: 32251, + 58220: 32242, + 58221: 32225, + 58222: 32261, + 58223: 32266, + 58224: 32291, + 58225: 32289, + 58226: 32274, + 58227: 32305, + 58228: 32287, + 58229: 32265, + 58230: 32267, + 58231: 32290, + 58232: 32326, + 58233: 32358, + 58234: 32315, + 58235: 32309, + 58236: 32313, + 58237: 32323, + 58238: 32311, + 58240: 32306, + 58241: 32314, + 58242: 32359, + 58243: 32349, + 58244: 32342, + 58245: 32350, + 58246: 32345, + 58247: 32346, + 58248: 32377, + 58249: 32362, + 58250: 32361, + 58251: 32380, + 58252: 32379, + 58253: 32387, + 58254: 32213, + 58255: 32381, + 58256: 36782, + 58257: 32383, + 58258: 32392, + 58259: 32393, + 58260: 32396, + 58261: 32402, + 58262: 32400, + 58263: 32403, + 58264: 32404, + 58265: 32406, + 58266: 32398, + 58267: 32411, + 58268: 32412, + 58269: 32568, + 58270: 32570, + 58271: 32581, + 58272: 32588, + 58273: 32589, + 58274: 32590, + 58275: 32592, + 58276: 32593, + 58277: 32597, + 58278: 32596, + 58279: 32600, + 58280: 32607, + 58281: 32608, + 58282: 32616, + 58283: 32617, + 58284: 32615, + 58285: 32632, + 58286: 32642, + 58287: 32646, + 58288: 32643, + 58289: 32648, + 58290: 32647, + 58291: 32652, + 58292: 32660, + 58293: 32670, + 58294: 32669, + 58295: 32666, + 58296: 32675, + 58297: 32687, + 58298: 32690, + 58299: 32697, + 58300: 32686, + 58301: 32694, + 58302: 32696, + 58303: 35697, + 58304: 32709, + 58305: 32710, + 58306: 32714, + 58307: 32725, + 58308: 32724, + 58309: 32737, + 58310: 32742, + 58311: 32745, + 58312: 32755, + 58313: 32761, + 58314: 39132, + 58315: 32774, + 58316: 32772, + 58317: 32779, + 58318: 32786, + 58319: 32792, + 58320: 32793, + 58321: 32796, + 58322: 32801, + 58323: 32808, + 58324: 32831, + 58325: 32827, + 58326: 32842, + 58327: 32838, + 58328: 32850, + 58329: 32856, + 58330: 32858, + 58331: 32863, + 58332: 32866, + 58333: 32872, + 58334: 32883, + 58335: 32882, + 58336: 32880, + 58337: 32886, + 58338: 32889, + 58339: 32893, + 58340: 32895, + 58341: 32900, + 58342: 32902, + 58343: 32901, + 58344: 32923, + 58345: 32915, + 58346: 32922, + 58347: 32941, + 58348: 20880, + 58349: 32940, + 58350: 32987, + 58351: 32997, + 58352: 32985, + 58353: 32989, + 58354: 32964, + 58355: 32986, + 58356: 32982, + 58357: 33033, + 58358: 33007, + 58359: 33009, + 58360: 33051, + 58361: 33065, + 58362: 33059, + 58363: 33071, + 58364: 33099, + 58432: 38539, + 58433: 33094, + 58434: 33086, + 58435: 33107, + 58436: 33105, + 58437: 33020, + 58438: 33137, + 58439: 33134, + 58440: 33125, + 58441: 33126, + 58442: 33140, + 58443: 33155, + 58444: 33160, + 58445: 33162, + 58446: 33152, + 58447: 33154, + 58448: 33184, + 58449: 33173, + 58450: 33188, + 58451: 33187, + 58452: 33119, + 58453: 33171, + 58454: 33193, + 58455: 33200, + 58456: 33205, + 58457: 33214, + 58458: 33208, + 58459: 33213, + 58460: 33216, + 58461: 33218, + 58462: 33210, + 58463: 33225, + 58464: 33229, + 58465: 33233, + 58466: 33241, + 58467: 33240, + 58468: 33224, + 58469: 33242, + 58470: 33247, + 58471: 33248, + 58472: 33255, + 58473: 33274, + 58474: 33275, + 58475: 33278, + 58476: 33281, + 58477: 33282, + 58478: 33285, + 58479: 33287, + 58480: 33290, + 58481: 33293, + 58482: 33296, + 58483: 33302, + 58484: 33321, + 58485: 33323, + 58486: 33336, + 58487: 33331, + 58488: 33344, + 58489: 33369, + 58490: 33368, + 58491: 33373, + 58492: 33370, + 58493: 33375, + 58494: 33380, + 58496: 33378, + 58497: 33384, + 58498: 33386, + 58499: 33387, + 58500: 33326, + 58501: 33393, + 58502: 33399, + 58503: 33400, + 58504: 33406, + 58505: 33421, + 58506: 33426, + 58507: 33451, + 58508: 33439, + 58509: 33467, + 58510: 33452, + 58511: 33505, + 58512: 33507, + 58513: 33503, + 58514: 33490, + 58515: 33524, + 58516: 33523, + 58517: 33530, + 58518: 33683, + 58519: 33539, + 58520: 33531, + 58521: 33529, + 58522: 33502, + 58523: 33542, + 58524: 33500, + 58525: 33545, + 58526: 33497, + 58527: 33589, + 58528: 33588, + 58529: 33558, + 58530: 33586, + 58531: 33585, + 58532: 33600, + 58533: 33593, + 58534: 33616, + 58535: 33605, + 58536: 33583, + 58537: 33579, + 58538: 33559, + 58539: 33560, + 58540: 33669, + 58541: 33690, + 58542: 33706, + 58543: 33695, + 58544: 33698, + 58545: 33686, + 58546: 33571, + 58547: 33678, + 58548: 33671, + 58549: 33674, + 58550: 33660, + 58551: 33717, + 58552: 33651, + 58553: 33653, + 58554: 33696, + 58555: 33673, + 58556: 33704, + 58557: 33780, + 58558: 33811, + 58559: 33771, + 58560: 33742, + 58561: 33789, + 58562: 33795, + 58563: 33752, + 58564: 33803, + 58565: 33729, + 58566: 33783, + 58567: 33799, + 58568: 33760, + 58569: 33778, + 58570: 33805, + 58571: 33826, + 58572: 33824, + 58573: 33725, + 58574: 33848, + 58575: 34054, + 58576: 33787, + 58577: 33901, + 58578: 33834, + 58579: 33852, + 58580: 34138, + 58581: 33924, + 58582: 33911, + 58583: 33899, + 58584: 33965, + 58585: 33902, + 58586: 33922, + 58587: 33897, + 58588: 33862, + 58589: 33836, + 58590: 33903, + 58591: 33913, + 58592: 33845, + 58593: 33994, + 58594: 33890, + 58595: 33977, + 58596: 33983, + 58597: 33951, + 58598: 34009, + 58599: 33997, + 58600: 33979, + 58601: 34010, + 58602: 34e3, + 58603: 33985, + 58604: 33990, + 58605: 34006, + 58606: 33953, + 58607: 34081, + 58608: 34047, + 58609: 34036, + 58610: 34071, + 58611: 34072, + 58612: 34092, + 58613: 34079, + 58614: 34069, + 58615: 34068, + 58616: 34044, + 58617: 34112, + 58618: 34147, + 58619: 34136, + 58620: 34120, + 58688: 34113, + 58689: 34306, + 58690: 34123, + 58691: 34133, + 58692: 34176, + 58693: 34212, + 58694: 34184, + 58695: 34193, + 58696: 34186, + 58697: 34216, + 58698: 34157, + 58699: 34196, + 58700: 34203, + 58701: 34282, + 58702: 34183, + 58703: 34204, + 58704: 34167, + 58705: 34174, + 58706: 34192, + 58707: 34249, + 58708: 34234, + 58709: 34255, + 58710: 34233, + 58711: 34256, + 58712: 34261, + 58713: 34269, + 58714: 34277, + 58715: 34268, + 58716: 34297, + 58717: 34314, + 58718: 34323, + 58719: 34315, + 58720: 34302, + 58721: 34298, + 58722: 34310, + 58723: 34338, + 58724: 34330, + 58725: 34352, + 58726: 34367, + 58727: 34381, + 58728: 20053, + 58729: 34388, + 58730: 34399, + 58731: 34407, + 58732: 34417, + 58733: 34451, + 58734: 34467, + 58735: 34473, + 58736: 34474, + 58737: 34443, + 58738: 34444, + 58739: 34486, + 58740: 34479, + 58741: 34500, + 58742: 34502, + 58743: 34480, + 58744: 34505, + 58745: 34851, + 58746: 34475, + 58747: 34516, + 58748: 34526, + 58749: 34537, + 58750: 34540, + 58752: 34527, + 58753: 34523, + 58754: 34543, + 58755: 34578, + 58756: 34566, + 58757: 34568, + 58758: 34560, + 58759: 34563, + 58760: 34555, + 58761: 34577, + 58762: 34569, + 58763: 34573, + 58764: 34553, + 58765: 34570, + 58766: 34612, + 58767: 34623, + 58768: 34615, + 58769: 34619, + 58770: 34597, + 58771: 34601, + 58772: 34586, + 58773: 34656, + 58774: 34655, + 58775: 34680, + 58776: 34636, + 58777: 34638, + 58778: 34676, + 58779: 34647, + 58780: 34664, + 58781: 34670, + 58782: 34649, + 58783: 34643, + 58784: 34659, + 58785: 34666, + 58786: 34821, + 58787: 34722, + 58788: 34719, + 58789: 34690, + 58790: 34735, + 58791: 34763, + 58792: 34749, + 58793: 34752, + 58794: 34768, + 58795: 38614, + 58796: 34731, + 58797: 34756, + 58798: 34739, + 58799: 34759, + 58800: 34758, + 58801: 34747, + 58802: 34799, + 58803: 34802, + 58804: 34784, + 58805: 34831, + 58806: 34829, + 58807: 34814, + 58808: 34806, + 58809: 34807, + 58810: 34830, + 58811: 34770, + 58812: 34833, + 58813: 34838, + 58814: 34837, + 58815: 34850, + 58816: 34849, + 58817: 34865, + 58818: 34870, + 58819: 34873, + 58820: 34855, + 58821: 34875, + 58822: 34884, + 58823: 34882, + 58824: 34898, + 58825: 34905, + 58826: 34910, + 58827: 34914, + 58828: 34923, + 58829: 34945, + 58830: 34942, + 58831: 34974, + 58832: 34933, + 58833: 34941, + 58834: 34997, + 58835: 34930, + 58836: 34946, + 58837: 34967, + 58838: 34962, + 58839: 34990, + 58840: 34969, + 58841: 34978, + 58842: 34957, + 58843: 34980, + 58844: 34992, + 58845: 35007, + 58846: 34993, + 58847: 35011, + 58848: 35012, + 58849: 35028, + 58850: 35032, + 58851: 35033, + 58852: 35037, + 58853: 35065, + 58854: 35074, + 58855: 35068, + 58856: 35060, + 58857: 35048, + 58858: 35058, + 58859: 35076, + 58860: 35084, + 58861: 35082, + 58862: 35091, + 58863: 35139, + 58864: 35102, + 58865: 35109, + 58866: 35114, + 58867: 35115, + 58868: 35137, + 58869: 35140, + 58870: 35131, + 58871: 35126, + 58872: 35128, + 58873: 35148, + 58874: 35101, + 58875: 35168, + 58876: 35166, + 58944: 35174, + 58945: 35172, + 58946: 35181, + 58947: 35178, + 58948: 35183, + 58949: 35188, + 58950: 35191, + 58951: 35198, + 58952: 35203, + 58953: 35208, + 58954: 35210, + 58955: 35219, + 58956: 35224, + 58957: 35233, + 58958: 35241, + 58959: 35238, + 58960: 35244, + 58961: 35247, + 58962: 35250, + 58963: 35258, + 58964: 35261, + 58965: 35263, + 58966: 35264, + 58967: 35290, + 58968: 35292, + 58969: 35293, + 58970: 35303, + 58971: 35316, + 58972: 35320, + 58973: 35331, + 58974: 35350, + 58975: 35344, + 58976: 35340, + 58977: 35355, + 58978: 35357, + 58979: 35365, + 58980: 35382, + 58981: 35393, + 58982: 35419, + 58983: 35410, + 58984: 35398, + 58985: 35400, + 58986: 35452, + 58987: 35437, + 58988: 35436, + 58989: 35426, + 58990: 35461, + 58991: 35458, + 58992: 35460, + 58993: 35496, + 58994: 35489, + 58995: 35473, + 58996: 35493, + 58997: 35494, + 58998: 35482, + 58999: 35491, + 59e3: 35524, + 59001: 35533, + 59002: 35522, + 59003: 35546, + 59004: 35563, + 59005: 35571, + 59006: 35559, + 59008: 35556, + 59009: 35569, + 59010: 35604, + 59011: 35552, + 59012: 35554, + 59013: 35575, + 59014: 35550, + 59015: 35547, + 59016: 35596, + 59017: 35591, + 59018: 35610, + 59019: 35553, + 59020: 35606, + 59021: 35600, + 59022: 35607, + 59023: 35616, + 59024: 35635, + 59025: 38827, + 59026: 35622, + 59027: 35627, + 59028: 35646, + 59029: 35624, + 59030: 35649, + 59031: 35660, + 59032: 35663, + 59033: 35662, + 59034: 35657, + 59035: 35670, + 59036: 35675, + 59037: 35674, + 59038: 35691, + 59039: 35679, + 59040: 35692, + 59041: 35695, + 59042: 35700, + 59043: 35709, + 59044: 35712, + 59045: 35724, + 59046: 35726, + 59047: 35730, + 59048: 35731, + 59049: 35734, + 59050: 35737, + 59051: 35738, + 59052: 35898, + 59053: 35905, + 59054: 35903, + 59055: 35912, + 59056: 35916, + 59057: 35918, + 59058: 35920, + 59059: 35925, + 59060: 35938, + 59061: 35948, + 59062: 35960, + 59063: 35962, + 59064: 35970, + 59065: 35977, + 59066: 35973, + 59067: 35978, + 59068: 35981, + 59069: 35982, + 59070: 35988, + 59071: 35964, + 59072: 35992, + 59073: 25117, + 59074: 36013, + 59075: 36010, + 59076: 36029, + 59077: 36018, + 59078: 36019, + 59079: 36014, + 59080: 36022, + 59081: 36040, + 59082: 36033, + 59083: 36068, + 59084: 36067, + 59085: 36058, + 59086: 36093, + 59087: 36090, + 59088: 36091, + 59089: 36100, + 59090: 36101, + 59091: 36106, + 59092: 36103, + 59093: 36111, + 59094: 36109, + 59095: 36112, + 59096: 40782, + 59097: 36115, + 59098: 36045, + 59099: 36116, + 59100: 36118, + 59101: 36199, + 59102: 36205, + 59103: 36209, + 59104: 36211, + 59105: 36225, + 59106: 36249, + 59107: 36290, + 59108: 36286, + 59109: 36282, + 59110: 36303, + 59111: 36314, + 59112: 36310, + 59113: 36300, + 59114: 36315, + 59115: 36299, + 59116: 36330, + 59117: 36331, + 59118: 36319, + 59119: 36323, + 59120: 36348, + 59121: 36360, + 59122: 36361, + 59123: 36351, + 59124: 36381, + 59125: 36382, + 59126: 36368, + 59127: 36383, + 59128: 36418, + 59129: 36405, + 59130: 36400, + 59131: 36404, + 59132: 36426, + 59200: 36423, + 59201: 36425, + 59202: 36428, + 59203: 36432, + 59204: 36424, + 59205: 36441, + 59206: 36452, + 59207: 36448, + 59208: 36394, + 59209: 36451, + 59210: 36437, + 59211: 36470, + 59212: 36466, + 59213: 36476, + 59214: 36481, + 59215: 36487, + 59216: 36485, + 59217: 36484, + 59218: 36491, + 59219: 36490, + 59220: 36499, + 59221: 36497, + 59222: 36500, + 59223: 36505, + 59224: 36522, + 59225: 36513, + 59226: 36524, + 59227: 36528, + 59228: 36550, + 59229: 36529, + 59230: 36542, + 59231: 36549, + 59232: 36552, + 59233: 36555, + 59234: 36571, + 59235: 36579, + 59236: 36604, + 59237: 36603, + 59238: 36587, + 59239: 36606, + 59240: 36618, + 59241: 36613, + 59242: 36629, + 59243: 36626, + 59244: 36633, + 59245: 36627, + 59246: 36636, + 59247: 36639, + 59248: 36635, + 59249: 36620, + 59250: 36646, + 59251: 36659, + 59252: 36667, + 59253: 36665, + 59254: 36677, + 59255: 36674, + 59256: 36670, + 59257: 36684, + 59258: 36681, + 59259: 36678, + 59260: 36686, + 59261: 36695, + 59262: 36700, + 59264: 36706, + 59265: 36707, + 59266: 36708, + 59267: 36764, + 59268: 36767, + 59269: 36771, + 59270: 36781, + 59271: 36783, + 59272: 36791, + 59273: 36826, + 59274: 36837, + 59275: 36834, + 59276: 36842, + 59277: 36847, + 59278: 36999, + 59279: 36852, + 59280: 36869, + 59281: 36857, + 59282: 36858, + 59283: 36881, + 59284: 36885, + 59285: 36897, + 59286: 36877, + 59287: 36894, + 59288: 36886, + 59289: 36875, + 59290: 36903, + 59291: 36918, + 59292: 36917, + 59293: 36921, + 59294: 36856, + 59295: 36943, + 59296: 36944, + 59297: 36945, + 59298: 36946, + 59299: 36878, + 59300: 36937, + 59301: 36926, + 59302: 36950, + 59303: 36952, + 59304: 36958, + 59305: 36968, + 59306: 36975, + 59307: 36982, + 59308: 38568, + 59309: 36978, + 59310: 36994, + 59311: 36989, + 59312: 36993, + 59313: 36992, + 59314: 37002, + 59315: 37001, + 59316: 37007, + 59317: 37032, + 59318: 37039, + 59319: 37041, + 59320: 37045, + 59321: 37090, + 59322: 37092, + 59323: 25160, + 59324: 37083, + 59325: 37122, + 59326: 37138, + 59327: 37145, + 59328: 37170, + 59329: 37168, + 59330: 37194, + 59331: 37206, + 59332: 37208, + 59333: 37219, + 59334: 37221, + 59335: 37225, + 59336: 37235, + 59337: 37234, + 59338: 37259, + 59339: 37257, + 59340: 37250, + 59341: 37282, + 59342: 37291, + 59343: 37295, + 59344: 37290, + 59345: 37301, + 59346: 37300, + 59347: 37306, + 59348: 37312, + 59349: 37313, + 59350: 37321, + 59351: 37323, + 59352: 37328, + 59353: 37334, + 59354: 37343, + 59355: 37345, + 59356: 37339, + 59357: 37372, + 59358: 37365, + 59359: 37366, + 59360: 37406, + 59361: 37375, + 59362: 37396, + 59363: 37420, + 59364: 37397, + 59365: 37393, + 59366: 37470, + 59367: 37463, + 59368: 37445, + 59369: 37449, + 59370: 37476, + 59371: 37448, + 59372: 37525, + 59373: 37439, + 59374: 37451, + 59375: 37456, + 59376: 37532, + 59377: 37526, + 59378: 37523, + 59379: 37531, + 59380: 37466, + 59381: 37583, + 59382: 37561, + 59383: 37559, + 59384: 37609, + 59385: 37647, + 59386: 37626, + 59387: 37700, + 59388: 37678, + 59456: 37657, + 59457: 37666, + 59458: 37658, + 59459: 37667, + 59460: 37690, + 59461: 37685, + 59462: 37691, + 59463: 37724, + 59464: 37728, + 59465: 37756, + 59466: 37742, + 59467: 37718, + 59468: 37808, + 59469: 37804, + 59470: 37805, + 59471: 37780, + 59472: 37817, + 59473: 37846, + 59474: 37847, + 59475: 37864, + 59476: 37861, + 59477: 37848, + 59478: 37827, + 59479: 37853, + 59480: 37840, + 59481: 37832, + 59482: 37860, + 59483: 37914, + 59484: 37908, + 59485: 37907, + 59486: 37891, + 59487: 37895, + 59488: 37904, + 59489: 37942, + 59490: 37931, + 59491: 37941, + 59492: 37921, + 59493: 37946, + 59494: 37953, + 59495: 37970, + 59496: 37956, + 59497: 37979, + 59498: 37984, + 59499: 37986, + 59500: 37982, + 59501: 37994, + 59502: 37417, + 59503: 38e3, + 59504: 38005, + 59505: 38007, + 59506: 38013, + 59507: 37978, + 59508: 38012, + 59509: 38014, + 59510: 38017, + 59511: 38015, + 59512: 38274, + 59513: 38279, + 59514: 38282, + 59515: 38292, + 59516: 38294, + 59517: 38296, + 59518: 38297, + 59520: 38304, + 59521: 38312, + 59522: 38311, + 59523: 38317, + 59524: 38332, + 59525: 38331, + 59526: 38329, + 59527: 38334, + 59528: 38346, + 59529: 28662, + 59530: 38339, + 59531: 38349, + 59532: 38348, + 59533: 38357, + 59534: 38356, + 59535: 38358, + 59536: 38364, + 59537: 38369, + 59538: 38373, + 59539: 38370, + 59540: 38433, + 59541: 38440, + 59542: 38446, + 59543: 38447, + 59544: 38466, + 59545: 38476, + 59546: 38479, + 59547: 38475, + 59548: 38519, + 59549: 38492, + 59550: 38494, + 59551: 38493, + 59552: 38495, + 59553: 38502, + 59554: 38514, + 59555: 38508, + 59556: 38541, + 59557: 38552, + 59558: 38549, + 59559: 38551, + 59560: 38570, + 59561: 38567, + 59562: 38577, + 59563: 38578, + 59564: 38576, + 59565: 38580, + 59566: 38582, + 59567: 38584, + 59568: 38585, + 59569: 38606, + 59570: 38603, + 59571: 38601, + 59572: 38605, + 59573: 35149, + 59574: 38620, + 59575: 38669, + 59576: 38613, + 59577: 38649, + 59578: 38660, + 59579: 38662, + 59580: 38664, + 59581: 38675, + 59582: 38670, + 59583: 38673, + 59584: 38671, + 59585: 38678, + 59586: 38681, + 59587: 38692, + 59588: 38698, + 59589: 38704, + 59590: 38713, + 59591: 38717, + 59592: 38718, + 59593: 38724, + 59594: 38726, + 59595: 38728, + 59596: 38722, + 59597: 38729, + 59598: 38748, + 59599: 38752, + 59600: 38756, + 59601: 38758, + 59602: 38760, + 59603: 21202, + 59604: 38763, + 59605: 38769, + 59606: 38777, + 59607: 38789, + 59608: 38780, + 59609: 38785, + 59610: 38778, + 59611: 38790, + 59612: 38795, + 59613: 38799, + 59614: 38800, + 59615: 38812, + 59616: 38824, + 59617: 38822, + 59618: 38819, + 59619: 38835, + 59620: 38836, + 59621: 38851, + 59622: 38854, + 59623: 38856, + 59624: 38859, + 59625: 38876, + 59626: 38893, + 59627: 40783, + 59628: 38898, + 59629: 31455, + 59630: 38902, + 59631: 38901, + 59632: 38927, + 59633: 38924, + 59634: 38968, + 59635: 38948, + 59636: 38945, + 59637: 38967, + 59638: 38973, + 59639: 38982, + 59640: 38991, + 59641: 38987, + 59642: 39019, + 59643: 39023, + 59644: 39024, + 59712: 39025, + 59713: 39028, + 59714: 39027, + 59715: 39082, + 59716: 39087, + 59717: 39089, + 59718: 39094, + 59719: 39108, + 59720: 39107, + 59721: 39110, + 59722: 39145, + 59723: 39147, + 59724: 39171, + 59725: 39177, + 59726: 39186, + 59727: 39188, + 59728: 39192, + 59729: 39201, + 59730: 39197, + 59731: 39198, + 59732: 39204, + 59733: 39200, + 59734: 39212, + 59735: 39214, + 59736: 39229, + 59737: 39230, + 59738: 39234, + 59739: 39241, + 59740: 39237, + 59741: 39248, + 59742: 39243, + 59743: 39249, + 59744: 39250, + 59745: 39244, + 59746: 39253, + 59747: 39319, + 59748: 39320, + 59749: 39333, + 59750: 39341, + 59751: 39342, + 59752: 39356, + 59753: 39391, + 59754: 39387, + 59755: 39389, + 59756: 39384, + 59757: 39377, + 59758: 39405, + 59759: 39406, + 59760: 39409, + 59761: 39410, + 59762: 39419, + 59763: 39416, + 59764: 39425, + 59765: 39439, + 59766: 39429, + 59767: 39394, + 59768: 39449, + 59769: 39467, + 59770: 39479, + 59771: 39493, + 59772: 39490, + 59773: 39488, + 59774: 39491, + 59776: 39486, + 59777: 39509, + 59778: 39501, + 59779: 39515, + 59780: 39511, + 59781: 39519, + 59782: 39522, + 59783: 39525, + 59784: 39524, + 59785: 39529, + 59786: 39531, + 59787: 39530, + 59788: 39597, + 59789: 39600, + 59790: 39612, + 59791: 39616, + 59792: 39631, + 59793: 39633, + 59794: 39635, + 59795: 39636, + 59796: 39646, + 59797: 39647, + 59798: 39650, + 59799: 39651, + 59800: 39654, + 59801: 39663, + 59802: 39659, + 59803: 39662, + 59804: 39668, + 59805: 39665, + 59806: 39671, + 59807: 39675, + 59808: 39686, + 59809: 39704, + 59810: 39706, + 59811: 39711, + 59812: 39714, + 59813: 39715, + 59814: 39717, + 59815: 39719, + 59816: 39720, + 59817: 39721, + 59818: 39722, + 59819: 39726, + 59820: 39727, + 59821: 39730, + 59822: 39748, + 59823: 39747, + 59824: 39759, + 59825: 39757, + 59826: 39758, + 59827: 39761, + 59828: 39768, + 59829: 39796, + 59830: 39827, + 59831: 39811, + 59832: 39825, + 59833: 39830, + 59834: 39831, + 59835: 39839, + 59836: 39840, + 59837: 39848, + 59838: 39860, + 59839: 39872, + 59840: 39882, + 59841: 39865, + 59842: 39878, + 59843: 39887, + 59844: 39889, + 59845: 39890, + 59846: 39907, + 59847: 39906, + 59848: 39908, + 59849: 39892, + 59850: 39905, + 59851: 39994, + 59852: 39922, + 59853: 39921, + 59854: 39920, + 59855: 39957, + 59856: 39956, + 59857: 39945, + 59858: 39955, + 59859: 39948, + 59860: 39942, + 59861: 39944, + 59862: 39954, + 59863: 39946, + 59864: 39940, + 59865: 39982, + 59866: 39963, + 59867: 39973, + 59868: 39972, + 59869: 39969, + 59870: 39984, + 59871: 40007, + 59872: 39986, + 59873: 40006, + 59874: 39998, + 59875: 40026, + 59876: 40032, + 59877: 40039, + 59878: 40054, + 59879: 40056, + 59880: 40167, + 59881: 40172, + 59882: 40176, + 59883: 40201, + 59884: 40200, + 59885: 40171, + 59886: 40195, + 59887: 40198, + 59888: 40234, + 59889: 40230, + 59890: 40367, + 59891: 40227, + 59892: 40223, + 59893: 40260, + 59894: 40213, + 59895: 40210, + 59896: 40257, + 59897: 40255, + 59898: 40254, + 59899: 40262, + 59900: 40264, + 59968: 40285, + 59969: 40286, + 59970: 40292, + 59971: 40273, + 59972: 40272, + 59973: 40281, + 59974: 40306, + 59975: 40329, + 59976: 40327, + 59977: 40363, + 59978: 40303, + 59979: 40314, + 59980: 40346, + 59981: 40356, + 59982: 40361, + 59983: 40370, + 59984: 40388, + 59985: 40385, + 59986: 40379, + 59987: 40376, + 59988: 40378, + 59989: 40390, + 59990: 40399, + 59991: 40386, + 59992: 40409, + 59993: 40403, + 59994: 40440, + 59995: 40422, + 59996: 40429, + 59997: 40431, + 59998: 40445, + 59999: 40474, + 6e4: 40475, + 60001: 40478, + 60002: 40565, + 60003: 40569, + 60004: 40573, + 60005: 40577, + 60006: 40584, + 60007: 40587, + 60008: 40588, + 60009: 40594, + 60010: 40597, + 60011: 40593, + 60012: 40605, + 60013: 40613, + 60014: 40617, + 60015: 40632, + 60016: 40618, + 60017: 40621, + 60018: 38753, + 60019: 40652, + 60020: 40654, + 60021: 40655, + 60022: 40656, + 60023: 40660, + 60024: 40668, + 60025: 40670, + 60026: 40669, + 60027: 40672, + 60028: 40677, + 60029: 40680, + 60030: 40687, + 60032: 40692, + 60033: 40694, + 60034: 40695, + 60035: 40697, + 60036: 40699, + 60037: 40700, + 60038: 40701, + 60039: 40711, + 60040: 40712, + 60041: 30391, + 60042: 40725, + 60043: 40737, + 60044: 40748, + 60045: 40766, + 60046: 40778, + 60047: 40786, + 60048: 40788, + 60049: 40803, + 60050: 40799, + 60051: 40800, + 60052: 40801, + 60053: 40806, + 60054: 40807, + 60055: 40812, + 60056: 40810, + 60057: 40823, + 60058: 40818, + 60059: 40822, + 60060: 40853, + 60061: 40860, + 60062: 40864, + 60063: 22575, + 60064: 27079, + 60065: 36953, + 60066: 29796, + 60067: 20956, + 60068: 29081, + 60736: 32394, + 60737: 35100, + 60738: 37704, + 60739: 37512, + 60740: 34012, + 60741: 20425, + 60742: 28859, + 60743: 26161, + 60744: 26824, + 60745: 37625, + 60746: 26363, + 60747: 24389, + 60748: 20008, + 60749: 20193, + 60750: 20220, + 60751: 20224, + 60752: 20227, + 60753: 20281, + 60754: 20310, + 60755: 20370, + 60756: 20362, + 60757: 20378, + 60758: 20372, + 60759: 20429, + 60760: 20544, + 60761: 20514, + 60762: 20479, + 60763: 20510, + 60764: 20550, + 60765: 20592, + 60766: 20546, + 60767: 20628, + 60768: 20724, + 60769: 20696, + 60770: 20810, + 60771: 20836, + 60772: 20893, + 60773: 20926, + 60774: 20972, + 60775: 21013, + 60776: 21148, + 60777: 21158, + 60778: 21184, + 60779: 21211, + 60780: 21248, + 60781: 21255, + 60782: 21284, + 60783: 21362, + 60784: 21395, + 60785: 21426, + 60786: 21469, + 60787: 64014, + 60788: 21660, + 60789: 21642, + 60790: 21673, + 60791: 21759, + 60792: 21894, + 60793: 22361, + 60794: 22373, + 60795: 22444, + 60796: 22472, + 60797: 22471, + 60798: 64015, + 60800: 64016, + 60801: 22686, + 60802: 22706, + 60803: 22795, + 60804: 22867, + 60805: 22875, + 60806: 22877, + 60807: 22883, + 60808: 22948, + 60809: 22970, + 60810: 23382, + 60811: 23488, + 60812: 29999, + 60813: 23512, + 60814: 23532, + 60815: 23582, + 60816: 23718, + 60817: 23738, + 60818: 23797, + 60819: 23847, + 60820: 23891, + 60821: 64017, + 60822: 23874, + 60823: 23917, + 60824: 23992, + 60825: 23993, + 60826: 24016, + 60827: 24353, + 60828: 24372, + 60829: 24423, + 60830: 24503, + 60831: 24542, + 60832: 24669, + 60833: 24709, + 60834: 24714, + 60835: 24798, + 60836: 24789, + 60837: 24864, + 60838: 24818, + 60839: 24849, + 60840: 24887, + 60841: 24880, + 60842: 24984, + 60843: 25107, + 60844: 25254, + 60845: 25589, + 60846: 25696, + 60847: 25757, + 60848: 25806, + 60849: 25934, + 60850: 26112, + 60851: 26133, + 60852: 26171, + 60853: 26121, + 60854: 26158, + 60855: 26142, + 60856: 26148, + 60857: 26213, + 60858: 26199, + 60859: 26201, + 60860: 64018, + 60861: 26227, + 60862: 26265, + 60863: 26272, + 60864: 26290, + 60865: 26303, + 60866: 26362, + 60867: 26382, + 60868: 63785, + 60869: 26470, + 60870: 26555, + 60871: 26706, + 60872: 26560, + 60873: 26625, + 60874: 26692, + 60875: 26831, + 60876: 64019, + 60877: 26984, + 60878: 64020, + 60879: 27032, + 60880: 27106, + 60881: 27184, + 60882: 27243, + 60883: 27206, + 60884: 27251, + 60885: 27262, + 60886: 27362, + 60887: 27364, + 60888: 27606, + 60889: 27711, + 60890: 27740, + 60891: 27782, + 60892: 27759, + 60893: 27866, + 60894: 27908, + 60895: 28039, + 60896: 28015, + 60897: 28054, + 60898: 28076, + 60899: 28111, + 60900: 28152, + 60901: 28146, + 60902: 28156, + 60903: 28217, + 60904: 28252, + 60905: 28199, + 60906: 28220, + 60907: 28351, + 60908: 28552, + 60909: 28597, + 60910: 28661, + 60911: 28677, + 60912: 28679, + 60913: 28712, + 60914: 28805, + 60915: 28843, + 60916: 28943, + 60917: 28932, + 60918: 29020, + 60919: 28998, + 60920: 28999, + 60921: 64021, + 60922: 29121, + 60923: 29182, + 60924: 29361, + 60992: 29374, + 60993: 29476, + 60994: 64022, + 60995: 29559, + 60996: 29629, + 60997: 29641, + 60998: 29654, + 60999: 29667, + 61e3: 29650, + 61001: 29703, + 61002: 29685, + 61003: 29734, + 61004: 29738, + 61005: 29737, + 61006: 29742, + 61007: 29794, + 61008: 29833, + 61009: 29855, + 61010: 29953, + 61011: 30063, + 61012: 30338, + 61013: 30364, + 61014: 30366, + 61015: 30363, + 61016: 30374, + 61017: 64023, + 61018: 30534, + 61019: 21167, + 61020: 30753, + 61021: 30798, + 61022: 30820, + 61023: 30842, + 61024: 31024, + 61025: 64024, + 61026: 64025, + 61027: 64026, + 61028: 31124, + 61029: 64027, + 61030: 31131, + 61031: 31441, + 61032: 31463, + 61033: 64028, + 61034: 31467, + 61035: 31646, + 61036: 64029, + 61037: 32072, + 61038: 32092, + 61039: 32183, + 61040: 32160, + 61041: 32214, + 61042: 32338, + 61043: 32583, + 61044: 32673, + 61045: 64030, + 61046: 33537, + 61047: 33634, + 61048: 33663, + 61049: 33735, + 61050: 33782, + 61051: 33864, + 61052: 33972, + 61053: 34131, + 61054: 34137, + 61056: 34155, + 61057: 64031, + 61058: 34224, + 61059: 64032, + 61060: 64033, + 61061: 34823, + 61062: 35061, + 61063: 35346, + 61064: 35383, + 61065: 35449, + 61066: 35495, + 61067: 35518, + 61068: 35551, + 61069: 64034, + 61070: 35574, + 61071: 35667, + 61072: 35711, + 61073: 36080, + 61074: 36084, + 61075: 36114, + 61076: 36214, + 61077: 64035, + 61078: 36559, + 61079: 64036, + 61080: 64037, + 61081: 36967, + 61082: 37086, + 61083: 64038, + 61084: 37141, + 61085: 37159, + 61086: 37338, + 61087: 37335, + 61088: 37342, + 61089: 37357, + 61090: 37358, + 61091: 37348, + 61092: 37349, + 61093: 37382, + 61094: 37392, + 61095: 37386, + 61096: 37434, + 61097: 37440, + 61098: 37436, + 61099: 37454, + 61100: 37465, + 61101: 37457, + 61102: 37433, + 61103: 37479, + 61104: 37543, + 61105: 37495, + 61106: 37496, + 61107: 37607, + 61108: 37591, + 61109: 37593, + 61110: 37584, + 61111: 64039, + 61112: 37589, + 61113: 37600, + 61114: 37587, + 61115: 37669, + 61116: 37665, + 61117: 37627, + 61118: 64040, + 61119: 37662, + 61120: 37631, + 61121: 37661, + 61122: 37634, + 61123: 37744, + 61124: 37719, + 61125: 37796, + 61126: 37830, + 61127: 37854, + 61128: 37880, + 61129: 37937, + 61130: 37957, + 61131: 37960, + 61132: 38290, + 61133: 63964, + 61134: 64041, + 61135: 38557, + 61136: 38575, + 61137: 38707, + 61138: 38715, + 61139: 38723, + 61140: 38733, + 61141: 38735, + 61142: 38737, + 61143: 38741, + 61144: 38999, + 61145: 39013, + 61146: 64042, + 61147: 64043, + 61148: 39207, + 61149: 64044, + 61150: 39326, + 61151: 39502, + 61152: 39641, + 61153: 39644, + 61154: 39797, + 61155: 39794, + 61156: 39823, + 61157: 39857, + 61158: 39867, + 61159: 39936, + 61160: 40304, + 61161: 40299, + 61162: 64045, + 61163: 40473, + 61164: 40657, + 61167: 8560, + 61168: 8561, + 61169: 8562, + 61170: 8563, + 61171: 8564, + 61172: 8565, + 61173: 8566, + 61174: 8567, + 61175: 8568, + 61176: 8569, + 61177: 65506, + 61178: 65508, + 61179: 65287, + 61180: 65282, + 61504: 57344, + 61505: 57345, + 61506: 57346, + 61507: 57347, + 61508: 57348, + 61509: 57349, + 61510: 57350, + 61511: 57351, + 61512: 57352, + 61513: 57353, + 61514: 57354, + 61515: 57355, + 61516: 57356, + 61517: 57357, + 61518: 57358, + 61519: 57359, + 61520: 57360, + 61521: 57361, + 61522: 57362, + 61523: 57363, + 61524: 57364, + 61525: 57365, + 61526: 57366, + 61527: 57367, + 61528: 57368, + 61529: 57369, + 61530: 57370, + 61531: 57371, + 61532: 57372, + 61533: 57373, + 61534: 57374, + 61535: 57375, + 61536: 57376, + 61537: 57377, + 61538: 57378, + 61539: 57379, + 61540: 57380, + 61541: 57381, + 61542: 57382, + 61543: 57383, + 61544: 57384, + 61545: 57385, + 61546: 57386, + 61547: 57387, + 61548: 57388, + 61549: 57389, + 61550: 57390, + 61551: 57391, + 61552: 57392, + 61553: 57393, + 61554: 57394, + 61555: 57395, + 61556: 57396, + 61557: 57397, + 61558: 57398, + 61559: 57399, + 61560: 57400, + 61561: 57401, + 61562: 57402, + 61563: 57403, + 61564: 57404, + 61565: 57405, + 61566: 57406, + 61568: 57407, + 61569: 57408, + 61570: 57409, + 61571: 57410, + 61572: 57411, + 61573: 57412, + 61574: 57413, + 61575: 57414, + 61576: 57415, + 61577: 57416, + 61578: 57417, + 61579: 57418, + 61580: 57419, + 61581: 57420, + 61582: 57421, + 61583: 57422, + 61584: 57423, + 61585: 57424, + 61586: 57425, + 61587: 57426, + 61588: 57427, + 61589: 57428, + 61590: 57429, + 61591: 57430, + 61592: 57431, + 61593: 57432, + 61594: 57433, + 61595: 57434, + 61596: 57435, + 61597: 57436, + 61598: 57437, + 61599: 57438, + 61600: 57439, + 61601: 57440, + 61602: 57441, + 61603: 57442, + 61604: 57443, + 61605: 57444, + 61606: 57445, + 61607: 57446, + 61608: 57447, + 61609: 57448, + 61610: 57449, + 61611: 57450, + 61612: 57451, + 61613: 57452, + 61614: 57453, + 61615: 57454, + 61616: 57455, + 61617: 57456, + 61618: 57457, + 61619: 57458, + 61620: 57459, + 61621: 57460, + 61622: 57461, + 61623: 57462, + 61624: 57463, + 61625: 57464, + 61626: 57465, + 61627: 57466, + 61628: 57467, + 61629: 57468, + 61630: 57469, + 61631: 57470, + 61632: 57471, + 61633: 57472, + 61634: 57473, + 61635: 57474, + 61636: 57475, + 61637: 57476, + 61638: 57477, + 61639: 57478, + 61640: 57479, + 61641: 57480, + 61642: 57481, + 61643: 57482, + 61644: 57483, + 61645: 57484, + 61646: 57485, + 61647: 57486, + 61648: 57487, + 61649: 57488, + 61650: 57489, + 61651: 57490, + 61652: 57491, + 61653: 57492, + 61654: 57493, + 61655: 57494, + 61656: 57495, + 61657: 57496, + 61658: 57497, + 61659: 57498, + 61660: 57499, + 61661: 57500, + 61662: 57501, + 61663: 57502, + 61664: 57503, + 61665: 57504, + 61666: 57505, + 61667: 57506, + 61668: 57507, + 61669: 57508, + 61670: 57509, + 61671: 57510, + 61672: 57511, + 61673: 57512, + 61674: 57513, + 61675: 57514, + 61676: 57515, + 61677: 57516, + 61678: 57517, + 61679: 57518, + 61680: 57519, + 61681: 57520, + 61682: 57521, + 61683: 57522, + 61684: 57523, + 61685: 57524, + 61686: 57525, + 61687: 57526, + 61688: 57527, + 61689: 57528, + 61690: 57529, + 61691: 57530, + 61692: 57531, + 61760: 57532, + 61761: 57533, + 61762: 57534, + 61763: 57535, + 61764: 57536, + 61765: 57537, + 61766: 57538, + 61767: 57539, + 61768: 57540, + 61769: 57541, + 61770: 57542, + 61771: 57543, + 61772: 57544, + 61773: 57545, + 61774: 57546, + 61775: 57547, + 61776: 57548, + 61777: 57549, + 61778: 57550, + 61779: 57551, + 61780: 57552, + 61781: 57553, + 61782: 57554, + 61783: 57555, + 61784: 57556, + 61785: 57557, + 61786: 57558, + 61787: 57559, + 61788: 57560, + 61789: 57561, + 61790: 57562, + 61791: 57563, + 61792: 57564, + 61793: 57565, + 61794: 57566, + 61795: 57567, + 61796: 57568, + 61797: 57569, + 61798: 57570, + 61799: 57571, + 61800: 57572, + 61801: 57573, + 61802: 57574, + 61803: 57575, + 61804: 57576, + 61805: 57577, + 61806: 57578, + 61807: 57579, + 61808: 57580, + 61809: 57581, + 61810: 57582, + 61811: 57583, + 61812: 57584, + 61813: 57585, + 61814: 57586, + 61815: 57587, + 61816: 57588, + 61817: 57589, + 61818: 57590, + 61819: 57591, + 61820: 57592, + 61821: 57593, + 61822: 57594, + 61824: 57595, + 61825: 57596, + 61826: 57597, + 61827: 57598, + 61828: 57599, + 61829: 57600, + 61830: 57601, + 61831: 57602, + 61832: 57603, + 61833: 57604, + 61834: 57605, + 61835: 57606, + 61836: 57607, + 61837: 57608, + 61838: 57609, + 61839: 57610, + 61840: 57611, + 61841: 57612, + 61842: 57613, + 61843: 57614, + 61844: 57615, + 61845: 57616, + 61846: 57617, + 61847: 57618, + 61848: 57619, + 61849: 57620, + 61850: 57621, + 61851: 57622, + 61852: 57623, + 61853: 57624, + 61854: 57625, + 61855: 57626, + 61856: 57627, + 61857: 57628, + 61858: 57629, + 61859: 57630, + 61860: 57631, + 61861: 57632, + 61862: 57633, + 61863: 57634, + 61864: 57635, + 61865: 57636, + 61866: 57637, + 61867: 57638, + 61868: 57639, + 61869: 57640, + 61870: 57641, + 61871: 57642, + 61872: 57643, + 61873: 57644, + 61874: 57645, + 61875: 57646, + 61876: 57647, + 61877: 57648, + 61878: 57649, + 61879: 57650, + 61880: 57651, + 61881: 57652, + 61882: 57653, + 61883: 57654, + 61884: 57655, + 61885: 57656, + 61886: 57657, + 61887: 57658, + 61888: 57659, + 61889: 57660, + 61890: 57661, + 61891: 57662, + 61892: 57663, + 61893: 57664, + 61894: 57665, + 61895: 57666, + 61896: 57667, + 61897: 57668, + 61898: 57669, + 61899: 57670, + 61900: 57671, + 61901: 57672, + 61902: 57673, + 61903: 57674, + 61904: 57675, + 61905: 57676, + 61906: 57677, + 61907: 57678, + 61908: 57679, + 61909: 57680, + 61910: 57681, + 61911: 57682, + 61912: 57683, + 61913: 57684, + 61914: 57685, + 61915: 57686, + 61916: 57687, + 61917: 57688, + 61918: 57689, + 61919: 57690, + 61920: 57691, + 61921: 57692, + 61922: 57693, + 61923: 57694, + 61924: 57695, + 61925: 57696, + 61926: 57697, + 61927: 57698, + 61928: 57699, + 61929: 57700, + 61930: 57701, + 61931: 57702, + 61932: 57703, + 61933: 57704, + 61934: 57705, + 61935: 57706, + 61936: 57707, + 61937: 57708, + 61938: 57709, + 61939: 57710, + 61940: 57711, + 61941: 57712, + 61942: 57713, + 61943: 57714, + 61944: 57715, + 61945: 57716, + 61946: 57717, + 61947: 57718, + 61948: 57719, + 62016: 57720, + 62017: 57721, + 62018: 57722, + 62019: 57723, + 62020: 57724, + 62021: 57725, + 62022: 57726, + 62023: 57727, + 62024: 57728, + 62025: 57729, + 62026: 57730, + 62027: 57731, + 62028: 57732, + 62029: 57733, + 62030: 57734, + 62031: 57735, + 62032: 57736, + 62033: 57737, + 62034: 57738, + 62035: 57739, + 62036: 57740, + 62037: 57741, + 62038: 57742, + 62039: 57743, + 62040: 57744, + 62041: 57745, + 62042: 57746, + 62043: 57747, + 62044: 57748, + 62045: 57749, + 62046: 57750, + 62047: 57751, + 62048: 57752, + 62049: 57753, + 62050: 57754, + 62051: 57755, + 62052: 57756, + 62053: 57757, + 62054: 57758, + 62055: 57759, + 62056: 57760, + 62057: 57761, + 62058: 57762, + 62059: 57763, + 62060: 57764, + 62061: 57765, + 62062: 57766, + 62063: 57767, + 62064: 57768, + 62065: 57769, + 62066: 57770, + 62067: 57771, + 62068: 57772, + 62069: 57773, + 62070: 57774, + 62071: 57775, + 62072: 57776, + 62073: 57777, + 62074: 57778, + 62075: 57779, + 62076: 57780, + 62077: 57781, + 62078: 57782, + 62080: 57783, + 62081: 57784, + 62082: 57785, + 62083: 57786, + 62084: 57787, + 62085: 57788, + 62086: 57789, + 62087: 57790, + 62088: 57791, + 62089: 57792, + 62090: 57793, + 62091: 57794, + 62092: 57795, + 62093: 57796, + 62094: 57797, + 62095: 57798, + 62096: 57799, + 62097: 57800, + 62098: 57801, + 62099: 57802, + 62100: 57803, + 62101: 57804, + 62102: 57805, + 62103: 57806, + 62104: 57807, + 62105: 57808, + 62106: 57809, + 62107: 57810, + 62108: 57811, + 62109: 57812, + 62110: 57813, + 62111: 57814, + 62112: 57815, + 62113: 57816, + 62114: 57817, + 62115: 57818, + 62116: 57819, + 62117: 57820, + 62118: 57821, + 62119: 57822, + 62120: 57823, + 62121: 57824, + 62122: 57825, + 62123: 57826, + 62124: 57827, + 62125: 57828, + 62126: 57829, + 62127: 57830, + 62128: 57831, + 62129: 57832, + 62130: 57833, + 62131: 57834, + 62132: 57835, + 62133: 57836, + 62134: 57837, + 62135: 57838, + 62136: 57839, + 62137: 57840, + 62138: 57841, + 62139: 57842, + 62140: 57843, + 62141: 57844, + 62142: 57845, + 62143: 57846, + 62144: 57847, + 62145: 57848, + 62146: 57849, + 62147: 57850, + 62148: 57851, + 62149: 57852, + 62150: 57853, + 62151: 57854, + 62152: 57855, + 62153: 57856, + 62154: 57857, + 62155: 57858, + 62156: 57859, + 62157: 57860, + 62158: 57861, + 62159: 57862, + 62160: 57863, + 62161: 57864, + 62162: 57865, + 62163: 57866, + 62164: 57867, + 62165: 57868, + 62166: 57869, + 62167: 57870, + 62168: 57871, + 62169: 57872, + 62170: 57873, + 62171: 57874, + 62172: 57875, + 62173: 57876, + 62174: 57877, + 62175: 57878, + 62176: 57879, + 62177: 57880, + 62178: 57881, + 62179: 57882, + 62180: 57883, + 62181: 57884, + 62182: 57885, + 62183: 57886, + 62184: 57887, + 62185: 57888, + 62186: 57889, + 62187: 57890, + 62188: 57891, + 62189: 57892, + 62190: 57893, + 62191: 57894, + 62192: 57895, + 62193: 57896, + 62194: 57897, + 62195: 57898, + 62196: 57899, + 62197: 57900, + 62198: 57901, + 62199: 57902, + 62200: 57903, + 62201: 57904, + 62202: 57905, + 62203: 57906, + 62204: 57907, + 62272: 57908, + 62273: 57909, + 62274: 57910, + 62275: 57911, + 62276: 57912, + 62277: 57913, + 62278: 57914, + 62279: 57915, + 62280: 57916, + 62281: 57917, + 62282: 57918, + 62283: 57919, + 62284: 57920, + 62285: 57921, + 62286: 57922, + 62287: 57923, + 62288: 57924, + 62289: 57925, + 62290: 57926, + 62291: 57927, + 62292: 57928, + 62293: 57929, + 62294: 57930, + 62295: 57931, + 62296: 57932, + 62297: 57933, + 62298: 57934, + 62299: 57935, + 62300: 57936, + 62301: 57937, + 62302: 57938, + 62303: 57939, + 62304: 57940, + 62305: 57941, + 62306: 57942, + 62307: 57943, + 62308: 57944, + 62309: 57945, + 62310: 57946, + 62311: 57947, + 62312: 57948, + 62313: 57949, + 62314: 57950, + 62315: 57951, + 62316: 57952, + 62317: 57953, + 62318: 57954, + 62319: 57955, + 62320: 57956, + 62321: 57957, + 62322: 57958, + 62323: 57959, + 62324: 57960, + 62325: 57961, + 62326: 57962, + 62327: 57963, + 62328: 57964, + 62329: 57965, + 62330: 57966, + 62331: 57967, + 62332: 57968, + 62333: 57969, + 62334: 57970, + 62336: 57971, + 62337: 57972, + 62338: 57973, + 62339: 57974, + 62340: 57975, + 62341: 57976, + 62342: 57977, + 62343: 57978, + 62344: 57979, + 62345: 57980, + 62346: 57981, + 62347: 57982, + 62348: 57983, + 62349: 57984, + 62350: 57985, + 62351: 57986, + 62352: 57987, + 62353: 57988, + 62354: 57989, + 62355: 57990, + 62356: 57991, + 62357: 57992, + 62358: 57993, + 62359: 57994, + 62360: 57995, + 62361: 57996, + 62362: 57997, + 62363: 57998, + 62364: 57999, + 62365: 58e3, + 62366: 58001, + 62367: 58002, + 62368: 58003, + 62369: 58004, + 62370: 58005, + 62371: 58006, + 62372: 58007, + 62373: 58008, + 62374: 58009, + 62375: 58010, + 62376: 58011, + 62377: 58012, + 62378: 58013, + 62379: 58014, + 62380: 58015, + 62381: 58016, + 62382: 58017, + 62383: 58018, + 62384: 58019, + 62385: 58020, + 62386: 58021, + 62387: 58022, + 62388: 58023, + 62389: 58024, + 62390: 58025, + 62391: 58026, + 62392: 58027, + 62393: 58028, + 62394: 58029, + 62395: 58030, + 62396: 58031, + 62397: 58032, + 62398: 58033, + 62399: 58034, + 62400: 58035, + 62401: 58036, + 62402: 58037, + 62403: 58038, + 62404: 58039, + 62405: 58040, + 62406: 58041, + 62407: 58042, + 62408: 58043, + 62409: 58044, + 62410: 58045, + 62411: 58046, + 62412: 58047, + 62413: 58048, + 62414: 58049, + 62415: 58050, + 62416: 58051, + 62417: 58052, + 62418: 58053, + 62419: 58054, + 62420: 58055, + 62421: 58056, + 62422: 58057, + 62423: 58058, + 62424: 58059, + 62425: 58060, + 62426: 58061, + 62427: 58062, + 62428: 58063, + 62429: 58064, + 62430: 58065, + 62431: 58066, + 62432: 58067, + 62433: 58068, + 62434: 58069, + 62435: 58070, + 62436: 58071, + 62437: 58072, + 62438: 58073, + 62439: 58074, + 62440: 58075, + 62441: 58076, + 62442: 58077, + 62443: 58078, + 62444: 58079, + 62445: 58080, + 62446: 58081, + 62447: 58082, + 62448: 58083, + 62449: 58084, + 62450: 58085, + 62451: 58086, + 62452: 58087, + 62453: 58088, + 62454: 58089, + 62455: 58090, + 62456: 58091, + 62457: 58092, + 62458: 58093, + 62459: 58094, + 62460: 58095, + 62528: 58096, + 62529: 58097, + 62530: 58098, + 62531: 58099, + 62532: 58100, + 62533: 58101, + 62534: 58102, + 62535: 58103, + 62536: 58104, + 62537: 58105, + 62538: 58106, + 62539: 58107, + 62540: 58108, + 62541: 58109, + 62542: 58110, + 62543: 58111, + 62544: 58112, + 62545: 58113, + 62546: 58114, + 62547: 58115, + 62548: 58116, + 62549: 58117, + 62550: 58118, + 62551: 58119, + 62552: 58120, + 62553: 58121, + 62554: 58122, + 62555: 58123, + 62556: 58124, + 62557: 58125, + 62558: 58126, + 62559: 58127, + 62560: 58128, + 62561: 58129, + 62562: 58130, + 62563: 58131, + 62564: 58132, + 62565: 58133, + 62566: 58134, + 62567: 58135, + 62568: 58136, + 62569: 58137, + 62570: 58138, + 62571: 58139, + 62572: 58140, + 62573: 58141, + 62574: 58142, + 62575: 58143, + 62576: 58144, + 62577: 58145, + 62578: 58146, + 62579: 58147, + 62580: 58148, + 62581: 58149, + 62582: 58150, + 62583: 58151, + 62584: 58152, + 62585: 58153, + 62586: 58154, + 62587: 58155, + 62588: 58156, + 62589: 58157, + 62590: 58158, + 62592: 58159, + 62593: 58160, + 62594: 58161, + 62595: 58162, + 62596: 58163, + 62597: 58164, + 62598: 58165, + 62599: 58166, + 62600: 58167, + 62601: 58168, + 62602: 58169, + 62603: 58170, + 62604: 58171, + 62605: 58172, + 62606: 58173, + 62607: 58174, + 62608: 58175, + 62609: 58176, + 62610: 58177, + 62611: 58178, + 62612: 58179, + 62613: 58180, + 62614: 58181, + 62615: 58182, + 62616: 58183, + 62617: 58184, + 62618: 58185, + 62619: 58186, + 62620: 58187, + 62621: 58188, + 62622: 58189, + 62623: 58190, + 62624: 58191, + 62625: 58192, + 62626: 58193, + 62627: 58194, + 62628: 58195, + 62629: 58196, + 62630: 58197, + 62631: 58198, + 62632: 58199, + 62633: 58200, + 62634: 58201, + 62635: 58202, + 62636: 58203, + 62637: 58204, + 62638: 58205, + 62639: 58206, + 62640: 58207, + 62641: 58208, + 62642: 58209, + 62643: 58210, + 62644: 58211, + 62645: 58212, + 62646: 58213, + 62647: 58214, + 62648: 58215, + 62649: 58216, + 62650: 58217, + 62651: 58218, + 62652: 58219, + 62653: 58220, + 62654: 58221, + 62655: 58222, + 62656: 58223, + 62657: 58224, + 62658: 58225, + 62659: 58226, + 62660: 58227, + 62661: 58228, + 62662: 58229, + 62663: 58230, + 62664: 58231, + 62665: 58232, + 62666: 58233, + 62667: 58234, + 62668: 58235, + 62669: 58236, + 62670: 58237, + 62671: 58238, + 62672: 58239, + 62673: 58240, + 62674: 58241, + 62675: 58242, + 62676: 58243, + 62677: 58244, + 62678: 58245, + 62679: 58246, + 62680: 58247, + 62681: 58248, + 62682: 58249, + 62683: 58250, + 62684: 58251, + 62685: 58252, + 62686: 58253, + 62687: 58254, + 62688: 58255, + 62689: 58256, + 62690: 58257, + 62691: 58258, + 62692: 58259, + 62693: 58260, + 62694: 58261, + 62695: 58262, + 62696: 58263, + 62697: 58264, + 62698: 58265, + 62699: 58266, + 62700: 58267, + 62701: 58268, + 62702: 58269, + 62703: 58270, + 62704: 58271, + 62705: 58272, + 62706: 58273, + 62707: 58274, + 62708: 58275, + 62709: 58276, + 62710: 58277, + 62711: 58278, + 62712: 58279, + 62713: 58280, + 62714: 58281, + 62715: 58282, + 62716: 58283, + 62784: 58284, + 62785: 58285, + 62786: 58286, + 62787: 58287, + 62788: 58288, + 62789: 58289, + 62790: 58290, + 62791: 58291, + 62792: 58292, + 62793: 58293, + 62794: 58294, + 62795: 58295, + 62796: 58296, + 62797: 58297, + 62798: 58298, + 62799: 58299, + 62800: 58300, + 62801: 58301, + 62802: 58302, + 62803: 58303, + 62804: 58304, + 62805: 58305, + 62806: 58306, + 62807: 58307, + 62808: 58308, + 62809: 58309, + 62810: 58310, + 62811: 58311, + 62812: 58312, + 62813: 58313, + 62814: 58314, + 62815: 58315, + 62816: 58316, + 62817: 58317, + 62818: 58318, + 62819: 58319, + 62820: 58320, + 62821: 58321, + 62822: 58322, + 62823: 58323, + 62824: 58324, + 62825: 58325, + 62826: 58326, + 62827: 58327, + 62828: 58328, + 62829: 58329, + 62830: 58330, + 62831: 58331, + 62832: 58332, + 62833: 58333, + 62834: 58334, + 62835: 58335, + 62836: 58336, + 62837: 58337, + 62838: 58338, + 62839: 58339, + 62840: 58340, + 62841: 58341, + 62842: 58342, + 62843: 58343, + 62844: 58344, + 62845: 58345, + 62846: 58346, + 62848: 58347, + 62849: 58348, + 62850: 58349, + 62851: 58350, + 62852: 58351, + 62853: 58352, + 62854: 58353, + 62855: 58354, + 62856: 58355, + 62857: 58356, + 62858: 58357, + 62859: 58358, + 62860: 58359, + 62861: 58360, + 62862: 58361, + 62863: 58362, + 62864: 58363, + 62865: 58364, + 62866: 58365, + 62867: 58366, + 62868: 58367, + 62869: 58368, + 62870: 58369, + 62871: 58370, + 62872: 58371, + 62873: 58372, + 62874: 58373, + 62875: 58374, + 62876: 58375, + 62877: 58376, + 62878: 58377, + 62879: 58378, + 62880: 58379, + 62881: 58380, + 62882: 58381, + 62883: 58382, + 62884: 58383, + 62885: 58384, + 62886: 58385, + 62887: 58386, + 62888: 58387, + 62889: 58388, + 62890: 58389, + 62891: 58390, + 62892: 58391, + 62893: 58392, + 62894: 58393, + 62895: 58394, + 62896: 58395, + 62897: 58396, + 62898: 58397, + 62899: 58398, + 62900: 58399, + 62901: 58400, + 62902: 58401, + 62903: 58402, + 62904: 58403, + 62905: 58404, + 62906: 58405, + 62907: 58406, + 62908: 58407, + 62909: 58408, + 62910: 58409, + 62911: 58410, + 62912: 58411, + 62913: 58412, + 62914: 58413, + 62915: 58414, + 62916: 58415, + 62917: 58416, + 62918: 58417, + 62919: 58418, + 62920: 58419, + 62921: 58420, + 62922: 58421, + 62923: 58422, + 62924: 58423, + 62925: 58424, + 62926: 58425, + 62927: 58426, + 62928: 58427, + 62929: 58428, + 62930: 58429, + 62931: 58430, + 62932: 58431, + 62933: 58432, + 62934: 58433, + 62935: 58434, + 62936: 58435, + 62937: 58436, + 62938: 58437, + 62939: 58438, + 62940: 58439, + 62941: 58440, + 62942: 58441, + 62943: 58442, + 62944: 58443, + 62945: 58444, + 62946: 58445, + 62947: 58446, + 62948: 58447, + 62949: 58448, + 62950: 58449, + 62951: 58450, + 62952: 58451, + 62953: 58452, + 62954: 58453, + 62955: 58454, + 62956: 58455, + 62957: 58456, + 62958: 58457, + 62959: 58458, + 62960: 58459, + 62961: 58460, + 62962: 58461, + 62963: 58462, + 62964: 58463, + 62965: 58464, + 62966: 58465, + 62967: 58466, + 62968: 58467, + 62969: 58468, + 62970: 58469, + 62971: 58470, + 62972: 58471, + 63040: 58472, + 63041: 58473, + 63042: 58474, + 63043: 58475, + 63044: 58476, + 63045: 58477, + 63046: 58478, + 63047: 58479, + 63048: 58480, + 63049: 58481, + 63050: 58482, + 63051: 58483, + 63052: 58484, + 63053: 58485, + 63054: 58486, + 63055: 58487, + 63056: 58488, + 63057: 58489, + 63058: 58490, + 63059: 58491, + 63060: 58492, + 63061: 58493, + 63062: 58494, + 63063: 58495, + 63064: 58496, + 63065: 58497, + 63066: 58498, + 63067: 58499, + 63068: 58500, + 63069: 58501, + 63070: 58502, + 63071: 58503, + 63072: 58504, + 63073: 58505, + 63074: 58506, + 63075: 58507, + 63076: 58508, + 63077: 58509, + 63078: 58510, + 63079: 58511, + 63080: 58512, + 63081: 58513, + 63082: 58514, + 63083: 58515, + 63084: 58516, + 63085: 58517, + 63086: 58518, + 63087: 58519, + 63088: 58520, + 63089: 58521, + 63090: 58522, + 63091: 58523, + 63092: 58524, + 63093: 58525, + 63094: 58526, + 63095: 58527, + 63096: 58528, + 63097: 58529, + 63098: 58530, + 63099: 58531, + 63100: 58532, + 63101: 58533, + 63102: 58534, + 63104: 58535, + 63105: 58536, + 63106: 58537, + 63107: 58538, + 63108: 58539, + 63109: 58540, + 63110: 58541, + 63111: 58542, + 63112: 58543, + 63113: 58544, + 63114: 58545, + 63115: 58546, + 63116: 58547, + 63117: 58548, + 63118: 58549, + 63119: 58550, + 63120: 58551, + 63121: 58552, + 63122: 58553, + 63123: 58554, + 63124: 58555, + 63125: 58556, + 63126: 58557, + 63127: 58558, + 63128: 58559, + 63129: 58560, + 63130: 58561, + 63131: 58562, + 63132: 58563, + 63133: 58564, + 63134: 58565, + 63135: 58566, + 63136: 58567, + 63137: 58568, + 63138: 58569, + 63139: 58570, + 63140: 58571, + 63141: 58572, + 63142: 58573, + 63143: 58574, + 63144: 58575, + 63145: 58576, + 63146: 58577, + 63147: 58578, + 63148: 58579, + 63149: 58580, + 63150: 58581, + 63151: 58582, + 63152: 58583, + 63153: 58584, + 63154: 58585, + 63155: 58586, + 63156: 58587, + 63157: 58588, + 63158: 58589, + 63159: 58590, + 63160: 58591, + 63161: 58592, + 63162: 58593, + 63163: 58594, + 63164: 58595, + 63165: 58596, + 63166: 58597, + 63167: 58598, + 63168: 58599, + 63169: 58600, + 63170: 58601, + 63171: 58602, + 63172: 58603, + 63173: 58604, + 63174: 58605, + 63175: 58606, + 63176: 58607, + 63177: 58608, + 63178: 58609, + 63179: 58610, + 63180: 58611, + 63181: 58612, + 63182: 58613, + 63183: 58614, + 63184: 58615, + 63185: 58616, + 63186: 58617, + 63187: 58618, + 63188: 58619, + 63189: 58620, + 63190: 58621, + 63191: 58622, + 63192: 58623, + 63193: 58624, + 63194: 58625, + 63195: 58626, + 63196: 58627, + 63197: 58628, + 63198: 58629, + 63199: 58630, + 63200: 58631, + 63201: 58632, + 63202: 58633, + 63203: 58634, + 63204: 58635, + 63205: 58636, + 63206: 58637, + 63207: 58638, + 63208: 58639, + 63209: 58640, + 63210: 58641, + 63211: 58642, + 63212: 58643, + 63213: 58644, + 63214: 58645, + 63215: 58646, + 63216: 58647, + 63217: 58648, + 63218: 58649, + 63219: 58650, + 63220: 58651, + 63221: 58652, + 63222: 58653, + 63223: 58654, + 63224: 58655, + 63225: 58656, + 63226: 58657, + 63227: 58658, + 63228: 58659, + 63296: 58660, + 63297: 58661, + 63298: 58662, + 63299: 58663, + 63300: 58664, + 63301: 58665, + 63302: 58666, + 63303: 58667, + 63304: 58668, + 63305: 58669, + 63306: 58670, + 63307: 58671, + 63308: 58672, + 63309: 58673, + 63310: 58674, + 63311: 58675, + 63312: 58676, + 63313: 58677, + 63314: 58678, + 63315: 58679, + 63316: 58680, + 63317: 58681, + 63318: 58682, + 63319: 58683, + 63320: 58684, + 63321: 58685, + 63322: 58686, + 63323: 58687, + 63324: 58688, + 63325: 58689, + 63326: 58690, + 63327: 58691, + 63328: 58692, + 63329: 58693, + 63330: 58694, + 63331: 58695, + 63332: 58696, + 63333: 58697, + 63334: 58698, + 63335: 58699, + 63336: 58700, + 63337: 58701, + 63338: 58702, + 63339: 58703, + 63340: 58704, + 63341: 58705, + 63342: 58706, + 63343: 58707, + 63344: 58708, + 63345: 58709, + 63346: 58710, + 63347: 58711, + 63348: 58712, + 63349: 58713, + 63350: 58714, + 63351: 58715, + 63352: 58716, + 63353: 58717, + 63354: 58718, + 63355: 58719, + 63356: 58720, + 63357: 58721, + 63358: 58722, + 63360: 58723, + 63361: 58724, + 63362: 58725, + 63363: 58726, + 63364: 58727, + 63365: 58728, + 63366: 58729, + 63367: 58730, + 63368: 58731, + 63369: 58732, + 63370: 58733, + 63371: 58734, + 63372: 58735, + 63373: 58736, + 63374: 58737, + 63375: 58738, + 63376: 58739, + 63377: 58740, + 63378: 58741, + 63379: 58742, + 63380: 58743, + 63381: 58744, + 63382: 58745, + 63383: 58746, + 63384: 58747, + 63385: 58748, + 63386: 58749, + 63387: 58750, + 63388: 58751, + 63389: 58752, + 63390: 58753, + 63391: 58754, + 63392: 58755, + 63393: 58756, + 63394: 58757, + 63395: 58758, + 63396: 58759, + 63397: 58760, + 63398: 58761, + 63399: 58762, + 63400: 58763, + 63401: 58764, + 63402: 58765, + 63403: 58766, + 63404: 58767, + 63405: 58768, + 63406: 58769, + 63407: 58770, + 63408: 58771, + 63409: 58772, + 63410: 58773, + 63411: 58774, + 63412: 58775, + 63413: 58776, + 63414: 58777, + 63415: 58778, + 63416: 58779, + 63417: 58780, + 63418: 58781, + 63419: 58782, + 63420: 58783, + 63421: 58784, + 63422: 58785, + 63423: 58786, + 63424: 58787, + 63425: 58788, + 63426: 58789, + 63427: 58790, + 63428: 58791, + 63429: 58792, + 63430: 58793, + 63431: 58794, + 63432: 58795, + 63433: 58796, + 63434: 58797, + 63435: 58798, + 63436: 58799, + 63437: 58800, + 63438: 58801, + 63439: 58802, + 63440: 58803, + 63441: 58804, + 63442: 58805, + 63443: 58806, + 63444: 58807, + 63445: 58808, + 63446: 58809, + 63447: 58810, + 63448: 58811, + 63449: 58812, + 63450: 58813, + 63451: 58814, + 63452: 58815, + 63453: 58816, + 63454: 58817, + 63455: 58818, + 63456: 58819, + 63457: 58820, + 63458: 58821, + 63459: 58822, + 63460: 58823, + 63461: 58824, + 63462: 58825, + 63463: 58826, + 63464: 58827, + 63465: 58828, + 63466: 58829, + 63467: 58830, + 63468: 58831, + 63469: 58832, + 63470: 58833, + 63471: 58834, + 63472: 58835, + 63473: 58836, + 63474: 58837, + 63475: 58838, + 63476: 58839, + 63477: 58840, + 63478: 58841, + 63479: 58842, + 63480: 58843, + 63481: 58844, + 63482: 58845, + 63483: 58846, + 63484: 58847, + 63552: 58848, + 63553: 58849, + 63554: 58850, + 63555: 58851, + 63556: 58852, + 63557: 58853, + 63558: 58854, + 63559: 58855, + 63560: 58856, + 63561: 58857, + 63562: 58858, + 63563: 58859, + 63564: 58860, + 63565: 58861, + 63566: 58862, + 63567: 58863, + 63568: 58864, + 63569: 58865, + 63570: 58866, + 63571: 58867, + 63572: 58868, + 63573: 58869, + 63574: 58870, + 63575: 58871, + 63576: 58872, + 63577: 58873, + 63578: 58874, + 63579: 58875, + 63580: 58876, + 63581: 58877, + 63582: 58878, + 63583: 58879, + 63584: 58880, + 63585: 58881, + 63586: 58882, + 63587: 58883, + 63588: 58884, + 63589: 58885, + 63590: 58886, + 63591: 58887, + 63592: 58888, + 63593: 58889, + 63594: 58890, + 63595: 58891, + 63596: 58892, + 63597: 58893, + 63598: 58894, + 63599: 58895, + 63600: 58896, + 63601: 58897, + 63602: 58898, + 63603: 58899, + 63604: 58900, + 63605: 58901, + 63606: 58902, + 63607: 58903, + 63608: 58904, + 63609: 58905, + 63610: 58906, + 63611: 58907, + 63612: 58908, + 63613: 58909, + 63614: 58910, + 63616: 58911, + 63617: 58912, + 63618: 58913, + 63619: 58914, + 63620: 58915, + 63621: 58916, + 63622: 58917, + 63623: 58918, + 63624: 58919, + 63625: 58920, + 63626: 58921, + 63627: 58922, + 63628: 58923, + 63629: 58924, + 63630: 58925, + 63631: 58926, + 63632: 58927, + 63633: 58928, + 63634: 58929, + 63635: 58930, + 63636: 58931, + 63637: 58932, + 63638: 58933, + 63639: 58934, + 63640: 58935, + 63641: 58936, + 63642: 58937, + 63643: 58938, + 63644: 58939, + 63645: 58940, + 63646: 58941, + 63647: 58942, + 63648: 58943, + 63649: 58944, + 63650: 58945, + 63651: 58946, + 63652: 58947, + 63653: 58948, + 63654: 58949, + 63655: 58950, + 63656: 58951, + 63657: 58952, + 63658: 58953, + 63659: 58954, + 63660: 58955, + 63661: 58956, + 63662: 58957, + 63663: 58958, + 63664: 58959, + 63665: 58960, + 63666: 58961, + 63667: 58962, + 63668: 58963, + 63669: 58964, + 63670: 58965, + 63671: 58966, + 63672: 58967, + 63673: 58968, + 63674: 58969, + 63675: 58970, + 63676: 58971, + 63677: 58972, + 63678: 58973, + 63679: 58974, + 63680: 58975, + 63681: 58976, + 63682: 58977, + 63683: 58978, + 63684: 58979, + 63685: 58980, + 63686: 58981, + 63687: 58982, + 63688: 58983, + 63689: 58984, + 63690: 58985, + 63691: 58986, + 63692: 58987, + 63693: 58988, + 63694: 58989, + 63695: 58990, + 63696: 58991, + 63697: 58992, + 63698: 58993, + 63699: 58994, + 63700: 58995, + 63701: 58996, + 63702: 58997, + 63703: 58998, + 63704: 58999, + 63705: 59e3, + 63706: 59001, + 63707: 59002, + 63708: 59003, + 63709: 59004, + 63710: 59005, + 63711: 59006, + 63712: 59007, + 63713: 59008, + 63714: 59009, + 63715: 59010, + 63716: 59011, + 63717: 59012, + 63718: 59013, + 63719: 59014, + 63720: 59015, + 63721: 59016, + 63722: 59017, + 63723: 59018, + 63724: 59019, + 63725: 59020, + 63726: 59021, + 63727: 59022, + 63728: 59023, + 63729: 59024, + 63730: 59025, + 63731: 59026, + 63732: 59027, + 63733: 59028, + 63734: 59029, + 63735: 59030, + 63736: 59031, + 63737: 59032, + 63738: 59033, + 63739: 59034, + 63740: 59035, + 64064: 8560, + 64065: 8561, + 64066: 8562, + 64067: 8563, + 64068: 8564, + 64069: 8565, + 64070: 8566, + 64071: 8567, + 64072: 8568, + 64073: 8569, + 64074: 8544, + 64075: 8545, + 64076: 8546, + 64077: 8547, + 64078: 8548, + 64079: 8549, + 64080: 8550, + 64081: 8551, + 64082: 8552, + 64083: 8553, + 64084: 65506, + 64085: 65508, + 64086: 65287, + 64087: 65282, + 64088: 12849, + 64089: 8470, + 64090: 8481, + 64091: 8757, + 64092: 32394, + 64093: 35100, + 64094: 37704, + 64095: 37512, + 64096: 34012, + 64097: 20425, + 64098: 28859, + 64099: 26161, + 64100: 26824, + 64101: 37625, + 64102: 26363, + 64103: 24389, + 64104: 20008, + 64105: 20193, + 64106: 20220, + 64107: 20224, + 64108: 20227, + 64109: 20281, + 64110: 20310, + 64111: 20370, + 64112: 20362, + 64113: 20378, + 64114: 20372, + 64115: 20429, + 64116: 20544, + 64117: 20514, + 64118: 20479, + 64119: 20510, + 64120: 20550, + 64121: 20592, + 64122: 20546, + 64123: 20628, + 64124: 20724, + 64125: 20696, + 64126: 20810, + 64128: 20836, + 64129: 20893, + 64130: 20926, + 64131: 20972, + 64132: 21013, + 64133: 21148, + 64134: 21158, + 64135: 21184, + 64136: 21211, + 64137: 21248, + 64138: 21255, + 64139: 21284, + 64140: 21362, + 64141: 21395, + 64142: 21426, + 64143: 21469, + 64144: 64014, + 64145: 21660, + 64146: 21642, + 64147: 21673, + 64148: 21759, + 64149: 21894, + 64150: 22361, + 64151: 22373, + 64152: 22444, + 64153: 22472, + 64154: 22471, + 64155: 64015, + 64156: 64016, + 64157: 22686, + 64158: 22706, + 64159: 22795, + 64160: 22867, + 64161: 22875, + 64162: 22877, + 64163: 22883, + 64164: 22948, + 64165: 22970, + 64166: 23382, + 64167: 23488, + 64168: 29999, + 64169: 23512, + 64170: 23532, + 64171: 23582, + 64172: 23718, + 64173: 23738, + 64174: 23797, + 64175: 23847, + 64176: 23891, + 64177: 64017, + 64178: 23874, + 64179: 23917, + 64180: 23992, + 64181: 23993, + 64182: 24016, + 64183: 24353, + 64184: 24372, + 64185: 24423, + 64186: 24503, + 64187: 24542, + 64188: 24669, + 64189: 24709, + 64190: 24714, + 64191: 24798, + 64192: 24789, + 64193: 24864, + 64194: 24818, + 64195: 24849, + 64196: 24887, + 64197: 24880, + 64198: 24984, + 64199: 25107, + 64200: 25254, + 64201: 25589, + 64202: 25696, + 64203: 25757, + 64204: 25806, + 64205: 25934, + 64206: 26112, + 64207: 26133, + 64208: 26171, + 64209: 26121, + 64210: 26158, + 64211: 26142, + 64212: 26148, + 64213: 26213, + 64214: 26199, + 64215: 26201, + 64216: 64018, + 64217: 26227, + 64218: 26265, + 64219: 26272, + 64220: 26290, + 64221: 26303, + 64222: 26362, + 64223: 26382, + 64224: 63785, + 64225: 26470, + 64226: 26555, + 64227: 26706, + 64228: 26560, + 64229: 26625, + 64230: 26692, + 64231: 26831, + 64232: 64019, + 64233: 26984, + 64234: 64020, + 64235: 27032, + 64236: 27106, + 64237: 27184, + 64238: 27243, + 64239: 27206, + 64240: 27251, + 64241: 27262, + 64242: 27362, + 64243: 27364, + 64244: 27606, + 64245: 27711, + 64246: 27740, + 64247: 27782, + 64248: 27759, + 64249: 27866, + 64250: 27908, + 64251: 28039, + 64252: 28015, + 64320: 28054, + 64321: 28076, + 64322: 28111, + 64323: 28152, + 64324: 28146, + 64325: 28156, + 64326: 28217, + 64327: 28252, + 64328: 28199, + 64329: 28220, + 64330: 28351, + 64331: 28552, + 64332: 28597, + 64333: 28661, + 64334: 28677, + 64335: 28679, + 64336: 28712, + 64337: 28805, + 64338: 28843, + 64339: 28943, + 64340: 28932, + 64341: 29020, + 64342: 28998, + 64343: 28999, + 64344: 64021, + 64345: 29121, + 64346: 29182, + 64347: 29361, + 64348: 29374, + 64349: 29476, + 64350: 64022, + 64351: 29559, + 64352: 29629, + 64353: 29641, + 64354: 29654, + 64355: 29667, + 64356: 29650, + 64357: 29703, + 64358: 29685, + 64359: 29734, + 64360: 29738, + 64361: 29737, + 64362: 29742, + 64363: 29794, + 64364: 29833, + 64365: 29855, + 64366: 29953, + 64367: 30063, + 64368: 30338, + 64369: 30364, + 64370: 30366, + 64371: 30363, + 64372: 30374, + 64373: 64023, + 64374: 30534, + 64375: 21167, + 64376: 30753, + 64377: 30798, + 64378: 30820, + 64379: 30842, + 64380: 31024, + 64381: 64024, + 64382: 64025, + 64384: 64026, + 64385: 31124, + 64386: 64027, + 64387: 31131, + 64388: 31441, + 64389: 31463, + 64390: 64028, + 64391: 31467, + 64392: 31646, + 64393: 64029, + 64394: 32072, + 64395: 32092, + 64396: 32183, + 64397: 32160, + 64398: 32214, + 64399: 32338, + 64400: 32583, + 64401: 32673, + 64402: 64030, + 64403: 33537, + 64404: 33634, + 64405: 33663, + 64406: 33735, + 64407: 33782, + 64408: 33864, + 64409: 33972, + 64410: 34131, + 64411: 34137, + 64412: 34155, + 64413: 64031, + 64414: 34224, + 64415: 64032, + 64416: 64033, + 64417: 34823, + 64418: 35061, + 64419: 35346, + 64420: 35383, + 64421: 35449, + 64422: 35495, + 64423: 35518, + 64424: 35551, + 64425: 64034, + 64426: 35574, + 64427: 35667, + 64428: 35711, + 64429: 36080, + 64430: 36084, + 64431: 36114, + 64432: 36214, + 64433: 64035, + 64434: 36559, + 64435: 64036, + 64436: 64037, + 64437: 36967, + 64438: 37086, + 64439: 64038, + 64440: 37141, + 64441: 37159, + 64442: 37338, + 64443: 37335, + 64444: 37342, + 64445: 37357, + 64446: 37358, + 64447: 37348, + 64448: 37349, + 64449: 37382, + 64450: 37392, + 64451: 37386, + 64452: 37434, + 64453: 37440, + 64454: 37436, + 64455: 37454, + 64456: 37465, + 64457: 37457, + 64458: 37433, + 64459: 37479, + 64460: 37543, + 64461: 37495, + 64462: 37496, + 64463: 37607, + 64464: 37591, + 64465: 37593, + 64466: 37584, + 64467: 64039, + 64468: 37589, + 64469: 37600, + 64470: 37587, + 64471: 37669, + 64472: 37665, + 64473: 37627, + 64474: 64040, + 64475: 37662, + 64476: 37631, + 64477: 37661, + 64478: 37634, + 64479: 37744, + 64480: 37719, + 64481: 37796, + 64482: 37830, + 64483: 37854, + 64484: 37880, + 64485: 37937, + 64486: 37957, + 64487: 37960, + 64488: 38290, + 64489: 63964, + 64490: 64041, + 64491: 38557, + 64492: 38575, + 64493: 38707, + 64494: 38715, + 64495: 38723, + 64496: 38733, + 64497: 38735, + 64498: 38737, + 64499: 38741, + 64500: 38999, + 64501: 39013, + 64502: 64042, + 64503: 64043, + 64504: 39207, + 64505: 64044, + 64506: 39326, + 64507: 39502, + 64508: 39641, + 64576: 39644, + 64577: 39797, + 64578: 39794, + 64579: 39823, + 64580: 39857, + 64581: 39867, + 64582: 39936, + 64583: 40304, + 64584: 40299, + 64585: 64045, + 64586: 40473, + 64587: 40657, + }), + (n.prototype = { + constructor: n, + getInt8: function () { + var e = this.dv.getInt8(this.offset); + return (this.offset += 1), e; + }, + getInt8Array: function (e) { + for (var t = [], n = 0; n < e; n++) t.push(this.getInt8()); + return t; + }, + getUint8: function () { + var e = this.dv.getUint8(this.offset); + return (this.offset += 1), e; + }, + getUint8Array: function (e) { + for (var t = [], n = 0; n < e; n++) t.push(this.getUint8()); + return t; + }, + getInt16: function () { + var e = this.dv.getInt16(this.offset, this.littleEndian); + return (this.offset += 2), e; + }, + getInt16Array: function (e) { + for (var t = [], n = 0; n < e; n++) t.push(this.getInt16()); + return t; + }, + getUint16: function () { + var e = this.dv.getUint16(this.offset, this.littleEndian); + return (this.offset += 2), e; + }, + getUint16Array: function (e) { + for (var t = [], n = 0; n < e; n++) t.push(this.getUint16()); + return t; + }, + getInt32: function () { + var e = this.dv.getInt32(this.offset, this.littleEndian); + return (this.offset += 4), e; + }, + getInt32Array: function (e) { + for (var t = [], n = 0; n < e; n++) t.push(this.getInt32()); + return t; + }, + getUint32: function () { + var e = this.dv.getUint32(this.offset, this.littleEndian); + return (this.offset += 4), e; + }, + getUint32Array: function (e) { + for (var t = [], n = 0; n < e; n++) t.push(this.getUint32()); + return t; + }, + getFloat32: function () { + var e = this.dv.getFloat32(this.offset, this.littleEndian); + return (this.offset += 4), e; + }, + getFloat32Array: function (e) { + for (var t = [], n = 0; n < e; n++) t.push(this.getFloat32()); + return t; + }, + getFloat64: function () { + var e = this.dv.getFloat64(this.offset, this.littleEndian); + return (this.offset += 8), e; + }, + getFloat64Array: function (e) { + for (var t = [], n = 0; n < e; n++) t.push(this.getFloat64()); + return t; + }, + getIndex: function (e, t) { + switch (e) { + case 1: + return !0 === t ? this.getUint8() : this.getInt8(); + case 2: + return !0 === t ? this.getUint16() : this.getInt16(); + case 4: + return this.getInt32(); + default: + throw "unknown number type " + e + " exception."; + } + }, + getIndexArray: function (e, t, n) { + for (var r = [], i = 0; i < t; i++) r.push(this.getIndex(e, n)); + return r; + }, + getChars: function (e) { + for (var t = ""; e > 0; ) { + var n = this.getUint8(); + if ((e--, 0 === n)) break; + t += String.fromCharCode(n); + } + for (; e > 0; ) this.getUint8(), e--; + return t; + }, + getSjisStringsAsUnicode: function (e) { + for (var t = []; e > 0; ) { + var n = this.getUint8(); + if ((e--, 0 === n)) break; + t.push(n); + } + for (; e > 0; ) this.getUint8(), e--; + return this.encoder.s2u(new Uint8Array(t)); + }, + getUnicodeStrings: function (e) { + for (var t = ""; e > 0; ) { + var n = this.getUint16(); + if (((e -= 2), 0 === n)) break; + t += String.fromCharCode(n); + } + for (; e > 0; ) this.getUint8(), e--; + return t; + }, + getTextBuffer: function () { + var e = this.getUint32(); + return this.getUnicodeStrings(e); + }, + }), + (r.prototype = { + constructor: r, + leftToRightVector3: function (e) { + e[2] = -e[2]; + }, + leftToRightQuaternion: function (e) { + (e[0] = -e[0]), (e[1] = -e[1]); + }, + leftToRightEuler: function (e) { + (e[0] = -e[0]), (e[1] = -e[1]); + }, + leftToRightIndexOrder: function (e) { + var t = e[2]; + (e[2] = e[0]), (e[0] = t); + }, + leftToRightVector3Range: function (e, t) { + var n = -t[2]; + (t[2] = -e[2]), (e[2] = n); + }, + leftToRightEulerRange: function (e, t) { + var n = -t[0], + r = -t[1]; + (t[0] = -e[0]), (t[1] = -e[1]), (e[0] = n), (e[1] = r); + }, + }), + (i.prototype.parsePmd = function (e, t) { + var r = {}, + i = new n(e); + (r.metadata = {}), + (r.metadata.format = "pmd"), + (r.metadata.coordinateSystem = "left"); + var a = function () { + var e = function () { + var e = {}; + return ( + (e.position = i.getFloat32Array(3)), + (e.normal = i.getFloat32Array(3)), + (e.uv = i.getFloat32Array(2)), + (e.skinIndices = i.getUint16Array(2)), + (e.skinWeights = [i.getUint8() / 100]), + e.skinWeights.push(1 - e.skinWeights[0]), + (e.edgeFlag = i.getUint8()), + e + ); + }, + t = r.metadata; + (t.vertexCount = i.getUint32()), (r.vertices = []); + for (var n = 0; n < t.vertexCount; n++) r.vertices.push(e()); + }, + o = function () { + var e = function () { + var e = {}; + return (e.indices = i.getUint16Array(3)), e; + }, + t = r.metadata; + (t.faceCount = i.getUint32() / 3), (r.faces = []); + for (var n = 0; n < t.faceCount; n++) r.faces.push(e()); + }, + s = function () { + var e = function () { + var e = {}; + return ( + (e.diffuse = i.getFloat32Array(4)), + (e.shininess = i.getFloat32()), + (e.specular = i.getFloat32Array(3)), + (e.ambient = i.getFloat32Array(3)), + (e.toonIndex = i.getInt8()), + (e.edgeFlag = i.getUint8()), + (e.faceCount = i.getUint32() / 3), + (e.fileName = i.getSjisStringsAsUnicode(20)), + e + ); + }, + t = r.metadata; + (t.materialCount = i.getUint32()), (r.materials = []); + for (var n = 0; n < t.materialCount; n++) + r.materials.push(e()); + }, + l = function () { + var e = function () { + var e = {}; + return ( + (e.name = i.getSjisStringsAsUnicode(20)), + (e.parentIndex = i.getInt16()), + (e.tailIndex = i.getInt16()), + (e.type = i.getUint8()), + (e.ikIndex = i.getInt16()), + (e.position = i.getFloat32Array(3)), + e + ); + }, + t = r.metadata; + (t.boneCount = i.getUint16()), (r.bones = []); + for (var n = 0; n < t.boneCount; n++) r.bones.push(e()); + }, + u = function () { + var e = function () { + var e = {}; + (e.target = i.getUint16()), + (e.effector = i.getUint16()), + (e.linkCount = i.getUint8()), + (e.iteration = i.getUint16()), + (e.maxAngle = i.getFloat32()), + (e.links = []); + for (var t = 0; t < e.linkCount; t++) { + var n = {}; + (n.index = i.getUint16()), e.links.push(n); + } + return e; + }, + t = r.metadata; + (t.ikCount = i.getUint16()), (r.iks = []); + for (var n = 0; n < t.ikCount; n++) r.iks.push(e()); + }, + c = function () { + var e = function () { + var e = {}; + (e.name = i.getSjisStringsAsUnicode(20)), + (e.elementCount = i.getUint32()), + (e.type = i.getUint8()), + (e.elements = []); + for (var t = 0; t < e.elementCount; t++) + e.elements.push({ + index: i.getUint32(), + position: i.getFloat32Array(3), + }); + return e; + }, + t = r.metadata; + (t.morphCount = i.getUint16()), (r.morphs = []); + for (var n = 0; n < t.morphCount; n++) r.morphs.push(e()); + }, + f = function () { + var e = function () { + var e = {}; + return (e.index = i.getUint16()), e; + }, + t = r.metadata; + (t.morphFrameCount = i.getUint8()), (r.morphFrames = []); + for (var n = 0; n < t.morphFrameCount; n++) + r.morphFrames.push(e()); + }, + d = function () { + var e = function () { + var e = {}; + return (e.name = i.getSjisStringsAsUnicode(50)), e; + }, + t = r.metadata; + (t.boneFrameNameCount = i.getUint8()), + (r.boneFrameNames = []); + for (var n = 0; n < t.boneFrameNameCount; n++) + r.boneFrameNames.push(e()); + }, + h = function () { + var e = function () { + var e = {}; + return ( + (e.boneIndex = i.getInt16()), + (e.frameIndex = i.getUint8()), + e + ); + }, + t = r.metadata; + (t.boneFrameCount = i.getUint32()), (r.boneFrames = []); + for (var n = 0; n < t.boneFrameCount; n++) + r.boneFrames.push(e()); + }, + p = function () { + var e = r.metadata; + (e.englishCompatibility = i.getUint8()), + e.englishCompatibility > 0 && + ((e.englishModelName = i.getSjisStringsAsUnicode(20)), + (e.englishComment = i.getSjisStringsAsUnicode(256))); + }, + v = function () { + var e = function () { + var e = {}; + return (e.name = i.getSjisStringsAsUnicode(20)), e; + }, + t = r.metadata; + if (0 !== t.englishCompatibility) { + r.englishBoneNames = []; + for (var n = 0; n < t.boneCount; n++) + r.englishBoneNames.push(e()); + } + }, + m = function () { + var e = function () { + var e = {}; + return (e.name = i.getSjisStringsAsUnicode(20)), e; + }, + t = r.metadata; + if (0 !== t.englishCompatibility) { + r.englishMorphNames = []; + for (var n = 0; n < t.morphCount - 1; n++) + r.englishMorphNames.push(e()); + } + }, + g = function () { + var e = function () { + var e = {}; + return (e.name = i.getSjisStringsAsUnicode(50)), e; + }, + t = r.metadata; + if (0 !== t.englishCompatibility) { + r.englishBoneFrameNames = []; + for (var n = 0; n < t.boneFrameNameCount; n++) + r.englishBoneFrameNames.push(e()); + } + }, + A = function () { + var e = function () { + var e = {}; + return (e.fileName = i.getSjisStringsAsUnicode(100)), e; + }; + r.toonTextures = []; + for (var t = 0; t < 10; t++) r.toonTextures.push(e()); + }, + y = function () { + var e = function () { + var e = {}; + return ( + (e.name = i.getSjisStringsAsUnicode(20)), + (e.boneIndex = i.getInt16()), + (e.groupIndex = i.getUint8()), + (e.groupTarget = i.getUint16()), + (e.shapeType = i.getUint8()), + (e.width = i.getFloat32()), + (e.height = i.getFloat32()), + (e.depth = i.getFloat32()), + (e.position = i.getFloat32Array(3)), + (e.rotation = i.getFloat32Array(3)), + (e.weight = i.getFloat32()), + (e.positionDamping = i.getFloat32()), + (e.rotationDamping = i.getFloat32()), + (e.restitution = i.getFloat32()), + (e.friction = i.getFloat32()), + (e.type = i.getUint8()), + e + ); + }, + t = r.metadata; + (t.rigidBodyCount = i.getUint32()), (r.rigidBodies = []); + for (var n = 0; n < t.rigidBodyCount; n++) + r.rigidBodies.push(e()); + }, + b = function () { + var e = function () { + var e = {}; + return ( + (e.name = i.getSjisStringsAsUnicode(20)), + (e.rigidBodyIndex1 = i.getUint32()), + (e.rigidBodyIndex2 = i.getUint32()), + (e.position = i.getFloat32Array(3)), + (e.rotation = i.getFloat32Array(3)), + (e.translationLimitation1 = i.getFloat32Array(3)), + (e.translationLimitation2 = i.getFloat32Array(3)), + (e.rotationLimitation1 = i.getFloat32Array(3)), + (e.rotationLimitation2 = i.getFloat32Array(3)), + (e.springPosition = i.getFloat32Array(3)), + (e.springRotation = i.getFloat32Array(3)), + e + ); + }, + t = r.metadata; + (t.constraintCount = i.getUint32()), (r.constraints = []); + for (var n = 0; n < t.constraintCount; n++) + r.constraints.push(e()); + }; + return ( + (function () { + var e = r.metadata; + if (((e.magic = i.getChars(3)), "Pmd" !== e.magic)) + throw "PMD file magic is not Pmd, but " + e.magic; + (e.version = i.getFloat32()), + (e.modelName = i.getSjisStringsAsUnicode(20)), + (e.comment = i.getSjisStringsAsUnicode(256)); + })(), + a(), + o(), + s(), + l(), + u(), + c(), + f(), + d(), + h(), + p(), + v(), + m(), + g(), + A(), + y(), + b(), + !0 === t && this.leftToRightModel(r), + r + ); + }), + (i.prototype.parsePmx = function (e, t) { + var r = {}, + i = new n(e); + (r.metadata = {}), + (r.metadata.format = "pmx"), + (r.metadata.coordinateSystem = "left"); + var a = function () { + var e = function () { + var e = {}; + (e.position = i.getFloat32Array(3)), + (e.normal = i.getFloat32Array(3)), + (e.uv = i.getFloat32Array(2)), + (e.auvs = []); + for (var n = 0; n < r.metadata.additionalUvNum; n++) + e.auvs.push(i.getFloat32Array(4)); + e.type = i.getUint8(); + var a = t.boneIndexSize; + if (0 === e.type) + (e.skinIndices = i.getIndexArray(a, 1)), + (e.skinWeights = [1]); + else if (1 === e.type) + (e.skinIndices = i.getIndexArray(a, 2)), + (e.skinWeights = i.getFloat32Array(1)), + e.skinWeights.push(1 - e.skinWeights[0]); + else if (2 === e.type) + (e.skinIndices = i.getIndexArray(a, 4)), + (e.skinWeights = i.getFloat32Array(4)); + else { + if (3 !== e.type) + throw "unsupport bone type " + e.type + " exception."; + (e.skinIndices = i.getIndexArray(a, 2)), + (e.skinWeights = i.getFloat32Array(1)), + e.skinWeights.push(1 - e.skinWeights[0]), + (e.skinC = i.getFloat32Array(3)), + (e.skinR0 = i.getFloat32Array(3)), + (e.skinR1 = i.getFloat32Array(3)), + (e.type = 1); + } + return (e.edgeRatio = i.getFloat32()), e; + }, + t = r.metadata; + (t.vertexCount = i.getUint32()), (r.vertices = []); + for (var n = 0; n < t.vertexCount; n++) r.vertices.push(e()); + }, + o = function () { + var e = function () { + var e = {}; + return ( + (e.indices = i.getIndexArray(t.vertexIndexSize, 3, !0)), + e + ); + }, + t = r.metadata; + (t.faceCount = i.getUint32() / 3), (r.faces = []); + for (var n = 0; n < t.faceCount; n++) r.faces.push(e()); + }, + s = function () { + var e = function () { + return i.getTextBuffer(); + }, + t = r.metadata; + (t.textureCount = i.getUint32()), (r.textures = []); + for (var n = 0; n < t.textureCount; n++) r.textures.push(e()); + }, + l = function () { + var e = function () { + var e = {}; + if ( + ((e.name = i.getTextBuffer()), + (e.englishName = i.getTextBuffer()), + (e.diffuse = i.getFloat32Array(4)), + (e.specular = i.getFloat32Array(3)), + (e.shininess = i.getFloat32()), + (e.ambient = i.getFloat32Array(3)), + (e.flag = i.getUint8()), + (e.edgeColor = i.getFloat32Array(4)), + (e.edgeSize = i.getFloat32()), + (e.textureIndex = i.getIndex( + r.metadata.textureIndexSize + )), + (e.envTextureIndex = i.getIndex( + r.metadata.textureIndexSize + )), + (e.envFlag = i.getUint8()), + (e.toonFlag = i.getUint8()), + 0 === e.toonFlag) + ) + e.toonIndex = i.getIndex(r.metadata.textureIndexSize); + else { + if (1 !== e.toonFlag) + throw ( + "unknown toon flag " + e.toonFlag + " exception." + ); + e.toonIndex = i.getInt8(); + } + return ( + (e.comment = i.getTextBuffer()), + (e.faceCount = i.getUint32() / 3), + e + ); + }, + t = r.metadata; + (t.materialCount = i.getUint32()), (r.materials = []); + for (var n = 0; n < t.materialCount; n++) + r.materials.push(e()); + }, + u = function () { + var e = function () { + var e = {}; + if ( + ((e.name = i.getTextBuffer()), + (e.englishName = i.getTextBuffer()), + (e.position = i.getFloat32Array(3)), + (e.parentIndex = i.getIndex(r.metadata.boneIndexSize)), + (e.transformationClass = i.getUint32()), + (e.flag = i.getUint16()), + 1 & e.flag + ? (e.connectIndex = i.getIndex( + r.metadata.boneIndexSize + )) + : (e.offsetPosition = i.getFloat32Array(3)), + 256 & e.flag || 512 & e.flag) + ) { + var t = {}; + (t.isLocal = 0 !== (128 & e.flag)), + (t.affectRotation = 0 !== (256 & e.flag)), + (t.affectPosition = 0 !== (512 & e.flag)), + (t.parentIndex = i.getIndex( + r.metadata.boneIndexSize + )), + (t.ratio = i.getFloat32()), + (e.grant = t); + } + if ( + (1024 & e.flag && (e.fixAxis = i.getFloat32Array(3)), + 2048 & e.flag && + ((e.localXVector = i.getFloat32Array(3)), + (e.localZVector = i.getFloat32Array(3))), + 8192 & e.flag && (e.key = i.getUint32()), + 32 & e.flag) + ) { + var n = {}; + (n.effector = i.getIndex(r.metadata.boneIndexSize)), + (n.target = null), + (n.iteration = i.getUint32()), + (n.maxAngle = i.getFloat32()), + (n.linkCount = i.getUint32()), + (n.links = []); + for (var a = 0; a < n.linkCount; a++) { + var o = {}; + (o.index = i.getIndex(r.metadata.boneIndexSize)), + (o.angleLimitation = i.getUint8()), + 1 === o.angleLimitation && + ((o.lowerLimitationAngle = i.getFloat32Array(3)), + (o.upperLimitationAngle = i.getFloat32Array(3))), + n.links.push(o); + } + e.ik = n; + } + return e; + }, + t = r.metadata; + (t.boneCount = i.getUint32()), (r.bones = []); + for (var n = 0; n < t.boneCount; n++) r.bones.push(e()); + }, + c = function () { + var e = function () { + var e = {}; + (e.name = i.getTextBuffer()), + (e.englishName = i.getTextBuffer()), + (e.panel = i.getUint8()), + (e.type = i.getUint8()), + (e.elementCount = i.getUint32()), + (e.elements = []); + for (var t = 0; t < e.elementCount; t++) + if (0 === e.type) + ((n = {}).index = i.getIndex( + r.metadata.morphIndexSize + )), + (n.ratio = i.getFloat32()), + e.elements.push(n); + else if (1 === e.type) + ((n = {}).index = i.getIndex( + r.metadata.vertexIndexSize, + !0 + )), + (n.position = i.getFloat32Array(3)), + e.elements.push(n); + else if (2 === e.type) + ((n = {}).index = i.getIndex( + r.metadata.boneIndexSize + )), + (n.position = i.getFloat32Array(3)), + (n.rotation = i.getFloat32Array(4)), + e.elements.push(n); + else if (3 === e.type) + ((n = {}).index = i.getIndex( + r.metadata.vertexIndexSize, + !0 + )), + (n.uv = i.getFloat32Array(4)), + e.elements.push(n); + else if (4 === e.type); + else if (5 === e.type); + else if (6 === e.type); + else if (7 === e.type); + else if (8 === e.type) { + var n; + ((n = {}).index = i.getIndex( + r.metadata.materialIndexSize + )), + (n.type = i.getUint8()), + (n.diffuse = i.getFloat32Array(4)), + (n.specular = i.getFloat32Array(3)), + (n.shininess = i.getFloat32()), + (n.ambient = i.getFloat32Array(3)), + (n.edgeColor = i.getFloat32Array(4)), + (n.edgeSize = i.getFloat32()), + (n.textureColor = i.getFloat32Array(4)), + (n.sphereTextureColor = i.getFloat32Array(4)), + (n.toonColor = i.getFloat32Array(4)), + e.elements.push(n); + } + return e; + }, + t = r.metadata; + (t.morphCount = i.getUint32()), (r.morphs = []); + for (var n = 0; n < t.morphCount; n++) r.morphs.push(e()); + }, + f = function () { + var e = function () { + var e = {}; + (e.name = i.getTextBuffer()), + (e.englishName = i.getTextBuffer()), + (e.type = i.getUint8()), + (e.elementCount = i.getUint32()), + (e.elements = []); + for (var t = 0; t < e.elementCount; t++) { + var n = {}; + (n.target = i.getUint8()), + (n.index = + 0 === n.target + ? i.getIndex(r.metadata.boneIndexSize) + : i.getIndex(r.metadata.morphIndexSize)), + e.elements.push(n); + } + return e; + }, + t = r.metadata; + (t.frameCount = i.getUint32()), (r.frames = []); + for (var n = 0; n < t.frameCount; n++) r.frames.push(e()); + }, + d = function () { + var e = function () { + var e = {}; + return ( + (e.name = i.getTextBuffer()), + (e.englishName = i.getTextBuffer()), + (e.boneIndex = i.getIndex(r.metadata.boneIndexSize)), + (e.groupIndex = i.getUint8()), + (e.groupTarget = i.getUint16()), + (e.shapeType = i.getUint8()), + (e.width = i.getFloat32()), + (e.height = i.getFloat32()), + (e.depth = i.getFloat32()), + (e.position = i.getFloat32Array(3)), + (e.rotation = i.getFloat32Array(3)), + (e.weight = i.getFloat32()), + (e.positionDamping = i.getFloat32()), + (e.rotationDamping = i.getFloat32()), + (e.restitution = i.getFloat32()), + (e.friction = i.getFloat32()), + (e.type = i.getUint8()), + e + ); + }, + t = r.metadata; + (t.rigidBodyCount = i.getUint32()), (r.rigidBodies = []); + for (var n = 0; n < t.rigidBodyCount; n++) + r.rigidBodies.push(e()); + }, + h = function () { + var e = function () { + var e = {}; + return ( + (e.name = i.getTextBuffer()), + (e.englishName = i.getTextBuffer()), + (e.type = i.getUint8()), + (e.rigidBodyIndex1 = i.getIndex( + r.metadata.rigidBodyIndexSize + )), + (e.rigidBodyIndex2 = i.getIndex( + r.metadata.rigidBodyIndexSize + )), + (e.position = i.getFloat32Array(3)), + (e.rotation = i.getFloat32Array(3)), + (e.translationLimitation1 = i.getFloat32Array(3)), + (e.translationLimitation2 = i.getFloat32Array(3)), + (e.rotationLimitation1 = i.getFloat32Array(3)), + (e.rotationLimitation2 = i.getFloat32Array(3)), + (e.springPosition = i.getFloat32Array(3)), + (e.springRotation = i.getFloat32Array(3)), + e + ); + }, + t = r.metadata; + (t.constraintCount = i.getUint32()), (r.constraints = []); + for (var n = 0; n < t.constraintCount; n++) + r.constraints.push(e()); + }; + return ( + (function () { + var e = r.metadata; + if (((e.magic = i.getChars(4)), "PMX " !== e.magic)) + throw "PMX file magic is not PMX , but " + e.magic; + if ( + ((e.version = i.getFloat32()), + 2 !== e.version && 2.1 !== e.version) + ) + throw "PMX version " + e.version + " is not supported."; + (e.headerSize = i.getUint8()), + (e.encoding = i.getUint8()), + (e.additionalUvNum = i.getUint8()), + (e.vertexIndexSize = i.getUint8()), + (e.textureIndexSize = i.getUint8()), + (e.materialIndexSize = i.getUint8()), + (e.boneIndexSize = i.getUint8()), + (e.morphIndexSize = i.getUint8()), + (e.rigidBodyIndexSize = i.getUint8()), + (e.modelName = i.getTextBuffer()), + (e.englishModelName = i.getTextBuffer()), + (e.comment = i.getTextBuffer()), + (e.englishComment = i.getTextBuffer()); + })(), + a(), + o(), + s(), + l(), + u(), + c(), + f(), + d(), + h(), + !0 === t && this.leftToRightModel(r), + r + ); + }), + (i.prototype.parseVmd = function (e, t) { + var r = {}, + i = new n(e); + (r.metadata = {}), (r.metadata.coordinateSystem = "left"); + var a = function () { + var e = function () { + var e = {}; + return ( + (e.boneName = i.getSjisStringsAsUnicode(15)), + (e.frameNum = i.getUint32()), + (e.position = i.getFloat32Array(3)), + (e.rotation = i.getFloat32Array(4)), + (e.interpolation = i.getUint8Array(64)), + e + ); + }, + t = r.metadata; + (t.motionCount = i.getUint32()), (r.motions = []); + for (var n = 0; n < t.motionCount; n++) r.motions.push(e()); + }, + o = function () { + var e = function () { + var e = {}; + return ( + (e.morphName = i.getSjisStringsAsUnicode(15)), + (e.frameNum = i.getUint32()), + (e.weight = i.getFloat32()), + e + ); + }, + t = r.metadata; + (t.morphCount = i.getUint32()), (r.morphs = []); + for (var n = 0; n < t.morphCount; n++) r.morphs.push(e()); + }, + s = function () { + var e = function () { + var e = {}; + return ( + (e.frameNum = i.getUint32()), + (e.distance = i.getFloat32()), + (e.position = i.getFloat32Array(3)), + (e.rotation = i.getFloat32Array(3)), + (e.interpolation = i.getUint8Array(24)), + (e.fov = i.getUint32()), + (e.perspective = i.getUint8()), + e + ); + }, + t = r.metadata; + (t.cameraCount = i.getUint32()), (r.cameras = []); + for (var n = 0; n < t.cameraCount; n++) r.cameras.push(e()); + }; + return ( + (function () { + var e = r.metadata; + if ( + ((e.magic = i.getChars(30)), + "Vocaloid Motion Data 0002" !== e.magic) + ) + throw ( + "VMD file magic is not Vocaloid Motion Data 0002, but " + + e.magic + ); + e.name = i.getSjisStringsAsUnicode(20); + })(), + a(), + o(), + s(), + !0 === t && this.leftToRightVmd(r), + r + ); + }), + (i.prototype.parseVpd = function (e, t) { + var n = { metadata: {} }; + (n.metadata.coordinateSystem = "left"), (n.bones = []); + var r = /\/\/\w*(\r|\n|\r\n)/g, + i = /\r|\n|\r\n/, + a = e.replace(r, "").split(i); + function o() { + throw "the file seems not vpd file."; + } + function s() { + "Vocaloid Pose Data file" !== a[0] && o(); + } + function l() { + a.length < 4 && o(), + (n.metadata.parentFile = a[2]), + (n.metadata.boneCount = parseInt(a[3])); + } + function u() { + for ( + var e = /^\s*(Bone[0-9]+)\s*\{\s*(.*)$/, + t = + /^\s*(-?[0-9]+\.[0-9]+)\s*,\s*(-?[0-9]+\.[0-9]+)\s*,\s*(-?[0-9]+\.[0-9]+)\s*;/, + r = + /^\s*(-?[0-9]+\.[0-9]+)\s*,\s*(-?[0-9]+\.[0-9]+)\s*,\s*(-?[0-9]+\.[0-9]+)\s*,\s*(-?[0-9]+\.[0-9]+)\s*;/, + i = /^\s*}/, + s = n.bones, + l = null, + u = null, + c = null, + f = 4; + f < a.length; + f++ + ) { + var d, + h = a[f]; + null !== (d = h.match(e)) && (null !== l && o(), (l = d[2])), + null !== (d = h.match(t)) && + (null !== u && o(), + (u = [ + parseFloat(d[1]), + parseFloat(d[2]), + parseFloat(d[3]), + ])), + null !== (d = h.match(r)) && + (null !== c && o(), + (c = [ + parseFloat(d[1]), + parseFloat(d[2]), + parseFloat(d[3]), + parseFloat(d[4]), + ])), + null !== (d = h.match(i)) && + ((null !== l && null !== u && null !== c) || o(), + s.push({ name: l, translation: u, quaternion: c }), + (l = null), + (u = null), + (c = null)); + } + (null === l && null === u && null === c) || o(); + } + return s(), l(), u(), !0 === t && this.leftToRightVpd(n), n; + }), + (i.prototype.mergeVmds = function (e) { + var t = { metadata: {} }; + (t.metadata.name = e[0].metadata.name), + (t.metadata.coordinateSystem = e[0].metadata.coordinateSystem), + (t.metadata.motionCount = 0), + (t.metadata.morphCount = 0), + (t.metadata.cameraCount = 0), + (t.motions = []), + (t.morphs = []), + (t.cameras = []); + for (var n = 0; n < e.length; n++) { + var r = e[n]; + (t.metadata.motionCount += r.metadata.motionCount), + (t.metadata.morphCount += r.metadata.morphCount), + (t.metadata.cameraCount += r.metadata.cameraCount); + for (var i = 0; i < r.metadata.motionCount; i++) + t.motions.push(r.motions[i]); + for (i = 0; i < r.metadata.morphCount; i++) + t.morphs.push(r.morphs[i]); + for (i = 0; i < r.metadata.cameraCount; i++) + t.cameras.push(r.cameras[i]); + } + return t; + }), + (i.prototype.leftToRightModel = function (e) { + if ("right" !== e.metadata.coordinateSystem) { + e.metadata.coordinateSystem = "right"; + for (var t = new r(), n = 0; n < e.metadata.vertexCount; n++) + t.leftToRightVector3(e.vertices[n].position), + t.leftToRightVector3(e.vertices[n].normal); + for (n = 0; n < e.metadata.faceCount; n++) + t.leftToRightIndexOrder(e.faces[n].indices); + for (n = 0; n < e.metadata.boneCount; n++) + t.leftToRightVector3(e.bones[n].position); + for (n = 0; n < e.metadata.morphCount; n++) { + var i = e.morphs[n]; + if ("pmx" !== e.metadata.format || 1 === i.type) + for (var a = 0; a < i.elements.length; a++) + t.leftToRightVector3(i.elements[a].position); + } + for (n = 0; n < e.metadata.rigidBodyCount; n++) + t.leftToRightVector3(e.rigidBodies[n].position), + t.leftToRightEuler(e.rigidBodies[n].rotation); + for (n = 0; n < e.metadata.constraintCount; n++) + t.leftToRightVector3(e.constraints[n].position), + t.leftToRightEuler(e.constraints[n].rotation), + t.leftToRightVector3Range( + e.constraints[n].translationLimitation1, + e.constraints[n].translationLimitation2 + ), + t.leftToRightEulerRange( + e.constraints[n].rotationLimitation1, + e.constraints[n].rotationLimitation2 + ); + } + }), + (i.prototype.leftToRightVmd = function (e) { + if ("right" !== e.metadata.coordinateSystem) { + e.metadata.coordinateSystem = "right"; + for (var t = new r(), n = 0; n < e.metadata.motionCount; n++) + t.leftToRightVector3(e.motions[n].position), + t.leftToRightQuaternion(e.motions[n].rotation); + for (n = 0; n < e.metadata.cameraCount; n++) + t.leftToRightVector3(e.cameras[n].position), + t.leftToRightEuler(e.cameras[n].rotation); + } + }), + (i.prototype.leftToRightVpd = function (e) { + if ("right" !== e.metadata.coordinateSystem) { + e.metadata.coordinateSystem = "right"; + for (var t = new r(), n = 0; n < e.bones.length; n++) + t.leftToRightVector3(e.bones[n].translation), + t.leftToRightQuaternion(e.bones[n].quaternion); + } + }); + var a = { CharsetEncoder: t, Parser: i }; + (e.MMDParser = a), + (e.CharsetEncoder = t), + (e.Parser = i), + Object.defineProperty(e, "__esModule", { value: !0 }); + })(t); + }, + 4463: function (e, t, n) { + "use strict"; + var r = n(2791), + i = n(5585); + 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 = new Set(), + s = {}; + function l(e, t) { + u(e, t), u(e + "Capture", t); + } + function u(e, t) { + for (s[e] = t, e = 0; e < t.length; e++) o.add(t[e]); + } + var c = !( + "undefined" === typeof window || + "undefined" === typeof window.document || + "undefined" === typeof window.document.createElement + ), + f = Object.prototype.hasOwnProperty, + d = + /^[: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]*$/, + h = {}, + p = {}; + function v(e, t, n, r, i, a, o) { + (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 = a), + (this.removeEmptyString = o); + } + var m = {}; + "children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style" + .split(" ") + .forEach(function (e) { + m[e] = new v(e, 0, !1, e, null, !1, !1); + }), + [ + ["acceptCharset", "accept-charset"], + ["className", "class"], + ["htmlFor", "for"], + ["httpEquiv", "http-equiv"], + ].forEach(function (e) { + var t = e[0]; + m[t] = new v(t, 1, !1, e[1], null, !1, !1); + }), + ["contentEditable", "draggable", "spellCheck", "value"].forEach( + function (e) { + m[e] = new v(e, 2, !1, e.toLowerCase(), null, !1, !1); + } + ), + [ + "autoReverse", + "externalResourcesRequired", + "focusable", + "preserveAlpha", + ].forEach(function (e) { + m[e] = new v(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) { + m[e] = new v(e, 3, !1, e.toLowerCase(), null, !1, !1); + }), + ["checked", "multiple", "muted", "selected"].forEach(function (e) { + m[e] = new v(e, 3, !0, e, null, !1, !1); + }), + ["capture", "download"].forEach(function (e) { + m[e] = new v(e, 4, !1, e, null, !1, !1); + }), + ["cols", "rows", "size", "span"].forEach(function (e) { + m[e] = new v(e, 6, !1, e, null, !1, !1); + }), + ["rowSpan", "start"].forEach(function (e) { + m[e] = new v(e, 5, !1, e.toLowerCase(), null, !1, !1); + }); + var g = /[\-:]([a-z])/g; + function A(e) { + return e[1].toUpperCase(); + } + function y(e, t, n, r) { + var i = m.hasOwnProperty(t) ? m[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 ( + !!f.call(p, e) || + (!f.call(h, e) && + (d.test(e) ? (p[e] = !0) : ((h[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(g, A); + m[t] = new v(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(g, A); + m[t] = new v(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(g, A); + m[t] = new v( + t, + 1, + !1, + e, + "http://www.w3.org/XML/1998/namespace", + !1, + !1 + ); + }), + ["tabIndex", "crossOrigin"].forEach(function (e) { + m[e] = new v(e, 1, !1, e.toLowerCase(), null, !1, !1); + }), + (m.xlinkHref = new v( + "xlinkHref", + 1, + !1, + "xlink:href", + "http://www.w3.org/1999/xlink", + !0, + !1 + )), + ["src", "href", "action", "formAction"].forEach(function (e) { + m[e] = new v(e, 1, !1, e.toLowerCase(), null, !0, !0); + }); + var b = r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED, + x = Symbol.for("react.element"), + S = Symbol.for("react.portal"), + E = Symbol.for("react.fragment"), + _ = Symbol.for("react.strict_mode"), + C = Symbol.for("react.profiler"), + w = Symbol.for("react.provider"), + T = Symbol.for("react.context"), + M = Symbol.for("react.forward_ref"), + I = Symbol.for("react.suspense"), + k = Symbol.for("react.suspense_list"), + R = Symbol.for("react.memo"), + B = Symbol.for("react.lazy"); + Symbol.for("react.scope"), Symbol.for("react.debug_trace_mode"); + var P = Symbol.for("react.offscreen"); + Symbol.for("react.legacy_hidden"), + Symbol.for("react.cache"), + Symbol.for("react.tracing_marker"); + var L = Symbol.iterator; + function D(e) { + return null === e || "object" !== typeof e + ? null + : "function" === typeof (e = (L && e[L]) || e["@@iterator"]) + ? e + : null; + } + var U, + F = Object.assign; + function O(e) { + if (void 0 === U) + try { + throw Error(); + } catch (n) { + var t = n.stack.trim().match(/\n( *(at )?)/); + U = (t && t[1]) || ""; + } + return "\n" + U + e; + } + var N = !1; + function G(e, t) { + if (!e || N) return ""; + N = !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 (u) { + var r = u; + } + Reflect.construct(e, [], t); + } else { + try { + t.call(); + } catch (u) { + r = u; + } + e.call(t.prototype); + } + else { + try { + throw Error(); + } catch (u) { + r = u; + } + e(); + } + } catch (u) { + if (u && r && "string" === typeof u.stack) { + for ( + var i = u.stack.split("\n"), + a = r.stack.split("\n"), + o = i.length - 1, + s = a.length - 1; + 1 <= o && 0 <= s && i[o] !== a[s]; + + ) + s--; + for (; 1 <= o && 0 <= s; o--, s--) + if (i[o] !== a[s]) { + if (1 !== o || 1 !== s) + do { + if ((o--, 0 > --s || i[o] !== a[s])) { + var l = "\n" + i[o].replace(" at new ", " at "); + return ( + e.displayName && + l.includes("") && + (l = l.replace("", e.displayName)), + l + ); + } + } while (1 <= o && 0 <= s); + break; + } + } + } finally { + (N = !1), (Error.prepareStackTrace = n); + } + return (e = e ? e.displayName || e.name : "") ? O(e) : ""; + } + function Z(e) { + switch (e.tag) { + case 5: + return O(e.type); + case 16: + return O("Lazy"); + case 13: + return O("Suspense"); + case 19: + return O("SuspenseList"); + case 0: + case 2: + case 15: + return (e = G(e.type, !1)); + case 11: + return (e = G(e.type.render, !1)); + case 1: + return (e = G(e.type, !0)); + default: + return ""; + } + } + function z(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 E: + return "Fragment"; + case S: + return "Portal"; + case C: + return "Profiler"; + case _: + return "StrictMode"; + case I: + return "Suspense"; + case k: + return "SuspenseList"; + } + if ("object" === typeof e) + switch (e.$$typeof) { + case T: + return (e.displayName || "Context") + ".Consumer"; + case w: + 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 R: + return null !== (t = e.displayName || null) + ? t + : z(e.type) || "Memo"; + case B: + (t = e._payload), (e = e._init); + try { + return z(e(t)); + } catch (n) {} + } + return null; + } + function Q(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 z(t); + case 8: + return t === _ ? "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 H(e) { + switch (typeof e) { + case "boolean": + case "number": + case "string": + case "undefined": + case "object": + return e; + default: + return ""; + } + } + function V(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 = V(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, + a = n.set; + return ( + Object.defineProperty(e, t, { + configurable: !0, + get: function () { + return i.call(this); + }, + set: function (e) { + (r = "" + e), a.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 W(e) { + if (!e) return !1; + var t = e._valueTracker; + if (!t) return !0; + var n = t.getValue(), + r = ""; + return ( + e && (r = V(e) ? (e.checked ? "true" : "false") : e.value), + (e = r) !== n && (t.setValue(e), !0) + ); + } + function X(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 Y(e, t) { + var n = t.checked; + return F({}, t, { + defaultChecked: void 0, + defaultValue: void 0, + value: void 0, + checked: null != n ? n : e._wrapperState.initialChecked, + }); + } + function q(e, t) { + var n = null == t.defaultValue ? "" : t.defaultValue, + r = null != t.checked ? t.checked : t.defaultChecked; + (n = H(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 J(e, t) { + null != (t = t.checked) && y(e, "checked", t, !1); + } + function K(e, t) { + J(e, t); + var n = H(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, H(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 && X(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 = "" + H(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(a(91)); + return F({}, 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(a(92)); + if (te(n)) { + if (1 < n.length) throw Error(a(93)); + n = n[0]; + } + t = n; + } + null == t && (t = ""), (n = t); + } + e._wrapperState = { initialValue: H(n) }; + } + function ae(e, t) { + var n = H(t.value), + r = H(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 oe(e) { + var t = e.textContent; + t === e._wrapperState.initialValue && + "" !== t && + null !== t && + (e.value = t); + } + function se(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 + ? se(t) + : "http://www.w3.org/2000/svg" === e && "foreignObject" === t + ? "http://www.w3.org/1999/xhtml" + : e; + } + var ue, + ce, + fe = + ((ce = function (e, t) { + if ( + "http://www.w3.org/2000/svg" !== e.namespaceURI || + "innerHTML" in e + ) + e.innerHTML = t; + else { + for ( + (ue = ue || document.createElement("div")).innerHTML = + "" + t.valueOf().toString() + "", + t = ue.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 ce(e, t); + }); + } + : ce); + function de(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 he = { + 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, + }, + pe = ["Webkit", "ms", "Moz", "O"]; + function ve(e, t, n) { + return null == t || "boolean" === typeof t || "" === t + ? "" + : n || + "number" !== typeof t || + 0 === t || + (he.hasOwnProperty(e) && he[e]) + ? ("" + t).trim() + : t + "px"; + } + function me(e, t) { + for (var n in ((e = e.style), t)) + if (t.hasOwnProperty(n)) { + var r = 0 === n.indexOf("--"), + i = ve(n, t[n], r); + "float" === n && (n = "cssFloat"), + r ? e.setProperty(n, i) : (e[n] = i); + } + } + Object.keys(he).forEach(function (e) { + pe.forEach(function (t) { + (t = t + e.charAt(0).toUpperCase() + e.substring(1)), + (he[t] = he[e]); + }); + }); + var ge = F( + { 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 Ae(e, t) { + if (t) { + if ( + ge[e] && + (null != t.children || null != t.dangerouslySetInnerHTML) + ) + throw Error(a(137, e)); + if (null != t.dangerouslySetInnerHTML) { + if (null != t.children) throw Error(a(60)); + if ( + "object" !== typeof t.dangerouslySetInnerHTML || + !("__html" in t.dangerouslySetInnerHTML) + ) + throw Error(a(61)); + } + if (null != t.style && "object" !== typeof t.style) + throw Error(a(62)); + } + } + function ye(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 xe(e) { + return ( + (e = e.target || e.srcElement || window).correspondingUseElement && + (e = e.correspondingUseElement), + 3 === e.nodeType ? e.parentNode : e + ); + } + var Se = null, + Ee = null, + _e = null; + function Ce(e) { + if ((e = yi(e))) { + if ("function" !== typeof Se) throw Error(a(280)); + var t = e.stateNode; + t && ((t = xi(t)), Se(e.stateNode, e.type, t)); + } + } + function we(e) { + Ee ? (_e ? _e.push(e) : (_e = [e])) : (Ee = e); + } + function Te() { + if (Ee) { + var e = Ee, + t = _e; + if (((_e = Ee = null), Ce(e), t)) + for (e = 0; e < t.length; e++) Ce(t[e]); + } + } + function Me(e, t) { + return e(t); + } + function Ie() {} + var ke = !1; + function Re(e, t, n) { + if (ke) return e(t, n); + ke = !0; + try { + return Me(e, t, n); + } finally { + (ke = !1), (null !== Ee || null !== _e) && (Ie(), Te()); + } + } + function Be(e, t) { + var n = e.stateNode; + if (null === n) return null; + var r = xi(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(a(231, t, typeof n)); + return n; + } + var Pe = !1; + if (c) + try { + var Le = {}; + Object.defineProperty(Le, "passive", { + get: function () { + Pe = !0; + }, + }), + window.addEventListener("test", Le, Le), + window.removeEventListener("test", Le, Le); + } catch (ce) { + Pe = !1; + } + function De(e, t, n, r, i, a, o, s, l) { + var u = Array.prototype.slice.call(arguments, 3); + try { + t.apply(n, u); + } catch (c) { + this.onError(c); + } + } + var Ue = !1, + Fe = null, + Oe = !1, + Ne = null, + Ge = { + onError: function (e) { + (Ue = !0), (Fe = e); + }, + }; + function Ze(e, t, n, r, i, a, o, s, l) { + (Ue = !1), (Fe = null), De.apply(Ge, arguments); + } + function ze(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 Qe(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 He(e) { + if (ze(e) !== e) throw Error(a(188)); + } + function Ve(e) { + return null !== + (e = (function (e) { + var t = e.alternate; + if (!t) { + if (null === (t = ze(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 o = i.alternate; + if (null === o) { + if (null !== (r = i.return)) { + n = r; + continue; + } + break; + } + if (i.child === o.child) { + for (o = i.child; o; ) { + if (o === n) return He(i), e; + if (o === r) return He(i), t; + o = o.sibling; + } + throw Error(a(188)); + } + if (n.return !== r.return) (n = i), (r = o); + else { + for (var s = !1, l = i.child; l; ) { + if (l === n) { + (s = !0), (n = i), (r = o); + break; + } + if (l === r) { + (s = !0), (r = i), (n = o); + break; + } + l = l.sibling; + } + if (!s) { + for (l = o.child; l; ) { + if (l === n) { + (s = !0), (n = o), (r = i); + break; + } + if (l === r) { + (s = !0), (r = o), (n = i); + break; + } + l = l.sibling; + } + if (!s) 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; + })(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 We = i.unstable_scheduleCallback, + Xe = i.unstable_cancelCallback, + Ye = i.unstable_shouldYield, + qe = i.unstable_requestPaint, + Je = i.unstable_now, + Ke = 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, + at = null; + var ot = Math.clz32 + ? Math.clz32 + : function (e) { + return (e >>>= 0), 0 === e ? 32 : (31 - ((st(e) / lt) | 0)) | 0; + }, + st = Math.log, + lt = Math.LN2; + var ut = 64, + ct = 4194304; + function ft(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 dt(e, t) { + var n = e.pendingLanes; + if (0 === n) return 0; + var r = 0, + i = e.suspendedLanes, + a = e.pingedLanes, + o = 268435455 & n; + if (0 !== o) { + var s = o & ~i; + 0 !== s ? (r = ft(s)) : 0 !== (a &= o) && (r = ft(a)); + } else 0 !== (o = n & ~i) ? (r = ft(o)) : 0 !== a && (r = ft(a)); + if (0 === r) return 0; + if ( + 0 !== t && + t !== r && + 0 === (t & i) && + ((i = r & -r) >= (a = t & -t) || (16 === i && 0 !== (4194240 & a))) + ) + 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 - ot(t))), (r |= e[n]), (t &= ~i); + return r; + } + function ht(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 pt(e) { + return 0 !== (e = -1073741825 & e.pendingLanes) + ? e + : 1073741824 & e + ? 1073741824 + : 0; + } + function vt() { + var e = ut; + return 0 === (4194240 & (ut <<= 1)) && (ut = 64), e; + } + function mt(e) { + for (var t = [], n = 0; 31 > n; n++) t.push(e); + return t; + } + function gt(e, t, n) { + (e.pendingLanes |= t), + 536870912 !== t && ((e.suspendedLanes = 0), (e.pingedLanes = 0)), + ((e = e.eventTimes)[(t = 31 - ot(t))] = n); + } + function At(e, t) { + var n = (e.entangledLanes |= t); + for (e = e.entanglements; n; ) { + var r = 31 - ot(n), + i = 1 << r; + (i & t) | (e[r] & t) && (e[r] |= t), (n &= ~i); + } + } + var yt = 0; + function bt(e) { + return 1 < (e &= -e) + ? 4 < e + ? 0 !== (268435455 & e) + ? 16 + : 536870912 + : 4 + : 1; + } + var xt, + St, + Et, + _t, + Ct, + wt = !1, + Tt = [], + Mt = null, + It = null, + kt = null, + Rt = new Map(), + Bt = new Map(), + Pt = [], + Lt = + "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 Dt(e, t) { + switch (e) { + case "focusin": + case "focusout": + Mt = null; + break; + case "dragenter": + case "dragleave": + It = null; + break; + case "mouseover": + case "mouseout": + kt = null; + break; + case "pointerover": + case "pointerout": + Rt.delete(t.pointerId); + break; + case "gotpointercapture": + case "lostpointercapture": + Bt.delete(t.pointerId); + } + } + function Ut(e, t, n, r, i, a) { + return null === e || e.nativeEvent !== a + ? ((e = { + blockedOn: t, + domEventName: n, + eventSystemFlags: r, + nativeEvent: a, + targetContainers: [i], + }), + null !== t && null !== (t = yi(t)) && St(t), + e) + : ((e.eventSystemFlags |= r), + (t = e.targetContainers), + null !== i && -1 === t.indexOf(i) && t.push(i), + e); + } + function Ft(e) { + var t = Ai(e.target); + if (null !== t) { + var n = ze(t); + if (null !== n) + if (13 === (t = n.tag)) { + if (null !== (t = Qe(n))) + return ( + (e.blockedOn = t), + void Ct(e.priority, function () { + Et(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 Ot(e) { + if (null !== e.blockedOn) return !1; + for (var t = e.targetContainers; 0 < t.length; ) { + var n = Yt(e.domEventName, e.eventSystemFlags, t[0], e.nativeEvent); + if (null !== n) + return null !== (t = yi(n)) && St(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 Nt(e, t, n) { + Ot(e) && n.delete(t); + } + function Gt() { + (wt = !1), + null !== Mt && Ot(Mt) && (Mt = null), + null !== It && Ot(It) && (It = null), + null !== kt && Ot(kt) && (kt = null), + Rt.forEach(Nt), + Bt.forEach(Nt); + } + function Zt(e, t) { + e.blockedOn === t && + ((e.blockedOn = null), + wt || + ((wt = !0), + i.unstable_scheduleCallback(i.unstable_NormalPriority, Gt))); + } + function zt(e) { + function t(t) { + return Zt(t, e); + } + if (0 < Tt.length) { + Zt(Tt[0], e); + for (var n = 1; n < Tt.length; n++) { + var r = Tt[n]; + r.blockedOn === e && (r.blockedOn = null); + } + } + for ( + null !== Mt && Zt(Mt, e), + null !== It && Zt(It, e), + null !== kt && Zt(kt, e), + Rt.forEach(t), + Bt.forEach(t), + n = 0; + n < Pt.length; + n++ + ) + (r = Pt[n]).blockedOn === e && (r.blockedOn = null); + for (; 0 < Pt.length && null === (n = Pt[0]).blockedOn; ) + Ft(n), null === n.blockedOn && Pt.shift(); + } + var Qt = b.ReactCurrentBatchConfig, + Ht = !0; + function Vt(e, t, n, r) { + var i = yt, + a = Qt.transition; + Qt.transition = null; + try { + (yt = 1), Wt(e, t, n, r); + } finally { + (yt = i), (Qt.transition = a); + } + } + function jt(e, t, n, r) { + var i = yt, + a = Qt.transition; + Qt.transition = null; + try { + (yt = 4), Wt(e, t, n, r); + } finally { + (yt = i), (Qt.transition = a); + } + } + function Wt(e, t, n, r) { + if (Ht) { + var i = Yt(e, t, n, r); + if (null === i) Hr(e, t, r, Xt, n), Dt(e, r); + else if ( + (function (e, t, n, r, i) { + switch (t) { + case "focusin": + return (Mt = Ut(Mt, e, t, n, r, i)), !0; + case "dragenter": + return (It = Ut(It, e, t, n, r, i)), !0; + case "mouseover": + return (kt = Ut(kt, e, t, n, r, i)), !0; + case "pointerover": + var a = i.pointerId; + return Rt.set(a, Ut(Rt.get(a) || null, e, t, n, r, i)), !0; + case "gotpointercapture": + return ( + (a = i.pointerId), + Bt.set(a, Ut(Bt.get(a) || null, e, t, n, r, i)), + !0 + ); + } + return !1; + })(i, e, t, n, r) + ) + r.stopPropagation(); + else if ((Dt(e, r), 4 & t && -1 < Lt.indexOf(e))) { + for (; null !== i; ) { + var a = yi(i); + if ( + (null !== a && xt(a), + null === (a = Yt(e, t, n, r)) && Hr(e, t, r, Xt, n), + a === i) + ) + break; + i = a; + } + null !== i && r.stopPropagation(); + } else Hr(e, t, r, null, n); + } + } + var Xt = null; + function Yt(e, t, n, r) { + if (((Xt = null), null !== (e = Ai((e = xe(r)))))) + if (null === (t = ze(e))) e = null; + else if (13 === (n = t.tag)) { + if (null !== (e = Qe(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 (Xt = e), null; + } + function qt(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 (Ke()) { + 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 Jt = null, + Kt = null, + $t = null; + function en() { + if ($t) return $t; + var e, + t, + n = Kt, + r = n.length, + i = "value" in Jt ? Jt.value : Jt.textContent, + a = i.length; + for (e = 0; e < r && n[e] === i[e]; e++); + var o = r - e; + for (t = 1; t <= o && n[r - t] === i[a - 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 an(e) { + function t(t, n, r, i, a) { + for (var o in ((this._reactName = t), + (this._targetInst = r), + (this.type = n), + (this.nativeEvent = i), + (this.target = a), + (this.currentTarget = null), + e)) + e.hasOwnProperty(o) && ((t = e[o]), (this[o] = t ? t(i) : i[o])); + return ( + (this.isDefaultPrevented = ( + null != i.defaultPrevented + ? i.defaultPrevented + : !1 === i.returnValue + ) + ? nn + : rn), + (this.isPropagationStopped = rn), + this + ); + } + return ( + F(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 on, + sn, + ln, + un = { + eventPhase: 0, + bubbles: 0, + cancelable: 0, + timeStamp: function (e) { + return e.timeStamp || Date.now(); + }, + defaultPrevented: 0, + isTrusted: 0, + }, + cn = an(un), + fn = F({}, un, { view: 0, detail: 0 }), + dn = an(fn), + hn = F({}, fn, { + screenX: 0, + screenY: 0, + clientX: 0, + clientY: 0, + pageX: 0, + pageY: 0, + ctrlKey: 0, + shiftKey: 0, + altKey: 0, + metaKey: 0, + getModifierState: Cn, + 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 + ? ((on = e.screenX - ln.screenX), + (sn = e.screenY - ln.screenY)) + : (sn = on = 0), + (ln = e)), + on); + }, + movementY: function (e) { + return "movementY" in e ? e.movementY : sn; + }, + }), + pn = an(hn), + vn = an(F({}, hn, { dataTransfer: 0 })), + mn = an(F({}, fn, { relatedTarget: 0 })), + gn = an( + F({}, un, { animationName: 0, elapsedTime: 0, pseudoElement: 0 }) + ), + An = F({}, un, { + clipboardData: function (e) { + return "clipboardData" in e + ? e.clipboardData + : window.clipboardData; + }, + }), + yn = an(An), + bn = an(F({}, un, { data: 0 })), + xn = { + Esc: "Escape", + Spacebar: " ", + Left: "ArrowLeft", + Up: "ArrowUp", + Right: "ArrowRight", + Down: "ArrowDown", + Del: "Delete", + Win: "OS", + Menu: "ContextMenu", + Apps: "ContextMenu", + Scroll: "ScrollLock", + MozPrintableKey: "Unidentified", + }, + Sn = { + 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", + }, + En = { + Alt: "altKey", + Control: "ctrlKey", + Meta: "metaKey", + Shift: "shiftKey", + }; + function _n(e) { + var t = this.nativeEvent; + return t.getModifierState + ? t.getModifierState(e) + : !!(e = En[e]) && !!t[e]; + } + function Cn() { + return _n; + } + var wn = F({}, fn, { + key: function (e) { + if (e.key) { + var t = xn[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 + ? Sn[e.keyCode] || "Unidentified" + : ""; + }, + code: 0, + location: 0, + ctrlKey: 0, + shiftKey: 0, + altKey: 0, + metaKey: 0, + repeat: 0, + locale: 0, + getModifierState: Cn, + 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; + }, + }), + Tn = an(wn), + Mn = an( + F({}, hn, { + pointerId: 0, + width: 0, + height: 0, + pressure: 0, + tangentialPressure: 0, + tiltX: 0, + tiltY: 0, + twist: 0, + pointerType: 0, + isPrimary: 0, + }) + ), + In = an( + F({}, fn, { + touches: 0, + targetTouches: 0, + changedTouches: 0, + altKey: 0, + metaKey: 0, + ctrlKey: 0, + shiftKey: 0, + getModifierState: Cn, + }) + ), + kn = an( + F({}, un, { propertyName: 0, elapsedTime: 0, pseudoElement: 0 }) + ), + Rn = F({}, hn, { + 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, + }), + Bn = an(Rn), + Pn = [9, 13, 27, 32], + Ln = c && "CompositionEvent" in window, + Dn = null; + c && "documentMode" in document && (Dn = document.documentMode); + var Un = c && "TextEvent" in window && !Dn, + Fn = c && (!Ln || (Dn && 8 < Dn && 11 >= Dn)), + On = String.fromCharCode(32), + Nn = !1; + function Gn(e, t) { + switch (e) { + case "keyup": + return -1 !== Pn.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 zn = !1; + var Qn = { + 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 Hn(e) { + var t = e && e.nodeName && e.nodeName.toLowerCase(); + return "input" === t ? !!Qn[e.type] : "textarea" === t; + } + function Vn(e, t, n, r) { + we(r), + 0 < (t = jr(t, "onChange")).length && + ((n = new cn("onChange", "change", null, n, r)), + e.push({ event: n, listeners: t })); + } + var jn = null, + Wn = null; + function Xn(e) { + Or(e, 0); + } + function Yn(e) { + if (W(bi(e))) return e; + } + function qn(e, t) { + if ("change" === e) return t; + } + var Jn = !1; + if (c) { + var Kn; + if (c) { + var $n = "oninput" in document; + if (!$n) { + var er = document.createElement("div"); + er.setAttribute("oninput", "return;"), + ($n = "function" === typeof er.oninput); + } + Kn = $n; + } else Kn = !1; + Jn = Kn && (!document.documentMode || 9 < document.documentMode); + } + function tr() { + jn && (jn.detachEvent("onpropertychange", nr), (Wn = jn = null)); + } + function nr(e) { + if ("value" === e.propertyName && Yn(Wn)) { + var t = []; + Vn(t, Wn, e, xe(e)), Re(Xn, t); + } + } + function rr(e, t, n) { + "focusin" === e + ? (tr(), (Wn = n), (jn = t).attachEvent("onpropertychange", nr)) + : "focusout" === e && tr(); + } + function ir(e) { + if ("selectionchange" === e || "keyup" === e || "keydown" === e) + return Yn(Wn); + } + function ar(e, t) { + if ("click" === e) return Yn(t); + } + function or(e, t) { + if ("input" === e || "change" === e) return Yn(t); + } + var sr = + "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 (sr(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 (!f.call(t, i) || !sr(e[i], t[i])) return !1; + } + return !0; + } + function ur(e) { + for (; e && e.firstChild; ) e = e.firstChild; + return e; + } + function cr(e, t) { + var n, + r = ur(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 = ur(r); + } + } + function fr(e, t) { + return ( + !(!e || !t) && + (e === t || + ((!e || 3 !== e.nodeType) && + (t && 3 === t.nodeType + ? fr(e, t.parentNode) + : "contains" in e + ? e.contains(t) + : !!e.compareDocumentPosition && + !!(16 & e.compareDocumentPosition(t))))) + ); + } + function dr() { + for (var e = window, t = X(); t instanceof e.HTMLIFrameElement; ) { + try { + var n = "string" === typeof t.contentWindow.location.href; + } catch (r) { + n = !1; + } + if (!n) break; + t = X((e = t.contentWindow).document); + } + return t; + } + function hr(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 pr(e) { + var t = dr(), + n = e.focusedElem, + r = e.selectionRange; + if ( + t !== n && + n && + n.ownerDocument && + fr(n.ownerDocument.documentElement, n) + ) { + if (null !== r && hr(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, + a = Math.min(r.start, i); + (r = void 0 === r.end ? a : Math.min(r.end, i)), + !e.extend && a > r && ((i = r), (r = a), (a = i)), + (i = cr(n, a)); + var o = cr(n, r); + i && + o && + (1 !== e.rangeCount || + e.anchorNode !== i.node || + e.anchorOffset !== i.offset || + e.focusNode !== o.node || + e.focusOffset !== o.offset) && + ((t = t.createRange()).setStart(i.node, i.offset), + e.removeAllRanges(), + a > r + ? (e.addRange(t), e.extend(o.node, o.offset)) + : (t.setEnd(o.node, o.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 vr = c && "documentMode" in document && 11 >= document.documentMode, + mr = null, + gr = null, + Ar = null, + yr = !1; + function br(e, t, n) { + var r = + n.window === n + ? n.document + : 9 === n.nodeType + ? n + : n.ownerDocument; + yr || + null == mr || + mr !== X(r) || + ("selectionStart" in (r = mr) && hr(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, + }), + (Ar && lr(Ar, r)) || + ((Ar = r), + 0 < (r = jr(gr, "onSelect")).length && + ((t = new cn("onSelect", "select", null, t, n)), + e.push({ event: t, listeners: r }), + (t.target = mr)))); + } + function xr(e, t) { + var n = {}; + return ( + (n[e.toLowerCase()] = t.toLowerCase()), + (n["Webkit" + e] = "webkit" + t), + (n["Moz" + e] = "moz" + t), + n + ); + } + var Sr = { + animationend: xr("Animation", "AnimationEnd"), + animationiteration: xr("Animation", "AnimationIteration"), + animationstart: xr("Animation", "AnimationStart"), + transitionend: xr("Transition", "TransitionEnd"), + }, + Er = {}, + _r = {}; + function Cr(e) { + if (Er[e]) return Er[e]; + if (!Sr[e]) return e; + var t, + n = Sr[e]; + for (t in n) + if (n.hasOwnProperty(t) && t in _r) return (Er[e] = n[t]); + return e; + } + c && + ((_r = document.createElement("div").style), + "AnimationEvent" in window || + (delete Sr.animationend.animation, + delete Sr.animationiteration.animation, + delete Sr.animationstart.animation), + "TransitionEvent" in window || delete Sr.transitionend.transition); + var wr = Cr("animationend"), + Tr = Cr("animationiteration"), + Mr = Cr("animationstart"), + Ir = Cr("transitionend"), + kr = new Map(), + Rr = + "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 Br(e, t) { + kr.set(e, t), l(t, [e]); + } + for (var Pr = 0; Pr < Rr.length; Pr++) { + var Lr = Rr[Pr]; + Br(Lr.toLowerCase(), "on" + (Lr[0].toUpperCase() + Lr.slice(1))); + } + Br(wr, "onAnimationEnd"), + Br(Tr, "onAnimationIteration"), + Br(Mr, "onAnimationStart"), + Br("dblclick", "onDoubleClick"), + Br("focusin", "onFocus"), + Br("focusout", "onBlur"), + Br(Ir, "onTransitionEnd"), + u("onMouseEnter", ["mouseout", "mouseover"]), + u("onMouseLeave", ["mouseout", "mouseover"]), + u("onPointerEnter", ["pointerout", "pointerover"]), + u("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 Dr = + "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( + " " + ), + Ur = new Set( + "cancel close invalid load scroll toggle".split(" ").concat(Dr) + ); + function Fr(e, t, n) { + var r = e.type || "unknown-event"; + (e.currentTarget = n), + (function (e, t, n, r, i, o, s, l, u) { + if ((Ze.apply(this, arguments), Ue)) { + if (!Ue) throw Error(a(198)); + var c = Fe; + (Ue = !1), (Fe = null), Oe || ((Oe = !0), (Ne = c)); + } + })(r, t, void 0, e), + (e.currentTarget = null); + } + function Or(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 a = void 0; + if (t) + for (var o = r.length - 1; 0 <= o; o--) { + var s = r[o], + l = s.instance, + u = s.currentTarget; + if (((s = s.listener), l !== a && i.isPropagationStopped())) + break e; + Fr(i, s, u), (a = l); + } + else + for (o = 0; o < r.length; o++) { + if ( + ((l = (s = r[o]).instance), + (u = s.currentTarget), + (s = s.listener), + l !== a && i.isPropagationStopped()) + ) + break e; + Fr(i, s, u), (a = l); + } + } + } + if (Oe) throw ((e = Ne), (Oe = !1), (Ne = null), e); + } + function Nr(e, t) { + var n = t[vi]; + void 0 === n && (n = t[vi] = new Set()); + var r = e + "__bubble"; + n.has(r) || (Qr(t, e, 2, !1), n.add(r)); + } + function Gr(e, t, n) { + var r = 0; + t && (r |= 4), Qr(n, e, r, t); + } + var Zr = "_reactListening" + Math.random().toString(36).slice(2); + function zr(e) { + if (!e[Zr]) { + (e[Zr] = !0), + o.forEach(function (t) { + "selectionchange" !== t && + (Ur.has(t) || Gr(t, !1, e), Gr(t, !0, e)); + }); + var t = 9 === e.nodeType ? e : e.ownerDocument; + null === t || t[Zr] || ((t[Zr] = !0), Gr("selectionchange", !1, t)); + } + } + function Qr(e, t, n, r) { + switch (qt(t)) { + case 1: + var i = Vt; + break; + case 4: + i = jt; + break; + default: + i = Wt; + } + (n = i.bind(null, t, n, e)), + (i = void 0), + !Pe || + ("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 Hr(e, t, n, r, i) { + var a = r; + if (0 === (1 & t) && 0 === (2 & t) && null !== r) + e: for (;;) { + if (null === r) return; + var o = r.tag; + if (3 === o || 4 === o) { + var s = r.stateNode.containerInfo; + if (s === i || (8 === s.nodeType && s.parentNode === i)) break; + if (4 === o) + for (o = r.return; null !== o; ) { + var l = o.tag; + if ( + (3 === l || 4 === l) && + ((l = o.stateNode.containerInfo) === i || + (8 === l.nodeType && l.parentNode === i)) + ) + return; + o = o.return; + } + for (; null !== s; ) { + if (null === (o = Ai(s))) return; + if (5 === (l = o.tag) || 6 === l) { + r = a = o; + continue e; + } + s = s.parentNode; + } + } + r = r.return; + } + Re(function () { + var r = a, + i = xe(n), + o = []; + e: { + var s = kr.get(e); + if (void 0 !== s) { + var l = cn, + u = e; + switch (e) { + case "keypress": + if (0 === tn(n)) break e; + case "keydown": + case "keyup": + l = Tn; + break; + case "focusin": + (u = "focus"), (l = mn); + break; + case "focusout": + (u = "blur"), (l = mn); + break; + case "beforeblur": + case "afterblur": + l = mn; + 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 = pn; + break; + case "drag": + case "dragend": + case "dragenter": + case "dragexit": + case "dragleave": + case "dragover": + case "dragstart": + case "drop": + l = vn; + break; + case "touchcancel": + case "touchend": + case "touchmove": + case "touchstart": + l = In; + break; + case wr: + case Tr: + case Mr: + l = gn; + break; + case Ir: + l = kn; + break; + case "scroll": + l = dn; + break; + case "wheel": + l = Bn; + break; + case "copy": + case "cut": + case "paste": + l = yn; + break; + case "gotpointercapture": + case "lostpointercapture": + case "pointercancel": + case "pointerdown": + case "pointermove": + case "pointerout": + case "pointerover": + case "pointerup": + l = Mn; + } + var c = 0 !== (4 & t), + f = !c && "scroll" === e, + d = c ? (null !== s ? s + "Capture" : null) : s; + c = []; + for (var h, p = r; null !== p; ) { + var v = (h = p).stateNode; + if ( + (5 === h.tag && + null !== v && + ((h = v), + null !== d && + null != (v = Be(p, d)) && + c.push(Vr(p, v, h))), + f) + ) + break; + p = p.return; + } + 0 < c.length && + ((s = new l(s, u, null, n, i)), + o.push({ event: s, listeners: c })); + } + } + if (0 === (7 & t)) { + if ( + ((l = "mouseout" === e || "pointerout" === e), + (!(s = "mouseover" === e || "pointerover" === e) || + n === be || + !(u = n.relatedTarget || n.fromElement) || + (!Ai(u) && !u[pi])) && + (l || s) && + ((s = + i.window === i + ? i + : (s = i.ownerDocument) + ? s.defaultView || s.parentWindow + : window), + l + ? ((l = r), + null !== + (u = (u = n.relatedTarget || n.toElement) + ? Ai(u) + : null) && + (u !== (f = ze(u)) || (5 !== u.tag && 6 !== u.tag)) && + (u = null)) + : ((l = null), (u = r)), + l !== u)) + ) { + if ( + ((c = pn), + (v = "onMouseLeave"), + (d = "onMouseEnter"), + (p = "mouse"), + ("pointerout" !== e && "pointerover" !== e) || + ((c = Mn), + (v = "onPointerLeave"), + (d = "onPointerEnter"), + (p = "pointer")), + (f = null == l ? s : bi(l)), + (h = null == u ? s : bi(u)), + ((s = new c(v, p + "leave", l, n, i)).target = f), + (s.relatedTarget = h), + (v = null), + Ai(i) === r && + (((c = new c(d, p + "enter", u, n, i)).target = h), + (c.relatedTarget = f), + (v = c)), + (f = v), + l && u) + ) + e: { + for (d = u, p = 0, h = c = l; h; h = Wr(h)) p++; + for (h = 0, v = d; v; v = Wr(v)) h++; + for (; 0 < p - h; ) (c = Wr(c)), p--; + for (; 0 < h - p; ) (d = Wr(d)), h--; + for (; p--; ) { + if (c === d || (null !== d && c === d.alternate)) break e; + (c = Wr(c)), (d = Wr(d)); + } + c = null; + } + else c = null; + null !== l && Xr(o, s, l, c, !1), + null !== u && null !== f && Xr(o, f, u, c, !0); + } + if ( + "select" === + (l = + (s = r ? bi(r) : window).nodeName && + s.nodeName.toLowerCase()) || + ("input" === l && "file" === s.type) + ) + var m = qn; + else if (Hn(s)) + if (Jn) m = or; + else { + m = ir; + var g = rr; + } + else + (l = s.nodeName) && + "input" === l.toLowerCase() && + ("checkbox" === s.type || "radio" === s.type) && + (m = ar); + switch ( + (m && (m = m(e, r)) + ? Vn(o, m, n, i) + : (g && g(e, s, r), + "focusout" === e && + (g = s._wrapperState) && + g.controlled && + "number" === s.type && + ee(s, "number", s.value)), + (g = r ? bi(r) : window), + e) + ) { + case "focusin": + (Hn(g) || "true" === g.contentEditable) && + ((mr = g), (gr = r), (Ar = null)); + break; + case "focusout": + Ar = gr = mr = null; + break; + case "mousedown": + yr = !0; + break; + case "contextmenu": + case "mouseup": + case "dragend": + (yr = !1), br(o, n, i); + break; + case "selectionchange": + if (vr) break; + case "keydown": + case "keyup": + br(o, n, i); + } + var A; + if (Ln) + e: { + switch (e) { + case "compositionstart": + var y = "onCompositionStart"; + break e; + case "compositionend": + y = "onCompositionEnd"; + break e; + case "compositionupdate": + y = "onCompositionUpdate"; + break e; + } + y = void 0; + } + else + zn + ? Gn(e, n) && (y = "onCompositionEnd") + : "keydown" === e && + 229 === n.keyCode && + (y = "onCompositionStart"); + y && + (Fn && + "ko" !== n.locale && + (zn || "onCompositionStart" !== y + ? "onCompositionEnd" === y && zn && (A = en()) + : ((Kt = "value" in (Jt = i) ? Jt.value : Jt.textContent), + (zn = !0))), + 0 < (g = jr(r, y)).length && + ((y = new bn(y, e, null, n, i)), + o.push({ event: y, listeners: g }), + A ? (y.data = A) : null !== (A = Zn(n)) && (y.data = A))), + (A = Un + ? (function (e, t) { + switch (e) { + case "compositionend": + return Zn(t); + case "keypress": + return 32 !== t.which ? null : ((Nn = !0), On); + case "textInput": + return (e = t.data) === On && Nn ? null : e; + default: + return null; + } + })(e, n) + : (function (e, t) { + if (zn) + return "compositionend" === e || (!Ln && Gn(e, t)) + ? ((e = en()), ($t = Kt = Jt = null), (zn = !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 Fn && "ko" !== t.locale ? null : t.data; + } + })(e, n)) && + 0 < (r = jr(r, "onBeforeInput")).length && + ((i = new bn("onBeforeInput", "beforeinput", null, n, i)), + o.push({ event: i, listeners: r }), + (i.data = A)); + } + Or(o, t); + }); + } + function Vr(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, + a = i.stateNode; + 5 === i.tag && + null !== a && + ((i = a), + null != (a = Be(e, n)) && r.unshift(Vr(e, a, i)), + null != (a = Be(e, t)) && r.push(Vr(e, a, i))), + (e = e.return); + } + return r; + } + function Wr(e) { + if (null === e) return null; + do { + e = e.return; + } while (e && 5 !== e.tag); + return e || null; + } + function Xr(e, t, n, r, i) { + for (var a = t._reactName, o = []; null !== n && n !== r; ) { + var s = n, + l = s.alternate, + u = s.stateNode; + if (null !== l && l === r) break; + 5 === s.tag && + null !== u && + ((s = u), + i + ? null != (l = Be(n, a)) && o.unshift(Vr(n, l, s)) + : i || (null != (l = Be(n, a)) && o.push(Vr(n, l, s)))), + (n = n.return); + } + 0 !== o.length && e.push({ event: t, listeners: o }); + } + var Yr = /\r\n?/g, + qr = /\u0000|\uFFFD/g; + function Jr(e) { + return ("string" === typeof e ? e : "" + e) + .replace(Yr, "\n") + .replace(qr, ""); + } + function Kr(e, t, n) { + if (((t = Jr(t)), Jr(e) !== t && n)) throw Error(a(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, + ai = "function" === typeof Promise ? Promise : void 0, + oi = + "function" === typeof queueMicrotask + ? queueMicrotask + : "undefined" !== typeof ai + ? function (e) { + return ai.resolve(null).then(e).catch(si); + } + : ri; + function si(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 zt(t); + r--; + } else ("$" !== n && "$?" !== n && "$!" !== n) || r++; + n = i; + } while (n); + zt(t); + } + function ui(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 ci(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 fi = Math.random().toString(36).slice(2), + di = "__reactFiber$" + fi, + hi = "__reactProps$" + fi, + pi = "__reactContainer$" + fi, + vi = "__reactEvents$" + fi, + mi = "__reactListeners$" + fi, + gi = "__reactHandles$" + fi; + function Ai(e) { + var t = e[di]; + if (t) return t; + for (var n = e.parentNode; n; ) { + if ((t = n[pi] || n[di])) { + if ( + ((n = t.alternate), + null !== t.child || (null !== n && null !== n.child)) + ) + for (e = ci(e); null !== e; ) { + if ((n = e[di])) return n; + e = ci(e); + } + return t; + } + n = (e = n).parentNode; + } + return null; + } + function yi(e) { + return !(e = e[di] || e[pi]) || + (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(a(33)); + } + function xi(e) { + return e[hi] || null; + } + var Si = [], + Ei = -1; + function _i(e) { + return { current: e }; + } + function Ci(e) { + 0 > Ei || ((e.current = Si[Ei]), (Si[Ei] = null), Ei--); + } + function wi(e, t) { + Ei++, (Si[Ei] = e.current), (e.current = t); + } + var Ti = {}, + Mi = _i(Ti), + Ii = _i(!1), + ki = Ti; + function Ri(e, t) { + var n = e.type.contextTypes; + if (!n) return Ti; + var r = e.stateNode; + if (r && r.__reactInternalMemoizedUnmaskedChildContext === t) + return r.__reactInternalMemoizedMaskedChildContext; + var i, + a = {}; + for (i in n) a[i] = t[i]; + return ( + r && + (((e = e.stateNode).__reactInternalMemoizedUnmaskedChildContext = + t), + (e.__reactInternalMemoizedMaskedChildContext = a)), + a + ); + } + function Bi(e) { + return null !== (e = e.childContextTypes) && void 0 !== e; + } + function Pi() { + Ci(Ii), Ci(Mi); + } + function Li(e, t, n) { + if (Mi.current !== Ti) throw Error(a(168)); + wi(Mi, t), wi(Ii, n); + } + function Di(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, Q(e) || "Unknown", i)); + return F({}, n, r); + } + function Ui(e) { + return ( + (e = + ((e = e.stateNode) && + e.__reactInternalMemoizedMergedChildContext) || + Ti), + (ki = Mi.current), + wi(Mi, e), + wi(Ii, Ii.current), + !0 + ); + } + function Fi(e, t, n) { + var r = e.stateNode; + if (!r) throw Error(a(169)); + n + ? ((e = Di(e, t, ki)), + (r.__reactInternalMemoizedMergedChildContext = e), + Ci(Ii), + Ci(Mi), + wi(Mi, e)) + : Ci(Ii), + wi(Ii, n); + } + var Oi = null, + Ni = !1, + Gi = !1; + function Zi(e) { + null === Oi ? (Oi = [e]) : Oi.push(e); + } + function zi() { + if (!Gi && null !== Oi) { + Gi = !0; + var e = 0, + t = yt; + try { + var n = Oi; + for (yt = 1; e < n.length; e++) { + var r = n[e]; + do { + r = r(!0); + } while (null !== r); + } + (Oi = null), (Ni = !1); + } catch (i) { + throw (null !== Oi && (Oi = Oi.slice(e + 1)), We($e, zi), i); + } finally { + (yt = t), (Gi = !1); + } + } + return null; + } + var Qi = [], + Hi = 0, + Vi = null, + ji = 0, + Wi = [], + Xi = 0, + Yi = null, + qi = 1, + Ji = ""; + function Ki(e, t) { + (Qi[Hi++] = ji), (Qi[Hi++] = Vi), (Vi = e), (ji = t); + } + function $i(e, t, n) { + (Wi[Xi++] = qi), (Wi[Xi++] = Ji), (Wi[Xi++] = Yi), (Yi = e); + var r = qi; + e = Ji; + var i = 32 - ot(r) - 1; + (r &= ~(1 << i)), (n += 1); + var a = 32 - ot(t) + i; + if (30 < a) { + var o = i - (i % 5); + (a = (r & ((1 << o) - 1)).toString(32)), + (r >>= o), + (i -= o), + (qi = (1 << (32 - ot(t) + i)) | (n << i) | r), + (Ji = a + e); + } else (qi = (1 << a) | (n << i) | r), (Ji = e); + } + function ea(e) { + null !== e.return && (Ki(e, 1), $i(e, 1, 0)); + } + function ta(e) { + for (; e === Vi; ) + (Vi = Qi[--Hi]), (Qi[Hi] = null), (ji = Qi[--Hi]), (Qi[Hi] = null); + for (; e === Yi; ) + (Yi = Wi[--Xi]), + (Wi[Xi] = null), + (Ji = Wi[--Xi]), + (Wi[Xi] = null), + (qi = Wi[--Xi]), + (Wi[Xi] = null); + } + var na = null, + ra = null, + ia = !1, + aa = null; + function oa(e, t) { + var n = Bu(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 sa(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), (na = e), (ra = ui(t.firstChild)), !0) + ); + case 6: + return ( + null !== + (t = "" === e.pendingProps || 3 !== t.nodeType ? null : t) && + ((e.stateNode = t), (na = e), (ra = null), !0) + ); + case 13: + return ( + null !== (t = 8 !== t.nodeType ? null : t) && + ((n = null !== Yi ? { id: qi, overflow: Ji } : null), + (e.memoizedState = { + dehydrated: t, + treeContext: n, + retryLane: 1073741824, + }), + ((n = Bu(18, null, null, 0)).stateNode = t), + (n.return = e), + (e.child = n), + (na = e), + (ra = null), + !0) + ); + default: + return !1; + } + } + function la(e) { + return 0 !== (1 & e.mode) && 0 === (128 & e.flags); + } + function ua(e) { + if (ia) { + var t = ra; + if (t) { + var n = t; + if (!sa(e, t)) { + if (la(e)) throw Error(a(418)); + t = ui(n.nextSibling); + var r = na; + t && sa(e, t) + ? oa(r, n) + : ((e.flags = (-4097 & e.flags) | 2), (ia = !1), (na = e)); + } + } else { + if (la(e)) throw Error(a(418)); + (e.flags = (-4097 & e.flags) | 2), (ia = !1), (na = e); + } + } + } + function ca(e) { + for ( + e = e.return; + null !== e && 5 !== e.tag && 3 !== e.tag && 13 !== e.tag; + + ) + e = e.return; + na = e; + } + function fa(e) { + if (e !== na) return !1; + if (!ia) return ca(e), (ia = !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 = ra)) + ) { + if (la(e)) throw (da(), Error(a(418))); + for (; t; ) oa(e, t), (t = ui(t.nextSibling)); + } + if ((ca(e), 13 === e.tag)) { + if (!(e = null !== (e = e.memoizedState) ? e.dehydrated : null)) + throw Error(a(317)); + e: { + for (e = e.nextSibling, t = 0; e; ) { + if (8 === e.nodeType) { + var n = e.data; + if ("/$" === n) { + if (0 === t) { + ra = ui(e.nextSibling); + break e; + } + t--; + } else ("$" !== n && "$!" !== n && "$?" !== n) || t++; + } + e = e.nextSibling; + } + ra = null; + } + } else ra = na ? ui(e.stateNode.nextSibling) : null; + return !0; + } + function da() { + for (var e = ra; e; ) e = ui(e.nextSibling); + } + function ha() { + (ra = na = null), (ia = !1); + } + function pa(e) { + null === aa ? (aa = [e]) : aa.push(e); + } + var va = b.ReactCurrentBatchConfig; + function ma(e, t) { + if (e && e.defaultProps) { + for (var n in ((t = F({}, t)), (e = e.defaultProps))) + void 0 === t[n] && (t[n] = e[n]); + return t; + } + return t; + } + var ga = _i(null), + Aa = null, + ya = null, + ba = null; + function xa() { + ba = ya = Aa = null; + } + function Sa(e) { + var t = ga.current; + Ci(ga), (e._currentValue = t); + } + function Ea(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 _a(e, t) { + (Aa = e), + (ba = ya = null), + null !== (e = e.dependencies) && + null !== e.firstContext && + (0 !== (e.lanes & t) && (bs = !0), (e.firstContext = null)); + } + function Ca(e) { + var t = e._currentValue; + if (ba !== e) + if ( + ((e = { context: e, memoizedValue: t, next: null }), null === ya) + ) { + if (null === Aa) throw Error(a(308)); + (ya = e), (Aa.dependencies = { lanes: 0, firstContext: e }); + } else ya = ya.next = e; + return t; + } + var wa = null; + function Ta(e) { + null === wa ? (wa = [e]) : wa.push(e); + } + function Ma(e, t, n, r) { + var i = t.interleaved; + return ( + null === i + ? ((n.next = n), Ta(t)) + : ((n.next = i.next), (i.next = n)), + (t.interleaved = n), + Ia(e, r) + ); + } + function Ia(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 ka = !1; + function Ra(e) { + e.updateQueue = { + baseState: e.memoizedState, + firstBaseUpdate: null, + lastBaseUpdate: null, + shared: { pending: null, interleaved: null, lanes: 0 }, + effects: null, + }; + } + function Ba(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 Pa(e, t) { + return { + eventTime: e, + lane: t, + tag: 0, + payload: null, + callback: null, + next: null, + }; + } + function La(e, t, n) { + var r = e.updateQueue; + if (null === r) return null; + if (((r = r.shared), 0 !== (2 & Il))) { + var i = r.pending; + return ( + null === i ? (t.next = t) : ((t.next = i.next), (i.next = t)), + (r.pending = t), + Ia(e, n) + ); + } + return ( + null === (i = r.interleaved) + ? ((t.next = t), Ta(r)) + : ((t.next = i.next), (i.next = t)), + (r.interleaved = t), + Ia(e, n) + ); + } + function Da(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), At(e, n); + } + } + function Ua(e, t) { + var n = e.updateQueue, + r = e.alternate; + if (null !== r && n === (r = r.updateQueue)) { + var i = null, + a = null; + if (null !== (n = n.firstBaseUpdate)) { + do { + var o = { + eventTime: n.eventTime, + lane: n.lane, + tag: n.tag, + payload: n.payload, + callback: n.callback, + next: null, + }; + null === a ? (i = a = o) : (a = a.next = o), (n = n.next); + } while (null !== n); + null === a ? (i = a = t) : (a = a.next = t); + } else i = a = t; + return ( + (n = { + baseState: r.baseState, + firstBaseUpdate: i, + lastBaseUpdate: a, + shared: r.shared, + effects: r.effects, + }), + void (e.updateQueue = n) + ); + } + null === (e = n.lastBaseUpdate) + ? (n.firstBaseUpdate = t) + : (e.next = t), + (n.lastBaseUpdate = t); + } + function Fa(e, t, n, r) { + var i = e.updateQueue; + ka = !1; + var a = i.firstBaseUpdate, + o = i.lastBaseUpdate, + s = i.shared.pending; + if (null !== s) { + i.shared.pending = null; + var l = s, + u = l.next; + (l.next = null), null === o ? (a = u) : (o.next = u), (o = l); + var c = e.alternate; + null !== c && + (s = (c = c.updateQueue).lastBaseUpdate) !== o && + (null === s ? (c.firstBaseUpdate = u) : (s.next = u), + (c.lastBaseUpdate = l)); + } + if (null !== a) { + var f = i.baseState; + for (o = 0, c = u = l = null, s = a; ; ) { + var d = s.lane, + h = s.eventTime; + if ((r & d) === d) { + null !== c && + (c = c.next = + { + eventTime: h, + lane: 0, + tag: s.tag, + payload: s.payload, + callback: s.callback, + next: null, + }); + e: { + var p = e, + v = s; + switch (((d = t), (h = n), v.tag)) { + case 1: + if ("function" === typeof (p = v.payload)) { + f = p.call(h, f, d); + break e; + } + f = p; + break e; + case 3: + p.flags = (-65537 & p.flags) | 128; + case 0: + if ( + null === + (d = + "function" === typeof (p = v.payload) + ? p.call(h, f, d) + : p) || + void 0 === d + ) + break e; + f = F({}, f, d); + break e; + case 2: + ka = !0; + } + } + null !== s.callback && + 0 !== s.lane && + ((e.flags |= 64), + null === (d = i.effects) ? (i.effects = [s]) : d.push(s)); + } else + (h = { + eventTime: h, + lane: d, + tag: s.tag, + payload: s.payload, + callback: s.callback, + next: null, + }), + null === c ? ((u = c = h), (l = f)) : (c = c.next = h), + (o |= d); + if (null === (s = s.next)) { + if (null === (s = i.shared.pending)) break; + (s = (d = s).next), + (d.next = null), + (i.lastBaseUpdate = d), + (i.shared.pending = null); + } + } + if ( + (null === c && (l = f), + (i.baseState = l), + (i.firstBaseUpdate = u), + (i.lastBaseUpdate = c), + null !== (t = i.shared.interleaved)) + ) { + i = t; + do { + (o |= i.lane), (i = i.next); + } while (i !== t); + } else null === a && (i.shared.lanes = 0); + (Fl |= o), (e.lanes = o), (e.memoizedState = f); + } + } + function Oa(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 Na = new r.Component().refs; + function Ga(e, t, n, r) { + (n = + null === (n = n(r, (t = e.memoizedState))) || void 0 === n + ? t + : F({}, t, n)), + (e.memoizedState = n), + 0 === e.lanes && (e.updateQueue.baseState = n); + } + var Za = { + isMounted: function (e) { + return !!(e = e._reactInternals) && ze(e) === e; + }, + enqueueSetState: function (e, t, n) { + e = e._reactInternals; + var r = tu(), + i = nu(e), + a = Pa(r, i); + (a.payload = t), + void 0 !== n && null !== n && (a.callback = n), + null !== (t = La(e, a, i)) && (ru(t, e, i, r), Da(t, e, i)); + }, + enqueueReplaceState: function (e, t, n) { + e = e._reactInternals; + var r = tu(), + i = nu(e), + a = Pa(r, i); + (a.tag = 1), + (a.payload = t), + void 0 !== n && null !== n && (a.callback = n), + null !== (t = La(e, a, i)) && (ru(t, e, i, r), Da(t, e, i)); + }, + enqueueForceUpdate: function (e, t) { + e = e._reactInternals; + var n = tu(), + r = nu(e), + i = Pa(n, r); + (i.tag = 2), + void 0 !== t && null !== t && (i.callback = t), + null !== (t = La(e, i, r)) && (ru(t, e, r, n), Da(t, e, r)); + }, + }; + function za(e, t, n, r, i, a, o) { + return "function" === typeof (e = e.stateNode).shouldComponentUpdate + ? e.shouldComponentUpdate(r, a, o) + : !t.prototype || + !t.prototype.isPureReactComponent || + !lr(n, r) || + !lr(i, a); + } + function Qa(e, t, n) { + var r = !1, + i = Ti, + a = t.contextType; + return ( + "object" === typeof a && null !== a + ? (a = Ca(a)) + : ((i = Bi(t) ? ki : Mi.current), + (a = (r = null !== (r = t.contextTypes) && void 0 !== r) + ? Ri(e, i) + : Ti)), + (t = new t(n, a)), + (e.memoizedState = + null !== t.state && void 0 !== t.state ? t.state : null), + (t.updater = Za), + (e.stateNode = t), + (t._reactInternals = e), + r && + (((e = e.stateNode).__reactInternalMemoizedUnmaskedChildContext = + i), + (e.__reactInternalMemoizedMaskedChildContext = a)), + t + ); + } + function Ha(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 && Za.enqueueReplaceState(t, t.state, null); + } + function Va(e, t, n, r) { + var i = e.stateNode; + (i.props = n), (i.state = e.memoizedState), (i.refs = Na), Ra(e); + var a = t.contextType; + "object" === typeof a && null !== a + ? (i.context = Ca(a)) + : ((a = Bi(t) ? ki : Mi.current), (i.context = Ri(e, a))), + (i.state = e.memoizedState), + "function" === typeof (a = t.getDerivedStateFromProps) && + (Ga(e, t, a, 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 && Za.enqueueReplaceState(i, i.state, null), + Fa(e, n, i, r), + (i.state = e.memoizedState)), + "function" === typeof i.componentDidMount && (e.flags |= 4194308); + } + function ja(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, + o = "" + e; + return null !== t && + null !== t.ref && + "function" === typeof t.ref && + t.ref._stringRef === o + ? t.ref + : ((t = function (e) { + var t = i.refs; + t === Na && (t = i.refs = {}), + null === e ? delete t[o] : (t[o] = e); + }), + (t._stringRef = o), + t); + } + if ("string" !== typeof e) throw Error(a(284)); + if (!n._owner) throw Error(a(290, e)); + } + return e; + } + function Wa(e, t) { + throw ( + ((e = Object.prototype.toString.call(t)), + Error( + a( + 31, + "[object Object]" === e + ? "object with keys {" + Object.keys(t).join(", ") + "}" + : e + ) + )) + ); + } + function Xa(e) { + return (0, e._init)(e._payload); + } + function Ya(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 = Lu(e, t)).index = 0), (e.sibling = null), e; + } + function o(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 s(t) { + return e && null === t.alternate && (t.flags |= 2), t; + } + function l(e, t, n, r) { + return null === t || 6 !== t.tag + ? (((t = Ou(n, e.mode, r)).return = e), t) + : (((t = i(t, n)).return = e), t); + } + function u(e, t, n, r) { + var a = n.type; + return a === E + ? f(e, t, n.props.children, r, n.key) + : null !== t && + (t.elementType === a || + ("object" === typeof a && + null !== a && + a.$$typeof === B && + Xa(a) === t.type)) + ? (((r = i(t, n.props)).ref = ja(e, t, n)), (r.return = e), r) + : (((r = Du(n.type, n.key, n.props, null, e.mode, r)).ref = ja( + e, + t, + n + )), + (r.return = e), + r); + } + function c(e, t, n, r) { + return null === t || + 4 !== t.tag || + t.stateNode.containerInfo !== n.containerInfo || + t.stateNode.implementation !== n.implementation + ? (((t = Nu(n, e.mode, r)).return = e), t) + : (((t = i(t, n.children || [])).return = e), t); + } + function f(e, t, n, r, a) { + return null === t || 7 !== t.tag + ? (((t = Uu(n, e.mode, r, a)).return = e), t) + : (((t = i(t, n)).return = e), t); + } + function d(e, t, n) { + if (("string" === typeof t && "" !== t) || "number" === typeof t) + return ((t = Ou("" + t, e.mode, n)).return = e), t; + if ("object" === typeof t && null !== t) { + switch (t.$$typeof) { + case x: + return ( + ((n = Du(t.type, t.key, t.props, null, e.mode, n)).ref = ja( + e, + null, + t + )), + (n.return = e), + n + ); + case S: + return ((t = Nu(t, e.mode, n)).return = e), t; + case B: + return d(e, (0, t._init)(t._payload), n); + } + if (te(t) || D(t)) + return ((t = Uu(t, e.mode, n, null)).return = e), t; + Wa(e, t); + } + return null; + } + function h(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 x: + return n.key === i ? u(e, t, n, r) : null; + case S: + return n.key === i ? c(e, t, n, r) : null; + case B: + return h(e, t, (i = n._init)(n._payload), r); + } + if (te(n) || D(n)) return null !== i ? null : f(e, t, n, r, null); + Wa(e, n); + } + return null; + } + function p(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 x: + return u( + t, + (e = e.get(null === r.key ? n : r.key) || null), + r, + i + ); + case S: + return c( + t, + (e = e.get(null === r.key ? n : r.key) || null), + r, + i + ); + case B: + return p(e, t, n, (0, r._init)(r._payload), i); + } + if (te(r) || D(r)) + return f(t, (e = e.get(n) || null), r, i, null); + Wa(t, r); + } + return null; + } + function v(i, a, s, l) { + for ( + var u = null, c = null, f = a, v = (a = 0), m = null; + null !== f && v < s.length; + v++ + ) { + f.index > v ? ((m = f), (f = null)) : (m = f.sibling); + var g = h(i, f, s[v], l); + if (null === g) { + null === f && (f = m); + break; + } + e && f && null === g.alternate && t(i, f), + (a = o(g, a, v)), + null === c ? (u = g) : (c.sibling = g), + (c = g), + (f = m); + } + if (v === s.length) return n(i, f), ia && Ki(i, v), u; + if (null === f) { + for (; v < s.length; v++) + null !== (f = d(i, s[v], l)) && + ((a = o(f, a, v)), + null === c ? (u = f) : (c.sibling = f), + (c = f)); + return ia && Ki(i, v), u; + } + for (f = r(i, f); v < s.length; v++) + null !== (m = p(f, i, v, s[v], l)) && + (e && + null !== m.alternate && + f.delete(null === m.key ? v : m.key), + (a = o(m, a, v)), + null === c ? (u = m) : (c.sibling = m), + (c = m)); + return ( + e && + f.forEach(function (e) { + return t(i, e); + }), + ia && Ki(i, v), + u + ); + } + function m(i, s, l, u) { + var c = D(l); + if ("function" !== typeof c) throw Error(a(150)); + if (null == (l = c.call(l))) throw Error(a(151)); + for ( + var f = (c = null), v = s, m = (s = 0), g = null, A = l.next(); + null !== v && !A.done; + m++, A = l.next() + ) { + v.index > m ? ((g = v), (v = null)) : (g = v.sibling); + var y = h(i, v, A.value, u); + if (null === y) { + null === v && (v = g); + break; + } + e && v && null === y.alternate && t(i, v), + (s = o(y, s, m)), + null === f ? (c = y) : (f.sibling = y), + (f = y), + (v = g); + } + if (A.done) return n(i, v), ia && Ki(i, m), c; + if (null === v) { + for (; !A.done; m++, A = l.next()) + null !== (A = d(i, A.value, u)) && + ((s = o(A, s, m)), + null === f ? (c = A) : (f.sibling = A), + (f = A)); + return ia && Ki(i, m), c; + } + for (v = r(i, v); !A.done; m++, A = l.next()) + null !== (A = p(v, i, m, A.value, u)) && + (e && + null !== A.alternate && + v.delete(null === A.key ? m : A.key), + (s = o(A, s, m)), + null === f ? (c = A) : (f.sibling = A), + (f = A)); + return ( + e && + v.forEach(function (e) { + return t(i, e); + }), + ia && Ki(i, m), + c + ); + } + return function e(r, a, o, l) { + if ( + ("object" === typeof o && + null !== o && + o.type === E && + null === o.key && + (o = o.props.children), + "object" === typeof o && null !== o) + ) { + switch (o.$$typeof) { + case x: + e: { + for (var u = o.key, c = a; null !== c; ) { + if (c.key === u) { + if ((u = o.type) === E) { + if (7 === c.tag) { + n(r, c.sibling), + ((a = i(c, o.props.children)).return = r), + (r = a); + break e; + } + } else if ( + c.elementType === u || + ("object" === typeof u && + null !== u && + u.$$typeof === B && + Xa(u) === c.type) + ) { + n(r, c.sibling), + ((a = i(c, o.props)).ref = ja(r, c, o)), + (a.return = r), + (r = a); + break e; + } + n(r, c); + break; + } + t(r, c), (c = c.sibling); + } + o.type === E + ? (((a = Uu(o.props.children, r.mode, l, o.key)).return = + r), + (r = a)) + : (((l = Du( + o.type, + o.key, + o.props, + null, + r.mode, + l + )).ref = ja(r, a, o)), + (l.return = r), + (r = l)); + } + return s(r); + case S: + e: { + for (c = o.key; null !== a; ) { + if (a.key === c) { + if ( + 4 === a.tag && + a.stateNode.containerInfo === o.containerInfo && + a.stateNode.implementation === o.implementation + ) { + n(r, a.sibling), + ((a = i(a, o.children || [])).return = r), + (r = a); + break e; + } + n(r, a); + break; + } + t(r, a), (a = a.sibling); + } + ((a = Nu(o, r.mode, l)).return = r), (r = a); + } + return s(r); + case B: + return e(r, a, (c = o._init)(o._payload), l); + } + if (te(o)) return v(r, a, o, l); + if (D(o)) return m(r, a, o, l); + Wa(r, o); + } + return ("string" === typeof o && "" !== o) || "number" === typeof o + ? ((o = "" + o), + null !== a && 6 === a.tag + ? (n(r, a.sibling), ((a = i(a, o)).return = r), (r = a)) + : (n(r, a), ((a = Ou(o, r.mode, l)).return = r), (r = a)), + s(r)) + : n(r, a); + }; + } + var qa = Ya(!0), + Ja = Ya(!1), + Ka = {}, + $a = _i(Ka), + eo = _i(Ka), + to = _i(Ka); + function no(e) { + if (e === Ka) throw Error(a(174)); + return e; + } + function ro(e, t) { + switch ((wi(to, t), wi(eo, e), wi($a, Ka), (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) + ); + } + Ci($a), wi($a, t); + } + function io() { + Ci($a), Ci(eo), Ci(to); + } + function ao(e) { + no(to.current); + var t = no($a.current), + n = le(t, e.type); + t !== n && (wi(eo, e), wi($a, n)); + } + function oo(e) { + eo.current === e && (Ci($a), Ci(eo)); + } + var so = _i(0); + function lo(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 uo = []; + function co() { + for (var e = 0; e < uo.length; e++) + uo[e]._workInProgressVersionPrimary = null; + uo.length = 0; + } + var fo = b.ReactCurrentDispatcher, + ho = b.ReactCurrentBatchConfig, + po = 0, + vo = null, + mo = null, + go = null, + Ao = !1, + yo = !1, + bo = 0, + xo = 0; + function So() { + throw Error(a(321)); + } + function Eo(e, t) { + if (null === t) return !1; + for (var n = 0; n < t.length && n < e.length; n++) + if (!sr(e[n], t[n])) return !1; + return !0; + } + function _o(e, t, n, r, i, o) { + if ( + ((po = o), + (vo = t), + (t.memoizedState = null), + (t.updateQueue = null), + (t.lanes = 0), + (fo.current = null === e || null === e.memoizedState ? ss : ls), + (e = n(r, i)), + yo) + ) { + o = 0; + do { + if (((yo = !1), (bo = 0), 25 <= o)) throw Error(a(301)); + (o += 1), + (go = mo = null), + (t.updateQueue = null), + (fo.current = us), + (e = n(r, i)); + } while (yo); + } + if ( + ((fo.current = os), + (t = null !== mo && null !== mo.next), + (po = 0), + (go = mo = vo = null), + (Ao = !1), + t) + ) + throw Error(a(300)); + return e; + } + function Co() { + var e = 0 !== bo; + return (bo = 0), e; + } + function wo() { + var e = { + memoizedState: null, + baseState: null, + baseQueue: null, + queue: null, + next: null, + }; + return ( + null === go ? (vo.memoizedState = go = e) : (go = go.next = e), go + ); + } + function To() { + if (null === mo) { + var e = vo.alternate; + e = null !== e ? e.memoizedState : null; + } else e = mo.next; + var t = null === go ? vo.memoizedState : go.next; + if (null !== t) (go = t), (mo = e); + else { + if (null === e) throw Error(a(310)); + (e = { + memoizedState: (mo = e).memoizedState, + baseState: mo.baseState, + baseQueue: mo.baseQueue, + queue: mo.queue, + next: null, + }), + null === go ? (vo.memoizedState = go = e) : (go = go.next = e); + } + return go; + } + function Mo(e, t) { + return "function" === typeof t ? t(e) : t; + } + function Io(e) { + var t = To(), + n = t.queue; + if (null === n) throw Error(a(311)); + n.lastRenderedReducer = e; + var r = mo, + i = r.baseQueue, + o = n.pending; + if (null !== o) { + if (null !== i) { + var s = i.next; + (i.next = o.next), (o.next = s); + } + (r.baseQueue = i = o), (n.pending = null); + } + if (null !== i) { + (o = i.next), (r = r.baseState); + var l = (s = null), + u = null, + c = o; + do { + var f = c.lane; + if ((po & f) === f) + null !== u && + (u = u.next = + { + lane: 0, + action: c.action, + hasEagerState: c.hasEagerState, + eagerState: c.eagerState, + next: null, + }), + (r = c.hasEagerState ? c.eagerState : e(r, c.action)); + else { + var d = { + lane: f, + action: c.action, + hasEagerState: c.hasEagerState, + eagerState: c.eagerState, + next: null, + }; + null === u ? ((l = u = d), (s = r)) : (u = u.next = d), + (vo.lanes |= f), + (Fl |= f); + } + c = c.next; + } while (null !== c && c !== o); + null === u ? (s = r) : (u.next = l), + sr(r, t.memoizedState) || (bs = !0), + (t.memoizedState = r), + (t.baseState = s), + (t.baseQueue = u), + (n.lastRenderedState = r); + } + if (null !== (e = n.interleaved)) { + i = e; + do { + (o = i.lane), (vo.lanes |= o), (Fl |= o), (i = i.next); + } while (i !== e); + } else null === i && (n.lanes = 0); + return [t.memoizedState, n.dispatch]; + } + function ko(e) { + var t = To(), + n = t.queue; + if (null === n) throw Error(a(311)); + n.lastRenderedReducer = e; + var r = n.dispatch, + i = n.pending, + o = t.memoizedState; + if (null !== i) { + n.pending = null; + var s = (i = i.next); + do { + (o = e(o, s.action)), (s = s.next); + } while (s !== i); + sr(o, t.memoizedState) || (bs = !0), + (t.memoizedState = o), + null === t.baseQueue && (t.baseState = o), + (n.lastRenderedState = o); + } + return [o, r]; + } + function Ro() {} + function Bo(e, t) { + var n = vo, + r = To(), + i = t(), + o = !sr(r.memoizedState, i); + if ( + (o && ((r.memoizedState = i), (bs = !0)), + (r = r.queue), + Ho(Do.bind(null, n, r, e), [e]), + r.getSnapshot !== t || + o || + (null !== go && 1 & go.memoizedState.tag)) + ) { + if ( + ((n.flags |= 2048), + No(9, Lo.bind(null, n, r, i, t), void 0, null), + null === kl) + ) + throw Error(a(349)); + 0 !== (30 & po) || Po(n, t, i); + } + return i; + } + function Po(e, t, n) { + (e.flags |= 16384), + (e = { getSnapshot: t, value: n }), + null === (t = vo.updateQueue) + ? ((t = { lastEffect: null, stores: null }), + (vo.updateQueue = t), + (t.stores = [e])) + : null === (n = t.stores) + ? (t.stores = [e]) + : n.push(e); + } + function Lo(e, t, n, r) { + (t.value = n), (t.getSnapshot = r), Uo(t) && Fo(e); + } + function Do(e, t, n) { + return n(function () { + Uo(t) && Fo(e); + }); + } + function Uo(e) { + var t = e.getSnapshot; + e = e.value; + try { + var n = t(); + return !sr(e, n); + } catch (r) { + return !0; + } + } + function Fo(e) { + var t = Ia(e, 1); + null !== t && ru(t, e, 1, -1); + } + function Oo(e) { + var t = wo(); + return ( + "function" === typeof e && (e = e()), + (t.memoizedState = t.baseState = e), + (e = { + pending: null, + interleaved: null, + lanes: 0, + dispatch: null, + lastRenderedReducer: Mo, + lastRenderedState: e, + }), + (t.queue = e), + (e = e.dispatch = ns.bind(null, vo, e)), + [t.memoizedState, e] + ); + } + function No(e, t, n, r) { + return ( + (e = { tag: e, create: t, destroy: n, deps: r, next: null }), + null === (t = vo.updateQueue) + ? ((t = { lastEffect: null, stores: null }), + (vo.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 Go() { + return To().memoizedState; + } + function Zo(e, t, n, r) { + var i = wo(); + (vo.flags |= e), + (i.memoizedState = No(1 | t, n, void 0, void 0 === r ? null : r)); + } + function zo(e, t, n, r) { + var i = To(); + r = void 0 === r ? null : r; + var a = void 0; + if (null !== mo) { + var o = mo.memoizedState; + if (((a = o.destroy), null !== r && Eo(r, o.deps))) + return void (i.memoizedState = No(t, n, a, r)); + } + (vo.flags |= e), (i.memoizedState = No(1 | t, n, a, r)); + } + function Qo(e, t) { + return Zo(8390656, 8, e, t); + } + function Ho(e, t) { + return zo(2048, 8, e, t); + } + function Vo(e, t) { + return zo(4, 2, e, t); + } + function jo(e, t) { + return zo(4, 4, e, t); + } + function Wo(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 Xo(e, t, n) { + return ( + (n = null !== n && void 0 !== n ? n.concat([e]) : null), + zo(4, 4, Wo.bind(null, t, e), n) + ); + } + function Yo() {} + function qo(e, t) { + var n = To(); + t = void 0 === t ? null : t; + var r = n.memoizedState; + return null !== r && null !== t && Eo(t, r[1]) + ? r[0] + : ((n.memoizedState = [e, t]), e); + } + function Jo(e, t) { + var n = To(); + t = void 0 === t ? null : t; + var r = n.memoizedState; + return null !== r && null !== t && Eo(t, r[1]) + ? r[0] + : ((e = e()), (n.memoizedState = [e, t]), e); + } + function Ko(e, t, n) { + return 0 === (21 & po) + ? (e.baseState && ((e.baseState = !1), (bs = !0)), + (e.memoizedState = n)) + : (sr(n, t) || + ((n = vt()), (vo.lanes |= n), (Fl |= n), (e.baseState = !0)), + t); + } + function $o(e, t) { + var n = yt; + (yt = 0 !== n && 4 > n ? n : 4), e(!0); + var r = ho.transition; + ho.transition = {}; + try { + e(!1), t(); + } finally { + (yt = n), (ho.transition = r); + } + } + function es() { + return To().memoizedState; + } + function ts(e, t, n) { + var r = nu(e); + if ( + ((n = { + lane: r, + action: n, + hasEagerState: !1, + eagerState: null, + next: null, + }), + rs(e)) + ) + is(t, n); + else if (null !== (n = Ma(e, t, n, r))) { + ru(n, e, r, tu()), as(n, t, r); + } + } + function ns(e, t, n) { + var r = nu(e), + i = { + lane: r, + action: n, + hasEagerState: !1, + eagerState: null, + next: null, + }; + if (rs(e)) is(t, i); + else { + var a = e.alternate; + if ( + 0 === e.lanes && + (null === a || 0 === a.lanes) && + null !== (a = t.lastRenderedReducer) + ) + try { + var o = t.lastRenderedState, + s = a(o, n); + if (((i.hasEagerState = !0), (i.eagerState = s), sr(s, o))) { + var l = t.interleaved; + return ( + null === l + ? ((i.next = i), Ta(t)) + : ((i.next = l.next), (l.next = i)), + void (t.interleaved = i) + ); + } + } catch (u) {} + null !== (n = Ma(e, t, i, r)) && + (ru(n, e, r, (i = tu())), as(n, t, r)); + } + } + function rs(e) { + var t = e.alternate; + return e === vo || (null !== t && t === vo); + } + function is(e, t) { + yo = Ao = !0; + var n = e.pending; + null === n ? (t.next = t) : ((t.next = n.next), (n.next = t)), + (e.pending = t); + } + function as(e, t, n) { + if (0 !== (4194240 & n)) { + var r = t.lanes; + (n |= r &= e.pendingLanes), (t.lanes = n), At(e, n); + } + } + var os = { + readContext: Ca, + useCallback: So, + useContext: So, + useEffect: So, + useImperativeHandle: So, + useInsertionEffect: So, + useLayoutEffect: So, + useMemo: So, + useReducer: So, + useRef: So, + useState: So, + useDebugValue: So, + useDeferredValue: So, + useTransition: So, + useMutableSource: So, + useSyncExternalStore: So, + useId: So, + unstable_isNewReconciler: !1, + }, + ss = { + readContext: Ca, + useCallback: function (e, t) { + return (wo().memoizedState = [e, void 0 === t ? null : t]), e; + }, + useContext: Ca, + useEffect: Qo, + useImperativeHandle: function (e, t, n) { + return ( + (n = null !== n && void 0 !== n ? n.concat([e]) : null), + Zo(4194308, 4, Wo.bind(null, t, e), n) + ); + }, + useLayoutEffect: function (e, t) { + return Zo(4194308, 4, e, t); + }, + useInsertionEffect: function (e, t) { + return Zo(4, 2, e, t); + }, + useMemo: function (e, t) { + var n = wo(); + return ( + (t = void 0 === t ? null : t), + (e = e()), + (n.memoizedState = [e, t]), + e + ); + }, + useReducer: function (e, t, n) { + var r = wo(); + 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 = ts.bind(null, vo, e)), + [r.memoizedState, e] + ); + }, + useRef: function (e) { + return (e = { current: e }), (wo().memoizedState = e); + }, + useState: Oo, + useDebugValue: Yo, + useDeferredValue: function (e) { + return (wo().memoizedState = e); + }, + useTransition: function () { + var e = Oo(!1), + t = e[0]; + return ( + (e = $o.bind(null, e[1])), (wo().memoizedState = e), [t, e] + ); + }, + useMutableSource: function () {}, + useSyncExternalStore: function (e, t, n) { + var r = vo, + i = wo(); + if (ia) { + if (void 0 === n) throw Error(a(407)); + n = n(); + } else { + if (((n = t()), null === kl)) throw Error(a(349)); + 0 !== (30 & po) || Po(r, t, n); + } + i.memoizedState = n; + var o = { value: n, getSnapshot: t }; + return ( + (i.queue = o), + Qo(Do.bind(null, r, o, e), [e]), + (r.flags |= 2048), + No(9, Lo.bind(null, r, o, n, t), void 0, null), + n + ); + }, + useId: function () { + var e = wo(), + t = kl.identifierPrefix; + if (ia) { + var n = Ji; + (t = + ":" + + t + + "R" + + (n = (qi & ~(1 << (32 - ot(qi) - 1))).toString(32) + n)), + 0 < (n = bo++) && (t += "H" + n.toString(32)), + (t += ":"); + } else t = ":" + t + "r" + (n = xo++).toString(32) + ":"; + return (e.memoizedState = t); + }, + unstable_isNewReconciler: !1, + }, + ls = { + readContext: Ca, + useCallback: qo, + useContext: Ca, + useEffect: Ho, + useImperativeHandle: Xo, + useInsertionEffect: Vo, + useLayoutEffect: jo, + useMemo: Jo, + useReducer: Io, + useRef: Go, + useState: function () { + return Io(Mo); + }, + useDebugValue: Yo, + useDeferredValue: function (e) { + return Ko(To(), mo.memoizedState, e); + }, + useTransition: function () { + return [Io(Mo)[0], To().memoizedState]; + }, + useMutableSource: Ro, + useSyncExternalStore: Bo, + useId: es, + unstable_isNewReconciler: !1, + }, + us = { + readContext: Ca, + useCallback: qo, + useContext: Ca, + useEffect: Ho, + useImperativeHandle: Xo, + useInsertionEffect: Vo, + useLayoutEffect: jo, + useMemo: Jo, + useReducer: ko, + useRef: Go, + useState: function () { + return ko(Mo); + }, + useDebugValue: Yo, + useDeferredValue: function (e) { + var t = To(); + return null === mo + ? (t.memoizedState = e) + : Ko(t, mo.memoizedState, e); + }, + useTransition: function () { + return [ko(Mo)[0], To().memoizedState]; + }, + useMutableSource: Ro, + useSyncExternalStore: Bo, + useId: es, + unstable_isNewReconciler: !1, + }; + function cs(e, t) { + try { + var n = "", + r = t; + do { + (n += Z(r)), (r = r.return); + } while (r); + var i = n; + } catch (a) { + i = "\nError generating stack: " + a.message + "\n" + a.stack; + } + return { value: e, source: t, stack: i, digest: null }; + } + function fs(e, t, n) { + return { + value: e, + source: null, + stack: null != n ? n : null, + digest: null != t ? t : null, + }; + } + function ds(e, t) { + try { + console.error(t.value); + } catch (n) { + setTimeout(function () { + throw n; + }); + } + } + var hs = "function" === typeof WeakMap ? WeakMap : Map; + function ps(e, t, n) { + ((n = Pa(-1, n)).tag = 3), (n.payload = { element: null }); + var r = t.value; + return ( + (n.callback = function () { + Vl || ((Vl = !0), (jl = r)), ds(0, t); + }), + n + ); + } + function vs(e, t, n) { + (n = Pa(-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 () { + ds(0, t); + }); + } + var a = e.stateNode; + return ( + null !== a && + "function" === typeof a.componentDidCatch && + (n.callback = function () { + ds(0, t), + "function" !== typeof r && + (null === Wl ? (Wl = new Set([this])) : Wl.add(this)); + var e = t.stack; + this.componentDidCatch(t.value, { + componentStack: null !== e ? e : "", + }); + }), + n + ); + } + function ms(e, t, n) { + var r = e.pingCache; + if (null === r) { + r = e.pingCache = new hs(); + 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 = wu.bind(null, e, t, n)), t.then(e, e)); + } + function gs(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 As(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 = Pa(-1, 1)).tag = 2), La(n, t, 1))), + (n.lanes |= 1)), + e) + : ((e.flags |= 65536), (e.lanes = i), e); + } + var ys = b.ReactCurrentOwner, + bs = !1; + function xs(e, t, n, r) { + t.child = null === e ? Ja(t, null, n, r) : qa(t, e.child, n, r); + } + function Ss(e, t, n, r, i) { + n = n.render; + var a = t.ref; + return ( + _a(t, i), + (r = _o(e, t, n, r, a, i)), + (n = Co()), + null === e || bs + ? (ia && n && ea(t), (t.flags |= 1), xs(e, t, r, i), t.child) + : ((t.updateQueue = e.updateQueue), + (t.flags &= -2053), + (e.lanes &= ~i), + Vs(e, t, i)) + ); + } + function Es(e, t, n, r, i) { + if (null === e) { + var a = n.type; + return "function" !== typeof a || + Pu(a) || + void 0 !== a.defaultProps || + null !== n.compare || + void 0 !== n.defaultProps + ? (((e = Du(n.type, null, r, t, t.mode, i)).ref = t.ref), + (e.return = t), + (t.child = e)) + : ((t.tag = 15), (t.type = a), _s(e, t, a, r, i)); + } + if (((a = e.child), 0 === (e.lanes & i))) { + var o = a.memoizedProps; + if ( + (n = null !== (n = n.compare) ? n : lr)(o, r) && + e.ref === t.ref + ) + return Vs(e, t, i); + } + return ( + (t.flags |= 1), + ((e = Lu(a, r)).ref = t.ref), + (e.return = t), + (t.child = e) + ); + } + function _s(e, t, n, r, i) { + if (null !== e) { + var a = e.memoizedProps; + if (lr(a, r) && e.ref === t.ref) { + if (((bs = !1), (t.pendingProps = r = a), 0 === (e.lanes & i))) + return (t.lanes = e.lanes), Vs(e, t, i); + 0 !== (131072 & e.flags) && (bs = !0); + } + } + return Ts(e, t, n, r, i); + } + function Cs(e, t, n) { + var r = t.pendingProps, + i = r.children, + a = null !== e ? e.memoizedState : null; + if ("hidden" === r.mode) + if (0 === (1 & t.mode)) + (t.memoizedState = { + baseLanes: 0, + cachePool: null, + transitions: null, + }), + wi(Ll, Pl), + (Pl |= n); + else { + if (0 === (1073741824 & n)) + return ( + (e = null !== a ? a.baseLanes | n : n), + (t.lanes = t.childLanes = 1073741824), + (t.memoizedState = { + baseLanes: e, + cachePool: null, + transitions: null, + }), + (t.updateQueue = null), + wi(Ll, Pl), + (Pl |= e), + null + ); + (t.memoizedState = { + baseLanes: 0, + cachePool: null, + transitions: null, + }), + (r = null !== a ? a.baseLanes : n), + wi(Ll, Pl), + (Pl |= r); + } + else + null !== a + ? ((r = a.baseLanes | n), (t.memoizedState = null)) + : (r = n), + wi(Ll, Pl), + (Pl |= r); + return xs(e, t, i, n), t.child; + } + function ws(e, t) { + var n = t.ref; + ((null === e && null !== n) || (null !== e && e.ref !== n)) && + ((t.flags |= 512), (t.flags |= 2097152)); + } + function Ts(e, t, n, r, i) { + var a = Bi(n) ? ki : Mi.current; + return ( + (a = Ri(t, a)), + _a(t, i), + (n = _o(e, t, n, r, a, i)), + (r = Co()), + null === e || bs + ? (ia && r && ea(t), (t.flags |= 1), xs(e, t, n, i), t.child) + : ((t.updateQueue = e.updateQueue), + (t.flags &= -2053), + (e.lanes &= ~i), + Vs(e, t, i)) + ); + } + function Ms(e, t, n, r, i) { + if (Bi(n)) { + var a = !0; + Ui(t); + } else a = !1; + if ((_a(t, i), null === t.stateNode)) + Hs(e, t), Qa(t, n, r), Va(t, n, r, i), (r = !0); + else if (null === e) { + var o = t.stateNode, + s = t.memoizedProps; + o.props = s; + var l = o.context, + u = n.contextType; + "object" === typeof u && null !== u + ? (u = Ca(u)) + : (u = Ri(t, (u = Bi(n) ? ki : Mi.current))); + var c = n.getDerivedStateFromProps, + f = + "function" === typeof c || + "function" === typeof o.getSnapshotBeforeUpdate; + f || + ("function" !== typeof o.UNSAFE_componentWillReceiveProps && + "function" !== typeof o.componentWillReceiveProps) || + ((s !== r || l !== u) && Ha(t, o, r, u)), + (ka = !1); + var d = t.memoizedState; + (o.state = d), + Fa(t, r, o, i), + (l = t.memoizedState), + s !== r || d !== l || Ii.current || ka + ? ("function" === typeof c && + (Ga(t, n, c, r), (l = t.memoizedState)), + (s = ka || za(t, n, s, r, d, l, u)) + ? (f || + ("function" !== typeof o.UNSAFE_componentWillMount && + "function" !== typeof o.componentWillMount) || + ("function" === typeof o.componentWillMount && + o.componentWillMount(), + "function" === typeof o.UNSAFE_componentWillMount && + o.UNSAFE_componentWillMount()), + "function" === typeof o.componentDidMount && + (t.flags |= 4194308)) + : ("function" === typeof o.componentDidMount && + (t.flags |= 4194308), + (t.memoizedProps = r), + (t.memoizedState = l)), + (o.props = r), + (o.state = l), + (o.context = u), + (r = s)) + : ("function" === typeof o.componentDidMount && + (t.flags |= 4194308), + (r = !1)); + } else { + (o = t.stateNode), + Ba(e, t), + (s = t.memoizedProps), + (u = t.type === t.elementType ? s : ma(t.type, s)), + (o.props = u), + (f = t.pendingProps), + (d = o.context), + "object" === typeof (l = n.contextType) && null !== l + ? (l = Ca(l)) + : (l = Ri(t, (l = Bi(n) ? ki : Mi.current))); + var h = n.getDerivedStateFromProps; + (c = + "function" === typeof h || + "function" === typeof o.getSnapshotBeforeUpdate) || + ("function" !== typeof o.UNSAFE_componentWillReceiveProps && + "function" !== typeof o.componentWillReceiveProps) || + ((s !== f || d !== l) && Ha(t, o, r, l)), + (ka = !1), + (d = t.memoizedState), + (o.state = d), + Fa(t, r, o, i); + var p = t.memoizedState; + s !== f || d !== p || Ii.current || ka + ? ("function" === typeof h && + (Ga(t, n, h, r), (p = t.memoizedState)), + (u = ka || za(t, n, u, r, d, p, l) || !1) + ? (c || + ("function" !== typeof o.UNSAFE_componentWillUpdate && + "function" !== typeof o.componentWillUpdate) || + ("function" === typeof o.componentWillUpdate && + o.componentWillUpdate(r, p, l), + "function" === typeof o.UNSAFE_componentWillUpdate && + o.UNSAFE_componentWillUpdate(r, p, l)), + "function" === typeof o.componentDidUpdate && + (t.flags |= 4), + "function" === typeof o.getSnapshotBeforeUpdate && + (t.flags |= 1024)) + : ("function" !== typeof o.componentDidUpdate || + (s === e.memoizedProps && d === e.memoizedState) || + (t.flags |= 4), + "function" !== typeof o.getSnapshotBeforeUpdate || + (s === e.memoizedProps && d === e.memoizedState) || + (t.flags |= 1024), + (t.memoizedProps = r), + (t.memoizedState = p)), + (o.props = r), + (o.state = p), + (o.context = l), + (r = u)) + : ("function" !== typeof o.componentDidUpdate || + (s === e.memoizedProps && d === e.memoizedState) || + (t.flags |= 4), + "function" !== typeof o.getSnapshotBeforeUpdate || + (s === e.memoizedProps && d === e.memoizedState) || + (t.flags |= 1024), + (r = !1)); + } + return Is(e, t, n, r, a, i); + } + function Is(e, t, n, r, i, a) { + ws(e, t); + var o = 0 !== (128 & t.flags); + if (!r && !o) return i && Fi(t, n, !1), Vs(e, t, a); + (r = t.stateNode), (ys.current = t); + var s = + o && "function" !== typeof n.getDerivedStateFromError + ? null + : r.render(); + return ( + (t.flags |= 1), + null !== e && o + ? ((t.child = qa(t, e.child, null, a)), + (t.child = qa(t, null, s, a))) + : xs(e, t, s, a), + (t.memoizedState = r.state), + i && Fi(t, n, !0), + t.child + ); + } + function ks(e) { + var t = e.stateNode; + t.pendingContext + ? Li(0, t.pendingContext, t.pendingContext !== t.context) + : t.context && Li(0, t.context, !1), + ro(e, t.containerInfo); + } + function Rs(e, t, n, r, i) { + return ha(), pa(i), (t.flags |= 256), xs(e, t, n, r), t.child; + } + var Bs, + Ps, + Ls, + Ds, + Us = { dehydrated: null, treeContext: null, retryLane: 0 }; + function Fs(e) { + return { baseLanes: e, cachePool: null, transitions: null }; + } + function Os(e, t, n) { + var r, + i = t.pendingProps, + o = so.current, + s = !1, + l = 0 !== (128 & t.flags); + if ( + ((r = l) || + (r = (null === e || null !== e.memoizedState) && 0 !== (2 & o)), + r + ? ((s = !0), (t.flags &= -129)) + : (null !== e && null === e.memoizedState) || (o |= 1), + wi(so, 1 & o), + null === e) + ) + return ( + ua(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), + s + ? ((i = t.mode), + (s = t.child), + (l = { mode: "hidden", children: l }), + 0 === (1 & i) && null !== s + ? ((s.childLanes = 0), (s.pendingProps = l)) + : (s = Fu(l, i, 0, null)), + (e = Uu(e, i, n, null)), + (s.return = t), + (e.return = t), + (s.sibling = e), + (t.child = s), + (t.child.memoizedState = Fs(n)), + (t.memoizedState = Us), + e) + : Ns(t, l)) + ); + if (null !== (o = e.memoizedState) && null !== (r = o.dehydrated)) + return (function (e, t, n, r, i, o, s) { + if (n) + return 256 & t.flags + ? ((t.flags &= -257), Gs(e, t, s, (r = fs(Error(a(422)))))) + : null !== t.memoizedState + ? ((t.child = e.child), (t.flags |= 128), null) + : ((o = r.fallback), + (i = t.mode), + (r = Fu( + { mode: "visible", children: r.children }, + i, + 0, + null + )), + ((o = Uu(o, i, s, null)).flags |= 2), + (r.return = t), + (o.return = t), + (r.sibling = o), + (t.child = r), + 0 !== (1 & t.mode) && qa(t, e.child, null, s), + (t.child.memoizedState = Fs(s)), + (t.memoizedState = Us), + o); + if (0 === (1 & t.mode)) return Gs(e, t, s, null); + if ("$!" === i.data) { + if ((r = i.nextSibling && i.nextSibling.dataset)) + var l = r.dgst; + return ( + (r = l), Gs(e, t, s, (r = fs((o = Error(a(419))), r, void 0))) + ); + } + if (((l = 0 !== (s & e.childLanes)), bs || l)) { + if (null !== (r = kl)) { + switch (s & -s) { + 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 | s)) ? 0 : i) && + i !== o.retryLane && + ((o.retryLane = i), Ia(e, i), ru(r, e, i, -1)); + } + return mu(), Gs(e, t, s, (r = fs(Error(a(421))))); + } + return "$?" === i.data + ? ((t.flags |= 128), + (t.child = e.child), + (t = Mu.bind(null, e)), + (i._reactRetry = t), + null) + : ((e = o.treeContext), + (ra = ui(i.nextSibling)), + (na = t), + (ia = !0), + (aa = null), + null !== e && + ((Wi[Xi++] = qi), + (Wi[Xi++] = Ji), + (Wi[Xi++] = Yi), + (qi = e.id), + (Ji = e.overflow), + (Yi = t)), + (t = Ns(t, r.children)), + (t.flags |= 4096), + t); + })(e, t, l, i, r, o, n); + if (s) { + (s = i.fallback), (l = t.mode), (r = (o = e.child).sibling); + var u = { mode: "hidden", children: i.children }; + return ( + 0 === (1 & l) && t.child !== o + ? (((i = t.child).childLanes = 0), + (i.pendingProps = u), + (t.deletions = null)) + : ((i = Lu(o, u)).subtreeFlags = 14680064 & o.subtreeFlags), + null !== r + ? (s = Lu(r, s)) + : ((s = Uu(s, l, n, null)).flags |= 2), + (s.return = t), + (i.return = t), + (i.sibling = s), + (t.child = i), + (i = s), + (s = t.child), + (l = + null === (l = e.child.memoizedState) + ? Fs(n) + : { + baseLanes: l.baseLanes | n, + cachePool: null, + transitions: l.transitions, + }), + (s.memoizedState = l), + (s.childLanes = e.childLanes & ~n), + (t.memoizedState = Us), + i + ); + } + return ( + (e = (s = e.child).sibling), + (i = Lu(s, { 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 Ns(e, t) { + return ( + ((t = Fu( + { mode: "visible", children: t }, + e.mode, + 0, + null + )).return = e), + (e.child = t) + ); + } + function Gs(e, t, n, r) { + return ( + null !== r && pa(r), + qa(t, e.child, null, n), + ((e = Ns(t, t.pendingProps.children)).flags |= 2), + (t.memoizedState = null), + e + ); + } + function Zs(e, t, n) { + e.lanes |= t; + var r = e.alternate; + null !== r && (r.lanes |= t), Ea(e.return, t, n); + } + function zs(e, t, n, r, i) { + var a = e.memoizedState; + null === a + ? (e.memoizedState = { + isBackwards: t, + rendering: null, + renderingStartTime: 0, + last: r, + tail: n, + tailMode: i, + }) + : ((a.isBackwards = t), + (a.rendering = null), + (a.renderingStartTime = 0), + (a.last = r), + (a.tail = n), + (a.tailMode = i)); + } + function Qs(e, t, n) { + var r = t.pendingProps, + i = r.revealOrder, + a = r.tail; + if ((xs(e, t, r.children, n), 0 !== (2 & (r = so.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 && Zs(e, n, t); + else if (19 === e.tag) Zs(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 ((wi(so, 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 === lo(e) && (i = n), + (n = n.sibling); + null === (n = i) + ? ((i = t.child), (t.child = null)) + : ((i = n.sibling), (n.sibling = null)), + zs(t, !1, i, n, a); + break; + case "backwards": + for (n = null, i = t.child, t.child = null; null !== i; ) { + if (null !== (e = i.alternate) && null === lo(e)) { + t.child = i; + break; + } + (e = i.sibling), (i.sibling = n), (n = i), (i = e); + } + zs(t, !0, n, null, a); + break; + case "together": + zs(t, !1, null, null, void 0); + break; + default: + t.memoizedState = null; + } + return t.child; + } + function Hs(e, t) { + 0 === (1 & t.mode) && + null !== e && + ((e.alternate = null), (t.alternate = null), (t.flags |= 2)); + } + function Vs(e, t, n) { + if ( + (null !== e && (t.dependencies = e.dependencies), + (Fl |= 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 = Lu((e = t.child), e.pendingProps), t.child = n, n.return = t; + null !== e.sibling; + + ) + (e = e.sibling), + ((n = n.sibling = Lu(e, e.pendingProps)).return = t); + n.sibling = null; + } + return t.child; + } + function js(e, t) { + if (!ia) + 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 Ws(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 Xs(e, t, n) { + var r = t.pendingProps; + switch ((ta(t), t.tag)) { + case 2: + case 16: + case 15: + case 0: + case 11: + case 7: + case 8: + case 12: + case 9: + case 14: + return Ws(t), null; + case 1: + case 17: + return Bi(t.type) && Pi(), Ws(t), null; + case 3: + return ( + (r = t.stateNode), + io(), + Ci(Ii), + Ci(Mi), + co(), + r.pendingContext && + ((r.context = r.pendingContext), (r.pendingContext = null)), + (null !== e && null !== e.child) || + (fa(t) + ? (t.flags |= 4) + : null === e || + (e.memoizedState.isDehydrated && 0 === (256 & t.flags)) || + ((t.flags |= 1024), + null !== aa && (su(aa), (aa = null)))), + Ps(e, t), + Ws(t), + null + ); + case 5: + oo(t); + var i = no(to.current); + if (((n = t.type), null !== e && null != t.stateNode)) + Ls(e, t, n, r, i), + e.ref !== t.ref && ((t.flags |= 512), (t.flags |= 2097152)); + else { + if (!r) { + if (null === t.stateNode) throw Error(a(166)); + return Ws(t), null; + } + if (((e = no($a.current)), fa(t))) { + (r = t.stateNode), (n = t.type); + var o = t.memoizedProps; + switch ( + ((r[di] = t), (r[hi] = o), (e = 0 !== (1 & t.mode)), n) + ) { + case "dialog": + Nr("cancel", r), Nr("close", r); + break; + case "iframe": + case "object": + case "embed": + Nr("load", r); + break; + case "video": + case "audio": + for (i = 0; i < Dr.length; i++) Nr(Dr[i], r); + break; + case "source": + Nr("error", r); + break; + case "img": + case "image": + case "link": + Nr("error", r), Nr("load", r); + break; + case "details": + Nr("toggle", r); + break; + case "input": + q(r, o), Nr("invalid", r); + break; + case "select": + (r._wrapperState = { wasMultiple: !!o.multiple }), + Nr("invalid", r); + break; + case "textarea": + ie(r, o), Nr("invalid", r); + } + for (var l in (Ae(n, o), (i = null), o)) + if (o.hasOwnProperty(l)) { + var u = o[l]; + "children" === l + ? "string" === typeof u + ? r.textContent !== u && + (!0 !== o.suppressHydrationWarning && + Kr(r.textContent, u, e), + (i = ["children", u])) + : "number" === typeof u && + r.textContent !== "" + u && + (!0 !== o.suppressHydrationWarning && + Kr(r.textContent, u, e), + (i = ["children", "" + u])) + : s.hasOwnProperty(l) && + null != u && + "onScroll" === l && + Nr("scroll", r); + } + switch (n) { + case "input": + j(r), $(r, o, !0); + break; + case "textarea": + j(r), oe(r); + break; + case "select": + case "option": + break; + default: + "function" === typeof o.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 = se(n)), + "http://www.w3.org/1999/xhtml" === e + ? "script" === n + ? (((e = l.createElement("div")).innerHTML = + ""), + (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[di] = t), + (e[hi] = r), + Bs(e, t, !1, !1), + (t.stateNode = e); + e: { + switch (((l = ye(n, r)), n)) { + case "dialog": + Nr("cancel", e), Nr("close", e), (i = r); + break; + case "iframe": + case "object": + case "embed": + Nr("load", e), (i = r); + break; + case "video": + case "audio": + for (i = 0; i < Dr.length; i++) Nr(Dr[i], e); + i = r; + break; + case "source": + Nr("error", e), (i = r); + break; + case "img": + case "image": + case "link": + Nr("error", e), Nr("load", e), (i = r); + break; + case "details": + Nr("toggle", e), (i = r); + break; + case "input": + q(e, r), (i = Y(e, r)), Nr("invalid", e); + break; + case "option": + default: + i = r; + break; + case "select": + (e._wrapperState = { wasMultiple: !!r.multiple }), + (i = F({}, r, { value: void 0 })), + Nr("invalid", e); + break; + case "textarea": + ie(e, r), (i = re(e, r)), Nr("invalid", e); + } + for (o in (Ae(n, i), (u = i))) + if (u.hasOwnProperty(o)) { + var c = u[o]; + "style" === o + ? me(e, c) + : "dangerouslySetInnerHTML" === o + ? null != (c = c ? c.__html : void 0) && fe(e, c) + : "children" === o + ? "string" === typeof c + ? ("textarea" !== n || "" !== c) && de(e, c) + : "number" === typeof c && de(e, "" + c) + : "suppressContentEditableWarning" !== o && + "suppressHydrationWarning" !== o && + "autoFocus" !== o && + (s.hasOwnProperty(o) + ? null != c && "onScroll" === o && Nr("scroll", e) + : null != c && y(e, o, c, l)); + } + switch (n) { + case "input": + j(e), $(e, r, !1); + break; + case "textarea": + j(e), oe(e); + break; + case "option": + null != r.value && + e.setAttribute("value", "" + H(r.value)); + break; + case "select": + (e.multiple = !!r.multiple), + null != (o = r.value) + ? ne(e, !!r.multiple, o, !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 Ws(t), null; + case 6: + if (e && null != t.stateNode) Ds(e, t, e.memoizedProps, r); + else { + if ("string" !== typeof r && null === t.stateNode) + throw Error(a(166)); + if (((n = no(to.current)), no($a.current), fa(t))) { + if ( + ((r = t.stateNode), + (n = t.memoizedProps), + (r[di] = t), + (o = r.nodeValue !== n) && null !== (e = na)) + ) + switch (e.tag) { + case 3: + Kr(r.nodeValue, n, 0 !== (1 & e.mode)); + break; + case 5: + !0 !== e.memoizedProps.suppressHydrationWarning && + Kr(r.nodeValue, n, 0 !== (1 & e.mode)); + } + o && (t.flags |= 4); + } else + ((r = (9 === n.nodeType ? n : n.ownerDocument).createTextNode( + r + ))[di] = t), + (t.stateNode = r); + } + return Ws(t), null; + case 13: + if ( + (Ci(so), + (r = t.memoizedState), + null === e || + (null !== e.memoizedState && + null !== e.memoizedState.dehydrated)) + ) { + if ( + ia && + null !== ra && + 0 !== (1 & t.mode) && + 0 === (128 & t.flags) + ) + da(), ha(), (t.flags |= 98560), (o = !1); + else if (((o = fa(t)), null !== r && null !== r.dehydrated)) { + if (null === e) { + if (!o) throw Error(a(318)); + if ( + !(o = + null !== (o = t.memoizedState) ? o.dehydrated : null) + ) + throw Error(a(317)); + o[di] = t; + } else + ha(), + 0 === (128 & t.flags) && (t.memoizedState = null), + (t.flags |= 4); + Ws(t), (o = !1); + } else null !== aa && (su(aa), (aa = null)), (o = !0); + if (!o) 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 & so.current) + ? 0 === Dl && (Dl = 3) + : mu())), + null !== t.updateQueue && (t.flags |= 4), + Ws(t), + null); + case 4: + return ( + io(), + Ps(e, t), + null === e && zr(t.stateNode.containerInfo), + Ws(t), + null + ); + case 10: + return Sa(t.type._context), Ws(t), null; + case 19: + if ((Ci(so), null === (o = t.memoizedState))) return Ws(t), null; + if (((r = 0 !== (128 & t.flags)), null === (l = o.rendering))) + if (r) js(o, !1); + else { + if (0 !== Dl || (null !== e && 0 !== (128 & e.flags))) + for (e = t.child; null !== e; ) { + if (null !== (l = lo(e))) { + for ( + t.flags |= 128, + js(o, !1), + null !== (r = l.updateQueue) && + ((t.updateQueue = r), (t.flags |= 4)), + t.subtreeFlags = 0, + r = n, + n = t.child; + null !== n; + + ) + (e = r), + ((o = n).flags &= 14680066), + null === (l = o.alternate) + ? ((o.childLanes = 0), + (o.lanes = e), + (o.child = null), + (o.subtreeFlags = 0), + (o.memoizedProps = null), + (o.memoizedState = null), + (o.updateQueue = null), + (o.dependencies = null), + (o.stateNode = null)) + : ((o.childLanes = l.childLanes), + (o.lanes = l.lanes), + (o.child = l.child), + (o.subtreeFlags = 0), + (o.deletions = null), + (o.memoizedProps = l.memoizedProps), + (o.memoizedState = l.memoizedState), + (o.updateQueue = l.updateQueue), + (o.type = l.type), + (e = l.dependencies), + (o.dependencies = + null === e + ? null + : { + lanes: e.lanes, + firstContext: e.firstContext, + })), + (n = n.sibling); + return wi(so, (1 & so.current) | 2), t.child; + } + e = e.sibling; + } + null !== o.tail && + Je() > Ql && + ((t.flags |= 128), + (r = !0), + js(o, !1), + (t.lanes = 4194304)); + } + else { + if (!r) + if (null !== (e = lo(l))) { + if ( + ((t.flags |= 128), + (r = !0), + null !== (n = e.updateQueue) && + ((t.updateQueue = n), (t.flags |= 4)), + js(o, !0), + null === o.tail && + "hidden" === o.tailMode && + !l.alternate && + !ia) + ) + return Ws(t), null; + } else + 2 * Je() - o.renderingStartTime > Ql && + 1073741824 !== n && + ((t.flags |= 128), + (r = !0), + js(o, !1), + (t.lanes = 4194304)); + o.isBackwards + ? ((l.sibling = t.child), (t.child = l)) + : (null !== (n = o.last) ? (n.sibling = l) : (t.child = l), + (o.last = l)); + } + return null !== o.tail + ? ((t = o.tail), + (o.rendering = t), + (o.tail = t.sibling), + (o.renderingStartTime = Je()), + (t.sibling = null), + (n = so.current), + wi(so, r ? (1 & n) | 2 : 1 & n), + t) + : (Ws(t), null); + case 22: + case 23: + return ( + du(), + (r = null !== t.memoizedState), + null !== e && + (null !== e.memoizedState) !== r && + (t.flags |= 8192), + r && 0 !== (1 & t.mode) + ? 0 !== (1073741824 & Pl) && + (Ws(t), 6 & t.subtreeFlags && (t.flags |= 8192)) + : Ws(t), + null + ); + case 24: + case 25: + return null; + } + throw Error(a(156, t.tag)); + } + function Ys(e, t) { + switch ((ta(t), t.tag)) { + case 1: + return ( + Bi(t.type) && Pi(), + 65536 & (e = t.flags) + ? ((t.flags = (-65537 & e) | 128), t) + : null + ); + case 3: + return ( + io(), + Ci(Ii), + Ci(Mi), + co(), + 0 !== (65536 & (e = t.flags)) && 0 === (128 & e) + ? ((t.flags = (-65537 & e) | 128), t) + : null + ); + case 5: + return oo(t), null; + case 13: + if ( + (Ci(so), + null !== (e = t.memoizedState) && null !== e.dehydrated) + ) { + if (null === t.alternate) throw Error(a(340)); + ha(); + } + return 65536 & (e = t.flags) + ? ((t.flags = (-65537 & e) | 128), t) + : null; + case 19: + return Ci(so), null; + case 4: + return io(), null; + case 10: + return Sa(t.type._context), null; + case 22: + case 23: + return du(), null; + default: + return null; + } + } + (Bs = 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); + } + }), + (Ps = function () {}), + (Ls = function (e, t, n, r) { + var i = e.memoizedProps; + if (i !== r) { + (e = t.stateNode), no($a.current); + var a, + o = null; + switch (n) { + case "input": + (i = Y(e, i)), (r = Y(e, r)), (o = []); + break; + case "select": + (i = F({}, i, { value: void 0 })), + (r = F({}, r, { value: void 0 })), + (o = []); + break; + case "textarea": + (i = re(e, i)), (r = re(e, r)), (o = []); + break; + default: + "function" !== typeof i.onClick && + "function" === typeof r.onClick && + (e.onclick = $r); + } + for (c in (Ae(n, r), (n = null), i)) + if (!r.hasOwnProperty(c) && i.hasOwnProperty(c) && null != i[c]) + if ("style" === c) { + var l = i[c]; + for (a in l) + l.hasOwnProperty(a) && (n || (n = {}), (n[a] = "")); + } else + "dangerouslySetInnerHTML" !== c && + "children" !== c && + "suppressContentEditableWarning" !== c && + "suppressHydrationWarning" !== c && + "autoFocus" !== c && + (s.hasOwnProperty(c) + ? o || (o = []) + : (o = o || []).push(c, null)); + for (c in r) { + var u = r[c]; + if ( + ((l = null != i ? i[c] : void 0), + r.hasOwnProperty(c) && u !== l && (null != u || null != l)) + ) + if ("style" === c) + if (l) { + for (a in l) + !l.hasOwnProperty(a) || + (u && u.hasOwnProperty(a)) || + (n || (n = {}), (n[a] = "")); + for (a in u) + u.hasOwnProperty(a) && + l[a] !== u[a] && + (n || (n = {}), (n[a] = u[a])); + } else n || (o || (o = []), o.push(c, n)), (n = u); + else + "dangerouslySetInnerHTML" === c + ? ((u = u ? u.__html : void 0), + (l = l ? l.__html : void 0), + null != u && l !== u && (o = o || []).push(c, u)) + : "children" === c + ? ("string" !== typeof u && "number" !== typeof u) || + (o = o || []).push(c, "" + u) + : "suppressContentEditableWarning" !== c && + "suppressHydrationWarning" !== c && + (s.hasOwnProperty(c) + ? (null != u && "onScroll" === c && Nr("scroll", e), + o || l === u || (o = [])) + : (o = o || []).push(c, u)); + } + n && (o = o || []).push("style", n); + var c = o; + (t.updateQueue = c) && (t.flags |= 4); + } + }), + (Ds = function (e, t, n, r) { + n !== r && (t.flags |= 4); + }); + var qs = !1, + Js = !1, + Ks = "function" === typeof WeakSet ? WeakSet : Set, + $s = null; + function el(e, t) { + var n = e.ref; + if (null !== n) + if ("function" === typeof n) + try { + n(null); + } catch (r) { + Cu(e, t, r); + } + else n.current = null; + } + function tl(e, t, n) { + try { + n(); + } catch (r) { + Cu(e, t, r); + } + } + var nl = !1; + function rl(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 a = i.destroy; + (i.destroy = void 0), void 0 !== a && tl(t, n, a); + } + i = i.next; + } while (i !== r); + } + } + function il(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 al(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 ol(e) { + var t = e.alternate; + null !== t && ((e.alternate = null), ol(t)), + (e.child = null), + (e.deletions = null), + (e.sibling = null), + 5 === e.tag && + null !== (t = e.stateNode) && + (delete t[di], + delete t[hi], + delete t[vi], + delete t[mi], + delete t[gi]), + (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 sl(e) { + return 5 === e.tag || 3 === e.tag || 4 === e.tag; + } + function ll(e) { + e: for (;;) { + for (; null === e.sibling; ) { + if (null === e.return || sl(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 ul(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 (ul(e, t, n), e = e.sibling; null !== e; ) + ul(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 fl = 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 (at && "function" === typeof at.onCommitFiberUnmount) + try { + at.onCommitFiberUnmount(it, n); + } catch (s) {} + switch (n.tag) { + case 5: + Js || el(n, t); + case 6: + var r = fl, + i = dl; + (fl = null), + hl(e, t, n), + (dl = i), + null !== (fl = r) && + (dl + ? ((e = fl), + (n = n.stateNode), + 8 === e.nodeType + ? e.parentNode.removeChild(n) + : e.removeChild(n)) + : fl.removeChild(n.stateNode)); + break; + case 18: + null !== fl && + (dl + ? ((e = fl), + (n = n.stateNode), + 8 === e.nodeType + ? li(e.parentNode, n) + : 1 === e.nodeType && li(e, n), + zt(e)) + : li(fl, n.stateNode)); + break; + case 4: + (r = fl), + (i = dl), + (fl = n.stateNode.containerInfo), + (dl = !0), + hl(e, t, n), + (fl = r), + (dl = i); + break; + case 0: + case 11: + case 14: + case 15: + if ( + !Js && + null !== (r = n.updateQueue) && + null !== (r = r.lastEffect) + ) { + i = r = r.next; + do { + var a = i, + o = a.destroy; + (a = a.tag), + void 0 !== o && + (0 !== (2 & a) || 0 !== (4 & a)) && + tl(n, t, o), + (i = i.next); + } while (i !== r); + } + hl(e, t, n); + break; + case 1: + if ( + !Js && + (el(n, t), + "function" === typeof (r = n.stateNode).componentWillUnmount) + ) + try { + (r.props = n.memoizedProps), + (r.state = n.memoizedState), + r.componentWillUnmount(); + } catch (s) { + Cu(n, t, s); + } + hl(e, t, n); + break; + case 21: + hl(e, t, n); + break; + case 22: + 1 & n.mode + ? ((Js = (r = Js) || null !== n.memoizedState), + hl(e, t, n), + (Js = r)) + : hl(e, t, n); + break; + default: + hl(e, t, n); + } + } + function vl(e) { + var t = e.updateQueue; + if (null !== t) { + e.updateQueue = null; + var n = e.stateNode; + null === n && (n = e.stateNode = new Ks()), + t.forEach(function (t) { + var r = Iu.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 o = e, + s = t, + l = s; + e: for (; null !== l; ) { + switch (l.tag) { + case 5: + (fl = l.stateNode), (dl = !1); + break e; + case 3: + case 4: + (fl = l.stateNode.containerInfo), (dl = !0); + break e; + } + l = l.return; + } + if (null === fl) throw Error(a(160)); + pl(o, s, i), (fl = null), (dl = !1); + var u = i.alternate; + null !== u && (u.return = null), (i.return = null); + } catch (c) { + Cu(i, t, c); + } + } + 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), Al(e), 4 & r)) { + try { + rl(3, e, e.return), il(3, e); + } catch (m) { + Cu(e, e.return, m); + } + try { + rl(5, e, e.return); + } catch (m) { + Cu(e, e.return, m); + } + } + break; + case 1: + ml(t, e), Al(e), 512 & r && null !== n && el(n, n.return); + break; + case 5: + if ( + (ml(t, e), + Al(e), + 512 & r && null !== n && el(n, n.return), + 32 & e.flags) + ) { + var i = e.stateNode; + try { + de(i, ""); + } catch (m) { + Cu(e, e.return, m); + } + } + if (4 & r && null != (i = e.stateNode)) { + var o = e.memoizedProps, + s = null !== n ? n.memoizedProps : o, + l = e.type, + u = e.updateQueue; + if (((e.updateQueue = null), null !== u)) + try { + "input" === l && + "radio" === o.type && + null != o.name && + J(i, o), + ye(l, s); + var c = ye(l, o); + for (s = 0; s < u.length; s += 2) { + var f = u[s], + d = u[s + 1]; + "style" === f + ? me(i, d) + : "dangerouslySetInnerHTML" === f + ? fe(i, d) + : "children" === f + ? de(i, d) + : y(i, f, d, c); + } + switch (l) { + case "input": + K(i, o); + break; + case "textarea": + ae(i, o); + break; + case "select": + var h = i._wrapperState.wasMultiple; + i._wrapperState.wasMultiple = !!o.multiple; + var p = o.value; + null != p + ? ne(i, !!o.multiple, p, !1) + : h !== !!o.multiple && + (null != o.defaultValue + ? ne(i, !!o.multiple, o.defaultValue, !0) + : ne(i, !!o.multiple, o.multiple ? [] : "", !1)); + } + i[hi] = o; + } catch (m) { + Cu(e, e.return, m); + } + } + break; + case 6: + if ((ml(t, e), Al(e), 4 & r)) { + if (null === e.stateNode) throw Error(a(162)); + (i = e.stateNode), (o = e.memoizedProps); + try { + i.nodeValue = o; + } catch (m) { + Cu(e, e.return, m); + } + } + break; + case 3: + if ( + (ml(t, e), + Al(e), + 4 & r && null !== n && n.memoizedState.isDehydrated) + ) + try { + zt(t.containerInfo); + } catch (m) { + Cu(e, e.return, m); + } + break; + case 4: + default: + ml(t, e), Al(e); + break; + case 13: + ml(t, e), + Al(e), + 8192 & (i = e.child).flags && + ((o = null !== i.memoizedState), + (i.stateNode.isHidden = o), + !o || + (null !== i.alternate && + null !== i.alternate.memoizedState) || + (zl = Je())), + 4 & r && vl(e); + break; + case 22: + if ( + ((f = null !== n && null !== n.memoizedState), + 1 & e.mode + ? ((Js = (c = Js) || f), ml(t, e), (Js = c)) + : ml(t, e), + Al(e), + 8192 & r) + ) { + if ( + ((c = null !== e.memoizedState), + (e.stateNode.isHidden = c) && !f && 0 !== (1 & e.mode)) + ) + for ($s = e, f = e.child; null !== f; ) { + for (d = $s = f; null !== $s; ) { + switch (((p = (h = $s).child), h.tag)) { + case 0: + case 11: + case 14: + case 15: + rl(4, h, h.return); + break; + case 1: + el(h, h.return); + var v = h.stateNode; + if ("function" === typeof v.componentWillUnmount) { + (r = h), (n = h.return); + try { + (t = r), + (v.props = t.memoizedProps), + (v.state = t.memoizedState), + v.componentWillUnmount(); + } catch (m) { + Cu(r, n, m); + } + } + break; + case 5: + el(h, h.return); + break; + case 22: + if (null !== h.memoizedState) { + Sl(d); + continue; + } + } + null !== p ? ((p.return = h), ($s = p)) : Sl(d); + } + f = f.sibling; + } + e: for (f = null, d = e; ; ) { + if (5 === d.tag) { + if (null === f) { + f = d; + try { + (i = d.stateNode), + c + ? "function" === typeof (o = i.style).setProperty + ? o.setProperty("display", "none", "important") + : (o.display = "none") + : ((l = d.stateNode), + (s = + void 0 !== (u = d.memoizedProps.style) && + null !== u && + u.hasOwnProperty("display") + ? u.display + : null), + (l.style.display = ve("display", s))); + } catch (m) { + Cu(e, e.return, m); + } + } + } else if (6 === d.tag) { + if (null === f) + try { + d.stateNode.nodeValue = c ? "" : d.memoizedProps; + } catch (m) { + Cu(e, e.return, m); + } + } else if ( + ((22 !== d.tag && 23 !== d.tag) || + null === d.memoizedState || + d === e) && + null !== d.child + ) { + (d.child.return = d), (d = d.child); + continue; + } + if (d === e) break e; + for (; null === d.sibling; ) { + if (null === d.return || d.return === e) break e; + f === d && (f = null), (d = d.return); + } + f === d && (f = null), + (d.sibling.return = d.return), + (d = d.sibling); + } + } + break; + case 19: + ml(t, e), Al(e), 4 & r && vl(e); + case 21: + } + } + function Al(e) { + var t = e.flags; + if (2 & t) { + try { + e: { + for (var n = e.return; null !== n; ) { + if (sl(n)) { + var r = n; + break e; + } + n = n.return; + } + throw Error(a(160)); + } + switch (r.tag) { + case 5: + var i = r.stateNode; + 32 & r.flags && (de(i, ""), (r.flags &= -33)), + cl(e, ll(e), i); + break; + case 3: + case 4: + var o = r.stateNode.containerInfo; + ul(e, ll(e), o); + break; + default: + throw Error(a(161)); + } + } catch (s) { + Cu(e, e.return, s); + } + e.flags &= -3; + } + 4096 & t && (e.flags &= -4097); + } + function yl(e, t, n) { + ($s = e), bl(e, t, n); + } + function bl(e, t, n) { + for (var r = 0 !== (1 & e.mode); null !== $s; ) { + var i = $s, + a = i.child; + if (22 === i.tag && r) { + var o = null !== i.memoizedState || qs; + if (!o) { + var s = i.alternate, + l = (null !== s && null !== s.memoizedState) || Js; + s = qs; + var u = Js; + if (((qs = o), (Js = l) && !u)) + for ($s = i; null !== $s; ) + (l = (o = $s).child), + 22 === o.tag && null !== o.memoizedState + ? El(i) + : null !== l + ? ((l.return = o), ($s = l)) + : El(i); + for (; null !== a; ) ($s = a), bl(a, t, n), (a = a.sibling); + ($s = i), (qs = s), (Js = u); + } + xl(e); + } else + 0 !== (8772 & i.subtreeFlags) && null !== a + ? ((a.return = i), ($s = a)) + : xl(e); + } + } + function xl(e) { + for (; null !== $s; ) { + var t = $s; + if (0 !== (8772 & t.flags)) { + var n = t.alternate; + try { + if (0 !== (8772 & t.flags)) + switch (t.tag) { + case 0: + case 11: + case 15: + Js || il(5, t); + break; + case 1: + var r = t.stateNode; + if (4 & t.flags && !Js) + if (null === n) r.componentDidMount(); + else { + var i = + t.elementType === t.type + ? n.memoizedProps + : ma(t.type, n.memoizedProps); + r.componentDidUpdate( + i, + n.memoizedState, + r.__reactInternalSnapshotBeforeUpdate + ); + } + var o = t.updateQueue; + null !== o && Oa(t, o, r); + break; + case 3: + var s = t.updateQueue; + if (null !== s) { + if (((n = null), null !== t.child)) + switch (t.child.tag) { + case 5: + case 1: + n = t.child.stateNode; + } + Oa(t, s, n); + } + break; + case 5: + var l = t.stateNode; + if (null === n && 4 & t.flags) { + n = l; + var u = t.memoizedProps; + switch (t.type) { + case "button": + case "input": + case "select": + case "textarea": + u.autoFocus && n.focus(); + break; + case "img": + u.src && (n.src = u.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 c = t.alternate; + if (null !== c) { + var f = c.memoizedState; + if (null !== f) { + var d = f.dehydrated; + null !== d && zt(d); + } + } + } + break; + default: + throw Error(a(163)); + } + Js || (512 & t.flags && al(t)); + } catch (h) { + Cu(t, t.return, h); + } + } + if (t === e) { + $s = null; + break; + } + if (null !== (n = t.sibling)) { + (n.return = t.return), ($s = n); + break; + } + $s = t.return; + } + } + function Sl(e) { + for (; null !== $s; ) { + var t = $s; + if (t === e) { + $s = null; + break; + } + var n = t.sibling; + if (null !== n) { + (n.return = t.return), ($s = n); + break; + } + $s = t.return; + } + } + function El(e) { + for (; null !== $s; ) { + var t = $s; + try { + switch (t.tag) { + case 0: + case 11: + case 15: + var n = t.return; + try { + il(4, t); + } catch (l) { + Cu(t, n, l); + } + break; + case 1: + var r = t.stateNode; + if ("function" === typeof r.componentDidMount) { + var i = t.return; + try { + r.componentDidMount(); + } catch (l) { + Cu(t, i, l); + } + } + var a = t.return; + try { + al(t); + } catch (l) { + Cu(t, a, l); + } + break; + case 5: + var o = t.return; + try { + al(t); + } catch (l) { + Cu(t, o, l); + } + } + } catch (l) { + Cu(t, t.return, l); + } + if (t === e) { + $s = null; + break; + } + var s = t.sibling; + if (null !== s) { + (s.return = t.return), ($s = s); + break; + } + $s = t.return; + } + } + var _l, + Cl = Math.ceil, + wl = b.ReactCurrentDispatcher, + Tl = b.ReactCurrentOwner, + Ml = b.ReactCurrentBatchConfig, + Il = 0, + kl = null, + Rl = null, + Bl = 0, + Pl = 0, + Ll = _i(0), + Dl = 0, + Ul = null, + Fl = 0, + Ol = 0, + Nl = 0, + Gl = null, + Zl = null, + zl = 0, + Ql = 1 / 0, + Hl = null, + Vl = !1, + jl = null, + Wl = null, + Xl = !1, + Yl = null, + ql = 0, + Jl = 0, + Kl = null, + $l = -1, + eu = 0; + function tu() { + return 0 !== (6 & Il) ? Je() : -1 !== $l ? $l : ($l = Je()); + } + function nu(e) { + return 0 === (1 & e.mode) + ? 1 + : 0 !== (2 & Il) && 0 !== Bl + ? Bl & -Bl + : null !== va.transition + ? (0 === eu && (eu = vt()), eu) + : 0 !== (e = yt) + ? e + : (e = void 0 === (e = window.event) ? 16 : qt(e.type)); + } + function ru(e, t, n, r) { + if (50 < Jl) throw ((Jl = 0), (Kl = null), Error(a(185))); + gt(e, n, r), + (0 !== (2 & Il) && e === kl) || + (e === kl && (0 === (2 & Il) && (Ol |= n), 4 === Dl && lu(e, Bl)), + iu(e, r), + 1 === n && + 0 === Il && + 0 === (1 & t.mode) && + ((Ql = Je() + 500), Ni && zi())); + } + function iu(e, t) { + var n = e.callbackNode; + !(function (e, t) { + for ( + var n = e.suspendedLanes, + r = e.pingedLanes, + i = e.expirationTimes, + a = e.pendingLanes; + 0 < a; + + ) { + var o = 31 - ot(a), + s = 1 << o, + l = i[o]; + -1 === l + ? (0 !== (s & n) && 0 === (s & r)) || (i[o] = ht(s, t)) + : l <= t && (e.expiredLanes |= s), + (a &= ~s); + } + })(e, t); + var r = dt(e, e === kl ? Bl : 0); + if (0 === r) + null !== n && Xe(n), + (e.callbackNode = null), + (e.callbackPriority = 0); + else if (((t = r & -r), e.callbackPriority !== t)) { + if ((null != n && Xe(n), 1 === t)) + 0 === e.tag + ? (function (e) { + (Ni = !0), Zi(e); + })(uu.bind(null, e)) + : Zi(uu.bind(null, e)), + oi(function () { + 0 === (6 & Il) && zi(); + }), + (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 = ku(n, au.bind(null, e)); + } + (e.callbackPriority = t), (e.callbackNode = n); + } + } + function au(e, t) { + if ((($l = -1), (eu = 0), 0 !== (6 & Il))) throw Error(a(327)); + var n = e.callbackNode; + if (Eu() && e.callbackNode !== n) return null; + var r = dt(e, e === kl ? Bl : 0); + if (0 === r) return null; + if (0 !== (30 & r) || 0 !== (r & e.expiredLanes) || t) t = gu(e, r); + else { + t = r; + var i = Il; + Il |= 2; + var o = vu(); + for ( + (kl === e && Bl === t) || + ((Hl = null), (Ql = Je() + 500), hu(e, t)); + ; + + ) + try { + yu(); + break; + } catch (l) { + pu(e, l); + } + xa(), + (wl.current = o), + (Il = i), + null !== Rl ? (t = 0) : ((kl = null), (Bl = 0), (t = Dl)); + } + if (0 !== t) { + if ( + (2 === t && 0 !== (i = pt(e)) && ((r = i), (t = ou(e, i))), + 1 === t) + ) + throw ((n = Ul), hu(e, 0), lu(e, r), iu(e, Je()), n); + if (6 === t) lu(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], + a = i.getSnapshot; + i = i.value; + try { + if (!sr(a(), i)) return !1; + } catch (s) { + 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 = gu(e, r)) && + 0 !== (o = pt(e)) && + ((r = o), (t = ou(e, o))), + 1 === t)) + ) + throw ((n = Ul), hu(e, 0), lu(e, r), iu(e, Je()), n); + switch (((e.finishedWork = i), (e.finishedLanes = r), t)) { + case 0: + case 1: + throw Error(a(345)); + case 2: + case 5: + Su(e, Zl, Hl); + break; + case 3: + if ( + (lu(e, r), + (130023424 & r) === r && 10 < (t = zl + 500 - Je())) + ) { + if (0 !== dt(e, 0)) break; + if (((i = e.suspendedLanes) & r) !== r) { + tu(), (e.pingedLanes |= e.suspendedLanes & i); + break; + } + e.timeoutHandle = ri(Su.bind(null, e, Zl, Hl), t); + break; + } + Su(e, Zl, Hl); + break; + case 4: + if ((lu(e, r), (4194240 & r) === r)) break; + for (t = e.eventTimes, i = -1; 0 < r; ) { + var s = 31 - ot(r); + (o = 1 << s), (s = t[s]) > i && (i = s), (r &= ~o); + } + if ( + ((r = i), + 10 < + (r = + (120 > (r = Je() - r) + ? 120 + : 480 > r + ? 480 + : 1080 > r + ? 1080 + : 1920 > r + ? 1920 + : 3e3 > r + ? 3e3 + : 4320 > r + ? 4320 + : 1960 * Cl(r / 1960)) - r)) + ) { + e.timeoutHandle = ri(Su.bind(null, e, Zl, Hl), r); + break; + } + Su(e, Zl, Hl); + break; + default: + throw Error(a(329)); + } + } + } + return iu(e, Je()), e.callbackNode === n ? au.bind(null, e) : null; + } + function ou(e, t) { + var n = Gl; + return ( + e.current.memoizedState.isDehydrated && (hu(e, t).flags |= 256), + 2 !== (e = gu(e, t)) && ((t = Zl), (Zl = n), null !== t && su(t)), + e + ); + } + function su(e) { + null === Zl ? (Zl = e) : Zl.push.apply(Zl, e); + } + function lu(e, t) { + for ( + t &= ~Nl, + t &= ~Ol, + e.suspendedLanes |= t, + e.pingedLanes &= ~t, + e = e.expirationTimes; + 0 < t; + + ) { + var n = 31 - ot(t), + r = 1 << n; + (e[n] = -1), (t &= ~r); + } + } + function uu(e) { + if (0 !== (6 & Il)) throw Error(a(327)); + Eu(); + var t = dt(e, 0); + if (0 === (1 & t)) return iu(e, Je()), null; + var n = gu(e, t); + if (0 !== e.tag && 2 === n) { + var r = pt(e); + 0 !== r && ((t = r), (n = ou(e, r))); + } + if (1 === n) throw ((n = Ul), hu(e, 0), lu(e, t), iu(e, Je()), n); + if (6 === n) throw Error(a(345)); + return ( + (e.finishedWork = e.current.alternate), + (e.finishedLanes = t), + Su(e, Zl, Hl), + iu(e, Je()), + null + ); + } + function cu(e, t) { + var n = Il; + Il |= 1; + try { + return e(t); + } finally { + 0 === (Il = n) && ((Ql = Je() + 500), Ni && zi()); + } + } + function fu(e) { + null !== Yl && 0 === Yl.tag && 0 === (6 & Il) && Eu(); + var t = Il; + Il |= 1; + var n = Ml.transition, + r = yt; + try { + if (((Ml.transition = null), (yt = 1), e)) return e(); + } finally { + (yt = r), (Ml.transition = n), 0 === (6 & (Il = t)) && zi(); + } + } + function du() { + (Pl = Ll.current), Ci(Ll); + } + function hu(e, t) { + (e.finishedWork = null), (e.finishedLanes = 0); + var n = e.timeoutHandle; + if ((-1 !== n && ((e.timeoutHandle = -1), ii(n)), null !== Rl)) + for (n = Rl.return; null !== n; ) { + var r = n; + switch ((ta(r), r.tag)) { + case 1: + null !== (r = r.type.childContextTypes) && + void 0 !== r && + Pi(); + break; + case 3: + io(), Ci(Ii), Ci(Mi), co(); + break; + case 5: + oo(r); + break; + case 4: + io(); + break; + case 13: + case 19: + Ci(so); + break; + case 10: + Sa(r.type._context); + break; + case 22: + case 23: + du(); + } + n = n.return; + } + if ( + ((kl = e), + (Rl = e = Lu(e.current, null)), + (Bl = Pl = t), + (Dl = 0), + (Ul = null), + (Nl = Ol = Fl = 0), + (Zl = Gl = null), + null !== wa) + ) { + for (t = 0; t < wa.length; t++) + if (null !== (r = (n = wa[t]).interleaved)) { + n.interleaved = null; + var i = r.next, + a = n.pending; + if (null !== a) { + var o = a.next; + (a.next = i), (r.next = o); + } + n.pending = r; + } + wa = null; + } + return e; + } + function pu(e, t) { + for (;;) { + var n = Rl; + try { + if ((xa(), (fo.current = os), Ao)) { + for (var r = vo.memoizedState; null !== r; ) { + var i = r.queue; + null !== i && (i.pending = null), (r = r.next); + } + Ao = !1; + } + if ( + ((po = 0), + (go = mo = vo = null), + (yo = !1), + (bo = 0), + (Tl.current = null), + null === n || null === n.return) + ) { + (Dl = 1), (Ul = t), (Rl = null); + break; + } + e: { + var o = e, + s = n.return, + l = n, + u = t; + if ( + ((t = Bl), + (l.flags |= 32768), + null !== u && + "object" === typeof u && + "function" === typeof u.then) + ) { + var c = u, + f = l, + d = f.tag; + if (0 === (1 & f.mode) && (0 === d || 11 === d || 15 === d)) { + var h = f.alternate; + h + ? ((f.updateQueue = h.updateQueue), + (f.memoizedState = h.memoizedState), + (f.lanes = h.lanes)) + : ((f.updateQueue = null), (f.memoizedState = null)); + } + var p = gs(s); + if (null !== p) { + (p.flags &= -257), + As(p, s, l, 0, t), + 1 & p.mode && ms(o, c, t), + (u = c); + var v = (t = p).updateQueue; + if (null === v) { + var m = new Set(); + m.add(u), (t.updateQueue = m); + } else v.add(u); + break e; + } + if (0 === (1 & t)) { + ms(o, c, t), mu(); + break e; + } + u = Error(a(426)); + } else if (ia && 1 & l.mode) { + var g = gs(s); + if (null !== g) { + 0 === (65536 & g.flags) && (g.flags |= 256), + As(g, s, l, 0, t), + pa(cs(u, l)); + break e; + } + } + (o = u = cs(u, l)), + 4 !== Dl && (Dl = 2), + null === Gl ? (Gl = [o]) : Gl.push(o), + (o = s); + do { + switch (o.tag) { + case 3: + (o.flags |= 65536), + (t &= -t), + (o.lanes |= t), + Ua(o, ps(0, u, t)); + break e; + case 1: + l = u; + var A = o.type, + y = o.stateNode; + if ( + 0 === (128 & o.flags) && + ("function" === typeof A.getDerivedStateFromError || + (null !== y && + "function" === typeof y.componentDidCatch && + (null === Wl || !Wl.has(y)))) + ) { + (o.flags |= 65536), + (t &= -t), + (o.lanes |= t), + Ua(o, vs(o, l, t)); + break e; + } + } + o = o.return; + } while (null !== o); + } + xu(n); + } catch (b) { + (t = b), Rl === n && null !== n && (Rl = n = n.return); + continue; + } + break; + } + } + function vu() { + var e = wl.current; + return (wl.current = os), null === e ? os : e; + } + function mu() { + (0 !== Dl && 3 !== Dl && 2 !== Dl) || (Dl = 4), + null === kl || + (0 === (268435455 & Fl) && 0 === (268435455 & Ol)) || + lu(kl, Bl); + } + function gu(e, t) { + var n = Il; + Il |= 2; + var r = vu(); + for ((kl === e && Bl === t) || ((Hl = null), hu(e, t)); ; ) + try { + Au(); + break; + } catch (i) { + pu(e, i); + } + if ((xa(), (Il = n), (wl.current = r), null !== Rl)) + throw Error(a(261)); + return (kl = null), (Bl = 0), Dl; + } + function Au() { + for (; null !== Rl; ) bu(Rl); + } + function yu() { + for (; null !== Rl && !Ye(); ) bu(Rl); + } + function bu(e) { + var t = _l(e.alternate, e, Pl); + (e.memoizedProps = e.pendingProps), + null === t ? xu(e) : (Rl = t), + (Tl.current = null); + } + function xu(e) { + var t = e; + do { + var n = t.alternate; + if (((e = t.return), 0 === (32768 & t.flags))) { + if (null !== (n = Xs(n, t, Pl))) return void (Rl = n); + } else { + if (null !== (n = Ys(n, t))) + return (n.flags &= 32767), void (Rl = n); + if (null === e) return (Dl = 6), void (Rl = null); + (e.flags |= 32768), (e.subtreeFlags = 0), (e.deletions = null); + } + if (null !== (t = t.sibling)) return void (Rl = t); + Rl = t = e; + } while (null !== t); + 0 === Dl && (Dl = 5); + } + function Su(e, t, n) { + var r = yt, + i = Ml.transition; + try { + (Ml.transition = null), + (yt = 1), + (function (e, t, n, r) { + do { + Eu(); + } while (null !== Yl); + if (0 !== (6 & Il)) throw Error(a(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(a(177)); + (e.callbackNode = null), (e.callbackPriority = 0); + var o = 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 - ot(n), + a = 1 << i; + (t[i] = 0), (r[i] = -1), (e[i] = -1), (n &= ~a); + } + })(e, o), + e === kl && ((Rl = kl = null), (Bl = 0)), + (0 === (2064 & n.subtreeFlags) && 0 === (2064 & n.flags)) || + Xl || + ((Xl = !0), + ku(tt, function () { + return Eu(), null; + })), + (o = 0 !== (15990 & n.flags)), + 0 !== (15990 & n.subtreeFlags) || o) + ) { + (o = Ml.transition), (Ml.transition = null); + var s = yt; + yt = 1; + var l = Il; + (Il |= 4), + (Tl.current = null), + (function (e, t) { + if (((ei = Ht), hr((e = dr())))) { + 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, + o = r.focusNode; + r = r.focusOffset; + try { + n.nodeType, o.nodeType; + } catch (x) { + n = null; + break e; + } + var s = 0, + l = -1, + u = -1, + c = 0, + f = 0, + d = e, + h = null; + t: for (;;) { + for ( + var p; + d !== n || + (0 !== i && 3 !== d.nodeType) || + (l = s + i), + d !== o || + (0 !== r && 3 !== d.nodeType) || + (u = s + r), + 3 === d.nodeType && + (s += d.nodeValue.length), + null !== (p = d.firstChild); + + ) + (h = d), (d = p); + for (;;) { + if (d === e) break t; + if ( + (h === n && ++c === i && (l = s), + h === o && ++f === r && (u = s), + null !== (p = d.nextSibling)) + ) + break; + h = (d = h).parentNode; + } + d = p; + } + n = + -1 === l || -1 === u + ? null + : { start: l, end: u }; + } else n = null; + } + n = n || { start: 0, end: 0 }; + } else n = null; + for ( + ti = { focusedElem: e, selectionRange: n }, + Ht = !1, + $s = t; + null !== $s; + + ) + if ( + ((e = (t = $s).child), + 0 !== (1028 & t.subtreeFlags) && null !== e) + ) + (e.return = t), ($s = e); + else + for (; null !== $s; ) { + t = $s; + try { + var v = 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 !== v) { + var m = v.memoizedProps, + g = v.memoizedState, + A = t.stateNode, + y = A.getSnapshotBeforeUpdate( + t.elementType === t.type + ? m + : ma(t.type, m), + g + ); + A.__reactInternalSnapshotBeforeUpdate = y; + } + 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(a(163)); + } + } catch (x) { + Cu(t, t.return, x); + } + if (null !== (e = t.sibling)) { + (e.return = t.return), ($s = e); + break; + } + $s = t.return; + } + (v = nl), (nl = !1); + })(e, n), + gl(n, e), + pr(ti), + (Ht = !!ei), + (ti = ei = null), + (e.current = n), + yl(n, e, i), + qe(), + (Il = l), + (yt = s), + (Ml.transition = o); + } else e.current = n; + if ( + (Xl && ((Xl = !1), (Yl = e), (ql = i)), + (o = e.pendingLanes), + 0 === o && (Wl = null), + (function (e) { + if (at && "function" === typeof at.onCommitFiberRoot) + try { + at.onCommitFiberRoot( + it, + e, + void 0, + 128 === (128 & e.current.flags) + ); + } catch (t) {} + })(n.stateNode), + iu(e, Je()), + 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 = jl), (jl = null), e); + 0 !== (1 & ql) && 0 !== e.tag && Eu(), + (o = e.pendingLanes), + 0 !== (1 & o) + ? e === Kl + ? Jl++ + : ((Jl = 0), (Kl = e)) + : (Jl = 0), + zi(); + })(e, t, n, r); + } finally { + (Ml.transition = i), (yt = r); + } + return null; + } + function Eu() { + if (null !== Yl) { + var e = bt(ql), + t = Ml.transition, + n = yt; + try { + if (((Ml.transition = null), (yt = 16 > e ? 16 : e), null === Yl)) + var r = !1; + else { + if (((e = Yl), (Yl = null), (ql = 0), 0 !== (6 & Il))) + throw Error(a(331)); + var i = Il; + for (Il |= 4, $s = e.current; null !== $s; ) { + var o = $s, + s = o.child; + if (0 !== (16 & $s.flags)) { + var l = o.deletions; + if (null !== l) { + for (var u = 0; u < l.length; u++) { + var c = l[u]; + for ($s = c; null !== $s; ) { + var f = $s; + switch (f.tag) { + case 0: + case 11: + case 15: + rl(8, f, o); + } + var d = f.child; + if (null !== d) (d.return = f), ($s = d); + else + for (; null !== $s; ) { + var h = (f = $s).sibling, + p = f.return; + if ((ol(f), f === c)) { + $s = null; + break; + } + if (null !== h) { + (h.return = p), ($s = h); + break; + } + $s = p; + } + } + } + var v = o.alternate; + if (null !== v) { + var m = v.child; + if (null !== m) { + v.child = null; + do { + var g = m.sibling; + (m.sibling = null), (m = g); + } while (null !== m); + } + } + $s = o; + } + } + if (0 !== (2064 & o.subtreeFlags) && null !== s) + (s.return = o), ($s = s); + else + e: for (; null !== $s; ) { + if (0 !== (2048 & (o = $s).flags)) + switch (o.tag) { + case 0: + case 11: + case 15: + rl(9, o, o.return); + } + var A = o.sibling; + if (null !== A) { + (A.return = o.return), ($s = A); + break e; + } + $s = o.return; + } + } + var y = e.current; + for ($s = y; null !== $s; ) { + var b = (s = $s).child; + if (0 !== (2064 & s.subtreeFlags) && null !== b) + (b.return = s), ($s = b); + else + e: for (s = y; null !== $s; ) { + if (0 !== (2048 & (l = $s).flags)) + try { + switch (l.tag) { + case 0: + case 11: + case 15: + il(9, l); + } + } catch (S) { + Cu(l, l.return, S); + } + if (l === s) { + $s = null; + break e; + } + var x = l.sibling; + if (null !== x) { + (x.return = l.return), ($s = x); + break e; + } + $s = l.return; + } + } + if ( + ((Il = i), + zi(), + at && "function" === typeof at.onPostCommitFiberRoot) + ) + try { + at.onPostCommitFiberRoot(it, e); + } catch (S) {} + r = !0; + } + return r; + } finally { + (yt = n), (Ml.transition = t); + } + } + return !1; + } + function _u(e, t, n) { + (e = La(e, (t = ps(0, (t = cs(n, t)), 1)), 1)), + (t = tu()), + null !== e && (gt(e, 1, t), iu(e, t)); + } + function Cu(e, t, n) { + if (3 === e.tag) _u(e, e, n); + else + for (; null !== t; ) { + if (3 === t.tag) { + _u(t, e, n); + break; + } + if (1 === t.tag) { + var r = t.stateNode; + if ( + "function" === typeof t.type.getDerivedStateFromError || + ("function" === typeof r.componentDidCatch && + (null === Wl || !Wl.has(r))) + ) { + (t = La(t, (e = vs(t, (e = cs(n, e)), 1)), 1)), + (e = tu()), + null !== t && (gt(t, 1, e), iu(t, e)); + break; + } + } + t = t.return; + } + } + function wu(e, t, n) { + var r = e.pingCache; + null !== r && r.delete(t), + (t = tu()), + (e.pingedLanes |= e.suspendedLanes & n), + kl === e && + (Bl & n) === n && + (4 === Dl || + (3 === Dl && (130023424 & Bl) === Bl && 500 > Je() - zl) + ? hu(e, 0) + : (Nl |= n)), + iu(e, t); + } + function Tu(e, t) { + 0 === t && + (0 === (1 & e.mode) + ? (t = 1) + : ((t = ct), 0 === (130023424 & (ct <<= 1)) && (ct = 4194304))); + var n = tu(); + null !== (e = Ia(e, t)) && (gt(e, t, n), iu(e, n)); + } + function Mu(e) { + var t = e.memoizedState, + n = 0; + null !== t && (n = t.retryLane), Tu(e, n); + } + function Iu(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), Tu(e, n); + } + function ku(e, t) { + return We(e, t); + } + function Ru(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 Bu(e, t, n, r) { + return new Ru(e, t, n, r); + } + function Pu(e) { + return !(!(e = e.prototype) || !e.isReactComponent); + } + function Lu(e, t) { + var n = e.alternate; + return ( + null === n + ? (((n = Bu(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 Du(e, t, n, r, i, o) { + var s = 2; + if (((r = e), "function" === typeof e)) Pu(e) && (s = 1); + else if ("string" === typeof e) s = 5; + else + e: switch (e) { + case E: + return Uu(n.children, i, o, t); + case _: + (s = 8), (i |= 8); + break; + case C: + return ( + ((e = Bu(12, n, t, 2 | i)).elementType = C), (e.lanes = o), e + ); + case I: + return ( + ((e = Bu(13, n, t, i)).elementType = I), (e.lanes = o), e + ); + case k: + return ( + ((e = Bu(19, n, t, i)).elementType = k), (e.lanes = o), e + ); + case P: + return Fu(n, i, o, t); + default: + if ("object" === typeof e && null !== e) + switch (e.$$typeof) { + case w: + s = 10; + break e; + case T: + s = 9; + break e; + case M: + s = 11; + break e; + case R: + s = 14; + break e; + case B: + (s = 16), (r = null); + break e; + } + throw Error(a(130, null == e ? e : typeof e, "")); + } + return ( + ((t = Bu(s, n, t, i)).elementType = e), + (t.type = r), + (t.lanes = o), + t + ); + } + function Uu(e, t, n, r) { + return ((e = Bu(7, e, r, t)).lanes = n), e; + } + function Fu(e, t, n, r) { + return ( + ((e = Bu(22, e, r, t)).elementType = P), + (e.lanes = n), + (e.stateNode = { isHidden: !1 }), + e + ); + } + function Ou(e, t, n) { + return ((e = Bu(6, e, null, t)).lanes = n), e; + } + function Nu(e, t, n) { + return ( + ((t = Bu( + 4, + null !== e.children ? e.children : [], + e.key, + t + )).lanes = n), + (t.stateNode = { + containerInfo: e.containerInfo, + pendingChildren: null, + implementation: e.implementation, + }), + t + ); + } + function Gu(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 = mt(0)), + (this.expirationTimes = mt(-1)), + (this.entangledLanes = + this.finishedLanes = + this.mutableReadLanes = + this.expiredLanes = + this.pingedLanes = + this.suspendedLanes = + this.pendingLanes = + 0), + (this.entanglements = mt(0)), + (this.identifierPrefix = r), + (this.onRecoverableError = i), + (this.mutableSourceEagerHydrationData = null); + } + function Zu(e, t, n, r, i, a, o, s, l) { + return ( + (e = new Gu(e, t, n, s, l)), + 1 === t ? ((t = 1), !0 === a && (t |= 8)) : (t = 0), + (a = Bu(3, null, null, t)), + (e.current = a), + (a.stateNode = e), + (a.memoizedState = { + element: r, + isDehydrated: n, + cache: null, + transitions: null, + pendingSuspenseBoundaries: null, + }), + Ra(a), + e + ); + } + function zu(e) { + if (!e) return Ti; + e: { + if (ze((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 (Bi(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 (Bi(n)) return Di(e, n, t); + } + return t; + } + function Qu(e, t, n, r, i, a, o, s, l) { + return ( + ((e = Zu(n, r, !0, e, 0, a, 0, s, l)).context = zu(null)), + (n = e.current), + ((a = Pa((r = tu()), (i = nu(n)))).callback = + void 0 !== t && null !== t ? t : null), + La(n, a, i), + (e.current.lanes = i), + gt(e, i, r), + iu(e, r), + e + ); + } + function Hu(e, t, n, r) { + var i = t.current, + a = tu(), + o = nu(i); + return ( + (n = zu(n)), + null === t.context ? (t.context = n) : (t.pendingContext = n), + ((t = Pa(a, o)).payload = { element: e }), + null !== (r = void 0 === r ? null : r) && (t.callback = r), + null !== (e = La(i, t, o)) && (ru(e, i, o, a), Da(e, i, o)), + o + ); + } + function Vu(e) { + return (e = e.current).child + ? (e.child.tag, e.child.stateNode) + : null; + } + function ju(e, t) { + if (null !== (e = e.memoizedState) && null !== e.dehydrated) { + var n = e.retryLane; + e.retryLane = 0 !== n && n < t ? n : t; + } + } + function Wu(e, t) { + ju(e, t), (e = e.alternate) && ju(e, t); + } + _l = function (e, t, n) { + if (null !== e) + if (e.memoizedProps !== t.pendingProps || Ii.current) bs = !0; + else { + if (0 === (e.lanes & n) && 0 === (128 & t.flags)) + return ( + (bs = !1), + (function (e, t, n) { + switch (t.tag) { + case 3: + ks(t), ha(); + break; + case 5: + ao(t); + break; + case 1: + Bi(t.type) && Ui(t); + break; + case 4: + ro(t, t.stateNode.containerInfo); + break; + case 10: + var r = t.type._context, + i = t.memoizedProps.value; + wi(ga, r._currentValue), (r._currentValue = i); + break; + case 13: + if (null !== (r = t.memoizedState)) + return null !== r.dehydrated + ? (wi(so, 1 & so.current), (t.flags |= 128), null) + : 0 !== (n & t.child.childLanes) + ? Os(e, t, n) + : (wi(so, 1 & so.current), + null !== (e = Vs(e, t, n)) ? e.sibling : null); + wi(so, 1 & so.current); + break; + case 19: + if ( + ((r = 0 !== (n & t.childLanes)), + 0 !== (128 & e.flags)) + ) { + if (r) return Qs(e, t, n); + t.flags |= 128; + } + if ( + (null !== (i = t.memoizedState) && + ((i.rendering = null), + (i.tail = null), + (i.lastEffect = null)), + wi(so, so.current), + r) + ) + break; + return null; + case 22: + case 23: + return (t.lanes = 0), Cs(e, t, n); + } + return Vs(e, t, n); + })(e, t, n) + ); + bs = 0 !== (131072 & e.flags); + } + else (bs = !1), ia && 0 !== (1048576 & t.flags) && $i(t, ji, t.index); + switch (((t.lanes = 0), t.tag)) { + case 2: + var r = t.type; + Hs(e, t), (e = t.pendingProps); + var i = Ri(t, Mi.current); + _a(t, n), (i = _o(null, t, r, e, i, n)); + var o = Co(); + 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), + Bi(r) ? ((o = !0), Ui(t)) : (o = !1), + (t.memoizedState = + null !== i.state && void 0 !== i.state ? i.state : null), + Ra(t), + (i.updater = Za), + (t.stateNode = i), + (i._reactInternals = t), + Va(t, r, e, n), + (t = Is(null, t, r, !0, o, n))) + : ((t.tag = 0), + ia && o && ea(t), + xs(null, t, i, n), + (t = t.child)), + t + ); + case 16: + r = t.elementType; + e: { + switch ( + (Hs(e, t), + (e = t.pendingProps), + (r = (i = r._init)(r._payload)), + (t.type = r), + (i = t.tag = + (function (e) { + if ("function" === typeof e) return Pu(e) ? 1 : 0; + if (void 0 !== e && null !== e) { + if ((e = e.$$typeof) === M) return 11; + if (e === R) return 14; + } + return 2; + })(r)), + (e = ma(r, e)), + i) + ) { + case 0: + t = Ts(null, t, r, e, n); + break e; + case 1: + t = Ms(null, t, r, e, n); + break e; + case 11: + t = Ss(null, t, r, e, n); + break e; + case 14: + t = Es(null, t, r, ma(r.type, e), n); + break e; + } + throw Error(a(306, r, "")); + } + return t; + case 0: + return ( + (r = t.type), + (i = t.pendingProps), + Ts(e, t, r, (i = t.elementType === r ? i : ma(r, i)), n) + ); + case 1: + return ( + (r = t.type), + (i = t.pendingProps), + Ms(e, t, r, (i = t.elementType === r ? i : ma(r, i)), n) + ); + case 3: + e: { + if ((ks(t), null === e)) throw Error(a(387)); + (r = t.pendingProps), + (i = (o = t.memoizedState).element), + Ba(e, t), + Fa(t, r, null, n); + var s = t.memoizedState; + if (((r = s.element), o.isDehydrated)) { + if ( + ((o = { + element: r, + isDehydrated: !1, + cache: s.cache, + pendingSuspenseBoundaries: s.pendingSuspenseBoundaries, + transitions: s.transitions, + }), + (t.updateQueue.baseState = o), + (t.memoizedState = o), + 256 & t.flags) + ) { + t = Rs(e, t, r, n, (i = cs(Error(a(423)), t))); + break e; + } + if (r !== i) { + t = Rs(e, t, r, n, (i = cs(Error(a(424)), t))); + break e; + } + for ( + ra = ui(t.stateNode.containerInfo.firstChild), + na = t, + ia = !0, + aa = null, + n = Ja(t, null, r, n), + t.child = n; + n; + + ) + (n.flags = (-3 & n.flags) | 4096), (n = n.sibling); + } else { + if ((ha(), r === i)) { + t = Vs(e, t, n); + break e; + } + xs(e, t, r, n); + } + t = t.child; + } + return t; + case 5: + return ( + ao(t), + null === e && ua(t), + (r = t.type), + (i = t.pendingProps), + (o = null !== e ? e.memoizedProps : null), + (s = i.children), + ni(r, i) + ? (s = null) + : null !== o && ni(r, o) && (t.flags |= 32), + ws(e, t), + xs(e, t, s, n), + t.child + ); + case 6: + return null === e && ua(t), null; + case 13: + return Os(e, t, n); + case 4: + return ( + ro(t, t.stateNode.containerInfo), + (r = t.pendingProps), + null === e ? (t.child = qa(t, null, r, n)) : xs(e, t, r, n), + t.child + ); + case 11: + return ( + (r = t.type), + (i = t.pendingProps), + Ss(e, t, r, (i = t.elementType === r ? i : ma(r, i)), n) + ); + case 7: + return xs(e, t, t.pendingProps, n), t.child; + case 8: + case 12: + return xs(e, t, t.pendingProps.children, n), t.child; + case 10: + e: { + if ( + ((r = t.type._context), + (i = t.pendingProps), + (o = t.memoizedProps), + (s = i.value), + wi(ga, r._currentValue), + (r._currentValue = s), + null !== o) + ) + if (sr(o.value, s)) { + if (o.children === i.children && !Ii.current) { + t = Vs(e, t, n); + break e; + } + } else + for ( + null !== (o = t.child) && (o.return = t); + null !== o; + + ) { + var l = o.dependencies; + if (null !== l) { + s = o.child; + for (var u = l.firstContext; null !== u; ) { + if (u.context === r) { + if (1 === o.tag) { + (u = Pa(-1, n & -n)).tag = 2; + var c = o.updateQueue; + if (null !== c) { + var f = (c = c.shared).pending; + null === f + ? (u.next = u) + : ((u.next = f.next), (f.next = u)), + (c.pending = u); + } + } + (o.lanes |= n), + null !== (u = o.alternate) && (u.lanes |= n), + Ea(o.return, n, t), + (l.lanes |= n); + break; + } + u = u.next; + } + } else if (10 === o.tag) + s = o.type === t.type ? null : o.child; + else if (18 === o.tag) { + if (null === (s = o.return)) throw Error(a(341)); + (s.lanes |= n), + null !== (l = s.alternate) && (l.lanes |= n), + Ea(s, n, t), + (s = o.sibling); + } else s = o.child; + if (null !== s) s.return = o; + else + for (s = o; null !== s; ) { + if (s === t) { + s = null; + break; + } + if (null !== (o = s.sibling)) { + (o.return = s.return), (s = o); + break; + } + s = s.return; + } + o = s; + } + xs(e, t, i.children, n), (t = t.child); + } + return t; + case 9: + return ( + (i = t.type), + (r = t.pendingProps.children), + _a(t, n), + (r = r((i = Ca(i)))), + (t.flags |= 1), + xs(e, t, r, n), + t.child + ); + case 14: + return ( + (i = ma((r = t.type), t.pendingProps)), + Es(e, t, r, (i = ma(r.type, i)), n) + ); + case 15: + return _s(e, t, t.type, t.pendingProps, n); + case 17: + return ( + (r = t.type), + (i = t.pendingProps), + (i = t.elementType === r ? i : ma(r, i)), + Hs(e, t), + (t.tag = 1), + Bi(r) ? ((e = !0), Ui(t)) : (e = !1), + _a(t, n), + Qa(t, r, i), + Va(t, r, i, n), + Is(null, t, r, !0, e, n) + ); + case 19: + return Qs(e, t, n); + case 22: + return Cs(e, t, n); + } + throw Error(a(156, t.tag)); + }; + var Xu = + "function" === typeof reportError + ? reportError + : function (e) { + console.error(e); + }; + function Yu(e) { + this._internalRoot = e; + } + function qu(e) { + this._internalRoot = e; + } + function Ju(e) { + return !( + !e || + (1 !== e.nodeType && 9 !== e.nodeType && 11 !== e.nodeType) + ); + } + function Ku(e) { + return !( + !e || + (1 !== e.nodeType && + 9 !== e.nodeType && + 11 !== e.nodeType && + (8 !== e.nodeType || + " react-mount-point-unstable " !== e.nodeValue)) + ); + } + function $u() {} + function ec(e, t, n, r, i) { + var a = n._reactRootContainer; + if (a) { + var o = a; + if ("function" === typeof i) { + var s = i; + i = function () { + var e = Vu(o); + s.call(e); + }; + } + Hu(t, o, e, i); + } else + o = (function (e, t, n, r, i) { + if (i) { + if ("function" === typeof r) { + var a = r; + r = function () { + var e = Vu(o); + a.call(e); + }; + } + var o = Qu(t, r, e, 0, null, !1, 0, "", $u); + return ( + (e._reactRootContainer = o), + (e[pi] = o.current), + zr(8 === e.nodeType ? e.parentNode : e), + fu(), + o + ); + } + for (; (i = e.lastChild); ) e.removeChild(i); + if ("function" === typeof r) { + var s = r; + r = function () { + var e = Vu(l); + s.call(e); + }; + } + var l = Zu(e, 0, !1, null, 0, !1, 0, "", $u); + return ( + (e._reactRootContainer = l), + (e[pi] = l.current), + zr(8 === e.nodeType ? e.parentNode : e), + fu(function () { + Hu(t, l, n, r); + }), + l + ); + })(n, t, e, i, r); + return Vu(o); + } + (qu.prototype.render = Yu.prototype.render = + function (e) { + var t = this._internalRoot; + if (null === t) throw Error(a(409)); + Hu(e, t, null, null); + }), + (qu.prototype.unmount = Yu.prototype.unmount = + function () { + var e = this._internalRoot; + if (null !== e) { + this._internalRoot = null; + var t = e.containerInfo; + fu(function () { + Hu(null, e, null, null); + }), + (t[pi] = null); + } + }), + (qu.prototype.unstable_scheduleHydration = function (e) { + if (e) { + var t = _t(); + e = { blockedOn: null, target: e, priority: t }; + for ( + var n = 0; + n < Pt.length && 0 !== t && t < Pt[n].priority; + n++ + ); + Pt.splice(n, 0, e), 0 === n && Ft(e); + } + }), + (xt = function (e) { + switch (e.tag) { + case 3: + var t = e.stateNode; + if (t.current.memoizedState.isDehydrated) { + var n = ft(t.pendingLanes); + 0 !== n && + (At(t, 1 | n), + iu(t, Je()), + 0 === (6 & Il) && ((Ql = Je() + 500), zi())); + } + break; + case 13: + fu(function () { + var t = Ia(e, 1); + if (null !== t) { + var n = tu(); + ru(t, e, 1, n); + } + }), + Wu(e, 1); + } + }), + (St = function (e) { + if (13 === e.tag) { + var t = Ia(e, 134217728); + if (null !== t) ru(t, e, 134217728, tu()); + Wu(e, 134217728); + } + }), + (Et = function (e) { + if (13 === e.tag) { + var t = nu(e), + n = Ia(e, t); + if (null !== n) ru(n, e, t, tu()); + Wu(e, t); + } + }), + (_t = function () { + return yt; + }), + (Ct = function (e, t) { + var n = yt; + try { + return (yt = e), t(); + } finally { + yt = n; + } + }), + (Se = function (e, t, n) { + switch (t) { + case "input": + if ((K(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 = xi(r); + if (!i) throw Error(a(90)); + W(r), K(r, i); + } + } + } + break; + case "textarea": + ae(e, n); + break; + case "select": + null != (t = n.value) && ne(e, !!n.multiple, t, !1); + } + }), + (Me = cu), + (Ie = fu); + var tc = { + usingClientEntryPoint: !1, + Events: [yi, bi, xi, we, Te, cu], + }, + nc = { + findFiberByHostInstance: Ai, + bundleType: 0, + version: "18.2.0", + rendererPackageName: "react-dom", + }, + rc = { + bundleType: nc.bundleType, + version: nc.version, + rendererPackageName: nc.rendererPackageName, + rendererConfig: nc.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 = Ve(e)) ? null : e.stateNode; + }, + findFiberByHostInstance: + nc.findFiberByHostInstance || + function () { + return null; + }, + findHostInstancesForRefresh: null, + scheduleRefresh: null, + scheduleRoot: null, + setRefreshHandler: null, + getCurrentFiber: null, + reconcilerVersion: "18.2.0-next-9e3b772b8-20220608", + }; + if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { + var ic = __REACT_DEVTOOLS_GLOBAL_HOOK__; + if (!ic.isDisabled && ic.supportsFiber) + try { + (it = ic.inject(rc)), (at = ic); + } catch (ce) {} + } + (t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = tc), + (t.createPortal = function (e, t) { + var n = + 2 < arguments.length && void 0 !== arguments[2] + ? arguments[2] + : null; + if (!Ju(t)) throw Error(a(200)); + return (function (e, t, n) { + var r = + 3 < arguments.length && void 0 !== arguments[3] + ? arguments[3] + : null; + return { + $$typeof: S, + key: null == r ? null : "" + r, + children: e, + containerInfo: t, + implementation: n, + }; + })(e, t, null, n); + }), + (t.createRoot = function (e, t) { + if (!Ju(e)) throw Error(a(299)); + var n = !1, + r = "", + i = Xu; + 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 = Zu(e, 1, !1, null, 0, n, 0, r, i)), + (e[pi] = t.current), + zr(8 === e.nodeType ? e.parentNode : e), + new Yu(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(a(188)); + throw ((e = Object.keys(e).join(",")), Error(a(268, e))); + } + return (e = null === (e = Ve(t)) ? null : e.stateNode); + }), + (t.flushSync = function (e) { + return fu(e); + }), + (t.hydrate = function (e, t, n) { + if (!Ku(t)) throw Error(a(200)); + return ec(null, e, t, !0, n); + }), + (t.hydrateRoot = function (e, t, n) { + if (!Ju(e)) throw Error(a(405)); + var r = (null != n && n.hydratedSources) || null, + i = !1, + o = "", + s = Xu; + if ( + (null !== n && + void 0 !== n && + (!0 === n.unstable_strictMode && (i = !0), + void 0 !== n.identifierPrefix && (o = n.identifierPrefix), + void 0 !== n.onRecoverableError && (s = n.onRecoverableError)), + (t = Qu(t, null, e, 1, null != n ? n : null, i, 0, o, s)), + (e[pi] = t.current), + zr(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 qu(t); + }), + (t.render = function (e, t, n) { + if (!Ku(t)) throw Error(a(200)); + return ec(null, e, t, !1, n); + }), + (t.unmountComponentAtNode = function (e) { + if (!Ku(e)) throw Error(a(40)); + return ( + !!e._reactRootContainer && + (fu(function () { + ec(null, null, e, !1, function () { + (e._reactRootContainer = null), (e[pi] = null); + }); + }), + !0) + ); + }), + (t.unstable_batchedUpdates = cu), + (t.unstable_renderSubtreeIntoContainer = function (e, t, n, r) { + if (!Ku(n)) throw Error(a(200)); + if (null == e || void 0 === e._reactInternals) throw Error(a(38)); + return ec(e, t, n, !1, r); + }), + (t.version = "18.2.0-next-9e3b772b8-20220608"); + }, + 1250: function (e, t, n) { + "use strict"; + var r = n(4164); + (t.createRoot = r.createRoot), (t.hydrateRoot = r.hydrateRoot); + }, + 4164: function (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(4463)); + }, + 67: function (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 < a(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, o = i >>> 1; r < o; ) { + var s = 2 * (r + 1) - 1, + l = e[s], + u = s + 1, + c = e[u]; + if (0 > a(l, n)) + u < i && 0 > a(c, l) + ? ((e[r] = c), (e[u] = n), (r = u)) + : ((e[r] = l), (e[s] = n), (r = s)); + else { + if (!(u < i && 0 > a(c, n))) break e; + (e[r] = c), (e[u] = n), (r = u); + } + } + } + return t; + } + function a(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 o = performance; + t.unstable_now = function () { + return o.now(); + }; + } else { + var s = Date, + l = s.now(); + t.unstable_now = function () { + return s.now() - l; + }; + } + var u = [], + c = [], + f = 1, + d = null, + h = 3, + p = !1, + v = !1, + m = !1, + g = "function" === typeof setTimeout ? setTimeout : null, + A = "function" === typeof clearTimeout ? clearTimeout : null, + y = "undefined" !== typeof setImmediate ? setImmediate : null; + function b(e) { + for (var t = r(c); null !== t; ) { + if (null === t.callback) i(c); + else { + if (!(t.startTime <= e)) break; + i(c), (t.sortIndex = t.expirationTime), n(u, t); + } + t = r(c); + } + } + function x(e) { + if (((m = !1), b(e), !v)) + if (null !== r(u)) (v = !0), P(S); + else { + var t = r(c); + null !== t && L(x, t.startTime - e); + } + } + function S(e, n) { + (v = !1), m && ((m = !1), A(w), (w = -1)), (p = !0); + var a = h; + try { + for ( + b(n), d = r(u); + null !== d && (!(d.expirationTime > n) || (e && !I())); + + ) { + var o = d.callback; + if ("function" === typeof o) { + (d.callback = null), (h = d.priorityLevel); + var s = o(d.expirationTime <= n); + (n = t.unstable_now()), + "function" === typeof s + ? (d.callback = s) + : d === r(u) && i(u), + b(n); + } else i(u); + d = r(u); + } + if (null !== d) var l = !0; + else { + var f = r(c); + null !== f && L(x, f.startTime - n), (l = !1); + } + return l; + } finally { + (d = null), (h = a), (p = !1); + } + } + "undefined" !== typeof navigator && + void 0 !== navigator.scheduling && + void 0 !== navigator.scheduling.isInputPending && + navigator.scheduling.isInputPending.bind(navigator.scheduling); + var E, + _ = !1, + C = null, + w = -1, + T = 5, + M = -1; + function I() { + return !(t.unstable_now() - M < T); + } + function k() { + if (null !== C) { + var e = t.unstable_now(); + M = e; + var n = !0; + try { + n = C(!0, e); + } finally { + n ? E() : ((_ = !1), (C = null)); + } + } else _ = !1; + } + if ("function" === typeof y) + E = function () { + y(k); + }; + else if ("undefined" !== typeof MessageChannel) { + var R = new MessageChannel(), + B = R.port2; + (R.port1.onmessage = k), + (E = function () { + B.postMessage(null); + }); + } else + E = function () { + g(k, 0); + }; + function P(e) { + (C = e), _ || ((_ = !0), E()); + } + function L(e, n) { + w = g(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 () { + v || p || ((v = !0), P(S)); + }), + (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" + ) + : (T = 0 < e ? Math.floor(1e3 / e) : 5); + }), + (t.unstable_getCurrentPriorityLevel = function () { + return h; + }), + (t.unstable_getFirstCallbackNode = function () { + return r(u); + }), + (t.unstable_next = function (e) { + switch (h) { + case 1: + case 2: + case 3: + var t = 3; + break; + default: + t = h; + } + var n = h; + h = t; + try { + return e(); + } finally { + h = 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 = h; + h = e; + try { + return t(); + } finally { + h = n; + } + }), + (t.unstable_scheduleCallback = function (e, i, a) { + var o = t.unstable_now(); + switch ( + ("object" === typeof a && null !== a + ? (a = "number" === typeof (a = a.delay) && 0 < a ? o + a : o) + : (a = o), + e) + ) { + case 1: + var s = -1; + break; + case 2: + s = 250; + break; + case 5: + s = 1073741823; + break; + case 4: + s = 1e4; + break; + default: + s = 5e3; + } + return ( + (e = { + id: f++, + callback: i, + priorityLevel: e, + startTime: a, + expirationTime: (s = a + s), + sortIndex: -1, + }), + a > o + ? ((e.sortIndex = a), + n(c, e), + null === r(u) && + e === r(c) && + (m ? (A(w), (w = -1)) : (m = !0), L(x, a - o))) + : ((e.sortIndex = s), n(u, e), v || p || ((v = !0), P(S))), + e + ); + }), + (t.unstable_shouldYield = I), + (t.unstable_wrapCallback = function (e) { + var t = h; + return function () { + var n = h; + h = t; + try { + return e.apply(this, arguments); + } finally { + h = n; + } + }; + }); + }, + 5585: function (e, t, n) { + "use strict"; + e.exports = n(67); + }, + 1372: function (e, t) { + "use strict"; + var n, + r = Symbol.for("react.element"), + i = Symbol.for("react.portal"), + a = Symbol.for("react.fragment"), + o = Symbol.for("react.strict_mode"), + s = Symbol.for("react.profiler"), + l = Symbol.for("react.provider"), + u = Symbol.for("react.context"), + c = Symbol.for("react.server_context"), + f = Symbol.for("react.forward_ref"), + d = Symbol.for("react.suspense"), + h = Symbol.for("react.suspense_list"), + p = Symbol.for("react.memo"), + v = Symbol.for("react.lazy"), + m = Symbol.for("react.offscreen"); + function g(e) { + if ("object" === typeof e && null !== e) { + var t = e.$$typeof; + switch (t) { + case r: + switch ((e = e.type)) { + case a: + case s: + case o: + case d: + case h: + return e; + default: + switch ((e = e && e.$$typeof)) { + case c: + case u: + case f: + case v: + case p: + case l: + return e; + default: + return t; + } + } + case i: + return t; + } + } + } + (n = Symbol.for("react.module.reference")), + (t.isValidElementType = function (e) { + return ( + "string" === typeof e || + "function" === typeof e || + e === a || + e === s || + e === o || + e === d || + e === h || + e === m || + ("object" === typeof e && + null !== e && + (e.$$typeof === v || + e.$$typeof === p || + e.$$typeof === l || + e.$$typeof === u || + e.$$typeof === f || + e.$$typeof === n || + void 0 !== e.getModuleId)) + ); + }), + (t.typeOf = g); + }, + 7441: function (e, t, n) { + "use strict"; + e.exports = n(1372); + }, + 4976: function (e, t) { + "use strict"; + (t.ConcurrentRoot = 1), + (t.ContinuousEventPriority = 4), + (t.DefaultEventPriority = 16), + (t.DiscreteEventPriority = 1); + }, + 3721: function (e, t, n) { + e.exports = function (e) { + var t = {}, + r = n(2791), + i = n(5296), + a = Object.assign; + function o(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 s = r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED, + l = Symbol.for("react.element"), + u = Symbol.for("react.portal"), + c = Symbol.for("react.fragment"), + f = Symbol.for("react.strict_mode"), + d = Symbol.for("react.profiler"), + h = Symbol.for("react.provider"), + p = Symbol.for("react.context"), + v = Symbol.for("react.forward_ref"), + m = Symbol.for("react.suspense"), + g = Symbol.for("react.suspense_list"), + A = Symbol.for("react.memo"), + y = 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 x = Symbol.iterator; + function S(e) { + return null === e || "object" !== typeof e + ? null + : "function" === typeof (e = (x && e[x]) || e["@@iterator"]) + ? e + : null; + } + function E(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 c: + return "Fragment"; + case u: + return "Portal"; + case d: + return "Profiler"; + case f: + return "StrictMode"; + case m: + return "Suspense"; + case g: + return "SuspenseList"; + } + if ("object" === typeof e) + switch (e.$$typeof) { + case p: + return (e.displayName || "Context") + ".Consumer"; + case h: + return (e._context.displayName || "Context") + ".Provider"; + case v: + var t = e.render; + return ( + (e = e.displayName) || + (e = + "" !== (e = t.displayName || t.name || "") + ? "ForwardRef(" + e + ")" + : "ForwardRef"), + e + ); + case A: + return null !== (t = e.displayName || null) + ? t + : E(e.type) || "Memo"; + case y: + (t = e._payload), (e = e._init); + try { + return E(e(t)); + } catch (n) {} + } + return null; + } + function _(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 E(t); + case 8: + return t === f ? "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 C(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 w(e) { + if (C(e) !== e) throw Error(o(188)); + } + function T(e) { + var t = e.alternate; + if (!t) { + if (null === (t = C(e))) throw Error(o(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 w(i), e; + if (a === r) return w(i), t; + a = a.sibling; + } + throw Error(o(188)); + } + if (n.return !== r.return) (n = i), (r = a); + else { + for (var s = !1, l = i.child; l; ) { + if (l === n) { + (s = !0), (n = i), (r = a); + break; + } + if (l === r) { + (s = !0), (r = i), (n = a); + break; + } + l = l.sibling; + } + if (!s) { + for (l = a.child; l; ) { + if (l === n) { + (s = !0), (n = a), (r = i); + break; + } + if (l === r) { + (s = !0), (r = a), (n = i); + break; + } + l = l.sibling; + } + if (!s) throw Error(o(189)); + } + } + if (n.alternate !== r) throw Error(o(190)); + } + if (3 !== n.tag) throw Error(o(188)); + return n.stateNode.current === n ? e : t; + } + function M(e) { + return null !== (e = T(e)) ? I(e) : null; + } + function I(e) { + if (5 === e.tag || 6 === e.tag) return e; + for (e = e.child; null !== e; ) { + var t = I(e); + if (null !== t) return t; + e = e.sibling; + } + return null; + } + function k(e) { + if (5 === e.tag || 6 === e.tag) return e; + for (e = e.child; null !== e; ) { + if (4 !== e.tag) { + var t = k(e); + if (null !== t) return t; + } + e = e.sibling; + } + return null; + } + var R, + B = Array.isArray, + P = e.getPublicInstance, + L = e.getRootHostContext, + D = e.getChildHostContext, + U = e.prepareForCommit, + F = e.resetAfterCommit, + O = e.createInstance, + N = e.appendInitialChild, + G = e.finalizeInitialChildren, + Z = e.prepareUpdate, + z = e.shouldSetTextContent, + Q = e.createTextInstance, + H = e.scheduleTimeout, + V = e.cancelTimeout, + j = e.noTimeout, + W = e.isPrimaryRenderer, + X = e.supportsMutation, + Y = e.supportsPersistence, + q = e.supportsHydration, + J = e.getInstanceFromNode, + K = e.preparePortalMount, + $ = e.getCurrentEventPriority, + ee = e.detachDeletedInstance, + te = e.supportsMicrotasks, + ne = e.scheduleMicrotask, + re = e.supportsTestSelectors, + ie = e.findFiberRoot, + ae = e.getBoundingRect, + oe = e.getTextContent, + se = e.isHiddenSubtree, + le = e.matchAccessibilityRole, + ue = e.setFocusIfFocusable, + ce = e.setupIntersectionObserver, + fe = e.appendChild, + de = e.appendChildToContainer, + he = e.commitTextUpdate, + pe = e.commitMount, + ve = e.commitUpdate, + me = e.insertBefore, + ge = e.insertInContainerBefore, + Ae = e.removeChild, + ye = e.removeChildFromContainer, + be = e.resetTextContent, + xe = e.hideInstance, + Se = e.hideTextInstance, + Ee = e.unhideInstance, + _e = e.unhideTextInstance, + Ce = e.clearContainer, + we = e.cloneInstance, + Te = e.createContainerChildSet, + Me = e.appendChildToContainerChildSet, + Ie = e.finalizeContainerChildren, + ke = e.replaceContainerChildren, + Re = e.cloneHiddenInstance, + Be = e.cloneHiddenTextInstance, + Pe = e.canHydrateInstance, + Le = e.canHydrateTextInstance, + De = e.canHydrateSuspenseInstance, + Ue = e.isSuspenseInstancePending, + Fe = e.isSuspenseInstanceFallback, + Oe = e.registerSuspenseInstanceRetry, + Ne = e.getNextHydratableSibling, + Ge = e.getFirstHydratableChild, + Ze = e.getFirstHydratableChildWithinContainer, + ze = e.getFirstHydratableChildWithinSuspenseInstance, + Qe = e.hydrateInstance, + He = e.hydrateTextInstance, + Ve = e.hydrateSuspenseInstance, + je = e.getNextHydratableInstanceAfterSuspenseInstance, + We = e.commitHydratedContainer, + Xe = e.commitHydratedSuspenseInstance, + Ye = e.clearSuspenseBoundary, + qe = e.clearSuspenseBoundaryFromContainer, + Je = e.shouldDeleteUnhydratedTailInstances, + Ke = e.didNotMatchHydratedContainerTextInstance, + $e = e.didNotMatchHydratedTextInstance; + function et(e) { + if (void 0 === R) + try { + throw Error(); + } catch (n) { + var t = n.stack.trim().match(/\n( *(at )?)/); + R = (t && t[1]) || ""; + } + return "\n" + R + 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 (u) { + var r = u; + } + Reflect.construct(e, [], t); + } else { + try { + t.call(); + } catch (u) { + r = u; + } + e.call(t.prototype); + } + else { + try { + throw Error(); + } catch (u) { + r = u; + } + e(); + } + } catch (u) { + if (u && r && "string" === typeof u.stack) { + for ( + var i = u.stack.split("\n"), + a = r.stack.split("\n"), + o = i.length - 1, + s = a.length - 1; + 1 <= o && 0 <= s && i[o] !== a[s]; + + ) + s--; + for (; 1 <= o && 0 <= s; o--, s--) + if (i[o] !== a[s]) { + if (1 !== o || 1 !== s) + do { + if ((o--, 0 > --s || i[o] !== a[s])) { + var l = "\n" + i[o].replace(" at new ", " at "); + return ( + e.displayName && + l.includes("") && + (l = l.replace("", e.displayName)), + l + ); + } + } while (1 <= o && 0 <= s); + break; + } + } + } finally { + (tt = !1), (Error.prepareStackTrace = n); + } + return (e = e ? e.displayName || e.name : "") ? et(e) : ""; + } + var rt = Object.prototype.hasOwnProperty, + it = [], + at = -1; + function ot(e) { + return { current: e }; + } + function st(e) { + 0 > at || ((e.current = it[at]), (it[at] = null), at--); + } + function lt(e, t) { + at++, (it[at] = e.current), (e.current = t); + } + var ut = {}, + ct = ot(ut), + ft = ot(!1), + dt = ut; + function ht(e, t) { + var n = e.type.contextTypes; + if (!n) return ut; + var r = e.stateNode; + if (r && r.__reactInternalMemoizedUnmaskedChildContext === t) + return r.__reactInternalMemoizedMaskedChildContext; + var i, + a = {}; + for (i in n) a[i] = t[i]; + return ( + r && + (((e = + e.stateNode).__reactInternalMemoizedUnmaskedChildContext = t), + (e.__reactInternalMemoizedMaskedChildContext = a)), + a + ); + } + function pt(e) { + return null !== (e = e.childContextTypes) && void 0 !== e; + } + function vt() { + st(ft), st(ct); + } + function mt(e, t, n) { + if (ct.current !== ut) throw Error(o(168)); + lt(ct, t), lt(ft, n); + } + function gt(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(o(108, _(e) || "Unknown", i)); + return a({}, n, r); + } + function At(e) { + return ( + (e = + ((e = e.stateNode) && + e.__reactInternalMemoizedMergedChildContext) || + ut), + (dt = ct.current), + lt(ct, e), + lt(ft, ft.current), + !0 + ); + } + function yt(e, t, n) { + var r = e.stateNode; + if (!r) throw Error(o(169)); + n + ? ((e = gt(e, t, dt)), + (r.__reactInternalMemoizedMergedChildContext = e), + st(ft), + st(ct), + lt(ct, e)) + : st(ft), + lt(ft, n); + } + var bt = Math.clz32 + ? Math.clz32 + : function (e) { + return 0 === (e >>>= 0) ? 32 : (31 - ((xt(e) / St) | 0)) | 0; + }, + xt = Math.log, + St = Math.LN2; + var Et = 64, + _t = 4194304; + function Ct(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 wt(e, t) { + var n = e.pendingLanes; + if (0 === n) return 0; + var r = 0, + i = e.suspendedLanes, + a = e.pingedLanes, + o = 268435455 & n; + if (0 !== o) { + var s = o & ~i; + 0 !== s ? (r = Ct(s)) : 0 !== (a &= o) && (r = Ct(a)); + } else 0 !== (o = n & ~i) ? (r = Ct(o)) : 0 !== a && (r = Ct(a)); + if (0 === r) return 0; + if ( + 0 !== t && + t !== r && + 0 === (t & i) && + ((i = r & -r) >= (a = t & -t) || + (16 === i && 0 !== (4194240 & a))) + ) + 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 Tt(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 Mt(e) { + return 0 !== (e = -1073741825 & e.pendingLanes) + ? e + : 1073741824 & e + ? 1073741824 + : 0; + } + function It(e) { + for (var t = [], n = 0; 31 > n; n++) t.push(e); + return t; + } + function kt(e, t, n) { + (e.pendingLanes |= t), + 536870912 !== t && ((e.suspendedLanes = 0), (e.pingedLanes = 0)), + ((e = e.eventTimes)[(t = 31 - bt(t))] = n); + } + function Rt(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 Bt = 0; + function Pt(e) { + return 1 < (e &= -e) + ? 4 < e + ? 0 !== (268435455 & e) + ? 16 + : 536870912 + : 4 + : 1; + } + var Lt = i.unstable_scheduleCallback, + Dt = i.unstable_cancelCallback, + Ut = i.unstable_shouldYield, + Ft = i.unstable_requestPaint, + Ot = i.unstable_now, + Nt = i.unstable_ImmediatePriority, + Gt = i.unstable_UserBlockingPriority, + Zt = i.unstable_NormalPriority, + zt = i.unstable_IdlePriority, + Qt = null, + Ht = null; + var Vt = + "function" === typeof Object.is + ? Object.is + : function (e, t) { + return ( + (e === t && (0 !== e || 1 / e === 1 / t)) || + (e !== e && t !== t) + ); + }, + jt = null, + Wt = !1, + Xt = !1; + function Yt(e) { + null === jt ? (jt = [e]) : jt.push(e); + } + function qt() { + if (!Xt && null !== jt) { + Xt = !0; + var e = 0, + t = Bt; + try { + var n = jt; + for (Bt = 1; e < n.length; e++) { + var r = n[e]; + do { + r = r(!0); + } while (null !== r); + } + (jt = null), (Wt = !1); + } catch (i) { + throw (null !== jt && (jt = jt.slice(e + 1)), Lt(Nt, qt), i); + } finally { + (Bt = t), (Xt = !1); + } + } + return null; + } + var Jt = s.ReactCurrentBatchConfig; + function Kt(e, t) { + if (Vt(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) || !Vt(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 = a({}, t)), (e = e.defaultProps))) + void 0 === t[n] && (t[n] = e[n]); + return t; + } + return t; + } + var tn = ot(null), + nn = null, + rn = null, + an = null; + function on() { + an = rn = nn = null; + } + function sn(e, t, n) { + W + ? (lt(tn, t._currentValue), (t._currentValue = n)) + : (lt(tn, t._currentValue2), (t._currentValue2 = n)); + } + function ln(e) { + var t = tn.current; + st(tn), W ? (e._currentValue = t) : (e._currentValue2 = t); + } + function un(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 cn(e, t) { + (nn = e), + (an = rn = null), + null !== (e = e.dependencies) && + null !== e.firstContext && + (0 !== (e.lanes & t) && (Ui = !0), (e.firstContext = null)); + } + function fn(e) { + var t = W ? e._currentValue : e._currentValue2; + if (an !== e) + if ( + ((e = { context: e, memoizedValue: t, next: null }), + null === rn) + ) { + if (null === nn) throw Error(o(308)); + (rn = e), (nn.dependencies = { lanes: 0, firstContext: e }); + } else rn = rn.next = e; + return t; + } + var dn = null, + hn = !1; + function pn(e) { + e.updateQueue = { + baseState: e.memoizedState, + firstBaseUpdate: null, + lastBaseUpdate: null, + shared: { pending: null, interleaved: null, lanes: 0 }, + effects: null, + }; + } + function vn(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 mn(e, t) { + return { + eventTime: e, + lane: t, + tag: 0, + payload: null, + callback: null, + next: null, + }; + } + function gn(e, t) { + var n = e.updateQueue; + null !== n && + ((n = n.shared), + null !== Xa && 0 !== (1 & e.mode) && 0 === (2 & Wa) + ? (null === (e = n.interleaved) + ? ((t.next = t), null === dn ? (dn = [n]) : dn.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 An(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), Rt(e, n); + } + } + function yn(e, t) { + var n = e.updateQueue, + r = e.alternate; + if (null !== r && n === (r = r.updateQueue)) { + var i = null, + a = null; + if (null !== (n = n.firstBaseUpdate)) { + do { + var o = { + eventTime: n.eventTime, + lane: n.lane, + tag: n.tag, + payload: n.payload, + callback: n.callback, + next: null, + }; + null === a ? (i = a = o) : (a = a.next = o), (n = n.next); + } while (null !== n); + null === a ? (i = a = t) : (a = a.next = t); + } else i = a = t; + return ( + (n = { + baseState: r.baseState, + firstBaseUpdate: i, + lastBaseUpdate: a, + 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; + hn = !1; + var o = i.firstBaseUpdate, + s = i.lastBaseUpdate, + l = i.shared.pending; + if (null !== l) { + i.shared.pending = null; + var u = l, + c = u.next; + (u.next = null), null === s ? (o = c) : (s.next = c), (s = u); + var f = e.alternate; + null !== f && + (l = (f = f.updateQueue).lastBaseUpdate) !== s && + (null === l ? (f.firstBaseUpdate = c) : (l.next = c), + (f.lastBaseUpdate = u)); + } + if (null !== o) { + var d = i.baseState; + for (s = 0, f = c = u = null, l = o; ; ) { + var h = l.lane, + p = l.eventTime; + if ((r & h) === h) { + null !== f && + (f = f.next = + { + eventTime: p, + lane: 0, + tag: l.tag, + payload: l.payload, + callback: l.callback, + next: null, + }); + e: { + var v = e, + m = l; + switch (((h = t), (p = n), m.tag)) { + case 1: + if ("function" === typeof (v = m.payload)) { + d = v.call(p, d, h); + break e; + } + d = v; + break e; + case 3: + v.flags = (-65537 & v.flags) | 128; + case 0: + if ( + null === + (h = + "function" === typeof (v = m.payload) + ? v.call(p, d, h) + : v) || + void 0 === h + ) + break e; + d = a({}, d, h); + break e; + case 2: + hn = !0; + } + } + null !== l.callback && + 0 !== l.lane && + ((e.flags |= 64), + null === (h = i.effects) ? (i.effects = [l]) : h.push(l)); + } else + (p = { + eventTime: p, + lane: h, + tag: l.tag, + payload: l.payload, + callback: l.callback, + next: null, + }), + null === f ? ((c = f = p), (u = d)) : (f = f.next = p), + (s |= h); + if (null === (l = l.next)) { + if (null === (l = i.shared.pending)) break; + (l = (h = l).next), + (h.next = null), + (i.lastBaseUpdate = h), + (i.shared.pending = null); + } + } + if ( + (null === f && (u = d), + (i.baseState = u), + (i.firstBaseUpdate = c), + (i.lastBaseUpdate = f), + null !== (t = i.shared.interleaved)) + ) { + i = t; + do { + (s |= i.lane), (i = i.next); + } while (i !== t); + } else null === o && (i.shared.lanes = 0); + (to |= s), (e.lanes = s), (e.memoizedState = d); + } + } + function xn(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(o(191, i)); + i.call(r); + } + } + } + var Sn = new r.Component().refs; + function En(e, t, n, r) { + (n = + null === (n = n(r, (t = e.memoizedState))) || void 0 === n + ? t + : a({}, t, n)), + (e.memoizedState = n), + 0 === e.lanes && (e.updateQueue.baseState = n); + } + var _n = { + isMounted: function (e) { + return !!(e = e._reactInternals) && C(e) === e; + }, + enqueueSetState: function (e, t, n) { + e = e._reactInternals; + var r = xo(), + i = So(e), + a = mn(r, i); + (a.payload = t), + void 0 !== n && null !== n && (a.callback = n), + gn(e, a), + null !== (t = Eo(e, i, r)) && An(t, e, i); + }, + enqueueReplaceState: function (e, t, n) { + e = e._reactInternals; + var r = xo(), + i = So(e), + a = mn(r, i); + (a.tag = 1), + (a.payload = t), + void 0 !== n && null !== n && (a.callback = n), + gn(e, a), + null !== (t = Eo(e, i, r)) && An(t, e, i); + }, + enqueueForceUpdate: function (e, t) { + e = e._reactInternals; + var n = xo(), + r = So(e), + i = mn(n, r); + (i.tag = 2), + void 0 !== t && null !== t && (i.callback = t), + gn(e, i), + null !== (t = Eo(e, r, n)) && An(t, e, r); + }, + }; + function Cn(e, t, n, r, i, a, o) { + return "function" === typeof (e = e.stateNode).shouldComponentUpdate + ? e.shouldComponentUpdate(r, a, o) + : !t.prototype || + !t.prototype.isPureReactComponent || + !Kt(n, r) || + !Kt(i, a); + } + function wn(e, t, n) { + var r = !1, + i = ut, + a = t.contextType; + return ( + "object" === typeof a && null !== a + ? (a = fn(a)) + : ((i = pt(t) ? dt : ct.current), + (a = (r = null !== (r = t.contextTypes) && void 0 !== r) + ? ht(e, i) + : ut)), + (t = new t(n, a)), + (e.memoizedState = + null !== t.state && void 0 !== t.state ? t.state : null), + (t.updater = _n), + (e.stateNode = t), + (t._reactInternals = e), + r && + (((e = + e.stateNode).__reactInternalMemoizedUnmaskedChildContext = i), + (e.__reactInternalMemoizedMaskedChildContext = a)), + t + ); + } + function Tn(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 && _n.enqueueReplaceState(t, t.state, null); + } + function Mn(e, t, n, r) { + var i = e.stateNode; + (i.props = n), (i.state = e.memoizedState), (i.refs = Sn), pn(e); + var a = t.contextType; + "object" === typeof a && null !== a + ? (i.context = fn(a)) + : ((a = pt(t) ? dt : ct.current), (i.context = ht(e, a))), + (i.state = e.memoizedState), + "function" === typeof (a = t.getDerivedStateFromProps) && + (En(e, t, a, 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 && _n.enqueueReplaceState(i, i.state, null), + bn(e, n, i, r), + (i.state = e.memoizedState)), + "function" === typeof i.componentDidMount && (e.flags |= 4194308); + } + var In = [], + kn = 0, + Rn = null, + Bn = 0, + Pn = [], + Ln = 0, + Dn = null, + Un = 1, + Fn = ""; + function On(e, t) { + (In[kn++] = Bn), (In[kn++] = Rn), (Rn = e), (Bn = t); + } + function Nn(e, t, n) { + (Pn[Ln++] = Un), (Pn[Ln++] = Fn), (Pn[Ln++] = Dn), (Dn = e); + var r = Un; + e = Fn; + var i = 32 - bt(r) - 1; + (r &= ~(1 << i)), (n += 1); + var a = 32 - bt(t) + i; + if (30 < a) { + var o = i - (i % 5); + (a = (r & ((1 << o) - 1)).toString(32)), + (r >>= o), + (i -= o), + (Un = (1 << (32 - bt(t) + i)) | (n << i) | r), + (Fn = a + e); + } else (Un = (1 << a) | (n << i) | r), (Fn = e); + } + function Gn(e) { + null !== e.return && (On(e, 1), Nn(e, 1, 0)); + } + function Zn(e) { + for (; e === Rn; ) + (Rn = In[--kn]), + (In[kn] = null), + (Bn = In[--kn]), + (In[kn] = null); + for (; e === Dn; ) + (Dn = Pn[--Ln]), + (Pn[Ln] = null), + (Fn = Pn[--Ln]), + (Pn[Ln] = null), + (Un = Pn[--Ln]), + (Pn[Ln] = null); + } + var zn = null, + Qn = null, + Hn = !1, + Vn = !1, + jn = null; + function Wn(e, t) { + var n = Ko(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 Xn(e, t) { + switch (e.tag) { + case 5: + return ( + null !== (t = Pe(t, e.type, e.pendingProps)) && + ((e.stateNode = t), (zn = e), (Qn = Ge(t)), !0) + ); + case 6: + return ( + null !== (t = Le(t, e.pendingProps)) && + ((e.stateNode = t), (zn = e), (Qn = null), !0) + ); + case 13: + if (null !== (t = De(t))) { + var n = null !== Dn ? { id: Un, overflow: Fn } : null; + return ( + (e.memoizedState = { + dehydrated: t, + treeContext: n, + retryLane: 1073741824, + }), + ((n = Ko(18, null, null, 0)).stateNode = t), + (n.return = e), + (e.child = n), + (zn = e), + (Qn = null), + !0 + ); + } + return !1; + default: + return !1; + } + } + function Yn(e) { + return 0 !== (1 & e.mode) && 0 === (128 & e.flags); + } + function qn(e) { + if (Hn) { + var t = Qn; + if (t) { + var n = t; + if (!Xn(e, t)) { + if (Yn(e)) throw Error(o(418)); + t = Ne(n); + var r = zn; + t && Xn(e, t) + ? Wn(r, n) + : ((e.flags = (-4097 & e.flags) | 2), (Hn = !1), (zn = e)); + } + } else { + if (Yn(e)) throw Error(o(418)); + (e.flags = (-4097 & e.flags) | 2), (Hn = !1), (zn = e); + } + } + } + function Jn(e) { + for ( + e = e.return; + null !== e && 5 !== e.tag && 3 !== e.tag && 13 !== e.tag; + + ) + e = e.return; + zn = e; + } + function Kn(e) { + if (!q || e !== zn) return !1; + if (!Hn) return Jn(e), (Hn = !0), !1; + if ( + 3 !== e.tag && + (5 !== e.tag || (Je(e.type) && !z(e.type, e.memoizedProps))) + ) { + var t = Qn; + if (t) { + if (Yn(e)) { + for (e = Qn; e; ) e = Ne(e); + throw Error(o(418)); + } + for (; t; ) Wn(e, t), (t = Ne(t)); + } + } + if ((Jn(e), 13 === e.tag)) { + if (!q) throw Error(o(316)); + if (!(e = null !== (e = e.memoizedState) ? e.dehydrated : null)) + throw Error(o(317)); + Qn = je(e); + } else Qn = zn ? Ne(e.stateNode) : null; + return !0; + } + function $n() { + q && ((Qn = zn = null), (Vn = Hn = !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(o(309)); + var r = n.stateNode; + } + if (!r) throw Error(o(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; + t === Sn && (t = i.refs = {}), + null === e ? delete t[a] : (t[a] = e); + }), + (t._stringRef = a), + t); + } + if ("string" !== typeof e) throw Error(o(284)); + if (!n._owner) throw Error(o(290, e)); + } + return e; + } + function nr(e, t) { + throw ( + ((e = Object.prototype.toString.call(t)), + Error( + o( + 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 = es(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 s(t) { + return e && null === t.alternate && (t.flags |= 2), t; + } + function f(e, t, n, r) { + return null === t || 6 !== t.tag + ? (((t = is(n, e.mode, r)).return = e), t) + : (((t = i(t, n)).return = e), t); + } + function d(e, t, n, r) { + var a = n.type; + return a === c + ? p(e, t, n.props.children, r, n.key) + : null !== t && + (t.elementType === a || + ("object" === typeof a && + null !== a && + a.$$typeof === y && + rr(a) === t.type)) + ? (((r = i(t, n.props)).ref = tr(e, t, n)), (r.return = e), r) + : (((r = ts(n.type, n.key, n.props, null, e.mode, r)).ref = tr( + e, + t, + n + )), + (r.return = e), + r); + } + function h(e, t, n, r) { + return null === t || + 4 !== t.tag || + t.stateNode.containerInfo !== n.containerInfo || + t.stateNode.implementation !== n.implementation + ? (((t = as(n, e.mode, r)).return = e), t) + : (((t = i(t, n.children || [])).return = e), t); + } + function p(e, t, n, r, a) { + return null === t || 7 !== t.tag + ? (((t = ns(n, e.mode, r, a)).return = e), t) + : (((t = i(t, n)).return = e), t); + } + function v(e, t, n) { + if (("string" === typeof t && "" !== t) || "number" === typeof t) + return ((t = is("" + t, e.mode, n)).return = e), t; + if ("object" === typeof t && null !== t) { + switch (t.$$typeof) { + case l: + return ( + ((n = ts(t.type, t.key, t.props, null, e.mode, n)).ref = + tr(e, null, t)), + (n.return = e), + n + ); + case u: + return ((t = as(t, e.mode, n)).return = e), t; + case y: + return v(e, (0, t._init)(t._payload), n); + } + if (B(t) || S(t)) + return ((t = ns(t, e.mode, n, null)).return = e), t; + nr(e, t); + } + return null; + } + function m(e, t, n, r) { + var i = null !== t ? t.key : null; + if (("string" === typeof n && "" !== n) || "number" === typeof n) + return null !== i ? null : f(e, t, "" + n, r); + if ("object" === typeof n && null !== n) { + switch (n.$$typeof) { + case l: + return n.key === i ? d(e, t, n, r) : null; + case u: + return n.key === i ? h(e, t, n, r) : null; + case y: + return m(e, t, (i = n._init)(n._payload), r); + } + if (B(n) || S(n)) + return null !== i ? null : p(e, t, n, r, null); + nr(e, n); + } + return null; + } + function g(e, t, n, r, i) { + if (("string" === typeof r && "" !== r) || "number" === typeof r) + return f(t, (e = e.get(n) || null), "" + r, i); + if ("object" === typeof r && null !== r) { + switch (r.$$typeof) { + case l: + return d( + t, + (e = e.get(null === r.key ? n : r.key) || null), + r, + i + ); + case u: + return h( + t, + (e = e.get(null === r.key ? n : r.key) || null), + r, + i + ); + case y: + return g(e, t, n, (0, r._init)(r._payload), i); + } + if (B(r) || S(r)) + return p(t, (e = e.get(n) || null), r, i, null); + nr(t, r); + } + return null; + } + function A(i, o, s, l) { + for ( + var u = null, c = null, f = o, d = (o = 0), h = null; + null !== f && d < s.length; + d++ + ) { + f.index > d ? ((h = f), (f = null)) : (h = f.sibling); + var p = m(i, f, s[d], l); + if (null === p) { + null === f && (f = h); + break; + } + e && f && null === p.alternate && t(i, f), + (o = a(p, o, d)), + null === c ? (u = p) : (c.sibling = p), + (c = p), + (f = h); + } + if (d === s.length) return n(i, f), Hn && On(i, d), u; + if (null === f) { + for (; d < s.length; d++) + null !== (f = v(i, s[d], l)) && + ((o = a(f, o, d)), + null === c ? (u = f) : (c.sibling = f), + (c = f)); + return Hn && On(i, d), u; + } + for (f = r(i, f); d < s.length; d++) + null !== (h = g(f, i, d, s[d], l)) && + (e && + null !== h.alternate && + f.delete(null === h.key ? d : h.key), + (o = a(h, o, d)), + null === c ? (u = h) : (c.sibling = h), + (c = h)); + return ( + e && + f.forEach(function (e) { + return t(i, e); + }), + Hn && On(i, d), + u + ); + } + function b(i, s, l, u) { + var c = S(l); + if ("function" !== typeof c) throw Error(o(150)); + if (null == (l = c.call(l))) throw Error(o(151)); + for ( + var f = (c = null), d = s, h = (s = 0), p = null, A = l.next(); + null !== d && !A.done; + h++, A = l.next() + ) { + d.index > h ? ((p = d), (d = null)) : (p = d.sibling); + var y = m(i, d, A.value, u); + if (null === y) { + null === d && (d = p); + break; + } + e && d && null === y.alternate && t(i, d), + (s = a(y, s, h)), + null === f ? (c = y) : (f.sibling = y), + (f = y), + (d = p); + } + if (A.done) return n(i, d), Hn && On(i, h), c; + if (null === d) { + for (; !A.done; h++, A = l.next()) + null !== (A = v(i, A.value, u)) && + ((s = a(A, s, h)), + null === f ? (c = A) : (f.sibling = A), + (f = A)); + return Hn && On(i, h), c; + } + for (d = r(i, d); !A.done; h++, A = l.next()) + null !== (A = g(d, i, h, A.value, u)) && + (e && + null !== A.alternate && + d.delete(null === A.key ? h : A.key), + (s = a(A, s, h)), + null === f ? (c = A) : (f.sibling = A), + (f = A)); + return ( + e && + d.forEach(function (e) { + return t(i, e); + }), + Hn && On(i, h), + c + ); + } + return function e(r, a, o, f) { + if ( + ("object" === typeof o && + null !== o && + o.type === c && + null === o.key && + (o = o.props.children), + "object" === typeof o && null !== o) + ) { + switch (o.$$typeof) { + case l: + e: { + for (var d = o.key, h = a; null !== h; ) { + if (h.key === d) { + if ((d = o.type) === c) { + if (7 === h.tag) { + n(r, h.sibling), + ((a = i(h, o.props.children)).return = r), + (r = a); + break e; + } + } else if ( + h.elementType === d || + ("object" === typeof d && + null !== d && + d.$$typeof === y && + rr(d) === h.type) + ) { + n(r, h.sibling), + ((a = i(h, o.props)).ref = tr(r, h, o)), + (a.return = r), + (r = a); + break e; + } + n(r, h); + break; + } + t(r, h), (h = h.sibling); + } + o.type === c + ? (((a = ns( + o.props.children, + r.mode, + f, + o.key + )).return = r), + (r = a)) + : (((f = ts( + o.type, + o.key, + o.props, + null, + r.mode, + f + )).ref = tr(r, a, o)), + (f.return = r), + (r = f)); + } + return s(r); + case u: + e: { + for (h = o.key; null !== a; ) { + if (a.key === h) { + if ( + 4 === a.tag && + a.stateNode.containerInfo === o.containerInfo && + a.stateNode.implementation === o.implementation + ) { + n(r, a.sibling), + ((a = i(a, o.children || [])).return = r), + (r = a); + break e; + } + n(r, a); + break; + } + t(r, a), (a = a.sibling); + } + ((a = as(o, r.mode, f)).return = r), (r = a); + } + return s(r); + case y: + return e(r, a, (h = o._init)(o._payload), f); + } + if (B(o)) return A(r, a, o, f); + if (S(o)) return b(r, a, o, f); + nr(r, o); + } + return ("string" === typeof o && "" !== o) || + "number" === typeof o + ? ((o = "" + o), + null !== a && 6 === a.tag + ? (n(r, a.sibling), ((a = i(a, o)).return = r), (r = a)) + : (n(r, a), ((a = is(o, r.mode, f)).return = r), (r = a)), + s(r)) + : n(r, a); + }; + } + var ar = ir(!0), + or = ir(!1), + sr = {}, + lr = ot(sr), + ur = ot(sr), + cr = ot(sr); + function fr(e) { + if (e === sr) throw Error(o(174)); + return e; + } + function dr(e, t) { + lt(cr, t), lt(ur, e), lt(lr, sr), (e = L(t)), st(lr), lt(lr, e); + } + function hr() { + st(lr), st(ur), st(cr); + } + function pr(e) { + var t = fr(cr.current), + n = fr(lr.current); + n !== (t = D(n, e.type, t)) && (lt(ur, e), lt(lr, t)); + } + function vr(e) { + ur.current === e && (st(lr), st(ur)); + } + var mr = ot(0); + function gr(e) { + for (var t = e; null !== t; ) { + if (13 === t.tag) { + var n = t.memoizedState; + if ( + null !== n && + (null === (n = n.dehydrated) || Ue(n) || Fe(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 Ar = []; + function yr() { + for (var e = 0; e < Ar.length; e++) { + var t = Ar[e]; + W + ? (t._workInProgressVersionPrimary = null) + : (t._workInProgressVersionSecondary = null); + } + Ar.length = 0; + } + var br = s.ReactCurrentDispatcher, + xr = s.ReactCurrentBatchConfig, + Sr = 0, + Er = null, + _r = null, + Cr = null, + wr = !1, + Tr = !1, + Mr = 0, + Ir = 0; + function kr() { + throw Error(o(321)); + } + function Rr(e, t) { + if (null === t) return !1; + for (var n = 0; n < t.length && n < e.length; n++) + if (!Vt(e[n], t[n])) return !1; + return !0; + } + function Br(e, t, n, r, i, a) { + if ( + ((Sr = a), + (Er = t), + (t.memoizedState = null), + (t.updateQueue = null), + (t.lanes = 0), + (br.current = null === e || null === e.memoizedState ? pi : vi), + (e = n(r, i)), + Tr) + ) { + a = 0; + do { + if (((Tr = !1), (Mr = 0), 25 <= a)) throw Error(o(301)); + (a += 1), + (Cr = _r = null), + (t.updateQueue = null), + (br.current = mi), + (e = n(r, i)); + } while (Tr); + } + if ( + ((br.current = hi), + (t = null !== _r && null !== _r.next), + (Sr = 0), + (Cr = _r = Er = null), + (wr = !1), + t) + ) + throw Error(o(300)); + return e; + } + function Pr() { + var e = 0 !== Mr; + return (Mr = 0), e; + } + function Lr() { + var e = { + memoizedState: null, + baseState: null, + baseQueue: null, + queue: null, + next: null, + }; + return ( + null === Cr ? (Er.memoizedState = Cr = e) : (Cr = Cr.next = e), Cr + ); + } + function Dr() { + if (null === _r) { + var e = Er.alternate; + e = null !== e ? e.memoizedState : null; + } else e = _r.next; + var t = null === Cr ? Er.memoizedState : Cr.next; + if (null !== t) (Cr = t), (_r = e); + else { + if (null === e) throw Error(o(310)); + (e = { + memoizedState: (_r = e).memoizedState, + baseState: _r.baseState, + baseQueue: _r.baseQueue, + queue: _r.queue, + next: null, + }), + null === Cr ? (Er.memoizedState = Cr = e) : (Cr = Cr.next = e); + } + return Cr; + } + function Ur(e, t) { + return "function" === typeof t ? t(e) : t; + } + function Fr(e) { + var t = Dr(), + n = t.queue; + if (null === n) throw Error(o(311)); + n.lastRenderedReducer = e; + var r = _r, + i = r.baseQueue, + a = n.pending; + if (null !== a) { + if (null !== i) { + var s = i.next; + (i.next = a.next), (a.next = s); + } + (r.baseQueue = i = a), (n.pending = null); + } + if (null !== i) { + (a = i.next), (r = r.baseState); + var l = (s = null), + u = null, + c = a; + do { + var f = c.lane; + if ((Sr & f) === f) + null !== u && + (u = u.next = + { + lane: 0, + action: c.action, + hasEagerState: c.hasEagerState, + eagerState: c.eagerState, + next: null, + }), + (r = c.hasEagerState ? c.eagerState : e(r, c.action)); + else { + var d = { + lane: f, + action: c.action, + hasEagerState: c.hasEagerState, + eagerState: c.eagerState, + next: null, + }; + null === u ? ((l = u = d), (s = r)) : (u = u.next = d), + (Er.lanes |= f), + (to |= f); + } + c = c.next; + } while (null !== c && c !== a); + null === u ? (s = r) : (u.next = l), + Vt(r, t.memoizedState) || (Ui = !0), + (t.memoizedState = r), + (t.baseState = s), + (t.baseQueue = u), + (n.lastRenderedState = r); + } + if (null !== (e = n.interleaved)) { + i = e; + do { + (a = i.lane), (Er.lanes |= a), (to |= a), (i = i.next); + } while (i !== e); + } else null === i && (n.lanes = 0); + return [t.memoizedState, n.dispatch]; + } + function Or(e) { + var t = Dr(), + n = t.queue; + if (null === n) throw Error(o(311)); + n.lastRenderedReducer = e; + var r = n.dispatch, + i = n.pending, + a = t.memoizedState; + if (null !== i) { + n.pending = null; + var s = (i = i.next); + do { + (a = e(a, s.action)), (s = s.next); + } while (s !== i); + Vt(a, t.memoizedState) || (Ui = !0), + (t.memoizedState = a), + null === t.baseQueue && (t.baseState = a), + (n.lastRenderedState = a); + } + return [a, r]; + } + function Nr() {} + function Gr(e, t) { + var n = Er, + r = Dr(), + i = t(), + a = !Vt(r.memoizedState, i); + if ( + (a && ((r.memoizedState = i), (Ui = !0)), + (r = r.queue), + Jr(Qr.bind(null, n, r, e), [e]), + r.getSnapshot !== t || + a || + (null !== Cr && 1 & Cr.memoizedState.tag)) + ) { + if ( + ((n.flags |= 2048), + jr(9, zr.bind(null, n, r, i, t), void 0, null), + null === Xa) + ) + throw Error(o(349)); + 0 !== (30 & Sr) || Zr(n, t, i); + } + return i; + } + function Zr(e, t, n) { + (e.flags |= 16384), + (e = { getSnapshot: t, value: n }), + null === (t = Er.updateQueue) + ? ((t = { lastEffect: null, stores: null }), + (Er.updateQueue = t), + (t.stores = [e])) + : null === (n = t.stores) + ? (t.stores = [e]) + : n.push(e); + } + function zr(e, t, n, r) { + (t.value = n), (t.getSnapshot = r), Hr(t) && Eo(e, 1, -1); + } + function Qr(e, t, n) { + return n(function () { + Hr(t) && Eo(e, 1, -1); + }); + } + function Hr(e) { + var t = e.getSnapshot; + e = e.value; + try { + var n = t(); + return !Vt(e, n); + } catch (r) { + return !0; + } + } + function Vr(e) { + var t = Lr(); + return ( + "function" === typeof e && (e = e()), + (t.memoizedState = t.baseState = e), + (e = { + pending: null, + interleaved: null, + lanes: 0, + dispatch: null, + lastRenderedReducer: Ur, + lastRenderedState: e, + }), + (t.queue = e), + (e = e.dispatch = li.bind(null, Er, e)), + [t.memoizedState, e] + ); + } + function jr(e, t, n, r) { + return ( + (e = { tag: e, create: t, destroy: n, deps: r, next: null }), + null === (t = Er.updateQueue) + ? ((t = { lastEffect: null, stores: null }), + (Er.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 Wr() { + return Dr().memoizedState; + } + function Xr(e, t, n, r) { + var i = Lr(); + (Er.flags |= e), + (i.memoizedState = jr(1 | t, n, void 0, void 0 === r ? null : r)); + } + function Yr(e, t, n, r) { + var i = Dr(); + r = void 0 === r ? null : r; + var a = void 0; + if (null !== _r) { + var o = _r.memoizedState; + if (((a = o.destroy), null !== r && Rr(r, o.deps))) + return void (i.memoizedState = jr(t, n, a, r)); + } + (Er.flags |= e), (i.memoizedState = jr(1 | t, n, a, r)); + } + function qr(e, t) { + return Xr(8390656, 8, e, t); + } + function Jr(e, t) { + return Yr(2048, 8, e, t); + } + function Kr(e, t) { + return Yr(4, 2, e, t); + } + function $r(e, t) { + return Yr(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), + Yr(4, 4, ei.bind(null, t, e), n) + ); + } + function ni() {} + function ri(e, t) { + var n = Dr(); + t = void 0 === t ? null : t; + var r = n.memoizedState; + return null !== r && null !== t && Rr(t, r[1]) + ? r[0] + : ((n.memoizedState = [e, t]), e); + } + function ii(e, t) { + var n = Dr(); + t = void 0 === t ? null : t; + var r = n.memoizedState; + return null !== r && null !== t && Rr(t, r[1]) + ? r[0] + : ((e = e()), (n.memoizedState = [e, t]), e); + } + function ai(e, t) { + var n = Bt; + (Bt = 0 !== n && 4 > n ? n : 4), e(!0); + var r = xr.transition; + xr.transition = {}; + try { + e(!1), t(); + } finally { + (Bt = n), (xr.transition = r); + } + } + function oi() { + return Dr().memoizedState; + } + function si(e, t, n) { + var r = So(e); + (n = { + lane: r, + action: n, + hasEagerState: !1, + eagerState: null, + next: null, + }), + ui(e) + ? ci(t, n) + : (fi(e, t, n), + null !== (e = Eo(e, r, (n = xo()))) && di(e, t, r)); + } + function li(e, t, n) { + var r = So(e), + i = { + lane: r, + action: n, + hasEagerState: !1, + eagerState: null, + next: null, + }; + if (ui(e)) ci(t, i); + else { + fi(e, t, i); + var a = e.alternate; + if ( + 0 === e.lanes && + (null === a || 0 === a.lanes) && + null !== (a = t.lastRenderedReducer) + ) + try { + var o = t.lastRenderedState, + s = a(o, n); + if (((i.hasEagerState = !0), (i.eagerState = s), Vt(s, o))) + return; + } catch (l) {} + null !== (e = Eo(e, r, (n = xo()))) && di(e, t, r); + } + } + function ui(e) { + var t = e.alternate; + return e === Er || (null !== t && t === Er); + } + function ci(e, t) { + Tr = wr = !0; + var n = e.pending; + null === n ? (t.next = t) : ((t.next = n.next), (n.next = t)), + (e.pending = t); + } + function fi(e, t, n) { + null !== Xa && 0 !== (1 & e.mode) && 0 === (2 & Wa) + ? (null === (e = t.interleaved) + ? ((n.next = n), null === dn ? (dn = [t]) : dn.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 di(e, t, n) { + if (0 !== (4194240 & n)) { + var r = t.lanes; + (n |= r &= e.pendingLanes), (t.lanes = n), Rt(e, n); + } + } + var hi = { + readContext: fn, + useCallback: kr, + useContext: kr, + useEffect: kr, + useImperativeHandle: kr, + useInsertionEffect: kr, + useLayoutEffect: kr, + useMemo: kr, + useReducer: kr, + useRef: kr, + useState: kr, + useDebugValue: kr, + useDeferredValue: kr, + useTransition: kr, + useMutableSource: kr, + useSyncExternalStore: kr, + useId: kr, + unstable_isNewReconciler: !1, + }, + pi = { + readContext: fn, + useCallback: function (e, t) { + return (Lr().memoizedState = [e, void 0 === t ? null : t]), e; + }, + useContext: fn, + useEffect: qr, + useImperativeHandle: function (e, t, n) { + return ( + (n = null !== n && void 0 !== n ? n.concat([e]) : null), + Xr(4194308, 4, ei.bind(null, t, e), n) + ); + }, + useLayoutEffect: function (e, t) { + return Xr(4194308, 4, e, t); + }, + useInsertionEffect: function (e, t) { + return Xr(4, 2, e, t); + }, + useMemo: function (e, t) { + var n = Lr(); + return ( + (t = void 0 === t ? null : t), + (e = e()), + (n.memoizedState = [e, t]), + e + ); + }, + useReducer: function (e, t, n) { + var r = Lr(); + 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 = si.bind(null, Er, e)), + [r.memoizedState, e] + ); + }, + useRef: function (e) { + return (e = { current: e }), (Lr().memoizedState = e); + }, + useState: Vr, + useDebugValue: ni, + useDeferredValue: function (e) { + var t = Vr(e), + n = t[0], + r = t[1]; + return ( + qr( + function () { + var t = xr.transition; + xr.transition = {}; + try { + r(e); + } finally { + xr.transition = t; + } + }, + [e] + ), + n + ); + }, + useTransition: function () { + var e = Vr(!1), + t = e[0]; + return ( + (e = ai.bind(null, e[1])), (Lr().memoizedState = e), [t, e] + ); + }, + useMutableSource: function () {}, + useSyncExternalStore: function (e, t, n) { + var r = Er, + i = Lr(); + if (Hn) { + if (void 0 === n) throw Error(o(407)); + n = n(); + } else { + if (((n = t()), null === Xa)) throw Error(o(349)); + 0 !== (30 & Sr) || Zr(r, t, n); + } + i.memoizedState = n; + var a = { value: n, getSnapshot: t }; + return ( + (i.queue = a), + qr(Qr.bind(null, r, a, e), [e]), + (r.flags |= 2048), + jr(9, zr.bind(null, r, a, n, t), void 0, null), + n + ); + }, + useId: function () { + var e = Lr(), + t = Xa.identifierPrefix; + if (Hn) { + var n = Fn; + (t = + ":" + + t + + "R" + + (n = (Un & ~(1 << (32 - bt(Un) - 1))).toString(32) + n)), + 0 < (n = Mr++) && (t += "H" + n.toString(32)), + (t += ":"); + } else t = ":" + t + "r" + (n = Ir++).toString(32) + ":"; + return (e.memoizedState = t); + }, + unstable_isNewReconciler: !1, + }, + vi = { + readContext: fn, + useCallback: ri, + useContext: fn, + useEffect: Jr, + useImperativeHandle: ti, + useInsertionEffect: Kr, + useLayoutEffect: $r, + useMemo: ii, + useReducer: Fr, + useRef: Wr, + useState: function () { + return Fr(Ur); + }, + useDebugValue: ni, + useDeferredValue: function (e) { + var t = Fr(Ur), + n = t[0], + r = t[1]; + return ( + Jr( + function () { + var t = xr.transition; + xr.transition = {}; + try { + r(e); + } finally { + xr.transition = t; + } + }, + [e] + ), + n + ); + }, + useTransition: function () { + return [Fr(Ur)[0], Dr().memoizedState]; + }, + useMutableSource: Nr, + useSyncExternalStore: Gr, + useId: oi, + unstable_isNewReconciler: !1, + }, + mi = { + readContext: fn, + useCallback: ri, + useContext: fn, + useEffect: Jr, + useImperativeHandle: ti, + useInsertionEffect: Kr, + useLayoutEffect: $r, + useMemo: ii, + useReducer: Or, + useRef: Wr, + useState: function () { + return Or(Ur); + }, + useDebugValue: ni, + useDeferredValue: function (e) { + var t = Or(Ur), + n = t[0], + r = t[1]; + return ( + Jr( + function () { + var t = xr.transition; + xr.transition = {}; + try { + r(e); + } finally { + xr.transition = t; + } + }, + [e] + ), + n + ); + }, + useTransition: function () { + return [Or(Ur)[0], Dr().memoizedState]; + }, + useMutableSource: Nr, + useSyncExternalStore: Gr, + useId: oi, + unstable_isNewReconciler: !1, + }; + function gi(e, t) { + try { + var n = "", + r = t; + do { + (n += $t(r)), (r = r.return); + } while (r); + var i = n; + } catch (a) { + i = "\nError generating stack: " + a.message + "\n" + a.stack; + } + return { value: e, source: t, stack: i }; + } + function Ai(e, t) { + try { + console.error(t.value); + } catch (n) { + setTimeout(function () { + throw n; + }); + } + } + var yi, + bi, + xi, + Si, + Ei = "function" === typeof WeakMap ? WeakMap : Map; + function _i(e, t, n) { + ((n = mn(-1, n)).tag = 3), (n.payload = { element: null }); + var r = t.value; + return ( + (n.callback = function () { + co || ((co = !0), (fo = r)), Ai(0, t); + }), + n + ); + } + function Ci(e, t, n) { + (n = mn(-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 () { + Ai(0, t); + }); + } + var a = e.stateNode; + return ( + null !== a && + "function" === typeof a.componentDidCatch && + (n.callback = function () { + Ai(0, t), + "function" !== typeof r && + (null === ho ? (ho = new Set([this])) : ho.add(this)); + var e = t.stack; + this.componentDidCatch(t.value, { + componentStack: null !== e ? e : "", + }); + }), + n + ); + } + function wi(e, t, n) { + var r = e.pingCache; + if (null === r) { + r = e.pingCache = new Ei(); + 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 = jo.bind(null, e, t, n)), t.then(e, e)); + } + function Ti(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 Mi(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 = mn(-1, 1)).tag = 2), gn(n, t))), + (n.lanes |= 1)), + e) + : ((e.flags |= 65536), (e.lanes = i), e); + } + function Ii(e) { + e.flags |= 4; + } + function ki(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 (X) + (yi = function (e, t) { + for (var n = t.child; null !== n; ) { + if (5 === n.tag || 6 === n.tag) N(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 () {}), + (xi = function (e, t, n, r, i) { + if ((e = e.memoizedProps) !== r) { + var a = t.stateNode, + o = fr(lr.current); + (n = Z(a, n, e, r, i, o)), (t.updateQueue = n) && Ii(t); + } + }), + (Si = function (e, t, n, r) { + n !== r && Ii(t); + }); + else if (Y) { + yi = function (e, t, n, r) { + for (var i = t.child; null !== i; ) { + if (5 === i.tag) { + var a = i.stateNode; + n && r && (a = Re(a, i.type, i.memoizedProps, i)), N(e, a); + } else if (6 === i.tag) + (a = i.stateNode), + n && r && (a = Be(a, i.memoizedProps, i)), + N(e, a); + else if (4 !== i.tag) + if (22 === i.tag && null !== i.memoizedState) + null !== (a = i.child) && (a.return = i), yi(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 Ri = function e(t, n, r, i) { + for (var a = n.child; null !== a; ) { + if (5 === a.tag) { + var o = a.stateNode; + r && i && (o = Re(o, a.type, a.memoizedProps, a)), Me(t, o); + } else if (6 === a.tag) + (o = a.stateNode), + r && i && (o = Be(o, a.memoizedProps, a)), + Me(t, o); + else if (4 !== a.tag) + if (22 === a.tag && null !== a.memoizedState) + null !== (o = a.child) && (o.return = a), e(t, a, !0, !0); + else if (null !== a.child) { + (a.child.return = a), (a = a.child); + continue; + } + if (a === n) break; + for (; null === a.sibling; ) { + if (null === a.return || a.return === n) return; + a = a.return; + } + (a.sibling.return = a.return), (a = a.sibling); + } + }; + (bi = function (e, t) { + var n = t.stateNode; + if (!ki(e, t)) { + e = n.containerInfo; + var r = Te(e); + Ri(r, t, !1, !1), (n.pendingChildren = r), Ii(t), Ie(e, r); + } + }), + (xi = function (e, t, n, r, i) { + var a = e.stateNode, + o = e.memoizedProps; + if ((e = ki(e, t)) && o === r) t.stateNode = a; + else { + var s = t.stateNode, + l = fr(lr.current), + u = null; + o !== r && (u = Z(s, n, o, r, i, l)), + e && null === u + ? (t.stateNode = a) + : ((a = we(a, u, n, o, r, t, e, s)), + G(a, n, r, i, l) && Ii(t), + (t.stateNode = a), + e ? Ii(t) : yi(a, t, !1, !1)); + } + }), + (Si = function (e, t, n, r) { + n !== r + ? ((e = fr(cr.current)), + (n = fr(lr.current)), + (t.stateNode = Q(r, e, n, t)), + Ii(t)) + : (t.stateNode = e.stateNode); + }); + } else + (bi = function () {}), (xi = function () {}), (Si = function () {}); + function Bi(e, t) { + if (!Hn) + 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 Pi(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 Li(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 Pi(t), null; + case 1: + case 17: + return pt(t.type) && vt(), Pi(t), null; + case 3: + return ( + (r = t.stateNode), + hr(), + st(ft), + st(ct), + yr(), + r.pendingContext && + ((r.context = r.pendingContext), (r.pendingContext = null)), + (null !== e && null !== e.child) || + (Kn(t) + ? Ii(t) + : null === e || + (e.memoizedState.isDehydrated && + 0 === (256 & t.flags)) || + ((t.flags |= 1024), + null !== jn && (Mo(jn), (jn = null)))), + bi(e, t), + Pi(t), + null + ); + case 5: + vr(t), (n = fr(cr.current)); + var i = t.type; + if (null !== e && null != t.stateNode) + xi(e, t, i, r, n), + e.ref !== t.ref && ((t.flags |= 512), (t.flags |= 2097152)); + else { + if (!r) { + if (null === t.stateNode) throw Error(o(166)); + return Pi(t), null; + } + if (((e = fr(lr.current)), Kn(t))) { + if (!q) throw Error(o(175)); + (e = Qe( + t.stateNode, + t.type, + t.memoizedProps, + n, + e, + t, + !Vn + )), + (t.updateQueue = e), + null !== e && Ii(t); + } else { + var a = O(i, r, n, e, t); + yi(a, t, !1, !1), + (t.stateNode = a), + G(a, i, r, n, e) && Ii(t); + } + null !== t.ref && ((t.flags |= 512), (t.flags |= 2097152)); + } + return Pi(t), null; + case 6: + if (e && null != t.stateNode) Si(e, t, e.memoizedProps, r); + else { + if ("string" !== typeof r && null === t.stateNode) + throw Error(o(166)); + if (((e = fr(cr.current)), (n = fr(lr.current)), Kn(t))) { + if (!q) throw Error(o(176)); + if ( + ((e = t.stateNode), + (r = t.memoizedProps), + (n = He(e, r, t, !Vn)) && null !== (i = zn)) + ) + switch (((a = 0 !== (1 & i.mode)), i.tag)) { + case 3: + Ke(i.stateNode.containerInfo, e, r, a); + break; + case 5: + $e(i.type, i.memoizedProps, i.stateNode, e, r, a); + } + n && Ii(t); + } else t.stateNode = Q(r, e, n, t); + } + return Pi(t), null; + case 13: + if ( + (st(mr), + (r = t.memoizedState), + Hn && + null !== Qn && + 0 !== (1 & t.mode) && + 0 === (128 & t.flags)) + ) { + for (e = Qn; e; ) e = Ne(e); + return $n(), (t.flags |= 98560), t; + } + if (null !== r && null !== r.dehydrated) { + if (((r = Kn(t)), null === e)) { + if (!r) throw Error(o(318)); + if (!q) throw Error(o(344)); + if ( + !(e = + null !== (e = t.memoizedState) ? e.dehydrated : null) + ) + throw Error(o(317)); + Ve(e, t); + } else + $n(), + 0 === (128 & t.flags) && (t.memoizedState = null), + (t.flags |= 4); + return Pi(t), null; + } + return ( + null !== jn && (Mo(jn), (jn = null)), + 0 !== (128 & t.flags) + ? ((t.lanes = n), t) + : ((r = null !== r), + (n = !1), + null === e ? Kn(t) : (n = null !== e.memoizedState), + r && + !n && + ((t.child.flags |= 8192), + 0 !== (1 & t.mode) && + (null === e || 0 !== (1 & mr.current) + ? 0 === $a && ($a = 3) + : Uo())), + null !== t.updateQueue && (t.flags |= 4), + Pi(t), + null) + ); + case 4: + return ( + hr(), + bi(e, t), + null === e && K(t.stateNode.containerInfo), + Pi(t), + null + ); + case 10: + return ln(t.type._context), Pi(t), null; + case 19: + if ((st(mr), null === (i = t.memoizedState))) + return Pi(t), null; + if (((r = 0 !== (128 & t.flags)), null === (a = i.rendering))) + if (r) Bi(i, !1); + else { + if (0 !== $a || (null !== e && 0 !== (128 & e.flags))) + for (e = t.child; null !== e; ) { + if (null !== (a = gr(e))) { + for ( + t.flags |= 128, + Bi(i, !1), + null !== (e = a.updateQueue) && + ((t.updateQueue = e), (t.flags |= 4)), + t.subtreeFlags = 0, + e = n, + r = t.child; + null !== r; + + ) + (i = e), + ((n = r).flags &= 14680066), + null === (a = 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 = a.childLanes), + (n.lanes = a.lanes), + (n.child = a.child), + (n.subtreeFlags = 0), + (n.deletions = null), + (n.memoizedProps = a.memoizedProps), + (n.memoizedState = a.memoizedState), + (n.updateQueue = a.updateQueue), + (n.type = a.type), + (i = a.dependencies), + (n.dependencies = + null === i + ? null + : { + lanes: i.lanes, + firstContext: i.firstContext, + })), + (r = r.sibling); + return lt(mr, (1 & mr.current) | 2), t.child; + } + e = e.sibling; + } + null !== i.tail && + Ot() > so && + ((t.flags |= 128), + (r = !0), + Bi(i, !1), + (t.lanes = 4194304)); + } + else { + if (!r) + if (null !== (e = gr(a))) { + if ( + ((t.flags |= 128), + (r = !0), + null !== (e = e.updateQueue) && + ((t.updateQueue = e), (t.flags |= 4)), + Bi(i, !0), + null === i.tail && + "hidden" === i.tailMode && + !a.alternate && + !Hn) + ) + return Pi(t), null; + } else + 2 * Ot() - i.renderingStartTime > so && + 1073741824 !== n && + ((t.flags |= 128), + (r = !0), + Bi(i, !1), + (t.lanes = 4194304)); + i.isBackwards + ? ((a.sibling = t.child), (t.child = a)) + : (null !== (e = i.last) ? (e.sibling = a) : (t.child = a), + (i.last = a)); + } + return null !== i.tail + ? ((t = i.tail), + (i.rendering = t), + (i.tail = t.sibling), + (i.renderingStartTime = Ot()), + (t.sibling = null), + (e = mr.current), + lt(mr, r ? (1 & e) | 2 : 1 & e), + t) + : (Pi(t), null); + case 22: + case 23: + return ( + Bo(), + (r = null !== t.memoizedState), + null !== e && + (null !== e.memoizedState) !== r && + (t.flags |= 8192), + r && 0 !== (1 & t.mode) + ? 0 !== (1073741824 & Ja) && + (Pi(t), X && 6 & t.subtreeFlags && (t.flags |= 8192)) + : Pi(t), + null + ); + case 24: + case 25: + return null; + } + throw Error(o(156, t.tag)); + } + var Di = s.ReactCurrentOwner, + Ui = !1; + function Fi(e, t, n, r) { + t.child = null === e ? or(t, null, n, r) : ar(t, e.child, n, r); + } + function Oi(e, t, n, r, i) { + n = n.render; + var a = t.ref; + return ( + cn(t, i), + (r = Br(e, t, n, r, a, i)), + (n = Pr()), + null === e || Ui + ? (Hn && n && Gn(t), (t.flags |= 1), Fi(e, t, r, i), t.child) + : ((t.updateQueue = e.updateQueue), + (t.flags &= -2053), + (e.lanes &= ~i), + ia(e, t, i)) + ); + } + function Ni(e, t, n, r, i) { + if (null === e) { + var a = n.type; + return "function" !== typeof a || + $o(a) || + void 0 !== a.defaultProps || + null !== n.compare || + void 0 !== n.defaultProps + ? (((e = ts(n.type, null, r, t, t.mode, i)).ref = t.ref), + (e.return = t), + (t.child = e)) + : ((t.tag = 15), (t.type = a), Gi(e, t, a, r, i)); + } + if (((a = e.child), 0 === (e.lanes & i))) { + var o = a.memoizedProps; + if ( + (n = null !== (n = n.compare) ? n : Kt)(o, r) && + e.ref === t.ref + ) + return ia(e, t, i); + } + return ( + (t.flags |= 1), + ((e = es(a, r)).ref = t.ref), + (e.return = t), + (t.child = e) + ); + } + function Gi(e, t, n, r, i) { + if (null !== e && Kt(e.memoizedProps, r) && e.ref === t.ref) { + if (((Ui = !1), 0 === (e.lanes & i))) + return (t.lanes = e.lanes), ia(e, t, i); + 0 !== (131072 & e.flags) && (Ui = !0); + } + return Qi(e, t, n, r, i); + } + function Zi(e, t, n) { + var r = t.pendingProps, + i = r.children, + a = null !== e ? e.memoizedState : null; + if ("hidden" === r.mode) + if (0 === (1 & t.mode)) + (t.memoizedState = { baseLanes: 0, cachePool: null }), + lt(Ka, Ja), + (Ja |= n); + else { + if (0 === (1073741824 & n)) + return ( + (e = null !== a ? a.baseLanes | n : n), + (t.lanes = t.childLanes = 1073741824), + (t.memoizedState = { baseLanes: e, cachePool: null }), + (t.updateQueue = null), + lt(Ka, Ja), + (Ja |= e), + null + ); + (t.memoizedState = { baseLanes: 0, cachePool: null }), + (r = null !== a ? a.baseLanes : n), + lt(Ka, Ja), + (Ja |= r); + } + else + null !== a + ? ((r = a.baseLanes | n), (t.memoizedState = null)) + : (r = n), + lt(Ka, Ja), + (Ja |= r); + return Fi(e, t, i, n), t.child; + } + function zi(e, t) { + var n = t.ref; + ((null === e && null !== n) || (null !== e && e.ref !== n)) && + ((t.flags |= 512), (t.flags |= 2097152)); + } + function Qi(e, t, n, r, i) { + var a = pt(n) ? dt : ct.current; + return ( + (a = ht(t, a)), + cn(t, i), + (n = Br(e, t, n, r, a, i)), + (r = Pr()), + null === e || Ui + ? (Hn && r && Gn(t), (t.flags |= 1), Fi(e, t, n, i), t.child) + : ((t.updateQueue = e.updateQueue), + (t.flags &= -2053), + (e.lanes &= ~i), + ia(e, t, i)) + ); + } + function Hi(e, t, n, r, i) { + if (pt(n)) { + var a = !0; + At(t); + } else a = !1; + if ((cn(t, i), null === t.stateNode)) + null !== e && + ((e.alternate = null), (t.alternate = null), (t.flags |= 2)), + wn(t, n, r), + Mn(t, n, r, i), + (r = !0); + else if (null === e) { + var o = t.stateNode, + s = t.memoizedProps; + o.props = s; + var l = o.context, + u = n.contextType; + "object" === typeof u && null !== u + ? (u = fn(u)) + : (u = ht(t, (u = pt(n) ? dt : ct.current))); + var c = n.getDerivedStateFromProps, + f = + "function" === typeof c || + "function" === typeof o.getSnapshotBeforeUpdate; + f || + ("function" !== typeof o.UNSAFE_componentWillReceiveProps && + "function" !== typeof o.componentWillReceiveProps) || + ((s !== r || l !== u) && Tn(t, o, r, u)), + (hn = !1); + var d = t.memoizedState; + (o.state = d), + bn(t, r, o, i), + (l = t.memoizedState), + s !== r || d !== l || ft.current || hn + ? ("function" === typeof c && + (En(t, n, c, r), (l = t.memoizedState)), + (s = hn || Cn(t, n, s, r, d, l, u)) + ? (f || + ("function" !== typeof o.UNSAFE_componentWillMount && + "function" !== typeof o.componentWillMount) || + ("function" === typeof o.componentWillMount && + o.componentWillMount(), + "function" === typeof o.UNSAFE_componentWillMount && + o.UNSAFE_componentWillMount()), + "function" === typeof o.componentDidMount && + (t.flags |= 4194308)) + : ("function" === typeof o.componentDidMount && + (t.flags |= 4194308), + (t.memoizedProps = r), + (t.memoizedState = l)), + (o.props = r), + (o.state = l), + (o.context = u), + (r = s)) + : ("function" === typeof o.componentDidMount && + (t.flags |= 4194308), + (r = !1)); + } else { + (o = t.stateNode), + vn(e, t), + (s = t.memoizedProps), + (u = t.type === t.elementType ? s : en(t.type, s)), + (o.props = u), + (f = t.pendingProps), + (d = o.context), + "object" === typeof (l = n.contextType) && null !== l + ? (l = fn(l)) + : (l = ht(t, (l = pt(n) ? dt : ct.current))); + var h = n.getDerivedStateFromProps; + (c = + "function" === typeof h || + "function" === typeof o.getSnapshotBeforeUpdate) || + ("function" !== typeof o.UNSAFE_componentWillReceiveProps && + "function" !== typeof o.componentWillReceiveProps) || + ((s !== f || d !== l) && Tn(t, o, r, l)), + (hn = !1), + (d = t.memoizedState), + (o.state = d), + bn(t, r, o, i); + var p = t.memoizedState; + s !== f || d !== p || ft.current || hn + ? ("function" === typeof h && + (En(t, n, h, r), (p = t.memoizedState)), + (u = hn || Cn(t, n, u, r, d, p, l) || !1) + ? (c || + ("function" !== typeof o.UNSAFE_componentWillUpdate && + "function" !== typeof o.componentWillUpdate) || + ("function" === typeof o.componentWillUpdate && + o.componentWillUpdate(r, p, l), + "function" === typeof o.UNSAFE_componentWillUpdate && + o.UNSAFE_componentWillUpdate(r, p, l)), + "function" === typeof o.componentDidUpdate && + (t.flags |= 4), + "function" === typeof o.getSnapshotBeforeUpdate && + (t.flags |= 1024)) + : ("function" !== typeof o.componentDidUpdate || + (s === e.memoizedProps && d === e.memoizedState) || + (t.flags |= 4), + "function" !== typeof o.getSnapshotBeforeUpdate || + (s === e.memoizedProps && d === e.memoizedState) || + (t.flags |= 1024), + (t.memoizedProps = r), + (t.memoizedState = p)), + (o.props = r), + (o.state = p), + (o.context = l), + (r = u)) + : ("function" !== typeof o.componentDidUpdate || + (s === e.memoizedProps && d === e.memoizedState) || + (t.flags |= 4), + "function" !== typeof o.getSnapshotBeforeUpdate || + (s === e.memoizedProps && d === e.memoizedState) || + (t.flags |= 1024), + (r = !1)); + } + return Vi(e, t, n, r, a, i); + } + function Vi(e, t, n, r, i, a) { + zi(e, t); + var o = 0 !== (128 & t.flags); + if (!r && !o) return i && yt(t, n, !1), ia(e, t, a); + (r = t.stateNode), (Di.current = t); + var s = + o && "function" !== typeof n.getDerivedStateFromError + ? null + : r.render(); + return ( + (t.flags |= 1), + null !== e && o + ? ((t.child = ar(t, e.child, null, a)), + (t.child = ar(t, null, s, a))) + : Fi(e, t, s, a), + (t.memoizedState = r.state), + i && yt(t, n, !0), + t.child + ); + } + function ji(e) { + var t = e.stateNode; + t.pendingContext + ? mt(0, t.pendingContext, t.pendingContext !== t.context) + : t.context && mt(0, t.context, !1), + dr(e, t.containerInfo); + } + function Wi(e, t, n, r, i) { + return $n(), er(i), (t.flags |= 256), Fi(e, t, n, r), t.child; + } + var Xi = { dehydrated: null, treeContext: null, retryLane: 0 }; + function Yi(e) { + return { baseLanes: e, cachePool: null }; + } + function qi(e, t, n) { + var r, + i = t.pendingProps, + a = mr.current, + s = !1, + l = 0 !== (128 & t.flags); + if ( + ((r = l) || + (r = (null === e || null !== e.memoizedState) && 0 !== (2 & a)), + r + ? ((s = !0), (t.flags &= -129)) + : (null !== e && null === e.memoizedState) || (a |= 1), + lt(mr, 1 & a), + null === e) + ) + return ( + qn(t), + null !== (e = t.memoizedState) && null !== (e = e.dehydrated) + ? (0 === (1 & t.mode) + ? (t.lanes = 1) + : Fe(e) + ? (t.lanes = 8) + : (t.lanes = 1073741824), + null) + : ((a = i.children), + (e = i.fallback), + s + ? ((i = t.mode), + (s = t.child), + (a = { mode: "hidden", children: a }), + 0 === (1 & i) && null !== s + ? ((s.childLanes = 0), (s.pendingProps = a)) + : (s = rs(a, i, 0, null)), + (e = ns(e, i, n, null)), + (s.return = t), + (e.return = t), + (s.sibling = e), + (t.child = s), + (t.child.memoizedState = Yi(n)), + (t.memoizedState = Xi), + e) + : Ji(t, a)) + ); + if (null !== (a = e.memoizedState)) { + if (null !== (r = a.dehydrated)) { + if (l) + return 256 & t.flags + ? ((t.flags &= -257), ea(e, t, n, Error(o(422)))) + : null !== t.memoizedState + ? ((t.child = e.child), (t.flags |= 128), null) + : ((s = i.fallback), + (a = t.mode), + (i = rs( + { mode: "visible", children: i.children }, + a, + 0, + null + )), + ((s = ns(s, a, n, null)).flags |= 2), + (i.return = t), + (s.return = t), + (i.sibling = s), + (t.child = i), + 0 !== (1 & t.mode) && ar(t, e.child, null, n), + (t.child.memoizedState = Yi(n)), + (t.memoizedState = Xi), + s); + if (0 === (1 & t.mode)) t = ea(e, t, n, null); + else if (Fe(r)) t = ea(e, t, n, Error(o(419))); + else if (((i = 0 !== (n & e.childLanes)), Ui || i)) { + if (null !== (i = Xa)) { + switch (n & -n) { + case 4: + s = 2; + break; + case 16: + s = 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: + s = 32; + break; + case 536870912: + s = 268435456; + break; + default: + s = 0; + } + 0 !== (i = 0 !== (s & (i.suspendedLanes | n)) ? 0 : s) && + i !== a.retryLane && + ((a.retryLane = i), Eo(e, i, -1)); + } + Uo(), (t = ea(e, t, n, Error(o(421)))); + } else + Ue(r) + ? ((t.flags |= 128), + (t.child = e.child), + (t = Xo.bind(null, e)), + Oe(r, t), + (t = null)) + : ((n = a.treeContext), + q && + ((Qn = ze(r)), + (zn = t), + (Hn = !0), + (jn = null), + (Vn = !1), + null !== n && + ((Pn[Ln++] = Un), + (Pn[Ln++] = Fn), + (Pn[Ln++] = Dn), + (Un = n.id), + (Fn = n.overflow), + (Dn = t))), + ((t = Ji(t, t.pendingProps.children)).flags |= 4096)); + return t; + } + return s + ? ((i = $i(e, t, i.children, i.fallback, n)), + (s = t.child), + (a = e.child.memoizedState), + (s.memoizedState = + null === a + ? Yi(n) + : { baseLanes: a.baseLanes | n, cachePool: null }), + (s.childLanes = e.childLanes & ~n), + (t.memoizedState = Xi), + i) + : ((n = Ki(e, t, i.children, n)), (t.memoizedState = null), n); + } + return s + ? ((i = $i(e, t, i.children, i.fallback, n)), + (s = t.child), + (a = e.child.memoizedState), + (s.memoizedState = + null === a + ? Yi(n) + : { baseLanes: a.baseLanes | n, cachePool: null }), + (s.childLanes = e.childLanes & ~n), + (t.memoizedState = Xi), + i) + : ((n = Ki(e, t, i.children, n)), (t.memoizedState = null), n); + } + function Ji(e, t) { + return ( + ((t = rs( + { mode: "visible", children: t }, + e.mode, + 0, + null + )).return = e), + (e.child = t) + ); + } + function Ki(e, t, n, r) { + var i = e.child; + return ( + (e = i.sibling), + (n = es(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 a = t.mode, + o = (e = e.child).sibling, + s = { mode: "hidden", children: n }; + return ( + 0 === (1 & a) && t.child !== e + ? (((n = t.child).childLanes = 0), + (n.pendingProps = s), + (t.deletions = null)) + : ((n = es(e, s)).subtreeFlags = 14680064 & e.subtreeFlags), + null !== o + ? (r = es(o, r)) + : ((r = ns(r, a, i, null)).flags |= 2), + (r.return = t), + (n.return = t), + (n.sibling = r), + (t.child = n), + r + ); + } + function ea(e, t, n, r) { + return ( + null !== r && er(r), + ar(t, e.child, null, n), + ((e = Ji(t, t.pendingProps.children)).flags |= 2), + (t.memoizedState = null), + e + ); + } + function ta(e, t, n) { + e.lanes |= t; + var r = e.alternate; + null !== r && (r.lanes |= t), un(e.return, t, n); + } + function na(e, t, n, r, i) { + var a = e.memoizedState; + null === a + ? (e.memoizedState = { + isBackwards: t, + rendering: null, + renderingStartTime: 0, + last: r, + tail: n, + tailMode: i, + }) + : ((a.isBackwards = t), + (a.rendering = null), + (a.renderingStartTime = 0), + (a.last = r), + (a.tail = n), + (a.tailMode = i)); + } + function ra(e, t, n) { + var r = t.pendingProps, + i = r.revealOrder, + a = r.tail; + if ((Fi(e, t, r.children, n), 0 !== (2 & (r = mr.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 && ta(e, n, t); + else if (19 === e.tag) ta(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(mr, 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 === gr(e) && (i = n), + (n = n.sibling); + null === (n = i) + ? ((i = t.child), (t.child = null)) + : ((i = n.sibling), (n.sibling = null)), + na(t, !1, i, n, a); + break; + case "backwards": + for (n = null, i = t.child, t.child = null; null !== i; ) { + if (null !== (e = i.alternate) && null === gr(e)) { + t.child = i; + break; + } + (e = i.sibling), (i.sibling = n), (n = i), (i = e); + } + na(t, !0, n, null, a); + break; + case "together": + na(t, !1, null, null, void 0); + break; + default: + t.memoizedState = null; + } + return t.child; + } + function ia(e, t, n) { + if ( + (null !== e && (t.dependencies = e.dependencies), + (to |= t.lanes), + 0 === (n & t.childLanes)) + ) + return null; + if (null !== e && t.child !== e.child) throw Error(o(153)); + if (null !== t.child) { + for ( + n = es((e = t.child), e.pendingProps), + t.child = n, + n.return = t; + null !== e.sibling; + + ) + (e = e.sibling), + ((n = n.sibling = es(e, e.pendingProps)).return = t); + n.sibling = null; + } + return t.child; + } + function aa(e, t) { + switch ((Zn(t), t.tag)) { + case 1: + return ( + pt(t.type) && vt(), + 65536 & (e = t.flags) + ? ((t.flags = (-65537 & e) | 128), t) + : null + ); + case 3: + return ( + hr(), + st(ft), + st(ct), + yr(), + 0 !== (65536 & (e = t.flags)) && 0 === (128 & e) + ? ((t.flags = (-65537 & e) | 128), t) + : null + ); + case 5: + return vr(t), null; + case 13: + if ( + (st(mr), + null !== (e = t.memoizedState) && null !== e.dehydrated) + ) { + if (null === t.alternate) throw Error(o(340)); + $n(); + } + return 65536 & (e = t.flags) + ? ((t.flags = (-65537 & e) | 128), t) + : null; + case 19: + return st(mr), null; + case 4: + return hr(), null; + case 10: + return ln(t.type._context), null; + case 22: + case 23: + return Bo(), null; + default: + return null; + } + } + var oa = !1, + sa = !1, + la = "function" === typeof WeakSet ? WeakSet : Set, + ua = null; + function ca(e, t) { + var n = e.ref; + if (null !== n) + if ("function" === typeof n) + try { + n(null); + } catch (r) { + Vo(e, t, r); + } + else n.current = null; + } + function fa(e, t, n) { + try { + n(); + } catch (r) { + Vo(e, t, r); + } + } + var da = !1; + function ha(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 a = i.destroy; + (i.destroy = void 0), void 0 !== a && fa(t, n, a); + } + i = i.next; + } while (i !== r); + } + } + function pa(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 va(e) { + var t = e.ref; + if (null !== t) { + var n = e.stateNode; + if (5 === e.tag) e = P(n); + else e = n; + "function" === typeof t ? t(e) : (t.current = e); + } + } + function ma(e, t, n) { + if (Ht && "function" === typeof Ht.onCommitFiberUnmount) + try { + Ht.onCommitFiberUnmount(Qt, t); + } catch (o) {} + 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, + a = i.destroy; + (i = i.tag), + void 0 !== a && + (0 !== (2 & i) || 0 !== (4 & i)) && + fa(t, n, a), + (r = r.next); + } while (r !== e); + } + break; + case 1: + if ( + (ca(t, n), + "function" === typeof (e = t.stateNode).componentWillUnmount) + ) + try { + (e.props = t.memoizedProps), + (e.state = t.memoizedState), + e.componentWillUnmount(); + } catch (o) { + Vo(t, n, o); + } + break; + case 5: + ca(t, n); + break; + case 4: + X + ? _a(e, t, n) + : Y && + Y && + ((t = t.stateNode.containerInfo), (n = Te(t)), ke(t, n)); + } + } + function ga(e, t, n) { + for (var r = t; ; ) + if ((ma(e, r, n), null === r.child || (X && 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 Aa(e) { + var t = e.alternate; + null !== t && ((e.alternate = null), Aa(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 ya(e) { + return 5 === e.tag || 3 === e.tag || 4 === e.tag; + } + function ba(e) { + e: for (;;) { + for (; null === e.sibling; ) { + if (null === e.return || ya(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 xa(e) { + if (X) { + e: { + for (var t = e.return; null !== t; ) { + if (ya(t)) break e; + t = t.return; + } + throw Error(o(160)); + } + var n = t; + switch (n.tag) { + case 5: + (t = n.stateNode), + 32 & n.flags && (be(t), (n.flags &= -33)), + Ea(e, (n = ba(e)), t); + break; + case 3: + case 4: + (t = n.stateNode.containerInfo), Sa(e, (n = ba(e)), t); + break; + default: + throw Error(o(161)); + } + } + } + function Sa(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 (Sa(e, t, n), e = e.sibling; null !== e; ) + Sa(e, t, n), (e = e.sibling); + } + function Ea(e, t, n) { + var r = e.tag; + if (5 === r || 6 === r) + (e = e.stateNode), t ? me(n, e, t) : fe(n, e); + else if (4 !== r && null !== (e = e.child)) + for (Ea(e, t, n), e = e.sibling; null !== e; ) + Ea(e, t, n), (e = e.sibling); + } + function _a(e, t, n) { + for (var r, i, a = t, s = !1; ; ) { + if (!s) { + s = a.return; + e: for (;;) { + if (null === s) throw Error(o(160)); + switch (((r = s.stateNode), s.tag)) { + case 5: + i = !1; + break e; + case 3: + case 4: + (r = r.containerInfo), (i = !0); + break e; + } + s = s.return; + } + s = !0; + } + if (5 === a.tag || 6 === a.tag) + ga(e, a, n), i ? ye(r, a.stateNode) : Ae(r, a.stateNode); + else if (18 === a.tag) + i ? qe(r, a.stateNode) : Ye(r, a.stateNode); + else if (4 === a.tag) { + if (null !== a.child) { + (r = a.stateNode.containerInfo), + (i = !0), + (a.child.return = a), + (a = a.child); + continue; + } + } else if ((ma(e, a, n), null !== a.child)) { + (a.child.return = a), (a = a.child); + continue; + } + if (a === t) break; + for (; null === a.sibling; ) { + if (null === a.return || a.return === t) return; + 4 === (a = a.return).tag && (s = !1); + } + (a.sibling.return = a.return), (a = a.sibling); + } + } + function Ca(e, t) { + if (X) { + switch (t.tag) { + case 0: + case 11: + case 14: + case 15: + return ha(3, t, t.return), pa(3, t), void ha(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, + a = t.updateQueue; + (t.updateQueue = null), null !== a && ve(n, a, i, e, r, t); + } + return; + case 6: + if (null === t.stateNode) throw Error(o(162)); + return ( + (n = t.memoizedProps), + void he(t.stateNode, null !== e ? e.memoizedProps : n, n) + ); + case 3: + return void ( + q && + null !== e && + e.memoizedState.isDehydrated && + We(t.stateNode.containerInfo) + ); + case 13: + case 19: + return void wa(t); + } + throw Error(o(163)); + } + switch (t.tag) { + case 0: + case 11: + case 14: + case 15: + return ha(3, t, t.return), pa(3, t), void ha(5, t, t.return); + case 12: + case 22: + case 23: + return; + case 13: + case 19: + return void wa(t); + case 3: + q && + null !== e && + e.memoizedState.isDehydrated && + We(t.stateNode.containerInfo); + } + e: if (Y) { + switch (t.tag) { + case 1: + case 5: + case 6: + break e; + case 3: + case 4: + (t = t.stateNode), ke(t.containerInfo, t.pendingChildren); + break e; + } + throw Error(o(163)); + } + } + function wa(e) { + var t = e.updateQueue; + if (null !== t) { + e.updateQueue = null; + var n = e.stateNode; + null === n && (n = e.stateNode = new la()), + t.forEach(function (t) { + var r = Yo.bind(null, e, t); + n.has(t) || (n.add(t), t.then(r, r)); + }); + } + } + function Ta(e, t, n) { + (ua = e), Ma(e, t, n); + } + function Ma(e, t, n) { + for (var r = 0 !== (1 & e.mode); null !== ua; ) { + var i = ua, + a = i.child; + if (22 === i.tag && r) { + var o = null !== i.memoizedState || oa; + if (!o) { + var s = i.alternate, + l = (null !== s && null !== s.memoizedState) || sa; + s = oa; + var u = sa; + if (((oa = o), (sa = l) && !u)) + for (ua = i; null !== ua; ) + (l = (o = ua).child), + 22 === o.tag && null !== o.memoizedState + ? Ra(i) + : null !== l + ? ((l.return = o), (ua = l)) + : Ra(i); + for (; null !== a; ) (ua = a), Ma(a, t, n), (a = a.sibling); + (ua = i), (oa = s), (sa = u); + } + Ia(e); + } else + 0 !== (8772 & i.subtreeFlags) && null !== a + ? ((a.return = i), (ua = a)) + : Ia(e); + } + } + function Ia(e) { + for (; null !== ua; ) { + var t = ua; + if (0 !== (8772 & t.flags)) { + var n = t.alternate; + try { + if (0 !== (8772 & t.flags)) + switch (t.tag) { + case 0: + case 11: + case 15: + sa || pa(5, t); + break; + case 1: + var r = t.stateNode; + if (4 & t.flags && !sa) + 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 a = t.updateQueue; + null !== a && xn(t, a, r); + break; + case 3: + var s = t.updateQueue; + if (null !== s) { + if (((n = null), null !== t.child)) + switch (t.child.tag) { + case 5: + n = P(t.child.stateNode); + break; + case 1: + n = t.child.stateNode; + } + xn(t, s, n); + } + break; + case 5: + var l = t.stateNode; + null === n && + 4 & t.flags && + pe(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 (q && null === t.memoizedState) { + var u = t.alternate; + if (null !== u) { + var c = u.memoizedState; + if (null !== c) { + var f = c.dehydrated; + null !== f && Xe(f); + } + } + } + break; + default: + throw Error(o(163)); + } + sa || (512 & t.flags && va(t)); + } catch (d) { + Vo(t, t.return, d); + } + } + if (t === e) { + ua = null; + break; + } + if (null !== (n = t.sibling)) { + (n.return = t.return), (ua = n); + break; + } + ua = t.return; + } + } + function ka(e) { + for (; null !== ua; ) { + var t = ua; + if (t === e) { + ua = null; + break; + } + var n = t.sibling; + if (null !== n) { + (n.return = t.return), (ua = n); + break; + } + ua = t.return; + } + } + function Ra(e) { + for (; null !== ua; ) { + var t = ua; + try { + switch (t.tag) { + case 0: + case 11: + case 15: + var n = t.return; + try { + pa(4, t); + } catch (l) { + Vo(t, n, l); + } + break; + case 1: + var r = t.stateNode; + if ("function" === typeof r.componentDidMount) { + var i = t.return; + try { + r.componentDidMount(); + } catch (l) { + Vo(t, i, l); + } + } + var a = t.return; + try { + va(t); + } catch (l) { + Vo(t, a, l); + } + break; + case 5: + var o = t.return; + try { + va(t); + } catch (l) { + Vo(t, o, l); + } + } + } catch (l) { + Vo(t, t.return, l); + } + if (t === e) { + ua = null; + break; + } + var s = t.sibling; + if (null !== s) { + (s.return = t.return), (ua = s); + break; + } + ua = t.return; + } + } + var Ba = 0, + Pa = 1, + La = 2, + Da = 3, + Ua = 4; + if ("function" === typeof Symbol && Symbol.for) { + var Fa = Symbol.for; + (Ba = Fa("selector.component")), + (Pa = Fa("selector.has_pseudo_class")), + (La = Fa("selector.role")), + (Da = Fa("selector.test_id")), + (Ua = Fa("selector.text")); + } + function Oa(e) { + var t = J(e); + if (null != t) { + if ("string" !== typeof t.memoizedProps["data-testname"]) + throw Error(o(364)); + return t; + } + if (null === (e = ie(e))) throw Error(o(362)); + return e.stateNode.current; + } + function Na(e, t) { + switch (t.$$typeof) { + case Ba: + if (e.type === t.value) return !0; + break; + case Pa: + e: { + (t = t.value), (e = [e, 0]); + for (var n = 0; n < e.length; ) { + var r = e[n++], + i = e[n++], + a = t[i]; + if (5 !== r.tag || !se(r)) { + for (; null != a && Na(r, a); ) a = 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 La: + if (5 === e.tag && le(e.stateNode, t.value)) return !0; + break; + case Ua: + if ( + (5 === e.tag || 6 === e.tag) && + null !== (e = oe(e)) && + 0 <= e.indexOf(t.value) + ) + return !0; + break; + case Da: + if ( + 5 === e.tag && + "string" === typeof (e = e.memoizedProps["data-testname"]) && + e.toLowerCase() === t.value.toLowerCase() + ) + return !0; + break; + default: + throw Error(o(365)); + } + return !1; + } + function Ga(e) { + switch (e.$$typeof) { + case Ba: + return "<" + (E(e.value) || "Unknown") + ">"; + case Pa: + return ":has(" + (Ga(e) || "") + ")"; + case La: + return '[role="' + e.value + '"]'; + case Ua: + return '"' + e.value + '"'; + case Da: + return '[data-testname="' + e.value + '"]'; + default: + throw Error(o(365)); + } + } + function Za(e, t) { + var n = []; + e = [e, 0]; + for (var r = 0; r < e.length; ) { + var i = e[r++], + a = e[r++], + o = t[a]; + if (5 !== i.tag || !se(i)) { + for (; null != o && Na(i, o); ) o = t[++a]; + if (a === t.length) n.push(i); + else + for (i = i.child; null !== i; ) e.push(i, a), (i = i.sibling); + } + } + return n; + } + function za(e, t) { + if (!re) throw Error(o(363)); + (e = Za((e = Oa(e)), t)), (t = []), (e = Array.from(e)); + for (var n = 0; n < e.length; ) { + var r = e[n++]; + if (5 === r.tag) se(r) || t.push(r.stateNode); + else for (r = r.child; null !== r; ) e.push(r), (r = r.sibling); + } + return t; + } + var Qa = Math.ceil, + Ha = s.ReactCurrentDispatcher, + Va = s.ReactCurrentOwner, + ja = s.ReactCurrentBatchConfig, + Wa = 0, + Xa = null, + Ya = null, + qa = 0, + Ja = 0, + Ka = ot(0), + $a = 0, + eo = null, + to = 0, + no = 0, + ro = 0, + io = null, + ao = null, + oo = 0, + so = 1 / 0; + function lo() { + so = Ot() + 500; + } + var uo, + co = !1, + fo = null, + ho = null, + po = !1, + vo = null, + mo = 0, + go = 0, + Ao = null, + yo = -1, + bo = 0; + function xo() { + return 0 !== (6 & Wa) ? Ot() : -1 !== yo ? yo : (yo = Ot()); + } + function So(e) { + return 0 === (1 & e.mode) + ? 1 + : 0 !== (2 & Wa) && 0 !== qa + ? qa & -qa + : null !== Jt.transition + ? (0 === bo && + ((e = Et), + 0 === (4194240 & (Et <<= 1)) && (Et = 64), + (bo = e)), + bo) + : 0 !== (e = Bt) + ? e + : $(); + } + function Eo(e, t, n) { + if (50 < go) throw ((go = 0), (Ao = null), Error(o(185))); + var r = _o(e, t); + return null === r + ? null + : (kt(r, t, n), + (0 !== (2 & Wa) && r === Xa) || + (r === Xa && + (0 === (2 & Wa) && (no |= t), 4 === $a && Io(r, qa)), + Co(r, n), + 1 === t && + 0 === Wa && + 0 === (1 & e.mode) && + (lo(), Wt && qt())), + r); + } + function _o(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 Co(e, t) { + var n = e.callbackNode; + !(function (e, t) { + for ( + var n = e.suspendedLanes, + r = e.pingedLanes, + i = e.expirationTimes, + a = e.pendingLanes; + 0 < a; + + ) { + var o = 31 - bt(a), + s = 1 << o, + l = i[o]; + -1 === l + ? (0 !== (s & n) && 0 === (s & r)) || (i[o] = Tt(s, t)) + : l <= t && (e.expiredLanes |= s), + (a &= ~s); + } + })(e, t); + var r = wt(e, e === Xa ? qa : 0); + if (0 === r) + null !== n && Dt(n), + (e.callbackNode = null), + (e.callbackPriority = 0); + else if (((t = r & -r), e.callbackPriority !== t)) { + if ((null != n && Dt(n), 1 === t)) + 0 === e.tag + ? (function (e) { + (Wt = !0), Yt(e); + })(ko.bind(null, e)) + : Yt(ko.bind(null, e)), + te + ? ne(function () { + 0 === Wa && qt(); + }) + : Lt(Nt, qt), + (n = null); + else { + switch (Pt(r)) { + case 1: + n = Nt; + break; + case 4: + n = Gt; + break; + case 16: + default: + n = Zt; + break; + case 536870912: + n = zt; + } + n = qo(n, wo.bind(null, e)); + } + (e.callbackPriority = t), (e.callbackNode = n); + } + } + function wo(e, t) { + if (((yo = -1), (bo = 0), 0 !== (6 & Wa))) throw Error(o(327)); + var n = e.callbackNode; + if (Qo() && e.callbackNode !== n) return null; + var r = wt(e, e === Xa ? qa : 0); + if (0 === r) return null; + if (0 !== (30 & r) || 0 !== (r & e.expiredLanes) || t) t = Fo(e, r); + else { + t = r; + var i = Wa; + Wa |= 2; + var a = Do(); + for ((Xa === e && qa === t) || (lo(), Po(e, t)); ; ) + try { + No(); + break; + } catch (l) { + Lo(e, l); + } + on(), + (Ha.current = a), + (Wa = i), + null !== Ya ? (t = 0) : ((Xa = null), (qa = 0), (t = $a)); + } + if (0 !== t) { + if ( + (2 === t && 0 !== (i = Mt(e)) && ((r = i), (t = To(e, i))), + 1 === t) + ) + throw ((n = eo), Po(e, 0), Io(e, r), Co(e, Ot()), n); + if (6 === t) Io(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], + a = i.getSnapshot; + i = i.value; + try { + if (!Vt(a(), i)) return !1; + } catch (s) { + 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 = Fo(e, r)) && + 0 !== (a = Mt(e)) && + ((r = a), (t = To(e, a))), + 1 === t)) + ) + throw ((n = eo), Po(e, 0), Io(e, r), Co(e, Ot()), n); + switch (((e.finishedWork = i), (e.finishedLanes = r), t)) { + case 0: + case 1: + throw Error(o(345)); + case 2: + case 5: + zo(e, ao); + break; + case 3: + if ( + (Io(e, r), + (130023424 & r) === r && 10 < (t = oo + 500 - Ot())) + ) { + if (0 !== wt(e, 0)) break; + if (((i = e.suspendedLanes) & r) !== r) { + xo(), (e.pingedLanes |= e.suspendedLanes & i); + break; + } + e.timeoutHandle = H(zo.bind(null, e, ao), t); + break; + } + zo(e, ao); + break; + case 4: + if ((Io(e, r), (4194240 & r) === r)) break; + for (t = e.eventTimes, i = -1; 0 < r; ) { + var s = 31 - bt(r); + (a = 1 << s), (s = t[s]) > i && (i = s), (r &= ~a); + } + if ( + ((r = i), + 10 < + (r = + (120 > (r = Ot() - r) + ? 120 + : 480 > r + ? 480 + : 1080 > r + ? 1080 + : 1920 > r + ? 1920 + : 3e3 > r + ? 3e3 + : 4320 > r + ? 4320 + : 1960 * Qa(r / 1960)) - r)) + ) { + e.timeoutHandle = H(zo.bind(null, e, ao), r); + break; + } + zo(e, ao); + break; + default: + throw Error(o(329)); + } + } + } + return Co(e, Ot()), e.callbackNode === n ? wo.bind(null, e) : null; + } + function To(e, t) { + var n = io; + return ( + e.current.memoizedState.isDehydrated && (Po(e, t).flags |= 256), + 2 !== (e = Fo(e, t)) && ((t = ao), (ao = n), null !== t && Mo(t)), + e + ); + } + function Mo(e) { + null === ao ? (ao = e) : ao.push.apply(ao, e); + } + function Io(e, t) { + for ( + t &= ~ro, + t &= ~no, + 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 ko(e) { + if (0 !== (6 & Wa)) throw Error(o(327)); + Qo(); + var t = wt(e, 0); + if (0 === (1 & t)) return Co(e, Ot()), null; + var n = Fo(e, t); + if (0 !== e.tag && 2 === n) { + var r = Mt(e); + 0 !== r && ((t = r), (n = To(e, r))); + } + if (1 === n) throw ((n = eo), Po(e, 0), Io(e, t), Co(e, Ot()), n); + if (6 === n) throw Error(o(345)); + return ( + (e.finishedWork = e.current.alternate), + (e.finishedLanes = t), + zo(e, ao), + Co(e, Ot()), + null + ); + } + function Ro(e) { + null !== vo && 0 === vo.tag && 0 === (6 & Wa) && Qo(); + var t = Wa; + Wa |= 1; + var n = ja.transition, + r = Bt; + try { + if (((ja.transition = null), (Bt = 1), e)) return e(); + } finally { + (Bt = r), (ja.transition = n), 0 === (6 & (Wa = t)) && qt(); + } + } + function Bo() { + (Ja = Ka.current), st(Ka); + } + function Po(e, t) { + (e.finishedWork = null), (e.finishedLanes = 0); + var n = e.timeoutHandle; + if ((n !== j && ((e.timeoutHandle = j), V(n)), null !== Ya)) + for (n = Ya.return; null !== n; ) { + var r = n; + switch ((Zn(r), r.tag)) { + case 1: + null !== (r = r.type.childContextTypes) && + void 0 !== r && + vt(); + break; + case 3: + hr(), st(ft), st(ct), yr(); + break; + case 5: + vr(r); + break; + case 4: + hr(); + break; + case 13: + case 19: + st(mr); + break; + case 10: + ln(r.type._context); + break; + case 22: + case 23: + Bo(); + } + n = n.return; + } + if ( + ((Xa = e), + (Ya = e = es(e.current, null)), + (qa = Ja = t), + ($a = 0), + (eo = null), + (ro = no = to = 0), + (ao = io = null), + null !== dn) + ) { + for (t = 0; t < dn.length; t++) + if (null !== (r = (n = dn[t]).interleaved)) { + n.interleaved = null; + var i = r.next, + a = n.pending; + if (null !== a) { + var o = a.next; + (a.next = i), (r.next = o); + } + n.pending = r; + } + dn = null; + } + return e; + } + function Lo(e, t) { + for (;;) { + var n = Ya; + try { + if ((on(), (br.current = hi), wr)) { + for (var r = Er.memoizedState; null !== r; ) { + var i = r.queue; + null !== i && (i.pending = null), (r = r.next); + } + wr = !1; + } + if ( + ((Sr = 0), + (Cr = _r = Er = null), + (Tr = !1), + (Mr = 0), + (Va.current = null), + null === n || null === n.return) + ) { + ($a = 1), (eo = t), (Ya = null); + break; + } + e: { + var a = e, + s = n.return, + l = n, + u = t; + if ( + ((t = qa), + (l.flags |= 32768), + null !== u && + "object" === typeof u && + "function" === typeof u.then) + ) { + var c = u, + f = l, + d = f.tag; + if ( + 0 === (1 & f.mode) && + (0 === d || 11 === d || 15 === d) + ) { + var h = f.alternate; + h + ? ((f.updateQueue = h.updateQueue), + (f.memoizedState = h.memoizedState), + (f.lanes = h.lanes)) + : ((f.updateQueue = null), (f.memoizedState = null)); + } + var p = Ti(s); + if (null !== p) { + (p.flags &= -257), + Mi(p, s, l, 0, t), + 1 & p.mode && wi(a, c, t), + (u = c); + var v = (t = p).updateQueue; + if (null === v) { + var m = new Set(); + m.add(u), (t.updateQueue = m); + } else v.add(u); + break e; + } + if (0 === (1 & t)) { + wi(a, c, t), Uo(); + break e; + } + u = Error(o(426)); + } else if (Hn && 1 & l.mode) { + var g = Ti(s); + if (null !== g) { + 0 === (65536 & g.flags) && (g.flags |= 256), + Mi(g, s, l, 0, t), + er(u); + break e; + } + } + (a = u), + 4 !== $a && ($a = 2), + null === io ? (io = [a]) : io.push(a), + (u = gi(u, l)), + (l = s); + do { + switch (l.tag) { + case 3: + (l.flags |= 65536), + (t &= -t), + (l.lanes |= t), + yn(l, _i(0, u, t)); + break e; + case 1: + a = u; + var A = l.type, + y = l.stateNode; + if ( + 0 === (128 & l.flags) && + ("function" === typeof A.getDerivedStateFromError || + (null !== y && + "function" === typeof y.componentDidCatch && + (null === ho || !ho.has(y)))) + ) { + (l.flags |= 65536), + (t &= -t), + (l.lanes |= t), + yn(l, Ci(l, a, t)); + break e; + } + } + l = l.return; + } while (null !== l); + } + Zo(n); + } catch (b) { + (t = b), Ya === n && null !== n && (Ya = n = n.return); + continue; + } + break; + } + } + function Do() { + var e = Ha.current; + return (Ha.current = hi), null === e ? hi : e; + } + function Uo() { + (0 !== $a && 3 !== $a && 2 !== $a) || ($a = 4), + null === Xa || + (0 === (268435455 & to) && 0 === (268435455 & no)) || + Io(Xa, qa); + } + function Fo(e, t) { + var n = Wa; + Wa |= 2; + var r = Do(); + for ((Xa === e && qa === t) || Po(e, t); ; ) + try { + Oo(); + break; + } catch (i) { + Lo(e, i); + } + if ((on(), (Wa = n), (Ha.current = r), null !== Ya)) + throw Error(o(261)); + return (Xa = null), (qa = 0), $a; + } + function Oo() { + for (; null !== Ya; ) Go(Ya); + } + function No() { + for (; null !== Ya && !Ut(); ) Go(Ya); + } + function Go(e) { + var t = uo(e.alternate, e, Ja); + (e.memoizedProps = e.pendingProps), + null === t ? Zo(e) : (Ya = t), + (Va.current = null); + } + function Zo(e) { + var t = e; + do { + var n = t.alternate; + if (((e = t.return), 0 === (32768 & t.flags))) { + if (null !== (n = Li(n, t, Ja))) return void (Ya = n); + } else { + if (null !== (n = aa(n, t))) + return (n.flags &= 32767), void (Ya = n); + if (null === e) return ($a = 6), void (Ya = null); + (e.flags |= 32768), (e.subtreeFlags = 0), (e.deletions = null); + } + if (null !== (t = t.sibling)) return void (Ya = t); + Ya = t = e; + } while (null !== t); + 0 === $a && ($a = 5); + } + function zo(e, t) { + var n = Bt, + r = ja.transition; + try { + (ja.transition = null), + (Bt = 1), + (function (e, t, n) { + do { + Qo(); + } while (null !== vo); + if (0 !== (6 & Wa)) throw Error(o(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(o(177)); + (e.callbackNode = null), (e.callbackPriority = 0); + var a = 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), + a = 1 << i; + (t[i] = 0), (r[i] = -1), (e[i] = -1), (n &= ~a); + } + })(e, a), + e === Xa && ((Ya = Xa = null), (qa = 0)), + (0 === (2064 & r.subtreeFlags) && 0 === (2064 & r.flags)) || + po || + ((po = !0), + qo(Zt, function () { + return Qo(), null; + })), + (a = 0 !== (15990 & r.flags)), + 0 !== (15990 & r.subtreeFlags) || a) + ) { + (a = ja.transition), (ja.transition = null); + var s = Bt; + Bt = 1; + var l = Wa; + (Wa |= 4), + (Va.current = null), + (function (e, t) { + for (U(e.containerInfo), ua = t; null !== ua; ) + if ( + ((t = (e = ua).child), + 0 !== (1028 & e.subtreeFlags) && null !== t) + ) + (t.return = e), (ua = t); + else + for (; null !== ua; ) { + e = ua; + 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, + a = e.stateNode, + s = a.getSnapshotBeforeUpdate( + e.elementType === e.type + ? r + : en(e.type, r), + i + ); + a.__reactInternalSnapshotBeforeUpdate = + s; + } + break; + case 3: + X && Ce(e.stateNode.containerInfo); + break; + default: + throw Error(o(163)); + } + } catch (l) { + Vo(e, e.return, l); + } + if (null !== (t = e.sibling)) { + (t.return = e.return), (ua = t); + break; + } + ua = e.return; + } + (n = da), (da = !1); + })(e, r), + (function (e, t) { + for (ua = t; null !== ua; ) { + var n = (t = ua).deletions; + if (null !== n) + for (var r = 0; r < n.length; r++) { + var i = n[r]; + try { + var a = e; + X ? _a(a, i, t) : ga(a, i, t); + var o = i.alternate; + null !== o && (o.return = null), + (i.return = null); + } catch (x) { + Vo(i, t, x); + } + } + if ( + ((n = t.child), + 0 !== (12854 & t.subtreeFlags) && null !== n) + ) + (n.return = t), (ua = n); + else + for (; null !== ua; ) { + t = ua; + try { + var s = t.flags; + if ((32 & s && X && be(t.stateNode), 512 & s)) { + var l = t.alternate; + if (null !== l) { + var u = l.ref; + null !== u && + ("function" === typeof u + ? u(null) + : (u.current = null)); + } + } + if (8192 & s) + switch (t.tag) { + case 13: + if (null !== t.memoizedState) { + var c = t.alternate; + (null !== c && + null !== c.memoizedState) || + (oo = Ot()); + } + break; + case 22: + var f = null !== t.memoizedState, + d = t.alternate, + h = + null !== d && + null !== d.memoizedState; + if (((n = t), X)) + e: if ( + ((r = n), (i = f), (a = null), X) + ) + for (var p = r; ; ) { + if (5 === p.tag) { + if (null === a) { + a = p; + var v = p.stateNode; + i + ? xe(v) + : Ee( + p.stateNode, + p.memoizedProps + ); + } + } else if (6 === p.tag) { + if (null === a) { + var m = p.stateNode; + i + ? Se(m) + : _e(m, p.memoizedProps); + } + } else if ( + ((22 !== p.tag && 23 !== p.tag) || + null === p.memoizedState || + p === r) && + null !== p.child + ) { + (p.child.return = p), + (p = p.child); + continue; + } + if (p === r) break; + for (; null === p.sibling; ) { + if ( + null === p.return || + p.return === r + ) + break e; + a === p && (a = null), + (p = p.return); + } + a === p && (a = null), + (p.sibling.return = p.return), + (p = p.sibling); + } + if (f && !h && 0 !== (1 & n.mode)) { + ua = n; + for (var g = n.child; null !== g; ) { + for (n = ua = g; null !== ua; ) { + var A = (r = ua).child; + switch (r.tag) { + case 0: + case 11: + case 14: + case 15: + ha(4, r, r.return); + break; + case 1: + ca(r, r.return); + var y = r.stateNode; + if ( + "function" === + typeof y.componentWillUnmount + ) { + var b = r.return; + try { + (y.props = r.memoizedProps), + (y.state = + r.memoizedState), + y.componentWillUnmount(); + } catch (x) { + Vo(r, b, x); + } + } + break; + case 5: + ca(r, r.return); + break; + case 22: + if (null !== r.memoizedState) { + ka(n); + continue; + } + } + null !== A + ? ((A.return = r), (ua = A)) + : ka(n); + } + g = g.sibling; + } + } + } + switch (4102 & s) { + case 2: + xa(t), (t.flags &= -3); + break; + case 6: + xa(t), (t.flags &= -3), Ca(t.alternate, t); + break; + case 4096: + t.flags &= -4097; + break; + case 4100: + (t.flags &= -4097), Ca(t.alternate, t); + break; + case 4: + Ca(t.alternate, t); + } + } catch (x) { + Vo(t, t.return, x); + } + if (null !== (n = t.sibling)) { + (n.return = t.return), (ua = n); + break; + } + ua = t.return; + } + } + })(e, r), + F(e.containerInfo), + (e.current = r), + Ta(r, e, i), + Ft(), + (Wa = l), + (Bt = s), + (ja.transition = a); + } else e.current = r; + if ( + (po && ((po = !1), (vo = e), (mo = i)), + (a = e.pendingLanes), + 0 === a && (ho = null), + (function (e) { + if (Ht && "function" === typeof Ht.onCommitFiberRoot) + try { + Ht.onCommitFiberRoot( + Qt, + e, + void 0, + 128 === (128 & e.current.flags) + ); + } catch (t) {} + })(r.stateNode), + Co(e, Ot()), + null !== t) + ) + for (n = e.onRecoverableError, r = 0; r < t.length; r++) + n(t[r]); + if (co) throw ((co = !1), (e = fo), (fo = null), e); + 0 !== (1 & mo) && 0 !== e.tag && Qo(), + (a = e.pendingLanes), + 0 !== (1 & a) + ? e === Ao + ? go++ + : ((go = 0), (Ao = e)) + : (go = 0), + qt(); + })(e, t, n); + } finally { + (ja.transition = r), (Bt = n); + } + return null; + } + function Qo() { + if (null !== vo) { + var e = Pt(mo), + t = ja.transition, + n = Bt; + try { + if ( + ((ja.transition = null), (Bt = 16 > e ? 16 : e), null === vo) + ) + var r = !1; + else { + if (((e = vo), (vo = null), (mo = 0), 0 !== (6 & Wa))) + throw Error(o(331)); + var i = Wa; + for (Wa |= 4, ua = e.current; null !== ua; ) { + var a = ua, + s = a.child; + if (0 !== (16 & ua.flags)) { + var l = a.deletions; + if (null !== l) { + for (var u = 0; u < l.length; u++) { + var c = l[u]; + for (ua = c; null !== ua; ) { + var f = ua; + switch (f.tag) { + case 0: + case 11: + case 15: + ha(8, f, a); + } + var d = f.child; + if (null !== d) (d.return = f), (ua = d); + else + for (; null !== ua; ) { + var h = (f = ua).sibling, + p = f.return; + if ((Aa(f), f === c)) { + ua = null; + break; + } + if (null !== h) { + (h.return = p), (ua = h); + break; + } + ua = p; + } + } + } + var v = a.alternate; + if (null !== v) { + var m = v.child; + if (null !== m) { + v.child = null; + do { + var g = m.sibling; + (m.sibling = null), (m = g); + } while (null !== m); + } + } + ua = a; + } + } + if (0 !== (2064 & a.subtreeFlags) && null !== s) + (s.return = a), (ua = s); + else + e: for (; null !== ua; ) { + if (0 !== (2048 & (a = ua).flags)) + switch (a.tag) { + case 0: + case 11: + case 15: + ha(9, a, a.return); + } + var A = a.sibling; + if (null !== A) { + (A.return = a.return), (ua = A); + break e; + } + ua = a.return; + } + } + var y = e.current; + for (ua = y; null !== ua; ) { + var b = (s = ua).child; + if (0 !== (2064 & s.subtreeFlags) && null !== b) + (b.return = s), (ua = b); + else + e: for (s = y; null !== ua; ) { + if (0 !== (2048 & (l = ua).flags)) + try { + switch (l.tag) { + case 0: + case 11: + case 15: + pa(9, l); + } + } catch (S) { + Vo(l, l.return, S); + } + if (l === s) { + ua = null; + break e; + } + var x = l.sibling; + if (null !== x) { + (x.return = l.return), (ua = x); + break e; + } + ua = l.return; + } + } + if ( + ((Wa = i), + qt(), + Ht && "function" === typeof Ht.onPostCommitFiberRoot) + ) + try { + Ht.onPostCommitFiberRoot(Qt, e); + } catch (S) {} + r = !0; + } + return r; + } finally { + (Bt = n), (ja.transition = t); + } + } + return !1; + } + function Ho(e, t, n) { + gn(e, (t = _i(0, (t = gi(n, t)), 1))), + (t = xo()), + null !== (e = _o(e, 1)) && (kt(e, 1, t), Co(e, t)); + } + function Vo(e, t, n) { + if (3 === e.tag) Ho(e, e, n); + else + for (; null !== t; ) { + if (3 === t.tag) { + Ho(t, e, n); + break; + } + if (1 === t.tag) { + var r = t.stateNode; + if ( + "function" === typeof t.type.getDerivedStateFromError || + ("function" === typeof r.componentDidCatch && + (null === ho || !ho.has(r))) + ) { + gn(t, (e = Ci(t, (e = gi(n, e)), 1))), + (e = xo()), + null !== (t = _o(t, 1)) && (kt(t, 1, e), Co(t, e)); + break; + } + } + t = t.return; + } + } + function jo(e, t, n) { + var r = e.pingCache; + null !== r && r.delete(t), + (t = xo()), + (e.pingedLanes |= e.suspendedLanes & n), + Xa === e && + (qa & n) === n && + (4 === $a || + (3 === $a && (130023424 & qa) === qa && 500 > Ot() - oo) + ? Po(e, 0) + : (ro |= n)), + Co(e, t); + } + function Wo(e, t) { + 0 === t && + (0 === (1 & e.mode) + ? (t = 1) + : ((t = _t), 0 === (130023424 & (_t <<= 1)) && (_t = 4194304))); + var n = xo(); + null !== (e = _o(e, t)) && (kt(e, t, n), Co(e, n)); + } + function Xo(e) { + var t = e.memoizedState, + n = 0; + null !== t && (n = t.retryLane), Wo(e, n); + } + function Yo(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(o(314)); + } + null !== r && r.delete(t), Wo(e, n); + } + function qo(e, t) { + return Lt(e, t); + } + function Jo(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 Ko(e, t, n, r) { + return new Jo(e, t, n, r); + } + function $o(e) { + return !(!(e = e.prototype) || !e.isReactComponent); + } + function es(e, t) { + var n = e.alternate; + return ( + null === n + ? (((n = Ko(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 ts(e, t, n, r, i, a) { + var s = 2; + if (((r = e), "function" === typeof e)) $o(e) && (s = 1); + else if ("string" === typeof e) s = 5; + else + e: switch (e) { + case c: + return ns(n.children, i, a, t); + case f: + (s = 8), (i |= 8); + break; + case d: + return ( + ((e = Ko(12, n, t, 2 | i)).elementType = d), + (e.lanes = a), + e + ); + case m: + return ( + ((e = Ko(13, n, t, i)).elementType = m), (e.lanes = a), e + ); + case g: + return ( + ((e = Ko(19, n, t, i)).elementType = g), (e.lanes = a), e + ); + case b: + return rs(n, i, a, t); + default: + if ("object" === typeof e && null !== e) + switch (e.$$typeof) { + case h: + s = 10; + break e; + case p: + s = 9; + break e; + case v: + s = 11; + break e; + case A: + s = 14; + break e; + case y: + (s = 16), (r = null); + break e; + } + throw Error(o(130, null == e ? e : typeof e, "")); + } + return ( + ((t = Ko(s, n, t, i)).elementType = e), + (t.type = r), + (t.lanes = a), + t + ); + } + function ns(e, t, n, r) { + return ((e = Ko(7, e, r, t)).lanes = n), e; + } + function rs(e, t, n, r) { + return ( + ((e = Ko(22, e, r, t)).elementType = b), + (e.lanes = n), + (e.stateNode = {}), + e + ); + } + function is(e, t, n) { + return ((e = Ko(6, e, null, t)).lanes = n), e; + } + function as(e, t, n) { + return ( + ((t = Ko( + 4, + null !== e.children ? e.children : [], + e.key, + t + )).lanes = n), + (t.stateNode = { + containerInfo: e.containerInfo, + pendingChildren: null, + implementation: e.implementation, + }), + t + ); + } + function os(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 = It(0)), + (this.expirationTimes = It(-1)), + (this.entangledLanes = + this.finishedLanes = + this.mutableReadLanes = + this.expiredLanes = + this.pingedLanes = + this.suspendedLanes = + this.pendingLanes = + 0), + (this.entanglements = It(0)), + (this.identifierPrefix = r), + (this.onRecoverableError = i), + q && (this.mutableSourceEagerHydrationData = null); + } + function ss(e, t, n, r, i, a, o, s, l) { + return ( + (e = new os(e, t, n, s, l)), + 1 === t ? ((t = 1), !0 === a && (t |= 8)) : (t = 0), + (a = Ko(3, null, null, t)), + (e.current = a), + (a.stateNode = e), + (a.memoizedState = { + element: r, + isDehydrated: n, + cache: null, + transitions: null, + }), + pn(a), + e + ); + } + function ls(e) { + if (!e) return ut; + e: { + if (C((e = e._reactInternals)) !== e || 1 !== e.tag) + throw Error(o(170)); + var t = e; + do { + switch (t.tag) { + case 3: + t = t.stateNode.context; + break e; + case 1: + if (pt(t.type)) { + t = t.stateNode.__reactInternalMemoizedMergedChildContext; + break e; + } + } + t = t.return; + } while (null !== t); + throw Error(o(171)); + } + if (1 === e.tag) { + var n = e.type; + if (pt(n)) return gt(e, n, t); + } + return t; + } + function us(e) { + var t = e._reactInternals; + if (void 0 === t) { + if ("function" === typeof e.render) throw Error(o(188)); + throw ((e = Object.keys(e).join(",")), Error(o(268, e))); + } + return null === (e = M(t)) ? null : e.stateNode; + } + function cs(e, t) { + if (null !== (e = e.memoizedState) && null !== e.dehydrated) { + var n = e.retryLane; + e.retryLane = 0 !== n && n < t ? n : t; + } + } + function fs(e, t) { + cs(e, t), (e = e.alternate) && cs(e, t); + } + function ds(e) { + return null === (e = M(e)) ? null : e.stateNode; + } + function hs() { + return null; + } + return ( + (uo = function (e, t, n) { + if (null !== e) + if (e.memoizedProps !== t.pendingProps || ft.current) Ui = !0; + else { + if (0 === (e.lanes & n) && 0 === (128 & t.flags)) + return ( + (Ui = !1), + (function (e, t, n) { + switch (t.tag) { + case 3: + ji(t), $n(); + break; + case 5: + pr(t); + break; + case 1: + pt(t.type) && At(t); + break; + case 4: + dr(t, t.stateNode.containerInfo); + break; + case 10: + sn(0, t.type._context, t.memoizedProps.value); + break; + case 13: + var r = t.memoizedState; + if (null !== r) + return null !== r.dehydrated + ? (lt(mr, 1 & mr.current), + (t.flags |= 128), + null) + : 0 !== (n & t.child.childLanes) + ? qi(e, t, n) + : (lt(mr, 1 & mr.current), + null !== (e = ia(e, t, n)) + ? e.sibling + : null); + lt(mr, 1 & mr.current); + break; + case 19: + if ( + ((r = 0 !== (n & t.childLanes)), + 0 !== (128 & e.flags)) + ) { + if (r) return ra(e, t, n); + t.flags |= 128; + } + var i = t.memoizedState; + if ( + (null !== i && + ((i.rendering = null), + (i.tail = null), + (i.lastEffect = null)), + lt(mr, mr.current), + r) + ) + break; + return null; + case 22: + case 23: + return (t.lanes = 0), Zi(e, t, n); + } + return ia(e, t, n); + })(e, t, n) + ); + Ui = 0 !== (131072 & e.flags); + } + else + (Ui = !1), + Hn && 0 !== (1048576 & t.flags) && Nn(t, Bn, 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 = ht(t, ct.current); + cn(t, n), (i = Br(null, t, r, e, i, n)); + var a = Pr(); + 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), + pt(r) ? ((a = !0), At(t)) : (a = !1), + (t.memoizedState = + null !== i.state && void 0 !== i.state + ? i.state + : null), + pn(t), + (i.updater = _n), + (t.stateNode = i), + (i._reactInternals = t), + Mn(t, r, e, n), + (t = Vi(null, t, r, !0, a, n))) + : ((t.tag = 0), + Hn && a && Gn(t), + Fi(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 $o(e) ? 1 : 0; + if (void 0 !== e && null !== e) { + if ((e = e.$$typeof) === v) return 11; + if (e === A) return 14; + } + return 2; + })(r)), + (e = en(r, e)), + i) + ) { + case 0: + t = Qi(null, t, r, e, n); + break e; + case 1: + t = Hi(null, t, r, e, n); + break e; + case 11: + t = Oi(null, t, r, e, n); + break e; + case 14: + t = Ni(null, t, r, en(r.type, e), n); + break e; + } + throw Error(o(306, r, "")); + } + return t; + case 0: + return ( + (r = t.type), + (i = t.pendingProps), + Qi(e, t, r, (i = t.elementType === r ? i : en(r, i)), n) + ); + case 1: + return ( + (r = t.type), + (i = t.pendingProps), + Hi(e, t, r, (i = t.elementType === r ? i : en(r, i)), n) + ); + case 3: + e: { + if ((ji(t), null === e)) throw Error(o(387)); + (r = t.pendingProps), + (i = (a = t.memoizedState).element), + vn(e, t), + bn(t, r, null, n); + var s = t.memoizedState; + if (((r = s.element), q && a.isDehydrated)) { + if ( + ((a = { + element: r, + isDehydrated: !1, + cache: s.cache, + transitions: s.transitions, + }), + (t.updateQueue.baseState = a), + (t.memoizedState = a), + 256 & t.flags) + ) { + t = Wi(e, t, r, n, (i = Error(o(423)))); + break e; + } + if (r !== i) { + t = Wi(e, t, r, n, (i = Error(o(424)))); + break e; + } + for ( + q && + ((Qn = Ze(t.stateNode.containerInfo)), + (zn = t), + (Hn = !0), + (jn = null), + (Vn = !1)), + n = or(t, null, r, n), + t.child = n; + n; + + ) + (n.flags = (-3 & n.flags) | 4096), (n = n.sibling); + } else { + if (($n(), r === i)) { + t = ia(e, t, n); + break e; + } + Fi(e, t, r, n); + } + t = t.child; + } + return t; + case 5: + return ( + pr(t), + null === e && qn(t), + (r = t.type), + (i = t.pendingProps), + (a = null !== e ? e.memoizedProps : null), + (s = i.children), + z(r, i) + ? (s = null) + : null !== a && z(r, a) && (t.flags |= 32), + zi(e, t), + Fi(e, t, s, n), + t.child + ); + case 6: + return null === e && qn(t), null; + case 13: + return qi(e, t, n); + case 4: + return ( + dr(t, t.stateNode.containerInfo), + (r = t.pendingProps), + null === e ? (t.child = ar(t, null, r, n)) : Fi(e, t, r, n), + t.child + ); + case 11: + return ( + (r = t.type), + (i = t.pendingProps), + Oi(e, t, r, (i = t.elementType === r ? i : en(r, i)), n) + ); + case 7: + return Fi(e, t, t.pendingProps, n), t.child; + case 8: + case 12: + return Fi(e, t, t.pendingProps.children, n), t.child; + case 10: + e: { + if ( + ((r = t.type._context), + (i = t.pendingProps), + (a = t.memoizedProps), + sn(0, r, (s = i.value)), + null !== a) + ) + if (Vt(a.value, s)) { + if (a.children === i.children && !ft.current) { + t = ia(e, t, n); + break e; + } + } else + for ( + null !== (a = t.child) && (a.return = t); + null !== a; + + ) { + var l = a.dependencies; + if (null !== l) { + s = a.child; + for (var u = l.firstContext; null !== u; ) { + if (u.context === r) { + if (1 === a.tag) { + (u = mn(-1, n & -n)).tag = 2; + var c = a.updateQueue; + if (null !== c) { + var f = (c = c.shared).pending; + null === f + ? (u.next = u) + : ((u.next = f.next), (f.next = u)), + (c.pending = u); + } + } + (a.lanes |= n), + null !== (u = a.alternate) && (u.lanes |= n), + un(a.return, n, t), + (l.lanes |= n); + break; + } + u = u.next; + } + } else if (10 === a.tag) + s = a.type === t.type ? null : a.child; + else if (18 === a.tag) { + if (null === (s = a.return)) throw Error(o(341)); + (s.lanes |= n), + null !== (l = s.alternate) && (l.lanes |= n), + un(s, n, t), + (s = a.sibling); + } else s = a.child; + if (null !== s) s.return = a; + else + for (s = a; null !== s; ) { + if (s === t) { + s = null; + break; + } + if (null !== (a = s.sibling)) { + (a.return = s.return), (s = a); + break; + } + s = s.return; + } + a = s; + } + Fi(e, t, i.children, n), (t = t.child); + } + return t; + case 9: + return ( + (i = t.type), + (r = t.pendingProps.children), + cn(t, n), + (r = r((i = fn(i)))), + (t.flags |= 1), + Fi(e, t, r, n), + t.child + ); + case 14: + return ( + (i = en((r = t.type), t.pendingProps)), + Ni(e, t, r, (i = en(r.type, i)), n) + ); + case 15: + return Gi(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), + pt(r) ? ((e = !0), At(t)) : (e = !1), + cn(t, n), + wn(t, r, i), + Mn(t, r, i, n), + Vi(null, t, r, !0, e, n) + ); + case 19: + return ra(e, t, n); + case 22: + return Zi(e, t, n); + } + throw Error(o(156, t.tag)); + }), + (t.attemptContinuousHydration = function (e) { + 13 === e.tag && (Eo(e, 134217728, xo()), fs(e, 134217728)); + }), + (t.attemptHydrationAtCurrentPriority = function (e) { + if (13 === e.tag) { + var t = xo(), + n = So(e); + Eo(e, n, t), fs(e, n); + } + }), + (t.attemptSynchronousHydration = function (e) { + switch (e.tag) { + case 3: + var t = e.stateNode; + if (t.current.memoizedState.isDehydrated) { + var n = Ct(t.pendingLanes); + 0 !== n && + (Rt(t, 1 | n), + Co(t, Ot()), + 0 === (6 & Wa) && (lo(), qt())); + } + break; + case 13: + var r = xo(); + Ro(function () { + return Eo(e, 1, r); + }), + fs(e, 1); + } + }), + (t.batchedUpdates = function (e, t) { + var n = Wa; + Wa |= 1; + try { + return e(t); + } finally { + 0 === (Wa = n) && (lo(), Wt && qt()); + } + }), + (t.createComponentSelector = function (e) { + return { $$typeof: Ba, value: e }; + }), + (t.createContainer = function (e, t, n, r, i, a, o) { + return ss(e, t, !1, null, 0, r, 0, a, o); + }), + (t.createHasPseudoClassSelector = function (e) { + return { $$typeof: Pa, value: e }; + }), + (t.createHydrationContainer = function (e, t, n, r, i, a, o, s, l) { + return ( + ((e = ss(n, r, !0, e, 0, a, 0, s, l)).context = ls(null)), + (n = e.current), + ((a = mn((r = xo()), (i = So(n)))).callback = + void 0 !== t && null !== t ? t : null), + gn(n, a), + (e.current.lanes = i), + kt(e, i, r), + Co(e, r), + e + ); + }), + (t.createPortal = function (e, t, n) { + var r = + 3 < arguments.length && void 0 !== arguments[3] + ? arguments[3] + : null; + return { + $$typeof: u, + key: null == r ? null : "" + r, + children: e, + containerInfo: t, + implementation: n, + }; + }), + (t.createRoleSelector = function (e) { + return { $$typeof: La, value: e }; + }), + (t.createTestNameSelector = function (e) { + return { $$typeof: Da, value: e }; + }), + (t.createTextSelector = function (e) { + return { $$typeof: Ua, value: e }; + }), + (t.deferredUpdates = function (e) { + var t = Bt, + n = ja.transition; + try { + return (ja.transition = null), (Bt = 16), e(); + } finally { + (Bt = t), (ja.transition = n); + } + }), + (t.discreteUpdates = function (e, t, n, r, i) { + var a = Bt, + o = ja.transition; + try { + return (ja.transition = null), (Bt = 1), e(t, n, r, i); + } finally { + (Bt = a), (ja.transition = o), 0 === Wa && lo(); + } + }), + (t.findAllNodes = za), + (t.findBoundingRects = function (e, t) { + if (!re) throw Error(o(363)); + (t = za(e, t)), (e = []); + for (var n = 0; n < t.length; n++) e.push(ae(t[n])); + for (t = e.length - 1; 0 < t; t--) + for ( + var r = (n = e[t]).x, + i = r + n.width, + a = n.y, + s = a + n.height, + l = t - 1; + 0 <= l; + l-- + ) + if (t !== l) { + var u = e[l], + c = u.x, + f = c + u.width, + d = u.y, + h = d + u.height; + if (r >= c && a >= d && i <= f && s <= h) { + e.splice(t, 1); + break; + } + if (!(r !== c || n.width !== u.width || h < a || d > s)) { + d > a && ((u.height += d - a), (u.y = a)), + h < s && (u.height = s - d), + e.splice(t, 1); + break; + } + if (!(a !== d || n.height !== u.height || f < r || c > i)) { + c > r && ((u.width += c - r), (u.x = r)), + f < i && (u.width = i - c), + e.splice(t, 1); + break; + } + } + return e; + }), + (t.findHostInstance = us), + (t.findHostInstanceWithNoPortals = function (e) { + return null === (e = null !== (e = T(e)) ? k(e) : null) + ? null + : e.stateNode; + }), + (t.findHostInstanceWithWarning = function (e) { + return us(e); + }), + (t.flushControlled = function (e) { + var t = Wa; + Wa |= 1; + var n = ja.transition, + r = Bt; + try { + (ja.transition = null), (Bt = 1), e(); + } finally { + (Bt = r), (ja.transition = n), 0 === (Wa = t) && (lo(), qt()); + } + }), + (t.flushPassiveEffects = Qo), + (t.flushSync = Ro), + (t.focusWithin = function (e, t) { + if (!re) throw Error(o(363)); + for ( + t = Za((e = Oa(e)), t), t = Array.from(t), e = 0; + e < t.length; + + ) { + var n = t[e++]; + if (!se(n)) { + if (5 === n.tag && ue(n.stateNode)) return !0; + for (n = n.child; null !== n; ) t.push(n), (n = n.sibling); + } + } + return !1; + }), + (t.getCurrentUpdatePriority = function () { + return Bt; + }), + (t.getFindAllNodesFailureDescription = function (e, t) { + if (!re) throw Error(o(363)); + var n = 0, + r = []; + e = [Oa(e), 0]; + for (var i = 0; i < e.length; ) { + var a = e[i++], + s = e[i++], + l = t[s]; + if ( + (5 !== a.tag || !se(a)) && + (Na(a, l) && (r.push(Ga(l)), ++s > n && (n = s)), + s < t.length) + ) + for (a = a.child; null !== a; ) e.push(a, s), (a = a.sibling); + } + if (n < t.length) { + for (e = []; n < t.length; n++) e.push(Ga(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 + ? P(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: s.ReactCurrentDispatcher, + findHostInstanceByFiber: ds, + findFiberByHostInstance: e.findFiberByHostInstance || hs, + 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 { + (Qt = t.inject(e)), (Ht = t); + } catch (n) {} + e = !!t.checkDCE; + } + } + return e; + }), + (t.isAlreadyRendering = function () { + return !1; + }), + (t.observeVisibleRects = function (e, t, n, r) { + if (!re) throw Error(o(363)); + e = za(e, t); + var i = ce(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 = Bt; + try { + return (Bt = e), t(); + } finally { + Bt = n; + } + }), + (t.shouldError = function () { + return null; + }), + (t.shouldSuspend = function () { + return !1; + }), + (t.updateContainer = function (e, t, n, r) { + var i = t.current, + a = xo(), + o = So(i); + return ( + (n = ls(n)), + null === t.context ? (t.context = n) : (t.pendingContext = n), + ((t = mn(a, o)).payload = { element: e }), + null !== (r = void 0 === r ? null : r) && (t.callback = r), + gn(i, t), + null !== (e = Eo(i, o, a)) && An(e, i, o), + o + ); + }), + t + ); + }; + }, + 4585: function (e, t, n) { + "use strict"; + e.exports = n(4976); + }, + 258: function (e, t, n) { + "use strict"; + e.exports = n(3721); + }, + 8436: function (e, t, n) { + "use strict"; + function r(e) { + return ( + (r = + "function" == typeof Symbol && "symbol" == typeof Symbol.iterator + ? function (e) { + return typeof e; + } + : function (e) { + return e && + "function" == typeof Symbol && + e.constructor === Symbol && + e !== Symbol.prototype + ? "symbol" + : typeof e; + }), + r(e) + ); + } + Object.defineProperty(t, "__esModule", { value: !0 }), + (t.PrevArrow = t.NextArrow = void 0); + var i = s(n(2791)), + a = s(n(1694)), + o = n(8026); + function s(e) { + return e && e.__esModule ? e : { default: e }; + } + function l() { + return ( + (l = + Object.assign || + 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 u(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 c(e) { + for (var t = 1; t < arguments.length; t++) { + var n = null != arguments[t] ? arguments[t] : {}; + t % 2 + ? u(Object(n), !0).forEach(function (t) { + f(e, t, n[t]); + }) + : Object.getOwnPropertyDescriptors + ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) + : u(Object(n)).forEach(function (t) { + Object.defineProperty( + e, + t, + Object.getOwnPropertyDescriptor(n, t) + ); + }); + } + return e; + } + function f(e, t, n) { + return ( + t in e + ? Object.defineProperty(e, t, { + value: n, + enumerable: !0, + configurable: !0, + writable: !0, + }) + : (e[t] = n), + e + ); + } + function d(e, t) { + if (!(e instanceof t)) + throw new TypeError("Cannot call a class as a function"); + } + function h(e, t) { + for (var n = 0; n < t.length; n++) { + var r = t[n]; + (r.enumerable = r.enumerable || !1), + (r.configurable = !0), + "value" in r && (r.writable = !0), + Object.defineProperty(e, r.key, r); + } + } + function p(e, t, n) { + return ( + t && h(e.prototype, t), + n && h(e, n), + Object.defineProperty(e, "prototype", { writable: !1 }), + e + ); + } + function v(e, t) { + if ("function" !== typeof t && null !== t) + throw new TypeError( + "Super expression must either be null or a function" + ); + (e.prototype = Object.create(t && t.prototype, { + constructor: { value: e, writable: !0, configurable: !0 }, + })), + Object.defineProperty(e, "prototype", { writable: !1 }), + t && m(e, t); + } + function m(e, t) { + return ( + (m = + Object.setPrototypeOf || + function (e, t) { + return (e.__proto__ = t), e; + }), + m(e, t) + ); + } + function g(e) { + var t = (function () { + if ("undefined" === typeof Reflect || !Reflect.construct) return !1; + if (Reflect.construct.sham) return !1; + if ("function" === typeof Proxy) return !0; + try { + return ( + Boolean.prototype.valueOf.call( + Reflect.construct(Boolean, [], function () {}) + ), + !0 + ); + } catch (e) { + return !1; + } + })(); + return function () { + var n, + i = A(e); + if (t) { + var a = A(this).constructor; + n = Reflect.construct(i, arguments, a); + } else n = i.apply(this, arguments); + return (function (e, t) { + if (t && ("object" === r(t) || "function" === typeof t)) return t; + if (void 0 !== t) + throw new TypeError( + "Derived constructors may only return object or undefined" + ); + return (function (e) { + if (void 0 === e) + throw new ReferenceError( + "this hasn't been initialised - super() hasn't been called" + ); + return e; + })(e); + })(this, n); + }; + } + function A(e) { + return ( + (A = Object.setPrototypeOf + ? Object.getPrototypeOf + : function (e) { + return e.__proto__ || Object.getPrototypeOf(e); + }), + A(e) + ); + } + var y = (function (e) { + v(n, e); + var t = g(n); + function n() { + return d(this, n), t.apply(this, arguments); + } + return ( + p(n, [ + { + key: "clickHandler", + value: function (e, t) { + t && t.preventDefault(), this.props.clickHandler(e, t); + }, + }, + { + key: "render", + value: function () { + var e = { "slick-arrow": !0, "slick-prev": !0 }, + t = this.clickHandler.bind(this, { message: "previous" }); + !this.props.infinite && + (0 === this.props.currentSlide || + this.props.slideCount <= this.props.slidesToShow) && + ((e["slick-disabled"] = !0), (t = null)); + var n = { + key: "0", + "data-role": "none", + className: (0, a.default)(e), + style: { display: "block" }, + onClick: t, + }, + r = { + currentSlide: this.props.currentSlide, + slideCount: this.props.slideCount, + }; + return this.props.prevArrow + ? i.default.cloneElement( + this.props.prevArrow, + c(c({}, n), r) + ) + : i.default.createElement( + "button", + l({ key: "0", type: "button" }, n), + " ", + "Previous" + ); + }, + }, + ]), + n + ); + })(i.default.PureComponent); + t.PrevArrow = y; + var b = (function (e) { + v(n, e); + var t = g(n); + function n() { + return d(this, n), t.apply(this, arguments); + } + return ( + p(n, [ + { + key: "clickHandler", + value: function (e, t) { + t && t.preventDefault(), this.props.clickHandler(e, t); + }, + }, + { + key: "render", + value: function () { + var e = { "slick-arrow": !0, "slick-next": !0 }, + t = this.clickHandler.bind(this, { message: "next" }); + (0, o.canGoNext)(this.props) || + ((e["slick-disabled"] = !0), (t = null)); + var n = { + key: "1", + "data-role": "none", + className: (0, a.default)(e), + style: { display: "block" }, + onClick: t, + }, + r = { + currentSlide: this.props.currentSlide, + slideCount: this.props.slideCount, + }; + return this.props.nextArrow + ? i.default.cloneElement( + this.props.nextArrow, + c(c({}, n), r) + ) + : i.default.createElement( + "button", + l({ key: "1", type: "button" }, n), + " ", + "Next" + ); + }, + }, + ]), + n + ); + })(i.default.PureComponent); + t.NextArrow = b; + }, + 5484: function (e, t, n) { + "use strict"; + Object.defineProperty(t, "__esModule", { value: !0 }), + (t.default = void 0); + var r, + i = (r = n(2791)) && r.__esModule ? r : { default: r }; + var a = { + accessibility: !0, + adaptiveHeight: !1, + afterChange: null, + appendDots: function (e) { + return i.default.createElement( + "ul", + { style: { display: "block" } }, + e + ); + }, + arrows: !0, + autoplay: !1, + autoplaySpeed: 3e3, + beforeChange: null, + centerMode: !1, + centerPadding: "50px", + className: "", + cssEase: "ease", + customPaging: function (e) { + return i.default.createElement("button", null, e + 1); + }, + dots: !1, + dotsClass: "slick-dots", + draggable: !0, + easing: "linear", + edgeFriction: 0.35, + fade: !1, + focusOnSelect: !1, + infinite: !0, + initialSlide: 0, + lazyLoad: null, + nextArrow: null, + onEdge: null, + onInit: null, + onLazyLoadError: null, + onReInit: null, + pauseOnDotsHover: !1, + pauseOnFocus: !1, + pauseOnHover: !0, + prevArrow: null, + responsive: null, + rows: 1, + rtl: !1, + slide: "div", + slidesPerRow: 1, + slidesToScroll: 1, + slidesToShow: 1, + speed: 500, + swipe: !0, + swipeEvent: null, + swipeToSlide: !1, + touchMove: !0, + touchThreshold: 5, + useCSS: !0, + useTransform: !0, + variableWidth: !1, + vertical: !1, + waitForAnimate: !0, + }; + t.default = a; + }, + 3800: function (e, t, n) { + "use strict"; + function r(e) { + return ( + (r = + "function" == typeof Symbol && "symbol" == typeof Symbol.iterator + ? function (e) { + return typeof e; + } + : function (e) { + return e && + "function" == typeof Symbol && + e.constructor === Symbol && + e !== Symbol.prototype + ? "symbol" + : typeof e; + }), + r(e) + ); + } + Object.defineProperty(t, "__esModule", { value: !0 }), + (t.Dots = void 0); + var i = s(n(2791)), + a = s(n(1694)), + o = n(8026); + function s(e) { + return e && e.__esModule ? e : { default: e }; + } + function l(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 u(e, t, n) { + return ( + t in e + ? Object.defineProperty(e, t, { + value: n, + enumerable: !0, + configurable: !0, + writable: !0, + }) + : (e[t] = n), + e + ); + } + function c(e, t) { + for (var n = 0; n < t.length; n++) { + var r = t[n]; + (r.enumerable = r.enumerable || !1), + (r.configurable = !0), + "value" in r && (r.writable = !0), + Object.defineProperty(e, r.key, r); + } + } + function f(e, t) { + return ( + (f = + Object.setPrototypeOf || + function (e, t) { + return (e.__proto__ = t), e; + }), + f(e, t) + ); + } + function d(e) { + var t = (function () { + if ("undefined" === typeof Reflect || !Reflect.construct) return !1; + if (Reflect.construct.sham) return !1; + if ("function" === typeof Proxy) return !0; + try { + return ( + Boolean.prototype.valueOf.call( + Reflect.construct(Boolean, [], function () {}) + ), + !0 + ); + } catch (e) { + return !1; + } + })(); + return function () { + var n, + i = h(e); + if (t) { + var a = h(this).constructor; + n = Reflect.construct(i, arguments, a); + } else n = i.apply(this, arguments); + return (function (e, t) { + if (t && ("object" === r(t) || "function" === typeof t)) return t; + if (void 0 !== t) + throw new TypeError( + "Derived constructors may only return object or undefined" + ); + return (function (e) { + if (void 0 === e) + throw new ReferenceError( + "this hasn't been initialised - super() hasn't been called" + ); + return e; + })(e); + })(this, n); + }; + } + function h(e) { + return ( + (h = Object.setPrototypeOf + ? Object.getPrototypeOf + : function (e) { + return e.__proto__ || Object.getPrototypeOf(e); + }), + h(e) + ); + } + var p = (function (e) { + !(function (e, t) { + if ("function" !== typeof t && null !== t) + throw new TypeError( + "Super expression must either be null or a function" + ); + (e.prototype = Object.create(t && t.prototype, { + constructor: { value: e, writable: !0, configurable: !0 }, + })), + Object.defineProperty(e, "prototype", { writable: !1 }), + t && f(e, t); + })(h, e); + var t, + n, + r, + s = d(h); + function h() { + return ( + (function (e, t) { + if (!(e instanceof t)) + throw new TypeError("Cannot call a class as a function"); + })(this, h), + s.apply(this, arguments) + ); + } + return ( + (t = h), + (n = [ + { + key: "clickHandler", + value: function (e, t) { + t.preventDefault(), this.props.clickHandler(e); + }, + }, + { + key: "render", + value: function () { + for ( + var e, + t = this.props, + n = t.onMouseEnter, + r = t.onMouseOver, + s = t.onMouseLeave, + c = t.infinite, + f = t.slidesToScroll, + d = t.slidesToShow, + h = t.slideCount, + p = t.currentSlide, + v = (e = { + slideCount: h, + slidesToScroll: f, + slidesToShow: d, + infinite: c, + }).infinite + ? Math.ceil(e.slideCount / e.slidesToScroll) + : Math.ceil( + (e.slideCount - e.slidesToShow) / e.slidesToScroll + ) + 1, + m = { onMouseEnter: n, onMouseOver: r, onMouseLeave: s }, + g = [], + A = 0; + A < v; + A++ + ) { + var y = (A + 1) * f - 1, + b = c ? y : (0, o.clamp)(y, 0, h - 1), + x = b - (f - 1), + S = c ? x : (0, o.clamp)(x, 0, h - 1), + E = (0, a.default)({ + "slick-active": c ? p >= S && p <= b : p === S, + }), + _ = { + message: "dots", + index: A, + slidesToScroll: f, + currentSlide: p, + }, + C = this.clickHandler.bind(this, _); + g = g.concat( + i.default.createElement( + "li", + { key: A, className: E }, + i.default.cloneElement(this.props.customPaging(A), { + onClick: C, + }) + ) + ); + } + return i.default.cloneElement( + this.props.appendDots(g), + (function (e) { + for (var t = 1; t < arguments.length; t++) { + var n = null != arguments[t] ? arguments[t] : {}; + t % 2 + ? l(Object(n), !0).forEach(function (t) { + u(e, t, n[t]); + }) + : Object.getOwnPropertyDescriptors + ? Object.defineProperties( + e, + Object.getOwnPropertyDescriptors(n) + ) + : l(Object(n)).forEach(function (t) { + Object.defineProperty( + e, + t, + Object.getOwnPropertyDescriptor(n, t) + ); + }); + } + return e; + })({ className: this.props.dotsClass }, m) + ); + }, + }, + ]), + n && c(t.prototype, n), + r && c(t, r), + Object.defineProperty(t, "prototype", { writable: !1 }), + h + ); + })(i.default.PureComponent); + t.Dots = p; + }, + 5717: function (e, t, n) { + "use strict"; + var r; + t.Z = void 0; + var i = ((r = n(3178)) && r.__esModule ? r : { default: r }).default; + t.Z = i; + }, + 1382: function (e, t) { + "use strict"; + Object.defineProperty(t, "__esModule", { value: !0 }), + (t.default = void 0); + var n = { + animating: !1, + autoplaying: null, + currentDirection: 0, + currentLeft: null, + currentSlide: 0, + direction: 1, + dragging: !1, + edgeDragged: !1, + initialized: !1, + lazyLoadedList: [], + listHeight: null, + listWidth: null, + scrolling: !1, + slideCount: null, + slideHeight: null, + slideWidth: null, + swipeLeft: null, + swiped: !1, + swiping: !1, + touchObject: { startX: 0, startY: 0, curX: 0, curY: 0 }, + trackStyle: {}, + trackWidth: 0, + targetSlide: 0, + }; + t.default = n; + }, + 8293: function (e, t, n) { + "use strict"; + Object.defineProperty(t, "__esModule", { value: !0 }), + (t.InnerSlider = void 0); + var r = d(n(2791)), + i = d(n(1382)), + a = d(n(5095)), + o = d(n(1694)), + s = n(8026), + l = n(4931), + u = n(3800), + c = n(8436), + f = d(n(474)); + function d(e) { + return e && e.__esModule ? e : { default: e }; + } + function h(e) { + return ( + (h = + "function" == typeof Symbol && "symbol" == typeof Symbol.iterator + ? function (e) { + return typeof e; + } + : function (e) { + return e && + "function" == typeof Symbol && + e.constructor === Symbol && + e !== Symbol.prototype + ? "symbol" + : typeof e; + }), + h(e) + ); + } + function p() { + return ( + (p = + Object.assign || + 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; + }), + p.apply(this, arguments) + ); + } + function v(e, t) { + if (null == e) return {}; + var n, + r, + i = (function (e, t) { + if (null == e) return {}; + var n, + r, + i = {}, + a = Object.keys(e); + for (r = 0; r < a.length; r++) + (n = a[r]), t.indexOf(n) >= 0 || (i[n] = e[n]); + return i; + })(e, t); + if (Object.getOwnPropertySymbols) { + var a = Object.getOwnPropertySymbols(e); + for (r = 0; r < a.length; r++) + (n = a[r]), + t.indexOf(n) >= 0 || + (Object.prototype.propertyIsEnumerable.call(e, n) && + (i[n] = e[n])); + } + return i; + } + function m(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 g(e) { + for (var t = 1; t < arguments.length; t++) { + var n = null != arguments[t] ? arguments[t] : {}; + t % 2 + ? m(Object(n), !0).forEach(function (t) { + E(e, t, n[t]); + }) + : Object.getOwnPropertyDescriptors + ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) + : m(Object(n)).forEach(function (t) { + Object.defineProperty( + e, + t, + Object.getOwnPropertyDescriptor(n, t) + ); + }); + } + return e; + } + function A(e, t) { + for (var n = 0; n < t.length; n++) { + var r = t[n]; + (r.enumerable = r.enumerable || !1), + (r.configurable = !0), + "value" in r && (r.writable = !0), + Object.defineProperty(e, r.key, r); + } + } + function y(e, t) { + return ( + (y = + Object.setPrototypeOf || + function (e, t) { + return (e.__proto__ = t), e; + }), + y(e, t) + ); + } + function b(e) { + var t = (function () { + if ("undefined" === typeof Reflect || !Reflect.construct) return !1; + if (Reflect.construct.sham) return !1; + if ("function" === typeof Proxy) return !0; + try { + return ( + Boolean.prototype.valueOf.call( + Reflect.construct(Boolean, [], function () {}) + ), + !0 + ); + } catch (e) { + return !1; + } + })(); + return function () { + var n, + r = S(e); + if (t) { + var i = S(this).constructor; + n = Reflect.construct(r, arguments, i); + } else n = r.apply(this, arguments); + return (function (e, t) { + if (t && ("object" === h(t) || "function" === typeof t)) return t; + if (void 0 !== t) + throw new TypeError( + "Derived constructors may only return object or undefined" + ); + return x(e); + })(this, n); + }; + } + function x(e) { + if (void 0 === e) + throw new ReferenceError( + "this hasn't been initialised - super() hasn't been called" + ); + return e; + } + function S(e) { + return ( + (S = Object.setPrototypeOf + ? Object.getPrototypeOf + : function (e) { + return e.__proto__ || Object.getPrototypeOf(e); + }), + S(e) + ); + } + function E(e, t, n) { + return ( + t in e + ? Object.defineProperty(e, t, { + value: n, + enumerable: !0, + configurable: !0, + writable: !0, + }) + : (e[t] = n), + e + ); + } + var _ = (function (e) { + !(function (e, t) { + if ("function" !== typeof t && null !== t) + throw new TypeError( + "Super expression must either be null or a function" + ); + (e.prototype = Object.create(t && t.prototype, { + constructor: { value: e, writable: !0, configurable: !0 }, + })), + Object.defineProperty(e, "prototype", { writable: !1 }), + t && y(e, t); + })(S, e); + var t, + n, + d, + m = b(S); + function S(e) { + var t; + !(function (e, t) { + if (!(e instanceof t)) + throw new TypeError("Cannot call a class as a function"); + })(this, S), + E(x((t = m.call(this, e))), "listRefHandler", function (e) { + return (t.list = e); + }), + E(x(t), "trackRefHandler", function (e) { + return (t.track = e); + }), + E(x(t), "adaptHeight", function () { + if (t.props.adaptiveHeight && t.list) { + var e = t.list.querySelector( + '[data-index="'.concat(t.state.currentSlide, '"]') + ); + t.list.style.height = (0, s.getHeight)(e) + "px"; + } + }), + E(x(t), "componentDidMount", function () { + if ((t.props.onInit && t.props.onInit(), t.props.lazyLoad)) { + var e = (0, s.getOnDemandLazySlides)( + g(g({}, t.props), t.state) + ); + e.length > 0 && + (t.setState(function (t) { + return { lazyLoadedList: t.lazyLoadedList.concat(e) }; + }), + t.props.onLazyLoad && t.props.onLazyLoad(e)); + } + var n = g({ listRef: t.list, trackRef: t.track }, t.props); + t.updateState(n, !0, function () { + t.adaptHeight(), t.props.autoplay && t.autoPlay("update"); + }), + "progressive" === t.props.lazyLoad && + (t.lazyLoadTimer = setInterval(t.progressiveLazyLoad, 1e3)), + (t.ro = new f.default(function () { + t.state.animating + ? (t.onWindowResized(!1), + t.callbackTimers.push( + setTimeout(function () { + return t.onWindowResized(); + }, t.props.speed) + )) + : t.onWindowResized(); + })), + t.ro.observe(t.list), + document.querySelectorAll && + Array.prototype.forEach.call( + document.querySelectorAll(".slick-slide"), + function (e) { + (e.onfocus = t.props.pauseOnFocus + ? t.onSlideFocus + : null), + (e.onblur = t.props.pauseOnFocus + ? t.onSlideBlur + : null); + } + ), + window.addEventListener + ? window.addEventListener("resize", t.onWindowResized) + : window.attachEvent("onresize", t.onWindowResized); + }), + E(x(t), "componentWillUnmount", function () { + t.animationEndCallback && clearTimeout(t.animationEndCallback), + t.lazyLoadTimer && clearInterval(t.lazyLoadTimer), + t.callbackTimers.length && + (t.callbackTimers.forEach(function (e) { + return clearTimeout(e); + }), + (t.callbackTimers = [])), + window.addEventListener + ? window.removeEventListener("resize", t.onWindowResized) + : window.detachEvent("onresize", t.onWindowResized), + t.autoplayTimer && clearInterval(t.autoplayTimer), + t.ro.disconnect(); + }), + E(x(t), "componentDidUpdate", function (e) { + if ( + (t.checkImagesLoad(), + t.props.onReInit && t.props.onReInit(), + t.props.lazyLoad) + ) { + var n = (0, s.getOnDemandLazySlides)( + g(g({}, t.props), t.state) + ); + n.length > 0 && + (t.setState(function (e) { + return { lazyLoadedList: e.lazyLoadedList.concat(n) }; + }), + t.props.onLazyLoad && t.props.onLazyLoad(n)); + } + t.adaptHeight(); + var i = g( + g({ listRef: t.list, trackRef: t.track }, t.props), + t.state + ), + a = t.didPropsChange(e); + a && + t.updateState(i, a, function () { + t.state.currentSlide >= + r.default.Children.count(t.props.children) && + t.changeSlide({ + message: "index", + index: + r.default.Children.count(t.props.children) - + t.props.slidesToShow, + currentSlide: t.state.currentSlide, + }), + t.props.autoplay + ? t.autoPlay("update") + : t.pause("paused"); + }); + }), + E(x(t), "onWindowResized", function (e) { + t.debouncedResize && t.debouncedResize.cancel(), + (t.debouncedResize = (0, a.default)(function () { + return t.resizeWindow(e); + }, 50)), + t.debouncedResize(); + }), + E(x(t), "resizeWindow", function () { + var e = + !(arguments.length > 0 && void 0 !== arguments[0]) || + arguments[0]; + if (Boolean(t.track && t.track.node)) { + var n = g( + g({ listRef: t.list, trackRef: t.track }, t.props), + t.state + ); + t.updateState(n, e, function () { + t.props.autoplay ? t.autoPlay("update") : t.pause("paused"); + }), + t.setState({ animating: !1 }), + clearTimeout(t.animationEndCallback), + delete t.animationEndCallback; + } + }), + E(x(t), "updateState", function (e, n, i) { + var a = (0, s.initializedState)(e); + e = g(g(g({}, e), a), {}, { slideIndex: a.currentSlide }); + var o = (0, s.getTrackLeft)(e); + e = g(g({}, e), {}, { left: o }); + var l = (0, s.getTrackCSS)(e); + (n || + r.default.Children.count(t.props.children) !== + r.default.Children.count(e.children)) && + (a.trackStyle = l), + t.setState(a, i); + }), + E(x(t), "ssrInit", function () { + if (t.props.variableWidth) { + var e = 0, + n = 0, + i = [], + a = (0, s.getPreClones)( + g( + g(g({}, t.props), t.state), + {}, + { slideCount: t.props.children.length } + ) + ), + o = (0, s.getPostClones)( + g( + g(g({}, t.props), t.state), + {}, + { slideCount: t.props.children.length } + ) + ); + t.props.children.forEach(function (t) { + i.push(t.props.style.width), (e += t.props.style.width); + }); + for (var l = 0; l < a; l++) + (n += i[i.length - 1 - l]), (e += i[i.length - 1 - l]); + for (var u = 0; u < o; u++) e += i[u]; + for (var c = 0; c < t.state.currentSlide; c++) n += i[c]; + var f = { width: e + "px", left: -n + "px" }; + if (t.props.centerMode) { + var d = "".concat(i[t.state.currentSlide], "px"); + f.left = "calc(" + .concat(f.left, " + (100% - ") + .concat(d, ") / 2 ) "); + } + return { trackStyle: f }; + } + var h = r.default.Children.count(t.props.children), + p = g(g(g({}, t.props), t.state), {}, { slideCount: h }), + v = (0, s.getPreClones)(p) + (0, s.getPostClones)(p) + h, + m = (100 / t.props.slidesToShow) * v, + A = 100 / v, + y = + (-A * ((0, s.getPreClones)(p) + t.state.currentSlide) * m) / + 100; + return ( + t.props.centerMode && (y += (100 - (A * m) / 100) / 2), + { + slideWidth: A + "%", + trackStyle: { width: m + "%", left: y + "%" }, + } + ); + }), + E(x(t), "checkImagesLoad", function () { + var e = + (t.list && + t.list.querySelectorAll && + t.list.querySelectorAll(".slick-slide img")) || + [], + n = e.length, + r = 0; + Array.prototype.forEach.call(e, function (e) { + var i = function () { + return ++r && r >= n && t.onWindowResized(); + }; + if (e.onclick) { + var a = e.onclick; + e.onclick = function () { + a(), e.parentNode.focus(); + }; + } else + e.onclick = function () { + return e.parentNode.focus(); + }; + e.onload || + (t.props.lazyLoad + ? (e.onload = function () { + t.adaptHeight(), + t.callbackTimers.push( + setTimeout(t.onWindowResized, t.props.speed) + ); + }) + : ((e.onload = i), + (e.onerror = function () { + i(), + t.props.onLazyLoadError && + t.props.onLazyLoadError(); + }))); + }); + }), + E(x(t), "progressiveLazyLoad", function () { + for ( + var e = [], + n = g(g({}, t.props), t.state), + r = t.state.currentSlide; + r < t.state.slideCount + (0, s.getPostClones)(n); + r++ + ) + if (t.state.lazyLoadedList.indexOf(r) < 0) { + e.push(r); + break; + } + for ( + var i = t.state.currentSlide - 1; + i >= -(0, s.getPreClones)(n); + i-- + ) + if (t.state.lazyLoadedList.indexOf(i) < 0) { + e.push(i); + break; + } + e.length > 0 + ? (t.setState(function (t) { + return { lazyLoadedList: t.lazyLoadedList.concat(e) }; + }), + t.props.onLazyLoad && t.props.onLazyLoad(e)) + : t.lazyLoadTimer && + (clearInterval(t.lazyLoadTimer), delete t.lazyLoadTimer); + }), + E(x(t), "slideHandler", function (e) { + var n = + arguments.length > 1 && + void 0 !== arguments[1] && + arguments[1], + r = t.props, + i = r.asNavFor, + a = r.beforeChange, + o = r.onLazyLoad, + l = r.speed, + u = r.afterChange, + c = t.state.currentSlide, + f = (0, s.slideHandler)( + g( + g(g({ index: e }, t.props), t.state), + {}, + { trackRef: t.track, useCSS: t.props.useCSS && !n } + ) + ), + d = f.state, + h = f.nextState; + if (d) { + a && a(c, d.currentSlide); + var p = d.lazyLoadedList.filter(function (e) { + return t.state.lazyLoadedList.indexOf(e) < 0; + }); + o && p.length > 0 && o(p), + !t.props.waitForAnimate && + t.animationEndCallback && + (clearTimeout(t.animationEndCallback), + u && u(c), + delete t.animationEndCallback), + t.setState(d, function () { + i && + t.asNavForIndex !== e && + ((t.asNavForIndex = e), i.innerSlider.slideHandler(e)), + h && + (t.animationEndCallback = setTimeout(function () { + var e = h.animating, + n = v(h, ["animating"]); + t.setState(n, function () { + t.callbackTimers.push( + setTimeout(function () { + return t.setState({ animating: e }); + }, 10) + ), + u && u(d.currentSlide), + delete t.animationEndCallback; + }); + }, l)); + }); + } + }), + E(x(t), "changeSlide", function (e) { + var n = + arguments.length > 1 && + void 0 !== arguments[1] && + arguments[1], + r = g(g({}, t.props), t.state), + i = (0, s.changeSlide)(r, e); + if ( + (0 === i || i) && + (!0 === n ? t.slideHandler(i, n) : t.slideHandler(i), + t.props.autoplay && t.autoPlay("update"), + t.props.focusOnSelect) + ) { + var a = t.list.querySelectorAll(".slick-current"); + a[0] && a[0].focus(); + } + }), + E(x(t), "clickHandler", function (e) { + !1 === t.clickable && (e.stopPropagation(), e.preventDefault()), + (t.clickable = !0); + }), + E(x(t), "keyHandler", function (e) { + var n = (0, s.keyHandler)( + e, + t.props.accessibility, + t.props.rtl + ); + "" !== n && t.changeSlide({ message: n }); + }), + E(x(t), "selectHandler", function (e) { + t.changeSlide(e); + }), + E(x(t), "disableBodyScroll", function () { + window.ontouchmove = function (e) { + (e = e || window.event).preventDefault && e.preventDefault(), + (e.returnValue = !1); + }; + }), + E(x(t), "enableBodyScroll", function () { + window.ontouchmove = null; + }), + E(x(t), "swipeStart", function (e) { + t.props.verticalSwiping && t.disableBodyScroll(); + var n = (0, s.swipeStart)(e, t.props.swipe, t.props.draggable); + "" !== n && t.setState(n); + }), + E(x(t), "swipeMove", function (e) { + var n = (0, s.swipeMove)( + e, + g( + g(g({}, t.props), t.state), + {}, + { + trackRef: t.track, + listRef: t.list, + slideIndex: t.state.currentSlide, + } + ) + ); + n && (n.swiping && (t.clickable = !1), t.setState(n)); + }), + E(x(t), "swipeEnd", function (e) { + var n = (0, s.swipeEnd)( + e, + g( + g(g({}, t.props), t.state), + {}, + { + trackRef: t.track, + listRef: t.list, + slideIndex: t.state.currentSlide, + } + ) + ); + if (n) { + var r = n.triggerSlideHandler; + delete n.triggerSlideHandler, + t.setState(n), + void 0 !== r && + (t.slideHandler(r), + t.props.verticalSwiping && t.enableBodyScroll()); + } + }), + E(x(t), "touchEnd", function (e) { + t.swipeEnd(e), (t.clickable = !0); + }), + E(x(t), "slickPrev", function () { + t.callbackTimers.push( + setTimeout(function () { + return t.changeSlide({ message: "previous" }); + }, 0) + ); + }), + E(x(t), "slickNext", function () { + t.callbackTimers.push( + setTimeout(function () { + return t.changeSlide({ message: "next" }); + }, 0) + ); + }), + E(x(t), "slickGoTo", function (e) { + var n = + arguments.length > 1 && + void 0 !== arguments[1] && + arguments[1]; + if (((e = Number(e)), isNaN(e))) return ""; + t.callbackTimers.push( + setTimeout(function () { + return t.changeSlide( + { + message: "index", + index: e, + currentSlide: t.state.currentSlide, + }, + n + ); + }, 0) + ); + }), + E(x(t), "play", function () { + var e; + if (t.props.rtl) + e = t.state.currentSlide - t.props.slidesToScroll; + else { + if (!(0, s.canGoNext)(g(g({}, t.props), t.state))) return !1; + e = t.state.currentSlide + t.props.slidesToScroll; + } + t.slideHandler(e); + }), + E(x(t), "autoPlay", function (e) { + t.autoplayTimer && clearInterval(t.autoplayTimer); + var n = t.state.autoplaying; + if ("update" === e) { + if ("hovered" === n || "focused" === n || "paused" === n) + return; + } else if ("leave" === e) { + if ("paused" === n || "focused" === n) return; + } else if ("blur" === e && ("paused" === n || "hovered" === n)) + return; + (t.autoplayTimer = setInterval( + t.play, + t.props.autoplaySpeed + 50 + )), + t.setState({ autoplaying: "playing" }); + }), + E(x(t), "pause", function (e) { + t.autoplayTimer && + (clearInterval(t.autoplayTimer), (t.autoplayTimer = null)); + var n = t.state.autoplaying; + "paused" === e + ? t.setState({ autoplaying: "paused" }) + : "focused" === e + ? ("hovered" !== n && "playing" !== n) || + t.setState({ autoplaying: "focused" }) + : "playing" === n && t.setState({ autoplaying: "hovered" }); + }), + E(x(t), "onDotsOver", function () { + return t.props.autoplay && t.pause("hovered"); + }), + E(x(t), "onDotsLeave", function () { + return ( + t.props.autoplay && + "hovered" === t.state.autoplaying && + t.autoPlay("leave") + ); + }), + E(x(t), "onTrackOver", function () { + return t.props.autoplay && t.pause("hovered"); + }), + E(x(t), "onTrackLeave", function () { + return ( + t.props.autoplay && + "hovered" === t.state.autoplaying && + t.autoPlay("leave") + ); + }), + E(x(t), "onSlideFocus", function () { + return t.props.autoplay && t.pause("focused"); + }), + E(x(t), "onSlideBlur", function () { + return ( + t.props.autoplay && + "focused" === t.state.autoplaying && + t.autoPlay("blur") + ); + }), + E(x(t), "render", function () { + var e, + n, + i, + a = (0, o.default)("slick-slider", t.props.className, { + "slick-vertical": t.props.vertical, + "slick-initialized": !0, + }), + f = g(g({}, t.props), t.state), + d = (0, s.extractObject)(f, [ + "fade", + "cssEase", + "speed", + "infinite", + "centerMode", + "focusOnSelect", + "currentSlide", + "lazyLoad", + "lazyLoadedList", + "rtl", + "slideWidth", + "slideHeight", + "listHeight", + "vertical", + "slidesToShow", + "slidesToScroll", + "slideCount", + "trackStyle", + "variableWidth", + "unslick", + "centerPadding", + "targetSlide", + "useCSS", + ]), + h = t.props.pauseOnHover; + if ( + ((d = g( + g({}, d), + {}, + { + onMouseEnter: h ? t.onTrackOver : null, + onMouseLeave: h ? t.onTrackLeave : null, + onMouseOver: h ? t.onTrackOver : null, + focusOnSelect: + t.props.focusOnSelect && t.clickable + ? t.selectHandler + : null, + } + )), + !0 === t.props.dots && + t.state.slideCount >= t.props.slidesToShow) + ) { + var v = (0, s.extractObject)(f, [ + "dotsClass", + "slideCount", + "slidesToShow", + "currentSlide", + "slidesToScroll", + "clickHandler", + "children", + "customPaging", + "infinite", + "appendDots", + ]), + m = t.props.pauseOnDotsHover; + (v = g( + g({}, v), + {}, + { + clickHandler: t.changeSlide, + onMouseEnter: m ? t.onDotsLeave : null, + onMouseOver: m ? t.onDotsOver : null, + onMouseLeave: m ? t.onDotsLeave : null, + } + )), + (e = r.default.createElement(u.Dots, v)); + } + var A = (0, s.extractObject)(f, [ + "infinite", + "centerMode", + "currentSlide", + "slideCount", + "slidesToShow", + "prevArrow", + "nextArrow", + ]); + (A.clickHandler = t.changeSlide), + t.props.arrows && + ((n = r.default.createElement(c.PrevArrow, A)), + (i = r.default.createElement(c.NextArrow, A))); + var y = null; + t.props.vertical && (y = { height: t.state.listHeight }); + var b = null; + !1 === t.props.vertical + ? !0 === t.props.centerMode && + (b = { padding: "0px " + t.props.centerPadding }) + : !0 === t.props.centerMode && + (b = { padding: t.props.centerPadding + " 0px" }); + var x = g(g({}, y), b), + S = t.props.touchMove, + E = { + className: "slick-list", + style: x, + onClick: t.clickHandler, + onMouseDown: S ? t.swipeStart : null, + onMouseMove: t.state.dragging && S ? t.swipeMove : null, + onMouseUp: S ? t.swipeEnd : null, + onMouseLeave: t.state.dragging && S ? t.swipeEnd : null, + onTouchStart: S ? t.swipeStart : null, + onTouchMove: t.state.dragging && S ? t.swipeMove : null, + onTouchEnd: S ? t.touchEnd : null, + onTouchCancel: t.state.dragging && S ? t.swipeEnd : null, + onKeyDown: t.props.accessibility ? t.keyHandler : null, + }, + _ = { className: a, dir: "ltr", style: t.props.style }; + return ( + t.props.unslick && + ((E = { className: "slick-list" }), (_ = { className: a })), + r.default.createElement( + "div", + _, + t.props.unslick ? "" : n, + r.default.createElement( + "div", + p({ ref: t.listRefHandler }, E), + r.default.createElement( + l.Track, + p({ ref: t.trackRefHandler }, d), + t.props.children + ) + ), + t.props.unslick ? "" : i, + t.props.unslick ? "" : e + ) + ); + }), + (t.list = null), + (t.track = null), + (t.state = g( + g({}, i.default), + {}, + { + currentSlide: t.props.initialSlide, + slideCount: r.default.Children.count(t.props.children), + } + )), + (t.callbackTimers = []), + (t.clickable = !0), + (t.debouncedResize = null); + var n = t.ssrInit(); + return (t.state = g(g({}, t.state), n)), t; + } + return ( + (t = S), + (n = [ + { + key: "didPropsChange", + value: function (e) { + for ( + var t = !1, n = 0, i = Object.keys(this.props); + n < i.length; + n++ + ) { + var a = i[n]; + if (!e.hasOwnProperty(a)) { + t = !0; + break; + } + if ( + "object" !== h(e[a]) && + "function" !== typeof e[a] && + e[a] !== this.props[a] + ) { + t = !0; + break; + } + } + return ( + t || + r.default.Children.count(this.props.children) !== + r.default.Children.count(e.children) + ); + }, + }, + ]) && A(t.prototype, n), + d && A(t, d), + Object.defineProperty(t, "prototype", { writable: !1 }), + S + ); + })(r.default.Component); + t.InnerSlider = _; + }, + 3178: function (e, t, n) { + "use strict"; + function r(e) { + return ( + (r = + "function" == typeof Symbol && "symbol" == typeof Symbol.iterator + ? function (e) { + return typeof e; + } + : function (e) { + return e && + "function" == typeof Symbol && + e.constructor === Symbol && + e !== Symbol.prototype + ? "symbol" + : typeof e; + }), + r(e) + ); + } + Object.defineProperty(t, "__esModule", { value: !0 }), + (t.default = void 0); + var i = u(n(2791)), + a = n(8293), + o = u(n(5477)), + s = u(n(5484)), + l = n(8026); + function u(e) { + return e && e.__esModule ? e : { default: e }; + } + function c() { + return ( + (c = + Object.assign || + 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; + }), + c.apply(this, arguments) + ); + } + function f(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 d(e) { + for (var t = 1; t < arguments.length; t++) { + var n = null != arguments[t] ? arguments[t] : {}; + t % 2 + ? f(Object(n), !0).forEach(function (t) { + A(e, t, n[t]); + }) + : Object.getOwnPropertyDescriptors + ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) + : f(Object(n)).forEach(function (t) { + Object.defineProperty( + e, + t, + Object.getOwnPropertyDescriptor(n, t) + ); + }); + } + return e; + } + function h(e, t) { + for (var n = 0; n < t.length; n++) { + var r = t[n]; + (r.enumerable = r.enumerable || !1), + (r.configurable = !0), + "value" in r && (r.writable = !0), + Object.defineProperty(e, r.key, r); + } + } + function p(e, t) { + return ( + (p = + Object.setPrototypeOf || + function (e, t) { + return (e.__proto__ = t), e; + }), + p(e, t) + ); + } + function v(e) { + var t = (function () { + if ("undefined" === typeof Reflect || !Reflect.construct) return !1; + if (Reflect.construct.sham) return !1; + if ("function" === typeof Proxy) return !0; + try { + return ( + Boolean.prototype.valueOf.call( + Reflect.construct(Boolean, [], function () {}) + ), + !0 + ); + } catch (e) { + return !1; + } + })(); + return function () { + var n, + i = g(e); + if (t) { + var a = g(this).constructor; + n = Reflect.construct(i, arguments, a); + } else n = i.apply(this, arguments); + return (function (e, t) { + if (t && ("object" === r(t) || "function" === typeof t)) return t; + if (void 0 !== t) + throw new TypeError( + "Derived constructors may only return object or undefined" + ); + return m(e); + })(this, n); + }; + } + function m(e) { + if (void 0 === e) + throw new ReferenceError( + "this hasn't been initialised - super() hasn't been called" + ); + return e; + } + function g(e) { + return ( + (g = Object.setPrototypeOf + ? Object.getPrototypeOf + : function (e) { + return e.__proto__ || Object.getPrototypeOf(e); + }), + g(e) + ); + } + function A(e, t, n) { + return ( + t in e + ? Object.defineProperty(e, t, { + value: n, + enumerable: !0, + configurable: !0, + writable: !0, + }) + : (e[t] = n), + e + ); + } + var y = (0, l.canUseDOM)() && n(8153), + b = (function (e) { + !(function (e, t) { + if ("function" !== typeof t && null !== t) + throw new TypeError( + "Super expression must either be null or a function" + ); + (e.prototype = Object.create(t && t.prototype, { + constructor: { value: e, writable: !0, configurable: !0 }, + })), + Object.defineProperty(e, "prototype", { writable: !1 }), + t && p(e, t); + })(f, e); + var t, + n, + r, + u = v(f); + function f(e) { + var t; + return ( + (function (e, t) { + if (!(e instanceof t)) + throw new TypeError("Cannot call a class as a function"); + })(this, f), + A( + m((t = u.call(this, e))), + "innerSliderRefHandler", + function (e) { + return (t.innerSlider = e); + } + ), + A(m(t), "slickPrev", function () { + return t.innerSlider.slickPrev(); + }), + A(m(t), "slickNext", function () { + return t.innerSlider.slickNext(); + }), + A(m(t), "slickGoTo", function (e) { + var n = + arguments.length > 1 && + void 0 !== arguments[1] && + arguments[1]; + return t.innerSlider.slickGoTo(e, n); + }), + A(m(t), "slickPause", function () { + return t.innerSlider.pause("paused"); + }), + A(m(t), "slickPlay", function () { + return t.innerSlider.autoPlay("play"); + }), + (t.state = { breakpoint: null }), + (t._responsiveMediaHandlers = []), + t + ); + } + return ( + (t = f), + (n = [ + { + key: "media", + value: function (e, t) { + y.register(e, t), + this._responsiveMediaHandlers.push({ + query: e, + handler: t, + }); + }, + }, + { + key: "componentDidMount", + value: function () { + var e = this; + if (this.props.responsive) { + var t = this.props.responsive.map(function (e) { + return e.breakpoint; + }); + t.sort(function (e, t) { + return e - t; + }), + t.forEach(function (n, r) { + var i; + (i = + 0 === r + ? (0, o.default)({ minWidth: 0, maxWidth: n }) + : (0, o.default)({ + minWidth: t[r - 1] + 1, + maxWidth: n, + })), + (0, l.canUseDOM)() && + e.media(i, function () { + e.setState({ breakpoint: n }); + }); + }); + var n = (0, o.default)({ minWidth: t.slice(-1)[0] }); + (0, l.canUseDOM)() && + this.media(n, function () { + e.setState({ breakpoint: null }); + }); + } + }, + }, + { + key: "componentWillUnmount", + value: function () { + this._responsiveMediaHandlers.forEach(function (e) { + y.unregister(e.query, e.handler); + }); + }, + }, + { + key: "render", + value: function () { + var e, + t, + n = this; + (e = this.state.breakpoint + ? "unslick" === + (t = this.props.responsive.filter(function (e) { + return e.breakpoint === n.state.breakpoint; + }))[0].settings + ? "unslick" + : d(d(d({}, s.default), this.props), t[0].settings) + : d(d({}, s.default), this.props)).centerMode && + (e.slidesToScroll, (e.slidesToScroll = 1)), + e.fade && + (e.slidesToShow, + e.slidesToScroll, + (e.slidesToShow = 1), + (e.slidesToScroll = 1)); + var r = i.default.Children.toArray(this.props.children); + (r = r.filter(function (e) { + return "string" === typeof e ? !!e.trim() : !!e; + })), + e.variableWidth && + (e.rows > 1 || e.slidesPerRow > 1) && + (console.warn( + "variableWidth is not supported in case of rows > 1 or slidesPerRow > 1" + ), + (e.variableWidth = !1)); + for ( + var o = [], l = null, u = 0; + u < r.length; + u += e.rows * e.slidesPerRow + ) { + for ( + var f = [], h = u; + h < u + e.rows * e.slidesPerRow; + h += e.slidesPerRow + ) { + for ( + var p = [], v = h; + v < h + e.slidesPerRow && + (e.variableWidth && + r[v].props.style && + (l = r[v].props.style.width), + !(v >= r.length)); + v += 1 + ) + p.push( + i.default.cloneElement(r[v], { + key: 100 * u + 10 * h + v, + tabIndex: -1, + style: { + width: "".concat(100 / e.slidesPerRow, "%"), + display: "inline-block", + }, + }) + ); + f.push( + i.default.createElement("div", { key: 10 * u + h }, p) + ); + } + e.variableWidth + ? o.push( + i.default.createElement( + "div", + { key: u, style: { width: l } }, + f + ) + ) + : o.push(i.default.createElement("div", { key: u }, f)); + } + if ("unslick" === e) { + var m = "regular slider " + (this.props.className || ""); + return i.default.createElement( + "div", + { className: m }, + r + ); + } + return ( + o.length <= e.slidesToShow && (e.unslick = !0), + i.default.createElement( + a.InnerSlider, + c( + { + style: this.props.style, + ref: this.innerSliderRefHandler, + }, + e + ), + o + ) + ); + }, + }, + ]) && h(t.prototype, n), + r && h(t, r), + Object.defineProperty(t, "prototype", { writable: !1 }), + f + ); + })(i.default.Component); + t.default = b; + }, + 4931: function (e, t, n) { + "use strict"; + function r(e) { + return ( + (r = + "function" == typeof Symbol && "symbol" == typeof Symbol.iterator + ? function (e) { + return typeof e; + } + : function (e) { + return e && + "function" == typeof Symbol && + e.constructor === Symbol && + e !== Symbol.prototype + ? "symbol" + : typeof e; + }), + r(e) + ); + } + Object.defineProperty(t, "__esModule", { value: !0 }), + (t.Track = void 0); + var i = s(n(2791)), + a = s(n(1694)), + o = n(8026); + function s(e) { + return e && e.__esModule ? e : { default: e }; + } + function l() { + return ( + (l = + Object.assign || + 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 u(e, t) { + for (var n = 0; n < t.length; n++) { + var r = t[n]; + (r.enumerable = r.enumerable || !1), + (r.configurable = !0), + "value" in r && (r.writable = !0), + Object.defineProperty(e, r.key, r); + } + } + function c(e, t) { + return ( + (c = + Object.setPrototypeOf || + function (e, t) { + return (e.__proto__ = t), e; + }), + c(e, t) + ); + } + function f(e) { + var t = (function () { + if ("undefined" === typeof Reflect || !Reflect.construct) return !1; + if (Reflect.construct.sham) return !1; + if ("function" === typeof Proxy) return !0; + try { + return ( + Boolean.prototype.valueOf.call( + Reflect.construct(Boolean, [], function () {}) + ), + !0 + ); + } catch (e) { + return !1; + } + })(); + return function () { + var n, + i = h(e); + if (t) { + var a = h(this).constructor; + n = Reflect.construct(i, arguments, a); + } else n = i.apply(this, arguments); + return (function (e, t) { + if (t && ("object" === r(t) || "function" === typeof t)) return t; + if (void 0 !== t) + throw new TypeError( + "Derived constructors may only return object or undefined" + ); + return d(e); + })(this, n); + }; + } + function d(e) { + if (void 0 === e) + throw new ReferenceError( + "this hasn't been initialised - super() hasn't been called" + ); + return e; + } + function h(e) { + return ( + (h = Object.setPrototypeOf + ? Object.getPrototypeOf + : function (e) { + return e.__proto__ || Object.getPrototypeOf(e); + }), + h(e) + ); + } + function p(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 v(e) { + for (var t = 1; t < arguments.length; t++) { + var n = null != arguments[t] ? arguments[t] : {}; + t % 2 + ? p(Object(n), !0).forEach(function (t) { + m(e, t, n[t]); + }) + : Object.getOwnPropertyDescriptors + ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) + : p(Object(n)).forEach(function (t) { + Object.defineProperty( + e, + t, + Object.getOwnPropertyDescriptor(n, t) + ); + }); + } + return e; + } + function m(e, t, n) { + return ( + t in e + ? Object.defineProperty(e, t, { + value: n, + enumerable: !0, + configurable: !0, + writable: !0, + }) + : (e[t] = n), + e + ); + } + var g = function (e) { + var t, n, r, i, a; + return ( + (r = + (a = e.rtl ? e.slideCount - 1 - e.index : e.index) < 0 || + a >= e.slideCount), + e.centerMode + ? ((i = Math.floor(e.slidesToShow / 2)), + (n = (a - e.currentSlide) % e.slideCount === 0), + a > e.currentSlide - i - 1 && + a <= e.currentSlide + i && + (t = !0)) + : (t = + e.currentSlide <= a && a < e.currentSlide + e.slidesToShow), + { + "slick-slide": !0, + "slick-active": t, + "slick-center": n, + "slick-cloned": r, + "slick-current": + a === + (e.targetSlide < 0 + ? e.targetSlide + e.slideCount + : e.targetSlide >= e.slideCount + ? e.targetSlide - e.slideCount + : e.targetSlide), + } + ); + }, + A = function (e, t) { + return e.key || t; + }, + y = function (e) { + var t, + n = [], + r = [], + s = [], + l = i.default.Children.count(e.children), + u = (0, o.lazyStartIndex)(e), + c = (0, o.lazyEndIndex)(e); + return ( + i.default.Children.forEach(e.children, function (f, d) { + var h, + p = { + message: "children", + index: d, + slidesToScroll: e.slidesToScroll, + currentSlide: e.currentSlide, + }; + h = + !e.lazyLoad || + (e.lazyLoad && e.lazyLoadedList.indexOf(d) >= 0) + ? f + : i.default.createElement("div", null); + var m = (function (e) { + var t = {}; + return ( + (void 0 !== e.variableWidth && !1 !== e.variableWidth) || + (t.width = e.slideWidth), + e.fade && + ((t.position = "relative"), + e.vertical + ? (t.top = -e.index * parseInt(e.slideHeight)) + : (t.left = -e.index * parseInt(e.slideWidth)), + (t.opacity = e.currentSlide === e.index ? 1 : 0), + e.useCSS && + (t.transition = + "opacity " + + e.speed + + "ms " + + e.cssEase + + ", visibility " + + e.speed + + "ms " + + e.cssEase)), + t + ); + })(v(v({}, e), {}, { index: d })), + y = h.props.className || "", + b = g(v(v({}, e), {}, { index: d })); + if ( + (n.push( + i.default.cloneElement(h, { + key: "original" + A(h, d), + "data-index": d, + className: (0, a.default)(b, y), + tabIndex: "-1", + "aria-hidden": !b["slick-active"], + style: v(v({ outline: "none" }, h.props.style || {}), m), + onClick: function (t) { + h.props && h.props.onClick && h.props.onClick(t), + e.focusOnSelect && e.focusOnSelect(p); + }, + }) + ), + e.infinite && !1 === e.fade) + ) { + var x = l - d; + x <= (0, o.getPreClones)(e) && + l !== e.slidesToShow && + ((t = -x) >= u && (h = f), + (b = g(v(v({}, e), {}, { index: t }))), + r.push( + i.default.cloneElement(h, { + key: "precloned" + A(h, t), + "data-index": t, + tabIndex: "-1", + className: (0, a.default)(b, y), + "aria-hidden": !b["slick-active"], + style: v(v({}, h.props.style || {}), m), + onClick: function (t) { + h.props && h.props.onClick && h.props.onClick(t), + e.focusOnSelect && e.focusOnSelect(p); + }, + }) + )), + l !== e.slidesToShow && + ((t = l + d) < c && (h = f), + (b = g(v(v({}, e), {}, { index: t }))), + s.push( + i.default.cloneElement(h, { + key: "postcloned" + A(h, t), + "data-index": t, + tabIndex: "-1", + className: (0, a.default)(b, y), + "aria-hidden": !b["slick-active"], + style: v(v({}, h.props.style || {}), m), + onClick: function (t) { + h.props && h.props.onClick && h.props.onClick(t), + e.focusOnSelect && e.focusOnSelect(p); + }, + }) + )); + } + }), + e.rtl ? r.concat(n, s).reverse() : r.concat(n, s) + ); + }, + b = (function (e) { + !(function (e, t) { + if ("function" !== typeof t && null !== t) + throw new TypeError( + "Super expression must either be null or a function" + ); + (e.prototype = Object.create(t && t.prototype, { + constructor: { value: e, writable: !0, configurable: !0 }, + })), + Object.defineProperty(e, "prototype", { writable: !1 }), + t && c(e, t); + })(o, e); + var t, + n, + r, + a = f(o); + function o() { + var e; + !(function (e, t) { + if (!(e instanceof t)) + throw new TypeError("Cannot call a class as a function"); + })(this, o); + for ( + var t = arguments.length, n = new Array(t), r = 0; + r < t; + r++ + ) + n[r] = arguments[r]; + return ( + m(d((e = a.call.apply(a, [this].concat(n)))), "node", null), + m(d(e), "handleRef", function (t) { + e.node = t; + }), + e + ); + } + return ( + (t = o), + (n = [ + { + key: "render", + value: function () { + var e = y(this.props), + t = this.props, + n = { + onMouseEnter: t.onMouseEnter, + onMouseOver: t.onMouseOver, + onMouseLeave: t.onMouseLeave, + }; + return i.default.createElement( + "div", + l( + { + ref: this.handleRef, + className: "slick-track", + style: this.props.trackStyle, + }, + n + ), + e + ); + }, + }, + ]) && u(t.prototype, n), + r && u(t, r), + Object.defineProperty(t, "prototype", { writable: !1 }), + o + ); + })(i.default.PureComponent); + t.Track = b; + }, + 8026: function (e, t, n) { + "use strict"; + Object.defineProperty(t, "__esModule", { value: !0 }), + (t.checkSpecKeys = + t.checkNavigable = + t.changeSlide = + t.canUseDOM = + t.canGoNext = + void 0), + (t.clamp = l), + (t.swipeStart = + t.swipeMove = + t.swipeEnd = + t.slidesOnRight = + t.slidesOnLeft = + t.slideHandler = + t.siblingDirection = + t.safePreventDefault = + t.lazyStartIndex = + t.lazySlidesOnRight = + t.lazySlidesOnLeft = + t.lazyEndIndex = + t.keyHandler = + t.initializedState = + t.getWidth = + t.getTrackLeft = + t.getTrackCSS = + t.getTrackAnimateCSS = + t.getTotalSlides = + t.getSwipeDirection = + t.getSlideCount = + t.getRequiredLazySlides = + t.getPreClones = + t.getPostClones = + t.getOnDemandLazySlides = + t.getNavigableIndexes = + t.getHeight = + t.extractObject = + void 0); + var r, + i = (r = n(2791)) && r.__esModule ? r : { default: r }; + function a(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 o(e) { + for (var t = 1; t < arguments.length; t++) { + var n = null != arguments[t] ? arguments[t] : {}; + t % 2 + ? a(Object(n), !0).forEach(function (t) { + s(e, t, n[t]); + }) + : Object.getOwnPropertyDescriptors + ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) + : a(Object(n)).forEach(function (t) { + Object.defineProperty( + e, + t, + Object.getOwnPropertyDescriptor(n, t) + ); + }); + } + return e; + } + function s(e, t, n) { + return ( + t in e + ? Object.defineProperty(e, t, { + value: n, + enumerable: !0, + configurable: !0, + writable: !0, + }) + : (e[t] = n), + e + ); + } + function l(e, t, n) { + return Math.max(t, Math.min(e, n)); + } + var u = function (e) { + ["onTouchStart", "onTouchMove", "onWheel"].includes(e._reactName) || + e.preventDefault(); + }; + t.safePreventDefault = u; + var c = function (e) { + for (var t = [], n = f(e), r = d(e), i = n; i < r; i++) + e.lazyLoadedList.indexOf(i) < 0 && t.push(i); + return t; + }; + t.getOnDemandLazySlides = c; + t.getRequiredLazySlides = function (e) { + for (var t = [], n = f(e), r = d(e), i = n; i < r; i++) t.push(i); + return t; + }; + var f = function (e) { + return e.currentSlide - h(e); + }; + t.lazyStartIndex = f; + var d = function (e) { + return e.currentSlide + p(e); + }; + t.lazyEndIndex = d; + var h = function (e) { + return e.centerMode + ? Math.floor(e.slidesToShow / 2) + + (parseInt(e.centerPadding) > 0 ? 1 : 0) + : 0; + }; + t.lazySlidesOnLeft = h; + var p = function (e) { + return e.centerMode + ? Math.floor((e.slidesToShow - 1) / 2) + + 1 + + (parseInt(e.centerPadding) > 0 ? 1 : 0) + : e.slidesToShow; + }; + t.lazySlidesOnRight = p; + var v = function (e) { + return (e && e.offsetWidth) || 0; + }; + t.getWidth = v; + var m = function (e) { + return (e && e.offsetHeight) || 0; + }; + t.getHeight = m; + var g = function (e) { + var t, + n, + r, + i, + a = arguments.length > 1 && void 0 !== arguments[1] && arguments[1]; + return ( + (t = e.startX - e.curX), + (n = e.startY - e.curY), + (r = Math.atan2(n, t)), + (i = Math.round((180 * r) / Math.PI)) < 0 && + (i = 360 - Math.abs(i)), + (i <= 45 && i >= 0) || (i <= 360 && i >= 315) + ? "left" + : i >= 135 && i <= 225 + ? "right" + : !0 === a + ? i >= 35 && i <= 135 + ? "up" + : "down" + : "vertical" + ); + }; + t.getSwipeDirection = g; + var A = function (e) { + var t = !0; + return ( + e.infinite || + (((e.centerMode && e.currentSlide >= e.slideCount - 1) || + e.slideCount <= e.slidesToShow || + e.currentSlide >= e.slideCount - e.slidesToShow) && + (t = !1)), + t + ); + }; + t.canGoNext = A; + t.extractObject = function (e, t) { + var n = {}; + return ( + t.forEach(function (t) { + return (n[t] = e[t]); + }), + n + ); + }; + t.initializedState = function (e) { + var t, + n = i.default.Children.count(e.children), + r = e.listRef, + a = Math.ceil(v(r)), + s = e.trackRef && e.trackRef.node, + l = Math.ceil(v(s)); + if (e.vertical) t = a; + else { + var u = e.centerMode && 2 * parseInt(e.centerPadding); + "string" === typeof e.centerPadding && + "%" === e.centerPadding.slice(-1) && + (u *= a / 100), + (t = Math.ceil((a - u) / e.slidesToShow)); + } + var f = r && m(r.querySelector('[data-index="0"]')), + d = f * e.slidesToShow, + h = void 0 === e.currentSlide ? e.initialSlide : e.currentSlide; + e.rtl && void 0 === e.currentSlide && (h = n - 1 - e.initialSlide); + var p = e.lazyLoadedList || [], + g = c(o(o({}, e), {}, { currentSlide: h, lazyLoadedList: p })), + A = { + slideCount: n, + slideWidth: t, + listWidth: a, + trackWidth: l, + currentSlide: h, + slideHeight: f, + listHeight: d, + lazyLoadedList: (p = p.concat(g)), + }; + return ( + null === e.autoplaying && e.autoplay && (A.autoplaying = "playing"), + A + ); + }; + t.slideHandler = function (e) { + var t = e.waitForAnimate, + n = e.animating, + r = e.fade, + i = e.infinite, + a = e.index, + s = e.slideCount, + u = e.lazyLoad, + f = e.currentSlide, + d = e.centerMode, + h = e.slidesToScroll, + p = e.slidesToShow, + v = e.useCSS, + m = e.lazyLoadedList; + if (t && n) return {}; + var g, + y, + b, + x = a, + S = {}, + w = {}, + T = i ? a : l(a, 0, s - 1); + if (r) { + if (!i && (a < 0 || a >= s)) return {}; + a < 0 ? (x = a + s) : a >= s && (x = a - s), + u && m.indexOf(x) < 0 && (m = m.concat(x)), + (S = { + animating: !0, + currentSlide: x, + lazyLoadedList: m, + targetSlide: x, + }), + (w = { animating: !1, targetSlide: x }); + } else + (g = x), + x < 0 + ? ((g = x + s), i ? s % h !== 0 && (g = s - (s % h)) : (g = 0)) + : !A(e) && x > f + ? (x = g = f) + : d && x >= s + ? ((x = i ? s : s - 1), (g = i ? 0 : s - 1)) + : x >= s && + ((g = x - s), i ? s % h !== 0 && (g = 0) : (g = s - p)), + !i && x + p >= s && (g = s - p), + (y = C(o(o({}, e), {}, { slideIndex: x }))), + (b = C(o(o({}, e), {}, { slideIndex: g }))), + i || (y === b && (x = g), (y = b)), + u && (m = m.concat(c(o(o({}, e), {}, { currentSlide: x })))), + v + ? ((S = { + animating: !0, + currentSlide: g, + trackStyle: _(o(o({}, e), {}, { left: y })), + lazyLoadedList: m, + targetSlide: T, + }), + (w = { + animating: !1, + currentSlide: g, + trackStyle: E(o(o({}, e), {}, { left: b })), + swipeLeft: null, + targetSlide: T, + })) + : (S = { + currentSlide: g, + trackStyle: E(o(o({}, e), {}, { left: b })), + lazyLoadedList: m, + targetSlide: T, + }); + return { state: S, nextState: w }; + }; + t.changeSlide = function (e, t) { + var n, + r, + i, + a, + s = e.slidesToScroll, + l = e.slidesToShow, + u = e.slideCount, + c = e.currentSlide, + f = e.targetSlide, + d = e.lazyLoad, + h = e.infinite; + if (((n = u % s !== 0 ? 0 : (u - c) % s), "previous" === t.message)) + (a = c - (i = 0 === n ? s : l - n)), + d && !h && (a = -1 === (r = c - i) ? u - 1 : r), + h || (a = f - s); + else if ("next" === t.message) + (a = c + (i = 0 === n ? s : n)), + d && !h && (a = ((c + s) % u) + n), + h || (a = f + s); + else if ("dots" === t.message) a = t.index * t.slidesToScroll; + else if ("children" === t.message) { + if (((a = t.index), h)) { + var p = I(o(o({}, e), {}, { targetSlide: a })); + a > t.currentSlide && "left" === p + ? (a -= u) + : a < t.currentSlide && "right" === p && (a += u); + } + } else "index" === t.message && (a = Number(t.index)); + return a; + }; + t.keyHandler = function (e, t, n) { + return e.target.tagName.match("TEXTAREA|INPUT|SELECT") || !t + ? "" + : 37 === e.keyCode + ? n + ? "next" + : "previous" + : 39 === e.keyCode + ? n + ? "previous" + : "next" + : ""; + }; + t.swipeStart = function (e, t, n) { + return ( + "IMG" === e.target.tagName && u(e), + !t || (!n && -1 !== e.type.indexOf("mouse")) + ? "" + : { + dragging: !0, + touchObject: { + startX: e.touches ? e.touches[0].pageX : e.clientX, + startY: e.touches ? e.touches[0].pageY : e.clientY, + curX: e.touches ? e.touches[0].pageX : e.clientX, + curY: e.touches ? e.touches[0].pageY : e.clientY, + }, + } + ); + }; + t.swipeMove = function (e, t) { + var n = t.scrolling, + r = t.animating, + i = t.vertical, + a = t.swipeToSlide, + s = t.verticalSwiping, + l = t.rtl, + c = t.currentSlide, + f = t.edgeFriction, + d = t.edgeDragged, + h = t.onEdge, + p = t.swiped, + v = t.swiping, + m = t.slideCount, + y = t.slidesToScroll, + b = t.infinite, + x = t.touchObject, + S = t.swipeEvent, + _ = t.listHeight, + w = t.listWidth; + if (!n) { + if (r) return u(e); + i && a && s && u(e); + var T, + M = {}, + I = C(t); + (x.curX = e.touches ? e.touches[0].pageX : e.clientX), + (x.curY = e.touches ? e.touches[0].pageY : e.clientY), + (x.swipeLength = Math.round( + Math.sqrt(Math.pow(x.curX - x.startX, 2)) + )); + var k = Math.round(Math.sqrt(Math.pow(x.curY - x.startY, 2))); + if (!s && !v && k > 10) return { scrolling: !0 }; + s && (x.swipeLength = k); + var R = (l ? -1 : 1) * (x.curX > x.startX ? 1 : -1); + s && (R = x.curY > x.startY ? 1 : -1); + var B = Math.ceil(m / y), + P = g(t.touchObject, s), + L = x.swipeLength; + return ( + b || + (((0 === c && ("right" === P || "down" === P)) || + (c + 1 >= B && ("left" === P || "up" === P)) || + (!A(t) && ("left" === P || "up" === P))) && + ((L = x.swipeLength * f), + !1 === d && h && (h(P), (M.edgeDragged = !0)))), + !p && S && (S(P), (M.swiped = !0)), + (T = i ? I + L * (_ / w) * R : l ? I - L * R : I + L * R), + s && (T = I + L * R), + (M = o( + o({}, M), + {}, + { + touchObject: x, + swipeLeft: T, + trackStyle: E(o(o({}, t), {}, { left: T })), + } + )), + Math.abs(x.curX - x.startX) < 0.8 * Math.abs(x.curY - x.startY) + ? M + : (x.swipeLength > 10 && ((M.swiping = !0), u(e)), M) + ); + } + }; + t.swipeEnd = function (e, t) { + var n = t.dragging, + r = t.swipe, + i = t.touchObject, + a = t.listWidth, + s = t.touchThreshold, + l = t.verticalSwiping, + c = t.listHeight, + f = t.swipeToSlide, + d = t.scrolling, + h = t.onSwipe, + p = t.targetSlide, + v = t.currentSlide, + m = t.infinite; + if (!n) return r && u(e), {}; + var A = l ? c / s : a / s, + y = g(i, l), + S = { + dragging: !1, + edgeDragged: !1, + scrolling: !1, + swiping: !1, + swiped: !1, + swipeLeft: null, + touchObject: {}, + }; + if (d) return S; + if (!i.swipeLength) return S; + if (i.swipeLength > A) { + var E, w; + u(e), h && h(y); + var T = m ? v : p; + switch (y) { + case "left": + case "up": + (w = T + x(t)), (E = f ? b(t, w) : w), (S.currentDirection = 0); + break; + case "right": + case "down": + (w = T - x(t)), (E = f ? b(t, w) : w), (S.currentDirection = 1); + break; + default: + E = T; + } + S.triggerSlideHandler = E; + } else { + var M = C(t); + S.trackStyle = _(o(o({}, t), {}, { left: M })); + } + return S; + }; + var y = function (e) { + for ( + var t = e.infinite ? 2 * e.slideCount : e.slideCount, + n = e.infinite ? -1 * e.slidesToShow : 0, + r = e.infinite ? -1 * e.slidesToShow : 0, + i = []; + n < t; + + ) + i.push(n), + (n = r + e.slidesToScroll), + (r += Math.min(e.slidesToScroll, e.slidesToShow)); + return i; + }; + t.getNavigableIndexes = y; + var b = function (e, t) { + var n = y(e), + r = 0; + if (t > n[n.length - 1]) t = n[n.length - 1]; + else + for (var i in n) { + if (t < n[i]) { + t = r; + break; + } + r = n[i]; + } + return t; + }; + t.checkNavigable = b; + var x = function (e) { + var t = e.centerMode + ? e.slideWidth * Math.floor(e.slidesToShow / 2) + : 0; + if (e.swipeToSlide) { + var n, + r = e.listRef, + i = + (r.querySelectorAll && r.querySelectorAll(".slick-slide")) || + []; + if ( + (Array.from(i).every(function (r) { + if (e.vertical) { + if (r.offsetTop + m(r) / 2 > -1 * e.swipeLeft) + return (n = r), !1; + } else if (r.offsetLeft - t + v(r) / 2 > -1 * e.swipeLeft) return (n = r), !1; + return !0; + }), + !n) + ) + return 0; + var a = + !0 === e.rtl ? e.slideCount - e.currentSlide : e.currentSlide; + return Math.abs(n.dataset.index - a) || 1; + } + return e.slidesToScroll; + }; + t.getSlideCount = x; + var S = function (e, t) { + return t.reduce(function (t, n) { + return t && e.hasOwnProperty(n); + }, !0) + ? null + : console.error("Keys Missing:", e); + }; + t.checkSpecKeys = S; + var E = function (e) { + var t, n; + S(e, [ + "left", + "variableWidth", + "slideCount", + "slidesToShow", + "slideWidth", + ]); + var r = e.slideCount + 2 * e.slidesToShow; + e.vertical ? (n = r * e.slideHeight) : (t = M(e) * e.slideWidth); + var i = { opacity: 1, transition: "", WebkitTransition: "" }; + if (e.useTransform) { + var a = e.vertical + ? "translate3d(0px, " + e.left + "px, 0px)" + : "translate3d(" + e.left + "px, 0px, 0px)", + s = e.vertical + ? "translate3d(0px, " + e.left + "px, 0px)" + : "translate3d(" + e.left + "px, 0px, 0px)", + l = e.vertical + ? "translateY(" + e.left + "px)" + : "translateX(" + e.left + "px)"; + i = o( + o({}, i), + {}, + { WebkitTransform: a, transform: s, msTransform: l } + ); + } else e.vertical ? (i.top = e.left) : (i.left = e.left); + return ( + e.fade && (i = { opacity: 1 }), + t && (i.width = t), + n && (i.height = n), + window && + !window.addEventListener && + window.attachEvent && + (e.vertical + ? (i.marginTop = e.left + "px") + : (i.marginLeft = e.left + "px")), + i + ); + }; + t.getTrackCSS = E; + var _ = function (e) { + S(e, [ + "left", + "variableWidth", + "slideCount", + "slidesToShow", + "slideWidth", + "speed", + "cssEase", + ]); + var t = E(e); + return ( + e.useTransform + ? ((t.WebkitTransition = + "-webkit-transform " + e.speed + "ms " + e.cssEase), + (t.transition = "transform " + e.speed + "ms " + e.cssEase)) + : e.vertical + ? (t.transition = "top " + e.speed + "ms " + e.cssEase) + : (t.transition = "left " + e.speed + "ms " + e.cssEase), + t + ); + }; + t.getTrackAnimateCSS = _; + var C = function (e) { + if (e.unslick) return 0; + S(e, [ + "slideIndex", + "trackRef", + "infinite", + "centerMode", + "slideCount", + "slidesToShow", + "slidesToScroll", + "slideWidth", + "listWidth", + "variableWidth", + "slideHeight", + ]); + var t, + n, + r = e.slideIndex, + i = e.trackRef, + a = e.infinite, + o = e.centerMode, + s = e.slideCount, + l = e.slidesToShow, + u = e.slidesToScroll, + c = e.slideWidth, + f = e.listWidth, + d = e.variableWidth, + h = e.slideHeight, + p = e.fade, + v = e.vertical; + if (p || 1 === e.slideCount) return 0; + var m = 0; + if ( + (a + ? ((m = -w(e)), + s % u !== 0 && + r + u > s && + (m = -(r > s ? l - (r - s) : s % u)), + o && (m += parseInt(l / 2))) + : (s % u !== 0 && r + u > s && (m = l - (s % u)), + o && (m = parseInt(l / 2))), + (t = v ? r * h * -1 + m * h : r * c * -1 + m * c), + !0 === d) + ) { + var g, + A = i && i.node; + if ( + ((g = r + w(e)), + (t = (n = A && A.childNodes[g]) ? -1 * n.offsetLeft : 0), + !0 === o) + ) { + (g = a ? r + w(e) : r), (n = A && A.children[g]), (t = 0); + for (var y = 0; y < g; y++) + t -= A && A.children[y] && A.children[y].offsetWidth; + (t -= parseInt(e.centerPadding)), + (t += n && (f - n.offsetWidth) / 2); + } + } + return t; + }; + t.getTrackLeft = C; + var w = function (e) { + return e.unslick || !e.infinite + ? 0 + : e.variableWidth + ? e.slideCount + : e.slidesToShow + (e.centerMode ? 1 : 0); + }; + t.getPreClones = w; + var T = function (e) { + return e.unslick || !e.infinite ? 0 : e.slideCount; + }; + t.getPostClones = T; + var M = function (e) { + return 1 === e.slideCount ? 1 : w(e) + e.slideCount + T(e); + }; + t.getTotalSlides = M; + var I = function (e) { + return e.targetSlide > e.currentSlide + ? e.targetSlide > e.currentSlide + k(e) + ? "left" + : "right" + : e.targetSlide < e.currentSlide - R(e) + ? "right" + : "left"; + }; + t.siblingDirection = I; + var k = function (e) { + var t = e.slidesToShow, + n = e.centerMode, + r = e.rtl, + i = e.centerPadding; + if (n) { + var a = (t - 1) / 2 + 1; + return parseInt(i) > 0 && (a += 1), r && t % 2 === 0 && (a += 1), a; + } + return r ? 0 : t - 1; + }; + t.slidesOnRight = k; + var R = function (e) { + var t = e.slidesToShow, + n = e.centerMode, + r = e.rtl, + i = e.centerPadding; + if (n) { + var a = (t - 1) / 2 + 1; + return parseInt(i) > 0 && (a += 1), r || t % 2 !== 0 || (a += 1), a; + } + return r ? t - 1 : 0; + }; + t.slidesOnLeft = R; + t.canUseDOM = function () { + return !( + "undefined" === typeof window || + !window.document || + !window.document.createElement + ); + }; + }, + 6374: function (e, t, n) { + "use strict"; + var r = n(2791), + i = Symbol.for("react.element"), + a = Symbol.for("react.fragment"), + o = Object.prototype.hasOwnProperty, + s = + r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED + .ReactCurrentOwner, + l = { key: !0, ref: !0, __self: !0, __source: !0 }; + function u(e, t, n) { + var r, + a = {}, + u = null, + c = null; + for (r in (void 0 !== n && (u = "" + n), + void 0 !== t.key && (u = "" + t.key), + void 0 !== t.ref && (c = t.ref), + t)) + o.call(t, r) && !l.hasOwnProperty(r) && (a[r] = t[r]); + if (e && e.defaultProps) + for (r in (t = e.defaultProps)) void 0 === a[r] && (a[r] = t[r]); + return { + $$typeof: i, + type: e, + key: u, + ref: c, + props: a, + _owner: s.current, + }; + } + (t.Fragment = a), (t.jsx = u), (t.jsxs = u); + }, + 9117: function (e, t) { + "use strict"; + var n = Symbol.for("react.element"), + r = Symbol.for("react.portal"), + i = Symbol.for("react.fragment"), + a = Symbol.for("react.strict_mode"), + o = Symbol.for("react.profiler"), + s = Symbol.for("react.provider"), + l = Symbol.for("react.context"), + u = Symbol.for("react.forward_ref"), + c = Symbol.for("react.suspense"), + f = Symbol.for("react.memo"), + d = Symbol.for("react.lazy"), + h = Symbol.iterator; + var p = { + isMounted: function () { + return !1; + }, + enqueueForceUpdate: function () {}, + enqueueReplaceState: function () {}, + enqueueSetState: function () {}, + }, + v = Object.assign, + m = {}; + function g(e, t, n) { + (this.props = e), + (this.context = t), + (this.refs = m), + (this.updater = n || p); + } + function A() {} + function y(e, t, n) { + (this.props = e), + (this.context = t), + (this.refs = m), + (this.updater = n || p); + } + (g.prototype.isReactComponent = {}), + (g.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"); + }), + (g.prototype.forceUpdate = function (e) { + this.updater.enqueueForceUpdate(this, e, "forceUpdate"); + }), + (A.prototype = g.prototype); + var b = (y.prototype = new A()); + (b.constructor = y), v(b, g.prototype), (b.isPureReactComponent = !0); + var x = Array.isArray, + S = Object.prototype.hasOwnProperty, + E = { current: null }, + _ = { key: !0, ref: !0, __self: !0, __source: !0 }; + function C(e, t, r) { + var i, + a = {}, + o = null, + s = null; + if (null != t) + for (i in (void 0 !== t.ref && (s = t.ref), + void 0 !== t.key && (o = "" + t.key), + t)) + S.call(t, i) && !_.hasOwnProperty(i) && (a[i] = t[i]); + var l = arguments.length - 2; + if (1 === l) a.children = r; + else if (1 < l) { + for (var u = Array(l), c = 0; c < l; c++) u[c] = arguments[c + 2]; + a.children = u; + } + if (e && e.defaultProps) + for (i in (l = e.defaultProps)) void 0 === a[i] && (a[i] = l[i]); + return { + $$typeof: n, + type: e, + key: o, + ref: s, + props: a, + _owner: E.current, + }; + } + function w(e) { + return "object" === typeof e && null !== e && e.$$typeof === n; + } + var T = /\/+/g; + function M(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 I(e, t, i, a, o) { + var s = typeof e; + ("undefined" !== s && "boolean" !== s) || (e = null); + var l = !1; + if (null === e) l = !0; + else + switch (s) { + case "string": + case "number": + l = !0; + break; + case "object": + switch (e.$$typeof) { + case n: + case r: + l = !0; + } + } + if (l) + return ( + (o = o((l = e))), + (e = "" === a ? "." + M(l, 0) : a), + x(o) + ? ((i = ""), + null != e && (i = e.replace(T, "$&/") + "/"), + I(o, t, i, "", function (e) { + return e; + })) + : null != o && + (w(o) && + (o = (function (e, t) { + return { + $$typeof: n, + type: e.type, + key: t, + ref: e.ref, + props: e.props, + _owner: e._owner, + }; + })( + o, + i + + (!o.key || (l && l.key === o.key) + ? "" + : ("" + o.key).replace(T, "$&/") + "/") + + e + )), + t.push(o)), + 1 + ); + if (((l = 0), (a = "" === a ? "." : a + ":"), x(e))) + for (var u = 0; u < e.length; u++) { + var c = a + M((s = e[u]), u); + l += I(s, t, i, c, o); + } + else if ( + ((c = (function (e) { + return null === e || "object" !== typeof e + ? null + : "function" === typeof (e = (h && e[h]) || e["@@iterator"]) + ? e + : null; + })(e)), + "function" === typeof c) + ) + for (e = c.call(e), u = 0; !(s = e.next()).done; ) + l += I((s = s.value), t, i, (c = a + M(s, u++)), o); + else if ("object" === s) + 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 k(e, t, n) { + if (null == e) return e; + var r = [], + i = 0; + return ( + I(e, r, "", "", function (e) { + return t.call(n, e, i++); + }), + r + ); + } + function R(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 B = { current: null }, + P = { transition: null }, + L = { + ReactCurrentDispatcher: B, + ReactCurrentBatchConfig: P, + ReactCurrentOwner: E, + }; + (t.Children = { + map: k, + forEach: function (e, t, n) { + k( + e, + function () { + t.apply(this, arguments); + }, + n + ); + }, + count: function (e) { + var t = 0; + return ( + k(e, function () { + t++; + }), + t + ); + }, + toArray: function (e) { + return ( + k(e, function (e) { + return e; + }) || [] + ); + }, + only: function (e) { + if (!w(e)) + throw Error( + "React.Children.only expected to receive a single React element child." + ); + return e; + }, + }), + (t.Component = g), + (t.Fragment = i), + (t.Profiler = o), + (t.PureComponent = y), + (t.StrictMode = a), + (t.Suspense = c), + (t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = L), + (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 = v({}, e.props), + a = e.key, + o = e.ref, + s = e._owner; + if (null != t) { + if ( + (void 0 !== t.ref && ((o = t.ref), (s = E.current)), + void 0 !== t.key && (a = "" + t.key), + e.type && e.type.defaultProps) + ) + var l = e.type.defaultProps; + for (u in t) + S.call(t, u) && + !_.hasOwnProperty(u) && + (i[u] = void 0 === t[u] && void 0 !== l ? l[u] : t[u]); + } + var u = arguments.length - 2; + if (1 === u) i.children = r; + else if (1 < u) { + l = Array(u); + for (var c = 0; c < u; c++) l[c] = arguments[c + 2]; + i.children = l; + } + return { + $$typeof: n, + type: e.type, + key: a, + ref: o, + props: i, + _owner: s, + }; + }), + (t.createContext = function (e) { + return ( + ((e = { + $$typeof: l, + _currentValue: e, + _currentValue2: e, + _threadCount: 0, + Provider: null, + Consumer: null, + _defaultValue: null, + _globalName: null, + }).Provider = { $$typeof: s, _context: e }), + (e.Consumer = e) + ); + }), + (t.createElement = C), + (t.createFactory = function (e) { + var t = C.bind(null, e); + return (t.type = e), t; + }), + (t.createRef = function () { + return { current: null }; + }), + (t.forwardRef = function (e) { + return { $$typeof: u, render: e }; + }), + (t.isValidElement = w), + (t.lazy = function (e) { + return { + $$typeof: d, + _payload: { _status: -1, _result: e }, + _init: R, + }; + }), + (t.memo = function (e, t) { + return { $$typeof: f, type: e, compare: void 0 === t ? null : t }; + }), + (t.startTransition = function (e) { + var t = P.transition; + P.transition = {}; + try { + e(); + } finally { + P.transition = t; + } + }), + (t.unstable_act = function () { + throw Error( + "act(...) is not supported in production builds of React." + ); + }), + (t.useCallback = function (e, t) { + return B.current.useCallback(e, t); + }), + (t.useContext = function (e) { + return B.current.useContext(e); + }), + (t.useDebugValue = function () {}), + (t.useDeferredValue = function (e) { + return B.current.useDeferredValue(e); + }), + (t.useEffect = function (e, t) { + return B.current.useEffect(e, t); + }), + (t.useId = function () { + return B.current.useId(); + }), + (t.useImperativeHandle = function (e, t, n) { + return B.current.useImperativeHandle(e, t, n); + }), + (t.useInsertionEffect = function (e, t) { + return B.current.useInsertionEffect(e, t); + }), + (t.useLayoutEffect = function (e, t) { + return B.current.useLayoutEffect(e, t); + }), + (t.useMemo = function (e, t) { + return B.current.useMemo(e, t); + }), + (t.useReducer = function (e, t, n) { + return B.current.useReducer(e, t, n); + }), + (t.useRef = function (e) { + return B.current.useRef(e); + }), + (t.useState = function (e) { + return B.current.useState(e); + }), + (t.useSyncExternalStore = function (e, t, n) { + return B.current.useSyncExternalStore(e, t, n); + }), + (t.useTransition = function () { + return B.current.useTransition(); + }), + (t.version = "18.2.0"); + }, + 2791: function (e, t, n) { + "use strict"; + e.exports = n(9117); + }, + 184: function (e, t, n) { + "use strict"; + e.exports = n(6374); + }, + 474: function (e, t, n) { + "use strict"; + n.r(t); + var r = (function () { + if ("undefined" !== typeof Map) return Map; + function e(e, t) { + var n = -1; + return ( + e.some(function (e, r) { + return e[0] === t && ((n = r), !0); + }), + n + ); + } + return (function () { + function t() { + this.__entries__ = []; + } + return ( + Object.defineProperty(t.prototype, "size", { + get: function () { + return this.__entries__.length; + }, + enumerable: !0, + configurable: !0, + }), + (t.prototype.get = function (t) { + var n = e(this.__entries__, t), + r = this.__entries__[n]; + return r && r[1]; + }), + (t.prototype.set = function (t, n) { + var r = e(this.__entries__, t); + ~r + ? (this.__entries__[r][1] = n) + : this.__entries__.push([t, n]); + }), + (t.prototype.delete = function (t) { + var n = this.__entries__, + r = e(n, t); + ~r && n.splice(r, 1); + }), + (t.prototype.has = function (t) { + return !!~e(this.__entries__, t); + }), + (t.prototype.clear = function () { + this.__entries__.splice(0); + }), + (t.prototype.forEach = function (e, t) { + void 0 === t && (t = null); + for (var n = 0, r = this.__entries__; n < r.length; n++) { + var i = r[n]; + e.call(t, i[1], i[0]); + } + }), + t + ); + })(); + })(), + i = + "undefined" !== typeof window && + "undefined" !== typeof document && + window.document === document, + a = + "undefined" !== typeof n.g && n.g.Math === Math + ? n.g + : "undefined" !== typeof self && self.Math === Math + ? self + : "undefined" !== typeof window && window.Math === Math + ? window + : Function("return this")(), + o = + "function" === typeof requestAnimationFrame + ? requestAnimationFrame.bind(a) + : function (e) { + return setTimeout(function () { + return e(Date.now()); + }, 1e3 / 60); + }; + var s = [ + "top", + "right", + "bottom", + "left", + "width", + "height", + "size", + "weight", + ], + l = "undefined" !== typeof MutationObserver, + u = (function () { + function e() { + (this.connected_ = !1), + (this.mutationEventsAdded_ = !1), + (this.mutationsObserver_ = null), + (this.observers_ = []), + (this.onTransitionEnd_ = this.onTransitionEnd_.bind(this)), + (this.refresh = (function (e, t) { + var n = !1, + r = !1, + i = 0; + function a() { + n && ((n = !1), e()), r && l(); + } + function s() { + o(a); + } + function l() { + var e = Date.now(); + if (n) { + if (e - i < 2) return; + r = !0; + } else (n = !0), (r = !1), setTimeout(s, t); + i = e; + } + return l; + })(this.refresh.bind(this), 20)); + } + return ( + (e.prototype.addObserver = function (e) { + ~this.observers_.indexOf(e) || this.observers_.push(e), + this.connected_ || this.connect_(); + }), + (e.prototype.removeObserver = function (e) { + var t = this.observers_, + n = t.indexOf(e); + ~n && t.splice(n, 1), + !t.length && this.connected_ && this.disconnect_(); + }), + (e.prototype.refresh = function () { + this.updateObservers_() && this.refresh(); + }), + (e.prototype.updateObservers_ = function () { + var e = this.observers_.filter(function (e) { + return e.gatherActive(), e.hasActive(); + }); + return ( + e.forEach(function (e) { + return e.broadcastActive(); + }), + e.length > 0 + ); + }), + (e.prototype.connect_ = function () { + i && + !this.connected_ && + (document.addEventListener( + "transitionend", + this.onTransitionEnd_ + ), + window.addEventListener("resize", this.refresh), + l + ? ((this.mutationsObserver_ = new MutationObserver( + this.refresh + )), + this.mutationsObserver_.observe(document, { + attributes: !0, + childList: !0, + characterData: !0, + subtree: !0, + })) + : (document.addEventListener( + "DOMSubtreeModified", + this.refresh + ), + (this.mutationEventsAdded_ = !0)), + (this.connected_ = !0)); + }), + (e.prototype.disconnect_ = function () { + i && + this.connected_ && + (document.removeEventListener( + "transitionend", + this.onTransitionEnd_ + ), + window.removeEventListener("resize", this.refresh), + this.mutationsObserver_ && + this.mutationsObserver_.disconnect(), + this.mutationEventsAdded_ && + document.removeEventListener( + "DOMSubtreeModified", + this.refresh + ), + (this.mutationsObserver_ = null), + (this.mutationEventsAdded_ = !1), + (this.connected_ = !1)); + }), + (e.prototype.onTransitionEnd_ = function (e) { + var t = e.propertyName, + n = void 0 === t ? "" : t; + s.some(function (e) { + return !!~n.indexOf(e); + }) && this.refresh(); + }), + (e.getInstance = function () { + return ( + this.instance_ || (this.instance_ = new e()), this.instance_ + ); + }), + (e.instance_ = null), + e + ); + })(), + c = function (e, t) { + for (var n = 0, r = Object.keys(t); n < r.length; n++) { + var i = r[n]; + Object.defineProperty(e, i, { + value: t[i], + enumerable: !1, + writable: !1, + configurable: !0, + }); + } + return e; + }, + f = function (e) { + return (e && e.ownerDocument && e.ownerDocument.defaultView) || a; + }, + d = A(0, 0, 0, 0); + function h(e) { + return parseFloat(e) || 0; + } + function p(e) { + for (var t = [], n = 1; n < arguments.length; n++) + t[n - 1] = arguments[n]; + return t.reduce(function (t, n) { + return t + h(e["border-" + n + "-width"]); + }, 0); + } + function v(e) { + var t = e.clientWidth, + n = e.clientHeight; + if (!t && !n) return d; + var r = f(e).getComputedStyle(e), + i = (function (e) { + for ( + var t = {}, n = 0, r = ["top", "right", "bottom", "left"]; + n < r.length; + n++ + ) { + var i = r[n], + a = e["padding-" + i]; + t[i] = h(a); + } + return t; + })(r), + a = i.left + i.right, + o = i.top + i.bottom, + s = h(r.width), + l = h(r.height); + if ( + ("border-box" === r.boxSizing && + (Math.round(s + a) !== t && (s -= p(r, "left", "right") + a), + Math.round(l + o) !== n && (l -= p(r, "top", "bottom") + o)), + !(function (e) { + return e === f(e).document.documentElement; + })(e)) + ) { + var u = Math.round(s + a) - t, + c = Math.round(l + o) - n; + 1 !== Math.abs(u) && (s -= u), 1 !== Math.abs(c) && (l -= c); + } + return A(i.left, i.top, s, l); + } + var m = + "undefined" !== typeof SVGGraphicsElement + ? function (e) { + return e instanceof f(e).SVGGraphicsElement; + } + : function (e) { + return ( + e instanceof f(e).SVGElement && + "function" === typeof e.getBBox + ); + }; + function g(e) { + return i + ? m(e) + ? (function (e) { + var t = e.getBBox(); + return A(0, 0, t.width, t.height); + })(e) + : v(e) + : d; + } + function A(e, t, n, r) { + return { x: e, y: t, width: n, height: r }; + } + var y = (function () { + function e(e) { + (this.broadcastWidth = 0), + (this.broadcastHeight = 0), + (this.contentRect_ = A(0, 0, 0, 0)), + (this.target = e); + } + return ( + (e.prototype.isActive = function () { + var e = g(this.target); + return ( + (this.contentRect_ = e), + e.width !== this.broadcastWidth || + e.height !== this.broadcastHeight + ); + }), + (e.prototype.broadcastRect = function () { + var e = this.contentRect_; + return ( + (this.broadcastWidth = e.width), + (this.broadcastHeight = e.height), + e + ); + }), + e + ); + })(), + b = function (e, t) { + var n = (function (e) { + var t = e.x, + n = e.y, + r = e.width, + i = e.height, + a = + "undefined" !== typeof DOMRectReadOnly + ? DOMRectReadOnly + : Object, + o = Object.create(a.prototype); + return ( + c(o, { + x: t, + y: n, + width: r, + height: i, + top: n, + right: t + r, + bottom: i + n, + left: t, + }), + o + ); + })(t); + c(this, { target: e, contentRect: n }); + }, + x = (function () { + function e(e, t, n) { + if ( + ((this.activeObservations_ = []), + (this.observations_ = new r()), + "function" !== typeof e) + ) + throw new TypeError( + "The callback provided as parameter 1 is not a function." + ); + (this.callback_ = e), + (this.controller_ = t), + (this.callbackCtx_ = n); + } + return ( + (e.prototype.observe = function (e) { + if (!arguments.length) + throw new TypeError( + "1 argument required, but only 0 present." + ); + if ( + "undefined" !== typeof Element && + Element instanceof Object + ) { + if (!(e instanceof f(e).Element)) + throw new TypeError( + 'parameter 1 is not of type "Element".' + ); + var t = this.observations_; + t.has(e) || + (t.set(e, new y(e)), + this.controller_.addObserver(this), + this.controller_.refresh()); + } + }), + (e.prototype.unobserve = function (e) { + if (!arguments.length) + throw new TypeError( + "1 argument required, but only 0 present." + ); + if ( + "undefined" !== typeof Element && + Element instanceof Object + ) { + if (!(e instanceof f(e).Element)) + throw new TypeError( + 'parameter 1 is not of type "Element".' + ); + var t = this.observations_; + t.has(e) && + (t.delete(e), + t.size || this.controller_.removeObserver(this)); + } + }), + (e.prototype.disconnect = function () { + this.clearActive(), + this.observations_.clear(), + this.controller_.removeObserver(this); + }), + (e.prototype.gatherActive = function () { + var e = this; + this.clearActive(), + this.observations_.forEach(function (t) { + t.isActive() && e.activeObservations_.push(t); + }); + }), + (e.prototype.broadcastActive = function () { + if (this.hasActive()) { + var e = this.callbackCtx_, + t = this.activeObservations_.map(function (e) { + return new b(e.target, e.broadcastRect()); + }); + this.callback_.call(e, t, e), this.clearActive(); + } + }), + (e.prototype.clearActive = function () { + this.activeObservations_.splice(0); + }), + (e.prototype.hasActive = function () { + return this.activeObservations_.length > 0; + }), + e + ); + })(), + S = "undefined" !== typeof WeakMap ? new WeakMap() : new r(), + E = function e(t) { + if (!(this instanceof e)) + throw new TypeError("Cannot call a class as a function."); + if (!arguments.length) + throw new TypeError("1 argument required, but only 0 present."); + var n = u.getInstance(), + r = new x(t, n, this); + S.set(this, r); + }; + ["observe", "unobserve", "disconnect"].forEach(function (e) { + E.prototype[e] = function () { + var t; + return (t = S.get(this))[e].apply(t, arguments); + }; + }); + var _ = "undefined" !== typeof a.ResizeObserver ? a.ResizeObserver : E; + t.default = _; + }, + 6813: function (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 < a(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, o = i >>> 1; r < o; ) { + var s = 2 * (r + 1) - 1, + l = e[s], + u = s + 1, + c = e[u]; + if (0 > a(l, n)) + u < i && 0 > a(c, l) + ? ((e[r] = c), (e[u] = n), (r = u)) + : ((e[r] = l), (e[s] = n), (r = s)); + else { + if (!(u < i && 0 > a(c, n))) break e; + (e[r] = c), (e[u] = n), (r = u); + } + } + } + return t; + } + function a(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 o = performance; + t.unstable_now = function () { + return o.now(); + }; + } else { + var s = Date, + l = s.now(); + t.unstable_now = function () { + return s.now() - l; + }; + } + var u = [], + c = [], + f = 1, + d = null, + h = 3, + p = !1, + v = !1, + m = !1, + g = "function" === typeof setTimeout ? setTimeout : null, + A = "function" === typeof clearTimeout ? clearTimeout : null, + y = "undefined" !== typeof setImmediate ? setImmediate : null; + function b(e) { + for (var t = r(c); null !== t; ) { + if (null === t.callback) i(c); + else { + if (!(t.startTime <= e)) break; + i(c), (t.sortIndex = t.expirationTime), n(u, t); + } + t = r(c); + } + } + function x(e) { + if (((m = !1), b(e), !v)) + if (null !== r(u)) (v = !0), P(S); + else { + var t = r(c); + null !== t && L(x, t.startTime - e); + } + } + function S(e, n) { + (v = !1), m && ((m = !1), A(w), (w = -1)), (p = !0); + var a = h; + try { + for ( + b(n), d = r(u); + null !== d && (!(d.expirationTime > n) || (e && !I())); + + ) { + var o = d.callback; + if ("function" === typeof o) { + (d.callback = null), (h = d.priorityLevel); + var s = o(d.expirationTime <= n); + (n = t.unstable_now()), + "function" === typeof s + ? (d.callback = s) + : d === r(u) && i(u), + b(n); + } else i(u); + d = r(u); + } + if (null !== d) var l = !0; + else { + var f = r(c); + null !== f && L(x, f.startTime - n), (l = !1); + } + return l; + } finally { + (d = null), (h = a), (p = !1); + } + } + "undefined" !== typeof navigator && + void 0 !== navigator.scheduling && + void 0 !== navigator.scheduling.isInputPending && + navigator.scheduling.isInputPending.bind(navigator.scheduling); + var E, + _ = !1, + C = null, + w = -1, + T = 5, + M = -1; + function I() { + return !(t.unstable_now() - M < T); + } + function k() { + if (null !== C) { + var e = t.unstable_now(); + M = e; + var n = !0; + try { + n = C(!0, e); + } finally { + n ? E() : ((_ = !1), (C = null)); + } + } else _ = !1; + } + if ("function" === typeof y) + E = function () { + y(k); + }; + else if ("undefined" !== typeof MessageChannel) { + var R = new MessageChannel(), + B = R.port2; + (R.port1.onmessage = k), + (E = function () { + B.postMessage(null); + }); + } else + E = function () { + g(k, 0); + }; + function P(e) { + (C = e), _ || ((_ = !0), E()); + } + function L(e, n) { + w = g(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 () { + v || p || ((v = !0), P(S)); + }), + (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" + ) + : (T = 0 < e ? Math.floor(1e3 / e) : 5); + }), + (t.unstable_getCurrentPriorityLevel = function () { + return h; + }), + (t.unstable_getFirstCallbackNode = function () { + return r(u); + }), + (t.unstable_next = function (e) { + switch (h) { + case 1: + case 2: + case 3: + var t = 3; + break; + default: + t = h; + } + var n = h; + h = t; + try { + return e(); + } finally { + h = 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 = h; + h = e; + try { + return t(); + } finally { + h = n; + } + }), + (t.unstable_scheduleCallback = function (e, i, a) { + var o = t.unstable_now(); + switch ( + ("object" === typeof a && null !== a + ? (a = "number" === typeof (a = a.delay) && 0 < a ? o + a : o) + : (a = o), + e) + ) { + case 1: + var s = -1; + break; + case 2: + s = 250; + break; + case 5: + s = 1073741823; + break; + case 4: + s = 1e4; + break; + default: + s = 5e3; + } + return ( + (e = { + id: f++, + callback: i, + priorityLevel: e, + startTime: a, + expirationTime: (s = a + s), + sortIndex: -1, + }), + a > o + ? ((e.sortIndex = a), + n(c, e), + null === r(u) && + e === r(c) && + (m ? (A(w), (w = -1)) : (m = !0), L(x, a - o))) + : ((e.sortIndex = s), n(u, e), v || p || ((v = !0), P(S))), + e + ); + }), + (t.unstable_shouldYield = I), + (t.unstable_wrapCallback = function (e) { + var t = h; + return function () { + var n = h; + h = t; + try { + return e.apply(this, arguments); + } finally { + h = n; + } + }; + }); + }, + 5296: function (e, t, n) { + "use strict"; + e.exports = n(6813); + }, + 9613: function (e) { + e.exports = function (e, t, n, r) { + var i = n ? n.call(r, e, t) : void 0; + if (void 0 !== i) return !!i; + if (e === t) return !0; + if ("object" !== typeof e || !e || "object" !== typeof t || !t) + return !1; + var a = Object.keys(e), + o = Object.keys(t); + if (a.length !== o.length) return !1; + for ( + var s = Object.prototype.hasOwnProperty.bind(t), l = 0; + l < a.length; + l++ + ) { + var u = a[l]; + if (!s(u)) return !1; + var c = e[u], + f = t[u]; + if ( + !1 === (i = n ? n.call(r, c, f, u) : void 0) || + (void 0 === i && c !== f) + ) + return !1; + } + return !0; + }; + }, + 2806: function (e) { + e.exports = function (e) { + return e + .replace(/[A-Z]/g, function (e) { + return "-" + e.toLowerCase(); + }) + .toLowerCase(); + }; + }, + 1561: function (e, t, n) { + "use strict"; + var r = n(2791); + var i = + "function" === typeof Object.is + ? Object.is + : function (e, t) { + return ( + (e === t && (0 !== e || 1 / e === 1 / t)) || + (e !== e && t !== t) + ); + }, + a = r.useState, + o = r.useEffect, + s = r.useLayoutEffect, + l = r.useDebugValue; + function u(e) { + var t = e.getSnapshot; + e = e.value; + try { + var n = t(); + return !i(e, n); + } catch (r) { + return !0; + } + } + var c = + "undefined" === typeof window || + "undefined" === typeof window.document || + "undefined" === typeof window.document.createElement + ? function (e, t) { + return t(); + } + : function (e, t) { + var n = t(), + r = a({ inst: { value: n, getSnapshot: t } }), + i = r[0].inst, + c = r[1]; + return ( + s( + function () { + (i.value = n), + (i.getSnapshot = t), + u(i) && c({ inst: i }); + }, + [e, n, t] + ), + o( + function () { + return ( + u(i) && c({ inst: i }), + e(function () { + u(i) && c({ inst: i }); + }) + ); + }, + [e] + ), + l(n), + n + ); + }; + t.useSyncExternalStore = + void 0 !== r.useSyncExternalStore ? r.useSyncExternalStore : c; + }, + 7595: function (e, t, n) { + "use strict"; + var r = n(2791), + i = n(7248); + var a = + "function" === typeof Object.is + ? Object.is + : function (e, t) { + return ( + (e === t && (0 !== e || 1 / e === 1 / t)) || + (e !== e && t !== t) + ); + }, + o = i.useSyncExternalStore, + s = r.useRef, + l = r.useEffect, + u = r.useMemo, + c = r.useDebugValue; + t.useSyncExternalStoreWithSelector = function (e, t, n, r, i) { + var f = s(null); + if (null === f.current) { + var d = { hasValue: !1, value: null }; + f.current = d; + } else d = f.current; + f = u( + function () { + function e(e) { + if (!l) { + if ( + ((l = !0), (o = e), (e = r(e)), void 0 !== i && d.hasValue) + ) { + var t = d.value; + if (i(t, e)) return (s = t); + } + return (s = e); + } + if (((t = s), a(o, e))) return t; + var n = r(e); + return void 0 !== i && i(t, n) ? t : ((o = e), (s = n)); + } + var o, + s, + l = !1, + u = void 0 === n ? null : n; + return [ + function () { + return e(t()); + }, + null === u + ? void 0 + : function () { + return e(u()); + }, + ]; + }, + [t, n, r, i] + ); + var h = o(e, f[0], f[1]); + return ( + l( + function () { + (d.hasValue = !0), (d.value = h); + }, + [h] + ), + c(h), + h + ); + }; + }, + 7248: function (e, t, n) { + "use strict"; + e.exports = n(1561); + }, + 327: function (e, t, n) { + "use strict"; + e.exports = n(7595); + }, + 7864: function (e, t, n) { + "use strict"; + n.d(t, { + L: function () { + return u; + }, + }); + var r, + i, + a, + o = n(5671), + s = n(3144), + l = { + env: { + emscripten_notify_memory_growth: function (e) { + a = new Uint8Array(i.exports.memory.buffer); + }, + }, + }, + u = (function () { + function e() { + (0, o.Z)(this, e); + } + return ( + (0, s.Z)(e, [ + { + key: "init", + value: function () { + return ( + r || + (r = + "undefined" != typeof fetch + ? fetch("data:application/wasm;base64," + c) + .then(function (e) { + return e.arrayBuffer(); + }) + .then(function (e) { + return WebAssembly.instantiate(e, l); + }) + .then(this._init) + : WebAssembly.instantiate( + Buffer.from(c, "base64"), + l + ).then(this._init)) + ); + }, + }, + { + key: "_init", + value: function (e) { + (i = e.instance), l.env.emscripten_notify_memory_growth(0); + }, + }, + { + key: "decode", + value: function (e) { + var t = + arguments.length > 1 && void 0 !== arguments[1] + ? arguments[1] + : 0; + if (!i) + throw new Error( + "ZSTDDecoder: Await .init() before decoding." + ); + var n = e.byteLength, + r = i.exports.malloc(n); + a.set(e, r), + (t = + t || Number(i.exports.ZSTD_findDecompressedSize(r, n))); + var o = i.exports.malloc(t), + s = i.exports.ZSTD_decompress(o, t, r, n), + l = a.slice(o, o + s); + return i.exports.free(r), i.exports.free(o), l; + }, + }, + ]), + e + ); + })(), + c = + "AGFzbQEAAAABpQEVYAF/AX9gAn9/AGADf39/AX9gBX9/f39/AX9gAX8AYAJ/fwF/YAR/f39/AX9gA39/fwBgBn9/f39/fwF/YAd/f39/f39/AX9gAn9/AX5gAn5+AX5gAABgBX9/f39/AGAGf39/f39/AGAIf39/f39/f38AYAl/f39/f39/f38AYAABf2AIf39/f39/f38Bf2ANf39/f39/f39/f39/fwF/YAF/AX4CJwEDZW52H2Vtc2NyaXB0ZW5fbm90aWZ5X21lbW9yeV9ncm93dGgABANpaAEFAAAFAgEFCwACAQABAgIFBQcAAwABDgsBAQcAEhMHAAUBDAQEAAANBwQCAgYCBAgDAwMDBgEACQkHBgICAAYGAgQUBwYGAwIGAAMCAQgBBwUGCgoEEQAEBAEIAwgDBQgDEA8IAAcABAUBcAECAgUEAQCAAgYJAX8BQaCgwAILB2AHBm1lbW9yeQIABm1hbGxvYwAoBGZyZWUAJgxaU1REX2lzRXJyb3IAaBlaU1REX2ZpbmREZWNvbXByZXNzZWRTaXplAFQPWlNURF9kZWNvbXByZXNzAEoGX3N0YXJ0ACQJBwEAQQELASQKussBaA8AIAAgACgCBCABajYCBAsZACAAKAIAIAAoAgRBH3F0QQAgAWtBH3F2CwgAIABBiH9LC34BBH9BAyEBIAAoAgQiA0EgTQRAIAAoAggiASAAKAIQTwRAIAAQDQ8LIAAoAgwiAiABRgRAQQFBAiADQSBJGw8LIAAgASABIAJrIANBA3YiBCABIARrIAJJIgEbIgJrIgQ2AgggACADIAJBA3RrNgIEIAAgBCgAADYCAAsgAQsUAQF/IAAgARACIQIgACABEAEgAgv3AQECfyACRQRAIABCADcCACAAQQA2AhAgAEIANwIIQbh/DwsgACABNgIMIAAgAUEEajYCECACQQRPBEAgACABIAJqIgFBfGoiAzYCCCAAIAMoAAA2AgAgAUF/ai0AACIBBEAgAEEIIAEQFGs2AgQgAg8LIABBADYCBEF/DwsgACABNgIIIAAgAS0AACIDNgIAIAJBfmoiBEEBTQRAIARBAWtFBEAgACABLQACQRB0IANyIgM2AgALIAAgAS0AAUEIdCADajYCAAsgASACakF/ai0AACIBRQRAIABBADYCBEFsDwsgAEEoIAEQFCACQQN0ams2AgQgAgsWACAAIAEpAAA3AAAgACABKQAINwAICy8BAX8gAUECdEGgHWooAgAgACgCAEEgIAEgACgCBGprQR9xdnEhAiAAIAEQASACCyEAIAFCz9bTvtLHq9lCfiAAfEIfiUKHla+vmLbem55/fgsdAQF/IAAoAgggACgCDEYEfyAAKAIEQSBGBUEACwuCBAEDfyACQYDAAE8EQCAAIAEgAhBnIAAPCyAAIAJqIQMCQCAAIAFzQQNxRQRAAkAgAkEBSARAIAAhAgwBCyAAQQNxRQRAIAAhAgwBCyAAIQIDQCACIAEtAAA6AAAgAUEBaiEBIAJBAWoiAiADTw0BIAJBA3ENAAsLAkAgA0F8cSIEQcAASQ0AIAIgBEFAaiIFSw0AA0AgAiABKAIANgIAIAIgASgCBDYCBCACIAEoAgg2AgggAiABKAIMNgIMIAIgASgCEDYCECACIAEoAhQ2AhQgAiABKAIYNgIYIAIgASgCHDYCHCACIAEoAiA2AiAgAiABKAIkNgIkIAIgASgCKDYCKCACIAEoAiw2AiwgAiABKAIwNgIwIAIgASgCNDYCNCACIAEoAjg2AjggAiABKAI8NgI8IAFBQGshASACQUBrIgIgBU0NAAsLIAIgBE8NAQNAIAIgASgCADYCACABQQRqIQEgAkEEaiICIARJDQALDAELIANBBEkEQCAAIQIMAQsgA0F8aiIEIABJBEAgACECDAELIAAhAgNAIAIgAS0AADoAACACIAEtAAE6AAEgAiABLQACOgACIAIgAS0AAzoAAyABQQRqIQEgAkEEaiICIARNDQALCyACIANJBEADQCACIAEtAAA6AAAgAUEBaiEBIAJBAWoiAiADRw0ACwsgAAsMACAAIAEpAAA3AAALQQECfyAAKAIIIgEgACgCEEkEQEEDDwsgACAAKAIEIgJBB3E2AgQgACABIAJBA3ZrIgE2AgggACABKAAANgIAQQALDAAgACABKAIANgAAC/cCAQJ/AkAgACABRg0AAkAgASACaiAASwRAIAAgAmoiBCABSw0BCyAAIAEgAhALDwsgACABc0EDcSEDAkACQCAAIAFJBEAgAwRAIAAhAwwDCyAAQQNxRQRAIAAhAwwCCyAAIQMDQCACRQ0EIAMgAS0AADoAACABQQFqIQEgAkF/aiECIANBAWoiA0EDcQ0ACwwBCwJAIAMNACAEQQNxBEADQCACRQ0FIAAgAkF/aiICaiIDIAEgAmotAAA6AAAgA0EDcQ0ACwsgAkEDTQ0AA0AgACACQXxqIgJqIAEgAmooAgA2AgAgAkEDSw0ACwsgAkUNAgNAIAAgAkF/aiICaiABIAJqLQAAOgAAIAINAAsMAgsgAkEDTQ0AIAIhBANAIAMgASgCADYCACABQQRqIQEgA0EEaiEDIARBfGoiBEEDSw0ACyACQQNxIQILIAJFDQADQCADIAEtAAA6AAAgA0EBaiEDIAFBAWohASACQX9qIgINAAsLIAAL8wICAn8BfgJAIAJFDQAgACACaiIDQX9qIAE6AAAgACABOgAAIAJBA0kNACADQX5qIAE6AAAgACABOgABIANBfWogAToAACAAIAE6AAIgAkEHSQ0AIANBfGogAToAACAAIAE6AAMgAkEJSQ0AIABBACAAa0EDcSIEaiIDIAFB/wFxQYGChAhsIgE2AgAgAyACIARrQXxxIgRqIgJBfGogATYCACAEQQlJDQAgAyABNgIIIAMgATYCBCACQXhqIAE2AgAgAkF0aiABNgIAIARBGUkNACADIAE2AhggAyABNgIUIAMgATYCECADIAE2AgwgAkFwaiABNgIAIAJBbGogATYCACACQWhqIAE2AgAgAkFkaiABNgIAIAQgA0EEcUEYciIEayICQSBJDQAgAa0iBUIghiAFhCEFIAMgBGohAQNAIAEgBTcDGCABIAU3AxAgASAFNwMIIAEgBTcDACABQSBqIQEgAkFgaiICQR9LDQALCyAACy8BAn8gACgCBCAAKAIAQQJ0aiICLQACIQMgACACLwEAIAEgAi0AAxAIajYCACADCy8BAn8gACgCBCAAKAIAQQJ0aiICLQACIQMgACACLwEAIAEgAi0AAxAFajYCACADCx8AIAAgASACKAIEEAg2AgAgARAEGiAAIAJBCGo2AgQLCAAgAGdBH3MLugUBDX8jAEEQayIKJAACfyAEQQNNBEAgCkEANgIMIApBDGogAyAEEAsaIAAgASACIApBDGpBBBAVIgBBbCAAEAMbIAAgACAESxsMAQsgAEEAIAEoAgBBAXRBAmoQECENQVQgAygAACIGQQ9xIgBBCksNABogAiAAQQVqNgIAIAMgBGoiAkF8aiEMIAJBeWohDiACQXtqIRAgAEEGaiELQQQhBSAGQQR2IQRBICAAdCIAQQFyIQkgASgCACEPQQAhAiADIQYCQANAIAlBAkggAiAPS3JFBEAgAiEHAkAgCARAA0AgBEH//wNxQf//A0YEQCAHQRhqIQcgBiAQSQR/IAZBAmoiBigAACAFdgUgBUEQaiEFIARBEHYLIQQMAQsLA0AgBEEDcSIIQQNGBEAgBUECaiEFIARBAnYhBCAHQQNqIQcMAQsLIAcgCGoiByAPSw0EIAVBAmohBQNAIAIgB0kEQCANIAJBAXRqQQA7AQAgAkEBaiECDAELCyAGIA5LQQAgBiAFQQN1aiIHIAxLG0UEQCAHKAAAIAVBB3EiBXYhBAwCCyAEQQJ2IQQLIAYhBwsCfyALQX9qIAQgAEF/anEiBiAAQQF0QX9qIgggCWsiEUkNABogBCAIcSIEQQAgESAEIABIG2shBiALCyEIIA0gAkEBdGogBkF/aiIEOwEAIAlBASAGayAEIAZBAUgbayEJA0AgCSAASARAIABBAXUhACALQX9qIQsMAQsLAn8gByAOS0EAIAcgBSAIaiIFQQN1aiIGIAxLG0UEQCAFQQdxDAELIAUgDCIGIAdrQQN0awshBSACQQFqIQIgBEUhCCAGKAAAIAVBH3F2IQQMAQsLQWwgCUEBRyAFQSBKcg0BGiABIAJBf2o2AgAgBiAFQQdqQQN1aiADawwBC0FQCyEAIApBEGokACAACwkAQQFBBSAAGwsMACAAIAEoAAA2AAALqgMBCn8jAEHwAGsiCiQAIAJBAWohDiAAQQhqIQtBgIAEIAVBf2p0QRB1IQxBACECQQEhBkEBIAV0IglBf2oiDyEIA0AgAiAORkUEQAJAIAEgAkEBdCINai8BACIHQf//A0YEQCALIAhBA3RqIAI2AgQgCEF/aiEIQQEhBwwBCyAGQQAgDCAHQRB0QRB1ShshBgsgCiANaiAHOwEAIAJBAWohAgwBCwsgACAFNgIEIAAgBjYCACAJQQN2IAlBAXZqQQNqIQxBACEAQQAhBkEAIQIDQCAGIA5GBEADQAJAIAAgCUYNACAKIAsgAEEDdGoiASgCBCIGQQF0aiICIAIvAQAiAkEBajsBACABIAUgAhAUayIIOgADIAEgAiAIQf8BcXQgCWs7AQAgASAEIAZBAnQiAmooAgA6AAIgASACIANqKAIANgIEIABBAWohAAwBCwsFIAEgBkEBdGouAQAhDUEAIQcDQCAHIA1ORQRAIAsgAkEDdGogBjYCBANAIAIgDGogD3EiAiAISw0ACyAHQQFqIQcMAQsLIAZBAWohBgwBCwsgCkHwAGokAAsjAEIAIAEQCSAAhUKHla+vmLbem55/fkLj3MqV/M7y9YV/fAsQACAAQn43AwggACABNgIACyQBAX8gAARAIAEoAgQiAgRAIAEoAgggACACEQEADwsgABAmCwsfACAAIAEgAi8BABAINgIAIAEQBBogACACQQRqNgIEC0oBAX9BoCAoAgAiASAAaiIAQX9MBEBBiCBBMDYCAEF/DwsCQCAAPwBBEHRNDQAgABBmDQBBiCBBMDYCAEF/DwtBoCAgADYCACABC9cBAQh/Qbp/IQoCQCACKAIEIgggAigCACIJaiIOIAEgAGtLDQBBbCEKIAkgBCADKAIAIgtrSw0AIAAgCWoiBCACKAIIIgxrIQ0gACABQWBqIg8gCyAJQQAQKSADIAkgC2o2AgACQAJAIAwgBCAFa00EQCANIQUMAQsgDCAEIAZrSw0CIAcgDSAFayIAaiIBIAhqIAdNBEAgBCABIAgQDxoMAgsgBCABQQAgAGsQDyEBIAIgACAIaiIINgIEIAEgAGshBAsgBCAPIAUgCEEBECkLIA4hCgsgCgubAgEBfyMAQYABayINJAAgDSADNgJ8AkAgAkEDSwRAQX8hCQwBCwJAAkACQAJAIAJBAWsOAwADAgELIAZFBEBBuH8hCQwEC0FsIQkgBS0AACICIANLDQMgACAHIAJBAnQiAmooAgAgAiAIaigCABA7IAEgADYCAEEBIQkMAwsgASAJNgIAQQAhCQwCCyAKRQRAQWwhCQwCC0EAIQkgC0UgDEEZSHINAUEIIAR0QQhqIQBBACECA0AgAiAATw0CIAJBQGshAgwAAAsAC0FsIQkgDSANQfwAaiANQfgAaiAFIAYQFSICEAMNACANKAJ4IgMgBEsNACAAIA0gDSgCfCAHIAggAxAYIAEgADYCACACIQkLIA1BgAFqJAAgCQsLACAAIAEgAhALGgsQACAALwAAIAAtAAJBEHRyCy8AAn9BuH8gAUEISQ0AGkFyIAAoAAQiAEF3Sw0AGkG4fyAAQQhqIgAgACABSxsLCwkAIAAgATsAAAsDAAELigYBBX8gACAAKAIAIgVBfnE2AgBBACAAIAVBAXZqQYQgKAIAIgQgAEYbIQECQAJAIAAoAgQiAkUNACACKAIAIgNBAXENACACQQhqIgUgA0EBdkF4aiIDQQggA0EISxtnQR9zQQJ0QYAfaiIDKAIARgRAIAMgAigCDDYCAAsgAigCCCIDBEAgAyACKAIMNgIECyACKAIMIgMEQCADIAIoAgg2AgALIAIgAigCACAAKAIAQX5xajYCAEGEICEAAkACQCABRQ0AIAEgAjYCBCABKAIAIgNBAXENASADQQF2QXhqIgNBCCADQQhLG2dBH3NBAnRBgB9qIgMoAgAgAUEIakYEQCADIAEoAgw2AgALIAEoAggiAwRAIAMgASgCDDYCBAsgASgCDCIDBEAgAyABKAIINgIAQYQgKAIAIQQLIAIgAigCACABKAIAQX5xajYCACABIARGDQAgASABKAIAQQF2akEEaiEACyAAIAI2AgALIAIoAgBBAXZBeGoiAEEIIABBCEsbZ0Efc0ECdEGAH2oiASgCACEAIAEgBTYCACACIAA2AgwgAkEANgIIIABFDQEgACAFNgIADwsCQCABRQ0AIAEoAgAiAkEBcQ0AIAJBAXZBeGoiAkEIIAJBCEsbZ0Efc0ECdEGAH2oiAigCACABQQhqRgRAIAIgASgCDDYCAAsgASgCCCICBEAgAiABKAIMNgIECyABKAIMIgIEQCACIAEoAgg2AgBBhCAoAgAhBAsgACAAKAIAIAEoAgBBfnFqIgI2AgACQCABIARHBEAgASABKAIAQQF2aiAANgIEIAAoAgAhAgwBC0GEICAANgIACyACQQF2QXhqIgFBCCABQQhLG2dBH3NBAnRBgB9qIgIoAgAhASACIABBCGoiAjYCACAAIAE2AgwgAEEANgIIIAFFDQEgASACNgIADwsgBUEBdkF4aiIBQQggAUEISxtnQR9zQQJ0QYAfaiICKAIAIQEgAiAAQQhqIgI2AgAgACABNgIMIABBADYCCCABRQ0AIAEgAjYCAAsLDgAgAARAIABBeGoQJQsLgAIBA38CQCAAQQ9qQXhxQYQgKAIAKAIAQQF2ayICEB1Bf0YNAAJAQYQgKAIAIgAoAgAiAUEBcQ0AIAFBAXZBeGoiAUEIIAFBCEsbZ0Efc0ECdEGAH2oiASgCACAAQQhqRgRAIAEgACgCDDYCAAsgACgCCCIBBEAgASAAKAIMNgIECyAAKAIMIgFFDQAgASAAKAIINgIAC0EBIQEgACAAKAIAIAJBAXRqIgI2AgAgAkEBcQ0AIAJBAXZBeGoiAkEIIAJBCEsbZ0Efc0ECdEGAH2oiAygCACECIAMgAEEIaiIDNgIAIAAgAjYCDCAAQQA2AgggAkUNACACIAM2AgALIAELtwIBA38CQAJAIABBASAAGyICEDgiAA0AAkACQEGEICgCACIARQ0AIAAoAgAiA0EBcQ0AIAAgA0EBcjYCACADQQF2QXhqIgFBCCABQQhLG2dBH3NBAnRBgB9qIgEoAgAgAEEIakYEQCABIAAoAgw2AgALIAAoAggiAQRAIAEgACgCDDYCBAsgACgCDCIBBEAgASAAKAIINgIACyACECchAkEAIQFBhCAoAgAhACACDQEgACAAKAIAQX5xNgIAQQAPCyACQQ9qQXhxIgMQHSICQX9GDQIgAkEHakF4cSIAIAJHBEAgACACaxAdQX9GDQMLAkBBhCAoAgAiAUUEQEGAICAANgIADAELIAAgATYCBAtBhCAgADYCACAAIANBAXRBAXI2AgAMAQsgAEUNAQsgAEEIaiEBCyABC7kDAQJ/IAAgA2ohBQJAIANBB0wEQANAIAAgBU8NAiAAIAItAAA6AAAgAEEBaiEAIAJBAWohAgwAAAsACyAEQQFGBEACQCAAIAJrIgZBB00EQCAAIAItAAA6AAAgACACLQABOgABIAAgAi0AAjoAAiAAIAItAAM6AAMgAEEEaiACIAZBAnQiBkHAHmooAgBqIgIQFyACIAZB4B5qKAIAayECDAELIAAgAhAMCyACQQhqIQIgAEEIaiEACwJAAkACQAJAIAUgAU0EQCAAIANqIQEgBEEBRyAAIAJrQQ9Kcg0BA0AgACACEAwgAkEIaiECIABBCGoiACABSQ0ACwwFCyAAIAFLBEAgACEBDAQLIARBAUcgACACa0EPSnINASAAIQMgAiEEA0AgAyAEEAwgBEEIaiEEIANBCGoiAyABSQ0ACwwCCwNAIAAgAhAHIAJBEGohAiAAQRBqIgAgAUkNAAsMAwsgACEDIAIhBANAIAMgBBAHIARBEGohBCADQRBqIgMgAUkNAAsLIAIgASAAa2ohAgsDQCABIAVPDQEgASACLQAAOgAAIAFBAWohASACQQFqIQIMAAALAAsLQQECfyAAIAAoArjgASIDNgLE4AEgACgCvOABIQQgACABNgK84AEgACABIAJqNgK44AEgACABIAQgA2tqNgLA4AELpgEBAX8gACAAKALs4QEQFjYCyOABIABCADcD+OABIABCADcDuOABIABBwOABakIANwMAIABBqNAAaiIBQYyAgOAANgIAIABBADYCmOIBIABCADcDiOEBIABCAzcDgOEBIABBrNABakHgEikCADcCACAAQbTQAWpB6BIoAgA2AgAgACABNgIMIAAgAEGYIGo2AgggACAAQaAwajYCBCAAIABBEGo2AgALYQEBf0G4fyEDAkAgAUEDSQ0AIAIgABAhIgFBA3YiADYCCCACIAFBAXE2AgQgAiABQQF2QQNxIgM2AgACQCADQX9qIgFBAksNAAJAIAFBAWsOAgEAAgtBbA8LIAAhAwsgAwsMACAAIAEgAkEAEC4LiAQCA38CfiADEBYhBCAAQQBBKBAQIQAgBCACSwRAIAQPCyABRQRAQX8PCwJAAkAgA0EBRg0AIAEoAAAiBkGo6r5pRg0AQXYhAyAGQXBxQdDUtMIBRw0BQQghAyACQQhJDQEgAEEAQSgQECEAIAEoAAQhASAAQQE2AhQgACABrTcDAEEADwsgASACIAMQLyIDIAJLDQAgACADNgIYQXIhAyABIARqIgVBf2otAAAiAkEIcQ0AIAJBIHEiBkUEQEFwIQMgBS0AACIFQacBSw0BIAVBB3GtQgEgBUEDdkEKaq2GIgdCA4h+IAd8IQggBEEBaiEECyACQQZ2IQMgAkECdiEFAkAgAkEDcUF/aiICQQJLBEBBACECDAELAkACQAJAIAJBAWsOAgECAAsgASAEai0AACECIARBAWohBAwCCyABIARqLwAAIQIgBEECaiEEDAELIAEgBGooAAAhAiAEQQRqIQQLIAVBAXEhBQJ+AkACQAJAIANBf2oiA0ECTQRAIANBAWsOAgIDAQtCfyAGRQ0DGiABIARqMQAADAMLIAEgBGovAACtQoACfAwCCyABIARqKAAArQwBCyABIARqKQAACyEHIAAgBTYCICAAIAI2AhwgACAHNwMAQQAhAyAAQQA2AhQgACAHIAggBhsiBzcDCCAAIAdCgIAIIAdCgIAIVBs+AhALIAMLWwEBf0G4fyEDIAIQFiICIAFNBH8gACACakF/ai0AACIAQQNxQQJ0QaAeaigCACACaiAAQQZ2IgFBAnRBsB5qKAIAaiAAQSBxIgBFaiABRSAAQQV2cWoFQbh/CwsdACAAKAKQ4gEQWiAAQQA2AqDiASAAQgA3A5DiAQu1AwEFfyMAQZACayIKJABBuH8hBgJAIAVFDQAgBCwAACIIQf8BcSEHAkAgCEF/TARAIAdBgn9qQQF2IgggBU8NAkFsIQYgB0GBf2oiBUGAAk8NAiAEQQFqIQdBACEGA0AgBiAFTwRAIAUhBiAIIQcMAwUgACAGaiAHIAZBAXZqIgQtAABBBHY6AAAgACAGQQFyaiAELQAAQQ9xOgAAIAZBAmohBgwBCwAACwALIAcgBU8NASAAIARBAWogByAKEFMiBhADDQELIAYhBEEAIQYgAUEAQTQQECEJQQAhBQNAIAQgBkcEQCAAIAZqIggtAAAiAUELSwRAQWwhBgwDBSAJIAFBAnRqIgEgASgCAEEBajYCACAGQQFqIQZBASAILQAAdEEBdSAFaiEFDAILAAsLQWwhBiAFRQ0AIAUQFEEBaiIBQQxLDQAgAyABNgIAQQFBASABdCAFayIDEBQiAXQgA0cNACAAIARqIAFBAWoiADoAACAJIABBAnRqIgAgACgCAEEBajYCACAJKAIEIgBBAkkgAEEBcXINACACIARBAWo2AgAgB0EBaiEGCyAKQZACaiQAIAYLxhEBDH8jAEHwAGsiBSQAQWwhCwJAIANBCkkNACACLwAAIQogAi8AAiEJIAIvAAQhByAFQQhqIAQQDgJAIAMgByAJIApqakEGaiIMSQ0AIAUtAAohCCAFQdgAaiACQQZqIgIgChAGIgsQAw0BIAVBQGsgAiAKaiICIAkQBiILEAMNASAFQShqIAIgCWoiAiAHEAYiCxADDQEgBUEQaiACIAdqIAMgDGsQBiILEAMNASAAIAFqIg9BfWohECAEQQRqIQZBASELIAAgAUEDakECdiIDaiIMIANqIgIgA2oiDiEDIAIhBCAMIQcDQCALIAMgEElxBEAgACAGIAVB2ABqIAgQAkECdGoiCS8BADsAACAFQdgAaiAJLQACEAEgCS0AAyELIAcgBiAFQUBrIAgQAkECdGoiCS8BADsAACAFQUBrIAktAAIQASAJLQADIQogBCAGIAVBKGogCBACQQJ0aiIJLwEAOwAAIAVBKGogCS0AAhABIAktAAMhCSADIAYgBUEQaiAIEAJBAnRqIg0vAQA7AAAgBUEQaiANLQACEAEgDS0AAyENIAAgC2oiCyAGIAVB2ABqIAgQAkECdGoiAC8BADsAACAFQdgAaiAALQACEAEgAC0AAyEAIAcgCmoiCiAGIAVBQGsgCBACQQJ0aiIHLwEAOwAAIAVBQGsgBy0AAhABIActAAMhByAEIAlqIgkgBiAFQShqIAgQAkECdGoiBC8BADsAACAFQShqIAQtAAIQASAELQADIQQgAyANaiIDIAYgBUEQaiAIEAJBAnRqIg0vAQA7AAAgBUEQaiANLQACEAEgACALaiEAIAcgCmohByAEIAlqIQQgAyANLQADaiEDIAVB2ABqEA0gBUFAaxANciAFQShqEA1yIAVBEGoQDXJFIQsMAQsLIAQgDksgByACS3INAEFsIQsgACAMSw0BIAxBfWohCQNAQQAgACAJSSAFQdgAahAEGwRAIAAgBiAFQdgAaiAIEAJBAnRqIgovAQA7AAAgBUHYAGogCi0AAhABIAAgCi0AA2oiACAGIAVB2ABqIAgQAkECdGoiCi8BADsAACAFQdgAaiAKLQACEAEgACAKLQADaiEADAEFIAxBfmohCgNAIAVB2ABqEAQgACAKS3JFBEAgACAGIAVB2ABqIAgQAkECdGoiCS8BADsAACAFQdgAaiAJLQACEAEgACAJLQADaiEADAELCwNAIAAgCk0EQCAAIAYgBUHYAGogCBACQQJ0aiIJLwEAOwAAIAVB2ABqIAktAAIQASAAIAktAANqIQAMAQsLAkAgACAMTw0AIAAgBiAFQdgAaiAIEAIiAEECdGoiDC0AADoAACAMLQADQQFGBEAgBUHYAGogDC0AAhABDAELIAUoAlxBH0sNACAFQdgAaiAGIABBAnRqLQACEAEgBSgCXEEhSQ0AIAVBIDYCXAsgAkF9aiEMA0BBACAHIAxJIAVBQGsQBBsEQCAHIAYgBUFAayAIEAJBAnRqIgAvAQA7AAAgBUFAayAALQACEAEgByAALQADaiIAIAYgBUFAayAIEAJBAnRqIgcvAQA7AAAgBUFAayAHLQACEAEgACAHLQADaiEHDAEFIAJBfmohDANAIAVBQGsQBCAHIAxLckUEQCAHIAYgBUFAayAIEAJBAnRqIgAvAQA7AAAgBUFAayAALQACEAEgByAALQADaiEHDAELCwNAIAcgDE0EQCAHIAYgBUFAayAIEAJBAnRqIgAvAQA7AAAgBUFAayAALQACEAEgByAALQADaiEHDAELCwJAIAcgAk8NACAHIAYgBUFAayAIEAIiAEECdGoiAi0AADoAACACLQADQQFGBEAgBUFAayACLQACEAEMAQsgBSgCREEfSw0AIAVBQGsgBiAAQQJ0ai0AAhABIAUoAkRBIUkNACAFQSA2AkQLIA5BfWohAgNAQQAgBCACSSAFQShqEAQbBEAgBCAGIAVBKGogCBACQQJ0aiIALwEAOwAAIAVBKGogAC0AAhABIAQgAC0AA2oiACAGIAVBKGogCBACQQJ0aiIELwEAOwAAIAVBKGogBC0AAhABIAAgBC0AA2ohBAwBBSAOQX5qIQIDQCAFQShqEAQgBCACS3JFBEAgBCAGIAVBKGogCBACQQJ0aiIALwEAOwAAIAVBKGogAC0AAhABIAQgAC0AA2ohBAwBCwsDQCAEIAJNBEAgBCAGIAVBKGogCBACQQJ0aiIALwEAOwAAIAVBKGogAC0AAhABIAQgAC0AA2ohBAwBCwsCQCAEIA5PDQAgBCAGIAVBKGogCBACIgBBAnRqIgItAAA6AAAgAi0AA0EBRgRAIAVBKGogAi0AAhABDAELIAUoAixBH0sNACAFQShqIAYgAEECdGotAAIQASAFKAIsQSFJDQAgBUEgNgIsCwNAQQAgAyAQSSAFQRBqEAQbBEAgAyAGIAVBEGogCBACQQJ0aiIALwEAOwAAIAVBEGogAC0AAhABIAMgAC0AA2oiACAGIAVBEGogCBACQQJ0aiICLwEAOwAAIAVBEGogAi0AAhABIAAgAi0AA2ohAwwBBSAPQX5qIQIDQCAFQRBqEAQgAyACS3JFBEAgAyAGIAVBEGogCBACQQJ0aiIALwEAOwAAIAVBEGogAC0AAhABIAMgAC0AA2ohAwwBCwsDQCADIAJNBEAgAyAGIAVBEGogCBACQQJ0aiIALwEAOwAAIAVBEGogAC0AAhABIAMgAC0AA2ohAwwBCwsCQCADIA9PDQAgAyAGIAVBEGogCBACIgBBAnRqIgItAAA6AAAgAi0AA0EBRgRAIAVBEGogAi0AAhABDAELIAUoAhRBH0sNACAFQRBqIAYgAEECdGotAAIQASAFKAIUQSFJDQAgBUEgNgIUCyABQWwgBUHYAGoQCiAFQUBrEApxIAVBKGoQCnEgBUEQahAKcRshCwwJCwAACwALAAALAAsAAAsACwAACwALQWwhCwsgBUHwAGokACALC7UEAQ5/IwBBEGsiBiQAIAZBBGogABAOQVQhBQJAIARB3AtJDQAgBi0ABCEHIANB8ARqQQBB7AAQECEIIAdBDEsNACADQdwJaiIJIAggBkEIaiAGQQxqIAEgAhAxIhAQA0UEQCAGKAIMIgQgB0sNASADQdwFaiEPIANBpAVqIREgAEEEaiESIANBqAVqIQEgBCEFA0AgBSICQX9qIQUgCCACQQJ0aigCAEUNAAsgAkEBaiEOQQEhBQNAIAUgDk9FBEAgCCAFQQJ0IgtqKAIAIQwgASALaiAKNgIAIAVBAWohBSAKIAxqIQoMAQsLIAEgCjYCAEEAIQUgBigCCCELA0AgBSALRkUEQCABIAUgCWotAAAiDEECdGoiDSANKAIAIg1BAWo2AgAgDyANQQF0aiINIAw6AAEgDSAFOgAAIAVBAWohBQwBCwtBACEBIANBADYCqAUgBEF/cyAHaiEJQQEhBQNAIAUgDk9FBEAgCCAFQQJ0IgtqKAIAIQwgAyALaiABNgIAIAwgBSAJanQgAWohASAFQQFqIQUMAQsLIAcgBEEBaiIBIAJrIgRrQQFqIQgDQEEBIQUgBCAIT0UEQANAIAUgDk9FBEAgBUECdCIJIAMgBEE0bGpqIAMgCWooAgAgBHY2AgAgBUEBaiEFDAELCyAEQQFqIQQMAQsLIBIgByAPIAogESADIAIgARBkIAZBAToABSAGIAc6AAYgACAGKAIENgIACyAQIQULIAZBEGokACAFC8ENAQt/IwBB8ABrIgUkAEFsIQkCQCADQQpJDQAgAi8AACEKIAIvAAIhDCACLwAEIQYgBUEIaiAEEA4CQCADIAYgCiAMampBBmoiDUkNACAFLQAKIQcgBUHYAGogAkEGaiICIAoQBiIJEAMNASAFQUBrIAIgCmoiAiAMEAYiCRADDQEgBUEoaiACIAxqIgIgBhAGIgkQAw0BIAVBEGogAiAGaiADIA1rEAYiCRADDQEgACABaiIOQX1qIQ8gBEEEaiEGQQEhCSAAIAFBA2pBAnYiAmoiCiACaiIMIAJqIg0hAyAMIQQgCiECA0AgCSADIA9JcQRAIAYgBUHYAGogBxACQQF0aiIILQAAIQsgBUHYAGogCC0AARABIAAgCzoAACAGIAVBQGsgBxACQQF0aiIILQAAIQsgBUFAayAILQABEAEgAiALOgAAIAYgBUEoaiAHEAJBAXRqIggtAAAhCyAFQShqIAgtAAEQASAEIAs6AAAgBiAFQRBqIAcQAkEBdGoiCC0AACELIAVBEGogCC0AARABIAMgCzoAACAGIAVB2ABqIAcQAkEBdGoiCC0AACELIAVB2ABqIAgtAAEQASAAIAs6AAEgBiAFQUBrIAcQAkEBdGoiCC0AACELIAVBQGsgCC0AARABIAIgCzoAASAGIAVBKGogBxACQQF0aiIILQAAIQsgBUEoaiAILQABEAEgBCALOgABIAYgBUEQaiAHEAJBAXRqIggtAAAhCyAFQRBqIAgtAAEQASADIAs6AAEgA0ECaiEDIARBAmohBCACQQJqIQIgAEECaiEAIAkgBUHYAGoQDUVxIAVBQGsQDUVxIAVBKGoQDUVxIAVBEGoQDUVxIQkMAQsLIAQgDUsgAiAMS3INAEFsIQkgACAKSw0BIApBfWohCQNAIAVB2ABqEAQgACAJT3JFBEAgBiAFQdgAaiAHEAJBAXRqIggtAAAhCyAFQdgAaiAILQABEAEgACALOgAAIAYgBUHYAGogBxACQQF0aiIILQAAIQsgBUHYAGogCC0AARABIAAgCzoAASAAQQJqIQAMAQsLA0AgBUHYAGoQBCAAIApPckUEQCAGIAVB2ABqIAcQAkEBdGoiCS0AACEIIAVB2ABqIAktAAEQASAAIAg6AAAgAEEBaiEADAELCwNAIAAgCkkEQCAGIAVB2ABqIAcQAkEBdGoiCS0AACEIIAVB2ABqIAktAAEQASAAIAg6AAAgAEEBaiEADAELCyAMQX1qIQADQCAFQUBrEAQgAiAAT3JFBEAgBiAFQUBrIAcQAkEBdGoiCi0AACEJIAVBQGsgCi0AARABIAIgCToAACAGIAVBQGsgBxACQQF0aiIKLQAAIQkgBUFAayAKLQABEAEgAiAJOgABIAJBAmohAgwBCwsDQCAFQUBrEAQgAiAMT3JFBEAgBiAFQUBrIAcQAkEBdGoiAC0AACEKIAVBQGsgAC0AARABIAIgCjoAACACQQFqIQIMAQsLA0AgAiAMSQRAIAYgBUFAayAHEAJBAXRqIgAtAAAhCiAFQUBrIAAtAAEQASACIAo6AAAgAkEBaiECDAELCyANQX1qIQADQCAFQShqEAQgBCAAT3JFBEAgBiAFQShqIAcQAkEBdGoiAi0AACEKIAVBKGogAi0AARABIAQgCjoAACAGIAVBKGogBxACQQF0aiICLQAAIQogBUEoaiACLQABEAEgBCAKOgABIARBAmohBAwBCwsDQCAFQShqEAQgBCANT3JFBEAgBiAFQShqIAcQAkEBdGoiAC0AACECIAVBKGogAC0AARABIAQgAjoAACAEQQFqIQQMAQsLA0AgBCANSQRAIAYgBUEoaiAHEAJBAXRqIgAtAAAhAiAFQShqIAAtAAEQASAEIAI6AAAgBEEBaiEEDAELCwNAIAVBEGoQBCADIA9PckUEQCAGIAVBEGogBxACQQF0aiIALQAAIQIgBUEQaiAALQABEAEgAyACOgAAIAYgBUEQaiAHEAJBAXRqIgAtAAAhAiAFQRBqIAAtAAEQASADIAI6AAEgA0ECaiEDDAELCwNAIAVBEGoQBCADIA5PckUEQCAGIAVBEGogBxACQQF0aiIALQAAIQIgBUEQaiAALQABEAEgAyACOgAAIANBAWohAwwBCwsDQCADIA5JBEAgBiAFQRBqIAcQAkEBdGoiAC0AACECIAVBEGogAC0AARABIAMgAjoAACADQQFqIQMMAQsLIAFBbCAFQdgAahAKIAVBQGsQCnEgBUEoahAKcSAFQRBqEApxGyEJDAELQWwhCQsgBUHwAGokACAJC8oCAQR/IwBBIGsiBSQAIAUgBBAOIAUtAAIhByAFQQhqIAIgAxAGIgIQA0UEQCAEQQRqIQIgACABaiIDQX1qIQQDQCAFQQhqEAQgACAET3JFBEAgAiAFQQhqIAcQAkEBdGoiBi0AACEIIAVBCGogBi0AARABIAAgCDoAACACIAVBCGogBxACQQF0aiIGLQAAIQggBUEIaiAGLQABEAEgACAIOgABIABBAmohAAwBCwsDQCAFQQhqEAQgACADT3JFBEAgAiAFQQhqIAcQAkEBdGoiBC0AACEGIAVBCGogBC0AARABIAAgBjoAACAAQQFqIQAMAQsLA0AgACADT0UEQCACIAVBCGogBxACQQF0aiIELQAAIQYgBUEIaiAELQABEAEgACAGOgAAIABBAWohAAwBCwsgAUFsIAVBCGoQChshAgsgBUEgaiQAIAILtgMBCX8jAEEQayIGJAAgBkEANgIMIAZBADYCCEFUIQQCQAJAIANBQGsiDCADIAZBCGogBkEMaiABIAIQMSICEAMNACAGQQRqIAAQDiAGKAIMIgcgBi0ABEEBaksNASAAQQRqIQogBkEAOgAFIAYgBzoABiAAIAYoAgQ2AgAgB0EBaiEJQQEhBANAIAQgCUkEQCADIARBAnRqIgEoAgAhACABIAU2AgAgACAEQX9qdCAFaiEFIARBAWohBAwBCwsgB0EBaiEHQQAhBSAGKAIIIQkDQCAFIAlGDQEgAyAFIAxqLQAAIgRBAnRqIgBBASAEdEEBdSILIAAoAgAiAWoiADYCACAHIARrIQhBACEEAkAgC0EDTQRAA0AgBCALRg0CIAogASAEakEBdGoiACAIOgABIAAgBToAACAEQQFqIQQMAAALAAsDQCABIABPDQEgCiABQQF0aiIEIAg6AAEgBCAFOgAAIAQgCDoAAyAEIAU6AAIgBCAIOgAFIAQgBToABCAEIAg6AAcgBCAFOgAGIAFBBGohAQwAAAsACyAFQQFqIQUMAAALAAsgAiEECyAGQRBqJAAgBAutAQECfwJAQYQgKAIAIABHIAAoAgBBAXYiAyABa0F4aiICQXhxQQhHcgR/IAIFIAMQJ0UNASACQQhqC0EQSQ0AIAAgACgCACICQQFxIAAgAWpBD2pBeHEiASAAa0EBdHI2AgAgASAANgIEIAEgASgCAEEBcSAAIAJBAXZqIAFrIgJBAXRyNgIAQYQgIAEgAkH/////B3FqQQRqQYQgKAIAIABGGyABNgIAIAEQJQsLygIBBX8CQAJAAkAgAEEIIABBCEsbZ0EfcyAAaUEBR2oiAUEESSAAIAF2cg0AIAFBAnRB/B5qKAIAIgJFDQADQCACQXhqIgMoAgBBAXZBeGoiBSAATwRAIAIgBUEIIAVBCEsbZ0Efc0ECdEGAH2oiASgCAEYEQCABIAIoAgQ2AgALDAMLIARBHksNASAEQQFqIQQgAigCBCICDQALC0EAIQMgAUEgTw0BA0AgAUECdEGAH2ooAgAiAkUEQCABQR5LIQIgAUEBaiEBIAJFDQEMAwsLIAIgAkF4aiIDKAIAQQF2QXhqIgFBCCABQQhLG2dBH3NBAnRBgB9qIgEoAgBGBEAgASACKAIENgIACwsgAigCACIBBEAgASACKAIENgIECyACKAIEIgEEQCABIAIoAgA2AgALIAMgAygCAEEBcjYCACADIAAQNwsgAwvhCwINfwV+IwBB8ABrIgckACAHIAAoAvDhASIINgJcIAEgAmohDSAIIAAoAoDiAWohDwJAAkAgBUUEQCABIQQMAQsgACgCxOABIRAgACgCwOABIREgACgCvOABIQ4gAEEBNgKM4QFBACEIA0AgCEEDRwRAIAcgCEECdCICaiAAIAJqQazQAWooAgA2AkQgCEEBaiEIDAELC0FsIQwgB0EYaiADIAQQBhADDQEgB0EsaiAHQRhqIAAoAgAQEyAHQTRqIAdBGGogACgCCBATIAdBPGogB0EYaiAAKAIEEBMgDUFgaiESIAEhBEEAIQwDQCAHKAIwIAcoAixBA3RqKQIAIhRCEIinQf8BcSEIIAcoAkAgBygCPEEDdGopAgAiFUIQiKdB/wFxIQsgBygCOCAHKAI0QQN0aikCACIWQiCIpyEJIBVCIIghFyAUQiCIpyECAkAgFkIQiKdB/wFxIgNBAk8EQAJAIAZFIANBGUlyRQRAIAkgB0EYaiADQSAgBygCHGsiCiAKIANLGyIKEAUgAyAKayIDdGohCSAHQRhqEAQaIANFDQEgB0EYaiADEAUgCWohCQwBCyAHQRhqIAMQBSAJaiEJIAdBGGoQBBoLIAcpAkQhGCAHIAk2AkQgByAYNwNIDAELAkAgA0UEQCACBEAgBygCRCEJDAMLIAcoAkghCQwBCwJAAkAgB0EYakEBEAUgCSACRWpqIgNBA0YEQCAHKAJEQX9qIgMgA0VqIQkMAQsgA0ECdCAHaigCRCIJIAlFaiEJIANBAUYNAQsgByAHKAJINgJMCwsgByAHKAJENgJIIAcgCTYCRAsgF6chAyALBEAgB0EYaiALEAUgA2ohAwsgCCALakEUTwRAIAdBGGoQBBoLIAgEQCAHQRhqIAgQBSACaiECCyAHQRhqEAQaIAcgB0EYaiAUQhiIp0H/AXEQCCAUp0H//wNxajYCLCAHIAdBGGogFUIYiKdB/wFxEAggFadB//8DcWo2AjwgB0EYahAEGiAHIAdBGGogFkIYiKdB/wFxEAggFqdB//8DcWo2AjQgByACNgJgIAcoAlwhCiAHIAk2AmggByADNgJkAkACQAJAIAQgAiADaiILaiASSw0AIAIgCmoiEyAPSw0AIA0gBGsgC0Egak8NAQsgByAHKQNoNwMQIAcgBykDYDcDCCAEIA0gB0EIaiAHQdwAaiAPIA4gESAQEB4hCwwBCyACIARqIQggBCAKEAcgAkERTwRAIARBEGohAgNAIAIgCkEQaiIKEAcgAkEQaiICIAhJDQALCyAIIAlrIQIgByATNgJcIAkgCCAOa0sEQCAJIAggEWtLBEBBbCELDAILIBAgAiAOayICaiIKIANqIBBNBEAgCCAKIAMQDxoMAgsgCCAKQQAgAmsQDyEIIAcgAiADaiIDNgJkIAggAmshCCAOIQILIAlBEE8EQCADIAhqIQMDQCAIIAIQByACQRBqIQIgCEEQaiIIIANJDQALDAELAkAgCUEHTQRAIAggAi0AADoAACAIIAItAAE6AAEgCCACLQACOgACIAggAi0AAzoAAyAIQQRqIAIgCUECdCIDQcAeaigCAGoiAhAXIAIgA0HgHmooAgBrIQIgBygCZCEDDAELIAggAhAMCyADQQlJDQAgAyAIaiEDIAhBCGoiCCACQQhqIgJrQQ9MBEADQCAIIAIQDCACQQhqIQIgCEEIaiIIIANJDQAMAgALAAsDQCAIIAIQByACQRBqIQIgCEEQaiIIIANJDQALCyAHQRhqEAQaIAsgDCALEAMiAhshDCAEIAQgC2ogAhshBCAFQX9qIgUNAAsgDBADDQFBbCEMIAdBGGoQBEECSQ0BQQAhCANAIAhBA0cEQCAAIAhBAnQiAmpBrNABaiACIAdqKAJENgIAIAhBAWohCAwBCwsgBygCXCEIC0G6fyEMIA8gCGsiACANIARrSw0AIAQEfyAEIAggABALIABqBUEACyABayEMCyAHQfAAaiQAIAwLkRcCFn8FfiMAQdABayIHJAAgByAAKALw4QEiCDYCvAEgASACaiESIAggACgCgOIBaiETAkACQCAFRQRAIAEhAwwBCyAAKALE4AEhESAAKALA4AEhFSAAKAK84AEhDyAAQQE2AozhAUEAIQgDQCAIQQNHBEAgByAIQQJ0IgJqIAAgAmpBrNABaigCADYCVCAIQQFqIQgMAQsLIAcgETYCZCAHIA82AmAgByABIA9rNgJoQWwhECAHQShqIAMgBBAGEAMNASAFQQQgBUEESBshFyAHQTxqIAdBKGogACgCABATIAdBxABqIAdBKGogACgCCBATIAdBzABqIAdBKGogACgCBBATQQAhBCAHQeAAaiEMIAdB5ABqIQoDQCAHQShqEARBAksgBCAXTnJFBEAgBygCQCAHKAI8QQN0aikCACIdQhCIp0H/AXEhCyAHKAJQIAcoAkxBA3RqKQIAIh5CEIinQf8BcSEJIAcoAkggBygCREEDdGopAgAiH0IgiKchCCAeQiCIISAgHUIgiKchAgJAIB9CEIinQf8BcSIDQQJPBEACQCAGRSADQRlJckUEQCAIIAdBKGogA0EgIAcoAixrIg0gDSADSxsiDRAFIAMgDWsiA3RqIQggB0EoahAEGiADRQ0BIAdBKGogAxAFIAhqIQgMAQsgB0EoaiADEAUgCGohCCAHQShqEAQaCyAHKQJUISEgByAINgJUIAcgITcDWAwBCwJAIANFBEAgAgRAIAcoAlQhCAwDCyAHKAJYIQgMAQsCQAJAIAdBKGpBARAFIAggAkVqaiIDQQNGBEAgBygCVEF/aiIDIANFaiEIDAELIANBAnQgB2ooAlQiCCAIRWohCCADQQFGDQELIAcgBygCWDYCXAsLIAcgBygCVDYCWCAHIAg2AlQLICCnIQMgCQRAIAdBKGogCRAFIANqIQMLIAkgC2pBFE8EQCAHQShqEAQaCyALBEAgB0EoaiALEAUgAmohAgsgB0EoahAEGiAHIAcoAmggAmoiCSADajYCaCAKIAwgCCAJSxsoAgAhDSAHIAdBKGogHUIYiKdB/wFxEAggHadB//8DcWo2AjwgByAHQShqIB5CGIinQf8BcRAIIB6nQf//A3FqNgJMIAdBKGoQBBogB0EoaiAfQhiIp0H/AXEQCCEOIAdB8ABqIARBBHRqIgsgCSANaiAIazYCDCALIAg2AgggCyADNgIEIAsgAjYCACAHIA4gH6dB//8DcWo2AkQgBEEBaiEEDAELCyAEIBdIDQEgEkFgaiEYIAdB4ABqIRogB0HkAGohGyABIQMDQCAHQShqEARBAksgBCAFTnJFBEAgBygCQCAHKAI8QQN0aikCACIdQhCIp0H/AXEhCyAHKAJQIAcoAkxBA3RqKQIAIh5CEIinQf8BcSEIIAcoAkggBygCREEDdGopAgAiH0IgiKchCSAeQiCIISAgHUIgiKchDAJAIB9CEIinQf8BcSICQQJPBEACQCAGRSACQRlJckUEQCAJIAdBKGogAkEgIAcoAixrIgogCiACSxsiChAFIAIgCmsiAnRqIQkgB0EoahAEGiACRQ0BIAdBKGogAhAFIAlqIQkMAQsgB0EoaiACEAUgCWohCSAHQShqEAQaCyAHKQJUISEgByAJNgJUIAcgITcDWAwBCwJAIAJFBEAgDARAIAcoAlQhCQwDCyAHKAJYIQkMAQsCQAJAIAdBKGpBARAFIAkgDEVqaiICQQNGBEAgBygCVEF/aiICIAJFaiEJDAELIAJBAnQgB2ooAlQiCSAJRWohCSACQQFGDQELIAcgBygCWDYCXAsLIAcgBygCVDYCWCAHIAk2AlQLICCnIRQgCARAIAdBKGogCBAFIBRqIRQLIAggC2pBFE8EQCAHQShqEAQaCyALBEAgB0EoaiALEAUgDGohDAsgB0EoahAEGiAHIAcoAmggDGoiGSAUajYCaCAbIBogCSAZSxsoAgAhHCAHIAdBKGogHUIYiKdB/wFxEAggHadB//8DcWo2AjwgByAHQShqIB5CGIinQf8BcRAIIB6nQf//A3FqNgJMIAdBKGoQBBogByAHQShqIB9CGIinQf8BcRAIIB+nQf//A3FqNgJEIAcgB0HwAGogBEEDcUEEdGoiDSkDCCIdNwPIASAHIA0pAwAiHjcDwAECQAJAAkAgBygCvAEiDiAepyICaiIWIBNLDQAgAyAHKALEASIKIAJqIgtqIBhLDQAgEiADayALQSBqTw0BCyAHIAcpA8gBNwMQIAcgBykDwAE3AwggAyASIAdBCGogB0G8AWogEyAPIBUgERAeIQsMAQsgAiADaiEIIAMgDhAHIAJBEU8EQCADQRBqIQIDQCACIA5BEGoiDhAHIAJBEGoiAiAISQ0ACwsgCCAdpyIOayECIAcgFjYCvAEgDiAIIA9rSwRAIA4gCCAVa0sEQEFsIQsMAgsgESACIA9rIgJqIhYgCmogEU0EQCAIIBYgChAPGgwCCyAIIBZBACACaxAPIQggByACIApqIgo2AsQBIAggAmshCCAPIQILIA5BEE8EQCAIIApqIQoDQCAIIAIQByACQRBqIQIgCEEQaiIIIApJDQALDAELAkAgDkEHTQRAIAggAi0AADoAACAIIAItAAE6AAEgCCACLQACOgACIAggAi0AAzoAAyAIQQRqIAIgDkECdCIKQcAeaigCAGoiAhAXIAIgCkHgHmooAgBrIQIgBygCxAEhCgwBCyAIIAIQDAsgCkEJSQ0AIAggCmohCiAIQQhqIgggAkEIaiICa0EPTARAA0AgCCACEAwgAkEIaiECIAhBCGoiCCAKSQ0ADAIACwALA0AgCCACEAcgAkEQaiECIAhBEGoiCCAKSQ0ACwsgCxADBEAgCyEQDAQFIA0gDDYCACANIBkgHGogCWs2AgwgDSAJNgIIIA0gFDYCBCAEQQFqIQQgAyALaiEDDAILAAsLIAQgBUgNASAEIBdrIQtBACEEA0AgCyAFSARAIAcgB0HwAGogC0EDcUEEdGoiAikDCCIdNwPIASAHIAIpAwAiHjcDwAECQAJAAkAgBygCvAEiDCAepyICaiIKIBNLDQAgAyAHKALEASIJIAJqIhBqIBhLDQAgEiADayAQQSBqTw0BCyAHIAcpA8gBNwMgIAcgBykDwAE3AxggAyASIAdBGGogB0G8AWogEyAPIBUgERAeIRAMAQsgAiADaiEIIAMgDBAHIAJBEU8EQCADQRBqIQIDQCACIAxBEGoiDBAHIAJBEGoiAiAISQ0ACwsgCCAdpyIGayECIAcgCjYCvAEgBiAIIA9rSwRAIAYgCCAVa0sEQEFsIRAMAgsgESACIA9rIgJqIgwgCWogEU0EQCAIIAwgCRAPGgwCCyAIIAxBACACaxAPIQggByACIAlqIgk2AsQBIAggAmshCCAPIQILIAZBEE8EQCAIIAlqIQYDQCAIIAIQByACQRBqIQIgCEEQaiIIIAZJDQALDAELAkAgBkEHTQRAIAggAi0AADoAACAIIAItAAE6AAEgCCACLQACOgACIAggAi0AAzoAAyAIQQRqIAIgBkECdCIGQcAeaigCAGoiAhAXIAIgBkHgHmooAgBrIQIgBygCxAEhCQwBCyAIIAIQDAsgCUEJSQ0AIAggCWohBiAIQQhqIgggAkEIaiICa0EPTARAA0AgCCACEAwgAkEIaiECIAhBCGoiCCAGSQ0ADAIACwALA0AgCCACEAcgAkEQaiECIAhBEGoiCCAGSQ0ACwsgEBADDQMgC0EBaiELIAMgEGohAwwBCwsDQCAEQQNHBEAgACAEQQJ0IgJqQazQAWogAiAHaigCVDYCACAEQQFqIQQMAQsLIAcoArwBIQgLQbp/IRAgEyAIayIAIBIgA2tLDQAgAwR/IAMgCCAAEAsgAGoFQQALIAFrIRALIAdB0AFqJAAgEAslACAAQgA3AgAgAEEAOwEIIABBADoACyAAIAE2AgwgACACOgAKC7QFAQN/IwBBMGsiBCQAIABB/wFqIgVBfWohBgJAIAMvAQIEQCAEQRhqIAEgAhAGIgIQAw0BIARBEGogBEEYaiADEBwgBEEIaiAEQRhqIAMQHCAAIQMDQAJAIARBGGoQBCADIAZPckUEQCADIARBEGogBEEYahASOgAAIAMgBEEIaiAEQRhqEBI6AAEgBEEYahAERQ0BIANBAmohAwsgBUF+aiEFAn8DQEG6fyECIAMiASAFSw0FIAEgBEEQaiAEQRhqEBI6AAAgAUEBaiEDIARBGGoQBEEDRgRAQQIhAiAEQQhqDAILIAMgBUsNBSABIARBCGogBEEYahASOgABIAFBAmohA0EDIQIgBEEYahAEQQNHDQALIARBEGoLIQUgAyAFIARBGGoQEjoAACABIAJqIABrIQIMAwsgAyAEQRBqIARBGGoQEjoAAiADIARBCGogBEEYahASOgADIANBBGohAwwAAAsACyAEQRhqIAEgAhAGIgIQAw0AIARBEGogBEEYaiADEBwgBEEIaiAEQRhqIAMQHCAAIQMDQAJAIARBGGoQBCADIAZPckUEQCADIARBEGogBEEYahAROgAAIAMgBEEIaiAEQRhqEBE6AAEgBEEYahAERQ0BIANBAmohAwsgBUF+aiEFAn8DQEG6fyECIAMiASAFSw0EIAEgBEEQaiAEQRhqEBE6AAAgAUEBaiEDIARBGGoQBEEDRgRAQQIhAiAEQQhqDAILIAMgBUsNBCABIARBCGogBEEYahAROgABIAFBAmohA0EDIQIgBEEYahAEQQNHDQALIARBEGoLIQUgAyAFIARBGGoQEToAACABIAJqIABrIQIMAgsgAyAEQRBqIARBGGoQEToAAiADIARBCGogBEEYahAROgADIANBBGohAwwAAAsACyAEQTBqJAAgAgtpAQF/An8CQAJAIAJBB00NACABKAAAQbfIwuF+Rw0AIAAgASgABDYCmOIBQWIgAEEQaiABIAIQPiIDEAMNAhogAEKBgICAEDcDiOEBIAAgASADaiACIANrECoMAQsgACABIAIQKgtBAAsLrQMBBn8jAEGAAWsiAyQAQWIhCAJAIAJBCUkNACAAQZjQAGogAUEIaiIEIAJBeGogAEGY0AAQMyIFEAMiBg0AIANBHzYCfCADIANB/ABqIANB+ABqIAQgBCAFaiAGGyIEIAEgAmoiAiAEaxAVIgUQAw0AIAMoAnwiBkEfSw0AIAMoAngiB0EJTw0AIABBiCBqIAMgBkGAC0GADCAHEBggA0E0NgJ8IAMgA0H8AGogA0H4AGogBCAFaiIEIAIgBGsQFSIFEAMNACADKAJ8IgZBNEsNACADKAJ4IgdBCk8NACAAQZAwaiADIAZBgA1B4A4gBxAYIANBIzYCfCADIANB/ABqIANB+ABqIAQgBWoiBCACIARrEBUiBRADDQAgAygCfCIGQSNLDQAgAygCeCIHQQpPDQAgACADIAZBwBBB0BEgBxAYIAQgBWoiBEEMaiIFIAJLDQAgAiAFayEFQQAhAgNAIAJBA0cEQCAEKAAAIgZBf2ogBU8NAiAAIAJBAnRqQZzQAWogBjYCACACQQFqIQIgBEEEaiEEDAELCyAEIAFrIQgLIANBgAFqJAAgCAtGAQN/IABBCGohAyAAKAIEIQJBACEAA0AgACACdkUEQCABIAMgAEEDdGotAAJBFktqIQEgAEEBaiEADAELCyABQQggAmt0C4YDAQV/Qbh/IQcCQCADRQ0AIAItAAAiBEUEQCABQQA2AgBBAUG4fyADQQFGGw8LAn8gAkEBaiIFIARBGHRBGHUiBkF/Sg0AGiAGQX9GBEAgA0EDSA0CIAUvAABBgP4BaiEEIAJBA2oMAQsgA0ECSA0BIAItAAEgBEEIdHJBgIB+aiEEIAJBAmoLIQUgASAENgIAIAVBAWoiASACIANqIgNLDQBBbCEHIABBEGogACAFLQAAIgVBBnZBI0EJIAEgAyABa0HAEEHQEUHwEiAAKAKM4QEgACgCnOIBIAQQHyIGEAMiCA0AIABBmCBqIABBCGogBUEEdkEDcUEfQQggASABIAZqIAgbIgEgAyABa0GAC0GADEGAFyAAKAKM4QEgACgCnOIBIAQQHyIGEAMiCA0AIABBoDBqIABBBGogBUECdkEDcUE0QQkgASABIAZqIAgbIgEgAyABa0GADUHgDkGQGSAAKAKM4QEgACgCnOIBIAQQHyIAEAMNACAAIAFqIAJrIQcLIAcLrQMBCn8jAEGABGsiCCQAAn9BUiACQf8BSw0AGkFUIANBDEsNABogAkEBaiELIABBBGohCUGAgAQgA0F/anRBEHUhCkEAIQJBASEEQQEgA3QiB0F/aiIMIQUDQCACIAtGRQRAAkAgASACQQF0Ig1qLwEAIgZB//8DRgRAIAkgBUECdGogAjoAAiAFQX9qIQVBASEGDAELIARBACAKIAZBEHRBEHVKGyEECyAIIA1qIAY7AQAgAkEBaiECDAELCyAAIAQ7AQIgACADOwEAIAdBA3YgB0EBdmpBA2ohBkEAIQRBACECA0AgBCALRkUEQCABIARBAXRqLgEAIQpBACEAA0AgACAKTkUEQCAJIAJBAnRqIAQ6AAIDQCACIAZqIAxxIgIgBUsNAAsgAEEBaiEADAELCyAEQQFqIQQMAQsLQX8gAg0AGkEAIQIDfyACIAdGBH9BAAUgCCAJIAJBAnRqIgAtAAJBAXRqIgEgAS8BACIBQQFqOwEAIAAgAyABEBRrIgU6AAMgACABIAVB/wFxdCAHazsBACACQQFqIQIMAQsLCyEFIAhBgARqJAAgBQvjBgEIf0FsIQcCQCACQQNJDQACQAJAAkACQCABLQAAIgNBA3EiCUEBaw4DAwEAAgsgACgCiOEBDQBBYg8LIAJBBUkNAkEDIQYgASgAACEFAn8CQAJAIANBAnZBA3EiCEF+aiIEQQFNBEAgBEEBaw0BDAILIAVBDnZB/wdxIQQgBUEEdkH/B3EhAyAIRQwCCyAFQRJ2IQRBBCEGIAVBBHZB//8AcSEDQQAMAQsgBUEEdkH//w9xIgNBgIAISw0DIAEtAARBCnQgBUEWdnIhBEEFIQZBAAshBSAEIAZqIgogAksNAgJAIANBgQZJDQAgACgCnOIBRQ0AQQAhAgNAIAJBg4ABSw0BIAJBQGshAgwAAAsACwJ/IAlBA0YEQCABIAZqIQEgAEHw4gFqIQIgACgCDCEGIAUEQCACIAMgASAEIAYQXwwCCyACIAMgASAEIAYQXQwBCyAAQbjQAWohAiABIAZqIQEgAEHw4gFqIQYgAEGo0ABqIQggBQRAIAggBiADIAEgBCACEF4MAQsgCCAGIAMgASAEIAIQXAsQAw0CIAAgAzYCgOIBIABBATYCiOEBIAAgAEHw4gFqNgLw4QEgCUECRgRAIAAgAEGo0ABqNgIMCyAAIANqIgBBiOMBakIANwAAIABBgOMBakIANwAAIABB+OIBakIANwAAIABB8OIBakIANwAAIAoPCwJ/AkACQAJAIANBAnZBA3FBf2oiBEECSw0AIARBAWsOAgACAQtBASEEIANBA3YMAgtBAiEEIAEvAABBBHYMAQtBAyEEIAEQIUEEdgsiAyAEaiIFQSBqIAJLBEAgBSACSw0CIABB8OIBaiABIARqIAMQCyEBIAAgAzYCgOIBIAAgATYC8OEBIAEgA2oiAEIANwAYIABCADcAECAAQgA3AAggAEIANwAAIAUPCyAAIAM2AoDiASAAIAEgBGo2AvDhASAFDwsCfwJAAkACQCADQQJ2QQNxQX9qIgRBAksNACAEQQFrDgIAAgELQQEhByADQQN2DAILQQIhByABLwAAQQR2DAELIAJBBEkgARAhIgJBj4CAAUtyDQFBAyEHIAJBBHYLIQIgAEHw4gFqIAEgB2otAAAgAkEgahAQIQEgACACNgKA4gEgACABNgLw4QEgB0EBaiEHCyAHC0sAIABC+erQ0OfJoeThADcDICAAQgA3AxggAELP1tO+0ser2UI3AxAgAELW64Lu6v2J9eAANwMIIABCADcDACAAQShqQQBBKBAQGgviAgICfwV+IABBKGoiASAAKAJIaiECAn4gACkDACIDQiBaBEAgACkDECIEQgeJIAApAwgiBUIBiXwgACkDGCIGQgyJfCAAKQMgIgdCEol8IAUQGSAEEBkgBhAZIAcQGQwBCyAAKQMYQsXP2bLx5brqJ3wLIAN8IQMDQCABQQhqIgAgAk0EQEIAIAEpAAAQCSADhUIbiUKHla+vmLbem55/fkLj3MqV/M7y9YV/fCEDIAAhAQwBCwsCQCABQQRqIgAgAksEQCABIQAMAQsgASgAAK1Ch5Wvr5i23puef34gA4VCF4lCz9bTvtLHq9lCfkL5893xmfaZqxZ8IQMLA0AgACACSQRAIAAxAABCxc/ZsvHluuonfiADhUILiUKHla+vmLbem55/fiEDIABBAWohAAwBCwsgA0IhiCADhULP1tO+0ser2UJ+IgNCHYggA4VC+fPd8Zn2masWfiIDQiCIIAOFC+8CAgJ/BH4gACAAKQMAIAKtfDcDAAJAAkAgACgCSCIDIAJqIgRBH00EQCABRQ0BIAAgA2pBKGogASACECAgACgCSCACaiEEDAELIAEgAmohAgJ/IAMEQCAAQShqIgQgA2ogAUEgIANrECAgACAAKQMIIAQpAAAQCTcDCCAAIAApAxAgACkAMBAJNwMQIAAgACkDGCAAKQA4EAk3AxggACAAKQMgIABBQGspAAAQCTcDICAAKAJIIQMgAEEANgJIIAEgA2tBIGohAQsgAUEgaiACTQsEQCACQWBqIQMgACkDICEFIAApAxghBiAAKQMQIQcgACkDCCEIA0AgCCABKQAAEAkhCCAHIAEpAAgQCSEHIAYgASkAEBAJIQYgBSABKQAYEAkhBSABQSBqIgEgA00NAAsgACAFNwMgIAAgBjcDGCAAIAc3AxAgACAINwMICyABIAJPDQEgAEEoaiABIAIgAWsiBBAgCyAAIAQ2AkgLCy8BAX8gAEUEQEG2f0EAIAMbDwtBun8hBCADIAFNBH8gACACIAMQEBogAwVBun8LCy8BAX8gAEUEQEG2f0EAIAMbDwtBun8hBCADIAFNBH8gACACIAMQCxogAwVBun8LC6gCAQZ/IwBBEGsiByQAIABB2OABaikDAEKAgIAQViEIQbh/IQUCQCAEQf//B0sNACAAIAMgBBBCIgUQAyIGDQAgACgCnOIBIQkgACAHQQxqIAMgAyAFaiAGGyIKIARBACAFIAYbayIGEEAiAxADBEAgAyEFDAELIAcoAgwhBCABRQRAQbp/IQUgBEEASg0BCyAGIANrIQUgAyAKaiEDAkAgCQRAIABBADYCnOIBDAELAkACQAJAIARBBUgNACAAQdjgAWopAwBCgICACFgNAAwBCyAAQQA2ApziAQwBCyAAKAIIED8hBiAAQQA2ApziASAGQRRPDQELIAAgASACIAMgBSAEIAgQOSEFDAELIAAgASACIAMgBSAEIAgQOiEFCyAHQRBqJAAgBQtnACAAQdDgAWogASACIAAoAuzhARAuIgEQAwRAIAEPC0G4fyECAkAgAQ0AIABB7OABaigCACIBBEBBYCECIAAoApjiASABRw0BC0EAIQIgAEHw4AFqKAIARQ0AIABBkOEBahBDCyACCycBAX8QVyIERQRAQUAPCyAEIAAgASACIAMgBBBLEE8hACAEEFYgAAs/AQF/AkACQAJAIAAoAqDiAUEBaiIBQQJLDQAgAUEBaw4CAAECCyAAEDBBAA8LIABBADYCoOIBCyAAKAKU4gELvAMCB38BfiMAQRBrIgkkAEG4fyEGAkAgBCgCACIIQQVBCSAAKALs4QEiBRtJDQAgAygCACIHQQFBBSAFGyAFEC8iBRADBEAgBSEGDAELIAggBUEDakkNACAAIAcgBRBJIgYQAw0AIAEgAmohCiAAQZDhAWohCyAIIAVrIQIgBSAHaiEHIAEhBQNAIAcgAiAJECwiBhADDQEgAkF9aiICIAZJBEBBuH8hBgwCCyAJKAIAIghBAksEQEFsIQYMAgsgB0EDaiEHAn8CQAJAAkAgCEEBaw4CAgABCyAAIAUgCiAFayAHIAYQSAwCCyAFIAogBWsgByAGEEcMAQsgBSAKIAVrIActAAAgCSgCCBBGCyIIEAMEQCAIIQYMAgsgACgC8OABBEAgCyAFIAgQRQsgAiAGayECIAYgB2ohByAFIAhqIQUgCSgCBEUNAAsgACkD0OABIgxCf1IEQEFsIQYgDCAFIAFrrFINAQsgACgC8OABBEBBaiEGIAJBBEkNASALEEQhDCAHKAAAIAynRw0BIAdBBGohByACQXxqIQILIAMgBzYCACAEIAI2AgAgBSABayEGCyAJQRBqJAAgBgsuACAAECsCf0EAQQAQAw0AGiABRSACRXJFBEBBYiAAIAEgAhA9EAMNARoLQQALCzcAIAEEQCAAIAAoAsTgASABKAIEIAEoAghqRzYCnOIBCyAAECtBABADIAFFckUEQCAAIAEQWwsL0QIBB38jAEEQayIGJAAgBiAENgIIIAYgAzYCDCAFBEAgBSgCBCEKIAUoAgghCQsgASEIAkACQANAIAAoAuzhARAWIQsCQANAIAQgC0kNASADKAAAQXBxQdDUtMIBRgRAIAMgBBAiIgcQAw0EIAQgB2shBCADIAdqIQMMAQsLIAYgAzYCDCAGIAQ2AggCQCAFBEAgACAFEE5BACEHQQAQA0UNAQwFCyAAIAogCRBNIgcQAw0ECyAAIAgQUCAMQQFHQQAgACAIIAIgBkEMaiAGQQhqEEwiByIDa0EAIAMQAxtBCkdyRQRAQbh/IQcMBAsgBxADDQMgAiAHayECIAcgCGohCEEBIQwgBigCDCEDIAYoAgghBAwBCwsgBiADNgIMIAYgBDYCCEG4fyEHIAQNASAIIAFrIQcMAQsgBiADNgIMIAYgBDYCCAsgBkEQaiQAIAcLRgECfyABIAAoArjgASICRwRAIAAgAjYCxOABIAAgATYCuOABIAAoArzgASEDIAAgATYCvOABIAAgASADIAJrajYCwOABCwutAgIEfwF+IwBBQGoiBCQAAkACQCACQQhJDQAgASgAAEFwcUHQ1LTCAUcNACABIAIQIiEBIABCADcDCCAAQQA2AgQgACABNgIADAELIARBGGogASACEC0iAxADBEAgACADEBoMAQsgAwRAIABBuH8QGgwBCyACIAQoAjAiA2shAiABIANqIQMDQAJAIAAgAyACIARBCGoQLCIFEAMEfyAFBSACIAVBA2oiBU8NAUG4fwsQGgwCCyAGQQFqIQYgAiAFayECIAMgBWohAyAEKAIMRQ0ACyAEKAI4BEAgAkEDTQRAIABBuH8QGgwCCyADQQRqIQMLIAQoAighAiAEKQMYIQcgAEEANgIEIAAgAyABazYCACAAIAIgBmytIAcgB0J/URs3AwgLIARBQGskAAslAQF/IwBBEGsiAiQAIAIgACABEFEgAigCACEAIAJBEGokACAAC30BBH8jAEGQBGsiBCQAIARB/wE2AggCQCAEQRBqIARBCGogBEEMaiABIAIQFSIGEAMEQCAGIQUMAQtBVCEFIAQoAgwiB0EGSw0AIAMgBEEQaiAEKAIIIAcQQSIFEAMNACAAIAEgBmogAiAGayADEDwhBQsgBEGQBGokACAFC4cBAgJ/An5BABAWIQMCQANAIAEgA08EQAJAIAAoAABBcHFB0NS0wgFGBEAgACABECIiAhADRQ0BQn4PCyAAIAEQVSIEQn1WDQMgBCAFfCIFIARUIQJCfiEEIAINAyAAIAEQUiICEAMNAwsgASACayEBIAAgAmohAAwBCwtCfiAFIAEbIQQLIAQLPwIBfwF+IwBBMGsiAiQAAn5CfiACQQhqIAAgARAtDQAaQgAgAigCHEEBRg0AGiACKQMICyEDIAJBMGokACADC40BAQJ/IwBBMGsiASQAAkAgAEUNACAAKAKI4gENACABIABB/OEBaigCADYCKCABIAApAvThATcDICAAEDAgACgCqOIBIQIgASABKAIoNgIYIAEgASkDIDcDECACIAFBEGoQGyAAQQA2AqjiASABIAEoAig2AgggASABKQMgNwMAIAAgARAbCyABQTBqJAALKgECfyMAQRBrIgAkACAAQQA2AgggAEIANwMAIAAQWCEBIABBEGokACABC4cBAQN/IwBBEGsiAiQAAkAgACgCAEUgACgCBEVzDQAgAiAAKAIINgIIIAIgACkCADcDAAJ/IAIoAgAiAQRAIAIoAghBqOMJIAERBQAMAQtBqOMJECgLIgFFDQAgASAAKQIANwL04QEgAUH84QFqIAAoAgg2AgAgARBZIAEhAwsgAkEQaiQAIAMLywEBAn8jAEEgayIBJAAgAEGBgIDAADYCtOIBIABBADYCiOIBIABBADYC7OEBIABCADcDkOIBIABBADYCpOMJIABBADYC3OIBIABCADcCzOIBIABBADYCvOIBIABBADYCxOABIABCADcCnOIBIABBpOIBakIANwIAIABBrOIBakEANgIAIAFCADcCECABQgA3AhggASABKQMYNwMIIAEgASkDEDcDACABKAIIQQh2QQFxIQIgAEEANgLg4gEgACACNgKM4gEgAUEgaiQAC3YBA38jAEEwayIBJAAgAARAIAEgAEHE0AFqIgIoAgA2AiggASAAKQK80AE3AyAgACgCACEDIAEgAigCADYCGCABIAApArzQATcDECADIAFBEGoQGyABIAEoAig2AgggASABKQMgNwMAIAAgARAbCyABQTBqJAALzAEBAX8gACABKAK00AE2ApjiASAAIAEoAgQiAjYCwOABIAAgAjYCvOABIAAgAiABKAIIaiICNgK44AEgACACNgLE4AEgASgCuNABBEAgAEKBgICAEDcDiOEBIAAgAUGk0ABqNgIMIAAgAUGUIGo2AgggACABQZwwajYCBCAAIAFBDGo2AgAgAEGs0AFqIAFBqNABaigCADYCACAAQbDQAWogAUGs0AFqKAIANgIAIABBtNABaiABQbDQAWooAgA2AgAPCyAAQgA3A4jhAQs7ACACRQRAQbp/DwsgBEUEQEFsDwsgAiAEEGAEQCAAIAEgAiADIAQgBRBhDwsgACABIAIgAyAEIAUQZQtGAQF/IwBBEGsiBSQAIAVBCGogBBAOAn8gBS0ACQRAIAAgASACIAMgBBAyDAELIAAgASACIAMgBBA0CyEAIAVBEGokACAACzQAIAAgAyAEIAUQNiIFEAMEQCAFDwsgBSAESQR/IAEgAiADIAVqIAQgBWsgABA1BUG4fwsLRgEBfyMAQRBrIgUkACAFQQhqIAQQDgJ/IAUtAAkEQCAAIAEgAiADIAQQYgwBCyAAIAEgAiADIAQQNQshACAFQRBqJAAgAAtZAQF/QQ8hAiABIABJBEAgAUEEdCAAbiECCyAAQQh2IgEgAkEYbCIAQYwIaigCAGwgAEGICGooAgBqIgJBA3YgAmogAEGACGooAgAgAEGECGooAgAgAWxqSQs3ACAAIAMgBCAFQYAQEDMiBRADBEAgBQ8LIAUgBEkEfyABIAIgAyAFaiAEIAVrIAAQMgVBuH8LC78DAQN/IwBBIGsiBSQAIAVBCGogAiADEAYiAhADRQRAIAAgAWoiB0F9aiEGIAUgBBAOIARBBGohAiAFLQACIQMDQEEAIAAgBkkgBUEIahAEGwRAIAAgAiAFQQhqIAMQAkECdGoiBC8BADsAACAFQQhqIAQtAAIQASAAIAQtAANqIgQgAiAFQQhqIAMQAkECdGoiAC8BADsAACAFQQhqIAAtAAIQASAEIAAtAANqIQAMAQUgB0F+aiEEA0AgBUEIahAEIAAgBEtyRQRAIAAgAiAFQQhqIAMQAkECdGoiBi8BADsAACAFQQhqIAYtAAIQASAAIAYtAANqIQAMAQsLA0AgACAES0UEQCAAIAIgBUEIaiADEAJBAnRqIgYvAQA7AAAgBUEIaiAGLQACEAEgACAGLQADaiEADAELCwJAIAAgB08NACAAIAIgBUEIaiADEAIiA0ECdGoiAC0AADoAACAALQADQQFGBEAgBUEIaiAALQACEAEMAQsgBSgCDEEfSw0AIAVBCGogAiADQQJ0ai0AAhABIAUoAgxBIUkNACAFQSA2AgwLIAFBbCAFQQhqEAobIQILCwsgBUEgaiQAIAILkgIBBH8jAEFAaiIJJAAgCSADQTQQCyEDAkAgBEECSA0AIAMgBEECdGooAgAhCSADQTxqIAgQIyADQQE6AD8gAyACOgA+QQAhBCADKAI8IQoDQCAEIAlGDQEgACAEQQJ0aiAKNgEAIARBAWohBAwAAAsAC0EAIQkDQCAGIAlGRQRAIAMgBSAJQQF0aiIKLQABIgtBAnRqIgwoAgAhBCADQTxqIAotAABBCHQgCGpB//8DcRAjIANBAjoAPyADIAcgC2siCiACajoAPiAEQQEgASAKa3RqIQogAygCPCELA0AgACAEQQJ0aiALNgEAIARBAWoiBCAKSQ0ACyAMIAo2AgAgCUEBaiEJDAELCyADQUBrJAALowIBCX8jAEHQAGsiCSQAIAlBEGogBUE0EAsaIAcgBmshDyAHIAFrIRADQAJAIAMgCkcEQEEBIAEgByACIApBAXRqIgYtAAEiDGsiCGsiC3QhDSAGLQAAIQ4gCUEQaiAMQQJ0aiIMKAIAIQYgCyAPTwRAIAAgBkECdGogCyAIIAUgCEE0bGogCCAQaiIIQQEgCEEBShsiCCACIAQgCEECdGooAgAiCEEBdGogAyAIayAHIA4QYyAGIA1qIQgMAgsgCUEMaiAOECMgCUEBOgAPIAkgCDoADiAGIA1qIQggCSgCDCELA0AgBiAITw0CIAAgBkECdGogCzYBACAGQQFqIQYMAAALAAsgCUHQAGokAA8LIAwgCDYCACAKQQFqIQoMAAALAAs0ACAAIAMgBCAFEDYiBRADBEAgBQ8LIAUgBEkEfyABIAIgAyAFaiAEIAVrIAAQNAVBuH8LCyMAIAA/AEEQdGtB//8DakEQdkAAQX9GBEBBAA8LQQAQAEEBCzsBAX8gAgRAA0AgACABIAJBgCAgAkGAIEkbIgMQCyEAIAFBgCBqIQEgAEGAIGohACACIANrIgINAAsLCwYAIAAQAwsLqBUJAEGICAsNAQAAAAEAAAACAAAAAgBBoAgLswYBAAAAAQAAAAIAAAACAAAAJgAAAIIAAAAhBQAASgAAAGcIAAAmAAAAwAEAAIAAAABJBQAASgAAAL4IAAApAAAALAIAAIAAAABJBQAASgAAAL4IAAAvAAAAygIAAIAAAACKBQAASgAAAIQJAAA1AAAAcwMAAIAAAACdBQAASgAAAKAJAAA9AAAAgQMAAIAAAADrBQAASwAAAD4KAABEAAAAngMAAIAAAABNBgAASwAAAKoKAABLAAAAswMAAIAAAADBBgAATQAAAB8NAABNAAAAUwQAAIAAAAAjCAAAUQAAAKYPAABUAAAAmQQAAIAAAABLCQAAVwAAALESAABYAAAA2gQAAIAAAABvCQAAXQAAACMUAABUAAAARQUAAIAAAABUCgAAagAAAIwUAABqAAAArwUAAIAAAAB2CQAAfAAAAE4QAAB8AAAA0gIAAIAAAABjBwAAkQAAAJAHAACSAAAAAAAAAAEAAAABAAAABQAAAA0AAAAdAAAAPQAAAH0AAAD9AAAA/QEAAP0DAAD9BwAA/Q8AAP0fAAD9PwAA/X8AAP3/AAD9/wEA/f8DAP3/BwD9/w8A/f8fAP3/PwD9/38A/f//AP3//wH9//8D/f//B/3//w/9//8f/f//P/3//38AAAAAAQAAAAIAAAADAAAABAAAAAUAAAAGAAAABwAAAAgAAAAJAAAACgAAAAsAAAAMAAAADQAAAA4AAAAPAAAAEAAAABEAAAASAAAAEwAAABQAAAAVAAAAFgAAABcAAAAYAAAAGQAAABoAAAAbAAAAHAAAAB0AAAAeAAAAHwAAAAMAAAAEAAAABQAAAAYAAAAHAAAACAAAAAkAAAAKAAAACwAAAAwAAAANAAAADgAAAA8AAAAQAAAAEQAAABIAAAATAAAAFAAAABUAAAAWAAAAFwAAABgAAAAZAAAAGgAAABsAAAAcAAAAHQAAAB4AAAAfAAAAIAAAACEAAAAiAAAAIwAAACUAAAAnAAAAKQAAACsAAAAvAAAAMwAAADsAAABDAAAAUwAAAGMAAACDAAAAAwEAAAMCAAADBAAAAwgAAAMQAAADIAAAA0AAAAOAAAADAAEAQeAPC1EBAAAAAQAAAAEAAAABAAAAAgAAAAIAAAADAAAAAwAAAAQAAAAEAAAABQAAAAcAAAAIAAAACQAAAAoAAAALAAAADAAAAA0AAAAOAAAADwAAABAAQcQQC4sBAQAAAAIAAAADAAAABAAAAAUAAAAGAAAABwAAAAgAAAAJAAAACgAAAAsAAAAMAAAADQAAAA4AAAAPAAAAEAAAABIAAAAUAAAAFgAAABgAAAAcAAAAIAAAACgAAAAwAAAAQAAAAIAAAAAAAQAAAAIAAAAEAAAACAAAABAAAAAgAAAAQAAAAIAAAAAAAQBBkBIL5gQBAAAAAQAAAAEAAAABAAAAAgAAAAIAAAADAAAAAwAAAAQAAAAGAAAABwAAAAgAAAAJAAAACgAAAAsAAAAMAAAADQAAAA4AAAAPAAAAEAAAAAEAAAAEAAAACAAAAAAAAAABAAEBBgAAAAAAAAQAAAAAEAAABAAAAAAgAAAFAQAAAAAAAAUDAAAAAAAABQQAAAAAAAAFBgAAAAAAAAUHAAAAAAAABQkAAAAAAAAFCgAAAAAAAAUMAAAAAAAABg4AAAAAAAEFEAAAAAAAAQUUAAAAAAABBRYAAAAAAAIFHAAAAAAAAwUgAAAAAAAEBTAAAAAgAAYFQAAAAAAABwWAAAAAAAAIBgABAAAAAAoGAAQAAAAADAYAEAAAIAAABAAAAAAAAAAEAQAAAAAAAAUCAAAAIAAABQQAAAAAAAAFBQAAACAAAAUHAAAAAAAABQgAAAAgAAAFCgAAAAAAAAULAAAAAAAABg0AAAAgAAEFEAAAAAAAAQUSAAAAIAABBRYAAAAAAAIFGAAAACAAAwUgAAAAAAADBSgAAAAAAAYEQAAAABAABgRAAAAAIAAHBYAAAAAAAAkGAAIAAAAACwYACAAAMAAABAAAAAAQAAAEAQAAACAAAAUCAAAAIAAABQMAAAAgAAAFBQAAACAAAAUGAAAAIAAABQgAAAAgAAAFCQAAACAAAAULAAAAIAAABQwAAAAAAAAGDwAAACAAAQUSAAAAIAABBRQAAAAgAAIFGAAAACAAAgUcAAAAIAADBSgAAAAgAAQFMAAAAAAAEAYAAAEAAAAPBgCAAAAAAA4GAEAAAAAADQYAIABBgBcLhwIBAAEBBQAAAAAAAAUAAAAAAAAGBD0AAAAAAAkF/QEAAAAADwX9fwAAAAAVBf3/HwAAAAMFBQAAAAAABwR9AAAAAAAMBf0PAAAAABIF/f8DAAAAFwX9/38AAAAFBR0AAAAAAAgE/QAAAAAADgX9PwAAAAAUBf3/DwAAAAIFAQAAABAABwR9AAAAAAALBf0HAAAAABEF/f8BAAAAFgX9/z8AAAAEBQ0AAAAQAAgE/QAAAAAADQX9HwAAAAATBf3/BwAAAAEFAQAAABAABgQ9AAAAAAAKBf0DAAAAABAF/f8AAAAAHAX9//8PAAAbBf3//wcAABoF/f//AwAAGQX9//8BAAAYBf3//wBBkBkLhgQBAAEBBgAAAAAAAAYDAAAAAAAABAQAAAAgAAAFBQAAAAAAAAUGAAAAAAAABQgAAAAAAAAFCQAAAAAAAAULAAAAAAAABg0AAAAAAAAGEAAAAAAAAAYTAAAAAAAABhYAAAAAAAAGGQAAAAAAAAYcAAAAAAAABh8AAAAAAAAGIgAAAAAAAQYlAAAAAAABBikAAAAAAAIGLwAAAAAAAwY7AAAAAAAEBlMAAAAAAAcGgwAAAAAACQYDAgAAEAAABAQAAAAAAAAEBQAAACAAAAUGAAAAAAAABQcAAAAgAAAFCQAAAAAAAAUKAAAAAAAABgwAAAAAAAAGDwAAAAAAAAYSAAAAAAAABhUAAAAAAAAGGAAAAAAAAAYbAAAAAAAABh4AAAAAAAAGIQAAAAAAAQYjAAAAAAABBicAAAAAAAIGKwAAAAAAAwYzAAAAAAAEBkMAAAAAAAUGYwAAAAAACAYDAQAAIAAABAQAAAAwAAAEBAAAABAAAAQFAAAAIAAABQcAAAAgAAAFCAAAACAAAAUKAAAAIAAABQsAAAAAAAAGDgAAAAAAAAYRAAAAAAAABhQAAAAAAAAGFwAAAAAAAAYaAAAAAAAABh0AAAAAAAAGIAAAAAAAEAYDAAEAAAAPBgOAAAAAAA4GA0AAAAAADQYDIAAAAAAMBgMQAAAAAAsGAwgAAAAACgYDBABBpB0L2QEBAAAAAwAAAAcAAAAPAAAAHwAAAD8AAAB/AAAA/wAAAP8BAAD/AwAA/wcAAP8PAAD/HwAA/z8AAP9/AAD//wAA//8BAP//AwD//wcA//8PAP//HwD//z8A//9/AP///wD///8B////A////wf///8P////H////z////9/AAAAAAEAAAACAAAABAAAAAAAAAACAAAABAAAAAgAAAAAAAAAAQAAAAIAAAABAAAABAAAAAQAAAAEAAAABAAAAAgAAAAIAAAACAAAAAcAAAAIAAAACQAAAAoAAAALAEGgIAsDwBBQ"; + }, + 4836: function (e) { + (e.exports = function (e) { + return e && e.__esModule ? e : { default: e }; + }), + (e.exports.__esModule = !0), + (e.exports.default = e.exports); + }, + 907: function (e, t, n) { + "use strict"; + function r(e, t) { + (null == t || t > e.length) && (t = e.length); + for (var n = 0, r = new Array(t); n < t; n++) r[n] = e[n]; + return r; + } + n.d(t, { + Z: function () { + return r; + }, + }); + }, + 3878: function (e, t, n) { + "use strict"; + function r(e) { + if (Array.isArray(e)) return e; + } + n.d(t, { + Z: function () { + return r; + }, + }); + }, + 7326: function (e, t, n) { + "use strict"; + function r(e) { + if (void 0 === e) + throw new ReferenceError( + "this hasn't been initialised - super() hasn't been called" + ); + return e; + } + n.d(t, { + Z: function () { + return r; + }, + }); + }, + 5861: function (e, t, n) { + "use strict"; + function r(e, t, n, r, i, a, o) { + try { + var s = e[a](o), + l = s.value; + } catch (u) { + return void n(u); + } + s.done ? t(l) : Promise.resolve(l).then(r, i); + } + function i(e) { + return function () { + var t = this, + n = arguments; + return new Promise(function (i, a) { + var o = e.apply(t, n); + function s(e) { + r(o, i, a, s, l, "next", e); + } + function l(e) { + r(o, i, a, s, l, "throw", e); + } + s(void 0); + }); + }; + } + n.d(t, { + Z: function () { + return i; + }, + }); + }, + 5671: function (e, t, n) { + "use strict"; + function r(e, t) { + if (!(e instanceof t)) + throw new TypeError("Cannot call a class as a function"); + } + n.d(t, { + Z: function () { + return r; + }, + }); + }, + 5647: function (e, t, n) { + "use strict"; + n.d(t, { + Z: function () { + return a; + }, + }); + var r = n(9611), + i = n(8814); + function a(e, t, n) { + return ( + (a = (0, i.Z)() + ? Reflect.construct.bind() + : function (e, t, n) { + var i = [null]; + i.push.apply(i, t); + var a = new (Function.bind.apply(e, i))(); + return n && (0, r.Z)(a, n.prototype), a; + }), + a.apply(null, arguments) + ); + } + }, + 3144: function (e, t, n) { + "use strict"; + n.d(t, { + Z: function () { + return a; + }, + }); + var r = n(9142); + function i(e, t) { + for (var n = 0; n < t.length; n++) { + var i = t[n]; + (i.enumerable = i.enumerable || !1), + (i.configurable = !0), + "value" in i && (i.writable = !0), + Object.defineProperty(e, (0, r.Z)(i.key), i); + } + } + function a(e, t, n) { + return ( + t && i(e.prototype, t), + n && i(e, n), + Object.defineProperty(e, "prototype", { writable: !1 }), + e + ); + } + }, + 7762: function (e, t, n) { + "use strict"; + n.d(t, { + Z: function () { + return i; + }, + }); + var r = n(181); + function i(e, t) { + var n = + ("undefined" !== typeof Symbol && e[Symbol.iterator]) || + e["@@iterator"]; + if (!n) { + if ( + Array.isArray(e) || + (n = (0, r.Z)(e)) || + (t && e && "number" === typeof e.length) + ) { + n && (e = n); + var i = 0, + a = function () {}; + return { + s: a, + n: function () { + return i >= e.length + ? { done: !0 } + : { done: !1, value: e[i++] }; + }, + e: function (e) { + throw e; + }, + f: a, + }; + } + throw new TypeError( + "Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method." + ); + } + var o, + s = !0, + l = !1; + return { + s: function () { + n = n.call(e); + }, + n: function () { + var e = n.next(); + return (s = e.done), e; + }, + e: function (e) { + (l = !0), (o = e); + }, + f: function () { + try { + s || null == n.return || n.return(); + } finally { + if (l) throw o; + } + }, + }; + } + }, + 9388: function (e, t, n) { + "use strict"; + n.d(t, { + Z: function () { + return o; + }, + }); + var r = n(1120), + i = n(8814), + a = n(2963); + function o(e) { + var t = (0, i.Z)(); + return function () { + var n, + i = (0, r.Z)(e); + if (t) { + var o = (0, r.Z)(this).constructor; + n = Reflect.construct(i, arguments, o); + } else n = i.apply(this, arguments); + return (0, a.Z)(this, n); + }; + } + }, + 4942: function (e, t, n) { + "use strict"; + n.d(t, { + Z: function () { + return i; + }, + }); + var r = n(9142); + function i(e, t, n) { + return ( + (t = (0, r.Z)(t)) in e + ? Object.defineProperty(e, t, { + value: n, + enumerable: !0, + configurable: !0, + writable: !0, + }) + : (e[t] = n), + e + ); + } + }, + 7462: function (e, t, n) { + "use strict"; + function r() { + return ( + (r = 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; + }), + r.apply(this, arguments) + ); + } + n.d(t, { + Z: function () { + return r; + }, + }); + }, + 1752: function (e, t, n) { + "use strict"; + n.d(t, { + Z: function () { + return i; + }, + }); + var r = n(1120); + function i() { + return ( + (i = + "undefined" !== typeof Reflect && Reflect.get + ? Reflect.get.bind() + : function (e, t, n) { + var i = (function (e, t) { + for ( + ; + !Object.prototype.hasOwnProperty.call(e, t) && + null !== (e = (0, r.Z)(e)); + + ); + return e; + })(e, t); + if (i) { + var a = Object.getOwnPropertyDescriptor(i, t); + return a.get + ? a.get.call(arguments.length < 3 ? e : n) + : a.value; + } + }), + i.apply(this, arguments) + ); + } + }, + 1120: function (e, t, n) { + "use strict"; + function r(e) { + return ( + (r = Object.setPrototypeOf + ? Object.getPrototypeOf.bind() + : function (e) { + return e.__proto__ || Object.getPrototypeOf(e); + }), + r(e) + ); + } + n.d(t, { + Z: function () { + return r; + }, + }); + }, + 136: function (e, t, n) { + "use strict"; + n.d(t, { + Z: function () { + return i; + }, + }); + var r = n(9611); + function i(e, t) { + if ("function" !== typeof t && null !== t) + throw new TypeError( + "Super expression must either be null or a function" + ); + (e.prototype = Object.create(t && t.prototype, { + constructor: { value: e, writable: !0, configurable: !0 }, + })), + Object.defineProperty(e, "prototype", { writable: !1 }), + t && (0, r.Z)(e, t); + } + }, + 8814: function (e, t, n) { + "use strict"; + function r() { + if ("undefined" === typeof Reflect || !Reflect.construct) return !1; + if (Reflect.construct.sham) return !1; + if ("function" === typeof Proxy) return !0; + try { + return ( + Boolean.prototype.valueOf.call( + Reflect.construct(Boolean, [], function () {}) + ), + !0 + ); + } catch (e) { + return !1; + } + } + n.d(t, { + Z: function () { + return r; + }, + }); + }, + 9199: function (e, t, n) { + "use strict"; + function r(e) { + if ( + ("undefined" !== typeof Symbol && null != e[Symbol.iterator]) || + null != e["@@iterator"] + ) + return Array.from(e); + } + n.d(t, { + Z: function () { + return r; + }, + }); + }, + 5267: function (e, t, n) { + "use strict"; + function r() { + throw new TypeError( + "Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method." + ); + } + n.d(t, { + Z: function () { + return r; + }, + }); + }, + 1413: function (e, t, n) { + "use strict"; + n.d(t, { + Z: function () { + return a; + }, + }); + var r = n(4942); + function i(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 a(e) { + for (var t = 1; t < arguments.length; t++) { + var n = null != arguments[t] ? arguments[t] : {}; + t % 2 + ? i(Object(n), !0).forEach(function (t) { + (0, r.Z)(e, t, n[t]); + }) + : Object.getOwnPropertyDescriptors + ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) + : i(Object(n)).forEach(function (t) { + Object.defineProperty( + e, + t, + Object.getOwnPropertyDescriptor(n, t) + ); + }); + } + return e; + } + }, + 3366: function (e, t, n) { + "use strict"; + function r(e, t) { + if (null == e) return {}; + var n, + r, + i = {}, + a = Object.keys(e); + for (r = 0; r < a.length; r++) + (n = a[r]), t.indexOf(n) >= 0 || (i[n] = e[n]); + return i; + } + n.d(t, { + Z: function () { + return r; + }, + }); + }, + 2963: function (e, t, n) { + "use strict"; + n.d(t, { + Z: function () { + return a; + }, + }); + var r = n(1002), + i = n(7326); + function a(e, t) { + if (t && ("object" === (0, r.Z)(t) || "function" === typeof t)) + return t; + if (void 0 !== t) + throw new TypeError( + "Derived constructors may only return object or undefined" + ); + return (0, i.Z)(e); + } + }, + 4165: function (e, t, n) { + "use strict"; + n.d(t, { + Z: function () { + return i; + }, + }); + var r = n(1002); + function i() { + i = function () { + return t; + }; + var e, + t = {}, + n = Object.prototype, + a = n.hasOwnProperty, + o = + Object.defineProperty || + function (e, t, n) { + e[t] = n.value; + }, + s = "function" == typeof Symbol ? Symbol : {}, + l = s.iterator || "@@iterator", + u = s.asyncIterator || "@@asyncIterator", + c = s.toStringTag || "@@toStringTag"; + function f(e, t, n) { + return ( + Object.defineProperty(e, t, { + value: n, + enumerable: !0, + configurable: !0, + writable: !0, + }), + e[t] + ); + } + try { + f({}, ""); + } catch (e) { + f = function (e, t, n) { + return (e[t] = n); + }; + } + function d(e, t, n, r) { + var i = t && t.prototype instanceof y ? t : y, + a = Object.create(i.prototype), + s = new B(r || []); + return o(a, "_invoke", { value: M(e, n, s) }), a; + } + function h(e, t, n) { + try { + return { type: "normal", arg: e.call(t, n) }; + } catch (e) { + return { type: "throw", arg: e }; + } + } + t.wrap = d; + var p = "suspendedStart", + v = "suspendedYield", + m = "executing", + g = "completed", + A = {}; + function y() {} + function b() {} + function x() {} + var S = {}; + f(S, l, function () { + return this; + }); + var E = Object.getPrototypeOf, + _ = E && E(E(P([]))); + _ && _ !== n && a.call(_, l) && (S = _); + var C = (x.prototype = y.prototype = Object.create(S)); + function w(e) { + ["next", "throw", "return"].forEach(function (t) { + f(e, t, function (e) { + return this._invoke(t, e); + }); + }); + } + function T(e, t) { + function n(i, o, s, l) { + var u = h(e[i], e, o); + if ("throw" !== u.type) { + var c = u.arg, + f = c.value; + return f && "object" == (0, r.Z)(f) && a.call(f, "__await") + ? t.resolve(f.__await).then( + function (e) { + n("next", e, s, l); + }, + function (e) { + n("throw", e, s, l); + } + ) + : t.resolve(f).then( + function (e) { + (c.value = e), s(c); + }, + function (e) { + return n("throw", e, s, l); + } + ); + } + l(u.arg); + } + var i; + o(this, "_invoke", { + value: function (e, r) { + function a() { + return new t(function (t, i) { + n(e, r, t, i); + }); + } + return (i = i ? i.then(a, a) : a()); + }, + }); + } + function M(t, n, r) { + var i = p; + return function (a, o) { + if (i === m) throw new Error("Generator is already running"); + if (i === g) { + if ("throw" === a) throw o; + return { value: e, done: !0 }; + } + for (r.method = a, r.arg = o; ; ) { + var s = r.delegate; + if (s) { + var l = I(s, r); + if (l) { + if (l === A) continue; + return l; + } + } + if ("next" === r.method) r.sent = r._sent = r.arg; + else if ("throw" === r.method) { + if (i === p) throw ((i = g), r.arg); + r.dispatchException(r.arg); + } else "return" === r.method && r.abrupt("return", r.arg); + i = m; + var u = h(t, n, r); + if ("normal" === u.type) { + if (((i = r.done ? g : v), u.arg === A)) continue; + return { value: u.arg, done: r.done }; + } + "throw" === u.type && + ((i = g), (r.method = "throw"), (r.arg = u.arg)); + } + }; + } + function I(t, n) { + var r = n.method, + i = t.iterator[r]; + if (i === e) + return ( + (n.delegate = null), + ("throw" === r && + t.iterator.return && + ((n.method = "return"), + (n.arg = e), + I(t, n), + "throw" === n.method)) || + ("return" !== r && + ((n.method = "throw"), + (n.arg = new TypeError( + "The iterator does not provide a '" + r + "' method" + )))), + A + ); + var a = h(i, t.iterator, n.arg); + if ("throw" === a.type) + return ( + (n.method = "throw"), (n.arg = a.arg), (n.delegate = null), A + ); + var o = a.arg; + return o + ? o.done + ? ((n[t.resultName] = o.value), + (n.next = t.nextLoc), + "return" !== n.method && ((n.method = "next"), (n.arg = e)), + (n.delegate = null), + A) + : o + : ((n.method = "throw"), + (n.arg = new TypeError("iterator result is not an object")), + (n.delegate = null), + A); + } + function k(e) { + var t = { tryLoc: e[0] }; + 1 in e && (t.catchLoc = e[1]), + 2 in e && ((t.finallyLoc = e[2]), (t.afterLoc = e[3])), + this.tryEntries.push(t); + } + function R(e) { + var t = e.completion || {}; + (t.type = "normal"), delete t.arg, (e.completion = t); + } + function B(e) { + (this.tryEntries = [{ tryLoc: "root" }]), + e.forEach(k, this), + this.reset(!0); + } + function P(t) { + if (t || "" === t) { + var n = t[l]; + if (n) return n.call(t); + if ("function" == typeof t.next) return t; + if (!isNaN(t.length)) { + var i = -1, + o = function n() { + for (; ++i < t.length; ) + if (a.call(t, i)) + return (n.value = t[i]), (n.done = !1), n; + return (n.value = e), (n.done = !0), n; + }; + return (o.next = o); + } + } + throw new TypeError((0, r.Z)(t) + " is not iterable"); + } + return ( + (b.prototype = x), + o(C, "constructor", { value: x, configurable: !0 }), + o(x, "constructor", { value: b, configurable: !0 }), + (b.displayName = f(x, c, "GeneratorFunction")), + (t.isGeneratorFunction = function (e) { + var t = "function" == typeof e && e.constructor; + return ( + !!t && + (t === b || "GeneratorFunction" === (t.displayName || t.name)) + ); + }), + (t.mark = function (e) { + return ( + Object.setPrototypeOf + ? Object.setPrototypeOf(e, x) + : ((e.__proto__ = x), f(e, c, "GeneratorFunction")), + (e.prototype = Object.create(C)), + e + ); + }), + (t.awrap = function (e) { + return { __await: e }; + }), + w(T.prototype), + f(T.prototype, u, function () { + return this; + }), + (t.AsyncIterator = T), + (t.async = function (e, n, r, i, a) { + void 0 === a && (a = Promise); + var o = new T(d(e, n, r, i), a); + return t.isGeneratorFunction(n) + ? o + : o.next().then(function (e) { + return e.done ? e.value : o.next(); + }); + }), + w(C), + f(C, c, "Generator"), + f(C, l, function () { + return this; + }), + f(C, "toString", function () { + return "[object Generator]"; + }), + (t.keys = function (e) { + var t = Object(e), + n = []; + for (var r in t) n.push(r); + return ( + n.reverse(), + function e() { + for (; n.length; ) { + var r = n.pop(); + if (r in t) return (e.value = r), (e.done = !1), e; + } + return (e.done = !0), e; + } + ); + }), + (t.values = P), + (B.prototype = { + constructor: B, + reset: function (t) { + if ( + ((this.prev = 0), + (this.next = 0), + (this.sent = this._sent = e), + (this.done = !1), + (this.delegate = null), + (this.method = "next"), + (this.arg = e), + this.tryEntries.forEach(R), + !t) + ) + for (var n in this) + "t" === n.charAt(0) && + a.call(this, n) && + !isNaN(+n.slice(1)) && + (this[n] = e); + }, + stop: function () { + this.done = !0; + var e = this.tryEntries[0].completion; + if ("throw" === e.type) throw e.arg; + return this.rval; + }, + dispatchException: function (t) { + if (this.done) throw t; + var n = this; + function r(r, i) { + return ( + (s.type = "throw"), + (s.arg = t), + (n.next = r), + i && ((n.method = "next"), (n.arg = e)), + !!i + ); + } + for (var i = this.tryEntries.length - 1; i >= 0; --i) { + var o = this.tryEntries[i], + s = o.completion; + if ("root" === o.tryLoc) return r("end"); + if (o.tryLoc <= this.prev) { + var l = a.call(o, "catchLoc"), + u = a.call(o, "finallyLoc"); + if (l && u) { + if (this.prev < o.catchLoc) return r(o.catchLoc, !0); + if (this.prev < o.finallyLoc) return r(o.finallyLoc); + } else if (l) { + if (this.prev < o.catchLoc) return r(o.catchLoc, !0); + } else { + if (!u) + throw new Error( + "try statement without catch or finally" + ); + if (this.prev < o.finallyLoc) return r(o.finallyLoc); + } + } + } + }, + abrupt: function (e, t) { + for (var n = this.tryEntries.length - 1; n >= 0; --n) { + var r = this.tryEntries[n]; + if ( + r.tryLoc <= this.prev && + a.call(r, "finallyLoc") && + this.prev < r.finallyLoc + ) { + var i = r; + break; + } + } + i && + ("break" === e || "continue" === e) && + i.tryLoc <= t && + t <= i.finallyLoc && + (i = null); + var o = i ? i.completion : {}; + return ( + (o.type = e), + (o.arg = t), + i + ? ((this.method = "next"), (this.next = i.finallyLoc), A) + : this.complete(o) + ); + }, + complete: function (e, t) { + if ("throw" === e.type) throw e.arg; + return ( + "break" === e.type || "continue" === e.type + ? (this.next = e.arg) + : "return" === e.type + ? ((this.rval = this.arg = e.arg), + (this.method = "return"), + (this.next = "end")) + : "normal" === e.type && t && (this.next = t), + A + ); + }, + finish: function (e) { + for (var t = this.tryEntries.length - 1; t >= 0; --t) { + var n = this.tryEntries[t]; + if (n.finallyLoc === e) + return this.complete(n.completion, n.afterLoc), R(n), A; + } + }, + catch: function (e) { + for (var t = this.tryEntries.length - 1; t >= 0; --t) { + var n = this.tryEntries[t]; + if (n.tryLoc === e) { + var r = n.completion; + if ("throw" === r.type) { + var i = r.arg; + R(n); + } + return i; + } + } + throw new Error("illegal catch attempt"); + }, + delegateYield: function (t, n, r) { + return ( + (this.delegate = { + iterator: P(t), + resultName: n, + nextLoc: r, + }), + "next" === this.method && (this.arg = e), + A + ); + }, + }), + t + ); + } + }, + 9611: function (e, t, n) { + "use strict"; + function r(e, t) { + return ( + (r = Object.setPrototypeOf + ? Object.setPrototypeOf.bind() + : function (e, t) { + return (e.__proto__ = t), e; + }), + r(e, t) + ); + } + n.d(t, { + Z: function () { + return r; + }, + }); + }, + 9439: function (e, t, n) { + "use strict"; + n.d(t, { + Z: function () { + return o; + }, + }); + var r = n(3878); + var i = n(181), + a = n(5267); + function o(e, t) { + return ( + (0, r.Z)(e) || + (function (e, t) { + var n = + null == e + ? null + : ("undefined" != typeof Symbol && e[Symbol.iterator]) || + e["@@iterator"]; + if (null != n) { + var r, + i, + a, + o, + s = [], + l = !0, + u = !1; + try { + if (((a = (n = n.call(e)).next), 0 === t)) { + if (Object(n) !== n) return; + l = !1; + } else + for ( + ; + !(l = (r = a.call(n)).done) && + (s.push(r.value), s.length !== t); + l = !0 + ); + } catch (e) { + (u = !0), (i = e); + } finally { + try { + if ( + !l && + null != n.return && + ((o = n.return()), Object(o) !== o) + ) + return; + } finally { + if (u) throw i; + } + } + return s; + } + })(e, t) || + (0, i.Z)(e, t) || + (0, a.Z)() + ); + } + }, + 3433: function (e, t, n) { + "use strict"; + n.d(t, { + Z: function () { + return o; + }, + }); + var r = n(907); + var i = n(9199), + a = n(181); + function o(e) { + return ( + (function (e) { + if (Array.isArray(e)) return (0, r.Z)(e); + })(e) || + (0, i.Z)(e) || + (0, a.Z)(e) || + (function () { + throw new TypeError( + "Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method." + ); + })() + ); + } + }, + 9142: function (e, t, n) { + "use strict"; + n.d(t, { + Z: function () { + return i; + }, + }); + var r = n(1002); + function i(e) { + var t = (function (e, t) { + if ("object" !== (0, r.Z)(e) || null === e) return e; + var n = e[Symbol.toPrimitive]; + if (void 0 !== n) { + var i = n.call(e, t || "default"); + if ("object" !== (0, r.Z)(i)) return i; + throw new TypeError( + "@@toPrimitive must return a primitive value." + ); + } + return ("string" === t ? String : Number)(e); + })(e, "string"); + return "symbol" === (0, r.Z)(t) ? t : String(t); + } + }, + 1002: function (e, t, n) { + "use strict"; + function r(e) { + return ( + (r = + "function" == typeof Symbol && "symbol" == typeof Symbol.iterator + ? function (e) { + return typeof e; + } + : function (e) { + return e && + "function" == typeof Symbol && + e.constructor === Symbol && + e !== Symbol.prototype + ? "symbol" + : typeof e; + }), + r(e) + ); + } + n.d(t, { + Z: function () { + return r; + }, + }); + }, + 181: function (e, t, n) { + "use strict"; + n.d(t, { + Z: function () { + return i; + }, + }); + var r = n(907); + function i(e, t) { + if (e) { + if ("string" === typeof e) return (0, r.Z)(e, t); + var n = Object.prototype.toString.call(e).slice(8, -1); + return ( + "Object" === n && e.constructor && (n = e.constructor.name), + "Map" === n || "Set" === n + ? Array.from(e) + : "Arguments" === n || + /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n) + ? (0, r.Z)(e, t) + : void 0 + ); + } + } + }, + 8664: function (e, t, n) { + "use strict"; + n.d(t, { + Z: function () { + return o; + }, + }); + var r = n(1120), + i = n(9611); + var a = n(5647); + function o(e) { + var t = "function" === typeof Map ? new Map() : void 0; + return ( + (o = function (e) { + if ( + null === e || + ((n = e), + -1 === Function.toString.call(n).indexOf("[native code]")) + ) + return e; + var n; + if ("function" !== typeof e) + throw new TypeError( + "Super expression must either be null or a function" + ); + if ("undefined" !== typeof t) { + if (t.has(e)) return t.get(e); + t.set(e, o); + } + function o() { + return (0, a.Z)(e, arguments, (0, r.Z)(this).constructor); + } + return ( + (o.prototype = Object.create(e.prototype, { + constructor: { + value: o, + enumerable: !1, + writable: !0, + configurable: !0, + }, + })), + (0, i.Z)(o, e) + ); + }), + o(e) + ); + } + }, + 3733: function (e, t, n) { + "use strict"; + function r(e) { + var t, + n, + i = ""; + if ("string" == typeof e || "number" == typeof e) i += e; + else if ("object" == typeof e) + if (Array.isArray(e)) + for (t = 0; t < e.length; t++) + e[t] && (n = r(e[t])) && (i && (i += " "), (i += n)); + else for (t in e) e[t] && (i && (i += " "), (i += t)); + return i; + } + t.Z = function () { + for (var e, t, n = 0, i = ""; n < arguments.length; ) + (e = arguments[n++]) && (t = r(e)) && (i && (i += " "), (i += t)); + return i; + }; + }, + 2187: function (e, t, n) { + "use strict"; + n.d(t, { + FVZ: function () { + return l; + }, + IJq: function () { + return p; + }, + IgZ: function () { + return y; + }, + LR2: function () { + return A; + }, + MCP: function () { + return v; + }, + Oi: function () { + return a; + }, + OmG: function () { + return m; + }, + bWS: function () { + return x; + }, + c6w: function () { + return o; + }, + e1Y: function () { + return d; + }, + eQx: function () { + return b; + }, + gJS: function () { + return h; + }, + ij3: function () { + return T; + }, + kXg: function () { + return c; + }, + qHj: function () { + return s; + }, + qfi: function () { + return S; + }, + tLr: function () { + return f; + }, + wOb: function () { + return g; + }, + }); + var r = n(3144), + i = n(5671), + a = 0, + o = 2, + s = 1, + l = 2, + u = 64, + c = 0, + f = 9, + d = 15, + h = 16, + p = 22, + v = 37, + m = 43, + g = 76, + A = 83, + y = 97, + b = 100, + x = 103, + S = 109, + E = (0, r.Z)(function e() { + (0, i.Z)(this, e), + (this.vkFormat = c), + (this.typeSize = 1), + (this.pixelWidth = 0), + (this.pixelHeight = 0), + (this.pixelDepth = 0), + (this.layerCount = 0), + (this.faceCount = 1), + (this.supercompressionScheme = a), + (this.levels = []), + (this.dataFormatDescriptor = [ + { + vendorId: 0, + descriptorType: 0, + descriptorBlockSize: 0, + versionNumber: 2, + colorModel: 0, + colorPrimaries: 1, + transferFunction: l, + flags: 0, + texelBlockDimension: [0, 0, 0, 0], + bytesPlane: [0, 0, 0, 0, 0, 0, 0, 0], + samples: [], + }, + ]), + (this.keyValue = {}), + (this.globalData = null); + }), + _ = (function () { + function e(t, n, r, a) { + (0, i.Z)(this, e), + (this._dataView = void 0), + (this._littleEndian = void 0), + (this._offset = void 0), + (this._dataView = new DataView(t.buffer, t.byteOffset + n, r)), + (this._littleEndian = a), + (this._offset = 0); + } + return ( + (0, r.Z)(e, [ + { + key: "_nextUint8", + value: function () { + var e = this._dataView.getUint8(this._offset); + return (this._offset += 1), e; + }, + }, + { + key: "_nextUint16", + value: function () { + var e = this._dataView.getUint16( + this._offset, + this._littleEndian + ); + return (this._offset += 2), e; + }, + }, + { + key: "_nextUint32", + value: function () { + var e = this._dataView.getUint32( + this._offset, + this._littleEndian + ); + return (this._offset += 4), e; + }, + }, + { + key: "_nextUint64", + value: function () { + var e = this._dataView.getUint32( + this._offset, + this._littleEndian + ), + t = this._dataView.getUint32( + this._offset + 4, + this._littleEndian + ), + n = e + Math.pow(2, 32) * t; + return (this._offset += 8), n; + }, + }, + { + key: "_nextInt32", + value: function () { + var e = this._dataView.getInt32( + this._offset, + this._littleEndian + ); + return (this._offset += 4), e; + }, + }, + { + key: "_skip", + value: function (e) { + return (this._offset += e), this; + }, + }, + { + key: "_scan", + value: function (e) { + for ( + var t = + arguments.length > 1 && void 0 !== arguments[1] + ? arguments[1] + : 0, + n = this._offset, + r = 0; + this._dataView.getUint8(this._offset) !== t && r < e; + + ) + r++, this._offset++; + return ( + r < e && this._offset++, + new Uint8Array( + this._dataView.buffer, + this._dataView.byteOffset + n, + r + ) + ); + }, + }, + ]), + e + ); + })(), + C = + ("KTX-Parse v".concat("0.4.5"), + new Uint8Array([0]), + [171, 75, 84, 88, 32, 50, 48, 187, 13, 10, 26, 10]); + function w(e) { + return "undefined" !== typeof TextDecoder + ? new TextDecoder().decode(e) + : Buffer.from(e).toString("utf8"); + } + function T(e) { + var t = new Uint8Array(e.buffer, e.byteOffset, C.length); + if ( + t[0] !== C[0] || + t[1] !== C[1] || + t[2] !== C[2] || + t[3] !== C[3] || + t[4] !== C[4] || + t[5] !== C[5] || + t[6] !== C[6] || + t[7] !== C[7] || + t[8] !== C[8] || + t[9] !== C[9] || + t[10] !== C[10] || + t[11] !== C[11] + ) + throw new Error("Missing KTX 2.0 identifier."); + var n = new E(), + r = 17 * Uint32Array.BYTES_PER_ELEMENT, + i = new _(e, C.length, r, !0); + (n.vkFormat = i._nextUint32()), + (n.typeSize = i._nextUint32()), + (n.pixelWidth = i._nextUint32()), + (n.pixelHeight = i._nextUint32()), + (n.pixelDepth = i._nextUint32()), + (n.layerCount = i._nextUint32()), + (n.faceCount = i._nextUint32()); + var a = i._nextUint32(); + n.supercompressionScheme = i._nextUint32(); + for ( + var o = i._nextUint32(), + s = i._nextUint32(), + l = i._nextUint32(), + c = i._nextUint32(), + f = i._nextUint64(), + d = i._nextUint64(), + h = 3 * a * 8, + p = new _(e, C.length + r, h, !0), + v = 0; + v < a; + v++ + ) + n.levels.push({ + levelData: new Uint8Array( + e.buffer, + e.byteOffset + p._nextUint64(), + p._nextUint64() + ), + uncompressedByteLength: p._nextUint64(), + }); + for ( + var m = new _(e, o, s, !0), + g = { + vendorId: m._skip(4)._nextUint16(), + descriptorType: m._nextUint16(), + versionNumber: m._nextUint16(), + descriptorBlockSize: m._nextUint16(), + colorModel: m._nextUint8(), + colorPrimaries: m._nextUint8(), + transferFunction: m._nextUint8(), + flags: m._nextUint8(), + texelBlockDimension: [ + m._nextUint8(), + m._nextUint8(), + m._nextUint8(), + m._nextUint8(), + ], + bytesPlane: [ + m._nextUint8(), + m._nextUint8(), + m._nextUint8(), + m._nextUint8(), + m._nextUint8(), + m._nextUint8(), + m._nextUint8(), + m._nextUint8(), + ], + samples: [], + }, + A = (g.descriptorBlockSize / 4 - 6) / 4, + y = 0; + y < A; + y++ + ) { + var b = { + bitOffset: m._nextUint16(), + bitLength: m._nextUint8(), + channelType: m._nextUint8(), + samplePosition: [ + m._nextUint8(), + m._nextUint8(), + m._nextUint8(), + m._nextUint8(), + ], + sampleLower: -1 / 0, + sampleUpper: 1 / 0, + }; + b.channelType & u + ? ((b.sampleLower = m._nextInt32()), + (b.sampleUpper = m._nextInt32())) + : ((b.sampleLower = m._nextUint32()), + (b.sampleUpper = m._nextUint32())), + (g.samples[y] = b); + } + (n.dataFormatDescriptor.length = 0), n.dataFormatDescriptor.push(g); + for (var x = new _(e, l, c, !0); x._offset < c; ) { + var S = x._nextUint32(), + T = x._scan(S), + M = w(T), + I = x._scan(S - T.byteLength); + (n.keyValue[M] = M.match(/^ktx/i) ? w(I) : I), + x._offset % 4 && x._skip(4 - (x._offset % 4)); + } + if (d <= 0) return n; + for ( + var k = new _(e, f, d, !0), + R = k._nextUint16(), + B = k._nextUint16(), + P = k._nextUint32(), + L = k._nextUint32(), + D = k._nextUint32(), + U = k._nextUint32(), + F = [], + O = 0; + O < a; + O++ + ) + F.push({ + imageFlags: k._nextUint32(), + rgbSliceByteOffset: k._nextUint32(), + rgbSliceByteLength: k._nextUint32(), + alphaSliceByteOffset: k._nextUint32(), + alphaSliceByteLength: k._nextUint32(), + }); + var N = f + k._offset, + G = N + P, + Z = G + L, + z = Z + D, + Q = new Uint8Array(e.buffer, e.byteOffset + N, P), + H = new Uint8Array(e.buffer, e.byteOffset + G, L), + V = new Uint8Array(e.buffer, e.byteOffset + Z, D), + j = new Uint8Array(e.buffer, e.byteOffset + z, U); + return ( + (n.globalData = { + endpointCount: R, + selectorCount: B, + imageDescs: F, + endpointsData: Q, + selectorsData: H, + tablesData: V, + extendedData: j, + }), + n + ); + } + }, + 3037: function (e, t, n) { + "use strict"; + n.d(t, { + L1_: function () { + return Xp; + }, + YRm: function () { + return Yp; + }, + wUb: function () { + return yv; + }, + w_R: function () { + return bv; + }, + zOz: function () { + return Wp; + }, + zxs: function () { + return ga; + }, + }); + var r = n(3433), + i = n(8664), + a = n(9439), + o = n(2963), + s = n(1413), + l = n(4942), + u = n(4165), + c = n(5861), + f = n(7326), + d = n(1752), + h = n(1120), + p = n(5671), + v = n(3144), + m = n(136), + g = n(9388), + A = n(7760), + y = n(7235), + b = n(2187), + x = n(7864), + S, + E, + _, + C = null, + w = Object.defineProperty, + T = function (e, t, n) { + return t in e + ? w(e, t, { + enumerable: !0, + configurable: !0, + writable: !0, + value: n, + }) + : (e[t] = n); + }, + M = function (e, t, n) { + return T(e, "symbol" !== typeof t ? t + "" : t, n), n; + }, + I = null, + k = null, + R = null, + B = null, + P = 0, + L = 1, + D = new A.Vector3(), + U = new A.Line3(), + F = new A.Plane(), + O = new A.Vector3(), + N = new A.Triangle(), + G = null, + Z = null, + z = null, + Q = null, + H = null, + V = null, + j = new A.Vector3(), + W = null, + X = null, + Y = new A.Vector3(), + q = new A.Quaternion(), + J = new A.Vector3(), + K = new A.Vector3(), + $ = new A.Quaternion(), + ee = new A.Vector3(), + te = null, + ne = null, + re = null, + ie = null, + ae = null, + oe = null, + se = null, + le = null, + ue, + ce; + function fe() { + !1 === document.hidden && this.reset(); + } + function de() { + var e; + if (void 0 !== ue) return ue; + try { + var t, + n = document.createElement("canvas"); + return ( + (ue = !( + !window.WebGLRenderingContext || !(t = n.getContext("webgl")) + )), + t && + (null == (e = t.getExtension("WEBGL_lose_context")) || + e.loseContext()), + ue + ); + } catch (r) { + return (ue = !1); + } + } + function he() { + var e; + if (void 0 !== ce) return ce; + try { + var t, + n = document.createElement("canvas"); + return ( + (ce = !( + !window.WebGL2RenderingContext || !(t = n.getContext("webgl2")) + )), + t && + (null == (e = t.getExtension("WEBGL_lose_context")) || + e.loseContext()), + ce + ); + } catch (r) { + return (ce = !1); + } + } + function pe() { + return me(1); + } + function ve() { + return me(2); + } + function me(e) { + var t = { + 1: window.WebGLRenderingContext, + 2: window.WebGL2RenderingContext, + }, + n = document.createElement("div"); + (n.id = "webglmessage"), + (n.style.fontFamily = "monospace"), + (n.style.fontSize = "13px"), + (n.style.fontWeight = "normal"), + (n.style.textAlign = "center"), + (n.style.background = "#fff"), + (n.style.color = "#000"), + (n.style.padding = "1.5em"), + (n.style.width = "400px"), + (n.style.margin = "5em auto 0"); + var r = + 'Your $0 does not seem to support $1'; + return ( + (r = (r = t[e] + ? r.replace("$0", "graphics card") + : r.replace("$0", "browser")).replace( + "$1", + { 1: "WebGL", 2: "WebGL 2" }[e] + )), + (n.innerHTML = r), + n + ); + } + var ge = null, + Ae = null; + function ye() { + var e = 3e6, + t = new BufferAttribute(new Float32Array(e), 3); + t.usage = DynamicDrawUsage; + var n = new BufferAttribute(new Float32Array(e), 3); + n.usage = DynamicDrawUsage; + var r = new BufferAttribute(new Float32Array(e), 3); + r.usage = DynamicDrawUsage; + var i = new BufferGeometry(); + i.setAttribute("position", t), + i.setAttribute("normal", n), + i.setAttribute("color", r), + (i.drawRange.count = 0); + var a = new MeshStandardMaterial({ vertexColors: !0 }), + o = new Mesh(i, a); + o.frustumCulled = !1; + var s = new Vector3(), + l = new Vector3(), + u = new Vector3(), + c = new Vector3(), + f = new Color(16777215), + d = 1; + function h(e, a, o, h) { + if (0 !== e.distanceToSquared(a)) { + for ( + var p = i.drawRange.count, + v = (function (e) { + for ( + var t = 2 * Math.PI, n = [], r = 0.01 * e, i = 0; + i < 10; + i++ + ) { + var a = (i / 10) * t; + n.push(new Vector3(Math.sin(a) * r, Math.cos(a) * r, 0)); + } + return n; + })(d), + m = 0, + g = v.length; + m < g; + m++ + ) { + var A = v[m], + y = v[(m + 1) % g]; + s.copy(A).applyMatrix4(h).add(a), + l.copy(y).applyMatrix4(h).add(a), + u.copy(y).applyMatrix4(o).add(e), + c.copy(A).applyMatrix4(o).add(e), + s.toArray(t.array, 3 * (p + 0)), + l.toArray(t.array, 3 * (p + 1)), + c.toArray(t.array, 3 * (p + 2)), + l.toArray(t.array, 3 * (p + 3)), + u.toArray(t.array, 3 * (p + 4)), + c.toArray(t.array, 3 * (p + 5)), + s.copy(A).applyMatrix4(h).normalize(), + l.copy(y).applyMatrix4(h).normalize(), + u.copy(y).applyMatrix4(o).normalize(), + c.copy(A).applyMatrix4(o).normalize(), + s.toArray(n.array, 3 * (p + 0)), + l.toArray(n.array, 3 * (p + 1)), + c.toArray(n.array, 3 * (p + 2)), + l.toArray(n.array, 3 * (p + 3)), + u.toArray(n.array, 3 * (p + 4)), + c.toArray(n.array, 3 * (p + 5)), + f.toArray(r.array, 3 * (p + 0)), + f.toArray(r.array, 3 * (p + 1)), + f.toArray(r.array, 3 * (p + 2)), + f.toArray(r.array, 3 * (p + 3)), + f.toArray(r.array, 3 * (p + 4)), + f.toArray(r.array, 3 * (p + 5)), + (p += 6); + } + i.drawRange.count = p; + } + } + var p = new Vector3(0, 1, 0), + v = new Vector3(), + m = new Vector3(), + g = new Matrix4(), + A = new Matrix4(); + var y = 0; + return { + mesh: o, + moveTo: function (e) { + v.copy(e), g.lookAt(m, v, p), m.copy(e), A.copy(g); + }, + lineTo: function (e) { + v.copy(e), g.lookAt(m, v, p), h(v, m, g, A), m.copy(v), A.copy(g); + }, + setSize: function (e) { + d = e; + }, + update: function () { + var e = y, + a = i.drawRange.count; + e !== a && + ((t.updateRange.offset = 3 * e), + (t.updateRange.count = 3 * (a - e)), + (t.needsUpdate = !0), + (n.updateRange.offset = 3 * e), + (n.updateRange.count = 3 * (a - e)), + (n.needsUpdate = !0), + (r.updateRange.offset = 3 * e), + (r.updateRange.count = 3 * (a - e)), + (r.needsUpdate = !0), + (y = i.drawRange.count)); + }, + }; + } + var be = null, + xe = null, + Se = null, + Ee = new A.Vector3(), + _e = new A.Matrix4(), + Ce = new A.Matrix4(), + we = new A.Vector3(), + Te = new A.Vector3(), + Me = null, + Ie = new A.Vector3(), + ke = new A.Quaternion(), + Re = new A.Vector3(), + Be = null, + Pe = null, + Le = new A.Matrix4(), + De = new A.Matrix4(), + Ue = null, + Fe = null, + Oe = null, + Ne = null, + Ge = null, + Ze = null, + ze = null, + Qe = null, + He = null, + Ve = null, + je = 4, + We = 1024, + Xe = 4, + Ye = function () { + var e = + arguments.length > 0 && void 0 !== arguments[0] + ? arguments[0] + : 1, + t = new Float32Array(We * Xe * e * je), + n = new DataTexture(t, We, Xe * e, RGBAFormat, FloatType); + return ( + (n.wrapS = RepeatWrapping), + (n.wrapT = RepeatWrapping), + (n.magFilter = NearestFilter), + (n.needsUpdate = !0), + n + ); + }, + qe = function (e, t) { + var n = + arguments.length > 2 && void 0 !== arguments[2] + ? arguments[2] + : 0, + r = Math.floor(We * (Xe / 4)); + (t.arcLengthDivisions = r / 2), t.updateArcLengths(); + for ( + var i = t.getSpacedPoints(r), + a = t.computeFrenetFrames(r, !0), + o = 0; + o < r; + o++ + ) { + var s = Math.floor(o / We), + l = o % We, + u = i[o]; + Je(e, l, u.x, u.y, u.z, 0 + s + Xe * n), + (u = a.tangents[o]), + Je(e, l, u.x, u.y, u.z, 1 + s + Xe * n), + (u = a.normals[o]), + Je(e, l, u.x, u.y, u.z, 2 + s + Xe * n), + (u = a.binormals[o]), + Je(e, l, u.x, u.y, u.z, 3 + s + Xe * n); + } + e.needsUpdate = !0; + }, + Je = function (e, t, n, r, i, a) { + var o = e.image.data, + s = je * We * a; + (o[t * je + s + 0] = n), + (o[t * je + s + 1] = r), + (o[t * je + s + 2] = i), + (o[t * je + s + 3] = 1); + }, + Ke = function (e) { + return { + spineTexture: { value: e }, + pathOffset: { type: "f", value: 0 }, + pathSegment: { type: "f", value: 1 }, + spineOffset: { type: "f", value: 161 }, + spineLength: { type: "f", value: 400 }, + flow: { type: "i", value: 1 }, + }; + }; + function $e(e, t) { + var n = + arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : 1; + e.__ok || + ((e.__ok = !0), + (e.onBeforeCompile = function (e) { + if (!e.__modified) { + (e.__modified = !0), Object.assign(e.uniforms, t); + var r = + "\n\t\tuniform sampler2D spineTexture;\n\t\tuniform float pathOffset;\n\t\tuniform float pathSegment;\n\t\tuniform float spineOffset;\n\t\tuniform float spineLength;\n\t\tuniform int flow;\n\n\t\tfloat textureLayers = " + .concat(Xe * n, ".;\n\t\tfloat textureStacks = ") + .concat(Xe / 4, ".;\n\n\t\t") + .concat(e.vertexShader, "\n\t\t") + .replace("#include ", "") + .replace("#include ", "") + .replace("#include ", "") + .replace( + /void\s*main\s*\(\)\s*\{/, + "\n void main() {\n #include \n\n vec4 worldPos = modelMatrix * vec4(position, 1.);\n\n bool bend = flow > 0;\n float xWeight = bend ? 0. : 1.;\n\n #ifdef USE_INSTANCING\n float pathOffsetFromInstanceMatrix = instanceMatrix[3][2];\n float spineLengthFromInstanceMatrix = instanceMatrix[3][0];\n float spinePortion = bend ? (worldPos.x + spineOffset) / spineLengthFromInstanceMatrix : 0.;\n float mt = (spinePortion * pathSegment + pathOffset + pathOffsetFromInstanceMatrix)*textureStacks;\n #else\n float spinePortion = bend ? (worldPos.x + spineOffset) / spineLength : 0.;\n float mt = (spinePortion * pathSegment + pathOffset)*textureStacks;\n #endif\n\n mt = mod(mt, textureStacks);\n float rowOffset = floor(mt);\n\n #ifdef USE_INSTANCING\n rowOffset += instanceMatrix[3][1] * ".concat( + Xe, + ".;\n #endif\n\n vec3 spinePos = texture2D(spineTexture, vec2(mt, (0. + rowOffset + 0.5) / textureLayers)).xyz;\n vec3 a = texture2D(spineTexture, vec2(mt, (1. + rowOffset + 0.5) / textureLayers)).xyz;\n vec3 b = texture2D(spineTexture, vec2(mt, (2. + rowOffset + 0.5) / textureLayers)).xyz;\n vec3 c = texture2D(spineTexture, vec2(mt, (3. + rowOffset + 0.5) / textureLayers)).xyz;\n mat3 basis = mat3(a, b, c);\n\n vec3 transformed = basis\n * vec3(worldPos.x * xWeight, worldPos.y * 1., worldPos.z * 1.)\n + spinePos;\n\n vec3 transformedNormal = normalMatrix * (basis * objectNormal);\n\t\t\t" + ) + ) + .replace( + "#include ", + "vec4 mvPosition = modelViewMatrix * vec4( transformed, 1.0 );\n\t\t\t\tgl_Position = projectionMatrix * mvPosition;" + ); + e.vertexShader = r; + } + })); + } + var et = null, + tt = new A.Matrix4(), + nt = null, + rt = function (e, t) { + return e[t]; + }, + it = function (e, t) { + var n = null !== e[0].index, + r = new Set(Object.keys(e[0].attributes)), + i = new Set(Object.keys(e[0].morphAttributes)), + a = {}, + o = {}, + s = e[0].morphTargetsRelative, + l = new A.BufferGeometry(), + u = 0; + if ( + (e.forEach(function (e, c) { + var f = 0; + if (n !== (null !== e.index)) + return ( + console.error( + "THREE.BufferGeometryUtils: .mergeBufferGeometries() failed with geometry at index " + + c + + ". All geometries must have compatible attributes; make sure index attribute exists among all geometries, or in none of them." + ), + null + ); + for (var d in e.attributes) { + if (!r.has(d)) + return ( + console.error( + "THREE.BufferGeometryUtils: .mergeBufferGeometries() failed with geometry at index " + + c + + '. All geometries must have compatible attributes; make sure "' + + d + + '" attribute exists among all geometries, or in none of them.' + ), + null + ); + void 0 === a[d] && (a[d] = []), + a[d].push(e.attributes[d]), + f++; + } + if (f !== r.size) + return ( + console.error( + "THREE.BufferGeometryUtils: .mergeBufferGeometries() failed with geometry at index " + + c + + ". Make sure all geometries have the same number of attributes." + ), + null + ); + if (s !== e.morphTargetsRelative) + return ( + console.error( + "THREE.BufferGeometryUtils: .mergeBufferGeometries() failed with geometry at index " + + c + + ". .morphTargetsRelative must be consistent throughout all geometries." + ), + null + ); + for (var h in e.morphAttributes) { + if (!i.has(h)) + return ( + console.error( + "THREE.BufferGeometryUtils: .mergeBufferGeometries() failed with geometry at index " + + c + + ". .morphAttributes must be consistent throughout all geometries." + ), + null + ); + void 0 === o[h] && (o[h] = []), + o[h].push(e.morphAttributes[h]); + } + if ( + ((l.userData.mergedUserData = + l.userData.mergedUserData || []), + l.userData.mergedUserData.push(e.userData), + t) + ) { + var p; + if (e.index) p = e.index.count; + else { + if (void 0 === e.attributes.position) + return ( + console.error( + "THREE.BufferGeometryUtils: .mergeBufferGeometries() failed with geometry at index " + + c + + ". The geometry must have either an index or a position attribute" + ), + null + ); + p = e.attributes.position.count; + } + l.addGroup(u, p, c), (u += p); + } + }), + n) + ) { + var c = 0, + f = []; + e.forEach(function (e) { + for (var t = e.index, n = 0; n < t.count; ++n) + f.push(t.getX(n) + c); + c += e.attributes.position.count; + }), + l.setIndex(f); + } + for (var d in a) { + var h = at(a[d]); + if (!h) + return ( + console.error( + "THREE.BufferGeometryUtils: .mergeBufferGeometries() failed while trying to merge the " + + d + + " attribute." + ), + null + ); + l.setAttribute(d, h); + } + for (var p in o) { + var v = o[p][0].length; + if (0 === v) break; + (l.morphAttributes = l.morphAttributes || {}), + (l.morphAttributes[p] = []); + for (var m = 0; m < v; ++m) { + for (var g = [], y = 0; y < o[p].length; ++y) + g.push(o[p][y][m]); + var b = at(g); + if (!b) + return ( + console.error( + "THREE.BufferGeometryUtils: .mergeBufferGeometries() failed while trying to merge the " + + p + + " morphAttribute." + ), + null + ); + l.morphAttributes[p].push(b); + } + } + return l; + }, + at = function (e) { + var t = void 0, + n = void 0, + r = void 0, + i = 0; + if ( + (e.forEach(function (e) { + return ( + void 0 === t && (t = e.array.constructor), + t !== e.array.constructor + ? (console.error( + "THREE.BufferGeometryUtils: .mergeBufferAttributes() failed. BufferAttribute.array must be of consistent array types across matching attributes." + ), + null) + : (void 0 === n && (n = e.itemSize), + n !== e.itemSize + ? (console.error( + "THREE.BufferGeometryUtils: .mergeBufferAttributes() failed. BufferAttribute.itemSize must be consistent across matching attributes." + ), + null) + : (void 0 === r && (r = e.normalized), + r !== e.normalized + ? (console.error( + "THREE.BufferGeometryUtils: .mergeBufferAttributes() failed. BufferAttribute.normalized must be consistent across matching attributes." + ), + null) + : void (i += e.array.length))) + ); + }), + t && n) + ) { + var a = new t(i), + o = 0; + return ( + e.forEach(function (e) { + a.set(e.array, o), (o += e.array.length); + }), + new A.BufferAttribute(a, n, r) + ); + } + }, + ot = function (e) { + for ( + var t = void 0, n = 0, r = 0, i = 0, a = e.length; + i < a; + ++i + ) { + var o = e[i]; + if ( + (void 0 === t && (t = o.array.constructor), + t !== o.array.constructor) + ) + return ( + console.error( + "AttributeBuffers of different types cannot be interleaved" + ), + null + ); + (n += o.array.length), (r += o.itemSize); + } + for ( + var s = new A.InterleavedBuffer(new t(n), r), + l = 0, + u = [], + c = ["getX", "getY", "getZ", "getW"], + f = ["setX", "setY", "setZ", "setW"], + d = 0, + h = e.length; + d < h; + d++ + ) { + var p = e[d], + v = p.itemSize, + m = p.count, + g = new A.InterleavedBufferAttribute(s, v, l, p.normalized); + u.push(g), (l += v); + for (var y = 0; y < m; y++) + for (var b = 0; b < v; b++) { + rt(g, f[b])(y, rt(p, c[b])(y)); + } + } + return u; + }; + function st(e) { + var t = 0; + for (var n in e.attributes) { + var r = e.getAttribute(n); + t += r.count * r.itemSize * r.array.BYTES_PER_ELEMENT; + } + var i = e.getIndex(); + return (t += i + ? i.count * i.itemSize * i.array.BYTES_PER_ELEMENT + : 0); + } + function lt(e) { + var t = + arguments.length > 1 && void 0 !== arguments[1] + ? arguments[1] + : 1e-4; + t = Math.max(t, Number.EPSILON); + for ( + var n = {}, + r = e.getIndex(), + i = e.getAttribute("position"), + a = r ? r.count : i.count, + o = 0, + s = Object.keys(e.attributes), + l = {}, + u = {}, + c = [], + f = ["getX", "getY", "getZ", "getW"], + d = 0, + h = s.length; + d < h; + d++ + ) { + var p = s[d]; + l[p] = []; + var v = e.morphAttributes[p]; + v && + (u[p] = new Array(v.length).fill(0).map(function () { + return []; + })); + } + for ( + var m = Math.log10(1 / t), g = Math.pow(10, m), y = 0; + y < a; + y++ + ) { + for ( + var b = r ? r.getX(y) : y, x = "", S = 0, E = s.length; + S < E; + S++ + ) + for ( + var _ = s[S], C = e.getAttribute(_), w = C.itemSize, T = 0; + T < w; + T++ + ) + x += "".concat(~~(C[f[T]](b) * g), ","); + if (x in n) c.push(n[x]); + else { + for (var M = 0, I = s.length; M < I; M++) + for ( + var k = s[M], + R = e.getAttribute(k), + B = e.morphAttributes[k], + P = R.itemSize, + L = l[k], + D = u[k], + U = 0; + U < P; + U++ + ) { + var F = f[U]; + if ((L.push(R[F](b)), B)) + for (var O = 0, N = B.length; O < N; O++) + D[O].push(B[O][F](b)); + } + (n[x] = o), c.push(o), o++; + } + } + for (var G = e.clone(), Z = 0, z = s.length; Z < z; Z++) { + var Q = s[Z], + H = e.getAttribute(Q), + V = new H.array.constructor(l[Q]), + j = new A.BufferAttribute(V, H.itemSize, H.normalized); + if ((G.setAttribute(Q, j), Q in u)) + for (var W = 0; W < u[Q].length; W++) { + var X = e.morphAttributes[Q][W], + Y = new X.array.constructor(u[Q][W]), + q = new A.BufferAttribute(Y, X.itemSize, X.normalized); + G.morphAttributes[Q][W] = q; + } + } + return G.setIndex(c), G; + } + function ut(e, t) { + if (t === A.TrianglesDrawMode) + return ( + console.warn( + "THREE.BufferGeometryUtils.toTrianglesDrawMode(): Geometry already defined as triangles." + ), + e + ); + if (t === A.TriangleFanDrawMode || t === A.TriangleStripDrawMode) { + var n = e.getIndex(); + if (null === n) { + var r = [], + i = e.getAttribute("position"); + if (void 0 === i) + return ( + console.error( + "THREE.BufferGeometryUtils.toTrianglesDrawMode(): Undefined position attribute. Processing not possible." + ), + e + ); + for (var a = 0; a < i.count; a++) r.push(a); + e.setIndex(r), (n = e.getIndex()); + } + var o = n.count - 2, + s = []; + if (n) + if (t === A.TriangleFanDrawMode) + for (var l = 1; l <= o; l++) + s.push(n.getX(0)), s.push(n.getX(l)), s.push(n.getX(l + 1)); + else + for (var u = 0; u < o; u++) + u % 2 === 0 + ? (s.push(n.getX(u)), + s.push(n.getX(u + 1)), + s.push(n.getX(u + 2))) + : (s.push(n.getX(u + 2)), + s.push(n.getX(u + 1)), + s.push(n.getX(u))); + s.length / 3 !== o && + console.error( + "THREE.BufferGeometryUtils.toTrianglesDrawMode(): Unable to generate correct amount of triangles." + ); + var c = e.clone(); + return c.setIndex(s), c.clearGroups(), c; + } + return ( + console.error( + "THREE.BufferGeometryUtils.toTrianglesDrawMode(): Unknown draw mode:", + t + ), + e + ); + } + function ct(e) { + if (!0 !== e.geometry.isBufferGeometry) + return ( + console.error( + "THREE.BufferGeometryUtils: Geometry is not of type BufferGeometry." + ), + null + ); + var t = new A.Vector3(), + n = new A.Vector3(), + r = new A.Vector3(), + i = new A.Vector3(), + a = new A.Vector3(), + o = new A.Vector3(), + s = new A.Vector3(), + l = new A.Vector3(), + u = new A.Vector3(); + function c(e, c, f, d, h, p, v, m, g) { + t.fromBufferAttribute(f, p), + n.fromBufferAttribute(f, v), + r.fromBufferAttribute(f, m); + var A = e.morphTargetInfluences; + if (c.morphTargets && d && A) { + s.set(0, 0, 0), l.set(0, 0, 0), u.set(0, 0, 0); + for (var y = 0, b = d.length; y < b; y++) { + var x = A[y], + S = d[y]; + 0 !== x && + (i.fromBufferAttribute(S, p), + a.fromBufferAttribute(S, v), + o.fromBufferAttribute(S, m), + h + ? (s.addScaledVector(i, x), + l.addScaledVector(a, x), + u.addScaledVector(o, x)) + : (s.addScaledVector(i.sub(t), x), + l.addScaledVector(a.sub(n), x), + u.addScaledVector(o.sub(r), x))); + } + t.add(s), n.add(l), r.add(u); + } + e.isSkinnedMesh && + (e.boneTransform(p, t), + e.boneTransform(v, n), + e.boneTransform(m, r)), + (g[3 * p + 0] = t.x), + (g[3 * p + 1] = t.y), + (g[3 * p + 2] = t.z), + (g[3 * v + 0] = n.x), + (g[3 * v + 1] = n.y), + (g[3 * v + 2] = n.z), + (g[3 * m + 0] = r.x), + (g[3 * m + 1] = r.y), + (g[3 * m + 2] = r.z); + } + var f, + d, + h, + p, + v, + m, + g, + y, + b, + x = e.geometry, + S = e.material, + E = x.index, + _ = x.attributes.position, + C = x.morphAttributes.position, + w = x.morphTargetsRelative, + T = x.attributes.normal, + M = x.morphAttributes.position, + I = x.groups, + k = x.drawRange, + R = new Float32Array(_.count * _.itemSize), + B = new Float32Array(T.count * T.itemSize); + if (null !== E) + if (Array.isArray(S)) + for (p = 0, m = I.length; p < m; p++) + for ( + b = S[(y = I[p]).materialIndex], + v = Math.max(y.start, k.start), + g = Math.min(y.start + y.count, k.start + k.count); + v < g; + v += 3 + ) + c( + e, + b, + _, + C, + w, + (f = E.getX(v)), + (d = E.getX(v + 1)), + (h = E.getX(v + 2)), + R + ), + c(e, b, T, M, w, f, d, h, B); + else + for ( + p = Math.max(0, k.start), + m = Math.min(E.count, k.start + k.count); + p < m; + p += 3 + ) + c( + e, + S, + _, + C, + w, + (f = E.getX(p)), + (d = E.getX(p + 1)), + (h = E.getX(p + 2)), + R + ), + c(e, S, T, M, w, f, d, h, B); + else if (void 0 !== _) + if (Array.isArray(S)) + for (p = 0, m = I.length; p < m; p++) + for ( + b = S[(y = I[p]).materialIndex], + v = Math.max(y.start, k.start), + g = Math.min(y.start + y.count, k.start + k.count); + v < g; + v += 3 + ) + c(e, b, _, C, w, (f = v), (d = v + 1), (h = v + 2), R), + c(e, b, T, M, w, f, d, h, B); + else + for ( + p = Math.max(0, k.start), + m = Math.min(_.count, k.start + k.count); + p < m; + p += 3 + ) + c(e, S, _, C, w, (f = p), (d = p + 1), (h = p + 2), R), + c(e, S, T, M, w, f, d, h, B); + return { + positionAttribute: _, + normalAttribute: T, + morphedPositionAttribute: new A.Float32BufferAttribute(R, 3), + morphedNormalAttribute: new A.Float32BufferAttribute(B, 3), + }; + } + function ft(e) { + var t = + arguments.length > 1 && void 0 !== arguments[1] + ? arguments[1] + : Math.PI / 3, + n = Math.cos(t), + r = 100 * (1 + 1e-10), + i = [new A.Vector3(), new A.Vector3(), new A.Vector3()], + a = new A.Vector3(), + o = new A.Vector3(), + s = new A.Vector3(), + l = new A.Vector3(); + function u(e) { + var t = ~~(e.x * r), + n = ~~(e.y * r), + i = ~~(e.z * r); + return "".concat(t, ",").concat(n, ",").concat(i); + } + for ( + var c = e.index ? e.toNonIndexed() : e, + f = c.attributes.position, + d = {}, + h = 0, + p = f.count / 3; + h < p; + h++ + ) { + var v = 3 * h, + m = i[0].fromBufferAttribute(f, v + 0), + g = i[1].fromBufferAttribute(f, v + 1), + y = i[2].fromBufferAttribute(f, v + 2); + a.subVectors(y, g), o.subVectors(m, g); + for ( + var b = new A.Vector3().crossVectors(a, o).normalize(), x = 0; + x < 3; + x++ + ) { + var S = u(i[x]); + S in d || (d[S] = []), d[S].push(b); + } + } + for ( + var E = new Float32Array(3 * f.count), + _ = new A.BufferAttribute(E, 3, !1), + C = 0, + w = f.count / 3; + C < w; + C++ + ) { + var T = 3 * C, + M = i[0].fromBufferAttribute(f, T + 0), + I = i[1].fromBufferAttribute(f, T + 1), + k = i[2].fromBufferAttribute(f, T + 2); + a.subVectors(k, I), + o.subVectors(M, I), + s.crossVectors(a, o).normalize(); + for (var R = 0; R < 3; R++) { + var B = d[u(i[R])]; + l.set(0, 0, 0); + for (var P = 0, L = B.length; P < L; P++) { + var D = B[P]; + s.dot(D) > n && l.add(D); + } + l.normalize(), _.setXYZ(T + R, l.x, l.y, l.z); + } + } + return c.setAttribute("normal", _), c; + } + var dt = Object.freeze( + Object.defineProperty( + { + __proto__: null, + computeMorphedAttributes: ct, + estimateBytesUsed: st, + interleaveAttributes: ot, + mergeBufferAttributes: at, + mergeBufferGeometries: it, + mergeVertices: lt, + toCreasedNormals: ft, + toTrianglesDrawMode: ut, + }, + Symbol.toStringTag, + { value: "Module" } + ) + ), + ht = new A.Vector3(), + pt = new A.Vector3(); + function vt(e, t) { + -1 === e.indexOf(t) && e.push(t); + } + function mt(e, t) { + var n = e.indexOf(t); + n > -1 && e.splice(n, 1); + } + var gt = null, + At = null, + yt = null, + bt = null, + xt = null, + St, + Et, + _t, + Ct; + function wt(e) { + return Tt.apply(this, arguments); + } + function Tt() { + return (Tt = (0, c.Z)( + (0, u.Z)().mark(function e(t) { + var n, i; + return (0, u.Z)().wrap(function (e) { + for (;;) + switch ((e.prev = e.next)) { + case 0: + return (e.next = 2), t.arrayBuffer(); + case 2: + return ( + (n = e.sent), + (i = btoa( + String.fromCharCode.apply( + String, + (0, r.Z)(new Uint8Array(n)) + ) + )), + e.abrupt( + "return", + "data:".concat(t.type || "", ";base64,").concat(i) + ) + ); + case 5: + case "end": + return e.stop(); + } + }, e); + }) + )).apply(this, arguments); + } + function Mt(e) { + var t = + arguments.length > 1 && void 0 !== arguments[1] + ? arguments[1] + : 1 / 0, + n = + arguments.length > 2 && void 0 !== arguments[2] + ? arguments[2] + : null; + Et || (Et = new A.PlaneGeometry(2, 2, 1, 1)), + _t || + (_t = new A.ShaderMaterial({ + uniforms: { blitTexture: new A.Uniform(e) }, + vertexShader: + "\n varying vec2 vUv;\n void main(){\n vUv = uv;\n gl_Position = vec4(position.xy * 1.0,0.,.999999);\n }\n ", + fragmentShader: + "\n uniform sampler2D blitTexture; \n varying vec2 vUv;\n\n void main(){ \n gl_FragColor = vec4(vUv.xy, 0, 1);\n \n #ifdef IS_SRGB\n gl_FragColor = LinearTosRGB( texture2D( blitTexture, vUv) );\n #else\n gl_FragColor = texture2D( blitTexture, vUv);\n #endif\n }\n ", + })), + (_t.uniforms.blitTexture.value = e), + (_t.defines.IS_SRGB = + "colorSpace" in e + ? "srgb" === e.colorSpace + : 3001 === e.encoding), + (_t.needsUpdate = !0), + Ct || ((Ct = new A.Mesh(Et, _t)).frustrumCulled = !1); + var r = new A.PerspectiveCamera(), + i = new A.Scene(); + i.add(Ct), + n || (n = St = new A.WebGLRenderer({ antialias: !1 })), + n.setSize(Math.min(e.image.width, t), Math.min(e.image.height, t)), + n.clear(), + n.render(i, r); + var a = new A.Texture(n.domElement); + return ( + (a.minFilter = e.minFilter), + (a.magFilter = e.magFilter), + (a.wrapS = e.wrapS), + (a.wrapT = e.wrapT), + (a.name = e.name), + St && (St.dispose(), (St = null)), + a + ); + } + var It = { + POSITION: [ + "byte", + "byte normalized", + "unsigned byte", + "unsigned byte normalized", + "short", + "short normalized", + "unsigned short", + "unsigned short normalized", + ], + NORMAL: ["byte normalized", "short normalized"], + TANGENT: ["byte normalized", "short normalized"], + TEXCOORD: [ + "byte", + "byte normalized", + "unsigned byte", + "short", + "short normalized", + "unsigned short", + ], + }, + kt = (function () { + function e() { + (0, p.Z)(this, e), + (this.pluginCallbacks = []), + this.register(function (e) { + return new Jt(e); + }), + this.register(function (e) { + return new Kt(e); + }), + this.register(function (e) { + return new tn(e); + }), + this.register(function (e) { + return new nn(e); + }), + this.register(function (e) { + return new rn(e); + }), + this.register(function (e) { + return new an(e); + }), + this.register(function (e) { + return new $t(e); + }), + this.register(function (e) { + return new en(e); + }), + this.register(function (e) { + return new on(e); + }), + this.register(function (e) { + return new sn(e); + }), + this.register(function (e) { + return new ln(e); + }); + } + return ( + (0, v.Z)(e, [ + { + key: "register", + value: function (e) { + return ( + -1 === this.pluginCallbacks.indexOf(e) && + this.pluginCallbacks.push(e), + this + ); + }, + }, + { + key: "unregister", + value: function (e) { + return ( + -1 !== this.pluginCallbacks.indexOf(e) && + this.pluginCallbacks.splice( + this.pluginCallbacks.indexOf(e), + 1 + ), + this + ); + }, + }, + { + key: "parse", + value: function (e, t, n, r) { + for ( + var i = new qt(), + a = [], + o = 0, + s = this.pluginCallbacks.length; + o < s; + o++ + ) + a.push(this.pluginCallbacks[o](i)); + i.setPlugins(a), i.write(e, t, r).catch(n); + }, + }, + { + key: "parseAsync", + value: function (e, t) { + var n = this; + return new Promise(function (r, i) { + n.parse(e, r, i, t); + }); + }, + }, + ]), + e + ); + })(), + Rt = { + POINTS: 0, + LINES: 1, + LINE_LOOP: 2, + LINE_STRIP: 3, + TRIANGLES: 4, + TRIANGLE_STRIP: 5, + TRIANGLE_FAN: 6, + BYTE: 5120, + UNSIGNED_BYTE: 5121, + SHORT: 5122, + UNSIGNED_SHORT: 5123, + INT: 5124, + UNSIGNED_INT: 5125, + FLOAT: 5126, + ARRAY_BUFFER: 34962, + ELEMENT_ARRAY_BUFFER: 34963, + NEAREST: 9728, + LINEAR: 9729, + NEAREST_MIPMAP_NEAREST: 9984, + LINEAR_MIPMAP_NEAREST: 9985, + NEAREST_MIPMAP_LINEAR: 9986, + LINEAR_MIPMAP_LINEAR: 9987, + CLAMP_TO_EDGE: 33071, + MIRRORED_REPEAT: 33648, + REPEAT: 10497, + }, + Bt = "KHR_mesh_quantization", + Pt = {}; + (Pt[A.NearestFilter] = Rt.NEAREST), + (Pt[A.NearestMipmapNearestFilter] = Rt.NEAREST_MIPMAP_NEAREST), + (Pt[A.NearestMipmapLinearFilter] = Rt.NEAREST_MIPMAP_LINEAR), + (Pt[A.LinearFilter] = Rt.LINEAR), + (Pt[A.LinearMipmapNearestFilter] = Rt.LINEAR_MIPMAP_NEAREST), + (Pt[A.LinearMipmapLinearFilter] = Rt.LINEAR_MIPMAP_LINEAR), + (Pt[A.ClampToEdgeWrapping] = Rt.CLAMP_TO_EDGE), + (Pt[A.RepeatWrapping] = Rt.REPEAT), + (Pt[A.MirroredRepeatWrapping] = Rt.MIRRORED_REPEAT); + var Lt = { + scale: "scale", + position: "translation", + quaternion: "rotation", + morphTargetInfluences: "weights", + }, + Dt = new A.Color(), + Ut = 12, + Ft = 1179937895, + Ot = 2, + Nt = 8, + Gt = 1313821514, + Zt = 5130562; + function zt(e, t) { + return ( + e.length === t.length && + e.every(function (e, n) { + return e === t[n]; + }) + ); + } + function Qt(e) { + return new TextEncoder().encode(e).buffer; + } + function Ht(e) { + return zt( + e.elements, + [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1] + ); + } + function Vt(e, t, n) { + for ( + var r = { + min: new Array(e.itemSize).fill(Number.POSITIVE_INFINITY), + max: new Array(e.itemSize).fill(Number.NEGATIVE_INFINITY), + }, + i = t; + i < t + n; + i++ + ) + for (var a = 0; a < e.itemSize; a++) { + var o = void 0; + e.itemSize > 4 + ? (o = e.array[i * e.itemSize + a]) + : (0 === a + ? (o = e.getX(i)) + : 1 === a + ? (o = e.getY(i)) + : 2 === a + ? (o = e.getZ(i)) + : 3 === a && (o = e.getW(i)), + !0 === e.normalized && + (o = A.MathUtils.normalize(o, e.array))), + (r.min[a] = Math.min(r.min[a], o)), + (r.max[a] = Math.max(r.max[a], o)); + } + return r; + } + function jt(e) { + return 4 * Math.ceil(e / 4); + } + function Wt(e) { + var t = + arguments.length > 1 && void 0 !== arguments[1] + ? arguments[1] + : 0, + n = jt(e.byteLength); + if (n !== e.byteLength) { + var r = new Uint8Array(n); + if ((r.set(new Uint8Array(e)), 0 !== t)) + for (var i = e.byteLength; i < n; i++) r[i] = t; + return r.buffer; + } + return e; + } + function Xt() { + return "undefined" === typeof document && + "undefined" !== typeof OffscreenCanvas + ? new OffscreenCanvas(1, 1) + : document.createElement("canvas"); + } + function Yt(e, t) { + return void 0 !== e.toBlob + ? new Promise(function (n) { + return e.toBlob(n, t); + }) + : ("image/jpeg" === t + ? (n = 0.92) + : "image/webp" === t && (n = 0.8), + e.convertToBlob({ type: t, quality: n })); + var n; + } + var qt = (function () { + function e() { + (0, p.Z)(this, e), + (this.plugins = []), + (this.options = {}), + (this.pending = []), + (this.buffers = []), + (this.byteOffset = 0), + (this.buffers = []), + (this.nodeMap = new Map()), + (this.skins = []), + (this.extensionsUsed = {}), + (this.extensionsRequired = {}), + (this.uids = new Map()), + (this.uid = 0), + (this.json = { + asset: { version: "2.0", generator: "THREE.GLTFExporter" }, + }), + (this.cache = { + meshes: new Map(), + attributes: new Map(), + attributesNormalized: new Map(), + materials: new Map(), + textures: new Map(), + images: new Map(), + }); + } + return ( + (0, v.Z)(e, [ + { + key: "setPlugins", + value: function (e) { + this.plugins = e; + }, + }, + { + key: "write", + value: (function () { + var e = (0, c.Z)( + (0, u.Z)().mark(function e(t, n) { + var r, + i, + a, + o, + s, + l, + c, + f, + d, + h = arguments; + return (0, u.Z)().wrap( + function (e) { + for (;;) + switch ((e.prev = e.next)) { + case 0: + return ( + (r = + h.length > 2 && void 0 !== h[2] + ? h[2] + : {}), + (this.options = Object.assign( + { + binary: !1, + trs: !1, + onlyVisible: !0, + maxTextureSize: 1 / 0, + animations: [], + includeCustomExtensions: !1, + }, + r + )), + this.options.animations.length > 0 && + (this.options.trs = !0), + this.processInput(t), + (e.next = 6), + Promise.all(this.pending) + ); + case 6: + (a = (i = this).buffers), + (o = i.json), + (r = i.options), + (s = i.extensionsUsed), + (l = i.extensionsRequired), + (c = new Blob(a, { + type: "application/octet-stream", + })), + (f = Object.keys(s)), + (d = Object.keys(l)), + f.length > 0 && (o.extensionsUsed = f), + d.length > 0 && (o.extensionsRequired = d), + o.buffers && + o.buffers.length > 0 && + (o.buffers[0].byteLength = c.size), + !0 === r.binary + ? c.arrayBuffer().then(function (e) { + var t = Wt(e), + r = new DataView( + new ArrayBuffer(Nt) + ); + r.setUint32(0, t.byteLength, !0), + r.setUint32(4, Zt, !0); + var i = Wt(Qt(JSON.stringify(o)), 32), + a = new DataView( + new ArrayBuffer(Nt) + ); + a.setUint32(0, i.byteLength, !0), + a.setUint32(4, Gt, !0); + var s = new ArrayBuffer(Ut), + l = new DataView(s); + l.setUint32(0, Ft, !0), + l.setUint32(4, Ot, !0); + var u = + Ut + + a.byteLength + + i.byteLength + + r.byteLength + + t.byteLength; + l.setUint32(8, u, !0), + new Blob([s, a, i, r, t], { + type: "application/octet-stream", + }) + .arrayBuffer() + .then(n); + }) + : (o.buffers && + o.buffers.length > 0 && + wt(c).then(function (e) { + o.buffers[0].uri = e; + }), + n(o)); + case 19: + case "end": + return e.stop(); + } + }, + e, + this + ); + }) + ); + return function (t, n) { + return e.apply(this, arguments); + }; + })(), + }, + { + key: "serializeUserData", + value: function (e, t) { + if (0 !== Object.keys(e.userData).length) { + var n = this.options, + r = this.extensionsUsed; + try { + var i = JSON.parse(JSON.stringify(e.userData)); + if (n.includeCustomExtensions && i.gltfExtensions) { + for (var a in (void 0 === t.extensions && + (t.extensions = {}), + i.gltfExtensions)) + (t.extensions[a] = i.gltfExtensions[a]), + (r[a] = !0); + delete i.gltfExtensions; + } + Object.keys(i).length > 0 && (t.extras = i); + } catch (o) { + console.warn( + "THREE.GLTFExporter: userData of '" + + e.name + + "' won't be serialized because of JSON.stringify error - " + + o.message + ); + } + } + }, + }, + { + key: "getUID", + value: function (e) { + var t = + arguments.length > 1 && + void 0 !== arguments[1] && + arguments[1]; + if (!1 === this.uids.has(e)) { + var n = new Map(); + n.set(!0, this.uid++), + n.set(!1, this.uid++), + this.uids.set(e, n); + } + return this.uids.get(e).get(t); + }, + }, + { + key: "isNormalizedNormalAttribute", + value: function (e) { + if (this.cache.attributesNormalized.has(e)) return !1; + for ( + var t = new A.Vector3(), n = 0, r = e.count; + n < r; + n++ + ) + if ( + Math.abs(t.fromBufferAttribute(e, n).length() - 1) > + 5e-4 + ) + return !1; + return !0; + }, + }, + { + key: "createNormalizedNormalAttribute", + value: function (e) { + var t = this.cache; + if (t.attributesNormalized.has(e)) + return t.attributesNormalized.get(e); + for ( + var n = e.clone(), + r = new A.Vector3(), + i = 0, + a = n.count; + i < a; + i++ + ) + r.fromBufferAttribute(n, i), + 0 === r.x && 0 === r.y && 0 === r.z + ? r.setX(1) + : r.normalize(), + n.setXYZ(i, r.x, r.y, r.z); + return t.attributesNormalized.set(e, n), n; + }, + }, + { + key: "applyTextureTransform", + value: function (e, t) { + var n = !1, + r = {}; + (0 === t.offset.x && 0 === t.offset.y) || + ((r.offset = t.offset.toArray()), (n = !0)), + 0 !== t.rotation && ((r.rotation = t.rotation), (n = !0)), + (1 === t.repeat.x && 1 === t.repeat.y) || + ((r.scale = t.repeat.toArray()), (n = !0)), + n && + ((e.extensions = e.extensions || {}), + (e.extensions.KHR_texture_transform = r), + (this.extensionsUsed.KHR_texture_transform = !0)); + }, + }, + { + key: "buildMetalRoughTexture", + value: function (e, t) { + if (e === t) return e; + function n(e) { + return ( + "colorSpace" in e + ? "srgb" === e.colorSpace + : 3001 === e.encoding + ) + ? function (e) { + return e < 0.04045 + ? 0.0773993808 * e + : Math.pow(0.9478672986 * e + 0.0521327014, 2.4); + } + : function (e) { + return e; + }; + } + console.warn( + "THREE.GLTFExporter: Merged metalnessMap and roughnessMap textures." + ), + e instanceof A.CompressedTexture && (e = Mt(e)), + t instanceof A.CompressedTexture && (t = Mt(t)); + var r = e ? e.image : null, + i = t ? t.image : null, + a = Math.max(r ? r.width : 0, i ? i.width : 0), + o = Math.max(r ? r.height : 0, i ? i.height : 0), + s = Xt(); + (s.width = a), (s.height = o); + var l = s.getContext("2d"); + (l.fillStyle = "#00ffff"), l.fillRect(0, 0, a, o); + var u = l.getImageData(0, 0, a, o); + if (r) { + l.drawImage(r, 0, 0, a, o); + for ( + var c = n(e), + f = l.getImageData(0, 0, a, o).data, + d = 2; + d < f.length; + d += 4 + ) + u.data[d] = 256 * c(f[d] / 256); + } + if (i) { + l.drawImage(i, 0, 0, a, o); + for ( + var h = n(t), + p = l.getImageData(0, 0, a, o).data, + v = 1; + v < p.length; + v += 4 + ) + u.data[v] = 256 * h(p[v] / 256); + } + l.putImageData(u, 0, 0); + var m = (e || t).clone(); + return ( + (m.source = new A.Texture(s).source), + "colorSpace" in m + ? (m.colorSpace = "") + : (m.encoding = 3e3), + (m.channel = (e || t).channel), + e && + t && + e.channel !== t.channel && + console.warn( + "THREE.GLTFExporter: UV channels for metalnessMap and roughnessMap textures must match." + ), + m + ); + }, + }, + { + key: "processBuffer", + value: function (e) { + var t = this.json, + n = this.buffers; + return ( + t.buffers || (t.buffers = [{ byteLength: 0 }]), + n.push(e), + 0 + ); + }, + }, + { + key: "processBufferView", + value: function (e, t, n, r, i) { + var a, + o = this.json; + switch ((o.bufferViews || (o.bufferViews = []), t)) { + case Rt.BYTE: + case Rt.UNSIGNED_BYTE: + a = 1; + break; + case Rt.SHORT: + case Rt.UNSIGNED_SHORT: + a = 2; + break; + default: + a = 4; + } + for ( + var s = jt(r * e.itemSize * a), + l = new DataView(new ArrayBuffer(s)), + u = 0, + c = n; + c < n + r; + c++ + ) + for (var f = 0; f < e.itemSize; f++) { + var d = void 0; + e.itemSize > 4 + ? (d = e.array[c * e.itemSize + f]) + : (0 === f + ? (d = e.getX(c)) + : 1 === f + ? (d = e.getY(c)) + : 2 === f + ? (d = e.getZ(c)) + : 3 === f && (d = e.getW(c)), + !0 === e.normalized && + (d = A.MathUtils.normalize(d, e.array))), + t === Rt.FLOAT + ? l.setFloat32(u, d, !0) + : t === Rt.INT + ? l.setInt32(u, d, !0) + : t === Rt.UNSIGNED_INT + ? l.setUint32(u, d, !0) + : t === Rt.SHORT + ? l.setInt16(u, d, !0) + : t === Rt.UNSIGNED_SHORT + ? l.setUint16(u, d, !0) + : t === Rt.BYTE + ? l.setInt8(u, d) + : t === Rt.UNSIGNED_BYTE && l.setUint8(u, d), + (u += a); + } + var h = { + buffer: this.processBuffer(l.buffer), + byteOffset: this.byteOffset, + byteLength: s, + }; + return ( + void 0 !== i && (h.target = i), + i === Rt.ARRAY_BUFFER && (h.byteStride = e.itemSize * a), + (this.byteOffset += s), + o.bufferViews.push(h), + { id: o.bufferViews.length - 1, byteLength: 0 } + ); + }, + }, + { + key: "processBufferViewImage", + value: function (e) { + var t = this, + n = t.json; + return ( + n.bufferViews || (n.bufferViews = []), + e.arrayBuffer().then(function (e) { + var r = Wt(e), + i = { + buffer: t.processBuffer(r), + byteOffset: t.byteOffset, + byteLength: r.byteLength, + }; + return ( + (t.byteOffset += r.byteLength), + n.bufferViews.push(i) - 1 + ); + }) + ); + }, + }, + { + key: "processAccessor", + value: function (e, t, n, r) { + var i, + a = this.json; + if (e.array.constructor === Float32Array) i = Rt.FLOAT; + else if (e.array.constructor === Int32Array) i = Rt.INT; + else if (e.array.constructor === Uint32Array) + i = Rt.UNSIGNED_INT; + else if (e.array.constructor === Int16Array) i = Rt.SHORT; + else if (e.array.constructor === Uint16Array) + i = Rt.UNSIGNED_SHORT; + else if (e.array.constructor === Int8Array) i = Rt.BYTE; + else { + if (e.array.constructor !== Uint8Array) + throw new Error( + "THREE.GLTFExporter: Unsupported bufferAttribute component type: " + + e.array.constructor.name + ); + i = Rt.UNSIGNED_BYTE; + } + if ( + (void 0 === n && (n = 0), + void 0 === r && (r = e.count), + 0 === r) + ) + return null; + var o, + s = Vt(e, n, r); + void 0 !== t && + (o = + e === t.index + ? Rt.ELEMENT_ARRAY_BUFFER + : Rt.ARRAY_BUFFER); + var l = this.processBufferView(e, i, n, r, o), + u = { + bufferView: l.id, + byteOffset: l.byteOffset, + componentType: i, + count: r, + max: s.max, + min: s.min, + type: { + 1: "SCALAR", + 2: "VEC2", + 3: "VEC3", + 4: "VEC4", + 9: "MAT3", + 16: "MAT4", + }[e.itemSize], + }; + return ( + !0 === e.normalized && (u.normalized = !0), + a.accessors || (a.accessors = []), + a.accessors.push(u) - 1 + ); + }, + }, + { + key: "processImage", + value: function (e, t, n) { + var r = + arguments.length > 3 && void 0 !== arguments[3] + ? arguments[3] + : "image/png"; + if (null !== e) { + var i = this, + a = i.cache, + o = i.json, + s = i.options, + l = i.pending; + a.images.has(e) || a.images.set(e, {}); + var u = a.images.get(e), + c = r + ":flipY/" + n.toString(); + if (void 0 !== u[c]) return u[c]; + o.images || (o.images = []); + var f = { mimeType: r }, + d = Xt(); + (d.width = Math.min(e.width, s.maxTextureSize)), + (d.height = Math.min(e.height, s.maxTextureSize)); + var h = d.getContext("2d"); + if ( + (!0 === n && (h.translate(0, d.height), h.scale(1, -1)), + void 0 !== e.data) + ) { + t !== A.RGBAFormat && + console.error( + "GLTFExporter: Only RGBAFormat is supported.", + t + ), + (e.width > s.maxTextureSize || + e.height > s.maxTextureSize) && + console.warn( + "GLTFExporter: Image size is bigger than maxTextureSize", + e + ); + for ( + var p = new Uint8ClampedArray(e.height * e.width * 4), + v = 0; + v < p.length; + v += 4 + ) + (p[v + 0] = e.data[v + 0]), + (p[v + 1] = e.data[v + 1]), + (p[v + 2] = e.data[v + 2]), + (p[v + 3] = e.data[v + 3]); + h.putImageData( + new ImageData(p, e.width, e.height), + 0, + 0 + ); + } else h.drawImage(e, 0, 0, d.width, d.height); + !0 === s.binary + ? l.push( + Yt(d, r) + .then(function (e) { + return i.processBufferViewImage(e); + }) + .then(function (e) { + f.bufferView = e; + }) + ) + : void 0 !== d.toDataURL + ? (f.uri = d.toDataURL(r)) + : l.push( + Yt(d, r) + .then(wt) + .then(function (e) { + f.uri = e; + }) + ); + var m = o.images.push(f) - 1; + return (u[c] = m), m; + } + throw new Error( + "THREE.GLTFExporter: No valid image data found. Unable to process texture." + ); + }, + }, + { + key: "processSampler", + value: function (e) { + var t = this.json; + t.samplers || (t.samplers = []); + var n = { + magFilter: Pt[e.magFilter], + minFilter: Pt[e.minFilter], + wrapS: Pt[e.wrapS], + wrapT: Pt[e.wrapT], + }; + return t.samplers.push(n) - 1; + }, + }, + { + key: "processTexture", + value: function (e) { + var t = this.options, + n = this.cache, + r = this.json; + if (n.textures.has(e)) return n.textures.get(e); + r.textures || (r.textures = []), + e instanceof A.CompressedTexture && + (e = Mt(e, t.maxTextureSize)); + var i = e.userData.mimeType; + "image/webp" === i && (i = "image/png"); + var a = { + sampler: this.processSampler(e), + source: this.processImage(e.image, e.format, e.flipY, i), + }; + e.name && (a.name = e.name), + this._invokeAll(function (t) { + t.writeTexture && t.writeTexture(e, a); + }); + var o = r.textures.push(a) - 1; + return n.textures.set(e, o), o; + }, + }, + { + key: "processMaterial", + value: function (e) { + var t = this.cache, + n = this.json; + if (t.materials.has(e)) return t.materials.get(e); + if (e.isShaderMaterial) + return ( + console.warn( + "GLTFExporter: THREE.ShaderMaterial not supported." + ), + null + ); + n.materials || (n.materials = []); + var r = { pbrMetallicRoughness: {} }; + !0 !== e.isMeshStandardMaterial && + !0 !== e.isMeshBasicMaterial && + console.warn( + "GLTFExporter: Use MeshStandardMaterial or MeshBasicMaterial for best results." + ); + var i = e.color.toArray().concat([e.opacity]); + if ( + (zt(i, [1, 1, 1, 1]) || + (r.pbrMetallicRoughness.baseColorFactor = i), + e.isMeshStandardMaterial + ? ((r.pbrMetallicRoughness.metallicFactor = + e.metalness), + (r.pbrMetallicRoughness.roughnessFactor = + e.roughness)) + : ((r.pbrMetallicRoughness.metallicFactor = 0.5), + (r.pbrMetallicRoughness.roughnessFactor = 0.5)), + e.metalnessMap || e.roughnessMap) + ) { + var a = this.buildMetalRoughTexture( + e.metalnessMap, + e.roughnessMap + ), + o = { + index: this.processTexture(a), + channel: a.channel, + }; + this.applyTextureTransform(o, a), + (r.pbrMetallicRoughness.metallicRoughnessTexture = o); + } + if (e.map) { + var s = { + index: this.processTexture(e.map), + texCoord: e.map.channel, + }; + this.applyTextureTransform(s, e.map), + (r.pbrMetallicRoughness.baseColorTexture = s); + } + if (e.emissive) { + var l = e.emissive; + if ( + (Math.max(l.r, l.g, l.b) > 0 && + (r.emissiveFactor = e.emissive.toArray()), + e.emissiveMap) + ) { + var u = { + index: this.processTexture(e.emissiveMap), + texCoord: e.emissiveMap.channel, + }; + this.applyTextureTransform(u, e.emissiveMap), + (r.emissiveTexture = u); + } + } + if (e.normalMap) { + var c = { + index: this.processTexture(e.normalMap), + texCoord: e.normalMap.channel, + }; + e.normalScale && + 1 !== e.normalScale.x && + (c.scale = e.normalScale.x), + this.applyTextureTransform(c, e.normalMap), + (r.normalTexture = c); + } + if (e.aoMap) { + var f = { + index: this.processTexture(e.aoMap), + texCoord: e.aoMap.channel, + }; + 1 !== e.aoMapIntensity && (f.strength = e.aoMapIntensity), + this.applyTextureTransform(f, e.aoMap), + (r.occlusionTexture = f); + } + e.transparent + ? (r.alphaMode = "BLEND") + : e.alphaTest > 0 && + ((r.alphaMode = "MASK"), (r.alphaCutoff = e.alphaTest)), + e.side === A.DoubleSide && (r.doubleSided = !0), + "" !== e.name && (r.name = e.name), + this.serializeUserData(e, r), + this._invokeAll(function (t) { + t.writeMaterial && t.writeMaterial(e, r); + }); + var d = n.materials.push(r) - 1; + return t.materials.set(e, d), d; + }, + }, + { + key: "processMesh", + value: function (e) { + var t, + n = this.cache, + r = this.json, + i = [e.geometry.uuid]; + if (Array.isArray(e.material)) + for (var a = 0, o = e.material.length; a < o; a++) + i.push(e.material[a].uuid); + else i.push(e.material.uuid); + var s = i.join(":"); + if (n.meshes.has(s)) return n.meshes.get(s); + var u, + c = e.geometry; + u = e.isLineSegments + ? Rt.LINES + : e.isLineLoop + ? Rt.LINE_LOOP + : e.isLine + ? Rt.LINE_STRIP + : e.isPoints + ? Rt.POINTS + : e.material.wireframe + ? Rt.LINES + : Rt.TRIANGLES; + var f = {}, + d = {}, + h = [], + p = [], + v = + ((t = { uv: "TEXCOORD_0" }), + (0, l.Z)( + t, + A.REVISION.replace(/\D+/g, "") >= 152 ? "uv1" : "uv2", + "TEXCOORD_1" + ), + (0, l.Z)(t, "color", "COLOR_0"), + (0, l.Z)(t, "skinWeight", "WEIGHTS_0"), + (0, l.Z)(t, "skinIndex", "JOINTS_0"), + t), + m = c.getAttribute("normal"); + void 0 === m || + this.isNormalizedNormalAttribute(m) || + (console.warn( + "THREE.GLTFExporter: Creating normalized normal attribute from the non-normalized one." + ), + c.setAttribute( + "normal", + this.createNormalizedNormalAttribute(m) + )); + var g = null; + for (var y in c.attributes) + if ("morph" !== y.slice(0, 5)) { + var b = c.attributes[y]; + y = v[y] || y.toUpperCase(); + if ( + (/^(POSITION|NORMAL|TANGENT|TEXCOORD_\d+|COLOR_\d+|JOINTS_\d+|WEIGHTS_\d+)$/.test( + y + ) || (y = "_" + y), + n.attributes.has(this.getUID(b))) + ) + d[y] = n.attributes.get(this.getUID(b)); + else { + g = null; + var x = b.array; + "JOINTS_0" !== y || + x instanceof Uint16Array || + x instanceof Uint8Array || + (console.warn( + 'GLTFExporter: Attribute "skinIndex" converted to type UNSIGNED_SHORT.' + ), + (g = new A.BufferAttribute( + new Uint16Array(x), + b.itemSize, + b.normalized + ))); + var S = this.processAccessor(g || b, c); + null !== S && + (y.startsWith("_") || + this.detectMeshQuantization(y, b), + (d[y] = S), + n.attributes.set(this.getUID(b), S)); + } + } + if ( + (void 0 !== m && c.setAttribute("normal", m), + 0 === Object.keys(d).length) + ) + return null; + if ( + void 0 !== e.morphTargetInfluences && + e.morphTargetInfluences.length > 0 + ) { + var E = [], + _ = [], + C = {}; + if (void 0 !== e.morphTargetDictionary) + for (var w in e.morphTargetDictionary) + C[e.morphTargetDictionary[w]] = w; + for (var T = 0; T < e.morphTargetInfluences.length; ++T) { + var M = {}, + I = !1; + for (var k in c.morphAttributes) + if ("position" === k || "normal" === k) { + var R = c.morphAttributes[k][T], + B = k.toUpperCase(), + P = c.attributes[k]; + if (n.attributes.has(this.getUID(R, !0))) + M[B] = n.attributes.get(this.getUID(R, !0)); + else { + var L = R.clone(); + if (!c.morphTargetsRelative) + for (var D = 0, U = R.count; D < U; D++) + for (var F = 0; F < R.itemSize; F++) + 0 === F && L.setX(D, R.getX(D) - P.getX(D)), + 1 === F && + L.setY(D, R.getY(D) - P.getY(D)), + 2 === F && + L.setZ(D, R.getZ(D) - P.getZ(D)), + 3 === F && + L.setW(D, R.getW(D) - P.getW(D)); + (M[B] = this.processAccessor(L, c)), + n.attributes.set(this.getUID(P, !0), M[B]); + } + } else + I || + (console.warn( + "GLTFExporter: Only POSITION and NORMAL morph are supported." + ), + (I = !0)); + p.push(M), + E.push(e.morphTargetInfluences[T]), + void 0 !== e.morphTargetDictionary && _.push(C[T]); + } + (f.weights = E), + _.length > 0 && + ((f.extras = {}), (f.extras.targetNames = _)); + } + var O = Array.isArray(e.material); + if (O && 0 === c.groups.length) return null; + for ( + var N = O ? e.material : [e.material], + G = O + ? c.groups + : [ + { + materialIndex: 0, + start: void 0, + count: void 0, + }, + ], + Z = 0, + z = G.length; + Z < z; + Z++ + ) { + var Q = { mode: u, attributes: d }; + if ( + (this.serializeUserData(c, Q), + p.length > 0 && (Q.targets = p), + null !== c.index) + ) { + var H = this.getUID(c.index); + (void 0 === G[Z].start && void 0 === G[Z].count) || + (H += ":" + G[Z].start + ":" + G[Z].count), + n.attributes.has(H) + ? (Q.indices = n.attributes.get(H)) + : ((Q.indices = this.processAccessor( + c.index, + c, + G[Z].start, + G[Z].count + )), + n.attributes.set(H, Q.indices)), + null === Q.indices && delete Q.indices; + } + var V = this.processMaterial(N[G[Z].materialIndex]); + null !== V && (Q.material = V), h.push(Q); + } + (f.primitives = h), + r.meshes || (r.meshes = []), + this._invokeAll(function (t) { + t.writeMesh && t.writeMesh(e, f); + }); + var j = r.meshes.push(f) - 1; + return n.meshes.set(s, j), j; + }, + }, + { + key: "detectMeshQuantization", + value: function (e, t) { + if (!this.extensionsUsed[Bt]) { + var n = void 0; + switch (t.array.constructor) { + case Int8Array: + n = "byte"; + break; + case Uint8Array: + n = "unsigned byte"; + break; + case Int16Array: + n = "short"; + break; + case Uint16Array: + n = "unsigned short"; + break; + default: + return; + } + t.normalized && (n += " normalized"); + var r = e.split("_", 1)[0]; + It[r] && + It[r].includes(n) && + ((this.extensionsUsed[Bt] = !0), + (this.extensionsRequired[Bt] = !0)); + } + }, + }, + { + key: "processCamera", + value: function (e) { + var t = this.json; + t.cameras || (t.cameras = []); + var n = e.isOrthographicCamera, + r = { type: n ? "orthographic" : "perspective" }; + return ( + n + ? (r.orthographic = { + xmag: 2 * e.right, + ymag: 2 * e.top, + zfar: e.far <= 0 ? 0.001 : e.far, + znear: e.near < 0 ? 0 : e.near, + }) + : (r.perspective = { + aspectRatio: e.aspect, + yfov: A.MathUtils.degToRad(e.fov), + zfar: e.far <= 0 ? 0.001 : e.far, + znear: e.near < 0 ? 0 : e.near, + }), + "" !== e.name && (r.name = e.type), + t.cameras.push(r) - 1 + ); + }, + }, + { + key: "processAnimation", + value: function (e, t) { + var n = this.json, + r = this.nodeMap; + n.animations || (n.animations = []); + for ( + var i = (e = kt.Utils.mergeMorphTargetTracks( + e.clone(), + t + )).tracks, + a = [], + o = [], + s = 0; + s < i.length; + ++s + ) { + var l = i[s], + u = A.PropertyBinding.parseTrackName(l.name), + c = A.PropertyBinding.findNode(t, u.nodeName), + f = Lt[u.propertyName]; + if ( + ("bones" === u.objectName && + (c = + !0 === c.isSkinnedMesh + ? c.skeleton.getBoneByName(u.objectIndex) + : void 0), + !c || !f) + ) + return ( + console.warn( + 'THREE.GLTFExporter: Could not export animation track "%s".', + l.name + ), + null + ); + var d = l.values.length / l.times.length; + f === Lt.morphTargetInfluences && + (d /= c.morphTargetInfluences.length); + var h = void 0; + !0 === + l.createInterpolant + .isInterpolantFactoryMethodGLTFCubicSpline + ? ((h = "CUBICSPLINE"), (d /= 3)) + : (h = + l.getInterpolation() === A.InterpolateDiscrete + ? "STEP" + : "LINEAR"), + o.push({ + input: this.processAccessor( + new A.BufferAttribute(l.times, 1) + ), + output: this.processAccessor( + new A.BufferAttribute(l.values, d) + ), + interpolation: h, + }), + a.push({ + sampler: o.length - 1, + target: { node: r.get(c), path: f }, + }); + } + return ( + n.animations.push({ + name: e.name || "clip_" + n.animations.length, + samplers: o, + channels: a, + }), + n.animations.length - 1 + ); + }, + }, + { + key: "processSkin", + value: function (e) { + var t = this.json, + n = this.nodeMap, + r = t.nodes[n.get(e)], + i = e.skeleton; + if (void 0 === i) return null; + var a = e.skeleton.bones[0]; + if (void 0 === a) return null; + for ( + var o = [], + s = new Float32Array(16 * i.bones.length), + l = new A.Matrix4(), + u = 0; + u < i.bones.length; + ++u + ) + o.push(n.get(i.bones[u])), + l.copy(i.boneInverses[u]), + l.multiply(e.bindMatrix).toArray(s, 16 * u); + return ( + void 0 === t.skins && (t.skins = []), + t.skins.push({ + inverseBindMatrices: this.processAccessor( + new A.BufferAttribute(s, 16) + ), + joints: o, + skeleton: n.get(a), + }), + (r.skin = t.skins.length - 1) + ); + }, + }, + { + key: "processNode", + value: function (e) { + var t = this.json, + n = this.options, + r = this.nodeMap; + t.nodes || (t.nodes = []); + var i = {}; + if (n.trs) { + var a = e.quaternion.toArray(), + o = e.position.toArray(), + s = e.scale.toArray(); + zt(a, [0, 0, 0, 1]) || (i.rotation = a), + zt(o, [0, 0, 0]) || (i.translation = o), + zt(s, [1, 1, 1]) || (i.scale = s); + } else + e.matrixAutoUpdate && e.updateMatrix(), + !1 === Ht(e.matrix) && (i.matrix = e.matrix.elements); + if ( + ("" !== e.name && (i.name = String(e.name)), + this.serializeUserData(e, i), + e.isMesh || e.isLine || e.isPoints) + ) { + var l = this.processMesh(e); + null !== l && (i.mesh = l); + } else e.isCamera && (i.camera = this.processCamera(e)); + if ( + (e.isSkinnedMesh && this.skins.push(e), + e.children.length > 0) + ) { + for ( + var u = [], c = 0, f = e.children.length; + c < f; + c++ + ) { + var d = e.children[c]; + if (d.visible || !1 === n.onlyVisible) { + var h = this.processNode(d); + null !== h && u.push(h); + } + } + u.length > 0 && (i.children = u); + } + this._invokeAll(function (t) { + t.writeNode && t.writeNode(e, i); + }); + var p = t.nodes.push(i) - 1; + return r.set(e, p), p; + }, + }, + { + key: "processScene", + value: function (e) { + var t = this.json, + n = this.options; + t.scenes || ((t.scenes = []), (t.scene = 0)); + var r = {}; + "" !== e.name && (r.name = e.name), t.scenes.push(r); + for (var i = [], a = 0, o = e.children.length; a < o; a++) { + var s = e.children[a]; + if (s.visible || !1 === n.onlyVisible) { + var l = this.processNode(s); + null !== l && i.push(l); + } + } + i.length > 0 && (r.nodes = i), this.serializeUserData(e, r); + }, + }, + { + key: "processObjects", + value: function (e) { + var t = new A.Scene(); + t.name = "AuxScene"; + for (var n = 0; n < e.length; n++) t.children.push(e[n]); + this.processScene(t); + }, + }, + { + key: "processInput", + value: function (e) { + var t = this.options; + (e = e instanceof Array ? e : [e]), + this._invokeAll(function (t) { + t.beforeParse && t.beforeParse(e); + }); + for (var n = [], r = 0; r < e.length; r++) + e[r] instanceof A.Scene + ? this.processScene(e[r]) + : n.push(e[r]); + n.length > 0 && this.processObjects(n); + for (var i = 0; i < this.skins.length; ++i) + this.processSkin(this.skins[i]); + for (var a = 0; a < t.animations.length; ++a) + this.processAnimation(t.animations[a], e[0]); + this._invokeAll(function (t) { + t.afterParse && t.afterParse(e); + }); + }, + }, + { + key: "_invokeAll", + value: function (e) { + for (var t = 0, n = this.plugins.length; t < n; t++) + e(this.plugins[t]); + }, + }, + ]), + e + ); + })(), + Jt = (function () { + function e(t) { + (0, p.Z)(this, e), + (this.writer = t), + (this.name = "KHR_lights_punctual"); + } + return ( + (0, v.Z)(e, [ + { + key: "writeNode", + value: function (e, t) { + if (e.isLight) + if ( + e.isDirectionalLight || + e.isPointLight || + e.isSpotLight + ) { + var n = this.writer, + r = n.json, + i = n.extensionsUsed, + a = {}; + e.name && (a.name = e.name), + (a.color = e.color.toArray()), + (a.intensity = e.intensity), + e.isDirectionalLight + ? (a.type = "directional") + : e.isPointLight + ? ((a.type = "point"), + e.distance > 0 && (a.range = e.distance)) + : e.isSpotLight && + ((a.type = "spot"), + e.distance > 0 && (a.range = e.distance), + (a.spot = {}), + (a.spot.innerConeAngle = + (e.penumbra - 1) * e.angle * -1), + (a.spot.outerConeAngle = e.angle)), + void 0 !== e.decay && + 2 !== e.decay && + console.warn( + "THREE.GLTFExporter: Light decay may be lost. glTF is physically-based, and expects light.decay=2." + ), + !e.target || + (e.target.parent === e && + 0 === e.target.position.x && + 0 === e.target.position.y && + -1 === e.target.position.z) || + console.warn( + "THREE.GLTFExporter: Light direction may be lost. For best results, make light.target a child of the light with position 0,0,-1." + ), + i[this.name] || + ((r.extensions = r.extensions || {}), + (r.extensions[this.name] = { lights: [] }), + (i[this.name] = !0)); + var o = r.extensions[this.name].lights; + o.push(a), + (t.extensions = t.extensions || {}), + (t.extensions[this.name] = { light: o.length - 1 }); + } else + console.warn( + "THREE.GLTFExporter: Only directional, point, and spot lights are supported.", + e + ); + }, + }, + ]), + e + ); + })(), + Kt = (function () { + function e(t) { + (0, p.Z)(this, e), + (this.writer = t), + (this.name = "KHR_materials_unlit"); + } + return ( + (0, v.Z)(e, [ + { + key: "writeMaterial", + value: function (e, t) { + if (e.isMeshBasicMaterial) { + var n = this.writer.extensionsUsed; + (t.extensions = t.extensions || {}), + (t.extensions[this.name] = {}), + (n[this.name] = !0), + (t.pbrMetallicRoughness.metallicFactor = 0), + (t.pbrMetallicRoughness.roughnessFactor = 0.9); + } + }, + }, + ]), + e + ); + })(), + $t = (function () { + function e(t) { + (0, p.Z)(this, e), + (this.writer = t), + (this.name = "KHR_materials_clearcoat"); + } + return ( + (0, v.Z)(e, [ + { + key: "writeMaterial", + value: function (e, t) { + if (e.isMeshPhysicalMaterial && 0 !== e.clearcoat) { + var n = this.writer, + r = n.extensionsUsed, + i = {}; + if (((i.clearcoatFactor = e.clearcoat), e.clearcoatMap)) { + var a = { + index: n.processTexture(e.clearcoatMap), + texCoord: e.clearcoatMap.channel, + }; + n.applyTextureTransform(a, e.clearcoatMap), + (i.clearcoatTexture = a); + } + if ( + ((i.clearcoatRoughnessFactor = e.clearcoatRoughness), + e.clearcoatRoughnessMap) + ) { + var o = { + index: n.processTexture(e.clearcoatRoughnessMap), + texCoord: e.clearcoatRoughnessMap.channel, + }; + n.applyTextureTransform(o, e.clearcoatRoughnessMap), + (i.clearcoatRoughnessTexture = o); + } + if (e.clearcoatNormalMap) { + var s = { + index: n.processTexture(e.clearcoatNormalMap), + texCoord: e.clearcoatNormalMap.channel, + }; + n.applyTextureTransform(s, e.clearcoatNormalMap), + (i.clearcoatNormalTexture = s); + } + (t.extensions = t.extensions || {}), + (t.extensions[this.name] = i), + (r[this.name] = !0); + } + }, + }, + ]), + e + ); + })(), + en = (function () { + function e(t) { + (0, p.Z)(this, e), + (this.writer = t), + (this.name = "KHR_materials_iridescence"); + } + return ( + (0, v.Z)(e, [ + { + key: "writeMaterial", + value: function (e, t) { + if (e.isMeshPhysicalMaterial && 0 !== e.iridescence) { + var n = this.writer, + r = n.extensionsUsed, + i = {}; + if ( + ((i.iridescenceFactor = e.iridescence), + e.iridescenceMap) + ) { + var a = { + index: n.processTexture(e.iridescenceMap), + texCoord: e.iridescenceMap.channel, + }; + n.applyTextureTransform(a, e.iridescenceMap), + (i.iridescenceTexture = a); + } + if ( + ((i.iridescenceIor = e.iridescenceIOR), + (i.iridescenceThicknessMinimum = + e.iridescenceThicknessRange[0]), + (i.iridescenceThicknessMaximum = + e.iridescenceThicknessRange[1]), + e.iridescenceThicknessMap) + ) { + var o = { + index: n.processTexture(e.iridescenceThicknessMap), + texCoord: e.iridescenceThicknessMap.channel, + }; + n.applyTextureTransform(o, e.iridescenceThicknessMap), + (i.iridescenceThicknessTexture = o); + } + (t.extensions = t.extensions || {}), + (t.extensions[this.name] = i), + (r[this.name] = !0); + } + }, + }, + ]), + e + ); + })(), + tn = (function () { + function e(t) { + (0, p.Z)(this, e), + (this.writer = t), + (this.name = "KHR_materials_transmission"); + } + return ( + (0, v.Z)(e, [ + { + key: "writeMaterial", + value: function (e, t) { + if (e.isMeshPhysicalMaterial && 0 !== e.transmission) { + var n = this.writer, + r = n.extensionsUsed, + i = {}; + if ( + ((i.transmissionFactor = e.transmission), + e.transmissionMap) + ) { + var a = { + index: n.processTexture(e.transmissionMap), + texCoord: e.transmissionMap.channel, + }; + n.applyTextureTransform(a, e.transmissionMap), + (i.transmissionTexture = a); + } + (t.extensions = t.extensions || {}), + (t.extensions[this.name] = i), + (r[this.name] = !0); + } + }, + }, + ]), + e + ); + })(), + nn = (function () { + function e(t) { + (0, p.Z)(this, e), + (this.writer = t), + (this.name = "KHR_materials_volume"); + } + return ( + (0, v.Z)(e, [ + { + key: "writeMaterial", + value: function (e, t) { + if (e.isMeshPhysicalMaterial && 0 !== e.transmission) { + var n = this.writer, + r = n.extensionsUsed, + i = {}; + if (((i.thicknessFactor = e.thickness), e.thicknessMap)) { + var a = { + index: n.processTexture(e.thicknessMap), + texCoord: e.thicknessMap.channel, + }; + n.applyTextureTransform(a, e.thicknessMap), + (i.thicknessTexture = a); + } + (i.attenuationDistance = e.attenuationDistance), + (i.attenuationColor = e.attenuationColor.toArray()), + (t.extensions = t.extensions || {}), + (t.extensions[this.name] = i), + (r[this.name] = !0); + } + }, + }, + ]), + e + ); + })(), + rn = (function () { + function e(t) { + (0, p.Z)(this, e), + (this.writer = t), + (this.name = "KHR_materials_ior"); + } + return ( + (0, v.Z)(e, [ + { + key: "writeMaterial", + value: function (e, t) { + if (e.isMeshPhysicalMaterial && 1.5 !== e.ior) { + var n = this.writer.extensionsUsed, + r = {}; + (r.ior = e.ior), + (t.extensions = t.extensions || {}), + (t.extensions[this.name] = r), + (n[this.name] = !0); + } + }, + }, + ]), + e + ); + })(), + an = (function () { + function e(t) { + (0, p.Z)(this, e), + (this.writer = t), + (this.name = "KHR_materials_specular"); + } + return ( + (0, v.Z)(e, [ + { + key: "writeMaterial", + value: function (e, t) { + if ( + e.isMeshPhysicalMaterial && + (1 !== e.specularIntensity || + !e.specularColor.equals(Dt) || + e.specularIntensityMap || + e.specularColorTexture) + ) { + var n = this.writer, + r = n.extensionsUsed, + i = {}; + if (e.specularIntensityMap) { + var a = { + index: n.processTexture(e.specularIntensityMap), + texCoord: e.specularIntensityMap.channel, + }; + n.applyTextureTransform(a, e.specularIntensityMap), + (i.specularTexture = a); + } + if (e.specularColorMap) { + var o = { + index: n.processTexture(e.specularColorMap), + texCoord: e.specularColorMap.channel, + }; + n.applyTextureTransform(o, e.specularColorMap), + (i.specularColorTexture = o); + } + (i.specularFactor = e.specularIntensity), + (i.specularColorFactor = e.specularColor.toArray()), + (t.extensions = t.extensions || {}), + (t.extensions[this.name] = i), + (r[this.name] = !0); + } + }, + }, + ]), + e + ); + })(), + on = (function () { + function e(t) { + (0, p.Z)(this, e), + (this.writer = t), + (this.name = "KHR_materials_sheen"); + } + return ( + (0, v.Z)(e, [ + { + key: "writeMaterial", + value: function (e, t) { + if (e.isMeshPhysicalMaterial && 0 != e.sheen) { + var n = this.writer, + r = n.extensionsUsed, + i = {}; + if (e.sheenRoughnessMap) { + var a = { + index: n.processTexture(e.sheenRoughnessMap), + texCoord: e.sheenRoughnessMap.channel, + }; + n.applyTextureTransform(a, e.sheenRoughnessMap), + (i.sheenRoughnessTexture = a); + } + if (e.sheenColorMap) { + var o = { + index: n.processTexture(e.sheenColorMap), + texCoord: e.sheenColorMap.channel, + }; + n.applyTextureTransform(o, e.sheenColorMap), + (i.sheenColorTexture = o); + } + (i.sheenRoughnessFactor = e.sheenRoughness), + (i.sheenColorFactor = e.sheenColor.toArray()), + (t.extensions = t.extensions || {}), + (t.extensions[this.name] = i), + (r[this.name] = !0); + } + }, + }, + ]), + e + ); + })(), + sn = (function () { + function e(t) { + (0, p.Z)(this, e), + (this.writer = t), + (this.name = "KHR_materials_anisotropy"); + } + return ( + (0, v.Z)(e, [ + { + key: "writeMaterial", + value: function (e, t) { + if (e.isMeshPhysicalMaterial && 0 != e.anisotropy) { + var n = this.writer, + r = n.extensionsUsed, + i = {}; + if (e.anisotropyMap) { + var a = { index: n.processTexture(e.anisotropyMap) }; + n.applyTextureTransform(a, e.anisotropyMap), + (i.anisotropyTexture = a); + } + (i.anisotropyStrength = e.anisotropy), + (i.anisotropyRotation = e.anisotropyRotation), + (t.extensions = t.extensions || {}), + (t.extensions[this.name] = i), + (r[this.name] = !0); + } + }, + }, + ]), + e + ); + })(), + ln = (function () { + function e(t) { + (0, p.Z)(this, e), + (this.writer = t), + (this.name = "KHR_materials_emissive_strength"); + } + return ( + (0, v.Z)(e, [ + { + key: "writeMaterial", + value: function (e, t) { + if (e.isMeshStandardMaterial && 1 !== e.emissiveIntensity) { + var n = this.writer.extensionsUsed, + r = {}; + (r.emissiveStrength = e.emissiveIntensity), + (t.extensions = t.extensions || {}), + (t.extensions[this.name] = r), + (n[this.name] = !0); + } + }, + }, + ]), + e + ); + })(), + un = null, + cn = null, + fn = (function () { + function e() { + (0, p.Z)(this, e); + } + return ( + (0, v.Z)(e, [ + { + key: "parse", + value: function (t) { + var n = + arguments.length > 1 && void 0 !== arguments[1] + ? arguments[1] + : { + decodeSpeed: 5, + encodeSpeed: 5, + encoderMethod: e.MESH_EDGEBREAKER_ENCODING, + quantization: [16, 8, 8, 8, 8], + exportUvs: !0, + exportNormals: !0, + exportColor: !1, + }; + if (t instanceof A.BufferGeometry && t.isBufferGeometry) + throw new Error( + "DRACOExporter: The first parameter of parse() is now an instance of Mesh or Points." + ); + if (void 0 === DracoEncoderModule) + throw new Error( + "THREE.DRACOExporter: required the draco_encoder to work." + ); + var r, + i, + a = t.geometry, + o = DracoEncoderModule(), + s = new o.Encoder(); + if (!a.isBufferGeometry) + throw new Error( + "THREE.DRACOExporter.parse(geometry, options): geometry is not a THREE.BufferGeometry instance." + ); + if (t instanceof A.Mesh && t.isMesh) { + (r = new o.MeshBuilder()), (i = new o.Mesh()); + var l = a.getAttribute("position"); + r.AddFloatAttributeToMesh( + i, + o.POSITION, + l.count, + l.itemSize, + l.array + ); + var u = a.getIndex(); + if (null !== u) r.AddFacesToMesh(i, u.count / 3, u.array); + else { + for ( + var c = new ( + l.count > 65535 ? Uint32Array : Uint16Array + )(l.count), + f = 0; + f < c.length; + f++ + ) + c[f] = f; + r.AddFacesToMesh(i, l.count, c); + } + if (n.exportNormals) { + var d = a.getAttribute("normal"); + void 0 !== d && + r.AddFloatAttributeToMesh( + i, + o.NORMAL, + d.count, + d.itemSize, + d.array + ); + } + if (n.exportUvs) { + var h = a.getAttribute("uv"); + void 0 !== h && + r.AddFloatAttributeToMesh( + i, + o.TEX_COORD, + h.count, + h.itemSize, + h.array + ); + } + if (n.exportColor) { + var p = a.getAttribute("color"); + void 0 !== p && + r.AddFloatAttributeToMesh( + i, + o.COLOR, + p.count, + p.itemSize, + p.array + ); + } + } else { + if (!(t instanceof A.Points && t.isPoints)) + throw new Error( + "DRACOExporter: Unsupported object type." + ); + (r = new o.PointCloudBuilder()), (i = new o.PointCloud()); + var v = a.getAttribute("position"); + if ( + (r.AddFloatAttribute( + i, + o.POSITION, + v.count, + v.itemSize, + v.array + ), + n.exportColor) + ) { + var m = a.getAttribute("color"); + void 0 !== m && + r.AddFloatAttribute( + i, + o.COLOR, + m.count, + m.itemSize, + m.array + ); + } + } + var g, + y = new o.DracoInt8Array(), + b = void 0 !== n.encodeSpeed ? n.encodeSpeed : 5, + x = void 0 !== n.decodeSpeed ? n.decodeSpeed : 5; + if ( + (s.SetSpeedOptions(b, x), + void 0 !== n.encoderMethod && + s.SetEncodingMethod(n.encoderMethod), + void 0 !== n.quantization) + ) + for (var S = 0; S < 5; S++) + void 0 !== n.quantization[S] && + s.SetAttributeQuantization(S, n.quantization[S]); + if ( + ((g = + t instanceof A.Mesh && t.isMesh + ? s.EncodeMeshToDracoBuffer(i, y) + : s.EncodePointCloudToDracoBuffer(i, !0, y)), + o.destroy(i), + 0 === g) + ) + throw new Error( + "THREE.DRACOExporter: Draco encoding failed." + ); + for ( + var E = new Int8Array(new ArrayBuffer(g)), _ = 0; + _ < g; + _++ + ) + E[_] = y.GetValue(_); + return o.destroy(y), o.destroy(s), o.destroy(r), E; + }, + }, + ]), + e + ); + })(), + dn = fn, + hn = null, + pn = null, + vn = null, + mn = null; + function gn() { + var e = new THREE.Scene(), + t = new THREE.BoxGeometry(); + t.deleteAttribute("uv"); + var n = new THREE.MeshStandardMaterial({ side: THREE.BackSide }), + r = new THREE.MeshStandardMaterial(), + i = new THREE.PointLight(16777215, 5, 28, 2); + i.position.set(0.418, 16.199, 0.3), e.add(i); + var a = new THREE.Mesh(t, n); + a.position.set(-0.757, 13.219, 0.717), + a.scale.set(31.713, 28.305, 28.591), + e.add(a); + var o = new THREE.Mesh(t, r); + o.position.set(-10.906, 2.009, 1.846), + o.rotation.set(0, -0.195, 0), + o.scale.set(2.328, 7.905, 4.651), + e.add(o); + var s = new THREE.Mesh(t, r); + s.position.set(-5.607, -0.754, -0.758), + s.rotation.set(0, 0.994, 0), + s.scale.set(1.97, 1.534, 3.955), + e.add(s); + var l = new THREE.Mesh(t, r); + l.position.set(6.167, 0.857, 7.803), + l.rotation.set(0, 0.561, 0), + l.scale.set(3.927, 6.285, 3.687), + e.add(l); + var u = new THREE.Mesh(t, r); + u.position.set(-2.017, 0.018, 6.124), + u.rotation.set(0, 0.333, 0), + u.scale.set(2.002, 4.566, 2.064), + e.add(u); + var c = new THREE.Mesh(t, r); + c.position.set(2.291, -0.756, -2.621), + c.rotation.set(0, -0.286, 0), + c.scale.set(1.546, 1.552, 1.496), + e.add(c); + var f = new THREE.Mesh(t, r); + f.position.set(-2.193, -0.369, -5.547), + f.rotation.set(0, 0.516, 0), + f.scale.set(3.875, 3.487, 2.986), + e.add(f); + var d = new THREE.Mesh(t, A(50)); + d.position.set(-16.116, 14.37, 8.208), + d.scale.set(0.1, 2.428, 2.739), + e.add(d); + var h = new THREE.Mesh(t, A(50)); + h.position.set(-16.109, 18.021, -8.207), + h.scale.set(0.1, 2.425, 2.751), + e.add(h); + var p = new THREE.Mesh(t, A(17)); + p.position.set(14.904, 12.198, -1.832), + p.scale.set(0.15, 4.265, 6.331), + e.add(p); + var v = new THREE.Mesh(t, A(43)); + v.position.set(-0.462, 8.89, 14.52), + v.scale.set(4.38, 5.441, 0.088), + e.add(v); + var m = new THREE.Mesh(t, A(20)); + m.position.set(3.235, 11.486, -12.541), + m.scale.set(2.5, 2, 0.1), + e.add(m); + var g = new THREE.Mesh(t, A(100)); + function A(e) { + var t = new THREE.MeshBasicMaterial(); + return t.color.setScalar(e), t; + } + return g.position.set(0, 20, 0), g.scale.set(1, 0.1, 1), e.add(g), e; + } + var An = null, + yn = new A.Quaternion(), + bn = new A.Vector3(), + xn = new A.Vector3(), + Sn = new A.Vector3(), + En = new A.Vector3(), + _n = new A.Vector3(), + Cn = new A.Quaternion(), + wn = new A.Vector3(), + Tn = new A.Vector3(), + Mn = new A.Vector3(), + In = new A.Matrix4(), + kn = null; + function Rn(e, t) { + return Mn.setFromMatrixPosition(e.matrixWorld).applyMatrix4(t); + } + function Bn(e, t, n, r) { + var i = Rn(n, r); + (e[3 * t + 0] = i.x), (e[3 * t + 1] = i.y), (e[3 * t + 2] = i.z); + } + var Pn = null, + Ln = null, + Dn = null, + Un = null, + Fn = null, + On = null, + Nn = new A.Vector3(), + Gn = new A.Quaternion(), + Zn = new A.Vector3(), + zn = new A.Matrix4(), + Qn = null, + Hn = null, + Vn = null, + jn = 0; + function Wn() { + return jn >= Vn.length && Vn.push(new Quaternion()), Vn[jn++]; + } + var Xn = new Map(); + function Yn(e, t, n, r) { + var i = e.skeleton.bones, + a = e.geometry.userData.MMD.bones[t], + o = i[t]; + if (!Xn.has(t)) { + var s = Wn(); + if ( + (Xn.set(t, s.copy(o.quaternion)), + r && a.grant && !a.grant.isLocal && a.grant.affectRotation) + ) { + var l = a.grant.parentIndex, + u = a.grant.ratio; + Xn.has(l) || Yn(e, l, n, r), r.addGrantRotation(o, Xn.get(l), u); + } + if (n && a.ik) { + e.updateMatrixWorld(!0), n.updateOne(a.ik); + for (var c = a.ik.links, f = 0, d = c.length; f < d; f++) { + var h = c[f]; + if (!1 !== h.enabled) { + var p = h.index; + Xn.has(p) && Xn.set(p, Xn.get(p).copy(i[p].quaternion)); + } + } + } + s.copy(o.quaternion); + } + } + var qn = null, + Jn = new A.Quaternion(), + Kn = null, + $n = parseInt(A.REVISION.replace(/\D+/g, "")), + er = (function (e) { + (0, m.Z)(n, e); + var t = (0, g.Z)(n); + function n(e) { + var r, + i = + arguments.length > 1 && void 0 !== arguments[1] + ? arguments[1] + : {}; + (0, p.Z)(this, n), + ((r = t.call(this, e)).isReflector = !0), + (r.type = "Reflector"), + (r.camera = new A.PerspectiveCamera()); + var a = (0, f.Z)(r), + o = + void 0 !== i.color + ? new A.Color(i.color) + : new A.Color(8355711), + s = i.textureWidth || 512, + l = i.textureHeight || 512, + u = i.clipBias || 0, + c = i.shader || n.ReflectorShader, + d = void 0 !== i.multisample ? i.multisample : 4, + h = new A.Plane(), + v = new A.Vector3(), + m = new A.Vector3(), + g = new A.Vector3(), + y = new A.Matrix4(), + b = new A.Vector3(0, 0, -1), + x = new A.Vector4(), + S = new A.Vector3(), + E = new A.Vector3(), + _ = new A.Vector4(), + C = new A.Matrix4(), + w = r.camera, + T = new A.WebGLRenderTarget(s, l, { + samples: d, + type: A.HalfFloatType, + }), + M = new A.ShaderMaterial({ + uniforms: A.UniformsUtils.clone(c.uniforms), + fragmentShader: c.fragmentShader, + vertexShader: c.vertexShader, + }); + return ( + (M.uniforms.tDiffuse.value = T.texture), + (M.uniforms.color.value = o), + (M.uniforms.textureMatrix.value = C), + (r.material = M), + (r.onBeforeRender = function (e, t, n) { + if ( + (m.setFromMatrixPosition(a.matrixWorld), + g.setFromMatrixPosition(n.matrixWorld), + y.extractRotation(a.matrixWorld), + v.set(0, 0, 1), + v.applyMatrix4(y), + S.subVectors(m, g), + !(S.dot(v) > 0)) + ) { + S.reflect(v).negate(), + S.add(m), + y.extractRotation(n.matrixWorld), + b.set(0, 0, -1), + b.applyMatrix4(y), + b.add(g), + E.subVectors(m, b), + E.reflect(v).negate(), + E.add(m), + w.position.copy(S), + w.up.set(0, 1, 0), + w.up.applyMatrix4(y), + w.up.reflect(v), + w.lookAt(E), + (w.far = n.far), + w.updateMatrixWorld(), + w.projectionMatrix.copy(n.projectionMatrix), + C.set( + 0.5, + 0, + 0, + 0.5, + 0, + 0.5, + 0, + 0.5, + 0, + 0, + 0.5, + 0.5, + 0, + 0, + 0, + 1 + ), + C.multiply(w.projectionMatrix), + C.multiply(w.matrixWorldInverse), + C.multiply(a.matrixWorld), + h.setFromNormalAndCoplanarPoint(v, m), + h.applyMatrix4(w.matrixWorldInverse), + x.set(h.normal.x, h.normal.y, h.normal.z, h.constant); + var r = w.projectionMatrix; + (_.x = (Math.sign(x.x) + r.elements[8]) / r.elements[0]), + (_.y = (Math.sign(x.y) + r.elements[9]) / r.elements[5]), + (_.z = -1), + (_.w = (1 + r.elements[10]) / r.elements[14]), + x.multiplyScalar(2 / x.dot(_)), + (r.elements[2] = x.x), + (r.elements[6] = x.y), + (r.elements[10] = x.z + 1 - u), + (r.elements[14] = x.w), + (a.visible = !1); + var i = e.getRenderTarget(), + o = e.xr.enabled, + s = e.shadowMap.autoUpdate, + l = e.toneMapping, + c = !1; + (c = + "outputColorSpace" in e + ? "srgb" === e.outputColorSpace + : 3001 === e.outputEncoding), + (e.xr.enabled = !1), + (e.shadowMap.autoUpdate = !1), + "outputColorSpace" in e + ? (e.outputColorSpace = "linear-srgb") + : (e.outputEncoding = 3e3), + (e.toneMapping = A.NoToneMapping), + e.setRenderTarget(T), + e.state.buffers.depth.setMask(!0), + !1 === e.autoClear && e.clear(), + e.render(t, w), + (e.xr.enabled = o), + (e.shadowMap.autoUpdate = s), + (e.toneMapping = l), + "outputColorSpace" in e + ? (e.outputColorSpace = c ? "srgb" : "srgb-linear") + : (e.outputEncoding = c ? 3001 : 3e3), + e.setRenderTarget(i); + var f = n.viewport; + void 0 !== f && e.state.viewport(f), (a.visible = !0); + } + }), + (r.getRenderTarget = function () { + return T; + }), + (r.dispose = function () { + T.dispose(), a.material.dispose(); + }), + r + ); + } + return (0, v.Z)(n); + })(A.Mesh), + tr = er; + "\n\t\tuniform vec3 color;\n\t\tuniform sampler2D tDiffuse;\n\t\tvarying vec4 vUv;\n\n\t\t#include \n\n\t\tfloat blendOverlay( float base, float blend ) {\n\n\t\t\treturn( base < 0.5 ? ( 2.0 * base * blend ) : ( 1.0 - 2.0 * ( 1.0 - base ) * ( 1.0 - blend ) ) );\n\n\t\t}\n\n\t\tvec3 blendOverlay( vec3 base, vec3 blend ) {\n\n\t\t\treturn vec3( blendOverlay( base.r, blend.r ), blendOverlay( base.g, blend.g ), blendOverlay( base.b, blend.b ) );\n\n\t\t}\n\n\t\tvoid main() {\n\n\t\t\t#include \n\n\t\t\tvec4 base = texture2DProj( tDiffuse, vUv );\n\t\t\tgl_FragColor = vec4( blendOverlay( base.rgb, color ), 1.0 );\n\n\t\t\t#include \n\t\t\t#include <".concat( + $n >= 154 ? "colorspace_fragment" : "encodings_fragment", + ">\n\n\t\t}" + ); + var nr = (function (e) { + (0, m.Z)(n, e); + var t = (0, g.Z)(n); + function n(e) { + var r, + i = + arguments.length > 1 && void 0 !== arguments[1] + ? arguments[1] + : {}; + (0, p.Z)(this, n), + ((r = t.call(this, e)).isRefractor = !0), + (r.type = "Refractor"), + (r.camera = new A.PerspectiveCamera()); + var a = (0, f.Z)(r), + o = + void 0 !== i.color + ? new A.Color(i.color) + : new A.Color(8355711), + s = i.textureWidth || 512, + l = i.textureHeight || 512, + u = i.clipBias || 0, + c = i.shader || n.RefractorShader, + d = void 0 !== i.multisample ? i.multisample : 4, + h = r.camera; + (h.matrixAutoUpdate = !1), (h.userData.refractor = !0); + var v = new A.Plane(), + m = new A.Matrix4(), + g = new A.WebGLRenderTarget(s, l, { + samples: d, + type: A.HalfFloatType, + }); + (r.material = new A.ShaderMaterial({ + uniforms: A.UniformsUtils.clone(c.uniforms), + vertexShader: c.vertexShader, + fragmentShader: c.fragmentShader, + transparent: !0, + })), + (r.material.uniforms.color.value = o), + (r.material.uniforms.tDiffuse.value = g.texture), + (r.material.uniforms.textureMatrix.value = m); + var y = (function () { + var e = new A.Vector3(), + t = new A.Vector3(), + n = new A.Matrix4(), + r = new A.Vector3(), + i = new A.Vector3(); + return function (o) { + return ( + e.setFromMatrixPosition(a.matrixWorld), + t.setFromMatrixPosition(o.matrixWorld), + r.subVectors(e, t), + n.extractRotation(a.matrixWorld), + i.set(0, 0, 1), + i.applyMatrix4(n), + r.dot(i) < 0 + ); + }; + })(), + b = (function () { + var e = new A.Vector3(), + t = new A.Vector3(), + n = new A.Quaternion(), + r = new A.Vector3(); + return function () { + a.matrixWorld.decompose(t, n, r), + e.set(0, 0, 1).applyQuaternion(n).normalize(), + e.negate(), + v.setFromNormalAndCoplanarPoint(e, t); + }; + })(), + x = (function () { + var e = new A.Plane(), + t = new A.Vector4(), + n = new A.Vector4(); + return function (r) { + h.matrixWorld.copy(r.matrixWorld), + h.matrixWorldInverse.copy(h.matrixWorld).invert(), + h.projectionMatrix.copy(r.projectionMatrix), + (h.far = r.far), + e.copy(v), + e.applyMatrix4(h.matrixWorldInverse), + t.set(e.normal.x, e.normal.y, e.normal.z, e.constant); + var i = h.projectionMatrix; + (n.x = (Math.sign(t.x) + i.elements[8]) / i.elements[0]), + (n.y = (Math.sign(t.y) + i.elements[9]) / i.elements[5]), + (n.z = -1), + (n.w = (1 + i.elements[10]) / i.elements[14]), + t.multiplyScalar(2 / t.dot(n)), + (i.elements[2] = t.x), + (i.elements[6] = t.y), + (i.elements[10] = t.z + 1 - u), + (i.elements[14] = t.w); + }; + })(); + return ( + (r.onBeforeRender = function (e, t, n) { + !0 !== n.userData.refractor && + !0 !== !y(n) && + (b(), + (function (e) { + m.set( + 0.5, + 0, + 0, + 0.5, + 0, + 0.5, + 0, + 0.5, + 0, + 0, + 0.5, + 0.5, + 0, + 0, + 0, + 1 + ), + m.multiply(e.projectionMatrix), + m.multiply(e.matrixWorldInverse), + m.multiply(a.matrixWorld); + })(n), + x(n), + (function (e, t, n) { + a.visible = !1; + var r = e.getRenderTarget(), + i = e.xr.enabled, + o = e.shadowMap.autoUpdate, + s = e.toneMapping, + l = !1; + (l = + "outputColorSpace" in e + ? "srgb" === e.outputColorSpace + : 3001 === e.outputEncoding), + (e.xr.enabled = !1), + (e.shadowMap.autoUpdate = !1), + "outputColorSpace" in e + ? (e.outputColorSpace = "linear-srgb") + : (e.outputEncoding = 3e3), + (e.toneMapping = A.NoToneMapping), + e.setRenderTarget(g), + !1 === e.autoClear && e.clear(), + e.render(t, h), + (e.xr.enabled = i), + (e.shadowMap.autoUpdate = o), + (e.toneMapping = s), + e.setRenderTarget(r), + "outputColorSpace" in e + ? (e.outputColorSpace = l ? "srgb" : "srgb-linear") + : (e.outputEncoding = l ? 3001 : 3e3); + var u = n.viewport; + void 0 !== u && e.state.viewport(u), (a.visible = !0); + })(e, t, n)); + }), + (r.getRenderTarget = function () { + return g; + }), + (r.dispose = function () { + g.dispose(), a.material.dispose(); + }), + r + ); + } + return (0, v.Z)(n); + })(A.Mesh), + rr = nr; + "\n\n\t\tuniform vec3 color;\n\t\tuniform sampler2D tDiffuse;\n\n\t\tvarying vec4 vUv;\n\n\t\tfloat blendOverlay( float base, float blend ) {\n\n\t\t\treturn( base < 0.5 ? ( 2.0 * base * blend ) : ( 1.0 - 2.0 * ( 1.0 - base ) * ( 1.0 - blend ) ) );\n\n\t\t}\n\n\t\tvec3 blendOverlay( vec3 base, vec3 blend ) {\n\n\t\t\treturn vec3( blendOverlay( base.r, blend.r ), blendOverlay( base.g, blend.g ), blendOverlay( base.b, blend.b ) );\n\n\t\t}\n\n\t\tvoid main() {\n\n\t\t\tvec4 base = texture2DProj( tDiffuse, vUv );\n\t\t\tgl_FragColor = vec4( blendOverlay( base.rgb, color ), 1.0 );\n\n\t\t\t#include \n\t\t\t#include <".concat( + $n >= 154 ? "colorspace_fragment" : "encodings_fragment", + ">\n\n\t\t}" + ); + var ir = new A.Matrix4(), + ar = null, + or = new A.BufferGeometry(), + sr = new Float32Array([ + -1, -1, 0, 0, 0, 1, -1, 0, 1, 0, 1, 1, 0, 1, 1, -1, 1, 0, 0, 1, + ]), + lr = new A.InterleavedBuffer(sr, 5), + ur = (function (e) { + (0, m.Z)(n, e); + var t = (0, g.Z)(n); + function n() { + var e; + (0, p.Z)(this, n), + ((e = t.call( + this, + n.Geometry, + new A.MeshBasicMaterial({ opacity: 0, transparent: !0 }) + )).isLensflare = !0), + (e.type = "Lensflare"), + (e.frustumCulled = !1), + (e.renderOrder = 1 / 0); + var r = new A.Vector3(), + i = new A.Vector3(), + a = new A.DataTexture( + new Uint8Array(768), + 16, + 16, + A.RGBAFormat + ); + (a.minFilter = A.NearestFilter), + (a.magFilter = A.NearestFilter), + (a.wrapS = A.ClampToEdgeWrapping), + (a.wrapT = A.ClampToEdgeWrapping); + var o = new A.DataTexture( + new Uint8Array(768), + 16, + 16, + A.RGBAFormat + ); + (o.minFilter = A.NearestFilter), + (o.magFilter = A.NearestFilter), + (o.wrapS = A.ClampToEdgeWrapping), + (o.wrapT = A.ClampToEdgeWrapping); + var s = n.Geometry, + l = new A.RawShaderMaterial({ + uniforms: { + scale: { value: null }, + screenPosition: { value: null }, + }, + vertexShader: + "\n\n\t\t\t\tprecision highp float;\n\n\t\t\t\tuniform vec3 screenPosition;\n\t\t\t\tuniform vec2 scale;\n\n\t\t\t\tattribute vec3 position;\n\n\t\t\t\tvoid main() {\n\n\t\t\t\t\tgl_Position = vec4( position.xy * scale + screenPosition.xy, screenPosition.z, 1.0 );\n\n\t\t\t\t}", + fragmentShader: + "\n\n\t\t\t\tprecision highp float;\n\n\t\t\t\tvoid main() {\n\n\t\t\t\t\tgl_FragColor = vec4( 1.0, 0.0, 1.0, 1.0 );\n\n\t\t\t\t}", + depthTest: !0, + depthWrite: !1, + transparent: !1, + }), + u = new A.RawShaderMaterial({ + uniforms: { + map: { value: a }, + scale: { value: null }, + screenPosition: { value: null }, + }, + vertexShader: + "\n\n\t\t\t\tprecision highp float;\n\n\t\t\t\tuniform vec3 screenPosition;\n\t\t\t\tuniform vec2 scale;\n\n\t\t\t\tattribute vec3 position;\n\t\t\t\tattribute vec2 uv;\n\n\t\t\t\tvarying vec2 vUV;\n\n\t\t\t\tvoid main() {\n\n\t\t\t\t\tvUV = uv;\n\n\t\t\t\t\tgl_Position = vec4( position.xy * scale + screenPosition.xy, screenPosition.z, 1.0 );\n\n\t\t\t\t}", + fragmentShader: + "\n\n\t\t\t\tprecision highp float;\n\n\t\t\t\tuniform sampler2D map;\n\n\t\t\t\tvarying vec2 vUV;\n\n\t\t\t\tvoid main() {\n\n\t\t\t\t\tgl_FragColor = texture2D( map, vUV );\n\n\t\t\t\t}", + depthTest: !1, + depthWrite: !1, + transparent: !1, + }), + c = new A.Mesh(s, l), + f = [], + d = fr.Shader, + h = new A.RawShaderMaterial({ + uniforms: { + map: { value: null }, + occlusionMap: { value: o }, + color: { value: new A.Color(16777215) }, + scale: { value: new A.Vector2() }, + screenPosition: { value: new A.Vector3() }, + }, + vertexShader: d.vertexShader, + fragmentShader: d.fragmentShader, + blending: A.AdditiveBlending, + transparent: !0, + depthWrite: !1, + }), + v = new A.Mesh(s, h); + e.addElement = function (e) { + f.push(e); + }; + var m = new A.Vector2(), + g = new A.Vector2(), + y = new A.Box2(), + b = new A.Vector4(); + return ( + (e.onBeforeRender = function (e, t, n) { + e.getCurrentViewport(b); + var d = b.w / b.z, + p = b.z / 2, + A = b.w / 2, + x = 16 / b.w; + if ( + (m.set(x * d, x), + y.min.set(b.x, b.y), + y.max.set(b.x + (b.z - 16), b.y + (b.w - 16)), + i.setFromMatrixPosition(this.matrixWorld), + i.applyMatrix4(n.matrixWorldInverse), + !(i.z > 0) && + (r.copy(i).applyMatrix4(n.projectionMatrix), + (g.x = b.x + r.x * p + p - 8), + (g.y = b.y + r.y * A + A - 8), + y.containsPoint(g))) + ) { + e.copyFramebufferToTexture(g, a); + var S = l.uniforms; + (S.scale.value = m), + (S.screenPosition.value = r), + e.renderBufferDirect(n, null, s, l, c, null), + e.copyFramebufferToTexture(g, o), + ((S = u.uniforms).scale.value = m), + (S.screenPosition.value = r), + e.renderBufferDirect(n, null, s, u, c, null); + for ( + var E = 2 * -r.x, _ = 2 * -r.y, C = 0, w = f.length; + C < w; + C++ + ) { + var T = f[C], + M = h.uniforms; + M.color.value.copy(T.color), + (M.map.value = T.texture), + (M.screenPosition.value.x = r.x + E * T.distance), + (M.screenPosition.value.y = r.y + _ * T.distance), + (x = T.size / b.w); + var I = b.w / b.z; + M.scale.value.set(x * I, x), + (h.uniformsNeedUpdate = !0), + e.renderBufferDirect(n, null, s, h, v, null); + } + } + }), + (e.dispose = function () { + l.dispose(), + u.dispose(), + h.dispose(), + a.dispose(), + o.dispose(); + for (var e = 0, t = f.length; e < t; e++) + f[e].texture.dispose(); + }), + e + ); + } + return (0, v.Z)(n); + })(A.Mesh), + cr = ur, + fr = (0, v.Z)(function e(t) { + var n = + arguments.length > 1 && void 0 !== arguments[1] + ? arguments[1] + : 1, + r = + arguments.length > 2 && void 0 !== arguments[2] + ? arguments[2] + : 0, + i = + arguments.length > 3 && void 0 !== arguments[3] + ? arguments[3] + : new A.Color(16777215); + (0, p.Z)(this, e), + (this.texture = t), + (this.size = n), + (this.distance = r), + (this.color = i); + }), + dr = null, + hr = null, + pr = new Int32Array([ + 0, 265, 515, 778, 1030, 1295, 1541, 1804, 2060, 2309, 2575, 2822, + 3082, 3331, 3593, 3840, 400, 153, 915, 666, 1430, 1183, 1941, 1692, + 2460, 2197, 2975, 2710, 3482, 3219, 3993, 3728, 560, 825, 51, 314, + 1590, 1855, 1077, 1340, 2620, 2869, 2111, 2358, 3642, 3891, 3129, + 3376, 928, 681, 419, 170, 1958, 1711, 1445, 1196, 2988, 2725, 2479, + 2214, 4010, 3747, 3497, 3232, 1120, 1385, 1635, 1898, 102, 367, 613, + 876, 3180, 3429, 3695, 3942, 2154, 2403, 2665, 2912, 1520, 1273, + 2035, 1786, 502, 255, 1013, 764, 3580, 3317, 4095, 3830, 2554, 2291, + 3065, 2800, 1616, 1881, 1107, 1370, 598, 863, 85, 348, 3676, 3925, + 3167, 3414, 2650, 2899, 2137, 2384, 1984, 1737, 1475, 1226, 966, + 719, 453, 204, 4044, 3781, 3535, 3270, 3018, 2755, 2505, 2240, 2240, + 2505, 2755, 3018, 3270, 3535, 3781, 4044, 204, 453, 719, 966, 1226, + 1475, 1737, 1984, 2384, 2137, 2899, 2650, 3414, 3167, 3925, 3676, + 348, 85, 863, 598, 1370, 1107, 1881, 1616, 2800, 3065, 2291, 2554, + 3830, 4095, 3317, 3580, 764, 1013, 255, 502, 1786, 2035, 1273, 1520, + 2912, 2665, 2403, 2154, 3942, 3695, 3429, 3180, 876, 613, 367, 102, + 1898, 1635, 1385, 1120, 3232, 3497, 3747, 4010, 2214, 2479, 2725, + 2988, 1196, 1445, 1711, 1958, 170, 419, 681, 928, 3376, 3129, 3891, + 3642, 2358, 2111, 2869, 2620, 1340, 1077, 1855, 1590, 314, 51, 825, + 560, 3728, 3993, 3219, 3482, 2710, 2975, 2197, 2460, 1692, 1941, + 1183, 1430, 666, 915, 153, 400, 3840, 3593, 3331, 3082, 2822, 2575, + 2309, 2060, 1804, 1541, 1295, 1030, 778, 515, 265, 0, + ]), + vr = new Int32Array([ + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, + 8, 3, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, 1, 9, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1, 8, 3, 9, 8, + 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1, 2, 10, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, 8, 3, 1, 2, 10, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 9, 2, 10, 0, 2, 9, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 2, 8, 3, 2, 10, 8, 10, 9, 8, -1, -1, -1, -1, -1, + -1, -1, 3, 11, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 0, 11, 2, 8, 11, 0, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1, + 9, 0, 2, 3, 11, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1, 11, 2, 1, + 9, 11, 9, 8, 11, -1, -1, -1, -1, -1, -1, -1, 3, 10, 1, 11, 10, 3, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, 10, 1, 0, 8, 10, 8, 11, + 10, -1, -1, -1, -1, -1, -1, -1, 3, 9, 0, 3, 11, 9, 11, 10, 9, -1, + -1, -1, -1, -1, -1, -1, 9, 8, 10, 10, 8, 11, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 4, 7, 8, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 4, 3, 0, 7, 3, 4, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, + 1, 9, 8, 4, 7, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 4, 1, 9, 4, + 7, 1, 7, 3, 1, -1, -1, -1, -1, -1, -1, -1, 1, 2, 10, 8, 4, 7, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 3, 4, 7, 3, 0, 4, 1, 2, 10, -1, + -1, -1, -1, -1, -1, -1, 9, 2, 10, 9, 0, 2, 8, 4, 7, -1, -1, -1, -1, + -1, -1, -1, 2, 10, 9, 2, 9, 7, 2, 7, 3, 7, 9, 4, -1, -1, -1, -1, 8, + 4, 7, 3, 11, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 11, 4, 7, + 11, 2, 4, 2, 0, 4, -1, -1, -1, -1, -1, -1, -1, 9, 0, 1, 8, 4, 7, 2, + 3, 11, -1, -1, -1, -1, -1, -1, -1, 4, 7, 11, 9, 4, 11, 9, 11, 2, 9, + 2, 1, -1, -1, -1, -1, 3, 10, 1, 3, 11, 10, 7, 8, 4, -1, -1, -1, -1, + -1, -1, -1, 1, 11, 10, 1, 4, 11, 1, 0, 4, 7, 11, 4, -1, -1, -1, -1, + 4, 7, 8, 9, 0, 11, 9, 11, 10, 11, 0, 3, -1, -1, -1, -1, 4, 7, 11, 4, + 11, 9, 9, 11, 10, -1, -1, -1, -1, -1, -1, -1, 9, 5, 4, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 9, 5, 4, 0, 8, 3, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 0, 5, 4, 1, 5, 0, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 8, 5, 4, 8, 3, 5, 3, 1, 5, -1, -1, -1, -1, + -1, -1, -1, 1, 2, 10, 9, 5, 4, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 3, 0, 8, 1, 2, 10, 4, 9, 5, -1, -1, -1, -1, -1, -1, -1, 5, 2, + 10, 5, 4, 2, 4, 0, 2, -1, -1, -1, -1, -1, -1, -1, 2, 10, 5, 3, 2, 5, + 3, 5, 4, 3, 4, 8, -1, -1, -1, -1, 9, 5, 4, 2, 3, 11, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 0, 11, 2, 0, 8, 11, 4, 9, 5, -1, -1, -1, -1, + -1, -1, -1, 0, 5, 4, 0, 1, 5, 2, 3, 11, -1, -1, -1, -1, -1, -1, -1, + 2, 1, 5, 2, 5, 8, 2, 8, 11, 4, 8, 5, -1, -1, -1, -1, 10, 3, 11, 10, + 1, 3, 9, 5, 4, -1, -1, -1, -1, -1, -1, -1, 4, 9, 5, 0, 8, 1, 8, 10, + 1, 8, 11, 10, -1, -1, -1, -1, 5, 4, 0, 5, 0, 11, 5, 11, 10, 11, 0, + 3, -1, -1, -1, -1, 5, 4, 8, 5, 8, 10, 10, 8, 11, -1, -1, -1, -1, -1, + -1, -1, 9, 7, 8, 5, 7, 9, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 9, + 3, 0, 9, 5, 3, 5, 7, 3, -1, -1, -1, -1, -1, -1, -1, 0, 7, 8, 0, 1, + 7, 1, 5, 7, -1, -1, -1, -1, -1, -1, -1, 1, 5, 3, 3, 5, 7, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 9, 7, 8, 9, 5, 7, 10, 1, 2, -1, -1, + -1, -1, -1, -1, -1, 10, 1, 2, 9, 5, 0, 5, 3, 0, 5, 7, 3, -1, -1, -1, + -1, 8, 0, 2, 8, 2, 5, 8, 5, 7, 10, 5, 2, -1, -1, -1, -1, 2, 10, 5, + 2, 5, 3, 3, 5, 7, -1, -1, -1, -1, -1, -1, -1, 7, 9, 5, 7, 8, 9, 3, + 11, 2, -1, -1, -1, -1, -1, -1, -1, 9, 5, 7, 9, 7, 2, 9, 2, 0, 2, 7, + 11, -1, -1, -1, -1, 2, 3, 11, 0, 1, 8, 1, 7, 8, 1, 5, 7, -1, -1, -1, + -1, 11, 2, 1, 11, 1, 7, 7, 1, 5, -1, -1, -1, -1, -1, -1, -1, 9, 5, + 8, 8, 5, 7, 10, 1, 3, 10, 3, 11, -1, -1, -1, -1, 5, 7, 0, 5, 0, 9, + 7, 11, 0, 1, 0, 10, 11, 10, 0, -1, 11, 10, 0, 11, 0, 3, 10, 5, 0, 8, + 0, 7, 5, 7, 0, -1, 11, 10, 5, 7, 11, 5, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 10, 6, 5, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 0, 8, 3, 5, 10, 6, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 9, 0, 1, 5, 10, 6, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1, 8, 3, + 1, 9, 8, 5, 10, 6, -1, -1, -1, -1, -1, -1, -1, 1, 6, 5, 2, 6, 1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 1, 6, 5, 1, 2, 6, 3, 0, 8, -1, + -1, -1, -1, -1, -1, -1, 9, 6, 5, 9, 0, 6, 0, 2, 6, -1, -1, -1, -1, + -1, -1, -1, 5, 9, 8, 5, 8, 2, 5, 2, 6, 3, 2, 8, -1, -1, -1, -1, 2, + 3, 11, 10, 6, 5, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 11, 0, 8, + 11, 2, 0, 10, 6, 5, -1, -1, -1, -1, -1, -1, -1, 0, 1, 9, 2, 3, 11, + 5, 10, 6, -1, -1, -1, -1, -1, -1, -1, 5, 10, 6, 1, 9, 2, 9, 11, 2, + 9, 8, 11, -1, -1, -1, -1, 6, 3, 11, 6, 5, 3, 5, 1, 3, -1, -1, -1, + -1, -1, -1, -1, 0, 8, 11, 0, 11, 5, 0, 5, 1, 5, 11, 6, -1, -1, -1, + -1, 3, 11, 6, 0, 3, 6, 0, 6, 5, 0, 5, 9, -1, -1, -1, -1, 6, 5, 9, 6, + 9, 11, 11, 9, 8, -1, -1, -1, -1, -1, -1, -1, 5, 10, 6, 4, 7, 8, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 4, 3, 0, 4, 7, 3, 6, 5, 10, -1, + -1, -1, -1, -1, -1, -1, 1, 9, 0, 5, 10, 6, 8, 4, 7, -1, -1, -1, -1, + -1, -1, -1, 10, 6, 5, 1, 9, 7, 1, 7, 3, 7, 9, 4, -1, -1, -1, -1, 6, + 1, 2, 6, 5, 1, 4, 7, 8, -1, -1, -1, -1, -1, -1, -1, 1, 2, 5, 5, 2, + 6, 3, 0, 4, 3, 4, 7, -1, -1, -1, -1, 8, 4, 7, 9, 0, 5, 0, 6, 5, 0, + 2, 6, -1, -1, -1, -1, 7, 3, 9, 7, 9, 4, 3, 2, 9, 5, 9, 6, 2, 6, 9, + -1, 3, 11, 2, 7, 8, 4, 10, 6, 5, -1, -1, -1, -1, -1, -1, -1, 5, 10, + 6, 4, 7, 2, 4, 2, 0, 2, 7, 11, -1, -1, -1, -1, 0, 1, 9, 4, 7, 8, 2, + 3, 11, 5, 10, 6, -1, -1, -1, -1, 9, 2, 1, 9, 11, 2, 9, 4, 11, 7, 11, + 4, 5, 10, 6, -1, 8, 4, 7, 3, 11, 5, 3, 5, 1, 5, 11, 6, -1, -1, -1, + -1, 5, 1, 11, 5, 11, 6, 1, 0, 11, 7, 11, 4, 0, 4, 11, -1, 0, 5, 9, + 0, 6, 5, 0, 3, 6, 11, 6, 3, 8, 4, 7, -1, 6, 5, 9, 6, 9, 11, 4, 7, 9, + 7, 11, 9, -1, -1, -1, -1, 10, 4, 9, 6, 4, 10, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 4, 10, 6, 4, 9, 10, 0, 8, 3, -1, -1, -1, -1, -1, + -1, -1, 10, 0, 1, 10, 6, 0, 6, 4, 0, -1, -1, -1, -1, -1, -1, -1, 8, + 3, 1, 8, 1, 6, 8, 6, 4, 6, 1, 10, -1, -1, -1, -1, 1, 4, 9, 1, 2, 4, + 2, 6, 4, -1, -1, -1, -1, -1, -1, -1, 3, 0, 8, 1, 2, 9, 2, 4, 9, 2, + 6, 4, -1, -1, -1, -1, 0, 2, 4, 4, 2, 6, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 8, 3, 2, 8, 2, 4, 4, 2, 6, -1, -1, -1, -1, -1, -1, -1, + 10, 4, 9, 10, 6, 4, 11, 2, 3, -1, -1, -1, -1, -1, -1, -1, 0, 8, 2, + 2, 8, 11, 4, 9, 10, 4, 10, 6, -1, -1, -1, -1, 3, 11, 2, 0, 1, 6, 0, + 6, 4, 6, 1, 10, -1, -1, -1, -1, 6, 4, 1, 6, 1, 10, 4, 8, 1, 2, 1, + 11, 8, 11, 1, -1, 9, 6, 4, 9, 3, 6, 9, 1, 3, 11, 6, 3, -1, -1, -1, + -1, 8, 11, 1, 8, 1, 0, 11, 6, 1, 9, 1, 4, 6, 4, 1, -1, 3, 11, 6, 3, + 6, 0, 0, 6, 4, -1, -1, -1, -1, -1, -1, -1, 6, 4, 8, 11, 6, 8, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 7, 10, 6, 7, 8, 10, 8, 9, 10, + -1, -1, -1, -1, -1, -1, -1, 0, 7, 3, 0, 10, 7, 0, 9, 10, 6, 7, 10, + -1, -1, -1, -1, 10, 6, 7, 1, 10, 7, 1, 7, 8, 1, 8, 0, -1, -1, -1, + -1, 10, 6, 7, 10, 7, 1, 1, 7, 3, -1, -1, -1, -1, -1, -1, -1, 1, 2, + 6, 1, 6, 8, 1, 8, 9, 8, 6, 7, -1, -1, -1, -1, 2, 6, 9, 2, 9, 1, 6, + 7, 9, 0, 9, 3, 7, 3, 9, -1, 7, 8, 0, 7, 0, 6, 6, 0, 2, -1, -1, -1, + -1, -1, -1, -1, 7, 3, 2, 6, 7, 2, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 2, 3, 11, 10, 6, 8, 10, 8, 9, 8, 6, 7, -1, -1, -1, -1, 2, 0, + 7, 2, 7, 11, 0, 9, 7, 6, 7, 10, 9, 10, 7, -1, 1, 8, 0, 1, 7, 8, 1, + 10, 7, 6, 7, 10, 2, 3, 11, -1, 11, 2, 1, 11, 1, 7, 10, 6, 1, 6, 7, + 1, -1, -1, -1, -1, 8, 9, 6, 8, 6, 7, 9, 1, 6, 11, 6, 3, 1, 3, 6, -1, + 0, 9, 1, 11, 6, 7, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 7, 8, 0, + 7, 0, 6, 3, 11, 0, 11, 6, 0, -1, -1, -1, -1, 7, 11, 6, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 7, 6, 11, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 3, 0, 8, 11, 7, 6, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 0, 1, 9, 11, 7, 6, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 8, 1, 9, 8, 3, 1, 11, 7, 6, -1, -1, -1, -1, -1, + -1, -1, 10, 1, 2, 6, 11, 7, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 1, 2, 10, 3, 0, 8, 6, 11, 7, -1, -1, -1, -1, -1, -1, -1, 2, 9, 0, 2, + 10, 9, 6, 11, 7, -1, -1, -1, -1, -1, -1, -1, 6, 11, 7, 2, 10, 3, 10, + 8, 3, 10, 9, 8, -1, -1, -1, -1, 7, 2, 3, 6, 2, 7, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 7, 0, 8, 7, 6, 0, 6, 2, 0, -1, -1, -1, -1, + -1, -1, -1, 2, 7, 6, 2, 3, 7, 0, 1, 9, -1, -1, -1, -1, -1, -1, -1, + 1, 6, 2, 1, 8, 6, 1, 9, 8, 8, 7, 6, -1, -1, -1, -1, 10, 7, 6, 10, 1, + 7, 1, 3, 7, -1, -1, -1, -1, -1, -1, -1, 10, 7, 6, 1, 7, 10, 1, 8, 7, + 1, 0, 8, -1, -1, -1, -1, 0, 3, 7, 0, 7, 10, 0, 10, 9, 6, 10, 7, -1, + -1, -1, -1, 7, 6, 10, 7, 10, 8, 8, 10, 9, -1, -1, -1, -1, -1, -1, + -1, 6, 8, 4, 11, 8, 6, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 3, 6, + 11, 3, 0, 6, 0, 4, 6, -1, -1, -1, -1, -1, -1, -1, 8, 6, 11, 8, 4, 6, + 9, 0, 1, -1, -1, -1, -1, -1, -1, -1, 9, 4, 6, 9, 6, 3, 9, 3, 1, 11, + 3, 6, -1, -1, -1, -1, 6, 8, 4, 6, 11, 8, 2, 10, 1, -1, -1, -1, -1, + -1, -1, -1, 1, 2, 10, 3, 0, 11, 0, 6, 11, 0, 4, 6, -1, -1, -1, -1, + 4, 11, 8, 4, 6, 11, 0, 2, 9, 2, 10, 9, -1, -1, -1, -1, 10, 9, 3, 10, + 3, 2, 9, 4, 3, 11, 3, 6, 4, 6, 3, -1, 8, 2, 3, 8, 4, 2, 4, 6, 2, -1, + -1, -1, -1, -1, -1, -1, 0, 4, 2, 4, 6, 2, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 1, 9, 0, 2, 3, 4, 2, 4, 6, 4, 3, 8, -1, -1, -1, -1, + 1, 9, 4, 1, 4, 2, 2, 4, 6, -1, -1, -1, -1, -1, -1, -1, 8, 1, 3, 8, + 6, 1, 8, 4, 6, 6, 10, 1, -1, -1, -1, -1, 10, 1, 0, 10, 0, 6, 6, 0, + 4, -1, -1, -1, -1, -1, -1, -1, 4, 6, 3, 4, 3, 8, 6, 10, 3, 0, 3, 9, + 10, 9, 3, -1, 10, 9, 4, 6, 10, 4, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 4, 9, 5, 7, 6, 11, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 0, 8, 3, 4, 9, 5, 11, 7, 6, -1, -1, -1, -1, -1, -1, -1, 5, 0, 1, 5, + 4, 0, 7, 6, 11, -1, -1, -1, -1, -1, -1, -1, 11, 7, 6, 8, 3, 4, 3, 5, + 4, 3, 1, 5, -1, -1, -1, -1, 9, 5, 4, 10, 1, 2, 7, 6, 11, -1, -1, -1, + -1, -1, -1, -1, 6, 11, 7, 1, 2, 10, 0, 8, 3, 4, 9, 5, -1, -1, -1, + -1, 7, 6, 11, 5, 4, 10, 4, 2, 10, 4, 0, 2, -1, -1, -1, -1, 3, 4, 8, + 3, 5, 4, 3, 2, 5, 10, 5, 2, 11, 7, 6, -1, 7, 2, 3, 7, 6, 2, 5, 4, 9, + -1, -1, -1, -1, -1, -1, -1, 9, 5, 4, 0, 8, 6, 0, 6, 2, 6, 8, 7, -1, + -1, -1, -1, 3, 6, 2, 3, 7, 6, 1, 5, 0, 5, 4, 0, -1, -1, -1, -1, 6, + 2, 8, 6, 8, 7, 2, 1, 8, 4, 8, 5, 1, 5, 8, -1, 9, 5, 4, 10, 1, 6, 1, + 7, 6, 1, 3, 7, -1, -1, -1, -1, 1, 6, 10, 1, 7, 6, 1, 0, 7, 8, 7, 0, + 9, 5, 4, -1, 4, 0, 10, 4, 10, 5, 0, 3, 10, 6, 10, 7, 3, 7, 10, -1, + 7, 6, 10, 7, 10, 8, 5, 4, 10, 4, 8, 10, -1, -1, -1, -1, 6, 9, 5, 6, + 11, 9, 11, 8, 9, -1, -1, -1, -1, -1, -1, -1, 3, 6, 11, 0, 6, 3, 0, + 5, 6, 0, 9, 5, -1, -1, -1, -1, 0, 11, 8, 0, 5, 11, 0, 1, 5, 5, 6, + 11, -1, -1, -1, -1, 6, 11, 3, 6, 3, 5, 5, 3, 1, -1, -1, -1, -1, -1, + -1, -1, 1, 2, 10, 9, 5, 11, 9, 11, 8, 11, 5, 6, -1, -1, -1, -1, 0, + 11, 3, 0, 6, 11, 0, 9, 6, 5, 6, 9, 1, 2, 10, -1, 11, 8, 5, 11, 5, 6, + 8, 0, 5, 10, 5, 2, 0, 2, 5, -1, 6, 11, 3, 6, 3, 5, 2, 10, 3, 10, 5, + 3, -1, -1, -1, -1, 5, 8, 9, 5, 2, 8, 5, 6, 2, 3, 8, 2, -1, -1, -1, + -1, 9, 5, 6, 9, 6, 0, 0, 6, 2, -1, -1, -1, -1, -1, -1, -1, 1, 5, 8, + 1, 8, 0, 5, 6, 8, 3, 8, 2, 6, 2, 8, -1, 1, 5, 6, 2, 1, 6, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 1, 3, 6, 1, 6, 10, 3, 8, 6, 5, 6, 9, + 8, 9, 6, -1, 10, 1, 0, 10, 0, 6, 9, 5, 0, 5, 6, 0, -1, -1, -1, -1, + 0, 3, 8, 5, 6, 10, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 10, 5, 6, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 11, 5, 10, 7, 5, + 11, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 11, 5, 10, 11, 7, 5, 8, + 3, 0, -1, -1, -1, -1, -1, -1, -1, 5, 11, 7, 5, 10, 11, 1, 9, 0, -1, + -1, -1, -1, -1, -1, -1, 10, 7, 5, 10, 11, 7, 9, 8, 1, 8, 3, 1, -1, + -1, -1, -1, 11, 1, 2, 11, 7, 1, 7, 5, 1, -1, -1, -1, -1, -1, -1, -1, + 0, 8, 3, 1, 2, 7, 1, 7, 5, 7, 2, 11, -1, -1, -1, -1, 9, 7, 5, 9, 2, + 7, 9, 0, 2, 2, 11, 7, -1, -1, -1, -1, 7, 5, 2, 7, 2, 11, 5, 9, 2, 3, + 2, 8, 9, 8, 2, -1, 2, 5, 10, 2, 3, 5, 3, 7, 5, -1, -1, -1, -1, -1, + -1, -1, 8, 2, 0, 8, 5, 2, 8, 7, 5, 10, 2, 5, -1, -1, -1, -1, 9, 0, + 1, 5, 10, 3, 5, 3, 7, 3, 10, 2, -1, -1, -1, -1, 9, 8, 2, 9, 2, 1, 8, + 7, 2, 10, 2, 5, 7, 5, 2, -1, 1, 3, 5, 3, 7, 5, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 0, 8, 7, 0, 7, 1, 1, 7, 5, -1, -1, -1, -1, -1, + -1, -1, 9, 0, 3, 9, 3, 5, 5, 3, 7, -1, -1, -1, -1, -1, -1, -1, 9, 8, + 7, 5, 9, 7, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 5, 8, 4, 5, 10, + 8, 10, 11, 8, -1, -1, -1, -1, -1, -1, -1, 5, 0, 4, 5, 11, 0, 5, 10, + 11, 11, 3, 0, -1, -1, -1, -1, 0, 1, 9, 8, 4, 10, 8, 10, 11, 10, 4, + 5, -1, -1, -1, -1, 10, 11, 4, 10, 4, 5, 11, 3, 4, 9, 4, 1, 3, 1, 4, + -1, 2, 5, 1, 2, 8, 5, 2, 11, 8, 4, 5, 8, -1, -1, -1, -1, 0, 4, 11, + 0, 11, 3, 4, 5, 11, 2, 11, 1, 5, 1, 11, -1, 0, 2, 5, 0, 5, 9, 2, 11, + 5, 4, 5, 8, 11, 8, 5, -1, 9, 4, 5, 2, 11, 3, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 2, 5, 10, 3, 5, 2, 3, 4, 5, 3, 8, 4, -1, -1, -1, -1, + 5, 10, 2, 5, 2, 4, 4, 2, 0, -1, -1, -1, -1, -1, -1, -1, 3, 10, 2, 3, + 5, 10, 3, 8, 5, 4, 5, 8, 0, 1, 9, -1, 5, 10, 2, 5, 2, 4, 1, 9, 2, 9, + 4, 2, -1, -1, -1, -1, 8, 4, 5, 8, 5, 3, 3, 5, 1, -1, -1, -1, -1, -1, + -1, -1, 0, 4, 5, 1, 0, 5, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 8, + 4, 5, 8, 5, 3, 9, 0, 5, 0, 3, 5, -1, -1, -1, -1, 9, 4, 5, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 4, 11, 7, 4, 9, 11, 9, + 10, 11, -1, -1, -1, -1, -1, -1, -1, 0, 8, 3, 4, 9, 7, 9, 11, 7, 9, + 10, 11, -1, -1, -1, -1, 1, 10, 11, 1, 11, 4, 1, 4, 0, 7, 4, 11, -1, + -1, -1, -1, 3, 1, 4, 3, 4, 8, 1, 10, 4, 7, 4, 11, 10, 11, 4, -1, 4, + 11, 7, 9, 11, 4, 9, 2, 11, 9, 1, 2, -1, -1, -1, -1, 9, 7, 4, 9, 11, + 7, 9, 1, 11, 2, 11, 1, 0, 8, 3, -1, 11, 7, 4, 11, 4, 2, 2, 4, 0, -1, + -1, -1, -1, -1, -1, -1, 11, 7, 4, 11, 4, 2, 8, 3, 4, 3, 2, 4, -1, + -1, -1, -1, 2, 9, 10, 2, 7, 9, 2, 3, 7, 7, 4, 9, -1, -1, -1, -1, 9, + 10, 7, 9, 7, 4, 10, 2, 7, 8, 7, 0, 2, 0, 7, -1, 3, 7, 10, 3, 10, 2, + 7, 4, 10, 1, 10, 0, 4, 0, 10, -1, 1, 10, 2, 8, 7, 4, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 4, 9, 1, 4, 1, 7, 7, 1, 3, -1, -1, -1, -1, + -1, -1, -1, 4, 9, 1, 4, 1, 7, 0, 8, 1, 8, 7, 1, -1, -1, -1, -1, 4, + 0, 3, 7, 4, 3, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 4, 8, 7, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 9, 10, 8, 10, 11, 8, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 3, 0, 9, 3, 9, 11, 11, 9, + 10, -1, -1, -1, -1, -1, -1, -1, 0, 1, 10, 0, 10, 8, 8, 10, 11, -1, + -1, -1, -1, -1, -1, -1, 3, 1, 10, 11, 3, 10, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 1, 2, 11, 1, 11, 9, 9, 11, 8, -1, -1, -1, -1, -1, + -1, -1, 3, 0, 9, 3, 9, 11, 1, 2, 9, 2, 11, 9, -1, -1, -1, -1, 0, 2, + 11, 8, 0, 11, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 3, 2, 11, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 2, 3, 8, 2, 8, 10, + 10, 8, 9, -1, -1, -1, -1, -1, -1, -1, 9, 10, 2, 0, 9, 2, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 2, 3, 8, 2, 8, 10, 0, 1, 8, 1, 10, 8, + -1, -1, -1, -1, 1, 10, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 1, 3, 8, 9, 1, 8, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 0, 9, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, + 3, 8, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + ]), + mr = (0, v.Z)(function e() { + var t = this, + n = + arguments.length > 0 && void 0 !== arguments[0] + ? arguments[0] + : Math; + (0, p.Z)(this, e), + M(this, "grad3", [ + [1, 1, 0], + [-1, 1, 0], + [1, -1, 0], + [-1, -1, 0], + [1, 0, 1], + [-1, 0, 1], + [1, 0, -1], + [-1, 0, -1], + [0, 1, 1], + [0, -1, 1], + [0, 1, -1], + [0, -1, -1], + ]), + M(this, "grad4", [ + [0, 1, 1, 1], + [0, 1, 1, -1], + [0, 1, -1, 1], + [0, 1, -1, -1], + [0, -1, 1, 1], + [0, -1, 1, -1], + [0, -1, -1, 1], + [0, -1, -1, -1], + [1, 0, 1, 1], + [1, 0, 1, -1], + [1, 0, -1, 1], + [1, 0, -1, -1], + [-1, 0, 1, 1], + [-1, 0, 1, -1], + [-1, 0, -1, 1], + [-1, 0, -1, -1], + [1, 1, 0, 1], + [1, 1, 0, -1], + [1, -1, 0, 1], + [1, -1, 0, -1], + [-1, 1, 0, 1], + [-1, 1, 0, -1], + [-1, -1, 0, 1], + [-1, -1, 0, -1], + [1, 1, 1, 0], + [1, 1, -1, 0], + [1, -1, 1, 0], + [1, -1, -1, 0], + [-1, 1, 1, 0], + [-1, 1, -1, 0], + [-1, -1, 1, 0], + [-1, -1, -1, 0], + ]), + M(this, "p", []), + M(this, "perm", []), + M(this, "simplex", [ + [0, 1, 2, 3], + [0, 1, 3, 2], + [0, 0, 0, 0], + [0, 2, 3, 1], + [0, 0, 0, 0], + [0, 0, 0, 0], + [0, 0, 0, 0], + [1, 2, 3, 0], + [0, 2, 1, 3], + [0, 0, 0, 0], + [0, 3, 1, 2], + [0, 3, 2, 1], + [0, 0, 0, 0], + [0, 0, 0, 0], + [0, 0, 0, 0], + [1, 3, 2, 0], + [0, 0, 0, 0], + [0, 0, 0, 0], + [0, 0, 0, 0], + [0, 0, 0, 0], + [0, 0, 0, 0], + [0, 0, 0, 0], + [0, 0, 0, 0], + [0, 0, 0, 0], + [1, 2, 0, 3], + [0, 0, 0, 0], + [1, 3, 0, 2], + [0, 0, 0, 0], + [0, 0, 0, 0], + [0, 0, 0, 0], + [2, 3, 0, 1], + [2, 3, 1, 0], + [1, 0, 2, 3], + [1, 0, 3, 2], + [0, 0, 0, 0], + [0, 0, 0, 0], + [0, 0, 0, 0], + [2, 0, 3, 1], + [0, 0, 0, 0], + [2, 1, 3, 0], + [0, 0, 0, 0], + [0, 0, 0, 0], + [0, 0, 0, 0], + [0, 0, 0, 0], + [0, 0, 0, 0], + [0, 0, 0, 0], + [0, 0, 0, 0], + [0, 0, 0, 0], + [2, 0, 1, 3], + [0, 0, 0, 0], + [0, 0, 0, 0], + [0, 0, 0, 0], + [3, 0, 1, 2], + [3, 0, 2, 1], + [0, 0, 0, 0], + [3, 1, 2, 0], + [2, 1, 0, 3], + [0, 0, 0, 0], + [0, 0, 0, 0], + [0, 0, 0, 0], + [3, 1, 0, 2], + [0, 0, 0, 0], + [3, 2, 0, 1], + [3, 2, 1, 0], + ]), + M(this, "dot", function (e, t, n) { + return e[0] * t + e[1] * n; + }), + M(this, "dot3", function (e, t, n, r) { + return e[0] * t + e[1] * n + e[2] * r; + }), + M(this, "dot4", function (e, t, n, r, i) { + return e[0] * t + e[1] * n + e[2] * r + e[3] * i; + }), + M(this, "noise", function (e, n) { + var r = (e + n) * (0.5 * (Math.sqrt(3) - 1)), + i = Math.floor(e + r), + a = Math.floor(n + r), + o = (3 - Math.sqrt(3)) / 6, + s = (i + a) * o, + l = e - (i - s), + u = n - (a - s), + c = 0, + f = 1; + l > u && ((c = 1), (f = 0)); + var d = l - c + o, + h = u - f + o, + p = l - 1 + 2 * o, + v = u - 1 + 2 * o, + m = 255 & i, + g = 255 & a, + A = t.perm[m + t.perm[g]] % 12, + y = t.perm[m + c + t.perm[g + f]] % 12, + b = t.perm[m + 1 + t.perm[g + 1]] % 12, + x = 0.5 - l * l - u * u, + S = 0.5 - d * d - h * h, + E = 0.5 - p * p - v * v; + return ( + 70 * + ((x < 0 ? 0 : (x *= x) * x * t.dot(t.grad3[A], l, u)) + + (S < 0 ? 0 : (S *= S) * S * t.dot(t.grad3[y], d, h)) + + (E < 0 ? 0 : (E *= E) * E * t.dot(t.grad3[b], p, v))) + ); + }), + M(this, "noise3d", function (e, n, r) { + var i, + a, + o, + s, + l, + u, + c = (e + n + r) * (1 / 3), + f = Math.floor(e + c), + d = Math.floor(n + c), + h = Math.floor(r + c), + p = 1 / 6, + v = (f + d + h) * p, + m = e - (f - v), + g = n - (d - v), + A = r - (h - v); + m >= g + ? g >= A + ? ((i = 1), (a = 0), (o = 0), (s = 1), (l = 1), (u = 0)) + : m >= A + ? ((i = 1), (a = 0), (o = 0), (s = 1), (l = 0), (u = 1)) + : ((i = 0), (a = 0), (o = 1), (s = 1), (l = 0), (u = 1)) + : g < A + ? ((i = 0), (a = 0), (o = 1), (s = 0), (l = 1), (u = 1)) + : m < A + ? ((i = 0), (a = 1), (o = 0), (s = 0), (l = 1), (u = 1)) + : ((i = 0), (a = 1), (o = 0), (s = 1), (l = 1), (u = 0)); + var y = m - i + p, + b = g - a + p, + x = A - o + p, + S = m - s + 2 * p, + E = g - l + 2 * p, + _ = A - u + 2 * p, + C = m - 1 + 0.5, + w = g - 1 + 0.5, + T = A - 1 + 0.5, + M = 255 & f, + I = 255 & d, + k = 255 & h, + R = t.perm[M + t.perm[I + t.perm[k]]] % 12, + B = t.perm[M + i + t.perm[I + a + t.perm[k + o]]] % 12, + P = t.perm[M + s + t.perm[I + l + t.perm[k + u]]] % 12, + L = t.perm[M + 1 + t.perm[I + 1 + t.perm[k + 1]]] % 12, + D = 0.6 - m * m - g * g - A * A, + U = 0.6 - y * y - b * b - x * x, + F = 0.6 - S * S - E * E - _ * _, + O = 0.6 - C * C - w * w - T * T; + return ( + 32 * + ((D < 0 ? 0 : (D *= D) * D * t.dot3(t.grad3[R], m, g, A)) + + (U < 0 ? 0 : (U *= U) * U * t.dot3(t.grad3[B], y, b, x)) + + (F < 0 ? 0 : (F *= F) * F * t.dot3(t.grad3[P], S, E, _)) + + (O < 0 ? 0 : (O *= O) * O * t.dot3(t.grad3[L], C, w, T))) + ); + }), + M(this, "noise4d", function (e, n, r, i) { + var a, + o, + s, + l, + u, + c, + f, + d, + h, + p, + v, + m, + g = t.grad4, + A = t.simplex, + y = t.perm, + b = (Math.sqrt(5) - 1) / 4, + x = (5 - Math.sqrt(5)) / 20, + S = (e + n + r + i) * b, + E = Math.floor(e + S), + _ = Math.floor(n + S), + C = Math.floor(r + S), + w = Math.floor(i + S), + T = (E + _ + C + w) * x, + M = e - (E - T), + I = n - (_ - T), + k = r - (C - T), + R = i - (w - T), + B = + (M > I ? 32 : 0) + + (M > k ? 16 : 0) + + (I > k ? 8 : 0) + + (M > R ? 4 : 0) + + (I > R ? 2 : 0) + + (k > R ? 1 : 0), + P = M - (a = A[B][0] >= 3 ? 1 : 0) + x, + L = I - (o = A[B][1] >= 3 ? 1 : 0) + x, + D = k - (s = A[B][2] >= 3 ? 1 : 0) + x, + U = R - (l = A[B][3] >= 3 ? 1 : 0) + x, + F = M - (u = A[B][0] >= 2 ? 1 : 0) + 2 * x, + O = I - (c = A[B][1] >= 2 ? 1 : 0) + 2 * x, + N = k - (f = A[B][2] >= 2 ? 1 : 0) + 2 * x, + G = R - (d = A[B][3] >= 2 ? 1 : 0) + 2 * x, + Z = M - (h = A[B][0] >= 1 ? 1 : 0) + 3 * x, + z = I - (p = A[B][1] >= 1 ? 1 : 0) + 3 * x, + Q = k - (v = A[B][2] >= 1 ? 1 : 0) + 3 * x, + H = R - (m = A[B][3] >= 1 ? 1 : 0) + 3 * x, + V = M - 1 + 4 * x, + j = I - 1 + 4 * x, + W = k - 1 + 4 * x, + X = R - 1 + 4 * x, + Y = 255 & E, + q = 255 & _, + J = 255 & C, + K = 255 & w, + $ = y[Y + y[q + y[J + y[K]]]] % 32, + ee = y[Y + a + y[q + o + y[J + s + y[K + l]]]] % 32, + te = y[Y + u + y[q + c + y[J + f + y[K + d]]]] % 32, + ne = y[Y + h + y[q + p + y[J + v + y[K + m]]]] % 32, + re = y[Y + 1 + y[q + 1 + y[J + 1 + y[K + 1]]]] % 32, + ie = 0.6 - M * M - I * I - k * k - R * R, + ae = 0.6 - P * P - L * L - D * D - U * U, + oe = 0.6 - F * F - O * O - N * N - G * G, + se = 0.6 - Z * Z - z * z - Q * Q - H * H, + le = 0.6 - V * V - j * j - W * W - X * X; + return ( + 27 * + ((ie < 0 ? 0 : (ie *= ie) * ie * t.dot4(g[$], M, I, k, R)) + + (ae < 0 ? 0 : (ae *= ae) * ae * t.dot4(g[ee], P, L, D, U)) + + (oe < 0 ? 0 : (oe *= oe) * oe * t.dot4(g[te], F, O, N, G)) + + (se < 0 ? 0 : (se *= se) * se * t.dot4(g[ne], Z, z, Q, H)) + + (le < 0 ? 0 : (le *= le) * le * t.dot4(g[re], V, j, W, X))) + ); + }); + for (var r = 0; r < 256; r++) + this.p[r] = Math.floor(256 * n.random()); + for (var i = 0; i < 512; i++) this.perm[i] = this.p[255 & i]; + }), + gr = (function (e) { + (0, m.Z)(n, e); + var t = (0, g.Z)(n); + function n() { + var e, + r = + arguments.length > 0 && void 0 !== arguments[0] + ? arguments[0] + : {}; + return ( + (0, p.Z)(this, n), + ((e = t.call(this)).isLightningStrike = !0), + (e.type = "LightningStrike"), + e.init(n.copyParameters(r, r)), + e.createMesh(), + e + ); + } + return ( + (0, v.Z)( + n, + [ + { + key: "update", + value: function (e) { + this.isStatic || + (this.rayParameters.isEternal || + (this.rayParameters.birthTime <= e && + e <= this.rayParameters.deathTime) + ? (this.updateMesh(e), + e < this.subrays[0].endPropagationTime + ? (this.state = n.RAY_PROPAGATING) + : e > this.subrays[0].beginVanishingTime + ? (this.state = n.RAY_VANISHING) + : (this.state = n.RAY_STEADY), + (this.visible = !0)) + : ((this.visible = !1), + e < this.rayParameters.birthTime + ? (this.state = n.RAY_UNBORN) + : (this.state = n.RAY_EXTINGUISHED))); + }, + }, + { + key: "init", + value: function (e) { + (this.rayParameters = e), + (this.maxIterations = + void 0 !== e.maxIterations + ? Math.floor(e.maxIterations) + : 9), + (e.maxIterations = this.maxIterations), + (this.isStatic = void 0 !== e.isStatic && e.isStatic), + (e.isStatic = this.isStatic), + (this.ramification = + void 0 !== e.ramification + ? Math.floor(e.ramification) + : 5), + (e.ramification = this.ramification), + (this.maxSubrayRecursion = + void 0 !== e.maxSubrayRecursion + ? Math.floor(e.maxSubrayRecursion) + : 3), + (e.maxSubrayRecursion = this.maxSubrayRecursion), + (this.recursionProbability = + void 0 !== e.recursionProbability + ? e.recursionProbability + : 0.6), + (e.recursionProbability = this.recursionProbability), + (this.generateUVs = + void 0 !== e.generateUVs && e.generateUVs), + (e.generateUVs = this.generateUVs), + void 0 !== e.randomGenerator + ? ((this.randomGenerator = e.randomGenerator), + (this.seedGenerator = e.randomGenerator), + void 0 !== e.noiseSeed && + this.seedGenerator.setSeed(e.noiseSeed)) + : ((this.randomGenerator = n.createRandomGenerator()), + (this.seedGenerator = Math)), + void 0 !== e.onDecideSubrayCreation + ? (this.onDecideSubrayCreation = + e.onDecideSubrayCreation) + : (this.createDefaultSubrayCreationCallbacks(), + void 0 !== e.onSubrayCreation && + (this.onSubrayCreation = e.onSubrayCreation)), + (this.state = n.RAY_INITIALIZED), + (this.maxSubrays = Math.ceil( + 1 + + Math.pow( + this.ramification, + Math.max(0, this.maxSubrayRecursion - 1) + ) + )), + (e.maxSubrays = this.maxSubrays), + (this.maxRaySegments = 2 * (1 << this.maxIterations)), + (this.subrays = []); + for (var t = 0; t < this.maxSubrays; t++) + this.subrays.push(this.createSubray()); + this.raySegments = []; + for (var r = 0; r < this.maxRaySegments; r++) + this.raySegments.push(this.createSegment()); + (this.time = 0), + (this.timeFraction = 0), + (this.currentSegmentCallback = null), + (this.currentCreateTriangleVertices = this.generateUVs + ? this.createTriangleVerticesWithUVs + : this.createTriangleVerticesWithoutUVs), + (this.numSubrays = 0), + (this.currentSubray = null), + (this.currentSegmentIndex = 0), + (this.isInitialSegment = !1), + (this.subrayProbability = 0), + (this.currentVertex = 0), + (this.currentIndex = 0), + (this.currentCoordinate = 0), + (this.currentUVCoordinate = 0), + (this.vertices = null), + (this.uvs = null), + (this.indices = null), + (this.positionAttribute = null), + (this.uvsAttribute = null), + (this.simplexX = new mr(this.seedGenerator)), + (this.simplexY = new mr(this.seedGenerator)), + (this.simplexZ = new mr(this.seedGenerator)), + (this.forwards = new A.Vector3()), + (this.forwardsFill = new A.Vector3()), + (this.side = new A.Vector3()), + (this.down = new A.Vector3()), + (this.middlePos = new A.Vector3()), + (this.middleLinPos = new A.Vector3()), + (this.newPos = new A.Vector3()), + (this.vPos = new A.Vector3()), + (this.cross1 = new A.Vector3()); + }, + }, + { + key: "createMesh", + value: function () { + var e = 1 << this.maxIterations, + t = 3 * (e + 1) * this.maxSubrays, + n = 18 * e * this.maxSubrays; + (this.vertices = new Float32Array(3 * t)), + (this.indices = new Uint32Array(n)), + this.generateUVs && + (this.uvs = new Float32Array(2 * t)), + this.fillMesh(0), + this.setIndex( + new A.Uint32BufferAttribute(this.indices, 1) + ), + (this.positionAttribute = new A.Float32BufferAttribute( + this.vertices, + 3 + )), + this.setAttribute("position", this.positionAttribute), + this.generateUVs && + ((this.uvsAttribute = new A.Float32BufferAttribute( + new Float32Array(this.uvs), + 2 + )), + this.setAttribute("uv", this.uvsAttribute)), + this.isStatic || + ((this.index.usage = A.DynamicDrawUsage), + (this.positionAttribute.usage = A.DynamicDrawUsage), + this.generateUVs && + (this.uvsAttribute.usage = A.DynamicDrawUsage)), + (this.vertices = this.positionAttribute.array), + (this.indices = this.index.array), + this.generateUVs && + (this.uvs = this.uvsAttribute.array); + }, + }, + { + key: "updateMesh", + value: function (e) { + this.fillMesh(e), + (this.drawRange.count = this.currentIndex), + (this.index.needsUpdate = !0), + (this.positionAttribute.needsUpdate = !0), + this.generateUVs && + (this.uvsAttribute.needsUpdate = !0); + }, + }, + { + key: "fillMesh", + value: function (e) { + var t = this; + (this.currentVertex = 0), + (this.currentIndex = 0), + (this.currentCoordinate = 0), + (this.currentUVCoordinate = 0), + this.fractalRay(e, function (n) { + var r = t.currentSubray; + e < r.birthTime || + (this.rayParameters.isEternal && + 0 == t.currentSubray.recursion + ? (t.createPrism(n), + t.onDecideSubrayCreation(n, t)) + : e < r.endPropagationTime + ? t.timeFraction >= + n.fraction0 * r.propagationTimeFactor && + (t.createPrism(n), + t.onDecideSubrayCreation(n, t)) + : e < r.beginVanishingTime + ? (t.createPrism(n), + t.onDecideSubrayCreation(n, t)) + : (t.timeFraction <= + r.vanishingTimeFactor + + n.fraction1 * (1 - r.vanishingTimeFactor) && + t.createPrism(n), + t.onDecideSubrayCreation(n, t))); + }); + }, + }, + { + key: "addNewSubray", + value: function () { + return this.subrays[this.numSubrays++]; + }, + }, + { + key: "initSubray", + value: function (e, t) { + e.pos0.copy(t.sourceOffset), + e.pos1.copy(t.destOffset), + e.up0.copy(t.up0), + e.up1.copy(t.up1), + (e.radius0 = t.radius0), + (e.radius1 = t.radius1), + (e.birthTime = t.birthTime), + (e.deathTime = t.deathTime), + (e.timeScale = t.timeScale), + (e.roughness = t.roughness), + (e.straightness = t.straightness), + (e.propagationTimeFactor = t.propagationTimeFactor), + (e.vanishingTimeFactor = t.vanishingTimeFactor), + (e.maxIterations = this.maxIterations), + (e.seed = void 0 !== t.noiseSeed ? t.noiseSeed : 0), + (e.recursion = 0); + }, + }, + { + key: "fractalRay", + value: function (e, t) { + (this.time = e), + (this.currentSegmentCallback = t), + (this.numSubrays = 0), + this.initSubray( + this.addNewSubray(), + this.rayParameters + ); + for (var n = 0; n < this.numSubrays; n++) { + var r = this.subrays[n]; + (this.currentSubray = r), + this.randomGenerator.setSeed(r.seed), + (r.endPropagationTime = A.MathUtils.lerp( + r.birthTime, + r.deathTime, + r.propagationTimeFactor + )), + (r.beginVanishingTime = A.MathUtils.lerp( + r.deathTime, + r.birthTime, + 1 - r.vanishingTimeFactor + )); + var i = this.randomGenerator.random; + r.linPos0.set(i(), i(), i()).multiplyScalar(1e3), + r.linPos1.set(i(), i(), i()).multiplyScalar(1e3), + (this.timeFraction = + (e - r.birthTime) / (r.deathTime - r.birthTime)), + (this.currentSegmentIndex = 0), + (this.isInitialSegment = !0); + var a = this.getNewSegment(); + (a.iteration = 0), + a.pos0.copy(r.pos0), + a.pos1.copy(r.pos1), + a.linPos0.copy(r.linPos0), + a.linPos1.copy(r.linPos1), + a.up0.copy(r.up0), + a.up1.copy(r.up1), + (a.radius0 = r.radius0), + (a.radius1 = r.radius1), + (a.fraction0 = 0), + (a.fraction1 = 1), + (a.positionVariationFactor = 1 - r.straightness), + (this.subrayProbability = + (this.ramification * + Math.pow( + this.recursionProbability, + r.recursion + )) / + (1 << r.maxIterations)), + this.fractalRayRecursive(a); + } + (this.currentSegmentCallback = null), + (this.currentSubray = null); + }, + }, + { + key: "fractalRayRecursive", + value: function (e) { + if (e.iteration >= this.currentSubray.maxIterations) + this.currentSegmentCallback(e); + else { + this.forwards.subVectors(e.pos1, e.pos0); + var t = this.forwards.length(); + t < 1e-6 && + (this.forwards.set(0, 0, 0.01), + (t = this.forwards.length())); + var n = 0.5 * (e.radius0 + e.radius1), + r = 0.5 * (e.fraction0 + e.fraction1), + i = + this.time * + this.currentSubray.timeScale * + Math.pow(2, e.iteration); + this.middlePos.lerpVectors(e.pos0, e.pos1, 0.5), + this.middleLinPos.lerpVectors( + e.linPos0, + e.linPos1, + 0.5 + ); + var a = this.middleLinPos; + this.newPos.set( + this.simplexX.noise4d(a.x, a.y, a.z, i), + this.simplexY.noise4d(a.x, a.y, a.z, i), + this.simplexZ.noise4d(a.x, a.y, a.z, i) + ), + this.newPos.multiplyScalar( + e.positionVariationFactor * t + ), + this.newPos.add(this.middlePos); + var o = this.getNewSegment(); + o.pos0.copy(e.pos0), + o.pos1.copy(this.newPos), + o.linPos0.copy(e.linPos0), + o.linPos1.copy(this.middleLinPos), + o.up0.copy(e.up0), + o.up1.copy(e.up1), + (o.radius0 = e.radius0), + (o.radius1 = n), + (o.fraction0 = e.fraction0), + (o.fraction1 = r), + (o.positionVariationFactor = + e.positionVariationFactor * + this.currentSubray.roughness), + (o.iteration = e.iteration + 1); + var s = this.getNewSegment(); + s.pos0.copy(this.newPos), + s.pos1.copy(e.pos1), + s.linPos0.copy(this.middleLinPos), + s.linPos1.copy(e.linPos1), + this.cross1.crossVectors( + e.up0, + this.forwards.normalize() + ), + s.up0 + .crossVectors(this.forwards, this.cross1) + .normalize(), + s.up1.copy(e.up1), + (s.radius0 = n), + (s.radius1 = e.radius1), + (s.fraction0 = r), + (s.fraction1 = e.fraction1), + (s.positionVariationFactor = + e.positionVariationFactor * + this.currentSubray.roughness), + (s.iteration = e.iteration + 1), + this.fractalRayRecursive(o), + this.fractalRayRecursive(s); + } + }, + }, + { + key: "createPrism", + value: function (e) { + this.forwardsFill.subVectors(e.pos1, e.pos0).normalize(), + this.isInitialSegment && + (this.currentCreateTriangleVertices( + e.pos0, + e.up0, + this.forwardsFill, + e.radius0, + 0 + ), + (this.isInitialSegment = !1)), + this.currentCreateTriangleVertices( + e.pos1, + e.up0, + this.forwardsFill, + e.radius1, + e.fraction1 + ), + this.createPrismFaces(); + }, + }, + { + key: "createTriangleVerticesWithoutUVs", + value: function (e, t, r, i) { + this.side + .crossVectors(t, r) + .multiplyScalar(i * n.COS30DEG), + this.down.copy(t).multiplyScalar(-i * n.SIN30DEG); + var a = this.vPos, + o = this.vertices; + a.copy(e).sub(this.side).add(this.down), + (o[this.currentCoordinate++] = a.x), + (o[this.currentCoordinate++] = a.y), + (o[this.currentCoordinate++] = a.z), + a.copy(e).add(this.side).add(this.down), + (o[this.currentCoordinate++] = a.x), + (o[this.currentCoordinate++] = a.y), + (o[this.currentCoordinate++] = a.z), + a.copy(t).multiplyScalar(i).add(e), + (o[this.currentCoordinate++] = a.x), + (o[this.currentCoordinate++] = a.y), + (o[this.currentCoordinate++] = a.z), + (this.currentVertex += 3); + }, + }, + { + key: "createTriangleVerticesWithUVs", + value: function (e, t, r, i, a) { + this.side + .crossVectors(t, r) + .multiplyScalar(i * n.COS30DEG), + this.down.copy(t).multiplyScalar(-i * n.SIN30DEG); + var o = this.vPos, + s = this.vertices, + l = this.uvs; + o.copy(e).sub(this.side).add(this.down), + (s[this.currentCoordinate++] = o.x), + (s[this.currentCoordinate++] = o.y), + (s[this.currentCoordinate++] = o.z), + (l[this.currentUVCoordinate++] = a), + (l[this.currentUVCoordinate++] = 0), + o.copy(e).add(this.side).add(this.down), + (s[this.currentCoordinate++] = o.x), + (s[this.currentCoordinate++] = o.y), + (s[this.currentCoordinate++] = o.z), + (l[this.currentUVCoordinate++] = a), + (l[this.currentUVCoordinate++] = 0.5), + o.copy(t).multiplyScalar(i).add(e), + (s[this.currentCoordinate++] = o.x), + (s[this.currentCoordinate++] = o.y), + (s[this.currentCoordinate++] = o.z), + (l[this.currentUVCoordinate++] = a), + (l[this.currentUVCoordinate++] = 1), + (this.currentVertex += 3); + }, + }, + { + key: "createPrismFaces", + value: function (e) { + var t = this.indices; + (e = this.currentVertex - 6), + (t[this.currentIndex++] = e + 1), + (t[this.currentIndex++] = e + 2), + (t[this.currentIndex++] = e + 5), + (t[this.currentIndex++] = e + 1), + (t[this.currentIndex++] = e + 5), + (t[this.currentIndex++] = e + 4), + (t[this.currentIndex++] = e + 0), + (t[this.currentIndex++] = e + 1), + (t[this.currentIndex++] = e + 4), + (t[this.currentIndex++] = e + 0), + (t[this.currentIndex++] = e + 4), + (t[this.currentIndex++] = e + 3), + (t[this.currentIndex++] = e + 2), + (t[this.currentIndex++] = e + 0), + (t[this.currentIndex++] = e + 3), + (t[this.currentIndex++] = e + 2), + (t[this.currentIndex++] = e + 3), + (t[this.currentIndex++] = e + 5); + }, + }, + { + key: "createDefaultSubrayCreationCallbacks", + value: function () { + var e = this.randomGenerator.random; + this.onDecideSubrayCreation = function (t, n) { + var r = n.currentSubray, + i = n.rayParameters.subrayPeriod, + a = n.rayParameters.subrayDutyCycle, + o = + n.rayParameters.isEternal && 0 == r.recursion + ? -e() * i + : A.MathUtils.lerp( + r.birthTime, + r.endPropagationTime, + t.fraction0 + ) - + e() * i, + s = n.time - o, + l = Math.floor(s / i), + u = e() * (l + 1), + c = 0; + if ( + (s % i <= a * i && (c = n.subrayProbability), + r.recursion < n.maxSubrayRecursion && + n.numSubrays < n.maxSubrays && + e() < c) + ) { + var f = n.addNewSubray(), + d = n.randomGenerator.getSeed(); + (f.seed = u), + n.randomGenerator.setSeed(u), + (f.recursion = r.recursion + 1), + (f.maxIterations = Math.max( + 1, + r.maxIterations - 1 + )), + f.linPos0.set(e(), e(), e()).multiplyScalar(1e3), + f.linPos1.set(e(), e(), e()).multiplyScalar(1e3), + f.up0.copy(r.up0), + f.up1.copy(r.up1), + (f.radius0 = + t.radius0 * n.rayParameters.radius0Factor), + (f.radius1 = Math.min( + n.rayParameters.minRadius, + t.radius1 * n.rayParameters.radius1Factor + )), + (f.birthTime = o + l * i), + (f.deathTime = f.birthTime + i * a), + n.rayParameters.isEternal || + 0 != r.recursion || + ((f.birthTime = Math.max( + f.birthTime, + r.birthTime + )), + (f.deathTime = Math.min( + f.deathTime, + r.deathTime + ))), + (f.timeScale = 2 * r.timeScale), + (f.roughness = r.roughness), + (f.straightness = r.straightness), + (f.propagationTimeFactor = r.propagationTimeFactor), + (f.vanishingTimeFactor = r.vanishingTimeFactor), + n.onSubrayCreation(t, r, f, n), + n.randomGenerator.setSeed(d); + } + }; + var t = new A.Vector3(), + n = new A.Vector3(), + r = new A.Vector3(), + i = new A.Vector3(); + (this.onSubrayCreation = function (e, t, n, r) { + r.subrayCylinderPosition(e, t, n, 0.5, 0.6, 0.2); + }), + (this.subrayConePosition = function (a, o, s, l, u, c) { + s.pos0.copy(a.pos0), + t.subVectors(o.pos1, o.pos0), + n.copy(t).normalize(), + t.multiplyScalar( + a.fraction0 + (1 - a.fraction0) * (e() * l) + ); + var f = t.length(); + r.crossVectors(o.up0, n); + var d = 2 * Math.PI * e(); + r.multiplyScalar(Math.cos(d)), + i.copy(o.up0).multiplyScalar(Math.sin(d)), + s.pos1 + .copy(r) + .add(i) + .multiplyScalar(f * u * (c + e() * (1 - c))) + .add(t) + .add(o.pos0); + }), + (this.subrayCylinderPosition = function ( + a, + o, + s, + l, + u, + c + ) { + s.pos0.copy(a.pos0), + t.subVectors(o.pos1, o.pos0), + n.copy(t).normalize(), + t.multiplyScalar( + a.fraction0 + + (1 - a.fraction0) * ((2 * e() - 1) * l) + ); + var f = t.length(); + r.crossVectors(o.up0, n); + var d = 2 * Math.PI * e(); + r.multiplyScalar(Math.cos(d)), + i.copy(o.up0).multiplyScalar(Math.sin(d)), + s.pos1 + .copy(r) + .add(i) + .multiplyScalar(f * u * (c + e() * (1 - c))) + .add(t) + .add(o.pos0); + }); + }, + }, + { + key: "createSubray", + value: function () { + return { + seed: 0, + maxIterations: 0, + recursion: 0, + pos0: new A.Vector3(), + pos1: new A.Vector3(), + linPos0: new A.Vector3(), + linPos1: new A.Vector3(), + up0: new A.Vector3(), + up1: new A.Vector3(), + radius0: 0, + radius1: 0, + birthTime: 0, + deathTime: 0, + timeScale: 0, + roughness: 0, + straightness: 0, + propagationTimeFactor: 0, + vanishingTimeFactor: 0, + endPropagationTime: 0, + beginVanishingTime: 0, + }; + }, + }, + { + key: "createSegment", + value: function () { + return { + iteration: 0, + pos0: new A.Vector3(), + pos1: new A.Vector3(), + linPos0: new A.Vector3(), + linPos1: new A.Vector3(), + up0: new A.Vector3(), + up1: new A.Vector3(), + radius0: 0, + radius1: 0, + fraction0: 0, + fraction1: 0, + positionVariationFactor: 0, + }; + }, + }, + { + key: "getNewSegment", + value: function () { + return this.raySegments[this.currentSegmentIndex++]; + }, + }, + { + key: "copy", + value: function (e) { + return ( + (0, d.Z)((0, h.Z)(n.prototype), "copy", this).call( + this, + e + ), + this.init(n.copyParameters({}, e.rayParameters)), + this + ); + }, + }, + { + key: "clone", + value: function () { + return new this.constructor( + n.copyParameters({}, this.rayParameters) + ); + }, + }, + ], + [ + { + key: "createRandomGenerator", + value: function () { + for (var e = 2053, t = [], n = 0; n < e; n++) + t.push(Math.random()); + var r = { + currentSeed: 0, + random: function () { + var n = t[r.currentSeed]; + return (r.currentSeed = (r.currentSeed + 1) % e), n; + }, + getSeed: function () { + return r.currentSeed / e; + }, + setSeed: function (t) { + r.currentSeed = Math.floor(t * e) % e; + }, + }; + return r; + }, + }, + { + key: "copyParameters", + value: function () { + var e = + arguments.length > 0 && void 0 !== arguments[0] + ? arguments[0] + : {}, + t = + arguments.length > 1 && void 0 !== arguments[1] + ? arguments[1] + : {}, + n = function (n) { + return t === e ? n : n.clone(); + }; + return ( + (e.sourceOffset = + void 0 !== t.sourceOffset + ? n(t.sourceOffset) + : new A.Vector3(0, 100, 0)), + (e.destOffset = + void 0 !== t.destOffset + ? n(t.destOffset) + : new A.Vector3(0, 0, 0)), + (e.timeScale = + void 0 !== t.timeScale ? t.timeScale : 1), + (e.roughness = + void 0 !== t.roughness ? t.roughness : 0.9), + (e.straightness = + void 0 !== t.straightness ? t.straightness : 0.7), + (e.up0 = + void 0 !== t.up0 ? n(t.up0) : new A.Vector3(0, 0, 1)), + (e.up1 = + void 0 !== t.up1 ? n(t.up1) : new A.Vector3(0, 0, 1)), + (e.radius0 = void 0 !== t.radius0 ? t.radius0 : 1), + (e.radius1 = void 0 !== t.radius1 ? t.radius1 : 1), + (e.radius0Factor = + void 0 !== t.radius0Factor ? t.radius0Factor : 0.5), + (e.radius1Factor = + void 0 !== t.radius1Factor ? t.radius1Factor : 0.2), + (e.minRadius = + void 0 !== t.minRadius ? t.minRadius : 0.2), + (e.isEternal = + void 0 !== t.isEternal + ? t.isEternal + : void 0 === t.birthTime || void 0 === t.deathTime), + (e.birthTime = t.birthTime), + (e.deathTime = t.deathTime), + (e.propagationTimeFactor = + void 0 !== t.propagationTimeFactor + ? t.propagationTimeFactor + : 0.1), + (e.vanishingTimeFactor = + void 0 !== t.vanishingTimeFactor + ? t.vanishingTimeFactor + : 0.9), + (e.subrayPeriod = + void 0 !== t.subrayPeriod ? t.subrayPeriod : 4), + (e.subrayDutyCycle = + void 0 !== t.subrayDutyCycle + ? t.subrayDutyCycle + : 0.6), + (e.maxIterations = + void 0 !== t.maxIterations ? t.maxIterations : 9), + (e.isStatic = void 0 !== t.isStatic && t.isStatic), + (e.ramification = + void 0 !== t.ramification ? t.ramification : 5), + (e.maxSubrayRecursion = + void 0 !== t.maxSubrayRecursion + ? t.maxSubrayRecursion + : 3), + (e.recursionProbability = + void 0 !== t.recursionProbability + ? t.recursionProbability + : 0.6), + (e.generateUVs = + void 0 !== t.generateUVs && t.generateUVs), + (e.randomGenerator = t.randomGenerator), + (e.noiseSeed = t.noiseSeed), + (e.onDecideSubrayCreation = t.onDecideSubrayCreation), + (e.onSubrayCreation = t.onSubrayCreation), + e + ); + }, + }, + ] + ), + n + ); + })(A.BufferGeometry), + Ar = gr; + Math.PI, Math.PI; + var yr = null, + br = null, + xr = (function (e) { + (0, m.Z)(n, e); + var t = (0, g.Z)(n); + function n(e) { + var r, + i = + arguments.length > 1 && void 0 !== arguments[1] + ? arguments[1] + : {}; + (0, p.Z)(this, n), + ((r = t.call(this, e)).isReflectorForSSRPass = !0), + (r.type = "ReflectorForSSRPass"); + var a = (0, f.Z)(r), + o = + void 0 !== i.color + ? new A.Color(i.color) + : new A.Color(8355711), + s = i.textureWidth || 512, + l = i.textureHeight || 512, + u = i.clipBias || 0, + c = i.shader || n.ReflectorShader, + d = !0 === i.useDepthTexture, + h = new A.Vector3(0, 1, 0), + v = new A.Vector3(), + m = new A.Vector3(); + (a.needsUpdate = !1), + (a.maxDistance = n.ReflectorShader.uniforms.maxDistance.value), + (a.opacity = n.ReflectorShader.uniforms.opacity.value), + (a.color = o), + (a.resolution = + i.resolution || + new A.Vector2(window.innerWidth, window.innerHeight)), + (a._distanceAttenuation = + n.ReflectorShader.defines.DISTANCE_ATTENUATION), + Object.defineProperty(a, "distanceAttenuation", { + get: function () { + return a._distanceAttenuation; + }, + set: function (e) { + a._distanceAttenuation !== e && + ((a._distanceAttenuation = e), + (a.material.defines.DISTANCE_ATTENUATION = e), + (a.material.needsUpdate = !0)); + }, + }), + (a._fresnel = n.ReflectorShader.defines.FRESNEL), + Object.defineProperty(a, "fresnel", { + get: function () { + return a._fresnel; + }, + set: function (e) { + a._fresnel !== e && + ((a._fresnel = e), + (a.material.defines.FRESNEL = e), + (a.material.needsUpdate = !0)); + }, + }); + var g, + y = new A.Vector3(), + b = new A.Vector3(), + x = new A.Vector3(), + S = new A.Matrix4(), + E = new A.Vector3(0, 0, -1), + _ = new A.Vector3(), + C = new A.Vector3(), + w = new A.Matrix4(), + T = new A.PerspectiveCamera(); + d && + (((g = new A.DepthTexture()).type = A.UnsignedShortType), + (g.minFilter = A.NearestFilter), + (g.magFilter = A.NearestFilter)); + var M = { depthTexture: d ? g : null, type: A.HalfFloatType }, + I = new A.WebGLRenderTarget(s, l, M), + k = new A.ShaderMaterial({ + transparent: d, + defines: Object.assign({}, n.ReflectorShader.defines, { + useDepthTexture: d, + }), + uniforms: A.UniformsUtils.clone(c.uniforms), + fragmentShader: c.fragmentShader, + vertexShader: c.vertexShader, + }); + (k.uniforms.tDiffuse.value = I.texture), + (k.uniforms.color.value = a.color), + (k.uniforms.textureMatrix.value = w), + d && (k.uniforms.tDepth.value = I.depthTexture), + (r.material = k); + var R = [new A.Plane(new A.Vector3(0, 1, 0), u)]; + return ( + (r.doRender = function (e, t, n) { + if ( + ((k.uniforms.maxDistance.value = a.maxDistance), + (k.uniforms.color.value = a.color), + (k.uniforms.opacity.value = a.opacity), + v.copy(n.position).normalize(), + m.copy(v).reflect(h), + (k.uniforms.fresnelCoe.value = (v.dot(m) + 1) / 2), + b.setFromMatrixPosition(a.matrixWorld), + x.setFromMatrixPosition(n.matrixWorld), + S.extractRotation(a.matrixWorld), + y.set(0, 0, 1), + y.applyMatrix4(S), + _.subVectors(b, x), + !(_.dot(y) > 0)) + ) { + _.reflect(y).negate(), + _.add(b), + S.extractRotation(n.matrixWorld), + E.set(0, 0, -1), + E.applyMatrix4(S), + E.add(x), + C.subVectors(b, E), + C.reflect(y).negate(), + C.add(b), + T.position.copy(_), + T.up.set(0, 1, 0), + T.up.applyMatrix4(S), + T.up.reflect(y), + T.lookAt(C), + (T.far = n.far), + T.updateMatrixWorld(), + T.projectionMatrix.copy(n.projectionMatrix), + (k.uniforms.virtualCameraNear.value = n.near), + (k.uniforms.virtualCameraFar.value = n.far), + (k.uniforms.virtualCameraMatrixWorld.value = + T.matrixWorld), + (k.uniforms.virtualCameraProjectionMatrix.value = + n.projectionMatrix), + (k.uniforms.virtualCameraProjectionMatrixInverse.value = + n.projectionMatrixInverse), + (k.uniforms.resolution.value = a.resolution), + w.set( + 0.5, + 0, + 0, + 0.5, + 0, + 0.5, + 0, + 0.5, + 0, + 0, + 0.5, + 0.5, + 0, + 0, + 0, + 1 + ), + w.multiply(T.projectionMatrix), + w.multiply(T.matrixWorldInverse), + w.multiply(a.matrixWorld); + var r = e.getRenderTarget(), + i = e.xr.enabled, + o = e.shadowMap.autoUpdate, + s = e.clippingPlanes; + (e.xr.enabled = !1), + (e.shadowMap.autoUpdate = !1), + (e.clippingPlanes = R), + e.setRenderTarget(I), + e.state.buffers.depth.setMask(!0), + !1 === e.autoClear && e.clear(), + e.render(t, T), + (e.xr.enabled = i), + (e.shadowMap.autoUpdate = o), + (e.clippingPlanes = s), + e.setRenderTarget(r); + var l = n.viewport; + void 0 !== l && e.state.viewport(l); + } + }), + (r.getRenderTarget = function () { + return I; + }), + r + ); + } + return (0, v.Z)(n); + })(A.Mesh), + Sr = xr, + Er = { + uniforms: { + turbidity: { value: 2 }, + rayleigh: { value: 1 }, + mieCoefficient: { value: 0.005 }, + mieDirectionalG: { value: 0.8 }, + sunPosition: { value: new A.Vector3() }, + up: { value: new A.Vector3(0, 1, 0) }, + }, + vertexShader: + "\n uniform vec3 sunPosition;\n uniform float rayleigh;\n uniform float turbidity;\n uniform float mieCoefficient;\n uniform vec3 up;\n\n varying vec3 vWorldPosition;\n varying vec3 vSunDirection;\n varying float vSunfade;\n varying vec3 vBetaR;\n varying vec3 vBetaM;\n varying float vSunE;\n\n // constants for atmospheric scattering\n const float e = 2.71828182845904523536028747135266249775724709369995957;\n const float pi = 3.141592653589793238462643383279502884197169;\n\n // wavelength of used primaries, according to preetham\n const vec3 lambda = vec3( 680E-9, 550E-9, 450E-9 );\n // this pre-calcuation replaces older TotalRayleigh(vec3 lambda) function:\n // (8.0 * pow(pi, 3.0) * pow(pow(n, 2.0) - 1.0, 2.0) * (6.0 + 3.0 * pn)) / (3.0 * N * pow(lambda, vec3(4.0)) * (6.0 - 7.0 * pn))\n const vec3 totalRayleigh = vec3( 5.804542996261093E-6, 1.3562911419845635E-5, 3.0265902468824876E-5 );\n\n // mie stuff\n // K coefficient for the primaries\n const float v = 4.0;\n const vec3 K = vec3( 0.686, 0.678, 0.666 );\n // MieConst = pi * pow( ( 2.0 * pi ) / lambda, vec3( v - 2.0 ) ) * K\n const vec3 MieConst = vec3( 1.8399918514433978E14, 2.7798023919660528E14, 4.0790479543861094E14 );\n\n // earth shadow hack\n // cutoffAngle = pi / 1.95;\n const float cutoffAngle = 1.6110731556870734;\n const float steepness = 1.5;\n const float EE = 1000.0;\n\n float sunIntensity( float zenithAngleCos ) {\n zenithAngleCos = clamp( zenithAngleCos, -1.0, 1.0 );\n return EE * max( 0.0, 1.0 - pow( e, -( ( cutoffAngle - acos( zenithAngleCos ) ) / steepness ) ) );\n }\n\n vec3 totalMie( float T ) {\n float c = ( 0.2 * T ) * 10E-18;\n return 0.434 * c * MieConst;\n }\n\n void main() {\n\n vec4 worldPosition = modelMatrix * vec4( position, 1.0 );\n vWorldPosition = worldPosition.xyz;\n\n gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n gl_Position.z = gl_Position.w; // set z to camera.far\n\n vSunDirection = normalize( sunPosition );\n\n vSunE = sunIntensity( dot( vSunDirection, up ) );\n\n vSunfade = 1.0 - clamp( 1.0 - exp( ( sunPosition.y / 450000.0 ) ), 0.0, 1.0 );\n\n float rayleighCoefficient = rayleigh - ( 1.0 * ( 1.0 - vSunfade ) );\n\n // extinction (absorbtion + out scattering)\n // rayleigh coefficients\n vBetaR = totalRayleigh * rayleighCoefficient;\n\n // mie coefficients\n vBetaM = totalMie( turbidity ) * mieCoefficient;\n\n }\n ", + fragmentShader: + "\n varying vec3 vWorldPosition;\n varying vec3 vSunDirection;\n varying float vSunfade;\n varying vec3 vBetaR;\n varying vec3 vBetaM;\n varying float vSunE;\n\n uniform float mieDirectionalG;\n uniform vec3 up;\n\n const vec3 cameraPos = vec3( 0.0, 0.0, 0.0 );\n\n // constants for atmospheric scattering\n const float pi = 3.141592653589793238462643383279502884197169;\n\n const float n = 1.0003; // refractive index of air\n const float N = 2.545E25; // number of molecules per unit volume for air at 288.15K and 1013mb (sea level -45 celsius)\n\n // optical length at zenith for molecules\n const float rayleighZenithLength = 8.4E3;\n const float mieZenithLength = 1.25E3;\n // 66 arc seconds -> degrees, and the cosine of that\n const float sunAngularDiameterCos = 0.999956676946448443553574619906976478926848692873900859324;\n\n // 3.0 / ( 16.0 * pi )\n const float THREE_OVER_SIXTEENPI = 0.05968310365946075;\n // 1.0 / ( 4.0 * pi )\n const float ONE_OVER_FOURPI = 0.07957747154594767;\n\n float rayleighPhase( float cosTheta ) {\n return THREE_OVER_SIXTEENPI * ( 1.0 + pow( cosTheta, 2.0 ) );\n }\n\n float hgPhase( float cosTheta, float g ) {\n float g2 = pow( g, 2.0 );\n float inverse = 1.0 / pow( 1.0 - 2.0 * g * cosTheta + g2, 1.5 );\n return ONE_OVER_FOURPI * ( ( 1.0 - g2 ) * inverse );\n }\n\n void main() {\n\n vec3 direction = normalize( vWorldPosition - cameraPos );\n\n // optical length\n // cutoff angle at 90 to avoid singularity in next formula.\n float zenithAngle = acos( max( 0.0, dot( up, direction ) ) );\n float inverse = 1.0 / ( cos( zenithAngle ) + 0.15 * pow( 93.885 - ( ( zenithAngle * 180.0 ) / pi ), -1.253 ) );\n float sR = rayleighZenithLength * inverse;\n float sM = mieZenithLength * inverse;\n\n // combined extinction factor\n vec3 Fex = exp( -( vBetaR * sR + vBetaM * sM ) );\n\n // in scattering\n float cosTheta = dot( direction, vSunDirection );\n\n float rPhase = rayleighPhase( cosTheta * 0.5 + 0.5 );\n vec3 betaRTheta = vBetaR * rPhase;\n\n float mPhase = hgPhase( cosTheta, mieDirectionalG );\n vec3 betaMTheta = vBetaM * mPhase;\n\n vec3 Lin = pow( vSunE * ( ( betaRTheta + betaMTheta ) / ( vBetaR + vBetaM ) ) * ( 1.0 - Fex ), vec3( 1.5 ) );\n Lin *= mix( vec3( 1.0 ), pow( vSunE * ( ( betaRTheta + betaMTheta ) / ( vBetaR + vBetaM ) ) * Fex, vec3( 1.0 / 2.0 ) ), clamp( pow( 1.0 - dot( up, vSunDirection ), 5.0 ), 0.0, 1.0 ) );\n\n // nightsky\n float theta = acos( direction.y ); // elevation --\x3e y-axis, [-pi/2, pi/2]\n float phi = atan( direction.z, direction.x ); // azimuth --\x3e x-axis [-pi/2, pi/2]\n vec2 uv = vec2( phi, theta ) / vec2( 2.0 * pi, pi ) + vec2( 0.5, 0.0 );\n vec3 L0 = vec3( 0.1 ) * Fex;\n\n // composition + solar disc\n float sundisk = smoothstep( sunAngularDiameterCos, sunAngularDiameterCos + 0.00002, cosTheta );\n L0 += ( vSunE * 19000.0 * Fex ) * sundisk;\n\n vec3 texColor = ( Lin + L0 ) * 0.04 + vec3( 0.0, 0.0003, 0.00075 );\n\n vec3 retColor = pow( texColor, vec3( 1.0 / ( 1.2 + ( 1.2 * vSunfade ) ) ) );\n\n gl_FragColor = vec4( retColor, 1.0 );\n\n #include \n #include <".concat( + $n >= 154 ? "colorspace_fragment" : "encodings_fragment", + ">\n\n }\n " + ), + }, + _r = new A.ShaderMaterial({ + name: "SkyShader", + fragmentShader: Er.fragmentShader, + vertexShader: Er.vertexShader, + uniforms: A.UniformsUtils.clone(Er.uniforms), + side: A.BackSide, + depthWrite: !1, + }), + Cr = (function (e) { + (0, m.Z)(n, e); + var t = (0, g.Z)(n); + function n() { + return ( + (0, p.Z)(this, n), t.call(this, new A.BoxGeometry(1, 1, 1), _r) + ); + } + return (0, v.Z)(n); + })(A.Mesh), + wr = (function (e) { + (0, m.Z)(n, e); + var t = (0, g.Z)(n); + function n(e) { + var r, + i = + arguments.length > 1 && void 0 !== arguments[1] + ? arguments[1] + : {}; + (0, p.Z)(this, n), + ((r = t.call(this, e)).isWater = !0), + (r.type = "Water"); + var a = (0, f.Z)(r), + s = + void 0 !== i.color + ? new A.Color(i.color) + : new A.Color(16777215), + l = i.textureWidth || 512, + u = i.textureHeight || 512, + c = i.clipBias || 0, + d = i.flowDirection || new A.Vector2(1, 0), + h = i.flowSpeed || 0.03, + v = i.reflectivity || 0.02, + m = i.scale || 1, + g = i.shader || n.WaterShader, + y = void 0 !== i.encoding ? i.encoding : 3e3, + b = i.flowMap || void 0, + x = i.normalMap0, + S = i.normalMap1, + E = 0.15, + _ = 0.075, + C = new A.Matrix4(), + w = new A.Clock(); + if (void 0 === tr) + return ( + console.error( + "THREE.Water: Required component Reflector not found." + ), + (0, o.Z)(r) + ); + if (void 0 === rr) + return ( + console.error( + "THREE.Water: Required component Refractor not found." + ), + (0, o.Z)(r) + ); + var T = new tr(e, { + textureWidth: l, + textureHeight: u, + clipBias: c, + encoding: y, + }), + M = new rr(e, { + textureWidth: l, + textureHeight: u, + clipBias: c, + encoding: y, + }); + return ( + (T.matrixAutoUpdate = !1), + (M.matrixAutoUpdate = !1), + (r.material = new A.ShaderMaterial({ + uniforms: A.UniformsUtils.merge([ + A.UniformsLib.fog, + g.uniforms, + ]), + vertexShader: g.vertexShader, + fragmentShader: g.fragmentShader, + transparent: !0, + fog: !0, + })), + void 0 !== b + ? ((r.material.defines.USE_FLOWMAP = ""), + (r.material.uniforms.tFlowMap = { type: "t", value: b })) + : (r.material.uniforms.flowDirection = { + type: "v2", + value: d, + }), + (x.wrapS = x.wrapT = A.RepeatWrapping), + (S.wrapS = S.wrapT = A.RepeatWrapping), + (r.material.uniforms.tReflectionMap.value = + T.getRenderTarget().texture), + (r.material.uniforms.tRefractionMap.value = + M.getRenderTarget().texture), + (r.material.uniforms.tNormalMap0.value = x), + (r.material.uniforms.tNormalMap1.value = S), + (r.material.uniforms.color.value = s), + (r.material.uniforms.reflectivity.value = v), + (r.material.uniforms.textureMatrix.value = C), + (r.material.uniforms.config.value.x = 0), + (r.material.uniforms.config.value.y = _), + (r.material.uniforms.config.value.z = _), + (r.material.uniforms.config.value.w = m), + (r.onBeforeRender = function (e, t, n) { + !(function (e) { + C.set( + 0.5, + 0, + 0, + 0.5, + 0, + 0.5, + 0, + 0.5, + 0, + 0, + 0.5, + 0.5, + 0, + 0, + 0, + 1 + ), + C.multiply(e.projectionMatrix), + C.multiply(e.matrixWorldInverse), + C.multiply(a.matrixWorld); + })(n), + (function () { + var e = w.getDelta(), + t = a.material.uniforms.config; + (t.value.x += h * e), + (t.value.y = t.value.x + _), + t.value.x >= E + ? ((t.value.x = 0), (t.value.y = _)) + : t.value.y >= E && (t.value.y = t.value.y - E); + })(), + (a.visible = !1), + T.matrixWorld.copy(a.matrixWorld), + M.matrixWorld.copy(a.matrixWorld), + T.onBeforeRender(e, t, n), + M.onBeforeRender(e, t, n), + (a.visible = !0); + }), + r + ); + } + return (0, v.Z)(n); + })(A.Mesh), + Tr = wr; + "\n\n\t\t#include \n\t\t#include \n\t\t#include \n\n\t\tuniform sampler2D tReflectionMap;\n\t\tuniform sampler2D tRefractionMap;\n\t\tuniform sampler2D tNormalMap0;\n\t\tuniform sampler2D tNormalMap1;\n\n\t\t#ifdef USE_FLOWMAP\n\t\t\tuniform sampler2D tFlowMap;\n\t\t#else\n\t\t\tuniform vec2 flowDirection;\n\t\t#endif\n\n\t\tuniform vec3 color;\n\t\tuniform float reflectivity;\n\t\tuniform vec4 config;\n\n\t\tvarying vec4 vCoord;\n\t\tvarying vec2 vUv;\n\t\tvarying vec3 vToEye;\n\n\t\tvoid main() {\n\n\t\t\t#include \n\n\t\t\tfloat flowMapOffset0 = config.x;\n\t\t\tfloat flowMapOffset1 = config.y;\n\t\t\tfloat halfCycle = config.z;\n\t\t\tfloat scale = config.w;\n\n\t\t\tvec3 toEye = normalize( vToEye );\n\n\t\t\t// determine flow direction\n\t\t\tvec2 flow;\n\t\t\t#ifdef USE_FLOWMAP\n\t\t\t\tflow = texture2D( tFlowMap, vUv ).rg * 2.0 - 1.0;\n\t\t\t#else\n\t\t\t\tflow = flowDirection;\n\t\t\t#endif\n\t\t\tflow.x *= - 1.0;\n\n\t\t\t// sample normal maps (distort uvs with flowdata)\n\t\t\tvec4 normalColor0 = texture2D( tNormalMap0, ( vUv * scale ) + flow * flowMapOffset0 );\n\t\t\tvec4 normalColor1 = texture2D( tNormalMap1, ( vUv * scale ) + flow * flowMapOffset1 );\n\n\t\t\t// linear interpolate to get the final normal color\n\t\t\tfloat flowLerp = abs( halfCycle - flowMapOffset0 ) / halfCycle;\n\t\t\tvec4 normalColor = mix( normalColor0, normalColor1, flowLerp );\n\n\t\t\t// calculate normal vector\n\t\t\tvec3 normal = normalize( vec3( normalColor.r * 2.0 - 1.0, normalColor.b, normalColor.g * 2.0 - 1.0 ) );\n\n\t\t\t// calculate the fresnel term to blend reflection and refraction maps\n\t\t\tfloat theta = max( dot( toEye, normal ), 0.0 );\n\t\t\tfloat reflectance = reflectivity + ( 1.0 - reflectivity ) * pow( ( 1.0 - theta ), 5.0 );\n\n\t\t\t// calculate final uv coords\n\t\t\tvec3 coord = vCoord.xyz / vCoord.w;\n\t\t\tvec2 uv = coord.xy + coord.z * normal.xz * 0.05;\n\n\t\t\tvec4 reflectColor = texture2D( tReflectionMap, vec2( 1.0 - uv.x, uv.y ) );\n\t\t\tvec4 refractColor = texture2D( tRefractionMap, uv );\n\n\t\t\t// multiply water color with the mix of both textures\n\t\t\tgl_FragColor = vec4( color, 1.0 ) * mix( refractColor, reflectColor, reflectance );\n\n\t\t\t#include \n\t\t\t#include <".concat( + $n >= 154 ? "colorspace_fragment" : "encodings_fragment", + ">\n\t\t\t#include \n\n\t\t}" + ); + var Mr = function (e) { + return e && e.isCubeTexture; + }, + Ir = null, + kr = { + createMeshesFromInstancedMesh: function (e) { + for ( + var t = new A.Group(), + n = e.count, + r = e.geometry, + i = e.material, + a = 0; + a < n; + a++ + ) { + var o = new A.Mesh(r, i); + e.getMatrixAt(a, o.matrix), + o.matrix.decompose(o.position, o.quaternion, o.scale), + t.add(o); + } + return t.copy(e), t.updateMatrixWorld(), t; + }, + createMultiMaterialObject: function (e, t) { + for (var n = new A.Group(), r = 0, i = t.length; r < i; r++) + n.add(new A.Mesh(e, t[r])); + return n; + }, + detach: function (e, t, n) { + console.warn( + "THREE.SceneUtils: detach() has been deprecated. Use scene.attach( child ) instead." + ), + n.attach(e); + }, + attach: function (e, t, n) { + console.warn( + "THREE.SceneUtils: attach() has been deprecated. Use parent.attach( child ) instead." + ), + n.attach(e); + }, + }; + function Rr(e) { + var t = + arguments.length > 1 && void 0 !== arguments[1] + ? arguments[1] + : 1024, + n = new Vector2(), + r = new Vector2(), + i = [new Vector2(), new Vector2(), new Vector2()], + a = [], + o = document.createElement("canvas"), + s = t, + l = t; + (o.width = s), (o.height = l); + var u = o.getContext("2d"); + (u.lineWidth = 1), + (u.strokeStyle = "rgb( 63, 63, 63 )"), + (u.textAlign = "center"), + (u.fillStyle = "rgb( 255, 255, 255 )"), + u.fillRect(0, 0, s, l); + var c = e.index, + f = e.attributes.uv; + if (c) + for (var d = 0, h = c.count; d < h; d += 3) + (a[0] = c.getX(d)), + (a[1] = c.getX(d + 1)), + (a[2] = c.getX(d + 2)), + i[0].fromBufferAttribute(f, a[0]), + i[1].fromBufferAttribute(f, a[1]), + i[2].fromBufferAttribute(f, a[2]), + m(a, i, d / 3); + else + for (var p = 0, v = f.count; p < v; p += 3) + (a[0] = p), + (a[1] = p + 1), + (a[2] = p + 2), + i[0].fromBufferAttribute(f, a[0]), + i[1].fromBufferAttribute(f, a[1]), + i[2].fromBufferAttribute(f, a[2]), + m(a, i, p / 3); + return o; + function m(e, t, i) { + u.beginPath(), n.set(0, 0); + for (var a = 0, o = t.length; a < o; a++) { + var c = t[a]; + (n.x += c.x), + (n.y += c.y), + 0 === a + ? u.moveTo(c.x * (s - 2) + 0.5, (1 - c.y) * (l - 2) + 0.5) + : u.lineTo(c.x * (s - 2) + 0.5, (1 - c.y) * (l - 2) + 0.5); + } + u.closePath(), + u.stroke(), + n.divideScalar(t.length), + (u.font = "18px Arial"), + (u.fillStyle = "rgb( 63, 63, 63 )"), + u.fillText(i, n.x * s, (1 - n.y) * l), + n.x > 0.95 && u.fillText(i, (n.x % 1) * s, (1 - n.y) * l), + (u.font = "12px Arial"), + (u.fillStyle = "rgb( 191, 191, 191 )"); + for (var f = 0, d = t.length; f < d; f++) { + var h = t[f]; + r.addVectors(n, h).divideScalar(2); + var p = e[f]; + u.fillText("abc"[f] + p, r.x * s, (1 - r.y) * l), + r.x > 0.95 && + u.fillText("abc"[f] + p, (r.x % 1) * s, (1 - r.y) * l); + } + } + } + var Br = function e() { + var t = + arguments.length > 0 && void 0 !== arguments[0] + ? arguments[0] + : new A.Vector3(0, 0, 0), + n = + arguments.length > 2 && void 0 !== arguments[2] + ? arguments[2] + : 1, + r = + arguments.length > 3 && void 0 !== arguments[3] + ? arguments[3] + : 0, + i = + arguments.length > 4 && void 0 !== arguments[4] + ? arguments[4] + : 1, + a = + arguments.length > 5 && void 0 !== arguments[5] + ? arguments[5] + : 2, + o = + arguments.length > 6 && void 0 !== arguments[6] + ? arguments[6] + : 3, + s = + (arguments.length > 1 && void 0 !== arguments[1] + ? arguments[1] + : 10) / 2, + l = [ + new A.Vector3(t.x - s, t.y, t.z - s), + new A.Vector3(t.x - s, t.y, t.z + s), + new A.Vector3(t.x + s, t.y, t.z + s), + new A.Vector3(t.x + s, t.y, t.z - s), + ], + u = [l[r], l[i], l[a], l[o]]; + if (0 <= --n) { + var c = []; + return ( + Array.prototype.push.apply(c, e(u[0], s, n, r, o, a, i)), + Array.prototype.push.apply(c, e(u[1], s, n, r, i, a, o)), + Array.prototype.push.apply(c, e(u[2], s, n, r, i, a, o)), + Array.prototype.push.apply(c, e(u[3], s, n, a, i, r, o)), + c + ); + } + return u; + }, + Pr = function e() { + var t = + arguments.length > 0 && void 0 !== arguments[0] + ? arguments[0] + : new A.Vector3(0, 0, 0), + n = + arguments.length > 2 && void 0 !== arguments[2] + ? arguments[2] + : 1, + r = + arguments.length > 3 && void 0 !== arguments[3] + ? arguments[3] + : 0, + i = + arguments.length > 4 && void 0 !== arguments[4] + ? arguments[4] + : 1, + a = + arguments.length > 5 && void 0 !== arguments[5] + ? arguments[5] + : 2, + o = + arguments.length > 6 && void 0 !== arguments[6] + ? arguments[6] + : 3, + s = + arguments.length > 7 && void 0 !== arguments[7] + ? arguments[7] + : 4, + l = + arguments.length > 8 && void 0 !== arguments[8] + ? arguments[8] + : 5, + u = + arguments.length > 9 && void 0 !== arguments[9] + ? arguments[9] + : 6, + c = + arguments.length > 10 && void 0 !== arguments[10] + ? arguments[10] + : 7, + f = + (arguments.length > 1 && void 0 !== arguments[1] + ? arguments[1] + : 10) / 2, + d = [ + new A.Vector3(t.x - f, t.y + f, t.z - f), + new A.Vector3(t.x - f, t.y + f, t.z + f), + new A.Vector3(t.x - f, t.y - f, t.z + f), + new A.Vector3(t.x - f, t.y - f, t.z - f), + new A.Vector3(t.x + f, t.y - f, t.z - f), + new A.Vector3(t.x + f, t.y - f, t.z + f), + new A.Vector3(t.x + f, t.y + f, t.z + f), + new A.Vector3(t.x + f, t.y + f, t.z - f), + ], + h = [d[r], d[i], d[a], d[o], d[s], d[l], d[u], d[c]]; + if (--n >= 0) { + var p = []; + return ( + Array.prototype.push.apply( + p, + e(h[0], f, n, r, o, s, c, u, l, a, i) + ), + Array.prototype.push.apply( + p, + e(h[1], f, n, r, c, u, i, a, l, s, o) + ), + Array.prototype.push.apply( + p, + e(h[2], f, n, r, c, u, i, a, l, s, o) + ), + Array.prototype.push.apply( + p, + e(h[3], f, n, a, o, r, i, u, c, s, l) + ), + Array.prototype.push.apply( + p, + e(h[4], f, n, a, o, r, i, u, c, s, l) + ), + Array.prototype.push.apply( + p, + e(h[5], f, n, s, o, a, l, u, i, r, c) + ), + Array.prototype.push.apply( + p, + e(h[6], f, n, s, o, a, l, u, i, r, c) + ), + Array.prototype.push.apply( + p, + e(h[7], f, n, u, l, a, i, r, o, s, c) + ), + p + ); + } + return h; + }, + Lr = function () { + var e = + arguments.length > 0 && void 0 !== arguments[0] + ? arguments[0] + : 1; + return (function (e) { + for ( + var t = 0, + n = 0, + r = 0, + i = [0, 0, 0], + a = e.fractal, + o = 0, + s = a.length; + o < s; + o++ + ) { + var l = a[o]; + "+" === l + ? (r += e.angle) + : "-" === l + ? (r -= e.angle) + : "F" === l && + ((t += e.size * Math.cos(r)), + (n += -e.size * Math.sin(r)), + i.push(t, n, 0)); + } + return i; + })({ + fractal: (function (e) { + for ( + var t = "", n = e.axiom, r = 0, i = e.steps; + 0 <= i ? r < i : r > i; + 0 <= i ? r++ : r-- + ) { + t = ""; + for (var a = 0, o = n.length; a < o; a++) { + var s = n[a]; + s in e.rules ? (t += e.rules[s]) : (t += s); + } + n = t; + } + return t; + })({ + axiom: "A", + steps: 4, + rules: { + A: "A+BF++BF-FA--FAFA-BF+", + B: "-FA+BFBF++BF+FA--FA-B", + }, + }), + size: e, + angle: Math.PI / 3, + }); + }, + Dr = { hilbert3D: Pr, gosper: Lr, hilbert2D: Br }, + Ur = Zr(), + Fr = new A.Mesh(new A.PlaneGeometry(2, 2), Ur), + Or = new A.OrthographicCamera(0, 1, 0, 1, 0, 1), + Nr = null, + Gr = null; + function Zr() { + var e = new A.RawShaderMaterial({ + uniforms: { + roughnessMap: { value: null }, + normalMap: { value: null }, + texelSize: { value: new A.Vector2(1, 1) }, + }, + vertexShader: + "\n\t\t\tprecision mediump float;\n\t\t\tprecision mediump int;\n\n\t\t\tattribute vec3 position;\n\t\t\tattribute vec2 uv;\n\n\t\t\tvarying vec2 vUv;\n\n\t\t\tvoid main() {\n\n\t\t\t\tvUv = uv;\n\n\t\t\t\tgl_Position = vec4( position, 1.0 );\n\n\t\t\t}\n\t\t", + fragmentShader: + "\n\t\t\tprecision mediump float;\n\t\t\tprecision mediump int;\n\n\t\t\tvarying vec2 vUv;\n\n\t\t\tuniform sampler2D roughnessMap;\n\t\t\tuniform sampler2D normalMap;\n\t\t\tuniform vec2 texelSize;\n\n\t\t\t#define ENVMAP_TYPE_CUBE_UV\n\n\t\t\tvec4 envMapTexelToLinear( vec4 a ) { return a; }\n\n\t\t\t#include \n\n\t\t\tfloat roughnessToVariance( float roughness ) {\n\n\t\t\t\tfloat variance = 0.0;\n\n\t\t\t\tif ( roughness >= r1 ) {\n\n\t\t\t\t\tvariance = ( r0 - roughness ) * ( v1 - v0 ) / ( r0 - r1 ) + v0;\n\n\t\t\t\t} else if ( roughness >= r4 ) {\n\n\t\t\t\t\tvariance = ( r1 - roughness ) * ( v4 - v1 ) / ( r1 - r4 ) + v1;\n\n\t\t\t\t} else if ( roughness >= r5 ) {\n\n\t\t\t\t\tvariance = ( r4 - roughness ) * ( v5 - v4 ) / ( r4 - r5 ) + v4;\n\n\t\t\t\t} else {\n\n\t\t\t\t\tfloat roughness2 = roughness * roughness;\n\n\t\t\t\t\tvariance = 1.79 * roughness2 * roughness2;\n\n\t\t\t\t}\n\n\t\t\t\treturn variance;\n\n\t\t\t}\n\n\t\t\tfloat varianceToRoughness( float variance ) {\n\n\t\t\t\tfloat roughness = 0.0;\n\n\t\t\t\tif ( variance >= v1 ) {\n\n\t\t\t\t\troughness = ( v0 - variance ) * ( r1 - r0 ) / ( v0 - v1 ) + r0;\n\n\t\t\t\t} else if ( variance >= v4 ) {\n\n\t\t\t\t\troughness = ( v1 - variance ) * ( r4 - r1 ) / ( v1 - v4 ) + r1;\n\n\t\t\t\t} else if ( variance >= v5 ) {\n\n\t\t\t\t\troughness = ( v4 - variance ) * ( r5 - r4 ) / ( v4 - v5 ) + r4;\n\n\t\t\t\t} else {\n\n\t\t\t\t\troughness = pow( 0.559 * variance, 0.25 ); // 0.559 = 1.0 / 1.79\n\n\t\t\t\t}\n\n\t\t\t\treturn roughness;\n\n\t\t\t}\n\n\t\t\tvoid main() {\n\n\t\t\t\tgl_FragColor = texture2D( roughnessMap, vUv, - 1.0 );\n\n\t\t\t\tif ( texelSize.x == 0.0 ) return;\n\n\t\t\t\tfloat roughness = gl_FragColor.g;\n\n\t\t\t\tfloat variance = roughnessToVariance( roughness );\n\n\t\t\t\tvec3 avgNormal;\n\n\t\t\t\tfor ( float x = - 1.0; x < 2.0; x += 2.0 ) {\n\n\t\t\t\t\tfor ( float y = - 1.0; y < 2.0; y += 2.0 ) {\n\n\t\t\t\t\t\tvec2 uv = vUv + vec2( x, y ) * 0.25 * texelSize;\n\n\t\t\t\t\t\tavgNormal += normalize( texture2D( normalMap, uv, - 1.0 ).xyz - 0.5 );\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\tvariance += 1.0 - 0.25 * length( avgNormal );\n\n\t\t\t\tgl_FragColor.g = varianceToRoughness( variance );\n\n\t\t\t}\n\t\t", + blending: A.NoBlending, + depthTest: !1, + depthWrite: !1, + }); + return (e.type = "RoughnessMipmapper"), e; + } + function zr(e, t) { + var n = + arguments.length > 2 && void 0 !== arguments[2] + ? arguments[2] + : {}, + r = new A.Vector3(), + i = new A.Quaternion(), + a = new A.Vector3(), + o = new A.Matrix4(), + s = new A.Matrix4(), + l = new A.Matrix4(); + (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 || {}); + var u, + c, + f, + d, + h, + p = t.isObject3D ? t.skeleton.bones : jr(t), + v = e.isObject3D ? e.skeleton.bones : jr(e); + if ( + (e.isObject3D + ? e.skeleton.pose() + : ((n.useTargetMatrix = !0), (n.preserveMatrix = !1)), + n.preservePosition) + ) { + h = []; + for (var m = 0; m < v.length; m++) h.push(v[m].position.clone()); + } + if (n.preserveMatrix) { + e.updateMatrixWorld(), e.matrixWorld.identity(); + for (var g = 0; g < e.children.length; ++g) + e.children[g].updateMatrixWorld(!0); + } + if (n.offsets) { + u = []; + for (var y = 0; y < v.length; ++y) + (c = v[y]), + (f = n.names[c.name] || c.name), + n.offsets[f] && + (c.matrix.multiply(n.offsets[f]), + c.matrix.decompose(c.position, c.quaternion, c.scale), + c.updateMatrixWorld()), + u.push(c.matrixWorld.clone()); + } + for (var b = 0; b < v.length; ++b) { + if ( + ((c = v[b]), + (d = Vr((f = n.names[c.name] || c.name), p)), + l.copy(c.matrixWorld), + d) + ) { + if ( + (d.updateMatrixWorld(), + n.useTargetMatrix + ? s.copy(d.matrixWorld) + : (s.copy(e.matrixWorld).invert(), s.multiply(d.matrixWorld)), + a.setFromMatrixScale(s), + s.scale(a.set(1 / a.x, 1 / a.y, 1 / a.z)), + l.makeRotationFromQuaternion(i.setFromRotationMatrix(s)), + e.isObject3D) + ) { + var x = v.indexOf(c), + S = u ? u[x] : o.copy(e.skeleton.boneInverses[x]).invert(); + l.multiply(S); + } + l.copyPosition(s); + } + c.parent && c.parent.isBone + ? (c.matrix.copy(c.parent.matrixWorld).invert(), + c.matrix.multiply(l)) + : c.matrix.copy(l), + n.preserveHipPosition && + f === n.hip && + c.matrix.setPosition(r.set(0, c.position.y, 0)), + c.matrix.decompose(c.position, c.quaternion, c.scale), + c.updateMatrixWorld(); + } + if (n.preservePosition) + for (var E = 0; E < v.length; ++E) + (c = v[E]), + (f = n.names[c.name] || c.name) !== n.hip && + c.position.copy(h[E]); + n.preserveMatrix && e.updateMatrixWorld(!0); + } + function Qr(e, t, n) { + var 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 = Wr(t)); + var i, + a, + o, + s, + l = Math.round(n.duration * (r.fps / 1e3) * 1e3), + u = 1 / r.fps, + c = [], + f = new A.AnimationMixer(t), + d = jr(e.skeleton), + h = []; + f.clipAction(n).play(), f.update(0), t.updateMatrixWorld(); + for (var p = 0; p < l; ++p) { + var v = p * u; + zr(e, t, r); + for (var m = 0; m < d.length; ++m) + Vr((s = r.names[d[m].name] || d[m].name), t.skeleton) && + ((a = d[m]), + (o = h[m] = h[m] || { bone: a }), + r.hip === s && + (o.pos || + (o.pos = { + times: new Float32Array(l), + values: new Float32Array(3 * l), + }), + r.useFirstFramePosition && + (0 === p && (i = a.position.clone()), a.position.sub(i)), + (o.pos.times[p] = v), + a.position.toArray(o.pos.values, 3 * p)), + o.quat || + (o.quat = { + times: new Float32Array(l), + values: new Float32Array(4 * l), + }), + (o.quat.times[p] = v), + a.quaternion.toArray(o.quat.values, 4 * p)); + f.update(u), t.updateMatrixWorld(); + } + for (var g = 0; g < h.length; ++g) + (o = h[g]) && + (o.pos && + c.push( + new A.VectorKeyframeTrack( + ".bones[" + o.bone.name + "].position", + o.pos.times, + o.pos.values + ) + ), + c.push( + new A.QuaternionKeyframeTrack( + ".bones[" + o.bone.name + "].quaternion", + o.quat.times, + o.quat.values + ) + )); + return f.uncacheAction(n), new A.AnimationClip(n.name, -1, c); + } + function Hr(e) { + var t = new Map(), + n = new Map(), + r = e.clone(); + return ( + Xr(e, r, function (e, r) { + t.set(r, e), n.set(e, r); + }), + r.traverse(function (e) { + if (e.isSkinnedMesh) { + var r = e, + i = t.get(e), + a = i.skeleton.bones; + (r.skeleton = i.skeleton.clone()), + r.bindMatrix.copy(i.bindMatrix), + (r.skeleton.bones = a.map(function (e) { + return n.get(e); + })), + r.bind(r.skeleton, r.bindMatrix); + } + }), + r + ); + } + function Vr(e, t) { + for (var n = 0, r = jr(t); n < r.length; n++) + if (e === r[n].name) return r[n]; + } + function jr(e) { + return Array.isArray(e) ? e : e.bones; + } + function Wr(e) { + var t = new A.SkeletonHelper(e.bones[0]); + return (t.skeleton = e), t; + } + function Xr(e, t, n) { + n(e, t); + for (var r = 0; r < e.children.length; r++) + Xr(e.children[r], t.children[r], n); + } + var Yr = { retarget: zr, retargetClip: Qr, clone: Hr }, + qr = { + uniforms: { tDiffuse: { value: null }, opacity: { value: 1 } }, + vertexShader: [ + "varying vec2 vUv;", + "void main() {", + "\tvUv = uv;", + "\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );", + "}", + ].join("\n"), + fragmentShader: [ + "uniform float opacity;", + "uniform sampler2D tDiffuse;", + "varying vec2 vUv;", + "#include ", + "void main() {", + "\tfloat depth = 1.0 - unpackRGBAToDepth( texture2D( tDiffuse, vUv ) );", + "\tgl_FragColor = vec4( vec3( depth ), opacity );", + "}", + ].join("\n"), + }, + Jr = null, + Kr = { + compressNormals: function (e, t) { + e.geometry || console.error("Mesh must contain geometry. "); + var n = e.geometry.attributes.normal; + if ( + (n || console.error("Geometry must contain normal attribute. "), + !n.isPacked) + ) { + 3 != n.itemSize && + console.error( + "normal.itemSize is not 3, which cannot be encoded. " + ); + var r, + i = n.array, + a = n.count; + if ("DEFAULT" == t) { + r = new Uint8Array(3 * a); + for (var o = 0; o < i.length; o += 3) { + var s = this.EncodingFuncs.defaultEncode( + i[o], + i[o + 1], + i[o + 2], + 1 + ); + (r[o + 0] = s[0]), (r[o + 1] = s[1]), (r[o + 2] = s[2]); + } + e.geometry.setAttribute( + "normal", + new A.BufferAttribute(r, 3, !0) + ), + (e.geometry.attributes.normal.bytes = 1 * r.length); + } else if ("OCT1Byte" == t) { + r = new Int8Array(2 * a); + for (var l = 0; l < i.length; l += 3) { + var u = this.EncodingFuncs.octEncodeBest( + i[l], + i[l + 1], + i[l + 2], + 1 + ); + (r[(l / 3) * 2 + 0] = u[0]), (r[(l / 3) * 2 + 1] = u[1]); + } + e.geometry.setAttribute( + "normal", + new A.BufferAttribute(r, 2, !0) + ), + (e.geometry.attributes.normal.bytes = 1 * r.length); + } else if ("OCT2Byte" == t) { + r = new Int16Array(2 * a); + for (var c = 0; c < i.length; c += 3) { + var f = this.EncodingFuncs.octEncodeBest( + i[c], + i[c + 1], + i[c + 2], + 2 + ); + (r[(c / 3) * 2 + 0] = f[0]), (r[(c / 3) * 2 + 1] = f[1]); + } + e.geometry.setAttribute( + "normal", + new A.BufferAttribute(r, 2, !0) + ), + (e.geometry.attributes.normal.bytes = 2 * r.length); + } else if ("ANGLES" == t) { + r = new Uint16Array(2 * a); + for (var d = 0; d < i.length; d += 3) { + var h = this.EncodingFuncs.anglesEncode( + i[d], + i[d + 1], + i[d + 2] + ); + (r[(d / 3) * 2 + 0] = h[0]), (r[(d / 3) * 2 + 1] = h[1]); + } + e.geometry.setAttribute( + "normal", + new A.BufferAttribute(r, 2, !0) + ), + (e.geometry.attributes.normal.bytes = 2 * r.length); + } else + console.error( + "Unrecognized encoding method, should be `DEFAULT` or `ANGLES` or `OCT`. " + ); + (e.geometry.attributes.normal.needsUpdate = !0), + (e.geometry.attributes.normal.isPacked = !0), + (e.geometry.attributes.normal.packingMethod = t), + e.material instanceof $r || + (e.material = new $r().copy(e.material)), + "ANGLES" == t && (e.material.defines.USE_PACKED_NORMAL = 0), + "OCT1Byte" == t && (e.material.defines.USE_PACKED_NORMAL = 1), + "OCT2Byte" == t && (e.material.defines.USE_PACKED_NORMAL = 1), + "DEFAULT" == t && (e.material.defines.USE_PACKED_NORMAL = 2); + } + }, + compressPositions: function (e) { + e.geometry || console.error("Mesh must contain geometry. "); + var t = e.geometry.attributes.position; + if ( + (t || + console.error("Geometry must contain position attribute. "), + !t.isPacked) + ) { + 3 != t.itemSize && + console.error( + "position.itemSize is not 3, which cannot be packed. " + ); + var n = t.array, + r = this.EncodingFuncs.quantizedEncode(n, 2), + i = r.quantized, + a = r.decodeMat; + null == e.geometry.boundingBox && + e.geometry.computeBoundingBox(), + null == e.geometry.boundingSphere && + e.geometry.computeBoundingSphere(), + e.geometry.setAttribute( + "position", + new A.BufferAttribute(i, 3) + ), + (e.geometry.attributes.position.isPacked = !0), + (e.geometry.attributes.position.needsUpdate = !0), + (e.geometry.attributes.position.bytes = 2 * i.length), + e.material instanceof $r || + (e.material = new $r().copy(e.material)), + (e.material.defines.USE_PACKED_POSITION = 0), + (e.material.uniforms.quantizeMatPos.value = a), + (e.material.uniforms.quantizeMatPos.needsUpdate = !0); + } + }, + compressUvs: function (e) { + e.geometry || + console.error("Mesh must contain geometry property. "); + var t = e.geometry.attributes.uv; + if ( + (t || console.error("Geometry must contain uv attribute. "), + !t.isPacked) + ) { + for ( + var n, r = { min: 1 / 0, max: -1 / 0 }, i = t.array, a = 0; + a < i.length; + a++ + ) + (r.min = Math.min(r.min, i[a])), + (r.max = Math.max(r.max, i[a])); + if (r.min >= -1 && r.max <= 1) { + n = new Uint16Array(i.length); + for (var o = 0; o < i.length; o += 2) { + var s = this.EncodingFuncs.defaultEncode( + i[o], + i[o + 1], + 0, + 2 + ); + (n[o] = s[0]), (n[o + 1] = s[1]); + } + e.geometry.setAttribute( + "uv", + new A.BufferAttribute(n, 2, !0) + ), + (e.geometry.attributes.uv.isPacked = !0), + (e.geometry.attributes.uv.needsUpdate = !0), + (e.geometry.attributes.uv.bytes = 2 * n.length), + e.material instanceof $r || + (e.material = new $r().copy(e.material)), + (e.material.defines.USE_PACKED_UV = 0); + } else + (n = this.EncodingFuncs.quantizedEncodeUV(i, 2)), + e.geometry.setAttribute( + "uv", + new A.BufferAttribute(n.quantized, 2) + ), + (e.geometry.attributes.uv.isPacked = !0), + (e.geometry.attributes.uv.needsUpdate = !0), + (e.geometry.attributes.uv.bytes = 2 * n.quantized.length), + e.material instanceof $r || + (e.material = new $r().copy(e.material)), + (e.material.defines.USE_PACKED_UV = 1), + (e.material.uniforms.quantizeMatUV.value = n.decodeMat), + (e.material.uniforms.quantizeMatUV.needsUpdate = !0); + } + }, + EncodingFuncs: { + defaultEncode: function (e, t, n, r) { + if (1 == r) { + var i = Math.round(0.5 * (e + 1) * 255), + a = Math.round(0.5 * (t + 1) * 255), + o = Math.round(0.5 * (n + 1) * 255); + return new Uint8Array([i, a, o]); + } + if (2 == r) { + var s = Math.round(0.5 * (e + 1) * 65535), + l = Math.round(0.5 * (t + 1) * 65535), + u = Math.round(0.5 * (n + 1) * 65535); + return new Uint16Array([s, l, u]); + } + console.error("number of bytes must be 1 or 2"); + }, + defaultDecode: function (e, t) { + return 1 == t + ? [ + (e[0] / 255) * 2 - 1, + (e[1] / 255) * 2 - 1, + (e[2] / 255) * 2 - 1, + ] + : 2 == t + ? [ + (e[0] / 65535) * 2 - 1, + (e[1] / 65535) * 2 - 1, + (e[2] / 65535) * 2 - 1, + ] + : void console.error("number of bytes must be 1 or 2"); + }, + anglesEncode: function (e, t, n) { + var r = parseInt( + 0.5 * (1 + Math.atan2(t, e) / Math.PI) * 65535 + ), + i = parseInt(0.5 * (1 + n) * 65535); + return new Uint16Array([r, i]); + }, + octEncodeBest: function (e, t, n, r) { + var i, a, o, s, l; + return ( + (o = i = u(e, t, n, "floor", "floor")), + (a = c(i)), + (l = f(e, t, n, a)), + (a = c((i = u(e, t, n, "ceil", "floor")))), + (s = f(e, t, n, a)) > l && ((o = i), (l = s)), + (a = c((i = u(e, t, n, "floor", "ceil")))), + (s = f(e, t, n, a)) > l && ((o = i), (l = s)), + (a = c((i = u(e, t, n, "ceil", "ceil")))), + (s = f(e, t, n, a)) > l && (o = i), + o + ); + function u(e, t, i, a, o) { + var s = e / (Math.abs(e) + Math.abs(t) + Math.abs(i)), + l = t / (Math.abs(e) + Math.abs(t) + Math.abs(i)); + if (n < 0) { + var u = (1 - Math.abs(l)) * (s >= 0 ? 1 : -1), + c = (1 - Math.abs(s)) * (l >= 0 ? 1 : -1); + (s = u), (l = c); + var f = 1 - Math.abs(s) - Math.abs(l); + f > 0 && + ((f += 0.001), + (s += s > 0 ? f / 2 : -f / 2), + (l += l > 0 ? f / 2 : -f / 2)); + } + return 1 == r + ? new Int8Array([ + Math[a](127.5 * s + (s < 0 ? 1 : 0)), + Math[o](127.5 * l + (l < 0 ? 1 : 0)), + ]) + : 2 == r + ? new Int16Array([ + Math[a](32767.5 * s + (s < 0 ? 1 : 0)), + Math[o](32767.5 * l + (l < 0 ? 1 : 0)), + ]) + : void 0; + } + function c(e) { + var t = e[0], + n = e[1]; + 1 == r + ? ((t /= t < 0 ? 127 : 128), (n /= n < 0 ? 127 : 128)) + : 2 == r && + ((t /= t < 0 ? 32767 : 32768), + (n /= n < 0 ? 32767 : 32768)); + var i = 1 - Math.abs(t) - Math.abs(n); + if (i < 0) { + var a = t; + (t = (1 - Math.abs(n)) * (t >= 0 ? 1 : -1)), + (n = (1 - Math.abs(a)) * (n >= 0 ? 1 : -1)); + } + var o = Math.sqrt(t * t + n * n + i * i); + return [t / o, n / o, i / o]; + } + function f(e, t, n, r) { + return e * r[0] + t * r[1] + n * r[2]; + } + }, + quantizedEncode: function (e, t) { + var n, r; + 1 == t + ? ((n = new Uint8Array(e.length)), (r = 255)) + : 2 == t + ? ((n = new Uint16Array(e.length)), (r = 65535)) + : console.error("number of bytes error! "); + var i = new A.Matrix4(), + a = new Float32Array(3), + o = new Float32Array(3); + (a[0] = a[1] = a[2] = Number.MAX_VALUE), + (o[0] = o[1] = o[2] = -Number.MAX_VALUE); + for (var s = 0; s < e.length; s += 3) + (a[0] = Math.min(a[0], e[s + 0])), + (a[1] = Math.min(a[1], e[s + 1])), + (a[2] = Math.min(a[2], e[s + 2])), + (o[0] = Math.max(o[0], e[s + 0])), + (o[1] = Math.max(o[1], e[s + 1])), + (o[2] = Math.max(o[2], e[s + 2])); + i.scale( + new A.Vector3( + (o[0] - a[0]) / r, + (o[1] - a[1]) / r, + (o[2] - a[2]) / r + ) + ), + (i.elements[12] = a[0]), + (i.elements[13] = a[1]), + (i.elements[14] = a[2]), + i.transpose(); + for ( + var l = new Float32Array([ + o[0] !== a[0] ? r / (o[0] - a[0]) : 0, + o[1] !== a[1] ? r / (o[1] - a[1]) : 0, + o[2] !== a[2] ? r / (o[2] - a[2]) : 0, + ]), + u = 0; + u < e.length; + u += 3 + ) + (n[u + 0] = Math.floor((e[u + 0] - a[0]) * l[0])), + (n[u + 1] = Math.floor((e[u + 1] - a[1]) * l[1])), + (n[u + 2] = Math.floor((e[u + 2] - a[2]) * l[2])); + return { quantized: n, decodeMat: i }; + }, + quantizedEncodeUV: function (e, t) { + var n, r; + 1 == t + ? ((n = new Uint8Array(e.length)), (r = 255)) + : 2 == t + ? ((n = new Uint16Array(e.length)), (r = 65535)) + : console.error("number of bytes error! "); + var i = new A.Matrix3(), + a = new Float32Array(2), + o = new Float32Array(2); + (a[0] = a[1] = Number.MAX_VALUE), + (o[0] = o[1] = -Number.MAX_VALUE); + for (var s = 0; s < e.length; s += 2) + (a[0] = Math.min(a[0], e[s + 0])), + (a[1] = Math.min(a[1], e[s + 1])), + (o[0] = Math.max(o[0], e[s + 0])), + (o[1] = Math.max(o[1], e[s + 1])); + i.scale((o[0] - a[0]) / r, (o[1] - a[1]) / r), + (i.elements[6] = a[0]), + (i.elements[7] = a[1]), + i.transpose(); + for ( + var l = new Float32Array([ + o[0] !== a[0] ? r / (o[0] - a[0]) : 0, + o[1] !== a[1] ? r / (o[1] - a[1]) : 0, + ]), + u = 0; + u < e.length; + u += 2 + ) + (n[u + 0] = Math.floor((e[u + 0] - a[0]) * l[0])), + (n[u + 1] = Math.floor((e[u + 1] - a[1]) * l[1])); + return { quantized: n, decodeMat: i }; + }, + }, + }, + $r = (function (e) { + (0, m.Z)(n, e); + var t = (0, g.Z)(n); + function n(e) { + var r; + return ( + (0, p.Z)(this, n), + ((r = t.call(this)).defines = {}), + (r.type = "PackedPhongMaterial"), + (r.uniforms = A.UniformsUtils.merge([ + A.ShaderLib.phong.uniforms, + { + quantizeMatPos: { value: null }, + quantizeMatUV: { value: null }, + }, + ])), + (r.vertexShader = [ + "#define PHONG", + "varying vec3 vViewPosition;", + "#ifndef FLAT_SHADED", + "varying vec3 vNormal;", + "#endif", + A.ShaderChunk.common, + A.ShaderChunk.uv_pars_vertex, + A.ShaderChunk.uv2_pars_vertex, + A.ShaderChunk.displacementmap_pars_vertex, + A.ShaderChunk.envmap_pars_vertex, + A.ShaderChunk.color_pars_vertex, + A.ShaderChunk.fog_pars_vertex, + A.ShaderChunk.morphtarget_pars_vertex, + A.ShaderChunk.skinning_pars_vertex, + A.ShaderChunk.shadowmap_pars_vertex, + A.ShaderChunk.logdepthbuf_pars_vertex, + A.ShaderChunk.clipping_planes_pars_vertex, + "#ifdef USE_PACKED_NORMAL\n\t\t\t\t\t#if USE_PACKED_NORMAL == 0\n\t\t\t\t\t\tvec3 decodeNormal(vec3 packedNormal)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tfloat x = packedNormal.x * 2.0 - 1.0;\n\t\t\t\t\t\t\tfloat y = packedNormal.y * 2.0 - 1.0;\n\t\t\t\t\t\t\tvec2 scth = vec2(sin(x * PI), cos(x * PI));\n\t\t\t\t\t\t\tvec2 scphi = vec2(sqrt(1.0 - y * y), y);\n\t\t\t\t\t\t\treturn normalize( vec3(scth.y * scphi.x, scth.x * scphi.x, scphi.y) );\n\t\t\t\t\t\t}\n\t\t\t\t\t#endif\n\n\t\t\t\t\t#if USE_PACKED_NORMAL == 1\n\t\t\t\t\t\tvec3 decodeNormal(vec3 packedNormal)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tvec3 v = vec3(packedNormal.xy, 1.0 - abs(packedNormal.x) - abs(packedNormal.y));\n\t\t\t\t\t\t\tif (v.z < 0.0)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tv.xy = (1.0 - abs(v.yx)) * vec2((v.x >= 0.0) ? +1.0 : -1.0, (v.y >= 0.0) ? +1.0 : -1.0);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\treturn normalize(v);\n\t\t\t\t\t\t}\n\t\t\t\t\t#endif\n\n\t\t\t\t\t#if USE_PACKED_NORMAL == 2\n\t\t\t\t\t\tvec3 decodeNormal(vec3 packedNormal)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tvec3 v = (packedNormal * 2.0) - 1.0;\n\t\t\t\t\t\t\treturn normalize(v);\n\t\t\t\t\t\t}\n\t\t\t\t\t#endif\n\t\t\t\t#endif", + "#ifdef USE_PACKED_POSITION\n\t\t\t\t\t#if USE_PACKED_POSITION == 0\n\t\t\t\t\t\tuniform mat4 quantizeMatPos;\n\t\t\t\t\t#endif\n\t\t\t\t#endif", + "#ifdef USE_PACKED_UV\n\t\t\t\t\t#if USE_PACKED_UV == 1\n\t\t\t\t\t\tuniform mat3 quantizeMatUV;\n\t\t\t\t\t#endif\n\t\t\t\t#endif", + "#ifdef USE_PACKED_UV\n\t\t\t\t\t#if USE_PACKED_UV == 0\n\t\t\t\t\t\tvec2 decodeUV(vec2 packedUV)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tvec2 uv = (packedUV * 2.0) - 1.0;\n\t\t\t\t\t\t\treturn uv;\n\t\t\t\t\t\t}\n\t\t\t\t\t#endif\n\n\t\t\t\t\t#if USE_PACKED_UV == 1\n\t\t\t\t\t\tvec2 decodeUV(vec2 packedUV)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tvec2 uv = ( vec3(packedUV, 1.0) * quantizeMatUV ).xy;\n\t\t\t\t\t\t\treturn uv;\n\t\t\t\t\t\t}\n\t\t\t\t\t#endif\n\t\t\t\t#endif", + "void main() {", + A.ShaderChunk.uv_vertex, + "#ifdef USE_UV\n\t\t\t\t\t#ifdef USE_PACKED_UV\n\t\t\t\t\t\tvUv = decodeUV(vUv);\n\t\t\t\t\t#endif\n\t\t\t\t#endif", + A.ShaderChunk.uv2_vertex, + A.ShaderChunk.color_vertex, + A.ShaderChunk.beginnormal_vertex, + "#ifdef USE_PACKED_NORMAL\n\t\t\t\t\tobjectNormal = decodeNormal(objectNormal);\n\t\t\t\t#endif\n\n\t\t\t\t#ifdef USE_TANGENT\n\t\t\t\t\tvec3 objectTangent = vec3( tangent.xyz );\n\t\t\t\t#endif\n\t\t\t\t", + A.ShaderChunk.morphnormal_vertex, + A.ShaderChunk.skinbase_vertex, + A.ShaderChunk.skinnormal_vertex, + A.ShaderChunk.defaultnormal_vertex, + "#ifndef FLAT_SHADED", + "\tvNormal = normalize( transformedNormal );", + "#endif", + A.ShaderChunk.begin_vertex, + "#ifdef USE_PACKED_POSITION\n\t\t\t\t\t#if USE_PACKED_POSITION == 0\n\t\t\t\t\t\ttransformed = ( vec4(transformed, 1.0) * quantizeMatPos ).xyz;\n\t\t\t\t\t#endif\n\t\t\t\t#endif", + A.ShaderChunk.morphtarget_vertex, + A.ShaderChunk.skinning_vertex, + A.ShaderChunk.displacementmap_vertex, + A.ShaderChunk.project_vertex, + A.ShaderChunk.logdepthbuf_vertex, + A.ShaderChunk.clipping_planes_vertex, + "vViewPosition = - mvPosition.xyz;", + A.ShaderChunk.worldpos_vertex, + A.ShaderChunk.envmap_vertex, + A.ShaderChunk.shadowmap_vertex, + A.ShaderChunk.fog_vertex, + "}", + ].join("\n")), + (r.fragmentShader = [ + "#define PHONG", + "uniform vec3 diffuse;", + "uniform vec3 emissive;", + "uniform vec3 specular;", + "uniform float shininess;", + "uniform float opacity;", + A.ShaderChunk.common, + A.ShaderChunk.packing, + A.ShaderChunk.dithering_pars_fragment, + A.ShaderChunk.color_pars_fragment, + A.ShaderChunk.uv_pars_fragment, + A.ShaderChunk.uv2_pars_fragment, + A.ShaderChunk.map_pars_fragment, + A.ShaderChunk.alphamap_pars_fragment, + A.ShaderChunk.aomap_pars_fragment, + A.ShaderChunk.lightmap_pars_fragment, + A.ShaderChunk.emissivemap_pars_fragment, + A.ShaderChunk.envmap_common_pars_fragment, + A.ShaderChunk.envmap_pars_fragment, + A.ShaderChunk.cube_uv_reflection_fragment, + A.ShaderChunk.fog_pars_fragment, + A.ShaderChunk.bsdfs, + A.ShaderChunk.lights_pars_begin, + A.ShaderChunk.lights_phong_pars_fragment, + A.ShaderChunk.shadowmap_pars_fragment, + A.ShaderChunk.bumpmap_pars_fragment, + A.ShaderChunk.normalmap_pars_fragment, + A.ShaderChunk.specularmap_pars_fragment, + A.ShaderChunk.logdepthbuf_pars_fragment, + A.ShaderChunk.clipping_planes_pars_fragment, + "void main() {", + A.ShaderChunk.clipping_planes_fragment, + "vec4 diffuseColor = vec4( diffuse, opacity );", + "ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );", + "vec3 totalEmissiveRadiance = emissive;", + A.ShaderChunk.logdepthbuf_fragment, + A.ShaderChunk.map_fragment, + A.ShaderChunk.color_fragment, + A.ShaderChunk.alphamap_fragment, + A.ShaderChunk.alphatest_fragment, + A.ShaderChunk.specularmap_fragment, + A.ShaderChunk.normal_fragment_begin, + A.ShaderChunk.normal_fragment_maps, + A.ShaderChunk.emissivemap_fragment, + A.ShaderChunk.lights_phong_fragment, + A.ShaderChunk.lights_fragment_begin, + A.ShaderChunk.lights_fragment_maps, + A.ShaderChunk.lights_fragment_end, + A.ShaderChunk.aomap_fragment, + "vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;", + A.ShaderChunk.envmap_fragment, + "gl_FragColor = vec4( outgoingLight, diffuseColor.a );", + A.ShaderChunk.tonemapping_fragment, + parseInt(A.REVISION.replace(/\D+/g, "")) >= 154 + ? A.ShaderChunk.colorspace_fragment + : A.ShaderChunk.encodings_fragment, + A.ShaderChunk.fog_fragment, + A.ShaderChunk.premultiplied_alpha_fragment, + A.ShaderChunk.dithering_fragment, + "}", + ].join("\n")), + r.setValues(e), + r + ); + } + return (0, v.Z)(n); + })(A.MeshPhongMaterial), + ei = { + uniforms: { + textureWidth: { value: 1 }, + textureHeight: { value: 1 }, + focalDepth: { value: 1 }, + focalLength: { value: 24 }, + fstop: { value: 0.9 }, + tColor: { value: null }, + tDepth: { value: null }, + maxblur: { value: 1 }, + showFocus: { value: 0 }, + manualdof: { value: 0 }, + vignetting: { value: 0 }, + depthblur: { value: 0 }, + threshold: { value: 0.5 }, + gain: { value: 2 }, + bias: { value: 0.5 }, + fringe: { value: 0.7 }, + znear: { value: 0.1 }, + zfar: { value: 100 }, + noise: { value: 1 }, + dithering: { value: 1e-4 }, + pentagon: { value: 0 }, + shaderFocus: { value: 1 }, + focusCoords: { value: new A.Vector2() }, + }, + vertexShader: [ + "varying vec2 vUv;", + "void main() {", + "\tvUv = uv;", + "\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );", + "}", + ].join("\n"), + fragmentShader: [ + "#include ", + "varying vec2 vUv;", + "uniform sampler2D tColor;", + "uniform sampler2D tDepth;", + "uniform float textureWidth;", + "uniform float textureHeight;", + "uniform float focalDepth; //focal distance value in meters, but you may use autofocus option below", + "uniform float focalLength; //focal length in mm", + "uniform float fstop; //f-stop value", + "uniform bool showFocus; //show debug focus point and focal range (red = focal point, green = focal range)", + "/*", + "make sure that these two values are the same for your camera, otherwise distances will be wrong.", + "*/", + "uniform float znear; // camera clipping start", + "uniform float zfar; // camera clipping end", + "//------------------------------------------", + "//user variables", + "const int samples = SAMPLES; //samples on the first ring", + "const int rings = RINGS; //ring count", + "const int maxringsamples = rings * samples;", + "uniform bool manualdof; // manual dof calculation", + "float ndofstart = 1.0; // near dof blur start", + "float ndofdist = 2.0; // near dof blur falloff distance", + "float fdofstart = 1.0; // far dof blur start", + "float fdofdist = 3.0; // far dof blur falloff distance", + "float CoC = 0.03; //circle of confusion size in mm (35mm film = 0.03mm)", + "uniform bool vignetting; // use optical lens vignetting", + "float vignout = 1.3; // vignetting outer border", + "float vignin = 0.0; // vignetting inner border", + "float vignfade = 22.0; // f-stops till vignete fades", + "uniform bool shaderFocus;", + "// disable if you use external focalDepth value", + "uniform vec2 focusCoords;", + "// autofocus point on screen (0.0,0.0 - left lower corner, 1.0,1.0 - upper right)", + "// if center of screen use vec2(0.5, 0.5);", + "uniform float maxblur;", + "//clamp value of max blur (0.0 = no blur, 1.0 default)", + "uniform float threshold; // highlight threshold;", + "uniform float gain; // highlight gain;", + "uniform float bias; // bokeh edge bias", + "uniform float fringe; // bokeh chromatic aberration / fringing", + "uniform bool noise; //use noise instead of pattern for sample dithering", + "uniform float dithering;", + "uniform bool depthblur; // blur the depth buffer", + "float dbsize = 1.25; // depth blur size", + "/*", + "next part is experimental", + "not looking good with small sample and ring count", + "looks okay starting from samples = 4, rings = 4", + "*/", + "uniform bool pentagon; //use pentagon as bokeh shape?", + "float feather = 0.4; //pentagon shape feather", + "//------------------------------------------", + "float penta(vec2 coords) {", + "\t//pentagonal shape", + "\tfloat scale = float(rings) - 1.3;", + "\tvec4 HS0 = vec4( 1.0, 0.0, 0.0, 1.0);", + "\tvec4 HS1 = vec4( 0.309016994, 0.951056516, 0.0, 1.0);", + "\tvec4 HS2 = vec4(-0.809016994, 0.587785252, 0.0, 1.0);", + "\tvec4 HS3 = vec4(-0.809016994,-0.587785252, 0.0, 1.0);", + "\tvec4 HS4 = vec4( 0.309016994,-0.951056516, 0.0, 1.0);", + "\tvec4 HS5 = vec4( 0.0 ,0.0 , 1.0, 1.0);", + "\tvec4 one = vec4( 1.0 );", + "\tvec4 P = vec4((coords),vec2(scale, scale));", + "\tvec4 dist = vec4(0.0);", + "\tfloat inorout = -4.0;", + "\tdist.x = dot( P, HS0 );", + "\tdist.y = dot( P, HS1 );", + "\tdist.z = dot( P, HS2 );", + "\tdist.w = dot( P, HS3 );", + "\tdist = smoothstep( -feather, feather, dist );", + "\tinorout += dot( dist, one );", + "\tdist.x = dot( P, HS4 );", + "\tdist.y = HS5.w - abs( P.z );", + "\tdist = smoothstep( -feather, feather, dist );", + "\tinorout += dist.x;", + "\treturn clamp( inorout, 0.0, 1.0 );", + "}", + "float bdepth(vec2 coords) {", + "\t// Depth buffer blur", + "\tfloat d = 0.0;", + "\tfloat kernel[9];", + "\tvec2 offset[9];", + "\tvec2 wh = vec2(1.0/textureWidth,1.0/textureHeight) * dbsize;", + "\toffset[0] = vec2(-wh.x,-wh.y);", + "\toffset[1] = vec2( 0.0, -wh.y);", + "\toffset[2] = vec2( wh.x -wh.y);", + "\toffset[3] = vec2(-wh.x, 0.0);", + "\toffset[4] = vec2( 0.0, 0.0);", + "\toffset[5] = vec2( wh.x, 0.0);", + "\toffset[6] = vec2(-wh.x, wh.y);", + "\toffset[7] = vec2( 0.0, wh.y);", + "\toffset[8] = vec2( wh.x, wh.y);", + "\tkernel[0] = 1.0/16.0; kernel[1] = 2.0/16.0; kernel[2] = 1.0/16.0;", + "\tkernel[3] = 2.0/16.0; kernel[4] = 4.0/16.0; kernel[5] = 2.0/16.0;", + "\tkernel[6] = 1.0/16.0; kernel[7] = 2.0/16.0; kernel[8] = 1.0/16.0;", + "\tfor( int i=0; i<9; i++ ) {", + "\t\tfloat tmp = texture2D(tDepth, coords + offset[i]).r;", + "\t\td += tmp * kernel[i];", + "\t}", + "\treturn d;", + "}", + "vec3 color(vec2 coords,float blur) {", + "\t//processing the sample", + "\tvec3 col = vec3(0.0);", + "\tvec2 texel = vec2(1.0/textureWidth,1.0/textureHeight);", + "\tcol.r = texture2D(tColor,coords + vec2(0.0,1.0)*texel*fringe*blur).r;", + "\tcol.g = texture2D(tColor,coords + vec2(-0.866,-0.5)*texel*fringe*blur).g;", + "\tcol.b = texture2D(tColor,coords + vec2(0.866,-0.5)*texel*fringe*blur).b;", + "\tvec3 lumcoeff = vec3(0.299,0.587,0.114);", + "\tfloat lum = dot(col.rgb, lumcoeff);", + "\tfloat thresh = max((lum-threshold)*gain, 0.0);", + "\treturn col+mix(vec3(0.0),col,thresh*blur);", + "}", + "vec3 debugFocus(vec3 col, float blur, float depth) {", + "\tfloat edge = 0.002*depth; //distance based edge smoothing", + "\tfloat m = clamp(smoothstep(0.0,edge,blur),0.0,1.0);", + "\tfloat e = clamp(smoothstep(1.0-edge,1.0,blur),0.0,1.0);", + "\tcol = mix(col,vec3(1.0,0.5,0.0),(1.0-m)*0.6);", + "\tcol = mix(col,vec3(0.0,0.5,1.0),((1.0-e)-(1.0-m))*0.2);", + "\treturn col;", + "}", + "float linearize(float depth) {", + "\treturn -zfar * znear / (depth * (zfar - znear) - zfar);", + "}", + "float vignette() {", + "\tfloat dist = distance(vUv.xy, vec2(0.5,0.5));", + "\tdist = smoothstep(vignout+(fstop/vignfade), vignin+(fstop/vignfade), dist);", + "\treturn clamp(dist,0.0,1.0);", + "}", + "float gather(float i, float j, int ringsamples, inout vec3 col, float w, float h, float blur) {", + "\tfloat rings2 = float(rings);", + "\tfloat step = PI*2.0 / float(ringsamples);", + "\tfloat pw = cos(j*step)*i;", + "\tfloat ph = sin(j*step)*i;", + "\tfloat p = 1.0;", + "\tif (pentagon) {", + "\t\tp = penta(vec2(pw,ph));", + "\t}", + "\tcol += color(vUv.xy + vec2(pw*w,ph*h), blur) * mix(1.0, i/rings2, bias) * p;", + "\treturn 1.0 * mix(1.0, i /rings2, bias) * p;", + "}", + "void main() {", + "\t//scene depth calculation", + "\tfloat depth = linearize(texture2D(tDepth,vUv.xy).x);", + "\t// Blur depth?", + "\tif ( depthblur ) {", + "\t\tdepth = linearize(bdepth(vUv.xy));", + "\t}", + "\t//focal plane calculation", + "\tfloat fDepth = focalDepth;", + "\tif (shaderFocus) {", + "\t\tfDepth = linearize(texture2D(tDepth,focusCoords).x);", + "\t}", + "\t// dof blur factor calculation", + "\tfloat blur = 0.0;", + "\tif (manualdof) {", + "\t\tfloat a = depth-fDepth; // Focal plane", + "\t\tfloat b = (a-fdofstart)/fdofdist; // Far DoF", + "\t\tfloat c = (-a-ndofstart)/ndofdist; // Near Dof", + "\t\tblur = (a>0.0) ? b : c;", + "\t} else {", + "\t\tfloat f = focalLength; // focal length in mm", + "\t\tfloat d = fDepth*1000.0; // focal plane in mm", + "\t\tfloat o = depth*1000.0; // depth in mm", + "\t\tfloat a = (o*f)/(o-f);", + "\t\tfloat b = (d*f)/(d-f);", + "\t\tfloat c = (d-f)/(d*fstop*CoC);", + "\t\tblur = abs(a-b)*c;", + "\t}", + "\tblur = clamp(blur,0.0,1.0);", + "\t// calculation of pattern for dithering", + "\tvec2 noise = vec2(rand(vUv.xy), rand( vUv.xy + vec2( 0.4, 0.6 ) ) )*dithering*blur;", + "\t// getting blur x and y step factor", + "\tfloat w = (1.0/textureWidth)*blur*maxblur+noise.x;", + "\tfloat h = (1.0/textureHeight)*blur*maxblur+noise.y;", + "\t// calculation of final color", + "\tvec3 col = vec3(0.0);", + "\tif(blur < 0.05) {", + "\t\t//some optimization thingy", + "\t\tcol = texture2D(tColor, vUv.xy).rgb;", + "\t} else {", + "\t\tcol = texture2D(tColor, vUv.xy).rgb;", + "\t\tfloat s = 1.0;", + "\t\tint ringsamples;", + "\t\tfor (int i = 1; i <= rings; i++) {", + "\t\t\t/*unboxstart*/", + "\t\t\tringsamples = i * samples;", + "\t\t\tfor (int j = 0 ; j < maxringsamples ; j++) {", + "\t\t\t\tif (j >= ringsamples) break;", + "\t\t\t\ts += gather(float(i), float(j), ringsamples, col, w, h, blur);", + "\t\t\t}", + "\t\t\t/*unboxend*/", + "\t\t}", + "\t\tcol /= s; //divide by sample count", + "\t}", + "\tif (showFocus) {", + "\t\tcol = debugFocus(col, blur, depth);", + "\t}", + "\tif (vignetting) {", + "\t\tcol *= vignette();", + "\t}", + "\tgl_FragColor.rgb = col;", + "\tgl_FragColor.a = 1.0;", + "} ", + ].join("\n"), + }, + ti = { + uniforms: { mNear: { value: 1 }, mFar: { value: 1e3 } }, + vertexShader: [ + "varying float vViewZDepth;", + "void main() {", + "\t#include ", + "\t#include ", + "\tvViewZDepth = - mvPosition.z;", + "}", + ].join("\n"), + fragmentShader: [ + "uniform float mNear;", + "uniform float mFar;", + "varying float vViewZDepth;", + "void main() {", + "\tfloat color = 1.0 - smoothstep( mNear, mFar, vViewZDepth );", + "\tgl_FragColor = vec4( vec3( color ), 1.0 );", + "} ", + ].join("\n"), + }, + ni = null, + ri = new A.Triangle(), + ii = new A.Vector3(), + ai = null, + oi = { + c: null, + u: [new A.Vector3(), new A.Vector3(), new A.Vector3()], + e: [], + }, + si = { + c: null, + u: [new A.Vector3(), new A.Vector3(), new A.Vector3()], + e: [], + }, + li = [[], [], []], + ui = [[], [], []], + ci = [], + fi = new A.Vector3(), + di = new A.Vector3(), + hi = new A.Vector3(), + pi = new A.Vector3(), + vi = new A.Vector3(), + mi = new A.Vector3(), + gi = new A.Matrix3(), + Ai = new A.Box3(), + yi = new A.Matrix4(), + bi = new A.Matrix4(), + xi = new A.Ray(), + Si = (function () { + function e() { + var t = + arguments.length > 0 && void 0 !== arguments[0] + ? arguments[0] + : new A.Vector3(), + n = + arguments.length > 1 && void 0 !== arguments[1] + ? arguments[1] + : new A.Vector3(), + r = + arguments.length > 2 && void 0 !== arguments[2] + ? arguments[2] + : new A.Matrix3(); + (0, p.Z)(this, e), + (this.center = t), + (this.halfSize = n), + (this.rotation = r); + } + return ( + (0, v.Z)(e, [ + { + key: "set", + value: function (e, t, n) { + return ( + (this.center = e), + (this.halfSize = t), + (this.rotation = n), + this + ); + }, + }, + { + key: "copy", + value: function (e) { + return ( + this.center.copy(e.center), + this.halfSize.copy(e.halfSize), + this.rotation.copy(e.rotation), + this + ); + }, + }, + { + key: "clone", + value: function () { + return new this.constructor().copy(this); + }, + }, + { + key: "getSize", + value: function (e) { + return e.copy(this.halfSize).multiplyScalar(2); + }, + }, + { + key: "clampPoint", + value: function (e, t) { + var n = this.halfSize; + pi.subVectors(e, this.center), + this.rotation.extractBasis(fi, di, hi), + t.copy(this.center); + var r = A.MathUtils.clamp(pi.dot(fi), -n.x, n.x); + t.add(fi.multiplyScalar(r)); + var i = A.MathUtils.clamp(pi.dot(di), -n.y, n.y); + t.add(di.multiplyScalar(i)); + var a = A.MathUtils.clamp(pi.dot(hi), -n.z, n.z); + return t.add(hi.multiplyScalar(a)), t; + }, + }, + { + key: "containsPoint", + value: function (e) { + return ( + pi.subVectors(e, this.center), + this.rotation.extractBasis(fi, di, hi), + Math.abs(pi.dot(fi)) <= this.halfSize.x && + Math.abs(pi.dot(di)) <= this.halfSize.y && + Math.abs(pi.dot(hi)) <= this.halfSize.z + ); + }, + }, + { + key: "intersectsBox3", + value: function (e) { + return this.intersectsOBB(Ei.fromBox3(e)); + }, + }, + { + key: "intersectsSphere", + value: function (e) { + return ( + this.clampPoint(e.center, mi), + mi.distanceToSquared(e.center) <= e.radius * e.radius + ); + }, + }, + { + key: "intersectsOBB", + value: function (e) { + var t, + n, + r = + arguments.length > 1 && void 0 !== arguments[1] + ? arguments[1] + : Number.EPSILON; + (oi.c = this.center), + (oi.e[0] = this.halfSize.x), + (oi.e[1] = this.halfSize.y), + (oi.e[2] = this.halfSize.z), + this.rotation.extractBasis(oi.u[0], oi.u[1], oi.u[2]), + (si.c = e.center), + (si.e[0] = e.halfSize.x), + (si.e[1] = e.halfSize.y), + (si.e[2] = e.halfSize.z), + e.rotation.extractBasis(si.u[0], si.u[1], si.u[2]); + for (var i = 0; i < 3; i++) + for (var a = 0; a < 3; a++) + li[i][a] = oi.u[i].dot(si.u[a]); + pi.subVectors(si.c, oi.c), + (ci[0] = pi.dot(oi.u[0])), + (ci[1] = pi.dot(oi.u[1])), + (ci[2] = pi.dot(oi.u[2])); + for (var o = 0; o < 3; o++) + for (var s = 0; s < 3; s++) + ui[o][s] = Math.abs(li[o][s]) + r; + for (var l = 0; l < 3; l++) + if ( + ((t = oi.e[l]), + (n = + si.e[0] * ui[l][0] + + si.e[1] * ui[l][1] + + si.e[2] * ui[l][2]), + Math.abs(ci[l]) > t + n) + ) + return !1; + for (var u = 0; u < 3; u++) + if ( + ((t = + oi.e[0] * ui[0][u] + + oi.e[1] * ui[1][u] + + oi.e[2] * ui[2][u]), + (n = si.e[u]), + Math.abs( + ci[0] * li[0][u] + ci[1] * li[1][u] + ci[2] * li[2][u] + ) > + t + n) + ) + return !1; + return ( + (t = oi.e[1] * ui[2][0] + oi.e[2] * ui[1][0]), + (n = si.e[1] * ui[0][2] + si.e[2] * ui[0][1]), + !( + Math.abs(ci[2] * li[1][0] - ci[1] * li[2][0]) > + t + n + ) && + ((t = oi.e[1] * ui[2][1] + oi.e[2] * ui[1][1]), + (n = si.e[0] * ui[0][2] + si.e[2] * ui[0][0]), + !( + Math.abs(ci[2] * li[1][1] - ci[1] * li[2][1]) > + t + n + ) && + ((t = oi.e[1] * ui[2][2] + oi.e[2] * ui[1][2]), + (n = si.e[0] * ui[0][1] + si.e[1] * ui[0][0]), + !( + Math.abs(ci[2] * li[1][2] - ci[1] * li[2][2]) > + t + n + ) && + ((t = oi.e[0] * ui[2][0] + oi.e[2] * ui[0][0]), + (n = si.e[1] * ui[1][2] + si.e[2] * ui[1][1]), + !( + Math.abs(ci[0] * li[2][0] - ci[2] * li[0][0]) > + t + n + ) && + ((t = oi.e[0] * ui[2][1] + oi.e[2] * ui[0][1]), + (n = si.e[0] * ui[1][2] + si.e[2] * ui[1][0]), + !( + Math.abs(ci[0] * li[2][1] - ci[2] * li[0][1]) > + t + n + ) && + ((t = oi.e[0] * ui[2][2] + oi.e[2] * ui[0][2]), + (n = si.e[0] * ui[1][1] + si.e[1] * ui[1][0]), + !( + Math.abs( + ci[0] * li[2][2] - ci[2] * li[0][2] + ) > + t + n + ) && + ((t = + oi.e[0] * ui[1][0] + oi.e[1] * ui[0][0]), + (n = si.e[1] * ui[2][2] + si.e[2] * ui[2][1]), + !( + Math.abs( + ci[1] * li[0][0] - ci[0] * li[1][0] + ) > + t + n + ) && + ((t = + oi.e[0] * ui[1][1] + oi.e[1] * ui[0][1]), + (n = + si.e[0] * ui[2][2] + si.e[2] * ui[2][0]), + !( + Math.abs( + ci[1] * li[0][1] - ci[0] * li[1][1] + ) > + t + n + ) && + ((t = + oi.e[0] * ui[1][2] + + oi.e[1] * ui[0][2]), + (n = + si.e[0] * ui[2][1] + + si.e[1] * ui[2][0]), + !( + Math.abs( + ci[1] * li[0][2] - ci[0] * li[1][2] + ) > + t + n + ))))))))) + ); + }, + }, + { + key: "intersectsPlane", + value: function (e) { + this.rotation.extractBasis(fi, di, hi); + var t = + this.halfSize.x * Math.abs(e.normal.dot(fi)) + + this.halfSize.y * Math.abs(e.normal.dot(di)) + + this.halfSize.z * Math.abs(e.normal.dot(hi)), + n = e.normal.dot(this.center) - e.constant; + return Math.abs(n) <= t; + }, + }, + { + key: "intersectRay", + value: function (e, t) { + return ( + this.getSize(vi), + Ai.setFromCenterAndSize(pi.set(0, 0, 0), vi), + yi.setFromMatrix3(this.rotation), + yi.setPosition(this.center), + bi.copy(yi).invert(), + xi.copy(e).applyMatrix4(bi), + xi.intersectBox(Ai, t) ? t.applyMatrix4(yi) : null + ); + }, + }, + { + key: "intersectsRay", + value: function (e) { + return null !== this.intersectRay(e, pi); + }, + }, + { + key: "fromBox3", + value: function (e) { + return ( + e.getCenter(this.center), + e.getSize(this.halfSize).multiplyScalar(0.5), + this.rotation.identity(), + this + ); + }, + }, + { + key: "equals", + value: function (e) { + return ( + e.center.equals(this.center) && + e.halfSize.equals(this.halfSize) && + e.rotation.equals(this.rotation) + ); + }, + }, + { + key: "applyMatrix4", + value: function (e) { + var t = e.elements, + n = pi.set(t[0], t[1], t[2]).length(), + r = pi.set(t[4], t[5], t[6]).length(), + i = pi.set(t[8], t[9], t[10]).length(); + e.determinant() < 0 && (n = -n), gi.setFromMatrix4(e); + var a = 1 / n, + o = 1 / r, + s = 1 / i; + return ( + (gi.elements[0] *= a), + (gi.elements[1] *= a), + (gi.elements[2] *= a), + (gi.elements[3] *= o), + (gi.elements[4] *= o), + (gi.elements[5] *= o), + (gi.elements[6] *= s), + (gi.elements[7] *= s), + (gi.elements[8] *= s), + this.rotation.multiply(gi), + (this.halfSize.x *= n), + (this.halfSize.y *= r), + (this.halfSize.z *= i), + pi.setFromMatrixPosition(e), + this.center.add(pi), + this + ); + }, + }, + ]), + e + ); + })(), + Ei = new Si(), + _i = new A.Vector3(), + Ci = new A.Vector3(), + wi = new A.Vector3(), + Ti = 1e-10, + Mi = (function () { + function e() { + var t = + arguments.length > 0 && void 0 !== arguments[0] + ? arguments[0] + : new A.Vector3(0, 0, 0), + n = + arguments.length > 1 && void 0 !== arguments[1] + ? arguments[1] + : new A.Vector3(0, 1, 0), + r = + arguments.length > 2 && void 0 !== arguments[2] + ? arguments[2] + : 1; + (0, p.Z)(this, e), + (this.start = t), + (this.end = n), + (this.radius = r); + } + return ( + (0, v.Z)(e, [ + { + key: "clone", + value: function () { + return new e( + this.start.clone(), + this.end.clone(), + this.radius + ); + }, + }, + { + key: "set", + value: function (e, t, n) { + this.start.copy(e), this.end.copy(t), (this.radius = n); + }, + }, + { + key: "copy", + value: function (e) { + this.start.copy(e.start), + this.end.copy(e.end), + (this.radius = e.radius); + }, + }, + { + key: "getCenter", + value: function (e) { + return e.copy(this.end).add(this.start).multiplyScalar(0.5); + }, + }, + { + key: "translate", + value: function (e) { + this.start.add(e), this.end.add(e); + }, + }, + { + key: "checkAABBAxis", + value: function (e, t, n, r, i, a, o, s, l) { + return ( + (i - e < l || i - n < l) && + (e - a < l || n - a < l) && + (o - t < l || o - r < l) && + (t - s < l || r - s < l) + ); + }, + }, + { + key: "intersectsBox", + value: function (e) { + return ( + this.checkAABBAxis( + this.start.x, + this.start.y, + this.end.x, + this.end.y, + e.min.x, + e.max.x, + e.min.y, + e.max.y, + this.radius + ) && + this.checkAABBAxis( + this.start.x, + this.start.z, + this.end.x, + this.end.z, + e.min.x, + e.max.x, + e.min.z, + e.max.z, + this.radius + ) && + this.checkAABBAxis( + this.start.y, + this.start.z, + this.end.y, + this.end.z, + e.min.y, + e.max.y, + e.min.z, + e.max.z, + this.radius + ) + ); + }, + }, + { + key: "lineLineMinimumPoints", + value: function (e, t) { + var n, + r, + i = _i.copy(e.end).sub(e.start), + a = Ci.copy(t.end).sub(t.start), + o = wi.copy(t.start).sub(e.start), + s = i.dot(a), + l = i.dot(i), + u = a.dot(a), + c = a.dot(o), + f = i.dot(o), + d = l * u - s * s; + if (Math.abs(d) < Ti) { + var h = -c / u, + p = (s - c) / u; + Math.abs(h - 0.5) < Math.abs(p - 0.5) + ? ((n = 0), (r = h)) + : ((n = 1), (r = p)); + } else r = ((n = (c * s + f * u) / d) * s - c) / u; + return ( + (r = Math.max(0, Math.min(1, r))), + (n = Math.max(0, Math.min(1, n))), + [ + i.multiplyScalar(n).add(e.start), + a.multiplyScalar(r).add(t.start), + ] + ); + }, + }, + ]), + e + ); + })(), + Ii = {}, + ki = null; + function Ri() { + for ( + var e = [ + 151, 160, 137, 91, 90, 15, 131, 13, 201, 95, 96, 53, 194, 233, + 7, 225, 140, 36, 103, 30, 69, 142, 8, 99, 37, 240, 21, 10, 23, + 190, 6, 148, 247, 120, 234, 75, 0, 26, 197, 62, 94, 252, 219, + 203, 117, 35, 11, 32, 57, 177, 33, 88, 237, 149, 56, 87, 174, + 20, 125, 136, 171, 168, 68, 175, 74, 165, 71, 134, 139, 48, 27, + 166, 77, 146, 158, 231, 83, 111, 229, 122, 60, 211, 133, 230, + 220, 105, 92, 41, 55, 46, 245, 40, 244, 102, 143, 54, 65, 25, + 63, 161, 1, 216, 80, 73, 209, 76, 132, 187, 208, 89, 18, 169, + 200, 196, 135, 130, 116, 188, 159, 86, 164, 100, 109, 198, 173, + 186, 3, 64, 52, 217, 226, 250, 124, 123, 5, 202, 38, 147, 118, + 126, 255, 82, 85, 212, 207, 206, 59, 227, 47, 16, 58, 17, 182, + 189, 28, 42, 223, 183, 170, 213, 119, 248, 152, 2, 44, 154, 163, + 70, 221, 153, 101, 155, 167, 43, 172, 9, 129, 22, 39, 253, 19, + 98, 108, 110, 79, 113, 224, 232, 178, 185, 112, 104, 218, 246, + 97, 228, 251, 34, 242, 193, 238, 210, 144, 12, 191, 179, 162, + 241, 81, 51, 145, 235, 249, 14, 239, 107, 49, 192, 214, 31, 181, + 199, 106, 157, 184, 84, 204, 176, 115, 121, 50, 45, 127, 4, 150, + 254, 138, 236, 205, 93, 222, 114, 67, 29, 24, 72, 243, 141, 128, + 195, 78, 66, 215, 61, 156, 180, + ], + t = 0; + t < 256; + t++ + ) + e[256 + t] = e[t]; + return e; + } + var Bi = null; + function Pi(e) { + return e * e * e * (e * (6 * e - 15) + 10); + } + function Li(e, t, n) { + return t + e * (n - t); + } + function Di(e, t, n, r) { + var i = 15 & e, + a = i < 8 ? t : n, + o = i < 4 ? n : 12 == i || 14 == i ? t : r; + return (0 == (1 & i) ? a : -a) + (0 == (2 & i) ? o : -o); + } + var Ui = null, + Fi = new A.Vector3(), + Oi = new A.Vector3(), + Ni = new A.Plane(), + Gi = new A.Line3(), + Zi = new A.Line3(), + zi = new A.Sphere(), + Qi = new Mi(), + Hi = null, + Vi = null, + ji = { + rainbow: [ + [0, 255], + [0.2, 65535], + [0.5, 65280], + [0.8, 16776960], + [1, 16711680], + ], + cooltowarm: [ + [0, 3952322], + [0.2, 10206463], + [0.5, 14474460], + [0.8, 16163717], + [1, 11797542], + ], + blackbody: [ + [0, 0], + [0.2, 7864320], + [0.5, 15086080], + [0.8, 16776960], + [1, 16777215], + ], + grayscale: [ + [0, 0], + [0.2, 4210752], + [0.5, 8355712], + [0.8, 12566463], + [1, 16777215], + ], + }, + Wi = { + NONE: -1, + ROTATE: 0, + DOLLY: 1, + PAN: 2, + TOUCH_ROTATE: 3, + TOUCH_PAN: 4, + TOUCH_DOLLY_PAN: 5, + TOUCH_DOLLY_ROTATE: 6, + }, + Xi = null, + Yi = null, + qi = null, + Ji = null, + Ki = new A.Vector3(), + $i = null, + ea = null, + ta = null, + na = null, + ra = null, + ia = new A.Euler(0, 0, 0, "YXZ"), + aa = new A.Vector3(), + oa = { type: "change" }, + sa = { type: "lock" }, + la = { type: "unlock" }, + ua = Math.PI / 2, + ca = null, + fa = null, + da = null, + ha = new A.Ray(), + pa = new A.Plane(), + va = Math.cos((Math.PI / 180) * 70), + ma = function (e, t) { + return ((e % t) + t) % t; + }, + ga = (function (e) { + (0, m.Z)(n, e); + var t = (0, g.Z)(n); + function n(e, r) { + var i; + (0, p.Z)(this, n), + (i = t.call(this)), + M((0, f.Z)(i), "object"), + M((0, f.Z)(i), "domElement"), + M((0, f.Z)(i), "enabled", !0), + M((0, f.Z)(i), "target", new A.Vector3()), + M((0, f.Z)(i), "minDistance", 0), + M((0, f.Z)(i), "maxDistance", 1 / 0), + M((0, f.Z)(i), "minZoom", 0), + M((0, f.Z)(i), "maxZoom", 1 / 0), + M((0, f.Z)(i), "minPolarAngle", 0), + M((0, f.Z)(i), "maxPolarAngle", Math.PI), + M((0, f.Z)(i), "minAzimuthAngle", -1 / 0), + M((0, f.Z)(i), "maxAzimuthAngle", 1 / 0), + M((0, f.Z)(i), "enableDamping", !1), + M((0, f.Z)(i), "dampingFactor", 0.05), + M((0, f.Z)(i), "enableZoom", !0), + M((0, f.Z)(i), "zoomSpeed", 1), + M((0, f.Z)(i), "enableRotate", !0), + M((0, f.Z)(i), "rotateSpeed", 1), + M((0, f.Z)(i), "enablePan", !0), + M((0, f.Z)(i), "panSpeed", 1), + M((0, f.Z)(i), "screenSpacePanning", !0), + M((0, f.Z)(i), "keyPanSpeed", 7), + M((0, f.Z)(i), "zoomToCursor", !1), + M((0, f.Z)(i), "autoRotate", !1), + M((0, f.Z)(i), "autoRotateSpeed", 2), + M((0, f.Z)(i), "reverseOrbit", !1), + M((0, f.Z)(i), "reverseHorizontalOrbit", !1), + M((0, f.Z)(i), "reverseVerticalOrbit", !1), + M((0, f.Z)(i), "keys", { + LEFT: "ArrowLeft", + UP: "ArrowUp", + RIGHT: "ArrowRight", + BOTTOM: "ArrowDown", + }), + M((0, f.Z)(i), "mouseButtons", { + LEFT: A.MOUSE.ROTATE, + MIDDLE: A.MOUSE.DOLLY, + RIGHT: A.MOUSE.PAN, + }), + M((0, f.Z)(i), "touches", { + ONE: A.TOUCH.ROTATE, + TWO: A.TOUCH.DOLLY_PAN, + }), + M((0, f.Z)(i), "target0"), + M((0, f.Z)(i), "position0"), + M((0, f.Z)(i), "zoom0"), + M((0, f.Z)(i), "_domElementKeyEvents", null), + M((0, f.Z)(i), "getPolarAngle"), + M((0, f.Z)(i), "getAzimuthalAngle"), + M((0, f.Z)(i), "setPolarAngle"), + M((0, f.Z)(i), "setAzimuthalAngle"), + M((0, f.Z)(i), "getDistance"), + M((0, f.Z)(i), "listenToKeyEvents"), + M((0, f.Z)(i), "stopListenToKeyEvents"), + M((0, f.Z)(i), "saveState"), + M((0, f.Z)(i), "reset"), + M((0, f.Z)(i), "update"), + M((0, f.Z)(i), "connect"), + M((0, f.Z)(i), "dispose"), + (i.object = e), + (i.domElement = r), + (i.target0 = i.target.clone()), + (i.position0 = i.object.position.clone()), + (i.zoom0 = i.object.zoom), + (i.getPolarAngle = function () { + return h.phi; + }), + (i.getAzimuthalAngle = function () { + return h.theta; + }), + (i.setPolarAngle = function (e) { + var t = ma(e, 2 * Math.PI), + n = h.phi; + n < 0 && (n += 2 * Math.PI), t < 0 && (t += 2 * Math.PI); + var r = Math.abs(t - n); + 2 * Math.PI - r < r && + (t < n ? (t += 2 * Math.PI) : (n += 2 * Math.PI)), + (v.phi = t - n), + a.update(); + }), + (i.setAzimuthalAngle = function (e) { + var t = ma(e, 2 * Math.PI), + n = h.theta; + n < 0 && (n += 2 * Math.PI), t < 0 && (t += 2 * Math.PI); + var r = Math.abs(t - n); + 2 * Math.PI - r < r && + (t < n ? (t += 2 * Math.PI) : (n += 2 * Math.PI)), + (v.theta = t - n), + a.update(); + }), + (i.getDistance = function () { + return a.object.position.distanceTo(a.target); + }), + (i.listenToKeyEvents = function (e) { + e.addEventListener("keydown", re), + (i._domElementKeyEvents = e); + }), + (i.stopListenToKeyEvents = function () { + i._domElementKeyEvents.removeEventListener("keydown", re), + (i._domElementKeyEvents = null); + }), + (i.saveState = function () { + a.target0.copy(a.target), + a.position0.copy(a.object.position), + (a.zoom0 = a.object.zoom); + }), + (i.reset = function () { + a.target.copy(a.target0), + a.object.position.copy(a.position0), + (a.object.zoom = a.zoom0), + a.object.updateProjectionMatrix(), + a.dispatchEvent(o), + a.update(), + (c = u.NONE); + }), + (i.update = (function () { + var t = new A.Vector3(), + n = new A.Vector3(0, 1, 0), + r = new A.Quaternion().setFromUnitVectors(e.up, n), + i = r.clone().invert(), + s = new A.Vector3(), + l = new A.Quaternion(), + f = 2 * Math.PI; + return function () { + var p = a.object.position; + r.setFromUnitVectors(e.up, n), + i.copy(r).invert(), + t.copy(p).sub(a.target), + t.applyQuaternion(r), + h.setFromVector3(t), + a.autoRotate && + c === u.NONE && + D(((2 * Math.PI) / 60 / 60) * a.autoRotateSpeed), + a.enableDamping + ? ((h.theta += v.theta * a.dampingFactor), + (h.phi += v.phi * a.dampingFactor)) + : ((h.theta += v.theta), (h.phi += v.phi)); + var y = a.minAzimuthAngle, + b = a.maxAzimuthAngle; + isFinite(y) && + isFinite(b) && + (y < -Math.PI ? (y += f) : y > Math.PI && (y -= f), + b < -Math.PI ? (b += f) : b > Math.PI && (b -= f), + (h.theta = + y <= b + ? Math.max(y, Math.min(b, h.theta)) + : h.theta > (y + b) / 2 + ? Math.max(y, h.theta) + : Math.min(b, h.theta))), + (h.phi = Math.max( + a.minPolarAngle, + Math.min(a.maxPolarAngle, h.phi) + )), + h.makeSafe(), + !0 === a.enableDamping + ? a.target.addScaledVector(g, a.dampingFactor) + : a.target.add(g), + (a.zoomToCursor && R) || a.object.isOrthographicCamera + ? (h.radius = Q(h.radius)) + : (h.radius = Q(h.radius * m)), + t.setFromSpherical(h), + t.applyQuaternion(i), + p.copy(a.target).add(t), + a.object.lookAt(a.target), + !0 === a.enableDamping + ? ((v.theta *= 1 - a.dampingFactor), + (v.phi *= 1 - a.dampingFactor), + g.multiplyScalar(1 - a.dampingFactor)) + : (v.set(0, 0, 0), g.set(0, 0, 0)); + var x = !1; + if (a.zoomToCursor && R) { + var S = null; + if ( + a.object instanceof A.PerspectiveCamera && + a.object.isPerspectiveCamera + ) { + var E = t.length(), + _ = E - (S = Q(E * m)); + a.object.position.addScaledVector(I, _), + a.object.updateMatrixWorld(); + } else if (a.object.isOrthographicCamera) { + var C = new A.Vector3(k.x, k.y, 0); + C.unproject(a.object), + (a.object.zoom = Math.max( + a.minZoom, + Math.min(a.maxZoom, a.object.zoom / m) + )), + a.object.updateProjectionMatrix(), + (x = !0); + var w = new A.Vector3(k.x, k.y, 0); + w.unproject(a.object), + a.object.position.sub(w).add(C), + a.object.updateMatrixWorld(), + (S = t.length()); + } else + console.warn( + "WARNING: OrbitControls.js encountered an unknown camera type - zoom to cursor disabled." + ), + (a.zoomToCursor = !1); + null !== S && + (a.screenSpacePanning + ? a.target + .set(0, 0, -1) + .transformDirection(a.object.matrix) + .multiplyScalar(S) + .add(a.object.position) + : (ha.origin.copy(a.object.position), + ha.direction + .set(0, 0, -1) + .transformDirection(a.object.matrix), + Math.abs(a.object.up.dot(ha.direction)) < va + ? e.lookAt(a.target) + : (pa.setFromNormalAndCoplanarPoint( + a.object.up, + a.target + ), + ha.intersectPlane(pa, a.target)))); + } else + a.object instanceof A.OrthographicCamera && + a.object.isOrthographicCamera && + ((a.object.zoom = Math.max( + a.minZoom, + Math.min(a.maxZoom, a.object.zoom / m) + )), + a.object.updateProjectionMatrix(), + (x = !0)); + return ( + (m = 1), + (R = !1), + !!( + x || + s.distanceToSquared(a.object.position) > d || + 8 * (1 - l.dot(a.object.quaternion)) > d + ) && + (a.dispatchEvent(o), + s.copy(a.object.position), + l.copy(a.object.quaternion), + (x = !1), + !0) + ); + }; + })()), + (i.connect = function (e) { + e === document && + console.error( + 'THREE.OrbitControls: "document" should not be used as the target "domElement". Please use "renderer.domElement" instead.' + ), + (a.domElement = e), + (a.domElement.style.touchAction = "none"), + a.domElement.addEventListener("contextmenu", ie), + a.domElement.addEventListener("pointerdown", K), + a.domElement.addEventListener("pointercancel", te), + a.domElement.addEventListener("wheel", ne); + }), + (i.dispose = function () { + var e, t, n, r, i, o; + null == (e = a.domElement) || + e.removeEventListener("contextmenu", ie), + null == (t = a.domElement) || + t.removeEventListener("pointerdown", K), + null == (n = a.domElement) || + n.removeEventListener("pointercancel", te), + null == (r = a.domElement) || + r.removeEventListener("wheel", ne), + null == (i = a.domElement) || + i.removeEventListener("pointermove", $), + null == (o = a.domElement) || + o.removeEventListener("pointerup", ee), + null !== a._domElementKeyEvents && + a._domElementKeyEvents.removeEventListener("keydown", re); + }); + var a = (0, f.Z)(i), + o = { type: "change" }, + s = { type: "start" }, + l = { type: "end" }, + u = { + NONE: -1, + ROTATE: 0, + DOLLY: 1, + PAN: 2, + TOUCH_ROTATE: 3, + TOUCH_PAN: 4, + TOUCH_DOLLY_PAN: 5, + TOUCH_DOLLY_ROTATE: 6, + }, + c = u.NONE, + d = 1e-6, + h = new A.Spherical(), + v = new A.Spherical(), + m = 1, + g = new A.Vector3(), + y = new A.Vector2(), + b = new A.Vector2(), + x = new A.Vector2(), + S = new A.Vector2(), + E = new A.Vector2(), + _ = new A.Vector2(), + C = new A.Vector2(), + w = new A.Vector2(), + T = new A.Vector2(), + I = new A.Vector3(), + k = new A.Vector2(), + R = !1, + B = [], + P = {}; + function L() { + return Math.pow(0.95, a.zoomSpeed); + } + function D(e) { + a.reverseOrbit || a.reverseHorizontalOrbit + ? (v.theta += e) + : (v.theta -= e); + } + function U(e) { + a.reverseOrbit || a.reverseVerticalOrbit + ? (v.phi += e) + : (v.phi -= e); + } + var F = (function () { + var e = new A.Vector3(); + return function (t, n) { + e.setFromMatrixColumn(n, 0), e.multiplyScalar(-t), g.add(e); + }; + })(), + O = (function () { + var e = new A.Vector3(); + return function (t, n) { + !0 === a.screenSpacePanning + ? e.setFromMatrixColumn(n, 1) + : (e.setFromMatrixColumn(n, 0), + e.crossVectors(a.object.up, e)), + e.multiplyScalar(t), + g.add(e); + }; + })(), + N = (function () { + var e = new A.Vector3(); + return function (t, n) { + var r = a.domElement; + if ( + r && + a.object instanceof A.PerspectiveCamera && + a.object.isPerspectiveCamera + ) { + var i = a.object.position; + e.copy(i).sub(a.target); + var o = e.length(); + (o *= Math.tan(((a.object.fov / 2) * Math.PI) / 180)), + F((2 * t * o) / r.clientHeight, a.object.matrix), + O((2 * n * o) / r.clientHeight, a.object.matrix); + } else + r && + a.object instanceof A.OrthographicCamera && + a.object.isOrthographicCamera + ? (F( + (t * (a.object.right - a.object.left)) / + a.object.zoom / + r.clientWidth, + a.object.matrix + ), + O( + (n * (a.object.top - a.object.bottom)) / + a.object.zoom / + r.clientHeight, + a.object.matrix + )) + : (console.warn( + "WARNING: OrbitControls.js encountered an unknown camera type - pan disabled." + ), + (a.enablePan = !1)); + }; + })(); + function G(e) { + (a.object instanceof A.PerspectiveCamera && + a.object.isPerspectiveCamera) || + (a.object instanceof A.OrthographicCamera && + a.object.isOrthographicCamera) + ? (m /= e) + : (console.warn( + "WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled." + ), + (a.enableZoom = !1)); + } + function Z(e) { + (a.object instanceof A.PerspectiveCamera && + a.object.isPerspectiveCamera) || + (a.object instanceof A.OrthographicCamera && + a.object.isOrthographicCamera) + ? (m *= e) + : (console.warn( + "WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled." + ), + (a.enableZoom = !1)); + } + function z(e) { + if (a.zoomToCursor && a.domElement) { + R = !0; + var t = a.domElement.getBoundingClientRect(), + n = e.clientX - t.left, + r = e.clientY - t.top, + i = t.width, + o = t.height; + (k.x = (n / i) * 2 - 1), + (k.y = (-r / o) * 2 + 1), + I.set(k.x, k.y, 1) + .unproject(a.object) + .sub(a.object.position) + .normalize(); + } + } + function Q(e) { + return Math.max(a.minDistance, Math.min(a.maxDistance, e)); + } + function H(e) { + y.set(e.clientX, e.clientY); + } + function V(e) { + S.set(e.clientX, e.clientY); + } + function j() { + if (1 == B.length) y.set(B[0].pageX, B[0].pageY); + else { + var e = 0.5 * (B[0].pageX + B[1].pageX), + t = 0.5 * (B[0].pageY + B[1].pageY); + y.set(e, t); + } + } + function W() { + if (1 == B.length) S.set(B[0].pageX, B[0].pageY); + else { + var e = 0.5 * (B[0].pageX + B[1].pageX), + t = 0.5 * (B[0].pageY + B[1].pageY); + S.set(e, t); + } + } + function X() { + var e = B[0].pageX - B[1].pageX, + t = B[0].pageY - B[1].pageY, + n = Math.sqrt(e * e + t * t); + C.set(0, n); + } + function Y(e) { + if (1 == B.length) b.set(e.pageX, e.pageY); + else { + var t = se(e), + n = 0.5 * (e.pageX + t.x), + r = 0.5 * (e.pageY + t.y); + b.set(n, r); + } + x.subVectors(b, y).multiplyScalar(a.rotateSpeed); + var i = a.domElement; + i && + (D((2 * Math.PI * x.x) / i.clientHeight), + U((2 * Math.PI * x.y) / i.clientHeight)), + y.copy(b); + } + function q(e) { + if (1 == B.length) E.set(e.pageX, e.pageY); + else { + var t = se(e), + n = 0.5 * (e.pageX + t.x), + r = 0.5 * (e.pageY + t.y); + E.set(n, r); + } + _.subVectors(E, S).multiplyScalar(a.panSpeed), + N(_.x, _.y), + S.copy(E); + } + function J(e) { + var t = se(e), + n = e.pageX - t.x, + r = e.pageY - t.y, + i = Math.sqrt(n * n + r * r); + w.set(0, i), + T.set(0, Math.pow(w.y / C.y, a.zoomSpeed)), + G(T.y), + C.copy(w); + } + function K(e) { + var t, n, r; + !1 !== a.enabled && + (0 === B.length && + (null == (t = a.domElement) || + t.setPointerCapture(e.pointerId), + null == (n = a.domElement) || + n.addEventListener("pointermove", $), + null == (r = a.domElement) || + r.addEventListener("pointerup", ee)), + (function (e) { + B.push(e); + })(e), + "touch" === e.pointerType + ? (function (e) { + switch ((oe(e), B.length)) { + case 1: + switch (a.touches.ONE) { + case A.TOUCH.ROTATE: + if (!1 === a.enableRotate) return; + j(), (c = u.TOUCH_ROTATE); + break; + case A.TOUCH.PAN: + if (!1 === a.enablePan) return; + W(), (c = u.TOUCH_PAN); + break; + default: + c = u.NONE; + } + break; + case 2: + switch (a.touches.TWO) { + case A.TOUCH.DOLLY_PAN: + if (!1 === a.enableZoom && !1 === a.enablePan) + return; + a.enableZoom && X(), + a.enablePan && W(), + (c = u.TOUCH_DOLLY_PAN); + break; + case A.TOUCH.DOLLY_ROTATE: + if ( + !1 === a.enableZoom && + !1 === a.enableRotate + ) + return; + a.enableZoom && X(), + a.enableRotate && j(), + (c = u.TOUCH_DOLLY_ROTATE); + break; + default: + c = u.NONE; + } + break; + default: + c = u.NONE; + } + c !== u.NONE && a.dispatchEvent(s); + })(e) + : (function (e) { + var t; + switch (e.button) { + case 0: + t = a.mouseButtons.LEFT; + break; + case 1: + t = a.mouseButtons.MIDDLE; + break; + case 2: + t = a.mouseButtons.RIGHT; + break; + default: + t = -1; + } + switch (t) { + case A.MOUSE.DOLLY: + if (!1 === a.enableZoom) return; + !(function (e) { + z(e), C.set(e.clientX, e.clientY); + })(e), + (c = u.DOLLY); + break; + case A.MOUSE.ROTATE: + if (e.ctrlKey || e.metaKey || e.shiftKey) { + if (!1 === a.enablePan) return; + V(e), (c = u.PAN); + } else { + if (!1 === a.enableRotate) return; + H(e), (c = u.ROTATE); + } + break; + case A.MOUSE.PAN: + if (e.ctrlKey || e.metaKey || e.shiftKey) { + if (!1 === a.enableRotate) return; + H(e), (c = u.ROTATE); + } else { + if (!1 === a.enablePan) return; + V(e), (c = u.PAN); + } + break; + default: + c = u.NONE; + } + c !== u.NONE && a.dispatchEvent(s); + })(e)); + } + function $(e) { + !1 !== a.enabled && + ("touch" === e.pointerType + ? (function (e) { + switch ((oe(e), c)) { + case u.TOUCH_ROTATE: + if (!1 === a.enableRotate) return; + Y(e), a.update(); + break; + case u.TOUCH_PAN: + if (!1 === a.enablePan) return; + q(e), a.update(); + break; + case u.TOUCH_DOLLY_PAN: + if (!1 === a.enableZoom && !1 === a.enablePan) + return; + !(function (e) { + a.enableZoom && J(e), a.enablePan && q(e); + })(e), + a.update(); + break; + case u.TOUCH_DOLLY_ROTATE: + if (!1 === a.enableZoom && !1 === a.enableRotate) + return; + !(function (e) { + a.enableZoom && J(e), a.enableRotate && Y(e); + })(e), + a.update(); + break; + default: + c = u.NONE; + } + })(e) + : (function (e) { + if (!1 === a.enabled) return; + switch (c) { + case u.ROTATE: + if (!1 === a.enableRotate) return; + !(function (e) { + b.set(e.clientX, e.clientY), + x + .subVectors(b, y) + .multiplyScalar(a.rotateSpeed); + var t = a.domElement; + t && + (D((2 * Math.PI * x.x) / t.clientHeight), + U((2 * Math.PI * x.y) / t.clientHeight)), + y.copy(b), + a.update(); + })(e); + break; + case u.DOLLY: + if (!1 === a.enableZoom) return; + !(function (e) { + w.set(e.clientX, e.clientY), + T.subVectors(w, C), + T.y > 0 ? G(L()) : T.y < 0 && Z(L()), + C.copy(w), + a.update(); + })(e); + break; + case u.PAN: + if (!1 === a.enablePan) return; + !(function (e) { + E.set(e.clientX, e.clientY), + _.subVectors(E, S).multiplyScalar(a.panSpeed), + N(_.x, _.y), + S.copy(E), + a.update(); + })(e); + } + })(e)); + } + function ee(e) { + var t, n, r; + ae(e), + 0 === B.length && + (null == (t = a.domElement) || + t.releasePointerCapture(e.pointerId), + null == (n = a.domElement) || + n.removeEventListener("pointermove", $), + null == (r = a.domElement) || + r.removeEventListener("pointerup", ee)), + a.dispatchEvent(l), + (c = u.NONE); + } + function te(e) { + ae(e); + } + function ne(e) { + !1 === a.enabled || + !1 === a.enableZoom || + (c !== u.NONE && c !== u.ROTATE) || + (e.preventDefault(), + a.dispatchEvent(s), + (function (e) { + z(e), + e.deltaY < 0 ? Z(L()) : e.deltaY > 0 && G(L()), + a.update(); + })(e), + a.dispatchEvent(l)); + } + function re(e) { + !1 !== a.enabled && + !1 !== a.enablePan && + (function (e) { + var t = !1; + switch (e.code) { + case a.keys.UP: + N(0, a.keyPanSpeed), (t = !0); + break; + case a.keys.BOTTOM: + N(0, -a.keyPanSpeed), (t = !0); + break; + case a.keys.LEFT: + N(a.keyPanSpeed, 0), (t = !0); + break; + case a.keys.RIGHT: + N(-a.keyPanSpeed, 0), (t = !0); + } + t && (e.preventDefault(), a.update()); + })(e); + } + function ie(e) { + !1 !== a.enabled && e.preventDefault(); + } + function ae(e) { + delete P[e.pointerId]; + for (var t = 0; t < B.length; t++) + if (B[t].pointerId == e.pointerId) return void B.splice(t, 1); + } + function oe(e) { + var t = P[e.pointerId]; + void 0 === t && ((t = new A.Vector2()), (P[e.pointerId] = t)), + t.set(e.pageX, e.pageY); + } + function se(e) { + var t = e.pointerId === B[0].pointerId ? B[1] : B[0]; + return P[t.pointerId]; + } + return void 0 !== r && i.connect(r), i.update(), i; + } + return (0, v.Z)(n); + })(A.EventDispatcher), + Aa = null, + ya = { + IDLE: Symbol(), + ROTATE: Symbol(), + PAN: Symbol(), + SCALE: Symbol(), + FOV: Symbol(), + FOCUS: Symbol(), + ZROTATE: Symbol(), + TOUCH_MULTI: Symbol(), + ANIMATION_FOCUS: Symbol(), + ANIMATION_ROTATE: Symbol(), + }, + ba = { + NONE: Symbol(), + ONE_FINGER: Symbol(), + ONE_FINGER_SWITCHED: Symbol(), + TWO_FINGER: Symbol(), + MULT_FINGER: Symbol(), + CURSOR: Symbol(), + }, + xa = { x: 0, y: 0 }, + Sa = { camera: new A.Matrix4(), gizmos: new A.Matrix4() }, + Ea = { type: "change" }, + _a = { type: "start" }, + Ca = { type: "end" }, + wa = null; + function Ta(e) { + e.preventDefault(); + } + var Ma = null, + Ia = (function () { + function e() { + (0, p.Z)(this, e), + M(this, "enabled", !0), + M(this, "needsSwap", !0), + M(this, "clear", !1), + M(this, "renderToScreen", !1); + } + return ( + (0, v.Z)(e, [ + { key: "setSize", value: function (e, t) {} }, + { + key: "render", + value: function (e, t, n, r, i) { + console.error( + "THREE.Pass: .render() must be implemented in derived pass." + ); + }, + }, + ]), + e + ); + })(), + ka = (function () { + function e(t) { + (0, p.Z)(this, e), + M(this, "camera", new A.OrthographicCamera(-1, 1, 1, -1, 0, 1)), + M(this, "geometry", new A.PlaneGeometry(2, 2)), + M(this, "mesh"), + (this.mesh = new A.Mesh(this.geometry, t)); + } + return ( + (0, v.Z)(e, [ + { + key: "material", + get: function () { + return this.mesh.material; + }, + set: function (e) { + this.mesh.material = e; + }, + }, + { + key: "dispose", + value: function () { + this.mesh.geometry.dispose(); + }, + }, + { + key: "render", + value: function (e) { + e.render(this.mesh, this.camera); + }, + }, + ]), + e + ); + })(), + Ra = null, + Ba = { + defines: { USE_3DTEXTURE: 1 }, + uniforms: { + lut3d: { value: null }, + lut: { value: null }, + lutSize: { value: 0 }, + tDiffuse: { value: null }, + intensity: { value: 1 }, + }, + vertexShader: + "\n\n\t\tvarying vec2 vUv;\n\n\t\tvoid main() {\n\n\t\t\tvUv = uv;\n\t\t\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n\n\t\t}\n\n\t", + fragmentShader: + "\n\n\t\tuniform float lutSize;\n\t\t#if USE_3DTEXTURE\n\t\tprecision highp sampler3D;\n\t\tuniform sampler3D lut3d;\n\t\t#else\n\t\tuniform sampler2D lut;\n\n\t\tvec3 lutLookup( sampler2D tex, float size, vec3 rgb ) {\n\n\t\t\tfloat sliceHeight = 1.0 / size;\n\t\t\tfloat yPixelHeight = 1.0 / ( size * size );\n\n\t\t\t// Get the slices on either side of the sample\n\t\t\tfloat slice = rgb.b * size;\n\t\t\tfloat interp = fract( slice );\n\t\t\tfloat slice0 = slice - interp;\n\t\t\tfloat centeredInterp = interp - 0.5;\n\n\t\t\tfloat slice1 = slice0 + sign( centeredInterp );\n\n\t\t\t// Pull y sample in by half a pixel in each direction to avoid color\n\t\t\t// bleeding from adjacent slices.\n\t\t\tfloat greenOffset = clamp( rgb.g * sliceHeight, yPixelHeight * 0.5, sliceHeight - yPixelHeight * 0.5 );\n\n\t\t\tvec2 uv0 = vec2(\n\t\t\t\trgb.r,\n\t\t\t\tslice0 * sliceHeight + greenOffset\n\t\t\t);\n\t\t\tvec2 uv1 = vec2(\n\t\t\t\trgb.r,\n\t\t\t\tslice1 * sliceHeight + greenOffset\n\t\t\t);\n\n\t\t\tvec3 sample0 = texture2D( tex, uv0 ).rgb;\n\t\t\tvec3 sample1 = texture2D( tex, uv1 ).rgb;\n\n\t\t\treturn mix( sample0, sample1, abs( centeredInterp ) );\n\n\t\t}\n\t\t#endif\n\n\t\tvarying vec2 vUv;\n\t\tuniform float intensity;\n\t\tuniform sampler2D tDiffuse;\n\t\tvoid main() {\n\n\t\t\tvec4 val = texture2D( tDiffuse, vUv );\n\t\t\tvec4 lutVal;\n\n\t\t\t// pull the sample in by half a pixel so the sample begins\n\t\t\t// at the center of the edge pixels.\n\t\t\tfloat pixelWidth = 1.0 / lutSize;\n\t\t\tfloat halfPixelWidth = 0.5 / lutSize;\n\t\t\tvec3 uvw = vec3( halfPixelWidth ) + val.rgb * ( 1.0 - pixelWidth );\n\n\t\t\t#if USE_3DTEXTURE\n\n\t\t\tlutVal = vec4( texture( lut3d, uvw ).rgb, val.a );\n\n\t\t\t#else\n\n\t\t\tlutVal = vec4( lutLookup( lut, lutSize, uvw ), val.a );\n\n\t\t\t#endif\n\n\t\t\tgl_FragColor = vec4( mix( val, lutVal, intensity ) );\n\n\t\t}\n\n\t", + }, + Pa = null, + La = null, + Da = { + uniforms: { + tDiffuse: { value: null }, + tDisp: { value: null }, + byp: { value: 0 }, + amount: { value: 0.08 }, + angle: { value: 0.02 }, + seed: { value: 0.02 }, + seed_x: { value: 0.02 }, + seed_y: { value: 0.02 }, + distortion_x: { value: 0.5 }, + distortion_y: { value: 0.6 }, + col_s: { value: 0.05 }, + }, + vertexShader: + "varying vec2 vUv;\n void main() {\n \t vUv = uv;\n \t gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n }", + fragmentShader: + "uniform int byp; //should we apply the glitch ?\n uniform sampler2D tDiffuse;\n uniform sampler2D tDisp;\n uniform float amount;\n uniform float angle;\n uniform float seed;\n uniform float seed_x;\n uniform float seed_y;\n uniform float distortion_x;\n uniform float distortion_y;\n uniform float col_s;\n\n varying vec2 vUv;\n\n float rand(vec2 co){\n \t return fract(sin(dot(co.xy ,vec2(12.9898,78.233))) * 43758.5453);\n }\n\n void main() {\n \tif(byp<1) {\n \t\tvec2 p = vUv;\n \t\tfloat xs = floor(gl_FragCoord.x / 0.5);\n \t\tfloat ys = floor(gl_FragCoord.y / 0.5);\n //based on staffantans glitch shader for unity https://github.com/staffantan/unityglitch\n \t\tvec4 normal = texture2D (tDisp, p*seed*seed);\n \t\tif(p.ydistortion_x-col_s*seed) {\n \t\t\tif(seed_x>0.){\n \t\t\t\tp.y = 1. - (p.y + distortion_y);\n \t\t\t}\n \t\t\telse {\n \t\t\t\tp.y = distortion_y;\n \t\t\t}\n \t\t}\n \t\tif(p.xdistortion_y-col_s*seed) {\n \t\t\tif(seed_y>0.){\n \t\t\t\tp.x=distortion_x;\n \t\t\t}\n \t\t\telse {\n \t\t\t\tp.x = 1. - (p.x + distortion_x);\n \t\t\t}\n \t\t}\n \t\tp.x+=normal.x*seed_x*(seed/5.);\n \t\tp.y+=normal.y*seed_y*(seed/5.);\n //base from RGB shift shader\n \t\tvec2 offset = amount * vec2( cos(angle), sin(angle));\n \t\tvec4 cr = texture2D(tDiffuse, p + offset);\n \t\tvec4 cga = texture2D(tDiffuse, p);\n \t\tvec4 cb = texture2D(tDiffuse, p - offset);\n \t\tgl_FragColor = vec4(cr.r, cga.g, cb.b, cga.a);\n //add noise\n \t\tvec4 snow = 200.*amount*vec4(rand(vec2(xs * seed,ys * seed*50.))*0.2);\n \t\tgl_FragColor = gl_FragColor+ snow;\n \t}\n \telse {\n \t\tgl_FragColor=texture2D (tDiffuse, vUv);\n \t}\n }", + }, + Ua = null, + Fa = { + uniforms: { + tDiffuse: { value: null }, + shape: { value: 1 }, + radius: { value: 4 }, + rotateR: { value: (Math.PI / 12) * 1 }, + rotateG: { value: (Math.PI / 12) * 2 }, + rotateB: { value: (Math.PI / 12) * 3 }, + scatter: { value: 0 }, + width: { value: 1 }, + height: { value: 1 }, + blending: { value: 1 }, + blendingMode: { value: 1 }, + greyscale: { value: !1 }, + disable: { value: !1 }, + }, + vertexShader: [ + "varying vec2 vUV;", + "void main() {", + "\tvUV = uv;", + "\tgl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);", + "}", + ].join("\n"), + fragmentShader: [ + "#define SQRT2_MINUS_ONE 0.41421356", + "#define SQRT2_HALF_MINUS_ONE 0.20710678", + "#define PI2 6.28318531", + "#define SHAPE_DOT 1", + "#define SHAPE_ELLIPSE 2", + "#define SHAPE_LINE 3", + "#define SHAPE_SQUARE 4", + "#define BLENDING_LINEAR 1", + "#define BLENDING_MULTIPLY 2", + "#define BLENDING_ADD 3", + "#define BLENDING_LIGHTER 4", + "#define BLENDING_DARKER 5", + "uniform sampler2D tDiffuse;", + "uniform float radius;", + "uniform float rotateR;", + "uniform float rotateG;", + "uniform float rotateB;", + "uniform float scatter;", + "uniform float width;", + "uniform float height;", + "uniform int shape;", + "uniform bool disable;", + "uniform float blending;", + "uniform int blendingMode;", + "varying vec2 vUV;", + "uniform bool greyscale;", + "const int samples = 8;", + "float blend( float a, float b, float t ) {", + "\treturn a * ( 1.0 - t ) + b * t;", + "}", + "float hypot( float x, float y ) {", + "\treturn sqrt( x * x + y * y );", + "}", + "float rand( vec2 seed ){", + "return fract( sin( dot( seed.xy, vec2( 12.9898, 78.233 ) ) ) * 43758.5453 );", + "}", + "float distanceToDotRadius( float channel, vec2 coord, vec2 normal, vec2 p, float angle, float rad_max ) {", + "\tfloat dist = hypot( coord.x - p.x, coord.y - p.y );", + "\tfloat rad = channel;", + "\tif ( shape == SHAPE_DOT ) {", + "\t\trad = pow( abs( rad ), 1.125 ) * rad_max;", + "\t} else if ( shape == SHAPE_ELLIPSE ) {", + "\t\trad = pow( abs( rad ), 1.125 ) * rad_max;", + "\t\tif ( dist != 0.0 ) {", + "\t\t\tfloat dot_p = abs( ( p.x - coord.x ) / dist * normal.x + ( p.y - coord.y ) / dist * normal.y );", + "\t\t\tdist = ( dist * ( 1.0 - SQRT2_HALF_MINUS_ONE ) ) + dot_p * dist * SQRT2_MINUS_ONE;", + "\t\t}", + "\t} else if ( shape == SHAPE_LINE ) {", + "\t\trad = pow( abs( rad ), 1.5) * rad_max;", + "\t\tfloat dot_p = ( p.x - coord.x ) * normal.x + ( p.y - coord.y ) * normal.y;", + "\t\tdist = hypot( normal.x * dot_p, normal.y * dot_p );", + "\t} else if ( shape == SHAPE_SQUARE ) {", + "\t\tfloat theta = atan( p.y - coord.y, p.x - coord.x ) - angle;", + "\t\tfloat sin_t = abs( sin( theta ) );", + "\t\tfloat cos_t = abs( cos( theta ) );", + "\t\trad = pow( abs( rad ), 1.4 );", + "\t\trad = rad_max * ( rad + ( ( sin_t > cos_t ) ? rad - sin_t * rad : rad - cos_t * rad ) );", + "\t}", + "\treturn rad - dist;", + "}", + "struct Cell {", + "\tvec2 normal;", + "\tvec2 p1;", + "\tvec2 p2;", + "\tvec2 p3;", + "\tvec2 p4;", + "\tfloat samp2;", + "\tfloat samp1;", + "\tfloat samp3;", + "\tfloat samp4;", + "};", + "vec4 getSample( vec2 point ) {", + "\tvec4 tex = texture2D( tDiffuse, vec2( point.x / width, point.y / height ) );", + "\tfloat base = rand( vec2( floor( point.x ), floor( point.y ) ) ) * PI2;", + "\tfloat step = PI2 / float( samples );", + "\tfloat dist = radius * 0.66;", + "\tfor ( int i = 0; i < samples; ++i ) {", + "\t\tfloat r = base + step * float( i );", + "\t\tvec2 coord = point + vec2( cos( r ) * dist, sin( r ) * dist );", + "\t\ttex += texture2D( tDiffuse, vec2( coord.x / width, coord.y / height ) );", + "\t}", + "\ttex /= float( samples ) + 1.0;", + "\treturn tex;", + "}", + "float getDotColour( Cell c, vec2 p, int channel, float angle, float aa ) {", + "\tfloat dist_c_1, dist_c_2, dist_c_3, dist_c_4, res;", + "\tif ( channel == 0 ) {", + "\t\tc.samp1 = getSample( c.p1 ).r;", + "\t\tc.samp2 = getSample( c.p2 ).r;", + "\t\tc.samp3 = getSample( c.p3 ).r;", + "\t\tc.samp4 = getSample( c.p4 ).r;", + "\t} else if (channel == 1) {", + "\t\tc.samp1 = getSample( c.p1 ).g;", + "\t\tc.samp2 = getSample( c.p2 ).g;", + "\t\tc.samp3 = getSample( c.p3 ).g;", + "\t\tc.samp4 = getSample( c.p4 ).g;", + "\t} else {", + "\t\tc.samp1 = getSample( c.p1 ).b;", + "\t\tc.samp3 = getSample( c.p3 ).b;", + "\t\tc.samp2 = getSample( c.p2 ).b;", + "\t\tc.samp4 = getSample( c.p4 ).b;", + "\t}", + "\tdist_c_1 = distanceToDotRadius( c.samp1, c.p1, c.normal, p, angle, radius );", + "\tdist_c_2 = distanceToDotRadius( c.samp2, c.p2, c.normal, p, angle, radius );", + "\tdist_c_3 = distanceToDotRadius( c.samp3, c.p3, c.normal, p, angle, radius );", + "\tdist_c_4 = distanceToDotRadius( c.samp4, c.p4, c.normal, p, angle, radius );", + "\tres = ( dist_c_1 > 0.0 ) ? clamp( dist_c_1 / aa, 0.0, 1.0 ) : 0.0;", + "\tres += ( dist_c_2 > 0.0 ) ? clamp( dist_c_2 / aa, 0.0, 1.0 ) : 0.0;", + "\tres += ( dist_c_3 > 0.0 ) ? clamp( dist_c_3 / aa, 0.0, 1.0 ) : 0.0;", + "\tres += ( dist_c_4 > 0.0 ) ? clamp( dist_c_4 / aa, 0.0, 1.0 ) : 0.0;", + "\tres = clamp( res, 0.0, 1.0 );", + "\treturn res;", + "}", + "Cell getReferenceCell( vec2 p, vec2 origin, float grid_angle, float step ) {", + "\tCell c;", + "\tvec2 n = vec2( cos( grid_angle ), sin( grid_angle ) );", + "\tfloat threshold = step * 0.5;", + "\tfloat dot_normal = n.x * ( p.x - origin.x ) + n.y * ( p.y - origin.y );", + "\tfloat dot_line = -n.y * ( p.x - origin.x ) + n.x * ( p.y - origin.y );", + "\tvec2 offset = vec2( n.x * dot_normal, n.y * dot_normal );", + "\tfloat offset_normal = mod( hypot( offset.x, offset.y ), step );", + "\tfloat normal_dir = ( dot_normal < 0.0 ) ? 1.0 : -1.0;", + "\tfloat normal_scale = ( ( offset_normal < threshold ) ? -offset_normal : step - offset_normal ) * normal_dir;", + "\tfloat offset_line = mod( hypot( ( p.x - offset.x ) - origin.x, ( p.y - offset.y ) - origin.y ), step );", + "\tfloat line_dir = ( dot_line < 0.0 ) ? 1.0 : -1.0;", + "\tfloat line_scale = ( ( offset_line < threshold ) ? -offset_line : step - offset_line ) * line_dir;", + "\tc.normal = n;", + "\tc.p1.x = p.x - n.x * normal_scale + n.y * line_scale;", + "\tc.p1.y = p.y - n.y * normal_scale - n.x * line_scale;", + "\tif ( scatter != 0.0 ) {", + "\t\tfloat off_mag = scatter * threshold * 0.5;", + "\t\tfloat off_angle = rand( vec2( floor( c.p1.x ), floor( c.p1.y ) ) ) * PI2;", + "\t\tc.p1.x += cos( off_angle ) * off_mag;", + "\t\tc.p1.y += sin( off_angle ) * off_mag;", + "\t}", + "\tfloat normal_step = normal_dir * ( ( offset_normal < threshold ) ? step : -step );", + "\tfloat line_step = line_dir * ( ( offset_line < threshold ) ? step : -step );", + "\tc.p2.x = c.p1.x - n.x * normal_step;", + "\tc.p2.y = c.p1.y - n.y * normal_step;", + "\tc.p3.x = c.p1.x + n.y * line_step;", + "\tc.p3.y = c.p1.y - n.x * line_step;", + "\tc.p4.x = c.p1.x - n.x * normal_step + n.y * line_step;", + "\tc.p4.y = c.p1.y - n.y * normal_step - n.x * line_step;", + "\treturn c;", + "}", + "float blendColour( float a, float b, float t ) {", + "\tif ( blendingMode == BLENDING_LINEAR ) {", + "\t\treturn blend( a, b, 1.0 - t );", + "\t} else if ( blendingMode == BLENDING_ADD ) {", + "\t\treturn blend( a, min( 1.0, a + b ), t );", + "\t} else if ( blendingMode == BLENDING_MULTIPLY ) {", + "\t\treturn blend( a, max( 0.0, a * b ), t );", + "\t} else if ( blendingMode == BLENDING_LIGHTER ) {", + "\t\treturn blend( a, max( a, b ), t );", + "\t} else if ( blendingMode == BLENDING_DARKER ) {", + "\t\treturn blend( a, min( a, b ), t );", + "\t} else {", + "\t\treturn blend( a, b, 1.0 - t );", + "\t}", + "}", + "void main() {", + "\tif ( ! disable ) {", + "\t\tvec2 p = vec2( vUV.x * width, vUV.y * height );", + "\t\tvec2 origin = vec2( 0, 0 );", + "\t\tfloat aa = ( radius < 2.5 ) ? radius * 0.5 : 1.25;", + "\t\tCell cell_r = getReferenceCell( p, origin, rotateR, radius );", + "\t\tCell cell_g = getReferenceCell( p, origin, rotateG, radius );", + "\t\tCell cell_b = getReferenceCell( p, origin, rotateB, radius );", + "\t\tfloat r = getDotColour( cell_r, p, 0, rotateR, aa );", + "\t\tfloat g = getDotColour( cell_g, p, 1, rotateG, aa );", + "\t\tfloat b = getDotColour( cell_b, p, 2, rotateB, aa );", + "\t\tvec4 colour = texture2D( tDiffuse, vUV );", + "\t\tr = blendColour( r, colour.r, blending );", + "\t\tg = blendColour( g, colour.g, blending );", + "\t\tb = blendColour( b, colour.b, blending );", + "\t\tif ( greyscale ) {", + "\t\t\tr = g = b = (r + b + g) / 3.0;", + "\t\t}", + "\t\tgl_FragColor = vec4( r, g, b, 1.0 );", + "\t} else {", + "\t\tgl_FragColor = texture2D( tDiffuse, vUV );", + "\t}", + "}", + ].join("\n"), + }, + Oa = null, + Na = { + defines: { SMAA_THRESHOLD: "0.1" }, + uniforms: { + tDiffuse: { value: null }, + resolution: { value: new A.Vector2(1 / 1024, 1 / 512) }, + }, + vertexShader: [ + "uniform vec2 resolution;", + "varying vec2 vUv;", + "varying vec4 vOffset[ 3 ];", + "void SMAAEdgeDetectionVS( vec2 texcoord ) {", + "\tvOffset[ 0 ] = texcoord.xyxy + resolution.xyxy * vec4( -1.0, 0.0, 0.0, 1.0 );", + "\tvOffset[ 1 ] = texcoord.xyxy + resolution.xyxy * vec4( 1.0, 0.0, 0.0, -1.0 );", + "\tvOffset[ 2 ] = texcoord.xyxy + resolution.xyxy * vec4( -2.0, 0.0, 0.0, 2.0 );", + "}", + "void main() {", + "\tvUv = uv;", + "\tSMAAEdgeDetectionVS( vUv );", + "\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );", + "}", + ].join("\n"), + fragmentShader: [ + "uniform sampler2D tDiffuse;", + "varying vec2 vUv;", + "varying vec4 vOffset[ 3 ];", + "vec4 SMAAColorEdgeDetectionPS( vec2 texcoord, vec4 offset[3], sampler2D colorTex ) {", + "\tvec2 threshold = vec2( SMAA_THRESHOLD, SMAA_THRESHOLD );", + "\tvec4 delta;", + "\tvec3 C = texture2D( colorTex, texcoord ).rgb;", + "\tvec3 Cleft = texture2D( colorTex, offset[0].xy ).rgb;", + "\tvec3 t = abs( C - Cleft );", + "\tdelta.x = max( max( t.r, t.g ), t.b );", + "\tvec3 Ctop = texture2D( colorTex, offset[0].zw ).rgb;", + "\tt = abs( C - Ctop );", + "\tdelta.y = max( max( t.r, t.g ), t.b );", + "\tvec2 edges = step( threshold, delta.xy );", + "\tif ( dot( edges, vec2( 1.0, 1.0 ) ) == 0.0 )", + "\t\tdiscard;", + "\tvec3 Cright = texture2D( colorTex, offset[1].xy ).rgb;", + "\tt = abs( C - Cright );", + "\tdelta.z = max( max( t.r, t.g ), t.b );", + "\tvec3 Cbottom = texture2D( colorTex, offset[1].zw ).rgb;", + "\tt = abs( C - Cbottom );", + "\tdelta.w = max( max( t.r, t.g ), t.b );", + "\tfloat maxDelta = max( max( max( delta.x, delta.y ), delta.z ), delta.w );", + "\tvec3 Cleftleft = texture2D( colorTex, offset[2].xy ).rgb;", + "\tt = abs( C - Cleftleft );", + "\tdelta.z = max( max( t.r, t.g ), t.b );", + "\tvec3 Ctoptop = texture2D( colorTex, offset[2].zw ).rgb;", + "\tt = abs( C - Ctoptop );", + "\tdelta.w = max( max( t.r, t.g ), t.b );", + "\tmaxDelta = max( max( maxDelta, delta.z ), delta.w );", + "\tedges.xy *= step( 0.5 * maxDelta, delta.xy );", + "\treturn vec4( edges, 0.0, 0.0 );", + "}", + "void main() {", + "\tgl_FragColor = SMAAColorEdgeDetectionPS( vUv, vOffset, tDiffuse );", + "}", + ].join("\n"), + }, + Ga = { + defines: { + SMAA_MAX_SEARCH_STEPS: "8", + SMAA_AREATEX_MAX_DISTANCE: "16", + SMAA_AREATEX_PIXEL_SIZE: "( 1.0 / vec2( 160.0, 560.0 ) )", + SMAA_AREATEX_SUBTEX_SIZE: "( 1.0 / 7.0 )", + }, + uniforms: { + tDiffuse: { value: null }, + tArea: { value: null }, + tSearch: { value: null }, + resolution: { value: new A.Vector2(1 / 1024, 1 / 512) }, + }, + vertexShader: [ + "uniform vec2 resolution;", + "varying vec2 vUv;", + "varying vec4 vOffset[ 3 ];", + "varying vec2 vPixcoord;", + "void SMAABlendingWeightCalculationVS( vec2 texcoord ) {", + "\tvPixcoord = texcoord / resolution;", + "\tvOffset[ 0 ] = texcoord.xyxy + resolution.xyxy * vec4( -0.25, 0.125, 1.25, 0.125 );", + "\tvOffset[ 1 ] = texcoord.xyxy + resolution.xyxy * vec4( -0.125, 0.25, -0.125, -1.25 );", + "\tvOffset[ 2 ] = vec4( vOffset[ 0 ].xz, vOffset[ 1 ].yw ) + vec4( -2.0, 2.0, -2.0, 2.0 ) * resolution.xxyy * float( SMAA_MAX_SEARCH_STEPS );", + "}", + "void main() {", + "\tvUv = uv;", + "\tSMAABlendingWeightCalculationVS( vUv );", + "\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );", + "}", + ].join("\n"), + fragmentShader: [ + "#define SMAASampleLevelZeroOffset( tex, coord, offset ) texture2D( tex, coord + float( offset ) * resolution, 0.0 )", + "uniform sampler2D tDiffuse;", + "uniform sampler2D tArea;", + "uniform sampler2D tSearch;", + "uniform vec2 resolution;", + "varying vec2 vUv;", + "varying vec4 vOffset[3];", + "varying vec2 vPixcoord;", + "#if __VERSION__ == 100", + "vec2 round( vec2 x ) {", + "\treturn sign( x ) * floor( abs( x ) + 0.5 );", + "}", + "#endif", + "float SMAASearchLength( sampler2D searchTex, vec2 e, float bias, float scale ) {", + "\te.r = bias + e.r * scale;", + "\treturn 255.0 * texture2D( searchTex, e, 0.0 ).r;", + "}", + "float SMAASearchXLeft( sampler2D edgesTex, sampler2D searchTex, vec2 texcoord, float end ) {", + "\tvec2 e = vec2( 0.0, 1.0 );", + "\tfor ( int i = 0; i < SMAA_MAX_SEARCH_STEPS; i ++ ) {", + "\t\te = texture2D( edgesTex, texcoord, 0.0 ).rg;", + "\t\ttexcoord -= vec2( 2.0, 0.0 ) * resolution;", + "\t\tif ( ! ( texcoord.x > end && e.g > 0.8281 && e.r == 0.0 ) ) break;", + "\t}", + "\ttexcoord.x += 0.25 * resolution.x;", + "\ttexcoord.x += resolution.x;", + "\ttexcoord.x += 2.0 * resolution.x;", + "\ttexcoord.x -= resolution.x * SMAASearchLength(searchTex, e, 0.0, 0.5);", + "\treturn texcoord.x;", + "}", + "float SMAASearchXRight( sampler2D edgesTex, sampler2D searchTex, vec2 texcoord, float end ) {", + "\tvec2 e = vec2( 0.0, 1.0 );", + "\tfor ( int i = 0; i < SMAA_MAX_SEARCH_STEPS; i ++ ) {", + "\t\te = texture2D( edgesTex, texcoord, 0.0 ).rg;", + "\t\ttexcoord += vec2( 2.0, 0.0 ) * resolution;", + "\t\tif ( ! ( texcoord.x < end && e.g > 0.8281 && e.r == 0.0 ) ) break;", + "\t}", + "\ttexcoord.x -= 0.25 * resolution.x;", + "\ttexcoord.x -= resolution.x;", + "\ttexcoord.x -= 2.0 * resolution.x;", + "\ttexcoord.x += resolution.x * SMAASearchLength( searchTex, e, 0.5, 0.5 );", + "\treturn texcoord.x;", + "}", + "float SMAASearchYUp( sampler2D edgesTex, sampler2D searchTex, vec2 texcoord, float end ) {", + "\tvec2 e = vec2( 1.0, 0.0 );", + "\tfor ( int i = 0; i < SMAA_MAX_SEARCH_STEPS; i ++ ) {", + "\t\te = texture2D( edgesTex, texcoord, 0.0 ).rg;", + "\t\ttexcoord += vec2( 0.0, 2.0 ) * resolution;", + "\t\tif ( ! ( texcoord.y > end && e.r > 0.8281 && e.g == 0.0 ) ) break;", + "\t}", + "\ttexcoord.y -= 0.25 * resolution.y;", + "\ttexcoord.y -= resolution.y;", + "\ttexcoord.y -= 2.0 * resolution.y;", + "\ttexcoord.y += resolution.y * SMAASearchLength( searchTex, e.gr, 0.0, 0.5 );", + "\treturn texcoord.y;", + "}", + "float SMAASearchYDown( sampler2D edgesTex, sampler2D searchTex, vec2 texcoord, float end ) {", + "\tvec2 e = vec2( 1.0, 0.0 );", + "\tfor ( int i = 0; i < SMAA_MAX_SEARCH_STEPS; i ++ ) {", + "\t\te = texture2D( edgesTex, texcoord, 0.0 ).rg;", + "\t\ttexcoord -= vec2( 0.0, 2.0 ) * resolution;", + "\t\tif ( ! ( texcoord.y < end && e.r > 0.8281 && e.g == 0.0 ) ) break;", + "\t}", + "\ttexcoord.y += 0.25 * resolution.y;", + "\ttexcoord.y += resolution.y;", + "\ttexcoord.y += 2.0 * resolution.y;", + "\ttexcoord.y -= resolution.y * SMAASearchLength( searchTex, e.gr, 0.5, 0.5 );", + "\treturn texcoord.y;", + "}", + "vec2 SMAAArea( sampler2D areaTex, vec2 dist, float e1, float e2, float offset ) {", + "\tvec2 texcoord = float( SMAA_AREATEX_MAX_DISTANCE ) * round( 4.0 * vec2( e1, e2 ) ) + dist;", + "\ttexcoord = SMAA_AREATEX_PIXEL_SIZE * texcoord + ( 0.5 * SMAA_AREATEX_PIXEL_SIZE );", + "\ttexcoord.y += SMAA_AREATEX_SUBTEX_SIZE * offset;", + "\treturn texture2D( areaTex, texcoord, 0.0 ).rg;", + "}", + "vec4 SMAABlendingWeightCalculationPS( vec2 texcoord, vec2 pixcoord, vec4 offset[ 3 ], sampler2D edgesTex, sampler2D areaTex, sampler2D searchTex, ivec4 subsampleIndices ) {", + "\tvec4 weights = vec4( 0.0, 0.0, 0.0, 0.0 );", + "\tvec2 e = texture2D( edgesTex, texcoord ).rg;", + "\tif ( e.g > 0.0 ) {", + "\t\tvec2 d;", + "\t\tvec2 coords;", + "\t\tcoords.x = SMAASearchXLeft( edgesTex, searchTex, offset[ 0 ].xy, offset[ 2 ].x );", + "\t\tcoords.y = offset[ 1 ].y;", + "\t\td.x = coords.x;", + "\t\tfloat e1 = texture2D( edgesTex, coords, 0.0 ).r;", + "\t\tcoords.x = SMAASearchXRight( edgesTex, searchTex, offset[ 0 ].zw, offset[ 2 ].y );", + "\t\td.y = coords.x;", + "\t\td = d / resolution.x - pixcoord.x;", + "\t\tvec2 sqrt_d = sqrt( abs( d ) );", + "\t\tcoords.y -= 1.0 * resolution.y;", + "\t\tfloat e2 = SMAASampleLevelZeroOffset( edgesTex, coords, ivec2( 1, 0 ) ).r;", + "\t\tweights.rg = SMAAArea( areaTex, sqrt_d, e1, e2, float( subsampleIndices.y ) );", + "\t}", + "\tif ( e.r > 0.0 ) {", + "\t\tvec2 d;", + "\t\tvec2 coords;", + "\t\tcoords.y = SMAASearchYUp( edgesTex, searchTex, offset[ 1 ].xy, offset[ 2 ].z );", + "\t\tcoords.x = offset[ 0 ].x;", + "\t\td.x = coords.y;", + "\t\tfloat e1 = texture2D( edgesTex, coords, 0.0 ).g;", + "\t\tcoords.y = SMAASearchYDown( edgesTex, searchTex, offset[ 1 ].zw, offset[ 2 ].w );", + "\t\td.y = coords.y;", + "\t\td = d / resolution.y - pixcoord.y;", + "\t\tvec2 sqrt_d = sqrt( abs( d ) );", + "\t\tcoords.y -= 1.0 * resolution.y;", + "\t\tfloat e2 = SMAASampleLevelZeroOffset( edgesTex, coords, ivec2( 0, 1 ) ).g;", + "\t\tweights.ba = SMAAArea( areaTex, sqrt_d, e1, e2, float( subsampleIndices.x ) );", + "\t}", + "\treturn weights;", + "}", + "void main() {", + "\tgl_FragColor = SMAABlendingWeightCalculationPS( vUv, vPixcoord, vOffset, tDiffuse, tArea, tSearch, ivec4( 0.0 ) );", + "}", + ].join("\n"), + }, + Za = { + uniforms: { + tDiffuse: { value: null }, + tColor: { value: null }, + resolution: { value: new A.Vector2(1 / 1024, 1 / 512) }, + }, + vertexShader: [ + "uniform vec2 resolution;", + "varying vec2 vUv;", + "varying vec4 vOffset[ 2 ];", + "void SMAANeighborhoodBlendingVS( vec2 texcoord ) {", + "\tvOffset[ 0 ] = texcoord.xyxy + resolution.xyxy * vec4( -1.0, 0.0, 0.0, 1.0 );", + "\tvOffset[ 1 ] = texcoord.xyxy + resolution.xyxy * vec4( 1.0, 0.0, 0.0, -1.0 );", + "}", + "void main() {", + "\tvUv = uv;", + "\tSMAANeighborhoodBlendingVS( vUv );", + "\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );", + "}", + ].join("\n"), + fragmentShader: [ + "uniform sampler2D tDiffuse;", + "uniform sampler2D tColor;", + "uniform vec2 resolution;", + "varying vec2 vUv;", + "varying vec4 vOffset[ 2 ];", + "vec4 SMAANeighborhoodBlendingPS( vec2 texcoord, vec4 offset[ 2 ], sampler2D colorTex, sampler2D blendTex ) {", + "\tvec4 a;", + "\ta.xz = texture2D( blendTex, texcoord ).xz;", + "\ta.y = texture2D( blendTex, offset[ 1 ].zw ).g;", + "\ta.w = texture2D( blendTex, offset[ 1 ].xy ).a;", + "\tif ( dot(a, vec4( 1.0, 1.0, 1.0, 1.0 )) < 1e-5 ) {", + "\t\treturn texture2D( colorTex, texcoord, 0.0 );", + "\t} else {", + "\t\tvec2 offset;", + "\t\toffset.x = a.a > a.b ? a.a : -a.b;", + "\t\toffset.y = a.g > a.r ? -a.g : a.r;", + "\t\tif ( abs( offset.x ) > abs( offset.y )) {", + "\t\t\toffset.y = 0.0;", + "\t\t} else {", + "\t\t\toffset.x = 0.0;", + "\t\t}", + "\t\tvec4 C = texture2D( colorTex, texcoord, 0.0 );", + "\t\ttexcoord += sign( offset ) * resolution;", + "\t\tvec4 Cop = texture2D( colorTex, texcoord, 0.0 );", + "\t\tfloat s = abs( offset.x ) > abs( offset.y ) ? abs( offset.x ) : abs( offset.y );", + "\t\tC.xyz = pow(C.xyz, vec3(2.2));", + "\t\tCop.xyz = pow(Cop.xyz, vec3(2.2));", + "\t\tvec4 mixed = mix(C, Cop, s);", + "\t\tmixed.xyz = pow(mixed.xyz, vec3(1.0 / 2.2));", + "\t\treturn mixed;", + "\t}", + "}", + "void main() {", + "\tgl_FragColor = SMAANeighborhoodBlendingPS( vUv, vOffset, tColor, tDiffuse );", + "}", + ].join("\n"), + }, + za = null, + Qa = { + uniforms: { + tDiffuse: { value: null }, + time: { value: 0 }, + nIntensity: { value: 0.5 }, + sIntensity: { value: 0.05 }, + sCount: { value: 4096 }, + grayscale: { value: 1 }, + }, + vertexShader: [ + "varying vec2 vUv;", + "void main() {", + "\tvUv = uv;", + "\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );", + "}", + ].join("\n"), + fragmentShader: [ + "#include ", + "uniform float time;", + "uniform bool grayscale;", + "uniform float nIntensity;", + "uniform float sIntensity;", + "uniform float sCount;", + "uniform sampler2D tDiffuse;", + "varying vec2 vUv;", + "void main() {", + "\tvec4 cTextureScreen = texture2D( tDiffuse, vUv );", + "\tfloat dx = rand( vUv + time );", + "\tvec3 cResult = cTextureScreen.rgb + cTextureScreen.rgb * clamp( 0.1 + dx, 0.0, 1.0 );", + "\tvec2 sc = vec2( sin( vUv.y * sCount ), cos( vUv.y * sCount ) );", + "\tcResult += cTextureScreen.rgb * vec3( sc.x, sc.y, sc.x ) * sIntensity;", + "\tcResult = cTextureScreen.rgb + clamp( nIntensity, 0.0,1.0 ) * ( cResult - cTextureScreen.rgb );", + "\tif( grayscale ) {", + "\t\tcResult = vec3( cResult.r * 0.3 + cResult.g * 0.59 + cResult.b * 0.11 );", + "\t}", + "\tgl_FragColor = vec4( cResult, cTextureScreen.a );", + "}", + ].join("\n"), + }, + Ha = null, + Va = { + uniforms: { tDiffuse: { value: null }, opacity: { value: 1 } }, + vertexShader: [ + "varying vec2 vUv;", + "void main() {", + "\tvUv = uv;", + "\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );", + "}", + ].join("\n"), + fragmentShader: [ + "uniform float opacity;", + "uniform sampler2D tDiffuse;", + "varying vec2 vUv;", + "void main() {", + "\tvec4 texel = texture2D( tDiffuse, vUv );", + "\tgl_FragColor = opacity * texel;", + "}", + ].join("\n"), + }, + ja = null, + Wa = { + defines: { PERSPECTIVE_CAMERA: 1, KERNEL_SIZE: 32 }, + uniforms: { + tDiffuse: { value: null }, + tNormal: { value: null }, + tDepth: { value: null }, + tNoise: { value: null }, + kernel: { value: null }, + cameraNear: { value: null }, + cameraFar: { value: null }, + resolution: { value: new A.Vector2() }, + cameraProjectionMatrix: { value: new A.Matrix4() }, + cameraInverseProjectionMatrix: { value: new A.Matrix4() }, + kernelRadius: { value: 8 }, + minDistance: { value: 0.005 }, + maxDistance: { value: 0.05 }, + }, + vertexShader: [ + "varying vec2 vUv;", + "void main() {", + "\tvUv = uv;", + "\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );", + "}", + ].join("\n"), + fragmentShader: [ + "uniform sampler2D tDiffuse;", + "uniform sampler2D tNormal;", + "uniform sampler2D tDepth;", + "uniform sampler2D tNoise;", + "uniform vec3 kernel[ KERNEL_SIZE ];", + "uniform vec2 resolution;", + "uniform float cameraNear;", + "uniform float cameraFar;", + "uniform mat4 cameraProjectionMatrix;", + "uniform mat4 cameraInverseProjectionMatrix;", + "uniform float kernelRadius;", + "uniform float minDistance;", + "uniform float maxDistance;", + "varying vec2 vUv;", + "#include ", + "float getDepth( const in vec2 screenPosition ) {", + "\treturn texture2D( tDepth, screenPosition ).x;", + "}", + "float getLinearDepth( const in vec2 screenPosition ) {", + "\t#if PERSPECTIVE_CAMERA == 1", + "\t\tfloat fragCoordZ = texture2D( tDepth, screenPosition ).x;", + "\t\tfloat viewZ = perspectiveDepthToViewZ( fragCoordZ, cameraNear, cameraFar );", + "\t\treturn viewZToOrthographicDepth( viewZ, cameraNear, cameraFar );", + "\t#else", + "\t\treturn texture2D( tDepth, screenPosition ).x;", + "\t#endif", + "}", + "float getViewZ( const in float depth ) {", + "\t#if PERSPECTIVE_CAMERA == 1", + "\t\treturn perspectiveDepthToViewZ( depth, cameraNear, cameraFar );", + "\t#else", + "\t\treturn orthographicDepthToViewZ( depth, cameraNear, cameraFar );", + "\t#endif", + "}", + "vec3 getViewPosition( const in vec2 screenPosition, const in float depth, const in float viewZ ) {", + "\tfloat clipW = cameraProjectionMatrix[2][3] * viewZ + cameraProjectionMatrix[3][3];", + "\tvec4 clipPosition = vec4( ( vec3( screenPosition, depth ) - 0.5 ) * 2.0, 1.0 );", + "\tclipPosition *= clipW; // unprojection.", + "\treturn ( cameraInverseProjectionMatrix * clipPosition ).xyz;", + "}", + "vec3 getViewNormal( const in vec2 screenPosition ) {", + "\treturn unpackRGBToNormal( texture2D( tNormal, screenPosition ).xyz );", + "}", + "void main() {", + "\tfloat depth = getDepth( vUv );", + "\tfloat viewZ = getViewZ( depth );", + "\tvec3 viewPosition = getViewPosition( vUv, depth, viewZ );", + "\tvec3 viewNormal = getViewNormal( vUv );", + " vec2 noiseScale = vec2( resolution.x / 4.0, resolution.y / 4.0 );", + "\tvec3 random = texture2D( tNoise, vUv * noiseScale ).xyz;", + "\tvec3 tangent = normalize( random - viewNormal * dot( random, viewNormal ) );", + "\tvec3 bitangent = cross( viewNormal, tangent );", + "\tmat3 kernelMatrix = mat3( tangent, bitangent, viewNormal );", + " float occlusion = 0.0;", + " for ( int i = 0; i < KERNEL_SIZE; i ++ ) {", + "\t\tvec3 sampleVector = kernelMatrix * kernel[ i ];", + "\t\tvec3 samplePoint = viewPosition + ( sampleVector * kernelRadius );", + "\t\tvec4 samplePointNDC = cameraProjectionMatrix * vec4( samplePoint, 1.0 );", + "\t\tsamplePointNDC /= samplePointNDC.w;", + "\t\tvec2 samplePointUv = samplePointNDC.xy * 0.5 + 0.5;", + "\t\tfloat realDepth = getLinearDepth( samplePointUv );", + "\t\tfloat sampleDepth = viewZToOrthographicDepth( samplePoint.z, cameraNear, cameraFar );", + "\t\tfloat delta = sampleDepth - realDepth;", + "\t\tif ( delta > minDistance && delta < maxDistance ) {", + "\t\t\tocclusion += 1.0;", + "\t\t}", + "\t}", + "\tocclusion = clamp( occlusion / float( KERNEL_SIZE ), 0.0, 1.0 );", + "\tgl_FragColor = vec4( vec3( 1.0 - occlusion ), 1.0 );", + "}", + ].join("\n"), + }, + Xa = { + defines: { PERSPECTIVE_CAMERA: 1 }, + uniforms: { + tDepth: { value: null }, + cameraNear: { value: null }, + cameraFar: { value: null }, + }, + vertexShader: [ + "varying vec2 vUv;", + "void main() {", + "\tvUv = uv;", + "\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );", + "}", + ].join("\n"), + fragmentShader: [ + "uniform sampler2D tDepth;", + "uniform float cameraNear;", + "uniform float cameraFar;", + "varying vec2 vUv;", + "#include ", + "float getLinearDepth( const in vec2 screenPosition ) {", + "\t#if PERSPECTIVE_CAMERA == 1", + "\t\tfloat fragCoordZ = texture2D( tDepth, screenPosition ).x;", + "\t\tfloat viewZ = perspectiveDepthToViewZ( fragCoordZ, cameraNear, cameraFar );", + "\t\treturn viewZToOrthographicDepth( viewZ, cameraNear, cameraFar );", + "\t#else", + "\t\treturn texture2D( tDepth, screenPosition ).x;", + "\t#endif", + "}", + "void main() {", + "\tfloat depth = getLinearDepth( vUv );", + "\tgl_FragColor = vec4( vec3( 1.0 - depth ), 1.0 );", + "}", + ].join("\n"), + }, + Ya = { + uniforms: { + tDiffuse: { value: null }, + resolution: { value: new A.Vector2() }, + }, + vertexShader: [ + "varying vec2 vUv;", + "void main() {", + "\tvUv = uv;", + "\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );", + "}", + ].join("\n"), + fragmentShader: [ + "uniform sampler2D tDiffuse;", + "uniform vec2 resolution;", + "varying vec2 vUv;", + "void main() {", + "\tvec2 texelSize = ( 1.0 / resolution );", + "\tfloat result = 0.0;", + "\tfor ( int i = - 2; i <= 2; i ++ ) {", + "\t\tfor ( int j = - 2; j <= 2; j ++ ) {", + "\t\t\tvec2 offset = ( vec2( float( i ), float( j ) ) ) * texelSize;", + "\t\t\tresult += texture2D( tDiffuse, vUv + offset ).r;", + "\t\t}", + "\t}", + "\tgl_FragColor = vec4( vec3( result / ( 5.0 * 5.0 ) ), 1.0 );", + "}", + ].join("\n"), + }, + qa = (function (e) { + (0, m.Z)(n, e); + var t = (0, g.Z)(n); + function n(e, r, i, a) { + var o; + (0, p.Z)(this, n), + ((o = t.call(this)).width = void 0 !== i ? i : 512), + (o.height = void 0 !== a ? a : 512), + (o.clear = !0), + (o.camera = r), + (o.scene = e), + (o.kernelRadius = 8), + (o.kernelSize = 32), + (o.kernel = []), + (o.noiseTexture = null), + (o.output = 0), + (o.minDistance = 0.005), + (o.maxDistance = 0.1), + (o._visibilityCache = new Map()), + o.generateSampleKernel(), + o.generateRandomKernelRotations(); + var s = new A.DepthTexture(); + return ( + (s.format = A.DepthStencilFormat), + (s.type = A.UnsignedInt248Type), + (o.beautyRenderTarget = new A.WebGLRenderTarget( + o.width, + o.height + )), + (o.normalRenderTarget = new A.WebGLRenderTarget( + o.width, + o.height, + { + minFilter: A.NearestFilter, + magFilter: A.NearestFilter, + depthTexture: s, + } + )), + (o.ssaoRenderTarget = new A.WebGLRenderTarget( + o.width, + o.height + )), + (o.blurRenderTarget = o.ssaoRenderTarget.clone()), + void 0 === Wa && + console.error( + "THREE.SSAOPass: The pass relies on SSAOShader." + ), + (o.ssaoMaterial = new A.ShaderMaterial({ + defines: Object.assign({}, Wa.defines), + uniforms: A.UniformsUtils.clone(Wa.uniforms), + vertexShader: Wa.vertexShader, + fragmentShader: Wa.fragmentShader, + blending: A.NoBlending, + })), + (o.ssaoMaterial.uniforms.tDiffuse.value = + o.beautyRenderTarget.texture), + (o.ssaoMaterial.uniforms.tNormal.value = + o.normalRenderTarget.texture), + (o.ssaoMaterial.uniforms.tDepth.value = + o.normalRenderTarget.depthTexture), + (o.ssaoMaterial.uniforms.tNoise.value = o.noiseTexture), + (o.ssaoMaterial.uniforms.kernel.value = o.kernel), + (o.ssaoMaterial.uniforms.cameraNear.value = o.camera.near), + (o.ssaoMaterial.uniforms.cameraFar.value = o.camera.far), + o.ssaoMaterial.uniforms.resolution.value.set(o.width, o.height), + o.ssaoMaterial.uniforms.cameraProjectionMatrix.value.copy( + o.camera.projectionMatrix + ), + o.ssaoMaterial.uniforms.cameraInverseProjectionMatrix.value.copy( + o.camera.projectionMatrixInverse + ), + (o.normalMaterial = new A.MeshNormalMaterial()), + (o.normalMaterial.blending = A.NoBlending), + (o.blurMaterial = new A.ShaderMaterial({ + defines: Object.assign({}, Ya.defines), + uniforms: A.UniformsUtils.clone(Ya.uniforms), + vertexShader: Ya.vertexShader, + fragmentShader: Ya.fragmentShader, + })), + (o.blurMaterial.uniforms.tDiffuse.value = + o.ssaoRenderTarget.texture), + o.blurMaterial.uniforms.resolution.value.set(o.width, o.height), + (o.depthRenderMaterial = new A.ShaderMaterial({ + defines: Object.assign({}, Xa.defines), + uniforms: A.UniformsUtils.clone(Xa.uniforms), + vertexShader: Xa.vertexShader, + fragmentShader: Xa.fragmentShader, + blending: A.NoBlending, + })), + (o.depthRenderMaterial.uniforms.tDepth.value = + o.normalRenderTarget.depthTexture), + (o.depthRenderMaterial.uniforms.cameraNear.value = + o.camera.near), + (o.depthRenderMaterial.uniforms.cameraFar.value = o.camera.far), + (o.copyMaterial = new A.ShaderMaterial({ + uniforms: A.UniformsUtils.clone(Va.uniforms), + vertexShader: Va.vertexShader, + fragmentShader: Va.fragmentShader, + transparent: !0, + depthTest: !1, + depthWrite: !1, + blendSrc: A.DstColorFactor, + blendDst: A.ZeroFactor, + blendEquation: A.AddEquation, + blendSrcAlpha: A.DstAlphaFactor, + blendDstAlpha: A.ZeroFactor, + blendEquationAlpha: A.AddEquation, + })), + (o.fsQuad = new ka(null)), + (o.originalClearColor = new A.Color()), + o + ); + } + return ( + (0, v.Z)(n, [ + { + key: "dispose", + value: function () { + this.beautyRenderTarget.dispose(), + this.normalRenderTarget.dispose(), + this.ssaoRenderTarget.dispose(), + this.blurRenderTarget.dispose(), + this.normalMaterial.dispose(), + this.blurMaterial.dispose(), + this.copyMaterial.dispose(), + this.depthRenderMaterial.dispose(), + this.fsQuad.dispose(); + }, + }, + { + key: "render", + value: function (e, t) { + switch ( + (!1 === e.capabilities.isWebGL2 && + (this.noiseTexture.format = A.LuminanceFormat), + e.setRenderTarget(this.beautyRenderTarget), + e.clear(), + e.render(this.scene, this.camera), + this.overrideVisibility(), + this.renderOverride( + e, + this.normalMaterial, + this.normalRenderTarget, + 7829503, + 1 + ), + this.restoreVisibility(), + (this.ssaoMaterial.uniforms.kernelRadius.value = + this.kernelRadius), + (this.ssaoMaterial.uniforms.minDistance.value = + this.minDistance), + (this.ssaoMaterial.uniforms.maxDistance.value = + this.maxDistance), + this.renderPass( + e, + this.ssaoMaterial, + this.ssaoRenderTarget + ), + this.renderPass( + e, + this.blurMaterial, + this.blurRenderTarget + ), + this.output) + ) { + case n.OUTPUT.SSAO: + (this.copyMaterial.uniforms.tDiffuse.value = + this.ssaoRenderTarget.texture), + (this.copyMaterial.blending = A.NoBlending), + this.renderPass( + e, + this.copyMaterial, + this.renderToScreen ? null : t + ); + break; + case n.OUTPUT.Blur: + (this.copyMaterial.uniforms.tDiffuse.value = + this.blurRenderTarget.texture), + (this.copyMaterial.blending = A.NoBlending), + this.renderPass( + e, + this.copyMaterial, + this.renderToScreen ? null : t + ); + break; + case n.OUTPUT.Beauty: + (this.copyMaterial.uniforms.tDiffuse.value = + this.beautyRenderTarget.texture), + (this.copyMaterial.blending = A.NoBlending), + this.renderPass( + e, + this.copyMaterial, + this.renderToScreen ? null : t + ); + break; + case n.OUTPUT.Depth: + this.renderPass( + e, + this.depthRenderMaterial, + this.renderToScreen ? null : t + ); + break; + case n.OUTPUT.Normal: + (this.copyMaterial.uniforms.tDiffuse.value = + this.normalRenderTarget.texture), + (this.copyMaterial.blending = A.NoBlending), + this.renderPass( + e, + this.copyMaterial, + this.renderToScreen ? null : t + ); + break; + case n.OUTPUT.Default: + (this.copyMaterial.uniforms.tDiffuse.value = + this.beautyRenderTarget.texture), + (this.copyMaterial.blending = A.NoBlending), + this.renderPass( + e, + this.copyMaterial, + this.renderToScreen ? null : t + ), + (this.copyMaterial.uniforms.tDiffuse.value = + this.blurRenderTarget.texture), + (this.copyMaterial.blending = A.CustomBlending), + this.renderPass( + e, + this.copyMaterial, + this.renderToScreen ? null : t + ); + break; + default: + console.warn("THREE.SSAOPass: Unknown output type."); + } + }, + }, + { + key: "renderPass", + value: function (e, t, n, r, i) { + e.getClearColor(this.originalClearColor); + var a = e.getClearAlpha(), + o = e.autoClear; + e.setRenderTarget(n), + (e.autoClear = !1), + void 0 !== r && + null !== r && + (e.setClearColor(r), + e.setClearAlpha(i || 0), + e.clear()), + (this.fsQuad.material = t), + this.fsQuad.render(e), + (e.autoClear = o), + e.setClearColor(this.originalClearColor), + e.setClearAlpha(a); + }, + }, + { + key: "renderOverride", + value: function (e, t, n, r, i) { + e.getClearColor(this.originalClearColor); + var a = e.getClearAlpha(), + o = e.autoClear; + e.setRenderTarget(n), + (e.autoClear = !1), + (r = t.clearColor || r), + (i = t.clearAlpha || i), + void 0 !== r && + null !== r && + (e.setClearColor(r), + e.setClearAlpha(i || 0), + e.clear()), + (this.scene.overrideMaterial = t), + e.render(this.scene, this.camera), + (this.scene.overrideMaterial = null), + (e.autoClear = o), + e.setClearColor(this.originalClearColor), + e.setClearAlpha(a); + }, + }, + { + key: "setSize", + value: function (e, t) { + (this.width = e), + (this.height = t), + this.beautyRenderTarget.setSize(e, t), + this.ssaoRenderTarget.setSize(e, t), + this.normalRenderTarget.setSize(e, t), + this.blurRenderTarget.setSize(e, t), + this.ssaoMaterial.uniforms.resolution.value.set(e, t), + this.ssaoMaterial.uniforms.cameraProjectionMatrix.value.copy( + this.camera.projectionMatrix + ), + this.ssaoMaterial.uniforms.cameraInverseProjectionMatrix.value.copy( + this.camera.projectionMatrixInverse + ), + this.blurMaterial.uniforms.resolution.value.set(e, t); + }, + }, + { + key: "generateSampleKernel", + value: function () { + for ( + var e = this.kernelSize, t = this.kernel, n = 0; + n < e; + n++ + ) { + var r = new A.Vector3(); + (r.x = 2 * Math.random() - 1), + (r.y = 2 * Math.random() - 1), + (r.z = Math.random()), + r.normalize(); + var i = n / e; + (i = A.MathUtils.lerp(0.1, 1, i * i)), + r.multiplyScalar(i), + t.push(r); + } + }, + }, + { + key: "generateRandomKernelRotations", + value: function () { + void 0 === mr && + console.error( + "THREE.SSAOPass: The pass relies on SimplexNoise." + ); + for ( + var e = new mr(), t = new Float32Array(16), n = 0; + n < 16; + n++ + ) { + var r = 2 * Math.random() - 1, + i = 2 * Math.random() - 1; + t[n] = e.noise3d(r, i, 0); + } + (this.noiseTexture = new A.DataTexture( + t, + 4, + 4, + A.RedFormat, + A.FloatType + )), + (this.noiseTexture.wrapS = A.RepeatWrapping), + (this.noiseTexture.wrapT = A.RepeatWrapping), + (this.noiseTexture.needsUpdate = !0); + }, + }, + { + key: "overrideVisibility", + value: function () { + var e = this.scene, + t = this._visibilityCache; + e.traverse(function (e) { + t.set(e, e.visible), + (e.isPoints || e.isLine) && (e.visible = !1); + }); + }, + }, + { + key: "restoreVisibility", + value: function () { + var e = this.scene, + t = this._visibilityCache; + e.traverse(function (e) { + var n = t.get(e); + e.visible = n; + }), + t.clear(); + }, + }, + ]), + n + ); + })(Ia), + Ja = qa, + Ka = null, + $a = { + defines: { DEPTH_PACKING: 1, PERSPECTIVE_CAMERA: 1 }, + uniforms: { + tColor: { value: null }, + tDepth: { value: null }, + focus: { value: 1 }, + aspect: { value: 1 }, + aperture: { value: 0.025 }, + maxblur: { value: 0.01 }, + nearClip: { value: 1 }, + farClip: { value: 1e3 }, + }, + vertexShader: [ + "varying vec2 vUv;", + "void main() {", + "\tvUv = uv;", + "\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );", + "}", + ].join("\n"), + fragmentShader: [ + "#include ", + "varying vec2 vUv;", + "uniform sampler2D tColor;", + "uniform sampler2D tDepth;", + "uniform float maxblur;", + "uniform float aperture;", + "uniform float nearClip;", + "uniform float farClip;", + "uniform float focus;", + "uniform float aspect;", + "#include ", + "float getDepth( const in vec2 screenPosition ) {", + "\t#if DEPTH_PACKING == 1", + "\treturn unpackRGBAToDepth( texture2D( tDepth, screenPosition ) );", + "\t#else", + "\treturn texture2D( tDepth, screenPosition ).x;", + "\t#endif", + "}", + "float getViewZ( const in float depth ) {", + "\t#if PERSPECTIVE_CAMERA == 1", + "\treturn perspectiveDepthToViewZ( depth, nearClip, farClip );", + "\t#else", + "\treturn orthographicDepthToViewZ( depth, nearClip, farClip );", + "\t#endif", + "}", + "void main() {", + "\tvec2 aspectcorrect = vec2( 1.0, aspect );", + "\tfloat viewZ = getViewZ( getDepth( vUv ) );", + "\tfloat factor = ( focus + viewZ );", + "\tvec2 dofblur = vec2 ( clamp( factor * aperture, -maxblur, maxblur ) );", + "\tvec2 dofblur9 = dofblur * 0.9;", + "\tvec2 dofblur7 = dofblur * 0.7;", + "\tvec2 dofblur4 = dofblur * 0.4;", + "\tvec4 col = vec4( 0.0 );", + "\tcol += texture2D( tColor, vUv.xy );", + "\tcol += texture2D( tColor, vUv.xy + ( vec2( 0.0, 0.4 ) * aspectcorrect ) * dofblur );", + "\tcol += texture2D( tColor, vUv.xy + ( vec2( 0.15, 0.37 ) * aspectcorrect ) * dofblur );", + "\tcol += texture2D( tColor, vUv.xy + ( vec2( 0.29, 0.29 ) * aspectcorrect ) * dofblur );", + "\tcol += texture2D( tColor, vUv.xy + ( vec2( -0.37, 0.15 ) * aspectcorrect ) * dofblur );", + "\tcol += texture2D( tColor, vUv.xy + ( vec2( 0.40, 0.0 ) * aspectcorrect ) * dofblur );", + "\tcol += texture2D( tColor, vUv.xy + ( vec2( 0.37, -0.15 ) * aspectcorrect ) * dofblur );", + "\tcol += texture2D( tColor, vUv.xy + ( vec2( 0.29, -0.29 ) * aspectcorrect ) * dofblur );", + "\tcol += texture2D( tColor, vUv.xy + ( vec2( -0.15, -0.37 ) * aspectcorrect ) * dofblur );", + "\tcol += texture2D( tColor, vUv.xy + ( vec2( 0.0, -0.4 ) * aspectcorrect ) * dofblur );", + "\tcol += texture2D( tColor, vUv.xy + ( vec2( -0.15, 0.37 ) * aspectcorrect ) * dofblur );", + "\tcol += texture2D( tColor, vUv.xy + ( vec2( -0.29, 0.29 ) * aspectcorrect ) * dofblur );", + "\tcol += texture2D( tColor, vUv.xy + ( vec2( 0.37, 0.15 ) * aspectcorrect ) * dofblur );", + "\tcol += texture2D( tColor, vUv.xy + ( vec2( -0.4, 0.0 ) * aspectcorrect ) * dofblur );", + "\tcol += texture2D( tColor, vUv.xy + ( vec2( -0.37, -0.15 ) * aspectcorrect ) * dofblur );", + "\tcol += texture2D( tColor, vUv.xy + ( vec2( -0.29, -0.29 ) * aspectcorrect ) * dofblur );", + "\tcol += texture2D( tColor, vUv.xy + ( vec2( 0.15, -0.37 ) * aspectcorrect ) * dofblur );", + "\tcol += texture2D( tColor, vUv.xy + ( vec2( 0.15, 0.37 ) * aspectcorrect ) * dofblur9 );", + "\tcol += texture2D( tColor, vUv.xy + ( vec2( -0.37, 0.15 ) * aspectcorrect ) * dofblur9 );", + "\tcol += texture2D( tColor, vUv.xy + ( vec2( 0.37, -0.15 ) * aspectcorrect ) * dofblur9 );", + "\tcol += texture2D( tColor, vUv.xy + ( vec2( -0.15, -0.37 ) * aspectcorrect ) * dofblur9 );", + "\tcol += texture2D( tColor, vUv.xy + ( vec2( -0.15, 0.37 ) * aspectcorrect ) * dofblur9 );", + "\tcol += texture2D( tColor, vUv.xy + ( vec2( 0.37, 0.15 ) * aspectcorrect ) * dofblur9 );", + "\tcol += texture2D( tColor, vUv.xy + ( vec2( -0.37, -0.15 ) * aspectcorrect ) * dofblur9 );", + "\tcol += texture2D( tColor, vUv.xy + ( vec2( 0.15, -0.37 ) * aspectcorrect ) * dofblur9 );", + "\tcol += texture2D( tColor, vUv.xy + ( vec2( 0.29, 0.29 ) * aspectcorrect ) * dofblur7 );", + "\tcol += texture2D( tColor, vUv.xy + ( vec2( 0.40, 0.0 ) * aspectcorrect ) * dofblur7 );", + "\tcol += texture2D( tColor, vUv.xy + ( vec2( 0.29, -0.29 ) * aspectcorrect ) * dofblur7 );", + "\tcol += texture2D( tColor, vUv.xy + ( vec2( 0.0, -0.4 ) * aspectcorrect ) * dofblur7 );", + "\tcol += texture2D( tColor, vUv.xy + ( vec2( -0.29, 0.29 ) * aspectcorrect ) * dofblur7 );", + "\tcol += texture2D( tColor, vUv.xy + ( vec2( -0.4, 0.0 ) * aspectcorrect ) * dofblur7 );", + "\tcol += texture2D( tColor, vUv.xy + ( vec2( -0.29, -0.29 ) * aspectcorrect ) * dofblur7 );", + "\tcol += texture2D( tColor, vUv.xy + ( vec2( 0.0, 0.4 ) * aspectcorrect ) * dofblur7 );", + "\tcol += texture2D( tColor, vUv.xy + ( vec2( 0.29, 0.29 ) * aspectcorrect ) * dofblur4 );", + "\tcol += texture2D( tColor, vUv.xy + ( vec2( 0.4, 0.0 ) * aspectcorrect ) * dofblur4 );", + "\tcol += texture2D( tColor, vUv.xy + ( vec2( 0.29, -0.29 ) * aspectcorrect ) * dofblur4 );", + "\tcol += texture2D( tColor, vUv.xy + ( vec2( 0.0, -0.4 ) * aspectcorrect ) * dofblur4 );", + "\tcol += texture2D( tColor, vUv.xy + ( vec2( -0.29, 0.29 ) * aspectcorrect ) * dofblur4 );", + "\tcol += texture2D( tColor, vUv.xy + ( vec2( -0.4, 0.0 ) * aspectcorrect ) * dofblur4 );", + "\tcol += texture2D( tColor, vUv.xy + ( vec2( -0.29, -0.29 ) * aspectcorrect ) * dofblur4 );", + "\tcol += texture2D( tColor, vUv.xy + ( vec2( 0.0, 0.4 ) * aspectcorrect ) * dofblur4 );", + "\tgl_FragColor = col / 41.0;", + "\tgl_FragColor.a = 1.0;", + "}", + ].join("\n"), + }, + eo = null, + to = null, + no = { + uniforms: { tDiffuse: { value: null } }, + vertexShader: [ + "varying vec2 vUv;", + "void main() {", + "\tvUv = uv;", + "\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );", + "}", + ].join("\n"), + fragmentShader: [ + "#include ", + "uniform sampler2D tDiffuse;", + "varying vec2 vUv;", + "void main() {", + "\tvec4 texel = texture2D( tDiffuse, vUv );", + "\tfloat l = linearToRelativeLuminance( texel.rgb );", + "\tgl_FragColor = vec4( l, l, l, texel.w );", + "}", + ].join("\n"), + }, + ro = { + uniforms: { + tDiffuse: { value: null }, + averageLuminance: { value: 1 }, + luminanceMap: { value: null }, + maxLuminance: { value: 16 }, + minLuminance: { value: 0.01 }, + middleGrey: { value: 0.6 }, + }, + vertexShader: [ + "varying vec2 vUv;", + "void main() {", + "\tvUv = uv;", + "\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );", + "}", + ].join("\n"), + fragmentShader: [ + "#include ", + "uniform sampler2D tDiffuse;", + "varying vec2 vUv;", + "uniform float middleGrey;", + "uniform float minLuminance;", + "uniform float maxLuminance;", + "#ifdef ADAPTED_LUMINANCE", + "\tuniform sampler2D luminanceMap;", + "#else", + "\tuniform float averageLuminance;", + "#endif", + "vec3 ToneMap( vec3 vColor ) {", + "\t#ifdef ADAPTED_LUMINANCE", + "\t\tfloat fLumAvg = texture2D(luminanceMap, vec2(0.5, 0.5)).r;", + "\t#else", + "\t\tfloat fLumAvg = averageLuminance;", + "\t#endif", + "\tfloat fLumPixel = linearToRelativeLuminance( vColor );", + "\tfloat fLumScaled = (fLumPixel * middleGrey) / max( minLuminance, fLumAvg );", + "\tfloat fLumCompressed = (fLumScaled * (1.0 + (fLumScaled / (maxLuminance * maxLuminance)))) / (1.0 + fLumScaled);", + "\treturn fLumCompressed * vColor;", + "}", + "void main() {", + "\tvec4 texel = texture2D( tDiffuse, vUv );", + "\tgl_FragColor = vec4( ToneMap( texel.xyz ), texel.w );", + "}", + ].join("\n"), + }, + io = null, + ao = { + shaderID: "luminosityHighPass", + uniforms: { + tDiffuse: { value: null }, + luminosityThreshold: { value: 1 }, + smoothWidth: { value: 1 }, + defaultColor: { value: new A.Color(0) }, + defaultOpacity: { value: 0 }, + }, + vertexShader: [ + "varying vec2 vUv;", + "void main() {", + "\tvUv = uv;", + "\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );", + "}", + ].join("\n"), + fragmentShader: [ + "uniform sampler2D tDiffuse;", + "uniform vec3 defaultColor;", + "uniform float defaultOpacity;", + "uniform float luminosityThreshold;", + "uniform float smoothWidth;", + "varying vec2 vUv;", + "void main() {", + "\tvec4 texel = texture2D( tDiffuse, vUv );", + "\tvec3 luma = vec3( 0.299, 0.587, 0.114 );", + "\tfloat v = dot( texel.xyz, luma );", + "\tvec4 outputColor = vec4( defaultColor.rgb, defaultOpacity );", + "\tfloat alpha = smoothstep( luminosityThreshold, luminosityThreshold + smoothWidth, v );", + "\tgl_FragColor = mix( outputColor, texel, alpha );", + "}", + ].join("\n"), + }, + oo = (function (e) { + (0, m.Z)(n, e); + var t = (0, g.Z)(n); + function n(e, r, i, a) { + var o; + (0, p.Z)(this, n), + ((o = t.call(this)).strength = void 0 !== r ? r : 1), + (o.radius = i), + (o.threshold = a), + (o.resolution = + void 0 !== e + ? new A.Vector2(e.x, e.y) + : new A.Vector2(256, 256)), + (o.clearColor = new A.Color(0, 0, 0)), + (o.renderTargetsHorizontal = []), + (o.renderTargetsVertical = []), + (o.nMips = 5); + var s = Math.round(o.resolution.x / 2), + l = Math.round(o.resolution.y / 2); + (o.renderTargetBright = new A.WebGLRenderTarget(s, l, { + type: A.HalfFloatType, + })), + (o.renderTargetBright.texture.name = "UnrealBloomPass.bright"), + (o.renderTargetBright.texture.generateMipmaps = !1); + for (var u = 0; u < o.nMips; u++) { + var c = new A.WebGLRenderTarget(s, l, { + type: A.HalfFloatType, + }); + (c.texture.name = "UnrealBloomPass.h" + u), + (c.texture.generateMipmaps = !1), + o.renderTargetsHorizontal.push(c); + var f = new A.WebGLRenderTarget(s, l, { + type: A.HalfFloatType, + }); + (f.texture.name = "UnrealBloomPass.v" + u), + (f.texture.generateMipmaps = !1), + o.renderTargetsVertical.push(f), + (s = Math.round(s / 2)), + (l = Math.round(l / 2)); + } + var d = ao; + (o.highPassUniforms = A.UniformsUtils.clone(d.uniforms)), + (o.highPassUniforms.luminosityThreshold.value = a), + (o.highPassUniforms.smoothWidth.value = 0.01), + (o.materialHighPassFilter = new A.ShaderMaterial({ + uniforms: o.highPassUniforms, + vertexShader: d.vertexShader, + fragmentShader: d.fragmentShader, + defines: {}, + })), + (o.separableBlurMaterials = []); + var h = [3, 5, 7, 9, 11]; + (s = Math.round(o.resolution.x / 2)), + (l = Math.round(o.resolution.y / 2)); + for (var v = 0; v < o.nMips; v++) + o.separableBlurMaterials.push(o.getSeperableBlurMaterial(h[v])), + (o.separableBlurMaterials[v].uniforms.texSize.value = + new A.Vector2(s, l)), + (s = Math.round(s / 2)), + (l = Math.round(l / 2)); + (o.compositeMaterial = o.getCompositeMaterial(o.nMips)), + (o.compositeMaterial.uniforms.blurTexture1.value = + o.renderTargetsVertical[0].texture), + (o.compositeMaterial.uniforms.blurTexture2.value = + o.renderTargetsVertical[1].texture), + (o.compositeMaterial.uniforms.blurTexture3.value = + o.renderTargetsVertical[2].texture), + (o.compositeMaterial.uniforms.blurTexture4.value = + o.renderTargetsVertical[3].texture), + (o.compositeMaterial.uniforms.blurTexture5.value = + o.renderTargetsVertical[4].texture), + (o.compositeMaterial.uniforms.bloomStrength.value = r), + (o.compositeMaterial.uniforms.bloomRadius.value = 0.1), + (o.compositeMaterial.needsUpdate = !0); + (o.compositeMaterial.uniforms.bloomFactors.value = [ + 1, 0.8, 0.6, 0.4, 0.2, + ]), + (o.bloomTintColors = [ + new A.Vector3(1, 1, 1), + new A.Vector3(1, 1, 1), + new A.Vector3(1, 1, 1), + new A.Vector3(1, 1, 1), + new A.Vector3(1, 1, 1), + ]), + (o.compositeMaterial.uniforms.bloomTintColors.value = + o.bloomTintColors); + var m = Va; + return ( + (o.copyUniforms = A.UniformsUtils.clone(m.uniforms)), + (o.copyUniforms.opacity.value = 1), + (o.materialCopy = new A.ShaderMaterial({ + uniforms: o.copyUniforms, + vertexShader: m.vertexShader, + fragmentShader: m.fragmentShader, + blending: A.AdditiveBlending, + depthTest: !1, + depthWrite: !1, + transparent: !0, + })), + (o.enabled = !0), + (o.needsSwap = !1), + (o._oldClearColor = new A.Color()), + (o.oldClearAlpha = 1), + (o.basic = new A.MeshBasicMaterial()), + (o.fsQuad = new ka(null)), + o + ); + } + return ( + (0, v.Z)(n, [ + { + key: "dispose", + value: function () { + for ( + var e = 0; + e < this.renderTargetsHorizontal.length; + e++ + ) + this.renderTargetsHorizontal[e].dispose(); + for (var t = 0; t < this.renderTargetsVertical.length; t++) + this.renderTargetsVertical[t].dispose(); + this.renderTargetBright.dispose(); + for (var n = 0; n < this.separableBlurMaterials.length; n++) + this.separableBlurMaterials[n].dispose(); + this.compositeMaterial.dispose(), + this.materialCopy.dispose(), + this.basic.dispose(), + this.fsQuad.dispose(); + }, + }, + { + key: "setSize", + value: function (e, t) { + var n = Math.round(e / 2), + r = Math.round(t / 2); + this.renderTargetBright.setSize(n, r); + for (var i = 0; i < this.nMips; i++) + this.renderTargetsHorizontal[i].setSize(n, r), + this.renderTargetsVertical[i].setSize(n, r), + (this.separableBlurMaterials[i].uniforms.texSize.value = + new A.Vector2(n, r)), + (n = Math.round(n / 2)), + (r = Math.round(r / 2)); + }, + }, + { + key: "render", + value: function (e, t, r, i, a) { + e.getClearColor(this._oldClearColor), + (this.oldClearAlpha = e.getClearAlpha()); + var o = e.autoClear; + (e.autoClear = !1), + e.setClearColor(this.clearColor, 0), + a && e.state.buffers.stencil.setTest(!1), + this.renderToScreen && + ((this.fsQuad.material = this.basic), + (this.basic.map = r.texture), + e.setRenderTarget(null), + e.clear(), + this.fsQuad.render(e)), + (this.highPassUniforms.tDiffuse.value = r.texture), + (this.highPassUniforms.luminosityThreshold.value = + this.threshold), + (this.fsQuad.material = this.materialHighPassFilter), + e.setRenderTarget(this.renderTargetBright), + e.clear(), + this.fsQuad.render(e); + for ( + var s = this.renderTargetBright, l = 0; + l < this.nMips; + l++ + ) + (this.fsQuad.material = this.separableBlurMaterials[l]), + (this.separableBlurMaterials[ + l + ].uniforms.colorTexture.value = s.texture), + (this.separableBlurMaterials[ + l + ].uniforms.direction.value = n.BlurDirectionX), + e.setRenderTarget(this.renderTargetsHorizontal[l]), + e.clear(), + this.fsQuad.render(e), + (this.separableBlurMaterials[ + l + ].uniforms.colorTexture.value = + this.renderTargetsHorizontal[l].texture), + (this.separableBlurMaterials[ + l + ].uniforms.direction.value = n.BlurDirectionY), + e.setRenderTarget(this.renderTargetsVertical[l]), + e.clear(), + this.fsQuad.render(e), + (s = this.renderTargetsVertical[l]); + (this.fsQuad.material = this.compositeMaterial), + (this.compositeMaterial.uniforms.bloomStrength.value = + this.strength), + (this.compositeMaterial.uniforms.bloomRadius.value = + this.radius), + (this.compositeMaterial.uniforms.bloomTintColors.value = + this.bloomTintColors), + e.setRenderTarget(this.renderTargetsHorizontal[0]), + e.clear(), + this.fsQuad.render(e), + (this.fsQuad.material = this.materialCopy), + (this.copyUniforms.tDiffuse.value = + this.renderTargetsHorizontal[0].texture), + a && e.state.buffers.stencil.setTest(!0), + this.renderToScreen + ? (e.setRenderTarget(null), this.fsQuad.render(e)) + : (e.setRenderTarget(r), this.fsQuad.render(e)), + e.setClearColor(this._oldClearColor, this.oldClearAlpha), + (e.autoClear = o); + }, + }, + { + key: "getSeperableBlurMaterial", + value: function (e) { + return new A.ShaderMaterial({ + defines: { KERNEL_RADIUS: e, SIGMA: e }, + uniforms: { + colorTexture: { value: null }, + texSize: { value: new A.Vector2(0.5, 0.5) }, + direction: { value: new A.Vector2(0.5, 0.5) }, + }, + vertexShader: + "varying vec2 vUv;\n\t\t\t\tvoid main() {\n\t\t\t\t\tvUv = uv;\n\t\t\t\t\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n\t\t\t\t}", + fragmentShader: + "#include \n\t\t\t\tvarying vec2 vUv;\n\t\t\t\tuniform sampler2D colorTexture;\n\t\t\t\tuniform vec2 texSize;\n\t\t\t\tuniform vec2 direction;\n\n\t\t\t\tfloat gaussianPdf(in float x, in float sigma) {\n\t\t\t\t\treturn 0.39894 * exp( -0.5 * x * x/( sigma * sigma))/sigma;\n\t\t\t\t}\n\t\t\t\tvoid main() {\n\t\t\t\t\tvec2 invSize = 1.0 / texSize;\n\t\t\t\t\tfloat fSigma = float(SIGMA);\n\t\t\t\t\tfloat weightSum = gaussianPdf(0.0, fSigma);\n\t\t\t\t\tvec3 diffuseSum = texture2D( colorTexture, vUv).rgb * weightSum;\n\t\t\t\t\tfor( int i = 1; i < KERNEL_RADIUS; i ++ ) {\n\t\t\t\t\t\tfloat x = float(i);\n\t\t\t\t\t\tfloat w = gaussianPdf(x, fSigma);\n\t\t\t\t\t\tvec2 uvOffset = direction * invSize * x;\n\t\t\t\t\t\tvec3 sample1 = texture2D( colorTexture, vUv + uvOffset).rgb;\n\t\t\t\t\t\tvec3 sample2 = texture2D( colorTexture, vUv - uvOffset).rgb;\n\t\t\t\t\t\tdiffuseSum += (sample1 + sample2) * w;\n\t\t\t\t\t\tweightSum += 2.0 * w;\n\t\t\t\t\t}\n\t\t\t\t\tgl_FragColor = vec4(diffuseSum/weightSum, 1.0);\n\t\t\t\t}", + }); + }, + }, + { + key: "getCompositeMaterial", + value: function (e) { + return new A.ShaderMaterial({ + defines: { NUM_MIPS: e }, + uniforms: { + blurTexture1: { value: null }, + blurTexture2: { value: null }, + blurTexture3: { value: null }, + blurTexture4: { value: null }, + blurTexture5: { value: null }, + bloomStrength: { value: 1 }, + bloomFactors: { value: null }, + bloomTintColors: { value: null }, + bloomRadius: { value: 0 }, + }, + vertexShader: + "varying vec2 vUv;\n\t\t\t\tvoid main() {\n\t\t\t\t\tvUv = uv;\n\t\t\t\t\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n\t\t\t\t}", + fragmentShader: + "varying vec2 vUv;\n\t\t\t\tuniform sampler2D blurTexture1;\n\t\t\t\tuniform sampler2D blurTexture2;\n\t\t\t\tuniform sampler2D blurTexture3;\n\t\t\t\tuniform sampler2D blurTexture4;\n\t\t\t\tuniform sampler2D blurTexture5;\n\t\t\t\tuniform float bloomStrength;\n\t\t\t\tuniform float bloomRadius;\n\t\t\t\tuniform float bloomFactors[NUM_MIPS];\n\t\t\t\tuniform vec3 bloomTintColors[NUM_MIPS];\n\n\t\t\t\tfloat lerpBloomFactor(const in float factor) {\n\t\t\t\t\tfloat mirrorFactor = 1.2 - factor;\n\t\t\t\t\treturn mix(factor, mirrorFactor, bloomRadius);\n\t\t\t\t}\n\n\t\t\t\tvoid main() {\n\t\t\t\t\tgl_FragColor = bloomStrength * ( lerpBloomFactor(bloomFactors[0]) * vec4(bloomTintColors[0], 1.0) * texture2D(blurTexture1, vUv) +\n\t\t\t\t\t\tlerpBloomFactor(bloomFactors[1]) * vec4(bloomTintColors[1], 1.0) * texture2D(blurTexture2, vUv) +\n\t\t\t\t\t\tlerpBloomFactor(bloomFactors[2]) * vec4(bloomTintColors[2], 1.0) * texture2D(blurTexture3, vUv) +\n\t\t\t\t\t\tlerpBloomFactor(bloomFactors[3]) * vec4(bloomTintColors[3], 1.0) * texture2D(blurTexture4, vUv) +\n\t\t\t\t\t\tlerpBloomFactor(bloomFactors[4]) * vec4(bloomTintColors[4], 1.0) * texture2D(blurTexture5, vUv) );\n\t\t\t\t}", + }); + }, + }, + ]), + n + ); + })(Ia), + so = oo, + lo = null, + uo = { + defines: { + NUM_SAMPLES: 7, + NUM_RINGS: 4, + NORMAL_TEXTURE: 0, + DIFFUSE_TEXTURE: 0, + DEPTH_PACKING: 1, + PERSPECTIVE_CAMERA: 1, + }, + uniforms: { + tDepth: { value: null }, + tDiffuse: { value: null }, + tNormal: { value: null }, + size: { value: new A.Vector2(512, 512) }, + cameraNear: { value: 1 }, + cameraFar: { value: 100 }, + cameraProjectionMatrix: { value: new A.Matrix4() }, + cameraInverseProjectionMatrix: { value: new A.Matrix4() }, + scale: { value: 1 }, + intensity: { value: 0.1 }, + bias: { value: 0.5 }, + minResolution: { value: 0 }, + kernelRadius: { value: 100 }, + randomSeed: { value: 0 }, + }, + vertexShader: [ + "varying vec2 vUv;", + "void main() {", + "\tvUv = uv;", + "\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );", + "}", + ].join("\n"), + fragmentShader: [ + "#include ", + "varying vec2 vUv;", + "#if DIFFUSE_TEXTURE == 1", + "uniform sampler2D tDiffuse;", + "#endif", + "uniform sampler2D tDepth;", + "#if NORMAL_TEXTURE == 1", + "uniform sampler2D tNormal;", + "#endif", + "uniform float cameraNear;", + "uniform float cameraFar;", + "uniform mat4 cameraProjectionMatrix;", + "uniform mat4 cameraInverseProjectionMatrix;", + "uniform float scale;", + "uniform float intensity;", + "uniform float bias;", + "uniform float kernelRadius;", + "uniform float minResolution;", + "uniform vec2 size;", + "uniform float randomSeed;", + "// RGBA depth", + "#include ", + "vec4 getDefaultColor( const in vec2 screenPosition ) {", + "\t#if DIFFUSE_TEXTURE == 1", + "\treturn texture2D( tDiffuse, vUv );", + "\t#else", + "\treturn vec4( 1.0 );", + "\t#endif", + "}", + "float getDepth( const in vec2 screenPosition ) {", + "\t#if DEPTH_PACKING == 1", + "\treturn unpackRGBAToDepth( texture2D( tDepth, screenPosition ) );", + "\t#else", + "\treturn texture2D( tDepth, screenPosition ).x;", + "\t#endif", + "}", + "float getViewZ( const in float depth ) {", + "\t#if PERSPECTIVE_CAMERA == 1", + "\treturn perspectiveDepthToViewZ( depth, cameraNear, cameraFar );", + "\t#else", + "\treturn orthographicDepthToViewZ( depth, cameraNear, cameraFar );", + "\t#endif", + "}", + "vec3 getViewPosition( const in vec2 screenPosition, const in float depth, const in float viewZ ) {", + "\tfloat clipW = cameraProjectionMatrix[2][3] * viewZ + cameraProjectionMatrix[3][3];", + "\tvec4 clipPosition = vec4( ( vec3( screenPosition, depth ) - 0.5 ) * 2.0, 1.0 );", + "\tclipPosition *= clipW; // unprojection.", + "\treturn ( cameraInverseProjectionMatrix * clipPosition ).xyz;", + "}", + "vec3 getViewNormal( const in vec3 viewPosition, const in vec2 screenPosition ) {", + "\t#if NORMAL_TEXTURE == 1", + "\treturn unpackRGBToNormal( texture2D( tNormal, screenPosition ).xyz );", + "\t#else", + "\treturn normalize( cross( dFdx( viewPosition ), dFdy( viewPosition ) ) );", + "\t#endif", + "}", + "float scaleDividedByCameraFar;", + "float minResolutionMultipliedByCameraFar;", + "float getOcclusion( const in vec3 centerViewPosition, const in vec3 centerViewNormal, const in vec3 sampleViewPosition ) {", + "\tvec3 viewDelta = sampleViewPosition - centerViewPosition;", + "\tfloat viewDistance = length( viewDelta );", + "\tfloat scaledScreenDistance = scaleDividedByCameraFar * viewDistance;", + "\treturn max(0.0, (dot(centerViewNormal, viewDelta) - minResolutionMultipliedByCameraFar) / scaledScreenDistance - bias) / (1.0 + pow2( scaledScreenDistance ) );", + "}", + "// moving costly divides into consts", + "const float ANGLE_STEP = PI2 * float( NUM_RINGS ) / float( NUM_SAMPLES );", + "const float INV_NUM_SAMPLES = 1.0 / float( NUM_SAMPLES );", + "float getAmbientOcclusion( const in vec3 centerViewPosition ) {", + "\t// precompute some variables require in getOcclusion.", + "\tscaleDividedByCameraFar = scale / cameraFar;", + "\tminResolutionMultipliedByCameraFar = minResolution * cameraFar;", + "\tvec3 centerViewNormal = getViewNormal( centerViewPosition, vUv );", + "\t// jsfiddle that shows sample pattern: https://jsfiddle.net/a16ff1p7/", + "\tfloat angle = rand( vUv + randomSeed ) * PI2;", + "\tvec2 radius = vec2( kernelRadius * INV_NUM_SAMPLES ) / size;", + "\tvec2 radiusStep = radius;", + "\tfloat occlusionSum = 0.0;", + "\tfloat weightSum = 0.0;", + "\tfor( int i = 0; i < NUM_SAMPLES; i ++ ) {", + "\t\tvec2 sampleUv = vUv + vec2( cos( angle ), sin( angle ) ) * radius;", + "\t\tradius += radiusStep;", + "\t\tangle += ANGLE_STEP;", + "\t\tfloat sampleDepth = getDepth( sampleUv );", + "\t\tif( sampleDepth >= ( 1.0 - EPSILON ) ) {", + "\t\t\tcontinue;", + "\t\t}", + "\t\tfloat sampleViewZ = getViewZ( sampleDepth );", + "\t\tvec3 sampleViewPosition = getViewPosition( sampleUv, sampleDepth, sampleViewZ );", + "\t\tocclusionSum += getOcclusion( centerViewPosition, centerViewNormal, sampleViewPosition );", + "\t\tweightSum += 1.0;", + "\t}", + "\tif( weightSum == 0.0 ) discard;", + "\treturn occlusionSum * ( intensity / weightSum );", + "}", + "void main() {", + "\tfloat centerDepth = getDepth( vUv );", + "\tif( centerDepth >= ( 1.0 - EPSILON ) ) {", + "\t\tdiscard;", + "\t}", + "\tfloat centerViewZ = getViewZ( centerDepth );", + "\tvec3 viewPosition = getViewPosition( vUv, centerDepth, centerViewZ );", + "\tfloat ambientOcclusion = getAmbientOcclusion( viewPosition );", + "\tgl_FragColor = getDefaultColor( vUv );", + "\tgl_FragColor.xyz *= 1.0 - ambientOcclusion;", + "}", + ].join("\n"), + }, + co = { + defines: { + KERNEL_RADIUS: 4, + DEPTH_PACKING: 1, + PERSPECTIVE_CAMERA: 1, + }, + uniforms: { + tDiffuse: { value: null }, + size: { value: new A.Vector2(512, 512) }, + sampleUvOffsets: { value: [new A.Vector2(0, 0)] }, + sampleWeights: { value: [1] }, + tDepth: { value: null }, + cameraNear: { value: 10 }, + cameraFar: { value: 1e3 }, + depthCutoff: { value: 10 }, + }, + vertexShader: [ + "#include ", + "uniform vec2 size;", + "varying vec2 vUv;", + "varying vec2 vInvSize;", + "void main() {", + "\tvUv = uv;", + "\tvInvSize = 1.0 / size;", + "\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );", + "}", + ].join("\n"), + fragmentShader: [ + "#include ", + "#include ", + "uniform sampler2D tDiffuse;", + "uniform sampler2D tDepth;", + "uniform float cameraNear;", + "uniform float cameraFar;", + "uniform float depthCutoff;", + "uniform vec2 sampleUvOffsets[ KERNEL_RADIUS + 1 ];", + "uniform float sampleWeights[ KERNEL_RADIUS + 1 ];", + "varying vec2 vUv;", + "varying vec2 vInvSize;", + "float getDepth( const in vec2 screenPosition ) {", + "\t#if DEPTH_PACKING == 1", + "\treturn unpackRGBAToDepth( texture2D( tDepth, screenPosition ) );", + "\t#else", + "\treturn texture2D( tDepth, screenPosition ).x;", + "\t#endif", + "}", + "float getViewZ( const in float depth ) {", + "\t#if PERSPECTIVE_CAMERA == 1", + "\treturn perspectiveDepthToViewZ( depth, cameraNear, cameraFar );", + "\t#else", + "\treturn orthographicDepthToViewZ( depth, cameraNear, cameraFar );", + "\t#endif", + "}", + "void main() {", + "\tfloat depth = getDepth( vUv );", + "\tif( depth >= ( 1.0 - EPSILON ) ) {", + "\t\tdiscard;", + "\t}", + "\tfloat centerViewZ = -getViewZ( depth );", + "\tbool rBreak = false, lBreak = false;", + "\tfloat weightSum = sampleWeights[0];", + "\tvec4 diffuseSum = texture2D( tDiffuse, vUv ) * weightSum;", + "\tfor( int i = 1; i <= KERNEL_RADIUS; i ++ ) {", + "\t\tfloat sampleWeight = sampleWeights[i];", + "\t\tvec2 sampleUvOffset = sampleUvOffsets[i] * vInvSize;", + "\t\tvec2 sampleUv = vUv + sampleUvOffset;", + "\t\tfloat viewZ = -getViewZ( getDepth( sampleUv ) );", + "\t\tif( abs( viewZ - centerViewZ ) > depthCutoff ) rBreak = true;", + "\t\tif( ! rBreak ) {", + "\t\t\tdiffuseSum += texture2D( tDiffuse, sampleUv ) * sampleWeight;", + "\t\t\tweightSum += sampleWeight;", + "\t\t}", + "\t\tsampleUv = vUv - sampleUvOffset;", + "\t\tviewZ = -getViewZ( getDepth( sampleUv ) );", + "\t\tif( abs( viewZ - centerViewZ ) > depthCutoff ) lBreak = true;", + "\t\tif( ! lBreak ) {", + "\t\t\tdiffuseSum += texture2D( tDiffuse, sampleUv ) * sampleWeight;", + "\t\t\tweightSum += sampleWeight;", + "\t\t}", + "\t}", + "\tgl_FragColor = diffuseSum / weightSum;", + "}", + ].join("\n"), + }, + fo = { + createSampleWeights: function (e, t) { + for (var n, r, i = [], a = 0; a <= e; a++) + i.push( + ((n = a), + (r = t), + Math.exp((-n * n) / (r * r * 2)) / + (Math.sqrt(2 * Math.PI) * r)) + ); + return i; + }, + createSampleOffsets: function (e, t) { + for (var n = [], r = 0; r <= e; r++) + n.push(t.clone().multiplyScalar(r)); + return n; + }, + configure: function (e, t, n, r) { + (e.defines.KERNEL_RADIUS = t), + (e.uniforms.sampleUvOffsets.value = fo.createSampleOffsets( + t, + r + )), + (e.uniforms.sampleWeights.value = fo.createSampleWeights(t, n)), + (e.needsUpdate = !0); + }, + }, + ho = (function (e) { + (0, m.Z)(n, e); + var t = (0, g.Z)(n); + function n(e, r) { + var i, + a, + o = + arguments.length > 2 && + void 0 !== arguments[2] && + arguments[2], + s = + arguments.length > 3 && + void 0 !== arguments[3] && + arguments[3], + l = + arguments.length > 4 && void 0 !== arguments[4] + ? arguments[4] + : new A.Vector2(256, 256); + return ( + (0, p.Z)(this, n), + ((i = t.call(this)).scene = e), + (i.camera = r), + (i.clear = !0), + (i.needsSwap = !1), + (i.supportsDepthTextureExtension = o), + (i.supportsNormalTexture = s), + (i.originalClearColor = new A.Color()), + (i._oldClearColor = new A.Color()), + (i.oldClearAlpha = 1), + (i.params = { + output: 0, + saoBias: 0.5, + saoIntensity: 0.18, + saoScale: 1, + saoKernelRadius: 100, + saoMinResolution: 0, + saoBlur: !0, + saoBlurRadius: 8, + saoBlurStdDev: 4, + saoBlurDepthCutoff: 0.01, + }), + (i.resolution = new A.Vector2(l.x, l.y)), + (i.saoRenderTarget = new A.WebGLRenderTarget( + i.resolution.x, + i.resolution.y, + { type: A.HalfFloatType } + )), + (i.blurIntermediateRenderTarget = i.saoRenderTarget.clone()), + (i.beautyRenderTarget = i.saoRenderTarget.clone()), + (i.normalRenderTarget = new A.WebGLRenderTarget( + i.resolution.x, + i.resolution.y, + { + minFilter: A.NearestFilter, + magFilter: A.NearestFilter, + type: A.HalfFloatType, + } + )), + (i.depthRenderTarget = i.normalRenderTarget.clone()), + i.supportsDepthTextureExtension && + (((a = new A.DepthTexture()).type = A.UnsignedShortType), + (i.beautyRenderTarget.depthTexture = a), + (i.beautyRenderTarget.depthBuffer = !0)), + (i.depthMaterial = new A.MeshDepthMaterial()), + (i.depthMaterial.depthPacking = A.RGBADepthPacking), + (i.depthMaterial.blending = A.NoBlending), + (i.normalMaterial = new A.MeshNormalMaterial()), + (i.normalMaterial.blending = A.NoBlending), + (i.saoMaterial = new A.ShaderMaterial({ + defines: Object.assign({}, uo.defines), + fragmentShader: uo.fragmentShader, + vertexShader: uo.vertexShader, + uniforms: A.UniformsUtils.clone(uo.uniforms), + })), + (i.saoMaterial.extensions.derivatives = !0), + (i.saoMaterial.defines.DEPTH_PACKING = + i.supportsDepthTextureExtension ? 0 : 1), + (i.saoMaterial.defines.NORMAL_TEXTURE = i.supportsNormalTexture + ? 1 + : 0), + (i.saoMaterial.defines.PERSPECTIVE_CAMERA = i.camera + .isPerspectiveCamera + ? 1 + : 0), + (i.saoMaterial.uniforms.tDepth.value = + i.supportsDepthTextureExtension + ? a + : i.depthRenderTarget.texture), + (i.saoMaterial.uniforms.tNormal.value = + i.normalRenderTarget.texture), + i.saoMaterial.uniforms.size.value.set( + i.resolution.x, + i.resolution.y + ), + i.saoMaterial.uniforms.cameraInverseProjectionMatrix.value.copy( + i.camera.projectionMatrixInverse + ), + (i.saoMaterial.uniforms.cameraProjectionMatrix.value = + i.camera.projectionMatrix), + (i.saoMaterial.blending = A.NoBlending), + (i.vBlurMaterial = new A.ShaderMaterial({ + uniforms: A.UniformsUtils.clone(co.uniforms), + defines: Object.assign({}, co.defines), + vertexShader: co.vertexShader, + fragmentShader: co.fragmentShader, + })), + (i.vBlurMaterial.defines.DEPTH_PACKING = + i.supportsDepthTextureExtension ? 0 : 1), + (i.vBlurMaterial.defines.PERSPECTIVE_CAMERA = i.camera + .isPerspectiveCamera + ? 1 + : 0), + (i.vBlurMaterial.uniforms.tDiffuse.value = + i.saoRenderTarget.texture), + (i.vBlurMaterial.uniforms.tDepth.value = + i.supportsDepthTextureExtension + ? a + : i.depthRenderTarget.texture), + i.vBlurMaterial.uniforms.size.value.set( + i.resolution.x, + i.resolution.y + ), + (i.vBlurMaterial.blending = A.NoBlending), + (i.hBlurMaterial = new A.ShaderMaterial({ + uniforms: A.UniformsUtils.clone(co.uniforms), + defines: Object.assign({}, co.defines), + vertexShader: co.vertexShader, + fragmentShader: co.fragmentShader, + })), + (i.hBlurMaterial.defines.DEPTH_PACKING = + i.supportsDepthTextureExtension ? 0 : 1), + (i.hBlurMaterial.defines.PERSPECTIVE_CAMERA = i.camera + .isPerspectiveCamera + ? 1 + : 0), + (i.hBlurMaterial.uniforms.tDiffuse.value = + i.blurIntermediateRenderTarget.texture), + (i.hBlurMaterial.uniforms.tDepth.value = + i.supportsDepthTextureExtension + ? a + : i.depthRenderTarget.texture), + i.hBlurMaterial.uniforms.size.value.set( + i.resolution.x, + i.resolution.y + ), + (i.hBlurMaterial.blending = A.NoBlending), + (i.materialCopy = new A.ShaderMaterial({ + uniforms: A.UniformsUtils.clone(Va.uniforms), + vertexShader: Va.vertexShader, + fragmentShader: Va.fragmentShader, + blending: A.NoBlending, + })), + (i.materialCopy.transparent = !0), + (i.materialCopy.depthTest = !1), + (i.materialCopy.depthWrite = !1), + (i.materialCopy.blending = A.CustomBlending), + (i.materialCopy.blendSrc = A.DstColorFactor), + (i.materialCopy.blendDst = A.ZeroFactor), + (i.materialCopy.blendEquation = A.AddEquation), + (i.materialCopy.blendSrcAlpha = A.DstAlphaFactor), + (i.materialCopy.blendDstAlpha = A.ZeroFactor), + (i.materialCopy.blendEquationAlpha = A.AddEquation), + (i.depthCopy = new A.ShaderMaterial({ + uniforms: A.UniformsUtils.clone(qr.uniforms), + vertexShader: qr.vertexShader, + fragmentShader: qr.fragmentShader, + blending: A.NoBlending, + })), + (i.fsQuad = new ka(null)), + i + ); + } + return ( + (0, v.Z)(n, [ + { + key: "render", + value: function (e, t, n) { + if ( + (this.renderToScreen && + ((this.materialCopy.blending = A.NoBlending), + (this.materialCopy.uniforms.tDiffuse.value = n.texture), + (this.materialCopy.needsUpdate = !0), + this.renderPass(e, this.materialCopy, null)), + 1 !== this.params.output) + ) { + e.getClearColor(this._oldClearColor), + (this.oldClearAlpha = e.getClearAlpha()); + var r = e.autoClear; + (e.autoClear = !1), + e.setRenderTarget(this.depthRenderTarget), + e.clear(), + (this.saoMaterial.uniforms.bias.value = + this.params.saoBias), + (this.saoMaterial.uniforms.intensity.value = + this.params.saoIntensity), + (this.saoMaterial.uniforms.scale.value = + this.params.saoScale), + (this.saoMaterial.uniforms.kernelRadius.value = + this.params.saoKernelRadius), + (this.saoMaterial.uniforms.minResolution.value = + this.params.saoMinResolution), + (this.saoMaterial.uniforms.cameraNear.value = + this.camera.near), + (this.saoMaterial.uniforms.cameraFar.value = + this.camera.far); + var i = + this.params.saoBlurDepthCutoff * + (this.camera.far - this.camera.near); + (this.vBlurMaterial.uniforms.depthCutoff.value = i), + (this.hBlurMaterial.uniforms.depthCutoff.value = i), + (this.vBlurMaterial.uniforms.cameraNear.value = + this.camera.near), + (this.vBlurMaterial.uniforms.cameraFar.value = + this.camera.far), + (this.hBlurMaterial.uniforms.cameraNear.value = + this.camera.near), + (this.hBlurMaterial.uniforms.cameraFar.value = + this.camera.far), + (this.params.saoBlurRadius = Math.floor( + this.params.saoBlurRadius + )), + (this.prevStdDev === this.params.saoBlurStdDev && + this.prevNumSamples === this.params.saoBlurRadius) || + (fo.configure( + this.vBlurMaterial, + this.params.saoBlurRadius, + this.params.saoBlurStdDev, + new A.Vector2(0, 1) + ), + fo.configure( + this.hBlurMaterial, + this.params.saoBlurRadius, + this.params.saoBlurStdDev, + new A.Vector2(1, 0) + ), + (this.prevStdDev = this.params.saoBlurStdDev), + (this.prevNumSamples = this.params.saoBlurRadius)), + e.setClearColor(0), + e.setRenderTarget(this.beautyRenderTarget), + e.clear(), + e.render(this.scene, this.camera), + this.supportsDepthTextureExtension || + this.renderOverride( + e, + this.depthMaterial, + this.depthRenderTarget, + 0, + 1 + ), + this.supportsNormalTexture && + this.renderOverride( + e, + this.normalMaterial, + this.normalRenderTarget, + 7829503, + 1 + ), + this.renderPass( + e, + this.saoMaterial, + this.saoRenderTarget, + 16777215, + 1 + ), + this.params.saoBlur && + (this.renderPass( + e, + this.vBlurMaterial, + this.blurIntermediateRenderTarget, + 16777215, + 1 + ), + this.renderPass( + e, + this.hBlurMaterial, + this.saoRenderTarget, + 16777215, + 1 + )); + var a = this.materialCopy; + 3 === this.params.output + ? this.supportsDepthTextureExtension + ? ((this.materialCopy.uniforms.tDiffuse.value = + this.beautyRenderTarget.depthTexture), + (this.materialCopy.needsUpdate = !0)) + : ((this.depthCopy.uniforms.tDiffuse.value = + this.depthRenderTarget.texture), + (this.depthCopy.needsUpdate = !0), + (a = this.depthCopy)) + : 4 === this.params.output + ? ((this.materialCopy.uniforms.tDiffuse.value = + this.normalRenderTarget.texture), + (this.materialCopy.needsUpdate = !0)) + : ((this.materialCopy.uniforms.tDiffuse.value = + this.saoRenderTarget.texture), + (this.materialCopy.needsUpdate = !0)), + 0 === this.params.output + ? (a.blending = A.CustomBlending) + : (a.blending = A.NoBlending), + this.renderPass(e, a, this.renderToScreen ? null : n), + e.setClearColor( + this._oldClearColor, + this.oldClearAlpha + ), + (e.autoClear = r); + } + }, + }, + { + key: "renderPass", + value: function (e, t, n, r, i) { + e.getClearColor(this.originalClearColor); + var a = e.getClearAlpha(), + o = e.autoClear; + e.setRenderTarget(n), + (e.autoClear = !1), + void 0 !== r && + null !== r && + (e.setClearColor(r), + e.setClearAlpha(i || 0), + e.clear()), + (this.fsQuad.material = t), + this.fsQuad.render(e), + (e.autoClear = o), + e.setClearColor(this.originalClearColor), + e.setClearAlpha(a); + }, + }, + { + key: "renderOverride", + value: function (e, t, n, r, i) { + e.getClearColor(this.originalClearColor); + var a = e.getClearAlpha(), + o = e.autoClear; + e.setRenderTarget(n), + (e.autoClear = !1), + (r = t.clearColor || r), + (i = t.clearAlpha || i), + void 0 !== r && + null !== r && + (e.setClearColor(r), + e.setClearAlpha(i || 0), + e.clear()), + (this.scene.overrideMaterial = t), + e.render(this.scene, this.camera), + (this.scene.overrideMaterial = null), + (e.autoClear = o), + e.setClearColor(this.originalClearColor), + e.setClearAlpha(a); + }, + }, + { + key: "setSize", + value: function (e, t) { + this.beautyRenderTarget.setSize(e, t), + this.saoRenderTarget.setSize(e, t), + this.blurIntermediateRenderTarget.setSize(e, t), + this.normalRenderTarget.setSize(e, t), + this.depthRenderTarget.setSize(e, t), + this.saoMaterial.uniforms.size.value.set(e, t), + this.saoMaterial.uniforms.cameraInverseProjectionMatrix.value.copy( + this.camera.projectionMatrixInverse + ), + (this.saoMaterial.uniforms.cameraProjectionMatrix.value = + this.camera.projectionMatrix), + (this.saoMaterial.needsUpdate = !0), + this.vBlurMaterial.uniforms.size.value.set(e, t), + (this.vBlurMaterial.needsUpdate = !0), + this.hBlurMaterial.uniforms.size.value.set(e, t), + (this.hBlurMaterial.needsUpdate = !0); + }, + }, + { + key: "dispose", + value: function () { + this.saoRenderTarget.dispose(), + this.blurIntermediateRenderTarget.dispose(), + this.beautyRenderTarget.dispose(), + this.normalRenderTarget.dispose(), + this.depthRenderTarget.dispose(), + this.depthMaterial.dispose(), + this.normalMaterial.dispose(), + this.saoMaterial.dispose(), + this.vBlurMaterial.dispose(), + this.hBlurMaterial.dispose(), + this.materialCopy.dispose(), + this.depthCopy.dispose(), + this.fsQuad.dispose(); + }, + }, + ]), + n + ); + })(Ia), + po = { + uniforms: { + damp: { value: 0.96 }, + tOld: { value: null }, + tNew: { value: null }, + }, + vertexShader: [ + "varying vec2 vUv;", + "void main() {", + "\tvUv = uv;", + "\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );", + "}", + ].join("\n"), + fragmentShader: [ + "uniform float damp;", + "uniform sampler2D tOld;", + "uniform sampler2D tNew;", + "varying vec2 vUv;", + "vec4 when_gt( vec4 x, float y ) {", + "\treturn max( sign( x - y ), 0.0 );", + "}", + "void main() {", + "\tvec4 texelOld = texture2D( tOld, vUv );", + "\tvec4 texelNew = texture2D( tNew, vUv );", + "\ttexelOld *= damp * when_gt( texelOld, 0.1 );", + "\tgl_FragColor = max(texelNew, texelOld);", + "}", + ].join("\n"), + }, + vo = null, + mo = null, + go = null, + Ao = null, + yo = { + uniforms: { + tDiffuse: { value: null }, + tSize: { value: new A.Vector2(256, 256) }, + center: { value: new A.Vector2(0.5, 0.5) }, + angle: { value: 1.57 }, + scale: { value: 1 }, + }, + vertexShader: [ + "varying vec2 vUv;", + "void main() {", + "\tvUv = uv;", + "\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );", + "}", + ].join("\n"), + fragmentShader: [ + "uniform vec2 center;", + "uniform float angle;", + "uniform float scale;", + "uniform vec2 tSize;", + "uniform sampler2D tDiffuse;", + "varying vec2 vUv;", + "float pattern() {", + "\tfloat s = sin( angle ), c = cos( angle );", + "\tvec2 tex = vUv * tSize - center;", + "\tvec2 point = vec2( c * tex.x - s * tex.y, s * tex.x + c * tex.y ) * scale;", + "\treturn ( sin( point.x ) * sin( point.y ) ) * 4.0;", + "}", + "void main() {", + "\tvec4 color = texture2D( tDiffuse, vUv );", + "\tfloat average = ( color.r + color.g + color.b ) / 3.0;", + "\tgl_FragColor = vec4( vec3( average * 10.0 - 5.0 + pattern() ), color.a );", + "}", + ].join("\n"), + }, + bo = null, + xo = { + defines: { + MAX_STEP: 0, + isPerspectiveCamera: !0, + isDistanceAttenuation: !0, + isFresnel: !0, + isInfiniteThick: !1, + isSelective: !1, + }, + uniforms: { + tDiffuse: { value: null }, + tNormal: { value: null }, + tMetalness: { value: null }, + tDepth: { value: null }, + cameraNear: { value: null }, + cameraFar: { value: null }, + resolution: { value: new A.Vector2() }, + cameraProjectionMatrix: { value: new A.Matrix4() }, + cameraInverseProjectionMatrix: { value: new A.Matrix4() }, + opacity: { value: 0.5 }, + maxDistance: { value: 180 }, + cameraRange: { value: 0 }, + surfDist: { value: 0.007 }, + thickTolerance: { value: 0.03 }, + }, + vertexShader: + "\n\n varying vec2 vUv;\n\n void main() {\n\n\t\t\tvUv = uv;\n\n\t\t\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n\n }\n\n ", + fragmentShader: + "\n\t\t// precision highp float;\n\t\tprecision highp sampler2D;\n\t\tvarying vec2 vUv;\n\t\tuniform sampler2D tDepth;\n\t\tuniform sampler2D tNormal;\n\t\tuniform sampler2D tMetalness;\n\t\tuniform sampler2D tDiffuse;\n\t\tuniform float cameraRange;\n\t\tuniform vec2 resolution;\n\t\tuniform float opacity;\n\t\tuniform float cameraNear;\n\t\tuniform float cameraFar;\n\t\tuniform float maxDistance;\n\t\tuniform float surfDist;\n\t\tuniform mat4 cameraProjectionMatrix;\n\t\tuniform mat4 cameraInverseProjectionMatrix;\n\t\tuniform float thickTolerance;\n\t\t#include \n\t\tfloat pointToLineDistance(vec3 x0, vec3 x1, vec3 x2) {\n\t\t\t//x0: point, x1: linePointA, x2: linePointB\n\t\t\t//https://mathworld.wolfram.com/Point-LineDistance3-Dimensional.html\n\t\t\treturn length(cross(x0-x1,x0-x2))/length(x2-x1);\n\t\t}\n\t\tfloat pointPlaneDistance(vec3 point,vec3 planePoint,vec3 planeNormal){\n\t\t\t// https://mathworld.wolfram.com/Point-PlaneDistance.html\n\t\t\t//// https://en.wikipedia.org/wiki/Plane_(geometry)\n\t\t\t//// http://paulbourke.net/geometry/pointlineplane/\n\t\t\tfloat a=planeNormal.x,b=planeNormal.y,c=planeNormal.z;\n\t\t\tfloat x0=point.x,y0=point.y,z0=point.z;\n\t\t\tfloat x=planePoint.x,y=planePoint.y,z=planePoint.z;\n\t\t\tfloat d=-(a*x+b*y+c*z);\n\t\t\tfloat distance=(a*x0+b*y0+c*z0+d)/sqrt(a*a+b*b+c*c);\n\t\t\treturn distance;\n\t\t}\n\t\tfloat getDepth( const in vec2 uv ) {\n\t\t\treturn texture2D( tDepth, uv ).x;\n\t\t}\n\t\tfloat getViewZ( const in float depth ) {\n\t\t\t#ifdef isPerspectiveCamera\n\t\t\t\treturn perspectiveDepthToViewZ( depth, cameraNear, cameraFar );\n\t\t\t#else\n\t\t\t\treturn orthographicDepthToViewZ( depth, cameraNear, cameraFar );\n\t\t\t#endif\n\t\t}\n\t\tvec3 getViewPosition( const in vec2 uv, const in float depth/*clip space*/, const in float clipW ) {\n\t\t\tvec4 clipPosition = vec4( ( vec3( uv, depth ) - 0.5 ) * 2.0, 1.0 );//ndc\n\t\t\tclipPosition *= clipW; //clip\n\t\t\treturn ( cameraInverseProjectionMatrix * clipPosition ).xyz;//view\n\t\t}\n\t\tvec3 getViewNormal( const in vec2 uv ) {\n\t\t\treturn unpackRGBToNormal( texture2D( tNormal, uv ).xyz );\n\t\t}\n\t\tvec2 viewPositionToXY(vec3 viewPosition){\n\t\t\tvec2 xy;\n\t\t\tvec4 clip=cameraProjectionMatrix*vec4(viewPosition,1);\n\t\t\txy=clip.xy;//clip\n\t\t\tfloat clipW=clip.w;\n\t\t\txy/=clipW;//NDC\n\t\t\txy=(xy+1.)/2.;//uv\n\t\t\txy*=resolution;//screen\n\t\t\treturn xy;\n\t\t}\n\t\tvoid main(){\n\t\t\t#ifdef isSelective\n\t\t\t\tfloat metalness=texture2D(tMetalness,vUv).r;\n\t\t\t\tif(metalness==0.) return;\n\t\t\t#endif\n\n\t\t\tfloat depth = getDepth( vUv );\n\t\t\tfloat viewZ = getViewZ( depth );\n\t\t\tif(-viewZ>=cameraFar) return;\n\n\t\t\tfloat clipW = cameraProjectionMatrix[2][3] * viewZ+cameraProjectionMatrix[3][3];\n\t\t\tvec3 viewPosition=getViewPosition( vUv, depth, clipW );\n\n\t\t\tvec2 d0=gl_FragCoord.xy;\n\t\t\tvec2 d1;\n\n\t\t\tvec3 viewNormal=getViewNormal( vUv );\n\n\t\t\t#ifdef isPerspectiveCamera\n\t\t\t\tvec3 viewIncidenceDir=normalize(viewPosition);\n\t\t\t\tvec3 viewReflectDir=reflect(viewIncidenceDir,viewNormal);\n\t\t\t#else\n\t\t\t\tvec3 viewIncidenceDir=vec3(0,0,-1);\n\t\t\t\tvec3 viewReflectDir=reflect(viewIncidenceDir,viewNormal);\n\t\t\t#endif\n\n\t\t\tfloat maxReflectRayLen=maxDistance/dot(-viewIncidenceDir,viewNormal);\n\t\t\t// dot(a,b)==length(a)*length(b)*cos(theta) // https://www.mathsisfun.com/algebra/vectors-dot-product.html\n\t\t\t// if(a.isNormalized&&b.isNormalized) dot(a,b)==cos(theta)\n\t\t\t// maxDistance/maxReflectRayLen=cos(theta)\n\t\t\t// maxDistance/maxReflectRayLen==dot(a,b)\n\t\t\t// maxReflectRayLen==maxDistance/dot(a,b)\n\n\t\t\tvec3 d1viewPosition=viewPosition+viewReflectDir*maxReflectRayLen;\n\t\t\t#ifdef isPerspectiveCamera\n\t\t\t\tif(d1viewPosition.z>-cameraNear){\n\t\t\t\t\t//https://tutorial.math.lamar.edu/Classes/CalcIII/EqnsOfLines.aspx\n\t\t\t\t\tfloat t=(-cameraNear-viewPosition.z)/viewReflectDir.z;\n\t\t\t\t\td1viewPosition=viewPosition+viewReflectDir*t;\n\t\t\t\t}\n\t\t\t#endif\n\t\t\td1=viewPositionToXY(d1viewPosition);\n\n\t\t\tfloat totalLen=length(d1-d0);\n\t\t\tfloat xLen=d1.x-d0.x;\n\t\t\tfloat yLen=d1.y-d0.y;\n\t\t\tfloat totalStep=max(abs(xLen),abs(yLen));\n\t\t\tfloat xSpan=xLen/totalStep;\n\t\t\tfloat ySpan=yLen/totalStep;\n\t\t\tfor(float i=0.;i=totalStep) break;\n\t\t\t\tvec2 xy=vec2(d0.x+i*xSpan,d0.y+i*ySpan);\n\t\t\t\tif(xy.x<0.||xy.x>resolution.x||xy.y<0.||xy.y>resolution.y) break;\n\t\t\t\tfloat s=length(xy-d0)/totalLen;\n\t\t\t\tvec2 uv=xy/resolution;\n\n\t\t\t\tfloat d = getDepth(uv);\n\t\t\t\tfloat vZ = getViewZ( d );\n\t\t\t\tif(-vZ>=cameraFar) continue;\n\t\t\t\tfloat cW = cameraProjectionMatrix[2][3] * vZ+cameraProjectionMatrix[3][3];\n\t\t\t\tvec3 vP=getViewPosition( uv, d, cW );\n\n\t\t\t\t#ifdef isPerspectiveCamera\n\t\t\t\t\t// https://www.comp.nus.edu.sg/~lowkl/publications/lowk_persp_interp_techrep.pdf\n\t\t\t\t\tfloat recipVPZ=1./viewPosition.z;\n\t\t\t\t\tfloat viewReflectRayZ=1./(recipVPZ+s*(1./d1viewPosition.z-recipVPZ));\n\t\t\t\t\tfloat sD=surfDist*cW;\n\t\t\t\t#else\n\t\t\t\t\tfloat viewReflectRayZ=viewPosition.z+s*(d1viewPosition.z-viewPosition.z);\n\t\t\t\t\tfloat sD=surfDist;\n\t\t\t\t#endif\n\t\t\t\tif(viewReflectRayZ-sD>vZ) continue;\n\n\t\t\t\t#ifdef isInfiniteThick\n\t\t\t\t\tif(viewReflectRayZ+thickTolerance*clipW=0.) continue;\n\t\t\t\t\tfloat distance=pointPlaneDistance(vP,viewPosition,viewNormal);\n\t\t\t\t\tif(distance>maxDistance) break;\n\t\t\t\t\t#ifdef isDistanceAttenuation\n\t\t\t\t\t\tfloat ratio=1.-(distance/maxDistance);\n\t\t\t\t\t\tfloat attenuation=ratio*ratio;\n\t\t\t\t\t\top=opacity*attenuation;\n\t\t\t\t\t#endif\n\t\t\t\t\t#ifdef isFresnel\n\t\t\t\t\t\tfloat fresnel=(dot(viewIncidenceDir,viewReflectDir)+1.)/2.;\n\t\t\t\t\t\top*=fresnel;\n\t\t\t\t\t#endif\n\t\t\t\t\tvec4 reflectColor=texture2D(tDiffuse,uv);\n\t\t\t\t\tgl_FragColor.xyz=reflectColor.xyz;\n\t\t\t\t\tgl_FragColor.a=op;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t", + }, + So = { + defines: { PERSPECTIVE_CAMERA: 1 }, + uniforms: { + tDepth: { value: null }, + cameraNear: { value: null }, + cameraFar: { value: null }, + }, + vertexShader: + "\n\n varying vec2 vUv;\n\n void main() {\n\n \tvUv = uv;\n \tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n\n }\n\n ", + fragmentShader: + "\n\n uniform sampler2D tDepth;\n\n uniform float cameraNear;\n uniform float cameraFar;\n\n varying vec2 vUv;\n\n #include \n\n\t\tfloat getLinearDepth( const in vec2 uv ) {\n\n\t\t\t#if PERSPECTIVE_CAMERA == 1\n\n\t\t\t\tfloat fragCoordZ = texture2D( tDepth, uv ).x;\n\t\t\t\tfloat viewZ = perspectiveDepthToViewZ( fragCoordZ, cameraNear, cameraFar );\n\t\t\t\treturn viewZToOrthographicDepth( viewZ, cameraNear, cameraFar );\n\n\t\t\t#else\n\n\t\t\t\treturn texture2D( tDepth, uv ).x;\n\n\t\t\t#endif\n\n\t\t}\n\n void main() {\n\n \tfloat depth = getLinearDepth( vUv );\n\t\t\tfloat d = 1.0 - depth;\n\t\t\t// d=(d-.999)*1000.;\n \tgl_FragColor = vec4( vec3( d ), 1.0 );\n\n }\n\n ", + }, + Eo = { + uniforms: { + tDiffuse: { value: null }, + resolution: { value: new A.Vector2() }, + opacity: { value: 0.5 }, + }, + vertexShader: + "\n\n varying vec2 vUv;\n\n void main() {\n\n \tvUv = uv;\n \tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n\n }\n\n ", + fragmentShader: + "\n\n uniform sampler2D tDiffuse;\n uniform vec2 resolution;\n varying vec2 vUv;\n void main() {\n\t\t\t//reverse engineering from PhotoShop blur filter, then change coefficient\n\n \tvec2 texelSize = ( 1.0 / resolution );\n\n\t\t\tvec4 c=texture2D(tDiffuse,vUv);\n\n\t\t\tvec2 offset;\n\n\t\t\toffset=(vec2(-1,0))*texelSize;\n\t\t\tvec4 cl=texture2D(tDiffuse,vUv+offset);\n\n\t\t\toffset=(vec2(1,0))*texelSize;\n\t\t\tvec4 cr=texture2D(tDiffuse,vUv+offset);\n\n\t\t\toffset=(vec2(0,-1))*texelSize;\n\t\t\tvec4 cb=texture2D(tDiffuse,vUv+offset);\n\n\t\t\toffset=(vec2(0,1))*texelSize;\n\t\t\tvec4 ct=texture2D(tDiffuse,vUv+offset);\n\n\t\t\t// float coeCenter=.5;\n\t\t\t// float coeSide=.125;\n\t\t\tfloat coeCenter=.2;\n\t\t\tfloat coeSide=.2;\n\t\t\tfloat a=c.a*coeCenter+cl.a*coeSide+cr.a*coeSide+cb.a*coeSide+ct.a*coeSide;\n\t\t\tvec3 rgb=(c.rgb*c.a*coeCenter+cl.rgb*cl.a*coeSide+cr.rgb*cr.a*coeSide+cb.rgb*cb.a*coeSide+ct.rgb*ct.a*coeSide)/a;\n\t\t\tgl_FragColor=vec4(rgb,a);\n\n\t\t}\n\t", + }, + _o = (function (e) { + (0, m.Z)(n, e); + var t = (0, g.Z)(n); + function n(e) { + var r, + i = e.renderer, + a = e.scene, + o = e.camera, + s = e.width, + l = e.height, + u = e.selects, + c = e.bouncing, + d = void 0 !== c && c, + h = e.groundReflector; + (0, p.Z)(this, n), + ((r = t.call(this)).width = void 0 !== s ? s : 512), + (r.height = void 0 !== l ? l : 512), + (r.clear = !0), + (r.renderer = i), + (r.scene = a), + (r.camera = o), + (r.groundReflector = h), + (r.opacity = xo.uniforms.opacity.value), + (r.output = 0), + (r.maxDistance = xo.uniforms.maxDistance.value), + (r.thickness = xo.uniforms.thickness.value), + (r.tempColor = new A.Color()), + (r._selects = u), + (r.selective = Array.isArray(r._selects)), + Object.defineProperty((0, f.Z)(r), "selects", { + get: function () { + return this._selects; + }, + set: function (e) { + this._selects !== e && + ((this._selects = e), + Array.isArray(e) + ? ((this.selective = !0), + (this.ssrMaterial.defines.SELECTIVE = !0), + (this.ssrMaterial.needsUpdate = !0)) + : ((this.selective = !1), + (this.ssrMaterial.defines.SELECTIVE = !1), + (this.ssrMaterial.needsUpdate = !0))); + }, + }), + (r._bouncing = d), + Object.defineProperty((0, f.Z)(r), "bouncing", { + get: function () { + return this._bouncing; + }, + set: function (e) { + this._bouncing !== e && + ((this._bouncing = e), + (this.ssrMaterial.uniforms.tDiffuse.value = e + ? this.prevRenderTarget.texture + : this.beautyRenderTarget.texture)); + }, + }), + (r.blur = !0), + (r._distanceAttenuation = xo.defines.DISTANCE_ATTENUATION), + Object.defineProperty((0, f.Z)(r), "distanceAttenuation", { + get: function () { + return this._distanceAttenuation; + }, + set: function (e) { + this._distanceAttenuation !== e && + ((this._distanceAttenuation = e), + (this.ssrMaterial.defines.DISTANCE_ATTENUATION = e), + (this.ssrMaterial.needsUpdate = !0)); + }, + }), + (r._fresnel = xo.defines.FRESNEL), + Object.defineProperty((0, f.Z)(r), "fresnel", { + get: function () { + return this._fresnel; + }, + set: function (e) { + this._fresnel !== e && + ((this._fresnel = e), + (this.ssrMaterial.defines.FRESNEL = e), + (this.ssrMaterial.needsUpdate = !0)); + }, + }), + (r._infiniteThick = xo.defines.INFINITE_THICK), + Object.defineProperty((0, f.Z)(r), "infiniteThick", { + get: function () { + return this._infiniteThick; + }, + set: function (e) { + this._infiniteThick !== e && + ((this._infiniteThick = e), + (this.ssrMaterial.defines.INFINITE_THICK = e), + (this.ssrMaterial.needsUpdate = !0)); + }, + }); + var v = new A.DepthTexture(); + return ( + (v.type = A.UnsignedShortType), + (v.minFilter = A.NearestFilter), + (v.magFilter = A.NearestFilter), + (r.beautyRenderTarget = new A.WebGLRenderTarget( + r.width, + r.height, + { + minFilter: A.NearestFilter, + magFilter: A.NearestFilter, + type: A.HalfFloatType, + depthTexture: v, + depthBuffer: !0, + } + )), + (r.prevRenderTarget = new A.WebGLRenderTarget( + r.width, + r.height, + { minFilter: A.NearestFilter, magFilter: A.NearestFilter } + )), + (r.normalRenderTarget = new A.WebGLRenderTarget( + r.width, + r.height, + { + minFilter: A.NearestFilter, + magFilter: A.NearestFilter, + type: A.HalfFloatType, + } + )), + (r.metalnessRenderTarget = new A.WebGLRenderTarget( + r.width, + r.height, + { + minFilter: A.NearestFilter, + magFilter: A.NearestFilter, + type: A.HalfFloatType, + } + )), + (r.ssrRenderTarget = new A.WebGLRenderTarget( + r.width, + r.height, + { minFilter: A.NearestFilter, magFilter: A.NearestFilter } + )), + (r.blurRenderTarget = r.ssrRenderTarget.clone()), + (r.blurRenderTarget2 = r.ssrRenderTarget.clone()), + (r.ssrMaterial = new A.ShaderMaterial({ + defines: Object.assign({}, xo.defines, { + MAX_STEP: Math.sqrt( + r.width * r.width + r.height * r.height + ), + }), + uniforms: A.UniformsUtils.clone(xo.uniforms), + vertexShader: xo.vertexShader, + fragmentShader: xo.fragmentShader, + blending: A.NoBlending, + })), + (r.ssrMaterial.uniforms.tDiffuse.value = + r.beautyRenderTarget.texture), + (r.ssrMaterial.uniforms.tNormal.value = + r.normalRenderTarget.texture), + (r.ssrMaterial.defines.SELECTIVE = r.selective), + (r.ssrMaterial.needsUpdate = !0), + (r.ssrMaterial.uniforms.tMetalness.value = + r.metalnessRenderTarget.texture), + (r.ssrMaterial.uniforms.tDepth.value = + r.beautyRenderTarget.depthTexture), + (r.ssrMaterial.uniforms.cameraNear.value = r.camera.near), + (r.ssrMaterial.uniforms.cameraFar.value = r.camera.far), + (r.ssrMaterial.uniforms.thickness.value = r.thickness), + r.ssrMaterial.uniforms.resolution.value.set(r.width, r.height), + r.ssrMaterial.uniforms.cameraProjectionMatrix.value.copy( + r.camera.projectionMatrix + ), + r.ssrMaterial.uniforms.cameraInverseProjectionMatrix.value.copy( + r.camera.projectionMatrixInverse + ), + (r.normalMaterial = new A.MeshNormalMaterial()), + (r.normalMaterial.blending = A.NoBlending), + (r.metalnessOnMaterial = new A.MeshBasicMaterial({ + color: "white", + })), + (r.metalnessOffMaterial = new A.MeshBasicMaterial({ + color: "black", + })), + (r.blurMaterial = new A.ShaderMaterial({ + defines: Object.assign({}, Eo.defines), + uniforms: A.UniformsUtils.clone(Eo.uniforms), + vertexShader: Eo.vertexShader, + fragmentShader: Eo.fragmentShader, + })), + (r.blurMaterial.uniforms.tDiffuse.value = + r.ssrRenderTarget.texture), + r.blurMaterial.uniforms.resolution.value.set(r.width, r.height), + (r.blurMaterial2 = new A.ShaderMaterial({ + defines: Object.assign({}, Eo.defines), + uniforms: A.UniformsUtils.clone(Eo.uniforms), + vertexShader: Eo.vertexShader, + fragmentShader: Eo.fragmentShader, + })), + (r.blurMaterial2.uniforms.tDiffuse.value = + r.blurRenderTarget.texture), + r.blurMaterial2.uniforms.resolution.value.set( + r.width, + r.height + ), + (r.depthRenderMaterial = new A.ShaderMaterial({ + defines: Object.assign({}, So.defines), + uniforms: A.UniformsUtils.clone(So.uniforms), + vertexShader: So.vertexShader, + fragmentShader: So.fragmentShader, + blending: A.NoBlending, + })), + (r.depthRenderMaterial.uniforms.tDepth.value = + r.beautyRenderTarget.depthTexture), + (r.depthRenderMaterial.uniforms.cameraNear.value = + r.camera.near), + (r.depthRenderMaterial.uniforms.cameraFar.value = r.camera.far), + (r.copyMaterial = new A.ShaderMaterial({ + uniforms: A.UniformsUtils.clone(Va.uniforms), + vertexShader: Va.vertexShader, + fragmentShader: Va.fragmentShader, + transparent: !0, + depthTest: !1, + depthWrite: !1, + blendSrc: A.SrcAlphaFactor, + blendDst: A.OneMinusSrcAlphaFactor, + blendEquation: A.AddEquation, + blendSrcAlpha: A.SrcAlphaFactor, + blendDstAlpha: A.OneMinusSrcAlphaFactor, + blendEquationAlpha: A.AddEquation, + })), + (r.fsQuad = new ka(null)), + (r.originalClearColor = new A.Color()), + r + ); + } + return ( + (0, v.Z)(n, [ + { + key: "dispose", + value: function () { + this.beautyRenderTarget.dispose(), + this.prevRenderTarget.dispose(), + this.normalRenderTarget.dispose(), + this.metalnessRenderTarget.dispose(), + this.ssrRenderTarget.dispose(), + this.blurRenderTarget.dispose(), + this.blurRenderTarget2.dispose(), + this.normalMaterial.dispose(), + this.metalnessOnMaterial.dispose(), + this.metalnessOffMaterial.dispose(), + this.blurMaterial.dispose(), + this.blurMaterial2.dispose(), + this.copyMaterial.dispose(), + this.depthRenderMaterial.dispose(), + this.fsQuad.dispose(); + }, + }, + { + key: "render", + value: function (e, t) { + switch ( + (e.setRenderTarget(this.beautyRenderTarget), + e.clear(), + this.groundReflector && + ((this.groundReflector.visible = !1), + this.groundReflector.doRender( + this.renderer, + this.scene, + this.camera + ), + (this.groundReflector.visible = !0)), + e.render(this.scene, this.camera), + this.groundReflector && + (this.groundReflector.visible = !1), + this.renderOverride( + e, + this.normalMaterial, + this.normalRenderTarget, + 0, + 0 + ), + this.selective && + this.renderMetalness( + e, + this.metalnessOnMaterial, + this.metalnessRenderTarget, + 0, + 0 + ), + (this.ssrMaterial.uniforms.opacity.value = this.opacity), + (this.ssrMaterial.uniforms.maxDistance.value = + this.maxDistance), + (this.ssrMaterial.uniforms.thickness.value = + this.thickness), + this.renderPass( + e, + this.ssrMaterial, + this.ssrRenderTarget + ), + this.blur && + (this.renderPass( + e, + this.blurMaterial, + this.blurRenderTarget + ), + this.renderPass( + e, + this.blurMaterial2, + this.blurRenderTarget2 + )), + this.output) + ) { + case n.OUTPUT.Default: + this.bouncing + ? ((this.copyMaterial.uniforms.tDiffuse.value = + this.beautyRenderTarget.texture), + (this.copyMaterial.blending = A.NoBlending), + this.renderPass( + e, + this.copyMaterial, + this.prevRenderTarget + ), + this.blur + ? (this.copyMaterial.uniforms.tDiffuse.value = + this.blurRenderTarget2.texture) + : (this.copyMaterial.uniforms.tDiffuse.value = + this.ssrRenderTarget.texture), + (this.copyMaterial.blending = A.NormalBlending), + this.renderPass( + e, + this.copyMaterial, + this.prevRenderTarget + ), + (this.copyMaterial.uniforms.tDiffuse.value = + this.prevRenderTarget.texture), + (this.copyMaterial.blending = A.NoBlending), + this.renderPass( + e, + this.copyMaterial, + this.renderToScreen ? null : t + )) + : ((this.copyMaterial.uniforms.tDiffuse.value = + this.beautyRenderTarget.texture), + (this.copyMaterial.blending = A.NoBlending), + this.renderPass( + e, + this.copyMaterial, + this.renderToScreen ? null : t + ), + this.blur + ? (this.copyMaterial.uniforms.tDiffuse.value = + this.blurRenderTarget2.texture) + : (this.copyMaterial.uniforms.tDiffuse.value = + this.ssrRenderTarget.texture), + (this.copyMaterial.blending = A.NormalBlending), + this.renderPass( + e, + this.copyMaterial, + this.renderToScreen ? null : t + )); + break; + case n.OUTPUT.SSR: + this.blur + ? (this.copyMaterial.uniforms.tDiffuse.value = + this.blurRenderTarget2.texture) + : (this.copyMaterial.uniforms.tDiffuse.value = + this.ssrRenderTarget.texture), + (this.copyMaterial.blending = A.NoBlending), + this.renderPass( + e, + this.copyMaterial, + this.renderToScreen ? null : t + ), + this.bouncing && + (this.blur + ? (this.copyMaterial.uniforms.tDiffuse.value = + this.blurRenderTarget2.texture) + : (this.copyMaterial.uniforms.tDiffuse.value = + this.beautyRenderTarget.texture), + (this.copyMaterial.blending = A.NoBlending), + this.renderPass( + e, + this.copyMaterial, + this.prevRenderTarget + ), + (this.copyMaterial.uniforms.tDiffuse.value = + this.ssrRenderTarget.texture), + (this.copyMaterial.blending = A.NormalBlending), + this.renderPass( + e, + this.copyMaterial, + this.prevRenderTarget + )); + break; + case n.OUTPUT.Beauty: + (this.copyMaterial.uniforms.tDiffuse.value = + this.beautyRenderTarget.texture), + (this.copyMaterial.blending = A.NoBlending), + this.renderPass( + e, + this.copyMaterial, + this.renderToScreen ? null : t + ); + break; + case n.OUTPUT.Depth: + this.renderPass( + e, + this.depthRenderMaterial, + this.renderToScreen ? null : t + ); + break; + case n.OUTPUT.Normal: + (this.copyMaterial.uniforms.tDiffuse.value = + this.normalRenderTarget.texture), + (this.copyMaterial.blending = A.NoBlending), + this.renderPass( + e, + this.copyMaterial, + this.renderToScreen ? null : t + ); + break; + case n.OUTPUT.Metalness: + (this.copyMaterial.uniforms.tDiffuse.value = + this.metalnessRenderTarget.texture), + (this.copyMaterial.blending = A.NoBlending), + this.renderPass( + e, + this.copyMaterial, + this.renderToScreen ? null : t + ); + break; + default: + console.warn("THREE.SSRPass: Unknown output type."); + } + }, + }, + { + key: "renderPass", + value: function (e, t, n, r, i) { + this.originalClearColor.copy( + e.getClearColor(this.tempColor) + ); + var a = e.getClearAlpha(this.tempColor), + o = e.autoClear; + e.setRenderTarget(n), + (e.autoClear = !1), + void 0 !== r && + null !== r && + (e.setClearColor(r), + e.setClearAlpha(i || 0), + e.clear()), + (this.fsQuad.material = t), + this.fsQuad.render(e), + (e.autoClear = o), + e.setClearColor(this.originalClearColor), + e.setClearAlpha(a); + }, + }, + { + key: "renderOverride", + value: function (e, t, n, r, i) { + this.originalClearColor.copy( + e.getClearColor(this.tempColor) + ); + var a = e.getClearAlpha(this.tempColor), + o = e.autoClear; + e.setRenderTarget(n), + (e.autoClear = !1), + (r = t.clearColor || r), + (i = t.clearAlpha || i), + void 0 !== r && + null !== r && + (e.setClearColor(r), + e.setClearAlpha(i || 0), + e.clear()), + (this.scene.overrideMaterial = t), + e.render(this.scene, this.camera), + (this.scene.overrideMaterial = null), + (e.autoClear = o), + e.setClearColor(this.originalClearColor), + e.setClearAlpha(a); + }, + }, + { + key: "renderMetalness", + value: function (e, t, n, r, i) { + var a = this; + this.originalClearColor.copy( + e.getClearColor(this.tempColor) + ); + var o = e.getClearAlpha(this.tempColor), + s = e.autoClear; + e.setRenderTarget(n), + (e.autoClear = !1), + (r = t.clearColor || r), + (i = t.clearAlpha || i), + void 0 !== r && + null !== r && + (e.setClearColor(r), + e.setClearAlpha(i || 0), + e.clear()), + this.scene.traverseVisible(function (e) { + (e._SSRPassBackupMaterial = e.material), + a._selects.includes(e) + ? (e.material = a.metalnessOnMaterial) + : (e.material = a.metalnessOffMaterial); + }), + e.render(this.scene, this.camera), + this.scene.traverseVisible(function (e) { + e.material = e._SSRPassBackupMaterial; + }), + (e.autoClear = s), + e.setClearColor(this.originalClearColor), + e.setClearAlpha(o); + }, + }, + { + key: "setSize", + value: function (e, t) { + (this.width = e), + (this.height = t), + (this.ssrMaterial.defines.MAX_STEP = Math.sqrt( + e * e + t * t + )), + (this.ssrMaterial.needsUpdate = !0), + this.beautyRenderTarget.setSize(e, t), + this.prevRenderTarget.setSize(e, t), + this.ssrRenderTarget.setSize(e, t), + this.normalRenderTarget.setSize(e, t), + this.metalnessRenderTarget.setSize(e, t), + this.blurRenderTarget.setSize(e, t), + this.blurRenderTarget2.setSize(e, t), + this.ssrMaterial.uniforms.resolution.value.set(e, t), + this.ssrMaterial.uniforms.cameraProjectionMatrix.value.copy( + this.camera.projectionMatrix + ), + this.ssrMaterial.uniforms.cameraInverseProjectionMatrix.value.copy( + this.camera.projectionMatrixInverse + ), + this.blurMaterial.uniforms.resolution.value.set(e, t), + this.blurMaterial2.uniforms.resolution.value.set(e, t); + }, + }, + ]), + n + ); + })(Ia), + Co = _o, + wo = null, + To = null, + Mo = null, + Io = null, + ko = null, + Ro = null; + function Bo(e, t, n) { + var r = new WebGLRenderTarget( + e.x, + e.y, + n + ? { depthTexture: new DepthTexture(e.x, e.y), depthBuffer: !0 } + : void 0 + ); + return ( + (r.texture.format = t), + (r.texture.minFilter = NearestFilter), + (r.texture.magFilter = NearestFilter), + (r.texture.generateMipmaps = !1), + (r.stencilBuffer = !1), + r + ); + } + var Po = { + defines: { KERNEL_SIZE_FLOAT: "25.0", KERNEL_SIZE_INT: "25" }, + uniforms: { + tDiffuse: { value: null }, + uImageIncrement: { value: new A.Vector2(0.001953125, 0) }, + cKernel: { value: [] }, + }, + vertexShader: [ + "uniform vec2 uImageIncrement;", + "varying vec2 vUv;", + "void main() {", + "\tvUv = uv - ( ( KERNEL_SIZE_FLOAT - 1.0 ) / 2.0 ) * uImageIncrement;", + "\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );", + "}", + ].join("\n"), + fragmentShader: [ + "uniform float cKernel[ KERNEL_SIZE_INT ];", + "uniform sampler2D tDiffuse;", + "uniform vec2 uImageIncrement;", + "varying vec2 vUv;", + "void main() {", + "\tvec2 imageCoord = vUv;", + "\tvec4 sum = vec4( 0.0, 0.0, 0.0, 0.0 );", + "\tfor( int i = 0; i < KERNEL_SIZE_INT; i ++ ) {", + "\t\tsum += texture2D( tDiffuse, imageCoord ) * cKernel[ i ];", + "\t\timageCoord += uImageIncrement;", + "\t}", + "\tgl_FragColor = sum;", + "}", + ].join("\n"), + buildKernel: function (e) { + for ( + var t, + n, + r = Math.min(2 * Math.ceil(3 * e) + 1, 25), + i = 0.5 * (r - 1), + a = new Array(r), + o = 0, + s = 0; + s < r; + ++s + ) + (a[s] = + ((t = s - i), (n = e), Math.exp((-t * t) / (2 * n * n)))), + (o += a[s]); + for (var l = 0; l < r; ++l) a[l] /= o; + return a; + }, + }, + Lo = null, + Do = { + uniforms: { tDiffuse: { value: null }, strength: { value: 1 } }, + vertexShader: + "\n varying vec2 vUv;\n void main() {\n vUv = uv;\n gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n }", + fragmentShader: + "\n uniform float strength;\n uniform sampler2D tDiffuse;\n varying vec2 vUv;\n void main() {\n vec4 texel = texture2D( tDiffuse, vUv );\n gl_FragColor = strength * texel;\n }", + }, + Uo = null, + Fo = null, + Oo = null; + function No() { + var e = {}; + return { + get: function (t) { + return e[t]; + }, + add: function (t, n) { + e[t] = n; + }, + remove: function (t) { + delete e[t]; + }, + removeAll: function () { + e = {}; + }, + }; + } + var Go = { + 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_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_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", + }, + Zo = null, + zo = null, + Qo = null, + Ho = null, + Vo = null, + jo = null, + Wo = null, + Xo = null, + Yo = null, + qo = null, + Jo = null, + Ko = null, + $o = null, + es = null, + ts = null, + ns = null, + rs = "glTF", + is = 12, + as = { JSON: 1313821514, BIN: 5130562 }, + os = null, + ss = null, + ls = null, + us = null, + cs = null, + fs = new A.Quaternion(), + ds = null, + hs = { + 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, + }, + ps = { + 5120: Int8Array, + 5121: Uint8Array, + 5122: Int16Array, + 5123: Uint16Array, + 5125: Uint32Array, + 5126: Float32Array, + }, + vs = { + 9728: A.NearestFilter, + 9729: A.LinearFilter, + 9984: A.NearestMipmapNearestFilter, + 9985: A.LinearMipmapNearestFilter, + 9986: A.NearestMipmapLinearFilter, + 9987: A.LinearMipmapLinearFilter, + }, + ms = { + 33071: A.ClampToEdgeWrapping, + 33648: A.MirroredRepeatWrapping, + 10497: A.RepeatWrapping, + }, + gs = { + SCALAR: 1, + VEC2: 2, + VEC3: 3, + VEC4: 4, + MAT2: 4, + MAT3: 9, + MAT4: 16, + }, + As = (0, s.Z)( + (0, s.Z)( + { POSITION: "position", NORMAL: "normal", TANGENT: "tangent" }, + $n >= 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" } + ), + ys = { + scale: "scale", + translation: "position", + rotation: "quaternion", + weights: "morphTargetInfluences", + }, + bs = { + CUBICSPLINE: void 0, + LINEAR: A.InterpolateLinear, + STEP: A.InterpolateDiscrete, + }, + xs = { OPAQUE: "OPAQUE", MASK: "MASK", BLEND: "BLEND" }; + function Ss(e) { + return ( + void 0 === e.DefaultMaterial && + (e.DefaultMaterial = new MeshStandardMaterial({ + color: 16777215, + emissive: 0, + metalness: 1, + roughness: 1, + transparent: !1, + depthTest: !0, + side: FrontSide, + })), + e.DefaultMaterial + ); + } + function Es(e, t, n) { + for (var r in n.extensions) + void 0 === e[r] && + ((t.userData.gltfExtensions = t.userData.gltfExtensions || {}), + (t.userData.gltfExtensions[r] = n.extensions[r])); + } + function _s(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 Cs(e, t, n) { + for (var r = !1, i = !1, a = !1, o = 0, s = t.length; o < s; o++) { + var l = t[o]; + if ( + (void 0 !== l.POSITION && (r = !0), + void 0 !== l.NORMAL && (i = !0), + void 0 !== l.COLOR_0 && (a = !0), + r && i && a) + ) + break; + } + if (!r && !i && !a) return Promise.resolve(e); + for (var u = [], c = [], f = [], d = 0, h = t.length; d < h; d++) { + var p = t[d]; + if (r) { + var v = + void 0 !== p.POSITION + ? n.getDependency("accessor", p.POSITION) + : e.attributes.position; + u.push(v); + } + if (i) { + var m = + void 0 !== p.NORMAL + ? n.getDependency("accessor", p.NORMAL) + : e.attributes.normal; + c.push(m); + } + if (a) { + var g = + void 0 !== p.COLOR_0 + ? n.getDependency("accessor", p.COLOR_0) + : e.attributes.color; + f.push(g); + } + } + return Promise.all([ + Promise.all(u), + Promise.all(c), + Promise.all(f), + ]).then(function (t) { + var n = t[0], + o = t[1], + s = t[2]; + return ( + r && (e.morphAttributes.position = n), + i && (e.morphAttributes.normal = o), + a && (e.morphAttributes.color = s), + (e.morphTargetsRelative = !0), + e + ); + }); + } + function ws(e, t) { + if ((e.updateMorphTargets(), void 0 !== t.weights)) + for (var n = 0, r = t.weights.length; n < r; n++) + e.morphTargetInfluences[n] = t.weights[n]; + if (t.extras && Array.isArray(t.extras.targetNames)) { + var i = t.extras.targetNames; + if (e.morphTargetInfluences.length === i.length) { + e.morphTargetDictionary = {}; + for (var a = 0, o = i.length; a < o; a++) + e.morphTargetDictionary[i[a]] = a; + } else + console.warn( + "THREE.GLTFLoader: Invalid extras.targetNames length. Ignoring names." + ); + } + } + function Ts(e) { + var t, + n = e.extensions && e.extensions[Go.KHR_DRACO_MESH_COMPRESSION]; + if ( + ((t = n + ? "draco:" + + n.bufferView + + ":" + + n.indices + + ":" + + Ms(n.attributes) + : e.indices + ":" + Ms(e.attributes) + ":" + e.mode), + void 0 !== e.targets) + ) + for (var r = 0, i = e.targets.length; r < i; r++) + t += ":" + Ms(e.targets[r]); + return t; + } + function Ms(e) { + for ( + var t = "", n = Object.keys(e).sort(), r = 0, i = n.length; + r < i; + r++ + ) + t += n[r] + ":" + e[n[r]] + ";"; + return t; + } + function Is(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." + ); + } + } + function ks(e) { + return e.search(/\.jpe?g($|\?)/i) > 0 || + 0 === e.search(/^data\:image\/jpeg/) + ? "image/jpeg" + : e.search(/\.webp($|\?)/i) > 0 || + 0 === e.search(/^data\:image\/webp/) + ? "image/webp" + : "image/png"; + } + var Rs = new A.Matrix4(), + Bs = null; + function Ps(e, t, n) { + var r = t.attributes, + i = new Box3(); + if (void 0 !== r.POSITION) { + var a = n.json.accessors[r.POSITION], + o = a.min, + s = a.max; + if (void 0 !== o && void 0 !== s) { + if ( + (i.set( + new Vector3(o[0], o[1], o[2]), + new Vector3(s[0], s[1], s[2]) + ), + a.normalized) + ) { + var l = Is(ps[a.componentType]); + i.min.multiplyScalar(l), i.max.multiplyScalar(l); + } + var u = t.targets; + if (void 0 !== u) { + for ( + var c = new Vector3(), f = new Vector3(), d = 0, h = u.length; + d < h; + d++ + ) { + var p = u[d]; + if (void 0 !== p.POSITION) { + var v = n.json.accessors[p.POSITION], + m = v.min, + g = v.max; + if (void 0 !== m && void 0 !== g) { + if ( + (f.setX(Math.max(Math.abs(m[0]), Math.abs(g[0]))), + f.setY(Math.max(Math.abs(m[1]), Math.abs(g[1]))), + f.setZ(Math.max(Math.abs(m[2]), Math.abs(g[2]))), + v.normalized) + ) { + var A = Is(ps[v.componentType]); + f.multiplyScalar(A); + } + c.max(f); + } else + console.warn( + "THREE.GLTFLoader: Missing min/max properties for accessor POSITION." + ); + } + } + i.expandByVector(c); + } + e.boundingBox = i; + var y = new Sphere(); + i.getCenter(y.center), + (y.radius = i.min.distanceTo(i.max) / 2), + (e.boundingSphere = y); + } else + console.warn( + "THREE.GLTFLoader: Missing min/max properties for accessor POSITION." + ); + } + } + function Ls(e, t, n) { + var r = t.attributes, + i = []; + function a(t, r) { + return n.getDependency("accessor", t).then(function (t) { + e.setAttribute(r, t); + }); + } + for (var o in r) { + var s = As[o] || o.toLowerCase(); + s in e.attributes || i.push(a(r[o], s)); + } + if (void 0 !== t.indices && !e.index) { + var l = n.getDependency("accessor", t.indices).then(function (t) { + e.setIndex(t); + }); + i.push(l); + } + return ( + _s(e, t), + Ps(e, t, n), + Promise.all(i).then(function () { + return void 0 !== t.targets ? Cs(e, t.targets, n) : e; + }) + ); + } + var Ds = + "https://cdn.jsdelivr.net/npm/@webxr-input-profiles/assets@1.0/dist/profiles/generic-hand/", + Us = null, + Fs = 0.01, + Os = "index-finger-tip", + Ns = null, + Gs = 0.05, + Zs = 0.02, + zs = 0.01, + Qs = 0.02, + Hs = 1, + Vs = 0.4, + js = 0.002, + Ws = 0.01, + Xs = 0.003, + Ys = 0.035, + qs = 16, + Js = 12, + Ks = 110, + $s = new A.Vector3(0, 1, 0), + el = new A.Vector3(0, 0, 1), + tl = 0.02, + nl = 1.5, + rl = (function (e) { + (0, m.Z)(n, e); + var t = (0, g.Z)(n); + function n(e, r) { + var i; + return ( + (0, p.Z)(this, n), + ((i = t.call(this)).hand = e), + (i.controller = r), + (i.motionController = null), + (i.envMap = null), + (i.mesh = null), + (i.pointerGeometry = null), + (i.pointerMesh = null), + (i.pointerObject = null), + (i.pinched = !1), + (i.attached = !1), + (i.cursorObject = null), + (i.raycaster = null), + (i._onConnected = i._onConnected.bind((0, f.Z)(i))), + (i._onDisconnected = i._onDisconnected.bind((0, f.Z)(i))), + i.hand.addEventListener("connected", i._onConnected), + i.hand.addEventListener("disconnected", i._onDisconnected), + i + ); + } + return ( + (0, v.Z)(n, [ + { + key: "_onConnected", + value: function (e) { + var t = e.data; + t.hand && + ((this.visible = !0), + (this.xrInputSource = t), + this.createPointer()); + }, + }, + { + key: "_onDisconnected", + value: function () { + var e, t; + (this.visible = !1), + (this.xrInputSource = null), + null == (e = this.pointerGeometry) || e.dispose(), + null == (t = this.pointerMesh) || t.material.dispose(), + this.clear(); + }, + }, + { + key: "_drawVerticesRing", + value: function (e, t, n) { + for (var r = t.clone(), i = 0; i < qs; i++) { + r.applyAxisAngle(el, (2 * Math.PI) / qs); + var a = n * qs + i; + (e[3 * a] = r.x), + (e[3 * a + 1] = r.y), + (e[3 * a + 2] = r.z); + } + }, + }, + { + key: "_updatePointerVertices", + value: function (e) { + var t = this.pointerGeometry.attributes.position.array, + n = new A.Vector3(js, 0, -1 * (Ys - e)); + this._drawVerticesRing(t, n, 0); + for ( + var r = new A.Vector3( + Math.sin((Math.PI * Ks) / 180) * e, + Math.cos((Math.PI * Ks) / 180) * e, + 0 + ), + i = 0; + i < Js; + i++ + ) + this._drawVerticesRing(t, r, i + 1), + r.applyAxisAngle($s, (Math.PI * Ks) / 180 / (-2 * Js)); + var a = qs * (1 + Js), + o = qs * (1 + Js) + 1, + s = new A.Vector3(0, 0, -1 * (Ys - e)); + (t[3 * a] = s.x), + (t[3 * a + 1] = s.y), + (t[3 * a + 2] = s.z); + var l = new A.Vector3(0, 0, e); + (t[3 * o] = l.x), + (t[3 * o + 1] = l.y), + (t[3 * o + 2] = l.z), + this.pointerGeometry.setAttribute( + "position", + new A.Float32BufferAttribute(t, 3) + ); + }, + }, + { + key: "createPointer", + value: function () { + var e, + t, + n = new Array(3 * ((Js + 1) * qs + 2)).fill(0), + r = []; + for ( + this.pointerGeometry = new A.BufferGeometry(), + this.pointerGeometry.setAttribute( + "position", + new A.Float32BufferAttribute(n, 3) + ), + this._updatePointerVertices(Ws), + e = 0; + e < Js; + e++ + ) { + for (t = 0; t < qs - 1; t++) + r.push(e * qs + t, e * qs + t + 1, (e + 1) * qs + t), + r.push( + e * qs + t + 1, + (e + 1) * qs + t + 1, + (e + 1) * qs + t + ); + r.push((e + 1) * qs - 1, e * qs, (e + 2) * qs - 1), + r.push(e * qs, (e + 1) * qs, (e + 2) * qs - 1); + } + var i = qs * (1 + Js), + a = qs * (1 + Js) + 1; + for (e = 0; e < qs - 1; e++) + r.push(i, e + 1, e), + r.push(a, e + qs * Js, e + qs * Js + 1); + r.push(i, 0, qs - 1), r.push(a, qs * (Js + 1) - 1, qs * Js); + var o = new A.MeshBasicMaterial(); + (o.transparent = !0), + (o.opacity = Vs), + this.pointerGeometry.setIndex(r), + (this.pointerMesh = new A.Mesh(this.pointerGeometry, o)), + this.pointerMesh.position.set(0, 0, -1 * Ws), + (this.pointerObject = new A.Object3D()), + this.pointerObject.add(this.pointerMesh), + (this.raycaster = new A.Raycaster()); + var s = new A.SphereGeometry(tl, 10, 10), + l = new A.MeshBasicMaterial(); + (l.transparent = !0), + (l.opacity = Vs), + (this.cursorObject = new A.Mesh(s, l)), + this.pointerObject.add(this.cursorObject), + this.add(this.pointerObject); + }, + }, + { + key: "_updateRaycaster", + value: function () { + if (this.raycaster) { + var e = this.pointerObject.matrixWorld, + t = new A.Matrix4(); + t.identity().extractRotation(e), + this.raycaster.ray.origin.setFromMatrixPosition(e), + this.raycaster.ray.direction + .set(0, 0, -1) + .applyMatrix4(t); + } + }, + }, + { + key: "_updatePointer", + value: function () { + this.pointerObject.visible = this.controller.visible; + var e = this.hand.joints["index-finger-tip"], + t = this.hand.joints["thumb-tip"], + n = e.position.distanceTo(t.position), + r = e.position + .clone() + .add(t.position) + .multiplyScalar(0.5); + this.pointerObject.position.copy(r), + this.pointerObject.quaternion.copy( + this.controller.quaternion + ), + (this.pinched = n <= Zs); + var i = (n - zs) / (Gs - zs), + a = (n - zs) / (Zs - zs); + if (i > 1) + this._updatePointerVertices(Ws), + this.pointerMesh.position.set(0, 0, -1 * Ws), + (this.pointerMesh.material.opacity = Vs); + else if (i > 0) { + var o = (Ws - Xs) * i + Xs; + this._updatePointerVertices(o), + a < 1 + ? (this.pointerMesh.position.set( + 0, + 0, + -1 * o - (1 - a) * Qs + ), + (this.pointerMesh.material.opacity = + Vs + (1 - a) * (Hs - Vs))) + : (this.pointerMesh.position.set(0, 0, -1 * o), + (this.pointerMesh.material.opacity = Vs)); + } else + this._updatePointerVertices(Xs), + this.pointerMesh.position.set(0, 0, -1 * Xs - Qs), + (this.pointerMesh.material.opacity = Hs); + this.cursorObject.material.opacity = + this.pointerMesh.material.opacity; + }, + }, + { + key: "updateMatrixWorld", + value: function (e) { + (0, d.Z)( + (0, h.Z)(n.prototype), + "updateMatrixWorld", + this + ).call(this, e), + this.pointerGeometry && + (this._updatePointer(), this._updateRaycaster()); + }, + }, + { + key: "isPinched", + value: function () { + return this.pinched; + }, + }, + { + key: "setAttached", + value: function (e) { + this.attached = e; + }, + }, + { + key: "isAttached", + value: function () { + return this.attached; + }, + }, + { + key: "intersectObject", + value: function (e) { + var t = + !(arguments.length > 1 && void 0 !== arguments[1]) || + arguments[1]; + if (this.raycaster) + return this.raycaster.intersectObject(e, t); + }, + }, + { + key: "intersectObjects", + value: function (e) { + var t = + !(arguments.length > 1 && void 0 !== arguments[1]) || + arguments[1]; + if (this.raycaster) + return this.raycaster.intersectObjects(e, t); + }, + }, + { + key: "checkIntersections", + value: function (e) { + var t = + arguments.length > 1 && + void 0 !== arguments[1] && + arguments[1]; + if (this.raycaster && !this.attached) { + var n = this.raycaster.intersectObjects(e, t), + r = new A.Vector3(0, 0, -1); + if (n.length > 0) { + var i = n[0].distance; + this.cursorObject.position.copy(r.multiplyScalar(i)); + } else + this.cursorObject.position.copy(r.multiplyScalar(nl)); + } + }, + }, + { + key: "setCursor", + value: function (e) { + var t = new A.Vector3(0, 0, -1); + this.raycaster && + !this.attached && + this.cursorObject.position.copy(t.multiplyScalar(e)); + }, + }, + { + key: "dispose", + value: function () { + this._onDisconnected(), + this.hand.removeEventListener( + "connected", + this._onConnected + ), + this.hand.removeEventListener( + "disconnected", + this._onDisconnected + ); + }, + }, + ]), + n + ); + })(A.Object3D); + function il(e, t) { + var n = document.createElement("canvas"), + r = n.getContext("2d"), + i = 100; + r.font = "normal 100px Arial"; + var a = r.measureText(e).width; + (n.width = a), + (n.height = i), + (r.font = "normal 100px Arial"), + (r.textAlign = "center"), + (r.textBaseline = "middle"), + (r.fillStyle = "#ffffff"), + r.fillText(e, a / 2, 50); + var o = new THREE.Texture(n); + o.needsUpdate = !0; + var s = new THREE.MeshBasicMaterial({ + color: 16777215, + side: THREE.DoubleSide, + map: o, + transparent: !0, + }), + l = new THREE.PlaneGeometry((t * a) / i, t); + return new THREE.Mesh(l, s); + } + var al = (function () { + function e() { + (0, p.Z)(this, e); + } + return ( + (0, v.Z)(e, null, [ + { + key: "createButton", + value: function (t) { + var n = + arguments.length > 1 && void 0 !== arguments[1] + ? arguments[1] + : {}, + r = document.createElement("button"); + function i() { + (r.style.display = ""), + (r.style.cursor = "auto"), + (r.style.left = "calc(50% - 75px)"), + (r.style.width = "150px"), + (r.onmouseenter = null), + (r.onmouseleave = null), + (r.onclick = null), + (r.textContent = "VR NOT SUPPORTED"); + } + function a(e) { + (e.style.position = "absolute"), + (e.style.bottom = "20px"), + (e.style.padding = "12px 6px"), + (e.style.border = "1px solid #fff"), + (e.style.borderRadius = "4px"), + (e.style.background = "rgba(0,0,0,0.1)"), + (e.style.color = "#fff"), + (e.style.font = "normal 13px sans-serif"), + (e.style.textAlign = "center"), + (e.style.opacity = "0.5"), + (e.style.outline = "none"), + (e.style.zIndex = "999"); + } + if ("xr" in navigator) + return ( + a(r), + (r.id = "VRButton"), + (r.style.display = "none"), + navigator.xr + .isSessionSupported("immersive-vr") + .then(function (a) { + a + ? (function () { + var e = null; + function i(e) { + return a.apply(this, arguments); + } + function a() { + return (a = (0, c.Z)( + (0, u.Z)().mark(function n(i) { + return (0, u.Z)().wrap(function (n) { + for (;;) + switch ((n.prev = n.next)) { + case 0: + return ( + i.addEventListener("end", o), + (n.next = 3), + t.xr.setSession(i) + ); + case 3: + (r.textContent = "EXIT VR"), + (e = i); + case 5: + case "end": + return n.stop(); + } + }, n); + }) + )).apply(this, arguments); + } + function o() { + e.removeEventListener("end", o), + (r.textContent = "ENTER VR"), + (e = null); + } + (r.style.display = ""), + (r.style.cursor = "pointer"), + (r.style.left = "calc(50% - 50px)"), + (r.style.width = "100px"), + (r.textContent = "ENTER VR"), + (r.onmouseenter = function () { + r.style.opacity = "1.0"; + }), + (r.onmouseleave = function () { + r.style.opacity = "0.5"; + }), + (r.onclick = function () { + var t; + if (null === e) { + var r = [ + n.optionalFeatures, + "local-floor", + "bounded-floor", + "hand-tracking", + ] + .flat() + .filter(Boolean); + null == (t = navigator.xr) || + t + .requestSession( + "immersive-vr", + (0, s.Z)( + (0, s.Z)({}, n), + {}, + { optionalFeatures: r } + ) + ) + .then(i); + } else e.end(); + }); + })() + : i(), + a && e.xrSessionIsGranted && r.click(); + }), + r + ); + var o = document.createElement("a"); + return ( + !1 === window.isSecureContext + ? ((o.href = document.location.href.replace( + /^http:/, + "https:" + )), + (o.innerHTML = "WEBXR NEEDS HTTPS")) + : ((o.href = "https://immersiveweb.dev/"), + (o.innerHTML = "WEBXR NOT AVAILABLE")), + (o.style.left = "calc(50% - 90px)"), + (o.style.width = "180px"), + (o.style.textDecoration = "none"), + a(o), + o + ); + }, + }, + { + key: "registerSessionGrantedListener", + value: function () { + "undefined" !== typeof navigator && + "xr" in navigator && + navigator.xr.addEventListener( + "sessiongranted", + function () { + e.xrSessionIsGranted = !0; + } + ); + }, + }, + ]), + e + ); + })(), + ol = al, + sl = { + Handedness: { NONE: "none", LEFT: "left", RIGHT: "right" }, + ComponentState: { + DEFAULT: "default", + TOUCHED: "touched", + PRESSED: "pressed", + }, + ComponentProperty: { + BUTTON: "button", + X_AXIS: "xAxis", + Y_AXIS: "yAxis", + STATE: "state", + }, + ComponentType: { + TRIGGER: "trigger", + SQUEEZE: "squeeze", + TOUCHPAD: "touchpad", + THUMBSTICK: "thumbstick", + BUTTON: "button", + }, + ButtonTouchThreshold: 0.05, + AxisTouchThreshold: 0.1, + VisualResponseProperty: { + TRANSFORM: "transform", + VISIBILITY: "visibility", + }, + }; + function ll(e) { + return ul.apply(this, arguments); + } + function ul() { + return (ul = _asyncToGenerator( + _regeneratorRuntime().mark(function e(t) { + var n; + return _regeneratorRuntime().wrap(function (e) { + for (;;) + switch ((e.prev = e.next)) { + case 0: + return (e.next = 2), fetch(t); + case 2: + if ((n = e.sent).ok) { + e.next = 7; + break; + } + throw new Error(n.statusText); + case 7: + return e.abrupt("return", n.json()); + case 8: + case "end": + return e.stop(); + } + }, e); + }) + )).apply(this, arguments); + } + function cl(e) { + return fl.apply(this, arguments); + } + function fl() { + return (fl = _asyncToGenerator( + _regeneratorRuntime().mark(function e(t) { + var n; + return _regeneratorRuntime().wrap(function (e) { + for (;;) + switch ((e.prev = e.next)) { + case 0: + if (t) { + e.next = 2; + break; + } + throw new Error("No basePath supplied"); + case 2: + return ( + "profilesList.json", + (e.next = 5), + ll("".concat(t, "/").concat("profilesList.json")) + ); + case 5: + return (n = e.sent), e.abrupt("return", n); + case 7: + case "end": + return e.stop(); + } + }, e); + }) + )).apply(this, arguments); + } + function dl(e, t) { + return hl.apply(this, arguments); + } + function hl() { + return ( + (hl = _asyncToGenerator( + _regeneratorRuntime().mark(function e(t, n) { + var r, + i, + a, + o, + s, + l, + u, + c, + f = arguments; + return _regeneratorRuntime().wrap(function (e) { + for (;;) + switch ((e.prev = e.next)) { + case 0: + if ( + ((r = f.length > 2 && void 0 !== f[2] ? f[2] : null), + (i = !(f.length > 3 && void 0 !== f[3]) || f[3]), + t) + ) { + e.next = 4; + break; + } + throw new Error("No xrInputSource supplied"); + case 4: + if (n) { + e.next = 6; + break; + } + throw new Error("No basePath supplied"); + case 6: + return (e.next = 8), cl(n); + case 8: + if ( + ((a = e.sent), + (o = void 0), + t.profiles.some(function (e) { + var t = a[e]; + return ( + t && + (o = { + profileId: e, + profilePath: "".concat(n, "/").concat(t.path), + deprecated: !!t.deprecated, + }), + !!o + ); + }), + o) + ) { + e.next = 18; + break; + } + if (r) { + e.next = 14; + break; + } + throw new Error("No matching profile name found"); + case 14: + if ((s = a[r])) { + e.next = 17; + break; + } + throw new Error( + 'No matching profile name found and default profile "'.concat( + r, + '" missing.' + ) + ); + case 17: + o = { + profileId: r, + profilePath: "".concat(n, "/").concat(s.path), + deprecated: !!s.deprecated, + }; + case 18: + return (e.next = 20), ll(o.profilePath); + case 20: + if (((l = e.sent), (u = void 0), !i)) { + e.next = 27; + break; + } + if ( + (c = + "any" === t.handedness + ? l.layouts[Object.keys(l.layouts)[0]] + : l.layouts[t.handedness]) + ) { + e.next = 26; + break; + } + throw new Error( + "No matching handedness, " + .concat(t.handedness, ", in profile ") + .concat(o.profileId) + ); + case 26: + c.assetPath && + (u = o.profilePath.replace( + "profile.json", + c.assetPath + )); + case 27: + return e.abrupt("return", { profile: l, assetPath: u }); + case 28: + case "end": + return e.stop(); + } + }, e); + }) + )), + hl.apply(this, arguments) + ); + } + var pl = { + xAxis: 0, + yAxis: 0, + button: 0, + state: sl.ComponentState.DEFAULT, + }; + function vl() { + var e = + arguments.length > 0 && void 0 !== arguments[0] + ? arguments[0] + : 0, + t = + arguments.length > 1 && void 0 !== arguments[1] + ? arguments[1] + : 0, + n = e, + r = t; + if (Math.sqrt(e * e + t * t) > 1) { + var i = Math.atan2(t, e); + (n = Math.cos(i)), (r = Math.sin(i)); + } + return { + normalizedXAxis: 0.5 * n + 0.5, + normalizedYAxis: 0.5 * r + 0.5, + }; + } + var ml = null, + gl = null, + Al = null, + yl = + "https://cdn.jsdelivr.net/npm/@webxr-input-profiles/assets@1.0/dist/profiles", + bl = "generic-trigger", + xl = function (e, t) { + t.traverse(function (t) { + t instanceof Mesh && + "envMap" in t.material && + ((t.material.envMap = e), (t.material.needsUpdate = !0)); + }); + }, + Sl = null; + function El(e, t) { + Object.values(e.components).forEach(function (e) { + var n = e.type, + r = e.touchPointNodeName, + i = e.visualResponses; + if (n === sl.ComponentType.TOUCHPAD && r) + if ( + ((e.touchPointNode = t.getObjectByName(r)), e.touchPointNode) + ) { + var a = new SphereGeometry(0.001), + o = new MeshBasicMaterial({ color: 255 }), + s = new Mesh(a, o); + e.touchPointNode.add(s); + } else + console.warn( + "Could not find touch dot, " + .concat(e.touchPointNodeName, ", in touchpad component ") + .concat(e.id) + ); + Object.values(i).forEach(function (e) { + var n = e.valueNodeName, + r = e.minNodeName, + i = e.maxNodeName; + if ( + e.valueNodeProperty === sl.VisualResponseProperty.TRANSFORM && + r && + i + ) { + if ( + ((e.minNode = t.getObjectByName(r)), + (e.maxNode = t.getObjectByName(i)), + !e.minNode) + ) + return void console.warn( + "Could not find ".concat(r, " in the model") + ); + if (!e.maxNode) + return void console.warn( + "Could not find ".concat(i, " in the model") + ); + } + (e.valueNode = t.getObjectByName(n)), + e.valueNode || + console.warn("Could not find ".concat(n, " in the model")); + }); + }); + } + function _l(e, t) { + El(e.motionController, t), e.envMap && xl(e.envMap, t), e.add(t); + } + var Cl = null, + wl = null, + Tl = null, + Ml = new A.Matrix4(), + Il = new A.Vector3(), + kl = null, + Rl = null, + Bl = null, + Pl = (function (e) { + (0, m.Z)(n, e); + var t = (0, g.Z)(n); + function n() { + var e, + r = + arguments.length > 0 && void 0 !== arguments[0] + ? arguments[0] + : function (e, t, n) { + return n.set(e, t, Math.cos(e) * Math.sin(t)); + }, + i = + arguments.length > 1 && void 0 !== arguments[1] + ? arguments[1] + : 8, + a = + arguments.length > 2 && void 0 !== arguments[2] + ? arguments[2] + : 8; + (0, p.Z)(this, n), + ((e = t.call(this)).type = "ParametricGeometry"), + (e.parameters = { func: r, slices: i, stacks: a }); + for ( + var o = [], + s = [], + l = [], + u = [], + c = 1e-5, + f = new A.Vector3(), + d = new A.Vector3(), + h = new A.Vector3(), + v = new A.Vector3(), + m = new A.Vector3(), + g = i + 1, + y = 0; + y <= a; + y++ + ) + for (var b = y / a, x = 0; x <= i; x++) { + var S = x / i; + r(S, b, d), + s.push(d.x, d.y, d.z), + S - c >= 0 + ? (r(S - c, b, h), v.subVectors(d, h)) + : (r(S + c, b, h), v.subVectors(h, d)), + b - c >= 0 + ? (r(S, b - c, h), m.subVectors(d, h)) + : (r(S, b + c, h), m.subVectors(h, d)), + f.crossVectors(v, m).normalize(), + l.push(f.x, f.y, f.z), + u.push(S, b); + } + for (var E = 0; E < a; E++) + for (var _ = 0; _ < i; _++) { + var C = E * g + _, + w = E * g + _ + 1, + T = (E + 1) * g + _ + 1, + M = (E + 1) * g + _; + o.push(C, w, M), o.push(w, T, M); + } + return ( + e.setIndex(o), + e.setAttribute("position", new A.Float32BufferAttribute(s, 3)), + e.setAttribute("normal", new A.Float32BufferAttribute(l, 3)), + e.setAttribute("uv", new A.Float32BufferAttribute(u, 2)), + e + ); + } + return (0, v.Z)(n); + })(A.BufferGeometry), + Ll = (function (e) { + (0, m.Z)(n, e); + var t = (0, g.Z)(n); + function n(e) { + var r, + i = + arguments.length > 1 && void 0 !== arguments[1] + ? arguments[1] + : 64, + a = + arguments.length > 2 && void 0 !== arguments[2] + ? arguments[2] + : 1, + o = + arguments.length > 3 && void 0 !== arguments[3] + ? arguments[3] + : 8, + s = + arguments.length > 4 && + void 0 !== arguments[4] && + arguments[4]; + (0, p.Z)(this, n); + var l = i + 1, + u = e.computeFrenetFrames(i, s), + c = u.tangents, + f = u.normals, + d = u.binormals, + h = new A.Vector3(); + return ( + ((r = t.call( + this, + function (t, n, r) { + n *= 2 * Math.PI; + var i = Math.floor(t * (l - 1)); + e.getPointAt(t, h); + var o = f[i], + s = d[i], + u = -a * Math.cos(n), + c = a * Math.sin(n); + (h.x += u * o.x + c * s.x), + (h.y += u * o.y + c * s.y), + (h.z += u * o.z + c * s.z), + r.copy(h); + }, + i, + o + )).tangents = c), + (r.normals = f), + (r.binormals = d), + (r.path = e), + (r.segments = i), + (r.radius = a), + (r.segmentsRadius = o), + (r.closed = s), + r + ); + } + return (0, v.Z)(n); + })(Pl), + Dl = { + klein: function (e, t, n) { + var r, i; + (t *= Math.PI), + (e *= 2 * Math.PI), + (t *= 2) < Math.PI + ? ((r = + 3 * Math.cos(t) * (1 + Math.sin(t)) + + 2 * (1 - Math.cos(t) / 2) * Math.cos(t) * Math.cos(e)), + (i = + -8 * Math.sin(t) - + 2 * (1 - Math.cos(t) / 2) * Math.sin(t) * Math.cos(e))) + : ((r = + 3 * Math.cos(t) * (1 + Math.sin(t)) + + 2 * (1 - Math.cos(t) / 2) * Math.cos(e + Math.PI)), + (i = -8 * Math.sin(t))); + var a = -2 * (1 - Math.cos(t) / 2) * Math.sin(e); + n.set(r, a, i); + }, + plane: function (e, t) { + return function (n, r, i) { + var a = n * e, + o = r * t; + i.set(a, 0, o); + }; + }, + mobius: function (e, t, n) { + e -= 0.5; + var r = 2 * Math.PI * t, + i = Math.cos(r) * (2 + e * Math.cos(r / 2)), + a = Math.sin(r) * (2 + e * Math.cos(r / 2)), + o = e * Math.sin(r / 2); + n.set(i, a, o); + }, + mobius3d: function (e, t, n) { + (e *= Math.PI), (t *= 2 * Math.PI); + var r = (e *= 2) / 2, + i = + 0.125 * Math.cos(t) * Math.cos(r) - + 0.65 * Math.sin(t) * Math.sin(r), + a = + 0.125 * Math.cos(t) * Math.sin(r) + + 0.65 * Math.sin(t) * Math.cos(r), + o = (2.25 + i) * Math.sin(e); + (i = (2.25 + i) * Math.cos(e)), n.set(i, o, a); + }, + TubeGeometry: Ll, + TorusKnotGeometry: (function (e) { + (0, m.Z)(n, e); + var t = (0, g.Z)(n); + function n() { + var e, + r = + arguments.length > 0 && void 0 !== arguments[0] + ? arguments[0] + : 200, + i = + arguments.length > 1 && void 0 !== arguments[1] + ? arguments[1] + : 40, + a = + arguments.length > 2 && void 0 !== arguments[2] + ? arguments[2] + : 64, + o = + arguments.length > 3 && void 0 !== arguments[3] + ? arguments[3] + : 8, + s = + arguments.length > 4 && void 0 !== arguments[4] + ? arguments[4] + : 2, + l = + arguments.length > 5 && void 0 !== arguments[5] + ? arguments[5] + : 3; + (0, p.Z)(this, n); + var u = (function (e) { + (0, m.Z)(n, e); + var t = (0, g.Z)(n); + function n() { + return (0, p.Z)(this, n), t.apply(this, arguments); + } + return ( + (0, v.Z)(n, [ + { + key: "getPoint", + value: function (e) { + var t = + arguments.length > 1 && void 0 !== arguments[1] + ? arguments[1] + : new A.Vector3(); + e *= 2 * Math.PI; + var n = + (1 + 0.5 * Math.cos(l * e)) * Math.cos(s * e), + i = (1 + 0.5 * Math.cos(l * e)) * Math.sin(s * e), + a = 0.5 * Math.sin(l * e); + return t.set(n, i, a).multiplyScalar(r); + }, + }, + ]), + n + ); + })(A.Curve), + c = a, + f = o, + d = new u(); + return ( + ((e = t.call(this, d, c, i, f, !0, !1)).radius = r), + (e.tube = i), + (e.segmentsT = a), + (e.segmentsR = o), + (e.p = s), + (e.q = l), + e + ); + } + return (0, v.Z)(n); + })(Ll), + SphereGeometry: (function (e) { + (0, m.Z)(n, e); + var t = (0, g.Z)(n); + function n(e, r, i) { + return ( + (0, p.Z)(this, n), + t.call( + this, + function (t, n, r) { + (t *= Math.PI), (n *= 2 * Math.PI); + var i = e * Math.sin(t) * Math.cos(n), + a = e * Math.sin(t) * Math.sin(n), + o = e * Math.cos(t); + r.set(i, a, o); + }, + r, + i + ) + ); + } + return (0, v.Z)(n); + })(Pl), + PlaneGeometry: (function (e) { + (0, m.Z)(n, e); + var t = (0, g.Z)(n); + function n(e, r, i, a) { + return ( + (0, p.Z)(this, n), + t.call( + this, + function (t, n, i) { + var a = t * e, + o = n * r; + i.set(a, 0, o); + }, + i, + a + ) + ); + } + return (0, v.Z)(n); + })(Pl), + }, + Ul = new A.Vector3(); + function Fl(e, t, n, r, i, a) { + var o = (2 * Math.PI * i) / 4, + s = Math.max(a - 2 * i, 0), + l = Math.PI / 4; + Ul.copy(t), (Ul[r] = 0), Ul.normalize(); + var u = (0.5 * o) / (o + s), + c = 1 - Ul.angleTo(e) / l; + return 1 === Math.sign(Ul[n]) ? c * u : s / (o + s) + u + u * (1 - c); + } + var Ol = null, + Nl = null, + Gl = null, + Zl = null, + zl = null, + Ql = null, + Hl = new A.Matrix4(), + Vl = (function () { + function e(t) { + (0, p.Z)(this, e), + (t = t || {}), + (this.vertices = { + near: [ + new A.Vector3(), + new A.Vector3(), + new A.Vector3(), + new A.Vector3(), + ], + far: [ + new A.Vector3(), + new A.Vector3(), + new A.Vector3(), + new A.Vector3(), + ], + }), + void 0 !== t.projectionMatrix && + this.setFromProjectionMatrix( + t.projectionMatrix, + t.maxFar || 1e4 + ); + } + return ( + (0, v.Z)(e, [ + { + key: "setFromProjectionMatrix", + value: function (e, t) { + var n = 0 === e.elements[11]; + return ( + Hl.copy(e).invert(), + this.vertices.near[0].set(1, 1, -1), + this.vertices.near[1].set(1, -1, -1), + this.vertices.near[2].set(-1, -1, -1), + this.vertices.near[3].set(-1, 1, -1), + this.vertices.near.forEach(function (e) { + e.applyMatrix4(Hl); + }), + this.vertices.far[0].set(1, 1, 1), + this.vertices.far[1].set(1, -1, 1), + this.vertices.far[2].set(-1, -1, 1), + this.vertices.far[3].set(-1, 1, 1), + this.vertices.far.forEach(function (e) { + e.applyMatrix4(Hl); + var r = Math.abs(e.z); + n + ? (e.z *= Math.min(t / r, 1)) + : e.multiplyScalar(Math.min(t / r, 1)); + }), + this.vertices + ); + }, + }, + { + key: "split", + value: function (t, n) { + for (; t.length > n.length; ) n.push(new e()); + n.length = t.length; + for (var r = 0; r < t.length; r++) { + var i = n[r]; + if (0 === r) + for (var a = 0; a < 4; a++) + i.vertices.near[a].copy(this.vertices.near[a]); + else + for (var o = 0; o < 4; o++) + i.vertices.near[o].lerpVectors( + this.vertices.near[o], + this.vertices.far[o], + t[r - 1] + ); + if (r === t.length - 1) + for (var s = 0; s < 4; s++) + i.vertices.far[s].copy(this.vertices.far[s]); + else + for (var l = 0; l < 4; l++) + i.vertices.far[l].lerpVectors( + this.vertices.near[l], + this.vertices.far[l], + t[r] + ); + } + }, + }, + { + key: "toSpace", + value: function (e, t) { + for (var n = 0; n < 4; n++) + t.vertices.near[n] + .copy(this.vertices.near[n]) + .applyMatrix4(e), + t.vertices.far[n] + .copy(this.vertices.far[n]) + .applyMatrix4(e); + }, + }, + ]), + e + ); + })(), + jl = { + lights_fragment_begin: + "\nGeometricContext geometry;\n\ngeometry.position = - vViewPosition;\ngeometry.normal = normal;\ngeometry.viewDir = ( isOrthographic ) ? vec3( 0, 0, 1 ) : normalize( vViewPosition );\n\n#ifdef CLEARCOAT\n\n\tgeometry.clearcoatNormal = clearcoatNormal;\n\n#endif\n\nIncidentLight directLight;\n\n#if ( NUM_POINT_LIGHTS > 0 ) && defined( RE_Direct )\n\n\tPointLight pointLight;\n\t#if defined( USE_SHADOWMAP ) && NUM_POINT_LIGHT_SHADOWS > 0\n\tPointLightShadow pointLightShadow;\n\t#endif\n\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\n\n\t\tpointLight = pointLights[ i ];\n\n\t\tgetPointLightInfo( pointLight, geometry, directLight );\n\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_POINT_LIGHT_SHADOWS )\n\t\tpointLightShadow = pointLightShadows[ i ];\n\t\tdirectLight.color *= all( bvec2( 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\n\t\tRE_Direct( directLight, geometry, material, reflectedLight );\n\n\t}\n\t#pragma unroll_loop_end\n\n#endif\n\n#if ( NUM_SPOT_LIGHTS > 0 ) && defined( RE_Direct )\n\n\tSpotLight spotLight;\n\t#if defined( USE_SHADOWMAP ) && NUM_SPOT_LIGHT_SHADOWS > 0\n\tSpotLightShadow spotLightShadow;\n\t#endif\n\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\n\n\t\tspotLight = spotLights[ i ];\n\n\t\tgetSpotLightInfo( spotLight, geometry, directLight );\n\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )\n\t\tspotLightShadow = spotLightShadows[ i ];\n\t\tdirectLight.color *= all( bvec2( directLight.visible, receiveShadow ) ) ? getShadow( spotShadowMap[ i ], spotLightShadow.shadowMapSize, spotLightShadow.shadowBias, spotLightShadow.shadowRadius, vSpotShadowCoord[ i ] ) : 1.0;\n\t\t#endif\n\n\t\tRE_Direct( directLight, geometry, material, reflectedLight );\n\n\t}\n\t#pragma unroll_loop_end\n\n#endif\n\n#if ( NUM_DIR_LIGHTS > 0) && defined( RE_Direct ) && defined( USE_CSM ) && defined( CSM_CASCADES )\n\n\tDirectionalLight directionalLight;\n\tfloat linearDepth = (vViewPosition.z) / (shadowFar - cameraNear);\n\t#if defined( USE_SHADOWMAP ) && NUM_DIR_LIGHT_SHADOWS > 0\n\tDirectionalLightShadow directionalLightShadow;\n\t#endif\n\n\t#if defined( USE_SHADOWMAP ) && defined( CSM_FADE )\n\tvec2 cascade;\n\tfloat cascadeCenter;\n\tfloat closestEdge;\n\tfloat margin;\n\tfloat csmx;\n\tfloat csmy;\n\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n\n\t\tdirectionalLight = directionalLights[ i ];\n\t\tgetDirectionalLightInfo( directionalLight, geometry, directLight );\n\n\t \t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_DIR_LIGHT_SHADOWS )\n\t\t\t// NOTE: Depth gets larger away from the camera.\n\t\t\t// cascade.x is closer, cascade.y is further\n\t\t\tcascade = CSM_cascades[ i ];\n\t\t\tcascadeCenter = ( cascade.x + cascade.y ) / 2.0;\n\t\t\tclosestEdge = linearDepth < cascadeCenter ? cascade.x : cascade.y;\n\t\t\tmargin = 0.25 * pow( closestEdge, 2.0 );\n\t\t\tcsmx = cascade.x - margin / 2.0;\n\t\t\tcsmy = cascade.y + margin / 2.0;\n\t\t\tif( linearDepth >= csmx && ( linearDepth < csmy || UNROLLED_LOOP_INDEX == CSM_CASCADES - 1 ) ) {\n\n\t\t\t\tfloat dist = min( linearDepth - csmx, csmy - linearDepth );\n\t\t\t\tfloat ratio = clamp( dist / margin, 0.0, 1.0 );\n\n\t\t\t\tvec3 prevColor = directLight.color;\n\t\t\t\tdirectionalLightShadow = directionalLightShadows[ i ];\n\t\t\t\tdirectLight.color *= all( bvec2( directLight.visible, receiveShadow ) ) ? getShadow( directionalShadowMap[ i ], directionalLightShadow.shadowMapSize, directionalLightShadow.shadowBias, directionalLightShadow.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n\n\t\t\t\tbool shouldFadeLastCascade = UNROLLED_LOOP_INDEX == CSM_CASCADES - 1 && linearDepth > cascadeCenter;\n\t\t\t\tdirectLight.color = mix( prevColor, directLight.color, shouldFadeLastCascade ? ratio : 1.0 );\n\n\t\t\t\tReflectedLight prevLight = reflectedLight;\n\t\t\t\tRE_Direct( directLight, geometry, material, reflectedLight );\n\n\t\t\t\tbool shouldBlend = UNROLLED_LOOP_INDEX != CSM_CASCADES - 1 || UNROLLED_LOOP_INDEX == CSM_CASCADES - 1 && linearDepth < cascadeCenter;\n\t\t\t\tfloat blendRatio = shouldBlend ? ratio : 1.0;\n\n\t\t\t\treflectedLight.directDiffuse = mix( prevLight.directDiffuse, reflectedLight.directDiffuse, blendRatio );\n\t\t\t\treflectedLight.directSpecular = mix( prevLight.directSpecular, reflectedLight.directSpecular, blendRatio );\n\t\t\t\treflectedLight.indirectDiffuse = mix( prevLight.indirectDiffuse, reflectedLight.indirectDiffuse, blendRatio );\n\t\t\t\treflectedLight.indirectSpecular = mix( prevLight.indirectSpecular, reflectedLight.indirectSpecular, blendRatio );\n\n\t\t\t}\n\t \t#endif\n\n\t}\n\t#pragma unroll_loop_end\n\t#else\n\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n\n\t\t\tdirectionalLight = directionalLights[ i ];\n\t\t\tgetDirectionalLightInfo( directionalLight, geometry, directLight );\n\n\t\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_DIR_LIGHT_SHADOWS )\n\n\t\t\tdirectionalLightShadow = directionalLightShadows[ i ];\n\t\t\tif(linearDepth >= CSM_cascades[UNROLLED_LOOP_INDEX].x && linearDepth < CSM_cascades[UNROLLED_LOOP_INDEX].y) directLight.color *= all( bvec2( directLight.visible, receiveShadow ) ) ? getShadow( directionalShadowMap[ i ], directionalLightShadow.shadowMapSize, directionalLightShadow.shadowBias, directionalLightShadow.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n\n\t\t\tif(linearDepth >= CSM_cascades[UNROLLED_LOOP_INDEX].x && (linearDepth < CSM_cascades[UNROLLED_LOOP_INDEX].y || UNROLLED_LOOP_INDEX == CSM_CASCADES - 1)) RE_Direct( directLight, geometry, material, reflectedLight );\n\n\t\t\t#endif\n\n\t\t}\n\t\t#pragma unroll_loop_end\n\n\t#endif\n\n\t#if ( NUM_DIR_LIGHTS > NUM_DIR_LIGHT_SHADOWS)\n\t\t// compute the lights not casting shadows (if any)\n\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = NUM_DIR_LIGHT_SHADOWS; i < NUM_DIR_LIGHTS; i ++ ) {\n\n\t\t\tdirectionalLight = directionalLights[ i ];\n\n\t\t\tgetDirectionalLightInfo( directionalLight, geometry, directLight );\n\n\t\t\tRE_Direct( directLight, geometry, material, reflectedLight );\n\n\t\t}\n\t\t#pragma unroll_loop_end\n\n\t#endif\n\n#endif\n\n\n#if ( NUM_DIR_LIGHTS > 0 ) && defined( RE_Direct ) && !defined( USE_CSM ) && !defined( CSM_CASCADES )\n\n\tDirectionalLight directionalLight;\n\t#if defined( USE_SHADOWMAP ) && NUM_DIR_LIGHT_SHADOWS > 0\n\tDirectionalLightShadow directionalLightShadow;\n\t#endif\n\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n\n\t\tdirectionalLight = directionalLights[ i ];\n\n\t\tgetDirectionalLightInfo( directionalLight, geometry, directLight );\n\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_DIR_LIGHT_SHADOWS )\n\t\tdirectionalLightShadow = directionalLightShadows[ i ];\n\t\tdirectLight.color *= all( bvec2( directLight.visible, receiveShadow ) ) ? getShadow( directionalShadowMap[ i ], directionalLightShadow.shadowMapSize, directionalLightShadow.shadowBias, directionalLightShadow.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n\t\t#endif\n\n\t\tRE_Direct( directLight, geometry, material, reflectedLight );\n\n\t}\n\t#pragma unroll_loop_end\n\n#endif\n\n#if ( NUM_RECT_AREA_LIGHTS > 0 ) && defined( RE_Direct_RectArea )\n\n\tRectAreaLight rectAreaLight;\n\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_RECT_AREA_LIGHTS; i ++ ) {\n\n\t\trectAreaLight = rectAreaLights[ i ];\n\t\tRE_Direct_RectArea( rectAreaLight, geometry, material, reflectedLight );\n\n\t}\n\t#pragma unroll_loop_end\n\n#endif\n\n#if defined( RE_IndirectDiffuse )\n\n\tvec3 iblIrradiance = vec3( 0.0 );\n\n\tvec3 irradiance = getAmbientLightIrradiance( ambientLightColor );\n\n\tirradiance += getLightProbeIrradiance( lightProbe, geometry.normal );\n\n\t#if ( NUM_HEMI_LIGHTS > 0 )\n\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {\n\n\t\t\tirradiance += getHemisphereLightIrradiance( hemisphereLights[ i ], geometry.normal );\n\n\t\t}\n\t\t#pragma unroll_loop_end\n\n\t#endif\n\n#endif\n\n#if defined( RE_IndirectSpecular )\n\n\tvec3 radiance = vec3( 0.0 );\n\tvec3 clearcoatRadiance = vec3( 0.0 );\n\n#endif\n", + getlights_pars_begin: function () { + return "\n\t\t\t#if defined( USE_CSM ) && defined( CSM_CASCADES )\n\t\t\tuniform vec2 CSM_cascades[CSM_CASCADES];\n\t\t\tuniform float cameraNear;\n\t\t\tuniform float shadowFar;\n\t\t\t#endif\n\n\t\t\t".concat( + A.ShaderChunk.lights_pars_begin, + "\n\t\t" + ); + }, + }, + Wl = new A.Matrix4(), + Xl = new Vl(), + Yl = new A.Vector3(), + ql = new A.Box3(), + Jl = null, + Kl = null, + $l = null, + eu = null, + tu = { + uniforms: { tDiffuse: { value: null }, exposure: { value: 1 } }, + vertexShader: [ + "varying vec2 vUv;", + "void main() {", + "\tvUv = uv;", + "\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );", + "}", + ].join("\n"), + fragmentShader: [ + "#define saturate(a) clamp( a, 0.0, 1.0 )", + "uniform sampler2D tDiffuse;", + "uniform float exposure;", + "varying vec2 vUv;", + "vec3 RRTAndODTFit( vec3 v ) {", + "\tvec3 a = v * ( v + 0.0245786 ) - 0.000090537;", + "\tvec3 b = v * ( 0.983729 * v + 0.4329510 ) + 0.238081;", + "\treturn a / b;", + "}", + "vec3 ACESFilmicToneMapping( vec3 color ) {", + "\tconst mat3 ACESInputMat = mat3(", + "\t\tvec3( 0.59719, 0.07600, 0.02840 ),", + "\t\tvec3( 0.35458, 0.90834, 0.13383 ),", + "\t\tvec3( 0.04823, 0.01566, 0.83777 )", + "\t);", + "\tconst mat3 ACESOutputMat = mat3(", + "\t\tvec3( 1.60475, -0.10208, -0.00327 ),", + "\t\tvec3( -0.53108, 1.10813, -0.07276 ),", + "\t\tvec3( -0.07367, -0.00605, 1.07602 )", + "\t);", + "\tcolor = ACESInputMat * color;", + "\tcolor = RRTAndODTFit( color );", + "\tcolor = ACESOutputMat * color;", + "\treturn saturate( color );", + "}", + "void main() {", + "\tvec4 tex = texture2D( tDiffuse, vUv );", + "\ttex.rgb *= exposure / 0.6;", + "\tgl_FragColor = vec4( ACESFilmicToneMapping( tex.rgb ), tex.a );", + "}", + ].join("\n"), + }, + nu = { + uniforms: {}, + vertexShader: [ + "void main() {", + "\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );", + "}", + ].join("\n"), + fragmentShader: [ + "void main() {", + "\tgl_FragColor = vec4( 1.0, 0.0, 0.0, 0.5 );", + "}", + ].join("\n"), + }, + ru = { + uniforms: { tDiffuse: { value: null }, opacity: { value: 1 } }, + vertexShader: [ + "varying vec2 vUv;", + "void main() {", + "\tvUv = uv;", + "\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );", + "}", + ].join("\n"), + fragmentShader: [ + "uniform float opacity;", + "uniform sampler2D tDiffuse;", + "varying vec2 vUv;", + "void main() {", + "\tvec4 base = texture2D( tDiffuse, vUv );", + "\tvec3 lumCoeff = vec3( 0.25, 0.65, 0.1 );", + "\tfloat lum = dot( lumCoeff, base.rgb );", + "\tvec3 blend = vec3( lum );", + "\tfloat L = min( 1.0, max( 0.0, 10.0 * ( lum - 0.45 ) ) );", + "\tvec3 result1 = 2.0 * base.rgb * blend;", + "\tvec3 result2 = 1.0 - 2.0 * ( 1.0 - blend ) * ( 1.0 - base.rgb );", + "\tvec3 newColor = mix( result1, result2, L );", + "\tfloat A2 = opacity * base.a;", + "\tvec3 mixRGB = A2 * newColor.rgb;", + "\tmixRGB += ( ( 1.0 - A2 ) * base.rgb );", + "\tgl_FragColor = vec4( mixRGB, base.a );", + "}", + ].join("\n"), + }, + iu = { + uniforms: { + tDiffuse1: { value: null }, + tDiffuse2: { value: null }, + mixRatio: { value: 0.5 }, + opacity: { value: 1 }, + }, + vertexShader: [ + "varying vec2 vUv;", + "void main() {", + "\tvUv = uv;", + "\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );", + "}", + ].join("\n"), + fragmentShader: [ + "uniform float opacity;", + "uniform float mixRatio;", + "uniform sampler2D tDiffuse1;", + "uniform sampler2D tDiffuse2;", + "varying vec2 vUv;", + "void main() {", + "\tvec4 texel1 = texture2D( tDiffuse1, vUv );", + "\tvec4 texel2 = texture2D( tDiffuse2, vUv );", + "\tgl_FragColor = opacity * mix( texel1, texel2, mixRatio );", + "}", + ].join("\n"), + }, + au = { + uniforms: { + tDiffuse: { value: null }, + brightness: { value: 0 }, + contrast: { value: 0 }, + }, + vertexShader: [ + "varying vec2 vUv;", + "void main() {", + "\tvUv = uv;", + "\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );", + "}", + ].join("\n"), + fragmentShader: [ + "uniform sampler2D tDiffuse;", + "uniform float brightness;", + "uniform float contrast;", + "varying vec2 vUv;", + "void main() {", + "\tgl_FragColor = texture2D( tDiffuse, vUv );", + "\tgl_FragColor.rgb += brightness;", + "\tif (contrast > 0.0) {", + "\t\tgl_FragColor.rgb = (gl_FragColor.rgb - 0.5) / (1.0 - contrast) + 0.5;", + "\t} else {", + "\t\tgl_FragColor.rgb = (gl_FragColor.rgb - 0.5) * (1.0 + contrast) + 0.5;", + "\t}", + "}", + ].join("\n"), + }, + ou = { + uniforms: { + tDiffuse: { value: null }, + powRGB: { value: new A.Vector3(2, 2, 2) }, + mulRGB: { value: new A.Vector3(1, 1, 1) }, + addRGB: { value: new A.Vector3(0, 0, 0) }, + }, + vertexShader: [ + "varying vec2 vUv;", + "void main() {", + "\tvUv = uv;", + "\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );", + "}", + ].join("\n"), + fragmentShader: [ + "uniform sampler2D tDiffuse;", + "uniform vec3 powRGB;", + "uniform vec3 mulRGB;", + "uniform vec3 addRGB;", + "varying vec2 vUv;", + "void main() {", + "\tgl_FragColor = texture2D( tDiffuse, vUv );", + "\tgl_FragColor.rgb = mulRGB * pow( ( gl_FragColor.rgb + addRGB ), powRGB );", + "}", + ].join("\n"), + }, + su = { + uniforms: { + tDiffuse: { value: null }, + color: { value: new A.Color(16777215) }, + }, + vertexShader: [ + "varying vec2 vUv;", + "void main() {", + "\tvUv = uv;", + "\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );", + "}", + ].join("\n"), + fragmentShader: [ + "uniform vec3 color;", + "uniform sampler2D tDiffuse;", + "varying vec2 vUv;", + "void main() {", + "\tvec4 texel = texture2D( tDiffuse, vUv );", + "\tvec3 luma = vec3( 0.299, 0.587, 0.114 );", + "\tfloat v = dot( texel.xyz, luma );", + "\tgl_FragColor = vec4( v * color, texel.w );", + "}", + ].join("\n"), + }, + lu = { + uniforms: { + tColor: { value: null }, + tDepth: { value: null }, + focus: { value: 1 }, + maxblur: { value: 1 }, + }, + vertexShader: [ + "varying vec2 vUv;", + "void main() {", + "\tvUv = uv;", + "\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );", + "}", + ].join("\n"), + fragmentShader: [ + "uniform float focus;", + "uniform float maxblur;", + "uniform sampler2D tColor;", + "uniform sampler2D tDepth;", + "varying vec2 vUv;", + "void main() {", + "\tvec4 depth = texture2D( tDepth, vUv );", + "\tfloat factor = depth.x - focus;", + "\tvec4 col = texture2D( tColor, vUv, 2.0 * maxblur * abs( focus - depth.x ) );", + "\tgl_FragColor = col;", + "\tgl_FragColor.a = 1.0;", + "}", + ].join("\n"), + }, + uu = { + uniforms: { + tDiffuse: { value: null }, + resolution: { value: new A.Vector2(1 / 1024, 1 / 512) }, + }, + vertexShader: [ + "varying vec2 vUv;", + "void main() {", + "\tvUv = uv;", + "\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );", + "}", + ].join("\n"), + fragmentShader: [ + "precision highp float;", + "", + "uniform sampler2D tDiffuse;", + "", + "uniform vec2 resolution;", + "", + "varying vec2 vUv;", + "", + "// FXAA 3.11 implementation by NVIDIA, ported to WebGL by Agost Biro (biro@archilogic.com)", + "", + "//----------------------------------------------------------------------------------", + "// File: es3-keplerFXAAassetsshaders/FXAA_DefaultES.frag", + "// SDK Version: v3.00", + "// Email: gameworks@nvidia.com", + "// Site: http://developer.nvidia.com/", + "//", + "// Copyright (c) 2014-2015, NVIDIA CORPORATION. All rights reserved.", + "//", + "// Redistribution and use in source and binary forms, with or without", + "// modification, are permitted provided that the following conditions", + "// are met:", + "// * Redistributions of source code must retain the above copyright", + "// notice, this list of conditions and the following disclaimer.", + "// * Redistributions in binary form must reproduce the above copyright", + "// notice, this list of conditions and the following disclaimer in the", + "// documentation and/or other materials provided with the distribution.", + "// * Neither the name of NVIDIA CORPORATION nor the names of its", + "// contributors may be used to endorse or promote products derived", + "// from this software without specific prior written permission.", + "//", + "// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY", + "// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE", + "// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR", + "// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR", + "// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,", + "// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,", + "// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR", + "// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY", + "// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT", + "// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE", + "// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.", + "//", + "//----------------------------------------------------------------------------------", + "", + "#define FXAA_PC 1", + "#define FXAA_GLSL_100 1", + "#define FXAA_QUALITY_PRESET 12", + "", + "#define FXAA_GREEN_AS_LUMA 1", + "", + "/*--------------------------------------------------------------------------*/", + "#ifndef FXAA_PC_CONSOLE", + " //", + " // The console algorithm for PC is included", + " // for developers targeting really low spec machines.", + " // Likely better to just run FXAA_PC, and use a really low preset.", + " //", + " #define FXAA_PC_CONSOLE 0", + "#endif", + "/*--------------------------------------------------------------------------*/", + "#ifndef FXAA_GLSL_120", + " #define FXAA_GLSL_120 0", + "#endif", + "/*--------------------------------------------------------------------------*/", + "#ifndef FXAA_GLSL_130", + " #define FXAA_GLSL_130 0", + "#endif", + "/*--------------------------------------------------------------------------*/", + "#ifndef FXAA_HLSL_3", + " #define FXAA_HLSL_3 0", + "#endif", + "/*--------------------------------------------------------------------------*/", + "#ifndef FXAA_HLSL_4", + " #define FXAA_HLSL_4 0", + "#endif", + "/*--------------------------------------------------------------------------*/", + "#ifndef FXAA_HLSL_5", + " #define FXAA_HLSL_5 0", + "#endif", + "/*==========================================================================*/", + "#ifndef FXAA_GREEN_AS_LUMA", + " //", + " // For those using non-linear color,", + " // and either not able to get luma in alpha, or not wanting to,", + " // this enables FXAA to run using green as a proxy for luma.", + " // So with this enabled, no need to pack luma in alpha.", + " //", + " // This will turn off AA on anything which lacks some amount of green.", + " // Pure red and blue or combination of only R and B, will get no AA.", + " //", + " // Might want to lower the settings for both,", + " // fxaaConsoleEdgeThresholdMin", + " // fxaaQualityEdgeThresholdMin", + " // In order to insure AA does not get turned off on colors", + " // which contain a minor amount of green.", + " //", + " // 1 = On.", + " // 0 = Off.", + " //", + " #define FXAA_GREEN_AS_LUMA 0", + "#endif", + "/*--------------------------------------------------------------------------*/", + "#ifndef FXAA_EARLY_EXIT", + " //", + " // Controls algorithm's early exit path.", + " // On PS3 turning this ON adds 2 cycles to the shader.", + " // On 360 turning this OFF adds 10ths of a millisecond to the shader.", + " // Turning this off on console will result in a more blurry image.", + " // So this defaults to on.", + " //", + " // 1 = On.", + " // 0 = Off.", + " //", + " #define FXAA_EARLY_EXIT 1", + "#endif", + "/*--------------------------------------------------------------------------*/", + "#ifndef FXAA_DISCARD", + " //", + " // Only valid for PC OpenGL currently.", + " // Probably will not work when FXAA_GREEN_AS_LUMA = 1.", + " //", + " // 1 = Use discard on pixels which don't need AA.", + " // For APIs which enable concurrent TEX+ROP from same surface.", + " // 0 = Return unchanged color on pixels which don't need AA.", + " //", + " #define FXAA_DISCARD 0", + "#endif", + "/*--------------------------------------------------------------------------*/", + "#ifndef FXAA_FAST_PIXEL_OFFSET", + " //", + " // Used for GLSL 120 only.", + " //", + " // 1 = GL API supports fast pixel offsets", + " // 0 = do not use fast pixel offsets", + " //", + " #ifdef GL_EXT_gpu_shader4", + " #define FXAA_FAST_PIXEL_OFFSET 1", + " #endif", + " #ifdef GL_NV_gpu_shader5", + " #define FXAA_FAST_PIXEL_OFFSET 1", + " #endif", + " #ifdef GL_ARB_gpu_shader5", + " #define FXAA_FAST_PIXEL_OFFSET 1", + " #endif", + " #ifndef FXAA_FAST_PIXEL_OFFSET", + " #define FXAA_FAST_PIXEL_OFFSET 0", + " #endif", + "#endif", + "/*--------------------------------------------------------------------------*/", + "#ifndef FXAA_GATHER4_ALPHA", + " //", + " // 1 = API supports gather4 on alpha channel.", + " // 0 = API does not support gather4 on alpha channel.", + " //", + " #if (FXAA_HLSL_5 == 1)", + " #define FXAA_GATHER4_ALPHA 1", + " #endif", + " #ifdef GL_ARB_gpu_shader5", + " #define FXAA_GATHER4_ALPHA 1", + " #endif", + " #ifdef GL_NV_gpu_shader5", + " #define FXAA_GATHER4_ALPHA 1", + " #endif", + " #ifndef FXAA_GATHER4_ALPHA", + " #define FXAA_GATHER4_ALPHA 0", + " #endif", + "#endif", + "", + "", + "/*============================================================================", + " FXAA QUALITY - TUNING KNOBS", + "------------------------------------------------------------------------------", + "NOTE the other tuning knobs are now in the shader function inputs!", + "============================================================================*/", + "#ifndef FXAA_QUALITY_PRESET", + " //", + " // Choose the quality preset.", + " // This needs to be compiled into the shader as it effects code.", + " // Best option to include multiple presets is to", + " // in each shader define the preset, then include this file.", + " //", + " // OPTIONS", + " // -----------------------------------------------------------------------", + " // 10 to 15 - default medium dither (10=fastest, 15=highest quality)", + " // 20 to 29 - less dither, more expensive (20=fastest, 29=highest quality)", + " // 39 - no dither, very expensive", + " //", + " // NOTES", + " // -----------------------------------------------------------------------", + " // 12 = slightly faster then FXAA 3.9 and higher edge quality (default)", + " // 13 = about same speed as FXAA 3.9 and better than 12", + " // 23 = closest to FXAA 3.9 visually and performance wise", + " // _ = the lowest digit is directly related to performance", + " // _ = the highest digit is directly related to style", + " //", + " #define FXAA_QUALITY_PRESET 12", + "#endif", + "", + "", + "/*============================================================================", + "", + " FXAA QUALITY - PRESETS", + "", + "============================================================================*/", + "", + "/*============================================================================", + " FXAA QUALITY - MEDIUM DITHER PRESETS", + "============================================================================*/", + "#if (FXAA_QUALITY_PRESET == 10)", + " #define FXAA_QUALITY_PS 3", + " #define FXAA_QUALITY_P0 1.5", + " #define FXAA_QUALITY_P1 3.0", + " #define FXAA_QUALITY_P2 12.0", + "#endif", + "/*--------------------------------------------------------------------------*/", + "#if (FXAA_QUALITY_PRESET == 11)", + " #define FXAA_QUALITY_PS 4", + " #define FXAA_QUALITY_P0 1.0", + " #define FXAA_QUALITY_P1 1.5", + " #define FXAA_QUALITY_P2 3.0", + " #define FXAA_QUALITY_P3 12.0", + "#endif", + "/*--------------------------------------------------------------------------*/", + "#if (FXAA_QUALITY_PRESET == 12)", + " #define FXAA_QUALITY_PS 5", + " #define FXAA_QUALITY_P0 1.0", + " #define FXAA_QUALITY_P1 1.5", + " #define FXAA_QUALITY_P2 2.0", + " #define FXAA_QUALITY_P3 4.0", + " #define FXAA_QUALITY_P4 12.0", + "#endif", + "/*--------------------------------------------------------------------------*/", + "#if (FXAA_QUALITY_PRESET == 13)", + " #define FXAA_QUALITY_PS 6", + " #define FXAA_QUALITY_P0 1.0", + " #define FXAA_QUALITY_P1 1.5", + " #define FXAA_QUALITY_P2 2.0", + " #define FXAA_QUALITY_P3 2.0", + " #define FXAA_QUALITY_P4 4.0", + " #define FXAA_QUALITY_P5 12.0", + "#endif", + "/*--------------------------------------------------------------------------*/", + "#if (FXAA_QUALITY_PRESET == 14)", + " #define FXAA_QUALITY_PS 7", + " #define FXAA_QUALITY_P0 1.0", + " #define FXAA_QUALITY_P1 1.5", + " #define FXAA_QUALITY_P2 2.0", + " #define FXAA_QUALITY_P3 2.0", + " #define FXAA_QUALITY_P4 2.0", + " #define FXAA_QUALITY_P5 4.0", + " #define FXAA_QUALITY_P6 12.0", + "#endif", + "/*--------------------------------------------------------------------------*/", + "#if (FXAA_QUALITY_PRESET == 15)", + " #define FXAA_QUALITY_PS 8", + " #define FXAA_QUALITY_P0 1.0", + " #define FXAA_QUALITY_P1 1.5", + " #define FXAA_QUALITY_P2 2.0", + " #define FXAA_QUALITY_P3 2.0", + " #define FXAA_QUALITY_P4 2.0", + " #define FXAA_QUALITY_P5 2.0", + " #define FXAA_QUALITY_P6 4.0", + " #define FXAA_QUALITY_P7 12.0", + "#endif", + "", + "/*============================================================================", + " FXAA QUALITY - LOW DITHER PRESETS", + "============================================================================*/", + "#if (FXAA_QUALITY_PRESET == 20)", + " #define FXAA_QUALITY_PS 3", + " #define FXAA_QUALITY_P0 1.5", + " #define FXAA_QUALITY_P1 2.0", + " #define FXAA_QUALITY_P2 8.0", + "#endif", + "/*--------------------------------------------------------------------------*/", + "#if (FXAA_QUALITY_PRESET == 21)", + " #define FXAA_QUALITY_PS 4", + " #define FXAA_QUALITY_P0 1.0", + " #define FXAA_QUALITY_P1 1.5", + " #define FXAA_QUALITY_P2 2.0", + " #define FXAA_QUALITY_P3 8.0", + "#endif", + "/*--------------------------------------------------------------------------*/", + "#if (FXAA_QUALITY_PRESET == 22)", + " #define FXAA_QUALITY_PS 5", + " #define FXAA_QUALITY_P0 1.0", + " #define FXAA_QUALITY_P1 1.5", + " #define FXAA_QUALITY_P2 2.0", + " #define FXAA_QUALITY_P3 2.0", + " #define FXAA_QUALITY_P4 8.0", + "#endif", + "/*--------------------------------------------------------------------------*/", + "#if (FXAA_QUALITY_PRESET == 23)", + " #define FXAA_QUALITY_PS 6", + " #define FXAA_QUALITY_P0 1.0", + " #define FXAA_QUALITY_P1 1.5", + " #define FXAA_QUALITY_P2 2.0", + " #define FXAA_QUALITY_P3 2.0", + " #define FXAA_QUALITY_P4 2.0", + " #define FXAA_QUALITY_P5 8.0", + "#endif", + "/*--------------------------------------------------------------------------*/", + "#if (FXAA_QUALITY_PRESET == 24)", + " #define FXAA_QUALITY_PS 7", + " #define FXAA_QUALITY_P0 1.0", + " #define FXAA_QUALITY_P1 1.5", + " #define FXAA_QUALITY_P2 2.0", + " #define FXAA_QUALITY_P3 2.0", + " #define FXAA_QUALITY_P4 2.0", + " #define FXAA_QUALITY_P5 3.0", + " #define FXAA_QUALITY_P6 8.0", + "#endif", + "/*--------------------------------------------------------------------------*/", + "#if (FXAA_QUALITY_PRESET == 25)", + " #define FXAA_QUALITY_PS 8", + " #define FXAA_QUALITY_P0 1.0", + " #define FXAA_QUALITY_P1 1.5", + " #define FXAA_QUALITY_P2 2.0", + " #define FXAA_QUALITY_P3 2.0", + " #define FXAA_QUALITY_P4 2.0", + " #define FXAA_QUALITY_P5 2.0", + " #define FXAA_QUALITY_P6 4.0", + " #define FXAA_QUALITY_P7 8.0", + "#endif", + "/*--------------------------------------------------------------------------*/", + "#if (FXAA_QUALITY_PRESET == 26)", + " #define FXAA_QUALITY_PS 9", + " #define FXAA_QUALITY_P0 1.0", + " #define FXAA_QUALITY_P1 1.5", + " #define FXAA_QUALITY_P2 2.0", + " #define FXAA_QUALITY_P3 2.0", + " #define FXAA_QUALITY_P4 2.0", + " #define FXAA_QUALITY_P5 2.0", + " #define FXAA_QUALITY_P6 2.0", + " #define FXAA_QUALITY_P7 4.0", + " #define FXAA_QUALITY_P8 8.0", + "#endif", + "/*--------------------------------------------------------------------------*/", + "#if (FXAA_QUALITY_PRESET == 27)", + " #define FXAA_QUALITY_PS 10", + " #define FXAA_QUALITY_P0 1.0", + " #define FXAA_QUALITY_P1 1.5", + " #define FXAA_QUALITY_P2 2.0", + " #define FXAA_QUALITY_P3 2.0", + " #define FXAA_QUALITY_P4 2.0", + " #define FXAA_QUALITY_P5 2.0", + " #define FXAA_QUALITY_P6 2.0", + " #define FXAA_QUALITY_P7 2.0", + " #define FXAA_QUALITY_P8 4.0", + " #define FXAA_QUALITY_P9 8.0", + "#endif", + "/*--------------------------------------------------------------------------*/", + "#if (FXAA_QUALITY_PRESET == 28)", + " #define FXAA_QUALITY_PS 11", + " #define FXAA_QUALITY_P0 1.0", + " #define FXAA_QUALITY_P1 1.5", + " #define FXAA_QUALITY_P2 2.0", + " #define FXAA_QUALITY_P3 2.0", + " #define FXAA_QUALITY_P4 2.0", + " #define FXAA_QUALITY_P5 2.0", + " #define FXAA_QUALITY_P6 2.0", + " #define FXAA_QUALITY_P7 2.0", + " #define FXAA_QUALITY_P8 2.0", + " #define FXAA_QUALITY_P9 4.0", + " #define FXAA_QUALITY_P10 8.0", + "#endif", + "/*--------------------------------------------------------------------------*/", + "#if (FXAA_QUALITY_PRESET == 29)", + " #define FXAA_QUALITY_PS 12", + " #define FXAA_QUALITY_P0 1.0", + " #define FXAA_QUALITY_P1 1.5", + " #define FXAA_QUALITY_P2 2.0", + " #define FXAA_QUALITY_P3 2.0", + " #define FXAA_QUALITY_P4 2.0", + " #define FXAA_QUALITY_P5 2.0", + " #define FXAA_QUALITY_P6 2.0", + " #define FXAA_QUALITY_P7 2.0", + " #define FXAA_QUALITY_P8 2.0", + " #define FXAA_QUALITY_P9 2.0", + " #define FXAA_QUALITY_P10 4.0", + " #define FXAA_QUALITY_P11 8.0", + "#endif", + "", + "/*============================================================================", + " FXAA QUALITY - EXTREME QUALITY", + "============================================================================*/", + "#if (FXAA_QUALITY_PRESET == 39)", + " #define FXAA_QUALITY_PS 12", + " #define FXAA_QUALITY_P0 1.0", + " #define FXAA_QUALITY_P1 1.0", + " #define FXAA_QUALITY_P2 1.0", + " #define FXAA_QUALITY_P3 1.0", + " #define FXAA_QUALITY_P4 1.0", + " #define FXAA_QUALITY_P5 1.5", + " #define FXAA_QUALITY_P6 2.0", + " #define FXAA_QUALITY_P7 2.0", + " #define FXAA_QUALITY_P8 2.0", + " #define FXAA_QUALITY_P9 2.0", + " #define FXAA_QUALITY_P10 4.0", + " #define FXAA_QUALITY_P11 8.0", + "#endif", + "", + "", + "", + "/*============================================================================", + "", + " API PORTING", + "", + "============================================================================*/", + "#if (FXAA_GLSL_100 == 1) || (FXAA_GLSL_120 == 1) || (FXAA_GLSL_130 == 1)", + " #define FxaaBool bool", + " #define FxaaDiscard discard", + " #define FxaaFloat float", + " #define FxaaFloat2 vec2", + " #define FxaaFloat3 vec3", + " #define FxaaFloat4 vec4", + " #define FxaaHalf float", + " #define FxaaHalf2 vec2", + " #define FxaaHalf3 vec3", + " #define FxaaHalf4 vec4", + " #define FxaaInt2 ivec2", + " #define FxaaSat(x) clamp(x, 0.0, 1.0)", + " #define FxaaTex sampler2D", + "#else", + " #define FxaaBool bool", + " #define FxaaDiscard clip(-1)", + " #define FxaaFloat float", + " #define FxaaFloat2 float2", + " #define FxaaFloat3 float3", + " #define FxaaFloat4 float4", + " #define FxaaHalf half", + " #define FxaaHalf2 half2", + " #define FxaaHalf3 half3", + " #define FxaaHalf4 half4", + " #define FxaaSat(x) saturate(x)", + "#endif", + "/*--------------------------------------------------------------------------*/", + "#if (FXAA_GLSL_100 == 1)", + " #define FxaaTexTop(t, p) texture2D(t, p, 0.0)", + " #define FxaaTexOff(t, p, o, r) texture2D(t, p + (o * r), 0.0)", + "#endif", + "/*--------------------------------------------------------------------------*/", + "#if (FXAA_GLSL_120 == 1)", + " // Requires,", + " // #version 120", + " // And at least,", + " // #extension GL_EXT_gpu_shader4 : enable", + " // (or set FXAA_FAST_PIXEL_OFFSET 1 to work like DX9)", + " #define FxaaTexTop(t, p) texture2DLod(t, p, 0.0)", + " #if (FXAA_FAST_PIXEL_OFFSET == 1)", + " #define FxaaTexOff(t, p, o, r) texture2DLodOffset(t, p, 0.0, o)", + " #else", + " #define FxaaTexOff(t, p, o, r) texture2DLod(t, p + (o * r), 0.0)", + " #endif", + " #if (FXAA_GATHER4_ALPHA == 1)", + " // use #extension GL_ARB_gpu_shader5 : enable", + " #define FxaaTexAlpha4(t, p) textureGather(t, p, 3)", + " #define FxaaTexOffAlpha4(t, p, o) textureGatherOffset(t, p, o, 3)", + " #define FxaaTexGreen4(t, p) textureGather(t, p, 1)", + " #define FxaaTexOffGreen4(t, p, o) textureGatherOffset(t, p, o, 1)", + " #endif", + "#endif", + "/*--------------------------------------------------------------------------*/", + "#if (FXAA_GLSL_130 == 1)", + ' // Requires "#version 130" or better', + " #define FxaaTexTop(t, p) textureLod(t, p, 0.0)", + " #define FxaaTexOff(t, p, o, r) textureLodOffset(t, p, 0.0, o)", + " #if (FXAA_GATHER4_ALPHA == 1)", + " // use #extension GL_ARB_gpu_shader5 : enable", + " #define FxaaTexAlpha4(t, p) textureGather(t, p, 3)", + " #define FxaaTexOffAlpha4(t, p, o) textureGatherOffset(t, p, o, 3)", + " #define FxaaTexGreen4(t, p) textureGather(t, p, 1)", + " #define FxaaTexOffGreen4(t, p, o) textureGatherOffset(t, p, o, 1)", + " #endif", + "#endif", + "/*--------------------------------------------------------------------------*/", + "#if (FXAA_HLSL_3 == 1)", + " #define FxaaInt2 float2", + " #define FxaaTex sampler2D", + " #define FxaaTexTop(t, p) tex2Dlod(t, float4(p, 0.0, 0.0))", + " #define FxaaTexOff(t, p, o, r) tex2Dlod(t, float4(p + (o * r), 0, 0))", + "#endif", + "/*--------------------------------------------------------------------------*/", + "#if (FXAA_HLSL_4 == 1)", + " #define FxaaInt2 int2", + " struct FxaaTex { SamplerState smpl; Texture2D tex; };", + " #define FxaaTexTop(t, p) t.tex.SampleLevel(t.smpl, p, 0.0)", + " #define FxaaTexOff(t, p, o, r) t.tex.SampleLevel(t.smpl, p, 0.0, o)", + "#endif", + "/*--------------------------------------------------------------------------*/", + "#if (FXAA_HLSL_5 == 1)", + " #define FxaaInt2 int2", + " struct FxaaTex { SamplerState smpl; Texture2D tex; };", + " #define FxaaTexTop(t, p) t.tex.SampleLevel(t.smpl, p, 0.0)", + " #define FxaaTexOff(t, p, o, r) t.tex.SampleLevel(t.smpl, p, 0.0, o)", + " #define FxaaTexAlpha4(t, p) t.tex.GatherAlpha(t.smpl, p)", + " #define FxaaTexOffAlpha4(t, p, o) t.tex.GatherAlpha(t.smpl, p, o)", + " #define FxaaTexGreen4(t, p) t.tex.GatherGreen(t.smpl, p)", + " #define FxaaTexOffGreen4(t, p, o) t.tex.GatherGreen(t.smpl, p, o)", + "#endif", + "", + "", + "/*============================================================================", + " GREEN AS LUMA OPTION SUPPORT FUNCTION", + "============================================================================*/", + "#if (FXAA_GREEN_AS_LUMA == 0)", + " FxaaFloat FxaaLuma(FxaaFloat4 rgba) { return rgba.w; }", + "#else", + " FxaaFloat FxaaLuma(FxaaFloat4 rgba) { return rgba.y; }", + "#endif", + "", + "", + "", + "", + "/*============================================================================", + "", + " FXAA3 QUALITY - PC", + "", + "============================================================================*/", + "#if (FXAA_PC == 1)", + "/*--------------------------------------------------------------------------*/", + "FxaaFloat4 FxaaPixelShader(", + " //", + " // Use noperspective interpolation here (turn off perspective interpolation).", + " // {xy} = center of pixel", + " FxaaFloat2 pos,", + " //", + " // Used only for FXAA Console, and not used on the 360 version.", + " // Use noperspective interpolation here (turn off perspective interpolation).", + " // {xy_} = upper left of pixel", + " // {_zw} = lower right of pixel", + " FxaaFloat4 fxaaConsolePosPos,", + " //", + " // Input color texture.", + " // {rgb_} = color in linear or perceptual color space", + " // if (FXAA_GREEN_AS_LUMA == 0)", + " // {__a} = luma in perceptual color space (not linear)", + " FxaaTex tex,", + " //", + " // Only used on the optimized 360 version of FXAA Console.", + ' // For everything but 360, just use the same input here as for "tex".', + " // For 360, same texture, just alias with a 2nd sampler.", + " // This sampler needs to have an exponent bias of -1.", + " FxaaTex fxaaConsole360TexExpBiasNegOne,", + " //", + " // Only used on the optimized 360 version of FXAA Console.", + ' // For everything but 360, just use the same input here as for "tex".', + " // For 360, same texture, just alias with a 3nd sampler.", + " // This sampler needs to have an exponent bias of -2.", + " FxaaTex fxaaConsole360TexExpBiasNegTwo,", + " //", + " // Only used on FXAA Quality.", + " // This must be from a constant/uniform.", + " // {x_} = 1.0/screenWidthInPixels", + " // {_y} = 1.0/screenHeightInPixels", + " FxaaFloat2 fxaaQualityRcpFrame,", + " //", + " // Only used on FXAA Console.", + " // This must be from a constant/uniform.", + " // This effects sub-pixel AA quality and inversely sharpness.", + " // Where N ranges between,", + " // N = 0.50 (default)", + " // N = 0.33 (sharper)", + " // {x__} = -N/screenWidthInPixels", + " // {_y_} = -N/screenHeightInPixels", + " // {_z_} = N/screenWidthInPixels", + " // {__w} = N/screenHeightInPixels", + " FxaaFloat4 fxaaConsoleRcpFrameOpt,", + " //", + " // Only used on FXAA Console.", + " // Not used on 360, but used on PS3 and PC.", + " // This must be from a constant/uniform.", + " // {x__} = -2.0/screenWidthInPixels", + " // {_y_} = -2.0/screenHeightInPixels", + " // {_z_} = 2.0/screenWidthInPixels", + " // {__w} = 2.0/screenHeightInPixels", + " FxaaFloat4 fxaaConsoleRcpFrameOpt2,", + " //", + " // Only used on FXAA Console.", + " // Only used on 360 in place of fxaaConsoleRcpFrameOpt2.", + " // This must be from a constant/uniform.", + " // {x__} = 8.0/screenWidthInPixels", + " // {_y_} = 8.0/screenHeightInPixels", + " // {_z_} = -4.0/screenWidthInPixels", + " // {__w} = -4.0/screenHeightInPixels", + " FxaaFloat4 fxaaConsole360RcpFrameOpt2,", + " //", + " // Only used on FXAA Quality.", + " // This used to be the FXAA_QUALITY_SUBPIX define.", + " // It is here now to allow easier tuning.", + " // Choose the amount of sub-pixel aliasing removal.", + " // This can effect sharpness.", + " // 1.00 - upper limit (softer)", + " // 0.75 - default amount of filtering", + " // 0.50 - lower limit (sharper, less sub-pixel aliasing removal)", + " // 0.25 - almost off", + " // 0.00 - completely off", + " FxaaFloat fxaaQualitySubpix,", + " //", + " // Only used on FXAA Quality.", + " // This used to be the FXAA_QUALITY_EDGE_THRESHOLD define.", + " // It is here now to allow easier tuning.", + " // The minimum amount of local contrast required to apply algorithm.", + " // 0.333 - too little (faster)", + " // 0.250 - low quality", + " // 0.166 - default", + " // 0.125 - high quality", + " // 0.063 - overkill (slower)", + " FxaaFloat fxaaQualityEdgeThreshold,", + " //", + " // Only used on FXAA Quality.", + " // This used to be the FXAA_QUALITY_EDGE_THRESHOLD_MIN define.", + " // It is here now to allow easier tuning.", + " // Trims the algorithm from processing darks.", + " // 0.0833 - upper limit (default, the start of visible unfiltered edges)", + " // 0.0625 - high quality (faster)", + " // 0.0312 - visible limit (slower)", + " // Special notes when using FXAA_GREEN_AS_LUMA,", + " // Likely want to set this to zero.", + " // As colors that are mostly not-green", + " // will appear very dark in the green channel!", + " // Tune by looking at mostly non-green content,", + " // then start at zero and increase until aliasing is a problem.", + " FxaaFloat fxaaQualityEdgeThresholdMin,", + " //", + " // Only used on FXAA Console.", + " // This used to be the FXAA_CONSOLE_EDGE_SHARPNESS define.", + " // It is here now to allow easier tuning.", + " // This does not effect PS3, as this needs to be compiled in.", + " // Use FXAA_CONSOLE_PS3_EDGE_SHARPNESS for PS3.", + " // Due to the PS3 being ALU bound,", + " // there are only three safe values here: 2 and 4 and 8.", + " // These options use the shaders ability to a free *|/ by 2|4|8.", + " // For all other platforms can be a non-power of two.", + " // 8.0 is sharper (default!!!)", + " // 4.0 is softer", + " // 2.0 is really soft (good only for vector graphics inputs)", + " FxaaFloat fxaaConsoleEdgeSharpness,", + " //", + " // Only used on FXAA Console.", + " // This used to be the FXAA_CONSOLE_EDGE_THRESHOLD define.", + " // It is here now to allow easier tuning.", + " // This does not effect PS3, as this needs to be compiled in.", + " // Use FXAA_CONSOLE_PS3_EDGE_THRESHOLD for PS3.", + " // Due to the PS3 being ALU bound,", + " // there are only two safe values here: 1/4 and 1/8.", + " // These options use the shaders ability to a free *|/ by 2|4|8.", + " // The console setting has a different mapping than the quality setting.", + " // Other platforms can use other values.", + " // 0.125 leaves less aliasing, but is softer (default!!!)", + " // 0.25 leaves more aliasing, and is sharper", + " FxaaFloat fxaaConsoleEdgeThreshold,", + " //", + " // Only used on FXAA Console.", + " // This used to be the FXAA_CONSOLE_EDGE_THRESHOLD_MIN define.", + " // It is here now to allow easier tuning.", + " // Trims the algorithm from processing darks.", + " // The console setting has a different mapping than the quality setting.", + " // This only applies when FXAA_EARLY_EXIT is 1.", + " // This does not apply to PS3,", + " // PS3 was simplified to avoid more shader instructions.", + " // 0.06 - faster but more aliasing in darks", + " // 0.05 - default", + " // 0.04 - slower and less aliasing in darks", + " // Special notes when using FXAA_GREEN_AS_LUMA,", + " // Likely want to set this to zero.", + " // As colors that are mostly not-green", + " // will appear very dark in the green channel!", + " // Tune by looking at mostly non-green content,", + " // then start at zero and increase until aliasing is a problem.", + " FxaaFloat fxaaConsoleEdgeThresholdMin,", + " //", + " // Extra constants for 360 FXAA Console only.", + " // Use zeros or anything else for other platforms.", + " // These must be in physical constant registers and NOT immediates.", + " // Immediates will result in compiler un-optimizing.", + " // {xyzw} = float4(1.0, -1.0, 0.25, -0.25)", + " FxaaFloat4 fxaaConsole360ConstDir", + ") {", + "/*--------------------------------------------------------------------------*/", + " FxaaFloat2 posM;", + " posM.x = pos.x;", + " posM.y = pos.y;", + " #if (FXAA_GATHER4_ALPHA == 1)", + " #if (FXAA_DISCARD == 0)", + " FxaaFloat4 rgbyM = FxaaTexTop(tex, posM);", + " #if (FXAA_GREEN_AS_LUMA == 0)", + " #define lumaM rgbyM.w", + " #else", + " #define lumaM rgbyM.y", + " #endif", + " #endif", + " #if (FXAA_GREEN_AS_LUMA == 0)", + " FxaaFloat4 luma4A = FxaaTexAlpha4(tex, posM);", + " FxaaFloat4 luma4B = FxaaTexOffAlpha4(tex, posM, FxaaInt2(-1, -1));", + " #else", + " FxaaFloat4 luma4A = FxaaTexGreen4(tex, posM);", + " FxaaFloat4 luma4B = FxaaTexOffGreen4(tex, posM, FxaaInt2(-1, -1));", + " #endif", + " #if (FXAA_DISCARD == 1)", + " #define lumaM luma4A.w", + " #endif", + " #define lumaE luma4A.z", + " #define lumaS luma4A.x", + " #define lumaSE luma4A.y", + " #define lumaNW luma4B.w", + " #define lumaN luma4B.z", + " #define lumaW luma4B.x", + " #else", + " FxaaFloat4 rgbyM = FxaaTexTop(tex, posM);", + " #if (FXAA_GREEN_AS_LUMA == 0)", + " #define lumaM rgbyM.w", + " #else", + " #define lumaM rgbyM.y", + " #endif", + " #if (FXAA_GLSL_100 == 1)", + " FxaaFloat lumaS = FxaaLuma(FxaaTexOff(tex, posM, FxaaFloat2( 0.0, 1.0), fxaaQualityRcpFrame.xy));", + " FxaaFloat lumaE = FxaaLuma(FxaaTexOff(tex, posM, FxaaFloat2( 1.0, 0.0), fxaaQualityRcpFrame.xy));", + " FxaaFloat lumaN = FxaaLuma(FxaaTexOff(tex, posM, FxaaFloat2( 0.0,-1.0), fxaaQualityRcpFrame.xy));", + " FxaaFloat lumaW = FxaaLuma(FxaaTexOff(tex, posM, FxaaFloat2(-1.0, 0.0), fxaaQualityRcpFrame.xy));", + " #else", + " FxaaFloat lumaS = FxaaLuma(FxaaTexOff(tex, posM, FxaaInt2( 0, 1), fxaaQualityRcpFrame.xy));", + " FxaaFloat lumaE = FxaaLuma(FxaaTexOff(tex, posM, FxaaInt2( 1, 0), fxaaQualityRcpFrame.xy));", + " FxaaFloat lumaN = FxaaLuma(FxaaTexOff(tex, posM, FxaaInt2( 0,-1), fxaaQualityRcpFrame.xy));", + " FxaaFloat lumaW = FxaaLuma(FxaaTexOff(tex, posM, FxaaInt2(-1, 0), fxaaQualityRcpFrame.xy));", + " #endif", + " #endif", + "/*--------------------------------------------------------------------------*/", + " FxaaFloat maxSM = max(lumaS, lumaM);", + " FxaaFloat minSM = min(lumaS, lumaM);", + " FxaaFloat maxESM = max(lumaE, maxSM);", + " FxaaFloat minESM = min(lumaE, minSM);", + " FxaaFloat maxWN = max(lumaN, lumaW);", + " FxaaFloat minWN = min(lumaN, lumaW);", + " FxaaFloat rangeMax = max(maxWN, maxESM);", + " FxaaFloat rangeMin = min(minWN, minESM);", + " FxaaFloat rangeMaxScaled = rangeMax * fxaaQualityEdgeThreshold;", + " FxaaFloat range = rangeMax - rangeMin;", + " FxaaFloat rangeMaxClamped = max(fxaaQualityEdgeThresholdMin, rangeMaxScaled);", + " FxaaBool earlyExit = range < rangeMaxClamped;", + "/*--------------------------------------------------------------------------*/", + " if(earlyExit)", + " #if (FXAA_DISCARD == 1)", + " FxaaDiscard;", + " #else", + " return rgbyM;", + " #endif", + "/*--------------------------------------------------------------------------*/", + " #if (FXAA_GATHER4_ALPHA == 0)", + " #if (FXAA_GLSL_100 == 1)", + " FxaaFloat lumaNW = FxaaLuma(FxaaTexOff(tex, posM, FxaaFloat2(-1.0,-1.0), fxaaQualityRcpFrame.xy));", + " FxaaFloat lumaSE = FxaaLuma(FxaaTexOff(tex, posM, FxaaFloat2( 1.0, 1.0), fxaaQualityRcpFrame.xy));", + " FxaaFloat lumaNE = FxaaLuma(FxaaTexOff(tex, posM, FxaaFloat2( 1.0,-1.0), fxaaQualityRcpFrame.xy));", + " FxaaFloat lumaSW = FxaaLuma(FxaaTexOff(tex, posM, FxaaFloat2(-1.0, 1.0), fxaaQualityRcpFrame.xy));", + " #else", + " FxaaFloat lumaNW = FxaaLuma(FxaaTexOff(tex, posM, FxaaInt2(-1,-1), fxaaQualityRcpFrame.xy));", + " FxaaFloat lumaSE = FxaaLuma(FxaaTexOff(tex, posM, FxaaInt2( 1, 1), fxaaQualityRcpFrame.xy));", + " FxaaFloat lumaNE = FxaaLuma(FxaaTexOff(tex, posM, FxaaInt2( 1,-1), fxaaQualityRcpFrame.xy));", + " FxaaFloat lumaSW = FxaaLuma(FxaaTexOff(tex, posM, FxaaInt2(-1, 1), fxaaQualityRcpFrame.xy));", + " #endif", + " #else", + " FxaaFloat lumaNE = FxaaLuma(FxaaTexOff(tex, posM, FxaaInt2(1, -1), fxaaQualityRcpFrame.xy));", + " FxaaFloat lumaSW = FxaaLuma(FxaaTexOff(tex, posM, FxaaInt2(-1, 1), fxaaQualityRcpFrame.xy));", + " #endif", + "/*--------------------------------------------------------------------------*/", + " FxaaFloat lumaNS = lumaN + lumaS;", + " FxaaFloat lumaWE = lumaW + lumaE;", + " FxaaFloat subpixRcpRange = 1.0/range;", + " FxaaFloat subpixNSWE = lumaNS + lumaWE;", + " FxaaFloat edgeHorz1 = (-2.0 * lumaM) + lumaNS;", + " FxaaFloat edgeVert1 = (-2.0 * lumaM) + lumaWE;", + "/*--------------------------------------------------------------------------*/", + " FxaaFloat lumaNESE = lumaNE + lumaSE;", + " FxaaFloat lumaNWNE = lumaNW + lumaNE;", + " FxaaFloat edgeHorz2 = (-2.0 * lumaE) + lumaNESE;", + " FxaaFloat edgeVert2 = (-2.0 * lumaN) + lumaNWNE;", + "/*--------------------------------------------------------------------------*/", + " FxaaFloat lumaNWSW = lumaNW + lumaSW;", + " FxaaFloat lumaSWSE = lumaSW + lumaSE;", + " FxaaFloat edgeHorz4 = (abs(edgeHorz1) * 2.0) + abs(edgeHorz2);", + " FxaaFloat edgeVert4 = (abs(edgeVert1) * 2.0) + abs(edgeVert2);", + " FxaaFloat edgeHorz3 = (-2.0 * lumaW) + lumaNWSW;", + " FxaaFloat edgeVert3 = (-2.0 * lumaS) + lumaSWSE;", + " FxaaFloat edgeHorz = abs(edgeHorz3) + edgeHorz4;", + " FxaaFloat edgeVert = abs(edgeVert3) + edgeVert4;", + "/*--------------------------------------------------------------------------*/", + " FxaaFloat subpixNWSWNESE = lumaNWSW + lumaNESE;", + " FxaaFloat lengthSign = fxaaQualityRcpFrame.x;", + " FxaaBool horzSpan = edgeHorz >= edgeVert;", + " FxaaFloat subpixA = subpixNSWE * 2.0 + subpixNWSWNESE;", + "/*--------------------------------------------------------------------------*/", + " if(!horzSpan) lumaN = lumaW;", + " if(!horzSpan) lumaS = lumaE;", + " if(horzSpan) lengthSign = fxaaQualityRcpFrame.y;", + " FxaaFloat subpixB = (subpixA * (1.0/12.0)) - lumaM;", + "/*--------------------------------------------------------------------------*/", + " FxaaFloat gradientN = lumaN - lumaM;", + " FxaaFloat gradientS = lumaS - lumaM;", + " FxaaFloat lumaNN = lumaN + lumaM;", + " FxaaFloat lumaSS = lumaS + lumaM;", + " FxaaBool pairN = abs(gradientN) >= abs(gradientS);", + " FxaaFloat gradient = max(abs(gradientN), abs(gradientS));", + " if(pairN) lengthSign = -lengthSign;", + " FxaaFloat subpixC = FxaaSat(abs(subpixB) * subpixRcpRange);", + "/*--------------------------------------------------------------------------*/", + " FxaaFloat2 posB;", + " posB.x = posM.x;", + " posB.y = posM.y;", + " FxaaFloat2 offNP;", + " offNP.x = (!horzSpan) ? 0.0 : fxaaQualityRcpFrame.x;", + " offNP.y = ( horzSpan) ? 0.0 : fxaaQualityRcpFrame.y;", + " if(!horzSpan) posB.x += lengthSign * 0.5;", + " if( horzSpan) posB.y += lengthSign * 0.5;", + "/*--------------------------------------------------------------------------*/", + " FxaaFloat2 posN;", + " posN.x = posB.x - offNP.x * FXAA_QUALITY_P0;", + " posN.y = posB.y - offNP.y * FXAA_QUALITY_P0;", + " FxaaFloat2 posP;", + " posP.x = posB.x + offNP.x * FXAA_QUALITY_P0;", + " posP.y = posB.y + offNP.y * FXAA_QUALITY_P0;", + " FxaaFloat subpixD = ((-2.0)*subpixC) + 3.0;", + " FxaaFloat lumaEndN = FxaaLuma(FxaaTexTop(tex, posN));", + " FxaaFloat subpixE = subpixC * subpixC;", + " FxaaFloat lumaEndP = FxaaLuma(FxaaTexTop(tex, posP));", + "/*--------------------------------------------------------------------------*/", + " if(!pairN) lumaNN = lumaSS;", + " FxaaFloat gradientScaled = gradient * 1.0/4.0;", + " FxaaFloat lumaMM = lumaM - lumaNN * 0.5;", + " FxaaFloat subpixF = subpixD * subpixE;", + " FxaaBool lumaMLTZero = lumaMM < 0.0;", + "/*--------------------------------------------------------------------------*/", + " lumaEndN -= lumaNN * 0.5;", + " lumaEndP -= lumaNN * 0.5;", + " FxaaBool doneN = abs(lumaEndN) >= gradientScaled;", + " FxaaBool doneP = abs(lumaEndP) >= gradientScaled;", + " if(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P1;", + " if(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P1;", + " FxaaBool doneNP = (!doneN) || (!doneP);", + " if(!doneP) posP.x += offNP.x * FXAA_QUALITY_P1;", + " if(!doneP) posP.y += offNP.y * FXAA_QUALITY_P1;", + "/*--------------------------------------------------------------------------*/", + " if(doneNP) {", + " if(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));", + " if(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));", + " if(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;", + " if(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;", + " doneN = abs(lumaEndN) >= gradientScaled;", + " doneP = abs(lumaEndP) >= gradientScaled;", + " if(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P2;", + " if(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P2;", + " doneNP = (!doneN) || (!doneP);", + " if(!doneP) posP.x += offNP.x * FXAA_QUALITY_P2;", + " if(!doneP) posP.y += offNP.y * FXAA_QUALITY_P2;", + "/*--------------------------------------------------------------------------*/", + " #if (FXAA_QUALITY_PS > 3)", + " if(doneNP) {", + " if(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));", + " if(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));", + " if(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;", + " if(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;", + " doneN = abs(lumaEndN) >= gradientScaled;", + " doneP = abs(lumaEndP) >= gradientScaled;", + " if(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P3;", + " if(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P3;", + " doneNP = (!doneN) || (!doneP);", + " if(!doneP) posP.x += offNP.x * FXAA_QUALITY_P3;", + " if(!doneP) posP.y += offNP.y * FXAA_QUALITY_P3;", + "/*--------------------------------------------------------------------------*/", + " #if (FXAA_QUALITY_PS > 4)", + " if(doneNP) {", + " if(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));", + " if(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));", + " if(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;", + " if(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;", + " doneN = abs(lumaEndN) >= gradientScaled;", + " doneP = abs(lumaEndP) >= gradientScaled;", + " if(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P4;", + " if(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P4;", + " doneNP = (!doneN) || (!doneP);", + " if(!doneP) posP.x += offNP.x * FXAA_QUALITY_P4;", + " if(!doneP) posP.y += offNP.y * FXAA_QUALITY_P4;", + "/*--------------------------------------------------------------------------*/", + " #if (FXAA_QUALITY_PS > 5)", + " if(doneNP) {", + " if(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));", + " if(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));", + " if(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;", + " if(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;", + " doneN = abs(lumaEndN) >= gradientScaled;", + " doneP = abs(lumaEndP) >= gradientScaled;", + " if(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P5;", + " if(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P5;", + " doneNP = (!doneN) || (!doneP);", + " if(!doneP) posP.x += offNP.x * FXAA_QUALITY_P5;", + " if(!doneP) posP.y += offNP.y * FXAA_QUALITY_P5;", + "/*--------------------------------------------------------------------------*/", + " #if (FXAA_QUALITY_PS > 6)", + " if(doneNP) {", + " if(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));", + " if(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));", + " if(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;", + " if(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;", + " doneN = abs(lumaEndN) >= gradientScaled;", + " doneP = abs(lumaEndP) >= gradientScaled;", + " if(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P6;", + " if(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P6;", + " doneNP = (!doneN) || (!doneP);", + " if(!doneP) posP.x += offNP.x * FXAA_QUALITY_P6;", + " if(!doneP) posP.y += offNP.y * FXAA_QUALITY_P6;", + "/*--------------------------------------------------------------------------*/", + " #if (FXAA_QUALITY_PS > 7)", + " if(doneNP) {", + " if(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));", + " if(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));", + " if(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;", + " if(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;", + " doneN = abs(lumaEndN) >= gradientScaled;", + " doneP = abs(lumaEndP) >= gradientScaled;", + " if(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P7;", + " if(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P7;", + " doneNP = (!doneN) || (!doneP);", + " if(!doneP) posP.x += offNP.x * FXAA_QUALITY_P7;", + " if(!doneP) posP.y += offNP.y * FXAA_QUALITY_P7;", + "/*--------------------------------------------------------------------------*/", + " #if (FXAA_QUALITY_PS > 8)", + " if(doneNP) {", + " if(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));", + " if(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));", + " if(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;", + " if(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;", + " doneN = abs(lumaEndN) >= gradientScaled;", + " doneP = abs(lumaEndP) >= gradientScaled;", + " if(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P8;", + " if(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P8;", + " doneNP = (!doneN) || (!doneP);", + " if(!doneP) posP.x += offNP.x * FXAA_QUALITY_P8;", + " if(!doneP) posP.y += offNP.y * FXAA_QUALITY_P8;", + "/*--------------------------------------------------------------------------*/", + " #if (FXAA_QUALITY_PS > 9)", + " if(doneNP) {", + " if(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));", + " if(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));", + " if(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;", + " if(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;", + " doneN = abs(lumaEndN) >= gradientScaled;", + " doneP = abs(lumaEndP) >= gradientScaled;", + " if(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P9;", + " if(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P9;", + " doneNP = (!doneN) || (!doneP);", + " if(!doneP) posP.x += offNP.x * FXAA_QUALITY_P9;", + " if(!doneP) posP.y += offNP.y * FXAA_QUALITY_P9;", + "/*--------------------------------------------------------------------------*/", + " #if (FXAA_QUALITY_PS > 10)", + " if(doneNP) {", + " if(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));", + " if(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));", + " if(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;", + " if(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;", + " doneN = abs(lumaEndN) >= gradientScaled;", + " doneP = abs(lumaEndP) >= gradientScaled;", + " if(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P10;", + " if(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P10;", + " doneNP = (!doneN) || (!doneP);", + " if(!doneP) posP.x += offNP.x * FXAA_QUALITY_P10;", + " if(!doneP) posP.y += offNP.y * FXAA_QUALITY_P10;", + "/*--------------------------------------------------------------------------*/", + " #if (FXAA_QUALITY_PS > 11)", + " if(doneNP) {", + " if(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));", + " if(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));", + " if(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;", + " if(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;", + " doneN = abs(lumaEndN) >= gradientScaled;", + " doneP = abs(lumaEndP) >= gradientScaled;", + " if(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P11;", + " if(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P11;", + " doneNP = (!doneN) || (!doneP);", + " if(!doneP) posP.x += offNP.x * FXAA_QUALITY_P11;", + " if(!doneP) posP.y += offNP.y * FXAA_QUALITY_P11;", + "/*--------------------------------------------------------------------------*/", + " #if (FXAA_QUALITY_PS > 12)", + " if(doneNP) {", + " if(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));", + " if(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));", + " if(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;", + " if(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;", + " doneN = abs(lumaEndN) >= gradientScaled;", + " doneP = abs(lumaEndP) >= gradientScaled;", + " if(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P12;", + " if(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P12;", + " doneNP = (!doneN) || (!doneP);", + " if(!doneP) posP.x += offNP.x * FXAA_QUALITY_P12;", + " if(!doneP) posP.y += offNP.y * FXAA_QUALITY_P12;", + "/*--------------------------------------------------------------------------*/", + " }", + " #endif", + "/*--------------------------------------------------------------------------*/", + " }", + " #endif", + "/*--------------------------------------------------------------------------*/", + " }", + " #endif", + "/*--------------------------------------------------------------------------*/", + " }", + " #endif", + "/*--------------------------------------------------------------------------*/", + " }", + " #endif", + "/*--------------------------------------------------------------------------*/", + " }", + " #endif", + "/*--------------------------------------------------------------------------*/", + " }", + " #endif", + "/*--------------------------------------------------------------------------*/", + " }", + " #endif", + "/*--------------------------------------------------------------------------*/", + " }", + " #endif", + "/*--------------------------------------------------------------------------*/", + " }", + " #endif", + "/*--------------------------------------------------------------------------*/", + " }", + "/*--------------------------------------------------------------------------*/", + " FxaaFloat dstN = posM.x - posN.x;", + " FxaaFloat dstP = posP.x - posM.x;", + " if(!horzSpan) dstN = posM.y - posN.y;", + " if(!horzSpan) dstP = posP.y - posM.y;", + "/*--------------------------------------------------------------------------*/", + " FxaaBool goodSpanN = (lumaEndN < 0.0) != lumaMLTZero;", + " FxaaFloat spanLength = (dstP + dstN);", + " FxaaBool goodSpanP = (lumaEndP < 0.0) != lumaMLTZero;", + " FxaaFloat spanLengthRcp = 1.0/spanLength;", + "/*--------------------------------------------------------------------------*/", + " FxaaBool directionN = dstN < dstP;", + " FxaaFloat dst = min(dstN, dstP);", + " FxaaBool goodSpan = directionN ? goodSpanN : goodSpanP;", + " FxaaFloat subpixG = subpixF * subpixF;", + " FxaaFloat pixelOffset = (dst * (-spanLengthRcp)) + 0.5;", + " FxaaFloat subpixH = subpixG * fxaaQualitySubpix;", + "/*--------------------------------------------------------------------------*/", + " FxaaFloat pixelOffsetGood = goodSpan ? pixelOffset : 0.0;", + " FxaaFloat pixelOffsetSubpix = max(pixelOffsetGood, subpixH);", + " if(!horzSpan) posM.x += pixelOffsetSubpix * lengthSign;", + " if( horzSpan) posM.y += pixelOffsetSubpix * lengthSign;", + " #if (FXAA_DISCARD == 1)", + " return FxaaTexTop(tex, posM);", + " #else", + " return FxaaFloat4(FxaaTexTop(tex, posM).xyz, lumaM);", + " #endif", + "}", + "/*==========================================================================*/", + "#endif", + "", + "void main() {", + " gl_FragColor = FxaaPixelShader(", + " vUv,", + " vec4(0.0),", + " tDiffuse,", + " tDiffuse,", + " tDiffuse,", + " resolution,", + " vec4(0.0),", + " vec4(0.0),", + " vec4(0.0),", + " 0.75,", + " 0.166,", + " 0.0833,", + " 0.0,", + " 0.0,", + " 0.0,", + " vec4(0.0)", + " );", + "", + " // TODO avoid querying texture twice for same texel", + " gl_FragColor.a = texture2D(tDiffuse, vUv).a;", + "}", + ].join("\n"), + }, + cu = { + uniforms: { + tDiffuse: { value: null }, + screenWidth: { value: 1024 }, + screenHeight: { value: 1024 }, + sampleDistance: { value: 0.94 }, + waveFactor: { value: 0.00125 }, + }, + vertexShader: [ + "varying vec2 vUv;", + "void main() {", + "\tvUv = uv;", + "\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );", + "}", + ].join("\n"), + fragmentShader: [ + "uniform float screenWidth;", + "uniform float screenHeight;", + "uniform float sampleDistance;", + "uniform float waveFactor;", + "uniform sampler2D tDiffuse;", + "varying vec2 vUv;", + "void main() {", + "\tvec4 color, org, tmp, add;", + "\tfloat sample_dist, f;", + "\tvec2 vin;", + "\tvec2 uv = vUv;", + "\tadd = color = org = texture2D( tDiffuse, uv );", + "\tvin = ( uv - vec2( 0.5 ) ) * vec2( 1.4 );", + "\tsample_dist = dot( vin, vin ) * 2.0;", + "\tf = ( waveFactor * 100.0 + sample_dist ) * sampleDistance * 4.0;", + "\tvec2 sampleSize = vec2( 1.0 / screenWidth, 1.0 / screenHeight ) * vec2( f );", + "\tadd += tmp = texture2D( tDiffuse, uv + vec2( 0.111964, 0.993712 ) * sampleSize );", + "\tif( tmp.b < color.b ) color = tmp;", + "\tadd += tmp = texture2D( tDiffuse, uv + vec2( 0.846724, 0.532032 ) * sampleSize );", + "\tif( tmp.b < color.b ) color = tmp;", + "\tadd += tmp = texture2D( tDiffuse, uv + vec2( 0.943883, -0.330279 ) * sampleSize );", + "\tif( tmp.b < color.b ) color = tmp;", + "\tadd += tmp = texture2D( tDiffuse, uv + vec2( 0.330279, -0.943883 ) * sampleSize );", + "\tif( tmp.b < color.b ) color = tmp;", + "\tadd += tmp = texture2D( tDiffuse, uv + vec2( -0.532032, -0.846724 ) * sampleSize );", + "\tif( tmp.b < color.b ) color = tmp;", + "\tadd += tmp = texture2D( tDiffuse, uv + vec2( -0.993712, -0.111964 ) * sampleSize );", + "\tif( tmp.b < color.b ) color = tmp;", + "\tadd += tmp = texture2D( tDiffuse, uv + vec2( -0.707107, 0.707107 ) * sampleSize );", + "\tif( tmp.b < color.b ) color = tmp;", + "\tcolor = color * vec4( 2.0 ) - ( add / vec4( 8.0 ) );", + "\tcolor = color + ( add / vec4( 8.0 ) - color ) * ( vec4( 1.0 ) - vec4( sample_dist * 0.5 ) );", + "\tgl_FragColor = vec4( color.rgb * color.rgb * vec3( 0.95 ) + color.rgb, 1.0 );", + "}", + ].join("\n"), + }, + fu = { + uniforms: { + tDiffuse: { value: null }, + aspect: { value: new A.Vector2(512, 512) }, + }, + vertexShader: [ + "varying vec2 vUv;", + "void main() {", + "\tvUv = uv;", + "\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );", + "}", + ].join("\n"), + fragmentShader: [ + "uniform sampler2D tDiffuse;", + "varying vec2 vUv;", + "uniform vec2 aspect;", + "vec2 texel = vec2(1.0 / aspect.x, 1.0 / aspect.y);", + "mat3 G[9];", + "const mat3 g0 = mat3( 0.3535533845424652, 0, -0.3535533845424652, 0.5, 0, -0.5, 0.3535533845424652, 0, -0.3535533845424652 );", + "const mat3 g1 = mat3( 0.3535533845424652, 0.5, 0.3535533845424652, 0, 0, 0, -0.3535533845424652, -0.5, -0.3535533845424652 );", + "const mat3 g2 = mat3( 0, 0.3535533845424652, -0.5, -0.3535533845424652, 0, 0.3535533845424652, 0.5, -0.3535533845424652, 0 );", + "const mat3 g3 = mat3( 0.5, -0.3535533845424652, 0, -0.3535533845424652, 0, 0.3535533845424652, 0, 0.3535533845424652, -0.5 );", + "const mat3 g4 = mat3( 0, -0.5, 0, 0.5, 0, 0.5, 0, -0.5, 0 );", + "const mat3 g5 = mat3( -0.5, 0, 0.5, 0, 0, 0, 0.5, 0, -0.5 );", + "const mat3 g6 = mat3( 0.1666666716337204, -0.3333333432674408, 0.1666666716337204, -0.3333333432674408, 0.6666666865348816, -0.3333333432674408, 0.1666666716337204, -0.3333333432674408, 0.1666666716337204 );", + "const mat3 g7 = mat3( -0.3333333432674408, 0.1666666716337204, -0.3333333432674408, 0.1666666716337204, 0.6666666865348816, 0.1666666716337204, -0.3333333432674408, 0.1666666716337204, -0.3333333432674408 );", + "const mat3 g8 = mat3( 0.3333333432674408, 0.3333333432674408, 0.3333333432674408, 0.3333333432674408, 0.3333333432674408, 0.3333333432674408, 0.3333333432674408, 0.3333333432674408, 0.3333333432674408 );", + "void main(void)", + "{", + "\tG[0] = g0,", + "\tG[1] = g1,", + "\tG[2] = g2,", + "\tG[3] = g3,", + "\tG[4] = g4,", + "\tG[5] = g5,", + "\tG[6] = g6,", + "\tG[7] = g7,", + "\tG[8] = g8;", + "\tmat3 I;", + "\tfloat cnv[9];", + "\tvec3 sample;", + "\tfor (float i=0.0; i<3.0; i++) {", + "\t\tfor (float j=0.0; j<3.0; j++) {", + "\t\t\tsample = texture2D(tDiffuse, vUv + texel * vec2(i-1.0,j-1.0) ).rgb;", + "\t\t\tI[int(i)][int(j)] = length(sample);", + "\t\t}", + "\t}", + "\tfor (int i=0; i<9; i++) {", + "\t\tfloat dp3 = dot(G[i][0], I[0]) + dot(G[i][1], I[1]) + dot(G[i][2], I[2]);", + "\t\tcnv[i] = dp3 * dp3;", + "\t}", + "\tfloat M = (cnv[0] + cnv[1]) + (cnv[2] + cnv[3]);", + "\tfloat S = (cnv[4] + cnv[5]) + (cnv[6] + cnv[7]) + (cnv[8] + M);", + "\tgl_FragColor = vec4(vec3(sqrt(M/S)), 1.0);", + "}", + ].join("\n"), + }, + du = { + uniforms: { + mRefractionRatio: { value: 1.02 }, + mFresnelBias: { value: 0.1 }, + mFresnelPower: { value: 2 }, + mFresnelScale: { value: 1 }, + tCube: { value: null }, + }, + vertexShader: [ + "uniform float mRefractionRatio;", + "uniform float mFresnelBias;", + "uniform float mFresnelScale;", + "uniform float mFresnelPower;", + "varying vec3 vReflect;", + "varying vec3 vRefract[3];", + "varying float vReflectionFactor;", + "void main() {", + "\tvec4 mvPosition = modelViewMatrix * vec4( position, 1.0 );", + "\tvec4 worldPosition = modelMatrix * vec4( position, 1.0 );", + "\tvec3 worldNormal = normalize( mat3( modelMatrix[0].xyz, modelMatrix[1].xyz, modelMatrix[2].xyz ) * normal );", + "\tvec3 I = worldPosition.xyz - cameraPosition;", + "\tvReflect = reflect( I, worldNormal );", + "\tvRefract[0] = refract( normalize( I ), worldNormal, mRefractionRatio );", + "\tvRefract[1] = refract( normalize( I ), worldNormal, mRefractionRatio * 0.99 );", + "\tvRefract[2] = refract( normalize( I ), worldNormal, mRefractionRatio * 0.98 );", + "\tvReflectionFactor = mFresnelBias + mFresnelScale * pow( 1.0 + dot( normalize( I ), worldNormal ), mFresnelPower );", + "\tgl_Position = projectionMatrix * mvPosition;", + "}", + ].join("\n"), + fragmentShader: [ + "uniform samplerCube tCube;", + "varying vec3 vReflect;", + "varying vec3 vRefract[3];", + "varying float vReflectionFactor;", + "void main() {", + "\tvec4 reflectedColor = textureCube( tCube, vec3( -vReflect.x, vReflect.yz ) );", + "\tvec4 refractedColor = vec4( 1.0 );", + "\trefractedColor.r = textureCube( tCube, vec3( -vRefract[0].x, vRefract[0].yz ) ).r;", + "\trefractedColor.g = textureCube( tCube, vec3( -vRefract[1].x, vRefract[1].yz ) ).g;", + "\trefractedColor.b = textureCube( tCube, vec3( -vRefract[2].x, vRefract[2].yz ) ).b;", + "\tgl_FragColor = mix( refractedColor, reflectedColor, clamp( vReflectionFactor, 0.0, 1.0 ) );", + "}", + ].join("\n"), + }, + hu = { + uniforms: { tDiffuse: { value: null } }, + vertexShader: [ + "varying vec2 vUv;", + "void main() {", + "\tvUv = uv;", + "\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );", + "}", + ].join("\n"), + fragmentShader: [ + "uniform sampler2D tDiffuse;", + "varying vec2 vUv;", + "void main() {", + "\tvec4 tex = texture2D( tDiffuse, vUv );", + "\tgl_FragColor = LinearTosRGB( tex );", + "}", + ].join("\n"), + }, + pu = { + uniforms: { tInput: { value: null } }, + vertexShader: [ + "varying vec2 vUv;", + "void main() {", + " vUv = uv;", + " gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );", + "}", + ].join("\n"), + fragmentShader: [ + "varying vec2 vUv;", + "uniform sampler2D tInput;", + "void main() {", + "\tgl_FragColor = vec4( 1.0 ) - texture2D( tInput, vUv );", + "}", + ].join("\n"), + }, + vu = { + uniforms: { + tInput: { value: null }, + fStepSize: { value: 1 }, + vSunPositionScreenSpace: { value: new A.Vector3() }, + }, + vertexShader: [ + "varying vec2 vUv;", + "void main() {", + " vUv = uv;", + " gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );", + "}", + ].join("\n"), + fragmentShader: [ + "#define TAPS_PER_PASS 6.0", + "varying vec2 vUv;", + "uniform sampler2D tInput;", + "uniform vec3 vSunPositionScreenSpace;", + "uniform float fStepSize;", + "void main() {", + "\tvec2 delta = vSunPositionScreenSpace.xy - vUv;", + "\tfloat dist = length( delta );", + "\tvec2 stepv = fStepSize * delta / dist;", + "\tfloat iters = dist/fStepSize;", + "\tvec2 uv = vUv.xy;", + "\tfloat col = 0.0;", + "\tfloat f = min( 1.0, max( vSunPositionScreenSpace.z / 1000.0, 0.0 ) );", + "\tif ( 0.0 <= iters && uv.y < 1.0 ) col += texture2D( tInput, uv ).r * f;", + "\tuv += stepv;", + "\tif ( 1.0 <= iters && uv.y < 1.0 ) col += texture2D( tInput, uv ).r * f;", + "\tuv += stepv;", + "\tif ( 2.0 <= iters && uv.y < 1.0 ) col += texture2D( tInput, uv ).r * f;", + "\tuv += stepv;", + "\tif ( 3.0 <= iters && uv.y < 1.0 ) col += texture2D( tInput, uv ).r * f;", + "\tuv += stepv;", + "\tif ( 4.0 <= iters && uv.y < 1.0 ) col += texture2D( tInput, uv ).r * f;", + "\tuv += stepv;", + "\tif ( 5.0 <= iters && uv.y < 1.0 ) col += texture2D( tInput, uv ).r * f;", + "\tuv += stepv;", + "\tgl_FragColor = vec4( col/TAPS_PER_PASS );", + "\tgl_FragColor.a = 1.0;", + "}", + ].join("\n"), + }, + mu = { + uniforms: { + tColors: { value: null }, + tGodRays: { value: null }, + fGodRayIntensity: { value: 0.69 }, + }, + vertexShader: [ + "varying vec2 vUv;", + "void main() {", + "\tvUv = uv;", + "\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );", + "}", + ].join("\n"), + fragmentShader: [ + "varying vec2 vUv;", + "uniform sampler2D tColors;", + "uniform sampler2D tGodRays;", + "uniform float fGodRayIntensity;", + "void main() {", + "\tgl_FragColor = texture2D( tColors, vUv ) + fGodRayIntensity * vec4( 1.0 - texture2D( tGodRays, vUv ).r );", + "\tgl_FragColor.a = 1.0;", + "}", + ].join("\n"), + }, + gu = { + uniforms: { + vSunPositionScreenSpace: { value: new A.Vector3() }, + fAspect: { value: 1 }, + sunColor: { value: new A.Color(16772608) }, + bgColor: { value: new A.Color(0) }, + }, + vertexShader: [ + "varying vec2 vUv;", + "void main() {", + "\tvUv = uv;", + "\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );", + "}", + ].join("\n"), + fragmentShader: [ + "varying vec2 vUv;", + "uniform vec3 vSunPositionScreenSpace;", + "uniform float fAspect;", + "uniform vec3 sunColor;", + "uniform vec3 bgColor;", + "void main() {", + "\tvec2 diff = vUv - vSunPositionScreenSpace.xy;", + "\tdiff.x *= fAspect;", + "\tfloat prop = clamp( length( diff ) / 0.5, 0.0, 1.0 );", + "\tprop = 0.35 * pow( 1.0 - prop, 3.0 );", + "\tgl_FragColor.xyz = ( vSunPositionScreenSpace.z > 0.0 ) ? mix( sunColor, bgColor, 1.0 - prop ) : bgColor;", + "\tgl_FragColor.w = 1.0;", + "}", + ].join("\n"), + }, + Au = { + uniforms: { tDiffuse: { value: null }, h: { value: 1 / 512 } }, + vertexShader: + "\n varying vec2 vUv;\n\n void main() {\n\n vUv = uv;\n gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n\n }\n ", + fragmentShader: + "\n uniform sampler2D tDiffuse;\n uniform float h;\n\n varying vec2 vUv;\n\n void main() {\n\n \tvec4 sum = vec4( 0.0 );\n\n \tsum += texture2D( tDiffuse, vec2( vUv.x - 4.0 * h, vUv.y ) ) * 0.051;\n \tsum += texture2D( tDiffuse, vec2( vUv.x - 3.0 * h, vUv.y ) ) * 0.0918;\n \tsum += texture2D( tDiffuse, vec2( vUv.x - 2.0 * h, vUv.y ) ) * 0.12245;\n \tsum += texture2D( tDiffuse, vec2( vUv.x - 1.0 * h, vUv.y ) ) * 0.1531;\n \tsum += texture2D( tDiffuse, vec2( vUv.x, vUv.y ) ) * 0.1633;\n \tsum += texture2D( tDiffuse, vec2( vUv.x + 1.0 * h, vUv.y ) ) * 0.1531;\n \tsum += texture2D( tDiffuse, vec2( vUv.x + 2.0 * h, vUv.y ) ) * 0.12245;\n \tsum += texture2D( tDiffuse, vec2( vUv.x + 3.0 * h, vUv.y ) ) * 0.0918;\n \tsum += texture2D( tDiffuse, vec2( vUv.x + 4.0 * h, vUv.y ) ) * 0.051;\n\n \tgl_FragColor = sum;\n\n }\n ", + }, + yu = { + uniforms: { + tDiffuse: { value: null }, + h: { value: 1 / 512 }, + r: { value: 0.35 }, + }, + vertexShader: [ + "varying vec2 vUv;", + "void main() {", + "\tvUv = uv;", + "\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );", + "}", + ].join("\n"), + fragmentShader: [ + "uniform sampler2D tDiffuse;", + "uniform float h;", + "uniform float r;", + "varying vec2 vUv;", + "void main() {", + "\tvec4 sum = vec4( 0.0 );", + "\tfloat hh = h * abs( r - vUv.y );", + "\tsum += texture2D( tDiffuse, vec2( vUv.x - 4.0 * hh, vUv.y ) ) * 0.051;", + "\tsum += texture2D( tDiffuse, vec2( vUv.x - 3.0 * hh, vUv.y ) ) * 0.0918;", + "\tsum += texture2D( tDiffuse, vec2( vUv.x - 2.0 * hh, vUv.y ) ) * 0.12245;", + "\tsum += texture2D( tDiffuse, vec2( vUv.x - 1.0 * hh, vUv.y ) ) * 0.1531;", + "\tsum += texture2D( tDiffuse, vec2( vUv.x, vUv.y ) ) * 0.1633;", + "\tsum += texture2D( tDiffuse, vec2( vUv.x + 1.0 * hh, vUv.y ) ) * 0.1531;", + "\tsum += texture2D( tDiffuse, vec2( vUv.x + 2.0 * hh, vUv.y ) ) * 0.12245;", + "\tsum += texture2D( tDiffuse, vec2( vUv.x + 3.0 * hh, vUv.y ) ) * 0.0918;", + "\tsum += texture2D( tDiffuse, vec2( vUv.x + 4.0 * hh, vUv.y ) ) * 0.051;", + "\tgl_FragColor = sum;", + "}", + ].join("\n"), + }, + bu = { + uniforms: { + tDiffuse: { value: null }, + hue: { value: 0 }, + saturation: { value: 0 }, + }, + vertexShader: [ + "varying vec2 vUv;", + "void main() {", + "\tvUv = uv;", + "\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );", + "}", + ].join("\n"), + fragmentShader: [ + "uniform sampler2D tDiffuse;", + "uniform float hue;", + "uniform float saturation;", + "varying vec2 vUv;", + "void main() {", + "\tgl_FragColor = texture2D( tDiffuse, vUv );", + "\tfloat angle = hue * 3.14159265;", + "\tfloat s = sin(angle), c = cos(angle);", + "\tvec3 weights = (vec3(2.0 * c, -sqrt(3.0) * s - c, sqrt(3.0) * s - c) + 1.0) / 3.0;", + "\tfloat len = length(gl_FragColor.rgb);", + "\tgl_FragColor.rgb = vec3(", + "\t\tdot(gl_FragColor.rgb, weights.xyz),", + "\t\tdot(gl_FragColor.rgb, weights.zxy),", + "\t\tdot(gl_FragColor.rgb, weights.yzx)", + "\t);", + "\tfloat average = (gl_FragColor.r + gl_FragColor.g + gl_FragColor.b) / 3.0;", + "\tif (saturation > 0.0) {", + "\t\tgl_FragColor.rgb += (average - gl_FragColor.rgb) * (1.0 - 1.0 / (1.001 - saturation));", + "\t} else {", + "\t\tgl_FragColor.rgb += (average - gl_FragColor.rgb) * (-saturation);", + "\t}", + "}", + ].join("\n"), + }, + xu = { + uniforms: { + tDiffuse: { value: null }, + sides: { value: 6 }, + angle: { value: 0 }, + }, + vertexShader: [ + "varying vec2 vUv;", + "void main() {", + "\tvUv = uv;", + "\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );", + "}", + ].join("\n"), + fragmentShader: [ + "uniform sampler2D tDiffuse;", + "uniform float sides;", + "uniform float angle;", + "varying vec2 vUv;", + "void main() {", + "\tvec2 p = vUv - 0.5;", + "\tfloat r = length(p);", + "\tfloat a = atan(p.y, p.x) + angle;", + "\tfloat tau = 2. * 3.1416 ;", + "\ta = mod(a, tau/sides);", + "\ta = abs(a - tau/sides/2.) ;", + "\tp = r * vec2(cos(a), sin(a));", + "\tvec4 color = texture2D(tDiffuse, p + 0.5);", + "\tgl_FragColor = color;", + "}", + ].join("\n"), + }, + Su = { + uniforms: { tDiffuse: { value: null }, side: { value: 1 } }, + vertexShader: [ + "varying vec2 vUv;", + "void main() {", + "\tvUv = uv;", + "\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );", + "}", + ].join("\n"), + fragmentShader: [ + "uniform sampler2D tDiffuse;", + "uniform int side;", + "varying vec2 vUv;", + "void main() {", + "\tvec2 p = vUv;", + "\tif (side == 0){", + "\t\tif (p.x > 0.5) p.x = 1.0 - p.x;", + "\t}else if (side == 1){", + "\t\tif (p.x < 0.5) p.x = 1.0 - p.x;", + "\t}else if (side == 2){", + "\t\tif (p.y < 0.5) p.y = 1.0 - p.y;", + "\t}else if (side == 3){", + "\t\tif (p.y > 0.5) p.y = 1.0 - p.y;", + "\t} ", + "\tvec4 color = texture2D(tDiffuse, p);", + "\tgl_FragColor = color;", + "}", + ].join("\n"), + }, + Eu = { + uniforms: { + heightMap: { value: null }, + resolution: { value: new A.Vector2(512, 512) }, + scale: { value: new A.Vector2(1, 1) }, + height: { value: 0.05 }, + }, + vertexShader: [ + "varying vec2 vUv;", + "void main() {", + "\tvUv = uv;", + "\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );", + "}", + ].join("\n"), + fragmentShader: [ + "uniform float height;", + "uniform vec2 resolution;", + "uniform sampler2D heightMap;", + "varying vec2 vUv;", + "void main() {", + "\tfloat val = texture2D( heightMap, vUv ).x;", + "\tfloat valU = texture2D( heightMap, vUv + vec2( 1.0 / resolution.x, 0.0 ) ).x;", + "\tfloat valV = texture2D( heightMap, vUv + vec2( 0.0, 1.0 / resolution.y ) ).x;", + "\tgl_FragColor = vec4( ( 0.5 * normalize( vec3( val - valU, val - valV, height ) ) + 0.5 ), 1.0 );", + "}", + ].join("\n"), + }, + _u = { + modes: { + none: "NO_PARALLAX", + basic: "USE_BASIC_PARALLAX", + steep: "USE_STEEP_PARALLAX", + occlusion: "USE_OCLUSION_PARALLAX", + relief: "USE_RELIEF_PARALLAX", + }, + uniforms: { + bumpMap: { value: null }, + map: { value: null }, + parallaxScale: { value: null }, + parallaxMinLayers: { value: null }, + parallaxMaxLayers: { value: null }, + }, + vertexShader: [ + "varying vec2 vUv;", + "varying vec3 vViewPosition;", + "varying vec3 vNormal;", + "void main() {", + "\tvUv = uv;", + "\tvec4 mvPosition = modelViewMatrix * vec4( position, 1.0 );", + "\tvViewPosition = -mvPosition.xyz;", + "\tvNormal = normalize( normalMatrix * normal );", + "\tgl_Position = projectionMatrix * mvPosition;", + "}", + ].join("\n"), + fragmentShader: [ + "uniform sampler2D bumpMap;", + "uniform sampler2D map;", + "uniform float parallaxScale;", + "uniform float parallaxMinLayers;", + "uniform float parallaxMaxLayers;", + "varying vec2 vUv;", + "varying vec3 vViewPosition;", + "varying vec3 vNormal;", + "#ifdef USE_BASIC_PARALLAX", + "\tvec2 parallaxMap( in vec3 V ) {", + "\t\tfloat initialHeight = texture2D( bumpMap, vUv ).r;", + "\t\tvec2 texCoordOffset = parallaxScale * V.xy * initialHeight;", + "\t\treturn vUv - texCoordOffset;", + "\t}", + "#else", + "\tvec2 parallaxMap( in vec3 V ) {", + "\t\tfloat numLayers = mix( parallaxMaxLayers, parallaxMinLayers, abs( dot( vec3( 0.0, 0.0, 1.0 ), V ) ) );", + "\t\tfloat layerHeight = 1.0 / numLayers;", + "\t\tfloat currentLayerHeight = 0.0;", + "\t\tvec2 dtex = parallaxScale * V.xy / V.z / numLayers;", + "\t\tvec2 currentTextureCoords = vUv;", + "\t\tfloat heightFromTexture = texture2D( bumpMap, currentTextureCoords ).r;", + "\t\tfor ( int i = 0; i < 30; i += 1 ) {", + "\t\t\tif ( heightFromTexture <= currentLayerHeight ) {", + "\t\t\t\tbreak;", + "\t\t\t}", + "\t\t\tcurrentLayerHeight += layerHeight;", + "\t\t\tcurrentTextureCoords -= dtex;", + "\t\t\theightFromTexture = texture2D( bumpMap, currentTextureCoords ).r;", + "\t\t}", + "\t\t#ifdef USE_STEEP_PARALLAX", + "\t\t\treturn currentTextureCoords;", + "\t\t#elif defined( USE_RELIEF_PARALLAX )", + "\t\t\tvec2 deltaTexCoord = dtex / 2.0;", + "\t\t\tfloat deltaHeight = layerHeight / 2.0;", + "\t\t\tcurrentTextureCoords += deltaTexCoord;", + "\t\t\tcurrentLayerHeight -= deltaHeight;", + "\t\t\tconst int numSearches = 5;", + "\t\t\tfor ( int i = 0; i < numSearches; i += 1 ) {", + "\t\t\t\tdeltaTexCoord /= 2.0;", + "\t\t\t\tdeltaHeight /= 2.0;", + "\t\t\t\theightFromTexture = texture2D( bumpMap, currentTextureCoords ).r;", + "\t\t\t\tif( heightFromTexture > currentLayerHeight ) {", + "\t\t\t\t\tcurrentTextureCoords -= deltaTexCoord;", + "\t\t\t\t\tcurrentLayerHeight += deltaHeight;", + "\t\t\t\t} else {", + "\t\t\t\t\tcurrentTextureCoords += deltaTexCoord;", + "\t\t\t\t\tcurrentLayerHeight -= deltaHeight;", + "\t\t\t\t}", + "\t\t\t}", + "\t\t\treturn currentTextureCoords;", + "\t\t#elif defined( USE_OCLUSION_PARALLAX )", + "\t\t\tvec2 prevTCoords = currentTextureCoords + dtex;", + "\t\t\tfloat nextH = heightFromTexture - currentLayerHeight;", + "\t\t\tfloat prevH = texture2D( bumpMap, prevTCoords ).r - currentLayerHeight + layerHeight;", + "\t\t\tfloat weight = nextH / ( nextH - prevH );", + "\t\t\treturn prevTCoords * weight + currentTextureCoords * ( 1.0 - weight );", + "\t\t#else", + "\t\t\treturn vUv;", + "\t\t#endif", + "\t}", + "#endif", + "vec2 perturbUv( vec3 surfPosition, vec3 surfNormal, vec3 viewPosition ) {", + "\tvec2 texDx = dFdx( vUv );", + "\tvec2 texDy = dFdy( vUv );", + "\tvec3 vSigmaX = dFdx( surfPosition );", + "\tvec3 vSigmaY = dFdy( surfPosition );", + "\tvec3 vR1 = cross( vSigmaY, surfNormal );", + "\tvec3 vR2 = cross( surfNormal, vSigmaX );", + "\tfloat fDet = dot( vSigmaX, vR1 );", + "\tvec2 vProjVscr = ( 1.0 / fDet ) * vec2( dot( vR1, viewPosition ), dot( vR2, viewPosition ) );", + "\tvec3 vProjVtex;", + "\tvProjVtex.xy = texDx * vProjVscr.x + texDy * vProjVscr.y;", + "\tvProjVtex.z = dot( surfNormal, viewPosition );", + "\treturn parallaxMap( vProjVtex );", + "}", + "void main() {", + "\tvec2 mapUv = perturbUv( -vViewPosition, normalize( vNormal ), normalize( vViewPosition ) );", + "\tgl_FragColor = texture2D( map, mapUv );", + "}", + ].join("\n"), + }, + Cu = { + uniforms: { + tDiffuse: { value: null }, + resolution: { value: null }, + pixelSize: { value: 1 }, + }, + vertexShader: [ + "varying highp vec2 vUv;", + "void main() {", + "vUv = uv;", + "gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );", + "}", + ].join("\n"), + fragmentShader: [ + "uniform sampler2D tDiffuse;", + "uniform float pixelSize;", + "uniform vec2 resolution;", + "varying highp vec2 vUv;", + "void main(){", + "vec2 dxy = pixelSize / resolution;", + "vec2 coord = dxy * floor( vUv / dxy );", + "gl_FragColor = texture2D(tDiffuse, coord);", + "}", + ].join("\n"), + }, + wu = { + uniforms: { + tDiffuse: { value: null }, + amount: { value: 0.005 }, + angle: { value: 0 }, + }, + vertexShader: [ + "varying vec2 vUv;", + "void main() {", + "\tvUv = uv;", + "\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );", + "}", + ].join("\n"), + fragmentShader: [ + "uniform sampler2D tDiffuse;", + "uniform float amount;", + "uniform float angle;", + "varying vec2 vUv;", + "void main() {", + "\tvec2 offset = amount * vec2( cos(angle), sin(angle));", + "\tvec4 cr = texture2D(tDiffuse, vUv + offset);", + "\tvec4 cga = texture2D(tDiffuse, vUv);", + "\tvec4 cb = texture2D(tDiffuse, vUv - offset);", + "\tgl_FragColor = vec4(cr.r, cga.g, cb.b, cga.a);", + "}", + ].join("\n"), + }, + Tu = { + uniforms: { tDiffuse: { value: null }, amount: { value: 1 } }, + vertexShader: [ + "varying vec2 vUv;", + "void main() {", + "\tvUv = uv;", + "\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );", + "}", + ].join("\n"), + fragmentShader: [ + "uniform float amount;", + "uniform sampler2D tDiffuse;", + "varying vec2 vUv;", + "void main() {", + "\tvec4 color = texture2D( tDiffuse, vUv );", + "\tvec3 c = color.rgb;", + "\tcolor.r = dot( c, vec3( 1.0 - 0.607 * amount, 0.769 * amount, 0.189 * amount ) );", + "\tcolor.g = dot( c, vec3( 0.349 * amount, 1.0 - 0.314 * amount, 0.168 * amount ) );", + "\tcolor.b = dot( c, vec3( 0.272 * amount, 0.534 * amount, 1.0 - 0.869 * amount ) );", + "\tgl_FragColor = vec4( min( vec3( 1.0 ), color.rgb ), color.a );", + "}", + ].join("\n"), + }, + Mu = { + uniforms: { + tDiffuse: { value: null }, + resolution: { value: new A.Vector2() }, + }, + vertexShader: [ + "varying vec2 vUv;", + "void main() {", + "\tvUv = uv;", + "\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );", + "}", + ].join("\n"), + fragmentShader: [ + "uniform sampler2D tDiffuse;", + "uniform vec2 resolution;", + "varying vec2 vUv;", + "void main() {", + "\tvec2 texel = vec2( 1.0 / resolution.x, 1.0 / resolution.y );", + "\tconst mat3 Gx = mat3( -1, -2, -1, 0, 0, 0, 1, 2, 1 );", + "\tconst mat3 Gy = mat3( -1, 0, 1, -2, 0, 2, -1, 0, 1 );", + "\tfloat tx0y0 = texture2D( tDiffuse, vUv + texel * vec2( -1, -1 ) ).r;", + "\tfloat tx0y1 = texture2D( tDiffuse, vUv + texel * vec2( -1, 0 ) ).r;", + "\tfloat tx0y2 = texture2D( tDiffuse, vUv + texel * vec2( -1, 1 ) ).r;", + "\tfloat tx1y0 = texture2D( tDiffuse, vUv + texel * vec2( 0, -1 ) ).r;", + "\tfloat tx1y1 = texture2D( tDiffuse, vUv + texel * vec2( 0, 0 ) ).r;", + "\tfloat tx1y2 = texture2D( tDiffuse, vUv + texel * vec2( 0, 1 ) ).r;", + "\tfloat tx2y0 = texture2D( tDiffuse, vUv + texel * vec2( 1, -1 ) ).r;", + "\tfloat tx2y1 = texture2D( tDiffuse, vUv + texel * vec2( 1, 0 ) ).r;", + "\tfloat tx2y2 = texture2D( tDiffuse, vUv + texel * vec2( 1, 1 ) ).r;", + "\tfloat valueGx = Gx[0][0] * tx0y0 + Gx[1][0] * tx1y0 + Gx[2][0] * tx2y0 + ", + "\t\tGx[0][1] * tx0y1 + Gx[1][1] * tx1y1 + Gx[2][1] * tx2y1 + ", + "\t\tGx[0][2] * tx0y2 + Gx[1][2] * tx1y2 + Gx[2][2] * tx2y2; ", + "\tfloat valueGy = Gy[0][0] * tx0y0 + Gy[1][0] * tx1y0 + Gy[2][0] * tx2y0 + ", + "\t\tGy[0][1] * tx0y1 + Gy[1][1] * tx1y1 + Gy[2][1] * tx2y1 + ", + "\t\tGy[0][2] * tx0y2 + Gy[1][2] * tx1y2 + Gy[2][2] * tx2y2; ", + "\tfloat G = sqrt( ( valueGx * valueGx ) + ( valueGy * valueGy ) );", + "\tgl_FragColor = vec4( vec3( G ), 1 );", + "}", + ].join("\n"), + }, + Iu; + function ku() { + if (Iu) return Iu; + var e = A.ShaderChunk.meshphong_frag.slice( + 0, + A.ShaderChunk.meshphong_frag.indexOf("void main() {") + ), + t = A.ShaderChunk.meshphong_frag.slice( + A.ShaderChunk.meshphong_frag.indexOf("void main() {") + ); + return (Iu = { + uniforms: A.UniformsUtils.merge([ + A.ShaderLib.phong.uniforms, + { + thicknessMap: { value: null }, + thicknessColor: { value: new A.Color(16777215) }, + thicknessDistortion: { value: 0.1 }, + thicknessAmbient: { value: 0 }, + thicknessAttenuation: { value: 0.1 }, + thicknessPower: { value: 2 }, + thicknessScale: { value: 10 }, + }, + ]), + vertexShader: "\n #define USE_UV\n ".concat( + A.ShaderChunk.meshphong_vert, + "\n " + ), + fragmentShader: + "\n #define USE_UV',\n #define SUBSURFACE',\n\n " + .concat( + e, + "\n\n uniform sampler2D thicknessMap;\n uniform float thicknessPower;\n uniform float thicknessScale;\n uniform float thicknessDistortion;\n uniform float thicknessAmbient;\n uniform float thicknessAttenuation;\n uniform vec3 thicknessColor;\n\n void RE_Direct_Scattering(const in IncidentLight directLight, const in vec2 uv, const in GeometricContext geometry, inout ReflectedLight reflectedLight) {\n \tvec3 thickness = thicknessColor * texture2D(thicknessMap, uv).r;\n \tvec3 scatteringHalf = normalize(directLight.direction + (geometry.normal * thicknessDistortion));\n \tfloat scatteringDot = pow(saturate(dot(geometry.viewDir, -scatteringHalf)), thicknessPower) * thicknessScale;\n \tvec3 scatteringIllu = (scatteringDot + thicknessAmbient) * thickness;\n \treflectedLight.directDiffuse += scatteringIllu * thicknessAttenuation * directLight.color;\n }\n\n " + ) + .concat( + t.replace( + "#include ", + A.ShaderChunk.lights_fragment_begin.replace( + /RE_Direct\( directLight, geometry, material, reflectedLight \);/g, + "\n RE_Direct( directLight, geometry, material, reflectedLight );\n\n #if defined( SUBSURFACE ) && defined( USE_UV )\n RE_Direct_Scattering(directLight, vUv, geometry, reflectedLight);\n #endif\n " + ) + ), + "\n " + ), + }); + } + var Ru = { + get uniforms() { + return ku().uniforms; + }, + set uniforms(e) { + ku().uniforms = e; + }, + get vertexShader() { + return ku().vertexShader; + }, + set vertexShader(e) { + ku().vertexShader = e; + }, + get fragmentShader() { + return ku().vertexShader; + }, + set fragmentShader(e) { + ku().vertexShader = e; + }, + }, + Bu = { + uniforms: { tDiffuse: { value: null } }, + vertexShader: [ + "varying vec2 vUv;", + "void main() {", + "\tvUv = uv;", + "\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );", + "}", + ].join("\n"), + fragmentShader: [ + "uniform sampler2D tDiffuse;", + "varying vec2 vUv;", + "void main() {", + "\tvec4 tex = texture2D( tDiffuse, vec2( vUv.x, vUv.y ) );", + "\tvec4 newTex = vec4(tex.r, (tex.g + tex.b) * .5, (tex.g + tex.b) * .5, 1.0);", + "\tgl_FragColor = newTex;", + "}", + ].join("\n"), + }, + Pu = { + uniforms: { + uDirLightPos: { value: new A.Vector3() }, + uDirLightColor: { value: new A.Color(15658734) }, + uAmbientLightColor: { value: new A.Color(328965) }, + uBaseColor: { value: new A.Color(16777215) }, + }, + vertexShader: [ + "varying vec3 vNormal;", + "varying vec3 vRefract;", + "void main() {", + "\tvec4 worldPosition = modelMatrix * vec4( position, 1.0 );", + "\tvec4 mvPosition = modelViewMatrix * vec4( position, 1.0 );", + "\tvec3 worldNormal = normalize ( mat3( modelMatrix[0].xyz, modelMatrix[1].xyz, modelMatrix[2].xyz ) * normal );", + "\tvNormal = normalize( normalMatrix * normal );", + "\tvec3 I = worldPosition.xyz - cameraPosition;", + "\tvRefract = refract( normalize( I ), worldNormal, 1.02 );", + "\tgl_Position = projectionMatrix * mvPosition;", + "}", + ].join("\n"), + fragmentShader: [ + "uniform vec3 uBaseColor;", + "uniform vec3 uDirLightPos;", + "uniform vec3 uDirLightColor;", + "uniform vec3 uAmbientLightColor;", + "varying vec3 vNormal;", + "varying vec3 vRefract;", + "void main() {", + "\tfloat directionalLightWeighting = max( dot( normalize( vNormal ), uDirLightPos ), 0.0);", + "\tvec3 lightWeighting = uAmbientLightColor + uDirLightColor * directionalLightWeighting;", + "\tfloat intensity = smoothstep( - 0.5, 1.0, pow( length(lightWeighting), 20.0 ) );", + "\tintensity += length(lightWeighting) * 0.2;", + "\tfloat cameraWeighting = dot( normalize( vNormal ), vRefract );", + "\tintensity += pow( 1.0 - length( cameraWeighting ), 6.0 );", + "\tintensity = intensity * 0.2 + 0.3;", + "\tif ( intensity < 0.50 ) {", + "\t\tgl_FragColor = vec4( 2.0 * intensity * uBaseColor, 1.0 );", + "\t} else {", + "\t\tgl_FragColor = vec4( 1.0 - 2.0 * ( 1.0 - intensity ) * ( 1.0 - uBaseColor ), 1.0 );", + "}", + "}", + ].join("\n"), + }, + Lu = { + uniforms: { + uDirLightPos: { value: new A.Vector3() }, + uDirLightColor: { value: new A.Color(15658734) }, + uAmbientLightColor: { value: new A.Color(328965) }, + uBaseColor: { value: new A.Color(15658734) }, + uLineColor1: { value: new A.Color(8421504) }, + uLineColor2: { value: new A.Color(0) }, + uLineColor3: { value: new A.Color(0) }, + uLineColor4: { value: new A.Color(0) }, + }, + vertexShader: [ + "varying vec3 vNormal;", + "void main() {", + "\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );", + "\tvNormal = normalize( normalMatrix * normal );", + "}", + ].join("\n"), + fragmentShader: [ + "uniform vec3 uBaseColor;", + "uniform vec3 uLineColor1;", + "uniform vec3 uLineColor2;", + "uniform vec3 uLineColor3;", + "uniform vec3 uLineColor4;", + "uniform vec3 uDirLightPos;", + "uniform vec3 uDirLightColor;", + "uniform vec3 uAmbientLightColor;", + "varying vec3 vNormal;", + "void main() {", + "\tfloat camera = max( dot( normalize( vNormal ), vec3( 0.0, 0.0, 1.0 ) ), 0.4);", + "\tfloat light = max( dot( normalize( vNormal ), uDirLightPos ), 0.0);", + "\tgl_FragColor = vec4( uBaseColor, 1.0 );", + "\tif ( length(uAmbientLightColor + uDirLightColor * light) < 1.00 ) {", + "\t\tgl_FragColor *= vec4( uLineColor1, 1.0 );", + "\t}", + "\tif ( length(uAmbientLightColor + uDirLightColor * camera) < 0.50 ) {", + "\t\tgl_FragColor *= vec4( uLineColor2, 1.0 );", + "\t}", + "}", + ].join("\n"), + }, + Du = { + uniforms: { + uDirLightPos: { value: new A.Vector3() }, + uDirLightColor: { value: new A.Color(15658734) }, + uAmbientLightColor: { value: new A.Color(328965) }, + uBaseColor: { value: new A.Color(16777215) }, + uLineColor1: { value: new A.Color(0) }, + uLineColor2: { value: new A.Color(0) }, + uLineColor3: { value: new A.Color(0) }, + uLineColor4: { value: new A.Color(0) }, + }, + vertexShader: [ + "varying vec3 vNormal;", + "void main() {", + "\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );", + "\tvNormal = normalize( normalMatrix * normal );", + "}", + ].join("\n"), + fragmentShader: [ + "uniform vec3 uBaseColor;", + "uniform vec3 uLineColor1;", + "uniform vec3 uLineColor2;", + "uniform vec3 uLineColor3;", + "uniform vec3 uLineColor4;", + "uniform vec3 uDirLightPos;", + "uniform vec3 uDirLightColor;", + "uniform vec3 uAmbientLightColor;", + "varying vec3 vNormal;", + "void main() {", + "\tfloat directionalLightWeighting = max( dot( normalize(vNormal), uDirLightPos ), 0.0);", + "\tvec3 lightWeighting = uAmbientLightColor + uDirLightColor * directionalLightWeighting;", + "\tgl_FragColor = vec4( uBaseColor, 1.0 );", + "\tif ( length(lightWeighting) < 1.00 ) {", + "\t\tif ( mod(gl_FragCoord.x + gl_FragCoord.y, 10.0) == 0.0) {", + "\t\t\tgl_FragColor = vec4( uLineColor1, 1.0 );", + "\t\t}", + "\t}", + "\tif ( length(lightWeighting) < 0.75 ) {", + "\t\tif (mod(gl_FragCoord.x - gl_FragCoord.y, 10.0) == 0.0) {", + "\t\t\tgl_FragColor = vec4( uLineColor2, 1.0 );", + "\t\t}", + "\t}", + "\tif ( length(lightWeighting) < 0.50 ) {", + "\t\tif (mod(gl_FragCoord.x + gl_FragCoord.y - 5.0, 10.0) == 0.0) {", + "\t\t\tgl_FragColor = vec4( uLineColor3, 1.0 );", + "\t\t}", + "\t}", + "\tif ( length(lightWeighting) < 0.3465 ) {", + "\t\tif (mod(gl_FragCoord.x - gl_FragCoord.y - 5.0, 10.0) == 0.0) {", + "\t\t\tgl_FragColor = vec4( uLineColor4, 1.0 );", + "\t}", + "\t}", + "}", + ].join("\n"), + }, + Uu = { + uniforms: { + uDirLightPos: { value: new A.Vector3() }, + uDirLightColor: { value: new A.Color(15658734) }, + uAmbientLightColor: { value: new A.Color(328965) }, + uBaseColor: { value: new A.Color(16777215) }, + uLineColor1: { value: new A.Color(0) }, + }, + vertexShader: [ + "varying vec3 vNormal;", + "void main() {", + "\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );", + "\tvNormal = normalize( normalMatrix * normal );", + "}", + ].join("\n"), + fragmentShader: [ + "uniform vec3 uBaseColor;", + "uniform vec3 uLineColor1;", + "uniform vec3 uLineColor2;", + "uniform vec3 uLineColor3;", + "uniform vec3 uLineColor4;", + "uniform vec3 uDirLightPos;", + "uniform vec3 uDirLightColor;", + "uniform vec3 uAmbientLightColor;", + "varying vec3 vNormal;", + "void main() {", + "float directionalLightWeighting = max( dot( normalize(vNormal), uDirLightPos ), 0.0);", + "vec3 lightWeighting = uAmbientLightColor + uDirLightColor * directionalLightWeighting;", + "gl_FragColor = vec4( uBaseColor, 1.0 );", + "if ( length(lightWeighting) < 1.00 ) {", + "\t\tif ( ( mod(gl_FragCoord.x, 4.001) + mod(gl_FragCoord.y, 4.0) ) > 6.00 ) {", + "\t\t\tgl_FragColor = vec4( uLineColor1, 1.0 );", + "\t\t}", + "\t}", + "\tif ( length(lightWeighting) < 0.50 ) {", + "\t\tif ( ( mod(gl_FragCoord.x + 2.0, 4.001) + mod(gl_FragCoord.y + 2.0, 4.0) ) > 6.00 ) {", + "\t\t\tgl_FragColor = vec4( uLineColor1, 1.0 );", + "\t\t}", + "\t}", + "}", + ].join("\n"), + }, + Fu = { + uniforms: { + texture: { value: null }, + delta: { value: new A.Vector2(1, 1) }, + }, + vertexShader: [ + "varying vec2 vUv;", + "void main() {", + "\tvUv = uv;", + "\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );", + "}", + ].join("\n"), + fragmentShader: [ + "#include ", + "#define ITERATIONS 10.0", + "uniform sampler2D texture;", + "uniform vec2 delta;", + "varying vec2 vUv;", + "void main() {", + "\tvec4 color = vec4( 0.0 );", + "\tfloat total = 0.0;", + "\tfloat offset = rand( vUv );", + "\tfor ( float t = -ITERATIONS; t <= ITERATIONS; t ++ ) {", + "\t\tfloat percent = ( t + offset - 0.5 ) / ITERATIONS;", + "\t\tfloat weight = 1.0 - abs( percent );", + "\t\tcolor += texture2D( texture, vUv + delta * percent ) * weight;", + "\t\ttotal += weight;", + "\t}", + "\tgl_FragColor = color / total;", + "}", + ].join("\n"), + }, + Ou = { + uniforms: { tDiffuse: { value: null }, v: { value: 1 / 512 } }, + vertexShader: + "\n varying vec2 vUv;\n\n void main() {\n\n vUv = uv;\n gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n\n }\n ", + fragmentShader: + "\n\n uniform sampler2D tDiffuse;\n uniform float v;\n\n varying vec2 vUv;\n\n void main() {\n\n vec4 sum = vec4( 0.0 );\n\n sum += texture2D( tDiffuse, vec2( vUv.x, vUv.y - 4.0 * v ) ) * 0.051;\n sum += texture2D( tDiffuse, vec2( vUv.x, vUv.y - 3.0 * v ) ) * 0.0918;\n sum += texture2D( tDiffuse, vec2( vUv.x, vUv.y - 2.0 * v ) ) * 0.12245;\n sum += texture2D( tDiffuse, vec2( vUv.x, vUv.y - 1.0 * v ) ) * 0.1531;\n sum += texture2D( tDiffuse, vec2( vUv.x, vUv.y ) ) * 0.1633;\n sum += texture2D( tDiffuse, vec2( vUv.x, vUv.y + 1.0 * v ) ) * 0.1531;\n sum += texture2D( tDiffuse, vec2( vUv.x, vUv.y + 2.0 * v ) ) * 0.12245;\n sum += texture2D( tDiffuse, vec2( vUv.x, vUv.y + 3.0 * v ) ) * 0.0918;\n sum += texture2D( tDiffuse, vec2( vUv.x, vUv.y + 4.0 * v ) ) * 0.051;\n\n gl_FragColor = sum;\n\n }\n ", + }, + Nu = { + uniforms: { + tDiffuse: { value: null }, + v: { value: 1 / 512 }, + r: { value: 0.35 }, + }, + vertexShader: [ + "varying vec2 vUv;", + "void main() {", + "\tvUv = uv;", + "\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );", + "}", + ].join("\n"), + fragmentShader: [ + "uniform sampler2D tDiffuse;", + "uniform float v;", + "uniform float r;", + "varying vec2 vUv;", + "void main() {", + "\tvec4 sum = vec4( 0.0 );", + "\tfloat vv = v * abs( r - vUv.y );", + "\tsum += texture2D( tDiffuse, vec2( vUv.x, vUv.y - 4.0 * vv ) ) * 0.051;", + "\tsum += texture2D( tDiffuse, vec2( vUv.x, vUv.y - 3.0 * vv ) ) * 0.0918;", + "\tsum += texture2D( tDiffuse, vec2( vUv.x, vUv.y - 2.0 * vv ) ) * 0.12245;", + "\tsum += texture2D( tDiffuse, vec2( vUv.x, vUv.y - 1.0 * vv ) ) * 0.1531;", + "\tsum += texture2D( tDiffuse, vec2( vUv.x, vUv.y ) ) * 0.1633;", + "\tsum += texture2D( tDiffuse, vec2( vUv.x, vUv.y + 1.0 * vv ) ) * 0.1531;", + "\tsum += texture2D( tDiffuse, vec2( vUv.x, vUv.y + 2.0 * vv ) ) * 0.12245;", + "\tsum += texture2D( tDiffuse, vec2( vUv.x, vUv.y + 3.0 * vv ) ) * 0.0918;", + "\tsum += texture2D( tDiffuse, vec2( vUv.x, vUv.y + 4.0 * vv ) ) * 0.051;", + "\tgl_FragColor = sum;", + "}", + ].join("\n"), + }, + Gu = { + uniforms: { + tDiffuse: { value: null }, + offset: { value: 1 }, + darkness: { value: 1 }, + }, + vertexShader: [ + "varying vec2 vUv;", + "void main() {", + "\tvUv = uv;", + "\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );", + "}", + ].join("\n"), + fragmentShader: [ + "uniform float offset;", + "uniform float darkness;", + "uniform sampler2D tDiffuse;", + "varying vec2 vUv;", + "void main() {", + "\tvec4 texel = texture2D( tDiffuse, vUv );", + "\tvec2 uv = ( vUv - vec2( 0.5 ) ) * vec2( offset );", + "\tgl_FragColor = vec4( mix( texel.rgb, vec3( 1.0 - darkness ), dot( uv, uv ) ), texel.a );", + "}", + ].join("\n"), + }, + Zu = { + uniforms: { + u_size: { value: new A.Vector3(1, 1, 1) }, + u_renderstyle: { value: 0 }, + u_renderthreshold: { value: 0.5 }, + u_clim: { value: new A.Vector2(1, 1) }, + u_data: { value: null }, + u_cmdata: { value: null }, + }, + vertexShader: [ + "\t\tvarying vec4 v_nearpos;", + "\t\tvarying vec4 v_farpos;", + "\t\tvarying vec3 v_position;", + "\t\tvoid main() {", + "\t\t\t\tmat4 viewtransformf = modelViewMatrix;", + "\t\t\t\tmat4 viewtransformi = inverse(modelViewMatrix);", + "\t\t\t\tvec4 position4 = vec4(position, 1.0);", + "\t\t\t\tvec4 pos_in_cam = viewtransformf * position4;", + "\t\t\t\tpos_in_cam.z = -pos_in_cam.w;", + "\t\t\t\tv_nearpos = viewtransformi * pos_in_cam;", + "\t\t\t\tpos_in_cam.z = pos_in_cam.w;", + "\t\t\t\tv_farpos = viewtransformi * pos_in_cam;", + "\t\t\t\tv_position = position;", + "\t\t\t\tgl_Position = projectionMatrix * viewMatrix * modelMatrix * position4;", + "\t\t}", + ].join("\n"), + fragmentShader: [ + "\t\tprecision highp float;", + "\t\tprecision mediump sampler3D;", + "\t\tuniform vec3 u_size;", + "\t\tuniform int u_renderstyle;", + "\t\tuniform float u_renderthreshold;", + "\t\tuniform vec2 u_clim;", + "\t\tuniform sampler3D u_data;", + "\t\tuniform sampler2D u_cmdata;", + "\t\tvarying vec3 v_position;", + "\t\tvarying vec4 v_nearpos;", + "\t\tvarying vec4 v_farpos;", + "\t\tconst int MAX_STEPS = 887;\t// 887 for 512^3, 1774 for 1024^3", + "\t\tconst int REFINEMENT_STEPS = 4;", + "\t\tconst float relative_step_size = 1.0;", + "\t\tconst vec4 ambient_color = vec4(0.2, 0.4, 0.2, 1.0);", + "\t\tconst vec4 diffuse_color = vec4(0.8, 0.2, 0.2, 1.0);", + "\t\tconst vec4 specular_color = vec4(1.0, 1.0, 1.0, 1.0);", + "\t\tconst float shininess = 40.0;", + "\t\tvoid cast_mip(vec3 start_loc, vec3 step, int nsteps, vec3 view_ray);", + "\t\tvoid cast_iso(vec3 start_loc, vec3 step, int nsteps, vec3 view_ray);", + "\t\tfloat sample1(vec3 texcoords);", + "\t\tvec4 apply_colormap(float val);", + "\t\tvec4 add_lighting(float val, vec3 loc, vec3 step, vec3 view_ray);", + "\t\tvoid main() {", + "\t\t\t\tvec3 farpos = v_farpos.xyz / v_farpos.w;", + "\t\t\t\tvec3 nearpos = v_nearpos.xyz / v_nearpos.w;", + "\t\t\t\tvec3 view_ray = normalize(nearpos.xyz - farpos.xyz);", + "\t\t\t\tfloat distance = dot(nearpos - v_position, view_ray);", + "\t\t\t\tdistance = max(distance, min((-0.5 - v_position.x) / view_ray.x,", + "\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t(u_size.x - 0.5 - v_position.x) / view_ray.x));", + "\t\t\t\tdistance = max(distance, min((-0.5 - v_position.y) / view_ray.y,", + "\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t(u_size.y - 0.5 - v_position.y) / view_ray.y));", + "\t\t\t\tdistance = max(distance, min((-0.5 - v_position.z) / view_ray.z,", + "\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t(u_size.z - 0.5 - v_position.z) / view_ray.z));", + "\t\t\t\tvec3 front = v_position + view_ray * distance;", + "\t\t\t\tint nsteps = int(-distance / relative_step_size + 0.5);", + "\t\t\t\tif ( nsteps < 1 )", + "\t\t\t\t\t\tdiscard;", + "\t\t\t\tvec3 step = ((v_position - front) / u_size) / float(nsteps);", + "\t\t\t\tvec3 start_loc = front / u_size;", + "\t\t\t\tif (u_renderstyle == 0)", + "\t\t\t\t\t\tcast_mip(start_loc, step, nsteps, view_ray);", + "\t\t\t\telse if (u_renderstyle == 1)", + "\t\t\t\t\t\tcast_iso(start_loc, step, nsteps, view_ray);", + "\t\t\t\tif (gl_FragColor.a < 0.05)", + "\t\t\t\t\t\tdiscard;", + "\t\t}", + "\t\tfloat sample1(vec3 texcoords) {", + "\t\t\t\t/* Sample float value from a 3D texture. Assumes intensity data. */", + "\t\t\t\treturn texture(u_data, texcoords.xyz).r;", + "\t\t}", + "\t\tvec4 apply_colormap(float val) {", + "\t\t\t\tval = (val - u_clim[0]) / (u_clim[1] - u_clim[0]);", + "\t\t\t\treturn texture2D(u_cmdata, vec2(val, 0.5));", + "\t\t}", + "\t\tvoid cast_mip(vec3 start_loc, vec3 step, int nsteps, vec3 view_ray) {", + "\t\t\t\tfloat max_val = -1e6;", + "\t\t\t\tint max_i = 100;", + "\t\t\t\tvec3 loc = start_loc;", + "\t\t\t\tfor (int iter=0; iter= nsteps)", + "\t\t\t\t\t\t\t\tbreak;", + "\t\t\t\t\t\tfloat val = sample1(loc);", + "\t\t\t\t\t\tif (val > max_val) {", + "\t\t\t\t\t\t\t\tmax_val = val;", + "\t\t\t\t\t\t\t\tmax_i = iter;", + "\t\t\t\t\t\t}", + "\t\t\t\t\t\tloc += step;", + "\t\t\t\t}", + "\t\t\t\tvec3 iloc = start_loc + step * (float(max_i) - 0.5);", + "\t\t\t\tvec3 istep = step / float(REFINEMENT_STEPS);", + "\t\t\t\tfor (int i=0; i= nsteps)", + "\t\t\t\t\t\t\t\tbreak;", + "\t\t\t\t\t\tfloat val = sample1(loc);", + "\t\t\t\t\t\tif (val > low_threshold) {", + "\t\t\t\t\t\t\t\tvec3 iloc = loc - 0.5 * step;", + "\t\t\t\t\t\t\t\tvec3 istep = step / float(REFINEMENT_STEPS);", + "\t\t\t\t\t\t\t\tfor (int i=0; i u_renderthreshold) {", + "\t\t\t\t\t\t\t\t\t\t\t\tgl_FragColor = add_lighting(val, iloc, dstep, view_ray);", + "\t\t\t\t\t\t\t\t\t\t\t\treturn;", + "\t\t\t\t\t\t\t\t\t\t}", + "\t\t\t\t\t\t\t\t\t\tiloc += istep;", + "\t\t\t\t\t\t\t\t}", + "\t\t\t\t\t\t}", + "\t\t\t\t\t\tloc += step;", + "\t\t\t\t}", + "\t\t}", + "\t\tvec4 add_lighting(float val, vec3 loc, vec3 step, vec3 view_ray)", + "\t\t{", + "\t\t\t\tvec3 V = normalize(view_ray);", + "\t\t\t\tvec3 N;", + "\t\t\t\tfloat val1, val2;", + "\t\t\t\tval1 = sample1(loc + vec3(-step[0], 0.0, 0.0));", + "\t\t\t\tval2 = sample1(loc + vec3(+step[0], 0.0, 0.0));", + "\t\t\t\tN[0] = val1 - val2;", + "\t\t\t\tval = max(max(val1, val2), val);", + "\t\t\t\tval1 = sample1(loc + vec3(0.0, -step[1], 0.0));", + "\t\t\t\tval2 = sample1(loc + vec3(0.0, +step[1], 0.0));", + "\t\t\t\tN[1] = val1 - val2;", + "\t\t\t\tval = max(max(val1, val2), val);", + "\t\t\t\tval1 = sample1(loc + vec3(0.0, 0.0, -step[2]));", + "\t\t\t\tval2 = sample1(loc + vec3(0.0, 0.0, +step[2]));", + "\t\t\t\tN[2] = val1 - val2;", + "\t\t\t\tval = max(max(val1, val2), val);", + "\t\t\t\tfloat gm = length(N); // gradient magnitude", + "\t\t\t\tN = normalize(N);", + "\t\t\t\tfloat Nselect = float(dot(N, V) > 0.0);", + "\t\t\t\tN = (2.0 * Nselect - 1.0) * N;\t// ==\tNselect * N - (1.0-Nselect)*N;", + "\t\t\t\tvec4 ambient_color = vec4(0.0, 0.0, 0.0, 0.0);", + "\t\t\t\tvec4 diffuse_color = vec4(0.0, 0.0, 0.0, 0.0);", + "\t\t\t\tvec4 specular_color = vec4(0.0, 0.0, 0.0, 0.0);", + "\t\t\t\tfor (int i=0; i<1; i++)", + "\t\t\t\t{", + "\t\t\t\t\t\tvec3 L = normalize(view_ray);\t//lightDirs[i];", + "\t\t\t\t\t\tfloat lightEnabled = float( length(L) > 0.0 );", + "\t\t\t\t\t\tL = normalize(L + (1.0 - lightEnabled));", + "\t\t\t\t\t\tfloat lambertTerm = clamp(dot(N, L), 0.0, 1.0);", + "\t\t\t\t\t\tvec3 H = normalize(L+V); // Halfway vector", + "\t\t\t\t\t\tfloat specularTerm = pow(max(dot(H, N), 0.0), shininess);", + "\t\t\t\t\t\tfloat mask1 = lightEnabled;", + "\t\t\t\t\t\tambient_color +=\tmask1 * ambient_color;\t// * gl_LightSource[i].ambient;", + "\t\t\t\t\t\tdiffuse_color +=\tmask1 * lambertTerm;", + "\t\t\t\t\t\tspecular_color += mask1 * specularTerm * specular_color;", + "\t\t\t\t}", + "\t\t\t\tvec4 final_color;", + "\t\t\t\tvec4 color = apply_colormap(val);", + "\t\t\t\tfinal_color = color * (ambient_color + diffuse_color) + specular_color;", + "\t\t\t\tfinal_color.a = color.a;", + "\t\t\t\treturn final_color;", + "\t\t}", + ].join("\n"), + }, + zu = { + uniforms: { + color: { value: null }, + time: { value: 0 }, + tDiffuse: { value: null }, + tDudv: { value: null }, + textureMatrix: { value: null }, + }, + vertexShader: [ + "uniform mat4 textureMatrix;", + "varying vec2 vUv;", + "varying vec4 vUvRefraction;", + "void main() {", + "\tvUv = uv;", + "\tvUvRefraction = textureMatrix * vec4( position, 1.0 );", + "\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );", + "}", + ].join("\n"), + fragmentShader: [ + "uniform vec3 color;", + "uniform float time;", + "uniform sampler2D tDiffuse;", + "uniform sampler2D tDudv;", + "varying vec2 vUv;", + "varying vec4 vUvRefraction;", + "float blendOverlay( float base, float blend ) {", + "\treturn( base < 0.5 ? ( 2.0 * base * blend ) : ( 1.0 - 2.0 * ( 1.0 - base ) * ( 1.0 - blend ) ) );", + "}", + "vec3 blendOverlay( vec3 base, vec3 blend ) {", + "\treturn vec3( blendOverlay( base.r, blend.r ), blendOverlay( base.g, blend.g ),blendOverlay( base.b, blend.b ) );", + "}", + "void main() {", + " float waveStrength = 0.1;", + " float waveSpeed = 0.03;", + "\tvec2 distortedUv = texture2D( tDudv, vec2( vUv.x + time * waveSpeed, vUv.y ) ).rg * waveStrength;", + "\tdistortedUv = vUv.xy + vec2( distortedUv.x, distortedUv.y + time * waveSpeed );", + "\tvec2 distortion = ( texture2D( tDudv, distortedUv ).rg * 2.0 - 1.0 ) * waveStrength;", + " vec4 uv = vec4( vUvRefraction );", + " uv.xy += distortion;", + "\tvec4 base = texture2DProj( tDiffuse, uv );", + "\tgl_FragColor = vec4( blendOverlay( base.rgb, color ), 1.0 );", + "}", + ].join("\n"), + }, + Qu = null, + Hu = null, + Vu = new WeakMap(); + function ju(e) { + var t = document.createRange(), + n = new Color(); + function r(e, t, n, r) { + "" !== r && + ("uppercase" === e.textTransform && (r = r.toUpperCase()), + (l.font = e.fontWeight + " " + e.fontSize + " " + e.fontFamily), + (l.textBaseline = "top"), + (l.fillStyle = e.color), + l.fillText(r, t, n + 0.1 * parseFloat(e.fontSize))); + } + function i(e, t, n, r, i) { + n < 2 * i && (i = n / 2), + r < 2 * i && (i = r / 2), + l.beginPath(), + l.moveTo(e + i, t), + l.arcTo(e + n, t, e + n, t + r, i), + l.arcTo(e + n, t + r, e, t + r, i), + l.arcTo(e, t + r, e, t, i), + l.arcTo(e, t, e + n, t, i), + l.closePath(); + } + function a(e, t, n, r, i, a) { + var o = e[t + "Width"], + s = e[t + "Style"], + u = e[t + "Color"]; + "0px" !== o && + "none" !== s && + "transparent" !== u && + "rgba(0, 0, 0, 0)" !== u && + ((l.strokeStyle = u), + (l.lineWidth = parseFloat(o)), + l.beginPath(), + l.moveTo(n, r), + l.lineTo(n + i, r + a), + l.stroke()); + } + var o = e.getBoundingClientRect(), + s = Vu.get(e); + void 0 === s && + (((s = document.createElement("canvas")).width = o.width), + (s.height = o.height), + Vu.set(e, s)); + var l = s.getContext("2d"), + u = new (function (e) { + var t = [], + n = !1; + function r() { + if ((n && ((n = !1), e.restore()), 0 !== t.length)) { + for ( + var r = -1 / 0, i = -1 / 0, a = 1 / 0, o = 1 / 0, s = 0; + s < t.length; + s++ + ) { + var l = t[s]; + (r = Math.max(r, l.x)), + (i = Math.max(i, l.y)), + (a = Math.min(a, l.x + l.width)), + (o = Math.min(o, l.y + l.height)); + } + e.save(), + e.beginPath(), + e.rect(r, i, a - r, o - i), + e.clip(), + (n = !0); + } + } + return { + add: function (e) { + t.push(e), r(); + }, + remove: function () { + t.pop(), r(); + }, + }; + })(l); + return ( + (function e(s, c) { + var f = 0, + d = 0, + h = 0, + p = 0; + if (s.nodeType === Node.TEXT_NODE) { + t.selectNode(s); + var v = t.getBoundingClientRect(); + (f = v.left - o.left - 0.5), + (d = v.top - o.top - 0.5), + (h = v.width), + (p = v.height), + r(c, f, d, s.nodeValue.trim()); + } else { + if (s.nodeType === Node.COMMENT_NODE) return; + if (s instanceof HTMLCanvasElement) { + if ("none" === s.style.display) return; + l.save(); + var m = window.devicePixelRatio; + l.scale(1 / m, 1 / m), l.drawImage(s, 0, 0), l.restore(); + } else { + if ("none" === s.style.display) return; + var g = s.getBoundingClientRect(); + (f = g.left - o.left - 0.5), + (d = g.top - o.top - 0.5), + (h = g.width), + (p = g.height), + (c = window.getComputedStyle(s)), + i(f, d, h, p, parseFloat(c.borderRadius)); + var A = c.backgroundColor; + "transparent" !== A && + "rgba(0, 0, 0, 0)" !== A && + ((l.fillStyle = A), l.fill()); + for ( + var y = !0, + b = null, + x = 0, + S = [ + "borderTop", + "borderLeft", + "borderBottom", + "borderRight", + ]; + x < S.length; + x++ + ) { + var E = S[x]; + if ( + (null !== b && + (y = + c[E + "Width"] === c[b + "Width"] && + c[E + "Color"] === c[b + "Color"] && + c[E + "Style"] === c[b + "Style"]), + !1 === y) + ) + break; + b = E; + } + if (!0 === y) { + var _ = parseFloat(c.borderTopWidth); + "0px" !== c.borderTopWidth && + "none" !== c.borderTopStyle && + "transparent" !== c.borderTopColor && + "rgba(0, 0, 0, 0)" !== c.borderTopColor && + ((l.strokeStyle = c.borderTopColor), + (l.lineWidth = _), + l.stroke()); + } else + a(c, "borderTop", f, d, h, 0), + a(c, "borderLeft", f, d, 0, p), + a(c, "borderBottom", f, d + p, h, 0), + a(c, "borderRight", f + h, d, 0, p); + if (s instanceof HTMLInputElement) { + var C = c.accentColor; + (void 0 !== C && "auto" !== C) || (C = c.color), n.set(C); + var w = + Math.sqrt( + 0.299 * Math.pow(n.r, 2) + + 0.587 * Math.pow(n.g, 2) + + 0.114 * Math.pow(n.b, 2) + ) < 0.5 + ? "white" + : "#111111"; + if ( + ("radio" === s.type && + (i(f, d, h, p, p), + (l.fillStyle = "white"), + (l.strokeStyle = C), + (l.lineWidth = 1), + l.fill(), + l.stroke(), + s.checked && + (i(f + 2, d + 2, h - 4, p - 4, p), + (l.fillStyle = C), + (l.strokeStyle = w), + (l.lineWidth = 2), + l.fill(), + l.stroke())), + "checkbox" === s.type && + (i(f, d, h, p, 2), + (l.fillStyle = s.checked ? C : "white"), + (l.strokeStyle = s.checked ? w : C), + (l.lineWidth = 1), + l.stroke(), + l.fill(), + s.checked)) + ) { + var T = l.textAlign; + (l.textAlign = "center"), + r( + { + color: w, + fontFamily: c.fontFamily, + fontSize: p + "px", + fontWeight: "bold", + }, + f + h / 2, + d, + "\u2714" + ), + (l.textAlign = T); + } + if ("range" === s.type) { + var M = ["min", "max", "value"].map(function (e) { + return parseFloat(s[e]); + }), + I = _slicedToArray(M, 3), + k = I[0], + R = I[1], + B = ((I[2] - k) / (R - k)) * (h - p); + i(f, d + p / 4, h, p / 2, p / 4), + (l.fillStyle = w), + (l.strokeStyle = C), + (l.lineWidth = 1), + l.fill(), + l.stroke(), + i(f, d + p / 4, B + p / 2, p / 2, p / 4), + (l.fillStyle = C), + l.fill(), + i(f + B, d, p, p, p / 2), + (l.fillStyle = C), + l.fill(); + } + ("color" !== s.type && + "text" !== s.type && + "number" !== s.type) || + (u.add({ x: f, y: d, width: h, height: p }), + r( + c, + f + parseInt(c.paddingLeft), + d + parseInt(c.paddingTop), + s.value + ), + u.remove()); + } + } + } + var P = "auto" === c.overflow || "hidden" === c.overflow; + P && u.add({ x: f, y: d, width: h, height: p }); + for (var L = 0; L < s.childNodes.length; L++) + e(s.childNodes[L], c); + P && u.remove(); + })(e), + s + ); + } + function Wu(e, t, n, r) { + var i = { + clientX: n * e.offsetWidth + e.offsetLeft, + clientY: r * e.offsetHeight + e.offsetTop, + view: e.ownerDocument.defaultView, + }; + window.dispatchEvent(new MouseEvent(t, i)); + var a = e.getBoundingClientRect(); + (n = n * a.width + a.left), + (r = r * a.height + a.top), + (function e(a) { + if ( + a.nodeType !== Node.TEXT_NODE && + a.nodeType !== Node.COMMENT_NODE + ) { + var o = a.getBoundingClientRect(); + if ( + n > o.left && + n < o.right && + r > o.top && + r < o.bottom && + (a.dispatchEvent(new MouseEvent(t, i)), + a instanceof HTMLInputElement && + "range" === a.type && + ("mousedown" === t || "click" === t)) + ) { + var s = ["min", "max"].map(function (e) { + return parseFloat(a[e]); + }), + l = _slicedToArray(s, 2), + u = l[0], + c = l[1], + f = o.width, + d = (n - o.x) / f; + (a.value = u + (c - u) * d), + a.dispatchEvent(new InputEvent("input", { bubbles: !0 })); + } + for (var h = 0; h < a.childNodes.length; h++) + e(a.childNodes[h]); + } + })(e); + } + var Xu = new A.Vector2(), + Yu = { type: "", data: Xu }, + qu = null, + Ju = null, + Ku = new A.Frustum(), + $u = new A.Vector3(), + ec = new A.Vector3(), + tc = new A.Vector3(), + nc = new A.Vector3(), + rc = new A.Vector3(), + ic = new A.Vector3(), + ac = new A.Vector3(), + oc = new A.Vector3(), + sc = new A.Vector3(), + lc = new A.Vector3(), + uc = new A.Vector3(), + cc = new A.Vector3(), + fc = new A.Vector3(), + dc = new A.Vector3(), + hc = null; + function pc() { + return vc.apply(this, arguments); + } + function vc() { + return ( + (vc = _asyncToGenerator( + _regeneratorRuntime().mark(function e() { + var t, n, r, i, a, o, s, l, u, c, f, d, h, p, v, m; + return _regeneratorRuntime().wrap(function (e) { + for (;;) + switch ((e.prev = e.next)) { + case 0: + if ( + ((m = function () { + var e = performance.now(); + if (v > 0) { + var t = (e - v) / 1e3; + o.stepSimulation(t, 10); + } + v = e; + for (var n = 0, r = u.length; n < r; n++) { + var i = u[n]; + if (i.isInstancedMesh) { + for ( + var a = i.instanceMatrix.array, + l = c.get(i), + f = 0; + f < l.length; + f++ + ) { + l[f].getMotionState().getWorldTransform(s), + mc( + s.getOrigin(), + s.getRotation(), + a, + 16 * f + ); + } + i.instanceMatrix.needsUpdate = !0; + } else if (i.isMesh) { + c.get(i).getMotionState().getWorldTransform(s); + var d = s.getOrigin(), + h = s.getRotation(); + i.position.set(d.x(), d.y(), d.z()), + i.quaternion.set(h.x(), h.y(), h.z(), h.w()); + } + } + }), + (p = function (e, n) { + var r = + arguments.length > 2 && void 0 !== arguments[2] + ? arguments[2] + : 0; + if (e.isInstancedMesh) { + var i = c.get(e)[r]; + i.setAngularVelocity(new t.btVector3(0, 0, 0)), + i.setLinearVelocity(new t.btVector3(0, 0, 0)), + s.setIdentity(), + s.setOrigin(new t.btVector3(n.x, n.y, n.z)), + i.setWorldTransform(s); + } else if (e.isMesh) { + var a = c.get(e); + a.setAngularVelocity(new t.btVector3(0, 0, 0)), + a.setLinearVelocity(new t.btVector3(0, 0, 0)), + s.setIdentity(), + s.setOrigin(new t.btVector3(n.x, n.y, n.z)), + a.setWorldTransform(s); + } + }), + (h = function (e, n, r) { + for ( + var i = e.instanceMatrix.array, a = [], s = 0; + s < e.count; + s++ + ) { + var l = 16 * s, + f = new t.btTransform(); + f.setFromOpenGLMatrix(i.slice(l, l + 16)); + var d = new t.btDefaultMotionState(f), + h = new t.btVector3(0, 0, 0); + r.calculateLocalInertia(n, h); + var p = new t.btRigidBodyConstructionInfo( + n, + d, + r, + h + ), + v = new t.btRigidBody(p); + o.addRigidBody(v), a.push(v); + } + n > 0 && + (e.instanceMatrix.setUsage(35048), + u.push(e), + c.set(e, a)); + }), + (d = function (e, n, r) { + var i = e.position, + a = e.quaternion, + s = new t.btTransform(); + s.setIdentity(), + s.setOrigin(new t.btVector3(i.x, i.y, i.z)), + s.setRotation( + new t.btQuaternion(a.x, a.y, a.z, a.w) + ); + var l = new t.btDefaultMotionState(s), + f = new t.btVector3(0, 0, 0); + r.calculateLocalInertia(n, f); + var d = new t.btRigidBodyConstructionInfo( + n, + l, + r, + f + ), + h = new t.btRigidBody(d); + o.addRigidBody(h), + n > 0 && (u.push(e), c.set(e, h)); + }), + (f = function (e) { + var t = + arguments.length > 1 && void 0 !== arguments[1] + ? arguments[1] + : 0, + n = l(e.geometry); + null !== n && + (e.isInstancedMesh + ? h(e, t, n) + : e.isMesh && d(e, t, n)); + }), + (l = function (e) { + var n = e.parameters; + if ("BoxGeometry" === e.type) { + var r = void 0 !== n.width ? n.width / 2 : 0.5, + i = void 0 !== n.height ? n.height / 2 : 0.5, + a = void 0 !== n.depth ? n.depth / 2 : 0.5, + o = new t.btBoxShape(new t.btVector3(r, i, a)); + return o.setMargin(0.05), o; + } + if ( + "SphereGeometry" === e.type || + "IcosahedronGeometry" === e.type + ) { + var s = void 0 !== n.radius ? n.radius : 1, + l = new t.btSphereShape(s); + return l.setMargin(0.05), l; + } + return null; + }), + "Ammo" in window !== !1) + ) { + e.next = 9; + break; + } + return ( + console.error("AmmoPhysics: Couldn't find Ammo.js"), + e.abrupt("return") + ); + case 9: + return (e.next = 11), Ammo(); + case 11: + return ( + (t = e.sent), + 60, + (n = new t.btDefaultCollisionConfiguration()), + (r = new t.btCollisionDispatcher(n)), + (i = new t.btDbvtBroadphase()), + (a = new t.btSequentialImpulseConstraintSolver()), + (o = new t.btDiscreteDynamicsWorld( + r, + i, + a, + n + )).setGravity(new t.btVector3(0, -9.8, 0)), + (s = new t.btTransform()), + (u = []), + (c = new WeakMap()), + (v = 0), + setInterval(m, 1e3 / 60), + e.abrupt("return", { addMesh: f, setMeshPosition: p }) + ); + case 25: + case "end": + return e.stop(); + } + }, e); + }) + )), + vc.apply(this, arguments) + ); + } + function mc(e, t, n, r) { + var i = t.x(), + a = t.y(), + o = t.z(), + s = t.w(), + l = i + i, + u = a + a, + c = o + o, + f = i * l, + d = i * u, + h = i * c, + p = a * u, + v = a * c, + m = o * c, + g = s * l, + A = s * u, + y = s * c; + (n[r + 0] = 1 - (p + m)), + (n[r + 1] = d + y), + (n[r + 2] = h - A), + (n[r + 3] = 0), + (n[r + 4] = d - y), + (n[r + 5] = 1 - (f + m)), + (n[r + 6] = v + g), + (n[r + 7] = 0), + (n[r + 8] = h + A), + (n[r + 9] = v - g), + (n[r + 10] = 1 - (f + p)), + (n[r + 11] = 0), + (n[r + 12] = e.x()), + (n[r + 13] = e.y()), + (n[r + 14] = e.z()), + (n[r + 15] = 1); + } + var gc = null, + Ac = null, + yc = null, + bc = null, + xc = null, + Sc = null; + function Ec(e, t, n) { + var r = n.length - e - 1; + if (t >= n[r]) return r - 1; + if (t <= n[e]) return e; + for ( + var i = e, a = r, o = Math.floor((i + a) / 2); + t < n[o] || t >= n[o + 1]; + + ) + t < n[o] ? (a = o) : (i = o), (o = Math.floor((i + a) / 2)); + return o; + } + function _c(e, t, n, r) { + var i = [], + a = [], + o = []; + i[0] = 1; + for (var s = 1; s <= n; ++s) { + (a[s] = t - r[e + 1 - s]), (o[s] = r[e + s] - t); + for (var l = 0, u = 0; u < s; ++u) { + var c = o[u + 1], + f = a[s - u], + d = i[u] / (c + f); + (i[u] = l + c * d), (l = f * d); + } + i[s] = l; + } + return i; + } + function Cc(e, t, n, r) { + for ( + var i = Ec(e, r, t), + a = _c(i, r, e, t), + o = new Vector4(0, 0, 0, 0), + s = 0; + s <= e; + ++s + ) { + var l = n[i - e + s], + u = a[s], + c = l.w * u; + (o.x += l.x * c), + (o.y += l.y * c), + (o.z += l.z * c), + (o.w += l.w * u); + } + return o; + } + function wc(e, t, n, r, i) { + for (var a = [], o = 0; o <= n; ++o) a[o] = 0; + for (var s = [], l = 0; l <= r; ++l) s[l] = a.slice(0); + for (var u = [], c = 0; c <= n; ++c) u[c] = a.slice(0); + u[0][0] = 1; + for (var f = a.slice(0), d = a.slice(0), h = 1; h <= n; ++h) { + (f[h] = t - i[e + 1 - h]), (d[h] = i[e + h] - t); + for (var p = 0, v = 0; v < h; ++v) { + var m = d[v + 1], + g = f[h - v]; + u[h][v] = m + g; + var A = u[v][h - 1] / u[h][v]; + (u[v][h] = p + m * A), (p = g * A); + } + u[h][h] = p; + } + for (var y = 0; y <= n; ++y) s[0][y] = u[y][n]; + for (var b = 0; b <= n; ++b) { + for (var x = 0, S = 1, E = [], _ = 0; _ <= n; ++_) + E[_] = a.slice(0); + E[0][0] = 1; + for (var C = 1; C <= r; ++C) { + var w = 0, + T = b - C, + M = n - C; + b >= C && + ((E[S][0] = E[x][0] / u[M + 1][T]), (w = E[S][0] * u[T][M])); + for ( + var I = b - 1 <= M ? C - 1 : n - b, k = T >= -1 ? 1 : -T; + k <= I; + ++k + ) + (E[S][k] = (E[x][k] - E[x][k - 1]) / u[M + 1][T + k]), + (w += E[S][k] * u[T + k][M]); + b <= M && + ((E[S][C] = -E[x][C - 1] / u[M + 1][b]), + (w += E[S][C] * u[b][M])), + (s[C][b] = w); + var R = x; + (x = S), (S = R); + } + } + for (var B = n, P = 1; P <= r; ++P) { + for (var L = 0; L <= n; ++L) s[P][L] *= B; + B *= n - P; + } + return s; + } + function Tc(e, t, n, r, i) { + for ( + var a = i < e ? i : e, + o = [], + s = Ec(e, r, t), + l = wc(s, r, e, a, t), + u = [], + c = 0; + c < n.length; + ++c + ) { + var f = n[c].clone(), + d = f.w; + (f.x *= d), (f.y *= d), (f.z *= d), (u[c] = f); + } + for (var h = 0; h <= a; ++h) { + for ( + var p = u[s - e].clone().multiplyScalar(l[h][0]), v = 1; + v <= e; + ++v + ) + p.add(u[s - e + v].clone().multiplyScalar(l[h][v])); + o[h] = p; + } + for (var m = a + 1; m <= i + 1; ++m) o[m] = new Vector4(0, 0, 0); + return o; + } + function Mc(e, t) { + for (var n = 1, r = 2; r <= e; ++r) n *= r; + for (var i = 1, a = 2; a <= t; ++a) i *= a; + for (var o = 2; o <= e - t; ++o) i *= o; + return n / i; + } + function Ic(e) { + for (var t = e.length, n = [], r = [], i = 0; i < t; ++i) { + var a = e[i]; + (n[i] = new Vector3(a.x, a.y, a.z)), (r[i] = a.w); + } + for (var o = [], s = 0; s < t; ++s) { + for (var l = n[s].clone(), u = 1; u <= s; ++u) + l.sub(o[s - u].clone().multiplyScalar(Mc(s, u) * r[u])); + o[s] = l.divideScalar(r[0]); + } + return o; + } + function kc(e, t, n, r, i) { + return Ic(Tc(e, t, n, r, i)); + } + function Rc(e, t, n, r, i, a, o, s) { + for ( + var l = Ec(e, a, n), + u = Ec(t, o, r), + c = _c(l, a, e, n), + f = _c(u, o, t, r), + d = [], + h = 0; + h <= t; + ++h + ) { + d[h] = new Vector4(0, 0, 0, 0); + for (var p = 0; p <= e; ++p) { + var v = i[l - e + p][u - t + h].clone(), + m = v.w; + (v.x *= m), + (v.y *= m), + (v.z *= m), + d[h].add(v.multiplyScalar(c[p])); + } + } + for (var g = new Vector4(0, 0, 0, 0), A = 0; A <= t; ++A) + g.add(d[A].multiplyScalar(f[A])); + g.divideScalar(g.w), s.set(g.x, g.y, g.z); + } + var Bc = null, + Pc, + Lc, + Dc, + Uc = null, + Fc = null, + Oc = null, + Nc = null, + Gc = null, + Zc = null, + zc = null, + Qc = null; + function Hc(e) { + var t = "Kaydara FBX Binary \0"; + return e.byteLength >= 21 && t === tf(e, 0, 21); + } + function Vc(e) { + var t = [ + "K", + "a", + "y", + "d", + "a", + "r", + "a", + "\\", + "F", + "B", + "X", + "\\", + "B", + "i", + "n", + "a", + "r", + "y", + "\\", + "\\", + ], + n = 0; + function r(t) { + var r = e[t - 1]; + return (e = e.slice(n + t)), n++, r; + } + for (var i = 0; i < t.length; ++i) { + if (r(1) === t[i]) return !1; + } + return !0; + } + function jc(e) { + var t = e.match(/FBXVersion: (\d+)/); + if (t) return parseInt(t[1]); + throw new Error( + "THREE.FBXLoader: Cannot find the version number for the file given." + ); + } + function Wc(e) { + return e / 46186158e3; + } + var Xc = null; + function Yc(e, t, n, r) { + var i; + switch (r.mappingType) { + case "ByPolygonVertex": + i = e; + break; + case "ByPolygon": + i = t; + break; + case "ByVertice": + i = n; + break; + case "AllSame": + i = r.indices[0]; + break; + default: + console.warn( + "THREE.FBXLoader: unknown attribute mapping type " + + r.mappingType + ); + } + "IndexToDirect" === r.referenceType && (i = r.indices[i]); + var a = i * r.dataSize, + o = a + r.dataSize; + return rf(Xc, r.buffer, a, o); + } + var qc = new A.Euler(), + Jc = new A.Vector3(); + function Kc(e) { + var t = new Matrix4(), + n = new Matrix4(), + r = new Matrix4(), + i = new Matrix4(), + a = new Matrix4(), + o = new Matrix4(), + s = new Matrix4(), + l = new Matrix4(), + u = new Matrix4(), + c = new Matrix4(), + f = new Matrix4(), + d = new Matrix4(), + h = e.inheritType ? e.inheritType : 0; + if ( + (e.translation && t.setPosition(Jc.fromArray(e.translation)), + e.preRotation) + ) { + var p = e.preRotation.map(MathUtils.degToRad); + p.push(e.eulerOrder), n.makeRotationFromEuler(qc.fromArray(p)); + } + if (e.rotation) { + var v = e.rotation.map(MathUtils.degToRad); + v.push(e.eulerOrder), r.makeRotationFromEuler(qc.fromArray(v)); + } + if (e.postRotation) { + var m = e.postRotation.map(MathUtils.degToRad); + m.push(e.eulerOrder), + i.makeRotationFromEuler(qc.fromArray(m)), + i.invert(); + } + e.scale && a.scale(Jc.fromArray(e.scale)), + e.scalingOffset && s.setPosition(Jc.fromArray(e.scalingOffset)), + e.scalingPivot && o.setPosition(Jc.fromArray(e.scalingPivot)), + e.rotationOffset && l.setPosition(Jc.fromArray(e.rotationOffset)), + e.rotationPivot && u.setPosition(Jc.fromArray(e.rotationPivot)), + e.parentMatrixWorld && + (f.copy(e.parentMatrix), c.copy(e.parentMatrixWorld)); + var g = n.clone().multiply(r).multiply(i), + A = new Matrix4(); + A.extractRotation(c); + var y = new Matrix4(); + y.copyPosition(c); + var b = y.clone().invert().multiply(c), + x = A.clone().invert().multiply(b), + S = a, + E = new Matrix4(); + if (0 === h) E.copy(A).multiply(g).multiply(x).multiply(S); + else if (1 === h) E.copy(A).multiply(x).multiply(g).multiply(S); + else { + var _ = new Matrix4() + .scale(new Vector3().setFromMatrixScale(f)) + .clone() + .invert(), + C = x.clone().multiply(_); + E.copy(A).multiply(g).multiply(C).multiply(S); + } + var w = u.clone().invert(), + T = o.clone().invert(), + M = t + .clone() + .multiply(l) + .multiply(u) + .multiply(n) + .multiply(r) + .multiply(i) + .multiply(w) + .multiply(s) + .multiply(o) + .multiply(a) + .multiply(T), + I = new Matrix4().copyPosition(M), + k = c.clone().multiply(I); + return ( + d.copyPosition(k), + (M = d.clone().multiply(E)).premultiply(c.invert()), + M + ); + } + function $c(e) { + var t = ["ZYX", "YZX", "XZY", "ZXY", "YXZ", "XYZ"]; + return 6 === (e = e || 0) + ? (console.warn( + "THREE.FBXLoader: unsupported Euler Order: Spherical XYZ. Animations and rotations may be incorrect." + ), + t[0]) + : t[e]; + } + function ef(e) { + return e.split(",").map(function (e) { + return parseFloat(e); + }); + } + function tf(e, t, n) { + return ( + void 0 === t && (t = 0), + void 0 === n && (n = e.byteLength), + LoaderUtils.decodeText(new Uint8Array(e, t, n)) + ); + } + function nf(e, t) { + for (var n = 0, r = e.length, i = t.length; n < i; n++, r++) + e[r] = t[n]; + } + function rf(e, t, n, r) { + for (var i = n, a = 0; i < r; i++, a++) e[a] = t[i]; + return e; + } + function af(e, t, n) { + return e.slice(0, t).concat(n).concat(e.slice(t)); + } + var of = null, + sf = (function () { + function e(t) { + (0, p.Z)(this, e), M(this, "data"), (this.data = t); + } + return ( + (0, v.Z)(e, [ + { + key: "generateShapes", + value: function (e) { + for ( + var t = + arguments.length > 1 && void 0 !== arguments[1] + ? arguments[1] + : 100, + n = arguments.length > 2 ? arguments[2] : void 0, + r = [], + i = (0, s.Z)({ letterSpacing: 0, lineHeight: 1 }, n), + a = lf(e, t, this.data, i), + o = 0, + l = a.length; + o < l; + o++ + ) + Array.prototype.push.apply(r, a[o].toShapes(!1)); + return r; + }, + }, + ]), + e + ); + })(); + function lf(e, t, n, r) { + for ( + var i = Array.from(e), + a = t / n.resolution, + o = + (n.boundingBox.yMax - + n.boundingBox.yMin + + n.underlineThickness) * + a, + s = [], + l = 0, + u = 0, + c = 0; + c < i.length; + c++ + ) { + var f = i[c]; + if ("\n" === f) (l = 0), (u -= o * r.lineHeight); + else { + var d = uf(f, a, l, u, n); + d && ((l += d.offsetX + r.letterSpacing), s.push(d.path)); + } + } + return s; + } + function uf(e, t, n, r, i) { + var a = i.glyphs[e] || i.glyphs["?"]; + if (a) { + var o, + s, + l, + u, + c, + f, + d, + h, + p = new A.ShapePath(); + if (a.o) + for ( + var v = a._cachedOutline || (a._cachedOutline = a.o.split(" ")), + m = 0, + g = v.length; + m < g; + + ) { + switch (v[m++]) { + case "m": + (o = parseInt(v[m++]) * t + n), + (s = parseInt(v[m++]) * t + r), + p.moveTo(o, s); + break; + case "l": + (o = parseInt(v[m++]) * t + n), + (s = parseInt(v[m++]) * t + r), + p.lineTo(o, s); + break; + case "q": + (l = parseInt(v[m++]) * t + n), + (u = parseInt(v[m++]) * t + r), + (c = parseInt(v[m++]) * t + n), + (f = parseInt(v[m++]) * t + r), + p.quadraticCurveTo(c, f, l, u); + break; + case "b": + (l = parseInt(v[m++]) * t + n), + (u = parseInt(v[m++]) * t + r), + (c = parseInt(v[m++]) * t + n), + (f = parseInt(v[m++]) * t + r), + (d = parseInt(v[m++]) * t + n), + (h = parseInt(v[m++]) * t + r), + p.bezierCurveTo(c, f, d, h, l, u); + } + } + return { offsetX: a.ha * t, path: p }; + } + console.error( + 'THREE.Font: character "' + + e + + '" does not exists in font family ' + + i.familyName + + "." + ); + } + var cf = null, + ff = (function (e) { + (0, m.Z)(n, e); + var t = (0, g.Z)(n); + function n() { + var e, + r = + arguments.length > 0 && void 0 !== arguments[0] + ? arguments[0] + : null, + i = + arguments.length > 1 && void 0 !== arguments[1] + ? arguments[1] + : 1, + a = + arguments.length > 2 && void 0 !== arguments[2] + ? arguments[2] + : 1, + o = + arguments.length > 3 && void 0 !== arguments[3] + ? arguments[3] + : 1; + return ( + (0, p.Z)(this, n), + ((e = t.call(this, null)).isData3DTexture = !0), + (e.image = { data: r, width: i, height: a, depth: o }), + (e.magFilter = A.NearestFilter), + (e.minFilter = A.NearestFilter), + (e.wrapR = A.ClampToEdgeWrapping), + (e.generateMipmaps = !1), + (e.flipY = !1), + (e.unpackAlignment = 1), + e + ); + } + return (0, v.Z)(n); + })(A.Texture), + df = null, + hf = null, + pf = { + type: function (e) { + switch (e) { + case "uchar": + case "unsigned char": + case "uint8": + case "uint8_t": + this.__array = Uint8Array; + break; + case "signed char": + case "int8": + case "int8_t": + this.__array = Int8Array; + break; + case "short": + case "short int": + case "signed short": + case "signed short int": + case "int16": + case "int16_t": + this.__array = Int16Array; + break; + case "ushort": + case "unsigned short": + case "unsigned short int": + case "uint16": + case "uint16_t": + this.__array = Uint16Array; + break; + case "int": + case "signed int": + case "int32": + case "int32_t": + this.__array = Int32Array; + break; + case "uint": + case "unsigned int": + case "uint32": + case "uint32_t": + this.__array = Uint32Array; + break; + case "float": + this.__array = Float32Array; + break; + case "double": + this.__array = Float64Array; + break; + default: + throw new Error("Unsupported NRRD data type: " + e); + } + return (this.type = e); + }, + endian: function (e) { + return (this.endian = e); + }, + encoding: function (e) { + return (this.encoding = e); + }, + dimension: function (e) { + return (this.dim = parseInt(e, 10)); + }, + sizes: function (e) { + var t; + return (this.sizes = (function () { + for ( + var n = e.split(/\s+/), r = [], i = 0, a = n.length; + i < a; + i++ + ) + (t = n[i]), r.push(parseInt(t, 10)); + return r; + })()); + }, + space: function (e) { + return (this.space = e); + }, + "space origin": function (e) { + return (this.space_origin = e + .split("(")[1] + .split(")")[0] + .split(",")); + }, + "space directions": function (e) { + var t, + n, + r = e.match(/\(.*?\)/g); + return (this.vectors = (function () { + for (var e = [], i = 0, a = r.length; i < a; i++) + (n = r[i]), + e.push( + (function () { + for ( + var e = n.slice(1, -1).split(/,/), + r = [], + i = 0, + a = e.length; + i < a; + i++ + ) + (t = e[i]), r.push(parseFloat(t)); + return r; + })() + ); + return e; + })()); + }, + spacings: function (e) { + var t, + n = e.split(/\s+/); + return (this.spacings = (function () { + for (var e = [], r = 0, i = n.length; r < i; r++) + (t = n[r]), e.push(parseFloat(t)); + return e; + })()); + }, + }, + vf = null, + mf = null, + gf = null, + Af = null, + yf = null, + bf = null, + xf = null, + Sf = null, + Ef = (function () { + var e = + "object" == typeof global && + global && + global.Object === Object && + global, + t = + "object" == typeof self && + self && + self.Object === Object && + self, + n = e || t || Function("return this")(), + a = n.Symbol, + o = Object.prototype, + s = o.hasOwnProperty, + l = o.toString, + u = a ? a.toStringTag : void 0; + var c = Object.prototype.toString; + var A = "[object Null]", + y = "[object Undefined]", + b = a ? a.toStringTag : void 0; + function x(e) { + return null == e + ? void 0 === e + ? y + : A + : b && b in Object(e) + ? (function (e) { + var t = s.call(e, u), + n = e[u]; + try { + e[u] = void 0; + var r = !0; + } catch (a) {} + var i = l.call(e); + return r && (t ? (e[u] = n) : delete e[u]), i; + })(e) + : (function (e) { + return c.call(e); + })(e); + } + function S(e) { + return null != e && "object" == typeof e; + } + var E = "[object Symbol]"; + function _(e) { + return "symbol" == typeof e || (S(e) && x(e) == E); + } + function C(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; + } + var w = Array.isArray, + T = 1 / 0, + M = a ? a.prototype : void 0, + I = M ? M.toString : void 0; + function k(e) { + if ("string" == typeof e) return e; + if (w(e)) return C(e, k) + ""; + if (_(e)) return I ? I.call(e) : ""; + var t = e + ""; + return "0" == t && 1 / e == -T ? "-0" : t; + } + var R = /\s/; + var B = /^\s+/; + function P(e) { + return e + ? e + .slice( + 0, + (function (e) { + for (var t = e.length; t-- && R.test(e.charAt(t)); ); + return t; + })(e) + 1 + ) + .replace(B, "") + : e; + } + function L(e) { + var t = typeof e; + return null != e && ("object" == t || "function" == t); + } + var D = NaN, + U = /^[-+]0x[0-9a-f]+$/i, + F = /^0b[01]+$/i, + O = /^0o[0-7]+$/i, + N = parseInt; + var G = 1 / 0, + Z = 17976931348623157e292; + function z(e) { + return e + ? (e = (function (e) { + if ("number" == typeof e) return e; + if (_(e)) return D; + if (L(e)) { + var t = "function" == typeof e.valueOf ? e.valueOf() : e; + e = L(t) ? t + "" : t; + } + if ("string" != typeof e) return 0 === e ? e : +e; + e = P(e); + var n = F.test(e); + return n || O.test(e) + ? N(e.slice(2), n ? 2 : 8) + : U.test(e) + ? D + : +e; + })(e)) === G || e === -G + ? (e < 0 ? -1 : 1) * Z + : e === e + ? e + : 0 + : 0 === e + ? e + : 0; + } + function Q(e) { + var t = z(e), + n = t % 1; + return t === t ? (n ? t - n : t) : 0; + } + function H(e) { + return e; + } + var V = "[object AsyncFunction]", + j = "[object Function]", + W = "[object GeneratorFunction]", + X = "[object Proxy]"; + function Y(e) { + if (!L(e)) return !1; + var t = x(e); + return t == j || t == W || t == V || t == X; + } + var q = n["__core-js_shared__"], + J = (function () { + var e = /[^.]+$/.exec((q && q.keys && q.keys.IE_PROTO) || ""); + return e ? "Symbol(src)_1." + e : ""; + })(); + var K = Function.prototype.toString; + function $(e) { + if (null != e) { + try { + return K.call(e); + } catch (t) {} + try { + return e + ""; + } catch (t) {} + } + return ""; + } + var ee = /^\[object .+?Constructor\]$/, + te = Function.prototype, + ne = Object.prototype, + re = te.toString, + ie = ne.hasOwnProperty, + ae = RegExp( + "^" + + re + .call(ie) + .replace(/[\\^$.*+?()[\]{}|]/g, "\\$&") + .replace( + /hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, + "$1.*?" + ) + + "$" + ); + function oe(e) { + return ( + !(!L(e) || ((t = e), J && J in t)) && + (Y(e) ? ae : ee).test($(e)) + ); + var t; + } + function se(e, t) { + var n = (function (e, t) { + return null == e ? void 0 : e[t]; + })(e, t); + return oe(n) ? n : void 0; + } + var le = se(n, "WeakMap"), + ue = Object.create, + ce = (function () { + function e() {} + return function (t) { + if (!L(t)) return {}; + if (ue) return ue(t); + e.prototype = t; + var n = new e(); + return (e.prototype = void 0), n; + }; + })(); + function fe() {} + var de = Date.now; + var he = (function () { + try { + var e = se(Object, "defineProperty"); + return e({}, "", {}), e; + } catch (t) {} + })(), + pe = (function (e) { + var t = 0, + n = 0; + return function () { + var r = de(), + i = 16 - (r - n); + if (((n = r), i > 0)) { + if (++t >= 800) return arguments[0]; + } else t = 0; + return e.apply(void 0, arguments); + }; + })( + he + ? function (e, t) { + return he(e, "toString", { + configurable: !0, + enumerable: !1, + value: + ((n = t), + function () { + return n; + }), + writable: !0, + }); + var n; + } + : H + ), + ve = pe; + function me(e, t) { + for ( + var n = -1, r = null == e ? 0 : e.length; + ++n < r && !1 !== t(e[n], n, e); + + ); + return e; + } + function ge(e, t, n, r) { + for (var i = e.length, a = n + (r ? 1 : -1); r ? a-- : ++a < i; ) + if (t(e[a], a, e)) return a; + return -1; + } + function Ae(e) { + return e !== e; + } + function ye(e, t, n) { + return t === t + ? (function (e, t, n) { + for (var r = n - 1, i = e.length; ++r < i; ) + if (e[r] === t) return r; + return -1; + })(e, t, n) + : ge(e, Ae, n); + } + function be(e, t) { + return !!(null == e ? 0 : e.length) && ye(e, t, 0) > -1; + } + var xe = 9007199254740991, + Se = /^(?:0|[1-9]\d*)$/; + function Ee(e, t) { + var n = typeof e; + return ( + !!(t = null == t ? xe : t) && + ("number" == n || ("symbol" != n && Se.test(e))) && + e > -1 && + e % 1 == 0 && + e < t + ); + } + function _e(e, t, n) { + "__proto__" == t && he + ? he(e, t, { + configurable: !0, + enumerable: !0, + value: n, + writable: !0, + }) + : (e[t] = n); + } + function Ce(e, t) { + return e === t || (e !== e && t !== t); + } + var we = Object.prototype.hasOwnProperty; + function Te(e, t, n) { + var r = e[t]; + (we.call(e, t) && Ce(r, n) && (void 0 !== n || t in e)) || + _e(e, t, n); + } + function Me(e, t, n, r) { + var i = !n; + n || (n = {}); + for (var a = -1, o = t.length; ++a < o; ) { + var s = t[a], + l = r ? r(n[s], e[s], s, n, e) : void 0; + void 0 === l && (l = e[s]), i ? _e(n, s, l) : Te(n, s, l); + } + return n; + } + var Ie = Math.max; + function ke(e, t) { + return ve( + (function (e, t, n) { + return ( + (t = Ie(void 0 === t ? e.length - 1 : t, 0)), + function () { + for ( + var r = arguments, + i = -1, + a = Ie(r.length - t, 0), + o = Array(a); + ++i < a; + + ) + o[i] = r[t + i]; + i = -1; + for (var s = Array(t + 1); ++i < t; ) s[i] = r[i]; + return ( + (s[t] = n(o)), + (function (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); + })(e, this, s) + ); + } + ); + })(e, t, H), + e + "" + ); + } + var Re = 9007199254740991; + function Be(e) { + return "number" == typeof e && e > -1 && e % 1 == 0 && e <= Re; + } + function Pe(e) { + return null != e && Be(e.length) && !Y(e); + } + function Le(e, t, n) { + if (!L(n)) return !1; + var r = typeof t; + return ( + !!("number" == r + ? Pe(n) && Ee(t, n.length) + : "string" == r && t in n) && Ce(n[t], e) + ); + } + var De = Object.prototype; + function Ue(e) { + var t = e && e.constructor; + return e === (("function" == typeof t && t.prototype) || De); + } + function Fe(e) { + return S(e) && "[object Arguments]" == x(e); + } + var Oe = Object.prototype, + Ne = Oe.hasOwnProperty, + Ge = Oe.propertyIsEnumerable, + Ze = Fe( + (function () { + return arguments; + })() + ) + ? Fe + : function (e) { + return ( + S(e) && Ne.call(e, "callee") && !Ge.call(e, "callee") + ); + }, + ze = Ze; + var Qe = + "object" == typeof exports && + exports && + !exports.nodeType && + exports, + He = + Qe && + "object" == typeof module && + module && + !module.nodeType && + module, + Ve = He && He.exports === Qe ? n.Buffer : void 0, + je = + (Ve ? Ve.isBuffer : void 0) || + function () { + return !1; + }, + We = {}; + function Xe(e) { + return function (t) { + return e(t); + }; + } + (We["[object Float32Array]"] = + We["[object Float64Array]"] = + We["[object Int8Array]"] = + We["[object Int16Array]"] = + We["[object Int32Array]"] = + We["[object Uint8Array]"] = + We["[object Uint8ClampedArray]"] = + We["[object Uint16Array]"] = + We["[object Uint32Array]"] = + !0), + (We["[object Arguments]"] = + We["[object Array]"] = + We["[object ArrayBuffer]"] = + We["[object Boolean]"] = + We["[object DataView]"] = + We["[object Date]"] = + We["[object Error]"] = + We["[object Function]"] = + We["[object Map]"] = + We["[object Number]"] = + We["[object Object]"] = + We["[object RegExp]"] = + We["[object Set]"] = + We["[object String]"] = + We["[object WeakMap]"] = + !1); + var Ye = + "object" == typeof exports && + exports && + !exports.nodeType && + exports, + qe = + Ye && + "object" == typeof module && + module && + !module.nodeType && + module, + Je = qe && qe.exports === Ye && e.process, + Ke = (function () { + try { + var e = qe && qe.require && qe.require("util").types; + return e || (Je && Je.binding && Je.binding("util")); + } catch (t) {} + })(), + $e = Ke && Ke.isTypedArray, + et = $e + ? Xe($e) + : function (e) { + return S(e) && Be(e.length) && !!We[x(e)]; + }, + tt = Object.prototype.hasOwnProperty; + function nt(e, t) { + var n = w(e), + r = !n && ze(e), + i = !n && !r && je(e), + a = !n && !r && !i && et(e), + o = n || r || i || a, + s = o + ? (function (e, t) { + for (var n = -1, r = Array(e); ++n < e; ) r[n] = t(n); + return r; + })(e.length, String) + : [], + l = s.length; + for (var u in e) + (!t && !tt.call(e, u)) || + (o && + ("length" == u || + (i && ("offset" == u || "parent" == u)) || + (a && + ("buffer" == u || + "byteLength" == u || + "byteOffset" == u)) || + Ee(u, l))) || + s.push(u); + return s; + } + function rt(e, t) { + return function (n) { + return e(t(n)); + }; + } + var it = rt(Object.keys, Object), + at = Object.prototype.hasOwnProperty; + function ot(e) { + if (!Ue(e)) return it(e); + var t = []; + for (var n in Object(e)) + at.call(e, n) && "constructor" != n && t.push(n); + return t; + } + function st(e) { + return Pe(e) ? nt(e) : ot(e); + } + var lt, + ut = Object.prototype.hasOwnProperty, + ct = + ((lt = function (e, t) { + if (Ue(t) || Pe(t)) Me(t, st(t), e); + else for (var n in t) ut.call(t, n) && Te(e, n, t[n]); + }), + ke(function (e, t) { + var n = -1, + r = t.length, + i = r > 1 ? t[r - 1] : void 0, + a = r > 2 ? t[2] : void 0; + for ( + i = + lt.length > 3 && "function" == typeof i + ? (r--, i) + : void 0, + a && + Le(t[0], t[1], a) && + ((i = r < 3 ? void 0 : i), (r = 1)), + e = Object(e); + ++n < r; + + ) { + var o = t[n]; + o && lt(e, o, n, i); + } + return e; + })); + var ft = Object.prototype.hasOwnProperty; + function dt(e) { + if (!L(e)) + return (function (e) { + var t = []; + if (null != e) for (var n in Object(e)) t.push(n); + return t; + })(e); + var t = Ue(e), + n = []; + for (var r in e) + ("constructor" != r || (!t && ft.call(e, r))) && n.push(r); + return n; + } + function ht(e) { + return Pe(e) ? nt(e, !0) : dt(e); + } + var pt = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, + vt = /^\w*$/; + function mt(e, t) { + if (w(e)) return !1; + var n = typeof e; + return ( + !( + "number" != n && + "symbol" != n && + "boolean" != n && + null != e && + !_(e) + ) || + vt.test(e) || + !pt.test(e) || + (null != t && e in Object(t)) + ); + } + var gt = se(Object, "create"); + var At = Object.prototype.hasOwnProperty; + var yt = Object.prototype.hasOwnProperty; + function bt(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 xt(e, t) { + for (var n = e.length; n--; ) if (Ce(e[n][0], t)) return n; + return -1; + } + (bt.prototype.clear = function () { + (this.__data__ = gt ? gt(null) : {}), (this.size = 0); + }), + (bt.prototype.delete = function (e) { + var t = this.has(e) && delete this.__data__[e]; + return (this.size -= t ? 1 : 0), t; + }), + (bt.prototype.get = function (e) { + var t = this.__data__; + if (gt) { + var n = t[e]; + return "__lodash_hash_undefined__" === n ? void 0 : n; + } + return At.call(t, e) ? t[e] : void 0; + }), + (bt.prototype.has = function (e) { + var t = this.__data__; + return gt ? void 0 !== t[e] : yt.call(t, e); + }), + (bt.prototype.set = function (e, t) { + var n = this.__data__; + return ( + (this.size += this.has(e) ? 0 : 1), + (n[e] = gt && void 0 === t ? "__lodash_hash_undefined__" : t), + this + ); + }); + var St = Array.prototype.splice; + function Et(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]); + } + } + (Et.prototype.clear = function () { + (this.__data__ = []), (this.size = 0); + }), + (Et.prototype.delete = function (e) { + var t = this.__data__, + n = xt(t, e); + return ( + !(n < 0) && + (n == t.length - 1 ? t.pop() : St.call(t, n, 1), + --this.size, + !0) + ); + }), + (Et.prototype.get = function (e) { + var t = this.__data__, + n = xt(t, e); + return n < 0 ? void 0 : t[n][1]; + }), + (Et.prototype.has = function (e) { + return xt(this.__data__, e) > -1; + }), + (Et.prototype.set = function (e, t) { + var n = this.__data__, + r = xt(n, e); + return ( + r < 0 ? (++this.size, n.push([e, t])) : (n[r][1] = t), this + ); + }); + var _t = se(n, "Map"); + function Ct(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 wt(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]); + } + } + (wt.prototype.clear = function () { + (this.size = 0), + (this.__data__ = { + hash: new bt(), + map: new (_t || Et)(), + string: new bt(), + }); + }), + (wt.prototype.delete = function (e) { + var t = Ct(this, e).delete(e); + return (this.size -= t ? 1 : 0), t; + }), + (wt.prototype.get = function (e) { + return Ct(this, e).get(e); + }), + (wt.prototype.has = function (e) { + return Ct(this, e).has(e); + }), + (wt.prototype.set = function (e, t) { + var n = Ct(this, e), + r = n.size; + return n.set(e, t), (this.size += n.size == r ? 0 : 1), this; + }); + var Tt = "Expected a function"; + function Mt(e, t) { + if ( + "function" != typeof e || + (null != t && "function" != typeof t) + ) + throw new TypeError(Tt); + var n = function n() { + var r = arguments, + i = t ? t.apply(this, r) : r[0], + a = n.cache; + if (a.has(i)) return a.get(i); + var o = e.apply(this, r); + return (n.cache = a.set(i, o) || a), o; + }; + return (n.cache = new (Mt.Cache || wt)()), n; + } + Mt.Cache = wt; + var It = + /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g, + kt = /\\(\\)?/g, + Rt = (function (e) { + var t = Mt(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(It, function (e, n, r, i) { + t.push(r ? i.replace(kt, "$1") : n || e); + }), + t + ); + }); + function Bt(e, t) { + return w(e) + ? e + : mt(e, t) + ? [e] + : Rt( + (function (e) { + return null == e ? "" : k(e); + })(e) + ); + } + var Pt = 1 / 0; + function Lt(e) { + if ("string" == typeof e || _(e)) return e; + var t = e + ""; + return "0" == t && 1 / e == -Pt ? "-0" : t; + } + function Dt(e, t) { + for (var n = 0, r = (t = Bt(t, e)).length; null != e && n < r; ) + e = e[Lt(t[n++])]; + return n && n == r ? e : void 0; + } + function Ut(e, t) { + for (var n = -1, r = t.length, i = e.length; ++n < r; ) + e[i + n] = t[n]; + return e; + } + var Ft = a ? a.isConcatSpreadable : void 0; + function Ot(e) { + return w(e) || ze(e) || !!(Ft && e && e[Ft]); + } + function Nt(e, t, n, r, i) { + var a = -1, + o = e.length; + for (n || (n = Ot), i || (i = []); ++a < o; ) { + var s = e[a]; + t > 0 && n(s) + ? t > 1 + ? Nt(s, t - 1, n, r, i) + : Ut(i, s) + : r || (i[i.length] = s); + } + return i; + } + function Gt(e) { + return (null == e ? 0 : e.length) ? Nt(e, 1) : []; + } + var Zt = rt(Object.getPrototypeOf, Object); + function zt(e, t, n) { + var r = -1, + i = e.length; + t < 0 && (t = -t > i ? 0 : i + t), + (n = n > i ? i : n) < 0 && (n += i), + (i = t > n ? 0 : (n - t) >>> 0), + (t >>>= 0); + for (var a = Array(i); ++r < i; ) a[r] = e[r + t]; + return a; + } + function Qt(e, t, n, r) { + var i = -1, + a = null == e ? 0 : e.length; + for (r && a && (n = e[++i]); ++i < a; ) n = t(n, e[i], i, e); + return n; + } + function Ht(e) { + var t = (this.__data__ = new Et(e)); + this.size = t.size; + } + (Ht.prototype.clear = function () { + (this.__data__ = new Et()), (this.size = 0); + }), + (Ht.prototype.delete = function (e) { + var t = this.__data__, + n = t.delete(e); + return (this.size = t.size), n; + }), + (Ht.prototype.get = function (e) { + return this.__data__.get(e); + }), + (Ht.prototype.has = function (e) { + return this.__data__.has(e); + }), + (Ht.prototype.set = function (e, t) { + var n = this.__data__; + if (n instanceof Et) { + var r = n.__data__; + if (!_t || r.length < 199) + return r.push([e, t]), (this.size = ++n.size), this; + n = this.__data__ = new wt(r); + } + return n.set(e, t), (this.size = n.size), this; + }); + var Vt = + "object" == typeof exports && + exports && + !exports.nodeType && + exports, + jt = + Vt && + "object" == typeof module && + module && + !module.nodeType && + module, + Wt = jt && jt.exports === Vt ? n.Buffer : void 0, + Xt = Wt ? Wt.allocUnsafe : void 0; + function Yt(e, t) { + for ( + var n = -1, r = null == e ? 0 : e.length, i = 0, a = []; + ++n < r; + + ) { + var o = e[n]; + t(o, n, e) && (a[i++] = o); + } + return a; + } + function qt() { + return []; + } + var Jt = Object.prototype.propertyIsEnumerable, + Kt = Object.getOwnPropertySymbols, + $t = Kt + ? function (e) { + return null == e + ? [] + : ((e = Object(e)), + Yt(Kt(e), function (t) { + return Jt.call(e, t); + })); + } + : qt; + var en = Object.getOwnPropertySymbols + ? function (e) { + for (var t = []; e; ) Ut(t, $t(e)), (e = Zt(e)); + return t; + } + : qt; + function tn(e, t, n) { + var r = t(e); + return w(e) ? r : Ut(r, n(e)); + } + function nn(e) { + return tn(e, st, $t); + } + function rn(e) { + return tn(e, ht, en); + } + var an = se(n, "DataView"), + on = se(n, "Promise"), + sn = se(n, "Set"), + ln = "[object Map]", + un = "[object Promise]", + cn = "[object Set]", + fn = "[object WeakMap]", + dn = "[object DataView]", + hn = $(an), + pn = $(_t), + vn = $(on), + mn = $(sn), + gn = $(le), + An = x; + ((an && An(new an(new ArrayBuffer(1))) != dn) || + (_t && An(new _t()) != ln) || + (on && An(on.resolve()) != un) || + (sn && An(new sn()) != cn) || + (le && An(new le()) != fn)) && + (An = function (e) { + var t = x(e), + n = "[object Object]" == t ? e.constructor : void 0, + r = n ? $(n) : ""; + if (r) + switch (r) { + case hn: + return dn; + case pn: + return ln; + case vn: + return un; + case mn: + return cn; + case gn: + return fn; + } + return t; + }); + var yn = An, + bn = Object.prototype.hasOwnProperty; + var xn = n.Uint8Array; + function Sn(e) { + var t = new e.constructor(e.byteLength); + return new xn(t).set(new xn(e)), t; + } + var En = /\w*$/; + var _n = a ? a.prototype : void 0, + Cn = _n ? _n.valueOf : void 0; + var wn = "[object Boolean]", + Tn = "[object Date]", + Mn = "[object Map]", + In = "[object Number]", + kn = "[object RegExp]", + Rn = "[object Set]", + Bn = "[object String]", + Pn = "[object Symbol]", + Ln = "[object ArrayBuffer]", + Dn = "[object DataView]", + Un = "[object Float32Array]", + Fn = "[object Float64Array]", + On = "[object Int8Array]", + Nn = "[object Int16Array]", + Gn = "[object Int32Array]", + Zn = "[object Uint8Array]", + zn = "[object Uint8ClampedArray]", + Qn = "[object Uint16Array]", + Hn = "[object Uint32Array]"; + function Vn(e, t, n) { + var r, + i = e.constructor; + switch (t) { + case Ln: + return Sn(e); + case wn: + case Tn: + return new i(+e); + case Dn: + return (function (e, t) { + var n = t ? Sn(e.buffer) : e.buffer; + return new e.constructor(n, e.byteOffset, e.byteLength); + })(e, n); + case Un: + case Fn: + case On: + case Nn: + case Gn: + case Zn: + case zn: + case Qn: + case Hn: + return (function (e, t) { + var n = t ? Sn(e.buffer) : e.buffer; + return new e.constructor(n, e.byteOffset, e.length); + })(e, n); + case Mn: + return new i(); + case In: + case Bn: + return new i(e); + case kn: + return (function (e) { + var t = new e.constructor(e.source, En.exec(e)); + return (t.lastIndex = e.lastIndex), t; + })(e); + case Rn: + return new i(); + case Pn: + return (r = e), Cn ? Object(Cn.call(r)) : {}; + } + } + var jn = Ke && Ke.isMap, + Wn = jn + ? Xe(jn) + : function (e) { + return S(e) && "[object Map]" == yn(e); + }; + var Xn = Ke && Ke.isSet, + Yn = Xn + ? Xe(Xn) + : function (e) { + return S(e) && "[object Set]" == yn(e); + }, + qn = 1, + Jn = 2, + Kn = 4, + $n = "[object Arguments]", + er = "[object Function]", + tr = "[object GeneratorFunction]", + nr = "[object Object]", + rr = {}; + function ir(e, t, n, r, i, a) { + var o, + s = t & qn, + l = t & Jn, + u = t & Kn; + if ((n && (o = i ? n(e, r, i, a) : n(e)), void 0 !== o)) return o; + if (!L(e)) return e; + var c = w(e); + if (c) { + if ( + ((o = (function (e) { + var t = e.length, + n = new e.constructor(t); + return ( + t && + "string" == typeof e[0] && + bn.call(e, "index") && + ((n.index = e.index), (n.input = e.input)), + n + ); + })(e)), + !s) + ) + return (function (e, t) { + var n = -1, + r = e.length; + for (t || (t = Array(r)); ++n < r; ) t[n] = e[n]; + return t; + })(e, o); + } else { + var f = yn(e), + d = f == er || f == tr; + if (je(e)) + return (function (e, t) { + if (t) return e.slice(); + var n = e.length, + r = Xt ? Xt(n) : new e.constructor(n); + return e.copy(r), r; + })(e, s); + if (f == nr || f == $n || (d && !i)) { + if ( + ((o = + l || d + ? {} + : (function (e) { + return "function" != typeof e.constructor || Ue(e) + ? {} + : ce(Zt(e)); + })(e)), + !s) + ) + return l + ? (function (e, t) { + return Me(e, en(e), t); + })( + e, + (function (e, t) { + return e && Me(t, ht(t), e); + })(o, e) + ) + : (function (e, t) { + return Me(e, $t(e), t); + })( + e, + (function (e, t) { + return e && Me(t, st(t), e); + })(o, e) + ); + } else { + if (!rr[f]) return i ? e : {}; + o = Vn(e, f, s); + } + } + a || (a = new Ht()); + var h = a.get(e); + if (h) return h; + a.set(e, o), + Yn(e) + ? e.forEach(function (r) { + o.add(ir(r, t, n, r, e, a)); + }) + : Wn(e) && + e.forEach(function (r, i) { + o.set(i, ir(r, t, n, i, e, a)); + }); + var p = c ? void 0 : (u ? (l ? rn : nn) : l ? ht : st)(e); + return ( + me(p || e, function (r, i) { + p && (r = e[(i = r)]), Te(o, i, ir(r, t, n, i, e, a)); + }), + o + ); + } + (rr[$n] = + rr["[object Array]"] = + rr["[object ArrayBuffer]"] = + rr["[object DataView]"] = + rr["[object Boolean]"] = + rr["[object Date]"] = + rr["[object Float32Array]"] = + rr["[object Float64Array]"] = + rr["[object Int8Array]"] = + rr["[object Int16Array]"] = + rr["[object Int32Array]"] = + rr["[object Map]"] = + rr["[object Number]"] = + rr[nr] = + rr["[object RegExp]"] = + rr["[object Set]"] = + rr["[object String]"] = + rr["[object Symbol]"] = + rr["[object Uint8Array]"] = + rr["[object Uint8ClampedArray]"] = + rr["[object Uint16Array]"] = + rr["[object Uint32Array]"] = + !0), + (rr["[object Error]"] = rr[er] = rr["[object WeakMap]"] = !1); + var ar = 4; + function or(e) { + return ir(e, ar); + } + function sr(e) { + for ( + var t = -1, n = null == e ? 0 : e.length, r = 0, i = []; + ++t < n; + + ) { + var a = e[t]; + a && (i[r++] = a); + } + return i; + } + function lr(e) { + var t = -1, + n = null == e ? 0 : e.length; + for (this.__data__ = new wt(); ++t < n; ) this.add(e[t]); + } + function ur(e, t) { + for (var n = -1, r = null == e ? 0 : e.length; ++n < r; ) + if (t(e[n], n, e)) return !0; + return !1; + } + function cr(e, t) { + return e.has(t); + } + (lr.prototype.add = lr.prototype.push = + function (e) { + return this.__data__.set(e, "__lodash_hash_undefined__"), this; + }), + (lr.prototype.has = function (e) { + return this.__data__.has(e); + }); + var fr = 1, + dr = 2; + function hr(e, t, n, r, i, a) { + var o = n & fr, + s = e.length, + l = t.length; + if (s != l && !(o && l > s)) return !1; + var u = a.get(e), + c = a.get(t); + if (u && c) return u == t && c == e; + var f = -1, + d = !0, + h = n & dr ? new lr() : void 0; + for (a.set(e, t), a.set(t, e); ++f < s; ) { + var p = e[f], + v = t[f]; + if (r) var m = o ? r(v, p, f, t, e, a) : r(p, v, f, e, t, a); + if (void 0 !== m) { + if (m) continue; + d = !1; + break; + } + if (h) { + if ( + !ur(t, function (e, t) { + if (!cr(h, t) && (p === e || i(p, e, n, r, a))) + return h.push(t); + }) + ) { + d = !1; + break; + } + } else if (p !== v && !i(p, v, n, r, a)) { + d = !1; + break; + } + } + return a.delete(e), a.delete(t), d; + } + function pr(e) { + var t = -1, + n = Array(e.size); + return ( + e.forEach(function (e, r) { + n[++t] = [r, e]; + }), + n + ); + } + function vr(e) { + var t = -1, + n = Array(e.size); + return ( + e.forEach(function (e) { + n[++t] = e; + }), + n + ); + } + var mr = 1, + gr = 2, + Ar = "[object Boolean]", + yr = "[object Date]", + br = "[object Error]", + xr = "[object Map]", + Sr = "[object Number]", + Er = "[object RegExp]", + _r = "[object Set]", + Cr = "[object String]", + wr = "[object Symbol]", + Tr = "[object ArrayBuffer]", + Mr = "[object DataView]", + Ir = a ? a.prototype : void 0, + kr = Ir ? Ir.valueOf : void 0; + var Rr = 1, + Br = Object.prototype.hasOwnProperty; + var Pr = 1, + Lr = "[object Arguments]", + Dr = "[object Array]", + Ur = "[object Object]", + Fr = Object.prototype.hasOwnProperty; + function Or(e, t, n, r, i, a) { + var o = w(e), + s = w(t), + l = o ? Dr : yn(e), + u = s ? Dr : yn(t), + c = (l = l == Lr ? Ur : l) == Ur, + f = (u = u == Lr ? Ur : u) == Ur, + d = l == u; + if (d && je(e)) { + if (!je(t)) return !1; + (o = !0), (c = !1); + } + if (d && !c) + return ( + a || (a = new Ht()), + o || et(e) + ? hr(e, t, n, r, i, a) + : (function (e, t, n, r, i, a, o) { + switch (n) { + case Mr: + if ( + e.byteLength != t.byteLength || + e.byteOffset != t.byteOffset + ) + return !1; + (e = e.buffer), (t = t.buffer); + case Tr: + return !( + e.byteLength != t.byteLength || + !a(new xn(e), new xn(t)) + ); + case Ar: + case yr: + case Sr: + return Ce(+e, +t); + case br: + return e.name == t.name && e.message == t.message; + case Er: + case Cr: + return e == t + ""; + case xr: + var s = pr; + case _r: + var l = r & mr; + if ((s || (s = vr), e.size != t.size && !l)) + return !1; + var u = o.get(e); + if (u) return u == t; + (r |= gr), o.set(e, t); + var c = hr(s(e), s(t), r, i, a, o); + return o.delete(e), c; + case wr: + if (kr) return kr.call(e) == kr.call(t); + } + return !1; + })(e, t, l, n, r, i, a) + ); + if (!(n & Pr)) { + var h = c && Fr.call(e, "__wrapped__"), + p = f && Fr.call(t, "__wrapped__"); + if (h || p) { + var v = h ? e.value() : e, + m = p ? t.value() : t; + return a || (a = new Ht()), i(v, m, n, r, a); + } + } + return ( + !!d && + (a || (a = new Ht()), + (function (e, t, n, r, i, a) { + var o = n & Rr, + s = nn(e), + l = s.length; + if (l != nn(t).length && !o) return !1; + for (var u = l; u--; ) { + var c = s[u]; + if (!(o ? c in t : Br.call(t, c))) return !1; + } + var f = a.get(e), + d = a.get(t); + if (f && d) return f == t && d == e; + var h = !0; + a.set(e, t), a.set(t, e); + for (var p = o; ++u < l; ) { + var v = e[(c = s[u])], + m = t[c]; + if (r) + var g = o ? r(m, v, c, t, e, a) : r(v, m, c, e, t, a); + if (!(void 0 === g ? v === m || i(v, m, n, r, a) : g)) { + h = !1; + break; + } + p || (p = "constructor" == c); + } + if (h && !p) { + var A = e.constructor, + y = t.constructor; + A == y || + !("constructor" in e) || + !("constructor" in t) || + ("function" == typeof A && + A instanceof A && + "function" == typeof y && + y instanceof y) || + (h = !1); + } + return a.delete(e), a.delete(t), h; + })(e, t, n, r, i, a)) + ); + } + function Nr(e, t, n, r, i) { + return ( + e === t || + (null == e || null == t || (!S(e) && !S(t)) + ? e !== e && t !== t + : Or(e, t, n, r, Nr, i)) + ); + } + var Gr = 1, + Zr = 2; + function zr(e) { + return e === e && !L(e); + } + function Qr(e, t) { + return function (n) { + return ( + null != n && n[e] === t && (void 0 !== t || e in Object(n)) + ); + }; + } + function Hr(e) { + var t = (function (e) { + for (var t = st(e), n = t.length; n--; ) { + var r = t[n], + i = e[r]; + t[n] = [r, i, zr(i)]; + } + return t; + })(e); + return 1 == t.length && t[0][2] + ? Qr(t[0][0], t[0][1]) + : function (n) { + return ( + n === e || + (function (e, t, n, r) { + var i = n.length, + a = i, + o = !r; + if (null == e) return !a; + for (e = Object(e); i--; ) { + var s = n[i]; + if (o && s[2] ? s[1] !== e[s[0]] : !(s[0] in e)) + return !1; + } + for (; ++i < a; ) { + var l = (s = n[i])[0], + u = e[l], + c = s[1]; + if (o && s[2]) { + if (void 0 === u && !(l in e)) return !1; + } else { + var f = new Ht(); + if (r) var d = r(u, c, l, e, t, f); + if (!(void 0 === d ? Nr(c, u, Gr | Zr, r, f) : d)) + return !1; + } + } + return !0; + })(n, e, t) + ); + }; + } + function Vr(e, t) { + return null != e && t in Object(e); + } + function jr(e, t, n) { + for (var r = -1, i = (t = Bt(t, e)).length, a = !1; ++r < i; ) { + var o = Lt(t[r]); + if (!(a = null != e && n(e, o))) break; + e = e[o]; + } + return a || ++r != i + ? a + : !!(i = null == e ? 0 : e.length) && + Be(i) && + Ee(o, i) && + (w(e) || ze(e)); + } + var Wr = 1, + Xr = 2; + function Yr(e, t) { + return mt(e) && zr(t) + ? Qr(Lt(e), t) + : function (n) { + var r = (function (e, t, n) { + var r = null == e ? void 0 : Dt(e, t); + return void 0 === r ? n : r; + })(n, e); + return void 0 === r && r === t + ? (function (e, t) { + return null != e && jr(e, t, Vr); + })(n, e) + : Nr(t, r, Wr | Xr); + }; + } + function qr(e) { + return mt(e) + ? ((t = Lt(e)), + function (e) { + return null == e ? void 0 : e[t]; + }) + : (function (e) { + return function (t) { + return Dt(t, e); + }; + })(e); + var t; + } + function Jr(e) { + return "function" == typeof e + ? e + : null == e + ? H + : "object" == typeof e + ? w(e) + ? Yr(e[0], e[1]) + : Hr(e) + : qr(e); + } + function Kr(e, t, n, r) { + for (var i = -1, a = null == e ? 0 : e.length; ++i < a; ) { + var o = e[i]; + t(r, o, n(o), e); + } + return r; + } + var $r, + ei = function (e, t, n) { + for (var r = -1, i = Object(e), a = n(e), o = a.length; o--; ) { + var s = a[$r ? o : ++r]; + if (!1 === t(i[s], s, i)) break; + } + return e; + }; + var ti = (function (e, t) { + return function (n, r) { + if (null == n) return n; + if (!Pe(n)) return e(n, r); + for ( + var i = n.length, a = t ? i : -1, o = Object(n); + (t ? a-- : ++a < i) && !1 !== r(o[a], a, o); + + ); + return n; + }; + })(function (e, t) { + return e && ei(e, t, st); + }), + ni = ti; + function ri(e, t, n, r) { + return ( + ni(e, function (e, i, a) { + t(r, e, n(e), a); + }), + r + ); + } + var ii = Object.prototype, + ai = ii.hasOwnProperty, + oi = ke(function (e, t) { + e = Object(e); + var n = -1, + r = t.length, + i = r > 2 ? t[2] : void 0; + for (i && Le(t[0], t[1], i) && (r = 1); ++n < r; ) + for ( + var a = t[n], o = ht(a), s = -1, l = o.length; + ++s < l; + + ) { + var u = o[s], + c = e[u]; + (void 0 === c || (Ce(c, ii[u]) && !ai.call(e, u))) && + (e[u] = a[u]); + } + return e; + }); + function si(e) { + return S(e) && Pe(e); + } + function li(e, t, n) { + for (var r = -1, i = null == e ? 0 : e.length; ++r < i; ) + if (n(t, e[r])) return !0; + return !1; + } + var ui = ke(function (e, t) { + return si(e) + ? (function (e, t, n, r) { + var i = -1, + a = be, + o = !0, + s = e.length, + l = [], + u = t.length; + if (!s) return l; + n && (t = C(t, Xe(n))), + r + ? ((a = li), (o = !1)) + : t.length >= 200 && + ((a = cr), (o = !1), (t = new lr(t))); + e: for (; ++i < s; ) { + var c = e[i], + f = null == n ? c : n(c); + if (((c = r || 0 !== c ? c : 0), o && f === f)) { + for (var d = u; d--; ) if (t[d] === f) continue e; + l.push(c); + } else a(t, f, r) || l.push(c); + } + return l; + })(e, Nt(t, 1, si, !0)) + : []; + }); + function ci(e) { + var t = null == e ? 0 : e.length; + return t ? e[t - 1] : void 0; + } + function fi(e, t, n) { + var r = null == e ? 0 : e.length; + return r + ? zt(e, (t = n || void 0 === t ? 1 : Q(t)) < 0 ? 0 : t, r) + : []; + } + function di(e, t, n) { + var r = null == e ? 0 : e.length; + return r + ? zt( + e, + 0, + (t = r - (t = n || void 0 === t ? 1 : Q(t))) < 0 ? 0 : t + ) + : []; + } + function hi(e, t) { + var n; + return (w(e) ? me : ni)(e, "function" == typeof (n = t) ? n : H); + } + function pi(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 vi(e, t) { + var n = !0; + return ( + ni(e, function (e, r, i) { + return (n = !!t(e, r, i)); + }), + n + ); + } + function mi(e, t, n) { + var r = w(e) ? pi : vi; + return n && Le(e, t, n) && (t = void 0), r(e, Jr(t)); + } + function gi(e, t) { + var n = []; + return ( + ni(e, function (e, r, i) { + t(e, r, i) && n.push(e); + }), + n + ); + } + function Ai(e, t) { + return (w(e) ? Yt : gi)(e, Jr(t)); + } + var yi = Math.max; + var bi, + xi = + ((bi = function (e, t, n) { + var r = null == e ? 0 : e.length; + if (!r) return -1; + var i = null == n ? 0 : Q(n); + return i < 0 && (i = yi(r + i, 0)), ge(e, Jr(t), i); + }), + function (e, t, n) { + var r = Object(e); + if (!Pe(e)) { + var i = Jr(t); + (e = st(e)), + (t = function (e) { + return i(r[e], e, r); + }); + } + var a = bi(e, t, n); + return a > -1 ? r[i ? e[a] : a] : void 0; + }); + function Si(e) { + return e && e.length ? e[0] : void 0; + } + function Ei(e, t) { + var n = -1, + r = Pe(e) ? Array(e.length) : []; + return ( + ni(e, function (e, i, a) { + r[++n] = t(e, i, a); + }), + r + ); + } + function _i(e, t) { + return (w(e) ? C : Ei)(e, Jr(t)); + } + function Ci(e, t) { + return Nt(_i(e, t), 1); + } + var wi, + Ti, + Mi = Object.prototype.hasOwnProperty, + Ii = + ((wi = function (e, t, n) { + Mi.call(e, n) ? e[n].push(t) : _e(e, n, [t]); + }), + function (e, t) { + var n = w(e) ? Kr : ri, + r = Ti ? Ti() : {}; + return n(e, wi, Jr(t), r); + }), + ki = Object.prototype.hasOwnProperty; + function Ri(e, t) { + return null != e && ki.call(e, t); + } + function Bi(e, t) { + return null != e && jr(e, t, Ri); + } + var Pi = "[object String]"; + function Li(e) { + return "string" == typeof e || (!w(e) && S(e) && x(e) == Pi); + } + function Di(e) { + return null == e + ? [] + : (function (e, t) { + return C(t, function (t) { + return e[t]; + }); + })(e, st(e)); + } + var Ui = Math.max; + function Fi(e, t, n, r) { + (e = Pe(e) ? e : Di(e)), (n = n && !r ? Q(n) : 0); + var i = e.length; + return ( + n < 0 && (n = Ui(i + n, 0)), + Li(e) ? n <= i && e.indexOf(t, n) > -1 : !!i && ye(e, t, n) > -1 + ); + } + var Oi = Math.max; + function Ni(e, t, n) { + var r = null == e ? 0 : e.length; + if (!r) return -1; + var i = null == n ? 0 : Q(n); + return i < 0 && (i = Oi(r + i, 0)), ye(e, t, i); + } + var Gi = "[object Map]", + Zi = "[object Set]", + zi = Object.prototype.hasOwnProperty; + function Qi(e) { + if (null == e) return !0; + if ( + Pe(e) && + (w(e) || + "string" == typeof e || + "function" == typeof e.splice || + je(e) || + et(e) || + ze(e)) + ) + return !e.length; + var t = yn(e); + if (t == Gi || t == Zi) return !e.size; + if (Ue(e)) return !ot(e).length; + for (var n in e) if (zi.call(e, n)) return !1; + return !0; + } + var Hi = Ke && Ke.isRegExp, + Vi = Hi + ? Xe(Hi) + : function (e) { + return S(e) && "[object RegExp]" == x(e); + }; + function ji(e) { + return void 0 === e; + } + var Wi = "Expected a function"; + function Xi(e, t, n, r) { + if (!L(e)) return e; + for ( + var i = -1, a = (t = Bt(t, e)).length, o = a - 1, s = e; + null != s && ++i < a; + + ) { + var l = Lt(t[i]), + u = n; + if ( + "__proto__" === l || + "constructor" === l || + "prototype" === l + ) + return e; + if (i != o) { + var c = s[l]; + void 0 === (u = r ? r(c, l, s) : void 0) && + (u = L(c) ? c : Ee(t[i + 1]) ? [] : {}); + } + Te(s, l, u), (s = s[l]); + } + return e; + } + function Yi(e, t) { + if (null == e) return {}; + var n = C(rn(e), function (e) { + return [e]; + }); + return ( + (t = Jr(t)), + (function (e, t, n) { + for (var r = -1, i = t.length, a = {}; ++r < i; ) { + var o = t[r], + s = Dt(e, o); + n(s, o) && Xi(a, Bt(o, e), s); + } + return a; + })(e, n, function (e, n) { + return t(e, n[0]); + }) + ); + } + function qi(e, t, n, r, i) { + return ( + i(e, function (e, i, a) { + n = r ? ((r = !1), e) : t(n, e, i, a); + }), + n + ); + } + function Ji(e, t, n) { + var r = w(e) ? Qt : qi, + i = arguments.length < 3; + return r(e, Jr(t), n, i, ni); + } + function Ki(e, t) { + return (w(e) ? Yt : gi)( + e, + (function (e) { + if ("function" != typeof e) throw new TypeError(Wi); + 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); + }; + })(Jr(t)) + ); + } + function $i(e, t) { + var n; + return ( + ni(e, function (e, r, i) { + return !(n = t(e, r, i)); + }), + !!n + ); + } + function ea(e, t, n) { + var r = w(e) ? ur : $i; + return n && Le(e, t, n) && (t = void 0), r(e, Jr(t)); + } + var ta = + sn && 1 / vr(new sn([, -0]))[1] == 1 / 0 + ? function (e) { + return new sn(e); + } + : fe, + na = 200; + function ra(e) { + return e && e.length + ? (function (e, t, n) { + var r = -1, + i = be, + a = e.length, + o = !0, + s = [], + l = s; + if (n) (o = !1), (i = li); + else if (a >= na) { + var u = t ? null : ta(e); + if (u) return vr(u); + (o = !1), (i = cr), (l = new lr()); + } else l = t ? [] : s; + e: for (; ++r < a; ) { + var c = e[r], + f = t ? t(c) : c; + if (((c = n || 0 !== c ? c : 0), o && f === f)) { + for (var d = l.length; d--; ) + if (l[d] === f) continue e; + t && l.push(f), s.push(c); + } else i(l, f, n) || (l !== s && l.push(f), s.push(c)); + } + return s; + })(e) + : []; + } + function ia(e) { + console && console.error && console.error("Error: ".concat(e)); + } + function aa(e) { + console && console.warn && console.warn("Warning: ".concat(e)); + } + function oa(e) { + var t = new Date().getTime(), + n = e(); + return { time: new Date().getTime() - t, value: n }; + } + function sa(e) { + function t() {} + t.prototype = e; + var n = new t(); + function r() { + return typeof n.bar; + } + return r(), r(), e; + } + function la(e) { + return Li((t = e).LABEL) && "" !== t.LABEL ? e.LABEL : e.name; + var t; + } + var ua = (function () { + function e(t) { + (0, p.Z)(this, e), (this._definition = t); + } + return ( + (0, v.Z)(e, [ + { + key: "definition", + get: function () { + return this._definition; + }, + set: function (e) { + this._definition = e; + }, + }, + { + key: "accept", + value: function (e) { + e.visit(this), + hi(this.definition, function (t) { + t.accept(e); + }); + }, + }, + ]), + e + ); + })(), + ca = (function (e) { + (0, m.Z)(n, e); + var t = (0, g.Z)(n); + function n(e) { + var r; + return ( + (0, p.Z)(this, n), + ((r = t.call(this, [])).idx = 1), + ct( + (0, f.Z)(r), + Yi(e, function (e) { + return void 0 !== e; + }) + ), + r + ); + } + return ( + (0, v.Z)(n, [ + { + key: "definition", + get: function () { + return void 0 !== this.referencedRule + ? this.referencedRule.definition + : []; + }, + set: function (e) {}, + }, + { + key: "accept", + value: function (e) { + e.visit(this); + }, + }, + ]), + n + ); + })(ua), + fa = (function (e) { + (0, m.Z)(n, e); + var t = (0, g.Z)(n); + function n(e) { + var r; + return ( + (0, p.Z)(this, n), + ((r = t.call(this, e.definition)).orgText = ""), + ct( + (0, f.Z)(r), + Yi(e, function (e) { + return void 0 !== e; + }) + ), + r + ); + } + return (0, v.Z)(n); + })(ua), + da = (function (e) { + (0, m.Z)(n, e); + var t = (0, g.Z)(n); + function n(e) { + var r; + return ( + (0, p.Z)(this, n), + ((r = t.call(this, e.definition)).ignoreAmbiguities = !1), + ct( + (0, f.Z)(r), + Yi(e, function (e) { + return void 0 !== e; + }) + ), + r + ); + } + return (0, v.Z)(n); + })(ua), + ha = (function (e) { + (0, m.Z)(n, e); + var t = (0, g.Z)(n); + function n(e) { + var r; + return ( + (0, p.Z)(this, n), + ((r = t.call(this, e.definition)).idx = 1), + ct( + (0, f.Z)(r), + Yi(e, function (e) { + return void 0 !== e; + }) + ), + r + ); + } + return (0, v.Z)(n); + })(ua), + pa = (function (e) { + (0, m.Z)(n, e); + var t = (0, g.Z)(n); + function n(e) { + var r; + return ( + (0, p.Z)(this, n), + ((r = t.call(this, e.definition)).idx = 1), + ct( + (0, f.Z)(r), + Yi(e, function (e) { + return void 0 !== e; + }) + ), + r + ); + } + return (0, v.Z)(n); + })(ua), + va = (function (e) { + (0, m.Z)(n, e); + var t = (0, g.Z)(n); + function n(e) { + var r; + return ( + (0, p.Z)(this, n), + ((r = t.call(this, e.definition)).idx = 1), + ct( + (0, f.Z)(r), + Yi(e, function (e) { + return void 0 !== e; + }) + ), + r + ); + } + return (0, v.Z)(n); + })(ua), + ma = (function (e) { + (0, m.Z)(n, e); + var t = (0, g.Z)(n); + function n(e) { + var r; + return ( + (0, p.Z)(this, n), + ((r = t.call(this, e.definition)).idx = 1), + ct( + (0, f.Z)(r), + Yi(e, function (e) { + return void 0 !== e; + }) + ), + r + ); + } + return (0, v.Z)(n); + })(ua), + ga = (function (e) { + (0, m.Z)(n, e); + var t = (0, g.Z)(n); + function n(e) { + var r; + return ( + (0, p.Z)(this, n), + ((r = t.call(this, e.definition)).idx = 1), + ct( + (0, f.Z)(r), + Yi(e, function (e) { + return void 0 !== e; + }) + ), + r + ); + } + return (0, v.Z)(n); + })(ua), + Aa = (function (e) { + (0, m.Z)(n, e); + var t = (0, g.Z)(n); + function n(e) { + var r; + return ( + (0, p.Z)(this, n), + ((r = t.call(this, e.definition)).idx = 1), + (r.ignoreAmbiguities = !1), + (r.hasPredicates = !1), + ct( + (0, f.Z)(r), + Yi(e, function (e) { + return void 0 !== e; + }) + ), + r + ); + } + return ( + (0, v.Z)(n, [ + { + key: "definition", + get: function () { + return this._definition; + }, + set: function (e) { + this._definition = e; + }, + }, + ]), + n + ); + })(ua), + ya = (function () { + function e(t) { + (0, p.Z)(this, e), + (this.idx = 1), + ct( + this, + Yi(t, function (e) { + return void 0 !== e; + }) + ); + } + return ( + (0, v.Z)(e, [ + { + key: "accept", + value: function (e) { + e.visit(this); + }, + }, + ]), + e + ); + })(); + function ba(e) { + function t(e) { + return _i(e, ba); + } + if (e instanceof ca) { + var n = { + type: "NonTerminal", + name: e.nonTerminalName, + idx: e.idx, + }; + return Li(e.label) && (n.label = e.label), n; + } + if (e instanceof da) + return { type: "Alternative", definition: t(e.definition) }; + if (e instanceof ha) + return { + type: "Option", + idx: e.idx, + definition: t(e.definition), + }; + if (e instanceof pa) + return { + type: "RepetitionMandatory", + idx: e.idx, + definition: t(e.definition), + }; + if (e instanceof va) + return { + type: "RepetitionMandatoryWithSeparator", + idx: e.idx, + separator: ba(new ya({ terminalType: e.separator })), + definition: t(e.definition), + }; + if (e instanceof ga) + return { + type: "RepetitionWithSeparator", + idx: e.idx, + separator: ba(new ya({ terminalType: e.separator })), + definition: t(e.definition), + }; + if (e instanceof ma) + return { + type: "Repetition", + idx: e.idx, + definition: t(e.definition), + }; + if (e instanceof Aa) + return { + type: "Alternation", + idx: e.idx, + definition: t(e.definition), + }; + if (e instanceof ya) { + var r = { + type: "Terminal", + name: e.terminalType.name, + label: la(e.terminalType), + idx: e.idx, + }; + Li(e.label) && (r.terminalLabel = e.label); + var i = e.terminalType.PATTERN; + return ( + e.terminalType.PATTERN && (r.pattern = Vi(i) ? i.source : i), + r + ); + } + if (e instanceof fa) + return { + type: "Rule", + name: e.name, + orgText: e.orgText, + definition: t(e.definition), + }; + throw Error("non exhaustive match"); + } + var xa = (function () { + function e() { + (0, p.Z)(this, e); + } + return ( + (0, v.Z)(e, [ + { + key: "visit", + value: function (e) { + var t = e; + switch (t.constructor) { + case ca: + return this.visitNonTerminal(t); + case da: + return this.visitAlternative(t); + case ha: + return this.visitOption(t); + case pa: + return this.visitRepetitionMandatory(t); + case va: + return this.visitRepetitionMandatoryWithSeparator(t); + case ga: + return this.visitRepetitionWithSeparator(t); + case ma: + return this.visitRepetition(t); + case Aa: + return this.visitAlternation(t); + case ya: + return this.visitTerminal(t); + case fa: + return this.visitRule(t); + default: + throw Error("non exhaustive match"); + } + }, + }, + { key: "visitNonTerminal", value: function (e) {} }, + { key: "visitAlternative", value: function (e) {} }, + { key: "visitOption", value: function (e) {} }, + { key: "visitRepetition", value: function (e) {} }, + { key: "visitRepetitionMandatory", value: function (e) {} }, + { + key: "visitRepetitionMandatoryWithSeparator", + value: function (e) {}, + }, + { + key: "visitRepetitionWithSeparator", + value: function (e) {}, + }, + { key: "visitAlternation", value: function (e) {} }, + { key: "visitTerminal", value: function (e) {} }, + { key: "visitRule", value: function (e) {} }, + ]), + e + ); + })(); + function Sa(e) { + var t = + arguments.length > 1 && void 0 !== arguments[1] + ? arguments[1] + : []; + return ( + !!(e instanceof ha || e instanceof ma || e instanceof ga) || + (e instanceof Aa + ? ea(e.definition, function (e) { + return Sa(e, t); + }) + : !(e instanceof ca && Fi(t, e)) && + e instanceof ua && + (e instanceof ca && t.push(e), + mi(e.definition, function (e) { + return Sa(e, t); + }))) + ); + } + function Ea(e) { + if (e instanceof ca) return "SUBRULE"; + if (e instanceof ha) return "OPTION"; + if (e instanceof Aa) return "OR"; + if (e instanceof pa) return "AT_LEAST_ONE"; + if (e instanceof va) return "AT_LEAST_ONE_SEP"; + if (e instanceof ga) return "MANY_SEP"; + if (e instanceof ma) return "MANY"; + if (e instanceof ya) return "CONSUME"; + throw Error("non exhaustive match"); + } + var _a = (function () { + function e() { + (0, p.Z)(this, e); + } + return ( + (0, v.Z)(e, [ + { + key: "walk", + value: function (e) { + var t = this, + n = + arguments.length > 1 && void 0 !== arguments[1] + ? arguments[1] + : []; + hi(e.definition, function (r, i) { + var a = fi(e.definition, i + 1); + if (r instanceof ca) t.walkProdRef(r, a, n); + else if (r instanceof ya) t.walkTerminal(r, a, n); + else if (r instanceof da) t.walkFlat(r, a, n); + else if (r instanceof ha) t.walkOption(r, a, n); + else if (r instanceof pa) t.walkAtLeastOne(r, a, n); + else if (r instanceof va) t.walkAtLeastOneSep(r, a, n); + else if (r instanceof ga) t.walkManySep(r, a, n); + else if (r instanceof ma) t.walkMany(r, a, n); + else { + if (!(r instanceof Aa)) + throw Error("non exhaustive match"); + t.walkOr(r, a, n); + } + }); + }, + }, + { key: "walkTerminal", value: function (e, t, n) {} }, + { key: "walkProdRef", value: function (e, t, n) {} }, + { + key: "walkFlat", + value: function (e, t, n) { + var r = t.concat(n); + this.walk(e, r); + }, + }, + { + key: "walkOption", + value: function (e, t, n) { + var r = t.concat(n); + this.walk(e, r); + }, + }, + { + key: "walkAtLeastOne", + value: function (e, t, n) { + var r = [new ha({ definition: e.definition })].concat( + t, + n + ); + this.walk(e, r); + }, + }, + { + key: "walkAtLeastOneSep", + value: function (e, t, n) { + var r = Ca(e, t, n); + this.walk(e, r); + }, + }, + { + key: "walkMany", + value: function (e, t, n) { + var r = [new ha({ definition: e.definition })].concat( + t, + n + ); + this.walk(e, r); + }, + }, + { + key: "walkManySep", + value: function (e, t, n) { + var r = Ca(e, t, n); + this.walk(e, r); + }, + }, + { + key: "walkOr", + value: function (e, t, n) { + var r = this, + i = t.concat(n); + hi(e.definition, function (e) { + var t = new da({ definition: [e] }); + r.walk(t, i); + }); + }, + }, + ]), + e + ); + })(); + function Ca(e, t, n) { + return [ + new ha({ + definition: [new ya({ terminalType: e.separator })].concat( + e.definition + ), + }), + ].concat(t, n); + } + function wa(e) { + if (e instanceof ca) return wa(e.referencedRule); + if (e instanceof ya) return [e.terminalType]; + if ( + (function (e) { + return ( + e instanceof da || + e instanceof ha || + e instanceof ma || + e instanceof pa || + e instanceof va || + e instanceof ga || + e instanceof ya || + e instanceof fa + ); + })(e) + ) + return (function (e) { + var t, + n = [], + r = e.definition, + i = 0, + a = r.length > i, + o = !0; + for (; a && o; ) + (o = Sa((t = r[i]))), + (n = n.concat(wa(t))), + (i += 1), + (a = r.length > i); + return ra(n); + })(e); + if ( + (function (e) { + return e instanceof Aa; + })(e) + ) + return (function (e) { + var t = _i(e.definition, function (e) { + return wa(e); + }); + return ra(Gt(t)); + })(e); + throw Error("non exhaustive match"); + } + var Ta = "_~IN~_", + Ma = (function (e) { + (0, m.Z)(n, e); + var t = (0, g.Z)(n); + function n(e) { + var r; + return ( + (0, p.Z)(this, n), + ((r = t.call(this)).topProd = e), + (r.follows = {}), + r + ); + } + return ( + (0, v.Z)(n, [ + { + key: "startWalking", + value: function () { + return this.walk(this.topProd), this.follows; + }, + }, + { key: "walkTerminal", value: function (e, t, n) {} }, + { + key: "walkProdRef", + value: function (e, t, n) { + var r, + i, + a = + ((r = e.referencedRule), + (i = e.idx), + r.name + i + Ta + this.topProd.name), + o = t.concat(n), + s = wa(new da({ definition: o })); + this.follows[a] = s; + }, + }, + ]), + n + ); + })(_a); + function Ia(e) { + return e.charCodeAt(0); + } + function ka(e, t) { + Array.isArray(e) + ? e.forEach(function (e) { + t.push(e); + }) + : t.push(e); + } + function Ra(e, t) { + if (!0 === e[t]) throw "duplicate flag " + t; + e[t], (e[t] = !0); + } + function Ba(e) { + if (void 0 === e) + throw Error("Internal Error - Should never get here!"); + return !0; + } + function Pa(e) { + return "Character" === e.type; + } + for (var La = [], Da = Ia("0"); Da <= Ia("9"); Da++) La.push(Da); + for ( + var Ua = [Ia("_")].concat(La), Fa = Ia("a"); + Fa <= Ia("z"); + Fa++ + ) + Ua.push(Fa); + for (var Oa = Ia("A"); Oa <= Ia("Z"); Oa++) Ua.push(Oa); + var Na = [ + Ia(" "), + Ia("\f"), + Ia("\n"), + Ia("\r"), + Ia("\t"), + Ia("\v"), + Ia("\t"), + Ia("\xa0"), + Ia("\u1680"), + Ia("\u2000"), + Ia("\u2001"), + Ia("\u2002"), + Ia("\u2003"), + Ia("\u2004"), + Ia("\u2005"), + Ia("\u2006"), + Ia("\u2007"), + Ia("\u2008"), + Ia("\u2009"), + Ia("\u200a"), + Ia("\u2028"), + Ia("\u2029"), + Ia("\u202f"), + Ia("\u205f"), + Ia("\u3000"), + Ia("\ufeff"), + ], + Ga = /[0-9a-fA-F]/, + Za = /[0-9]/, + za = /[1-9]/, + Qa = (function () { + function e() { + (0, p.Z)(this, e), + (this.idx = 0), + (this.input = ""), + (this.groupIdx = 0); + } + return ( + (0, v.Z)(e, [ + { + key: "saveState", + value: function () { + return { + idx: this.idx, + input: this.input, + groupIdx: this.groupIdx, + }; + }, + }, + { + key: "restoreState", + value: function (e) { + (this.idx = e.idx), + (this.input = e.input), + (this.groupIdx = e.groupIdx); + }, + }, + { + key: "pattern", + value: function (e) { + (this.idx = 0), + (this.input = e), + (this.groupIdx = 0), + this.consumeChar("/"); + var t = this.disjunction(); + this.consumeChar("/"); + for ( + var n = { + type: "Flags", + loc: { begin: this.idx, end: e.length }, + global: !1, + ignoreCase: !1, + multiLine: !1, + unicode: !1, + sticky: !1, + }; + this.isRegExpFlag(); + + ) + switch (this.popChar()) { + case "g": + Ra(n, "global"); + break; + case "i": + Ra(n, "ignoreCase"); + break; + case "m": + Ra(n, "multiLine"); + break; + case "u": + Ra(n, "unicode"); + break; + case "y": + Ra(n, "sticky"); + } + if (this.idx !== this.input.length) + throw Error( + "Redundant input: " + this.input.substring(this.idx) + ); + return { + type: "Pattern", + flags: n, + value: t, + loc: this.loc(0), + }; + }, + }, + { + key: "disjunction", + value: function () { + var e = [], + t = this.idx; + for ( + e.push(this.alternative()); + "|" === this.peekChar(); + + ) + this.consumeChar("|"), e.push(this.alternative()); + return { + type: "Disjunction", + value: e, + loc: this.loc(t), + }; + }, + }, + { + key: "alternative", + value: function () { + for (var e = [], t = this.idx; this.isTerm(); ) + e.push(this.term()); + return { + type: "Alternative", + value: e, + loc: this.loc(t), + }; + }, + }, + { + key: "term", + value: function () { + return this.isAssertion() + ? this.assertion() + : this.atom(); + }, + }, + { + key: "assertion", + value: function () { + var e = this.idx; + switch (this.popChar()) { + case "^": + return { type: "StartAnchor", loc: this.loc(e) }; + case "$": + return { type: "EndAnchor", loc: this.loc(e) }; + case "\\": + switch (this.popChar()) { + case "b": + return { + type: "WordBoundary", + loc: this.loc(e), + }; + case "B": + return { + type: "NonWordBoundary", + loc: this.loc(e), + }; + } + throw Error("Invalid Assertion Escape"); + case "(": + var t; + switch ((this.consumeChar("?"), this.popChar())) { + case "=": + t = "Lookahead"; + break; + case "!": + t = "NegativeLookahead"; + } + Ba(t); + var n = this.disjunction(); + return ( + this.consumeChar(")"), + { type: t, value: n, loc: this.loc(e) } + ); + } + return (function () { + throw Error( + "Internal Error - Should never get here!" + ); + })(); + }, + }, + { + key: "quantifier", + value: function () { + var e = + arguments.length > 0 && + void 0 !== arguments[0] && + arguments[0], + t = void 0, + n = this.idx; + switch (this.popChar()) { + case "*": + t = { atLeast: 0, atMost: 1 / 0 }; + break; + case "+": + t = { atLeast: 1, atMost: 1 / 0 }; + break; + case "?": + t = { atLeast: 0, atMost: 1 }; + break; + case "{": + var r = this.integerIncludingZero(); + switch (this.popChar()) { + case "}": + t = { atLeast: r, atMost: r }; + break; + case ",": + (t = this.isDigit() + ? { + atLeast: r, + atMost: this.integerIncludingZero(), + } + : { atLeast: r, atMost: 1 / 0 }), + this.consumeChar("}"); + } + if (!0 === e && void 0 === t) return; + Ba(t); + } + if (!0 !== e || void 0 !== t) + return Ba(t) + ? ("?" === this.peekChar(0) + ? (this.consumeChar("?"), (t.greedy = !1)) + : (t.greedy = !0), + (t.type = "Quantifier"), + (t.loc = this.loc(n)), + t) + : void 0; + }, + }, + { + key: "atom", + value: function () { + var e, + t = this.idx; + switch (this.peekChar()) { + case ".": + e = this.dotAll(); + break; + case "\\": + e = this.atomEscape(); + break; + case "[": + e = this.characterClass(); + break; + case "(": + e = this.group(); + } + if ( + (void 0 === e && + this.isPatternCharacter() && + (e = this.patternCharacter()), + Ba(e)) + ) + return ( + (e.loc = this.loc(t)), + this.isQuantifier() && + (e.quantifier = this.quantifier()), + e + ); + }, + }, + { + key: "dotAll", + value: function () { + return ( + this.consumeChar("."), + { + type: "Set", + complement: !0, + value: [ + Ia("\n"), + Ia("\r"), + Ia("\u2028"), + Ia("\u2029"), + ], + } + ); + }, + }, + { + key: "atomEscape", + value: function () { + switch ((this.consumeChar("\\"), this.peekChar())) { + case "1": + case "2": + case "3": + case "4": + case "5": + case "6": + case "7": + case "8": + case "9": + return this.decimalEscapeAtom(); + case "d": + case "D": + case "s": + case "S": + case "w": + case "W": + return this.characterClassEscape(); + case "f": + case "n": + case "r": + case "t": + case "v": + return this.controlEscapeAtom(); + case "c": + return this.controlLetterEscapeAtom(); + case "0": + return this.nulCharacterAtom(); + case "x": + return this.hexEscapeSequenceAtom(); + case "u": + return this.regExpUnicodeEscapeSequenceAtom(); + default: + return this.identityEscapeAtom(); + } + }, + }, + { + key: "decimalEscapeAtom", + value: function () { + return { + type: "GroupBackReference", + value: this.positiveInteger(), + }; + }, + }, + { + key: "characterClassEscape", + value: function () { + var e, + t = !1; + switch (this.popChar()) { + case "d": + e = La; + break; + case "D": + (e = La), (t = !0); + break; + case "s": + e = Na; + break; + case "S": + (e = Na), (t = !0); + break; + case "w": + e = Ua; + break; + case "W": + (e = Ua), (t = !0); + } + if (Ba(e)) + return { type: "Set", value: e, complement: t }; + }, + }, + { + key: "controlEscapeAtom", + value: function () { + var e; + switch (this.popChar()) { + case "f": + e = Ia("\f"); + break; + case "n": + e = Ia("\n"); + break; + case "r": + e = Ia("\r"); + break; + case "t": + e = Ia("\t"); + break; + case "v": + e = Ia("\v"); + } + if (Ba(e)) return { type: "Character", value: e }; + }, + }, + { + key: "controlLetterEscapeAtom", + value: function () { + this.consumeChar("c"); + var e = this.popChar(); + if (!1 === /[a-zA-Z]/.test(e)) throw Error("Invalid "); + return { + type: "Character", + value: e.toUpperCase().charCodeAt(0) - 64, + }; + }, + }, + { + key: "nulCharacterAtom", + value: function () { + return ( + this.consumeChar("0"), + { type: "Character", value: Ia("\0") } + ); + }, + }, + { + key: "hexEscapeSequenceAtom", + value: function () { + return this.consumeChar("x"), this.parseHexDigits(2); + }, + }, + { + key: "regExpUnicodeEscapeSequenceAtom", + value: function () { + return this.consumeChar("u"), this.parseHexDigits(4); + }, + }, + { + key: "identityEscapeAtom", + value: function () { + return { type: "Character", value: Ia(this.popChar()) }; + }, + }, + { + key: "classPatternCharacterAtom", + value: function () { + switch (this.peekChar()) { + case "\n": + case "\r": + case "\u2028": + case "\u2029": + case "\\": + case "]": + throw Error("TBD"); + default: + return { + type: "Character", + value: Ia(this.popChar()), + }; + } + }, + }, + { + key: "characterClass", + value: function () { + var e = [], + t = !1; + for ( + this.consumeChar("["), + "^" === this.peekChar(0) && + (this.consumeChar("^"), (t = !0)); + this.isClassAtom(); + + ) { + var n = this.classAtom(); + if ((n.type, Pa(n) && this.isRangeDash())) { + this.consumeChar("-"); + var r = this.classAtom(); + if ((r.type, Pa(r))) { + if (r.value < n.value) + throw Error( + "Range out of order in character class" + ); + e.push({ from: n.value, to: r.value }); + } else + ka(n.value, e), e.push(Ia("-")), ka(r.value, e); + } else ka(n.value, e); + } + return ( + this.consumeChar("]"), + { type: "Set", complement: t, value: e } + ); + }, + }, + { + key: "classAtom", + value: function () { + switch (this.peekChar()) { + case "]": + case "\n": + case "\r": + case "\u2028": + case "\u2029": + throw Error("TBD"); + case "\\": + return this.classEscape(); + default: + return this.classPatternCharacterAtom(); + } + }, + }, + { + key: "classEscape", + value: function () { + switch ((this.consumeChar("\\"), this.peekChar())) { + case "b": + return ( + this.consumeChar("b"), + { type: "Character", value: Ia("\b") } + ); + case "d": + case "D": + case "s": + case "S": + case "w": + case "W": + return this.characterClassEscape(); + case "f": + case "n": + case "r": + case "t": + case "v": + return this.controlEscapeAtom(); + case "c": + return this.controlLetterEscapeAtom(); + case "0": + return this.nulCharacterAtom(); + case "x": + return this.hexEscapeSequenceAtom(); + case "u": + return this.regExpUnicodeEscapeSequenceAtom(); + default: + return this.identityEscapeAtom(); + } + }, + }, + { + key: "group", + value: function () { + var e = !0; + if ((this.consumeChar("("), "?" === this.peekChar(0))) + this.consumeChar("?"), + this.consumeChar(":"), + (e = !1); + else this.groupIdx++; + var t = this.disjunction(); + this.consumeChar(")"); + var n = { type: "Group", capturing: e, value: t }; + return e && (n.idx = this.groupIdx), n; + }, + }, + { + key: "positiveInteger", + value: function () { + var e = this.popChar(); + if (!1 === za.test(e)) + throw Error("Expecting a positive integer"); + for (; Za.test(this.peekChar(0)); ) e += this.popChar(); + return parseInt(e, 10); + }, + }, + { + key: "integerIncludingZero", + value: function () { + var e = this.popChar(); + if (!1 === Za.test(e)) + throw Error("Expecting an integer"); + for (; Za.test(this.peekChar(0)); ) e += this.popChar(); + return parseInt(e, 10); + }, + }, + { + key: "patternCharacter", + value: function () { + var e = this.popChar(); + switch (e) { + case "\n": + case "\r": + case "\u2028": + case "\u2029": + case "^": + case "$": + case "\\": + case ".": + case "*": + case "+": + case "?": + case "(": + case ")": + case "[": + case "|": + throw Error("TBD"); + default: + return { type: "Character", value: Ia(e) }; + } + }, + }, + { + key: "isRegExpFlag", + value: function () { + switch (this.peekChar(0)) { + case "g": + case "i": + case "m": + case "u": + case "y": + return !0; + default: + return !1; + } + }, + }, + { + key: "isRangeDash", + value: function () { + return "-" === this.peekChar() && this.isClassAtom(1); + }, + }, + { + key: "isDigit", + value: function () { + return Za.test(this.peekChar(0)); + }, + }, + { + key: "isClassAtom", + value: function () { + var e = + arguments.length > 0 && void 0 !== arguments[0] + ? arguments[0] + : 0; + switch (this.peekChar(e)) { + case "]": + case "\n": + case "\r": + case "\u2028": + case "\u2029": + return !1; + default: + return !0; + } + }, + }, + { + key: "isTerm", + value: function () { + return this.isAtom() || this.isAssertion(); + }, + }, + { + key: "isAtom", + value: function () { + if (this.isPatternCharacter()) return !0; + switch (this.peekChar(0)) { + case ".": + case "\\": + case "[": + case "(": + return !0; + default: + return !1; + } + }, + }, + { + key: "isAssertion", + value: function () { + switch (this.peekChar(0)) { + case "^": + case "$": + return !0; + case "\\": + switch (this.peekChar(1)) { + case "b": + case "B": + return !0; + default: + return !1; + } + case "(": + return ( + "?" === this.peekChar(1) && + ("=" === this.peekChar(2) || + "!" === this.peekChar(2)) + ); + default: + return !1; + } + }, + }, + { + key: "isQuantifier", + value: function () { + var e = this.saveState(); + try { + return void 0 !== this.quantifier(!0); + } catch (t) { + return !1; + } finally { + this.restoreState(e); + } + }, + }, + { + key: "isPatternCharacter", + value: function () { + switch (this.peekChar()) { + case "^": + case "$": + case "\\": + case ".": + case "*": + case "+": + case "?": + case "(": + case ")": + case "[": + case "|": + case "/": + case "\n": + case "\r": + case "\u2028": + case "\u2029": + return !1; + default: + return !0; + } + }, + }, + { + key: "parseHexDigits", + value: function (e) { + for (var t = "", n = 0; n < e; n++) { + var r = this.popChar(); + if (!1 === Ga.test(r)) + throw Error("Expecting a HexDecimal digits"); + t += r; + } + return { type: "Character", value: parseInt(t, 16) }; + }, + }, + { + key: "peekChar", + value: function () { + var e = + arguments.length > 0 && void 0 !== arguments[0] + ? arguments[0] + : 0; + return this.input[this.idx + e]; + }, + }, + { + key: "popChar", + value: function () { + var e = this.peekChar(0); + return this.consumeChar(void 0), e; + }, + }, + { + key: "consumeChar", + value: function (e) { + if (void 0 !== e && this.input[this.idx] !== e) + throw Error( + "Expected: '" + + e + + "' but found: '" + + this.input[this.idx] + + "' at offset: " + + this.idx + ); + if (this.idx >= this.input.length) + throw Error("Unexpected end of input"); + this.idx++; + }, + }, + { + key: "loc", + value: function (e) { + return { begin: e, end: this.idx }; + }, + }, + ]), + e + ); + })(), + Ha = (function () { + function e() { + (0, p.Z)(this, e); + } + return ( + (0, v.Z)(e, [ + { + key: "visitChildren", + value: function (e) { + var t = this; + for (var n in e) { + var r = e[n]; + e.hasOwnProperty(n) && + (void 0 !== r.type + ? this.visit(r) + : Array.isArray(r) && + r.forEach(function (e) { + t.visit(e); + }, this)); + } + }, + }, + { + key: "visit", + value: function (e) { + switch (e.type) { + case "Pattern": + this.visitPattern(e); + break; + case "Flags": + this.visitFlags(e); + break; + case "Disjunction": + this.visitDisjunction(e); + break; + case "Alternative": + this.visitAlternative(e); + break; + case "StartAnchor": + this.visitStartAnchor(e); + break; + case "EndAnchor": + this.visitEndAnchor(e); + break; + case "WordBoundary": + this.visitWordBoundary(e); + break; + case "NonWordBoundary": + this.visitNonWordBoundary(e); + break; + case "Lookahead": + this.visitLookahead(e); + break; + case "NegativeLookahead": + this.visitNegativeLookahead(e); + break; + case "Character": + this.visitCharacter(e); + break; + case "Set": + this.visitSet(e); + break; + case "Group": + this.visitGroup(e); + break; + case "GroupBackReference": + this.visitGroupBackReference(e); + break; + case "Quantifier": + this.visitQuantifier(e); + } + this.visitChildren(e); + }, + }, + { key: "visitPattern", value: function (e) {} }, + { key: "visitFlags", value: function (e) {} }, + { key: "visitDisjunction", value: function (e) {} }, + { key: "visitAlternative", value: function (e) {} }, + { key: "visitStartAnchor", value: function (e) {} }, + { key: "visitEndAnchor", value: function (e) {} }, + { key: "visitWordBoundary", value: function (e) {} }, + { key: "visitNonWordBoundary", value: function (e) {} }, + { key: "visitLookahead", value: function (e) {} }, + { key: "visitNegativeLookahead", value: function (e) {} }, + { key: "visitCharacter", value: function (e) {} }, + { key: "visitSet", value: function (e) {} }, + { key: "visitGroup", value: function (e) {} }, + { key: "visitGroupBackReference", value: function (e) {} }, + { key: "visitQuantifier", value: function (e) {} }, + ]), + e + ); + })(), + Va = {}, + ja = new Qa(); + function Wa(e) { + var t = e.toString(); + if (Va.hasOwnProperty(t)) return Va[t]; + var n = ja.pattern(t); + return (Va[t] = n), n; + } + var Xa = + "Complement Sets are not supported for first char optimization", + Ya = 'Unable to use "first char" lexer optimizations:\n'; + function qa(e) { + var t = + arguments.length > 1 && void 0 !== arguments[1] && arguments[1]; + try { + var n = Wa(e); + return Ja(n.value, {}, n.flags.ignoreCase); + } catch (i) { + if (i.message === Xa) + t && + aa( + "" + .concat(Ya, "\tUnable to optimize: < ") + .concat( + e.toString(), + " >\n\tComplement Sets cannot be automatically optimized.\n\tThis will disable the lexer's first char optimizations.\n\tSee: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#COMPLEMENT for details." + ) + ); + else { + var r = ""; + t && + (r = + "\n\tThis will disable the lexer's first char optimizations.\n\tSee: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#REGEXP_PARSING for details."), + ia( + "" + .concat(Ya, "\n\tFailed parsing: < ") + .concat( + e.toString(), + " >\n\tUsing the @chevrotain/regexp-to-ast library\n\tPlease open an issue at: https://github.com/chevrotain/chevrotain/issues" + ) + r + ); + } + } + return []; + } + function Ja(e, t, n) { + switch (e.type) { + case "Disjunction": + for (var r = 0; r < e.value.length; r++) Ja(e.value[r], t, n); + break; + case "Alternative": + for (var i = e.value, a = 0; a < i.length; a++) { + var o = i[a]; + switch (o.type) { + case "EndAnchor": + case "GroupBackReference": + case "Lookahead": + case "NegativeLookahead": + case "StartAnchor": + case "WordBoundary": + case "NonWordBoundary": + continue; + } + var s = o; + switch (s.type) { + case "Character": + Ka(s.value, t, n); + break; + case "Set": + if (!0 === s.complement) throw Error(Xa); + hi(s.value, function (e) { + if ("number" === typeof e) Ka(e, t, n); + else { + var r = e; + if (!0 === n) + for (var i = r.from; i <= r.to; i++) Ka(i, t, n); + else { + for (var a = r.from; a <= r.to && a < xo; a++) + Ka(a, t, n); + if (r.to >= xo) + for ( + var o = r.from >= xo ? r.from : xo, + s = r.to, + l = Eo(o), + u = Eo(s), + c = l; + c <= u; + c++ + ) + t[c] = c; + } + } + }); + break; + case "Group": + Ja(s.value, t, n); + break; + default: + throw Error("Non Exhaustive Match"); + } + var l = + void 0 !== s.quantifier && 0 === s.quantifier.atLeast; + if ( + ("Group" === s.type && !1 === eo(s)) || + ("Group" !== s.type && !1 === l) + ) + break; + } + break; + default: + throw Error("non exhaustive match!"); + } + return Di(t); + } + function Ka(e, t, n) { + var r = Eo(e); + (t[r] = r), + !0 === n && + (function (e, t) { + var n = String.fromCharCode(e), + r = n.toUpperCase(); + if (r !== n) { + var i = Eo(r.charCodeAt(0)); + t[i] = i; + } else { + var a = n.toLowerCase(); + if (a !== n) { + var o = Eo(a.charCodeAt(0)); + t[o] = o; + } + } + })(e, t); + } + function $a(e, t) { + return xi(e.value, function (e) { + if ("number" === typeof e) return Fi(t, e); + var n = e; + return ( + void 0 !== + xi(t, function (e) { + return n.from <= e && e <= n.to; + }) + ); + }); + } + function eo(e) { + var t = e.quantifier; + return ( + !(!t || 0 !== t.atLeast) || + (!!e.value && (w(e.value) ? mi(e.value, eo) : eo(e.value))) + ); + } + var to = (function (e) { + (0, m.Z)(n, e); + var t = (0, g.Z)(n); + function n(e) { + var r; + return ( + (0, p.Z)(this, n), + ((r = t.call(this)).targetCharCodes = e), + (r.found = !1), + r + ); + } + return ( + (0, v.Z)(n, [ + { + key: "visitChildren", + value: function (e) { + if (!0 !== this.found) { + switch (e.type) { + case "Lookahead": + return void this.visitLookahead(e); + case "NegativeLookahead": + return void this.visitNegativeLookahead(e); + } + (0, d.Z)( + (0, h.Z)(n.prototype), + "visitChildren", + this + ).call(this, e); + } + }, + }, + { + key: "visitCharacter", + value: function (e) { + Fi(this.targetCharCodes, e.value) && (this.found = !0); + }, + }, + { + key: "visitSet", + value: function (e) { + e.complement + ? void 0 === $a(e, this.targetCharCodes) && + (this.found = !0) + : void 0 !== $a(e, this.targetCharCodes) && + (this.found = !0); + }, + }, + ]), + n + ); + })(Ha); + function no(e, t) { + if (t instanceof RegExp) { + var n = Wa(t), + r = new to(e); + return r.visit(n), r.found; + } + return ( + void 0 !== + xi(t, function (t) { + return Fi(e, t.charCodeAt(0)); + }) + ); + } + var ro = "PATTERN", + io = "defaultMode", + ao = "modes", + oo = "boolean" === typeof new RegExp("(?:)").sticky; + function so(e, t) { + var n, + r = (t = oi(t, { + useSticky: oo, + debug: !1, + safeMode: !1, + positionTracking: "full", + lineTerminatorCharacters: ["\r", "\n"], + tracer: function (e, t) { + return t(); + }, + })).tracer; + r("initCharCodeToOptimizedIndexMap", function () { + !(function () { + if (Qi(So)) { + So = new Array(65536); + for (var e = 0; e < 65536; e++) + So[e] = e > 255 ? 255 + ~~(e / 255) : e; + } + })(); + }), + r("Reject Lexer.NA", function () { + n = Ki(e, function (e) { + return e[ro] === Uo.NA; + }); + }); + var i, + a, + o, + s, + l, + u, + c, + f, + d, + h, + p, + v = !1; + r("Transform Patterns", function () { + (v = !1), + (i = _i(n, function (e) { + var n = e[ro]; + if (Vi(n)) { + var r = n.source; + return 1 !== r.length || + "^" === r || + "$" === r || + "." === r || + n.ignoreCase + ? 2 !== r.length || + "\\" !== r[0] || + Fi( + [ + "d", + "D", + "s", + "S", + "t", + "r", + "n", + "t", + "0", + "c", + "b", + "B", + "f", + "v", + "w", + "W", + ], + r[1] + ) + ? t.useSticky + ? ho(n) + : fo(n) + : r[1] + : r; + } + if (Y(n)) return (v = !0), { exec: n }; + if ("object" === typeof n) return (v = !0), n; + if ("string" === typeof n) { + if (1 === n.length) return n; + var i = n.replace(/[\\^$.*+?()[\]{}|]/g, "\\$&"), + a = new RegExp(i); + return t.useSticky ? ho(a) : fo(a); + } + throw Error("non exhaustive match"); + })); + }), + r("misc mapping", function () { + (a = _i(n, function (e) { + return e.tokenTypeIdx; + })), + (o = _i(n, function (e) { + var t = e.GROUP; + if (t !== Uo.SKIPPED) { + if (Li(t)) return t; + if (ji(t)) return !1; + throw Error("non exhaustive match"); + } + })), + (s = _i(n, function (e) { + var t = e.LONGER_ALT; + if (t) + return w(t) + ? _i(t, function (e) { + return Ni(n, e); + }) + : [Ni(n, t)]; + })), + (l = _i(n, function (e) { + return e.PUSH_MODE; + })), + (u = _i(n, function (e) { + return Bi(e, "POP_MODE"); + })); + }), + r("Line Terminator Handling", function () { + var e = yo(t.lineTerminatorCharacters); + (c = _i(n, function (e) { + return !1; + })), + "onlyOffset" !== t.positionTracking && + (c = _i(n, function (t) { + return Bi(t, "LINE_BREAKS") + ? !!t.LINE_BREAKS + : !1 === Ao(t, e) && no(e, t.PATTERN); + })); + }), + r("Misc Mapping #2", function () { + (f = _i(n, vo)), + (d = _i(i, mo)), + (h = Ji( + n, + function (e, t) { + var n = t.GROUP; + return Li(n) && n !== Uo.SKIPPED && (e[n] = []), e; + }, + {} + )), + (p = _i(i, function (e, t) { + return { + pattern: i[t], + longerAlt: s[t], + canLineTerminator: c[t], + isCustom: f[t], + short: d[t], + group: o[t], + push: l[t], + pop: u[t], + tokenTypeIdx: a[t], + tokenType: n[t], + }; + })); + }); + var m = !0, + g = []; + return ( + t.safeMode || + r("First Char Optimization", function () { + g = Ji( + n, + function (e, n, r) { + if ("string" === typeof n.PATTERN) { + var i = Eo(n.PATTERN.charCodeAt(0)); + bo(e, i, p[r]); + } else if (w(n.START_CHARS_HINT)) { + var a; + hi(n.START_CHARS_HINT, function (t) { + var n = Eo( + "string" === typeof t ? t.charCodeAt(0) : t + ); + a !== n && ((a = n), bo(e, n, p[r])); + }); + } else if (Vi(n.PATTERN)) + if (n.PATTERN.unicode) + (m = !1), + t.ensureOptimizations && + ia( + "" + .concat(Ya, "\tUnable to analyze < ") + .concat( + n.PATTERN.toString(), + " > pattern.\n\tThe regexp unicode flag is not currently supported by the regexp-to-ast library.\n\tThis will disable the lexer's first char optimizations.\n\tFor details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#UNICODE_OPTIMIZE" + ) + ); + else { + var o = qa(n.PATTERN, t.ensureOptimizations); + Qi(o) && (m = !1), + hi(o, function (t) { + bo(e, t, p[r]); + }); + } + else + t.ensureOptimizations && + ia( + "" + .concat(Ya, "\tTokenType: <") + .concat( + n.name, + "> is using a custom token pattern without providing parameter.\n\tThis will disable the lexer's first char optimizations.\n\tFor details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#CUSTOM_OPTIMIZE" + ) + ), + (m = !1); + return e; + }, + [] + ); + }), + { + emptyGroups: h, + patternIdxToConfig: p, + charCodeToPatternIdxToConfig: g, + hasCustom: v, + canBeOptimized: m, + } + ); + } + function lo(e, t) { + var n = [], + r = (function (e) { + var t = Ai(e, function (e) { + return !Bi(e, ro); + }), + n = _i(t, function (e) { + return { + message: + "Token Type: ->" + + e.name + + "<- missing static 'PATTERN' property", + type: Po.MISSING_PATTERN, + tokenTypes: [e], + }; + }), + r = ui(e, t); + return { errors: n, valid: r }; + })(e); + n = n.concat(r.errors); + var i = (function (e) { + var t = Ai(e, function (e) { + var t = e[ro]; + return !Vi(t) && !Y(t) && !Bi(t, "exec") && !Li(t); + }), + n = _i(t, function (e) { + return { + message: + "Token Type: ->" + + e.name + + "<- static 'PATTERN' can only be a RegExp, a Function matching the {CustomPatternMatcherFunc} type or an Object matching the {ICustomPattern} interface.", + type: Po.INVALID_PATTERN, + tokenTypes: [e], + }; + }), + r = ui(e, t); + return { errors: n, valid: r }; + })(r.valid), + a = i.valid; + return ( + (n = (n = n.concat(i.errors)).concat( + (function (e) { + var t = [], + n = Ai(e, function (e) { + return Vi(e[ro]); + }); + return ( + (t = t.concat( + (function (e) { + var t = (function (e) { + (0, m.Z)(n, e); + var t = (0, g.Z)(n); + function n() { + var e; + return ( + (0, p.Z)(this, n), + ((e = t.apply(this, arguments)).found = !1), + e + ); + } + return ( + (0, v.Z)(n, [ + { + key: "visitEndAnchor", + value: function (e) { + this.found = !0; + }, + }, + ]), + n + ); + })(Ha), + n = Ai(e, function (e) { + var n = e.PATTERN; + try { + var r = Wa(n), + i = new t(); + return i.visit(r), i.found; + } catch (a) { + return uo.test(n.source); + } + }), + r = _i(n, function (e) { + return { + message: + "Unexpected RegExp Anchor Error:\n\tToken Type: ->" + + e.name + + "<- static 'PATTERN' cannot contain end of input anchor '$'\n\tSee chevrotain.io/docs/guide/resolving_lexer_errors.html#ANCHORS\tfor details.", + type: Po.EOI_ANCHOR_FOUND, + tokenTypes: [e], + }; + }); + return r; + })(n) + )), + (t = t.concat( + (function (e) { + var t = (function (e) { + (0, m.Z)(n, e); + var t = (0, g.Z)(n); + function n() { + var e; + return ( + (0, p.Z)(this, n), + ((e = t.apply(this, arguments)).found = !1), + e + ); + } + return ( + (0, v.Z)(n, [ + { + key: "visitStartAnchor", + value: function (e) { + this.found = !0; + }, + }, + ]), + n + ); + })(Ha), + n = Ai(e, function (e) { + var n = e.PATTERN; + try { + var r = Wa(n), + i = new t(); + return i.visit(r), i.found; + } catch (a) { + return co.test(n.source); + } + }), + r = _i(n, function (e) { + return { + message: + "Unexpected RegExp Anchor Error:\n\tToken Type: ->" + + e.name + + "<- static 'PATTERN' cannot contain start of input anchor '^'\n\tSee https://chevrotain.io/docs/guide/resolving_lexer_errors.html#ANCHORS\tfor details.", + type: Po.SOI_ANCHOR_FOUND, + tokenTypes: [e], + }; + }); + return r; + })(n) + )), + (t = t.concat( + (function (e) { + var t = Ai(e, function (e) { + var t = e[ro]; + return ( + t instanceof RegExp && (t.multiline || t.global) + ); + }), + n = _i(t, function (e) { + return { + message: + "Token Type: ->" + + e.name + + "<- static 'PATTERN' may NOT contain global('g') or multiline('m')", + type: Po.UNSUPPORTED_FLAGS_FOUND, + tokenTypes: [e], + }; + }); + return n; + })(n) + )), + (t = t.concat( + (function (e) { + var t = [], + n = _i(e, function (n) { + return Ji( + e, + function (e, r) { + return ( + n.PATTERN.source !== r.PATTERN.source || + Fi(t, r) || + r.PATTERN === Uo.NA || + (t.push(r), e.push(r)), + e + ); + }, + [] + ); + }), + r = _i( + Ai((n = sr(n)), function (e) { + return e.length > 1; + }), + function (e) { + var t = _i(e, function (e) { + return e.name; + }), + n = Si(e).PATTERN; + return { + message: "The same RegExp pattern ->" + .concat( + n, + "<-has been used in all of the following Token Types: " + ) + .concat(t.join(", "), " <-"), + type: Po.DUPLICATE_PATTERNS_FOUND, + tokenTypes: e, + }; + } + ); + return r; + })(n) + )), + (t = t.concat( + (function (e) { + var t = Ai(e, function (e) { + return e.PATTERN.test(""); + }), + n = _i(t, function (e) { + return { + message: + "Token Type: ->" + + e.name + + "<- static 'PATTERN' must not match an empty string", + type: Po.EMPTY_MATCH_PATTERN, + tokenTypes: [e], + }; + }); + return n; + })(n) + )), + t + ); + })(a) + )), + (n = n.concat( + (function (e) { + var t = Ai(e, function (e) { + if (!Bi(e, "GROUP")) return !1; + var t = e.GROUP; + return t !== Uo.SKIPPED && t !== Uo.NA && !Li(t); + }), + n = _i(t, function (e) { + return { + message: + "Token Type: ->" + + e.name + + "<- static 'GROUP' can only be Lexer.SKIPPED/Lexer.NA/A String", + type: Po.INVALID_GROUP_TYPE_FOUND, + tokenTypes: [e], + }; + }); + return n; + })(a) + )), + (n = n.concat( + (function (e, t) { + var n = Ai(e, function (e) { + return void 0 !== e.PUSH_MODE && !Fi(t, e.PUSH_MODE); + }), + r = _i(n, function (e) { + return { + message: "Token Type: ->" + .concat( + e.name, + "<- static 'PUSH_MODE' value cannot refer to a Lexer Mode ->" + ) + .concat(e.PUSH_MODE, "<-which does not exist"), + type: Po.PUSH_MODE_DOES_NOT_EXIST, + tokenTypes: [e], + }; + }); + return r; + })(a, t) + )), + (n = n.concat( + (function (e) { + var t = [], + n = Ji( + e, + function (e, t, n) { + var r, + i = t.PATTERN; + return ( + i === Uo.NA || + (Li(i) + ? e.push({ str: i, idx: n, tokenType: t }) + : Vi(i) && + ((r = i), + void 0 === + xi( + [ + ".", + "\\", + "[", + "]", + "|", + "^", + "$", + "(", + ")", + "?", + "*", + "+", + "{", + ], + function (e) { + return -1 !== r.source.indexOf(e); + } + )) && + e.push({ + str: i.source, + idx: n, + tokenType: t, + })), + e + ); + }, + [] + ); + return ( + hi(e, function (e, r) { + hi(n, function (n) { + var i = n.str, + a = n.idx, + o = n.tokenType; + if ( + r < a && + (function (e, t) { + if (Vi(t)) { + var n = t.exec(e); + return null !== n && 0 === n.index; + } + if (Y(t)) return t(e, 0, [], {}); + if (Bi(t, "exec")) return t.exec(e, 0, [], {}); + if ("string" === typeof t) return t === e; + throw Error("non exhaustive match"); + })(i, e.PATTERN) + ) { + var s = "Token: ->" + .concat( + o.name, + "<- can never be matched.\nBecause it appears AFTER the Token Type ->" + ) + .concat( + e.name, + "<-in the lexer's definition.\nSee https://chevrotain.io/docs/guide/resolving_lexer_errors.html#UNREACHABLE" + ); + t.push({ + message: s, + type: Po.UNREACHABLE_PATTERN, + tokenTypes: [e, o], + }); + } + }); + }), + t + ); + })(a) + )), + n + ); + } + var uo = /[^\\][$]/; + var co = /[^\\[][\^]|^\^/; + function fo(e) { + var t = e.ignoreCase ? "i" : ""; + return new RegExp("^(?:".concat(e.source, ")"), t); + } + function ho(e) { + var t = e.ignoreCase ? "iy" : "y"; + return new RegExp("".concat(e.source), t); + } + function po(e, t, n) { + var r = [], + i = !1, + a = Ki(sr(Gt(Di(e.modes))), function (e) { + return e[ro] === Uo.NA; + }), + o = yo(n); + return ( + t && + hi(a, function (e) { + var t = Ao(e, o); + if (!1 !== t) { + var n = (function (e, t) { + if (t.issue === Po.IDENTIFY_TERMINATOR) + return "Warning: unable to identify line terminator usage in pattern.\n\tThe problem is in the <" + .concat(e.name, "> Token Type\n\t Root cause: ") + .concat( + t.errMsg, + ".\n\tFor details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#IDENTIFY_TERMINATOR" + ); + if (t.issue === Po.CUSTOM_LINE_BREAK) + return "Warning: A Custom Token Pattern should specify the option.\n\tThe problem is in the <".concat( + e.name, + "> Token Type\n\tFor details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#CUSTOM_LINE_BREAK" + ); + throw Error("non exhaustive match"); + })(e, t), + a = { message: n, type: t.issue, tokenType: e }; + r.push(a); + } else Bi(e, "LINE_BREAKS") ? !0 === e.LINE_BREAKS && (i = !0) : no(o, e.PATTERN) && (i = !0); + }), + t && + !i && + r.push({ + message: + "Warning: No LINE_BREAKS Found.\n\tThis Lexer has been defined to track line and column information,\n\tBut none of the Token Types can be identified as matching a line terminator.\n\tSee https://chevrotain.io/docs/guide/resolving_lexer_errors.html#LINE_BREAKS \n\tfor details.", + type: Po.NO_LINE_BREAKS_FLAGS, + }), + r + ); + } + function vo(e) { + var t = e.PATTERN; + if (Vi(t)) return !1; + if (Y(t)) return !0; + if (Bi(t, "exec")) return !0; + if (Li(t)) return !1; + throw Error("non exhaustive match"); + } + function mo(e) { + return !(!Li(e) || 1 !== e.length) && e.charCodeAt(0); + } + var go = { + test: function (e) { + for (var t = e.length, n = this.lastIndex; n < t; n++) { + var r = e.charCodeAt(n); + if (10 === r) return (this.lastIndex = n + 1), !0; + if (13 === r) + return ( + 10 === e.charCodeAt(n + 1) + ? (this.lastIndex = n + 2) + : (this.lastIndex = n + 1), + !0 + ); + } + return !1; + }, + lastIndex: 0, + }; + function Ao(e, t) { + if (Bi(e, "LINE_BREAKS")) return !1; + if (Vi(e.PATTERN)) { + try { + no(t, e.PATTERN); + } catch (n) { + return { issue: Po.IDENTIFY_TERMINATOR, errMsg: n.message }; + } + return !1; + } + if (Li(e.PATTERN)) return !1; + if (vo(e)) return { issue: Po.CUSTOM_LINE_BREAK }; + throw Error("non exhaustive match"); + } + function yo(e) { + return _i(e, function (e) { + return Li(e) ? e.charCodeAt(0) : e; + }); + } + function bo(e, t, n) { + void 0 === e[t] ? (e[t] = [n]) : e[t].push(n); + } + var xo = 256, + So = []; + function Eo(e) { + return e < xo ? e : So[e]; + } + function _o(e, t) { + var n = e.tokenTypeIdx; + return ( + n === t.tokenTypeIdx || + (!0 === t.isParent && !0 === t.categoryMatchesMap[n]) + ); + } + function Co(e, t) { + return e.tokenTypeIdx === t.tokenTypeIdx; + } + var wo = 1, + To = {}; + function Mo(e) { + var t = (function (e) { + var t = or(e), + n = e, + r = !0; + for (; r; ) { + n = sr( + Gt( + _i(n, function (e) { + return e.CATEGORIES; + }) + ) + ); + var i = ui(n, t); + (t = t.concat(i)), Qi(i) ? (r = !1) : (n = i); + } + return t; + })(e); + !(function (e) { + hi(e, function (e) { + ko(e) || ((To[wo] = e), (e.tokenTypeIdx = wo++)), + Ro(e) && + !w(e.CATEGORIES) && + (e.CATEGORIES = [e.CATEGORIES]), + Ro(e) || (e.CATEGORIES = []), + Bi(e, "categoryMatches") || (e.categoryMatches = []), + (function (e) { + return Bi(e, "categoryMatchesMap"); + })(e) || (e.categoryMatchesMap = {}); + }); + })(t), + (function (e) { + hi(e, function (e) { + Io([], e); + }); + })(t), + (function (e) { + hi(e, function (e) { + (e.categoryMatches = []), + hi(e.categoryMatchesMap, function (t, n) { + e.categoryMatches.push(To[n].tokenTypeIdx); + }); + }); + })(t), + hi(t, function (e) { + e.isParent = e.categoryMatches.length > 0; + }); + } + function Io(e, t) { + hi(e, function (e) { + t.categoryMatchesMap[e.tokenTypeIdx] = !0; + }), + hi(t.CATEGORIES, function (n) { + var r = e.concat(t); + Fi(r, n) || Io(r, n); + }); + } + function ko(e) { + return Bi(e, "tokenTypeIdx"); + } + function Ro(e) { + return Bi(e, "CATEGORIES"); + } + function Bo(e) { + return Bi(e, "tokenTypeIdx"); + } + var Po, Lo; + ((Lo = Po || (Po = {}))[(Lo.MISSING_PATTERN = 0)] = + "MISSING_PATTERN"), + (Lo[(Lo.INVALID_PATTERN = 1)] = "INVALID_PATTERN"), + (Lo[(Lo.EOI_ANCHOR_FOUND = 2)] = "EOI_ANCHOR_FOUND"), + (Lo[(Lo.UNSUPPORTED_FLAGS_FOUND = 3)] = + "UNSUPPORTED_FLAGS_FOUND"), + (Lo[(Lo.DUPLICATE_PATTERNS_FOUND = 4)] = + "DUPLICATE_PATTERNS_FOUND"), + (Lo[(Lo.INVALID_GROUP_TYPE_FOUND = 5)] = + "INVALID_GROUP_TYPE_FOUND"), + (Lo[(Lo.PUSH_MODE_DOES_NOT_EXIST = 6)] = + "PUSH_MODE_DOES_NOT_EXIST"), + (Lo[(Lo.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE = 7)] = + "MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE"), + (Lo[(Lo.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY = 8)] = + "MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY"), + (Lo[(Lo.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST = 9)] = + "MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST"), + (Lo[(Lo.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED = 10)] = + "LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED"), + (Lo[(Lo.SOI_ANCHOR_FOUND = 11)] = "SOI_ANCHOR_FOUND"), + (Lo[(Lo.EMPTY_MATCH_PATTERN = 12)] = "EMPTY_MATCH_PATTERN"), + (Lo[(Lo.NO_LINE_BREAKS_FLAGS = 13)] = "NO_LINE_BREAKS_FLAGS"), + (Lo[(Lo.UNREACHABLE_PATTERN = 14)] = "UNREACHABLE_PATTERN"), + (Lo[(Lo.IDENTIFY_TERMINATOR = 15)] = "IDENTIFY_TERMINATOR"), + (Lo[(Lo.CUSTOM_LINE_BREAK = 16)] = "CUSTOM_LINE_BREAK"), + (Lo[(Lo.MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE = 17)] = + "MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE"); + var Do = { + deferDefinitionErrorsHandling: !1, + positionTracking: "full", + lineTerminatorsPattern: /\n|\r\n?/g, + lineTerminatorCharacters: ["\n", "\r"], + ensureOptimizations: !1, + safeMode: !1, + errorMessageProvider: { + buildUnableToPopLexerModeMessage: function (e) { + return "Unable to pop Lexer Mode after encountering Token ->".concat( + e.image, + "<- The Mode Stack is empty" + ); + }, + buildUnexpectedCharactersMessage: function (e, t, n, r, i) { + return "unexpected character: ->" + .concat(e.charAt(t), "<- at offset: ") + .concat(t, ", skipped ") + .concat(n, " characters."); + }, + }, + traceInitPerf: !1, + skipValidations: !1, + recoveryEnabled: !0, + }; + Object.freeze(Do); + var Uo = (function () { + function e(t) { + var n = this, + r = + arguments.length > 1 && void 0 !== arguments[1] + ? arguments[1] + : Do; + if ( + ((0, p.Z)(this, e), + (this.lexerDefinition = t), + (this.lexerDefinitionErrors = []), + (this.lexerDefinitionWarning = []), + (this.patternIdxToConfig = {}), + (this.charCodeToPatternIdxToConfig = {}), + (this.modes = []), + (this.emptyGroups = {}), + (this.trackStartLines = !0), + (this.trackEndLines = !0), + (this.hasCustom = !1), + (this.canModeBeOptimized = {}), + (this.TRACE_INIT = function (e, t) { + if (!0 === n.traceInitPerf) { + n.traceInitIndent++; + var r = new Array(n.traceInitIndent + 1).join("\t"); + n.traceInitIndent < n.traceInitMaxIdent && + console.log("".concat(r, "--\x3e <").concat(e, ">")); + var i = oa(t), + a = i.time, + o = i.value, + s = a > 10 ? console.warn : console.log; + return ( + n.traceInitIndent < n.traceInitMaxIdent && + s( + "" + .concat(r, "<-- <") + .concat(e, "> time: ") + .concat(a, "ms") + ), + n.traceInitIndent--, + o + ); + } + return t(); + }), + "boolean" === typeof r) + ) + throw Error( + "The second argument to the Lexer constructor is now an ILexerConfig Object.\na boolean 2nd argument is no longer supported" + ); + this.config = ct({}, Do, r); + var i = this.config.traceInitPerf; + !0 === i + ? ((this.traceInitMaxIdent = 1 / 0), + (this.traceInitPerf = !0)) + : "number" === typeof i && + ((this.traceInitMaxIdent = i), (this.traceInitPerf = !0)), + (this.traceInitIndent = -1), + this.TRACE_INIT("Lexer Constructor", function () { + var e, + i = !0; + n.TRACE_INIT("Lexer Config handling", function () { + if ( + n.config.lineTerminatorsPattern === + Do.lineTerminatorsPattern + ) + n.config.lineTerminatorsPattern = go; + else if ( + n.config.lineTerminatorCharacters === + Do.lineTerminatorCharacters + ) + throw Error( + "Error: Missing property on the Lexer config.\n\tFor details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#MISSING_LINE_TERM_CHARS" + ); + if (r.safeMode && r.ensureOptimizations) + throw Error( + '"safeMode" and "ensureOptimizations" flags are mutually exclusive.' + ); + (n.trackStartLines = /full|onlyStart/i.test( + n.config.positionTracking + )), + (n.trackEndLines = /full/i.test( + n.config.positionTracking + )), + w(t) + ? (e = { + modes: { defaultMode: or(t) }, + defaultMode: io, + }) + : ((i = !1), (e = or(t))); + }), + !1 === n.config.skipValidations && + (n.TRACE_INIT("performRuntimeChecks", function () { + n.lexerDefinitionErrors = + n.lexerDefinitionErrors.concat( + (function (e, t, n) { + var r = []; + return ( + Bi(e, io) || + r.push({ + message: + "A MultiMode Lexer cannot be initialized without a <" + + io + + "> property in its definition\n", + type: Po.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE, + }), + Bi(e, ao) || + r.push({ + message: + "A MultiMode Lexer cannot be initialized without a property in its definition\n", + type: Po.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY, + }), + Bi(e, ao) && + Bi(e, io) && + !Bi(e.modes, e.defaultMode) && + r.push({ + message: + "A MultiMode Lexer cannot be initialized with a " + .concat(io, ": <") + .concat( + e.defaultMode, + ">which does not exist\n" + ), + type: Po.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST, + }), + Bi(e, ao) && + hi(e.modes, function (e, t) { + hi(e, function (n, i) { + ji(n) + ? r.push({ + message: + "A Lexer cannot be initialized using an undefined Token Type. Mode:<" + .concat(t, "> at index: <") + .concat(i, ">\n"), + type: Po.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED, + }) + : Bi(n, "LONGER_ALT") && + hi( + w(n.LONGER_ALT) + ? n.LONGER_ALT + : [n.LONGER_ALT], + function (i) { + ji(i) || + Fi(e, i) || + r.push({ + message: + "A MultiMode Lexer cannot be initialized with a longer_alt <" + .concat( + i.name, + "> on token <" + ) + .concat( + n.name, + "> outside of mode <" + ) + .concat(t, ">\n"), + type: Po.MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE, + }); + } + ); + }); + }), + r + ); + })( + e, + n.trackStartLines, + n.config.lineTerminatorCharacters + ) + ); + }), + n.TRACE_INIT( + "performWarningRuntimeChecks", + function () { + n.lexerDefinitionWarning = + n.lexerDefinitionWarning.concat( + po( + e, + n.trackStartLines, + n.config.lineTerminatorCharacters + ) + ); + } + )), + (e.modes = e.modes ? e.modes : {}), + hi(e.modes, function (t, n) { + e.modes[n] = Ki(t, function (e) { + return ji(e); + }); + }); + var a = st(e.modes); + if ( + (hi(e.modes, function (e, t) { + n.TRACE_INIT( + "Mode: <".concat(t, "> processing"), + function () { + var i; + (n.modes.push(t), + !1 === n.config.skipValidations && + n.TRACE_INIT("validatePatterns", function () { + n.lexerDefinitionErrors = + n.lexerDefinitionErrors.concat(lo(e, a)); + }), + Qi(n.lexerDefinitionErrors)) && + (Mo(e), + n.TRACE_INIT("analyzeTokenTypes", function () { + i = so(e, { + lineTerminatorCharacters: + n.config.lineTerminatorCharacters, + positionTracking: r.positionTracking, + ensureOptimizations: r.ensureOptimizations, + safeMode: r.safeMode, + tracer: n.TRACE_INIT, + }); + }), + (n.patternIdxToConfig[t] = i.patternIdxToConfig), + (n.charCodeToPatternIdxToConfig[t] = + i.charCodeToPatternIdxToConfig), + (n.emptyGroups = ct( + {}, + n.emptyGroups, + i.emptyGroups + )), + (n.hasCustom = i.hasCustom || n.hasCustom), + (n.canModeBeOptimized[t] = i.canBeOptimized)); + } + ); + }), + (n.defaultMode = e.defaultMode), + !Qi(n.lexerDefinitionErrors) && + !n.config.deferDefinitionErrorsHandling) + ) { + var o = _i(n.lexerDefinitionErrors, function (e) { + return e.message; + }).join("-----------------------\n"); + throw new Error( + "Errors detected in definition of Lexer:\n" + o + ); + } + hi(n.lexerDefinitionWarning, function (e) { + aa(e.message); + }), + n.TRACE_INIT( + "Choosing sub-methods implementations", + function () { + if ( + (oo + ? ((n.chopInput = H), (n.match = n.matchWithTest)) + : ((n.updateLastIndex = fe), + (n.match = n.matchWithExec)), + i && (n.handleModes = fe), + !1 === n.trackStartLines && + (n.computeNewColumn = H), + !1 === n.trackEndLines && + (n.updateTokenEndLineColumnLocation = fe), + /full/i.test(n.config.positionTracking)) + ) + n.createTokenInstance = n.createFullToken; + else if (/onlyStart/i.test(n.config.positionTracking)) + n.createTokenInstance = n.createStartOnlyToken; + else { + if (!/onlyOffset/i.test(n.config.positionTracking)) + throw Error( + 'Invalid config option: "'.concat( + n.config.positionTracking, + '"' + ) + ); + n.createTokenInstance = n.createOffsetOnlyToken; + } + n.hasCustom + ? ((n.addToken = n.addTokenUsingPush), + (n.handlePayload = n.handlePayloadWithCustom)) + : ((n.addToken = n.addTokenUsingMemberAccess), + (n.handlePayload = n.handlePayloadNoCustom)); + } + ), + n.TRACE_INIT("Failed Optimization Warnings", function () { + var e = Ji( + n.canModeBeOptimized, + function (e, t, n) { + return !1 === t && e.push(n), e; + }, + [] + ); + if (r.ensureOptimizations && !Qi(e)) + throw Error( + "Lexer Modes: < ".concat( + e.join(", "), + ' > cannot be optimized.\n\t Disable the "ensureOptimizations" lexer config flag to silently ignore this and run the lexer in an un-optimized mode.\n\t Or inspect the console log for details on how to resolve these issues.' + ) + ); + }), + n.TRACE_INIT("clearRegExpParserCache", function () { + Va = {}; + }), + n.TRACE_INIT("toFastProperties", function () { + sa(n); + }); + }); + } + return ( + (0, v.Z)(e, [ + { + key: "tokenize", + value: function (e) { + var t = + arguments.length > 1 && void 0 !== arguments[1] + ? arguments[1] + : this.defaultMode; + if (!Qi(this.lexerDefinitionErrors)) { + var n = _i(this.lexerDefinitionErrors, function (e) { + return e.message; + }).join("-----------------------\n"); + throw new Error( + "Unable to Tokenize because Errors detected in definition of Lexer:\n" + + n + ); + } + return this.tokenizeInternal(e, t); + }, + }, + { + key: "tokenizeInternal", + value: function (e, t) { + var n, + r, + i, + a, + o, + s, + l, + u, + c, + f, + d, + h, + p, + v, + m, + g, + A = this, + y = e, + b = y.length, + x = 0, + S = 0, + E = this.hasCustom ? 0 : Math.floor(e.length / 10), + _ = new Array(E), + C = [], + T = this.trackStartLines ? 1 : void 0, + M = this.trackStartLines ? 1 : void 0, + I = (function (e) { + var t = {}; + return ( + hi(st(e), function (n) { + var r = e[n]; + if (!w(r)) throw Error("non exhaustive match"); + t[n] = []; + }), + t + ); + })(this.emptyGroups), + k = this.trackStartLines, + R = this.config.lineTerminatorsPattern, + B = 0, + P = [], + L = [], + D = [], + U = []; + function F() { + return P; + } + function O(e) { + var t = Eo(e), + n = L[t]; + return void 0 === n ? U : n; + } + Object.freeze(U); + var N, + G = function (e) { + if ( + 1 === D.length && + void 0 === e.tokenType.PUSH_MODE + ) { + var t = + A.config.errorMessageProvider.buildUnableToPopLexerModeMessage( + e + ); + C.push({ + offset: e.startOffset, + line: e.startLine, + column: e.startColumn, + length: e.image.length, + message: t, + }); + } else { + D.pop(); + var n = ci(D); + (P = A.patternIdxToConfig[n]), + (L = A.charCodeToPatternIdxToConfig[n]), + (B = P.length); + var r = + A.canModeBeOptimized[n] && + !1 === A.config.safeMode; + g = L && r ? O : F; + } + }; + function Z(e) { + D.push(e), + (L = this.charCodeToPatternIdxToConfig[e]), + (P = this.patternIdxToConfig[e]), + (B = P.length), + (B = P.length); + var t = + this.canModeBeOptimized[e] && + !1 === this.config.safeMode; + g = L && t ? O : F; + } + Z.call(this, t); + for (var z = this.config.recoveryEnabled; x < b; ) { + s = null; + var Q = y.charCodeAt(x), + H = g(Q), + V = H.length; + for (n = 0; n < V; n++) { + var j = (N = H[n]).pattern; + l = null; + var W = N.short; + if ( + (!1 !== W + ? Q === W && (s = j) + : !0 === N.isCustom + ? null !== (m = j.exec(y, x, _, I)) + ? ((s = m[0]), + void 0 !== m.payload && (l = m.payload)) + : (s = null) + : (this.updateLastIndex(j, x), + (s = this.match(j, e, x))), + null !== s) + ) { + if (void 0 !== (o = N.longerAlt)) { + var X = o.length; + for (i = 0; i < X; i++) { + var Y = P[o[i]], + q = Y.pattern; + if ( + ((u = null), + !0 === Y.isCustom + ? null !== (m = q.exec(y, x, _, I)) + ? ((a = m[0]), + void 0 !== m.payload && (u = m.payload)) + : (a = null) + : (this.updateLastIndex(q, x), + (a = this.match(q, e, x))), + a && a.length > s.length) + ) { + (s = a), (l = u), (N = Y); + break; + } + } + } + break; + } + } + if (null !== s) { + if ( + ((c = s.length), + void 0 !== (f = N.group) && + ((d = N.tokenTypeIdx), + (h = this.createTokenInstance( + s, + x, + d, + N.tokenType, + T, + M, + c + )), + this.handlePayload(h, l), + !1 === f + ? (S = this.addToken(_, S, h)) + : I[f].push(h)), + (e = this.chopInput(e, c)), + (x += c), + (M = this.computeNewColumn(M, c)), + !0 === k && !0 === N.canLineTerminator) + ) { + var J = 0, + K = void 0, + $ = void 0; + R.lastIndex = 0; + do { + !0 === (K = R.test(s)) && + (($ = R.lastIndex - 1), J++); + } while (!0 === K); + 0 !== J && + ((T += J), + (M = c - $), + this.updateTokenEndLineColumnLocation( + h, + f, + $, + J, + T, + M, + c + )); + } + this.handleModes(N, G, Z, h); + } else { + for ( + var ee = x, te = T, ne = M, re = !1 === z; + !1 === re && x < b; + + ) + for ( + e = this.chopInput(e, 1), x++, r = 0; + r < B; + r++ + ) { + var ie = P[r], + ae = ie.pattern, + oe = ie.short; + if ( + (!1 !== oe + ? y.charCodeAt(x) === oe && (re = !0) + : !0 === ie.isCustom + ? (re = null !== ae.exec(y, x, _, I)) + : (this.updateLastIndex(ae, x), + (re = null !== ae.exec(e))), + !0 === re) + ) + break; + } + if ( + ((p = x - ee), + (M = this.computeNewColumn(M, p)), + (v = + this.config.errorMessageProvider.buildUnexpectedCharactersMessage( + y, + ee, + p, + te, + ne + )), + C.push({ + offset: ee, + line: te, + column: ne, + length: p, + message: v, + }), + !1 === z) + ) + break; + } + } + return ( + this.hasCustom || (_.length = S), + { tokens: _, groups: I, errors: C } + ); + }, + }, + { + key: "handleModes", + value: function (e, t, n, r) { + if (!0 === e.pop) { + var i = e.push; + t(r), void 0 !== i && n.call(this, i); + } else void 0 !== e.push && n.call(this, e.push); + }, + }, + { + key: "chopInput", + value: function (e, t) { + return e.substring(t); + }, + }, + { + key: "updateLastIndex", + value: function (e, t) { + e.lastIndex = t; + }, + }, + { + key: "updateTokenEndLineColumnLocation", + value: function (e, t, n, r, i, a, o) { + var s, l; + void 0 !== t && + ((l = (s = n === o - 1) ? -1 : 0), + (1 === r && !0 === s) || + ((e.endLine = i + l), (e.endColumn = a - 1 - l))); + }, + }, + { + key: "computeNewColumn", + value: function (e, t) { + return e + t; + }, + }, + { + key: "createOffsetOnlyToken", + value: function (e, t, n, r) { + return { + image: e, + startOffset: t, + tokenTypeIdx: n, + tokenType: r, + }; + }, + }, + { + key: "createStartOnlyToken", + value: function (e, t, n, r, i, a) { + return { + image: e, + startOffset: t, + startLine: i, + startColumn: a, + tokenTypeIdx: n, + tokenType: r, + }; + }, + }, + { + key: "createFullToken", + value: function (e, t, n, r, i, a, o) { + return { + image: e, + startOffset: t, + endOffset: t + o - 1, + startLine: i, + endLine: i, + startColumn: a, + endColumn: a + o - 1, + tokenTypeIdx: n, + tokenType: r, + }; + }, + }, + { + key: "addTokenUsingPush", + value: function (e, t, n) { + return e.push(n), t; + }, + }, + { + key: "addTokenUsingMemberAccess", + value: function (e, t, n) { + return (e[t] = n), ++t; + }, + }, + { key: "handlePayloadNoCustom", value: function (e, t) {} }, + { + key: "handlePayloadWithCustom", + value: function (e, t) { + null !== t && (e.payload = t); + }, + }, + { + key: "matchWithTest", + value: function (e, t, n) { + return !0 === e.test(t) + ? t.substring(n, e.lastIndex) + : null; + }, + }, + { + key: "matchWithExec", + value: function (e, t) { + var n = e.exec(t); + return null !== n ? n[0] : null; + }, + }, + ]), + e + ); + })(); + function Fo(e) { + return Oo(e) ? e.LABEL : e.name; + } + function Oo(e) { + return Li(e.LABEL) && "" !== e.LABEL; + } + (Uo.SKIPPED = + "This marks a skipped Token pattern, this means each token identified by it willbe consumed and then thrown into oblivion, this can be used to for example to completely ignore whitespace."), + (Uo.NA = /NOT_APPLICABLE/); + var No = "parent", + Go = "categories", + Zo = "label", + zo = "group", + Qo = "push_mode", + Ho = "pop_mode", + Vo = "longer_alt", + jo = "line_breaks", + Wo = "start_chars_hint"; + function Xo(e) { + return (function (e) { + var t = e.pattern, + n = {}; + (n.name = e.name), ji(t) || (n.PATTERN = t); + if (Bi(e, No)) + throw "The parent property is no longer supported.\nSee: https://github.com/chevrotain/chevrotain/issues/564#issuecomment-349062346 for details."; + Bi(e, Go) && (n.CATEGORIES = e[Go]); + Mo([n]), Bi(e, Zo) && (n.LABEL = e[Zo]); + Bi(e, zo) && (n.GROUP = e[zo]); + Bi(e, Ho) && (n.POP_MODE = e[Ho]); + Bi(e, Qo) && (n.PUSH_MODE = e[Qo]); + Bi(e, Vo) && (n.LONGER_ALT = e[Vo]); + Bi(e, jo) && (n.LINE_BREAKS = e[jo]); + Bi(e, Wo) && (n.START_CHARS_HINT = e[Wo]); + return n; + })(e); + } + var Yo = Xo({ name: "EOF", pattern: Uo.NA }); + function qo(e, t, n, r, i, a, o, s) { + return { + image: t, + startOffset: n, + endOffset: r, + startLine: i, + endLine: a, + startColumn: o, + endColumn: s, + tokenTypeIdx: e.tokenTypeIdx, + tokenType: e, + }; + } + Mo([Yo]); + var Jo = { + buildMismatchTokenMessage: function (e) { + var t = e.expected, + n = e.actual, + r = + (e.previous, + e.ruleName, + Oo(t) + ? "--\x3e ".concat(Fo(t), " <--") + : "token of type --\x3e ".concat(t.name, " <--")); + return "Expecting " + .concat(r, " but found --\x3e '") + .concat(n.image, "' <--"); + }, + buildNotAllInputParsedMessage: function (e) { + var t = e.firstRedundant; + e.ruleName; + return "Redundant input, expecting EOF but found: " + t.image; + }, + buildNoViableAltMessage: function (e) { + var t = e.expectedPathsPerAlt, + n = e.actual, + r = (e.previous, e.customUserDescription), + i = (e.ruleName, "Expecting: "), + a = "\nbut found: '" + Si(n).image + "'"; + if (r) return i + r + a; + var o = _i( + Ji( + t, + function (e, t) { + return e.concat(t); + }, + [] + ), + function (e) { + return "[".concat( + _i(e, function (e) { + return Fo(e); + }).join(", "), + "]" + ); + } + ), + s = _i(o, function (e, t) { + return " ".concat(t + 1, ". ").concat(e); + }); + return ( + i + + "one of these possible Token sequences:\n".concat( + s.join("\n") + ) + + a + ); + }, + buildEarlyExitMessage: function (e) { + var t = e.expectedIterationPaths, + n = e.actual, + r = e.customUserDescription, + i = (e.ruleName, "Expecting: "), + a = "\nbut found: '" + Si(n).image + "'"; + if (r) return i + r + a; + var o = _i(t, function (e) { + return "[".concat( + _i(e, function (e) { + return Fo(e); + }).join(","), + "]" + ); + }); + return ( + i + + "expecting at least one iteration which starts with one of these possible Token sequences::\n <".concat( + o.join(" ,"), + ">" + ) + + a + ); + }, + }; + Object.freeze(Jo); + var Ko = { + buildRuleNotFoundError: function (e, t) { + return ( + "Invalid grammar, reference to a rule which is not defined: ->" + + t.nonTerminalName + + "<-\ninside top level rule: ->" + + e.name + + "<-" + ); + }, + }, + $o = { + buildDuplicateFoundError: function (e, t) { + var n, + r = e.name, + i = Si(t), + a = i.idx, + o = Ea(i), + s = + (n = i) instanceof ya + ? n.terminalType.name + : n instanceof ca + ? n.nonTerminalName + : "", + l = a > 0, + u = "->" + .concat(o) + .concat(l ? a : "", "<- ") + .concat( + s ? "with argument: ->".concat(s, "<-") : "", + "\n appears more than once (" + ) + .concat(t.length, " times) in the top level rule: ->") + .concat( + r, + "<-. \n For further details see: https://chevrotain.io/docs/FAQ.html#NUMERICAL_SUFFIXES \n " + ); + return (u = (u = u.replace(/[ \t]+/g, " ")).replace( + /\s\s+/g, + "\n" + )); + }, + buildNamespaceConflictError: function (e) { + return "Namespace conflict found in grammar.\nThe grammar has both a Terminal(Token) and a Non-Terminal(Rule) named: <".concat( + e.name, + ">.\nTo resolve this make sure each Terminal and Non-Terminal names are unique\nThis is easy to accomplish by using the convention that Terminal names start with an uppercase letter\nand Non-Terminal names start with a lower case letter." + ); + }, + buildAlternationPrefixAmbiguityError: function (e) { + var t = _i(e.prefixPath, function (e) { + return Fo(e); + }).join(", "), + n = 0 === e.alternation.idx ? "" : e.alternation.idx; + return "Ambiguous alternatives: <" + .concat( + e.ambiguityIndices.join(" ,"), + "> due to common lookahead prefix\nin inside <") + .concat(e.topLevelRule.name, "> Rule,\n<") + .concat( + t, + "> may appears as a prefix path in all these alternatives.\nSee: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#COMMON_PREFIX\nFor Further details." + ); + }, + buildAlternationAmbiguityError: function (e) { + var t = _i(e.prefixPath, function (e) { + return Fo(e); + }).join(", "), + n = 0 === e.alternation.idx ? "" : e.alternation.idx, + r = "Ambiguous Alternatives Detected: <" + .concat(e.ambiguityIndices.join(" ,"), "> in inside <") + .concat(e.topLevelRule.name, "> Rule,\n<") + .concat( + t, + "> may appears as a prefix path in all these alternatives.\n" + ); + return (r += + "See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#AMBIGUOUS_ALTERNATIVES\nFor Further details."); + }, + buildEmptyRepetitionError: function (e) { + var t = Ea(e.repetition); + return ( + 0 !== e.repetition.idx && (t += e.repetition.idx), + "The repetition <" + .concat(t, "> within Rule <") + .concat( + e.topLevelRule.name, + "> can never consume any tokens.\nThis could lead to an infinite loop." + ) + ); + }, + buildTokenNameError: function (e) { + return "deprecated"; + }, + buildEmptyAlternationError: function (e) { + return "Ambiguous empty alternative: <" + .concat(e.emptyChoiceIdx + 1, "> in inside <") + .concat( + e.topLevelRule.name, + "> Rule.\nOnly the last alternative may be an empty alternative." + ); + }, + buildTooManyAlternativesError: function (e) { + return "An Alternation cannot have more than 256 alternatives:\n inside <") + .concat(e.topLevelRule.name, "> Rule.\n has ") + .concat( + e.alternation.definition.length + 1, + " alternatives." + ); + }, + buildLeftRecursionError: function (e) { + var t = e.topLevelRule.name, + n = _i(e.leftRecursionPath, function (e) { + return e.name; + }), + r = "" + .concat(t, " --\x3e ") + .concat(n.concat([t]).join(" --\x3e ")); + return "Left Recursion found in grammar.\nrule: <" + .concat( + t, + "> can be invoked from itself (directly or indirectly)\nwithout consuming any Tokens. The grammar path that causes this is: \n " + ) + .concat( + r, + "\n To fix this refactor your grammar to remove the left recursion.\nsee: https://en.wikipedia.org/wiki/LL_parser#Left_factoring." + ); + }, + buildInvalidRuleNameError: function (e) { + return "deprecated"; + }, + buildDuplicateRuleNameError: function (e) { + var t; + return ( + (t = + e.topLevelRule instanceof fa + ? e.topLevelRule.name + : e.topLevelRule), + "Duplicate definition, rule: ->" + .concat(t, "<- is already defined in the grammar: ->") + .concat(e.grammarName, "<-") + ); + }, + }; + var es, + ts, + ns = (function (e) { + (0, m.Z)(n, e); + var t = (0, g.Z)(n); + function n(e, r) { + var i; + return ( + (0, p.Z)(this, n), + ((i = t.call(this)).nameToTopRule = e), + (i.errMsgProvider = r), + (i.errors = []), + i + ); + } + return ( + (0, v.Z)(n, [ + { + key: "resolveRefs", + value: function () { + var e = this; + hi(Di(this.nameToTopRule), function (t) { + (e.currTopLevel = t), t.accept(e); + }); + }, + }, + { + key: "visitNonTerminal", + value: function (e) { + var t = this.nameToTopRule[e.nonTerminalName]; + if (t) e.referencedRule = t; + else { + var n = this.errMsgProvider.buildRuleNotFoundError( + this.currTopLevel, + e + ); + this.errors.push({ + message: n, + type: Bl.UNRESOLVED_SUBRULE_REF, + ruleName: this.currTopLevel.name, + unresolvedRefName: e.nonTerminalName, + }); + } + }, + }, + ]), + n + ); + })(xa), + rs = (function (e) { + (0, m.Z)(n, e); + var t = (0, g.Z)(n); + function n(e, r) { + var i; + return ( + (0, p.Z)(this, n), + ((i = t.call(this)).topProd = e), + (i.path = r), + (i.possibleTokTypes = []), + (i.nextProductionName = ""), + (i.nextProductionOccurrence = 0), + (i.found = !1), + (i.isAtEndOfPath = !1), + i + ); + } + return ( + (0, v.Z)(n, [ + { + key: "startWalking", + value: function () { + if ( + ((this.found = !1), + this.path.ruleStack[0] !== this.topProd.name) + ) + throw Error( + "The path does not start with the walker's top Rule!" + ); + return ( + (this.ruleStack = or(this.path.ruleStack).reverse()), + (this.occurrenceStack = or( + this.path.occurrenceStack + ).reverse()), + this.ruleStack.pop(), + this.occurrenceStack.pop(), + this.updateExpectedNext(), + this.walk(this.topProd), + this.possibleTokTypes + ); + }, + }, + { + key: "walk", + value: function (e) { + var t = + arguments.length > 1 && void 0 !== arguments[1] + ? arguments[1] + : []; + this.found || + (0, d.Z)((0, h.Z)(n.prototype), "walk", this).call( + this, + e, + t + ); + }, + }, + { + key: "walkProdRef", + value: function (e, t, n) { + if ( + e.referencedRule.name === this.nextProductionName && + e.idx === this.nextProductionOccurrence + ) { + var r = t.concat(n); + this.updateExpectedNext(), + this.walk(e.referencedRule, r); + } + }, + }, + { + key: "updateExpectedNext", + value: function () { + Qi(this.ruleStack) + ? ((this.nextProductionName = ""), + (this.nextProductionOccurrence = 0), + (this.isAtEndOfPath = !0)) + : ((this.nextProductionName = this.ruleStack.pop()), + (this.nextProductionOccurrence = + this.occurrenceStack.pop())); + }, + }, + ]), + n + ); + })(_a), + is = (function (e) { + (0, m.Z)(n, e); + var t = (0, g.Z)(n); + function n(e, r) { + var i; + return ( + (0, p.Z)(this, n), + ((i = t.call(this, e, r)).path = r), + (i.nextTerminalName = ""), + (i.nextTerminalOccurrence = 0), + (i.nextTerminalName = i.path.lastTok.name), + (i.nextTerminalOccurrence = i.path.lastTokOccurrence), + i + ); + } + return ( + (0, v.Z)(n, [ + { + key: "walkTerminal", + value: function (e, t, n) { + if ( + this.isAtEndOfPath && + e.terminalType.name === this.nextTerminalName && + e.idx === this.nextTerminalOccurrence && + !this.found + ) { + var r = t.concat(n), + i = new da({ definition: r }); + (this.possibleTokTypes = wa(i)), (this.found = !0); + } + }, + }, + ]), + n + ); + })(rs), + as = (function (e) { + (0, m.Z)(n, e); + var t = (0, g.Z)(n); + function n(e, r) { + var i; + return ( + (0, p.Z)(this, n), + ((i = t.call(this)).topRule = e), + (i.occurrence = r), + (i.result = { + token: void 0, + occurrence: void 0, + isEndOfRule: void 0, + }), + i + ); + } + return ( + (0, v.Z)(n, [ + { + key: "startWalking", + value: function () { + return this.walk(this.topRule), this.result; + }, + }, + ]), + n + ); + })(_a), + os = (function (e) { + (0, m.Z)(n, e); + var t = (0, g.Z)(n); + function n() { + return (0, p.Z)(this, n), t.apply(this, arguments); + } + return ( + (0, v.Z)(n, [ + { + key: "walkMany", + value: function (e, t, r) { + if (e.idx === this.occurrence) { + var i = Si(t.concat(r)); + (this.result.isEndOfRule = void 0 === i), + i instanceof ya && + ((this.result.token = i.terminalType), + (this.result.occurrence = i.idx)); + } else + (0, d.Z)( + (0, h.Z)(n.prototype), + "walkMany", + this + ).call(this, e, t, r); + }, + }, + ]), + n + ); + })(as), + ss = (function (e) { + (0, m.Z)(n, e); + var t = (0, g.Z)(n); + function n() { + return (0, p.Z)(this, n), t.apply(this, arguments); + } + return ( + (0, v.Z)(n, [ + { + key: "walkManySep", + value: function (e, t, r) { + if (e.idx === this.occurrence) { + var i = Si(t.concat(r)); + (this.result.isEndOfRule = void 0 === i), + i instanceof ya && + ((this.result.token = i.terminalType), + (this.result.occurrence = i.idx)); + } else + (0, d.Z)( + (0, h.Z)(n.prototype), + "walkManySep", + this + ).call(this, e, t, r); + }, + }, + ]), + n + ); + })(as), + ls = (function (e) { + (0, m.Z)(n, e); + var t = (0, g.Z)(n); + function n() { + return (0, p.Z)(this, n), t.apply(this, arguments); + } + return ( + (0, v.Z)(n, [ + { + key: "walkAtLeastOne", + value: function (e, t, r) { + if (e.idx === this.occurrence) { + var i = Si(t.concat(r)); + (this.result.isEndOfRule = void 0 === i), + i instanceof ya && + ((this.result.token = i.terminalType), + (this.result.occurrence = i.idx)); + } else + (0, d.Z)( + (0, h.Z)(n.prototype), + "walkAtLeastOne", + this + ).call(this, e, t, r); + }, + }, + ]), + n + ); + })(as), + us = (function (e) { + (0, m.Z)(n, e); + var t = (0, g.Z)(n); + function n() { + return (0, p.Z)(this, n), t.apply(this, arguments); + } + return ( + (0, v.Z)(n, [ + { + key: "walkAtLeastOneSep", + value: function (e, t, r) { + if (e.idx === this.occurrence) { + var i = Si(t.concat(r)); + (this.result.isEndOfRule = void 0 === i), + i instanceof ya && + ((this.result.token = i.terminalType), + (this.result.occurrence = i.idx)); + } else + (0, d.Z)( + (0, h.Z)(n.prototype), + "walkAtLeastOneSep", + this + ).call(this, e, t, r); + }, + }, + ]), + n + ); + })(as); + function cs(e, t) { + var n = + arguments.length > 2 && void 0 !== arguments[2] + ? arguments[2] + : []; + n = or(n); + var r = [], + i = 0; + function a(a) { + var o = cs(a.concat(fi(e, i + 1)), t, n); + return r.concat(o); + } + for (; n.length < t && i < e.length; ) { + var o = e[i]; + if (o instanceof da) return a(o.definition); + if (o instanceof ca) return a(o.definition); + if (o instanceof ha) r = a(o.definition); + else { + if (o instanceof pa) + return a( + o.definition.concat([ + new ma({ definition: o.definition }), + ]) + ); + if (o instanceof va) + return a([ + new da({ definition: o.definition }), + new ma({ + definition: [ + new ya({ terminalType: o.separator }), + ].concat(o.definition), + }), + ]); + if (o instanceof ga) { + var s = o.definition.concat([ + new ma({ + definition: [ + new ya({ terminalType: o.separator }), + ].concat(o.definition), + }), + ]); + r = a(s); + } else if (o instanceof ma) { + var l = o.definition.concat([ + new ma({ definition: o.definition }), + ]); + r = a(l); + } else { + if (o instanceof Aa) + return ( + hi(o.definition, function (e) { + !1 === Qi(e.definition) && (r = a(e.definition)); + }), + r + ); + if (!(o instanceof ya)) throw Error("non exhaustive match"); + n.push(o.terminalType); + } + } + i++; + } + return r.push({ partialPath: n, suffixDef: fi(e, i) }), r; + } + function fs(e, t, n, r) { + var i = "EXIT_NONE_TERMINAL", + a = [i], + o = "EXIT_ALTERNATIVE", + s = !1, + l = t.length, + u = l - r - 1, + c = [], + f = []; + for ( + f.push({ idx: -1, def: e, ruleStack: [], occurrenceStack: [] }); + !Qi(f); + + ) { + var d = f.pop(); + if (d !== o) { + var h = d.def, + p = d.idx, + v = d.ruleStack, + m = d.occurrenceStack; + if (!Qi(h)) { + var g = h[0]; + if (g === i) { + var A = { + idx: p, + def: fi(h), + ruleStack: di(v), + occurrenceStack: di(m), + }; + f.push(A); + } else if (g instanceof ya) + if (p < l - 1) { + var y = p + 1; + if (n(t[y], g.terminalType)) { + var b = { + idx: y, + def: fi(h), + ruleStack: v, + occurrenceStack: m, + }; + f.push(b); + } + } else { + if (p !== l - 1) throw Error("non exhaustive match"); + c.push({ + nextTokenType: g.terminalType, + nextTokenOccurrence: g.idx, + ruleStack: v, + occurrenceStack: m, + }), + (s = !0); + } + else if (g instanceof ca) { + var x = or(v); + x.push(g.nonTerminalName); + var S = or(m); + S.push(g.idx); + var E = { + idx: p, + def: g.definition.concat(a, fi(h)), + ruleStack: x, + occurrenceStack: S, + }; + f.push(E); + } else if (g instanceof ha) { + var _ = { + idx: p, + def: fi(h), + ruleStack: v, + occurrenceStack: m, + }; + f.push(_), f.push(o); + var C = { + idx: p, + def: g.definition.concat(fi(h)), + ruleStack: v, + occurrenceStack: m, + }; + f.push(C); + } else if (g instanceof pa) { + var w = new ma({ definition: g.definition, idx: g.idx }), + T = { + idx: p, + def: g.definition.concat([w], fi(h)), + ruleStack: v, + occurrenceStack: m, + }; + f.push(T); + } else if (g instanceof va) { + var M = new ya({ terminalType: g.separator }), + I = new ma({ + definition: [M].concat(g.definition), + idx: g.idx, + }), + k = { + idx: p, + def: g.definition.concat([I], fi(h)), + ruleStack: v, + occurrenceStack: m, + }; + f.push(k); + } else if (g instanceof ga) { + var R = { + idx: p, + def: fi(h), + ruleStack: v, + occurrenceStack: m, + }; + f.push(R), f.push(o); + var B = new ya({ terminalType: g.separator }), + P = new ma({ + definition: [B].concat(g.definition), + idx: g.idx, + }), + L = { + idx: p, + def: g.definition.concat([P], fi(h)), + ruleStack: v, + occurrenceStack: m, + }; + f.push(L); + } else if (g instanceof ma) { + var D = { + idx: p, + def: fi(h), + ruleStack: v, + occurrenceStack: m, + }; + f.push(D), f.push(o); + var U = new ma({ definition: g.definition, idx: g.idx }), + F = { + idx: p, + def: g.definition.concat([U], fi(h)), + ruleStack: v, + occurrenceStack: m, + }; + f.push(F); + } else if (g instanceof Aa) + for (var O = g.definition.length - 1; O >= 0; O--) { + var N = { + idx: p, + def: g.definition[O].definition.concat(fi(h)), + ruleStack: v, + occurrenceStack: m, + }; + f.push(N), f.push(o); + } + else if (g instanceof da) + f.push({ + idx: p, + def: g.definition.concat(fi(h)), + ruleStack: v, + occurrenceStack: m, + }); + else { + if (!(g instanceof fa)) + throw Error("non exhaustive match"); + f.push(ds(g, p, v, m)); + } + } + } else s && ci(f).idx <= u && f.pop(); + } + return c; + } + function ds(e, t, n, r) { + var i = or(n); + i.push(e.name); + var a = or(r); + return ( + a.push(1), + { idx: t, def: e.definition, ruleStack: i, occurrenceStack: a } + ); + } + function hs(e) { + if (e instanceof ha || "Option" === e) return es.OPTION; + if (e instanceof ma || "Repetition" === e) return es.REPETITION; + if (e instanceof pa || "RepetitionMandatory" === e) + return es.REPETITION_MANDATORY; + if (e instanceof va || "RepetitionMandatoryWithSeparator" === e) + return es.REPETITION_MANDATORY_WITH_SEPARATOR; + if (e instanceof ga || "RepetitionWithSeparator" === e) + return es.REPETITION_WITH_SEPARATOR; + if (e instanceof Aa || "Alternation" === e) return es.ALTERNATION; + throw Error("non exhaustive match"); + } + function ps(e, t, n, r) { + var i = e.length, + a = mi(e, function (e) { + return mi(e, function (e) { + return 1 === e.length; + }); + }); + if (t) + return function (t) { + for ( + var r = _i(t, function (e) { + return e.GATE; + }), + a = 0; + a < i; + a++ + ) { + var o = e[a], + s = o.length, + l = r[a]; + if (void 0 === l || !1 !== l.call(this)) + e: for (var u = 0; u < s; u++) { + for (var c = o[u], f = c.length, d = 0; d < f; d++) { + var h = this.LA(d + 1); + if (!1 === n(h, c[d])) continue e; + } + return a; + } + } + }; + if (a && !r) { + var o = Ji( + _i(e, function (e) { + return Gt(e); + }), + function (e, t, n) { + return ( + hi(t, function (t) { + Bi(e, t.tokenTypeIdx) || (e[t.tokenTypeIdx] = n), + hi(t.categoryMatches, function (t) { + Bi(e, t) || (e[t] = n); + }); + }), + e + ); + }, + {} + ); + return function () { + var e = this.LA(1); + return o[e.tokenTypeIdx]; + }; + } + return function () { + for (var t = 0; t < i; t++) { + var r = e[t], + a = r.length; + e: for (var o = 0; o < a; o++) { + for (var s = r[o], l = s.length, u = 0; u < l; u++) { + var c = this.LA(u + 1); + if (!1 === n(c, s[u])) continue e; + } + return t; + } + } + }; + } + function vs(e, t, n) { + var r = mi(e, function (e) { + return 1 === e.length; + }), + i = e.length; + if (r && !n) { + var a = Gt(e); + if (1 === a.length && Qi(a[0].categoryMatches)) { + var o = a[0].tokenTypeIdx; + return function () { + return this.LA(1).tokenTypeIdx === o; + }; + } + var s = Ji( + a, + function (e, t, n) { + return ( + (e[t.tokenTypeIdx] = !0), + hi(t.categoryMatches, function (t) { + e[t] = !0; + }), + e + ); + }, + [] + ); + return function () { + var e = this.LA(1); + return !0 === s[e.tokenTypeIdx]; + }; + } + return function () { + e: for (var n = 0; n < i; n++) { + for (var r = e[n], a = r.length, o = 0; o < a; o++) { + var s = this.LA(o + 1); + if (!1 === t(s, r[o])) continue e; + } + return !0; + } + return !1; + }; + } + ((ts = es || (es = {}))[(ts.OPTION = 0)] = "OPTION"), + (ts[(ts.REPETITION = 1)] = "REPETITION"), + (ts[(ts.REPETITION_MANDATORY = 2)] = "REPETITION_MANDATORY"), + (ts[(ts.REPETITION_MANDATORY_WITH_SEPARATOR = 3)] = + "REPETITION_MANDATORY_WITH_SEPARATOR"), + (ts[(ts.REPETITION_WITH_SEPARATOR = 4)] = + "REPETITION_WITH_SEPARATOR"), + (ts[(ts.ALTERNATION = 5)] = "ALTERNATION"); + var ms = (function (e) { + (0, m.Z)(n, e); + var t = (0, g.Z)(n); + function n(e, r, i) { + var a; + return ( + (0, p.Z)(this, n), + ((a = t.call(this)).topProd = e), + (a.targetOccurrence = r), + (a.targetProdType = i), + a + ); + } + return ( + (0, v.Z)(n, [ + { + key: "startWalking", + value: function () { + return this.walk(this.topProd), this.restDef; + }, + }, + { + key: "checkIsTarget", + value: function (e, t, n, r) { + return ( + e.idx === this.targetOccurrence && + this.targetProdType === t && + ((this.restDef = n.concat(r)), !0) + ); + }, + }, + { + key: "walkOption", + value: function (e, t, r) { + this.checkIsTarget(e, es.OPTION, t, r) || + (0, d.Z)( + (0, h.Z)(n.prototype), + "walkOption", + this + ).call(this, e, t, r); + }, + }, + { + key: "walkAtLeastOne", + value: function (e, t, r) { + this.checkIsTarget(e, es.REPETITION_MANDATORY, t, r) || + (0, d.Z)( + (0, h.Z)(n.prototype), + "walkOption", + this + ).call(this, e, t, r); + }, + }, + { + key: "walkAtLeastOneSep", + value: function (e, t, r) { + this.checkIsTarget( + e, + es.REPETITION_MANDATORY_WITH_SEPARATOR, + t, + r + ) || + (0, d.Z)( + (0, h.Z)(n.prototype), + "walkOption", + this + ).call(this, e, t, r); + }, + }, + { + key: "walkMany", + value: function (e, t, r) { + this.checkIsTarget(e, es.REPETITION, t, r) || + (0, d.Z)( + (0, h.Z)(n.prototype), + "walkOption", + this + ).call(this, e, t, r); + }, + }, + { + key: "walkManySep", + value: function (e, t, r) { + this.checkIsTarget( + e, + es.REPETITION_WITH_SEPARATOR, + t, + r + ) || + (0, d.Z)( + (0, h.Z)(n.prototype), + "walkOption", + this + ).call(this, e, t, r); + }, + }, + ]), + n + ); + })(_a), + gs = (function (e) { + (0, m.Z)(n, e); + var t = (0, g.Z)(n); + function n(e, r, i) { + var a; + return ( + (0, p.Z)(this, n), + ((a = t.call(this)).targetOccurrence = e), + (a.targetProdType = r), + (a.targetRef = i), + (a.result = []), + a + ); + } + return ( + (0, v.Z)(n, [ + { + key: "checkIsTarget", + value: function (e, t) { + e.idx !== this.targetOccurrence || + this.targetProdType !== t || + (void 0 !== this.targetRef && e !== this.targetRef) || + (this.result = e.definition); + }, + }, + { + key: "visitOption", + value: function (e) { + this.checkIsTarget(e, es.OPTION); + }, + }, + { + key: "visitRepetition", + value: function (e) { + this.checkIsTarget(e, es.REPETITION); + }, + }, + { + key: "visitRepetitionMandatory", + value: function (e) { + this.checkIsTarget(e, es.REPETITION_MANDATORY); + }, + }, + { + key: "visitRepetitionMandatoryWithSeparator", + value: function (e) { + this.checkIsTarget( + e, + es.REPETITION_MANDATORY_WITH_SEPARATOR + ); + }, + }, + { + key: "visitRepetitionWithSeparator", + value: function (e) { + this.checkIsTarget(e, es.REPETITION_WITH_SEPARATOR); + }, + }, + { + key: "visitAlternation", + value: function (e) { + this.checkIsTarget(e, es.ALTERNATION); + }, + }, + ]), + n + ); + })(xa); + function As(e) { + for (var t = new Array(e), n = 0; n < e; n++) t[n] = []; + return t; + } + function ys(e) { + for (var t = [""], n = 0; n < e.length; n++) { + for (var r = e[n], i = [], a = 0; a < t.length; a++) { + var o = t[a]; + i.push(o + "_" + r.tokenTypeIdx); + for (var s = 0; s < r.categoryMatches.length; s++) { + var l = "_" + r.categoryMatches[s]; + i.push(o + l); + } + } + t = i; + } + return t; + } + function bs(e, t, n) { + for (var r = 0; r < e.length; r++) + if (r !== n) + for (var i = e[r], a = 0; a < t.length; a++) { + if (!0 === i[t[a]]) return !1; + } + return !0; + } + function xs(e, t) { + for ( + var n = _i(e, function (e) { + return cs([e], 1); + }), + r = As(n.length), + i = _i(n, function (e) { + var t = {}; + return ( + hi(e, function (e) { + hi(ys(e.partialPath), function (e) { + t[e] = !0; + }); + }), + t + ); + }), + a = n, + o = 1; + o <= t; + o++ + ) { + var s = a; + a = As(s.length); + for ( + var l = function (e) { + for (var n = s[e], l = 0; l < n.length; l++) { + var u = n[l].partialPath, + c = n[l].suffixDef, + f = ys(u); + if (bs(i, f, e) || Qi(c) || u.length === t) { + var d = r[e]; + if (!1 === _s(d, u)) { + d.push(u); + for (var h = 0; h < f.length; h++) { + var p = f[h]; + i[e][p] = !0; + } + } + } else { + var v = cs(c, o + 1, u); + (a[e] = a[e].concat(v)), + hi(v, function (t) { + hi(ys(t.partialPath), function (t) { + i[e][t] = !0; + }); + }); + } + } + }, + u = 0; + u < s.length; + u++ + ) + l(u); + } + return r; + } + function Ss(e, t, n, r) { + var i = new gs(e, es.ALTERNATION, r); + return t.accept(i), xs(i.result, n); + } + function Es(e, t, n, r) { + var i = new gs(e, n); + t.accept(i); + var a = i.result, + o = new ms(t, e, n).startWalking(); + return xs( + [new da({ definition: a }), new da({ definition: o })], + r + ); + } + function _s(e, t) { + e: for (var n = 0; n < e.length; n++) { + var r = e[n]; + if (r.length === t.length) { + for (var i = 0; i < r.length; i++) { + var a = t[i], + o = r[i]; + if ( + !1 === + (a === o || + void 0 !== o.categoryMatchesMap[a.tokenTypeIdx]) + ) + continue e; + } + return !0; + } + } + return !1; + } + function Cs(e) { + return mi(e, function (e) { + return mi(e, function (e) { + return mi(e, function (e) { + return Qi(e.categoryMatches); + }); + }); + }); + } + function ws(e, t, n, r) { + var i = Ci(e, function (e) { + return (function (e, t) { + var n = new Is(); + e.accept(n); + var r = n.allProductions, + i = _i( + Di( + Yi(Ii(r, Ts), function (e) { + return e.length > 1; + }) + ), + function (n) { + var r = Si(n), + i = t.buildDuplicateFoundError(e, n), + a = Ea(r), + o = { + message: i, + type: Bl.DUPLICATE_PRODUCTIONS, + ruleName: e.name, + dslName: a, + occurrence: r.idx, + }, + s = Ms(r); + return s && (o.parameter = s), o; + } + ); + return i; + })(e, n); + }), + a = (function (e, t, n) { + var r = [], + i = _i(t, function (e) { + return e.name; + }); + return ( + hi(e, function (e) { + var t = e.name; + if (Fi(i, t)) { + var a = n.buildNamespaceConflictError(e); + r.push({ + message: a, + type: Bl.CONFLICT_TOKENS_RULES_NAMESPACE, + ruleName: t, + }); + } + }), + r + ); + })(e, t, n), + o = Ci(e, function (e) { + return (function (e, t) { + var n = new Bs(); + e.accept(n); + var r = Ci(n.alternations, function (n) { + return n.definition.length > 255 + ? [ + { + message: t.buildTooManyAlternativesError({ + topLevelRule: e, + alternation: n, + }), + type: Bl.TOO_MANY_ALTS, + ruleName: e.name, + occurrence: n.idx, + }, + ] + : []; + }); + return r; + })(e, n); + }), + s = Ci(e, function (t) { + return (function (e, t, n, r) { + var i = [], + a = Ji( + t, + function (t, n) { + return n.name === e.name ? t + 1 : t; + }, + 0 + ); + if (a > 1) { + var o = r.buildDuplicateRuleNameError({ + topLevelRule: e, + grammarName: n, + }); + i.push({ + message: o, + type: Bl.DUPLICATE_RULE_NAME, + ruleName: e.name, + }); + } + return i; + })(t, e, r, n); + }); + return i.concat(a, o, s); + } + function Ts(e) { + return "".concat(Ea(e), "_#_").concat(e.idx, "_#_").concat(Ms(e)); + } + function Ms(e) { + return e instanceof ya + ? e.terminalType.name + : e instanceof ca + ? e.nonTerminalName + : ""; + } + var Is = (function (e) { + (0, m.Z)(n, e); + var t = (0, g.Z)(n); + function n() { + var e; + return ( + (0, p.Z)(this, n), + ((e = t.apply(this, arguments)).allProductions = []), + e + ); + } + return ( + (0, v.Z)(n, [ + { + key: "visitNonTerminal", + value: function (e) { + this.allProductions.push(e); + }, + }, + { + key: "visitOption", + value: function (e) { + this.allProductions.push(e); + }, + }, + { + key: "visitRepetitionWithSeparator", + value: function (e) { + this.allProductions.push(e); + }, + }, + { + key: "visitRepetitionMandatory", + value: function (e) { + this.allProductions.push(e); + }, + }, + { + key: "visitRepetitionMandatoryWithSeparator", + value: function (e) { + this.allProductions.push(e); + }, + }, + { + key: "visitRepetition", + value: function (e) { + this.allProductions.push(e); + }, + }, + { + key: "visitAlternation", + value: function (e) { + this.allProductions.push(e); + }, + }, + { + key: "visitTerminal", + value: function (e) { + this.allProductions.push(e); + }, + }, + ]), + n + ); + })(xa); + function ks(e, t, n) { + var r = + arguments.length > 3 && void 0 !== arguments[3] + ? arguments[3] + : [], + i = [], + a = Rs(t.definition); + if (Qi(a)) return []; + var o = e.name; + Fi(a, e) && + i.push({ + message: n.buildLeftRecursionError({ + topLevelRule: e, + leftRecursionPath: r, + }), + type: Bl.LEFT_RECURSION, + ruleName: o, + }); + var s = Ci(ui(a, r.concat([e])), function (t) { + var i = or(r); + return i.push(t), ks(e, t, n, i); + }); + return i.concat(s); + } + function Rs(e) { + var t = []; + if (Qi(e)) return t; + var n = Si(e); + if (n instanceof ca) t.push(n.referencedRule); + else if ( + n instanceof da || + n instanceof ha || + n instanceof pa || + n instanceof va || + n instanceof ga || + n instanceof ma + ) + t = t.concat(Rs(n.definition)); + else if (n instanceof Aa) + t = Gt( + _i(n.definition, function (e) { + return Rs(e.definition); + }) + ); + else if (!(n instanceof ya)) throw Error("non exhaustive match"); + var r = Sa(n), + i = e.length > 1; + if (r && i) { + var a = fi(e); + return t.concat(Rs(a)); + } + return t; + } + var Bs = (function (e) { + (0, m.Z)(n, e); + var t = (0, g.Z)(n); + function n() { + var e; + return ( + (0, p.Z)(this, n), + ((e = t.apply(this, arguments)).alternations = []), + e + ); + } + return ( + (0, v.Z)(n, [ + { + key: "visitAlternation", + value: function (e) { + this.alternations.push(e); + }, + }, + ]), + n + ); + })(xa); + function Ps(e, t, n) { + var r = new Bs(); + e.accept(r); + var i = r.alternations, + a = Ci( + (i = Ki(i, function (e) { + return !0 === e.ignoreAmbiguities; + })), + function (r) { + var i = r.idx, + a = r.maxLookahead || t, + o = Ss(i, e, a, r), + s = (function (e, t, n, r) { + var i = [], + a = Ji( + e, + function (n, r, a) { + return ( + !0 === t.definition[a].ignoreAmbiguities || + hi(r, function (r) { + var o = [a]; + hi(e, function (e, n) { + a !== n && + _s(e, r) && + !0 !== + t.definition[n].ignoreAmbiguities && + o.push(n); + }), + o.length > 1 && + !_s(i, r) && + (i.push(r), + n.push({ alts: o, path: r })); + }), + n + ); + }, + [] + ), + o = _i(a, function (e) { + var i = _i(e.alts, function (e) { + return e + 1; + }); + return { + message: r.buildAlternationAmbiguityError({ + topLevelRule: n, + alternation: t, + ambiguityIndices: i, + prefixPath: e.path, + }), + type: Bl.AMBIGUOUS_ALTS, + ruleName: n.name, + occurrence: t.idx, + alternatives: e.alts, + }; + }); + return o; + })(o, r, e, n), + l = (function (e, t, n, r) { + var i = Ji( + e, + function (e, t, n) { + var r = _i(t, function (e) { + return { idx: n, path: e }; + }); + return e.concat(r); + }, + [] + ), + a = sr( + Ci(i, function (e) { + if (!0 === t.definition[e.idx].ignoreAmbiguities) + return []; + var a = e.idx, + o = e.path; + return _i( + Ai(i, function (e) { + return ( + !0 !== + t.definition[e.idx].ignoreAmbiguities && + e.idx < a && + (function (e, t) { + return ( + e.length < t.length && + mi(e, function (e, n) { + var r = t[n]; + return ( + e === r || + r.categoryMatchesMap[e.tokenTypeIdx] + ); + }) + ); + })(e.path, o) + ); + }), + function (e) { + var i = [e.idx + 1, a + 1], + o = 0 === t.idx ? "" : t.idx; + return { + message: + r.buildAlternationPrefixAmbiguityError({ + topLevelRule: n, + alternation: t, + ambiguityIndices: i, + prefixPath: e.path, + }), + type: Bl.AMBIGUOUS_PREFIX_ALTS, + ruleName: n.name, + occurrence: o, + alternatives: i, + }; + } + ); + }) + ); + return a; + })(o, r, e, n); + return s.concat(l); + } + ); + return a; + } + var Ls = (function (e) { + (0, m.Z)(n, e); + var t = (0, g.Z)(n); + function n() { + var e; + return ( + (0, p.Z)(this, n), + ((e = t.apply(this, arguments)).allProductions = []), + e + ); + } + return ( + (0, v.Z)(n, [ + { + key: "visitRepetitionWithSeparator", + value: function (e) { + this.allProductions.push(e); + }, + }, + { + key: "visitRepetitionMandatory", + value: function (e) { + this.allProductions.push(e); + }, + }, + { + key: "visitRepetitionMandatoryWithSeparator", + value: function (e) { + this.allProductions.push(e); + }, + }, + { + key: "visitRepetition", + value: function (e) { + this.allProductions.push(e); + }, + }, + ]), + n + ); + })(xa); + function Ds(e) { + var t = oi(e, { errMsgProvider: Ko }), + n = {}; + return ( + hi(e.rules, function (e) { + n[e.name] = e; + }), + (function (e, t) { + var n = new ns(e, t); + return n.resolveRefs(), n.errors; + })(n, t.errMsgProvider) + ); + } + var Us = "MismatchedTokenException", + Fs = "NoViableAltException", + Os = "EarlyExitException", + Ns = "NotAllInputParsedException", + Gs = [Us, Fs, Os, Ns]; + function Zs(e) { + return Fi(Gs, e.name); + } + Object.freeze(Gs); + var zs = (function (e) { + (0, m.Z)(n, e); + var t = (0, g.Z)(n); + function n(e, r) { + var i; + return ( + (0, p.Z)(this, n), + ((i = t.call(this, e)).token = r), + (i.resyncedTokens = []), + Object.setPrototypeOf( + (0, f.Z)(i), + (this instanceof n ? this.constructor : void 0).prototype + ), + Error.captureStackTrace && + Error.captureStackTrace((0, f.Z)(i), i.constructor), + i + ); + } + return (0, v.Z)(n); + })((0, i.Z)(Error)), + Qs = (function (e) { + (0, m.Z)(n, e); + var t = (0, g.Z)(n); + function n(e, r, i) { + var a; + return ( + (0, p.Z)(this, n), + ((a = t.call(this, e, r)).previousToken = i), + (a.name = Us), + a + ); + } + return (0, v.Z)(n); + })(zs), + Hs = (function (e) { + (0, m.Z)(n, e); + var t = (0, g.Z)(n); + function n(e, r, i) { + var a; + return ( + (0, p.Z)(this, n), + ((a = t.call(this, e, r)).previousToken = i), + (a.name = Fs), + a + ); + } + return (0, v.Z)(n); + })(zs), + Vs = (function (e) { + (0, m.Z)(n, e); + var t = (0, g.Z)(n); + function n(e, r) { + var i; + return ( + (0, p.Z)(this, n), ((i = t.call(this, e, r)).name = Ns), i + ); + } + return (0, v.Z)(n); + })(zs), + js = (function (e) { + (0, m.Z)(n, e); + var t = (0, g.Z)(n); + function n(e, r, i) { + var a; + return ( + (0, p.Z)(this, n), + ((a = t.call(this, e, r)).previousToken = i), + (a.name = Os), + a + ); + } + return (0, v.Z)(n); + })(zs), + Ws = {}, + Xs = "InRuleRecoveryException", + Ys = (function (e) { + (0, m.Z)(n, e); + var t = (0, g.Z)(n); + function n(e) { + var r; + return ( + (0, p.Z)(this, n), ((r = t.call(this, e)).name = Xs), r + ); + } + return (0, v.Z)(n); + })((0, i.Z)(Error)), + qs = (function () { + function e() { + (0, p.Z)(this, e); + } + return ( + (0, v.Z)(e, [ + { + key: "initRecoverable", + value: function (e) { + (this.firstAfterRepMap = {}), + (this.resyncFollows = {}), + (this.recoveryEnabled = Bi(e, "recoveryEnabled") + ? e.recoveryEnabled + : Ll.recoveryEnabled), + this.recoveryEnabled && + (this.attemptInRepetitionRecovery = Js); + }, + }, + { + key: "getTokenToInsert", + value: function (e) { + var t = qo(e, "", NaN, NaN, NaN, NaN, NaN, NaN); + return (t.isInsertedInRecovery = !0), t; + }, + }, + { + key: "canTokenTypeBeInsertedInRecovery", + value: function (e) { + return !0; + }, + }, + { + key: "canTokenTypeBeDeletedInRecovery", + value: function (e) { + return !0; + }, + }, + { + key: "tryInRepetitionRecovery", + value: function (e, t, n, r) { + for ( + var i = this, + a = this.findReSyncTokenType(), + o = this.exportLexerState(), + s = [], + l = !1, + u = this.LA(1), + c = this.LA(1), + f = function () { + var e = i.LA(0), + t = + i.errorMessageProvider.buildMismatchTokenMessage( + { + expected: r, + actual: u, + previous: e, + ruleName: i.getCurrRuleFullName(), + } + ), + n = new Qs(t, u, i.LA(0)); + (n.resyncedTokens = di(s)), i.SAVE_ERROR(n); + }; + !l; + + ) { + if (this.tokenMatcher(c, r)) return void f(); + if (n.call(this)) return f(), void e.apply(this, t); + this.tokenMatcher(c, a) + ? (l = !0) + : ((c = this.SKIP_TOKEN()), + this.addToResyncTokens(c, s)); + } + this.importLexerState(o); + }, + }, + { + key: "shouldInRepetitionRecoveryBeTried", + value: function (e, t, n) { + return ( + !1 !== n && + !this.tokenMatcher(this.LA(1), e) && + !this.isBackTracking() && + !this.canPerformInRuleRecovery( + e, + this.getFollowsForInRuleRecovery(e, t) + ) + ); + }, + }, + { + key: "getFollowsForInRuleRecovery", + value: function (e, t) { + var n = this.getCurrentGrammarPath(e, t); + return this.getNextPossibleTokenTypes(n); + }, + }, + { + key: "tryInRuleRecovery", + value: function (e, t) { + if (this.canRecoverWithSingleTokenInsertion(e, t)) + return this.getTokenToInsert(e); + if (this.canRecoverWithSingleTokenDeletion(e)) { + var n = this.SKIP_TOKEN(); + return this.consumeToken(), n; + } + throw new Ys("sad sad panda"); + }, + }, + { + key: "canPerformInRuleRecovery", + value: function (e, t) { + return ( + this.canRecoverWithSingleTokenInsertion(e, t) || + this.canRecoverWithSingleTokenDeletion(e) + ); + }, + }, + { + key: "canRecoverWithSingleTokenInsertion", + value: function (e, t) { + var n = this; + if (!this.canTokenTypeBeInsertedInRecovery(e)) + return !1; + if (Qi(t)) return !1; + var r = this.LA(1); + return ( + void 0 !== + xi(t, function (e) { + return n.tokenMatcher(r, e); + }) + ); + }, + }, + { + key: "canRecoverWithSingleTokenDeletion", + value: function (e) { + return ( + !!this.canTokenTypeBeDeletedInRecovery(e) && + this.tokenMatcher(this.LA(2), e) + ); + }, + }, + { + key: "isInCurrentRuleReSyncSet", + value: function (e) { + var t = this.getCurrFollowKey(); + return Fi(this.getFollowSetFromFollowKey(t), e); + }, + }, + { + key: "findReSyncTokenType", + value: function () { + for ( + var e = this.flattenFollowSet(), + t = this.LA(1), + n = 2; + ; + + ) { + var r = xi(e, function (e) { + return _o(t, e); + }); + if (void 0 !== r) return r; + (t = this.LA(n)), n++; + } + }, + }, + { + key: "getCurrFollowKey", + value: function () { + if (1 === this.RULE_STACK.length) return Ws; + var e = this.getLastExplicitRuleShortName(), + t = this.getLastExplicitRuleOccurrenceIndex(), + n = this.getPreviousExplicitRuleShortName(); + return { + ruleName: this.shortRuleNameToFullName(e), + idxInCallingRule: t, + inRule: this.shortRuleNameToFullName(n), + }; + }, + }, + { + key: "buildFullFollowKeyStack", + value: function () { + var e = this, + t = this.RULE_STACK, + n = this.RULE_OCCURRENCE_STACK; + return _i(t, function (r, i) { + return 0 === i + ? Ws + : { + ruleName: e.shortRuleNameToFullName(r), + idxInCallingRule: n[i], + inRule: e.shortRuleNameToFullName(t[i - 1]), + }; + }); + }, + }, + { + key: "flattenFollowSet", + value: function () { + var e = this; + return Gt( + _i(this.buildFullFollowKeyStack(), function (t) { + return e.getFollowSetFromFollowKey(t); + }) + ); + }, + }, + { + key: "getFollowSetFromFollowKey", + value: function (e) { + if (e === Ws) return [Yo]; + var t = e.ruleName + e.idxInCallingRule + Ta + e.inRule; + return this.resyncFollows[t]; + }, + }, + { + key: "addToResyncTokens", + value: function (e, t) { + return this.tokenMatcher(e, Yo) || t.push(e), t; + }, + }, + { + key: "reSyncTo", + value: function (e) { + for ( + var t = [], n = this.LA(1); + !1 === this.tokenMatcher(n, e); + + ) + (n = this.SKIP_TOKEN()), this.addToResyncTokens(n, t); + return di(t); + }, + }, + { + key: "attemptInRepetitionRecovery", + value: function (e, t, n, r, i, a, o) {}, + }, + { + key: "getCurrentGrammarPath", + value: function (e, t) { + return { + ruleStack: this.getHumanReadableRuleStack(), + occurrenceStack: or(this.RULE_OCCURRENCE_STACK), + lastTok: e, + lastTokOccurrence: t, + }; + }, + }, + { + key: "getHumanReadableRuleStack", + value: function () { + var e = this; + return _i(this.RULE_STACK, function (t) { + return e.shortRuleNameToFullName(t); + }); + }, + }, + ]), + e + ); + })(); + function Js(e, t, n, r, i, a, o) { + var s = this.getKeyForAutomaticLookahead(r, i), + l = this.firstAfterRepMap[s]; + if (void 0 === l) { + var u = this.getCurrRuleFullName(); + (l = new a(this.getGAstProductions()[u], i).startWalking()), + (this.firstAfterRepMap[s] = l); + } + var c = l.token, + f = l.occurrence, + d = l.isEndOfRule; + 1 === this.RULE_STACK.length && + d && + void 0 === c && + ((c = Yo), (f = 1)), + void 0 !== c && + void 0 !== f && + this.shouldInRepetitionRecoveryBeTried(c, f, o) && + this.tryInRepetitionRecovery(e, t, n, c); + } + var Ks = 1024, + $s = 1280, + el = 1536; + function tl(e, t, n) { + return n | t | e; + } + var nl = (function () { + function e(t) { + var n; + (0, p.Z)(this, e), + (this.maxLookahead = + null !== + (n = + null === t || void 0 === t + ? void 0 + : t.maxLookahead) && void 0 !== n + ? n + : Ll.maxLookahead); + } + return ( + (0, v.Z)(e, [ + { + key: "validate", + value: function (e) { + var t = this.validateNoLeftRecursion(e.rules); + if (Qi(t)) { + var n = this.validateEmptyOrAlternatives(e.rules), + i = this.validateAmbiguousAlternationAlternatives( + e.rules, + this.maxLookahead + ), + a = this.validateSomeNonEmptyLookaheadPath( + e.rules, + this.maxLookahead + ); + return [].concat( + (0, r.Z)(t), + (0, r.Z)(n), + (0, r.Z)(i), + (0, r.Z)(a) + ); + } + return t; + }, + }, + { + key: "validateNoLeftRecursion", + value: function (e) { + return Ci(e, function (e) { + return ks(e, e, $o); + }); + }, + }, + { + key: "validateEmptyOrAlternatives", + value: function (e) { + return Ci(e, function (e) { + return (function (e, t) { + var n = new Bs(); + return ( + e.accept(n), + Ci(n.alternations, function (n) { + return Ci(di(n.definition), function (r, i) { + return Qi(fs([r], [], _o, 1)) + ? [ + { + message: t.buildEmptyAlternationError( + { + topLevelRule: e, + alternation: n, + emptyChoiceIdx: i, + } + ), + type: Bl.NONE_LAST_EMPTY_ALT, + ruleName: e.name, + occurrence: n.idx, + alternative: i + 1, + }, + ] + : []; + }); + }) + ); + })(e, $o); + }); + }, + }, + { + key: "validateAmbiguousAlternationAlternatives", + value: function (e, t) { + return Ci(e, function (e) { + return Ps(e, t, $o); + }); + }, + }, + { + key: "validateSomeNonEmptyLookaheadPath", + value: function (e, t) { + return (function (e, t, n) { + var r = []; + return ( + hi(e, function (e) { + var i = new Ls(); + e.accept(i), + hi(i.allProductions, function (i) { + var a = hs(i), + o = i.maxLookahead || t; + if (Qi(Gt(Es(i.idx, e, a, o)[0]))) { + var s = n.buildEmptyRepetitionError({ + topLevelRule: e, + repetition: i, + }); + r.push({ + message: s, + type: Bl.NO_NON_EMPTY_LOOKAHEAD, + ruleName: e.name, + }); + } + }); + }), + r + ); + })(e, t, $o); + }, + }, + { + key: "buildLookaheadForAlternation", + value: function (e) { + return (function (e, t, n, r, i, a) { + var o = Ss(e, t, n); + return a(o, r, Cs(o) ? Co : _o, i); + })( + e.prodOccurrence, + e.rule, + e.maxLookahead, + e.hasPredicates, + e.dynamicTokensEnabled, + ps + ); + }, + }, + { + key: "buildLookaheadForOptional", + value: function (e) { + return (function (e, t, n, r, i, a) { + var o = Es(e, t, i, n), + s = Cs(o) ? Co : _o; + return a(o[0], s, r); + })( + e.prodOccurrence, + e.rule, + e.maxLookahead, + e.dynamicTokensEnabled, + hs(e.prodType), + vs + ); + }, + }, + ]), + e + ); + })(), + rl = (function () { + function e() { + (0, p.Z)(this, e); + } + return ( + (0, v.Z)(e, [ + { + key: "initLooksAhead", + value: function (e) { + (this.dynamicTokensEnabled = Bi( + e, + "dynamicTokensEnabled" + ) + ? e.dynamicTokensEnabled + : Ll.dynamicTokensEnabled), + (this.maxLookahead = Bi(e, "maxLookahead") + ? e.maxLookahead + : Ll.maxLookahead), + (this.lookaheadStrategy = Bi(e, "lookaheadStrategy") + ? e.lookaheadStrategy + : new nl({ maxLookahead: this.maxLookahead })), + (this.lookAheadFuncsCache = new Map()); + }, + }, + { + key: "preComputeLookaheadFunctions", + value: function (e) { + var t = this; + hi(e, function (e) { + t.TRACE_INIT( + "".concat(e.name, " Rule Lookahead"), + function () { + var n = (function (e) { + al.reset(), e.accept(al); + var t = al.dslMethods; + return al.reset(), t; + })(e), + r = n.alternation, + i = n.repetition, + a = n.option, + o = n.repetitionMandatory, + s = n.repetitionMandatoryWithSeparator, + l = n.repetitionWithSeparator; + hi(r, function (n) { + var r = 0 === n.idx ? "" : n.idx; + t.TRACE_INIT( + "".concat(Ea(n)).concat(r), + function () { + var r = + t.lookaheadStrategy.buildLookaheadForAlternation( + { + prodOccurrence: n.idx, + rule: e, + maxLookahead: + n.maxLookahead || t.maxLookahead, + hasPredicates: n.hasPredicates, + dynamicTokensEnabled: + t.dynamicTokensEnabled, + } + ), + i = tl( + t.fullRuleNameToShort[e.name], + 256, + n.idx + ); + t.setLaFuncCache(i, r); + } + ); + }), + hi(i, function (n) { + t.computeLookaheadFunc( + e, + n.idx, + 768, + "Repetition", + n.maxLookahead, + Ea(n) + ); + }), + hi(a, function (n) { + t.computeLookaheadFunc( + e, + n.idx, + 512, + "Option", + n.maxLookahead, + Ea(n) + ); + }), + hi(o, function (n) { + t.computeLookaheadFunc( + e, + n.idx, + Ks, + "RepetitionMandatory", + n.maxLookahead, + Ea(n) + ); + }), + hi(s, function (n) { + t.computeLookaheadFunc( + e, + n.idx, + el, + "RepetitionMandatoryWithSeparator", + n.maxLookahead, + Ea(n) + ); + }), + hi(l, function (n) { + t.computeLookaheadFunc( + e, + n.idx, + $s, + "RepetitionWithSeparator", + n.maxLookahead, + Ea(n) + ); + }); + } + ); + }); + }, + }, + { + key: "computeLookaheadFunc", + value: function (e, t, n, r, i, a) { + var o = this; + this.TRACE_INIT( + "".concat(a).concat(0 === t ? "" : t), + function () { + var a = + o.lookaheadStrategy.buildLookaheadForOptional({ + prodOccurrence: t, + rule: e, + maxLookahead: i || o.maxLookahead, + dynamicTokensEnabled: o.dynamicTokensEnabled, + prodType: r, + }), + s = tl(o.fullRuleNameToShort[e.name], n, t); + o.setLaFuncCache(s, a); + } + ); + }, + }, + { + key: "getKeyForAutomaticLookahead", + value: function (e, t) { + return tl(this.getLastExplicitRuleShortName(), e, t); + }, + }, + { + key: "getLaFuncFromCache", + value: function (e) { + return this.lookAheadFuncsCache.get(e); + }, + }, + { + key: "setLaFuncCache", + value: function (e, t) { + this.lookAheadFuncsCache.set(e, t); + }, + }, + ]), + e + ); + })(), + il = (function (e) { + (0, m.Z)(n, e); + var t = (0, g.Z)(n); + function n() { + var e; + return ( + (0, p.Z)(this, n), + ((e = t.apply(this, arguments)).dslMethods = { + option: [], + alternation: [], + repetition: [], + repetitionWithSeparator: [], + repetitionMandatory: [], + repetitionMandatoryWithSeparator: [], + }), + e + ); + } + return ( + (0, v.Z)(n, [ + { + key: "reset", + value: function () { + this.dslMethods = { + option: [], + alternation: [], + repetition: [], + repetitionWithSeparator: [], + repetitionMandatory: [], + repetitionMandatoryWithSeparator: [], + }; + }, + }, + { + key: "visitOption", + value: function (e) { + this.dslMethods.option.push(e); + }, + }, + { + key: "visitRepetitionWithSeparator", + value: function (e) { + this.dslMethods.repetitionWithSeparator.push(e); + }, + }, + { + key: "visitRepetitionMandatory", + value: function (e) { + this.dslMethods.repetitionMandatory.push(e); + }, + }, + { + key: "visitRepetitionMandatoryWithSeparator", + value: function (e) { + this.dslMethods.repetitionMandatoryWithSeparator.push( + e + ); + }, + }, + { + key: "visitRepetition", + value: function (e) { + this.dslMethods.repetition.push(e); + }, + }, + { + key: "visitAlternation", + value: function (e) { + this.dslMethods.alternation.push(e); + }, + }, + ]), + n + ); + })(xa), + al = new il(); + function ol(e, t) { + !0 === isNaN(e.startOffset) + ? ((e.startOffset = t.startOffset), (e.endOffset = t.endOffset)) + : e.endOffset < t.endOffset === !0 && + (e.endOffset = t.endOffset); + } + function sl(e, t) { + !0 === isNaN(e.startOffset) + ? ((e.startOffset = t.startOffset), + (e.startColumn = t.startColumn), + (e.startLine = t.startLine), + (e.endOffset = t.endOffset), + (e.endColumn = t.endColumn), + (e.endLine = t.endLine)) + : e.endOffset < t.endOffset === !0 && + ((e.endOffset = t.endOffset), + (e.endColumn = t.endColumn), + (e.endLine = t.endLine)); + } + var ll, + ul, + cl = "name"; + function fl(e, t) { + Object.defineProperty(e, cl, { + enumerable: !1, + configurable: !0, + writable: !1, + value: t, + }); + } + function dl(e, t) { + for (var n = st(e), r = n.length, i = 0; i < r; i++) + for (var a = e[n[i]], o = a.length, s = 0; s < o; s++) { + var l = a[s]; + void 0 === l.tokenTypeIdx && this[l.name](l.children, t); + } + } + function hl(e, t) { + var n = function () {}; + fl(n, e + "BaseSemantics"); + var r = { + visit: function (e, t) { + if ((w(e) && (e = e[0]), !ji(e))) + return this[e.name](e.children, t); + }, + validateVisitor: function () { + var e = (function (e, t) { + var n = (function (e, t) { + var n = Ai(t, function (t) { + return !1 === Y(e[t]); + }), + r = _i(n, function (t) { + return { + msg: "Missing visitor method: <" + .concat(t, "> on ") + .concat(e.constructor.name, " CST Visitor."), + type: ll.MISSING_METHOD, + methodName: t, + }; + }); + return sr(r); + })(e, t); + return n; + })(this, t); + if (!Qi(e)) { + var n = _i(e, function (e) { + return e.msg; + }); + throw Error( + "Errors Detected in CST Visitor <" + .concat(this.constructor.name, ">:\n\t") + .concat(n.join("\n\n").replace(/\n/g, "\n\t")) + ); + } + }, + }; + return ( + ((n.prototype = r).constructor = n), (n._RULE_NAMES = t), n + ); + } + ((ul = ll || (ll = {}))[(ul.REDUNDANT_METHOD = 0)] = + "REDUNDANT_METHOD"), + (ul[(ul.MISSING_METHOD = 1)] = "MISSING_METHOD"); + var pl = (function () { + function e() { + (0, p.Z)(this, e); + } + return ( + (0, v.Z)(e, [ + { + key: "initTreeBuilder", + value: function (e) { + if ( + ((this.CST_STACK = []), + (this.outputCst = e.outputCst), + (this.nodeLocationTracking = Bi( + e, + "nodeLocationTracking" + ) + ? e.nodeLocationTracking + : Ll.nodeLocationTracking), + this.outputCst) + ) + if (/full/i.test(this.nodeLocationTracking)) + this.recoveryEnabled + ? ((this.setNodeLocationFromToken = sl), + (this.setNodeLocationFromNode = sl), + (this.cstPostRule = fe), + (this.setInitialNodeLocation = + this.setInitialNodeLocationFullRecovery)) + : ((this.setNodeLocationFromToken = fe), + (this.setNodeLocationFromNode = fe), + (this.cstPostRule = this.cstPostRuleFull), + (this.setInitialNodeLocation = + this.setInitialNodeLocationFullRegular)); + else if ( + /onlyOffset/i.test(this.nodeLocationTracking) + ) + this.recoveryEnabled + ? ((this.setNodeLocationFromToken = ol), + (this.setNodeLocationFromNode = ol), + (this.cstPostRule = fe), + (this.setInitialNodeLocation = + this.setInitialNodeLocationOnlyOffsetRecovery)) + : ((this.setNodeLocationFromToken = fe), + (this.setNodeLocationFromNode = fe), + (this.cstPostRule = this.cstPostRuleOnlyOffset), + (this.setInitialNodeLocation = + this.setInitialNodeLocationOnlyOffsetRegular)); + else { + if (!/none/i.test(this.nodeLocationTracking)) + throw Error( + 'Invalid config option: "'.concat( + e.nodeLocationTracking, + '"' + ) + ); + (this.setNodeLocationFromToken = fe), + (this.setNodeLocationFromNode = fe), + (this.cstPostRule = fe), + (this.setInitialNodeLocation = fe); + } + else + (this.cstInvocationStateUpdate = fe), + (this.cstFinallyStateUpdate = fe), + (this.cstPostTerminal = fe), + (this.cstPostNonTerminal = fe), + (this.cstPostRule = fe); + }, + }, + { + key: "setInitialNodeLocationOnlyOffsetRecovery", + value: function (e) { + e.location = { startOffset: NaN, endOffset: NaN }; + }, + }, + { + key: "setInitialNodeLocationOnlyOffsetRegular", + value: function (e) { + e.location = { + startOffset: this.LA(1).startOffset, + endOffset: NaN, + }; + }, + }, + { + key: "setInitialNodeLocationFullRecovery", + value: function (e) { + e.location = { + startOffset: NaN, + startLine: NaN, + startColumn: NaN, + endOffset: NaN, + endLine: NaN, + endColumn: NaN, + }; + }, + }, + { + key: "setInitialNodeLocationFullRegular", + value: function (e) { + var t = this.LA(1); + e.location = { + startOffset: t.startOffset, + startLine: t.startLine, + startColumn: t.startColumn, + endOffset: NaN, + endLine: NaN, + endColumn: NaN, + }; + }, + }, + { + key: "cstInvocationStateUpdate", + value: function (e) { + var t = { name: e, children: Object.create(null) }; + this.setInitialNodeLocation(t), this.CST_STACK.push(t); + }, + }, + { + key: "cstFinallyStateUpdate", + value: function () { + this.CST_STACK.pop(); + }, + }, + { + key: "cstPostRuleFull", + value: function (e) { + var t = this.LA(0), + n = e.location; + n.startOffset <= t.startOffset === !0 + ? ((n.endOffset = t.endOffset), + (n.endLine = t.endLine), + (n.endColumn = t.endColumn)) + : ((n.startOffset = NaN), + (n.startLine = NaN), + (n.startColumn = NaN)); + }, + }, + { + key: "cstPostRuleOnlyOffset", + value: function (e) { + var t = this.LA(0), + n = e.location; + n.startOffset <= t.startOffset === !0 + ? (n.endOffset = t.endOffset) + : (n.startOffset = NaN); + }, + }, + { + key: "cstPostTerminal", + value: function (e, t) { + var n, + r, + i, + a = this.CST_STACK[this.CST_STACK.length - 1]; + (r = t), + (i = e), + void 0 === (n = a).children[i] + ? (n.children[i] = [r]) + : n.children[i].push(r), + this.setNodeLocationFromToken(a.location, t); + }, + }, + { + key: "cstPostNonTerminal", + value: function (e, t) { + var n = this.CST_STACK[this.CST_STACK.length - 1]; + !(function (e, t, n) { + void 0 === e.children[t] + ? (e.children[t] = [n]) + : e.children[t].push(n); + })(n, t, e), + this.setNodeLocationFromNode(n.location, e.location); + }, + }, + { + key: "getBaseCstVisitorConstructor", + value: function () { + if (ji(this.baseCstVisitorConstructor)) { + var e = hl( + this.className, + st(this.gastProductionsCache) + ); + return (this.baseCstVisitorConstructor = e), e; + } + return this.baseCstVisitorConstructor; + }, + }, + { + key: "getBaseCstVisitorConstructorWithDefaults", + value: function () { + if (ji(this.baseCstVisitorWithDefaultsConstructor)) { + var e = (function (e, t, n) { + var r = function () {}; + fl(r, e + "BaseSemanticsWithDefaults"); + var i = Object.create(n.prototype); + return ( + hi(t, function (e) { + i[e] = dl; + }), + ((r.prototype = i).constructor = r), + r + ); + })( + this.className, + st(this.gastProductionsCache), + this.getBaseCstVisitorConstructor() + ); + return ( + (this.baseCstVisitorWithDefaultsConstructor = e), e + ); + } + return this.baseCstVisitorWithDefaultsConstructor; + }, + }, + { + key: "getLastExplicitRuleShortName", + value: function () { + var e = this.RULE_STACK; + return e[e.length - 1]; + }, + }, + { + key: "getPreviousExplicitRuleShortName", + value: function () { + var e = this.RULE_STACK; + return e[e.length - 2]; + }, + }, + { + key: "getLastExplicitRuleOccurrenceIndex", + value: function () { + var e = this.RULE_OCCURRENCE_STACK; + return e[e.length - 1]; + }, + }, + ]), + e + ); + })(), + vl = (function () { + function e() { + (0, p.Z)(this, e); + } + return ( + (0, v.Z)(e, [ + { + key: "initLexerAdapter", + value: function () { + (this.tokVector = []), + (this.tokVectorLength = 0), + (this.currIdx = -1); + }, + }, + { + key: "input", + get: function () { + return this.tokVector; + }, + set: function (e) { + if (!0 !== this.selfAnalysisDone) + throw Error( + "Missing invocation at the end of the Parser's constructor." + ); + this.reset(), + (this.tokVector = e), + (this.tokVectorLength = e.length); + }, + }, + { + key: "SKIP_TOKEN", + value: function () { + return this.currIdx <= this.tokVector.length - 2 + ? (this.consumeToken(), this.LA(1)) + : Rl; + }, + }, + { + key: "LA", + value: function (e) { + var t = this.currIdx + e; + return t < 0 || this.tokVectorLength <= t + ? Rl + : this.tokVector[t]; + }, + }, + { + key: "consumeToken", + value: function () { + this.currIdx++; + }, + }, + { + key: "exportLexerState", + value: function () { + return this.currIdx; + }, + }, + { + key: "importLexerState", + value: function (e) { + this.currIdx = e; + }, + }, + { + key: "resetLexerState", + value: function () { + this.currIdx = -1; + }, + }, + { + key: "moveToTerminatedState", + value: function () { + this.currIdx = this.tokVector.length - 1; + }, + }, + { + key: "getLexerPosition", + value: function () { + return this.exportLexerState(); + }, + }, + ]), + e + ); + })(), + ml = (function () { + function e() { + (0, p.Z)(this, e); + } + return ( + (0, v.Z)(e, [ + { + key: "ACTION", + value: function (e) { + return e.call(this); + }, + }, + { + key: "consume", + value: function (e, t, n) { + return this.consumeInternal(t, e, n); + }, + }, + { + key: "subrule", + value: function (e, t, n) { + return this.subruleInternal(t, e, n); + }, + }, + { + key: "option", + value: function (e, t) { + return this.optionInternal(t, e); + }, + }, + { + key: "or", + value: function (e, t) { + return this.orInternal(t, e); + }, + }, + { + key: "many", + value: function (e, t) { + return this.manyInternal(e, t); + }, + }, + { + key: "atLeastOne", + value: function (e, t) { + return this.atLeastOneInternal(e, t); + }, + }, + { + key: "CONSUME", + value: function (e, t) { + return this.consumeInternal(e, 0, t); + }, + }, + { + key: "CONSUME1", + value: function (e, t) { + return this.consumeInternal(e, 1, t); + }, + }, + { + key: "CONSUME2", + value: function (e, t) { + return this.consumeInternal(e, 2, t); + }, + }, + { + key: "CONSUME3", + value: function (e, t) { + return this.consumeInternal(e, 3, t); + }, + }, + { + key: "CONSUME4", + value: function (e, t) { + return this.consumeInternal(e, 4, t); + }, + }, + { + key: "CONSUME5", + value: function (e, t) { + return this.consumeInternal(e, 5, t); + }, + }, + { + key: "CONSUME6", + value: function (e, t) { + return this.consumeInternal(e, 6, t); + }, + }, + { + key: "CONSUME7", + value: function (e, t) { + return this.consumeInternal(e, 7, t); + }, + }, + { + key: "CONSUME8", + value: function (e, t) { + return this.consumeInternal(e, 8, t); + }, + }, + { + key: "CONSUME9", + value: function (e, t) { + return this.consumeInternal(e, 9, t); + }, + }, + { + key: "SUBRULE", + value: function (e, t) { + return this.subruleInternal(e, 0, t); + }, + }, + { + key: "SUBRULE1", + value: function (e, t) { + return this.subruleInternal(e, 1, t); + }, + }, + { + key: "SUBRULE2", + value: function (e, t) { + return this.subruleInternal(e, 2, t); + }, + }, + { + key: "SUBRULE3", + value: function (e, t) { + return this.subruleInternal(e, 3, t); + }, + }, + { + key: "SUBRULE4", + value: function (e, t) { + return this.subruleInternal(e, 4, t); + }, + }, + { + key: "SUBRULE5", + value: function (e, t) { + return this.subruleInternal(e, 5, t); + }, + }, + { + key: "SUBRULE6", + value: function (e, t) { + return this.subruleInternal(e, 6, t); + }, + }, + { + key: "SUBRULE7", + value: function (e, t) { + return this.subruleInternal(e, 7, t); + }, + }, + { + key: "SUBRULE8", + value: function (e, t) { + return this.subruleInternal(e, 8, t); + }, + }, + { + key: "SUBRULE9", + value: function (e, t) { + return this.subruleInternal(e, 9, t); + }, + }, + { + key: "OPTION", + value: function (e) { + return this.optionInternal(e, 0); + }, + }, + { + key: "OPTION1", + value: function (e) { + return this.optionInternal(e, 1); + }, + }, + { + key: "OPTION2", + value: function (e) { + return this.optionInternal(e, 2); + }, + }, + { + key: "OPTION3", + value: function (e) { + return this.optionInternal(e, 3); + }, + }, + { + key: "OPTION4", + value: function (e) { + return this.optionInternal(e, 4); + }, + }, + { + key: "OPTION5", + value: function (e) { + return this.optionInternal(e, 5); + }, + }, + { + key: "OPTION6", + value: function (e) { + return this.optionInternal(e, 6); + }, + }, + { + key: "OPTION7", + value: function (e) { + return this.optionInternal(e, 7); + }, + }, + { + key: "OPTION8", + value: function (e) { + return this.optionInternal(e, 8); + }, + }, + { + key: "OPTION9", + value: function (e) { + return this.optionInternal(e, 9); + }, + }, + { + key: "OR", + value: function (e) { + return this.orInternal(e, 0); + }, + }, + { + key: "OR1", + value: function (e) { + return this.orInternal(e, 1); + }, + }, + { + key: "OR2", + value: function (e) { + return this.orInternal(e, 2); + }, + }, + { + key: "OR3", + value: function (e) { + return this.orInternal(e, 3); + }, + }, + { + key: "OR4", + value: function (e) { + return this.orInternal(e, 4); + }, + }, + { + key: "OR5", + value: function (e) { + return this.orInternal(e, 5); + }, + }, + { + key: "OR6", + value: function (e) { + return this.orInternal(e, 6); + }, + }, + { + key: "OR7", + value: function (e) { + return this.orInternal(e, 7); + }, + }, + { + key: "OR8", + value: function (e) { + return this.orInternal(e, 8); + }, + }, + { + key: "OR9", + value: function (e) { + return this.orInternal(e, 9); + }, + }, + { + key: "MANY", + value: function (e) { + this.manyInternal(0, e); + }, + }, + { + key: "MANY1", + value: function (e) { + this.manyInternal(1, e); + }, + }, + { + key: "MANY2", + value: function (e) { + this.manyInternal(2, e); + }, + }, + { + key: "MANY3", + value: function (e) { + this.manyInternal(3, e); + }, + }, + { + key: "MANY4", + value: function (e) { + this.manyInternal(4, e); + }, + }, + { + key: "MANY5", + value: function (e) { + this.manyInternal(5, e); + }, + }, + { + key: "MANY6", + value: function (e) { + this.manyInternal(6, e); + }, + }, + { + key: "MANY7", + value: function (e) { + this.manyInternal(7, e); + }, + }, + { + key: "MANY8", + value: function (e) { + this.manyInternal(8, e); + }, + }, + { + key: "MANY9", + value: function (e) { + this.manyInternal(9, e); + }, + }, + { + key: "MANY_SEP", + value: function (e) { + this.manySepFirstInternal(0, e); + }, + }, + { + key: "MANY_SEP1", + value: function (e) { + this.manySepFirstInternal(1, e); + }, + }, + { + key: "MANY_SEP2", + value: function (e) { + this.manySepFirstInternal(2, e); + }, + }, + { + key: "MANY_SEP3", + value: function (e) { + this.manySepFirstInternal(3, e); + }, + }, + { + key: "MANY_SEP4", + value: function (e) { + this.manySepFirstInternal(4, e); + }, + }, + { + key: "MANY_SEP5", + value: function (e) { + this.manySepFirstInternal(5, e); + }, + }, + { + key: "MANY_SEP6", + value: function (e) { + this.manySepFirstInternal(6, e); + }, + }, + { + key: "MANY_SEP7", + value: function (e) { + this.manySepFirstInternal(7, e); + }, + }, + { + key: "MANY_SEP8", + value: function (e) { + this.manySepFirstInternal(8, e); + }, + }, + { + key: "MANY_SEP9", + value: function (e) { + this.manySepFirstInternal(9, e); + }, + }, + { + key: "AT_LEAST_ONE", + value: function (e) { + this.atLeastOneInternal(0, e); + }, + }, + { + key: "AT_LEAST_ONE1", + value: function (e) { + return this.atLeastOneInternal(1, e); + }, + }, + { + key: "AT_LEAST_ONE2", + value: function (e) { + this.atLeastOneInternal(2, e); + }, + }, + { + key: "AT_LEAST_ONE3", + value: function (e) { + this.atLeastOneInternal(3, e); + }, + }, + { + key: "AT_LEAST_ONE4", + value: function (e) { + this.atLeastOneInternal(4, e); + }, + }, + { + key: "AT_LEAST_ONE5", + value: function (e) { + this.atLeastOneInternal(5, e); + }, + }, + { + key: "AT_LEAST_ONE6", + value: function (e) { + this.atLeastOneInternal(6, e); + }, + }, + { + key: "AT_LEAST_ONE7", + value: function (e) { + this.atLeastOneInternal(7, e); + }, + }, + { + key: "AT_LEAST_ONE8", + value: function (e) { + this.atLeastOneInternal(8, e); + }, + }, + { + key: "AT_LEAST_ONE9", + value: function (e) { + this.atLeastOneInternal(9, e); + }, + }, + { + key: "AT_LEAST_ONE_SEP", + value: function (e) { + this.atLeastOneSepFirstInternal(0, e); + }, + }, + { + key: "AT_LEAST_ONE_SEP1", + value: function (e) { + this.atLeastOneSepFirstInternal(1, e); + }, + }, + { + key: "AT_LEAST_ONE_SEP2", + value: function (e) { + this.atLeastOneSepFirstInternal(2, e); + }, + }, + { + key: "AT_LEAST_ONE_SEP3", + value: function (e) { + this.atLeastOneSepFirstInternal(3, e); + }, + }, + { + key: "AT_LEAST_ONE_SEP4", + value: function (e) { + this.atLeastOneSepFirstInternal(4, e); + }, + }, + { + key: "AT_LEAST_ONE_SEP5", + value: function (e) { + this.atLeastOneSepFirstInternal(5, e); + }, + }, + { + key: "AT_LEAST_ONE_SEP6", + value: function (e) { + this.atLeastOneSepFirstInternal(6, e); + }, + }, + { + key: "AT_LEAST_ONE_SEP7", + value: function (e) { + this.atLeastOneSepFirstInternal(7, e); + }, + }, + { + key: "AT_LEAST_ONE_SEP8", + value: function (e) { + this.atLeastOneSepFirstInternal(8, e); + }, + }, + { + key: "AT_LEAST_ONE_SEP9", + value: function (e) { + this.atLeastOneSepFirstInternal(9, e); + }, + }, + { + key: "RULE", + value: function (e, t) { + var n = + arguments.length > 2 && void 0 !== arguments[2] + ? arguments[2] + : Dl; + if (Fi(this.definedRulesNames, e)) { + var r = { + message: $o.buildDuplicateRuleNameError({ + topLevelRule: e, + grammarName: this.className, + }), + type: Bl.DUPLICATE_RULE_NAME, + ruleName: e, + }; + this.definitionErrors.push(r); + } + this.definedRulesNames.push(e); + var i = this.defineRule(e, t, n); + return (this[e] = i), i; + }, + }, + { + key: "OVERRIDE_RULE", + value: function (e, t) { + var n = + arguments.length > 2 && void 0 !== arguments[2] + ? arguments[2] + : Dl, + r = (function (e, t, n) { + var r, + i = []; + return ( + Fi(t, e) || + ((r = "Invalid rule override, rule: ->" + .concat( + e, + "<- cannot be overridden in the grammar: ->" + ) + .concat( + n, + "<-as it is not defined in any of the super grammars " + )), + i.push({ + message: r, + type: Bl.INVALID_RULE_OVERRIDE, + ruleName: e, + })), + i + ); + })(e, this.definedRulesNames, this.className); + this.definitionErrors = this.definitionErrors.concat(r); + var i = this.defineRule(e, t, n); + return (this[e] = i), i; + }, + }, + { + key: "BACKTRACK", + value: function (e, t) { + return function () { + this.isBackTrackingStack.push(1); + var n = this.saveRecogState(); + try { + return e.apply(this, t), !0; + } catch (r) { + if (Zs(r)) return !1; + throw r; + } finally { + this.reloadRecogState(n), + this.isBackTrackingStack.pop(); + } + }; + }, + }, + { + key: "getGAstProductions", + value: function () { + return this.gastProductionsCache; + }, + }, + { + key: "getSerializedGastProductions", + value: function () { + return _i(Di(this.gastProductionsCache), ba); + }, + }, + ]), + e + ); + })(), + gl = (function () { + function e() { + (0, p.Z)(this, e); + } + return ( + (0, v.Z)(e, [ + { + key: "initRecognizerEngine", + value: function (e, t) { + if ( + ((this.className = this.constructor.name), + (this.shortRuleNameToFull = {}), + (this.fullRuleNameToShort = {}), + (this.ruleShortNameIdx = 256), + (this.tokenMatcher = Co), + (this.subruleIdx = 0), + (this.definedRulesNames = []), + (this.tokensMap = {}), + (this.isBackTrackingStack = []), + (this.RULE_STACK = []), + (this.RULE_OCCURRENCE_STACK = []), + (this.gastProductionsCache = {}), + Bi(t, "serializedGrammar")) + ) + throw Error( + "The Parser's configuration can no longer contain a property.\n\tSee: https://chevrotain.io/docs/changes/BREAKING_CHANGES.html#_6-0-0\n\tFor Further details." + ); + if (w(e)) { + if (Qi(e)) + throw Error( + "A Token Vocabulary cannot be empty.\n\tNote that the first argument for the parser constructor\n\tis no longer a Token vector (since v4.0)." + ); + if ("number" === typeof e[0].startOffset) + throw Error( + "The Parser constructor no longer accepts a token vector as the first argument.\n\tSee: https://chevrotain.io/docs/changes/BREAKING_CHANGES.html#_4-0-0\n\tFor Further details." + ); + } + if (w(e)) + this.tokensMap = Ji( + e, + function (e, t) { + return (e[t.name] = t), e; + }, + {} + ); + else if (Bi(e, "modes") && mi(Gt(Di(e.modes)), Bo)) { + var n = ra(Gt(Di(e.modes))); + this.tokensMap = Ji( + n, + function (e, t) { + return (e[t.name] = t), e; + }, + {} + ); + } else { + if (!L(e)) + throw new Error( + " argument must be An Array of Token constructors, A dictionary of Token constructors or an IMultiModeLexerDefinition" + ); + this.tokensMap = or(e); + } + this.tokensMap.EOF = Yo; + var r = mi( + Bi(e, "modes") ? Gt(Di(e.modes)) : Di(e), + function (e) { + return Qi(e.categoryMatches); + } + ); + (this.tokenMatcher = r ? Co : _o), + Mo(Di(this.tokensMap)); + }, + }, + { + key: "defineRule", + value: function (e, t, n) { + if (this.selfAnalysisDone) + throw Error( + "Grammar rule <".concat( + e, + "> may not be defined after the 'performSelfAnalysis' method has been called'\nMake sure that all grammar rule definitions are done before 'performSelfAnalysis' is called." + ) + ); + var r, + i = Bi(n, "resyncEnabled") + ? n.resyncEnabled + : Dl.resyncEnabled, + a = Bi(n, "recoveryValueFunc") + ? n.recoveryValueFunc + : Dl.recoveryValueFunc, + o = this.ruleShortNameIdx << 12; + return ( + this.ruleShortNameIdx++, + (this.shortRuleNameToFull[o] = e), + (this.fullRuleNameToShort[e] = o), + (r = + !0 === this.outputCst + ? function () { + try { + this.ruleInvocationStateUpdate( + o, + e, + this.subruleIdx + ); + for ( + var n = arguments.length, + r = new Array(n), + s = 0; + s < n; + s++ + ) + r[s] = arguments[s]; + t.apply(this, r); + var l = + this.CST_STACK[this.CST_STACK.length - 1]; + return this.cstPostRule(l), l; + } catch (u) { + return this.invokeRuleCatch(u, i, a); + } finally { + this.ruleFinallyStateUpdate(); + } + } + : function () { + try { + this.ruleInvocationStateUpdate( + o, + e, + this.subruleIdx + ); + for ( + var n = arguments.length, + r = new Array(n), + s = 0; + s < n; + s++ + ) + r[s] = arguments[s]; + return t.apply(this, r); + } catch (l) { + return this.invokeRuleCatch(l, i, a); + } finally { + this.ruleFinallyStateUpdate(); + } + }), + Object.assign(r, { + ruleName: e, + originalGrammarAction: t, + }) + ); + }, + }, + { + key: "invokeRuleCatch", + value: function (e, t, n) { + var r = 1 === this.RULE_STACK.length, + i = + t && !this.isBackTracking() && this.recoveryEnabled; + if (Zs(e)) { + var a = e; + if (i) { + var o = this.findReSyncTokenType(); + if (this.isInCurrentRuleReSyncSet(o)) { + if ( + ((a.resyncedTokens = this.reSyncTo(o)), + this.outputCst) + ) { + var s = + this.CST_STACK[this.CST_STACK.length - 1]; + return (s.recoveredNode = !0), s; + } + return n(e); + } + if (this.outputCst) { + var l = this.CST_STACK[this.CST_STACK.length - 1]; + (l.recoveredNode = !0), (a.partialCstResult = l); + } + throw a; + } + if (r) return this.moveToTerminatedState(), n(e); + throw a; + } + throw e; + }, + }, + { + key: "optionInternal", + value: function (e, t) { + var n = this.getKeyForAutomaticLookahead(512, t); + return this.optionInternalLogic(e, t, n); + }, + }, + { + key: "optionInternalLogic", + value: function (e, t, n) { + var r, + i = this, + a = this.getLaFuncFromCache(n); + if ("function" !== typeof e) { + r = e.DEF; + var o = e.GATE; + if (void 0 !== o) { + var s = a; + a = function () { + return o.call(i) && s.call(i); + }; + } + } else r = e; + if (!0 === a.call(this)) return r.call(this); + }, + }, + { + key: "atLeastOneInternal", + value: function (e, t) { + var n = this.getKeyForAutomaticLookahead(Ks, e); + return this.atLeastOneInternalLogic(e, t, n); + }, + }, + { + key: "atLeastOneInternalLogic", + value: function (e, t, n) { + var r, + i = this, + a = this.getLaFuncFromCache(n); + if ("function" !== typeof t) { + r = t.DEF; + var o = t.GATE; + if (void 0 !== o) { + var s = a; + a = function () { + return o.call(i) && s.call(i); + }; + } + } else r = t; + if (!0 !== a.call(this)) + throw this.raiseEarlyExitException( + e, + es.REPETITION_MANDATORY, + t.ERR_MSG + ); + for ( + var l = this.doSingleRepetition(r); + !0 === a.call(this) && !0 === l; + + ) + l = this.doSingleRepetition(r); + this.attemptInRepetitionRecovery( + this.atLeastOneInternal, + [e, t], + a, + Ks, + e, + ls + ); + }, + }, + { + key: "atLeastOneSepFirstInternal", + value: function (e, t) { + var n = this.getKeyForAutomaticLookahead(el, e); + this.atLeastOneSepFirstInternalLogic(e, t, n); + }, + }, + { + key: "atLeastOneSepFirstInternalLogic", + value: function (e, t, n) { + var r = this, + i = t.DEF, + a = t.SEP; + if (!0 !== this.getLaFuncFromCache(n).call(this)) + throw this.raiseEarlyExitException( + e, + es.REPETITION_MANDATORY_WITH_SEPARATOR, + t.ERR_MSG + ); + i.call(this); + for ( + var o = function () { + return r.tokenMatcher(r.LA(1), a); + }; + !0 === this.tokenMatcher(this.LA(1), a); + + ) + this.CONSUME(a), i.call(this); + this.attemptInRepetitionRecovery( + this.repetitionSepSecondInternal, + [e, a, o, i, us], + o, + el, + e, + us + ); + }, + }, + { + key: "manyInternal", + value: function (e, t) { + var n = this.getKeyForAutomaticLookahead(768, e); + return this.manyInternalLogic(e, t, n); + }, + }, + { + key: "manyInternalLogic", + value: function (e, t, n) { + var r, + i = this, + a = this.getLaFuncFromCache(n); + if ("function" !== typeof t) { + r = t.DEF; + var o = t.GATE; + if (void 0 !== o) { + var s = a; + a = function () { + return o.call(i) && s.call(i); + }; + } + } else r = t; + for (var l = !0; !0 === a.call(this) && !0 === l; ) + l = this.doSingleRepetition(r); + this.attemptInRepetitionRecovery( + this.manyInternal, + [e, t], + a, + 768, + e, + os, + l + ); + }, + }, + { + key: "manySepFirstInternal", + value: function (e, t) { + var n = this.getKeyForAutomaticLookahead($s, e); + this.manySepFirstInternalLogic(e, t, n); + }, + }, + { + key: "manySepFirstInternalLogic", + value: function (e, t, n) { + var r = this, + i = t.DEF, + a = t.SEP; + if (!0 === this.getLaFuncFromCache(n).call(this)) { + i.call(this); + for ( + var o = function () { + return r.tokenMatcher(r.LA(1), a); + }; + !0 === this.tokenMatcher(this.LA(1), a); + + ) + this.CONSUME(a), i.call(this); + this.attemptInRepetitionRecovery( + this.repetitionSepSecondInternal, + [e, a, o, i, ss], + o, + $s, + e, + ss + ); + } + }, + }, + { + key: "repetitionSepSecondInternal", + value: function (e, t, n, r, i) { + for (; n(); ) this.CONSUME(t), r.call(this); + this.attemptInRepetitionRecovery( + this.repetitionSepSecondInternal, + [e, t, n, r, i], + n, + el, + e, + i + ); + }, + }, + { + key: "doSingleRepetition", + value: function (e) { + var t = this.getLexerPosition(); + return e.call(this), this.getLexerPosition() > t; + }, + }, + { + key: "orInternal", + value: function (e, t) { + var n = this.getKeyForAutomaticLookahead(256, t), + r = w(e) ? e : e.DEF, + i = this.getLaFuncFromCache(n).call(this, r); + if (void 0 !== i) return r[i].ALT.call(this); + this.raiseNoAltException(t, e.ERR_MSG); + }, + }, + { + key: "ruleFinallyStateUpdate", + value: function () { + if ( + (this.RULE_STACK.pop(), + this.RULE_OCCURRENCE_STACK.pop(), + this.cstFinallyStateUpdate(), + 0 === this.RULE_STACK.length && + !1 === this.isAtEndOfInput()) + ) { + var e = this.LA(1), + t = + this.errorMessageProvider.buildNotAllInputParsedMessage( + { + firstRedundant: e, + ruleName: this.getCurrRuleFullName(), + } + ); + this.SAVE_ERROR(new Vs(t, e)); + } + }, + }, + { + key: "subruleInternal", + value: function (e, t, n) { + var r; + try { + var i = void 0 !== n ? n.ARGS : void 0; + return ( + (this.subruleIdx = t), + (r = e.apply(this, i)), + this.cstPostNonTerminal( + r, + void 0 !== n && void 0 !== n.LABEL + ? n.LABEL + : e.ruleName + ), + r + ); + } catch (a) { + throw this.subruleInternalError(a, n, e.ruleName); + } + }, + }, + { + key: "subruleInternalError", + value: function (e, t, n) { + throw ( + (Zs(e) && + void 0 !== e.partialCstResult && + (this.cstPostNonTerminal( + e.partialCstResult, + void 0 !== t && void 0 !== t.LABEL ? t.LABEL : n + ), + delete e.partialCstResult), + e) + ); + }, + }, + { + key: "consumeInternal", + value: function (e, t, n) { + var r; + try { + var i = this.LA(1); + !0 === this.tokenMatcher(i, e) + ? (this.consumeToken(), (r = i)) + : this.consumeInternalError(e, i, n); + } catch (a) { + r = this.consumeInternalRecovery(e, t, a); + } + return ( + this.cstPostTerminal( + void 0 !== n && void 0 !== n.LABEL + ? n.LABEL + : e.name, + r + ), + r + ); + }, + }, + { + key: "consumeInternalError", + value: function (e, t, n) { + var r, + i = this.LA(0); + throw ( + ((r = + void 0 !== n && n.ERR_MSG + ? n.ERR_MSG + : this.errorMessageProvider.buildMismatchTokenMessage( + { + expected: e, + actual: t, + previous: i, + ruleName: this.getCurrRuleFullName(), + } + )), + this.SAVE_ERROR(new Qs(r, t, i))) + ); + }, + }, + { + key: "consumeInternalRecovery", + value: function (e, t, n) { + if ( + !this.recoveryEnabled || + "MismatchedTokenException" !== n.name || + this.isBackTracking() + ) + throw n; + var r = this.getFollowsForInRuleRecovery(e, t); + try { + return this.tryInRuleRecovery(e, r); + } catch (i) { + throw i.name === Xs ? n : i; + } + }, + }, + { + key: "saveRecogState", + value: function () { + var e = this.errors, + t = or(this.RULE_STACK); + return { + errors: e, + lexerState: this.exportLexerState(), + RULE_STACK: t, + CST_STACK: this.CST_STACK, + }; + }, + }, + { + key: "reloadRecogState", + value: function (e) { + (this.errors = e.errors), + this.importLexerState(e.lexerState), + (this.RULE_STACK = e.RULE_STACK); + }, + }, + { + key: "ruleInvocationStateUpdate", + value: function (e, t, n) { + this.RULE_OCCURRENCE_STACK.push(n), + this.RULE_STACK.push(e), + this.cstInvocationStateUpdate(t); + }, + }, + { + key: "isBackTracking", + value: function () { + return 0 !== this.isBackTrackingStack.length; + }, + }, + { + key: "getCurrRuleFullName", + value: function () { + var e = this.getLastExplicitRuleShortName(); + return this.shortRuleNameToFull[e]; + }, + }, + { + key: "shortRuleNameToFullName", + value: function (e) { + return this.shortRuleNameToFull[e]; + }, + }, + { + key: "isAtEndOfInput", + value: function () { + return this.tokenMatcher(this.LA(1), Yo); + }, + }, + { + key: "reset", + value: function () { + this.resetLexerState(), + (this.subruleIdx = 0), + (this.isBackTrackingStack = []), + (this.errors = []), + (this.RULE_STACK = []), + (this.CST_STACK = []), + (this.RULE_OCCURRENCE_STACK = []); + }, + }, + ]), + e + ); + })(), + Al = (function () { + function e() { + (0, p.Z)(this, e); + } + return ( + (0, v.Z)(e, [ + { + key: "initErrorHandler", + value: function (e) { + (this._errors = []), + (this.errorMessageProvider = Bi( + e, + "errorMessageProvider" + ) + ? e.errorMessageProvider + : Ll.errorMessageProvider); + }, + }, + { + key: "SAVE_ERROR", + value: function (e) { + if (Zs(e)) + return ( + (e.context = { + ruleStack: this.getHumanReadableRuleStack(), + ruleOccurrenceStack: or( + this.RULE_OCCURRENCE_STACK + ), + }), + this._errors.push(e), + e + ); + throw Error( + "Trying to save an Error which is not a RecognitionException" + ); + }, + }, + { + key: "errors", + get: function () { + return or(this._errors); + }, + set: function (e) { + this._errors = e; + }, + }, + { + key: "raiseEarlyExitException", + value: function (e, t, n) { + for ( + var r = this.getCurrRuleFullName(), + i = Es( + e, + this.getGAstProductions()[r], + t, + this.maxLookahead + )[0], + a = [], + o = 1; + o <= this.maxLookahead; + o++ + ) + a.push(this.LA(o)); + var s = this.errorMessageProvider.buildEarlyExitMessage( + { + expectedIterationPaths: i, + actual: a, + previous: this.LA(0), + customUserDescription: n, + ruleName: r, + } + ); + throw this.SAVE_ERROR( + new js(s, this.LA(1), this.LA(0)) + ); + }, + }, + { + key: "raiseNoAltException", + value: function (e, t) { + for ( + var n = this.getCurrRuleFullName(), + r = Ss( + e, + this.getGAstProductions()[n], + this.maxLookahead + ), + i = [], + a = 1; + a <= this.maxLookahead; + a++ + ) + i.push(this.LA(a)); + var o = this.LA(0), + s = this.errorMessageProvider.buildNoViableAltMessage( + { + expectedPathsPerAlt: r, + actual: i, + previous: o, + customUserDescription: t, + ruleName: this.getCurrRuleFullName(), + } + ); + throw this.SAVE_ERROR(new Hs(s, this.LA(1), o)); + }, + }, + ]), + e + ); + })(), + yl = (function () { + function e() { + (0, p.Z)(this, e); + } + return ( + (0, v.Z)(e, [ + { key: "initContentAssist", value: function () {} }, + { + key: "computeContentAssist", + value: function (e, t) { + var n = this.gastProductionsCache[e]; + if (ji(n)) + throw Error( + "Rule ->".concat( + e, + "<- does not exist in this grammar." + ) + ); + return fs([n], t, this.tokenMatcher, this.maxLookahead); + }, + }, + { + key: "getNextPossibleTokenTypes", + value: function (e) { + var t = Si(e.ruleStack), + n = this.getGAstProductions()[t]; + return new is(n, e).startWalking(); + }, + }, + ]), + e + ); + })(), + bl = { + description: + "This Object indicates the Parser is during Recording Phase", + }; + Object.freeze(bl); + var xl = Math.pow(2, 8) - 1, + Sl = Xo({ name: "RECORDING_PHASE_TOKEN", pattern: Uo.NA }); + Mo([Sl]); + var El = qo( + Sl, + "This IToken indicates the Parser is in Recording Phase\n\tSee: https://chevrotain.io/docs/guide/internals.html#grammar-recording for details", + -1, + -1, + -1, + -1, + -1, + -1 + ); + Object.freeze(El); + var _l = { + name: "This CSTNode indicates the Parser is in Recording Phase\n\tSee: https://chevrotain.io/docs/guide/internals.html#grammar-recording for details", + children: {}, + }, + Cl = (function () { + function e() { + (0, p.Z)(this, e); + } + return ( + (0, v.Z)(e, [ + { + key: "initGastRecorder", + value: function (e) { + (this.recordingProdStack = []), + (this.RECORDING_PHASE = !1); + }, + }, + { + key: "enableRecording", + value: function () { + var e = this; + (this.RECORDING_PHASE = !0), + this.TRACE_INIT("Enable Recording", function () { + for ( + var t = function (t) { + var n = t > 0 ? t : ""; + (e["CONSUME".concat(n)] = function (e, n) { + return this.consumeInternalRecord(e, t, n); + }), + (e["SUBRULE".concat(n)] = function (e, n) { + return this.subruleInternalRecord( + e, + t, + n + ); + }), + (e["OPTION".concat(n)] = function (e) { + return this.optionInternalRecord(e, t); + }), + (e["OR".concat(n)] = function (e) { + return this.orInternalRecord(e, t); + }), + (e["MANY".concat(n)] = function (e) { + this.manyInternalRecord(t, e); + }), + (e["MANY_SEP".concat(n)] = function (e) { + this.manySepFirstInternalRecord(t, e); + }), + (e["AT_LEAST_ONE".concat(n)] = function ( + e + ) { + this.atLeastOneInternalRecord(t, e); + }), + (e["AT_LEAST_ONE_SEP".concat(n)] = + function (e) { + this.atLeastOneSepFirstInternalRecord( + t, + e + ); + }); + }, + n = 0; + n < 10; + n++ + ) + t(n); + (e.consume = function (e, t, n) { + return this.consumeInternalRecord(t, e, n); + }), + (e.subrule = function (e, t, n) { + return this.subruleInternalRecord(t, e, n); + }), + (e.option = function (e, t) { + return this.optionInternalRecord(t, e); + }), + (e.or = function (e, t) { + return this.orInternalRecord(t, e); + }), + (e.many = function (e, t) { + this.manyInternalRecord(e, t); + }), + (e.atLeastOne = function (e, t) { + this.atLeastOneInternalRecord(e, t); + }), + (e.ACTION = e.ACTION_RECORD), + (e.BACKTRACK = e.BACKTRACK_RECORD), + (e.LA = e.LA_RECORD); + }); + }, + }, + { + key: "disableRecording", + value: function () { + var e = this; + (this.RECORDING_PHASE = !1), + this.TRACE_INIT( + "Deleting Recording methods", + function () { + for (var t = e, n = 0; n < 10; n++) { + var r = n > 0 ? n : ""; + delete t["CONSUME".concat(r)], + delete t["SUBRULE".concat(r)], + delete t["OPTION".concat(r)], + delete t["OR".concat(r)], + delete t["MANY".concat(r)], + delete t["MANY_SEP".concat(r)], + delete t["AT_LEAST_ONE".concat(r)], + delete t["AT_LEAST_ONE_SEP".concat(r)]; + } + delete t.consume, + delete t.subrule, + delete t.option, + delete t.or, + delete t.many, + delete t.atLeastOne, + delete t.ACTION, + delete t.BACKTRACK, + delete t.LA; + } + ); + }, + }, + { key: "ACTION_RECORD", value: function (e) {} }, + { + key: "BACKTRACK_RECORD", + value: function (e, t) { + return function () { + return !0; + }; + }, + }, + { + key: "LA_RECORD", + value: function (e) { + return Rl; + }, + }, + { + key: "topLevelRuleRecord", + value: function (e, t) { + try { + var n = new fa({ definition: [], name: e }); + return ( + (n.name = e), + this.recordingProdStack.push(n), + t.call(this), + this.recordingProdStack.pop(), + n + ); + } catch (r) { + if (!0 !== r.KNOWN_RECORDER_ERROR) + try { + r.message = + r.message + + '\n\t This error was thrown during the "grammar recording phase" For more info see:\n\thttps://chevrotain.io/docs/guide/internals.html#grammar-recording'; + } catch (i) { + throw r; + } + throw r; + } + }, + }, + { + key: "optionInternalRecord", + value: function (e, t) { + return wl.call(this, ha, e, t); + }, + }, + { + key: "atLeastOneInternalRecord", + value: function (e, t) { + wl.call(this, pa, t, e); + }, + }, + { + key: "atLeastOneSepFirstInternalRecord", + value: function (e, t) { + wl.call(this, va, t, e, true); + }, + }, + { + key: "manyInternalRecord", + value: function (e, t) { + wl.call(this, ma, t, e); + }, + }, + { + key: "manySepFirstInternalRecord", + value: function (e, t) { + wl.call(this, ga, t, e, true); + }, + }, + { + key: "orInternalRecord", + value: function (e, t) { + return Tl.call(this, e, t); + }, + }, + { + key: "subruleInternalRecord", + value: function (e, t, n) { + if ((Il(t), !e || !1 === Bi(e, "ruleName"))) { + var r = new Error( + " argument is invalid expecting a Parser method reference but got: <" + ) + .concat( + JSON.stringify(e), + ">\n inside top level rule: <" + ) + .concat(this.recordingProdStack[0].name, ">") + ); + throw ((r.KNOWN_RECORDER_ERROR = !0), r); + } + var i = ci(this.recordingProdStack), + a = e.ruleName, + o = new ca({ + idx: t, + nonTerminalName: a, + label: + null === n || void 0 === n ? void 0 : n.LABEL, + referencedRule: void 0, + }); + return i.definition.push(o), this.outputCst ? _l : bl; + }, + }, + { + key: "consumeInternalRecord", + value: function (e, t, n) { + if ((Il(t), !ko(e))) { + var r = new Error( + " argument is invalid expecting a TokenType reference but got: <" + ) + .concat( + JSON.stringify(e), + ">\n inside top level rule: <" + ) + .concat(this.recordingProdStack[0].name, ">") + ); + throw ((r.KNOWN_RECORDER_ERROR = !0), r); + } + var i = ci(this.recordingProdStack), + a = new ya({ + idx: t, + terminalType: e, + label: + null === n || void 0 === n ? void 0 : n.LABEL, + }); + return i.definition.push(a), El; + }, + }, + ]), + e + ); + })(); + function wl(e, t, n) { + var r = + arguments.length > 3 && void 0 !== arguments[3] && arguments[3]; + Il(n); + var i = ci(this.recordingProdStack), + a = Y(t) ? t : t.DEF, + o = new e({ definition: [], idx: n }); + return ( + r && (o.separator = t.SEP), + Bi(t, "MAX_LOOKAHEAD") && (o.maxLookahead = t.MAX_LOOKAHEAD), + this.recordingProdStack.push(o), + a.call(this), + i.definition.push(o), + this.recordingProdStack.pop(), + bl + ); + } + function Tl(e, t) { + var n = this; + Il(t); + var r = ci(this.recordingProdStack), + i = !1 === w(e), + a = !1 === i ? e : e.DEF, + o = new Aa({ + definition: [], + idx: t, + ignoreAmbiguities: i && !0 === e.IGNORE_AMBIGUITIES, + }); + Bi(e, "MAX_LOOKAHEAD") && (o.maxLookahead = e.MAX_LOOKAHEAD); + var s = ea(a, function (e) { + return Y(e.GATE); + }); + return ( + (o.hasPredicates = s), + r.definition.push(o), + hi(a, function (e) { + var t = new da({ definition: [] }); + o.definition.push(t), + Bi(e, "IGNORE_AMBIGUITIES") + ? (t.ignoreAmbiguities = e.IGNORE_AMBIGUITIES) + : Bi(e, "GATE") && (t.ignoreAmbiguities = !0), + n.recordingProdStack.push(t), + e.ALT.call(n), + n.recordingProdStack.pop(); + }), + bl + ); + } + function Ml(e) { + return 0 === e ? "" : "".concat(e); + } + function Il(e) { + if (e < 0 || e > xl) { + var t = new Error( + "Invalid DSL Method idx value: <" + .concat( + e, + ">\n\tIdx value must be a none negative value smaller than " + ) + .concat(xl + 1) + ); + throw ((t.KNOWN_RECORDER_ERROR = !0), t); + } + } + var kl = (function () { + function e() { + (0, p.Z)(this, e); + } + return ( + (0, v.Z)(e, [ + { + key: "initPerformanceTracer", + value: function (e) { + if (Bi(e, "traceInitPerf")) { + var t = e.traceInitPerf, + n = "number" === typeof t; + (this.traceInitMaxIdent = n ? t : 1 / 0), + (this.traceInitPerf = n ? t > 0 : t); + } else + (this.traceInitMaxIdent = 0), + (this.traceInitPerf = Ll.traceInitPerf); + this.traceInitIndent = -1; + }, + }, + { + key: "TRACE_INIT", + value: function (e, t) { + if (!0 === this.traceInitPerf) { + this.traceInitIndent++; + var n = new Array(this.traceInitIndent + 1).join("\t"); + this.traceInitIndent < this.traceInitMaxIdent && + console.log("".concat(n, "--\x3e <").concat(e, ">")); + var r = oa(t), + i = r.time, + a = r.value, + o = i > 10 ? console.warn : console.log; + return ( + this.traceInitIndent < this.traceInitMaxIdent && + o( + "" + .concat(n, "<-- <") + .concat(e, "> time: ") + .concat(i, "ms") + ), + this.traceInitIndent--, + a + ); + } + return t(); + }, + }, + ]), + e + ); + })(); + var Rl = qo(Yo, "", NaN, NaN, NaN, NaN, NaN, NaN); + Object.freeze(Rl); + var Bl, + Pl, + Ll = Object.freeze({ + recoveryEnabled: !1, + maxLookahead: 3, + dynamicTokensEnabled: !1, + outputCst: !0, + errorMessageProvider: Jo, + nodeLocationTracking: "none", + traceInitPerf: !1, + skipValidations: !1, + }), + Dl = Object.freeze({ + recoveryValueFunc: function () {}, + resyncEnabled: !0, + }); + ((Pl = Bl || (Bl = {}))[(Pl.INVALID_RULE_NAME = 0)] = + "INVALID_RULE_NAME"), + (Pl[(Pl.DUPLICATE_RULE_NAME = 1)] = "DUPLICATE_RULE_NAME"), + (Pl[(Pl.INVALID_RULE_OVERRIDE = 2)] = "INVALID_RULE_OVERRIDE"), + (Pl[(Pl.DUPLICATE_PRODUCTIONS = 3)] = "DUPLICATE_PRODUCTIONS"), + (Pl[(Pl.UNRESOLVED_SUBRULE_REF = 4)] = "UNRESOLVED_SUBRULE_REF"), + (Pl[(Pl.LEFT_RECURSION = 5)] = "LEFT_RECURSION"), + (Pl[(Pl.NONE_LAST_EMPTY_ALT = 6)] = "NONE_LAST_EMPTY_ALT"), + (Pl[(Pl.AMBIGUOUS_ALTS = 7)] = "AMBIGUOUS_ALTS"), + (Pl[(Pl.CONFLICT_TOKENS_RULES_NAMESPACE = 8)] = + "CONFLICT_TOKENS_RULES_NAMESPACE"), + (Pl[(Pl.INVALID_TOKEN_NAME = 9)] = "INVALID_TOKEN_NAME"), + (Pl[(Pl.NO_NON_EMPTY_LOOKAHEAD = 10)] = "NO_NON_EMPTY_LOOKAHEAD"), + (Pl[(Pl.AMBIGUOUS_PREFIX_ALTS = 11)] = "AMBIGUOUS_PREFIX_ALTS"), + (Pl[(Pl.TOO_MANY_ALTS = 12)] = "TOO_MANY_ALTS"), + (Pl[(Pl.CUSTOM_LOOKAHEAD_VALIDATION = 13)] = + "CUSTOM_LOOKAHEAD_VALIDATION"); + var Ul, + Fl = (function () { + function e(t, n) { + (0, p.Z)(this, e), + (this.definitionErrors = []), + (this.selfAnalysisDone = !1); + var r = this; + if ( + (r.initErrorHandler(n), + r.initLexerAdapter(), + r.initLooksAhead(n), + r.initRecognizerEngine(t, n), + r.initRecoverable(n), + r.initTreeBuilder(n), + r.initContentAssist(), + r.initGastRecorder(n), + r.initPerformanceTracer(n), + Bi(n, "ignoredIssues")) + ) + throw new Error( + "The IParserConfig property has been deprecated.\n\tPlease use the flag on the relevant DSL method instead.\n\tSee: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#IGNORING_AMBIGUITIES\n\tFor further details." + ); + this.skipValidations = Bi(n, "skipValidations") + ? n.skipValidations + : Ll.skipValidations; + } + return ( + (0, v.Z)( + e, + [ + { + key: "performSelfAnalysis", + value: function () { + var t = this; + this.TRACE_INIT("performSelfAnalysis", function () { + var n; + t.selfAnalysisDone = !0; + var r = t.className; + t.TRACE_INIT("toFastProps", function () { + sa(t); + }), + t.TRACE_INIT("Grammar Recording", function () { + try { + t.enableRecording(), + hi(t.definedRulesNames, function (e) { + var n, + r = t[e].originalGrammarAction; + t.TRACE_INIT( + "".concat(e, " Rule"), + function () { + n = t.topLevelRuleRecord(e, r); + } + ), + (t.gastProductionsCache[e] = n); + }); + } finally { + t.disableRecording(); + } + }); + var i = []; + if ( + (t.TRACE_INIT("Grammar Resolving", function () { + (i = Ds({ rules: Di(t.gastProductionsCache) })), + (t.definitionErrors = + t.definitionErrors.concat(i)); + }), + t.TRACE_INIT("Grammar Validations", function () { + if (Qi(i) && !1 === t.skipValidations) { + var e = + ((a = { + rules: Di(t.gastProductionsCache), + tokenTypes: Di(t.tokensMap), + errMsgProvider: $o, + grammarName: r, + }), + ws( + (a = oi(a, { errMsgProvider: $o })) + .rules, + a.tokenTypes, + a.errMsgProvider, + a.grammarName + )), + n = (function (e) { + return _i( + e.lookaheadStrategy.validate({ + rules: e.rules, + tokenTypes: e.tokenTypes, + grammarName: e.grammarName, + }), + function (e) { + return Object.assign( + { + type: Bl.CUSTOM_LOOKAHEAD_VALIDATION, + }, + e + ); + } + ); + })({ + lookaheadStrategy: t.lookaheadStrategy, + rules: Di(t.gastProductionsCache), + tokenTypes: Di(t.tokensMap), + grammarName: r, + }); + t.definitionErrors = + t.definitionErrors.concat(e, n); + } + var a; + }), + Qi(t.definitionErrors) && + (t.recoveryEnabled && + t.TRACE_INIT( + "computeAllProdsFollows", + function () { + var e = (function (e) { + var t = {}; + return ( + hi(e, function (e) { + var n = new Ma(e).startWalking(); + ct(t, n); + }), + t + ); + })(Di(t.gastProductionsCache)); + t.resyncFollows = e; + } + ), + t.TRACE_INIT( + "ComputeLookaheadFunctions", + function () { + var e, n; + null === + (n = (e = t.lookaheadStrategy) + .initialize) || + void 0 === n || + n.call(e, { + rules: Di(t.gastProductionsCache), + }), + t.preComputeLookaheadFunctions( + Di(t.gastProductionsCache) + ); + } + )), + !e.DEFER_DEFINITION_ERRORS_HANDLING && + !Qi(t.definitionErrors)) + ) + throw ( + ((n = _i(t.definitionErrors, function (e) { + return e.message; + })), + new Error( + "Parser Definition Errors detected:\n ".concat( + n.join( + "\n-------------------------------\n" + ) + ) + )) + ); + }); + }, + }, + ], + [ + { + key: "performSelfAnalysis", + value: function (e) { + throw Error( + "The **static** `performSelfAnalysis` method has been deprecated.\t\nUse the **instance** method with the same name instead." + ); + }, + }, + ] + ), + e + ); + })(); + (Fl.DEFER_DEFINITION_ERRORS_HANDLING = !1), + (Ul = Fl), + [qs, rl, pl, vl, gl, ml, Al, yl, Cl, kl].forEach(function (e) { + var t = e.prototype; + Object.getOwnPropertyNames(t).forEach(function (n) { + if ("constructor" !== n) { + var r = Object.getOwnPropertyDescriptor(t, n); + r && (r.get || r.set) + ? Object.defineProperty(Ul.prototype, n, r) + : (Ul.prototype[n] = e.prototype[n]); + } + }); + }); + var Ol = (function (e) { + (0, m.Z)(n, e); + var t = (0, g.Z)(n); + function n(e) { + var r = + arguments.length > 1 && void 0 !== arguments[1] + ? arguments[1] + : Ll; + (0, p.Z)(this, n); + var i = or(r); + return (i.outputCst = !0), t.call(this, e, i); + } + return (0, v.Z)(n); + })(Fl); + return { CstParser: Ol, Lexer: Uo, createToken: Xo }; + })(), + _f = Ef.CstParser, + Cf = Ef.Lexer, + wf = Ef.createToken, + Tf = null, + Mf = null, + If = null, + kf = null, + Rf = { INTENSITY: 1, INTENSITY_ALPHA: 2, RGB: 3, RGBA: 4 }, + Bf = (function () { + function e() { + var t = + arguments.length > 0 && void 0 !== arguments[0] + ? arguments[0] + : 4; + (0, p.Z)(this, e), + (this.pool = t), + (this.queue = []), + (this.workers = []), + (this.workersResolve = []), + (this.workerStatus = 0); + } + return ( + (0, v.Z)(e, [ + { + key: "_initWorker", + value: function (e) { + if (!this.workers[e]) { + var t = this.workerCreator(); + t.addEventListener( + "message", + this._onMessage.bind(this, e) + ), + (this.workers[e] = t); + } + }, + }, + { + key: "_getIdleWorker", + value: function () { + for (var e = 0; e < this.pool; e++) + if (!(this.workerStatus & (1 << e))) return e; + return -1; + }, + }, + { + key: "_onMessage", + value: function (e, t) { + var n = this.workersResolve[e]; + if ((n && n(t), this.queue.length)) { + var r = this.queue.shift(), + i = r.resolve, + a = r.msg, + o = r.transfer; + (this.workersResolve[e] = i), + this.workers[e].postMessage(a, o); + } else this.workerStatus ^= 1 << e; + }, + }, + { + key: "setWorkerCreator", + value: function (e) { + this.workerCreator = e; + }, + }, + { + key: "setWorkerLimit", + value: function (e) { + this.pool = e; + }, + }, + { + key: "postMessage", + value: function (e, t) { + var n = this; + return new Promise(function (r) { + var i = n._getIdleWorker(); + -1 !== i + ? (n._initWorker(i), + (n.workerStatus |= 1 << i), + (n.workersResolve[i] = r), + n.workers[i].postMessage(e, t)) + : n.queue.push({ resolve: r, msg: e, transfer: t }); + }); + }, + }, + { + key: "dispose", + value: function () { + this.workers.forEach(function (e) { + return e.terminate(); + }), + (this.workersResolve.length = 0), + (this.workers.length = 0), + (this.queue.length = 0), + (this.workerStatus = 0); + }, + }, + ]), + e + ); + })(), + Pf = (function (e) { + (0, m.Z)(n, e); + var t = (0, g.Z)(n); + function n(e, r, i, a, o, s) { + var l; + return ( + (0, p.Z)(this, n), + ((l = t.call(this, e, r, i, o, s)).isCompressedArrayTexture = + !0), + (l.image.depth = a), + (l.wrapR = A.ClampToEdgeWrapping), + l + ); + } + return (0, v.Z)(n); + })(A.CompressedTexture), + Lf = new WeakMap(), + Df = 0, + Uf, + Ff = (function (e) { + (0, m.Z)(n, e); + var t = (0, g.Z)(n); + function n(e) { + var r; + return ( + (0, p.Z)(this, n), + ((r = t.call(this, e)).transcoderPath = ""), + (r.transcoderBinary = null), + (r.transcoderPending = null), + (r.workerPool = new Bf()), + (r.workerSourceURL = ""), + (r.workerConfig = null), + "undefined" !== typeof MSC_TRANSCODER && + console.warn( + 'THREE.KTX2Loader: Please update to latest "basis_transcoder". "msc_basis_transcoder" is no longer supported in three.js r125+.' + ), + r + ); + } + return ( + (0, v.Z)(n, [ + { + key: "setTranscoderPath", + value: function (e) { + return (this.transcoderPath = e), this; + }, + }, + { + key: "setWorkerLimit", + value: function (e) { + return this.workerPool.setWorkerLimit(e), this; + }, + }, + { + key: "detectSupport", + value: function (e) { + return ( + (this.workerConfig = { + astcSupported: e.extensions.has( + "WEBGL_compressed_texture_astc" + ), + etc1Supported: e.extensions.has( + "WEBGL_compressed_texture_etc1" + ), + etc2Supported: e.extensions.has( + "WEBGL_compressed_texture_etc" + ), + dxtSupported: e.extensions.has( + "WEBGL_compressed_texture_s3tc" + ), + bptcSupported: e.extensions.has( + "EXT_texture_compression_bptc" + ), + pvrtcSupported: + e.extensions.has("WEBGL_compressed_texture_pvrtc") || + e.extensions.has( + "WEBKIT_WEBGL_compressed_texture_pvrtc" + ), + }), + e.capabilities.isWebGL2 && + (this.workerConfig.etc1Supported = !1), + this + ); + }, + }, + { + key: "init", + value: function () { + var e = this; + if (!this.transcoderPending) { + var t = new A.FileLoader(this.manager); + t.setPath(this.transcoderPath), + t.setWithCredentials(this.withCredentials); + var r = t.loadAsync("basis_transcoder.js"), + i = new A.FileLoader(this.manager); + i.setPath(this.transcoderPath), + i.setResponseType("arraybuffer"), + i.setWithCredentials(this.withCredentials); + var o = i.loadAsync("basis_transcoder.wasm"); + (this.transcoderPending = Promise.all([r, o]).then( + function (t) { + var r = (0, a.Z)(t, 2), + i = r[0], + o = r[1], + s = n.BasisWorker.toString(), + l = [ + "/* constants */", + "let _EngineFormat = " + + JSON.stringify(n.EngineFormat), + "let _TranscoderFormat = " + + JSON.stringify(n.TranscoderFormat), + "let _BasisFormat = " + + JSON.stringify(n.BasisFormat), + "/* basis_transcoder.js */", + i, + "/* worker */", + s.substring( + s.indexOf("{") + 1, + s.lastIndexOf("}") + ), + ].join("\n"); + (e.workerSourceURL = URL.createObjectURL( + new Blob([l]) + )), + (e.transcoderBinary = o), + e.workerPool.setWorkerCreator(function () { + var t = new Worker(e.workerSourceURL), + n = e.transcoderBinary.slice(0); + return ( + t.postMessage( + { + type: "init", + config: e.workerConfig, + transcoderBinary: n, + }, + [n] + ), + t + ); + }); + } + )), + Df > 0 && + console.warn( + "THREE.KTX2Loader: Multiple active KTX2 loaders may cause performance issues. Use a single KTX2Loader instance, or call .dispose() on old instances." + ), + Df++; + } + return this.transcoderPending; + }, + }, + { + key: "load", + value: function (e, t, n, r) { + var i = this; + if (null === this.workerConfig) + throw new Error( + "THREE.KTX2Loader: Missing initialization with `.detectSupport( renderer )`." + ); + var a = new A.FileLoader(this.manager); + a.setResponseType("arraybuffer"), + a.setWithCredentials(this.withCredentials), + a.load( + e, + function (e) { + if (Lf.has(e)) + return Lf.get(e).promise.then(t).catch(r); + i._createTexture(e) + .then(function (e) { + return t ? t(e) : null; + }) + .catch(r); + }, + n, + r + ); + }, + }, + { + key: "_createTextureFrom", + value: function (e, t) { + var n = e.mipmaps, + r = e.width, + i = e.height, + a = e.format, + o = e.type, + s = e.error, + l = e.dfdTransferFn, + u = e.dfdFlags; + if ("error" === o) return Promise.reject(s); + var c = + t.layerCount > 1 + ? new Pf(n, r, i, t.layerCount, a, A.UnsignedByteType) + : new A.CompressedTexture( + n, + r, + i, + a, + A.UnsignedByteType + ); + return ( + (c.minFilter = + 1 === n.length + ? A.LinearFilter + : A.LinearMipmapLinearFilter), + (c.magFilter = A.LinearFilter), + (c.generateMipmaps = !1), + (c.needsUpdate = !0), + "colorSpace" in c + ? (c.colorSpace = l === b.FVZ ? "srgb" : "srgb-linear") + : (c.encoding = l === b.FVZ ? 3001 : 3e3), + (c.premultiplyAlpha = !!(u & b.qHj)), + c + ); + }, + }, + { + key: "_createTexture", + value: (function () { + var e = (0, c.Z)( + (0, u.Z)().mark(function e(t) { + var n, + r, + i, + a, + o = this, + s = arguments; + return (0, u.Z)().wrap( + function (e) { + for (;;) + switch ((e.prev = e.next)) { + case 0: + if ( + ((n = + s.length > 1 && void 0 !== s[1] + ? s[1] + : {}), + (r = (0, b.ij3)(new Uint8Array(t))) + .vkFormat === b.kXg) + ) { + e.next = 4; + break; + } + return e.abrupt("return", zf(r)); + case 4: + return ( + (i = n), + (a = this.init() + .then(function () { + return o.workerPool.postMessage( + { + type: "transcode", + buffer: t, + taskConfig: i, + }, + [t] + ); + }) + .then(function (e) { + return o._createTextureFrom(e.data, r); + })), + Lf.set(t, { promise: a }), + e.abrupt("return", a) + ); + case 8: + case "end": + return e.stop(); + } + }, + e, + this + ); + }) + ); + return function (t) { + return e.apply(this, arguments); + }; + })(), + }, + { + key: "dispose", + value: function () { + return ( + this.workerPool.dispose(), + this.workerSourceURL && + URL.revokeObjectURL(this.workerSourceURL), + Df--, + this + ); + }, + }, + ]), + n + ); + })(A.Loader), + Of = Ff; + A.RGBAFormat, + A.RGBA_ASTC_4x4_Format, + A.RGBA_BPTC_Format, + A.RGBA_ETC2_EAC_Format, + A.RGBA_PVRTC_4BPPV1_Format, + A.RGBA_S3TC_DXT5_Format, + A.RGB_ETC1_Format, + A.RGB_ETC2_Format, + A.RGB_PVRTC_4BPPV1_Format, + A.RGB_S3TC_DXT1_Format; + var Nf = + ((S = {}), + (0, l.Z)(S, b.qfi, A.RGBAFormat), + (0, l.Z)(S, b.IgZ, A.RGBAFormat), + (0, l.Z)(S, b.MCP, A.RGBAFormat), + (0, l.Z)(S, b.OmG, A.RGBAFormat), + (0, l.Z)(S, b.bWS, A.RGFormat), + (0, l.Z)(S, b.LR2, A.RGFormat), + (0, l.Z)(S, b.gJS, A.RGFormat), + (0, l.Z)(S, b.IJq, A.RGFormat), + (0, l.Z)(S, b.eQx, A.RedFormat), + (0, l.Z)(S, b.wOb, A.RedFormat), + (0, l.Z)(S, b.e1Y, A.RedFormat), + (0, l.Z)(S, b.tLr, A.RedFormat), + S), + Gf = + ((E = {}), + (0, l.Z)(E, b.qfi, A.FloatType), + (0, l.Z)(E, b.IgZ, A.HalfFloatType), + (0, l.Z)(E, b.MCP, A.UnsignedByteType), + (0, l.Z)(E, b.OmG, A.UnsignedByteType), + (0, l.Z)(E, b.bWS, A.FloatType), + (0, l.Z)(E, b.LR2, A.HalfFloatType), + (0, l.Z)(E, b.gJS, A.UnsignedByteType), + (0, l.Z)(E, b.IJq, A.UnsignedByteType), + (0, l.Z)(E, b.eQx, A.FloatType), + (0, l.Z)(E, b.wOb, A.HalfFloatType), + (0, l.Z)(E, b.e1Y, A.UnsignedByteType), + (0, l.Z)(E, b.tLr, A.UnsignedByteType), + E), + Zf = + ((_ = {}), + (0, l.Z)(_, b.OmG, 3001), + (0, l.Z)(_, b.IJq, 3001), + (0, l.Z)(_, b.e1Y, 3001), + _); + function zf(e) { + return Qf.apply(this, arguments); + } + function Qf() { + return ( + (Qf = (0, c.Z)( + (0, u.Z)().mark(function e(t) { + var n, r, i, a, o, s, l, f; + return (0, u.Z)().wrap(function (e) { + for (;;) + switch ((e.prev = e.next)) { + case 0: + if ( + ((n = t.vkFormat), + (r = t.pixelWidth), + (i = t.pixelHeight), + (a = t.pixelDepth), + void 0 !== Nf[n]) + ) { + e.next = 3; + break; + } + throw new Error( + "THREE.KTX2Loader: Unsupported vkFormat." + ); + case 3: + if ( + ((o = t.levels[0]), t.supercompressionScheme !== b.Oi) + ) { + e.next = 8; + break; + } + (s = o.levelData), (e.next = 16); + break; + case 8: + if (t.supercompressionScheme !== b.c6w) { + e.next = 15; + break; + } + return ( + Uf || + (Uf = new Promise( + (function () { + var e = (0, c.Z)( + (0, u.Z)().mark(function e(t) { + var n; + return (0, u.Z)().wrap(function (e) { + for (;;) + switch ((e.prev = e.next)) { + case 0: + return ( + (n = new x.L()), + (e.next = 3), + n.init() + ); + case 3: + t(n); + case 4: + case "end": + return e.stop(); + } + }, e); + }) + ); + return function (t) { + return e.apply(this, arguments); + }; + })() + )), + (e.next = 12), + Uf + ); + case 12: + (s = e.sent.decode( + o.levelData, + o.uncompressedByteLength + )), + (e.next = 16); + break; + case 15: + throw new Error( + "THREE.KTX2Loader: Unsupported supercompressionScheme." + ); + case 16: + return ( + (l = + Gf[n] === A.FloatType + ? new Float32Array( + s.buffer, + s.byteOffset, + s.byteLength / Float32Array.BYTES_PER_ELEMENT + ) + : Gf[n] === A.HalfFloatType + ? new Uint16Array( + s.buffer, + s.byteOffset, + s.byteLength / Uint16Array.BYTES_PER_ELEMENT + ) + : s), + ((f = + 0 === a + ? new A.DataTexture(l, r, i) + : new ff(l, r, i, a)).type = Gf[n]), + (f.format = Nf[n]), + (f.encoding = Zf[n] || 3e3), + (f.needsUpdate = !0), + e.abrupt("return", Promise.resolve(f)) + ); + case 23: + case "end": + return e.stop(); + } + }, e); + }) + )), + Qf.apply(this, arguments) + ); + } + var Hf = null, + Vf = null, + jf = (function () { + var e = 0, + t = -3; + function n() { + (this.table = new Uint16Array(16)), + (this.trans = new Uint16Array(288)); + } + function r(e, t) { + (this.source = e), + (this.sourceIndex = 0), + (this.tag = 0), + (this.bitcount = 0), + (this.dest = t), + (this.destLen = 0), + (this.ltree = new n()), + (this.dtree = new n()); + } + var i = new n(), + a = new n(), + o = new Uint8Array(30), + s = new Uint16Array(30), + l = new Uint8Array(30), + u = new Uint16Array(30), + c = new Uint8Array([ + 16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, + 15, + ]), + f = new n(), + d = new Uint8Array(320); + function h(e, t, n, r) { + var i, a; + for (i = 0; i < n; ++i) e[i] = 0; + for (i = 0; i < 30 - n; ++i) e[i + n] = (i / n) | 0; + for (a = r, i = 0; i < 30; ++i) (t[i] = a), (a += 1 << e[i]); + } + var p = new Uint16Array(16); + function v(e, t, n, r) { + var i, a; + for (i = 0; i < 16; ++i) e.table[i] = 0; + for (i = 0; i < r; ++i) e.table[t[n + i]]++; + for (e.table[0] = 0, a = 0, i = 0; i < 16; ++i) + (p[i] = a), (a += e.table[i]); + for (i = 0; i < r; ++i) t[n + i] && (e.trans[p[t[n + i]]++] = i); + } + function m(e) { + e.bitcount-- || + ((e.tag = e.source[e.sourceIndex++]), (e.bitcount = 7)); + var t = 1 & e.tag; + return (e.tag >>>= 1), t; + } + function g(e, t, n) { + if (!t) return n; + for (; e.bitcount < 24; ) + (e.tag |= e.source[e.sourceIndex++] << e.bitcount), + (e.bitcount += 8); + var r = e.tag & (65535 >>> (16 - t)); + return (e.tag >>>= t), (e.bitcount -= t), r + n; + } + function A(e, t) { + for (; e.bitcount < 24; ) + (e.tag |= e.source[e.sourceIndex++] << e.bitcount), + (e.bitcount += 8); + var n = 0, + r = 0, + i = 0, + a = e.tag; + do { + (r = 2 * r + (1 & a)), + (a >>>= 1), + ++i, + (n += t.table[i]), + (r -= t.table[i]); + } while (r >= 0); + return (e.tag = a), (e.bitcount -= i), t.trans[n + r]; + } + function y(e, t, n) { + var r, i, a, o, s, l; + for ( + r = g(e, 5, 257), i = g(e, 5, 1), a = g(e, 4, 4), o = 0; + o < 19; + ++o + ) + d[o] = 0; + for (o = 0; o < a; ++o) { + var u = g(e, 3, 0); + d[c[o]] = u; + } + for (v(f, d, 0, 19), s = 0; s < r + i; ) { + var h = A(e, f); + switch (h) { + case 16: + var p = d[s - 1]; + for (l = g(e, 2, 3); l; --l) d[s++] = p; + break; + case 17: + for (l = g(e, 3, 3); l; --l) d[s++] = 0; + break; + case 18: + for (l = g(e, 7, 11); l; --l) d[s++] = 0; + break; + default: + d[s++] = h; + } + } + v(t, d, 0, r), v(n, d, r, i); + } + function b(t, n, r) { + for (;;) { + var i, + a, + c, + f, + d = A(t, n); + if (256 === d) return e; + if (d < 256) t.dest[t.destLen++] = d; + else + for ( + i = g(t, o[(d -= 257)], s[d]), + a = A(t, r), + f = c = t.destLen - g(t, l[a], u[a]); + f < c + i; + ++f + ) + t.dest[t.destLen++] = t.dest[f]; + } + } + function x(n) { + for (var r, i; n.bitcount > 8; ) + n.sourceIndex--, (n.bitcount -= 8); + if ( + (r = + 256 * (r = n.source[n.sourceIndex + 1]) + + n.source[n.sourceIndex]) !== + (65535 & + ~( + 256 * n.source[n.sourceIndex + 3] + + n.source[n.sourceIndex + 2] + )) + ) + return t; + for (n.sourceIndex += 4, i = r; i; --i) + n.dest[n.destLen++] = n.source[n.sourceIndex++]; + return (n.bitcount = 0), e; + } + !(function (e, t) { + var n; + for (n = 0; n < 7; ++n) e.table[n] = 0; + for ( + e.table[7] = 24, e.table[8] = 152, e.table[9] = 112, n = 0; + n < 24; + ++n + ) + e.trans[n] = 256 + n; + for (n = 0; n < 144; ++n) e.trans[24 + n] = n; + for (n = 0; n < 8; ++n) e.trans[168 + n] = 280 + n; + for (n = 0; n < 112; ++n) e.trans[176 + n] = 144 + n; + for (n = 0; n < 5; ++n) t.table[n] = 0; + for (t.table[5] = 32, n = 0; n < 32; ++n) t.trans[n] = n; + })(i, a), + h(o, s, 4, 3), + h(l, u, 2, 1), + (o[28] = 0), + (s[28] = 258); + var S = function (n, o) { + var s, + l, + u = new r(n, o); + do { + switch (((s = m(u)), g(u, 2, 0))) { + case 0: + l = x(u); + break; + case 1: + l = b(u, i, a); + break; + case 2: + y(u, u.ltree, u.dtree), (l = b(u, u.ltree, u.dtree)); + break; + default: + l = t; + } + if (l !== e) throw new Error("Data error"); + } while (!s); + return u.destLen < u.dest.length + ? "function" === typeof u.dest.slice + ? u.dest.slice(0, u.destLen) + : u.dest.subarray(0, u.destLen) + : u.dest; + }; + function E(e, t, n, r, i) { + return ( + Math.pow(1 - i, 3) * e + + 3 * Math.pow(1 - i, 2) * i * t + + 3 * (1 - i) * Math.pow(i, 2) * n + + Math.pow(i, 3) * r + ); + } + function _() { + (this.x1 = Number.NaN), + (this.y1 = Number.NaN), + (this.x2 = Number.NaN), + (this.y2 = Number.NaN); + } + function C() { + (this.commands = []), + (this.fill = "black"), + (this.stroke = null), + (this.strokeWidth = 1); + } + function w(e) { + throw new Error(e); + } + function T(e, t) { + e || w(t); + } + (_.prototype.isEmpty = function () { + return ( + isNaN(this.x1) || + isNaN(this.y1) || + isNaN(this.x2) || + isNaN(this.y2) + ); + }), + (_.prototype.addPoint = function (e, t) { + "number" === typeof e && + ((isNaN(this.x1) || isNaN(this.x2)) && + ((this.x1 = e), (this.x2 = e)), + e < this.x1 && (this.x1 = e), + e > this.x2 && (this.x2 = e)), + "number" === typeof t && + ((isNaN(this.y1) || isNaN(this.y2)) && + ((this.y1 = t), (this.y2 = t)), + t < this.y1 && (this.y1 = t), + t > this.y2 && (this.y2 = t)); + }), + (_.prototype.addX = function (e) { + this.addPoint(e, null); + }), + (_.prototype.addY = function (e) { + this.addPoint(null, e); + }), + (_.prototype.addBezier = function (e, t, n, r, i, a, o, s) { + var l = [e, t], + u = [n, r], + c = [i, a], + f = [o, s]; + this.addPoint(e, t), this.addPoint(o, s); + for (var d = 0; d <= 1; d++) { + var h = 6 * l[d] - 12 * u[d] + 6 * c[d], + p = -3 * l[d] + 9 * u[d] - 9 * c[d] + 3 * f[d], + v = 3 * u[d] - 3 * l[d]; + if (0 !== p) { + var m = Math.pow(h, 2) - 4 * v * p; + if (!(m < 0)) { + var g = (-h + Math.sqrt(m)) / (2 * p); + 0 < g && + g < 1 && + (0 === d && this.addX(E(l[d], u[d], c[d], f[d], g)), + 1 === d && this.addY(E(l[d], u[d], c[d], f[d], g))); + var A = (-h - Math.sqrt(m)) / (2 * p); + 0 < A && + A < 1 && + (0 === d && this.addX(E(l[d], u[d], c[d], f[d], A)), + 1 === d && this.addY(E(l[d], u[d], c[d], f[d], A))); + } + } else { + if (0 === h) continue; + var y = -v / h; + 0 < y && + y < 1 && + (0 === d && this.addX(E(l[d], u[d], c[d], f[d], y)), + 1 === d && this.addY(E(l[d], u[d], c[d], f[d], y))); + } + } + }), + (_.prototype.addQuad = function (e, t, n, r, i, a) { + var o = e + (2 / 3) * (n - e), + s = t + (2 / 3) * (r - t), + l = o + (1 / 3) * (i - e), + u = s + (1 / 3) * (a - t); + this.addBezier(e, t, o, s, l, u, i, a); + }), + (C.prototype.moveTo = function (e, t) { + this.commands.push({ type: "M", x: e, y: t }); + }), + (C.prototype.lineTo = function (e, t) { + this.commands.push({ type: "L", x: e, y: t }); + }), + (C.prototype.curveTo = C.prototype.bezierCurveTo = + function (e, t, n, r, i, a) { + this.commands.push({ + type: "C", + x1: e, + y1: t, + x2: n, + y2: r, + x: i, + y: a, + }); + }), + (C.prototype.quadTo = C.prototype.quadraticCurveTo = + function (e, t, n, r) { + this.commands.push({ type: "Q", x1: e, y1: t, x: n, y: r }); + }), + (C.prototype.close = C.prototype.closePath = + function () { + this.commands.push({ type: "Z" }); + }), + (C.prototype.extend = function (e) { + if (e.commands) e = e.commands; + else if (e instanceof _) { + var t = e; + return ( + this.moveTo(t.x1, t.y1), + this.lineTo(t.x2, t.y1), + this.lineTo(t.x2, t.y2), + this.lineTo(t.x1, t.y2), + void this.close() + ); + } + Array.prototype.push.apply(this.commands, e); + }), + (C.prototype.getBoundingBox = function () { + for ( + var e = new _(), t = 0, n = 0, r = 0, i = 0, a = 0; + a < this.commands.length; + a++ + ) { + var o = this.commands[a]; + switch (o.type) { + case "M": + e.addPoint(o.x, o.y), (t = r = o.x), (n = i = o.y); + break; + case "L": + e.addPoint(o.x, o.y), (r = o.x), (i = o.y); + break; + case "Q": + e.addQuad(r, i, o.x1, o.y1, o.x, o.y), + (r = o.x), + (i = o.y); + break; + case "C": + e.addBezier(r, i, o.x1, o.y1, o.x2, o.y2, o.x, o.y), + (r = o.x), + (i = o.y); + break; + case "Z": + (r = t), (i = n); + break; + default: + throw new Error("Unexpected path command " + o.type); + } + } + return e.isEmpty() && e.addPoint(0, 0), e; + }), + (C.prototype.draw = function (e) { + e.beginPath(); + for (var t = 0; t < this.commands.length; t += 1) { + var n = this.commands[t]; + "M" === n.type + ? e.moveTo(n.x, n.y) + : "L" === n.type + ? e.lineTo(n.x, n.y) + : "C" === n.type + ? e.bezierCurveTo(n.x1, n.y1, n.x2, n.y2, n.x, n.y) + : "Q" === n.type + ? e.quadraticCurveTo(n.x1, n.y1, n.x, n.y) + : "Z" === n.type && e.closePath(); + } + this.fill && ((e.fillStyle = this.fill), e.fill()), + this.stroke && + ((e.strokeStyle = this.stroke), + (e.lineWidth = this.strokeWidth), + e.stroke()); + }), + (C.prototype.toPathData = function (e) { + function t(t) { + return Math.round(t) === t + ? "" + Math.round(t) + : t.toFixed(e); + } + function n() { + for ( + var e = arguments, n = "", r = 0; + r < arguments.length; + r += 1 + ) { + var i = e[r]; + i >= 0 && r > 0 && (n += " "), (n += t(i)); + } + return n; + } + e = void 0 !== e ? e : 2; + for (var r = "", i = 0; i < this.commands.length; i += 1) { + var a = this.commands[i]; + "M" === a.type + ? (r += "M" + n(a.x, a.y)) + : "L" === a.type + ? (r += "L" + n(a.x, a.y)) + : "C" === a.type + ? (r += "C" + n(a.x1, a.y1, a.x2, a.y2, a.x, a.y)) + : "Q" === a.type + ? (r += "Q" + n(a.x1, a.y1, a.x, a.y)) + : "Z" === a.type && (r += "Z"); + } + return r; + }), + (C.prototype.toSVG = function (e) { + var t = '= 0 && e <= 255, + "Byte value should be between 0 and 255." + ), + [e] + ); + }), + (B.BYTE = P(1)), + (R.CHAR = function (e) { + return [e.charCodeAt(0)]; + }), + (B.CHAR = P(1)), + (R.CHARARRAY = function (e) { + "undefined" === typeof e && + ((e = ""), + console.warn( + "Undefined CHARARRAY encountered and treated as an empty string. This is probably caused by a missing glyph name." + )); + for (var t = [], n = 0; n < e.length; n += 1) + t[n] = e.charCodeAt(n); + return t; + }), + (B.CHARARRAY = function (e) { + return "undefined" === typeof e ? 0 : e.length; + }), + (R.USHORT = function (e) { + return [(e >> 8) & 255, 255 & e]; + }), + (B.USHORT = P(2)), + (R.SHORT = function (e) { + return ( + e >= 32768 && (e = -(65536 - e)), [(e >> 8) & 255, 255 & e] + ); + }), + (B.SHORT = P(2)), + (R.UINT24 = function (e) { + return [(e >> 16) & 255, (e >> 8) & 255, 255 & e]; + }), + (B.UINT24 = P(3)), + (R.ULONG = function (e) { + return [ + (e >> 24) & 255, + (e >> 16) & 255, + (e >> 8) & 255, + 255 & e, + ]; + }), + (B.ULONG = P(4)), + (R.LONG = function (e) { + return ( + e >= I && (e = -(2 * I - e)), + [(e >> 24) & 255, (e >> 16) & 255, (e >> 8) & 255, 255 & e] + ); + }), + (B.LONG = P(4)), + (R.FIXED = R.ULONG), + (B.FIXED = B.ULONG), + (R.FWORD = R.SHORT), + (B.FWORD = B.SHORT), + (R.UFWORD = R.USHORT), + (B.UFWORD = B.USHORT), + (R.LONGDATETIME = function (e) { + return [ + 0, + 0, + 0, + 0, + (e >> 24) & 255, + (e >> 16) & 255, + (e >> 8) & 255, + 255 & e, + ]; + }), + (B.LONGDATETIME = P(8)), + (R.TAG = function (e) { + return ( + M.argument( + 4 === e.length, + "Tag should be exactly 4 ASCII characters." + ), + [ + e.charCodeAt(0), + e.charCodeAt(1), + e.charCodeAt(2), + e.charCodeAt(3), + ] + ); + }), + (B.TAG = P(4)), + (R.Card8 = R.BYTE), + (B.Card8 = B.BYTE), + (R.Card16 = R.USHORT), + (B.Card16 = B.USHORT), + (R.OffSize = R.BYTE), + (B.OffSize = B.BYTE), + (R.SID = R.USHORT), + (B.SID = B.USHORT), + (R.NUMBER = function (e) { + return e >= -107 && e <= 107 + ? [e + 139] + : e >= 108 && e <= 1131 + ? [247 + ((e -= 108) >> 8), 255 & e] + : e >= -1131 && e <= -108 + ? [251 + ((e = -e - 108) >> 8), 255 & e] + : e >= -32768 && e <= 32767 + ? R.NUMBER16(e) + : R.NUMBER32(e); + }), + (B.NUMBER = function (e) { + return R.NUMBER(e).length; + }), + (R.NUMBER16 = function (e) { + return [28, (e >> 8) & 255, 255 & e]; + }), + (B.NUMBER16 = P(3)), + (R.NUMBER32 = function (e) { + return [ + 29, + (e >> 24) & 255, + (e >> 16) & 255, + (e >> 8) & 255, + 255 & e, + ]; + }), + (B.NUMBER32 = P(5)), + (R.REAL = function (e) { + var t = e.toString(), + n = /\.(\d*?)(?:9{5,20}|0{5,20})\d{0,2}(?:e(.+)|$)/.exec(t); + if (n) { + var r = parseFloat("1e" + ((n[2] ? +n[2] : 0) + n[1].length)); + t = (Math.round(e * r) / r).toString(); + } + for (var i = "", a = 0, o = t.length; a < o; a += 1) { + var s = t[a]; + i += + "e" === s + ? "-" === t[++a] + ? "c" + : "b" + : "." === s + ? "a" + : "-" === s + ? "e" + : s; + } + for ( + var l = [30], + u = 0, + c = (i += 1 & i.length ? "f" : "ff").length; + u < c; + u += 2 + ) + l.push(parseInt(i.substr(u, 2), 16)); + return l; + }), + (B.REAL = function (e) { + return R.REAL(e).length; + }), + (R.NAME = R.CHARARRAY), + (B.NAME = B.CHARARRAY), + (R.STRING = R.CHARARRAY), + (B.STRING = B.CHARARRAY), + (k.UTF8 = function (e, t, n) { + for (var r = [], i = n, a = 0; a < i; a++, t += 1) + r[a] = e.getUint8(t); + return String.fromCharCode.apply(null, r); + }), + (k.UTF16 = function (e, t, n) { + for (var r = [], i = n / 2, a = 0; a < i; a++, t += 2) + r[a] = e.getUint16(t); + return String.fromCharCode.apply(null, r); + }), + (R.UTF16 = function (e) { + for (var t = [], n = 0; n < e.length; n += 1) { + var r = e.charCodeAt(n); + (t[t.length] = (r >> 8) & 255), (t[t.length] = 255 & r); + } + return t; + }), + (B.UTF16 = function (e) { + return 2 * e.length; + }); + var L = { + "x-mac-croatian": + "\xc4\xc5\xc7\xc9\xd1\xd6\xdc\xe1\xe0\xe2\xe4\xe3\xe5\xe7\xe9\xe8\xea\xeb\xed\xec\xee\xef\xf1\xf3\xf2\xf4\xf6\xf5\xfa\xf9\xfb\xfc\u2020\xb0\xa2\xa3\xa7\u2022\xb6\xdf\xae\u0160\u2122\xb4\xa8\u2260\u017d\xd8\u221e\xb1\u2264\u2265\u2206\xb5\u2202\u2211\u220f\u0161\u222b\xaa\xba\u03a9\u017e\xf8\xbf\xa1\xac\u221a\u0192\u2248\u0106\xab\u010c\u2026 \xc0\xc3\xd5\u0152\u0153\u0110\u2014\u201c\u201d\u2018\u2019\xf7\u25ca\uf8ff\xa9\u2044\u20ac\u2039\u203a\xc6\xbb\u2013\xb7\u201a\u201e\u2030\xc2\u0107\xc1\u010d\xc8\xcd\xce\xcf\xcc\xd3\xd4\u0111\xd2\xda\xdb\xd9\u0131\u02c6\u02dc\xaf\u03c0\xcb\u02da\xb8\xca\xe6\u02c7", + "x-mac-cyrillic": + "\u0410\u0411\u0412\u0413\u0414\u0415\u0416\u0417\u0418\u0419\u041a\u041b\u041c\u041d\u041e\u041f\u0420\u0421\u0422\u0423\u0424\u0425\u0426\u0427\u0428\u0429\u042a\u042b\u042c\u042d\u042e\u042f\u2020\xb0\u0490\xa3\xa7\u2022\xb6\u0406\xae\xa9\u2122\u0402\u0452\u2260\u0403\u0453\u221e\xb1\u2264\u2265\u0456\xb5\u0491\u0408\u0404\u0454\u0407\u0457\u0409\u0459\u040a\u045a\u0458\u0405\xac\u221a\u0192\u2248\u2206\xab\xbb\u2026 \u040b\u045b\u040c\u045c\u0455\u2013\u2014\u201c\u201d\u2018\u2019\xf7\u201e\u040e\u045e\u040f\u045f\u2116\u0401\u0451\u044f\u0430\u0431\u0432\u0433\u0434\u0435\u0436\u0437\u0438\u0439\u043a\u043b\u043c\u043d\u043e\u043f\u0440\u0441\u0442\u0443\u0444\u0445\u0446\u0447\u0448\u0449\u044a\u044b\u044c\u044d\u044e", + "x-mac-gaelic": + "\xc4\xc5\xc7\xc9\xd1\xd6\xdc\xe1\xe0\xe2\xe4\xe3\xe5\xe7\xe9\xe8\xea\xeb\xed\xec\xee\xef\xf1\xf3\xf2\xf4\xf6\xf5\xfa\xf9\xfb\xfc\u2020\xb0\xa2\xa3\xa7\u2022\xb6\xdf\xae\xa9\u2122\xb4\xa8\u2260\xc6\xd8\u1e02\xb1\u2264\u2265\u1e03\u010a\u010b\u1e0a\u1e0b\u1e1e\u1e1f\u0120\u0121\u1e40\xe6\xf8\u1e41\u1e56\u1e57\u027c\u0192\u017f\u1e60\xab\xbb\u2026 \xc0\xc3\xd5\u0152\u0153\u2013\u2014\u201c\u201d\u2018\u2019\u1e61\u1e9b\xff\u0178\u1e6a\u20ac\u2039\u203a\u0176\u0177\u1e6b\xb7\u1ef2\u1ef3\u204a\xc2\xca\xc1\xcb\xc8\xcd\xce\xcf\xcc\xd3\xd4\u2663\xd2\xda\xdb\xd9\u0131\xdd\xfd\u0174\u0175\u1e84\u1e85\u1e80\u1e81\u1e82\u1e83", + "x-mac-greek": + "\xc4\xb9\xb2\xc9\xb3\xd6\xdc\u0385\xe0\xe2\xe4\u0384\xa8\xe7\xe9\xe8\xea\xeb\xa3\u2122\xee\xef\u2022\xbd\u2030\xf4\xf6\xa6\u20ac\xf9\xfb\xfc\u2020\u0393\u0394\u0398\u039b\u039e\u03a0\xdf\xae\xa9\u03a3\u03aa\xa7\u2260\xb0\xb7\u0391\xb1\u2264\u2265\xa5\u0392\u0395\u0396\u0397\u0399\u039a\u039c\u03a6\u03ab\u03a8\u03a9\u03ac\u039d\xac\u039f\u03a1\u2248\u03a4\xab\xbb\u2026 \u03a5\u03a7\u0386\u0388\u0153\u2013\u2015\u201c\u201d\u2018\u2019\xf7\u0389\u038a\u038c\u038e\u03ad\u03ae\u03af\u03cc\u038f\u03cd\u03b1\u03b2\u03c8\u03b4\u03b5\u03c6\u03b3\u03b7\u03b9\u03be\u03ba\u03bb\u03bc\u03bd\u03bf\u03c0\u03ce\u03c1\u03c3\u03c4\u03b8\u03c9\u03c2\u03c7\u03c5\u03b6\u03ca\u03cb\u0390\u03b0\xad", + "x-mac-icelandic": + "\xc4\xc5\xc7\xc9\xd1\xd6\xdc\xe1\xe0\xe2\xe4\xe3\xe5\xe7\xe9\xe8\xea\xeb\xed\xec\xee\xef\xf1\xf3\xf2\xf4\xf6\xf5\xfa\xf9\xfb\xfc\xdd\xb0\xa2\xa3\xa7\u2022\xb6\xdf\xae\xa9\u2122\xb4\xa8\u2260\xc6\xd8\u221e\xb1\u2264\u2265\xa5\xb5\u2202\u2211\u220f\u03c0\u222b\xaa\xba\u03a9\xe6\xf8\xbf\xa1\xac\u221a\u0192\u2248\u2206\xab\xbb\u2026 \xc0\xc3\xd5\u0152\u0153\u2013\u2014\u201c\u201d\u2018\u2019\xf7\u25ca\xff\u0178\u2044\u20ac\xd0\xf0\xde\xfe\xfd\xb7\u201a\u201e\u2030\xc2\xca\xc1\xcb\xc8\xcd\xce\xcf\xcc\xd3\xd4\uf8ff\xd2\xda\xdb\xd9\u0131\u02c6\u02dc\xaf\u02d8\u02d9\u02da\xb8\u02dd\u02db\u02c7", + "x-mac-inuit": + "\u1403\u1404\u1405\u1406\u140a\u140b\u1431\u1432\u1433\u1434\u1438\u1439\u1449\u144e\u144f\u1450\u1451\u1455\u1456\u1466\u146d\u146e\u146f\u1470\u1472\u1473\u1483\u148b\u148c\u148d\u148e\u1490\u1491\xb0\u14a1\u14a5\u14a6\u2022\xb6\u14a7\xae\xa9\u2122\u14a8\u14aa\u14ab\u14bb\u14c2\u14c3\u14c4\u14c5\u14c7\u14c8\u14d0\u14ef\u14f0\u14f1\u14f2\u14f4\u14f5\u1505\u14d5\u14d6\u14d7\u14d8\u14da\u14db\u14ea\u1528\u1529\u152a\u152b\u152d\u2026 \u152e\u153e\u1555\u1556\u1557\u2013\u2014\u201c\u201d\u2018\u2019\u1558\u1559\u155a\u155d\u1546\u1547\u1548\u1549\u154b\u154c\u1550\u157f\u1580\u1581\u1582\u1583\u1584\u1585\u158f\u1590\u1591\u1592\u1593\u1594\u1595\u1671\u1672\u1673\u1674\u1675\u1676\u1596\u15a0\u15a1\u15a2\u15a3\u15a4\u15a5\u15a6\u157c\u0141\u0142", + "x-mac-ce": + "\xc4\u0100\u0101\xc9\u0104\xd6\xdc\xe1\u0105\u010c\xe4\u010d\u0106\u0107\xe9\u0179\u017a\u010e\xed\u010f\u0112\u0113\u0116\xf3\u0117\xf4\xf6\xf5\xfa\u011a\u011b\xfc\u2020\xb0\u0118\xa3\xa7\u2022\xb6\xdf\xae\xa9\u2122\u0119\xa8\u2260\u0123\u012e\u012f\u012a\u2264\u2265\u012b\u0136\u2202\u2211\u0142\u013b\u013c\u013d\u013e\u0139\u013a\u0145\u0146\u0143\xac\u221a\u0144\u0147\u2206\xab\xbb\u2026 \u0148\u0150\xd5\u0151\u014c\u2013\u2014\u201c\u201d\u2018\u2019\xf7\u25ca\u014d\u0154\u0155\u0158\u2039\u203a\u0159\u0156\u0157\u0160\u201a\u201e\u0161\u015a\u015b\xc1\u0164\u0165\xcd\u017d\u017e\u016a\xd3\xd4\u016b\u016e\xda\u016f\u0170\u0171\u0172\u0173\xdd\xfd\u0137\u017b\u0141\u017c\u0122\u02c7", + macintosh: + "\xc4\xc5\xc7\xc9\xd1\xd6\xdc\xe1\xe0\xe2\xe4\xe3\xe5\xe7\xe9\xe8\xea\xeb\xed\xec\xee\xef\xf1\xf3\xf2\xf4\xf6\xf5\xfa\xf9\xfb\xfc\u2020\xb0\xa2\xa3\xa7\u2022\xb6\xdf\xae\xa9\u2122\xb4\xa8\u2260\xc6\xd8\u221e\xb1\u2264\u2265\xa5\xb5\u2202\u2211\u220f\u03c0\u222b\xaa\xba\u03a9\xe6\xf8\xbf\xa1\xac\u221a\u0192\u2248\u2206\xab\xbb\u2026 \xc0\xc3\xd5\u0152\u0153\u2013\u2014\u201c\u201d\u2018\u2019\xf7\u25ca\xff\u0178\u2044\u20ac\u2039\u203a\ufb01\ufb02\u2021\xb7\u201a\u201e\u2030\xc2\xca\xc1\xcb\xc8\xcd\xce\xcf\xcc\xd3\xd4\uf8ff\xd2\xda\xdb\xd9\u0131\u02c6\u02dc\xaf\u02d8\u02d9\u02da\xb8\u02dd\u02db\u02c7", + "x-mac-romanian": + "\xc4\xc5\xc7\xc9\xd1\xd6\xdc\xe1\xe0\xe2\xe4\xe3\xe5\xe7\xe9\xe8\xea\xeb\xed\xec\xee\xef\xf1\xf3\xf2\xf4\xf6\xf5\xfa\xf9\xfb\xfc\u2020\xb0\xa2\xa3\xa7\u2022\xb6\xdf\xae\xa9\u2122\xb4\xa8\u2260\u0102\u0218\u221e\xb1\u2264\u2265\xa5\xb5\u2202\u2211\u220f\u03c0\u222b\xaa\xba\u03a9\u0103\u0219\xbf\xa1\xac\u221a\u0192\u2248\u2206\xab\xbb\u2026 \xc0\xc3\xd5\u0152\u0153\u2013\u2014\u201c\u201d\u2018\u2019\xf7\u25ca\xff\u0178\u2044\u20ac\u2039\u203a\u021a\u021b\u2021\xb7\u201a\u201e\u2030\xc2\xca\xc1\xcb\xc8\xcd\xce\xcf\xcc\xd3\xd4\uf8ff\xd2\xda\xdb\xd9\u0131\u02c6\u02dc\xaf\u02d8\u02d9\u02da\xb8\u02dd\u02db\u02c7", + "x-mac-turkish": + "\xc4\xc5\xc7\xc9\xd1\xd6\xdc\xe1\xe0\xe2\xe4\xe3\xe5\xe7\xe9\xe8\xea\xeb\xed\xec\xee\xef\xf1\xf3\xf2\xf4\xf6\xf5\xfa\xf9\xfb\xfc\u2020\xb0\xa2\xa3\xa7\u2022\xb6\xdf\xae\xa9\u2122\xb4\xa8\u2260\xc6\xd8\u221e\xb1\u2264\u2265\xa5\xb5\u2202\u2211\u220f\u03c0\u222b\xaa\xba\u03a9\xe6\xf8\xbf\xa1\xac\u221a\u0192\u2248\u2206\xab\xbb\u2026 \xc0\xc3\xd5\u0152\u0153\u2013\u2014\u201c\u201d\u2018\u2019\xf7\u25ca\xff\u0178\u011e\u011f\u0130\u0131\u015e\u015f\u2021\xb7\u201a\u201e\u2030\xc2\xca\xc1\xcb\xc8\xcd\xce\xcf\xcc\xd3\xd4\uf8ff\xd2\xda\xdb\xd9\uf8a0\u02c6\u02dc\xaf\u02d8\u02d9\u02da\xb8\u02dd\u02db\u02c7", + }; + k.MACSTRING = function (e, t, n, r) { + var i = L[r]; + if (void 0 !== i) { + for (var a = "", o = 0; o < n; o++) { + var s = e.getUint8(t + o); + a += s <= 127 ? String.fromCharCode(s) : i[127 & s]; + } + return a; + } + }; + var D, + U = "function" === typeof WeakMap && new WeakMap(); + function F(e) { + return e >= -128 && e <= 127; + } + function O(e, t, n) { + for (var r = 0, i = e.length; t < i && r < 64 && 0 === e[t]; ) + ++t, ++r; + return n.push(128 | (r - 1)), t; + } + function N(e, t, n) { + for (var r = 0, i = e.length, a = t; a < i && r < 64; ) { + var o = e[a]; + if (!F(o)) break; + if (0 === o && a + 1 < i && 0 === e[a + 1]) break; + ++a, ++r; + } + n.push(r - 1); + for (var s = t; s < a; ++s) n.push((e[s] + 256) & 255); + return a; + } + function G(e, t, n) { + for (var r = 0, i = e.length, a = t; a < i && r < 64; ) { + var o = e[a]; + if (0 === o) break; + if (F(o) && a + 1 < i && F(e[a + 1])) break; + ++a, ++r; + } + n.push(64 | (r - 1)); + for (var s = t; s < a; ++s) { + var l = e[s]; + n.push(((l + 65536) >> 8) & 255, (l + 256) & 255); + } + return a; + } + (R.MACSTRING = function (e, t) { + var n = (function (e) { + if (!D) for (var t in ((D = {}), L)) D[t] = new String(t); + var n = D[e]; + if (void 0 !== n) { + if (U) { + var r = U.get(n); + if (void 0 !== r) return r; + } + var i = L[e]; + if (void 0 !== i) { + for (var a = {}, o = 0; o < i.length; o++) + a[i.charCodeAt(o)] = o + 128; + return U && U.set(n, a), a; + } + } + })(t); + if (void 0 !== n) { + for (var r = [], i = 0; i < e.length; i++) { + var a = e.charCodeAt(i); + if (a >= 128 && void 0 === (a = n[a])) return; + r[i] = a; + } + return r; + } + }), + (B.MACSTRING = function (e, t) { + var n = R.MACSTRING(e, t); + return void 0 !== n ? n.length : 0; + }), + (R.VARDELTAS = function (e) { + for (var t = 0, n = []; t < e.length; ) { + var r = e[t]; + t = + 0 === r + ? O(e, t, n) + : r >= -128 && r <= 127 + ? N(e, t, n) + : G(e, t, n); + } + return n; + }), + (R.INDEX = function (e) { + for (var t = 1, n = [t], r = [], i = 0; i < e.length; i += 1) { + var a = R.OBJECT(e[i]); + Array.prototype.push.apply(r, a), (t += a.length), n.push(t); + } + if (0 === r.length) return [0, 0]; + for ( + var o = [], + s = (1 + Math.floor(Math.log(t) / Math.log(2)) / 8) | 0, + l = [void 0, R.BYTE, R.USHORT, R.UINT24, R.ULONG][s], + u = 0; + u < n.length; + u += 1 + ) { + var c = l(n[u]); + Array.prototype.push.apply(o, c); + } + return Array.prototype.concat( + R.Card16(e.length), + R.OffSize(s), + o, + r + ); + }), + (B.INDEX = function (e) { + return R.INDEX(e).length; + }), + (R.DICT = function (e) { + for ( + var t = [], n = Object.keys(e), r = n.length, i = 0; + i < r; + i += 1 + ) { + var a = parseInt(n[i], 0), + o = e[a]; + t = (t = t.concat(R.OPERAND(o.value, o.type))).concat( + R.OPERATOR(a) + ); + } + return t; + }), + (B.DICT = function (e) { + return R.DICT(e).length; + }), + (R.OPERATOR = function (e) { + return e < 1200 ? [e] : [12, e - 1200]; + }), + (R.OPERAND = function (e, t) { + var n = []; + if (Array.isArray(t)) + for (var r = 0; r < t.length; r += 1) + M.argument( + e.length === t.length, + "Not enough arguments given for type" + t + ), + (n = n.concat(R.OPERAND(e[r], t[r]))); + else if ("SID" === t) n = n.concat(R.NUMBER(e)); + else if ("offset" === t) n = n.concat(R.NUMBER32(e)); + else if ("number" === t) n = n.concat(R.NUMBER(e)); + else { + if ("real" !== t) + throw new Error("Unknown operand type " + t); + n = n.concat(R.REAL(e)); + } + return n; + }), + (R.OP = R.BYTE), + (B.OP = B.BYTE); + var Z = "function" === typeof WeakMap && new WeakMap(); + function z(e, t, n) { + if ( + t.length && + ("coverageFormat" !== t[0].name || 1 === t[0].value) + ) + for (var r = 0; r < t.length; r += 1) { + var i = t[r]; + this[i.name] = i.value; + } + if (((this.tableName = e), (this.fields = t), n)) + for (var a = Object.keys(n), o = 0; o < a.length; o += 1) { + var s = a[o], + l = n[s]; + void 0 !== this[s] && (this[s] = l); + } + } + function Q(e, t, n) { + void 0 === n && (n = t.length); + var r = new Array(t.length + 1); + r[0] = { name: e + "Count", type: "USHORT", value: n }; + for (var i = 0; i < t.length; i++) + r[i + 1] = { name: e + i, type: "USHORT", value: t[i] }; + return r; + } + function H(e, t, n) { + var r = t.length, + i = new Array(r + 1); + i[0] = { name: e + "Count", type: "USHORT", value: r }; + for (var a = 0; a < r; a++) + i[a + 1] = { name: e + a, type: "TABLE", value: n(t[a], a) }; + return i; + } + function V(e, t, n) { + var r = t.length, + i = []; + i[0] = { name: e + "Count", type: "USHORT", value: r }; + for (var a = 0; a < r; a++) i = i.concat(n(t[a], a)); + return i; + } + function j(e) { + 1 === e.format + ? z.call( + this, + "coverageTable", + [ + { name: "coverageFormat", type: "USHORT", value: 1 }, + ].concat(Q("glyph", e.glyphs)) + ) + : 2 === e.format + ? z.call( + this, + "coverageTable", + [ + { name: "coverageFormat", type: "USHORT", value: 2 }, + ].concat( + V("rangeRecord", e.ranges, function (e) { + return [ + { + name: "startGlyphID", + type: "USHORT", + value: e.start, + }, + { name: "endGlyphID", type: "USHORT", value: e.end }, + { + name: "startCoverageIndex", + type: "USHORT", + value: e.index, + }, + ]; + }) + ) + ) + : M.assert(!1, "Coverage format must be 1 or 2."); + } + function W(e) { + z.call( + this, + "scriptListTable", + V("scriptRecord", e, function (e, t) { + var n = e.script, + r = n.defaultLangSys; + return ( + M.assert( + !!r, + "Unable to write GSUB: script " + + e.tag + + " has no default language system." + ), + [ + { name: "scriptTag" + t, type: "TAG", value: e.tag }, + { + name: "script" + t, + type: "TABLE", + value: new z( + "scriptTable", + [ + { + name: "defaultLangSys", + type: "TABLE", + value: new z( + "defaultLangSys", + [ + { + name: "lookupOrder", + type: "USHORT", + value: 0, + }, + { + name: "reqFeatureIndex", + type: "USHORT", + value: r.reqFeatureIndex, + }, + ].concat(Q("featureIndex", r.featureIndexes)) + ), + }, + ].concat( + V("langSys", n.langSysRecords, function (e, t) { + var n = e.langSys; + return [ + { + name: "langSysTag" + t, + type: "TAG", + value: e.tag, + }, + { + name: "langSys" + t, + type: "TABLE", + value: new z( + "langSys", + [ + { + name: "lookupOrder", + type: "USHORT", + value: 0, + }, + { + name: "reqFeatureIndex", + type: "USHORT", + value: n.reqFeatureIndex, + }, + ].concat( + Q("featureIndex", n.featureIndexes) + ) + ), + }, + ]; + }) + ) + ), + }, + ] + ); + }) + ); + } + function X(e) { + z.call( + this, + "featureListTable", + V("featureRecord", e, function (e, t) { + var n = e.feature; + return [ + { name: "featureTag" + t, type: "TAG", value: e.tag }, + { + name: "feature" + t, + type: "TABLE", + value: new z( + "featureTable", + [ + { + name: "featureParams", + type: "USHORT", + value: n.featureParams, + }, + ].concat(Q("lookupListIndex", n.lookupListIndexes)) + ), + }, + ]; + }) + ); + } + function Y(e, t) { + z.call( + this, + "lookupListTable", + H("lookup", e, function (e) { + var n = t[e.lookupType]; + return ( + M.assert( + !!n, + "Unable to write GSUB lookup type " + + e.lookupType + + " tables." + ), + new z( + "lookupTable", + [ + { + name: "lookupType", + type: "USHORT", + value: e.lookupType, + }, + { + name: "lookupFlag", + type: "USHORT", + value: e.lookupFlag, + }, + ].concat(H("subtable", e.subtables, n)) + ) + ); + }) + ); + } + (R.CHARSTRING = function (e) { + if (Z) { + var t = Z.get(e); + if (void 0 !== t) return t; + } + for (var n = [], r = e.length, i = 0; i < r; i += 1) { + var a = e[i]; + n = n.concat(R[a.type](a.value)); + } + return Z && Z.set(e, n), n; + }), + (B.CHARSTRING = function (e) { + return R.CHARSTRING(e).length; + }), + (R.OBJECT = function (e) { + var t = R[e.type]; + return ( + M.argument( + void 0 !== t, + "No encoding function for type " + e.type + ), + t(e.value) + ); + }), + (B.OBJECT = function (e) { + var t = B[e.type]; + return ( + M.argument( + void 0 !== t, + "No sizeOf function for type " + e.type + ), + t(e.value) + ); + }), + (R.TABLE = function (e) { + for ( + var t = [], n = e.fields.length, r = [], i = [], a = 0; + a < n; + a += 1 + ) { + var o = e.fields[a], + s = R[o.type]; + M.argument( + void 0 !== s, + "No encoding function for field type " + + o.type + + " (" + + o.name + + ")" + ); + var l = e[o.name]; + void 0 === l && (l = o.value); + var u = s(l); + "TABLE" === o.type + ? (i.push(t.length), (t = t.concat([0, 0])), r.push(u)) + : (t = t.concat(u)); + } + for (var c = 0; c < r.length; c += 1) { + var f = i[c], + d = t.length; + M.argument(d < 65536, "Table " + e.tableName + " too big."), + (t[f] = d >> 8), + (t[f + 1] = 255 & d), + (t = t.concat(r[c])); + } + return t; + }), + (B.TABLE = function (e) { + for (var t = 0, n = e.fields.length, r = 0; r < n; r += 1) { + var i = e.fields[r], + a = B[i.type]; + M.argument( + void 0 !== a, + "No sizeOf function for field type " + + i.type + + " (" + + i.name + + ")" + ); + var o = e[i.name]; + void 0 === o && (o = i.value), + (t += a(o)), + "TABLE" === i.type && (t += 2); + } + return t; + }), + (R.RECORD = R.TABLE), + (B.RECORD = B.TABLE), + (R.LITERAL = function (e) { + return e; + }), + (B.LITERAL = function (e) { + return e.length; + }), + (z.prototype.encode = function () { + return R.TABLE(this); + }), + (z.prototype.sizeOf = function () { + return B.TABLE(this); + }), + (j.prototype = Object.create(z.prototype)), + (j.prototype.constructor = j), + (W.prototype = Object.create(z.prototype)), + (W.prototype.constructor = W), + (X.prototype = Object.create(z.prototype)), + (X.prototype.constructor = X), + (Y.prototype = Object.create(z.prototype)), + (Y.prototype.constructor = Y); + var q = { + Table: z, + Record: z, + Coverage: j, + ScriptList: W, + FeatureList: X, + LookupList: Y, + ushortList: Q, + tableList: H, + recordList: V, + }; + function J(e, t) { + return e.getUint8(t); + } + function K(e, t) { + return e.getUint16(t, !1); + } + function $(e, t) { + return e.getUint32(t, !1); + } + function ee(e, t) { + return e.getInt16(t, !1) + e.getUint16(t + 2, !1) / 65535; + } + var te = { + byte: 1, + uShort: 2, + short: 2, + uLong: 4, + fixed: 4, + longDateTime: 8, + tag: 4, + }; + function ne(e, t) { + (this.data = e), (this.offset = t), (this.relativeOffset = 0); + } + (ne.prototype.parseByte = function () { + var e = this.data.getUint8(this.offset + this.relativeOffset); + return (this.relativeOffset += 1), e; + }), + (ne.prototype.parseChar = function () { + var e = this.data.getInt8(this.offset + this.relativeOffset); + return (this.relativeOffset += 1), e; + }), + (ne.prototype.parseCard8 = ne.prototype.parseByte), + (ne.prototype.parseUShort = function () { + var e = this.data.getUint16(this.offset + this.relativeOffset); + return (this.relativeOffset += 2), e; + }), + (ne.prototype.parseCard16 = ne.prototype.parseUShort), + (ne.prototype.parseSID = ne.prototype.parseUShort), + (ne.prototype.parseOffset16 = ne.prototype.parseUShort), + (ne.prototype.parseShort = function () { + var e = this.data.getInt16(this.offset + this.relativeOffset); + return (this.relativeOffset += 2), e; + }), + (ne.prototype.parseF2Dot14 = function () { + var e = + this.data.getInt16(this.offset + this.relativeOffset) / 16384; + return (this.relativeOffset += 2), e; + }), + (ne.prototype.parseULong = function () { + var e = $(this.data, this.offset + this.relativeOffset); + return (this.relativeOffset += 4), e; + }), + (ne.prototype.parseOffset32 = ne.prototype.parseULong), + (ne.prototype.parseFixed = function () { + var e = ee(this.data, this.offset + this.relativeOffset); + return (this.relativeOffset += 4), e; + }), + (ne.prototype.parseString = function (e) { + var t = this.data, + n = this.offset + this.relativeOffset, + r = ""; + this.relativeOffset += e; + for (var i = 0; i < e; i++) + r += String.fromCharCode(t.getUint8(n + i)); + return r; + }), + (ne.prototype.parseTag = function () { + return this.parseString(4); + }), + (ne.prototype.parseLongDateTime = function () { + var e = $(this.data, this.offset + this.relativeOffset + 4); + return (e -= 2082844800), (this.relativeOffset += 8), e; + }), + (ne.prototype.parseVersion = function (e) { + var t = K(this.data, this.offset + this.relativeOffset), + n = K(this.data, this.offset + this.relativeOffset + 2); + return ( + (this.relativeOffset += 4), + void 0 === e && (e = 4096), + t + n / e / 10 + ); + }), + (ne.prototype.skip = function (e, t) { + void 0 === t && (t = 1), (this.relativeOffset += te[e] * t); + }), + (ne.prototype.parseULongList = function (e) { + void 0 === e && (e = this.parseULong()); + for ( + var t = new Array(e), + n = this.data, + r = this.offset + this.relativeOffset, + i = 0; + i < e; + i++ + ) + (t[i] = n.getUint32(r)), (r += 4); + return (this.relativeOffset += 4 * e), t; + }), + (ne.prototype.parseOffset16List = ne.prototype.parseUShortList = + function (e) { + void 0 === e && (e = this.parseUShort()); + for ( + var t = new Array(e), + n = this.data, + r = this.offset + this.relativeOffset, + i = 0; + i < e; + i++ + ) + (t[i] = n.getUint16(r)), (r += 2); + return (this.relativeOffset += 2 * e), t; + }), + (ne.prototype.parseShortList = function (e) { + for ( + var t = new Array(e), + n = this.data, + r = this.offset + this.relativeOffset, + i = 0; + i < e; + i++ + ) + (t[i] = n.getInt16(r)), (r += 2); + return (this.relativeOffset += 2 * e), t; + }), + (ne.prototype.parseByteList = function (e) { + for ( + var t = new Array(e), + n = this.data, + r = this.offset + this.relativeOffset, + i = 0; + i < e; + i++ + ) + t[i] = n.getUint8(r++); + return (this.relativeOffset += e), t; + }), + (ne.prototype.parseList = function (e, t) { + t || ((t = e), (e = this.parseUShort())); + for (var n = new Array(e), r = 0; r < e; r++) + n[r] = t.call(this); + return n; + }), + (ne.prototype.parseList32 = function (e, t) { + t || ((t = e), (e = this.parseULong())); + for (var n = new Array(e), r = 0; r < e; r++) + n[r] = t.call(this); + return n; + }), + (ne.prototype.parseRecordList = function (e, t) { + t || ((t = e), (e = this.parseUShort())); + for ( + var n = new Array(e), r = Object.keys(t), i = 0; + i < e; + i++ + ) { + for (var a = {}, o = 0; o < r.length; o++) { + var s = r[o], + l = t[s]; + a[s] = l.call(this); + } + n[i] = a; + } + return n; + }), + (ne.prototype.parseRecordList32 = function (e, t) { + t || ((t = e), (e = this.parseULong())); + for ( + var n = new Array(e), r = Object.keys(t), i = 0; + i < e; + i++ + ) { + for (var a = {}, o = 0; o < r.length; o++) { + var s = r[o], + l = t[s]; + a[s] = l.call(this); + } + n[i] = a; + } + return n; + }), + (ne.prototype.parseStruct = function (e) { + if ("function" === typeof e) return e.call(this); + for (var t = Object.keys(e), n = {}, r = 0; r < t.length; r++) { + var i = t[r], + a = e[i]; + n[i] = a.call(this); + } + return n; + }), + (ne.prototype.parseValueRecord = function (e) { + if ((void 0 === e && (e = this.parseUShort()), 0 !== e)) { + var t = {}; + return ( + 1 & e && (t.xPlacement = this.parseShort()), + 2 & e && (t.yPlacement = this.parseShort()), + 4 & e && (t.xAdvance = this.parseShort()), + 8 & e && (t.yAdvance = this.parseShort()), + 16 & e && ((t.xPlaDevice = void 0), this.parseShort()), + 32 & e && ((t.yPlaDevice = void 0), this.parseShort()), + 64 & e && ((t.xAdvDevice = void 0), this.parseShort()), + 128 & e && ((t.yAdvDevice = void 0), this.parseShort()), + t + ); + } + }), + (ne.prototype.parseValueRecordList = function () { + for ( + var e = this.parseUShort(), + t = this.parseUShort(), + n = new Array(t), + r = 0; + r < t; + r++ + ) + n[r] = this.parseValueRecord(e); + return n; + }), + (ne.prototype.parsePointer = function (e) { + var t = this.parseOffset16(); + if (t > 0) + return new ne(this.data, this.offset + t).parseStruct(e); + }), + (ne.prototype.parsePointer32 = function (e) { + var t = this.parseOffset32(); + if (t > 0) + return new ne(this.data, this.offset + t).parseStruct(e); + }), + (ne.prototype.parseListOfLists = function (e) { + for ( + var t = this.parseOffset16List(), + n = t.length, + r = this.relativeOffset, + i = new Array(n), + a = 0; + a < n; + a++ + ) { + var o = t[a]; + if (0 !== o) + if (((this.relativeOffset = o), e)) { + for ( + var s = this.parseOffset16List(), + l = new Array(s.length), + u = 0; + u < s.length; + u++ + ) + (this.relativeOffset = o + s[u]), (l[u] = e.call(this)); + i[a] = l; + } else i[a] = this.parseUShortList(); + else i[a] = void 0; + } + return (this.relativeOffset = r), i; + }), + (ne.prototype.parseCoverage = function () { + var e = this.offset + this.relativeOffset, + t = this.parseUShort(), + n = this.parseUShort(); + if (1 === t) + return { format: 1, glyphs: this.parseUShortList(n) }; + if (2 === t) { + for (var r = new Array(n), i = 0; i < n; i++) + r[i] = { + start: this.parseUShort(), + end: this.parseUShort(), + index: this.parseUShort(), + }; + return { format: 2, ranges: r }; + } + throw new Error( + "0x" + e.toString(16) + ": Coverage format must be 1 or 2." + ); + }), + (ne.prototype.parseClassDef = function () { + var e = this.offset + this.relativeOffset, + t = this.parseUShort(); + if (1 === t) + return { + format: 1, + startGlyph: this.parseUShort(), + classes: this.parseUShortList(), + }; + if (2 === t) + return { + format: 2, + ranges: this.parseRecordList({ + start: ne.uShort, + end: ne.uShort, + classId: ne.uShort, + }), + }; + throw new Error( + "0x" + e.toString(16) + ": ClassDef format must be 1 or 2." + ); + }), + (ne.list = function (e, t) { + return function () { + return this.parseList(e, t); + }; + }), + (ne.list32 = function (e, t) { + return function () { + return this.parseList32(e, t); + }; + }), + (ne.recordList = function (e, t) { + return function () { + return this.parseRecordList(e, t); + }; + }), + (ne.recordList32 = function (e, t) { + return function () { + return this.parseRecordList32(e, t); + }; + }), + (ne.pointer = function (e) { + return function () { + return this.parsePointer(e); + }; + }), + (ne.pointer32 = function (e) { + return function () { + return this.parsePointer32(e); + }; + }), + (ne.tag = ne.prototype.parseTag), + (ne.byte = ne.prototype.parseByte), + (ne.uShort = ne.offset16 = ne.prototype.parseUShort), + (ne.uShortList = ne.prototype.parseUShortList), + (ne.uLong = ne.offset32 = ne.prototype.parseULong), + (ne.uLongList = ne.prototype.parseULongList), + (ne.struct = ne.prototype.parseStruct), + (ne.coverage = ne.prototype.parseCoverage), + (ne.classDef = ne.prototype.parseClassDef); + var re = { + reserved: ne.uShort, + reqFeatureIndex: ne.uShort, + featureIndexes: ne.uShortList, + }; + (ne.prototype.parseScriptList = function () { + return ( + this.parsePointer( + ne.recordList({ + tag: ne.tag, + script: ne.pointer({ + defaultLangSys: ne.pointer(re), + langSysRecords: ne.recordList({ + tag: ne.tag, + langSys: ne.pointer(re), + }), + }), + }) + ) || [] + ); + }), + (ne.prototype.parseFeatureList = function () { + return ( + this.parsePointer( + ne.recordList({ + tag: ne.tag, + feature: ne.pointer({ + featureParams: ne.offset16, + lookupListIndexes: ne.uShortList, + }), + }) + ) || [] + ); + }), + (ne.prototype.parseLookupList = function (e) { + return ( + this.parsePointer( + ne.list( + ne.pointer(function () { + var t = this.parseUShort(); + M.argument( + 1 <= t && t <= 9, + "GPOS/GSUB lookup type " + t + " unknown." + ); + var n = this.parseUShort(), + r = 16 & n; + return { + lookupType: t, + lookupFlag: n, + subtables: this.parseList(ne.pointer(e[t])), + markFilteringSet: r ? this.parseUShort() : void 0, + }; + }) + ) + ) || [] + ); + }), + (ne.prototype.parseFeatureVariationsList = function () { + return ( + this.parsePointer32(function () { + var e = this.parseUShort(), + t = this.parseUShort(); + return ( + M.argument( + 1 === e && t < 1, + "GPOS/GSUB feature variations table unknown." + ), + this.parseRecordList32({ + conditionSetOffset: ne.offset32, + featureTableSubstitutionOffset: ne.offset32, + }) + ); + }) || [] + ); + }); + var ie = { + getByte: J, + getCard8: J, + getUShort: K, + getCard16: K, + getShort: function (e, t) { + return e.getInt16(t, !1); + }, + getULong: $, + getFixed: ee, + getTag: function (e, t) { + for (var n = "", r = t; r < t + 4; r += 1) + n += String.fromCharCode(e.getInt8(r)); + return n; + }, + getOffset: function (e, t, n) { + for (var r = 0, i = 0; i < n; i += 1) + (r <<= 8), (r += e.getUint8(t + i)); + return r; + }, + getBytes: function (e, t, n) { + for (var r = [], i = t; i < n; i += 1) r.push(e.getUint8(i)); + return r; + }, + bytesToString: function (e) { + for (var t = "", n = 0; n < e.length; n += 1) + t += String.fromCharCode(e[n]); + return t; + }, + Parser: ne, + }; + function ae(e, t, n) { + e.segments.push({ + end: t, + start: t, + delta: -(t - n), + offset: 0, + glyphIndex: n, + }); + } + var oe = { + parse: function (e, t) { + var n = {}; + (n.version = ie.getUShort(e, t)), + M.argument( + 0 === n.version, + "cmap table version should be 0." + ), + (n.numTables = ie.getUShort(e, t + 2)); + for (var r = -1, i = n.numTables - 1; i >= 0; i -= 1) { + var a = ie.getUShort(e, t + 4 + 8 * i), + o = ie.getUShort(e, t + 4 + 8 * i + 2); + if ( + (3 === a && (0 === o || 1 === o || 10 === o)) || + (0 === a && + (0 === o || 1 === o || 2 === o || 3 === o || 4 === o)) + ) { + r = ie.getULong(e, t + 4 + 8 * i + 4); + break; + } + } + if (-1 === r) + throw new Error("No valid cmap sub-tables found."); + var s = new ie.Parser(e, t + r); + if (((n.format = s.parseUShort()), 12 === n.format)) + !(function (e, t) { + var n; + t.parseUShort(), + (e.length = t.parseULong()), + (e.language = t.parseULong()), + (e.groupCount = n = t.parseULong()), + (e.glyphIndexMap = {}); + for (var r = 0; r < n; r += 1) + for ( + var i = t.parseULong(), + a = t.parseULong(), + o = t.parseULong(), + s = i; + s <= a; + s += 1 + ) + (e.glyphIndexMap[s] = o), o++; + })(n, s); + else { + if (4 !== n.format) + throw new Error( + "Only format 4 and 12 cmap tables are supported (found format " + + n.format + + ")." + ); + !(function (e, t, n, r, i) { + var a; + (e.length = t.parseUShort()), + (e.language = t.parseUShort()), + (e.segCount = a = t.parseUShort() >> 1), + t.skip("uShort", 3), + (e.glyphIndexMap = {}); + for ( + var o = new ie.Parser(n, r + i + 14), + s = new ie.Parser(n, r + i + 16 + 2 * a), + l = new ie.Parser(n, r + i + 16 + 4 * a), + u = new ie.Parser(n, r + i + 16 + 6 * a), + c = r + i + 16 + 8 * a, + f = 0; + f < a - 1; + f += 1 + ) + for ( + var d = void 0, + h = o.parseUShort(), + p = s.parseUShort(), + v = l.parseShort(), + m = u.parseUShort(), + g = p; + g <= h; + g += 1 + ) + 0 !== m + ? ((c = u.offset + u.relativeOffset - 2), + (c += m), + (c += 2 * (g - p)), + 0 !== (d = ie.getUShort(n, c)) && + (d = (d + v) & 65535)) + : (d = (g + v) & 65535), + (e.glyphIndexMap[g] = d); + })(n, s, e, t, r); + } + return n; + }, + make: function (e) { + var t, + n = !0; + for (t = e.length - 1; t > 0; t -= 1) { + if (e.get(t).unicode > 65535) { + console.log("Adding CMAP format 12 (needed!)"), (n = !1); + break; + } + } + var r = [ + { name: "version", type: "USHORT", value: 0 }, + { name: "numTables", type: "USHORT", value: n ? 1 : 2 }, + { name: "platformID", type: "USHORT", value: 3 }, + { name: "encodingID", type: "USHORT", value: 1 }, + { name: "offset", type: "ULONG", value: n ? 12 : 20 }, + ]; + n || + (r = r.concat([ + { name: "cmap12PlatformID", type: "USHORT", value: 3 }, + { name: "cmap12EncodingID", type: "USHORT", value: 10 }, + { name: "cmap12Offset", type: "ULONG", value: 0 }, + ])), + (r = r.concat([ + { name: "format", type: "USHORT", value: 4 }, + { name: "cmap4Length", type: "USHORT", value: 0 }, + { name: "language", type: "USHORT", value: 0 }, + { name: "segCountX2", type: "USHORT", value: 0 }, + { name: "searchRange", type: "USHORT", value: 0 }, + { name: "entrySelector", type: "USHORT", value: 0 }, + { name: "rangeShift", type: "USHORT", value: 0 }, + ])); + var i = new q.Table("cmap", r); + for (i.segments = [], t = 0; t < e.length; t += 1) { + for (var a = e.get(t), o = 0; o < a.unicodes.length; o += 1) + ae(i, a.unicodes[o], t); + i.segments = i.segments.sort(function (e, t) { + return e.start - t.start; + }); + } + !(function (e) { + e.segments.push({ + end: 65535, + start: 65535, + delta: 1, + offset: 0, + }); + })(i); + var s = i.segments.length, + l = 0, + u = [], + c = [], + f = [], + d = [], + h = [], + p = []; + for (t = 0; t < s; t += 1) { + var v = i.segments[t]; + v.end <= 65535 && v.start <= 65535 + ? ((u = u.concat({ + name: "end_" + t, + type: "USHORT", + value: v.end, + })), + (c = c.concat({ + name: "start_" + t, + type: "USHORT", + value: v.start, + })), + (f = f.concat({ + name: "idDelta_" + t, + type: "SHORT", + value: v.delta, + })), + (d = d.concat({ + name: "idRangeOffset_" + t, + type: "USHORT", + value: v.offset, + })), + void 0 !== v.glyphId && + (h = h.concat({ + name: "glyph_" + t, + type: "USHORT", + value: v.glyphId, + }))) + : (l += 1), + n || + void 0 === v.glyphIndex || + (p = (p = (p = p.concat({ + name: "cmap12Start_" + t, + type: "ULONG", + value: v.start, + })).concat({ + name: "cmap12End_" + t, + type: "ULONG", + value: v.end, + })).concat({ + name: "cmap12Glyph_" + t, + type: "ULONG", + value: v.glyphIndex, + })); + } + if ( + ((i.segCountX2 = 2 * (s - l)), + (i.searchRange = + 2 * + Math.pow(2, Math.floor(Math.log(s - l) / Math.log(2)))), + (i.entrySelector = + Math.log(i.searchRange / 2) / Math.log(2)), + (i.rangeShift = i.segCountX2 - i.searchRange), + (i.fields = i.fields.concat(u)), + i.fields.push({ + name: "reservedPad", + type: "USHORT", + value: 0, + }), + (i.fields = i.fields.concat(c)), + (i.fields = i.fields.concat(f)), + (i.fields = i.fields.concat(d)), + (i.fields = i.fields.concat(h)), + (i.cmap4Length = + 14 + + 2 * u.length + + 2 + + 2 * c.length + + 2 * f.length + + 2 * d.length + + 2 * h.length), + !n) + ) { + var m = 16 + 4 * p.length; + (i.cmap12Offset = 20 + i.cmap4Length), + (i.fields = i.fields.concat([ + { name: "cmap12Format", type: "USHORT", value: 12 }, + { name: "cmap12Reserved", type: "USHORT", value: 0 }, + { name: "cmap12Length", type: "ULONG", value: m }, + { name: "cmap12Language", type: "ULONG", value: 0 }, + { + name: "cmap12nGroups", + type: "ULONG", + value: p.length / 3, + }, + ])), + (i.fields = i.fields.concat(p)); + } + return i; + }, + }, + se = [ + ".notdef", + "space", + "exclam", + "quotedbl", + "numbersign", + "dollar", + "percent", + "ampersand", + "quoteright", + "parenleft", + "parenright", + "asterisk", + "plus", + "comma", + "hyphen", + "period", + "slash", + "zero", + "one", + "two", + "three", + "four", + "five", + "six", + "seven", + "eight", + "nine", + "colon", + "semicolon", + "less", + "equal", + "greater", + "question", + "at", + "A", + "B", + "C", + "D", + "E", + "F", + "G", + "H", + "I", + "J", + "K", + "L", + "M", + "N", + "O", + "P", + "Q", + "R", + "S", + "T", + "U", + "V", + "W", + "X", + "Y", + "Z", + "bracketleft", + "backslash", + "bracketright", + "asciicircum", + "underscore", + "quoteleft", + "a", + "b", + "c", + "d", + "e", + "f", + "g", + "h", + "i", + "j", + "k", + "l", + "m", + "n", + "o", + "p", + "q", + "r", + "s", + "t", + "u", + "v", + "w", + "x", + "y", + "z", + "braceleft", + "bar", + "braceright", + "asciitilde", + "exclamdown", + "cent", + "sterling", + "fraction", + "yen", + "florin", + "section", + "currency", + "quotesingle", + "quotedblleft", + "guillemotleft", + "guilsinglleft", + "guilsinglright", + "fi", + "fl", + "endash", + "dagger", + "daggerdbl", + "periodcentered", + "paragraph", + "bullet", + "quotesinglbase", + "quotedblbase", + "quotedblright", + "guillemotright", + "ellipsis", + "perthousand", + "questiondown", + "grave", + "acute", + "circumflex", + "tilde", + "macron", + "breve", + "dotaccent", + "dieresis", + "ring", + "cedilla", + "hungarumlaut", + "ogonek", + "caron", + "emdash", + "AE", + "ordfeminine", + "Lslash", + "Oslash", + "OE", + "ordmasculine", + "ae", + "dotlessi", + "lslash", + "oslash", + "oe", + "germandbls", + "onesuperior", + "logicalnot", + "mu", + "trademark", + "Eth", + "onehalf", + "plusminus", + "Thorn", + "onequarter", + "divide", + "brokenbar", + "degree", + "thorn", + "threequarters", + "twosuperior", + "registered", + "minus", + "eth", + "multiply", + "threesuperior", + "copyright", + "Aacute", + "Acircumflex", + "Adieresis", + "Agrave", + "Aring", + "Atilde", + "Ccedilla", + "Eacute", + "Ecircumflex", + "Edieresis", + "Egrave", + "Iacute", + "Icircumflex", + "Idieresis", + "Igrave", + "Ntilde", + "Oacute", + "Ocircumflex", + "Odieresis", + "Ograve", + "Otilde", + "Scaron", + "Uacute", + "Ucircumflex", + "Udieresis", + "Ugrave", + "Yacute", + "Ydieresis", + "Zcaron", + "aacute", + "acircumflex", + "adieresis", + "agrave", + "aring", + "atilde", + "ccedilla", + "eacute", + "ecircumflex", + "edieresis", + "egrave", + "iacute", + "icircumflex", + "idieresis", + "igrave", + "ntilde", + "oacute", + "ocircumflex", + "odieresis", + "ograve", + "otilde", + "scaron", + "uacute", + "ucircumflex", + "udieresis", + "ugrave", + "yacute", + "ydieresis", + "zcaron", + "exclamsmall", + "Hungarumlautsmall", + "dollaroldstyle", + "dollarsuperior", + "ampersandsmall", + "Acutesmall", + "parenleftsuperior", + "parenrightsuperior", + "266 ff", + "onedotenleader", + "zerooldstyle", + "oneoldstyle", + "twooldstyle", + "threeoldstyle", + "fouroldstyle", + "fiveoldstyle", + "sixoldstyle", + "sevenoldstyle", + "eightoldstyle", + "nineoldstyle", + "commasuperior", + "threequartersemdash", + "periodsuperior", + "questionsmall", + "asuperior", + "bsuperior", + "centsuperior", + "dsuperior", + "esuperior", + "isuperior", + "lsuperior", + "msuperior", + "nsuperior", + "osuperior", + "rsuperior", + "ssuperior", + "tsuperior", + "ff", + "ffi", + "ffl", + "parenleftinferior", + "parenrightinferior", + "Circumflexsmall", + "hyphensuperior", + "Gravesmall", + "Asmall", + "Bsmall", + "Csmall", + "Dsmall", + "Esmall", + "Fsmall", + "Gsmall", + "Hsmall", + "Ismall", + "Jsmall", + "Ksmall", + "Lsmall", + "Msmall", + "Nsmall", + "Osmall", + "Psmall", + "Qsmall", + "Rsmall", + "Ssmall", + "Tsmall", + "Usmall", + "Vsmall", + "Wsmall", + "Xsmall", + "Ysmall", + "Zsmall", + "colonmonetary", + "onefitted", + "rupiah", + "Tildesmall", + "exclamdownsmall", + "centoldstyle", + "Lslashsmall", + "Scaronsmall", + "Zcaronsmall", + "Dieresissmall", + "Brevesmall", + "Caronsmall", + "Dotaccentsmall", + "Macronsmall", + "figuredash", + "hypheninferior", + "Ogoneksmall", + "Ringsmall", + "Cedillasmall", + "questiondownsmall", + "oneeighth", + "threeeighths", + "fiveeighths", + "seveneighths", + "onethird", + "twothirds", + "zerosuperior", + "foursuperior", + "fivesuperior", + "sixsuperior", + "sevensuperior", + "eightsuperior", + "ninesuperior", + "zeroinferior", + "oneinferior", + "twoinferior", + "threeinferior", + "fourinferior", + "fiveinferior", + "sixinferior", + "seveninferior", + "eightinferior", + "nineinferior", + "centinferior", + "dollarinferior", + "periodinferior", + "commainferior", + "Agravesmall", + "Aacutesmall", + "Acircumflexsmall", + "Atildesmall", + "Adieresissmall", + "Aringsmall", + "AEsmall", + "Ccedillasmall", + "Egravesmall", + "Eacutesmall", + "Ecircumflexsmall", + "Edieresissmall", + "Igravesmall", + "Iacutesmall", + "Icircumflexsmall", + "Idieresissmall", + "Ethsmall", + "Ntildesmall", + "Ogravesmall", + "Oacutesmall", + "Ocircumflexsmall", + "Otildesmall", + "Odieresissmall", + "OEsmall", + "Oslashsmall", + "Ugravesmall", + "Uacutesmall", + "Ucircumflexsmall", + "Udieresissmall", + "Yacutesmall", + "Thornsmall", + "Ydieresissmall", + "001.000", + "001.001", + "001.002", + "001.003", + "Black", + "Bold", + "Book", + "Light", + "Medium", + "Regular", + "Roman", + "Semibold", + ], + le = [ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "space", + "exclam", + "quotedbl", + "numbersign", + "dollar", + "percent", + "ampersand", + "quoteright", + "parenleft", + "parenright", + "asterisk", + "plus", + "comma", + "hyphen", + "period", + "slash", + "zero", + "one", + "two", + "three", + "four", + "five", + "six", + "seven", + "eight", + "nine", + "colon", + "semicolon", + "less", + "equal", + "greater", + "question", + "at", + "A", + "B", + "C", + "D", + "E", + "F", + "G", + "H", + "I", + "J", + "K", + "L", + "M", + "N", + "O", + "P", + "Q", + "R", + "S", + "T", + "U", + "V", + "W", + "X", + "Y", + "Z", + "bracketleft", + "backslash", + "bracketright", + "asciicircum", + "underscore", + "quoteleft", + "a", + "b", + "c", + "d", + "e", + "f", + "g", + "h", + "i", + "j", + "k", + "l", + "m", + "n", + "o", + "p", + "q", + "r", + "s", + "t", + "u", + "v", + "w", + "x", + "y", + "z", + "braceleft", + "bar", + "braceright", + "asciitilde", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "exclamdown", + "cent", + "sterling", + "fraction", + "yen", + "florin", + "section", + "currency", + "quotesingle", + "quotedblleft", + "guillemotleft", + "guilsinglleft", + "guilsinglright", + "fi", + "fl", + "", + "endash", + "dagger", + "daggerdbl", + "periodcentered", + "", + "paragraph", + "bullet", + "quotesinglbase", + "quotedblbase", + "quotedblright", + "guillemotright", + "ellipsis", + "perthousand", + "", + "questiondown", + "", + "grave", + "acute", + "circumflex", + "tilde", + "macron", + "breve", + "dotaccent", + "dieresis", + "", + "ring", + "cedilla", + "", + "hungarumlaut", + "ogonek", + "caron", + "emdash", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "AE", + "", + "ordfeminine", + "", + "", + "", + "", + "Lslash", + "Oslash", + "OE", + "ordmasculine", + "", + "", + "", + "", + "", + "ae", + "", + "", + "", + "dotlessi", + "", + "", + "lslash", + "oslash", + "oe", + "germandbls", + ], + ue = [ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "space", + "exclamsmall", + "Hungarumlautsmall", + "", + "dollaroldstyle", + "dollarsuperior", + "ampersandsmall", + "Acutesmall", + "parenleftsuperior", + "parenrightsuperior", + "twodotenleader", + "onedotenleader", + "comma", + "hyphen", + "period", + "fraction", + "zerooldstyle", + "oneoldstyle", + "twooldstyle", + "threeoldstyle", + "fouroldstyle", + "fiveoldstyle", + "sixoldstyle", + "sevenoldstyle", + "eightoldstyle", + "nineoldstyle", + "colon", + "semicolon", + "commasuperior", + "threequartersemdash", + "periodsuperior", + "questionsmall", + "", + "asuperior", + "bsuperior", + "centsuperior", + "dsuperior", + "esuperior", + "", + "", + "isuperior", + "", + "", + "lsuperior", + "msuperior", + "nsuperior", + "osuperior", + "", + "", + "rsuperior", + "ssuperior", + "tsuperior", + "", + "ff", + "fi", + "fl", + "ffi", + "ffl", + "parenleftinferior", + "", + "parenrightinferior", + "Circumflexsmall", + "hyphensuperior", + "Gravesmall", + "Asmall", + "Bsmall", + "Csmall", + "Dsmall", + "Esmall", + "Fsmall", + "Gsmall", + "Hsmall", + "Ismall", + "Jsmall", + "Ksmall", + "Lsmall", + "Msmall", + "Nsmall", + "Osmall", + "Psmall", + "Qsmall", + "Rsmall", + "Ssmall", + "Tsmall", + "Usmall", + "Vsmall", + "Wsmall", + "Xsmall", + "Ysmall", + "Zsmall", + "colonmonetary", + "onefitted", + "rupiah", + "Tildesmall", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "exclamdownsmall", + "centoldstyle", + "Lslashsmall", + "", + "", + "Scaronsmall", + "Zcaronsmall", + "Dieresissmall", + "Brevesmall", + "Caronsmall", + "", + "Dotaccentsmall", + "", + "", + "Macronsmall", + "", + "", + "figuredash", + "hypheninferior", + "", + "", + "Ogoneksmall", + "Ringsmall", + "Cedillasmall", + "", + "", + "", + "onequarter", + "onehalf", + "threequarters", + "questiondownsmall", + "oneeighth", + "threeeighths", + "fiveeighths", + "seveneighths", + "onethird", + "twothirds", + "", + "", + "zerosuperior", + "onesuperior", + "twosuperior", + "threesuperior", + "foursuperior", + "fivesuperior", + "sixsuperior", + "sevensuperior", + "eightsuperior", + "ninesuperior", + "zeroinferior", + "oneinferior", + "twoinferior", + "threeinferior", + "fourinferior", + "fiveinferior", + "sixinferior", + "seveninferior", + "eightinferior", + "nineinferior", + "centinferior", + "dollarinferior", + "periodinferior", + "commainferior", + "Agravesmall", + "Aacutesmall", + "Acircumflexsmall", + "Atildesmall", + "Adieresissmall", + "Aringsmall", + "AEsmall", + "Ccedillasmall", + "Egravesmall", + "Eacutesmall", + "Ecircumflexsmall", + "Edieresissmall", + "Igravesmall", + "Iacutesmall", + "Icircumflexsmall", + "Idieresissmall", + "Ethsmall", + "Ntildesmall", + "Ogravesmall", + "Oacutesmall", + "Ocircumflexsmall", + "Otildesmall", + "Odieresissmall", + "OEsmall", + "Oslashsmall", + "Ugravesmall", + "Uacutesmall", + "Ucircumflexsmall", + "Udieresissmall", + "Yacutesmall", + "Thornsmall", + "Ydieresissmall", + ], + ce = [ + ".notdef", + ".null", + "nonmarkingreturn", + "space", + "exclam", + "quotedbl", + "numbersign", + "dollar", + "percent", + "ampersand", + "quotesingle", + "parenleft", + "parenright", + "asterisk", + "plus", + "comma", + "hyphen", + "period", + "slash", + "zero", + "one", + "two", + "three", + "four", + "five", + "six", + "seven", + "eight", + "nine", + "colon", + "semicolon", + "less", + "equal", + "greater", + "question", + "at", + "A", + "B", + "C", + "D", + "E", + "F", + "G", + "H", + "I", + "J", + "K", + "L", + "M", + "N", + "O", + "P", + "Q", + "R", + "S", + "T", + "U", + "V", + "W", + "X", + "Y", + "Z", + "bracketleft", + "backslash", + "bracketright", + "asciicircum", + "underscore", + "grave", + "a", + "b", + "c", + "d", + "e", + "f", + "g", + "h", + "i", + "j", + "k", + "l", + "m", + "n", + "o", + "p", + "q", + "r", + "s", + "t", + "u", + "v", + "w", + "x", + "y", + "z", + "braceleft", + "bar", + "braceright", + "asciitilde", + "Adieresis", + "Aring", + "Ccedilla", + "Eacute", + "Ntilde", + "Odieresis", + "Udieresis", + "aacute", + "agrave", + "acircumflex", + "adieresis", + "atilde", + "aring", + "ccedilla", + "eacute", + "egrave", + "ecircumflex", + "edieresis", + "iacute", + "igrave", + "icircumflex", + "idieresis", + "ntilde", + "oacute", + "ograve", + "ocircumflex", + "odieresis", + "otilde", + "uacute", + "ugrave", + "ucircumflex", + "udieresis", + "dagger", + "degree", + "cent", + "sterling", + "section", + "bullet", + "paragraph", + "germandbls", + "registered", + "copyright", + "trademark", + "acute", + "dieresis", + "notequal", + "AE", + "Oslash", + "infinity", + "plusminus", + "lessequal", + "greaterequal", + "yen", + "mu", + "partialdiff", + "summation", + "product", + "pi", + "integral", + "ordfeminine", + "ordmasculine", + "Omega", + "ae", + "oslash", + "questiondown", + "exclamdown", + "logicalnot", + "radical", + "florin", + "approxequal", + "Delta", + "guillemotleft", + "guillemotright", + "ellipsis", + "nonbreakingspace", + "Agrave", + "Atilde", + "Otilde", + "OE", + "oe", + "endash", + "emdash", + "quotedblleft", + "quotedblright", + "quoteleft", + "quoteright", + "divide", + "lozenge", + "ydieresis", + "Ydieresis", + "fraction", + "currency", + "guilsinglleft", + "guilsinglright", + "fi", + "fl", + "daggerdbl", + "periodcentered", + "quotesinglbase", + "quotedblbase", + "perthousand", + "Acircumflex", + "Ecircumflex", + "Aacute", + "Edieresis", + "Egrave", + "Iacute", + "Icircumflex", + "Idieresis", + "Igrave", + "Oacute", + "Ocircumflex", + "apple", + "Ograve", + "Uacute", + "Ucircumflex", + "Ugrave", + "dotlessi", + "circumflex", + "tilde", + "macron", + "breve", + "dotaccent", + "ring", + "cedilla", + "hungarumlaut", + "ogonek", + "caron", + "Lslash", + "lslash", + "Scaron", + "scaron", + "Zcaron", + "zcaron", + "brokenbar", + "Eth", + "eth", + "Yacute", + "yacute", + "Thorn", + "thorn", + "minus", + "multiply", + "onesuperior", + "twosuperior", + "threesuperior", + "onehalf", + "onequarter", + "threequarters", + "franc", + "Gbreve", + "gbreve", + "Idotaccent", + "Scedilla", + "scedilla", + "Cacute", + "cacute", + "Ccaron", + "ccaron", + "dcroat", + ]; + function fe(e) { + this.font = e; + } + function de(e) { + this.cmap = e; + } + function he(e, t) { + (this.encoding = e), (this.charset = t); + } + function pe(e) { + switch (e.version) { + case 1: + this.names = ce.slice(); + break; + case 2: + this.names = new Array(e.numberOfGlyphs); + for (var t = 0; t < e.numberOfGlyphs; t++) + e.glyphNameIndex[t] < ce.length + ? (this.names[t] = ce[e.glyphNameIndex[t]]) + : (this.names[t] = + e.names[e.glyphNameIndex[t] - ce.length]); + break; + case 2.5: + this.names = new Array(e.numberOfGlyphs); + for (var n = 0; n < e.numberOfGlyphs; n++) + this.names[n] = ce[n + e.glyphNameIndex[n]]; + break; + default: + this.names = []; + } + } + function ve(e, t) { + t.lowMemory + ? (function (e) { + e._IndexToUnicodeMap = {}; + for ( + var t = e.tables.cmap.glyphIndexMap, + n = Object.keys(t), + r = 0; + r < n.length; + r += 1 + ) { + var i = n[r], + a = t[i]; + void 0 === e._IndexToUnicodeMap[a] + ? (e._IndexToUnicodeMap[a] = { + unicodes: [parseInt(i)], + }) + : e._IndexToUnicodeMap[a].unicodes.push(parseInt(i)); + } + })(e) + : (function (e) { + for ( + var t, + n = e.tables.cmap.glyphIndexMap, + r = Object.keys(n), + i = 0; + i < r.length; + i += 1 + ) { + var a = r[i], + o = n[a]; + (t = e.glyphs.get(o)).addUnicode(parseInt(a)); + } + for (var s = 0; s < e.glyphs.length; s += 1) + (t = e.glyphs.get(s)), + e.cffEncoding + ? e.isCIDFont + ? (t.name = "gid" + s) + : (t.name = e.cffEncoding.charset[s]) + : e.glyphNames.names && + (t.name = e.glyphNames.glyphIndexToName(s)); + })(e); + } + (fe.prototype.charToGlyphIndex = function (e) { + var t = e.codePointAt(0), + n = this.font.glyphs; + if (n) + for (var r = 0; r < n.length; r += 1) + for (var i = n.get(r), a = 0; a < i.unicodes.length; a += 1) + if (i.unicodes[a] === t) return r; + return null; + }), + (de.prototype.charToGlyphIndex = function (e) { + return this.cmap.glyphIndexMap[e.codePointAt(0)] || 0; + }), + (he.prototype.charToGlyphIndex = function (e) { + var t = e.codePointAt(0), + n = this.encoding[t]; + return this.charset.indexOf(n); + }), + (pe.prototype.nameToGlyphIndex = function (e) { + return this.names.indexOf(e); + }), + (pe.prototype.glyphIndexToName = function (e) { + return this.names[e]; + }); + var me = { + line: function (e, t, n, r, i) { + e.beginPath(), e.moveTo(t, n), e.lineTo(r, i), e.stroke(); + }, + }; + function ge(e) { + this.bindConstructorValues(e); + } + function Ae(e, t, n) { + Object.defineProperty(e, t, { + get: function () { + return e.path, e[n]; + }, + set: function (t) { + e[n] = t; + }, + enumerable: !0, + configurable: !0, + }); + } + function ye(e, t) { + if (((this.font = e), (this.glyphs = {}), Array.isArray(t))) + for (var n = 0; n < t.length; n++) { + var r = t[n]; + (r.path.unitsPerEm = e.unitsPerEm), (this.glyphs[n] = r); + } + this.length = (t && t.length) || 0; + } + (ge.prototype.bindConstructorValues = function (e) { + (this.index = e.index || 0), + (this.name = e.name || null), + (this.unicode = e.unicode || void 0), + (this.unicodes = + e.unicodes || void 0 !== e.unicode ? [e.unicode] : []), + "xMin" in e && (this.xMin = e.xMin), + "yMin" in e && (this.yMin = e.yMin), + "xMax" in e && (this.xMax = e.xMax), + "yMax" in e && (this.yMax = e.yMax), + "advanceWidth" in e && (this.advanceWidth = e.advanceWidth), + Object.defineProperty( + this, + "path", + (function (e, t) { + var n = t || new C(); + return { + configurable: !0, + get: function () { + return "function" === typeof n && (n = n()), n; + }, + set: function (e) { + n = e; + }, + }; + })(0, e.path) + ); + }), + (ge.prototype.addUnicode = function (e) { + 0 === this.unicodes.length && (this.unicode = e), + this.unicodes.push(e); + }), + (ge.prototype.getBoundingBox = function () { + return this.path.getBoundingBox(); + }), + (ge.prototype.getPath = function (e, t, n, r, i) { + var a, o; + (e = void 0 !== e ? e : 0), + (t = void 0 !== t ? t : 0), + (n = void 0 !== n ? n : 72), + r || (r = {}); + var s = r.xScale, + l = r.yScale; + if ( + (r.hinting && + i && + i.hinting && + (o = this.path && i.hinting.exec(this, n)), + o) + ) + (a = i.hinting.getCommands(o)), + (e = Math.round(e)), + (t = Math.round(t)), + (s = l = 1); + else { + a = this.path.commands; + var u = (1 / (this.path.unitsPerEm || 1e3)) * n; + void 0 === s && (s = u), void 0 === l && (l = u); + } + for (var c = new C(), f = 0; f < a.length; f += 1) { + var d = a[f]; + "M" === d.type + ? c.moveTo(e + d.x * s, t + -d.y * l) + : "L" === d.type + ? c.lineTo(e + d.x * s, t + -d.y * l) + : "Q" === d.type + ? c.quadraticCurveTo( + e + d.x1 * s, + t + -d.y1 * l, + e + d.x * s, + t + -d.y * l + ) + : "C" === d.type + ? c.curveTo( + e + d.x1 * s, + t + -d.y1 * l, + e + d.x2 * s, + t + -d.y2 * l, + e + d.x * s, + t + -d.y * l + ) + : "Z" === d.type && c.closePath(); + } + return c; + }), + (ge.prototype.getContours = function () { + if (void 0 === this.points) return []; + for ( + var e = [], t = [], n = 0; + n < this.points.length; + n += 1 + ) { + var r = this.points[n]; + t.push(r), r.lastPointOfContour && (e.push(t), (t = [])); + } + return ( + M.argument( + 0 === t.length, + "There are still points left in the current contour." + ), + e + ); + }), + (ge.prototype.getMetrics = function () { + for ( + var e = this.path.commands, t = [], n = [], r = 0; + r < e.length; + r += 1 + ) { + var i = e[r]; + "Z" !== i.type && (t.push(i.x), n.push(i.y)), + ("Q" !== i.type && "C" !== i.type) || + (t.push(i.x1), n.push(i.y1)), + "C" === i.type && (t.push(i.x2), n.push(i.y2)); + } + var a = { + xMin: Math.min.apply(null, t), + yMin: Math.min.apply(null, n), + xMax: Math.max.apply(null, t), + yMax: Math.max.apply(null, n), + leftSideBearing: this.leftSideBearing, + }; + return ( + isFinite(a.xMin) || (a.xMin = 0), + isFinite(a.xMax) || (a.xMax = this.advanceWidth), + isFinite(a.yMin) || (a.yMin = 0), + isFinite(a.yMax) || (a.yMax = 0), + (a.rightSideBearing = + this.advanceWidth - a.leftSideBearing - (a.xMax - a.xMin)), + a + ); + }), + (ge.prototype.draw = function (e, t, n, r, i) { + this.getPath(t, n, r, i).draw(e); + }), + (ge.prototype.drawPoints = function (e, t, n, r) { + function i(t, n, r, i) { + e.beginPath(); + for (var a = 0; a < t.length; a += 1) + e.moveTo(n + t[a].x * i, r + t[a].y * i), + e.arc( + n + t[a].x * i, + r + t[a].y * i, + 2, + 0, + 2 * Math.PI, + !1 + ); + e.closePath(), e.fill(); + } + (t = void 0 !== t ? t : 0), + (n = void 0 !== n ? n : 0), + (r = void 0 !== r ? r : 24); + for ( + var a = (1 / this.path.unitsPerEm) * r, + o = [], + s = [], + l = this.path, + u = 0; + u < l.commands.length; + u += 1 + ) { + var c = l.commands[u]; + void 0 !== c.x && o.push({ x: c.x, y: -c.y }), + void 0 !== c.x1 && s.push({ x: c.x1, y: -c.y1 }), + void 0 !== c.x2 && s.push({ x: c.x2, y: -c.y2 }); + } + (e.fillStyle = "blue"), + i(o, t, n, a), + (e.fillStyle = "red"), + i(s, t, n, a); + }), + (ge.prototype.drawMetrics = function (e, t, n, r) { + var i; + (t = void 0 !== t ? t : 0), + (n = void 0 !== n ? n : 0), + (r = void 0 !== r ? r : 24), + (i = (1 / this.path.unitsPerEm) * r), + (e.lineWidth = 1), + (e.strokeStyle = "black"), + me.line(e, t, -1e4, t, 1e4), + me.line(e, -1e4, n, 1e4, n); + var a = this.xMin || 0, + o = this.yMin || 0, + s = this.xMax || 0, + l = this.yMax || 0, + u = this.advanceWidth || 0; + (e.strokeStyle = "blue"), + me.line(e, t + a * i, -1e4, t + a * i, 1e4), + me.line(e, t + s * i, -1e4, t + s * i, 1e4), + me.line(e, -1e4, n + -o * i, 1e4, n + -o * i), + me.line(e, -1e4, n + -l * i, 1e4, n + -l * i), + (e.strokeStyle = "green"), + me.line(e, t + u * i, -1e4, t + u * i, 1e4); + }), + (ye.prototype.get = function (e) { + if (void 0 === this.glyphs[e]) { + this.font._push(e), + "function" === typeof this.glyphs[e] && + (this.glyphs[e] = this.glyphs[e]()); + var t = this.glyphs[e], + n = this.font._IndexToUnicodeMap[e]; + if (n) + for (var r = 0; r < n.unicodes.length; r++) + t.addUnicode(n.unicodes[r]); + this.font.cffEncoding + ? this.font.isCIDFont + ? (t.name = "gid" + e) + : (t.name = this.font.cffEncoding.charset[e]) + : this.font.glyphNames.names && + (t.name = this.font.glyphNames.glyphIndexToName(e)), + (this.glyphs[e].advanceWidth = + this.font._hmtxTableData[e].advanceWidth), + (this.glyphs[e].leftSideBearing = + this.font._hmtxTableData[e].leftSideBearing); + } else + "function" === typeof this.glyphs[e] && + (this.glyphs[e] = this.glyphs[e]()); + return this.glyphs[e]; + }), + (ye.prototype.push = function (e, t) { + (this.glyphs[e] = t), this.length++; + }); + var be = { + GlyphSet: ye, + glyphLoader: function (e, t) { + return new ge({ index: t, font: e }); + }, + ttfGlyphLoader: function (e, t, n, r, i, a) { + return function () { + var o = new ge({ index: t, font: e }); + return ( + (o.path = function () { + n(o, r, i); + var t = a(e.glyphs, o); + return (t.unitsPerEm = e.unitsPerEm), t; + }), + Ae(o, "xMin", "_xMin"), + Ae(o, "xMax", "_xMax"), + Ae(o, "yMin", "_yMin"), + Ae(o, "yMax", "_yMax"), + o + ); + }; + }, + cffGlyphLoader: function (e, t, n, r) { + return function () { + var i = new ge({ index: t, font: e }); + return ( + (i.path = function () { + var t = n(e, i, r); + return (t.unitsPerEm = e.unitsPerEm), t; + }), + i + ); + }; + }, + }; + function xe(e, t) { + if (e === t) return !0; + if (Array.isArray(e) && Array.isArray(t)) { + if (e.length !== t.length) return !1; + for (var n = 0; n < e.length; n += 1) + if (!xe(e[n], t[n])) return !1; + return !0; + } + return !1; + } + function Se(e) { + return e.length < 1240 ? 107 : e.length < 33900 ? 1131 : 32768; + } + function Ee(e, t, n) { + var r, + i, + a = [], + o = [], + s = ie.getCard16(e, t); + if (0 !== s) { + var l = ie.getByte(e, t + 2); + r = t + (s + 1) * l + 2; + for (var u = t + 3, c = 0; c < s + 1; c += 1) + a.push(ie.getOffset(e, u, l)), (u += l); + i = r + a[s]; + } else i = t + 2; + for (var f = 0; f < a.length - 1; f += 1) { + var d = ie.getBytes(e, r + a[f], r + a[f + 1]); + n && (d = n(d)), o.push(d); + } + return { objects: o, startOffset: t, endOffset: i }; + } + function _e(e, t) { + if (28 === t) return (e.parseByte() << 8) | e.parseByte(); + if (29 === t) + return ( + (e.parseByte() << 24) | + (e.parseByte() << 16) | + (e.parseByte() << 8) | + e.parseByte() + ); + if (30 === t) + return (function (e) { + for ( + var t = "", + n = [ + "0", + "1", + "2", + "3", + "4", + "5", + "6", + "7", + "8", + "9", + ".", + "E", + "E-", + null, + "-", + ]; + ; + + ) { + var r = e.parseByte(), + i = r >> 4, + a = 15 & r; + if (15 === i) break; + if (((t += n[i]), 15 === a)) break; + t += n[a]; + } + return parseFloat(t); + })(e); + if (t >= 32 && t <= 246) return t - 139; + if (t >= 247 && t <= 250) + return 256 * (t - 247) + e.parseByte() + 108; + if (t >= 251 && t <= 254) + return 256 * -(t - 251) - e.parseByte() - 108; + throw new Error("Invalid b0 " + t); + } + function Ce(e, t, n) { + t = void 0 !== t ? t : 0; + var r = new ie.Parser(e, t), + i = [], + a = []; + for (n = void 0 !== n ? n : e.length; r.relativeOffset < n; ) { + var o = r.parseByte(); + o <= 21 + ? (12 === o && (o = 1200 + r.parseByte()), + i.push([o, a]), + (a = [])) + : a.push(_e(r, o)); + } + return (function (e) { + for (var t = {}, n = 0; n < e.length; n += 1) { + var r = e[n][0], + i = e[n][1], + a = void 0; + if ( + ((a = 1 === i.length ? i[0] : i), + t.hasOwnProperty(r) && !isNaN(t[r])) + ) + throw new Error("Object " + t + " already has key " + r); + t[r] = a; + } + return t; + })(i); + } + function we(e, t) { + return (t = t <= 390 ? se[t] : e[t - 391]); + } + function Te(e, t, n) { + for (var r, i = {}, a = 0; a < t.length; a += 1) { + var o = t[a]; + if (Array.isArray(o.type)) { + var s = []; + s.length = o.type.length; + for (var l = 0; l < o.type.length; l++) + void 0 === (r = void 0 !== e[o.op] ? e[o.op][l] : void 0) && + (r = + void 0 !== o.value && void 0 !== o.value[l] + ? o.value[l] + : null), + "SID" === o.type[l] && (r = we(n, r)), + (s[l] = r); + i[o.name] = s; + } else + void 0 === (r = e[o.op]) && + (r = void 0 !== o.value ? o.value : null), + "SID" === o.type && (r = we(n, r)), + (i[o.name] = r); + } + return i; + } + var Me = [ + { name: "version", op: 0, type: "SID" }, + { name: "notice", op: 1, type: "SID" }, + { name: "copyright", op: 1200, type: "SID" }, + { name: "fullName", op: 2, type: "SID" }, + { name: "familyName", op: 3, type: "SID" }, + { name: "weight", op: 4, type: "SID" }, + { name: "isFixedPitch", op: 1201, type: "number", value: 0 }, + { name: "italicAngle", op: 1202, type: "number", value: 0 }, + { + name: "underlinePosition", + op: 1203, + type: "number", + value: -100, + }, + { + name: "underlineThickness", + op: 1204, + type: "number", + value: 50, + }, + { name: "paintType", op: 1205, type: "number", value: 0 }, + { name: "charstringType", op: 1206, type: "number", value: 2 }, + { + name: "fontMatrix", + op: 1207, + type: ["real", "real", "real", "real", "real", "real"], + value: [0.001, 0, 0, 0.001, 0, 0], + }, + { name: "uniqueId", op: 13, type: "number" }, + { + name: "fontBBox", + op: 5, + type: ["number", "number", "number", "number"], + value: [0, 0, 0, 0], + }, + { name: "strokeWidth", op: 1208, type: "number", value: 0 }, + { name: "xuid", op: 14, type: [], value: null }, + { name: "charset", op: 15, type: "offset", value: 0 }, + { name: "encoding", op: 16, type: "offset", value: 0 }, + { name: "charStrings", op: 17, type: "offset", value: 0 }, + { + name: "private", + op: 18, + type: ["number", "offset"], + value: [0, 0], + }, + { name: "ros", op: 1230, type: ["SID", "SID", "number"] }, + { name: "cidFontVersion", op: 1231, type: "number", value: 0 }, + { name: "cidFontRevision", op: 1232, type: "number", value: 0 }, + { name: "cidFontType", op: 1233, type: "number", value: 0 }, + { name: "cidCount", op: 1234, type: "number", value: 8720 }, + { name: "uidBase", op: 1235, type: "number" }, + { name: "fdArray", op: 1236, type: "offset" }, + { name: "fdSelect", op: 1237, type: "offset" }, + { name: "fontName", op: 1238, type: "SID" }, + ], + Ie = [ + { name: "subrs", op: 19, type: "offset", value: 0 }, + { name: "defaultWidthX", op: 20, type: "number", value: 0 }, + { name: "nominalWidthX", op: 21, type: "number", value: 0 }, + ]; + function ke(e, t) { + return Te(Ce(e, 0, e.byteLength), Me, t); + } + function Re(e, t, n, r) { + return Te(Ce(e, t, n), Ie, r); + } + function Be(e, t, n, r) { + for (var i = [], a = 0; a < n.length; a += 1) { + var o = ke(new DataView(new Uint8Array(n[a]).buffer), r); + (o._subrs = []), + (o._subrsBias = 0), + (o._defaultWidthX = 0), + (o._nominalWidthX = 0); + var s = o.private[0], + l = o.private[1]; + if (0 !== s && 0 !== l) { + var u = Re(e, l + t, s, r); + if ( + ((o._defaultWidthX = u.defaultWidthX), + (o._nominalWidthX = u.nominalWidthX), + 0 !== u.subrs) + ) { + var c = Ee(e, l + u.subrs + t); + (o._subrs = c.objects), (o._subrsBias = Se(o._subrs)); + } + o._privateDict = u; + } + i.push(o); + } + return i; + } + function Pe(e, t, n) { + var r, + i, + a, + o, + s, + l, + u, + c, + f = new C(), + d = [], + h = 0, + p = !1, + v = !1, + m = 0, + g = 0; + if (e.isCIDFont) { + var A = e.tables.cff.topDict._fdSelect[t.index], + y = e.tables.cff.topDict._fdArray[A]; + (s = y._subrs), + (l = y._subrsBias), + (u = y._defaultWidthX), + (c = y._nominalWidthX); + } else + (s = e.tables.cff.topDict._subrs), + (l = e.tables.cff.topDict._subrsBias), + (u = e.tables.cff.topDict._defaultWidthX), + (c = e.tables.cff.topDict._nominalWidthX); + var b = u; + function x(e, t) { + v && f.closePath(), f.moveTo(e, t), (v = !0); + } + function S() { + d.length % 2 !== 0 && !p && (b = d.shift() + c), + (h += d.length >> 1), + (d.length = 0), + (p = !0); + } + return ( + (function n(u) { + for ( + var A, y, E, _, C, w, T, M, I, k, R, B, P = 0; + P < u.length; + + ) { + var L = u[P]; + switch (((P += 1), L)) { + case 1: + case 3: + case 18: + case 23: + S(); + break; + case 4: + d.length > 1 && !p && ((b = d.shift() + c), (p = !0)), + (g += d.pop()), + x(m, g); + break; + case 5: + for (; d.length > 0; ) + (m += d.shift()), (g += d.shift()), f.lineTo(m, g); + break; + case 6: + for ( + ; + d.length > 0 && + ((m += d.shift()), f.lineTo(m, g), 0 !== d.length); + + ) + (g += d.shift()), f.lineTo(m, g); + break; + case 7: + for ( + ; + d.length > 0 && + ((g += d.shift()), f.lineTo(m, g), 0 !== d.length); + + ) + (m += d.shift()), f.lineTo(m, g); + break; + case 8: + for (; d.length > 0; ) + (r = m + d.shift()), + (i = g + d.shift()), + (a = r + d.shift()), + (o = i + d.shift()), + (m = a + d.shift()), + (g = o + d.shift()), + f.curveTo(r, i, a, o, m, g); + break; + case 10: + (C = d.pop() + l), (w = s[C]) && n(w); + break; + case 11: + return; + case 12: + switch (((L = u[P]), (P += 1), L)) { + case 35: + (r = m + d.shift()), + (i = g + d.shift()), + (a = r + d.shift()), + (o = i + d.shift()), + (T = a + d.shift()), + (M = o + d.shift()), + (I = T + d.shift()), + (k = M + d.shift()), + (R = I + d.shift()), + (B = k + d.shift()), + (m = R + d.shift()), + (g = B + d.shift()), + d.shift(), + f.curveTo(r, i, a, o, T, M), + f.curveTo(I, k, R, B, m, g); + break; + case 34: + (r = m + d.shift()), + (i = g), + (a = r + d.shift()), + (o = i + d.shift()), + (T = a + d.shift()), + (M = o), + (I = T + d.shift()), + (k = o), + (R = I + d.shift()), + (B = g), + (m = R + d.shift()), + f.curveTo(r, i, a, o, T, M), + f.curveTo(I, k, R, B, m, g); + break; + case 36: + (r = m + d.shift()), + (i = g + d.shift()), + (a = r + d.shift()), + (o = i + d.shift()), + (T = a + d.shift()), + (M = o), + (I = T + d.shift()), + (k = o), + (R = I + d.shift()), + (B = k + d.shift()), + (m = R + d.shift()), + f.curveTo(r, i, a, o, T, M), + f.curveTo(I, k, R, B, m, g); + break; + case 37: + (r = m + d.shift()), + (i = g + d.shift()), + (a = r + d.shift()), + (o = i + d.shift()), + (T = a + d.shift()), + (M = o + d.shift()), + (I = T + d.shift()), + (k = M + d.shift()), + (R = I + d.shift()), + (B = k + d.shift()), + Math.abs(R - m) > Math.abs(B - g) + ? (m = R + d.shift()) + : (g = B + d.shift()), + f.curveTo(r, i, a, o, T, M), + f.curveTo(I, k, R, B, m, g); + break; + default: + console.log( + "Glyph " + t.index + ": unknown operator 1200" + L + ), + (d.length = 0); + } + break; + case 14: + d.length > 0 && !p && ((b = d.shift() + c), (p = !0)), + v && (f.closePath(), (v = !1)); + break; + case 19: + case 20: + S(), (P += (h + 7) >> 3); + break; + case 21: + d.length > 2 && !p && ((b = d.shift() + c), (p = !0)), + (g += d.pop()), + x((m += d.pop()), g); + break; + case 22: + d.length > 1 && !p && ((b = d.shift() + c), (p = !0)), + x((m += d.pop()), g); + break; + case 24: + for (; d.length > 2; ) + (r = m + d.shift()), + (i = g + d.shift()), + (a = r + d.shift()), + (o = i + d.shift()), + (m = a + d.shift()), + (g = o + d.shift()), + f.curveTo(r, i, a, o, m, g); + (m += d.shift()), (g += d.shift()), f.lineTo(m, g); + break; + case 25: + for (; d.length > 6; ) + (m += d.shift()), (g += d.shift()), f.lineTo(m, g); + (r = m + d.shift()), + (i = g + d.shift()), + (a = r + d.shift()), + (o = i + d.shift()), + (m = a + d.shift()), + (g = o + d.shift()), + f.curveTo(r, i, a, o, m, g); + break; + case 26: + for (d.length % 2 && (m += d.shift()); d.length > 0; ) + (r = m), + (i = g + d.shift()), + (a = r + d.shift()), + (o = i + d.shift()), + (m = a), + (g = o + d.shift()), + f.curveTo(r, i, a, o, m, g); + break; + case 27: + for (d.length % 2 && (g += d.shift()); d.length > 0; ) + (r = m + d.shift()), + (i = g), + (a = r + d.shift()), + (o = i + d.shift()), + (m = a + d.shift()), + (g = o), + f.curveTo(r, i, a, o, m, g); + break; + case 28: + (A = u[P]), + (y = u[P + 1]), + d.push(((A << 24) | (y << 16)) >> 16), + (P += 2); + break; + case 29: + (C = d.pop() + e.gsubrsBias), (w = e.gsubrs[C]) && n(w); + break; + case 30: + for ( + ; + d.length > 0 && + ((r = m), + (i = g + d.shift()), + (a = r + d.shift()), + (o = i + d.shift()), + (m = a + d.shift()), + (g = o + (1 === d.length ? d.shift() : 0)), + f.curveTo(r, i, a, o, m, g), + 0 !== d.length); + + ) + (r = m + d.shift()), + (i = g), + (a = r + d.shift()), + (o = i + d.shift()), + (g = o + d.shift()), + (m = a + (1 === d.length ? d.shift() : 0)), + f.curveTo(r, i, a, o, m, g); + break; + case 31: + for ( + ; + d.length > 0 && + ((r = m + d.shift()), + (i = g), + (a = r + d.shift()), + (o = i + d.shift()), + (g = o + d.shift()), + (m = a + (1 === d.length ? d.shift() : 0)), + f.curveTo(r, i, a, o, m, g), + 0 !== d.length); + + ) + (r = m), + (i = g + d.shift()), + (a = r + d.shift()), + (o = i + d.shift()), + (m = a + d.shift()), + (g = o + (1 === d.length ? d.shift() : 0)), + f.curveTo(r, i, a, o, m, g); + break; + default: + L < 32 + ? console.log( + "Glyph " + t.index + ": unknown operator " + L + ) + : L < 247 + ? d.push(L - 139) + : L < 251 + ? ((A = u[P]), + (P += 1), + d.push(256 * (L - 247) + A + 108)) + : L < 255 + ? ((A = u[P]), + (P += 1), + d.push(256 * -(L - 251) - A - 108)) + : ((A = u[P]), + (y = u[P + 1]), + (E = u[P + 2]), + (_ = u[P + 3]), + (P += 4), + d.push( + ((A << 24) | (y << 16) | (E << 8) | _) / 65536 + )); + } + } + })(n), + (t.advanceWidth = b), + f + ); + } + function Le(e, t) { + var n, + r = se.indexOf(e); + return ( + r >= 0 && (n = r), + (r = t.indexOf(e)) >= 0 + ? (n = r + se.length) + : ((n = se.length + t.length), t.push(e)), + n + ); + } + function De(e, t, n) { + for (var r = {}, i = 0; i < e.length; i += 1) { + var a = e[i], + o = t[a.name]; + void 0 === o || + xe(o, a.value) || + ("SID" === a.type && (o = Le(o, n)), + (r[a.op] = { name: a.name, type: a.type, value: o })); + } + return r; + } + function Ue(e, t) { + var n = new q.Record("Top DICT", [ + { name: "dict", type: "DICT", value: {} }, + ]); + return (n.dict = De(Me, e, t)), n; + } + function Fe(e) { + var t = new q.Record("Top DICT INDEX", [ + { name: "topDicts", type: "INDEX", value: [] }, + ]); + return ( + (t.topDicts = [{ name: "topDict_0", type: "TABLE", value: e }]), + t + ); + } + function Oe(e) { + var t = [], + n = e.path; + t.push({ name: "width", type: "NUMBER", value: e.advanceWidth }); + for (var r = 0, i = 0, a = 0; a < n.commands.length; a += 1) { + var o = void 0, + s = void 0, + l = n.commands[a]; + if ("Q" === l.type) { + var u = 1 / 3, + c = 2 / 3; + l = { + type: "C", + x: l.x, + y: l.y, + x1: Math.round(u * r + c * l.x1), + y1: Math.round(u * i + c * l.y1), + x2: Math.round(u * l.x + c * l.x1), + y2: Math.round(u * l.y + c * l.y1), + }; + } + if ("M" === l.type) + (o = Math.round(l.x - r)), + (s = Math.round(l.y - i)), + t.push({ name: "dx", type: "NUMBER", value: o }), + t.push({ name: "dy", type: "NUMBER", value: s }), + t.push({ name: "rmoveto", type: "OP", value: 21 }), + (r = Math.round(l.x)), + (i = Math.round(l.y)); + else if ("L" === l.type) + (o = Math.round(l.x - r)), + (s = Math.round(l.y - i)), + t.push({ name: "dx", type: "NUMBER", value: o }), + t.push({ name: "dy", type: "NUMBER", value: s }), + t.push({ name: "rlineto", type: "OP", value: 5 }), + (r = Math.round(l.x)), + (i = Math.round(l.y)); + else if ("C" === l.type) { + var f = Math.round(l.x1 - r), + d = Math.round(l.y1 - i), + h = Math.round(l.x2 - l.x1), + p = Math.round(l.y2 - l.y1); + (o = Math.round(l.x - l.x2)), + (s = Math.round(l.y - l.y2)), + t.push({ name: "dx1", type: "NUMBER", value: f }), + t.push({ name: "dy1", type: "NUMBER", value: d }), + t.push({ name: "dx2", type: "NUMBER", value: h }), + t.push({ name: "dy2", type: "NUMBER", value: p }), + t.push({ name: "dx", type: "NUMBER", value: o }), + t.push({ name: "dy", type: "NUMBER", value: s }), + t.push({ name: "rrcurveto", type: "OP", value: 8 }), + (r = Math.round(l.x)), + (i = Math.round(l.y)); + } + } + return t.push({ name: "endchar", type: "OP", value: 14 }), t; + } + var Ne = { + parse: function (e, t, n, r) { + n.tables.cff = {}; + var i = (function (e, t) { + var n = {}; + return ( + (n.formatMajor = ie.getCard8(e, t)), + (n.formatMinor = ie.getCard8(e, t + 1)), + (n.size = ie.getCard8(e, t + 2)), + (n.offsetSize = ie.getCard8(e, t + 3)), + (n.startOffset = t), + (n.endOffset = t + 4), + n + ); + })(e, t), + a = Ee(e, i.endOffset, ie.bytesToString), + o = Ee(e, a.endOffset), + s = Ee(e, o.endOffset, ie.bytesToString), + l = Ee(e, s.endOffset); + (n.gsubrs = l.objects), (n.gsubrsBias = Se(n.gsubrs)); + var u = Be(e, t, o.objects, s.objects); + if (1 !== u.length) + throw new Error( + "CFF table has too many fonts in 'FontSet' - count of fonts NameIndex.length = " + + u.length + ); + var c = u[0]; + if ( + ((n.tables.cff.topDict = c), + c._privateDict && + ((n.defaultWidthX = c._privateDict.defaultWidthX), + (n.nominalWidthX = c._privateDict.nominalWidthX)), + void 0 !== c.ros[0] && + void 0 !== c.ros[1] && + (n.isCIDFont = !0), + n.isCIDFont) + ) { + var f = c.fdArray, + d = c.fdSelect; + if (0 === f || 0 === d) + throw new Error( + "Font is marked as a CID font, but FDArray and/or FDSelect information is missing" + ); + var h = Ee(e, (f += t)), + p = Be(e, t, h.objects, s.objects); + (c._fdArray = p), + (d += t), + (c._fdSelect = (function (e, t, n, r) { + var i, + a = [], + o = new ie.Parser(e, t), + s = o.parseCard8(); + if (0 === s) + for (var l = 0; l < n; l++) { + if ((i = o.parseCard8()) >= r) + throw new Error( + "CFF table CID Font FDSelect has bad FD index value " + + i + + " (FD count " + + r + + ")" + ); + a.push(i); + } + else { + if (3 !== s) + throw new Error( + "CFF Table CID Font FDSelect table has unsupported format " + + s + ); + var u, + c = o.parseCard16(), + f = o.parseCard16(); + if (0 !== f) + throw new Error( + "CFF Table CID Font FDSelect format 3 range has bad initial GID " + + f + ); + for (var d = 0; d < c; d++) { + if ( + ((i = o.parseCard8()), + (u = o.parseCard16()), + i >= r) + ) + throw new Error( + "CFF table CID Font FDSelect has bad FD index value " + + i + + " (FD count " + + r + + ")" + ); + if (u > n) + throw new Error( + "CFF Table CID Font FDSelect format 3 range has bad GID " + + u + ); + for (; f < u; f++) a.push(i); + f = u; + } + if (u !== n) + throw new Error( + "CFF Table CID Font FDSelect format 3 range has bad final GID " + + u + ); + } + return a; + })(e, d, n.numGlyphs, p.length)); + } + var v, + m = t + c.private[1], + g = Re(e, m, c.private[0], s.objects); + if ( + ((n.defaultWidthX = g.defaultWidthX), + (n.nominalWidthX = g.nominalWidthX), + 0 !== g.subrs) + ) { + var A = m + g.subrs, + y = Ee(e, A); + (n.subrs = y.objects), (n.subrsBias = Se(n.subrs)); + } else (n.subrs = []), (n.subrsBias = 0); + r.lowMemory + ? ((v = (function (e, t) { + var n, + r, + i = [], + a = ie.getCard16(e, t); + if (0 !== a) { + var o = ie.getByte(e, t + 2); + n = t + (a + 1) * o + 2; + for (var s = t + 3, l = 0; l < a + 1; l += 1) + i.push(ie.getOffset(e, s, o)), (s += o); + r = n + i[a]; + } else r = t + 2; + return { offsets: i, startOffset: t, endOffset: r }; + })(e, t + c.charStrings)), + (n.nGlyphs = v.offsets.length)) + : ((v = Ee(e, t + c.charStrings)), + (n.nGlyphs = v.objects.length)); + var b = (function (e, t, n, r) { + var i, + a, + o = new ie.Parser(e, t); + n -= 1; + var s = [".notdef"], + l = o.parseCard8(); + if (0 === l) + for (var u = 0; u < n; u += 1) + (i = o.parseSID()), s.push(we(r, i)); + else if (1 === l) + for (; s.length <= n; ) { + (i = o.parseSID()), (a = o.parseCard8()); + for (var c = 0; c <= a; c += 1) + s.push(we(r, i)), (i += 1); + } + else { + if (2 !== l) throw new Error("Unknown charset format " + l); + for (; s.length <= n; ) { + (i = o.parseSID()), (a = o.parseCard16()); + for (var f = 0; f <= a; f += 1) + s.push(we(r, i)), (i += 1); + } + } + return s; + })(e, t + c.charset, n.nGlyphs, s.objects); + if ( + (0 === c.encoding + ? (n.cffEncoding = new he(le, b)) + : 1 === c.encoding + ? (n.cffEncoding = new he(ue, b)) + : (n.cffEncoding = (function (e, t, n) { + var r, + i = {}, + a = new ie.Parser(e, t), + o = a.parseCard8(); + if (0 === o) + for (var s = a.parseCard8(), l = 0; l < s; l += 1) + i[(r = a.parseCard8())] = l; + else { + if (1 !== o) + throw new Error("Unknown encoding format " + o); + var u = a.parseCard8(); + r = 1; + for (var c = 0; c < u; c += 1) + for ( + var f = a.parseCard8(), d = a.parseCard8(), h = f; + h <= f + d; + h += 1 + ) + (i[h] = r), (r += 1); + } + return new he(i, n); + })(e, t + c.encoding, b)), + (n.encoding = n.encoding || n.cffEncoding), + (n.glyphs = new be.GlyphSet(n)), + r.lowMemory) + ) + n._push = function (r) { + var i = (function (e, t, n, r, i) { + var a = ie.getCard16(n, r), + o = 0; + 0 !== a && (o = r + (a + 1) * ie.getByte(n, r + 2) + 2); + var s = ie.getBytes(n, o + t[e], o + t[e + 1]); + return i && (s = i(s)), s; + })(r, v.offsets, e, t + c.charStrings); + n.glyphs.push(r, be.cffGlyphLoader(n, r, Pe, i)); + }; + else + for (var x = 0; x < n.nGlyphs; x += 1) { + var S = v.objects[x]; + n.glyphs.push(x, be.cffGlyphLoader(n, x, Pe, S)); + } + }, + make: function (e, t) { + for ( + var n, + r = new q.Table("CFF ", [ + { name: "header", type: "RECORD" }, + { name: "nameIndex", type: "RECORD" }, + { name: "topDictIndex", type: "RECORD" }, + { name: "stringIndex", type: "RECORD" }, + { name: "globalSubrIndex", type: "RECORD" }, + { name: "charsets", type: "RECORD" }, + { name: "charStringsIndex", type: "RECORD" }, + { name: "privateDict", type: "RECORD" }, + ]), + i = 1 / t.unitsPerEm, + a = { + version: t.version, + fullName: t.fullName, + familyName: t.familyName, + weight: t.weightName, + fontBBox: t.fontBBox || [0, 0, 0, 0], + fontMatrix: [i, 0, 0, i, 0, 0], + charset: 999, + encoding: 0, + charStrings: 999, + private: [0, 999], + }, + o = [], + s = 1; + s < e.length; + s += 1 + ) + (n = e.get(s)), o.push(n.name); + var l = []; + (r.header = new q.Record("Header", [ + { name: "major", type: "Card8", value: 1 }, + { name: "minor", type: "Card8", value: 0 }, + { name: "hdrSize", type: "Card8", value: 4 }, + { name: "major", type: "Card8", value: 1 }, + ])), + (r.nameIndex = (function (e) { + var t = new q.Record("Name INDEX", [ + { name: "names", type: "INDEX", value: [] }, + ]); + t.names = []; + for (var n = 0; n < e.length; n += 1) + t.names.push({ + name: "name_" + n, + type: "NAME", + value: e[n], + }); + return t; + })([t.postScriptName])); + var u = Ue(a, l); + (r.topDictIndex = Fe(u)), + (r.globalSubrIndex = new q.Record("Global Subr INDEX", [ + { name: "subrs", type: "INDEX", value: [] }, + ])), + (r.charsets = (function (e, t) { + for ( + var n = new q.Record("Charsets", [ + { name: "format", type: "Card8", value: 0 }, + ]), + r = 0; + r < e.length; + r += 1 + ) { + var i = Le(e[r], t); + n.fields.push({ + name: "glyph_" + r, + type: "SID", + value: i, + }); + } + return n; + })(o, l)), + (r.charStringsIndex = (function (e) { + for ( + var t = new q.Record("CharStrings INDEX", [ + { name: "charStrings", type: "INDEX", value: [] }, + ]), + n = 0; + n < e.length; + n += 1 + ) { + var r = e.get(n), + i = Oe(r); + t.charStrings.push({ + name: r.name, + type: "CHARSTRING", + value: i, + }); + } + return t; + })(e)), + (r.privateDict = (function (e, t) { + var n = new q.Record("Private DICT", [ + { name: "dict", type: "DICT", value: {} }, + ]); + return (n.dict = De(Ie, e, t)), n; + })({}, l)), + (r.stringIndex = (function (e) { + var t = new q.Record("String INDEX", [ + { name: "strings", type: "INDEX", value: [] }, + ]); + t.strings = []; + for (var n = 0; n < e.length; n += 1) + t.strings.push({ + name: "string_" + n, + type: "STRING", + value: e[n], + }); + return t; + })(l)); + var c = + r.header.sizeOf() + + r.nameIndex.sizeOf() + + r.topDictIndex.sizeOf() + + r.stringIndex.sizeOf() + + r.globalSubrIndex.sizeOf(); + return ( + (a.charset = c), + (a.encoding = 0), + (a.charStrings = a.charset + r.charsets.sizeOf()), + (a.private[1] = a.charStrings + r.charStringsIndex.sizeOf()), + (u = Ue(a, l)), + (r.topDictIndex = Fe(u)), + r + ); + }, + }; + var Ge = { + parse: function (e, t) { + var n = {}, + r = new ie.Parser(e, t); + return ( + (n.version = r.parseVersion()), + (n.fontRevision = Math.round(1e3 * r.parseFixed()) / 1e3), + (n.checkSumAdjustment = r.parseULong()), + (n.magicNumber = r.parseULong()), + M.argument( + 1594834165 === n.magicNumber, + "Font header has wrong magic number." + ), + (n.flags = r.parseUShort()), + (n.unitsPerEm = r.parseUShort()), + (n.created = r.parseLongDateTime()), + (n.modified = r.parseLongDateTime()), + (n.xMin = r.parseShort()), + (n.yMin = r.parseShort()), + (n.xMax = r.parseShort()), + (n.yMax = r.parseShort()), + (n.macStyle = r.parseUShort()), + (n.lowestRecPPEM = r.parseUShort()), + (n.fontDirectionHint = r.parseShort()), + (n.indexToLocFormat = r.parseShort()), + (n.glyphDataFormat = r.parseShort()), + n + ); + }, + make: function (e) { + var t = Math.round(new Date().getTime() / 1e3) + 2082844800, + n = t; + return ( + e.createdTimestamp && (n = e.createdTimestamp + 2082844800), + new q.Table( + "head", + [ + { name: "version", type: "FIXED", value: 65536 }, + { name: "fontRevision", type: "FIXED", value: 65536 }, + { name: "checkSumAdjustment", type: "ULONG", value: 0 }, + { name: "magicNumber", type: "ULONG", value: 1594834165 }, + { name: "flags", type: "USHORT", value: 0 }, + { name: "unitsPerEm", type: "USHORT", value: 1e3 }, + { name: "created", type: "LONGDATETIME", value: n }, + { name: "modified", type: "LONGDATETIME", value: t }, + { name: "xMin", type: "SHORT", value: 0 }, + { name: "yMin", type: "SHORT", value: 0 }, + { name: "xMax", type: "SHORT", value: 0 }, + { name: "yMax", type: "SHORT", value: 0 }, + { name: "macStyle", type: "USHORT", value: 0 }, + { name: "lowestRecPPEM", type: "USHORT", value: 0 }, + { name: "fontDirectionHint", type: "SHORT", value: 2 }, + { name: "indexToLocFormat", type: "SHORT", value: 0 }, + { name: "glyphDataFormat", type: "SHORT", value: 0 }, + ], + e + ) + ); + }, + }; + var Ze = { + parse: function (e, t) { + var n = {}, + r = new ie.Parser(e, t); + return ( + (n.version = r.parseVersion()), + (n.ascender = r.parseShort()), + (n.descender = r.parseShort()), + (n.lineGap = r.parseShort()), + (n.advanceWidthMax = r.parseUShort()), + (n.minLeftSideBearing = r.parseShort()), + (n.minRightSideBearing = r.parseShort()), + (n.xMaxExtent = r.parseShort()), + (n.caretSlopeRise = r.parseShort()), + (n.caretSlopeRun = r.parseShort()), + (n.caretOffset = r.parseShort()), + (r.relativeOffset += 8), + (n.metricDataFormat = r.parseShort()), + (n.numberOfHMetrics = r.parseUShort()), + n + ); + }, + make: function (e) { + return new q.Table( + "hhea", + [ + { name: "version", type: "FIXED", value: 65536 }, + { name: "ascender", type: "FWORD", value: 0 }, + { name: "descender", type: "FWORD", value: 0 }, + { name: "lineGap", type: "FWORD", value: 0 }, + { name: "advanceWidthMax", type: "UFWORD", value: 0 }, + { name: "minLeftSideBearing", type: "FWORD", value: 0 }, + { name: "minRightSideBearing", type: "FWORD", value: 0 }, + { name: "xMaxExtent", type: "FWORD", value: 0 }, + { name: "caretSlopeRise", type: "SHORT", value: 1 }, + { name: "caretSlopeRun", type: "SHORT", value: 0 }, + { name: "caretOffset", type: "SHORT", value: 0 }, + { name: "reserved1", type: "SHORT", value: 0 }, + { name: "reserved2", type: "SHORT", value: 0 }, + { name: "reserved3", type: "SHORT", value: 0 }, + { name: "reserved4", type: "SHORT", value: 0 }, + { name: "metricDataFormat", type: "SHORT", value: 0 }, + { name: "numberOfHMetrics", type: "USHORT", value: 0 }, + ], + e + ); + }, + }; + var ze = { + parse: function (e, t, n, r, i, a, o) { + o.lowMemory + ? (function (e, t, n, r, i) { + var a, o; + e._hmtxTableData = {}; + for (var s = new ie.Parser(t, n), l = 0; l < i; l += 1) + l < r && ((a = s.parseUShort()), (o = s.parseShort())), + (e._hmtxTableData[l] = { + advanceWidth: a, + leftSideBearing: o, + }); + })(e, t, n, r, i) + : (function (e, t, n, r, i) { + for ( + var a, o, s = new ie.Parser(e, t), l = 0; + l < r; + l += 1 + ) { + l < n && ((a = s.parseUShort()), (o = s.parseShort())); + var u = i.get(l); + (u.advanceWidth = a), (u.leftSideBearing = o); + } + })(t, n, r, i, a); + }, + make: function (e) { + for ( + var t = new q.Table("hmtx", []), n = 0; + n < e.length; + n += 1 + ) { + var r = e.get(n), + i = r.advanceWidth || 0, + a = r.leftSideBearing || 0; + t.fields.push({ + name: "advanceWidth_" + n, + type: "USHORT", + value: i, + }), + t.fields.push({ + name: "leftSideBearing_" + n, + type: "SHORT", + value: a, + }); + } + return t; + }, + }; + var Qe = { + make: function (e) { + for ( + var t = new q.Table("ltag", [ + { name: "version", type: "ULONG", value: 1 }, + { name: "flags", type: "ULONG", value: 0 }, + { name: "numTags", type: "ULONG", value: e.length }, + ]), + n = "", + r = 12 + 4 * e.length, + i = 0; + i < e.length; + ++i + ) { + var a = n.indexOf(e[i]); + a < 0 && ((a = n.length), (n += e[i])), + t.fields.push({ + name: "offset " + i, + type: "USHORT", + value: r + a, + }), + t.fields.push({ + name: "length " + i, + type: "USHORT", + value: e[i].length, + }); + } + return ( + t.fields.push({ + name: "stringPool", + type: "CHARARRAY", + value: n, + }), + t + ); + }, + parse: function (e, t) { + var n = new ie.Parser(e, t), + r = n.parseULong(); + M.argument(1 === r, "Unsupported ltag table version."), + n.skip("uLong", 1); + for (var i = n.parseULong(), a = [], o = 0; o < i; o++) { + for ( + var s = "", + l = t + n.parseUShort(), + u = n.parseUShort(), + c = l; + c < l + u; + ++c + ) + s += String.fromCharCode(e.getInt8(c)); + a.push(s); + } + return a; + }, + }; + var He = { + parse: function (e, t) { + var n = {}, + r = new ie.Parser(e, t); + return ( + (n.version = r.parseVersion()), + (n.numGlyphs = r.parseUShort()), + 1 === n.version && + ((n.maxPoints = r.parseUShort()), + (n.maxContours = r.parseUShort()), + (n.maxCompositePoints = r.parseUShort()), + (n.maxCompositeContours = r.parseUShort()), + (n.maxZones = r.parseUShort()), + (n.maxTwilightPoints = r.parseUShort()), + (n.maxStorage = r.parseUShort()), + (n.maxFunctionDefs = r.parseUShort()), + (n.maxInstructionDefs = r.parseUShort()), + (n.maxStackElements = r.parseUShort()), + (n.maxSizeOfInstructions = r.parseUShort()), + (n.maxComponentElements = r.parseUShort()), + (n.maxComponentDepth = r.parseUShort())), + n + ); + }, + make: function (e) { + return new q.Table("maxp", [ + { name: "version", type: "FIXED", value: 20480 }, + { name: "numGlyphs", type: "USHORT", value: e }, + ]); + }, + }, + Ve = [ + "copyright", + "fontFamily", + "fontSubfamily", + "uniqueID", + "fullName", + "version", + "postScriptName", + "trademark", + "manufacturer", + "designer", + "description", + "manufacturerURL", + "designerURL", + "license", + "licenseURL", + "reserved", + "preferredFamily", + "preferredSubfamily", + "compatibleFullName", + "sampleText", + "postScriptFindFontName", + "wwsFamily", + "wwsSubfamily", + ], + je = { + 0: "en", + 1: "fr", + 2: "de", + 3: "it", + 4: "nl", + 5: "sv", + 6: "es", + 7: "da", + 8: "pt", + 9: "no", + 10: "he", + 11: "ja", + 12: "ar", + 13: "fi", + 14: "el", + 15: "is", + 16: "mt", + 17: "tr", + 18: "hr", + 19: "zh-Hant", + 20: "ur", + 21: "hi", + 22: "th", + 23: "ko", + 24: "lt", + 25: "pl", + 26: "hu", + 27: "es", + 28: "lv", + 29: "se", + 30: "fo", + 31: "fa", + 32: "ru", + 33: "zh", + 34: "nl-BE", + 35: "ga", + 36: "sq", + 37: "ro", + 38: "cz", + 39: "sk", + 40: "si", + 41: "yi", + 42: "sr", + 43: "mk", + 44: "bg", + 45: "uk", + 46: "be", + 47: "uz", + 48: "kk", + 49: "az-Cyrl", + 50: "az-Arab", + 51: "hy", + 52: "ka", + 53: "mo", + 54: "ky", + 55: "tg", + 56: "tk", + 57: "mn-CN", + 58: "mn", + 59: "ps", + 60: "ks", + 61: "ku", + 62: "sd", + 63: "bo", + 64: "ne", + 65: "sa", + 66: "mr", + 67: "bn", + 68: "as", + 69: "gu", + 70: "pa", + 71: "or", + 72: "ml", + 73: "kn", + 74: "ta", + 75: "te", + 76: "si", + 77: "my", + 78: "km", + 79: "lo", + 80: "vi", + 81: "id", + 82: "tl", + 83: "ms", + 84: "ms-Arab", + 85: "am", + 86: "ti", + 87: "om", + 88: "so", + 89: "sw", + 90: "rw", + 91: "rn", + 92: "ny", + 93: "mg", + 94: "eo", + 128: "cy", + 129: "eu", + 130: "ca", + 131: "la", + 132: "qu", + 133: "gn", + 134: "ay", + 135: "tt", + 136: "ug", + 137: "dz", + 138: "jv", + 139: "su", + 140: "gl", + 141: "af", + 142: "br", + 143: "iu", + 144: "gd", + 145: "gv", + 146: "ga", + 147: "to", + 148: "el-polyton", + 149: "kl", + 150: "az", + 151: "nn", + }, + We = { + 0: 0, + 1: 0, + 2: 0, + 3: 0, + 4: 0, + 5: 0, + 6: 0, + 7: 0, + 8: 0, + 9: 0, + 10: 5, + 11: 1, + 12: 4, + 13: 0, + 14: 6, + 15: 0, + 16: 0, + 17: 0, + 18: 0, + 19: 2, + 20: 4, + 21: 9, + 22: 21, + 23: 3, + 24: 29, + 25: 29, + 26: 29, + 27: 29, + 28: 29, + 29: 0, + 30: 0, + 31: 4, + 32: 7, + 33: 25, + 34: 0, + 35: 0, + 36: 0, + 37: 0, + 38: 29, + 39: 29, + 40: 0, + 41: 5, + 42: 7, + 43: 7, + 44: 7, + 45: 7, + 46: 7, + 47: 7, + 48: 7, + 49: 7, + 50: 4, + 51: 24, + 52: 23, + 53: 7, + 54: 7, + 55: 7, + 56: 7, + 57: 27, + 58: 7, + 59: 4, + 60: 4, + 61: 4, + 62: 4, + 63: 26, + 64: 9, + 65: 9, + 66: 9, + 67: 13, + 68: 13, + 69: 11, + 70: 10, + 71: 12, + 72: 17, + 73: 16, + 74: 14, + 75: 15, + 76: 18, + 77: 19, + 78: 20, + 79: 22, + 80: 30, + 81: 0, + 82: 0, + 83: 0, + 84: 4, + 85: 28, + 86: 28, + 87: 28, + 88: 0, + 89: 0, + 90: 0, + 91: 0, + 92: 0, + 93: 0, + 94: 0, + 128: 0, + 129: 0, + 130: 0, + 131: 0, + 132: 0, + 133: 0, + 134: 0, + 135: 7, + 136: 4, + 137: 26, + 138: 0, + 139: 0, + 140: 0, + 141: 0, + 142: 0, + 143: 28, + 144: 0, + 145: 0, + 146: 0, + 147: 0, + 148: 6, + 149: 0, + 150: 0, + 151: 0, + }, + Xe = { + 1078: "af", + 1052: "sq", + 1156: "gsw", + 1118: "am", + 5121: "ar-DZ", + 15361: "ar-BH", + 3073: "ar", + 2049: "ar-IQ", + 11265: "ar-JO", + 13313: "ar-KW", + 12289: "ar-LB", + 4097: "ar-LY", + 6145: "ary", + 8193: "ar-OM", + 16385: "ar-QA", + 1025: "ar-SA", + 10241: "ar-SY", + 7169: "aeb", + 14337: "ar-AE", + 9217: "ar-YE", + 1067: "hy", + 1101: "as", + 2092: "az-Cyrl", + 1068: "az", + 1133: "ba", + 1069: "eu", + 1059: "be", + 2117: "bn", + 1093: "bn-IN", + 8218: "bs-Cyrl", + 5146: "bs", + 1150: "br", + 1026: "bg", + 1027: "ca", + 3076: "zh-HK", + 5124: "zh-MO", + 2052: "zh", + 4100: "zh-SG", + 1028: "zh-TW", + 1155: "co", + 1050: "hr", + 4122: "hr-BA", + 1029: "cs", + 1030: "da", + 1164: "prs", + 1125: "dv", + 2067: "nl-BE", + 1043: "nl", + 3081: "en-AU", + 10249: "en-BZ", + 4105: "en-CA", + 9225: "en-029", + 16393: "en-IN", + 6153: "en-IE", + 8201: "en-JM", + 17417: "en-MY", + 5129: "en-NZ", + 13321: "en-PH", + 18441: "en-SG", + 7177: "en-ZA", + 11273: "en-TT", + 2057: "en-GB", + 1033: "en", + 12297: "en-ZW", + 1061: "et", + 1080: "fo", + 1124: "fil", + 1035: "fi", + 2060: "fr-BE", + 3084: "fr-CA", + 1036: "fr", + 5132: "fr-LU", + 6156: "fr-MC", + 4108: "fr-CH", + 1122: "fy", + 1110: "gl", + 1079: "ka", + 3079: "de-AT", + 1031: "de", + 5127: "de-LI", + 4103: "de-LU", + 2055: "de-CH", + 1032: "el", + 1135: "kl", + 1095: "gu", + 1128: "ha", + 1037: "he", + 1081: "hi", + 1038: "hu", + 1039: "is", + 1136: "ig", + 1057: "id", + 1117: "iu", + 2141: "iu-Latn", + 2108: "ga", + 1076: "xh", + 1077: "zu", + 1040: "it", + 2064: "it-CH", + 1041: "ja", + 1099: "kn", + 1087: "kk", + 1107: "km", + 1158: "quc", + 1159: "rw", + 1089: "sw", + 1111: "kok", + 1042: "ko", + 1088: "ky", + 1108: "lo", + 1062: "lv", + 1063: "lt", + 2094: "dsb", + 1134: "lb", + 1071: "mk", + 2110: "ms-BN", + 1086: "ms", + 1100: "ml", + 1082: "mt", + 1153: "mi", + 1146: "arn", + 1102: "mr", + 1148: "moh", + 1104: "mn", + 2128: "mn-CN", + 1121: "ne", + 1044: "nb", + 2068: "nn", + 1154: "oc", + 1096: "or", + 1123: "ps", + 1045: "pl", + 1046: "pt", + 2070: "pt-PT", + 1094: "pa", + 1131: "qu-BO", + 2155: "qu-EC", + 3179: "qu", + 1048: "ro", + 1047: "rm", + 1049: "ru", + 9275: "smn", + 4155: "smj-NO", + 5179: "smj", + 3131: "se-FI", + 1083: "se", + 2107: "se-SE", + 8251: "sms", + 6203: "sma-NO", + 7227: "sms", + 1103: "sa", + 7194: "sr-Cyrl-BA", + 3098: "sr", + 6170: "sr-Latn-BA", + 2074: "sr-Latn", + 1132: "nso", + 1074: "tn", + 1115: "si", + 1051: "sk", + 1060: "sl", + 11274: "es-AR", + 16394: "es-BO", + 13322: "es-CL", + 9226: "es-CO", + 5130: "es-CR", + 7178: "es-DO", + 12298: "es-EC", + 17418: "es-SV", + 4106: "es-GT", + 18442: "es-HN", + 2058: "es-MX", + 19466: "es-NI", + 6154: "es-PA", + 15370: "es-PY", + 10250: "es-PE", + 20490: "es-PR", + 3082: "es", + 1034: "es", + 21514: "es-US", + 14346: "es-UY", + 8202: "es-VE", + 2077: "sv-FI", + 1053: "sv", + 1114: "syr", + 1064: "tg", + 2143: "tzm", + 1097: "ta", + 1092: "tt", + 1098: "te", + 1054: "th", + 1105: "bo", + 1055: "tr", + 1090: "tk", + 1152: "ug", + 1058: "uk", + 1070: "hsb", + 1056: "ur", + 2115: "uz-Cyrl", + 1091: "uz", + 1066: "vi", + 1106: "cy", + 1160: "wo", + 1157: "sah", + 1144: "ii", + 1130: "yo", + }; + function Ye(e, t, n) { + switch (e) { + case 0: + if (65535 === t) return "und"; + if (n) return n[t]; + break; + case 1: + return je[t]; + case 3: + return Xe[t]; + } + } + var qe = "utf-16", + Je = { + 0: "macintosh", + 1: "x-mac-japanese", + 2: "x-mac-chinesetrad", + 3: "x-mac-korean", + 6: "x-mac-greek", + 7: "x-mac-cyrillic", + 9: "x-mac-devanagai", + 10: "x-mac-gurmukhi", + 11: "x-mac-gujarati", + 12: "x-mac-oriya", + 13: "x-mac-bengali", + 14: "x-mac-tamil", + 15: "x-mac-telugu", + 16: "x-mac-kannada", + 17: "x-mac-malayalam", + 18: "x-mac-sinhalese", + 19: "x-mac-burmese", + 20: "x-mac-khmer", + 21: "x-mac-thai", + 22: "x-mac-lao", + 23: "x-mac-georgian", + 24: "x-mac-armenian", + 25: "x-mac-chinesesimp", + 26: "x-mac-tibetan", + 27: "x-mac-mongolian", + 28: "x-mac-ethiopic", + 29: "x-mac-ce", + 30: "x-mac-vietnamese", + 31: "x-mac-extarabic", + }, + Ke = { + 15: "x-mac-icelandic", + 17: "x-mac-turkish", + 18: "x-mac-croatian", + 24: "x-mac-ce", + 25: "x-mac-ce", + 26: "x-mac-ce", + 27: "x-mac-ce", + 28: "x-mac-ce", + 30: "x-mac-icelandic", + 37: "x-mac-romanian", + 38: "x-mac-ce", + 39: "x-mac-ce", + 40: "x-mac-ce", + 143: "x-mac-inuit", + 146: "x-mac-gaelic", + }; + function $e(e, t, n) { + switch (e) { + case 0: + return qe; + case 1: + return Ke[n] || Je[t]; + case 3: + if (1 === t || 10 === t) return qe; + } + } + function et(e) { + var t = {}; + for (var n in e) t[e[n]] = parseInt(n); + return t; + } + function tt(e, t, n, r, i, a) { + return new q.Record("NameRecord", [ + { name: "platformID", type: "USHORT", value: e }, + { name: "encodingID", type: "USHORT", value: t }, + { name: "languageID", type: "USHORT", value: n }, + { name: "nameID", type: "USHORT", value: r }, + { name: "length", type: "USHORT", value: i }, + { name: "offset", type: "USHORT", value: a }, + ]); + } + function nt(e, t) { + var n = (function (e, t) { + var n = e.length, + r = t.length - n + 1; + e: for (var i = 0; i < r; i++) + for (; i < r; i++) { + for (var a = 0; a < n; a++) + if (t[i + a] !== e[a]) continue e; + return i; + } + return -1; + })(e, t); + if (n < 0) { + n = t.length; + for (var r = 0, i = e.length; r < i; ++r) t.push(e[r]); + } + return n; + } + var rt = { + parse: function (e, t, n) { + for ( + var r = {}, + i = new ie.Parser(e, t), + a = i.parseUShort(), + o = i.parseUShort(), + s = i.offset + i.parseUShort(), + l = 0; + l < o; + l++ + ) { + var u = i.parseUShort(), + c = i.parseUShort(), + f = i.parseUShort(), + d = i.parseUShort(), + h = Ve[d] || d, + p = i.parseUShort(), + v = i.parseUShort(), + m = Ye(u, f, n), + g = $e(u, c, f); + if (void 0 !== g && void 0 !== m) { + var A = void 0; + if ( + (A = + g === qe + ? k.UTF16(e, s + v, p) + : k.MACSTRING(e, s + v, p, g)) + ) { + var y = r[h]; + void 0 === y && (y = r[h] = {}), (y[m] = A); + } + } + } + return 1 === a && i.parseUShort(), r; + }, + make: function (e, t) { + var n, + r = [], + i = {}, + a = et(Ve); + for (var o in e) { + var s = a[o]; + if ((void 0 === s && (s = o), (n = parseInt(s)), isNaN(n))) + throw new Error( + 'Name table entry "' + + o + + '" does not exist, see nameTableNames for complete list.' + ); + (i[n] = e[o]), r.push(n); + } + for ( + var l = et(je), u = et(Xe), c = [], f = [], d = 0; + d < r.length; + d++ + ) { + var h = i[(n = r[d])]; + for (var p in h) { + var v = h[p], + m = 1, + g = l[p], + A = We[g], + y = $e(m, A, g), + b = R.MACSTRING(v, y); + void 0 === b && + ((m = 0), + (g = t.indexOf(p)) < 0 && ((g = t.length), t.push(p)), + (A = 4), + (b = R.UTF16(v))); + var x = nt(b, f); + c.push(tt(m, A, g, n, b.length, x)); + var S = u[p]; + if (void 0 !== S) { + var E = R.UTF16(v), + _ = nt(E, f); + c.push(tt(3, 1, S, n, E.length, _)); + } + } + } + c.sort(function (e, t) { + return ( + e.platformID - t.platformID || + e.encodingID - t.encodingID || + e.languageID - t.languageID || + e.nameID - t.nameID + ); + }); + for ( + var C = new q.Table("name", [ + { name: "format", type: "USHORT", value: 0 }, + { name: "count", type: "USHORT", value: c.length }, + { + name: "stringOffset", + type: "USHORT", + value: 6 + 12 * c.length, + }, + ]), + w = 0; + w < c.length; + w++ + ) + C.fields.push({ + name: "record_" + w, + type: "RECORD", + value: c[w], + }); + return ( + C.fields.push({ + name: "strings", + type: "LITERAL", + value: f, + }), + C + ); + }, + }, + it = [ + { begin: 0, end: 127 }, + { begin: 128, end: 255 }, + { begin: 256, end: 383 }, + { begin: 384, end: 591 }, + { begin: 592, end: 687 }, + { begin: 688, end: 767 }, + { begin: 768, end: 879 }, + { begin: 880, end: 1023 }, + { begin: 11392, end: 11519 }, + { begin: 1024, end: 1279 }, + { begin: 1328, end: 1423 }, + { begin: 1424, end: 1535 }, + { begin: 42240, end: 42559 }, + { begin: 1536, end: 1791 }, + { begin: 1984, end: 2047 }, + { begin: 2304, end: 2431 }, + { begin: 2432, end: 2559 }, + { begin: 2560, end: 2687 }, + { begin: 2688, end: 2815 }, + { begin: 2816, end: 2943 }, + { begin: 2944, end: 3071 }, + { begin: 3072, end: 3199 }, + { begin: 3200, end: 3327 }, + { begin: 3328, end: 3455 }, + { begin: 3584, end: 3711 }, + { begin: 3712, end: 3839 }, + { begin: 4256, end: 4351 }, + { begin: 6912, end: 7039 }, + { begin: 4352, end: 4607 }, + { begin: 7680, end: 7935 }, + { begin: 7936, end: 8191 }, + { begin: 8192, end: 8303 }, + { begin: 8304, end: 8351 }, + { begin: 8352, end: 8399 }, + { begin: 8400, end: 8447 }, + { begin: 8448, end: 8527 }, + { begin: 8528, end: 8591 }, + { begin: 8592, end: 8703 }, + { begin: 8704, end: 8959 }, + { begin: 8960, end: 9215 }, + { begin: 9216, end: 9279 }, + { begin: 9280, end: 9311 }, + { begin: 9312, end: 9471 }, + { begin: 9472, end: 9599 }, + { begin: 9600, end: 9631 }, + { begin: 9632, end: 9727 }, + { begin: 9728, end: 9983 }, + { begin: 9984, end: 10175 }, + { begin: 12288, end: 12351 }, + { begin: 12352, end: 12447 }, + { begin: 12448, end: 12543 }, + { begin: 12544, end: 12591 }, + { begin: 12592, end: 12687 }, + { begin: 43072, end: 43135 }, + { begin: 12800, end: 13055 }, + { begin: 13056, end: 13311 }, + { begin: 44032, end: 55215 }, + { begin: 55296, end: 57343 }, + { begin: 67840, end: 67871 }, + { begin: 19968, end: 40959 }, + { begin: 57344, end: 63743 }, + { begin: 12736, end: 12783 }, + { begin: 64256, end: 64335 }, + { begin: 64336, end: 65023 }, + { begin: 65056, end: 65071 }, + { begin: 65040, end: 65055 }, + { begin: 65104, end: 65135 }, + { begin: 65136, end: 65279 }, + { begin: 65280, end: 65519 }, + { begin: 65520, end: 65535 }, + { begin: 3840, end: 4095 }, + { begin: 1792, end: 1871 }, + { begin: 1920, end: 1983 }, + { begin: 3456, end: 3583 }, + { begin: 4096, end: 4255 }, + { begin: 4608, end: 4991 }, + { begin: 5024, end: 5119 }, + { begin: 5120, end: 5759 }, + { begin: 5760, end: 5791 }, + { begin: 5792, end: 5887 }, + { begin: 6016, end: 6143 }, + { begin: 6144, end: 6319 }, + { begin: 10240, end: 10495 }, + { begin: 40960, end: 42127 }, + { begin: 5888, end: 5919 }, + { begin: 66304, end: 66351 }, + { begin: 66352, end: 66383 }, + { begin: 66560, end: 66639 }, + { begin: 118784, end: 119039 }, + { begin: 119808, end: 120831 }, + { begin: 1044480, end: 1048573 }, + { begin: 65024, end: 65039 }, + { begin: 917504, end: 917631 }, + { begin: 6400, end: 6479 }, + { begin: 6480, end: 6527 }, + { begin: 6528, end: 6623 }, + { begin: 6656, end: 6687 }, + { begin: 11264, end: 11359 }, + { begin: 11568, end: 11647 }, + { begin: 19904, end: 19967 }, + { begin: 43008, end: 43055 }, + { begin: 65536, end: 65663 }, + { begin: 65856, end: 65935 }, + { begin: 66432, end: 66463 }, + { begin: 66464, end: 66527 }, + { begin: 66640, end: 66687 }, + { begin: 66688, end: 66735 }, + { begin: 67584, end: 67647 }, + { begin: 68096, end: 68191 }, + { begin: 119552, end: 119647 }, + { begin: 73728, end: 74751 }, + { begin: 119648, end: 119679 }, + { begin: 7040, end: 7103 }, + { begin: 7168, end: 7247 }, + { begin: 7248, end: 7295 }, + { begin: 43136, end: 43231 }, + { begin: 43264, end: 43311 }, + { begin: 43312, end: 43359 }, + { begin: 43520, end: 43615 }, + { begin: 65936, end: 65999 }, + { begin: 66e3, end: 66047 }, + { begin: 66208, end: 66271 }, + { begin: 127024, end: 127135 }, + ]; + var at = { + parse: function (e, t) { + var n = {}, + r = new ie.Parser(e, t); + (n.version = r.parseUShort()), + (n.xAvgCharWidth = r.parseShort()), + (n.usWeightClass = r.parseUShort()), + (n.usWidthClass = r.parseUShort()), + (n.fsType = r.parseUShort()), + (n.ySubscriptXSize = r.parseShort()), + (n.ySubscriptYSize = r.parseShort()), + (n.ySubscriptXOffset = r.parseShort()), + (n.ySubscriptYOffset = r.parseShort()), + (n.ySuperscriptXSize = r.parseShort()), + (n.ySuperscriptYSize = r.parseShort()), + (n.ySuperscriptXOffset = r.parseShort()), + (n.ySuperscriptYOffset = r.parseShort()), + (n.yStrikeoutSize = r.parseShort()), + (n.yStrikeoutPosition = r.parseShort()), + (n.sFamilyClass = r.parseShort()), + (n.panose = []); + for (var i = 0; i < 10; i++) n.panose[i] = r.parseByte(); + return ( + (n.ulUnicodeRange1 = r.parseULong()), + (n.ulUnicodeRange2 = r.parseULong()), + (n.ulUnicodeRange3 = r.parseULong()), + (n.ulUnicodeRange4 = r.parseULong()), + (n.achVendID = String.fromCharCode( + r.parseByte(), + r.parseByte(), + r.parseByte(), + r.parseByte() + )), + (n.fsSelection = r.parseUShort()), + (n.usFirstCharIndex = r.parseUShort()), + (n.usLastCharIndex = r.parseUShort()), + (n.sTypoAscender = r.parseShort()), + (n.sTypoDescender = r.parseShort()), + (n.sTypoLineGap = r.parseShort()), + (n.usWinAscent = r.parseUShort()), + (n.usWinDescent = r.parseUShort()), + n.version >= 1 && + ((n.ulCodePageRange1 = r.parseULong()), + (n.ulCodePageRange2 = r.parseULong())), + n.version >= 2 && + ((n.sxHeight = r.parseShort()), + (n.sCapHeight = r.parseShort()), + (n.usDefaultChar = r.parseUShort()), + (n.usBreakChar = r.parseUShort()), + (n.usMaxContent = r.parseUShort())), + n + ); + }, + make: function (e) { + return new q.Table( + "OS/2", + [ + { name: "version", type: "USHORT", value: 3 }, + { name: "xAvgCharWidth", type: "SHORT", value: 0 }, + { name: "usWeightClass", type: "USHORT", value: 0 }, + { name: "usWidthClass", type: "USHORT", value: 0 }, + { name: "fsType", type: "USHORT", value: 0 }, + { name: "ySubscriptXSize", type: "SHORT", value: 650 }, + { name: "ySubscriptYSize", type: "SHORT", value: 699 }, + { name: "ySubscriptXOffset", type: "SHORT", value: 0 }, + { name: "ySubscriptYOffset", type: "SHORT", value: 140 }, + { name: "ySuperscriptXSize", type: "SHORT", value: 650 }, + { name: "ySuperscriptYSize", type: "SHORT", value: 699 }, + { name: "ySuperscriptXOffset", type: "SHORT", value: 0 }, + { name: "ySuperscriptYOffset", type: "SHORT", value: 479 }, + { name: "yStrikeoutSize", type: "SHORT", value: 49 }, + { name: "yStrikeoutPosition", type: "SHORT", value: 258 }, + { name: "sFamilyClass", type: "SHORT", value: 0 }, + { name: "bFamilyType", type: "BYTE", value: 0 }, + { name: "bSerifStyle", type: "BYTE", value: 0 }, + { name: "bWeight", type: "BYTE", value: 0 }, + { name: "bProportion", type: "BYTE", value: 0 }, + { name: "bContrast", type: "BYTE", value: 0 }, + { name: "bStrokeVariation", type: "BYTE", value: 0 }, + { name: "bArmStyle", type: "BYTE", value: 0 }, + { name: "bLetterform", type: "BYTE", value: 0 }, + { name: "bMidline", type: "BYTE", value: 0 }, + { name: "bXHeight", type: "BYTE", value: 0 }, + { name: "ulUnicodeRange1", type: "ULONG", value: 0 }, + { name: "ulUnicodeRange2", type: "ULONG", value: 0 }, + { name: "ulUnicodeRange3", type: "ULONG", value: 0 }, + { name: "ulUnicodeRange4", type: "ULONG", value: 0 }, + { name: "achVendID", type: "CHARARRAY", value: "XXXX" }, + { name: "fsSelection", type: "USHORT", value: 0 }, + { name: "usFirstCharIndex", type: "USHORT", value: 0 }, + { name: "usLastCharIndex", type: "USHORT", value: 0 }, + { name: "sTypoAscender", type: "SHORT", value: 0 }, + { name: "sTypoDescender", type: "SHORT", value: 0 }, + { name: "sTypoLineGap", type: "SHORT", value: 0 }, + { name: "usWinAscent", type: "USHORT", value: 0 }, + { name: "usWinDescent", type: "USHORT", value: 0 }, + { name: "ulCodePageRange1", type: "ULONG", value: 0 }, + { name: "ulCodePageRange2", type: "ULONG", value: 0 }, + { name: "sxHeight", type: "SHORT", value: 0 }, + { name: "sCapHeight", type: "SHORT", value: 0 }, + { name: "usDefaultChar", type: "USHORT", value: 0 }, + { name: "usBreakChar", type: "USHORT", value: 0 }, + { name: "usMaxContext", type: "USHORT", value: 0 }, + ], + e + ); + }, + unicodeRanges: it, + getUnicodeRange: function (e) { + for (var t = 0; t < it.length; t += 1) { + var n = it[t]; + if (e >= n.begin && e < n.end) return t; + } + return -1; + }, + }; + var ot = { + parse: function (e, t) { + var n = {}, + r = new ie.Parser(e, t); + switch ( + ((n.version = r.parseVersion()), + (n.italicAngle = r.parseFixed()), + (n.underlinePosition = r.parseShort()), + (n.underlineThickness = r.parseShort()), + (n.isFixedPitch = r.parseULong()), + (n.minMemType42 = r.parseULong()), + (n.maxMemType42 = r.parseULong()), + (n.minMemType1 = r.parseULong()), + (n.maxMemType1 = r.parseULong()), + n.version) + ) { + case 1: + n.names = ce.slice(); + break; + case 2: + (n.numberOfGlyphs = r.parseUShort()), + (n.glyphNameIndex = new Array(n.numberOfGlyphs)); + for (var i = 0; i < n.numberOfGlyphs; i++) + n.glyphNameIndex[i] = r.parseUShort(); + n.names = []; + for (var a = 0; a < n.numberOfGlyphs; a++) + if (n.glyphNameIndex[a] >= ce.length) { + var o = r.parseChar(); + n.names.push(r.parseString(o)); + } + break; + case 2.5: + (n.numberOfGlyphs = r.parseUShort()), + (n.offset = new Array(n.numberOfGlyphs)); + for (var s = 0; s < n.numberOfGlyphs; s++) + n.offset[s] = r.parseChar(); + } + return n; + }, + make: function () { + return new q.Table("post", [ + { name: "version", type: "FIXED", value: 196608 }, + { name: "italicAngle", type: "FIXED", value: 0 }, + { name: "underlinePosition", type: "FWORD", value: 0 }, + { name: "underlineThickness", type: "FWORD", value: 0 }, + { name: "isFixedPitch", type: "ULONG", value: 0 }, + { name: "minMemType42", type: "ULONG", value: 0 }, + { name: "maxMemType42", type: "ULONG", value: 0 }, + { name: "minMemType1", type: "ULONG", value: 0 }, + { name: "maxMemType1", type: "ULONG", value: 0 }, + ]); + }, + }, + st = new Array(9); + (st[1] = function () { + var e = this.offset + this.relativeOffset, + t = this.parseUShort(); + return 1 === t + ? { + substFormat: 1, + coverage: this.parsePointer(ne.coverage), + deltaGlyphId: this.parseUShort(), + } + : 2 === t + ? { + substFormat: 2, + coverage: this.parsePointer(ne.coverage), + substitute: this.parseOffset16List(), + } + : void M.assert( + !1, + "0x" + + e.toString(16) + + ": lookup type 1 format must be 1 or 2." + ); + }), + (st[2] = function () { + var e = this.parseUShort(); + return ( + M.argument( + 1 === e, + "GSUB Multiple Substitution Subtable identifier-format must be 1" + ), + { + substFormat: e, + coverage: this.parsePointer(ne.coverage), + sequences: this.parseListOfLists(), + } + ); + }), + (st[3] = function () { + var e = this.parseUShort(); + return ( + M.argument( + 1 === e, + "GSUB Alternate Substitution Subtable identifier-format must be 1" + ), + { + substFormat: e, + coverage: this.parsePointer(ne.coverage), + alternateSets: this.parseListOfLists(), + } + ); + }), + (st[4] = function () { + var e = this.parseUShort(); + return ( + M.argument( + 1 === e, + "GSUB ligature table identifier-format must be 1" + ), + { + substFormat: e, + coverage: this.parsePointer(ne.coverage), + ligatureSets: this.parseListOfLists(function () { + return { + ligGlyph: this.parseUShort(), + components: this.parseUShortList( + this.parseUShort() - 1 + ), + }; + }), + } + ); + }); + var lt = { sequenceIndex: ne.uShort, lookupListIndex: ne.uShort }; + (st[5] = function () { + var e = this.offset + this.relativeOffset, + t = this.parseUShort(); + if (1 === t) + return { + substFormat: t, + coverage: this.parsePointer(ne.coverage), + ruleSets: this.parseListOfLists(function () { + var e = this.parseUShort(), + t = this.parseUShort(); + return { + input: this.parseUShortList(e - 1), + lookupRecords: this.parseRecordList(t, lt), + }; + }), + }; + if (2 === t) + return { + substFormat: t, + coverage: this.parsePointer(ne.coverage), + classDef: this.parsePointer(ne.classDef), + classSets: this.parseListOfLists(function () { + var e = this.parseUShort(), + t = this.parseUShort(); + return { + classes: this.parseUShortList(e - 1), + lookupRecords: this.parseRecordList(t, lt), + }; + }), + }; + if (3 === t) { + var n = this.parseUShort(), + r = this.parseUShort(); + return { + substFormat: t, + coverages: this.parseList(n, ne.pointer(ne.coverage)), + lookupRecords: this.parseRecordList(r, lt), + }; + } + M.assert( + !1, + "0x" + + e.toString(16) + + ": lookup type 5 format must be 1, 2 or 3." + ); + }), + (st[6] = function () { + var e = this.offset + this.relativeOffset, + t = this.parseUShort(); + return 1 === t + ? { + substFormat: 1, + coverage: this.parsePointer(ne.coverage), + chainRuleSets: this.parseListOfLists(function () { + return { + backtrack: this.parseUShortList(), + input: this.parseUShortList(this.parseShort() - 1), + lookahead: this.parseUShortList(), + lookupRecords: this.parseRecordList(lt), + }; + }), + } + : 2 === t + ? { + substFormat: 2, + coverage: this.parsePointer(ne.coverage), + backtrackClassDef: this.parsePointer(ne.classDef), + inputClassDef: this.parsePointer(ne.classDef), + lookaheadClassDef: this.parsePointer(ne.classDef), + chainClassSet: this.parseListOfLists(function () { + return { + backtrack: this.parseUShortList(), + input: this.parseUShortList(this.parseShort() - 1), + lookahead: this.parseUShortList(), + lookupRecords: this.parseRecordList(lt), + }; + }), + } + : 3 === t + ? { + substFormat: 3, + backtrackCoverage: this.parseList( + ne.pointer(ne.coverage) + ), + inputCoverage: this.parseList(ne.pointer(ne.coverage)), + lookaheadCoverage: this.parseList( + ne.pointer(ne.coverage) + ), + lookupRecords: this.parseRecordList(lt), + } + : void M.assert( + !1, + "0x" + + e.toString(16) + + ": lookup type 6 format must be 1, 2 or 3." + ); + }), + (st[7] = function () { + var e = this.parseUShort(); + M.argument( + 1 === e, + "GSUB Extension Substitution subtable identifier-format must be 1" + ); + var t = this.parseUShort(), + n = new ne(this.data, this.offset + this.parseULong()); + return { + substFormat: 1, + lookupType: t, + extension: st[t].call(n), + }; + }), + (st[8] = function () { + var e = this.parseUShort(); + return ( + M.argument( + 1 === e, + "GSUB Reverse Chaining Contextual Single Substitution Subtable identifier-format must be 1" + ), + { + substFormat: e, + coverage: this.parsePointer(ne.coverage), + backtrackCoverage: this.parseList(ne.pointer(ne.coverage)), + lookaheadCoverage: this.parseList(ne.pointer(ne.coverage)), + substitutes: this.parseUShortList(), + } + ); + }); + var ut = new Array(9); + (ut[1] = function (e) { + return 1 === e.substFormat + ? new q.Table("substitutionTable", [ + { name: "substFormat", type: "USHORT", value: 1 }, + { + name: "coverage", + type: "TABLE", + value: new q.Coverage(e.coverage), + }, + { + name: "deltaGlyphID", + type: "USHORT", + value: e.deltaGlyphId, + }, + ]) + : new q.Table( + "substitutionTable", + [ + { name: "substFormat", type: "USHORT", value: 2 }, + { + name: "coverage", + type: "TABLE", + value: new q.Coverage(e.coverage), + }, + ].concat(q.ushortList("substitute", e.substitute)) + ); + }), + (ut[2] = function (e) { + return ( + M.assert( + 1 === e.substFormat, + "Lookup type 2 substFormat must be 1." + ), + new q.Table( + "substitutionTable", + [ + { name: "substFormat", type: "USHORT", value: 1 }, + { + name: "coverage", + type: "TABLE", + value: new q.Coverage(e.coverage), + }, + ].concat( + q.tableList("seqSet", e.sequences, function (e) { + return new q.Table( + "sequenceSetTable", + q.ushortList("sequence", e) + ); + }) + ) + ) + ); + }), + (ut[3] = function (e) { + return ( + M.assert( + 1 === e.substFormat, + "Lookup type 3 substFormat must be 1." + ), + new q.Table( + "substitutionTable", + [ + { name: "substFormat", type: "USHORT", value: 1 }, + { + name: "coverage", + type: "TABLE", + value: new q.Coverage(e.coverage), + }, + ].concat( + q.tableList("altSet", e.alternateSets, function (e) { + return new q.Table( + "alternateSetTable", + q.ushortList("alternate", e) + ); + }) + ) + ) + ); + }), + (ut[4] = function (e) { + return ( + M.assert( + 1 === e.substFormat, + "Lookup type 4 substFormat must be 1." + ), + new q.Table( + "substitutionTable", + [ + { name: "substFormat", type: "USHORT", value: 1 }, + { + name: "coverage", + type: "TABLE", + value: new q.Coverage(e.coverage), + }, + ].concat( + q.tableList("ligSet", e.ligatureSets, function (e) { + return new q.Table( + "ligatureSetTable", + q.tableList("ligature", e, function (e) { + return new q.Table( + "ligatureTable", + [ + { + name: "ligGlyph", + type: "USHORT", + value: e.ligGlyph, + }, + ].concat( + q.ushortList( + "component", + e.components, + e.components.length + 1 + ) + ) + ); + }) + ); + }) + ) + ) + ); + }), + (ut[6] = function (e) { + if (1 === e.substFormat) + return new q.Table( + "chainContextTable", + [ + { + name: "substFormat", + type: "USHORT", + value: e.substFormat, + }, + { + name: "coverage", + type: "TABLE", + value: new q.Coverage(e.coverage), + }, + ].concat( + q.tableList( + "chainRuleSet", + e.chainRuleSets, + function (e) { + return new q.Table( + "chainRuleSetTable", + q.tableList("chainRule", e, function (e) { + var t = q + .ushortList( + "backtrackGlyph", + e.backtrack, + e.backtrack.length + ) + .concat( + q.ushortList( + "inputGlyph", + e.input, + e.input.length + 1 + ) + ) + .concat( + q.ushortList( + "lookaheadGlyph", + e.lookahead, + e.lookahead.length + ) + ) + .concat( + q.ushortList( + "substitution", + [], + e.lookupRecords.length + ) + ); + return ( + e.lookupRecords.forEach(function (e, n) { + t = t + .concat({ + name: "sequenceIndex" + n, + type: "USHORT", + value: e.sequenceIndex, + }) + .concat({ + name: "lookupListIndex" + n, + type: "USHORT", + value: e.lookupListIndex, + }); + }), + new q.Table("chainRuleTable", t) + ); + }) + ); + } + ) + ) + ); + if (2 === e.substFormat) + M.assert(!1, "lookup type 6 format 2 is not yet supported."); + else if (3 === e.substFormat) { + var t = [ + { + name: "substFormat", + type: "USHORT", + value: e.substFormat, + }, + ]; + return ( + t.push({ + name: "backtrackGlyphCount", + type: "USHORT", + value: e.backtrackCoverage.length, + }), + e.backtrackCoverage.forEach(function (e, n) { + t.push({ + name: "backtrackCoverage" + n, + type: "TABLE", + value: new q.Coverage(e), + }); + }), + t.push({ + name: "inputGlyphCount", + type: "USHORT", + value: e.inputCoverage.length, + }), + e.inputCoverage.forEach(function (e, n) { + t.push({ + name: "inputCoverage" + n, + type: "TABLE", + value: new q.Coverage(e), + }); + }), + t.push({ + name: "lookaheadGlyphCount", + type: "USHORT", + value: e.lookaheadCoverage.length, + }), + e.lookaheadCoverage.forEach(function (e, n) { + t.push({ + name: "lookaheadCoverage" + n, + type: "TABLE", + value: new q.Coverage(e), + }); + }), + t.push({ + name: "substitutionCount", + type: "USHORT", + value: e.lookupRecords.length, + }), + e.lookupRecords.forEach(function (e, n) { + t = t + .concat({ + name: "sequenceIndex" + n, + type: "USHORT", + value: e.sequenceIndex, + }) + .concat({ + name: "lookupListIndex" + n, + type: "USHORT", + value: e.lookupListIndex, + }); + }), + new q.Table("chainContextTable", t) + ); + } + M.assert(!1, "lookup type 6 format must be 1, 2 or 3."); + }); + var ct = { + parse: function (e, t) { + var n = new ne(e, (t = t || 0)), + r = n.parseVersion(1); + return ( + M.argument( + 1 === r || 1.1 === r, + "Unsupported GSUB table version." + ), + 1 === r + ? { + version: r, + scripts: n.parseScriptList(), + features: n.parseFeatureList(), + lookups: n.parseLookupList(st), + } + : { + version: r, + scripts: n.parseScriptList(), + features: n.parseFeatureList(), + lookups: n.parseLookupList(st), + variations: n.parseFeatureVariationsList(), + } + ); + }, + make: function (e) { + return new q.Table("GSUB", [ + { name: "version", type: "ULONG", value: 65536 }, + { + name: "scripts", + type: "TABLE", + value: new q.ScriptList(e.scripts), + }, + { + name: "features", + type: "TABLE", + value: new q.FeatureList(e.features), + }, + { + name: "lookups", + type: "TABLE", + value: new q.LookupList(e.lookups, ut), + }, + ]); + }, + }; + var ft = { + parse: function (e, t) { + var n = new ie.Parser(e, t), + r = n.parseULong(); + M.argument(1 === r, "Unsupported META table version."), + n.parseULong(), + n.parseULong(); + for (var i = n.parseULong(), a = {}, o = 0; o < i; o++) { + var s = n.parseTag(), + l = n.parseULong(), + u = n.parseULong(), + c = k.UTF8(e, t + l, u); + a[s] = c; + } + return a; + }, + make: function (e) { + var t = Object.keys(e).length, + n = "", + r = 16 + 12 * t, + i = new q.Table("meta", [ + { name: "version", type: "ULONG", value: 1 }, + { name: "flags", type: "ULONG", value: 0 }, + { name: "offset", type: "ULONG", value: r }, + { name: "numTags", type: "ULONG", value: t }, + ]); + for (var a in e) { + var o = n.length; + (n += e[a]), + i.fields.push({ name: "tag " + a, type: "TAG", value: a }), + i.fields.push({ + name: "offset " + a, + type: "ULONG", + value: r + o, + }), + i.fields.push({ + name: "length " + a, + type: "ULONG", + value: e[a].length, + }); + } + return ( + i.fields.push({ + name: "stringPool", + type: "CHARARRAY", + value: n, + }), + i + ); + }, + }; + function dt(e) { + return (Math.log(e) / Math.log(2)) | 0; + } + function ht(e) { + for (; e.length % 4 !== 0; ) e.push(0); + for (var t = 0, n = 0; n < e.length; n += 4) + t += + (e[n] << 24) + (e[n + 1] << 16) + (e[n + 2] << 8) + e[n + 3]; + return (t %= Math.pow(2, 32)); + } + function pt(e, t, n, r) { + return new q.Record("Table Record", [ + { name: "tag", type: "TAG", value: void 0 !== e ? e : "" }, + { + name: "checkSum", + type: "ULONG", + value: void 0 !== t ? t : 0, + }, + { name: "offset", type: "ULONG", value: void 0 !== n ? n : 0 }, + { name: "length", type: "ULONG", value: void 0 !== r ? r : 0 }, + ]); + } + function vt(e) { + var t = new q.Table("sfnt", [ + { name: "version", type: "TAG", value: "OTTO" }, + { name: "numTables", type: "USHORT", value: 0 }, + { name: "searchRange", type: "USHORT", value: 0 }, + { name: "entrySelector", type: "USHORT", value: 0 }, + { name: "rangeShift", type: "USHORT", value: 0 }, + ]); + (t.tables = e), (t.numTables = e.length); + var n = Math.pow(2, dt(t.numTables)); + (t.searchRange = 16 * n), + (t.entrySelector = dt(n)), + (t.rangeShift = 16 * t.numTables - t.searchRange); + for ( + var r = [], + i = [], + a = t.sizeOf() + pt().sizeOf() * t.numTables; + a % 4 !== 0; + + ) + (a += 1), i.push({ name: "padding", type: "BYTE", value: 0 }); + for (var o = 0; o < e.length; o += 1) { + var s = e[o]; + M.argument( + 4 === s.tableName.length, + "Table name" + s.tableName + " is invalid." + ); + var l = s.sizeOf(), + u = pt(s.tableName, ht(s.encode()), a, l); + for ( + r.push({ + name: u.tag + " Table Record", + type: "RECORD", + value: u, + }), + i.push({ + name: s.tableName + " table", + type: "RECORD", + value: s, + }), + a += l, + M.argument( + !isNaN(a), + "Something went wrong calculating the offset." + ); + a % 4 !== 0; + + ) + (a += 1), i.push({ name: "padding", type: "BYTE", value: 0 }); + } + return ( + r.sort(function (e, t) { + return e.value.tag > t.value.tag ? 1 : -1; + }), + (t.fields = t.fields.concat(r)), + (t.fields = t.fields.concat(i)), + t + ); + } + function mt(e, t, n) { + for (var r = 0; r < t.length; r += 1) { + var i = e.charToGlyphIndex(t[r]); + if (i > 0) return e.glyphs.get(i).getMetrics(); + } + return n; + } + function gt(e) { + for (var t = 0, n = 0; n < e.length; n += 1) t += e[n]; + return t / e.length; + } + var At = { + make: vt, + fontToTable: function (e) { + for ( + var t, + n = [], + r = [], + i = [], + a = [], + o = [], + s = [], + l = [], + u = 0, + c = 0, + f = 0, + d = 0, + h = 0, + p = 0; + p < e.glyphs.length; + p += 1 + ) { + var v = e.glyphs.get(p), + m = 0 | v.unicode; + if (isNaN(v.advanceWidth)) + throw new Error( + "Glyph " + + v.name + + " (" + + p + + "): advanceWidth is not a number." + ); + (t > m || void 0 === t) && m > 0 && (t = m), u < m && (u = m); + var g = at.getUnicodeRange(m); + if (g < 32) c |= 1 << g; + else if (g < 64) f |= 1 << (g - 32); + else if (g < 96) d |= 1 << (g - 64); + else { + if (!(g < 123)) + throw new Error( + "Unicode ranges bits > 123 are reserved for internal usage" + ); + h |= 1 << (g - 96); + } + if (".notdef" !== v.name) { + var A = v.getMetrics(); + n.push(A.xMin), + r.push(A.yMin), + i.push(A.xMax), + a.push(A.yMax), + s.push(A.leftSideBearing), + l.push(A.rightSideBearing), + o.push(v.advanceWidth); + } + } + var y = { + xMin: Math.min.apply(null, n), + yMin: Math.min.apply(null, r), + xMax: Math.max.apply(null, i), + yMax: Math.max.apply(null, a), + advanceWidthMax: Math.max.apply(null, o), + advanceWidthAvg: gt(o), + minLeftSideBearing: Math.min.apply(null, s), + maxLeftSideBearing: Math.max.apply(null, s), + minRightSideBearing: Math.min.apply(null, l), + }; + (y.ascender = e.ascender), (y.descender = e.descender); + var b = Ge.make({ + flags: 3, + unitsPerEm: e.unitsPerEm, + xMin: y.xMin, + yMin: y.yMin, + xMax: y.xMax, + yMax: y.yMax, + lowestRecPPEM: 3, + createdTimestamp: e.createdTimestamp, + }), + x = Ze.make({ + ascender: y.ascender, + descender: y.descender, + advanceWidthMax: y.advanceWidthMax, + minLeftSideBearing: y.minLeftSideBearing, + minRightSideBearing: y.minRightSideBearing, + xMaxExtent: y.maxLeftSideBearing + (y.xMax - y.xMin), + numberOfHMetrics: e.glyphs.length, + }), + S = He.make(e.glyphs.length), + E = at.make( + Object.assign( + { + xAvgCharWidth: Math.round(y.advanceWidthAvg), + usFirstCharIndex: t, + usLastCharIndex: u, + ulUnicodeRange1: c, + ulUnicodeRange2: f, + ulUnicodeRange3: d, + ulUnicodeRange4: h, + sTypoAscender: y.ascender, + sTypoDescender: y.descender, + sTypoLineGap: 0, + usWinAscent: y.yMax, + usWinDescent: Math.abs(y.yMin), + ulCodePageRange1: 1, + sxHeight: mt(e, "xyvw", { + yMax: Math.round(y.ascender / 2), + }).yMax, + sCapHeight: mt(e, "HIKLEFJMNTZBDPRAGOQSUVWXY", y).yMax, + usDefaultChar: e.hasChar(" ") ? 32 : 0, + usBreakChar: e.hasChar(" ") ? 32 : 0, + }, + e.tables.os2 + ) + ), + _ = ze.make(e.glyphs), + C = oe.make(e.glyphs), + w = e.getEnglishName("fontFamily"), + T = e.getEnglishName("fontSubfamily"), + M = w + " " + T, + I = e.getEnglishName("postScriptName"); + I || (I = w.replace(/\s/g, "") + "-" + T); + var k = {}; + for (var R in e.names) k[R] = e.names[R]; + k.uniqueID || + (k.uniqueID = { + en: e.getEnglishName("manufacturer") + ":" + M, + }), + k.postScriptName || (k.postScriptName = { en: I }), + k.preferredFamily || (k.preferredFamily = e.names.fontFamily), + k.preferredSubfamily || + (k.preferredSubfamily = e.names.fontSubfamily); + var B = [], + P = rt.make(k, B), + L = B.length > 0 ? Qe.make(B) : void 0, + D = ot.make(), + U = Ne.make(e.glyphs, { + version: e.getEnglishName("version"), + fullName: M, + familyName: w, + weightName: T, + postScriptName: I, + unitsPerEm: e.unitsPerEm, + fontBBox: [0, y.yMin, y.ascender, y.advanceWidthMax], + }), + F = + e.metas && Object.keys(e.metas).length > 0 + ? ft.make(e.metas) + : void 0, + O = [b, x, S, E, P, C, D, U, _]; + L && O.push(L), + e.tables.gsub && O.push(ct.make(e.tables.gsub)), + F && O.push(F); + for ( + var N = vt(O), + G = ht(N.encode()), + Z = N.fields, + z = !1, + Q = 0; + Q < Z.length; + Q += 1 + ) + if ("head table" === Z[Q].name) { + (Z[Q].value.checkSumAdjustment = 2981146554 - G), (z = !0); + break; + } + if (!z) + throw new Error( + "Could not find head table with checkSum to adjust." + ); + return N; + }, + computeCheckSum: ht, + }; + function yt(e, t) { + for (var n = 0, r = e.length - 1; n <= r; ) { + var i = (n + r) >>> 1, + a = e[i].tag; + if (a === t) return i; + a < t ? (n = i + 1) : (r = i - 1); + } + return -n - 1; + } + function bt(e, t) { + for (var n = 0, r = e.length - 1; n <= r; ) { + var i = (n + r) >>> 1, + a = e[i]; + if (a === t) return i; + a < t ? (n = i + 1) : (r = i - 1); + } + return -n - 1; + } + function xt(e, t) { + for (var n, r = 0, i = e.length - 1; r <= i; ) { + var a = (r + i) >>> 1, + o = (n = e[a]).start; + if (o === t) return n; + o < t ? (r = a + 1) : (i = a - 1); + } + if (r > 0) return t > (n = e[r - 1]).end ? 0 : n; + } + function St(e, t) { + (this.font = e), (this.tableName = t); + } + function Et(e) { + St.call(this, e, "gpos"); + } + function _t(e) { + St.call(this, e, "gsub"); + } + function Ct(e, t) { + var n = e.length; + if (n !== t.length) return !1; + for (var r = 0; r < n; r++) if (e[r] !== t[r]) return !1; + return !0; + } + function wt(e, t, n) { + for (var r = e.subtables, i = 0; i < r.length; i++) { + var a = r[i]; + if (a.substFormat === t) return a; + } + if (n) return r.push(n), n; + } + function Tt(e, t) { + if (!e) throw t; + } + function Mt(e, t, n, r, i) { + var a; + return ( + (t & r) > 0 + ? ((a = e.parseByte()), + 0 === (t & i) && (a = -a), + (a = n + a)) + : (a = (t & i) > 0 ? n : n + e.parseShort()), + a + ); + } + function It(e, t, n) { + var r, + i, + a = new ie.Parser(t, n); + if ( + ((e.numberOfContours = a.parseShort()), + (e._xMin = a.parseShort()), + (e._yMin = a.parseShort()), + (e._xMax = a.parseShort()), + (e._yMax = a.parseShort()), + e.numberOfContours > 0) + ) { + for ( + var o = (e.endPointIndices = []), s = 0; + s < e.numberOfContours; + s += 1 + ) + o.push(a.parseUShort()); + (e.instructionLength = a.parseUShort()), (e.instructions = []); + for (var l = 0; l < e.instructionLength; l += 1) + e.instructions.push(a.parseByte()); + var u = o[o.length - 1] + 1; + r = []; + for (var c = 0; c < u; c += 1) + if (((i = a.parseByte()), r.push(i), (8 & i) > 0)) + for (var f = a.parseByte(), d = 0; d < f; d += 1) + r.push(i), (c += 1); + if ((M.argument(r.length === u, "Bad flags."), o.length > 0)) { + var h, + p = []; + if (u > 0) { + for (var v = 0; v < u; v += 1) + (i = r[v]), + ((h = {}).onCurve = !!(1 & i)), + (h.lastPointOfContour = o.indexOf(v) >= 0), + p.push(h); + for (var m = 0, g = 0; g < u; g += 1) + (i = r[g]), + ((h = p[g]).x = Mt(a, i, m, 2, 16)), + (m = h.x); + for (var A = 0, y = 0; y < u; y += 1) + (i = r[y]), + ((h = p[y]).y = Mt(a, i, A, 4, 32)), + (A = h.y); + } + e.points = p; + } else e.points = []; + } else if (0 === e.numberOfContours) e.points = []; + else { + (e.isComposite = !0), (e.points = []), (e.components = []); + for (var b = !0; b; ) { + r = a.parseUShort(); + var x = { + glyphIndex: a.parseUShort(), + xScale: 1, + scale01: 0, + scale10: 0, + yScale: 1, + dx: 0, + dy: 0, + }; + (1 & r) > 0 + ? (2 & r) > 0 + ? ((x.dx = a.parseShort()), (x.dy = a.parseShort())) + : (x.matchedPoints = [a.parseUShort(), a.parseUShort()]) + : (2 & r) > 0 + ? ((x.dx = a.parseChar()), (x.dy = a.parseChar())) + : (x.matchedPoints = [a.parseByte(), a.parseByte()]), + (8 & r) > 0 + ? (x.xScale = x.yScale = a.parseF2Dot14()) + : (64 & r) > 0 + ? ((x.xScale = a.parseF2Dot14()), + (x.yScale = a.parseF2Dot14())) + : (128 & r) > 0 && + ((x.xScale = a.parseF2Dot14()), + (x.scale01 = a.parseF2Dot14()), + (x.scale10 = a.parseF2Dot14()), + (x.yScale = a.parseF2Dot14())), + e.components.push(x), + (b = !!(32 & r)); + } + if (256 & r) { + (e.instructionLength = a.parseUShort()), + (e.instructions = []); + for (var S = 0; S < e.instructionLength; S += 1) + e.instructions.push(a.parseByte()); + } + } + } + function kt(e, t) { + for (var n = [], r = 0; r < e.length; r += 1) { + var i = e[r], + a = { + x: t.xScale * i.x + t.scale01 * i.y + t.dx, + y: t.scale10 * i.x + t.yScale * i.y + t.dy, + onCurve: i.onCurve, + lastPointOfContour: i.lastPointOfContour, + }; + n.push(a); + } + return n; + } + function Rt(e) { + var t = new C(); + if (!e) return t; + for ( + var n = (function (e) { + for (var t = [], n = [], r = 0; r < e.length; r += 1) { + var i = e[r]; + n.push(i), i.lastPointOfContour && (t.push(n), (n = [])); + } + return ( + M.argument( + 0 === n.length, + "There are still points left in the current contour." + ), + t + ); + })(e), + r = 0; + r < n.length; + ++r + ) { + var i = n[r], + a = null, + o = i[i.length - 1], + s = i[0]; + if (o.onCurve) t.moveTo(o.x, o.y); + else if (s.onCurve) t.moveTo(s.x, s.y); + else { + var l = { x: 0.5 * (o.x + s.x), y: 0.5 * (o.y + s.y) }; + t.moveTo(l.x, l.y); + } + for (var u = 0; u < i.length; ++u) + if ( + ((a = o), (o = s), (s = i[(u + 1) % i.length]), o.onCurve) + ) + t.lineTo(o.x, o.y); + else { + var c = s; + a.onCurve || (o.x, a.x, o.y, a.y), + s.onCurve || + (c = { x: 0.5 * (o.x + s.x), y: 0.5 * (o.y + s.y) }), + t.quadraticCurveTo(o.x, o.y, c.x, c.y); + } + t.closePath(); + } + return t; + } + function Bt(e, t) { + if (t.isComposite) + for (var n = 0; n < t.components.length; n += 1) { + var r = t.components[n], + i = e.get(r.glyphIndex); + if ((i.getPath(), i.points)) { + var a = void 0; + if (void 0 === r.matchedPoints) a = kt(i.points, r); + else { + if ( + r.matchedPoints[0] > t.points.length - 1 || + r.matchedPoints[1] > i.points.length - 1 + ) + throw Error("Matched points out of range in " + t.name); + var o = t.points[r.matchedPoints[0]], + s = i.points[r.matchedPoints[1]], + l = { + xScale: r.xScale, + scale01: r.scale01, + scale10: r.scale10, + yScale: r.yScale, + dx: 0, + dy: 0, + }; + (s = kt([s], l)[0]), + (l.dx = o.x - s.x), + (l.dy = o.y - s.y), + (a = kt(i.points, l)); + } + t.points = t.points.concat(a); + } + } + return Rt(t.points); + } + (St.prototype = { + searchTag: yt, + binSearch: bt, + getTable: function (e) { + var t = this.font.tables[this.tableName]; + return ( + !t && + e && + (t = this.font.tables[this.tableName] = + this.createDefaultTable()), + t + ); + }, + getScriptNames: function () { + var e = this.getTable(); + return e + ? e.scripts.map(function (e) { + return e.tag; + }) + : []; + }, + getDefaultScriptName: function () { + var e = this.getTable(); + if (e) { + for (var t = !1, n = 0; n < e.scripts.length; n++) { + var r = e.scripts[n].tag; + if ("DFLT" === r) return r; + "latn" === r && (t = !0); + } + return t ? "latn" : void 0; + } + }, + getScriptTable: function (e, t) { + var n = this.getTable(t); + if (n) { + e = e || "DFLT"; + var r = n.scripts, + i = yt(n.scripts, e); + if (i >= 0) return r[i].script; + if (t) { + var a = { + tag: e, + script: { + defaultLangSys: { + reserved: 0, + reqFeatureIndex: 65535, + featureIndexes: [], + }, + langSysRecords: [], + }, + }; + return r.splice(-1 - i, 0, a), a.script; + } + } + }, + getLangSysTable: function (e, t, n) { + var r = this.getScriptTable(e, n); + if (r) { + if (!t || "dflt" === t || "DFLT" === t) + return r.defaultLangSys; + var i = yt(r.langSysRecords, t); + if (i >= 0) return r.langSysRecords[i].langSys; + if (n) { + var a = { + tag: t, + langSys: { + reserved: 0, + reqFeatureIndex: 65535, + featureIndexes: [], + }, + }; + return r.langSysRecords.splice(-1 - i, 0, a), a.langSys; + } + } + }, + getFeatureTable: function (e, t, n, r) { + var i = this.getLangSysTable(e, t, r); + if (i) { + for ( + var a, + o = i.featureIndexes, + s = this.font.tables[this.tableName].features, + l = 0; + l < o.length; + l++ + ) + if ((a = s[o[l]]).tag === n) return a.feature; + if (r) { + var u = s.length; + return ( + M.assert( + 0 === u || n >= s[u - 1].tag, + "Features must be added in alphabetical order." + ), + (a = { + tag: n, + feature: { params: 0, lookupListIndexes: [] }, + }), + s.push(a), + o.push(u), + a.feature + ); + } + } + }, + getLookupTables: function (e, t, n, r, i) { + var a = this.getFeatureTable(e, t, n, i), + o = []; + if (a) { + for ( + var s, + l = a.lookupListIndexes, + u = this.font.tables[this.tableName].lookups, + c = 0; + c < l.length; + c++ + ) + (s = u[l[c]]).lookupType === r && o.push(s); + if (0 === o.length && i) { + s = { + lookupType: r, + lookupFlag: 0, + subtables: [], + markFilteringSet: void 0, + }; + var f = u.length; + return u.push(s), l.push(f), [s]; + } + } + return o; + }, + getGlyphClass: function (e, t) { + switch (e.format) { + case 1: + return e.startGlyph <= t && + t < e.startGlyph + e.classes.length + ? e.classes[t - e.startGlyph] + : 0; + case 2: + var n = xt(e.ranges, t); + return n ? n.classId : 0; + } + }, + getCoverageIndex: function (e, t) { + switch (e.format) { + case 1: + var n = bt(e.glyphs, t); + return n >= 0 ? n : -1; + case 2: + var r = xt(e.ranges, t); + return r ? r.index + t - r.start : -1; + } + }, + expandCoverage: function (e) { + if (1 === e.format) return e.glyphs; + for (var t = [], n = e.ranges, r = 0; r < n.length; r++) + for (var i = n[r], a = i.start, o = i.end, s = a; s <= o; s++) + t.push(s); + return t; + }, + }), + (Et.prototype = St.prototype), + (Et.prototype.init = function () { + var e = this.getDefaultScriptName(); + this.defaultKerningTables = this.getKerningTables(e); + }), + (Et.prototype.getKerningValue = function (e, t, n) { + for (var r = 0; r < e.length; r++) + for (var i = e[r].subtables, a = 0; a < i.length; a++) { + var o = i[a], + s = this.getCoverageIndex(o.coverage, t); + if (!(s < 0)) + switch (o.posFormat) { + case 1: + for ( + var l = o.pairSets[s], u = 0; + u < l.length; + u++ + ) { + var c = l[u]; + if (c.secondGlyph === n) + return (c.value1 && c.value1.xAdvance) || 0; + } + break; + case 2: + var f = this.getGlyphClass(o.classDef1, t), + d = this.getGlyphClass(o.classDef2, n), + h = o.classRecords[f][d]; + return (h.value1 && h.value1.xAdvance) || 0; + } + } + return 0; + }), + (Et.prototype.getKerningTables = function (e, t) { + if (this.font.tables.gpos) + return this.getLookupTables(e, t, "kern", 2); + }), + (_t.prototype = St.prototype), + (_t.prototype.createDefaultTable = function () { + return { + version: 1, + scripts: [ + { + tag: "DFLT", + script: { + defaultLangSys: { + reserved: 0, + reqFeatureIndex: 65535, + featureIndexes: [], + }, + langSysRecords: [], + }, + }, + ], + features: [], + lookups: [], + }; + }), + (_t.prototype.getSingle = function (e, t, n) { + for ( + var r = [], i = this.getLookupTables(t, n, e, 1), a = 0; + a < i.length; + a++ + ) + for (var o = i[a].subtables, s = 0; s < o.length; s++) { + var l = o[s], + u = this.expandCoverage(l.coverage), + c = void 0; + if (1 === l.substFormat) { + var f = l.deltaGlyphId; + for (c = 0; c < u.length; c++) { + var d = u[c]; + r.push({ sub: d, by: d + f }); + } + } else { + var h = l.substitute; + for (c = 0; c < u.length; c++) + r.push({ sub: u[c], by: h[c] }); + } + } + return r; + }), + (_t.prototype.getMultiple = function (e, t, n) { + for ( + var r = [], i = this.getLookupTables(t, n, e, 2), a = 0; + a < i.length; + a++ + ) + for (var o = i[a].subtables, s = 0; s < o.length; s++) { + var l = o[s], + u = this.expandCoverage(l.coverage), + c = void 0; + for (c = 0; c < u.length; c++) { + var f = u[c], + d = l.sequences[c]; + r.push({ sub: f, by: d }); + } + } + return r; + }), + (_t.prototype.getAlternates = function (e, t, n) { + for ( + var r = [], i = this.getLookupTables(t, n, e, 3), a = 0; + a < i.length; + a++ + ) + for (var o = i[a].subtables, s = 0; s < o.length; s++) + for ( + var l = o[s], + u = this.expandCoverage(l.coverage), + c = l.alternateSets, + f = 0; + f < u.length; + f++ + ) + r.push({ sub: u[f], by: c[f] }); + return r; + }), + (_t.prototype.getLigatures = function (e, t, n) { + for ( + var r = [], i = this.getLookupTables(t, n, e, 4), a = 0; + a < i.length; + a++ + ) + for (var o = i[a].subtables, s = 0; s < o.length; s++) + for ( + var l = o[s], + u = this.expandCoverage(l.coverage), + c = l.ligatureSets, + f = 0; + f < u.length; + f++ + ) + for (var d = u[f], h = c[f], p = 0; p < h.length; p++) { + var v = h[p]; + r.push({ + sub: [d].concat(v.components), + by: v.ligGlyph, + }); + } + return r; + }), + (_t.prototype.addSingle = function (e, t, n, r) { + var i = wt(this.getLookupTables(n, r, e, 1, !0)[0], 2, { + substFormat: 2, + coverage: { format: 1, glyphs: [] }, + substitute: [], + }); + M.assert( + 1 === i.coverage.format, + "Single: unable to modify coverage table format " + + i.coverage.format + ); + var a = t.sub, + o = this.binSearch(i.coverage.glyphs, a); + o < 0 && + ((o = -1 - o), + i.coverage.glyphs.splice(o, 0, a), + i.substitute.splice(o, 0, 0)), + (i.substitute[o] = t.by); + }), + (_t.prototype.addMultiple = function (e, t, n, r) { + M.assert( + t.by instanceof Array && t.by.length > 1, + 'Multiple: "by" must be an array of two or more ids' + ); + var i = wt(this.getLookupTables(n, r, e, 2, !0)[0], 1, { + substFormat: 1, + coverage: { format: 1, glyphs: [] }, + sequences: [], + }); + M.assert( + 1 === i.coverage.format, + "Multiple: unable to modify coverage table format " + + i.coverage.format + ); + var a = t.sub, + o = this.binSearch(i.coverage.glyphs, a); + o < 0 && + ((o = -1 - o), + i.coverage.glyphs.splice(o, 0, a), + i.sequences.splice(o, 0, 0)), + (i.sequences[o] = t.by); + }), + (_t.prototype.addAlternate = function (e, t, n, r) { + var i = wt(this.getLookupTables(n, r, e, 3, !0)[0], 1, { + substFormat: 1, + coverage: { format: 1, glyphs: [] }, + alternateSets: [], + }); + M.assert( + 1 === i.coverage.format, + "Alternate: unable to modify coverage table format " + + i.coverage.format + ); + var a = t.sub, + o = this.binSearch(i.coverage.glyphs, a); + o < 0 && + ((o = -1 - o), + i.coverage.glyphs.splice(o, 0, a), + i.alternateSets.splice(o, 0, 0)), + (i.alternateSets[o] = t.by); + }), + (_t.prototype.addLigature = function (e, t, n, r) { + var i = this.getLookupTables(n, r, e, 4, !0)[0], + a = i.subtables[0]; + a || + ((a = { + substFormat: 1, + coverage: { format: 1, glyphs: [] }, + ligatureSets: [], + }), + (i.subtables[0] = a)), + M.assert( + 1 === a.coverage.format, + "Ligature: unable to modify coverage table format " + + a.coverage.format + ); + var o = t.sub[0], + s = t.sub.slice(1), + l = { ligGlyph: t.by, components: s }, + u = this.binSearch(a.coverage.glyphs, o); + if (u >= 0) { + for (var c = a.ligatureSets[u], f = 0; f < c.length; f++) + if (Ct(c[f].components, s)) return; + c.push(l); + } else + (u = -1 - u), + a.coverage.glyphs.splice(u, 0, o), + a.ligatureSets.splice(u, 0, [l]); + }), + (_t.prototype.getFeature = function (e, t, n) { + if (/ss\d\d/.test(e)) return this.getSingle(e, t, n); + switch (e) { + case "aalt": + case "salt": + return this.getSingle(e, t, n).concat( + this.getAlternates(e, t, n) + ); + case "dlig": + case "liga": + case "rlig": + return this.getLigatures(e, t, n); + case "ccmp": + return this.getMultiple(e, t, n).concat( + this.getLigatures(e, t, n) + ); + case "stch": + return this.getMultiple(e, t, n); + } + }), + (_t.prototype.add = function (e, t, n, r) { + if (/ss\d\d/.test(e)) return this.addSingle(e, t, n, r); + switch (e) { + case "aalt": + case "salt": + return "number" === typeof t.by + ? this.addSingle(e, t, n, r) + : this.addAlternate(e, t, n, r); + case "dlig": + case "liga": + case "rlig": + return this.addLigature(e, t, n, r); + case "ccmp": + return t.by instanceof Array + ? this.addMultiple(e, t, n, r) + : this.addLigature(e, t, n, r); + } + }); + var Pt, + Lt, + Dt, + Ut, + Ft = { + getPath: Rt, + parse: function (e, t, n, r, i) { + return i.lowMemory + ? (function (e, t, n, r) { + var i = new be.GlyphSet(r); + return ( + (r._push = function (a) { + var o = n[a]; + o !== n[a + 1] + ? i.push( + a, + be.ttfGlyphLoader(r, a, It, e, t + o, Bt) + ) + : i.push(a, be.glyphLoader(r, a)); + }), + i + ); + })(e, t, n, r) + : (function (e, t, n, r) { + for ( + var i = new be.GlyphSet(r), a = 0; + a < n.length - 1; + a += 1 + ) { + var o = n[a]; + o !== n[a + 1] + ? i.push( + a, + be.ttfGlyphLoader(r, a, It, e, t + o, Bt) + ) + : i.push(a, be.glyphLoader(r, a)); + } + return i; + })(e, t, n, r); + }, + }; + function Ot(e) { + (this.font = e), + (this.getCommands = function (e) { + return Ft.getPath(e).commands; + }), + (this._fpgmState = this._prepState = void 0), + (this._errorState = 0); + } + function Nt(e) { + return e; + } + function Gt(e) { + return Math.sign(e) * Math.round(Math.abs(e)); + } + function Zt(e) { + return (Math.sign(e) * Math.round(Math.abs(2 * e))) / 2; + } + function zt(e) { + return Math.sign(e) * (Math.round(Math.abs(e) + 0.5) - 0.5); + } + function Qt(e) { + return Math.sign(e) * Math.ceil(Math.abs(e)); + } + function Ht(e) { + return Math.sign(e) * Math.floor(Math.abs(e)); + } + var Vt = function (e) { + var t = this.srPeriod, + n = this.srPhase, + r = 1; + return ( + e < 0 && ((e = -e), (r = -1)), + (e += this.srThreshold - n), + (e = Math.trunc(e / t) * t), + (e += n) < 0 ? n * r : e * r + ); + }, + jt = { + x: 1, + y: 0, + axis: "x", + distance: function (e, t, n, r) { + return (n ? e.xo : e.x) - (r ? t.xo : t.x); + }, + interpolate: function (e, t, n, r) { + var i, a, o, s, l, u, c; + if (!r || r === this) + return ( + (i = e.xo - t.xo), + (a = e.xo - n.xo), + (l = t.x - t.xo), + (u = n.x - n.xo), + 0 === (c = (o = Math.abs(i)) + (s = Math.abs(a))) + ? void (e.x = e.xo + (l + u) / 2) + : void (e.x = e.xo + (l * s + u * o) / c) + ); + (i = r.distance(e, t, !0, !0)), + (a = r.distance(e, n, !0, !0)), + (l = r.distance(t, t, !1, !0)), + (u = r.distance(n, n, !1, !0)), + 0 !== (c = (o = Math.abs(i)) + (s = Math.abs(a))) + ? jt.setRelative(e, e, (l * s + u * o) / c, r, !0) + : jt.setRelative(e, e, (l + u) / 2, r, !0); + }, + normalSlope: Number.NEGATIVE_INFINITY, + setRelative: function (e, t, n, r, i) { + if (r && r !== this) { + var a = i ? t.xo : t.x, + o = i ? t.yo : t.y, + s = a + n * r.x, + l = o + n * r.y; + e.x = s + (e.y - l) / r.normalSlope; + } else e.x = (i ? t.xo : t.x) + n; + }, + slope: 0, + touch: function (e) { + e.xTouched = !0; + }, + touched: function (e) { + return e.xTouched; + }, + untouch: function (e) { + e.xTouched = !1; + }, + }, + Wt = { + x: 0, + y: 1, + axis: "y", + distance: function (e, t, n, r) { + return (n ? e.yo : e.y) - (r ? t.yo : t.y); + }, + interpolate: function (e, t, n, r) { + var i, a, o, s, l, u, c; + if (!r || r === this) + return ( + (i = e.yo - t.yo), + (a = e.yo - n.yo), + (l = t.y - t.yo), + (u = n.y - n.yo), + 0 === (c = (o = Math.abs(i)) + (s = Math.abs(a))) + ? void (e.y = e.yo + (l + u) / 2) + : void (e.y = e.yo + (l * s + u * o) / c) + ); + (i = r.distance(e, t, !0, !0)), + (a = r.distance(e, n, !0, !0)), + (l = r.distance(t, t, !1, !0)), + (u = r.distance(n, n, !1, !0)), + 0 !== (c = (o = Math.abs(i)) + (s = Math.abs(a))) + ? Wt.setRelative(e, e, (l * s + u * o) / c, r, !0) + : Wt.setRelative(e, e, (l + u) / 2, r, !0); + }, + normalSlope: 0, + setRelative: function (e, t, n, r, i) { + if (r && r !== this) { + var a = i ? t.xo : t.x, + o = i ? t.yo : t.y, + s = a + n * r.x, + l = o + n * r.y; + e.y = l + r.normalSlope * (e.x - s); + } else e.y = (i ? t.yo : t.y) + n; + }, + slope: Number.POSITIVE_INFINITY, + touch: function (e) { + e.yTouched = !0; + }, + touched: function (e) { + return e.yTouched; + }, + untouch: function (e) { + e.yTouched = !1; + }, + }; + function Xt(e, t) { + (this.x = e), + (this.y = t), + (this.axis = void 0), + (this.slope = t / e), + (this.normalSlope = -e / t), + Object.freeze(this); + } + function Yt(e, t) { + var n = Math.sqrt(e * e + t * t); + return ( + (t /= n), + 1 === (e /= n) && 0 === t + ? jt + : 0 === e && 1 === t + ? Wt + : new Xt(e, t) + ); + } + function qt(e, t, n, r) { + (this.x = this.xo = Math.round(64 * e) / 64), + (this.y = this.yo = Math.round(64 * t) / 64), + (this.lastPointOfContour = n), + (this.onCurve = r), + (this.prevPointOnContour = void 0), + (this.nextPointOnContour = void 0), + (this.xTouched = !1), + (this.yTouched = !1), + Object.preventExtensions(this); + } + Object.freeze(jt), + Object.freeze(Wt), + (Xt.prototype.distance = function (e, t, n, r) { + return ( + this.x * jt.distance(e, t, n, r) + + this.y * Wt.distance(e, t, n, r) + ); + }), + (Xt.prototype.interpolate = function (e, t, n, r) { + var i, a, o, s, l, u, c; + (o = r.distance(e, t, !0, !0)), + (s = r.distance(e, n, !0, !0)), + (i = r.distance(t, t, !1, !0)), + (a = r.distance(n, n, !1, !0)), + 0 !== (c = (l = Math.abs(o)) + (u = Math.abs(s))) + ? this.setRelative(e, e, (i * u + a * l) / c, r, !0) + : this.setRelative(e, e, (i + a) / 2, r, !0); + }), + (Xt.prototype.setRelative = function (e, t, n, r, i) { + r = r || this; + var a = i ? t.xo : t.x, + o = i ? t.yo : t.y, + s = a + n * r.x, + l = o + n * r.y, + u = r.normalSlope, + c = this.slope, + f = e.x, + d = e.y; + (e.x = (c * f - u * s + l - d) / (c - u)), + (e.y = c * (e.x - f) + d); + }), + (Xt.prototype.touch = function (e) { + (e.xTouched = !0), (e.yTouched = !0); + }), + (qt.prototype.nextTouched = function (e) { + for ( + var t = this.nextPointOnContour; + !e.touched(t) && t !== this; + + ) + t = t.nextPointOnContour; + return t; + }), + (qt.prototype.prevTouched = function (e) { + for ( + var t = this.prevPointOnContour; + !e.touched(t) && t !== this; + + ) + t = t.prevPointOnContour; + return t; + }); + var Jt = Object.freeze(new qt(0, 0)), + Kt = { + cvCutIn: 17 / 16, + deltaBase: 9, + deltaShift: 0.125, + loop: 1, + minDis: 1, + autoFlip: !0, + }; + function $t(e, t) { + switch (((this.env = e), (this.stack = []), (this.prog = t), e)) { + case "glyf": + (this.zp0 = this.zp1 = this.zp2 = 1), + (this.rp0 = this.rp1 = this.rp2 = 0); + case "prep": + (this.fv = this.pv = this.dpv = jt), (this.round = Gt); + } + } + function en(e) { + for ( + var t = (e.tZone = new Array(e.gZone.length)), n = 0; + n < t.length; + n++ + ) + t[n] = new qt(0, 0); + } + function tn(e, t) { + var n, + r = e.prog, + i = e.ip, + a = 1; + do { + if (88 === (n = r[++i])) a++; + else if (89 === n) a--; + else if (64 === n) i += r[i + 1] + 1; + else if (65 === n) i += 2 * r[i + 1] + 1; + else if (n >= 176 && n <= 183) i += n - 176 + 1; + else if (n >= 184 && n <= 191) i += 2 * (n - 184 + 1); + else if (t && 1 === a && 27 === n) break; + } while (a > 0); + e.ip = i; + } + function nn(e, t) { + exports.DEBUG && console.log(t.step, "SVTCA[" + e.axis + "]"), + (t.fv = t.pv = t.dpv = e); + } + function rn(e, t) { + exports.DEBUG && console.log(t.step, "SPVTCA[" + e.axis + "]"), + (t.pv = t.dpv = e); + } + function an(e, t) { + exports.DEBUG && console.log(t.step, "SFVTCA[" + e.axis + "]"), + (t.fv = e); + } + function on(e, t) { + var n, + r, + i = t.stack, + a = i.pop(), + o = i.pop(), + s = t.z2[a], + l = t.z1[o]; + exports.DEBUG && console.log("SPVTL[" + e + "]", a, o), + e + ? ((n = s.y - l.y), (r = l.x - s.x)) + : ((n = l.x - s.x), (r = l.y - s.y)), + (t.pv = t.dpv = Yt(n, r)); + } + function sn(e, t) { + var n, + r, + i = t.stack, + a = i.pop(), + o = i.pop(), + s = t.z2[a], + l = t.z1[o]; + exports.DEBUG && console.log("SFVTL[" + e + "]", a, o), + e + ? ((n = s.y - l.y), (r = l.x - s.x)) + : ((n = l.x - s.x), (r = l.y - s.y)), + (t.fv = Yt(n, r)); + } + function ln(e) { + exports.DEBUG && console.log(e.step, "POP[]"), e.stack.pop(); + } + function un(e, t) { + var n = t.stack.pop(), + r = t.z0[n], + i = t.fv, + a = t.pv; + exports.DEBUG && console.log(t.step, "MDAP[" + e + "]", n); + var o = a.distance(r, Jt); + e && (o = t.round(o)), + i.setRelative(r, Jt, o, a), + i.touch(r), + (t.rp0 = t.rp1 = n); + } + function cn(e, t) { + var n, + r, + i, + a = t.z2, + o = a.length - 2; + exports.DEBUG && console.log(t.step, "IUP[" + e.axis + "]"); + for (var s = 0; s < o; s++) + (n = a[s]), + e.touched(n) || + ((r = n.prevTouched(e)) !== n && + (r === (i = n.nextTouched(e)) && + e.setRelative(n, n, e.distance(r, r, !1, !0), e, !0), + e.interpolate(n, r, i, e))); + } + function fn(e, t) { + for ( + var n = t.stack, + r = e ? t.rp1 : t.rp2, + i = (e ? t.z0 : t.z1)[r], + a = t.fv, + o = t.pv, + s = t.loop, + l = t.z2; + s--; + + ) { + var u = n.pop(), + c = l[u], + f = o.distance(i, i, !1, !0); + a.setRelative(c, c, f, o), + a.touch(c), + exports.DEBUG && + console.log( + t.step, + (t.loop > 1 ? "loop " + (t.loop - s) + ": " : "") + + "SHP[" + + (e ? "rp1" : "rp2") + + "]", + u + ); + } + t.loop = 1; + } + function dn(e, t) { + var n = t.stack, + r = e ? t.rp1 : t.rp2, + i = (e ? t.z0 : t.z1)[r], + a = t.fv, + o = t.pv, + s = n.pop(), + l = t.z2[t.contours[s]], + u = l; + exports.DEBUG && console.log(t.step, "SHC[" + e + "]", s); + var c = o.distance(i, i, !1, !0); + do { + u !== i && a.setRelative(u, u, c, o), + (u = u.nextPointOnContour); + } while (u !== l); + } + function hn(e, t) { + var n, + r, + i = t.stack, + a = e ? t.rp1 : t.rp2, + o = (e ? t.z0 : t.z1)[a], + s = t.fv, + l = t.pv, + u = i.pop(); + switch ( + (exports.DEBUG && console.log(t.step, "SHZ[" + e + "]", u), u) + ) { + case 0: + n = t.tZone; + break; + case 1: + n = t.gZone; + break; + default: + throw new Error("Invalid zone"); + } + for ( + var c = l.distance(o, o, !1, !0), f = n.length - 2, d = 0; + d < f; + d++ + ) + (r = n[d]), s.setRelative(r, r, c, l); + } + function pn(e, t) { + var n = t.stack, + r = n.pop() / 64, + i = n.pop(), + a = t.z1[i], + o = t.z0[t.rp0], + s = t.fv, + l = t.pv; + s.setRelative(a, o, r, l), + s.touch(a), + exports.DEBUG && console.log(t.step, "MSIRP[" + e + "]", r, i), + (t.rp1 = t.rp0), + (t.rp2 = i), + e && (t.rp0 = i); + } + function vn(e, t) { + var n = t.stack, + r = n.pop(), + i = n.pop(), + a = t.z0[i], + o = t.fv, + s = t.pv, + l = t.cvt[r]; + exports.DEBUG && + console.log(t.step, "MIAP[" + e + "]", r, "(", l, ")", i); + var u = s.distance(a, Jt); + e && (Math.abs(u - l) < t.cvCutIn && (u = l), (u = t.round(u))), + o.setRelative(a, Jt, u, s), + 0 === t.zp0 && ((a.xo = a.x), (a.yo = a.y)), + o.touch(a), + (t.rp0 = t.rp1 = i); + } + function mn(e, t) { + var n = t.stack, + r = n.pop(), + i = t.z2[r]; + exports.DEBUG && console.log(t.step, "GC[" + e + "]", r), + n.push(64 * t.dpv.distance(i, Jt, e, !1)); + } + function gn(e, t) { + var n = t.stack, + r = n.pop(), + i = n.pop(), + a = t.z1[r], + o = t.z0[i], + s = t.dpv.distance(o, a, e, e); + exports.DEBUG && + console.log(t.step, "MD[" + e + "]", r, i, "->", s), + t.stack.push(Math.round(64 * s)); + } + function An(e, t) { + var n = t.stack, + r = n.pop(), + i = t.fv, + a = t.pv, + o = t.ppem, + s = t.deltaBase + 16 * (e - 1), + l = t.deltaShift, + u = t.z0; + exports.DEBUG && console.log(t.step, "DELTAP[" + e + "]", r, n); + for (var c = 0; c < r; c++) { + var f = n.pop(), + d = n.pop(); + if (s + ((240 & d) >> 4) === o) { + var h = (15 & d) - 8; + h >= 0 && h++, + exports.DEBUG && + console.log(t.step, "DELTAPFIX", f, "by", h * l); + var p = u[f]; + i.setRelative(p, p, h * l, a); + } + } + } + function yn(e, t) { + var n = t.stack, + r = n.pop(); + exports.DEBUG && console.log(t.step, "ROUND[]"), + n.push(64 * t.round(r / 64)); + } + function bn(e, t) { + var n = t.stack, + r = n.pop(), + i = t.ppem, + a = t.deltaBase + 16 * (e - 1), + o = t.deltaShift; + exports.DEBUG && console.log(t.step, "DELTAC[" + e + "]", r, n); + for (var s = 0; s < r; s++) { + var l = n.pop(), + u = n.pop(); + if (a + ((240 & u) >> 4) === i) { + var c = (15 & u) - 8; + c >= 0 && c++; + var f = c * o; + exports.DEBUG && console.log(t.step, "DELTACFIX", l, "by", f), + (t.cvt[l] += f); + } + } + } + function xn(e, t) { + var n, + r, + i = t.stack, + a = i.pop(), + o = i.pop(), + s = t.z2[a], + l = t.z1[o]; + exports.DEBUG && console.log(t.step, "SDPVTL[" + e + "]", a, o), + e + ? ((n = s.y - l.y), (r = l.x - s.x)) + : ((n = l.x - s.x), (r = l.y - s.y)), + (t.dpv = Yt(n, r)); + } + function Sn(e, t) { + var n = t.stack, + r = t.prog, + i = t.ip; + exports.DEBUG && console.log(t.step, "PUSHB[" + e + "]"); + for (var a = 0; a < e; a++) n.push(r[++i]); + t.ip = i; + } + function En(e, t) { + var n = t.ip, + r = t.prog, + i = t.stack; + exports.DEBUG && console.log(t.ip, "PUSHW[" + e + "]"); + for (var a = 0; a < e; a++) { + var o = (r[++n] << 8) | r[++n]; + 32768 & o && (o = -(1 + (65535 ^ o))), i.push(o); + } + t.ip = n; + } + function _n(e, t, n, r, i, a) { + var o, + s, + l, + u, + c = a.stack, + f = e && c.pop(), + d = c.pop(), + h = a.rp0, + p = a.z0[h], + v = a.z1[d], + m = a.minDis, + g = a.fv, + A = a.dpv; + (l = (s = o = A.distance(v, p, !0, !0)) >= 0 ? 1 : -1), + (s = Math.abs(s)), + e && + ((u = a.cvt[f]), r && Math.abs(s - u) < a.cvCutIn && (s = u)), + n && s < m && (s = m), + r && (s = a.round(s)), + g.setRelative(v, p, l * s, A), + g.touch(v), + exports.DEBUG && + console.log( + a.step, + (e ? "MIRP[" : "MDRP[") + + (t ? "M" : "m") + + (n ? ">" : "_") + + (r ? "R" : "_") + + (0 === i ? "Gr" : 1 === i ? "Bl" : 2 === i ? "Wh" : "") + + "]", + e ? f + "(" + a.cvt[f] + "," + u + ")" : "", + d, + "(d =", + o, + "->", + l * s, + ")" + ), + (a.rp1 = a.rp0), + (a.rp2 = d), + t && (a.rp0 = d); + } + function Cn(e) { + (this.char = e), (this.state = {}), (this.activeState = null); + } + function wn(e, t, n) { + (this.contextName = n), + (this.startIndex = e), + (this.endOffset = t); + } + function Tn(e, t, n) { + (this.contextName = e), + (this.openRange = null), + (this.ranges = []), + (this.checkStart = t), + (this.checkEnd = n); + } + function Mn(e, t) { + (this.context = e), + (this.index = t), + (this.length = e.length), + (this.current = e[t]), + (this.backtrack = e.slice(0, t)), + (this.lookahead = e.slice(t + 1)); + } + function In(e) { + (this.eventId = e), (this.subscribers = []); + } + function kn(e) { + var t = this, + n = [ + "start", + "end", + "next", + "newToken", + "contextStart", + "contextEnd", + "insertToken", + "removeToken", + "removeRange", + "replaceToken", + "replaceRange", + "composeRUD", + "updateContextsRanges", + ]; + n.forEach(function (e) { + Object.defineProperty(t.events, e, { value: new In(e) }); + }), + e && + n.forEach(function (n) { + var r = e[n]; + "function" === typeof r && t.events[n].subscribe(r); + }); + [ + "insertToken", + "removeToken", + "removeRange", + "replaceToken", + "replaceRange", + "composeRUD", + ].forEach(function (e) { + t.events[e].subscribe(t.updateContextsRanges); + }); + } + function Rn(e) { + (this.tokens = []), + (this.registeredContexts = {}), + (this.contextCheckers = []), + (this.events = {}), + (this.registeredModifiers = []), + kn.call(this, e); + } + function Bn(e) { + return /[\u0600-\u065F\u066A-\u06D2\u06FA-\u06FF]/.test(e); + } + function Pn(e) { + return /[\u0630\u0690\u0621\u0631\u0661\u0671\u0622\u0632\u0672\u0692\u06C2\u0623\u0673\u0693\u06C3\u0624\u0694\u06C4\u0625\u0675\u0695\u06C5\u06E5\u0676\u0696\u06C6\u0627\u0677\u0697\u06C7\u0648\u0688\u0698\u06C8\u0689\u0699\u06C9\u068A\u06CA\u066B\u068B\u06CB\u068C\u068D\u06CD\u06FD\u068E\u06EE\u06FE\u062F\u068F\u06CF\u06EF]/.test( + e + ); + } + function Ln(e) { + return /[\u0600-\u0605\u060C-\u060E\u0610-\u061B\u061E\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED]/.test( + e + ); + } + function Dn(e) { + return /[A-z]/.test(e); + } + function Un(e) { + (this.font = e), (this.features = {}); + } + function Fn(e) { + (this.id = e.id), + (this.tag = e.tag), + (this.substitution = e.substitution); + } + function On(e, t) { + if (!e) return -1; + switch (t.format) { + case 1: + return t.glyphs.indexOf(e); + case 2: + for (var n = t.ranges, r = 0; r < n.length; r++) { + var i = n[r]; + if (e >= i.start && e <= i.end) { + var a = e - i.start; + return i.index + a; + } + } + break; + default: + return -1; + } + return -1; + } + function Nn(e, t) { + return -1 === On(e, t.coverage) ? null : e + t.deltaGlyphId; + } + function Gn(e, t) { + var n = On(e, t.coverage); + return -1 === n ? null : t.substitute[n]; + } + function Zn(e, t) { + for (var n = [], r = 0; r < e.length; r++) { + var i = e[r], + a = t.current, + o = On((a = Array.isArray(a) ? a[0] : a), i); + -1 !== o && n.push(o); + } + return n.length !== e.length ? -1 : n; + } + function zn(e, t) { + var n = + t.inputCoverage.length + + t.lookaheadCoverage.length + + t.backtrackCoverage.length; + if (e.context.length < n) return []; + var r = Zn(t.inputCoverage, e); + if (-1 === r) return []; + var i = t.inputCoverage.length - 1; + if (e.lookahead.length < t.lookaheadCoverage.length) return []; + for (var a = e.lookahead.slice(i); a.length && Ln(a[0].char); ) + a.shift(); + var o = new Mn(a, 0), + s = Zn(t.lookaheadCoverage, o), + l = [].concat(e.backtrack); + for (l.reverse(); l.length && Ln(l[0].char); ) l.shift(); + if (l.length < t.backtrackCoverage.length) return []; + var u = new Mn(l, 0), + c = Zn(t.backtrackCoverage, u), + f = []; + if ( + r.length === t.inputCoverage.length && + s.length === t.lookaheadCoverage.length && + c.length === t.backtrackCoverage.length + ) + for (var d = 0; d < t.lookupRecords.length; d++) + for ( + var h = t.lookupRecords[d].lookupListIndex, + p = this.getLookupByIndex(h), + v = 0; + v < p.subtables.length; + v++ + ) { + var m = p.subtables[v], + g = this.getLookupMethod(p, m); + if ("12" === this.getSubstitutionType(p, m)) + for (var A = 0; A < r.length; A++) { + var y = g(e.get(A)); + y && f.push(y); + } + } + return f; + } + function Qn(e, t) { + var n, + r = On(e.current, t.coverage); + if (-1 === r) return null; + for (var i = t.ligatureSets[r], a = 0; a < i.length; a++) { + n = i[a]; + for (var o = 0; o < n.components.length; o++) { + if (e.lookahead[o] !== n.components[o]) break; + if (o === n.components.length - 1) return n; + } + } + return null; + } + function Hn(e, t) { + var n = On(e, t.coverage); + return -1 === n ? null : t.sequences[n]; + } + (Ot.prototype.exec = function (e, t) { + if ("number" !== typeof t) + throw new Error("Point size is not a number!"); + if (!(this._errorState > 2)) { + var n = this.font, + r = this._prepState; + if (!r || r.ppem !== t) { + var i = this._fpgmState; + if (!i) { + ($t.prototype = Kt), + ((i = this._fpgmState = + new $t("fpgm", n.tables.fpgm)).funcs = []), + (i.font = n), + exports.DEBUG && + (console.log("---EXEC FPGM---"), (i.step = -1)); + try { + Lt(i); + } catch (u) { + return ( + console.log("Hinting error in FPGM:" + u), + void (this._errorState = 3) + ); + } + } + ($t.prototype = i), + ((r = this._prepState = + new $t("prep", n.tables.prep)).ppem = t); + var a = n.tables.cvt; + if (a) + for ( + var o = (r.cvt = new Array(a.length)), + s = t / n.unitsPerEm, + l = 0; + l < a.length; + l++ + ) + o[l] = a[l] * s; + else r.cvt = []; + exports.DEBUG && + (console.log("---EXEC PREP---"), (r.step = -1)); + try { + Lt(r); + } catch (u) { + this._errorState < 2 && + console.log("Hinting error in PREP:" + u), + (this._errorState = 2); + } + } + if (!(this._errorState > 1)) + try { + return Dt(e, r); + } catch (u) { + return ( + this._errorState < 1 && + (console.log("Hinting error:" + u), + console.log( + "Note: further hinting errors are silenced" + )), + void (this._errorState = 1) + ); + } + } + }), + (Dt = function (e, t) { + var n, + r, + i, + a = t.ppem / t.font.unitsPerEm, + o = a, + s = e.components; + if ((($t.prototype = t), s)) { + var l = t.font; + (r = []), (n = []); + for (var u = 0; u < s.length; u++) { + var c = s[u], + f = l.glyphs.get(c.glyphIndex); + (i = new $t("glyf", f.instructions)), + exports.DEBUG && + (console.log("---EXEC COMP " + u + "---"), + (i.step = -1)), + Ut(f, i, a, o); + for ( + var d = Math.round(c.dx * a), + h = Math.round(c.dy * o), + p = i.gZone, + v = i.contours, + m = 0; + m < p.length; + m++ + ) { + var g = p[m]; + (g.xTouched = g.yTouched = !1), + (g.xo = g.x = g.x + d), + (g.yo = g.y = g.y + h); + } + var A = r.length; + r.push.apply(r, p); + for (var y = 0; y < v.length; y++) n.push(v[y] + A); + } + e.instructions && + !i.inhibitGridFit && + (((i = new $t("glyf", e.instructions)).gZone = + i.z0 = + i.z1 = + i.z2 = + r), + (i.contours = n), + r.push( + new qt(0, 0), + new qt(Math.round(e.advanceWidth * a), 0) + ), + exports.DEBUG && + (console.log("---EXEC COMPOSITE---"), (i.step = -1)), + Lt(i), + (r.length -= 2)); + } else + (i = new $t("glyf", e.instructions)), + exports.DEBUG && + (console.log("---EXEC GLYPH---"), (i.step = -1)), + Ut(e, i, a, o), + (r = i.gZone); + return r; + }), + (Ut = function (e, t, n, r) { + for ( + var i, + a, + o, + s = e.points || [], + l = s.length, + u = (t.gZone = t.z0 = t.z1 = t.z2 = []), + c = (t.contours = []), + f = 0; + f < l; + f++ + ) + (i = s[f]), + (u[f] = new qt( + i.x * n, + i.y * r, + i.lastPointOfContour, + i.onCurve + )); + for (var d = 0; d < l; d++) + (i = u[d]), + a || ((a = i), c.push(d)), + i.lastPointOfContour + ? ((i.nextPointOnContour = a), + (a.prevPointOnContour = i), + (a = void 0)) + : ((o = u[d + 1]), + (i.nextPointOnContour = o), + (o.prevPointOnContour = i)); + if (!t.inhibitGridFit) { + if (exports.DEBUG) { + console.log("PROCESSING GLYPH", t.stack); + for (var h = 0; h < l; h++) console.log(h, u[h].x, u[h].y); + } + if ( + (u.push( + new qt(0, 0), + new qt(Math.round(e.advanceWidth * n), 0) + ), + Lt(t), + (u.length -= 2), + exports.DEBUG) + ) { + console.log("FINISHED GLYPH", t.stack); + for (var p = 0; p < l; p++) console.log(p, u[p].x, u[p].y); + } + } + }), + (Lt = function (e) { + var t = e.prog; + if (t) { + var n, + r = t.length; + for (e.ip = 0; e.ip < r; e.ip++) { + if ((exports.DEBUG && e.step++, !(n = Pt[t[e.ip]]))) + throw new Error( + "unknown instruction: 0x" + Number(t[e.ip]).toString(16) + ); + n(e); + } + } + }), + (Pt = [ + nn.bind(void 0, Wt), + nn.bind(void 0, jt), + rn.bind(void 0, Wt), + rn.bind(void 0, jt), + an.bind(void 0, Wt), + an.bind(void 0, jt), + on.bind(void 0, 0), + on.bind(void 0, 1), + sn.bind(void 0, 0), + sn.bind(void 0, 1), + function (e) { + var t = e.stack, + n = t.pop(), + r = t.pop(); + exports.DEBUG && console.log(e.step, "SPVFS[]", n, r), + (e.pv = e.dpv = Yt(r, n)); + }, + function (e) { + var t = e.stack, + n = t.pop(), + r = t.pop(); + exports.DEBUG && console.log(e.step, "SPVFS[]", n, r), + (e.fv = Yt(r, n)); + }, + function (e) { + var t = e.stack, + n = e.pv; + exports.DEBUG && console.log(e.step, "GPV[]"), + t.push(16384 * n.x), + t.push(16384 * n.y); + }, + function (e) { + var t = e.stack, + n = e.fv; + exports.DEBUG && console.log(e.step, "GFV[]"), + t.push(16384 * n.x), + t.push(16384 * n.y); + }, + function (e) { + (e.fv = e.pv), + exports.DEBUG && console.log(e.step, "SFVTPV[]"); + }, + function (e) { + var t = e.stack, + n = t.pop(), + r = t.pop(), + i = t.pop(), + a = t.pop(), + o = t.pop(), + s = e.z0, + l = e.z1, + u = s[n], + c = s[r], + f = l[i], + d = l[a], + h = e.z2[o]; + exports.DEBUG && console.log("ISECT[], ", n, r, i, a, o); + var p = u.x, + v = u.y, + m = c.x, + g = c.y, + A = f.x, + y = f.y, + b = d.x, + x = d.y, + S = (p - m) * (y - x) - (v - g) * (A - b), + E = p * g - v * m, + _ = A * x - y * b; + (h.x = (E * (A - b) - _ * (p - m)) / S), + (h.y = (E * (y - x) - _ * (v - g)) / S); + }, + function (e) { + (e.rp0 = e.stack.pop()), + exports.DEBUG && console.log(e.step, "SRP0[]", e.rp0); + }, + function (e) { + (e.rp1 = e.stack.pop()), + exports.DEBUG && console.log(e.step, "SRP1[]", e.rp1); + }, + function (e) { + (e.rp2 = e.stack.pop()), + exports.DEBUG && console.log(e.step, "SRP2[]", e.rp2); + }, + function (e) { + var t = e.stack.pop(); + switch ( + (exports.DEBUG && console.log(e.step, "SZP0[]", t), + (e.zp0 = t), + t) + ) { + case 0: + e.tZone || en(e), (e.z0 = e.tZone); + break; + case 1: + e.z0 = e.gZone; + break; + default: + throw new Error("Invalid zone pointer"); + } + }, + function (e) { + var t = e.stack.pop(); + switch ( + (exports.DEBUG && console.log(e.step, "SZP1[]", t), + (e.zp1 = t), + t) + ) { + case 0: + e.tZone || en(e), (e.z1 = e.tZone); + break; + case 1: + e.z1 = e.gZone; + break; + default: + throw new Error("Invalid zone pointer"); + } + }, + function (e) { + var t = e.stack.pop(); + switch ( + (exports.DEBUG && console.log(e.step, "SZP2[]", t), + (e.zp2 = t), + t) + ) { + case 0: + e.tZone || en(e), (e.z2 = e.tZone); + break; + case 1: + e.z2 = e.gZone; + break; + default: + throw new Error("Invalid zone pointer"); + } + }, + function (e) { + var t = e.stack.pop(); + switch ( + (exports.DEBUG && console.log(e.step, "SZPS[]", t), + (e.zp0 = e.zp1 = e.zp2 = t), + t) + ) { + case 0: + e.tZone || en(e), (e.z0 = e.z1 = e.z2 = e.tZone); + break; + case 1: + e.z0 = e.z1 = e.z2 = e.gZone; + break; + default: + throw new Error("Invalid zone pointer"); + } + }, + function (e) { + (e.loop = e.stack.pop()), + exports.DEBUG && console.log(e.step, "SLOOP[]", e.loop); + }, + function (e) { + exports.DEBUG && console.log(e.step, "RTG[]"), (e.round = Gt); + }, + function (e) { + exports.DEBUG && console.log(e.step, "RTHG[]"), + (e.round = zt); + }, + function (e) { + var t = e.stack.pop(); + exports.DEBUG && console.log(e.step, "SMD[]", t), + (e.minDis = t / 64); + }, + function (e) { + exports.DEBUG && console.log(e.step, "ELSE[]"), tn(e, !1); + }, + function (e) { + var t = e.stack.pop(); + exports.DEBUG && console.log(e.step, "JMPR[]", t), + (e.ip += t - 1); + }, + function (e) { + var t = e.stack.pop(); + exports.DEBUG && console.log(e.step, "SCVTCI[]", t), + (e.cvCutIn = t / 64); + }, + void 0, + void 0, + function (e) { + var t = e.stack; + exports.DEBUG && console.log(e.step, "DUP[]"), + t.push(t[t.length - 1]); + }, + ln, + function (e) { + exports.DEBUG && console.log(e.step, "CLEAR[]"), + (e.stack.length = 0); + }, + function (e) { + var t = e.stack, + n = t.pop(), + r = t.pop(); + exports.DEBUG && console.log(e.step, "SWAP[]"), + t.push(n), + t.push(r); + }, + function (e) { + var t = e.stack; + exports.DEBUG && console.log(e.step, "DEPTH[]"), + t.push(t.length); + }, + function (e) { + var t = e.stack, + n = t.pop(); + exports.DEBUG && console.log(e.step, "CINDEX[]", n), + t.push(t[t.length - n]); + }, + function (e) { + var t = e.stack, + n = t.pop(); + exports.DEBUG && console.log(e.step, "MINDEX[]", n), + t.push(t.splice(t.length - n, 1)[0]); + }, + void 0, + void 0, + void 0, + function (e) { + var t = e.stack, + n = t.pop(), + r = t.pop(); + exports.DEBUG && console.log(e.step, "LOOPCALL[]", n, r); + var i = e.ip, + a = e.prog; + e.prog = e.funcs[n]; + for (var o = 0; o < r; o++) + Lt(e), + exports.DEBUG && + console.log( + ++e.step, + o + 1 < r ? "next loopcall" : "done loopcall", + o + ); + (e.ip = i), (e.prog = a); + }, + function (e) { + var t = e.stack.pop(); + exports.DEBUG && console.log(e.step, "CALL[]", t); + var n = e.ip, + r = e.prog; + (e.prog = e.funcs[t]), + Lt(e), + (e.ip = n), + (e.prog = r), + exports.DEBUG && console.log(++e.step, "returning from", t); + }, + function (e) { + if ("fpgm" !== e.env) + throw new Error("FDEF not allowed here"); + var t = e.stack, + n = e.prog, + r = e.ip, + i = t.pop(), + a = r; + for ( + exports.DEBUG && console.log(e.step, "FDEF[]", i); + 45 !== n[++r]; + + ); + (e.ip = r), (e.funcs[i] = n.slice(a + 1, r)); + }, + void 0, + un.bind(void 0, 0), + un.bind(void 0, 1), + cn.bind(void 0, Wt), + cn.bind(void 0, jt), + fn.bind(void 0, 0), + fn.bind(void 0, 1), + dn.bind(void 0, 0), + dn.bind(void 0, 1), + hn.bind(void 0, 0), + hn.bind(void 0, 1), + function (e) { + for ( + var t = e.stack, + n = e.loop, + r = e.fv, + i = t.pop() / 64, + a = e.z2; + n--; + + ) { + var o = t.pop(), + s = a[o]; + exports.DEBUG && + console.log( + e.step, + (e.loop > 1 ? "loop " + (e.loop - n) + ": " : "") + + "SHPIX[]", + o, + i + ), + r.setRelative(s, s, i), + r.touch(s); + } + e.loop = 1; + }, + function (e) { + for ( + var t = e.stack, + n = e.rp1, + r = e.rp2, + i = e.loop, + a = e.z0[n], + o = e.z1[r], + s = e.fv, + l = e.dpv, + u = e.z2; + i--; + + ) { + var c = t.pop(), + f = u[c]; + exports.DEBUG && + console.log( + e.step, + (e.loop > 1 ? "loop " + (e.loop - i) + ": " : "") + + "IP[]", + c, + n, + "<->", + r + ), + s.interpolate(f, a, o, l), + s.touch(f); + } + e.loop = 1; + }, + pn.bind(void 0, 0), + pn.bind(void 0, 1), + function (e) { + for ( + var t = e.stack, + n = e.rp0, + r = e.z0[n], + i = e.loop, + a = e.fv, + o = e.pv, + s = e.z1; + i--; + + ) { + var l = t.pop(), + u = s[l]; + exports.DEBUG && + console.log( + e.step, + (e.loop > 1 ? "loop " + (e.loop - i) + ": " : "") + + "ALIGNRP[]", + l + ), + a.setRelative(u, r, 0, o), + a.touch(u); + } + e.loop = 1; + }, + function (e) { + exports.DEBUG && console.log(e.step, "RTDG[]"), + (e.round = Zt); + }, + vn.bind(void 0, 0), + vn.bind(void 0, 1), + function (e) { + var t = e.prog, + n = e.ip, + r = e.stack, + i = t[++n]; + exports.DEBUG && console.log(e.step, "NPUSHB[]", i); + for (var a = 0; a < i; a++) r.push(t[++n]); + e.ip = n; + }, + function (e) { + var t = e.ip, + n = e.prog, + r = e.stack, + i = n[++t]; + exports.DEBUG && console.log(e.step, "NPUSHW[]", i); + for (var a = 0; a < i; a++) { + var o = (n[++t] << 8) | n[++t]; + 32768 & o && (o = -(1 + (65535 ^ o))), r.push(o); + } + e.ip = t; + }, + function (e) { + var t = e.stack, + n = e.store; + n || (n = e.store = []); + var r = t.pop(), + i = t.pop(); + exports.DEBUG && console.log(e.step, "WS", r, i), (n[i] = r); + }, + function (e) { + var t = e.stack, + n = e.store, + r = t.pop(); + exports.DEBUG && console.log(e.step, "RS", r); + var i = (n && n[r]) || 0; + t.push(i); + }, + function (e) { + var t = e.stack, + n = t.pop(), + r = t.pop(); + exports.DEBUG && console.log(e.step, "WCVTP", n, r), + (e.cvt[r] = n / 64); + }, + function (e) { + var t = e.stack, + n = t.pop(); + exports.DEBUG && console.log(e.step, "RCVT", n), + t.push(64 * e.cvt[n]); + }, + mn.bind(void 0, 0), + mn.bind(void 0, 1), + void 0, + gn.bind(void 0, 0), + gn.bind(void 0, 1), + function (e) { + exports.DEBUG && console.log(e.step, "MPPEM[]"), + e.stack.push(e.ppem); + }, + void 0, + function (e) { + exports.DEBUG && console.log(e.step, "FLIPON[]"), + (e.autoFlip = !0); + }, + void 0, + void 0, + function (e) { + var t = e.stack, + n = t.pop(), + r = t.pop(); + exports.DEBUG && console.log(e.step, "LT[]", n, r), + t.push(r < n ? 1 : 0); + }, + function (e) { + var t = e.stack, + n = t.pop(), + r = t.pop(); + exports.DEBUG && console.log(e.step, "LTEQ[]", n, r), + t.push(r <= n ? 1 : 0); + }, + function (e) { + var t = e.stack, + n = t.pop(), + r = t.pop(); + exports.DEBUG && console.log(e.step, "GT[]", n, r), + t.push(r > n ? 1 : 0); + }, + function (e) { + var t = e.stack, + n = t.pop(), + r = t.pop(); + exports.DEBUG && console.log(e.step, "GTEQ[]", n, r), + t.push(r >= n ? 1 : 0); + }, + function (e) { + var t = e.stack, + n = t.pop(), + r = t.pop(); + exports.DEBUG && console.log(e.step, "EQ[]", n, r), + t.push(n === r ? 1 : 0); + }, + function (e) { + var t = e.stack, + n = t.pop(), + r = t.pop(); + exports.DEBUG && console.log(e.step, "NEQ[]", n, r), + t.push(n !== r ? 1 : 0); + }, + function (e) { + var t = e.stack, + n = t.pop(); + exports.DEBUG && console.log(e.step, "ODD[]", n), + t.push(Math.trunc(n) % 2 ? 1 : 0); + }, + function (e) { + var t = e.stack, + n = t.pop(); + exports.DEBUG && console.log(e.step, "EVEN[]", n), + t.push(Math.trunc(n) % 2 ? 0 : 1); + }, + function (e) { + var t = e.stack.pop(); + exports.DEBUG && console.log(e.step, "IF[]", t), + t || + (tn(e, !0), + exports.DEBUG && console.log(e.step, "EIF[]")); + }, + function (e) { + exports.DEBUG && console.log(e.step, "EIF[]"); + }, + function (e) { + var t = e.stack, + n = t.pop(), + r = t.pop(); + exports.DEBUG && console.log(e.step, "AND[]", n, r), + t.push(n && r ? 1 : 0); + }, + function (e) { + var t = e.stack, + n = t.pop(), + r = t.pop(); + exports.DEBUG && console.log(e.step, "OR[]", n, r), + t.push(n || r ? 1 : 0); + }, + function (e) { + var t = e.stack, + n = t.pop(); + exports.DEBUG && console.log(e.step, "NOT[]", n), + t.push(n ? 0 : 1); + }, + An.bind(void 0, 1), + function (e) { + var t = e.stack.pop(); + exports.DEBUG && console.log(e.step, "SDB[]", t), + (e.deltaBase = t); + }, + function (e) { + var t = e.stack.pop(); + exports.DEBUG && console.log(e.step, "SDS[]", t), + (e.deltaShift = Math.pow(0.5, t)); + }, + function (e) { + var t = e.stack, + n = t.pop(), + r = t.pop(); + exports.DEBUG && console.log(e.step, "ADD[]", n, r), + t.push(r + n); + }, + function (e) { + var t = e.stack, + n = t.pop(), + r = t.pop(); + exports.DEBUG && console.log(e.step, "SUB[]", n, r), + t.push(r - n); + }, + function (e) { + var t = e.stack, + n = t.pop(), + r = t.pop(); + exports.DEBUG && console.log(e.step, "DIV[]", n, r), + t.push((64 * r) / n); + }, + function (e) { + var t = e.stack, + n = t.pop(), + r = t.pop(); + exports.DEBUG && console.log(e.step, "MUL[]", n, r), + t.push((r * n) / 64); + }, + function (e) { + var t = e.stack, + n = t.pop(); + exports.DEBUG && console.log(e.step, "ABS[]", n), + t.push(Math.abs(n)); + }, + function (e) { + var t = e.stack, + n = t.pop(); + exports.DEBUG && console.log(e.step, "NEG[]", n), t.push(-n); + }, + function (e) { + var t = e.stack, + n = t.pop(); + exports.DEBUG && console.log(e.step, "FLOOR[]", n), + t.push(64 * Math.floor(n / 64)); + }, + function (e) { + var t = e.stack, + n = t.pop(); + exports.DEBUG && console.log(e.step, "CEILING[]", n), + t.push(64 * Math.ceil(n / 64)); + }, + yn.bind(void 0, 0), + yn.bind(void 0, 1), + yn.bind(void 0, 2), + yn.bind(void 0, 3), + void 0, + void 0, + void 0, + void 0, + function (e) { + var t = e.stack, + n = t.pop(), + r = t.pop(); + exports.DEBUG && console.log(e.step, "WCVTF[]", n, r), + (e.cvt[r] = (n * e.ppem) / e.font.unitsPerEm); + }, + An.bind(void 0, 2), + An.bind(void 0, 3), + bn.bind(void 0, 1), + bn.bind(void 0, 2), + bn.bind(void 0, 3), + function (e) { + var t, + n = e.stack.pop(); + switch ( + (exports.DEBUG && console.log(e.step, "SROUND[]", n), + (e.round = Vt), + 192 & n) + ) { + case 0: + t = 0.5; + break; + case 64: + t = 1; + break; + case 128: + t = 2; + break; + default: + throw new Error("invalid SROUND value"); + } + switch (((e.srPeriod = t), 48 & n)) { + case 0: + e.srPhase = 0; + break; + case 16: + e.srPhase = 0.25 * t; + break; + case 32: + e.srPhase = 0.5 * t; + break; + case 48: + e.srPhase = 0.75 * t; + break; + default: + throw new Error("invalid SROUND value"); + } + (n &= 15), (e.srThreshold = 0 === n ? 0 : (n / 8 - 0.5) * t); + }, + function (e) { + var t, + n = e.stack.pop(); + switch ( + (exports.DEBUG && console.log(e.step, "S45ROUND[]", n), + (e.round = Vt), + 192 & n) + ) { + case 0: + t = Math.sqrt(2) / 2; + break; + case 64: + t = Math.sqrt(2); + break; + case 128: + t = 2 * Math.sqrt(2); + break; + default: + throw new Error("invalid S45ROUND value"); + } + switch (((e.srPeriod = t), 48 & n)) { + case 0: + e.srPhase = 0; + break; + case 16: + e.srPhase = 0.25 * t; + break; + case 32: + e.srPhase = 0.5 * t; + break; + case 48: + e.srPhase = 0.75 * t; + break; + default: + throw new Error("invalid S45ROUND value"); + } + (n &= 15), (e.srThreshold = 0 === n ? 0 : (n / 8 - 0.5) * t); + }, + void 0, + void 0, + function (e) { + exports.DEBUG && console.log(e.step, "ROFF[]"), + (e.round = Nt); + }, + void 0, + function (e) { + exports.DEBUG && console.log(e.step, "RUTG[]"), + (e.round = Qt); + }, + function (e) { + exports.DEBUG && console.log(e.step, "RDTG[]"), + (e.round = Ht); + }, + ln, + ln, + void 0, + void 0, + void 0, + void 0, + void 0, + function (e) { + var t = e.stack.pop(); + exports.DEBUG && console.log(e.step, "SCANCTRL[]", t); + }, + xn.bind(void 0, 0), + xn.bind(void 0, 1), + function (e) { + var t = e.stack, + n = t.pop(), + r = 0; + exports.DEBUG && console.log(e.step, "GETINFO[]", n), + 1 & n && (r = 35), + 32 & n && (r |= 4096), + t.push(r); + }, + void 0, + function (e) { + var t = e.stack, + n = t.pop(), + r = t.pop(), + i = t.pop(); + exports.DEBUG && console.log(e.step, "ROLL[]"), + t.push(r), + t.push(n), + t.push(i); + }, + function (e) { + var t = e.stack, + n = t.pop(), + r = t.pop(); + exports.DEBUG && console.log(e.step, "MAX[]", n, r), + t.push(Math.max(r, n)); + }, + function (e) { + var t = e.stack, + n = t.pop(), + r = t.pop(); + exports.DEBUG && console.log(e.step, "MIN[]", n, r), + t.push(Math.min(r, n)); + }, + function (e) { + var t = e.stack.pop(); + exports.DEBUG && console.log(e.step, "SCANTYPE[]", t); + }, + function (e) { + var t = e.stack.pop(), + n = e.stack.pop(); + switch ( + (exports.DEBUG && console.log(e.step, "INSTCTRL[]", t, n), + t) + ) { + case 1: + return void (e.inhibitGridFit = !!n); + case 2: + return void (e.ignoreCvt = !!n); + default: + throw new Error("invalid INSTCTRL[] selector"); + } + }, + void 0, + void 0, + void 0, + void 0, + void 0, + void 0, + void 0, + void 0, + void 0, + void 0, + void 0, + void 0, + void 0, + void 0, + void 0, + void 0, + void 0, + void 0, + void 0, + void 0, + void 0, + void 0, + void 0, + void 0, + void 0, + void 0, + void 0, + void 0, + void 0, + void 0, + void 0, + void 0, + void 0, + Sn.bind(void 0, 1), + Sn.bind(void 0, 2), + Sn.bind(void 0, 3), + Sn.bind(void 0, 4), + Sn.bind(void 0, 5), + Sn.bind(void 0, 6), + Sn.bind(void 0, 7), + Sn.bind(void 0, 8), + En.bind(void 0, 1), + En.bind(void 0, 2), + En.bind(void 0, 3), + En.bind(void 0, 4), + En.bind(void 0, 5), + En.bind(void 0, 6), + En.bind(void 0, 7), + En.bind(void 0, 8), + _n.bind(void 0, 0, 0, 0, 0, 0), + _n.bind(void 0, 0, 0, 0, 0, 1), + _n.bind(void 0, 0, 0, 0, 0, 2), + _n.bind(void 0, 0, 0, 0, 0, 3), + _n.bind(void 0, 0, 0, 0, 1, 0), + _n.bind(void 0, 0, 0, 0, 1, 1), + _n.bind(void 0, 0, 0, 0, 1, 2), + _n.bind(void 0, 0, 0, 0, 1, 3), + _n.bind(void 0, 0, 0, 1, 0, 0), + _n.bind(void 0, 0, 0, 1, 0, 1), + _n.bind(void 0, 0, 0, 1, 0, 2), + _n.bind(void 0, 0, 0, 1, 0, 3), + _n.bind(void 0, 0, 0, 1, 1, 0), + _n.bind(void 0, 0, 0, 1, 1, 1), + _n.bind(void 0, 0, 0, 1, 1, 2), + _n.bind(void 0, 0, 0, 1, 1, 3), + _n.bind(void 0, 0, 1, 0, 0, 0), + _n.bind(void 0, 0, 1, 0, 0, 1), + _n.bind(void 0, 0, 1, 0, 0, 2), + _n.bind(void 0, 0, 1, 0, 0, 3), + _n.bind(void 0, 0, 1, 0, 1, 0), + _n.bind(void 0, 0, 1, 0, 1, 1), + _n.bind(void 0, 0, 1, 0, 1, 2), + _n.bind(void 0, 0, 1, 0, 1, 3), + _n.bind(void 0, 0, 1, 1, 0, 0), + _n.bind(void 0, 0, 1, 1, 0, 1), + _n.bind(void 0, 0, 1, 1, 0, 2), + _n.bind(void 0, 0, 1, 1, 0, 3), + _n.bind(void 0, 0, 1, 1, 1, 0), + _n.bind(void 0, 0, 1, 1, 1, 1), + _n.bind(void 0, 0, 1, 1, 1, 2), + _n.bind(void 0, 0, 1, 1, 1, 3), + _n.bind(void 0, 1, 0, 0, 0, 0), + _n.bind(void 0, 1, 0, 0, 0, 1), + _n.bind(void 0, 1, 0, 0, 0, 2), + _n.bind(void 0, 1, 0, 0, 0, 3), + _n.bind(void 0, 1, 0, 0, 1, 0), + _n.bind(void 0, 1, 0, 0, 1, 1), + _n.bind(void 0, 1, 0, 0, 1, 2), + _n.bind(void 0, 1, 0, 0, 1, 3), + _n.bind(void 0, 1, 0, 1, 0, 0), + _n.bind(void 0, 1, 0, 1, 0, 1), + _n.bind(void 0, 1, 0, 1, 0, 2), + _n.bind(void 0, 1, 0, 1, 0, 3), + _n.bind(void 0, 1, 0, 1, 1, 0), + _n.bind(void 0, 1, 0, 1, 1, 1), + _n.bind(void 0, 1, 0, 1, 1, 2), + _n.bind(void 0, 1, 0, 1, 1, 3), + _n.bind(void 0, 1, 1, 0, 0, 0), + _n.bind(void 0, 1, 1, 0, 0, 1), + _n.bind(void 0, 1, 1, 0, 0, 2), + _n.bind(void 0, 1, 1, 0, 0, 3), + _n.bind(void 0, 1, 1, 0, 1, 0), + _n.bind(void 0, 1, 1, 0, 1, 1), + _n.bind(void 0, 1, 1, 0, 1, 2), + _n.bind(void 0, 1, 1, 0, 1, 3), + _n.bind(void 0, 1, 1, 1, 0, 0), + _n.bind(void 0, 1, 1, 1, 0, 1), + _n.bind(void 0, 1, 1, 1, 0, 2), + _n.bind(void 0, 1, 1, 1, 0, 3), + _n.bind(void 0, 1, 1, 1, 1, 0), + _n.bind(void 0, 1, 1, 1, 1, 1), + _n.bind(void 0, 1, 1, 1, 1, 2), + _n.bind(void 0, 1, 1, 1, 1, 3), + ]), + (Cn.prototype.setState = function (e, t) { + return ( + (this.state[e] = t), + (this.activeState = { key: e, value: this.state[e] }), + this.activeState + ); + }), + (Cn.prototype.getState = function (e) { + return this.state[e] || null; + }), + (Rn.prototype.inboundIndex = function (e) { + return e >= 0 && e < this.tokens.length; + }), + (Rn.prototype.composeRUD = function (e) { + var t = this, + n = e.map(function (e) { + return t[e[0]].apply(t, e.slice(1).concat(true)); + }), + r = function (e) { + return "object" === typeof e && e.hasOwnProperty("FAIL"); + }; + if (n.every(r)) + return { + FAIL: "composeRUD: one or more operations hasn't completed successfully", + report: n.filter(r), + }; + this.dispatch("composeRUD", [ + n.filter(function (e) { + return !r(e); + }), + ]); + }), + (Rn.prototype.replaceRange = function (e, t, n, r) { + t = null !== t ? t : this.tokens.length; + var i = n.every(function (e) { + return e instanceof Cn; + }); + if (!isNaN(e) && this.inboundIndex(e) && i) { + var a = this.tokens.splice.apply( + this.tokens, + [e, t].concat(n) + ); + return r || this.dispatch("replaceToken", [e, t, n]), [a, n]; + } + return { FAIL: "replaceRange: invalid tokens or startIndex." }; + }), + (Rn.prototype.replaceToken = function (e, t, n) { + if (!isNaN(e) && this.inboundIndex(e) && t instanceof Cn) { + var r = this.tokens.splice(e, 1, t); + return n || this.dispatch("replaceToken", [e, t]), [r[0], t]; + } + return { FAIL: "replaceToken: invalid token or index." }; + }), + (Rn.prototype.removeRange = function (e, t, n) { + t = isNaN(t) ? this.tokens.length : t; + var r = this.tokens.splice(e, t); + return n || this.dispatch("removeRange", [r, e, t]), r; + }), + (Rn.prototype.removeToken = function (e, t) { + if (!isNaN(e) && this.inboundIndex(e)) { + var n = this.tokens.splice(e, 1); + return t || this.dispatch("removeToken", [n, e]), n; + } + return { FAIL: "removeToken: invalid token index." }; + }), + (Rn.prototype.insertToken = function (e, t, n) { + return e.every(function (e) { + return e instanceof Cn; + }) + ? (this.tokens.splice.apply(this.tokens, [t, 0].concat(e)), + n || this.dispatch("insertToken", [e, t]), + e) + : { FAIL: "insertToken: invalid token(s)." }; + }), + (Rn.prototype.registerModifier = function (e, t, n) { + this.events.newToken.subscribe(function (r, i) { + var a = [r, i], + o = [r, i]; + if (null === t || !0 === t.apply(this, a)) { + var s = n.apply(this, o); + r.setState(e, s); + } + }), + this.registeredModifiers.push(e); + }), + (In.prototype.subscribe = function (e) { + return "function" === typeof e + ? this.subscribers.push(e) - 1 + : { FAIL: "invalid '" + this.eventId + "' event handler" }; + }), + (In.prototype.unsubscribe = function (e) { + this.subscribers.splice(e, 1); + }), + (Mn.prototype.setCurrentIndex = function (e) { + (this.index = e), + (this.current = this.context[e]), + (this.backtrack = this.context.slice(0, e)), + (this.lookahead = this.context.slice(e + 1)); + }), + (Mn.prototype.get = function (e) { + switch (!0) { + case 0 === e: + return this.current; + case e < 0 && Math.abs(e) <= this.backtrack.length: + return this.backtrack.slice(e)[0]; + case e > 0 && e <= this.lookahead.length: + return this.lookahead[e - 1]; + default: + return null; + } + }), + (Rn.prototype.rangeToText = function (e) { + if (e instanceof wn) + return this.getRangeTokens(e) + .map(function (e) { + return e.char; + }) + .join(""); + }), + (Rn.prototype.getText = function () { + return this.tokens + .map(function (e) { + return e.char; + }) + .join(""); + }), + (Rn.prototype.getContext = function (e) { + var t = this.registeredContexts[e]; + return t || null; + }), + (Rn.prototype.on = function (e, t) { + var n = this.events[e]; + return n ? n.subscribe(t) : null; + }), + (Rn.prototype.dispatch = function (e, t) { + var n = this, + r = this.events[e]; + r instanceof In && + r.subscribers.forEach(function (e) { + e.apply(n, t || []); + }); + }), + (Rn.prototype.registerContextChecker = function (e, t, n) { + if (this.getContext(e)) + return { + FAIL: "context name '" + e + "' is already registered.", + }; + if ("function" !== typeof t) + return { FAIL: "missing context start check." }; + if ("function" !== typeof n) + return { FAIL: "missing context end check." }; + var r = new Tn(e, t, n); + return ( + (this.registeredContexts[e] = r), + this.contextCheckers.push(r), + r + ); + }), + (Rn.prototype.getRangeTokens = function (e) { + var t = e.startIndex + e.endOffset; + return [].concat(this.tokens.slice(e.startIndex, t)); + }), + (Rn.prototype.getContextRanges = function (e) { + var t = this.getContext(e); + return t + ? t.ranges + : { FAIL: "context checker '" + e + "' is not registered." }; + }), + (Rn.prototype.resetContextsRanges = function () { + var e = this.registeredContexts; + for (var t in e) { + if (e.hasOwnProperty(t)) e[t].ranges = []; + } + }), + (Rn.prototype.updateContextsRanges = function () { + this.resetContextsRanges(); + for ( + var e = this.tokens.map(function (e) { + return e.char; + }), + t = 0; + t < e.length; + t++ + ) { + var n = new Mn(e, t); + this.runContextCheck(n); + } + this.dispatch("updateContextsRanges", [ + this.registeredContexts, + ]); + }), + (Rn.prototype.setEndOffset = function (e, t) { + var n = new wn(this.getContext(t).openRange.startIndex, e, t), + r = this.getContext(t).ranges; + return ( + (n.rangeId = t + "." + r.length), + r.push(n), + (this.getContext(t).openRange = null), + n + ); + }), + (Rn.prototype.runContextCheck = function (e) { + var t = this, + n = e.index; + this.contextCheckers.forEach(function (r) { + var i = r.contextName, + a = t.getContext(i).openRange; + if ( + (!a && + r.checkStart(e) && + ((a = new wn(n, null, i)), + (t.getContext(i).openRange = a), + t.dispatch("contextStart", [i, n])), + a && r.checkEnd(e)) + ) { + var o = n - a.startIndex + 1, + s = t.setEndOffset(o, i); + t.dispatch("contextEnd", [i, s]); + } + }); + }), + (Rn.prototype.tokenize = function (e) { + (this.tokens = []), this.resetContextsRanges(); + var t = Array.from(e); + this.dispatch("start"); + for (var n = 0; n < t.length; n++) { + var r = t[n], + i = new Mn(t, n); + this.dispatch("next", [i]), this.runContextCheck(i); + var a = new Cn(r); + this.tokens.push(a), this.dispatch("newToken", [a, i]); + } + return this.dispatch("end", [this.tokens]), this.tokens; + }), + (Un.prototype.getDefaultScriptFeaturesIndexes = function () { + for ( + var e = this.font.tables.gsub.scripts, t = 0; + t < e.length; + t++ + ) { + var n = e[t]; + if ("DFLT" === n.tag) + return n.script.defaultLangSys.featureIndexes; + } + return []; + }), + (Un.prototype.getScriptFeaturesIndexes = function (e) { + if (!this.font.tables.gsub) return []; + if (!e) return this.getDefaultScriptFeaturesIndexes(); + for ( + var t = this.font.tables.gsub.scripts, n = 0; + n < t.length; + n++ + ) { + var r = t[n]; + if (r.tag === e && r.script.defaultLangSys) + return r.script.defaultLangSys.featureIndexes; + var i = r.langSysRecords; + if (i) + for (var a = 0; a < i.length; a++) { + var o = i[a]; + if (o.tag === e) return o.langSys.featureIndexes; + } + } + return this.getDefaultScriptFeaturesIndexes(); + }), + (Un.prototype.mapTagsToFeatures = function (e, t) { + for (var n = {}, r = 0; r < e.length; r++) { + var i = e[r].tag, + a = e[r].feature; + n[i] = a; + } + this.features[t].tags = n; + }), + (Un.prototype.getScriptFeatures = function (e) { + var t = this.features[e]; + if (this.features.hasOwnProperty(e)) return t; + var n = this.getScriptFeaturesIndexes(e); + if (!n) return null; + var r = this.font.tables.gsub; + return ( + (t = n.map(function (e) { + return r.features[e]; + })), + (this.features[e] = t), + this.mapTagsToFeatures(t, e), + t + ); + }), + (Un.prototype.getSubstitutionType = function (e, t) { + return e.lookupType.toString() + t.substFormat.toString(); + }), + (Un.prototype.getLookupMethod = function (e, t) { + var n = this; + switch (this.getSubstitutionType(e, t)) { + case "11": + return function (e) { + return Nn.apply(n, [e, t]); + }; + case "12": + return function (e) { + return Gn.apply(n, [e, t]); + }; + case "63": + return function (e) { + return zn.apply(n, [e, t]); + }; + case "41": + return function (e) { + return Qn.apply(n, [e, t]); + }; + case "21": + return function (e) { + return Hn.apply(n, [e, t]); + }; + default: + throw new Error( + "lookupType: " + + e.lookupType + + " - substFormat: " + + t.substFormat + + " is not yet supported" + ); + } + }), + (Un.prototype.lookupFeature = function (e) { + var t = e.contextParams, + n = t.index, + r = this.getFeature({ tag: e.tag, script: e.script }); + if (!r) + return new Error( + "font '" + + this.font.names.fullName.en + + "' doesn't support feature '" + + e.tag + + "' for script '" + + e.script + + "'." + ); + for ( + var i = this.getFeatureLookups(r), + a = [].concat(t.context), + o = 0; + o < i.length; + o++ + ) + for ( + var s = i[o], l = this.getLookupSubtables(s), u = 0; + u < l.length; + u++ + ) { + var c = l[u], + f = this.getSubstitutionType(s, c), + d = this.getLookupMethod(s, c), + h = void 0; + switch (f) { + case "11": + (h = d(t.current)) && + a.splice( + n, + 1, + new Fn({ id: 11, tag: e.tag, substitution: h }) + ); + break; + case "12": + (h = d(t.current)) && + a.splice( + n, + 1, + new Fn({ id: 12, tag: e.tag, substitution: h }) + ); + break; + case "63": + (h = d(t)), + Array.isArray(h) && + h.length && + a.splice( + n, + 1, + new Fn({ id: 63, tag: e.tag, substitution: h }) + ); + break; + case "41": + (h = d(t)) && + a.splice( + n, + 1, + new Fn({ id: 41, tag: e.tag, substitution: h }) + ); + break; + case "21": + (h = d(t.current)) && + a.splice( + n, + 1, + new Fn({ id: 21, tag: e.tag, substitution: h }) + ); + } + (t = new Mn(a, n)), + (Array.isArray(h) && !h.length) || (h = null); + } + return a.length ? a : null; + }), + (Un.prototype.supports = function (e) { + if (!e.script) return !1; + this.getScriptFeatures(e.script); + var t = this.features.hasOwnProperty(e.script); + if (!e.tag) return t; + var n = this.features[e.script].some(function (t) { + return t.tag === e.tag; + }); + return t && n; + }), + (Un.prototype.getLookupSubtables = function (e) { + return e.subtables || null; + }), + (Un.prototype.getLookupByIndex = function (e) { + return this.font.tables.gsub.lookups[e] || null; + }), + (Un.prototype.getFeatureLookups = function (e) { + return e.lookupListIndexes.map( + this.getLookupByIndex.bind(this) + ); + }), + (Un.prototype.getFeature = function (e) { + if (!this.font) return { FAIL: "No font was found" }; + this.features.hasOwnProperty(e.script) || + this.getScriptFeatures(e.script); + var t = this.features[e.script]; + return t + ? t.tags[e.tag] + ? this.features[e.script].tags[e.tag] + : null + : { FAIL: "No feature for script " + e.script }; + }); + var Vn = { + startCheck: function (e) { + var t = e.current, + n = e.get(-1); + return (null === n && Bn(t)) || (!Bn(n) && Bn(t)); + }, + endCheck: function (e) { + var t = e.get(1); + return null === t || !Bn(t); + }, + }; + var jn = { + startCheck: function (e) { + var t = e.current, + n = e.get(-1); + return (Bn(t) || Ln(t)) && !Bn(n); + }, + endCheck: function (e) { + var t = e.get(1); + switch (!0) { + case null === t: + return !0; + case !Bn(t) && !Ln(t): + var n = (function (e) { + return /\s/.test(e); + })(t); + if (!n) return !0; + if (n) { + if ( + !e.lookahead.some(function (e) { + return Bn(e) || Ln(e); + }) + ) + return !0; + } + break; + default: + return !1; + } + }, + }; + var Wn = { + 11: function (e, t, n) { + t[n].setState(e.tag, e.substitution); + }, + 12: function (e, t, n) { + t[n].setState(e.tag, e.substitution); + }, + 63: function (e, t, n) { + e.substitution.forEach(function (r, i) { + t[n + i].setState(e.tag, r); + }); + }, + 41: function (e, t, n) { + var r = t[n]; + r.setState(e.tag, e.substitution.ligGlyph); + for ( + var i = e.substitution.components.length, a = 0; + a < i; + a++ + ) + (r = t[n + a + 1]).setState("deleted", !0); + }, + }; + function Xn(e, t, n) { + e instanceof Fn && Wn[e.id] && Wn[e.id](e, t, n); + } + function Yn(e) { + var t = this, + n = "arab", + r = this.featuresTags[n], + i = this.tokenizer.getRangeTokens(e); + if (1 !== i.length) { + var a = new Mn( + i.map(function (e) { + return e.getState("glyphIndex"); + }), + 0 + ), + o = new Mn( + i.map(function (e) { + return e.char; + }), + 0 + ); + i.forEach(function (e, s) { + if (!Ln(e.char)) { + a.setCurrentIndex(s), o.setCurrentIndex(s); + var l, + u = 0; + switch ( + ((function (e) { + for ( + var t = [].concat(e.backtrack), n = t.length - 1; + n >= 0; + n-- + ) { + var r = t[n], + i = Pn(r), + a = Ln(r); + if (!i && !a) return !0; + if (i) return !1; + } + return !1; + })(o) && (u |= 1), + (function (e) { + if (Pn(e.current)) return !1; + for (var t = 0; t < e.lookahead.length; t++) + if (!Ln(e.lookahead[t])) return !0; + return !1; + })(o) && (u |= 2), + u) + ) { + case 1: + l = "fina"; + break; + case 2: + l = "init"; + break; + case 3: + l = "medi"; + } + if (-1 !== r.indexOf(l)) { + var c = t.query.lookupFeature({ + tag: l, + script: n, + contextParams: a, + }); + if (c instanceof Error) return console.info(c.message); + c.forEach(function (e, t) { + e instanceof Fn && + (Xn(e, i, t), (a.context[t] = e.substitution)); + }); + } + } + }); + } + } + function qn(e, t) { + return new Mn( + e.map(function (e) { + return e.activeState.value; + }), + t || 0 + ); + } + function Jn(e) { + var t = this, + n = this.tokenizer.getRangeTokens(e), + r = qn(n); + r.context.forEach(function (e, i) { + r.setCurrentIndex(i); + var a = t.query.lookupFeature({ + tag: "rlig", + script: "arab", + contextParams: r, + }); + a.length && + (a.forEach(function (e) { + return Xn(e, n, i); + }), + (r = qn(n))); + }); + } + var Kn = { + startCheck: function (e) { + var t = e.current, + n = e.get(-1); + return (null === n && Dn(t)) || (!Dn(n) && Dn(t)); + }, + endCheck: function (e) { + var t = e.get(1); + return null === t || !Dn(t); + }, + }; + function $n(e, t) { + return new Mn( + e.map(function (e) { + return e.activeState.value; + }), + t || 0 + ); + } + function er(e) { + var t = this, + n = this.tokenizer.getRangeTokens(e), + r = $n(n); + r.context.forEach(function (e, i) { + r.setCurrentIndex(i); + var a = t.query.lookupFeature({ + tag: "liga", + script: "latn", + contextParams: r, + }); + a.length && + (a.forEach(function (e) { + return Xn(e, n, i); + }), + (r = $n(n))); + }); + } + function tr(e) { + (this.baseDir = e || "ltr"), + (this.tokenizer = new Rn()), + (this.featuresTags = {}); + } + function nr(e) { + var t = this.contextChecks[e + "Check"]; + return this.tokenizer.registerContextChecker( + e, + t.startCheck, + t.endCheck + ); + } + function rr() { + return ( + nr.call(this, "latinWord"), + nr.call(this, "arabicWord"), + nr.call(this, "arabicSentence"), + this.tokenizer.tokenize(this.text) + ); + } + function ir() { + var e = this; + this.tokenizer + .getContextRanges("arabicSentence") + .forEach(function (t) { + var n = e.tokenizer.getRangeTokens(t); + e.tokenizer.replaceRange( + t.startIndex, + t.endOffset, + n.reverse() + ); + }); + } + function ar() { + if ( + -1 === this.tokenizer.registeredModifiers.indexOf("glyphIndex") + ) + throw new Error( + "glyphIndex modifier is required to apply arabic presentation features." + ); + } + function or() { + var e = this; + this.featuresTags.hasOwnProperty("arab") && + (ar.call(this), + this.tokenizer + .getContextRanges("arabicWord") + .forEach(function (t) { + Yn.call(e, t); + })); + } + function sr() { + var e = this, + t = "arab"; + this.featuresTags.hasOwnProperty(t) && + -1 !== this.featuresTags[t].indexOf("rlig") && + (ar.call(this), + this.tokenizer + .getContextRanges("arabicWord") + .forEach(function (t) { + Jn.call(e, t); + })); + } + function lr() { + var e = this, + t = "latn"; + this.featuresTags.hasOwnProperty(t) && + -1 !== this.featuresTags[t].indexOf("liga") && + (ar.call(this), + this.tokenizer + .getContextRanges("latinWord") + .forEach(function (t) { + er.call(e, t); + })); + } + function ur(e) { + ((e = e || {}).tables = e.tables || {}), + e.empty || + (Tt( + e.familyName, + "When creating a new Font object, familyName is required." + ), + Tt( + e.styleName, + "When creating a new Font object, styleName is required." + ), + Tt( + e.unitsPerEm, + "When creating a new Font object, unitsPerEm is required." + ), + Tt( + e.ascender, + "When creating a new Font object, ascender is required." + ), + Tt( + e.descender <= 0, + "When creating a new Font object, negative descender value is required." + ), + (this.names = { + fontFamily: { en: e.familyName || " " }, + fontSubfamily: { en: e.styleName || " " }, + fullName: { + en: e.fullName || e.familyName + " " + e.styleName, + }, + postScriptName: { + en: + e.postScriptName || + (e.familyName + e.styleName).replace(/\s/g, ""), + }, + designer: { en: e.designer || " " }, + designerURL: { en: e.designerURL || " " }, + manufacturer: { en: e.manufacturer || " " }, + manufacturerURL: { en: e.manufacturerURL || " " }, + license: { en: e.license || " " }, + licenseURL: { en: e.licenseURL || " " }, + version: { en: e.version || "Version 0.1" }, + description: { en: e.description || " " }, + copyright: { en: e.copyright || " " }, + trademark: { en: e.trademark || " " }, + }), + (this.unitsPerEm = e.unitsPerEm || 1e3), + (this.ascender = e.ascender), + (this.descender = e.descender), + (this.createdTimestamp = e.createdTimestamp), + (this.tables = Object.assign(e.tables, { + os2: Object.assign( + { + usWeightClass: + e.weightClass || this.usWeightClasses.MEDIUM, + usWidthClass: + e.widthClass || this.usWidthClasses.MEDIUM, + fsSelection: + e.fsSelection || this.fsSelectionValues.REGULAR, + }, + e.tables.os2 + ), + }))), + (this.supported = !0), + (this.glyphs = new be.GlyphSet(this, e.glyphs || [])), + (this.encoding = new fe(this)), + (this.position = new Et(this)), + (this.substitution = new _t(this)), + (this.tables = this.tables || {}), + (this._push = null), + (this._hmtxTableData = {}), + Object.defineProperty(this, "hinting", { + get: function () { + return this._hinting + ? this._hinting + : "truetype" === this.outlinesFormat + ? (this._hinting = new Ot(this)) + : void 0; + }, + }); + } + function cr(e, t) { + var n = JSON.stringify(e), + r = 256; + for (var i in t) { + var a = parseInt(i); + if (a && !(a < 256)) { + if (JSON.stringify(t[i]) === n) return a; + r <= a && (r = a + 1); + } + } + return (t[r] = e), r; + } + function fr(e, t, n) { + var r = cr(t.name, n); + return [ + { name: "tag_" + e, type: "TAG", value: t.tag }, + { + name: "minValue_" + e, + type: "FIXED", + value: t.minValue << 16, + }, + { + name: "defaultValue_" + e, + type: "FIXED", + value: t.defaultValue << 16, + }, + { + name: "maxValue_" + e, + type: "FIXED", + value: t.maxValue << 16, + }, + { name: "flags_" + e, type: "USHORT", value: 0 }, + { name: "nameID_" + e, type: "USHORT", value: r }, + ]; + } + function dr(e, t, n) { + var r = {}, + i = new ie.Parser(e, t); + return ( + (r.tag = i.parseTag()), + (r.minValue = i.parseFixed()), + (r.defaultValue = i.parseFixed()), + (r.maxValue = i.parseFixed()), + i.skip("uShort", 1), + (r.name = n[i.parseUShort()] || {}), + r + ); + } + function hr(e, t, n, r) { + for ( + var i = [ + { + name: "nameID_" + e, + type: "USHORT", + value: cr(t.name, r), + }, + { name: "flags_" + e, type: "USHORT", value: 0 }, + ], + a = 0; + a < n.length; + ++a + ) { + var o = n[a].tag; + i.push({ + name: "axis_" + e + " " + o, + type: "FIXED", + value: t.coordinates[o] << 16, + }); + } + return i; + } + function pr(e, t, n, r) { + var i = {}, + a = new ie.Parser(e, t); + (i.name = r[a.parseUShort()] || {}), + a.skip("uShort", 1), + (i.coordinates = {}); + for (var o = 0; o < n.length; ++o) + i.coordinates[n[o].tag] = a.parseFixed(); + return i; + } + (tr.prototype.setText = function (e) { + this.text = e; + }), + (tr.prototype.contextChecks = { + latinWordCheck: Kn, + arabicWordCheck: Vn, + arabicSentenceCheck: jn, + }), + (tr.prototype.registerFeatures = function (e, t) { + var n = this, + r = t.filter(function (t) { + return n.query.supports({ script: e, tag: t }); + }); + this.featuresTags.hasOwnProperty(e) + ? (this.featuresTags[e] = this.featuresTags[e].concat(r)) + : (this.featuresTags[e] = r); + }), + (tr.prototype.applyFeatures = function (e, t) { + if (!e) + throw new Error( + "No valid font was provided to apply features" + ); + this.query || (this.query = new Un(e)); + for (var n = 0; n < t.length; n++) { + var r = t[n]; + this.query.supports({ script: r.script }) && + this.registerFeatures(r.script, r.tags); + } + }), + (tr.prototype.registerModifier = function (e, t, n) { + this.tokenizer.registerModifier(e, t, n); + }), + (tr.prototype.checkContextReady = function (e) { + return !!this.tokenizer.getContext(e); + }), + (tr.prototype.applyFeaturesToContexts = function () { + this.checkContextReady("arabicWord") && + (or.call(this), sr.call(this)), + this.checkContextReady("latinWord") && lr.call(this), + this.checkContextReady("arabicSentence") && ir.call(this); + }), + (tr.prototype.processText = function (e) { + (this.text && this.text === e) || + (this.setText(e), + rr.call(this), + this.applyFeaturesToContexts()); + }), + (tr.prototype.getBidiText = function (e) { + return this.processText(e), this.tokenizer.getText(); + }), + (tr.prototype.getTextGlyphs = function (e) { + this.processText(e); + for (var t = [], n = 0; n < this.tokenizer.tokens.length; n++) { + var r = this.tokenizer.tokens[n]; + if (!r.state.deleted) { + var i = r.activeState.value; + t.push(Array.isArray(i) ? i[0] : i); + } + } + return t; + }), + (ur.prototype.hasChar = function (e) { + return null !== this.encoding.charToGlyphIndex(e); + }), + (ur.prototype.charToGlyphIndex = function (e) { + return this.encoding.charToGlyphIndex(e); + }), + (ur.prototype.charToGlyph = function (e) { + var t = this.charToGlyphIndex(e), + n = this.glyphs.get(t); + return n || (n = this.glyphs.get(0)), n; + }), + (ur.prototype.updateFeatures = function (e) { + return this.defaultRenderOptions.features.map(function (t) { + return "latn" === t.script + ? { + script: "latn", + tags: t.tags.filter(function (t) { + return e[t]; + }), + } + : t; + }); + }), + (ur.prototype.stringToGlyphs = function (e, t) { + var n = this, + r = new tr(); + r.registerModifier("glyphIndex", null, function (e) { + return n.charToGlyphIndex(e.char); + }); + var i = t + ? this.updateFeatures(t.features) + : this.defaultRenderOptions.features; + r.applyFeatures(this, i); + for ( + var a = r.getTextGlyphs(e), + o = a.length, + s = new Array(o), + l = this.glyphs.get(0), + u = 0; + u < o; + u += 1 + ) + s[u] = this.glyphs.get(a[u]) || l; + return s; + }), + (ur.prototype.nameToGlyphIndex = function (e) { + return this.glyphNames.nameToGlyphIndex(e); + }), + (ur.prototype.nameToGlyph = function (e) { + var t = this.nameToGlyphIndex(e), + n = this.glyphs.get(t); + return n || (n = this.glyphs.get(0)), n; + }), + (ur.prototype.glyphIndexToName = function (e) { + return this.glyphNames.glyphIndexToName + ? this.glyphNames.glyphIndexToName(e) + : ""; + }), + (ur.prototype.getKerningValue = function (e, t) { + (e = e.index || e), (t = t.index || t); + var n = this.position.defaultKerningTables; + return n + ? this.position.getKerningValue(n, e, t) + : this.kerningPairs[e + "," + t] || 0; + }), + (ur.prototype.defaultRenderOptions = { + kerning: !0, + features: [ + { script: "arab", tags: ["init", "medi", "fina", "rlig"] }, + { script: "latn", tags: ["liga", "rlig"] }, + ], + }), + (ur.prototype.forEachGlyph = function (e, t, n, r, i, a) { + (t = void 0 !== t ? t : 0), + (n = void 0 !== n ? n : 0), + (r = void 0 !== r ? r : 72), + (i = Object.assign({}, this.defaultRenderOptions, i)); + var o, + s = (1 / this.unitsPerEm) * r, + l = this.stringToGlyphs(e, i); + if (i.kerning) { + var u = i.script || this.position.getDefaultScriptName(); + o = this.position.getKerningTables(u, i.language); + } + for (var c = 0; c < l.length; c += 1) { + var f = l[c]; + if ( + (a.call(this, f, t, n, r, i), + f.advanceWidth && (t += f.advanceWidth * s), + i.kerning && c < l.length - 1) + ) + t += + (o + ? this.position.getKerningValue( + o, + f.index, + l[c + 1].index + ) + : this.getKerningValue(f, l[c + 1])) * s; + i.letterSpacing + ? (t += i.letterSpacing * r) + : i.tracking && (t += (i.tracking / 1e3) * r); + } + return t; + }), + (ur.prototype.getPath = function (e, t, n, r, i) { + var a = new C(); + return ( + this.forEachGlyph(e, t, n, r, i, function (e, t, n, r) { + var o = e.getPath(t, n, r, i, this); + a.extend(o); + }), + a + ); + }), + (ur.prototype.getPaths = function (e, t, n, r, i) { + var a = []; + return ( + this.forEachGlyph(e, t, n, r, i, function (e, t, n, r) { + var o = e.getPath(t, n, r, i, this); + a.push(o); + }), + a + ); + }), + (ur.prototype.getAdvanceWidth = function (e, t, n) { + return this.forEachGlyph(e, 0, 0, t, n, function () {}); + }), + (ur.prototype.draw = function (e, t, n, r, i, a) { + this.getPath(t, n, r, i, a).draw(e); + }), + (ur.prototype.drawPoints = function (e, t, n, r, i, a) { + this.forEachGlyph(t, n, r, i, a, function (t, n, r, i) { + t.drawPoints(e, n, r, i); + }); + }), + (ur.prototype.drawMetrics = function (e, t, n, r, i, a) { + this.forEachGlyph(t, n, r, i, a, function (t, n, r, i) { + t.drawMetrics(e, n, r, i); + }); + }), + (ur.prototype.getEnglishName = function (e) { + var t = this.names[e]; + if (t) return t.en; + }), + (ur.prototype.validate = function () { + var e = this; + function t(t) { + var n = e.getEnglishName(t); + n && n.trim().length; + } + t("fontFamily"), + t("weightName"), + t("manufacturer"), + t("copyright"), + t("version"), + this.unitsPerEm; + }), + (ur.prototype.toTables = function () { + return At.fontToTable(this); + }), + (ur.prototype.toBuffer = function () { + return ( + console.warn( + "Font.toBuffer is deprecated. Use Font.toArrayBuffer instead." + ), + this.toArrayBuffer() + ); + }), + (ur.prototype.toArrayBuffer = function () { + for ( + var e = this.toTables().encode(), + t = new ArrayBuffer(e.length), + n = new Uint8Array(t), + r = 0; + r < e.length; + r++ + ) + n[r] = e[r]; + return t; + }), + (ur.prototype.fsSelectionValues = { + ITALIC: 1, + UNDERSCORE: 2, + NEGATIVE: 4, + OUTLINED: 8, + STRIKEOUT: 16, + BOLD: 32, + REGULAR: 64, + USER_TYPO_METRICS: 128, + WWS: 256, + OBLIQUE: 512, + }), + (ur.prototype.usWidthClasses = { + ULTRA_CONDENSED: 1, + EXTRA_CONDENSED: 2, + CONDENSED: 3, + SEMI_CONDENSED: 4, + MEDIUM: 5, + SEMI_EXPANDED: 6, + EXPANDED: 7, + EXTRA_EXPANDED: 8, + ULTRA_EXPANDED: 9, + }), + (ur.prototype.usWeightClasses = { + THIN: 100, + EXTRA_LIGHT: 200, + LIGHT: 300, + NORMAL: 400, + MEDIUM: 500, + SEMI_BOLD: 600, + BOLD: 700, + EXTRA_BOLD: 800, + BLACK: 900, + }); + var vr = { + make: function (e, t) { + var n = new q.Table("fvar", [ + { name: "version", type: "ULONG", value: 65536 }, + { name: "offsetToData", type: "USHORT", value: 0 }, + { name: "countSizePairs", type: "USHORT", value: 2 }, + { name: "axisCount", type: "USHORT", value: e.axes.length }, + { name: "axisSize", type: "USHORT", value: 20 }, + { + name: "instanceCount", + type: "USHORT", + value: e.instances.length, + }, + { + name: "instanceSize", + type: "USHORT", + value: 4 + 4 * e.axes.length, + }, + ]); + n.offsetToData = n.sizeOf(); + for (var r = 0; r < e.axes.length; r++) + n.fields = n.fields.concat(fr(r, e.axes[r], t)); + for (var i = 0; i < e.instances.length; i++) + n.fields = n.fields.concat( + hr(i, e.instances[i], e.axes, t) + ); + return n; + }, + parse: function (e, t, n) { + var r = new ie.Parser(e, t), + i = r.parseULong(); + M.argument(65536 === i, "Unsupported fvar table version."); + var a = r.parseOffset16(); + r.skip("uShort", 1); + for ( + var o = r.parseUShort(), + s = r.parseUShort(), + l = r.parseUShort(), + u = r.parseUShort(), + c = [], + f = 0; + f < o; + f++ + ) + c.push(dr(e, t + a + f * s, n)); + for (var d = [], h = t + a + o * s, p = 0; p < l; p++) + d.push(pr(e, h + p * u, c, n)); + return { axes: c, instances: d }; + }, + }, + mr = function () { + return { + coverage: this.parsePointer(ne.coverage), + attachPoints: this.parseList(ne.pointer(ne.uShortList)), + }; + }, + gr = function () { + var e = this.parseUShort(); + return ( + M.argument( + 1 === e || 2 === e || 3 === e, + "Unsupported CaretValue table version." + ), + 1 === e + ? { coordinate: this.parseShort() } + : 2 === e + ? { pointindex: this.parseShort() } + : 3 === e + ? { coordinate: this.parseShort() } + : void 0 + ); + }, + Ar = function () { + return this.parseList(ne.pointer(gr)); + }, + yr = function () { + return { + coverage: this.parsePointer(ne.coverage), + ligGlyphs: this.parseList(ne.pointer(Ar)), + }; + }, + br = function () { + return ( + this.parseUShort(), this.parseList(ne.pointer(ne.coverage)) + ); + }; + var xr = { + parse: function (e, t) { + var n = new ne(e, (t = t || 0)), + r = n.parseVersion(1); + M.argument( + 1 === r || 1.2 === r || 1.3 === r, + "Unsupported GDEF table version." + ); + var i = { + version: r, + classDef: n.parsePointer(ne.classDef), + attachList: n.parsePointer(mr), + ligCaretList: n.parsePointer(yr), + markAttachClassDef: n.parsePointer(ne.classDef), + }; + return r >= 1.2 && (i.markGlyphSets = n.parsePointer(br)), i; + }, + }, + Sr = new Array(10); + (Sr[1] = function () { + var e = this.offset + this.relativeOffset, + t = this.parseUShort(); + return 1 === t + ? { + posFormat: 1, + coverage: this.parsePointer(ne.coverage), + value: this.parseValueRecord(), + } + : 2 === t + ? { + posFormat: 2, + coverage: this.parsePointer(ne.coverage), + values: this.parseValueRecordList(), + } + : void M.assert( + !1, + "0x" + + e.toString(16) + + ": GPOS lookup type 1 format must be 1 or 2." + ); + }), + (Sr[2] = function () { + var e = this.offset + this.relativeOffset, + t = this.parseUShort(); + M.assert( + 1 === t || 2 === t, + "0x" + + e.toString(16) + + ": GPOS lookup type 2 format must be 1 or 2." + ); + var n = this.parsePointer(ne.coverage), + r = this.parseUShort(), + i = this.parseUShort(); + if (1 === t) + return { + posFormat: t, + coverage: n, + valueFormat1: r, + valueFormat2: i, + pairSets: this.parseList( + ne.pointer( + ne.list(function () { + return { + secondGlyph: this.parseUShort(), + value1: this.parseValueRecord(r), + value2: this.parseValueRecord(i), + }; + }) + ) + ), + }; + if (2 === t) { + var a = this.parsePointer(ne.classDef), + o = this.parsePointer(ne.classDef), + s = this.parseUShort(), + l = this.parseUShort(); + return { + posFormat: t, + coverage: n, + valueFormat1: r, + valueFormat2: i, + classDef1: a, + classDef2: o, + class1Count: s, + class2Count: l, + classRecords: this.parseList( + s, + ne.list(l, function () { + return { + value1: this.parseValueRecord(r), + value2: this.parseValueRecord(i), + }; + }) + ), + }; + } + }), + (Sr[3] = function () { + return { error: "GPOS Lookup 3 not supported" }; + }), + (Sr[4] = function () { + return { error: "GPOS Lookup 4 not supported" }; + }), + (Sr[5] = function () { + return { error: "GPOS Lookup 5 not supported" }; + }), + (Sr[6] = function () { + return { error: "GPOS Lookup 6 not supported" }; + }), + (Sr[7] = function () { + return { error: "GPOS Lookup 7 not supported" }; + }), + (Sr[8] = function () { + return { error: "GPOS Lookup 8 not supported" }; + }), + (Sr[9] = function () { + return { error: "GPOS Lookup 9 not supported" }; + }); + var Er = new Array(10); + var _r = { + parse: function (e, t) { + var n = new ne(e, (t = t || 0)), + r = n.parseVersion(1); + return ( + M.argument( + 1 === r || 1.1 === r, + "Unsupported GPOS table version " + r + ), + 1 === r + ? { + version: r, + scripts: n.parseScriptList(), + features: n.parseFeatureList(), + lookups: n.parseLookupList(Sr), + } + : { + version: r, + scripts: n.parseScriptList(), + features: n.parseFeatureList(), + lookups: n.parseLookupList(Sr), + variations: n.parseFeatureVariationsList(), + } + ); + }, + make: function (e) { + return new q.Table("GPOS", [ + { name: "version", type: "ULONG", value: 65536 }, + { + name: "scripts", + type: "TABLE", + value: new q.ScriptList(e.scripts), + }, + { + name: "features", + type: "TABLE", + value: new q.FeatureList(e.features), + }, + { + name: "lookups", + type: "TABLE", + value: new q.LookupList(e.lookups, Er), + }, + ]); + }, + }; + var Cr = { + parse: function (e, t) { + var n = new ie.Parser(e, t), + r = n.parseUShort(); + if (0 === r) + return (function (e) { + var t = {}; + e.skip("uShort"); + var n = e.parseUShort(); + M.argument(0 === n, "Unsupported kern sub-table version."), + e.skip("uShort", 2); + var r = e.parseUShort(); + e.skip("uShort", 3); + for (var i = 0; i < r; i += 1) { + var a = e.parseUShort(), + o = e.parseUShort(), + s = e.parseShort(); + t[a + "," + o] = s; + } + return t; + })(n); + if (1 === r) + return (function (e) { + var t = {}; + e.skip("uShort"), + e.parseULong() > 1 && + console.warn( + "Only the first kern subtable is supported." + ), + e.skip("uLong"); + var n = 255 & e.parseUShort(); + if ((e.skip("uShort"), 0 === n)) { + var r = e.parseUShort(); + e.skip("uShort", 3); + for (var i = 0; i < r; i += 1) { + var a = e.parseUShort(), + o = e.parseUShort(), + s = e.parseShort(); + t[a + "," + o] = s; + } + } + return t; + })(n); + throw new Error("Unsupported kern table version (" + r + ")."); + }, + }; + var wr = { + parse: function (e, t, n, r) { + for ( + var i = new ie.Parser(e, t), + a = r ? i.parseUShort : i.parseULong, + o = [], + s = 0; + s < n + 1; + s += 1 + ) { + var l = a.call(i); + r && (l *= 2), o.push(l); + } + return o; + }, + }; + function Tr(e, t) { + for (var n = [], r = 12, i = 0; i < t; i += 1) { + var a = ie.getTag(e, r), + o = ie.getULong(e, r + 4), + s = ie.getULong(e, r + 8), + l = ie.getULong(e, r + 12); + n.push({ + tag: a, + checksum: o, + offset: s, + length: l, + compression: !1, + }), + (r += 16); + } + return n; + } + function Mr(e, t) { + if ("WOFF" === t.compression) { + var n = new Uint8Array( + e.buffer, + t.offset + 2, + t.compressedLength - 2 + ), + r = new Uint8Array(t.length); + if ((S(n, r), r.byteLength !== t.length)) + throw new Error( + "Decompression error: " + + t.tag + + " decompressed length doesn't match recorded length" + ); + return { data: new DataView(r.buffer, 0), offset: 0 }; + } + return { data: e, offset: t.offset }; + } + return { + parseBuffer: function (e, t) { + var n, r; + t = void 0 === t || null === t ? {} : t; + var i, + a, + o, + s, + l, + u, + c, + f, + d, + h, + p, + v, + m, + g = new ur({ empty: !0 }), + A = new DataView(e, 0), + y = [], + b = ie.getTag(A, 0); + if ( + b === String.fromCharCode(0, 1, 0, 0) || + "true" === b || + "typ1" === b + ) + (g.outlinesFormat = "truetype"), + (y = Tr(A, (i = ie.getUShort(A, 4)))); + else if ("OTTO" === b) + (g.outlinesFormat = "cff"), + (y = Tr(A, (i = ie.getUShort(A, 4)))); + else { + if ("wOFF" !== b) + throw new Error("Unsupported OpenType signature " + b); + var x = ie.getTag(A, 4); + if (x === String.fromCharCode(0, 1, 0, 0)) + g.outlinesFormat = "truetype"; + else { + if ("OTTO" !== x) + throw new Error("Unsupported OpenType flavor " + b); + g.outlinesFormat = "cff"; + } + y = (function (e, t) { + for (var n = [], r = 44, i = 0; i < t; i += 1) { + var a = ie.getTag(e, r), + o = ie.getULong(e, r + 4), + s = ie.getULong(e, r + 8), + l = ie.getULong(e, r + 12), + u = void 0; + (u = s < l && "WOFF"), + n.push({ + tag: a, + offset: o, + compression: u, + compressedLength: s, + length: l, + }), + (r += 20); + } + return n; + })(A, (i = ie.getUShort(A, 12))); + } + for (var S = 0; S < i; S += 1) { + var E = y[S], + _ = void 0; + switch (E.tag) { + case "cmap": + (_ = Mr(A, E)), + (g.tables.cmap = oe.parse(_.data, _.offset)), + (g.encoding = new de(g.tables.cmap)); + break; + case "cvt ": + (_ = Mr(A, E)), + (m = new ie.Parser(_.data, _.offset)), + (g.tables.cvt = m.parseShortList(E.length / 2)); + break; + case "fvar": + o = E; + break; + case "fpgm": + (_ = Mr(A, E)), + (m = new ie.Parser(_.data, _.offset)), + (g.tables.fpgm = m.parseByteList(E.length)); + break; + case "head": + (_ = Mr(A, E)), + (g.tables.head = Ge.parse(_.data, _.offset)), + (g.unitsPerEm = g.tables.head.unitsPerEm), + (n = g.tables.head.indexToLocFormat); + break; + case "hhea": + (_ = Mr(A, E)), + (g.tables.hhea = Ze.parse(_.data, _.offset)), + (g.ascender = g.tables.hhea.ascender), + (g.descender = g.tables.hhea.descender), + (g.numberOfHMetrics = g.tables.hhea.numberOfHMetrics); + break; + case "hmtx": + f = E; + break; + case "ltag": + (_ = Mr(A, E)), (r = Qe.parse(_.data, _.offset)); + break; + case "maxp": + (_ = Mr(A, E)), + (g.tables.maxp = He.parse(_.data, _.offset)), + (g.numGlyphs = g.tables.maxp.numGlyphs); + break; + case "name": + p = E; + break; + case "OS/2": + (_ = Mr(A, E)), + (g.tables.os2 = at.parse(_.data, _.offset)); + break; + case "post": + (_ = Mr(A, E)), + (g.tables.post = ot.parse(_.data, _.offset)), + (g.glyphNames = new pe(g.tables.post)); + break; + case "prep": + (_ = Mr(A, E)), + (m = new ie.Parser(_.data, _.offset)), + (g.tables.prep = m.parseByteList(E.length)); + break; + case "glyf": + s = E; + break; + case "loca": + h = E; + break; + case "CFF ": + a = E; + break; + case "kern": + d = E; + break; + case "GDEF": + l = E; + break; + case "GPOS": + u = E; + break; + case "GSUB": + c = E; + break; + case "meta": + v = E; + } + } + var C = Mr(A, p); + if ( + ((g.tables.name = rt.parse(C.data, C.offset, r)), + (g.names = g.tables.name), + s && h) + ) { + var w = 0 === n, + T = Mr(A, h), + M = wr.parse(T.data, T.offset, g.numGlyphs, w), + I = Mr(A, s); + g.glyphs = Ft.parse(I.data, I.offset, M, g, t); + } else { + if (!a) + throw new Error( + "Font doesn't contain TrueType or CFF outlines." + ); + var k = Mr(A, a); + Ne.parse(k.data, k.offset, g, t); + } + var R = Mr(A, f); + if ( + (ze.parse( + g, + R.data, + R.offset, + g.numberOfHMetrics, + g.numGlyphs, + g.glyphs, + t + ), + ve(g, t), + d) + ) { + var B = Mr(A, d); + g.kerningPairs = Cr.parse(B.data, B.offset); + } else g.kerningPairs = {}; + if (l) { + var P = Mr(A, l); + g.tables.gdef = xr.parse(P.data, P.offset); + } + if (u) { + var L = Mr(A, u); + (g.tables.gpos = _r.parse(L.data, L.offset)), + g.position.init(); + } + if (c) { + var D = Mr(A, c); + g.tables.gsub = ct.parse(D.data, D.offset); + } + if (o) { + var U = Mr(A, o); + g.tables.fvar = vr.parse(U.data, U.offset, g.names); + } + if (v) { + var F = Mr(A, v); + (g.tables.meta = ft.parse(F.data, F.offset)), + (g.metas = g.tables.meta); + } + return g; + }, + }; + })(), + Wf = jf.parseBuffer, + Xf = null, + Yf = null, + qf = null, + Jf = null, + Kf = "colorSpace" in new A.Texture(), + $f = null, + ed = null, + td = null, + nd = null, + rd = null, + id = null, + ad = null; + function od(e) { + var t, + n, + r = e.header, + i = r[12], + a = r[2], + o = r[6], + s = r[7], + l = r[10], + u = r[11]; + switch (a) { + case 0: + (t = 2), (n = RGB_PVRTC_2BPPV1_Format); + break; + case 1: + (t = 2), (n = RGBA_PVRTC_2BPPV1_Format); + break; + case 2: + (t = 4), (n = RGB_PVRTC_4BPPV1_Format); + break; + case 3: + (t = 4), (n = RGBA_PVRTC_4BPPV1_Format); + break; + default: + console.error("THREE.PVRLoader: Unsupported PVR format:", a); + } + return ( + (e.dataPtr = 52 + i), + (e.bpp = t), + (e.format = n), + (e.width = s), + (e.height = o), + (e.numSurfaces = l), + (e.numMipmaps = u), + (e.isCubemap = 6 === l), + ld(e) + ); + } + function sd(e) { + var t, + n, + r = e.header, + i = r[0], + a = r[1], + o = r[2], + s = r[3], + l = r[4], + u = r[10], + c = r[12], + f = 255 & l, + d = u > 0; + return ( + 25 === f + ? ((n = d ? RGBA_PVRTC_4BPPV1_Format : RGB_PVRTC_4BPPV1_Format), + (t = 4)) + : 24 === f + ? ((n = d ? RGBA_PVRTC_2BPPV1_Format : RGB_PVRTC_2BPPV1_Format), + (t = 2)) + : console.error("THREE.PVRLoader: Unknown PVR format:", f), + (e.dataPtr = i), + (e.bpp = t), + (e.format = n), + (e.width = o), + (e.height = a), + (e.numSurfaces = c), + (e.numMipmaps = s + 1), + (e.isCubemap = 6 === c), + ld(e) + ); + } + function ld(e) { + var t, + n = { + mipmaps: [], + width: e.width, + height: e.height, + format: e.format, + mipmapCount: e.numMipmaps, + isCubemap: e.isCubemap, + }, + r = e.buffer, + i = e.dataPtr, + a = 0, + o = 0, + s = 0, + l = 0, + u = 0, + c = e.bpp, + f = e.numSurfaces; + 2 === c ? ((o = 8), (s = 4)) : ((o = 4), (s = 4)), + (t = (o * s * c) / 8), + (n.mipmaps.length = e.numMipmaps * f); + for (var d = 0; d < e.numMipmaps; ) { + var h = e.width >> d, + p = e.height >> d; + (l = h / o) < 2 && (l = 2), + (u = p / s) < 2 && (u = 2), + (a = l * u * t); + for (var v = 0; v < f; v++) { + var m = { data: new Uint8Array(r, i, a), width: h, height: p }; + (n.mipmaps[v * e.numMipmaps + d] = m), (i += a); + } + d++; + } + return n; + } + var ud = null, + cd = new WeakMap(), + fd = (function (e) { + (0, m.Z)(n, e); + var t = (0, g.Z)(n); + function n(e) { + var r; + return ( + (0, p.Z)(this, n), + ((r = t.call(this, e)).transcoderPath = ""), + (r.transcoderBinary = null), + (r.transcoderPending = null), + (r.workerLimit = 4), + (r.workerPool = []), + (r.workerNextTaskID = 1), + (r.workerSourceURL = ""), + (r.workerConfig = null), + r + ); + } + return ( + (0, v.Z)(n, [ + { + key: "setTranscoderPath", + value: function (e) { + return (this.transcoderPath = e), this; + }, + }, + { + key: "setWorkerLimit", + value: function (e) { + return (this.workerLimit = e), this; + }, + }, + { + key: "detectSupport", + value: function (e) { + return ( + (this.workerConfig = { + astcSupported: e.extensions.has( + "WEBGL_compressed_texture_astc" + ), + etc1Supported: e.extensions.has( + "WEBGL_compressed_texture_etc1" + ), + etc2Supported: e.extensions.has( + "WEBGL_compressed_texture_etc" + ), + dxtSupported: e.extensions.has( + "WEBGL_compressed_texture_s3tc" + ), + bptcSupported: e.extensions.has( + "EXT_texture_compression_bptc" + ), + pvrtcSupported: + e.extensions.has("WEBGL_compressed_texture_pvrtc") || + e.extensions.has( + "WEBKIT_WEBGL_compressed_texture_pvrtc" + ), + }), + this + ); + }, + }, + { + key: "load", + value: function (e, t, n, r) { + var i = this, + a = new A.FileLoader(this.manager); + a.setResponseType("arraybuffer"), + a.setWithCredentials(this.withCredentials); + var o = new A.CompressedTexture(); + return ( + a.load( + e, + function (e) { + if (cd.has(e)) + return cd.get(e).promise.then(t).catch(r); + i._createTexture([e]) + .then(function (e) { + o.copy(e), (o.needsUpdate = !0), t && t(o); + }) + .catch(r); + }, + n, + r + ), + o + ); + }, + }, + { + key: "parseInternalAsync", + value: function (e) { + for ( + var t = e.levels, n = new Set(), r = 0; + r < t.length; + r++ + ) + n.add(t[r].data.buffer); + return this._createTexture( + Array.from(n), + (0, s.Z)((0, s.Z)({}, e), {}, { lowLevel: !0 }) + ); + }, + }, + { + key: "_createTexture", + value: function (e) { + for ( + var t, + n, + r = this, + i = + arguments.length > 1 && void 0 !== arguments[1] + ? arguments[1] + : {}, + a = 0, + o = 0; + o < e.length; + o++ + ) + a += e[o].byteLength; + var s = this._allocateWorker(a) + .then(function (a) { + return ( + (t = a), + (n = r.workerNextTaskID++), + new Promise(function (r, a) { + (t._callbacks[n] = { resolve: r, reject: a }), + t.postMessage( + { + type: "transcode", + id: n, + buffers: e, + taskConfig: i, + }, + e + ); + }) + ); + }) + .then(function (e) { + var t = e.mipmaps, + n = e.width, + r = e.height, + i = e.format, + a = new A.CompressedTexture( + t, + n, + r, + i, + A.UnsignedByteType + ); + return ( + (a.minFilter = + 1 === t.length + ? A.LinearFilter + : A.LinearMipmapLinearFilter), + (a.magFilter = A.LinearFilter), + (a.generateMipmaps = !1), + (a.needsUpdate = !0), + a + ); + }); + return ( + s + .catch(function () { + return !0; + }) + .then(function () { + t && + n && + ((t._taskLoad -= a), delete t._callbacks[n]); + }), + cd.set(e[0], { promise: s }), + s + ); + }, + }, + { + key: "_initTranscoder", + value: function () { + var e = this; + if (!this.transcoderPending) { + var t = new A.FileLoader(this.manager); + t.setPath(this.transcoderPath), + t.setWithCredentials(this.withCredentials); + var r = new Promise(function (e, n) { + t.load("basis_transcoder.js", e, void 0, n); + }), + i = new A.FileLoader(this.manager); + i.setPath(this.transcoderPath), + i.setResponseType("arraybuffer"), + i.setWithCredentials(this.withCredentials); + var o = new Promise(function (e, t) { + i.load("basis_transcoder.wasm", e, void 0, t); + }); + this.transcoderPending = Promise.all([r, o]).then( + function (t) { + var r = (0, a.Z)(t, 2), + i = r[0], + o = r[1], + s = n.BasisWorker.toString(), + l = [ + "/* constants */", + "let _EngineFormat = " + + JSON.stringify(n.EngineFormat), + "let _TranscoderFormat = " + + JSON.stringify(n.TranscoderFormat), + "let _BasisFormat = " + + JSON.stringify(n.BasisFormat), + "/* basis_transcoder.js */", + i, + "/* worker */", + s.substring( + s.indexOf("{") + 1, + s.lastIndexOf("}") + ), + ].join("\n"); + (e.workerSourceURL = URL.createObjectURL( + new Blob([l]) + )), + (e.transcoderBinary = o); + } + ); + } + return this.transcoderPending; + }, + }, + { + key: "_allocateWorker", + value: function (e) { + var t = this; + return this._initTranscoder().then(function () { + if (t.workerPool.length < t.workerLimit) { + var n = new Worker(t.workerSourceURL); + (n._callbacks = {}), + (n._taskLoad = 0), + n.postMessage({ + type: "init", + config: t.workerConfig, + transcoderBinary: t.transcoderBinary, + }), + (n.onmessage = function (e) { + var t = e.data; + switch (t.type) { + case "transcode": + n._callbacks[t.id].resolve(t); + break; + case "error": + n._callbacks[t.id].reject(t); + break; + default: + console.error( + 'THREE.BasisTextureLoader: Unexpected message, "' + + t.type + + '"' + ); + } + }), + t.workerPool.push(n); + } else + t.workerPool.sort(function (e, t) { + return e._taskLoad > t._taskLoad ? -1 : 1; + }); + var r = t.workerPool[t.workerPool.length - 1]; + return (r._taskLoad += e), r; + }); + }, + }, + { + key: "dispose", + value: function () { + for (var e = 0; e < this.workerPool.length; e++) + this.workerPool[e].terminate(); + return (this.workerPool.length = 0), this; + }, + }, + ]), + n + ); + })(A.Loader), + dd = fd; + A.RGBAFormat, + A.RGBA_ASTC_4x4_Format, + A.RGBA_BPTC_Format, + A.RGBA_ETC2_EAC_Format, + A.RGBA_PVRTC_4BPPV1_Format, + A.RGBA_S3TC_DXT5_Format, + A.RGB_ETC1_Format, + A.RGB_ETC2_Format, + A.RGB_PVRTC_4BPPV1_Format, + A.RGB_S3TC_DXT1_Format; + var hd = null, + pd = 19789, + vd = 15786, + md = 49725, + gd = 2, + Ad = 16, + yd = 17, + bd = 18, + xd = 19, + Sd = 48, + Ed = 49, + _d = 15677, + Cd = 15678, + wd = 256, + Td = 45055, + Md = 40960, + Id = 40976, + kd = 40992, + Rd = 41008, + Bd = 41024, + Pd = 41040, + Ld = 41089, + Dd = 41091, + Ud = 41093, + Fd = 41095, + Od = 41472, + Nd = 41488, + Gd = 41520, + Zd = 41476, + zd = 41728, + Qd = 41812, + Hd = 41814, + Vd = 41816, + jd = 41818, + Wd = 16384, + Xd = 16640, + Yd = 16656, + qd = 16672, + Jd = 16688, + Kd = 16704, + $d = 16736, + eh = 0, + th = 1, + nh = 2, + rh = 3, + ih = 4, + ah = 5, + oh = 0, + sh = 1, + lh = 2, + uh = 3, + ch = 4, + fh = 5, + dh = 6, + hh = "16", + ph = "24", + vh = new A.Vector3(), + mh = new A.Vector3(), + gh = null, + Ah = null; + function yh(e) { + for (var t = 0, n = e.length; t < n; t++) { + var r = e[t], + i = r.vertices, + a = i[0], + o = i[1], + s = i[2]; + vh.subVectors(o, a), + mh.subVectors(s, o), + (r.faceNormal = new Vector3().crossVectors(vh, mh).normalize()); + } + } + var bh = new A.Ray(); + function xh(e, t) { + var n = + arguments.length > 2 && void 0 !== arguments[2] && arguments[2], + r = 100 * (1 + 1e-10); + function i(e) { + var t = ~~(e.x * r), + n = ~~(e.y * r), + i = ~~(e.z * r); + return "".concat(t, ",").concat(n, ",").concat(i); + } + function a(e, t) { + return "".concat(i(e), "_").concat(i(t)); + } + function o(e, t, n) { + n.direction.subVectors(t, e).normalize(); + var r = e.dot(n.direction); + return n.origin.copy(e).addScaledVector(n.direction, -r), n; + } + function s(e) { + return a(e.origin, e.direction); + } + for ( + var l = new Set(), + u = new Map(), + c = {}, + f = [], + d = 0, + h = t.length; + d < h; + d++ + ) { + var p = t[d].vertices, + v = p[0], + m = p[1]; + if ((l.add(a(v, m)), l.add(a(m, v)), n)) { + var g = o(v, m, new Ray()), + A = s(g); + if (!u.has(A)) { + o(m, v, g); + var y = s(g), + b = { ray: g, distances: [] }; + u.set(A, b), u.set(y, b); + } + var x = u.get(A), + S = x.ray.direction.dot(v), + E = x.ray.direction.dot(m); + if (S > E) { + var _ = [E, S]; + (S = _[0]), (E = _[1]); + } + x.distances.push(S, E); + } + } + for (var C = 0, w = e.length; C < w; C++) + for ( + var T = e[C], M = T.vertices, I = M.length, k = 0; + k < I; + k++ + ) { + var R = k, + B = (k + 1) % I, + P = M[R], + L = M[B], + D = a(P, L); + if (!l.has(D)) { + if (n) { + o(P, L, bh); + var U = s(bh); + if (u.has(U)) { + var F = u.get(U), + O = F.ray, + N = F.distances, + G = O.direction.dot(P), + Z = O.direction.dot(L); + if (G > Z) { + var z = [Z, G]; + (G = z[0]), (Z = z[1]); + } + for (var Q = !1, H = 0, V = N.length; H < V; H += 2) + if (G >= N[H] && Z <= N[H + 1]) { + Q = !0; + break; + } + if (Q) continue; + } + } + var j = { index: R, tri: T }; + c[D] = j; + } + } + for (;;) { + var W = null; + for (var X in c) { + W = c[X]; + break; + } + if (null === W) break; + for (var Y = [W]; Y.length > 0; ) + for ( + var q = Y.pop().tri, + J = q.vertices, + K = q.normals, + $ = q.faceNormal, + ee = J.length, + te = 0; + te < ee; + te++ + ) { + var ne = te, + re = (te + 1) % ee, + ie = J[ne], + ae = J[re]; + delete c[a(ie, ae)]; + var oe = a(ae, ie), + se = c[oe]; + if (se) { + var le = se.tri, + ue = se.index, + ce = le.normals, + fe = ce.length, + de = le.faceNormal; + if (Math.abs(le.faceNormal.dot(q.faceNormal)) < 0.25) + continue; + oe in c && (Y.push(se), delete c[oe]); + var he = (ue + 1) % fe; + K[ne] && + ce[he] && + K[ne] !== ce[he] && + (ce[he].norm.add(K[ne].norm), (K[ne].norm = ce[he].norm)); + var pe = K[ne] || ce[he]; + null === pe && + ((pe = { norm: new Vector3() }), f.push(pe.norm)), + null === K[ne] && ((K[ne] = pe), pe.norm.add($)), + null === ce[he] && ((ce[he] = pe), pe.norm.add(de)), + K[re] && + ce[ue] && + K[re] !== ce[ue] && + (ce[ue].norm.add(K[re].norm), (K[re].norm = ce[ue].norm)); + var ve = K[re] || ce[ue]; + null === ve && + ((ve = { norm: new Vector3() }), f.push(ve.norm)), + null === K[re] && ((K[re] = ve), ve.norm.add($)), + null === ce[ue] && ((ce[ue] = ve), ve.norm.add(de)); + } + } + } + for (var me = 0, ge = f.length; me < ge; me++) f[me].normalize(); + } + function Sh(e) { + return "Part" === e || "Unofficial_Part" === e; + } + function Eh(e) { + return /primitive/i.test(e) || "Subpart" === e; + } + var _h = null, + Ch = null; + function wh(e, t, n, r) { + return ((!r && e === hh) || (r && e === ph)) && (e = t), n[e] || null; + } + var Th = null; + function Mh(e, t) { + return e.colorCode === t.colorCode + ? 0 + : e.colorCode < t.colorCode + ? -1 + : 1; + } + function Ih(e, t) { + var n = + arguments.length > 2 && void 0 !== arguments[2] && arguments[2], + r = + arguments.length > 3 && void 0 !== arguments[3] + ? arguments[3] + : null; + e.sort(Mh), null === r && (r = e.length); + for ( + var i = new Float32Array(t * r * 3), + a = 3 === t ? new Float32Array(t * r * 3) : null, + o = [], + s = new Array(6), + l = new BufferGeometry(), + u = null, + c = 0, + f = 0, + d = 0, + h = 0, + p = e.length; + h < p; + h++ + ) { + var v = e[h], + m = v.vertices; + 4 === m.length && + ((s[0] = m[0]), + (s[1] = m[1]), + (s[2] = m[2]), + (s[3] = m[0]), + (s[4] = m[2]), + (s[5] = m[3]), + (m = s)); + for (var g = 0, A = m.length; g < A; g++) { + var y = m[g], + b = d + 3 * g; + (i[b + 0] = y.x), (i[b + 1] = y.y), (i[b + 2] = y.z); + } + if (3 === t) { + if (!v.faceNormal) { + var x = m[0], + S = m[1], + E = m[2]; + vh.subVectors(S, x), + mh.subVectors(E, S), + (v.faceNormal = new Vector3() + .crossVectors(vh, mh) + .normalize()); + } + var _ = v.normals; + 4 === _.length && + ((s[0] = _[0]), + (s[1] = _[1]), + (s[2] = _[2]), + (s[3] = _[0]), + (s[4] = _[2]), + (s[5] = _[3]), + (_ = s)); + for (var C = 0, w = _.length; C < w; C++) { + var T = v.faceNormal; + _[C] && (T = _[C].norm); + var M = d + 3 * C; + (a[M + 0] = T.x), (a[M + 1] = T.y), (a[M + 2] = T.z); + } + } + if (u !== v.colorCode) { + null !== u && l.addGroup(c, f, o.length - 1); + var I = v.material; + null !== I + ? 3 === t + ? o.push(I) + : 2 === t && + (null !== I + ? n + ? o.push( + I.userData.edgeMaterial.userData + .conditionalEdgeMaterial + ) + : o.push(I.userData.edgeMaterial) + : o.push(null)) + : o.push(v.colorCode), + (u = v.colorCode), + (c = d / 3), + (f = m.length); + } else f += m.length; + d += 3 * m.length; + } + f > 0 && l.addGroup(c, 1 / 0, o.length - 1), + l.setAttribute("position", new BufferAttribute(i, 3)), + null !== a && l.setAttribute("normal", new BufferAttribute(a, 3)); + var k = null; + if ( + (2 === t + ? (k = n + ? new Ah(l, 1 === o.length ? o[0] : o) + : new LineSegments(l, 1 === o.length ? o[0] : o)) + : 3 === t && (k = new Mesh(l, 1 === o.length ? o[0] : o)), + n) + ) { + k.isConditionalLine = !0; + for ( + var R = new Float32Array(3 * e.length * 2), + B = new Float32Array(3 * e.length * 2), + P = new Float32Array(3 * e.length * 2), + L = 0, + D = e.length; + L < D; + L++ + ) { + var U = e[L], + F = U.vertices, + O = U.controlPoints, + N = O[0], + G = O[1], + Z = F[0], + z = F[1], + Q = 3 * L * 2; + (R[Q + 0] = N.x), + (R[Q + 1] = N.y), + (R[Q + 2] = N.z), + (R[Q + 3] = N.x), + (R[Q + 4] = N.y), + (R[Q + 5] = N.z), + (B[Q + 0] = G.x), + (B[Q + 1] = G.y), + (B[Q + 2] = G.z), + (B[Q + 3] = G.x), + (B[Q + 4] = G.y), + (B[Q + 5] = G.z), + (P[Q + 0] = z.x - Z.x), + (P[Q + 1] = z.y - Z.y), + (P[Q + 2] = z.z - Z.z), + (P[Q + 3] = z.x - Z.x), + (P[Q + 4] = z.y - Z.y), + (P[Q + 5] = z.z - Z.z); + } + l.setAttribute("control0", new BufferAttribute(R, 3, !1)), + l.setAttribute("control1", new BufferAttribute(B, 3, !1)), + l.setAttribute("direction", new BufferAttribute(P, 3, !1)); + } + return k; + } + var kh = null, + Rh = null, + Bh = new WeakMap(), + Ph = null; + function Lh() { + var e, t; + function n(e, n) { + var a, + o, + s, + l, + u, + c = e.geometry(), + f = e.attributes(), + d = c.objectType; + switch (d) { + case t.ObjectType.Curve: + var h = i(c, 100); + (o = {}), + (l = {}), + ((s = {}).itemSize = 3), + (s.type = "Float32Array"), + (s.array = []); + for (var p = 0; p < h.length; p++) + s.array.push(h[p][0]), + s.array.push(h[p][1]), + s.array.push(h[p][2]); + (o.position = s), (l.attributes = o), (a = { data: l }); + break; + case t.ObjectType.Point: + var v = c.location, + m = {}; + (o = {}), + (l = {}), + ((s = {}).itemSize = 3), + (s.type = "Float32Array"), + (s.array = [v[0], v[1], v[2]]); + var g = f.drawColor(n); + (m.itemSize = 3), + (m.type = "Float32Array"), + (m.array = [g.r / 255, g.g / 255, g.b / 255]), + (o.position = s), + (o.color = m), + (l.attributes = o), + (a = { data: l }); + break; + case t.ObjectType.PointSet: + case t.ObjectType.Mesh: + a = c.toThreejsJSON(); + break; + case t.ObjectType.Brep: + var A = c.faces(); + u = new t.Mesh(); + for (var y = 0; y < A.count; y++) { + var b = A.get(y), + x = b.getMesh(t.MeshType.Any); + x && (u.append(x), x.delete()), b.delete(); + } + u.faces().count > 0 && + (u.compact(), (a = u.toThreejsJSON()), A.delete()), + u.delete(); + break; + case t.ObjectType.Extrusion: + (u = c.getMesh(t.MeshType.Any)) && + ((a = u.toThreejsJSON()), u.delete()); + break; + case t.ObjectType.TextDot: + case t.ObjectType.Light: + a = r(c); + break; + case t.ObjectType.InstanceReference: + ((a = r(c)).xform = r(c.xform)), + (a.xform.array = c.xform.toFloatArray(!0)); + break; + case t.ObjectType.SubD: + c.subdivide(3), + (u = t.Mesh.createFromSubDControlNet(c)) && + ((a = u.toThreejsJSON()), u.delete()); + break; + default: + console.warn( + "THREE.3DMLoader: TODO: Implement ".concat(d.constructor.name) + ); + } + if (a) + return ( + ((o = r(f)).geometry = r(c)), + f.groupCount > 0 && (o.groupIds = f.getGroupList()), + f.userStringCount > 0 && (o.userStrings = f.getUserStrings()), + c.userStringCount > 0 && + (o.geometry.userStrings = c.getUserStrings()), + (o.drawColor = f.drawColor(n)), + { + geometry: a, + attributes: o, + objectType: (d = (d = d.constructor.name).substring( + 11, + d.length + )), + } + ); + console.warn( + "THREE.3DMLoader: ".concat( + d.constructor.name, + " has no associated mesh geometry." + ) + ); + } + function r(e) { + var t = {}; + for (var n in e) { + var r = e[n]; + "function" !== typeof r && + ("object" === typeof r && + null !== r && + r.hasOwnProperty("constructor") + ? (t[n] = { name: r.constructor.name, value: r.value }) + : (t[n] = r)); + } + return t; + } + function i(e, n) { + var r = n, + a = [], + o = []; + if (e instanceof t.LineCurve) return [e.pointAtStart, e.pointAtEnd]; + if (e instanceof t.PolylineCurve) { + r = e.pointCount; + for (var s = 0; s < r; s++) a.push(e.point(s)); + return a; + } + if (e instanceof t.PolyCurve) { + for (var l = e.segmentCount, u = 0; u < l; u++) { + var c = e.segmentCurve(u), + f = i(c, r); + (a = a.concat(f)), c.delete(); + } + return a; + } + if ( + (e instanceof t.ArcCurve && + (r = (r = Math.floor(e.angleDegrees / 5)) < 2 ? 2 : r), + e instanceof t.NurbsCurve && 1 === e.degree) + ) { + for (var d = e.tryGetPolyline(), h = 0; h < d.count; h++) + a.push(d.get(h)); + return d.delete(), a; + } + for (var p = e.domain, v = r - 1, m = 0; m < r; m++) { + var g = p[0] + (m / v) * (p[1] - p[0]); + if (g !== p[0] && g !== p[1]) { + var A = e.tangentAt(g), + y = e.tangentAt(o.slice(-1)[0]), + b = A[0] * A[0] + A[1] * A[1] + A[2] * A[2], + x = y[0] * y[0] + y[1] * y[1] + y[2] * y[2], + S = Math.sqrt(b * x), + E = void 0; + if (0 === S) E = Math.PI / 2; + else { + var _ = (A.x * y.x + A.y * y.y + A.z * y.z) / S; + E = Math.acos(Math.max(-1, Math.min(1, _))); + } + E < 0.1 || o.push(g); + } else o.push(g); + } + return ( + (a = o.map(function (t) { + return e.pointAt(t); + })), + a + ); + } + onmessage = function (i) { + var a = i.data; + switch (a.type) { + case "init": + var o, + s = a.libraryConfig.wasmBinary; + e = new Promise(function (e) { + (o = { wasmBinary: s, onRuntimeInitialized: e }), rhino3dm(o); + }).then(function () { + t = o; + }); + break; + case "decode": + var l = a.buffer; + e.then(function () { + var e = (function (e, t) { + for ( + var i = new Uint8Array(t), + a = e.File3dm.fromByteArray(i), + o = [], + s = [], + l = [], + u = [], + c = [], + f = [], + d = a.objects(), + h = d.count, + p = 0; + p < h; + p++ + ) { + var v = d.get(p), + m = n(v, a); + v.delete(), m && o.push(m); + } + for (var g = 0; g < a.instanceDefinitions().count(); g++) { + var A = a.instanceDefinitions().get(g), + y = r(A); + (y.objectIds = A.getObjectIds()), + o.push({ + geometry: null, + attributes: y, + objectType: "InstanceDefinition", + }); + } + for ( + var b = [ + e.TextureType.Diffuse, + e.TextureType.Bump, + e.TextureType.Transparency, + e.TextureType.Opacity, + e.TextureType.Emap, + ], + x = [ + e.TextureType.PBR_BaseColor, + e.TextureType.PBR_Subsurface, + e.TextureType.PBR_SubsurfaceScattering, + e.TextureType.PBR_SubsurfaceScatteringRadius, + e.TextureType.PBR_Metallic, + e.TextureType.PBR_Specular, + e.TextureType.PBR_SpecularTint, + e.TextureType.PBR_Roughness, + e.TextureType.PBR_Anisotropic, + e.TextureType.PBR_Anisotropic_Rotation, + e.TextureType.PBR_Sheen, + e.TextureType.PBR_SheenTint, + e.TextureType.PBR_Clearcoat, + e.TextureType.PBR_ClearcoatBump, + e.TextureType.PBR_ClearcoatRoughness, + e.TextureType.PBR_OpacityIor, + e.TextureType.PBR_OpacityRoughness, + e.TextureType.PBR_Emission, + e.TextureType.PBR_AmbientOcclusion, + e.TextureType.PBR_Displacement, + ], + S = 0; + S < a.materials().count(); + S++ + ) { + for ( + var E = a.materials().get(S), + _ = E.physicallyBased(), + C = r(E), + w = [], + T = 0; + T < b.length; + T++ + ) { + var M = E.getTexture(b[T]); + if (M) { + var I = b[T].constructor.name, + k = { type: (I = I.substring(12, I.length)) }, + R = a.getEmbeddedFileAsBase64(M.fileName); + R + ? (k.image = "data:image/png;base64," + R) + : (console.warn( + "THREE.3DMLoader: Image for ".concat( + I, + " texture not embedded in file." + ) + ), + (k.image = null)), + w.push(k), + M.delete(); + } + } + if (((C.textures = w), _.supported)) { + console.log("pbr true"); + for (var B = 0; B < x.length; B++) { + var P = E.getTexture(b[B]); + if (P) { + var L = a.getEmbeddedFileAsBase64(P.fileName), + D = b[B].constructor.name, + U = { + type: (D = D.substring(12, D.length)), + image: "data:image/png;base64," + L, + }; + w.push(U), P.delete(); + } + } + var F = r(E.physicallyBased()); + C = Object.assign(F, C); + } + s.push(C), E.delete(), _.delete(); + } + for (var O = 0; O < a.layers().count(); O++) { + var N = a.layers().get(O), + G = r(N); + l.push(G), N.delete(); + } + for (var Z = 0; Z < a.views().count(); Z++) { + var z = a.views().get(Z), + Q = r(z); + u.push(Q), z.delete(); + } + for (var H = 0; H < a.namedViews().count(); H++) { + var V = a.namedViews().get(H), + j = r(V); + c.push(j), V.delete(); + } + for (var W = 0; W < a.groups().count(); W++) { + var X = a.groups().get(W), + Y = r(X); + f.push(Y), X.delete(); + } + var q = r(a.settings()); + return ( + a.delete(), + { + objects: o, + materials: s, + layers: l, + views: u, + namedViews: c, + groups: f, + settings: q, + } + ); + })(t, l); + self.postMessage({ type: "decode", id: a.id, data: e }); + }); + } + }; + } + var Dh = /^[og]\s*(.+)?/, + Uh = /^mtllib /, + Fh = /^usemtl /, + Oh = /^usemap /, + Nh = new A.Vector3(), + Gh = new A.Vector3(), + Zh = new A.Vector3(), + zh = new A.Vector3(), + Qh = new A.Vector3(); + function Hh() { + var e = { + objects: [], + object: {}, + vertices: [], + normals: [], + colors: [], + uvs: [], + materials: {}, + materialLibraries: [], + startObject: function (e, t) { + if (this.object && !1 === this.object.fromDeclaration) + return ( + (this.object.name = e), + void (this.object.fromDeclaration = !1 !== t) + ); + var n = + this.object && "function" === typeof this.object.currentMaterial + ? this.object.currentMaterial() + : void 0; + if ( + (this.object && + "function" === typeof this.object._finalize && + this.object._finalize(!0), + (this.object = { + name: e || "", + fromDeclaration: !1 !== t, + geometry: { + vertices: [], + normals: [], + colors: [], + uvs: [], + hasUVIndices: !1, + }, + materials: [], + smooth: !0, + startMaterial: function (e, t) { + var n = this._finalize(!1); + n && + (n.inherited || n.groupCount <= 0) && + this.materials.splice(n.index, 1); + var r = { + index: this.materials.length, + name: e || "", + mtllib: + Array.isArray(t) && t.length > 0 ? t[t.length - 1] : "", + smooth: void 0 !== n ? n.smooth : this.smooth, + groupStart: void 0 !== n ? n.groupEnd : 0, + groupEnd: -1, + groupCount: -1, + inherited: !1, + clone: function (e) { + var t = { + index: "number" === typeof e ? e : this.index, + name: this.name, + mtllib: this.mtllib, + smooth: this.smooth, + groupStart: 0, + groupEnd: -1, + groupCount: -1, + inherited: !1, + }; + return (t.clone = this.clone.bind(t)), t; + }, + }; + return this.materials.push(r), r; + }, + currentMaterial: function () { + if (this.materials.length > 0) + return this.materials[this.materials.length - 1]; + }, + _finalize: function (e) { + var t = this.currentMaterial(); + if ( + (t && + -1 === t.groupEnd && + ((t.groupEnd = this.geometry.vertices.length / 3), + (t.groupCount = t.groupEnd - t.groupStart), + (t.inherited = !1)), + e && this.materials.length > 1) + ) + for (var n = this.materials.length - 1; n >= 0; n--) + this.materials[n].groupCount <= 0 && + this.materials.splice(n, 1); + return ( + e && + 0 === this.materials.length && + this.materials.push({ name: "", smooth: this.smooth }), + t + ); + }, + }), + n && n.name && "function" === typeof n.clone) + ) { + var r = n.clone(0); + (r.inherited = !0), this.object.materials.push(r); + } + this.objects.push(this.object); + }, + finalize: function () { + this.object && + "function" === typeof this.object._finalize && + this.object._finalize(!0); + }, + parseVertexIndex: function (e, t) { + var n = parseInt(e, 10); + return 3 * (n >= 0 ? n - 1 : n + t / 3); + }, + parseNormalIndex: function (e, t) { + var n = parseInt(e, 10); + return 3 * (n >= 0 ? n - 1 : n + t / 3); + }, + parseUVIndex: function (e, t) { + var n = parseInt(e, 10); + return 2 * (n >= 0 ? n - 1 : n + t / 2); + }, + addVertex: function (e, t, n) { + var r = this.vertices, + i = this.object.geometry.vertices; + i.push(r[e + 0], r[e + 1], r[e + 2]), + i.push(r[t + 0], r[t + 1], r[t + 2]), + i.push(r[n + 0], r[n + 1], r[n + 2]); + }, + addVertexPoint: function (e) { + var t = this.vertices; + this.object.geometry.vertices.push(t[e + 0], t[e + 1], t[e + 2]); + }, + addVertexLine: function (e) { + var t = this.vertices; + this.object.geometry.vertices.push(t[e + 0], t[e + 1], t[e + 2]); + }, + addNormal: function (e, t, n) { + var r = this.normals, + i = this.object.geometry.normals; + i.push(r[e + 0], r[e + 1], r[e + 2]), + i.push(r[t + 0], r[t + 1], r[t + 2]), + i.push(r[n + 0], r[n + 1], r[n + 2]); + }, + addFaceNormal: function (e, t, n) { + var r = this.vertices, + i = this.object.geometry.normals; + Nh.fromArray(r, e), + Gh.fromArray(r, t), + Zh.fromArray(r, n), + Qh.subVectors(Zh, Gh), + zh.subVectors(Nh, Gh), + Qh.cross(zh), + Qh.normalize(), + i.push(Qh.x, Qh.y, Qh.z), + i.push(Qh.x, Qh.y, Qh.z), + i.push(Qh.x, Qh.y, Qh.z); + }, + addColor: function (e, t, n) { + var r = this.colors, + i = this.object.geometry.colors; + void 0 !== r[e] && i.push(r[e + 0], r[e + 1], r[e + 2]), + void 0 !== r[t] && i.push(r[t + 0], r[t + 1], r[t + 2]), + void 0 !== r[n] && i.push(r[n + 0], r[n + 1], r[n + 2]); + }, + addUV: function (e, t, n) { + var r = this.uvs, + i = this.object.geometry.uvs; + i.push(r[e + 0], r[e + 1]), + i.push(r[t + 0], r[t + 1]), + i.push(r[n + 0], r[n + 1]); + }, + addDefaultUV: function () { + var e = this.object.geometry.uvs; + e.push(0, 0), e.push(0, 0), e.push(0, 0); + }, + addUVLine: function (e) { + var t = this.uvs; + this.object.geometry.uvs.push(t[e + 0], t[e + 1]); + }, + addFace: function (e, t, n, r, i, a, o, s, l) { + var u = this.vertices.length, + c = this.parseVertexIndex(e, u), + f = this.parseVertexIndex(t, u), + d = this.parseVertexIndex(n, u); + if ( + (this.addVertex(c, f, d), + this.addColor(c, f, d), + void 0 !== o && "" !== o) + ) { + var h = this.normals.length; + (c = this.parseNormalIndex(o, h)), + (f = this.parseNormalIndex(s, h)), + (d = this.parseNormalIndex(l, h)), + this.addNormal(c, f, d); + } else this.addFaceNormal(c, f, d); + if (void 0 !== r && "" !== r) { + var p = this.uvs.length; + (c = this.parseUVIndex(r, p)), + (f = this.parseUVIndex(i, p)), + (d = this.parseUVIndex(a, p)), + this.addUV(c, f, d), + (this.object.geometry.hasUVIndices = !0); + } else this.addDefaultUV(); + }, + addPointGeometry: function (e) { + this.object.geometry.type = "Points"; + for ( + var t = this.vertices.length, n = 0, r = e.length; + n < r; + n++ + ) { + var i = this.parseVertexIndex(e[n], t); + this.addVertexPoint(i), this.addColor(i); + } + }, + addLineGeometry: function (e, t) { + this.object.geometry.type = "Line"; + for ( + var n = this.vertices.length, + r = this.uvs.length, + i = 0, + a = e.length; + i < a; + i++ + ) + this.addVertexLine(this.parseVertexIndex(e[i], n)); + for (var o = 0, s = t.length; o < s; o++) + this.addUVLine(this.parseUVIndex(t[o], r)); + }, + }; + return e.startObject("", !1), e; + } + var Vh = null, + jh = null, + Wh = null, + Xh = null, + Yh = null; + function qh(e) { + var t = e.geometry, + n = []; + if (t && void 0 !== t.bones) { + for (var r = 0, i = t.bones.length; r < i; r++) { + var a = t.bones[r], + o = new Bone(); + n.push(o), + (o.name = a.name), + o.position.fromArray(a.pos), + o.quaternion.fromArray(a.rotq), + void 0 !== a.scl && o.scale.fromArray(a.scl); + } + for (var s = 0, l = t.bones.length; s < l; s++) { + var u = t.bones[s]; + -1 !== u.parent && null !== u.parent && void 0 !== n[u.parent] + ? n[u.parent].add(n[s]) + : e.add(n[s]); + } + } + return e.updateMatrixWorld(!0), n; + } + var Jh = null, + Kh = null, + $h = null, + ep = null, + tp = null, + np = null, + rp = 0, + ip = null, + ap = null, + op = null, + sp = { + "89d104cd-d012-426b-b5b3-bbaee63ac43c": "Bubbles", + "700f3aa8-9a7c-2384-8b8a-ea028905dd8c": "CelVinyl", + "0f0ff7b2-a677-45eb-a7d6-0cd7206f4816": "ChromaticWave", + "1161af82-50cf-47db-9706-0c3576d43c43": "CoarseBristles", + "79168f10-6961-464a-8be1-57ed364c5600": "CoarseBristlesSingleSided", + "1caa6d7d-f015-3f54-3a4b-8b5354d39f81": "Comet", + "c8313697-2563-47fc-832e-290f4c04b901": "DiamondHull", + "4391aaaa-df73-4396-9e33-31e4e4930b27": "Disco", + "d1d991f2-e7a0-4cf1-b328-f57e915e6260": "DotMarker", + "6a1cf9f9-032c-45ec-9b1d-a6680bee30f7": "Dots", + "0d3889f3-3ede-470c-8af4-f44813306126": "DoubleTaperedFlat", + "0d3889f3-3ede-470c-8af4-de4813306126": "DoubleTaperedMarker", + "d0262945-853c-4481-9cbd-88586bed93cb": "DuctTape", + "3ca16e2f-bdcd-4da2-8631-dcef342f40f1": "DuctTapeSingleSided", + "f6e85de3-6dcc-4e7f-87fd-cee8c3d25d51": "Electricity", + "02ffb866-7fb2-4d15-b761-1012cefb1360": "Embers", + "cb92b597-94ca-4255-b017-0e3f42f12f9e": "Fire", + "2d35bcf0-e4d8-452c-97b1-3311be063130": "Flat", + "55303bc4-c749-4a72-98d9-d23e68e76e18": "FlatDeprecated", + "280c0a7a-aad8-416c-a7d2-df63d129ca70": "FlatSingleSided", + "cf019139-d41c-4eb0-a1d0-5cf54b0a42f3": "Highlighter", + "6a1cf9f9-032c-45ec-9b6e-a6680bee32e9": "HyperGrid", + "dce872c2-7b49-4684-b59b-c45387949c5c": "Hypercolor", + "e8ef32b1-baa8-460a-9c2c-9cf8506794f5": "HypercolorSingleSided", + "2f212815-f4d3-c1a4-681a-feeaf9c6dc37": "Icing", + "f5c336cf-5108-4b40-ade9-c687504385ab": "Ink", + "c0012095-3ffd-4040-8ee1-fc180d346eaa": "InkSingleSided", + "4a76a27a-44d8-4bfe-9a8c-713749a499b0": "Leaves", + "ea19de07-d0c0-4484-9198-18489a3c1487": "LeavesSingleSided", + "2241cd32-8ba2-48a5-9ee7-2caef7e9ed62": "Light", + "4391aaaa-df81-4396-9e33-31e4e4930b27": "LightWire", + "d381e0f5-3def-4a0d-8853-31e9200bcbda": "Lofted", + "429ed64a-4e97-4466-84d3-145a861ef684": "Marker", + "79348357-432d-4746-8e29-0e25c112e3aa": "MatteHull", + "b2ffef01-eaaa-4ab5-aa64-95a2c4f5dbc6": "NeonPulse", + "f72ec0e7-a844-4e38-82e3-140c44772699": "OilPaint", + "c515dad7-4393-4681-81ad-162ef052241b": "OilPaintSingleSided", + "f1114e2e-eb8d-4fde-915a-6e653b54e9f5": "Paper", + "759f1ebd-20cd-4720-8d41-234e0da63716": "PaperSingleSided", + "e0abbc80-0f80-e854-4970-8924a0863dcc": "Petal", + "c33714d1-b2f9-412e-bd50-1884c9d46336": "Plasma", + "ad1ad437-76e2-450d-a23a-e17f8310b960": "Rainbow", + "faaa4d44-fcfb-4177-96be-753ac0421ba3": "ShinyHull", + "70d79cca-b159-4f35-990c-f02193947fe8": "Smoke", + "d902ed8b-d0d1-476c-a8de-878a79e3a34c": "Snow", + "accb32f5-4509-454f-93f8-1df3fd31df1b": "SoftHighlighter", + "cf7f0059-7aeb-53a4-2b67-c83d863a9ffa": "Spikes", + "8dc4a70c-d558-4efd-a5ed-d4e860f40dc3": "Splatter", + "7a1c8107-50c5-4b70-9a39-421576d6617e": "SplatterSingleSided", + "0eb4db27-3f82-408d-b5a1-19ebd7d5b711": "Stars", + "44bb800a-fbc3-4592-8426-94ecb05ddec3": "Streamers", + "0077f88c-d93a-42f3-b59b-b31c50cdb414": "Taffy", + "b468c1fb-f254-41ed-8ec9-57030bc5660c": "TaperedFlat", + "c8ccb53d-ae13-45ef-8afb-b730d81394eb": "TaperedFlatSingleSided", + "d90c6ad8-af0f-4b54-b422-e0f92abe1b3c": "TaperedMarker", + "1a26b8c0-8a07-4f8a-9fac-d2ef36e0cad0": "TaperedMarker_Flat", + "75b32cf0-fdd6-4d89-a64b-e2a00b247b0f": "ThickPaint", + "fdf0326a-c0d1-4fed-b101-9db0ff6d071f": "ThickPaintSingleSided", + "4391385a-df73-4396-9e33-31e4e4930b27": "Toon", + "a8fea537-da7c-4d4b-817f-24f074725d6d": "UnlitHull", + "d229d335-c334-495a-a801-660ac8a87360": "VelvetInk", + "10201aa3-ebc2-42d8-84b7-2e63f6eeb8ab": "Waveform", + "b67c0e81-ce6d-40a8-aeb0-ef036b081aa3": "WetPaint", + "dea67637-cd1a-27e4-c9b1-52f4bbcb84e5": "WetPaintSingleSided", + "5347acf0-a8e2-47b6-8346-30c70719d763": "WigglyGraphite", + "e814fef1-97fd-7194-4a2f-50c2bb918be2": "WigglyGraphiteSingleSided", + "4391385a-cf83-4396-9e33-31e4e4930b27": "Wire", + }, + lp = { + colors: { + BloomColor: + "\n\t\t\tvec3 BloomColor(vec3 color, float gain) {\n\t\t\t\t// Guarantee that there's at least a little bit of all 3 channels.\n\t\t\t\t// This makes fully-saturated strokes (which only have 2 non-zero\n\t\t\t\t// color channels) eventually clip to white rather than to a secondary.\n\t\t\t\tfloat cmin = length(color.rgb) * .05;\n\t\t\t\tcolor.rgb = max(color.rgb, vec3(cmin, cmin, cmin));\n\t\t\t\t// If we try to remove this pow() from .a, it brightens up\n\t\t\t\t// pressure-sensitive strokes; looks better as-is.\n\t\t\t\tcolor = pow(color, vec3(2.2));\n\t\t\t\tcolor.rgb *= 2. * exp(gain * 10.);\n\t\t\t\treturn color;\n\t\t\t}\n\t\t", + LinearToSrgb: + "\n\t\t\tvec3 LinearToSrgb(vec3 color) {\n\t\t\t\t// Approximation http://chilliant.blogspot.com/2012/08/srgb-approximations-for-hlsl.html\n\t\t\t\tvec3 linearColor = color.rgb;\n\t\t\t\tvec3 S1 = sqrt(linearColor);\n\t\t\t\tvec3 S2 = sqrt(S1);\n\t\t\t\tvec3 S3 = sqrt(S2);\n\t\t\t\tcolor.rgb = 0.662002687 * S1 + 0.684122060 * S2 - 0.323583601 * S3 - 0.0225411470 * linearColor;\n\t\t\t\treturn color;\n\t\t\t}\n\t\t", + hsv: "\n\t\t\t// uniform sampler2D lookupTex;\n\t\t\tvec4 lookup(vec4 textureColor) {\n\t\t\t\treturn textureColor;\n\t\t\t}\n\n\t\t\tvec3 lookup(vec3 textureColor) {\n\t\t\t\treturn textureColor;\n\t\t\t}\n\n\t\t\tvec3 hsv2rgb( vec3 hsv ) {\n\t\t\t\tvec3 rgb = clamp( abs(mod(hsv.x*6.0+vec3(0.0,4.0,2.0),6.0)-3.0)-1.0, 0.0, 1.0 );\n\t\t\t\treturn hsv.z * mix( vec3(1.0), rgb, hsv.y);\n\t\t\t}\n\n\t\t\tvec3 rgb2hsv( vec3 rgb ) {\n\t\t\t\tvec4 K = vec4(0.0, -1.0 / 3.0, 2.0 / 3.0, -1.0);\n\t\t\t\tvec4 p = mix(vec4(rgb.bg, K.wz), vec4(rgb.gb, K.xy), step(rgb.b, rgb.g));\n\t\t\t\tvec4 q = mix(vec4(p.xyw, rgb.r), vec4(rgb.r, p.yzx), step(p.x, rgb.r));\n\n\t\t\t\tfloat d = q.x - min(q.w, q.y);\n\t\t\t\tfloat e = 1.0e-10;\n\n\t\t\t\treturn vec3(abs(q.z + (q.w - q.y) / (6.0 * d + e)), d / (q.x + e), q.x);\n\t\t\t}\n\t\t", + SrgbToLinear: + "\n\t\t\tvec3 SrgbToLinear(vec3 color) {\n\t\t\t\t// Approximation http://chilliant.blogspot.com/2012/08/srgb-approximations-for-hlsl.html\n\t\t\t\tvec3 sRGB = color.rgb;\n\t\t\t\tcolor.rgb = sRGB * (sRGB * (sRGB * 0.305306011 + 0.682171111) + 0.012522878);\n\t\t\t\treturn color;\n\t\t\t}\n\t\t", + }, + }, + up = function () { + return { + Light: { + uniforms: { + mainTex: { + value: new TextureLoader() + .setPath("./textures/tiltbrush/") + .loader.load("Light.webp"), + }, + alphaTest: { value: 0.067 }, + emission_gain: { value: 0.45 }, + alpha: { value: 1 }, + }, + vertexShader: + "\n\t\t\tprecision highp float;\n\t\t\tprecision highp int;\n\n\t\t\tattribute vec2 uv;\n\t\t\tattribute vec4 color;\n\t\t\tattribute vec3 position;\n\n\t\t\tuniform mat4 modelMatrix;\n\t\t\tuniform mat4 modelViewMatrix;\n\t\t\tuniform mat4 projectionMatrix;\n\t\t\tuniform mat4 viewMatrix;\n\t\t\tuniform mat3 normalMatrix;\n\t\t\tuniform vec3 cameraPosition;\n\n\t\t\tvarying vec2 vUv;\n\t\t\tvarying vec3 vColor;\n\n\t\t\t" + .concat(lp.colors.LinearToSrgb, "\n\t\t\t") + .concat( + lp.colors.hsv, + "\n\n\t\t\tvoid main() {\n\n\t\t\t\tvUv = uv;\n\n\t\t\t\tvColor = lookup(color.rgb);\n\n\t\t\t\tvec4 mvPosition = modelViewMatrix * vec4( position, 1.0 );\n\n\t\t\t\tgl_Position = projectionMatrix * mvPosition;\n\n\t\t\t}\n\t\t" + ), + fragmentShader: + "\n\t\t\tprecision highp float;\n\t\t\tprecision highp int;\n\n\t\t\tuniform float emission_gain;\n\n\t\t\tuniform sampler2D mainTex;\n\t\t\tuniform float alphaTest;\n\n\t\t\tvarying vec2 vUv;\n\t\t\tvarying vec3 vColor;\n\n\t\t\t" + .concat(lp.colors.BloomColor, "\n\t\t\t") + .concat( + lp.colors.SrgbToLinear, + "\n\n\t\t\tvoid main(){\n\t\t\t\tvec4 col = texture2D(mainTex, vUv);\n\t\t\t\tvec3 color = vColor;\n\t\t\t\tcolor = BloomColor(color, emission_gain);\n\t\t\t\tcolor = color * col.rgb;\n\t\t\t\tcolor = color * col.a;\n\t\t\t\tcolor = SrgbToLinear(color);\n\t\t\t\tgl_FragColor = vec4(color, 1.0);\n\t\t\t}\n\t\t" + ), + side: 2, + transparent: !0, + depthFunc: 2, + depthWrite: !0, + depthTest: !1, + blending: 5, + blendDst: 201, + blendDstAlpha: 201, + blendEquation: 100, + blendEquationAlpha: 100, + blendSrc: 201, + blendSrcAlpha: 201, + }, + }; + }; + function cp(e) { + return "Light" === sp[e] + ? new RawShaderMaterial(up().Light) + : new MeshBasicMaterial({ vertexColors: !0, side: DoubleSide }); + } + var fp = new WeakMap(), + dp = null; + function hp() { + var e, t; + function n(e, t, n, r, i, a) { + var o = a.num_components(), + s = n.num_points() * o, + l = s * i.BYTES_PER_ELEMENT, + u = (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), + c = e._malloc(l); + t.GetAttributeDataArrayForAllPoints(n, a, u, l, c); + var f = new i(e.HEAPF32.buffer, c, s).slice(); + return e._free(c), { name: r, array: f, itemSize: o }; + } + onmessage = function (r) { + var 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": + var a = i.buffer, + o = i.taskConfig; + t.then(function (e) { + var t = e.draco, + r = new t.Decoder(), + s = new t.DecoderBuffer(); + s.Init(new Int8Array(a), a.byteLength); + try { + var l = (function (e, t, r, i) { + var a, + o, + s = i.attributeIDs, + l = i.attributeTypes, + u = t.GetEncodedGeometryType(r); + if (u === e.TRIANGULAR_MESH) + (a = new e.Mesh()), (o = t.DecodeBufferToMesh(r, a)); + else { + if (u !== e.POINT_CLOUD) + throw new Error( + "THREE.DRACOLoader: Unexpected geometry type." + ); + (a = new e.PointCloud()), + (o = t.DecodeBufferToPointCloud(r, a)); + } + if (!o.ok() || 0 === a.ptr) + throw new Error( + "THREE.DRACOLoader: Decoding failed: " + + o.error_msg() + ); + var c = { index: null, attributes: [] }; + for (var f in s) { + var d = self[l[f]], + h = void 0, + p = void 0; + if (i.useUniqueIDs) + (p = s[f]), (h = t.GetAttributeByUniqueId(a, p)); + else { + if (-1 === (p = t.GetAttributeId(a, e[s[f]]))) + continue; + h = t.GetAttribute(a, p); + } + c.attributes.push(n(e, t, a, f, d, h)); + } + u === e.TRIANGULAR_MESH && + (c.index = (function (e, t, n) { + var r = n.num_faces(), + i = 3 * r, + a = 4 * i, + o = e._malloc(a); + t.GetTrianglesUInt32Array(n, a, o); + var s = new Uint32Array( + e.HEAPF32.buffer, + o, + i + ).slice(); + return e._free(o), { array: s, itemSize: 1 }; + })(e, t, a)); + return e.destroy(a), c; + })(t, r, s, o), + u = l.attributes.map(function (e) { + return e.array.buffer; + }); + l.index && u.push(l.index.array.buffer), + self.postMessage( + { type: "decode", id: i.id, geometry: l }, + u + ); + } catch (c) { + console.error(c), + self.postMessage({ + type: "error", + id: i.id, + error: c.message, + }); + } finally { + t.destroy(s), t.destroy(r); + } + }); + } + }; + } + var pp = null, + vp = null, + mp = null; + function gp() { + if (null === mp) { + var e = new ArrayBuffer(2), + t = new Uint8Array(e), + n = new Uint16Array(e); + (t[0] = 170), (t[1] = 187), (mp = 43707 === n[0]); + } + return mp; + } + var Ap = [ + null, + Float32Array, + null, + Int8Array, + Int16Array, + null, + Int32Array, + Uint8Array, + Uint16Array, + null, + Uint32Array, + ], + yp = { + Uint16Array: "getUint16", + Uint32Array: "getUint32", + Int16Array: "getInt16", + Int32Array: "getInt32", + Float32Array: "getFloat32", + Float64Array: "getFloat64", + }; + function bp(e, t, n, r, i) { + var a, + o = t.BYTES_PER_ELEMENT; + if (i === gp() || 1 === o) a = new t(e, n, r); + else { + var s = new DataView(e, n, r * o), + l = yp[t.name], + u = !i; + a = new t(r); + for (var c = 0; c < r; c++) a[c] = s[l](c * o, u); + } + return a; + } + function xp(e) { + var t = new Uint8Array(e), + n = t[0], + r = t[1], + i = !!((r >> 7) & 1), + a = (r >> 6) & 1, + o = 1 === ((r >> 5) & 1), + s = 31 & r, + l = 0, + u = 0; + if ( + (o + ? ((l = (t[2] << 16) + (t[3] << 8) + t[4]), + (u = (t[5] << 16) + (t[6] << 8) + t[7])) + : ((l = t[2] + (t[3] << 8) + (t[4] << 16)), + (u = t[5] + (t[6] << 8) + (t[7] << 16))), + 0 === n) + ) + throw new Error("PRWM decoder: Invalid format version: 0"); + if (1 !== n) + throw new Error("PRWM decoder: Unsupported format version: " + n); + if (!i) { + if (0 !== a) + throw new Error( + "PRWM decoder: Indices type must be set to 0 for non-indexed geometries" + ); + if (0 !== u) + throw new Error( + "PRWM decoder: Number of indices must be set to 0 for non-indexed geometries" + ); + } + for (var c = 8, f = {}, d = 0; d < s; d++) { + for (var h = ""; c < t.length; ) { + var p = t[c]; + if ((c++, 0 === p)) break; + h += String.fromCharCode(p); + } + var v = ((r = t[c]) >> 7) & 1, + m = 1 + ((r >> 4) & 3), + g = Ap[15 & r]; + c++; + var A = bp(e, g, (c = 4 * Math.ceil(c / 4)), m * l, o); + (c += g.BYTES_PER_ELEMENT * m * l), + (f[h] = { type: v, cardinality: m, values: A }); + } + c = 4 * Math.ceil(c / 4); + var y = null; + return ( + i && (y = bp(e, 1 === a ? Uint32Array : Uint16Array, c, u, o)), + { version: n, attributes: f, indices: y } + ); + } + var Sp = null, + Ep; + function _p() { + if (Ep) return Ep; + ((Ep = {}).toRGBA8 = function (e) { + var t = e.width, + n = e.height; + if (null == e.tabs.acTL) + return [Ep.toRGBA8.decodeImage(e.data, t, n, e).buffer]; + var r = []; + null == e.frames[0].data && (e.frames[0].data = e.data); + for ( + var i = t * n * 4, + a = new Uint8Array(i), + o = new Uint8Array(i), + s = new Uint8Array(i), + l = 0; + l < e.frames.length; + l++ + ) { + var u = e.frames[l], + c = u.rect.x, + f = u.rect.y, + d = u.rect.width, + h = u.rect.height, + p = Ep.toRGBA8.decodeImage(u.data, d, h, e); + if (0 != l) for (var v = 0; v < i; v++) s[v] = a[v]; + if ( + (0 == u.blend + ? Ep._copyTile(p, d, h, a, t, n, c, f, 0) + : 1 == u.blend && Ep._copyTile(p, d, h, a, t, n, c, f, 1), + r.push(a.buffer.slice(0)), + 1 == u.dispose) + ) + Ep._copyTile(o, d, h, a, t, n, c, f, 0); + else if (2 == u.dispose) for (v = 0; v < i; v++) a[v] = s[v]; + } + return r; + }), + (Ep.toRGBA8.decodeImage = function (e, t, n, r) { + var i = t * n, + a = Ep.decode._getBPP(r), + o = Math.ceil((t * a) / 8), + s = new Uint8Array(4 * i), + l = new Uint32Array(s.buffer), + u = r.ctype, + c = r.depth, + f = Ep._bin.readUshort; + if (6 == u) { + var d = i << 2; + if (8 == c) + for (var h = 0; h < d; h += 4) + (s[h] = e[h]), + (s[h + 1] = e[h + 1]), + (s[h + 2] = e[h + 2]), + (s[h + 3] = e[h + 3]); + if (16 == c) for (h = 0; h < d; h++) s[h] = e[h << 1]; + } else if (2 == u) { + var p = r.tabs.tRNS; + if (null == p) { + if (8 == c) + for (h = 0; h < i; h++) { + var v = 3 * h; + l[h] = + (255 << 24) | (e[v + 2] << 16) | (e[v + 1] << 8) | e[v]; + } + if (16 == c) + for (h = 0; h < i; h++) { + v = 6 * h; + l[h] = + (255 << 24) | (e[v + 4] << 16) | (e[v + 2] << 8) | e[v]; + } + } else { + var m = p[0], + g = p[1], + A = p[2]; + if (8 == c) + for (h = 0; h < i; h++) { + var y = h << 2; + v = 3 * h; + (l[h] = + (255 << 24) | + (e[v + 2] << 16) | + (e[v + 1] << 8) | + e[v]), + e[v] == m && + e[v + 1] == g && + e[v + 2] == A && + (s[y + 3] = 0); + } + if (16 == c) + for (h = 0; h < i; h++) { + (y = h << 2), (v = 6 * h); + (l[h] = + (255 << 24) | + (e[v + 4] << 16) | + (e[v + 2] << 8) | + e[v]), + f(e, v) == m && + f(e, v + 2) == g && + f(e, v + 4) == A && + (s[y + 3] = 0); + } + } + } else if (3 == u) { + var b = r.tabs.PLTE, + x = r.tabs.tRNS, + S = x ? x.length : 0; + if (1 == c) + for (var E = 0; E < n; E++) { + var _ = E * o, + C = E * t; + for (h = 0; h < t; h++) { + y = (C + h) << 2; + var w = + 3 * (T = (e[_ + (h >> 3)] >> (7 - ((7 & h) << 0))) & 1); + (s[y] = b[w]), + (s[y + 1] = b[w + 1]), + (s[y + 2] = b[w + 2]), + (s[y + 3] = T < S ? x[T] : 255); + } + } + if (2 == c) + for (E = 0; E < n; E++) + for (_ = E * o, C = E * t, h = 0; h < t; h++) { + (y = (C + h) << 2), + (w = + 3 * + (T = (e[_ + (h >> 2)] >> (6 - ((3 & h) << 1))) & 3)); + (s[y] = b[w]), + (s[y + 1] = b[w + 1]), + (s[y + 2] = b[w + 2]), + (s[y + 3] = T < S ? x[T] : 255); + } + if (4 == c) + for (E = 0; E < n; E++) + for (_ = E * o, C = E * t, h = 0; h < t; h++) { + (y = (C + h) << 2), + (w = + 3 * + (T = (e[_ + (h >> 1)] >> (4 - ((1 & h) << 2))) & 15)); + (s[y] = b[w]), + (s[y + 1] = b[w + 1]), + (s[y + 2] = b[w + 2]), + (s[y + 3] = T < S ? x[T] : 255); + } + if (8 == c) + for (h = 0; h < i; h++) { + var T; + (y = h << 2), (w = 3 * (T = e[h])); + (s[y] = b[w]), + (s[y + 1] = b[w + 1]), + (s[y + 2] = b[w + 2]), + (s[y + 3] = T < S ? x[T] : 255); + } + } else if (4 == u) { + if (8 == c) + for (h = 0; h < i; h++) { + y = h << 2; + var M = e[(I = h << 1)]; + (s[y] = M), + (s[y + 1] = M), + (s[y + 2] = M), + (s[y + 3] = e[I + 1]); + } + if (16 == c) + for (h = 0; h < i; h++) { + var I; + (y = h << 2), (M = e[(I = h << 2)]); + (s[y] = M), + (s[y + 1] = M), + (s[y + 2] = M), + (s[y + 3] = e[I + 2]); + } + } else if (0 == u) + for (m = r.tabs.tRNS ? r.tabs.tRNS : -1, E = 0; E < n; E++) { + var k = E * o, + R = E * t; + if (1 == c) + for (var B = 0; B < t; B++) { + var P = + (M = + 255 * ((e[k + (B >>> 3)] >>> (7 - (7 & B))) & 1)) == + 255 * m + ? 0 + : 255; + l[R + B] = (P << 24) | (M << 16) | (M << 8) | M; + } + else if (2 == c) + for (B = 0; B < t; B++) { + P = + (M = + 85 * + ((e[k + (B >>> 2)] >>> (6 - ((3 & B) << 1))) & 3)) == + 85 * m + ? 0 + : 255; + l[R + B] = (P << 24) | (M << 16) | (M << 8) | M; + } + else if (4 == c) + for (B = 0; B < t; B++) { + P = + (M = + 17 * + ((e[k + (B >>> 1)] >>> (4 - ((1 & B) << 2))) & 15)) == + 17 * m + ? 0 + : 255; + l[R + B] = (P << 24) | (M << 16) | (M << 8) | M; + } + else if (8 == c) + for (B = 0; B < t; B++) { + P = (M = e[k + B]) == m ? 0 : 255; + l[R + B] = (P << 24) | (M << 16) | (M << 8) | M; + } + else if (16 == c) + for (B = 0; B < t; B++) { + (M = e[k + (B << 1)]), + (P = f(e, k + (B << 1)) == m ? 0 : 255); + l[R + B] = (P << 24) | (M << 16) | (M << 8) | M; + } + } + return s; + }), + (Ep.decode = function (e) { + for ( + var t, + n, + r, + i, + a = new Uint8Array(e), + o = 8, + s = Ep._bin, + l = s.readUshort, + u = s.readUint, + c = { tabs: {}, frames: [] }, + f = new Uint8Array(a.length), + d = 0, + h = 0, + p = [137, 80, 78, 71, 13, 10, 26, 10], + v = 0; + v < 8; + v++ + ) + if (a[v] != p[v]) + throw new Error("The input is not a PNG file!"); + for (; o < a.length; ) { + var m = s.readUint(a, o); + o += 4; + var g = s.readASCII(a, o, 4); + if (((o += 4), "IHDR" == g)) Ep.decode._IHDR(a, o, c); + else if ("CgBI" == g) c.tabs[g] = a.slice(o, o + 4); + else if ("IDAT" == g) { + for (v = 0; v < m; v++) f[d + v] = a[o + v]; + d += m; + } else if ("acTL" == g) + (c.tabs[g] = { num_frames: u(a, o), num_plays: u(a, o + 4) }), + (t = new Uint8Array(a.length)); + else if ("fcTL" == g) { + var A; + if (0 != h) + ((A = c.frames[c.frames.length - 1]).data = + Ep.decode._decompress( + c, + t.slice(0, h), + A.rect.width, + A.rect.height + )), + (h = 0); + var y = { + x: u(a, o + 12), + y: u(a, o + 16), + width: u(a, o + 4), + height: u(a, o + 8), + }, + b = l(a, o + 22); + b = l(a, o + 20) / (0 == b ? 100 : b); + var x = { + rect: y, + delay: Math.round(1e3 * b), + dispose: a[o + 24], + blend: a[o + 25], + }; + c.frames.push(x); + } else if ("fdAT" == g) { + for (v = 0; v < m - 4; v++) t[h + v] = a[o + v + 4]; + h += m - 4; + } else if ("pHYs" == g) + c.tabs[g] = [ + s.readUint(a, o), + s.readUint(a, o + 4), + a[o + 8], + ]; + else if ("cHRM" == g) { + c.tabs[g] = []; + for (v = 0; v < 8; v++) + c.tabs[g].push(s.readUint(a, o + 4 * v)); + } else if ("tEXt" == g || "zTXt" == g) { + null == c.tabs[g] && (c.tabs[g] = {}); + var S = s.nextZero(a, o); + r = s.readASCII(a, o, S - o); + var E = o + m - S - 1; + "tEXt" == g + ? (n = s.readASCII(a, S + 1, E)) + : ((i = Ep.decode._inflate(a.slice(S + 2, S + 2 + E))), + (n = s.readUTF8(i, 0, i.length))), + (c.tabs[g][r] = n); + } else if ("iTXt" == g) { + null == c.tabs[g] && (c.tabs[g] = {}); + S = 0; + var _ = o; + (S = s.nextZero(a, _)), (r = s.readASCII(a, _, S - _)); + var C = a[(_ = S + 1)]; + (_ += 2), + (S = s.nextZero(a, _)), + s.readASCII(a, _, S - _), + (_ = S + 1), + (S = s.nextZero(a, _)), + s.readUTF8(a, _, S - _); + E = m - ((_ = S + 1) - o); + 0 == C + ? (n = s.readUTF8(a, _, E)) + : ((i = Ep.decode._inflate(a.slice(_, _ + E))), + (n = s.readUTF8(i, 0, i.length))), + (c.tabs[g][r] = n); + } else if ("PLTE" == g) c.tabs[g] = s.readBytes(a, o, m); + else if ("hIST" == g) { + var w = c.tabs.PLTE.length / 3; + c.tabs[g] = []; + for (v = 0; v < w; v++) c.tabs[g].push(l(a, o + 2 * v)); + } else if ("tRNS" == g) + 3 == c.ctype + ? (c.tabs[g] = s.readBytes(a, o, m)) + : 0 == c.ctype + ? (c.tabs[g] = l(a, o)) + : 2 == c.ctype && + (c.tabs[g] = [l(a, o), l(a, o + 2), l(a, o + 4)]); + else if ("gAMA" == g) c.tabs[g] = s.readUint(a, o) / 1e5; + else if ("sRGB" == g) c.tabs[g] = a[o]; + else if ("bKGD" == g) + 0 == c.ctype || 4 == c.ctype + ? (c.tabs[g] = [l(a, o)]) + : 2 == c.ctype || 6 == c.ctype + ? (c.tabs[g] = [l(a, o), l(a, o + 2), l(a, o + 4)]) + : 3 == c.ctype && (c.tabs[g] = a[o]); + else if ("IEND" == g) break; + (o += m), s.readUint(a, o), (o += 4); + } + 0 != h && + ((A = c.frames[c.frames.length - 1]).data = + Ep.decode._decompress( + c, + t.slice(0, h), + A.rect.width, + A.rect.height + )); + return ( + (c.data = Ep.decode._decompress(c, f, c.width, c.height)), + delete c.compress, + delete c.interlace, + delete c.filter, + c + ); + }), + (Ep.decode._decompress = function (e, t, n, r) { + var i = Ep.decode._getBPP(e), + a = Math.ceil((n * i) / 8), + o = new Uint8Array((a + 1 + e.interlace) * r); + return ( + (t = e.tabs.CgBI + ? Ep.inflateRaw(t, o) + : Ep.decode._inflate(t, o)), + 0 == e.interlace + ? (t = Ep.decode._filterZero(t, e, 0, n, r)) + : 1 == e.interlace && (t = Ep.decode._readInterlace(t, e)), + t + ); + }), + (Ep.decode._inflate = function (e, t) { + return Ep.inflateRaw( + new Uint8Array(e.buffer, 2, e.length - 6), + t + ); + }), + (Ep.inflateRaw = (function () { + var e = { H: {} }; + return ( + (e.H.N = function (t, n) { + var r, + i, + a = Uint8Array, + o = 0, + s = 0, + l = 0, + u = 0, + c = 0, + f = 0, + d = 0, + h = 0, + p = 0; + if (3 == t[0] && 0 == t[1]) return n || new a(0); + var v = e.H, + m = v.b, + g = v.e, + A = v.R, + y = v.n, + b = v.A, + x = v.Z, + S = v.m, + E = null == n; + for (E && (n = new a((t.length >>> 2) << 5)); 0 == o; ) + if ( + ((o = m(t, p, 1)), (s = m(t, p + 1, 2)), (p += 3), 0 != s) + ) { + if ( + (E && (n = e.H.W(n, h + (1 << 17))), + 1 == s && ((r = S.J), (i = S.h), (f = 511), (d = 31)), + 2 == s) + ) { + (l = g(t, p, 5) + 257), + (u = g(t, p + 5, 5) + 1), + (c = g(t, p + 10, 4) + 4), + (p += 14); + for (var _ = 1, C = 0; C < 38; C += 2) + (S.Q[C] = 0), (S.Q[C + 1] = 0); + for (C = 0; C < c; C++) { + var w = g(t, p + 3 * C, 3); + (S.Q[1 + (S.X[C] << 1)] = w), w > _ && (_ = w); + } + (p += 3 * c), + y(S.Q, _), + b(S.Q, _, S.u), + (r = S.w), + (i = S.d), + (p = A(S.u, (1 << _) - 1, l + u, t, p, S.v)); + var T = v.V(S.v, 0, l, S.C); + f = (1 << T) - 1; + var M = v.V(S.v, l, u, S.D); + (d = (1 << M) - 1), + y(S.C, T), + b(S.C, T, r), + y(S.D, M), + b(S.D, M, i); + } + for (;;) { + var I = r[x(t, p) & f]; + p += 15 & I; + var k = I >>> 4; + if (k >>> 8 == 0) n[h++] = k; + else { + if (256 == k) break; + var R = h + k - 254; + if (k > 264) { + var B = S.q[k - 257]; + (R = h + (B >>> 3) + g(t, p, 7 & B)), (p += 7 & B); + } + var P = i[x(t, p) & d]; + p += 15 & P; + var L = P >>> 4, + D = S.c[L], + U = (D >>> 4) + m(t, p, 15 & D); + for (p += 15 & D; h < R; ) + (n[h] = n[h++ - U]), + (n[h] = n[h++ - U]), + (n[h] = n[h++ - U]), + (n[h] = n[h++ - U]); + h = R; + } + } + } else { + 0 != (7 & p) && (p += 8 - (7 & p)); + var F = 4 + (p >>> 3), + O = t[F - 4] | (t[F - 3] << 8); + E && (n = e.H.W(n, h + O)), + n.set(new a(t.buffer, t.byteOffset + F, O), h), + (p = (F + O) << 3), + (h += O); + } + return n.length == h ? n : n.slice(0, h); + }), + (e.H.W = function (e, t) { + var n = e.length; + if (t <= n) return e; + var r = new Uint8Array(n << 1); + return r.set(e, 0), r; + }), + (e.H.R = function (t, n, r, i, a, o) { + for (var s = e.H.e, l = e.H.Z, u = 0; u < r; ) { + var c = t[l(i, a) & n]; + a += 15 & c; + var f = c >>> 4; + if (f <= 15) (o[u] = f), u++; + else { + var d = 0, + h = 0; + 16 == f + ? ((h = 3 + s(i, a, 2)), (a += 2), (d = o[u - 1])) + : 17 == f + ? ((h = 3 + s(i, a, 3)), (a += 3)) + : 18 == f && ((h = 11 + s(i, a, 7)), (a += 7)); + for (var p = u + h; u < p; ) (o[u] = d), u++; + } + } + return a; + }), + (e.H.V = function (e, t, n, r) { + for (var i = 0, a = 0, o = r.length >>> 1; a < n; ) { + var s = e[a + t]; + (r[a << 1] = 0), + (r[1 + (a << 1)] = s), + s > i && (i = s), + a++; + } + for (; a < o; ) (r[a << 1] = 0), (r[1 + (a << 1)] = 0), a++; + return i; + }), + (e.H.n = function (t, n) { + for ( + var r, i, a, o, s = e.H.m, l = t.length, u = s.j, c = 0; + c <= n; + c++ + ) + u[c] = 0; + for (c = 1; c < l; c += 2) u[t[c]]++; + var f = s.K; + for (r = 0, u[0] = 0, i = 1; i <= n; i++) + (r = (r + u[i - 1]) << 1), (f[i] = r); + for (a = 0; a < l; a += 2) + 0 != (o = t[a + 1]) && ((t[a] = f[o]), f[o]++); + }), + (e.H.A = function (t, n, r) { + for (var i = t.length, a = e.H.m.r, o = 0; o < i; o += 2) + if (0 != t[o + 1]) + for ( + var s = o >> 1, + l = t[o + 1], + u = (s << 4) | l, + c = n - l, + f = t[o] << c, + d = f + (1 << c); + f != d; + + ) { + (r[a[f] >>> (15 - n)] = u), f++; + } + }), + (e.H.l = function (t, n) { + for ( + var r = e.H.m.r, i = 15 - n, a = 0; + a < t.length; + a += 2 + ) { + var o = t[a] << (n - t[a + 1]); + t[a] = r[o] >>> i; + } + }), + (e.H.M = function (e, t, n) { + n <<= 7 & t; + var r = t >>> 3; + (e[r] |= n), (e[r + 1] |= n >>> 8); + }), + (e.H.I = function (e, t, n) { + n <<= 7 & t; + var r = t >>> 3; + (e[r] |= n), (e[r + 1] |= n >>> 8), (e[r + 2] |= n >>> 16); + }), + (e.H.e = function (e, t, n) { + return ( + ((e[t >>> 3] | (e[1 + (t >>> 3)] << 8)) >>> (7 & t)) & + ((1 << n) - 1) + ); + }), + (e.H.b = function (e, t, n) { + return ( + ((e[t >>> 3] | + (e[1 + (t >>> 3)] << 8) | + (e[2 + (t >>> 3)] << 16)) >>> + (7 & t)) & + ((1 << n) - 1) + ); + }), + (e.H.Z = function (e, t) { + return ( + (e[t >>> 3] | + (e[1 + (t >>> 3)] << 8) | + (e[2 + (t >>> 3)] << 16)) >>> + (7 & t) + ); + }), + (e.H.i = function (e, t) { + return ( + (e[t >>> 3] | + (e[1 + (t >>> 3)] << 8) | + (e[2 + (t >>> 3)] << 16) | + (e[3 + (t >>> 3)] << 24)) >>> + (7 & t) + ); + }), + (e.H.m = (function () { + var e = Uint16Array, + t = Uint32Array; + return { + K: new e(16), + j: new e(16), + X: [ + 16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, + 1, 15, + ], + S: [ + 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31, + 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, + 999, 999, 999, + ], + T: [ + 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, + 3, 4, 4, 4, 4, 5, 5, 5, 5, 0, 0, 0, 0, + ], + q: new e(32), + p: [ + 1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, + 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145, + 8193, 12289, 16385, 24577, 65535, 65535, + ], + z: [ + 0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, + 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, 0, 0, + ], + c: new t(32), + J: new e(512), + _: [], + h: new e(32), + $: [], + w: new e(32768), + C: [], + v: [], + d: new e(32768), + D: [], + u: new e(512), + Q: [], + r: new e(32768), + s: new t(286), + Y: new t(30), + a: new t(19), + t: new t(15e3), + k: new e(65536), + g: new e(32768), + }; + })()), + (function () { + for (var t = e.H.m, n = 0; n < 32768; n++) { + var r = n; + (r = + ((4278255360 & + (r = + ((4042322160 & + (r = + ((3435973836 & + (r = + ((2863311530 & r) >>> 1) | + ((1431655765 & r) << 1))) >>> + 2) | + ((858993459 & r) << 2))) >>> + 4) | + ((252645135 & r) << 4))) >>> + 8) | + ((16711935 & r) << 8)), + (t.r[n] = ((r >>> 16) | (r << 16)) >>> 17); + } + function i(e, t, n) { + for (; 0 != t--; ) e.push(0, n); + } + for (n = 0; n < 32; n++) + (t.q[n] = (t.S[n] << 3) | t.T[n]), + (t.c[n] = (t.p[n] << 4) | t.z[n]); + i(t._, 144, 8), + i(t._, 112, 9), + i(t._, 24, 7), + i(t._, 8, 8), + e.H.n(t._, 9), + e.H.A(t._, 9, t.J), + e.H.l(t._, 9), + i(t.$, 32, 5), + e.H.n(t.$, 5), + e.H.A(t.$, 5, t.h), + e.H.l(t.$, 5), + i(t.Q, 19, 0), + i(t.C, 286, 0), + i(t.D, 30, 0), + i(t.v, 320, 0); + })(), + e.H.N + ); + })()), + (Ep.decode._readInterlace = function (e, t) { + for ( + var n = t.width, + r = t.height, + i = Ep.decode._getBPP(t), + a = i >> 3, + o = Math.ceil((n * i) / 8), + s = new Uint8Array(r * o), + l = 0, + u = [0, 0, 4, 0, 2, 0, 1], + c = [0, 4, 0, 2, 0, 1, 0], + f = [8, 8, 8, 4, 4, 2, 2], + d = [8, 8, 4, 4, 2, 2, 1], + h = 0; + h < 7; + + ) { + for (var p = f[h], v = d[h], m = 0, g = 0, A = u[h]; A < r; ) + (A += p), g++; + for (var y = c[h]; y < n; ) (y += v), m++; + var b = Math.ceil((m * i) / 8); + Ep.decode._filterZero(e, t, l, m, g); + for (var x, S = 0, E = u[h]; E < r; ) { + for (var _ = c[h], C = (l + S * b) << 3; _ < n; ) { + if ( + (1 == i && + ((x = ((x = e[C >> 3]) >> (7 - (7 & C))) & 1), + (s[E * o + (_ >> 3)] |= x << (7 - ((7 & _) << 0)))), + 2 == i && + ((x = ((x = e[C >> 3]) >> (6 - (7 & C))) & 3), + (s[E * o + (_ >> 2)] |= x << (6 - ((3 & _) << 1)))), + 4 == i && + ((x = ((x = e[C >> 3]) >> (4 - (7 & C))) & 15), + (s[E * o + (_ >> 1)] |= x << (4 - ((1 & _) << 2)))), + i >= 8) + ) + for (var w = E * o + _ * a, T = 0; T < a; T++) + s[w + T] = e[(C >> 3) + T]; + (C += i), (_ += v); + } + S++, (E += p); + } + m * g != 0 && (l += g * (1 + b)), (h += 1); + } + return s; + }), + (Ep.decode._getBPP = function (e) { + return [1, null, 3, 1, 2, null, 4][e.ctype] * e.depth; + }), + (Ep.decode._filterZero = function (e, t, n, r, i) { + var a = Ep.decode._getBPP(t), + o = Math.ceil((r * a) / 8), + s = Ep.decode._paeth; + a = Math.ceil(a / 8); + var l, + u, + c = e[n], + f = 0; + if ((c > 1 && (e[n] = [0, 0, 1][c - 2]), 3 == c)) + for (f = a; f < o; f++) + e[f + 1] = (e[f + 1] + (e[f + 1 - a] >>> 1)) & 255; + for (var d = 0; d < i; d++) + if (((f = 0), 0 == (c = e[(u = (l = n + d * o) + d + 1) - 1]))) + for (; f < o; f++) e[l + f] = e[u + f]; + else if (1 == c) { + for (; f < a; f++) e[l + f] = e[u + f]; + for (; f < o; f++) e[l + f] = e[u + f] + e[l + f - a]; + } else if (2 == c) + for (; f < o; f++) e[l + f] = e[u + f] + e[l + f - o]; + else if (3 == c) { + for (; f < a; f++) e[l + f] = e[u + f] + (e[l + f - o] >>> 1); + for (; f < o; f++) + e[l + f] = e[u + f] + ((e[l + f - o] + e[l + f - a]) >>> 1); + } else { + for (; f < a; f++) + e[l + f] = e[u + f] + s(0, e[l + f - o], 0); + for (; f < o; f++) + e[l + f] = + e[u + f] + + s(e[l + f - a], e[l + f - o], e[l + f - a - o]); + } + return e; + }), + (Ep.decode._paeth = function (e, t, n) { + var r = e + t - n, + i = r - e, + a = r - t, + o = r - n; + return i * i <= a * a && i * i <= o * o + ? e + : a * a <= o * o + ? t + : n; + }), + (Ep.decode._IHDR = function (e, t, n) { + var r = Ep._bin; + (n.width = r.readUint(e, t)), + (t += 4), + (n.height = r.readUint(e, t)), + (t += 4), + (n.depth = e[t]), + t++, + (n.ctype = e[t]), + t++, + (n.compress = e[t]), + t++, + (n.filter = e[t]), + t++, + (n.interlace = e[t]), + t++; + }), + (Ep._bin = { + nextZero: function (e, t) { + for (; 0 != e[t]; ) t++; + return t; + }, + readUshort: function (e, t) { + return (e[t] << 8) | e[t + 1]; + }, + writeUshort: function (e, t, n) { + (e[t] = (n >> 8) & 255), (e[t + 1] = 255 & n); + }, + readUint: function (e, t) { + return ( + 16777216 * e[t] + + ((e[t + 1] << 16) | (e[t + 2] << 8) | e[t + 3]) + ); + }, + writeUint: function (e, t, n) { + (e[t] = (n >> 24) & 255), + (e[t + 1] = (n >> 16) & 255), + (e[t + 2] = (n >> 8) & 255), + (e[t + 3] = 255 & n); + }, + readASCII: function (e, t, n) { + for (var r = "", i = 0; i < n; i++) + r += String.fromCharCode(e[t + i]); + return r; + }, + writeASCII: function (e, t, n) { + for (var r = 0; r < n.length; r++) e[t + r] = n.charCodeAt(r); + }, + readBytes: function (e, t, n) { + for (var r = [], i = 0; i < n; i++) r.push(e[t + i]); + return r; + }, + pad: function (e) { + return e.length < 2 ? "0" + e : e; + }, + readUTF8: function (e, t, n) { + for (var r, i = "", a = 0; a < n; a++) + i += "%" + Ep._bin.pad(e[t + a].toString(16)); + try { + r = decodeURIComponent(i); + } catch (o) { + return Ep._bin.readASCII(e, t, n); + } + return r; + }, + }), + (Ep._copyTile = function (e, t, n, r, i, a, o, s, l) { + for ( + var u = Math.min(t, i), c = Math.min(n, a), f = 0, d = 0, h = 0; + h < c; + h++ + ) + for (var p = 0; p < u; p++) + if ( + (o >= 0 && s >= 0 + ? ((f = (h * t + p) << 2), + (d = ((s + h) * i + o + p) << 2)) + : ((f = ((-s + h) * t - o + p) << 2), + (d = (h * i + p) << 2)), + 0 == l) + ) + (r[d] = e[f]), + (r[d + 1] = e[f + 1]), + (r[d + 2] = e[f + 2]), + (r[d + 3] = e[f + 3]); + else if (1 == l) { + var v = e[f + 3] * (1 / 255), + m = e[f] * v, + g = e[f + 1] * v, + A = e[f + 2] * v, + y = r[d + 3] * (1 / 255), + b = r[d] * y, + x = r[d + 1] * y, + S = r[d + 2] * y, + E = 1 - v, + _ = v + y * E, + C = 0 == _ ? 0 : 1 / _; + (r[d + 3] = 255 * _), + (r[d + 0] = (m + b * E) * C), + (r[d + 1] = (g + x * E) * C), + (r[d + 2] = (A + S * E) * C); + } else if (2 == l) { + (v = e[f + 3]), + (m = e[f]), + (g = e[f + 1]), + (A = e[f + 2]), + (y = r[d + 3]), + (b = r[d]), + (x = r[d + 1]), + (S = r[d + 2]); + v == y && m == b && g == x && A == S + ? ((r[d] = 0), + (r[d + 1] = 0), + (r[d + 2] = 0), + (r[d + 3] = 0)) + : ((r[d] = m), + (r[d + 1] = g), + (r[d + 2] = A), + (r[d + 3] = v)); + } else if (3 == l) { + (v = e[f + 3]), + (m = e[f]), + (g = e[f + 1]), + (A = e[f + 2]), + (y = r[d + 3]), + (b = r[d]), + (x = r[d + 1]), + (S = r[d + 2]); + if (v == y && m == b && g == x && A == S) continue; + if (v < 220 && y > 20) return !1; + } + return !0; + }); + } + var Cp = null, + wp = null, + Tp = null, + Mp = null, + Ip = null, + kp = null, + Rp = null, + Bp = null, + Pp = null, + Lp = null, + Dp; + function Up(e) { + return e % 2; + } + function Fp(e) { + return e.length + 1 + (Up(e.length + 1) ? 1 : 0); + } + function Op(e, t, n) { + console.log(new TextDecoder().decode(new Uint8Array(e, t, n))); + } + var Np = null, + Gp = null, + Zp = null, + zp = null; + function Qp(e, t) { + var n = e.indexOf(t); + return -1 === n ? "./" : e.substr(0, n); + } + var Hp = null, + Vp = new A.Box3(), + jp = new A.Vector3(), + Wp = (function (e) { + (0, m.Z)(n, e); + var t = (0, g.Z)(n); + function n() { + var e; + (0, p.Z)(this, n), + ((e = t.call(this)).isLineSegmentsGeometry = !0), + (e.type = "LineSegmentsGeometry"); + return ( + e.setIndex([ + 0, 2, 1, 2, 3, 1, 2, 4, 3, 4, 5, 3, 4, 6, 5, 6, 7, 5, + ]), + e.setAttribute( + "position", + new A.Float32BufferAttribute( + [ + -1, 2, 0, 1, 2, 0, -1, 1, 0, 1, 1, 0, -1, 0, 0, 1, 0, 0, + -1, -1, 0, 1, -1, 0, + ], + 3 + ) + ), + e.setAttribute( + "uv", + new A.Float32BufferAttribute( + [-1, 2, 1, 2, -1, 1, 1, 1, -1, -1, 1, -1, -1, -2, 1, -2], + 2 + ) + ), + e + ); + } + return ( + (0, v.Z)(n, [ + { + key: "applyMatrix4", + value: function (e) { + var t = this.attributes.instanceStart, + n = this.attributes.instanceEnd; + return ( + void 0 !== t && + (t.applyMatrix4(e), + n.applyMatrix4(e), + (t.needsUpdate = !0)), + null !== this.boundingBox && this.computeBoundingBox(), + null !== this.boundingSphere && + this.computeBoundingSphere(), + this + ); + }, + }, + { + key: "setPositions", + value: function (e) { + var t; + e instanceof Float32Array + ? (t = e) + : Array.isArray(e) && (t = new Float32Array(e)); + var n = new A.InstancedInterleavedBuffer(t, 6, 1); + return ( + this.setAttribute( + "instanceStart", + new A.InterleavedBufferAttribute(n, 3, 0) + ), + this.setAttribute( + "instanceEnd", + new A.InterleavedBufferAttribute(n, 3, 3) + ), + this.computeBoundingBox(), + this.computeBoundingSphere(), + this + ); + }, + }, + { + key: "setColors", + value: function (e) { + var t; + e instanceof Float32Array + ? (t = e) + : Array.isArray(e) && (t = new Float32Array(e)); + var n = new A.InstancedInterleavedBuffer(t, 6, 1); + return ( + this.setAttribute( + "instanceColorStart", + new A.InterleavedBufferAttribute(n, 3, 0) + ), + this.setAttribute( + "instanceColorEnd", + new A.InterleavedBufferAttribute(n, 3, 3) + ), + this + ); + }, + }, + { + key: "fromWireframeGeometry", + value: function (e) { + return this.setPositions(e.attributes.position.array), this; + }, + }, + { + key: "fromEdgesGeometry", + value: function (e) { + return this.setPositions(e.attributes.position.array), this; + }, + }, + { + key: "fromMesh", + value: function (e) { + return ( + this.fromWireframeGeometry( + new A.WireframeGeometry(e.geometry) + ), + this + ); + }, + }, + { + key: "fromLineSegments", + value: function (e) { + var t = e.geometry; + return this.setPositions(t.attributes.position.array), this; + }, + }, + { + key: "computeBoundingBox", + value: function () { + null === this.boundingBox && + (this.boundingBox = new A.Box3()); + var e = this.attributes.instanceStart, + t = this.attributes.instanceEnd; + void 0 !== e && + void 0 !== t && + (this.boundingBox.setFromBufferAttribute(e), + Vp.setFromBufferAttribute(t), + this.boundingBox.union(Vp)); + }, + }, + { + key: "computeBoundingSphere", + value: function () { + null === this.boundingSphere && + (this.boundingSphere = new A.Sphere()), + null === this.boundingBox && this.computeBoundingBox(); + var e = this.attributes.instanceStart, + t = this.attributes.instanceEnd; + if (void 0 !== e && void 0 !== t) { + var n = this.boundingSphere.center; + this.boundingBox.getCenter(n); + for (var r = 0, i = 0, a = e.count; i < a; i++) + jp.fromBufferAttribute(e, i), + (r = Math.max(r, n.distanceToSquared(jp))), + jp.fromBufferAttribute(t, i), + (r = Math.max(r, n.distanceToSquared(jp))); + (this.boundingSphere.radius = Math.sqrt(r)), + isNaN(this.boundingSphere.radius) && + console.error( + "THREE.LineSegmentsGeometry.computeBoundingSphere(): Computed radius is NaN. The instanced position data is likely to have NaN values.", + this + ); + } + }, + }, + { key: "toJSON", value: function () {} }, + { + key: "applyMatrix", + value: function (e) { + return ( + console.warn( + "THREE.LineSegmentsGeometry: applyMatrix() has been renamed to applyMatrix4()." + ), + this.applyMatrix4(e) + ); + }, + }, + ]), + n + ); + })(A.InstancedBufferGeometry), + Xp = (function (e) { + (0, m.Z)(n, e); + var t = (0, g.Z)(n); + function n() { + var e; + return ( + (0, p.Z)(this, n), + ((e = t.call(this)).isLineGeometry = !0), + (e.type = "LineGeometry"), + e + ); + } + return ( + (0, v.Z)(n, [ + { + key: "setPositions", + value: function (e) { + for ( + var t = e.length - 3, r = new Float32Array(2 * t), i = 0; + i < t; + i += 3 + ) + (r[2 * i] = e[i]), + (r[2 * i + 1] = e[i + 1]), + (r[2 * i + 2] = e[i + 2]), + (r[2 * i + 3] = e[i + 3]), + (r[2 * i + 4] = e[i + 4]), + (r[2 * i + 5] = e[i + 5]); + return ( + (0, d.Z)( + (0, h.Z)(n.prototype), + "setPositions", + this + ).call(this, r), + this + ); + }, + }, + { + key: "setColors", + value: function (e) { + for ( + var t = e.length - 3, r = new Float32Array(2 * t), i = 0; + i < t; + i += 3 + ) + (r[2 * i] = e[i]), + (r[2 * i + 1] = e[i + 1]), + (r[2 * i + 2] = e[i + 2]), + (r[2 * i + 3] = e[i + 3]), + (r[2 * i + 4] = e[i + 4]), + (r[2 * i + 5] = e[i + 5]); + return ( + (0, d.Z)((0, h.Z)(n.prototype), "setColors", this).call( + this, + r + ), + this + ); + }, + }, + { + key: "fromLine", + value: function (e) { + var t = e.geometry; + return this.setPositions(t.attributes.position.array), this; + }, + }, + ]), + n + ); + })(Wp), + Yp = (function (e) { + (0, m.Z)(n, e); + var t = (0, g.Z)(n); + function n(e) { + var r; + return ( + (0, p.Z)(this, n), + ((r = t.call(this, { + type: "LineMaterial", + uniforms: A.UniformsUtils.clone( + A.UniformsUtils.merge([ + A.UniformsLib.common, + A.UniformsLib.fog, + { + worldUnits: { value: 1 }, + linewidth: { value: 1 }, + resolution: { value: new A.Vector2(1, 1) }, + dashOffset: { value: 0 }, + dashScale: { value: 1 }, + dashSize: { value: 1 }, + gapSize: { value: 1 }, + }, + ]) + ), + vertexShader: + "\n\t\t\t\t#include \n\t\t\t\t#include \n\t\t\t\t#include \n\t\t\t\t#include \n\t\t\t\t#include \n\n\t\t\t\tuniform float linewidth;\n\t\t\t\tuniform vec2 resolution;\n\n\t\t\t\tattribute vec3 instanceStart;\n\t\t\t\tattribute vec3 instanceEnd;\n\n\t\t\t\tattribute vec3 instanceColorStart;\n\t\t\t\tattribute vec3 instanceColorEnd;\n\n\t\t\t\t#ifdef WORLD_UNITS\n\n\t\t\t\t\tvarying vec4 worldPos;\n\t\t\t\t\tvarying vec3 worldStart;\n\t\t\t\t\tvarying vec3 worldEnd;\n\n\t\t\t\t\t#ifdef USE_DASH\n\n\t\t\t\t\t\tvarying vec2 vUv;\n\n\t\t\t\t\t#endif\n\n\t\t\t\t#else\n\n\t\t\t\t\tvarying vec2 vUv;\n\n\t\t\t\t#endif\n\n\t\t\t\t#ifdef USE_DASH\n\n\t\t\t\t\tuniform float dashScale;\n\t\t\t\t\tattribute float instanceDistanceStart;\n\t\t\t\t\tattribute float instanceDistanceEnd;\n\t\t\t\t\tvarying float vLineDistance;\n\n\t\t\t\t#endif\n\n\t\t\t\tvoid trimSegment( const in vec4 start, inout vec4 end ) {\n\n\t\t\t\t\t// trim end segment so it terminates between the camera plane and the near plane\n\n\t\t\t\t\t// conservative estimate of the near plane\n\t\t\t\t\tfloat a = projectionMatrix[ 2 ][ 2 ]; // 3nd entry in 3th column\n\t\t\t\t\tfloat b = projectionMatrix[ 3 ][ 2 ]; // 3nd entry in 4th column\n\t\t\t\t\tfloat nearEstimate = - 0.5 * b / a;\n\n\t\t\t\t\tfloat alpha = ( nearEstimate - start.z ) / ( end.z - start.z );\n\n\t\t\t\t\tend.xyz = mix( start.xyz, end.xyz, alpha );\n\n\t\t\t\t}\n\n\t\t\t\tvoid main() {\n\n\t\t\t\t\t#ifdef USE_COLOR\n\n\t\t\t\t\t\tvColor.xyz = ( position.y < 0.5 ) ? instanceColorStart : instanceColorEnd;\n\n\t\t\t\t\t#endif\n\n\t\t\t\t\t#ifdef USE_DASH\n\n\t\t\t\t\t\tvLineDistance = ( position.y < 0.5 ) ? dashScale * instanceDistanceStart : dashScale * instanceDistanceEnd;\n\t\t\t\t\t\tvUv = uv;\n\n\t\t\t\t\t#endif\n\n\t\t\t\t\tfloat aspect = resolution.x / resolution.y;\n\n\t\t\t\t\t// camera space\n\t\t\t\t\tvec4 start = modelViewMatrix * vec4( instanceStart, 1.0 );\n\t\t\t\t\tvec4 end = modelViewMatrix * vec4( instanceEnd, 1.0 );\n\n\t\t\t\t\t#ifdef WORLD_UNITS\n\n\t\t\t\t\t\tworldStart = start.xyz;\n\t\t\t\t\t\tworldEnd = end.xyz;\n\n\t\t\t\t\t#else\n\n\t\t\t\t\t\tvUv = uv;\n\n\t\t\t\t\t#endif\n\n\t\t\t\t\t// special case for perspective projection, and segments that terminate either in, or behind, the camera plane\n\t\t\t\t\t// clearly the gpu firmware has a way of addressing this issue when projecting into ndc space\n\t\t\t\t\t// but we need to perform ndc-space calculations in the shader, so we must address this issue directly\n\t\t\t\t\t// perhaps there is a more elegant solution -- WestLangley\n\n\t\t\t\t\tbool perspective = ( projectionMatrix[ 2 ][ 3 ] == - 1.0 ); // 4th entry in the 3rd column\n\n\t\t\t\t\tif ( perspective ) {\n\n\t\t\t\t\t\tif ( start.z < 0.0 && end.z >= 0.0 ) {\n\n\t\t\t\t\t\t\ttrimSegment( start, end );\n\n\t\t\t\t\t\t} else if ( end.z < 0.0 && start.z >= 0.0 ) {\n\n\t\t\t\t\t\t\ttrimSegment( end, start );\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t\t// clip space\n\t\t\t\t\tvec4 clipStart = projectionMatrix * start;\n\t\t\t\t\tvec4 clipEnd = projectionMatrix * end;\n\n\t\t\t\t\t// ndc space\n\t\t\t\t\tvec3 ndcStart = clipStart.xyz / clipStart.w;\n\t\t\t\t\tvec3 ndcEnd = clipEnd.xyz / clipEnd.w;\n\n\t\t\t\t\t// direction\n\t\t\t\t\tvec2 dir = ndcEnd.xy - ndcStart.xy;\n\n\t\t\t\t\t// account for clip-space aspect ratio\n\t\t\t\t\tdir.x *= aspect;\n\t\t\t\t\tdir = normalize( dir );\n\n\t\t\t\t\t#ifdef WORLD_UNITS\n\n\t\t\t\t\t\t// get the offset direction as perpendicular to the view vector\n\t\t\t\t\t\tvec3 worldDir = normalize( end.xyz - start.xyz );\n\t\t\t\t\t\tvec3 offset;\n\t\t\t\t\t\tif ( position.y < 0.5 ) {\n\n\t\t\t\t\t\t\toffset = normalize( cross( start.xyz, worldDir ) );\n\n\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\toffset = normalize( cross( end.xyz, worldDir ) );\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// sign flip\n\t\t\t\t\t\tif ( position.x < 0.0 ) offset *= - 1.0;\n\n\t\t\t\t\t\tfloat forwardOffset = dot( worldDir, vec3( 0.0, 0.0, 1.0 ) );\n\n\t\t\t\t\t\t// don't extend the line if we're rendering dashes because we\n\t\t\t\t\t\t// won't be rendering the endcaps\n\t\t\t\t\t\t#ifndef USE_DASH\n\n\t\t\t\t\t\t\t// extend the line bounds to encompass endcaps\n\t\t\t\t\t\t\tstart.xyz += - worldDir * linewidth * 0.5;\n\t\t\t\t\t\t\tend.xyz += worldDir * linewidth * 0.5;\n\n\t\t\t\t\t\t\t// shift the position of the quad so it hugs the forward edge of the line\n\t\t\t\t\t\t\toffset.xy -= dir * forwardOffset;\n\t\t\t\t\t\t\toffset.z += 0.5;\n\n\t\t\t\t\t\t#endif\n\n\t\t\t\t\t\t// endcaps\n\t\t\t\t\t\tif ( position.y > 1.0 || position.y < 0.0 ) {\n\n\t\t\t\t\t\t\toffset.xy += dir * 2.0 * forwardOffset;\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// adjust for linewidth\n\t\t\t\t\t\toffset *= linewidth * 0.5;\n\n\t\t\t\t\t\t// set the world position\n\t\t\t\t\t\tworldPos = ( position.y < 0.5 ) ? start : end;\n\t\t\t\t\t\tworldPos.xyz += offset;\n\n\t\t\t\t\t\t// project the worldpos\n\t\t\t\t\t\tvec4 clip = projectionMatrix * worldPos;\n\n\t\t\t\t\t\t// shift the depth of the projected points so the line\n\t\t\t\t\t\t// segments overlap neatly\n\t\t\t\t\t\tvec3 clipPose = ( position.y < 0.5 ) ? ndcStart : ndcEnd;\n\t\t\t\t\t\tclip.z = clipPose.z * clip.w;\n\n\t\t\t\t\t#else\n\n\t\t\t\t\t\tvec2 offset = vec2( dir.y, - dir.x );\n\t\t\t\t\t\t// undo aspect ratio adjustment\n\t\t\t\t\t\tdir.x /= aspect;\n\t\t\t\t\t\toffset.x /= aspect;\n\n\t\t\t\t\t\t// sign flip\n\t\t\t\t\t\tif ( position.x < 0.0 ) offset *= - 1.0;\n\n\t\t\t\t\t\t// endcaps\n\t\t\t\t\t\tif ( position.y < 0.0 ) {\n\n\t\t\t\t\t\t\toffset += - dir;\n\n\t\t\t\t\t\t} else if ( position.y > 1.0 ) {\n\n\t\t\t\t\t\t\toffset += dir;\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// adjust for linewidth\n\t\t\t\t\t\toffset *= linewidth;\n\n\t\t\t\t\t\t// adjust for clip-space to screen-space conversion // maybe resolution should be based on viewport ...\n\t\t\t\t\t\toffset /= resolution.y;\n\n\t\t\t\t\t\t// select end\n\t\t\t\t\t\tvec4 clip = ( position.y < 0.5 ) ? clipStart : clipEnd;\n\n\t\t\t\t\t\t// back to clip space\n\t\t\t\t\t\toffset *= clip.w;\n\n\t\t\t\t\t\tclip.xy += offset;\n\n\t\t\t\t\t#endif\n\n\t\t\t\t\tgl_Position = clip;\n\n\t\t\t\t\tvec4 mvPosition = ( position.y < 0.5 ) ? start : end; // this is an approximation\n\n\t\t\t\t\t#include \n\t\t\t\t\t#include \n\t\t\t\t\t#include \n\n\t\t\t\t}\n\t\t\t", + fragmentShader: + "\n\t\t\t\tuniform vec3 diffuse;\n\t\t\t\tuniform float opacity;\n\t\t\t\tuniform float linewidth;\n\n\t\t\t\t#ifdef USE_DASH\n\n\t\t\t\t\tuniform float dashOffset;\n\t\t\t\t\tuniform float dashSize;\n\t\t\t\t\tuniform float gapSize;\n\n\t\t\t\t#endif\n\n\t\t\t\tvarying float vLineDistance;\n\n\t\t\t\t#ifdef WORLD_UNITS\n\n\t\t\t\t\tvarying vec4 worldPos;\n\t\t\t\t\tvarying vec3 worldStart;\n\t\t\t\t\tvarying vec3 worldEnd;\n\n\t\t\t\t\t#ifdef USE_DASH\n\n\t\t\t\t\t\tvarying vec2 vUv;\n\n\t\t\t\t\t#endif\n\n\t\t\t\t#else\n\n\t\t\t\t\tvarying vec2 vUv;\n\n\t\t\t\t#endif\n\n\t\t\t\t#include \n\t\t\t\t#include \n\t\t\t\t#include \n\t\t\t\t#include \n\t\t\t\t#include \n\n\t\t\t\tvec2 closestLineToLine(vec3 p1, vec3 p2, vec3 p3, vec3 p4) {\n\n\t\t\t\t\tfloat mua;\n\t\t\t\t\tfloat mub;\n\n\t\t\t\t\tvec3 p13 = p1 - p3;\n\t\t\t\t\tvec3 p43 = p4 - p3;\n\n\t\t\t\t\tvec3 p21 = p2 - p1;\n\n\t\t\t\t\tfloat d1343 = dot( p13, p43 );\n\t\t\t\t\tfloat d4321 = dot( p43, p21 );\n\t\t\t\t\tfloat d1321 = dot( p13, p21 );\n\t\t\t\t\tfloat d4343 = dot( p43, p43 );\n\t\t\t\t\tfloat d2121 = dot( p21, p21 );\n\n\t\t\t\t\tfloat denom = d2121 * d4343 - d4321 * d4321;\n\n\t\t\t\t\tfloat numer = d1343 * d4321 - d1321 * d4343;\n\n\t\t\t\t\tmua = numer / denom;\n\t\t\t\t\tmua = clamp( mua, 0.0, 1.0 );\n\t\t\t\t\tmub = ( d1343 + d4321 * ( mua ) ) / d4343;\n\t\t\t\t\tmub = clamp( mub, 0.0, 1.0 );\n\n\t\t\t\t\treturn vec2( mua, mub );\n\n\t\t\t\t}\n\n\t\t\t\tvoid main() {\n\n\t\t\t\t\t#include \n\n\t\t\t\t\t#ifdef USE_DASH\n\n\t\t\t\t\t\tif ( vUv.y < - 1.0 || vUv.y > 1.0 ) discard; // discard endcaps\n\n\t\t\t\t\t\tif ( mod( vLineDistance + dashOffset, dashSize + gapSize ) > dashSize ) discard; // todo - FIX\n\n\t\t\t\t\t#endif\n\n\t\t\t\t\tfloat alpha = opacity;\n\n\t\t\t\t\t#ifdef WORLD_UNITS\n\n\t\t\t\t\t\t// Find the closest points on the view ray and the line segment\n\t\t\t\t\t\tvec3 rayEnd = normalize( worldPos.xyz ) * 1e5;\n\t\t\t\t\t\tvec3 lineDir = worldEnd - worldStart;\n\t\t\t\t\t\tvec2 params = closestLineToLine( worldStart, worldEnd, vec3( 0.0, 0.0, 0.0 ), rayEnd );\n\n\t\t\t\t\t\tvec3 p1 = worldStart + lineDir * params.x;\n\t\t\t\t\t\tvec3 p2 = rayEnd * params.y;\n\t\t\t\t\t\tvec3 delta = p1 - p2;\n\t\t\t\t\t\tfloat len = length( delta );\n\t\t\t\t\t\tfloat norm = len / linewidth;\n\n\t\t\t\t\t\t#ifndef USE_DASH\n\n\t\t\t\t\t\t\t#ifdef USE_ALPHA_TO_COVERAGE\n\n\t\t\t\t\t\t\t\tfloat dnorm = fwidth( norm );\n\t\t\t\t\t\t\t\talpha = 1.0 - smoothstep( 0.5 - dnorm, 0.5 + dnorm, norm );\n\n\t\t\t\t\t\t\t#else\n\n\t\t\t\t\t\t\t\tif ( norm > 0.5 ) {\n\n\t\t\t\t\t\t\t\t\tdiscard;\n\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t#endif\n\n\t\t\t\t\t\t#endif\n\n\t\t\t\t\t#else\n\n\t\t\t\t\t\t#ifdef USE_ALPHA_TO_COVERAGE\n\n\t\t\t\t\t\t\t// artifacts appear on some hardware if a derivative is taken within a conditional\n\t\t\t\t\t\t\tfloat a = vUv.x;\n\t\t\t\t\t\t\tfloat b = ( vUv.y > 0.0 ) ? vUv.y - 1.0 : vUv.y + 1.0;\n\t\t\t\t\t\t\tfloat len2 = a * a + b * b;\n\t\t\t\t\t\t\tfloat dlen = fwidth( len2 );\n\n\t\t\t\t\t\t\tif ( abs( vUv.y ) > 1.0 ) {\n\n\t\t\t\t\t\t\t\talpha = 1.0 - smoothstep( 1.0 - dlen, 1.0 + dlen, len2 );\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t#else\n\n\t\t\t\t\t\t\tif ( abs( vUv.y ) > 1.0 ) {\n\n\t\t\t\t\t\t\t\tfloat a = vUv.x;\n\t\t\t\t\t\t\t\tfloat b = ( vUv.y > 0.0 ) ? vUv.y - 1.0 : vUv.y + 1.0;\n\t\t\t\t\t\t\t\tfloat len2 = a * a + b * b;\n\n\t\t\t\t\t\t\t\tif ( len2 > 1.0 ) discard;\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t#endif\n\n\t\t\t\t\t#endif\n\n\t\t\t\t\tvec4 diffuseColor = vec4( diffuse, alpha );\n\n\t\t\t\t\t#include \n\t\t\t\t\t#include \n\n\t\t\t\t\tgl_FragColor = vec4( diffuseColor.rgb, alpha );\n\n\t\t\t\t\t#include \n\t\t\t\t\t#include <".concat( + parseInt(A.REVISION.replace(/\D+/g, "")) >= 154 + ? "colorspace_fragment" + : "encodings_fragment", + ">\n\t\t\t\t\t#include \n\t\t\t\t\t#include \n\n\t\t\t\t}\n\t\t\t" + ), + clipping: !0, + })).isLineMaterial = !0), + Object.defineProperties((0, f.Z)(r), { + color: { + enumerable: !0, + get: function () { + return this.uniforms.diffuse.value; + }, + set: function (e) { + this.uniforms.diffuse.value = e; + }, + }, + worldUnits: { + enumerable: !0, + get: function () { + return "WORLD_UNITS" in this.defines; + }, + set: function (e) { + !0 === e + ? (this.defines.WORLD_UNITS = "") + : delete this.defines.WORLD_UNITS; + }, + }, + linewidth: { + enumerable: !0, + get: function () { + return this.uniforms.linewidth.value; + }, + set: function (e) { + this.uniforms.linewidth.value = e; + }, + }, + dashed: { + enumerable: !0, + get: function () { + return Boolean("USE_DASH" in this.defines); + }, + set: function (e) { + Boolean(e) !== Boolean("USE_DASH" in this.defines) && + (this.needsUpdate = !0), + !0 === e + ? (this.defines.USE_DASH = "") + : delete this.defines.USE_DASH; + }, + }, + dashScale: { + enumerable: !0, + get: function () { + return this.uniforms.dashScale.value; + }, + set: function (e) { + this.uniforms.dashScale.value = e; + }, + }, + dashSize: { + enumerable: !0, + get: function () { + return this.uniforms.dashSize.value; + }, + set: function (e) { + this.uniforms.dashSize.value = e; + }, + }, + dashOffset: { + enumerable: !0, + get: function () { + return this.uniforms.dashOffset.value; + }, + set: function (e) { + this.uniforms.dashOffset.value = e; + }, + }, + gapSize: { + enumerable: !0, + get: function () { + return this.uniforms.gapSize.value; + }, + set: function (e) { + this.uniforms.gapSize.value = e; + }, + }, + opacity: { + enumerable: !0, + get: function () { + return this.uniforms.opacity.value; + }, + set: function (e) { + this.uniforms.opacity.value = e; + }, + }, + resolution: { + enumerable: !0, + get: function () { + return this.uniforms.resolution.value; + }, + set: function (e) { + this.uniforms.resolution.value.copy(e); + }, + }, + alphaToCoverage: { + enumerable: !0, + get: function () { + return Boolean("USE_ALPHA_TO_COVERAGE" in this.defines); + }, + set: function (e) { + Boolean(e) !== + Boolean("USE_ALPHA_TO_COVERAGE" in this.defines) && + (this.needsUpdate = !0), + !0 === e + ? ((this.defines.USE_ALPHA_TO_COVERAGE = ""), + (this.extensions.derivatives = !0)) + : (delete this.defines.USE_ALPHA_TO_COVERAGE, + (this.extensions.derivatives = !1)); + }, + }, + }), + r.setValues(e), + r + ); + } + return (0, v.Z)(n); + })(A.ShaderMaterial), + qp = new A.Vector3(), + Jp = new A.Vector3(), + Kp = null, + $p = null, + ev = new A.Vector3(), + tv = new A.Vector3(), + nv = new A.Vector4(), + rv = new A.Vector4(), + iv = new A.Vector4(), + av = new A.Vector3(), + ov = new A.Matrix4(), + sv = new A.Line3(), + lv = new A.Vector3(), + uv = new A.Box3(), + cv = new A.Sphere(), + fv = new A.Vector4(), + dv, + hv, + pv, + vv; + function mv(e, t, n) { + return ( + fv.set(0, 0, -t, 1).applyMatrix4(e.projectionMatrix), + fv.multiplyScalar(1 / fv.w), + (fv.x = vv / n.width), + (fv.y = vv / n.height), + fv.applyMatrix4(e.projectionMatrixInverse), + fv.multiplyScalar(1 / fv.w), + Math.abs(Math.max(fv.x, fv.y)) + ); + } + function gv(e, t) { + for (var n = 0, r = hv.count; n < r; n++) { + sv.start.fromBufferAttribute(hv, n), + sv.end.fromBufferAttribute(pv, n); + var i = new A.Vector3(), + a = new A.Vector3(); + dv.distanceSqToSegment(sv.start, sv.end, a, i), + a.distanceTo(i) < 0.5 * vv && + t.push({ + point: a, + pointOnLine: i, + distance: dv.origin.distanceTo(a), + object: e, + face: null, + faceIndex: n, + uv: null, + uv2: null, + }); + } + } + function Av(e, t, n) { + var r = t.projectionMatrix, + i = e.material.resolution, + a = e.matrixWorld, + o = e.geometry, + s = o.attributes.instanceStart, + l = o.attributes.instanceEnd, + u = -t.near; + dv.at(1, iv), + (iv.w = 1), + iv.applyMatrix4(t.matrixWorldInverse), + iv.applyMatrix4(r), + iv.multiplyScalar(1 / iv.w), + (iv.x *= i.x / 2), + (iv.y *= i.y / 2), + (iv.z = 0), + av.copy(iv), + ov.multiplyMatrices(t.matrixWorldInverse, a); + for (var c = 0, f = s.count; c < f; c++) { + if ( + (nv.fromBufferAttribute(s, c), + rv.fromBufferAttribute(l, c), + (nv.w = 1), + (rv.w = 1), + nv.applyMatrix4(ov), + rv.applyMatrix4(ov), + !(nv.z > u && rv.z > u)) + ) { + if (nv.z > u) { + var d = nv.z - rv.z, + h = (nv.z - u) / d; + nv.lerp(rv, h); + } else if (rv.z > u) { + var p = rv.z - nv.z, + v = (rv.z - u) / p; + rv.lerp(nv, v); + } + nv.applyMatrix4(r), + rv.applyMatrix4(r), + nv.multiplyScalar(1 / nv.w), + rv.multiplyScalar(1 / rv.w), + (nv.x *= i.x / 2), + (nv.y *= i.y / 2), + (rv.x *= i.x / 2), + (rv.y *= i.y / 2), + sv.start.copy(nv), + (sv.start.z = 0), + sv.end.copy(rv), + (sv.end.z = 0); + var m = sv.closestPointToPointParameter(av, !0); + sv.at(m, lv); + var g = A.MathUtils.lerp(nv.z, rv.z, m), + y = g >= -1 && g <= 1, + b = av.distanceTo(lv) < 0.5 * vv; + if (y && b) { + sv.start.fromBufferAttribute(s, c), + sv.end.fromBufferAttribute(l, c), + sv.start.applyMatrix4(a), + sv.end.applyMatrix4(a); + var x = new A.Vector3(), + S = new A.Vector3(); + dv.distanceSqToSegment(sv.start, sv.end, S, x), + n.push({ + point: S, + pointOnLine: x, + distance: dv.origin.distanceTo(S), + object: e, + face: null, + faceIndex: c, + uv: null, + uv2: null, + }); + } + } + } + } + var yv = (function (e) { + (0, m.Z)(n, e); + var t = (0, g.Z)(n); + function n() { + var e, + r = + arguments.length > 0 && void 0 !== arguments[0] + ? arguments[0] + : new Wp(), + i = + arguments.length > 1 && void 0 !== arguments[1] + ? arguments[1] + : new Yp({ color: 16777215 * Math.random() }); + return ( + (0, p.Z)(this, n), + ((e = t.call(this, r, i)).isLineSegments2 = !0), + (e.type = "LineSegments2"), + e + ); + } + return ( + (0, v.Z)(n, [ + { + key: "computeLineDistances", + value: function () { + for ( + var e = this.geometry, + t = e.attributes.instanceStart, + n = e.attributes.instanceEnd, + r = new Float32Array(2 * t.count), + i = 0, + a = 0, + o = t.count; + i < o; + i++, a += 2 + ) + ev.fromBufferAttribute(t, i), + tv.fromBufferAttribute(n, i), + (r[a] = 0 === a ? 0 : r[a - 1]), + (r[a + 1] = r[a] + ev.distanceTo(tv)); + var s = new A.InstancedInterleavedBuffer(r, 2, 1); + return ( + e.setAttribute( + "instanceDistanceStart", + new A.InterleavedBufferAttribute(s, 1, 0) + ), + e.setAttribute( + "instanceDistanceEnd", + new A.InterleavedBufferAttribute(s, 1, 1) + ), + this + ); + }, + }, + { + key: "raycast", + value: function (e, t) { + var n = this.material.worldUnits, + r = e.camera; + null !== r || + n || + console.error( + 'LineSegments2: "Raycaster.camera" needs to be set in order to raycast against LineSegments2 while worldUnits is set to false.' + ); + var i = + (void 0 !== e.params.Line2 && e.params.Line2.threshold) || + 0; + dv = e.ray; + var a, + o = this.matrixWorld, + s = this.geometry, + l = this.material; + ((vv = l.linewidth + i), + (hv = s.attributes.instanceStart), + (pv = s.attributes.instanceEnd), + null === s.boundingSphere && s.computeBoundingSphere(), + cv.copy(s.boundingSphere).applyMatrix4(o), + n) + ? (a = 0.5 * vv) + : (a = mv( + r, + Math.max(r.near, cv.distanceToPoint(dv.origin)), + l.resolution + )); + if (((cv.radius += a), !1 !== dv.intersectsSphere(cv))) { + var u; + if ( + (null === s.boundingBox && s.computeBoundingBox(), + uv.copy(s.boundingBox).applyMatrix4(o), + n) + ) + u = 0.5 * vv; + else + u = mv( + r, + Math.max(r.near, uv.distanceToPoint(dv.origin)), + l.resolution + ); + uv.expandByScalar(u), + !1 !== dv.intersectsBox(uv) && + (n ? gv(this, t) : Av(this, r, t)); + } + }, + }, + ]), + n + ); + })(A.Mesh), + bv = (function (e) { + (0, m.Z)(n, e); + var t = (0, g.Z)(n); + function n() { + var e, + r = + arguments.length > 0 && void 0 !== arguments[0] + ? arguments[0] + : new Xp(), + i = + arguments.length > 1 && void 0 !== arguments[1] + ? arguments[1] + : new Yp({ color: 16777215 * Math.random() }); + return ( + (0, p.Z)(this, n), + ((e = t.call(this, r, i)).isLine2 = !0), + (e.type = "Line2"), + e + ); + } + return (0, v.Z)(n); + })(yv), + xv = null, + Sv = new A.Vector3(), + Ev = new A.Vector3(), + _v = null, + Cv = null, + wv = new A.Vector3(), + Tv = new A.Vector3(), + Mv = new A.Matrix3(), + Iv = null, + kv = null, + Rv = null, + Bv = null, + Pv = null, + Lv = null, + Dv = null, + Uv = null, + Fv = null, + Ov = null, + Nv = null, + Gv = null, + Zv = null, + zv = null; + function Qv(e, t, n) { + return n * (t - e) + e; + } + var Hv = null, + Vv = null, + jv = null, + Wv = null, + Xv = null, + Yv = new A.Matrix4(), + qv = new A.Object3D(), + Jv = new A.Vector3(), + Kv = null, + $v = null, + em = null, + tm, + nm = function () { + if (tm) return tm; + var 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 }; + var 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"); + var i = WebAssembly.instantiate( + (function (e) { + for ( + var n = new Uint8Array(e.length), r = 0; + r < e.length; + ++r + ) { + var i = e.charCodeAt(r); + n[r] = + i > 96 + ? i - 71 + : i > 64 + ? i - 65 + : i > 47 + ? i + 4 + : i > 46 + ? 63 + : 62; + } + for (var a = 0, o = 0; o < e.length; ++o) + n[a++] = n[o] < 60 ? t[n[o]] : 64 * (n[o] - 60) + n[++o]; + return n.buffer.slice(0, a); + })(r), + {} + ).then(function (e) { + (n = e.instance).exports.__wasm_call_ctors(); + }); + function a(e, t, r, i, a, o) { + var s = n.exports.sbrk, + l = (r + 3) & -4, + u = s(l * i), + c = s(a.length), + f = new Uint8Array(n.exports.memory.buffer); + f.set(a, c); + var d = e(u, r, i, c, a.length); + if ( + (0 === d && o && o(u, l, i), + t.set(f.subarray(u, u + r * i)), + s(u - s(0)), + 0 !== d) + ) + throw new Error("Malformed buffer data: ".concat(d)); + } + var o = { + 0: "", + 1: "meshopt_decodeFilterOct", + 2: "meshopt_decodeFilterQuat", + 3: "meshopt_decodeFilterExp", + NONE: "", + OCTAHEDRAL: "meshopt_decodeFilterOct", + QUATERNION: "meshopt_decodeFilterQuat", + EXPONENTIAL: "meshopt_decodeFilterExp", + }, + s = { + 0: "meshopt_decodeVertexBuffer", + 1: "meshopt_decodeIndexBuffer", + 2: "meshopt_decodeIndexSequence", + ATTRIBUTES: "meshopt_decodeVertexBuffer", + TRIANGLES: "meshopt_decodeIndexBuffer", + INDICES: "meshopt_decodeIndexSequence", + }; + return (tm = { + ready: i, + supported: !0, + decodeVertexBuffer: function (e, t, r, i, s) { + a( + n.exports.meshopt_decodeVertexBuffer, + e, + t, + r, + i, + n.exports[o[s]] + ); + }, + decodeIndexBuffer: function (e, t, r, i) { + a(n.exports.meshopt_decodeIndexBuffer, e, t, r, i); + }, + decodeIndexSequence: function (e, t, r, i) { + a(n.exports.meshopt_decodeIndexSequence, e, t, r, i); + }, + decodeGltfBuffer: function (e, t, r, i, l, u) { + a(n.exports[s[l]], e, t, r, i, n.exports[o[u]]); + }, + }); + }; + }, + 7760: function (e, t, n) { + "use strict"; + n.r(t), + n.d(t, { + ACESFilmicToneMapping: function () { + return me; + }, + AddEquation: function () { + return N; + }, + AddOperation: function () { + return fe; + }, + AdditiveAnimationBlendMode: function () { + return Wt; + }, + AdditiveBlending: function () { + return D; + }, + AlphaFormat: function () { + return Xe; + }, + AlwaysCompare: function () { + return Un; + }, + AlwaysDepth: function () { + return ne; + }, + AlwaysStencilFunc: function () { + return Mn; + }, + AmbientLight: function () { + return $d; + }, + AnimationAction: function () { + return zh; + }, + AnimationClip: function () { + return Sd; + }, + AnimationLoader: function () { + return Bd; + }, + AnimationMixer: function () { + return Hh; + }, + AnimationObjectGroup: function () { + return Zh; + }, + AnimationUtils: function () { + return ud; + }, + ArcCurve: function () { + return wc; + }, + ArrayCamera: function () { + return Yl; + }, + ArrowHelper: function () { + return Dp; + }, + Audio: function () { + return Ch; + }, + AudioAnalyser: function () { + return Rh; + }, + AudioContext: function () { + return dh; + }, + AudioListener: function () { + return _h; + }, + AudioLoader: function () { + return hh; + }, + AxesHelper: function () { + return Up; + }, + BackSide: function () { + return k; + }, + BasicDepthPacking: function () { + return $t; + }, + BasicShadowMap: function () { + return C; + }, + Bone: function () { + return Gu; + }, + BooleanKeyframeTrack: function () { + return vd; + }, + Box2: function () { + return np; + }, + Box3: function () { + return Xr; + }, + Box3Helper: function () { + return Bp; + }, + BoxGeometry: function () { + return ao; + }, + BoxHelper: function () { + return Rp; + }, + BufferAttribute: function () { + return xa; + }, + BufferGeometry: function () { + return Na; + }, + BufferGeometryLoader: function () { + return oh; + }, + ByteType: function () { + return Oe; + }, + Cache: function () { + return _d; + }, + Camera: function () { + return fo; + }, + CameraHelper: function () { + return wp; + }, + CanvasTexture: function () { + return Ec; + }, + CapsuleGeometry: function () { + return Wc; + }, + CatmullRomCurve3: function () { + return Bc; + }, + CineonToneMapping: function () { + return ve; + }, + CircleGeometry: function () { + return Xc; + }, + ClampToEdgeWrapping: function () { + return Ce; + }, + Clock: function () { + return Ah; + }, + Color: function () { + return fa; + }, + ColorKeyframeTrack: function () { + return md; + }, + ColorManagement: function () { + return Tr; + }, + CompressedArrayTexture: function () { + return xc; + }, + CompressedCubeTexture: function () { + return Sc; + }, + CompressedTexture: function () { + return bc; + }, + CompressedTextureLoader: function () { + return Pd; + }, + ConeGeometry: function () { + return qc; + }, + CubeCamera: function () { + return vo; + }, + CubeReflectionMapping: function () { + return ye; + }, + CubeRefractionMapping: function () { + return be; + }, + CubeTexture: function () { + return mo; + }, + CubeTextureLoader: function () { + return Dd; + }, + CubeUVReflectionMapping: function () { + return Ee; + }, + CubicBezierCurve: function () { + return Uc; + }, + CubicBezierCurve3: function () { + return Fc; + }, + CubicInterpolant: function () { + return fd; + }, + CullFaceBack: function () { + return S; + }, + CullFaceFront: function () { + return E; + }, + CullFaceFrontBack: function () { + return _; + }, + CullFaceNone: function () { + return x; + }, + Curve: function () { + return _c; + }, + CurvePath: function () { + return Hc; + }, + CustomBlending: function () { + return O; + }, + CustomToneMapping: function () { + return ge; + }, + CylinderGeometry: function () { + return Yc; + }, + Cylindrical: function () { + return ep; + }, + Data3DTexture: function () { + return Zr; + }, + DataArrayTexture: function () { + return Nr; + }, + DataTexture: function () { + return Zu; + }, + DataTextureLoader: function () { + return Ud; + }, + DataUtils: function () { + return Aa; + }, + DecrementStencilOp: function () { + return gn; + }, + DecrementWrapStencilOp: function () { + return yn; + }, + DefaultLoadingManager: function () { + return wd; + }, + DepthFormat: function () { + return Ke; + }, + DepthStencilFormat: function () { + return $e; + }, + DepthTexture: function () { + return $l; + }, + DirectionalLight: function () { + return Kd; + }, + DirectionalLightHelper: function () { + return Ep; + }, + DiscreteInterpolant: function () { + return hd; + }, + DisplayP3ColorSpace: function () { + return sn; + }, + DodecahedronGeometry: function () { + return Kc; + }, + DoubleSide: function () { + return R; + }, + DstAlphaFactor: function () { + return q; + }, + DstColorFactor: function () { + return K; + }, + DynamicCopyUsage: function () { + return Hn; + }, + DynamicDrawUsage: function () { + return On; + }, + DynamicReadUsage: function () { + return Zn; + }, + EdgesGeometry: function () { + return rf; + }, + EllipseCurve: function () { + return Cc; + }, + EqualCompare: function () { + return Rn; + }, + EqualDepth: function () { + return ae; + }, + EqualStencilFunc: function () { + return En; + }, + EquirectangularReflectionMapping: function () { + return xe; + }, + EquirectangularRefractionMapping: function () { + return Se; + }, + Euler: function () { + return Ri; + }, + EventDispatcher: function () { + return Jn; + }, + ExtrudeGeometry: function () { + return Lf; + }, + FileLoader: function () { + return Rd; + }, + Float16BufferAttribute: function () { + return Ia; + }, + Float32BufferAttribute: function () { + return ka; + }, + Float64BufferAttribute: function () { + return Ra; + }, + FloatType: function () { + return Qe; + }, + Fog: function () { + return su; + }, + FogExp2: function () { + return ou; + }, + FramebufferTexture: function () { + return yc; + }, + FrontSide: function () { + return I; + }, + Frustum: function () { + return _o; + }, + GLBufferAttribute: function () { + return Yh; + }, + GLSL1: function () { + return jn; + }, + GLSL3: function () { + return Wn; + }, + GreaterCompare: function () { + return Pn; + }, + GreaterDepth: function () { + return se; + }, + GreaterEqualCompare: function () { + return Dn; + }, + GreaterEqualDepth: function () { + return oe; + }, + GreaterEqualStencilFunc: function () { + return Tn; + }, + GreaterStencilFunc: function () { + return Cn; + }, + GridHelper: function () { + return Ap; + }, + Group: function () { + return ql; + }, + HalfFloatType: function () { + return He; + }, + HemisphereLight: function () { + return Nd; + }, + HemisphereLightHelper: function () { + return gp; + }, + IcosahedronGeometry: function () { + return Uf; + }, + ImageBitmapLoader: function () { + return fh; + }, + ImageLoader: function () { + return Ld; + }, + ImageUtils: function () { + return kr; + }, + IncrementStencilOp: function () { + return mn; + }, + IncrementWrapStencilOp: function () { + return An; + }, + InstancedBufferAttribute: function () { + return Vu; + }, + InstancedBufferGeometry: function () { + return ah; + }, + InstancedInterleavedBuffer: function () { + return Xh; + }, + InstancedMesh: function () { + return $u; + }, + Int16BufferAttribute: function () { + return Ca; + }, + Int32BufferAttribute: function () { + return Ta; + }, + Int8BufferAttribute: function () { + return Sa; + }, + IntType: function () { + return Ze; + }, + InterleavedBuffer: function () { + return uu; + }, + InterleavedBufferAttribute: function () { + return fu; + }, + Interpolant: function () { + return cd; + }, + InterpolateDiscrete: function () { + return Gt; + }, + InterpolateLinear: function () { + return Zt; + }, + InterpolateSmooth: function () { + return zt; + }, + InvertStencilOp: function () { + return bn; + }, + KeepStencilOp: function () { + return pn; + }, + KeyframeTrack: function () { + return pd; + }, + LOD: function () { + return Iu; + }, + LatheGeometry: function () { + return jc; + }, + Layers: function () { + return Bi; + }, + LessCompare: function () { + return kn; + }, + LessDepth: function () { + return re; + }, + LessEqualCompare: function () { + return Bn; + }, + LessEqualDepth: function () { + return ie; + }, + LessEqualStencilFunc: function () { + return _n; + }, + LessStencilFunc: function () { + return Sn; + }, + Light: function () { + return Od; + }, + LightProbe: function () { + return nh; + }, + Line: function () { + return oc; + }, + Line3: function () { + return ap; + }, + LineBasicMaterial: function () { + return ec; + }, + LineCurve: function () { + return Oc; + }, + LineCurve3: function () { + return Nc; + }, + LineDashedMaterial: function () { + return rd; + }, + LineLoop: function () { + return cc; + }, + LineSegments: function () { + return uc; + }, + LinearDisplayP3ColorSpace: function () { + return ln; + }, + LinearEncoding: function () { + return Jt; + }, + LinearFilter: function () { + return Be; + }, + LinearInterpolant: function () { + return dd; + }, + LinearMipMapLinearFilter: function () { + return Ue; + }, + LinearMipMapNearestFilter: function () { + return Le; + }, + LinearMipmapLinearFilter: function () { + return De; + }, + LinearMipmapNearestFilter: function () { + return Pe; + }, + LinearSRGBColorSpace: function () { + return on; + }, + LinearToneMapping: function () { + return he; + }, + LinearTransfer: function () { + return un; + }, + Loader: function () { + return Td; + }, + LoaderUtils: function () { + return ih; + }, + LoadingManager: function () { + return Cd; + }, + LoopOnce: function () { + return Ft; + }, + LoopPingPong: function () { + return Nt; + }, + LoopRepeat: function () { + return Ot; + }, + LuminanceAlphaFormat: function () { + return Je; + }, + LuminanceFormat: function () { + return qe; + }, + MOUSE: function () { + return y; + }, + Material: function () { + return oa; + }, + MaterialLoader: function () { + return rh; + }, + MathUtils: function () { + return fr; + }, + Matrix3: function () { + return hr; + }, + Matrix4: function () { + return xi; + }, + MaxEquation: function () { + return Q; + }, + Mesh: function () { + return ro; + }, + MeshBasicMaterial: function () { + return ha; + }, + MeshDepthMaterial: function () { + return Ql; + }, + MeshDistanceMaterial: function () { + return Hl; + }, + MeshLambertMaterial: function () { + return td; + }, + MeshMatcapMaterial: function () { + return nd; + }, + MeshNormalMaterial: function () { + return ed; + }, + MeshPhongMaterial: function () { + return Kf; + }, + MeshPhysicalMaterial: function () { + return Jf; + }, + MeshStandardMaterial: function () { + return qf; + }, + MeshToonMaterial: function () { + return $f; + }, + MinEquation: function () { + return z; + }, + MirroredRepeatWrapping: function () { + return we; + }, + MixOperation: function () { + return ce; + }, + MultiplyBlending: function () { + return F; + }, + MultiplyOperation: function () { + return ue; + }, + NearestFilter: function () { + return Te; + }, + NearestMipMapLinearFilter: function () { + return Re; + }, + NearestMipMapNearestFilter: function () { + return Ie; + }, + NearestMipmapLinearFilter: function () { + return ke; + }, + NearestMipmapNearestFilter: function () { + return Me; + }, + NeverCompare: function () { + return In; + }, + NeverDepth: function () { + return te; + }, + NeverStencilFunc: function () { + return xn; + }, + NoBlending: function () { + return P; + }, + NoColorSpace: function () { + return rn; + }, + NoToneMapping: function () { + return de; + }, + NormalAnimationBlendMode: function () { + return jt; + }, + NormalBlending: function () { + return L; + }, + NotEqualCompare: function () { + return Ln; + }, + NotEqualDepth: function () { + return le; + }, + NotEqualStencilFunc: function () { + return wn; + }, + NumberKeyframeTrack: function () { + return gd; + }, + Object3D: function () { + return ji; + }, + ObjectLoader: function () { + return sh; + }, + ObjectSpaceNormalMap: function () { + return nn; + }, + OctahedronGeometry: function () { + return Ff; + }, + OneFactor: function () { + return V; + }, + OneMinusDstAlphaFactor: function () { + return J; + }, + OneMinusDstColorFactor: function () { + return $; + }, + OneMinusSrcAlphaFactor: function () { + return Y; + }, + OneMinusSrcColorFactor: function () { + return W; + }, + OrthographicCamera: function () { + return Oo; + }, + P3Primaries: function () { + return dn; + }, + PCFShadowMap: function () { + return w; + }, + PCFSoftShadowMap: function () { + return T; + }, + PMREMGenerator: function () { + return Wo; + }, + Path: function () { + return Vc; + }, + PerspectiveCamera: function () { + return ho; + }, + Plane: function () { + return xo; + }, + PlaneGeometry: function () { + return To; + }, + PlaneHelper: function () { + return Pp; + }, + PointLight: function () { + return qd; + }, + PointLightHelper: function () { + return hp; + }, + Points: function () { + return mc; + }, + PointsMaterial: function () { + return fc; + }, + PolarGridHelper: function () { + return yp; + }, + PolyhedronGeometry: function () { + return Jc; + }, + PositionalAudio: function () { + return kh; + }, + PropertyBinding: function () { + return Gh; + }, + PropertyMixer: function () { + return Bh; + }, + QuadraticBezierCurve: function () { + return Gc; + }, + QuadraticBezierCurve3: function () { + return Zc; + }, + Quaternion: function () { + return Hr; + }, + QuaternionKeyframeTrack: function () { + return yd; + }, + QuaternionLinearInterpolant: function () { + return Ad; + }, + RED_GREEN_RGTC2_Format: function () { + return Dt; + }, + RED_RGTC1_Format: function () { + return Pt; + }, + REVISION: function () { + return A; + }, + RGBADepthPacking: function () { + return en; + }, + RGBAFormat: function () { + return Ye; + }, + RGBAIntegerFormat: function () { + return it; + }, + RGBA_ASTC_10x10_Format: function () { + return Tt; + }, + RGBA_ASTC_10x5_Format: function () { + return _t; + }, + RGBA_ASTC_10x6_Format: function () { + return Ct; + }, + RGBA_ASTC_10x8_Format: function () { + return wt; + }, + RGBA_ASTC_12x10_Format: function () { + return Mt; + }, + RGBA_ASTC_12x12_Format: function () { + return It; + }, + RGBA_ASTC_4x4_Format: function () { + return mt; + }, + RGBA_ASTC_5x4_Format: function () { + return gt; + }, + RGBA_ASTC_5x5_Format: function () { + return At; + }, + RGBA_ASTC_6x5_Format: function () { + return yt; + }, + RGBA_ASTC_6x6_Format: function () { + return bt; + }, + RGBA_ASTC_8x5_Format: function () { + return xt; + }, + RGBA_ASTC_8x6_Format: function () { + return St; + }, + RGBA_ASTC_8x8_Format: function () { + return Et; + }, + RGBA_BPTC_Format: function () { + return kt; + }, + RGBA_ETC2_EAC_Format: function () { + return vt; + }, + RGBA_PVRTC_2BPPV1_Format: function () { + return dt; + }, + RGBA_PVRTC_4BPPV1_Format: function () { + return ft; + }, + RGBA_S3TC_DXT1_Format: function () { + return ot; + }, + RGBA_S3TC_DXT3_Format: function () { + return st; + }, + RGBA_S3TC_DXT5_Format: function () { + return lt; + }, + RGB_BPTC_SIGNED_Format: function () { + return Rt; + }, + RGB_BPTC_UNSIGNED_Format: function () { + return Bt; + }, + RGB_ETC1_Format: function () { + return ht; + }, + RGB_ETC2_Format: function () { + return pt; + }, + RGB_PVRTC_2BPPV1_Format: function () { + return ct; + }, + RGB_PVRTC_4BPPV1_Format: function () { + return ut; + }, + RGB_S3TC_DXT1_Format: function () { + return at; + }, + RGFormat: function () { + return nt; + }, + RGIntegerFormat: function () { + return rt; + }, + RawShaderMaterial: function () { + return Yf; + }, + Ray: function () { + return bi; + }, + Raycaster: function () { + return qh; + }, + Rec709Primaries: function () { + return fn; + }, + RectAreaLight: function () { + return eh; + }, + RedFormat: function () { + return et; + }, + RedIntegerFormat: function () { + return tt; + }, + ReinhardToneMapping: function () { + return pe; + }, + RenderTarget: function () { + return Fr; + }, + RepeatWrapping: function () { + return _e; + }, + ReplaceStencilOp: function () { + return vn; + }, + ReverseSubtractEquation: function () { + return Z; + }, + RingGeometry: function () { + return Of; + }, + SIGNED_RED_GREEN_RGTC2_Format: function () { + return Ut; + }, + SIGNED_RED_RGTC1_Format: function () { + return Lt; + }, + SRGBColorSpace: function () { + return an; + }, + SRGBTransfer: function () { + return cn; + }, + Scene: function () { + return lu; + }, + ShaderChunk: function () { + return Mo; + }, + ShaderLib: function () { + return ko; + }, + ShaderMaterial: function () { + return co; + }, + ShadowMaterial: function () { + return Xf; + }, + Shape: function () { + return af; + }, + ShapeGeometry: function () { + return Nf; + }, + ShapePath: function () { + return Fp; + }, + ShapeUtils: function () { + return Rf; + }, + ShortType: function () { + return Ne; + }, + Skeleton: function () { + return Hu; + }, + SkeletonHelper: function () { + return fp; + }, + SkinnedMesh: function () { + return Nu; + }, + Source: function () { + return Br; + }, + Sphere: function () { + return di; + }, + SphereGeometry: function () { + return Gf; + }, + Spherical: function () { + return $h; + }, + SphericalHarmonics3: function () { + return th; + }, + SplineCurve: function () { + return zc; + }, + SpotLight: function () { + return Vd; + }, + SpotLightHelper: function () { + return sp; + }, + Sprite: function () { + return Cu; + }, + SpriteMaterial: function () { + return du; + }, + SrcAlphaFactor: function () { + return X; + }, + SrcAlphaSaturateFactor: function () { + return ee; + }, + SrcColorFactor: function () { + return j; + }, + StaticCopyUsage: function () { + return Qn; + }, + StaticDrawUsage: function () { + return Fn; + }, + StaticReadUsage: function () { + return Gn; + }, + StereoCamera: function () { + return gh; + }, + StreamCopyUsage: function () { + return Vn; + }, + StreamDrawUsage: function () { + return Nn; + }, + StreamReadUsage: function () { + return zn; + }, + StringKeyframeTrack: function () { + return bd; + }, + SubtractEquation: function () { + return G; + }, + SubtractiveBlending: function () { + return U; + }, + TOUCH: function () { + return b; + }, + TangentSpaceNormalMap: function () { + return tn; + }, + TetrahedronGeometry: function () { + return Zf; + }, + Texture: function () { + return Dr; + }, + TextureLoader: function () { + return Fd; + }, + TorusGeometry: function () { + return zf; + }, + TorusKnotGeometry: function () { + return Qf; + }, + Triangle: function () { + return ia; + }, + TriangleFanDrawMode: function () { + return qt; + }, + TriangleStripDrawMode: function () { + return Yt; + }, + TrianglesDrawMode: function () { + return Xt; + }, + TubeGeometry: function () { + return Hf; + }, + TwoPassDoubleSide: function () { + return B; + }, + UVMapping: function () { + return Ae; + }, + Uint16BufferAttribute: function () { + return wa; + }, + Uint32BufferAttribute: function () { + return Ma; + }, + Uint8BufferAttribute: function () { + return Ea; + }, + Uint8ClampedBufferAttribute: function () { + return _a; + }, + Uniform: function () { + return Vh; + }, + UniformsGroup: function () { + return Wh; + }, + UniformsLib: function () { + return Io; + }, + UniformsUtils: function () { + return uo; + }, + UnsignedByteType: function () { + return Fe; + }, + UnsignedInt248Type: function () { + return We; + }, + UnsignedIntType: function () { + return ze; + }, + UnsignedShort4444Type: function () { + return Ve; + }, + UnsignedShort5551Type: function () { + return je; + }, + UnsignedShortType: function () { + return Ge; + }, + VSMShadowMap: function () { + return M; + }, + Vector2: function () { + return dr; + }, + Vector3: function () { + return Vr; + }, + Vector4: function () { + return Ur; + }, + VectorKeyframeTrack: function () { + return xd; + }, + VideoTexture: function () { + return Ac; + }, + WebGL1Renderer: function () { + return iu; + }, + WebGL3DRenderTarget: function () { + return zr; + }, + WebGLArrayRenderTarget: function () { + return Gr; + }, + WebGLCoordinateSystem: function () { + return Yn; + }, + WebGLCubeRenderTarget: function () { + return go; + }, + WebGLMultipleRenderTargets: function () { + return Qr; + }, + WebGLRenderTarget: function () { + return Or; + }, + WebGLRenderer: function () { + return ru; + }, + WebGLUtils: function () { + return Xl; + }, + WebGPUCoordinateSystem: function () { + return qn; + }, + WireframeGeometry: function () { + return Vf; + }, + WrapAroundEnding: function () { + return Vt; + }, + ZeroCurvatureEnding: function () { + return Qt; + }, + ZeroFactor: function () { + return H; + }, + ZeroSlopeEnding: function () { + return Ht; + }, + ZeroStencilOp: function () { + return hn; + }, + _SRGBAFormat: function () { + return Xn; + }, + createCanvasElement: function () { + return yr; + }, + sRGBEncoding: function () { + return Kt; + }, + }); + var r, + i = n(8664), + a = n(5861), + o = n(7762), + s = n(9439), + l = n(1752), + u = n(1120), + c = n(3433), + f = n(7326), + d = n(136), + h = n(9388), + p = n(4942), + v = n(4165), + m = n(5671), + g = n(3144), + A = "157", + y = { LEFT: 0, MIDDLE: 1, RIGHT: 2, ROTATE: 0, DOLLY: 1, PAN: 2 }, + b = { ROTATE: 0, PAN: 1, DOLLY_PAN: 2, DOLLY_ROTATE: 3 }, + x = 0, + S = 1, + E = 2, + _ = 3, + C = 0, + w = 1, + T = 2, + M = 3, + I = 0, + k = 1, + R = 2, + B = 2, + P = 0, + L = 1, + D = 2, + U = 3, + F = 4, + O = 5, + N = 100, + G = 101, + Z = 102, + z = 103, + Q = 104, + H = 200, + V = 201, + j = 202, + W = 203, + X = 204, + Y = 205, + q = 206, + J = 207, + K = 208, + $ = 209, + ee = 210, + te = 0, + ne = 1, + re = 2, + ie = 3, + ae = 4, + oe = 5, + se = 6, + le = 7, + ue = 0, + ce = 1, + fe = 2, + de = 0, + he = 1, + pe = 2, + ve = 3, + me = 4, + ge = 5, + Ae = 300, + ye = 301, + be = 302, + xe = 303, + Se = 304, + Ee = 306, + _e = 1e3, + Ce = 1001, + we = 1002, + Te = 1003, + Me = 1004, + Ie = 1004, + ke = 1005, + Re = 1005, + Be = 1006, + Pe = 1007, + Le = 1007, + De = 1008, + Ue = 1008, + Fe = 1009, + Oe = 1010, + Ne = 1011, + Ge = 1012, + Ze = 1013, + ze = 1014, + Qe = 1015, + He = 1016, + Ve = 1017, + je = 1018, + We = 1020, + Xe = 1021, + Ye = 1023, + qe = 1024, + Je = 1025, + Ke = 1026, + $e = 1027, + et = 1028, + tt = 1029, + nt = 1030, + rt = 1031, + it = 1033, + at = 33776, + ot = 33777, + st = 33778, + lt = 33779, + ut = 35840, + ct = 35841, + ft = 35842, + dt = 35843, + ht = 36196, + pt = 37492, + vt = 37496, + mt = 37808, + gt = 37809, + At = 37810, + yt = 37811, + bt = 37812, + xt = 37813, + St = 37814, + Et = 37815, + _t = 37816, + Ct = 37817, + wt = 37818, + Tt = 37819, + Mt = 37820, + It = 37821, + kt = 36492, + Rt = 36494, + Bt = 36495, + Pt = 36283, + Lt = 36284, + Dt = 36285, + Ut = 36286, + Ft = 2200, + Ot = 2201, + Nt = 2202, + Gt = 2300, + Zt = 2301, + zt = 2302, + Qt = 2400, + Ht = 2401, + Vt = 2402, + jt = 2500, + Wt = 2501, + Xt = 0, + Yt = 1, + qt = 2, + Jt = 3e3, + Kt = 3001, + $t = 3200, + en = 3201, + tn = 0, + nn = 1, + rn = "", + an = "srgb", + on = "srgb-linear", + sn = "display-p3", + ln = "display-p3-linear", + un = "linear", + cn = "srgb", + fn = "rec709", + dn = "p3", + hn = 0, + pn = 7680, + vn = 7681, + mn = 7682, + gn = 7683, + An = 34055, + yn = 34056, + bn = 5386, + xn = 512, + Sn = 513, + En = 514, + _n = 515, + Cn = 516, + wn = 517, + Tn = 518, + Mn = 519, + In = 512, + kn = 513, + Rn = 514, + Bn = 515, + Pn = 516, + Ln = 517, + Dn = 518, + Un = 519, + Fn = 35044, + On = 35048, + Nn = 35040, + Gn = 35045, + Zn = 35049, + zn = 35041, + Qn = 35046, + Hn = 35050, + Vn = 35042, + jn = "100", + Wn = "300 es", + Xn = 1035, + Yn = 2e3, + qn = 2001, + Jn = (function () { + function e() { + (0, m.Z)(this, e); + } + return ( + (0, g.Z)(e, [ + { + key: "addEventListener", + value: function (e, t) { + void 0 === this._listeners && (this._listeners = {}); + var n = this._listeners; + void 0 === n[e] && (n[e] = []), + -1 === n[e].indexOf(t) && n[e].push(t); + }, + }, + { + key: "hasEventListener", + value: function (e, t) { + if (void 0 === this._listeners) return !1; + var n = this._listeners; + return void 0 !== n[e] && -1 !== n[e].indexOf(t); + }, + }, + { + key: "removeEventListener", + value: function (e, t) { + if (void 0 !== this._listeners) { + var n = this._listeners[e]; + if (void 0 !== n) { + var r = n.indexOf(t); + -1 !== r && n.splice(r, 1); + } + } + }, + }, + { + key: "dispatchEvent", + value: function (e) { + if (void 0 !== this._listeners) { + var t = this._listeners[e.type]; + if (void 0 !== t) { + e.target = this; + for ( + var n = t.slice(0), r = 0, i = n.length; + r < i; + r++ + ) + n[r].call(this, e); + e.target = null; + } + } + }, + }, + ]), + e + ); + })(), + Kn = [ + "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", + ], + $n = 1234567, + er = Math.PI / 180, + tr = 180 / Math.PI; + function nr() { + var e = (4294967295 * Math.random()) | 0, + t = (4294967295 * Math.random()) | 0, + n = (4294967295 * Math.random()) | 0, + r = (4294967295 * Math.random()) | 0; + return ( + Kn[255 & e] + + Kn[(e >> 8) & 255] + + Kn[(e >> 16) & 255] + + Kn[(e >> 24) & 255] + + "-" + + Kn[255 & t] + + Kn[(t >> 8) & 255] + + "-" + + Kn[((t >> 16) & 15) | 64] + + Kn[(t >> 24) & 255] + + "-" + + Kn[(63 & n) | 128] + + Kn[(n >> 8) & 255] + + "-" + + Kn[(n >> 16) & 255] + + Kn[(n >> 24) & 255] + + Kn[255 & r] + + Kn[(r >> 8) & 255] + + Kn[(r >> 16) & 255] + + Kn[(r >> 24) & 255] + ).toLowerCase(); + } + function rr(e, t, n) { + return Math.max(t, Math.min(n, e)); + } + function ir(e, t) { + return ((e % t) + t) % t; + } + function ar(e, t, n) { + return (1 - n) * e + n * t; + } + function or(e) { + return 0 === (e & (e - 1)) && 0 !== e; + } + function sr(e) { + return Math.pow(2, Math.ceil(Math.log(e) / Math.LN2)); + } + function lr(e) { + return Math.pow(2, Math.floor(Math.log(e) / Math.LN2)); + } + function ur(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 cr(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."); + } + } + var fr = { + DEG2RAD: er, + RAD2DEG: tr, + generateUUID: nr, + clamp: rr, + euclideanModulo: ir, + 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: ar, + damp: function (e, t, n, r) { + return ar(e, t, 1 - Math.exp(-n * r)); + }, + pingpong: function (e) { + var t = + arguments.length > 1 && void 0 !== arguments[1] + ? arguments[1] + : 1; + return t - Math.abs(ir(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 * (0.5 - Math.random()); + }, + seededRandom: function (e) { + void 0 !== e && ($n = e); + var t = ($n += 1831565813); + return ( + (t = Math.imul(t ^ (t >>> 15), 1 | t)), + (((t ^= t + Math.imul(t ^ (t >>> 7), 61 | t)) ^ (t >>> 14)) >>> + 0) / + 4294967296 + ); + }, + degToRad: function (e) { + return e * er; + }, + radToDeg: function (e) { + return e * tr; + }, + isPowerOfTwo: or, + ceilPowerOfTwo: sr, + floorPowerOfTwo: lr, + setQuaternionFromProperEuler: function (e, t, n, r, i) { + var a = Math.cos, + o = Math.sin, + s = a(n / 2), + l = o(n / 2), + u = a((t + r) / 2), + c = o((t + r) / 2), + f = a((t - r) / 2), + d = o((t - r) / 2), + h = a((r - t) / 2), + p = o((r - t) / 2); + switch (i) { + case "XYX": + e.set(s * c, l * f, l * d, s * u); + break; + case "YZY": + e.set(l * d, s * c, l * f, s * u); + break; + case "ZXZ": + e.set(l * f, l * d, s * c, s * u); + break; + case "XZX": + e.set(s * c, l * p, l * h, s * u); + break; + case "YXY": + e.set(l * h, s * c, l * p, s * u); + break; + case "ZYZ": + e.set(l * p, l * h, s * c, s * u); + break; + default: + console.warn( + "THREE.MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: " + + i + ); + } + }, + normalize: cr, + denormalize: ur, + }, + dr = (function (e) { + function t() { + var e = + arguments.length > 0 && void 0 !== arguments[0] + ? arguments[0] + : 0, + n = + arguments.length > 1 && void 0 !== arguments[1] + ? arguments[1] + : 0; + (0, m.Z)(this, t), + (t.prototype.isVector2 = !0), + (this.x = e), + (this.y = n); + } + return ( + (0, g.Z)(t, [ + { + key: "width", + get: function () { + return this.x; + }, + set: function (e) { + this.x = e; + }, + }, + { + key: "height", + get: function () { + return this.y; + }, + set: function (e) { + this.y = e; + }, + }, + { + key: "set", + value: function (e, t) { + return (this.x = e), (this.y = t), this; + }, + }, + { + key: "setScalar", + value: function (e) { + return (this.x = e), (this.y = e), this; + }, + }, + { + key: "setX", + value: function (e) { + return (this.x = e), this; + }, + }, + { + key: "setY", + value: function (e) { + return (this.y = e), this; + }, + }, + { + key: "setComponent", + value: function (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; + }, + }, + { + key: "getComponent", + value: function (e) { + switch (e) { + case 0: + return this.x; + case 1: + return this.y; + default: + throw new Error("index is out of range: " + e); + } + }, + }, + { + key: "clone", + value: function () { + return new this.constructor(this.x, this.y); + }, + }, + { + key: "copy", + value: function (e) { + return (this.x = e.x), (this.y = e.y), this; + }, + }, + { + key: "add", + value: function (e) { + return (this.x += e.x), (this.y += e.y), this; + }, + }, + { + key: "addScalar", + value: function (e) { + return (this.x += e), (this.y += e), this; + }, + }, + { + key: "addVectors", + value: function (e, t) { + return (this.x = e.x + t.x), (this.y = e.y + t.y), this; + }, + }, + { + key: "addScaledVector", + value: function (e, t) { + return (this.x += e.x * t), (this.y += e.y * t), this; + }, + }, + { + key: "sub", + value: function (e) { + return (this.x -= e.x), (this.y -= e.y), this; + }, + }, + { + key: "subScalar", + value: function (e) { + return (this.x -= e), (this.y -= e), this; + }, + }, + { + key: "subVectors", + value: function (e, t) { + return (this.x = e.x - t.x), (this.y = e.y - t.y), this; + }, + }, + { + key: "multiply", + value: function (e) { + return (this.x *= e.x), (this.y *= e.y), this; + }, + }, + { + key: "multiplyScalar", + value: function (e) { + return (this.x *= e), (this.y *= e), this; + }, + }, + { + key: "divide", + value: function (e) { + return (this.x /= e.x), (this.y /= e.y), this; + }, + }, + { + key: "divideScalar", + value: function (e) { + return this.multiplyScalar(1 / e); + }, + }, + { + key: "applyMatrix3", + value: function (e) { + var 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 + ); + }, + }, + { + key: "min", + value: function (e) { + return ( + (this.x = Math.min(this.x, e.x)), + (this.y = Math.min(this.y, e.y)), + this + ); + }, + }, + { + key: "max", + value: function (e) { + return ( + (this.x = Math.max(this.x, e.x)), + (this.y = Math.max(this.y, e.y)), + this + ); + }, + }, + { + key: "clamp", + value: function (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 + ); + }, + }, + { + key: "clampScalar", + value: function (e, t) { + return ( + (this.x = Math.max(e, Math.min(t, this.x))), + (this.y = Math.max(e, Math.min(t, this.y))), + this + ); + }, + }, + { + key: "clampLength", + value: function (e, t) { + var n = this.length(); + return this.divideScalar(n || 1).multiplyScalar( + Math.max(e, Math.min(t, n)) + ); + }, + }, + { + key: "floor", + value: function () { + return ( + (this.x = Math.floor(this.x)), + (this.y = Math.floor(this.y)), + this + ); + }, + }, + { + key: "ceil", + value: function () { + return ( + (this.x = Math.ceil(this.x)), + (this.y = Math.ceil(this.y)), + this + ); + }, + }, + { + key: "round", + value: function () { + return ( + (this.x = Math.round(this.x)), + (this.y = Math.round(this.y)), + this + ); + }, + }, + { + key: "roundToZero", + value: function () { + return ( + (this.x = Math.trunc(this.x)), + (this.y = Math.trunc(this.y)), + this + ); + }, + }, + { + key: "negate", + value: function () { + return (this.x = -this.x), (this.y = -this.y), this; + }, + }, + { + key: "dot", + value: function (e) { + return this.x * e.x + this.y * e.y; + }, + }, + { + key: "cross", + value: function (e) { + return this.x * e.y - this.y * e.x; + }, + }, + { + key: "lengthSq", + value: function () { + return this.x * this.x + this.y * this.y; + }, + }, + { + key: "length", + value: function () { + return Math.sqrt(this.x * this.x + this.y * this.y); + }, + }, + { + key: "manhattanLength", + value: function () { + return Math.abs(this.x) + Math.abs(this.y); + }, + }, + { + key: "normalize", + value: function () { + return this.divideScalar(this.length() || 1); + }, + }, + { + key: "angle", + value: function () { + var e = Math.atan2(-this.y, -this.x) + Math.PI; + return e; + }, + }, + { + key: "angleTo", + value: function (e) { + var t = Math.sqrt(this.lengthSq() * e.lengthSq()); + if (0 === t) return Math.PI / 2; + var n = this.dot(e) / t; + return Math.acos(rr(n, -1, 1)); + }, + }, + { + key: "distanceTo", + value: function (e) { + return Math.sqrt(this.distanceToSquared(e)); + }, + }, + { + key: "distanceToSquared", + value: function (e) { + var t = this.x - e.x, + n = this.y - e.y; + return t * t + n * n; + }, + }, + { + key: "manhattanDistanceTo", + value: function (e) { + return Math.abs(this.x - e.x) + Math.abs(this.y - e.y); + }, + }, + { + key: "setLength", + value: function (e) { + return this.normalize().multiplyScalar(e); + }, + }, + { + key: "lerp", + value: function (e, t) { + return ( + (this.x += (e.x - this.x) * t), + (this.y += (e.y - this.y) * t), + this + ); + }, + }, + { + key: "lerpVectors", + value: function (e, t, n) { + return ( + (this.x = e.x + (t.x - e.x) * n), + (this.y = e.y + (t.y - e.y) * n), + this + ); + }, + }, + { + key: "equals", + value: function (e) { + return e.x === this.x && e.y === this.y; + }, + }, + { + key: "fromArray", + value: function (e) { + var t = + arguments.length > 1 && void 0 !== arguments[1] + ? arguments[1] + : 0; + return (this.x = e[t]), (this.y = e[t + 1]), this; + }, + }, + { + key: "toArray", + value: function () { + var 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; + }, + }, + { + key: "fromBufferAttribute", + value: function (e, t) { + return (this.x = e.getX(t)), (this.y = e.getY(t)), this; + }, + }, + { + key: "rotateAround", + value: function (e, t) { + var n = Math.cos(t), + r = Math.sin(t), + i = this.x - e.x, + a = this.y - e.y; + return ( + (this.x = i * n - a * r + e.x), + (this.y = i * r + a * n + e.y), + this + ); + }, + }, + { + key: "random", + value: function () { + return ( + (this.x = Math.random()), (this.y = Math.random()), this + ); + }, + }, + { + key: e, + value: (0, v.Z)().mark(function e() { + return (0, v.Z)().wrap( + function (e) { + for (;;) + switch ((e.prev = e.next)) { + case 0: + return (e.next = 2), this.x; + case 2: + return (e.next = 4), this.y; + case 4: + case "end": + return e.stop(); + } + }, + e, + this + ); + }), + }, + ]), + t + ); + })(Symbol.iterator), + hr = (function () { + function e(t, n, r, i, a, o, s, l, u) { + (0, m.Z)(this, e), + (e.prototype.isMatrix3 = !0), + (this.elements = [1, 0, 0, 0, 1, 0, 0, 0, 1]), + void 0 !== t && this.set(t, n, r, i, a, o, s, l, u); + } + return ( + (0, g.Z)(e, [ + { + key: "set", + value: function (e, t, n, r, i, a, o, s, l) { + var u = this.elements; + return ( + (u[0] = e), + (u[1] = r), + (u[2] = o), + (u[3] = t), + (u[4] = i), + (u[5] = s), + (u[6] = n), + (u[7] = a), + (u[8] = l), + this + ); + }, + }, + { + key: "identity", + value: function () { + return this.set(1, 0, 0, 0, 1, 0, 0, 0, 1), this; + }, + }, + { + key: "copy", + value: function (e) { + var 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 + ); + }, + }, + { + key: "extractBasis", + value: function (e, t, n) { + return ( + e.setFromMatrix3Column(this, 0), + t.setFromMatrix3Column(this, 1), + n.setFromMatrix3Column(this, 2), + this + ); + }, + }, + { + key: "setFromMatrix4", + value: function (e) { + var 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 + ); + }, + }, + { + key: "multiply", + value: function (e) { + return this.multiplyMatrices(this, e); + }, + }, + { + key: "premultiply", + value: function (e) { + return this.multiplyMatrices(e, this); + }, + }, + { + key: "multiplyMatrices", + value: function (e, t) { + var n = e.elements, + r = t.elements, + i = this.elements, + a = n[0], + o = n[3], + s = n[6], + l = n[1], + u = n[4], + c = n[7], + f = n[2], + d = n[5], + h = n[8], + p = r[0], + v = r[3], + m = r[6], + g = r[1], + A = r[4], + y = r[7], + b = r[2], + x = r[5], + S = r[8]; + return ( + (i[0] = a * p + o * g + s * b), + (i[3] = a * v + o * A + s * x), + (i[6] = a * m + o * y + s * S), + (i[1] = l * p + u * g + c * b), + (i[4] = l * v + u * A + c * x), + (i[7] = l * m + u * y + c * S), + (i[2] = f * p + d * g + h * b), + (i[5] = f * v + d * A + h * x), + (i[8] = f * m + d * y + h * S), + this + ); + }, + }, + { + key: "multiplyScalar", + value: function (e) { + var 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 + ); + }, + }, + { + key: "determinant", + value: function () { + var e = this.elements, + t = e[0], + n = e[1], + r = e[2], + i = e[3], + a = e[4], + o = e[5], + s = e[6], + l = e[7], + u = e[8]; + return ( + t * a * u - + t * o * l - + n * i * u + + n * o * s + + r * i * l - + r * a * s + ); + }, + }, + { + key: "invert", + value: function () { + var e = this.elements, + t = e[0], + n = e[1], + r = e[2], + i = e[3], + a = e[4], + o = e[5], + s = e[6], + l = e[7], + u = e[8], + c = u * a - o * l, + f = o * s - u * i, + d = l * i - a * s, + h = t * c + n * f + r * d; + if (0 === h) return this.set(0, 0, 0, 0, 0, 0, 0, 0, 0); + var p = 1 / h; + return ( + (e[0] = c * p), + (e[1] = (r * l - u * n) * p), + (e[2] = (o * n - r * a) * p), + (e[3] = f * p), + (e[4] = (u * t - r * s) * p), + (e[5] = (r * i - o * t) * p), + (e[6] = d * p), + (e[7] = (n * s - l * t) * p), + (e[8] = (a * t - n * i) * p), + this + ); + }, + }, + { + key: "transpose", + value: function () { + var e, + 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 + ); + }, + }, + { + key: "getNormalMatrix", + value: function (e) { + return this.setFromMatrix4(e).invert().transpose(); + }, + }, + { + key: "transposeIntoArray", + value: function (e) { + var 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 + ); + }, + }, + { + key: "setUvTransform", + value: function (e, t, n, r, i, a, o) { + var s = Math.cos(i), + l = Math.sin(i); + return ( + this.set( + n * s, + n * l, + -n * (s * a + l * o) + a + e, + -r * l, + r * s, + -r * (-l * a + s * o) + o + t, + 0, + 0, + 1 + ), + this + ); + }, + }, + { + key: "scale", + value: function (e, t) { + return this.premultiply(pr.makeScale(e, t)), this; + }, + }, + { + key: "rotate", + value: function (e) { + return this.premultiply(pr.makeRotation(-e)), this; + }, + }, + { + key: "translate", + value: function (e, t) { + return this.premultiply(pr.makeTranslation(e, t)), this; + }, + }, + { + key: "makeTranslation", + value: function (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 + ); + }, + }, + { + key: "makeRotation", + value: function (e) { + var t = Math.cos(e), + n = Math.sin(e); + return this.set(t, -n, 0, n, t, 0, 0, 0, 1), this; + }, + }, + { + key: "makeScale", + value: function (e, t) { + return this.set(e, 0, 0, 0, t, 0, 0, 0, 1), this; + }, + }, + { + key: "equals", + value: function (e) { + for ( + var t = this.elements, n = e.elements, r = 0; + r < 9; + r++ + ) + if (t[r] !== n[r]) return !1; + return !0; + }, + }, + { + key: "fromArray", + value: function (e) { + for ( + var t = + arguments.length > 1 && void 0 !== arguments[1] + ? arguments[1] + : 0, + n = 0; + n < 9; + n++ + ) + this.elements[n] = e[n + t]; + return this; + }, + }, + { + key: "toArray", + value: function () { + var e = + arguments.length > 0 && void 0 !== arguments[0] + ? arguments[0] + : [], + t = + arguments.length > 1 && void 0 !== arguments[1] + ? arguments[1] + : 0, + 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 + ); + }, + }, + { + key: "clone", + value: function () { + return new this.constructor().fromArray(this.elements); + }, + }, + ]), + e + ); + })(), + pr = new hr(); + function vr(e) { + for (var t = e.length - 1; t >= 0; --t) if (e[t] >= 65535) return !0; + return !1; + } + var mr = { + Int8Array: Int8Array, + Uint8Array: Uint8Array, + Uint8ClampedArray: Uint8ClampedArray, + Int16Array: Int16Array, + Uint16Array: Uint16Array, + Int32Array: Int32Array, + Uint32Array: Uint32Array, + Float32Array: Float32Array, + Float64Array: Float64Array, + }; + function gr(e, t) { + return new mr[e](t); + } + function Ar(e) { + return document.createElementNS("http://www.w3.org/1999/xhtml", e); + } + function yr() { + var e = Ar("canvas"); + return (e.style.display = "block"), e; + } + var br = {}; + function xr(e) { + e in br || ((br[e] = !0), console.warn(e)); + } + var Sr, + Er = new hr().set( + 0.8224621, + 0.177538, + 0, + 0.0331941, + 0.9668058, + 0, + 0.0170827, + 0.0723974, + 0.9105199 + ), + _r = new hr().set( + 1.2249401, + -0.2249404, + 0, + -0.0420569, + 1.0420571, + 0, + -0.0196376, + -0.0786361, + 1.0982735 + ), + Cr = + ((r = {}), + (0, p.Z)(r, on, { + transfer: un, + primaries: fn, + toReference: function (e) { + return e; + }, + fromReference: function (e) { + return e; + }, + }), + (0, p.Z)(r, an, { + transfer: cn, + primaries: fn, + toReference: function (e) { + return e.convertSRGBToLinear(); + }, + fromReference: function (e) { + return e.convertLinearToSRGB(); + }, + }), + (0, p.Z)(r, ln, { + transfer: un, + primaries: dn, + toReference: function (e) { + return e.applyMatrix3(_r); + }, + fromReference: function (e) { + return e.applyMatrix3(Er); + }, + }), + (0, p.Z)(r, sn, { + transfer: cn, + primaries: dn, + toReference: function (e) { + return e.convertSRGBToLinear().applyMatrix3(_r); + }, + fromReference: function (e) { + return e.applyMatrix3(Er).convertLinearToSRGB(); + }, + }), + r), + wr = new Set([on, ln]), + Tr = { + enabled: !0, + _workingColorSpace: on, + get legacyMode() { + return ( + console.warn( + "THREE.ColorManagement: .legacyMode=false renamed to .enabled=true in r150." + ), + !this.enabled + ); + }, + set legacyMode(e) { + console.warn( + "THREE.ColorManagement: .legacyMode=false renamed to .enabled=true in r150." + ), + (this.enabled = !e); + }, + get workingColorSpace() { + return this._workingColorSpace; + }, + set workingColorSpace(e) { + if (!wr.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; + var r = Cr[t].toReference; + return (0, Cr[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 Cr[e].primaries; + }, + getTransfer: function (e) { + return e === rn ? un : Cr[e].transfer; + }, + }; + function Mr(e) { + return e < 0.04045 + ? 0.0773993808 * e + : Math.pow(0.9478672986 * e + 0.0521327014, 2.4); + } + function Ir(e) { + return e < 0.0031308 + ? 12.92 * e + : 1.055 * Math.pow(e, 0.41666) - 0.055; + } + var kr = (function () { + function e() { + (0, m.Z)(this, e); + } + return ( + (0, g.Z)(e, null, [ + { + key: "getDataURL", + value: function (e) { + if (/^data:/i.test(e.src)) return e.src; + if ("undefined" === typeof HTMLCanvasElement) return e.src; + var t; + if (e instanceof HTMLCanvasElement) t = e; + else { + void 0 === Sr && (Sr = Ar("canvas")), + (Sr.width = e.width), + (Sr.height = e.height); + var n = Sr.getContext("2d"); + e instanceof ImageData + ? n.putImageData(e, 0, 0) + : n.drawImage(e, 0, 0, e.width, e.height), + (t = Sr); + } + return t.width > 2048 || t.height > 2048 + ? (console.warn( + "THREE.ImageUtils.getDataURL: Image converted to jpg for performance reasons", + e + ), + t.toDataURL("image/jpeg", 0.6)) + : t.toDataURL("image/png"); + }, + }, + { + key: "sRGBToLinear", + value: function (e) { + if ( + ("undefined" !== typeof HTMLImageElement && + e instanceof HTMLImageElement) || + ("undefined" !== typeof HTMLCanvasElement && + e instanceof HTMLCanvasElement) || + ("undefined" !== typeof ImageBitmap && + e instanceof ImageBitmap) + ) { + var t = Ar("canvas"); + (t.width = e.width), (t.height = e.height); + var n = t.getContext("2d"); + n.drawImage(e, 0, 0, e.width, e.height); + for ( + var r = n.getImageData(0, 0, e.width, e.height), + i = r.data, + a = 0; + a < i.length; + a++ + ) + i[a] = 255 * Mr(i[a] / 255); + return n.putImageData(r, 0, 0), t; + } + if (e.data) { + for (var o = e.data.slice(0), s = 0; s < o.length; s++) + o instanceof Uint8Array || + o instanceof Uint8ClampedArray + ? (o[s] = Math.floor(255 * Mr(o[s] / 255))) + : (o[s] = Mr(o[s])); + return { data: o, width: e.width, height: e.height }; + } + return ( + console.warn( + "THREE.ImageUtils.sRGBToLinear(): Unsupported image type. No color space conversion applied." + ), + e + ); + }, + }, + ]), + e + ); + })(), + Rr = 0, + Br = (function () { + function e() { + var t = + arguments.length > 0 && void 0 !== arguments[0] + ? arguments[0] + : null; + (0, m.Z)(this, e), + (this.isSource = !0), + Object.defineProperty(this, "id", { value: Rr++ }), + (this.uuid = nr()), + (this.data = t), + (this.version = 0); + } + return ( + (0, g.Z)(e, [ + { + key: "needsUpdate", + set: function (e) { + !0 === e && this.version++; + }, + }, + { + key: "toJSON", + value: function (e) { + var t = void 0 === e || "string" === typeof e; + if (!t && void 0 !== e.images[this.uuid]) + return e.images[this.uuid]; + var n = { uuid: this.uuid, url: "" }, + r = this.data; + if (null !== r) { + var i; + if (Array.isArray(r)) { + i = []; + for (var a = 0, o = r.length; a < o; a++) + r[a].isDataTexture + ? i.push(Pr(r[a].image)) + : i.push(Pr(r[a])); + } else i = Pr(r); + n.url = i; + } + return t || (e.images[this.uuid] = n), n; + }, + }, + ]), + e + ); + })(); + function Pr(e) { + return ("undefined" !== typeof HTMLImageElement && + e instanceof HTMLImageElement) || + ("undefined" !== typeof HTMLCanvasElement && + e instanceof HTMLCanvasElement) || + ("undefined" !== typeof ImageBitmap && e instanceof ImageBitmap) + ? kr.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."), {}); + } + var Lr = 0, + Dr = (function (e) { + (0, d.Z)(n, e); + var t = (0, h.Z)(n); + function n() { + var e, + r = + arguments.length > 0 && void 0 !== arguments[0] + ? arguments[0] + : n.DEFAULT_IMAGE, + i = + arguments.length > 1 && void 0 !== arguments[1] + ? arguments[1] + : n.DEFAULT_MAPPING, + a = + arguments.length > 2 && void 0 !== arguments[2] + ? arguments[2] + : Ce, + o = + arguments.length > 3 && void 0 !== arguments[3] + ? arguments[3] + : Ce, + s = + arguments.length > 4 && void 0 !== arguments[4] + ? arguments[4] + : Be, + l = + arguments.length > 5 && void 0 !== arguments[5] + ? arguments[5] + : De, + u = + arguments.length > 6 && void 0 !== arguments[6] + ? arguments[6] + : Ye, + c = + arguments.length > 7 && void 0 !== arguments[7] + ? arguments[7] + : Fe, + d = + arguments.length > 8 && void 0 !== arguments[8] + ? arguments[8] + : n.DEFAULT_ANISOTROPY, + h = + arguments.length > 9 && void 0 !== arguments[9] + ? arguments[9] + : rn; + return ( + (0, m.Z)(this, n), + ((e = t.call(this)).isTexture = !0), + Object.defineProperty((0, f.Z)(e), "id", { value: Lr++ }), + (e.uuid = nr()), + (e.name = ""), + (e.source = new Br(r)), + (e.mipmaps = []), + (e.mapping = i), + (e.channel = 0), + (e.wrapS = a), + (e.wrapT = o), + (e.magFilter = s), + (e.minFilter = l), + (e.anisotropy = d), + (e.format = u), + (e.internalFormat = null), + (e.type = c), + (e.offset = new dr(0, 0)), + (e.repeat = new dr(1, 1)), + (e.center = new dr(0, 0)), + (e.rotation = 0), + (e.matrixAutoUpdate = !0), + (e.matrix = new hr()), + (e.generateMipmaps = !0), + (e.premultiplyAlpha = !1), + (e.flipY = !0), + (e.unpackAlignment = 4), + "string" === typeof h + ? (e.colorSpace = h) + : (xr( + "THREE.Texture: Property .encoding has been replaced by .colorSpace." + ), + (e.colorSpace = h === Kt ? an : rn)), + (e.userData = {}), + (e.version = 0), + (e.onUpdate = null), + (e.isRenderTargetTexture = !1), + (e.needsPMREMUpdate = !1), + e + ); + } + return ( + (0, g.Z)(n, [ + { + key: "image", + get: function () { + return this.source.data; + }, + set: function () { + var e = + arguments.length > 0 && void 0 !== arguments[0] + ? arguments[0] + : null; + this.source.data = e; + }, + }, + { + key: "updateMatrix", + value: function () { + this.matrix.setUvTransform( + this.offset.x, + this.offset.y, + this.repeat.x, + this.repeat.y, + this.rotation, + this.center.x, + this.center.y + ); + }, + }, + { + key: "clone", + value: function () { + return new this.constructor().copy(this); + }, + }, + { + key: "copy", + value: function (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 + ); + }, + }, + { + key: "toJSON", + value: function (e) { + var t = void 0 === e || "string" === typeof e; + if (!t && void 0 !== e.textures[this.uuid]) + return e.textures[this.uuid]; + var 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 + ); + }, + }, + { + key: "dispose", + value: function () { + this.dispatchEvent({ type: "dispose" }); + }, + }, + { + key: "transformUv", + value: function (e) { + if (this.mapping !== Ae) return e; + if ((e.applyMatrix3(this.matrix), e.x < 0 || e.x > 1)) + switch (this.wrapS) { + case _e: + e.x = e.x - Math.floor(e.x); + break; + case Ce: + e.x = e.x < 0 ? 0 : 1; + break; + case we: + 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 _e: + e.y = e.y - Math.floor(e.y); + break; + case Ce: + e.y = e.y < 0 ? 0 : 1; + break; + case we: + 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; + }, + }, + { + key: "needsUpdate", + set: function (e) { + !0 === e && + (this.version++, (this.source.needsUpdate = !0)); + }, + }, + { + key: "encoding", + get: function () { + return ( + xr( + "THREE.Texture: Property .encoding has been replaced by .colorSpace." + ), + this.colorSpace === an ? Kt : Jt + ); + }, + set: function (e) { + xr( + "THREE.Texture: Property .encoding has been replaced by .colorSpace." + ), + (this.colorSpace = e === Kt ? an : rn); + }, + }, + ]), + n + ); + })(Jn); + (Dr.DEFAULT_IMAGE = null), + (Dr.DEFAULT_MAPPING = Ae), + (Dr.DEFAULT_ANISOTROPY = 1); + var Ur = (function (e) { + function t() { + var e = + arguments.length > 0 && void 0 !== arguments[0] + ? arguments[0] + : 0, + n = + arguments.length > 1 && void 0 !== arguments[1] + ? arguments[1] + : 0, + r = + arguments.length > 2 && void 0 !== arguments[2] + ? arguments[2] + : 0, + i = + arguments.length > 3 && void 0 !== arguments[3] + ? arguments[3] + : 1; + (0, m.Z)(this, t), + (t.prototype.isVector4 = !0), + (this.x = e), + (this.y = n), + (this.z = r), + (this.w = i); + } + return ( + (0, g.Z)(t, [ + { + key: "width", + get: function () { + return this.z; + }, + set: function (e) { + this.z = e; + }, + }, + { + key: "height", + get: function () { + return this.w; + }, + set: function (e) { + this.w = e; + }, + }, + { + key: "set", + value: function (e, t, n, r) { + return ( + (this.x = e), + (this.y = t), + (this.z = n), + (this.w = r), + this + ); + }, + }, + { + key: "setScalar", + value: function (e) { + return ( + (this.x = e), + (this.y = e), + (this.z = e), + (this.w = e), + this + ); + }, + }, + { + key: "setX", + value: function (e) { + return (this.x = e), this; + }, + }, + { + key: "setY", + value: function (e) { + return (this.y = e), this; + }, + }, + { + key: "setZ", + value: function (e) { + return (this.z = e), this; + }, + }, + { + key: "setW", + value: function (e) { + return (this.w = e), this; + }, + }, + { + key: "setComponent", + value: function (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; + }, + }, + { + key: "getComponent", + value: function (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); + } + }, + }, + { + key: "clone", + value: function () { + return new this.constructor(this.x, this.y, this.z, this.w); + }, + }, + { + key: "copy", + value: function (e) { + return ( + (this.x = e.x), + (this.y = e.y), + (this.z = e.z), + (this.w = void 0 !== e.w ? e.w : 1), + this + ); + }, + }, + { + key: "add", + value: function (e) { + return ( + (this.x += e.x), + (this.y += e.y), + (this.z += e.z), + (this.w += e.w), + this + ); + }, + }, + { + key: "addScalar", + value: function (e) { + return ( + (this.x += e), + (this.y += e), + (this.z += e), + (this.w += e), + this + ); + }, + }, + { + key: "addVectors", + value: function (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 + ); + }, + }, + { + key: "addScaledVector", + value: function (e, t) { + return ( + (this.x += e.x * t), + (this.y += e.y * t), + (this.z += e.z * t), + (this.w += e.w * t), + this + ); + }, + }, + { + key: "sub", + value: function (e) { + return ( + (this.x -= e.x), + (this.y -= e.y), + (this.z -= e.z), + (this.w -= e.w), + this + ); + }, + }, + { + key: "subScalar", + value: function (e) { + return ( + (this.x -= e), + (this.y -= e), + (this.z -= e), + (this.w -= e), + this + ); + }, + }, + { + key: "subVectors", + value: function (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 + ); + }, + }, + { + key: "multiply", + value: function (e) { + return ( + (this.x *= e.x), + (this.y *= e.y), + (this.z *= e.z), + (this.w *= e.w), + this + ); + }, + }, + { + key: "multiplyScalar", + value: function (e) { + return ( + (this.x *= e), + (this.y *= e), + (this.z *= e), + (this.w *= e), + this + ); + }, + }, + { + key: "applyMatrix4", + value: function (e) { + var t = this.x, + n = this.y, + r = this.z, + i = this.w, + a = e.elements; + return ( + (this.x = a[0] * t + a[4] * n + a[8] * r + a[12] * i), + (this.y = a[1] * t + a[5] * n + a[9] * r + a[13] * i), + (this.z = a[2] * t + a[6] * n + a[10] * r + a[14] * i), + (this.w = a[3] * t + a[7] * n + a[11] * r + a[15] * i), + this + ); + }, + }, + { + key: "divideScalar", + value: function (e) { + return this.multiplyScalar(1 / e); + }, + }, + { + key: "setAxisAngleFromQuaternion", + value: function (e) { + this.w = 2 * Math.acos(e.w); + var 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 + ); + }, + }, + { + key: "setAxisAngleFromRotationMatrix", + value: function (e) { + var t, + n, + r, + i, + a = 0.01, + o = 0.1, + s = e.elements, + l = s[0], + u = s[4], + c = s[8], + f = s[1], + d = s[5], + h = s[9], + p = s[2], + v = s[6], + m = s[10]; + if ( + Math.abs(u - f) < a && + Math.abs(c - p) < a && + Math.abs(h - v) < a + ) { + if ( + Math.abs(u + f) < o && + Math.abs(c + p) < o && + Math.abs(h + v) < o && + Math.abs(l + d + m - 3) < o + ) + return this.set(1, 0, 0, 0), this; + t = Math.PI; + var g = (l + 1) / 2, + A = (d + 1) / 2, + y = (m + 1) / 2, + b = (u + f) / 4, + x = (c + p) / 4, + S = (h + v) / 4; + return ( + g > A && g > y + ? g < a + ? ((n = 0), (r = 0.707106781), (i = 0.707106781)) + : ((r = b / (n = Math.sqrt(g))), (i = x / n)) + : A > y + ? A < a + ? ((n = 0.707106781), (r = 0), (i = 0.707106781)) + : ((n = b / (r = Math.sqrt(A))), (i = S / r)) + : y < a + ? ((n = 0.707106781), (r = 0.707106781), (i = 0)) + : ((n = x / (i = Math.sqrt(y))), (r = S / i)), + this.set(n, r, i, t), + this + ); + } + var E = Math.sqrt( + (v - h) * (v - h) + (c - p) * (c - p) + (f - u) * (f - u) + ); + return ( + Math.abs(E) < 0.001 && (E = 1), + (this.x = (v - h) / E), + (this.y = (c - p) / E), + (this.z = (f - u) / E), + (this.w = Math.acos((l + d + m - 1) / 2)), + this + ); + }, + }, + { + key: "min", + value: function (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 + ); + }, + }, + { + key: "max", + value: function (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 + ); + }, + }, + { + key: "clamp", + value: function (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 + ); + }, + }, + { + key: "clampScalar", + value: function (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 + ); + }, + }, + { + key: "clampLength", + value: function (e, t) { + var n = this.length(); + return this.divideScalar(n || 1).multiplyScalar( + Math.max(e, Math.min(t, n)) + ); + }, + }, + { + key: "floor", + value: function () { + 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 + ); + }, + }, + { + key: "ceil", + value: function () { + 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 + ); + }, + }, + { + key: "round", + value: function () { + 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 + ); + }, + }, + { + key: "roundToZero", + value: function () { + 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 + ); + }, + }, + { + key: "negate", + value: function () { + return ( + (this.x = -this.x), + (this.y = -this.y), + (this.z = -this.z), + (this.w = -this.w), + this + ); + }, + }, + { + key: "dot", + value: function (e) { + return ( + this.x * e.x + this.y * e.y + this.z * e.z + this.w * e.w + ); + }, + }, + { + key: "lengthSq", + value: function () { + return ( + this.x * this.x + + this.y * this.y + + this.z * this.z + + this.w * this.w + ); + }, + }, + { + key: "length", + value: function () { + return Math.sqrt( + this.x * this.x + + this.y * this.y + + this.z * this.z + + this.w * this.w + ); + }, + }, + { + key: "manhattanLength", + value: function () { + return ( + Math.abs(this.x) + + Math.abs(this.y) + + Math.abs(this.z) + + Math.abs(this.w) + ); + }, + }, + { + key: "normalize", + value: function () { + return this.divideScalar(this.length() || 1); + }, + }, + { + key: "setLength", + value: function (e) { + return this.normalize().multiplyScalar(e); + }, + }, + { + key: "lerp", + value: function (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 + ); + }, + }, + { + key: "lerpVectors", + value: function (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 + ); + }, + }, + { + key: "equals", + value: function (e) { + return ( + e.x === this.x && + e.y === this.y && + e.z === this.z && + e.w === this.w + ); + }, + }, + { + key: "fromArray", + value: function (e) { + var 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 + ); + }, + }, + { + key: "toArray", + value: function () { + var 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 + ); + }, + }, + { + key: "fromBufferAttribute", + value: function (e, t) { + return ( + (this.x = e.getX(t)), + (this.y = e.getY(t)), + (this.z = e.getZ(t)), + (this.w = e.getW(t)), + this + ); + }, + }, + { + key: "random", + value: function () { + return ( + (this.x = Math.random()), + (this.y = Math.random()), + (this.z = Math.random()), + (this.w = Math.random()), + this + ); + }, + }, + { + key: e, + value: (0, v.Z)().mark(function e() { + return (0, v.Z)().wrap( + function (e) { + for (;;) + switch ((e.prev = e.next)) { + case 0: + return (e.next = 2), this.x; + case 2: + return (e.next = 4), this.y; + case 4: + return (e.next = 6), this.z; + case 6: + return (e.next = 8), this.w; + case 8: + case "end": + return e.stop(); + } + }, + e, + this + ); + }), + }, + ]), + t + ); + })(Symbol.iterator), + Fr = (function (e) { + (0, d.Z)(n, e); + var t = (0, h.Z)(n); + function n() { + var e, + r = + arguments.length > 0 && void 0 !== arguments[0] + ? arguments[0] + : 1, + i = + arguments.length > 1 && void 0 !== arguments[1] + ? arguments[1] + : 1, + a = + arguments.length > 2 && void 0 !== arguments[2] + ? arguments[2] + : {}; + (0, m.Z)(this, n), + ((e = t.call(this)).isRenderTarget = !0), + (e.width = r), + (e.height = i), + (e.depth = 1), + (e.scissor = new Ur(0, 0, r, i)), + (e.scissorTest = !1), + (e.viewport = new Ur(0, 0, r, i)); + var o = { width: r, height: i, depth: 1 }; + return ( + void 0 !== a.encoding && + (xr( + "THREE.WebGLRenderTarget: option.encoding has been replaced by option.colorSpace." + ), + (a.colorSpace = a.encoding === Kt ? an : rn)), + (a = Object.assign( + { + generateMipmaps: !1, + internalFormat: null, + minFilter: Be, + depthBuffer: !0, + stencilBuffer: !1, + depthTexture: null, + samples: 0, + }, + a + )), + (e.texture = new Dr( + o, + a.mapping, + a.wrapS, + a.wrapT, + a.magFilter, + a.minFilter, + a.format, + a.type, + a.anisotropy, + a.colorSpace + )), + (e.texture.isRenderTargetTexture = !0), + (e.texture.flipY = !1), + (e.texture.generateMipmaps = a.generateMipmaps), + (e.texture.internalFormat = a.internalFormat), + (e.depthBuffer = a.depthBuffer), + (e.stencilBuffer = a.stencilBuffer), + (e.depthTexture = a.depthTexture), + (e.samples = a.samples), + e + ); + } + return ( + (0, g.Z)(n, [ + { + key: "setSize", + value: function (e, t) { + var n = + arguments.length > 2 && void 0 !== arguments[2] + ? arguments[2] + : 1; + (this.width === e && + this.height === t && + this.depth === n) || + ((this.width = e), + (this.height = t), + (this.depth = n), + (this.texture.image.width = e), + (this.texture.image.height = t), + (this.texture.image.depth = n), + this.dispose()), + this.viewport.set(0, 0, e, t), + this.scissor.set(0, 0, e, t); + }, + }, + { + key: "clone", + value: function () { + return new this.constructor().copy(this); + }, + }, + { + key: "copy", + value: function (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.texture = e.texture.clone()), + (this.texture.isRenderTargetTexture = !0); + var t = Object.assign({}, e.texture.image); + return ( + (this.texture.source = new Br(t)), + (this.depthBuffer = e.depthBuffer), + (this.stencilBuffer = e.stencilBuffer), + null !== e.depthTexture && + (this.depthTexture = e.depthTexture.clone()), + (this.samples = e.samples), + this + ); + }, + }, + { + key: "dispose", + value: function () { + this.dispatchEvent({ type: "dispose" }); + }, + }, + ]), + n + ); + })(Jn), + Or = (function (e) { + (0, d.Z)(n, e); + var t = (0, h.Z)(n); + function n() { + var e, + r = + arguments.length > 0 && void 0 !== arguments[0] + ? arguments[0] + : 1, + i = + arguments.length > 1 && void 0 !== arguments[1] + ? arguments[1] + : 1, + a = + arguments.length > 2 && void 0 !== arguments[2] + ? arguments[2] + : {}; + return ( + (0, m.Z)(this, n), + ((e = t.call(this, r, i, a)).isWebGLRenderTarget = !0), + e + ); + } + return (0, g.Z)(n); + })(Fr), + Nr = (function (e) { + (0, d.Z)(n, e); + var t = (0, h.Z)(n); + function n() { + var e, + r = + arguments.length > 0 && void 0 !== arguments[0] + ? arguments[0] + : null, + i = + arguments.length > 1 && void 0 !== arguments[1] + ? arguments[1] + : 1, + a = + arguments.length > 2 && void 0 !== arguments[2] + ? arguments[2] + : 1, + o = + arguments.length > 3 && void 0 !== arguments[3] + ? arguments[3] + : 1; + return ( + (0, m.Z)(this, n), + ((e = t.call(this, null)).isDataArrayTexture = !0), + (e.image = { data: r, width: i, height: a, depth: o }), + (e.magFilter = Te), + (e.minFilter = Te), + (e.wrapR = Ce), + (e.generateMipmaps = !1), + (e.flipY = !1), + (e.unpackAlignment = 1), + e + ); + } + return (0, g.Z)(n); + })(Dr), + Gr = (function (e) { + (0, d.Z)(n, e); + var t = (0, h.Z)(n); + function n() { + var e, + r = + arguments.length > 0 && void 0 !== arguments[0] + ? arguments[0] + : 1, + i = + arguments.length > 1 && void 0 !== arguments[1] + ? arguments[1] + : 1, + a = + arguments.length > 2 && void 0 !== arguments[2] + ? arguments[2] + : 1; + return ( + (0, m.Z)(this, n), + ((e = t.call(this, r, i)).isWebGLArrayRenderTarget = !0), + (e.depth = a), + (e.texture = new Nr(null, r, i, a)), + (e.texture.isRenderTargetTexture = !0), + e + ); + } + return (0, g.Z)(n); + })(Or), + Zr = (function (e) { + (0, d.Z)(n, e); + var t = (0, h.Z)(n); + function n() { + var e, + r = + arguments.length > 0 && void 0 !== arguments[0] + ? arguments[0] + : null, + i = + arguments.length > 1 && void 0 !== arguments[1] + ? arguments[1] + : 1, + a = + arguments.length > 2 && void 0 !== arguments[2] + ? arguments[2] + : 1, + o = + arguments.length > 3 && void 0 !== arguments[3] + ? arguments[3] + : 1; + return ( + (0, m.Z)(this, n), + ((e = t.call(this, null)).isData3DTexture = !0), + (e.image = { data: r, width: i, height: a, depth: o }), + (e.magFilter = Te), + (e.minFilter = Te), + (e.wrapR = Ce), + (e.generateMipmaps = !1), + (e.flipY = !1), + (e.unpackAlignment = 1), + e + ); + } + return (0, g.Z)(n); + })(Dr), + zr = (function (e) { + (0, d.Z)(n, e); + var t = (0, h.Z)(n); + function n() { + var e, + r = + arguments.length > 0 && void 0 !== arguments[0] + ? arguments[0] + : 1, + i = + arguments.length > 1 && void 0 !== arguments[1] + ? arguments[1] + : 1, + a = + arguments.length > 2 && void 0 !== arguments[2] + ? arguments[2] + : 1; + return ( + (0, m.Z)(this, n), + ((e = t.call(this, r, i)).isWebGL3DRenderTarget = !0), + (e.depth = a), + (e.texture = new Zr(null, r, i, a)), + (e.texture.isRenderTargetTexture = !0), + e + ); + } + return (0, g.Z)(n); + })(Or), + Qr = (function (e) { + (0, d.Z)(n, e); + var t = (0, h.Z)(n); + function n() { + var e, + r = + arguments.length > 0 && void 0 !== arguments[0] + ? arguments[0] + : 1, + i = + arguments.length > 1 && void 0 !== arguments[1] + ? arguments[1] + : 1, + a = + arguments.length > 2 && void 0 !== arguments[2] + ? arguments[2] + : 1, + o = + arguments.length > 3 && void 0 !== arguments[3] + ? arguments[3] + : {}; + (0, m.Z)(this, n), + ((e = t.call(this, r, i, o)).isWebGLMultipleRenderTargets = !0); + var s = e.texture; + e.texture = []; + for (var l = 0; l < a; l++) + (e.texture[l] = s.clone()), + (e.texture[l].isRenderTargetTexture = !0); + return e; + } + return ( + (0, g.Z)(n, [ + { + key: "setSize", + value: function (e, t) { + var 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 (var r = 0, i = this.texture.length; r < i; r++) + (this.texture[r].image.width = e), + (this.texture[r].image.height = t), + (this.texture[r].image.depth = n); + this.dispose(); + } + this.viewport.set(0, 0, e, t), this.scissor.set(0, 0, e, t); + }, + }, + { + key: "copy", + value: function (e) { + this.dispose(), + (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.depthBuffer = e.depthBuffer), + (this.stencilBuffer = e.stencilBuffer), + null !== e.depthTexture && + (this.depthTexture = e.depthTexture.clone()), + (this.texture.length = 0); + for (var t = 0, n = e.texture.length; t < n; t++) + (this.texture[t] = e.texture[t].clone()), + (this.texture[t].isRenderTargetTexture = !0); + return this; + }, + }, + ]), + n + ); + })(Or), + Hr = (function (e) { + function t() { + var e = + arguments.length > 0 && void 0 !== arguments[0] + ? arguments[0] + : 0, + n = + arguments.length > 1 && void 0 !== arguments[1] + ? arguments[1] + : 0, + r = + arguments.length > 2 && void 0 !== arguments[2] + ? arguments[2] + : 0, + i = + arguments.length > 3 && void 0 !== arguments[3] + ? arguments[3] + : 1; + (0, m.Z)(this, t), + (this.isQuaternion = !0), + (this._x = e), + (this._y = n), + (this._z = r), + (this._w = i); + } + return ( + (0, g.Z)( + t, + [ + { + key: "x", + get: function () { + return this._x; + }, + set: function (e) { + (this._x = e), this._onChangeCallback(); + }, + }, + { + key: "y", + get: function () { + return this._y; + }, + set: function (e) { + (this._y = e), this._onChangeCallback(); + }, + }, + { + key: "z", + get: function () { + return this._z; + }, + set: function (e) { + (this._z = e), this._onChangeCallback(); + }, + }, + { + key: "w", + get: function () { + return this._w; + }, + set: function (e) { + (this._w = e), this._onChangeCallback(); + }, + }, + { + key: "set", + value: function (e, t, n, r) { + return ( + (this._x = e), + (this._y = t), + (this._z = n), + (this._w = r), + this._onChangeCallback(), + this + ); + }, + }, + { + key: "clone", + value: function () { + return new this.constructor( + this._x, + this._y, + this._z, + this._w + ); + }, + }, + { + key: "copy", + value: function (e) { + return ( + (this._x = e.x), + (this._y = e.y), + (this._z = e.z), + (this._w = e.w), + this._onChangeCallback(), + this + ); + }, + }, + { + key: "setFromEuler", + value: function (e, t) { + var n = e._x, + r = e._y, + i = e._z, + a = e._order, + o = Math.cos, + s = Math.sin, + l = o(n / 2), + u = o(r / 2), + c = o(i / 2), + f = s(n / 2), + d = s(r / 2), + h = s(i / 2); + switch (a) { + case "XYZ": + (this._x = f * u * c + l * d * h), + (this._y = l * d * c - f * u * h), + (this._z = l * u * h + f * d * c), + (this._w = l * u * c - f * d * h); + break; + case "YXZ": + (this._x = f * u * c + l * d * h), + (this._y = l * d * c - f * u * h), + (this._z = l * u * h - f * d * c), + (this._w = l * u * c + f * d * h); + break; + case "ZXY": + (this._x = f * u * c - l * d * h), + (this._y = l * d * c + f * u * h), + (this._z = l * u * h + f * d * c), + (this._w = l * u * c - f * d * h); + break; + case "ZYX": + (this._x = f * u * c - l * d * h), + (this._y = l * d * c + f * u * h), + (this._z = l * u * h - f * d * c), + (this._w = l * u * c + f * d * h); + break; + case "YZX": + (this._x = f * u * c + l * d * h), + (this._y = l * d * c + f * u * h), + (this._z = l * u * h - f * d * c), + (this._w = l * u * c - f * d * h); + break; + case "XZY": + (this._x = f * u * c - l * d * h), + (this._y = l * d * c - f * u * h), + (this._z = l * u * h + f * d * c), + (this._w = l * u * c + f * d * h); + break; + default: + console.warn( + "THREE.Quaternion: .setFromEuler() encountered an unknown order: " + + a + ); + } + return !1 !== t && this._onChangeCallback(), this; + }, + }, + { + key: "setFromAxisAngle", + value: function (e, t) { + var 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 + ); + }, + }, + { + key: "setFromRotationMatrix", + value: function (e) { + var t = e.elements, + n = t[0], + r = t[4], + i = t[8], + a = t[1], + o = t[5], + s = t[9], + l = t[2], + u = t[6], + c = t[10], + f = n + o + c; + if (f > 0) { + var d = 0.5 / Math.sqrt(f + 1); + (this._w = 0.25 / d), + (this._x = (u - s) * d), + (this._y = (i - l) * d), + (this._z = (a - r) * d); + } else if (n > o && n > c) { + var h = 2 * Math.sqrt(1 + n - o - c); + (this._w = (u - s) / h), + (this._x = 0.25 * h), + (this._y = (r + a) / h), + (this._z = (i + l) / h); + } else if (o > c) { + var p = 2 * Math.sqrt(1 + o - n - c); + (this._w = (i - l) / p), + (this._x = (r + a) / p), + (this._y = 0.25 * p), + (this._z = (s + u) / p); + } else { + var v = 2 * Math.sqrt(1 + c - n - o); + (this._w = (a - r) / v), + (this._x = (i + l) / v), + (this._y = (s + u) / v), + (this._z = 0.25 * v); + } + return this._onChangeCallback(), this; + }, + }, + { + key: "setFromUnitVectors", + value: function (e, t) { + var 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() + ); + }, + }, + { + key: "angleTo", + value: function (e) { + return 2 * Math.acos(Math.abs(rr(this.dot(e), -1, 1))); + }, + }, + { + key: "rotateTowards", + value: function (e, t) { + var n = this.angleTo(e); + if (0 === n) return this; + var r = Math.min(1, t / n); + return this.slerp(e, r), this; + }, + }, + { + key: "identity", + value: function () { + return this.set(0, 0, 0, 1); + }, + }, + { + key: "invert", + value: function () { + return this.conjugate(); + }, + }, + { + key: "conjugate", + value: function () { + return ( + (this._x *= -1), + (this._y *= -1), + (this._z *= -1), + this._onChangeCallback(), + this + ); + }, + }, + { + key: "dot", + value: function (e) { + return ( + this._x * e._x + + this._y * e._y + + this._z * e._z + + this._w * e._w + ); + }, + }, + { + key: "lengthSq", + value: function () { + return ( + this._x * this._x + + this._y * this._y + + this._z * this._z + + this._w * this._w + ); + }, + }, + { + key: "length", + value: function () { + return Math.sqrt( + this._x * this._x + + this._y * this._y + + this._z * this._z + + this._w * this._w + ); + }, + }, + { + key: "normalize", + value: function () { + var 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 + ); + }, + }, + { + key: "multiply", + value: function (e) { + return this.multiplyQuaternions(this, e); + }, + }, + { + key: "premultiply", + value: function (e) { + return this.multiplyQuaternions(e, this); + }, + }, + { + key: "multiplyQuaternions", + value: function (e, t) { + var n = e._x, + r = e._y, + i = e._z, + a = e._w, + o = t._x, + s = t._y, + l = t._z, + u = t._w; + return ( + (this._x = n * u + a * o + r * l - i * s), + (this._y = r * u + a * s + i * o - n * l), + (this._z = i * u + a * l + n * s - r * o), + (this._w = a * u - n * o - r * s - i * l), + this._onChangeCallback(), + this + ); + }, + }, + { + key: "slerp", + value: function (e, t) { + if (0 === t) return this; + if (1 === t) return this.copy(e); + var n = this._x, + r = this._y, + i = this._z, + a = this._w, + o = a * e._w + n * e._x + r * e._y + i * e._z; + if ( + (o < 0 + ? ((this._w = -e._w), + (this._x = -e._x), + (this._y = -e._y), + (this._z = -e._z), + (o = -o)) + : this.copy(e), + o >= 1) + ) + return ( + (this._w = a), + (this._x = n), + (this._y = r), + (this._z = i), + this + ); + var s = 1 - o * o; + if (s <= Number.EPSILON) { + var l = 1 - t; + return ( + (this._w = l * a + t * this._w), + (this._x = l * n + t * this._x), + (this._y = l * r + t * this._y), + (this._z = l * i + t * this._z), + this.normalize(), + this._onChangeCallback(), + this + ); + } + var u = Math.sqrt(s), + c = Math.atan2(u, o), + f = Math.sin((1 - t) * c) / u, + d = Math.sin(t * c) / u; + return ( + (this._w = a * f + this._w * d), + (this._x = n * f + this._x * d), + (this._y = r * f + this._y * d), + (this._z = i * f + this._z * d), + this._onChangeCallback(), + this + ); + }, + }, + { + key: "slerpQuaternions", + value: function (e, t, n) { + return this.copy(e).slerp(t, n); + }, + }, + { + key: "random", + value: function () { + var e = Math.random(), + t = Math.sqrt(1 - e), + n = Math.sqrt(e), + r = 2 * Math.PI * Math.random(), + i = 2 * Math.PI * Math.random(); + return this.set( + t * Math.cos(r), + n * Math.sin(i), + n * Math.cos(i), + t * Math.sin(r) + ); + }, + }, + { + key: "equals", + value: function (e) { + return ( + e._x === this._x && + e._y === this._y && + e._z === this._z && + e._w === this._w + ); + }, + }, + { + key: "fromArray", + value: function (e) { + var 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 + ); + }, + }, + { + key: "toArray", + value: function () { + var 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 + ); + }, + }, + { + key: "fromBufferAttribute", + value: function (e, t) { + return ( + (this._x = e.getX(t)), + (this._y = e.getY(t)), + (this._z = e.getZ(t)), + (this._w = e.getW(t)), + this + ); + }, + }, + { + key: "toJSON", + value: function () { + return this.toArray(); + }, + }, + { + key: "_onChange", + value: function (e) { + return (this._onChangeCallback = e), this; + }, + }, + { key: "_onChangeCallback", value: function () {} }, + { + key: e, + value: (0, v.Z)().mark(function e() { + return (0, v.Z)().wrap( + function (e) { + for (;;) + switch ((e.prev = e.next)) { + case 0: + return (e.next = 2), this._x; + case 2: + return (e.next = 4), this._y; + case 4: + return (e.next = 6), this._z; + case 6: + return (e.next = 8), this._w; + case 8: + case "end": + return e.stop(); + } + }, + e, + this + ); + }), + }, + ], + [ + { + key: "slerpFlat", + value: function (e, t, n, r, i, a, o) { + var s = n[r + 0], + l = n[r + 1], + u = n[r + 2], + c = n[r + 3], + f = i[a + 0], + d = i[a + 1], + h = i[a + 2], + p = i[a + 3]; + if (0 === o) + return ( + (e[t + 0] = s), + (e[t + 1] = l), + (e[t + 2] = u), + void (e[t + 3] = c) + ); + if (1 === o) + return ( + (e[t + 0] = f), + (e[t + 1] = d), + (e[t + 2] = h), + void (e[t + 3] = p) + ); + if (c !== p || s !== f || l !== d || u !== h) { + var v = 1 - o, + m = s * f + l * d + u * h + c * p, + g = m >= 0 ? 1 : -1, + A = 1 - m * m; + if (A > Number.EPSILON) { + var y = Math.sqrt(A), + b = Math.atan2(y, m * g); + (v = Math.sin(v * b) / y), (o = Math.sin(o * b) / y); + } + var x = o * g; + if ( + ((s = s * v + f * x), + (l = l * v + d * x), + (u = u * v + h * x), + (c = c * v + p * x), + v === 1 - o) + ) { + var S = 1 / Math.sqrt(s * s + l * l + u * u + c * c); + (s *= S), (l *= S), (u *= S), (c *= S); + } + } + (e[t] = s), + (e[t + 1] = l), + (e[t + 2] = u), + (e[t + 3] = c); + }, + }, + { + key: "multiplyQuaternionsFlat", + value: function (e, t, n, r, i, a) { + var o = n[r], + s = n[r + 1], + l = n[r + 2], + u = n[r + 3], + c = i[a], + f = i[a + 1], + d = i[a + 2], + h = i[a + 3]; + return ( + (e[t] = o * h + u * c + s * d - l * f), + (e[t + 1] = s * h + u * f + l * c - o * d), + (e[t + 2] = l * h + u * d + o * f - s * c), + (e[t + 3] = u * h - o * c - s * f - l * d), + e + ); + }, + }, + ] + ), + t + ); + })(Symbol.iterator), + Vr = (function (e) { + function t() { + var e = + arguments.length > 0 && void 0 !== arguments[0] + ? arguments[0] + : 0, + n = + arguments.length > 1 && void 0 !== arguments[1] + ? arguments[1] + : 0, + r = + arguments.length > 2 && void 0 !== arguments[2] + ? arguments[2] + : 0; + (0, m.Z)(this, t), + (t.prototype.isVector3 = !0), + (this.x = e), + (this.y = n), + (this.z = r); + } + return ( + (0, g.Z)(t, [ + { + key: "set", + value: function (e, t, n) { + return ( + void 0 === n && (n = this.z), + (this.x = e), + (this.y = t), + (this.z = n), + this + ); + }, + }, + { + key: "setScalar", + value: function (e) { + return (this.x = e), (this.y = e), (this.z = e), this; + }, + }, + { + key: "setX", + value: function (e) { + return (this.x = e), this; + }, + }, + { + key: "setY", + value: function (e) { + return (this.y = e), this; + }, + }, + { + key: "setZ", + value: function (e) { + return (this.z = e), this; + }, + }, + { + key: "setComponent", + value: function (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; + }, + }, + { + key: "getComponent", + value: function (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); + } + }, + }, + { + key: "clone", + value: function () { + return new this.constructor(this.x, this.y, this.z); + }, + }, + { + key: "copy", + value: function (e) { + return (this.x = e.x), (this.y = e.y), (this.z = e.z), this; + }, + }, + { + key: "add", + value: function (e) { + return ( + (this.x += e.x), (this.y += e.y), (this.z += e.z), this + ); + }, + }, + { + key: "addScalar", + value: function (e) { + return (this.x += e), (this.y += e), (this.z += e), this; + }, + }, + { + key: "addVectors", + value: function (e, t) { + return ( + (this.x = e.x + t.x), + (this.y = e.y + t.y), + (this.z = e.z + t.z), + this + ); + }, + }, + { + key: "addScaledVector", + value: function (e, t) { + return ( + (this.x += e.x * t), + (this.y += e.y * t), + (this.z += e.z * t), + this + ); + }, + }, + { + key: "sub", + value: function (e) { + return ( + (this.x -= e.x), (this.y -= e.y), (this.z -= e.z), this + ); + }, + }, + { + key: "subScalar", + value: function (e) { + return (this.x -= e), (this.y -= e), (this.z -= e), this; + }, + }, + { + key: "subVectors", + value: function (e, t) { + return ( + (this.x = e.x - t.x), + (this.y = e.y - t.y), + (this.z = e.z - t.z), + this + ); + }, + }, + { + key: "multiply", + value: function (e) { + return ( + (this.x *= e.x), (this.y *= e.y), (this.z *= e.z), this + ); + }, + }, + { + key: "multiplyScalar", + value: function (e) { + return (this.x *= e), (this.y *= e), (this.z *= e), this; + }, + }, + { + key: "multiplyVectors", + value: function (e, t) { + return ( + (this.x = e.x * t.x), + (this.y = e.y * t.y), + (this.z = e.z * t.z), + this + ); + }, + }, + { + key: "applyEuler", + value: function (e) { + return this.applyQuaternion(Wr.setFromEuler(e)); + }, + }, + { + key: "applyAxisAngle", + value: function (e, t) { + return this.applyQuaternion(Wr.setFromAxisAngle(e, t)); + }, + }, + { + key: "applyMatrix3", + value: function (e) { + var 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 + ); + }, + }, + { + key: "applyNormalMatrix", + value: function (e) { + return this.applyMatrix3(e).normalize(); + }, + }, + { + key: "applyMatrix4", + value: function (e) { + var t = this.x, + n = this.y, + r = this.z, + i = e.elements, + a = 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]) * a), + (this.y = (i[1] * t + i[5] * n + i[9] * r + i[13]) * a), + (this.z = (i[2] * t + i[6] * n + i[10] * r + i[14]) * a), + this + ); + }, + }, + { + key: "applyQuaternion", + value: function (e) { + var t = this.x, + n = this.y, + r = this.z, + i = e.x, + a = e.y, + o = e.z, + s = e.w, + l = s * t + a * r - o * n, + u = s * n + o * t - i * r, + c = s * r + i * n - a * t, + f = -i * t - a * n - o * r; + return ( + (this.x = l * s + f * -i + u * -o - c * -a), + (this.y = u * s + f * -a + c * -i - l * -o), + (this.z = c * s + f * -o + l * -a - u * -i), + this + ); + }, + }, + { + key: "project", + value: function (e) { + return this.applyMatrix4(e.matrixWorldInverse).applyMatrix4( + e.projectionMatrix + ); + }, + }, + { + key: "unproject", + value: function (e) { + return this.applyMatrix4( + e.projectionMatrixInverse + ).applyMatrix4(e.matrixWorld); + }, + }, + { + key: "transformDirection", + value: function (e) { + var 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() + ); + }, + }, + { + key: "divide", + value: function (e) { + return ( + (this.x /= e.x), (this.y /= e.y), (this.z /= e.z), this + ); + }, + }, + { + key: "divideScalar", + value: function (e) { + return this.multiplyScalar(1 / e); + }, + }, + { + key: "min", + value: function (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 + ); + }, + }, + { + key: "max", + value: function (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 + ); + }, + }, + { + key: "clamp", + value: function (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 + ); + }, + }, + { + key: "clampScalar", + value: function (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 + ); + }, + }, + { + key: "clampLength", + value: function (e, t) { + var n = this.length(); + return this.divideScalar(n || 1).multiplyScalar( + Math.max(e, Math.min(t, n)) + ); + }, + }, + { + key: "floor", + value: function () { + return ( + (this.x = Math.floor(this.x)), + (this.y = Math.floor(this.y)), + (this.z = Math.floor(this.z)), + this + ); + }, + }, + { + key: "ceil", + value: function () { + return ( + (this.x = Math.ceil(this.x)), + (this.y = Math.ceil(this.y)), + (this.z = Math.ceil(this.z)), + this + ); + }, + }, + { + key: "round", + value: function () { + return ( + (this.x = Math.round(this.x)), + (this.y = Math.round(this.y)), + (this.z = Math.round(this.z)), + this + ); + }, + }, + { + key: "roundToZero", + value: function () { + return ( + (this.x = Math.trunc(this.x)), + (this.y = Math.trunc(this.y)), + (this.z = Math.trunc(this.z)), + this + ); + }, + }, + { + key: "negate", + value: function () { + return ( + (this.x = -this.x), + (this.y = -this.y), + (this.z = -this.z), + this + ); + }, + }, + { + key: "dot", + value: function (e) { + return this.x * e.x + this.y * e.y + this.z * e.z; + }, + }, + { + key: "lengthSq", + value: function () { + return this.x * this.x + this.y * this.y + this.z * this.z; + }, + }, + { + key: "length", + value: function () { + return Math.sqrt( + this.x * this.x + this.y * this.y + this.z * this.z + ); + }, + }, + { + key: "manhattanLength", + value: function () { + return ( + Math.abs(this.x) + Math.abs(this.y) + Math.abs(this.z) + ); + }, + }, + { + key: "normalize", + value: function () { + return this.divideScalar(this.length() || 1); + }, + }, + { + key: "setLength", + value: function (e) { + return this.normalize().multiplyScalar(e); + }, + }, + { + key: "lerp", + value: function (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 + ); + }, + }, + { + key: "lerpVectors", + value: function (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 + ); + }, + }, + { + key: "cross", + value: function (e) { + return this.crossVectors(this, e); + }, + }, + { + key: "crossVectors", + value: function (e, t) { + var n = e.x, + r = e.y, + i = e.z, + a = t.x, + o = t.y, + s = t.z; + return ( + (this.x = r * s - i * o), + (this.y = i * a - n * s), + (this.z = n * o - r * a), + this + ); + }, + }, + { + key: "projectOnVector", + value: function (e) { + var t = e.lengthSq(); + if (0 === t) return this.set(0, 0, 0); + var n = e.dot(this) / t; + return this.copy(e).multiplyScalar(n); + }, + }, + { + key: "projectOnPlane", + value: function (e) { + return jr.copy(this).projectOnVector(e), this.sub(jr); + }, + }, + { + key: "reflect", + value: function (e) { + return this.sub(jr.copy(e).multiplyScalar(2 * this.dot(e))); + }, + }, + { + key: "angleTo", + value: function (e) { + var t = Math.sqrt(this.lengthSq() * e.lengthSq()); + if (0 === t) return Math.PI / 2; + var n = this.dot(e) / t; + return Math.acos(rr(n, -1, 1)); + }, + }, + { + key: "distanceTo", + value: function (e) { + return Math.sqrt(this.distanceToSquared(e)); + }, + }, + { + key: "distanceToSquared", + value: function (e) { + var t = this.x - e.x, + n = this.y - e.y, + r = this.z - e.z; + return t * t + n * n + r * r; + }, + }, + { + key: "manhattanDistanceTo", + value: function (e) { + return ( + Math.abs(this.x - e.x) + + Math.abs(this.y - e.y) + + Math.abs(this.z - e.z) + ); + }, + }, + { + key: "setFromSpherical", + value: function (e) { + return this.setFromSphericalCoords( + e.radius, + e.phi, + e.theta + ); + }, + }, + { + key: "setFromSphericalCoords", + value: function (e, t, n) { + var 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 + ); + }, + }, + { + key: "setFromCylindrical", + value: function (e) { + return this.setFromCylindricalCoords( + e.radius, + e.theta, + e.y + ); + }, + }, + { + key: "setFromCylindricalCoords", + value: function (e, t, n) { + return ( + (this.x = e * Math.sin(t)), + (this.y = n), + (this.z = e * Math.cos(t)), + this + ); + }, + }, + { + key: "setFromMatrixPosition", + value: function (e) { + var t = e.elements; + return ( + (this.x = t[12]), (this.y = t[13]), (this.z = t[14]), this + ); + }, + }, + { + key: "setFromMatrixScale", + value: function (e) { + var 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; + }, + }, + { + key: "setFromMatrixColumn", + value: function (e, t) { + return this.fromArray(e.elements, 4 * t); + }, + }, + { + key: "setFromMatrix3Column", + value: function (e, t) { + return this.fromArray(e.elements, 3 * t); + }, + }, + { + key: "setFromEuler", + value: function (e) { + return ( + (this.x = e._x), (this.y = e._y), (this.z = e._z), this + ); + }, + }, + { + key: "setFromColor", + value: function (e) { + return (this.x = e.r), (this.y = e.g), (this.z = e.b), this; + }, + }, + { + key: "equals", + value: function (e) { + return e.x === this.x && e.y === this.y && e.z === this.z; + }, + }, + { + key: "fromArray", + value: function (e) { + var 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 + ); + }, + }, + { + key: "toArray", + value: function () { + var 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 + ); + }, + }, + { + key: "fromBufferAttribute", + value: function (e, t) { + return ( + (this.x = e.getX(t)), + (this.y = e.getY(t)), + (this.z = e.getZ(t)), + this + ); + }, + }, + { + key: "random", + value: function () { + return ( + (this.x = Math.random()), + (this.y = Math.random()), + (this.z = Math.random()), + this + ); + }, + }, + { + key: "randomDirection", + value: function () { + var e = 2 * (Math.random() - 0.5), + t = Math.random() * Math.PI * 2, + n = Math.sqrt(1 - Math.pow(e, 2)); + return ( + (this.x = n * Math.cos(t)), + (this.y = n * Math.sin(t)), + (this.z = e), + this + ); + }, + }, + { + key: e, + value: (0, v.Z)().mark(function e() { + return (0, v.Z)().wrap( + function (e) { + for (;;) + switch ((e.prev = e.next)) { + case 0: + return (e.next = 2), this.x; + case 2: + return (e.next = 4), this.y; + case 4: + return (e.next = 6), this.z; + case 6: + case "end": + return e.stop(); + } + }, + e, + this + ); + }), + }, + ]), + t + ); + })(Symbol.iterator), + jr = new Vr(), + Wr = new Hr(), + Xr = (function () { + function e() { + var t = + arguments.length > 0 && void 0 !== arguments[0] + ? arguments[0] + : new Vr(1 / 0, 1 / 0, 1 / 0), + n = + arguments.length > 1 && void 0 !== arguments[1] + ? arguments[1] + : new Vr(-1 / 0, -1 / 0, -1 / 0); + (0, m.Z)(this, e), + (this.isBox3 = !0), + (this.min = t), + (this.max = n); + } + return ( + (0, g.Z)(e, [ + { + key: "set", + value: function (e, t) { + return this.min.copy(e), this.max.copy(t), this; + }, + }, + { + key: "setFromArray", + value: function (e) { + this.makeEmpty(); + for (var t = 0, n = e.length; t < n; t += 3) + this.expandByPoint(qr.fromArray(e, t)); + return this; + }, + }, + { + key: "setFromBufferAttribute", + value: function (e) { + this.makeEmpty(); + for (var t = 0, n = e.count; t < n; t++) + this.expandByPoint(qr.fromBufferAttribute(e, t)); + return this; + }, + }, + { + key: "setFromPoints", + value: function (e) { + this.makeEmpty(); + for (var t = 0, n = e.length; t < n; t++) + this.expandByPoint(e[t]); + return this; + }, + }, + { + key: "setFromCenterAndSize", + value: function (e, t) { + var n = qr.copy(t).multiplyScalar(0.5); + return ( + this.min.copy(e).sub(n), this.max.copy(e).add(n), this + ); + }, + }, + { + key: "setFromObject", + value: function (e) { + var t = + arguments.length > 1 && + void 0 !== arguments[1] && + arguments[1]; + return this.makeEmpty(), this.expandByObject(e, t); + }, + }, + { + key: "clone", + value: function () { + return new this.constructor().copy(this); + }, + }, + { + key: "copy", + value: function (e) { + return this.min.copy(e.min), this.max.copy(e.max), this; + }, + }, + { + key: "makeEmpty", + value: function () { + return ( + (this.min.x = this.min.y = this.min.z = 1 / 0), + (this.max.x = this.max.y = this.max.z = -1 / 0), + this + ); + }, + }, + { + key: "isEmpty", + value: function () { + return ( + this.max.x < this.min.x || + this.max.y < this.min.y || + this.max.z < this.min.z + ); + }, + }, + { + key: "getCenter", + value: function (e) { + return this.isEmpty() + ? e.set(0, 0, 0) + : e.addVectors(this.min, this.max).multiplyScalar(0.5); + }, + }, + { + key: "getSize", + value: function (e) { + return this.isEmpty() + ? e.set(0, 0, 0) + : e.subVectors(this.max, this.min); + }, + }, + { + key: "expandByPoint", + value: function (e) { + return this.min.min(e), this.max.max(e), this; + }, + }, + { + key: "expandByVector", + value: function (e) { + return this.min.sub(e), this.max.add(e), this; + }, + }, + { + key: "expandByScalar", + value: function (e) { + return this.min.addScalar(-e), this.max.addScalar(e), this; + }, + }, + { + key: "expandByObject", + value: function (e) { + var t = + arguments.length > 1 && + void 0 !== arguments[1] && + arguments[1]; + if ((e.updateWorldMatrix(!1, !1), void 0 !== e.boundingBox)) + null === e.boundingBox && e.computeBoundingBox(), + Jr.copy(e.boundingBox), + Jr.applyMatrix4(e.matrixWorld), + this.union(Jr); + else { + var n = e.geometry; + if (void 0 !== n) + if ( + t && + void 0 !== n.attributes && + void 0 !== n.attributes.position + ) + for ( + var r = n.attributes.position, i = 0, a = r.count; + i < a; + i++ + ) + qr + .fromBufferAttribute(r, i) + .applyMatrix4(e.matrixWorld), + this.expandByPoint(qr); + else + null === n.boundingBox && n.computeBoundingBox(), + Jr.copy(n.boundingBox), + Jr.applyMatrix4(e.matrixWorld), + this.union(Jr); + } + for (var o = e.children, s = 0, l = o.length; s < l; s++) + this.expandByObject(o[s], t); + return this; + }, + }, + { + key: "containsPoint", + value: function (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 + ); + }, + }, + { + key: "containsBox", + value: function (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 + ); + }, + }, + { + key: "getParameter", + value: function (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) + ); + }, + }, + { + key: "intersectsBox", + value: function (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 + ); + }, + }, + { + key: "intersectsSphere", + value: function (e) { + return ( + this.clampPoint(e.center, qr), + qr.distanceToSquared(e.center) <= e.radius * e.radius + ); + }, + }, + { + key: "intersectsPlane", + value: function (e) { + var 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 + ); + }, + }, + { + key: "intersectsTriangle", + value: function (e) { + if (this.isEmpty()) return !1; + this.getCenter(ii), + ai.subVectors(this.max, ii), + Kr.subVectors(e.a, ii), + $r.subVectors(e.b, ii), + ei.subVectors(e.c, ii), + ti.subVectors($r, Kr), + ni.subVectors(ei, $r), + ri.subVectors(Kr, ei); + var t = [ + 0, + -ti.z, + ti.y, + 0, + -ni.z, + ni.y, + 0, + -ri.z, + ri.y, + ti.z, + 0, + -ti.x, + ni.z, + 0, + -ni.x, + ri.z, + 0, + -ri.x, + -ti.y, + ti.x, + 0, + -ni.y, + ni.x, + 0, + -ri.y, + ri.x, + 0, + ]; + return ( + !!li(t, Kr, $r, ei, ai) && + !!li((t = [1, 0, 0, 0, 1, 0, 0, 0, 1]), Kr, $r, ei, ai) && + (oi.crossVectors(ti, ni), + li((t = [oi.x, oi.y, oi.z]), Kr, $r, ei, ai)) + ); + }, + }, + { + key: "clampPoint", + value: function (e, t) { + return t.copy(e).clamp(this.min, this.max); + }, + }, + { + key: "distanceToPoint", + value: function (e) { + return this.clampPoint(e, qr).distanceTo(e); + }, + }, + { + key: "getBoundingSphere", + value: function (e) { + return ( + this.isEmpty() + ? e.makeEmpty() + : (this.getCenter(e.center), + (e.radius = 0.5 * this.getSize(qr).length())), + e + ); + }, + }, + { + key: "intersect", + value: function (e) { + return ( + this.min.max(e.min), + this.max.min(e.max), + this.isEmpty() && this.makeEmpty(), + this + ); + }, + }, + { + key: "union", + value: function (e) { + return this.min.min(e.min), this.max.max(e.max), this; + }, + }, + { + key: "applyMatrix4", + value: function (e) { + return ( + this.isEmpty() || + (Yr[0] + .set(this.min.x, this.min.y, this.min.z) + .applyMatrix4(e), + Yr[1] + .set(this.min.x, this.min.y, this.max.z) + .applyMatrix4(e), + Yr[2] + .set(this.min.x, this.max.y, this.min.z) + .applyMatrix4(e), + Yr[3] + .set(this.min.x, this.max.y, this.max.z) + .applyMatrix4(e), + Yr[4] + .set(this.max.x, this.min.y, this.min.z) + .applyMatrix4(e), + Yr[5] + .set(this.max.x, this.min.y, this.max.z) + .applyMatrix4(e), + Yr[6] + .set(this.max.x, this.max.y, this.min.z) + .applyMatrix4(e), + Yr[7] + .set(this.max.x, this.max.y, this.max.z) + .applyMatrix4(e), + this.setFromPoints(Yr)), + this + ); + }, + }, + { + key: "translate", + value: function (e) { + return this.min.add(e), this.max.add(e), this; + }, + }, + { + key: "equals", + value: function (e) { + return e.min.equals(this.min) && e.max.equals(this.max); + }, + }, + ]), + e + ); + })(), + Yr = [ + new Vr(), + new Vr(), + new Vr(), + new Vr(), + new Vr(), + new Vr(), + new Vr(), + new Vr(), + ], + qr = new Vr(), + Jr = new Xr(), + Kr = new Vr(), + $r = new Vr(), + ei = new Vr(), + ti = new Vr(), + ni = new Vr(), + ri = new Vr(), + ii = new Vr(), + ai = new Vr(), + oi = new Vr(), + si = new Vr(); + function li(e, t, n, r, i) { + for (var a = 0, o = e.length - 3; a <= o; a += 3) { + si.fromArray(e, a); + var s = + i.x * Math.abs(si.x) + + i.y * Math.abs(si.y) + + i.z * Math.abs(si.z), + l = t.dot(si), + u = n.dot(si), + c = r.dot(si); + if (Math.max(-Math.max(l, u, c), Math.min(l, u, c)) > s) return !1; + } + return !0; + } + var ui = new Xr(), + ci = new Vr(), + fi = new Vr(), + di = (function () { + function e() { + var t = + arguments.length > 0 && void 0 !== arguments[0] + ? arguments[0] + : new Vr(), + n = + arguments.length > 1 && void 0 !== arguments[1] + ? arguments[1] + : -1; + (0, m.Z)(this, e), (this.center = t), (this.radius = n); + } + return ( + (0, g.Z)(e, [ + { + key: "set", + value: function (e, t) { + return this.center.copy(e), (this.radius = t), this; + }, + }, + { + key: "setFromPoints", + value: function (e, t) { + var n = this.center; + void 0 !== t ? n.copy(t) : ui.setFromPoints(e).getCenter(n); + for (var r = 0, i = 0, a = e.length; i < a; i++) + r = Math.max(r, n.distanceToSquared(e[i])); + return (this.radius = Math.sqrt(r)), this; + }, + }, + { + key: "copy", + value: function (e) { + return ( + this.center.copy(e.center), (this.radius = e.radius), this + ); + }, + }, + { + key: "isEmpty", + value: function () { + return this.radius < 0; + }, + }, + { + key: "makeEmpty", + value: function () { + return this.center.set(0, 0, 0), (this.radius = -1), this; + }, + }, + { + key: "containsPoint", + value: function (e) { + return ( + e.distanceToSquared(this.center) <= + this.radius * this.radius + ); + }, + }, + { + key: "distanceToPoint", + value: function (e) { + return e.distanceTo(this.center) - this.radius; + }, + }, + { + key: "intersectsSphere", + value: function (e) { + var t = this.radius + e.radius; + return e.center.distanceToSquared(this.center) <= t * t; + }, + }, + { + key: "intersectsBox", + value: function (e) { + return e.intersectsSphere(this); + }, + }, + { + key: "intersectsPlane", + value: function (e) { + return ( + Math.abs(e.distanceToPoint(this.center)) <= this.radius + ); + }, + }, + { + key: "clampPoint", + value: function (e, t) { + var 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 + ); + }, + }, + { + key: "getBoundingBox", + value: function (e) { + return this.isEmpty() + ? (e.makeEmpty(), e) + : (e.set(this.center, this.center), + e.expandByScalar(this.radius), + e); + }, + }, + { + key: "applyMatrix4", + value: function (e) { + return ( + this.center.applyMatrix4(e), + (this.radius = this.radius * e.getMaxScaleOnAxis()), + this + ); + }, + }, + { + key: "translate", + value: function (e) { + return this.center.add(e), this; + }, + }, + { + key: "expandByPoint", + value: function (e) { + if (this.isEmpty()) + return this.center.copy(e), (this.radius = 0), this; + ci.subVectors(e, this.center); + var t = ci.lengthSq(); + if (t > this.radius * this.radius) { + var n = Math.sqrt(t), + r = 0.5 * (n - this.radius); + this.center.addScaledVector(ci, r / n), + (this.radius += r); + } + return this; + }, + }, + { + key: "union", + value: function (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)) + : (fi + .subVectors(e.center, this.center) + .setLength(e.radius), + this.expandByPoint(ci.copy(e.center).add(fi)), + this.expandByPoint(ci.copy(e.center).sub(fi))), + this); + }, + }, + { + key: "equals", + value: function (e) { + return ( + e.center.equals(this.center) && e.radius === this.radius + ); + }, + }, + { + key: "clone", + value: function () { + return new this.constructor().copy(this); + }, + }, + ]), + e + ); + })(), + hi = new Vr(), + pi = new Vr(), + vi = new Vr(), + mi = new Vr(), + gi = new Vr(), + Ai = new Vr(), + yi = new Vr(), + bi = (function () { + function e() { + var t = + arguments.length > 0 && void 0 !== arguments[0] + ? arguments[0] + : new Vr(), + n = + arguments.length > 1 && void 0 !== arguments[1] + ? arguments[1] + : new Vr(0, 0, -1); + (0, m.Z)(this, e), (this.origin = t), (this.direction = n); + } + return ( + (0, g.Z)(e, [ + { + key: "set", + value: function (e, t) { + return this.origin.copy(e), this.direction.copy(t), this; + }, + }, + { + key: "copy", + value: function (e) { + return ( + this.origin.copy(e.origin), + this.direction.copy(e.direction), + this + ); + }, + }, + { + key: "at", + value: function (e, t) { + return t + .copy(this.origin) + .addScaledVector(this.direction, e); + }, + }, + { + key: "lookAt", + value: function (e) { + return ( + this.direction.copy(e).sub(this.origin).normalize(), this + ); + }, + }, + { + key: "recast", + value: function (e) { + return this.origin.copy(this.at(e, hi)), this; + }, + }, + { + key: "closestPointToPoint", + value: function (e, t) { + t.subVectors(e, this.origin); + var n = t.dot(this.direction); + return n < 0 + ? t.copy(this.origin) + : t.copy(this.origin).addScaledVector(this.direction, n); + }, + }, + { + key: "distanceToPoint", + value: function (e) { + return Math.sqrt(this.distanceSqToPoint(e)); + }, + }, + { + key: "distanceSqToPoint", + value: function (e) { + var t = hi.subVectors(e, this.origin).dot(this.direction); + return t < 0 + ? this.origin.distanceToSquared(e) + : (hi + .copy(this.origin) + .addScaledVector(this.direction, t), + hi.distanceToSquared(e)); + }, + }, + { + key: "distanceSqToSegment", + value: function (e, t, n, r) { + pi.copy(e).add(t).multiplyScalar(0.5), + vi.copy(t).sub(e).normalize(), + mi.copy(this.origin).sub(pi); + var i, + a, + o, + s, + l = 0.5 * e.distanceTo(t), + u = -this.direction.dot(vi), + c = mi.dot(this.direction), + f = -mi.dot(vi), + d = mi.lengthSq(), + h = Math.abs(1 - u * u); + if (h > 0) + if (((a = u * c - f), (s = l * h), (i = u * f - c) >= 0)) + if (a >= -s) + if (a <= s) { + var p = 1 / h; + o = + (i *= p) * (i + u * (a *= p) + 2 * c) + + a * (u * i + a + 2 * f) + + d; + } else + (a = l), + (o = + -(i = Math.max(0, -(u * a + c))) * i + + a * (a + 2 * f) + + d); + else + (a = -l), + (o = + -(i = Math.max(0, -(u * a + c))) * i + + a * (a + 2 * f) + + d); + else + a <= -s + ? (o = + -(i = Math.max(0, -(-u * l + c))) * i + + (a = i > 0 ? -l : Math.min(Math.max(-l, -f), l)) * + (a + 2 * f) + + d) + : a <= s + ? ((i = 0), + (o = + (a = Math.min(Math.max(-l, -f), l)) * + (a + 2 * f) + + d)) + : (o = + -(i = Math.max(0, -(u * l + c))) * i + + (a = i > 0 ? l : Math.min(Math.max(-l, -f), l)) * + (a + 2 * f) + + d); + else + (a = u > 0 ? -l : l), + (o = + -(i = Math.max(0, -(u * a + c))) * i + + a * (a + 2 * f) + + d); + return ( + n && + n.copy(this.origin).addScaledVector(this.direction, i), + r && r.copy(pi).addScaledVector(vi, a), + o + ); + }, + }, + { + key: "intersectSphere", + value: function (e, t) { + hi.subVectors(e.center, this.origin); + var n = hi.dot(this.direction), + r = hi.dot(hi) - n * n, + i = e.radius * e.radius; + if (r > i) return null; + var a = Math.sqrt(i - r), + o = n - a, + s = n + a; + return s < 0 ? null : o < 0 ? this.at(s, t) : this.at(o, t); + }, + }, + { + key: "intersectsSphere", + value: function (e) { + return ( + this.distanceSqToPoint(e.center) <= e.radius * e.radius + ); + }, + }, + { + key: "distanceToPlane", + value: function (e) { + var t = e.normal.dot(this.direction); + if (0 === t) + return 0 === e.distanceToPoint(this.origin) ? 0 : null; + var n = -(this.origin.dot(e.normal) + e.constant) / t; + return n >= 0 ? n : null; + }, + }, + { + key: "intersectPlane", + value: function (e, t) { + var n = this.distanceToPlane(e); + return null === n ? null : this.at(n, t); + }, + }, + { + key: "intersectsPlane", + value: function (e) { + var t = e.distanceToPoint(this.origin); + return 0 === t || e.normal.dot(this.direction) * t < 0; + }, + }, + { + key: "intersectBox", + value: function (e, t) { + var n, + r, + i, + a, + o, + s, + l = 1 / this.direction.x, + u = 1 / this.direction.y, + c = 1 / this.direction.z, + f = this.origin; + return ( + l >= 0 + ? ((n = (e.min.x - f.x) * l), (r = (e.max.x - f.x) * l)) + : ((n = (e.max.x - f.x) * l), + (r = (e.min.x - f.x) * l)), + u >= 0 + ? ((i = (e.min.y - f.y) * u), (a = (e.max.y - f.y) * u)) + : ((i = (e.max.y - f.y) * u), + (a = (e.min.y - f.y) * u)), + n > a || i > r + ? null + : ((i > n || isNaN(n)) && (n = i), + (a < r || isNaN(r)) && (r = a), + c >= 0 + ? ((o = (e.min.z - f.z) * c), + (s = (e.max.z - f.z) * c)) + : ((o = (e.max.z - f.z) * c), + (s = (e.min.z - f.z) * c)), + n > s || o > r + ? null + : ((o > n || n !== n) && (n = o), + (s < r || r !== r) && (r = s), + r < 0 ? null : this.at(n >= 0 ? n : r, t))) + ); + }, + }, + { + key: "intersectsBox", + value: function (e) { + return null !== this.intersectBox(e, hi); + }, + }, + { + key: "intersectTriangle", + value: function (e, t, n, r, i) { + gi.subVectors(t, e), + Ai.subVectors(n, e), + yi.crossVectors(gi, Ai); + var a, + o = this.direction.dot(yi); + if (o > 0) { + if (r) return null; + a = 1; + } else { + if (!(o < 0)) return null; + (a = -1), (o = -o); + } + mi.subVectors(this.origin, e); + var s = a * this.direction.dot(Ai.crossVectors(mi, Ai)); + if (s < 0) return null; + var l = a * this.direction.dot(gi.cross(mi)); + if (l < 0) return null; + if (s + l > o) return null; + var u = -a * mi.dot(yi); + return u < 0 ? null : this.at(u / o, i); + }, + }, + { + key: "applyMatrix4", + value: function (e) { + return ( + this.origin.applyMatrix4(e), + this.direction.transformDirection(e), + this + ); + }, + }, + { + key: "equals", + value: function (e) { + return ( + e.origin.equals(this.origin) && + e.direction.equals(this.direction) + ); + }, + }, + { + key: "clone", + value: function () { + return new this.constructor().copy(this); + }, + }, + ]), + e + ); + })(), + xi = (function () { + function e(t, n, r, i, a, o, s, l, u, c, f, d, h, p, v, g) { + (0, m.Z)(this, e), + (e.prototype.isMatrix4 = !0), + (this.elements = [ + 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, + ]), + void 0 !== t && + this.set(t, n, r, i, a, o, s, l, u, c, f, d, h, p, v, g); + } + return ( + (0, g.Z)(e, [ + { + key: "set", + value: function ( + e, + t, + n, + r, + i, + a, + o, + s, + l, + u, + c, + f, + d, + h, + p, + v + ) { + var m = this.elements; + return ( + (m[0] = e), + (m[4] = t), + (m[8] = n), + (m[12] = r), + (m[1] = i), + (m[5] = a), + (m[9] = o), + (m[13] = s), + (m[2] = l), + (m[6] = u), + (m[10] = c), + (m[14] = f), + (m[3] = d), + (m[7] = h), + (m[11] = p), + (m[15] = v), + this + ); + }, + }, + { + key: "identity", + value: function () { + return ( + this.set(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1), + this + ); + }, + }, + { + key: "clone", + value: function () { + return new e().fromArray(this.elements); + }, + }, + { + key: "copy", + value: function (e) { + var 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 + ); + }, + }, + { + key: "copyPosition", + value: function (e) { + var t = this.elements, + n = e.elements; + return ( + (t[12] = n[12]), (t[13] = n[13]), (t[14] = n[14]), this + ); + }, + }, + { + key: "setFromMatrix3", + value: function (e) { + var 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 + ); + }, + }, + { + key: "extractBasis", + value: function (e, t, n) { + return ( + e.setFromMatrixColumn(this, 0), + t.setFromMatrixColumn(this, 1), + n.setFromMatrixColumn(this, 2), + this + ); + }, + }, + { + key: "makeBasis", + value: function (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 + ); + }, + }, + { + key: "extractRotation", + value: function (e) { + var t = this.elements, + n = e.elements, + r = 1 / Si.setFromMatrixColumn(e, 0).length(), + i = 1 / Si.setFromMatrixColumn(e, 1).length(), + a = 1 / Si.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] * a), + (t[9] = n[9] * a), + (t[10] = n[10] * a), + (t[11] = 0), + (t[12] = 0), + (t[13] = 0), + (t[14] = 0), + (t[15] = 1), + this + ); + }, + }, + { + key: "makeRotationFromEuler", + value: function (e) { + var t = this.elements, + n = e.x, + r = e.y, + i = e.z, + a = Math.cos(n), + o = Math.sin(n), + s = Math.cos(r), + l = Math.sin(r), + u = Math.cos(i), + c = Math.sin(i); + if ("XYZ" === e.order) { + var f = a * u, + d = a * c, + h = o * u, + p = o * c; + (t[0] = s * u), + (t[4] = -s * c), + (t[8] = l), + (t[1] = d + h * l), + (t[5] = f - p * l), + (t[9] = -o * s), + (t[2] = p - f * l), + (t[6] = h + d * l), + (t[10] = a * s); + } else if ("YXZ" === e.order) { + var v = s * u, + m = s * c, + g = l * u, + A = l * c; + (t[0] = v + A * o), + (t[4] = g * o - m), + (t[8] = a * l), + (t[1] = a * c), + (t[5] = a * u), + (t[9] = -o), + (t[2] = m * o - g), + (t[6] = A + v * o), + (t[10] = a * s); + } else if ("ZXY" === e.order) { + var y = s * u, + b = s * c, + x = l * u, + S = l * c; + (t[0] = y - S * o), + (t[4] = -a * c), + (t[8] = x + b * o), + (t[1] = b + x * o), + (t[5] = a * u), + (t[9] = S - y * o), + (t[2] = -a * l), + (t[6] = o), + (t[10] = a * s); + } else if ("ZYX" === e.order) { + var E = a * u, + _ = a * c, + C = o * u, + w = o * c; + (t[0] = s * u), + (t[4] = C * l - _), + (t[8] = E * l + w), + (t[1] = s * c), + (t[5] = w * l + E), + (t[9] = _ * l - C), + (t[2] = -l), + (t[6] = o * s), + (t[10] = a * s); + } else if ("YZX" === e.order) { + var T = a * s, + M = a * l, + I = o * s, + k = o * l; + (t[0] = s * u), + (t[4] = k - T * c), + (t[8] = I * c + M), + (t[1] = c), + (t[5] = a * u), + (t[9] = -o * u), + (t[2] = -l * u), + (t[6] = M * c + I), + (t[10] = T - k * c); + } else if ("XZY" === e.order) { + var R = a * s, + B = a * l, + P = o * s, + L = o * l; + (t[0] = s * u), + (t[4] = -c), + (t[8] = l * u), + (t[1] = R * c + L), + (t[5] = a * u), + (t[9] = B * c - P), + (t[2] = P * c - B), + (t[6] = o * u), + (t[10] = L * c + R); + } + return ( + (t[3] = 0), + (t[7] = 0), + (t[11] = 0), + (t[12] = 0), + (t[13] = 0), + (t[14] = 0), + (t[15] = 1), + this + ); + }, + }, + { + key: "makeRotationFromQuaternion", + value: function (e) { + return this.compose(_i, e, Ci); + }, + }, + { + key: "lookAt", + value: function (e, t, n) { + var r = this.elements; + return ( + Mi.subVectors(e, t), + 0 === Mi.lengthSq() && (Mi.z = 1), + Mi.normalize(), + wi.crossVectors(n, Mi), + 0 === wi.lengthSq() && + (1 === Math.abs(n.z) ? (Mi.x += 1e-4) : (Mi.z += 1e-4), + Mi.normalize(), + wi.crossVectors(n, Mi)), + wi.normalize(), + Ti.crossVectors(Mi, wi), + (r[0] = wi.x), + (r[4] = Ti.x), + (r[8] = Mi.x), + (r[1] = wi.y), + (r[5] = Ti.y), + (r[9] = Mi.y), + (r[2] = wi.z), + (r[6] = Ti.z), + (r[10] = Mi.z), + this + ); + }, + }, + { + key: "multiply", + value: function (e) { + return this.multiplyMatrices(this, e); + }, + }, + { + key: "premultiply", + value: function (e) { + return this.multiplyMatrices(e, this); + }, + }, + { + key: "multiplyMatrices", + value: function (e, t) { + var n = e.elements, + r = t.elements, + i = this.elements, + a = n[0], + o = n[4], + s = n[8], + l = n[12], + u = n[1], + c = n[5], + f = n[9], + d = n[13], + h = n[2], + p = n[6], + v = n[10], + m = n[14], + g = n[3], + A = n[7], + y = n[11], + b = n[15], + x = r[0], + S = r[4], + E = r[8], + _ = r[12], + C = r[1], + w = r[5], + T = r[9], + M = r[13], + I = r[2], + k = r[6], + R = r[10], + B = r[14], + P = r[3], + L = r[7], + D = r[11], + U = r[15]; + return ( + (i[0] = a * x + o * C + s * I + l * P), + (i[4] = a * S + o * w + s * k + l * L), + (i[8] = a * E + o * T + s * R + l * D), + (i[12] = a * _ + o * M + s * B + l * U), + (i[1] = u * x + c * C + f * I + d * P), + (i[5] = u * S + c * w + f * k + d * L), + (i[9] = u * E + c * T + f * R + d * D), + (i[13] = u * _ + c * M + f * B + d * U), + (i[2] = h * x + p * C + v * I + m * P), + (i[6] = h * S + p * w + v * k + m * L), + (i[10] = h * E + p * T + v * R + m * D), + (i[14] = h * _ + p * M + v * B + m * U), + (i[3] = g * x + A * C + y * I + b * P), + (i[7] = g * S + A * w + y * k + b * L), + (i[11] = g * E + A * T + y * R + b * D), + (i[15] = g * _ + A * M + y * B + b * U), + this + ); + }, + }, + { + key: "multiplyScalar", + value: function (e) { + var 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 + ); + }, + }, + { + key: "determinant", + value: function () { + var e = this.elements, + t = e[0], + n = e[4], + r = e[8], + i = e[12], + a = e[1], + o = e[5], + s = e[9], + l = e[13], + u = e[2], + c = e[6], + f = e[10], + d = e[14]; + return ( + e[3] * + (+i * s * c - + r * l * c - + i * o * f + + n * l * f + + r * o * d - + n * s * d) + + e[7] * + (+t * s * d - + t * l * f + + i * a * f - + r * a * d + + r * l * u - + i * s * u) + + e[11] * + (+t * l * c - + t * o * d - + i * a * c + + n * a * d + + i * o * u - + n * l * u) + + e[15] * + (-r * o * u - + t * s * c + + t * o * f + + r * a * c - + n * a * f + + n * s * u) + ); + }, + }, + { + key: "transpose", + value: function () { + var e, + t = this.elements; + return ( + (e = t[1]), + (t[1] = t[4]), + (t[4] = e), + (e = t[2]), + (t[2] = t[8]), + (t[8] = e), + (e = t[6]), + (t[6] = t[9]), + (t[9] = e), + (e = t[3]), + (t[3] = t[12]), + (t[12] = e), + (e = t[7]), + (t[7] = t[13]), + (t[13] = e), + (e = t[11]), + (t[11] = t[14]), + (t[14] = e), + this + ); + }, + }, + { + key: "setPosition", + value: function (e, t, n) { + var 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 + ); + }, + }, + { + key: "invert", + value: function () { + var e = this.elements, + t = e[0], + n = e[1], + r = e[2], + i = e[3], + a = e[4], + o = e[5], + s = e[6], + l = e[7], + u = e[8], + c = e[9], + f = e[10], + d = e[11], + h = e[12], + p = e[13], + v = e[14], + m = e[15], + g = + c * v * l - + p * f * l + + p * s * d - + o * v * d - + c * s * m + + o * f * m, + A = + h * f * l - + u * v * l - + h * s * d + + a * v * d + + u * s * m - + a * f * m, + y = + u * p * l - + h * c * l + + h * o * d - + a * p * d - + u * o * m + + a * c * m, + b = + h * c * s - + u * p * s - + h * o * f + + a * p * f + + u * o * v - + a * c * v, + x = t * g + n * A + r * y + i * b; + if (0 === x) + return this.set( + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ); + var S = 1 / x; + return ( + (e[0] = g * S), + (e[1] = + (p * f * i - + c * v * i - + p * r * d + + n * v * d + + c * r * m - + n * f * m) * + S), + (e[2] = + (o * v * i - + p * s * i + + p * r * l - + n * v * l - + o * r * m + + n * s * m) * + S), + (e[3] = + (c * s * i - + o * f * i - + c * r * l + + n * f * l + + o * r * d - + n * s * d) * + S), + (e[4] = A * S), + (e[5] = + (u * v * i - + h * f * i + + h * r * d - + t * v * d - + u * r * m + + t * f * m) * + S), + (e[6] = + (h * s * i - + a * v * i - + h * r * l + + t * v * l + + a * r * m - + t * s * m) * + S), + (e[7] = + (a * f * i - + u * s * i + + u * r * l - + t * f * l - + a * r * d + + t * s * d) * + S), + (e[8] = y * S), + (e[9] = + (h * c * i - + u * p * i - + h * n * d + + t * p * d + + u * n * m - + t * c * m) * + S), + (e[10] = + (a * p * i - + h * o * i + + h * n * l - + t * p * l - + a * n * m + + t * o * m) * + S), + (e[11] = + (u * o * i - + a * c * i - + u * n * l + + t * c * l + + a * n * d - + t * o * d) * + S), + (e[12] = b * S), + (e[13] = + (u * p * r - + h * c * r + + h * n * f - + t * p * f - + u * n * v + + t * c * v) * + S), + (e[14] = + (h * o * r - + a * p * r - + h * n * s + + t * p * s + + a * n * v - + t * o * v) * + S), + (e[15] = + (a * c * r - + u * o * r + + u * n * s - + t * c * s - + a * n * f + + t * o * f) * + S), + this + ); + }, + }, + { + key: "scale", + value: function (e) { + var 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 + ); + }, + }, + { + key: "getMaxScaleOnAxis", + value: function () { + var 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)); + }, + }, + { + key: "makeTranslation", + value: function (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 + ); + }, + }, + { + key: "makeRotationX", + value: function (e) { + var 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 + ); + }, + }, + { + key: "makeRotationY", + value: function (e) { + var 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 + ); + }, + }, + { + key: "makeRotationZ", + value: function (e) { + var 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 + ); + }, + }, + { + key: "makeRotationAxis", + value: function (e, t) { + var n = Math.cos(t), + r = Math.sin(t), + i = 1 - n, + a = e.x, + o = e.y, + s = e.z, + l = i * a, + u = i * o; + return ( + this.set( + l * a + n, + l * o - r * s, + l * s + r * o, + 0, + l * o + r * s, + u * o + n, + u * s - r * a, + 0, + l * s - r * o, + u * s + r * a, + i * s * s + n, + 0, + 0, + 0, + 0, + 1 + ), + this + ); + }, + }, + { + key: "makeScale", + value: function (e, t, n) { + return ( + this.set(e, 0, 0, 0, 0, t, 0, 0, 0, 0, n, 0, 0, 0, 0, 1), + this + ); + }, + }, + { + key: "makeShear", + value: function (e, t, n, r, i, a) { + return ( + this.set(1, n, i, 0, e, 1, a, 0, t, r, 1, 0, 0, 0, 0, 1), + this + ); + }, + }, + { + key: "compose", + value: function (e, t, n) { + var r = this.elements, + i = t._x, + a = t._y, + o = t._z, + s = t._w, + l = i + i, + u = a + a, + c = o + o, + f = i * l, + d = i * u, + h = i * c, + p = a * u, + v = a * c, + m = o * c, + g = s * l, + A = s * u, + y = s * c, + b = n.x, + x = n.y, + S = n.z; + return ( + (r[0] = (1 - (p + m)) * b), + (r[1] = (d + y) * b), + (r[2] = (h - A) * b), + (r[3] = 0), + (r[4] = (d - y) * x), + (r[5] = (1 - (f + m)) * x), + (r[6] = (v + g) * x), + (r[7] = 0), + (r[8] = (h + A) * S), + (r[9] = (v - g) * S), + (r[10] = (1 - (f + p)) * S), + (r[11] = 0), + (r[12] = e.x), + (r[13] = e.y), + (r[14] = e.z), + (r[15] = 1), + this + ); + }, + }, + { + key: "decompose", + value: function (e, t, n) { + var r = this.elements, + i = Si.set(r[0], r[1], r[2]).length(), + a = Si.set(r[4], r[5], r[6]).length(), + o = Si.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]), + Ei.copy(this); + var s = 1 / i, + l = 1 / a, + u = 1 / o; + return ( + (Ei.elements[0] *= s), + (Ei.elements[1] *= s), + (Ei.elements[2] *= s), + (Ei.elements[4] *= l), + (Ei.elements[5] *= l), + (Ei.elements[6] *= l), + (Ei.elements[8] *= u), + (Ei.elements[9] *= u), + (Ei.elements[10] *= u), + t.setFromRotationMatrix(Ei), + (n.x = i), + (n.y = a), + (n.z = o), + this + ); + }, + }, + { + key: "makePerspective", + value: function (e, t, n, r, i, a) { + var o, + s, + l = + arguments.length > 6 && void 0 !== arguments[6] + ? arguments[6] + : Yn, + u = this.elements, + c = (2 * i) / (t - e), + f = (2 * i) / (n - r), + d = (t + e) / (t - e), + h = (n + r) / (n - r); + if (l === Yn) + (o = -(a + i) / (a - i)), (s = (-2 * a * i) / (a - i)); + else { + if (l !== qn) + throw new Error( + "THREE.Matrix4.makePerspective(): Invalid coordinate system: " + + l + ); + (o = -a / (a - i)), (s = (-a * i) / (a - i)); + } + return ( + (u[0] = c), + (u[4] = 0), + (u[8] = d), + (u[12] = 0), + (u[1] = 0), + (u[5] = f), + (u[9] = h), + (u[13] = 0), + (u[2] = 0), + (u[6] = 0), + (u[10] = o), + (u[14] = s), + (u[3] = 0), + (u[7] = 0), + (u[11] = -1), + (u[15] = 0), + this + ); + }, + }, + { + key: "makeOrthographic", + value: function (e, t, n, r, i, a) { + var o, + s, + l = + arguments.length > 6 && void 0 !== arguments[6] + ? arguments[6] + : Yn, + u = this.elements, + c = 1 / (t - e), + f = 1 / (n - r), + d = 1 / (a - i), + h = (t + e) * c, + p = (n + r) * f; + if (l === Yn) (o = (a + i) * d), (s = -2 * d); + else { + if (l !== qn) + throw new Error( + "THREE.Matrix4.makeOrthographic(): Invalid coordinate system: " + + l + ); + (o = i * d), (s = -1 * d); + } + return ( + (u[0] = 2 * c), + (u[4] = 0), + (u[8] = 0), + (u[12] = -h), + (u[1] = 0), + (u[5] = 2 * f), + (u[9] = 0), + (u[13] = -p), + (u[2] = 0), + (u[6] = 0), + (u[10] = s), + (u[14] = -o), + (u[3] = 0), + (u[7] = 0), + (u[11] = 0), + (u[15] = 1), + this + ); + }, + }, + { + key: "equals", + value: function (e) { + for ( + var t = this.elements, n = e.elements, r = 0; + r < 16; + r++ + ) + if (t[r] !== n[r]) return !1; + return !0; + }, + }, + { + key: "fromArray", + value: function (e) { + for ( + var t = + arguments.length > 1 && void 0 !== arguments[1] + ? arguments[1] + : 0, + n = 0; + n < 16; + n++ + ) + this.elements[n] = e[n + t]; + return this; + }, + }, + { + key: "toArray", + value: function () { + var e = + arguments.length > 0 && void 0 !== arguments[0] + ? arguments[0] + : [], + t = + arguments.length > 1 && void 0 !== arguments[1] + ? arguments[1] + : 0, + 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 + ); + }, + }, + ]), + e + ); + })(), + Si = new Vr(), + Ei = new xi(), + _i = new Vr(0, 0, 0), + Ci = new Vr(1, 1, 1), + wi = new Vr(), + Ti = new Vr(), + Mi = new Vr(), + Ii = new xi(), + ki = new Hr(), + Ri = (function (e) { + function t() { + var e = + arguments.length > 0 && void 0 !== arguments[0] + ? arguments[0] + : 0, + n = + arguments.length > 1 && void 0 !== arguments[1] + ? arguments[1] + : 0, + r = + arguments.length > 2 && void 0 !== arguments[2] + ? arguments[2] + : 0, + i = + arguments.length > 3 && void 0 !== arguments[3] + ? arguments[3] + : t.DEFAULT_ORDER; + (0, m.Z)(this, t), + (this.isEuler = !0), + (this._x = e), + (this._y = n), + (this._z = r), + (this._order = i); + } + return ( + (0, g.Z)(t, [ + { + key: "x", + get: function () { + return this._x; + }, + set: function (e) { + (this._x = e), this._onChangeCallback(); + }, + }, + { + key: "y", + get: function () { + return this._y; + }, + set: function (e) { + (this._y = e), this._onChangeCallback(); + }, + }, + { + key: "z", + get: function () { + return this._z; + }, + set: function (e) { + (this._z = e), this._onChangeCallback(); + }, + }, + { + key: "order", + get: function () { + return this._order; + }, + set: function (e) { + (this._order = e), this._onChangeCallback(); + }, + }, + { + key: "set", + value: function (e, t, n) { + var 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 + ); + }, + }, + { + key: "clone", + value: function () { + return new this.constructor( + this._x, + this._y, + this._z, + this._order + ); + }, + }, + { + key: "copy", + value: function (e) { + return ( + (this._x = e._x), + (this._y = e._y), + (this._z = e._z), + (this._order = e._order), + this._onChangeCallback(), + this + ); + }, + }, + { + key: "setFromRotationMatrix", + value: function (e) { + var t = + arguments.length > 1 && void 0 !== arguments[1] + ? arguments[1] + : this._order, + n = + !(arguments.length > 2 && void 0 !== arguments[2]) || + arguments[2], + r = e.elements, + i = r[0], + a = r[4], + o = r[8], + s = r[1], + l = r[5], + u = r[9], + c = r[2], + f = r[6], + d = r[10]; + switch (t) { + case "XYZ": + (this._y = Math.asin(rr(o, -1, 1))), + Math.abs(o) < 0.9999999 + ? ((this._x = Math.atan2(-u, d)), + (this._z = Math.atan2(-a, i))) + : ((this._x = Math.atan2(f, l)), (this._z = 0)); + break; + case "YXZ": + (this._x = Math.asin(-rr(u, -1, 1))), + Math.abs(u) < 0.9999999 + ? ((this._y = Math.atan2(o, d)), + (this._z = Math.atan2(s, l))) + : ((this._y = Math.atan2(-c, i)), (this._z = 0)); + break; + case "ZXY": + (this._x = Math.asin(rr(f, -1, 1))), + Math.abs(f) < 0.9999999 + ? ((this._y = Math.atan2(-c, d)), + (this._z = Math.atan2(-a, l))) + : ((this._y = 0), (this._z = Math.atan2(s, i))); + break; + case "ZYX": + (this._y = Math.asin(-rr(c, -1, 1))), + Math.abs(c) < 0.9999999 + ? ((this._x = Math.atan2(f, d)), + (this._z = Math.atan2(s, i))) + : ((this._x = 0), (this._z = Math.atan2(-a, l))); + break; + case "YZX": + (this._z = Math.asin(rr(s, -1, 1))), + Math.abs(s) < 0.9999999 + ? ((this._x = Math.atan2(-u, l)), + (this._y = Math.atan2(-c, i))) + : ((this._x = 0), (this._y = Math.atan2(o, d))); + break; + case "XZY": + (this._z = Math.asin(-rr(a, -1, 1))), + Math.abs(a) < 0.9999999 + ? ((this._x = Math.atan2(f, l)), + (this._y = Math.atan2(o, i))) + : ((this._x = Math.atan2(-u, d)), (this._y = 0)); + break; + default: + console.warn( + "THREE.Euler: .setFromRotationMatrix() encountered an unknown order: " + + t + ); + } + return ( + (this._order = t), + !0 === n && this._onChangeCallback(), + this + ); + }, + }, + { + key: "setFromQuaternion", + value: function (e, t, n) { + return ( + Ii.makeRotationFromQuaternion(e), + this.setFromRotationMatrix(Ii, t, n) + ); + }, + }, + { + key: "setFromVector3", + value: function (e) { + var t = + arguments.length > 1 && void 0 !== arguments[1] + ? arguments[1] + : this._order; + return this.set(e.x, e.y, e.z, t); + }, + }, + { + key: "reorder", + value: function (e) { + return ki.setFromEuler(this), this.setFromQuaternion(ki, e); + }, + }, + { + key: "equals", + value: function (e) { + return ( + e._x === this._x && + e._y === this._y && + e._z === this._z && + e._order === this._order + ); + }, + }, + { + key: "fromArray", + value: function (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 + ); + }, + }, + { + key: "toArray", + value: function () { + var 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 + ); + }, + }, + { + key: "_onChange", + value: function (e) { + return (this._onChangeCallback = e), this; + }, + }, + { key: "_onChangeCallback", value: function () {} }, + { + key: e, + value: (0, v.Z)().mark(function e() { + return (0, v.Z)().wrap( + function (e) { + for (;;) + switch ((e.prev = e.next)) { + case 0: + return (e.next = 2), this._x; + case 2: + return (e.next = 4), this._y; + case 4: + return (e.next = 6), this._z; + case 6: + return (e.next = 8), this._order; + case 8: + case "end": + return e.stop(); + } + }, + e, + this + ); + }), + }, + ]), + t + ); + })(Symbol.iterator); + Ri.DEFAULT_ORDER = "XYZ"; + var Bi = (function () { + function e() { + (0, m.Z)(this, e), (this.mask = 1); + } + return ( + (0, g.Z)(e, [ + { + key: "set", + value: function (e) { + this.mask = ((1 << e) | 0) >>> 0; + }, + }, + { + key: "enable", + value: function (e) { + this.mask |= (1 << e) | 0; + }, + }, + { + key: "enableAll", + value: function () { + this.mask = -1; + }, + }, + { + key: "toggle", + value: function (e) { + this.mask ^= (1 << e) | 0; + }, + }, + { + key: "disable", + value: function (e) { + this.mask &= ~((1 << e) | 0); + }, + }, + { + key: "disableAll", + value: function () { + this.mask = 0; + }, + }, + { + key: "test", + value: function (e) { + return 0 !== (this.mask & e.mask); + }, + }, + { + key: "isEnabled", + value: function (e) { + return 0 !== (this.mask & ((1 << e) | 0)); + }, + }, + ]), + e + ); + })(), + Pi = 0, + Li = new Vr(), + Di = new Hr(), + Ui = new xi(), + Fi = new Vr(), + Oi = new Vr(), + Ni = new Vr(), + Gi = new Hr(), + Zi = new Vr(1, 0, 0), + zi = new Vr(0, 1, 0), + Qi = new Vr(0, 0, 1), + Hi = { type: "added" }, + Vi = { type: "removed" }, + ji = (function (e) { + (0, d.Z)(n, e); + var t = (0, h.Z)(n); + function n() { + var e; + (0, m.Z)(this, n), + ((e = t.call(this)).isObject3D = !0), + Object.defineProperty((0, f.Z)(e), "id", { value: Pi++ }), + (e.uuid = nr()), + (e.name = ""), + (e.type = "Object3D"), + (e.parent = null), + (e.children = []), + (e.up = n.DEFAULT_UP.clone()); + var r = new Vr(), + i = new Ri(), + a = new Hr(), + o = new Vr(1, 1, 1); + return ( + i._onChange(function () { + a.setFromEuler(i, !1); + }), + a._onChange(function () { + i.setFromQuaternion(a, void 0, !1); + }), + Object.defineProperties((0, f.Z)(e), { + position: { configurable: !0, enumerable: !0, value: r }, + rotation: { configurable: !0, enumerable: !0, value: i }, + quaternion: { configurable: !0, enumerable: !0, value: a }, + scale: { configurable: !0, enumerable: !0, value: o }, + modelViewMatrix: { value: new xi() }, + normalMatrix: { value: new hr() }, + }), + (e.matrix = new xi()), + (e.matrixWorld = new xi()), + (e.matrixAutoUpdate = n.DEFAULT_MATRIX_AUTO_UPDATE), + (e.matrixWorldNeedsUpdate = !1), + (e.matrixWorldAutoUpdate = n.DEFAULT_MATRIX_WORLD_AUTO_UPDATE), + (e.layers = new Bi()), + (e.visible = !0), + (e.castShadow = !1), + (e.receiveShadow = !1), + (e.frustumCulled = !0), + (e.renderOrder = 0), + (e.animations = []), + (e.userData = {}), + e + ); + } + return ( + (0, g.Z)(n, [ + { key: "onBeforeRender", value: function () {} }, + { key: "onAfterRender", value: function () {} }, + { + key: "applyMatrix4", + value: function (e) { + this.matrixAutoUpdate && this.updateMatrix(), + this.matrix.premultiply(e), + this.matrix.decompose( + this.position, + this.quaternion, + this.scale + ); + }, + }, + { + key: "applyQuaternion", + value: function (e) { + return this.quaternion.premultiply(e), this; + }, + }, + { + key: "setRotationFromAxisAngle", + value: function (e, t) { + this.quaternion.setFromAxisAngle(e, t); + }, + }, + { + key: "setRotationFromEuler", + value: function (e) { + this.quaternion.setFromEuler(e, !0); + }, + }, + { + key: "setRotationFromMatrix", + value: function (e) { + this.quaternion.setFromRotationMatrix(e); + }, + }, + { + key: "setRotationFromQuaternion", + value: function (e) { + this.quaternion.copy(e); + }, + }, + { + key: "rotateOnAxis", + value: function (e, t) { + return ( + Di.setFromAxisAngle(e, t), + this.quaternion.multiply(Di), + this + ); + }, + }, + { + key: "rotateOnWorldAxis", + value: function (e, t) { + return ( + Di.setFromAxisAngle(e, t), + this.quaternion.premultiply(Di), + this + ); + }, + }, + { + key: "rotateX", + value: function (e) { + return this.rotateOnAxis(Zi, e); + }, + }, + { + key: "rotateY", + value: function (e) { + return this.rotateOnAxis(zi, e); + }, + }, + { + key: "rotateZ", + value: function (e) { + return this.rotateOnAxis(Qi, e); + }, + }, + { + key: "translateOnAxis", + value: function (e, t) { + return ( + Li.copy(e).applyQuaternion(this.quaternion), + this.position.add(Li.multiplyScalar(t)), + this + ); + }, + }, + { + key: "translateX", + value: function (e) { + return this.translateOnAxis(Zi, e); + }, + }, + { + key: "translateY", + value: function (e) { + return this.translateOnAxis(zi, e); + }, + }, + { + key: "translateZ", + value: function (e) { + return this.translateOnAxis(Qi, e); + }, + }, + { + key: "localToWorld", + value: function (e) { + return ( + this.updateWorldMatrix(!0, !1), + e.applyMatrix4(this.matrixWorld) + ); + }, + }, + { + key: "worldToLocal", + value: function (e) { + return ( + this.updateWorldMatrix(!0, !1), + e.applyMatrix4(Ui.copy(this.matrixWorld).invert()) + ); + }, + }, + { + key: "lookAt", + value: function (e, t, n) { + e.isVector3 ? Fi.copy(e) : Fi.set(e, t, n); + var r = this.parent; + this.updateWorldMatrix(!0, !1), + Oi.setFromMatrixPosition(this.matrixWorld), + this.isCamera || this.isLight + ? Ui.lookAt(Oi, Fi, this.up) + : Ui.lookAt(Fi, Oi, this.up), + this.quaternion.setFromRotationMatrix(Ui), + r && + (Ui.extractRotation(r.matrixWorld), + Di.setFromRotationMatrix(Ui), + this.quaternion.premultiply(Di.invert())); + }, + }, + { + key: "add", + value: function (e) { + if (arguments.length > 1) { + for (var t = 0; t < arguments.length; t++) + this.add(arguments[t]); + 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 + ? (null !== e.parent && e.parent.remove(e), + (e.parent = this), + this.children.push(e), + e.dispatchEvent(Hi)) + : console.error( + "THREE.Object3D.add: object not an instance of THREE.Object3D.", + e + ), + this); + }, + }, + { + key: "remove", + value: function (e) { + if (arguments.length > 1) { + for (var t = 0; t < arguments.length; t++) + this.remove(arguments[t]); + return this; + } + var n = this.children.indexOf(e); + return ( + -1 !== n && + ((e.parent = null), + this.children.splice(n, 1), + e.dispatchEvent(Vi)), + this + ); + }, + }, + { + key: "removeFromParent", + value: function () { + var e = this.parent; + return null !== e && e.remove(this), this; + }, + }, + { + key: "clear", + value: function () { + return this.remove.apply(this, (0, c.Z)(this.children)); + }, + }, + { + key: "attach", + value: function (e) { + return ( + this.updateWorldMatrix(!0, !1), + Ui.copy(this.matrixWorld).invert(), + null !== e.parent && + (e.parent.updateWorldMatrix(!0, !1), + Ui.multiply(e.parent.matrixWorld)), + e.applyMatrix4(Ui), + this.add(e), + e.updateWorldMatrix(!1, !0), + this + ); + }, + }, + { + key: "getObjectById", + value: function (e) { + return this.getObjectByProperty("id", e); + }, + }, + { + key: "getObjectByName", + value: function (e) { + return this.getObjectByProperty("name", e); + }, + }, + { + key: "getObjectByProperty", + value: function (e, t) { + if (this[e] === t) return this; + for (var n = 0, r = this.children.length; n < r; n++) { + var i = this.children[n].getObjectByProperty(e, t); + if (void 0 !== i) return i; + } + }, + }, + { + key: "getObjectsByProperty", + value: function (e, t) { + var n = []; + this[e] === t && n.push(this); + for (var r = 0, i = this.children.length; r < i; r++) { + var a = this.children[r].getObjectsByProperty(e, t); + a.length > 0 && (n = n.concat(a)); + } + return n; + }, + }, + { + key: "getWorldPosition", + value: function (e) { + return ( + this.updateWorldMatrix(!0, !1), + e.setFromMatrixPosition(this.matrixWorld) + ); + }, + }, + { + key: "getWorldQuaternion", + value: function (e) { + return ( + this.updateWorldMatrix(!0, !1), + this.matrixWorld.decompose(Oi, e, Ni), + e + ); + }, + }, + { + key: "getWorldScale", + value: function (e) { + return ( + this.updateWorldMatrix(!0, !1), + this.matrixWorld.decompose(Oi, Gi, e), + e + ); + }, + }, + { + key: "getWorldDirection", + value: function (e) { + this.updateWorldMatrix(!0, !1); + var t = this.matrixWorld.elements; + return e.set(t[8], t[9], t[10]).normalize(); + }, + }, + { key: "raycast", value: function () {} }, + { + key: "traverse", + value: function (e) { + e(this); + for (var t = this.children, n = 0, r = t.length; n < r; n++) + t[n].traverse(e); + }, + }, + { + key: "traverseVisible", + value: function (e) { + if (!1 !== this.visible) { + e(this); + for ( + var t = this.children, n = 0, r = t.length; + n < r; + n++ + ) + t[n].traverseVisible(e); + } + }, + }, + { + key: "traverseAncestors", + value: function (e) { + var t = this.parent; + null !== t && (e(t), t.traverseAncestors(e)); + }, + }, + { + key: "updateMatrix", + value: function () { + this.matrix.compose( + this.position, + this.quaternion, + this.scale + ), + (this.matrixWorldNeedsUpdate = !0); + }, + }, + { + key: "updateMatrixWorld", + value: function (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)); + for ( + var t = this.children, n = 0, r = t.length; + n < r; + n++ + ) { + var i = t[n]; + (!0 !== i.matrixWorldAutoUpdate && !0 !== e) || + i.updateMatrixWorld(e); + } + }, + }, + { + key: "updateWorldMatrix", + value: function (e, t) { + var 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) + ) + for ( + var r = this.children, i = 0, a = r.length; + i < a; + i++ + ) { + var o = r[i]; + !0 === o.matrixWorldAutoUpdate && + o.updateWorldMatrix(!1, !0); + } + }, + }, + { + key: "toJSON", + value: function (e) { + var 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", + })); + var 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.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); + var a = this.geometry.parameters; + if (void 0 !== a && void 0 !== a.shapes) { + var o = a.shapes; + if (Array.isArray(o)) + for (var s = 0, l = o.length; s < l; s++) { + var u = o[s]; + i(e.shapes, u); + } + else i(e.shapes, o); + } + } + 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)) { + for ( + var c = [], f = 0, d = this.material.length; + f < d; + f++ + ) + c.push(i(e.materials, this.material[f])); + r.material = c; + } else r.material = i(e.materials, this.material); + if (this.children.length > 0) { + r.children = []; + for (var h = 0; h < this.children.length; h++) + r.children.push(this.children[h].toJSON(e).object); + } + if (this.animations.length > 0) { + r.animations = []; + for (var p = 0; p < this.animations.length; p++) { + var v = this.animations[p]; + r.animations.push(i(e.animations, v)); + } + } + if (t) { + var m = _(e.geometries), + g = _(e.materials), + A = _(e.textures), + y = _(e.images), + b = _(e.shapes), + x = _(e.skeletons), + S = _(e.animations), + E = _(e.nodes); + m.length > 0 && (n.geometries = m), + g.length > 0 && (n.materials = g), + A.length > 0 && (n.textures = A), + y.length > 0 && (n.images = y), + b.length > 0 && (n.shapes = b), + x.length > 0 && (n.skeletons = x), + S.length > 0 && (n.animations = S), + E.length > 0 && (n.nodes = E); + } + return (n.object = r), n; + function _(e) { + var t = []; + for (var n in e) { + var r = e[n]; + delete r.metadata, t.push(r); + } + return t; + } + }, + }, + { + key: "clone", + value: function (e) { + return new this.constructor().copy(this, e); + }, + }, + { + key: "copy", + value: function (e) { + var 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.matrixWorldNeedsUpdate = e.matrixWorldNeedsUpdate), + (this.matrixWorldAutoUpdate = e.matrixWorldAutoUpdate), + (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 (var n = 0; n < e.children.length; n++) { + var r = e.children[n]; + this.add(r.clone()); + } + return this; + }, + }, + ]), + n + ); + })(Jn); + (ji.DEFAULT_UP = new Vr(0, 1, 0)), + (ji.DEFAULT_MATRIX_AUTO_UPDATE = !0), + (ji.DEFAULT_MATRIX_WORLD_AUTO_UPDATE = !0); + var Wi = new Vr(), + Xi = new Vr(), + Yi = new Vr(), + qi = new Vr(), + Ji = new Vr(), + Ki = new Vr(), + $i = new Vr(), + ea = new Vr(), + ta = new Vr(), + na = new Vr(), + ra = !1, + ia = (function () { + function e() { + var t = + arguments.length > 0 && void 0 !== arguments[0] + ? arguments[0] + : new Vr(), + n = + arguments.length > 1 && void 0 !== arguments[1] + ? arguments[1] + : new Vr(), + r = + arguments.length > 2 && void 0 !== arguments[2] + ? arguments[2] + : new Vr(); + (0, m.Z)(this, e), (this.a = t), (this.b = n), (this.c = r); + } + return ( + (0, g.Z)( + e, + [ + { + key: "set", + value: function (e, t, n) { + return ( + this.a.copy(e), this.b.copy(t), this.c.copy(n), this + ); + }, + }, + { + key: "setFromPointsAndIndices", + value: function (e, t, n, r) { + return ( + this.a.copy(e[t]), + this.b.copy(e[n]), + this.c.copy(e[r]), + this + ); + }, + }, + { + key: "setFromAttributeAndIndices", + value: function (e, t, n, r) { + return ( + this.a.fromBufferAttribute(e, t), + this.b.fromBufferAttribute(e, n), + this.c.fromBufferAttribute(e, r), + this + ); + }, + }, + { + key: "clone", + value: function () { + return new this.constructor().copy(this); + }, + }, + { + key: "copy", + value: function (e) { + return ( + this.a.copy(e.a), + this.b.copy(e.b), + this.c.copy(e.c), + this + ); + }, + }, + { + key: "getArea", + value: function () { + return ( + Wi.subVectors(this.c, this.b), + Xi.subVectors(this.a, this.b), + 0.5 * Wi.cross(Xi).length() + ); + }, + }, + { + key: "getMidpoint", + value: function (e) { + return e + .addVectors(this.a, this.b) + .add(this.c) + .multiplyScalar(1 / 3); + }, + }, + { + key: "getNormal", + value: function (t) { + return e.getNormal(this.a, this.b, this.c, t); + }, + }, + { + key: "getPlane", + value: function (e) { + return e.setFromCoplanarPoints(this.a, this.b, this.c); + }, + }, + { + key: "getBarycoord", + value: function (t, n) { + return e.getBarycoord(t, this.a, this.b, this.c, n); + }, + }, + { + key: "getUV", + value: function (t, n, r, i, a) { + return ( + !1 === ra && + (console.warn( + "THREE.Triangle.getUV() has been renamed to THREE.Triangle.getInterpolation()." + ), + (ra = !0)), + e.getInterpolation( + t, + this.a, + this.b, + this.c, + n, + r, + i, + a + ) + ); + }, + }, + { + key: "getInterpolation", + value: function (t, n, r, i, a) { + return e.getInterpolation( + t, + this.a, + this.b, + this.c, + n, + r, + i, + a + ); + }, + }, + { + key: "containsPoint", + value: function (t) { + return e.containsPoint(t, this.a, this.b, this.c); + }, + }, + { + key: "isFrontFacing", + value: function (t) { + return e.isFrontFacing(this.a, this.b, this.c, t); + }, + }, + { + key: "intersectsBox", + value: function (e) { + return e.intersectsTriangle(this); + }, + }, + { + key: "closestPointToPoint", + value: function (e, t) { + var n, + r, + i = this.a, + a = this.b, + o = this.c; + Ji.subVectors(a, i), + Ki.subVectors(o, i), + ea.subVectors(e, i); + var s = Ji.dot(ea), + l = Ki.dot(ea); + if (s <= 0 && l <= 0) return t.copy(i); + ta.subVectors(e, a); + var u = Ji.dot(ta), + c = Ki.dot(ta); + if (u >= 0 && c <= u) return t.copy(a); + var f = s * c - u * l; + if (f <= 0 && s >= 0 && u <= 0) + return ( + (n = s / (s - u)), t.copy(i).addScaledVector(Ji, n) + ); + na.subVectors(e, o); + var d = Ji.dot(na), + h = Ki.dot(na); + if (h >= 0 && d <= h) return t.copy(o); + var p = d * l - s * h; + if (p <= 0 && l >= 0 && h <= 0) + return ( + (r = l / (l - h)), t.copy(i).addScaledVector(Ki, r) + ); + var v = u * h - d * c; + if (v <= 0 && c - u >= 0 && d - h >= 0) + return ( + $i.subVectors(o, a), + (r = (c - u) / (c - u + (d - h))), + t.copy(a).addScaledVector($i, r) + ); + var m = 1 / (v + p + f); + return ( + (n = p * m), + (r = f * m), + t.copy(i).addScaledVector(Ji, n).addScaledVector(Ki, r) + ); + }, + }, + { + key: "equals", + value: function (e) { + return ( + e.a.equals(this.a) && + e.b.equals(this.b) && + e.c.equals(this.c) + ); + }, + }, + ], + [ + { + key: "getNormal", + value: function (e, t, n, r) { + r.subVectors(n, t), Wi.subVectors(e, t), r.cross(Wi); + var i = r.lengthSq(); + return i > 0 + ? r.multiplyScalar(1 / Math.sqrt(i)) + : r.set(0, 0, 0); + }, + }, + { + key: "getBarycoord", + value: function (e, t, n, r, i) { + Wi.subVectors(r, t), + Xi.subVectors(n, t), + Yi.subVectors(e, t); + var a = Wi.dot(Wi), + o = Wi.dot(Xi), + s = Wi.dot(Yi), + l = Xi.dot(Xi), + u = Xi.dot(Yi), + c = a * l - o * o; + if (0 === c) return i.set(-2, -1, -1); + var f = 1 / c, + d = (l * s - o * u) * f, + h = (a * u - o * s) * f; + return i.set(1 - d - h, h, d); + }, + }, + { + key: "containsPoint", + value: function (e, t, n, r) { + return ( + this.getBarycoord(e, t, n, r, qi), + qi.x >= 0 && qi.y >= 0 && qi.x + qi.y <= 1 + ); + }, + }, + { + key: "getUV", + value: function (e, t, n, r, i, a, o, s) { + return ( + !1 === ra && + (console.warn( + "THREE.Triangle.getUV() has been renamed to THREE.Triangle.getInterpolation()." + ), + (ra = !0)), + this.getInterpolation(e, t, n, r, i, a, o, s) + ); + }, + }, + { + key: "getInterpolation", + value: function (e, t, n, r, i, a, o, s) { + return ( + this.getBarycoord(e, t, n, r, qi), + s.setScalar(0), + s.addScaledVector(i, qi.x), + s.addScaledVector(a, qi.y), + s.addScaledVector(o, qi.z), + s + ); + }, + }, + { + key: "isFrontFacing", + value: function (e, t, n, r) { + return ( + Wi.subVectors(n, t), + Xi.subVectors(e, t), + Wi.cross(Xi).dot(r) < 0 + ); + }, + }, + ] + ), + e + ); + })(), + aa = 0, + oa = (function (e) { + (0, d.Z)(n, e); + var t = (0, h.Z)(n); + function n() { + var e; + return ( + (0, m.Z)(this, n), + ((e = t.call(this)).isMaterial = !0), + Object.defineProperty((0, f.Z)(e), "id", { value: aa++ }), + (e.uuid = nr()), + (e.name = ""), + (e.type = "Material"), + (e.blending = L), + (e.side = I), + (e.vertexColors = !1), + (e.opacity = 1), + (e.transparent = !1), + (e.alphaHash = !1), + (e.blendSrc = X), + (e.blendDst = Y), + (e.blendEquation = N), + (e.blendSrcAlpha = null), + (e.blendDstAlpha = null), + (e.blendEquationAlpha = null), + (e.depthFunc = ie), + (e.depthTest = !0), + (e.depthWrite = !0), + (e.stencilWriteMask = 255), + (e.stencilFunc = Mn), + (e.stencilRef = 0), + (e.stencilFuncMask = 255), + (e.stencilFail = pn), + (e.stencilZFail = pn), + (e.stencilZPass = pn), + (e.stencilWrite = !1), + (e.clippingPlanes = null), + (e.clipIntersection = !1), + (e.clipShadows = !1), + (e.shadowSide = null), + (e.colorWrite = !0), + (e.precision = null), + (e.polygonOffset = !1), + (e.polygonOffsetFactor = 0), + (e.polygonOffsetUnits = 0), + (e.dithering = !1), + (e.alphaToCoverage = !1), + (e.premultipliedAlpha = !1), + (e.forceSinglePass = !1), + (e.visible = !0), + (e.toneMapped = !0), + (e.userData = {}), + (e.version = 0), + (e._alphaTest = 0), + e + ); + } + return ( + (0, g.Z)(n, [ + { + key: "alphaTest", + get: function () { + return this._alphaTest; + }, + set: function (e) { + this._alphaTest > 0 !== e > 0 && this.version++, + (this._alphaTest = e); + }, + }, + { key: "onBuild", value: function () {} }, + { key: "onBeforeRender", value: function () {} }, + { key: "onBeforeCompile", value: function () {} }, + { + key: "customProgramCacheKey", + value: function () { + return this.onBeforeCompile.toString(); + }, + }, + { + key: "setValues", + value: function (e) { + if (void 0 !== e) + for (var t in e) { + var n = e[t]; + if (void 0 !== n) { + var 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, ".") + ); + } else + console.warn( + "THREE.Material: parameter '".concat( + t, + "' has value of undefined." + ) + ); + } + }, + }, + { + key: "toJSON", + value: function (e) { + var t = void 0 === e || "string" === typeof e; + t && (e = { textures: {}, images: {} }); + var n = { + metadata: { + version: 4.6, + type: "Material", + generator: "Material.toJSON", + }, + }; + function r(e) { + var t = []; + for (var n in e) { + var 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()), + 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.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.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 !== L && (n.blending = this.blending), + this.side !== I && (n.side = this.side), + !0 === this.vertexColors && (n.vertexColors = !0), + this.opacity < 1 && (n.opacity = this.opacity), + !0 === this.transparent && (n.transparent = !0), + (n.depthFunc = this.depthFunc), + (n.depthTest = this.depthTest), + (n.depthWrite = this.depthWrite), + (n.colorWrite = this.colorWrite), + (n.stencilWrite = this.stencilWrite), + (n.stencilWriteMask = this.stencilWriteMask), + (n.stencilFunc = this.stencilFunc), + (n.stencilRef = this.stencilRef), + (n.stencilFuncMask = this.stencilFuncMask), + (n.stencilFail = this.stencilFail), + (n.stencilZFail = this.stencilZFail), + (n.stencilZPass = this.stencilZPass), + 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) + ) { + var i = r(e.textures), + a = r(e.images); + i.length > 0 && (n.textures = i), + a.length > 0 && (n.images = a); + } + return n; + }, + }, + { + key: "clone", + value: function () { + return new this.constructor().copy(this); + }, + }, + { + key: "copy", + value: function (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.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); + var t = e.clippingPlanes, + n = null; + if (null !== t) { + var r = t.length; + n = new Array(r); + for (var i = 0; i !== r; ++i) n[i] = t[i].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 + ); + }, + }, + { + key: "dispose", + value: function () { + this.dispatchEvent({ type: "dispose" }); + }, + }, + { + key: "needsUpdate", + set: function (e) { + !0 === e && this.version++; + }, + }, + ]), + n + ); + })(Jn), + sa = { + 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, + }, + la = { h: 0, s: 0, l: 0 }, + ua = { h: 0, s: 0, l: 0 }; + function ca(e, t, n) { + return ( + n < 0 && (n += 1), + n > 1 && (n -= 1), + n < 1 / 6 + ? e + 6 * (t - e) * n + : n < 0.5 + ? t + : n < 2 / 3 + ? e + 6 * (t - e) * (2 / 3 - n) + : e + ); + } + var fa = (function (e) { + function t(e, n, r) { + return ( + (0, m.Z)(this, t), + (this.isColor = !0), + (this.r = 1), + (this.g = 1), + (this.b = 1), + this.set(e, n, r) + ); + } + return ( + (0, g.Z)(t, [ + { + key: "set", + value: function (e, t, n) { + if (void 0 === t && void 0 === n) { + var r = e; + r && r.isColor + ? this.copy(r) + : "number" === typeof r + ? this.setHex(r) + : "string" === typeof r && this.setStyle(r); + } else this.setRGB(e, t, n); + return this; + }, + }, + { + key: "setScalar", + value: function (e) { + return (this.r = e), (this.g = e), (this.b = e), this; + }, + }, + { + key: "setHex", + value: function (e) { + var t = + arguments.length > 1 && void 0 !== arguments[1] + ? arguments[1] + : an; + return ( + (e = Math.floor(e)), + (this.r = ((e >> 16) & 255) / 255), + (this.g = ((e >> 8) & 255) / 255), + (this.b = (255 & e) / 255), + Tr.toWorkingColorSpace(this, t), + this + ); + }, + }, + { + key: "setRGB", + value: function (e, t, n) { + var r = + arguments.length > 3 && void 0 !== arguments[3] + ? arguments[3] + : Tr.workingColorSpace; + return ( + (this.r = e), + (this.g = t), + (this.b = n), + Tr.toWorkingColorSpace(this, r), + this + ); + }, + }, + { + key: "setHSL", + value: function (e, t, n) { + var r = + arguments.length > 3 && void 0 !== arguments[3] + ? arguments[3] + : Tr.workingColorSpace; + if ( + ((e = ir(e, 1)), + (t = rr(t, 0, 1)), + (n = rr(n, 0, 1)), + 0 === t) + ) + this.r = this.g = this.b = n; + else { + var i = n <= 0.5 ? n * (1 + t) : n + t - n * t, + a = 2 * n - i; + (this.r = ca(a, i, e + 1 / 3)), + (this.g = ca(a, i, e)), + (this.b = ca(a, i, e - 1 / 3)); + } + return Tr.toWorkingColorSpace(this, r), this; + }, + }, + { + key: "setStyle", + value: function (e) { + var t, + n = + arguments.length > 1 && void 0 !== arguments[1] + ? arguments[1] + : an; + 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))) { + var i, + a = t[1], + o = t[2]; + switch (a) { + case "rgb": + case "rgba": + if ( + (i = + /^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec( + o + )) + ) + 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( + o + )) + ) + 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( + o + )) + ) + 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))) { + var s = t[1], + l = s.length; + if (3 === l) + return this.setRGB( + parseInt(s.charAt(0), 16) / 15, + parseInt(s.charAt(1), 16) / 15, + parseInt(s.charAt(2), 16) / 15, + n + ); + if (6 === l) return this.setHex(parseInt(s, 16), n); + console.warn("THREE.Color: Invalid hex color " + e); + } else if (e && e.length > 0) + return this.setColorName(e, n); + return this; + }, + }, + { + key: "setColorName", + value: function (e) { + var t = + arguments.length > 1 && void 0 !== arguments[1] + ? arguments[1] + : an, + n = sa[e.toLowerCase()]; + return ( + void 0 !== n + ? this.setHex(n, t) + : console.warn("THREE.Color: Unknown color " + e), + this + ); + }, + }, + { + key: "clone", + value: function () { + return new this.constructor(this.r, this.g, this.b); + }, + }, + { + key: "copy", + value: function (e) { + return (this.r = e.r), (this.g = e.g), (this.b = e.b), this; + }, + }, + { + key: "copySRGBToLinear", + value: function (e) { + return ( + (this.r = Mr(e.r)), + (this.g = Mr(e.g)), + (this.b = Mr(e.b)), + this + ); + }, + }, + { + key: "copyLinearToSRGB", + value: function (e) { + return ( + (this.r = Ir(e.r)), + (this.g = Ir(e.g)), + (this.b = Ir(e.b)), + this + ); + }, + }, + { + key: "convertSRGBToLinear", + value: function () { + return this.copySRGBToLinear(this), this; + }, + }, + { + key: "convertLinearToSRGB", + value: function () { + return this.copyLinearToSRGB(this), this; + }, + }, + { + key: "getHex", + value: function () { + var e = + arguments.length > 0 && void 0 !== arguments[0] + ? arguments[0] + : an; + return ( + Tr.fromWorkingColorSpace(da.copy(this), e), + 65536 * Math.round(rr(255 * da.r, 0, 255)) + + 256 * Math.round(rr(255 * da.g, 0, 255)) + + Math.round(rr(255 * da.b, 0, 255)) + ); + }, + }, + { + key: "getHexString", + value: function () { + var e = + arguments.length > 0 && void 0 !== arguments[0] + ? arguments[0] + : an; + return ("000000" + this.getHex(e).toString(16)).slice(-6); + }, + }, + { + key: "getHSL", + value: function (e) { + var t = + arguments.length > 1 && void 0 !== arguments[1] + ? arguments[1] + : Tr.workingColorSpace; + Tr.fromWorkingColorSpace(da.copy(this), t); + var n, + r, + i = da.r, + a = da.g, + o = da.b, + s = Math.max(i, a, o), + l = Math.min(i, a, o), + u = (l + s) / 2; + if (l === s) (n = 0), (r = 0); + else { + var c = s - l; + switch ( + ((r = u <= 0.5 ? c / (s + l) : c / (2 - s - l)), s) + ) { + case i: + n = (a - o) / c + (a < o ? 6 : 0); + break; + case a: + n = (o - i) / c + 2; + break; + case o: + n = (i - a) / c + 4; + } + n /= 6; + } + return (e.h = n), (e.s = r), (e.l = u), e; + }, + }, + { + key: "getRGB", + value: function (e) { + var t = + arguments.length > 1 && void 0 !== arguments[1] + ? arguments[1] + : Tr.workingColorSpace; + return ( + Tr.fromWorkingColorSpace(da.copy(this), t), + (e.r = da.r), + (e.g = da.g), + (e.b = da.b), + e + ); + }, + }, + { + key: "getStyle", + value: function () { + var e = + arguments.length > 0 && void 0 !== arguments[0] + ? arguments[0] + : an; + Tr.fromWorkingColorSpace(da.copy(this), e); + var t = da.r, + n = da.g, + r = da.b; + return e !== an + ? "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), ")"); + }, + }, + { + key: "offsetHSL", + value: function (e, t, n) { + return ( + this.getHSL(la), this.setHSL(la.h + e, la.s + t, la.l + n) + ); + }, + }, + { + key: "add", + value: function (e) { + return ( + (this.r += e.r), (this.g += e.g), (this.b += e.b), this + ); + }, + }, + { + key: "addColors", + value: function (e, t) { + return ( + (this.r = e.r + t.r), + (this.g = e.g + t.g), + (this.b = e.b + t.b), + this + ); + }, + }, + { + key: "addScalar", + value: function (e) { + return (this.r += e), (this.g += e), (this.b += e), this; + }, + }, + { + key: "sub", + value: function (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 + ); + }, + }, + { + key: "multiply", + value: function (e) { + return ( + (this.r *= e.r), (this.g *= e.g), (this.b *= e.b), this + ); + }, + }, + { + key: "multiplyScalar", + value: function (e) { + return (this.r *= e), (this.g *= e), (this.b *= e), this; + }, + }, + { + key: "lerp", + value: function (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 + ); + }, + }, + { + key: "lerpColors", + value: function (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 + ); + }, + }, + { + key: "lerpHSL", + value: function (e, t) { + this.getHSL(la), e.getHSL(ua); + var n = ar(la.h, ua.h, t), + r = ar(la.s, ua.s, t), + i = ar(la.l, ua.l, t); + return this.setHSL(n, r, i), this; + }, + }, + { + key: "setFromVector3", + value: function (e) { + return (this.r = e.x), (this.g = e.y), (this.b = e.z), this; + }, + }, + { + key: "applyMatrix3", + value: function (e) { + var 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 + ); + }, + }, + { + key: "equals", + value: function (e) { + return e.r === this.r && e.g === this.g && e.b === this.b; + }, + }, + { + key: "fromArray", + value: function (e) { + var 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 + ); + }, + }, + { + key: "toArray", + value: function () { + var 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 + ); + }, + }, + { + key: "fromBufferAttribute", + value: function (e, t) { + return ( + (this.r = e.getX(t)), + (this.g = e.getY(t)), + (this.b = e.getZ(t)), + this + ); + }, + }, + { + key: "toJSON", + value: function () { + return this.getHex(); + }, + }, + { + key: e, + value: (0, v.Z)().mark(function e() { + return (0, v.Z)().wrap( + function (e) { + for (;;) + switch ((e.prev = e.next)) { + case 0: + return (e.next = 2), this.r; + case 2: + return (e.next = 4), this.g; + case 4: + return (e.next = 6), this.b; + case 6: + case "end": + return e.stop(); + } + }, + e, + this + ); + }), + }, + ]), + t + ); + })(Symbol.iterator), + da = new fa(); + fa.NAMES = sa; + var ha = (function (e) { + (0, d.Z)(n, e); + var t = (0, h.Z)(n); + function n(e) { + var r; + return ( + (0, m.Z)(this, n), + ((r = t.call(this)).isMeshBasicMaterial = !0), + (r.type = "MeshBasicMaterial"), + (r.color = new fa(16777215)), + (r.map = null), + (r.lightMap = null), + (r.lightMapIntensity = 1), + (r.aoMap = null), + (r.aoMapIntensity = 1), + (r.specularMap = null), + (r.alphaMap = null), + (r.envMap = null), + (r.combine = ue), + (r.reflectivity = 1), + (r.refractionRatio = 0.98), + (r.wireframe = !1), + (r.wireframeLinewidth = 1), + (r.wireframeLinecap = "round"), + (r.wireframeLinejoin = "round"), + (r.fog = !0), + r.setValues(e), + r + ); + } + return ( + (0, g.Z)(n, [ + { + key: "copy", + value: function (e) { + return ( + (0, l.Z)((0, u.Z)(n.prototype), "copy", this).call( + this, + 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.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 + ); + }, + }, + ]), + n + ); + })(oa), + pa = va(); + function va() { + for ( + var e = new ArrayBuffer(4), + t = new Float32Array(e), + n = new Uint32Array(e), + r = new Uint32Array(512), + i = new Uint32Array(512), + a = 0; + a < 256; + ++a + ) { + var o = a - 127; + o < -27 + ? ((r[a] = 0), + (r[256 | a] = 32768), + (i[a] = 24), + (i[256 | a] = 24)) + : o < -14 + ? ((r[a] = 1024 >> (-o - 14)), + (r[256 | a] = (1024 >> (-o - 14)) | 32768), + (i[a] = -o - 1), + (i[256 | a] = -o - 1)) + : o <= 15 + ? ((r[a] = (o + 15) << 10), + (r[256 | a] = ((o + 15) << 10) | 32768), + (i[a] = 13), + (i[256 | a] = 13)) + : o < 128 + ? ((r[a] = 31744), + (r[256 | a] = 64512), + (i[a] = 24), + (i[256 | a] = 24)) + : ((r[a] = 31744), + (r[256 | a] = 64512), + (i[a] = 13), + (i[256 | a] = 13)); + } + for ( + var s = new Uint32Array(2048), + l = new Uint32Array(64), + u = new Uint32Array(64), + c = 1; + c < 1024; + ++c + ) { + for (var f = c << 13, d = 0; 0 === (8388608 & f); ) + (f <<= 1), (d -= 8388608); + (f &= -8388609), (d += 947912704), (s[c] = f | d); + } + for (var h = 1024; h < 2048; ++h) + s[h] = 939524096 + ((h - 1024) << 13); + for (var p = 1; p < 31; ++p) l[p] = p << 23; + (l[31] = 1199570944), (l[32] = 2147483648); + for (var v = 33; v < 63; ++v) l[v] = 2147483648 + ((v - 32) << 23); + l[63] = 3347054592; + for (var m = 1; m < 64; ++m) 32 !== m && (u[m] = 1024); + return { + floatView: t, + uint32View: n, + baseTable: r, + shiftTable: i, + mantissaTable: s, + exponentTable: l, + offsetTable: u, + }; + } + function ma(e) { + Math.abs(e) > 65504 && + console.warn("THREE.DataUtils.toHalfFloat(): Value out of range."), + (e = rr(e, -65504, 65504)), + (pa.floatView[0] = e); + var t = pa.uint32View[0], + n = (t >> 23) & 511; + return pa.baseTable[n] + ((8388607 & t) >> pa.shiftTable[n]); + } + function ga(e) { + var t = e >> 10; + return ( + (pa.uint32View[0] = + pa.mantissaTable[pa.offsetTable[t] + (1023 & e)] + + pa.exponentTable[t]), + pa.floatView[0] + ); + } + var Aa = { toHalfFloat: ma, fromHalfFloat: ga }, + ya = new Vr(), + ba = new dr(), + xa = (function () { + function e(t, n) { + var r = + arguments.length > 2 && void 0 !== arguments[2] && arguments[2]; + if (((0, m.Z)(this, e), Array.isArray(t))) + throw new TypeError( + "THREE.BufferAttribute: array should be a Typed Array." + ); + (this.isBufferAttribute = !0), + (this.name = ""), + (this.array = t), + (this.itemSize = n), + (this.count = void 0 !== t ? t.length / n : 0), + (this.normalized = r), + (this.usage = Fn), + (this.updateRange = { offset: 0, count: -1 }), + (this.gpuType = Qe), + (this.version = 0); + } + return ( + (0, g.Z)(e, [ + { key: "onUploadCallback", value: function () {} }, + { + key: "needsUpdate", + set: function (e) { + !0 === e && this.version++; + }, + }, + { + key: "setUsage", + value: function (e) { + return (this.usage = e), this; + }, + }, + { + key: "copy", + value: function (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 + ); + }, + }, + { + key: "copyAt", + value: function (e, t, n) { + (e *= this.itemSize), (n *= t.itemSize); + for (var r = 0, i = this.itemSize; r < i; r++) + this.array[e + r] = t.array[n + r]; + return this; + }, + }, + { + key: "copyArray", + value: function (e) { + return this.array.set(e), this; + }, + }, + { + key: "applyMatrix3", + value: function (e) { + if (2 === this.itemSize) + for (var t = 0, n = this.count; t < n; t++) + ba.fromBufferAttribute(this, t), + ba.applyMatrix3(e), + this.setXY(t, ba.x, ba.y); + else if (3 === this.itemSize) + for (var r = 0, i = this.count; r < i; r++) + ya.fromBufferAttribute(this, r), + ya.applyMatrix3(e), + this.setXYZ(r, ya.x, ya.y, ya.z); + return this; + }, + }, + { + key: "applyMatrix4", + value: function (e) { + for (var t = 0, n = this.count; t < n; t++) + ya.fromBufferAttribute(this, t), + ya.applyMatrix4(e), + this.setXYZ(t, ya.x, ya.y, ya.z); + return this; + }, + }, + { + key: "applyNormalMatrix", + value: function (e) { + for (var t = 0, n = this.count; t < n; t++) + ya.fromBufferAttribute(this, t), + ya.applyNormalMatrix(e), + this.setXYZ(t, ya.x, ya.y, ya.z); + return this; + }, + }, + { + key: "transformDirection", + value: function (e) { + for (var t = 0, n = this.count; t < n; t++) + ya.fromBufferAttribute(this, t), + ya.transformDirection(e), + this.setXYZ(t, ya.x, ya.y, ya.z); + return this; + }, + }, + { + key: "set", + value: function (e) { + var t = + arguments.length > 1 && void 0 !== arguments[1] + ? arguments[1] + : 0; + return this.array.set(e, t), this; + }, + }, + { + key: "getComponent", + value: function (e, t) { + var n = this.array[e * this.itemSize + t]; + return this.normalized && (n = ur(n, this.array)), n; + }, + }, + { + key: "setComponent", + value: function (e, t, n) { + return ( + this.normalized && (n = cr(n, this.array)), + (this.array[e * this.itemSize + t] = n), + this + ); + }, + }, + { + key: "getX", + value: function (e) { + var t = this.array[e * this.itemSize]; + return this.normalized && (t = ur(t, this.array)), t; + }, + }, + { + key: "setX", + value: function (e, t) { + return ( + this.normalized && (t = cr(t, this.array)), + (this.array[e * this.itemSize] = t), + this + ); + }, + }, + { + key: "getY", + value: function (e) { + var t = this.array[e * this.itemSize + 1]; + return this.normalized && (t = ur(t, this.array)), t; + }, + }, + { + key: "setY", + value: function (e, t) { + return ( + this.normalized && (t = cr(t, this.array)), + (this.array[e * this.itemSize + 1] = t), + this + ); + }, + }, + { + key: "getZ", + value: function (e) { + var t = this.array[e * this.itemSize + 2]; + return this.normalized && (t = ur(t, this.array)), t; + }, + }, + { + key: "setZ", + value: function (e, t) { + return ( + this.normalized && (t = cr(t, this.array)), + (this.array[e * this.itemSize + 2] = t), + this + ); + }, + }, + { + key: "getW", + value: function (e) { + var t = this.array[e * this.itemSize + 3]; + return this.normalized && (t = ur(t, this.array)), t; + }, + }, + { + key: "setW", + value: function (e, t) { + return ( + this.normalized && (t = cr(t, this.array)), + (this.array[e * this.itemSize + 3] = t), + this + ); + }, + }, + { + key: "setXY", + value: function (e, t, n) { + return ( + (e *= this.itemSize), + this.normalized && + ((t = cr(t, this.array)), (n = cr(n, this.array))), + (this.array[e + 0] = t), + (this.array[e + 1] = n), + this + ); + }, + }, + { + key: "setXYZ", + value: function (e, t, n, r) { + return ( + (e *= this.itemSize), + this.normalized && + ((t = cr(t, this.array)), + (n = cr(n, this.array)), + (r = cr(r, this.array))), + (this.array[e + 0] = t), + (this.array[e + 1] = n), + (this.array[e + 2] = r), + this + ); + }, + }, + { + key: "setXYZW", + value: function (e, t, n, r, i) { + return ( + (e *= this.itemSize), + this.normalized && + ((t = cr(t, this.array)), + (n = cr(n, this.array)), + (r = cr(r, this.array)), + (i = cr(i, this.array))), + (this.array[e + 0] = t), + (this.array[e + 1] = n), + (this.array[e + 2] = r), + (this.array[e + 3] = i), + this + ); + }, + }, + { + key: "onUpload", + value: function (e) { + return (this.onUploadCallback = e), this; + }, + }, + { + key: "clone", + value: function () { + return new this.constructor(this.array, this.itemSize).copy( + this + ); + }, + }, + { + key: "toJSON", + value: function () { + var 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 !== Fn && (e.usage = this.usage), + (0 === this.updateRange.offset && + -1 === this.updateRange.count) || + (e.updateRange = this.updateRange), + e + ); + }, + }, + ]), + e + ); + })(), + Sa = (function (e) { + (0, d.Z)(n, e); + var t = (0, h.Z)(n); + function n(e, r, i) { + return (0, m.Z)(this, n), t.call(this, new Int8Array(e), r, i); + } + return (0, g.Z)(n); + })(xa), + Ea = (function (e) { + (0, d.Z)(n, e); + var t = (0, h.Z)(n); + function n(e, r, i) { + return (0, m.Z)(this, n), t.call(this, new Uint8Array(e), r, i); + } + return (0, g.Z)(n); + })(xa), + _a = (function (e) { + (0, d.Z)(n, e); + var t = (0, h.Z)(n); + function n(e, r, i) { + return ( + (0, m.Z)(this, n), t.call(this, new Uint8ClampedArray(e), r, i) + ); + } + return (0, g.Z)(n); + })(xa), + Ca = (function (e) { + (0, d.Z)(n, e); + var t = (0, h.Z)(n); + function n(e, r, i) { + return (0, m.Z)(this, n), t.call(this, new Int16Array(e), r, i); + } + return (0, g.Z)(n); + })(xa), + wa = (function (e) { + (0, d.Z)(n, e); + var t = (0, h.Z)(n); + function n(e, r, i) { + return (0, m.Z)(this, n), t.call(this, new Uint16Array(e), r, i); + } + return (0, g.Z)(n); + })(xa), + Ta = (function (e) { + (0, d.Z)(n, e); + var t = (0, h.Z)(n); + function n(e, r, i) { + return (0, m.Z)(this, n), t.call(this, new Int32Array(e), r, i); + } + return (0, g.Z)(n); + })(xa), + Ma = (function (e) { + (0, d.Z)(n, e); + var t = (0, h.Z)(n); + function n(e, r, i) { + return (0, m.Z)(this, n), t.call(this, new Uint32Array(e), r, i); + } + return (0, g.Z)(n); + })(xa), + Ia = (function (e) { + (0, d.Z)(n, e); + var t = (0, h.Z)(n); + function n(e, r, i) { + var a; + return ( + (0, m.Z)(this, n), + ((a = t.call( + this, + new Uint16Array(e), + r, + i + )).isFloat16BufferAttribute = !0), + a + ); + } + return ( + (0, g.Z)(n, [ + { + key: "getX", + value: function (e) { + var t = ga(this.array[e * this.itemSize]); + return this.normalized && (t = ur(t, this.array)), t; + }, + }, + { + key: "setX", + value: function (e, t) { + return ( + this.normalized && (t = cr(t, this.array)), + (this.array[e * this.itemSize] = ma(t)), + this + ); + }, + }, + { + key: "getY", + value: function (e) { + var t = ga(this.array[e * this.itemSize + 1]); + return this.normalized && (t = ur(t, this.array)), t; + }, + }, + { + key: "setY", + value: function (e, t) { + return ( + this.normalized && (t = cr(t, this.array)), + (this.array[e * this.itemSize + 1] = ma(t)), + this + ); + }, + }, + { + key: "getZ", + value: function (e) { + var t = ga(this.array[e * this.itemSize + 2]); + return this.normalized && (t = ur(t, this.array)), t; + }, + }, + { + key: "setZ", + value: function (e, t) { + return ( + this.normalized && (t = cr(t, this.array)), + (this.array[e * this.itemSize + 2] = ma(t)), + this + ); + }, + }, + { + key: "getW", + value: function (e) { + var t = ga(this.array[e * this.itemSize + 3]); + return this.normalized && (t = ur(t, this.array)), t; + }, + }, + { + key: "setW", + value: function (e, t) { + return ( + this.normalized && (t = cr(t, this.array)), + (this.array[e * this.itemSize + 3] = ma(t)), + this + ); + }, + }, + { + key: "setXY", + value: function (e, t, n) { + return ( + (e *= this.itemSize), + this.normalized && + ((t = cr(t, this.array)), (n = cr(n, this.array))), + (this.array[e + 0] = ma(t)), + (this.array[e + 1] = ma(n)), + this + ); + }, + }, + { + key: "setXYZ", + value: function (e, t, n, r) { + return ( + (e *= this.itemSize), + this.normalized && + ((t = cr(t, this.array)), + (n = cr(n, this.array)), + (r = cr(r, this.array))), + (this.array[e + 0] = ma(t)), + (this.array[e + 1] = ma(n)), + (this.array[e + 2] = ma(r)), + this + ); + }, + }, + { + key: "setXYZW", + value: function (e, t, n, r, i) { + return ( + (e *= this.itemSize), + this.normalized && + ((t = cr(t, this.array)), + (n = cr(n, this.array)), + (r = cr(r, this.array)), + (i = cr(i, this.array))), + (this.array[e + 0] = ma(t)), + (this.array[e + 1] = ma(n)), + (this.array[e + 2] = ma(r)), + (this.array[e + 3] = ma(i)), + this + ); + }, + }, + ]), + n + ); + })(xa), + ka = (function (e) { + (0, d.Z)(n, e); + var t = (0, h.Z)(n); + function n(e, r, i) { + return (0, m.Z)(this, n), t.call(this, new Float32Array(e), r, i); + } + return (0, g.Z)(n); + })(xa), + Ra = (function (e) { + (0, d.Z)(n, e); + var t = (0, h.Z)(n); + function n(e, r, i) { + return (0, m.Z)(this, n), t.call(this, new Float64Array(e), r, i); + } + return (0, g.Z)(n); + })(xa), + Ba = 0, + Pa = new xi(), + La = new ji(), + Da = new Vr(), + Ua = new Xr(), + Fa = new Xr(), + Oa = new Vr(), + Na = (function (e) { + (0, d.Z)(n, e); + var t = (0, h.Z)(n); + function n() { + var e; + return ( + (0, m.Z)(this, n), + ((e = t.call(this)).isBufferGeometry = !0), + Object.defineProperty((0, f.Z)(e), "id", { value: Ba++ }), + (e.uuid = nr()), + (e.name = ""), + (e.type = "BufferGeometry"), + (e.index = null), + (e.attributes = {}), + (e.morphAttributes = {}), + (e.morphTargetsRelative = !1), + (e.groups = []), + (e.boundingBox = null), + (e.boundingSphere = null), + (e.drawRange = { start: 0, count: 1 / 0 }), + (e.userData = {}), + e + ); + } + return ( + (0, g.Z)(n, [ + { + key: "getIndex", + value: function () { + return this.index; + }, + }, + { + key: "setIndex", + value: function (e) { + return ( + Array.isArray(e) + ? (this.index = new (vr(e) ? Ma : wa)(e, 1)) + : (this.index = e), + this + ); + }, + }, + { + key: "getAttribute", + value: function (e) { + return this.attributes[e]; + }, + }, + { + key: "setAttribute", + value: function (e, t) { + return (this.attributes[e] = t), this; + }, + }, + { + key: "deleteAttribute", + value: function (e) { + return delete this.attributes[e], this; + }, + }, + { + key: "hasAttribute", + value: function (e) { + return void 0 !== this.attributes[e]; + }, + }, + { + key: "addGroup", + value: function (e, t) { + var n = + arguments.length > 2 && void 0 !== arguments[2] + ? arguments[2] + : 0; + this.groups.push({ start: e, count: t, materialIndex: n }); + }, + }, + { + key: "clearGroups", + value: function () { + this.groups = []; + }, + }, + { + key: "setDrawRange", + value: function (e, t) { + (this.drawRange.start = e), (this.drawRange.count = t); + }, + }, + { + key: "applyMatrix4", + value: function (e) { + var t = this.attributes.position; + void 0 !== t && (t.applyMatrix4(e), (t.needsUpdate = !0)); + var n = this.attributes.normal; + if (void 0 !== n) { + var r = new hr().getNormalMatrix(e); + n.applyNormalMatrix(r), (n.needsUpdate = !0); + } + var i = this.attributes.tangent; + return ( + void 0 !== i && + (i.transformDirection(e), (i.needsUpdate = !0)), + null !== this.boundingBox && this.computeBoundingBox(), + null !== this.boundingSphere && + this.computeBoundingSphere(), + this + ); + }, + }, + { + key: "applyQuaternion", + value: function (e) { + return ( + Pa.makeRotationFromQuaternion(e), + this.applyMatrix4(Pa), + this + ); + }, + }, + { + key: "rotateX", + value: function (e) { + return Pa.makeRotationX(e), this.applyMatrix4(Pa), this; + }, + }, + { + key: "rotateY", + value: function (e) { + return Pa.makeRotationY(e), this.applyMatrix4(Pa), this; + }, + }, + { + key: "rotateZ", + value: function (e) { + return Pa.makeRotationZ(e), this.applyMatrix4(Pa), this; + }, + }, + { + key: "translate", + value: function (e, t, n) { + return ( + Pa.makeTranslation(e, t, n), this.applyMatrix4(Pa), this + ); + }, + }, + { + key: "scale", + value: function (e, t, n) { + return Pa.makeScale(e, t, n), this.applyMatrix4(Pa), this; + }, + }, + { + key: "lookAt", + value: function (e) { + return ( + La.lookAt(e), + La.updateMatrix(), + this.applyMatrix4(La.matrix), + this + ); + }, + }, + { + key: "center", + value: function () { + return ( + this.computeBoundingBox(), + this.boundingBox.getCenter(Da).negate(), + this.translate(Da.x, Da.y, Da.z), + this + ); + }, + }, + { + key: "setFromPoints", + value: function (e) { + for (var t = [], n = 0, r = e.length; n < r; n++) { + var i = e[n]; + t.push(i.x, i.y, i.z || 0); + } + return this.setAttribute("position", new ka(t, 3)), this; + }, + }, + { + key: "computeBoundingBox", + value: function () { + null === this.boundingBox && (this.boundingBox = new Xr()); + var e = this.attributes.position, + t = this.morphAttributes.position; + if (e && e.isGLBufferAttribute) + return ( + console.error( + 'THREE.BufferGeometry.computeBoundingBox(): GLBufferAttribute requires a manual bounding box. Alternatively set "mesh.frustumCulled" to "false".', + this + ), + void this.boundingBox.set( + new Vr(-1 / 0, -1 / 0, -1 / 0), + new Vr(1 / 0, 1 / 0, 1 / 0) + ) + ); + if (void 0 !== e) { + if ((this.boundingBox.setFromBufferAttribute(e), t)) + for (var n = 0, r = t.length; n < r; n++) { + var i = t[n]; + Ua.setFromBufferAttribute(i), + this.morphTargetsRelative + ? (Oa.addVectors(this.boundingBox.min, Ua.min), + this.boundingBox.expandByPoint(Oa), + Oa.addVectors(this.boundingBox.max, Ua.max), + this.boundingBox.expandByPoint(Oa)) + : (this.boundingBox.expandByPoint(Ua.min), + this.boundingBox.expandByPoint(Ua.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 + ); + }, + }, + { + key: "computeBoundingSphere", + value: function () { + null === this.boundingSphere && + (this.boundingSphere = new di()); + var e = this.attributes.position, + t = this.morphAttributes.position; + if (e && e.isGLBufferAttribute) + return ( + console.error( + 'THREE.BufferGeometry.computeBoundingSphere(): GLBufferAttribute requires a manual bounding sphere. Alternatively set "mesh.frustumCulled" to "false".', + this + ), + void this.boundingSphere.set(new Vr(), 1 / 0) + ); + if (e) { + var n = this.boundingSphere.center; + if ((Ua.setFromBufferAttribute(e), t)) + for (var r = 0, i = t.length; r < i; r++) { + var a = t[r]; + Fa.setFromBufferAttribute(a), + this.morphTargetsRelative + ? (Oa.addVectors(Ua.min, Fa.min), + Ua.expandByPoint(Oa), + Oa.addVectors(Ua.max, Fa.max), + Ua.expandByPoint(Oa)) + : (Ua.expandByPoint(Fa.min), + Ua.expandByPoint(Fa.max)); + } + Ua.getCenter(n); + for (var o = 0, s = 0, l = e.count; s < l; s++) + Oa.fromBufferAttribute(e, s), + (o = Math.max(o, n.distanceToSquared(Oa))); + if (t) + for (var u = 0, c = t.length; u < c; u++) + for ( + var f = t[u], + d = this.morphTargetsRelative, + h = 0, + p = f.count; + h < p; + h++ + ) + Oa.fromBufferAttribute(f, h), + d && (Da.fromBufferAttribute(e, h), Oa.add(Da)), + (o = Math.max(o, n.distanceToSquared(Oa))); + (this.boundingSphere.radius = Math.sqrt(o)), + isNaN(this.boundingSphere.radius) && + console.error( + 'THREE.BufferGeometry.computeBoundingSphere(): Computed radius is NaN. The "position" attribute is likely to have NaN values.', + this + ); + } + }, + }, + { + key: "computeTangents", + value: function () { + var e = this.index, + t = this.attributes; + if ( + null !== e && + void 0 !== t.position && + void 0 !== t.normal && + void 0 !== t.uv + ) { + var n = e.array, + r = t.position.array, + i = t.normal.array, + a = t.uv.array, + o = r.length / 3; + !1 === this.hasAttribute("tangent") && + this.setAttribute( + "tangent", + new xa(new Float32Array(4 * o), 4) + ); + for ( + var s = this.getAttribute("tangent").array, + l = [], + u = [], + c = 0; + c < o; + c++ + ) + (l[c] = new Vr()), (u[c] = new Vr()); + var f = new Vr(), + d = new Vr(), + h = new Vr(), + p = new dr(), + v = new dr(), + m = new dr(), + g = new Vr(), + A = new Vr(), + y = this.groups; + 0 === y.length && (y = [{ start: 0, count: n.length }]); + for (var b = 0, x = y.length; b < x; ++b) + for ( + var S = y[b], E = S.start, _ = E, C = E + S.count; + _ < C; + _ += 3 + ) + U(n[_ + 0], n[_ + 1], n[_ + 2]); + for ( + var w = new Vr(), + T = new Vr(), + M = new Vr(), + I = new Vr(), + k = 0, + R = y.length; + k < R; + ++k + ) + for ( + var B = y[k], P = B.start, L = P, D = P + B.count; + L < D; + L += 3 + ) + F(n[L + 0]), F(n[L + 1]), F(n[L + 2]); + } else + console.error( + "THREE.BufferGeometry: .computeTangents() failed. Missing required attributes (index, position, normal or uv)" + ); + function U(e, t, n) { + f.fromArray(r, 3 * e), + d.fromArray(r, 3 * t), + h.fromArray(r, 3 * n), + p.fromArray(a, 2 * e), + v.fromArray(a, 2 * t), + m.fromArray(a, 2 * n), + d.sub(f), + h.sub(f), + v.sub(p), + m.sub(p); + var i = 1 / (v.x * m.y - m.x * v.y); + isFinite(i) && + (g + .copy(d) + .multiplyScalar(m.y) + .addScaledVector(h, -v.y) + .multiplyScalar(i), + A.copy(h) + .multiplyScalar(v.x) + .addScaledVector(d, -m.x) + .multiplyScalar(i), + l[e].add(g), + l[t].add(g), + l[n].add(g), + u[e].add(A), + u[t].add(A), + u[n].add(A)); + } + function F(e) { + M.fromArray(i, 3 * e), I.copy(M); + var t = l[e]; + w.copy(t), + w.sub(M.multiplyScalar(M.dot(t))).normalize(), + T.crossVectors(I, t); + var n = T.dot(u[e]) < 0 ? -1 : 1; + (s[4 * e] = w.x), + (s[4 * e + 1] = w.y), + (s[4 * e + 2] = w.z), + (s[4 * e + 3] = n); + } + }, + }, + { + key: "computeVertexNormals", + value: function () { + var e = this.index, + t = this.getAttribute("position"); + if (void 0 !== t) { + var n = this.getAttribute("normal"); + if (void 0 === n) + (n = new xa(new Float32Array(3 * t.count), 3)), + this.setAttribute("normal", n); + else + for (var r = 0, i = n.count; r < i; r++) + n.setXYZ(r, 0, 0, 0); + var a = new Vr(), + o = new Vr(), + s = new Vr(), + l = new Vr(), + u = new Vr(), + c = new Vr(), + f = new Vr(), + d = new Vr(); + if (e) + for (var h = 0, p = e.count; h < p; h += 3) { + var v = e.getX(h + 0), + m = e.getX(h + 1), + g = e.getX(h + 2); + a.fromBufferAttribute(t, v), + o.fromBufferAttribute(t, m), + s.fromBufferAttribute(t, g), + f.subVectors(s, o), + d.subVectors(a, o), + f.cross(d), + l.fromBufferAttribute(n, v), + u.fromBufferAttribute(n, m), + c.fromBufferAttribute(n, g), + l.add(f), + u.add(f), + c.add(f), + n.setXYZ(v, l.x, l.y, l.z), + n.setXYZ(m, u.x, u.y, u.z), + n.setXYZ(g, c.x, c.y, c.z); + } + else + for (var A = 0, y = t.count; A < y; A += 3) + a.fromBufferAttribute(t, A + 0), + o.fromBufferAttribute(t, A + 1), + s.fromBufferAttribute(t, A + 2), + f.subVectors(s, o), + d.subVectors(a, o), + f.cross(d), + n.setXYZ(A + 0, f.x, f.y, f.z), + n.setXYZ(A + 1, f.x, f.y, f.z), + n.setXYZ(A + 2, f.x, f.y, f.z); + this.normalizeNormals(), (n.needsUpdate = !0); + } + }, + }, + { + key: "normalizeNormals", + value: function () { + for ( + var e = this.attributes.normal, t = 0, n = e.count; + t < n; + t++ + ) + Oa.fromBufferAttribute(e, t), + Oa.normalize(), + e.setXYZ(t, Oa.x, Oa.y, Oa.z); + }, + }, + { + key: "toNonIndexed", + value: function () { + function e(e, t) { + for ( + var n = e.array, + r = e.itemSize, + i = e.normalized, + a = new n.constructor(t.length * r), + o = 0, + s = 0, + l = 0, + u = t.length; + l < u; + l++ + ) { + o = e.isInterleavedBufferAttribute + ? t[l] * e.data.stride + e.offset + : t[l] * r; + for (var c = 0; c < r; c++) a[s++] = n[o++]; + } + return new xa(a, r, i); + } + if (null === this.index) + return ( + console.warn( + "THREE.BufferGeometry.toNonIndexed(): BufferGeometry is already non-indexed." + ), + this + ); + var t = new n(), + r = this.index.array, + i = this.attributes; + for (var a in i) { + var o = e(i[a], r); + t.setAttribute(a, o); + } + var s = this.morphAttributes; + for (var l in s) { + for ( + var u = [], c = s[l], f = 0, d = c.length; + f < d; + f++ + ) { + var h = e(c[f], r); + u.push(h); + } + t.morphAttributes[l] = u; + } + t.morphTargetsRelative = this.morphTargetsRelative; + for (var p = this.groups, v = 0, m = p.length; v < m; v++) { + var g = p[v]; + t.addGroup(g.start, g.count, g.materialIndex); + } + return t; + }, + }, + { + key: "toJSON", + value: function () { + var 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) + ) { + var t = this.parameters; + for (var n in t) void 0 !== t[n] && (e[n] = t[n]); + return e; + } + e.data = { attributes: {} }; + var r = this.index; + null !== r && + (e.data.index = { + type: r.array.constructor.name, + array: Array.prototype.slice.call(r.array), + }); + var i = this.attributes; + for (var a in i) { + var o = i[a]; + e.data.attributes[a] = o.toJSON(e.data); + } + var s = {}, + l = !1; + for (var u in this.morphAttributes) { + for ( + var c = this.morphAttributes[u], + f = [], + d = 0, + h = c.length; + d < h; + d++ + ) { + var p = c[d]; + f.push(p.toJSON(e.data)); + } + f.length > 0 && ((s[u] = f), (l = !0)); + } + l && + ((e.data.morphAttributes = s), + (e.data.morphTargetsRelative = + this.morphTargetsRelative)); + var v = this.groups; + v.length > 0 && + (e.data.groups = JSON.parse(JSON.stringify(v))); + var m = this.boundingSphere; + return ( + null !== m && + (e.data.boundingSphere = { + center: m.center.toArray(), + radius: m.radius, + }), + e + ); + }, + }, + { + key: "clone", + value: function () { + return new this.constructor().copy(this); + }, + }, + { + key: "copy", + value: function (e) { + (this.index = null), + (this.attributes = {}), + (this.morphAttributes = {}), + (this.groups = []), + (this.boundingBox = null), + (this.boundingSphere = null); + var t = {}; + this.name = e.name; + var n = e.index; + null !== n && this.setIndex(n.clone(t)); + var r = e.attributes; + for (var i in r) { + var a = r[i]; + this.setAttribute(i, a.clone(t)); + } + var o = e.morphAttributes; + for (var s in o) { + for ( + var l = [], u = o[s], c = 0, f = u.length; + c < f; + c++ + ) + l.push(u[c].clone(t)); + this.morphAttributes[s] = l; + } + this.morphTargetsRelative = e.morphTargetsRelative; + for (var d = e.groups, h = 0, p = d.length; h < p; h++) { + var v = d[h]; + this.addGroup(v.start, v.count, v.materialIndex); + } + var m = e.boundingBox; + null !== m && (this.boundingBox = m.clone()); + var g = e.boundingSphere; + return ( + null !== g && (this.boundingSphere = g.clone()), + (this.drawRange.start = e.drawRange.start), + (this.drawRange.count = e.drawRange.count), + (this.userData = e.userData), + this + ); + }, + }, + { + key: "dispose", + value: function () { + this.dispatchEvent({ type: "dispose" }); + }, + }, + ]), + n + ); + })(Jn), + Ga = new xi(), + Za = new bi(), + za = new di(), + Qa = new Vr(), + Ha = new Vr(), + Va = new Vr(), + ja = new Vr(), + Wa = new Vr(), + Xa = new Vr(), + Ya = new dr(), + qa = new dr(), + Ja = new dr(), + Ka = new Vr(), + $a = new Vr(), + eo = new Vr(), + to = new Vr(), + no = new Vr(), + ro = (function (e) { + (0, d.Z)(n, e); + var t = (0, h.Z)(n); + function n() { + var e, + r = + arguments.length > 0 && void 0 !== arguments[0] + ? arguments[0] + : new Na(), + i = + arguments.length > 1 && void 0 !== arguments[1] + ? arguments[1] + : new ha(); + return ( + (0, m.Z)(this, n), + ((e = t.call(this)).isMesh = !0), + (e.type = "Mesh"), + (e.geometry = r), + (e.material = i), + e.updateMorphTargets(), + e + ); + } + return ( + (0, g.Z)(n, [ + { + key: "copy", + value: function (e, t) { + return ( + (0, l.Z)((0, u.Z)(n.prototype), "copy", this).call( + this, + 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 + ); + }, + }, + { + key: "updateMorphTargets", + value: function () { + var e = this.geometry.morphAttributes, + t = Object.keys(e); + if (t.length > 0) { + var n = e[t[0]]; + if (void 0 !== n) { + (this.morphTargetInfluences = []), + (this.morphTargetDictionary = {}); + for (var r = 0, i = n.length; r < i; r++) { + var a = n[r].name || String(r); + this.morphTargetInfluences.push(0), + (this.morphTargetDictionary[a] = r); + } + } + } + }, + }, + { + key: "getVertexPosition", + value: function (e, t) { + var n = this.geometry, + r = n.attributes.position, + i = n.morphAttributes.position, + a = n.morphTargetsRelative; + t.fromBufferAttribute(r, e); + var o = this.morphTargetInfluences; + if (i && o) { + Xa.set(0, 0, 0); + for (var s = 0, l = i.length; s < l; s++) { + var u = o[s], + c = i[s]; + 0 !== u && + (Wa.fromBufferAttribute(c, e), + a + ? Xa.addScaledVector(Wa, u) + : Xa.addScaledVector(Wa.sub(t), u)); + } + t.add(Xa); + } + return t; + }, + }, + { + key: "raycast", + value: function (e, t) { + var n = this.geometry, + r = this.material, + i = this.matrixWorld; + if (void 0 !== r) { + if ( + (null === n.boundingSphere && n.computeBoundingSphere(), + za.copy(n.boundingSphere), + za.applyMatrix4(i), + Za.copy(e.ray).recast(e.near), + !1 === za.containsPoint(Za.origin)) + ) { + if (null === Za.intersectSphere(za, Qa)) return; + if ( + Za.origin.distanceToSquared(Qa) > + Math.pow(e.far - e.near, 2) + ) + return; + } + Ga.copy(i).invert(), + Za.copy(e.ray).applyMatrix4(Ga), + (null !== n.boundingBox && + !1 === Za.intersectsBox(n.boundingBox)) || + this._computeIntersections(e, t, Za); + } + }, + }, + { + key: "_computeIntersections", + value: function (e, t, n) { + var r, + i = this.geometry, + a = this.material, + o = i.index, + s = i.attributes.position, + l = i.attributes.uv, + u = i.attributes.uv1, + c = i.attributes.normal, + f = i.groups, + d = i.drawRange; + if (null !== o) + if (Array.isArray(a)) + for (var h = 0, p = f.length; h < p; h++) + for ( + var v = f[h], + m = a[v.materialIndex], + g = Math.max(v.start, d.start), + A = Math.min( + o.count, + Math.min(v.start + v.count, d.start + d.count) + ); + g < A; + g += 3 + ) { + (r = io( + this, + m, + e, + n, + l, + u, + c, + o.getX(g), + o.getX(g + 1), + o.getX(g + 2) + )) && + ((r.faceIndex = Math.floor(g / 3)), + (r.face.materialIndex = v.materialIndex), + t.push(r)); + } + else + for ( + var y = Math.max(0, d.start), + b = Math.min(o.count, d.start + d.count); + y < b; + y += 3 + ) { + (r = io( + this, + a, + e, + n, + l, + u, + c, + o.getX(y), + o.getX(y + 1), + o.getX(y + 2) + )) && ((r.faceIndex = Math.floor(y / 3)), t.push(r)); + } + else if (void 0 !== s) + if (Array.isArray(a)) + for (var x = 0, S = f.length; x < S; x++) + for ( + var E = f[x], + _ = a[E.materialIndex], + C = Math.max(E.start, d.start), + w = Math.min( + s.count, + Math.min(E.start + E.count, d.start + d.count) + ); + C < w; + C += 3 + ) { + (r = io(this, _, e, n, l, u, c, C, C + 1, C + 2)) && + ((r.faceIndex = Math.floor(C / 3)), + (r.face.materialIndex = E.materialIndex), + t.push(r)); + } + else + for ( + var T = Math.max(0, d.start), + M = Math.min(s.count, d.start + d.count); + T < M; + T += 3 + ) { + (r = io(this, a, e, n, l, u, c, T, T + 1, T + 2)) && + ((r.faceIndex = Math.floor(T / 3)), t.push(r)); + } + }, + }, + ]), + n + ); + })(ji); + function io(e, t, n, r, i, a, o, s, l, u) { + e.getVertexPosition(s, Ha), + e.getVertexPosition(l, Va), + e.getVertexPosition(u, ja); + var c = (function (e, t, n, r, i, a, o, s) { + if ( + null === + (t.side === k + ? r.intersectTriangle(o, a, i, !0, s) + : r.intersectTriangle(i, a, o, t.side === I, s)) + ) + return null; + no.copy(s), no.applyMatrix4(e.matrixWorld); + var l = n.ray.origin.distanceTo(no); + return l < n.near || l > n.far + ? null + : { distance: l, point: no.clone(), object: e }; + })(e, t, n, r, Ha, Va, ja, to); + if (c) { + i && + (Ya.fromBufferAttribute(i, s), + qa.fromBufferAttribute(i, l), + Ja.fromBufferAttribute(i, u), + (c.uv = ia.getInterpolation( + to, + Ha, + Va, + ja, + Ya, + qa, + Ja, + new dr() + ))), + a && + (Ya.fromBufferAttribute(a, s), + qa.fromBufferAttribute(a, l), + Ja.fromBufferAttribute(a, u), + (c.uv1 = ia.getInterpolation( + to, + Ha, + Va, + ja, + Ya, + qa, + Ja, + new dr() + )), + (c.uv2 = c.uv1)), + o && + (Ka.fromBufferAttribute(o, s), + $a.fromBufferAttribute(o, l), + eo.fromBufferAttribute(o, u), + (c.normal = ia.getInterpolation( + to, + Ha, + Va, + ja, + Ka, + $a, + eo, + new Vr() + )), + c.normal.dot(r.direction) > 0 && c.normal.multiplyScalar(-1)); + var f = { a: s, b: l, c: u, normal: new Vr(), materialIndex: 0 }; + ia.getNormal(Ha, Va, ja, f.normal), (c.face = f); + } + return c; + } + var ao = (function (e) { + (0, d.Z)(n, e); + var t = (0, h.Z)(n); + function n() { + var e, + r = + arguments.length > 0 && void 0 !== arguments[0] + ? arguments[0] + : 1, + i = + arguments.length > 1 && void 0 !== arguments[1] + ? arguments[1] + : 1, + a = + arguments.length > 2 && void 0 !== arguments[2] + ? arguments[2] + : 1, + o = + arguments.length > 3 && void 0 !== arguments[3] + ? arguments[3] + : 1, + s = + arguments.length > 4 && void 0 !== arguments[4] + ? arguments[4] + : 1, + l = + arguments.length > 5 && void 0 !== arguments[5] + ? arguments[5] + : 1; + (0, m.Z)(this, n), + ((e = t.call(this)).type = "BoxGeometry"), + (e.parameters = { + width: r, + height: i, + depth: a, + widthSegments: o, + heightSegments: s, + depthSegments: l, + }); + var u = (0, f.Z)(e); + (o = Math.floor(o)), (s = Math.floor(s)), (l = Math.floor(l)); + var c = [], + d = [], + h = [], + p = [], + v = 0, + g = 0; + function A(e, t, n, r, i, a, o, s, l, f, m) { + for ( + var A = a / l, + y = o / f, + b = a / 2, + x = o / 2, + S = s / 2, + E = l + 1, + _ = f + 1, + C = 0, + w = 0, + T = new Vr(), + M = 0; + M < _; + M++ + ) + for (var I = M * y - x, k = 0; k < E; k++) { + var R = k * A - b; + (T[e] = R * r), + (T[t] = I * i), + (T[n] = S), + d.push(T.x, T.y, T.z), + (T[e] = 0), + (T[t] = 0), + (T[n] = s > 0 ? 1 : -1), + h.push(T.x, T.y, T.z), + p.push(k / l), + p.push(1 - M / f), + (C += 1); + } + for (var B = 0; B < f; B++) + for (var P = 0; P < l; P++) { + var L = v + P + E * B, + D = v + P + E * (B + 1), + U = v + (P + 1) + E * (B + 1), + F = v + (P + 1) + E * B; + c.push(L, D, F), c.push(D, U, F), (w += 6); + } + u.addGroup(g, w, m), (g += w), (v += C); + } + return ( + A("z", "y", "x", -1, -1, a, i, r, l, s, 0), + A("z", "y", "x", 1, -1, a, i, -r, l, s, 1), + A("x", "z", "y", 1, 1, r, a, i, o, l, 2), + A("x", "z", "y", 1, -1, r, a, -i, o, l, 3), + A("x", "y", "z", 1, -1, r, i, a, o, s, 4), + A("x", "y", "z", -1, -1, r, i, -a, o, s, 5), + e.setIndex(c), + e.setAttribute("position", new ka(d, 3)), + e.setAttribute("normal", new ka(h, 3)), + e.setAttribute("uv", new ka(p, 2)), + e + ); + } + return ( + (0, g.Z)( + n, + [ + { + key: "copy", + value: function (e) { + return ( + (0, l.Z)((0, u.Z)(n.prototype), "copy", this).call( + this, + e + ), + (this.parameters = Object.assign({}, e.parameters)), + this + ); + }, + }, + ], + [ + { + key: "fromJSON", + value: function (e) { + return new n( + e.width, + e.height, + e.depth, + e.widthSegments, + e.heightSegments, + e.depthSegments + ); + }, + }, + ] + ), + n + ); + })(Na); + function oo(e) { + var t = {}; + for (var n in e) + for (var r in ((t[n] = {}), e[n])) { + var 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 so(e) { + for (var t = {}, n = 0; n < e.length; n++) { + var r = oo(e[n]); + for (var i in r) t[i] = r[i]; + } + return t; + } + function lo(e) { + return null === e.getRenderTarget() + ? e.outputColorSpace + : Tr.workingColorSpace; + } + var uo = { clone: oo, merge: so }, + co = (function (e) { + (0, d.Z)(n, e); + var t = (0, h.Z)(n); + function n(e) { + var r; + return ( + (0, m.Z)(this, n), + ((r = t.call(this)).isShaderMaterial = !0), + (r.type = "ShaderMaterial"), + (r.defines = {}), + (r.uniforms = {}), + (r.uniformsGroups = []), + (r.vertexShader = + "void main() {\n\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n}"), + (r.fragmentShader = + "void main() {\n\tgl_FragColor = vec4( 1.0, 0.0, 0.0, 1.0 );\n}"), + (r.linewidth = 1), + (r.wireframe = !1), + (r.wireframeLinewidth = 1), + (r.fog = !1), + (r.lights = !1), + (r.clipping = !1), + (r.forceSinglePass = !0), + (r.extensions = { + derivatives: !1, + fragDepth: !1, + drawBuffers: !1, + shaderTextureLOD: !1, + }), + (r.defaultAttributeValues = { + color: [1, 1, 1], + uv: [0, 0], + uv1: [0, 0], + }), + (r.index0AttributeName = void 0), + (r.uniformsNeedUpdate = !1), + (r.glslVersion = null), + void 0 !== e && r.setValues(e), + r + ); + } + return ( + (0, g.Z)(n, [ + { + key: "copy", + value: function (e) { + return ( + (0, l.Z)((0, u.Z)(n.prototype), "copy", this).call( + this, + e + ), + (this.fragmentShader = e.fragmentShader), + (this.vertexShader = e.vertexShader), + (this.uniforms = oo(e.uniforms)), + (this.uniformsGroups = (function (e) { + for (var t = [], 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 + ); + }, + }, + { + key: "toJSON", + value: function (e) { + var t = (0, l.Z)( + (0, u.Z)(n.prototype), + "toJSON", + this + ).call(this, e); + for (var r in ((t.glslVersion = this.glslVersion), + (t.uniforms = {}), + this.uniforms)) { + var i = this.uniforms[r].value; + i && i.isTexture + ? (t.uniforms[r] = { + type: "t", + value: i.toJSON(e).uuid, + }) + : i && i.isColor + ? (t.uniforms[r] = { type: "c", value: i.getHex() }) + : i && i.isVector2 + ? (t.uniforms[r] = { type: "v2", value: i.toArray() }) + : i && i.isVector3 + ? (t.uniforms[r] = { type: "v3", value: i.toArray() }) + : i && i.isVector4 + ? (t.uniforms[r] = { type: "v4", value: i.toArray() }) + : i && i.isMatrix3 + ? (t.uniforms[r] = { type: "m3", value: i.toArray() }) + : i && i.isMatrix4 + ? (t.uniforms[r] = { type: "m4", value: i.toArray() }) + : (t.uniforms[r] = { value: i }); + } + 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); + var a = {}; + for (var o in this.extensions) + !0 === this.extensions[o] && (a[o] = !0); + return Object.keys(a).length > 0 && (t.extensions = a), t; + }, + }, + ]), + n + ); + })(oa), + fo = (function (e) { + (0, d.Z)(n, e); + var t = (0, h.Z)(n); + function n() { + var e; + return ( + (0, m.Z)(this, n), + ((e = t.call(this)).isCamera = !0), + (e.type = "Camera"), + (e.matrixWorldInverse = new xi()), + (e.projectionMatrix = new xi()), + (e.projectionMatrixInverse = new xi()), + (e.coordinateSystem = Yn), + e + ); + } + return ( + (0, g.Z)(n, [ + { + key: "copy", + value: function (e, t) { + return ( + (0, l.Z)((0, u.Z)(n.prototype), "copy", this).call( + this, + e, + t + ), + this.matrixWorldInverse.copy(e.matrixWorldInverse), + this.projectionMatrix.copy(e.projectionMatrix), + this.projectionMatrixInverse.copy( + e.projectionMatrixInverse + ), + (this.coordinateSystem = e.coordinateSystem), + this + ); + }, + }, + { + key: "getWorldDirection", + value: function (e) { + return (0, l.Z)( + (0, u.Z)(n.prototype), + "getWorldDirection", + this + ) + .call(this, e) + .negate(); + }, + }, + { + key: "updateMatrixWorld", + value: function (e) { + (0, l.Z)( + (0, u.Z)(n.prototype), + "updateMatrixWorld", + this + ).call(this, e), + this.matrixWorldInverse.copy(this.matrixWorld).invert(); + }, + }, + { + key: "updateWorldMatrix", + value: function (e, t) { + (0, l.Z)( + (0, u.Z)(n.prototype), + "updateWorldMatrix", + this + ).call(this, e, t), + this.matrixWorldInverse.copy(this.matrixWorld).invert(); + }, + }, + { + key: "clone", + value: function () { + return new this.constructor().copy(this); + }, + }, + ]), + n + ); + })(ji), + ho = (function (e) { + (0, d.Z)(n, e); + var t = (0, h.Z)(n); + function n() { + var e, + r = + arguments.length > 0 && void 0 !== arguments[0] + ? arguments[0] + : 50, + i = + arguments.length > 1 && void 0 !== arguments[1] + ? arguments[1] + : 1, + a = + arguments.length > 2 && void 0 !== arguments[2] + ? arguments[2] + : 0.1, + o = + arguments.length > 3 && void 0 !== arguments[3] + ? arguments[3] + : 2e3; + return ( + (0, m.Z)(this, n), + ((e = t.call(this)).isPerspectiveCamera = !0), + (e.type = "PerspectiveCamera"), + (e.fov = r), + (e.zoom = 1), + (e.near = a), + (e.far = o), + (e.focus = 10), + (e.aspect = i), + (e.view = null), + (e.filmGauge = 35), + (e.filmOffset = 0), + e.updateProjectionMatrix(), + e + ); + } + return ( + (0, g.Z)(n, [ + { + key: "copy", + value: function (e, t) { + return ( + (0, l.Z)((0, u.Z)(n.prototype), "copy", this).call( + this, + 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 + ); + }, + }, + { + key: "setFocalLength", + value: function (e) { + var t = (0.5 * this.getFilmHeight()) / e; + (this.fov = 2 * tr * Math.atan(t)), + this.updateProjectionMatrix(); + }, + }, + { + key: "getFocalLength", + value: function () { + var e = Math.tan(0.5 * er * this.fov); + return (0.5 * this.getFilmHeight()) / e; + }, + }, + { + key: "getEffectiveFOV", + value: function () { + return ( + 2 * + tr * + Math.atan(Math.tan(0.5 * er * this.fov) / this.zoom) + ); + }, + }, + { + key: "getFilmWidth", + value: function () { + return this.filmGauge * Math.min(this.aspect, 1); + }, + }, + { + key: "getFilmHeight", + value: function () { + return this.filmGauge / Math.max(this.aspect, 1); + }, + }, + { + key: "setViewOffset", + value: function (e, t, n, r, i, a) { + (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 = a), + this.updateProjectionMatrix(); + }, + }, + { + key: "clearViewOffset", + value: function () { + null !== this.view && (this.view.enabled = !1), + this.updateProjectionMatrix(); + }, + }, + { + key: "updateProjectionMatrix", + value: function () { + var e = this.near, + t = (e * Math.tan(0.5 * er * this.fov)) / this.zoom, + n = 2 * t, + r = this.aspect * n, + i = -0.5 * r, + a = this.view; + if (null !== this.view && this.view.enabled) { + var o = a.fullWidth, + s = a.fullHeight; + (i += (a.offsetX * r) / o), + (t -= (a.offsetY * n) / s), + (r *= a.width / o), + (n *= a.height / s); + } + var l = this.filmOffset; + 0 !== l && (i += (e * l) / this.getFilmWidth()), + this.projectionMatrix.makePerspective( + i, + i + r, + t, + t - n, + e, + this.far, + this.coordinateSystem + ), + this.projectionMatrixInverse + .copy(this.projectionMatrix) + .invert(); + }, + }, + { + key: "toJSON", + value: function (e) { + var t = (0, l.Z)( + (0, u.Z)(n.prototype), + "toJSON", + this + ).call(this, 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 + ); + }, + }, + ]), + n + ); + })(fo), + po = -90, + vo = (function (e) { + (0, d.Z)(n, e); + var t = (0, h.Z)(n); + function n(e, r, i) { + var a; + (0, m.Z)(this, n), + ((a = t.call(this)).type = "CubeCamera"), + (a.renderTarget = i), + (a.coordinateSystem = null), + (a.activeMipmapLevel = 0); + var o = new ho(po, 1, e, r); + (o.layers = a.layers), a.add(o); + var s = new ho(po, 1, e, r); + (s.layers = a.layers), a.add(s); + var l = new ho(po, 1, e, r); + (l.layers = a.layers), a.add(l); + var u = new ho(po, 1, e, r); + (u.layers = a.layers), a.add(u); + var c = new ho(po, 1, e, r); + (c.layers = a.layers), a.add(c); + var f = new ho(po, 1, e, r); + return (f.layers = a.layers), a.add(f), a; + } + return ( + (0, g.Z)(n, [ + { + key: "updateCoordinateSystem", + value: function () { + var e, + t = this.coordinateSystem, + n = this.children.concat(), + r = (0, s.Z)(n, 6), + i = r[0], + a = r[1], + l = r[2], + u = r[3], + c = r[4], + f = r[5], + d = (0, o.Z)(n); + try { + for (d.s(); !(e = d.n()).done; ) { + var h = e.value; + this.remove(h); + } + } catch (g) { + d.e(g); + } finally { + d.f(); + } + if (t === Yn) + i.up.set(0, 1, 0), + i.lookAt(1, 0, 0), + a.up.set(0, 1, 0), + a.lookAt(-1, 0, 0), + l.up.set(0, 0, -1), + l.lookAt(0, 1, 0), + u.up.set(0, 0, 1), + u.lookAt(0, -1, 0), + c.up.set(0, 1, 0), + c.lookAt(0, 0, 1), + f.up.set(0, 1, 0), + f.lookAt(0, 0, -1); + else { + if (t !== qn) + throw new Error( + "THREE.CubeCamera.updateCoordinateSystem(): Invalid coordinate system: " + + t + ); + i.up.set(0, -1, 0), + i.lookAt(-1, 0, 0), + a.up.set(0, -1, 0), + a.lookAt(1, 0, 0), + l.up.set(0, 0, 1), + l.lookAt(0, 1, 0), + u.up.set(0, 0, -1), + u.lookAt(0, -1, 0), + c.up.set(0, -1, 0), + c.lookAt(0, 0, 1), + f.up.set(0, -1, 0), + f.lookAt(0, 0, -1); + } + var p, + v = (0, o.Z)(n); + try { + for (v.s(); !(p = v.n()).done; ) { + var m = p.value; + this.add(m), m.updateMatrixWorld(); + } + } catch (g) { + v.e(g); + } finally { + v.f(); + } + }, + }, + { + key: "update", + value: function (e, t) { + null === this.parent && this.updateMatrixWorld(); + var n = this.renderTarget, + r = this.activeMipmapLevel; + this.coordinateSystem !== e.coordinateSystem && + ((this.coordinateSystem = e.coordinateSystem), + this.updateCoordinateSystem()); + var i = (0, s.Z)(this.children, 6), + a = i[0], + o = i[1], + l = i[2], + u = i[3], + c = i[4], + f = i[5], + d = e.getRenderTarget(), + h = e.getActiveCubeFace(), + p = e.getActiveMipmapLevel(), + v = e.xr.enabled; + e.xr.enabled = !1; + var m = n.texture.generateMipmaps; + (n.texture.generateMipmaps = !1), + e.setRenderTarget(n, 0, r), + e.render(t, a), + e.setRenderTarget(n, 1, r), + e.render(t, o), + e.setRenderTarget(n, 2, r), + e.render(t, l), + e.setRenderTarget(n, 3, r), + e.render(t, u), + e.setRenderTarget(n, 4, r), + e.render(t, c), + (n.texture.generateMipmaps = m), + e.setRenderTarget(n, 5, r), + e.render(t, f), + e.setRenderTarget(d, h, p), + (e.xr.enabled = v), + (n.texture.needsPMREMUpdate = !0); + }, + }, + ]), + n + ); + })(ji), + mo = (function (e) { + (0, d.Z)(n, e); + var t = (0, h.Z)(n); + function n(e, r, i, a, o, s, l, u, c, f) { + var d; + return ( + (0, m.Z)(this, n), + (e = void 0 !== e ? e : []), + (r = void 0 !== r ? r : ye), + ((d = t.call( + this, + e, + r, + i, + a, + o, + s, + l, + u, + c, + f + )).isCubeTexture = !0), + (d.flipY = !1), + d + ); + } + return ( + (0, g.Z)(n, [ + { + key: "images", + get: function () { + return this.image; + }, + set: function (e) { + this.image = e; + }, + }, + ]), + n + ); + })(Dr), + go = (function (e) { + (0, d.Z)(n, e); + var t = (0, h.Z)(n); + function n() { + var e, + r = + arguments.length > 0 && void 0 !== arguments[0] + ? arguments[0] + : 1, + i = + arguments.length > 1 && void 0 !== arguments[1] + ? arguments[1] + : {}; + (0, m.Z)(this, n), + ((e = t.call(this, r, r, i)).isWebGLCubeRenderTarget = !0); + var a = { width: r, height: r, depth: 1 }, + o = [a, a, a, a, a, a]; + return ( + void 0 !== i.encoding && + (xr( + "THREE.WebGLCubeRenderTarget: option.encoding has been replaced by option.colorSpace." + ), + (i.colorSpace = i.encoding === Kt ? an : rn)), + (e.texture = new mo( + o, + i.mapping, + i.wrapS, + i.wrapT, + i.magFilter, + i.minFilter, + i.format, + i.type, + i.anisotropy, + i.colorSpace + )), + (e.texture.isRenderTargetTexture = !0), + (e.texture.generateMipmaps = + void 0 !== i.generateMipmaps && i.generateMipmaps), + (e.texture.minFilter = + void 0 !== i.minFilter ? i.minFilter : Be), + e + ); + } + return ( + (0, g.Z)(n, [ + { + key: "fromEquirectangularTexture", + value: function (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); + var 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 \n\t\t\t\t\t#include \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 \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", + a = new ao(5, 5, 5), + o = new co({ + name: "CubemapFromEquirect", + uniforms: oo(n), + vertexShader: r, + fragmentShader: i, + side: k, + blending: P, + }); + o.uniforms.tEquirect.value = t; + var s = new ro(a, o), + l = t.minFilter; + return ( + t.minFilter === De && (t.minFilter = Be), + new vo(1, 10, this).update(e, s), + (t.minFilter = l), + s.geometry.dispose(), + s.material.dispose(), + this + ); + }, + }, + { + key: "clear", + value: function (e, t, n, r) { + for (var i = e.getRenderTarget(), a = 0; a < 6; a++) + e.setRenderTarget(this, a), e.clear(t, n, r); + e.setRenderTarget(i); + }, + }, + ]), + n + ); + })(Or), + Ao = new Vr(), + yo = new Vr(), + bo = new hr(), + xo = (function () { + function e() { + var t = + arguments.length > 0 && void 0 !== arguments[0] + ? arguments[0] + : new Vr(1, 0, 0), + n = + arguments.length > 1 && void 0 !== arguments[1] + ? arguments[1] + : 0; + (0, m.Z)(this, e), + (this.isPlane = !0), + (this.normal = t), + (this.constant = n); + } + return ( + (0, g.Z)(e, [ + { + key: "set", + value: function (e, t) { + return this.normal.copy(e), (this.constant = t), this; + }, + }, + { + key: "setComponents", + value: function (e, t, n, r) { + return this.normal.set(e, t, n), (this.constant = r), this; + }, + }, + { + key: "setFromNormalAndCoplanarPoint", + value: function (e, t) { + return ( + this.normal.copy(e), + (this.constant = -t.dot(this.normal)), + this + ); + }, + }, + { + key: "setFromCoplanarPoints", + value: function (e, t, n) { + var r = Ao.subVectors(n, t) + .cross(yo.subVectors(e, t)) + .normalize(); + return this.setFromNormalAndCoplanarPoint(r, e), this; + }, + }, + { + key: "copy", + value: function (e) { + return ( + this.normal.copy(e.normal), + (this.constant = e.constant), + this + ); + }, + }, + { + key: "normalize", + value: function () { + var e = 1 / this.normal.length(); + return ( + this.normal.multiplyScalar(e), (this.constant *= e), this + ); + }, + }, + { + key: "negate", + value: function () { + return (this.constant *= -1), this.normal.negate(), this; + }, + }, + { + key: "distanceToPoint", + value: function (e) { + return this.normal.dot(e) + this.constant; + }, + }, + { + key: "distanceToSphere", + value: function (e) { + return this.distanceToPoint(e.center) - e.radius; + }, + }, + { + key: "projectPoint", + value: function (e, t) { + return t + .copy(e) + .addScaledVector(this.normal, -this.distanceToPoint(e)); + }, + }, + { + key: "intersectLine", + value: function (e, t) { + var n = e.delta(Ao), + r = this.normal.dot(n); + if (0 === r) + return 0 === this.distanceToPoint(e.start) + ? t.copy(e.start) + : null; + var i = -(e.start.dot(this.normal) + this.constant) / r; + return i < 0 || i > 1 + ? null + : t.copy(e.start).addScaledVector(n, i); + }, + }, + { + key: "intersectsLine", + value: function (e) { + var t = this.distanceToPoint(e.start), + n = this.distanceToPoint(e.end); + return (t < 0 && n > 0) || (n < 0 && t > 0); + }, + }, + { + key: "intersectsBox", + value: function (e) { + return e.intersectsPlane(this); + }, + }, + { + key: "intersectsSphere", + value: function (e) { + return e.intersectsPlane(this); + }, + }, + { + key: "coplanarPoint", + value: function (e) { + return e.copy(this.normal).multiplyScalar(-this.constant); + }, + }, + { + key: "applyMatrix4", + value: function (e, t) { + var n = t || bo.getNormalMatrix(e), + r = this.coplanarPoint(Ao).applyMatrix4(e), + i = this.normal.applyMatrix3(n).normalize(); + return (this.constant = -r.dot(i)), this; + }, + }, + { + key: "translate", + value: function (e) { + return (this.constant -= e.dot(this.normal)), this; + }, + }, + { + key: "equals", + value: function (e) { + return ( + e.normal.equals(this.normal) && + e.constant === this.constant + ); + }, + }, + { + key: "clone", + value: function () { + return new this.constructor().copy(this); + }, + }, + ]), + e + ); + })(), + So = new di(), + Eo = new Vr(), + _o = (function () { + function e() { + var t = + arguments.length > 0 && void 0 !== arguments[0] + ? arguments[0] + : new xo(), + n = + arguments.length > 1 && void 0 !== arguments[1] + ? arguments[1] + : new xo(), + r = + arguments.length > 2 && void 0 !== arguments[2] + ? arguments[2] + : new xo(), + i = + arguments.length > 3 && void 0 !== arguments[3] + ? arguments[3] + : new xo(), + a = + arguments.length > 4 && void 0 !== arguments[4] + ? arguments[4] + : new xo(), + o = + arguments.length > 5 && void 0 !== arguments[5] + ? arguments[5] + : new xo(); + (0, m.Z)(this, e), (this.planes = [t, n, r, i, a, o]); + } + return ( + (0, g.Z)(e, [ + { + key: "set", + value: function (e, t, n, r, i, a) { + var o = this.planes; + return ( + o[0].copy(e), + o[1].copy(t), + o[2].copy(n), + o[3].copy(r), + o[4].copy(i), + o[5].copy(a), + this + ); + }, + }, + { + key: "copy", + value: function (e) { + for (var t = this.planes, n = 0; n < 6; n++) + t[n].copy(e.planes[n]); + return this; + }, + }, + { + key: "setFromProjectionMatrix", + value: function (e) { + var t = + arguments.length > 1 && void 0 !== arguments[1] + ? arguments[1] + : Yn, + n = this.planes, + r = e.elements, + i = r[0], + a = r[1], + o = r[2], + s = r[3], + l = r[4], + u = r[5], + c = r[6], + f = r[7], + d = r[8], + h = r[9], + p = r[10], + v = r[11], + m = r[12], + g = r[13], + A = r[14], + y = r[15]; + if ( + (n[0] + .setComponents(s - i, f - l, v - d, y - m) + .normalize(), + n[1] + .setComponents(s + i, f + l, v + d, y + m) + .normalize(), + n[2] + .setComponents(s + a, f + u, v + h, y + g) + .normalize(), + n[3] + .setComponents(s - a, f - u, v - h, y - g) + .normalize(), + n[4] + .setComponents(s - o, f - c, v - p, y - A) + .normalize(), + t === Yn) + ) + n[5] + .setComponents(s + o, f + c, v + p, y + A) + .normalize(); + else { + if (t !== qn) + throw new Error( + "THREE.Frustum.setFromProjectionMatrix(): Invalid coordinate system: " + + t + ); + n[5].setComponents(o, c, p, A).normalize(); + } + return this; + }, + }, + { + key: "intersectsObject", + value: function (e) { + if (void 0 !== e.boundingSphere) + null === e.boundingSphere && e.computeBoundingSphere(), + So.copy(e.boundingSphere).applyMatrix4(e.matrixWorld); + else { + var t = e.geometry; + null === t.boundingSphere && t.computeBoundingSphere(), + So.copy(t.boundingSphere).applyMatrix4(e.matrixWorld); + } + return this.intersectsSphere(So); + }, + }, + { + key: "intersectsSprite", + value: function (e) { + return ( + So.center.set(0, 0, 0), + (So.radius = 0.7071067811865476), + So.applyMatrix4(e.matrixWorld), + this.intersectsSphere(So) + ); + }, + }, + { + key: "intersectsSphere", + value: function (e) { + for ( + var t = this.planes, n = e.center, r = -e.radius, i = 0; + i < 6; + i++ + ) { + if (t[i].distanceToPoint(n) < r) return !1; + } + return !0; + }, + }, + { + key: "intersectsBox", + value: function (e) { + for (var t = this.planes, n = 0; n < 6; n++) { + var r = t[n]; + if ( + ((Eo.x = r.normal.x > 0 ? e.max.x : e.min.x), + (Eo.y = r.normal.y > 0 ? e.max.y : e.min.y), + (Eo.z = r.normal.z > 0 ? e.max.z : e.min.z), + r.distanceToPoint(Eo) < 0) + ) + return !1; + } + return !0; + }, + }, + { + key: "containsPoint", + value: function (e) { + for (var t = this.planes, n = 0; n < 6; n++) + if (t[n].distanceToPoint(e) < 0) return !1; + return !0; + }, + }, + { + key: "clone", + value: function () { + return new this.constructor().copy(this); + }, + }, + ]), + e + ); + })(); + function Co() { + var e = null, + t = !1, + n = null, + r = null; + function i(t, a) { + n(t, a), (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 wo(e, t) { + var n = t.isWebGL2, + r = new WeakMap(); + return { + get: function (e) { + return e.isInterleavedBufferAttribute && (e = e.data), r.get(e); + }, + remove: function (t) { + t.isInterleavedBufferAttribute && (t = t.data); + var n = r.get(t); + n && (e.deleteBuffer(n.buffer), r.delete(t)); + }, + update: function (t, i) { + if (t.isGLBufferAttribute) { + var a = r.get(t); + (!a || a.version < t.version) && + r.set(t, { + buffer: t.buffer, + type: t.type, + bytesPerElement: t.elementSize, + version: t.version, + }); + } else { + t.isInterleavedBufferAttribute && (t = t.data); + var o = r.get(t); + void 0 === o + ? r.set( + t, + (function (t, r) { + var i, + a = t.array, + o = t.usage, + s = e.createBuffer(); + if ( + (e.bindBuffer(r, s), + e.bufferData(r, a, o), + t.onUploadCallback(), + a instanceof Float32Array) + ) + i = e.FLOAT; + else if (a instanceof Uint16Array) + if (t.isFloat16BufferAttribute) { + if (!n) + throw new Error( + "THREE.WebGLAttributes: Usage of Float16BufferAttribute requires WebGL2." + ); + i = e.HALF_FLOAT; + } else i = e.UNSIGNED_SHORT; + else if (a instanceof Int16Array) i = e.SHORT; + else if (a instanceof Uint32Array) i = e.UNSIGNED_INT; + else if (a instanceof Int32Array) i = e.INT; + else if (a instanceof Int8Array) i = e.BYTE; + else if (a instanceof Uint8Array) i = e.UNSIGNED_BYTE; + else { + if (!(a instanceof Uint8ClampedArray)) + throw new Error( + "THREE.WebGLAttributes: Unsupported buffer data format: " + + a + ); + i = e.UNSIGNED_BYTE; + } + return { + buffer: s, + type: i, + bytesPerElement: a.BYTES_PER_ELEMENT, + version: t.version, + }; + })(t, i) + ) + : o.version < t.version && + (!(function (t, r, i) { + var a = r.array, + o = r.updateRange; + e.bindBuffer(i, t), + -1 === o.count + ? e.bufferSubData(i, 0, a) + : (n + ? e.bufferSubData( + i, + o.offset * a.BYTES_PER_ELEMENT, + a, + o.offset, + o.count + ) + : e.bufferSubData( + i, + o.offset * a.BYTES_PER_ELEMENT, + a.subarray(o.offset, o.offset + o.count) + ), + (o.count = -1)), + r.onUploadCallback(); + })(o.buffer, t, i), + (o.version = t.version)); + } + }, + }; + } + var To = (function (e) { + (0, d.Z)(n, e); + var t = (0, h.Z)(n); + function n() { + var e, + r = + arguments.length > 0 && void 0 !== arguments[0] + ? arguments[0] + : 1, + i = + arguments.length > 1 && void 0 !== arguments[1] + ? arguments[1] + : 1, + a = + arguments.length > 2 && void 0 !== arguments[2] + ? arguments[2] + : 1, + o = + arguments.length > 3 && void 0 !== arguments[3] + ? arguments[3] + : 1; + (0, m.Z)(this, n), + ((e = t.call(this)).type = "PlaneGeometry"), + (e.parameters = { + width: r, + height: i, + widthSegments: a, + heightSegments: o, + }); + for ( + var s = r / 2, + l = i / 2, + u = Math.floor(a), + c = Math.floor(o), + f = u + 1, + d = c + 1, + h = r / u, + p = i / c, + v = [], + g = [], + A = [], + y = [], + b = 0; + b < d; + b++ + ) + for (var x = b * p - l, S = 0; S < f; S++) { + var E = S * h - s; + g.push(E, -x, 0), + A.push(0, 0, 1), + y.push(S / u), + y.push(1 - b / c); + } + for (var _ = 0; _ < c; _++) + for (var C = 0; C < u; C++) { + var w = C + f * _, + T = C + f * (_ + 1), + M = C + 1 + f * (_ + 1), + I = C + 1 + f * _; + v.push(w, T, I), v.push(T, M, I); + } + return ( + e.setIndex(v), + e.setAttribute("position", new ka(g, 3)), + e.setAttribute("normal", new ka(A, 3)), + e.setAttribute("uv", new ka(y, 2)), + e + ); + } + return ( + (0, g.Z)( + n, + [ + { + key: "copy", + value: function (e) { + return ( + (0, l.Z)((0, u.Z)(n.prototype), "copy", this).call( + this, + e + ), + (this.parameters = Object.assign({}, e.parameters)), + this + ); + }, + }, + ], + [ + { + key: "fromJSON", + value: function (e) { + return new n( + e.width, + e.height, + e.widthSegments, + e.heightSegments + ); + }, + }, + ] + ), + n + ); + })(Na), + Mo = { + 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\tif ( diffuseColor.a < alphaTest ) discard;\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_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", + 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 = dFdx( surf_pos.xyz );\n\t\tvec3 vSigmaY = 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#pragma unroll_loop_start\n\tfor ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) {\n\t\tplane = clippingPlanes[ i ];\n\t\tif ( dot( vClipPosition, plane.xyz ) > plane.w ) discard;\n\t}\n\t#pragma unroll_loop_end\n\t#if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES\n\t\tbool clipped = true;\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) {\n\t\t\tplane = clippingPlanes[ i ];\n\t\t\tclipped = ( dot( vClipPosition, plane.xyz ) > plane.w ) && clipped;\n\t\t}\n\t\t#pragma unroll_loop_end\n\t\tif ( clipped ) discard;\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 )\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 )\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", + 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_v0 0.339\n\t#define cubeUV_m0 - 2.0\n\t#define cubeUV_r1 0.8\n\t#define cubeUV_v1 0.276\n\t#define cubeUV_m1 - 1.0\n\t#define cubeUV_r4 0.4\n\t#define cubeUV_v4 0.046\n\t#define cubeUV_m4 2.0\n\t#define cubeUV_r5 0.305\n\t#define cubeUV_v5 0.016\n\t#define cubeUV_m5 3.0\n\t#define cubeUV_r6 0.21\n\t#define cubeUV_v6 0.0038\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_INSTANCING\n\tmat3 m = mat3( instanceMatrix );\n\ttransformedNormal /= vec3( dot( m[ 0 ], m[ 0 ] ), dot( m[ 1 ], m[ 1 ] ), dot( m[ 2 ], m[ 2 ] ) );\n\ttransformedNormal = m * transformedNormal;\n#endif\ntransformedNormal = normalMatrix * transformedNormal;\n#ifdef FLIP_SIDED\n\ttransformedNormal = - transformedNormal;\n#endif\n#ifdef USE_TANGENT\n\tvec3 transformedTangent = ( modelViewMatrix * vec4( objectTangent, 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, 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\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, 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, 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_fragment: + "#ifdef USE_LIGHTMAP\n\tvec4 lightMapTexel = texture2D( lightMap, vLightMapUv );\n\tvec3 lightMapIrradiance = lightMapTexel.rgb * lightMapIntensity;\n\treflectedLight.indirectDiffuse += lightMapIrradiance;\n#endif", + 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\t#if defined ( LEGACY_LIGHTS )\n\t\tif ( cutoffDistance > 0.0 && decayExponent > 0.0 ) {\n\t\t\treturn pow( saturate( - lightDistance / cutoffDistance + 1.0 ), decayExponent );\n\t\t}\n\t\treturn 1.0;\n\t#else\n\t\tfloat distanceFalloff = 1.0 / max( pow( lightDistance, decayExponent ), 0.01 );\n\t\tif ( cutoffDistance > 0.0 ) {\n\t\t\tdistanceFalloff *= pow2( saturate( 1.0 - pow4( lightDistance / cutoffDistance ) ) );\n\t\t}\n\t\treturn distanceFalloff;\n\t#endif\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_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\tanisotropyV /= material.anisotropy;\n\tmaterial.anisotropy = saturate( material.anisotropy );\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\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 clearcoatSpecular = vec3( 0.0 );\nvec3 sheenSpecular = 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\tclearcoatSpecular += ccIrradiance * BRDF_GGX_Clearcoat( directLight.direction, geometryViewDir, geometryClearcoatNormal, material );\n\t#endif\n\t#ifdef USE_SHEEN\n\t\tsheenSpecular += 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\tclearcoatSpecular += clearcoatRadiance * EnvironmentBRDF( geometryClearcoatNormal, geometryViewDir, material.clearcoatF0, material.clearcoatF90, material.clearcoatRoughness );\n\t#endif\n\t#ifdef USE_SHEEN\n\t\tsheenSpecular += 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;\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 ) && defined( USE_LOGDEPTHBUF_EXT )\n\tgl_FragDepthEXT = vIsPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;\n#endif", + logdepthbuf_pars_fragment: + "#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT )\n\tuniform float logDepthBufFC;\n\tvarying float vFragDepth;\n\tvarying float vIsPerspective;\n#endif", + logdepthbuf_pars_vertex: + "#ifdef USE_LOGDEPTHBUF\n\t#ifdef USE_LOGDEPTHBUF_EXT\n\t\tvarying float vFragDepth;\n\t\tvarying float vIsPerspective;\n\t#else\n\t\tuniform float logDepthBufFC;\n\t#endif\n#endif", + logdepthbuf_vertex: + "#ifdef USE_LOGDEPTHBUF\n\t#ifdef USE_LOGDEPTHBUF_EXT\n\t\tvFragDepth = 1.0 + gl_Position.w;\n\t\tvIsPerspective = float( isPerspectiveMatrix( projectionMatrix ) );\n\t#else\n\t\tif ( isPerspectiveMatrix( projectionMatrix ) ) {\n\t\t\tgl_Position.z = log2( max( EPSILON, gl_Position.w + 1.0 ) ) * logDepthBufFC - 1.0;\n\t\t\tgl_Position.z *= gl_Position.w;\n\t\t}\n\t#endif\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", + morphcolor_vertex: + "#if defined( USE_MORPHCOLORS ) && defined( MORPHTARGETS_TEXTURE )\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\t#ifdef MORPHTARGETS_TEXTURE\n\t\tfor ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n\t\t\tif ( morphTargetInfluences[ i ] != 0.0 ) objectNormal += getMorph( gl_VertexID, i, 1 ).xyz * morphTargetInfluences[ i ];\n\t\t}\n\t#else\n\t\tobjectNormal += morphNormal0 * morphTargetInfluences[ 0 ];\n\t\tobjectNormal += morphNormal1 * morphTargetInfluences[ 1 ];\n\t\tobjectNormal += morphNormal2 * morphTargetInfluences[ 2 ];\n\t\tobjectNormal += morphNormal3 * morphTargetInfluences[ 3 ];\n\t#endif\n#endif", + morphtarget_pars_vertex: + "#ifdef USE_MORPHTARGETS\n\tuniform float morphTargetBaseInfluence;\n\t#ifdef MORPHTARGETS_TEXTURE\n\t\tuniform float morphTargetInfluences[ MORPHTARGETS_COUNT ];\n\t\tuniform sampler2DArray morphTargetsTexture;\n\t\tuniform ivec2 morphTargetsTextureSize;\n\t\tvec4 getMorph( const in int vertexIndex, const in int morphTargetIndex, const in int offset ) {\n\t\t\tint texelIndex = vertexIndex * MORPHTARGETS_TEXTURE_STRIDE + offset;\n\t\t\tint y = texelIndex / morphTargetsTextureSize.x;\n\t\t\tint x = texelIndex - y * morphTargetsTextureSize.x;\n\t\t\tivec3 morphUV = ivec3( x, y, morphTargetIndex );\n\t\t\treturn texelFetch( morphTargetsTexture, morphUV, 0 );\n\t\t}\n\t#else\n\t\t#ifndef USE_MORPHNORMALS\n\t\t\tuniform float morphTargetInfluences[ 8 ];\n\t\t#else\n\t\t\tuniform float morphTargetInfluences[ 4 ];\n\t\t#endif\n\t#endif\n#endif", + morphtarget_vertex: + "#ifdef USE_MORPHTARGETS\n\ttransformed *= morphTargetBaseInfluence;\n\t#ifdef MORPHTARGETS_TEXTURE\n\t\tfor ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n\t\t\tif ( morphTargetInfluences[ i ] != 0.0 ) transformed += getMorph( gl_VertexID, i, 0 ).xyz * morphTargetInfluences[ i ];\n\t\t}\n\t#else\n\t\ttransformed += morphTarget0 * morphTargetInfluences[ 0 ];\n\t\ttransformed += morphTarget1 * morphTargetInfluences[ 1 ];\n\t\ttransformed += morphTarget2 * morphTargetInfluences[ 2 ];\n\t\ttransformed += morphTarget3 * morphTargetInfluences[ 3 ];\n\t\t#ifndef USE_MORPHNORMALS\n\t\t\ttransformed += morphTarget4 * morphTargetInfluences[ 4 ];\n\t\t\ttransformed += morphTarget5 * morphTargetInfluences[ 5 ];\n\t\t\ttransformed += morphTarget6 * morphTargetInfluences[ 6 ];\n\t\t\ttransformed += morphTarget7 * morphTargetInfluences[ 7 ];\n\t\t#endif\n\t#endif\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_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\tvec2 texelSize = vec2( 1.0 ) / ( shadowMapSize * vec2( 4.0, 2.0 ) );\n\t\tvec3 lightToPosition = shadowCoord.xyz;\n\t\tfloat dp = ( length( lightToPosition ) - shadowCameraNear ) / ( shadowCameraFar - shadowCameraNear );\t\tdp += shadowBias;\n\t\tvec3 bd3D = normalize( lightToPosition );\n\t\t#if defined( SHADOWMAP_TYPE_PCF ) || defined( SHADOWMAP_TYPE_PCF_SOFT ) || defined( SHADOWMAP_TYPE_VSM )\n\t\t\tvec2 offset = vec2( - 1, 1 ) * shadowRadius * texelSize.y;\n\t\t\treturn (\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyx, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyx, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxx, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxx, texelSize.y ), dp )\n\t\t\t) * ( 1.0 / 9.0 );\n\t\t#else\n\t\t\treturn texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp );\n\t\t#endif\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\tuniform int boneTextureSize;\n\tmat4 getBoneMatrix( const in float i ) {\n\t\tfloat j = i * 4.0;\n\t\tfloat x = mod( j, float( boneTextureSize ) );\n\t\tfloat y = floor( j / float( boneTextureSize ) );\n\t\tfloat dx = 1.0 / float( boneTextureSize );\n\t\tfloat dy = 1.0 / float( boneTextureSize );\n\t\ty = dy * ( y + 0.5 );\n\t\tvec4 v1 = texture2D( boneTexture, vec2( dx * ( x + 0.5 ), y ) );\n\t\tvec4 v2 = texture2D( boneTexture, vec2( dx * ( x + 1.5 ), y ) );\n\t\tvec4 v3 = texture2D( boneTexture, vec2( dx * ( x + 2.5 ), y ) );\n\t\tvec4 v4 = texture2D( boneTexture, vec2( dx * ( x + 3.5 ), y ) );\n\t\tmat4 bone = mat4( v1, v2, v3, v4 );\n\t\treturn bone;\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}\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.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 ior, const in float thickness,\n\t\tconst in vec3 attenuationColor, const in float attenuationDistance ) {\n\t\tvec3 transmissionRay = getVolumeTransmissionRay( n, v, thickness, ior, modelMatrix );\n\t\tvec3 refractedRayExit = position + transmissionRay;\n\t\tvec4 ndcPos = projMatrix * viewMatrix * vec4( refractedRayExit, 1.0 );\n\t\tvec2 refractionCoords = ndcPos.xy / ndcPos.w;\n\t\trefractionCoords += 1.0;\n\t\trefractionCoords /= 2.0;\n\t\tvec4 transmittedLight = getTransmissionSample( refractionCoords, roughness, ior );\n\t\tvec3 transmittance = diffuseColor * volumeAttenuation( length( transmissionRay ), attenuationColor, attenuationDistance );\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_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 \n\t#include \n}", + backgroundCube_vert: + "varying vec3 vWorldDirection;\n#include \nvoid main() {\n\tvWorldDirection = transformDirection( position, modelMatrix );\n\t#include \n\t#include \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;\nvarying vec3 vWorldDirection;\n#include \nvoid main() {\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tvec4 texColor = textureCube( envMap, vec3( flipEnvMap * vWorldDirection.x, vWorldDirection.yz ) );\n\t#elif defined( ENVMAP_TYPE_CUBE_UV )\n\t\tvec4 texColor = textureCubeUV( envMap, 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 \n\t#include \n}", + cube_vert: + "varying vec3 vWorldDirection;\n#include \nvoid main() {\n\tvWorldDirection = transformDirection( position, modelMatrix );\n\t#include \n\t#include \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 \n\t#include \n}", + depth_vert: + "#include \n#include \n#include \n#include \n#include \n#include \n#include \nvarying vec2 vHighPrecisionZW;\nvoid main() {\n\t#include \n\t#include \n\t#ifdef USE_DISPLACEMENTMAP\n\t\t#include \n\t\t#include \n\t\t#include \n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvHighPrecisionZW = gl_Position.zw;\n}", + depth_frag: + "#if DEPTH_PACKING == 3200\n\tuniform float opacity;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvarying vec2 vHighPrecisionZW;\nvoid main() {\n\t#include \n\tvec4 diffuseColor = vec4( 1.0 );\n\t#if DEPTH_PACKING == 3200\n\t\tdiffuseColor.a = opacity;\n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \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 \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#ifdef USE_DISPLACEMENTMAP\n\t\t#include \n\t\t#include \n\t\t#include \n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvWorldPosition = worldPosition.xyz;\n}", + distanceRGBA_frag: + "#define DISTANCE\nuniform vec3 referencePosition;\nuniform float nearDistance;\nuniform float farDistance;\nvarying vec3 vWorldPosition;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main () {\n\t#include \n\tvec4 diffuseColor = vec4( 1.0 );\n\t#include \n\t#include \n\t#include \n\t#include \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 \nvoid main() {\n\tvWorldDirection = transformDirection( position, modelMatrix );\n\t#include \n\t#include \n}", + equirect_frag: + "uniform sampler2D tEquirect;\nvarying vec3 vWorldDirection;\n#include \nvoid main() {\n\tvec3 direction = normalize( vWorldDirection );\n\tvec2 sampleUV = equirectUv( direction );\n\tgl_FragColor = texture2D( tEquirect, sampleUV );\n\t#include \n\t#include \n}", + linedashed_vert: + "uniform float scale;\nattribute float lineDistance;\nvarying float vLineDistance;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\tvLineDistance = scale * lineDistance;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}", + linedashed_frag: + "uniform vec3 diffuse;\nuniform float opacity;\nuniform float dashSize;\nuniform float totalSize;\nvarying float vLineDistance;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tif ( mod( vLineDistance, totalSize ) > dashSize ) {\n\t\tdiscard;\n\t}\n\tvec3 outgoingLight = vec3( 0.0 );\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \n\t#include \n\t#include \n\toutgoingLight = diffuseColor.rgb;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}", + meshbasic_vert: + "#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#if defined ( USE_ENVMAP ) || defined ( USE_SKINNING )\n\t\t#include \n\t\t#include \n\t\t#include \n\t\t#include \n\t\t#include \n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}", + meshbasic_frag: + "uniform vec3 diffuse;\nuniform float opacity;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \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 \n\treflectedLight.indirectDiffuse *= diffuseColor.rgb;\n\tvec3 outgoingLight = reflectedLight.indirectDiffuse;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}", + meshlambert_vert: + "#define LAMBERT\nvarying vec3 vViewPosition;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvViewPosition = - mvPosition.xyz;\n\t#include \n\t#include \n\t#include \n\t#include \n}", + meshlambert_frag: + "#define LAMBERT\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}", + meshmatcap_vert: + "#define MATCAP\nvarying vec3 vViewPosition;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvViewPosition = - mvPosition.xyz;\n}", + meshmatcap_frag: + "#define MATCAP\nuniform vec3 diffuse;\nuniform float opacity;\nuniform sampler2D matcap;\nvarying vec3 vViewPosition;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \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 \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \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 \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \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 \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\tgl_FragColor = vec4( packNormalToRGB( normal ), opacity );\n\t#ifdef OPAQUE\n\t\tgl_FragColor.a = 1.0;\n\t#endif\n}", + meshphong_vert: + "#define PHONG\nvarying vec3 vViewPosition;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvViewPosition = - mvPosition.xyz;\n\t#include \n\t#include \n\t#include \n\t#include \n}", + meshphong_frag: + "#define PHONG\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform vec3 specular;\nuniform float shininess;\nuniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}", + meshphysical_vert: + "#define STANDARD\nvarying vec3 vViewPosition;\n#ifdef USE_TRANSMISSION\n\tvarying vec3 vWorldPosition;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvViewPosition = - mvPosition.xyz;\n\t#include \n\t#include \n\t#include \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_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 \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvec3 totalDiffuse = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse;\n\tvec3 totalSpecular = reflectedLight.directSpecular + reflectedLight.indirectSpecular;\n\t#include \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 + sheenSpecular;\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 ) + clearcoatSpecular * material.clearcoat;\n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}", + meshtoon_vert: + "#define TOON\nvarying vec3 vViewPosition;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvViewPosition = - mvPosition.xyz;\n\t#include \n\t#include \n\t#include \n}", + meshtoon_frag: + "#define TOON\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}", + points_vert: + "uniform float size;\nuniform float scale;\n#include \n#include \n#include \n#include \n#include \n#include \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 \n\t#include \n\t#include \n\t#include \n\t#include \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 \n\t#include \n\t#include \n\t#include \n}", + points_frag: + "uniform vec3 diffuse;\nuniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec3 outgoingLight = vec3( 0.0 );\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\toutgoingLight = diffuseColor.rgb;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}", + shadow_vert: + "#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}", + shadow_frag: + "uniform vec3 color;\nuniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tgl_FragColor = vec4( color, opacity * ( 1.0 - getShadowMask() ) );\n\t#include \n\t#include \n\t#include \n}", + sprite_vert: + "uniform float rotation;\nuniform vec2 center;\n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \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 \n\t#include \n\t#include \n}", + sprite_frag: + "uniform vec3 diffuse;\nuniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec3 outgoingLight = vec3( 0.0 );\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\toutgoingLight = diffuseColor.rgb;\n\t#include \n\t#include \n\t#include \n\t#include \n}", + }, + Io = { + common: { + diffuse: { value: new fa(16777215) }, + opacity: { value: 1 }, + map: { value: null }, + mapTransform: { value: new hr() }, + alphaMap: { value: null }, + alphaMapTransform: { value: new hr() }, + alphaTest: { value: 0 }, + }, + specularmap: { + specularMap: { value: null }, + specularMapTransform: { value: new hr() }, + }, + envmap: { + envMap: { value: null }, + flipEnvMap: { value: -1 }, + reflectivity: { value: 1 }, + ior: { value: 1.5 }, + refractionRatio: { value: 0.98 }, + }, + aomap: { + aoMap: { value: null }, + aoMapIntensity: { value: 1 }, + aoMapTransform: { value: new hr() }, + }, + lightmap: { + lightMap: { value: null }, + lightMapIntensity: { value: 1 }, + lightMapTransform: { value: new hr() }, + }, + bumpmap: { + bumpMap: { value: null }, + bumpMapTransform: { value: new hr() }, + bumpScale: { value: 1 }, + }, + normalmap: { + normalMap: { value: null }, + normalMapTransform: { value: new hr() }, + normalScale: { value: new dr(1, 1) }, + }, + displacementmap: { + displacementMap: { value: null }, + displacementMapTransform: { value: new hr() }, + displacementScale: { value: 1 }, + displacementBias: { value: 0 }, + }, + emissivemap: { + emissiveMap: { value: null }, + emissiveMapTransform: { value: new hr() }, + }, + metalnessmap: { + metalnessMap: { value: null }, + metalnessMapTransform: { value: new hr() }, + }, + roughnessmap: { + roughnessMap: { value: null }, + roughnessMapTransform: { value: new hr() }, + }, + gradientmap: { gradientMap: { value: null } }, + fog: { + fogDensity: { value: 25e-5 }, + fogNear: { value: 1 }, + fogFar: { value: 2e3 }, + fogColor: { value: new fa(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 fa(16777215) }, + opacity: { value: 1 }, + size: { value: 1 }, + scale: { value: 1 }, + map: { value: null }, + alphaMap: { value: null }, + alphaMapTransform: { value: new hr() }, + alphaTest: { value: 0 }, + uvTransform: { value: new hr() }, + }, + sprite: { + diffuse: { value: new fa(16777215) }, + opacity: { value: 1 }, + center: { value: new dr(0.5, 0.5) }, + rotation: { value: 0 }, + map: { value: null }, + mapTransform: { value: new hr() }, + alphaMap: { value: null }, + alphaMapTransform: { value: new hr() }, + alphaTest: { value: 0 }, + }, + }, + ko = { + basic: { + uniforms: so([ + Io.common, + Io.specularmap, + Io.envmap, + Io.aomap, + Io.lightmap, + Io.fog, + ]), + vertexShader: Mo.meshbasic_vert, + fragmentShader: Mo.meshbasic_frag, + }, + lambert: { + uniforms: so([ + Io.common, + Io.specularmap, + Io.envmap, + Io.aomap, + Io.lightmap, + Io.emissivemap, + Io.bumpmap, + Io.normalmap, + Io.displacementmap, + Io.fog, + Io.lights, + { emissive: { value: new fa(0) } }, + ]), + vertexShader: Mo.meshlambert_vert, + fragmentShader: Mo.meshlambert_frag, + }, + phong: { + uniforms: so([ + Io.common, + Io.specularmap, + Io.envmap, + Io.aomap, + Io.lightmap, + Io.emissivemap, + Io.bumpmap, + Io.normalmap, + Io.displacementmap, + Io.fog, + Io.lights, + { + emissive: { value: new fa(0) }, + specular: { value: new fa(1118481) }, + shininess: { value: 30 }, + }, + ]), + vertexShader: Mo.meshphong_vert, + fragmentShader: Mo.meshphong_frag, + }, + standard: { + uniforms: so([ + Io.common, + Io.envmap, + Io.aomap, + Io.lightmap, + Io.emissivemap, + Io.bumpmap, + Io.normalmap, + Io.displacementmap, + Io.roughnessmap, + Io.metalnessmap, + Io.fog, + Io.lights, + { + emissive: { value: new fa(0) }, + roughness: { value: 1 }, + metalness: { value: 0 }, + envMapIntensity: { value: 1 }, + }, + ]), + vertexShader: Mo.meshphysical_vert, + fragmentShader: Mo.meshphysical_frag, + }, + toon: { + uniforms: so([ + Io.common, + Io.aomap, + Io.lightmap, + Io.emissivemap, + Io.bumpmap, + Io.normalmap, + Io.displacementmap, + Io.gradientmap, + Io.fog, + Io.lights, + { emissive: { value: new fa(0) } }, + ]), + vertexShader: Mo.meshtoon_vert, + fragmentShader: Mo.meshtoon_frag, + }, + matcap: { + uniforms: so([ + Io.common, + Io.bumpmap, + Io.normalmap, + Io.displacementmap, + Io.fog, + { matcap: { value: null } }, + ]), + vertexShader: Mo.meshmatcap_vert, + fragmentShader: Mo.meshmatcap_frag, + }, + points: { + uniforms: so([Io.points, Io.fog]), + vertexShader: Mo.points_vert, + fragmentShader: Mo.points_frag, + }, + dashed: { + uniforms: so([ + Io.common, + Io.fog, + { + scale: { value: 1 }, + dashSize: { value: 1 }, + totalSize: { value: 2 }, + }, + ]), + vertexShader: Mo.linedashed_vert, + fragmentShader: Mo.linedashed_frag, + }, + depth: { + uniforms: so([Io.common, Io.displacementmap]), + vertexShader: Mo.depth_vert, + fragmentShader: Mo.depth_frag, + }, + normal: { + uniforms: so([ + Io.common, + Io.bumpmap, + Io.normalmap, + Io.displacementmap, + { opacity: { value: 1 } }, + ]), + vertexShader: Mo.meshnormal_vert, + fragmentShader: Mo.meshnormal_frag, + }, + sprite: { + uniforms: so([Io.sprite, Io.fog]), + vertexShader: Mo.sprite_vert, + fragmentShader: Mo.sprite_frag, + }, + background: { + uniforms: { + uvTransform: { value: new hr() }, + t2D: { value: null }, + backgroundIntensity: { value: 1 }, + }, + vertexShader: Mo.background_vert, + fragmentShader: Mo.background_frag, + }, + backgroundCube: { + uniforms: { + envMap: { value: null }, + flipEnvMap: { value: -1 }, + backgroundBlurriness: { value: 0 }, + backgroundIntensity: { value: 1 }, + }, + vertexShader: Mo.backgroundCube_vert, + fragmentShader: Mo.backgroundCube_frag, + }, + cube: { + uniforms: { + tCube: { value: null }, + tFlip: { value: -1 }, + opacity: { value: 1 }, + }, + vertexShader: Mo.cube_vert, + fragmentShader: Mo.cube_frag, + }, + equirect: { + uniforms: { tEquirect: { value: null } }, + vertexShader: Mo.equirect_vert, + fragmentShader: Mo.equirect_frag, + }, + distanceRGBA: { + uniforms: so([ + Io.common, + Io.displacementmap, + { + referencePosition: { value: new Vr() }, + nearDistance: { value: 1 }, + farDistance: { value: 1e3 }, + }, + ]), + vertexShader: Mo.distanceRGBA_vert, + fragmentShader: Mo.distanceRGBA_frag, + }, + shadow: { + uniforms: so([ + Io.lights, + Io.fog, + { color: { value: new fa(0) }, opacity: { value: 1 } }, + ]), + vertexShader: Mo.shadow_vert, + fragmentShader: Mo.shadow_frag, + }, + }; + ko.physical = { + uniforms: so([ + ko.standard.uniforms, + { + clearcoat: { value: 0 }, + clearcoatMap: { value: null }, + clearcoatMapTransform: { value: new hr() }, + clearcoatNormalMap: { value: null }, + clearcoatNormalMapTransform: { value: new hr() }, + clearcoatNormalScale: { value: new dr(1, 1) }, + clearcoatRoughness: { value: 0 }, + clearcoatRoughnessMap: { value: null }, + clearcoatRoughnessMapTransform: { value: new hr() }, + iridescence: { value: 0 }, + iridescenceMap: { value: null }, + iridescenceMapTransform: { value: new hr() }, + iridescenceIOR: { value: 1.3 }, + iridescenceThicknessMinimum: { value: 100 }, + iridescenceThicknessMaximum: { value: 400 }, + iridescenceThicknessMap: { value: null }, + iridescenceThicknessMapTransform: { value: new hr() }, + sheen: { value: 0 }, + sheenColor: { value: new fa(0) }, + sheenColorMap: { value: null }, + sheenColorMapTransform: { value: new hr() }, + sheenRoughness: { value: 1 }, + sheenRoughnessMap: { value: null }, + sheenRoughnessMapTransform: { value: new hr() }, + transmission: { value: 0 }, + transmissionMap: { value: null }, + transmissionMapTransform: { value: new hr() }, + transmissionSamplerSize: { value: new dr() }, + transmissionSamplerMap: { value: null }, + thickness: { value: 0 }, + thicknessMap: { value: null }, + thicknessMapTransform: { value: new hr() }, + attenuationDistance: { value: 0 }, + attenuationColor: { value: new fa(0) }, + specularColor: { value: new fa(1, 1, 1) }, + specularColorMap: { value: null }, + specularColorMapTransform: { value: new hr() }, + specularIntensity: { value: 1 }, + specularIntensityMap: { value: null }, + specularIntensityMapTransform: { value: new hr() }, + anisotropyVector: { value: new dr() }, + anisotropyMap: { value: null }, + anisotropyMapTransform: { value: new hr() }, + }, + ]), + vertexShader: Mo.meshphysical_vert, + fragmentShader: Mo.meshphysical_frag, + }; + var Ro = { r: 0, b: 0, g: 0 }; + function Bo(e, t, n, r, i, a, o) { + var s, + l, + u = new fa(0), + c = !0 === a ? 0 : 1, + f = null, + d = 0, + h = null; + function p(t, n) { + t.getRGB(Ro, lo(e)), + r.buffers.color.setClear(Ro.r, Ro.g, Ro.b, n, o); + } + return { + getClearColor: function () { + return u; + }, + setClearColor: function (e) { + var t = + arguments.length > 1 && void 0 !== arguments[1] + ? arguments[1] + : 1; + u.set(e), p(u, (c = t)); + }, + getClearAlpha: function () { + return c; + }, + setClearAlpha: function (e) { + p(u, (c = e)); + }, + render: function (a, v) { + var m = !1, + g = !0 === v.isScene ? v.background : null; + g && + g.isTexture && + (g = (v.backgroundBlurriness > 0 ? n : t).get(g)), + null === g ? p(u, c) : g && g.isColor && (p(g, 1), (m = !0)); + var A = e.xr.getEnvironmentBlendMode(); + "additive" === A + ? r.buffers.color.setClear(0, 0, 0, 1, o) + : "alpha-blend" === A && + r.buffers.color.setClear(0, 0, 0, 0, o), + (e.autoClear || m) && + e.clear( + e.autoClearColor, + e.autoClearDepth, + e.autoClearStencil + ), + g && (g.isCubeTexture || g.mapping === Ee) + ? (void 0 === l && + ((l = new ro( + new ao(1, 1, 1), + new co({ + name: "BackgroundCubeMaterial", + uniforms: oo(ko.backgroundCube.uniforms), + vertexShader: ko.backgroundCube.vertexShader, + fragmentShader: ko.backgroundCube.fragmentShader, + side: k, + depthTest: !1, + depthWrite: !1, + fog: !1, + }) + )).geometry.deleteAttribute("normal"), + l.geometry.deleteAttribute("uv"), + (l.onBeforeRender = function (e, t, n) { + this.matrixWorld.copyPosition(n.matrixWorld); + }), + Object.defineProperty(l.material, "envMap", { + get: function () { + return this.uniforms.envMap.value; + }, + }), + i.update(l)), + (l.material.uniforms.envMap.value = g), + (l.material.uniforms.flipEnvMap.value = + g.isCubeTexture && !1 === g.isRenderTargetTexture + ? -1 + : 1), + (l.material.uniforms.backgroundBlurriness.value = + v.backgroundBlurriness), + (l.material.uniforms.backgroundIntensity.value = + v.backgroundIntensity), + (l.material.toneMapped = + Tr.getTransfer(g.colorSpace) !== cn), + (f === g && d === g.version && h === e.toneMapping) || + ((l.material.needsUpdate = !0), + (f = g), + (d = g.version), + (h = e.toneMapping)), + l.layers.enableAll(), + a.unshift(l, l.geometry, l.material, 0, 0, null)) + : g && + g.isTexture && + (void 0 === s && + ((s = new ro( + new To(2, 2), + new co({ + name: "BackgroundMaterial", + uniforms: oo(ko.background.uniforms), + vertexShader: ko.background.vertexShader, + fragmentShader: ko.background.fragmentShader, + side: I, + depthTest: !1, + depthWrite: !1, + fog: !1, + }) + )).geometry.deleteAttribute("normal"), + Object.defineProperty(s.material, "map", { + get: function () { + return this.uniforms.t2D.value; + }, + }), + i.update(s)), + (s.material.uniforms.t2D.value = g), + (s.material.uniforms.backgroundIntensity.value = + v.backgroundIntensity), + (s.material.toneMapped = + Tr.getTransfer(g.colorSpace) !== cn), + !0 === g.matrixAutoUpdate && g.updateMatrix(), + s.material.uniforms.uvTransform.value.copy(g.matrix), + (f === g && d === g.version && h === e.toneMapping) || + ((s.material.needsUpdate = !0), + (f = g), + (d = g.version), + (h = e.toneMapping)), + s.layers.enableAll(), + a.unshift(s, s.geometry, s.material, 0, 0, null)); + }, + }; + } + function Po(e, t, n, r) { + var i = e.getParameter(e.MAX_VERTEX_ATTRIBS), + a = r.isWebGL2 ? null : t.get("OES_vertex_array_object"), + o = r.isWebGL2 || null !== a, + s = {}, + l = h(null), + u = l, + c = !1; + function f(t) { + return r.isWebGL2 ? e.bindVertexArray(t) : a.bindVertexArrayOES(t); + } + function d(t) { + return r.isWebGL2 + ? e.deleteVertexArray(t) + : a.deleteVertexArrayOES(t); + } + function h(e) { + for (var t = [], n = [], r = [], a = 0; a < i; a++) + (t[a] = 0), (n[a] = 0), (r[a] = 0); + return { + geometry: null, + program: null, + wireframe: !1, + newAttributes: t, + enabledAttributes: n, + attributeDivisors: r, + object: e, + attributes: {}, + index: null, + }; + } + function p() { + for (var e = u.newAttributes, t = 0, n = e.length; t < n; t++) + e[t] = 0; + } + function v(e) { + m(e, 0); + } + function m(n, i) { + var a = u.newAttributes, + o = u.enabledAttributes, + s = u.attributeDivisors; + ((a[n] = 1), + 0 === o[n] && (e.enableVertexAttribArray(n), (o[n] = 1)), + s[n] !== i) && + ((r.isWebGL2 ? e : t.get("ANGLE_instanced_arrays"))[ + r.isWebGL2 ? "vertexAttribDivisor" : "vertexAttribDivisorANGLE" + ](n, i), + (s[n] = i)); + } + function g() { + for ( + var t = u.newAttributes, + n = u.enabledAttributes, + r = 0, + i = n.length; + r < i; + r++ + ) + n[r] !== t[r] && (e.disableVertexAttribArray(r), (n[r] = 0)); + } + function A(t, n, r, i, a, o, s) { + !0 === s + ? e.vertexAttribIPointer(t, n, r, a, o) + : e.vertexAttribPointer(t, n, r, i, a, o); + } + function y() { + b(), (c = !0), u !== l && f((u = l).object); + } + function b() { + (l.geometry = null), (l.program = null), (l.wireframe = !1); + } + return { + setup: function (i, l, d, y, b) { + var x = !1; + if (o) { + var S = (function (t, n, i) { + var o = !0 === i.wireframe, + l = s[t.id]; + void 0 === l && ((l = {}), (s[t.id] = l)); + var u = l[n.id]; + void 0 === u && ((u = {}), (l[n.id] = u)); + var c = u[o]; + void 0 === c && + ((c = h( + r.isWebGL2 + ? e.createVertexArray() + : a.createVertexArrayOES() + )), + (u[o] = c)); + return c; + })(y, d, l); + u !== S && f((u = S).object), + (x = (function (e, t, n, r) { + var i = u.attributes, + a = t.attributes, + o = 0, + s = n.getAttributes(); + for (var l in s) { + if (s[l].location >= 0) { + var c = i[l], + f = a[l]; + if ( + (void 0 === f && + ("instanceMatrix" === l && + e.instanceMatrix && + (f = e.instanceMatrix), + "instanceColor" === l && + e.instanceColor && + (f = e.instanceColor)), + void 0 === c) + ) + return !0; + if (c.attribute !== f) return !0; + if (f && c.data !== f.data) return !0; + o++; + } + } + return u.attributesNum !== o || u.index !== r; + })(i, y, d, b)), + x && + (function (e, t, n, r) { + var i = {}, + a = t.attributes, + o = 0, + s = n.getAttributes(); + for (var l in s) { + if (s[l].location >= 0) { + var c = a[l]; + void 0 === c && + ("instanceMatrix" === l && + e.instanceMatrix && + (c = e.instanceMatrix), + "instanceColor" === l && + e.instanceColor && + (c = e.instanceColor)); + var f = {}; + (f.attribute = c), + c && c.data && (f.data = c.data), + (i[l] = f), + o++; + } + } + (u.attributes = i), (u.attributesNum = o), (u.index = r); + })(i, y, d, b); + } else { + var E = !0 === l.wireframe; + (u.geometry === y.id && + u.program === d.id && + u.wireframe === E) || + ((u.geometry = y.id), + (u.program = d.id), + (u.wireframe = E), + (x = !0)); + } + null !== b && n.update(b, e.ELEMENT_ARRAY_BUFFER), + (x || c) && + ((c = !1), + (function (i, a, o, s) { + if ( + !1 === r.isWebGL2 && + (i.isInstancedMesh || s.isInstancedBufferGeometry) && + null === t.get("ANGLE_instanced_arrays") + ) + return; + p(); + var l = s.attributes, + u = o.getAttributes(), + c = a.defaultAttributeValues; + for (var f in u) { + var d = u[f]; + if (d.location >= 0) { + var h = l[f]; + if ( + (void 0 === h && + ("instanceMatrix" === f && + i.instanceMatrix && + (h = i.instanceMatrix), + "instanceColor" === f && + i.instanceColor && + (h = i.instanceColor)), + void 0 !== h) + ) { + var y = h.normalized, + b = h.itemSize, + x = n.get(h); + if (void 0 === x) continue; + var S = x.buffer, + E = x.type, + _ = x.bytesPerElement, + C = + !0 === r.isWebGL2 && + (E === e.INT || + E === e.UNSIGNED_INT || + h.gpuType === Ze); + if (h.isInterleavedBufferAttribute) { + var w = h.data, + T = w.stride, + M = h.offset; + if (w.isInstancedInterleavedBuffer) { + for (var I = 0; I < d.locationSize; I++) + m(d.location + I, w.meshPerAttribute); + !0 !== i.isInstancedMesh && + void 0 === s._maxInstanceCount && + (s._maxInstanceCount = + w.meshPerAttribute * w.count); + } else + for (var k = 0; k < d.locationSize; k++) + v(d.location + k); + e.bindBuffer(e.ARRAY_BUFFER, S); + for (var R = 0; R < d.locationSize; R++) + A( + d.location + R, + b / d.locationSize, + E, + y, + T * _, + (M + (b / d.locationSize) * R) * _, + C + ); + } else { + if (h.isInstancedBufferAttribute) { + for (var B = 0; B < d.locationSize; B++) + m(d.location + B, h.meshPerAttribute); + !0 !== i.isInstancedMesh && + void 0 === s._maxInstanceCount && + (s._maxInstanceCount = + h.meshPerAttribute * h.count); + } else + for (var P = 0; P < d.locationSize; P++) + v(d.location + P); + e.bindBuffer(e.ARRAY_BUFFER, S); + for (var L = 0; L < d.locationSize; L++) + A( + d.location + L, + b / d.locationSize, + E, + y, + b * _, + (b / d.locationSize) * L * _, + C + ); + } + } else if (void 0 !== c) { + var D = c[f]; + if (void 0 !== D) + switch (D.length) { + case 2: + e.vertexAttrib2fv(d.location, D); + break; + case 3: + e.vertexAttrib3fv(d.location, D); + break; + case 4: + e.vertexAttrib4fv(d.location, D); + break; + default: + e.vertexAttrib1fv(d.location, D); + } + } + } + } + g(); + })(i, l, d, y), + null !== b && + e.bindBuffer(e.ELEMENT_ARRAY_BUFFER, n.get(b).buffer)); + }, + reset: y, + resetDefaultState: b, + dispose: function () { + for (var e in (y(), s)) { + var t = s[e]; + for (var n in t) { + var r = t[n]; + for (var i in r) d(r[i].object), delete r[i]; + delete t[n]; + } + delete s[e]; + } + }, + releaseStatesOfGeometry: function (e) { + if (void 0 !== s[e.id]) { + var t = s[e.id]; + for (var n in t) { + var r = t[n]; + for (var i in r) d(r[i].object), delete r[i]; + delete t[n]; + } + delete s[e.id]; + } + }, + releaseStatesOfProgram: function (e) { + for (var t in s) { + var n = s[t]; + if (void 0 !== n[e.id]) { + var r = n[e.id]; + for (var i in r) d(r[i].object), delete r[i]; + delete n[e.id]; + } + } + }, + initAttributes: p, + enableAttribute: v, + disableUnusedAttributes: g, + }; + } + function Lo(e, t, n, r) { + var i, + a = r.isWebGL2; + (this.setMode = function (e) { + i = e; + }), + (this.render = function (t, r) { + e.drawArrays(i, t, r), n.update(r, i, 1); + }), + (this.renderInstances = function (r, o, s) { + if (0 !== s) { + var l, u; + if (a) (l = e), (u = "drawArraysInstanced"); + else if ( + ((u = "drawArraysInstancedANGLE"), + null === (l = t.get("ANGLE_instanced_arrays"))) + ) + return void console.error( + "THREE.WebGLBufferRenderer: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays." + ); + l[u](i, r, o, s), n.update(o, i, s); + } + }); + } + function Do(e, t, n) { + var r; + function i(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"; + } + var a = + "undefined" !== typeof WebGL2RenderingContext && + "WebGL2RenderingContext" === e.constructor.name, + o = void 0 !== n.precision ? n.precision : "highp", + s = i(o); + s !== o && + (console.warn( + "THREE.WebGLRenderer:", + o, + "not supported, using", + s, + "instead." + ), + (o = s)); + var l = a || t.has("WEBGL_draw_buffers"), + u = !0 === n.logarithmicDepthBuffer, + c = e.getParameter(e.MAX_TEXTURE_IMAGE_UNITS), + f = e.getParameter(e.MAX_VERTEX_TEXTURE_IMAGE_UNITS), + d = e.getParameter(e.MAX_TEXTURE_SIZE), + h = e.getParameter(e.MAX_CUBE_MAP_TEXTURE_SIZE), + p = e.getParameter(e.MAX_VERTEX_ATTRIBS), + v = e.getParameter(e.MAX_VERTEX_UNIFORM_VECTORS), + m = e.getParameter(e.MAX_VARYING_VECTORS), + g = e.getParameter(e.MAX_FRAGMENT_UNIFORM_VECTORS), + A = f > 0, + y = a || t.has("OES_texture_float"); + return { + isWebGL2: a, + drawBuffers: l, + getMaxAnisotropy: function () { + if (void 0 !== r) return r; + if (!0 === t.has("EXT_texture_filter_anisotropic")) { + var n = t.get("EXT_texture_filter_anisotropic"); + r = e.getParameter(n.MAX_TEXTURE_MAX_ANISOTROPY_EXT); + } else r = 0; + return r; + }, + getMaxPrecision: i, + precision: o, + logarithmicDepthBuffer: u, + maxTextures: c, + maxVertexTextures: f, + maxTextureSize: d, + maxCubemapSize: h, + maxAttributes: p, + maxVertexUniforms: v, + maxVaryings: m, + maxFragmentUniforms: g, + vertexTextures: A, + floatFragmentTextures: y, + floatVertexTextures: A && y, + maxSamples: a ? e.getParameter(e.MAX_SAMPLES) : 0, + }; + } + function Uo(e) { + var t = this, + n = null, + r = 0, + i = !1, + a = !1, + o = new xo(), + s = new hr(), + l = { value: null, needsUpdate: !1 }; + function u(e, n, r, i) { + var a = null !== e ? e.length : 0, + u = null; + if (0 !== a) { + if (((u = l.value), !0 !== i || null === u)) { + var c = r + 4 * a, + f = n.matrixWorldInverse; + s.getNormalMatrix(f), + (null === u || u.length < c) && (u = new Float32Array(c)); + for (var d = 0, h = r; d !== a; ++d, h += 4) + o.copy(e[d]).applyMatrix4(f, s), + o.normal.toArray(u, h), + (u[h + 3] = o.constant); + } + (l.value = u), (l.needsUpdate = !0); + } + return (t.numPlanes = a), (t.numIntersection = 0), u; + } + (this.uniform = l), + (this.numPlanes = 0), + (this.numIntersection = 0), + (this.init = function (e, t) { + var n = 0 !== e.length || t || 0 !== r || i; + return (i = t), (r = e.length), n; + }), + (this.beginShadows = function () { + (a = !0), u(null); + }), + (this.endShadows = function () { + a = !1; + }), + (this.setGlobalState = function (e, t) { + n = u(e, t, 0); + }), + (this.setState = function (o, s, c) { + var f = o.clippingPlanes, + d = o.clipIntersection, + h = o.clipShadows, + p = e.get(o); + if (!i || null === f || 0 === f.length || (a && !h)) + a + ? u(null) + : (function () { + l.value !== n && ((l.value = n), (l.needsUpdate = r > 0)); + (t.numPlanes = r), (t.numIntersection = 0); + })(); + else { + var v = a ? 0 : r, + m = 4 * v, + g = p.clippingState || null; + (l.value = g), (g = u(f, s, m, c)); + for (var A = 0; A !== m; ++A) g[A] = n[A]; + (p.clippingState = g), + (this.numIntersection = d ? this.numPlanes : 0), + (this.numPlanes += v); + } + }); + } + function Fo(e) { + var t = new WeakMap(); + function n(e, t) { + return ( + t === xe ? (e.mapping = ye) : t === Se && (e.mapping = be), e + ); + } + function r(e) { + var n = e.target; + n.removeEventListener("dispose", r); + var i = t.get(n); + void 0 !== i && (t.delete(n), i.dispose()); + } + return { + get: function (i) { + if (i && i.isTexture && !1 === i.isRenderTargetTexture) { + var a = i.mapping; + if (a === xe || a === Se) { + if (t.has(i)) return n(t.get(i).texture, i.mapping); + var o = i.image; + if (o && o.height > 0) { + var s = new go(o.height / 2); + return ( + s.fromEquirectangularTexture(e, i), + t.set(i, s), + i.addEventListener("dispose", r), + n(s.texture, i.mapping) + ); + } + return null; + } + } + return i; + }, + dispose: function () { + t = new WeakMap(); + }, + }; + } + var Oo = (function (e) { + (0, d.Z)(n, e); + var t = (0, h.Z)(n); + function n() { + var e, + r = + arguments.length > 0 && void 0 !== arguments[0] + ? arguments[0] + : -1, + i = + arguments.length > 1 && void 0 !== arguments[1] + ? arguments[1] + : 1, + a = + arguments.length > 2 && void 0 !== arguments[2] + ? arguments[2] + : 1, + o = + arguments.length > 3 && void 0 !== arguments[3] + ? arguments[3] + : -1, + s = + arguments.length > 4 && void 0 !== arguments[4] + ? arguments[4] + : 0.1, + l = + arguments.length > 5 && void 0 !== arguments[5] + ? arguments[5] + : 2e3; + return ( + (0, m.Z)(this, n), + ((e = t.call(this)).isOrthographicCamera = !0), + (e.type = "OrthographicCamera"), + (e.zoom = 1), + (e.view = null), + (e.left = r), + (e.right = i), + (e.top = a), + (e.bottom = o), + (e.near = s), + (e.far = l), + e.updateProjectionMatrix(), + e + ); + } + return ( + (0, g.Z)(n, [ + { + key: "copy", + value: function (e, t) { + return ( + (0, l.Z)((0, u.Z)(n.prototype), "copy", this).call( + this, + 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 + ); + }, + }, + { + key: "setViewOffset", + value: function (e, t, n, r, i, a) { + 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 = a), + this.updateProjectionMatrix(); + }, + }, + { + key: "clearViewOffset", + value: function () { + null !== this.view && (this.view.enabled = !1), + this.updateProjectionMatrix(); + }, + }, + { + key: "updateProjectionMatrix", + value: function () { + var 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, + i = n - e, + a = n + e, + o = r + t, + s = r - t; + if (null !== this.view && this.view.enabled) { + var l = + (this.right - this.left) / + this.view.fullWidth / + this.zoom, + u = + (this.top - this.bottom) / + this.view.fullHeight / + this.zoom; + (a = (i += l * this.view.offsetX) + l * this.view.width), + (s = + (o -= u * this.view.offsetY) - u * this.view.height); + } + this.projectionMatrix.makeOrthographic( + i, + a, + o, + s, + this.near, + this.far, + this.coordinateSystem + ), + this.projectionMatrixInverse + .copy(this.projectionMatrix) + .invert(); + }, + }, + { + key: "toJSON", + value: function (e) { + var t = (0, l.Z)( + (0, u.Z)(n.prototype), + "toJSON", + this + ).call(this, 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 + ); + }, + }, + ]), + n + ); + })(fo), + No = [0.125, 0.215, 0.35, 0.446, 0.526, 0.582], + Go = 20, + Zo = new Oo(), + zo = new fa(), + Qo = null, + Ho = (1 + Math.sqrt(5)) / 2, + Vo = 1 / Ho, + jo = [ + new Vr(1, 1, 1), + new Vr(-1, 1, 1), + new Vr(1, 1, -1), + new Vr(-1, 1, -1), + new Vr(0, Ho, Vo), + new Vr(0, Ho, -Vo), + new Vr(Vo, 0, Ho), + new Vr(-Vo, 0, Ho), + new Vr(Ho, Vo, 0), + new Vr(-Ho, Vo, 0), + ], + Wo = (function () { + function e(t) { + (0, m.Z)(this, e), + (this._renderer = t), + (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); + } + return ( + (0, g.Z)(e, [ + { + key: "fromScene", + value: function (e) { + var t = + arguments.length > 1 && void 0 !== arguments[1] + ? arguments[1] + : 0, + n = + arguments.length > 2 && void 0 !== arguments[2] + ? arguments[2] + : 0.1, + r = + arguments.length > 3 && void 0 !== arguments[3] + ? arguments[3] + : 100; + (Qo = this._renderer.getRenderTarget()), this._setSize(256); + var 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 + ); + }, + }, + { + key: "fromEquirectangular", + value: function (e) { + var t = + arguments.length > 1 && void 0 !== arguments[1] + ? arguments[1] + : null; + return this._fromTexture(e, t); + }, + }, + { + key: "fromCubemap", + value: function (e) { + var t = + arguments.length > 1 && void 0 !== arguments[1] + ? arguments[1] + : null; + return this._fromTexture(e, t); + }, + }, + { + key: "compileCubemapShader", + value: function () { + null === this._cubemapMaterial && + ((this._cubemapMaterial = Jo()), + this._compileMaterial(this._cubemapMaterial)); + }, + }, + { + key: "compileEquirectangularShader", + value: function () { + null === this._equirectMaterial && + ((this._equirectMaterial = qo()), + this._compileMaterial(this._equirectMaterial)); + }, + }, + { + key: "dispose", + value: function () { + this._dispose(), + null !== this._cubemapMaterial && + this._cubemapMaterial.dispose(), + null !== this._equirectMaterial && + this._equirectMaterial.dispose(); + }, + }, + { + key: "_setSize", + value: function (e) { + (this._lodMax = Math.floor(Math.log2(e))), + (this._cubeSize = Math.pow(2, this._lodMax)); + }, + }, + { + key: "_dispose", + value: function () { + null !== this._blurMaterial && this._blurMaterial.dispose(), + null !== this._pingPongRenderTarget && + this._pingPongRenderTarget.dispose(); + for (var e = 0; e < this._lodPlanes.length; e++) + this._lodPlanes[e].dispose(); + }, + }, + { + key: "_cleanup", + value: function (e) { + this._renderer.setRenderTarget(Qo), + (e.scissorTest = !1), + Yo(e, 0, 0, e.width, e.height); + }, + }, + { + key: "_fromTexture", + value: function (e, t) { + e.mapping === ye || e.mapping === be + ? this._setSize( + 0 === e.image.length + ? 16 + : e.image[0].width || e.image[0].image.width + ) + : this._setSize(e.image.width / 4), + (Qo = this._renderer.getRenderTarget()); + var n = t || this._allocateTargets(); + return ( + this._textureToCubeUV(e, n), + this._applyPMREM(n), + this._cleanup(n), + n + ); + }, + }, + { + key: "_allocateTargets", + value: function () { + var e = 3 * Math.max(this._cubeSize, 112), + t = 4 * this._cubeSize, + n = { + magFilter: Be, + minFilter: Be, + generateMipmaps: !1, + type: He, + format: Ye, + colorSpace: on, + depthBuffer: !1, + }, + r = Xo(e, t, n); + if ( + null === this._pingPongRenderTarget || + this._pingPongRenderTarget.width !== e || + this._pingPongRenderTarget.height !== t + ) { + null !== this._pingPongRenderTarget && this._dispose(), + (this._pingPongRenderTarget = Xo(e, t, n)); + var i = this._lodMax, + a = (function (e) { + for ( + var t = [], + n = [], + r = [], + i = e, + a = e - 4 + 1 + No.length, + o = 0; + o < a; + o++ + ) { + var s = Math.pow(2, i); + n.push(s); + var l = 1 / s; + o > e - 4 + ? (l = No[o - e + 4 - 1]) + : 0 === o && (l = 0), + r.push(l); + for ( + var u = 1 / (s - 2), + c = -u, + f = 1 + u, + d = [c, c, f, c, f, f, c, c, f, f, c, f], + h = 6, + p = 6, + v = 3, + m = 2, + g = 1, + A = new Float32Array(v * p * h), + y = new Float32Array(m * p * h), + b = new Float32Array(g * p * h), + x = 0; + x < h; + x++ + ) { + var S = ((x % 3) * 2) / 3 - 1, + E = x > 2 ? 0 : -1, + _ = [ + S, + E, + 0, + S + 2 / 3, + E, + 0, + S + 2 / 3, + E + 1, + 0, + S, + E, + 0, + S + 2 / 3, + E + 1, + 0, + S, + E + 1, + 0, + ]; + A.set(_, v * p * x), y.set(d, m * p * x); + var C = [x, x, x, x, x, x]; + b.set(C, g * p * x); + } + var w = new Na(); + w.setAttribute("position", new xa(A, v)), + w.setAttribute("uv", new xa(y, m)), + w.setAttribute("faceIndex", new xa(b, g)), + t.push(w), + i > 4 && i--; + } + return { lodPlanes: t, sizeLods: n, sigmas: r }; + })(i); + (this._sizeLods = a.sizeLods), + (this._lodPlanes = a.lodPlanes), + (this._sigmas = a.sigmas), + (this._blurMaterial = (function (e, t, n) { + var r = new Float32Array(Go), + i = new Vr(0, 1, 0), + a = new co({ + name: "SphericalGaussianBlur", + defines: { + n: Go, + 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 \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: P, + depthTest: !1, + depthWrite: !1, + }); + return a; + })(i, e, t)); + } + return r; + }, + }, + { + key: "_compileMaterial", + value: function (e) { + var t = new ro(this._lodPlanes[0], e); + this._renderer.compile(t, Zo); + }, + }, + { + key: "_sceneToCubeUV", + value: function (e, t, n, r) { + var i = new ho(90, 1, t, n), + a = [1, -1, 1, 1, 1, 1], + o = [1, 1, 1, -1, -1, -1], + s = this._renderer, + l = s.autoClear, + u = s.toneMapping; + s.getClearColor(zo), + (s.toneMapping = de), + (s.autoClear = !1); + var c = new ha({ + name: "PMREM.Background", + side: k, + depthWrite: !1, + depthTest: !1, + }), + f = new ro(new ao(), c), + d = !1, + h = e.background; + h + ? h.isColor && + (c.color.copy(h), (e.background = null), (d = !0)) + : (c.color.copy(zo), (d = !0)); + for (var p = 0; p < 6; p++) { + var v = p % 3; + 0 === v + ? (i.up.set(0, a[p], 0), i.lookAt(o[p], 0, 0)) + : 1 === v + ? (i.up.set(0, 0, a[p]), i.lookAt(0, o[p], 0)) + : (i.up.set(0, a[p], 0), i.lookAt(0, 0, o[p])); + var m = this._cubeSize; + Yo(r, v * m, p > 2 ? m : 0, m, m), + s.setRenderTarget(r), + d && s.render(f, i), + s.render(e, i); + } + f.geometry.dispose(), + f.material.dispose(), + (s.toneMapping = u), + (s.autoClear = l), + (e.background = h); + }, + }, + { + key: "_textureToCubeUV", + value: function (e, t) { + var n = this._renderer, + r = e.mapping === ye || e.mapping === be; + r + ? (null === this._cubemapMaterial && + (this._cubemapMaterial = Jo()), + (this._cubemapMaterial.uniforms.flipEnvMap.value = + !1 === e.isRenderTargetTexture ? -1 : 1)) + : null === this._equirectMaterial && + (this._equirectMaterial = qo()); + var i = r ? this._cubemapMaterial : this._equirectMaterial, + a = new ro(this._lodPlanes[0], i); + i.uniforms.envMap.value = e; + var o = this._cubeSize; + Yo(t, 0, 0, 3 * o, 2 * o), + n.setRenderTarget(t), + n.render(a, Zo); + }, + }, + { + key: "_applyPMREM", + value: function (e) { + var t = this._renderer, + n = t.autoClear; + t.autoClear = !1; + for (var r = 1; r < this._lodPlanes.length; r++) { + var i = Math.sqrt( + this._sigmas[r] * this._sigmas[r] - + this._sigmas[r - 1] * this._sigmas[r - 1] + ), + a = jo[(r - 1) % jo.length]; + this._blur(e, r - 1, r, i, a); + } + t.autoClear = n; + }, + }, + { + key: "_blur", + value: function (e, t, n, r, i) { + var a = this._pingPongRenderTarget; + this._halfBlur(e, a, t, n, r, "latitudinal", i), + this._halfBlur(a, e, n, n, r, "longitudinal", i); + }, + }, + { + key: "_halfBlur", + value: function (e, t, n, r, i, a, o) { + var s = this._renderer, + l = this._blurMaterial; + "latitudinal" !== a && + "longitudinal" !== a && + console.error( + "blur direction must be either latitudinal or longitudinal!" + ); + var u = new ro(this._lodPlanes[r], l), + c = l.uniforms, + f = this._sizeLods[n] - 1, + d = isFinite(i) ? Math.PI / (2 * f) : (2 * Math.PI) / 39, + h = i / d, + p = isFinite(i) ? 1 + Math.floor(3 * h) : Go; + p > Go && + console.warn( + "sigmaRadians, " + .concat( + i, + ", is too large and will clip, as it requested " + ) + .concat(p, " samples when the maximum is set to ") + .concat(Go) + ); + for (var v = [], m = 0, g = 0; g < Go; ++g) { + var A = g / h, + y = Math.exp((-A * A) / 2); + v.push(y), 0 === g ? (m += y) : g < p && (m += 2 * y); + } + for (var b = 0; b < v.length; b++) v[b] = v[b] / m; + (c.envMap.value = e.texture), + (c.samples.value = p), + (c.weights.value = v), + (c.latitudinal.value = "latitudinal" === a), + o && (c.poleAxis.value = o); + var x = this._lodMax; + (c.dTheta.value = d), (c.mipInt.value = x - n); + var S = this._sizeLods[r]; + Yo( + t, + 3 * S * (r > x - 4 ? r - x + 4 : 0), + 4 * (this._cubeSize - S), + 3 * S, + 2 * S + ), + s.setRenderTarget(t), + s.render(u, Zo); + }, + }, + ]), + e + ); + })(); + function Xo(e, t, n) { + var r = new Or(e, t, n); + return ( + (r.texture.mapping = Ee), + (r.texture.name = "PMREM.cubeUv"), + (r.scissorTest = !0), + r + ); + } + function Yo(e, t, n, r, i) { + e.viewport.set(t, n, r, i), e.scissor.set(t, n, r, i); + } + function qo() { + return new co({ + 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 \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: P, + depthTest: !1, + depthWrite: !1, + }); + } + function Jo() { + return new co({ + 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: P, + depthTest: !1, + depthWrite: !1, + }); + } + function Ko(e) { + var t = new WeakMap(), + n = null; + function r(e) { + var n = e.target; + n.removeEventListener("dispose", r); + var i = t.get(n); + void 0 !== i && (t.delete(n), i.dispose()); + } + return { + get: function (i) { + if (i && i.isTexture) { + var a = i.mapping, + o = a === xe || a === Se, + s = a === ye || a === be; + if (o || s) { + if (i.isRenderTargetTexture && !0 === i.needsPMREMUpdate) { + i.needsPMREMUpdate = !1; + var l = t.get(i); + return ( + null === n && (n = new Wo(e)), + (l = o + ? n.fromEquirectangular(i, l) + : n.fromCubemap(i, l)), + t.set(i, l), + l.texture + ); + } + if (t.has(i)) return t.get(i).texture; + var u = i.image; + if ( + (o && u && u.height > 0) || + (s && + u && + (function (e) { + for (var t = 0, n = 6, r = 0; r < n; r++) + void 0 !== e[r] && t++; + return t === n; + })(u)) + ) { + null === n && (n = new Wo(e)); + var c = o ? n.fromEquirectangular(i) : n.fromCubemap(i); + return ( + t.set(i, c), i.addEventListener("dispose", r), c.texture + ); + } + return null; + } + } + return i; + }, + dispose: function () { + (t = new WeakMap()), null !== n && (n.dispose(), (n = null)); + }, + }; + } + function $o(e) { + var t = {}; + function n(n) { + if (void 0 !== t[n]) return t[n]; + var 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 (e) { + e.isWebGL2 + ? n("EXT_color_buffer_float") + : (n("WEBGL_depth_texture"), + n("OES_texture_float"), + n("OES_texture_half_float"), + n("OES_texture_half_float_linear"), + n("OES_standard_derivatives"), + n("OES_element_index_uint"), + n("OES_vertex_array_object"), + n("ANGLE_instanced_arrays")), + n("OES_texture_float_linear"), + n("EXT_color_buffer_half_float"), + n("WEBGL_multisampled_render_to_texture"); + }, + get: function (e) { + var t = n(e); + return ( + null === t && + console.warn( + "THREE.WebGLRenderer: " + e + " extension not supported." + ), + t + ); + }, + }; + } + function es(e, t, n, r) { + var i = {}, + a = new WeakMap(); + function o(e) { + var s = e.target; + for (var l in (null !== s.index && t.remove(s.index), s.attributes)) + t.remove(s.attributes[l]); + for (var u in s.morphAttributes) + for ( + var c = s.morphAttributes[u], f = 0, d = c.length; + f < d; + f++ + ) + t.remove(c[f]); + s.removeEventListener("dispose", o), delete i[s.id]; + var h = a.get(s); + h && (t.remove(h), a.delete(s)), + r.releaseStatesOfGeometry(s), + !0 === s.isInstancedBufferGeometry && delete s._maxInstanceCount, + n.memory.geometries--; + } + function s(e) { + var n = [], + r = e.index, + i = e.attributes.position, + o = 0; + if (null !== r) { + var s = r.array; + o = r.version; + for (var l = 0, u = s.length; l < u; l += 3) { + var c = s[l + 0], + f = s[l + 1], + d = s[l + 2]; + n.push(c, f, f, d, d, c); + } + } else { + if (void 0 === i) return; + var h = i.array; + o = i.version; + for (var p = 0, v = h.length / 3 - 1; p < v; p += 3) { + var m = p + 0, + g = p + 1, + A = p + 2; + n.push(m, g, g, A, A, m); + } + } + var y = new (vr(n) ? Ma : wa)(n, 1); + y.version = o; + var b = a.get(e); + b && t.remove(b), a.set(e, y); + } + return { + get: function (e, t) { + return ( + !0 === i[t.id] || + (t.addEventListener("dispose", o), + (i[t.id] = !0), + n.memory.geometries++), + t + ); + }, + update: function (n) { + var r = n.attributes; + for (var i in r) t.update(r[i], e.ARRAY_BUFFER); + var a = n.morphAttributes; + for (var o in a) + for (var s = a[o], l = 0, u = s.length; l < u; l++) + t.update(s[l], e.ARRAY_BUFFER); + }, + getWireframeAttribute: function (e) { + var t = a.get(e); + if (t) { + var n = e.index; + null !== n && t.version < n.version && s(e); + } else s(e); + return a.get(e); + }, + }; + } + function ts(e, t, n, r) { + var i, + a, + o, + s = r.isWebGL2; + (this.setMode = function (e) { + i = e; + }), + (this.setIndex = function (e) { + (a = e.type), (o = e.bytesPerElement); + }), + (this.render = function (t, r) { + e.drawElements(i, r, a, t * o), n.update(r, i, 1); + }), + (this.renderInstances = function (r, l, u) { + if (0 !== u) { + var c, f; + if (s) (c = e), (f = "drawElementsInstanced"); + else if ( + ((f = "drawElementsInstancedANGLE"), + null === (c = t.get("ANGLE_instanced_arrays"))) + ) + return void console.error( + "THREE.WebGLIndexedBufferRenderer: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays." + ); + c[f](i, l, a, r * o, u), n.update(l, i, u); + } + }); + } + function ns(e) { + var 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 rs(e, t) { + return e[0] - t[0]; + } + function is(e, t) { + return Math.abs(t[1]) - Math.abs(e[1]); + } + function as(e, t, n) { + for ( + var r = {}, + i = new Float32Array(8), + a = new WeakMap(), + o = new Ur(), + s = [], + l = 0; + l < 8; + l++ + ) + s[l] = [l, 0]; + return { + update: function (l, u, c) { + var f = l.morphTargetInfluences; + if (!0 === t.isWebGL2) { + var d = + u.morphAttributes.position || + u.morphAttributes.normal || + u.morphAttributes.color, + h = void 0 !== d ? d.length : 0, + p = a.get(u); + if (void 0 === p || p.count !== h) { + void 0 !== p && p.texture.dispose(); + var v = void 0 !== u.morphAttributes.position, + m = void 0 !== u.morphAttributes.normal, + g = void 0 !== u.morphAttributes.color, + A = u.morphAttributes.position || [], + y = u.morphAttributes.normal || [], + b = u.morphAttributes.color || [], + x = 0; + !0 === v && (x = 1), !0 === m && (x = 2), !0 === g && (x = 3); + var S = u.attributes.position.count * x, + E = 1; + S > t.maxTextureSize && + ((E = Math.ceil(S / t.maxTextureSize)), + (S = t.maxTextureSize)); + var _ = new Float32Array(S * E * 4 * h), + C = new Nr(_, S, E, h); + (C.type = Qe), (C.needsUpdate = !0); + for (var w = 4 * x, T = 0; T < h; T++) + for ( + var M = A[T], + I = y[T], + k = b[T], + R = S * E * 4 * T, + B = 0; + B < M.count; + B++ + ) { + var P = B * w; + !0 === v && + (o.fromBufferAttribute(M, B), + (_[R + P + 0] = o.x), + (_[R + P + 1] = o.y), + (_[R + P + 2] = o.z), + (_[R + P + 3] = 0)), + !0 === m && + (o.fromBufferAttribute(I, B), + (_[R + P + 4] = o.x), + (_[R + P + 5] = o.y), + (_[R + P + 6] = o.z), + (_[R + P + 7] = 0)), + !0 === g && + (o.fromBufferAttribute(k, B), + (_[R + P + 8] = o.x), + (_[R + P + 9] = o.y), + (_[R + P + 10] = o.z), + (_[R + P + 11] = 4 === k.itemSize ? o.w : 1)); + } + (p = { count: h, texture: C, size: new dr(S, E) }), + a.set(u, p), + u.addEventListener("dispose", function e() { + C.dispose(), + a.delete(u), + u.removeEventListener("dispose", e); + }); + } + for (var L = 0, D = 0; D < f.length; D++) L += f[D]; + var U = u.morphTargetsRelative ? 1 : 1 - L; + c.getUniforms().setValue(e, "morphTargetBaseInfluence", U), + c.getUniforms().setValue(e, "morphTargetInfluences", f), + c + .getUniforms() + .setValue(e, "morphTargetsTexture", p.texture, n), + c + .getUniforms() + .setValue(e, "morphTargetsTextureSize", p.size); + } else { + var F = void 0 === f ? 0 : f.length, + O = r[u.id]; + if (void 0 === O || O.length !== F) { + O = []; + for (var N = 0; N < F; N++) O[N] = [N, 0]; + r[u.id] = O; + } + for (var G = 0; G < F; G++) { + var Z = O[G]; + (Z[0] = G), (Z[1] = f[G]); + } + O.sort(is); + for (var z = 0; z < 8; z++) + z < F && O[z][1] + ? ((s[z][0] = O[z][0]), (s[z][1] = O[z][1])) + : ((s[z][0] = Number.MAX_SAFE_INTEGER), (s[z][1] = 0)); + s.sort(rs); + for ( + var Q = u.morphAttributes.position, + H = u.morphAttributes.normal, + V = 0, + j = 0; + j < 8; + j++ + ) { + var W = s[j], + X = W[0], + Y = W[1]; + X !== Number.MAX_SAFE_INTEGER && Y + ? (Q && + u.getAttribute("morphTarget" + j) !== Q[X] && + u.setAttribute("morphTarget" + j, Q[X]), + H && + u.getAttribute("morphNormal" + j) !== H[X] && + u.setAttribute("morphNormal" + j, H[X]), + (i[j] = Y), + (V += Y)) + : (Q && + !0 === u.hasAttribute("morphTarget" + j) && + u.deleteAttribute("morphTarget" + j), + H && + !0 === u.hasAttribute("morphNormal" + j) && + u.deleteAttribute("morphNormal" + j), + (i[j] = 0)); + } + var q = u.morphTargetsRelative ? 1 : 1 - V; + c.getUniforms().setValue(e, "morphTargetBaseInfluence", q), + c.getUniforms().setValue(e, "morphTargetInfluences", i); + } + }, + }; + } + function os(e, t, n, r) { + var i = new WeakMap(); + function a(e) { + var t = e.target; + t.removeEventListener("dispose", a), + n.remove(t.instanceMatrix), + null !== t.instanceColor && n.remove(t.instanceColor); + } + return { + update: function (o) { + var s = r.render.frame, + l = o.geometry, + u = t.get(o, l); + if ( + (i.get(u) !== s && (t.update(u), i.set(u, s)), + o.isInstancedMesh && + (!1 === o.hasEventListener("dispose", a) && + o.addEventListener("dispose", a), + i.get(o) !== s && + (n.update(o.instanceMatrix, e.ARRAY_BUFFER), + null !== o.instanceColor && + n.update(o.instanceColor, e.ARRAY_BUFFER), + i.set(o, s))), + o.isSkinnedMesh) + ) { + var c = o.skeleton; + i.get(c) !== s && (c.update(), i.set(c, s)); + } + return u; + }, + dispose: function () { + i = new WeakMap(); + }, + }; + } + var ss = new Dr(), + ls = new Nr(), + us = new Zr(), + cs = new mo(), + fs = [], + ds = [], + hs = new Float32Array(16), + ps = new Float32Array(9), + vs = new Float32Array(4); + function ms(e, t, n) { + var r = e[0]; + if (r <= 0 || r > 0) return e; + var i = t * n, + a = fs[i]; + if ( + (void 0 === a && ((a = new Float32Array(i)), (fs[i] = a)), 0 !== t) + ) { + r.toArray(a, 0); + for (var o = 1, s = 0; o !== t; ++o) (s += n), e[o].toArray(a, s); + } + return a; + } + function gs(e, t) { + if (e.length !== t.length) return !1; + for (var n = 0, r = e.length; n < r; n++) + if (e[n] !== t[n]) return !1; + return !0; + } + function As(e, t) { + for (var n = 0, r = t.length; n < r; n++) e[n] = t[n]; + } + function ys(e, t) { + var n = ds[t]; + void 0 === n && ((n = new Int32Array(t)), (ds[t] = n)); + for (var r = 0; r !== t; ++r) n[r] = e.allocateTextureUnit(); + return n; + } + function bs(e, t) { + var n = this.cache; + n[0] !== t && (e.uniform1f(this.addr, t), (n[0] = t)); + } + function xs(e, t) { + var 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 (gs(n, t)) return; + e.uniform2fv(this.addr, t), As(n, t); + } + } + function Ss(e, t) { + var 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 (gs(n, t)) return; + e.uniform3fv(this.addr, t), As(n, t); + } + } + function Es(e, t) { + var 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 (gs(n, t)) return; + e.uniform4fv(this.addr, t), As(n, t); + } + } + function _s(e, t) { + var n = this.cache, + r = t.elements; + if (void 0 === r) { + if (gs(n, t)) return; + e.uniformMatrix2fv(this.addr, !1, t), As(n, t); + } else { + if (gs(n, r)) return; + vs.set(r), e.uniformMatrix2fv(this.addr, !1, vs), As(n, r); + } + } + function Cs(e, t) { + var n = this.cache, + r = t.elements; + if (void 0 === r) { + if (gs(n, t)) return; + e.uniformMatrix3fv(this.addr, !1, t), As(n, t); + } else { + if (gs(n, r)) return; + ps.set(r), e.uniformMatrix3fv(this.addr, !1, ps), As(n, r); + } + } + function ws(e, t) { + var n = this.cache, + r = t.elements; + if (void 0 === r) { + if (gs(n, t)) return; + e.uniformMatrix4fv(this.addr, !1, t), As(n, t); + } else { + if (gs(n, r)) return; + hs.set(r), e.uniformMatrix4fv(this.addr, !1, hs), As(n, r); + } + } + function Ts(e, t) { + var n = this.cache; + n[0] !== t && (e.uniform1i(this.addr, t), (n[0] = t)); + } + function Ms(e, t) { + var 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 (gs(n, t)) return; + e.uniform2iv(this.addr, t), As(n, t); + } + } + function Is(e, t) { + var 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 (gs(n, t)) return; + e.uniform3iv(this.addr, t), As(n, t); + } + } + function ks(e, t) { + var 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 (gs(n, t)) return; + e.uniform4iv(this.addr, t), As(n, t); + } + } + function Rs(e, t) { + var n = this.cache; + n[0] !== t && (e.uniform1ui(this.addr, t), (n[0] = t)); + } + function Bs(e, t) { + var 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 (gs(n, t)) return; + e.uniform2uiv(this.addr, t), As(n, t); + } + } + function Ps(e, t) { + var 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 (gs(n, t)) return; + e.uniform3uiv(this.addr, t), As(n, t); + } + } + function Ls(e, t) { + var 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 (gs(n, t)) return; + e.uniform4uiv(this.addr, t), As(n, t); + } + } + function Ds(e, t, n) { + var r = this.cache, + i = n.allocateTextureUnit(); + r[0] !== i && (e.uniform1i(this.addr, i), (r[0] = i)), + n.setTexture2D(t || ss, i); + } + function Us(e, t, n) { + var r = this.cache, + i = n.allocateTextureUnit(); + r[0] !== i && (e.uniform1i(this.addr, i), (r[0] = i)), + n.setTexture3D(t || us, i); + } + function Fs(e, t, n) { + var r = this.cache, + i = n.allocateTextureUnit(); + r[0] !== i && (e.uniform1i(this.addr, i), (r[0] = i)), + n.setTextureCube(t || cs, i); + } + function Os(e, t, n) { + var r = this.cache, + i = n.allocateTextureUnit(); + r[0] !== i && (e.uniform1i(this.addr, i), (r[0] = i)), + n.setTexture2DArray(t || ls, i); + } + function Ns(e, t) { + e.uniform1fv(this.addr, t); + } + function Gs(e, t) { + var n = ms(t, this.size, 2); + e.uniform2fv(this.addr, n); + } + function Zs(e, t) { + var n = ms(t, this.size, 3); + e.uniform3fv(this.addr, n); + } + function zs(e, t) { + var n = ms(t, this.size, 4); + e.uniform4fv(this.addr, n); + } + function Qs(e, t) { + var n = ms(t, this.size, 4); + e.uniformMatrix2fv(this.addr, !1, n); + } + function Hs(e, t) { + var n = ms(t, this.size, 9); + e.uniformMatrix3fv(this.addr, !1, n); + } + function Vs(e, t) { + var n = ms(t, this.size, 16); + e.uniformMatrix4fv(this.addr, !1, n); + } + function js(e, t) { + e.uniform1iv(this.addr, t); + } + function Ws(e, t) { + e.uniform2iv(this.addr, t); + } + function Xs(e, t) { + e.uniform3iv(this.addr, t); + } + function Ys(e, t) { + e.uniform4iv(this.addr, t); + } + function qs(e, t) { + e.uniform1uiv(this.addr, t); + } + function Js(e, t) { + e.uniform2uiv(this.addr, t); + } + function Ks(e, t) { + e.uniform3uiv(this.addr, t); + } + function $s(e, t) { + e.uniform4uiv(this.addr, t); + } + function el(e, t, n) { + var r = this.cache, + i = t.length, + a = ys(n, i); + gs(r, a) || (e.uniform1iv(this.addr, a), As(r, a)); + for (var o = 0; o !== i; ++o) n.setTexture2D(t[o] || ss, a[o]); + } + function tl(e, t, n) { + var r = this.cache, + i = t.length, + a = ys(n, i); + gs(r, a) || (e.uniform1iv(this.addr, a), As(r, a)); + for (var o = 0; o !== i; ++o) n.setTexture3D(t[o] || us, a[o]); + } + function nl(e, t, n) { + var r = this.cache, + i = t.length, + a = ys(n, i); + gs(r, a) || (e.uniform1iv(this.addr, a), As(r, a)); + for (var o = 0; o !== i; ++o) n.setTextureCube(t[o] || cs, a[o]); + } + function rl(e, t, n) { + var r = this.cache, + i = t.length, + a = ys(n, i); + gs(r, a) || (e.uniform1iv(this.addr, a), As(r, a)); + for (var o = 0; o !== i; ++o) n.setTexture2DArray(t[o] || ls, a[o]); + } + var il = (0, g.Z)(function e(t, n, r) { + (0, m.Z)(this, e), + (this.id = t), + (this.addr = r), + (this.cache = []), + (this.setValue = (function (e) { + switch (e) { + case 5126: + return bs; + case 35664: + return xs; + case 35665: + return Ss; + case 35666: + return Es; + case 35674: + return _s; + case 35675: + return Cs; + case 35676: + return ws; + case 5124: + case 35670: + return Ts; + case 35667: + case 35671: + return Ms; + case 35668: + case 35672: + return Is; + case 35669: + case 35673: + return ks; + case 5125: + return Rs; + case 36294: + return Bs; + case 36295: + return Ps; + case 36296: + return Ls; + case 35678: + case 36198: + case 36298: + case 36306: + case 35682: + return Ds; + case 35679: + case 36299: + case 36307: + return Us; + case 35680: + case 36300: + case 36308: + case 36293: + return Fs; + case 36289: + case 36303: + case 36311: + case 36292: + return Os; + } + })(n.type)); + }), + al = (0, g.Z)(function e(t, n, r) { + (0, m.Z)(this, e), + (this.id = t), + (this.addr = r), + (this.cache = []), + (this.size = n.size), + (this.setValue = (function (e) { + switch (e) { + case 5126: + return Ns; + case 35664: + return Gs; + case 35665: + return Zs; + case 35666: + return zs; + case 35674: + return Qs; + case 35675: + return Hs; + case 35676: + return Vs; + case 5124: + case 35670: + return js; + case 35667: + case 35671: + return Ws; + case 35668: + case 35672: + return Xs; + case 35669: + case 35673: + return Ys; + case 5125: + return qs; + case 36294: + return Js; + case 36295: + return Ks; + case 36296: + return $s; + case 35678: + case 36198: + case 36298: + case 36306: + case 35682: + return el; + case 35679: + case 36299: + case 36307: + return tl; + case 35680: + case 36300: + case 36308: + case 36293: + return nl; + case 36289: + case 36303: + case 36311: + case 36292: + return rl; + } + })(n.type)); + }), + ol = (function () { + function e(t) { + (0, m.Z)(this, e), + (this.id = t), + (this.seq = []), + (this.map = {}); + } + return ( + (0, g.Z)(e, [ + { + key: "setValue", + value: function (e, t, n) { + for (var r = this.seq, i = 0, a = r.length; i !== a; ++i) { + var o = r[i]; + o.setValue(e, t[o.id], n); + } + }, + }, + ]), + e + ); + })(), + sl = /(\w+)(\])?(\[|\.)?/g; + function ll(e, t) { + e.seq.push(t), (e.map[t.id] = t); + } + function ul(e, t, n) { + var r = e.name, + i = r.length; + for (sl.lastIndex = 0; ; ) { + var a = sl.exec(r), + o = sl.lastIndex, + s = a[1], + l = "]" === a[2], + u = a[3]; + if ((l && (s |= 0), void 0 === u || ("[" === u && o + 2 === i))) { + ll(n, void 0 === u ? new il(s, e, t) : new al(s, e, t)); + break; + } + var c = n.map[s]; + void 0 === c && ll(n, (c = new ol(s))), (n = c); + } + } + var cl = (function () { + function e(t, n) { + (0, m.Z)(this, e), (this.seq = []), (this.map = {}); + for ( + var r = t.getProgramParameter(n, t.ACTIVE_UNIFORMS), i = 0; + i < r; + ++i + ) { + var a = t.getActiveUniform(n, i); + ul(a, t.getUniformLocation(n, a.name), this); + } + } + return ( + (0, g.Z)( + e, + [ + { + key: "setValue", + value: function (e, t, n, r) { + var i = this.map[t]; + void 0 !== i && i.setValue(e, n, r); + }, + }, + { + key: "setOptional", + value: function (e, t, n) { + var r = t[n]; + void 0 !== r && this.setValue(e, n, r); + }, + }, + ], + [ + { + key: "upload", + value: function (e, t, n, r) { + for (var i = 0, a = t.length; i !== a; ++i) { + var o = t[i], + s = n[o.id]; + !1 !== s.needsUpdate && o.setValue(e, s.value, r); + } + }, + }, + { + key: "seqWithValue", + value: function (e, t) { + for (var n = [], r = 0, i = e.length; r !== i; ++r) { + var a = e[r]; + a.id in t && n.push(a); + } + return n; + }, + }, + ] + ), + e + ); + })(); + function fl(e, t, n) { + var r = e.createShader(t); + return e.shaderSource(r, n), e.compileShader(r), r; + } + var dl = 0; + function hl(e, t, n) { + var r = e.getShaderParameter(t, e.COMPILE_STATUS), + i = e.getShaderInfoLog(t).trim(); + if (r && "" === i) return ""; + var a = /ERROR: 0:(\d+)/.exec(i); + if (a) { + var o = parseInt(a[1]); + return ( + n.toUpperCase() + + "\n\n" + + i + + "\n\n" + + (function (e, t) { + for ( + var n = e.split("\n"), + r = [], + i = Math.max(t - 6, 0), + a = Math.min(t + 6, n.length), + o = i; + o < a; + o++ + ) { + var s = o + 1; + r.push( + "" + .concat(s === t ? ">" : " ", " ") + .concat(s, ": ") + .concat(n[o]) + ); + } + return r.join("\n"); + })(e.getShaderSource(t), o) + ); + } + return i; + } + function pl(e, t) { + var n = (function (e) { + var t, + n = Tr.getPrimaries(Tr.workingColorSpace), + r = Tr.getPrimaries(e); + switch ( + (n === r + ? (t = "") + : n === dn && r === fn + ? (t = "LinearDisplayP3ToLinearSRGB") + : n === fn && r === dn && (t = "LinearSRGBToLinearDisplayP3"), + e) + ) { + case on: + case ln: + return [t, "LinearTransferOETF"]; + case an: + case sn: + return [t, "sRGBTransferOETF"]; + default: + return ( + console.warn( + "THREE.WebGLProgram: Unsupported color space:", + e + ), + [t, "LinearTransferOETF"] + ); + } + })(t); + return "vec4 " + .concat(e, "( vec4 value ) { return ") + .concat(n[0], "( ") + .concat(n[1], "( value ) ); }"); + } + function vl(e, t) { + var n; + switch (t) { + case he: + n = "Linear"; + break; + case pe: + n = "Reinhard"; + break; + case ve: + n = "OptimizedCineon"; + break; + case me: + n = "ACESFilmic"; + break; + case ge: + n = "Custom"; + break; + default: + console.warn("THREE.WebGLProgram: Unsupported toneMapping:", t), + (n = "Linear"); + } + return ( + "vec3 " + + e + + "( vec3 color ) { return " + + n + + "ToneMapping( color ); }" + ); + } + function ml(e) { + return "" !== e; + } + function gl(e, t) { + var 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 Al(e, t) { + return e + .replace(/NUM_CLIPPING_PLANES/g, t.numClippingPlanes) + .replace( + /UNION_CLIPPING_PLANES/g, + t.numClippingPlanes - t.numClipIntersection + ); + } + var yl = /^[ \t]*#include +<([\w\d./]+)>/gm; + function bl(e) { + return e.replace(yl, Sl); + } + var xl = new Map([ + ["encodings_fragment", "colorspace_fragment"], + ["encodings_pars_fragment", "colorspace_pars_fragment"], + ["output_fragment", "opaque_fragment"], + ]); + function Sl(e, t) { + var n = Mo[t]; + if (void 0 === n) { + var r = xl.get(t); + if (void 0 === r) + throw new Error("Can not resolve #include <" + t + ">"); + (n = Mo[r]), + console.warn( + 'THREE.WebGLRenderer: Shader chunk "%s" has been deprecated. Use "%s" instead.', + t, + r + ); + } + return bl(n); + } + var El = + /#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 _l(e) { + return e.replace(El, Cl); + } + function Cl(e, t, n, r) { + for (var i = "", a = parseInt(t); a < parseInt(n); a++) + i += r + .replace(/\[\s*i\s*\]/g, "[ " + a + " ]") + .replace(/UNROLLED_LOOP_INDEX/g, a); + return i; + } + function wl(e) { + var t = + "precision " + + e.precision + + " float;\nprecision " + + e.precision + + " int;"; + 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 Tl(e, t, n, r) { + var i, + a, + o = e.getContext(), + s = n.defines, + l = n.vertexShader, + u = n.fragmentShader, + c = (function (e) { + var t = "SHADOWMAP_TYPE_BASIC"; + return ( + e.shadowMapType === w + ? (t = "SHADOWMAP_TYPE_PCF") + : e.shadowMapType === T + ? (t = "SHADOWMAP_TYPE_PCF_SOFT") + : e.shadowMapType === M && (t = "SHADOWMAP_TYPE_VSM"), + t + ); + })(n), + f = (function (e) { + var t = "ENVMAP_TYPE_CUBE"; + if (e.envMap) + switch (e.envMapMode) { + case ye: + case be: + t = "ENVMAP_TYPE_CUBE"; + break; + case Ee: + t = "ENVMAP_TYPE_CUBE_UV"; + } + return t; + })(n), + d = (function (e) { + var t = "ENVMAP_MODE_REFLECTION"; + e.envMap && e.envMapMode === be && (t = "ENVMAP_MODE_REFRACTION"); + return t; + })(n), + h = (function (e) { + var t = "ENVMAP_BLENDING_NONE"; + if (e.envMap) + switch (e.combine) { + case ue: + t = "ENVMAP_BLENDING_MULTIPLY"; + break; + case ce: + t = "ENVMAP_BLENDING_MIX"; + break; + case fe: + t = "ENVMAP_BLENDING_ADD"; + } + return t; + })(n), + p = (function (e) { + var t = e.envMapCubeUVHeight; + if (null === t) return null; + var n = Math.log2(t) - 2, + r = 1 / t; + return { + texelWidth: 1 / (3 * Math.max(Math.pow(2, n), 112)), + texelHeight: r, + maxMip: n, + }; + })(n), + v = n.isWebGL2 + ? "" + : (function (e) { + return [ + e.extensionDerivatives || + e.envMapCubeUVHeight || + e.bumpMap || + e.normalMapTangentSpace || + e.clearcoatNormalMap || + e.flatShading || + "physical" === e.shaderID + ? "#extension GL_OES_standard_derivatives : enable" + : "", + (e.extensionFragDepth || e.logarithmicDepthBuffer) && + e.rendererExtensionFragDepth + ? "#extension GL_EXT_frag_depth : enable" + : "", + e.extensionDrawBuffers && e.rendererExtensionDrawBuffers + ? "#extension GL_EXT_draw_buffers : require" + : "", + (e.extensionShaderTextureLOD || + e.envMap || + e.transmission) && + e.rendererExtensionShaderTextureLod + ? "#extension GL_EXT_shader_texture_lod : enable" + : "", + ] + .filter(ml) + .join("\n"); + })(n), + m = (function (e) { + var t = []; + for (var n in e) { + var r = e[n]; + !1 !== r && t.push("#define " + n + " " + r); + } + return t.join("\n"); + })(s), + g = o.createProgram(), + A = n.glslVersion ? "#version " + n.glslVersion + "\n" : ""; + n.isRawShaderMaterial + ? ((i = [ + "#define SHADER_TYPE " + n.shaderType, + "#define SHADER_NAME " + n.shaderName, + m, + ] + .filter(ml) + .join("\n")).length > 0 && (i += "\n"), + (a = [ + v, + "#define SHADER_TYPE " + n.shaderType, + "#define SHADER_NAME " + n.shaderName, + m, + ] + .filter(ml) + .join("\n")).length > 0 && (a += "\n")) + : ((i = [ + wl(n), + "#define SHADER_TYPE " + n.shaderType, + "#define SHADER_NAME " + n.shaderName, + m, + n.instancing ? "#define USE_INSTANCING" : "", + n.instancingColor ? "#define USE_INSTANCING_COLOR" : "", + 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 " + d : "", + 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 && n.isWebGL2 ? "#define USE_MORPHCOLORS" : "", + n.morphTargetsCount > 0 && n.isWebGL2 + ? "#define MORPHTARGETS_TEXTURE" + : "", + n.morphTargetsCount > 0 && n.isWebGL2 + ? "#define MORPHTARGETS_TEXTURE_STRIDE " + + n.morphTextureStride + : "", + n.morphTargetsCount > 0 && n.isWebGL2 + ? "#define MORPHTARGETS_COUNT " + n.morphTargetsCount + : "", + n.doubleSided ? "#define DOUBLE_SIDED" : "", + n.flipSided ? "#define FLIP_SIDED" : "", + n.shadowMapEnabled ? "#define USE_SHADOWMAP" : "", + n.shadowMapEnabled ? "#define " + c : "", + n.sizeAttenuation ? "#define USE_SIZEATTENUATION" : "", + n.numLightProbes > 0 ? "#define USE_LIGHT_PROBES" : "", + n.useLegacyLights ? "#define LEGACY_LIGHTS" : "", + n.logarithmicDepthBuffer ? "#define USE_LOGDEPTHBUF" : "", + n.logarithmicDepthBuffer && n.rendererExtensionFragDepth + ? "#define USE_LOGDEPTHBUF_EXT" + : "", + "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", + "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", + "#if ( defined( USE_MORPHTARGETS ) && ! defined( MORPHTARGETS_TEXTURE ) )", + "\tattribute vec3 morphTarget0;", + "\tattribute vec3 morphTarget1;", + "\tattribute vec3 morphTarget2;", + "\tattribute vec3 morphTarget3;", + "\t#ifdef USE_MORPHNORMALS", + "\t\tattribute vec3 morphNormal0;", + "\t\tattribute vec3 morphNormal1;", + "\t\tattribute vec3 morphNormal2;", + "\t\tattribute vec3 morphNormal3;", + "\t#else", + "\t\tattribute vec3 morphTarget4;", + "\t\tattribute vec3 morphTarget5;", + "\t\tattribute vec3 morphTarget6;", + "\t\tattribute vec3 morphTarget7;", + "\t#endif", + "#endif", + "#ifdef USE_SKINNING", + "\tattribute vec4 skinIndex;", + "\tattribute vec4 skinWeight;", + "#endif", + "\n", + ] + .filter(ml) + .join("\n")), + (a = [ + v, + wl(n), + "#define SHADER_TYPE " + n.shaderType, + "#define SHADER_NAME " + n.shaderName, + m, + n.useFog && n.fog ? "#define USE_FOG" : "", + n.useFog && n.fogExp2 ? "#define FOG_EXP2" : "", + n.map ? "#define USE_MAP" : "", + n.matcap ? "#define USE_MATCAP" : "", + n.envMap ? "#define USE_ENVMAP" : "", + n.envMap ? "#define " + f : "", + n.envMap ? "#define " + d : "", + n.envMap ? "#define " + h : "", + p ? "#define CUBEUV_TEXEL_WIDTH " + p.texelWidth : "", + p ? "#define CUBEUV_TEXEL_HEIGHT " + p.texelHeight : "", + p ? "#define CUBEUV_MAX_MIP " + p.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.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 ? "#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 " + c : "", + n.premultipliedAlpha ? "#define PREMULTIPLIED_ALPHA" : "", + n.numLightProbes > 0 ? "#define USE_LIGHT_PROBES" : "", + n.useLegacyLights ? "#define LEGACY_LIGHTS" : "", + n.decodeVideoTexture ? "#define DECODE_VIDEO_TEXTURE" : "", + n.logarithmicDepthBuffer ? "#define USE_LOGDEPTHBUF" : "", + n.logarithmicDepthBuffer && n.rendererExtensionFragDepth + ? "#define USE_LOGDEPTHBUF_EXT" + : "", + "uniform mat4 viewMatrix;", + "uniform vec3 cameraPosition;", + "uniform bool isOrthographic;", + n.toneMapping !== de ? "#define TONE_MAPPING" : "", + n.toneMapping !== de ? Mo.tonemapping_pars_fragment : "", + n.toneMapping !== de ? vl("toneMapping", n.toneMapping) : "", + n.dithering ? "#define DITHERING" : "", + n.opaque ? "#define OPAQUE" : "", + Mo.colorspace_pars_fragment, + pl("linearToOutputTexel", n.outputColorSpace), + n.useDepthPacking + ? "#define DEPTH_PACKING " + n.depthPacking + : "", + "\n", + ] + .filter(ml) + .join("\n"))), + (l = Al((l = gl((l = bl(l)), n)), n)), + (u = Al((u = gl((u = bl(u)), n)), n)), + (l = _l(l)), + (u = _l(u)), + n.isWebGL2 && + !0 !== n.isRawShaderMaterial && + ((A = "#version 300 es\n"), + (i = + [ + "precision mediump sampler2DArray;", + "#define attribute in", + "#define varying out", + "#define texture2D texture", + ].join("\n") + + "\n" + + i), + (a = + [ + "#define varying in", + n.glslVersion === Wn + ? "" + : "layout(location = 0) out highp vec4 pc_fragColor;", + n.glslVersion === Wn + ? "" + : "#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" + + a)); + var y, + b, + x = A + i + l, + S = A + a + u, + E = fl(o, o.VERTEX_SHADER, x), + _ = fl(o, o.FRAGMENT_SHADER, S); + if ( + (o.attachShader(g, E), + o.attachShader(g, _), + void 0 !== n.index0AttributeName + ? o.bindAttribLocation(g, 0, n.index0AttributeName) + : !0 === n.morphTargets && o.bindAttribLocation(g, 0, "position"), + o.linkProgram(g), + e.debug.checkShaderErrors) + ) { + var C = o.getProgramInfoLog(g).trim(), + I = o.getShaderInfoLog(E).trim(), + k = o.getShaderInfoLog(_).trim(), + R = !0, + B = !0; + if (!1 === o.getProgramParameter(g, o.LINK_STATUS)) + if (((R = !1), "function" === typeof e.debug.onShaderError)) + e.debug.onShaderError(o, g, E, _); + else { + var P = hl(o, E, "vertex"), + L = hl(o, _, "fragment"); + console.error( + "THREE.WebGLProgram: Shader Error " + + o.getError() + + " - VALIDATE_STATUS " + + o.getProgramParameter(g, o.VALIDATE_STATUS) + + "\n\nProgram Info Log: " + + C + + "\n" + + P + + "\n" + + L + ); + } + else + "" !== C + ? console.warn("THREE.WebGLProgram: Program Info Log:", C) + : ("" !== I && "" !== k) || (B = !1); + B && + (this.diagnostics = { + runnable: R, + programLog: C, + vertexShader: { log: I, prefix: i }, + fragmentShader: { log: k, prefix: a }, + }); + } + return ( + o.deleteShader(E), + o.deleteShader(_), + (this.getUniforms = function () { + return void 0 === y && (y = new cl(o, g)), y; + }), + (this.getAttributes = function () { + return ( + void 0 === b && + (b = (function (e, t) { + for ( + var n = {}, + r = e.getProgramParameter(t, e.ACTIVE_ATTRIBUTES), + i = 0; + i < r; + i++ + ) { + var a = e.getActiveAttrib(t, i), + o = a.name, + s = 1; + a.type === e.FLOAT_MAT2 && (s = 2), + a.type === e.FLOAT_MAT3 && (s = 3), + a.type === e.FLOAT_MAT4 && (s = 4), + (n[o] = { + type: a.type, + location: e.getAttribLocation(t, o), + locationSize: s, + }); + } + return n; + })(o, g)), + b + ); + }), + (this.destroy = function () { + r.releaseStatesOfProgram(this), + o.deleteProgram(g), + (this.program = void 0); + }), + (this.type = n.shaderType), + (this.name = n.shaderName), + (this.id = dl++), + (this.cacheKey = t), + (this.usedTimes = 1), + (this.program = g), + (this.vertexShader = E), + (this.fragmentShader = _), + this + ); + } + var Ml = 0, + Il = (function () { + function e() { + (0, m.Z)(this, e), + (this.shaderCache = new Map()), + (this.materialCache = new Map()); + } + return ( + (0, g.Z)(e, [ + { + key: "update", + value: function (e) { + var t = e.vertexShader, + n = e.fragmentShader, + r = this._getShaderStage(t), + i = this._getShaderStage(n), + a = this._getShaderCacheForMaterial(e); + return ( + !1 === a.has(r) && (a.add(r), r.usedTimes++), + !1 === a.has(i) && (a.add(i), i.usedTimes++), + this + ); + }, + }, + { + key: "remove", + value: function (e) { + var t, + n = this.materialCache.get(e), + r = (0, o.Z)(n); + try { + for (r.s(); !(t = r.n()).done; ) { + var i = t.value; + i.usedTimes--, + 0 === i.usedTimes && this.shaderCache.delete(i.code); + } + } catch (a) { + r.e(a); + } finally { + r.f(); + } + return this.materialCache.delete(e), this; + }, + }, + { + key: "getVertexShaderID", + value: function (e) { + return this._getShaderStage(e.vertexShader).id; + }, + }, + { + key: "getFragmentShaderID", + value: function (e) { + return this._getShaderStage(e.fragmentShader).id; + }, + }, + { + key: "dispose", + value: function () { + this.shaderCache.clear(), this.materialCache.clear(); + }, + }, + { + key: "_getShaderCacheForMaterial", + value: function (e) { + var t = this.materialCache, + n = t.get(e); + return void 0 === n && ((n = new Set()), t.set(e, n)), n; + }, + }, + { + key: "_getShaderStage", + value: function (e) { + var t = this.shaderCache, + n = t.get(e); + return void 0 === n && ((n = new kl(e)), t.set(e, n)), n; + }, + }, + ]), + e + ); + })(), + kl = (0, g.Z)(function e(t) { + (0, m.Z)(this, e), + (this.id = Ml++), + (this.code = t), + (this.usedTimes = 0); + }); + function Rl(e, t, n, r, i, a, o) { + var s = new Bi(), + l = new Il(), + u = [], + c = i.isWebGL2, + f = i.logarithmicDepthBuffer, + d = i.vertexTextures, + h = i.precision, + p = { + 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 v(e) { + return 0 === e ? "uv" : "uv".concat(e); + } + return { + getParameters: function (a, s, u, m, g) { + var A = m.fog, + y = g.geometry, + b = a.isMeshStandardMaterial ? m.environment : null, + x = (a.isMeshStandardMaterial ? n : t).get(a.envMap || b), + S = x && x.mapping === Ee ? x.image.height : null, + E = p[a.type]; + null !== a.precision && + (h = i.getMaxPrecision(a.precision)) !== a.precision && + console.warn( + "THREE.WebGLProgram.getParameters:", + a.precision, + "not supported, using", + h, + "instead." + ); + var _, + C, + w, + T, + M = + y.morphAttributes.position || + y.morphAttributes.normal || + y.morphAttributes.color, + I = void 0 !== M ? M.length : 0, + B = 0; + if ( + (void 0 !== y.morphAttributes.position && (B = 1), + void 0 !== y.morphAttributes.normal && (B = 2), + void 0 !== y.morphAttributes.color && (B = 3), + E) + ) { + var P = ko[E]; + (_ = P.vertexShader), (C = P.fragmentShader); + } else + (_ = a.vertexShader), + (C = a.fragmentShader), + l.update(a), + (w = l.getVertexShaderID(a)), + (T = l.getFragmentShaderID(a)); + var D = e.getRenderTarget(), + U = !0 === g.isInstancedMesh, + F = !!a.map, + O = !!a.matcap, + N = !!x, + G = !!a.aoMap, + Z = !!a.lightMap, + z = !!a.bumpMap, + Q = !!a.normalMap, + H = !!a.displacementMap, + V = !!a.emissiveMap, + j = !!a.metalnessMap, + W = !!a.roughnessMap, + X = a.anisotropy > 0, + Y = a.clearcoat > 0, + q = a.iridescence > 0, + J = a.sheen > 0, + K = a.transmission > 0, + $ = X && !!a.anisotropyMap, + ee = Y && !!a.clearcoatMap, + te = Y && !!a.clearcoatNormalMap, + ne = Y && !!a.clearcoatRoughnessMap, + re = q && !!a.iridescenceMap, + ie = q && !!a.iridescenceThicknessMap, + ae = J && !!a.sheenColorMap, + oe = J && !!a.sheenRoughnessMap, + se = !!a.specularMap, + le = !!a.specularColorMap, + ue = !!a.specularIntensityMap, + ce = K && !!a.transmissionMap, + fe = K && !!a.thicknessMap, + he = !!a.gradientMap, + pe = !!a.alphaMap, + ve = a.alphaTest > 0, + me = !!a.alphaHash, + ge = !!a.extensions, + Ae = !!y.attributes.uv1, + ye = !!y.attributes.uv2, + be = !!y.attributes.uv3, + xe = de; + return ( + a.toneMapped && + ((null !== D && !0 !== D.isXRRenderTarget) || + (xe = e.toneMapping)), + { + isWebGL2: c, + shaderID: E, + shaderType: a.type, + shaderName: a.name, + vertexShader: _, + fragmentShader: C, + defines: a.defines, + customVertexShaderID: w, + customFragmentShaderID: T, + isRawShaderMaterial: !0 === a.isRawShaderMaterial, + glslVersion: a.glslVersion, + precision: h, + instancing: U, + instancingColor: U && null !== g.instanceColor, + supportsVertexTextures: d, + outputColorSpace: + null === D + ? e.outputColorSpace + : !0 === D.isXRRenderTarget + ? D.texture.colorSpace + : on, + map: F, + matcap: O, + envMap: N, + envMapMode: N && x.mapping, + envMapCubeUVHeight: S, + aoMap: G, + lightMap: Z, + bumpMap: z, + normalMap: Q, + displacementMap: d && H, + emissiveMap: V, + normalMapObjectSpace: Q && a.normalMapType === nn, + normalMapTangentSpace: Q && a.normalMapType === tn, + metalnessMap: j, + roughnessMap: W, + anisotropy: X, + anisotropyMap: $, + clearcoat: Y, + clearcoatMap: ee, + clearcoatNormalMap: te, + clearcoatRoughnessMap: ne, + iridescence: q, + iridescenceMap: re, + iridescenceThicknessMap: ie, + sheen: J, + sheenColorMap: ae, + sheenRoughnessMap: oe, + specularMap: se, + specularColorMap: le, + specularIntensityMap: ue, + transmission: K, + transmissionMap: ce, + thicknessMap: fe, + gradientMap: he, + opaque: !1 === a.transparent && a.blending === L, + alphaMap: pe, + alphaTest: ve, + alphaHash: me, + combine: a.combine, + mapUv: F && v(a.map.channel), + aoMapUv: G && v(a.aoMap.channel), + lightMapUv: Z && v(a.lightMap.channel), + bumpMapUv: z && v(a.bumpMap.channel), + normalMapUv: Q && v(a.normalMap.channel), + displacementMapUv: H && v(a.displacementMap.channel), + emissiveMapUv: V && v(a.emissiveMap.channel), + metalnessMapUv: j && v(a.metalnessMap.channel), + roughnessMapUv: W && v(a.roughnessMap.channel), + anisotropyMapUv: $ && v(a.anisotropyMap.channel), + clearcoatMapUv: ee && v(a.clearcoatMap.channel), + clearcoatNormalMapUv: te && v(a.clearcoatNormalMap.channel), + clearcoatRoughnessMapUv: + ne && v(a.clearcoatRoughnessMap.channel), + iridescenceMapUv: re && v(a.iridescenceMap.channel), + iridescenceThicknessMapUv: + ie && v(a.iridescenceThicknessMap.channel), + sheenColorMapUv: ae && v(a.sheenColorMap.channel), + sheenRoughnessMapUv: oe && v(a.sheenRoughnessMap.channel), + specularMapUv: se && v(a.specularMap.channel), + specularColorMapUv: le && v(a.specularColorMap.channel), + specularIntensityMapUv: + ue && v(a.specularIntensityMap.channel), + transmissionMapUv: ce && v(a.transmissionMap.channel), + thicknessMapUv: fe && v(a.thicknessMap.channel), + alphaMapUv: pe && v(a.alphaMap.channel), + vertexTangents: !!y.attributes.tangent && (Q || X), + vertexColors: a.vertexColors, + vertexAlphas: + !0 === a.vertexColors && + !!y.attributes.color && + 4 === y.attributes.color.itemSize, + vertexUv1s: Ae, + vertexUv2s: ye, + vertexUv3s: be, + pointsUvs: + !0 === g.isPoints && !!y.attributes.uv && (F || pe), + fog: !!A, + useFog: !0 === a.fog, + fogExp2: A && A.isFogExp2, + flatShading: !0 === a.flatShading, + sizeAttenuation: !0 === a.sizeAttenuation, + logarithmicDepthBuffer: f, + skinning: !0 === g.isSkinnedMesh, + morphTargets: void 0 !== y.morphAttributes.position, + morphNormals: void 0 !== y.morphAttributes.normal, + morphColors: void 0 !== y.morphAttributes.color, + morphTargetsCount: I, + morphTextureStride: B, + numDirLights: s.directional.length, + numPointLights: s.point.length, + numSpotLights: s.spot.length, + numSpotLightMaps: s.spotLightMap.length, + numRectAreaLights: s.rectArea.length, + numHemiLights: s.hemi.length, + numDirLightShadows: s.directionalShadowMap.length, + numPointLightShadows: s.pointShadowMap.length, + numSpotLightShadows: s.spotShadowMap.length, + numSpotLightShadowsWithMaps: s.numSpotLightShadowsWithMaps, + numLightProbes: s.numLightProbes, + numClippingPlanes: o.numPlanes, + numClipIntersection: o.numIntersection, + dithering: a.dithering, + shadowMapEnabled: e.shadowMap.enabled && u.length > 0, + shadowMapType: e.shadowMap.type, + toneMapping: xe, + useLegacyLights: e._useLegacyLights, + decodeVideoTexture: + F && + !0 === a.map.isVideoTexture && + Tr.getTransfer(a.map.colorSpace) === cn, + premultipliedAlpha: a.premultipliedAlpha, + doubleSided: a.side === R, + flipSided: a.side === k, + useDepthPacking: a.depthPacking >= 0, + depthPacking: a.depthPacking || 0, + index0AttributeName: a.index0AttributeName, + extensionDerivatives: ge && !0 === a.extensions.derivatives, + extensionFragDepth: ge && !0 === a.extensions.fragDepth, + extensionDrawBuffers: ge && !0 === a.extensions.drawBuffers, + extensionShaderTextureLOD: + ge && !0 === a.extensions.shaderTextureLOD, + rendererExtensionFragDepth: c || r.has("EXT_frag_depth"), + rendererExtensionDrawBuffers: + c || r.has("WEBGL_draw_buffers"), + rendererExtensionShaderTextureLod: + c || r.has("EXT_shader_texture_lod"), + customProgramCacheKey: a.customProgramCacheKey(), + } + ); + }, + getProgramCacheKey: function (t) { + var n = []; + if ( + (t.shaderID + ? n.push(t.shaderID) + : (n.push(t.customVertexShaderID), + n.push(t.customFragmentShaderID)), + void 0 !== t.defines) + ) + for (var r in t.defines) n.push(r), n.push(t.defines[r]); + 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) { + s.disableAll(), t.isWebGL2 && s.enable(0); + t.supportsVertexTextures && s.enable(1); + t.instancing && s.enable(2); + t.instancingColor && s.enable(3); + t.matcap && s.enable(4); + t.envMap && s.enable(5); + t.normalMapObjectSpace && s.enable(6); + t.normalMapTangentSpace && s.enable(7); + t.clearcoat && s.enable(8); + t.iridescence && s.enable(9); + t.alphaTest && s.enable(10); + t.vertexColors && s.enable(11); + t.vertexAlphas && s.enable(12); + t.vertexUv1s && s.enable(13); + t.vertexUv2s && s.enable(14); + t.vertexUv3s && s.enable(15); + t.vertexTangents && s.enable(16); + t.anisotropy && s.enable(17); + e.push(s.mask), s.disableAll(), t.fog && s.enable(0); + t.useFog && s.enable(1); + t.flatShading && s.enable(2); + t.logarithmicDepthBuffer && s.enable(3); + t.skinning && s.enable(4); + t.morphTargets && s.enable(5); + t.morphNormals && s.enable(6); + t.morphColors && s.enable(7); + t.premultipliedAlpha && s.enable(8); + t.shadowMapEnabled && s.enable(9); + t.useLegacyLights && s.enable(10); + t.doubleSided && s.enable(11); + t.flipSided && s.enable(12); + t.useDepthPacking && s.enable(13); + t.dithering && s.enable(14); + t.transmission && s.enable(15); + t.sheen && s.enable(16); + t.opaque && s.enable(17); + t.pointsUvs && s.enable(18); + t.decodeVideoTexture && s.enable(19); + e.push(s.mask); + })(n, t), + n.push(e.outputColorSpace)), + n.push(t.customProgramCacheKey), + n.join() + ); + }, + getUniforms: function (e) { + var t, + n = p[e.type]; + if (n) { + var r = ko[n]; + t = uo.clone(r.uniforms); + } else t = e.uniforms; + return t; + }, + acquireProgram: function (t, n) { + for (var r, i = 0, o = u.length; i < o; i++) { + var s = u[i]; + if (s.cacheKey === n) { + ++(r = s).usedTimes; + break; + } + } + return void 0 === r && ((r = new Tl(e, n, t, a)), u.push(r)), r; + }, + releaseProgram: function (e) { + if (0 === --e.usedTimes) { + var 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 Bl() { + var e = new WeakMap(); + return { + get: function (t) { + var 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 Pl(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 Ll(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 Dl() { + var e = [], + t = 0, + n = [], + r = [], + i = []; + function a(n, r, i, a, o, s) { + var l = e[t]; + return ( + void 0 === l + ? ((l = { + id: n.id, + object: n, + geometry: r, + material: i, + groupOrder: a, + renderOrder: n.renderOrder, + z: o, + group: s, + }), + (e[t] = l)) + : ((l.id = n.id), + (l.object = n), + (l.geometry = r), + (l.material = i), + (l.groupOrder = a), + (l.renderOrder = n.renderOrder), + (l.z = o), + (l.group = s)), + 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, o, s, l, u) { + var c = a(e, t, o, s, l, u); + o.transmission > 0 + ? r.push(c) + : !0 === o.transparent + ? i.push(c) + : n.push(c); + }, + unshift: function (e, t, o, s, l, u) { + var c = a(e, t, o, s, l, u); + o.transmission > 0 + ? r.unshift(c) + : !0 === o.transparent + ? i.unshift(c) + : n.unshift(c); + }, + finish: function () { + for (var n = t, r = e.length; n < r; n++) { + var i = e[n]; + if (null === i.id) break; + (i.id = null), + (i.object = null), + (i.geometry = null), + (i.material = null), + (i.group = null); + } + }, + sort: function (e, t) { + n.length > 1 && n.sort(e || Pl), + r.length > 1 && r.sort(t || Ll), + i.length > 1 && i.sort(t || Ll); + }, + }; + } + function Ul() { + var e = new WeakMap(); + return { + get: function (t, n) { + var r, + i = e.get(t); + return ( + void 0 === i + ? ((r = new Dl()), e.set(t, [r])) + : n >= i.length + ? ((r = new Dl()), i.push(r)) + : (r = i[n]), + r + ); + }, + dispose: function () { + e = new WeakMap(); + }, + }; + } + function Fl() { + var e = {}; + return { + get: function (t) { + if (void 0 !== e[t.id]) return e[t.id]; + var n; + switch (t.type) { + case "DirectionalLight": + n = { direction: new Vr(), color: new fa() }; + break; + case "SpotLight": + n = { + position: new Vr(), + direction: new Vr(), + color: new fa(), + distance: 0, + coneCos: 0, + penumbraCos: 0, + decay: 0, + }; + break; + case "PointLight": + n = { + position: new Vr(), + color: new fa(), + distance: 0, + decay: 0, + }; + break; + case "HemisphereLight": + n = { + direction: new Vr(), + skyColor: new fa(), + groundColor: new fa(), + }; + break; + case "RectAreaLight": + n = { + color: new fa(), + position: new Vr(), + halfWidth: new Vr(), + halfHeight: new Vr(), + }; + } + return (e[t.id] = n), n; + }, + }; + } + var Ol = 0; + function Nl(e, t) { + return ( + (t.castShadow ? 2 : 0) - + (e.castShadow ? 2 : 0) + + (t.map ? 1 : 0) - + (e.map ? 1 : 0) + ); + } + function Gl(e, t) { + for ( + var n = new Fl(), + r = (function () { + var e = {}; + return { + get: function (t) { + if (void 0 !== e[t.id]) return e[t.id]; + var n; + switch (t.type) { + case "DirectionalLight": + case "SpotLight": + n = { + shadowBias: 0, + shadowNormalBias: 0, + shadowRadius: 1, + shadowMapSize: new dr(), + }; + break; + case "PointLight": + n = { + shadowBias: 0, + shadowNormalBias: 0, + shadowRadius: 1, + shadowMapSize: new dr(), + shadowCameraNear: 1, + shadowCameraFar: 1e3, + }; + } + return (e[t.id] = n), n; + }, + }; + })(), + i = { + 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, + }, + a = 0; + a < 9; + a++ + ) + i.probe.push(new Vr()); + var o = new Vr(), + s = new xi(), + l = new xi(); + return { + setup: function (a, o) { + for (var s = 0, l = 0, u = 0, c = 0; c < 9; c++) + i.probe[c].set(0, 0, 0); + var f = 0, + d = 0, + h = 0, + p = 0, + v = 0, + m = 0, + g = 0, + A = 0, + y = 0, + b = 0, + x = 0; + a.sort(Nl); + for ( + var S = !0 === o ? Math.PI : 1, E = 0, _ = a.length; + E < _; + E++ + ) { + var C = a[E], + w = C.color, + T = C.intensity, + M = C.distance, + I = C.shadow && C.shadow.map ? C.shadow.map.texture : null; + if (C.isAmbientLight) + (s += w.r * T * S), (l += w.g * T * S), (u += w.b * T * S); + else if (C.isLightProbe) { + for (var k = 0; k < 9; k++) + i.probe[k].addScaledVector(C.sh.coefficients[k], T); + x++; + } else if (C.isDirectionalLight) { + var R = n.get(C); + if ( + (R.color.copy(C.color).multiplyScalar(C.intensity * S), + C.castShadow) + ) { + var B = C.shadow, + P = r.get(C); + (P.shadowBias = B.bias), + (P.shadowNormalBias = B.normalBias), + (P.shadowRadius = B.radius), + (P.shadowMapSize = B.mapSize), + (i.directionalShadow[f] = P), + (i.directionalShadowMap[f] = I), + (i.directionalShadowMatrix[f] = C.shadow.matrix), + m++; + } + (i.directional[f] = R), f++; + } else if (C.isSpotLight) { + var L = n.get(C); + L.position.setFromMatrixPosition(C.matrixWorld), + L.color.copy(w).multiplyScalar(T * S), + (L.distance = M), + (L.coneCos = Math.cos(C.angle)), + (L.penumbraCos = Math.cos(C.angle * (1 - C.penumbra))), + (L.decay = C.decay), + (i.spot[h] = L); + var D = C.shadow; + if ( + (C.map && + ((i.spotLightMap[y] = C.map), + y++, + D.updateMatrices(C), + C.castShadow && b++), + (i.spotLightMatrix[h] = D.matrix), + C.castShadow) + ) { + var U = r.get(C); + (U.shadowBias = D.bias), + (U.shadowNormalBias = D.normalBias), + (U.shadowRadius = D.radius), + (U.shadowMapSize = D.mapSize), + (i.spotShadow[h] = U), + (i.spotShadowMap[h] = I), + A++; + } + h++; + } else if (C.isRectAreaLight) { + var F = n.get(C); + F.color.copy(w).multiplyScalar(T), + F.halfWidth.set(0.5 * C.width, 0, 0), + F.halfHeight.set(0, 0.5 * C.height, 0), + (i.rectArea[p] = F), + p++; + } else if (C.isPointLight) { + var O = n.get(C); + if ( + (O.color.copy(C.color).multiplyScalar(C.intensity * S), + (O.distance = C.distance), + (O.decay = C.decay), + C.castShadow) + ) { + var N = C.shadow, + G = r.get(C); + (G.shadowBias = N.bias), + (G.shadowNormalBias = N.normalBias), + (G.shadowRadius = N.radius), + (G.shadowMapSize = N.mapSize), + (G.shadowCameraNear = N.camera.near), + (G.shadowCameraFar = N.camera.far), + (i.pointShadow[d] = G), + (i.pointShadowMap[d] = I), + (i.pointShadowMatrix[d] = C.shadow.matrix), + g++; + } + (i.point[d] = O), d++; + } else if (C.isHemisphereLight) { + var Z = n.get(C); + Z.skyColor.copy(C.color).multiplyScalar(T * S), + Z.groundColor.copy(C.groundColor).multiplyScalar(T * S), + (i.hemi[v] = Z), + v++; + } + } + p > 0 && + (t.isWebGL2 || !0 === e.has("OES_texture_float_linear") + ? ((i.rectAreaLTC1 = Io.LTC_FLOAT_1), + (i.rectAreaLTC2 = Io.LTC_FLOAT_2)) + : !0 === e.has("OES_texture_half_float_linear") + ? ((i.rectAreaLTC1 = Io.LTC_HALF_1), + (i.rectAreaLTC2 = Io.LTC_HALF_2)) + : console.error( + "THREE.WebGLRenderer: Unable to use RectAreaLight. Missing WebGL extensions." + )), + (i.ambient[0] = s), + (i.ambient[1] = l), + (i.ambient[2] = u); + var z = i.hash; + (z.directionalLength === f && + z.pointLength === d && + z.spotLength === h && + z.rectAreaLength === p && + z.hemiLength === v && + z.numDirectionalShadows === m && + z.numPointShadows === g && + z.numSpotShadows === A && + z.numSpotMaps === y && + z.numLightProbes === x) || + ((i.directional.length = f), + (i.spot.length = h), + (i.rectArea.length = p), + (i.point.length = d), + (i.hemi.length = v), + (i.directionalShadow.length = m), + (i.directionalShadowMap.length = m), + (i.pointShadow.length = g), + (i.pointShadowMap.length = g), + (i.spotShadow.length = A), + (i.spotShadowMap.length = A), + (i.directionalShadowMatrix.length = m), + (i.pointShadowMatrix.length = g), + (i.spotLightMatrix.length = A + y - b), + (i.spotLightMap.length = y), + (i.numSpotLightShadowsWithMaps = b), + (i.numLightProbes = x), + (z.directionalLength = f), + (z.pointLength = d), + (z.spotLength = h), + (z.rectAreaLength = p), + (z.hemiLength = v), + (z.numDirectionalShadows = m), + (z.numPointShadows = g), + (z.numSpotShadows = A), + (z.numSpotMaps = y), + (z.numLightProbes = x), + (i.version = Ol++)); + }, + setupView: function (e, t) { + for ( + var n = 0, + r = 0, + a = 0, + u = 0, + c = 0, + f = t.matrixWorldInverse, + d = 0, + h = e.length; + d < h; + d++ + ) { + var p = e[d]; + if (p.isDirectionalLight) { + var v = i.directional[n]; + v.direction.setFromMatrixPosition(p.matrixWorld), + o.setFromMatrixPosition(p.target.matrixWorld), + v.direction.sub(o), + v.direction.transformDirection(f), + n++; + } else if (p.isSpotLight) { + var m = i.spot[a]; + m.position.setFromMatrixPosition(p.matrixWorld), + m.position.applyMatrix4(f), + m.direction.setFromMatrixPosition(p.matrixWorld), + o.setFromMatrixPosition(p.target.matrixWorld), + m.direction.sub(o), + m.direction.transformDirection(f), + a++; + } else if (p.isRectAreaLight) { + var g = i.rectArea[u]; + g.position.setFromMatrixPosition(p.matrixWorld), + g.position.applyMatrix4(f), + l.identity(), + s.copy(p.matrixWorld), + s.premultiply(f), + l.extractRotation(s), + g.halfWidth.set(0.5 * p.width, 0, 0), + g.halfHeight.set(0, 0.5 * p.height, 0), + g.halfWidth.applyMatrix4(l), + g.halfHeight.applyMatrix4(l), + u++; + } else if (p.isPointLight) { + var A = i.point[r]; + A.position.setFromMatrixPosition(p.matrixWorld), + A.position.applyMatrix4(f), + r++; + } else if (p.isHemisphereLight) { + var y = i.hemi[c]; + y.direction.setFromMatrixPosition(p.matrixWorld), + y.direction.transformDirection(f), + c++; + } + } + }, + state: i, + }; + } + function Zl(e, t) { + var n = new Gl(e, t), + r = [], + i = []; + return { + init: function () { + (r.length = 0), (i.length = 0); + }, + state: { lightsArray: r, shadowsArray: i, lights: n }, + setupLights: function (e) { + n.setup(r, e); + }, + setupLightsView: function (e) { + n.setupView(r, e); + }, + pushLight: function (e) { + r.push(e); + }, + pushShadow: function (e) { + i.push(e); + }, + }; + } + function zl(e, t) { + var n = new WeakMap(); + return { + get: function (r) { + var i, + a = + arguments.length > 1 && void 0 !== arguments[1] + ? arguments[1] + : 0, + o = n.get(r); + return ( + void 0 === o + ? ((i = new Zl(e, t)), n.set(r, [i])) + : a >= o.length + ? ((i = new Zl(e, t)), o.push(i)) + : (i = o[a]), + i + ); + }, + dispose: function () { + n = new WeakMap(); + }, + }; + } + var Ql = (function (e) { + (0, d.Z)(n, e); + var t = (0, h.Z)(n); + function n(e) { + var r; + return ( + (0, m.Z)(this, n), + ((r = t.call(this)).isMeshDepthMaterial = !0), + (r.type = "MeshDepthMaterial"), + (r.depthPacking = $t), + (r.map = null), + (r.alphaMap = null), + (r.displacementMap = null), + (r.displacementScale = 1), + (r.displacementBias = 0), + (r.wireframe = !1), + (r.wireframeLinewidth = 1), + r.setValues(e), + r + ); + } + return ( + (0, g.Z)(n, [ + { + key: "copy", + value: function (e) { + return ( + (0, l.Z)((0, u.Z)(n.prototype), "copy", this).call( + this, + 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 + ); + }, + }, + ]), + n + ); + })(oa), + Hl = (function (e) { + (0, d.Z)(n, e); + var t = (0, h.Z)(n); + function n(e) { + var r; + return ( + (0, m.Z)(this, n), + ((r = t.call(this)).isMeshDistanceMaterial = !0), + (r.type = "MeshDistanceMaterial"), + (r.map = null), + (r.alphaMap = null), + (r.displacementMap = null), + (r.displacementScale = 1), + (r.displacementBias = 0), + r.setValues(e), + r + ); + } + return ( + (0, g.Z)(n, [ + { + key: "copy", + value: function (e) { + return ( + (0, l.Z)((0, u.Z)(n.prototype), "copy", this).call( + this, + e + ), + (this.map = e.map), + (this.alphaMap = e.alphaMap), + (this.displacementMap = e.displacementMap), + (this.displacementScale = e.displacementScale), + (this.displacementBias = e.displacementBias), + this + ); + }, + }, + ]), + n + ); + })(oa); + function Vl(e, t, n) { + var r, + i = new _o(), + a = new dr(), + o = new dr(), + s = new Ur(), + l = new Ql({ depthPacking: en }), + u = new Hl(), + c = {}, + f = n.maxTextureSize, + d = + ((r = {}), + (0, p.Z)(r, I, k), + (0, p.Z)(r, k, I), + (0, p.Z)(r, R, R), + r), + h = new co({ + defines: { VSM_SAMPLES: 8 }, + uniforms: { + shadow_pass: { value: null }, + resolution: { value: new dr() }, + 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 \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}", + }), + v = h.clone(); + v.defines.HORIZONTAL_PASS = 1; + var m = new Na(); + m.setAttribute( + "position", + new xa(new Float32Array([-1, -1, 0.5, 3, -1, 0.5, -1, 3, 0.5]), 3) + ); + var g = new ro(m, h), + A = this; + (this.enabled = !1), + (this.autoUpdate = !0), + (this.needsUpdate = !1), + (this.type = w); + var y = this.type; + function b(n, r) { + var i = t.update(g); + h.defines.VSM_SAMPLES !== n.blurSamples && + ((h.defines.VSM_SAMPLES = n.blurSamples), + (v.defines.VSM_SAMPLES = n.blurSamples), + (h.needsUpdate = !0), + (v.needsUpdate = !0)), + null === n.mapPass && (n.mapPass = new Or(a.x, a.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, i, h, g, null), + (v.uniforms.shadow_pass.value = n.mapPass.texture), + (v.uniforms.resolution.value = n.mapSize), + (v.uniforms.radius.value = n.radius), + e.setRenderTarget(n.map), + e.clear(), + e.renderBufferDirect(r, null, i, v, g, null); + } + function x(t, n, r, i) { + var a = null, + o = + !0 === r.isPointLight + ? t.customDistanceMaterial + : t.customDepthMaterial; + if (void 0 !== o) a = o; + else if ( + ((a = !0 === r.isPointLight ? u : l), + (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)) + ) { + var s = a.uuid, + f = n.uuid, + h = c[s]; + void 0 === h && ((h = {}), (c[s] = h)); + var p = h[f]; + void 0 === p && ((p = a.clone()), (h[f] = p)), (a = p); + } + ((a.visible = n.visible), + (a.wireframe = n.wireframe), + (a.side = + i === M + ? null !== n.shadowSide + ? n.shadowSide + : n.side + : null !== n.shadowSide + ? n.shadowSide + : d[n.side]), + (a.alphaMap = n.alphaMap), + (a.alphaTest = n.alphaTest), + (a.map = n.map), + (a.clipShadows = n.clipShadows), + (a.clippingPlanes = n.clippingPlanes), + (a.clipIntersection = n.clipIntersection), + (a.displacementMap = n.displacementMap), + (a.displacementScale = n.displacementScale), + (a.displacementBias = n.displacementBias), + (a.wireframeLinewidth = n.wireframeLinewidth), + (a.linewidth = n.linewidth), + !0 === r.isPointLight && !0 === a.isMeshDistanceMaterial) && + (e.properties.get(a).light = r); + return a; + } + function S(n, r, a, o, s) { + if (!1 !== n.visible) { + if ( + n.layers.test(r.layers) && + (n.isMesh || n.isLine || n.isPoints) && + (n.castShadow || (n.receiveShadow && s === M)) && + (!n.frustumCulled || i.intersectsObject(n)) + ) { + n.modelViewMatrix.multiplyMatrices( + a.matrixWorldInverse, + n.matrixWorld + ); + var l = t.update(n), + u = n.material; + if (Array.isArray(u)) + for (var c = l.groups, f = 0, d = c.length; f < d; f++) { + var h = c[f], + p = u[h.materialIndex]; + if (p && p.visible) { + var v = x(n, p, o, s); + e.renderBufferDirect(a, null, l, v, n, h); + } + } + else if (u.visible) { + var m = x(n, u, o, s); + e.renderBufferDirect(a, null, l, m, n, null); + } + } + for (var g = n.children, A = 0, y = g.length; A < y; A++) + S(g[A], r, a, o, s); + } + } + this.render = function (t, n, r) { + if ( + !1 !== A.enabled && + (!1 !== A.autoUpdate || !1 !== A.needsUpdate) && + 0 !== t.length + ) { + var l = e.getRenderTarget(), + u = e.getActiveCubeFace(), + c = e.getActiveMipmapLevel(), + d = e.state; + d.setBlending(P), + d.buffers.color.setClear(1, 1, 1, 1), + d.buffers.depth.setTest(!0), + d.setScissorTest(!1); + for ( + var h = y !== M && this.type === M, + p = y === M && this.type !== M, + v = 0, + m = t.length; + v < m; + v++ + ) { + var g = t[v], + x = g.shadow; + if (void 0 !== x) { + if (!1 !== x.autoUpdate || !1 !== x.needsUpdate) { + a.copy(x.mapSize); + var E = x.getFrameExtents(); + if ( + (a.multiply(E), + o.copy(x.mapSize), + (a.x > f || a.y > f) && + (a.x > f && + ((o.x = Math.floor(f / E.x)), + (a.x = o.x * E.x), + (x.mapSize.x = o.x)), + a.y > f && + ((o.y = Math.floor(f / E.y)), + (a.y = o.y * E.y), + (x.mapSize.y = o.y))), + null === x.map || !0 === h || !0 === p) + ) { + var _ = + this.type !== M ? { minFilter: Te, magFilter: Te } : {}; + null !== x.map && x.map.dispose(), + (x.map = new Or(a.x, a.y, _)), + (x.map.texture.name = g.name + ".shadowMap"), + x.camera.updateProjectionMatrix(); + } + e.setRenderTarget(x.map), e.clear(); + for (var C = x.getViewportCount(), w = 0; w < C; w++) { + var T = x.getViewport(w); + s.set(o.x * T.x, o.y * T.y, o.x * T.z, o.y * T.w), + d.viewport(s), + x.updateMatrices(g, w), + (i = x.getFrustum()), + S(n, r, x.camera, g, this.type); + } + !0 !== x.isPointLightShadow && this.type === M && b(x, r), + (x.needsUpdate = !1); + } + } else + console.warn("THREE.WebGLShadowMap:", g, "has no shadow."); + } + (y = this.type), (A.needsUpdate = !1), e.setRenderTarget(l, u, c); + } + }; + } + function jl(e, t, n) { + var r, + i, + a = n.isWebGL2; + var o = new (function () { + var t = !1, + n = new Ur(), + r = null, + i = new Ur(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, a, o, s) { + !0 === s && ((t *= o), (r *= o), (a *= o)), + n.set(t, r, a, o), + !1 === i.equals(n) && (e.clearColor(t, r, a, o), i.copy(n)); + }, + reset: function () { + (t = !1), (r = null), i.set(-1, 0, 0, 0); + }, + }; + })(), + s = new (function () { + var t = !1, + n = null, + r = null, + i = null; + return { + setTest: function (t) { + t ? _e(e.DEPTH_TEST) : Ce(e.DEPTH_TEST); + }, + setMask: function (r) { + n === r || t || (e.depthMask(r), (n = r)); + }, + setFunc: function (t) { + if (r !== t) { + switch (t) { + case te: + e.depthFunc(e.NEVER); + break; + case ne: + e.depthFunc(e.ALWAYS); + break; + case re: + e.depthFunc(e.LESS); + break; + case ie: + e.depthFunc(e.LEQUAL); + break; + case ae: + e.depthFunc(e.EQUAL); + break; + case oe: + e.depthFunc(e.GEQUAL); + break; + case se: + e.depthFunc(e.GREATER); + break; + case le: + 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); + }, + }; + })(), + l = new (function () { + var t = !1, + n = null, + r = null, + i = null, + a = null, + o = null, + s = null, + l = null, + u = null; + return { + setTest: function (n) { + t || (n ? _e(e.STENCIL_TEST) : Ce(e.STENCIL_TEST)); + }, + setMask: function (r) { + n === r || t || (e.stencilMask(r), (n = r)); + }, + setFunc: function (t, n, o) { + (r === t && i === n && a === o) || + (e.stencilFunc(t, n, o), (r = t), (i = n), (a = o)); + }, + setOp: function (t, n, r) { + (o === t && s === n && l === r) || + (e.stencilOp(t, n, r), (o = t), (s = n), (l = r)); + }, + setLocked: function (e) { + t = e; + }, + setClear: function (t) { + u !== t && (e.clearStencil(t), (u = t)); + }, + reset: function () { + (t = !1), + (n = null), + (r = null), + (i = null), + (a = null), + (o = null), + (s = null), + (l = null), + (u = null); + }, + }; + })(), + u = new WeakMap(), + c = new WeakMap(), + f = {}, + d = {}, + h = new WeakMap(), + v = [], + m = null, + g = !1, + A = null, + y = null, + b = null, + _ = null, + C = null, + w = null, + T = null, + M = !1, + I = null, + B = null, + ue = null, + ce = null, + fe = null, + de = e.getParameter(e.MAX_COMBINED_TEXTURE_IMAGE_UNITS), + he = !1, + pe = 0, + ve = e.getParameter(e.VERSION); + -1 !== ve.indexOf("WebGL") + ? ((pe = parseFloat(/^WebGL (\d)/.exec(ve)[1])), (he = pe >= 1)) + : -1 !== ve.indexOf("OpenGL ES") && + ((pe = parseFloat(/^OpenGL ES (\d)/.exec(ve)[1])), + (he = pe >= 2)); + var me = null, + ge = {}, + Ae = e.getParameter(e.SCISSOR_BOX), + ye = e.getParameter(e.VIEWPORT), + be = new Ur().fromArray(Ae), + xe = new Ur().fromArray(ye); + function Se(t, n, r, i) { + var o = new Uint8Array(4), + s = e.createTexture(); + e.bindTexture(t, s), + e.texParameteri(t, e.TEXTURE_MIN_FILTER, e.NEAREST), + e.texParameteri(t, e.TEXTURE_MAG_FILTER, e.NEAREST); + for (var l = 0; l < r; l++) + !a || (t !== e.TEXTURE_3D && t !== e.TEXTURE_2D_ARRAY) + ? e.texImage2D( + n + l, + 0, + e.RGBA, + 1, + 1, + 0, + e.RGBA, + e.UNSIGNED_BYTE, + o + ) + : e.texImage3D( + n, + 0, + e.RGBA, + 1, + 1, + i, + 0, + e.RGBA, + e.UNSIGNED_BYTE, + o + ); + return s; + } + var Ee = {}; + function _e(t) { + !0 !== f[t] && (e.enable(t), (f[t] = !0)); + } + function Ce(t) { + !1 !== f[t] && (e.disable(t), (f[t] = !1)); + } + (Ee[e.TEXTURE_2D] = Se(e.TEXTURE_2D, e.TEXTURE_2D, 1)), + (Ee[e.TEXTURE_CUBE_MAP] = Se( + e.TEXTURE_CUBE_MAP, + e.TEXTURE_CUBE_MAP_POSITIVE_X, + 6 + )), + a && + ((Ee[e.TEXTURE_2D_ARRAY] = Se( + e.TEXTURE_2D_ARRAY, + e.TEXTURE_2D_ARRAY, + 1, + 1 + )), + (Ee[e.TEXTURE_3D] = Se(e.TEXTURE_3D, e.TEXTURE_3D, 1, 1))), + o.setClear(0, 0, 0, 1), + s.setClear(1), + l.setClear(0), + _e(e.DEPTH_TEST), + s.setFunc(ie), + ke(!1), + Re(S), + _e(e.CULL_FACE), + Ie(P); + var we = + ((r = {}), + (0, p.Z)(r, N, e.FUNC_ADD), + (0, p.Z)(r, G, e.FUNC_SUBTRACT), + (0, p.Z)(r, Z, e.FUNC_REVERSE_SUBTRACT), + r); + if (a) (we[z] = e.MIN), (we[Q] = e.MAX); + else { + var Te = t.get("EXT_blend_minmax"); + null !== Te && ((we[z] = Te.MIN_EXT), (we[Q] = Te.MAX_EXT)); + } + var Me = + ((i = {}), + (0, p.Z)(i, H, e.ZERO), + (0, p.Z)(i, V, e.ONE), + (0, p.Z)(i, j, e.SRC_COLOR), + (0, p.Z)(i, X, e.SRC_ALPHA), + (0, p.Z)(i, ee, e.SRC_ALPHA_SATURATE), + (0, p.Z)(i, K, e.DST_COLOR), + (0, p.Z)(i, q, e.DST_ALPHA), + (0, p.Z)(i, W, e.ONE_MINUS_SRC_COLOR), + (0, p.Z)(i, Y, e.ONE_MINUS_SRC_ALPHA), + (0, p.Z)(i, $, e.ONE_MINUS_DST_COLOR), + (0, p.Z)(i, J, e.ONE_MINUS_DST_ALPHA), + i); + function Ie(t, n, r, i, a, o, s, l) { + if (t !== P) { + if ((!1 === g && (_e(e.BLEND), (g = !0)), t === O)) + (a = a || n), + (o = o || r), + (s = s || i), + (n === y && a === C) || + (e.blendEquationSeparate(we[n], we[a]), (y = n), (C = a)), + (r === b && i === _ && o === w && s === T) || + (e.blendFuncSeparate(Me[r], Me[i], Me[o], Me[s]), + (b = r), + (_ = i), + (w = o), + (T = s)), + (A = t), + (M = !1); + else if (t !== A || l !== M) { + if ( + ((y === N && C === N) || + (e.blendEquation(e.FUNC_ADD), (y = N), (C = N)), + l) + ) + switch (t) { + case L: + e.blendFuncSeparate( + e.ONE, + e.ONE_MINUS_SRC_ALPHA, + e.ONE, + e.ONE_MINUS_SRC_ALPHA + ); + break; + case D: + e.blendFunc(e.ONE, e.ONE); + break; + case U: + e.blendFuncSeparate( + e.ZERO, + e.ONE_MINUS_SRC_COLOR, + e.ZERO, + e.ONE + ); + break; + case F: + 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 L: + e.blendFuncSeparate( + e.SRC_ALPHA, + e.ONE_MINUS_SRC_ALPHA, + e.ONE, + e.ONE_MINUS_SRC_ALPHA + ); + break; + case D: + e.blendFunc(e.SRC_ALPHA, e.ONE); + break; + case U: + e.blendFuncSeparate( + e.ZERO, + e.ONE_MINUS_SRC_COLOR, + e.ZERO, + e.ONE + ); + break; + case F: + e.blendFunc(e.ZERO, e.SRC_COLOR); + break; + default: + console.error("THREE.WebGLState: Invalid blending: ", t); + } + (b = null), + (_ = null), + (w = null), + (T = null), + (A = t), + (M = l); + } + } else !0 === g && (Ce(e.BLEND), (g = !1)); + } + function ke(t) { + I !== t && (t ? e.frontFace(e.CW) : e.frontFace(e.CCW), (I = t)); + } + function Re(t) { + t !== x + ? (_e(e.CULL_FACE), + t !== B && + (t === S + ? e.cullFace(e.BACK) + : t === E + ? e.cullFace(e.FRONT) + : e.cullFace(e.FRONT_AND_BACK))) + : Ce(e.CULL_FACE), + (B = t); + } + function Be(t, n, r) { + t + ? (_e(e.POLYGON_OFFSET_FILL), + (ce === n && fe === r) || + (e.polygonOffset(n, r), (ce = n), (fe = r))) + : Ce(e.POLYGON_OFFSET_FILL); + } + return { + buffers: { color: o, depth: s, stencil: l }, + enable: _e, + disable: Ce, + bindFramebuffer: function (t, n) { + return ( + d[t] !== n && + (e.bindFramebuffer(t, n), + (d[t] = n), + a && + (t === e.DRAW_FRAMEBUFFER && (d[e.FRAMEBUFFER] = n), + t === e.FRAMEBUFFER && (d[e.DRAW_FRAMEBUFFER] = n)), + !0) + ); + }, + drawBuffers: function (r, i) { + var a = v, + o = !1; + if (r) + if ( + (void 0 === (a = h.get(i)) && ((a = []), h.set(i, a)), + r.isWebGLMultipleRenderTargets) + ) { + var s = r.texture; + if (a.length !== s.length || a[0] !== e.COLOR_ATTACHMENT0) { + for (var l = 0, u = s.length; l < u; l++) + a[l] = e.COLOR_ATTACHMENT0 + l; + (a.length = s.length), (o = !0); + } + } else + a[0] !== e.COLOR_ATTACHMENT0 && + ((a[0] = e.COLOR_ATTACHMENT0), (o = !0)); + else a[0] !== e.BACK && ((a[0] = e.BACK), (o = !0)); + o && + (n.isWebGL2 + ? e.drawBuffers(a) + : t.get("WEBGL_draw_buffers").drawBuffersWEBGL(a)); + }, + useProgram: function (t) { + return m !== t && (e.useProgram(t), (m = t), !0); + }, + setBlending: Ie, + setMaterial: function (t, n) { + t.side === R ? Ce(e.CULL_FACE) : _e(e.CULL_FACE); + var r = t.side === k; + n && (r = !r), + ke(r), + t.blending === L && !1 === t.transparent + ? Ie(P) + : Ie( + t.blending, + t.blendEquation, + t.blendSrc, + t.blendDst, + t.blendEquationAlpha, + t.blendSrcAlpha, + t.blendDstAlpha, + t.premultipliedAlpha + ), + s.setFunc(t.depthFunc), + s.setTest(t.depthTest), + s.setMask(t.depthWrite), + o.setMask(t.colorWrite); + var i = t.stencilWrite; + l.setTest(i), + i && + (l.setMask(t.stencilWriteMask), + l.setFunc(t.stencilFunc, t.stencilRef, t.stencilFuncMask), + l.setOp(t.stencilFail, t.stencilZFail, t.stencilZPass)), + Be( + t.polygonOffset, + t.polygonOffsetFactor, + t.polygonOffsetUnits + ), + !0 === t.alphaToCoverage + ? _e(e.SAMPLE_ALPHA_TO_COVERAGE) + : Ce(e.SAMPLE_ALPHA_TO_COVERAGE); + }, + setFlipSided: ke, + setCullFace: Re, + setLineWidth: function (t) { + t !== ue && (he && e.lineWidth(t), (ue = t)); + }, + setPolygonOffset: Be, + setScissorTest: function (t) { + t ? _e(e.SCISSOR_TEST) : Ce(e.SCISSOR_TEST); + }, + activeTexture: function (t) { + void 0 === t && (t = e.TEXTURE0 + de - 1), + me !== t && (e.activeTexture(t), (me = t)); + }, + bindTexture: function (t, n, r) { + void 0 === r && (r = null === me ? e.TEXTURE0 + de - 1 : me); + var i = ge[r]; + void 0 === i && + ((i = { type: void 0, texture: void 0 }), (ge[r] = i)), + (i.type === t && i.texture === n) || + (me !== r && (e.activeTexture(r), (me = r)), + e.bindTexture(t, n || Ee[t]), + (i.type = t), + (i.texture = n)); + }, + unbindTexture: function () { + var t = ge[me]; + 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 (t) { + console.error("THREE.WebGLState:", t); + } + }, + compressedTexImage3D: function () { + try { + e.compressedTexImage3D.apply(e, arguments); + } catch (t) { + console.error("THREE.WebGLState:", t); + } + }, + texImage2D: function () { + try { + e.texImage2D.apply(e, arguments); + } catch (t) { + console.error("THREE.WebGLState:", t); + } + }, + texImage3D: function () { + try { + e.texImage3D.apply(e, arguments); + } catch (t) { + console.error("THREE.WebGLState:", t); + } + }, + updateUBOMapping: function (t, n) { + var r = c.get(n); + void 0 === r && ((r = new WeakMap()), c.set(n, r)); + var i = r.get(t); + void 0 === i && + ((i = e.getUniformBlockIndex(n, t.name)), r.set(t, i)); + }, + uniformBlockBinding: function (t, n) { + var r = c.get(n).get(t); + u.get(n) !== r && + (e.uniformBlockBinding(n, r, t.__bindingPointIndex), + u.set(n, r)); + }, + texStorage2D: function () { + try { + e.texStorage2D.apply(e, arguments); + } catch (t) { + console.error("THREE.WebGLState:", t); + } + }, + texStorage3D: function () { + try { + e.texStorage3D.apply(e, arguments); + } catch (t) { + console.error("THREE.WebGLState:", t); + } + }, + texSubImage2D: function () { + try { + e.texSubImage2D.apply(e, arguments); + } catch (t) { + console.error("THREE.WebGLState:", t); + } + }, + texSubImage3D: function () { + try { + e.texSubImage3D.apply(e, arguments); + } catch (t) { + console.error("THREE.WebGLState:", t); + } + }, + compressedTexSubImage2D: function () { + try { + e.compressedTexSubImage2D.apply(e, arguments); + } catch (t) { + console.error("THREE.WebGLState:", t); + } + }, + compressedTexSubImage3D: function () { + try { + e.compressedTexSubImage3D.apply(e, arguments); + } catch (t) { + console.error("THREE.WebGLState:", t); + } + }, + scissor: function (t) { + !1 === be.equals(t) && + (e.scissor(t.x, t.y, t.z, t.w), be.copy(t)); + }, + viewport: function (t) { + !1 === xe.equals(t) && + (e.viewport(t.x, t.y, t.z, t.w), xe.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.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), + !0 === a && + (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), + (f = {}), + (me = null), + (ge = {}), + (d = {}), + (h = new WeakMap()), + (v = []), + (m = null), + (g = !1), + (A = null), + (y = null), + (b = null), + (_ = null), + (C = null), + (w = null), + (T = null), + (M = !1), + (I = null), + (B = null), + (ue = null), + (ce = null), + (fe = null), + be.set(0, 0, e.canvas.width, e.canvas.height), + xe.set(0, 0, e.canvas.width, e.canvas.height), + o.reset(), + s.reset(), + l.reset(); + }, + }; + } + function Wl(e, t, n, r, i, a, o) { + var s, + l, + u, + c, + f = i.isWebGL2, + d = i.maxTextures, + h = i.maxCubemapSize, + v = i.maxTextureSize, + m = i.maxSamples, + g = t.has("WEBGL_multisampled_render_to_texture") + ? t.get("WEBGL_multisampled_render_to_texture") + : null, + A = + "undefined" !== typeof navigator && + /OculusBrowser/g.test(navigator.userAgent), + y = new WeakMap(), + b = new WeakMap(), + x = !1; + try { + x = + "undefined" !== typeof OffscreenCanvas && + null !== new OffscreenCanvas(1, 1).getContext("2d"); + } catch (W) {} + function S(e, t) { + return x ? new OffscreenCanvas(e, t) : Ar("canvas"); + } + function E(e, t, n, r) { + var i = 1; + if ( + ((e.width > r || e.height > r) && + (i = r / Math.max(e.width, e.height)), + i < 1 || !0 === t) + ) { + if ( + ("undefined" !== typeof HTMLImageElement && + e instanceof HTMLImageElement) || + ("undefined" !== typeof HTMLCanvasElement && + e instanceof HTMLCanvasElement) || + ("undefined" !== typeof ImageBitmap && e instanceof ImageBitmap) + ) { + var a = t ? lr : Math.floor, + o = a(i * e.width), + s = a(i * e.height); + void 0 === c && (c = S(o, s)); + var l = n ? S(o, s) : c; + return ( + (l.width = o), + (l.height = s), + l.getContext("2d").drawImage(e, 0, 0, o, s), + console.warn( + "THREE.WebGLRenderer: Texture has been resized from (" + + e.width + + "x" + + e.height + + ") to (" + + o + + "x" + + s + + ")." + ), + l + ); + } + return ( + "data" in e && + console.warn( + "THREE.WebGLRenderer: Image in DataTexture is too big (" + + e.width + + "x" + + e.height + + ")." + ), + e + ); + } + return e; + } + function _(e) { + return or(e.width) && or(e.height); + } + function C(e, t) { + return ( + e.generateMipmaps && t && e.minFilter !== Te && e.minFilter !== Be + ); + } + function w(t) { + e.generateMipmap(t); + } + function T(n, r, i, a) { + var o = + arguments.length > 4 && void 0 !== arguments[4] && arguments[4]; + if (!1 === f) return r; + if (null !== n) { + if (void 0 !== e[n]) return e[n]; + console.warn( + "THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format '" + + n + + "'" + ); + } + var s = r; + if ( + (r === e.RED && + (i === e.FLOAT && (s = e.R32F), + i === e.HALF_FLOAT && (s = e.R16F), + i === e.UNSIGNED_BYTE && (s = e.R8)), + r === e.RED_INTEGER && + (i === e.UNSIGNED_BYTE && (s = e.R8UI), + i === e.UNSIGNED_SHORT && (s = e.R16UI), + i === e.UNSIGNED_INT && (s = e.R32UI), + i === e.BYTE && (s = e.R8I), + i === e.SHORT && (s = e.R16I), + i === e.INT && (s = e.R32I)), + r === e.RG && + (i === e.FLOAT && (s = e.RG32F), + i === e.HALF_FLOAT && (s = e.RG16F), + i === e.UNSIGNED_BYTE && (s = e.RG8)), + r === e.RGBA) + ) { + var l = o ? un : Tr.getTransfer(a); + i === e.FLOAT && (s = e.RGBA32F), + i === e.HALF_FLOAT && (s = e.RGBA16F), + i === e.UNSIGNED_BYTE && + (s = l === cn ? e.SRGB8_ALPHA8 : e.RGBA8), + i === e.UNSIGNED_SHORT_4_4_4_4 && (s = e.RGBA4), + i === e.UNSIGNED_SHORT_5_5_5_1 && (s = e.RGB5_A1); + } + return ( + (s !== e.R16F && + s !== e.R32F && + s !== e.RG16F && + s !== e.RG32F && + s !== e.RGBA16F && + s !== e.RGBA32F) || + t.get("EXT_color_buffer_float"), + s + ); + } + function M(e, t, n) { + return !0 === C(e, n) || + (e.isFramebufferTexture && + e.minFilter !== Te && + e.minFilter !== Be) + ? 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 I(t) { + return t === Te || t === Me || t === ke ? e.NEAREST : e.LINEAR; + } + function k(e) { + var t = e.target; + t.removeEventListener("dispose", k), + (function (e) { + var t = r.get(e); + if (void 0 === t.__webglInit) return; + var n = e.source, + i = b.get(n); + if (i) { + var a = i[t.__cacheKey]; + a.usedTimes--, + 0 === a.usedTimes && B(e), + 0 === Object.keys(i).length && b.delete(n); + } + r.remove(e); + })(t), + t.isVideoTexture && y.delete(t); + } + function R(t) { + var n = t.target; + n.removeEventListener("dispose", R), + (function (t) { + var n = t.texture, + i = r.get(t), + a = r.get(n); + void 0 !== a.__webglTexture && + (e.deleteTexture(a.__webglTexture), o.memory.textures--); + t.depthTexture && t.depthTexture.dispose(); + if (t.isWebGLCubeRenderTarget) + for (var s = 0; s < 6; s++) { + if (Array.isArray(i.__webglFramebuffer[s])) + for (var l = 0; l < i.__webglFramebuffer[s].length; l++) + e.deleteFramebuffer(i.__webglFramebuffer[s][l]); + else e.deleteFramebuffer(i.__webglFramebuffer[s]); + i.__webglDepthbuffer && + e.deleteRenderbuffer(i.__webglDepthbuffer[s]); + } + else { + if (Array.isArray(i.__webglFramebuffer)) + for (var u = 0; u < i.__webglFramebuffer.length; u++) + e.deleteFramebuffer(i.__webglFramebuffer[u]); + else e.deleteFramebuffer(i.__webglFramebuffer); + if ( + (i.__webglDepthbuffer && + e.deleteRenderbuffer(i.__webglDepthbuffer), + i.__webglMultisampledFramebuffer && + e.deleteFramebuffer(i.__webglMultisampledFramebuffer), + i.__webglColorRenderbuffer) + ) + for (var c = 0; c < i.__webglColorRenderbuffer.length; c++) + i.__webglColorRenderbuffer[c] && + e.deleteRenderbuffer(i.__webglColorRenderbuffer[c]); + i.__webglDepthRenderbuffer && + e.deleteRenderbuffer(i.__webglDepthRenderbuffer); + } + if (t.isWebGLMultipleRenderTargets) + for (var f = 0, d = n.length; f < d; f++) { + var h = r.get(n[f]); + h.__webglTexture && + (e.deleteTexture(h.__webglTexture), o.memory.textures--), + r.remove(n[f]); + } + r.remove(n), r.remove(t); + })(n); + } + function B(t) { + var n = r.get(t); + e.deleteTexture(n.__webglTexture); + var i = t.source; + delete b.get(i)[n.__cacheKey], o.memory.textures--; + } + var P = 0; + function L(t, i) { + var a = r.get(t); + if ( + (t.isVideoTexture && + (function (e) { + var t = o.render.frame; + y.get(e) !== t && (y.set(e, t), e.update()); + })(t), + !1 === t.isRenderTargetTexture && + t.version > 0 && + a.__version !== t.version) + ) { + var s = t.image; + if (null === s) + console.warn( + "THREE.WebGLRenderer: Texture marked for update but no image data found." + ); + else { + if (!1 !== s.complete) return void G(a, t, i); + console.warn( + "THREE.WebGLRenderer: Texture marked for update but image is incomplete" + ); + } + } + n.bindTexture(e.TEXTURE_2D, a.__webglTexture, e.TEXTURE0 + i); + } + var D = + ((s = {}), + (0, p.Z)(s, _e, e.REPEAT), + (0, p.Z)(s, Ce, e.CLAMP_TO_EDGE), + (0, p.Z)(s, we, e.MIRRORED_REPEAT), + s), + U = + ((l = {}), + (0, p.Z)(l, Te, e.NEAREST), + (0, p.Z)(l, Me, e.NEAREST_MIPMAP_NEAREST), + (0, p.Z)(l, ke, e.NEAREST_MIPMAP_LINEAR), + (0, p.Z)(l, Be, e.LINEAR), + (0, p.Z)(l, Pe, e.LINEAR_MIPMAP_NEAREST), + (0, p.Z)(l, De, e.LINEAR_MIPMAP_LINEAR), + l), + F = + ((u = {}), + (0, p.Z)(u, In, e.NEVER), + (0, p.Z)(u, Un, e.ALWAYS), + (0, p.Z)(u, kn, e.LESS), + (0, p.Z)(u, Bn, e.LEQUAL), + (0, p.Z)(u, Rn, e.EQUAL), + (0, p.Z)(u, Dn, e.GEQUAL), + (0, p.Z)(u, Pn, e.GREATER), + (0, p.Z)(u, Ln, e.NOTEQUAL), + u); + function O(n, a, o) { + if ( + (o + ? (e.texParameteri(n, e.TEXTURE_WRAP_S, D[a.wrapS]), + e.texParameteri(n, e.TEXTURE_WRAP_T, D[a.wrapT]), + (n !== e.TEXTURE_3D && n !== e.TEXTURE_2D_ARRAY) || + e.texParameteri(n, e.TEXTURE_WRAP_R, D[a.wrapR]), + e.texParameteri(n, e.TEXTURE_MAG_FILTER, U[a.magFilter]), + e.texParameteri(n, e.TEXTURE_MIN_FILTER, U[a.minFilter])) + : (e.texParameteri(n, e.TEXTURE_WRAP_S, e.CLAMP_TO_EDGE), + e.texParameteri(n, e.TEXTURE_WRAP_T, e.CLAMP_TO_EDGE), + (n !== e.TEXTURE_3D && n !== e.TEXTURE_2D_ARRAY) || + e.texParameteri(n, e.TEXTURE_WRAP_R, e.CLAMP_TO_EDGE), + (a.wrapS === Ce && a.wrapT === Ce) || + console.warn( + "THREE.WebGLRenderer: Texture is not power of two. Texture.wrapS and Texture.wrapT should be set to THREE.ClampToEdgeWrapping." + ), + e.texParameteri(n, e.TEXTURE_MAG_FILTER, I(a.magFilter)), + e.texParameteri(n, e.TEXTURE_MIN_FILTER, I(a.minFilter)), + a.minFilter !== Te && + a.minFilter !== Be && + console.warn( + "THREE.WebGLRenderer: Texture is not power of two. Texture.minFilter should be set to THREE.NearestFilter or THREE.LinearFilter." + )), + a.compareFunction && + (e.texParameteri( + n, + e.TEXTURE_COMPARE_MODE, + e.COMPARE_REF_TO_TEXTURE + ), + e.texParameteri( + n, + e.TEXTURE_COMPARE_FUNC, + F[a.compareFunction] + )), + !0 === t.has("EXT_texture_filter_anisotropic")) + ) { + var s = t.get("EXT_texture_filter_anisotropic"); + if (a.magFilter === Te) return; + if (a.minFilter !== ke && a.minFilter !== De) return; + if (a.type === Qe && !1 === t.has("OES_texture_float_linear")) + return; + if ( + !1 === f && + a.type === He && + !1 === t.has("OES_texture_half_float_linear") + ) + return; + (a.anisotropy > 1 || r.get(a).__currentAnisotropy) && + (e.texParameterf( + n, + s.TEXTURE_MAX_ANISOTROPY_EXT, + Math.min(a.anisotropy, i.getMaxAnisotropy()) + ), + (r.get(a).__currentAnisotropy = a.anisotropy)); + } + } + function N(t, n) { + var r = !1; + void 0 === t.__webglInit && + ((t.__webglInit = !0), n.addEventListener("dispose", k)); + var i = n.source, + a = b.get(i); + void 0 === a && ((a = {}), b.set(i, a)); + var s = (function (e) { + var 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 (s !== t.__cacheKey) { + void 0 === a[s] && + ((a[s] = { texture: e.createTexture(), usedTimes: 0 }), + o.memory.textures++, + (r = !0)), + a[s].usedTimes++; + var l = a[t.__cacheKey]; + void 0 !== l && + (a[t.__cacheKey].usedTimes--, 0 === l.usedTimes && B(n)), + (t.__cacheKey = s), + (t.__webglTexture = a[s].texture); + } + return r; + } + function G(t, i, o) { + var s = e.TEXTURE_2D; + (i.isDataArrayTexture || i.isCompressedArrayTexture) && + (s = e.TEXTURE_2D_ARRAY), + i.isData3DTexture && (s = e.TEXTURE_3D); + var l = N(t, i), + u = i.source; + n.bindTexture(s, t.__webglTexture, e.TEXTURE0 + o); + var c = r.get(u); + if (u.version !== c.__version || !0 === l) { + n.activeTexture(e.TEXTURE0 + o); + var d = Tr.getPrimaries(Tr.workingColorSpace), + h = i.colorSpace === rn ? null : Tr.getPrimaries(i.colorSpace), + p = + i.colorSpace === rn || d === h + ? e.NONE + : e.BROWSER_DEFAULT_WEBGL; + e.pixelStorei(e.UNPACK_FLIP_Y_WEBGL, i.flipY), + e.pixelStorei( + e.UNPACK_PREMULTIPLY_ALPHA_WEBGL, + i.premultiplyAlpha + ), + e.pixelStorei(e.UNPACK_ALIGNMENT, i.unpackAlignment), + e.pixelStorei(e.UNPACK_COLORSPACE_CONVERSION_WEBGL, p); + var m, + g = + (function (e) { + return ( + !f && + (e.wrapS !== Ce || + e.wrapT !== Ce || + (e.minFilter !== Te && e.minFilter !== Be)) + ); + })(i) && !1 === _(i.image), + A = E(i.image, g, !1, v), + y = _((A = j(i, A))) || f, + b = a.convert(i.format, i.colorSpace), + x = a.convert(i.type), + S = T(i.internalFormat, b, x, i.colorSpace, i.isVideoTexture); + O(s, i, y); + var I = i.mipmaps, + k = f && !0 !== i.isVideoTexture, + R = void 0 === c.__version || !0 === l, + B = M(i, A, y); + if (i.isDepthTexture) + (S = e.DEPTH_COMPONENT), + f + ? (S = + i.type === Qe + ? e.DEPTH_COMPONENT32F + : i.type === ze + ? e.DEPTH_COMPONENT24 + : i.type === We + ? e.DEPTH24_STENCIL8 + : e.DEPTH_COMPONENT16) + : i.type === Qe && + console.error( + "WebGLRenderer: Floating point depth texture requires WebGL2." + ), + i.format === Ke && + S === e.DEPTH_COMPONENT && + i.type !== Ge && + i.type !== ze && + (console.warn( + "THREE.WebGLRenderer: Use UnsignedShortType or UnsignedIntType for DepthFormat DepthTexture." + ), + (i.type = ze), + (x = a.convert(i.type))), + i.format === $e && + S === e.DEPTH_COMPONENT && + ((S = e.DEPTH_STENCIL), + i.type !== We && + (console.warn( + "THREE.WebGLRenderer: Use UnsignedInt248Type for DepthStencilFormat DepthTexture." + ), + (i.type = We), + (x = a.convert(i.type)))), + R && + (k + ? n.texStorage2D(e.TEXTURE_2D, 1, S, A.width, A.height) + : n.texImage2D( + e.TEXTURE_2D, + 0, + S, + A.width, + A.height, + 0, + b, + x, + null + )); + else if (i.isDataTexture) + if (I.length > 0 && y) { + k && + R && + n.texStorage2D(e.TEXTURE_2D, B, S, I[0].width, I[0].height); + for (var P = 0, L = I.length; P < L; P++) + (m = I[P]), + k + ? n.texSubImage2D( + e.TEXTURE_2D, + P, + 0, + 0, + m.width, + m.height, + b, + x, + m.data + ) + : n.texImage2D( + e.TEXTURE_2D, + P, + S, + m.width, + m.height, + 0, + b, + x, + m.data + ); + i.generateMipmaps = !1; + } else + k + ? (R && + n.texStorage2D(e.TEXTURE_2D, B, S, A.width, A.height), + n.texSubImage2D( + e.TEXTURE_2D, + 0, + 0, + 0, + A.width, + A.height, + b, + x, + A.data + )) + : n.texImage2D( + e.TEXTURE_2D, + 0, + S, + A.width, + A.height, + 0, + b, + x, + A.data + ); + else if (i.isCompressedTexture) + if (i.isCompressedArrayTexture) { + k && + R && + n.texStorage3D( + e.TEXTURE_2D_ARRAY, + B, + S, + I[0].width, + I[0].height, + A.depth + ); + for (var D = 0, U = I.length; D < U; D++) + (m = I[D]), + i.format !== Ye + ? null !== b + ? k + ? n.compressedTexSubImage3D( + e.TEXTURE_2D_ARRAY, + D, + 0, + 0, + 0, + m.width, + m.height, + A.depth, + b, + m.data, + 0, + 0 + ) + : n.compressedTexImage3D( + e.TEXTURE_2D_ARRAY, + D, + S, + m.width, + m.height, + A.depth, + 0, + m.data, + 0, + 0 + ) + : console.warn( + "THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()" + ) + : k + ? n.texSubImage3D( + e.TEXTURE_2D_ARRAY, + D, + 0, + 0, + 0, + m.width, + m.height, + A.depth, + b, + x, + m.data + ) + : n.texImage3D( + e.TEXTURE_2D_ARRAY, + D, + S, + m.width, + m.height, + A.depth, + 0, + b, + x, + m.data + ); + } else { + k && + R && + n.texStorage2D(e.TEXTURE_2D, B, S, I[0].width, I[0].height); + for (var F = 0, G = I.length; F < G; F++) + (m = I[F]), + i.format !== Ye + ? null !== b + ? k + ? n.compressedTexSubImage2D( + e.TEXTURE_2D, + F, + 0, + 0, + m.width, + m.height, + b, + m.data + ) + : n.compressedTexImage2D( + e.TEXTURE_2D, + F, + S, + m.width, + m.height, + 0, + m.data + ) + : console.warn( + "THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()" + ) + : k + ? n.texSubImage2D( + e.TEXTURE_2D, + F, + 0, + 0, + m.width, + m.height, + b, + x, + m.data + ) + : n.texImage2D( + e.TEXTURE_2D, + F, + S, + m.width, + m.height, + 0, + b, + x, + m.data + ); + } + else if (i.isDataArrayTexture) + k + ? (R && + n.texStorage3D( + e.TEXTURE_2D_ARRAY, + B, + S, + A.width, + A.height, + A.depth + ), + n.texSubImage3D( + e.TEXTURE_2D_ARRAY, + 0, + 0, + 0, + 0, + A.width, + A.height, + A.depth, + b, + x, + A.data + )) + : n.texImage3D( + e.TEXTURE_2D_ARRAY, + 0, + S, + A.width, + A.height, + A.depth, + 0, + b, + x, + A.data + ); + else if (i.isData3DTexture) + k + ? (R && + n.texStorage3D( + e.TEXTURE_3D, + B, + S, + A.width, + A.height, + A.depth + ), + n.texSubImage3D( + e.TEXTURE_3D, + 0, + 0, + 0, + 0, + A.width, + A.height, + A.depth, + b, + x, + A.data + )) + : n.texImage3D( + e.TEXTURE_3D, + 0, + S, + A.width, + A.height, + A.depth, + 0, + b, + x, + A.data + ); + else if (i.isFramebufferTexture) { + if (R) + if (k) n.texStorage2D(e.TEXTURE_2D, B, S, A.width, A.height); + else + for (var Z = A.width, z = A.height, Q = 0; Q < B; Q++) + n.texImage2D(e.TEXTURE_2D, Q, S, Z, z, 0, b, x, null), + (Z >>= 1), + (z >>= 1); + } else if (I.length > 0 && y) { + k && + R && + n.texStorage2D(e.TEXTURE_2D, B, S, I[0].width, I[0].height); + for (var H = 0, V = I.length; H < V; H++) + (m = I[H]), + k + ? n.texSubImage2D(e.TEXTURE_2D, H, 0, 0, b, x, m) + : n.texImage2D(e.TEXTURE_2D, H, S, b, x, m); + i.generateMipmaps = !1; + } else + k + ? (R && n.texStorage2D(e.TEXTURE_2D, B, S, A.width, A.height), + n.texSubImage2D(e.TEXTURE_2D, 0, 0, 0, b, x, A)) + : n.texImage2D(e.TEXTURE_2D, 0, S, b, x, A); + C(i, y) && w(s), + (c.__version = u.version), + i.onUpdate && i.onUpdate(i); + } + t.__version = i.version; + } + function Z(t, i, o, s, l, u) { + var c = a.convert(o.format, o.colorSpace), + f = a.convert(o.type), + d = T(o.internalFormat, c, f, o.colorSpace); + if (!r.get(i).__hasExternalTextures) { + var h = Math.max(1, i.width >> u), + p = Math.max(1, i.height >> u); + l === e.TEXTURE_3D || l === e.TEXTURE_2D_ARRAY + ? n.texImage3D(l, u, d, h, p, i.depth, 0, c, f, null) + : n.texImage2D(l, u, d, h, p, 0, c, f, null); + } + n.bindFramebuffer(e.FRAMEBUFFER, t), + V(i) + ? g.framebufferTexture2DMultisampleEXT( + e.FRAMEBUFFER, + s, + l, + r.get(o).__webglTexture, + 0, + H(i) + ) + : (l === e.TEXTURE_2D || + (l >= e.TEXTURE_CUBE_MAP_POSITIVE_X && + l <= e.TEXTURE_CUBE_MAP_NEGATIVE_Z)) && + e.framebufferTexture2D( + e.FRAMEBUFFER, + s, + l, + r.get(o).__webglTexture, + u + ), + n.bindFramebuffer(e.FRAMEBUFFER, null); + } + function z(t, n, r) { + if ( + (e.bindRenderbuffer(e.RENDERBUFFER, t), + n.depthBuffer && !n.stencilBuffer) + ) { + var i = !0 === f ? e.DEPTH_COMPONENT24 : e.DEPTH_COMPONENT16; + if (r || V(n)) { + var o = n.depthTexture; + o && + o.isDepthTexture && + (o.type === Qe + ? (i = e.DEPTH_COMPONENT32F) + : o.type === ze && (i = e.DEPTH_COMPONENT24)); + var s = H(n); + V(n) + ? g.renderbufferStorageMultisampleEXT( + e.RENDERBUFFER, + s, + i, + n.width, + n.height + ) + : e.renderbufferStorageMultisample( + e.RENDERBUFFER, + s, + i, + n.width, + n.height + ); + } else + e.renderbufferStorage(e.RENDERBUFFER, i, n.width, n.height); + e.framebufferRenderbuffer( + e.FRAMEBUFFER, + e.DEPTH_ATTACHMENT, + e.RENDERBUFFER, + t + ); + } else if (n.depthBuffer && n.stencilBuffer) { + var l = H(n); + r && !1 === V(n) + ? e.renderbufferStorageMultisample( + e.RENDERBUFFER, + l, + e.DEPTH24_STENCIL8, + n.width, + n.height + ) + : V(n) + ? g.renderbufferStorageMultisampleEXT( + e.RENDERBUFFER, + l, + e.DEPTH24_STENCIL8, + n.width, + n.height + ) + : e.renderbufferStorage( + e.RENDERBUFFER, + e.DEPTH_STENCIL, + n.width, + n.height + ), + e.framebufferRenderbuffer( + e.FRAMEBUFFER, + e.DEPTH_STENCIL_ATTACHMENT, + e.RENDERBUFFER, + t + ); + } else + for ( + var u = + !0 === n.isWebGLMultipleRenderTargets + ? n.texture + : [n.texture], + c = 0; + c < u.length; + c++ + ) { + var d = u[c], + h = a.convert(d.format, d.colorSpace), + p = a.convert(d.type), + v = T(d.internalFormat, h, p, d.colorSpace), + m = H(n); + r && !1 === V(n) + ? e.renderbufferStorageMultisample( + e.RENDERBUFFER, + m, + v, + n.width, + n.height + ) + : V(n) + ? g.renderbufferStorageMultisampleEXT( + e.RENDERBUFFER, + m, + v, + n.width, + n.height + ) + : e.renderbufferStorage(e.RENDERBUFFER, v, n.width, n.height); + } + e.bindRenderbuffer(e.RENDERBUFFER, null); + } + function Q(t) { + var i = r.get(t), + a = !0 === t.isWebGLCubeRenderTarget; + if (t.depthTexture && !i.__autoAllocateDepthBuffer) { + if (a) + 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)), + L(i.depthTexture, 0); + var a = r.get(i.depthTexture).__webglTexture, + o = H(i); + if (i.depthTexture.format === Ke) + V(i) + ? g.framebufferTexture2DMultisampleEXT( + e.FRAMEBUFFER, + e.DEPTH_ATTACHMENT, + e.TEXTURE_2D, + a, + 0, + o + ) + : e.framebufferTexture2D( + e.FRAMEBUFFER, + e.DEPTH_ATTACHMENT, + e.TEXTURE_2D, + a, + 0 + ); + else { + if (i.depthTexture.format !== $e) + throw new Error("Unknown depthTexture format"); + V(i) + ? g.framebufferTexture2DMultisampleEXT( + e.FRAMEBUFFER, + e.DEPTH_STENCIL_ATTACHMENT, + e.TEXTURE_2D, + a, + 0, + o + ) + : e.framebufferTexture2D( + e.FRAMEBUFFER, + e.DEPTH_STENCIL_ATTACHMENT, + e.TEXTURE_2D, + a, + 0 + ); + } + })(i.__webglFramebuffer, t); + } else if (a) { + i.__webglDepthbuffer = []; + for (var o = 0; o < 6; o++) + n.bindFramebuffer(e.FRAMEBUFFER, i.__webglFramebuffer[o]), + (i.__webglDepthbuffer[o] = e.createRenderbuffer()), + z(i.__webglDepthbuffer[o], t, !1); + } else + n.bindFramebuffer(e.FRAMEBUFFER, i.__webglFramebuffer), + (i.__webglDepthbuffer = e.createRenderbuffer()), + z(i.__webglDepthbuffer, t, !1); + n.bindFramebuffer(e.FRAMEBUFFER, null); + } + function H(e) { + return Math.min(m, e.samples); + } + function V(e) { + var n = r.get(e); + return ( + f && + e.samples > 0 && + !0 === t.has("WEBGL_multisampled_render_to_texture") && + !1 !== n.__useRenderToTexture + ); + } + function j(e, n) { + var r = e.colorSpace, + i = e.format, + a = e.type; + return ( + !0 === e.isCompressedTexture || + !0 === e.isVideoTexture || + e.format === Xn || + (r !== on && + r !== rn && + (Tr.getTransfer(r) === cn + ? !1 === f + ? !0 === t.has("EXT_sRGB") && i === Ye + ? ((e.format = Xn), + (e.minFilter = Be), + (e.generateMipmaps = !1)) + : (n = kr.sRGBToLinear(n)) + : (i === Ye && a === Fe) || + console.warn( + "THREE.WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType." + ) + : console.error( + "THREE.WebGLTextures: Unsupported texture color space:", + r + ))), + n + ); + } + (this.allocateTextureUnit = function () { + var e = P; + return ( + e >= d && + console.warn( + "THREE.WebGLTextures: Trying to use " + + e + + " texture units while this GPU supports only " + + d + ), + (P += 1), + e + ); + }), + (this.resetTextureUnits = function () { + P = 0; + }), + (this.setTexture2D = L), + (this.setTexture2DArray = function (t, i) { + var a = r.get(t); + t.version > 0 && a.__version !== t.version + ? G(a, t, i) + : n.bindTexture( + e.TEXTURE_2D_ARRAY, + a.__webglTexture, + e.TEXTURE0 + i + ); + }), + (this.setTexture3D = function (t, i) { + var a = r.get(t); + t.version > 0 && a.__version !== t.version + ? G(a, t, i) + : n.bindTexture(e.TEXTURE_3D, a.__webglTexture, e.TEXTURE0 + i); + }), + (this.setTextureCube = function (t, i) { + var o = r.get(t); + t.version > 0 && o.__version !== t.version + ? (function (t, i, o) { + if (6 !== i.image.length) return; + var s = N(t, i), + l = i.source; + n.bindTexture( + e.TEXTURE_CUBE_MAP, + t.__webglTexture, + e.TEXTURE0 + o + ); + var u = r.get(l); + if (l.version !== u.__version || !0 === s) { + n.activeTexture(e.TEXTURE0 + o); + var c = Tr.getPrimaries(Tr.workingColorSpace), + d = + i.colorSpace === rn + ? null + : Tr.getPrimaries(i.colorSpace), + p = + i.colorSpace === rn || c === d + ? e.NONE + : e.BROWSER_DEFAULT_WEBGL; + e.pixelStorei(e.UNPACK_FLIP_Y_WEBGL, i.flipY), + e.pixelStorei( + e.UNPACK_PREMULTIPLY_ALPHA_WEBGL, + i.premultiplyAlpha + ), + e.pixelStorei(e.UNPACK_ALIGNMENT, i.unpackAlignment), + e.pixelStorei(e.UNPACK_COLORSPACE_CONVERSION_WEBGL, p); + for ( + var v = + i.isCompressedTexture || + i.image[0].isCompressedTexture, + m = i.image[0] && i.image[0].isDataTexture, + g = [], + A = 0; + A < 6; + A++ + ) + (g[A] = + v || m + ? m + ? i.image[A].image + : i.image[A] + : E(i.image[A], !1, !0, h)), + (g[A] = j(i, g[A])); + var y, + b = g[0], + x = _(b) || f, + S = a.convert(i.format, i.colorSpace), + I = a.convert(i.type), + k = T(i.internalFormat, S, I, i.colorSpace), + R = f && !0 !== i.isVideoTexture, + B = void 0 === u.__version || !0 === s, + P = M(i, b, x); + if ((O(e.TEXTURE_CUBE_MAP, i, x), v)) { + R && + B && + n.texStorage2D( + e.TEXTURE_CUBE_MAP, + P, + k, + b.width, + b.height + ); + for (var L = 0; L < 6; L++) { + y = g[L].mipmaps; + for (var D = 0; D < y.length; D++) { + var U = y[D]; + i.format !== Ye + ? null !== S + ? R + ? n.compressedTexSubImage2D( + e.TEXTURE_CUBE_MAP_POSITIVE_X + L, + D, + 0, + 0, + U.width, + U.height, + S, + U.data + ) + : n.compressedTexImage2D( + e.TEXTURE_CUBE_MAP_POSITIVE_X + L, + D, + k, + U.width, + U.height, + 0, + U.data + ) + : console.warn( + "THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .setTextureCube()" + ) + : R + ? n.texSubImage2D( + e.TEXTURE_CUBE_MAP_POSITIVE_X + L, + D, + 0, + 0, + U.width, + U.height, + S, + I, + U.data + ) + : n.texImage2D( + e.TEXTURE_CUBE_MAP_POSITIVE_X + L, + D, + k, + U.width, + U.height, + 0, + S, + I, + U.data + ); + } + } + } else { + (y = i.mipmaps), + R && + B && + (y.length > 0 && P++, + n.texStorage2D( + e.TEXTURE_CUBE_MAP, + P, + k, + g[0].width, + g[0].height + )); + for (var F = 0; F < 6; F++) + if (m) { + R + ? n.texSubImage2D( + e.TEXTURE_CUBE_MAP_POSITIVE_X + F, + 0, + 0, + 0, + g[F].width, + g[F].height, + S, + I, + g[F].data + ) + : n.texImage2D( + e.TEXTURE_CUBE_MAP_POSITIVE_X + F, + 0, + k, + g[F].width, + g[F].height, + 0, + S, + I, + g[F].data + ); + for (var G = 0; G < y.length; G++) { + var Z = y[G].image[F].image; + R + ? n.texSubImage2D( + e.TEXTURE_CUBE_MAP_POSITIVE_X + F, + G + 1, + 0, + 0, + Z.width, + Z.height, + S, + I, + Z.data + ) + : n.texImage2D( + e.TEXTURE_CUBE_MAP_POSITIVE_X + F, + G + 1, + k, + Z.width, + Z.height, + 0, + S, + I, + Z.data + ); + } + } else { + R + ? n.texSubImage2D( + e.TEXTURE_CUBE_MAP_POSITIVE_X + F, + 0, + 0, + 0, + S, + I, + g[F] + ) + : n.texImage2D( + e.TEXTURE_CUBE_MAP_POSITIVE_X + F, + 0, + k, + S, + I, + g[F] + ); + for (var z = 0; z < y.length; z++) { + var Q = y[z]; + R + ? n.texSubImage2D( + e.TEXTURE_CUBE_MAP_POSITIVE_X + F, + z + 1, + 0, + 0, + S, + I, + Q.image[F] + ) + : n.texImage2D( + e.TEXTURE_CUBE_MAP_POSITIVE_X + F, + z + 1, + k, + S, + I, + Q.image[F] + ); + } + } + } + C(i, x) && w(e.TEXTURE_CUBE_MAP), + (u.__version = l.version), + i.onUpdate && i.onUpdate(i); + } + t.__version = i.version; + })(o, t, i) + : n.bindTexture( + e.TEXTURE_CUBE_MAP, + o.__webglTexture, + e.TEXTURE0 + i + ); + }), + (this.rebindTextures = function (t, n, i) { + var a = r.get(t); + void 0 !== n && + Z( + a.__webglFramebuffer, + t, + t.texture, + e.COLOR_ATTACHMENT0, + e.TEXTURE_2D, + 0 + ), + void 0 !== i && Q(t); + }), + (this.setupRenderTarget = function (t) { + var s = t.texture, + l = r.get(t), + u = r.get(s); + t.addEventListener("dispose", R), + !0 !== t.isWebGLMultipleRenderTargets && + (void 0 === u.__webglTexture && + (u.__webglTexture = e.createTexture()), + (u.__version = s.version), + o.memory.textures++); + var c = !0 === t.isWebGLCubeRenderTarget, + d = !0 === t.isWebGLMultipleRenderTargets, + h = _(t) || f; + if (c) { + l.__webglFramebuffer = []; + for (var p = 0; p < 6; p++) + if (f && s.mipmaps && s.mipmaps.length > 0) { + l.__webglFramebuffer[p] = []; + for (var v = 0; v < s.mipmaps.length; v++) + l.__webglFramebuffer[p][v] = e.createFramebuffer(); + } else l.__webglFramebuffer[p] = e.createFramebuffer(); + } else { + if (f && s.mipmaps && s.mipmaps.length > 0) { + l.__webglFramebuffer = []; + for (var m = 0; m < s.mipmaps.length; m++) + l.__webglFramebuffer[m] = e.createFramebuffer(); + } else l.__webglFramebuffer = e.createFramebuffer(); + if (d) + if (i.drawBuffers) + for (var g = t.texture, A = 0, y = g.length; A < y; A++) { + var b = r.get(g[A]); + void 0 === b.__webglTexture && + ((b.__webglTexture = e.createTexture()), + o.memory.textures++); + } + else + console.warn( + "THREE.WebGLRenderer: WebGLMultipleRenderTargets can only be used with WebGL2 or WEBGL_draw_buffers extension." + ); + if (f && t.samples > 0 && !1 === V(t)) { + var x = d ? s : [s]; + (l.__webglMultisampledFramebuffer = e.createFramebuffer()), + (l.__webglColorRenderbuffer = []), + n.bindFramebuffer( + e.FRAMEBUFFER, + l.__webglMultisampledFramebuffer + ); + for (var S = 0; S < x.length; S++) { + var E = x[S]; + (l.__webglColorRenderbuffer[S] = e.createRenderbuffer()), + e.bindRenderbuffer( + e.RENDERBUFFER, + l.__webglColorRenderbuffer[S] + ); + var M = a.convert(E.format, E.colorSpace), + I = a.convert(E.type), + k = T( + E.internalFormat, + M, + I, + E.colorSpace, + !0 === t.isXRRenderTarget + ), + B = H(t); + e.renderbufferStorageMultisample( + e.RENDERBUFFER, + B, + k, + t.width, + t.height + ), + e.framebufferRenderbuffer( + e.FRAMEBUFFER, + e.COLOR_ATTACHMENT0 + S, + e.RENDERBUFFER, + l.__webglColorRenderbuffer[S] + ); + } + e.bindRenderbuffer(e.RENDERBUFFER, null), + t.depthBuffer && + ((l.__webglDepthRenderbuffer = e.createRenderbuffer()), + z(l.__webglDepthRenderbuffer, t, !0)), + n.bindFramebuffer(e.FRAMEBUFFER, null); + } + } + if (c) { + n.bindTexture(e.TEXTURE_CUBE_MAP, u.__webglTexture), + O(e.TEXTURE_CUBE_MAP, s, h); + for (var P = 0; P < 6; P++) + if (f && s.mipmaps && s.mipmaps.length > 0) + for (var L = 0; L < s.mipmaps.length; L++) + Z( + l.__webglFramebuffer[P][L], + t, + s, + e.COLOR_ATTACHMENT0, + e.TEXTURE_CUBE_MAP_POSITIVE_X + P, + L + ); + else + Z( + l.__webglFramebuffer[P], + t, + s, + e.COLOR_ATTACHMENT0, + e.TEXTURE_CUBE_MAP_POSITIVE_X + P, + 0 + ); + C(s, h) && w(e.TEXTURE_CUBE_MAP), n.unbindTexture(); + } else if (d) { + for (var D = t.texture, U = 0, F = D.length; U < F; U++) { + var N = D[U], + G = r.get(N); + n.bindTexture(e.TEXTURE_2D, G.__webglTexture), + O(e.TEXTURE_2D, N, h), + Z( + l.__webglFramebuffer, + t, + N, + e.COLOR_ATTACHMENT0 + U, + e.TEXTURE_2D, + 0 + ), + C(N, h) && w(e.TEXTURE_2D); + } + n.unbindTexture(); + } else { + var j = e.TEXTURE_2D; + if ( + ((t.isWebGL3DRenderTarget || t.isWebGLArrayRenderTarget) && + (f + ? (j = t.isWebGL3DRenderTarget + ? e.TEXTURE_3D + : e.TEXTURE_2D_ARRAY) + : console.error( + "THREE.WebGLTextures: THREE.Data3DTexture and THREE.DataArrayTexture only supported with WebGL2." + )), + n.bindTexture(j, u.__webglTexture), + O(j, s, h), + f && s.mipmaps && s.mipmaps.length > 0) + ) + for (var W = 0; W < s.mipmaps.length; W++) + Z(l.__webglFramebuffer[W], t, s, e.COLOR_ATTACHMENT0, j, W); + else Z(l.__webglFramebuffer, t, s, e.COLOR_ATTACHMENT0, j, 0); + C(s, h) && w(j), n.unbindTexture(); + } + t.depthBuffer && Q(t); + }), + (this.updateRenderTargetMipmap = function (t) { + for ( + var i = _(t) || f, + a = + !0 === t.isWebGLMultipleRenderTargets + ? t.texture + : [t.texture], + o = 0, + s = a.length; + o < s; + o++ + ) { + var l = a[o]; + if (C(l, i)) { + var u = t.isWebGLCubeRenderTarget + ? e.TEXTURE_CUBE_MAP + : e.TEXTURE_2D, + c = r.get(l).__webglTexture; + n.bindTexture(u, c), w(u), n.unbindTexture(); + } + } + }), + (this.updateMultisampleRenderTarget = function (t) { + if (f && t.samples > 0 && !1 === V(t)) { + var i = t.isWebGLMultipleRenderTargets + ? t.texture + : [t.texture], + a = t.width, + o = t.height, + s = e.COLOR_BUFFER_BIT, + l = [], + u = t.stencilBuffer + ? e.DEPTH_STENCIL_ATTACHMENT + : e.DEPTH_ATTACHMENT, + c = r.get(t), + d = !0 === t.isWebGLMultipleRenderTargets; + if (d) + for (var h = 0; h < i.length; h++) + n.bindFramebuffer( + e.FRAMEBUFFER, + c.__webglMultisampledFramebuffer + ), + e.framebufferRenderbuffer( + e.FRAMEBUFFER, + e.COLOR_ATTACHMENT0 + h, + e.RENDERBUFFER, + null + ), + n.bindFramebuffer(e.FRAMEBUFFER, c.__webglFramebuffer), + e.framebufferTexture2D( + e.DRAW_FRAMEBUFFER, + e.COLOR_ATTACHMENT0 + h, + e.TEXTURE_2D, + null, + 0 + ); + n.bindFramebuffer( + e.READ_FRAMEBUFFER, + c.__webglMultisampledFramebuffer + ), + n.bindFramebuffer(e.DRAW_FRAMEBUFFER, c.__webglFramebuffer); + for (var p = 0; p < i.length; p++) { + l.push(e.COLOR_ATTACHMENT0 + p), t.depthBuffer && l.push(u); + var v = + void 0 !== c.__ignoreDepthValues && c.__ignoreDepthValues; + if ( + (!1 === v && + (t.depthBuffer && (s |= e.DEPTH_BUFFER_BIT), + t.stencilBuffer && (s |= e.STENCIL_BUFFER_BIT)), + d && + e.framebufferRenderbuffer( + e.READ_FRAMEBUFFER, + e.COLOR_ATTACHMENT0, + e.RENDERBUFFER, + c.__webglColorRenderbuffer[p] + ), + !0 === v && + (e.invalidateFramebuffer(e.READ_FRAMEBUFFER, [u]), + e.invalidateFramebuffer(e.DRAW_FRAMEBUFFER, [u])), + d) + ) { + var m = r.get(i[p]).__webglTexture; + e.framebufferTexture2D( + e.DRAW_FRAMEBUFFER, + e.COLOR_ATTACHMENT0, + e.TEXTURE_2D, + m, + 0 + ); + } + e.blitFramebuffer(0, 0, a, o, 0, 0, a, o, s, e.NEAREST), + A && e.invalidateFramebuffer(e.READ_FRAMEBUFFER, l); + } + if ( + (n.bindFramebuffer(e.READ_FRAMEBUFFER, null), + n.bindFramebuffer(e.DRAW_FRAMEBUFFER, null), + d) + ) + for (var g = 0; g < i.length; g++) { + n.bindFramebuffer( + e.FRAMEBUFFER, + c.__webglMultisampledFramebuffer + ), + e.framebufferRenderbuffer( + e.FRAMEBUFFER, + e.COLOR_ATTACHMENT0 + g, + e.RENDERBUFFER, + c.__webglColorRenderbuffer[g] + ); + var y = r.get(i[g]).__webglTexture; + n.bindFramebuffer(e.FRAMEBUFFER, c.__webglFramebuffer), + e.framebufferTexture2D( + e.DRAW_FRAMEBUFFER, + e.COLOR_ATTACHMENT0 + g, + e.TEXTURE_2D, + y, + 0 + ); + } + n.bindFramebuffer( + e.DRAW_FRAMEBUFFER, + c.__webglMultisampledFramebuffer + ); + } + }), + (this.setupDepthRenderbuffer = Q), + (this.setupFrameBufferTexture = Z), + (this.useMultisampledRTT = V); + } + function Xl(e, t, n) { + var r = n.isWebGL2; + return { + convert: function (n) { + var i, + a = + arguments.length > 1 && void 0 !== arguments[1] + ? arguments[1] + : rn, + o = Tr.getTransfer(a); + if (n === Fe) return e.UNSIGNED_BYTE; + if (n === Ve) return e.UNSIGNED_SHORT_4_4_4_4; + if (n === je) return e.UNSIGNED_SHORT_5_5_5_1; + if (n === Oe) return e.BYTE; + if (n === Ne) return e.SHORT; + if (n === Ge) return e.UNSIGNED_SHORT; + if (n === Ze) return e.INT; + if (n === ze) return e.UNSIGNED_INT; + if (n === Qe) return e.FLOAT; + if (n === He) + return r + ? e.HALF_FLOAT + : null !== (i = t.get("OES_texture_half_float")) + ? i.HALF_FLOAT_OES + : null; + if (n === Xe) return e.ALPHA; + if (n === Ye) return e.RGBA; + if (n === qe) return e.LUMINANCE; + if (n === Je) return e.LUMINANCE_ALPHA; + if (n === Ke) return e.DEPTH_COMPONENT; + if (n === $e) return e.DEPTH_STENCIL; + if (n === Xn) + return null !== (i = t.get("EXT_sRGB")) + ? i.SRGB_ALPHA_EXT + : null; + if (n === et) return e.RED; + if (n === tt) return e.RED_INTEGER; + if (n === nt) return e.RG; + if (n === rt) return e.RG_INTEGER; + if (n === it) return e.RGBA_INTEGER; + if (n === at || n === ot || n === st || n === lt) + if (o === cn) { + if ( + null === (i = t.get("WEBGL_compressed_texture_s3tc_srgb")) + ) + return null; + if (n === at) return i.COMPRESSED_SRGB_S3TC_DXT1_EXT; + if (n === ot) return i.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT; + if (n === st) return i.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT; + if (n === lt) return i.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT; + } else { + if (null === (i = t.get("WEBGL_compressed_texture_s3tc"))) + return null; + if (n === at) return i.COMPRESSED_RGB_S3TC_DXT1_EXT; + if (n === ot) return i.COMPRESSED_RGBA_S3TC_DXT1_EXT; + if (n === st) return i.COMPRESSED_RGBA_S3TC_DXT3_EXT; + if (n === lt) return i.COMPRESSED_RGBA_S3TC_DXT5_EXT; + } + if (n === ut || n === ct || n === ft || n === dt) { + if (null === (i = t.get("WEBGL_compressed_texture_pvrtc"))) + return null; + if (n === ut) return i.COMPRESSED_RGB_PVRTC_4BPPV1_IMG; + if (n === ct) return i.COMPRESSED_RGB_PVRTC_2BPPV1_IMG; + if (n === ft) return i.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG; + if (n === dt) return i.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG; + } + if (n === ht) + return null !== (i = t.get("WEBGL_compressed_texture_etc1")) + ? i.COMPRESSED_RGB_ETC1_WEBGL + : null; + if (n === pt || n === vt) { + if (null === (i = t.get("WEBGL_compressed_texture_etc"))) + return null; + if (n === pt) + return o === cn + ? i.COMPRESSED_SRGB8_ETC2 + : i.COMPRESSED_RGB8_ETC2; + if (n === vt) + return o === cn + ? i.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC + : i.COMPRESSED_RGBA8_ETC2_EAC; + } + if ( + n === mt || + n === gt || + n === At || + n === yt || + n === bt || + n === xt || + n === St || + n === Et || + n === _t || + n === Ct || + n === wt || + n === Tt || + n === Mt || + n === It + ) { + if (null === (i = t.get("WEBGL_compressed_texture_astc"))) + return null; + if (n === mt) + return o === cn + ? i.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR + : i.COMPRESSED_RGBA_ASTC_4x4_KHR; + if (n === gt) + return o === cn + ? i.COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR + : i.COMPRESSED_RGBA_ASTC_5x4_KHR; + if (n === At) + return o === cn + ? i.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR + : i.COMPRESSED_RGBA_ASTC_5x5_KHR; + if (n === yt) + return o === cn + ? i.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR + : i.COMPRESSED_RGBA_ASTC_6x5_KHR; + if (n === bt) + return o === cn + ? i.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR + : i.COMPRESSED_RGBA_ASTC_6x6_KHR; + if (n === xt) + return o === cn + ? i.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR + : i.COMPRESSED_RGBA_ASTC_8x5_KHR; + if (n === St) + return o === cn + ? i.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR + : i.COMPRESSED_RGBA_ASTC_8x6_KHR; + if (n === Et) + return o === cn + ? i.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR + : i.COMPRESSED_RGBA_ASTC_8x8_KHR; + if (n === _t) + return o === cn + ? i.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR + : i.COMPRESSED_RGBA_ASTC_10x5_KHR; + if (n === Ct) + return o === cn + ? i.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR + : i.COMPRESSED_RGBA_ASTC_10x6_KHR; + if (n === wt) + return o === cn + ? i.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR + : i.COMPRESSED_RGBA_ASTC_10x8_KHR; + if (n === Tt) + return o === cn + ? i.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR + : i.COMPRESSED_RGBA_ASTC_10x10_KHR; + if (n === Mt) + return o === cn + ? i.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR + : i.COMPRESSED_RGBA_ASTC_12x10_KHR; + if (n === It) + return o === cn + ? i.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR + : i.COMPRESSED_RGBA_ASTC_12x12_KHR; + } + if (n === kt || n === Rt || n === Bt) { + if (null === (i = t.get("EXT_texture_compression_bptc"))) + return null; + if (n === kt) + return o === cn + ? i.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT + : i.COMPRESSED_RGBA_BPTC_UNORM_EXT; + if (n === Rt) return i.COMPRESSED_RGB_BPTC_SIGNED_FLOAT_EXT; + if (n === Bt) return i.COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_EXT; + } + if (n === Pt || n === Lt || n === Dt || n === Ut) { + if (null === (i = t.get("EXT_texture_compression_rgtc"))) + return null; + if (n === kt) return i.COMPRESSED_RED_RGTC1_EXT; + if (n === Lt) return i.COMPRESSED_SIGNED_RED_RGTC1_EXT; + if (n === Dt) return i.COMPRESSED_RED_GREEN_RGTC2_EXT; + if (n === Ut) return i.COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT; + } + return n === We + ? r + ? e.UNSIGNED_INT_24_8 + : null !== (i = t.get("WEBGL_depth_texture")) + ? i.UNSIGNED_INT_24_8_WEBGL + : null + : void 0 !== e[n] + ? e[n] + : null; + }, + }; + } + var Yl = (function (e) { + (0, d.Z)(n, e); + var t = (0, h.Z)(n); + function n() { + var e, + r = + arguments.length > 0 && void 0 !== arguments[0] + ? arguments[0] + : []; + return ( + (0, m.Z)(this, n), + ((e = t.call(this)).isArrayCamera = !0), + (e.cameras = r), + e + ); + } + return (0, g.Z)(n); + })(ho), + ql = (function (e) { + (0, d.Z)(n, e); + var t = (0, h.Z)(n); + function n() { + var e; + return ( + (0, m.Z)(this, n), + ((e = t.call(this)).isGroup = !0), + (e.type = "Group"), + e + ); + } + return (0, g.Z)(n); + })(ji), + Jl = { type: "move" }, + Kl = (function () { + function e() { + (0, m.Z)(this, e), + (this._targetRay = null), + (this._grip = null), + (this._hand = null); + } + return ( + (0, g.Z)(e, [ + { + key: "getHandSpace", + value: function () { + return ( + null === this._hand && + ((this._hand = new ql()), + (this._hand.matrixAutoUpdate = !1), + (this._hand.visible = !1), + (this._hand.joints = {}), + (this._hand.inputState = { pinching: !1 })), + this._hand + ); + }, + }, + { + key: "getTargetRaySpace", + value: function () { + return ( + null === this._targetRay && + ((this._targetRay = new ql()), + (this._targetRay.matrixAutoUpdate = !1), + (this._targetRay.visible = !1), + (this._targetRay.hasLinearVelocity = !1), + (this._targetRay.linearVelocity = new Vr()), + (this._targetRay.hasAngularVelocity = !1), + (this._targetRay.angularVelocity = new Vr())), + this._targetRay + ); + }, + }, + { + key: "getGripSpace", + value: function () { + return ( + null === this._grip && + ((this._grip = new ql()), + (this._grip.matrixAutoUpdate = !1), + (this._grip.visible = !1), + (this._grip.hasLinearVelocity = !1), + (this._grip.linearVelocity = new Vr()), + (this._grip.hasAngularVelocity = !1), + (this._grip.angularVelocity = new Vr())), + this._grip + ); + }, + }, + { + key: "dispatchEvent", + value: function (e) { + return ( + null !== this._targetRay && + this._targetRay.dispatchEvent(e), + null !== this._grip && this._grip.dispatchEvent(e), + null !== this._hand && this._hand.dispatchEvent(e), + this + ); + }, + }, + { + key: "connect", + value: function (e) { + if (e && e.hand) { + var t = this._hand; + if (t) { + var n, + r = (0, o.Z)(e.hand.values()); + try { + for (r.s(); !(n = r.n()).done; ) { + var i = n.value; + this._getHandJoint(t, i); + } + } catch (a) { + r.e(a); + } finally { + r.f(); + } + } + } + return ( + this.dispatchEvent({ type: "connected", data: e }), this + ); + }, + }, + { + key: "disconnect", + value: function (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 + ); + }, + }, + { + key: "update", + value: function (e, t, n) { + var r = null, + i = null, + a = null, + s = this._targetRay, + l = this._grip, + u = this._hand; + if (e && "visible-blurred" !== t.session.visibilityState) { + if (u && e.hand) { + a = !0; + var c, + f = (0, o.Z)(e.hand.values()); + try { + for (f.s(); !(c = f.n()).done; ) { + var d = c.value, + h = t.getJointPose(d, n), + p = this._getHandJoint(u, d); + null !== h && + (p.matrix.fromArray(h.transform.matrix), + p.matrix.decompose( + p.position, + p.rotation, + p.scale + ), + (p.matrixWorldNeedsUpdate = !0), + (p.jointRadius = h.radius)), + (p.visible = null !== h); + } + } catch (A) { + f.e(A); + } finally { + f.f(); + } + var v = u.joints["index-finger-tip"], + m = u.joints["thumb-tip"], + g = v.position.distanceTo(m.position); + u.inputState.pinching && g > 0.025 + ? ((u.inputState.pinching = !1), + this.dispatchEvent({ + type: "pinchend", + handedness: e.handedness, + target: this, + })) + : !u.inputState.pinching && + g <= 0.015 && + ((u.inputState.pinching = !0), + this.dispatchEvent({ + type: "pinchstart", + handedness: e.handedness, + target: this, + })); + } else + null !== l && + e.gripSpace && + null !== (i = t.getPose(e.gripSpace, n)) && + (l.matrix.fromArray(i.transform.matrix), + l.matrix.decompose(l.position, l.rotation, l.scale), + (l.matrixWorldNeedsUpdate = !0), + i.linearVelocity + ? ((l.hasLinearVelocity = !0), + l.linearVelocity.copy(i.linearVelocity)) + : (l.hasLinearVelocity = !1), + i.angularVelocity + ? ((l.hasAngularVelocity = !0), + l.angularVelocity.copy(i.angularVelocity)) + : (l.hasAngularVelocity = !1)); + null !== s && + (null === (r = t.getPose(e.targetRaySpace, n)) && + null !== i && + (r = i), + null !== r && + (s.matrix.fromArray(r.transform.matrix), + s.matrix.decompose(s.position, s.rotation, s.scale), + (s.matrixWorldNeedsUpdate = !0), + r.linearVelocity + ? ((s.hasLinearVelocity = !0), + s.linearVelocity.copy(r.linearVelocity)) + : (s.hasLinearVelocity = !1), + r.angularVelocity + ? ((s.hasAngularVelocity = !0), + s.angularVelocity.copy(r.angularVelocity)) + : (s.hasAngularVelocity = !1), + this.dispatchEvent(Jl))); + } + return ( + null !== s && (s.visible = null !== r), + null !== l && (l.visible = null !== i), + null !== u && (u.visible = null !== a), + this + ); + }, + }, + { + key: "_getHandJoint", + value: function (e, t) { + if (void 0 === e.joints[t.jointName]) { + var n = new ql(); + (n.matrixAutoUpdate = !1), + (n.visible = !1), + (e.joints[t.jointName] = n), + e.add(n); + } + return e.joints[t.jointName]; + }, + }, + ]), + e + ); + })(), + $l = (function (e) { + (0, d.Z)(n, e); + var t = (0, h.Z)(n); + function n(e, r, i, a, o, s, l, u, c, f) { + var d; + if ( + ((0, m.Z)(this, n), + (f = void 0 !== f ? f : Ke) !== Ke && f !== $e) + ) + throw new Error( + "DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat" + ); + return ( + void 0 === i && f === Ke && (i = ze), + void 0 === i && f === $e && (i = We), + ((d = t.call( + this, + null, + a, + o, + s, + l, + u, + f, + i, + c + )).isDepthTexture = !0), + (d.image = { width: e, height: r }), + (d.magFilter = void 0 !== l ? l : Te), + (d.minFilter = void 0 !== u ? u : Te), + (d.flipY = !1), + (d.generateMipmaps = !1), + (d.compareFunction = null), + d + ); + } + return ( + (0, g.Z)(n, [ + { + key: "copy", + value: function (e) { + return ( + (0, l.Z)((0, u.Z)(n.prototype), "copy", this).call( + this, + e + ), + (this.compareFunction = e.compareFunction), + this + ); + }, + }, + { + key: "toJSON", + value: function (e) { + var t = (0, l.Z)( + (0, u.Z)(n.prototype), + "toJSON", + this + ).call(this, e); + return ( + null !== this.compareFunction && + (t.compareFunction = this.compareFunction), + t + ); + }, + }, + ]), + n + ); + })(Dr), + eu = (function (e) { + (0, d.Z)(n, e); + var t = (0, h.Z)(n); + function n(e, r) { + var i; + (0, m.Z)(this, n), (i = t.call(this)); + var o = (0, f.Z)(i), + s = null, + l = 1, + u = null, + c = "local-floor", + d = 1, + h = null, + p = null, + g = null, + A = null, + y = null, + b = null, + x = r.getContextAttributes(), + S = null, + E = null, + _ = [], + C = [], + w = new ho(); + w.layers.enable(1), (w.viewport = new Ur()); + var T = new ho(); + T.layers.enable(2), (T.viewport = new Ur()); + var M = [w, T], + I = new Yl(); + I.layers.enable(1), I.layers.enable(2); + var k = null, + R = null; + function B(e) { + var t = C.indexOf(e.inputSource); + if (-1 !== t) { + var n = _[t]; + void 0 !== n && + (n.update(e.inputSource, e.frame, h || u), + n.dispatchEvent({ type: e.type, data: e.inputSource })); + } + } + function P() { + s.removeEventListener("select", B), + s.removeEventListener("selectstart", B), + s.removeEventListener("selectend", B), + s.removeEventListener("squeeze", B), + s.removeEventListener("squeezestart", B), + s.removeEventListener("squeezeend", B), + s.removeEventListener("end", P), + s.removeEventListener("inputsourceschange", L); + for (var t = 0; t < _.length; t++) { + var n = C[t]; + null !== n && ((C[t] = null), _[t].disconnect(n)); + } + (k = null), + (R = null), + e.setRenderTarget(S), + (y = null), + (A = null), + (g = null), + (s = null), + (E = null), + N.stop(), + (o.isPresenting = !1), + o.dispatchEvent({ type: "sessionend" }); + } + function L(e) { + for (var t = 0; t < e.removed.length; t++) { + var n = e.removed[t], + r = C.indexOf(n); + r >= 0 && ((C[r] = null), _[r].disconnect(n)); + } + for (var i = 0; i < e.added.length; i++) { + var a = e.added[i], + o = C.indexOf(a); + if (-1 === o) { + for (var s = 0; s < _.length; s++) { + if (s >= C.length) { + C.push(a), (o = s); + break; + } + if (null === C[s]) { + (C[s] = a), (o = s); + break; + } + } + if (-1 === o) break; + } + var l = _[o]; + l && l.connect(a); + } + } + (i.cameraAutoUpdate = !0), + (i.enabled = !1), + (i.isPresenting = !1), + (i.getController = function (e) { + var t = _[e]; + return ( + void 0 === t && ((t = new Kl()), (_[e] = t)), + t.getTargetRaySpace() + ); + }), + (i.getControllerGrip = function (e) { + var t = _[e]; + return ( + void 0 === t && ((t = new Kl()), (_[e] = t)), + t.getGripSpace() + ); + }), + (i.getHand = function (e) { + var t = _[e]; + return ( + void 0 === t && ((t = new Kl()), (_[e] = t)), + t.getHandSpace() + ); + }), + (i.setFramebufferScaleFactor = function (e) { + (l = e), + !0 === o.isPresenting && + console.warn( + "THREE.WebXRManager: Cannot change framebuffer scale while presenting." + ); + }), + (i.setReferenceSpaceType = function (e) { + (c = e), + !0 === o.isPresenting && + console.warn( + "THREE.WebXRManager: Cannot change reference space type while presenting." + ); + }), + (i.getReferenceSpace = function () { + return h || u; + }), + (i.setReferenceSpace = function (e) { + h = e; + }), + (i.getBaseLayer = function () { + return null !== A ? A : y; + }), + (i.getBinding = function () { + return g; + }), + (i.getFrame = function () { + return b; + }), + (i.getSession = function () { + return s; + }), + (i.setSession = (function () { + var t = (0, a.Z)( + (0, v.Z)().mark(function t(n) { + var i, a, f, p, m; + return (0, v.Z)().wrap( + function (t) { + for (;;) + switch ((t.prev = t.next)) { + case 0: + if (null === (s = n)) { + t.next = 25; + break; + } + if ( + ((S = e.getRenderTarget()), + s.addEventListener("select", B), + s.addEventListener("selectstart", B), + s.addEventListener("selectend", B), + s.addEventListener("squeeze", B), + s.addEventListener("squeezestart", B), + s.addEventListener("squeezeend", B), + s.addEventListener("end", P), + s.addEventListener("inputsourceschange", L), + !0 === x.xrCompatible) + ) { + t.next = 14; + break; + } + return (t.next = 14), r.makeXRCompatible(); + case 14: + return ( + void 0 === s.renderState.layers || + !1 === e.capabilities.isWebGL2 + ? ((i = { + antialias: + void 0 !== s.renderState.layers || + x.antialias, + alpha: !0, + depth: x.depth, + stencil: x.stencil, + framebufferScaleFactor: l, + }), + (y = new XRWebGLLayer(s, r, i)), + s.updateRenderState({ baseLayer: y }), + (E = new Or( + y.framebufferWidth, + y.framebufferHeight, + { + format: Ye, + type: Fe, + colorSpace: e.outputColorSpace, + stencilBuffer: x.stencil, + } + ))) + : ((a = null), + (f = null), + (p = null), + x.depth && + ((p = x.stencil + ? r.DEPTH24_STENCIL8 + : r.DEPTH_COMPONENT24), + (a = x.stencil ? $e : Ke), + (f = x.stencil ? We : ze)), + (m = { + colorFormat: r.RGBA8, + depthFormat: p, + scaleFactor: l, + }), + (g = new XRWebGLBinding(s, r)), + (A = g.createProjectionLayer(m)), + s.updateRenderState({ layers: [A] }), + (E = new Or( + A.textureWidth, + A.textureHeight, + { + format: Ye, + type: Fe, + depthTexture: new $l( + A.textureWidth, + A.textureHeight, + f, + void 0, + void 0, + void 0, + void 0, + void 0, + void 0, + a + ), + stencilBuffer: x.stencil, + colorSpace: e.outputColorSpace, + samples: x.antialias ? 4 : 0, + } + )), + (e.properties.get(E).__ignoreDepthValues = + A.ignoreDepthValues)), + (E.isXRRenderTarget = !0), + this.setFoveation(d), + (h = null), + (t.next = 20), + s.requestReferenceSpace(c) + ); + case 20: + (u = t.sent), + N.setContext(s), + N.start(), + (o.isPresenting = !0), + o.dispatchEvent({ type: "sessionstart" }); + case 25: + case "end": + return t.stop(); + } + }, + t, + this + ); + }) + ); + return function (e) { + return t.apply(this, arguments); + }; + })()), + (i.getEnvironmentBlendMode = function () { + if (null !== s) return s.environmentBlendMode; + }); + var D = new Vr(), + U = new Vr(); + function F(e, t) { + null === t + ? e.matrixWorld.copy(e.matrix) + : e.matrixWorld.multiplyMatrices(t.matrixWorld, e.matrix), + e.matrixWorldInverse.copy(e.matrixWorld).invert(); + } + (i.updateCamera = function (e) { + if (null !== s) { + (I.near = T.near = w.near = e.near), + (I.far = T.far = w.far = e.far), + (k === I.near && R === I.far) || + (s.updateRenderState({ + depthNear: I.near, + depthFar: I.far, + }), + (k = I.near), + (R = I.far)); + var t = e.parent, + n = I.cameras; + F(I, t); + for (var r = 0; r < n.length; r++) F(n[r], t); + 2 === n.length + ? (function (e, t, n) { + D.setFromMatrixPosition(t.matrixWorld), + U.setFromMatrixPosition(n.matrixWorld); + var r = D.distanceTo(U), + i = t.projectionMatrix.elements, + a = n.projectionMatrix.elements, + o = i[14] / (i[10] - 1), + s = i[14] / (i[10] + 1), + l = (i[9] + 1) / i[5], + u = (i[9] - 1) / i[5], + c = (i[8] - 1) / i[0], + f = (a[8] + 1) / a[0], + d = o * c, + h = o * f, + p = r / (-c + f), + v = p * -c; + t.matrixWorld.decompose( + e.position, + e.quaternion, + e.scale + ), + e.translateX(v), + e.translateZ(p), + e.matrixWorld.compose( + e.position, + e.quaternion, + e.scale + ), + e.matrixWorldInverse.copy(e.matrixWorld).invert(); + var m = o + p, + g = s + p, + A = d - v, + y = h + (r - v), + b = ((l * s) / g) * m, + x = ((u * s) / g) * m; + e.projectionMatrix.makePerspective(A, y, b, x, m, g), + e.projectionMatrixInverse + .copy(e.projectionMatrix) + .invert(); + })(I, w, T) + : I.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 * + tr * + Math.atan(1 / e.projectionMatrix.elements[5])), + (e.zoom = 1)); + })(e, I, t); + } + }), + (i.getCamera = function () { + return I; + }), + (i.getFoveation = function () { + if (null !== A || null !== y) return d; + }), + (i.setFoveation = function (e) { + (d = e), + null !== A && (A.fixedFoveation = e), + null !== y && + void 0 !== y.fixedFoveation && + (y.fixedFoveation = e); + }); + var O = null; + var N = new Co(); + return ( + N.setAnimationLoop(function (t, n) { + if (((p = n.getViewerPose(h || u)), (b = n), null !== p)) { + var r = p.views; + null !== y && + (e.setRenderTargetFramebuffer(E, y.framebuffer), + e.setRenderTarget(E)); + var i = !1; + r.length !== I.cameras.length && + ((I.cameras.length = 0), (i = !0)); + for (var a = 0; a < r.length; a++) { + var s = r[a], + l = null; + if (null !== y) l = y.getViewport(s); + else { + var c = g.getViewSubImage(A, s); + (l = c.viewport), + 0 === a && + (e.setRenderTargetTextures( + E, + c.colorTexture, + A.ignoreDepthValues + ? void 0 + : c.depthStencilTexture + ), + e.setRenderTarget(E)); + } + var f = M[a]; + void 0 === f && + ((f = new ho()).layers.enable(a), + (f.viewport = new Ur()), + (M[a] = f)), + f.matrix.fromArray(s.transform.matrix), + f.matrix.decompose(f.position, f.quaternion, f.scale), + f.projectionMatrix.fromArray(s.projectionMatrix), + f.projectionMatrixInverse + .copy(f.projectionMatrix) + .invert(), + f.viewport.set(l.x, l.y, l.width, l.height), + 0 === a && + (I.matrix.copy(f.matrix), + I.matrix.decompose( + I.position, + I.quaternion, + I.scale + )), + !0 === i && I.cameras.push(f); + } + } + for (var d = 0; d < _.length; d++) { + var v = C[d], + m = _[d]; + null !== v && void 0 !== m && m.update(v, n, h || u); + } + O && O(t, n), + n.detectedPlanes && + o.dispatchEvent({ type: "planesdetected", data: n }), + (b = null); + }), + (i.setAnimationLoop = function (e) { + O = e; + }), + (i.dispose = function () {}), + i + ); + } + return (0, g.Z)(n); + })(Jn); + function tu(e, t) { + function n(e, t) { + !0 === e.matrixAutoUpdate && e.updateMatrix(), + t.value.copy(e.matrix); + } + function r(r, i) { + (r.opacity.value = i.opacity), + i.color && r.diffuse.value.copy(i.color), + i.emissive && + r.emissive.value + .copy(i.emissive) + .multiplyScalar(i.emissiveIntensity), + i.map && ((r.map.value = i.map), n(i.map, r.mapTransform)), + i.alphaMap && + ((r.alphaMap.value = i.alphaMap), + n(i.alphaMap, r.alphaMapTransform)), + i.bumpMap && + ((r.bumpMap.value = i.bumpMap), + n(i.bumpMap, r.bumpMapTransform), + (r.bumpScale.value = i.bumpScale), + i.side === k && (r.bumpScale.value *= -1)), + i.normalMap && + ((r.normalMap.value = i.normalMap), + n(i.normalMap, r.normalMapTransform), + r.normalScale.value.copy(i.normalScale), + i.side === k && r.normalScale.value.negate()), + i.displacementMap && + ((r.displacementMap.value = i.displacementMap), + n(i.displacementMap, r.displacementMapTransform), + (r.displacementScale.value = i.displacementScale), + (r.displacementBias.value = i.displacementBias)), + i.emissiveMap && + ((r.emissiveMap.value = i.emissiveMap), + n(i.emissiveMap, r.emissiveMapTransform)), + i.specularMap && + ((r.specularMap.value = i.specularMap), + n(i.specularMap, r.specularMapTransform)), + i.alphaTest > 0 && (r.alphaTest.value = i.alphaTest); + var a = t.get(i).envMap; + if ( + (a && + ((r.envMap.value = a), + (r.flipEnvMap.value = + a.isCubeTexture && !1 === a.isRenderTargetTexture ? -1 : 1), + (r.reflectivity.value = i.reflectivity), + (r.ior.value = i.ior), + (r.refractionRatio.value = i.refractionRatio)), + i.lightMap) + ) { + r.lightMap.value = i.lightMap; + var o = !0 === e._useLegacyLights ? Math.PI : 1; + (r.lightMapIntensity.value = i.lightMapIntensity * o), + n(i.lightMap, r.lightMapTransform); + } + i.aoMap && + ((r.aoMap.value = i.aoMap), + (r.aoMapIntensity.value = i.aoMapIntensity), + n(i.aoMap, r.aoMapTransform)); + } + return { + refreshFogUniforms: function (t, n) { + n.color.getRGB(t.fogColor.value, lo(e)), + n.isFog + ? ((t.fogNear.value = n.near), (t.fogFar.value = n.far)) + : n.isFogExp2 && (t.fogDensity.value = n.density); + }, + refreshMaterialUniforms: function (e, i, a, o, s) { + 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, r) { + (e.metalness.value = r.metalness), + r.metalnessMap && + ((e.metalnessMap.value = r.metalnessMap), + n(r.metalnessMap, e.metalnessMapTransform)); + (e.roughness.value = r.roughness), + r.roughnessMap && + ((e.roughnessMap.value = r.roughnessMap), + n(r.roughnessMap, e.roughnessMapTransform)); + var i = t.get(r).envMap; + i && (e.envMapIntensity.value = r.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 === k && + e.clearcoatNormalScale.value.negate())); + 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, s)) + : 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) { + var 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 = 0.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, a, o) + : 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 nu(e, t, n, r) { + var i = {}, + a = {}, + o = [], + s = n.isWebGL2 ? e.getParameter(e.MAX_UNIFORM_BUFFER_BINDINGS) : 0; + function l(e, t, n) { + var r = e.value; + if (void 0 === n[t]) { + if ("number" === typeof r) n[t] = r; + else { + for ( + var i = Array.isArray(r) ? r : [r], a = [], o = 0; + o < i.length; + o++ + ) + a.push(i[o].clone()); + n[t] = a; + } + return !0; + } + if ("number" === typeof r) { + if (n[t] !== r) return (n[t] = r), !0; + } else + for ( + var s = Array.isArray(n[t]) ? n[t] : [n[t]], + l = Array.isArray(r) ? r : [r], + u = 0; + u < s.length; + u++ + ) { + var c = s[u]; + if (!1 === c.equals(l[u])) return c.copy(l[u]), !0; + } + return !1; + } + function u(e) { + var t = { boundary: 0, storage: 0 }; + return ( + "number" === 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 c(t) { + var n = t.target; + n.removeEventListener("dispose", c); + var r = o.indexOf(n.__bindingPointIndex); + o.splice(r, 1), + e.deleteBuffer(i[n.id]), + delete i[n.id], + delete a[n.id]; + } + return { + bind: function (e, t) { + var n = t.program; + r.uniformBlockBinding(e, n); + }, + update: function (n, f) { + var d = i[n.id]; + void 0 === d && + (!(function (e) { + for ( + var t = e.uniforms, + n = 0, + r = 16, + i = 0, + a = 0, + o = t.length; + a < o; + a++ + ) { + for ( + var s = t[a], + l = { boundary: 0, storage: 0 }, + c = Array.isArray(s.value) ? s.value : [s.value], + f = 0, + d = c.length; + f < d; + f++ + ) { + var h = u(c[f]); + (l.boundary += h.boundary), (l.storage += h.storage); + } + if ( + ((s.__data = new Float32Array( + l.storage / Float32Array.BYTES_PER_ELEMENT + )), + (s.__offset = n), + a > 0) + ) + 0 !== (i = n % r) && + r - i - l.boundary < 0 && + ((n += r - i), (s.__offset = n)); + n += l.storage; + } + (i = n % r) > 0 && (n += r - i); + (e.__size = n), (e.__cache = {}); + })(n), + (d = (function (t) { + var n = (function () { + for (var e = 0; e < s; e++) + if (-1 === o.indexOf(e)) return o.push(e), e; + return ( + console.error( + "THREE.WebGLRenderer: Maximum number of simultaneously usable uniforms groups reached." + ), + 0 + ); + })(); + t.__bindingPointIndex = n; + var r = e.createBuffer(), + i = t.__size, + a = t.usage; + return ( + e.bindBuffer(e.UNIFORM_BUFFER, r), + e.bufferData(e.UNIFORM_BUFFER, i, a), + e.bindBuffer(e.UNIFORM_BUFFER, null), + e.bindBufferBase(e.UNIFORM_BUFFER, n, r), + r + ); + })(n)), + (i[n.id] = d), + n.addEventListener("dispose", c)); + var h = f.program; + r.updateUBOMapping(n, h); + var p = t.render.frame; + a[n.id] !== p && + (!(function (t) { + var n = i[t.id], + r = t.uniforms, + a = t.__cache; + e.bindBuffer(e.UNIFORM_BUFFER, n); + for (var o = 0, s = r.length; o < s; o++) { + var c = r[o]; + if (!0 === l(c, o, a)) { + for ( + var f = c.__offset, + d = Array.isArray(c.value) ? c.value : [c.value], + h = 0, + p = 0; + p < d.length; + p++ + ) { + var v = d[p], + m = u(v); + "number" === typeof v + ? ((c.__data[0] = v), + e.bufferSubData(e.UNIFORM_BUFFER, f + h, c.__data)) + : v.isMatrix3 + ? ((c.__data[0] = v.elements[0]), + (c.__data[1] = v.elements[1]), + (c.__data[2] = v.elements[2]), + (c.__data[3] = v.elements[0]), + (c.__data[4] = v.elements[3]), + (c.__data[5] = v.elements[4]), + (c.__data[6] = v.elements[5]), + (c.__data[7] = v.elements[0]), + (c.__data[8] = v.elements[6]), + (c.__data[9] = v.elements[7]), + (c.__data[10] = v.elements[8]), + (c.__data[11] = v.elements[0])) + : (v.toArray(c.__data, h), + (h += m.storage / Float32Array.BYTES_PER_ELEMENT)); + } + e.bufferSubData(e.UNIFORM_BUFFER, f, c.__data); + } + } + e.bindBuffer(e.UNIFORM_BUFFER, null); + })(n), + (a[n.id] = p)); + }, + dispose: function () { + for (var t in i) e.deleteBuffer(i[t]); + (o = []), (i = {}), (a = {}); + }, + }; + } + var ru = (function () { + function e() { + var t = + arguments.length > 0 && void 0 !== arguments[0] + ? arguments[0] + : {}; + (0, m.Z)(this, e); + var n, + r = t.canvas, + i = void 0 === r ? yr() : r, + a = t.context, + o = void 0 === a ? null : a, + s = t.depth, + l = void 0 === s || s, + u = t.stencil, + c = void 0 === u || u, + f = t.alpha, + d = void 0 !== f && f, + h = t.antialias, + p = void 0 !== h && h, + v = t.premultipliedAlpha, + g = void 0 === v || v, + y = t.preserveDrawingBuffer, + b = void 0 !== y && y, + x = t.powerPreference, + S = void 0 === x ? "default" : x, + E = t.failIfMajorPerformanceCaveat, + _ = void 0 !== E && E; + (this.isWebGLRenderer = !0), + (n = null !== o ? o.getContextAttributes().alpha : d); + var C = new Uint32Array(4), + w = new Int32Array(4), + T = null, + M = null, + B = [], + P = []; + (this.domElement = i), + (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 = an), + (this._useLegacyLights = !1), + (this.toneMapping = de), + (this.toneMappingExposure = 1); + var L = this, + D = !1, + U = 0, + F = 0, + O = null, + N = -1, + G = null, + Z = new Ur(), + z = new Ur(), + Q = null, + H = new fa(0), + V = 0, + j = i.width, + W = i.height, + X = 1, + Y = null, + q = null, + J = new Ur(0, 0, j, W), + K = new Ur(0, 0, j, W), + $ = !1, + ee = new _o(), + te = !1, + ne = !1, + re = null, + ie = new xi(), + ae = new dr(), + oe = new Vr(), + se = { + background: null, + fog: null, + environment: null, + overrideMaterial: null, + isScene: !0, + }; + function le() { + return null === O ? X : 1; + } + var ue, + ce, + fe, + he, + pe, + ve, + me, + ge, + Ae, + ye, + be, + xe, + Se, + Ee, + _e, + Ce, + we, + Te, + Me, + Ie, + ke, + Re, + Be, + Pe, + Le = o; + function Ue(e, t) { + for (var n = 0; n < e.length; n++) { + var r = e[n], + a = i.getContext(r, t); + if (null !== a) return a; + } + return null; + } + try { + var Oe = { + alpha: !0, + depth: l, + stencil: c, + antialias: p, + premultipliedAlpha: g, + preserveDrawingBuffer: b, + powerPreference: S, + failIfMajorPerformanceCaveat: _, + }; + if ( + ("setAttribute" in i && + i.setAttribute("data-engine", "three.js r".concat(A)), + i.addEventListener("webglcontextlost", qe, !1), + i.addEventListener("webglcontextrestored", Je, !1), + i.addEventListener("webglcontextcreationerror", Ke, !1), + null === Le) + ) { + var Ne = ["webgl2", "webgl", "experimental-webgl"]; + if ( + (!0 === L.isWebGL1Renderer && Ne.shift(), + null === (Le = Ue(Ne, Oe))) + ) + throw Ue(Ne) + ? new Error( + "Error creating WebGL context with your selected attributes." + ) + : new Error("Error creating WebGL context."); + } + "undefined" !== typeof WebGLRenderingContext && + Le instanceof WebGLRenderingContext && + console.warn( + "THREE.WebGLRenderer: WebGL 1 support was deprecated in r153 and will be removed in r163." + ), + void 0 === Le.getShaderPrecisionFormat && + (Le.getShaderPrecisionFormat = function () { + return { rangeMin: 1, rangeMax: 1, precision: 1 }; + }); + } catch (ht) { + throw (console.error("THREE.WebGLRenderer: " + ht.message), ht); + } + function Ze() { + (ue = new $o(Le)), + (ce = new Do(Le, ue, t)), + ue.init(ce), + (Re = new Xl(Le, ue, ce)), + (fe = new jl(Le, ue, ce)), + (he = new ns(Le)), + (pe = new Bl()), + (ve = new Wl(Le, ue, fe, pe, ce, Re, he)), + (me = new Fo(L)), + (ge = new Ko(L)), + (Ae = new wo(Le, ce)), + (Be = new Po(Le, ue, Ae, ce)), + (ye = new es(Le, Ae, he, Be)), + (be = new os(Le, ye, Ae, he)), + (Me = new as(Le, ce, ve)), + (Ce = new Uo(pe)), + (xe = new Rl(L, me, ge, ue, ce, Be, Ce)), + (Se = new tu(L, pe)), + (Ee = new Ul()), + (_e = new zl(ue, ce)), + (Te = new Bo(L, me, ge, fe, be, n, g)), + (we = new Vl(L, be, ce)), + (Pe = new nu(Le, he, ce, fe)), + (Ie = new Lo(Le, ue, he, ce)), + (ke = new ts(Le, ue, he, ce)), + (he.programs = xe.programs), + (L.capabilities = ce), + (L.extensions = ue), + (L.properties = pe), + (L.renderLists = Ee), + (L.shadowMap = we), + (L.state = fe), + (L.info = he); + } + Ze(); + var Xe = new eu(L, Le); + function qe(e) { + e.preventDefault(), + console.log("THREE.WebGLRenderer: Context Lost."), + (D = !0); + } + function Je() { + console.log("THREE.WebGLRenderer: Context Restored."), (D = !1); + var e = he.autoReset, + t = we.enabled, + n = we.autoUpdate, + r = we.needsUpdate, + i = we.type; + Ze(), + (he.autoReset = e), + (we.enabled = t), + (we.autoUpdate = n), + (we.needsUpdate = r), + (we.type = i); + } + function Ke(e) { + console.error( + "THREE.WebGLRenderer: A WebGL context could not be created. Reason: ", + e.statusMessage + ); + } + function $e(e) { + var t = e.target; + t.removeEventListener("dispose", $e), + (function (e) { + (function (e) { + var t = pe.get(e).programs; + void 0 !== t && + (t.forEach(function (e) { + xe.releaseProgram(e); + }), + e.isShaderMaterial && xe.releaseShaderCache(e)); + })(e), + pe.remove(e); + })(t); + } + (this.xr = Xe), + (this.getContext = function () { + return Le; + }), + (this.getContextAttributes = function () { + return Le.getContextAttributes(); + }), + (this.forceContextLoss = function () { + var e = ue.get("WEBGL_lose_context"); + e && e.loseContext(); + }), + (this.forceContextRestore = function () { + var e = ue.get("WEBGL_lose_context"); + e && e.restoreContext(); + }), + (this.getPixelRatio = function () { + return X; + }), + (this.setPixelRatio = function (e) { + void 0 !== e && ((X = e), this.setSize(j, W, !1)); + }), + (this.getSize = function (e) { + return e.set(j, W); + }), + (this.setSize = function (e, t) { + var n = + !(arguments.length > 2 && void 0 !== arguments[2]) || + arguments[2]; + Xe.isPresenting + ? console.warn( + "THREE.WebGLRenderer: Can't change size while VR device is presenting." + ) + : ((j = e), + (W = t), + (i.width = Math.floor(e * X)), + (i.height = Math.floor(t * X)), + !0 === n && + ((i.style.width = e + "px"), + (i.style.height = t + "px")), + this.setViewport(0, 0, e, t)); + }), + (this.getDrawingBufferSize = function (e) { + return e.set(j * X, W * X).floor(); + }), + (this.setDrawingBufferSize = function (e, t, n) { + (j = e), + (W = t), + (X = n), + (i.width = Math.floor(e * n)), + (i.height = Math.floor(t * n)), + this.setViewport(0, 0, e, t); + }), + (this.getCurrentViewport = function (e) { + return e.copy(Z); + }), + (this.getViewport = function (e) { + return e.copy(J); + }), + (this.setViewport = function (e, t, n, r) { + e.isVector4 ? J.set(e.x, e.y, e.z, e.w) : J.set(e, t, n, r), + fe.viewport(Z.copy(J).multiplyScalar(X).floor()); + }), + (this.getScissor = function (e) { + return e.copy(K); + }), + (this.setScissor = function (e, t, n, r) { + e.isVector4 ? K.set(e.x, e.y, e.z, e.w) : K.set(e, t, n, r), + fe.scissor(z.copy(K).multiplyScalar(X).floor()); + }), + (this.getScissorTest = function () { + return $; + }), + (this.setScissorTest = function (e) { + fe.setScissorTest(($ = e)); + }), + (this.setOpaqueSort = function (e) { + Y = e; + }), + (this.setTransparentSort = function (e) { + q = e; + }), + (this.getClearColor = function (e) { + return e.copy(Te.getClearColor()); + }), + (this.setClearColor = function () { + Te.setClearColor.apply(Te, arguments); + }), + (this.getClearAlpha = function () { + return Te.getClearAlpha(); + }), + (this.setClearAlpha = function () { + Te.setClearAlpha.apply(Te, arguments); + }), + (this.clear = function () { + var 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] + ) { + var r = !1; + if (null !== O) { + var i = O.texture.format; + r = i === it || i === rt || i === tt; + } + if (r) { + var a = O.texture.type, + o = + a === Fe || + a === ze || + a === Ge || + a === We || + a === Ve || + a === je, + s = Te.getClearColor(), + l = Te.getClearAlpha(), + u = s.r, + c = s.g, + f = s.b; + o + ? ((C[0] = u), + (C[1] = c), + (C[2] = f), + (C[3] = l), + Le.clearBufferuiv(Le.COLOR, 0, C)) + : ((w[0] = u), + (w[1] = c), + (w[2] = f), + (w[3] = l), + Le.clearBufferiv(Le.COLOR, 0, w)); + } else n |= Le.COLOR_BUFFER_BIT; + } + e && (n |= Le.DEPTH_BUFFER_BIT), + t && (n |= Le.STENCIL_BUFFER_BIT), + Le.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 () { + i.removeEventListener("webglcontextlost", qe, !1), + i.removeEventListener("webglcontextrestored", Je, !1), + i.removeEventListener("webglcontextcreationerror", Ke, !1), + Ee.dispose(), + _e.dispose(), + pe.dispose(), + me.dispose(), + ge.dispose(), + be.dispose(), + Be.dispose(), + Pe.dispose(), + xe.dispose(), + Xe.dispose(), + Xe.removeEventListener("sessionstart", nt), + Xe.removeEventListener("sessionend", at), + re && (re.dispose(), (re = null)), + ot.stop(); + }), + (this.renderBufferDirect = function (e, t, n, r, i, a) { + null === t && (t = se); + var o = i.isMesh && i.matrixWorld.determinant() < 0, + s = (function (e, t, n, r, i) { + !0 !== t.isScene && (t = se); + ve.resetTextureUnits(); + var a = t.fog, + o = r.isMeshStandardMaterial ? t.environment : null, + s = + null === O + ? L.outputColorSpace + : !0 === O.isXRRenderTarget + ? O.texture.colorSpace + : on, + l = (r.isMeshStandardMaterial ? ge : me).get( + r.envMap || o + ), + u = + !0 === r.vertexColors && + !!n.attributes.color && + 4 === n.attributes.color.itemSize, + c = + !!n.attributes.tangent && + (!!r.normalMap || r.anisotropy > 0), + f = !!n.morphAttributes.position, + d = !!n.morphAttributes.normal, + h = !!n.morphAttributes.color, + p = de; + r.toneMapped && + ((null !== O && !0 !== O.isXRRenderTarget) || + (p = L.toneMapping)); + var v = + n.morphAttributes.position || + n.morphAttributes.normal || + n.morphAttributes.color, + m = void 0 !== v ? v.length : 0, + g = pe.get(r), + A = M.state.lights; + if (!0 === te && (!0 === ne || e !== G)) { + var y = e === G && r.id === N; + Ce.setState(r, e, y); + } + var b = !1; + r.version === g.__version + ? (g.needsLights && + g.lightsStateVersion !== A.state.version) || + g.outputColorSpace !== s || + (i.isInstancedMesh && !1 === g.instancing) + ? (b = !0) + : i.isInstancedMesh || !0 !== g.instancing + ? i.isSkinnedMesh && !1 === g.skinning + ? (b = !0) + : i.isSkinnedMesh || !0 !== g.skinning + ? (i.isInstancedMesh && + !0 === g.instancingColor && + null === i.instanceColor) || + (i.isInstancedMesh && + !1 === g.instancingColor && + null !== i.instanceColor) || + g.envMap !== l || + (!0 === r.fog && g.fog !== a) + ? (b = !0) + : void 0 === g.numClippingPlanes || + (g.numClippingPlanes === Ce.numPlanes && + g.numIntersection === Ce.numIntersection) + ? (g.vertexAlphas !== u || + g.vertexTangents !== c || + g.morphTargets !== f || + g.morphNormals !== d || + g.morphColors !== h || + g.toneMapping !== p || + (!0 === ce.isWebGL2 && + g.morphTargetsCount !== m)) && + (b = !0) + : (b = !0) + : (b = !0) + : (b = !0) + : ((b = !0), (g.__version = r.version)); + var x = g.currentProgram; + !0 === b && (x = ft(r, t, i)); + var S = !1, + E = !1, + _ = !1, + C = x.getUniforms(), + w = g.uniforms; + fe.useProgram(x.program) && + ((S = !0), (E = !0), (_ = !0)); + r.id !== N && ((N = r.id), (E = !0)); + if (S || G !== e) { + C.setValue(Le, "projectionMatrix", e.projectionMatrix), + C.setValue(Le, "viewMatrix", e.matrixWorldInverse); + var T = C.map.cameraPosition; + void 0 !== T && + T.setValue( + Le, + oe.setFromMatrixPosition(e.matrixWorld) + ), + ce.logarithmicDepthBuffer && + C.setValue( + Le, + "logDepthBufFC", + 2 / (Math.log(e.far + 1) / Math.LN2) + ), + (r.isMeshPhongMaterial || + r.isMeshToonMaterial || + r.isMeshLambertMaterial || + r.isMeshBasicMaterial || + r.isMeshStandardMaterial || + r.isShaderMaterial) && + C.setValue( + Le, + "isOrthographic", + !0 === e.isOrthographicCamera + ), + G !== e && ((G = e), (E = !0), (_ = !0)); + } + if (i.isSkinnedMesh) { + C.setOptional(Le, i, "bindMatrix"), + C.setOptional(Le, i, "bindMatrixInverse"); + var I = i.skeleton; + I && + (ce.floatVertexTextures + ? (null === I.boneTexture && I.computeBoneTexture(), + C.setValue(Le, "boneTexture", I.boneTexture, ve), + C.setValue( + Le, + "boneTextureSize", + I.boneTextureSize + )) + : console.warn( + "THREE.WebGLRenderer: SkinnedMesh can only be used with WebGL 2. With WebGL 1 OES_texture_float and vertex textures support is required." + )); + } + var k = n.morphAttributes; + (void 0 !== k.position || + void 0 !== k.normal || + (void 0 !== k.color && !0 === ce.isWebGL2)) && + Me.update(i, n, x); + (E || g.receiveShadow !== i.receiveShadow) && + ((g.receiveShadow = i.receiveShadow), + C.setValue(Le, "receiveShadow", i.receiveShadow)); + r.isMeshGouraudMaterial && + null !== r.envMap && + ((w.envMap.value = l), + (w.flipEnvMap.value = + l.isCubeTexture && !1 === l.isRenderTargetTexture + ? -1 + : 1)); + E && + (C.setValue( + Le, + "toneMappingExposure", + L.toneMappingExposure + ), + g.needsLights && + ((B = _), + ((R = w).ambientLightColor.needsUpdate = B), + (R.lightProbe.needsUpdate = B), + (R.directionalLights.needsUpdate = B), + (R.directionalLightShadows.needsUpdate = B), + (R.pointLights.needsUpdate = B), + (R.pointLightShadows.needsUpdate = B), + (R.spotLights.needsUpdate = B), + (R.spotLightShadows.needsUpdate = B), + (R.rectAreaLights.needsUpdate = B), + (R.hemisphereLights.needsUpdate = B)), + a && !0 === r.fog && Se.refreshFogUniforms(w, a), + Se.refreshMaterialUniforms(w, r, X, W, re), + cl.upload(Le, g.uniformsList, w, ve)); + var R, B; + r.isShaderMaterial && + !0 === r.uniformsNeedUpdate && + (cl.upload(Le, g.uniformsList, w, ve), + (r.uniformsNeedUpdate = !1)); + r.isSpriteMaterial && C.setValue(Le, "center", i.center); + if ( + (C.setValue(Le, "modelViewMatrix", i.modelViewMatrix), + C.setValue(Le, "normalMatrix", i.normalMatrix), + C.setValue(Le, "modelMatrix", i.matrixWorld), + r.isShaderMaterial || r.isRawShaderMaterial) + ) + for ( + var P = r.uniformsGroups, D = 0, U = P.length; + D < U; + D++ + ) + if (ce.isWebGL2) { + var F = P[D]; + Pe.update(F, x), Pe.bind(F, x); + } else + console.warn( + "THREE.WebGLRenderer: Uniform Buffer Objects can only be used with WebGL 2." + ); + return x; + })(e, t, n, r, i); + fe.setMaterial(r, o); + var l = n.index, + u = 1; + if (!0 === r.wireframe) { + if (void 0 === (l = ye.getWireframeAttribute(n))) return; + u = 2; + } + var c = n.drawRange, + f = n.attributes.position, + d = c.start * u, + h = (c.start + c.count) * u; + null !== a && + ((d = Math.max(d, a.start * u)), + (h = Math.min(h, (a.start + a.count) * u))), + null !== l + ? ((d = Math.max(d, 0)), (h = Math.min(h, l.count))) + : void 0 !== f && + null !== f && + ((d = Math.max(d, 0)), (h = Math.min(h, f.count))); + var p = h - d; + if (!(p < 0 || p === 1 / 0)) { + var v; + Be.setup(i, r, s, n, l); + var m = Ie; + if ( + (null !== l && ((v = Ae.get(l)), (m = ke).setIndex(v)), + i.isMesh) + ) + !0 === r.wireframe + ? (fe.setLineWidth(r.wireframeLinewidth * le()), + m.setMode(Le.LINES)) + : m.setMode(Le.TRIANGLES); + else if (i.isLine) { + var g = r.linewidth; + void 0 === g && (g = 1), + fe.setLineWidth(g * le()), + i.isLineSegments + ? m.setMode(Le.LINES) + : i.isLineLoop + ? m.setMode(Le.LINE_LOOP) + : m.setMode(Le.LINE_STRIP); + } else + i.isPoints + ? m.setMode(Le.POINTS) + : i.isSprite && m.setMode(Le.TRIANGLES); + if (i.isInstancedMesh) m.renderInstances(d, p, i.count); + else if (n.isInstancedBufferGeometry) { + var A = + void 0 !== n._maxInstanceCount + ? n._maxInstanceCount + : 1 / 0, + y = Math.min(n.instanceCount, A); + m.renderInstances(d, p, y); + } else m.render(d, p); + } + }), + (this.compile = function (e, t) { + function n(e, t, n) { + !0 === e.transparent && + e.side === R && + !1 === e.forceSinglePass + ? ((e.side = k), + (e.needsUpdate = !0), + ft(e, t, n), + (e.side = I), + (e.needsUpdate = !0), + ft(e, t, n), + (e.side = R)) + : ft(e, t, n); + } + (M = _e.get(e)).init(), + P.push(M), + e.traverseVisible(function (e) { + e.isLight && + e.layers.test(t.layers) && + (M.pushLight(e), e.castShadow && M.pushShadow(e)); + }), + M.setupLights(L._useLegacyLights), + e.traverse(function (t) { + var r = t.material; + if (r) + if (Array.isArray(r)) + for (var i = 0; i < r.length; i++) { + n(r[i], e, t); + } + else n(r, e, t); + }), + P.pop(), + (M = null); + }); + var et = null; + function nt() { + ot.stop(); + } + function at() { + ot.start(); + } + var ot = new Co(); + function st(e, t, n, r) { + if (!1 !== e.visible) { + 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 || ee.intersectsSprite(e)) { + r && + oe + .setFromMatrixPosition(e.matrixWorld) + .applyMatrix4(ie); + var i = be.update(e), + a = e.material; + a.visible && T.push(e, i, a, n, oe.z, null); + } + } else if ( + (e.isMesh || e.isLine || e.isPoints) && + (!e.frustumCulled || ee.intersectsObject(e)) + ) { + var o = be.update(e), + s = e.material; + if ( + (r && + (void 0 !== e.boundingSphere + ? (null === e.boundingSphere && + e.computeBoundingSphere(), + oe.copy(e.boundingSphere.center)) + : (null === o.boundingSphere && + o.computeBoundingSphere(), + oe.copy(o.boundingSphere.center)), + oe.applyMatrix4(e.matrixWorld).applyMatrix4(ie)), + Array.isArray(s)) + ) + for ( + var l = o.groups, u = 0, c = l.length; + u < c; + u++ + ) { + var f = l[u], + d = s[f.materialIndex]; + d && d.visible && T.push(e, o, d, n, oe.z, f); + } + else s.visible && T.push(e, o, s, n, oe.z, null); + } + for (var h = e.children, p = 0, v = h.length; p < v; p++) + st(h[p], t, n, r); + } + } + function lt(e, t, n, r) { + var i = e.opaque, + a = e.transmissive, + o = e.transparent; + M.setupLightsView(n), + !0 === te && Ce.setGlobalState(L.clippingPlanes, n), + a.length > 0 && + (function (e, t, n, r) { + var i = ce.isWebGL2; + null === re && + (re = new Or(1, 1, { + generateMipmaps: !0, + type: ue.has("EXT_color_buffer_half_float") ? He : Fe, + minFilter: De, + samples: i ? 4 : 0, + })); + L.getDrawingBufferSize(ae), + i + ? re.setSize(ae.x, ae.y) + : re.setSize(lr(ae.x), lr(ae.y)); + var a = L.getRenderTarget(); + L.setRenderTarget(re), + L.getClearColor(H), + (V = L.getClearAlpha()) < 1 && + L.setClearColor(16777215, 0.5); + L.clear(); + var o = L.toneMapping; + (L.toneMapping = de), + ut(e, n, r), + ve.updateMultisampleRenderTarget(re), + ve.updateRenderTargetMipmap(re); + for (var s = !1, l = 0, u = t.length; l < u; l++) { + var c = t[l], + f = c.object, + d = c.geometry, + h = c.material, + p = c.group; + if (h.side === R && f.layers.test(r.layers)) { + var v = h.side; + (h.side = k), + (h.needsUpdate = !0), + ct(f, n, r, d, h, p), + (h.side = v), + (h.needsUpdate = !0), + (s = !0); + } + } + !0 === s && + (ve.updateMultisampleRenderTarget(re), + ve.updateRenderTargetMipmap(re)); + L.setRenderTarget(a), + L.setClearColor(H, V), + (L.toneMapping = o); + })(i, a, t, n), + r && fe.viewport(Z.copy(r)), + i.length > 0 && ut(i, t, n), + a.length > 0 && ut(a, t, n), + o.length > 0 && ut(o, t, n), + fe.buffers.depth.setTest(!0), + fe.buffers.depth.setMask(!0), + fe.buffers.color.setMask(!0), + fe.setPolygonOffset(!1); + } + function ut(e, t, n) { + for ( + var r = !0 === t.isScene ? t.overrideMaterial : null, + i = 0, + a = e.length; + i < a; + i++ + ) { + var o = e[i], + s = o.object, + l = o.geometry, + u = null === r ? o.material : r, + c = o.group; + s.layers.test(n.layers) && ct(s, t, n, l, u, c); + } + } + function ct(e, t, n, r, i, a) { + e.onBeforeRender(L, t, n, r, i, a), + e.modelViewMatrix.multiplyMatrices( + n.matrixWorldInverse, + e.matrixWorld + ), + e.normalMatrix.getNormalMatrix(e.modelViewMatrix), + i.onBeforeRender(L, t, n, r, e, a), + !0 === i.transparent && + i.side === R && + !1 === i.forceSinglePass + ? ((i.side = k), + (i.needsUpdate = !0), + L.renderBufferDirect(n, t, r, i, e, a), + (i.side = I), + (i.needsUpdate = !0), + L.renderBufferDirect(n, t, r, i, e, a), + (i.side = R)) + : L.renderBufferDirect(n, t, r, i, e, a), + e.onAfterRender(L, t, n, r, i, a); + } + function ft(e, t, n) { + !0 !== t.isScene && (t = se); + var r = pe.get(e), + i = M.state.lights, + a = M.state.shadowsArray, + o = i.state.version, + s = xe.getParameters(e, i.state, a, t, n), + l = xe.getProgramCacheKey(s), + u = r.programs; + (r.environment = e.isMeshStandardMaterial + ? t.environment + : null), + (r.fog = t.fog), + (r.envMap = (e.isMeshStandardMaterial ? ge : me).get( + e.envMap || r.environment + )), + void 0 === u && + (e.addEventListener("dispose", $e), + (u = new Map()), + (r.programs = u)); + var c = u.get(l); + if (void 0 !== c) { + if (r.currentProgram === c && r.lightsStateVersion === o) + return dt(e, s), c; + } else + (s.uniforms = xe.getUniforms(e)), + e.onBuild(n, s, L), + e.onBeforeCompile(s, L), + (c = xe.acquireProgram(s, l)), + u.set(l, c), + (r.uniforms = s.uniforms); + var f = r.uniforms; + ((e.isShaderMaterial || e.isRawShaderMaterial) && + !0 !== e.clipping) || + (f.clippingPlanes = Ce.uniform), + dt(e, s), + (r.needsLights = (function (e) { + return ( + e.isMeshLambertMaterial || + e.isMeshToonMaterial || + e.isMeshPhongMaterial || + e.isMeshStandardMaterial || + e.isShadowMaterial || + (e.isShaderMaterial && !0 === e.lights) + ); + })(e)), + (r.lightsStateVersion = o), + r.needsLights && + ((f.ambientLightColor.value = i.state.ambient), + (f.lightProbe.value = i.state.probe), + (f.directionalLights.value = i.state.directional), + (f.directionalLightShadows.value = + i.state.directionalShadow), + (f.spotLights.value = i.state.spot), + (f.spotLightShadows.value = i.state.spotShadow), + (f.rectAreaLights.value = i.state.rectArea), + (f.ltc_1.value = i.state.rectAreaLTC1), + (f.ltc_2.value = i.state.rectAreaLTC2), + (f.pointLights.value = i.state.point), + (f.pointLightShadows.value = i.state.pointShadow), + (f.hemisphereLights.value = i.state.hemi), + (f.directionalShadowMap.value = + i.state.directionalShadowMap), + (f.directionalShadowMatrix.value = + i.state.directionalShadowMatrix), + (f.spotShadowMap.value = i.state.spotShadowMap), + (f.spotLightMatrix.value = i.state.spotLightMatrix), + (f.spotLightMap.value = i.state.spotLightMap), + (f.pointShadowMap.value = i.state.pointShadowMap), + (f.pointShadowMatrix.value = i.state.pointShadowMatrix)); + var d = c.getUniforms(), + h = cl.seqWithValue(d.seq, f); + return (r.currentProgram = c), (r.uniformsList = h), c; + } + function dt(e, t) { + var n = pe.get(e); + (n.outputColorSpace = t.outputColorSpace), + (n.instancing = t.instancing), + (n.instancingColor = t.instancingColor), + (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); + } + ot.setAnimationLoop(function (e) { + et && et(e); + }), + "undefined" !== typeof self && ot.setContext(self), + (this.setAnimationLoop = function (e) { + (et = e), + Xe.setAnimationLoop(e), + null === e ? ot.stop() : ot.start(); + }), + Xe.addEventListener("sessionstart", nt), + Xe.addEventListener("sessionend", at), + (this.render = function (e, t) { + if (void 0 === t || !0 === t.isCamera) { + if (!0 !== D) { + !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(L, e, t, O), + (M = _e.get(e, P.length)).init(), + P.push(M), + ie.multiplyMatrices( + t.projectionMatrix, + t.matrixWorldInverse + ), + ee.setFromProjectionMatrix(ie), + (ne = this.localClippingEnabled), + (te = Ce.init(this.clippingPlanes, ne)), + (T = Ee.get(e, B.length)).init(), + B.push(T), + st(e, t, 0, L.sortObjects), + T.finish(), + !0 === L.sortObjects && T.sort(Y, q), + this.info.render.frame++, + !0 === te && Ce.beginShadows(); + var n = M.state.shadowsArray; + if ( + (we.render(n, e, t), + !0 === te && Ce.endShadows(), + !0 === this.info.autoReset && this.info.reset(), + Te.render(T, e), + M.setupLights(L._useLegacyLights), + t.isArrayCamera) + ) + for ( + var r = t.cameras, i = 0, a = r.length; + i < a; + i++ + ) { + var o = r[i]; + lt(T, e, o, o.viewport); + } + else lt(T, e, t); + null !== O && + (ve.updateMultisampleRenderTarget(O), + ve.updateRenderTargetMipmap(O)), + !0 === e.isScene && e.onAfterRender(L, e, t), + Be.resetDefaultState(), + (N = -1), + (G = null), + P.pop(), + (M = P.length > 0 ? P[P.length - 1] : null), + B.pop(), + (T = B.length > 0 ? B[B.length - 1] : null); + } + } else + console.error( + "THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera." + ); + }), + (this.getActiveCubeFace = function () { + return U; + }), + (this.getActiveMipmapLevel = function () { + return F; + }), + (this.getRenderTarget = function () { + return O; + }), + (this.setRenderTargetTextures = function (e, t, n) { + (pe.get(e.texture).__webglTexture = t), + (pe.get(e.depthTexture).__webglTexture = n); + var r = pe.get(e); + (r.__hasExternalTextures = !0), + r.__hasExternalTextures && + ((r.__autoAllocateDepthBuffer = void 0 === n), + r.__autoAllocateDepthBuffer || + (!0 === + ue.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) { + var n = pe.get(e); + (n.__webglFramebuffer = t), + (n.__useDefaultFramebuffer = void 0 === t); + }), + (this.setRenderTarget = function (e) { + var t = + arguments.length > 1 && void 0 !== arguments[1] + ? arguments[1] + : 0, + n = + arguments.length > 2 && void 0 !== arguments[2] + ? arguments[2] + : 0; + (O = e), (U = t), (F = n); + var r = !0, + i = null, + a = !1, + o = !1; + if (e) { + var s = pe.get(e); + void 0 !== s.__useDefaultFramebuffer + ? (fe.bindFramebuffer(Le.FRAMEBUFFER, null), (r = !1)) + : void 0 === s.__webglFramebuffer + ? ve.setupRenderTarget(e) + : s.__hasExternalTextures && + ve.rebindTextures( + e, + pe.get(e.texture).__webglTexture, + pe.get(e.depthTexture).__webglTexture + ); + var l = e.texture; + (l.isData3DTexture || + l.isDataArrayTexture || + l.isCompressedArrayTexture) && + (o = !0); + var u = pe.get(e).__webglFramebuffer; + e.isWebGLCubeRenderTarget + ? ((i = Array.isArray(u[t]) ? u[t][n] : u[t]), (a = !0)) + : (i = + ce.isWebGL2 && + e.samples > 0 && + !1 === ve.useMultisampledRTT(e) + ? pe.get(e).__webglMultisampledFramebuffer + : Array.isArray(u) + ? u[n] + : u), + Z.copy(e.viewport), + z.copy(e.scissor), + (Q = e.scissorTest); + } else + Z.copy(J).multiplyScalar(X).floor(), + z.copy(K).multiplyScalar(X).floor(), + (Q = $); + if ( + (fe.bindFramebuffer(Le.FRAMEBUFFER, i) && + ce.drawBuffers && + r && + fe.drawBuffers(e, i), + fe.viewport(Z), + fe.scissor(z), + fe.setScissorTest(Q), + a) + ) { + var c = pe.get(e.texture); + Le.framebufferTexture2D( + Le.FRAMEBUFFER, + Le.COLOR_ATTACHMENT0, + Le.TEXTURE_CUBE_MAP_POSITIVE_X + t, + c.__webglTexture, + n + ); + } else if (o) { + var f = pe.get(e.texture), + d = t || 0; + Le.framebufferTextureLayer( + Le.FRAMEBUFFER, + Le.COLOR_ATTACHMENT0, + f.__webglTexture, + n || 0, + d + ); + } + N = -1; + }), + (this.readRenderTargetPixels = function (e, t, n, r, i, a, o) { + if (e && e.isWebGLRenderTarget) { + var s = pe.get(e).__webglFramebuffer; + if ( + (e.isWebGLCubeRenderTarget && void 0 !== o && (s = s[o]), + s) + ) { + fe.bindFramebuffer(Le.FRAMEBUFFER, s); + try { + var l = e.texture, + u = l.format, + c = l.type; + if ( + u !== Ye && + Re.convert(u) !== + Le.getParameter(Le.IMPLEMENTATION_COLOR_READ_FORMAT) + ) + return void console.error( + "THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format." + ); + var f = + c === He && + (ue.has("EXT_color_buffer_half_float") || + (ce.isWebGL2 && ue.has("EXT_color_buffer_float"))); + if ( + c !== Fe && + Re.convert(c) !== + Le.getParameter( + Le.IMPLEMENTATION_COLOR_READ_TYPE + ) && + (c !== Qe || + !( + ce.isWebGL2 || + ue.has("OES_texture_float") || + ue.has("WEBGL_color_buffer_float") + )) && + !f + ) + 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 && + Le.readPixels( + t, + n, + r, + i, + Re.convert(u), + Re.convert(c), + a + ); + } finally { + var d = + null !== O ? pe.get(O).__webglFramebuffer : null; + fe.bindFramebuffer(Le.FRAMEBUFFER, d); + } + } + } else + console.error( + "THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget." + ); + }), + (this.copyFramebufferToTexture = function (e, t) { + var n = + arguments.length > 2 && void 0 !== arguments[2] + ? arguments[2] + : 0, + r = Math.pow(2, -n), + i = Math.floor(t.image.width * r), + a = Math.floor(t.image.height * r); + ve.setTexture2D(t, 0), + Le.copyTexSubImage2D( + Le.TEXTURE_2D, + n, + 0, + 0, + e.x, + e.y, + i, + a + ), + fe.unbindTexture(); + }), + (this.copyTextureToTexture = function (e, t, n) { + var r = + arguments.length > 3 && void 0 !== arguments[3] + ? arguments[3] + : 0, + i = t.image.width, + a = t.image.height, + o = Re.convert(n.format), + s = Re.convert(n.type); + ve.setTexture2D(n, 0), + Le.pixelStorei(Le.UNPACK_FLIP_Y_WEBGL, n.flipY), + Le.pixelStorei( + Le.UNPACK_PREMULTIPLY_ALPHA_WEBGL, + n.premultiplyAlpha + ), + Le.pixelStorei(Le.UNPACK_ALIGNMENT, n.unpackAlignment), + t.isDataTexture + ? Le.texSubImage2D( + Le.TEXTURE_2D, + r, + e.x, + e.y, + i, + a, + o, + s, + t.image.data + ) + : t.isCompressedTexture + ? Le.compressedTexSubImage2D( + Le.TEXTURE_2D, + r, + e.x, + e.y, + t.mipmaps[0].width, + t.mipmaps[0].height, + o, + t.mipmaps[0].data + ) + : Le.texSubImage2D( + Le.TEXTURE_2D, + r, + e.x, + e.y, + o, + s, + t.image + ), + 0 === r && + n.generateMipmaps && + Le.generateMipmap(Le.TEXTURE_2D), + fe.unbindTexture(); + }), + (this.copyTextureToTexture3D = function (e, t, n, r) { + var i = + arguments.length > 4 && void 0 !== arguments[4] + ? arguments[4] + : 0; + if (L.isWebGL1Renderer) + console.warn( + "THREE.WebGLRenderer.copyTextureToTexture3D: can only be used with WebGL2." + ); + else { + var a, + o = e.max.x - e.min.x + 1, + s = e.max.y - e.min.y + 1, + l = e.max.z - e.min.z + 1, + u = Re.convert(r.format), + c = Re.convert(r.type); + if (r.isData3DTexture) + ve.setTexture3D(r, 0), (a = Le.TEXTURE_3D); + else { + if (!r.isDataArrayTexture) + return void console.warn( + "THREE.WebGLRenderer.copyTextureToTexture3D: only supports THREE.DataTexture3D and THREE.DataTexture2DArray." + ); + ve.setTexture2DArray(r, 0), (a = Le.TEXTURE_2D_ARRAY); + } + Le.pixelStorei(Le.UNPACK_FLIP_Y_WEBGL, r.flipY), + Le.pixelStorei( + Le.UNPACK_PREMULTIPLY_ALPHA_WEBGL, + r.premultiplyAlpha + ), + Le.pixelStorei(Le.UNPACK_ALIGNMENT, r.unpackAlignment); + var f = Le.getParameter(Le.UNPACK_ROW_LENGTH), + d = Le.getParameter(Le.UNPACK_IMAGE_HEIGHT), + h = Le.getParameter(Le.UNPACK_SKIP_PIXELS), + p = Le.getParameter(Le.UNPACK_SKIP_ROWS), + v = Le.getParameter(Le.UNPACK_SKIP_IMAGES), + m = n.isCompressedTexture ? n.mipmaps[0] : n.image; + Le.pixelStorei(Le.UNPACK_ROW_LENGTH, m.width), + Le.pixelStorei(Le.UNPACK_IMAGE_HEIGHT, m.height), + Le.pixelStorei(Le.UNPACK_SKIP_PIXELS, e.min.x), + Le.pixelStorei(Le.UNPACK_SKIP_ROWS, e.min.y), + Le.pixelStorei(Le.UNPACK_SKIP_IMAGES, e.min.z), + n.isDataTexture || n.isData3DTexture + ? Le.texSubImage3D( + a, + i, + t.x, + t.y, + t.z, + o, + s, + l, + u, + c, + m.data + ) + : n.isCompressedArrayTexture + ? (console.warn( + "THREE.WebGLRenderer.copyTextureToTexture3D: untested support for compressed srcTexture." + ), + Le.compressedTexSubImage3D( + a, + i, + t.x, + t.y, + t.z, + o, + s, + l, + u, + m.data + )) + : Le.texSubImage3D( + a, + i, + t.x, + t.y, + t.z, + o, + s, + l, + u, + c, + m + ), + Le.pixelStorei(Le.UNPACK_ROW_LENGTH, f), + Le.pixelStorei(Le.UNPACK_IMAGE_HEIGHT, d), + Le.pixelStorei(Le.UNPACK_SKIP_PIXELS, h), + Le.pixelStorei(Le.UNPACK_SKIP_ROWS, p), + Le.pixelStorei(Le.UNPACK_SKIP_IMAGES, v), + 0 === i && r.generateMipmaps && Le.generateMipmap(a), + fe.unbindTexture(); + } + }), + (this.initTexture = function (e) { + e.isCubeTexture + ? ve.setTextureCube(e, 0) + : e.isData3DTexture + ? ve.setTexture3D(e, 0) + : e.isDataArrayTexture || e.isCompressedArrayTexture + ? ve.setTexture2DArray(e, 0) + : ve.setTexture2D(e, 0), + fe.unbindTexture(); + }), + (this.resetState = function () { + (U = 0), (F = 0), (O = null), fe.reset(), Be.reset(); + }), + "undefined" !== typeof __THREE_DEVTOOLS__ && + __THREE_DEVTOOLS__.dispatchEvent( + new CustomEvent("observe", { detail: this }) + ); + } + return ( + (0, g.Z)(e, [ + { + key: "coordinateSystem", + get: function () { + return Yn; + }, + }, + { + key: "outputColorSpace", + get: function () { + return this._outputColorSpace; + }, + set: function (e) { + this._outputColorSpace = e; + var t = this.getContext(); + (t.drawingBufferColorSpace = + e === sn ? "display-p3" : "srgb"), + (t.unpackColorSpace = + Tr.workingColorSpace === ln ? "display-p3" : "srgb"); + }, + }, + { + key: "physicallyCorrectLights", + get: function () { + return ( + console.warn( + "THREE.WebGLRenderer: The property .physicallyCorrectLights has been removed. Set renderer.useLegacyLights instead." + ), + !this.useLegacyLights + ); + }, + set: function (e) { + console.warn( + "THREE.WebGLRenderer: The property .physicallyCorrectLights has been removed. Set renderer.useLegacyLights instead." + ), + (this.useLegacyLights = !e); + }, + }, + { + key: "outputEncoding", + get: function () { + return ( + console.warn( + "THREE.WebGLRenderer: Property .outputEncoding has been removed. Use .outputColorSpace instead." + ), + this.outputColorSpace === an ? Kt : Jt + ); + }, + set: function (e) { + console.warn( + "THREE.WebGLRenderer: Property .outputEncoding has been removed. Use .outputColorSpace instead." + ), + (this.outputColorSpace = e === Kt ? an : on); + }, + }, + { + key: "useLegacyLights", + get: function () { + return ( + console.warn( + "THREE.WebGLRenderer: The property .useLegacyLights has been deprecated. Migrate your lighting according to the following guide: https://discourse.threejs.org/t/updates-to-lighting-in-three-js-r155/53733." + ), + this._useLegacyLights + ); + }, + set: function (e) { + console.warn( + "THREE.WebGLRenderer: The property .useLegacyLights has been deprecated. Migrate your lighting according to the following guide: https://discourse.threejs.org/t/updates-to-lighting-in-three-js-r155/53733." + ), + (this._useLegacyLights = e); + }, + }, + ]), + e + ); + })(), + iu = (function (e) { + (0, d.Z)(n, e); + var t = (0, h.Z)(n); + function n() { + return (0, m.Z)(this, n), t.apply(this, arguments); + } + return (0, g.Z)(n); + })(ru); + iu.prototype.isWebGL1Renderer = !0; + var au, + ou = (function () { + function e(t) { + var n = + arguments.length > 1 && void 0 !== arguments[1] + ? arguments[1] + : 25e-5; + (0, m.Z)(this, e), + (this.isFogExp2 = !0), + (this.name = ""), + (this.color = new fa(t)), + (this.density = n); + } + return ( + (0, g.Z)(e, [ + { + key: "clone", + value: function () { + return new e(this.color, this.density); + }, + }, + { + key: "toJSON", + value: function () { + return { + type: "FogExp2", + name: this.name, + color: this.color.getHex(), + density: this.density, + }; + }, + }, + ]), + e + ); + })(), + su = (function () { + function e(t) { + var n = + arguments.length > 1 && void 0 !== arguments[1] + ? arguments[1] + : 1, + r = + arguments.length > 2 && void 0 !== arguments[2] + ? arguments[2] + : 1e3; + (0, m.Z)(this, e), + (this.isFog = !0), + (this.name = ""), + (this.color = new fa(t)), + (this.near = n), + (this.far = r); + } + return ( + (0, g.Z)(e, [ + { + key: "clone", + value: function () { + return new e(this.color, this.near, this.far); + }, + }, + { + key: "toJSON", + value: function () { + return { + type: "Fog", + name: this.name, + color: this.color.getHex(), + near: this.near, + far: this.far, + }; + }, + }, + ]), + e + ); + })(), + lu = (function (e) { + (0, d.Z)(n, e); + var t = (0, h.Z)(n); + function n() { + var e; + return ( + (0, m.Z)(this, n), + ((e = t.call(this)).isScene = !0), + (e.type = "Scene"), + (e.background = null), + (e.environment = null), + (e.fog = null), + (e.backgroundBlurriness = 0), + (e.backgroundIntensity = 1), + (e.overrideMaterial = null), + "undefined" !== typeof __THREE_DEVTOOLS__ && + __THREE_DEVTOOLS__.dispatchEvent( + new CustomEvent("observe", { detail: (0, f.Z)(e) }) + ), + e + ); + } + return ( + (0, g.Z)(n, [ + { + key: "copy", + value: function (e, t) { + return ( + (0, l.Z)((0, u.Z)(n.prototype), "copy", this).call( + this, + 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), + null !== e.overrideMaterial && + (this.overrideMaterial = e.overrideMaterial.clone()), + (this.matrixAutoUpdate = e.matrixAutoUpdate), + this + ); + }, + }, + { + key: "toJSON", + value: function (e) { + var t = (0, l.Z)( + (0, u.Z)(n.prototype), + "toJSON", + this + ).call(this, 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 + ); + }, + }, + ]), + n + ); + })(ji), + uu = (function () { + function e(t, n) { + (0, m.Z)(this, e), + (this.isInterleavedBuffer = !0), + (this.array = t), + (this.stride = n), + (this.count = void 0 !== t ? t.length / n : 0), + (this.usage = Fn), + (this.updateRange = { offset: 0, count: -1 }), + (this.version = 0), + (this.uuid = nr()); + } + return ( + (0, g.Z)(e, [ + { key: "onUploadCallback", value: function () {} }, + { + key: "needsUpdate", + set: function (e) { + !0 === e && this.version++; + }, + }, + { + key: "setUsage", + value: function (e) { + return (this.usage = e), this; + }, + }, + { + key: "copy", + value: function (e) { + return ( + (this.array = new e.array.constructor(e.array)), + (this.count = e.count), + (this.stride = e.stride), + (this.usage = e.usage), + this + ); + }, + }, + { + key: "copyAt", + value: function (e, t, n) { + (e *= this.stride), (n *= t.stride); + for (var r = 0, i = this.stride; r < i; r++) + this.array[e + r] = t.array[n + r]; + return this; + }, + }, + { + key: "set", + value: function (e) { + var t = + arguments.length > 1 && void 0 !== arguments[1] + ? arguments[1] + : 0; + return this.array.set(e, t), this; + }, + }, + { + key: "clone", + value: function (e) { + void 0 === e.arrayBuffers && (e.arrayBuffers = {}), + void 0 === this.array.buffer._uuid && + (this.array.buffer._uuid = nr()), + void 0 === e.arrayBuffers[this.array.buffer._uuid] && + (e.arrayBuffers[this.array.buffer._uuid] = + this.array.slice(0).buffer); + var t = new this.array.constructor( + e.arrayBuffers[this.array.buffer._uuid] + ), + n = new this.constructor(t, this.stride); + return n.setUsage(this.usage), n; + }, + }, + { + key: "onUpload", + value: function (e) { + return (this.onUploadCallback = e), this; + }, + }, + { + key: "toJSON", + value: function (e) { + return ( + void 0 === e.arrayBuffers && (e.arrayBuffers = {}), + void 0 === this.array.buffer._uuid && + (this.array.buffer._uuid = nr()), + 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, + } + ); + }, + }, + ]), + e + ); + })(), + cu = new Vr(), + fu = (function () { + function e(t, n, r) { + var i = + arguments.length > 3 && void 0 !== arguments[3] && arguments[3]; + (0, m.Z)(this, e), + (this.isInterleavedBufferAttribute = !0), + (this.name = ""), + (this.data = t), + (this.itemSize = n), + (this.offset = r), + (this.normalized = i); + } + return ( + (0, g.Z)(e, [ + { + key: "count", + get: function () { + return this.data.count; + }, + }, + { + key: "array", + get: function () { + return this.data.array; + }, + }, + { + key: "needsUpdate", + set: function (e) { + this.data.needsUpdate = e; + }, + }, + { + key: "applyMatrix4", + value: function (e) { + for (var t = 0, n = this.data.count; t < n; t++) + cu.fromBufferAttribute(this, t), + cu.applyMatrix4(e), + this.setXYZ(t, cu.x, cu.y, cu.z); + return this; + }, + }, + { + key: "applyNormalMatrix", + value: function (e) { + for (var t = 0, n = this.count; t < n; t++) + cu.fromBufferAttribute(this, t), + cu.applyNormalMatrix(e), + this.setXYZ(t, cu.x, cu.y, cu.z); + return this; + }, + }, + { + key: "transformDirection", + value: function (e) { + for (var t = 0, n = this.count; t < n; t++) + cu.fromBufferAttribute(this, t), + cu.transformDirection(e), + this.setXYZ(t, cu.x, cu.y, cu.z); + return this; + }, + }, + { + key: "setX", + value: function (e, t) { + return ( + this.normalized && (t = cr(t, this.array)), + (this.data.array[e * this.data.stride + this.offset] = t), + this + ); + }, + }, + { + key: "setY", + value: function (e, t) { + return ( + this.normalized && (t = cr(t, this.array)), + (this.data.array[e * this.data.stride + this.offset + 1] = + t), + this + ); + }, + }, + { + key: "setZ", + value: function (e, t) { + return ( + this.normalized && (t = cr(t, this.array)), + (this.data.array[e * this.data.stride + this.offset + 2] = + t), + this + ); + }, + }, + { + key: "setW", + value: function (e, t) { + return ( + this.normalized && (t = cr(t, this.array)), + (this.data.array[e * this.data.stride + this.offset + 3] = + t), + this + ); + }, + }, + { + key: "getX", + value: function (e) { + var t = this.data.array[e * this.data.stride + this.offset]; + return this.normalized && (t = ur(t, this.array)), t; + }, + }, + { + key: "getY", + value: function (e) { + var t = + this.data.array[e * this.data.stride + this.offset + 1]; + return this.normalized && (t = ur(t, this.array)), t; + }, + }, + { + key: "getZ", + value: function (e) { + var t = + this.data.array[e * this.data.stride + this.offset + 2]; + return this.normalized && (t = ur(t, this.array)), t; + }, + }, + { + key: "getW", + value: function (e) { + var t = + this.data.array[e * this.data.stride + this.offset + 3]; + return this.normalized && (t = ur(t, this.array)), t; + }, + }, + { + key: "setXY", + value: function (e, t, n) { + return ( + (e = e * this.data.stride + this.offset), + this.normalized && + ((t = cr(t, this.array)), (n = cr(n, this.array))), + (this.data.array[e + 0] = t), + (this.data.array[e + 1] = n), + this + ); + }, + }, + { + key: "setXYZ", + value: function (e, t, n, r) { + return ( + (e = e * this.data.stride + this.offset), + this.normalized && + ((t = cr(t, this.array)), + (n = cr(n, this.array)), + (r = cr(r, this.array))), + (this.data.array[e + 0] = t), + (this.data.array[e + 1] = n), + (this.data.array[e + 2] = r), + this + ); + }, + }, + { + key: "setXYZW", + value: function (e, t, n, r, i) { + return ( + (e = e * this.data.stride + this.offset), + this.normalized && + ((t = cr(t, this.array)), + (n = cr(n, this.array)), + (r = cr(r, this.array)), + (i = cr(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 + ); + }, + }, + { + key: "clone", + value: function (t) { + if (void 0 === t) { + console.log( + "THREE.InterleavedBufferAttribute.clone(): Cloning an interleaved buffer attribute will de-interleave buffer data." + ); + for (var n = [], r = 0; r < this.count; r++) + for ( + var i = r * this.data.stride + this.offset, a = 0; + a < this.itemSize; + a++ + ) + n.push(this.data.array[i + a]); + return new xa( + new this.array.constructor(n), + this.itemSize, + this.normalized + ); + } + return ( + void 0 === t.interleavedBuffers && + (t.interleavedBuffers = {}), + void 0 === t.interleavedBuffers[this.data.uuid] && + (t.interleavedBuffers[this.data.uuid] = + this.data.clone(t)), + new e( + t.interleavedBuffers[this.data.uuid], + this.itemSize, + this.offset, + this.normalized + ) + ); + }, + }, + { + key: "toJSON", + value: function (e) { + if (void 0 === e) { + console.log( + "THREE.InterleavedBufferAttribute.toJSON(): Serializing an interleaved buffer attribute will de-interleave buffer data." + ); + for (var t = [], n = 0; n < this.count; n++) + for ( + var r = n * this.data.stride + this.offset, i = 0; + i < this.itemSize; + i++ + ) + t.push(this.data.array[r + i]); + return { + itemSize: this.itemSize, + type: this.array.constructor.name, + array: t, + 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, + } + ); + }, + }, + ]), + e + ); + })(), + du = (function (e) { + (0, d.Z)(n, e); + var t = (0, h.Z)(n); + function n(e) { + var r; + return ( + (0, m.Z)(this, n), + ((r = t.call(this)).isSpriteMaterial = !0), + (r.type = "SpriteMaterial"), + (r.color = new fa(16777215)), + (r.map = null), + (r.alphaMap = null), + (r.rotation = 0), + (r.sizeAttenuation = !0), + (r.transparent = !0), + (r.fog = !0), + r.setValues(e), + r + ); + } + return ( + (0, g.Z)(n, [ + { + key: "copy", + value: function (e) { + return ( + (0, l.Z)((0, u.Z)(n.prototype), "copy", this).call( + this, + 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 + ); + }, + }, + ]), + n + ); + })(oa), + hu = new Vr(), + pu = new Vr(), + vu = new Vr(), + mu = new dr(), + gu = new dr(), + Au = new xi(), + yu = new Vr(), + bu = new Vr(), + xu = new Vr(), + Su = new dr(), + Eu = new dr(), + _u = new dr(), + Cu = (function (e) { + (0, d.Z)(n, e); + var t = (0, h.Z)(n); + function n() { + var e, + r = + arguments.length > 0 && void 0 !== arguments[0] + ? arguments[0] + : new du(); + if ( + ((0, m.Z)(this, n), + ((e = t.call(this)).isSprite = !0), + (e.type = "Sprite"), + void 0 === au) + ) { + au = new Na(); + var i = new Float32Array([ + -0.5, -0.5, 0, 0, 0, 0.5, -0.5, 0, 1, 0, 0.5, 0.5, 0, 1, 1, + -0.5, 0.5, 0, 0, 1, + ]), + a = new uu(i, 5); + au.setIndex([0, 1, 2, 0, 2, 3]), + au.setAttribute("position", new fu(a, 3, 0, !1)), + au.setAttribute("uv", new fu(a, 2, 3, !1)); + } + return ( + (e.geometry = au), + (e.material = r), + (e.center = new dr(0.5, 0.5)), + e + ); + } + return ( + (0, g.Z)(n, [ + { + key: "raycast", + value: function (e, t) { + null === e.camera && + console.error( + 'THREE.Sprite: "Raycaster.camera" needs to be set in order to raycast against sprites.' + ), + pu.setFromMatrixScale(this.matrixWorld), + Au.copy(e.camera.matrixWorld), + this.modelViewMatrix.multiplyMatrices( + e.camera.matrixWorldInverse, + this.matrixWorld + ), + vu.setFromMatrixPosition(this.modelViewMatrix), + e.camera.isPerspectiveCamera && + !1 === this.material.sizeAttenuation && + pu.multiplyScalar(-vu.z); + var n, + r, + i = this.material.rotation; + 0 !== i && ((r = Math.cos(i)), (n = Math.sin(i))); + var a = this.center; + wu(yu.set(-0.5, -0.5, 0), vu, a, pu, n, r), + wu(bu.set(0.5, -0.5, 0), vu, a, pu, n, r), + wu(xu.set(0.5, 0.5, 0), vu, a, pu, n, r), + Su.set(0, 0), + Eu.set(1, 0), + _u.set(1, 1); + var o = e.ray.intersectTriangle(yu, bu, xu, !1, hu); + if ( + null !== o || + (wu(bu.set(-0.5, 0.5, 0), vu, a, pu, n, r), + Eu.set(0, 1), + null !== + (o = e.ray.intersectTriangle(yu, xu, bu, !1, hu))) + ) { + var s = e.ray.origin.distanceTo(hu); + s < e.near || + s > e.far || + t.push({ + distance: s, + point: hu.clone(), + uv: ia.getInterpolation( + hu, + yu, + bu, + xu, + Su, + Eu, + _u, + new dr() + ), + face: null, + object: this, + }); + } + }, + }, + { + key: "copy", + value: function (e, t) { + return ( + (0, l.Z)((0, u.Z)(n.prototype), "copy", this).call( + this, + e, + t + ), + void 0 !== e.center && this.center.copy(e.center), + (this.material = e.material), + this + ); + }, + }, + ]), + n + ); + })(ji); + function wu(e, t, n, r, i, a) { + mu.subVectors(e, n).addScalar(0.5).multiply(r), + void 0 !== i + ? ((gu.x = a * mu.x - i * mu.y), (gu.y = i * mu.x + a * mu.y)) + : gu.copy(mu), + e.copy(t), + (e.x += gu.x), + (e.y += gu.y), + e.applyMatrix4(Au); + } + var Tu = new Vr(), + Mu = new Vr(), + Iu = (function (e) { + (0, d.Z)(n, e); + var t = (0, h.Z)(n); + function n() { + var e; + return ( + (0, m.Z)(this, n), + ((e = t.call(this))._currentLevel = 0), + (e.type = "LOD"), + Object.defineProperties((0, f.Z)(e), { + levels: { enumerable: !0, value: [] }, + isLOD: { value: !0 }, + }), + (e.autoUpdate = !0), + e + ); + } + return ( + (0, g.Z)(n, [ + { + key: "copy", + value: function (e) { + (0, l.Z)((0, u.Z)(n.prototype), "copy", this).call( + this, + e, + !1 + ); + for (var t = e.levels, r = 0, i = t.length; r < i; r++) { + var a = t[r]; + this.addLevel(a.object.clone(), a.distance, a.hysteresis); + } + return (this.autoUpdate = e.autoUpdate), this; + }, + }, + { + key: "addLevel", + value: function (e) { + var 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); + var r, + i = this.levels; + for (r = 0; r < i.length && !(t < i[r].distance); r++); + return ( + i.splice(r, 0, { distance: t, hysteresis: n, object: e }), + this.add(e), + this + ); + }, + }, + { + key: "getCurrentLevel", + value: function () { + return this._currentLevel; + }, + }, + { + key: "getObjectForDistance", + value: function (e) { + var t = this.levels; + if (t.length > 0) { + var n, r; + for (n = 1, r = t.length; n < r; n++) { + var i = t[n].distance; + if ( + (t[n].object.visible && (i -= i * t[n].hysteresis), + e < i) + ) + break; + } + return t[n - 1].object; + } + return null; + }, + }, + { + key: "raycast", + value: function (e, t) { + if (this.levels.length > 0) { + Tu.setFromMatrixPosition(this.matrixWorld); + var n = e.ray.origin.distanceTo(Tu); + this.getObjectForDistance(n).raycast(e, t); + } + }, + }, + { + key: "update", + value: function (e) { + var t = this.levels; + if (t.length > 1) { + Tu.setFromMatrixPosition(e.matrixWorld), + Mu.setFromMatrixPosition(this.matrixWorld); + var n, + r, + i = Tu.distanceTo(Mu) / e.zoom; + for ( + t[0].object.visible = !0, n = 1, r = t.length; + n < r; + n++ + ) { + var a = t[n].distance; + if ( + (t[n].object.visible && (a -= a * t[n].hysteresis), + !(i >= a)) + ) + break; + (t[n - 1].object.visible = !1), + (t[n].object.visible = !0); + } + for (this._currentLevel = n - 1; n < r; n++) + t[n].object.visible = !1; + } + }, + }, + { + key: "toJSON", + value: function (e) { + var t = (0, l.Z)( + (0, u.Z)(n.prototype), + "toJSON", + this + ).call(this, e); + !1 === this.autoUpdate && (t.object.autoUpdate = !1), + (t.object.levels = []); + for (var r = this.levels, i = 0, a = r.length; i < a; i++) { + var o = r[i]; + t.object.levels.push({ + object: o.object.uuid, + distance: o.distance, + hysteresis: o.hysteresis, + }); + } + return t; + }, + }, + ]), + n + ); + })(ji), + ku = new Vr(), + Ru = new Ur(), + Bu = new Ur(), + Pu = new Vr(), + Lu = new xi(), + Du = new Vr(), + Uu = new di(), + Fu = new xi(), + Ou = new bi(), + Nu = (function (e) { + (0, d.Z)(n, e); + var t = (0, h.Z)(n); + function n(e, r) { + var i; + return ( + (0, m.Z)(this, n), + ((i = t.call(this, e, r)).isSkinnedMesh = !0), + (i.type = "SkinnedMesh"), + (i.bindMode = "attached"), + (i.bindMatrix = new xi()), + (i.bindMatrixInverse = new xi()), + (i.boundingBox = null), + (i.boundingSphere = null), + i + ); + } + return ( + (0, g.Z)(n, [ + { + key: "computeBoundingBox", + value: function () { + var e = this.geometry; + null === this.boundingBox && (this.boundingBox = new Xr()), + this.boundingBox.makeEmpty(); + for ( + var t = e.getAttribute("position"), n = 0; + n < t.count; + n++ + ) + Du.fromBufferAttribute(t, n), + this.applyBoneTransform(n, Du), + this.boundingBox.expandByPoint(Du); + }, + }, + { + key: "computeBoundingSphere", + value: function () { + var e = this.geometry; + null === this.boundingSphere && + (this.boundingSphere = new di()), + this.boundingSphere.makeEmpty(); + for ( + var t = e.getAttribute("position"), n = 0; + n < t.count; + n++ + ) + Du.fromBufferAttribute(t, n), + this.applyBoneTransform(n, Du), + this.boundingSphere.expandByPoint(Du); + }, + }, + { + key: "copy", + value: function (e, t) { + return ( + (0, l.Z)((0, u.Z)(n.prototype), "copy", this).call( + this, + 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 + ); + }, + }, + { + key: "raycast", + value: function (e, t) { + var n = this.material, + r = this.matrixWorld; + void 0 !== n && + (null === this.boundingSphere && + this.computeBoundingSphere(), + Uu.copy(this.boundingSphere), + Uu.applyMatrix4(r), + !1 !== e.ray.intersectsSphere(Uu) && + (Fu.copy(r).invert(), + Ou.copy(e.ray).applyMatrix4(Fu), + (null !== this.boundingBox && + !1 === Ou.intersectsBox(this.boundingBox)) || + this._computeIntersections(e, t, Ou))); + }, + }, + { + key: "getVertexPosition", + value: function (e, t) { + return ( + (0, l.Z)( + (0, u.Z)(n.prototype), + "getVertexPosition", + this + ).call(this, e, t), + this.applyBoneTransform(e, t), + t + ); + }, + }, + { + key: "bind", + value: function (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(); + }, + }, + { + key: "pose", + value: function () { + this.skeleton.pose(); + }, + }, + { + key: "normalizeSkinWeights", + value: function () { + for ( + var e = new Ur(), + t = this.geometry.attributes.skinWeight, + n = 0, + r = t.count; + n < r; + n++ + ) { + e.fromBufferAttribute(t, n); + var i = 1 / e.manhattanLength(); + i !== 1 / 0 ? e.multiplyScalar(i) : e.set(1, 0, 0, 0), + t.setXYZW(n, e.x, e.y, e.z, e.w); + } + }, + }, + { + key: "updateMatrixWorld", + value: function (e) { + (0, l.Z)( + (0, u.Z)(n.prototype), + "updateMatrixWorld", + this + ).call(this, e), + "attached" === this.bindMode + ? this.bindMatrixInverse.copy(this.matrixWorld).invert() + : "detached" === this.bindMode + ? this.bindMatrixInverse.copy(this.bindMatrix).invert() + : console.warn( + "THREE.SkinnedMesh: Unrecognized bindMode: " + + this.bindMode + ); + }, + }, + { + key: "applyBoneTransform", + value: function (e, t) { + var n = this.skeleton, + r = this.geometry; + Ru.fromBufferAttribute(r.attributes.skinIndex, e), + Bu.fromBufferAttribute(r.attributes.skinWeight, e), + ku.copy(t).applyMatrix4(this.bindMatrix), + t.set(0, 0, 0); + for (var i = 0; i < 4; i++) { + var a = Bu.getComponent(i); + if (0 !== a) { + var o = Ru.getComponent(i); + Lu.multiplyMatrices( + n.bones[o].matrixWorld, + n.boneInverses[o] + ), + t.addScaledVector(Pu.copy(ku).applyMatrix4(Lu), a); + } + } + return t.applyMatrix4(this.bindMatrixInverse); + }, + }, + { + key: "boneTransform", + value: function (e, t) { + return ( + console.warn( + "THREE.SkinnedMesh: .boneTransform() was renamed to .applyBoneTransform() in r151." + ), + this.applyBoneTransform(e, t) + ); + }, + }, + ]), + n + ); + })(ro), + Gu = (function (e) { + (0, d.Z)(n, e); + var t = (0, h.Z)(n); + function n() { + var e; + return ( + (0, m.Z)(this, n), + ((e = t.call(this)).isBone = !0), + (e.type = "Bone"), + e + ); + } + return (0, g.Z)(n); + })(ji), + Zu = (function (e) { + (0, d.Z)(n, e); + var t = (0, h.Z)(n); + function n() { + var e, + r = + arguments.length > 0 && void 0 !== arguments[0] + ? arguments[0] + : null, + i = + arguments.length > 1 && void 0 !== arguments[1] + ? arguments[1] + : 1, + a = + arguments.length > 2 && void 0 !== arguments[2] + ? arguments[2] + : 1, + o = arguments.length > 3 ? arguments[3] : void 0, + s = arguments.length > 4 ? arguments[4] : void 0, + l = arguments.length > 5 ? arguments[5] : void 0, + u = arguments.length > 6 ? arguments[6] : void 0, + c = arguments.length > 7 ? arguments[7] : void 0, + f = + arguments.length > 8 && void 0 !== arguments[8] + ? arguments[8] + : Te, + d = + arguments.length > 9 && void 0 !== arguments[9] + ? arguments[9] + : Te, + h = arguments.length > 10 ? arguments[10] : void 0, + p = arguments.length > 11 ? arguments[11] : void 0; + return ( + (0, m.Z)(this, n), + ((e = t.call( + this, + null, + l, + u, + c, + f, + d, + o, + s, + h, + p + )).isDataTexture = !0), + (e.image = { data: r, width: i, height: a }), + (e.generateMipmaps = !1), + (e.flipY = !1), + (e.unpackAlignment = 1), + e + ); + } + return (0, g.Z)(n); + })(Dr), + zu = new xi(), + Qu = new xi(), + Hu = (function () { + function e() { + var t = + arguments.length > 0 && void 0 !== arguments[0] + ? arguments[0] + : [], + n = + arguments.length > 1 && void 0 !== arguments[1] + ? arguments[1] + : []; + (0, m.Z)(this, e), + (this.uuid = nr()), + (this.bones = t.slice(0)), + (this.boneInverses = n), + (this.boneMatrices = null), + (this.boneTexture = null), + (this.boneTextureSize = 0), + this.init(); + } + return ( + (0, g.Z)(e, [ + { + key: "init", + value: function () { + var 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 (var n = 0, r = this.bones.length; n < r; n++) + this.boneInverses.push(new xi()); + } + }, + }, + { + key: "calculateInverses", + value: function () { + this.boneInverses.length = 0; + for (var e = 0, t = this.bones.length; e < t; e++) { + var n = new xi(); + this.bones[e] && + n.copy(this.bones[e].matrixWorld).invert(), + this.boneInverses.push(n); + } + }, + }, + { + key: "pose", + value: function () { + for (var e = 0, t = this.bones.length; e < t; e++) { + var n = this.bones[e]; + n && n.matrixWorld.copy(this.boneInverses[e]).invert(); + } + for (var r = 0, i = this.bones.length; r < i; r++) { + var a = this.bones[r]; + a && + (a.parent && a.parent.isBone + ? (a.matrix.copy(a.parent.matrixWorld).invert(), + a.matrix.multiply(a.matrixWorld)) + : a.matrix.copy(a.matrixWorld), + a.matrix.decompose(a.position, a.quaternion, a.scale)); + } + }, + }, + { + key: "update", + value: function () { + for ( + var e = this.bones, + t = this.boneInverses, + n = this.boneMatrices, + r = this.boneTexture, + i = 0, + a = e.length; + i < a; + i++ + ) { + var o = e[i] ? e[i].matrixWorld : Qu; + zu.multiplyMatrices(o, t[i]), zu.toArray(n, 16 * i); + } + null !== r && (r.needsUpdate = !0); + }, + }, + { + key: "clone", + value: function () { + return new e(this.bones, this.boneInverses); + }, + }, + { + key: "computeBoneTexture", + value: function () { + var e = Math.sqrt(4 * this.bones.length); + (e = sr(e)), (e = Math.max(e, 4)); + var t = new Float32Array(e * e * 4); + t.set(this.boneMatrices); + var n = new Zu(t, e, e, Ye, Qe); + return ( + (n.needsUpdate = !0), + (this.boneMatrices = t), + (this.boneTexture = n), + (this.boneTextureSize = e), + this + ); + }, + }, + { + key: "getBoneByName", + value: function (e) { + for (var t = 0, n = this.bones.length; t < n; t++) { + var r = this.bones[t]; + if (r.name === e) return r; + } + }, + }, + { + key: "dispose", + value: function () { + null !== this.boneTexture && + (this.boneTexture.dispose(), (this.boneTexture = null)); + }, + }, + { + key: "fromJSON", + value: function (e, t) { + this.uuid = e.uuid; + for (var n = 0, r = e.bones.length; n < r; n++) { + var i = e.bones[n], + a = t[i]; + void 0 === a && + (console.warn( + "THREE.Skeleton: No bone found with UUID:", + i + ), + (a = new Gu())), + this.bones.push(a), + this.boneInverses.push( + new xi().fromArray(e.boneInverses[n]) + ); + } + return this.init(), this; + }, + }, + { + key: "toJSON", + value: function () { + var e = { + metadata: { + version: 4.6, + type: "Skeleton", + generator: "Skeleton.toJSON", + }, + bones: [], + boneInverses: [], + }; + e.uuid = this.uuid; + for ( + var t = this.bones, + n = this.boneInverses, + r = 0, + i = t.length; + r < i; + r++ + ) { + var a = t[r]; + e.bones.push(a.uuid); + var o = n[r]; + e.boneInverses.push(o.toArray()); + } + return e; + }, + }, + ]), + e + ); + })(), + Vu = (function (e) { + (0, d.Z)(n, e); + var t = (0, h.Z)(n); + function n(e, r, i) { + var a, + o = + arguments.length > 3 && void 0 !== arguments[3] + ? arguments[3] + : 1; + return ( + (0, m.Z)(this, n), + ((a = t.call(this, e, r, i)).isInstancedBufferAttribute = !0), + (a.meshPerAttribute = o), + a + ); + } + return ( + (0, g.Z)(n, [ + { + key: "copy", + value: function (e) { + return ( + (0, l.Z)((0, u.Z)(n.prototype), "copy", this).call( + this, + e + ), + (this.meshPerAttribute = e.meshPerAttribute), + this + ); + }, + }, + { + key: "toJSON", + value: function () { + var e = (0, l.Z)( + (0, u.Z)(n.prototype), + "toJSON", + this + ).call(this); + return ( + (e.meshPerAttribute = this.meshPerAttribute), + (e.isInstancedBufferAttribute = !0), + e + ); + }, + }, + ]), + n + ); + })(xa), + ju = new xi(), + Wu = new xi(), + Xu = [], + Yu = new Xr(), + qu = new xi(), + Ju = new ro(), + Ku = new di(), + $u = (function (e) { + (0, d.Z)(n, e); + var t = (0, h.Z)(n); + function n(e, r, i) { + var a; + (0, m.Z)(this, n), + ((a = t.call(this, e, r)).isInstancedMesh = !0), + (a.instanceMatrix = new Vu(new Float32Array(16 * i), 16)), + (a.instanceColor = null), + (a.count = i), + (a.boundingBox = null), + (a.boundingSphere = null); + for (var o = 0; o < i; o++) a.setMatrixAt(o, qu); + return a; + } + return ( + (0, g.Z)(n, [ + { + key: "computeBoundingBox", + value: function () { + var e = this.geometry, + t = this.count; + null === this.boundingBox && (this.boundingBox = new Xr()), + null === e.boundingBox && e.computeBoundingBox(), + this.boundingBox.makeEmpty(); + for (var n = 0; n < t; n++) + this.getMatrixAt(n, ju), + Yu.copy(e.boundingBox).applyMatrix4(ju), + this.boundingBox.union(Yu); + }, + }, + { + key: "computeBoundingSphere", + value: function () { + var e = this.geometry, + t = this.count; + null === this.boundingSphere && + (this.boundingSphere = new di()), + null === e.boundingSphere && e.computeBoundingSphere(), + this.boundingSphere.makeEmpty(); + for (var n = 0; n < t; n++) + this.getMatrixAt(n, ju), + Ku.copy(e.boundingSphere).applyMatrix4(ju), + this.boundingSphere.union(Ku); + }, + }, + { + key: "copy", + value: function (e, t) { + return ( + (0, l.Z)((0, u.Z)(n.prototype), "copy", this).call( + this, + e, + t + ), + this.instanceMatrix.copy(e.instanceMatrix), + 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 + ); + }, + }, + { + key: "getColorAt", + value: function (e, t) { + t.fromArray(this.instanceColor.array, 3 * e); + }, + }, + { + key: "getMatrixAt", + value: function (e, t) { + t.fromArray(this.instanceMatrix.array, 16 * e); + }, + }, + { + key: "raycast", + value: function (e, t) { + var n = this.matrixWorld, + r = this.count; + if ( + ((Ju.geometry = this.geometry), + (Ju.material = this.material), + void 0 !== Ju.material && + (null === this.boundingSphere && + this.computeBoundingSphere(), + Ku.copy(this.boundingSphere), + Ku.applyMatrix4(n), + !1 !== e.ray.intersectsSphere(Ku))) + ) + for (var i = 0; i < r; i++) { + this.getMatrixAt(i, ju), + Wu.multiplyMatrices(n, ju), + (Ju.matrixWorld = Wu), + Ju.raycast(e, Xu); + for (var a = 0, o = Xu.length; a < o; a++) { + var s = Xu[a]; + (s.instanceId = i), (s.object = this), t.push(s); + } + Xu.length = 0; + } + }, + }, + { + key: "setColorAt", + value: function (e, t) { + null === this.instanceColor && + (this.instanceColor = new Vu( + new Float32Array(3 * this.instanceMatrix.count), + 3 + )), + t.toArray(this.instanceColor.array, 3 * e); + }, + }, + { + key: "setMatrixAt", + value: function (e, t) { + t.toArray(this.instanceMatrix.array, 16 * e); + }, + }, + { key: "updateMorphTargets", value: function () {} }, + { + key: "dispose", + value: function () { + this.dispatchEvent({ type: "dispose" }); + }, + }, + ]), + n + ); + })(ro), + ec = (function (e) { + (0, d.Z)(n, e); + var t = (0, h.Z)(n); + function n(e) { + var r; + return ( + (0, m.Z)(this, n), + ((r = t.call(this)).isLineBasicMaterial = !0), + (r.type = "LineBasicMaterial"), + (r.color = new fa(16777215)), + (r.map = null), + (r.linewidth = 1), + (r.linecap = "round"), + (r.linejoin = "round"), + (r.fog = !0), + r.setValues(e), + r + ); + } + return ( + (0, g.Z)(n, [ + { + key: "copy", + value: function (e) { + return ( + (0, l.Z)((0, u.Z)(n.prototype), "copy", this).call( + this, + 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 + ); + }, + }, + ]), + n + ); + })(oa), + tc = new Vr(), + nc = new Vr(), + rc = new xi(), + ic = new bi(), + ac = new di(), + oc = (function (e) { + (0, d.Z)(n, e); + var t = (0, h.Z)(n); + function n() { + var e, + r = + arguments.length > 0 && void 0 !== arguments[0] + ? arguments[0] + : new Na(), + i = + arguments.length > 1 && void 0 !== arguments[1] + ? arguments[1] + : new ec(); + return ( + (0, m.Z)(this, n), + ((e = t.call(this)).isLine = !0), + (e.type = "Line"), + (e.geometry = r), + (e.material = i), + e.updateMorphTargets(), + e + ); + } + return ( + (0, g.Z)(n, [ + { + key: "copy", + value: function (e, t) { + return ( + (0, l.Z)((0, u.Z)(n.prototype), "copy", this).call( + this, + e, + t + ), + (this.material = Array.isArray(e.material) + ? e.material.slice() + : e.material), + (this.geometry = e.geometry), + this + ); + }, + }, + { + key: "computeLineDistances", + value: function () { + var e = this.geometry; + if (null === e.index) { + for ( + var t = e.attributes.position, + n = [0], + r = 1, + i = t.count; + r < i; + r++ + ) + tc.fromBufferAttribute(t, r - 1), + nc.fromBufferAttribute(t, r), + (n[r] = n[r - 1]), + (n[r] += tc.distanceTo(nc)); + e.setAttribute("lineDistance", new ka(n, 1)); + } else + console.warn( + "THREE.Line.computeLineDistances(): Computation only possible with non-indexed BufferGeometry." + ); + return this; + }, + }, + { + key: "raycast", + value: function (e, t) { + var n = this.geometry, + r = this.matrixWorld, + i = e.params.Line.threshold, + a = n.drawRange; + if ( + (null === n.boundingSphere && n.computeBoundingSphere(), + ac.copy(n.boundingSphere), + ac.applyMatrix4(r), + (ac.radius += i), + !1 !== e.ray.intersectsSphere(ac)) + ) { + rc.copy(r).invert(), ic.copy(e.ray).applyMatrix4(rc); + var o = + i / + ((this.scale.x + this.scale.y + this.scale.z) / 3), + s = o * o, + l = new Vr(), + u = new Vr(), + c = new Vr(), + f = new Vr(), + d = this.isLineSegments ? 2 : 1, + h = n.index, + p = n.attributes.position; + if (null !== h) + for ( + var v = Math.max(0, a.start), + m = Math.min(h.count, a.start + a.count) - 1; + v < m; + v += d + ) { + var g = h.getX(v), + A = h.getX(v + 1); + if ( + (l.fromBufferAttribute(p, g), + u.fromBufferAttribute(p, A), + !(ic.distanceSqToSegment(l, u, f, c) > s)) + ) { + f.applyMatrix4(this.matrixWorld); + var y = e.ray.origin.distanceTo(f); + y < e.near || + y > e.far || + t.push({ + distance: y, + point: c.clone().applyMatrix4(this.matrixWorld), + index: v, + face: null, + faceIndex: null, + object: this, + }); + } + } + else + for ( + var b = Math.max(0, a.start), + x = Math.min(p.count, a.start + a.count) - 1; + b < x; + b += d + ) { + if ( + (l.fromBufferAttribute(p, b), + u.fromBufferAttribute(p, b + 1), + !(ic.distanceSqToSegment(l, u, f, c) > s)) + ) { + f.applyMatrix4(this.matrixWorld); + var S = e.ray.origin.distanceTo(f); + S < e.near || + S > e.far || + t.push({ + distance: S, + point: c.clone().applyMatrix4(this.matrixWorld), + index: b, + face: null, + faceIndex: null, + object: this, + }); + } + } + } + }, + }, + { + key: "updateMorphTargets", + value: function () { + var e = this.geometry.morphAttributes, + t = Object.keys(e); + if (t.length > 0) { + var n = e[t[0]]; + if (void 0 !== n) { + (this.morphTargetInfluences = []), + (this.morphTargetDictionary = {}); + for (var r = 0, i = n.length; r < i; r++) { + var a = n[r].name || String(r); + this.morphTargetInfluences.push(0), + (this.morphTargetDictionary[a] = r); + } + } + } + }, + }, + ]), + n + ); + })(ji), + sc = new Vr(), + lc = new Vr(), + uc = (function (e) { + (0, d.Z)(n, e); + var t = (0, h.Z)(n); + function n(e, r) { + var i; + return ( + (0, m.Z)(this, n), + ((i = t.call(this, e, r)).isLineSegments = !0), + (i.type = "LineSegments"), + i + ); + } + return ( + (0, g.Z)(n, [ + { + key: "computeLineDistances", + value: function () { + var e = this.geometry; + if (null === e.index) { + for ( + var t = e.attributes.position, + n = [], + r = 0, + i = t.count; + r < i; + r += 2 + ) + sc.fromBufferAttribute(t, r), + lc.fromBufferAttribute(t, r + 1), + (n[r] = 0 === r ? 0 : n[r - 1]), + (n[r + 1] = n[r] + sc.distanceTo(lc)); + e.setAttribute("lineDistance", new ka(n, 1)); + } else + console.warn( + "THREE.LineSegments.computeLineDistances(): Computation only possible with non-indexed BufferGeometry." + ); + return this; + }, + }, + ]), + n + ); + })(oc), + cc = (function (e) { + (0, d.Z)(n, e); + var t = (0, h.Z)(n); + function n(e, r) { + var i; + return ( + (0, m.Z)(this, n), + ((i = t.call(this, e, r)).isLineLoop = !0), + (i.type = "LineLoop"), + i + ); + } + return (0, g.Z)(n); + })(oc), + fc = (function (e) { + (0, d.Z)(n, e); + var t = (0, h.Z)(n); + function n(e) { + var r; + return ( + (0, m.Z)(this, n), + ((r = t.call(this)).isPointsMaterial = !0), + (r.type = "PointsMaterial"), + (r.color = new fa(16777215)), + (r.map = null), + (r.alphaMap = null), + (r.size = 1), + (r.sizeAttenuation = !0), + (r.fog = !0), + r.setValues(e), + r + ); + } + return ( + (0, g.Z)(n, [ + { + key: "copy", + value: function (e) { + return ( + (0, l.Z)((0, u.Z)(n.prototype), "copy", this).call( + this, + 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 + ); + }, + }, + ]), + n + ); + })(oa), + dc = new xi(), + hc = new bi(), + pc = new di(), + vc = new Vr(), + mc = (function (e) { + (0, d.Z)(n, e); + var t = (0, h.Z)(n); + function n() { + var e, + r = + arguments.length > 0 && void 0 !== arguments[0] + ? arguments[0] + : new Na(), + i = + arguments.length > 1 && void 0 !== arguments[1] + ? arguments[1] + : new fc(); + return ( + (0, m.Z)(this, n), + ((e = t.call(this)).isPoints = !0), + (e.type = "Points"), + (e.geometry = r), + (e.material = i), + e.updateMorphTargets(), + e + ); + } + return ( + (0, g.Z)(n, [ + { + key: "copy", + value: function (e, t) { + return ( + (0, l.Z)((0, u.Z)(n.prototype), "copy", this).call( + this, + e, + t + ), + (this.material = Array.isArray(e.material) + ? e.material.slice() + : e.material), + (this.geometry = e.geometry), + this + ); + }, + }, + { + key: "raycast", + value: function (e, t) { + var n = this.geometry, + r = this.matrixWorld, + i = e.params.Points.threshold, + a = n.drawRange; + if ( + (null === n.boundingSphere && n.computeBoundingSphere(), + pc.copy(n.boundingSphere), + pc.applyMatrix4(r), + (pc.radius += i), + !1 !== e.ray.intersectsSphere(pc)) + ) { + dc.copy(r).invert(), hc.copy(e.ray).applyMatrix4(dc); + var o = + i / + ((this.scale.x + this.scale.y + this.scale.z) / 3), + s = o * o, + l = n.index, + u = n.attributes.position; + if (null !== l) + for ( + var c = Math.max(0, a.start), + f = Math.min(l.count, a.start + a.count); + c < f; + c++ + ) { + var d = l.getX(c); + vc.fromBufferAttribute(u, d), + gc(vc, d, s, r, e, t, this); + } + else + for ( + var h = Math.max(0, a.start), + p = Math.min(u.count, a.start + a.count); + h < p; + h++ + ) + vc.fromBufferAttribute(u, h), + gc(vc, h, s, r, e, t, this); + } + }, + }, + { + key: "updateMorphTargets", + value: function () { + var e = this.geometry.morphAttributes, + t = Object.keys(e); + if (t.length > 0) { + var n = e[t[0]]; + if (void 0 !== n) { + (this.morphTargetInfluences = []), + (this.morphTargetDictionary = {}); + for (var r = 0, i = n.length; r < i; r++) { + var a = n[r].name || String(r); + this.morphTargetInfluences.push(0), + (this.morphTargetDictionary[a] = r); + } + } + } + }, + }, + ]), + n + ); + })(ji); + function gc(e, t, n, r, i, a, o) { + var s = hc.distanceSqToPoint(e); + if (s < n) { + var l = new Vr(); + hc.closestPointToPoint(e, l), l.applyMatrix4(r); + var u = i.ray.origin.distanceTo(l); + if (u < i.near || u > i.far) return; + a.push({ + distance: u, + distanceToRay: Math.sqrt(s), + point: l, + index: t, + face: null, + object: o, + }); + } + } + var Ac = (function (e) { + (0, d.Z)(n, e); + var t = (0, h.Z)(n); + function n(e, r, i, a, o, s, l, u, c) { + var d; + (0, m.Z)(this, n), + ((d = t.call(this, e, r, i, a, o, s, l, u, c)).isVideoTexture = + !0), + (d.minFilter = void 0 !== s ? s : Be), + (d.magFilter = void 0 !== o ? o : Be), + (d.generateMipmaps = !1); + var h = (0, f.Z)(d); + return ( + "requestVideoFrameCallback" in e && + e.requestVideoFrameCallback(function t() { + (h.needsUpdate = !0), e.requestVideoFrameCallback(t); + }), + d + ); + } + return ( + (0, g.Z)(n, [ + { + key: "clone", + value: function () { + return new this.constructor(this.image).copy(this); + }, + }, + { + key: "update", + value: function () { + var e = this.image; + !1 === "requestVideoFrameCallback" in e && + e.readyState >= e.HAVE_CURRENT_DATA && + (this.needsUpdate = !0); + }, + }, + ]), + n + ); + })(Dr), + yc = (function (e) { + (0, d.Z)(n, e); + var t = (0, h.Z)(n); + function n(e, r) { + var i; + return ( + (0, m.Z)(this, n), + ((i = t.call(this, { + width: e, + height: r, + })).isFramebufferTexture = !0), + (i.magFilter = Te), + (i.minFilter = Te), + (i.generateMipmaps = !1), + (i.needsUpdate = !0), + i + ); + } + return (0, g.Z)(n); + })(Dr), + bc = (function (e) { + (0, d.Z)(n, e); + var t = (0, h.Z)(n); + function n(e, r, i, a, o, s, l, u, c, f, d, h) { + var p; + return ( + (0, m.Z)(this, n), + ((p = t.call( + this, + null, + s, + l, + u, + c, + f, + a, + o, + d, + h + )).isCompressedTexture = !0), + (p.image = { width: r, height: i }), + (p.mipmaps = e), + (p.flipY = !1), + (p.generateMipmaps = !1), + p + ); + } + return (0, g.Z)(n); + })(Dr), + xc = (function (e) { + (0, d.Z)(n, e); + var t = (0, h.Z)(n); + function n(e, r, i, a, o, s) { + var l; + return ( + (0, m.Z)(this, n), + ((l = t.call(this, e, r, i, o, s)).isCompressedArrayTexture = + !0), + (l.image.depth = a), + (l.wrapR = Ce), + l + ); + } + return (0, g.Z)(n); + })(bc), + Sc = (function (e) { + (0, d.Z)(n, e); + var t = (0, h.Z)(n); + function n(e, r, i) { + var a; + return ( + (0, m.Z)(this, n), + ((a = t.call( + this, + void 0, + e[0].width, + e[0].height, + r, + i, + ye + )).isCompressedCubeTexture = !0), + (a.isCubeTexture = !0), + (a.image = e), + a + ); + } + return (0, g.Z)(n); + })(bc), + Ec = (function (e) { + (0, d.Z)(n, e); + var t = (0, h.Z)(n); + function n(e, r, i, a, o, s, l, u, c) { + var f; + return ( + (0, m.Z)(this, n), + ((f = t.call(this, e, r, i, a, o, s, l, u, c)).isCanvasTexture = + !0), + (f.needsUpdate = !0), + f + ); + } + return (0, g.Z)(n); + })(Dr), + _c = (function () { + function e() { + (0, m.Z)(this, e), + (this.type = "Curve"), + (this.arcLengthDivisions = 200); + } + return ( + (0, g.Z)(e, [ + { + key: "getPoint", + value: function () { + return ( + console.warn("THREE.Curve: .getPoint() not implemented."), + null + ); + }, + }, + { + key: "getPointAt", + value: function (e, t) { + var n = this.getUtoTmapping(e); + return this.getPoint(n, t); + }, + }, + { + key: "getPoints", + value: function () { + for ( + var e = + arguments.length > 0 && void 0 !== arguments[0] + ? arguments[0] + : 5, + t = [], + n = 0; + n <= e; + n++ + ) + t.push(this.getPoint(n / e)); + return t; + }, + }, + { + key: "getSpacedPoints", + value: function () { + for ( + var e = + arguments.length > 0 && void 0 !== arguments[0] + ? arguments[0] + : 5, + t = [], + n = 0; + n <= e; + n++ + ) + t.push(this.getPointAt(n / e)); + return t; + }, + }, + { + key: "getLength", + value: function () { + var e = this.getLengths(); + return e[e.length - 1]; + }, + }, + { + key: "getLengths", + value: function () { + var 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; + var t, + n = [], + r = this.getPoint(0), + i = 0; + n.push(0); + for (var a = 1; a <= e; a++) + (i += (t = this.getPoint(a / e)).distanceTo(r)), + n.push(i), + (r = t); + return (this.cacheArcLengths = n), n; + }, + }, + { + key: "updateArcLengths", + value: function () { + (this.needsUpdate = !0), this.getLengths(); + }, + }, + { + key: "getUtoTmapping", + value: function (e, t) { + var n, + r = this.getLengths(), + i = 0, + a = r.length; + n = t || e * r[a - 1]; + for (var o, s = 0, l = a - 1; s <= l; ) + if ((o = r[(i = Math.floor(s + (l - s) / 2))] - n) < 0) + s = i + 1; + else { + if (!(o > 0)) { + l = i; + break; + } + l = i - 1; + } + if (r[(i = l)] === n) return i / (a - 1); + var u = r[i]; + return (i + (n - u) / (r[i + 1] - u)) / (a - 1); + }, + }, + { + key: "getTangent", + value: function (e, t) { + var n = 1e-4, + r = e - n, + i = e + n; + r < 0 && (r = 0), i > 1 && (i = 1); + var a = this.getPoint(r), + o = this.getPoint(i), + s = t || (a.isVector2 ? new dr() : new Vr()); + return s.copy(o).sub(a).normalize(), s; + }, + }, + { + key: "getTangentAt", + value: function (e, t) { + var n = this.getUtoTmapping(e); + return this.getTangent(n, t); + }, + }, + { + key: "computeFrenetFrames", + value: function (e, t) { + for ( + var n = new Vr(), + r = [], + i = [], + a = [], + o = new Vr(), + s = new xi(), + l = 0; + l <= e; + l++ + ) { + var u = l / e; + r[l] = this.getTangentAt(u, new Vr()); + } + (i[0] = new Vr()), (a[0] = new Vr()); + var c = Number.MAX_VALUE, + f = Math.abs(r[0].x), + d = Math.abs(r[0].y), + h = Math.abs(r[0].z); + f <= c && ((c = f), n.set(1, 0, 0)), + d <= c && ((c = d), n.set(0, 1, 0)), + h <= c && n.set(0, 0, 1), + o.crossVectors(r[0], n).normalize(), + i[0].crossVectors(r[0], o), + a[0].crossVectors(r[0], i[0]); + for (var p = 1; p <= e; p++) { + if ( + ((i[p] = i[p - 1].clone()), + (a[p] = a[p - 1].clone()), + o.crossVectors(r[p - 1], r[p]), + o.length() > Number.EPSILON) + ) { + o.normalize(); + var v = Math.acos(rr(r[p - 1].dot(r[p]), -1, 1)); + i[p].applyMatrix4(s.makeRotationAxis(o, v)); + } + a[p].crossVectors(r[p], i[p]); + } + if (!0 === t) { + var m = Math.acos(rr(i[0].dot(i[e]), -1, 1)); + (m /= e), + r[0].dot(o.crossVectors(i[0], i[e])) > 0 && (m = -m); + for (var g = 1; g <= e; g++) + i[g].applyMatrix4(s.makeRotationAxis(r[g], m * g)), + a[g].crossVectors(r[g], i[g]); + } + return { tangents: r, normals: i, binormals: a }; + }, + }, + { + key: "clone", + value: function () { + return new this.constructor().copy(this); + }, + }, + { + key: "copy", + value: function (e) { + return ( + (this.arcLengthDivisions = e.arcLengthDivisions), this + ); + }, + }, + { + key: "toJSON", + value: function () { + var e = { + metadata: { + version: 4.6, + type: "Curve", + generator: "Curve.toJSON", + }, + }; + return ( + (e.arcLengthDivisions = this.arcLengthDivisions), + (e.type = this.type), + e + ); + }, + }, + { + key: "fromJSON", + value: function (e) { + return ( + (this.arcLengthDivisions = e.arcLengthDivisions), this + ); + }, + }, + ]), + e + ); + })(), + Cc = (function (e) { + (0, d.Z)(n, e); + var t = (0, h.Z)(n); + function n() { + var e, + r = + arguments.length > 0 && void 0 !== arguments[0] + ? arguments[0] + : 0, + i = + arguments.length > 1 && void 0 !== arguments[1] + ? arguments[1] + : 0, + a = + arguments.length > 2 && void 0 !== arguments[2] + ? arguments[2] + : 1, + o = + arguments.length > 3 && void 0 !== arguments[3] + ? arguments[3] + : 1, + s = + arguments.length > 4 && void 0 !== arguments[4] + ? arguments[4] + : 0, + l = + arguments.length > 5 && void 0 !== arguments[5] + ? arguments[5] + : 2 * Math.PI, + u = + arguments.length > 6 && + void 0 !== arguments[6] && + arguments[6], + c = + arguments.length > 7 && void 0 !== arguments[7] + ? arguments[7] + : 0; + return ( + (0, m.Z)(this, n), + ((e = t.call(this)).isEllipseCurve = !0), + (e.type = "EllipseCurve"), + (e.aX = r), + (e.aY = i), + (e.xRadius = a), + (e.yRadius = o), + (e.aStartAngle = s), + (e.aEndAngle = l), + (e.aClockwise = u), + (e.aRotation = c), + e + ); + } + return ( + (0, g.Z)(n, [ + { + key: "getPoint", + value: function (e, t) { + for ( + var n = t || new dr(), + r = 2 * Math.PI, + i = this.aEndAngle - this.aStartAngle, + a = Math.abs(i) < Number.EPSILON; + i < 0; + + ) + i += r; + for (; i > r; ) i -= r; + i < Number.EPSILON && (i = a ? 0 : r), + !0 !== this.aClockwise || + a || + (i === r ? (i = -r) : (i -= r)); + var o = this.aStartAngle + e * i, + s = this.aX + this.xRadius * Math.cos(o), + l = this.aY + this.yRadius * Math.sin(o); + if (0 !== this.aRotation) { + var u = Math.cos(this.aRotation), + c = Math.sin(this.aRotation), + f = s - this.aX, + d = l - this.aY; + (s = f * u - d * c + this.aX), + (l = f * c + d * u + this.aY); + } + return n.set(s, l); + }, + }, + { + key: "copy", + value: function (e) { + return ( + (0, l.Z)((0, u.Z)(n.prototype), "copy", this).call( + this, + 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 + ); + }, + }, + { + key: "toJSON", + value: function () { + var e = (0, l.Z)( + (0, u.Z)(n.prototype), + "toJSON", + this + ).call(this); + 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 + ); + }, + }, + { + key: "fromJSON", + value: function (e) { + return ( + (0, l.Z)((0, u.Z)(n.prototype), "fromJSON", this).call( + this, + 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 + ); + }, + }, + ]), + n + ); + })(_c), + wc = (function (e) { + (0, d.Z)(n, e); + var t = (0, h.Z)(n); + function n(e, r, i, a, o, s) { + var l; + return ( + (0, m.Z)(this, n), + ((l = t.call(this, e, r, i, i, a, o, s)).isArcCurve = !0), + (l.type = "ArcCurve"), + l + ); + } + return (0, g.Z)(n); + })(Cc); + function Tc() { + var e = 0, + t = 0, + n = 0, + r = 0; + function i(i, a, o, s) { + (e = i), + (t = o), + (n = -3 * i + 3 * a - 2 * o - s), + (r = 2 * i - 2 * a + o + s); + } + return { + initCatmullRom: function (e, t, n, r, a) { + i(t, n, a * (n - e), a * (r - t)); + }, + initNonuniformCatmullRom: function (e, t, n, r, a, o, s) { + var l = (t - e) / a - (n - e) / (a + o) + (n - t) / o, + u = (n - t) / o - (r - t) / (o + s) + (r - n) / s; + i(t, n, (l *= o), (u *= o)); + }, + calc: function (i) { + var a = i * i; + return e + t * i + n * a + r * (a * i); + }, + }; + } + var Mc = new Vr(), + Ic = new Tc(), + kc = new Tc(), + Rc = new Tc(), + Bc = (function (e) { + (0, d.Z)(n, e); + var t = (0, h.Z)(n); + function n() { + var e, + r = + arguments.length > 0 && void 0 !== arguments[0] + ? arguments[0] + : [], + i = + arguments.length > 1 && + void 0 !== arguments[1] && + arguments[1], + a = + arguments.length > 2 && void 0 !== arguments[2] + ? arguments[2] + : "centripetal", + o = + arguments.length > 3 && void 0 !== arguments[3] + ? arguments[3] + : 0.5; + return ( + (0, m.Z)(this, n), + ((e = t.call(this)).isCatmullRomCurve3 = !0), + (e.type = "CatmullRomCurve3"), + (e.points = r), + (e.closed = i), + (e.curveType = a), + (e.tension = o), + e + ); + } + return ( + (0, g.Z)(n, [ + { + key: "getPoint", + value: function (e) { + var t, + n, + r = + arguments.length > 1 && void 0 !== arguments[1] + ? arguments[1] + : new Vr(), + i = this.points, + a = i.length, + o = (a - (this.closed ? 0 : 1)) * e, + s = Math.floor(o), + l = o - s; + this.closed + ? (s += s > 0 ? 0 : (Math.floor(Math.abs(s) / a) + 1) * a) + : 0 === l && s === a - 1 && ((s = a - 2), (l = 1)), + this.closed || s > 0 + ? (t = i[(s - 1) % a]) + : (Mc.subVectors(i[0], i[1]).add(i[0]), (t = Mc)); + var u = i[s % a], + c = i[(s + 1) % a]; + if ( + (this.closed || s + 2 < a + ? (n = i[(s + 2) % a]) + : (Mc.subVectors(i[a - 1], i[a - 2]).add(i[a - 1]), + (n = Mc)), + "centripetal" === this.curveType || + "chordal" === this.curveType) + ) { + var f = "chordal" === this.curveType ? 0.5 : 0.25, + d = Math.pow(t.distanceToSquared(u), f), + h = Math.pow(u.distanceToSquared(c), f), + p = Math.pow(c.distanceToSquared(n), f); + h < 1e-4 && (h = 1), + d < 1e-4 && (d = h), + p < 1e-4 && (p = h), + Ic.initNonuniformCatmullRom( + t.x, + u.x, + c.x, + n.x, + d, + h, + p + ), + kc.initNonuniformCatmullRom( + t.y, + u.y, + c.y, + n.y, + d, + h, + p + ), + Rc.initNonuniformCatmullRom( + t.z, + u.z, + c.z, + n.z, + d, + h, + p + ); + } else + "catmullrom" === this.curveType && + (Ic.initCatmullRom(t.x, u.x, c.x, n.x, this.tension), + kc.initCatmullRom(t.y, u.y, c.y, n.y, this.tension), + Rc.initCatmullRom(t.z, u.z, c.z, n.z, this.tension)); + return r.set(Ic.calc(l), kc.calc(l), Rc.calc(l)), r; + }, + }, + { + key: "copy", + value: function (e) { + (0, l.Z)((0, u.Z)(n.prototype), "copy", this).call(this, e), + (this.points = []); + for (var t = 0, r = e.points.length; t < r; t++) { + var i = e.points[t]; + this.points.push(i.clone()); + } + return ( + (this.closed = e.closed), + (this.curveType = e.curveType), + (this.tension = e.tension), + this + ); + }, + }, + { + key: "toJSON", + value: function () { + var e = (0, l.Z)( + (0, u.Z)(n.prototype), + "toJSON", + this + ).call(this); + e.points = []; + for (var t = 0, r = this.points.length; t < r; t++) { + var i = this.points[t]; + e.points.push(i.toArray()); + } + return ( + (e.closed = this.closed), + (e.curveType = this.curveType), + (e.tension = this.tension), + e + ); + }, + }, + { + key: "fromJSON", + value: function (e) { + (0, l.Z)((0, u.Z)(n.prototype), "fromJSON", this).call( + this, + e + ), + (this.points = []); + for (var t = 0, r = e.points.length; t < r; t++) { + var i = e.points[t]; + this.points.push(new Vr().fromArray(i)); + } + return ( + (this.closed = e.closed), + (this.curveType = e.curveType), + (this.tension = e.tension), + this + ); + }, + }, + ]), + n + ); + })(_c); + function Pc(e, t, n, r, i) { + var a = 0.5 * (r - t), + o = 0.5 * (i - n), + s = e * e; + return ( + (2 * n - 2 * r + a + o) * (e * s) + + (-3 * n + 3 * r - 2 * a - o) * s + + a * e + + n + ); + } + function Lc(e, t, n, r) { + return ( + (function (e, t) { + var 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 Dc(e, t, n, r, i) { + return ( + (function (e, t) { + var n = 1 - e; + return n * n * n * t; + })(e, t) + + (function (e, t) { + var 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) + ); + } + var Uc = (function (e) { + (0, d.Z)(n, e); + var t = (0, h.Z)(n); + function n() { + var e, + r = + arguments.length > 0 && void 0 !== arguments[0] + ? arguments[0] + : new dr(), + i = + arguments.length > 1 && void 0 !== arguments[1] + ? arguments[1] + : new dr(), + a = + arguments.length > 2 && void 0 !== arguments[2] + ? arguments[2] + : new dr(), + o = + arguments.length > 3 && void 0 !== arguments[3] + ? arguments[3] + : new dr(); + return ( + (0, m.Z)(this, n), + ((e = t.call(this)).isCubicBezierCurve = !0), + (e.type = "CubicBezierCurve"), + (e.v0 = r), + (e.v1 = i), + (e.v2 = a), + (e.v3 = o), + e + ); + } + return ( + (0, g.Z)(n, [ + { + key: "getPoint", + value: function (e) { + var t = + arguments.length > 1 && void 0 !== arguments[1] + ? arguments[1] + : new dr(), + n = this.v0, + r = this.v1, + i = this.v2, + a = this.v3; + return ( + t.set( + Dc(e, n.x, r.x, i.x, a.x), + Dc(e, n.y, r.y, i.y, a.y) + ), + t + ); + }, + }, + { + key: "copy", + value: function (e) { + return ( + (0, l.Z)((0, u.Z)(n.prototype), "copy", this).call( + this, + e + ), + this.v0.copy(e.v0), + this.v1.copy(e.v1), + this.v2.copy(e.v2), + this.v3.copy(e.v3), + this + ); + }, + }, + { + key: "toJSON", + value: function () { + var e = (0, l.Z)( + (0, u.Z)(n.prototype), + "toJSON", + this + ).call(this); + return ( + (e.v0 = this.v0.toArray()), + (e.v1 = this.v1.toArray()), + (e.v2 = this.v2.toArray()), + (e.v3 = this.v3.toArray()), + e + ); + }, + }, + { + key: "fromJSON", + value: function (e) { + return ( + (0, l.Z)((0, u.Z)(n.prototype), "fromJSON", this).call( + this, + e + ), + this.v0.fromArray(e.v0), + this.v1.fromArray(e.v1), + this.v2.fromArray(e.v2), + this.v3.fromArray(e.v3), + this + ); + }, + }, + ]), + n + ); + })(_c), + Fc = (function (e) { + (0, d.Z)(n, e); + var t = (0, h.Z)(n); + function n() { + var e, + r = + arguments.length > 0 && void 0 !== arguments[0] + ? arguments[0] + : new Vr(), + i = + arguments.length > 1 && void 0 !== arguments[1] + ? arguments[1] + : new Vr(), + a = + arguments.length > 2 && void 0 !== arguments[2] + ? arguments[2] + : new Vr(), + o = + arguments.length > 3 && void 0 !== arguments[3] + ? arguments[3] + : new Vr(); + return ( + (0, m.Z)(this, n), + ((e = t.call(this)).isCubicBezierCurve3 = !0), + (e.type = "CubicBezierCurve3"), + (e.v0 = r), + (e.v1 = i), + (e.v2 = a), + (e.v3 = o), + e + ); + } + return ( + (0, g.Z)(n, [ + { + key: "getPoint", + value: function (e) { + var t = + arguments.length > 1 && void 0 !== arguments[1] + ? arguments[1] + : new Vr(), + n = this.v0, + r = this.v1, + i = this.v2, + a = this.v3; + return ( + t.set( + Dc(e, n.x, r.x, i.x, a.x), + Dc(e, n.y, r.y, i.y, a.y), + Dc(e, n.z, r.z, i.z, a.z) + ), + t + ); + }, + }, + { + key: "copy", + value: function (e) { + return ( + (0, l.Z)((0, u.Z)(n.prototype), "copy", this).call( + this, + e + ), + this.v0.copy(e.v0), + this.v1.copy(e.v1), + this.v2.copy(e.v2), + this.v3.copy(e.v3), + this + ); + }, + }, + { + key: "toJSON", + value: function () { + var e = (0, l.Z)( + (0, u.Z)(n.prototype), + "toJSON", + this + ).call(this); + return ( + (e.v0 = this.v0.toArray()), + (e.v1 = this.v1.toArray()), + (e.v2 = this.v2.toArray()), + (e.v3 = this.v3.toArray()), + e + ); + }, + }, + { + key: "fromJSON", + value: function (e) { + return ( + (0, l.Z)((0, u.Z)(n.prototype), "fromJSON", this).call( + this, + e + ), + this.v0.fromArray(e.v0), + this.v1.fromArray(e.v1), + this.v2.fromArray(e.v2), + this.v3.fromArray(e.v3), + this + ); + }, + }, + ]), + n + ); + })(_c), + Oc = (function (e) { + (0, d.Z)(n, e); + var t = (0, h.Z)(n); + function n() { + var e, + r = + arguments.length > 0 && void 0 !== arguments[0] + ? arguments[0] + : new dr(), + i = + arguments.length > 1 && void 0 !== arguments[1] + ? arguments[1] + : new dr(); + return ( + (0, m.Z)(this, n), + ((e = t.call(this)).isLineCurve = !0), + (e.type = "LineCurve"), + (e.v1 = r), + (e.v2 = i), + e + ); + } + return ( + (0, g.Z)(n, [ + { + key: "getPoint", + value: function (e) { + var t = + arguments.length > 1 && void 0 !== arguments[1] + ? arguments[1] + : new dr(); + return ( + 1 === e + ? t.copy(this.v2) + : (t.copy(this.v2).sub(this.v1), + t.multiplyScalar(e).add(this.v1)), + t + ); + }, + }, + { + key: "getPointAt", + value: function (e, t) { + return this.getPoint(e, t); + }, + }, + { + key: "getTangent", + value: function (e) { + return ( + arguments.length > 1 && void 0 !== arguments[1] + ? arguments[1] + : new dr() + ) + .subVectors(this.v2, this.v1) + .normalize(); + }, + }, + { + key: "getTangentAt", + value: function (e, t) { + return this.getTangent(e, t); + }, + }, + { + key: "copy", + value: function (e) { + return ( + (0, l.Z)((0, u.Z)(n.prototype), "copy", this).call( + this, + e + ), + this.v1.copy(e.v1), + this.v2.copy(e.v2), + this + ); + }, + }, + { + key: "toJSON", + value: function () { + var e = (0, l.Z)( + (0, u.Z)(n.prototype), + "toJSON", + this + ).call(this); + return ( + (e.v1 = this.v1.toArray()), (e.v2 = this.v2.toArray()), e + ); + }, + }, + { + key: "fromJSON", + value: function (e) { + return ( + (0, l.Z)((0, u.Z)(n.prototype), "fromJSON", this).call( + this, + e + ), + this.v1.fromArray(e.v1), + this.v2.fromArray(e.v2), + this + ); + }, + }, + ]), + n + ); + })(_c), + Nc = (function (e) { + (0, d.Z)(n, e); + var t = (0, h.Z)(n); + function n() { + var e, + r = + arguments.length > 0 && void 0 !== arguments[0] + ? arguments[0] + : new Vr(), + i = + arguments.length > 1 && void 0 !== arguments[1] + ? arguments[1] + : new Vr(); + return ( + (0, m.Z)(this, n), + ((e = t.call(this)).isLineCurve3 = !0), + (e.type = "LineCurve3"), + (e.v1 = r), + (e.v2 = i), + e + ); + } + return ( + (0, g.Z)(n, [ + { + key: "getPoint", + value: function (e) { + var t = + arguments.length > 1 && void 0 !== arguments[1] + ? arguments[1] + : new Vr(); + return ( + 1 === e + ? t.copy(this.v2) + : (t.copy(this.v2).sub(this.v1), + t.multiplyScalar(e).add(this.v1)), + t + ); + }, + }, + { + key: "getPointAt", + value: function (e, t) { + return this.getPoint(e, t); + }, + }, + { + key: "getTangent", + value: function (e) { + return ( + arguments.length > 1 && void 0 !== arguments[1] + ? arguments[1] + : new Vr() + ) + .subVectors(this.v2, this.v1) + .normalize(); + }, + }, + { + key: "getTangentAt", + value: function (e, t) { + return this.getTangent(e, t); + }, + }, + { + key: "copy", + value: function (e) { + return ( + (0, l.Z)((0, u.Z)(n.prototype), "copy", this).call( + this, + e + ), + this.v1.copy(e.v1), + this.v2.copy(e.v2), + this + ); + }, + }, + { + key: "toJSON", + value: function () { + var e = (0, l.Z)( + (0, u.Z)(n.prototype), + "toJSON", + this + ).call(this); + return ( + (e.v1 = this.v1.toArray()), (e.v2 = this.v2.toArray()), e + ); + }, + }, + { + key: "fromJSON", + value: function (e) { + return ( + (0, l.Z)((0, u.Z)(n.prototype), "fromJSON", this).call( + this, + e + ), + this.v1.fromArray(e.v1), + this.v2.fromArray(e.v2), + this + ); + }, + }, + ]), + n + ); + })(_c), + Gc = (function (e) { + (0, d.Z)(n, e); + var t = (0, h.Z)(n); + function n() { + var e, + r = + arguments.length > 0 && void 0 !== arguments[0] + ? arguments[0] + : new dr(), + i = + arguments.length > 1 && void 0 !== arguments[1] + ? arguments[1] + : new dr(), + a = + arguments.length > 2 && void 0 !== arguments[2] + ? arguments[2] + : new dr(); + return ( + (0, m.Z)(this, n), + ((e = t.call(this)).isQuadraticBezierCurve = !0), + (e.type = "QuadraticBezierCurve"), + (e.v0 = r), + (e.v1 = i), + (e.v2 = a), + e + ); + } + return ( + (0, g.Z)(n, [ + { + key: "getPoint", + value: function (e) { + var t = + arguments.length > 1 && void 0 !== arguments[1] + ? arguments[1] + : new dr(), + n = this.v0, + r = this.v1, + i = this.v2; + return t.set(Lc(e, n.x, r.x, i.x), Lc(e, n.y, r.y, i.y)), t; + }, + }, + { + key: "copy", + value: function (e) { + return ( + (0, l.Z)((0, u.Z)(n.prototype), "copy", this).call( + this, + e + ), + this.v0.copy(e.v0), + this.v1.copy(e.v1), + this.v2.copy(e.v2), + this + ); + }, + }, + { + key: "toJSON", + value: function () { + var e = (0, l.Z)( + (0, u.Z)(n.prototype), + "toJSON", + this + ).call(this); + return ( + (e.v0 = this.v0.toArray()), + (e.v1 = this.v1.toArray()), + (e.v2 = this.v2.toArray()), + e + ); + }, + }, + { + key: "fromJSON", + value: function (e) { + return ( + (0, l.Z)((0, u.Z)(n.prototype), "fromJSON", this).call( + this, + e + ), + this.v0.fromArray(e.v0), + this.v1.fromArray(e.v1), + this.v2.fromArray(e.v2), + this + ); + }, + }, + ]), + n + ); + })(_c), + Zc = (function (e) { + (0, d.Z)(n, e); + var t = (0, h.Z)(n); + function n() { + var e, + r = + arguments.length > 0 && void 0 !== arguments[0] + ? arguments[0] + : new Vr(), + i = + arguments.length > 1 && void 0 !== arguments[1] + ? arguments[1] + : new Vr(), + a = + arguments.length > 2 && void 0 !== arguments[2] + ? arguments[2] + : new Vr(); + return ( + (0, m.Z)(this, n), + ((e = t.call(this)).isQuadraticBezierCurve3 = !0), + (e.type = "QuadraticBezierCurve3"), + (e.v0 = r), + (e.v1 = i), + (e.v2 = a), + e + ); + } + return ( + (0, g.Z)(n, [ + { + key: "getPoint", + value: function (e) { + var t = + arguments.length > 1 && void 0 !== arguments[1] + ? arguments[1] + : new Vr(), + n = this.v0, + r = this.v1, + i = this.v2; + return ( + t.set( + Lc(e, n.x, r.x, i.x), + Lc(e, n.y, r.y, i.y), + Lc(e, n.z, r.z, i.z) + ), + t + ); + }, + }, + { + key: "copy", + value: function (e) { + return ( + (0, l.Z)((0, u.Z)(n.prototype), "copy", this).call( + this, + e + ), + this.v0.copy(e.v0), + this.v1.copy(e.v1), + this.v2.copy(e.v2), + this + ); + }, + }, + { + key: "toJSON", + value: function () { + var e = (0, l.Z)( + (0, u.Z)(n.prototype), + "toJSON", + this + ).call(this); + return ( + (e.v0 = this.v0.toArray()), + (e.v1 = this.v1.toArray()), + (e.v2 = this.v2.toArray()), + e + ); + }, + }, + { + key: "fromJSON", + value: function (e) { + return ( + (0, l.Z)((0, u.Z)(n.prototype), "fromJSON", this).call( + this, + e + ), + this.v0.fromArray(e.v0), + this.v1.fromArray(e.v1), + this.v2.fromArray(e.v2), + this + ); + }, + }, + ]), + n + ); + })(_c), + zc = (function (e) { + (0, d.Z)(n, e); + var t = (0, h.Z)(n); + function n() { + var e, + r = + arguments.length > 0 && void 0 !== arguments[0] + ? arguments[0] + : []; + return ( + (0, m.Z)(this, n), + ((e = t.call(this)).isSplineCurve = !0), + (e.type = "SplineCurve"), + (e.points = r), + e + ); + } + return ( + (0, g.Z)(n, [ + { + key: "getPoint", + value: function (e) { + var t = + arguments.length > 1 && void 0 !== arguments[1] + ? arguments[1] + : new dr(), + n = this.points, + r = (n.length - 1) * e, + i = Math.floor(r), + a = r - i, + o = n[0 === i ? i : i - 1], + s = n[i], + l = n[i > n.length - 2 ? n.length - 1 : i + 1], + u = n[i > n.length - 3 ? n.length - 1 : i + 2]; + return ( + t.set( + Pc(a, o.x, s.x, l.x, u.x), + Pc(a, o.y, s.y, l.y, u.y) + ), + t + ); + }, + }, + { + key: "copy", + value: function (e) { + (0, l.Z)((0, u.Z)(n.prototype), "copy", this).call(this, e), + (this.points = []); + for (var t = 0, r = e.points.length; t < r; t++) { + var i = e.points[t]; + this.points.push(i.clone()); + } + return this; + }, + }, + { + key: "toJSON", + value: function () { + var e = (0, l.Z)( + (0, u.Z)(n.prototype), + "toJSON", + this + ).call(this); + e.points = []; + for (var t = 0, r = this.points.length; t < r; t++) { + var i = this.points[t]; + e.points.push(i.toArray()); + } + return e; + }, + }, + { + key: "fromJSON", + value: function (e) { + (0, l.Z)((0, u.Z)(n.prototype), "fromJSON", this).call( + this, + e + ), + (this.points = []); + for (var t = 0, r = e.points.length; t < r; t++) { + var i = e.points[t]; + this.points.push(new dr().fromArray(i)); + } + return this; + }, + }, + ]), + n + ); + })(_c), + Qc = Object.freeze({ + __proto__: null, + ArcCurve: wc, + CatmullRomCurve3: Bc, + CubicBezierCurve: Uc, + CubicBezierCurve3: Fc, + EllipseCurve: Cc, + LineCurve: Oc, + LineCurve3: Nc, + QuadraticBezierCurve: Gc, + QuadraticBezierCurve3: Zc, + SplineCurve: zc, + }), + Hc = (function (e) { + (0, d.Z)(n, e); + var t = (0, h.Z)(n); + function n() { + var e; + return ( + (0, m.Z)(this, n), + ((e = t.call(this)).type = "CurvePath"), + (e.curves = []), + (e.autoClose = !1), + e + ); + } + return ( + (0, g.Z)(n, [ + { + key: "add", + value: function (e) { + this.curves.push(e); + }, + }, + { + key: "closePath", + value: function () { + var e = this.curves[0].getPoint(0), + t = this.curves[this.curves.length - 1].getPoint(1); + if (!e.equals(t)) { + var n = !0 === e.isVector2 ? "LineCurve" : "LineCurve3"; + this.curves.push(new Qc[n](t, e)); + } + return this; + }, + }, + { + key: "getPoint", + value: function (e, t) { + for ( + var n = e * this.getLength(), + r = this.getCurveLengths(), + i = 0; + i < r.length; + + ) { + if (r[i] >= n) { + var a = r[i] - n, + o = this.curves[i], + s = o.getLength(), + l = 0 === s ? 0 : 1 - a / s; + return o.getPointAt(l, t); + } + i++; + } + return null; + }, + }, + { + key: "getLength", + value: function () { + var e = this.getCurveLengths(); + return e[e.length - 1]; + }, + }, + { + key: "updateArcLengths", + value: function () { + (this.needsUpdate = !0), + (this.cacheLengths = null), + this.getCurveLengths(); + }, + }, + { + key: "getCurveLengths", + value: function () { + if ( + this.cacheLengths && + this.cacheLengths.length === this.curves.length + ) + return this.cacheLengths; + for ( + var e = [], t = 0, n = 0, r = this.curves.length; + n < r; + n++ + ) + (t += this.curves[n].getLength()), e.push(t); + return (this.cacheLengths = e), e; + }, + }, + { + key: "getSpacedPoints", + value: function () { + for ( + var e = + arguments.length > 0 && void 0 !== arguments[0] + ? arguments[0] + : 40, + t = [], + n = 0; + n <= e; + n++ + ) + t.push(this.getPoint(n / e)); + return this.autoClose && t.push(t[0]), t; + }, + }, + { + key: "getPoints", + value: function () { + for ( + var e, + t = + arguments.length > 0 && void 0 !== arguments[0] + ? arguments[0] + : 12, + n = [], + r = 0, + i = this.curves; + r < i.length; + r++ + ) + for ( + var a = i[r], + o = a.isEllipseCurve + ? 2 * t + : a.isLineCurve || a.isLineCurve3 + ? 1 + : a.isSplineCurve + ? t * a.points.length + : t, + s = a.getPoints(o), + l = 0; + l < s.length; + l++ + ) { + var u = s[l]; + (e && e.equals(u)) || (n.push(u), (e = u)); + } + return ( + this.autoClose && + n.length > 1 && + !n[n.length - 1].equals(n[0]) && + n.push(n[0]), + n + ); + }, + }, + { + key: "copy", + value: function (e) { + (0, l.Z)((0, u.Z)(n.prototype), "copy", this).call(this, e), + (this.curves = []); + for (var t = 0, r = e.curves.length; t < r; t++) { + var i = e.curves[t]; + this.curves.push(i.clone()); + } + return (this.autoClose = e.autoClose), this; + }, + }, + { + key: "toJSON", + value: function () { + var e = (0, l.Z)( + (0, u.Z)(n.prototype), + "toJSON", + this + ).call(this); + (e.autoClose = this.autoClose), (e.curves = []); + for (var t = 0, r = this.curves.length; t < r; t++) { + var i = this.curves[t]; + e.curves.push(i.toJSON()); + } + return e; + }, + }, + { + key: "fromJSON", + value: function (e) { + (0, l.Z)((0, u.Z)(n.prototype), "fromJSON", this).call( + this, + e + ), + (this.autoClose = e.autoClose), + (this.curves = []); + for (var t = 0, r = e.curves.length; t < r; t++) { + var i = e.curves[t]; + this.curves.push(new Qc[i.type]().fromJSON(i)); + } + return this; + }, + }, + ]), + n + ); + })(_c), + Vc = (function (e) { + (0, d.Z)(n, e); + var t = (0, h.Z)(n); + function n(e) { + var r; + return ( + (0, m.Z)(this, n), + ((r = t.call(this)).type = "Path"), + (r.currentPoint = new dr()), + e && r.setFromPoints(e), + r + ); + } + return ( + (0, g.Z)(n, [ + { + key: "setFromPoints", + value: function (e) { + this.moveTo(e[0].x, e[0].y); + for (var t = 1, n = e.length; t < n; t++) + this.lineTo(e[t].x, e[t].y); + return this; + }, + }, + { + key: "moveTo", + value: function (e, t) { + return this.currentPoint.set(e, t), this; + }, + }, + { + key: "lineTo", + value: function (e, t) { + var n = new Oc(this.currentPoint.clone(), new dr(e, t)); + return ( + this.curves.push(n), this.currentPoint.set(e, t), this + ); + }, + }, + { + key: "quadraticCurveTo", + value: function (e, t, n, r) { + var i = new Gc( + this.currentPoint.clone(), + new dr(e, t), + new dr(n, r) + ); + return ( + this.curves.push(i), this.currentPoint.set(n, r), this + ); + }, + }, + { + key: "bezierCurveTo", + value: function (e, t, n, r, i, a) { + var o = new Uc( + this.currentPoint.clone(), + new dr(e, t), + new dr(n, r), + new dr(i, a) + ); + return ( + this.curves.push(o), this.currentPoint.set(i, a), this + ); + }, + }, + { + key: "splineThru", + value: function (e) { + var t = [this.currentPoint.clone()].concat(e), + n = new zc(t); + return ( + this.curves.push(n), + this.currentPoint.copy(e[e.length - 1]), + this + ); + }, + }, + { + key: "arc", + value: function (e, t, n, r, i, a) { + var o = this.currentPoint.x, + s = this.currentPoint.y; + return this.absarc(e + o, t + s, n, r, i, a), this; + }, + }, + { + key: "absarc", + value: function (e, t, n, r, i, a) { + return this.absellipse(e, t, n, n, r, i, a), this; + }, + }, + { + key: "ellipse", + value: function (e, t, n, r, i, a, o, s) { + var l = this.currentPoint.x, + u = this.currentPoint.y; + return ( + this.absellipse(e + l, t + u, n, r, i, a, o, s), this + ); + }, + }, + { + key: "absellipse", + value: function (e, t, n, r, i, a, o, s) { + var l = new Cc(e, t, n, r, i, a, o, s); + if (this.curves.length > 0) { + var u = l.getPoint(0); + u.equals(this.currentPoint) || this.lineTo(u.x, u.y); + } + this.curves.push(l); + var c = l.getPoint(1); + return this.currentPoint.copy(c), this; + }, + }, + { + key: "copy", + value: function (e) { + return ( + (0, l.Z)((0, u.Z)(n.prototype), "copy", this).call( + this, + e + ), + this.currentPoint.copy(e.currentPoint), + this + ); + }, + }, + { + key: "toJSON", + value: function () { + var e = (0, l.Z)( + (0, u.Z)(n.prototype), + "toJSON", + this + ).call(this); + return (e.currentPoint = this.currentPoint.toArray()), e; + }, + }, + { + key: "fromJSON", + value: function (e) { + return ( + (0, l.Z)((0, u.Z)(n.prototype), "fromJSON", this).call( + this, + e + ), + this.currentPoint.fromArray(e.currentPoint), + this + ); + }, + }, + ]), + n + ); + })(Hc), + jc = (function (e) { + (0, d.Z)(n, e); + var t = (0, h.Z)(n); + function n() { + var e, + r = + arguments.length > 0 && void 0 !== arguments[0] + ? arguments[0] + : [new dr(0, -0.5), new dr(0.5, 0), new dr(0, 0.5)], + i = + arguments.length > 1 && void 0 !== arguments[1] + ? arguments[1] + : 12, + a = + arguments.length > 2 && void 0 !== arguments[2] + ? arguments[2] + : 0, + o = + arguments.length > 3 && void 0 !== arguments[3] + ? arguments[3] + : 2 * Math.PI; + (0, m.Z)(this, n), + ((e = t.call(this)).type = "LatheGeometry"), + (e.parameters = { + points: r, + segments: i, + phiStart: a, + phiLength: o, + }), + (i = Math.floor(i)), + (o = rr(o, 0, 2 * Math.PI)); + for ( + var s = [], + l = [], + u = [], + c = [], + f = [], + d = 1 / i, + h = new Vr(), + p = new dr(), + v = new Vr(), + g = new Vr(), + A = new Vr(), + y = 0, + b = 0, + x = 0; + x <= r.length - 1; + x++ + ) + switch (x) { + case 0: + (y = r[x + 1].x - r[x].x), + (b = r[x + 1].y - r[x].y), + (v.x = 1 * b), + (v.y = -y), + (v.z = 0 * b), + A.copy(v), + v.normalize(), + c.push(v.x, v.y, v.z); + break; + case r.length - 1: + c.push(A.x, A.y, A.z); + break; + default: + (y = r[x + 1].x - r[x].x), + (b = r[x + 1].y - r[x].y), + (v.x = 1 * b), + (v.y = -y), + (v.z = 0 * b), + g.copy(v), + (v.x += A.x), + (v.y += A.y), + (v.z += A.z), + v.normalize(), + c.push(v.x, v.y, v.z), + A.copy(g); + } + for (var S = 0; S <= i; S++) + for ( + var E = a + S * d * o, + _ = Math.sin(E), + C = Math.cos(E), + w = 0; + w <= r.length - 1; + w++ + ) { + (h.x = r[w].x * _), + (h.y = r[w].y), + (h.z = r[w].x * C), + l.push(h.x, h.y, h.z), + (p.x = S / i), + (p.y = w / (r.length - 1)), + u.push(p.x, p.y); + var T = c[3 * w + 0] * _, + M = c[3 * w + 1], + I = c[3 * w + 0] * C; + f.push(T, M, I); + } + for (var k = 0; k < i; k++) + for (var R = 0; R < r.length - 1; R++) { + var B = R + k * r.length, + P = B, + L = B + r.length, + D = B + r.length + 1, + U = B + 1; + s.push(P, L, U), s.push(D, U, L); + } + return ( + e.setIndex(s), + e.setAttribute("position", new ka(l, 3)), + e.setAttribute("uv", new ka(u, 2)), + e.setAttribute("normal", new ka(f, 3)), + e + ); + } + return ( + (0, g.Z)( + n, + [ + { + key: "copy", + value: function (e) { + return ( + (0, l.Z)((0, u.Z)(n.prototype), "copy", this).call( + this, + e + ), + (this.parameters = Object.assign({}, e.parameters)), + this + ); + }, + }, + ], + [ + { + key: "fromJSON", + value: function (e) { + return new n( + e.points, + e.segments, + e.phiStart, + e.phiLength + ); + }, + }, + ] + ), + n + ); + })(Na), + Wc = (function (e) { + (0, d.Z)(n, e); + var t = (0, h.Z)(n); + function n() { + var e, + r = + arguments.length > 0 && void 0 !== arguments[0] + ? arguments[0] + : 1, + i = + arguments.length > 1 && void 0 !== arguments[1] + ? arguments[1] + : 1, + a = + arguments.length > 2 && void 0 !== arguments[2] + ? arguments[2] + : 4, + o = + arguments.length > 3 && void 0 !== arguments[3] + ? arguments[3] + : 8; + (0, m.Z)(this, n); + var s = new Vc(); + return ( + s.absarc(0, -i / 2, r, 1.5 * Math.PI, 0), + s.absarc(0, i / 2, r, 0, 0.5 * Math.PI), + ((e = t.call(this, s.getPoints(a), o)).type = + "CapsuleGeometry"), + (e.parameters = { + radius: r, + length: i, + capSegments: a, + radialSegments: o, + }), + e + ); + } + return ( + (0, g.Z)(n, null, [ + { + key: "fromJSON", + value: function (e) { + return new n( + e.radius, + e.length, + e.capSegments, + e.radialSegments + ); + }, + }, + ]), + n + ); + })(jc), + Xc = (function (e) { + (0, d.Z)(n, e); + var t = (0, h.Z)(n); + function n() { + var e, + r = + arguments.length > 0 && void 0 !== arguments[0] + ? arguments[0] + : 1, + i = + arguments.length > 1 && void 0 !== arguments[1] + ? arguments[1] + : 32, + a = + arguments.length > 2 && void 0 !== arguments[2] + ? arguments[2] + : 0, + o = + arguments.length > 3 && void 0 !== arguments[3] + ? arguments[3] + : 2 * Math.PI; + (0, m.Z)(this, n), + ((e = t.call(this)).type = "CircleGeometry"), + (e.parameters = { + radius: r, + segments: i, + thetaStart: a, + thetaLength: o, + }), + (i = Math.max(3, i)); + var s = [], + l = [], + u = [], + c = [], + f = new Vr(), + d = new dr(); + l.push(0, 0, 0), u.push(0, 0, 1), c.push(0.5, 0.5); + for (var h = 0, p = 3; h <= i; h++, p += 3) { + var v = a + (h / i) * o; + (f.x = r * Math.cos(v)), + (f.y = r * Math.sin(v)), + l.push(f.x, f.y, f.z), + u.push(0, 0, 1), + (d.x = (l[p] / r + 1) / 2), + (d.y = (l[p + 1] / r + 1) / 2), + c.push(d.x, d.y); + } + for (var g = 1; g <= i; g++) s.push(g, g + 1, 0); + return ( + e.setIndex(s), + e.setAttribute("position", new ka(l, 3)), + e.setAttribute("normal", new ka(u, 3)), + e.setAttribute("uv", new ka(c, 2)), + e + ); + } + return ( + (0, g.Z)( + n, + [ + { + key: "copy", + value: function (e) { + return ( + (0, l.Z)((0, u.Z)(n.prototype), "copy", this).call( + this, + e + ), + (this.parameters = Object.assign({}, e.parameters)), + this + ); + }, + }, + ], + [ + { + key: "fromJSON", + value: function (e) { + return new n( + e.radius, + e.segments, + e.thetaStart, + e.thetaLength + ); + }, + }, + ] + ), + n + ); + })(Na), + Yc = (function (e) { + (0, d.Z)(n, e); + var t = (0, h.Z)(n); + function n() { + var e, + r = + arguments.length > 0 && void 0 !== arguments[0] + ? arguments[0] + : 1, + i = + arguments.length > 1 && void 0 !== arguments[1] + ? arguments[1] + : 1, + a = + arguments.length > 2 && void 0 !== arguments[2] + ? arguments[2] + : 1, + o = + arguments.length > 3 && void 0 !== arguments[3] + ? arguments[3] + : 32, + s = + arguments.length > 4 && void 0 !== arguments[4] + ? arguments[4] + : 1, + l = + arguments.length > 5 && + void 0 !== arguments[5] && + arguments[5], + u = + arguments.length > 6 && void 0 !== arguments[6] + ? arguments[6] + : 0, + c = + arguments.length > 7 && void 0 !== arguments[7] + ? arguments[7] + : 2 * Math.PI; + (0, m.Z)(this, n), + ((e = t.call(this)).type = "CylinderGeometry"), + (e.parameters = { + radiusTop: r, + radiusBottom: i, + height: a, + radialSegments: o, + heightSegments: s, + openEnded: l, + thetaStart: u, + thetaLength: c, + }); + var d = (0, f.Z)(e); + (o = Math.floor(o)), (s = Math.floor(s)); + var h = [], + p = [], + v = [], + g = [], + A = 0, + y = [], + b = a / 2, + x = 0; + function S(e) { + for ( + var t = A, + n = new dr(), + a = new Vr(), + s = 0, + l = !0 === e ? r : i, + f = !0 === e ? 1 : -1, + m = 1; + m <= o; + m++ + ) + p.push(0, b * f, 0), v.push(0, f, 0), g.push(0.5, 0.5), A++; + for (var y = A, S = 0; S <= o; S++) { + var E = (S / o) * c + u, + _ = Math.cos(E), + C = Math.sin(E); + (a.x = l * C), + (a.y = b * f), + (a.z = l * _), + p.push(a.x, a.y, a.z), + v.push(0, f, 0), + (n.x = 0.5 * _ + 0.5), + (n.y = 0.5 * C * f + 0.5), + g.push(n.x, n.y), + A++; + } + for (var w = 0; w < o; w++) { + var T = t + w, + M = y + w; + !0 === e ? h.push(M, M + 1, T) : h.push(M + 1, M, T), + (s += 3); + } + d.addGroup(x, s, !0 === e ? 1 : 2), (x += s); + } + return ( + (function () { + for ( + var e = new Vr(), + t = new Vr(), + n = 0, + l = (i - r) / a, + f = 0; + f <= s; + f++ + ) { + for ( + var m = [], S = f / s, E = S * (i - r) + r, _ = 0; + _ <= o; + _++ + ) { + var C = _ / o, + w = C * c + u, + T = Math.sin(w), + M = Math.cos(w); + (t.x = E * T), + (t.y = -S * a + b), + (t.z = E * M), + p.push(t.x, t.y, t.z), + e.set(T, l, M).normalize(), + v.push(e.x, e.y, e.z), + g.push(C, 1 - S), + m.push(A++); + } + y.push(m); + } + for (var I = 0; I < o; I++) + for (var k = 0; k < s; k++) { + var R = y[k][I], + B = y[k + 1][I], + P = y[k + 1][I + 1], + L = y[k][I + 1]; + h.push(R, B, L), h.push(B, P, L), (n += 6); + } + d.addGroup(x, n, 0), (x += n); + })(), + !1 === l && (r > 0 && S(!0), i > 0 && S(!1)), + e.setIndex(h), + e.setAttribute("position", new ka(p, 3)), + e.setAttribute("normal", new ka(v, 3)), + e.setAttribute("uv", new ka(g, 2)), + e + ); + } + return ( + (0, g.Z)( + n, + [ + { + key: "copy", + value: function (e) { + return ( + (0, l.Z)((0, u.Z)(n.prototype), "copy", this).call( + this, + e + ), + (this.parameters = Object.assign({}, e.parameters)), + this + ); + }, + }, + ], + [ + { + key: "fromJSON", + value: function (e) { + return new n( + e.radiusTop, + e.radiusBottom, + e.height, + e.radialSegments, + e.heightSegments, + e.openEnded, + e.thetaStart, + e.thetaLength + ); + }, + }, + ] + ), + n + ); + })(Na), + qc = (function (e) { + (0, d.Z)(n, e); + var t = (0, h.Z)(n); + function n() { + var e, + r = + arguments.length > 0 && void 0 !== arguments[0] + ? arguments[0] + : 1, + i = + arguments.length > 1 && void 0 !== arguments[1] + ? arguments[1] + : 1, + a = + arguments.length > 2 && void 0 !== arguments[2] + ? arguments[2] + : 32, + o = + arguments.length > 3 && void 0 !== arguments[3] + ? arguments[3] + : 1, + s = + arguments.length > 4 && + void 0 !== arguments[4] && + arguments[4], + l = + arguments.length > 5 && void 0 !== arguments[5] + ? arguments[5] + : 0, + u = + arguments.length > 6 && void 0 !== arguments[6] + ? arguments[6] + : 2 * Math.PI; + return ( + (0, m.Z)(this, n), + ((e = t.call(this, 0, r, i, a, o, s, l, u)).type = + "ConeGeometry"), + (e.parameters = { + radius: r, + height: i, + radialSegments: a, + heightSegments: o, + openEnded: s, + thetaStart: l, + thetaLength: u, + }), + e + ); + } + return ( + (0, g.Z)(n, null, [ + { + key: "fromJSON", + value: function (e) { + return new n( + e.radius, + e.height, + e.radialSegments, + e.heightSegments, + e.openEnded, + e.thetaStart, + e.thetaLength + ); + }, + }, + ]), + n + ); + })(Yc), + Jc = (function (e) { + (0, d.Z)(n, e); + var t = (0, h.Z)(n); + function n() { + var e, + r = + arguments.length > 0 && void 0 !== arguments[0] + ? arguments[0] + : [], + i = + arguments.length > 1 && void 0 !== arguments[1] + ? arguments[1] + : [], + a = + arguments.length > 2 && void 0 !== arguments[2] + ? arguments[2] + : 1, + o = + arguments.length > 3 && void 0 !== arguments[3] + ? arguments[3] + : 0; + (0, m.Z)(this, n), + ((e = t.call(this)).type = "PolyhedronGeometry"), + (e.parameters = { + vertices: r, + indices: i, + radius: a, + detail: o, + }); + var s = [], + l = []; + function u(e, t, n, r) { + for (var i = r + 1, a = [], o = 0; o <= i; o++) { + a[o] = []; + for ( + var s = e.clone().lerp(n, o / i), + l = t.clone().lerp(n, o / i), + u = i - o, + f = 0; + f <= u; + f++ + ) + a[o][f] = 0 === f && o === i ? s : s.clone().lerp(l, f / u); + } + for (var d = 0; d < i; d++) + for (var h = 0; h < 2 * (i - d) - 1; h++) { + var p = Math.floor(h / 2); + h % 2 === 0 + ? (c(a[d][p + 1]), c(a[d + 1][p]), c(a[d][p])) + : (c(a[d][p + 1]), c(a[d + 1][p + 1]), c(a[d + 1][p])); + } + } + function c(e) { + s.push(e.x, e.y, e.z); + } + function f(e, t) { + var n = 3 * e; + (t.x = r[n + 0]), (t.y = r[n + 1]), (t.z = r[n + 2]); + } + function d(e, t, n, r) { + r < 0 && 1 === e.x && (l[t] = e.x - 1), + 0 === n.x && 0 === n.z && (l[t] = r / 2 / Math.PI + 0.5); + } + function h(e) { + return Math.atan2(e.z, -e.x); + } + return ( + (function (e) { + for ( + var t = new Vr(), n = new Vr(), r = new Vr(), a = 0; + a < i.length; + a += 3 + ) + f(i[a + 0], t), + f(i[a + 1], n), + f(i[a + 2], r), + u(t, n, r, e); + })(o), + (function (e) { + for (var t = new Vr(), n = 0; n < s.length; n += 3) + (t.x = s[n + 0]), + (t.y = s[n + 1]), + (t.z = s[n + 2]), + t.normalize().multiplyScalar(e), + (s[n + 0] = t.x), + (s[n + 1] = t.y), + (s[n + 2] = t.z); + })(a), + (function () { + for (var e = new Vr(), t = 0; t < s.length; t += 3) { + (e.x = s[t + 0]), (e.y = s[t + 1]), (e.z = s[t + 2]); + var n = h(e) / 2 / Math.PI + 0.5, + r = + ((i = e), + Math.atan2(-i.y, Math.sqrt(i.x * i.x + i.z * i.z)) / + Math.PI + + 0.5); + l.push(n, 1 - r); + } + var i; + (function () { + for ( + var e = new Vr(), + t = new Vr(), + n = new Vr(), + r = new Vr(), + i = new dr(), + a = new dr(), + o = new dr(), + u = 0, + c = 0; + u < s.length; + u += 9, c += 6 + ) { + e.set(s[u + 0], s[u + 1], s[u + 2]), + t.set(s[u + 3], s[u + 4], s[u + 5]), + n.set(s[u + 6], s[u + 7], s[u + 8]), + i.set(l[c + 0], l[c + 1]), + a.set(l[c + 2], l[c + 3]), + o.set(l[c + 4], l[c + 5]), + r.copy(e).add(t).add(n).divideScalar(3); + var f = h(r); + d(i, c + 0, e, f), d(a, c + 2, t, f), d(o, c + 4, n, f); + } + })(), + (function () { + for (var e = 0; e < l.length; e += 6) { + var t = l[e + 0], + n = l[e + 2], + r = l[e + 4], + i = Math.max(t, n, r), + a = Math.min(t, n, r); + i > 0.9 && + a < 0.1 && + (t < 0.2 && (l[e + 0] += 1), + n < 0.2 && (l[e + 2] += 1), + r < 0.2 && (l[e + 4] += 1)); + } + })(); + })(), + e.setAttribute("position", new ka(s, 3)), + e.setAttribute("normal", new ka(s.slice(), 3)), + e.setAttribute("uv", new ka(l, 2)), + 0 === o ? e.computeVertexNormals() : e.normalizeNormals(), + e + ); + } + return ( + (0, g.Z)( + n, + [ + { + key: "copy", + value: function (e) { + return ( + (0, l.Z)((0, u.Z)(n.prototype), "copy", this).call( + this, + e + ), + (this.parameters = Object.assign({}, e.parameters)), + this + ); + }, + }, + ], + [ + { + key: "fromJSON", + value: function (e) { + return new n(e.vertices, e.indices, e.radius, e.details); + }, + }, + ] + ), + n + ); + })(Na), + Kc = (function (e) { + (0, d.Z)(n, e); + var t = (0, h.Z)(n); + function n() { + var e, + r = + arguments.length > 0 && void 0 !== arguments[0] + ? arguments[0] + : 1, + i = + arguments.length > 1 && void 0 !== arguments[1] + ? arguments[1] + : 0; + (0, m.Z)(this, n); + var a = (1 + Math.sqrt(5)) / 2, + o = 1 / a, + s = [ + -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, + -o, + -a, + 0, + -o, + a, + 0, + o, + -a, + 0, + o, + a, + -o, + -a, + 0, + -o, + a, + 0, + o, + -a, + 0, + o, + a, + 0, + -a, + 0, + -o, + a, + 0, + -o, + -a, + 0, + o, + a, + 0, + o, + ]; + return ( + ((e = t.call( + this, + s, + [ + 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, + ], + r, + i + )).type = "DodecahedronGeometry"), + (e.parameters = { radius: r, detail: i }), + e + ); + } + return ( + (0, g.Z)(n, null, [ + { + key: "fromJSON", + value: function (e) { + return new n(e.radius, e.detail); + }, + }, + ]), + n + ); + })(Jc), + $c = new Vr(), + ef = new Vr(), + tf = new Vr(), + nf = new ia(), + rf = (function (e) { + (0, d.Z)(n, e); + var t = (0, h.Z)(n); + function n() { + var e, + r = + arguments.length > 0 && void 0 !== arguments[0] + ? arguments[0] + : null, + i = + arguments.length > 1 && void 0 !== arguments[1] + ? arguments[1] + : 1; + if ( + ((0, m.Z)(this, n), + ((e = t.call(this)).type = "EdgesGeometry"), + (e.parameters = { geometry: r, thresholdAngle: i }), + null !== r) + ) { + for ( + var a = Math.pow(10, 4), + o = Math.cos(er * i), + s = r.getIndex(), + l = r.getAttribute("position"), + u = s ? s.count : l.count, + c = [0, 0, 0], + f = ["a", "b", "c"], + d = new Array(3), + h = {}, + p = [], + v = 0; + v < u; + v += 3 + ) { + s + ? ((c[0] = s.getX(v)), + (c[1] = s.getX(v + 1)), + (c[2] = s.getX(v + 2))) + : ((c[0] = v), (c[1] = v + 1), (c[2] = v + 2)); + var g = nf.a, + A = nf.b, + y = nf.c; + if ( + (g.fromBufferAttribute(l, c[0]), + A.fromBufferAttribute(l, c[1]), + y.fromBufferAttribute(l, c[2]), + nf.getNormal(tf), + (d[0] = "" + .concat(Math.round(g.x * a), ",") + .concat(Math.round(g.y * a), ",") + .concat(Math.round(g.z * a))), + (d[1] = "" + .concat(Math.round(A.x * a), ",") + .concat(Math.round(A.y * a), ",") + .concat(Math.round(A.z * a))), + (d[2] = "" + .concat(Math.round(y.x * a), ",") + .concat(Math.round(y.y * a), ",") + .concat(Math.round(y.z * a))), + d[0] !== d[1] && d[1] !== d[2] && d[2] !== d[0]) + ) + for (var b = 0; b < 3; b++) { + var x = (b + 1) % 3, + S = d[b], + E = d[x], + _ = nf[f[b]], + C = nf[f[x]], + w = "".concat(S, "_").concat(E), + T = "".concat(E, "_").concat(S); + T in h && h[T] + ? (tf.dot(h[T].normal) <= o && + (p.push(_.x, _.y, _.z), p.push(C.x, C.y, C.z)), + (h[T] = null)) + : w in h || + (h[w] = { + index0: c[b], + index1: c[x], + normal: tf.clone(), + }); + } + } + for (var M in h) + if (h[M]) { + var I = h[M], + k = I.index0, + R = I.index1; + $c.fromBufferAttribute(l, k), + ef.fromBufferAttribute(l, R), + p.push($c.x, $c.y, $c.z), + p.push(ef.x, ef.y, ef.z); + } + e.setAttribute("position", new ka(p, 3)); + } + return e; + } + return ( + (0, g.Z)(n, [ + { + key: "copy", + value: function (e) { + return ( + (0, l.Z)((0, u.Z)(n.prototype), "copy", this).call( + this, + e + ), + (this.parameters = Object.assign({}, e.parameters)), + this + ); + }, + }, + ]), + n + ); + })(Na), + af = (function (e) { + (0, d.Z)(n, e); + var t = (0, h.Z)(n); + function n(e) { + var r; + return ( + (0, m.Z)(this, n), + ((r = t.call(this, e)).uuid = nr()), + (r.type = "Shape"), + (r.holes = []), + r + ); + } + return ( + (0, g.Z)(n, [ + { + key: "getPointsHoles", + value: function (e) { + for (var t = [], n = 0, r = this.holes.length; n < r; n++) + t[n] = this.holes[n].getPoints(e); + return t; + }, + }, + { + key: "extractPoints", + value: function (e) { + return { + shape: this.getPoints(e), + holes: this.getPointsHoles(e), + }; + }, + }, + { + key: "copy", + value: function (e) { + (0, l.Z)((0, u.Z)(n.prototype), "copy", this).call(this, e), + (this.holes = []); + for (var t = 0, r = e.holes.length; t < r; t++) { + var i = e.holes[t]; + this.holes.push(i.clone()); + } + return this; + }, + }, + { + key: "toJSON", + value: function () { + var e = (0, l.Z)( + (0, u.Z)(n.prototype), + "toJSON", + this + ).call(this); + (e.uuid = this.uuid), (e.holes = []); + for (var t = 0, r = this.holes.length; t < r; t++) { + var i = this.holes[t]; + e.holes.push(i.toJSON()); + } + return e; + }, + }, + { + key: "fromJSON", + value: function (e) { + (0, l.Z)((0, u.Z)(n.prototype), "fromJSON", this).call( + this, + e + ), + (this.uuid = e.uuid), + (this.holes = []); + for (var t = 0, r = e.holes.length; t < r; t++) { + var i = e.holes[t]; + this.holes.push(new Vc().fromJSON(i)); + } + return this; + }, + }, + ]), + n + ); + })(Vc), + of = function (e, t) { + var n, + r, + i, + a, + o, + s, + l, + u = + arguments.length > 2 && void 0 !== arguments[2] + ? arguments[2] + : 2, + c = t && t.length, + f = c ? t[0] * u : e.length, + d = sf(e, 0, f, u, !0), + h = []; + if (!d || d.next === d.prev) return h; + if ( + (c && + (d = (function (e, t, n, r) { + var i, + a, + o, + s = []; + for (i = 0, a = t.length; i < a; i++) + (o = sf( + e, + t[i] * r, + i < a - 1 ? t[i + 1] * r : e.length, + r, + !1 + )) === o.next && (o.steiner = !0), + s.push(Af(o)); + for (s.sort(pf), i = 0; i < s.length; i++) n = vf(s[i], n); + return n; + })(e, t, d, u)), + e.length > 80 * u) + ) { + (n = i = e[0]), (r = a = e[1]); + for (var p = u; p < f; p += u) + (o = e[p]) < n && (n = o), + (s = e[p + 1]) < r && (r = s), + o > i && (i = o), + s > a && (a = s); + l = 0 !== (l = Math.max(i - n, a - r)) ? 32767 / l : 0; + } + return uf(d, h, u, n, r, l, 0), h; + }; + function sf(e, t, n, r, i) { + var a, o; + if ( + i === + (function (e, t, n, r) { + for (var i = 0, a = t, o = n - r; a < n; a += r) + (i += (e[o] - e[a]) * (e[a + 1] + e[o + 1])), (o = a); + return i; + })(e, t, n, r) > + 0 + ) + for (a = t; a < n; a += r) o = Mf(a, e[a], e[a + 1], o); + else for (a = n - r; a >= t; a -= r) o = Mf(a, e[a], e[a + 1], o); + return o && Sf(o, o.next) && (If(o), (o = o.next)), o; + } + function lf(e, t) { + if (!e) return e; + t || (t = e); + var n, + r = e; + do { + if ( + ((n = !1), + r.steiner || (!Sf(r, r.next) && 0 !== xf(r.prev, r, r.next))) + ) + r = r.next; + else { + if ((If(r), (r = t = r.prev) === r.next)) break; + n = !0; + } + } while (n || r !== t); + return t; + } + function uf(e, t, n, r, i, a, o) { + if (e) { + !o && + a && + (function (e, t, n, r) { + var i = e; + do { + 0 === i.z && (i.z = gf(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) { + var t, + n, + r, + i, + a, + o, + s, + l, + u = 1; + do { + for (n = e, e = null, a = null, o = 0; n; ) { + for ( + o++, r = n, s = 0, t = 0; + t < u && (s++, (r = r.nextZ)); + t++ + ); + for (l = u; s > 0 || (l > 0 && r); ) + 0 !== s && (0 === l || !r || n.z <= r.z) + ? ((i = n), (n = n.nextZ), s--) + : ((i = r), (r = r.nextZ), l--), + a ? (a.nextZ = i) : (e = i), + (i.prevZ = a), + (a = i); + n = r; + } + (a.nextZ = null), (u *= 2); + } while (o > 1); + })(i); + })(e, r, i, a); + for (var s, l, u = e; e.prev !== e.next; ) + if (((s = e.prev), (l = e.next), a ? ff(e, r, i, a) : cf(e))) + t.push((s.i / n) | 0), + t.push((e.i / n) | 0), + t.push((l.i / n) | 0), + If(e), + (e = l.next), + (u = l.next); + else if ((e = l) === u) { + o + ? 1 === o + ? uf((e = df(lf(e), t, n)), t, n, r, i, a, 2) + : 2 === o && hf(e, t, n, r, i, a) + : uf(lf(e), t, n, r, i, a, 1); + break; + } + } + } + function cf(e) { + var t = e.prev, + n = e, + r = e.next; + if (xf(t, n, r) >= 0) return !1; + for ( + var i = t.x, + a = n.x, + o = r.x, + s = t.y, + l = n.y, + u = r.y, + c = i < a ? (i < o ? i : o) : a < o ? a : o, + f = s < l ? (s < u ? s : u) : l < u ? l : u, + d = i > a ? (i > o ? i : o) : a > o ? a : o, + h = s > l ? (s > u ? s : u) : l > u ? l : u, + p = r.next; + p !== t; + + ) { + if ( + p.x >= c && + p.x <= d && + p.y >= f && + p.y <= h && + yf(i, s, a, l, o, u, p.x, p.y) && + xf(p.prev, p, p.next) >= 0 + ) + return !1; + p = p.next; + } + return !0; + } + function ff(e, t, n, r) { + var i = e.prev, + a = e, + o = e.next; + if (xf(i, a, o) >= 0) return !1; + for ( + var s = i.x, + l = a.x, + u = o.x, + c = i.y, + f = a.y, + d = o.y, + h = s < l ? (s < u ? s : u) : l < u ? l : u, + p = c < f ? (c < d ? c : d) : f < d ? f : d, + v = s > l ? (s > u ? s : u) : l > u ? l : u, + m = c > f ? (c > d ? c : d) : f > d ? f : d, + g = gf(h, p, t, n, r), + A = gf(v, m, t, n, r), + y = e.prevZ, + b = e.nextZ; + y && y.z >= g && b && b.z <= A; + + ) { + if ( + y.x >= h && + y.x <= v && + y.y >= p && + y.y <= m && + y !== i && + y !== o && + yf(s, c, l, f, u, d, y.x, y.y) && + xf(y.prev, y, y.next) >= 0 + ) + return !1; + if ( + ((y = y.prevZ), + b.x >= h && + b.x <= v && + b.y >= p && + b.y <= m && + b !== i && + b !== o && + yf(s, c, l, f, u, d, b.x, b.y) && + xf(b.prev, b, b.next) >= 0) + ) + return !1; + b = b.nextZ; + } + for (; y && y.z >= g; ) { + if ( + y.x >= h && + y.x <= v && + y.y >= p && + y.y <= m && + y !== i && + y !== o && + yf(s, c, l, f, u, d, y.x, y.y) && + xf(y.prev, y, y.next) >= 0 + ) + return !1; + y = y.prevZ; + } + for (; b && b.z <= A; ) { + if ( + b.x >= h && + b.x <= v && + b.y >= p && + b.y <= m && + b !== i && + b !== o && + yf(s, c, l, f, u, d, b.x, b.y) && + xf(b.prev, b, b.next) >= 0 + ) + return !1; + b = b.nextZ; + } + return !0; + } + function df(e, t, n) { + var r = e; + do { + var i = r.prev, + a = r.next.next; + !Sf(i, a) && + Ef(i, r, r.next, a) && + wf(i, a) && + wf(a, i) && + (t.push((i.i / n) | 0), + t.push((r.i / n) | 0), + t.push((a.i / n) | 0), + If(r), + If(r.next), + (r = e = a)), + (r = r.next); + } while (r !== e); + return lf(r); + } + function hf(e, t, n, r, i, a) { + var o = e; + do { + for (var s = o.next.next; s !== o.prev; ) { + if (o.i !== s.i && bf(o, s)) { + var l = Tf(o, s); + return ( + (o = lf(o, o.next)), + (l = lf(l, l.next)), + uf(o, t, n, r, i, a, 0), + void uf(l, t, n, r, i, a, 0) + ); + } + s = s.next; + } + o = o.next; + } while (o !== e); + } + function pf(e, t) { + return e.x - t.x; + } + function vf(e, t) { + var n = (function (e, t) { + var n, + r = t, + i = -1 / 0, + a = e.x, + o = e.y; + do { + if (o <= r.y && o >= r.next.y && r.next.y !== r.y) { + var s = r.x + ((o - r.y) * (r.next.x - r.x)) / (r.next.y - r.y); + if ( + s <= a && + s > i && + ((i = s), (n = r.x < r.next.x ? r : r.next), s === a) + ) + return n; + } + r = r.next; + } while (r !== t); + if (!n) return null; + var l, + u = n, + c = n.x, + f = n.y, + d = 1 / 0; + r = n; + do { + a >= r.x && + r.x >= c && + a !== r.x && + yf(o < f ? a : i, o, c, f, o < f ? i : a, o, r.x, r.y) && + ((l = Math.abs(o - r.y) / (a - r.x)), + wf(r, e) && + (l < d || + (l === d && (r.x > n.x || (r.x === n.x && mf(n, r))))) && + ((n = r), (d = l))), + (r = r.next); + } while (r !== u); + return n; + })(e, t); + if (!n) return t; + var r = Tf(n, e); + return lf(r, r.next), lf(n, n.next); + } + function mf(e, t) { + return xf(e.prev, e, t.prev) < 0 && xf(t.next, e, e.next) < 0; + } + function gf(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 Af(e) { + var 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 yf(e, t, n, r, i, a, o, s) { + return ( + (i - o) * (t - s) >= (e - o) * (a - s) && + (e - o) * (r - s) >= (n - o) * (t - s) && + (n - o) * (a - s) >= (i - o) * (r - s) + ); + } + function bf(e, t) { + return ( + e.next.i !== t.i && + e.prev.i !== t.i && + !(function (e, t) { + var n = e; + do { + if ( + n.i !== e.i && + n.next.i !== e.i && + n.i !== t.i && + n.next.i !== t.i && + Ef(n, n.next, e, t) + ) + return !0; + n = n.next; + } while (n !== e); + return !1; + })(e, t) && + ((wf(e, t) && + wf(t, e) && + (function (e, t) { + var n = e, + r = !1, + i = (e.x + t.x) / 2, + a = (e.y + t.y) / 2; + do { + n.y > a !== n.next.y > a && + n.next.y !== n.y && + i < + ((n.next.x - n.x) * (a - n.y)) / (n.next.y - n.y) + n.x && + (r = !r), + (n = n.next); + } while (n !== e); + return r; + })(e, t) && + (xf(e.prev, e, t.prev) || xf(e, t.prev, t))) || + (Sf(e, t) && + xf(e.prev, e, e.next) > 0 && + xf(t.prev, t, t.next) > 0)) + ); + } + function xf(e, t, n) { + return (t.y - e.y) * (n.x - t.x) - (t.x - e.x) * (n.y - t.y); + } + function Sf(e, t) { + return e.x === t.x && e.y === t.y; + } + function Ef(e, t, n, r) { + var i = Cf(xf(e, t, n)), + a = Cf(xf(e, t, r)), + o = Cf(xf(n, r, e)), + s = Cf(xf(n, r, t)); + return ( + (i !== a && o !== s) || + !(0 !== i || !_f(e, n, t)) || + !(0 !== a || !_f(e, r, t)) || + !(0 !== o || !_f(n, e, r)) || + !(0 !== s || !_f(n, t, r)) + ); + } + function _f(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 Cf(e) { + return e > 0 ? 1 : e < 0 ? -1 : 0; + } + function wf(e, t) { + return xf(e.prev, e, e.next) < 0 + ? xf(e, t, e.next) >= 0 && xf(e, e.prev, t) >= 0 + : xf(e, t, e.prev) < 0 || xf(e, e.next, t) < 0; + } + function Tf(e, t) { + var n = new kf(e.i, e.x, e.y), + r = new kf(t.i, t.x, t.y), + i = e.next, + a = t.prev; + return ( + (e.next = t), + (t.prev = e), + (n.next = i), + (i.prev = n), + (r.next = n), + (n.prev = r), + (a.next = r), + (r.prev = a), + r + ); + } + function Mf(e, t, n, r) { + var i = new kf(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 If(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 kf(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); + } + var Rf = (function () { + function e() { + (0, m.Z)(this, e); + } + return ( + (0, g.Z)(e, null, [ + { + key: "area", + value: function (e) { + for ( + var t = e.length, n = 0, r = t - 1, i = 0; + i < t; + r = i++ + ) + n += e[r].x * e[i].y - e[i].x * e[r].y; + return 0.5 * n; + }, + }, + { + key: "isClockWise", + value: function (t) { + return e.area(t) < 0; + }, + }, + { + key: "triangulateShape", + value: function (e, t) { + var n = [], + r = [], + i = []; + Bf(e), Pf(n, e); + var a = e.length; + t.forEach(Bf); + for (var o = 0; o < t.length; o++) + r.push(a), (a += t[o].length), Pf(n, t[o]); + for (var s = of(n, r), l = 0; l < s.length; l += 3) + i.push(s.slice(l, l + 3)); + return i; + }, + }, + ]), + e + ); + })(); + function Bf(e) { + var t = e.length; + t > 2 && e[t - 1].equals(e[0]) && e.pop(); + } + function Pf(e, t) { + for (var n = 0; n < t.length; n++) e.push(t[n].x), e.push(t[n].y); + } + var Lf = (function (e) { + (0, d.Z)(n, e); + var t = (0, h.Z)(n); + function n() { + var e, + r = + arguments.length > 0 && void 0 !== arguments[0] + ? arguments[0] + : new af([ + new dr(0.5, 0.5), + new dr(-0.5, 0.5), + new dr(-0.5, -0.5), + new dr(0.5, -0.5), + ]), + i = + arguments.length > 1 && void 0 !== arguments[1] + ? arguments[1] + : {}; + (0, m.Z)(this, n), + ((e = t.call(this)).type = "ExtrudeGeometry"), + (e.parameters = { shapes: r, options: i }), + (r = Array.isArray(r) ? r : [r]); + for ( + var a = (0, f.Z)(e), o = [], s = [], l = 0, u = r.length; + l < u; + l++ + ) { + c(r[l]); + } + function c(e) { + var t, + n, + r, + l, + u, + c = [], + f = void 0 !== i.curveSegments ? i.curveSegments : 12, + d = void 0 !== i.steps ? i.steps : 1, + h = void 0 !== i.depth ? i.depth : 1, + p = void 0 === i.bevelEnabled || i.bevelEnabled, + v = void 0 !== i.bevelThickness ? i.bevelThickness : 0.2, + m = void 0 !== i.bevelSize ? i.bevelSize : v - 0.1, + g = void 0 !== i.bevelOffset ? i.bevelOffset : 0, + A = void 0 !== i.bevelSegments ? i.bevelSegments : 3, + y = i.extrudePath, + b = void 0 !== i.UVGenerator ? i.UVGenerator : Df, + x = !1; + y && + ((t = y.getSpacedPoints(d)), + (x = !0), + (p = !1), + (n = y.computeFrenetFrames(d, !1)), + (r = new Vr()), + (l = new Vr()), + (u = new Vr())), + p || ((A = 0), (v = 0), (m = 0), (g = 0)); + var S = e.extractPoints(f), + E = S.shape, + _ = S.holes; + if (!Rf.isClockWise(E)) { + E = E.reverse(); + for (var C = 0, w = _.length; C < w; C++) { + var T = _[C]; + Rf.isClockWise(T) && (_[C] = T.reverse()); + } + } + for ( + var M = Rf.triangulateShape(E, _), I = E, k = 0, R = _.length; + k < R; + k++ + ) { + var B = _[k]; + E = E.concat(B); + } + function P(e, t, n) { + return ( + t || + console.error( + "THREE.ExtrudeGeometry: vec does not exist" + ), + e.clone().addScaledVector(t, n) + ); + } + var L = E.length, + D = M.length; + function U(e, t, n) { + var r, + i, + a, + o = e.x - t.x, + s = e.y - t.y, + l = n.x - e.x, + u = n.y - e.y, + c = o * o + s * s, + f = o * u - s * l; + if (Math.abs(f) > Number.EPSILON) { + var d = Math.sqrt(c), + h = Math.sqrt(l * l + u * u), + p = t.x - s / d, + v = t.y + o / d, + m = + ((n.x - u / h - p) * u - (n.y + l / h - v) * l) / + (o * u - s * l), + g = (r = p + o * m - e.x) * r + (i = v + s * m - e.y) * i; + if (g <= 2) return new dr(r, i); + a = Math.sqrt(g / 2); + } else { + var A = !1; + o > Number.EPSILON + ? l > Number.EPSILON && (A = !0) + : o < -Number.EPSILON + ? l < -Number.EPSILON && (A = !0) + : Math.sign(s) === Math.sign(u) && (A = !0), + A + ? ((r = -s), (i = o), (a = Math.sqrt(c))) + : ((r = o), (i = s), (a = Math.sqrt(c / 2))); + } + return new dr(r / a, i / a); + } + for ( + var F = [], O = 0, N = I.length, G = N - 1, Z = O + 1; + O < N; + O++, G++, Z++ + ) + G === N && (G = 0), + Z === N && (Z = 0), + (F[O] = U(I[O], I[G], I[Z])); + for ( + var z, Q = [], H = F.concat(), V = 0, j = _.length; + V < j; + V++ + ) { + var W = _[V]; + z = []; + for ( + var X = 0, Y = W.length, q = Y - 1, J = X + 1; + X < Y; + X++, q++, J++ + ) + q === Y && (q = 0), + J === Y && (J = 0), + (z[X] = U(W[X], W[q], W[J])); + Q.push(z), (H = H.concat(z)); + } + for (var K = 0; K < A; K++) { + for ( + var $ = K / A, + ee = v * Math.cos(($ * Math.PI) / 2), + te = m * Math.sin(($ * Math.PI) / 2) + g, + ne = 0, + re = I.length; + ne < re; + ne++ + ) { + var ie = P(I[ne], F[ne], te); + Re(ie.x, ie.y, -ee); + } + for (var ae = 0, oe = _.length; ae < oe; ae++) { + var se = _[ae]; + z = Q[ae]; + for (var le = 0, ue = se.length; le < ue; le++) { + var ce = P(se[le], z[le], te); + Re(ce.x, ce.y, -ee); + } + } + } + for (var fe = m + g, de = 0; de < L; de++) { + var he = p ? P(E[de], H[de], fe) : E[de]; + x + ? (l.copy(n.normals[0]).multiplyScalar(he.x), + r.copy(n.binormals[0]).multiplyScalar(he.y), + u.copy(t[0]).add(l).add(r), + Re(u.x, u.y, u.z)) + : Re(he.x, he.y, 0); + } + for (var pe = 1; pe <= d; pe++) + for (var ve = 0; ve < L; ve++) { + var me = p ? P(E[ve], H[ve], fe) : E[ve]; + x + ? (l.copy(n.normals[pe]).multiplyScalar(me.x), + r.copy(n.binormals[pe]).multiplyScalar(me.y), + u.copy(t[pe]).add(l).add(r), + Re(u.x, u.y, u.z)) + : Re(me.x, me.y, (h / d) * pe); + } + for (var ge = A - 1; ge >= 0; ge--) { + for ( + var Ae = ge / A, + ye = v * Math.cos((Ae * Math.PI) / 2), + be = m * Math.sin((Ae * Math.PI) / 2) + g, + xe = 0, + Se = I.length; + xe < Se; + xe++ + ) { + var Ee = P(I[xe], F[xe], be); + Re(Ee.x, Ee.y, h + ye); + } + for (var _e = 0, Ce = _.length; _e < Ce; _e++) { + var we = _[_e]; + z = Q[_e]; + for (var Te = 0, Me = we.length; Te < Me; Te++) { + var Ie = P(we[Te], z[Te], be); + x + ? Re(Ie.x, Ie.y + t[d - 1].y, t[d - 1].x + ye) + : Re(Ie.x, Ie.y, h + ye); + } + } + } + function ke(e, t) { + for (var n = e.length; --n >= 0; ) { + var r = n, + i = n - 1; + i < 0 && (i = e.length - 1); + for (var a = 0, o = d + 2 * A; a < o; a++) { + var s = L * a, + l = L * (a + 1); + Pe(t + r + s, t + i + s, t + i + l, t + r + l); + } + } + } + function Re(e, t, n) { + c.push(e), c.push(t), c.push(n); + } + function Be(e, t, n) { + Le(e), Le(t), Le(n); + var r = o.length / 3, + i = b.generateTopUV(a, o, r - 3, r - 2, r - 1); + De(i[0]), De(i[1]), De(i[2]); + } + function Pe(e, t, n, r) { + Le(e), Le(t), Le(r), Le(t), Le(n), Le(r); + var i = o.length / 3, + s = b.generateSideWallUV(a, o, i - 6, i - 3, i - 2, i - 1); + De(s[0]), De(s[1]), De(s[3]), De(s[1]), De(s[2]), De(s[3]); + } + function Le(e) { + o.push(c[3 * e + 0]), + o.push(c[3 * e + 1]), + o.push(c[3 * e + 2]); + } + function De(e) { + s.push(e.x), s.push(e.y); + } + !(function () { + var e = o.length / 3; + if (p) { + for (var t = 0, n = L * t, r = 0; r < D; r++) { + var i = M[r]; + Be(i[2] + n, i[1] + n, i[0] + n); + } + n = L * (t = d + 2 * A); + for (var s = 0; s < D; s++) { + var l = M[s]; + Be(l[0] + n, l[1] + n, l[2] + n); + } + } else { + for (var u = 0; u < D; u++) { + var c = M[u]; + Be(c[2], c[1], c[0]); + } + for (var f = 0; f < D; f++) { + var h = M[f]; + Be(h[0] + L * d, h[1] + L * d, h[2] + L * d); + } + } + a.addGroup(e, o.length / 3 - e, 0); + })(), + (function () { + var e = o.length / 3, + t = 0; + ke(I, t), (t += I.length); + for (var n = 0, r = _.length; n < r; n++) { + var i = _[n]; + ke(i, t), (t += i.length); + } + a.addGroup(e, o.length / 3 - e, 1); + })(); + } + return ( + e.setAttribute("position", new ka(o, 3)), + e.setAttribute("uv", new ka(s, 2)), + e.computeVertexNormals(), + e + ); + } + return ( + (0, g.Z)( + n, + [ + { + key: "copy", + value: function (e) { + return ( + (0, l.Z)((0, u.Z)(n.prototype), "copy", this).call( + this, + e + ), + (this.parameters = Object.assign({}, e.parameters)), + this + ); + }, + }, + { + key: "toJSON", + value: function () { + var e = (0, l.Z)( + (0, u.Z)(n.prototype), + "toJSON", + this + ).call(this); + return (function (e, t, n) { + if (((n.shapes = []), Array.isArray(e))) + for (var r = 0, i = e.length; r < i; r++) { + var a = e[r]; + n.shapes.push(a.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); + }, + }, + ], + [ + { + key: "fromJSON", + value: function (e, t) { + for (var r = [], i = 0, a = e.shapes.length; i < a; i++) { + var o = t[e.shapes[i]]; + r.push(o); + } + var s = e.options.extrudePath; + return ( + void 0 !== s && + (e.options.extrudePath = new Qc[s.type]().fromJSON( + s + )), + new n(r, e.options) + ); + }, + }, + ] + ), + n + ); + })(Na), + Df = { + generateTopUV: function (e, t, n, r, i) { + var a = t[3 * n], + o = t[3 * n + 1], + s = t[3 * r], + l = t[3 * r + 1], + u = t[3 * i], + c = t[3 * i + 1]; + return [new dr(a, o), new dr(s, l), new dr(u, c)]; + }, + generateSideWallUV: function (e, t, n, r, i, a) { + var o = t[3 * n], + s = t[3 * n + 1], + l = t[3 * n + 2], + u = t[3 * r], + c = t[3 * r + 1], + f = t[3 * r + 2], + d = t[3 * i], + h = t[3 * i + 1], + p = t[3 * i + 2], + v = t[3 * a], + m = t[3 * a + 1], + g = t[3 * a + 2]; + return Math.abs(s - c) < Math.abs(o - u) + ? [ + new dr(o, 1 - l), + new dr(u, 1 - f), + new dr(d, 1 - p), + new dr(v, 1 - g), + ] + : [ + new dr(s, 1 - l), + new dr(c, 1 - f), + new dr(h, 1 - p), + new dr(m, 1 - g), + ]; + }, + }; + var Uf = (function (e) { + (0, d.Z)(n, e); + var t = (0, h.Z)(n); + function n() { + var e, + r = + arguments.length > 0 && void 0 !== arguments[0] + ? arguments[0] + : 1, + i = + arguments.length > 1 && void 0 !== arguments[1] + ? arguments[1] + : 0; + (0, m.Z)(this, n); + var a = (1 + Math.sqrt(5)) / 2, + o = [ + -1, + a, + 0, + 1, + a, + 0, + -1, + -a, + 0, + 1, + -a, + 0, + 0, + -1, + a, + 0, + 1, + a, + 0, + -1, + -a, + 0, + 1, + -a, + a, + 0, + -1, + a, + 0, + 1, + -a, + 0, + -1, + -a, + 0, + 1, + ]; + return ( + ((e = t.call( + this, + o, + [ + 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, + ], + r, + i + )).type = "IcosahedronGeometry"), + (e.parameters = { radius: r, detail: i }), + e + ); + } + return ( + (0, g.Z)(n, null, [ + { + key: "fromJSON", + value: function (e) { + return new n(e.radius, e.detail); + }, + }, + ]), + n + ); + })(Jc), + Ff = (function (e) { + (0, d.Z)(n, e); + var t = (0, h.Z)(n); + function n() { + var e, + r = + arguments.length > 0 && void 0 !== arguments[0] + ? arguments[0] + : 1, + i = + arguments.length > 1 && void 0 !== arguments[1] + ? arguments[1] + : 0; + (0, m.Z)(this, n); + return ( + ((e = t.call( + this, + [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, + ], + r, + i + )).type = "OctahedronGeometry"), + (e.parameters = { radius: r, detail: i }), + e + ); + } + return ( + (0, g.Z)(n, null, [ + { + key: "fromJSON", + value: function (e) { + return new n(e.radius, e.detail); + }, + }, + ]), + n + ); + })(Jc), + Of = (function (e) { + (0, d.Z)(n, e); + var t = (0, h.Z)(n); + function n() { + var e, + r = + arguments.length > 0 && void 0 !== arguments[0] + ? arguments[0] + : 0.5, + i = + arguments.length > 1 && void 0 !== arguments[1] + ? arguments[1] + : 1, + a = + arguments.length > 2 && void 0 !== arguments[2] + ? arguments[2] + : 32, + o = + arguments.length > 3 && void 0 !== arguments[3] + ? arguments[3] + : 1, + s = + arguments.length > 4 && void 0 !== arguments[4] + ? arguments[4] + : 0, + l = + arguments.length > 5 && void 0 !== arguments[5] + ? arguments[5] + : 2 * Math.PI; + (0, m.Z)(this, n), + ((e = t.call(this)).type = "RingGeometry"), + (e.parameters = { + innerRadius: r, + outerRadius: i, + thetaSegments: a, + phiSegments: o, + thetaStart: s, + thetaLength: l, + }), + (a = Math.max(3, a)); + for ( + var u = [], + c = [], + f = [], + d = [], + h = r, + p = (i - r) / (o = Math.max(1, o)), + v = new Vr(), + g = new dr(), + A = 0; + A <= o; + A++ + ) { + for (var y = 0; y <= a; y++) { + var b = s + (y / a) * l; + (v.x = h * Math.cos(b)), + (v.y = h * Math.sin(b)), + c.push(v.x, v.y, v.z), + f.push(0, 0, 1), + (g.x = (v.x / i + 1) / 2), + (g.y = (v.y / i + 1) / 2), + d.push(g.x, g.y); + } + h += p; + } + for (var x = 0; x < o; x++) + for (var S = x * (a + 1), E = 0; E < a; E++) { + var _ = E + S, + C = _, + w = _ + a + 1, + T = _ + a + 2, + M = _ + 1; + u.push(C, w, M), u.push(w, T, M); + } + return ( + e.setIndex(u), + e.setAttribute("position", new ka(c, 3)), + e.setAttribute("normal", new ka(f, 3)), + e.setAttribute("uv", new ka(d, 2)), + e + ); + } + return ( + (0, g.Z)( + n, + [ + { + key: "copy", + value: function (e) { + return ( + (0, l.Z)((0, u.Z)(n.prototype), "copy", this).call( + this, + e + ), + (this.parameters = Object.assign({}, e.parameters)), + this + ); + }, + }, + ], + [ + { + key: "fromJSON", + value: function (e) { + return new n( + e.innerRadius, + e.outerRadius, + e.thetaSegments, + e.phiSegments, + e.thetaStart, + e.thetaLength + ); + }, + }, + ] + ), + n + ); + })(Na), + Nf = (function (e) { + (0, d.Z)(n, e); + var t = (0, h.Z)(n); + function n() { + var e, + r = + arguments.length > 0 && void 0 !== arguments[0] + ? arguments[0] + : new af([ + new dr(0, 0.5), + new dr(-0.5, -0.5), + new dr(0.5, -0.5), + ]), + i = + arguments.length > 1 && void 0 !== arguments[1] + ? arguments[1] + : 12; + (0, m.Z)(this, n), + ((e = t.call(this)).type = "ShapeGeometry"), + (e.parameters = { shapes: r, curveSegments: i }); + var a = [], + o = [], + s = [], + l = [], + u = 0, + c = 0; + if (!1 === Array.isArray(r)) d(r); + else + for (var f = 0; f < r.length; f++) + d(r[f]), e.addGroup(u, c, f), (u += c), (c = 0); + function d(e) { + var t = o.length / 3, + n = e.extractPoints(i), + r = n.shape, + u = n.holes; + !1 === Rf.isClockWise(r) && (r = r.reverse()); + for (var f = 0, d = u.length; f < d; f++) { + var h = u[f]; + !0 === Rf.isClockWise(h) && (u[f] = h.reverse()); + } + for ( + var p = Rf.triangulateShape(r, u), v = 0, m = u.length; + v < m; + v++ + ) { + var g = u[v]; + r = r.concat(g); + } + for (var A = 0, y = r.length; A < y; A++) { + var b = r[A]; + o.push(b.x, b.y, 0), s.push(0, 0, 1), l.push(b.x, b.y); + } + for (var x = 0, S = p.length; x < S; x++) { + var E = p[x], + _ = E[0] + t, + C = E[1] + t, + w = E[2] + t; + a.push(_, C, w), (c += 3); + } + } + return ( + e.setIndex(a), + e.setAttribute("position", new ka(o, 3)), + e.setAttribute("normal", new ka(s, 3)), + e.setAttribute("uv", new ka(l, 2)), + e + ); + } + return ( + (0, g.Z)( + n, + [ + { + key: "copy", + value: function (e) { + return ( + (0, l.Z)((0, u.Z)(n.prototype), "copy", this).call( + this, + e + ), + (this.parameters = Object.assign({}, e.parameters)), + this + ); + }, + }, + { + key: "toJSON", + value: function () { + var e = (0, l.Z)( + (0, u.Z)(n.prototype), + "toJSON", + this + ).call(this); + return (function (e, t) { + if (((t.shapes = []), Array.isArray(e))) + for (var n = 0, r = e.length; n < r; n++) { + var i = e[n]; + t.shapes.push(i.uuid); + } + else t.shapes.push(e.uuid); + return t; + })(this.parameters.shapes, e); + }, + }, + ], + [ + { + key: "fromJSON", + value: function (e, t) { + for (var r = [], i = 0, a = e.shapes.length; i < a; i++) { + var o = t[e.shapes[i]]; + r.push(o); + } + return new n(r, e.curveSegments); + }, + }, + ] + ), + n + ); + })(Na); + var Gf = (function (e) { + (0, d.Z)(n, e); + var t = (0, h.Z)(n); + function n() { + var e, + r = + arguments.length > 0 && void 0 !== arguments[0] + ? arguments[0] + : 1, + i = + arguments.length > 1 && void 0 !== arguments[1] + ? arguments[1] + : 32, + a = + arguments.length > 2 && void 0 !== arguments[2] + ? arguments[2] + : 16, + o = + arguments.length > 3 && void 0 !== arguments[3] + ? arguments[3] + : 0, + s = + arguments.length > 4 && void 0 !== arguments[4] + ? arguments[4] + : 2 * Math.PI, + l = + arguments.length > 5 && void 0 !== arguments[5] + ? arguments[5] + : 0, + u = + arguments.length > 6 && void 0 !== arguments[6] + ? arguments[6] + : Math.PI; + (0, m.Z)(this, n), + ((e = t.call(this)).type = "SphereGeometry"), + (e.parameters = { + radius: r, + widthSegments: i, + heightSegments: a, + phiStart: o, + phiLength: s, + thetaStart: l, + thetaLength: u, + }), + (i = Math.max(3, Math.floor(i))), + (a = Math.max(2, Math.floor(a))); + for ( + var c = Math.min(l + u, Math.PI), + f = 0, + d = [], + h = new Vr(), + p = new Vr(), + v = [], + g = [], + A = [], + y = [], + b = 0; + b <= a; + b++ + ) { + var x = [], + S = b / a, + E = 0; + 0 === b && 0 === l + ? (E = 0.5 / i) + : b === a && c === Math.PI && (E = -0.5 / i); + for (var _ = 0; _ <= i; _++) { + var C = _ / i; + (h.x = -r * Math.cos(o + C * s) * Math.sin(l + S * u)), + (h.y = r * Math.cos(l + S * u)), + (h.z = r * Math.sin(o + C * s) * Math.sin(l + S * u)), + g.push(h.x, h.y, h.z), + p.copy(h).normalize(), + A.push(p.x, p.y, p.z), + y.push(C + E, 1 - S), + x.push(f++); + } + d.push(x); + } + for (var w = 0; w < a; w++) + for (var T = 0; T < i; T++) { + var M = d[w][T + 1], + I = d[w][T], + k = d[w + 1][T], + R = d[w + 1][T + 1]; + (0 !== w || l > 0) && v.push(M, I, R), + (w !== a - 1 || c < Math.PI) && v.push(I, k, R); + } + return ( + e.setIndex(v), + e.setAttribute("position", new ka(g, 3)), + e.setAttribute("normal", new ka(A, 3)), + e.setAttribute("uv", new ka(y, 2)), + e + ); + } + return ( + (0, g.Z)( + n, + [ + { + key: "copy", + value: function (e) { + return ( + (0, l.Z)((0, u.Z)(n.prototype), "copy", this).call( + this, + e + ), + (this.parameters = Object.assign({}, e.parameters)), + this + ); + }, + }, + ], + [ + { + key: "fromJSON", + value: function (e) { + return new n( + e.radius, + e.widthSegments, + e.heightSegments, + e.phiStart, + e.phiLength, + e.thetaStart, + e.thetaLength + ); + }, + }, + ] + ), + n + ); + })(Na), + Zf = (function (e) { + (0, d.Z)(n, e); + var t = (0, h.Z)(n); + function n() { + var e, + r = + arguments.length > 0 && void 0 !== arguments[0] + ? arguments[0] + : 1, + i = + arguments.length > 1 && void 0 !== arguments[1] + ? arguments[1] + : 0; + (0, m.Z)(this, n); + return ( + ((e = t.call( + this, + [1, 1, 1, -1, -1, 1, -1, 1, -1, 1, -1, -1], + [2, 1, 0, 0, 3, 2, 1, 3, 0, 2, 3, 1], + r, + i + )).type = "TetrahedronGeometry"), + (e.parameters = { radius: r, detail: i }), + e + ); + } + return ( + (0, g.Z)(n, null, [ + { + key: "fromJSON", + value: function (e) { + return new n(e.radius, e.detail); + }, + }, + ]), + n + ); + })(Jc), + zf = (function (e) { + (0, d.Z)(n, e); + var t = (0, h.Z)(n); + function n() { + var e, + r = + arguments.length > 0 && void 0 !== arguments[0] + ? arguments[0] + : 1, + i = + arguments.length > 1 && void 0 !== arguments[1] + ? arguments[1] + : 0.4, + a = + arguments.length > 2 && void 0 !== arguments[2] + ? arguments[2] + : 12, + o = + arguments.length > 3 && void 0 !== arguments[3] + ? arguments[3] + : 48, + s = + arguments.length > 4 && void 0 !== arguments[4] + ? arguments[4] + : 2 * Math.PI; + (0, m.Z)(this, n), + ((e = t.call(this)).type = "TorusGeometry"), + (e.parameters = { + radius: r, + tube: i, + radialSegments: a, + tubularSegments: o, + arc: s, + }), + (a = Math.floor(a)), + (o = Math.floor(o)); + for ( + var l = [], + u = [], + c = [], + f = [], + d = new Vr(), + h = new Vr(), + p = new Vr(), + v = 0; + v <= a; + v++ + ) + for (var g = 0; g <= o; g++) { + var A = (g / o) * s, + y = (v / a) * Math.PI * 2; + (h.x = (r + i * Math.cos(y)) * Math.cos(A)), + (h.y = (r + i * Math.cos(y)) * Math.sin(A)), + (h.z = i * Math.sin(y)), + u.push(h.x, h.y, h.z), + (d.x = r * Math.cos(A)), + (d.y = r * Math.sin(A)), + p.subVectors(h, d).normalize(), + c.push(p.x, p.y, p.z), + f.push(g / o), + f.push(v / a); + } + for (var b = 1; b <= a; b++) + for (var x = 1; x <= o; x++) { + var S = (o + 1) * b + x - 1, + E = (o + 1) * (b - 1) + x - 1, + _ = (o + 1) * (b - 1) + x, + C = (o + 1) * b + x; + l.push(S, E, C), l.push(E, _, C); + } + return ( + e.setIndex(l), + e.setAttribute("position", new ka(u, 3)), + e.setAttribute("normal", new ka(c, 3)), + e.setAttribute("uv", new ka(f, 2)), + e + ); + } + return ( + (0, g.Z)( + n, + [ + { + key: "copy", + value: function (e) { + return ( + (0, l.Z)((0, u.Z)(n.prototype), "copy", this).call( + this, + e + ), + (this.parameters = Object.assign({}, e.parameters)), + this + ); + }, + }, + ], + [ + { + key: "fromJSON", + value: function (e) { + return new n( + e.radius, + e.tube, + e.radialSegments, + e.tubularSegments, + e.arc + ); + }, + }, + ] + ), + n + ); + })(Na), + Qf = (function (e) { + (0, d.Z)(n, e); + var t = (0, h.Z)(n); + function n() { + var e, + r = + arguments.length > 0 && void 0 !== arguments[0] + ? arguments[0] + : 1, + i = + arguments.length > 1 && void 0 !== arguments[1] + ? arguments[1] + : 0.4, + a = + arguments.length > 2 && void 0 !== arguments[2] + ? arguments[2] + : 64, + o = + arguments.length > 3 && void 0 !== arguments[3] + ? arguments[3] + : 8, + s = + arguments.length > 4 && void 0 !== arguments[4] + ? arguments[4] + : 2, + l = + arguments.length > 5 && void 0 !== arguments[5] + ? arguments[5] + : 3; + (0, m.Z)(this, n), + ((e = t.call(this)).type = "TorusKnotGeometry"), + (e.parameters = { + radius: r, + tube: i, + tubularSegments: a, + radialSegments: o, + p: s, + q: l, + }), + (a = Math.floor(a)), + (o = Math.floor(o)); + for ( + var u = [], + c = [], + f = [], + d = [], + h = new Vr(), + p = new Vr(), + v = new Vr(), + g = new Vr(), + A = new Vr(), + y = new Vr(), + b = new Vr(), + x = 0; + x <= a; + ++x + ) { + var S = (x / a) * s * Math.PI * 2; + P(S, s, l, r, v), + P(S + 0.01, s, l, r, g), + y.subVectors(g, v), + b.addVectors(g, v), + A.crossVectors(y, b), + b.crossVectors(A, y), + A.normalize(), + b.normalize(); + for (var E = 0; E <= o; ++E) { + var _ = (E / o) * Math.PI * 2, + C = -i * Math.cos(_), + w = i * Math.sin(_); + (h.x = v.x + (C * b.x + w * A.x)), + (h.y = v.y + (C * b.y + w * A.y)), + (h.z = v.z + (C * b.z + w * A.z)), + c.push(h.x, h.y, h.z), + p.subVectors(h, v).normalize(), + f.push(p.x, p.y, p.z), + d.push(x / a), + d.push(E / o); + } + } + for (var T = 1; T <= a; T++) + for (var M = 1; M <= o; M++) { + var I = (o + 1) * (T - 1) + (M - 1), + k = (o + 1) * T + (M - 1), + R = (o + 1) * T + M, + B = (o + 1) * (T - 1) + M; + u.push(I, k, B), u.push(k, R, B); + } + function P(e, t, n, r, i) { + var a = Math.cos(e), + o = Math.sin(e), + s = (n / t) * e, + l = Math.cos(s); + (i.x = r * (2 + l) * 0.5 * a), + (i.y = r * (2 + l) * o * 0.5), + (i.z = r * Math.sin(s) * 0.5); + } + return ( + e.setIndex(u), + e.setAttribute("position", new ka(c, 3)), + e.setAttribute("normal", new ka(f, 3)), + e.setAttribute("uv", new ka(d, 2)), + e + ); + } + return ( + (0, g.Z)( + n, + [ + { + key: "copy", + value: function (e) { + return ( + (0, l.Z)((0, u.Z)(n.prototype), "copy", this).call( + this, + e + ), + (this.parameters = Object.assign({}, e.parameters)), + this + ); + }, + }, + ], + [ + { + key: "fromJSON", + value: function (e) { + return new n( + e.radius, + e.tube, + e.tubularSegments, + e.radialSegments, + e.p, + e.q + ); + }, + }, + ] + ), + n + ); + })(Na), + Hf = (function (e) { + (0, d.Z)(n, e); + var t = (0, h.Z)(n); + function n() { + var e, + r = + arguments.length > 0 && void 0 !== arguments[0] + ? arguments[0] + : new Zc( + new Vr(-1, -1, 0), + new Vr(-1, 1, 0), + new Vr(1, 1, 0) + ), + i = + arguments.length > 1 && void 0 !== arguments[1] + ? arguments[1] + : 64, + a = + arguments.length > 2 && void 0 !== arguments[2] + ? arguments[2] + : 1, + o = + arguments.length > 3 && void 0 !== arguments[3] + ? arguments[3] + : 8, + s = + arguments.length > 4 && + void 0 !== arguments[4] && + arguments[4]; + (0, m.Z)(this, n), + ((e = t.call(this)).type = "TubeGeometry"), + (e.parameters = { + path: r, + tubularSegments: i, + radius: a, + radialSegments: o, + closed: s, + }); + var l = r.computeFrenetFrames(i, s); + (e.tangents = l.tangents), + (e.normals = l.normals), + (e.binormals = l.binormals); + var u = new Vr(), + c = new Vr(), + f = new dr(), + d = new Vr(), + h = [], + p = [], + v = [], + g = []; + function A(e) { + d = r.getPointAt(e / i, d); + for ( + var t = l.normals[e], n = l.binormals[e], s = 0; + s <= o; + s++ + ) { + var f = (s / o) * Math.PI * 2, + v = Math.sin(f), + m = -Math.cos(f); + (c.x = m * t.x + v * n.x), + (c.y = m * t.y + v * n.y), + (c.z = m * t.z + v * n.z), + c.normalize(), + p.push(c.x, c.y, c.z), + (u.x = d.x + a * c.x), + (u.y = d.y + a * c.y), + (u.z = d.z + a * c.z), + h.push(u.x, u.y, u.z); + } + } + return ( + (function () { + for (var e = 0; e < i; e++) A(e); + A(!1 === s ? i : 0), + (function () { + for (var e = 0; e <= i; e++) + for (var t = 0; t <= o; t++) + (f.x = e / i), (f.y = t / o), v.push(f.x, f.y); + })(), + (function () { + for (var e = 1; e <= i; e++) + for (var t = 1; t <= o; t++) { + var n = (o + 1) * (e - 1) + (t - 1), + r = (o + 1) * e + (t - 1), + a = (o + 1) * e + t, + s = (o + 1) * (e - 1) + t; + g.push(n, r, s), g.push(r, a, s); + } + })(); + })(), + e.setIndex(g), + e.setAttribute("position", new ka(h, 3)), + e.setAttribute("normal", new ka(p, 3)), + e.setAttribute("uv", new ka(v, 2)), + e + ); + } + return ( + (0, g.Z)( + n, + [ + { + key: "copy", + value: function (e) { + return ( + (0, l.Z)((0, u.Z)(n.prototype), "copy", this).call( + this, + e + ), + (this.parameters = Object.assign({}, e.parameters)), + this + ); + }, + }, + { + key: "toJSON", + value: function () { + var e = (0, l.Z)( + (0, u.Z)(n.prototype), + "toJSON", + this + ).call(this); + return (e.path = this.parameters.path.toJSON()), e; + }, + }, + ], + [ + { + key: "fromJSON", + value: function (e) { + return new n( + new Qc[e.path.type]().fromJSON(e.path), + e.tubularSegments, + e.radius, + e.radialSegments, + e.closed + ); + }, + }, + ] + ), + n + ); + })(Na), + Vf = (function (e) { + (0, d.Z)(n, e); + var t = (0, h.Z)(n); + function n() { + var e, + r = + arguments.length > 0 && void 0 !== arguments[0] + ? arguments[0] + : null; + if ( + ((0, m.Z)(this, n), + ((e = t.call(this)).type = "WireframeGeometry"), + (e.parameters = { geometry: r }), + null !== r) + ) { + var i = [], + a = new Set(), + o = new Vr(), + s = new Vr(); + if (null !== r.index) { + var l = r.attributes.position, + u = r.index, + c = r.groups; + 0 === c.length && + (c = [{ start: 0, count: u.count, materialIndex: 0 }]); + for (var f = 0, d = c.length; f < d; ++f) + for ( + var h = c[f], p = h.start, v = p, g = p + h.count; + v < g; + v += 3 + ) + for (var A = 0; A < 3; A++) { + var y = u.getX(v + A), + b = u.getX(v + ((A + 1) % 3)); + o.fromBufferAttribute(l, y), + s.fromBufferAttribute(l, b), + !0 === jf(o, s, a) && + (i.push(o.x, o.y, o.z), i.push(s.x, s.y, s.z)); + } + } else + for ( + var x = r.attributes.position, S = 0, E = x.count / 3; + S < E; + S++ + ) + for (var _ = 0; _ < 3; _++) { + var C = 3 * S + _, + w = 3 * S + ((_ + 1) % 3); + o.fromBufferAttribute(x, C), + s.fromBufferAttribute(x, w), + !0 === jf(o, s, a) && + (i.push(o.x, o.y, o.z), i.push(s.x, s.y, s.z)); + } + e.setAttribute("position", new ka(i, 3)); + } + return e; + } + return ( + (0, g.Z)(n, [ + { + key: "copy", + value: function (e) { + return ( + (0, l.Z)((0, u.Z)(n.prototype), "copy", this).call( + this, + e + ), + (this.parameters = Object.assign({}, e.parameters)), + this + ); + }, + }, + ]), + n + ); + })(Na); + function jf(e, t, n) { + var 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 Wf = Object.freeze({ + __proto__: null, + BoxGeometry: ao, + CapsuleGeometry: Wc, + CircleGeometry: Xc, + ConeGeometry: qc, + CylinderGeometry: Yc, + DodecahedronGeometry: Kc, + EdgesGeometry: rf, + ExtrudeGeometry: Lf, + IcosahedronGeometry: Uf, + LatheGeometry: jc, + OctahedronGeometry: Ff, + PlaneGeometry: To, + PolyhedronGeometry: Jc, + RingGeometry: Of, + ShapeGeometry: Nf, + SphereGeometry: Gf, + TetrahedronGeometry: Zf, + TorusGeometry: zf, + TorusKnotGeometry: Qf, + TubeGeometry: Hf, + WireframeGeometry: Vf, + }), + Xf = (function (e) { + (0, d.Z)(n, e); + var t = (0, h.Z)(n); + function n(e) { + var r; + return ( + (0, m.Z)(this, n), + ((r = t.call(this)).isShadowMaterial = !0), + (r.type = "ShadowMaterial"), + (r.color = new fa(0)), + (r.transparent = !0), + (r.fog = !0), + r.setValues(e), + r + ); + } + return ( + (0, g.Z)(n, [ + { + key: "copy", + value: function (e) { + return ( + (0, l.Z)((0, u.Z)(n.prototype), "copy", this).call( + this, + e + ), + this.color.copy(e.color), + (this.fog = e.fog), + this + ); + }, + }, + ]), + n + ); + })(oa), + Yf = (function (e) { + (0, d.Z)(n, e); + var t = (0, h.Z)(n); + function n(e) { + var r; + return ( + (0, m.Z)(this, n), + ((r = t.call(this, e)).isRawShaderMaterial = !0), + (r.type = "RawShaderMaterial"), + r + ); + } + return (0, g.Z)(n); + })(co), + qf = (function (e) { + (0, d.Z)(n, e); + var t = (0, h.Z)(n); + function n(e) { + var r; + return ( + (0, m.Z)(this, n), + ((r = t.call(this)).isMeshStandardMaterial = !0), + (r.defines = { STANDARD: "" }), + (r.type = "MeshStandardMaterial"), + (r.color = new fa(16777215)), + (r.roughness = 1), + (r.metalness = 0), + (r.map = null), + (r.lightMap = null), + (r.lightMapIntensity = 1), + (r.aoMap = null), + (r.aoMapIntensity = 1), + (r.emissive = new fa(0)), + (r.emissiveIntensity = 1), + (r.emissiveMap = null), + (r.bumpMap = null), + (r.bumpScale = 1), + (r.normalMap = null), + (r.normalMapType = tn), + (r.normalScale = new dr(1, 1)), + (r.displacementMap = null), + (r.displacementScale = 1), + (r.displacementBias = 0), + (r.roughnessMap = null), + (r.metalnessMap = null), + (r.alphaMap = null), + (r.envMap = null), + (r.envMapIntensity = 1), + (r.wireframe = !1), + (r.wireframeLinewidth = 1), + (r.wireframeLinecap = "round"), + (r.wireframeLinejoin = "round"), + (r.flatShading = !1), + (r.fog = !0), + r.setValues(e), + r + ); + } + return ( + (0, g.Z)(n, [ + { + key: "copy", + value: function (e) { + return ( + (0, l.Z)((0, u.Z)(n.prototype), "copy", this).call( + this, + 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.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 + ); + }, + }, + ]), + n + ); + })(oa), + Jf = (function (e) { + (0, d.Z)(n, e); + var t = (0, h.Z)(n); + function n(e) { + var r; + return ( + (0, m.Z)(this, n), + ((r = t.call(this)).isMeshPhysicalMaterial = !0), + (r.defines = { STANDARD: "", PHYSICAL: "" }), + (r.type = "MeshPhysicalMaterial"), + (r.anisotropyRotation = 0), + (r.anisotropyMap = null), + (r.clearcoatMap = null), + (r.clearcoatRoughness = 0), + (r.clearcoatRoughnessMap = null), + (r.clearcoatNormalScale = new dr(1, 1)), + (r.clearcoatNormalMap = null), + (r.ior = 1.5), + Object.defineProperty((0, f.Z)(r), "reflectivity", { + get: function () { + return rr((2.5 * (this.ior - 1)) / (this.ior + 1), 0, 1); + }, + set: function (e) { + this.ior = (1 + 0.4 * e) / (1 - 0.4 * e); + }, + }), + (r.iridescenceMap = null), + (r.iridescenceIOR = 1.3), + (r.iridescenceThicknessRange = [100, 400]), + (r.iridescenceThicknessMap = null), + (r.sheenColor = new fa(0)), + (r.sheenColorMap = null), + (r.sheenRoughness = 1), + (r.sheenRoughnessMap = null), + (r.transmissionMap = null), + (r.thickness = 0), + (r.thicknessMap = null), + (r.attenuationDistance = 1 / 0), + (r.attenuationColor = new fa(1, 1, 1)), + (r.specularIntensity = 1), + (r.specularIntensityMap = null), + (r.specularColor = new fa(1, 1, 1)), + (r.specularColorMap = null), + (r._anisotropy = 0), + (r._clearcoat = 0), + (r._iridescence = 0), + (r._sheen = 0), + (r._transmission = 0), + r.setValues(e), + r + ); + } + return ( + (0, g.Z)(n, [ + { + key: "anisotropy", + get: function () { + return this._anisotropy; + }, + set: function (e) { + this._anisotropy > 0 !== e > 0 && this.version++, + (this._anisotropy = e); + }, + }, + { + key: "clearcoat", + get: function () { + return this._clearcoat; + }, + set: function (e) { + this._clearcoat > 0 !== e > 0 && this.version++, + (this._clearcoat = e); + }, + }, + { + key: "iridescence", + get: function () { + return this._iridescence; + }, + set: function (e) { + this._iridescence > 0 !== e > 0 && this.version++, + (this._iridescence = e); + }, + }, + { + key: "sheen", + get: function () { + return this._sheen; + }, + set: function (e) { + this._sheen > 0 !== e > 0 && this.version++, + (this._sheen = e); + }, + }, + { + key: "transmission", + get: function () { + return this._transmission; + }, + set: function (e) { + this._transmission > 0 !== e > 0 && this.version++, + (this._transmission = e); + }, + }, + { + key: "copy", + value: function (e) { + return ( + (0, l.Z)((0, u.Z)(n.prototype), "copy", this).call( + this, + 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.ior = e.ior), + (this.iridescence = e.iridescence), + (this.iridescenceMap = e.iridescenceMap), + (this.iridescenceIOR = e.iridescenceIOR), + (this.iridescenceThicknessRange = (0, c.Z)( + 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 + ); + }, + }, + ]), + n + ); + })(qf), + Kf = (function (e) { + (0, d.Z)(n, e); + var t = (0, h.Z)(n); + function n(e) { + var r; + return ( + (0, m.Z)(this, n), + ((r = t.call(this)).isMeshPhongMaterial = !0), + (r.type = "MeshPhongMaterial"), + (r.color = new fa(16777215)), + (r.specular = new fa(1118481)), + (r.shininess = 30), + (r.map = null), + (r.lightMap = null), + (r.lightMapIntensity = 1), + (r.aoMap = null), + (r.aoMapIntensity = 1), + (r.emissive = new fa(0)), + (r.emissiveIntensity = 1), + (r.emissiveMap = null), + (r.bumpMap = null), + (r.bumpScale = 1), + (r.normalMap = null), + (r.normalMapType = tn), + (r.normalScale = new dr(1, 1)), + (r.displacementMap = null), + (r.displacementScale = 1), + (r.displacementBias = 0), + (r.specularMap = null), + (r.alphaMap = null), + (r.envMap = null), + (r.combine = ue), + (r.reflectivity = 1), + (r.refractionRatio = 0.98), + (r.wireframe = !1), + (r.wireframeLinewidth = 1), + (r.wireframeLinecap = "round"), + (r.wireframeLinejoin = "round"), + (r.flatShading = !1), + (r.fog = !0), + r.setValues(e), + r + ); + } + return ( + (0, g.Z)(n, [ + { + key: "copy", + value: function (e) { + return ( + (0, l.Z)((0, u.Z)(n.prototype), "copy", this).call( + this, + 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.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 + ); + }, + }, + ]), + n + ); + })(oa), + $f = (function (e) { + (0, d.Z)(n, e); + var t = (0, h.Z)(n); + function n(e) { + var r; + return ( + (0, m.Z)(this, n), + ((r = t.call(this)).isMeshToonMaterial = !0), + (r.defines = { TOON: "" }), + (r.type = "MeshToonMaterial"), + (r.color = new fa(16777215)), + (r.map = null), + (r.gradientMap = null), + (r.lightMap = null), + (r.lightMapIntensity = 1), + (r.aoMap = null), + (r.aoMapIntensity = 1), + (r.emissive = new fa(0)), + (r.emissiveIntensity = 1), + (r.emissiveMap = null), + (r.bumpMap = null), + (r.bumpScale = 1), + (r.normalMap = null), + (r.normalMapType = tn), + (r.normalScale = new dr(1, 1)), + (r.displacementMap = null), + (r.displacementScale = 1), + (r.displacementBias = 0), + (r.alphaMap = null), + (r.wireframe = !1), + (r.wireframeLinewidth = 1), + (r.wireframeLinecap = "round"), + (r.wireframeLinejoin = "round"), + (r.fog = !0), + r.setValues(e), + r + ); + } + return ( + (0, g.Z)(n, [ + { + key: "copy", + value: function (e) { + return ( + (0, l.Z)((0, u.Z)(n.prototype), "copy", this).call( + this, + 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 + ); + }, + }, + ]), + n + ); + })(oa), + ed = (function (e) { + (0, d.Z)(n, e); + var t = (0, h.Z)(n); + function n(e) { + var r; + return ( + (0, m.Z)(this, n), + ((r = t.call(this)).isMeshNormalMaterial = !0), + (r.type = "MeshNormalMaterial"), + (r.bumpMap = null), + (r.bumpScale = 1), + (r.normalMap = null), + (r.normalMapType = tn), + (r.normalScale = new dr(1, 1)), + (r.displacementMap = null), + (r.displacementScale = 1), + (r.displacementBias = 0), + (r.wireframe = !1), + (r.wireframeLinewidth = 1), + (r.flatShading = !1), + r.setValues(e), + r + ); + } + return ( + (0, g.Z)(n, [ + { + key: "copy", + value: function (e) { + return ( + (0, l.Z)((0, u.Z)(n.prototype), "copy", this).call( + this, + 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 + ); + }, + }, + ]), + n + ); + })(oa), + td = (function (e) { + (0, d.Z)(n, e); + var t = (0, h.Z)(n); + function n(e) { + var r; + return ( + (0, m.Z)(this, n), + ((r = t.call(this)).isMeshLambertMaterial = !0), + (r.type = "MeshLambertMaterial"), + (r.color = new fa(16777215)), + (r.map = null), + (r.lightMap = null), + (r.lightMapIntensity = 1), + (r.aoMap = null), + (r.aoMapIntensity = 1), + (r.emissive = new fa(0)), + (r.emissiveIntensity = 1), + (r.emissiveMap = null), + (r.bumpMap = null), + (r.bumpScale = 1), + (r.normalMap = null), + (r.normalMapType = tn), + (r.normalScale = new dr(1, 1)), + (r.displacementMap = null), + (r.displacementScale = 1), + (r.displacementBias = 0), + (r.specularMap = null), + (r.alphaMap = null), + (r.envMap = null), + (r.combine = ue), + (r.reflectivity = 1), + (r.refractionRatio = 0.98), + (r.wireframe = !1), + (r.wireframeLinewidth = 1), + (r.wireframeLinecap = "round"), + (r.wireframeLinejoin = "round"), + (r.flatShading = !1), + (r.fog = !0), + r.setValues(e), + r + ); + } + return ( + (0, g.Z)(n, [ + { + key: "copy", + value: function (e) { + return ( + (0, l.Z)((0, u.Z)(n.prototype), "copy", this).call( + this, + 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.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 + ); + }, + }, + ]), + n + ); + })(oa), + nd = (function (e) { + (0, d.Z)(n, e); + var t = (0, h.Z)(n); + function n(e) { + var r; + return ( + (0, m.Z)(this, n), + ((r = t.call(this)).isMeshMatcapMaterial = !0), + (r.defines = { MATCAP: "" }), + (r.type = "MeshMatcapMaterial"), + (r.color = new fa(16777215)), + (r.matcap = null), + (r.map = null), + (r.bumpMap = null), + (r.bumpScale = 1), + (r.normalMap = null), + (r.normalMapType = tn), + (r.normalScale = new dr(1, 1)), + (r.displacementMap = null), + (r.displacementScale = 1), + (r.displacementBias = 0), + (r.alphaMap = null), + (r.flatShading = !1), + (r.fog = !0), + r.setValues(e), + r + ); + } + return ( + (0, g.Z)(n, [ + { + key: "copy", + value: function (e) { + return ( + (0, l.Z)((0, u.Z)(n.prototype), "copy", this).call( + this, + 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 + ); + }, + }, + ]), + n + ); + })(oa), + rd = (function (e) { + (0, d.Z)(n, e); + var t = (0, h.Z)(n); + function n(e) { + var r; + return ( + (0, m.Z)(this, n), + ((r = t.call(this)).isLineDashedMaterial = !0), + (r.type = "LineDashedMaterial"), + (r.scale = 1), + (r.dashSize = 3), + (r.gapSize = 1), + r.setValues(e), + r + ); + } + return ( + (0, g.Z)(n, [ + { + key: "copy", + value: function (e) { + return ( + (0, l.Z)((0, u.Z)(n.prototype), "copy", this).call( + this, + e + ), + (this.scale = e.scale), + (this.dashSize = e.dashSize), + (this.gapSize = e.gapSize), + this + ); + }, + }, + ]), + n + ); + })(ec); + function id(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 ad(e) { + return ArrayBuffer.isView(e) && !(e instanceof DataView); + } + function od(e) { + for (var t = e.length, n = new Array(t), r = 0; r !== t; ++r) + n[r] = r; + return ( + n.sort(function (t, n) { + return e[t] - e[n]; + }), + n + ); + } + function sd(e, t, n) { + for ( + var r = e.length, i = new e.constructor(r), a = 0, o = 0; + o !== r; + ++a + ) + for (var s = n[a] * t, l = 0; l !== t; ++l) i[o++] = e[s + l]; + return i; + } + function ld(e, t, n, r) { + for (var i = 1, a = e[0]; void 0 !== a && void 0 === a[r]; ) + a = e[i++]; + if (void 0 !== a) { + var o = a[r]; + if (void 0 !== o) + if (Array.isArray(o)) + do { + void 0 !== (o = a[r]) && (t.push(a.time), n.push.apply(n, o)), + (a = e[i++]); + } while (void 0 !== a); + else if (void 0 !== o.toArray) + do { + void 0 !== (o = a[r]) && + (t.push(a.time), o.toArray(n, n.length)), + (a = e[i++]); + } while (void 0 !== a); + else + do { + void 0 !== (o = a[r]) && (t.push(a.time), n.push(o)), + (a = e[i++]); + } while (void 0 !== a); + } + } + var ud = { + convertArray: id, + isTypedArray: ad, + getKeyframeOrder: od, + sortedArray: sd, + flattenJSON: ld, + subclip: function (e, t, n, r) { + var i = + arguments.length > 4 && void 0 !== arguments[4] + ? arguments[4] + : 30, + a = e.clone(); + a.name = t; + for (var o = [], s = 0; s < a.tracks.length; ++s) { + for ( + var l = a.tracks[s], + u = l.getValueSize(), + c = [], + f = [], + d = 0; + d < l.times.length; + ++d + ) { + var h = l.times[d] * i; + if (!(h < n || h >= r)) { + c.push(l.times[d]); + for (var p = 0; p < u; ++p) f.push(l.values[d * u + p]); + } + } + 0 !== c.length && + ((l.times = id(c, l.times.constructor)), + (l.values = id(f, l.values.constructor)), + o.push(l)); + } + a.tracks = o; + for (var v = 1 / 0, m = 0; m < a.tracks.length; ++m) + v > a.tracks[m].times[0] && (v = a.tracks[m].times[0]); + for (var g = 0; g < a.tracks.length; ++g) + a.tracks[g].shift(-1 * v); + return a.resetDuration(), a; + }, + makeClipAdditive: function (e) { + var 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); + for ( + var i = n.tracks.length, + a = t / r, + o = function () { + var t = n.tracks[s], + r = t.ValueTypeName; + if ("bool" === r || "string" === r) return 0; + var i = e.tracks.find(function (e) { + return e.name === t.name && e.ValueTypeName === r; + }); + if (void 0 === i) return 0; + var o = 0, + l = t.getValueSize(); + t.createInterpolant + .isInterpolantFactoryMethodGLTFCubicSpline && (o = l / 3); + var u = 0, + c = i.getValueSize(); + i.createInterpolant + .isInterpolantFactoryMethodGLTFCubicSpline && (u = c / 3); + var f, + d = t.times.length - 1; + if (a <= t.times[0]) { + var h = o, + p = l - o; + f = t.values.slice(h, p); + } else if (a >= t.times[d]) { + var v = d * l + o, + m = v + l - o; + f = t.values.slice(v, m); + } else { + var g = t.createInterpolant(), + A = o, + y = l - o; + g.evaluate(a), (f = g.resultBuffer.slice(A, y)); + } + "quaternion" === r && + new Hr().fromArray(f).normalize().conjugate().toArray(f); + for (var b = i.times.length, x = 0; x < b; ++x) { + var S = x * c + u; + if ("quaternion" === r) + Hr.multiplyQuaternionsFlat( + i.values, + S, + f, + 0, + i.values, + S + ); + else + for (var E = c - 2 * u, _ = 0; _ < E; ++_) + i.values[S + _] -= f[_]; + } + }, + s = 0; + s < i; + ++s + ) + o(); + return (e.blendMode = Wt), e; + }, + }, + cd = (function () { + function e(t, n, r, i) { + (0, m.Z)(this, e), + (this.parameterPositions = t), + (this._cachedIndex = 0), + (this.resultBuffer = void 0 !== i ? i : new n.constructor(r)), + (this.sampleValues = n), + (this.valueSize = r), + (this.settings = null), + (this.DefaultSettings_ = {}); + } + return ( + (0, g.Z)(e, [ + { + key: "evaluate", + value: function (e) { + var t = this.parameterPositions, + n = this._cachedIndex, + r = t[n], + i = t[n - 1]; + e: { + t: { + var a; + n: { + r: if (!(e < r)) { + for (var o = n + 2; ; ) { + if (void 0 === r) { + if (e < i) break r; + return ( + (n = t.length), + (this._cachedIndex = n), + this.copySampleValue_(n - 1) + ); + } + if (n === o) break; + if (((i = r), e < (r = t[++n]))) break t; + } + a = t.length; + break n; + } + if (e >= i) break e; + var s = t[1]; + e < s && ((n = 2), (i = s)); + for (var l = n - 2; ; ) { + if (void 0 === i) + return ( + (this._cachedIndex = 0), + this.copySampleValue_(0) + ); + if (n === l) break; + if (((r = i), e >= (i = t[--n - 1]))) break t; + } + (a = n), (n = 0); + } + for (; n < a; ) { + var u = (n + a) >>> 1; + e < t[u] ? (a = u) : (n = u + 1); + } + if (((r = t[n]), void 0 === (i = t[n - 1]))) + 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); + }, + }, + { + key: "getSettings_", + value: function () { + return this.settings || this.DefaultSettings_; + }, + }, + { + key: "copySampleValue_", + value: function (e) { + for ( + var t = this.resultBuffer, + n = this.sampleValues, + r = this.valueSize, + i = e * r, + a = 0; + a !== r; + ++a + ) + t[a] = n[i + a]; + return t; + }, + }, + { + key: "interpolate_", + value: function () { + throw new Error("call to abstract method"); + }, + }, + { key: "intervalChanged_", value: function () {} }, + ]), + e + ); + })(), + fd = (function (e) { + (0, d.Z)(n, e); + var t = (0, h.Z)(n); + function n(e, r, i, a) { + var o; + return ( + (0, m.Z)(this, n), + ((o = t.call(this, e, r, i, a))._weightPrev = -0), + (o._offsetPrev = -0), + (o._weightNext = -0), + (o._offsetNext = -0), + (o.DefaultSettings_ = { endingStart: Qt, endingEnd: Qt }), + o + ); + } + return ( + (0, g.Z)(n, [ + { + key: "intervalChanged_", + value: function (e, t, n) { + var r = this.parameterPositions, + i = e - 2, + a = e + 1, + o = r[i], + s = r[a]; + if (void 0 === o) + switch (this.getSettings_().endingStart) { + case Ht: + (i = e), (o = 2 * t - n); + break; + case Vt: + o = t + r[(i = r.length - 2)] - r[i + 1]; + break; + default: + (i = e), (o = n); + } + if (void 0 === s) + switch (this.getSettings_().endingEnd) { + case Ht: + (a = e), (s = 2 * n - t); + break; + case Vt: + (a = 1), (s = n + r[1] - r[0]); + break; + default: + (a = e - 1), (s = t); + } + var l = 0.5 * (n - t), + u = this.valueSize; + (this._weightPrev = l / (t - o)), + (this._weightNext = l / (s - n)), + (this._offsetPrev = i * u), + (this._offsetNext = a * u); + }, + }, + { + key: "interpolate_", + value: function (e, t, n, r) { + for ( + var i = this.resultBuffer, + a = this.sampleValues, + o = this.valueSize, + s = e * o, + l = s - o, + u = this._offsetPrev, + c = this._offsetNext, + f = this._weightPrev, + d = this._weightNext, + h = (n - t) / (r - t), + p = h * h, + v = p * h, + m = -f * v + 2 * f * p - f * h, + g = + (1 + f) * v + (-1.5 - 2 * f) * p + (-0.5 + f) * h + 1, + A = (-1 - d) * v + (1.5 + d) * p + 0.5 * h, + y = d * v - d * p, + b = 0; + b !== o; + ++b + ) + i[b] = + m * a[u + b] + + g * a[l + b] + + A * a[s + b] + + y * a[c + b]; + return i; + }, + }, + ]), + n + ); + })(cd), + dd = (function (e) { + (0, d.Z)(n, e); + var t = (0, h.Z)(n); + function n(e, r, i, a) { + return (0, m.Z)(this, n), t.call(this, e, r, i, a); + } + return ( + (0, g.Z)(n, [ + { + key: "interpolate_", + value: function (e, t, n, r) { + for ( + var i = this.resultBuffer, + a = this.sampleValues, + o = this.valueSize, + s = e * o, + l = s - o, + u = (n - t) / (r - t), + c = 1 - u, + f = 0; + f !== o; + ++f + ) + i[f] = a[l + f] * c + a[s + f] * u; + return i; + }, + }, + ]), + n + ); + })(cd), + hd = (function (e) { + (0, d.Z)(n, e); + var t = (0, h.Z)(n); + function n(e, r, i, a) { + return (0, m.Z)(this, n), t.call(this, e, r, i, a); + } + return ( + (0, g.Z)(n, [ + { + key: "interpolate_", + value: function (e) { + return this.copySampleValue_(e - 1); + }, + }, + ]), + n + ); + })(cd), + pd = (function () { + function e(t, n, r, i) { + if (((0, m.Z)(this, e), void 0 === t)) + throw new Error("THREE.KeyframeTrack: track name is undefined"); + if (void 0 === n || 0 === n.length) + throw new Error( + "THREE.KeyframeTrack: no keyframes in track named " + t + ); + (this.name = t), + (this.times = id(n, this.TimeBufferType)), + (this.values = id(r, this.ValueBufferType)), + this.setInterpolation(i || this.DefaultInterpolation); + } + return ( + (0, g.Z)( + e, + [ + { + key: "InterpolantFactoryMethodDiscrete", + value: function (e) { + return new hd( + this.times, + this.values, + this.getValueSize(), + e + ); + }, + }, + { + key: "InterpolantFactoryMethodLinear", + value: function (e) { + return new dd( + this.times, + this.values, + this.getValueSize(), + e + ); + }, + }, + { + key: "InterpolantFactoryMethodSmooth", + value: function (e) { + return new fd( + this.times, + this.values, + this.getValueSize(), + e + ); + }, + }, + { + key: "setInterpolation", + value: function (e) { + var t; + switch (e) { + case Gt: + t = this.InterpolantFactoryMethodDiscrete; + break; + case Zt: + t = this.InterpolantFactoryMethodLinear; + break; + case zt: + t = this.InterpolantFactoryMethodSmooth; + } + if (void 0 === t) { + var n = + "unsupported interpolation for " + + this.ValueTypeName + + " keyframe track named " + + this.name; + if (void 0 === this.createInterpolant) { + if (e === this.DefaultInterpolation) + throw new Error(n); + this.setInterpolation(this.DefaultInterpolation); + } + return console.warn("THREE.KeyframeTrack:", n), this; + } + return (this.createInterpolant = t), this; + }, + }, + { + key: "getInterpolation", + value: function () { + switch (this.createInterpolant) { + case this.InterpolantFactoryMethodDiscrete: + return Gt; + case this.InterpolantFactoryMethodLinear: + return Zt; + case this.InterpolantFactoryMethodSmooth: + return zt; + } + }, + }, + { + key: "getValueSize", + value: function () { + return this.values.length / this.times.length; + }, + }, + { + key: "shift", + value: function (e) { + if (0 !== e) + for ( + var t = this.times, n = 0, r = t.length; + n !== r; + ++n + ) + t[n] += e; + return this; + }, + }, + { + key: "scale", + value: function (e) { + if (1 !== e) + for ( + var t = this.times, n = 0, r = t.length; + n !== r; + ++n + ) + t[n] *= e; + return this; + }, + }, + { + key: "trim", + value: function (e, t) { + for ( + var n = this.times, r = n.length, i = 0, a = r - 1; + i !== r && n[i] < e; + + ) + ++i; + for (; -1 !== a && n[a] > t; ) --a; + if ((++a, 0 !== i || a !== r)) { + i >= a && (i = (a = Math.max(a, 1)) - 1); + var o = this.getValueSize(); + (this.times = n.slice(i, a)), + (this.values = this.values.slice(i * o, a * o)); + } + return this; + }, + }, + { + key: "validate", + value: function () { + var e = !0, + t = this.getValueSize(); + t - Math.floor(t) !== 0 && + (console.error( + "THREE.KeyframeTrack: Invalid value size in track.", + this + ), + (e = !1)); + var n = this.times, + r = this.values, + i = n.length; + 0 === i && + (console.error( + "THREE.KeyframeTrack: Track is empty.", + this + ), + (e = !1)); + for (var a = null, o = 0; o !== i; o++) { + var s = n[o]; + if ("number" === typeof s && isNaN(s)) { + console.error( + "THREE.KeyframeTrack: Time is not a valid number.", + this, + o, + s + ), + (e = !1); + break; + } + if (null !== a && a > s) { + console.error( + "THREE.KeyframeTrack: Out of order keys.", + this, + o, + s, + a + ), + (e = !1); + break; + } + a = s; + } + if (void 0 !== r && ad(r)) + for (var l = 0, u = r.length; l !== u; ++l) { + var c = r[l]; + if (isNaN(c)) { + console.error( + "THREE.KeyframeTrack: Value is not a valid number.", + this, + l, + c + ), + (e = !1); + break; + } + } + return e; + }, + }, + { + key: "optimize", + value: function () { + for ( + var e = this.times.slice(), + t = this.values.slice(), + n = this.getValueSize(), + r = this.getInterpolation() === zt, + i = e.length - 1, + a = 1, + o = 1; + o < i; + ++o + ) { + var s = !1, + l = e[o]; + if (l !== e[o + 1] && (1 !== o || l !== e[0])) + if (r) s = !0; + else + for ( + var u = o * n, c = u - n, f = u + n, d = 0; + d !== n; + ++d + ) { + var h = t[u + d]; + if (h !== t[c + d] || h !== t[f + d]) { + s = !0; + break; + } + } + if (s) { + if (o !== a) { + e[a] = e[o]; + for (var p = o * n, v = a * n, m = 0; m !== n; ++m) + t[v + m] = t[p + m]; + } + ++a; + } + } + if (i > 0) { + e[a] = e[i]; + for (var g = i * n, A = a * n, y = 0; y !== n; ++y) + t[A + y] = t[g + y]; + ++a; + } + return ( + a !== e.length + ? ((this.times = e.slice(0, a)), + (this.values = t.slice(0, a * n))) + : ((this.times = e), (this.values = t)), + this + ); + }, + }, + { + key: "clone", + value: function () { + var e = this.times.slice(), + t = this.values.slice(), + n = new (0, this.constructor)(this.name, e, t); + return (n.createInterpolant = this.createInterpolant), n; + }, + }, + ], + [ + { + key: "toJSON", + value: function (e) { + var t, + n = e.constructor; + if (n.toJSON !== this.toJSON) t = n.toJSON(e); + else { + t = { + name: e.name, + times: id(e.times, Array), + values: id(e.values, Array), + }; + var r = e.getInterpolation(); + r !== e.DefaultInterpolation && (t.interpolation = r); + } + return (t.type = e.ValueTypeName), t; + }, + }, + ] + ), + e + ); + })(); + (pd.prototype.TimeBufferType = Float32Array), + (pd.prototype.ValueBufferType = Float32Array), + (pd.prototype.DefaultInterpolation = Zt); + var vd = (function (e) { + (0, d.Z)(n, e); + var t = (0, h.Z)(n); + function n() { + return (0, m.Z)(this, n), t.apply(this, arguments); + } + return (0, g.Z)(n); + })(pd); + (vd.prototype.ValueTypeName = "bool"), + (vd.prototype.ValueBufferType = Array), + (vd.prototype.DefaultInterpolation = Gt), + (vd.prototype.InterpolantFactoryMethodLinear = void 0), + (vd.prototype.InterpolantFactoryMethodSmooth = void 0); + var md = (function (e) { + (0, d.Z)(n, e); + var t = (0, h.Z)(n); + function n() { + return (0, m.Z)(this, n), t.apply(this, arguments); + } + return (0, g.Z)(n); + })(pd); + md.prototype.ValueTypeName = "color"; + var gd = (function (e) { + (0, d.Z)(n, e); + var t = (0, h.Z)(n); + function n() { + return (0, m.Z)(this, n), t.apply(this, arguments); + } + return (0, g.Z)(n); + })(pd); + gd.prototype.ValueTypeName = "number"; + var Ad = (function (e) { + (0, d.Z)(n, e); + var t = (0, h.Z)(n); + function n(e, r, i, a) { + return (0, m.Z)(this, n), t.call(this, e, r, i, a); + } + return ( + (0, g.Z)(n, [ + { + key: "interpolate_", + value: function (e, t, n, r) { + for ( + var i = this.resultBuffer, + a = this.sampleValues, + o = this.valueSize, + s = (n - t) / (r - t), + l = e * o, + u = l + o; + l !== u; + l += 4 + ) + Hr.slerpFlat(i, 0, a, l - o, a, l, s); + return i; + }, + }, + ]), + n + ); + })(cd), + yd = (function (e) { + (0, d.Z)(n, e); + var t = (0, h.Z)(n); + function n() { + return (0, m.Z)(this, n), t.apply(this, arguments); + } + return ( + (0, g.Z)(n, [ + { + key: "InterpolantFactoryMethodLinear", + value: function (e) { + return new Ad( + this.times, + this.values, + this.getValueSize(), + e + ); + }, + }, + ]), + n + ); + })(pd); + (yd.prototype.ValueTypeName = "quaternion"), + (yd.prototype.DefaultInterpolation = Zt), + (yd.prototype.InterpolantFactoryMethodSmooth = void 0); + var bd = (function (e) { + (0, d.Z)(n, e); + var t = (0, h.Z)(n); + function n() { + return (0, m.Z)(this, n), t.apply(this, arguments); + } + return (0, g.Z)(n); + })(pd); + (bd.prototype.ValueTypeName = "string"), + (bd.prototype.ValueBufferType = Array), + (bd.prototype.DefaultInterpolation = Gt), + (bd.prototype.InterpolantFactoryMethodLinear = void 0), + (bd.prototype.InterpolantFactoryMethodSmooth = void 0); + var xd = (function (e) { + (0, d.Z)(n, e); + var t = (0, h.Z)(n); + function n() { + return (0, m.Z)(this, n), t.apply(this, arguments); + } + return (0, g.Z)(n); + })(pd); + xd.prototype.ValueTypeName = "vector"; + var Sd = (function () { + function e(t) { + var n = + arguments.length > 1 && void 0 !== arguments[1] + ? arguments[1] + : -1, + r = arguments.length > 2 ? arguments[2] : void 0, + i = + arguments.length > 3 && void 0 !== arguments[3] + ? arguments[3] + : jt; + (0, m.Z)(this, e), + (this.name = t), + (this.tracks = r), + (this.duration = n), + (this.blendMode = i), + (this.uuid = nr()), + this.duration < 0 && this.resetDuration(); + } + return ( + (0, g.Z)( + e, + [ + { + key: "resetDuration", + value: function () { + for ( + var e = 0, t = 0, n = this.tracks.length; + t !== n; + ++t + ) { + var r = this.tracks[t]; + e = Math.max(e, r.times[r.times.length - 1]); + } + return (this.duration = e), this; + }, + }, + { + key: "trim", + value: function () { + for (var e = 0; e < this.tracks.length; e++) + this.tracks[e].trim(0, this.duration); + return this; + }, + }, + { + key: "validate", + value: function () { + for (var e = !0, t = 0; t < this.tracks.length; t++) + e = e && this.tracks[t].validate(); + return e; + }, + }, + { + key: "optimize", + value: function () { + for (var e = 0; e < this.tracks.length; e++) + this.tracks[e].optimize(); + return this; + }, + }, + { + key: "clone", + value: function () { + for (var e = [], t = 0; t < this.tracks.length; t++) + e.push(this.tracks[t].clone()); + return new this.constructor( + this.name, + this.duration, + e, + this.blendMode + ); + }, + }, + { + key: "toJSON", + value: function () { + return this.constructor.toJSON(this); + }, + }, + ], + [ + { + key: "parse", + value: function (e) { + for ( + var t = [], + n = e.tracks, + r = 1 / (e.fps || 1), + i = 0, + a = n.length; + i !== a; + ++i + ) + t.push(Ed(n[i]).scale(r)); + var o = new this(e.name, e.duration, t, e.blendMode); + return (o.uuid = e.uuid), o; + }, + }, + { + key: "toJSON", + value: function (e) { + for ( + var t = [], + n = e.tracks, + r = { + name: e.name, + duration: e.duration, + tracks: t, + uuid: e.uuid, + blendMode: e.blendMode, + }, + i = 0, + a = n.length; + i !== a; + ++i + ) + t.push(pd.toJSON(n[i])); + return r; + }, + }, + { + key: "CreateFromMorphTargetSequence", + value: function (e, t, n, r) { + for (var i = t.length, a = [], o = 0; o < i; o++) { + var s = [], + l = []; + s.push((o + i - 1) % i, o, (o + 1) % i), l.push(0, 1, 0); + var u = od(s); + (s = sd(s, 1, u)), + (l = sd(l, 1, u)), + r || 0 !== s[0] || (s.push(i), l.push(l[0])), + a.push( + new gd( + ".morphTargetInfluences[" + t[o].name + "]", + s, + l + ).scale(1 / n) + ); + } + return new this(e, -1, a); + }, + }, + { + key: "findByName", + value: function (e, t) { + var n = e; + if (!Array.isArray(e)) { + var r = e; + n = (r.geometry && r.geometry.animations) || r.animations; + } + for (var i = 0; i < n.length; i++) + if (n[i].name === t) return n[i]; + return null; + }, + }, + { + key: "CreateClipsFromMorphTargetSequences", + value: function (e, t, n) { + for ( + var r = {}, i = /^([\w-]*?)([\d]+)$/, a = 0, o = e.length; + a < o; + a++ + ) { + var s = e[a], + l = s.name.match(i); + if (l && l.length > 1) { + var u = l[1], + c = r[u]; + c || (r[u] = c = []), c.push(s); + } + } + var f = []; + for (var d in r) + f.push(this.CreateFromMorphTargetSequence(d, r[d], t, n)); + return f; + }, + }, + { + key: "parseAnimation", + value: function (e, t) { + if (!e) + return ( + console.error( + "THREE.AnimationClip: No animation in JSONLoader data." + ), + null + ); + for ( + var n = function (e, t, n, r, i) { + if (0 !== n.length) { + var a = [], + o = []; + ld(n, a, o, r), + 0 !== a.length && i.push(new e(t, a, o)); + } + }, + r = [], + i = e.name || "default", + a = e.fps || 30, + o = e.blendMode, + s = e.length || -1, + l = e.hierarchy || [], + u = 0; + u < l.length; + u++ + ) { + var c = l[u].keys; + if (c && 0 !== c.length) + if (c[0].morphTargets) { + var f = {}, + d = void 0; + for (d = 0; d < c.length; d++) + if (c[d].morphTargets) + for (var h = 0; h < c[d].morphTargets.length; h++) + f[c[d].morphTargets[h]] = -1; + for (var p in f) { + for ( + var v = [], m = [], g = 0; + g !== c[d].morphTargets.length; + ++g + ) { + var A = c[d]; + v.push(A.time), + m.push(A.morphTarget === p ? 1 : 0); + } + r.push( + new gd(".morphTargetInfluence[" + p + "]", v, m) + ); + } + s = f.length * a; + } else { + var y = ".bones[" + t[u].name + "]"; + n(xd, y + ".position", c, "pos", r), + n(yd, y + ".quaternion", c, "rot", r), + n(xd, y + ".scale", c, "scl", r); + } + } + return 0 === r.length ? null : new this(i, s, r, o); + }, + }, + ] + ), + e + ); + })(); + function Ed(e) { + if (void 0 === e.type) + throw new Error( + "THREE.KeyframeTrack: track type undefined, can not parse" + ); + var t = (function (e) { + switch (e.toLowerCase()) { + case "scalar": + case "double": + case "float": + case "number": + case "integer": + return gd; + case "vector": + case "vector2": + case "vector3": + case "vector4": + return xd; + case "color": + return md; + case "quaternion": + return yd; + case "bool": + case "boolean": + return vd; + case "string": + return bd; + } + throw new Error("THREE.KeyframeTrack: Unsupported typeName: " + e); + })(e.type); + if (void 0 === e.times) { + var n = [], + r = []; + ld(e.keys, n, r, "value"), (e.times = n), (e.values = r); + } + return void 0 !== t.parse + ? t.parse(e) + : new t(e.name, e.times, e.values, e.interpolation); + } + var _d = { + 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 = {}; + }, + }, + Cd = (0, g.Z)(function e(t, n, r) { + (0, m.Z)(this, e); + var i = this, + a = !1, + o = 0, + s = 0, + l = void 0, + u = []; + (this.onStart = void 0), + (this.onLoad = t), + (this.onProgress = n), + (this.onError = r), + (this.itemStart = function (e) { + s++, + !1 === a && void 0 !== i.onStart && i.onStart(e, o, s), + (a = !0); + }), + (this.itemEnd = function (e) { + o++, + void 0 !== i.onProgress && i.onProgress(e, o, s), + o === s && ((a = !1), void 0 !== i.onLoad && i.onLoad()); + }), + (this.itemError = function (e) { + void 0 !== i.onError && i.onError(e); + }), + (this.resolveURL = function (e) { + return l ? l(e) : e; + }), + (this.setURLModifier = function (e) { + return (l = e), this; + }), + (this.addHandler = function (e, t) { + return u.push(e, t), this; + }), + (this.removeHandler = function (e) { + var t = u.indexOf(e); + return -1 !== t && u.splice(t, 2), this; + }), + (this.getHandler = function (e) { + for (var t = 0, n = u.length; t < n; t += 2) { + var r = u[t], + i = u[t + 1]; + if ((r.global && (r.lastIndex = 0), r.test(e))) return i; + } + return null; + }); + }), + wd = new Cd(), + Td = (function () { + function e(t) { + (0, m.Z)(this, e), + (this.manager = void 0 !== t ? t : wd), + (this.crossOrigin = "anonymous"), + (this.withCredentials = !1), + (this.path = ""), + (this.resourcePath = ""), + (this.requestHeader = {}); + } + return ( + (0, g.Z)(e, [ + { key: "load", value: function () {} }, + { + key: "loadAsync", + value: function (e, t) { + var n = this; + return new Promise(function (r, i) { + n.load(e, r, t, i); + }); + }, + }, + { key: "parse", value: function () {} }, + { + key: "setCrossOrigin", + value: function (e) { + return (this.crossOrigin = e), this; + }, + }, + { + key: "setWithCredentials", + value: function (e) { + return (this.withCredentials = e), this; + }, + }, + { + key: "setPath", + value: function (e) { + return (this.path = e), this; + }, + }, + { + key: "setResourcePath", + value: function (e) { + return (this.resourcePath = e), this; + }, + }, + { + key: "setRequestHeader", + value: function (e) { + return (this.requestHeader = e), this; + }, + }, + ]), + e + ); + })(); + Td.DEFAULT_MATERIAL_NAME = "__DEFAULT"; + var Md, + Id = {}, + kd = (function (e) { + (0, d.Z)(n, e); + var t = (0, h.Z)(n); + function n(e, r) { + var i; + return (0, m.Z)(this, n), ((i = t.call(this, e)).response = r), i; + } + return (0, g.Z)(n); + })((0, i.Z)(Error)), + Rd = (function (e) { + (0, d.Z)(n, e); + var t = (0, h.Z)(n); + function n(e) { + return (0, m.Z)(this, n), t.call(this, e); + } + return ( + (0, g.Z)(n, [ + { + key: "load", + value: function (e, t, n, r) { + var i = this; + void 0 === e && (e = ""), + void 0 !== this.path && (e = this.path + e), + (e = this.manager.resolveURL(e)); + var a = _d.get(e); + if (void 0 !== a) + return ( + this.manager.itemStart(e), + setTimeout(function () { + t && t(a), i.manager.itemEnd(e); + }, 0), + a + ); + if (void 0 === Id[e]) { + (Id[e] = []), + Id[e].push({ onLoad: t, onProgress: n, onError: r }); + var o = new Request(e, { + headers: new Headers(this.requestHeader), + credentials: this.withCredentials + ? "include" + : "same-origin", + }), + s = this.mimeType, + l = this.responseType; + fetch(o) + .then(function (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; + var n = Id[e], + r = t.body.getReader(), + i = + t.headers.get("Content-Length") || + t.headers.get("X-File-Size"), + a = i ? parseInt(i) : 0, + o = 0 !== a, + s = 0, + l = new ReadableStream({ + start: function (e) { + !(function t() { + r.read().then(function (r) { + var i = r.done, + l = r.value; + if (i) e.close(); + else { + s += l.byteLength; + for ( + var u = new ProgressEvent( + "progress", + { + lengthComputable: o, + loaded: s, + total: a, + } + ), + c = 0, + f = n.length; + c < f; + c++ + ) { + var d = n[c]; + d.onProgress && d.onProgress(u); + } + e.enqueue(l), t(); + } + }); + })(); + }, + }); + return new Response(l); + } + throw new kd( + 'fetch for "' + .concat(t.url, '" responded with ') + .concat(t.status, ": ") + .concat(t.statusText), + t + ); + }) + .then(function (e) { + switch (l) { + case "arraybuffer": + return e.arrayBuffer(); + case "blob": + return e.blob(); + case "document": + return e.text().then(function (e) { + return new DOMParser().parseFromString(e, s); + }); + case "json": + return e.json(); + default: + if (void 0 === s) return e.text(); + var t = /charset="?([^;"\s]*)"?/i.exec(s), + n = t && t[1] ? t[1].toLowerCase() : void 0, + r = new TextDecoder(n); + return e.arrayBuffer().then(function (e) { + return r.decode(e); + }); + } + }) + .then(function (t) { + _d.add(e, t); + var n = Id[e]; + delete Id[e]; + for (var r = 0, i = n.length; r < i; r++) { + var a = n[r]; + a.onLoad && a.onLoad(t); + } + }) + .catch(function (t) { + var n = Id[e]; + if (void 0 === n) throw (i.manager.itemError(e), t); + delete Id[e]; + for (var r = 0, a = n.length; r < a; r++) { + var o = n[r]; + o.onError && o.onError(t); + } + i.manager.itemError(e); + }) + .finally(function () { + i.manager.itemEnd(e); + }), + this.manager.itemStart(e); + } else Id[e].push({ onLoad: t, onProgress: n, onError: r }); + }, + }, + { + key: "setResponseType", + value: function (e) { + return (this.responseType = e), this; + }, + }, + { + key: "setMimeType", + value: function (e) { + return (this.mimeType = e), this; + }, + }, + ]), + n + ); + })(Td), + Bd = (function (e) { + (0, d.Z)(n, e); + var t = (0, h.Z)(n); + function n(e) { + return (0, m.Z)(this, n), t.call(this, e); + } + return ( + (0, g.Z)(n, [ + { + key: "load", + value: function (e, t, n, r) { + var i = this, + a = new Rd(this.manager); + a.setPath(this.path), + a.setRequestHeader(this.requestHeader), + a.setWithCredentials(this.withCredentials), + a.load( + e, + function (n) { + try { + t(i.parse(JSON.parse(n))); + } catch (a) { + r ? r(a) : console.error(a), i.manager.itemError(e); + } + }, + n, + r + ); + }, + }, + { + key: "parse", + value: function (e) { + for (var t = [], n = 0; n < e.length; n++) { + var r = Sd.parse(e[n]); + t.push(r); + } + return t; + }, + }, + ]), + n + ); + })(Td), + Pd = (function (e) { + (0, d.Z)(n, e); + var t = (0, h.Z)(n); + function n(e) { + return (0, m.Z)(this, n), t.call(this, e); + } + return ( + (0, g.Z)(n, [ + { + key: "load", + value: function (e, t, n, r) { + var i = this, + a = [], + o = new bc(), + s = new Rd(this.manager); + s.setPath(this.path), + s.setResponseType("arraybuffer"), + s.setRequestHeader(this.requestHeader), + s.setWithCredentials(i.withCredentials); + var l = 0; + function u(u) { + s.load( + e[u], + function (e) { + var n = i.parse(e, !0); + (a[u] = { + width: n.width, + height: n.height, + format: n.format, + mipmaps: n.mipmaps, + }), + 6 === (l += 1) && + (1 === n.mipmapCount && (o.minFilter = Be), + (o.image = a), + (o.format = n.format), + (o.needsUpdate = !0), + t && t(o)); + }, + n, + r + ); + } + if (Array.isArray(e)) + for (var c = 0, f = e.length; c < f; ++c) u(c); + else + s.load( + e, + function (e) { + var n = i.parse(e, !0); + if (n.isCubemap) { + for ( + var r = n.mipmaps.length / n.mipmapCount, s = 0; + s < r; + s++ + ) { + a[s] = { mipmaps: [] }; + for (var l = 0; l < n.mipmapCount; l++) + a[s].mipmaps.push( + n.mipmaps[s * n.mipmapCount + l] + ), + (a[s].format = n.format), + (a[s].width = n.width), + (a[s].height = n.height); + } + o.image = a; + } else + (o.image.width = n.width), + (o.image.height = n.height), + (o.mipmaps = n.mipmaps); + 1 === n.mipmapCount && (o.minFilter = Be), + (o.format = n.format), + (o.needsUpdate = !0), + t && t(o); + }, + n, + r + ); + return o; + }, + }, + ]), + n + ); + })(Td), + Ld = (function (e) { + (0, d.Z)(n, e); + var t = (0, h.Z)(n); + function n(e) { + return (0, m.Z)(this, n), t.call(this, e); + } + return ( + (0, g.Z)(n, [ + { + key: "load", + value: function (e, t, n, r) { + void 0 !== this.path && (e = this.path + e), + (e = this.manager.resolveURL(e)); + var i = this, + a = _d.get(e); + if (void 0 !== a) + return ( + i.manager.itemStart(e), + setTimeout(function () { + t && t(a), i.manager.itemEnd(e); + }, 0), + a + ); + var o = Ar("img"); + function s() { + u(), _d.add(e, this), t && t(this), i.manager.itemEnd(e); + } + function l(t) { + u(), + r && r(t), + i.manager.itemError(e), + i.manager.itemEnd(e); + } + function u() { + o.removeEventListener("load", s, !1), + o.removeEventListener("error", l, !1); + } + return ( + o.addEventListener("load", s, !1), + o.addEventListener("error", l, !1), + "data:" !== e.slice(0, 5) && + void 0 !== this.crossOrigin && + (o.crossOrigin = this.crossOrigin), + i.manager.itemStart(e), + (o.src = e), + o + ); + }, + }, + ]), + n + ); + })(Td), + Dd = (function (e) { + (0, d.Z)(n, e); + var t = (0, h.Z)(n); + function n(e) { + return (0, m.Z)(this, n), t.call(this, e); + } + return ( + (0, g.Z)(n, [ + { + key: "load", + value: function (e, t, n, r) { + var i = new mo(); + i.colorSpace = an; + var a = new Ld(this.manager); + a.setCrossOrigin(this.crossOrigin), a.setPath(this.path); + var o = 0; + function s(n) { + a.load( + e[n], + function (e) { + (i.images[n] = e), + 6 === ++o && ((i.needsUpdate = !0), t && t(i)); + }, + void 0, + r + ); + } + for (var l = 0; l < e.length; ++l) s(l); + return i; + }, + }, + ]), + n + ); + })(Td), + Ud = (function (e) { + (0, d.Z)(n, e); + var t = (0, h.Z)(n); + function n(e) { + return (0, m.Z)(this, n), t.call(this, e); + } + return ( + (0, g.Z)(n, [ + { + key: "load", + value: function (e, t, n, r) { + var i = this, + a = new Zu(), + o = new Rd(this.manager); + return ( + o.setResponseType("arraybuffer"), + o.setRequestHeader(this.requestHeader), + o.setPath(this.path), + o.setWithCredentials(i.withCredentials), + o.load( + e, + function (e) { + var n; + try { + n = i.parse(e); + } catch (o) { + if (void 0 === r) return void console.error(o); + r(o); + } + void 0 !== n.image + ? (a.image = n.image) + : void 0 !== n.data && + ((a.image.width = n.width), + (a.image.height = n.height), + (a.image.data = n.data)), + (a.wrapS = void 0 !== n.wrapS ? n.wrapS : Ce), + (a.wrapT = void 0 !== n.wrapT ? n.wrapT : Ce), + (a.magFilter = + void 0 !== n.magFilter ? n.magFilter : Be), + (a.minFilter = + void 0 !== n.minFilter ? n.minFilter : Be), + (a.anisotropy = + void 0 !== n.anisotropy ? n.anisotropy : 1), + void 0 !== n.colorSpace + ? (a.colorSpace = n.colorSpace) + : void 0 !== n.encoding && + (a.encoding = n.encoding), + void 0 !== n.flipY && (a.flipY = n.flipY), + void 0 !== n.format && (a.format = n.format), + void 0 !== n.type && (a.type = n.type), + void 0 !== n.mipmaps && + ((a.mipmaps = n.mipmaps), (a.minFilter = De)), + 1 === n.mipmapCount && (a.minFilter = Be), + void 0 !== n.generateMipmaps && + (a.generateMipmaps = n.generateMipmaps), + (a.needsUpdate = !0), + t && t(a, n); + }, + n, + r + ), + a + ); + }, + }, + ]), + n + ); + })(Td), + Fd = (function (e) { + (0, d.Z)(n, e); + var t = (0, h.Z)(n); + function n(e) { + return (0, m.Z)(this, n), t.call(this, e); + } + return ( + (0, g.Z)(n, [ + { + key: "load", + value: function (e, t, n, r) { + var i = new Dr(), + a = new Ld(this.manager); + return ( + a.setCrossOrigin(this.crossOrigin), + a.setPath(this.path), + a.load( + e, + function (e) { + (i.image = e), + (i.needsUpdate = !0), + void 0 !== t && t(i); + }, + n, + r + ), + i + ); + }, + }, + ]), + n + ); + })(Td), + Od = (function (e) { + (0, d.Z)(n, e); + var t = (0, h.Z)(n); + function n(e) { + var r, + i = + arguments.length > 1 && void 0 !== arguments[1] + ? arguments[1] + : 1; + return ( + (0, m.Z)(this, n), + ((r = t.call(this)).isLight = !0), + (r.type = "Light"), + (r.color = new fa(e)), + (r.intensity = i), + r + ); + } + return ( + (0, g.Z)(n, [ + { key: "dispose", value: function () {} }, + { + key: "copy", + value: function (e, t) { + return ( + (0, l.Z)((0, u.Z)(n.prototype), "copy", this).call( + this, + e, + t + ), + this.color.copy(e.color), + (this.intensity = e.intensity), + this + ); + }, + }, + { + key: "toJSON", + value: function (e) { + var t = (0, l.Z)( + (0, u.Z)(n.prototype), + "toJSON", + this + ).call(this, 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 + ); + }, + }, + ]), + n + ); + })(ji), + Nd = (function (e) { + (0, d.Z)(n, e); + var t = (0, h.Z)(n); + function n(e, r, i) { + var a; + return ( + (0, m.Z)(this, n), + ((a = t.call(this, e, i)).isHemisphereLight = !0), + (a.type = "HemisphereLight"), + a.position.copy(ji.DEFAULT_UP), + a.updateMatrix(), + (a.groundColor = new fa(r)), + a + ); + } + return ( + (0, g.Z)(n, [ + { + key: "copy", + value: function (e, t) { + return ( + (0, l.Z)((0, u.Z)(n.prototype), "copy", this).call( + this, + e, + t + ), + this.groundColor.copy(e.groundColor), + this + ); + }, + }, + ]), + n + ); + })(Od), + Gd = new xi(), + Zd = new Vr(), + zd = new Vr(), + Qd = (function () { + function e(t) { + (0, m.Z)(this, e), + (this.camera = t), + (this.bias = 0), + (this.normalBias = 0), + (this.radius = 1), + (this.blurSamples = 8), + (this.mapSize = new dr(512, 512)), + (this.map = null), + (this.mapPass = null), + (this.matrix = new xi()), + (this.autoUpdate = !0), + (this.needsUpdate = !1), + (this._frustum = new _o()), + (this._frameExtents = new dr(1, 1)), + (this._viewportCount = 1), + (this._viewports = [new Ur(0, 0, 1, 1)]); + } + return ( + (0, g.Z)(e, [ + { + key: "getViewportCount", + value: function () { + return this._viewportCount; + }, + }, + { + key: "getFrustum", + value: function () { + return this._frustum; + }, + }, + { + key: "updateMatrices", + value: function (e) { + var t = this.camera, + n = this.matrix; + Zd.setFromMatrixPosition(e.matrixWorld), + t.position.copy(Zd), + zd.setFromMatrixPosition(e.target.matrixWorld), + t.lookAt(zd), + t.updateMatrixWorld(), + Gd.multiplyMatrices( + t.projectionMatrix, + t.matrixWorldInverse + ), + this._frustum.setFromProjectionMatrix(Gd), + n.set( + 0.5, + 0, + 0, + 0.5, + 0, + 0.5, + 0, + 0.5, + 0, + 0, + 0.5, + 0.5, + 0, + 0, + 0, + 1 + ), + n.multiply(Gd); + }, + }, + { + key: "getViewport", + value: function (e) { + return this._viewports[e]; + }, + }, + { + key: "getFrameExtents", + value: function () { + return this._frameExtents; + }, + }, + { + key: "dispose", + value: function () { + this.map && this.map.dispose(), + this.mapPass && this.mapPass.dispose(); + }, + }, + { + key: "copy", + value: function (e) { + return ( + (this.camera = e.camera.clone()), + (this.bias = e.bias), + (this.radius = e.radius), + this.mapSize.copy(e.mapSize), + this + ); + }, + }, + { + key: "clone", + value: function () { + return new this.constructor().copy(this); + }, + }, + { + key: "toJSON", + value: function () { + var 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 + ); + }, + }, + ]), + e + ); + })(), + Hd = (function (e) { + (0, d.Z)(n, e); + var t = (0, h.Z)(n); + function n() { + var e; + return ( + (0, m.Z)(this, n), + ((e = t.call(this, new ho(50, 1, 0.5, 500))).isSpotLightShadow = + !0), + (e.focus = 1), + e + ); + } + return ( + (0, g.Z)(n, [ + { + key: "updateMatrices", + value: function (e) { + var t = this.camera, + r = 2 * tr * e.angle * this.focus, + i = this.mapSize.width / this.mapSize.height, + a = e.distance || t.far; + (r === t.fov && i === t.aspect && a === t.far) || + ((t.fov = r), + (t.aspect = i), + (t.far = a), + t.updateProjectionMatrix()), + (0, l.Z)( + (0, u.Z)(n.prototype), + "updateMatrices", + this + ).call(this, e); + }, + }, + { + key: "copy", + value: function (e) { + return ( + (0, l.Z)((0, u.Z)(n.prototype), "copy", this).call( + this, + e + ), + (this.focus = e.focus), + this + ); + }, + }, + ]), + n + ); + })(Qd), + Vd = (function (e) { + (0, d.Z)(n, e); + var t = (0, h.Z)(n); + function n(e, r) { + var i, + a = + arguments.length > 2 && void 0 !== arguments[2] + ? arguments[2] + : 0, + o = + arguments.length > 3 && void 0 !== arguments[3] + ? arguments[3] + : Math.PI / 3, + s = + arguments.length > 4 && void 0 !== arguments[4] + ? arguments[4] + : 0, + l = + arguments.length > 5 && void 0 !== arguments[5] + ? arguments[5] + : 2; + return ( + (0, m.Z)(this, n), + ((i = t.call(this, e, r)).isSpotLight = !0), + (i.type = "SpotLight"), + i.position.copy(ji.DEFAULT_UP), + i.updateMatrix(), + (i.target = new ji()), + (i.distance = a), + (i.angle = o), + (i.penumbra = s), + (i.decay = l), + (i.map = null), + (i.shadow = new Hd()), + i + ); + } + return ( + (0, g.Z)(n, [ + { + key: "power", + get: function () { + return this.intensity * Math.PI; + }, + set: function (e) { + this.intensity = e / Math.PI; + }, + }, + { + key: "dispose", + value: function () { + this.shadow.dispose(); + }, + }, + { + key: "copy", + value: function (e, t) { + return ( + (0, l.Z)((0, u.Z)(n.prototype), "copy", this).call( + this, + 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 + ); + }, + }, + ]), + n + ); + })(Od), + jd = new xi(), + Wd = new Vr(), + Xd = new Vr(), + Yd = (function (e) { + (0, d.Z)(n, e); + var t = (0, h.Z)(n); + function n() { + var e; + return ( + (0, m.Z)(this, n), + ((e = t.call( + this, + new ho(90, 1, 0.5, 500) + )).isPointLightShadow = !0), + (e._frameExtents = new dr(4, 2)), + (e._viewportCount = 6), + (e._viewports = [ + new Ur(2, 1, 1, 1), + new Ur(0, 1, 1, 1), + new Ur(3, 1, 1, 1), + new Ur(1, 1, 1, 1), + new Ur(3, 0, 1, 1), + new Ur(1, 0, 1, 1), + ]), + (e._cubeDirections = [ + new Vr(1, 0, 0), + new Vr(-1, 0, 0), + new Vr(0, 0, 1), + new Vr(0, 0, -1), + new Vr(0, 1, 0), + new Vr(0, -1, 0), + ]), + (e._cubeUps = [ + new Vr(0, 1, 0), + new Vr(0, 1, 0), + new Vr(0, 1, 0), + new Vr(0, 1, 0), + new Vr(0, 0, 1), + new Vr(0, 0, -1), + ]), + e + ); + } + return ( + (0, g.Z)(n, [ + { + key: "updateMatrices", + value: function (e) { + var t = + arguments.length > 1 && void 0 !== arguments[1] + ? arguments[1] + : 0, + n = this.camera, + r = this.matrix, + i = e.distance || n.far; + i !== n.far && ((n.far = i), n.updateProjectionMatrix()), + Wd.setFromMatrixPosition(e.matrixWorld), + n.position.copy(Wd), + Xd.copy(n.position), + Xd.add(this._cubeDirections[t]), + n.up.copy(this._cubeUps[t]), + n.lookAt(Xd), + n.updateMatrixWorld(), + r.makeTranslation(-Wd.x, -Wd.y, -Wd.z), + jd.multiplyMatrices( + n.projectionMatrix, + n.matrixWorldInverse + ), + this._frustum.setFromProjectionMatrix(jd); + }, + }, + ]), + n + ); + })(Qd), + qd = (function (e) { + (0, d.Z)(n, e); + var t = (0, h.Z)(n); + function n(e, r) { + var i, + a = + arguments.length > 2 && void 0 !== arguments[2] + ? arguments[2] + : 0, + o = + arguments.length > 3 && void 0 !== arguments[3] + ? arguments[3] + : 2; + return ( + (0, m.Z)(this, n), + ((i = t.call(this, e, r)).isPointLight = !0), + (i.type = "PointLight"), + (i.distance = a), + (i.decay = o), + (i.shadow = new Yd()), + i + ); + } + return ( + (0, g.Z)(n, [ + { + key: "power", + get: function () { + return 4 * this.intensity * Math.PI; + }, + set: function (e) { + this.intensity = e / (4 * Math.PI); + }, + }, + { + key: "dispose", + value: function () { + this.shadow.dispose(); + }, + }, + { + key: "copy", + value: function (e, t) { + return ( + (0, l.Z)((0, u.Z)(n.prototype), "copy", this).call( + this, + e, + t + ), + (this.distance = e.distance), + (this.decay = e.decay), + (this.shadow = e.shadow.clone()), + this + ); + }, + }, + ]), + n + ); + })(Od), + Jd = (function (e) { + (0, d.Z)(n, e); + var t = (0, h.Z)(n); + function n() { + var e; + return ( + (0, m.Z)(this, n), + ((e = t.call( + this, + new Oo(-5, 5, 5, -5, 0.5, 500) + )).isDirectionalLightShadow = !0), + e + ); + } + return (0, g.Z)(n); + })(Qd), + Kd = (function (e) { + (0, d.Z)(n, e); + var t = (0, h.Z)(n); + function n(e, r) { + var i; + return ( + (0, m.Z)(this, n), + ((i = t.call(this, e, r)).isDirectionalLight = !0), + (i.type = "DirectionalLight"), + i.position.copy(ji.DEFAULT_UP), + i.updateMatrix(), + (i.target = new ji()), + (i.shadow = new Jd()), + i + ); + } + return ( + (0, g.Z)(n, [ + { + key: "dispose", + value: function () { + this.shadow.dispose(); + }, + }, + { + key: "copy", + value: function (e) { + return ( + (0, l.Z)((0, u.Z)(n.prototype), "copy", this).call( + this, + e + ), + (this.target = e.target.clone()), + (this.shadow = e.shadow.clone()), + this + ); + }, + }, + ]), + n + ); + })(Od), + $d = (function (e) { + (0, d.Z)(n, e); + var t = (0, h.Z)(n); + function n(e, r) { + var i; + return ( + (0, m.Z)(this, n), + ((i = t.call(this, e, r)).isAmbientLight = !0), + (i.type = "AmbientLight"), + i + ); + } + return (0, g.Z)(n); + })(Od), + eh = (function (e) { + (0, d.Z)(n, e); + var t = (0, h.Z)(n); + function n(e, r) { + var i, + a = + arguments.length > 2 && void 0 !== arguments[2] + ? arguments[2] + : 10, + o = + arguments.length > 3 && void 0 !== arguments[3] + ? arguments[3] + : 10; + return ( + (0, m.Z)(this, n), + ((i = t.call(this, e, r)).isRectAreaLight = !0), + (i.type = "RectAreaLight"), + (i.width = a), + (i.height = o), + i + ); + } + return ( + (0, g.Z)(n, [ + { + key: "power", + get: function () { + return this.intensity * this.width * this.height * Math.PI; + }, + set: function (e) { + this.intensity = e / (this.width * this.height * Math.PI); + }, + }, + { + key: "copy", + value: function (e) { + return ( + (0, l.Z)((0, u.Z)(n.prototype), "copy", this).call( + this, + e + ), + (this.width = e.width), + (this.height = e.height), + this + ); + }, + }, + { + key: "toJSON", + value: function (e) { + var t = (0, l.Z)( + (0, u.Z)(n.prototype), + "toJSON", + this + ).call(this, e); + return ( + (t.object.width = this.width), + (t.object.height = this.height), + t + ); + }, + }, + ]), + n + ); + })(Od), + th = (function () { + function e() { + (0, m.Z)(this, e), + (this.isSphericalHarmonics3 = !0), + (this.coefficients = []); + for (var t = 0; t < 9; t++) this.coefficients.push(new Vr()); + } + return ( + (0, g.Z)( + e, + [ + { + key: "set", + value: function (e) { + for (var t = 0; t < 9; t++) + this.coefficients[t].copy(e[t]); + return this; + }, + }, + { + key: "zero", + value: function () { + for (var e = 0; e < 9; e++) + this.coefficients[e].set(0, 0, 0); + return this; + }, + }, + { + key: "getAt", + value: function (e, t) { + var n = e.x, + r = e.y, + i = e.z, + a = this.coefficients; + return ( + t.copy(a[0]).multiplyScalar(0.282095), + t.addScaledVector(a[1], 0.488603 * r), + t.addScaledVector(a[2], 0.488603 * i), + t.addScaledVector(a[3], 0.488603 * n), + t.addScaledVector(a[4], n * r * 1.092548), + t.addScaledVector(a[5], r * i * 1.092548), + t.addScaledVector(a[6], 0.315392 * (3 * i * i - 1)), + t.addScaledVector(a[7], n * i * 1.092548), + t.addScaledVector(a[8], 0.546274 * (n * n - r * r)), + t + ); + }, + }, + { + key: "getIrradianceAt", + value: function (e, t) { + var n = e.x, + r = e.y, + i = e.z, + a = this.coefficients; + return ( + t.copy(a[0]).multiplyScalar(0.886227), + t.addScaledVector(a[1], 1.023328 * r), + t.addScaledVector(a[2], 1.023328 * i), + t.addScaledVector(a[3], 1.023328 * n), + t.addScaledVector(a[4], 0.858086 * n * r), + t.addScaledVector(a[5], 0.858086 * r * i), + t.addScaledVector(a[6], 0.743125 * i * i - 0.247708), + t.addScaledVector(a[7], 0.858086 * n * i), + t.addScaledVector(a[8], 0.429043 * (n * n - r * r)), + t + ); + }, + }, + { + key: "add", + value: function (e) { + for (var t = 0; t < 9; t++) + this.coefficients[t].add(e.coefficients[t]); + return this; + }, + }, + { + key: "addScaledSH", + value: function (e, t) { + for (var n = 0; n < 9; n++) + this.coefficients[n].addScaledVector( + e.coefficients[n], + t + ); + return this; + }, + }, + { + key: "scale", + value: function (e) { + for (var t = 0; t < 9; t++) + this.coefficients[t].multiplyScalar(e); + return this; + }, + }, + { + key: "lerp", + value: function (e, t) { + for (var n = 0; n < 9; n++) + this.coefficients[n].lerp(e.coefficients[n], t); + return this; + }, + }, + { + key: "equals", + value: function (e) { + for (var t = 0; t < 9; t++) + if (!this.coefficients[t].equals(e.coefficients[t])) + return !1; + return !0; + }, + }, + { + key: "copy", + value: function (e) { + return this.set(e.coefficients); + }, + }, + { + key: "clone", + value: function () { + return new this.constructor().copy(this); + }, + }, + { + key: "fromArray", + value: function (e) { + for ( + var t = + arguments.length > 1 && void 0 !== arguments[1] + ? arguments[1] + : 0, + n = this.coefficients, + r = 0; + r < 9; + r++ + ) + n[r].fromArray(e, t + 3 * r); + return this; + }, + }, + { + key: "toArray", + value: function () { + for ( + var e = + arguments.length > 0 && void 0 !== arguments[0] + ? arguments[0] + : [], + t = + arguments.length > 1 && void 0 !== arguments[1] + ? arguments[1] + : 0, + n = this.coefficients, + r = 0; + r < 9; + r++ + ) + n[r].toArray(e, t + 3 * r); + return e; + }, + }, + ], + [ + { + key: "getBasisAt", + value: function (e, t) { + var n = e.x, + r = e.y, + i = e.z; + (t[0] = 0.282095), + (t[1] = 0.488603 * r), + (t[2] = 0.488603 * i), + (t[3] = 0.488603 * n), + (t[4] = 1.092548 * n * r), + (t[5] = 1.092548 * r * i), + (t[6] = 0.315392 * (3 * i * i - 1)), + (t[7] = 1.092548 * n * i), + (t[8] = 0.546274 * (n * n - r * r)); + }, + }, + ] + ), + e + ); + })(), + nh = (function (e) { + (0, d.Z)(n, e); + var t = (0, h.Z)(n); + function n() { + var e, + r = + arguments.length > 0 && void 0 !== arguments[0] + ? arguments[0] + : new th(), + i = + arguments.length > 1 && void 0 !== arguments[1] + ? arguments[1] + : 1; + return ( + (0, m.Z)(this, n), + ((e = t.call(this, void 0, i)).isLightProbe = !0), + (e.sh = r), + e + ); + } + return ( + (0, g.Z)(n, [ + { + key: "copy", + value: function (e) { + return ( + (0, l.Z)((0, u.Z)(n.prototype), "copy", this).call( + this, + e + ), + this.sh.copy(e.sh), + this + ); + }, + }, + { + key: "fromJSON", + value: function (e) { + return ( + (this.intensity = e.intensity), + this.sh.fromArray(e.sh), + this + ); + }, + }, + { + key: "toJSON", + value: function (e) { + var t = (0, l.Z)( + (0, u.Z)(n.prototype), + "toJSON", + this + ).call(this, e); + return (t.object.sh = this.sh.toArray()), t; + }, + }, + ]), + n + ); + })(Od), + rh = (function (e) { + (0, d.Z)(n, e); + var t = (0, h.Z)(n); + function n(e) { + var r; + return ( + (0, m.Z)(this, n), ((r = t.call(this, e)).textures = {}), r + ); + } + return ( + (0, g.Z)( + n, + [ + { + key: "load", + value: function (e, t, n, r) { + var i = this, + a = new Rd(i.manager); + a.setPath(i.path), + a.setRequestHeader(i.requestHeader), + a.setWithCredentials(i.withCredentials), + a.load( + e, + function (n) { + try { + t(i.parse(JSON.parse(n))); + } catch (a) { + r ? r(a) : console.error(a), + i.manager.itemError(e); + } + }, + n, + r + ); + }, + }, + { + key: "parse", + value: function (e) { + var t = this.textures; + function r(e) { + return ( + void 0 === t[e] && + console.warn( + "THREE.MaterialLoader: Undefined texture", + e + ), + t[e] + ); + } + var i = n.createMaterialFromType(e.type); + if ( + (void 0 !== e.uuid && (i.uuid = e.uuid), + void 0 !== e.name && (i.name = e.name), + void 0 !== e.color && + void 0 !== i.color && + i.color.setHex(e.color), + void 0 !== e.roughness && (i.roughness = e.roughness), + void 0 !== e.metalness && (i.metalness = e.metalness), + void 0 !== e.sheen && (i.sheen = e.sheen), + void 0 !== e.sheenColor && + (i.sheenColor = new fa().setHex(e.sheenColor)), + void 0 !== e.sheenRoughness && + (i.sheenRoughness = e.sheenRoughness), + void 0 !== e.emissive && + void 0 !== i.emissive && + i.emissive.setHex(e.emissive), + void 0 !== e.specular && + void 0 !== i.specular && + i.specular.setHex(e.specular), + void 0 !== e.specularIntensity && + (i.specularIntensity = e.specularIntensity), + void 0 !== e.specularColor && + void 0 !== i.specularColor && + i.specularColor.setHex(e.specularColor), + void 0 !== e.shininess && (i.shininess = e.shininess), + void 0 !== e.clearcoat && (i.clearcoat = e.clearcoat), + void 0 !== e.clearcoatRoughness && + (i.clearcoatRoughness = e.clearcoatRoughness), + void 0 !== e.iridescence && + (i.iridescence = e.iridescence), + void 0 !== e.iridescenceIOR && + (i.iridescenceIOR = e.iridescenceIOR), + void 0 !== e.iridescenceThicknessRange && + (i.iridescenceThicknessRange = + e.iridescenceThicknessRange), + void 0 !== e.transmission && + (i.transmission = e.transmission), + void 0 !== e.thickness && (i.thickness = e.thickness), + void 0 !== e.attenuationDistance && + (i.attenuationDistance = e.attenuationDistance), + void 0 !== e.attenuationColor && + void 0 !== i.attenuationColor && + i.attenuationColor.setHex(e.attenuationColor), + void 0 !== e.anisotropy && + (i.anisotropy = e.anisotropy), + void 0 !== e.anisotropyRotation && + (i.anisotropyRotation = e.anisotropyRotation), + void 0 !== e.fog && (i.fog = e.fog), + void 0 !== e.flatShading && + (i.flatShading = e.flatShading), + void 0 !== e.blending && (i.blending = e.blending), + void 0 !== e.combine && (i.combine = e.combine), + void 0 !== e.side && (i.side = e.side), + void 0 !== e.shadowSide && + (i.shadowSide = e.shadowSide), + void 0 !== e.opacity && (i.opacity = e.opacity), + void 0 !== e.transparent && + (i.transparent = e.transparent), + void 0 !== e.alphaTest && (i.alphaTest = e.alphaTest), + void 0 !== e.alphaHash && (i.alphaHash = e.alphaHash), + void 0 !== e.depthTest && (i.depthTest = e.depthTest), + void 0 !== e.depthWrite && + (i.depthWrite = e.depthWrite), + void 0 !== e.colorWrite && + (i.colorWrite = e.colorWrite), + void 0 !== e.stencilWrite && + (i.stencilWrite = e.stencilWrite), + void 0 !== e.stencilWriteMask && + (i.stencilWriteMask = e.stencilWriteMask), + void 0 !== e.stencilFunc && + (i.stencilFunc = e.stencilFunc), + void 0 !== e.stencilRef && + (i.stencilRef = e.stencilRef), + void 0 !== e.stencilFuncMask && + (i.stencilFuncMask = e.stencilFuncMask), + void 0 !== e.stencilFail && + (i.stencilFail = e.stencilFail), + void 0 !== e.stencilZFail && + (i.stencilZFail = e.stencilZFail), + void 0 !== e.stencilZPass && + (i.stencilZPass = e.stencilZPass), + void 0 !== e.wireframe && (i.wireframe = e.wireframe), + void 0 !== e.wireframeLinewidth && + (i.wireframeLinewidth = e.wireframeLinewidth), + void 0 !== e.wireframeLinecap && + (i.wireframeLinecap = e.wireframeLinecap), + void 0 !== e.wireframeLinejoin && + (i.wireframeLinejoin = e.wireframeLinejoin), + void 0 !== e.rotation && (i.rotation = e.rotation), + void 0 !== e.linewidth && (i.linewidth = e.linewidth), + void 0 !== e.dashSize && (i.dashSize = e.dashSize), + void 0 !== e.gapSize && (i.gapSize = e.gapSize), + void 0 !== e.scale && (i.scale = e.scale), + void 0 !== e.polygonOffset && + (i.polygonOffset = e.polygonOffset), + void 0 !== e.polygonOffsetFactor && + (i.polygonOffsetFactor = e.polygonOffsetFactor), + void 0 !== e.polygonOffsetUnits && + (i.polygonOffsetUnits = e.polygonOffsetUnits), + void 0 !== e.dithering && (i.dithering = e.dithering), + void 0 !== e.alphaToCoverage && + (i.alphaToCoverage = e.alphaToCoverage), + void 0 !== e.premultipliedAlpha && + (i.premultipliedAlpha = e.premultipliedAlpha), + void 0 !== e.forceSinglePass && + (i.forceSinglePass = e.forceSinglePass), + void 0 !== e.visible && (i.visible = e.visible), + void 0 !== e.toneMapped && + (i.toneMapped = e.toneMapped), + void 0 !== e.userData && (i.userData = e.userData), + void 0 !== e.vertexColors && + ("number" === typeof e.vertexColors + ? (i.vertexColors = e.vertexColors > 0) + : (i.vertexColors = e.vertexColors)), + void 0 !== e.uniforms) + ) + for (var a in e.uniforms) { + var o = e.uniforms[a]; + switch (((i.uniforms[a] = {}), o.type)) { + case "t": + i.uniforms[a].value = r(o.value); + break; + case "c": + i.uniforms[a].value = new fa().setHex(o.value); + break; + case "v2": + i.uniforms[a].value = new dr().fromArray(o.value); + break; + case "v3": + i.uniforms[a].value = new Vr().fromArray(o.value); + break; + case "v4": + i.uniforms[a].value = new Ur().fromArray(o.value); + break; + case "m3": + i.uniforms[a].value = new hr().fromArray(o.value); + break; + case "m4": + i.uniforms[a].value = new xi().fromArray(o.value); + break; + default: + i.uniforms[a].value = o.value; + } + } + if ( + (void 0 !== e.defines && (i.defines = e.defines), + void 0 !== e.vertexShader && + (i.vertexShader = e.vertexShader), + void 0 !== e.fragmentShader && + (i.fragmentShader = e.fragmentShader), + void 0 !== e.glslVersion && + (i.glslVersion = e.glslVersion), + void 0 !== e.extensions) + ) + for (var s in e.extensions) + i.extensions[s] = e.extensions[s]; + if ( + (void 0 !== e.lights && (i.lights = e.lights), + void 0 !== e.clipping && (i.clipping = e.clipping), + void 0 !== e.size && (i.size = e.size), + void 0 !== e.sizeAttenuation && + (i.sizeAttenuation = e.sizeAttenuation), + void 0 !== e.map && (i.map = r(e.map)), + void 0 !== e.matcap && (i.matcap = r(e.matcap)), + void 0 !== e.alphaMap && (i.alphaMap = r(e.alphaMap)), + void 0 !== e.bumpMap && (i.bumpMap = r(e.bumpMap)), + void 0 !== e.bumpScale && (i.bumpScale = e.bumpScale), + void 0 !== e.normalMap && + (i.normalMap = r(e.normalMap)), + void 0 !== e.normalMapType && + (i.normalMapType = e.normalMapType), + void 0 !== e.normalScale) + ) { + var l = e.normalScale; + !1 === Array.isArray(l) && (l = [l, l]), + (i.normalScale = new dr().fromArray(l)); + } + return ( + void 0 !== e.displacementMap && + (i.displacementMap = r(e.displacementMap)), + void 0 !== e.displacementScale && + (i.displacementScale = e.displacementScale), + void 0 !== e.displacementBias && + (i.displacementBias = e.displacementBias), + void 0 !== e.roughnessMap && + (i.roughnessMap = r(e.roughnessMap)), + void 0 !== e.metalnessMap && + (i.metalnessMap = r(e.metalnessMap)), + void 0 !== e.emissiveMap && + (i.emissiveMap = r(e.emissiveMap)), + void 0 !== e.emissiveIntensity && + (i.emissiveIntensity = e.emissiveIntensity), + void 0 !== e.specularMap && + (i.specularMap = r(e.specularMap)), + void 0 !== e.specularIntensityMap && + (i.specularIntensityMap = r(e.specularIntensityMap)), + void 0 !== e.specularColorMap && + (i.specularColorMap = r(e.specularColorMap)), + void 0 !== e.envMap && (i.envMap = r(e.envMap)), + void 0 !== e.envMapIntensity && + (i.envMapIntensity = e.envMapIntensity), + void 0 !== e.reflectivity && + (i.reflectivity = e.reflectivity), + void 0 !== e.refractionRatio && + (i.refractionRatio = e.refractionRatio), + void 0 !== e.lightMap && (i.lightMap = r(e.lightMap)), + void 0 !== e.lightMapIntensity && + (i.lightMapIntensity = e.lightMapIntensity), + void 0 !== e.aoMap && (i.aoMap = r(e.aoMap)), + void 0 !== e.aoMapIntensity && + (i.aoMapIntensity = e.aoMapIntensity), + void 0 !== e.gradientMap && + (i.gradientMap = r(e.gradientMap)), + void 0 !== e.clearcoatMap && + (i.clearcoatMap = r(e.clearcoatMap)), + void 0 !== e.clearcoatRoughnessMap && + (i.clearcoatRoughnessMap = r( + e.clearcoatRoughnessMap + )), + void 0 !== e.clearcoatNormalMap && + (i.clearcoatNormalMap = r(e.clearcoatNormalMap)), + void 0 !== e.clearcoatNormalScale && + (i.clearcoatNormalScale = new dr().fromArray( + e.clearcoatNormalScale + )), + void 0 !== e.iridescenceMap && + (i.iridescenceMap = r(e.iridescenceMap)), + void 0 !== e.iridescenceThicknessMap && + (i.iridescenceThicknessMap = r( + e.iridescenceThicknessMap + )), + void 0 !== e.transmissionMap && + (i.transmissionMap = r(e.transmissionMap)), + void 0 !== e.thicknessMap && + (i.thicknessMap = r(e.thicknessMap)), + void 0 !== e.anisotropyMap && + (i.anisotropyMap = r(e.anisotropyMap)), + void 0 !== e.sheenColorMap && + (i.sheenColorMap = r(e.sheenColorMap)), + void 0 !== e.sheenRoughnessMap && + (i.sheenRoughnessMap = r(e.sheenRoughnessMap)), + i + ); + }, + }, + { + key: "setTextures", + value: function (e) { + return (this.textures = e), this; + }, + }, + ], + [ + { + key: "createMaterialFromType", + value: function (e) { + return new { + ShadowMaterial: Xf, + SpriteMaterial: du, + RawShaderMaterial: Yf, + ShaderMaterial: co, + PointsMaterial: fc, + MeshPhysicalMaterial: Jf, + MeshStandardMaterial: qf, + MeshPhongMaterial: Kf, + MeshToonMaterial: $f, + MeshNormalMaterial: ed, + MeshLambertMaterial: td, + MeshDepthMaterial: Ql, + MeshDistanceMaterial: Hl, + MeshBasicMaterial: ha, + MeshMatcapMaterial: nd, + LineDashedMaterial: rd, + LineBasicMaterial: ec, + Material: oa, + }[e](); + }, + }, + ] + ), + n + ); + })(Td), + ih = (function () { + function e() { + (0, m.Z)(this, e); + } + return ( + (0, g.Z)(e, null, [ + { + key: "decodeText", + value: function (e) { + if ("undefined" !== typeof TextDecoder) + return new TextDecoder().decode(e); + for (var t = "", n = 0, r = e.length; n < r; n++) + t += String.fromCharCode(e[n]); + try { + return decodeURIComponent(escape(t)); + } catch (i) { + return t; + } + }, + }, + { + key: "extractUrlBase", + value: function (e) { + var t = e.lastIndexOf("/"); + return -1 === t ? "./" : e.slice(0, t + 1); + }, + }, + { + key: "resolveURL", + value: function (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); + }, + }, + ]), + e + ); + })(), + ah = (function (e) { + (0, d.Z)(n, e); + var t = (0, h.Z)(n); + function n() { + var e; + return ( + (0, m.Z)(this, n), + ((e = t.call(this)).isInstancedBufferGeometry = !0), + (e.type = "InstancedBufferGeometry"), + (e.instanceCount = 1 / 0), + e + ); + } + return ( + (0, g.Z)(n, [ + { + key: "copy", + value: function (e) { + return ( + (0, l.Z)((0, u.Z)(n.prototype), "copy", this).call( + this, + e + ), + (this.instanceCount = e.instanceCount), + this + ); + }, + }, + { + key: "toJSON", + value: function () { + var e = (0, l.Z)( + (0, u.Z)(n.prototype), + "toJSON", + this + ).call(this); + return ( + (e.instanceCount = this.instanceCount), + (e.isInstancedBufferGeometry = !0), + e + ); + }, + }, + ]), + n + ); + })(Na), + oh = (function (e) { + (0, d.Z)(n, e); + var t = (0, h.Z)(n); + function n(e) { + return (0, m.Z)(this, n), t.call(this, e); + } + return ( + (0, g.Z)(n, [ + { + key: "load", + value: function (e, t, n, r) { + var i = this, + a = new Rd(i.manager); + a.setPath(i.path), + a.setRequestHeader(i.requestHeader), + a.setWithCredentials(i.withCredentials), + a.load( + e, + function (n) { + try { + t(i.parse(JSON.parse(n))); + } catch (a) { + r ? r(a) : console.error(a), i.manager.itemError(e); + } + }, + n, + r + ); + }, + }, + { + key: "parse", + value: function (e) { + var t = {}, + n = {}; + function r(e, r) { + if (void 0 !== t[r]) return t[r]; + var i = e.interleavedBuffers[r], + a = (function (e, t) { + if (void 0 !== n[t]) return n[t]; + var r = e.arrayBuffers, + i = r[t], + a = new Uint32Array(i).buffer; + return (n[t] = a), a; + })(e, i.buffer), + o = gr(i.type, a), + s = new uu(o, i.stride); + return (s.uuid = i.uuid), (t[r] = s), s; + } + var i = e.isInstancedBufferGeometry ? new ah() : new Na(), + a = e.data.index; + if (void 0 !== a) { + var o = gr(a.type, a.array); + i.setIndex(new xa(o, 1)); + } + var s = e.data.attributes; + for (var l in s) { + var u = s[l], + c = void 0; + if (u.isInterleavedBufferAttribute) { + var f = r(e.data, u.data); + c = new fu(f, u.itemSize, u.offset, u.normalized); + } else { + var d = gr(u.type, u.array); + c = new (u.isInstancedBufferAttribute ? Vu : xa)( + d, + u.itemSize, + u.normalized + ); + } + void 0 !== u.name && (c.name = u.name), + void 0 !== u.usage && c.setUsage(u.usage), + void 0 !== u.updateRange && + ((c.updateRange.offset = u.updateRange.offset), + (c.updateRange.count = u.updateRange.count)), + i.setAttribute(l, c); + } + var h = e.data.morphAttributes; + if (h) + for (var p in h) { + for ( + var v = h[p], m = [], g = 0, A = v.length; + g < A; + g++ + ) { + var y = v[g], + b = void 0; + if (y.isInterleavedBufferAttribute) { + var x = r(e.data, y.data); + b = new fu(x, y.itemSize, y.offset, y.normalized); + } else { + var S = gr(y.type, y.array); + b = new xa(S, y.itemSize, y.normalized); + } + void 0 !== y.name && (b.name = y.name), m.push(b); + } + i.morphAttributes[p] = m; + } + e.data.morphTargetsRelative && + (i.morphTargetsRelative = !0); + var E = e.data.groups || e.data.drawcalls || e.data.offsets; + if (void 0 !== E) + for (var _ = 0, C = E.length; _ !== C; ++_) { + var w = E[_]; + i.addGroup(w.start, w.count, w.materialIndex); + } + var T = e.data.boundingSphere; + if (void 0 !== T) { + var M = new Vr(); + void 0 !== T.center && M.fromArray(T.center), + (i.boundingSphere = new di(M, T.radius)); + } + return ( + e.name && (i.name = e.name), + e.userData && (i.userData = e.userData), + i + ); + }, + }, + ]), + n + ); + })(Td), + sh = (function (e) { + (0, d.Z)(n, e); + var t = (0, h.Z)(n); + function n(e) { + return (0, m.Z)(this, n), t.call(this, e); + } + return ( + (0, g.Z)(n, [ + { + key: "load", + value: function (e, t, n, r) { + var i = this, + a = "" === this.path ? ih.extractUrlBase(e) : this.path; + this.resourcePath = this.resourcePath || a; + var o = new Rd(this.manager); + o.setPath(this.path), + o.setRequestHeader(this.requestHeader), + o.setWithCredentials(this.withCredentials), + o.load( + e, + function (n) { + var a = null; + try { + a = JSON.parse(n); + } catch (s) { + return ( + void 0 !== r && r(s), + void console.error( + "THREE:ObjectLoader: Can't parse " + e + ".", + s.message + ) + ); + } + var o = a.metadata; + if ( + void 0 === o || + void 0 === o.type || + "geometry" === o.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(a, t); + }, + n, + r + ); + }, + }, + { + key: "loadAsync", + value: (function () { + var e = (0, a.Z)( + (0, v.Z)().mark(function e(t, n) { + var r, i, a, o, s, l; + return (0, v.Z)().wrap( + function (e) { + for (;;) + switch ((e.prev = e.next)) { + case 0: + return ( + (r = this), + (i = + "" === this.path + ? ih.extractUrlBase(t) + : this.path), + (this.resourcePath = + this.resourcePath || i), + (a = new Rd(this.manager)).setPath( + this.path + ), + a.setRequestHeader(this.requestHeader), + a.setWithCredentials(this.withCredentials), + (e.next = 9), + a.loadAsync(t, n) + ); + case 9: + if ( + ((o = e.sent), + (s = JSON.parse(o)), + void 0 !== (l = s.metadata) && + void 0 !== l.type && + "geometry" !== l.type.toLowerCase()) + ) { + e.next = 14; + break; + } + throw new Error( + "THREE.ObjectLoader: Can't load " + t + ); + case 14: + return (e.next = 16), r.parseAsync(s); + case 16: + return e.abrupt("return", e.sent); + case 17: + case "end": + return e.stop(); + } + }, + e, + this + ); + }) + ); + return function (t, n) { + return e.apply(this, arguments); + }; + })(), + }, + { + key: "parse", + value: function (e, t) { + var n = this.parseAnimations(e.animations), + r = this.parseShapes(e.shapes), + i = this.parseGeometries(e.geometries, r), + a = this.parseImages(e.images, function () { + void 0 !== t && t(l); + }), + o = this.parseTextures(e.textures, a), + s = this.parseMaterials(e.materials, o), + l = this.parseObject(e.object, i, s, o, n), + u = this.parseSkeletons(e.skeletons, l); + if ((this.bindSkeletons(l, u), void 0 !== t)) { + var c = !1; + for (var f in a) + if (a[f].data instanceof HTMLImageElement) { + c = !0; + break; + } + !1 === c && t(l); + } + return l; + }, + }, + { + key: "parseAsync", + value: (function () { + var e = (0, a.Z)( + (0, v.Z)().mark(function e(t) { + var n, r, i, a, o, s, l, u; + return (0, v.Z)().wrap( + function (e) { + for (;;) + switch ((e.prev = e.next)) { + case 0: + return ( + (n = this.parseAnimations(t.animations)), + (r = this.parseShapes(t.shapes)), + (i = this.parseGeometries(t.geometries, r)), + (e.next = 5), + this.parseImagesAsync(t.images) + ); + case 5: + return ( + (a = e.sent), + (o = this.parseTextures(t.textures, a)), + (s = this.parseMaterials(t.materials, o)), + (l = this.parseObject( + t.object, + i, + s, + o, + n + )), + (u = this.parseSkeletons(t.skeletons, l)), + this.bindSkeletons(l, u), + e.abrupt("return", l) + ); + case 12: + case "end": + return e.stop(); + } + }, + e, + this + ); + }) + ); + return function (t) { + return e.apply(this, arguments); + }; + })(), + }, + { + key: "parseShapes", + value: function (e) { + var t = {}; + if (void 0 !== e) + for (var n = 0, r = e.length; n < r; n++) { + var i = new af().fromJSON(e[n]); + t[i.uuid] = i; + } + return t; + }, + }, + { + key: "parseSkeletons", + value: function (e, t) { + var n = {}, + r = {}; + if ( + (t.traverse(function (e) { + e.isBone && (r[e.uuid] = e); + }), + void 0 !== e) + ) + for (var i = 0, a = e.length; i < a; i++) { + var o = new Hu().fromJSON(e[i], r); + n[o.uuid] = o; + } + return n; + }, + }, + { + key: "parseGeometries", + value: function (e, t) { + var n = {}; + if (void 0 !== e) + for (var r = new oh(), i = 0, a = e.length; i < a; i++) { + var o = void 0, + s = e[i]; + switch (s.type) { + case "BufferGeometry": + case "InstancedBufferGeometry": + o = r.parse(s); + break; + default: + s.type in Wf + ? (o = Wf[s.type].fromJSON(s, t)) + : console.warn( + 'THREE.ObjectLoader: Unsupported geometry type "'.concat( + s.type, + '"' + ) + ); + } + (o.uuid = s.uuid), + void 0 !== s.name && (o.name = s.name), + void 0 !== s.userData && (o.userData = s.userData), + (n[s.uuid] = o); + } + return n; + }, + }, + { + key: "parseMaterials", + value: function (e, t) { + var n = {}, + r = {}; + if (void 0 !== e) { + var i = new rh(); + i.setTextures(t); + for (var a = 0, o = e.length; a < o; a++) { + var s = e[a]; + void 0 === n[s.uuid] && (n[s.uuid] = i.parse(s)), + (r[s.uuid] = n[s.uuid]); + } + } + return r; + }, + }, + { + key: "parseAnimations", + value: function (e) { + var t = {}; + if (void 0 !== e) + for (var n = 0; n < e.length; n++) { + var r = e[n], + i = Sd.parse(r); + t[i.uuid] = i; + } + return t; + }, + }, + { + key: "parseImages", + value: function (e, t) { + var n, + r = this, + i = {}; + function a(e) { + if ("string" === typeof e) { + var t = e; + return (function (e) { + return ( + r.manager.itemStart(e), + n.load( + e, + function () { + r.manager.itemEnd(e); + }, + void 0, + function () { + r.manager.itemError(e), r.manager.itemEnd(e); + } + ) + ); + })( + /^(\/\/)|([a-z]+:(\/\/)?)/i.test(t) + ? t + : r.resourcePath + t + ); + } + return e.data + ? { + data: gr(e.type, e.data), + width: e.width, + height: e.height, + } + : null; + } + if (void 0 !== e && e.length > 0) { + var o = new Cd(t); + (n = new Ld(o)).setCrossOrigin(this.crossOrigin); + for (var s = 0, l = e.length; s < l; s++) { + var u = e[s], + c = u.url; + if (Array.isArray(c)) { + for (var f = [], d = 0, h = c.length; d < h; d++) { + var p = a(c[d]); + null !== p && + (p instanceof HTMLImageElement + ? f.push(p) + : f.push(new Zu(p.data, p.width, p.height))); + } + i[u.uuid] = new Br(f); + } else { + var v = a(u.url); + i[u.uuid] = new Br(v); + } + } + } + return i; + }, + }, + { + key: "parseImagesAsync", + value: (function () { + var e = (0, a.Z)( + (0, v.Z)().mark(function e(t) { + var n, r, i, o, s, l, u, c, f, d, h, p, m, g, A; + return (0, v.Z)().wrap( + function (e) { + for (;;) + switch ((e.prev = e.next)) { + case 0: + if ( + ((s = function () { + return ( + (s = (0, a.Z)( + (0, v.Z)().mark(function e(t) { + var r, a; + return (0, v.Z)().wrap(function ( + e + ) { + for (;;) + switch ((e.prev = e.next)) { + case 0: + if ("string" !== typeof t) { + e.next = 8; + break; + } + return ( + (a = + /^(\/\/)|([a-z]+:(\/\/)?)/i.test( + (r = t) + ) + ? r + : n.resourcePath + r), + (e.next = 5), + i.loadAsync(a) + ); + case 5: + return e.abrupt( + "return", + e.sent + ); + case 8: + if (!t.data) { + e.next = 12; + break; + } + return e.abrupt("return", { + data: gr(t.type, t.data), + width: t.width, + height: t.height, + }); + case 12: + return e.abrupt( + "return", + null + ); + case 13: + case "end": + return e.stop(); + } + }, + e); + }) + )), + s.apply(this, arguments) + ); + }), + (o = function (e) { + return s.apply(this, arguments); + }), + (n = this), + (r = {}), + !(void 0 !== t && t.length > 0)) + ) { + e.next = 33; + break; + } + (i = new Ld(this.manager)).setCrossOrigin( + this.crossOrigin + ), + (l = 0), + (u = t.length); + case 8: + if (!(l < u)) { + e.next = 33; + break; + } + if ( + ((c = t[l]), (f = c.url), !Array.isArray(f)) + ) { + e.next = 26; + break; + } + (d = []), (h = 0), (p = f.length); + case 14: + if (!(h < p)) { + e.next = 23; + break; + } + return (m = f[h]), (e.next = 18), o(m); + case 18: + null !== (g = e.sent) && + (g instanceof HTMLImageElement + ? d.push(g) + : d.push( + new Zu(g.data, g.width, g.height) + )); + case 20: + h++, (e.next = 14); + break; + case 23: + (r[c.uuid] = new Br(d)), (e.next = 30); + break; + case 26: + return (e.next = 28), o(c.url); + case 28: + (A = e.sent), (r[c.uuid] = new Br(A)); + case 30: + l++, (e.next = 8); + break; + case 33: + return e.abrupt("return", r); + case 34: + case "end": + return e.stop(); + } + }, + e, + this + ); + }) + ); + return function (t) { + return e.apply(this, arguments); + }; + })(), + }, + { + key: "parseTextures", + value: function (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]); + } + var r = {}; + if (void 0 !== e) + for (var i = 0, a = e.length; i < a; i++) { + var o = e[i]; + void 0 === o.image && + console.warn( + 'THREE.ObjectLoader: No "image" specified for', + o.uuid + ), + void 0 === t[o.image] && + console.warn( + "THREE.ObjectLoader: Undefined image", + o.image + ); + var s = t[o.image], + l = s.data, + u = void 0; + Array.isArray(l) + ? ((u = new mo()), + 6 === l.length && (u.needsUpdate = !0)) + : ((u = l && l.data ? new Zu() : new Dr()), + l && (u.needsUpdate = !0)), + (u.source = s), + (u.uuid = o.uuid), + void 0 !== o.name && (u.name = o.name), + void 0 !== o.mapping && + (u.mapping = n(o.mapping, lh)), + void 0 !== o.channel && (u.channel = o.channel), + void 0 !== o.offset && u.offset.fromArray(o.offset), + void 0 !== o.repeat && u.repeat.fromArray(o.repeat), + void 0 !== o.center && u.center.fromArray(o.center), + void 0 !== o.rotation && (u.rotation = o.rotation), + void 0 !== o.wrap && + ((u.wrapS = n(o.wrap[0], uh)), + (u.wrapT = n(o.wrap[1], uh))), + void 0 !== o.format && (u.format = o.format), + void 0 !== o.internalFormat && + (u.internalFormat = o.internalFormat), + void 0 !== o.type && (u.type = o.type), + void 0 !== o.colorSpace && + (u.colorSpace = o.colorSpace), + void 0 !== o.encoding && (u.encoding = o.encoding), + void 0 !== o.minFilter && + (u.minFilter = n(o.minFilter, ch)), + void 0 !== o.magFilter && + (u.magFilter = n(o.magFilter, ch)), + void 0 !== o.anisotropy && + (u.anisotropy = o.anisotropy), + void 0 !== o.flipY && (u.flipY = o.flipY), + void 0 !== o.generateMipmaps && + (u.generateMipmaps = o.generateMipmaps), + void 0 !== o.premultiplyAlpha && + (u.premultiplyAlpha = o.premultiplyAlpha), + void 0 !== o.unpackAlignment && + (u.unpackAlignment = o.unpackAlignment), + void 0 !== o.compareFunction && + (u.compareFunction = o.compareFunction), + void 0 !== o.userData && (u.userData = o.userData), + (r[o.uuid] = u); + } + return r; + }, + }, + { + key: "parseObject", + value: function (e, t, n, r, i) { + var a, o, s; + function l(e) { + return ( + void 0 === t[e] && + console.warn( + "THREE.ObjectLoader: Undefined geometry", + e + ), + t[e] + ); + } + function u(e) { + if (void 0 !== e) { + if (Array.isArray(e)) { + for (var t = [], r = 0, i = e.length; r < i; r++) { + var a = e[r]; + void 0 === n[a] && + console.warn( + "THREE.ObjectLoader: Undefined material", + a + ), + t.push(n[a]); + } + return t; + } + return ( + void 0 === n[e] && + console.warn( + "THREE.ObjectLoader: Undefined material", + e + ), + n[e] + ); + } + } + function c(e) { + return ( + void 0 === r[e] && + console.warn( + "THREE.ObjectLoader: Undefined texture", + e + ), + r[e] + ); + } + switch (e.type) { + case "Scene": + (a = new lu()), + void 0 !== e.background && + (Number.isInteger(e.background) + ? (a.background = new fa(e.background)) + : (a.background = c(e.background))), + void 0 !== e.environment && + (a.environment = c(e.environment)), + void 0 !== e.fog && + ("Fog" === e.fog.type + ? (a.fog = new su( + e.fog.color, + e.fog.near, + e.fog.far + )) + : "FogExp2" === e.fog.type && + (a.fog = new ou(e.fog.color, e.fog.density)), + "" !== e.fog.name && (a.fog.name = e.fog.name)), + void 0 !== e.backgroundBlurriness && + (a.backgroundBlurriness = e.backgroundBlurriness), + void 0 !== e.backgroundIntensity && + (a.backgroundIntensity = e.backgroundIntensity); + break; + case "PerspectiveCamera": + (a = new ho(e.fov, e.aspect, e.near, e.far)), + void 0 !== e.focus && (a.focus = e.focus), + void 0 !== e.zoom && (a.zoom = e.zoom), + void 0 !== e.filmGauge && (a.filmGauge = e.filmGauge), + void 0 !== e.filmOffset && + (a.filmOffset = e.filmOffset), + void 0 !== e.view && + (a.view = Object.assign({}, e.view)); + break; + case "OrthographicCamera": + (a = new Oo( + e.left, + e.right, + e.top, + e.bottom, + e.near, + e.far + )), + void 0 !== e.zoom && (a.zoom = e.zoom), + void 0 !== e.view && + (a.view = Object.assign({}, e.view)); + break; + case "AmbientLight": + a = new $d(e.color, e.intensity); + break; + case "DirectionalLight": + a = new Kd(e.color, e.intensity); + break; + case "PointLight": + a = new qd(e.color, e.intensity, e.distance, e.decay); + break; + case "RectAreaLight": + a = new eh(e.color, e.intensity, e.width, e.height); + break; + case "SpotLight": + a = new Vd( + e.color, + e.intensity, + e.distance, + e.angle, + e.penumbra, + e.decay + ); + break; + case "HemisphereLight": + a = new Nd(e.color, e.groundColor, e.intensity); + break; + case "LightProbe": + a = new nh().fromJSON(e); + break; + case "SkinnedMesh": + (o = l(e.geometry)), + (s = u(e.material)), + (a = new Nu(o, s)), + void 0 !== e.bindMode && (a.bindMode = e.bindMode), + void 0 !== e.bindMatrix && + a.bindMatrix.fromArray(e.bindMatrix), + void 0 !== e.skeleton && (a.skeleton = e.skeleton); + break; + case "Mesh": + (o = l(e.geometry)), + (s = u(e.material)), + (a = new ro(o, s)); + break; + case "InstancedMesh": + (o = l(e.geometry)), (s = u(e.material)); + var f = e.count, + d = e.instanceMatrix, + h = e.instanceColor; + ((a = new $u(o, s, f)).instanceMatrix = new Vu( + new Float32Array(d.array), + 16 + )), + void 0 !== h && + (a.instanceColor = new Vu( + new Float32Array(h.array), + h.itemSize + )); + break; + case "LOD": + a = new Iu(); + break; + case "Line": + a = new oc(l(e.geometry), u(e.material)); + break; + case "LineLoop": + a = new cc(l(e.geometry), u(e.material)); + break; + case "LineSegments": + a = new uc(l(e.geometry), u(e.material)); + break; + case "PointCloud": + case "Points": + a = new mc(l(e.geometry), u(e.material)); + break; + case "Sprite": + a = new Cu(u(e.material)); + break; + case "Group": + a = new ql(); + break; + case "Bone": + a = new Gu(); + break; + default: + a = new ji(); + } + if ( + ((a.uuid = e.uuid), + void 0 !== e.name && (a.name = e.name), + void 0 !== e.matrix + ? (a.matrix.fromArray(e.matrix), + void 0 !== e.matrixAutoUpdate && + (a.matrixAutoUpdate = e.matrixAutoUpdate), + a.matrixAutoUpdate && + a.matrix.decompose( + a.position, + a.quaternion, + a.scale + )) + : (void 0 !== e.position && + a.position.fromArray(e.position), + void 0 !== e.rotation && + a.rotation.fromArray(e.rotation), + void 0 !== e.quaternion && + a.quaternion.fromArray(e.quaternion), + void 0 !== e.scale && a.scale.fromArray(e.scale)), + void 0 !== e.up && a.up.fromArray(e.up), + void 0 !== e.castShadow && (a.castShadow = e.castShadow), + void 0 !== e.receiveShadow && + (a.receiveShadow = e.receiveShadow), + e.shadow && + (void 0 !== e.shadow.bias && + (a.shadow.bias = e.shadow.bias), + void 0 !== e.shadow.normalBias && + (a.shadow.normalBias = e.shadow.normalBias), + void 0 !== e.shadow.radius && + (a.shadow.radius = e.shadow.radius), + void 0 !== e.shadow.mapSize && + a.shadow.mapSize.fromArray(e.shadow.mapSize), + void 0 !== e.shadow.camera && + (a.shadow.camera = this.parseObject( + e.shadow.camera + ))), + void 0 !== e.visible && (a.visible = e.visible), + void 0 !== e.frustumCulled && + (a.frustumCulled = e.frustumCulled), + void 0 !== e.renderOrder && + (a.renderOrder = e.renderOrder), + void 0 !== e.userData && (a.userData = e.userData), + void 0 !== e.layers && (a.layers.mask = e.layers), + void 0 !== e.children) + ) + for (var p = e.children, v = 0; v < p.length; v++) + a.add(this.parseObject(p[v], t, n, r, i)); + if (void 0 !== e.animations) + for (var m = e.animations, g = 0; g < m.length; g++) { + var A = m[g]; + a.animations.push(i[A]); + } + if ("LOD" === e.type) { + void 0 !== e.autoUpdate && (a.autoUpdate = e.autoUpdate); + for (var y = e.levels, b = 0; b < y.length; b++) { + var x = y[b], + S = a.getObjectByProperty("uuid", x.object); + void 0 !== S && a.addLevel(S, x.distance, x.hysteresis); + } + } + return a; + }, + }, + { + key: "bindSkeletons", + value: function (e, t) { + 0 !== Object.keys(t).length && + e.traverse(function (e) { + if (!0 === e.isSkinnedMesh && void 0 !== e.skeleton) { + var n = t[e.skeleton]; + void 0 === n + ? console.warn( + "THREE.ObjectLoader: No skeleton found with UUID:", + e.skeleton + ) + : e.bind(n, e.bindMatrix); + } + }); + }, + }, + ]), + n + ); + })(Td), + lh = { + UVMapping: Ae, + CubeReflectionMapping: ye, + CubeRefractionMapping: be, + EquirectangularReflectionMapping: xe, + EquirectangularRefractionMapping: Se, + CubeUVReflectionMapping: Ee, + }, + uh = { + RepeatWrapping: _e, + ClampToEdgeWrapping: Ce, + MirroredRepeatWrapping: we, + }, + ch = { + NearestFilter: Te, + NearestMipmapNearestFilter: Me, + NearestMipmapLinearFilter: ke, + LinearFilter: Be, + LinearMipmapNearestFilter: Pe, + LinearMipmapLinearFilter: De, + }, + fh = (function (e) { + (0, d.Z)(n, e); + var t = (0, h.Z)(n); + function n(e) { + var r; + return ( + (0, m.Z)(this, n), + ((r = t.call(this, e)).isImageBitmapLoader = !0), + "undefined" === typeof createImageBitmap && + console.warn( + "THREE.ImageBitmapLoader: createImageBitmap() not supported." + ), + "undefined" === typeof fetch && + console.warn( + "THREE.ImageBitmapLoader: fetch() not supported." + ), + (r.options = { premultiplyAlpha: "none" }), + r + ); + } + return ( + (0, g.Z)(n, [ + { + key: "setOptions", + value: function (e) { + return (this.options = e), this; + }, + }, + { + key: "load", + value: function (e, t, n, r) { + void 0 === e && (e = ""), + void 0 !== this.path && (e = this.path + e), + (e = this.manager.resolveURL(e)); + var i = this, + a = _d.get(e); + if (void 0 !== a) + return ( + i.manager.itemStart(e), + setTimeout(function () { + t && t(a), i.manager.itemEnd(e); + }, 0), + a + ); + var o = {}; + (o.credentials = + "anonymous" === this.crossOrigin + ? "same-origin" + : "include"), + (o.headers = this.requestHeader), + fetch(e, o) + .then(function (e) { + return e.blob(); + }) + .then(function (e) { + return createImageBitmap( + e, + Object.assign(i.options, { + colorSpaceConversion: "none", + }) + ); + }) + .then(function (n) { + _d.add(e, n), t && t(n), i.manager.itemEnd(e); + }) + .catch(function (t) { + r && r(t), + i.manager.itemError(e), + i.manager.itemEnd(e); + }), + i.manager.itemStart(e); + }, + }, + ]), + n + ); + })(Td), + dh = (function () { + function e() { + (0, m.Z)(this, e); + } + return ( + (0, g.Z)(e, null, [ + { + key: "getContext", + value: function () { + return ( + void 0 === Md && + (Md = new (window.AudioContext || + window.webkitAudioContext)()), + Md + ); + }, + }, + { + key: "setContext", + value: function (e) { + Md = e; + }, + }, + ]), + e + ); + })(), + hh = (function (e) { + (0, d.Z)(n, e); + var t = (0, h.Z)(n); + function n(e) { + return (0, m.Z)(this, n), t.call(this, e); + } + return ( + (0, g.Z)(n, [ + { + key: "load", + value: function (e, t, n, r) { + var i = this, + a = new Rd(this.manager); + function o(t) { + r ? r(t) : console.error(t), i.manager.itemError(e); + } + a.setResponseType("arraybuffer"), + a.setPath(this.path), + a.setRequestHeader(this.requestHeader), + a.setWithCredentials(this.withCredentials), + a.load( + e, + function (e) { + try { + var n = e.slice(0); + dh.getContext().decodeAudioData( + n, + function (e) { + t(e); + }, + o + ); + } catch (r) { + o(r); + } + }, + n, + r + ); + }, + }, + ]), + n + ); + })(Td), + ph = new xi(), + vh = new xi(), + mh = new xi(), + gh = (function () { + function e() { + (0, m.Z)(this, e), + (this.type = "StereoCamera"), + (this.aspect = 1), + (this.eyeSep = 0.064), + (this.cameraL = new ho()), + this.cameraL.layers.enable(1), + (this.cameraL.matrixAutoUpdate = !1), + (this.cameraR = new ho()), + 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, + }); + } + return ( + (0, g.Z)(e, [ + { + key: "update", + value: function (e) { + var 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), + mh.copy(e.projectionMatrix); + var n, + r, + i = t.eyeSep / 2, + a = (i * t.near) / t.focus, + o = (t.near * Math.tan(er * t.fov * 0.5)) / t.zoom; + (vh.elements[12] = -i), + (ph.elements[12] = i), + (n = -o * t.aspect + a), + (r = o * t.aspect + a), + (mh.elements[0] = (2 * t.near) / (r - n)), + (mh.elements[8] = (r + n) / (r - n)), + this.cameraL.projectionMatrix.copy(mh), + (n = -o * t.aspect - a), + (r = o * t.aspect - a), + (mh.elements[0] = (2 * t.near) / (r - n)), + (mh.elements[8] = (r + n) / (r - n)), + this.cameraR.projectionMatrix.copy(mh); + } + this.cameraL.matrixWorld.copy(e.matrixWorld).multiply(vh), + this.cameraR.matrixWorld.copy(e.matrixWorld).multiply(ph); + }, + }, + ]), + e + ); + })(), + Ah = (function () { + function e() { + var t = + !(arguments.length > 0 && void 0 !== arguments[0]) || + arguments[0]; + (0, m.Z)(this, e), + (this.autoStart = t), + (this.startTime = 0), + (this.oldTime = 0), + (this.elapsedTime = 0), + (this.running = !1); + } + return ( + (0, g.Z)(e, [ + { + key: "start", + value: function () { + (this.startTime = yh()), + (this.oldTime = this.startTime), + (this.elapsedTime = 0), + (this.running = !0); + }, + }, + { + key: "stop", + value: function () { + this.getElapsedTime(), + (this.running = !1), + (this.autoStart = !1); + }, + }, + { + key: "getElapsedTime", + value: function () { + return this.getDelta(), this.elapsedTime; + }, + }, + { + key: "getDelta", + value: function () { + var e = 0; + if (this.autoStart && !this.running) return this.start(), 0; + if (this.running) { + var t = yh(); + (e = (t - this.oldTime) / 1e3), + (this.oldTime = t), + (this.elapsedTime += e); + } + return e; + }, + }, + ]), + e + ); + })(); + function yh() { + return ( + "undefined" === typeof performance ? Date : performance + ).now(); + } + var bh = new Vr(), + xh = new Hr(), + Sh = new Vr(), + Eh = new Vr(), + _h = (function (e) { + (0, d.Z)(n, e); + var t = (0, h.Z)(n); + function n() { + var e; + return ( + (0, m.Z)(this, n), + ((e = t.call(this)).type = "AudioListener"), + (e.context = dh.getContext()), + (e.gain = e.context.createGain()), + e.gain.connect(e.context.destination), + (e.filter = null), + (e.timeDelta = 0), + (e._clock = new Ah()), + e + ); + } + return ( + (0, g.Z)(n, [ + { + key: "getInput", + value: function () { + return this.gain; + }, + }, + { + key: "removeFilter", + value: function () { + 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 + ); + }, + }, + { + key: "getFilter", + value: function () { + return this.filter; + }, + }, + { + key: "setFilter", + value: function (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 + ); + }, + }, + { + key: "getMasterVolume", + value: function () { + return this.gain.gain.value; + }, + }, + { + key: "setMasterVolume", + value: function (e) { + return ( + this.gain.gain.setTargetAtTime( + e, + this.context.currentTime, + 0.01 + ), + this + ); + }, + }, + { + key: "updateMatrixWorld", + value: function (e) { + (0, l.Z)( + (0, u.Z)(n.prototype), + "updateMatrixWorld", + this + ).call(this, e); + var t = this.context.listener, + r = this.up; + if ( + ((this.timeDelta = this._clock.getDelta()), + this.matrixWorld.decompose(bh, xh, Sh), + Eh.set(0, 0, -1).applyQuaternion(xh), + t.positionX) + ) { + var i = this.context.currentTime + this.timeDelta; + t.positionX.linearRampToValueAtTime(bh.x, i), + t.positionY.linearRampToValueAtTime(bh.y, i), + t.positionZ.linearRampToValueAtTime(bh.z, i), + t.forwardX.linearRampToValueAtTime(Eh.x, i), + t.forwardY.linearRampToValueAtTime(Eh.y, i), + t.forwardZ.linearRampToValueAtTime(Eh.z, i), + t.upX.linearRampToValueAtTime(r.x, i), + t.upY.linearRampToValueAtTime(r.y, i), + t.upZ.linearRampToValueAtTime(r.z, i); + } else + t.setPosition(bh.x, bh.y, bh.z), + t.setOrientation(Eh.x, Eh.y, Eh.z, r.x, r.y, r.z); + }, + }, + ]), + n + ); + })(ji), + Ch = (function (e) { + (0, d.Z)(n, e); + var t = (0, h.Z)(n); + function n(e) { + var r; + return ( + (0, m.Z)(this, n), + ((r = t.call(this)).type = "Audio"), + (r.listener = e), + (r.context = e.context), + (r.gain = r.context.createGain()), + r.gain.connect(e.getInput()), + (r.autoplay = !1), + (r.buffer = null), + (r.detune = 0), + (r.loop = !1), + (r.loopStart = 0), + (r.loopEnd = 0), + (r.offset = 0), + (r.duration = void 0), + (r.playbackRate = 1), + (r.isPlaying = !1), + (r.hasPlaybackControl = !0), + (r.source = null), + (r.sourceType = "empty"), + (r._startedAt = 0), + (r._progress = 0), + (r._connected = !1), + (r.filters = []), + r + ); + } + return ( + (0, g.Z)(n, [ + { + key: "getOutput", + value: function () { + return this.gain; + }, + }, + { + key: "setNodeSource", + value: function (e) { + return ( + (this.hasPlaybackControl = !1), + (this.sourceType = "audioNode"), + (this.source = e), + this.connect(), + this + ); + }, + }, + { + key: "setMediaElementSource", + value: function (e) { + return ( + (this.hasPlaybackControl = !1), + (this.sourceType = "mediaNode"), + (this.source = this.context.createMediaElementSource(e)), + this.connect(), + this + ); + }, + }, + { + key: "setMediaStreamSource", + value: function (e) { + return ( + (this.hasPlaybackControl = !1), + (this.sourceType = "mediaStreamNode"), + (this.source = this.context.createMediaStreamSource(e)), + this.connect(), + this + ); + }, + }, + { + key: "setBuffer", + value: function (e) { + return ( + (this.buffer = e), + (this.sourceType = "buffer"), + this.autoplay && this.play(), + this + ); + }, + }, + { + key: "play", + value: function () { + var e = + arguments.length > 0 && void 0 !== arguments[0] + ? arguments[0] + : 0; + if (!0 !== this.isPlaying) { + if (!1 !== this.hasPlaybackControl) { + this._startedAt = this.context.currentTime + e; + var 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() + ); + } + console.warn( + "THREE.Audio: this Audio has no playback control." + ); + } else + console.warn("THREE.Audio: Audio is already playing."); + }, + }, + { + key: "pause", + value: function () { + 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." + ); + }, + }, + { + key: "stop", + value: function () { + 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." + ); + }, + }, + { + key: "connect", + value: function () { + if (this.filters.length > 0) { + this.source.connect(this.filters[0]); + for (var 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; + }, + }, + { + key: "disconnect", + value: function () { + if (!1 !== this._connected) { + if (this.filters.length > 0) { + this.source.disconnect(this.filters[0]); + for (var 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; + } + }, + }, + { + key: "getFilters", + value: function () { + return this.filters; + }, + }, + { + key: "setFilters", + value: function (e) { + return ( + e || (e = []), + !0 === this._connected + ? (this.disconnect(), + (this.filters = e.slice()), + this.connect()) + : (this.filters = e.slice()), + this + ); + }, + }, + { + key: "setDetune", + value: function (e) { + if (((this.detune = e), void 0 !== this.source.detune)) + return ( + !0 === this.isPlaying && + this.source.detune.setTargetAtTime( + this.detune, + this.context.currentTime, + 0.01 + ), + this + ); + }, + }, + { + key: "getDetune", + value: function () { + return this.detune; + }, + }, + { + key: "getFilter", + value: function () { + return this.getFilters()[0]; + }, + }, + { + key: "setFilter", + value: function (e) { + return this.setFilters(e ? [e] : []); + }, + }, + { + key: "setPlaybackRate", + value: function (e) { + if (!1 !== this.hasPlaybackControl) + return ( + (this.playbackRate = e), + !0 === this.isPlaying && + this.source.playbackRate.setTargetAtTime( + this.playbackRate, + this.context.currentTime, + 0.01 + ), + this + ); + console.warn( + "THREE.Audio: this Audio has no playback control." + ); + }, + }, + { + key: "getPlaybackRate", + value: function () { + return this.playbackRate; + }, + }, + { + key: "onEnded", + value: function () { + this.isPlaying = !1; + }, + }, + { + key: "getLoop", + value: function () { + return !1 === this.hasPlaybackControl + ? (console.warn( + "THREE.Audio: this Audio has no playback control." + ), + !1) + : this.loop; + }, + }, + { + key: "setLoop", + value: function (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." + ); + }, + }, + { + key: "setLoopStart", + value: function (e) { + return (this.loopStart = e), this; + }, + }, + { + key: "setLoopEnd", + value: function (e) { + return (this.loopEnd = e), this; + }, + }, + { + key: "getVolume", + value: function () { + return this.gain.gain.value; + }, + }, + { + key: "setVolume", + value: function (e) { + return ( + this.gain.gain.setTargetAtTime( + e, + this.context.currentTime, + 0.01 + ), + this + ); + }, + }, + ]), + n + ); + })(ji), + wh = new Vr(), + Th = new Hr(), + Mh = new Vr(), + Ih = new Vr(), + kh = (function (e) { + (0, d.Z)(n, e); + var t = (0, h.Z)(n); + function n(e) { + var r; + return ( + (0, m.Z)(this, n), + ((r = t.call(this, e)).panner = r.context.createPanner()), + (r.panner.panningModel = "HRTF"), + r.panner.connect(r.gain), + r + ); + } + return ( + (0, g.Z)(n, [ + { + key: "connect", + value: function () { + (0, l.Z)((0, u.Z)(n.prototype), "connect", this).call(this), + this.panner.connect(this.gain); + }, + }, + { + key: "disconnect", + value: function () { + (0, l.Z)((0, u.Z)(n.prototype), "disconnect", this).call( + this + ), + this.panner.disconnect(this.gain); + }, + }, + { + key: "getOutput", + value: function () { + return this.panner; + }, + }, + { + key: "getRefDistance", + value: function () { + return this.panner.refDistance; + }, + }, + { + key: "setRefDistance", + value: function (e) { + return (this.panner.refDistance = e), this; + }, + }, + { + key: "getRolloffFactor", + value: function () { + return this.panner.rolloffFactor; + }, + }, + { + key: "setRolloffFactor", + value: function (e) { + return (this.panner.rolloffFactor = e), this; + }, + }, + { + key: "getDistanceModel", + value: function () { + return this.panner.distanceModel; + }, + }, + { + key: "setDistanceModel", + value: function (e) { + return (this.panner.distanceModel = e), this; + }, + }, + { + key: "getMaxDistance", + value: function () { + return this.panner.maxDistance; + }, + }, + { + key: "setMaxDistance", + value: function (e) { + return (this.panner.maxDistance = e), this; + }, + }, + { + key: "setDirectionalCone", + value: function (e, t, n) { + return ( + (this.panner.coneInnerAngle = e), + (this.panner.coneOuterAngle = t), + (this.panner.coneOuterGain = n), + this + ); + }, + }, + { + key: "updateMatrixWorld", + value: function (e) { + if ( + ((0, l.Z)( + (0, u.Z)(n.prototype), + "updateMatrixWorld", + this + ).call(this, e), + !0 !== this.hasPlaybackControl || !1 !== this.isPlaying) + ) { + this.matrixWorld.decompose(wh, Th, Mh), + Ih.set(0, 0, 1).applyQuaternion(Th); + var t = this.panner; + if (t.positionX) { + var r = + this.context.currentTime + this.listener.timeDelta; + t.positionX.linearRampToValueAtTime(wh.x, r), + t.positionY.linearRampToValueAtTime(wh.y, r), + t.positionZ.linearRampToValueAtTime(wh.z, r), + t.orientationX.linearRampToValueAtTime(Ih.x, r), + t.orientationY.linearRampToValueAtTime(Ih.y, r), + t.orientationZ.linearRampToValueAtTime(Ih.z, r); + } else + t.setPosition(wh.x, wh.y, wh.z), + t.setOrientation(Ih.x, Ih.y, Ih.z); + } + }, + }, + ]), + n + ); + })(Ch), + Rh = (function () { + function e(t) { + var n = + arguments.length > 1 && void 0 !== arguments[1] + ? arguments[1] + : 2048; + (0, m.Z)(this, e), + (this.analyser = t.context.createAnalyser()), + (this.analyser.fftSize = n), + (this.data = new Uint8Array(this.analyser.frequencyBinCount)), + t.getOutput().connect(this.analyser); + } + return ( + (0, g.Z)(e, [ + { + key: "getFrequencyData", + value: function () { + return ( + this.analyser.getByteFrequencyData(this.data), this.data + ); + }, + }, + { + key: "getAverageFrequency", + value: function () { + for ( + var e = 0, t = this.getFrequencyData(), n = 0; + n < t.length; + n++ + ) + e += t[n]; + return e / t.length; + }, + }, + ]), + e + ); + })(), + Bh = (function () { + function e(t, n, r) { + var i, a, o; + switch ( + ((0, m.Z)(this, e), (this.binding = t), (this.valueSize = r), n) + ) { + case "quaternion": + (i = this._slerp), + (a = this._slerpAdditive), + (o = this._setAdditiveIdentityQuaternion), + (this.buffer = new Float64Array(6 * r)), + (this._workIndex = 5); + break; + case "string": + case "bool": + (i = this._select), + (a = this._select), + (o = this._setAdditiveIdentityOther), + (this.buffer = new Array(5 * r)); + break; + default: + (i = this._lerp), + (a = this._lerpAdditive), + (o = this._setAdditiveIdentityNumeric), + (this.buffer = new Float64Array(5 * r)); + } + (this._mixBufferRegion = i), + (this._mixBufferRegionAdditive = a), + (this._setIdentity = o), + (this._origIndex = 3), + (this._addIndex = 4), + (this.cumulativeWeight = 0), + (this.cumulativeWeightAdditive = 0), + (this.useCount = 0), + (this.referenceCount = 0); + } + return ( + (0, g.Z)(e, [ + { + key: "accumulate", + value: function (e, t) { + var n = this.buffer, + r = this.valueSize, + i = e * r + r, + a = this.cumulativeWeight; + if (0 === a) { + for (var o = 0; o !== r; ++o) n[i + o] = n[o]; + a = t; + } else { + var s = t / (a += t); + this._mixBufferRegion(n, i, 0, s, r); + } + this.cumulativeWeight = a; + }, + }, + { + key: "accumulateAdditive", + value: function (e) { + var 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); + }, + }, + { + key: "apply", + value: function (e) { + var t = this.valueSize, + n = this.buffer, + r = e * t + t, + i = this.cumulativeWeight, + a = this.cumulativeWeightAdditive, + o = this.binding; + if ( + ((this.cumulativeWeight = 0), + (this.cumulativeWeightAdditive = 0), + i < 1) + ) { + var s = t * this._origIndex; + this._mixBufferRegion(n, r, s, 1 - i, t); + } + a > 0 && + this._mixBufferRegionAdditive( + n, + r, + this._addIndex * t, + 1, + t + ); + for (var l = t, u = t + t; l !== u; ++l) + if (n[l] !== n[l + t]) { + o.setValue(n, r); + break; + } + }, + }, + { + key: "saveOriginalState", + value: function () { + var e = this.binding, + t = this.buffer, + n = this.valueSize, + r = n * this._origIndex; + e.getValue(t, r); + for (var i = n, a = r; i !== a; ++i) t[i] = t[r + (i % n)]; + this._setIdentity(), + (this.cumulativeWeight = 0), + (this.cumulativeWeightAdditive = 0); + }, + }, + { + key: "restoreOriginalState", + value: function () { + var e = 3 * this.valueSize; + this.binding.setValue(this.buffer, e); + }, + }, + { + key: "_setAdditiveIdentityNumeric", + value: function () { + for ( + var e = this._addIndex * this.valueSize, + t = e + this.valueSize, + n = e; + n < t; + n++ + ) + this.buffer[n] = 0; + }, + }, + { + key: "_setAdditiveIdentityQuaternion", + value: function () { + this._setAdditiveIdentityNumeric(), + (this.buffer[this._addIndex * this.valueSize + 3] = 1); + }, + }, + { + key: "_setAdditiveIdentityOther", + value: function () { + for ( + var e = this._origIndex * this.valueSize, + t = this._addIndex * this.valueSize, + n = 0; + n < this.valueSize; + n++ + ) + this.buffer[t + n] = this.buffer[e + n]; + }, + }, + { + key: "_select", + value: function (e, t, n, r, i) { + if (r >= 0.5) + for (var a = 0; a !== i; ++a) e[t + a] = e[n + a]; + }, + }, + { + key: "_slerp", + value: function (e, t, n, r) { + Hr.slerpFlat(e, t, e, t, e, n, r); + }, + }, + { + key: "_slerpAdditive", + value: function (e, t, n, r, i) { + var a = this._workIndex * i; + Hr.multiplyQuaternionsFlat(e, a, e, t, e, n), + Hr.slerpFlat(e, t, e, t, e, a, r); + }, + }, + { + key: "_lerp", + value: function (e, t, n, r, i) { + for (var a = 1 - r, o = 0; o !== i; ++o) { + var s = t + o; + e[s] = e[s] * a + e[n + o] * r; + } + }, + }, + { + key: "_lerpAdditive", + value: function (e, t, n, r, i) { + for (var a = 0; a !== i; ++a) { + var o = t + a; + e[o] = e[o] + e[n + a] * r; + } + }, + }, + ]), + e + ); + })(), + Ph = "\\[\\]\\.:\\/", + Lh = new RegExp("[" + Ph + "]", "g"), + Dh = "[^" + Ph + "]", + Uh = "[^" + Ph.replace("\\.", "") + "]", + Fh = new RegExp( + "^" + + /((?:WC+[\/:])*)/.source.replace("WC", Dh) + + /(WCOD+)?/.source.replace("WCOD", Uh) + + /(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC", Dh) + + /\.(WC+)(?:\[(.+)\])?/.source.replace("WC", Dh) + + "$" + ), + Oh = ["material", "materials", "bones", "map"], + Nh = (function () { + function e(t, n, r) { + (0, m.Z)(this, e); + var i = r || Gh.parseTrackName(n); + (this._targetGroup = t), (this._bindings = t.subscribe_(n, i)); + } + return ( + (0, g.Z)(e, [ + { + key: "getValue", + value: function (e, t) { + this.bind(); + var n = this._targetGroup.nCachedObjects_, + r = this._bindings[n]; + void 0 !== r && r.getValue(e, t); + }, + }, + { + key: "setValue", + value: function (e, t) { + for ( + var n = this._bindings, + r = this._targetGroup.nCachedObjects_, + i = n.length; + r !== i; + ++r + ) + n[r].setValue(e, t); + }, + }, + { + key: "bind", + value: function () { + for ( + var e = this._bindings, + t = this._targetGroup.nCachedObjects_, + n = e.length; + t !== n; + ++t + ) + e[t].bind(); + }, + }, + { + key: "unbind", + value: function () { + for ( + var e = this._bindings, + t = this._targetGroup.nCachedObjects_, + n = e.length; + t !== n; + ++t + ) + e[t].unbind(); + }, + }, + ]), + e + ); + })(), + Gh = (function () { + function e(t, n, r) { + (0, m.Z)(this, e), + (this.path = n), + (this.parsedPath = r || e.parseTrackName(n)), + (this.node = e.findNode(t, this.parsedPath.nodeName)), + (this.rootNode = t), + (this.getValue = this._getValue_unbound), + (this.setValue = this._setValue_unbound); + } + return ( + (0, g.Z)( + e, + [ + { key: "_getValue_unavailable", value: function () {} }, + { key: "_setValue_unavailable", value: function () {} }, + { + key: "_getValue_direct", + value: function (e, t) { + e[t] = this.targetObject[this.propertyName]; + }, + }, + { + key: "_getValue_array", + value: function (e, t) { + for ( + var n = this.resolvedProperty, r = 0, i = n.length; + r !== i; + ++r + ) + e[t++] = n[r]; + }, + }, + { + key: "_getValue_arrayElement", + value: function (e, t) { + e[t] = this.resolvedProperty[this.propertyIndex]; + }, + }, + { + key: "_getValue_toArray", + value: function (e, t) { + this.resolvedProperty.toArray(e, t); + }, + }, + { + key: "_setValue_direct", + value: function (e, t) { + this.targetObject[this.propertyName] = e[t]; + }, + }, + { + key: "_setValue_direct_setNeedsUpdate", + value: function (e, t) { + (this.targetObject[this.propertyName] = e[t]), + (this.targetObject.needsUpdate = !0); + }, + }, + { + key: "_setValue_direct_setMatrixWorldNeedsUpdate", + value: function (e, t) { + (this.targetObject[this.propertyName] = e[t]), + (this.targetObject.matrixWorldNeedsUpdate = !0); + }, + }, + { + key: "_setValue_array", + value: function (e, t) { + for ( + var n = this.resolvedProperty, r = 0, i = n.length; + r !== i; + ++r + ) + n[r] = e[t++]; + }, + }, + { + key: "_setValue_array_setNeedsUpdate", + value: function (e, t) { + for ( + var n = this.resolvedProperty, r = 0, i = n.length; + r !== i; + ++r + ) + n[r] = e[t++]; + this.targetObject.needsUpdate = !0; + }, + }, + { + key: "_setValue_array_setMatrixWorldNeedsUpdate", + value: function (e, t) { + for ( + var n = this.resolvedProperty, r = 0, i = n.length; + r !== i; + ++r + ) + n[r] = e[t++]; + this.targetObject.matrixWorldNeedsUpdate = !0; + }, + }, + { + key: "_setValue_arrayElement", + value: function (e, t) { + this.resolvedProperty[this.propertyIndex] = e[t]; + }, + }, + { + key: "_setValue_arrayElement_setNeedsUpdate", + value: function (e, t) { + (this.resolvedProperty[this.propertyIndex] = e[t]), + (this.targetObject.needsUpdate = !0); + }, + }, + { + key: "_setValue_arrayElement_setMatrixWorldNeedsUpdate", + value: function (e, t) { + (this.resolvedProperty[this.propertyIndex] = e[t]), + (this.targetObject.matrixWorldNeedsUpdate = !0); + }, + }, + { + key: "_setValue_fromArray", + value: function (e, t) { + this.resolvedProperty.fromArray(e, t); + }, + }, + { + key: "_setValue_fromArray_setNeedsUpdate", + value: function (e, t) { + this.resolvedProperty.fromArray(e, t), + (this.targetObject.needsUpdate = !0); + }, + }, + { + key: "_setValue_fromArray_setMatrixWorldNeedsUpdate", + value: function (e, t) { + this.resolvedProperty.fromArray(e, t), + (this.targetObject.matrixWorldNeedsUpdate = !0); + }, + }, + { + key: "_getValue_unbound", + value: function (e, t) { + this.bind(), this.getValue(e, t); + }, + }, + { + key: "_setValue_unbound", + value: function (e, t) { + this.bind(), this.setValue(e, t); + }, + }, + { + key: "bind", + value: function () { + var t = this.node, + n = this.parsedPath, + r = n.objectName, + i = n.propertyName, + a = n.propertyIndex; + if ( + (t || + ((t = e.findNode(this.rootNode, n.nodeName)), + (this.node = t)), + (this.getValue = this._getValue_unavailable), + (this.setValue = this._setValue_unavailable), + t) + ) { + if (r) { + var o = n.objectIndex; + switch (r) { + case "materials": + if (!t.material) + return void console.error( + "THREE.PropertyBinding: Can not bind to material as node does not have a material.", + this + ); + if (!t.material.materials) + return void console.error( + "THREE.PropertyBinding: Can not bind to material.materials as node.material does not have a materials array.", + this + ); + t = t.material.materials; + break; + case "bones": + if (!t.skeleton) + return void console.error( + "THREE.PropertyBinding: Can not bind to bones as node does not have a skeleton.", + this + ); + t = t.skeleton.bones; + for (var s = 0; s < t.length; s++) + if (t[s].name === o) { + o = s; + break; + } + break; + case "map": + if ("map" in t) { + t = t.map; + break; + } + if (!t.material) + return void console.error( + "THREE.PropertyBinding: Can not bind to material as node does not have a material.", + this + ); + if (!t.material.map) + return void console.error( + "THREE.PropertyBinding: Can not bind to material.map as node.material does not have a map.", + this + ); + t = t.material.map; + break; + default: + if (void 0 === t[r]) + return void console.error( + "THREE.PropertyBinding: Can not bind to objectName of node undefined.", + this + ); + t = t[r]; + } + if (void 0 !== o) { + if (void 0 === t[o]) + return void console.error( + "THREE.PropertyBinding: Trying to bind to objectIndex of objectName, but is undefined.", + this, + t + ); + t = t[o]; + } + } + var l = t[i]; + if (void 0 !== l) { + var u = this.Versioning.None; + (this.targetObject = t), + void 0 !== t.needsUpdate + ? (u = this.Versioning.NeedsUpdate) + : void 0 !== t.matrixWorldNeedsUpdate && + (u = this.Versioning.MatrixWorldNeedsUpdate); + var c = this.BindingType.Direct; + if (void 0 !== a) { + if ("morphTargetInfluences" === i) { + if (!t.geometry) + return void console.error( + "THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.", + this + ); + if (!t.geometry.morphAttributes) + return void console.error( + "THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.morphAttributes.", + this + ); + void 0 !== t.morphTargetDictionary[a] && + (a = t.morphTargetDictionary[a]); + } + (c = this.BindingType.ArrayElement), + (this.resolvedProperty = l), + (this.propertyIndex = a); + } else + void 0 !== l.fromArray && void 0 !== l.toArray + ? ((c = this.BindingType.HasFromToArray), + (this.resolvedProperty = l)) + : Array.isArray(l) + ? ((c = this.BindingType.EntireArray), + (this.resolvedProperty = l)) + : (this.propertyName = i); + (this.getValue = this.GetterByBindingType[c]), + (this.setValue = + this.SetterByBindingTypeAndVersioning[c][u]); + } else { + var f = n.nodeName; + console.error( + "THREE.PropertyBinding: Trying to update property for track: " + + f + + "." + + i + + " but it wasn't found.", + t + ); + } + } else + console.warn( + "THREE.PropertyBinding: No target node found for track: " + + this.path + + "." + ); + }, + }, + { + key: "unbind", + value: function () { + (this.node = null), + (this.getValue = this._getValue_unbound), + (this.setValue = this._setValue_unbound); + }, + }, + ], + [ + { + key: "create", + value: function (t, n, r) { + return t && t.isAnimationObjectGroup + ? new e.Composite(t, n, r) + : new e(t, n, r); + }, + }, + { + key: "sanitizeNodeName", + value: function (e) { + return e.replace(/\s/g, "_").replace(Lh, ""); + }, + }, + { + key: "parseTrackName", + value: function (e) { + var t = Fh.exec(e); + if (null === t) + throw new Error( + "PropertyBinding: Cannot parse trackName: " + e + ); + var 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) { + var i = n.nodeName.substring(r + 1); + -1 !== Oh.indexOf(i) && + ((n.nodeName = n.nodeName.substring(0, r)), + (n.objectName = i)); + } + if ( + null === n.propertyName || + 0 === n.propertyName.length + ) + throw new Error( + "PropertyBinding: can not parse propertyName from trackName: " + + e + ); + return n; + }, + }, + { + key: "findNode", + value: function (e, t) { + if ( + void 0 === t || + "" === t || + "." === t || + -1 === t || + t === e.name || + t === e.uuid + ) + return e; + if (e.skeleton) { + var n = e.skeleton.getBoneByName(t); + if (void 0 !== n) return n; + } + if (e.children) { + var r = (function e(n) { + for (var r = 0; r < n.length; r++) { + var i = n[r]; + if (i.name === t || i.uuid === t) return i; + var a = e(i.children); + if (a) return a; + } + return null; + })(e.children); + if (r) return r; + } + return null; + }, + }, + ] + ), + e + ); + })(); + (Gh.Composite = Nh), + (Gh.prototype.BindingType = { + Direct: 0, + EntireArray: 1, + ArrayElement: 2, + HasFromToArray: 3, + }), + (Gh.prototype.Versioning = { + None: 0, + NeedsUpdate: 1, + MatrixWorldNeedsUpdate: 2, + }), + (Gh.prototype.GetterByBindingType = [ + Gh.prototype._getValue_direct, + Gh.prototype._getValue_array, + Gh.prototype._getValue_arrayElement, + Gh.prototype._getValue_toArray, + ]), + (Gh.prototype.SetterByBindingTypeAndVersioning = [ + [ + Gh.prototype._setValue_direct, + Gh.prototype._setValue_direct_setNeedsUpdate, + Gh.prototype._setValue_direct_setMatrixWorldNeedsUpdate, + ], + [ + Gh.prototype._setValue_array, + Gh.prototype._setValue_array_setNeedsUpdate, + Gh.prototype._setValue_array_setMatrixWorldNeedsUpdate, + ], + [ + Gh.prototype._setValue_arrayElement, + Gh.prototype._setValue_arrayElement_setNeedsUpdate, + Gh.prototype._setValue_arrayElement_setMatrixWorldNeedsUpdate, + ], + [ + Gh.prototype._setValue_fromArray, + Gh.prototype._setValue_fromArray_setNeedsUpdate, + Gh.prototype._setValue_fromArray_setMatrixWorldNeedsUpdate, + ], + ]); + var Zh = (function () { + function e() { + (0, m.Z)(this, e), + (this.isAnimationObjectGroup = !0), + (this.uuid = nr()), + (this._objects = Array.prototype.slice.call(arguments)), + (this.nCachedObjects_ = 0); + var t = {}; + this._indicesByUUID = t; + for (var n = 0, r = arguments.length; n !== r; ++n) + t[arguments[n].uuid] = n; + (this._paths = []), + (this._parsedPaths = []), + (this._bindings = []), + (this._bindingsIndicesByPath = {}); + var i = this; + this.stats = { + objects: { + get total() { + return i._objects.length; + }, + get inUse() { + return this.total - i.nCachedObjects_; + }, + }, + get bindingsPerObject() { + return i._bindings.length; + }, + }; + } + return ( + (0, g.Z)(e, [ + { + key: "add", + value: function () { + for ( + var e = this._objects, + t = this._indicesByUUID, + n = this._paths, + r = this._parsedPaths, + i = this._bindings, + a = i.length, + o = void 0, + s = e.length, + l = this.nCachedObjects_, + u = 0, + c = arguments.length; + u !== c; + ++u + ) { + var f = arguments[u], + d = f.uuid, + h = t[d]; + if (void 0 === h) { + (h = s++), (t[d] = h), e.push(f); + for (var p = 0, v = a; p !== v; ++p) + i[p].push(new Gh(f, n[p], r[p])); + } else if (h < l) { + o = e[h]; + var m = --l, + g = e[m]; + (t[g.uuid] = h), (e[h] = g), (t[d] = m), (e[m] = f); + for (var A = 0, y = a; A !== y; ++A) { + var b = i[A], + x = b[m], + S = b[h]; + (b[h] = x), + void 0 === S && (S = new Gh(f, n[A], r[A])), + (b[m] = S); + } + } else + e[h] !== o && + console.error( + "THREE.AnimationObjectGroup: Different objects with the same UUID detected. Clean the caches or recreate your infrastructure when reloading scenes." + ); + } + this.nCachedObjects_ = l; + }, + }, + { + key: "remove", + value: function () { + for ( + var e = this._objects, + t = this._indicesByUUID, + n = this._bindings, + r = n.length, + i = this.nCachedObjects_, + a = 0, + o = arguments.length; + a !== o; + ++a + ) { + var s = arguments[a], + l = s.uuid, + u = t[l]; + if (void 0 !== u && u >= i) { + var c = i++, + f = e[c]; + (t[f.uuid] = u), (e[u] = f), (t[l] = c), (e[c] = s); + for (var d = 0, h = r; d !== h; ++d) { + var p = n[d], + v = p[c], + m = p[u]; + (p[u] = v), (p[c] = m); + } + } + } + this.nCachedObjects_ = i; + }, + }, + { + key: "uncache", + value: function () { + for ( + var e = this._objects, + t = this._indicesByUUID, + n = this._bindings, + r = n.length, + i = this.nCachedObjects_, + a = e.length, + o = 0, + s = arguments.length; + o !== s; + ++o + ) { + var l = arguments[o].uuid, + u = t[l]; + if (void 0 !== u) + if ((delete t[l], u < i)) { + var c = --i, + f = e[c], + d = --a, + h = e[d]; + (t[f.uuid] = u), + (e[u] = f), + (t[h.uuid] = c), + (e[c] = h), + e.pop(); + for (var p = 0, v = r; p !== v; ++p) { + var m = n[p], + g = m[c], + A = m[d]; + (m[u] = g), (m[c] = A), m.pop(); + } + } else { + var y = --a, + b = e[y]; + y > 0 && (t[b.uuid] = u), (e[u] = b), e.pop(); + for (var x = 0, S = r; x !== S; ++x) { + var E = n[x]; + (E[u] = E[y]), E.pop(); + } + } + } + this.nCachedObjects_ = i; + }, + }, + { + key: "subscribe_", + value: function (e, t) { + var n = this._bindingsIndicesByPath, + r = n[e], + i = this._bindings; + if (void 0 !== r) return i[r]; + var a = this._paths, + o = this._parsedPaths, + s = this._objects, + l = s.length, + u = this.nCachedObjects_, + c = new Array(l); + (r = i.length), (n[e] = r), a.push(e), o.push(t), i.push(c); + for (var f = u, d = s.length; f !== d; ++f) { + var h = s[f]; + c[f] = new Gh(h, e, t); + } + return c; + }, + }, + { + key: "unsubscribe_", + value: function (e) { + var t = this._bindingsIndicesByPath, + n = t[e]; + if (void 0 !== n) { + var r = this._paths, + i = this._parsedPaths, + a = this._bindings, + o = a.length - 1, + s = a[o]; + (t[e[o]] = n), + (a[n] = s), + a.pop(), + (i[n] = i[o]), + i.pop(), + (r[n] = r[o]), + r.pop(); + } + }, + }, + ]), + e + ); + })(), + zh = (function () { + function e(t, n) { + var r = + arguments.length > 2 && void 0 !== arguments[2] + ? arguments[2] + : null, + i = + arguments.length > 3 && void 0 !== arguments[3] + ? arguments[3] + : n.blendMode; + (0, m.Z)(this, e), + (this._mixer = t), + (this._clip = n), + (this._localRoot = r), + (this.blendMode = i); + for ( + var a = n.tracks, + o = a.length, + s = new Array(o), + l = { endingStart: Qt, endingEnd: Qt }, + u = 0; + u !== o; + ++u + ) { + var c = a[u].createInterpolant(null); + (s[u] = c), (c.settings = l); + } + (this._interpolantSettings = l), + (this._interpolants = s), + (this._propertyBindings = new Array(o)), + (this._cacheIndex = null), + (this._byClipCacheIndex = null), + (this._timeScaleInterpolant = null), + (this._weightInterpolant = null), + (this.loop = Ot), + (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); + } + return ( + (0, g.Z)(e, [ + { + key: "play", + value: function () { + return this._mixer._activateAction(this), this; + }, + }, + { + key: "stop", + value: function () { + return this._mixer._deactivateAction(this), this.reset(); + }, + }, + { + key: "reset", + value: function () { + return ( + (this.paused = !1), + (this.enabled = !0), + (this.time = 0), + (this._loopCount = -1), + (this._startTime = null), + this.stopFading().stopWarping() + ); + }, + }, + { + key: "isRunning", + value: function () { + return ( + this.enabled && + !this.paused && + 0 !== this.timeScale && + null === this._startTime && + this._mixer._isActiveAction(this) + ); + }, + }, + { + key: "isScheduled", + value: function () { + return this._mixer._isActiveAction(this); + }, + }, + { + key: "startAt", + value: function (e) { + return (this._startTime = e), this; + }, + }, + { + key: "setLoop", + value: function (e, t) { + return (this.loop = e), (this.repetitions = t), this; + }, + }, + { + key: "setEffectiveWeight", + value: function (e) { + return ( + (this.weight = e), + (this._effectiveWeight = this.enabled ? e : 0), + this.stopFading() + ); + }, + }, + { + key: "getEffectiveWeight", + value: function () { + return this._effectiveWeight; + }, + }, + { + key: "fadeIn", + value: function (e) { + return this._scheduleFading(e, 0, 1); + }, + }, + { + key: "fadeOut", + value: function (e) { + return this._scheduleFading(e, 1, 0); + }, + }, + { + key: "crossFadeFrom", + value: function (e, t, n) { + if ((e.fadeOut(t), this.fadeIn(t), n)) { + var r = this._clip.duration, + i = e._clip.duration, + a = i / r, + o = r / i; + e.warp(1, a, t), this.warp(o, 1, t); + } + return this; + }, + }, + { + key: "crossFadeTo", + value: function (e, t, n) { + return e.crossFadeFrom(this, t, n); + }, + }, + { + key: "stopFading", + value: function () { + var e = this._weightInterpolant; + return ( + null !== e && + ((this._weightInterpolant = null), + this._mixer._takeBackControlInterpolant(e)), + this + ); + }, + }, + { + key: "setEffectiveTimeScale", + value: function (e) { + return ( + (this.timeScale = e), + (this._effectiveTimeScale = this.paused ? 0 : e), + this.stopWarping() + ); + }, + }, + { + key: "getEffectiveTimeScale", + value: function () { + return this._effectiveTimeScale; + }, + }, + { + key: "setDuration", + value: function (e) { + return ( + (this.timeScale = this._clip.duration / e), + this.stopWarping() + ); + }, + }, + { + key: "syncWith", + value: function (e) { + return ( + (this.time = e.time), + (this.timeScale = e.timeScale), + this.stopWarping() + ); + }, + }, + { + key: "halt", + value: function (e) { + return this.warp(this._effectiveTimeScale, 0, e); + }, + }, + { + key: "warp", + value: function (e, t, n) { + var r = this._mixer, + i = r.time, + a = this.timeScale, + o = this._timeScaleInterpolant; + null === o && + ((o = r._lendControlInterpolant()), + (this._timeScaleInterpolant = o)); + var s = o.parameterPositions, + l = o.sampleValues; + return ( + (s[0] = i), + (s[1] = i + n), + (l[0] = e / a), + (l[1] = t / a), + this + ); + }, + }, + { + key: "stopWarping", + value: function () { + var e = this._timeScaleInterpolant; + return ( + null !== e && + ((this._timeScaleInterpolant = null), + this._mixer._takeBackControlInterpolant(e)), + this + ); + }, + }, + { + key: "getMixer", + value: function () { + return this._mixer; + }, + }, + { + key: "getClip", + value: function () { + return this._clip; + }, + }, + { + key: "getRoot", + value: function () { + return this._localRoot || this._mixer._root; + }, + }, + { + key: "_update", + value: function (e, t, n, r) { + if (this.enabled) { + var i = this._startTime; + if (null !== i) { + var a = (e - i) * n; + a < 0 || 0 === n + ? (t = 0) + : ((this._startTime = null), (t = n * a)); + } + t *= this._updateTimeScale(e); + var o = this._updateTime(t), + s = this._updateWeight(e); + if (s > 0) { + var l = this._interpolants, + u = this._propertyBindings; + if (this.blendMode === Wt) + for (var c = 0, f = l.length; c !== f; ++c) + l[c].evaluate(o), u[c].accumulateAdditive(s); + else + for (var d = 0, h = l.length; d !== h; ++d) + l[d].evaluate(o), u[d].accumulate(r, s); + } + } else this._updateWeight(e); + }, + }, + { + key: "_updateWeight", + value: function (e) { + var t = 0; + if (this.enabled) { + t = this.weight; + var n = this._weightInterpolant; + if (null !== n) { + var r = n.evaluate(e)[0]; + (t *= r), + e > n.parameterPositions[1] && + (this.stopFading(), 0 === r && (this.enabled = !1)); + } + } + return (this._effectiveWeight = t), t; + }, + }, + { + key: "_updateTimeScale", + value: function (e) { + var t = 0; + if (!this.paused) { + t = this.timeScale; + var 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; + }, + }, + { + key: "_updateTime", + value: function (e) { + var t = this._clip.duration, + n = this.loop, + r = this.time + e, + i = this._loopCount, + a = n === Nt; + if (0 === e) + return -1 === i ? r : a && 1 === (1 & i) ? t - r : r; + if (n === Ft) { + -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, a)) + : this._setEndings(0 === this.repetitions, !0, a)), + r >= t || r < 0) + ) { + var o = Math.floor(r / t); + (r -= t * o), (i += Math.abs(o)); + var s = this.repetitions - i; + if (s <= 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 === s) { + var l = e < 0; + this._setEndings(l, !l, a); + } else this._setEndings(!1, !1, a); + (this._loopCount = i), + (this.time = r), + this._mixer.dispatchEvent({ + type: "loop", + action: this, + loopDelta: o, + }); + } + } else this.time = r; + if (a && 1 === (1 & i)) return t - r; + } + return r; + }, + }, + { + key: "_setEndings", + value: function (e, t, n) { + var r = this._interpolantSettings; + n + ? ((r.endingStart = Ht), (r.endingEnd = Ht)) + : ((r.endingStart = e + ? this.zeroSlopeAtStart + ? Ht + : Qt + : Vt), + (r.endingEnd = t + ? this.zeroSlopeAtEnd + ? Ht + : Qt + : Vt)); + }, + }, + { + key: "_scheduleFading", + value: function (e, t, n) { + var r = this._mixer, + i = r.time, + a = this._weightInterpolant; + null === a && + ((a = r._lendControlInterpolant()), + (this._weightInterpolant = a)); + var o = a.parameterPositions, + s = a.sampleValues; + return ( + (o[0] = i), (s[0] = t), (o[1] = i + e), (s[1] = n), this + ); + }, + }, + ]), + e + ); + })(), + Qh = new Float32Array(1), + Hh = (function (e) { + (0, d.Z)(n, e); + var t = (0, h.Z)(n); + function n(e) { + var r; + return ( + (0, m.Z)(this, n), + ((r = t.call(this))._root = e), + r._initMemoryManager(), + (r._accuIndex = 0), + (r.time = 0), + (r.timeScale = 1), + r + ); + } + return ( + (0, g.Z)(n, [ + { + key: "_bindAction", + value: function (e, t) { + var n = e._localRoot || this._root, + r = e._clip.tracks, + i = r.length, + a = e._propertyBindings, + o = e._interpolants, + s = n.uuid, + l = this._bindingsByRootAndName, + u = l[s]; + void 0 === u && ((u = {}), (l[s] = u)); + for (var c = 0; c !== i; ++c) { + var f = r[c], + d = f.name, + h = u[d]; + if (void 0 !== h) ++h.referenceCount, (a[c] = h); + else { + if (void 0 !== (h = a[c])) { + null === h._cacheIndex && + (++h.referenceCount, + this._addInactiveBinding(h, s, d)); + continue; + } + var p = t && t._propertyBindings[c].binding.parsedPath; + ++(h = new Bh( + Gh.create(n, d, p), + f.ValueTypeName, + f.getValueSize() + )).referenceCount, + this._addInactiveBinding(h, s, d), + (a[c] = h); + } + o[c].resultBuffer = h.buffer; + } + }, + }, + { + key: "_activateAction", + value: function (e) { + if (!this._isActiveAction(e)) { + if (null === e._cacheIndex) { + var 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); + } + for ( + var i = e._propertyBindings, a = 0, o = i.length; + a !== o; + ++a + ) { + var s = i[a]; + 0 === s.useCount++ && + (this._lendBinding(s), s.saveOriginalState()); + } + this._lendAction(e); + } + }, + }, + { + key: "_deactivateAction", + value: function (e) { + if (this._isActiveAction(e)) { + for ( + var t = e._propertyBindings, n = 0, r = t.length; + n !== r; + ++n + ) { + var i = t[n]; + 0 === --i.useCount && + (i.restoreOriginalState(), this._takeBackBinding(i)); + } + this._takeBackAction(e); + } + }, + }, + { + key: "_initMemoryManager", + value: function () { + (this._actions = []), + (this._nActiveActions = 0), + (this._actionsByClip = {}), + (this._bindings = []), + (this._nActiveBindings = 0), + (this._bindingsByRootAndName = {}), + (this._controlInterpolants = []), + (this._nActiveControlInterpolants = 0); + var 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; + }, + }, + }; + }, + }, + { + key: "_isActiveAction", + value: function (e) { + var t = e._cacheIndex; + return null !== t && t < this._nActiveActions; + }, + }, + { + key: "_addInactiveAction", + value: function (e, t, n) { + var r = this._actions, + i = this._actionsByClip, + a = i[t]; + if (void 0 === a) + (a = { knownActions: [e], actionByRoot: {} }), + (e._byClipCacheIndex = 0), + (i[t] = a); + else { + var o = a.knownActions; + (e._byClipCacheIndex = o.length), o.push(e); + } + (e._cacheIndex = r.length), + r.push(e), + (a.actionByRoot[n] = e); + }, + }, + { + key: "_removeInactiveAction", + value: function (e) { + var t = this._actions, + n = t[t.length - 1], + r = e._cacheIndex; + (n._cacheIndex = r), + (t[r] = n), + t.pop(), + (e._cacheIndex = null); + var i = e._clip.uuid, + a = this._actionsByClip, + o = a[i], + s = o.knownActions, + l = s[s.length - 1], + u = e._byClipCacheIndex; + (l._byClipCacheIndex = u), + (s[u] = l), + s.pop(), + (e._byClipCacheIndex = null), + delete o.actionByRoot[(e._localRoot || this._root).uuid], + 0 === s.length && delete a[i], + this._removeInactiveBindingsForAction(e); + }, + }, + { + key: "_removeInactiveBindingsForAction", + value: function (e) { + for ( + var t = e._propertyBindings, n = 0, r = t.length; + n !== r; + ++n + ) { + var i = t[n]; + 0 === --i.referenceCount && + this._removeInactiveBinding(i); + } + }, + }, + { + key: "_lendAction", + value: function (e) { + var t = this._actions, + n = e._cacheIndex, + r = this._nActiveActions++, + i = t[r]; + (e._cacheIndex = r), + (t[r] = e), + (i._cacheIndex = n), + (t[n] = i); + }, + }, + { + key: "_takeBackAction", + value: function (e) { + var t = this._actions, + n = e._cacheIndex, + r = --this._nActiveActions, + i = t[r]; + (e._cacheIndex = r), + (t[r] = e), + (i._cacheIndex = n), + (t[n] = i); + }, + }, + { + key: "_addInactiveBinding", + value: function (e, t, n) { + var r = this._bindingsByRootAndName, + i = this._bindings, + a = r[t]; + void 0 === a && ((a = {}), (r[t] = a)), + (a[n] = e), + (e._cacheIndex = i.length), + i.push(e); + }, + }, + { + key: "_removeInactiveBinding", + value: function (e) { + var t = this._bindings, + n = e.binding, + r = n.rootNode.uuid, + i = n.path, + a = this._bindingsByRootAndName, + o = a[r], + s = t[t.length - 1], + l = e._cacheIndex; + (s._cacheIndex = l), + (t[l] = s), + t.pop(), + delete o[i], + 0 === Object.keys(o).length && delete a[r]; + }, + }, + { + key: "_lendBinding", + value: function (e) { + var t = this._bindings, + n = e._cacheIndex, + r = this._nActiveBindings++, + i = t[r]; + (e._cacheIndex = r), + (t[r] = e), + (i._cacheIndex = n), + (t[n] = i); + }, + }, + { + key: "_takeBackBinding", + value: function (e) { + var t = this._bindings, + n = e._cacheIndex, + r = --this._nActiveBindings, + i = t[r]; + (e._cacheIndex = r), + (t[r] = e), + (i._cacheIndex = n), + (t[n] = i); + }, + }, + { + key: "_lendControlInterpolant", + value: function () { + var e = this._controlInterpolants, + t = this._nActiveControlInterpolants++, + n = e[t]; + return ( + void 0 === n && + (((n = new dd( + new Float32Array(2), + new Float32Array(2), + 1, + Qh + )).__cacheIndex = t), + (e[t] = n)), + n + ); + }, + }, + { + key: "_takeBackControlInterpolant", + value: function (e) { + var t = this._controlInterpolants, + n = e.__cacheIndex, + r = --this._nActiveControlInterpolants, + i = t[r]; + (e.__cacheIndex = r), + (t[r] = e), + (i.__cacheIndex = n), + (t[n] = i); + }, + }, + { + key: "clipAction", + value: function (e, t, n) { + var r = t || this._root, + i = r.uuid, + a = "string" === typeof e ? Sd.findByName(r, e) : e, + o = null !== a ? a.uuid : e, + s = this._actionsByClip[o], + l = null; + if ( + (void 0 === n && (n = null !== a ? a.blendMode : jt), + void 0 !== s) + ) { + var u = s.actionByRoot[i]; + if (void 0 !== u && u.blendMode === n) return u; + (l = s.knownActions[0]), null === a && (a = l._clip); + } + if (null === a) return null; + var c = new zh(this, a, t, n); + return ( + this._bindAction(c, l), + this._addInactiveAction(c, o, i), + c + ); + }, + }, + { + key: "existingAction", + value: function (e, t) { + var n = t || this._root, + r = n.uuid, + i = "string" === typeof e ? Sd.findByName(n, e) : e, + a = i ? i.uuid : e, + o = this._actionsByClip[a]; + return (void 0 !== o && o.actionByRoot[r]) || null; + }, + }, + { + key: "stopAllAction", + value: function () { + for ( + var e = this._actions, t = this._nActiveActions - 1; + t >= 0; + --t + ) + e[t].stop(); + return this; + }, + }, + { + key: "update", + value: function (e) { + e *= this.timeScale; + for ( + var t = this._actions, + n = this._nActiveActions, + r = (this.time += e), + i = Math.sign(e), + a = (this._accuIndex ^= 1), + o = 0; + o !== n; + ++o + ) { + t[o]._update(r, e, i, a); + } + for ( + var s = this._bindings, l = this._nActiveBindings, u = 0; + u !== l; + ++u + ) + s[u].apply(a); + return this; + }, + }, + { + key: "setTime", + value: function (e) { + this.time = 0; + for (var t = 0; t < this._actions.length; t++) + this._actions[t].time = 0; + return this.update(e); + }, + }, + { + key: "getRoot", + value: function () { + return this._root; + }, + }, + { + key: "uncacheClip", + value: function (e) { + var t = this._actions, + n = e.uuid, + r = this._actionsByClip, + i = r[n]; + if (void 0 !== i) { + for ( + var a = i.knownActions, o = 0, s = a.length; + o !== s; + ++o + ) { + var l = a[o]; + this._deactivateAction(l); + var u = l._cacheIndex, + c = t[t.length - 1]; + (l._cacheIndex = null), + (l._byClipCacheIndex = null), + (c._cacheIndex = u), + (t[u] = c), + t.pop(), + this._removeInactiveBindingsForAction(l); + } + delete r[n]; + } + }, + }, + { + key: "uncacheRoot", + value: function (e) { + var t = e.uuid, + n = this._actionsByClip; + for (var r in n) { + var i = n[r].actionByRoot[t]; + void 0 !== i && + (this._deactivateAction(i), + this._removeInactiveAction(i)); + } + var a = this._bindingsByRootAndName[t]; + if (void 0 !== a) + for (var o in a) { + var s = a[o]; + s.restoreOriginalState(), + this._removeInactiveBinding(s); + } + }, + }, + { + key: "uncacheAction", + value: function (e, t) { + var n = this.existingAction(e, t); + null !== n && + (this._deactivateAction(n), + this._removeInactiveAction(n)); + }, + }, + ]), + n + ); + })(Jn), + Vh = (function () { + function e(t) { + (0, m.Z)(this, e), (this.value = t); + } + return ( + (0, g.Z)(e, [ + { + key: "clone", + value: function () { + return new e( + void 0 === this.value.clone + ? this.value + : this.value.clone() + ); + }, + }, + ]), + e + ); + })(), + jh = 0, + Wh = (function (e) { + (0, d.Z)(n, e); + var t = (0, h.Z)(n); + function n() { + var e; + return ( + (0, m.Z)(this, n), + ((e = t.call(this)).isUniformsGroup = !0), + Object.defineProperty((0, f.Z)(e), "id", { value: jh++ }), + (e.name = ""), + (e.usage = Fn), + (e.uniforms = []), + e + ); + } + return ( + (0, g.Z)(n, [ + { + key: "add", + value: function (e) { + return this.uniforms.push(e), this; + }, + }, + { + key: "remove", + value: function (e) { + var t = this.uniforms.indexOf(e); + return -1 !== t && this.uniforms.splice(t, 1), this; + }, + }, + { + key: "setName", + value: function (e) { + return (this.name = e), this; + }, + }, + { + key: "setUsage", + value: function (e) { + return (this.usage = e), this; + }, + }, + { + key: "dispose", + value: function () { + return this.dispatchEvent({ type: "dispose" }), this; + }, + }, + { + key: "copy", + value: function (e) { + (this.name = e.name), (this.usage = e.usage); + var t = e.uniforms; + this.uniforms.length = 0; + for (var n = 0, r = t.length; n < r; n++) + this.uniforms.push(t[n].clone()); + return this; + }, + }, + { + key: "clone", + value: function () { + return new this.constructor().copy(this); + }, + }, + ]), + n + ); + })(Jn), + Xh = (function (e) { + (0, d.Z)(n, e); + var t = (0, h.Z)(n); + function n(e, r) { + var i, + a = + arguments.length > 2 && void 0 !== arguments[2] + ? arguments[2] + : 1; + return ( + (0, m.Z)(this, n), + ((i = t.call(this, e, r)).isInstancedInterleavedBuffer = !0), + (i.meshPerAttribute = a), + i + ); + } + return ( + (0, g.Z)(n, [ + { + key: "copy", + value: function (e) { + return ( + (0, l.Z)((0, u.Z)(n.prototype), "copy", this).call( + this, + e + ), + (this.meshPerAttribute = e.meshPerAttribute), + this + ); + }, + }, + { + key: "clone", + value: function (e) { + var t = (0, l.Z)((0, u.Z)(n.prototype), "clone", this).call( + this, + e + ); + return (t.meshPerAttribute = this.meshPerAttribute), t; + }, + }, + { + key: "toJSON", + value: function (e) { + var t = (0, l.Z)( + (0, u.Z)(n.prototype), + "toJSON", + this + ).call(this, e); + return ( + (t.isInstancedInterleavedBuffer = !0), + (t.meshPerAttribute = this.meshPerAttribute), + t + ); + }, + }, + ]), + n + ); + })(uu), + Yh = (function () { + function e(t, n, r, i, a) { + (0, m.Z)(this, e), + (this.isGLBufferAttribute = !0), + (this.name = ""), + (this.buffer = t), + (this.type = n), + (this.itemSize = r), + (this.elementSize = i), + (this.count = a), + (this.version = 0); + } + return ( + (0, g.Z)(e, [ + { + key: "needsUpdate", + set: function (e) { + !0 === e && this.version++; + }, + }, + { + key: "setBuffer", + value: function (e) { + return (this.buffer = e), this; + }, + }, + { + key: "setType", + value: function (e, t) { + return (this.type = e), (this.elementSize = t), this; + }, + }, + { + key: "setItemSize", + value: function (e) { + return (this.itemSize = e), this; + }, + }, + { + key: "setCount", + value: function (e) { + return (this.count = e), this; + }, + }, + ]), + e + ); + })(), + qh = (function () { + function e(t, n) { + var r = + arguments.length > 2 && void 0 !== arguments[2] + ? arguments[2] + : 0, + i = + arguments.length > 3 && void 0 !== arguments[3] + ? arguments[3] + : 1 / 0; + (0, m.Z)(this, e), + (this.ray = new bi(t, n)), + (this.near = r), + (this.far = i), + (this.camera = null), + (this.layers = new Bi()), + (this.params = { + Mesh: {}, + Line: { threshold: 1 }, + LOD: {}, + Points: { threshold: 1 }, + Sprite: {}, + }); + } + return ( + (0, g.Z)(e, [ + { + key: "set", + value: function (e, t) { + this.ray.set(e, t); + }, + }, + { + key: "setFromCamera", + value: function (e, t) { + t.isPerspectiveCamera + ? (this.ray.origin.setFromMatrixPosition(t.matrixWorld), + this.ray.direction + .set(e.x, e.y, 0.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 + ); + }, + }, + { + key: "intersectObject", + value: function (e) { + var t = + arguments.length > 2 && void 0 !== arguments[2] + ? arguments[2] + : []; + return ( + Kh( + e, + this, + t, + !(arguments.length > 1 && void 0 !== arguments[1]) || + arguments[1] + ), + t.sort(Jh), + t + ); + }, + }, + { + key: "intersectObjects", + value: function (e) { + for ( + var t = + !(arguments.length > 1 && void 0 !== arguments[1]) || + arguments[1], + n = + arguments.length > 2 && void 0 !== arguments[2] + ? arguments[2] + : [], + r = 0, + i = e.length; + r < i; + r++ + ) + Kh(e[r], this, n, t); + return n.sort(Jh), n; + }, + }, + ]), + e + ); + })(); + function Jh(e, t) { + return e.distance - t.distance; + } + function Kh(e, t, n, r) { + if ((e.layers.test(t.layers) && e.raycast(t, n), !0 === r)) + for (var i = e.children, a = 0, o = i.length; a < o; a++) + Kh(i[a], t, n, !0); + } + var $h = (function () { + function e() { + var t = + arguments.length > 0 && void 0 !== arguments[0] + ? arguments[0] + : 1, + n = + arguments.length > 1 && void 0 !== arguments[1] + ? arguments[1] + : 0, + r = + arguments.length > 2 && void 0 !== arguments[2] + ? arguments[2] + : 0; + return ( + (0, m.Z)(this, e), + (this.radius = t), + (this.phi = n), + (this.theta = r), + this + ); + } + return ( + (0, g.Z)(e, [ + { + key: "set", + value: function (e, t, n) { + return ( + (this.radius = e), (this.phi = t), (this.theta = n), this + ); + }, + }, + { + key: "copy", + value: function (e) { + return ( + (this.radius = e.radius), + (this.phi = e.phi), + (this.theta = e.theta), + this + ); + }, + }, + { + key: "makeSafe", + value: function () { + var e = 1e-6; + return ( + (this.phi = Math.max(e, Math.min(Math.PI - e, this.phi))), + this + ); + }, + }, + { + key: "setFromVector3", + value: function (e) { + return this.setFromCartesianCoords(e.x, e.y, e.z); + }, + }, + { + key: "setFromCartesianCoords", + value: function (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(rr(t / this.radius, -1, 1)))), + this + ); + }, + }, + { + key: "clone", + value: function () { + return new this.constructor().copy(this); + }, + }, + ]), + e + ); + })(), + ep = (function () { + function e() { + var t = + arguments.length > 0 && void 0 !== arguments[0] + ? arguments[0] + : 1, + n = + arguments.length > 1 && void 0 !== arguments[1] + ? arguments[1] + : 0, + r = + arguments.length > 2 && void 0 !== arguments[2] + ? arguments[2] + : 0; + return ( + (0, m.Z)(this, e), + (this.radius = t), + (this.theta = n), + (this.y = r), + this + ); + } + return ( + (0, g.Z)(e, [ + { + key: "set", + value: function (e, t, n) { + return ( + (this.radius = e), (this.theta = t), (this.y = n), this + ); + }, + }, + { + key: "copy", + value: function (e) { + return ( + (this.radius = e.radius), + (this.theta = e.theta), + (this.y = e.y), + this + ); + }, + }, + { + key: "setFromVector3", + value: function (e) { + return this.setFromCartesianCoords(e.x, e.y, e.z); + }, + }, + { + key: "setFromCartesianCoords", + value: function (e, t, n) { + return ( + (this.radius = Math.sqrt(e * e + n * n)), + (this.theta = Math.atan2(e, n)), + (this.y = t), + this + ); + }, + }, + { + key: "clone", + value: function () { + return new this.constructor().copy(this); + }, + }, + ]), + e + ); + })(), + tp = new dr(), + np = (function () { + function e() { + var t = + arguments.length > 0 && void 0 !== arguments[0] + ? arguments[0] + : new dr(1 / 0, 1 / 0), + n = + arguments.length > 1 && void 0 !== arguments[1] + ? arguments[1] + : new dr(-1 / 0, -1 / 0); + (0, m.Z)(this, e), + (this.isBox2 = !0), + (this.min = t), + (this.max = n); + } + return ( + (0, g.Z)(e, [ + { + key: "set", + value: function (e, t) { + return this.min.copy(e), this.max.copy(t), this; + }, + }, + { + key: "setFromPoints", + value: function (e) { + this.makeEmpty(); + for (var t = 0, n = e.length; t < n; t++) + this.expandByPoint(e[t]); + return this; + }, + }, + { + key: "setFromCenterAndSize", + value: function (e, t) { + var n = tp.copy(t).multiplyScalar(0.5); + return ( + this.min.copy(e).sub(n), this.max.copy(e).add(n), this + ); + }, + }, + { + key: "clone", + value: function () { + return new this.constructor().copy(this); + }, + }, + { + key: "copy", + value: function (e) { + return this.min.copy(e.min), this.max.copy(e.max), this; + }, + }, + { + key: "makeEmpty", + value: function () { + return ( + (this.min.x = this.min.y = 1 / 0), + (this.max.x = this.max.y = -1 / 0), + this + ); + }, + }, + { + key: "isEmpty", + value: function () { + return this.max.x < this.min.x || this.max.y < this.min.y; + }, + }, + { + key: "getCenter", + value: function (e) { + return this.isEmpty() + ? e.set(0, 0) + : e.addVectors(this.min, this.max).multiplyScalar(0.5); + }, + }, + { + key: "getSize", + value: function (e) { + return this.isEmpty() + ? e.set(0, 0) + : e.subVectors(this.max, this.min); + }, + }, + { + key: "expandByPoint", + value: function (e) { + return this.min.min(e), this.max.max(e), this; + }, + }, + { + key: "expandByVector", + value: function (e) { + return this.min.sub(e), this.max.add(e), this; + }, + }, + { + key: "expandByScalar", + value: function (e) { + return this.min.addScalar(-e), this.max.addScalar(e), this; + }, + }, + { + key: "containsPoint", + value: function (e) { + return !( + e.x < this.min.x || + e.x > this.max.x || + e.y < this.min.y || + e.y > this.max.y + ); + }, + }, + { + key: "containsBox", + value: function (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 + ); + }, + }, + { + key: "getParameter", + value: function (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) + ); + }, + }, + { + key: "intersectsBox", + value: function (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 + ); + }, + }, + { + key: "clampPoint", + value: function (e, t) { + return t.copy(e).clamp(this.min, this.max); + }, + }, + { + key: "distanceToPoint", + value: function (e) { + return this.clampPoint(e, tp).distanceTo(e); + }, + }, + { + key: "intersect", + value: function (e) { + return ( + this.min.max(e.min), + this.max.min(e.max), + this.isEmpty() && this.makeEmpty(), + this + ); + }, + }, + { + key: "union", + value: function (e) { + return this.min.min(e.min), this.max.max(e.max), this; + }, + }, + { + key: "translate", + value: function (e) { + return this.min.add(e), this.max.add(e), this; + }, + }, + { + key: "equals", + value: function (e) { + return e.min.equals(this.min) && e.max.equals(this.max); + }, + }, + ]), + e + ); + })(), + rp = new Vr(), + ip = new Vr(), + ap = (function () { + function e() { + var t = + arguments.length > 0 && void 0 !== arguments[0] + ? arguments[0] + : new Vr(), + n = + arguments.length > 1 && void 0 !== arguments[1] + ? arguments[1] + : new Vr(); + (0, m.Z)(this, e), (this.start = t), (this.end = n); + } + return ( + (0, g.Z)(e, [ + { + key: "set", + value: function (e, t) { + return this.start.copy(e), this.end.copy(t), this; + }, + }, + { + key: "copy", + value: function (e) { + return this.start.copy(e.start), this.end.copy(e.end), this; + }, + }, + { + key: "getCenter", + value: function (e) { + return e + .addVectors(this.start, this.end) + .multiplyScalar(0.5); + }, + }, + { + key: "delta", + value: function (e) { + return e.subVectors(this.end, this.start); + }, + }, + { + key: "distanceSq", + value: function () { + return this.start.distanceToSquared(this.end); + }, + }, + { + key: "distance", + value: function () { + return this.start.distanceTo(this.end); + }, + }, + { + key: "at", + value: function (e, t) { + return this.delta(t).multiplyScalar(e).add(this.start); + }, + }, + { + key: "closestPointToPointParameter", + value: function (e, t) { + rp.subVectors(e, this.start), + ip.subVectors(this.end, this.start); + var n = ip.dot(ip), + r = ip.dot(rp) / n; + return t && (r = rr(r, 0, 1)), r; + }, + }, + { + key: "closestPointToPoint", + value: function (e, t, n) { + var r = this.closestPointToPointParameter(e, t); + return this.delta(n).multiplyScalar(r).add(this.start); + }, + }, + { + key: "applyMatrix4", + value: function (e) { + return ( + this.start.applyMatrix4(e), this.end.applyMatrix4(e), this + ); + }, + }, + { + key: "equals", + value: function (e) { + return e.start.equals(this.start) && e.end.equals(this.end); + }, + }, + { + key: "clone", + value: function () { + return new this.constructor().copy(this); + }, + }, + ]), + e + ); + })(), + op = new Vr(), + sp = (function (e) { + (0, d.Z)(n, e); + var t = (0, h.Z)(n); + function n(e, r) { + var i; + (0, m.Z)(this, n), + ((i = t.call(this)).light = e), + (i.matrix = e.matrixWorld), + (i.matrixAutoUpdate = !1), + (i.color = r), + (i.type = "SpotLightHelper"); + for ( + var a = new Na(), + o = [ + 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, + ], + s = 0, + l = 1; + s < 32; + s++, l++ + ) { + var u = (s / 32) * Math.PI * 2, + c = (l / 32) * Math.PI * 2; + o.push( + Math.cos(u), + Math.sin(u), + 1, + Math.cos(c), + Math.sin(c), + 1 + ); + } + a.setAttribute("position", new ka(o, 3)); + var f = new ec({ fog: !1, toneMapped: !1 }); + return (i.cone = new uc(a, f)), i.add(i.cone), i.update(), i; + } + return ( + (0, g.Z)(n, [ + { + key: "dispose", + value: function () { + this.cone.geometry.dispose(), this.cone.material.dispose(); + }, + }, + { + key: "update", + value: function () { + this.light.updateWorldMatrix(!0, !1), + this.light.target.updateWorldMatrix(!0, !1); + var e = this.light.distance ? this.light.distance : 1e3, + t = e * Math.tan(this.light.angle); + this.cone.scale.set(t, t, e), + op.setFromMatrixPosition(this.light.target.matrixWorld), + this.cone.lookAt(op), + void 0 !== this.color + ? this.cone.material.color.set(this.color) + : this.cone.material.color.copy(this.light.color); + }, + }, + ]), + n + ); + })(ji), + lp = new Vr(), + up = new xi(), + cp = new xi(), + fp = (function (e) { + (0, d.Z)(n, e); + var t = (0, h.Z)(n); + function n(e) { + var r; + (0, m.Z)(this, n); + for ( + var i = dp(e), + a = new Na(), + o = [], + s = [], + l = new fa(0, 0, 1), + u = new fa(0, 1, 0), + c = 0; + c < i.length; + c++ + ) { + var f = i[c]; + f.parent && + f.parent.isBone && + (o.push(0, 0, 0), + o.push(0, 0, 0), + s.push(l.r, l.g, l.b), + s.push(u.r, u.g, u.b)); + } + a.setAttribute("position", new ka(o, 3)), + a.setAttribute("color", new ka(s, 3)); + var d = new ec({ + vertexColors: !0, + depthTest: !1, + depthWrite: !1, + toneMapped: !1, + transparent: !0, + }); + return ( + ((r = t.call(this, a, d)).isSkeletonHelper = !0), + (r.type = "SkeletonHelper"), + (r.root = e), + (r.bones = i), + (r.matrix = e.matrixWorld), + (r.matrixAutoUpdate = !1), + r + ); + } + return ( + (0, g.Z)(n, [ + { + key: "updateMatrixWorld", + value: function (e) { + var t = this.bones, + r = this.geometry, + i = r.getAttribute("position"); + cp.copy(this.root.matrixWorld).invert(); + for (var a = 0, o = 0; a < t.length; a++) { + var s = t[a]; + s.parent && + s.parent.isBone && + (up.multiplyMatrices(cp, s.matrixWorld), + lp.setFromMatrixPosition(up), + i.setXYZ(o, lp.x, lp.y, lp.z), + up.multiplyMatrices(cp, s.parent.matrixWorld), + lp.setFromMatrixPosition(up), + i.setXYZ(o + 1, lp.x, lp.y, lp.z), + (o += 2)); + } + (r.getAttribute("position").needsUpdate = !0), + (0, l.Z)( + (0, u.Z)(n.prototype), + "updateMatrixWorld", + this + ).call(this, e); + }, + }, + { + key: "dispose", + value: function () { + this.geometry.dispose(), this.material.dispose(); + }, + }, + ]), + n + ); + })(uc); + function dp(e) { + var t = []; + !0 === e.isBone && t.push(e); + for (var n = 0; n < e.children.length; n++) + t.push.apply(t, dp(e.children[n])); + return t; + } + var hp = (function (e) { + (0, d.Z)(n, e); + var t = (0, h.Z)(n); + function n(e, r, i) { + var a; + (0, m.Z)(this, n); + var o = new Gf(r, 4, 2), + s = new ha({ wireframe: !0, fog: !1, toneMapped: !1 }); + return ( + ((a = t.call(this, o, s)).light = e), + (a.color = i), + (a.type = "PointLightHelper"), + (a.matrix = a.light.matrixWorld), + (a.matrixAutoUpdate = !1), + a.update(), + a + ); + } + return ( + (0, g.Z)(n, [ + { + key: "dispose", + value: function () { + this.geometry.dispose(), this.material.dispose(); + }, + }, + { + key: "update", + value: function () { + this.light.updateWorldMatrix(!0, !1), + void 0 !== this.color + ? this.material.color.set(this.color) + : this.material.color.copy(this.light.color); + }, + }, + ]), + n + ); + })(ro), + pp = new Vr(), + vp = new fa(), + mp = new fa(), + gp = (function (e) { + (0, d.Z)(n, e); + var t = (0, h.Z)(n); + function n(e, r, i) { + var a; + (0, m.Z)(this, n), + ((a = t.call(this)).light = e), + (a.matrix = e.matrixWorld), + (a.matrixAutoUpdate = !1), + (a.color = i), + (a.type = "HemisphereLightHelper"); + var o = new Ff(r); + o.rotateY(0.5 * Math.PI), + (a.material = new ha({ + wireframe: !0, + fog: !1, + toneMapped: !1, + })), + void 0 === a.color && (a.material.vertexColors = !0); + var s = o.getAttribute("position"), + l = new Float32Array(3 * s.count); + return ( + o.setAttribute("color", new xa(l, 3)), + a.add(new ro(o, a.material)), + a.update(), + a + ); + } + return ( + (0, g.Z)(n, [ + { + key: "dispose", + value: function () { + this.children[0].geometry.dispose(), + this.children[0].material.dispose(); + }, + }, + { + key: "update", + value: function () { + var e = this.children[0]; + if (void 0 !== this.color) + this.material.color.set(this.color); + else { + var t = e.geometry.getAttribute("color"); + vp.copy(this.light.color), + mp.copy(this.light.groundColor); + for (var n = 0, r = t.count; n < r; n++) { + var i = n < r / 2 ? vp : mp; + t.setXYZ(n, i.r, i.g, i.b); + } + t.needsUpdate = !0; + } + this.light.updateWorldMatrix(!0, !1), + e.lookAt( + pp + .setFromMatrixPosition(this.light.matrixWorld) + .negate() + ); + }, + }, + ]), + n + ); + })(ji), + Ap = (function (e) { + (0, d.Z)(n, e); + var t = (0, h.Z)(n); + function n() { + var e, + r = + arguments.length > 0 && void 0 !== arguments[0] + ? arguments[0] + : 10, + i = + arguments.length > 1 && void 0 !== arguments[1] + ? arguments[1] + : 10, + a = + arguments.length > 2 && void 0 !== arguments[2] + ? arguments[2] + : 4473924, + o = + arguments.length > 3 && void 0 !== arguments[3] + ? arguments[3] + : 8947848; + (0, m.Z)(this, n), (a = new fa(a)), (o = new fa(o)); + for ( + var s = i / 2, + l = r / i, + u = r / 2, + c = [], + f = [], + d = 0, + h = 0, + p = -u; + d <= i; + d++, p += l + ) { + c.push(-u, 0, p, u, 0, p), c.push(p, 0, -u, p, 0, u); + var v = d === s ? a : o; + v.toArray(f, h), + (h += 3), + v.toArray(f, h), + (h += 3), + v.toArray(f, h), + (h += 3), + v.toArray(f, h), + (h += 3); + } + var g = new Na(); + g.setAttribute("position", new ka(c, 3)), + g.setAttribute("color", new ka(f, 3)); + var A = new ec({ vertexColors: !0, toneMapped: !1 }); + return ((e = t.call(this, g, A)).type = "GridHelper"), e; + } + return ( + (0, g.Z)(n, [ + { + key: "dispose", + value: function () { + this.geometry.dispose(), this.material.dispose(); + }, + }, + ]), + n + ); + })(uc), + yp = (function (e) { + (0, d.Z)(n, e); + var t = (0, h.Z)(n); + function n() { + var e, + r = + arguments.length > 0 && void 0 !== arguments[0] + ? arguments[0] + : 10, + i = + arguments.length > 1 && void 0 !== arguments[1] + ? arguments[1] + : 16, + a = + arguments.length > 2 && void 0 !== arguments[2] + ? arguments[2] + : 8, + o = + arguments.length > 3 && void 0 !== arguments[3] + ? arguments[3] + : 64, + s = + arguments.length > 4 && void 0 !== arguments[4] + ? arguments[4] + : 4473924, + l = + arguments.length > 5 && void 0 !== arguments[5] + ? arguments[5] + : 8947848; + (0, m.Z)(this, n), (s = new fa(s)), (l = new fa(l)); + var u = [], + c = []; + if (i > 1) + for (var f = 0; f < i; f++) { + var d = (f / i) * (2 * Math.PI), + h = Math.sin(d) * r, + p = Math.cos(d) * r; + u.push(0, 0, 0), u.push(h, 0, p); + var v = 1 & f ? s : l; + c.push(v.r, v.g, v.b), c.push(v.r, v.g, v.b); + } + for (var g = 0; g < a; g++) + for ( + var A = 1 & g ? s : l, y = r - (r / a) * g, b = 0; + b < o; + b++ + ) { + var x = (b / o) * (2 * Math.PI), + S = Math.sin(x) * y, + E = Math.cos(x) * y; + u.push(S, 0, E), + c.push(A.r, A.g, A.b), + (x = ((b + 1) / o) * (2 * Math.PI)), + (S = Math.sin(x) * y), + (E = Math.cos(x) * y), + u.push(S, 0, E), + c.push(A.r, A.g, A.b); + } + var _ = new Na(); + _.setAttribute("position", new ka(u, 3)), + _.setAttribute("color", new ka(c, 3)); + var C = new ec({ vertexColors: !0, toneMapped: !1 }); + return ((e = t.call(this, _, C)).type = "PolarGridHelper"), e; + } + return ( + (0, g.Z)(n, [ + { + key: "dispose", + value: function () { + this.geometry.dispose(), this.material.dispose(); + }, + }, + ]), + n + ); + })(uc), + bp = new Vr(), + xp = new Vr(), + Sp = new Vr(), + Ep = (function (e) { + (0, d.Z)(n, e); + var t = (0, h.Z)(n); + function n(e, r, i) { + var a; + (0, m.Z)(this, n), + ((a = t.call(this)).light = e), + (a.matrix = e.matrixWorld), + (a.matrixAutoUpdate = !1), + (a.color = i), + (a.type = "DirectionalLightHelper"), + void 0 === r && (r = 1); + var o = new Na(); + o.setAttribute( + "position", + new ka([-r, r, 0, r, r, 0, r, -r, 0, -r, -r, 0, -r, r, 0], 3) + ); + var s = new ec({ fog: !1, toneMapped: !1 }); + return ( + (a.lightPlane = new oc(o, s)), + a.add(a.lightPlane), + (o = new Na()).setAttribute( + "position", + new ka([0, 0, 0, 0, 0, 1], 3) + ), + (a.targetLine = new oc(o, s)), + a.add(a.targetLine), + a.update(), + a + ); + } + return ( + (0, g.Z)(n, [ + { + key: "dispose", + value: function () { + this.lightPlane.geometry.dispose(), + this.lightPlane.material.dispose(), + this.targetLine.geometry.dispose(), + this.targetLine.material.dispose(); + }, + }, + { + key: "update", + value: function () { + this.light.updateWorldMatrix(!0, !1), + this.light.target.updateWorldMatrix(!0, !1), + bp.setFromMatrixPosition(this.light.matrixWorld), + xp.setFromMatrixPosition(this.light.target.matrixWorld), + Sp.subVectors(xp, bp), + this.lightPlane.lookAt(xp), + 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(xp), + (this.targetLine.scale.z = Sp.length()); + }, + }, + ]), + n + ); + })(ji), + _p = new Vr(), + Cp = new fo(), + wp = (function (e) { + (0, d.Z)(n, e); + var t = (0, h.Z)(n); + function n(e) { + var r; + (0, m.Z)(this, n); + var i = new Na(), + a = new ec({ + color: 16777215, + vertexColors: !0, + toneMapped: !1, + }), + o = [], + s = [], + l = {}; + function u(e, t) { + c(e), c(t); + } + function c(e) { + o.push(0, 0, 0), + s.push(0, 0, 0), + void 0 === l[e] && (l[e] = []), + l[e].push(o.length / 3 - 1); + } + u("n1", "n2"), + u("n2", "n4"), + u("n4", "n3"), + u("n3", "n1"), + u("f1", "f2"), + u("f2", "f4"), + u("f4", "f3"), + u("f3", "f1"), + u("n1", "f1"), + u("n2", "f2"), + u("n3", "f3"), + u("n4", "f4"), + u("p", "n1"), + u("p", "n2"), + u("p", "n3"), + u("p", "n4"), + u("u1", "u2"), + u("u2", "u3"), + u("u3", "u1"), + u("c", "t"), + u("p", "c"), + u("cn1", "cn2"), + u("cn3", "cn4"), + u("cf1", "cf2"), + u("cf3", "cf4"), + i.setAttribute("position", new ka(o, 3)), + i.setAttribute("color", new ka(s, 3)), + ((r = t.call(this, i, a)).type = "CameraHelper"), + (r.camera = e), + r.camera.updateProjectionMatrix && + r.camera.updateProjectionMatrix(), + (r.matrix = e.matrixWorld), + (r.matrixAutoUpdate = !1), + (r.pointMap = l), + r.update(); + var f = new fa(16755200), + d = new fa(16711680), + h = new fa(43775), + p = new fa(16777215), + v = new fa(3355443); + return r.setColors(f, d, h, p, v), r; + } + return ( + (0, g.Z)(n, [ + { + key: "setColors", + value: function (e, t, n, r, i) { + var a = this.geometry.getAttribute("color"); + a.setXYZ(0, e.r, e.g, e.b), + a.setXYZ(1, e.r, e.g, e.b), + a.setXYZ(2, e.r, e.g, e.b), + a.setXYZ(3, e.r, e.g, e.b), + a.setXYZ(4, e.r, e.g, e.b), + a.setXYZ(5, e.r, e.g, e.b), + a.setXYZ(6, e.r, e.g, e.b), + a.setXYZ(7, e.r, e.g, e.b), + a.setXYZ(8, e.r, e.g, e.b), + a.setXYZ(9, e.r, e.g, e.b), + a.setXYZ(10, e.r, e.g, e.b), + a.setXYZ(11, e.r, e.g, e.b), + a.setXYZ(12, e.r, e.g, e.b), + a.setXYZ(13, e.r, e.g, e.b), + a.setXYZ(14, e.r, e.g, e.b), + a.setXYZ(15, e.r, e.g, e.b), + a.setXYZ(16, e.r, e.g, e.b), + a.setXYZ(17, e.r, e.g, e.b), + a.setXYZ(18, e.r, e.g, e.b), + a.setXYZ(19, e.r, e.g, e.b), + a.setXYZ(20, e.r, e.g, e.b), + a.setXYZ(21, e.r, e.g, e.b), + a.setXYZ(22, e.r, e.g, e.b), + a.setXYZ(23, e.r, e.g, e.b), + a.setXYZ(24, t.r, t.g, t.b), + a.setXYZ(25, t.r, t.g, t.b), + a.setXYZ(26, t.r, t.g, t.b), + a.setXYZ(27, t.r, t.g, t.b), + a.setXYZ(28, t.r, t.g, t.b), + a.setXYZ(29, t.r, t.g, t.b), + a.setXYZ(30, t.r, t.g, t.b), + a.setXYZ(31, t.r, t.g, t.b), + a.setXYZ(32, n.r, n.g, n.b), + a.setXYZ(33, n.r, n.g, n.b), + a.setXYZ(34, n.r, n.g, n.b), + a.setXYZ(35, n.r, n.g, n.b), + a.setXYZ(36, n.r, n.g, n.b), + a.setXYZ(37, n.r, n.g, n.b), + a.setXYZ(38, r.r, r.g, r.b), + a.setXYZ(39, r.r, r.g, r.b), + a.setXYZ(40, i.r, i.g, i.b), + a.setXYZ(41, i.r, i.g, i.b), + a.setXYZ(42, i.r, i.g, i.b), + a.setXYZ(43, i.r, i.g, i.b), + a.setXYZ(44, i.r, i.g, i.b), + a.setXYZ(45, i.r, i.g, i.b), + a.setXYZ(46, i.r, i.g, i.b), + a.setXYZ(47, i.r, i.g, i.b), + a.setXYZ(48, i.r, i.g, i.b), + a.setXYZ(49, i.r, i.g, i.b), + (a.needsUpdate = !0); + }, + }, + { + key: "update", + value: function () { + var e = this.geometry, + t = this.pointMap; + Cp.projectionMatrixInverse.copy( + this.camera.projectionMatrixInverse + ), + Tp("c", t, e, Cp, 0, 0, -1), + Tp("t", t, e, Cp, 0, 0, 1), + Tp("n1", t, e, Cp, -1, -1, -1), + Tp("n2", t, e, Cp, 1, -1, -1), + Tp("n3", t, e, Cp, -1, 1, -1), + Tp("n4", t, e, Cp, 1, 1, -1), + Tp("f1", t, e, Cp, -1, -1, 1), + Tp("f2", t, e, Cp, 1, -1, 1), + Tp("f3", t, e, Cp, -1, 1, 1), + Tp("f4", t, e, Cp, 1, 1, 1), + Tp("u1", t, e, Cp, 0.7, 1.1, -1), + Tp("u2", t, e, Cp, -0.7, 1.1, -1), + Tp("u3", t, e, Cp, 0, 2, -1), + Tp("cf1", t, e, Cp, -1, 0, 1), + Tp("cf2", t, e, Cp, 1, 0, 1), + Tp("cf3", t, e, Cp, 0, -1, 1), + Tp("cf4", t, e, Cp, 0, 1, 1), + Tp("cn1", t, e, Cp, -1, 0, -1), + Tp("cn2", t, e, Cp, 1, 0, -1), + Tp("cn3", t, e, Cp, 0, -1, -1), + Tp("cn4", t, e, Cp, 0, 1, -1), + (e.getAttribute("position").needsUpdate = !0); + }, + }, + { + key: "dispose", + value: function () { + this.geometry.dispose(), this.material.dispose(); + }, + }, + ]), + n + ); + })(uc); + function Tp(e, t, n, r, i, a, o) { + _p.set(i, a, o).unproject(r); + var s = t[e]; + if (void 0 !== s) + for ( + var l = n.getAttribute("position"), u = 0, c = s.length; + u < c; + u++ + ) + l.setXYZ(s[u], _p.x, _p.y, _p.z); + } + var Mp, + Ip, + kp = new Xr(), + Rp = (function (e) { + (0, d.Z)(n, e); + var t = (0, h.Z)(n); + function n(e) { + var r, + i = + arguments.length > 1 && void 0 !== arguments[1] + ? arguments[1] + : 16776960; + (0, m.Z)(this, n); + var a = 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, + ]), + o = new Float32Array(24), + s = new Na(); + return ( + s.setIndex(new xa(a, 1)), + s.setAttribute("position", new xa(o, 3)), + ((r = t.call( + this, + s, + new ec({ color: i, toneMapped: !1 }) + )).object = e), + (r.type = "BoxHelper"), + (r.matrixAutoUpdate = !1), + r.update(), + r + ); + } + return ( + (0, g.Z)(n, [ + { + key: "update", + value: function (e) { + if ( + (void 0 !== e && + console.warn( + "THREE.BoxHelper: .update() has no longer arguments." + ), + void 0 !== this.object && kp.setFromObject(this.object), + !kp.isEmpty()) + ) { + var t = kp.min, + n = kp.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(); + } + }, + }, + { + key: "setFromObject", + value: function (e) { + return (this.object = e), this.update(), this; + }, + }, + { + key: "copy", + value: function (e, t) { + return ( + (0, l.Z)((0, u.Z)(n.prototype), "copy", this).call( + this, + e, + t + ), + (this.object = e.object), + this + ); + }, + }, + { + key: "dispose", + value: function () { + this.geometry.dispose(), this.material.dispose(); + }, + }, + ]), + n + ); + })(uc), + Bp = (function (e) { + (0, d.Z)(n, e); + var t = (0, h.Z)(n); + function n(e) { + var r, + i = + arguments.length > 1 && void 0 !== arguments[1] + ? arguments[1] + : 16776960; + (0, m.Z)(this, n); + var a = 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, + ]), + o = new Na(); + return ( + o.setIndex(new xa(a, 1)), + o.setAttribute( + "position", + new ka( + [ + 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 + ) + ), + ((r = t.call( + this, + o, + new ec({ color: i, toneMapped: !1 }) + )).box = e), + (r.type = "Box3Helper"), + r.geometry.computeBoundingSphere(), + r + ); + } + return ( + (0, g.Z)(n, [ + { + key: "updateMatrixWorld", + value: function (e) { + var t = this.box; + t.isEmpty() || + (t.getCenter(this.position), + t.getSize(this.scale), + this.scale.multiplyScalar(0.5), + (0, l.Z)( + (0, u.Z)(n.prototype), + "updateMatrixWorld", + this + ).call(this, e)); + }, + }, + { + key: "dispose", + value: function () { + this.geometry.dispose(), this.material.dispose(); + }, + }, + ]), + n + ); + })(uc), + Pp = (function (e) { + (0, d.Z)(n, e); + var t = (0, h.Z)(n); + function n(e) { + var r, + i = + arguments.length > 1 && void 0 !== arguments[1] + ? arguments[1] + : 1, + a = + arguments.length > 2 && void 0 !== arguments[2] + ? arguments[2] + : 16776960; + (0, m.Z)(this, n); + var o = a, + s = new Na(); + s.setAttribute( + "position", + new ka( + [ + 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 + ) + ), + s.computeBoundingSphere(), + ((r = t.call( + this, + s, + new ec({ color: o, toneMapped: !1 }) + )).type = "PlaneHelper"), + (r.plane = e), + (r.size = i); + var l = new Na(); + return ( + l.setAttribute( + "position", + new ka( + [ + 1, 1, 0, -1, 1, 0, -1, -1, 0, 1, 1, 0, -1, -1, 0, 1, -1, + 0, + ], + 3 + ) + ), + l.computeBoundingSphere(), + r.add( + new ro( + l, + new ha({ + color: o, + opacity: 0.2, + transparent: !0, + depthWrite: !1, + toneMapped: !1, + }) + ) + ), + r + ); + } + return ( + (0, g.Z)(n, [ + { + key: "updateMatrixWorld", + value: function (e) { + this.position.set(0, 0, 0), + this.scale.set(0.5 * this.size, 0.5 * this.size, 1), + this.lookAt(this.plane.normal), + this.translateZ(-this.plane.constant), + (0, l.Z)( + (0, u.Z)(n.prototype), + "updateMatrixWorld", + this + ).call(this, e); + }, + }, + { + key: "dispose", + value: function () { + this.geometry.dispose(), + this.material.dispose(), + this.children[0].geometry.dispose(), + this.children[0].material.dispose(); + }, + }, + ]), + n + ); + })(oc), + Lp = new Vr(), + Dp = (function (e) { + (0, d.Z)(n, e); + var t = (0, h.Z)(n); + function n() { + var e, + r = + arguments.length > 0 && void 0 !== arguments[0] + ? arguments[0] + : new Vr(0, 0, 1), + i = + arguments.length > 1 && void 0 !== arguments[1] + ? arguments[1] + : new Vr(0, 0, 0), + a = + arguments.length > 2 && void 0 !== arguments[2] + ? arguments[2] + : 1, + o = + arguments.length > 3 && void 0 !== arguments[3] + ? arguments[3] + : 16776960, + s = + arguments.length > 4 && void 0 !== arguments[4] + ? arguments[4] + : 0.2 * a, + l = + arguments.length > 5 && void 0 !== arguments[5] + ? arguments[5] + : 0.2 * s; + return ( + (0, m.Z)(this, n), + ((e = t.call(this)).type = "ArrowHelper"), + void 0 === Mp && + ((Mp = new Na()).setAttribute( + "position", + new ka([0, 0, 0, 0, 1, 0], 3) + ), + (Ip = new Yc(0, 0.5, 1, 5, 1)).translate(0, -0.5, 0)), + e.position.copy(i), + (e.line = new oc(Mp, new ec({ color: o, toneMapped: !1 }))), + (e.line.matrixAutoUpdate = !1), + e.add(e.line), + (e.cone = new ro(Ip, new ha({ color: o, toneMapped: !1 }))), + (e.cone.matrixAutoUpdate = !1), + e.add(e.cone), + e.setDirection(r), + e.setLength(a, s, l), + e + ); + } + return ( + (0, g.Z)(n, [ + { + key: "setDirection", + value: function (e) { + if (e.y > 0.99999) this.quaternion.set(0, 0, 0, 1); + else if (e.y < -0.99999) this.quaternion.set(1, 0, 0, 0); + else { + Lp.set(e.z, 0, -e.x).normalize(); + var t = Math.acos(e.y); + this.quaternion.setFromAxisAngle(Lp, t); + } + }, + }, + { + key: "setLength", + value: function (e) { + var t = + arguments.length > 1 && void 0 !== arguments[1] + ? arguments[1] + : 0.2 * e, + n = + arguments.length > 2 && void 0 !== arguments[2] + ? arguments[2] + : 0.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(); + }, + }, + { + key: "setColor", + value: function (e) { + this.line.material.color.set(e), + this.cone.material.color.set(e); + }, + }, + { + key: "copy", + value: function (e) { + return ( + (0, l.Z)((0, u.Z)(n.prototype), "copy", this).call( + this, + e, + !1 + ), + this.line.copy(e.line), + this.cone.copy(e.cone), + this + ); + }, + }, + { + key: "dispose", + value: function () { + this.line.geometry.dispose(), + this.line.material.dispose(), + this.cone.geometry.dispose(), + this.cone.material.dispose(); + }, + }, + ]), + n + ); + })(ji), + Up = (function (e) { + (0, d.Z)(n, e); + var t = (0, h.Z)(n); + function n() { + var e, + r = + arguments.length > 0 && void 0 !== arguments[0] + ? arguments[0] + : 1; + (0, m.Z)(this, n); + var i = [0, 0, 0, r, 0, 0, 0, 0, 0, 0, r, 0, 0, 0, 0, 0, 0, r], + a = new Na(); + a.setAttribute("position", new ka(i, 3)), + a.setAttribute( + "color", + new ka( + [ + 1, 0, 0, 1, 0.6, 0, 0, 1, 0, 0.6, 1, 0, 0, 0, 1, 0, 0.6, + 1, + ], + 3 + ) + ); + var o = new ec({ vertexColors: !0, toneMapped: !1 }); + return ((e = t.call(this, a, o)).type = "AxesHelper"), e; + } + return ( + (0, g.Z)(n, [ + { + key: "setColors", + value: function (e, t, n) { + var r = new fa(), + 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 + ); + }, + }, + { + key: "dispose", + value: function () { + this.geometry.dispose(), this.material.dispose(); + }, + }, + ]), + n + ); + })(uc), + Fp = (function () { + function e() { + (0, m.Z)(this, e), + (this.type = "ShapePath"), + (this.color = new fa()), + (this.subPaths = []), + (this.currentPath = null); + } + return ( + (0, g.Z)(e, [ + { + key: "moveTo", + value: function (e, t) { + return ( + (this.currentPath = new Vc()), + this.subPaths.push(this.currentPath), + this.currentPath.moveTo(e, t), + this + ); + }, + }, + { + key: "lineTo", + value: function (e, t) { + return this.currentPath.lineTo(e, t), this; + }, + }, + { + key: "quadraticCurveTo", + value: function (e, t, n, r) { + return this.currentPath.quadraticCurveTo(e, t, n, r), this; + }, + }, + { + key: "bezierCurveTo", + value: function (e, t, n, r, i, a) { + return ( + this.currentPath.bezierCurveTo(e, t, n, r, i, a), this + ); + }, + }, + { + key: "splineThru", + value: function (e) { + return this.currentPath.splineThru(e), this; + }, + }, + { + key: "toShapes", + value: function (e) { + function t(e, t) { + for ( + var n = t.length, r = !1, i = n - 1, a = 0; + a < n; + i = a++ + ) { + var o = t[i], + s = t[a], + l = s.x - o.x, + u = s.y - o.y; + if (Math.abs(u) > Number.EPSILON) { + if ( + (u < 0 && + ((o = t[a]), (l = -l), (s = t[i]), (u = -u)), + e.y < o.y || e.y > s.y) + ) + continue; + if (e.y === o.y) { + if (e.x === o.x) return !0; + } else { + var c = u * (e.x - o.x) - l * (e.y - o.y); + if (0 === c) return !0; + if (c < 0) continue; + r = !r; + } + } else { + if (e.y !== o.y) continue; + if ( + (s.x <= e.x && e.x <= o.x) || + (o.x <= e.x && e.x <= s.x) + ) + return !0; + } + } + return r; + } + var n, + r, + i, + a = Rf.isClockWise, + o = this.subPaths; + if (0 === o.length) return []; + var s = []; + if (1 === o.length) + return ( + (r = o[0]), + ((i = new af()).curves = r.curves), + s.push(i), + s + ); + var l = !a(o[0].getPoints()); + l = e ? !l : l; + var u, + c, + f = [], + d = [], + h = [], + p = 0; + (d[p] = void 0), (h[p] = []); + for (var v = 0, m = o.length; v < m; v++) + (n = a((u = (r = o[v]).getPoints()))), + (n = e ? !n : n) + ? (!l && d[p] && p++, + (d[p] = { s: new af(), p: u }), + (d[p].s.curves = r.curves), + l && p++, + (h[p] = [])) + : h[p].push({ h: r, p: u[0] }); + if (!d[0]) + return (function (e) { + for (var t = [], n = 0, r = e.length; n < r; n++) { + var i = e[n], + a = new af(); + (a.curves = i.curves), t.push(a); + } + return t; + })(o); + if (d.length > 1) { + for (var g = !1, A = 0, y = 0, b = d.length; y < b; y++) + f[y] = []; + for (var x = 0, S = d.length; x < S; x++) + for (var E = h[x], _ = 0; _ < E.length; _++) { + for (var C = E[_], w = !0, T = 0; T < d.length; T++) + t(C.p, d[T].p) && + (x !== T && A++, + w ? ((w = !1), f[T].push(C)) : (g = !0)); + w && f[x].push(C); + } + A > 0 && !1 === g && (h = f); + } + for (var M = 0, I = d.length; M < I; M++) { + (i = d[M].s), s.push(i); + for (var k = 0, R = (c = h[M]).length; k < R; k++) + i.holes.push(c[k].h); + } + return s; + }, + }, + ]), + e + ); + })(); + "undefined" !== typeof __THREE_DEVTOOLS__ && + __THREE_DEVTOOLS__.dispatchEvent( + new CustomEvent("register", { detail: { revision: A } }) + ), + "undefined" !== typeof window && + (window.__THREE__ + ? console.warn( + "WARNING: Multiple instances of Three.js being imported." + ) + : (window.__THREE__ = A)); + }, + }, + t = {}; + function n(r) { + var i = t[r]; + if (void 0 !== i) return i.exports; + var a = (t[r] = { exports: {} }); + return e[r].call(a.exports, a, a.exports, n), a.exports; + } + (n.m = e), + (n.n = function (e) { + var t = + e && e.__esModule + ? function () { + return e.default; + } + : function () { + return e; + }; + return n.d(t, { a: t }), t; + }), + (function () { + var e, + t = Object.getPrototypeOf + ? function (e) { + return Object.getPrototypeOf(e); + } + : function (e) { + return 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 a = Object.create(null); + n.r(a); + var o = {}; + e = e || [null, t({}), t([]), t(t)]; + for ( + var s = 2 & i && r; + "object" == typeof s && !~e.indexOf(s); + s = t(s) + ) + Object.getOwnPropertyNames(s).forEach(function (e) { + o[e] = function () { + return r[e]; + }; + }); + return ( + (o.default = function () { + return r; + }), + n.d(a, o), + a + ); + }; + })(), + (n.d = function (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.f = {}), + (n.e = function (e) { + return Promise.all( + Object.keys(n.f).reduce(function (t, r) { + return n.f[r](e, t), t; + }, []) + ); + }), + (n.u = function (e) { + return "static/js/" + e + ".ceba7239.chunk.js"; + }), + (n.miniCssF = function (e) {}), + (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 = function (e, t) { + return Object.prototype.hasOwnProperty.call(e, t); + }), + (function () { + var e = {}, + t = "product:"; + n.l = function (r, i, a, o) { + if (e[r]) e[r].push(i); + else { + var s, l; + if (void 0 !== a) + for ( + var u = document.getElementsByTagName("script"), c = 0; + c < u.length; + c++ + ) { + var f = u[c]; + if ( + f.getAttribute("src") == r || + f.getAttribute("data-webpack") == t + a + ) { + s = f; + break; + } + } + s || + ((l = !0), + ((s = document.createElement("script")).charset = "utf-8"), + (s.timeout = 120), + n.nc && s.setAttribute("nonce", n.nc), + s.setAttribute("data-webpack", t + a), + (s.src = r)), + (e[r] = [i]); + var d = function (t, n) { + (s.onerror = s.onload = null), clearTimeout(h); + var i = e[r]; + if ( + (delete e[r], + s.parentNode && s.parentNode.removeChild(s), + i && + i.forEach(function (e) { + return e(n); + }), + t) + ) + return t(n); + }, + h = setTimeout( + d.bind(null, void 0, { type: "timeout", target: s }), + 12e4 + ); + (s.onerror = d.bind(null, s.onerror)), + (s.onload = d.bind(null, s.onload)), + l && document.head.appendChild(s); + } + }; + })(), + (n.r = function (e) { + "undefined" !== typeof Symbol && + Symbol.toStringTag && + Object.defineProperty(e, Symbol.toStringTag, { value: "Module" }), + Object.defineProperty(e, "__esModule", { value: !0 }); + }), + (n.p = "./"), + (function () { + var e = { 179: 0 }; + n.f.j = function (t, r) { + var i = n.o(e, t) ? e[t] : void 0; + if (0 !== i) + if (i) r.push(i[2]); + else { + var a = new Promise(function (n, r) { + i = e[t] = [n, r]; + }); + r.push((i[2] = a)); + var o = n.p + n.u(t), + s = new Error(); + n.l( + o, + function (r) { + if (n.o(e, t) && (0 !== (i = e[t]) && (e[t] = void 0), i)) { + var a = r && ("load" === r.type ? "missing" : r.type), + o = r && r.target && r.target.src; + (s.message = + "Loading chunk " + t + " failed.\n(" + a + ": " + o + ")"), + (s.name = "ChunkLoadError"), + (s.type = a), + (s.request = o), + i[1](s); + } + }, + "chunk-" + t, + t + ); + } + }; + var t = function (t, r) { + var i, + a, + o = r[0], + s = r[1], + l = r[2], + u = 0; + if ( + o.some(function (t) { + return 0 !== e[t]; + }) + ) { + for (i in s) n.o(s, i) && (n.m[i] = s[i]); + if (l) l(n); + } + for (t && t(r); u < o.length; u++) + (a = o[u]), n.o(e, a) && e[a] && e[a][0](), (e[a] = 0); + }, + r = (self.webpackChunkproduct = self.webpackChunkproduct || []); + r.forEach(t.bind(null, 0)), (r.push = t.bind(null, r.push.bind(r))); + })(), + (n.nc = void 0); + var r = {}; + !(function () { + "use strict"; + var e = n(2791), + t = n(1250), + r = n(7248), + i = n(327), + a = n(4164); + var o = function (e) { + e(); + }, + s = function () { + return o; + }, + l = n(4942), + u = Symbol.for("react-redux-context"), + c = "undefined" !== typeof globalThis ? globalThis : {}; + function f() { + var t; + if (!e.createContext) return {}; + var n = null != (t = c[u]) ? t : (c[u] = new Map()), + r = n.get(e.createContext); + return r || ((r = e.createContext(null)), n.set(e.createContext, r)), r; + } + var d = f(); + function h() { + var t = + arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : d; + return function () { + return (0, e.useContext)(t); + }; + } + var p = h(), + v = function () { + throw new Error("uSES not initialized!"); + }, + m = function (e, t) { + return e === t; + }; + function g() { + var t = + arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : d, + n = t === d ? p : h(t); + return function (t) { + var r = + arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {}, + i = "function" === typeof r ? { equalityFn: r } : r, + a = i.equalityFn, + o = void 0 === a ? m : a, + s = i.stabilityCheck, + u = void 0 === s ? void 0 : s; + i.noopCheck; + var c = n(), + f = c.store, + d = c.subscription, + h = c.getServerState, + p = c.stabilityCheck, + g = + (c.noopCheck, + (0, e.useRef)(!0), + (0, e.useCallback)( + (0, l.Z)({}, t.name, function (e) { + return t(e); + })[t.name], + [t, p, u] + )), + A = v(d.addNestedSub, f.getState, h || f.getState, g, o); + return (0, e.useDebugValue)(A), A; + }; + } + var A = g(), + y = n(2110), + b = n.n(y), + x = n(7441); + var S = { + notify: function () {}, + get: function () { + return []; + }, + }; + function E(e, t) { + var n, + r = S, + i = 0, + a = !1; + function o() { + c.onStateChange && c.onStateChange(); + } + function l() { + i++, + n || + ((n = t ? t.addNestedSub(o) : e.subscribe(o)), + (r = (function () { + var e = s(), + t = null, + n = null; + return { + clear: function () { + (t = null), (n = null); + }, + notify: function () { + e(function () { + for (var e = t; e; ) e.callback(), (e = e.next); + }); + }, + get: function () { + for (var e = [], n = t; n; ) e.push(n), (n = n.next); + return e; + }, + subscribe: function (e) { + var r = !0, + i = (n = { callback: e, next: null, prev: n }); + return ( + i.prev ? (i.prev.next = i) : (t = i), + function () { + r && + null !== t && + ((r = !1), + i.next ? (i.next.prev = i.prev) : (n = i.prev), + i.prev ? (i.prev.next = i.next) : (t = i.next)); + } + ); + }, + }; + })())); + } + function u() { + i--, n && 0 === i && (n(), (n = void 0), r.clear(), (r = S)); + } + var c = { + addNestedSub: function (e) { + l(); + var t = r.subscribe(e), + n = !1; + return function () { + n || ((n = !0), t(), u()); + }; + }, + notifyNestedSubs: function () { + r.notify(); + }, + handleChangeWrapper: o, + isSubscribed: function () { + return a; + }, + trySubscribe: function () { + a || ((a = !0), l()); + }, + tryUnsubscribe: function () { + a && ((a = !1), u()); + }, + getListeners: function () { + return r; + }, + }; + return c; + } + var _ = !( + "undefined" === typeof window || + "undefined" === typeof window.document || + "undefined" === typeof window.document.createElement + ) + ? e.useLayoutEffect + : e.useEffect; + var C = function (t) { + var n = t.store, + r = t.context, + i = t.children, + a = t.serverState, + o = t.stabilityCheck, + s = void 0 === o ? "once" : o, + l = t.noopCheck, + u = void 0 === l ? "once" : l, + c = e.useMemo( + function () { + var e = E(n); + return { + store: n, + subscription: e, + getServerState: a + ? function () { + return a; + } + : void 0, + stabilityCheck: s, + noopCheck: u, + }; + }, + [n, a, s, u] + ), + f = e.useMemo( + function () { + return n.getState(); + }, + [n] + ); + _( + function () { + var e = c.subscription; + return ( + (e.onStateChange = e.notifyNestedSubs), + e.trySubscribe(), + f !== n.getState() && e.notifyNestedSubs(), + function () { + e.tryUnsubscribe(), (e.onStateChange = void 0); + } + ); + }, + [c, f] + ); + var h = r || d; + return e.createElement(h.Provider, { value: c }, i); + }; + function w() { + var e = + arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : d, + t = e === d ? p : h(e); + return function () { + return t().store; + }; + } + var T = w(); + function M() { + var e = + arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : d, + t = e === d ? T : w(e); + return function () { + return t().dispatch; + }; + } + var I, + k = M(); + function R(e) { + for ( + var t = arguments.length, n = Array(t > 1 ? t - 1 : 0), r = 1; + r < t; + r++ + ) + n[r - 1] = arguments[r]; + throw Error( + "[Immer] minified error nr: " + + e + + (n.length + ? " " + + n + .map(function (e) { + return "'" + e + "'"; + }) + .join(",") + : "") + + ". Find the full error at: https://bit.ly/3cXEKWf" + ); + } + function B(e) { + return !!e && !!e[xe]; + } + function P(e) { + var t; + return ( + !!e && + ((function (e) { + if (!e || "object" != typeof e) return !1; + var t = Object.getPrototypeOf(e); + if (null === t) return !0; + var n = Object.hasOwnProperty.call(t, "constructor") && t.constructor; + return ( + n === Object || + ("function" == typeof n && Function.toString.call(n) === Se) + ); + })(e) || + Array.isArray(e) || + !!e[be] || + !!(null === (t = e.constructor) || void 0 === t ? void 0 : t[be]) || + G(e) || + Z(e)) + ); + } + function L(e, t, n) { + void 0 === n && (n = !1), + 0 === D(e) + ? (n ? Object.keys : Ee)(e).forEach(function (r) { + (n && "symbol" == typeof r) || t(r, e[r], e); + }) + : e.forEach(function (n, r) { + return t(r, n, e); + }); + } + function D(e) { + var t = e[xe]; + return t + ? t.i > 3 + ? t.i - 4 + : t.i + : Array.isArray(e) + ? 1 + : G(e) + ? 2 + : Z(e) + ? 3 + : 0; + } + function U(e, t) { + return 2 === D(e) ? e.has(t) : Object.prototype.hasOwnProperty.call(e, t); + } + function F(e, t) { + return 2 === D(e) ? e.get(t) : e[t]; + } + function O(e, t, n) { + var r = D(e); + 2 === r ? e.set(t, n) : 3 === r ? e.add(n) : (e[t] = n); + } + function N(e, t) { + return e === t ? 0 !== e || 1 / e == 1 / t : e != e && t != t; + } + function G(e) { + return me && e instanceof Map; + } + function Z(e) { + return ge && e instanceof Set; + } + function z(e) { + return e.o || e.t; + } + function Q(e) { + if (Array.isArray(e)) return Array.prototype.slice.call(e); + var t = _e(e); + delete t[xe]; + for (var n = Ee(t), r = 0; r < n.length; r++) { + var i = n[r], + a = t[i]; + !1 === a.writable && ((a.writable = !0), (a.configurable = !0)), + (a.get || a.set) && + (t[i] = { + configurable: !0, + writable: !0, + enumerable: a.enumerable, + value: e[i], + }); + } + return Object.create(Object.getPrototypeOf(e), t); + } + function H(e, t) { + return ( + void 0 === t && (t = !1), + j(e) || + B(e) || + !P(e) || + (D(e) > 1 && (e.set = e.add = e.clear = e.delete = V), + Object.freeze(e), + t && + L( + e, + function (e, t) { + return H(t, !0); + }, + !0 + )), + e + ); + } + function V() { + R(2); + } + function j(e) { + return null == e || "object" != typeof e || Object.isFrozen(e); + } + function W(e) { + var t = Ce[e]; + return t || R(18, e), t; + } + function X(e, t) { + Ce[e] || (Ce[e] = t); + } + function Y() { + return pe; + } + function q(e, t) { + t && (W("Patches"), (e.u = []), (e.s = []), (e.v = t)); + } + function J(e) { + K(e), e.p.forEach(ee), (e.p = null); + } + function K(e) { + e === pe && (pe = e.l); + } + function $(e) { + return (pe = { p: [], l: pe, h: e, m: !0, _: 0 }); + } + function ee(e) { + var t = e[xe]; + 0 === t.i || 1 === t.i ? t.j() : (t.g = !0); + } + function te(e, t) { + t._ = t.p.length; + var n = t.p[0], + r = void 0 !== e && e !== n; + return ( + t.h.O || W("ES5").S(t, e, r), + r + ? (n[xe].P && (J(t), R(4)), + P(e) && ((e = ne(t, e)), t.l || ie(t, e)), + t.u && W("Patches").M(n[xe].t, e, t.u, t.s)) + : (e = ne(t, n, [])), + J(t), + t.u && t.v(t.u, t.s), + e !== ye ? e : void 0 + ); + } + function ne(e, t, n) { + if (j(t)) return t; + var r = t[xe]; + if (!r) + return ( + L( + t, + function (i, a) { + return re(e, r, t, i, a, n); + }, + !0 + ), + t + ); + if (r.A !== e) return t; + if (!r.P) return ie(e, r.t, !0), r.t; + if (!r.I) { + (r.I = !0), r.A._--; + var i = 4 === r.i || 5 === r.i ? (r.o = Q(r.k)) : r.o, + a = i, + o = !1; + 3 === r.i && ((a = new Set(i)), i.clear(), (o = !0)), + L(a, function (t, a) { + return re(e, r, i, t, a, n, o); + }), + ie(e, i, !1), + n && e.u && W("Patches").N(r, n, e.u, e.s); + } + return r.o; + } + function re(e, t, n, r, i, a, o) { + if (B(i)) { + var s = ne( + e, + i, + a && t && 3 !== t.i && !U(t.R, r) ? a.concat(r) : void 0 + ); + if ((O(n, r, s), !B(s))) return; + e.m = !1; + } else o && n.add(i); + if (P(i) && !j(i)) { + if (!e.h.D && e._ < 1) return; + ne(e, i), (t && t.A.l) || ie(e, i); + } + } + function ie(e, t, n) { + void 0 === n && (n = !1), !e.l && e.h.D && e.m && H(t, n); + } + function ae(e, t) { + var n = e[xe]; + return (n ? z(n) : e)[t]; + } + function oe(e, t) { + if (t in e) + for (var n = Object.getPrototypeOf(e); n; ) { + var r = Object.getOwnPropertyDescriptor(n, t); + if (r) return r; + n = Object.getPrototypeOf(n); + } + } + function se(e) { + e.P || ((e.P = !0), e.l && se(e.l)); + } + function le(e) { + e.o || (e.o = Q(e.t)); + } + function ue(e, t, n) { + var r = G(t) + ? W("MapSet").F(t, n) + : Z(t) + ? W("MapSet").T(t, n) + : e.O + ? (function (e, t) { + var n = Array.isArray(e), + r = { + i: n ? 1 : 0, + A: t ? t.A : Y(), + P: !1, + I: !1, + R: {}, + l: t, + t: e, + k: null, + o: null, + j: null, + C: !1, + }, + i = r, + a = we; + n && ((i = [r]), (a = Te)); + var o = Proxy.revocable(i, a), + s = o.revoke, + l = o.proxy; + return (r.k = l), (r.j = s), l; + })(t, n) + : W("ES5").J(t, n); + return (n ? n.A : Y()).p.push(r), r; + } + function ce(e) { + return ( + B(e) || R(22, e), + (function e(t) { + if (!P(t)) return t; + var n, + r = t[xe], + i = D(t); + if (r) { + if (!r.P && (r.i < 4 || !W("ES5").K(r))) return r.t; + (r.I = !0), (n = fe(t, i)), (r.I = !1); + } else n = fe(t, i); + return ( + L(n, function (t, i) { + (r && F(r.t, t) === i) || O(n, t, e(i)); + }), + 3 === i ? new Set(n) : n + ); + })(e) + ); + } + function fe(e, t) { + switch (t) { + case 2: + return new Map(e); + case 3: + return Array.from(e); + } + return Q(e); + } + function de() { + function e(e, t) { + var n = i[e]; + return ( + n + ? (n.enumerable = t) + : (i[e] = n = + { + configurable: !0, + enumerable: t, + get: function () { + var t = this[xe]; + return we.get(t, e); + }, + set: function (t) { + var n = this[xe]; + we.set(n, e, t); + }, + }), + n + ); + } + function t(e) { + for (var t = e.length - 1; t >= 0; t--) { + var i = e[t][xe]; + if (!i.P) + switch (i.i) { + case 5: + r(i) && se(i); + break; + case 4: + n(i) && se(i); + } + } + } + function n(e) { + for (var t = e.t, n = e.k, r = Ee(n), i = r.length - 1; i >= 0; i--) { + var a = r[i]; + if (a !== xe) { + var o = t[a]; + if (void 0 === o && !U(t, a)) return !0; + var s = n[a], + l = s && s[xe]; + if (l ? l.t !== o : !N(s, o)) return !0; + } + } + var u = !!t[xe]; + return r.length !== Ee(t).length + (u ? 0 : 1); + } + function r(e) { + var t = e.k; + if (t.length !== e.t.length) return !0; + var n = Object.getOwnPropertyDescriptor(t, t.length - 1); + if (n && !n.get) return !0; + for (var r = 0; r < t.length; r++) if (!t.hasOwnProperty(r)) return !0; + return !1; + } + var i = {}; + X("ES5", { + J: function (t, n) { + var r = Array.isArray(t), + i = (function (t, n) { + if (t) { + for (var r = Array(n.length), i = 0; i < n.length; i++) + Object.defineProperty(r, "" + i, e(i, !0)); + return r; + } + var a = _e(n); + delete a[xe]; + for (var o = Ee(a), s = 0; s < o.length; s++) { + var l = o[s]; + a[l] = e(l, t || !!a[l].enumerable); + } + return Object.create(Object.getPrototypeOf(n), a); + })(r, t), + a = { + i: r ? 5 : 4, + A: n ? n.A : Y(), + P: !1, + I: !1, + R: {}, + l: n, + t: t, + k: i, + o: null, + g: !1, + C: !1, + }; + return Object.defineProperty(i, xe, { value: a, writable: !0 }), i; + }, + S: function (e, n, i) { + i + ? B(n) && n[xe].A === e && t(e.p) + : (e.u && + (function e(t) { + if (t && "object" == typeof t) { + var n = t[xe]; + if (n) { + var i = n.t, + a = n.k, + o = n.R, + s = n.i; + if (4 === s) + L(a, function (t) { + t !== xe && + (void 0 !== i[t] || U(i, t) + ? o[t] || e(a[t]) + : ((o[t] = !0), se(n))); + }), + L(i, function (e) { + void 0 !== a[e] || U(a, e) || ((o[e] = !1), se(n)); + }); + else if (5 === s) { + if ( + (r(n) && (se(n), (o.length = !0)), + a.length < i.length) + ) + for (var l = a.length; l < i.length; l++) o[l] = !1; + else + for (var u = i.length; u < a.length; u++) o[u] = !0; + for ( + var c = Math.min(a.length, i.length), f = 0; + f < c; + f++ + ) + a.hasOwnProperty(f) || (o[f] = !0), + void 0 === o[f] && e(a[f]); + } + } + } + })(e.p[0]), + t(e.p)); + }, + K: function (e) { + return 4 === e.i ? n(e) : r(e); + }, + }); + } + !(function (e) { + v = e; + })(i.useSyncExternalStoreWithSelector), + (function (e) { + e; + })(r.useSyncExternalStore), + (I = a.unstable_batchedUpdates), + (o = I); + var he, + pe, + ve = "undefined" != typeof Symbol && "symbol" == typeof Symbol("x"), + me = "undefined" != typeof Map, + ge = "undefined" != typeof Set, + Ae = + "undefined" != typeof Proxy && + void 0 !== Proxy.revocable && + "undefined" != typeof Reflect, + ye = ve + ? Symbol.for("immer-nothing") + : (((he = {})["immer-nothing"] = !0), he), + be = ve ? Symbol.for("immer-draftable") : "__$immer_draftable", + xe = ve ? Symbol.for("immer-state") : "__$immer_state", + Se = + ("undefined" != typeof Symbol && Symbol.iterator, + "" + Object.prototype.constructor), + Ee = + "undefined" != typeof Reflect && Reflect.ownKeys + ? Reflect.ownKeys + : void 0 !== Object.getOwnPropertySymbols + ? function (e) { + return Object.getOwnPropertyNames(e).concat( + Object.getOwnPropertySymbols(e) + ); + } + : Object.getOwnPropertyNames, + _e = + Object.getOwnPropertyDescriptors || + function (e) { + var t = {}; + return ( + Ee(e).forEach(function (n) { + t[n] = Object.getOwnPropertyDescriptor(e, n); + }), + t + ); + }, + Ce = {}, + we = { + get: function (e, t) { + if (t === xe) return e; + var n = z(e); + if (!U(n, t)) + return (function (e, t, n) { + var r, + i = oe(t, n); + return i + ? "value" in i + ? i.value + : null === (r = i.get) || void 0 === r + ? void 0 + : r.call(e.k) + : void 0; + })(e, n, t); + var r = n[t]; + return e.I || !P(r) + ? r + : r === ae(e.t, t) + ? (le(e), (e.o[t] = ue(e.A.h, r, e))) + : r; + }, + has: function (e, t) { + return t in z(e); + }, + ownKeys: function (e) { + return Reflect.ownKeys(z(e)); + }, + set: function (e, t, n) { + var r = oe(z(e), t); + if (null == r ? void 0 : r.set) return r.set.call(e.k, n), !0; + if (!e.P) { + var i = ae(z(e), t), + a = null == i ? void 0 : i[xe]; + if (a && a.t === n) return (e.o[t] = n), (e.R[t] = !1), !0; + if (N(n, i) && (void 0 !== n || U(e.t, t))) return !0; + le(e), se(e); + } + return ( + (e.o[t] === n && (void 0 !== n || t in e.o)) || + (Number.isNaN(n) && Number.isNaN(e.o[t])) || + ((e.o[t] = n), (e.R[t] = !0)), + !0 + ); + }, + deleteProperty: function (e, t) { + return ( + void 0 !== ae(e.t, t) || t in e.t + ? ((e.R[t] = !1), le(e), se(e)) + : delete e.R[t], + e.o && delete e.o[t], + !0 + ); + }, + getOwnPropertyDescriptor: function (e, t) { + var n = z(e), + r = Reflect.getOwnPropertyDescriptor(n, t); + return r + ? { + writable: !0, + configurable: 1 !== e.i || "length" !== t, + enumerable: r.enumerable, + value: n[t], + } + : r; + }, + defineProperty: function () { + R(11); + }, + getPrototypeOf: function (e) { + return Object.getPrototypeOf(e.t); + }, + setPrototypeOf: function () { + R(12); + }, + }, + Te = {}; + L(we, function (e, t) { + Te[e] = function () { + return (arguments[0] = arguments[0][0]), t.apply(this, arguments); + }; + }), + (Te.deleteProperty = function (e, t) { + return Te.set.call(this, e, t, void 0); + }), + (Te.set = function (e, t, n) { + return we.set.call(this, e[0], t, n, e[0]); + }); + var Me = (function () { + function e(e) { + var t = this; + (this.O = Ae), + (this.D = !0), + (this.produce = function (e, n, r) { + if ("function" == typeof e && "function" != typeof n) { + var i = n; + n = e; + var a = t; + return function (e) { + var t = this; + void 0 === e && (e = i); + for ( + var r = arguments.length, + o = Array(r > 1 ? r - 1 : 0), + s = 1; + s < r; + s++ + ) + o[s - 1] = arguments[s]; + return a.produce(e, function (e) { + var r; + return (r = n).call.apply(r, [t, e].concat(o)); + }); + }; + } + var o; + if ( + ("function" != typeof n && R(6), + void 0 !== r && "function" != typeof r && R(7), + P(e)) + ) { + var s = $(t), + l = ue(t, e, void 0), + u = !0; + try { + (o = n(l)), (u = !1); + } finally { + u ? J(s) : K(s); + } + return "undefined" != typeof Promise && o instanceof Promise + ? o.then( + function (e) { + return q(s, r), te(e, s); + }, + function (e) { + throw (J(s), e); + } + ) + : (q(s, r), te(o, s)); + } + if (!e || "object" != typeof e) { + if ( + (void 0 === (o = n(e)) && (o = e), + o === ye && (o = void 0), + t.D && H(o, !0), + r) + ) { + var c = [], + f = []; + W("Patches").M(e, o, c, f), r(c, f); + } + return o; + } + R(21, e); + }), + (this.produceWithPatches = function (e, n) { + if ("function" == typeof e) + return function (n) { + for ( + var r = arguments.length, + i = Array(r > 1 ? r - 1 : 0), + a = 1; + a < r; + a++ + ) + i[a - 1] = arguments[a]; + return t.produceWithPatches(n, function (t) { + return e.apply(void 0, [t].concat(i)); + }); + }; + var r, + i, + a = t.produce(e, n, function (e, t) { + (r = e), (i = t); + }); + return "undefined" != typeof Promise && a instanceof Promise + ? a.then(function (e) { + return [e, r, i]; + }) + : [a, r, i]; + }), + "boolean" == typeof (null == e ? void 0 : e.useProxies) && + this.setUseProxies(e.useProxies), + "boolean" == typeof (null == e ? void 0 : e.autoFreeze) && + this.setAutoFreeze(e.autoFreeze); + } + var t = e.prototype; + return ( + (t.createDraft = function (e) { + P(e) || R(8), B(e) && (e = ce(e)); + var t = $(this), + n = ue(this, e, void 0); + return (n[xe].C = !0), K(t), n; + }), + (t.finishDraft = function (e, t) { + var n = (e && e[xe]).A; + return q(n, t), te(void 0, n); + }), + (t.setAutoFreeze = function (e) { + this.D = e; + }), + (t.setUseProxies = function (e) { + e && !Ae && R(20), (this.O = e); + }), + (t.applyPatches = function (e, t) { + var n; + for (n = t.length - 1; n >= 0; n--) { + var r = t[n]; + if (0 === r.path.length && "replace" === r.op) { + e = r.value; + break; + } + } + n > -1 && (t = t.slice(n + 1)); + var i = W("Patches").$; + return B(e) + ? i(e, t) + : this.produce(e, function (e) { + return i(e, t); + }); + }), + e + ); + })(), + Ie = new Me(), + ke = Ie.produce, + Re = + (Ie.produceWithPatches.bind(Ie), + Ie.setAutoFreeze.bind(Ie), + Ie.setUseProxies.bind(Ie), + Ie.applyPatches.bind(Ie), + Ie.createDraft.bind(Ie), + Ie.finishDraft.bind(Ie), + ke), + Be = n(1413); + function Pe(e) { + return ( + "Minified Redux error #" + + e + + "; visit https://redux.js.org/Errors?code=" + + e + + " for the full message or use the non-minified dev environment for full errors. " + ); + } + var Le = + ("function" === typeof Symbol && Symbol.observable) || "@@observable", + De = function () { + return Math.random().toString(36).substring(7).split("").join("."); + }, + Ue = { + INIT: "@@redux/INIT" + De(), + REPLACE: "@@redux/REPLACE" + De(), + PROBE_UNKNOWN_ACTION: function () { + return "@@redux/PROBE_UNKNOWN_ACTION" + De(); + }, + }; + function Fe(e) { + if ("object" !== typeof e || null === e) return !1; + for (var t = e; null !== Object.getPrototypeOf(t); ) + t = Object.getPrototypeOf(t); + return Object.getPrototypeOf(e) === t; + } + function Oe(e, t, n) { + var r; + if ( + ("function" === typeof t && "function" === typeof n) || + ("function" === typeof n && "function" === typeof arguments[3]) + ) + throw new Error(Pe(0)); + if ( + ("function" === typeof t && + "undefined" === typeof n && + ((n = t), (t = void 0)), + "undefined" !== typeof n) + ) { + if ("function" !== typeof n) throw new Error(Pe(1)); + return n(Oe)(e, t); + } + if ("function" !== typeof e) throw new Error(Pe(2)); + var i = e, + a = t, + o = [], + s = o, + l = !1; + function u() { + s === o && (s = o.slice()); + } + function c() { + if (l) throw new Error(Pe(3)); + return a; + } + function f(e) { + if ("function" !== typeof e) throw new Error(Pe(4)); + if (l) throw new Error(Pe(5)); + var t = !0; + return ( + u(), + s.push(e), + function () { + if (t) { + if (l) throw new Error(Pe(6)); + (t = !1), u(); + var n = s.indexOf(e); + s.splice(n, 1), (o = null); + } + } + ); + } + function d(e) { + if (!Fe(e)) throw new Error(Pe(7)); + if ("undefined" === typeof e.type) throw new Error(Pe(8)); + if (l) throw new Error(Pe(9)); + try { + (l = !0), (a = i(a, e)); + } finally { + l = !1; + } + for (var t = (o = s), n = 0; n < t.length; n++) { + (0, t[n])(); + } + return e; + } + return ( + d({ type: Ue.INIT }), + ((r = { + dispatch: d, + subscribe: f, + getState: c, + replaceReducer: function (e) { + if ("function" !== typeof e) throw new Error(Pe(10)); + (i = e), d({ type: Ue.REPLACE }); + }, + })[Le] = function () { + var e, + t = f; + return ( + (e = { + subscribe: function (e) { + if ("object" !== typeof e || null === e) + throw new Error(Pe(11)); + function n() { + e.next && e.next(c()); + } + return n(), { unsubscribe: t(n) }; + }, + }), + (e[Le] = function () { + return this; + }), + e + ); + }), + r + ); + } + function Ne(e) { + for (var t = Object.keys(e), n = {}, r = 0; r < t.length; r++) { + var i = t[r]; + 0, "function" === typeof e[i] && (n[i] = e[i]); + } + var a, + o = Object.keys(n); + try { + !(function (e) { + Object.keys(e).forEach(function (t) { + var n = e[t]; + if ("undefined" === typeof n(void 0, { type: Ue.INIT })) + throw new Error(Pe(12)); + if ( + "undefined" === + typeof n(void 0, { type: Ue.PROBE_UNKNOWN_ACTION() }) + ) + throw new Error(Pe(13)); + }); + })(n); + } catch (s) { + a = s; + } + return function (e, t) { + if ((void 0 === e && (e = {}), a)) throw a; + for (var r = !1, i = {}, s = 0; s < o.length; s++) { + var l = o[s], + u = n[l], + c = e[l], + f = u(c, t); + if ("undefined" === typeof f) { + t && t.type; + throw new Error(Pe(14)); + } + (i[l] = f), (r = r || f !== c); + } + return (r = r || o.length !== Object.keys(e).length) ? i : e; + }; + } + function Ge() { + for (var e = arguments.length, t = new Array(e), n = 0; n < e; n++) + t[n] = arguments[n]; + return 0 === t.length + ? function (e) { + return e; + } + : 1 === t.length + ? t[0] + : t.reduce(function (e, t) { + return function () { + return e(t.apply(void 0, arguments)); + }; + }); + } + function Ze() { + for (var e = arguments.length, t = new Array(e), n = 0; n < e; n++) + t[n] = arguments[n]; + return function (e) { + return function () { + var n = e.apply(void 0, arguments), + r = function () { + throw new Error(Pe(15)); + }, + i = { + getState: n.getState, + dispatch: function () { + return r.apply(void 0, arguments); + }, + }, + a = t.map(function (e) { + return e(i); + }); + return ( + (r = Ge.apply(void 0, a)(n.dispatch)), + (0, Be.Z)((0, Be.Z)({}, n), {}, { dispatch: r }) + ); + }; + }; + } + function ze(e) { + return function (t) { + var n = t.dispatch, + r = t.getState; + return function (t) { + return function (i) { + return "function" === typeof i ? i(n, r, e) : t(i); + }; + }; + }; + } + var Qe = ze(); + Qe.withExtraArgument = ze; + var He = Qe, + Ve = (function () { + var e = function (t, n) { + return ( + (e = + Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && + function (e, t) { + e.__proto__ = t; + }) || + function (e, t) { + for (var n in t) + Object.prototype.hasOwnProperty.call(t, n) && (e[n] = t[n]); + }), + e(t, n) + ); + }; + return function (t, n) { + if ("function" !== typeof n && null !== n) + throw new TypeError( + "Class extends value " + + String(n) + + " is not a constructor or null" + ); + function r() { + this.constructor = t; + } + e(t, n), + (t.prototype = + null === n + ? Object.create(n) + : ((r.prototype = n.prototype), new r())); + }; + })(), + je = function (e, t) { + var n, + r, + i, + a, + o = { + label: 0, + sent: function () { + if (1 & i[0]) throw i[1]; + return i[1]; + }, + trys: [], + ops: [], + }; + return ( + (a = { next: s(0), throw: s(1), return: s(2) }), + "function" === typeof Symbol && + (a[Symbol.iterator] = function () { + return this; + }), + a + ); + function s(a) { + return function (s) { + return (function (a) { + if (n) throw new TypeError("Generator is already executing."); + for (; o; ) + try { + if ( + ((n = 1), + r && + (i = + 2 & a[0] + ? r.return + : a[0] + ? r.throw || ((i = r.return) && i.call(r), 0) + : r.next) && + !(i = i.call(r, a[1])).done) + ) + return i; + switch (((r = 0), i && (a = [2 & a[0], i.value]), a[0])) { + case 0: + case 1: + i = a; + break; + case 4: + return o.label++, { value: a[1], done: !1 }; + case 5: + o.label++, (r = a[1]), (a = [0]); + continue; + case 7: + (a = o.ops.pop()), o.trys.pop(); + continue; + default: + if ( + !(i = (i = o.trys).length > 0 && i[i.length - 1]) && + (6 === a[0] || 2 === a[0]) + ) { + o = 0; + continue; + } + if (3 === a[0] && (!i || (a[1] > i[0] && a[1] < i[3]))) { + o.label = a[1]; + break; + } + if (6 === a[0] && o.label < i[1]) { + (o.label = i[1]), (i = a); + break; + } + if (i && o.label < i[2]) { + (o.label = i[2]), o.ops.push(a); + break; + } + i[2] && o.ops.pop(), o.trys.pop(); + continue; + } + a = t.call(e, o); + } catch (s) { + (a = [6, s]), (r = 0); + } finally { + n = i = 0; + } + if (5 & a[0]) throw a[1]; + return { value: a[0] ? a[1] : void 0, done: !0 }; + })([a, s]); + }; + } + }, + We = function (e, t) { + for (var n = 0, r = t.length, i = e.length; n < r; n++, i++) + e[i] = t[n]; + return e; + }, + Xe = Object.defineProperty, + Ye = Object.defineProperties, + qe = Object.getOwnPropertyDescriptors, + Je = Object.getOwnPropertySymbols, + Ke = Object.prototype.hasOwnProperty, + $e = Object.prototype.propertyIsEnumerable, + et = function (e, t, n) { + return t in e + ? Xe(e, t, { + enumerable: !0, + configurable: !0, + writable: !0, + value: n, + }) + : (e[t] = n); + }, + tt = function (e, t) { + for (var n in t || (t = {})) Ke.call(t, n) && et(e, n, t[n]); + if (Je) + for (var r = 0, i = Je(t); r < i.length; r++) { + n = i[r]; + $e.call(t, n) && et(e, n, t[n]); + } + return e; + }, + nt = function (e, t) { + return Ye(e, qe(t)); + }, + rt = function (e, t, n) { + return new Promise(function (r, i) { + var a = function (e) { + try { + s(n.next(e)); + } catch (t) { + i(t); + } + }, + o = function (e) { + try { + s(n.throw(e)); + } catch (t) { + i(t); + } + }, + s = function (e) { + return e.done ? r(e.value) : Promise.resolve(e.value).then(a, o); + }; + s((n = n.apply(e, t)).next()); + }); + }, + it = + "undefined" !== typeof window && + window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ + ? window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ + : function () { + if (0 !== arguments.length) + return "object" === typeof arguments[0] + ? Ge + : Ge.apply(null, arguments); + }; + "undefined" !== typeof window && + window.__REDUX_DEVTOOLS_EXTENSION__ && + window.__REDUX_DEVTOOLS_EXTENSION__; + function at(e) { + if ("object" !== typeof e || null === e) return !1; + var t = Object.getPrototypeOf(e); + if (null === t) return !0; + for (var n = t; null !== Object.getPrototypeOf(n); ) + n = Object.getPrototypeOf(n); + return t === n; + } + function ot(e, t) { + function n() { + for (var n = [], r = 0; r < arguments.length; r++) n[r] = arguments[r]; + if (t) { + var i = t.apply(void 0, n); + if (!i) throw new Error("prepareAction did not return an object"); + return tt( + tt( + { type: e, payload: i.payload }, + "meta" in i && { meta: i.meta } + ), + "error" in i && { error: i.error } + ); + } + return { type: e, payload: n[0] }; + } + return ( + (n.toString = function () { + return "" + e; + }), + (n.type = e), + (n.match = function (t) { + return t.type === e; + }), + n + ); + } + var st = (function (e) { + function t() { + for (var n = [], r = 0; r < arguments.length; r++) + n[r] = arguments[r]; + var i = e.apply(this, n) || this; + return Object.setPrototypeOf(i, t.prototype), i; + } + return ( + Ve(t, e), + Object.defineProperty(t, Symbol.species, { + get: function () { + return t; + }, + enumerable: !1, + configurable: !0, + }), + (t.prototype.concat = function () { + for (var t = [], n = 0; n < arguments.length; n++) + t[n] = arguments[n]; + return e.prototype.concat.apply(this, t); + }), + (t.prototype.prepend = function () { + for (var e = [], n = 0; n < arguments.length; n++) + e[n] = arguments[n]; + return 1 === e.length && Array.isArray(e[0]) + ? new (t.bind.apply(t, We([void 0], e[0].concat(this))))() + : new (t.bind.apply(t, We([void 0], e.concat(this))))(); + }), + t + ); + })(Array), + lt = (function (e) { + function t() { + for (var n = [], r = 0; r < arguments.length; r++) + n[r] = arguments[r]; + var i = e.apply(this, n) || this; + return Object.setPrototypeOf(i, t.prototype), i; + } + return ( + Ve(t, e), + Object.defineProperty(t, Symbol.species, { + get: function () { + return t; + }, + enumerable: !1, + configurable: !0, + }), + (t.prototype.concat = function () { + for (var t = [], n = 0; n < arguments.length; n++) + t[n] = arguments[n]; + return e.prototype.concat.apply(this, t); + }), + (t.prototype.prepend = function () { + for (var e = [], n = 0; n < arguments.length; n++) + e[n] = arguments[n]; + return 1 === e.length && Array.isArray(e[0]) + ? new (t.bind.apply(t, We([void 0], e[0].concat(this))))() + : new (t.bind.apply(t, We([void 0], e.concat(this))))(); + }), + t + ); + })(Array); + function ut(e) { + return P(e) ? Re(e, function () {}) : e; + } + function ct() { + return function (e) { + return (function (e) { + void 0 === e && (e = {}); + var t = e.thunk, + n = void 0 === t || t, + r = + (e.immutableCheck, + e.serializableCheck, + e.actionCreatorCheck, + new st()); + n && + (!(function (e) { + return "boolean" === typeof e; + })(n) + ? r.push(He.withExtraArgument(n.extraArgument)) + : r.push(He)); + 0; + return r; + })(e); + }; + } + function ft(e) { + var t, + n = {}, + r = [], + i = { + addCase: function (e, t) { + var r = "string" === typeof e ? e : e.type; + if (!r) + throw new Error( + "`builder.addCase` cannot be called with an empty action type" + ); + if (r in n) + throw new Error( + "`builder.addCase` cannot be called with two reducers for the same action type" + ); + return (n[r] = t), i; + }, + addMatcher: function (e, t) { + return r.push({ matcher: e, reducer: t }), i; + }, + addDefaultCase: function (e) { + return (t = e), i; + }, + }; + return e(i), [n, r, t]; + } + var dt = function (e) { + void 0 === e && (e = 21); + for (var t = "", n = e; n--; ) + t += + "ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW"[ + (64 * Math.random()) | 0 + ]; + return t; + }, + ht = ["name", "message", "stack", "code"], + pt = function (e, t) { + (this.payload = e), (this.meta = t); + }, + vt = function (e, t) { + (this.payload = e), (this.meta = t); + }, + mt = function (e) { + if ("object" === typeof e && null !== e) { + for (var t = {}, n = 0, r = ht; n < r.length; n++) { + var i = r[n]; + "string" === typeof e[i] && (t[i] = e[i]); + } + return t; + } + return { message: String(e) }; + }; + !(function () { + function e(e, t, n) { + var r = ot(e + "/fulfilled", function (e, t, n, r) { + return { + payload: e, + meta: nt(tt({}, r || {}), { + arg: n, + requestId: t, + requestStatus: "fulfilled", + }), + }; + }), + i = ot(e + "/pending", function (e, t, n) { + return { + payload: void 0, + meta: nt(tt({}, n || {}), { + arg: t, + requestId: e, + requestStatus: "pending", + }), + }; + }), + a = ot(e + "/rejected", function (e, t, r, i, a) { + return { + payload: i, + error: ((n && n.serializeError) || mt)(e || "Rejected"), + meta: nt(tt({}, a || {}), { + arg: r, + requestId: t, + rejectedWithValue: !!i, + requestStatus: "rejected", + aborted: "AbortError" === (null == e ? void 0 : e.name), + condition: "ConditionError" === (null == e ? void 0 : e.name), + }), + }; + }), + o = + "undefined" !== typeof AbortController + ? AbortController + : (function () { + function e() { + this.signal = { + aborted: !1, + addEventListener: function () {}, + dispatchEvent: function () { + return !1; + }, + onabort: function () {}, + removeEventListener: function () {}, + reason: void 0, + throwIfAborted: function () {}, + }; + } + return ( + (e.prototype.abort = function () { + 0; + }), + e + ); + })(); + return Object.assign( + function (e) { + return function (s, l, u) { + var c, + f = (null == n ? void 0 : n.idGenerator) + ? n.idGenerator(e) + : dt(), + d = new o(); + function h(e) { + (c = e), d.abort(); + } + var p = (function () { + return rt(this, null, function () { + var o, p, v, m, g, A; + return je(this, function (y) { + switch (y.label) { + case 0: + return ( + y.trys.push([0, 4, , 5]), + (m = + null == (o = null == n ? void 0 : n.condition) + ? void 0 + : o.call(n, e, { getState: l, extra: u })), + null === (b = m) || + "object" !== typeof b || + "function" !== typeof b.then + ? [3, 2] + : [4, m] + ); + case 1: + (m = y.sent()), (y.label = 2); + case 2: + if (!1 === m || d.signal.aborted) + throw { + name: "ConditionError", + message: + "Aborted due to condition callback returning false.", + }; + return ( + !0, + (g = new Promise(function (e, t) { + return d.signal.addEventListener( + "abort", + function () { + return t({ + name: "AbortError", + message: c || "Aborted", + }); + } + ); + })), + s( + i( + f, + e, + null == + (p = null == n ? void 0 : n.getPendingMeta) + ? void 0 + : p.call( + n, + { requestId: f, arg: e }, + { getState: l, extra: u } + ) + ) + ), + [ + 4, + Promise.race([ + g, + Promise.resolve( + t(e, { + dispatch: s, + getState: l, + extra: u, + requestId: f, + signal: d.signal, + abort: h, + rejectWithValue: function (e, t) { + return new pt(e, t); + }, + fulfillWithValue: function (e, t) { + return new vt(e, t); + }, + }) + ).then(function (t) { + if (t instanceof pt) throw t; + return t instanceof vt + ? r(t.payload, f, e, t.meta) + : r(t, f, e); + }), + ]), + ] + ); + case 3: + return (v = y.sent()), [3, 5]; + case 4: + return ( + (A = y.sent()), + (v = + A instanceof pt + ? a(null, f, e, A.payload, A.meta) + : a(A, f, e)), + [3, 5] + ); + case 5: + return ( + (n && + !n.dispatchConditionRejection && + a.match(v) && + v.meta.condition) || + s(v), + [2, v] + ); + } + var b; + }); + }); + })(); + return Object.assign(p, { + abort: h, + requestId: f, + arg: e, + unwrap: function () { + return p.then(gt); + }, + }); + }; + }, + { pending: i, rejected: a, fulfilled: r, typePrefix: e } + ); + } + e.withTypes = function () { + return e; + }; + })(); + function gt(e) { + if (e.meta && e.meta.rejectedWithValue) throw e.payload; + if (e.error) throw e.error; + return e.payload; + } + Object.assign; + var At = "listenerMiddleware"; + ot(At + "/add"), ot(At + "/removeAll"), ot(At + "/remove"); + "function" === typeof queueMicrotask && + queueMicrotask.bind( + "undefined" !== typeof window + ? window + : "undefined" !== typeof n.g + ? n.g + : globalThis + ); + var yt, + bt = function (e) { + return function (t) { + setTimeout(t, e); + }; + }; + "undefined" !== typeof window && window.requestAnimationFrame + ? window.requestAnimationFrame + : bt(10); + de(); + var xt = n(3433), + St = [ + { id: 1, name: "Shirt", price: 1e3, totalPrice: 1e3, quantity: 1 }, + { id: 2, name: "Watch", price: 2e3, totalPrice: 2e3, quantity: 1 }, + { id: 3, name: "Bag", price: 3e3, totalPrice: 3e3, quantity: 1 }, + ], + Et = (function (e) { + var t = e.name; + if (!t) throw new Error("`name` is a required option for createSlice"); + var n, + r = + "function" == typeof e.initialState + ? e.initialState + : ut(e.initialState), + i = e.reducers || {}, + a = Object.keys(i), + o = {}, + s = {}, + l = {}; + function u() { + var t = + "function" === typeof e.extraReducers + ? ft(e.extraReducers) + : [e.extraReducers], + n = t[0], + i = void 0 === n ? {} : n, + a = t[1], + o = void 0 === a ? [] : a, + l = t[2], + u = void 0 === l ? void 0 : l, + c = tt(tt({}, i), s); + return (function (e, t, n, r) { + void 0 === n && (n = []); + var i, + a = "function" === typeof t ? ft(t) : [t, n, r], + o = a[0], + s = a[1], + l = a[2]; + if ( + (function (e) { + return "function" === typeof e; + })(e) + ) + i = function () { + return ut(e()); + }; + else { + var u = ut(e); + i = function () { + return u; + }; + } + function c(e, t) { + void 0 === e && (e = i()); + var n = We( + [o[t.type]], + s + .filter(function (e) { + return (0, e.matcher)(t); + }) + .map(function (e) { + return e.reducer; + }) + ); + return ( + 0 === + n.filter(function (e) { + return !!e; + }).length && (n = [l]), + n.reduce(function (e, n) { + if (n) { + var r; + if (B(e)) return void 0 === (r = n(e, t)) ? e : r; + if (P(e)) + return Re(e, function (e) { + return n(e, t); + }); + if (void 0 === (r = n(e, t))) { + if (null === e) return e; + throw Error( + "A case reducer on a non-draftable value must not return undefined" + ); + } + return r; + } + return e; + }, e) + ); + } + return (c.getInitialState = i), c; + })(r, function (e) { + for (var t in c) e.addCase(t, c[t]); + for (var n = 0, r = o; n < r.length; n++) { + var i = r[n]; + e.addMatcher(i.matcher, i.reducer); + } + u && e.addDefaultCase(u); + }); + } + return ( + a.forEach(function (e) { + var n, + r, + a = i[e], + u = t + "/" + e; + "reducer" in a ? ((n = a.reducer), (r = a.prepare)) : (n = a), + (o[e] = n), + (s[u] = n), + (l[e] = r ? ot(u, r) : ot(u)); + }), + { + name: t, + reducer: function (e, t) { + return n || (n = u()), n(e, t); + }, + actions: l, + caseReducers: o, + getInitialState: function () { + return n || (n = u()), n.getInitialState(); + }, + } + ); + })({ + name: "products", + initialState: { + products: [].concat(St), + buyed_products: [], + selectedProduct: null, + blockChainDetails: [], + id: 0, + position: [-7, 0, 0], + showReceipt: !1, + showHistory: !1, + showAddProducts: !1, + }, + reducers: { + addProduct: function (e, t) { + e.products = [].concat((0, xt.Z)(e.products), [t.payload]); + }, + buyProducts: function (e, t) { + (e.buyed_products = [].concat((0, xt.Z)(e.buyed_products), [ + t.payload, + ])), + (e.showReceipt = !0); + }, + selectedProducts: function (e, t) { + e.selectedProduct = t.payload; + }, + onClear: function (e, t) { + e.selectedProduct = null; + }, + onClose: function (e, t) { + e.showReceipt = !1; + }, + onShowAddProducts: function (e, t) { + e.showAddProducts = !e.showAddProducts; + }, + onShowHistory: function (e, t) { + (e.showHistory = !e.showHistory), (e.showAddProducts = !1); + }, + onRefreshClick: function (e, t) { + (e.products = [].concat(St)), + (e.buyed_products = []), + (e.selectedProduct = null), + (e.blockChainDetails = []), + (e.id = 0), + (e.position = [-7, 0, 0]), + (e.showReceipt = !1), + (e.showHistory = !1), + (e.showAddProducts = !1); + }, + updateProductQuantity: function (e, t) { + var n = t.payload, + r = n.productId, + i = n.quantity, + a = e.products.find(function (e) { + return e.id === r; + }); + a && ((a.quantity = i), (a.totalPrice = a.price * i)); + }, + updateBlockChainDetails: function (e, t) { + e.blockChainDetails = [].concat((0, xt.Z)(e.blockChainDetails), [ + t.payload, + ]); + }, + }, + }), + _t = Et.actions, + Ct = _t.addProduct, + wt = (_t.removeProduct, _t.updateProductQuantity), + Tt = (_t.purchaseProduct, _t.buyProducts), + Mt = _t.selectedProducts, + It = (_t.onClear, _t.updateBlockChainDetails), + kt = _t.onClose, + Rt = _t.onShowHistory, + Bt = _t.onShowAddProducts, + Pt = _t.onRefreshClick, + Lt = (function (e) { + var t, + n = ct(), + r = e || {}, + i = r.reducer, + a = void 0 === i ? void 0 : i, + o = r.middleware, + s = void 0 === o ? n() : o, + l = r.devTools, + u = void 0 === l || l, + c = r.preloadedState, + f = void 0 === c ? void 0 : c, + d = r.enhancers, + h = void 0 === d ? void 0 : d; + if ("function" === typeof a) t = a; + else { + if (!at(a)) + throw new Error( + '"reducer" is a required argument, and must be a function or an object of functions that can be passed to combineReducers' + ); + t = Ne(a); + } + var p = s; + "function" === typeof p && (p = p(n)); + var v = Ze.apply(void 0, p), + m = Ge; + u && (m = it(tt({ trace: !1 }, "object" === typeof u && u))); + var g = new lt(v), + A = g; + return ( + Array.isArray(h) + ? (A = We([v], h)) + : "function" === typeof h && (A = h(g)), + Oe(t, f, m.apply(void 0, A)) + ); + })({ reducer: { products: Et.reducer } }), + Dt = Lt, + Ut = n(184), + Ft = function () { + return (0, Ut.jsx)("div", { + style: { + height: "6rem", + display: "flex", + justifyContent: "flex-start", + paddingInline: 10, + }, + children: (0, Ut.jsxs)("svg", { + style: { width: "100%" }, + children: [ + (0, Ut.jsx)("line", { + x1: 0, + x2: 150, + y1: "50%", + y2: "50%", + fill: "none", + style: { + stroke: "#22eff1", + strokeWidth: 2, + strokeLinecap: "round", + }, + }), + (0, Ut.jsx)("line", { + x1: 120, + x2: 150, + y1: 90, + y2: 50, + fill: "none", + style: { + stroke: "#22eff1", + strokeWidth: 2, + strokeLinecap: "round", + }, + }), + (0, Ut.jsx)("line", { + x1: 120, + x2: 290, + y1: 90, + y2: 90, + fill: "none", + style: { + stroke: "#22eff1", + strokeWidth: 2, + strokeLinecap: "round", + }, + }), + (0, Ut.jsx)("line", { + x1: 290, + x2: 330, + y1: 90, + y2: 50, + fill: "none", + style: { + stroke: "#22eff1", + strokeWidth: 2, + strokeLinecap: "round", + }, + }), + (0, Ut.jsx)("line", { + x1: 330, + x2: "150%", + y1: 50, + y2: 50, + fill: "none", + style: { + stroke: "#33c8cc", + strokeWidth: 2, + strokeLinecap: "round", + }, + }), + (0, Ut.jsx)("line", { + x1: 330, + x2: "150%", + y1: 55, + y2: 55, + fill: "none", + style: { + stroke: "#1bfaff", + strokeWidth: 2, + strokeLinecap: "round", + }, + }), + (0, Ut.jsx)("text", { + style: { fontSize: 18, fontStyle: "normal", fill: "white" }, + transform: "translate(160,70)", + children: "Online Shopping", + }), + ], + }), + }); + }, + Ot = n(9439), + Nt = n(7462), + Gt = n(3366), + Zt = n(3733), + zt = n(4419), + Qt = n(8252), + Ht = n(724), + Vt = n(1046), + jt = n(2466), + Wt = n(6189), + Xt = n(6117), + Yt = n(5202), + qt = n(2876), + Jt = n(2254), + Kt = ["onChange", "maxRows", "minRows", "style", "value"]; + function $t(e) { + return parseInt(e, 10) || 0; + } + var en = { + visibility: "hidden", + position: "absolute", + overflow: "hidden", + height: 0, + top: 0, + left: 0, + transform: "translateZ(0)", + }; + function tn(e) { + return ( + void 0 === e || + null === e || + 0 === Object.keys(e).length || + (0 === e.outerHeightStyle && !e.overflow) + ); + } + var nn = e.forwardRef(function (t, n) { + var r = t.onChange, + i = t.maxRows, + o = t.minRows, + s = void 0 === o ? 1 : o, + l = t.style, + u = t.value, + c = (0, Gt.Z)(t, Kt), + f = e.useRef(null != u).current, + d = e.useRef(null), + h = (0, Xt.Z)(n, d), + p = e.useRef(null), + v = e.useRef(0), + m = e.useState({ outerHeightStyle: 0 }), + g = (0, Ot.Z)(m, 2), + A = g[0], + y = g[1], + b = e.useCallback( + function () { + var e = d.current, + n = (0, Yt.Z)(e).getComputedStyle(e); + if ("0px" === n.width) return { outerHeightStyle: 0 }; + var r = p.current; + (r.style.width = n.width), + (r.value = e.value || t.placeholder || "x"), + "\n" === r.value.slice(-1) && (r.value += " "); + var a = n.boxSizing, + o = $t(n.paddingBottom) + $t(n.paddingTop), + l = $t(n.borderBottomWidth) + $t(n.borderTopWidth), + u = r.scrollHeight; + r.value = "x"; + var c = r.scrollHeight, + f = u; + return ( + s && (f = Math.max(Number(s) * c, f)), + i && (f = Math.min(Number(i) * c, f)), + { + outerHeightStyle: + (f = Math.max(f, c)) + ("border-box" === a ? o + l : 0), + overflow: Math.abs(f - u) <= 1, + } + ); + }, + [i, s, t.placeholder] + ), + x = function (e, t) { + var n = t.outerHeightStyle, + r = t.overflow; + return v.current < 20 && + ((n > 0 && Math.abs((e.outerHeightStyle || 0) - n) > 1) || + e.overflow !== r) + ? ((v.current += 1), { overflow: r, outerHeightStyle: n }) + : e; + }, + S = e.useCallback( + function () { + var e = b(); + tn(e) || + y(function (t) { + return x(t, e); + }); + }, + [b] + ); + (0, qt.Z)( + function () { + var e, + t, + n = function () { + (v.current = 0), + (function () { + var e = b(); + tn(e) || + a.flushSync(function () { + y(function (t) { + return x(t, e); + }); + }); + })(); + }, + r = (0, Jt.Z)(n), + i = d.current, + o = (0, Yt.Z)(i); + return ( + o.addEventListener("resize", r), + "undefined" !== typeof ResizeObserver && + (t = new ResizeObserver(n)).observe(i), + function () { + r.clear(), + cancelAnimationFrame(e), + o.removeEventListener("resize", r), + t && t.disconnect(); + } + ); + }, + [b] + ), + (0, qt.Z)(function () { + S(); + }), + e.useEffect( + function () { + v.current = 0; + }, + [u] + ); + return (0, Ut.jsxs)(e.Fragment, { + children: [ + (0, Ut.jsx)( + "textarea", + (0, Nt.Z)( + { + value: u, + onChange: function (e) { + (v.current = 0), f || S(), r && r(e); + }, + ref: h, + rows: s, + style: (0, Nt.Z)( + { + height: A.outerHeightStyle, + overflow: A.overflow ? "hidden" : void 0, + }, + l + ), + }, + c + ) + ), + (0, Ut.jsx)("textarea", { + "aria-hidden": !0, + className: t.className, + readOnly: !0, + ref: p, + tabIndex: -1, + style: (0, Nt.Z)({}, en, l, { paddingTop: 0, paddingBottom: 0 }), + }), + ], + }); + }); + function rn(e) { + return "string" === typeof e; + } + function an(e) { + var t = e.props, + n = e.states, + r = e.muiFormControl; + return n.reduce(function (e, n) { + return ( + (e[n] = t[n]), r && "undefined" === typeof t[n] && (e[n] = r[n]), e + ); + }, {}); + } + var on = e.createContext(void 0); + function sn() { + return e.useContext(on); + } + var ln = n(4036), + un = n(2071), + cn = n(162), + fn = n(2564), + dn = n(5438), + hn = n(2561), + pn = n(9140), + vn = + (n(3361), + (0, fn.w)(function (t, n) { + var r = t.styles, + i = (0, pn.O)([r], void 0, e.useContext(fn.T)); + if (!fn.i) { + for (var a, o = i.name, s = i.styles, l = i.next; void 0 !== l; ) + (o += " " + l.name), (s += l.styles), (l = l.next); + var u = !0 === n.compat, + c = n.insert("", { name: o, styles: s }, n.sheet, u); + return u + ? null + : e.createElement( + "style", + (((a = {})["data-emotion"] = n.key + "-global " + o), + (a.dangerouslySetInnerHTML = { __html: c }), + (a.nonce = n.sheet.nonce), + a) + ); + } + var f = e.useRef(); + return ( + (0, hn.j)( + function () { + var e = n.key + "-global", + t = new n.sheet.constructor({ + key: e, + nonce: n.sheet.nonce, + container: n.sheet.container, + speedy: n.sheet.isSpeedy, + }), + r = !1, + a = document.querySelector( + 'style[data-emotion="' + e + " " + i.name + '"]' + ); + return ( + n.sheet.tags.length && (t.before = n.sheet.tags[0]), + null !== a && + ((r = !0), + a.setAttribute("data-emotion", e), + t.hydrate([a])), + (f.current = [t, r]), + function () { + t.flush(); + } + ); + }, + [n] + ), + (0, hn.j)( + function () { + var e = f.current, + t = e[0]; + if (e[1]) e[1] = !1; + else { + if ( + (void 0 !== i.next && (0, dn.My)(n, i.next, !0), + t.tags.length) + ) { + var r = t.tags[t.tags.length - 1].nextElementSibling; + (t.before = r), t.flush(); + } + n.insert("", i, t, !1); + } + }, + [n, i.name] + ), + null + ); + })); + function mn() { + for (var e = arguments.length, t = new Array(e), n = 0; n < e; n++) + t[n] = arguments[n]; + return (0, pn.O)(t); + } + var gn = function () { + var e = mn.apply(void 0, arguments), + t = "animation-" + e.name; + return { + name: t, + styles: "@keyframes " + t + "{" + e.styles + "}", + anim: 1, + toString: function () { + return "_EMO_" + this.name + "_" + this.styles + "_EMO_"; + }, + }; + }; + function An(e) { + var t = e.styles, + n = e.defaultTheme, + r = void 0 === n ? {} : n, + i = + "function" === typeof t + ? function (e) { + return t( + void 0 === (n = e) || + null === n || + 0 === Object.keys(n).length + ? r + : e + ); + var n; + } + : t; + return (0, Ut.jsx)(vn, { styles: i }); + } + var yn = n(418); + var bn = function (e) { + var t = e.styles, + n = e.themeId, + r = e.defaultTheme, + i = void 0 === r ? {} : r, + a = (0, yn.Z)(i), + o = "function" === typeof t ? t((n && a[n]) || a) : t; + return (0, Ut.jsx)(An, { styles: o }); + }, + xn = n(4591), + Sn = n(988); + var En = function (e) { + return (0, Ut.jsx)( + bn, + (0, Nt.Z)({}, e, { defaultTheme: xn.Z, themeId: Sn.Z }) + ); + }; + function _n(e) { + return null != e && !(Array.isArray(e) && 0 === e.length); + } + function Cn(e) { + var t = arguments.length > 1 && void 0 !== arguments[1] && arguments[1]; + return ( + e && + ((_n(e.value) && "" !== e.value) || + (t && _n(e.defaultValue) && "" !== e.defaultValue)) + ); + } + var wn = n(5878), + Tn = n(1217); + function Mn(e) { + return (0, Tn.Z)("MuiInputBase", e); + } + var In = (0, wn.Z)("MuiInputBase", [ + "root", + "formControl", + "focused", + "disabled", + "adornedStart", + "adornedEnd", + "error", + "sizeSmall", + "multiline", + "colorSecondary", + "fullWidth", + "hiddenLabel", + "readOnly", + "input", + "inputSizeSmall", + "inputMultiline", + "inputTypeSearch", + "inputAdornedStart", + "inputAdornedEnd", + "inputHiddenLabel", + ]), + kn = [ + "aria-describedby", + "autoComplete", + "autoFocus", + "className", + "color", + "components", + "componentsProps", + "defaultValue", + "disabled", + "disableInjectingGlobalStyles", + "endAdornment", + "error", + "fullWidth", + "id", + "inputComponent", + "inputProps", + "inputRef", + "margin", + "maxRows", + "minRows", + "multiline", + "name", + "onBlur", + "onChange", + "onClick", + "onFocus", + "onKeyDown", + "onKeyUp", + "placeholder", + "readOnly", + "renderSuffix", + "rows", + "size", + "slotProps", + "slots", + "startAdornment", + "type", + "value", + ], + Rn = function (e, t) { + var n = e.ownerState; + return [ + t.root, + n.formControl && t.formControl, + n.startAdornment && t.adornedStart, + n.endAdornment && t.adornedEnd, + n.error && t.error, + "small" === n.size && t.sizeSmall, + n.multiline && t.multiline, + n.color && t["color".concat((0, ln.Z)(n.color))], + n.fullWidth && t.fullWidth, + n.hiddenLabel && t.hiddenLabel, + ]; + }, + Bn = function (e, t) { + var n = e.ownerState; + return [ + t.input, + "small" === n.size && t.inputSizeSmall, + n.multiline && t.inputMultiline, + "search" === n.type && t.inputTypeSearch, + n.startAdornment && t.inputAdornedStart, + n.endAdornment && t.inputAdornedEnd, + n.hiddenLabel && t.inputHiddenLabel, + ]; + }, + Pn = (0, Ht.ZP)("div", { + name: "MuiInputBase", + slot: "Root", + overridesResolver: Rn, + })(function (e) { + var t = e.theme, + n = e.ownerState; + return (0, + Nt.Z)({}, t.typography.body1, (0, l.Z)({ color: (t.vars || t).palette.text.primary, lineHeight: "1.4375em", boxSizing: "border-box", position: "relative", cursor: "text", display: "inline-flex", alignItems: "center" }, "&.".concat(In.disabled), { color: (t.vars || t).palette.text.disabled, cursor: "default" }), n.multiline && (0, Nt.Z)({ padding: "4px 0 5px" }, "small" === n.size && { paddingTop: 1 }), n.fullWidth && { width: "100%" }); + }), + Ln = (0, Ht.ZP)("input", { + name: "MuiInputBase", + slot: "Input", + overridesResolver: Bn, + })(function (e) { + var t, + n = e.theme, + r = e.ownerState, + i = "light" === n.palette.mode, + a = (0, Nt.Z)( + { color: "currentColor" }, + n.vars + ? { opacity: n.vars.opacity.inputPlaceholder } + : { opacity: i ? 0.42 : 0.5 }, + { + transition: n.transitions.create("opacity", { + duration: n.transitions.duration.shorter, + }), + } + ), + o = { opacity: "0 !important" }, + s = n.vars + ? { opacity: n.vars.opacity.inputPlaceholder } + : { opacity: i ? 0.42 : 0.5 }; + return (0, + Nt.Z)(((t = { font: "inherit", letterSpacing: "inherit", color: "currentColor", padding: "4px 0 5px", border: 0, boxSizing: "content-box", background: "none", height: "1.4375em", margin: 0, WebkitTapHighlightColor: "transparent", display: "block", minWidth: 0, width: "100%", animationName: "mui-auto-fill-cancel", animationDuration: "10ms", "&::-webkit-input-placeholder": a, "&::-moz-placeholder": a, "&:-ms-input-placeholder": a, "&::-ms-input-placeholder": a, "&:focus": { outline: 0 }, "&:invalid": { boxShadow: "none" }, "&::-webkit-search-decoration": { WebkitAppearance: "none" } }), (0, l.Z)(t, "label[data-shrink=false] + .".concat(In.formControl, " &"), { "&::-webkit-input-placeholder": o, "&::-moz-placeholder": o, "&:-ms-input-placeholder": o, "&::-ms-input-placeholder": o, "&:focus::-webkit-input-placeholder": s, "&:focus::-moz-placeholder": s, "&:focus:-ms-input-placeholder": s, "&:focus::-ms-input-placeholder": s }), (0, l.Z)(t, "&.".concat(In.disabled), { opacity: 1, WebkitTextFillColor: (n.vars || n).palette.text.disabled }), (0, l.Z)(t, "&:-webkit-autofill", { animationDuration: "5000s", animationName: "mui-auto-fill" }), t), "small" === r.size && { paddingTop: 1 }, r.multiline && { height: "auto", resize: "none", padding: 0, paddingTop: 0 }, "search" === r.type && { MozAppearance: "textfield" }); + }), + Dn = (0, Ut.jsx)(En, { + styles: { + "@keyframes mui-auto-fill": { from: { display: "block" } }, + "@keyframes mui-auto-fill-cancel": { from: { display: "block" } }, + }, + }), + Un = e.forwardRef(function (t, n) { + var r, + i = (0, Vt.Z)({ props: t, name: "MuiInputBase" }), + a = i["aria-describedby"], + o = i.autoComplete, + s = i.autoFocus, + l = i.className, + u = i.components, + c = void 0 === u ? {} : u, + f = i.componentsProps, + d = void 0 === f ? {} : f, + h = i.defaultValue, + p = i.disabled, + v = i.disableInjectingGlobalStyles, + m = i.endAdornment, + g = i.fullWidth, + A = void 0 !== g && g, + y = i.id, + b = i.inputComponent, + x = void 0 === b ? "input" : b, + S = i.inputProps, + E = void 0 === S ? {} : S, + _ = i.inputRef, + C = i.maxRows, + w = i.minRows, + T = i.multiline, + M = void 0 !== T && T, + I = i.name, + k = i.onBlur, + R = i.onChange, + B = i.onClick, + P = i.onFocus, + L = i.onKeyDown, + D = i.onKeyUp, + U = i.placeholder, + F = i.readOnly, + O = i.renderSuffix, + N = i.rows, + G = i.slotProps, + Z = void 0 === G ? {} : G, + z = i.slots, + Q = void 0 === z ? {} : z, + H = i.startAdornment, + V = i.type, + j = void 0 === V ? "text" : V, + W = i.value, + X = (0, Gt.Z)(i, kn), + Y = null != E.value ? E.value : W, + q = e.useRef(null != Y).current, + J = e.useRef(), + K = e.useCallback(function (e) { + 0; + }, []), + $ = (0, un.Z)(J, _, E.ref, K), + ee = e.useState(!1), + te = (0, Ot.Z)(ee, 2), + ne = te[0], + re = te[1], + ie = sn(); + var ae = an({ + props: i, + muiFormControl: ie, + states: [ + "color", + "disabled", + "error", + "hiddenLabel", + "size", + "required", + "filled", + ], + }); + (ae.focused = ie ? ie.focused : ne), + e.useEffect( + function () { + !ie && p && ne && (re(!1), k && k()); + }, + [ie, p, ne, k] + ); + var oe = ie && ie.onFilled, + se = ie && ie.onEmpty, + le = e.useCallback( + function (e) { + Cn(e) ? oe && oe() : se && se(); + }, + [oe, se] + ); + (0, cn.Z)( + function () { + q && le({ value: Y }); + }, + [Y, le, q] + ); + e.useEffect(function () { + le(J.current); + }, []); + var ue = x, + ce = E; + M && + "input" === ue && + ((ce = N + ? (0, Nt.Z)({ type: void 0, minRows: N, maxRows: N }, ce) + : (0, Nt.Z)({ type: void 0, maxRows: C, minRows: w }, ce)), + (ue = nn)); + e.useEffect( + function () { + ie && ie.setAdornedStart(Boolean(H)); + }, + [ie, H] + ); + var fe = (0, Nt.Z)({}, i, { + color: ae.color || "primary", + disabled: ae.disabled, + endAdornment: m, + error: ae.error, + focused: ae.focused, + formControl: ie, + fullWidth: A, + hiddenLabel: ae.hiddenLabel, + multiline: M, + size: ae.size, + startAdornment: H, + type: j, + }), + de = (function (e) { + var t = e.classes, + n = e.color, + r = e.disabled, + i = e.error, + a = e.endAdornment, + o = e.focused, + s = e.formControl, + l = e.fullWidth, + u = e.hiddenLabel, + c = e.multiline, + f = e.readOnly, + d = e.size, + h = e.startAdornment, + p = e.type, + v = { + root: [ + "root", + "color".concat((0, ln.Z)(n)), + r && "disabled", + i && "error", + l && "fullWidth", + o && "focused", + s && "formControl", + d && "medium" !== d && "size".concat((0, ln.Z)(d)), + c && "multiline", + h && "adornedStart", + a && "adornedEnd", + u && "hiddenLabel", + f && "readOnly", + ], + input: [ + "input", + r && "disabled", + "search" === p && "inputTypeSearch", + c && "inputMultiline", + "small" === d && "inputSizeSmall", + u && "inputHiddenLabel", + h && "inputAdornedStart", + a && "inputAdornedEnd", + f && "readOnly", + ], + }; + return (0, zt.Z)(v, Mn, t); + })(fe), + he = Q.root || c.Root || Pn, + pe = Z.root || d.root || {}, + ve = Q.input || c.Input || Ln; + return ( + (ce = (0, Nt.Z)({}, ce, null != (r = Z.input) ? r : d.input)), + (0, Ut.jsxs)(e.Fragment, { + children: [ + !v && Dn, + (0, Ut.jsxs)( + he, + (0, Nt.Z)( + {}, + pe, + !rn(he) && { ownerState: (0, Nt.Z)({}, fe, pe.ownerState) }, + { + ref: n, + onClick: function (e) { + J.current && + e.currentTarget === e.target && + J.current.focus(), + B && B(e); + }, + }, + X, + { + className: (0, Zt.Z)( + de.root, + pe.className, + l, + F && "MuiInputBase-readOnly" + ), + children: [ + H, + (0, Ut.jsx)(on.Provider, { + value: null, + children: (0, Ut.jsx)( + ve, + (0, Nt.Z)( + { + ownerState: fe, + "aria-invalid": ae.error, + "aria-describedby": a, + autoComplete: o, + autoFocus: s, + defaultValue: h, + disabled: ae.disabled, + id: y, + onAnimationStart: function (e) { + le( + "mui-auto-fill-cancel" === e.animationName + ? J.current + : { value: "x" } + ); + }, + name: I, + placeholder: U, + readOnly: F, + required: ae.required, + rows: N, + value: Y, + onKeyDown: L, + onKeyUp: D, + type: j, + }, + ce, + !rn(ve) && { + as: ue, + ownerState: (0, Nt.Z)({}, fe, ce.ownerState), + }, + { + ref: $, + className: (0, Zt.Z)( + de.input, + ce.className, + F && "MuiInputBase-readOnly" + ), + onBlur: function (e) { + k && k(e), + E.onBlur && E.onBlur(e), + ie && ie.onBlur ? ie.onBlur(e) : re(!1); + }, + onChange: function (e) { + if (!q) { + var t = e.target || J.current; + if (null == t) throw new Error((0, Wt.Z)(1)); + le({ value: t.value }); + } + for ( + var n = arguments.length, + r = new Array(n > 1 ? n - 1 : 0), + i = 1; + i < n; + i++ + ) + r[i - 1] = arguments[i]; + E.onChange && + E.onChange.apply(E, [e].concat(r)), + R && R.apply(void 0, [e].concat(r)); + }, + onFocus: function (e) { + ae.disabled + ? e.stopPropagation() + : (P && P(e), + E.onFocus && E.onFocus(e), + ie && ie.onFocus ? ie.onFocus(e) : re(!0)); + }, + } + ) + ), + }), + m, + O ? O((0, Nt.Z)({}, ae, { startAdornment: H })) : null, + ], + } + ) + ), + ], + }) + ); + }), + Fn = Un; + function On(e) { + return (0, Tn.Z)("MuiInput", e); + } + var Nn = (0, Nt.Z)( + {}, + In, + (0, wn.Z)("MuiInput", ["root", "underline", "input"]) + ), + Gn = [ + "disableUnderline", + "components", + "componentsProps", + "fullWidth", + "inputComponent", + "multiline", + "slotProps", + "slots", + "type", + ], + Zn = (0, Ht.ZP)(Pn, { + shouldForwardProp: function (e) { + return (0, Ht.FO)(e) || "classes" === e; + }, + name: "MuiInput", + slot: "Root", + overridesResolver: function (e, t) { + var n = e.ownerState; + return [].concat((0, xt.Z)(Rn(e, t)), [ + !n.disableUnderline && t.underline, + ]); + }, + })(function (e) { + var t, + n = e.theme, + r = e.ownerState, + i = + "light" === n.palette.mode + ? "rgba(0, 0, 0, 0.42)" + : "rgba(255, 255, 255, 0.7)"; + return ( + n.vars && + (i = "rgba(" + .concat(n.vars.palette.common.onBackgroundChannel, " / ") + .concat(n.vars.opacity.inputUnderline, ")")), + (0, Nt.Z)( + { position: "relative" }, + r.formControl && { "label + &": { marginTop: 16 } }, + !r.disableUnderline && + ((t = { + "&:after": { + borderBottom: "2px solid ".concat( + (n.vars || n).palette[r.color].main + ), + left: 0, + bottom: 0, + content: '""', + position: "absolute", + right: 0, + transform: "scaleX(0)", + transition: n.transitions.create("transform", { + duration: n.transitions.duration.shorter, + easing: n.transitions.easing.easeOut, + }), + pointerEvents: "none", + }, + }), + (0, l.Z)(t, "&.".concat(Nn.focused, ":after"), { + transform: "scaleX(1) translateX(0)", + }), + (0, l.Z)(t, "&.".concat(Nn.error), { + "&:before, &:after": { + borderBottomColor: (n.vars || n).palette.error.main, + }, + }), + (0, l.Z)(t, "&:before", { + borderBottom: "1px solid ".concat(i), + left: 0, + bottom: 0, + content: '"\\00a0"', + position: "absolute", + right: 0, + transition: n.transitions.create("border-bottom-color", { + duration: n.transitions.duration.shorter, + }), + pointerEvents: "none", + }), + (0, l.Z)( + t, + "&:hover:not(." + .concat(Nn.disabled, ", .") + .concat(Nn.error, "):before"), + { + borderBottom: "2px solid ".concat( + (n.vars || n).palette.text.primary + ), + "@media (hover: none)": { + borderBottom: "1px solid ".concat(i), + }, + } + ), + (0, l.Z)(t, "&.".concat(Nn.disabled, ":before"), { + borderBottomStyle: "dotted", + }), + t) + ) + ); + }), + zn = (0, Ht.ZP)(Ln, { + name: "MuiInput", + slot: "Input", + overridesResolver: Bn, + })({}), + Qn = e.forwardRef(function (e, t) { + var n, + r, + i, + a, + o = (0, Vt.Z)({ props: e, name: "MuiInput" }), + s = o.disableUnderline, + l = o.components, + u = void 0 === l ? {} : l, + c = o.componentsProps, + f = o.fullWidth, + d = void 0 !== f && f, + h = o.inputComponent, + p = void 0 === h ? "input" : h, + v = o.multiline, + m = void 0 !== v && v, + g = o.slotProps, + A = o.slots, + y = void 0 === A ? {} : A, + b = o.type, + x = void 0 === b ? "text" : b, + S = (0, Gt.Z)(o, Gn), + E = (function (e) { + var t = e.classes, + n = { + root: ["root", !e.disableUnderline && "underline"], + input: ["input"], + }, + r = (0, zt.Z)(n, On, t); + return (0, Nt.Z)({}, t, r); + })(o), + _ = { root: { ownerState: { disableUnderline: s } } }, + C = (null != g ? g : c) ? (0, jt.Z)(null != g ? g : c, _) : _, + w = null != (n = null != (r = y.root) ? r : u.Root) ? n : Zn, + T = null != (i = null != (a = y.input) ? a : u.Input) ? i : zn; + return (0, + Ut.jsx)(Fn, (0, Nt.Z)({ slots: { root: w, input: T }, slotProps: C, fullWidth: d, inputComponent: p, multiline: m, ref: t, type: x }, S, { classes: E })); + }); + Qn.muiName = "Input"; + var Hn = Qn; + function Vn(e) { + return (0, Tn.Z)("MuiFilledInput", e); + } + var jn = (0, Nt.Z)( + {}, + In, + (0, wn.Z)("MuiFilledInput", ["root", "underline", "input"]) + ), + Wn = [ + "disableUnderline", + "components", + "componentsProps", + "fullWidth", + "hiddenLabel", + "inputComponent", + "multiline", + "slotProps", + "slots", + "type", + ], + Xn = (0, Ht.ZP)(Pn, { + shouldForwardProp: function (e) { + return (0, Ht.FO)(e) || "classes" === e; + }, + name: "MuiFilledInput", + slot: "Root", + overridesResolver: function (e, t) { + var n = e.ownerState; + return [].concat((0, xt.Z)(Rn(e, t)), [ + !n.disableUnderline && t.underline, + ]); + }, + })(function (e) { + var t, + n, + r, + i = e.theme, + a = e.ownerState, + o = "light" === i.palette.mode, + s = o ? "rgba(0, 0, 0, 0.42)" : "rgba(255, 255, 255, 0.7)", + u = o ? "rgba(0, 0, 0, 0.06)" : "rgba(255, 255, 255, 0.09)", + c = o ? "rgba(0, 0, 0, 0.09)" : "rgba(255, 255, 255, 0.13)", + f = o ? "rgba(0, 0, 0, 0.12)" : "rgba(255, 255, 255, 0.12)"; + return (0, + Nt.Z)(((t = { position: "relative", backgroundColor: i.vars ? i.vars.palette.FilledInput.bg : u, borderTopLeftRadius: (i.vars || i).shape.borderRadius, borderTopRightRadius: (i.vars || i).shape.borderRadius, transition: i.transitions.create("background-color", { duration: i.transitions.duration.shorter, easing: i.transitions.easing.easeOut }), "&:hover": { backgroundColor: i.vars ? i.vars.palette.FilledInput.hoverBg : c, "@media (hover: none)": { backgroundColor: i.vars ? i.vars.palette.FilledInput.bg : u } } }), (0, l.Z)(t, "&.".concat(jn.focused), { backgroundColor: i.vars ? i.vars.palette.FilledInput.bg : u }), (0, l.Z)(t, "&.".concat(jn.disabled), { backgroundColor: i.vars ? i.vars.palette.FilledInput.disabledBg : f }), t), !a.disableUnderline && ((n = { "&:after": { borderBottom: "2px solid ".concat(null == (r = (i.vars || i).palette[a.color || "primary"]) ? void 0 : r.main), left: 0, bottom: 0, content: '""', position: "absolute", right: 0, transform: "scaleX(0)", transition: i.transitions.create("transform", { duration: i.transitions.duration.shorter, easing: i.transitions.easing.easeOut }), pointerEvents: "none" } }), (0, l.Z)(n, "&.".concat(jn.focused, ":after"), { transform: "scaleX(1) translateX(0)" }), (0, l.Z)(n, "&.".concat(jn.error), { "&:before, &:after": { borderBottomColor: (i.vars || i).palette.error.main } }), (0, l.Z)(n, "&:before", { borderBottom: "1px solid ".concat(i.vars ? "rgba(".concat(i.vars.palette.common.onBackgroundChannel, " / ").concat(i.vars.opacity.inputUnderline, ")") : s), left: 0, bottom: 0, content: '"\\00a0"', position: "absolute", right: 0, transition: i.transitions.create("border-bottom-color", { duration: i.transitions.duration.shorter }), pointerEvents: "none" }), (0, l.Z)(n, "&:hover:not(.".concat(jn.disabled, ", .").concat(jn.error, "):before"), { borderBottom: "1px solid ".concat((i.vars || i).palette.text.primary) }), (0, l.Z)(n, "&.".concat(jn.disabled, ":before"), { borderBottomStyle: "dotted" }), n), a.startAdornment && { paddingLeft: 12 }, a.endAdornment && { paddingRight: 12 }, a.multiline && (0, Nt.Z)({ padding: "25px 12px 8px" }, "small" === a.size && { paddingTop: 21, paddingBottom: 4 }, a.hiddenLabel && { paddingTop: 16, paddingBottom: 17 })); + }), + Yn = (0, Ht.ZP)(Ln, { + name: "MuiFilledInput", + slot: "Input", + overridesResolver: Bn, + })(function (e) { + var t = e.theme, + n = e.ownerState; + return (0, + Nt.Z)({ paddingTop: 25, paddingRight: 12, paddingBottom: 8, paddingLeft: 12 }, !t.vars && { "&:-webkit-autofill": { WebkitBoxShadow: "light" === t.palette.mode ? null : "0 0 0 100px #266798 inset", WebkitTextFillColor: "light" === t.palette.mode ? null : "#fff", caretColor: "light" === t.palette.mode ? null : "#fff", borderTopLeftRadius: "inherit", borderTopRightRadius: "inherit" } }, t.vars && (0, l.Z)({ "&:-webkit-autofill": { borderTopLeftRadius: "inherit", borderTopRightRadius: "inherit" } }, t.getColorSchemeSelector("dark"), { "&:-webkit-autofill": { WebkitBoxShadow: "0 0 0 100px #266798 inset", WebkitTextFillColor: "#fff", caretColor: "#fff" } }), "small" === n.size && { paddingTop: 21, paddingBottom: 4 }, n.hiddenLabel && { paddingTop: 16, paddingBottom: 17 }, n.multiline && { paddingTop: 0, paddingBottom: 0, paddingLeft: 0, paddingRight: 0 }, n.startAdornment && { paddingLeft: 0 }, n.endAdornment && { paddingRight: 0 }, n.hiddenLabel && "small" === n.size && { paddingTop: 8, paddingBottom: 9 }); + }), + qn = e.forwardRef(function (e, t) { + var n, + r, + i, + a, + o = (0, Vt.Z)({ props: e, name: "MuiFilledInput" }), + s = o.components, + l = void 0 === s ? {} : s, + u = o.componentsProps, + c = o.fullWidth, + f = void 0 !== c && c, + d = o.inputComponent, + h = void 0 === d ? "input" : d, + p = o.multiline, + v = void 0 !== p && p, + m = o.slotProps, + g = o.slots, + A = void 0 === g ? {} : g, + y = o.type, + b = void 0 === y ? "text" : y, + x = (0, Gt.Z)(o, Wn), + S = (0, Nt.Z)({}, o, { + fullWidth: f, + inputComponent: h, + multiline: v, + type: b, + }), + E = (function (e) { + var t = e.classes, + n = { + root: ["root", !e.disableUnderline && "underline"], + input: ["input"], + }, + r = (0, zt.Z)(n, Vn, t); + return (0, Nt.Z)({}, t, r); + })(o), + _ = { root: { ownerState: S }, input: { ownerState: S } }, + C = (null != m ? m : u) ? (0, jt.Z)(null != m ? m : u, _) : _, + w = null != (n = null != (r = A.root) ? r : l.Root) ? n : Xn, + T = null != (i = null != (a = A.input) ? a : l.Input) ? i : Yn; + return (0, + Ut.jsx)(Fn, (0, Nt.Z)({ slots: { root: w, input: T }, componentsProps: C, fullWidth: f, inputComponent: h, multiline: v, ref: t, type: b }, x, { classes: E })); + }); + qn.muiName = "Input"; + var Jn, + Kn = qn, + $n = ["children", "classes", "className", "label", "notched"], + er = (0, Ht.ZP)("fieldset")({ + textAlign: "left", + position: "absolute", + bottom: 0, + right: 0, + top: -5, + left: 0, + margin: 0, + padding: "0 8px", + pointerEvents: "none", + borderRadius: "inherit", + borderStyle: "solid", + borderWidth: 1, + overflow: "hidden", + minWidth: "0%", + }), + tr = (0, Ht.ZP)("legend")(function (e) { + var t = e.ownerState, + n = e.theme; + return (0, + Nt.Z)({ float: "unset", width: "auto", overflow: "hidden" }, !t.withLabel && { padding: 0, lineHeight: "11px", transition: n.transitions.create("width", { duration: 150, easing: n.transitions.easing.easeOut }) }, t.withLabel && (0, Nt.Z)({ display: "block", padding: 0, height: 11, fontSize: "0.75em", visibility: "hidden", maxWidth: 0.01, transition: n.transitions.create("max-width", { duration: 50, easing: n.transitions.easing.easeOut }), whiteSpace: "nowrap", "& > span": { paddingLeft: 5, paddingRight: 5, display: "inline-block", opacity: 0, visibility: "visible" } }, t.notched && { maxWidth: "100%", transition: n.transitions.create("max-width", { duration: 100, easing: n.transitions.easing.easeOut, delay: 50 }) })); + }); + function nr(e) { + return (0, Tn.Z)("MuiOutlinedInput", e); + } + var rr = (0, Nt.Z)( + {}, + In, + (0, wn.Z)("MuiOutlinedInput", ["root", "notchedOutline", "input"]) + ), + ir = [ + "components", + "fullWidth", + "inputComponent", + "label", + "multiline", + "notched", + "slots", + "type", + ], + ar = (0, Ht.ZP)(Pn, { + shouldForwardProp: function (e) { + return (0, Ht.FO)(e) || "classes" === e; + }, + name: "MuiOutlinedInput", + slot: "Root", + overridesResolver: Rn, + })(function (e) { + var t, + n = e.theme, + r = e.ownerState, + i = + "light" === n.palette.mode + ? "rgba(0, 0, 0, 0.23)" + : "rgba(255, 255, 255, 0.23)"; + return (0, + Nt.Z)(((t = { position: "relative", borderRadius: (n.vars || n).shape.borderRadius }), (0, l.Z)(t, "&:hover .".concat(rr.notchedOutline), { borderColor: (n.vars || n).palette.text.primary }), (0, l.Z)(t, "@media (hover: none)", (0, l.Z)({}, "&:hover .".concat(rr.notchedOutline), { borderColor: n.vars ? "rgba(".concat(n.vars.palette.common.onBackgroundChannel, " / 0.23)") : i })), (0, l.Z)(t, "&.".concat(rr.focused, " .").concat(rr.notchedOutline), { borderColor: (n.vars || n).palette[r.color].main, borderWidth: 2 }), (0, l.Z)(t, "&.".concat(rr.error, " .").concat(rr.notchedOutline), { borderColor: (n.vars || n).palette.error.main }), (0, l.Z)(t, "&.".concat(rr.disabled, " .").concat(rr.notchedOutline), { borderColor: (n.vars || n).palette.action.disabled }), t), r.startAdornment && { paddingLeft: 14 }, r.endAdornment && { paddingRight: 14 }, r.multiline && (0, Nt.Z)({ padding: "16.5px 14px" }, "small" === r.size && { padding: "8.5px 14px" })); + }), + or = (0, Ht.ZP)( + function (e) { + var t = e.className, + n = e.label, + r = e.notched, + i = (0, Gt.Z)(e, $n), + a = null != n && "" !== n, + o = (0, Nt.Z)({}, e, { notched: r, withLabel: a }); + return (0, Ut.jsx)( + er, + (0, Nt.Z)({ "aria-hidden": !0, className: t, ownerState: o }, i, { + children: (0, Ut.jsx)(tr, { + ownerState: o, + children: a + ? (0, Ut.jsx)("span", { children: n }) + : Jn || + (Jn = (0, Ut.jsx)("span", { + className: "notranslate", + children: "\u200b", + })), + }), + }) + ); + }, + { + name: "MuiOutlinedInput", + slot: "NotchedOutline", + overridesResolver: function (e, t) { + return t.notchedOutline; + }, + } + )(function (e) { + var t = e.theme, + n = + "light" === t.palette.mode + ? "rgba(0, 0, 0, 0.23)" + : "rgba(255, 255, 255, 0.23)"; + return { + borderColor: t.vars + ? "rgba(".concat( + t.vars.palette.common.onBackgroundChannel, + " / 0.23)" + ) + : n, + }; + }), + sr = (0, Ht.ZP)(Ln, { + name: "MuiOutlinedInput", + slot: "Input", + overridesResolver: Bn, + })(function (e) { + var t = e.theme, + n = e.ownerState; + return (0, + Nt.Z)({ padding: "16.5px 14px" }, !t.vars && { "&:-webkit-autofill": { WebkitBoxShadow: "light" === t.palette.mode ? null : "0 0 0 100px #266798 inset", WebkitTextFillColor: "light" === t.palette.mode ? null : "#fff", caretColor: "light" === t.palette.mode ? null : "#fff", borderRadius: "inherit" } }, t.vars && (0, l.Z)({ "&:-webkit-autofill": { borderRadius: "inherit" } }, t.getColorSchemeSelector("dark"), { "&:-webkit-autofill": { WebkitBoxShadow: "0 0 0 100px #266798 inset", WebkitTextFillColor: "#fff", caretColor: "#fff" } }), "small" === n.size && { padding: "8.5px 14px" }, n.multiline && { padding: 0 }, n.startAdornment && { paddingLeft: 0 }, n.endAdornment && { paddingRight: 0 }); + }), + lr = e.forwardRef(function (t, n) { + var r, + i, + a, + o, + s, + l = (0, Vt.Z)({ props: t, name: "MuiOutlinedInput" }), + u = l.components, + c = void 0 === u ? {} : u, + f = l.fullWidth, + d = void 0 !== f && f, + h = l.inputComponent, + p = void 0 === h ? "input" : h, + v = l.label, + m = l.multiline, + g = void 0 !== m && m, + A = l.notched, + y = l.slots, + b = void 0 === y ? {} : y, + x = l.type, + S = void 0 === x ? "text" : x, + E = (0, Gt.Z)(l, ir), + _ = (function (e) { + var t = e.classes, + n = (0, zt.Z)( + { + root: ["root"], + notchedOutline: ["notchedOutline"], + input: ["input"], + }, + nr, + t + ); + return (0, Nt.Z)({}, t, n); + })(l), + C = sn(), + w = an({ + props: l, + muiFormControl: C, + states: [ + "color", + "disabled", + "error", + "focused", + "hiddenLabel", + "size", + "required", + ], + }), + T = (0, Nt.Z)({}, l, { + color: w.color || "primary", + disabled: w.disabled, + error: w.error, + focused: w.focused, + formControl: C, + fullWidth: d, + hiddenLabel: w.hiddenLabel, + multiline: g, + size: w.size, + type: S, + }), + M = null != (r = null != (i = b.root) ? i : c.Root) ? r : ar, + I = null != (a = null != (o = b.input) ? o : c.Input) ? a : sr; + return (0, Ut.jsx)( + Fn, + (0, Nt.Z)( + { + slots: { root: M, input: I }, + renderSuffix: function (t) { + return (0, Ut.jsx)(or, { + ownerState: T, + className: _.notchedOutline, + label: + null != v && "" !== v && w.required + ? s || + (s = (0, Ut.jsxs)(e.Fragment, { + children: [v, "\u2009", "*"], + })) + : v, + notched: + "undefined" !== typeof A + ? A + : Boolean(t.startAdornment || t.filled || t.focused), + }); + }, + fullWidth: d, + inputComponent: p, + multiline: g, + ref: n, + type: S, + }, + E, + { classes: (0, Nt.Z)({}, _, { notchedOutline: null }) } + ) + ); + }); + lr.muiName = "Input"; + var ur = lr; + function cr(e) { + return (0, Tn.Z)("MuiFormLabel", e); + } + var fr = (0, wn.Z)("MuiFormLabel", [ + "root", + "colorSecondary", + "focused", + "disabled", + "error", + "filled", + "required", + "asterisk", + ]), + dr = [ + "children", + "className", + "color", + "component", + "disabled", + "error", + "filled", + "focused", + "required", + ], + hr = (0, Ht.ZP)("label", { + name: "MuiFormLabel", + slot: "Root", + overridesResolver: function (e, t) { + var n = e.ownerState; + return (0, Nt.Z)( + {}, + t.root, + "secondary" === n.color && t.colorSecondary, + n.filled && t.filled + ); + }, + })(function (e) { + var t, + n = e.theme, + r = e.ownerState; + return (0, + Nt.Z)({ color: (n.vars || n).palette.text.secondary }, n.typography.body1, ((t = { lineHeight: "1.4375em", padding: 0, position: "relative" }), (0, l.Z)(t, "&.".concat(fr.focused), { color: (n.vars || n).palette[r.color].main }), (0, l.Z)(t, "&.".concat(fr.disabled), { color: (n.vars || n).palette.text.disabled }), (0, l.Z)(t, "&.".concat(fr.error), { color: (n.vars || n).palette.error.main }), t)); + }), + pr = (0, Ht.ZP)("span", { + name: "MuiFormLabel", + slot: "Asterisk", + overridesResolver: function (e, t) { + return t.asterisk; + }, + })(function (e) { + var t = e.theme; + return (0, + l.Z)({}, "&.".concat(fr.error), { color: (t.vars || t).palette.error.main }); + }), + vr = e.forwardRef(function (e, t) { + var n = (0, Vt.Z)({ props: e, name: "MuiFormLabel" }), + r = n.children, + i = n.className, + a = n.component, + o = void 0 === a ? "label" : a, + s = (0, Gt.Z)(n, dr), + l = an({ + props: n, + muiFormControl: sn(), + states: [ + "color", + "required", + "focused", + "disabled", + "error", + "filled", + ], + }), + u = (0, Nt.Z)({}, n, { + color: l.color || "primary", + component: o, + disabled: l.disabled, + error: l.error, + filled: l.filled, + focused: l.focused, + required: l.required, + }), + c = (function (e) { + var t = e.classes, + n = e.color, + r = e.focused, + i = e.disabled, + a = e.error, + o = e.filled, + s = e.required, + l = { + root: [ + "root", + "color".concat((0, ln.Z)(n)), + i && "disabled", + a && "error", + o && "filled", + r && "focused", + s && "required", + ], + asterisk: ["asterisk", a && "error"], + }; + return (0, zt.Z)(l, cr, t); + })(u); + return (0, + Ut.jsxs)(hr, (0, Nt.Z)({ as: o, ownerState: u, className: (0, Zt.Z)(c.root, i), ref: t }, s, { children: [r, l.required && (0, Ut.jsxs)(pr, { ownerState: u, "aria-hidden": !0, className: c.asterisk, children: ["\u2009", "*"] })] })); + }), + mr = vr; + function gr(e) { + return (0, Tn.Z)("MuiInputLabel", e); + } + (0, wn.Z)("MuiInputLabel", [ + "root", + "focused", + "disabled", + "error", + "required", + "asterisk", + "formControl", + "sizeSmall", + "shrink", + "animated", + "standard", + "filled", + "outlined", + ]); + var Ar = ["disableAnimation", "margin", "shrink", "variant", "className"], + yr = (0, Ht.ZP)(mr, { + shouldForwardProp: function (e) { + return (0, Ht.FO)(e) || "classes" === e; + }, + name: "MuiInputLabel", + slot: "Root", + overridesResolver: function (e, t) { + var n = e.ownerState; + return [ + (0, l.Z)({}, "& .".concat(fr.asterisk), t.asterisk), + t.root, + n.formControl && t.formControl, + "small" === n.size && t.sizeSmall, + n.shrink && t.shrink, + !n.disableAnimation && t.animated, + t[n.variant], + ]; + }, + })(function (e) { + var t = e.theme, + n = e.ownerState; + return (0, + Nt.Z)({ display: "block", transformOrigin: "top left", whiteSpace: "nowrap", overflow: "hidden", textOverflow: "ellipsis", maxWidth: "100%" }, n.formControl && { position: "absolute", left: 0, top: 0, transform: "translate(0, 20px) scale(1)" }, "small" === n.size && { transform: "translate(0, 17px) scale(1)" }, n.shrink && { transform: "translate(0, -1.5px) scale(0.75)", transformOrigin: "top left", maxWidth: "133%" }, !n.disableAnimation && { transition: t.transitions.create(["color", "transform", "max-width"], { duration: t.transitions.duration.shorter, easing: t.transitions.easing.easeOut }) }, "filled" === n.variant && (0, Nt.Z)({ zIndex: 1, pointerEvents: "none", transform: "translate(12px, 16px) scale(1)", maxWidth: "calc(100% - 24px)" }, "small" === n.size && { transform: "translate(12px, 13px) scale(1)" }, n.shrink && (0, Nt.Z)({ userSelect: "none", pointerEvents: "auto", transform: "translate(12px, 7px) scale(0.75)", maxWidth: "calc(133% - 24px)" }, "small" === n.size && { transform: "translate(12px, 4px) scale(0.75)" })), "outlined" === n.variant && (0, Nt.Z)({ zIndex: 1, pointerEvents: "none", transform: "translate(14px, 16px) scale(1)", maxWidth: "calc(100% - 24px)" }, "small" === n.size && { transform: "translate(14px, 9px) scale(1)" }, n.shrink && { userSelect: "none", pointerEvents: "auto", maxWidth: "calc(133% - 32px)", transform: "translate(14px, -9px) scale(0.75)" })); + }), + br = e.forwardRef(function (e, t) { + var n = (0, Vt.Z)({ name: "MuiInputLabel", props: e }), + r = n.disableAnimation, + i = void 0 !== r && r, + a = n.shrink, + o = n.className, + s = (0, Gt.Z)(n, Ar), + l = sn(), + u = a; + "undefined" === typeof u && + l && + (u = l.filled || l.focused || l.adornedStart); + var c = an({ + props: n, + muiFormControl: l, + states: ["size", "variant", "required"], + }), + f = (0, Nt.Z)({}, n, { + disableAnimation: i, + formControl: l, + shrink: u, + size: c.size, + variant: c.variant, + required: c.required, + }), + d = (function (e) { + var t = e.classes, + n = e.formControl, + r = e.size, + i = e.shrink, + a = e.disableAnimation, + o = e.variant, + s = e.required, + l = { + root: [ + "root", + n && "formControl", + !a && "animated", + i && "shrink", + r && "normal" !== r && "size".concat((0, ln.Z)(r)), + o, + ], + asterisk: [s && "asterisk"], + }, + u = (0, zt.Z)(l, gr, t); + return (0, Nt.Z)({}, t, u); + })(f); + return (0, + Ut.jsx)(yr, (0, Nt.Z)({ "data-shrink": u, ownerState: f, ref: t, className: (0, Zt.Z)(d.root, o) }, s, { classes: d })); + }), + xr = br, + Sr = n(9103); + function Er(e) { + return (0, Tn.Z)("MuiFormControl", e); + } + (0, wn.Z)("MuiFormControl", [ + "root", + "marginNone", + "marginNormal", + "marginDense", + "fullWidth", + "disabled", + ]); + var _r = [ + "children", + "className", + "color", + "component", + "disabled", + "error", + "focused", + "fullWidth", + "hiddenLabel", + "margin", + "required", + "size", + "variant", + ], + Cr = (0, Ht.ZP)("div", { + name: "MuiFormControl", + slot: "Root", + overridesResolver: function (e, t) { + var n = e.ownerState; + return (0, Nt.Z)( + {}, + t.root, + t["margin".concat((0, ln.Z)(n.margin))], + n.fullWidth && t.fullWidth + ); + }, + })(function (e) { + var t = e.ownerState; + return (0, + Nt.Z)({ display: "inline-flex", flexDirection: "column", position: "relative", minWidth: 0, padding: 0, margin: 0, border: 0, verticalAlign: "top" }, "normal" === t.margin && { marginTop: 16, marginBottom: 8 }, "dense" === t.margin && { marginTop: 8, marginBottom: 4 }, t.fullWidth && { width: "100%" }); + }), + wr = e.forwardRef(function (t, n) { + var r = (0, Vt.Z)({ props: t, name: "MuiFormControl" }), + i = r.children, + a = r.className, + o = r.color, + s = void 0 === o ? "primary" : o, + l = r.component, + u = void 0 === l ? "div" : l, + c = r.disabled, + f = void 0 !== c && c, + d = r.error, + h = void 0 !== d && d, + p = r.focused, + v = r.fullWidth, + m = void 0 !== v && v, + g = r.hiddenLabel, + A = void 0 !== g && g, + y = r.margin, + b = void 0 === y ? "none" : y, + x = r.required, + S = void 0 !== x && x, + E = r.size, + _ = void 0 === E ? "medium" : E, + C = r.variant, + w = void 0 === C ? "outlined" : C, + T = (0, Gt.Z)(r, _r), + M = (0, Nt.Z)({}, r, { + color: s, + component: u, + disabled: f, + error: h, + fullWidth: m, + hiddenLabel: A, + margin: b, + required: S, + size: _, + variant: w, + }), + I = (function (e) { + var t = e.classes, + n = e.margin, + r = e.fullWidth, + i = { + root: [ + "root", + "none" !== n && "margin".concat((0, ln.Z)(n)), + r && "fullWidth", + ], + }; + return (0, zt.Z)(i, Er, t); + })(M), + k = e.useState(function () { + var t = !1; + return ( + i && + e.Children.forEach(i, function (e) { + if ((0, Sr.Z)(e, ["Input", "Select"])) { + var n = (0, Sr.Z)(e, ["Select"]) ? e.props.input : e; + n && n.props.startAdornment && (t = !0); + } + }), + t + ); + }), + R = (0, Ot.Z)(k, 2), + B = R[0], + P = R[1], + L = e.useState(function () { + var t = !1; + return ( + i && + e.Children.forEach(i, function (e) { + (0, Sr.Z)(e, ["Input", "Select"]) && + (Cn(e.props, !0) || Cn(e.props.inputProps, !0)) && + (t = !0); + }), + t + ); + }), + D = (0, Ot.Z)(L, 2), + U = D[0], + F = D[1], + O = e.useState(!1), + N = (0, Ot.Z)(O, 2), + G = N[0], + Z = N[1]; + f && G && Z(!1); + var z, + Q = void 0 === p || f ? G : p, + H = e.useMemo( + function () { + return { + adornedStart: B, + setAdornedStart: P, + color: s, + disabled: f, + error: h, + filled: U, + focused: Q, + fullWidth: m, + hiddenLabel: A, + size: _, + onBlur: function () { + Z(!1); + }, + onEmpty: function () { + F(!1); + }, + onFilled: function () { + F(!0); + }, + onFocus: function () { + Z(!0); + }, + registerEffect: z, + required: S, + variant: w, + }; + }, + [B, s, f, h, U, Q, m, A, z, S, _, w] + ); + return (0, + Ut.jsx)(on.Provider, { value: H, children: (0, Ut.jsx)(Cr, (0, Nt.Z)({ as: u, ownerState: M, className: (0, Zt.Z)(I.root, a), ref: n }, T, { children: i })) }); + }), + Tr = wr; + function Mr(e) { + return (0, Tn.Z)("MuiFormHelperText", e); + } + var Ir, + kr = (0, wn.Z)("MuiFormHelperText", [ + "root", + "error", + "disabled", + "sizeSmall", + "sizeMedium", + "contained", + "focused", + "filled", + "required", + ]), + Rr = [ + "children", + "className", + "component", + "disabled", + "error", + "filled", + "focused", + "margin", + "required", + "variant", + ], + Br = (0, Ht.ZP)("p", { + name: "MuiFormHelperText", + slot: "Root", + overridesResolver: function (e, t) { + var n = e.ownerState; + return [ + t.root, + n.size && t["size".concat((0, ln.Z)(n.size))], + n.contained && t.contained, + n.filled && t.filled, + ]; + }, + })(function (e) { + var t, + n = e.theme, + r = e.ownerState; + return (0, + Nt.Z)({ color: (n.vars || n).palette.text.secondary }, n.typography.caption, ((t = { textAlign: "left", marginTop: 3, marginRight: 0, marginBottom: 0, marginLeft: 0 }), (0, l.Z)(t, "&.".concat(kr.disabled), { color: (n.vars || n).palette.text.disabled }), (0, l.Z)(t, "&.".concat(kr.error), { color: (n.vars || n).palette.error.main }), t), "small" === r.size && { marginTop: 4 }, r.contained && { marginLeft: 14, marginRight: 14 }); + }), + Pr = e.forwardRef(function (e, t) { + var n = (0, Vt.Z)({ props: e, name: "MuiFormHelperText" }), + r = n.children, + i = n.className, + a = n.component, + o = void 0 === a ? "p" : a, + s = (0, Gt.Z)(n, Rr), + l = an({ + props: n, + muiFormControl: sn(), + states: [ + "variant", + "size", + "disabled", + "error", + "filled", + "focused", + "required", + ], + }), + u = (0, Nt.Z)({}, n, { + component: o, + contained: "filled" === l.variant || "outlined" === l.variant, + variant: l.variant, + size: l.size, + disabled: l.disabled, + error: l.error, + filled: l.filled, + focused: l.focused, + required: l.required, + }), + c = (function (e) { + var t = e.classes, + n = e.contained, + r = e.size, + i = e.disabled, + a = e.error, + o = e.filled, + s = e.focused, + l = e.required, + u = { + root: [ + "root", + i && "disabled", + a && "error", + r && "size".concat((0, ln.Z)(r)), + n && "contained", + s && "focused", + o && "filled", + l && "required", + ], + }; + return (0, zt.Z)(u, Mr, t); + })(u); + return (0, + Ut.jsx)(Br, (0, Nt.Z)({ as: o, ownerState: u, className: (0, Zt.Z)(c.root, i), ref: t }, s, { children: " " === r ? Ir || (Ir = (0, Ut.jsx)("span", { className: "notranslate", children: "\u200b" })) : r })); + }), + Lr = Pr, + Dr = n(8301); + function Ur(e, t, n) { + return void 0 === e || rn(e) + ? t + : (0, Nt.Z)({}, t, { ownerState: (0, Nt.Z)({}, t.ownerState, n) }); + } + function Fr(e) { + var t = + arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : []; + if (void 0 === e) return {}; + var n = {}; + return ( + Object.keys(e) + .filter(function (n) { + return ( + n.match(/^on[A-Z]/) && + "function" === typeof e[n] && + !t.includes(n) + ); + }) + .forEach(function (t) { + n[t] = e[t]; + }), + n + ); + } + function Or(e) { + if (void 0 === e) return {}; + var t = {}; + return ( + Object.keys(e) + .filter(function (t) { + return !(t.match(/^on[A-Z]/) && "function" === typeof e[t]); + }) + .forEach(function (n) { + t[n] = e[n]; + }), + t + ); + } + var Nr = [ + "elementType", + "externalSlotProps", + "ownerState", + "skipResolvingSlotProps", + ]; + function Gr(e) { + var t, + n = e.elementType, + r = e.externalSlotProps, + i = e.ownerState, + a = e.skipResolvingSlotProps, + o = void 0 !== a && a, + s = (0, Gt.Z)(e, Nr), + l = o + ? {} + : (function (e, t, n) { + return "function" === typeof e ? e(t, n) : e; + })(r, i), + u = (function (e) { + var t = e.getSlotProps, + n = e.additionalProps, + r = e.externalSlotProps, + i = e.externalForwardedProps, + a = e.className; + if (!t) { + var o = (0, Zt.Z)( + null == i ? void 0 : i.className, + null == r ? void 0 : r.className, + a, + null == n ? void 0 : n.className + ), + s = (0, Nt.Z)( + {}, + null == n ? void 0 : n.style, + null == i ? void 0 : i.style, + null == r ? void 0 : r.style + ), + l = (0, Nt.Z)({}, n, i, r); + return ( + o.length > 0 && (l.className = o), + Object.keys(s).length > 0 && (l.style = s), + { props: l, internalRef: void 0 } + ); + } + var u = Fr((0, Nt.Z)({}, i, r)), + c = Or(r), + f = Or(i), + d = t(u), + h = (0, Zt.Z)( + null == d ? void 0 : d.className, + null == n ? void 0 : n.className, + a, + null == i ? void 0 : i.className, + null == r ? void 0 : r.className + ), + p = (0, Nt.Z)( + {}, + null == d ? void 0 : d.style, + null == n ? void 0 : n.style, + null == i ? void 0 : i.style, + null == r ? void 0 : r.style + ), + v = (0, Nt.Z)({}, d, n, f, c); + return ( + h.length > 0 && (v.className = h), + Object.keys(p).length > 0 && (v.style = p), + { props: v, internalRef: d.ref } + ); + })((0, Nt.Z)({}, s, { externalSlotProps: l })), + c = u.props, + f = u.internalRef, + d = (0, Xt.Z)( + f, + null == l ? void 0 : l.ref, + null == (t = e.additionalProps) ? void 0 : t.ref + ); + return Ur(n, (0, Nt.Z)({}, c, { ref: d }), i); + } + var Zr = e.createContext({}); + function zr(e) { + return (0, Tn.Z)("MuiList", e); + } + (0, wn.Z)("MuiList", ["root", "padding", "dense", "subheader"]); + var Qr = [ + "children", + "className", + "component", + "dense", + "disablePadding", + "subheader", + ], + Hr = (0, Ht.ZP)("ul", { + name: "MuiList", + slot: "Root", + overridesResolver: function (e, t) { + var n = e.ownerState; + return [ + t.root, + !n.disablePadding && t.padding, + n.dense && t.dense, + n.subheader && t.subheader, + ]; + }, + })(function (e) { + var t = e.ownerState; + return (0, + Nt.Z)({ listStyle: "none", margin: 0, padding: 0, position: "relative" }, !t.disablePadding && { paddingTop: 8, paddingBottom: 8 }, t.subheader && { paddingTop: 0 }); + }), + Vr = e.forwardRef(function (t, n) { + var r = (0, Vt.Z)({ props: t, name: "MuiList" }), + i = r.children, + a = r.className, + o = r.component, + s = void 0 === o ? "ul" : o, + l = r.dense, + u = void 0 !== l && l, + c = r.disablePadding, + f = void 0 !== c && c, + d = r.subheader, + h = (0, Gt.Z)(r, Qr), + p = e.useMemo( + function () { + return { dense: u }; + }, + [u] + ), + v = (0, Nt.Z)({}, r, { component: s, dense: u, disablePadding: f }), + m = (function (e) { + var t = e.classes, + n = { + root: [ + "root", + !e.disablePadding && "padding", + e.dense && "dense", + e.subheader && "subheader", + ], + }; + return (0, zt.Z)(n, zr, t); + })(v); + return (0, + Ut.jsx)(Zr.Provider, { value: p, children: (0, Ut.jsxs)(Hr, (0, Nt.Z)({ as: s, className: (0, Zt.Z)(m.root, a), ref: n, ownerState: v }, h, { children: [d, i] })) }); + }), + jr = Vr; + function Wr(e) { + var t = e.documentElement.clientWidth; + return Math.abs(window.innerWidth - t); + } + var Xr = Wr, + Yr = [ + "actions", + "autoFocus", + "autoFocusItem", + "children", + "className", + "disabledItemsFocusable", + "disableListWrap", + "onKeyDown", + "variant", + ]; + function qr(e, t, n) { + return e === t + ? e.firstChild + : t && t.nextElementSibling + ? t.nextElementSibling + : n + ? null + : e.firstChild; + } + function Jr(e, t, n) { + return e === t + ? n + ? e.firstChild + : e.lastChild + : t && t.previousElementSibling + ? t.previousElementSibling + : n + ? null + : e.lastChild; + } + function Kr(e, t) { + if (void 0 === t) return !0; + var n = e.innerText; + return ( + void 0 === n && (n = e.textContent), + 0 !== (n = n.trim().toLowerCase()).length && + (t.repeating ? n[0] === t.keys[0] : 0 === n.indexOf(t.keys.join(""))) + ); + } + function $r(e, t, n, r, i, a) { + for (var o = !1, s = i(e, t, !!t && n); s; ) { + if (s === e.firstChild) { + if (o) return !1; + o = !0; + } + var l = + !r && (s.disabled || "true" === s.getAttribute("aria-disabled")); + if (s.hasAttribute("tabindex") && Kr(s, a) && !l) return s.focus(), !0; + s = i(e, s, n); + } + return !1; + } + var ei = e.forwardRef(function (t, n) { + var r = t.actions, + i = t.autoFocus, + a = void 0 !== i && i, + o = t.autoFocusItem, + s = void 0 !== o && o, + l = t.children, + u = t.className, + c = t.disabledItemsFocusable, + f = void 0 !== c && c, + d = t.disableListWrap, + h = void 0 !== d && d, + p = t.onKeyDown, + v = t.variant, + m = void 0 === v ? "selectedMenu" : v, + g = (0, Gt.Z)(t, Yr), + A = e.useRef(null), + y = e.useRef({ + keys: [], + repeating: !0, + previousKeyMatched: !0, + lastTime: null, + }); + (0, cn.Z)( + function () { + a && A.current.focus(); + }, + [a] + ), + e.useImperativeHandle( + r, + function () { + return { + adjustStyleForScrollbar: function (e, t) { + var n = !A.current.style.width; + if (e.clientHeight < A.current.clientHeight && n) { + var r = "".concat(Xr((0, Dr.Z)(e)), "px"); + (A.current.style[ + "rtl" === t.direction ? "paddingLeft" : "paddingRight" + ] = r), + (A.current.style.width = "calc(100% + ".concat(r, ")")); + } + return A.current; + }, + }; + }, + [] + ); + var b = (0, un.Z)(A, n), + x = -1; + e.Children.forEach(l, function (t, n) { + e.isValidElement(t) + ? (t.props.disabled || + ((("selectedMenu" === m && t.props.selected) || -1 === x) && + (x = n)), + x === n && + (t.props.disabled || + t.props.muiSkipListHighlight || + t.type.muiSkipListHighlight) && + (x += 1) >= l.length && + (x = -1)) + : x === n && (x += 1) >= l.length && (x = -1); + }); + var S = e.Children.map(l, function (t, n) { + if (n === x) { + var r = {}; + return ( + s && (r.autoFocus = !0), + void 0 === t.props.tabIndex && + "selectedMenu" === m && + (r.tabIndex = 0), + e.cloneElement(t, r) + ); + } + return t; + }); + return (0, Ut.jsx)( + jr, + (0, Nt.Z)( + { + role: "menu", + ref: b, + className: u, + onKeyDown: function (e) { + var t = A.current, + n = e.key, + r = (0, Dr.Z)(t).activeElement; + if ("ArrowDown" === n) e.preventDefault(), $r(t, r, h, f, qr); + else if ("ArrowUp" === n) + e.preventDefault(), $r(t, r, h, f, Jr); + else if ("Home" === n) + e.preventDefault(), $r(t, null, h, f, qr); + else if ("End" === n) e.preventDefault(), $r(t, null, h, f, Jr); + else if (1 === n.length) { + var i = y.current, + a = n.toLowerCase(), + o = performance.now(); + i.keys.length > 0 && + (o - i.lastTime > 500 + ? ((i.keys = []), + (i.repeating = !0), + (i.previousKeyMatched = !0)) + : i.repeating && a !== i.keys[0] && (i.repeating = !1)), + (i.lastTime = o), + i.keys.push(a); + var s = r && !i.repeating && Kr(r, i); + i.previousKeyMatched && (s || $r(t, r, !1, f, qr, i)) + ? e.preventDefault() + : (i.previousKeyMatched = !1); + } + p && p(e); + }, + tabIndex: a ? 0 : -1, + }, + g, + { children: S } + ) + ); + }), + ti = n(3199), + ni = n(7602), + ri = n(9611); + function ii(e, t) { + (e.prototype = Object.create(t.prototype)), + (e.prototype.constructor = e), + (0, ri.Z)(e, t); + } + var ai = !1, + oi = e.createContext(null), + si = "unmounted", + li = "exited", + ui = "entering", + ci = "entered", + fi = "exiting", + di = (function (t) { + function n(e, n) { + var r; + r = t.call(this, e, n) || this; + var i, + a = n && !n.isMounting ? e.enter : e.appear; + return ( + (r.appearStatus = null), + e.in + ? a + ? ((i = li), (r.appearStatus = ui)) + : (i = ci) + : (i = e.unmountOnExit || e.mountOnEnter ? si : li), + (r.state = { status: i }), + (r.nextCallback = null), + r + ); + } + ii(n, t), + (n.getDerivedStateFromProps = function (e, t) { + return e.in && t.status === si ? { status: li } : null; + }); + var r = n.prototype; + return ( + (r.componentDidMount = function () { + this.updateStatus(!0, this.appearStatus); + }), + (r.componentDidUpdate = function (e) { + var t = null; + if (e !== this.props) { + var n = this.state.status; + this.props.in + ? n !== ui && n !== ci && (t = ui) + : (n !== ui && n !== ci) || (t = fi); + } + this.updateStatus(!1, t); + }), + (r.componentWillUnmount = function () { + this.cancelNextCallback(); + }), + (r.getTimeouts = function () { + var e, + t, + n, + r = this.props.timeout; + return ( + (e = t = n = r), + null != r && + "number" !== typeof r && + ((e = r.exit), + (t = r.enter), + (n = void 0 !== r.appear ? r.appear : t)), + { exit: e, enter: t, appear: n } + ); + }), + (r.updateStatus = function (e, t) { + if ((void 0 === e && (e = !1), null !== t)) + if ((this.cancelNextCallback(), t === ui)) { + if (this.props.unmountOnExit || this.props.mountOnEnter) { + var n = this.props.nodeRef + ? this.props.nodeRef.current + : a.findDOMNode(this); + n && + (function (e) { + e.scrollTop; + })(n); + } + this.performEnter(e); + } else this.performExit(); + else + this.props.unmountOnExit && + this.state.status === li && + this.setState({ status: si }); + }), + (r.performEnter = function (e) { + var t = this, + n = this.props.enter, + r = this.context ? this.context.isMounting : e, + i = this.props.nodeRef ? [r] : [a.findDOMNode(this), r], + o = i[0], + s = i[1], + l = this.getTimeouts(), + u = r ? l.appear : l.enter; + (!e && !n) || ai + ? this.safeSetState({ status: ci }, function () { + t.props.onEntered(o); + }) + : (this.props.onEnter(o, s), + this.safeSetState({ status: ui }, function () { + t.props.onEntering(o, s), + t.onTransitionEnd(u, function () { + t.safeSetState({ status: ci }, function () { + t.props.onEntered(o, s); + }); + }); + })); + }), + (r.performExit = function () { + var e = this, + t = this.props.exit, + n = this.getTimeouts(), + r = this.props.nodeRef ? void 0 : a.findDOMNode(this); + t && !ai + ? (this.props.onExit(r), + this.safeSetState({ status: fi }, function () { + e.props.onExiting(r), + e.onTransitionEnd(n.exit, function () { + e.safeSetState({ status: li }, function () { + e.props.onExited(r); + }); + }); + })) + : this.safeSetState({ status: li }, function () { + e.props.onExited(r); + }); + }), + (r.cancelNextCallback = function () { + null !== this.nextCallback && + (this.nextCallback.cancel(), (this.nextCallback = null)); + }), + (r.safeSetState = function (e, t) { + (t = this.setNextCallback(t)), this.setState(e, t); + }), + (r.setNextCallback = function (e) { + var t = this, + n = !0; + return ( + (this.nextCallback = function (r) { + n && ((n = !1), (t.nextCallback = null), e(r)); + }), + (this.nextCallback.cancel = function () { + n = !1; + }), + this.nextCallback + ); + }), + (r.onTransitionEnd = function (e, t) { + this.setNextCallback(t); + var n = this.props.nodeRef + ? this.props.nodeRef.current + : a.findDOMNode(this), + r = null == e && !this.props.addEndListener; + if (n && !r) { + if (this.props.addEndListener) { + var i = this.props.nodeRef + ? [this.nextCallback] + : [n, this.nextCallback], + o = i[0], + s = i[1]; + this.props.addEndListener(o, s); + } + null != e && setTimeout(this.nextCallback, e); + } else setTimeout(this.nextCallback, 0); + }), + (r.render = function () { + var t = this.state.status; + if (t === si) return null; + var n = this.props, + r = n.children, + i = + (n.in, + n.mountOnEnter, + n.unmountOnExit, + n.appear, + n.enter, + n.exit, + n.timeout, + n.addEndListener, + n.onEnter, + n.onEntering, + n.onEntered, + n.onExit, + n.onExiting, + n.onExited, + n.nodeRef, + (0, Gt.Z)(n, [ + "children", + "in", + "mountOnEnter", + "unmountOnExit", + "appear", + "enter", + "exit", + "timeout", + "addEndListener", + "onEnter", + "onEntering", + "onEntered", + "onExit", + "onExiting", + "onExited", + "nodeRef", + ])); + return e.createElement( + oi.Provider, + { value: null }, + "function" === typeof r + ? r(t, i) + : e.cloneElement(e.Children.only(r), i) + ); + }), + n + ); + })(e.Component); + function hi() {} + (di.contextType = oi), + (di.propTypes = {}), + (di.defaultProps = { + in: !1, + mountOnEnter: !1, + unmountOnExit: !1, + appear: !1, + enter: !0, + exit: !0, + onEnter: hi, + onEntering: hi, + onEntered: hi, + onExit: hi, + onExiting: hi, + onExited: hi, + }), + (di.UNMOUNTED = si), + (di.EXITED = li), + (di.ENTERING = ui), + (di.ENTERED = ci), + (di.EXITING = fi); + var pi = di; + function vi() { + var e = (0, yn.Z)(xn.Z); + return e[Sn.Z] || e; + } + var mi = function (e) { + return e.scrollTop; + }; + function gi(e, t) { + var n, + r, + i = e.timeout, + a = e.easing, + o = e.style, + s = void 0 === o ? {} : o; + return { + duration: + null != (n = s.transitionDuration) + ? n + : "number" === typeof i + ? i + : i[t.mode] || 0, + easing: + null != (r = s.transitionTimingFunction) + ? r + : "object" === typeof a + ? a[t.mode] + : a, + delay: s.transitionDelay, + }; + } + var Ai = [ + "addEndListener", + "appear", + "children", + "easing", + "in", + "onEnter", + "onEntered", + "onEntering", + "onExit", + "onExited", + "onExiting", + "style", + "timeout", + "TransitionComponent", + ]; + function yi(e) { + return "scale(".concat(e, ", ").concat(Math.pow(e, 2), ")"); + } + var bi = { + entering: { opacity: 1, transform: yi(1) }, + entered: { opacity: 1, transform: "none" }, + }, + xi = + "undefined" !== typeof navigator && + /^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent) && + /(os |version\/)15(.|_)4/i.test(navigator.userAgent), + Si = e.forwardRef(function (t, n) { + var r = t.addEndListener, + i = t.appear, + a = void 0 === i || i, + o = t.children, + s = t.easing, + l = t.in, + u = t.onEnter, + c = t.onEntered, + f = t.onEntering, + d = t.onExit, + h = t.onExited, + p = t.onExiting, + v = t.style, + m = t.timeout, + g = void 0 === m ? "auto" : m, + A = t.TransitionComponent, + y = void 0 === A ? pi : A, + b = (0, Gt.Z)(t, Ai), + x = e.useRef(), + S = e.useRef(), + E = vi(), + _ = e.useRef(null), + C = (0, un.Z)(_, o.ref, n), + w = function (e) { + return function (t) { + if (e) { + var n = _.current; + void 0 === t ? e(n) : e(n, t); + } + }; + }, + T = w(f), + M = w(function (e, t) { + mi(e); + var n, + r = gi({ style: v, timeout: g, easing: s }, { mode: "enter" }), + i = r.duration, + a = r.delay, + o = r.easing; + "auto" === g + ? ((n = E.transitions.getAutoHeightDuration(e.clientHeight)), + (S.current = n)) + : (n = i), + (e.style.transition = [ + E.transitions.create("opacity", { duration: n, delay: a }), + E.transitions.create("transform", { + duration: xi ? n : 0.666 * n, + delay: a, + easing: o, + }), + ].join(",")), + u && u(e, t); + }), + I = w(c), + k = w(p), + R = w(function (e) { + var t, + n = gi({ style: v, timeout: g, easing: s }, { mode: "exit" }), + r = n.duration, + i = n.delay, + a = n.easing; + "auto" === g + ? ((t = E.transitions.getAutoHeightDuration(e.clientHeight)), + (S.current = t)) + : (t = r), + (e.style.transition = [ + E.transitions.create("opacity", { duration: t, delay: i }), + E.transitions.create("transform", { + duration: xi ? t : 0.666 * t, + delay: xi ? i : i || 0.333 * t, + easing: a, + }), + ].join(",")), + (e.style.opacity = 0), + (e.style.transform = yi(0.75)), + d && d(e); + }), + B = w(h); + return ( + e.useEffect(function () { + return function () { + clearTimeout(x.current); + }; + }, []), + (0, Ut.jsx)( + y, + (0, Nt.Z)( + { + appear: a, + in: l, + nodeRef: _, + onEnter: M, + onEntered: I, + onEntering: T, + onExit: R, + onExited: B, + onExiting: k, + addEndListener: function (e) { + "auto" === g && (x.current = setTimeout(e, S.current || 0)), + r && r(_.current, e); + }, + timeout: "auto" === g ? null : g, + }, + b, + { + children: function (t, n) { + return e.cloneElement( + o, + (0, Nt.Z)( + { + style: (0, Nt.Z)( + { + opacity: 0, + transform: yi(0.75), + visibility: "exited" !== t || l ? void 0 : "hidden", + }, + bi[t], + v, + o.props.style + ), + ref: C, + }, + n + ) + ); + }, + } + ) + ) + ); + }); + Si.muiSupportAuto = !0; + var Ei = Si, + _i = n(4913), + Ci = n(7054), + wi = n(8949), + Ti = n(5671), + Mi = n(3144); + function Ii(e, t) { + t + ? e.setAttribute("aria-hidden", "true") + : e.removeAttribute("aria-hidden"); + } + function ki(e) { + return parseInt((0, Yt.Z)(e).getComputedStyle(e).paddingRight, 10) || 0; + } + function Ri(e, t, n, r, i) { + var a = [t, n].concat((0, xt.Z)(r)); + [].forEach.call(e.children, function (e) { + var t = -1 === a.indexOf(e), + n = !(function (e) { + var t = + -1 !== + [ + "TEMPLATE", + "SCRIPT", + "STYLE", + "LINK", + "MAP", + "META", + "NOSCRIPT", + "PICTURE", + "COL", + "COLGROUP", + "PARAM", + "SLOT", + "SOURCE", + "TRACK", + ].indexOf(e.tagName), + n = "INPUT" === e.tagName && "hidden" === e.getAttribute("type"); + return t || n; + })(e); + t && n && Ii(e, i); + }); + } + function Bi(e, t) { + var n = -1; + return ( + e.some(function (e, r) { + return !!t(e) && ((n = r), !0); + }), + n + ); + } + function Pi(e, t) { + var n = [], + r = e.container; + if (!t.disableScrollLock) { + if ( + (function (e) { + var t = (0, _i.Z)(e); + return t.body === e + ? (0, Yt.Z)(e).innerWidth > t.documentElement.clientWidth + : e.scrollHeight > e.clientHeight; + })(r) + ) { + var i = Wr((0, _i.Z)(r)); + n.push({ + value: r.style.paddingRight, + property: "padding-right", + el: r, + }), + (r.style.paddingRight = "".concat(ki(r) + i, "px")); + var a = (0, _i.Z)(r).querySelectorAll(".mui-fixed"); + [].forEach.call(a, function (e) { + n.push({ + value: e.style.paddingRight, + property: "padding-right", + el: e, + }), + (e.style.paddingRight = "".concat(ki(e) + i, "px")); + }); + } + var o; + if (r.parentNode instanceof DocumentFragment) o = (0, _i.Z)(r).body; + else { + var s = r.parentElement, + l = (0, Yt.Z)(r); + o = + "HTML" === (null == s ? void 0 : s.nodeName) && + "scroll" === l.getComputedStyle(s).overflowY + ? s + : r; + } + n.push( + { value: o.style.overflow, property: "overflow", el: o }, + { value: o.style.overflowX, property: "overflow-x", el: o }, + { value: o.style.overflowY, property: "overflow-y", el: o } + ), + (o.style.overflow = "hidden"); + } + return function () { + n.forEach(function (e) { + var t = e.value, + n = e.el, + r = e.property; + t ? n.style.setProperty(r, t) : n.style.removeProperty(r); + }); + }; + } + var Li = (function () { + function e() { + (0, Ti.Z)(this, e), + (this.containers = void 0), + (this.modals = void 0), + (this.modals = []), + (this.containers = []); + } + return ( + (0, Mi.Z)(e, [ + { + key: "add", + value: function (e, t) { + var n = this.modals.indexOf(e); + if (-1 !== n) return n; + (n = this.modals.length), + this.modals.push(e), + e.modalRef && Ii(e.modalRef, !1); + var r = (function (e) { + var t = []; + return ( + [].forEach.call(e.children, function (e) { + "true" === e.getAttribute("aria-hidden") && t.push(e); + }), + t + ); + })(t); + Ri(t, e.mount, e.modalRef, r, !0); + var i = Bi(this.containers, function (e) { + return e.container === t; + }); + return -1 !== i + ? (this.containers[i].modals.push(e), n) + : (this.containers.push({ + modals: [e], + container: t, + restore: null, + hiddenSiblings: r, + }), + n); + }, + }, + { + key: "mount", + value: function (e, t) { + var n = Bi(this.containers, function (t) { + return -1 !== t.modals.indexOf(e); + }), + r = this.containers[n]; + r.restore || (r.restore = Pi(r, t)); + }, + }, + { + key: "remove", + value: function (e) { + var t = + !(arguments.length > 1 && void 0 !== arguments[1]) || + arguments[1], + n = this.modals.indexOf(e); + if (-1 === n) return n; + var r = Bi(this.containers, function (t) { + return -1 !== t.modals.indexOf(e); + }), + i = this.containers[r]; + if ( + (i.modals.splice(i.modals.indexOf(e), 1), + this.modals.splice(n, 1), + 0 === i.modals.length) + ) + i.restore && i.restore(), + e.modalRef && Ii(e.modalRef, t), + Ri(i.container, e.mount, e.modalRef, i.hiddenSiblings, !1), + this.containers.splice(r, 1); + else { + var a = i.modals[i.modals.length - 1]; + a.modalRef && Ii(a.modalRef, !1); + } + return n; + }, + }, + { + key: "isTopModal", + value: function (e) { + return ( + this.modals.length > 0 && + this.modals[this.modals.length - 1] === e + ); + }, + }, + ]), + e + ); + })(); + var Di = new Li(); + function Ui(t) { + var n = t.container, + r = t.disableEscapeKeyDown, + i = void 0 !== r && r, + a = t.disableScrollLock, + o = void 0 !== a && a, + s = t.manager, + l = void 0 === s ? Di : s, + u = t.closeAfterTransition, + c = void 0 !== u && u, + f = t.onTransitionEnter, + d = t.onTransitionExited, + h = t.children, + p = t.onClose, + v = t.open, + m = t.rootRef, + g = e.useRef({}), + A = e.useRef(null), + y = e.useRef(null), + b = (0, Xt.Z)(y, m), + x = e.useState(!v), + S = (0, Ot.Z)(x, 2), + E = S[0], + _ = S[1], + C = (function (e) { + return !!e && e.props.hasOwnProperty("in"); + })(h), + w = !0; + ("false" !== t["aria-hidden"] && !1 !== t["aria-hidden"]) || (w = !1); + var T = function () { + return ( + (g.current.modalRef = y.current), + (g.current.mount = A.current), + g.current + ); + }, + M = function () { + l.mount(T(), { disableScrollLock: o }), + y.current && (y.current.scrollTop = 0); + }, + I = (0, Ci.Z)(function () { + var e = + (function (e) { + return "function" === typeof e ? e() : e; + })(n) || (0, _i.Z)(A.current).body; + l.add(T(), e), y.current && M(); + }), + k = e.useCallback( + function () { + return l.isTopModal(T()); + }, + [l] + ), + R = (0, Ci.Z)(function (e) { + (A.current = e), + e && (v && k() ? M() : y.current && Ii(y.current, w)); + }), + B = e.useCallback( + function () { + l.remove(T(), w); + }, + [w, l] + ); + e.useEffect( + function () { + return function () { + B(); + }; + }, + [B] + ), + e.useEffect( + function () { + v ? I() : (C && c) || B(); + }, + [v, B, C, c, I] + ); + var P = function (e) { + return function (t) { + var n; + null == (n = e.onKeyDown) || n.call(e, t), + "Escape" === t.key && + k() && + (i || (t.stopPropagation(), p && p(t, "escapeKeyDown"))); + }; + }, + L = function (e) { + return function (t) { + var n; + null == (n = e.onClick) || n.call(e, t), + t.target === t.currentTarget && p && p(t, "backdropClick"); + }; + }; + return { + getRootProps: function () { + var e = + arguments.length > 0 && void 0 !== arguments[0] + ? arguments[0] + : {}, + n = Fr(t); + delete n.onTransitionEnter, delete n.onTransitionExited; + var r = (0, Nt.Z)({}, n, e); + return (0, Nt.Z)({ role: "presentation" }, r, { + onKeyDown: P(r), + ref: b, + }); + }, + getBackdropProps: function () { + var e = + arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {}; + return (0, Nt.Z)({ "aria-hidden": !0 }, e, { + onClick: L(e), + open: v, + }); + }, + getTransitionProps: function () { + return { + onEnter: (0, wi.Z)( + function () { + _(!1), f && f(); + }, + null == h ? void 0 : h.props.onEnter + ), + onExited: (0, wi.Z)( + function () { + _(!0), d && d(), c && B(); + }, + null == h ? void 0 : h.props.onExited + ), + }; + }, + rootRef: b, + portalRef: R, + isTopModal: k, + exited: E, + hasTransition: C, + }; + } + var Fi = [ + "input", + "select", + "textarea", + "a[href]", + "button", + "[tabindex]", + "audio[controls]", + "video[controls]", + '[contenteditable]:not([contenteditable="false"])', + ].join(","); + function Oi(e) { + var t = [], + n = []; + return ( + Array.from(e.querySelectorAll(Fi)).forEach(function (e, r) { + var i = (function (e) { + var t = parseInt(e.getAttribute("tabindex") || "", 10); + return Number.isNaN(t) + ? "true" === e.contentEditable || + (("AUDIO" === e.nodeName || + "VIDEO" === e.nodeName || + "DETAILS" === e.nodeName) && + null === e.getAttribute("tabindex")) + ? 0 + : e.tabIndex + : t; + })(e); + -1 !== i && + (function (e) { + return !( + e.disabled || + ("INPUT" === e.tagName && "hidden" === e.type) || + (function (e) { + if ("INPUT" !== e.tagName || "radio" !== e.type) return !1; + if (!e.name) return !1; + var t = function (t) { + return e.ownerDocument.querySelector( + 'input[type="radio"]'.concat(t) + ); + }, + n = t('[name="'.concat(e.name, '"]:checked')); + return n || (n = t('[name="'.concat(e.name, '"]'))), n !== e; + })(e) + ); + })(e) && + (0 === i + ? t.push(e) + : n.push({ documentOrder: r, tabIndex: i, node: e })); + }), + n + .sort(function (e, t) { + return e.tabIndex === t.tabIndex + ? e.documentOrder - t.documentOrder + : e.tabIndex - t.tabIndex; + }) + .map(function (e) { + return e.node; + }) + .concat(t) + ); + } + function Ni() { + return !0; + } + function Gi(t) { + var n = t.children, + r = t.disableAutoFocus, + i = void 0 !== r && r, + a = t.disableEnforceFocus, + o = void 0 !== a && a, + s = t.disableRestoreFocus, + l = void 0 !== s && s, + u = t.getTabbable, + c = void 0 === u ? Oi : u, + f = t.isEnabled, + d = void 0 === f ? Ni : f, + h = t.open, + p = e.useRef(!1), + v = e.useRef(null), + m = e.useRef(null), + g = e.useRef(null), + A = e.useRef(null), + y = e.useRef(!1), + b = e.useRef(null), + x = (0, Xt.Z)(n.ref, b), + S = e.useRef(null); + e.useEffect( + function () { + h && b.current && (y.current = !i); + }, + [i, h] + ), + e.useEffect( + function () { + if (h && b.current) { + var e = (0, _i.Z)(b.current); + return ( + b.current.contains(e.activeElement) || + (b.current.hasAttribute("tabIndex") || + b.current.setAttribute("tabIndex", "-1"), + y.current && b.current.focus()), + function () { + l || + (g.current && + g.current.focus && + ((p.current = !0), g.current.focus()), + (g.current = null)); + } + ); + } + }, + [h] + ), + e.useEffect( + function () { + if (h && b.current) { + var e = (0, _i.Z)(b.current), + t = function (t) { + (S.current = t), + !o && + d() && + "Tab" === t.key && + e.activeElement === b.current && + t.shiftKey && + ((p.current = !0), m.current && m.current.focus()); + }, + n = function () { + var t = b.current; + if (null !== t) + if (e.hasFocus() && d() && !p.current) { + if ( + !t.contains(e.activeElement) && + (!o || + e.activeElement === v.current || + e.activeElement === m.current) + ) { + if (e.activeElement !== A.current) A.current = null; + else if (null !== A.current) return; + if (y.current) { + var n = []; + if ( + ((e.activeElement !== v.current && + e.activeElement !== m.current) || + (n = c(b.current)), + n.length > 0) + ) { + var r, + i, + a = Boolean( + (null == (r = S.current) + ? void 0 + : r.shiftKey) && + "Tab" === + (null == (i = S.current) ? void 0 : i.key) + ), + s = n[0], + l = n[n.length - 1]; + "string" !== typeof s && + "string" !== typeof l && + (a ? l.focus() : s.focus()); + } else t.focus(); + } + } + } else p.current = !1; + }; + e.addEventListener("focusin", n), + e.addEventListener("keydown", t, !0); + var r = setInterval(function () { + e.activeElement && "BODY" === e.activeElement.tagName && n(); + }, 50); + return function () { + clearInterval(r), + e.removeEventListener("focusin", n), + e.removeEventListener("keydown", t, !0); + }; + } + }, + [i, o, l, d, h, c] + ); + var E = function (e) { + null === g.current && (g.current = e.relatedTarget), (y.current = !0); + }; + return (0, Ut.jsxs)(e.Fragment, { + children: [ + (0, Ut.jsx)("div", { + tabIndex: h ? 0 : -1, + onFocus: E, + ref: v, + "data-testid": "sentinelStart", + }), + e.cloneElement(n, { + ref: x, + onFocus: function (e) { + null === g.current && (g.current = e.relatedTarget), + (y.current = !0), + (A.current = e.target); + var t = n.props.onFocus; + t && t(e); + }, + }), + (0, Ut.jsx)("div", { + tabIndex: h ? 0 : -1, + onFocus: E, + ref: m, + "data-testid": "sentinelEnd", + }), + ], + }); + } + var Zi = n(2971); + var zi = e.forwardRef(function (t, n) { + var r = t.children, + i = t.container, + o = t.disablePortal, + s = void 0 !== o && o, + l = e.useState(null), + u = (0, Ot.Z)(l, 2), + c = u[0], + f = u[1], + d = (0, Xt.Z)(e.isValidElement(r) ? r.ref : null, n); + if ( + ((0, qt.Z)( + function () { + s || + f( + (function (e) { + return "function" === typeof e ? e() : e; + })(i) || document.body + ); + }, + [i, s] + ), + (0, qt.Z)( + function () { + if (c && !s) + return ( + (0, Zi.Z)(n, c), + function () { + (0, Zi.Z)(n, null); + } + ); + }, + [n, c, s] + ), + s) + ) { + if (e.isValidElement(r)) { + var h = { ref: d }; + return e.cloneElement(r, h); + } + return (0, Ut.jsx)(e.Fragment, { children: r }); + } + return (0, + Ut.jsx)(e.Fragment, { children: c ? a.createPortal(r, c) : c }); + }); + var Qi = [ + "addEndListener", + "appear", + "children", + "easing", + "in", + "onEnter", + "onEntered", + "onEntering", + "onExit", + "onExited", + "onExiting", + "style", + "timeout", + "TransitionComponent", + ], + Hi = { entering: { opacity: 1 }, entered: { opacity: 1 } }, + Vi = e.forwardRef(function (t, n) { + var r = vi(), + i = { + enter: r.transitions.duration.enteringScreen, + exit: r.transitions.duration.leavingScreen, + }, + a = t.addEndListener, + o = t.appear, + s = void 0 === o || o, + l = t.children, + u = t.easing, + c = t.in, + f = t.onEnter, + d = t.onEntered, + h = t.onEntering, + p = t.onExit, + v = t.onExited, + m = t.onExiting, + g = t.style, + A = t.timeout, + y = void 0 === A ? i : A, + b = t.TransitionComponent, + x = void 0 === b ? pi : b, + S = (0, Gt.Z)(t, Qi), + E = e.useRef(null), + _ = (0, un.Z)(E, l.ref, n), + C = function (e) { + return function (t) { + if (e) { + var n = E.current; + void 0 === t ? e(n) : e(n, t); + } + }; + }, + w = C(h), + T = C(function (e, t) { + mi(e); + var n = gi({ style: g, timeout: y, easing: u }, { mode: "enter" }); + (e.style.webkitTransition = r.transitions.create("opacity", n)), + (e.style.transition = r.transitions.create("opacity", n)), + f && f(e, t); + }), + M = C(d), + I = C(m), + k = C(function (e) { + var t = gi({ style: g, timeout: y, easing: u }, { mode: "exit" }); + (e.style.webkitTransition = r.transitions.create("opacity", t)), + (e.style.transition = r.transitions.create("opacity", t)), + p && p(e); + }), + R = C(v); + return (0, Ut.jsx)( + x, + (0, Nt.Z)( + { + appear: s, + in: c, + nodeRef: E, + onEnter: T, + onEntered: M, + onEntering: w, + onExit: k, + onExited: R, + onExiting: I, + addEndListener: function (e) { + a && a(E.current, e); + }, + timeout: y, + }, + S, + { + children: function (t, n) { + return e.cloneElement( + l, + (0, Nt.Z)( + { + style: (0, Nt.Z)( + { + opacity: 0, + visibility: "exited" !== t || c ? void 0 : "hidden", + }, + Hi[t], + g, + l.props.style + ), + ref: _, + }, + n + ) + ); + }, + } + ) + ); + }), + ji = Vi; + function Wi(e) { + return (0, Tn.Z)("MuiBackdrop", e); + } + (0, wn.Z)("MuiBackdrop", ["root", "invisible"]); + var Xi = [ + "children", + "className", + "component", + "components", + "componentsProps", + "invisible", + "open", + "slotProps", + "slots", + "TransitionComponent", + "transitionDuration", + ], + Yi = (0, Ht.ZP)("div", { + name: "MuiBackdrop", + slot: "Root", + overridesResolver: function (e, t) { + var n = e.ownerState; + return [t.root, n.invisible && t.invisible]; + }, + })(function (e) { + var t = e.ownerState; + return (0, + Nt.Z)({ position: "fixed", display: "flex", alignItems: "center", justifyContent: "center", right: 0, bottom: 0, top: 0, left: 0, backgroundColor: "rgba(0, 0, 0, 0.5)", WebkitTapHighlightColor: "transparent" }, t.invisible && { backgroundColor: "transparent" }); + }), + qi = e.forwardRef(function (e, t) { + var n, + r, + i, + a = (0, Vt.Z)({ props: e, name: "MuiBackdrop" }), + o = a.children, + s = a.className, + l = a.component, + u = void 0 === l ? "div" : l, + c = a.components, + f = void 0 === c ? {} : c, + d = a.componentsProps, + h = void 0 === d ? {} : d, + p = a.invisible, + v = void 0 !== p && p, + m = a.open, + g = a.slotProps, + A = void 0 === g ? {} : g, + y = a.slots, + b = void 0 === y ? {} : y, + x = a.TransitionComponent, + S = void 0 === x ? ji : x, + E = a.transitionDuration, + _ = (0, Gt.Z)(a, Xi), + C = (0, Nt.Z)({}, a, { component: u, invisible: v }), + w = (function (e) { + var t = e.classes, + n = { root: ["root", e.invisible && "invisible"] }; + return (0, zt.Z)(n, Wi, t); + })(C), + T = null != (n = A.root) ? n : h.root; + return (0, + Ut.jsx)(S, (0, Nt.Z)({ in: m, timeout: E }, _, { children: (0, Ut.jsx)(Yi, (0, Nt.Z)({ "aria-hidden": !0 }, T, { as: null != (r = null != (i = b.root) ? i : f.Root) ? r : u, className: (0, Zt.Z)(w.root, s, null == T ? void 0 : T.className), ownerState: (0, Nt.Z)({}, C, null == T ? void 0 : T.ownerState), classes: w, ref: t, children: o })) })); + }), + Ji = qi; + function Ki(e) { + return (0, Tn.Z)("MuiModal", e); + } + (0, wn.Z)("MuiModal", ["root", "hidden", "backdrop"]); + var $i = [ + "BackdropComponent", + "BackdropProps", + "classes", + "className", + "closeAfterTransition", + "children", + "container", + "component", + "components", + "componentsProps", + "disableAutoFocus", + "disableEnforceFocus", + "disableEscapeKeyDown", + "disablePortal", + "disableRestoreFocus", + "disableScrollLock", + "hideBackdrop", + "keepMounted", + "onBackdropClick", + "onClose", + "onTransitionEnter", + "onTransitionExited", + "open", + "slotProps", + "slots", + "theme", + ], + ea = (0, Ht.ZP)("div", { + name: "MuiModal", + slot: "Root", + overridesResolver: function (e, t) { + var n = e.ownerState; + return [t.root, !n.open && n.exited && t.hidden]; + }, + })(function (e) { + var t = e.theme, + n = e.ownerState; + return (0, + Nt.Z)({ position: "fixed", zIndex: (t.vars || t).zIndex.modal, right: 0, bottom: 0, top: 0, left: 0 }, !n.open && n.exited && { visibility: "hidden" }); + }), + ta = (0, Ht.ZP)(Ji, { + name: "MuiModal", + slot: "Backdrop", + overridesResolver: function (e, t) { + return t.backdrop; + }, + })({ zIndex: -1 }), + na = e.forwardRef(function (t, n) { + var r, + i, + a, + o, + s, + l, + u = (0, Vt.Z)({ name: "MuiModal", props: t }), + c = u.BackdropComponent, + f = void 0 === c ? ta : c, + d = u.BackdropProps, + h = u.className, + p = u.closeAfterTransition, + v = void 0 !== p && p, + m = u.children, + g = u.container, + A = u.component, + y = u.components, + b = void 0 === y ? {} : y, + x = u.componentsProps, + S = void 0 === x ? {} : x, + E = u.disableAutoFocus, + _ = void 0 !== E && E, + C = u.disableEnforceFocus, + w = void 0 !== C && C, + T = u.disableEscapeKeyDown, + M = void 0 !== T && T, + I = u.disablePortal, + k = void 0 !== I && I, + R = u.disableRestoreFocus, + B = void 0 !== R && R, + P = u.disableScrollLock, + L = void 0 !== P && P, + D = u.hideBackdrop, + U = void 0 !== D && D, + F = u.keepMounted, + O = void 0 !== F && F, + N = u.onBackdropClick, + G = u.open, + Z = u.slotProps, + z = u.slots, + Q = (0, Gt.Z)(u, $i), + H = (0, Nt.Z)({}, u, { + closeAfterTransition: v, + disableAutoFocus: _, + disableEnforceFocus: w, + disableEscapeKeyDown: M, + disablePortal: k, + disableRestoreFocus: B, + disableScrollLock: L, + hideBackdrop: U, + keepMounted: O, + }), + V = Ui((0, Nt.Z)({}, H, { rootRef: n })), + j = V.getRootProps, + W = V.getBackdropProps, + X = V.getTransitionProps, + Y = V.portalRef, + q = V.isTopModal, + J = V.exited, + K = V.hasTransition, + $ = (0, Nt.Z)({}, H, { exited: J }), + ee = (function (e) { + var t = e.open, + n = e.exited, + r = e.classes, + i = { + root: ["root", !t && n && "hidden"], + backdrop: ["backdrop"], + }; + return (0, zt.Z)(i, Ki, r); + })($), + te = {}; + if ((void 0 === m.props.tabIndex && (te.tabIndex = "-1"), K)) { + var ne = X(), + re = ne.onEnter, + ie = ne.onExited; + (te.onEnter = re), (te.onExited = ie); + } + var ae = + null != (r = null != (i = null == z ? void 0 : z.root) ? i : b.Root) + ? r + : ea, + oe = + null != + (a = null != (o = null == z ? void 0 : z.backdrop) ? o : b.Backdrop) + ? a + : f, + se = null != (s = null == Z ? void 0 : Z.root) ? s : S.root, + le = null != (l = null == Z ? void 0 : Z.backdrop) ? l : S.backdrop, + ue = Gr({ + elementType: ae, + externalSlotProps: se, + externalForwardedProps: Q, + getSlotProps: j, + additionalProps: { ref: n, as: A }, + ownerState: $, + className: (0, Zt.Z)( + h, + null == se ? void 0 : se.className, + null == ee ? void 0 : ee.root, + !$.open && $.exited && (null == ee ? void 0 : ee.hidden) + ), + }), + ce = Gr({ + elementType: oe, + externalSlotProps: le, + additionalProps: d, + getSlotProps: function (e) { + return W( + (0, Nt.Z)({}, e, { + onClick: function (t) { + N && N(t), null != e && e.onClick && e.onClick(t); + }, + }) + ); + }, + className: (0, Zt.Z)( + null == le ? void 0 : le.className, + null == d ? void 0 : d.className, + null == ee ? void 0 : ee.backdrop + ), + ownerState: $, + }); + return O || G || (K && !J) + ? (0, Ut.jsx)(zi, { + ref: Y, + container: g, + disablePortal: k, + children: (0, Ut.jsxs)( + ae, + (0, Nt.Z)({}, ue, { + children: [ + !U && f ? (0, Ut.jsx)(oe, (0, Nt.Z)({}, ce)) : null, + (0, Ut.jsx)(Gi, { + disableEnforceFocus: w, + disableAutoFocus: _, + disableRestoreFocus: B, + isEnabled: q, + open: G, + children: e.cloneElement(m, te), + }), + ], + }) + ), + }) + : null; + }), + ra = na, + ia = n(2065), + aa = function (e) { + return ( + (e < 1 ? 5.11916 * Math.pow(e, 2) : 4.5 * Math.log(e + 1) + 2) / 100 + ).toFixed(2); + }; + function oa(e) { + return (0, Tn.Z)("MuiPaper", e); + } + (0, wn.Z)("MuiPaper", [ + "root", + "rounded", + "outlined", + "elevation", + "elevation0", + "elevation1", + "elevation2", + "elevation3", + "elevation4", + "elevation5", + "elevation6", + "elevation7", + "elevation8", + "elevation9", + "elevation10", + "elevation11", + "elevation12", + "elevation13", + "elevation14", + "elevation15", + "elevation16", + "elevation17", + "elevation18", + "elevation19", + "elevation20", + "elevation21", + "elevation22", + "elevation23", + "elevation24", + ]); + var sa = ["className", "component", "elevation", "square", "variant"], + la = (0, Ht.ZP)("div", { + name: "MuiPaper", + slot: "Root", + overridesResolver: function (e, t) { + var n = e.ownerState; + return [ + t.root, + t[n.variant], + !n.square && t.rounded, + "elevation" === n.variant && t["elevation".concat(n.elevation)], + ]; + }, + })(function (e) { + var t, + n = e.theme, + r = e.ownerState; + return (0, + Nt.Z)({ backgroundColor: (n.vars || n).palette.background.paper, color: (n.vars || n).palette.text.primary, transition: n.transitions.create("box-shadow") }, !r.square && { borderRadius: n.shape.borderRadius }, "outlined" === r.variant && { border: "1px solid ".concat((n.vars || n).palette.divider) }, "elevation" === r.variant && (0, Nt.Z)({ boxShadow: (n.vars || n).shadows[r.elevation] }, !n.vars && "dark" === n.palette.mode && { backgroundImage: "linear-gradient(".concat((0, ia.Fq)("#fff", aa(r.elevation)), ", ").concat((0, ia.Fq)("#fff", aa(r.elevation)), ")") }, n.vars && { backgroundImage: null == (t = n.vars.overlays) ? void 0 : t[r.elevation] })); + }), + ua = e.forwardRef(function (e, t) { + var n = (0, Vt.Z)({ props: e, name: "MuiPaper" }), + r = n.className, + i = n.component, + a = void 0 === i ? "div" : i, + o = n.elevation, + s = void 0 === o ? 1 : o, + l = n.square, + u = void 0 !== l && l, + c = n.variant, + f = void 0 === c ? "elevation" : c, + d = (0, Gt.Z)(n, sa), + h = (0, Nt.Z)({}, n, { + component: a, + elevation: s, + square: u, + variant: f, + }), + p = (function (e) { + var t = e.square, + n = e.elevation, + r = e.variant, + i = e.classes, + a = { + root: [ + "root", + r, + !t && "rounded", + "elevation" === r && "elevation".concat(n), + ], + }; + return (0, zt.Z)(a, oa, i); + })(h); + return (0, + Ut.jsx)(la, (0, Nt.Z)({ as: a, ownerState: h, className: (0, Zt.Z)(p.root, r), ref: t }, d)); + }), + ca = ua; + function fa(e) { + return (0, Tn.Z)("MuiPopover", e); + } + (0, wn.Z)("MuiPopover", ["root", "paper"]); + var da = ["onEntering"], + ha = [ + "action", + "anchorEl", + "anchorOrigin", + "anchorPosition", + "anchorReference", + "children", + "className", + "container", + "elevation", + "marginThreshold", + "open", + "PaperProps", + "slots", + "slotProps", + "transformOrigin", + "TransitionComponent", + "transitionDuration", + "TransitionProps", + "disableScrollLock", + ], + pa = ["slotProps"]; + function va(e, t) { + var n = 0; + return ( + "number" === typeof t + ? (n = t) + : "center" === t + ? (n = e.height / 2) + : "bottom" === t && (n = e.height), + n + ); + } + function ma(e, t) { + var n = 0; + return ( + "number" === typeof t + ? (n = t) + : "center" === t + ? (n = e.width / 2) + : "right" === t && (n = e.width), + n + ); + } + function ga(e) { + return [e.horizontal, e.vertical] + .map(function (e) { + return "number" === typeof e ? "".concat(e, "px") : e; + }) + .join(" "); + } + function Aa(e) { + return "function" === typeof e ? e() : e; + } + var ya = (0, Ht.ZP)(ra, { + name: "MuiPopover", + slot: "Root", + overridesResolver: function (e, t) { + return t.root; + }, + })({}), + ba = (0, Ht.ZP)(ca, { + name: "MuiPopover", + slot: "Paper", + overridesResolver: function (e, t) { + return t.paper; + }, + })({ + position: "absolute", + overflowY: "auto", + overflowX: "hidden", + minWidth: 16, + minHeight: 16, + maxWidth: "calc(100% - 32px)", + maxHeight: "calc(100% - 32px)", + outline: 0, + }), + xa = e.forwardRef(function (t, n) { + var r, + i, + a, + o = (0, Vt.Z)({ props: t, name: "MuiPopover" }), + s = o.action, + l = o.anchorEl, + u = o.anchorOrigin, + c = void 0 === u ? { vertical: "top", horizontal: "left" } : u, + f = o.anchorPosition, + d = o.anchorReference, + h = void 0 === d ? "anchorEl" : d, + p = o.children, + v = o.className, + m = o.container, + g = o.elevation, + A = void 0 === g ? 8 : g, + y = o.marginThreshold, + b = void 0 === y ? 16 : y, + x = o.open, + S = o.PaperProps, + E = void 0 === S ? {} : S, + _ = o.slots, + C = o.slotProps, + w = o.transformOrigin, + T = void 0 === w ? { vertical: "top", horizontal: "left" } : w, + M = o.TransitionComponent, + I = void 0 === M ? Ei : M, + k = o.transitionDuration, + R = void 0 === k ? "auto" : k, + B = o.TransitionProps, + P = (void 0 === B ? {} : B).onEntering, + L = o.disableScrollLock, + D = void 0 !== L && L, + U = (0, Gt.Z)(o.TransitionProps, da), + F = (0, Gt.Z)(o, ha), + O = null != (r = null == C ? void 0 : C.paper) ? r : E, + N = e.useRef(), + G = (0, un.Z)(N, O.ref), + Z = (0, Nt.Z)({}, o, { + anchorOrigin: c, + anchorReference: h, + elevation: A, + marginThreshold: b, + externalPaperSlotProps: O, + transformOrigin: T, + TransitionComponent: I, + transitionDuration: R, + TransitionProps: U, + }), + z = (function (e) { + var t = e.classes; + return (0, zt.Z)({ root: ["root"], paper: ["paper"] }, fa, t); + })(Z), + Q = e.useCallback( + function () { + if ("anchorPosition" === h) return f; + var e = Aa(l), + t = ( + e && 1 === e.nodeType ? e : (0, Dr.Z)(N.current).body + ).getBoundingClientRect(); + return { + top: t.top + va(t, c.vertical), + left: t.left + ma(t, c.horizontal), + }; + }, + [l, c.horizontal, c.vertical, f, h] + ), + H = e.useCallback( + function (e) { + return { + vertical: va(e, T.vertical), + horizontal: ma(e, T.horizontal), + }; + }, + [T.horizontal, T.vertical] + ), + V = e.useCallback( + function (e) { + var t = { width: e.offsetWidth, height: e.offsetHeight }, + n = H(t); + if ("none" === h) + return { top: null, left: null, transformOrigin: ga(n) }; + var r = Q(), + i = r.top - n.vertical, + a = r.left - n.horizontal, + o = i + t.height, + s = a + t.width, + u = (0, ni.Z)(Aa(l)), + c = u.innerHeight - b, + f = u.innerWidth - b; + if (null !== b && i < b) { + var d = i - b; + (i -= d), (n.vertical += d); + } else if (null !== b && o > c) { + var p = o - c; + (i -= p), (n.vertical += p); + } + if (null !== b && a < b) { + var v = a - b; + (a -= v), (n.horizontal += v); + } else if (s > f) { + var m = s - f; + (a -= m), (n.horizontal += m); + } + return { + top: "".concat(Math.round(i), "px"), + left: "".concat(Math.round(a), "px"), + transformOrigin: ga(n), + }; + }, + [l, h, Q, H, b] + ), + j = e.useState(x), + W = (0, Ot.Z)(j, 2), + X = W[0], + Y = W[1], + q = e.useCallback( + function () { + var e = N.current; + if (e) { + var t = V(e); + null !== t.top && (e.style.top = t.top), + null !== t.left && (e.style.left = t.left), + (e.style.transformOrigin = t.transformOrigin), + Y(!0); + } + }, + [V] + ); + e.useEffect( + function () { + return ( + D && window.addEventListener("scroll", q), + function () { + return window.removeEventListener("scroll", q); + } + ); + }, + [l, D, q] + ); + e.useEffect(function () { + x && q(); + }), + e.useImperativeHandle( + s, + function () { + return x + ? { + updatePosition: function () { + q(); + }, + } + : null; + }, + [x, q] + ), + e.useEffect( + function () { + if (x) { + var e = (0, ti.Z)(function () { + q(); + }), + t = (0, ni.Z)(l); + return ( + t.addEventListener("resize", e), + function () { + e.clear(), t.removeEventListener("resize", e); + } + ); + } + }, + [l, x, q] + ); + var J = R; + "auto" !== R || I.muiSupportAuto || (J = void 0); + var K = m || (l ? (0, Dr.Z)(Aa(l)).body : void 0), + $ = null != (i = null == _ ? void 0 : _.root) ? i : ya, + ee = null != (a = null == _ ? void 0 : _.paper) ? a : ba, + te = Gr({ + elementType: ee, + externalSlotProps: (0, Nt.Z)({}, O, { + style: X ? O.style : (0, Nt.Z)({}, O.style, { opacity: 0 }), + }), + additionalProps: { elevation: A, ref: G }, + ownerState: Z, + className: (0, Zt.Z)(z.paper, null == O ? void 0 : O.className), + }), + ne = Gr({ + elementType: $, + externalSlotProps: (null == C ? void 0 : C.root) || {}, + externalForwardedProps: F, + additionalProps: { + ref: n, + slotProps: { backdrop: { invisible: !0 } }, + container: K, + open: x, + }, + ownerState: Z, + className: (0, Zt.Z)(z.root, v), + }), + re = ne.slotProps, + ie = (0, Gt.Z)(ne, pa); + return (0, Ut.jsx)( + $, + (0, Nt.Z)({}, ie, !rn($) && { slotProps: re, disableScrollLock: D }, { + children: (0, Ut.jsx)( + I, + (0, Nt.Z)( + { + appear: !0, + in: x, + onEntering: function (e, t) { + P && P(e, t), q(); + }, + onExited: function () { + Y(!1); + }, + timeout: J, + }, + U, + { + children: (0, Ut.jsx)(ee, (0, Nt.Z)({}, te, { children: p })), + } + ) + ), + }) + ); + }), + Sa = xa; + function Ea(e) { + return (0, Tn.Z)("MuiMenu", e); + } + (0, wn.Z)("MuiMenu", ["root", "paper", "list"]); + var _a = ["onEntering"], + Ca = [ + "autoFocus", + "children", + "className", + "disableAutoFocusItem", + "MenuListProps", + "onClose", + "open", + "PaperProps", + "PopoverClasses", + "transitionDuration", + "TransitionProps", + "variant", + "slots", + "slotProps", + ], + wa = { vertical: "top", horizontal: "right" }, + Ta = { vertical: "top", horizontal: "left" }, + Ma = (0, Ht.ZP)(Sa, { + shouldForwardProp: function (e) { + return (0, Ht.FO)(e) || "classes" === e; + }, + name: "MuiMenu", + slot: "Root", + overridesResolver: function (e, t) { + return t.root; + }, + })({}), + Ia = (0, Ht.ZP)(ba, { + name: "MuiMenu", + slot: "Paper", + overridesResolver: function (e, t) { + return t.paper; + }, + })({ maxHeight: "calc(100% - 96px)", WebkitOverflowScrolling: "touch" }), + ka = (0, Ht.ZP)(ei, { + name: "MuiMenu", + slot: "List", + overridesResolver: function (e, t) { + return t.list; + }, + })({ outline: 0 }), + Ra = e.forwardRef(function (t, n) { + var r, + i, + a = (0, Vt.Z)({ props: t, name: "MuiMenu" }), + o = a.autoFocus, + s = void 0 === o || o, + l = a.children, + u = a.className, + c = a.disableAutoFocusItem, + f = void 0 !== c && c, + d = a.MenuListProps, + h = void 0 === d ? {} : d, + p = a.onClose, + v = a.open, + m = a.PaperProps, + g = void 0 === m ? {} : m, + A = a.PopoverClasses, + y = a.transitionDuration, + b = void 0 === y ? "auto" : y, + x = a.TransitionProps, + S = (void 0 === x ? {} : x).onEntering, + E = a.variant, + _ = void 0 === E ? "selectedMenu" : E, + C = a.slots, + w = void 0 === C ? {} : C, + T = a.slotProps, + M = void 0 === T ? {} : T, + I = (0, Gt.Z)(a.TransitionProps, _a), + k = (0, Gt.Z)(a, Ca), + R = vi(), + B = "rtl" === R.direction, + P = (0, Nt.Z)({}, a, { + autoFocus: s, + disableAutoFocusItem: f, + MenuListProps: h, + onEntering: S, + PaperProps: g, + transitionDuration: b, + TransitionProps: I, + variant: _, + }), + L = (function (e) { + var t = e.classes; + return (0, zt.Z)( + { root: ["root"], paper: ["paper"], list: ["list"] }, + Ea, + t + ); + })(P), + D = s && !f && v, + U = e.useRef(null), + F = -1; + e.Children.map(l, function (t, n) { + e.isValidElement(t) && + (t.props.disabled || + ((("selectedMenu" === _ && t.props.selected) || -1 === F) && + (F = n))); + }); + var O = null != (r = w.paper) ? r : Ia, + N = null != (i = M.paper) ? i : g, + G = Gr({ + elementType: w.root, + externalSlotProps: M.root, + ownerState: P, + className: [L.root, u], + }), + Z = Gr({ + elementType: O, + externalSlotProps: N, + ownerState: P, + className: L.paper, + }); + return (0, Ut.jsx)( + Ma, + (0, Nt.Z)( + { + onClose: p, + anchorOrigin: { + vertical: "bottom", + horizontal: B ? "right" : "left", + }, + transformOrigin: B ? wa : Ta, + slots: { paper: O, root: w.root }, + slotProps: { root: G, paper: Z }, + open: v, + ref: n, + transitionDuration: b, + TransitionProps: (0, Nt.Z)( + { + onEntering: function (e, t) { + U.current && U.current.adjustStyleForScrollbar(e, R), + S && S(e, t); + }, + }, + I + ), + ownerState: P, + }, + k, + { + classes: A, + children: (0, Ut.jsx)( + ka, + (0, Nt.Z)( + { + onKeyDown: function (e) { + "Tab" === e.key && + (e.preventDefault(), p && p(e, "tabKeyDown")); + }, + actions: U, + autoFocus: s && (-1 === F || f), + autoFocusItem: D, + variant: _, + }, + h, + { className: (0, Zt.Z)(L.list, h.className), children: l } + ) + ), + } + ) + ); + }), + Ba = Ra; + function Pa(e) { + return (0, Tn.Z)("MuiNativeSelect", e); + } + var La = (0, wn.Z)("MuiNativeSelect", [ + "root", + "select", + "multiple", + "filled", + "outlined", + "standard", + "disabled", + "icon", + "iconOpen", + "iconFilled", + "iconOutlined", + "iconStandard", + "nativeInput", + "error", + ]), + Da = [ + "className", + "disabled", + "error", + "IconComponent", + "inputRef", + "variant", + ], + Ua = function (e) { + var t, + n = e.ownerState, + r = e.theme; + return (0, Nt.Z)( + ((t = { + MozAppearance: "none", + WebkitAppearance: "none", + userSelect: "none", + borderRadius: 0, + cursor: "pointer", + "&:focus": (0, Nt.Z)( + {}, + r.vars + ? { + backgroundColor: "rgba(".concat( + r.vars.palette.common.onBackgroundChannel, + " / 0.05)" + ), + } + : { + backgroundColor: + "light" === r.palette.mode + ? "rgba(0, 0, 0, 0.05)" + : "rgba(255, 255, 255, 0.05)", + }, + { borderRadius: 0 } + ), + "&::-ms-expand": { display: "none" }, + }), + (0, l.Z)(t, "&.".concat(La.disabled), { cursor: "default" }), + (0, l.Z)(t, "&[multiple]", { height: "auto" }), + (0, l.Z)(t, "&:not([multiple]) option, &:not([multiple]) optgroup", { + backgroundColor: (r.vars || r).palette.background.paper, + }), + (0, l.Z)(t, "&&&", { paddingRight: 24, minWidth: 16 }), + t), + "filled" === n.variant && { "&&&": { paddingRight: 32 } }, + "outlined" === n.variant && { + borderRadius: (r.vars || r).shape.borderRadius, + "&:focus": { borderRadius: (r.vars || r).shape.borderRadius }, + "&&&": { paddingRight: 32 }, + } + ); + }, + Fa = (0, Ht.ZP)("select", { + name: "MuiNativeSelect", + slot: "Select", + shouldForwardProp: Ht.FO, + overridesResolver: function (e, t) { + var n = e.ownerState; + return [ + t.select, + t[n.variant], + n.error && t.error, + (0, l.Z)({}, "&.".concat(La.multiple), t.multiple), + ]; + }, + })(Ua), + Oa = function (e) { + var t = e.ownerState, + n = e.theme; + return (0, Nt.Z)( + (0, l.Z)( + { + position: "absolute", + right: 0, + top: "calc(50% - .5em)", + pointerEvents: "none", + color: (n.vars || n).palette.action.active, + }, + "&.".concat(La.disabled), + { color: (n.vars || n).palette.action.disabled } + ), + t.open && { transform: "rotate(180deg)" }, + "filled" === t.variant && { right: 7 }, + "outlined" === t.variant && { right: 7 } + ); + }, + Na = (0, Ht.ZP)("svg", { + name: "MuiNativeSelect", + slot: "Icon", + overridesResolver: function (e, t) { + var n = e.ownerState; + return [ + t.icon, + n.variant && t["icon".concat((0, ln.Z)(n.variant))], + n.open && t.iconOpen, + ]; + }, + })(Oa), + Ga = e.forwardRef(function (t, n) { + var r = t.className, + i = t.disabled, + a = t.error, + o = t.IconComponent, + s = t.inputRef, + l = t.variant, + u = void 0 === l ? "standard" : l, + c = (0, Gt.Z)(t, Da), + f = (0, Nt.Z)({}, t, { disabled: i, variant: u, error: a }), + d = (function (e) { + var t = e.classes, + n = e.variant, + r = e.disabled, + i = e.multiple, + a = e.open, + o = { + select: [ + "select", + n, + r && "disabled", + i && "multiple", + e.error && "error", + ], + icon: [ + "icon", + "icon".concat((0, ln.Z)(n)), + a && "iconOpen", + r && "disabled", + ], + }; + return (0, zt.Z)(o, Pa, t); + })(f); + return (0, + Ut.jsxs)(e.Fragment, { children: [(0, Ut.jsx)(Fa, (0, Nt.Z)({ ownerState: f, className: (0, Zt.Z)(d.select, r), disabled: i, ref: s || n }, c)), t.multiple ? null : (0, Ut.jsx)(Na, { as: o, ownerState: f, className: d.icon })] }); + }), + Za = Ga, + za = n(5158); + function Qa(e) { + return (0, Tn.Z)("MuiSelect", e); + } + var Ha, + Va = (0, wn.Z)("MuiSelect", [ + "root", + "select", + "multiple", + "filled", + "outlined", + "standard", + "disabled", + "focused", + "icon", + "iconOpen", + "iconFilled", + "iconOutlined", + "iconStandard", + "nativeInput", + "error", + ]), + ja = [ + "aria-describedby", + "aria-label", + "autoFocus", + "autoWidth", + "children", + "className", + "defaultOpen", + "defaultValue", + "disabled", + "displayEmpty", + "error", + "IconComponent", + "inputRef", + "labelId", + "MenuProps", + "multiple", + "name", + "onBlur", + "onChange", + "onClose", + "onFocus", + "onOpen", + "open", + "readOnly", + "renderValue", + "SelectDisplayProps", + "tabIndex", + "type", + "value", + "variant", + ], + Wa = (0, Ht.ZP)("div", { + name: "MuiSelect", + slot: "Select", + overridesResolver: function (e, t) { + var n = e.ownerState; + return [ + (0, l.Z)({}, "&.".concat(Va.select), t.select), + (0, l.Z)({}, "&.".concat(Va.select), t[n.variant]), + (0, l.Z)({}, "&.".concat(Va.error), t.error), + (0, l.Z)({}, "&.".concat(Va.multiple), t.multiple), + ]; + }, + })( + Ua, + (0, l.Z)({}, "&.".concat(Va.select), { + height: "auto", + minHeight: "1.4375em", + textOverflow: "ellipsis", + whiteSpace: "nowrap", + overflow: "hidden", + }) + ), + Xa = (0, Ht.ZP)("svg", { + name: "MuiSelect", + slot: "Icon", + overridesResolver: function (e, t) { + var n = e.ownerState; + return [ + t.icon, + n.variant && t["icon".concat((0, ln.Z)(n.variant))], + n.open && t.iconOpen, + ]; + }, + })(Oa), + Ya = (0, Ht.ZP)("input", { + shouldForwardProp: function (e) { + return (0, Ht.Dz)(e) && "classes" !== e; + }, + name: "MuiSelect", + slot: "NativeInput", + overridesResolver: function (e, t) { + return t.nativeInput; + }, + })({ + bottom: 0, + left: 0, + position: "absolute", + opacity: 0, + pointerEvents: "none", + width: "100%", + boxSizing: "border-box", + }); + function qa(e, t) { + return "object" === typeof t && null !== t + ? e === t + : String(e) === String(t); + } + function Ja(e) { + return null == e || ("string" === typeof e && !e.trim()); + } + var Ka = e.forwardRef(function (t, n) { + var r, + i = t["aria-describedby"], + a = t["aria-label"], + o = t.autoFocus, + s = t.autoWidth, + l = t.children, + u = t.className, + c = t.defaultOpen, + f = t.defaultValue, + d = t.disabled, + h = t.displayEmpty, + p = t.error, + v = void 0 !== p && p, + m = t.IconComponent, + g = t.inputRef, + A = t.labelId, + y = t.MenuProps, + b = void 0 === y ? {} : y, + x = t.multiple, + S = t.name, + E = t.onBlur, + _ = t.onChange, + C = t.onClose, + w = t.onFocus, + T = t.onOpen, + M = t.open, + I = t.readOnly, + k = t.renderValue, + R = t.SelectDisplayProps, + B = void 0 === R ? {} : R, + P = t.tabIndex, + L = t.value, + D = t.variant, + U = void 0 === D ? "standard" : D, + F = (0, Gt.Z)(t, ja), + O = (0, za.Z)({ controlled: L, default: f, name: "Select" }), + N = (0, Ot.Z)(O, 2), + G = N[0], + Z = N[1], + z = (0, za.Z)({ controlled: M, default: c, name: "Select" }), + Q = (0, Ot.Z)(z, 2), + H = Q[0], + V = Q[1], + j = e.useRef(null), + W = e.useRef(null), + X = e.useState(null), + Y = (0, Ot.Z)(X, 2), + q = Y[0], + J = Y[1], + K = e.useRef(null != M).current, + $ = e.useState(), + ee = (0, Ot.Z)($, 2), + te = ee[0], + ne = ee[1], + re = (0, un.Z)(n, g), + ie = e.useCallback(function (e) { + (W.current = e), e && J(e); + }, []), + ae = null == q ? void 0 : q.parentNode; + e.useImperativeHandle( + re, + function () { + return { + focus: function () { + W.current.focus(); + }, + node: j.current, + value: G, + }; + }, + [G] + ), + e.useEffect( + function () { + c && + H && + q && + !K && + (ne(s ? null : ae.clientWidth), W.current.focus()); + }, + [q, s] + ), + e.useEffect( + function () { + o && W.current.focus(); + }, + [o] + ), + e.useEffect( + function () { + if (A) { + var e = (0, Dr.Z)(W.current).getElementById(A); + if (e) { + var t = function () { + getSelection().isCollapsed && W.current.focus(); + }; + return ( + e.addEventListener("click", t), + function () { + e.removeEventListener("click", t); + } + ); + } + } + }, + [A] + ); + var oe, + se, + le = function (e, t) { + e ? T && T(t) : C && C(t), + K || (ne(s ? null : ae.clientWidth), V(e)); + }, + ue = e.Children.toArray(l), + ce = function (e) { + return function (t) { + var n; + if (t.currentTarget.hasAttribute("tabindex")) { + if (x) { + n = Array.isArray(G) ? G.slice() : []; + var r = G.indexOf(e.props.value); + -1 === r ? n.push(e.props.value) : n.splice(r, 1); + } else n = e.props.value; + if ( + (e.props.onClick && e.props.onClick(t), G !== n && (Z(n), _)) + ) { + var i = t.nativeEvent || t, + a = new i.constructor(i.type, i); + Object.defineProperty(a, "target", { + writable: !0, + value: { value: n, name: S }, + }), + _(a, e); + } + x || le(!1, t); + } + }; + }, + fe = null !== q && H; + delete F["aria-invalid"]; + var de = [], + he = !1; + (Cn({ value: G }) || h) && (k ? (oe = k(G)) : (he = !0)); + var pe = ue.map(function (t) { + if (!e.isValidElement(t)) return null; + var n; + if (x) { + if (!Array.isArray(G)) throw new Error((0, Wt.Z)(2)); + (n = G.some(function (e) { + return qa(e, t.props.value); + })), + n && he && de.push(t.props.children); + } else (n = qa(G, t.props.value)) && he && (se = t.props.children); + return ( + n && !0, + e.cloneElement(t, { + "aria-selected": n ? "true" : "false", + onClick: ce(t), + onKeyUp: function (e) { + " " === e.key && e.preventDefault(), + t.props.onKeyUp && t.props.onKeyUp(e); + }, + role: "option", + selected: n, + value: void 0, + "data-value": t.props.value, + }) + ); + }); + he && + (oe = x + ? 0 === de.length + ? null + : de.reduce(function (e, t, n) { + return e.push(t), n < de.length - 1 && e.push(", "), e; + }, []) + : se); + var ve, + me = te; + !s && K && q && (me = ae.clientWidth), + (ve = "undefined" !== typeof P ? P : d ? null : 0); + var ge = B.id || (S ? "mui-component-select-".concat(S) : void 0), + Ae = (0, Nt.Z)({}, t, { variant: U, value: G, open: fe, error: v }), + ye = (function (e) { + var t = e.classes, + n = e.variant, + r = e.disabled, + i = e.multiple, + a = e.open, + o = { + select: [ + "select", + n, + r && "disabled", + i && "multiple", + e.error && "error", + ], + icon: [ + "icon", + "icon".concat((0, ln.Z)(n)), + a && "iconOpen", + r && "disabled", + ], + nativeInput: ["nativeInput"], + }; + return (0, zt.Z)(o, Qa, t); + })(Ae), + be = (0, Nt.Z)( + {}, + b.PaperProps, + null == (r = b.slotProps) ? void 0 : r.paper + ), + xe = (0, Qt.Z)(); + return (0, Ut.jsxs)(e.Fragment, { + children: [ + (0, Ut.jsx)( + Wa, + (0, Nt.Z)( + { + ref: ie, + tabIndex: ve, + role: "combobox", + "aria-controls": xe, + "aria-disabled": d ? "true" : void 0, + "aria-expanded": fe ? "true" : "false", + "aria-haspopup": "listbox", + "aria-label": a, + "aria-labelledby": + [A, ge].filter(Boolean).join(" ") || void 0, + "aria-describedby": i, + onKeyDown: function (e) { + if (!I) { + -1 !== + [" ", "ArrowUp", "ArrowDown", "Enter"].indexOf(e.key) && + (e.preventDefault(), le(!0, e)); + } + }, + onMouseDown: + d || I + ? null + : function (e) { + 0 === e.button && + (e.preventDefault(), W.current.focus(), le(!0, e)); + }, + onBlur: function (e) { + !fe && + E && + (Object.defineProperty(e, "target", { + writable: !0, + value: { value: G, name: S }, + }), + E(e)); + }, + onFocus: w, + }, + B, + { + ownerState: Ae, + className: (0, Zt.Z)(B.className, ye.select, u), + id: ge, + children: Ja(oe) + ? Ha || + (Ha = (0, Ut.jsx)("span", { + className: "notranslate", + children: "\u200b", + })) + : oe, + } + ) + ), + (0, Ut.jsx)( + Ya, + (0, Nt.Z)( + { + "aria-invalid": v, + value: Array.isArray(G) ? G.join(",") : G, + name: S, + ref: j, + "aria-hidden": !0, + onChange: function (e) { + var t = ue.find(function (t) { + return t.props.value === e.target.value; + }); + void 0 !== t && (Z(t.props.value), _ && _(e, t)); + }, + tabIndex: -1, + disabled: d, + className: ye.nativeInput, + autoFocus: o, + ownerState: Ae, + }, + F + ) + ), + (0, Ut.jsx)(Xa, { as: m, className: ye.icon, ownerState: Ae }), + (0, Ut.jsx)( + Ba, + (0, Nt.Z)( + { + id: "menu-".concat(S || ""), + anchorEl: ae, + open: fe, + onClose: function (e) { + le(!1, e); + }, + anchorOrigin: { vertical: "bottom", horizontal: "center" }, + transformOrigin: { vertical: "top", horizontal: "center" }, + }, + b, + { + MenuListProps: (0, Nt.Z)( + { + "aria-labelledby": A, + role: "listbox", + "aria-multiselectable": x ? "true" : void 0, + disableListWrap: !0, + id: xe, + }, + b.MenuListProps + ), + slotProps: (0, Nt.Z)({}, b.slotProps, { + paper: (0, Nt.Z)({}, be, { + style: (0, Nt.Z)( + { minWidth: me }, + null != be ? be.style : null + ), + }), + }), + children: pe, + } + ) + ), + ], + }); + }), + $a = Ka, + eo = (0, n(9201).Z)( + (0, Ut.jsx)("path", { d: "M7 10l5 5 5-5z" }), + "ArrowDropDown" + ), + to = [ + "autoWidth", + "children", + "classes", + "className", + "defaultOpen", + "displayEmpty", + "IconComponent", + "id", + "input", + "inputProps", + "label", + "labelId", + "MenuProps", + "multiple", + "native", + "onClose", + "onOpen", + "open", + "renderValue", + "SelectDisplayProps", + "variant", + ], + no = ["root"], + ro = { + name: "MuiSelect", + overridesResolver: function (e, t) { + return t.root; + }, + shouldForwardProp: function (e) { + return (0, Ht.FO)(e) && "variant" !== e; + }, + slot: "Root", + }, + io = (0, Ht.ZP)(Hn, ro)(""), + ao = (0, Ht.ZP)(ur, ro)(""), + oo = (0, Ht.ZP)(Kn, ro)(""), + so = e.forwardRef(function (t, n) { + var r = (0, Vt.Z)({ name: "MuiSelect", props: t }), + i = r.autoWidth, + a = void 0 !== i && i, + o = r.children, + s = r.classes, + l = void 0 === s ? {} : s, + u = r.className, + c = r.defaultOpen, + f = void 0 !== c && c, + d = r.displayEmpty, + h = void 0 !== d && d, + p = r.IconComponent, + v = void 0 === p ? eo : p, + m = r.id, + g = r.input, + A = r.inputProps, + y = r.label, + b = r.labelId, + x = r.MenuProps, + S = r.multiple, + E = void 0 !== S && S, + _ = r.native, + C = void 0 !== _ && _, + w = r.onClose, + T = r.onOpen, + M = r.open, + I = r.renderValue, + k = r.SelectDisplayProps, + R = r.variant, + B = void 0 === R ? "outlined" : R, + P = (0, Gt.Z)(r, to), + L = C ? Za : $a, + D = an({ + props: r, + muiFormControl: sn(), + states: ["variant", "error"], + }), + U = D.variant || B, + F = (0, Nt.Z)({}, r, { variant: U, classes: l }), + O = (function (e) { + return e.classes; + })(F), + N = (0, Gt.Z)(O, no), + G = + g || + { + standard: (0, Ut.jsx)(io, { ownerState: F }), + outlined: (0, Ut.jsx)(ao, { label: y, ownerState: F }), + filled: (0, Ut.jsx)(oo, { ownerState: F }), + }[U], + Z = (0, un.Z)(n, G.ref); + return (0, + Ut.jsx)(e.Fragment, { children: e.cloneElement(G, (0, Nt.Z)({ inputComponent: L, inputProps: (0, Nt.Z)({ children: o, error: D.error, IconComponent: v, variant: U, type: void 0, multiple: E }, C ? { id: m } : { autoWidth: a, defaultOpen: f, displayEmpty: h, labelId: b, MenuProps: x, onClose: w, onOpen: T, open: M, renderValue: I, SelectDisplayProps: (0, Nt.Z)({ id: m }, k) }, A, { classes: A ? (0, jt.Z)(N, A.classes) : N }, g ? g.props.inputProps : {}) }, E && C && "outlined" === U ? { notched: !0 } : {}, { ref: Z, className: (0, Zt.Z)(G.props.className, u, O.root) }, !g && { variant: U }, P)) }); + }); + so.muiName = "Select"; + var lo = so; + function uo(e) { + return (0, Tn.Z)("MuiTextField", e); + } + (0, wn.Z)("MuiTextField", ["root"]); + var co = [ + "autoComplete", + "autoFocus", + "children", + "className", + "color", + "defaultValue", + "disabled", + "error", + "FormHelperTextProps", + "fullWidth", + "helperText", + "id", + "InputLabelProps", + "inputProps", + "InputProps", + "inputRef", + "label", + "maxRows", + "minRows", + "multiline", + "name", + "onBlur", + "onChange", + "onFocus", + "placeholder", + "required", + "rows", + "select", + "SelectProps", + "type", + "value", + "variant", + ], + fo = { standard: Hn, filled: Kn, outlined: ur }, + ho = (0, Ht.ZP)(Tr, { + name: "MuiTextField", + slot: "Root", + overridesResolver: function (e, t) { + return t.root; + }, + })({}), + po = e.forwardRef(function (e, t) { + var n = (0, Vt.Z)({ props: e, name: "MuiTextField" }), + r = n.autoComplete, + i = n.autoFocus, + a = void 0 !== i && i, + o = n.children, + s = n.className, + l = n.color, + u = void 0 === l ? "primary" : l, + c = n.defaultValue, + f = n.disabled, + d = void 0 !== f && f, + h = n.error, + p = void 0 !== h && h, + v = n.FormHelperTextProps, + m = n.fullWidth, + g = void 0 !== m && m, + A = n.helperText, + y = n.id, + b = n.InputLabelProps, + x = n.inputProps, + S = n.InputProps, + E = n.inputRef, + _ = n.label, + C = n.maxRows, + w = n.minRows, + T = n.multiline, + M = void 0 !== T && T, + I = n.name, + k = n.onBlur, + R = n.onChange, + B = n.onFocus, + P = n.placeholder, + L = n.required, + D = void 0 !== L && L, + U = n.rows, + F = n.select, + O = void 0 !== F && F, + N = n.SelectProps, + G = n.type, + Z = n.value, + z = n.variant, + Q = void 0 === z ? "outlined" : z, + H = (0, Gt.Z)(n, co), + V = (0, Nt.Z)({}, n, { + autoFocus: a, + color: u, + disabled: d, + error: p, + fullWidth: g, + multiline: M, + required: D, + select: O, + variant: Q, + }), + j = (function (e) { + var t = e.classes; + return (0, zt.Z)({ root: ["root"] }, uo, t); + })(V); + var W = {}; + "outlined" === Q && + (b && "undefined" !== typeof b.shrink && (W.notched = b.shrink), + (W.label = _)), + O && + ((N && N.native) || (W.id = void 0), + (W["aria-describedby"] = void 0)); + var X = (0, Qt.Z)(y), + Y = A && X ? "".concat(X, "-helper-text") : void 0, + q = _ && X ? "".concat(X, "-label") : void 0, + J = fo[Q], + K = (0, Ut.jsx)( + J, + (0, Nt.Z)( + { + "aria-describedby": Y, + autoComplete: r, + autoFocus: a, + defaultValue: c, + fullWidth: g, + multiline: M, + name: I, + rows: U, + maxRows: C, + minRows: w, + type: G, + value: Z, + id: X, + inputRef: E, + onBlur: k, + onChange: R, + onFocus: B, + placeholder: P, + inputProps: x, + }, + W, + S + ) + ); + return (0, + Ut.jsxs)(ho, (0, Nt.Z)({ className: (0, Zt.Z)(j.root, s), disabled: d, error: p, fullWidth: g, ref: t, required: D, color: u, variant: Q, ownerState: V }, H, { children: [null != _ && "" !== _ && (0, Ut.jsx)(xr, (0, Nt.Z)({ htmlFor: X, id: q }, b, { children: _ })), O ? (0, Ut.jsx)(lo, (0, Nt.Z)({ "aria-describedby": Y, id: X, labelId: q, value: Z, input: K }, N, { children: o })) : K, A && (0, Ut.jsx)(Lr, (0, Nt.Z)({ id: Y }, v, { children: A }))] })); + }), + vo = po, + mo = n(5735), + go = n(9683), + Ao = n(3031); + function yo(e, t) { + return ( + t || (t = e.slice(0)), + Object.freeze( + Object.defineProperties(e, { raw: { value: Object.freeze(t) } }) + ) + ); + } + var bo = n(7326); + function xo(t, n) { + var r = Object.create(null); + return ( + t && + e.Children.map(t, function (e) { + return e; + }).forEach(function (t) { + r[t.key] = (function (t) { + return n && (0, e.isValidElement)(t) ? n(t) : t; + })(t); + }), + r + ); + } + function So(e, t, n) { + return null != n[t] ? n[t] : e.props[t]; + } + function Eo(t, n, r) { + var i = xo(t.children), + a = (function (e, t) { + function n(n) { + return n in t ? t[n] : e[n]; + } + (e = e || {}), (t = t || {}); + var r, + i = Object.create(null), + a = []; + for (var o in e) + o in t ? a.length && ((i[o] = a), (a = [])) : a.push(o); + var s = {}; + for (var l in t) { + if (i[l]) + for (r = 0; r < i[l].length; r++) { + var u = i[l][r]; + s[i[l][r]] = n(u); + } + s[l] = n(l); + } + for (r = 0; r < a.length; r++) s[a[r]] = n(a[r]); + return s; + })(n, i); + return ( + Object.keys(a).forEach(function (o) { + var s = a[o]; + if ((0, e.isValidElement)(s)) { + var l = o in n, + u = o in i, + c = n[o], + f = (0, e.isValidElement)(c) && !c.props.in; + !u || (l && !f) + ? u || !l || f + ? u && + l && + (0, e.isValidElement)(c) && + (a[o] = (0, e.cloneElement)(s, { + onExited: r.bind(null, s), + in: c.props.in, + exit: So(s, "exit", t), + enter: So(s, "enter", t), + })) + : (a[o] = (0, e.cloneElement)(s, { in: !1 })) + : (a[o] = (0, e.cloneElement)(s, { + onExited: r.bind(null, s), + in: !0, + exit: So(s, "exit", t), + enter: So(s, "enter", t), + })); + } + }), + a + ); + } + var _o = + Object.values || + function (e) { + return Object.keys(e).map(function (t) { + return e[t]; + }); + }, + Co = (function (t) { + function n(e, n) { + var r, + i = (r = t.call(this, e, n) || this).handleExited.bind( + (0, bo.Z)(r) + ); + return ( + (r.state = { + contextValue: { isMounting: !0 }, + handleExited: i, + firstRender: !0, + }), + r + ); + } + ii(n, t); + var r = n.prototype; + return ( + (r.componentDidMount = function () { + (this.mounted = !0), + this.setState({ contextValue: { isMounting: !1 } }); + }), + (r.componentWillUnmount = function () { + this.mounted = !1; + }), + (n.getDerivedStateFromProps = function (t, n) { + var r, + i, + a = n.children, + o = n.handleExited; + return { + children: n.firstRender + ? ((r = t), + (i = o), + xo(r.children, function (t) { + return (0, + e.cloneElement)(t, { onExited: i.bind(null, t), in: !0, appear: So(t, "appear", r), enter: So(t, "enter", r), exit: So(t, "exit", r) }); + })) + : Eo(t, a, o), + firstRender: !1, + }; + }), + (r.handleExited = function (e, t) { + var n = xo(this.props.children); + e.key in n || + (e.props.onExited && e.props.onExited(t), + this.mounted && + this.setState(function (t) { + var n = (0, Nt.Z)({}, t.children); + return delete n[e.key], { children: n }; + })); + }), + (r.render = function () { + var t = this.props, + n = t.component, + r = t.childFactory, + i = (0, Gt.Z)(t, ["component", "childFactory"]), + a = this.state.contextValue, + o = _o(this.state.children).map(r); + return ( + delete i.appear, + delete i.enter, + delete i.exit, + null === n + ? e.createElement(oi.Provider, { value: a }, o) + : e.createElement( + oi.Provider, + { value: a }, + e.createElement(n, i, o) + ) + ); + }), + n + ); + })(e.Component); + (Co.propTypes = {}), + (Co.defaultProps = { + component: "div", + childFactory: function (e) { + return e; + }, + }); + var wo = Co; + var To = function (t) { + var n = t.className, + r = t.classes, + i = t.pulsate, + a = void 0 !== i && i, + o = t.rippleX, + s = t.rippleY, + l = t.rippleSize, + u = t.in, + c = t.onExited, + f = t.timeout, + d = e.useState(!1), + h = (0, Ot.Z)(d, 2), + p = h[0], + v = h[1], + m = (0, Zt.Z)(n, r.ripple, r.rippleVisible, a && r.ripplePulsate), + g = { width: l, height: l, top: -l / 2 + s, left: -l / 2 + o }, + A = (0, Zt.Z)(r.child, p && r.childLeaving, a && r.childPulsate); + return ( + u || p || v(!0), + e.useEffect( + function () { + if (!u && null != c) { + var e = setTimeout(c, f); + return function () { + clearTimeout(e); + }; + } + }, + [c, u, f] + ), + (0, Ut.jsx)("span", { + className: m, + style: g, + children: (0, Ut.jsx)("span", { className: A }), + }) + ); + }; + var Mo, + Io, + ko, + Ro, + Bo, + Po, + Lo, + Do, + Uo = (0, wn.Z)("MuiTouchRipple", [ + "root", + "ripple", + "rippleVisible", + "ripplePulsate", + "child", + "childLeaving", + "childPulsate", + ]), + Fo = ["center", "classes", "className"], + Oo = gn( + Bo || + (Bo = + Mo || + (Mo = yo([ + "\n 0% {\n transform: scale(0);\n opacity: 0.1;\n }\n\n 100% {\n transform: scale(1);\n opacity: 0.3;\n }\n", + ]))) + ), + No = gn( + Po || + (Po = + Io || + (Io = yo([ + "\n 0% {\n opacity: 1;\n }\n\n 100% {\n opacity: 0;\n }\n", + ]))) + ), + Go = gn( + Lo || + (Lo = + ko || + (ko = yo([ + "\n 0% {\n transform: scale(1);\n }\n\n 50% {\n transform: scale(0.92);\n }\n\n 100% {\n transform: scale(1);\n }\n", + ]))) + ), + Zo = (0, Ht.ZP)("span", { name: "MuiTouchRipple", slot: "Root" })({ + overflow: "hidden", + pointerEvents: "none", + position: "absolute", + zIndex: 0, + top: 0, + right: 0, + bottom: 0, + left: 0, + borderRadius: "inherit", + }), + zo = (0, Ht.ZP)(To, { name: "MuiTouchRipple", slot: "Ripple" })( + Do || + (Do = + Ro || + (Ro = yo([ + "\n opacity: 0;\n position: absolute;\n\n &.", + " {\n opacity: 0.3;\n transform: scale(1);\n animation-name: ", + ";\n animation-duration: ", + "ms;\n animation-timing-function: ", + ";\n }\n\n &.", + " {\n animation-duration: ", + "ms;\n }\n\n & .", + " {\n opacity: 1;\n display: block;\n width: 100%;\n height: 100%;\n border-radius: 50%;\n background-color: currentColor;\n }\n\n & .", + " {\n opacity: 0;\n animation-name: ", + ";\n animation-duration: ", + "ms;\n animation-timing-function: ", + ";\n }\n\n & .", + " {\n position: absolute;\n /* @noflip */\n left: 0px;\n top: 0;\n animation-name: ", + ";\n animation-duration: 2500ms;\n animation-timing-function: ", + ";\n animation-iteration-count: infinite;\n animation-delay: 200ms;\n }\n", + ]))), + Uo.rippleVisible, + Oo, + 550, + function (e) { + return e.theme.transitions.easing.easeInOut; + }, + Uo.ripplePulsate, + function (e) { + return e.theme.transitions.duration.shorter; + }, + Uo.child, + Uo.childLeaving, + No, + 550, + function (e) { + return e.theme.transitions.easing.easeInOut; + }, + Uo.childPulsate, + Go, + function (e) { + return e.theme.transitions.easing.easeInOut; + } + ), + Qo = e.forwardRef(function (t, n) { + var r = (0, Vt.Z)({ props: t, name: "MuiTouchRipple" }), + i = r.center, + a = void 0 !== i && i, + o = r.classes, + s = void 0 === o ? {} : o, + l = r.className, + u = (0, Gt.Z)(r, Fo), + c = e.useState([]), + f = (0, Ot.Z)(c, 2), + d = f[0], + h = f[1], + p = e.useRef(0), + v = e.useRef(null); + e.useEffect( + function () { + v.current && (v.current(), (v.current = null)); + }, + [d] + ); + var m = e.useRef(!1), + g = e.useRef(0), + A = e.useRef(null), + y = e.useRef(null); + e.useEffect(function () { + return function () { + g.current && clearTimeout(g.current); + }; + }, []); + var b = e.useCallback( + function (e) { + var t = e.pulsate, + n = e.rippleX, + r = e.rippleY, + i = e.rippleSize, + a = e.cb; + h(function (e) { + return [].concat((0, xt.Z)(e), [ + (0, Ut.jsx)( + zo, + { + classes: { + ripple: (0, Zt.Z)(s.ripple, Uo.ripple), + rippleVisible: (0, Zt.Z)( + s.rippleVisible, + Uo.rippleVisible + ), + ripplePulsate: (0, Zt.Z)( + s.ripplePulsate, + Uo.ripplePulsate + ), + child: (0, Zt.Z)(s.child, Uo.child), + childLeaving: (0, Zt.Z)( + s.childLeaving, + Uo.childLeaving + ), + childPulsate: (0, Zt.Z)( + s.childPulsate, + Uo.childPulsate + ), + }, + timeout: 550, + pulsate: t, + rippleX: n, + rippleY: r, + rippleSize: i, + }, + p.current + ), + ]); + }), + (p.current += 1), + (v.current = a); + }, + [s] + ), + x = e.useCallback( + function () { + var 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] + : function () {}, + r = t.pulsate, + i = void 0 !== r && r, + o = t.center, + s = void 0 === o ? a || t.pulsate : o, + l = t.fakeElement, + u = void 0 !== l && l; + if ("mousedown" === (null == e ? void 0 : e.type) && m.current) + m.current = !1; + else { + "touchstart" === (null == e ? void 0 : e.type) && + (m.current = !0); + var c, + f, + d, + h = u ? null : y.current, + p = h + ? h.getBoundingClientRect() + : { width: 0, height: 0, left: 0, top: 0 }; + if ( + s || + void 0 === e || + (0 === e.clientX && 0 === e.clientY) || + (!e.clientX && !e.touches) + ) + (c = Math.round(p.width / 2)), (f = Math.round(p.height / 2)); + else { + var v = e.touches && e.touches.length > 0 ? e.touches[0] : e, + x = v.clientX, + S = v.clientY; + (c = Math.round(x - p.left)), (f = Math.round(S - p.top)); + } + if (s) + (d = Math.sqrt( + (2 * Math.pow(p.width, 2) + Math.pow(p.height, 2)) / 3 + )) % + 2 === + 0 && (d += 1); + else { + var E = + 2 * Math.max(Math.abs((h ? h.clientWidth : 0) - c), c) + + 2, + _ = + 2 * Math.max(Math.abs((h ? h.clientHeight : 0) - f), f) + + 2; + d = Math.sqrt(Math.pow(E, 2) + Math.pow(_, 2)); + } + null != e && e.touches + ? null === A.current && + ((A.current = function () { + b({ + pulsate: i, + rippleX: c, + rippleY: f, + rippleSize: d, + cb: n, + }); + }), + (g.current = setTimeout(function () { + A.current && (A.current(), (A.current = null)); + }, 80))) + : b({ + pulsate: i, + rippleX: c, + rippleY: f, + rippleSize: d, + cb: n, + }); + } + }, + [a, b] + ), + S = e.useCallback( + function () { + x({}, { pulsate: !0 }); + }, + [x] + ), + E = e.useCallback(function (e, t) { + if ( + (clearTimeout(g.current), + "touchend" === (null == e ? void 0 : e.type) && A.current) + ) + return ( + A.current(), + (A.current = null), + void (g.current = setTimeout(function () { + E(e, t); + })) + ); + (A.current = null), + h(function (e) { + return e.length > 0 ? e.slice(1) : e; + }), + (v.current = t); + }, []); + return ( + e.useImperativeHandle( + n, + function () { + return { pulsate: S, start: x, stop: E }; + }, + [S, x, E] + ), + (0, Ut.jsx)( + Zo, + (0, Nt.Z)({ className: (0, Zt.Z)(Uo.root, s.root, l), ref: y }, u, { + children: (0, Ut.jsx)(wo, { + component: null, + exit: !0, + children: d, + }), + }) + ) + ); + }), + Ho = Qo; + function Vo(e) { + return (0, Tn.Z)("MuiButtonBase", e); + } + var jo, + Wo = (0, wn.Z)("MuiButtonBase", ["root", "disabled", "focusVisible"]), + Xo = [ + "action", + "centerRipple", + "children", + "className", + "component", + "disabled", + "disableRipple", + "disableTouchRipple", + "focusRipple", + "focusVisibleClassName", + "LinkComponent", + "onBlur", + "onClick", + "onContextMenu", + "onDragLeave", + "onFocus", + "onFocusVisible", + "onKeyDown", + "onKeyUp", + "onMouseDown", + "onMouseLeave", + "onMouseUp", + "onTouchEnd", + "onTouchMove", + "onTouchStart", + "tabIndex", + "TouchRippleProps", + "touchRippleRef", + "type", + ], + Yo = (0, Ht.ZP)("button", { + name: "MuiButtonBase", + slot: "Root", + overridesResolver: function (e, t) { + return t.root; + }, + })( + ((jo = { + display: "inline-flex", + alignItems: "center", + justifyContent: "center", + position: "relative", + boxSizing: "border-box", + WebkitTapHighlightColor: "transparent", + backgroundColor: "transparent", + outline: 0, + border: 0, + margin: 0, + borderRadius: 0, + padding: 0, + cursor: "pointer", + userSelect: "none", + verticalAlign: "middle", + MozAppearance: "none", + WebkitAppearance: "none", + textDecoration: "none", + color: "inherit", + "&::-moz-focus-inner": { borderStyle: "none" }, + }), + (0, l.Z)(jo, "&.".concat(Wo.disabled), { + pointerEvents: "none", + cursor: "default", + }), + (0, l.Z)(jo, "@media print", { colorAdjust: "exact" }), + jo) + ), + qo = e.forwardRef(function (t, n) { + var r = (0, Vt.Z)({ props: t, name: "MuiButtonBase" }), + i = r.action, + a = r.centerRipple, + o = void 0 !== a && a, + s = r.children, + l = r.className, + u = r.component, + c = void 0 === u ? "button" : u, + f = r.disabled, + d = void 0 !== f && f, + h = r.disableRipple, + p = void 0 !== h && h, + v = r.disableTouchRipple, + m = void 0 !== v && v, + g = r.focusRipple, + A = void 0 !== g && g, + y = r.LinkComponent, + b = void 0 === y ? "a" : y, + x = r.onBlur, + S = r.onClick, + E = r.onContextMenu, + _ = r.onDragLeave, + C = r.onFocus, + w = r.onFocusVisible, + T = r.onKeyDown, + M = r.onKeyUp, + I = r.onMouseDown, + k = r.onMouseLeave, + R = r.onMouseUp, + B = r.onTouchEnd, + P = r.onTouchMove, + L = r.onTouchStart, + D = r.tabIndex, + U = void 0 === D ? 0 : D, + F = r.TouchRippleProps, + O = r.touchRippleRef, + N = r.type, + G = (0, Gt.Z)(r, Xo), + Z = e.useRef(null), + z = e.useRef(null), + Q = (0, un.Z)(z, O), + H = (0, Ao.Z)(), + V = H.isFocusVisibleRef, + j = H.onFocus, + W = H.onBlur, + X = H.ref, + Y = e.useState(!1), + q = (0, Ot.Z)(Y, 2), + J = q[0], + K = q[1]; + d && J && K(!1), + e.useImperativeHandle( + i, + function () { + return { + focusVisible: function () { + K(!0), Z.current.focus(); + }, + }; + }, + [] + ); + var $ = e.useState(!1), + ee = (0, Ot.Z)($, 2), + te = ee[0], + ne = ee[1]; + e.useEffect(function () { + ne(!0); + }, []); + var re = te && !p && !d; + function ie(e, t) { + var n = + arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : m; + return (0, go.Z)(function (r) { + return t && t(r), !n && z.current && z.current[e](r), !0; + }); + } + e.useEffect( + function () { + J && A && !p && te && z.current.pulsate(); + }, + [p, A, J, te] + ); + var ae = ie("start", I), + oe = ie("stop", E), + se = ie("stop", _), + le = ie("stop", R), + ue = ie("stop", function (e) { + J && e.preventDefault(), k && k(e); + }), + ce = ie("start", L), + fe = ie("stop", B), + de = ie("stop", P), + he = ie( + "stop", + function (e) { + W(e), !1 === V.current && K(!1), x && x(e); + }, + !1 + ), + pe = (0, go.Z)(function (e) { + Z.current || (Z.current = e.currentTarget), + j(e), + !0 === V.current && (K(!0), w && w(e)), + C && C(e); + }), + ve = function () { + var e = Z.current; + return c && "button" !== c && !("A" === e.tagName && e.href); + }, + me = e.useRef(!1), + ge = (0, go.Z)(function (e) { + A && + !me.current && + J && + z.current && + " " === e.key && + ((me.current = !0), + z.current.stop(e, function () { + z.current.start(e); + })), + e.target === e.currentTarget && + ve() && + " " === e.key && + e.preventDefault(), + T && T(e), + e.target === e.currentTarget && + ve() && + "Enter" === e.key && + !d && + (e.preventDefault(), S && S(e)); + }), + Ae = (0, go.Z)(function (e) { + A && + " " === e.key && + z.current && + J && + !e.defaultPrevented && + ((me.current = !1), + z.current.stop(e, function () { + z.current.pulsate(e); + })), + M && M(e), + S && + e.target === e.currentTarget && + ve() && + " " === e.key && + !e.defaultPrevented && + S(e); + }), + ye = c; + "button" === ye && (G.href || G.to) && (ye = b); + var be = {}; + "button" === ye + ? ((be.type = void 0 === N ? "button" : N), (be.disabled = d)) + : (G.href || G.to || (be.role = "button"), + d && (be["aria-disabled"] = d)); + var xe = (0, un.Z)(n, X, Z); + var Se = (0, Nt.Z)({}, r, { + centerRipple: o, + component: c, + disabled: d, + disableRipple: p, + disableTouchRipple: m, + focusRipple: A, + tabIndex: U, + focusVisible: J, + }), + Ee = (function (e) { + var t = e.disabled, + n = e.focusVisible, + r = e.focusVisibleClassName, + i = e.classes, + a = { root: ["root", t && "disabled", n && "focusVisible"] }, + o = (0, zt.Z)(a, Vo, i); + return n && r && (o.root += " ".concat(r)), o; + })(Se); + return (0, + Ut.jsxs)(Yo, (0, Nt.Z)({ as: ye, className: (0, Zt.Z)(Ee.root, l), ownerState: Se, onBlur: he, onClick: S, onContextMenu: oe, onFocus: pe, onKeyDown: ge, onKeyUp: Ae, onMouseDown: ae, onMouseLeave: ue, onMouseUp: le, onDragLeave: se, onTouchEnd: fe, onTouchMove: de, onTouchStart: ce, ref: xe, tabIndex: d ? -1 : U, type: N }, be, G, { children: [s, re ? (0, Ut.jsx)(Ho, (0, Nt.Z)({ ref: Q, center: o }, F)) : null] })); + }), + Jo = qo; + function Ko(e) { + return (0, Tn.Z)("MuiButton", e); + } + var $o = (0, wn.Z)("MuiButton", [ + "root", + "text", + "textInherit", + "textPrimary", + "textSecondary", + "textSuccess", + "textError", + "textInfo", + "textWarning", + "outlined", + "outlinedInherit", + "outlinedPrimary", + "outlinedSecondary", + "outlinedSuccess", + "outlinedError", + "outlinedInfo", + "outlinedWarning", + "contained", + "containedInherit", + "containedPrimary", + "containedSecondary", + "containedSuccess", + "containedError", + "containedInfo", + "containedWarning", + "disableElevation", + "focusVisible", + "disabled", + "colorInherit", + "textSizeSmall", + "textSizeMedium", + "textSizeLarge", + "outlinedSizeSmall", + "outlinedSizeMedium", + "outlinedSizeLarge", + "containedSizeSmall", + "containedSizeMedium", + "containedSizeLarge", + "sizeMedium", + "sizeSmall", + "sizeLarge", + "fullWidth", + "startIcon", + "endIcon", + "iconSizeSmall", + "iconSizeMedium", + "iconSizeLarge", + ]); + var es = e.createContext({}); + var ts = e.createContext(void 0), + ns = [ + "children", + "color", + "component", + "className", + "disabled", + "disableElevation", + "disableFocusRipple", + "endIcon", + "focusVisibleClassName", + "fullWidth", + "size", + "startIcon", + "type", + "variant", + ], + rs = function (e) { + return (0, Nt.Z)( + {}, + "small" === e.size && { "& > *:nth-of-type(1)": { fontSize: 18 } }, + "medium" === e.size && { "& > *:nth-of-type(1)": { fontSize: 20 } }, + "large" === e.size && { "& > *:nth-of-type(1)": { fontSize: 22 } } + ); + }, + is = (0, Ht.ZP)(Jo, { + shouldForwardProp: function (e) { + return (0, Ht.FO)(e) || "classes" === e; + }, + name: "MuiButton", + slot: "Root", + overridesResolver: function (e, t) { + var n = e.ownerState; + return [ + t.root, + t[n.variant], + t["".concat(n.variant).concat((0, ln.Z)(n.color))], + t["size".concat((0, ln.Z)(n.size))], + t["".concat(n.variant, "Size").concat((0, ln.Z)(n.size))], + "inherit" === n.color && t.colorInherit, + n.disableElevation && t.disableElevation, + n.fullWidth && t.fullWidth, + ]; + }, + })( + function (e) { + var t, + n, + r, + i = e.theme, + a = e.ownerState, + o = + "light" === i.palette.mode + ? i.palette.grey[300] + : i.palette.grey[800], + s = + "light" === i.palette.mode + ? i.palette.grey.A100 + : i.palette.grey[700]; + return (0, Nt.Z)( + {}, + i.typography.button, + ((t = { + minWidth: 64, + padding: "6px 16px", + borderRadius: (i.vars || i).shape.borderRadius, + transition: i.transitions.create( + ["background-color", "box-shadow", "border-color", "color"], + { duration: i.transitions.duration.short } + ), + "&:hover": (0, Nt.Z)( + { + textDecoration: "none", + backgroundColor: i.vars + ? "rgba(" + .concat(i.vars.palette.text.primaryChannel, " / ") + .concat(i.vars.palette.action.hoverOpacity, ")") + : (0, ia.Fq)( + i.palette.text.primary, + i.palette.action.hoverOpacity + ), + "@media (hover: none)": { backgroundColor: "transparent" }, + }, + "text" === a.variant && + "inherit" !== a.color && { + backgroundColor: i.vars + ? "rgba(" + .concat(i.vars.palette[a.color].mainChannel, " / ") + .concat(i.vars.palette.action.hoverOpacity, ")") + : (0, ia.Fq)( + i.palette[a.color].main, + i.palette.action.hoverOpacity + ), + "@media (hover: none)": { backgroundColor: "transparent" }, + }, + "outlined" === a.variant && + "inherit" !== a.color && { + border: "1px solid ".concat( + (i.vars || i).palette[a.color].main + ), + backgroundColor: i.vars + ? "rgba(" + .concat(i.vars.palette[a.color].mainChannel, " / ") + .concat(i.vars.palette.action.hoverOpacity, ")") + : (0, ia.Fq)( + i.palette[a.color].main, + i.palette.action.hoverOpacity + ), + "@media (hover: none)": { backgroundColor: "transparent" }, + }, + "contained" === a.variant && { + backgroundColor: i.vars + ? i.vars.palette.Button.inheritContainedHoverBg + : s, + boxShadow: (i.vars || i).shadows[4], + "@media (hover: none)": { + boxShadow: (i.vars || i).shadows[2], + backgroundColor: (i.vars || i).palette.grey[300], + }, + }, + "contained" === a.variant && + "inherit" !== a.color && { + backgroundColor: (i.vars || i).palette[a.color].dark, + "@media (hover: none)": { + backgroundColor: (i.vars || i).palette[a.color].main, + }, + } + ), + "&:active": (0, Nt.Z)( + {}, + "contained" === a.variant && { + boxShadow: (i.vars || i).shadows[8], + } + ), + }), + (0, l.Z)( + t, + "&.".concat($o.focusVisible), + (0, Nt.Z)( + {}, + "contained" === a.variant && { + boxShadow: (i.vars || i).shadows[6], + } + ) + ), + (0, l.Z)( + t, + "&.".concat($o.disabled), + (0, Nt.Z)( + { color: (i.vars || i).palette.action.disabled }, + "outlined" === a.variant && { + border: "1px solid ".concat( + (i.vars || i).palette.action.disabledBackground + ), + }, + "contained" === a.variant && { + color: (i.vars || i).palette.action.disabled, + boxShadow: (i.vars || i).shadows[0], + backgroundColor: (i.vars || i).palette.action + .disabledBackground, + } + ) + ), + t), + "text" === a.variant && { padding: "6px 8px" }, + "text" === a.variant && + "inherit" !== a.color && { + color: (i.vars || i).palette[a.color].main, + }, + "outlined" === a.variant && { + padding: "5px 15px", + border: "1px solid currentColor", + }, + "outlined" === a.variant && + "inherit" !== a.color && { + color: (i.vars || i).palette[a.color].main, + border: i.vars + ? "1px solid rgba(".concat( + i.vars.palette[a.color].mainChannel, + " / 0.5)" + ) + : "1px solid ".concat( + (0, ia.Fq)(i.palette[a.color].main, 0.5) + ), + }, + "contained" === a.variant && { + color: i.vars + ? i.vars.palette.text.primary + : null == (n = (r = i.palette).getContrastText) + ? void 0 + : n.call(r, i.palette.grey[300]), + backgroundColor: i.vars + ? i.vars.palette.Button.inheritContainedBg + : o, + boxShadow: (i.vars || i).shadows[2], + }, + "contained" === a.variant && + "inherit" !== a.color && { + color: (i.vars || i).palette[a.color].contrastText, + backgroundColor: (i.vars || i).palette[a.color].main, + }, + "inherit" === a.color && { + color: "inherit", + borderColor: "currentColor", + }, + "small" === a.size && + "text" === a.variant && { + padding: "4px 5px", + fontSize: i.typography.pxToRem(13), + }, + "large" === a.size && + "text" === a.variant && { + padding: "8px 11px", + fontSize: i.typography.pxToRem(15), + }, + "small" === a.size && + "outlined" === a.variant && { + padding: "3px 9px", + fontSize: i.typography.pxToRem(13), + }, + "large" === a.size && + "outlined" === a.variant && { + padding: "7px 21px", + fontSize: i.typography.pxToRem(15), + }, + "small" === a.size && + "contained" === a.variant && { + padding: "4px 10px", + fontSize: i.typography.pxToRem(13), + }, + "large" === a.size && + "contained" === a.variant && { + padding: "8px 22px", + fontSize: i.typography.pxToRem(15), + }, + a.fullWidth && { width: "100%" } + ); + }, + function (e) { + var t; + return ( + e.ownerState.disableElevation && + ((t = { boxShadow: "none", "&:hover": { boxShadow: "none" } }), + (0, l.Z)(t, "&.".concat($o.focusVisible), { boxShadow: "none" }), + (0, l.Z)(t, "&:active", { boxShadow: "none" }), + (0, l.Z)(t, "&.".concat($o.disabled), { boxShadow: "none" }), + t) + ); + } + ), + as = (0, Ht.ZP)("span", { + name: "MuiButton", + slot: "StartIcon", + overridesResolver: function (e, t) { + var n = e.ownerState; + return [t.startIcon, t["iconSize".concat((0, ln.Z)(n.size))]]; + }, + })(function (e) { + var t = e.ownerState; + return (0, + Nt.Z)({ display: "inherit", marginRight: 8, marginLeft: -4 }, "small" === t.size && { marginLeft: -2 }, rs(t)); + }), + os = (0, Ht.ZP)("span", { + name: "MuiButton", + slot: "EndIcon", + overridesResolver: function (e, t) { + var n = e.ownerState; + return [t.endIcon, t["iconSize".concat((0, ln.Z)(n.size))]]; + }, + })(function (e) { + var t = e.ownerState; + return (0, + Nt.Z)({ display: "inherit", marginRight: -4, marginLeft: 8 }, "small" === t.size && { marginRight: -2 }, rs(t)); + }), + ss = e.forwardRef(function (t, n) { + var r = e.useContext(es), + i = e.useContext(ts), + a = (0, mo.Z)(r, t), + o = (0, Vt.Z)({ props: a, name: "MuiButton" }), + s = o.children, + l = o.color, + u = void 0 === l ? "primary" : l, + c = o.component, + f = void 0 === c ? "button" : c, + d = o.className, + h = o.disabled, + p = void 0 !== h && h, + v = o.disableElevation, + m = void 0 !== v && v, + g = o.disableFocusRipple, + A = void 0 !== g && g, + y = o.endIcon, + b = o.focusVisibleClassName, + x = o.fullWidth, + S = void 0 !== x && x, + E = o.size, + _ = void 0 === E ? "medium" : E, + C = o.startIcon, + w = o.type, + T = o.variant, + M = void 0 === T ? "text" : T, + I = (0, Gt.Z)(o, ns), + k = (0, Nt.Z)({}, o, { + color: u, + component: f, + disabled: p, + disableElevation: m, + disableFocusRipple: A, + fullWidth: S, + size: _, + type: w, + variant: M, + }), + R = (function (e) { + var t = e.color, + n = e.disableElevation, + r = e.fullWidth, + i = e.size, + a = e.variant, + o = e.classes, + s = { + root: [ + "root", + a, + "".concat(a).concat((0, ln.Z)(t)), + "size".concat((0, ln.Z)(i)), + "".concat(a, "Size").concat((0, ln.Z)(i)), + "inherit" === t && "colorInherit", + n && "disableElevation", + r && "fullWidth", + ], + label: ["label"], + startIcon: ["startIcon", "iconSize".concat((0, ln.Z)(i))], + endIcon: ["endIcon", "iconSize".concat((0, ln.Z)(i))], + }, + l = (0, zt.Z)(s, Ko, o); + return (0, Nt.Z)({}, o, l); + })(k), + B = + C && + (0, Ut.jsx)(as, { + className: R.startIcon, + ownerState: k, + children: C, + }), + P = + y && + (0, Ut.jsx)(os, { + className: R.endIcon, + ownerState: k, + children: y, + }), + L = i || ""; + return (0, + Ut.jsxs)(is, (0, Nt.Z)({ ownerState: k, className: (0, Zt.Z)(r.className, R.root, d, L), component: f, disabled: p, focusRipple: !A, focusVisibleClassName: (0, Zt.Z)(R.focusVisible, b), ref: n, type: w }, I, { classes: R, children: [B, s, P] })); + }), + ls = ss; + function us(e) { + return (0, Tn.Z)("MuiCard", e); + } + (0, wn.Z)("MuiCard", ["root"]); + var cs = ["className", "raised"], + fs = (0, Ht.ZP)(ca, { + name: "MuiCard", + slot: "Root", + overridesResolver: function (e, t) { + return t.root; + }, + })(function () { + return { overflow: "hidden" }; + }), + ds = e.forwardRef(function (e, t) { + var n = (0, Vt.Z)({ props: e, name: "MuiCard" }), + r = n.className, + i = n.raised, + a = void 0 !== i && i, + o = (0, Gt.Z)(n, cs), + s = (0, Nt.Z)({}, n, { raised: a }), + l = (function (e) { + var t = e.classes; + return (0, zt.Z)({ root: ["root"] }, us, t); + })(s); + return (0, + Ut.jsx)(fs, (0, Nt.Z)({ className: (0, Zt.Z)(l.root, r), elevation: a ? 8 : void 0, ref: t, ownerState: s }, o)); + }), + hs = ds, + ps = function (e) { + var t = e.Children, + n = e.large, + r = e.small; + return (0, Ut.jsx)(hs, { + sx: { + width: n ? 400 : 200, + height: r ? 200 : 270, + backgroundColor: "transparent", + border: "1px solid #22eff1", + marginTop: n ? 0 : 5, + marginRight: 3, + }, + children: t, + }); + }, + vs = n(9613), + ms = n.n(vs); + var gs = function (e) { + function t(e, r, l, u, d) { + for ( + var h, + p, + v, + m, + b, + S = 0, + E = 0, + _ = 0, + C = 0, + w = 0, + B = 0, + L = (v = h = 0), + U = 0, + F = 0, + O = 0, + N = 0, + G = l.length, + Z = G - 1, + z = "", + Q = "", + H = "", + V = ""; + U < G; + + ) { + if ( + ((p = l.charCodeAt(U)), + U === Z && + 0 !== E + C + _ + S && + (0 !== E && (p = 47 === E ? 10 : 47), + (C = _ = S = 0), + G++, + Z++), + 0 === E + C + _ + S) + ) { + if ( + U === Z && + (0 < F && (z = z.replace(f, "")), 0 < z.trim().length) + ) { + switch (p) { + case 32: + case 9: + case 59: + case 13: + case 10: + break; + default: + z += l.charAt(U); + } + p = 59; + } + switch (p) { + case 123: + for ( + h = (z = z.trim()).charCodeAt(0), v = 1, N = ++U; + U < G; + + ) { + switch ((p = l.charCodeAt(U))) { + case 123: + v++; + break; + case 125: + v--; + break; + case 47: + switch ((p = l.charCodeAt(U + 1))) { + case 42: + case 47: + e: { + for (L = U + 1; L < Z; ++L) + switch (l.charCodeAt(L)) { + case 47: + if ( + 42 === p && + 42 === l.charCodeAt(L - 1) && + U + 2 !== L + ) { + U = L + 1; + break e; + } + break; + case 10: + if (47 === p) { + U = L + 1; + break e; + } + } + U = L; + } + } + break; + case 91: + p++; + case 40: + p++; + case 34: + case 39: + for (; U++ < Z && l.charCodeAt(U) !== p; ); + } + if (0 === v) break; + U++; + } + if ( + ((v = l.substring(N, U)), + 0 === h && + (h = (z = z.replace(c, "").trim()).charCodeAt(0)), + 64 === h) + ) { + switch ( + (0 < F && (z = z.replace(f, "")), (p = z.charCodeAt(1))) + ) { + case 100: + case 109: + case 115: + case 45: + F = r; + break; + default: + F = R; + } + if ( + ((N = (v = t(r, F, v, p, d + 1)).length), + 0 < P && + ((b = s(3, v, (F = n(R, z, O)), r, M, T, N, p, d, u)), + (z = F.join("")), + void 0 !== b && + 0 === (N = (v = b.trim()).length) && + ((p = 0), (v = ""))), + 0 < N) + ) + switch (p) { + case 115: + z = z.replace(x, o); + case 100: + case 109: + case 45: + v = z + "{" + v + "}"; + break; + case 107: + (v = (z = z.replace(g, "$1 $2")) + "{" + v + "}"), + (v = + 1 === k || (2 === k && a("@" + v, 3)) + ? "@-webkit-" + v + "@" + v + : "@" + v); + break; + default: + (v = z + v), 112 === u && ((Q += v), (v = "")); + } + else v = ""; + } else v = t(r, n(r, z, O), v, u, d + 1); + (H += v), + (v = O = F = L = h = 0), + (z = ""), + (p = l.charCodeAt(++U)); + break; + case 125: + case 59: + if ( + 1 < (N = (z = (0 < F ? z.replace(f, "") : z).trim()).length) + ) + switch ( + (0 === L && + ((h = z.charCodeAt(0)), + 45 === h || (96 < h && 123 > h)) && + (N = (z = z.replace(" ", ":")).length), + 0 < P && + void 0 !== + (b = s(1, z, r, e, M, T, Q.length, u, d, u)) && + 0 === (N = (z = b.trim()).length) && + (z = "\0\0"), + (h = z.charCodeAt(0)), + (p = z.charCodeAt(1)), + h) + ) { + case 0: + break; + case 64: + if (105 === p || 99 === p) { + V += z + l.charAt(U); + break; + } + default: + 58 !== z.charCodeAt(N - 1) && + (Q += i(z, h, p, z.charCodeAt(2))); + } + (O = F = L = h = 0), (z = ""), (p = l.charCodeAt(++U)); + } + } + switch (p) { + case 13: + case 10: + 47 === E + ? (E = 0) + : 0 === 1 + h && + 107 !== u && + 0 < z.length && + ((F = 1), (z += "\0")), + 0 < P * D && s(0, z, r, e, M, T, Q.length, u, d, u), + (T = 1), + M++; + break; + case 59: + case 125: + if (0 === E + C + _ + S) { + T++; + break; + } + default: + switch ((T++, (m = l.charAt(U)), p)) { + case 9: + case 32: + if (0 === C + S + E) + switch (w) { + case 44: + case 58: + case 9: + case 32: + m = ""; + break; + default: + 32 !== p && (m = " "); + } + break; + case 0: + m = "\\0"; + break; + case 12: + m = "\\f"; + break; + case 11: + m = "\\v"; + break; + case 38: + 0 === C + E + S && ((F = O = 1), (m = "\f" + m)); + break; + case 108: + if (0 === C + E + S + I && 0 < L) + switch (U - L) { + case 2: + 112 === w && 58 === l.charCodeAt(U - 3) && (I = w); + case 8: + 111 === B && (I = B); + } + break; + case 58: + 0 === C + E + S && (L = U); + break; + case 44: + 0 === E + _ + C + S && ((F = 1), (m += "\r")); + break; + case 34: + case 39: + 0 === E && (C = C === p ? 0 : 0 === C ? p : C); + break; + case 91: + 0 === C + E + _ && S++; + break; + case 93: + 0 === C + E + _ && S--; + break; + case 41: + 0 === C + E + S && _--; + break; + case 40: + if (0 === C + E + S) { + if (0 === h) + if (2 * w + 3 * B === 533); + else h = 1; + _++; + } + break; + case 64: + 0 === E + _ + C + S + L + v && (v = 1); + break; + case 42: + case 47: + if (!(0 < C + S + _)) + switch (E) { + case 0: + switch (2 * p + 3 * l.charCodeAt(U + 1)) { + case 235: + E = 47; + break; + case 220: + (N = U), (E = 42); + } + break; + case 42: + 47 === p && + 42 === w && + N + 2 !== U && + (33 === l.charCodeAt(N + 2) && + (Q += l.substring(N, U + 1)), + (m = ""), + (E = 0)); + } + } + 0 === E && (z += m); + } + (B = w), (w = p), U++; + } + if (0 < (N = Q.length)) { + if ( + ((F = r), + 0 < P && + void 0 !== (b = s(2, Q, F, e, M, T, N, u, d, u)) && + 0 === (Q = b).length) + ) + return V + Q + H; + if (((Q = F.join(",") + "{" + Q + "}"), 0 !== k * I)) { + switch ((2 !== k || a(Q, 2) || (I = 0), I)) { + case 111: + Q = Q.replace(y, ":-moz-$1") + Q; + break; + case 112: + Q = + Q.replace(A, "::-webkit-input-$1") + + Q.replace(A, "::-moz-$1") + + Q.replace(A, ":-ms-input-$1") + + Q; + } + I = 0; + } + } + return V + Q + H; + } + function n(e, t, n) { + var i = t.trim().split(v); + t = i; + var a = i.length, + o = e.length; + switch (o) { + case 0: + case 1: + var s = 0; + for (e = 0 === o ? "" : e[0] + " "; s < a; ++s) + t[s] = r(e, t[s], n).trim(); + break; + default: + var l = (s = 0); + for (t = []; s < a; ++s) + for (var u = 0; u < o; ++u) + t[l++] = r(e[u] + " ", i[s], n).trim(); + } + return t; + } + function r(e, t, n) { + var r = t.charCodeAt(0); + switch ((33 > r && (r = (t = t.trim()).charCodeAt(0)), r)) { + case 38: + return t.replace(m, "$1" + e.trim()); + case 58: + return e.trim() + t.replace(m, "$1" + e.trim()); + default: + if (0 < 1 * n && 0 < t.indexOf("\f")) + return t.replace( + m, + (58 === e.charCodeAt(0) ? "" : "$1") + e.trim() + ); + } + return e + t; + } + function i(e, t, n, r) { + var o = e + ";", + s = 2 * t + 3 * n + 4 * r; + if (944 === s) { + e = o.indexOf(":", 9) + 1; + var l = o.substring(e, o.length - 1).trim(); + return ( + (l = o.substring(0, e).trim() + l + ";"), + 1 === k || (2 === k && a(l, 1)) ? "-webkit-" + l + l : l + ); + } + if (0 === k || (2 === k && !a(o, 1))) return o; + switch (s) { + case 1015: + return 97 === o.charCodeAt(10) ? "-webkit-" + o + o : o; + case 951: + return 116 === o.charCodeAt(3) ? "-webkit-" + o + o : o; + case 963: + return 110 === o.charCodeAt(5) ? "-webkit-" + o + o : o; + case 1009: + if (100 !== o.charCodeAt(4)) break; + case 969: + case 942: + return "-webkit-" + o + o; + case 978: + return "-webkit-" + o + "-moz-" + o + o; + case 1019: + case 983: + return "-webkit-" + o + "-moz-" + o + "-ms-" + o + o; + case 883: + if (45 === o.charCodeAt(8)) return "-webkit-" + o + o; + if (0 < o.indexOf("image-set(", 11)) + return o.replace(w, "$1-webkit-$2") + o; + break; + case 932: + if (45 === o.charCodeAt(4)) + switch (o.charCodeAt(5)) { + case 103: + return ( + "-webkit-box-" + + o.replace("-grow", "") + + "-webkit-" + + o + + "-ms-" + + o.replace("grow", "positive") + + o + ); + case 115: + return ( + "-webkit-" + + o + + "-ms-" + + o.replace("shrink", "negative") + + o + ); + case 98: + return ( + "-webkit-" + + o + + "-ms-" + + o.replace("basis", "preferred-size") + + o + ); + } + return "-webkit-" + o + "-ms-" + o + o; + case 964: + return "-webkit-" + o + "-ms-flex-" + o + o; + case 1023: + if (99 !== o.charCodeAt(8)) break; + return ( + "-webkit-box-pack" + + (l = o + .substring(o.indexOf(":", 15)) + .replace("flex-", "") + .replace("space-between", "justify")) + + "-webkit-" + + o + + "-ms-flex-pack" + + l + + o + ); + case 1005: + return h.test(o) + ? o.replace(d, ":-webkit-") + o.replace(d, ":-moz-") + o + : o; + case 1e3: + switch ( + ((t = (l = o.substring(13).trim()).indexOf("-") + 1), + l.charCodeAt(0) + l.charCodeAt(t)) + ) { + case 226: + l = o.replace(b, "tb"); + break; + case 232: + l = o.replace(b, "tb-rl"); + break; + case 220: + l = o.replace(b, "lr"); + break; + default: + return o; + } + return "-webkit-" + o + "-ms-" + l + o; + case 1017: + if (-1 === o.indexOf("sticky", 9)) break; + case 975: + switch ( + ((t = (o = e).length - 10), + (s = + (l = (33 === o.charCodeAt(t) ? o.substring(0, t) : o) + .substring(e.indexOf(":", 7) + 1) + .trim()).charCodeAt(0) + + (0 | l.charCodeAt(7)))) + ) { + case 203: + if (111 > l.charCodeAt(8)) break; + case 115: + o = o.replace(l, "-webkit-" + l) + ";" + o; + break; + case 207: + case 102: + o = + o.replace( + l, + "-webkit-" + (102 < s ? "inline-" : "") + "box" + ) + + ";" + + o.replace(l, "-webkit-" + l) + + ";" + + o.replace(l, "-ms-" + l + "box") + + ";" + + o; + } + return o + ";"; + case 938: + if (45 === o.charCodeAt(5)) + switch (o.charCodeAt(6)) { + case 105: + return ( + (l = o.replace("-items", "")), + "-webkit-" + o + "-webkit-box-" + l + "-ms-flex-" + l + o + ); + case 115: + return ( + "-webkit-" + o + "-ms-flex-item-" + o.replace(E, "") + o + ); + default: + return ( + "-webkit-" + + o + + "-ms-flex-line-pack" + + o.replace("align-content", "").replace(E, "") + + o + ); + } + break; + case 973: + case 989: + if (45 !== o.charCodeAt(3) || 122 === o.charCodeAt(4)) break; + case 931: + case 953: + if (!0 === C.test(e)) + return 115 === + (l = e.substring(e.indexOf(":") + 1)).charCodeAt(0) + ? i(e.replace("stretch", "fill-available"), t, n, r).replace( + ":fill-available", + ":stretch" + ) + : o.replace(l, "-webkit-" + l) + + o.replace(l, "-moz-" + l.replace("fill-", "")) + + o; + break; + case 962: + if ( + ((o = + "-webkit-" + + o + + (102 === o.charCodeAt(5) ? "-ms-" + o : "") + + o), + 211 === n + r && + 105 === o.charCodeAt(13) && + 0 < o.indexOf("transform", 10)) + ) + return ( + o + .substring(0, o.indexOf(";", 27) + 1) + .replace(p, "$1-webkit-$2") + o + ); + } + return o; + } + function a(e, t) { + var n = e.indexOf(1 === t ? ":" : "{"), + r = e.substring(0, 3 !== t ? n : 10); + return ( + (n = e.substring(n + 1, e.length - 1)), + L(2 !== t ? r : r.replace(_, "$1"), n, t) + ); + } + function o(e, t) { + var n = i(t, t.charCodeAt(0), t.charCodeAt(1), t.charCodeAt(2)); + return n !== t + ";" + ? n.replace(S, " or ($1)").substring(4) + : "(" + t + ")"; + } + function s(e, t, n, r, i, a, o, s, l, c) { + for (var f, d = 0, h = t; d < P; ++d) + switch ((f = B[d].call(u, e, h, n, r, i, a, o, s, l, c))) { + case void 0: + case !1: + case !0: + case null: + break; + default: + h = f; + } + if (h !== t) return h; + } + function l(e) { + return ( + void 0 !== (e = e.prefix) && + ((L = null), + e + ? "function" !== typeof e + ? (k = 1) + : ((k = 2), (L = e)) + : (k = 0)), + l + ); + } + function u(e, n) { + var r = e; + if ((33 > r.charCodeAt(0) && (r = r.trim()), (r = [r]), 0 < P)) { + var i = s(-1, n, r, r, M, T, 0, 0, 0, 0); + void 0 !== i && "string" === typeof i && (n = i); + } + var a = t(R, r, n, 0, 0); + return ( + 0 < P && + void 0 !== (i = s(-2, a, r, r, M, T, a.length, 0, 0, 0)) && + (a = i), + "", + (I = 0), + (T = M = 1), + a + ); + } + var c = /^\0+/g, + f = /[\0\r\f]/g, + d = /: */g, + h = /zoo|gra/, + p = /([,: ])(transform)/g, + v = /,\r+?/g, + m = /([\t\r\n ])*\f?&/g, + g = /@(k\w+)\s*(\S*)\s*/, + A = /::(place)/g, + y = /:(read-only)/g, + b = /[svh]\w+-[tblr]{2}/, + x = /\(\s*(.*)\s*\)/g, + S = /([\s\S]*?);/g, + E = /-self|flex-/g, + _ = /[^]*?(:[rp][el]a[\w-]+)[^]*/, + C = /stretch|:\s*\w+\-(?:conte|avail)/, + w = /([^-])(image-set\()/, + T = 1, + M = 1, + I = 0, + k = 1, + R = [], + B = [], + P = 0, + L = null, + D = 0; + return ( + (u.use = function e(t) { + switch (t) { + case void 0: + case null: + P = B.length = 0; + break; + default: + if ("function" === typeof t) B[P++] = t; + else if ("object" === typeof t) + for (var n = 0, r = t.length; n < r; ++n) e(t[n]); + else D = 0 | !!t; + } + return e; + }), + (u.set = l), + void 0 !== e && l(e), + u + ); + }, + As = { + animationIterationCount: 1, + borderImageOutset: 1, + borderImageSlice: 1, + borderImageWidth: 1, + boxFlex: 1, + boxFlexGroup: 1, + boxOrdinalGroup: 1, + columnCount: 1, + columns: 1, + flex: 1, + flexGrow: 1, + flexPositive: 1, + flexShrink: 1, + flexNegative: 1, + flexOrder: 1, + gridRow: 1, + gridRowEnd: 1, + gridRowSpan: 1, + gridRowStart: 1, + gridColumn: 1, + gridColumnEnd: 1, + gridColumnSpan: 1, + gridColumnStart: 1, + msGridRow: 1, + msGridRowSpan: 1, + msGridColumn: 1, + msGridColumnSpan: 1, + fontWeight: 1, + lineHeight: 1, + opacity: 1, + order: 1, + orphans: 1, + tabSize: 1, + widows: 1, + zIndex: 1, + zoom: 1, + WebkitLineClamp: 1, + fillOpacity: 1, + floodOpacity: 1, + stopOpacity: 1, + strokeDasharray: 1, + strokeDashoffset: 1, + strokeMiterlimit: 1, + strokeOpacity: 1, + strokeWidth: 1, + }, + ys = n(9791); + function bs() { + return (bs = + Object.assign || + 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; + }).apply(this, arguments); + } + var xs = function (e, t) { + for (var n = [e[0]], r = 0, i = t.length; r < i; r += 1) + n.push(t[r], e[r + 1]); + return n; + }, + Ss = function (e) { + return ( + null !== e && + "object" == typeof e && + "[object Object]" === + (e.toString ? e.toString() : Object.prototype.toString.call(e)) && + !(0, x.typeOf)(e) + ); + }, + Es = Object.freeze([]), + _s = Object.freeze({}); + function Cs(e) { + return "function" == typeof e; + } + function ws(e) { + return e.displayName || e.name || "Component"; + } + function Ts(e) { + return e && "string" == typeof e.styledComponentId; + } + var Ms = + ("undefined" != typeof process && + void 0 !== + { + NODE_ENV: "production", + PUBLIC_URL: ".", + WDS_SOCKET_HOST: void 0, + WDS_SOCKET_PATH: void 0, + WDS_SOCKET_PORT: void 0, + FAST_REFRESH: !0, + } && + ({ + NODE_ENV: "production", + PUBLIC_URL: ".", + WDS_SOCKET_HOST: void 0, + WDS_SOCKET_PATH: void 0, + WDS_SOCKET_PORT: void 0, + FAST_REFRESH: !0, + }.REACT_APP_SC_ATTR || + { + NODE_ENV: "production", + PUBLIC_URL: ".", + WDS_SOCKET_HOST: void 0, + WDS_SOCKET_PATH: void 0, + WDS_SOCKET_PORT: void 0, + FAST_REFRESH: !0, + }.SC_ATTR)) || + "data-styled", + Is = "undefined" != typeof window && "HTMLElement" in window, + ks = Boolean( + "boolean" == typeof SC_DISABLE_SPEEDY + ? SC_DISABLE_SPEEDY + : "undefined" != typeof process && + void 0 !== + { + NODE_ENV: "production", + PUBLIC_URL: ".", + WDS_SOCKET_HOST: void 0, + WDS_SOCKET_PATH: void 0, + WDS_SOCKET_PORT: void 0, + FAST_REFRESH: !0, + } && + (void 0 !== + { + NODE_ENV: "production", + PUBLIC_URL: ".", + WDS_SOCKET_HOST: void 0, + WDS_SOCKET_PATH: void 0, + WDS_SOCKET_PORT: void 0, + FAST_REFRESH: !0, + }.REACT_APP_SC_DISABLE_SPEEDY && + "" !== + { + NODE_ENV: "production", + PUBLIC_URL: ".", + WDS_SOCKET_HOST: void 0, + WDS_SOCKET_PATH: void 0, + WDS_SOCKET_PORT: void 0, + FAST_REFRESH: !0, + }.REACT_APP_SC_DISABLE_SPEEDY + ? "false" !== + { + NODE_ENV: "production", + PUBLIC_URL: ".", + WDS_SOCKET_HOST: void 0, + WDS_SOCKET_PATH: void 0, + WDS_SOCKET_PORT: void 0, + FAST_REFRESH: !0, + }.REACT_APP_SC_DISABLE_SPEEDY && + { + NODE_ENV: "production", + PUBLIC_URL: ".", + WDS_SOCKET_HOST: void 0, + WDS_SOCKET_PATH: void 0, + WDS_SOCKET_PORT: void 0, + FAST_REFRESH: !0, + }.REACT_APP_SC_DISABLE_SPEEDY + : void 0 !== + { + NODE_ENV: "production", + PUBLIC_URL: ".", + WDS_SOCKET_HOST: void 0, + WDS_SOCKET_PATH: void 0, + WDS_SOCKET_PORT: void 0, + FAST_REFRESH: !0, + }.SC_DISABLE_SPEEDY && + "" !== + { + NODE_ENV: "production", + PUBLIC_URL: ".", + WDS_SOCKET_HOST: void 0, + WDS_SOCKET_PATH: void 0, + WDS_SOCKET_PORT: void 0, + FAST_REFRESH: !0, + }.SC_DISABLE_SPEEDY && + "false" !== + { + NODE_ENV: "production", + PUBLIC_URL: ".", + WDS_SOCKET_HOST: void 0, + WDS_SOCKET_PATH: void 0, + WDS_SOCKET_PORT: void 0, + FAST_REFRESH: !0, + }.SC_DISABLE_SPEEDY && + { + NODE_ENV: "production", + PUBLIC_URL: ".", + WDS_SOCKET_HOST: void 0, + WDS_SOCKET_PATH: void 0, + WDS_SOCKET_PORT: void 0, + FAST_REFRESH: !0, + }.SC_DISABLE_SPEEDY) + ); + function Rs(e) { + for ( + var t = arguments.length, n = new Array(t > 1 ? t - 1 : 0), r = 1; + r < t; + r++ + ) + n[r - 1] = arguments[r]; + throw new Error( + "An error occurred. See https://git.io/JUIaE#" + + e + + " for more information." + + (n.length > 0 ? " Args: " + n.join(", ") : "") + ); + } + var Bs = (function () { + function e(e) { + (this.groupSizes = new Uint32Array(512)), + (this.length = 512), + (this.tag = e); + } + var t = e.prototype; + return ( + (t.indexOfGroup = function (e) { + for (var t = 0, n = 0; n < e; n++) t += this.groupSizes[n]; + return t; + }), + (t.insertRules = function (e, t) { + if (e >= this.groupSizes.length) { + for (var n = this.groupSizes, r = n.length, i = r; e >= i; ) + (i <<= 1) < 0 && Rs(16, "" + e); + (this.groupSizes = new Uint32Array(i)), + this.groupSizes.set(n), + (this.length = i); + for (var a = r; a < i; a++) this.groupSizes[a] = 0; + } + for ( + var o = this.indexOfGroup(e + 1), s = 0, l = t.length; + s < l; + s++ + ) + this.tag.insertRule(o, t[s]) && (this.groupSizes[e]++, o++); + }), + (t.clearGroup = function (e) { + if (e < this.length) { + var t = this.groupSizes[e], + n = this.indexOfGroup(e), + r = n + t; + this.groupSizes[e] = 0; + for (var i = n; i < r; i++) this.tag.deleteRule(n); + } + }), + (t.getGroup = function (e) { + var t = ""; + if (e >= this.length || 0 === this.groupSizes[e]) return t; + for ( + var n = this.groupSizes[e], + r = this.indexOfGroup(e), + i = r + n, + a = r; + a < i; + a++ + ) + t += this.tag.getRule(a) + "/*!sc*/\n"; + return t; + }), + e + ); + })(), + Ps = new Map(), + Ls = new Map(), + Ds = 1, + Us = function (e) { + if (Ps.has(e)) return Ps.get(e); + for (; Ls.has(Ds); ) Ds++; + var t = Ds++; + return Ps.set(e, t), Ls.set(t, e), t; + }, + Fs = function (e) { + return Ls.get(e); + }, + Os = function (e, t) { + t >= Ds && (Ds = t + 1), Ps.set(e, t), Ls.set(t, e); + }, + Ns = "style[" + Ms + '][data-styled-version="5.3.11"]', + Gs = new RegExp( + "^" + Ms + '\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)' + ), + Zs = function (e, t, n) { + for (var r, i = n.split(","), a = 0, o = i.length; a < o; a++) + (r = i[a]) && e.registerName(t, r); + }, + zs = function (e, t) { + for ( + var n = (t.textContent || "").split("/*!sc*/\n"), + r = [], + i = 0, + a = n.length; + i < a; + i++ + ) { + var o = n[i].trim(); + if (o) { + var s = o.match(Gs); + if (s) { + var l = 0 | parseInt(s[1], 10), + u = s[2]; + 0 !== l && + (Os(u, l), Zs(e, u, s[3]), e.getTag().insertRules(l, r)), + (r.length = 0); + } else r.push(o); + } + } + }, + Qs = function () { + return n.nc; + }, + Hs = function (e) { + var t = document.head, + n = e || t, + r = document.createElement("style"), + i = (function (e) { + for (var t = e.childNodes, n = t.length; n >= 0; n--) { + var r = t[n]; + if (r && 1 === r.nodeType && r.hasAttribute(Ms)) return r; + } + })(n), + a = void 0 !== i ? i.nextSibling : null; + r.setAttribute(Ms, "active"), + r.setAttribute("data-styled-version", "5.3.11"); + var o = Qs(); + return o && r.setAttribute("nonce", o), n.insertBefore(r, a), r; + }, + Vs = (function () { + function e(e) { + var t = (this.element = Hs(e)); + t.appendChild(document.createTextNode("")), + (this.sheet = (function (e) { + if (e.sheet) return e.sheet; + for ( + var t = document.styleSheets, n = 0, r = t.length; + n < r; + n++ + ) { + var i = t[n]; + if (i.ownerNode === e) return i; + } + Rs(17); + })(t)), + (this.length = 0); + } + var t = e.prototype; + return ( + (t.insertRule = function (e, t) { + try { + return this.sheet.insertRule(t, e), this.length++, !0; + } catch (e) { + return !1; + } + }), + (t.deleteRule = function (e) { + this.sheet.deleteRule(e), this.length--; + }), + (t.getRule = function (e) { + var t = this.sheet.cssRules[e]; + return void 0 !== t && "string" == typeof t.cssText + ? t.cssText + : ""; + }), + e + ); + })(), + js = (function () { + function e(e) { + var t = (this.element = Hs(e)); + (this.nodes = t.childNodes), (this.length = 0); + } + var t = e.prototype; + return ( + (t.insertRule = function (e, t) { + if (e <= this.length && e >= 0) { + var n = document.createTextNode(t), + r = this.nodes[e]; + return this.element.insertBefore(n, r || null), this.length++, !0; + } + return !1; + }), + (t.deleteRule = function (e) { + this.element.removeChild(this.nodes[e]), this.length--; + }), + (t.getRule = function (e) { + return e < this.length ? this.nodes[e].textContent : ""; + }), + e + ); + })(), + Ws = (function () { + function e(e) { + (this.rules = []), (this.length = 0); + } + var t = e.prototype; + return ( + (t.insertRule = function (e, t) { + return ( + e <= this.length && + (this.rules.splice(e, 0, t), this.length++, !0) + ); + }), + (t.deleteRule = function (e) { + this.rules.splice(e, 1), this.length--; + }), + (t.getRule = function (e) { + return e < this.length ? this.rules[e] : ""; + }), + e + ); + })(), + Xs = Is, + Ys = { isServer: !Is, useCSSOMInjection: !ks }, + qs = (function () { + function e(e, t, n) { + void 0 === e && (e = _s), + void 0 === t && (t = {}), + (this.options = bs({}, Ys, {}, e)), + (this.gs = t), + (this.names = new Map(n)), + (this.server = !!e.isServer), + !this.server && + Is && + Xs && + ((Xs = !1), + (function (e) { + for ( + var t = document.querySelectorAll(Ns), n = 0, r = t.length; + n < r; + n++ + ) { + var i = t[n]; + i && + "active" !== i.getAttribute(Ms) && + (zs(e, i), i.parentNode && i.parentNode.removeChild(i)); + } + })(this)); + } + e.registerId = function (e) { + return Us(e); + }; + var t = e.prototype; + return ( + (t.reconstructWithOptions = function (t, n) { + return ( + void 0 === n && (n = !0), + new e( + bs({}, this.options, {}, t), + this.gs, + (n && this.names) || void 0 + ) + ); + }), + (t.allocateGSInstance = function (e) { + return (this.gs[e] = (this.gs[e] || 0) + 1); + }), + (t.getTag = function () { + return ( + this.tag || + (this.tag = + ((n = (t = this.options).isServer), + (r = t.useCSSOMInjection), + (i = t.target), + (e = n ? new Ws(i) : r ? new Vs(i) : new js(i)), + new Bs(e))) + ); + var e, t, n, r, i; + }), + (t.hasNameForId = function (e, t) { + return this.names.has(e) && this.names.get(e).has(t); + }), + (t.registerName = function (e, t) { + if ((Us(e), this.names.has(e))) this.names.get(e).add(t); + else { + var n = new Set(); + n.add(t), this.names.set(e, n); + } + }), + (t.insertRules = function (e, t, n) { + this.registerName(e, t), this.getTag().insertRules(Us(e), n); + }), + (t.clearNames = function (e) { + this.names.has(e) && this.names.get(e).clear(); + }), + (t.clearRules = function (e) { + this.getTag().clearGroup(Us(e)), this.clearNames(e); + }), + (t.clearTag = function () { + this.tag = void 0; + }), + (t.toString = function () { + return (function (e) { + for ( + var t = e.getTag(), n = t.length, r = "", i = 0; + i < n; + i++ + ) { + var a = Fs(i); + if (void 0 !== a) { + var o = e.names.get(a), + s = t.getGroup(i); + if (o && s && o.size) { + var l = Ms + ".g" + i + '[id="' + a + '"]', + u = ""; + void 0 !== o && + o.forEach(function (e) { + e.length > 0 && (u += e + ","); + }), + (r += "" + s + l + '{content:"' + u + '"}/*!sc*/\n'); + } + } + } + return r; + })(this); + }), + e + ); + })(), + Js = /(a)(d)/gi, + Ks = function (e) { + return String.fromCharCode(e + (e > 25 ? 39 : 97)); + }; + function $s(e) { + var t, + n = ""; + for (t = Math.abs(e); t > 52; t = (t / 52) | 0) n = Ks(t % 52) + n; + return (Ks(t % 52) + n).replace(Js, "$1-$2"); + } + var el = function (e, t) { + for (var n = t.length; n; ) e = (33 * e) ^ t.charCodeAt(--n); + return e; + }, + tl = function (e) { + return el(5381, e); + }; + function nl(e) { + for (var t = 0; t < e.length; t += 1) { + var n = e[t]; + if (Cs(n) && !Ts(n)) return !1; + } + return !0; + } + var rl = tl("5.3.11"), + il = (function () { + function e(e, t, n) { + (this.rules = e), + (this.staticRulesId = ""), + (this.isStatic = (void 0 === n || n.isStatic) && nl(e)), + (this.componentId = t), + (this.baseHash = el(rl, t)), + (this.baseStyle = n), + qs.registerId(t); + } + return ( + (e.prototype.generateAndInjectStyles = function (e, t, n) { + var r = this.componentId, + i = []; + if ( + (this.baseStyle && + i.push(this.baseStyle.generateAndInjectStyles(e, t, n)), + this.isStatic && !n.hash) + ) + if (this.staticRulesId && t.hasNameForId(r, this.staticRulesId)) + i.push(this.staticRulesId); + else { + var a = Sl(this.rules, e, t, n).join(""), + o = $s(el(this.baseHash, a) >>> 0); + if (!t.hasNameForId(r, o)) { + var s = n(a, "." + o, void 0, r); + t.insertRules(r, o, s); + } + i.push(o), (this.staticRulesId = o); + } + else { + for ( + var l = this.rules.length, + u = el(this.baseHash, n.hash), + c = "", + f = 0; + f < l; + f++ + ) { + var d = this.rules[f]; + if ("string" == typeof d) c += d; + else if (d) { + var h = Sl(d, e, t, n), + p = Array.isArray(h) ? h.join("") : h; + (u = el(u, p + f)), (c += p); + } + } + if (c) { + var v = $s(u >>> 0); + if (!t.hasNameForId(r, v)) { + var m = n(c, "." + v, void 0, r); + t.insertRules(r, v, m); + } + i.push(v); + } + } + return i.join(" "); + }), + e + ); + })(), + al = /^\s*\/\/.*$/gm, + ol = [":", "[", ".", "#"]; + function sl(e) { + var t, + n, + r, + i, + a = void 0 === e ? _s : e, + o = a.options, + s = void 0 === o ? _s : o, + l = a.plugins, + u = void 0 === l ? Es : l, + c = new gs(s), + f = [], + d = (function (e) { + function t(t) { + if (t) + try { + e(t + "}"); + } catch (e) {} + } + return function (n, r, i, a, o, s, l, u, c, f) { + switch (n) { + case 1: + if (0 === c && 64 === r.charCodeAt(0)) return e(r + ";"), ""; + break; + case 2: + if (0 === u) return r + "/*|*/"; + break; + case 3: + switch (u) { + case 102: + case 112: + return e(i[0] + r), ""; + default: + return r + (0 === f ? "/*|*/" : ""); + } + case -2: + r.split("/*|*/}").forEach(t); + } + }; + })(function (e) { + f.push(e); + }), + h = function (e, r, a) { + return (0 === r && -1 !== ol.indexOf(a[n.length])) || a.match(i) + ? e + : "." + t; + }; + function p(e, a, o, s) { + void 0 === s && (s = "&"); + var l = e.replace(al, ""), + u = a && o ? o + " " + a + " { " + l + " }" : l; + return ( + (t = s), + (n = a), + (r = new RegExp("\\" + n + "\\b", "g")), + (i = new RegExp("(\\" + n + "\\b){2,}")), + c(o || !a ? "" : a, u) + ); + } + return ( + c.use( + [].concat(u, [ + function (e, t, i) { + 2 === e && + i.length && + i[0].lastIndexOf(n) > 0 && + (i[0] = i[0].replace(r, h)); + }, + d, + function (e) { + if (-2 === e) { + var t = f; + return (f = []), t; + } + }, + ]) + ), + (p.hash = u.length + ? u + .reduce(function (e, t) { + return t.name || Rs(15), el(e, t.name); + }, 5381) + .toString() + : ""), + p + ); + } + var ll = e.createContext(), + ul = (ll.Consumer, e.createContext()), + cl = (ul.Consumer, new qs()), + fl = sl(); + function dl() { + return (0, e.useContext)(ll) || cl; + } + function hl() { + return (0, e.useContext)(ul) || fl; + } + function pl(t) { + var n = (0, e.useState)(t.stylisPlugins), + r = n[0], + i = n[1], + a = dl(), + o = (0, e.useMemo)( + function () { + var e = a; + return ( + t.sheet + ? (e = t.sheet) + : t.target && + (e = e.reconstructWithOptions({ target: t.target }, !1)), + t.disableCSSOMInjection && + (e = e.reconstructWithOptions({ useCSSOMInjection: !1 })), + e + ); + }, + [t.disableCSSOMInjection, t.sheet, t.target] + ), + s = (0, e.useMemo)( + function () { + return sl({ + options: { prefix: !t.disableVendorPrefixes }, + plugins: r, + }); + }, + [t.disableVendorPrefixes, r] + ); + return ( + (0, e.useEffect)( + function () { + ms()(r, t.stylisPlugins) || i(t.stylisPlugins); + }, + [t.stylisPlugins] + ), + e.createElement( + ll.Provider, + { value: o }, + e.createElement(ul.Provider, { value: s }, t.children) + ) + ); + } + var vl = (function () { + function e(e, t) { + var n = this; + (this.inject = function (e, t) { + void 0 === t && (t = fl); + var r = n.name + t.hash; + e.hasNameForId(n.id, r) || + e.insertRules(n.id, r, t(n.rules, r, "@keyframes")); + }), + (this.toString = function () { + return Rs(12, String(n.name)); + }), + (this.name = e), + (this.id = "sc-keyframes-" + e), + (this.rules = t); + } + return ( + (e.prototype.getName = function (e) { + return void 0 === e && (e = fl), this.name + e.hash; + }), + e + ); + })(), + ml = /([A-Z])/, + gl = /([A-Z])/g, + Al = /^ms-/, + yl = function (e) { + return "-" + e.toLowerCase(); + }; + function bl(e) { + return ml.test(e) ? e.replace(gl, yl).replace(Al, "-ms-") : e; + } + var xl = function (e) { + return null == e || !1 === e || "" === e; + }; + function Sl(e, t, n, r) { + if (Array.isArray(e)) { + for (var i, a = [], o = 0, s = e.length; o < s; o += 1) + "" !== (i = Sl(e[o], t, n, r)) && + (Array.isArray(i) ? a.push.apply(a, i) : a.push(i)); + return a; + } + return xl(e) + ? "" + : Ts(e) + ? "." + e.styledComponentId + : Cs(e) + ? "function" != typeof (l = e) || + (l.prototype && l.prototype.isReactComponent) || + !t + ? e + : Sl(e(t), t, n, r) + : e instanceof vl + ? n + ? (e.inject(n, r), e.getName(r)) + : e + : Ss(e) + ? (function e(t, n) { + var r, + i, + a = []; + for (var o in t) + t.hasOwnProperty(o) && + !xl(t[o]) && + ((Array.isArray(t[o]) && t[o].isCss) || Cs(t[o]) + ? a.push(bl(o) + ":", t[o], ";") + : Ss(t[o]) + ? a.push.apply(a, e(t[o], o)) + : a.push( + bl(o) + + ": " + + ((r = o), + (null == (i = t[o]) || "boolean" == typeof i || "" === i + ? "" + : "number" != typeof i || + 0 === i || + r in As || + r.startsWith("--") + ? String(i).trim() + : i + "px") + ";") + )); + return n ? [n + " {"].concat(a, ["}"]) : a; + })(e) + : e.toString(); + var l; + } + var El = function (e) { + return Array.isArray(e) && (e.isCss = !0), e; + }; + function _l(e) { + for ( + var t = arguments.length, n = new Array(t > 1 ? t - 1 : 0), r = 1; + r < t; + r++ + ) + n[r - 1] = arguments[r]; + return Cs(e) || Ss(e) + ? El(Sl(xs(Es, [e].concat(n)))) + : 0 === n.length && 1 === e.length && "string" == typeof e[0] + ? e + : El(Sl(xs(e, n))); + } + new Set(); + var Cl = function (e, t, n) { + return ( + void 0 === n && (n = _s), + (e.theme !== n.theme && e.theme) || t || n.theme + ); + }, + wl = /[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g, + Tl = /(^-|-$)/g; + function Ml(e) { + return e.replace(wl, "-").replace(Tl, ""); + } + var Il = function (e) { + return $s(tl(e) >>> 0); + }; + function kl(e) { + return "string" == typeof e && !0; + } + var Rl = function (e) { + return ( + "function" == typeof e || + ("object" == typeof e && null !== e && !Array.isArray(e)) + ); + }, + Bl = function (e) { + return "__proto__" !== e && "constructor" !== e && "prototype" !== e; + }; + function Pl(e, t, n) { + var r = e[n]; + Rl(t) && Rl(r) ? Ll(r, t) : (e[n] = t); + } + function Ll(e) { + for ( + var t = arguments.length, n = new Array(t > 1 ? t - 1 : 0), r = 1; + r < t; + r++ + ) + n[r - 1] = arguments[r]; + for (var i = 0, a = n; i < a.length; i++) { + var o = a[i]; + if (Rl(o)) for (var s in o) Bl(s) && Pl(e, o[s], s); + } + return e; + } + var Dl = e.createContext(); + Dl.Consumer; + var Ul = {}; + function Fl(t, n, r) { + var i = Ts(t), + a = !kl(t), + o = n.attrs, + s = void 0 === o ? Es : o, + l = n.componentId, + u = + void 0 === l + ? (function (e, t) { + var n = "string" != typeof e ? "sc" : Ml(e); + Ul[n] = (Ul[n] || 0) + 1; + var r = n + "-" + Il("5.3.11" + n + Ul[n]); + return t ? t + "-" + r : r; + })(n.displayName, n.parentComponentId) + : l, + c = n.displayName, + f = + void 0 === c + ? (function (e) { + return kl(e) ? "styled." + e : "Styled(" + ws(e) + ")"; + })(t) + : c, + d = + n.displayName && n.componentId + ? Ml(n.displayName) + "-" + n.componentId + : n.componentId || u, + h = + i && t.attrs ? Array.prototype.concat(t.attrs, s).filter(Boolean) : s, + p = n.shouldForwardProp; + i && + t.shouldForwardProp && + (p = n.shouldForwardProp + ? function (e, r, i) { + return ( + t.shouldForwardProp(e, r, i) && n.shouldForwardProp(e, r, i) + ); + } + : t.shouldForwardProp); + var v, + m = new il(r, d, i ? t.componentStyle : void 0), + g = m.isStatic && 0 === s.length, + A = function (t, n) { + return (function (t, n, r, i) { + var a = t.attrs, + o = t.componentStyle, + s = t.defaultProps, + l = t.foldedComponentIds, + u = t.shouldForwardProp, + c = t.styledComponentId, + f = t.target, + d = (function (e, t, n) { + void 0 === e && (e = _s); + var r = bs({}, t, { theme: e }), + i = {}; + return ( + n.forEach(function (e) { + var t, + n, + a, + o = e; + for (t in (Cs(o) && (o = o(r)), o)) + r[t] = i[t] = + "className" === t + ? ((n = i[t]), + (a = o[t]), + n && a ? n + " " + a : n || a) + : o[t]; + }), + [r, i] + ); + })(Cl(n, (0, e.useContext)(Dl), s) || _s, n, a), + h = d[0], + p = d[1], + v = (function (e, t, n, r) { + var i = dl(), + a = hl(); + return t + ? e.generateAndInjectStyles(_s, i, a) + : e.generateAndInjectStyles(n, i, a); + })(o, i, h), + m = r, + g = p.$as || n.$as || p.as || n.as || f, + A = kl(g), + y = p !== n ? bs({}, n, {}, p) : n, + b = {}; + for (var x in y) + "$" !== x[0] && + "as" !== x && + ("forwardedAs" === x + ? (b.as = y[x]) + : (u ? u(x, ys.Z, g) : !A || (0, ys.Z)(x)) && (b[x] = y[x])); + return ( + n.style && + p.style !== n.style && + (b.style = bs({}, n.style, {}, p.style)), + (b.className = Array.prototype + .concat(l, c, v !== c ? v : null, n.className, p.className) + .filter(Boolean) + .join(" ")), + (b.ref = m), + (0, e.createElement)(g, b) + ); + })(v, t, n, g); + }; + return ( + (A.displayName = f), + ((v = e.forwardRef(A)).attrs = h), + (v.componentStyle = m), + (v.displayName = f), + (v.shouldForwardProp = p), + (v.foldedComponentIds = i + ? Array.prototype.concat(t.foldedComponentIds, t.styledComponentId) + : Es), + (v.styledComponentId = d), + (v.target = i ? t.target : t), + (v.withComponent = function (e) { + var t = n.componentId, + i = (function (e, t) { + if (null == e) return {}; + var n, + r, + i = {}, + a = Object.keys(e); + for (r = 0; r < a.length; r++) + (n = a[r]), t.indexOf(n) >= 0 || (i[n] = e[n]); + return i; + })(n, ["componentId"]), + a = t && t + "-" + (kl(e) ? e : Ml(ws(e))); + return Fl(e, bs({}, i, { attrs: h, componentId: a }), r); + }), + Object.defineProperty(v, "defaultProps", { + get: function () { + return this._foldedDefaultProps; + }, + set: function (e) { + this._foldedDefaultProps = i ? Ll({}, t.defaultProps, e) : e; + }, + }), + Object.defineProperty(v, "toString", { + value: function () { + return "." + v.styledComponentId; + }, + }), + a && + b()(v, t, { + attrs: !0, + componentStyle: !0, + displayName: !0, + foldedComponentIds: !0, + shouldForwardProp: !0, + styledComponentId: !0, + target: !0, + withComponent: !0, + }), + v + ); + } + var Ol = function (e) { + return (function e(t, n, r) { + if ((void 0 === r && (r = _s), !(0, x.isValidElementType)(n))) + return Rs(1, String(n)); + var i = function () { + return t(n, r, _l.apply(void 0, arguments)); + }; + return ( + (i.withConfig = function (i) { + return e(t, n, bs({}, r, {}, i)); + }), + (i.attrs = function (i) { + return e( + t, + n, + bs({}, r, { + attrs: Array.prototype.concat(r.attrs, i).filter(Boolean), + }) + ); + }), + i + ); + })(Fl, e); + }; + [ + "a", + "abbr", + "address", + "area", + "article", + "aside", + "audio", + "b", + "base", + "bdi", + "bdo", + "big", + "blockquote", + "body", + "br", + "button", + "canvas", + "caption", + "cite", + "code", + "col", + "colgroup", + "data", + "datalist", + "dd", + "del", + "details", + "dfn", + "dialog", + "div", + "dl", + "dt", + "em", + "embed", + "fieldset", + "figcaption", + "figure", + "footer", + "form", + "h1", + "h2", + "h3", + "h4", + "h5", + "h6", + "head", + "header", + "hgroup", + "hr", + "html", + "i", + "iframe", + "img", + "input", + "ins", + "kbd", + "keygen", + "label", + "legend", + "li", + "link", + "main", + "map", + "mark", + "marquee", + "menu", + "menuitem", + "meta", + "meter", + "nav", + "noscript", + "object", + "ol", + "optgroup", + "option", + "output", + "p", + "param", + "picture", + "pre", + "progress", + "q", + "rp", + "rt", + "ruby", + "s", + "samp", + "script", + "section", + "select", + "small", + "source", + "span", + "strong", + "style", + "sub", + "summary", + "sup", + "table", + "tbody", + "td", + "textarea", + "tfoot", + "th", + "thead", + "time", + "title", + "tr", + "track", + "u", + "ul", + "var", + "video", + "wbr", + "circle", + "clipPath", + "defs", + "ellipse", + "foreignObject", + "g", + "image", + "line", + "linearGradient", + "marker", + "mask", + "path", + "pattern", + "polygon", + "polyline", + "radialGradient", + "rect", + "stop", + "svg", + "text", + "textPath", + "tspan", + ].forEach(function (e) { + Ol[e] = Ol(e); + }); + !(function () { + function e(e, t) { + (this.rules = e), + (this.componentId = t), + (this.isStatic = nl(e)), + qs.registerId(this.componentId + 1); + } + var t = e.prototype; + (t.createStyles = function (e, t, n, r) { + var i = r(Sl(this.rules, t, n, r).join(""), ""), + a = this.componentId + e; + n.insertRules(a, a, i); + }), + (t.removeStyles = function (e, t) { + t.clearRules(this.componentId + e); + }), + (t.renderStyles = function (e, t, n, r) { + e > 2 && qs.registerId(this.componentId + e), + this.removeStyles(e, n), + this.createStyles(e, t, n, r); + }); + })(); + !(function () { + function t() { + var t = this; + (this._emitSheetCSS = function () { + var e = t.instance.toString(); + if (!e) return ""; + var n = Qs(); + return ( + "" + ); + }), + (this.getStyleTags = function () { + return t.sealed ? Rs(2) : t._emitSheetCSS(); + }), + (this.getStyleElement = function () { + var n; + if (t.sealed) return Rs(2); + var r = + (((n = {})[Ms] = ""), + (n["data-styled-version"] = "5.3.11"), + (n.dangerouslySetInnerHTML = { __html: t.instance.toString() }), + n), + i = Qs(); + return ( + i && (r.nonce = i), + [e.createElement("style", bs({}, r, { key: "sc-0-0" }))] + ); + }), + (this.seal = function () { + t.sealed = !0; + }), + (this.instance = new qs({ isServer: !0 })), + (this.sealed = !1); + } + var n = t.prototype; + (n.collectStyles = function (t) { + return this.sealed + ? Rs(2) + : e.createElement(pl, { sheet: this.instance }, t); + }), + (n.interleaveWithNodeStream = function (e) { + return Rs(3); + }); + })(); + var Nl = Ol.button.withConfig({ + displayName: "StyledButton__Button", + componentId: "sc-1ulikra-0", + })( + [ + "background:", + ";border-radius:10px;color:#bf4f74;margin:0 1em;padding:1em 1em;transition:all 0.3s ease 0s;box-shadow:", + ";width:", + ';fontsize:10px;border:null;&:hover{transform:translateY(8px);box-shadow:0 3px 5px 2px #ecf3ab;}button.btn{backgroundcolor:"white";}', + ], + function (e) { + return e["data-active"] ? "grey" : "transparent"; + }, + function (e) { + return e["data-active"] ? "none" : "0 3px 10px 2px #22eff1"; + }, + function (e) { + return e["data-small"] ? "50px" : "150px "; + } + ), + Gl = function (e) { + var t = e.onClick, + n = e.children, + r = e.disabled, + i = e.small, + a = void 0 !== i && i; + return ( + console.log("hello", r), + (0, Ut.jsx)(Nl, { + "data-active": r, + "data-small": a, + style: { fontSize: 12, color: "white" }, + onClick: t, + children: n, + }) + ); + }, + Zl = n(3950), + zl = function () { + var t = e.useState({ + openAddModal: !1, + productName: "", + price: "", + errors: { + productError: "", + quantityError: "", + isQuantityError: !1, + isProductError: !1, + }, + }), + n = (0, Ot.Z)(t, 2), + r = n[0], + i = n[1], + a = r.price, + o = r.productName, + s = r.errors, + u = s.productError, + c = s.quantityError, + f = s.isProductError, + d = s.isQuantityError, + h = A(function (e) { + return e.products; + }), + p = h.showAddProducts, + v = k(), + m = 4, + g = function (e) { + var t = e.target, + n = t.name, + r = t.value; + i(function (e) { + var t; + return (0, + Be.Z)((0, Be.Z)({}, e), {}, ((t = {}), (0, l.Z)(t, n, r), (0, l.Z)(t, "errors", { productError: "", isError: !1 }), t)); + }); + }; + return (0, Ut.jsxs)(Ut.Fragment, { + children: [ + (0, Ut.jsxs)("div", { + style: { display: "flex" }, + children: [ + (0, Ut.jsx)(Gl, { + small: !0, + children: (0, Ut.jsx)(Zl.Z, {}), + onClick: function () { + v(Pt()); + }, + }), + (0, Ut.jsx)(Gl, { + children: "Add Products", + onClick: function () { + v(Bt()); + }, + }), + ], + }), + p && + (0, Ut.jsx)(ps, { + Children: (0, Ut.jsx)("div", { + style: { + height: "100%", + display: "flex", + flexDirection: "column", + alignItems: "center", + justifyContent: "flex-start", + }, + children: (0, Ut.jsxs)("div", { + style: { paddingTop: 20 }, + children: [ + (0, Ut.jsx)(vo, { + sx: { + color: "white", + width: 180, + paddingTop: 1, + fieldset: { + borderColor: "#89c0ee", + borderWidth: 0.1, + }, + input: { color: "white" }, + }, + placeholder: "Product Name", + type: "text", + value: o, + onChange: g, + name: "productName", + helperText: u, + error: f, + }), + (0, Ut.jsx)(vo, { + sx: { + color: "white", + width: 180, + paddingTop: 1, + fieldset: { borderColor: "#89c0ee" }, + input: { color: "white" }, + }, + placeholder: "Price", + type: "number", + name: "price", + value: a, + onChange: g, + helperText: c, + error: d, + }), + (0, Ut.jsx)(ls, { + style: { + color: "black", + width: 150, + backgroundColor: "aqua", + marginTop: 15, + fontWeight: "500", + }, + onClick: function () { + if ("" === o.trim() || "" === a.trim()) + "" === o.trim() + ? (console.log("hello"), + i(function (e) { + return (0, + Be.Z)((0, Be.Z)({}, e), {}, { errors: { productError: "Please enter Product Name.", isProductError: !0 } }); + })) + : "" === a.trim() && + i(function (e) { + return (0, + Be.Z)((0, Be.Z)({}, e), {}, { errors: { quantityError: "Please enter the quantity.", isQuantityError: !0 } }); + }); + else { + var e = { + id: (function () { + var e = m; + return (m += 1), e; + })(), + name: o, + price: parseFloat(a), + totalPrice: parseFloat(a), + quantity: 1, + }; + console.log(e), + v(Ct(e)), + i(function (e) { + return (0, + Be.Z)((0, Be.Z)({}, e), {}, { price: "", productName: "" }); + }); + } + }, + children: "Add Items", + }), + ], + }), + }), + }), + ], + }); + }; + function Ql(e) { + return (0, Tn.Z)("MuiIconButton", e); + } + var Hl = (0, wn.Z)("MuiIconButton", [ + "root", + "disabled", + "colorInherit", + "colorPrimary", + "colorSecondary", + "colorError", + "colorInfo", + "colorSuccess", + "colorWarning", + "edgeStart", + "edgeEnd", + "sizeSmall", + "sizeMedium", + "sizeLarge", + ]), + Vl = [ + "edge", + "children", + "className", + "color", + "disabled", + "disableFocusRipple", + "size", + ], + jl = (0, Ht.ZP)(Jo, { + name: "MuiIconButton", + slot: "Root", + overridesResolver: function (e, t) { + var n = e.ownerState; + return [ + t.root, + "default" !== n.color && t["color".concat((0, ln.Z)(n.color))], + n.edge && t["edge".concat((0, ln.Z)(n.edge))], + t["size".concat((0, ln.Z)(n.size))], + ]; + }, + })( + function (e) { + var t = e.theme, + n = e.ownerState; + return (0, Nt.Z)( + { + textAlign: "center", + flex: "0 0 auto", + fontSize: t.typography.pxToRem(24), + padding: 8, + borderRadius: "50%", + overflow: "visible", + color: (t.vars || t).palette.action.active, + transition: t.transitions.create("background-color", { + duration: t.transitions.duration.shortest, + }), + }, + !n.disableRipple && { + "&:hover": { + backgroundColor: t.vars + ? "rgba(" + .concat(t.vars.palette.action.activeChannel, " / ") + .concat(t.vars.palette.action.hoverOpacity, ")") + : (0, ia.Fq)( + t.palette.action.active, + t.palette.action.hoverOpacity + ), + "@media (hover: none)": { backgroundColor: "transparent" }, + }, + }, + "start" === n.edge && { marginLeft: "small" === n.size ? -3 : -12 }, + "end" === n.edge && { marginRight: "small" === n.size ? -3 : -12 } + ); + }, + function (e) { + var t, + n = e.theme, + r = e.ownerState, + i = null == (t = (n.vars || n).palette) ? void 0 : t[r.color]; + return (0, Nt.Z)( + {}, + "inherit" === r.color && { color: "inherit" }, + "inherit" !== r.color && + "default" !== r.color && + (0, Nt.Z)( + { color: null == i ? void 0 : i.main }, + !r.disableRipple && { + "&:hover": (0, Nt.Z)( + {}, + i && { + backgroundColor: n.vars + ? "rgba(" + .concat(i.mainChannel, " / ") + .concat(n.vars.palette.action.hoverOpacity, ")") + : (0, ia.Fq)(i.main, n.palette.action.hoverOpacity), + }, + { + "@media (hover: none)": { + backgroundColor: "transparent", + }, + } + ), + } + ), + "small" === r.size && { + padding: 5, + fontSize: n.typography.pxToRem(18), + }, + "large" === r.size && { + padding: 12, + fontSize: n.typography.pxToRem(28), + }, + (0, l.Z)({}, "&.".concat(Hl.disabled), { + backgroundColor: "transparent", + color: (n.vars || n).palette.action.disabled, + }) + ); + } + ), + Wl = e.forwardRef(function (e, t) { + var n = (0, Vt.Z)({ props: e, name: "MuiIconButton" }), + r = n.edge, + i = void 0 !== r && r, + a = n.children, + o = n.className, + s = n.color, + l = void 0 === s ? "default" : s, + u = n.disabled, + c = void 0 !== u && u, + f = n.disableFocusRipple, + d = void 0 !== f && f, + h = n.size, + p = void 0 === h ? "medium" : h, + v = (0, Gt.Z)(n, Vl), + m = (0, Nt.Z)({}, n, { + edge: i, + color: l, + disabled: c, + disableFocusRipple: d, + size: p, + }), + g = (function (e) { + var t = e.classes, + n = e.disabled, + r = e.color, + i = e.edge, + a = e.size, + o = { + root: [ + "root", + n && "disabled", + "default" !== r && "color".concat((0, ln.Z)(r)), + i && "edge".concat((0, ln.Z)(i)), + "size".concat((0, ln.Z)(a)), + ], + }; + return (0, zt.Z)(o, Ql, t); + })(m); + return (0, + Ut.jsx)(jl, (0, Nt.Z)({ className: (0, Zt.Z)(g.root, o), centerRipple: !0, focusRipple: !d, disabled: c, ref: t, ownerState: m }, v, { children: a })); + }), + Xl = Wl; + function Yl(e) { + if (null == e) return window; + if ("[object Window]" !== e.toString()) { + var t = e.ownerDocument; + return (t && t.defaultView) || window; + } + return e; + } + function ql(e) { + return e instanceof Yl(e).Element || e instanceof Element; + } + function Jl(e) { + return e instanceof Yl(e).HTMLElement || e instanceof HTMLElement; + } + function Kl(e) { + return ( + "undefined" !== typeof ShadowRoot && + (e instanceof Yl(e).ShadowRoot || e instanceof ShadowRoot) + ); + } + var $l = Math.max, + eu = Math.min, + tu = Math.round; + function nu() { + var e = navigator.userAgentData; + return null != e && e.brands && Array.isArray(e.brands) + ? e.brands + .map(function (e) { + return e.brand + "/" + e.version; + }) + .join(" ") + : navigator.userAgent; + } + function ru() { + return !/^((?!chrome|android).)*safari/i.test(nu()); + } + function iu(e, t, n) { + void 0 === t && (t = !1), void 0 === n && (n = !1); + var r = e.getBoundingClientRect(), + i = 1, + a = 1; + t && + Jl(e) && + ((i = (e.offsetWidth > 0 && tu(r.width) / e.offsetWidth) || 1), + (a = (e.offsetHeight > 0 && tu(r.height) / e.offsetHeight) || 1)); + var o = (ql(e) ? Yl(e) : window).visualViewport, + s = !ru() && n, + l = (r.left + (s && o ? o.offsetLeft : 0)) / i, + u = (r.top + (s && o ? o.offsetTop : 0)) / a, + c = r.width / i, + f = r.height / a; + return { + width: c, + height: f, + top: u, + right: l + c, + bottom: u + f, + left: l, + x: l, + y: u, + }; + } + function au(e) { + var t = Yl(e); + return { scrollLeft: t.pageXOffset, scrollTop: t.pageYOffset }; + } + function ou(e) { + return e ? (e.nodeName || "").toLowerCase() : null; + } + function su(e) { + return ((ql(e) ? e.ownerDocument : e.document) || window.document) + .documentElement; + } + function lu(e) { + return iu(su(e)).left + au(e).scrollLeft; + } + function uu(e) { + return Yl(e).getComputedStyle(e); + } + function cu(e) { + var t = uu(e), + n = t.overflow, + r = t.overflowX, + i = t.overflowY; + return /auto|scroll|overlay|hidden/.test(n + i + r); + } + function fu(e, t, n) { + void 0 === n && (n = !1); + var r = Jl(t), + i = + Jl(t) && + (function (e) { + var t = e.getBoundingClientRect(), + n = tu(t.width) / e.offsetWidth || 1, + r = tu(t.height) / e.offsetHeight || 1; + return 1 !== n || 1 !== r; + })(t), + a = su(t), + o = iu(e, i, n), + s = { scrollLeft: 0, scrollTop: 0 }, + l = { x: 0, y: 0 }; + return ( + (r || (!r && !n)) && + (("body" !== ou(t) || cu(a)) && + (s = (function (e) { + return e !== Yl(e) && Jl(e) + ? { scrollLeft: (t = e).scrollLeft, scrollTop: t.scrollTop } + : au(e); + var t; + })(t)), + Jl(t) + ? (((l = iu(t, !0)).x += t.clientLeft), (l.y += t.clientTop)) + : a && (l.x = lu(a))), + { + x: o.left + s.scrollLeft - l.x, + y: o.top + s.scrollTop - l.y, + width: o.width, + height: o.height, + } + ); + } + function du(e) { + var t = iu(e), + n = e.offsetWidth, + r = e.offsetHeight; + return ( + Math.abs(t.width - n) <= 1 && (n = t.width), + Math.abs(t.height - r) <= 1 && (r = t.height), + { x: e.offsetLeft, y: e.offsetTop, width: n, height: r } + ); + } + function hu(e) { + return "html" === ou(e) + ? e + : e.assignedSlot || e.parentNode || (Kl(e) ? e.host : null) || su(e); + } + function pu(e) { + return ["html", "body", "#document"].indexOf(ou(e)) >= 0 + ? e.ownerDocument.body + : Jl(e) && cu(e) + ? e + : pu(hu(e)); + } + function vu(e, t) { + var n; + void 0 === t && (t = []); + var r = pu(e), + i = r === (null == (n = e.ownerDocument) ? void 0 : n.body), + a = Yl(r), + o = i ? [a].concat(a.visualViewport || [], cu(r) ? r : []) : r, + s = t.concat(o); + return i ? s : s.concat(vu(hu(o))); + } + function mu(e) { + return ["table", "td", "th"].indexOf(ou(e)) >= 0; + } + function gu(e) { + return Jl(e) && "fixed" !== uu(e).position ? e.offsetParent : null; + } + function Au(e) { + for ( + var t = Yl(e), n = gu(e); + n && mu(n) && "static" === uu(n).position; + + ) + n = gu(n); + return n && + ("html" === ou(n) || ("body" === ou(n) && "static" === uu(n).position)) + ? t + : n || + (function (e) { + var t = /firefox/i.test(nu()); + if (/Trident/i.test(nu()) && Jl(e) && "fixed" === uu(e).position) + return null; + var n = hu(e); + for ( + Kl(n) && (n = n.host); + Jl(n) && ["html", "body"].indexOf(ou(n)) < 0; + + ) { + var r = uu(n); + if ( + "none" !== r.transform || + "none" !== r.perspective || + "paint" === r.contain || + -1 !== ["transform", "perspective"].indexOf(r.willChange) || + (t && "filter" === r.willChange) || + (t && r.filter && "none" !== r.filter) + ) + return n; + n = n.parentNode; + } + return null; + })(e) || + t; + } + var yu = "top", + bu = "bottom", + xu = "right", + Su = "left", + Eu = "auto", + _u = [yu, bu, xu, Su], + Cu = "start", + wu = "end", + Tu = "clippingParents", + Mu = "viewport", + Iu = "popper", + ku = "reference", + Ru = _u.reduce(function (e, t) { + return e.concat([t + "-" + Cu, t + "-" + wu]); + }, []), + Bu = [].concat(_u, [Eu]).reduce(function (e, t) { + return e.concat([t, t + "-" + Cu, t + "-" + wu]); + }, []), + Pu = [ + "beforeRead", + "read", + "afterRead", + "beforeMain", + "main", + "afterMain", + "beforeWrite", + "write", + "afterWrite", + ]; + function Lu(e) { + var t = new Map(), + n = new Set(), + r = []; + function i(e) { + n.add(e.name), + [] + .concat(e.requires || [], e.requiresIfExists || []) + .forEach(function (e) { + if (!n.has(e)) { + var r = t.get(e); + r && i(r); + } + }), + r.push(e); + } + return ( + e.forEach(function (e) { + t.set(e.name, e); + }), + e.forEach(function (e) { + n.has(e.name) || i(e); + }), + r + ); + } + function Du(e) { + var t; + return function () { + return ( + t || + (t = new Promise(function (n) { + Promise.resolve().then(function () { + (t = void 0), n(e()); + }); + })), + t + ); + }; + } + var Uu = { placement: "bottom", modifiers: [], strategy: "absolute" }; + function Fu() { + for (var e = arguments.length, t = new Array(e), n = 0; n < e; n++) + t[n] = arguments[n]; + return !t.some(function (e) { + return !(e && "function" === typeof e.getBoundingClientRect); + }); + } + function Ou(e) { + void 0 === e && (e = {}); + var t = e, + n = t.defaultModifiers, + r = void 0 === n ? [] : n, + i = t.defaultOptions, + a = void 0 === i ? Uu : i; + return function (e, t, n) { + void 0 === n && (n = a); + var i = { + placement: "bottom", + orderedModifiers: [], + options: Object.assign({}, Uu, a), + modifiersData: {}, + elements: { reference: e, popper: t }, + attributes: {}, + styles: {}, + }, + o = [], + s = !1, + l = { + state: i, + setOptions: function (n) { + var s = "function" === typeof n ? n(i.options) : n; + u(), + (i.options = Object.assign({}, a, i.options, s)), + (i.scrollParents = { + reference: ql(e) + ? vu(e) + : e.contextElement + ? vu(e.contextElement) + : [], + popper: vu(t), + }); + var c = (function (e) { + var t = Lu(e); + return Pu.reduce(function (e, n) { + return e.concat( + t.filter(function (e) { + return e.phase === n; + }) + ); + }, []); + })( + (function (e) { + var t = e.reduce(function (e, t) { + var n = e[t.name]; + return ( + (e[t.name] = n + ? Object.assign({}, n, t, { + options: Object.assign({}, n.options, t.options), + data: Object.assign({}, n.data, t.data), + }) + : t), + e + ); + }, {}); + return Object.keys(t).map(function (e) { + return t[e]; + }); + })([].concat(r, i.options.modifiers)) + ); + return ( + (i.orderedModifiers = c.filter(function (e) { + return e.enabled; + })), + i.orderedModifiers.forEach(function (e) { + var t = e.name, + n = e.options, + r = void 0 === n ? {} : n, + a = e.effect; + if ("function" === typeof a) { + var s = a({ state: i, name: t, instance: l, options: r }), + u = function () {}; + o.push(s || u); + } + }), + l.update() + ); + }, + forceUpdate: function () { + if (!s) { + var e = i.elements, + t = e.reference, + n = e.popper; + if (Fu(t, n)) { + (i.rects = { + reference: fu(t, Au(n), "fixed" === i.options.strategy), + popper: du(n), + }), + (i.reset = !1), + (i.placement = i.options.placement), + i.orderedModifiers.forEach(function (e) { + return (i.modifiersData[e.name] = Object.assign( + {}, + e.data + )); + }); + for (var r = 0; r < i.orderedModifiers.length; r++) + if (!0 !== i.reset) { + var a = i.orderedModifiers[r], + o = a.fn, + u = a.options, + c = void 0 === u ? {} : u, + f = a.name; + "function" === typeof o && + (i = + o({ state: i, options: c, name: f, instance: l }) || + i); + } else (i.reset = !1), (r = -1); + } + } + }, + update: Du(function () { + return new Promise(function (e) { + l.forceUpdate(), e(i); + }); + }), + destroy: function () { + u(), (s = !0); + }, + }; + if (!Fu(e, t)) return l; + function u() { + o.forEach(function (e) { + return e(); + }), + (o = []); + } + return ( + l.setOptions(n).then(function (e) { + !s && n.onFirstUpdate && n.onFirstUpdate(e); + }), + l + ); + }; + } + var Nu = { passive: !0 }; + function Gu(e) { + return e.split("-")[0]; + } + function Zu(e) { + return e.split("-")[1]; + } + function zu(e) { + return ["top", "bottom"].indexOf(e) >= 0 ? "x" : "y"; + } + function Qu(e) { + var t, + n = e.reference, + r = e.element, + i = e.placement, + a = i ? Gu(i) : null, + o = i ? Zu(i) : null, + s = n.x + n.width / 2 - r.width / 2, + l = n.y + n.height / 2 - r.height / 2; + switch (a) { + case yu: + t = { x: s, y: n.y - r.height }; + break; + case bu: + t = { x: s, y: n.y + n.height }; + break; + case xu: + t = { x: n.x + n.width, y: l }; + break; + case Su: + t = { x: n.x - r.width, y: l }; + break; + default: + t = { x: n.x, y: n.y }; + } + var u = a ? zu(a) : null; + if (null != u) { + var c = "y" === u ? "height" : "width"; + switch (o) { + case Cu: + t[u] = t[u] - (n[c] / 2 - r[c] / 2); + break; + case wu: + t[u] = t[u] + (n[c] / 2 - r[c] / 2); + } + } + return t; + } + var Hu = { top: "auto", right: "auto", bottom: "auto", left: "auto" }; + function Vu(e) { + var t, + n = e.popper, + r = e.popperRect, + i = e.placement, + a = e.variation, + o = e.offsets, + s = e.position, + l = e.gpuAcceleration, + u = e.adaptive, + c = e.roundOffsets, + f = e.isFixed, + d = o.x, + h = void 0 === d ? 0 : d, + p = o.y, + v = void 0 === p ? 0 : p, + m = "function" === typeof c ? c({ x: h, y: v }) : { x: h, y: v }; + (h = m.x), (v = m.y); + var g = o.hasOwnProperty("x"), + A = o.hasOwnProperty("y"), + y = Su, + b = yu, + x = window; + if (u) { + var S = Au(n), + E = "clientHeight", + _ = "clientWidth"; + if ( + (S === Yl(n) && + "static" !== uu((S = su(n))).position && + "absolute" === s && + ((E = "scrollHeight"), (_ = "scrollWidth")), + i === yu || ((i === Su || i === xu) && a === wu)) + ) + (b = bu), + (v -= + (f && S === x && x.visualViewport + ? x.visualViewport.height + : S[E]) - r.height), + (v *= l ? 1 : -1); + if (i === Su || ((i === yu || i === bu) && a === wu)) + (y = xu), + (h -= + (f && S === x && x.visualViewport + ? x.visualViewport.width + : S[_]) - r.width), + (h *= l ? 1 : -1); + } + var C, + w = Object.assign({ position: s }, u && Hu), + T = + !0 === c + ? (function (e, t) { + var n = e.x, + r = e.y, + i = t.devicePixelRatio || 1; + return { x: tu(n * i) / i || 0, y: tu(r * i) / i || 0 }; + })({ x: h, y: v }, Yl(n)) + : { x: h, y: v }; + return ( + (h = T.x), + (v = T.y), + l + ? Object.assign( + {}, + w, + (((C = {})[b] = A ? "0" : ""), + (C[y] = g ? "0" : ""), + (C.transform = + (x.devicePixelRatio || 1) <= 1 + ? "translate(" + h + "px, " + v + "px)" + : "translate3d(" + h + "px, " + v + "px, 0)"), + C) + ) + : Object.assign( + {}, + w, + (((t = {})[b] = A ? v + "px" : ""), + (t[y] = g ? h + "px" : ""), + (t.transform = ""), + t) + ) + ); + } + var ju = { + name: "offset", + enabled: !0, + phase: "main", + requires: ["popperOffsets"], + fn: function (e) { + var t = e.state, + n = e.options, + r = e.name, + i = n.offset, + a = void 0 === i ? [0, 0] : i, + o = Bu.reduce(function (e, n) { + return ( + (e[n] = (function (e, t, n) { + var r = Gu(e), + i = [Su, yu].indexOf(r) >= 0 ? -1 : 1, + a = + "function" === typeof n + ? n(Object.assign({}, t, { placement: e })) + : n, + o = a[0], + s = a[1]; + return ( + (o = o || 0), + (s = (s || 0) * i), + [Su, xu].indexOf(r) >= 0 ? { x: s, y: o } : { x: o, y: s } + ); + })(n, t.rects, a)), + e + ); + }, {}), + s = o[t.placement], + l = s.x, + u = s.y; + null != t.modifiersData.popperOffsets && + ((t.modifiersData.popperOffsets.x += l), + (t.modifiersData.popperOffsets.y += u)), + (t.modifiersData[r] = o); + }, + }, + Wu = { left: "right", right: "left", bottom: "top", top: "bottom" }; + function Xu(e) { + return e.replace(/left|right|bottom|top/g, function (e) { + return Wu[e]; + }); + } + var Yu = { start: "end", end: "start" }; + function qu(e) { + return e.replace(/start|end/g, function (e) { + return Yu[e]; + }); + } + function Ju(e, t) { + var n = t.getRootNode && t.getRootNode(); + if (e.contains(t)) return !0; + if (n && Kl(n)) { + var r = t; + do { + if (r && e.isSameNode(r)) return !0; + r = r.parentNode || r.host; + } while (r); + } + return !1; + } + function Ku(e) { + return Object.assign({}, e, { + left: e.x, + top: e.y, + right: e.x + e.width, + bottom: e.y + e.height, + }); + } + function $u(e, t, n) { + return t === Mu + ? Ku( + (function (e, t) { + var n = Yl(e), + r = su(e), + i = n.visualViewport, + a = r.clientWidth, + o = r.clientHeight, + s = 0, + l = 0; + if (i) { + (a = i.width), (o = i.height); + var u = ru(); + (u || (!u && "fixed" === t)) && + ((s = i.offsetLeft), (l = i.offsetTop)); + } + return { width: a, height: o, x: s + lu(e), y: l }; + })(e, n) + ) + : ql(t) + ? (function (e, t) { + var n = iu(e, !1, "fixed" === t); + return ( + (n.top = n.top + e.clientTop), + (n.left = n.left + e.clientLeft), + (n.bottom = n.top + e.clientHeight), + (n.right = n.left + e.clientWidth), + (n.width = e.clientWidth), + (n.height = e.clientHeight), + (n.x = n.left), + (n.y = n.top), + n + ); + })(t, n) + : Ku( + (function (e) { + var t, + n = su(e), + r = au(e), + i = null == (t = e.ownerDocument) ? void 0 : t.body, + a = $l( + n.scrollWidth, + n.clientWidth, + i ? i.scrollWidth : 0, + i ? i.clientWidth : 0 + ), + o = $l( + n.scrollHeight, + n.clientHeight, + i ? i.scrollHeight : 0, + i ? i.clientHeight : 0 + ), + s = -r.scrollLeft + lu(e), + l = -r.scrollTop; + return ( + "rtl" === uu(i || n).direction && + (s += $l(n.clientWidth, i ? i.clientWidth : 0) - a), + { width: a, height: o, x: s, y: l } + ); + })(su(e)) + ); + } + function ec(e, t, n, r) { + var i = + "clippingParents" === t + ? (function (e) { + var t = vu(hu(e)), + n = + ["absolute", "fixed"].indexOf(uu(e).position) >= 0 && Jl(e) + ? Au(e) + : e; + return ql(n) + ? t.filter(function (e) { + return ql(e) && Ju(e, n) && "body" !== ou(e); + }) + : []; + })(e) + : [].concat(t), + a = [].concat(i, [n]), + o = a[0], + s = a.reduce(function (t, n) { + var i = $u(e, n, r); + return ( + (t.top = $l(i.top, t.top)), + (t.right = eu(i.right, t.right)), + (t.bottom = eu(i.bottom, t.bottom)), + (t.left = $l(i.left, t.left)), + t + ); + }, $u(e, o, r)); + return ( + (s.width = s.right - s.left), + (s.height = s.bottom - s.top), + (s.x = s.left), + (s.y = s.top), + s + ); + } + function tc(e) { + return Object.assign({}, { top: 0, right: 0, bottom: 0, left: 0 }, e); + } + function nc(e, t) { + return t.reduce(function (t, n) { + return (t[n] = e), t; + }, {}); + } + function rc(e, t) { + void 0 === t && (t = {}); + var n = t, + r = n.placement, + i = void 0 === r ? e.placement : r, + a = n.strategy, + o = void 0 === a ? e.strategy : a, + s = n.boundary, + l = void 0 === s ? Tu : s, + u = n.rootBoundary, + c = void 0 === u ? Mu : u, + f = n.elementContext, + d = void 0 === f ? Iu : f, + h = n.altBoundary, + p = void 0 !== h && h, + v = n.padding, + m = void 0 === v ? 0 : v, + g = tc("number" !== typeof m ? m : nc(m, _u)), + A = d === Iu ? ku : Iu, + y = e.rects.popper, + b = e.elements[p ? A : d], + x = ec(ql(b) ? b : b.contextElement || su(e.elements.popper), l, c, o), + S = iu(e.elements.reference), + E = Qu({ + reference: S, + element: y, + strategy: "absolute", + placement: i, + }), + _ = Ku(Object.assign({}, y, E)), + C = d === Iu ? _ : S, + w = { + top: x.top - C.top + g.top, + bottom: C.bottom - x.bottom + g.bottom, + left: x.left - C.left + g.left, + right: C.right - x.right + g.right, + }, + T = e.modifiersData.offset; + if (d === Iu && T) { + var M = T[i]; + Object.keys(w).forEach(function (e) { + var t = [xu, bu].indexOf(e) >= 0 ? 1 : -1, + n = [yu, bu].indexOf(e) >= 0 ? "y" : "x"; + w[e] += M[n] * t; + }); + } + return w; + } + var ic = { + name: "flip", + enabled: !0, + phase: "main", + fn: function (e) { + var t = e.state, + n = e.options, + r = e.name; + if (!t.modifiersData[r]._skip) { + for ( + var i = n.mainAxis, + a = void 0 === i || i, + o = n.altAxis, + s = void 0 === o || o, + l = n.fallbackPlacements, + u = n.padding, + c = n.boundary, + f = n.rootBoundary, + d = n.altBoundary, + h = n.flipVariations, + p = void 0 === h || h, + v = n.allowedAutoPlacements, + m = t.options.placement, + g = Gu(m), + A = + l || + (g === m || !p + ? [Xu(m)] + : (function (e) { + if (Gu(e) === Eu) return []; + var t = Xu(e); + return [qu(e), t, qu(t)]; + })(m)), + y = [m].concat(A).reduce(function (e, n) { + return e.concat( + Gu(n) === Eu + ? (function (e, t) { + void 0 === t && (t = {}); + var n = t, + r = n.placement, + i = n.boundary, + a = n.rootBoundary, + o = n.padding, + s = n.flipVariations, + l = n.allowedAutoPlacements, + u = void 0 === l ? Bu : l, + c = Zu(r), + f = c + ? s + ? Ru + : Ru.filter(function (e) { + return Zu(e) === c; + }) + : _u, + d = f.filter(function (e) { + return u.indexOf(e) >= 0; + }); + 0 === d.length && (d = f); + var h = d.reduce(function (t, n) { + return ( + (t[n] = rc(e, { + placement: n, + boundary: i, + rootBoundary: a, + padding: o, + })[Gu(n)]), + t + ); + }, {}); + return Object.keys(h).sort(function (e, t) { + return h[e] - h[t]; + }); + })(t, { + placement: n, + boundary: c, + rootBoundary: f, + padding: u, + flipVariations: p, + allowedAutoPlacements: v, + }) + : n + ); + }, []), + b = t.rects.reference, + x = t.rects.popper, + S = new Map(), + E = !0, + _ = y[0], + C = 0; + C < y.length; + C++ + ) { + var w = y[C], + T = Gu(w), + M = Zu(w) === Cu, + I = [yu, bu].indexOf(T) >= 0, + k = I ? "width" : "height", + R = rc(t, { + placement: w, + boundary: c, + rootBoundary: f, + altBoundary: d, + padding: u, + }), + B = I ? (M ? xu : Su) : M ? bu : yu; + b[k] > x[k] && (B = Xu(B)); + var P = Xu(B), + L = []; + if ( + (a && L.push(R[T] <= 0), + s && L.push(R[B] <= 0, R[P] <= 0), + L.every(function (e) { + return e; + })) + ) { + (_ = w), (E = !1); + break; + } + S.set(w, L); + } + if (E) + for ( + var D = function (e) { + var t = y.find(function (t) { + var n = S.get(t); + if (n) + return n.slice(0, e).every(function (e) { + return e; + }); + }); + if (t) return (_ = t), "break"; + }, + U = p ? 3 : 1; + U > 0; + U-- + ) { + if ("break" === D(U)) break; + } + t.placement !== _ && + ((t.modifiersData[r]._skip = !0), + (t.placement = _), + (t.reset = !0)); + } + }, + requiresIfExists: ["offset"], + data: { _skip: !1 }, + }; + function ac(e, t, n) { + return $l(e, eu(t, n)); + } + var oc = { + name: "preventOverflow", + enabled: !0, + phase: "main", + fn: function (e) { + var t = e.state, + n = e.options, + r = e.name, + i = n.mainAxis, + a = void 0 === i || i, + o = n.altAxis, + s = void 0 !== o && o, + l = n.boundary, + u = n.rootBoundary, + c = n.altBoundary, + f = n.padding, + d = n.tether, + h = void 0 === d || d, + p = n.tetherOffset, + v = void 0 === p ? 0 : p, + m = rc(t, { + boundary: l, + rootBoundary: u, + padding: f, + altBoundary: c, + }), + g = Gu(t.placement), + A = Zu(t.placement), + y = !A, + b = zu(g), + x = "x" === b ? "y" : "x", + S = t.modifiersData.popperOffsets, + E = t.rects.reference, + _ = t.rects.popper, + C = + "function" === typeof v + ? v(Object.assign({}, t.rects, { placement: t.placement })) + : v, + w = + "number" === typeof C + ? { mainAxis: C, altAxis: C } + : Object.assign({ mainAxis: 0, altAxis: 0 }, C), + T = t.modifiersData.offset + ? t.modifiersData.offset[t.placement] + : null, + M = { x: 0, y: 0 }; + if (S) { + if (a) { + var I, + k = "y" === b ? yu : Su, + R = "y" === b ? bu : xu, + B = "y" === b ? "height" : "width", + P = S[b], + L = P + m[k], + D = P - m[R], + U = h ? -_[B] / 2 : 0, + F = A === Cu ? E[B] : _[B], + O = A === Cu ? -_[B] : -E[B], + N = t.elements.arrow, + G = h && N ? du(N) : { width: 0, height: 0 }, + Z = t.modifiersData["arrow#persistent"] + ? t.modifiersData["arrow#persistent"].padding + : { top: 0, right: 0, bottom: 0, left: 0 }, + z = Z[k], + Q = Z[R], + H = ac(0, E[B], G[B]), + V = y + ? E[B] / 2 - U - H - z - w.mainAxis + : F - H - z - w.mainAxis, + j = y + ? -E[B] / 2 + U + H + Q + w.mainAxis + : O + H + Q + w.mainAxis, + W = t.elements.arrow && Au(t.elements.arrow), + X = W ? ("y" === b ? W.clientTop || 0 : W.clientLeft || 0) : 0, + Y = null != (I = null == T ? void 0 : T[b]) ? I : 0, + q = P + j - Y, + J = ac(h ? eu(L, P + V - Y - X) : L, P, h ? $l(D, q) : D); + (S[b] = J), (M[b] = J - P); + } + if (s) { + var K, + $ = "x" === b ? yu : Su, + ee = "x" === b ? bu : xu, + te = S[x], + ne = "y" === x ? "height" : "width", + re = te + m[$], + ie = te - m[ee], + ae = -1 !== [yu, Su].indexOf(g), + oe = null != (K = null == T ? void 0 : T[x]) ? K : 0, + se = ae ? re : te - E[ne] - _[ne] - oe + w.altAxis, + le = ae ? te + E[ne] + _[ne] - oe - w.altAxis : ie, + ue = + h && ae + ? (function (e, t, n) { + var r = ac(e, t, n); + return r > n ? n : r; + })(se, te, le) + : ac(h ? se : re, te, h ? le : ie); + (S[x] = ue), (M[x] = ue - te); + } + t.modifiersData[r] = M; + } + }, + requiresIfExists: ["offset"], + }; + var sc = { + name: "arrow", + enabled: !0, + phase: "main", + fn: function (e) { + var t, + n = e.state, + r = e.name, + i = e.options, + a = n.elements.arrow, + o = n.modifiersData.popperOffsets, + s = Gu(n.placement), + l = zu(s), + u = [Su, xu].indexOf(s) >= 0 ? "height" : "width"; + if (a && o) { + var c = (function (e, t) { + return tc( + "number" !== + typeof (e = + "function" === typeof e + ? e( + Object.assign({}, t.rects, { placement: t.placement }) + ) + : e) + ? e + : nc(e, _u) + ); + })(i.padding, n), + f = du(a), + d = "y" === l ? yu : Su, + h = "y" === l ? bu : xu, + p = + n.rects.reference[u] + + n.rects.reference[l] - + o[l] - + n.rects.popper[u], + v = o[l] - n.rects.reference[l], + m = Au(a), + g = m ? ("y" === l ? m.clientHeight || 0 : m.clientWidth || 0) : 0, + A = p / 2 - v / 2, + y = c[d], + b = g - f[u] - c[h], + x = g / 2 - f[u] / 2 + A, + S = ac(y, x, b), + E = l; + n.modifiersData[r] = (((t = {})[E] = S), (t.centerOffset = S - x), t); + } + }, + effect: function (e) { + var t = e.state, + n = e.options.element, + r = void 0 === n ? "[data-popper-arrow]" : n; + null != r && + ("string" !== typeof r || (r = t.elements.popper.querySelector(r))) && + Ju(t.elements.popper, r) && + (t.elements.arrow = r); + }, + requires: ["popperOffsets"], + requiresIfExists: ["preventOverflow"], + }; + function lc(e, t, n) { + return ( + void 0 === n && (n = { x: 0, y: 0 }), + { + top: e.top - t.height - n.y, + right: e.right - t.width + n.x, + bottom: e.bottom - t.height + n.y, + left: e.left - t.width - n.x, + } + ); + } + function uc(e) { + return [yu, xu, bu, Su].some(function (t) { + return e[t] >= 0; + }); + } + var cc = Ou({ + defaultModifiers: [ + { + name: "eventListeners", + enabled: !0, + phase: "write", + fn: function () {}, + effect: function (e) { + var t = e.state, + n = e.instance, + r = e.options, + i = r.scroll, + a = void 0 === i || i, + o = r.resize, + s = void 0 === o || o, + l = Yl(t.elements.popper), + u = [].concat(t.scrollParents.reference, t.scrollParents.popper); + return ( + a && + u.forEach(function (e) { + e.addEventListener("scroll", n.update, Nu); + }), + s && l.addEventListener("resize", n.update, Nu), + function () { + a && + u.forEach(function (e) { + e.removeEventListener("scroll", n.update, Nu); + }), + s && l.removeEventListener("resize", n.update, Nu); + } + ); + }, + data: {}, + }, + { + name: "popperOffsets", + enabled: !0, + phase: "read", + fn: function (e) { + var t = e.state, + n = e.name; + t.modifiersData[n] = Qu({ + reference: t.rects.reference, + element: t.rects.popper, + strategy: "absolute", + placement: t.placement, + }); + }, + data: {}, + }, + { + name: "computeStyles", + enabled: !0, + phase: "beforeWrite", + fn: function (e) { + var t = e.state, + n = e.options, + r = n.gpuAcceleration, + i = void 0 === r || r, + a = n.adaptive, + o = void 0 === a || a, + s = n.roundOffsets, + l = void 0 === s || s, + u = { + placement: Gu(t.placement), + variation: Zu(t.placement), + popper: t.elements.popper, + popperRect: t.rects.popper, + gpuAcceleration: i, + isFixed: "fixed" === t.options.strategy, + }; + null != t.modifiersData.popperOffsets && + (t.styles.popper = Object.assign( + {}, + t.styles.popper, + Vu( + Object.assign({}, u, { + offsets: t.modifiersData.popperOffsets, + position: t.options.strategy, + adaptive: o, + roundOffsets: l, + }) + ) + )), + null != t.modifiersData.arrow && + (t.styles.arrow = Object.assign( + {}, + t.styles.arrow, + Vu( + Object.assign({}, u, { + offsets: t.modifiersData.arrow, + position: "absolute", + adaptive: !1, + roundOffsets: l, + }) + ) + )), + (t.attributes.popper = Object.assign({}, t.attributes.popper, { + "data-popper-placement": t.placement, + })); + }, + data: {}, + }, + { + name: "applyStyles", + enabled: !0, + phase: "write", + fn: function (e) { + var t = e.state; + Object.keys(t.elements).forEach(function (e) { + var n = t.styles[e] || {}, + r = t.attributes[e] || {}, + i = t.elements[e]; + Jl(i) && + ou(i) && + (Object.assign(i.style, n), + Object.keys(r).forEach(function (e) { + var t = r[e]; + !1 === t + ? i.removeAttribute(e) + : i.setAttribute(e, !0 === t ? "" : t); + })); + }); + }, + effect: function (e) { + var t = e.state, + n = { + popper: { + position: t.options.strategy, + left: "0", + top: "0", + margin: "0", + }, + arrow: { position: "absolute" }, + reference: {}, + }; + return ( + Object.assign(t.elements.popper.style, n.popper), + (t.styles = n), + t.elements.arrow && + Object.assign(t.elements.arrow.style, n.arrow), + function () { + Object.keys(t.elements).forEach(function (e) { + var r = t.elements[e], + i = t.attributes[e] || {}, + a = Object.keys( + t.styles.hasOwnProperty(e) ? t.styles[e] : n[e] + ).reduce(function (e, t) { + return (e[t] = ""), e; + }, {}); + Jl(r) && + ou(r) && + (Object.assign(r.style, a), + Object.keys(i).forEach(function (e) { + r.removeAttribute(e); + })); + }); + } + ); + }, + requires: ["computeStyles"], + }, + ju, + ic, + oc, + sc, + { + name: "hide", + enabled: !0, + phase: "main", + requiresIfExists: ["preventOverflow"], + fn: function (e) { + var t = e.state, + n = e.name, + r = t.rects.reference, + i = t.rects.popper, + a = t.modifiersData.preventOverflow, + o = rc(t, { elementContext: "reference" }), + s = rc(t, { altBoundary: !0 }), + l = lc(o, r), + u = lc(s, i, a), + c = uc(l), + f = uc(u); + (t.modifiersData[n] = { + referenceClippingOffsets: l, + popperEscapeOffsets: u, + isReferenceHidden: c, + hasPopperEscaped: f, + }), + (t.attributes.popper = Object.assign({}, t.attributes.popper, { + "data-popper-reference-hidden": c, + "data-popper-escaped": f, + })); + }, + }, + ], + }); + function fc(e) { + return (0, Tn.Z)("MuiPopper", e); + } + (0, wn.Z)("MuiPopper", ["root"]); + var dc = { disableDefaultClasses: !1 }, + hc = e.createContext(dc); + var pc = [ + "anchorEl", + "children", + "direction", + "disablePortal", + "modifiers", + "open", + "placement", + "popperOptions", + "popperRef", + "slotProps", + "slots", + "TransitionProps", + "ownerState", + ], + vc = [ + "anchorEl", + "children", + "container", + "direction", + "disablePortal", + "keepMounted", + "modifiers", + "open", + "placement", + "popperOptions", + "popperRef", + "style", + "transition", + "slotProps", + "slots", + ]; + function mc(e) { + return "function" === typeof e ? e() : e; + } + function gc(e) { + return void 0 !== e.nodeType; + } + var Ac = function () { + return (0, zt.Z)( + { root: ["root"] }, + (function (t) { + var n = e.useContext(hc).disableDefaultClasses; + return function (e) { + return n ? "" : t(e); + }; + })(fc) + ); + }, + yc = {}, + bc = e.forwardRef(function (t, n) { + var r, + i = t.anchorEl, + a = t.children, + o = t.direction, + s = t.disablePortal, + l = t.modifiers, + u = t.open, + c = t.placement, + f = t.popperOptions, + d = t.popperRef, + h = t.slotProps, + p = void 0 === h ? {} : h, + v = t.slots, + m = void 0 === v ? {} : v, + g = t.TransitionProps, + A = (0, Gt.Z)(t, pc), + y = e.useRef(null), + b = (0, Xt.Z)(y, n), + x = e.useRef(null), + S = (0, Xt.Z)(x, d), + E = e.useRef(S); + (0, qt.Z)( + function () { + E.current = S; + }, + [S] + ), + e.useImperativeHandle( + d, + function () { + return x.current; + }, + [] + ); + var _ = (function (e, t) { + if ("ltr" === t) return e; + switch (e) { + case "bottom-end": + return "bottom-start"; + case "bottom-start": + return "bottom-end"; + case "top-end": + return "top-start"; + case "top-start": + return "top-end"; + default: + return e; + } + })(c, o), + C = e.useState(_), + w = (0, Ot.Z)(C, 2), + T = w[0], + M = w[1], + I = e.useState(mc(i)), + k = (0, Ot.Z)(I, 2), + R = k[0], + B = k[1]; + e.useEffect(function () { + x.current && x.current.forceUpdate(); + }), + e.useEffect( + function () { + i && B(mc(i)); + }, + [i] + ), + (0, qt.Z)( + function () { + if (R && u) { + var e = [ + { name: "preventOverflow", options: { altBoundary: s } }, + { name: "flip", options: { altBoundary: s } }, + { + name: "onUpdate", + enabled: !0, + phase: "afterWrite", + fn: function (e) { + !(function (e) { + M(e.placement); + })(e.state); + }, + }, + ]; + null != l && (e = e.concat(l)), + f && null != f.modifiers && (e = e.concat(f.modifiers)); + var t = cc( + R, + y.current, + (0, Nt.Z)({ placement: _ }, f, { modifiers: e }) + ); + return ( + E.current(t), + function () { + t.destroy(), E.current(null); + } + ); + } + }, + [R, s, l, u, f, _] + ); + var P = { placement: T }; + null !== g && (P.TransitionProps = g); + var L = Ac(), + D = null != (r = m.root) ? r : "div", + U = Gr({ + elementType: D, + externalSlotProps: p.root, + externalForwardedProps: A, + additionalProps: { role: "tooltip", ref: b }, + ownerState: t, + className: L.root, + }); + return (0, + Ut.jsx)(D, (0, Nt.Z)({}, U, { children: "function" === typeof a ? a(P) : a })); + }), + xc = e.forwardRef(function (t, n) { + var r, + i = t.anchorEl, + a = t.children, + o = t.container, + s = t.direction, + l = void 0 === s ? "ltr" : s, + u = t.disablePortal, + c = void 0 !== u && u, + f = t.keepMounted, + d = void 0 !== f && f, + h = t.modifiers, + p = t.open, + v = t.placement, + m = void 0 === v ? "bottom" : v, + g = t.popperOptions, + A = void 0 === g ? yc : g, + y = t.popperRef, + b = t.style, + x = t.transition, + S = void 0 !== x && x, + E = t.slotProps, + _ = void 0 === E ? {} : E, + C = t.slots, + w = void 0 === C ? {} : C, + T = (0, Gt.Z)(t, vc), + M = e.useState(!0), + I = (0, Ot.Z)(M, 2), + k = I[0], + R = I[1]; + if (!d && !p && (!S || k)) return null; + if (o) r = o; + else if (i) { + var B = mc(i); + r = B && gc(B) ? (0, _i.Z)(B).body : (0, _i.Z)(null).body; + } + var P = p || !d || (S && !k) ? void 0 : "none", + L = S + ? { + in: p, + onEnter: function () { + R(!1); + }, + onExited: function () { + R(!0); + }, + } + : void 0; + return (0, + Ut.jsx)(zi, { disablePortal: c, container: r, children: (0, Ut.jsx)(bc, (0, Nt.Z)({ anchorEl: i, direction: l, disablePortal: c, modifiers: h, ref: n, open: S ? !k : p, placement: m, popperOptions: A, popperRef: y, slotProps: _, slots: w }, T, { style: (0, Nt.Z)({ position: "fixed", top: 0, left: 0, display: P }, b), TransitionProps: L, children: a })) }); + }), + Sc = n(9120), + Ec = [ + "anchorEl", + "component", + "components", + "componentsProps", + "container", + "disablePortal", + "keepMounted", + "modifiers", + "open", + "placement", + "popperOptions", + "popperRef", + "transition", + "slots", + "slotProps", + ], + _c = (0, Ht.ZP)(xc, { + name: "MuiPopper", + slot: "Root", + overridesResolver: function (e, t) { + return t.root; + }, + })({}), + Cc = e.forwardRef(function (e, t) { + var n, + r = (0, Sc.Z)(), + i = (0, Vt.Z)({ props: e, name: "MuiPopper" }), + a = i.anchorEl, + o = i.component, + s = i.components, + l = i.componentsProps, + u = i.container, + c = i.disablePortal, + f = i.keepMounted, + d = i.modifiers, + h = i.open, + p = i.placement, + v = i.popperOptions, + m = i.popperRef, + g = i.transition, + A = i.slots, + y = i.slotProps, + b = (0, Gt.Z)(i, Ec), + x = + null != (n = null == A ? void 0 : A.root) + ? n + : null == s + ? void 0 + : s.Root, + S = (0, Nt.Z)( + { + anchorEl: a, + container: u, + disablePortal: c, + keepMounted: f, + modifiers: d, + open: h, + placement: p, + popperOptions: v, + popperRef: m, + transition: g, + }, + b + ); + return (0, + Ut.jsx)(_c, (0, Nt.Z)({ as: o, direction: null == r ? void 0 : r.direction, slots: { root: x }, slotProps: null != y ? y : l }, S, { ref: t })); + }), + wc = n(7384); + function Tc(e) { + return (0, Tn.Z)("MuiTooltip", e); + } + var Mc = (0, wn.Z)("MuiTooltip", [ + "popper", + "popperInteractive", + "popperArrow", + "popperClose", + "tooltip", + "tooltipArrow", + "touch", + "tooltipPlacementLeft", + "tooltipPlacementRight", + "tooltipPlacementTop", + "tooltipPlacementBottom", + "arrow", + ]), + Ic = [ + "arrow", + "children", + "classes", + "components", + "componentsProps", + "describeChild", + "disableFocusListener", + "disableHoverListener", + "disableInteractive", + "disableTouchListener", + "enterDelay", + "enterNextDelay", + "enterTouchDelay", + "followCursor", + "id", + "leaveDelay", + "leaveTouchDelay", + "onClose", + "onOpen", + "open", + "placement", + "PopperComponent", + "PopperProps", + "slotProps", + "slots", + "title", + "TransitionComponent", + "TransitionProps", + ]; + var kc = (0, Ht.ZP)(Cc, { + name: "MuiTooltip", + slot: "Popper", + overridesResolver: function (e, t) { + var n = e.ownerState; + return [ + t.popper, + !n.disableInteractive && t.popperInteractive, + n.arrow && t.popperArrow, + !n.open && t.popperClose, + ]; + }, + })(function (e) { + var t, + n = e.theme, + r = e.ownerState, + i = e.open; + return (0, + Nt.Z)({ zIndex: (n.vars || n).zIndex.tooltip, pointerEvents: "none" }, !r.disableInteractive && { pointerEvents: "auto" }, !i && { pointerEvents: "none" }, r.arrow && ((t = {}), (0, l.Z)(t, '&[data-popper-placement*="bottom"] .'.concat(Mc.arrow), { top: 0, marginTop: "-0.71em", "&::before": { transformOrigin: "0 100%" } }), (0, l.Z)(t, '&[data-popper-placement*="top"] .'.concat(Mc.arrow), { bottom: 0, marginBottom: "-0.71em", "&::before": { transformOrigin: "100% 0" } }), (0, l.Z)(t, '&[data-popper-placement*="right"] .'.concat(Mc.arrow), (0, Nt.Z)({}, r.isRtl ? { right: 0, marginRight: "-0.71em" } : { left: 0, marginLeft: "-0.71em" }, { height: "1em", width: "0.71em", "&::before": { transformOrigin: "100% 100%" } })), (0, l.Z)(t, '&[data-popper-placement*="left"] .'.concat(Mc.arrow), (0, Nt.Z)({}, r.isRtl ? { left: 0, marginLeft: "-0.71em" } : { right: 0, marginRight: "-0.71em" }, { height: "1em", width: "0.71em", "&::before": { transformOrigin: "0 0" } })), t)); + }), + Rc = (0, Ht.ZP)("div", { + name: "MuiTooltip", + slot: "Tooltip", + overridesResolver: function (e, t) { + var n = e.ownerState; + return [ + t.tooltip, + n.touch && t.touch, + n.arrow && t.tooltipArrow, + t["tooltipPlacement".concat((0, ln.Z)(n.placement.split("-")[0]))], + ]; + }, + })(function (e) { + var t, + n, + r = e.theme, + i = e.ownerState; + return (0, + Nt.Z)({ backgroundColor: r.vars ? r.vars.palette.Tooltip.bg : (0, ia.Fq)(r.palette.grey[700], 0.92), borderRadius: (r.vars || r).shape.borderRadius, color: (r.vars || r).palette.common.white, fontFamily: r.typography.fontFamily, padding: "4px 8px", fontSize: r.typography.pxToRem(11), maxWidth: 300, margin: 2, wordWrap: "break-word", fontWeight: r.typography.fontWeightMedium }, i.arrow && { position: "relative", margin: 0 }, i.touch && { padding: "8px 16px", fontSize: r.typography.pxToRem(14), lineHeight: "".concat(((n = 16 / 14), Math.round(1e5 * n) / 1e5), "em"), fontWeight: r.typography.fontWeightRegular }, ((t = {}), (0, l.Z)(t, ".".concat(Mc.popper, '[data-popper-placement*="left"] &'), (0, Nt.Z)({ transformOrigin: "right center" }, i.isRtl ? (0, Nt.Z)({ marginLeft: "14px" }, i.touch && { marginLeft: "24px" }) : (0, Nt.Z)({ marginRight: "14px" }, i.touch && { marginRight: "24px" }))), (0, l.Z)(t, ".".concat(Mc.popper, '[data-popper-placement*="right"] &'), (0, Nt.Z)({ transformOrigin: "left center" }, i.isRtl ? (0, Nt.Z)({ marginRight: "14px" }, i.touch && { marginRight: "24px" }) : (0, Nt.Z)({ marginLeft: "14px" }, i.touch && { marginLeft: "24px" }))), (0, l.Z)(t, ".".concat(Mc.popper, '[data-popper-placement*="top"] &'), (0, Nt.Z)({ transformOrigin: "center bottom", marginBottom: "14px" }, i.touch && { marginBottom: "24px" })), (0, l.Z)(t, ".".concat(Mc.popper, '[data-popper-placement*="bottom"] &'), (0, Nt.Z)({ transformOrigin: "center top", marginTop: "14px" }, i.touch && { marginTop: "24px" })), t)); + }), + Bc = (0, Ht.ZP)("span", { + name: "MuiTooltip", + slot: "Arrow", + overridesResolver: function (e, t) { + return t.arrow; + }, + })(function (e) { + var t = e.theme; + return { + overflow: "hidden", + position: "absolute", + width: "1em", + height: "0.71em", + boxSizing: "border-box", + color: t.vars + ? t.vars.palette.Tooltip.bg + : (0, ia.Fq)(t.palette.grey[700], 0.9), + "&::before": { + content: '""', + margin: "auto", + display: "block", + width: "100%", + height: "100%", + backgroundColor: "currentColor", + transform: "rotate(45deg)", + }, + }; + }), + Pc = !1, + Lc = null, + Dc = { x: 0, y: 0 }; + function Uc(e, t) { + return function (n) { + t && t(n), e(n); + }; + } + var Fc = e.forwardRef(function (t, n) { + var r, + i, + a, + o, + s, + l, + u, + c, + f, + d, + h, + p, + v, + m, + g, + A, + y, + b, + x, + S = (0, Vt.Z)({ props: t, name: "MuiTooltip" }), + E = S.arrow, + _ = void 0 !== E && E, + C = S.children, + w = S.components, + T = void 0 === w ? {} : w, + M = S.componentsProps, + I = void 0 === M ? {} : M, + k = S.describeChild, + R = void 0 !== k && k, + B = S.disableFocusListener, + P = void 0 !== B && B, + L = S.disableHoverListener, + D = void 0 !== L && L, + U = S.disableInteractive, + F = void 0 !== U && U, + O = S.disableTouchListener, + N = void 0 !== O && O, + G = S.enterDelay, + Z = void 0 === G ? 100 : G, + z = S.enterNextDelay, + Q = void 0 === z ? 0 : z, + H = S.enterTouchDelay, + V = void 0 === H ? 700 : H, + j = S.followCursor, + W = void 0 !== j && j, + X = S.id, + Y = S.leaveDelay, + q = void 0 === Y ? 0 : Y, + J = S.leaveTouchDelay, + K = void 0 === J ? 1500 : J, + $ = S.onClose, + ee = S.onOpen, + te = S.open, + ne = S.placement, + re = void 0 === ne ? "bottom" : ne, + ie = S.PopperComponent, + ae = S.PopperProps, + oe = void 0 === ae ? {} : ae, + se = S.slotProps, + le = void 0 === se ? {} : se, + ue = S.slots, + ce = void 0 === ue ? {} : ue, + fe = S.title, + de = S.TransitionComponent, + he = void 0 === de ? Ei : de, + pe = S.TransitionProps, + ve = (0, Gt.Z)(S, Ic), + me = e.isValidElement(C) ? C : (0, Ut.jsx)("span", { children: C }), + ge = vi(), + Ae = "rtl" === ge.direction, + ye = e.useState(), + be = (0, Ot.Z)(ye, 2), + xe = be[0], + Se = be[1], + Ee = e.useState(null), + _e = (0, Ot.Z)(Ee, 2), + Ce = _e[0], + we = _e[1], + Te = e.useRef(!1), + Me = F || W, + Ie = e.useRef(), + ke = e.useRef(), + Re = e.useRef(), + Be = e.useRef(), + Pe = (0, za.Z)({ + controlled: te, + default: !1, + name: "Tooltip", + state: "open", + }), + Le = (0, Ot.Z)(Pe, 2), + De = Le[0], + Ue = Le[1], + Fe = De, + Oe = (0, wc.Z)(X), + Ne = e.useRef(), + Ge = e.useCallback(function () { + void 0 !== Ne.current && + ((document.body.style.WebkitUserSelect = Ne.current), + (Ne.current = void 0)), + clearTimeout(Be.current); + }, []); + e.useEffect( + function () { + return function () { + clearTimeout(Ie.current), + clearTimeout(ke.current), + clearTimeout(Re.current), + Ge(); + }; + }, + [Ge] + ); + var Ze = function (e) { + clearTimeout(Lc), (Pc = !0), Ue(!0), ee && !Fe && ee(e); + }, + ze = (0, go.Z)(function (e) { + clearTimeout(Lc), + (Lc = setTimeout(function () { + Pc = !1; + }, 800 + q)), + Ue(!1), + $ && Fe && $(e), + clearTimeout(Ie.current), + (Ie.current = setTimeout(function () { + Te.current = !1; + }, ge.transitions.duration.shortest)); + }), + Qe = function (e) { + (Te.current && "touchstart" !== e.type) || + (xe && xe.removeAttribute("title"), + clearTimeout(ke.current), + clearTimeout(Re.current), + Z || (Pc && Q) + ? (ke.current = setTimeout( + function () { + Ze(e); + }, + Pc ? Q : Z + )) + : Ze(e)); + }, + He = function (e) { + clearTimeout(ke.current), + clearTimeout(Re.current), + (Re.current = setTimeout(function () { + ze(e); + }, q)); + }, + Ve = (0, Ao.Z)(), + je = Ve.isFocusVisibleRef, + We = Ve.onBlur, + Xe = Ve.onFocus, + Ye = Ve.ref, + qe = e.useState(!1), + Je = (0, Ot.Z)(qe, 2)[1], + Ke = function (e) { + We(e), !1 === je.current && (Je(!1), He(e)); + }, + $e = function (e) { + xe || Se(e.currentTarget), + Xe(e), + !0 === je.current && (Je(!0), Qe(e)); + }, + et = function (e) { + Te.current = !0; + var t = me.props; + t.onTouchStart && t.onTouchStart(e); + }, + tt = Qe, + nt = He; + e.useEffect( + function () { + if (Fe) + return ( + document.addEventListener("keydown", e), + function () { + document.removeEventListener("keydown", e); + } + ); + function e(e) { + ("Escape" !== e.key && "Esc" !== e.key) || ze(e); + } + }, + [ze, Fe] + ); + var rt = (0, un.Z)(me.ref, Ye, Se, n); + fe || 0 === fe || (Fe = !1); + var it = e.useRef(), + at = {}, + ot = "string" === typeof fe; + R + ? ((at.title = Fe || !ot || D ? null : fe), + (at["aria-describedby"] = Fe ? Oe : null)) + : ((at["aria-label"] = ot ? fe : null), + (at["aria-labelledby"] = Fe && !ot ? Oe : null)); + var st = (0, Nt.Z)( + {}, + at, + ve, + me.props, + { + className: (0, Zt.Z)(ve.className, me.props.className), + onTouchStart: et, + ref: rt, + }, + W + ? { + onMouseMove: function (e) { + var t = me.props; + t.onMouseMove && t.onMouseMove(e), + (Dc = { x: e.clientX, y: e.clientY }), + it.current && it.current.update(); + }, + } + : {} + ); + var lt = {}; + N || + ((st.onTouchStart = function (e) { + et(e), + clearTimeout(Re.current), + clearTimeout(Ie.current), + Ge(), + (Ne.current = document.body.style.WebkitUserSelect), + (document.body.style.WebkitUserSelect = "none"), + (Be.current = setTimeout(function () { + (document.body.style.WebkitUserSelect = Ne.current), Qe(e); + }, V)); + }), + (st.onTouchEnd = function (e) { + me.props.onTouchEnd && me.props.onTouchEnd(e), + Ge(), + clearTimeout(Re.current), + (Re.current = setTimeout(function () { + ze(e); + }, K)); + })), + D || + ((st.onMouseOver = Uc(tt, st.onMouseOver)), + (st.onMouseLeave = Uc(nt, st.onMouseLeave)), + Me || ((lt.onMouseOver = tt), (lt.onMouseLeave = nt))), + P || + ((st.onFocus = Uc($e, st.onFocus)), + (st.onBlur = Uc(Ke, st.onBlur)), + Me || ((lt.onFocus = $e), (lt.onBlur = Ke))); + var ut = e.useMemo( + function () { + var e, + t = [ + { + name: "arrow", + enabled: Boolean(Ce), + options: { element: Ce, padding: 4 }, + }, + ]; + return ( + null != (e = oe.popperOptions) && + e.modifiers && + (t = t.concat(oe.popperOptions.modifiers)), + (0, Nt.Z)({}, oe.popperOptions, { modifiers: t }) + ); + }, + [Ce, oe] + ), + ct = (0, Nt.Z)({}, S, { + isRtl: Ae, + arrow: _, + disableInteractive: Me, + placement: re, + PopperComponentProp: ie, + touch: Te.current, + }), + ft = (function (e) { + var t = e.classes, + n = e.disableInteractive, + r = e.arrow, + i = e.touch, + a = e.placement, + o = { + popper: [ + "popper", + !n && "popperInteractive", + r && "popperArrow", + ], + tooltip: [ + "tooltip", + r && "tooltipArrow", + i && "touch", + "tooltipPlacement".concat((0, ln.Z)(a.split("-")[0])), + ], + arrow: ["arrow"], + }; + return (0, zt.Z)(o, Tc, t); + })(ct), + dt = null != (r = null != (i = ce.popper) ? i : T.Popper) ? r : kc, + ht = + null != + (a = + null != (o = null != (s = ce.transition) ? s : T.Transition) + ? o + : he) + ? a + : Ei, + pt = null != (l = null != (u = ce.tooltip) ? u : T.Tooltip) ? l : Rc, + vt = null != (c = null != (f = ce.arrow) ? f : T.Arrow) ? c : Bc, + mt = Ur( + dt, + (0, Nt.Z)({}, oe, null != (d = le.popper) ? d : I.popper, { + className: (0, Zt.Z)( + ft.popper, + null == oe ? void 0 : oe.className, + null == (h = null != (p = le.popper) ? p : I.popper) + ? void 0 + : h.className + ), + }), + ct + ), + gt = Ur( + ht, + (0, Nt.Z)({}, pe, null != (v = le.transition) ? v : I.transition), + ct + ), + At = Ur( + pt, + (0, Nt.Z)({}, null != (m = le.tooltip) ? m : I.tooltip, { + className: (0, Zt.Z)( + ft.tooltip, + null == (g = null != (A = le.tooltip) ? A : I.tooltip) + ? void 0 + : g.className + ), + }), + ct + ), + yt = Ur( + vt, + (0, Nt.Z)({}, null != (y = le.arrow) ? y : I.arrow, { + className: (0, Zt.Z)( + ft.arrow, + null == (b = null != (x = le.arrow) ? x : I.arrow) + ? void 0 + : b.className + ), + }), + ct + ); + return (0, Ut.jsxs)(e.Fragment, { + children: [ + e.cloneElement(me, st), + (0, Ut.jsx)( + dt, + (0, Nt.Z)( + { + as: null != ie ? ie : Cc, + placement: re, + anchorEl: W + ? { + getBoundingClientRect: function () { + return { + top: Dc.y, + left: Dc.x, + right: Dc.x, + bottom: Dc.y, + width: 0, + height: 0, + }; + }, + } + : xe, + popperRef: it, + open: !!xe && Fe, + id: Oe, + transition: !0, + }, + lt, + mt, + { + popperOptions: ut, + children: function (e) { + var t = e.TransitionProps; + return (0, Ut.jsx)( + ht, + (0, Nt.Z)( + { timeout: ge.transitions.duration.shorter }, + t, + gt, + { + children: (0, Ut.jsxs)( + pt, + (0, Nt.Z)({}, At, { + children: [ + fe, + _ + ? (0, Ut.jsx)( + vt, + (0, Nt.Z)({}, yt, { ref: we }) + ) + : null, + ], + }) + ), + } + ) + ); + }, + } + ) + ), + ], + }); + }), + Oc = Fc, + Nc = n(1981), + Gc = n(9823), + Zc = { color: "black", letterSpacing: 0.2, fontSize: 12, padding: 10 }, + zc = { padding: 10 }, + Qc = function () { + var t = A(function (e) { + return e.products; + }).buyed_products, + n = k(), + r = (0, e.useRef)(null), + i = function (e) { + switch (e) { + case "close": + n(kt()); + break; + case "history": + n(Rt()); + } + }; + (0, e.useEffect)( + function () { + if (r.current) { + var e = 50 * t.length, + n = r.current.offsetHeight; + r.current.style.height = "".concat(n + e, "px"); + } + }, + [t] + ); + var a = t.length > 0, + o = t.reduce(function (e, t) { + return e + t.totalPrice; + }, 0); + return (0, Ut.jsx)(Ut.Fragment, { + children: + a && + (0, Ut.jsx)(ps, { + large: !0, + ref: r, + style: { height: "100%", position: "relative" }, + Children: (0, Ut.jsxs)("div", { + style: { height: "100%", position: "relative" }, + children: [ + (0, Ut.jsxs)("div", { + style: { + display: "flex", + padding: 5, + alignItems: "center", + }, + children: [ + (0, Ut.jsx)("h2", { + style: { + fontSize: 18, + color: "white", + flex: 0.55, + textAlign: "end", + }, + children: "Receipt", + }), + (0, Ut.jsxs)("div", { + style: { + display: "flex", + flex: 0.45, + justifyContent: "flex-end", + }, + children: [ + (0, Ut.jsx)(Xl, { + children: (0, Ut.jsx)(Oc, { + title: "history", + onClick: function () { + return i("history"); + }, + children: (0, Ut.jsx)(Nc.Z, { + style: { fill: "aqua" }, + }), + }), + }), + (0, Ut.jsx)(Xl, { + onClick: function () { + return i("close"); + }, + children: (0, Ut.jsx)(Oc, { + title: "Close", + children: (0, Ut.jsx)(Gc.Z, { + style: { fill: "aqua" }, + }), + }), + }), + ], + }), + ], + }), + (0, Ut.jsx)("div", { + style: { + display: "flex", + alignItems: "flex-end", + justifyContent: "center", + overflowY: "auto", + }, + children: (0, Ut.jsx)("div", { + style: { display: "flex", flexDirection: "column" }, + children: (0, Ut.jsx)("div", { + style: { + maxHeight: "120px", + overflowY: "auto", + marginTop: 20, + }, + children: (0, Ut.jsxs)("table", { + style: { width: "100%", borderCollapse: "collapse" }, + children: [ + (0, Ut.jsx)("thead", { + children: (0, Ut.jsxs)("tr", { + style: { + backgroundColor: "#1CF9FF", + color: "white", + }, + children: [ + (0, Ut.jsx)("th", { + style: Zc, + children: "Product Name", + }), + (0, Ut.jsx)("th", { + style: Zc, + children: "Price", + }), + (0, Ut.jsx)("th", { + style: Zc, + children: "Quantity", + }), + (0, Ut.jsx)("th", { + style: Zc, + children: "Total Amount", + }), + ], + }), + }), + (0, Ut.jsxs)("tbody", { + children: [ + t.length > 0 && + t.map(function (e, t) { + return (0, + Ut.jsxs)("tr", { style: { backgroundColor: t % 2 === 0 ? "#ffffff" : "#f0f0f0" }, children: [(0, Ut.jsx)("td", { style: zc, children: e.name }), (0, Ut.jsxs)("td", { style: zc, children: ["\u20b9", e.price] }), (0, Ut.jsx)("td", { style: zc, children: e.quantity }), (0, Ut.jsxs)("td", { style: zc, children: ["\u20b9", e.totalPrice] })] }, t); + }), + (0, Ut.jsxs)("tr", { + style: { + backgroundColor: "#1CF9FF", + color: "black", + }, + children: [ + (0, Ut.jsx)("td", {}), + (0, Ut.jsx)("td", {}), + (0, Ut.jsx)("td", { + children: "Total Amount", + }), + (0, Ut.jsxs)("td", { + children: ["\u20b9", o], + }), + ], + }), + ], + }), + ], + }), + }), + }), + }), + (0, Ut.jsxs)("p", { + style: { + position: "absolute", + bottom: 0, + left: 0, + right: 0, + color: "white", + backgroundColor: "#1CF9FF40", + padding: 10, + borderRadius: 5, + textAlign: "center", + }, + children: [ + "Thank you for your purchase!", + " ", + (0, Ut.jsx)("span", { + style: { + fontSize: 13, + textDecoration: "underline", + color: "#1CF9FF", + cursor: "pointer", + }, + onClick: function () { + return i("history"); + }, + children: "transaction history", + }), + ], + }), + ], + }), + }), + }); + }, + Hc = { + dots: !0, + infinite: !1, + speed: 500, + slidesToShow: 3, + slidesToScroll: 4, + initialSlide: 0, + responsive: [ + { + breakpoint: 1024, + settings: { + slidesToShow: 3, + slidesToScroll: 3, + infinite: !0, + dots: !0, + }, + }, + { + breakpoint: 600, + settings: { slidesToShow: 3, slidesToScroll: 2, initialSlide: 2 }, + }, + { breakpoint: 480, settings: { slidesToShow: 1, slidesToScroll: 1 } }, + ], + }; + function Vc(e) { + var t, + n, + r = ""; + if ("string" == typeof e || "number" == typeof e) r += e; + else if ("object" == typeof e) + if (Array.isArray(e)) + for (t = 0; t < e.length; t++) + e[t] && (n = Vc(e[t])) && (r && (r += " "), (r += n)); + else for (t in e) e[t] && (r && (r += " "), (r += t)); + return r; + } + var jc = function () { + for (var e, t, n = 0, r = ""; n < arguments.length; ) + (e = arguments[n++]) && (t = Vc(e)) && (r && (r += " "), (r += t)); + return r; + }, + Wc = { data: "" }, + Xc = function (e) { + return "object" == typeof window + ? ( + (e ? e.querySelector("#_goober") : window._goober) || + Object.assign( + (e || document.head).appendChild( + document.createElement("style") + ), + { innerHTML: " ", id: "_goober" } + ) + ).firstChild + : e || Wc; + }, + Yc = /(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g, + qc = /\/\*[^]*?\*\/| +/g, + Jc = /\n+/g, + Kc = function e(t, n) { + var r = "", + i = "", + a = "", + o = function (o) { + var s = t[o]; + "@" == o[0] + ? "i" == o[1] + ? (r = o + " " + s + ";") + : (i += + "f" == o[1] + ? e(s, o) + : o + "{" + e(s, "k" == o[1] ? "" : n) + "}") + : "object" == typeof s + ? (i += e( + s, + n + ? n.replace(/([^,])+/g, function (e) { + return o.replace(/(^:.*)|([^,])+/g, function (t) { + return /&/.test(t) + ? t.replace(/&/g, e) + : e + ? e + " " + t + : t; + }); + }) + : o + )) + : null != s && + ((o = /^--/.test(o) + ? o + : o.replace(/[A-Z]/g, "-$&").toLowerCase()), + (a += e.p ? e.p(o, s) : o + ":" + s + ";")); + }; + for (var s in t) o(s); + return r + (n && a ? n + "{" + a + "}" : a) + i; + }, + $c = {}, + ef = function e(t) { + if ("object" == typeof t) { + var n = ""; + for (var r in t) n += r + e(t[r]); + return n; + } + return t; + }, + tf = function (e, t, n, r, i) { + var a = ef(e), + o = + $c[a] || + ($c[a] = (function (e) { + for (var t = 0, n = 11; t < e.length; ) + n = (101 * n + e.charCodeAt(t++)) >>> 0; + return "go" + n; + })(a)); + if (!$c[o]) { + var s = + a !== e + ? e + : (function (e) { + for (var t, n, r = [{}]; (t = Yc.exec(e.replace(qc, ""))); ) + t[4] + ? r.shift() + : t[3] + ? ((n = t[3].replace(Jc, " ").trim()), + r.unshift((r[0][n] = r[0][n] || {}))) + : (r[0][t[1]] = t[2].replace(Jc, " ").trim()); + return r[0]; + })(e); + $c[o] = Kc( + i ? (0, l.Z)({}, "@keyframes " + o, s) : s, + n ? "" : "." + o + ); + } + var u = n && $c.g ? $c.g : null; + return ( + n && ($c.g = $c[o]), + (function (e, t, n, r) { + r + ? (t.data = t.data.replace(r, e)) + : -1 === t.data.indexOf(e) && + (t.data = n ? e + t.data : t.data + e); + })($c[o], t, r, u), + o + ); + }, + nf = function (e, t, n) { + return e.reduce(function (e, r, i) { + var a = t[i]; + if (a && a.call) { + var o = a(n), + s = (o && o.props && o.props.className) || (/^go/.test(o) && o); + a = s + ? "." + s + : o && "object" == typeof o + ? o.props + ? "" + : Kc(o, "") + : !1 === o + ? "" + : o; + } + return e + r + (null == a ? "" : a); + }, ""); + }; + function rf(e) { + var t = this || {}, + n = e.call ? e(t.p) : e; + return tf( + n.unshift + ? n.raw + ? nf(n, [].slice.call(arguments, 1), t.p) + : n.reduce(function (e, n) { + return Object.assign(e, n && n.call ? n(t.p) : n); + }, {}) + : n, + Xc(t.target), + t.g, + t.o, + t.k + ); + } + rf.bind({ g: 1 }), rf.bind({ k: 1 }); + function af(e, t) { + for (var n = 0; n < t.length; n++) { + var r = t[n]; + (r.enumerable = r.enumerable || !1), + (r.configurable = !0), + "value" in r && (r.writable = !0), + Object.defineProperty(e, r.key, r); + } + } + function of(e, t, n) { + return t && af(e.prototype, t), n && af(e, n), e; + } + function sf() { + return ( + (sf = + Object.assign || + 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; + }), + sf.apply(this, arguments) + ); + } + function lf(e, t) { + (e.prototype = Object.create(t.prototype)), + (e.prototype.constructor = e), + (e.__proto__ = t); + } + function uf(e, t) { + if (null == e) return {}; + var n, + r, + i = {}, + a = Object.keys(e); + for (r = 0; r < a.length; r++) + (n = a[r]), t.indexOf(n) >= 0 || (i[n] = e[n]); + return i; + } + function cf(e) { + if (void 0 === e) + throw new ReferenceError( + "this hasn't been initialised - super() hasn't been called" + ); + return e; + } + var ff = function () { + return ""; + }, + df = e.createContext({ enqueueSnackbar: ff, closeSnackbar: ff }), + hf = "@media (max-width:599.95px)", + pf = "@media (min-width:600px)", + vf = function (e) { + return e.charAt(0).toUpperCase() + e.slice(1); + }, + mf = function (e) { + return "" + vf(e.vertical) + vf(e.horizontal); + }, + gf = function (e) { + return !!e || 0 === e; + }, + Af = "unmounted", + yf = "exited", + bf = "entering", + xf = "entered", + Sf = "exiting", + Ef = (function (e) { + function t(t) { + var n; + n = e.call(this, t) || this; + var r, + i = t.appear; + return ( + (n.appearStatus = null), + t.in + ? i + ? ((r = yf), (n.appearStatus = bf)) + : (r = xf) + : (r = t.unmountOnExit || t.mountOnEnter ? Af : yf), + (n.state = { status: r }), + (n.nextCallback = null), + n + ); + } + lf(t, e), + (t.getDerivedStateFromProps = function (e, t) { + return e.in && t.status === Af ? { status: yf } : null; + }); + var n = t.prototype; + return ( + (n.componentDidMount = function () { + this.updateStatus(!0, this.appearStatus); + }), + (n.componentDidUpdate = function (e) { + var t = null; + if (e !== this.props) { + var n = this.state.status; + this.props.in + ? n !== bf && n !== xf && (t = bf) + : (n !== bf && n !== xf) || (t = Sf); + } + this.updateStatus(!1, t); + }), + (n.componentWillUnmount = function () { + this.cancelNextCallback(); + }), + (n.getTimeouts = function () { + var e = this.props.timeout, + t = e, + n = e; + return ( + null != e && + "number" !== typeof e && + "string" !== typeof e && + ((n = e.exit), (t = e.enter)), + { exit: n, enter: t } + ); + }), + (n.updateStatus = function (e, t) { + void 0 === e && (e = !1), + null !== t + ? (this.cancelNextCallback(), + t === bf ? this.performEnter(e) : this.performExit()) + : this.props.unmountOnExit && + this.state.status === yf && + this.setState({ status: Af }); + }), + (n.performEnter = function (e) { + var t = this, + n = this.props.enter, + r = e, + i = this.getTimeouts(); + e || n + ? (this.props.onEnter && this.props.onEnter(this.node, r), + this.safeSetState({ status: bf }, function () { + t.props.onEntering && t.props.onEntering(t.node, r), + t.onTransitionEnd(i.enter, function () { + t.safeSetState({ status: xf }, function () { + t.props.onEntered && t.props.onEntered(t.node, r); + }); + }); + })) + : this.safeSetState({ status: xf }, function () { + t.props.onEntered && t.props.onEntered(t.node, r); + }); + }), + (n.performExit = function () { + var e = this, + t = this.props.exit, + n = this.getTimeouts(); + t + ? (this.props.onExit && this.props.onExit(this.node), + this.safeSetState({ status: Sf }, function () { + e.props.onExiting && e.props.onExiting(e.node), + e.onTransitionEnd(n.exit, function () { + e.safeSetState({ status: yf }, function () { + e.props.onExited && e.props.onExited(e.node); + }); + }); + })) + : this.safeSetState({ status: yf }, function () { + e.props.onExited && e.props.onExited(e.node); + }); + }), + (n.cancelNextCallback = function () { + null !== this.nextCallback && + this.nextCallback.cancel && + (this.nextCallback.cancel(), (this.nextCallback = null)); + }), + (n.safeSetState = function (e, t) { + (t = this.setNextCallback(t)), this.setState(e, t); + }), + (n.setNextCallback = function (e) { + var t = this, + n = !0; + return ( + (this.nextCallback = function () { + n && ((n = !1), (t.nextCallback = null), e()); + }), + (this.nextCallback.cancel = function () { + n = !1; + }), + this.nextCallback + ); + }), + (n.onTransitionEnd = function (e, t) { + this.setNextCallback(t); + var n = null == e && !this.props.addEndListener; + this.node && !n + ? (this.props.addEndListener && + this.props.addEndListener(this.node, this.nextCallback), + null != e && setTimeout(this.nextCallback, e)) + : setTimeout(this.nextCallback, 0); + }), + (n.render = function () { + var e = this.state.status; + if (e === Af) return null; + var t = this.props; + return (0, t.children)( + e, + uf(t, [ + "children", + "in", + "mountOnEnter", + "unmountOnExit", + "appear", + "enter", + "exit", + "timeout", + "addEndListener", + "onEnter", + "onEntering", + "onEntered", + "onExit", + "onExiting", + "onExited", + "nodeRef", + ]) + ); + }), + of(t, [ + { + key: "node", + get: function () { + var e, + t = + null === (e = this.props.nodeRef) || void 0 === e + ? void 0 + : e.current; + if (!t) + throw new Error( + "notistack - Custom snackbar is not refForwarding" + ); + return t; + }, + }, + ]), + t + ); + })(e.Component); + function _f() {} + function Cf(e, t) { + "function" === typeof e ? e(t) : e && (e.current = t); + } + function wf(t, n) { + return (0, e.useMemo)( + function () { + return null == t && null == n + ? null + : function (e) { + Cf(t, e), Cf(n, e); + }; + }, + [t, n] + ); + } + function Tf(e) { + var t = e.timeout, + n = e.style, + r = void 0 === n ? {} : n, + i = e.mode; + return { + duration: "object" === typeof t ? t[i] || 0 : t, + easing: r.transitionTimingFunction, + delay: r.transitionDelay, + }; + } + Ef.defaultProps = { + in: !1, + mountOnEnter: !1, + unmountOnExit: !1, + appear: !1, + enter: !0, + exit: !0, + onEnter: _f, + onEntering: _f, + onEntered: _f, + onExit: _f, + onExiting: _f, + onExited: _f, + }; + var Mf = "cubic-bezier(0.4, 0, 0.2, 1)", + If = "cubic-bezier(0.0, 0, 0.2, 1)", + kf = "cubic-bezier(0.4, 0, 0.6, 1)", + Rf = function (e) { + e.scrollTop = e.scrollTop; + }, + Bf = function (e) { + return Math.round(e) + "ms"; + }; + function Pf(e, t) { + void 0 === e && (e = ["all"]); + var n = t || {}, + r = n.duration, + i = void 0 === r ? 300 : r, + a = n.easing, + o = void 0 === a ? Mf : a, + s = n.delay, + l = void 0 === s ? 0 : s; + return (Array.isArray(e) ? e : [e]) + .map(function (e) { + var t = "string" === typeof i ? i : Bf(i), + n = "string" === typeof l ? l : Bf(l); + return e + " " + t + " " + o + " " + n; + }) + .join(","); + } + function Lf(e) { + var t = (function (e) { + return (e && e.ownerDocument) || document; + })(e); + return t.defaultView || window; + } + function Df(e, t) { + if (t) { + var n = (function (e, t) { + var n, + r = t.getBoundingClientRect(), + i = Lf(t); + if (t.fakeTransform) n = t.fakeTransform; + else { + var a = i.getComputedStyle(t); + n = + a.getPropertyValue("-webkit-transform") || + a.getPropertyValue("transform"); + } + var o = 0, + s = 0; + if (n && "none" !== n && "string" === typeof n) { + var l = n.split("(")[1].split(")")[0].split(","); + (o = parseInt(l[4], 10)), (s = parseInt(l[5], 10)); + } + switch (e) { + case "left": + return "translateX(" + (i.innerWidth + o - r.left) + "px)"; + case "right": + return "translateX(-" + (r.left + r.width - o) + "px)"; + case "up": + return "translateY(" + (i.innerHeight + s - r.top) + "px)"; + default: + return "translateY(-" + (r.top + r.height - s) + "px)"; + } + })(e, t); + n && ((t.style.webkitTransform = n), (t.style.transform = n)); + } + } + var Uf = (0, e.forwardRef)(function (t, n) { + var r = t.children, + i = t.direction, + a = void 0 === i ? "down" : i, + o = t.in, + s = t.style, + l = t.timeout, + u = void 0 === l ? 0 : l, + c = t.onEnter, + f = t.onEntered, + d = t.onExit, + h = t.onExited, + p = uf(t, [ + "children", + "direction", + "in", + "style", + "timeout", + "onEnter", + "onEntered", + "onExit", + "onExited", + ]), + v = (0, e.useRef)(null), + m = wf(r.ref, v), + g = wf(m, n), + A = (0, e.useCallback)( + function () { + v.current && Df(a, v.current); + }, + [a] + ); + return ( + (0, e.useEffect)( + function () { + if (!o && "down" !== a && "right" !== a) { + var e = (function (e, t) { + var n; + function r() { + for ( + var r = this, + i = arguments.length, + a = new Array(i), + o = 0; + o < i; + o++ + ) + a[o] = arguments[o]; + clearTimeout(n), + (n = setTimeout(function () { + e.apply(r, a); + }, t)); + } + return ( + void 0 === t && (t = 166), + (r.clear = function () { + clearTimeout(n); + }), + r + ); + })(function () { + v.current && Df(a, v.current); + }), + t = Lf(v.current); + return ( + t.addEventListener("resize", e), + function () { + e.clear(), t.removeEventListener("resize", e); + } + ); + } + }, + [a, o] + ), + (0, e.useEffect)( + function () { + o || A(); + }, + [o, A] + ), + (0, e.createElement)( + Ef, + Object.assign( + { + appear: !0, + nodeRef: v, + onEnter: function (e, t) { + Df(a, e), Rf(e), c && c(e, t); + }, + onEntered: f, + onEntering: function (e) { + var t = + (null === s || void 0 === s + ? void 0 + : s.transitionTimingFunction) || If, + n = Tf({ + timeout: u, + mode: "enter", + style: sf({}, s, { transitionTimingFunction: t }), + }); + (e.style.webkitTransition = Pf("-webkit-transform", n)), + (e.style.transition = Pf("transform", n)), + (e.style.webkitTransform = "none"), + (e.style.transform = "none"); + }, + onExit: function (e) { + var t = + (null === s || void 0 === s + ? void 0 + : s.transitionTimingFunction) || kf, + n = Tf({ + timeout: u, + mode: "exit", + style: sf({}, s, { transitionTimingFunction: t }), + }); + (e.style.webkitTransition = Pf("-webkit-transform", n)), + (e.style.transition = Pf("transform", n)), + Df(a, e), + d && d(e); + }, + onExited: function (e) { + (e.style.webkitTransition = ""), + (e.style.transition = ""), + h && h(e); + }, + in: o, + timeout: u, + }, + p + ), + function (t, n) { + return (0, e.cloneElement)( + r, + sf( + { + ref: g, + style: sf( + { visibility: "exited" !== t || o ? void 0 : "hidden" }, + s, + {}, + r.props.style + ), + }, + n + ) + ); + } + ) + ); + }); + Uf.displayName = "Slide"; + var Ff = function (t) { + return e.createElement( + "svg", + Object.assign( + { + viewBox: "0 0 24 24", + focusable: "false", + style: { + fontSize: 20, + marginInlineEnd: 8, + userSelect: "none", + width: "1em", + height: "1em", + display: "inline-block", + fill: "currentColor", + flexShrink: 0, + }, + }, + t + ) + ); + }, + Of = function () { + return e.createElement( + Ff, + null, + e.createElement("path", { + d: "M12 2C6.5 2 2 6.5 2 12S6.5 22 12 22 22 17.5 22 12 17.5 2 12 2M10 17L5 12L6.41\n 10.59L10 14.17L17.59 6.58L19 8L10 17Z", + }) + ); + }, + Nf = function () { + return e.createElement( + Ff, + null, + e.createElement("path", { + d: "M13,14H11V10H13M13,18H11V16H13M1,21H23L12,2L1,21Z", + }) + ); + }, + Gf = function () { + return e.createElement( + Ff, + null, + e.createElement("path", { + d: "M12,2C17.53,2 22,6.47 22,12C22,17.53 17.53,22 12,22C6.47,22 2,17.53 2,12C2,\n 6.47 6.47,2 12,2M15.59,7L12,10.59L8.41,7L7,8.41L10.59,12L7,15.59L8.41,17L12,\n 13.41L15.59,17L17,15.59L13.41,12L17,8.41L15.59,7Z", + }) + ); + }, + Zf = function () { + return e.createElement( + Ff, + null, + e.createElement("path", { + d: "M13,9H11V7H13M13,17H11V11H13M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,\n 0 22,12A10,10 0 0,0 12,2Z", + }) + ); + }, + zf = { + maxSnack: 3, + persist: !1, + hideIconVariant: !1, + disableWindowBlurListener: !1, + variant: "default", + autoHideDuration: 5e3, + iconVariant: { + default: void 0, + success: e.createElement(Of, null), + warning: e.createElement(Nf, null), + error: e.createElement(Gf, null), + info: e.createElement(Zf, null), + }, + anchorOrigin: { vertical: "bottom", horizontal: "left" }, + TransitionComponent: Uf, + transitionDuration: { enter: 225, exit: 195 }, + }, + Qf = function (e, t) { + return function (n, r) { + return ( + void 0 === r && (r = !1), + r + ? sf({}, zf[n], {}, t[n], {}, e[n]) + : "autoHideDuration" === n + ? (function (e, t) { + var n = function (e) { + return "number" === typeof e || null === e; + }; + return n(e) ? e : n(t) ? t : zf.autoHideDuration; + })(e.autoHideDuration, t.autoHideDuration) + : "transitionDuration" === n + ? (function (e, t) { + var n = function (e, t) { + return t.some(function (t) { + return typeof e === t; + }); + }; + return n(e, ["string", "number"]) + ? e + : n(e, ["object"]) + ? sf( + {}, + zf.transitionDuration, + {}, + n(t, ["object"]) && t, + {}, + e + ) + : n(t, ["string", "number"]) + ? t + : n(t, ["object"]) + ? sf({}, zf.transitionDuration, {}, t) + : zf.transitionDuration; + })(e.transitionDuration, t.transitionDuration) + : e[n] || t[n] || zf[n] + ); + }; + }; + function Hf(e) { + return Object.entries(e).reduce(function (e, t) { + var n, + r = t[0], + i = t[1]; + return sf({}, e, (((n = {})[r] = rf(i)), n)); + }, {}); + } + var Vf = "notistack-SnackbarContainer", + jf = "notistack-Snackbar", + Wf = "notistack-CollapseWrapper", + Xf = "notistack-MuiContent", + Yf = function (e) { + return "notistack-MuiContent-" + e; + }, + qf = Hf({ root: { height: 0 }, entered: { height: "auto" } }), + Jf = "0px", + Kf = (0, e.forwardRef)(function (t, n) { + var r = t.children, + i = t.in, + a = t.onExited, + o = (0, e.useRef)(null), + s = (0, e.useRef)(null), + l = wf(n, s), + u = function () { + return o.current ? o.current.clientHeight : 0; + }; + return (0, e.createElement)( + Ef, + { + in: i, + unmountOnExit: !0, + onEnter: function (e) { + e.style.height = Jf; + }, + onEntered: function (e) { + e.style.height = "auto"; + }, + onEntering: function (e) { + var t = u(), + n = Tf({ timeout: 175, mode: "enter" }), + r = n.duration, + i = n.easing; + (e.style.transitionDuration = + "string" === typeof r ? r : r + "ms"), + (e.style.height = t + "px"), + (e.style.transitionTimingFunction = i || ""); + }, + onExit: function (e) { + e.style.height = u() + "px"; + }, + onExited: a, + onExiting: function (e) { + Rf(e); + var t = Tf({ timeout: 175, mode: "exit" }), + n = t.duration, + r = t.easing; + (e.style.transitionDuration = + "string" === typeof n ? n : n + "ms"), + (e.style.height = Jf), + (e.style.transitionTimingFunction = r || ""); + }, + nodeRef: s, + timeout: 175, + }, + function (t, n) { + return (0, e.createElement)( + "div", + Object.assign( + { + ref: l, + className: jc(qf.root, "entered" === t && qf.entered), + style: sf( + { + pointerEvents: "all", + overflow: "hidden", + minHeight: Jf, + transition: Pf("height"), + }, + "entered" === t && { overflow: "visible" }, + {}, + "exited" === t && !i && { visibility: "hidden" } + ), + }, + n + ), + (0, e.createElement)( + "div", + { + ref: o, + className: Wf, + style: { display: "flex", width: "100%" }, + }, + r + ) + ); + } + ); + }); + Kf.displayName = "Collapse"; + var $f = { right: "left", left: "right", bottom: "up", top: "down" }, + ed = function (e) { + return "anchorOrigin" + mf(e); + }, + td = function () {}; + function nd(e, t) { + return e.reduce(function (e, n) { + return null === n || void 0 === n + ? e + : function () { + for ( + var r = arguments.length, i = new Array(r), a = 0; + a < r; + a++ + ) + i[a] = arguments[a]; + var o = [].concat(i); + t && -1 === o.indexOf(t) && o.push(t), + e.apply(this, o), + n.apply(this, o); + }; + }, td); + } + var rd = "undefined" !== typeof window ? e.useLayoutEffect : e.useEffect; + function id(t) { + var n = (0, e.useRef)(t); + return ( + rd(function () { + n.current = t; + }), + (0, e.useCallback)(function () { + return n.current.apply(void 0, arguments); + }, []) + ); + } + var ad, + od = (0, e.forwardRef)(function (t, n) { + var r = t.children, + i = t.className, + a = t.autoHideDuration, + o = t.disableWindowBlurListener, + s = void 0 !== o && o, + l = t.onClose, + u = t.id, + c = t.open, + f = t.SnackbarProps, + d = void 0 === f ? {} : f, + h = (0, e.useRef)(), + p = id(function () { + l && l.apply(void 0, arguments); + }), + v = id(function (e) { + l && + null != e && + (h.current && clearTimeout(h.current), + (h.current = setTimeout(function () { + p(null, "timeout", u); + }, e))); + }); + (0, e.useEffect)( + function () { + return ( + c && v(a), + function () { + h.current && clearTimeout(h.current); + } + ); + }, + [c, a, v] + ); + var m = function () { + h.current && clearTimeout(h.current); + }, + g = (0, e.useCallback)( + function () { + null != a && v(0.5 * a); + }, + [a, v] + ); + return ( + (0, e.useEffect)( + function () { + if (!s && c) + return ( + window.addEventListener("focus", g), + window.addEventListener("blur", m), + function () { + window.removeEventListener("focus", g), + window.removeEventListener("blur", m); + } + ); + }, + [s, g, c] + ), + (0, e.createElement)( + "div", + Object.assign({ ref: n }, d, { + className: jc(jf, i), + onMouseEnter: function (e) { + d.onMouseEnter && d.onMouseEnter(e), m(); + }, + onMouseLeave: function (e) { + d.onMouseLeave && d.onMouseLeave(e), g(); + }, + }), + r + ) + ); + }); + od.displayName = "Snackbar"; + var sd = Hf({ + root: + ((ad = { display: "flex", flexWrap: "wrap", flexGrow: 1 }), + (ad[pf] = { flexGrow: "initial", minWidth: "288px" }), + ad), + }), + ld = (0, e.forwardRef)(function (t, n) { + var r = t.className, + i = uf(t, ["className"]); + return e.createElement( + "div", + Object.assign({ ref: n, className: jc(sd.root, r) }, i) + ); + }); + ld.displayName = "SnackbarContent"; + var ud = Hf({ + root: { + backgroundColor: "#313131", + fontSize: "0.875rem", + lineHeight: 1.43, + letterSpacing: "0.01071em", + color: "#fff", + alignItems: "center", + padding: "6px 16px", + borderRadius: "4px", + boxShadow: + "0px 3px 5px -1px rgba(0,0,0,0.2),0px 6px 10px 0px rgba(0,0,0,0.14),0px 1px 18px 0px rgba(0,0,0,0.12)", + }, + lessPadding: { paddingLeft: "20px" }, + default: { backgroundColor: "#313131" }, + success: { backgroundColor: "#43a047" }, + error: { backgroundColor: "#d32f2f" }, + warning: { backgroundColor: "#ff9800" }, + info: { backgroundColor: "#2196f3" }, + message: { display: "flex", alignItems: "center", padding: "8px 0" }, + action: { + display: "flex", + alignItems: "center", + marginLeft: "auto", + paddingLeft: "16px", + marginRight: "-8px", + }, + }), + cd = "notistack-snackbar", + fd = (0, e.forwardRef)(function (t, n) { + var r = t.id, + i = t.message, + a = t.action, + o = t.iconVariant, + s = t.variant, + l = t.hideIconVariant, + u = t.style, + c = t.className, + f = o[s], + d = a; + return ( + "function" === typeof d && (d = d(r)), + e.createElement( + ld, + { + ref: n, + role: "alert", + "aria-describedby": cd, + style: u, + className: jc( + Xf, + Yf(s), + ud.root, + ud[s], + c, + !l && f && ud.lessPadding + ), + }, + e.createElement( + "div", + { id: cd, className: ud.message }, + l ? null : f, + i + ), + d && e.createElement("div", { className: ud.action }, d) + ) + ); + }); + fd.displayName = "MaterialDesignContent"; + var dd, + hd, + pd, + vd, + md, + gd = (0, e.memo)(fd), + Ad = Hf({ + wrappedRoot: { + width: "100%", + position: "relative", + transform: "translateX(0)", + top: 0, + right: 0, + bottom: 0, + left: 0, + minWidth: "288px", + }, + }), + yd = function (t) { + var n = (0, e.useRef)(), + r = (0, e.useState)(!0), + i = r[0], + a = r[1], + o = nd([t.snack.onClose, t.onClose]), + s = (0, e.useCallback)(function () { + n.current = setTimeout(function () { + a(function (e) { + return !e; + }); + }, 125); + }, []); + (0, e.useEffect)(function () { + return function () { + n.current && clearTimeout(n.current); + }; + }, []); + var l, + u = t.snack, + c = t.classes, + f = t.Component, + d = void 0 === f ? gd : f, + h = (0, e.useMemo)( + function () { + return (function (e) { + void 0 === e && (e = {}); + var t = { + containerRoot: !0, + containerAnchorOriginTopCenter: !0, + containerAnchorOriginBottomCenter: !0, + containerAnchorOriginTopRight: !0, + containerAnchorOriginBottomRight: !0, + containerAnchorOriginTopLeft: !0, + containerAnchorOriginBottomLeft: !0, + }; + return Object.keys(e) + .filter(function (e) { + return !t[e]; + }) + .reduce(function (t, n) { + var r; + return sf({}, t, (((r = {})[n] = e[n]), r)); + }, {}); + })(c); + }, + [c] + ), + p = u.open, + v = u.SnackbarProps, + m = u.TransitionComponent, + g = u.TransitionProps, + A = u.transitionDuration, + y = u.disableWindowBlurListener, + b = u.content, + x = uf(u, [ + "open", + "SnackbarProps", + "TransitionComponent", + "TransitionProps", + "transitionDuration", + "disableWindowBlurListener", + "content", + "entered", + "requestClose", + "onEnter", + "onEntered", + "onExit", + "onExited", + ]), + S = sf( + { + direction: + ((l = x.anchorOrigin), + "center" !== l.horizontal ? $f[l.horizontal] : $f[l.vertical]), + timeout: A, + }, + g + ), + E = b; + "function" === typeof E && (E = E(x.id, x.message)); + var _ = ["onEnter", "onEntered", "onExit", "onExited"].reduce(function ( + e, + n + ) { + var r; + return sf({}, e, (((r = {})[n] = nd([t.snack[n], t[n]], x.id)), r)); + }, + {}); + return e.createElement( + Kf, + { in: i, onExited: _.onExited }, + e.createElement( + od, + { + open: p, + id: x.id, + disableWindowBlurListener: y, + autoHideDuration: x.autoHideDuration, + className: jc(Ad.wrappedRoot, h.root, h[ed(x.anchorOrigin)]), + SnackbarProps: v, + onClose: o, + }, + e.createElement( + m, + Object.assign({}, S, { + appear: !0, + in: p, + onExit: _.onExit, + onExited: s, + onEnter: _.onEnter, + onEntered: nd( + [ + _.onEntered, + function () { + t.snack.requestClose && o(null, "instructed", t.snack.id); + }, + ], + x.id + ), + }), + E || e.createElement(d, Object.assign({}, x)) + ) + ) + ); + }, + bd = { default: 20, dense: 4 }, + xd = { default: 6, dense: 2 }, + Sd = "." + Wf, + Ed = Hf({ + root: + ((dd = { + boxSizing: "border-box", + display: "flex", + maxHeight: "100%", + position: "fixed", + zIndex: 1400, + height: "auto", + width: "auto", + transition: Pf(["top", "right", "bottom", "left", "max-width"], { + duration: 300, + easing: "ease", + }), + pointerEvents: "none", + }), + (dd[Sd] = { + padding: xd.default + "px 0px", + transition: "padding 300ms ease 0ms", + }), + (dd.maxWidth = "calc(100% - " + 2 * bd.default + "px)"), + (dd[hf] = { width: "100%", maxWidth: "calc(100% - 32px)" }), + dd), + rootDense: ((hd = {}), (hd[Sd] = { padding: xd.dense + "px 0px" }), hd), + top: { top: bd.default - xd.default + "px", flexDirection: "column" }, + bottom: { + bottom: bd.default - xd.default + "px", + flexDirection: "column-reverse", + }, + left: + ((pd = { left: bd.default + "px" }), + (pd[pf] = { alignItems: "flex-start" }), + (pd[hf] = { left: "16px" }), + pd), + right: + ((vd = { right: bd.default + "px" }), + (vd[pf] = { alignItems: "flex-end" }), + (vd[hf] = { right: "16px" }), + vd), + center: + ((md = { left: "50%", transform: "translateX(-50%)" }), + (md[pf] = { alignItems: "center" }), + md), + }), + _d = function (t) { + var n = t.classes, + r = void 0 === n ? {} : n, + i = t.anchorOrigin, + a = t.dense, + o = t.children, + s = jc( + Vf, + Ed[i.vertical], + Ed[i.horizontal], + Ed.root, + r.containerRoot, + r["containerAnchorOrigin" + mf(i)], + a && Ed.rootDense + ); + return e.createElement("div", { className: s }, o); + }, + Cd = (0, e.memo)(_d), + wd = function (t) { + return !("string" === typeof t || (0, e.isValidElement)(t)); + }, + Td = (function (t) { + function n(e) { + var n; + return ( + ((n = t.call(this, e) || this).enqueueSnackbar = function (e, t) { + if ((void 0 === t && (t = {}), void 0 === e || null === e)) + throw new Error("enqueueSnackbar called with invalid argument"); + var r = wd(e) ? e : t, + i = wd(e) ? e.message : e, + a = r.key, + o = r.preventDuplicate, + s = uf(r, ["key", "preventDuplicate"]), + l = gf(a), + u = l ? a : new Date().getTime() + Math.random(), + c = Qf(s, n.props), + f = sf({ id: u }, s, { + message: i, + open: !0, + entered: !1, + requestClose: !1, + persist: c("persist"), + action: c("action"), + content: c("content"), + variant: c("variant"), + anchorOrigin: c("anchorOrigin"), + disableWindowBlurListener: c("disableWindowBlurListener"), + autoHideDuration: c("autoHideDuration"), + hideIconVariant: c("hideIconVariant"), + TransitionComponent: c("TransitionComponent"), + transitionDuration: c("transitionDuration"), + TransitionProps: c("TransitionProps", !0), + iconVariant: c("iconVariant", !0), + style: c("style", !0), + SnackbarProps: c("SnackbarProps", !0), + className: jc(n.props.className, s.className), + }); + return ( + f.persist && (f.autoHideDuration = void 0), + n.setState(function (e) { + if ((void 0 === o && n.props.preventDuplicate) || o) { + var t = function (e) { + return l ? e.id === u : e.message === i; + }, + r = e.queue.findIndex(t) > -1, + a = e.snacks.findIndex(t) > -1; + if (r || a) return e; + } + return n.handleDisplaySnack( + sf({}, e, { queue: [].concat(e.queue, [f]) }) + ); + }), + u + ); + }), + (n.handleDisplaySnack = function (e) { + return e.snacks.length >= n.maxSnack + ? n.handleDismissOldest(e) + : n.processQueue(e); + }), + (n.processQueue = function (e) { + var t = e.queue, + n = e.snacks; + return t.length > 0 + ? sf({}, e, { + snacks: [].concat(n, [t[0]]), + queue: t.slice(1, t.length), + }) + : e; + }), + (n.handleDismissOldest = function (e) { + if ( + e.snacks.some(function (e) { + return !e.open || e.requestClose; + }) + ) + return e; + var t = !1, + r = !1; + e.snacks.reduce(function (e, t) { + return e + (t.open && t.persist ? 1 : 0); + }, 0) === n.maxSnack && (r = !0); + var i = e.snacks.map(function (e) { + return t || (e.persist && !r) + ? sf({}, e) + : ((t = !0), + e.entered + ? (e.onClose && e.onClose(null, "maxsnack", e.id), + n.props.onClose && + n.props.onClose(null, "maxsnack", e.id), + sf({}, e, { open: !1 })) + : sf({}, e, { requestClose: !0 })); + }); + return sf({}, e, { snacks: i }); + }), + (n.handleEnteredSnack = function (e, t, r) { + if (!gf(r)) + throw new Error( + "handleEnteredSnack Cannot be called with undefined key" + ); + n.setState(function (e) { + return { + snacks: e.snacks.map(function (e) { + return e.id === r ? sf({}, e, { entered: !0 }) : sf({}, e); + }), + }; + }); + }), + (n.handleCloseSnack = function (e, t, r) { + n.props.onClose && n.props.onClose(e, t, r); + var i = void 0 === r; + n.setState(function (e) { + var t = e.snacks, + n = e.queue; + return { + snacks: t.map(function (e) { + return i || e.id === r + ? e.entered + ? sf({}, e, { open: !1 }) + : sf({}, e, { requestClose: !0 }) + : sf({}, e); + }), + queue: n.filter(function (e) { + return e.id !== r; + }), + }; + }); + }), + (n.closeSnackbar = function (e) { + var t = n.state.snacks.find(function (t) { + return t.id === e; + }); + gf(e) && t && t.onClose && t.onClose(null, "instructed", e), + n.handleCloseSnack(null, "instructed", e); + }), + (n.handleExitedSnack = function (e, t) { + if (!gf(t)) + throw new Error( + "handleExitedSnack Cannot be called with undefined key" + ); + n.setState(function (e) { + var r = n.processQueue( + sf({}, e, { + snacks: e.snacks.filter(function (e) { + return e.id !== t; + }), + }) + ); + return 0 === r.queue.length ? r : n.handleDismissOldest(r); + }); + }), + n.enqueueSnackbar, + n.closeSnackbar, + (n.state = { + snacks: [], + queue: [], + contextValue: { + enqueueSnackbar: n.enqueueSnackbar.bind(cf(n)), + closeSnackbar: n.closeSnackbar.bind(cf(n)), + }, + }), + n + ); + } + return ( + lf(n, t), + (n.prototype.render = function () { + var t = this, + n = this.state.contextValue, + r = this.props, + i = r.domRoot, + o = r.children, + s = r.dense, + l = void 0 !== s && s, + u = r.Components, + c = void 0 === u ? {} : u, + f = r.classes, + d = this.state.snacks.reduce(function (e, t) { + var n, + r = mf(t.anchorOrigin), + i = e[r] || []; + return sf({}, e, (((n = {})[r] = [].concat(i, [t])), n)); + }, {}), + h = Object.keys(d).map(function (n) { + var r = d[n], + i = r[0]; + return e.createElement( + Cd, + { + key: n, + dense: l, + anchorOrigin: i.anchorOrigin, + classes: f, + }, + r.map(function (n) { + return e.createElement(yd, { + key: n.id, + snack: n, + classes: f, + Component: c[n.variant], + onClose: t.handleCloseSnack, + onEnter: t.props.onEnter, + onExit: t.props.onExit, + onExited: nd( + [t.handleExitedSnack, t.props.onExited], + n.id + ), + onEntered: nd( + [t.handleEnteredSnack, t.props.onEntered], + n.id + ), + }); + }) + ); + }); + return e.createElement( + df.Provider, + { value: n }, + o, + i ? (0, a.createPortal)(h, i) : h + ); + }), + of(n, [ + { + key: "maxSnack", + get: function () { + return this.props.maxSnack || zf.maxSnack; + }, + }, + ]), + n + ); + })(e.Component), + Md = n(5717), + Id = function () { + var t = (0, e.useContext)(df).enqueueSnackbar, + n = e.useState({ id: 1, position: [-7, 0, 0] }), + r = (0, Ot.Z)(n, 2), + i = r[0], + a = r[1], + o = i.id, + s = i.position, + l = A(function (e) { + return e.products; + }), + u = l.products, + c = l.blockChainDetails, + f = k(), + d = u + .filter(function (e) { + return !e.removed; + }) + .reverse(); + e.useEffect( + function () { + c.length > 4 + ? a(function (e) { + return (0, + Be.Z)((0, Be.Z)({}, e), {}, { position: [e.position[0] - 6, -4, 0] }); + }) + : 0 === c.length && + a(function (e) { + return (0, + Be.Z)((0, Be.Z)({}, e), {}, { id: 1, position: [-7, 0, 0] }); + }); + }, + [c.length] + ); + return (0, Ut.jsx)(Ut.Fragment, { + children: (0, Ut.jsx)( + Md.Z, + (0, Be.Z)( + (0, Be.Z)({}, Hc), + {}, + { + children: d.map(function (e) { + return (0, Ut.jsx)( + ps, + { + small: !0, + Children: (0, Ut.jsxs)("div", { + style: { padding: 2 }, + children: [ + (0, Ut.jsx)("h5", { + style: { + color: "white", + fontWeight: "400", + letterSpacing: 1, + paddingBlock: 2, + backgroundColor: "#ffffff20", + }, + children: e.name, + }), + (0, Ut.jsxs)("div", { + style: { paddingTop: 8 }, + children: [ + (0, Ut.jsxs)("p", { + style: { + color: "white", + fontWeight: "400", + letterSpacing: 1, + paddingTop: 2, + margin: 0, + }, + children: [ + "Price:", + (0, Ut.jsxs)("span", { + style: { color: "aqua", marginLeft: 2 }, + children: ["\u20b9", e.price], + }), + ], + }), + (0, Ut.jsxs)("p", { + style: { + color: "white", + fontWeight: "400", + letterSpacing: 1, + paddingTop: 2, + }, + children: [ + "Total Price:", + (0, Ut.jsxs)("span", { + style: { color: "aqua", marginLeft: 2 }, + children: ["\u20b9", e.totalPrice], + }), + ], + }), + ], + }), + (0, Ut.jsxs)("div", { + style: { + display: "flex", + flexDirection: "row", + justifyContent: "center", + alignItems: "center", + }, + children: [ + (0, Ut.jsx)("span", { + style: { color: "#ffffff", marginRight: 5 }, + children: "Qty:", + }), + (0, Ut.jsx)("input", { + style: { width: 120 }, + type: "number", + className: "form-control form-control-sm qty", + value: e.quantity, + onChange: function (t) { + return ( + (n = e.id), + (r = parseInt(t.target.value, 10)), + void f(wt({ productId: n, quantity: r })) + ); + var n, r; + }, + }), + ], + }), + (0, Ut.jsx)("div", { + style: { marginTop: 23 }, + children: (0, Ut.jsxs)(ls, { + style: { + width: 200, + height: 30, + backgroundColor: "#22eff180", + padding: 5, + color: "black", + borderWidth: 1, + borderColor: "aqua", + }, + onClick: function () { + return (function (e) { + if ( + (console.log("lenght", c.length), + c.length <= 9) + ) { + a(function (e) { + return (0, + Be.Z)((0, Be.Z)({}, e), {}, { id: o + 1, position: c.length > 4 ? s : [e.position[0] + 6, 0, 0] }); + }); + var n = u.find(function (t) { + return t.id === e; + }), + r = new Date(), + i = "" + .concat(r.getDay(), "/") + .concat(r.getMonth() + 1, "/") + .concat(r.getFullYear(), " ") + .concat(r.getHours(), ":") + .concat(r.getMinutes(), ":") + .concat(r.getSeconds()), + l = (0, Be.Z)( + (0, Be.Z)({}, n), + {}, + { purchasedAt: i } + ), + d = { id: o, data: n, position: s }; + f(Tt(l)), f(Mt(n)), f(It(d)); + } else + t( + "Oops! you reached the limit.Click refresh to continue", + { variant: "warning" } + ); + })(e.id); + }, + children: ["Buy", " "], + }), + }), + ], + }), + }, + e.id + ); + }), + } + ) + ), + }); + }; + function kd(e, t) { + if (null == e) return {}; + var n, + r, + i = (0, Gt.Z)(e, t); + if (Object.getOwnPropertySymbols) { + var a = Object.getOwnPropertySymbols(e); + for (r = 0; r < a.length; r++) + (n = a[r]), + t.indexOf(n) >= 0 || + (Object.prototype.propertyIsEnumerable.call(e, n) && + (i[n] = e[n])); + } + return i; + } + var Rd = n(3878), + Bd = n(9199), + Pd = n(181), + Ld = n(5267); + var Dd = n(136), + Ud = n(9388), + Fd = n(7762), + Od = n(5647), + Nd = n(7760), + Gd = n(4585); + function Zd(e) { + var t, + n = new Set(), + r = function (e, r) { + var i = "function" === typeof e ? e(t) : e; + if (i !== t) { + var a = t; + (t = r ? i : Object.assign({}, t, i)), + n.forEach(function (e) { + return e(t, a); + }); + } + }, + i = function () { + return t; + }, + a = { + setState: r, + getState: i, + subscribe: function (e, r, a) { + return r || a + ? (function (e) { + var r = + arguments.length > 1 && void 0 !== arguments[1] + ? arguments[1] + : i, + a = + arguments.length > 2 && void 0 !== arguments[2] + ? arguments[2] + : Object.is; + console.warn( + "[DEPRECATED] Please use `subscribeWithSelector` middleware" + ); + var o = r(t); + function s() { + var n = r(t); + if (!a(o, n)) { + var i = o; + e((o = n), i); + } + } + return ( + n.add(s), + function () { + return n.delete(s); + } + ); + })(e, r, a) + : (n.add(e), + function () { + return n.delete(e); + }); + }, + destroy: function () { + return n.clear(); + }, + }; + return (t = e(r, i, a)), a; + } + var zd = + "undefined" === typeof window || + !window.navigator || + /ServerSideRendering|^Deno\//.test(window.navigator.userAgent) + ? e.useEffect + : e.useLayoutEffect; + var Qd = n(258), + Hd = n.n(Qd), + Vd = n(5296), + jd = function (e) { + return "object" === typeof e && "function" === typeof e.then; + }, + Wd = []; + function Xd(e, t) { + var n = + arguments.length > 2 && void 0 !== arguments[2] + ? arguments[2] + : function (e, t) { + return e === t; + }; + if (e === t) return !0; + if (!e || !t) return !1; + var r = e.length; + if (t.length !== r) return !1; + for (var i = 0; i < r; i++) if (!n(e[i], t[i])) return !1; + return !0; + } + function Yd(e) { + var 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 (var i = 0, a = Wd; i < a.length; i++) { + var o = a[i]; + if (Xd(t, o.keys, o.equal)) { + if (n) return; + if (Object.prototype.hasOwnProperty.call(o, "error")) throw o.error; + if (Object.prototype.hasOwnProperty.call(o, "response")) + return ( + r.lifespan && + r.lifespan > 0 && + (o.timeout && clearTimeout(o.timeout), + (o.timeout = setTimeout(o.remove, r.lifespan))), + o.response + ); + if (!n) throw o.promise; + } + } + var s = { + keys: t, + equal: r.equal, + remove: function () { + var e = Wd.indexOf(s); + -1 !== e && Wd.splice(e, 1); + }, + promise: (jd(e) ? e : e.apply(void 0, (0, xt.Z)(t))) + .then(function (e) { + (s.response = e), + r.lifespan && + r.lifespan > 0 && + (s.timeout = setTimeout(s.remove, r.lifespan)); + }) + .catch(function (e) { + return (s.error = e); + }), + }; + if ((Wd.push(s), !n)) throw s.promise; + } + var qd, + Jd, + Kd = function (e, t, n) { + return Yd(e, t, !1, n); + }, + $d = ["args", "attach"], + eh = ["args", "children"], + th = ["args", "children"], + nh = ["children", "key", "ref"], + rh = ["children", "key", "ref"], + ih = ["params"], + ah = {}, + oh = function (e) { + Object.assign(ah, e); + }; + var sh = function (e) { + return "colorSpace" in e || "outputColorSpace" in e; + }, + lh = function () { + var e; + return null != (e = ah.ColorManagement) ? e : null; + }, + uh = function (e) { + return e && e.isOrthographicCamera; + }, + ch = + "undefined" !== typeof window && + ((null != (qd = window.document) && qd.createElement) || + "ReactNative" === + (null == (Jd = window.navigator) ? void 0 : Jd.product)) + ? e.useLayoutEffect + : e.useEffect; + function fh(t) { + var n = e.useRef(t); + return ( + ch( + function () { + n.current = t; + }, + [t] + ), + n + ); + } + function dh(e) { + var t = e.set; + return ( + ch( + function () { + return ( + t( + new Promise(function () { + return null; + }) + ), + function () { + return t(!1); + } + ); + }, + [t] + ), + null + ); + } + var hh = (function (e) { + (0, Dd.Z)(n, e); + var t = (0, Ud.Z)(n); + function n() { + var e; + (0, Ti.Z)(this, n); + for (var r = arguments.length, i = new Array(r), a = 0; a < r; a++) + i[a] = arguments[a]; + return ( + ((e = t.call.apply(t, [this].concat(i))).state = { error: !1 }), e + ); + } + return ( + (0, Mi.Z)(n, [ + { + key: "componentDidCatch", + value: function (e) { + this.props.set(e); + }, + }, + { + key: "render", + value: function () { + return this.state.error ? null : this.props.children; + }, + }, + ]), + n + ); + })(e.Component); + hh.getDerivedStateFromError = function () { + return { error: !0 }; + }; + var ph = "__default", + vh = new Map(), + mh = function (e) { + return e && !!e.memoized && !!e.changes; + }; + function gh(e) { + var t, + 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; + } + var Ah = function (e) { + var t; + return null == (t = e.__r3f) ? void 0 : t.root.getState(); + }, + yh = { + obj: function (e) { + return e === Object(e) && !yh.arr(e) && "function" !== typeof e; + }, + fun: function (e) { + return "function" === typeof e; + }, + str: function (e) { + return "string" === typeof e; + }, + num: function (e) { + return "number" === typeof e; + }, + boo: function (e) { + return "boolean" === typeof e; + }, + und: function (e) { + return void 0 === e; + }, + arr: function (e) { + return Array.isArray(e); + }, + equ: function (e, t) { + var n = + arguments.length > 2 && void 0 !== arguments[2] + ? arguments[2] + : {}, + r = n.arrays, + i = void 0 === r ? "shallow" : r, + a = n.objects, + o = void 0 === a ? "reference" : a, + s = n.strict, + l = void 0 === s || s; + if (typeof e !== typeof t || !!e !== !!t) return !1; + if (yh.str(e) || yh.num(e)) return e === t; + var u = yh.obj(e); + if (u && "reference" === o) return e === t; + var c, + f = yh.arr(e); + if (f && "reference" === i) return e === t; + if ((f || u) && e === t) return !0; + for (c in e) if (!(c in t)) return !1; + if (u && "shallow" === i && "shallow" === o) { + for (c in l ? t : e) + if (!yh.equ(e[c], t[c], { strict: l, objects: "reference" })) + return !1; + } else for (c in l ? t : e) if (e[c] !== t[c]) return !1; + if (yh.und(c)) { + if (f && 0 === e.length && 0 === t.length) return !0; + if (u && 0 === Object.keys(e).length && 0 === Object.keys(t).length) + return !0; + if (e !== t) return !1; + } + return !0; + }, + }; + function bh(e) { + var t = { nodes: {}, materials: {} }; + return ( + e && + e.traverse(function (e) { + e.name && (t.nodes[e.name] = e), + e.material && + !t.materials[e.material.name] && + (t.materials[e.material.name] = e.material); + }), + t + ); + } + function xh(e, t) { + return ( + (e.__r3f = (0, Be.Z)( + { + type: "", + root: null, + previousAttach: null, + memoizedProps: {}, + eventCount: 0, + handlers: {}, + objects: [], + parent: null, + }, + t + )), + e + ); + } + function Sh(e, t) { + var n = e; + if (t.includes("-")) { + var r = t.split("-"), + i = r.pop(); + return ( + (n = r.reduce(function (e, t) { + return e[t]; + }, e)), + { target: n, key: i } + ); + } + return { target: n, key: t }; + } + var Eh = /-\d+$/; + function _h(e, t, n) { + if (yh.str(n)) { + if (Eh.test(n)) { + var r = Sh(e, n.replace(Eh, "")), + i = r.target, + a = r.key; + Array.isArray(i[a]) || (i[a] = []); + } + var o = Sh(e, n), + s = o.target, + l = o.key; + (t.__r3f.previousAttach = s[l]), (s[l] = t); + } else t.__r3f.previousAttach = n(e, t); + } + function Ch(e, t, n) { + var r, i; + if (yh.str(n)) { + var a = Sh(e, n), + o = a.target, + s = a.key, + l = t.__r3f.previousAttach; + void 0 === l ? delete o[s] : (o[s] = l); + } else + null == (r = t.__r3f) || + null == r.previousAttach || + r.previousAttach(e, t); + null == (i = t.__r3f) || delete i.previousAttach; + } + function wh(e, t) { + t.children, t.key, t.ref; + var n, + r = kd(t, nh), + i = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : {}, + a = (i.children, i.key, i.ref, kd(i, rh)), + o = arguments.length > 3 && void 0 !== arguments[3] && arguments[3], + s = null != (n = null == e ? void 0 : e.__r3f) ? n : {}, + l = Object.entries(r), + u = []; + if (o) + for (var c = Object.keys(a), f = 0; f < c.length; f++) + r.hasOwnProperty(c[f]) || l.unshift([c[f], ph + "remove"]); + l.forEach(function (t) { + var n, + i = (0, Ot.Z)(t, 2), + o = i[0], + s = i[1]; + if ( + (null == (n = e.__r3f) || !n.primitive || "object" !== o) && + !yh.equ(s, a[o]) + ) { + if (/^on(Pointer|Click|DoubleClick|ContextMenu|Wheel)/.test(o)) + return u.push([o, s, !0, []]); + var l = []; + for (var c in (o.includes("-") && (l = o.split("-")), + u.push([o, s, !1, l]), + r)) { + var f = r[c]; + c.startsWith("".concat(o, "-")) && u.push([c, f, !1, c.split("-")]); + } + } + }); + var d = (0, Be.Z)({}, r); + return ( + s.memoizedProps && + s.memoizedProps.args && + (d.args = s.memoizedProps.args), + s.memoizedProps && + s.memoizedProps.attach && + (d.attach = s.memoizedProps.attach), + { memoized: d, changes: u } + ); + } + function Th(e, t) { + var n, + r, + i, + a, + o = null != (n = e.__r3f) ? n : {}, + s = o.root, + l = + null != (r = null == s || null == s.getState ? void 0 : s.getState()) + ? r + : {}, + u = mh(t) ? t : wh(e, t), + c = u.memoized, + f = u.changes, + d = o.eventCount; + e.__r3f && (e.__r3f.memoizedProps = c); + for (var h = 0; h < f.length; h++) { + var p = (0, Ot.Z)(f[h], 4), + v = p[0], + m = p[1], + g = p[2], + A = p[3]; + if (sh(e)) { + var y = "srgb", + b = "srgb-linear"; + "encoding" === v + ? ((v = "colorSpace"), (m = 3001 === m ? y : b)) + : "outputEncoding" === v && + ((v = "outputColorSpace"), (m = 3001 === m ? y : b)); + } + var x = e, + S = x[v]; + if ( + A.length && + ((S = A.reduce(function (e, t) { + return e[t]; + }, e)), + !S || !S.set) + ) { + var E = A.reverse(), + _ = + ((a = E), + (0, Rd.Z)(a) || (0, Bd.Z)(a) || (0, Pd.Z)(a) || (0, Ld.Z)()), + C = _[0]; + (x = _.slice(1) + .reverse() + .reduce(function (e, t) { + return e[t]; + }, e)), + (v = C); + } + if (m === ph + "remove") + if (x.constructor) { + var w = vh.get(x.constructor); + w || ((w = new x.constructor()), vh.set(x.constructor, w)), + (m = w[v]); + } else m = 0; + if (g) + m ? (o.handlers[v] = m) : delete o.handlers[v], + (o.eventCount = Object.keys(o.handlers).length); + else if (S && S.set && (S.copy || S instanceof Nd.Layers)) { + var T; + if (Array.isArray(m)) + S.fromArray ? S.fromArray(m) : (T = S).set.apply(T, (0, xt.Z)(m)); + else if ( + S.copy && + m && + m.constructor && + S.constructor === m.constructor + ) + S.copy(m); + else if (void 0 !== m) { + var M = S instanceof Nd.Color; + !M && S.setScalar + ? S.setScalar(m) + : S instanceof Nd.Layers && m instanceof Nd.Layers + ? (S.mask = m.mask) + : S.set(m), + lh() || l.linear || !M || S.convertSRGBToLinear(); + } + } else if ( + ((x[v] = m), + x[v] instanceof Nd.Texture && + x[v].format === Nd.RGBAFormat && + x[v].type === Nd.UnsignedByteType) + ) { + var I = x[v]; + sh(I) && sh(l.gl) + ? (I.colorSpace = l.gl.outputColorSpace) + : (I.encoding = l.gl.outputEncoding); + } + Mh(e); + } + if (o.parent && l.internal && e.raycast && d !== o.eventCount) { + var k = l.internal.interaction.indexOf(e); + k > -1 && l.internal.interaction.splice(k, 1), + o.eventCount && l.internal.interaction.push(e); + } + return ( + !(1 === f.length && "onUpdate" === f[0][0]) && + f.length && + null != (i = e.__r3f) && + i.parent && + Ih(e), + e + ); + } + function Mh(e) { + var t, + n, + r = + null == (t = e.__r3f) || null == (n = t.root) || null == n.getState + ? void 0 + : n.getState(); + r && 0 === r.internal.frames && r.invalidate(); + } + function Ih(e) { + null == e.onUpdate || e.onUpdate(e); + } + function kh(e, t) { + e.manual || + (uh(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 Rh(e) { + return (e.eventObject || e.object).uuid + "/" + e.index + e.instanceId; + } + function Bh(e, t, n, r) { + var i = n.get(t); + i && + (n.delete(t), + 0 === n.size && (e.delete(r), i.target.releasePointerCapture(r))); + } + function Ph(e) { + function t(e) { + return e.filter(function (e) { + return ["Move", "Over", "Enter", "Out", "Leave"].some(function (t) { + var n; + return null == (n = e.__r3f) ? void 0 : n.handlers["onPointer" + t]; + }); + }); + } + function n(t) { + var n, + r = e.getState().internal, + i = (0, Fd.Z)(r.hovered.values()); + try { + var a = function () { + var e = n.value; + if ( + !t.length || + !t.find(function (t) { + return ( + t.object === e.object && + t.index === e.index && + t.instanceId === e.instanceId + ); + }) + ) { + var i = e.eventObject.__r3f, + a = null == i ? void 0 : i.handlers; + if ((r.hovered.delete(Rh(e)), null != i && i.eventCount)) { + var o = (0, Be.Z)((0, Be.Z)({}, e), {}, { intersections: t }); + null == a.onPointerOut || a.onPointerOut(o), + null == a.onPointerLeave || a.onPointerLeave(o); + } + } + }; + for (i.s(); !(n = i.n()).done; ) a(); + } catch (o) { + i.e(o); + } finally { + i.f(); + } + } + function r(e, t) { + for (var n = 0; n < t.length; n++) { + var 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 function () { + return n([]); + }; + case "onLostPointerCapture": + return function (t) { + var r = e.getState().internal; + "pointerId" in t && + r.capturedMap.has(t.pointerId) && + requestAnimationFrame(function () { + r.capturedMap.has(t.pointerId) && + (r.capturedMap.delete(t.pointerId), n([])); + }); + }; + } + return function (a) { + var o = e.getState(), + s = o.onPointerMissed, + l = o.internal; + l.lastEvent.current = a; + var u = "onPointerMove" === i, + c = + "onClick" === i || + "onContextMenu" === i || + "onDoubleClick" === i, + f = (function (t, n) { + for ( + var r = e.getState(), + i = new Set(), + a = [], + o = n ? n(r.internal.interaction) : r.internal.interaction, + s = 0; + s < o.length; + s++ + ) { + var l = Ah(o[s]); + l && (l.raycaster.camera = void 0); + } + r.previousRoot || + null == r.events.compute || + r.events.compute(t, r); + var u = o + .flatMap(function (e) { + var n, + r = Ah(e); + return r && r.events.enabled && null !== r.raycaster.camera + ? (void 0 === r.raycaster.camera && + (null == r.events.compute || + r.events.compute( + t, + r, + null == (n = r.previousRoot) + ? void 0 + : n.getState() + ), + void 0 === r.raycaster.camera && + (r.raycaster.camera = null)), + r.raycaster.camera + ? r.raycaster.intersectObject(e, !0) + : []) + : []; + }) + .sort(function (e, t) { + var n = Ah(e.object), + r = Ah(t.object); + return ( + (n && r && r.events.priority - n.events.priority) || + e.distance - t.distance + ); + }) + .filter(function (e) { + var t = Rh(e); + return !i.has(t) && (i.add(t), !0); + }); + r.events.filter && (u = r.events.filter(u, r)); + var c, + f = (0, Fd.Z)(u); + try { + for (f.s(); !(c = f.n()).done; ) + for (var d = c.value, h = d.object; h; ) { + var p; + null != (p = h.__r3f) && + p.eventCount && + a.push( + (0, Be.Z)((0, Be.Z)({}, d), {}, { eventObject: h }) + ), + (h = h.parent); + } + } catch (A) { + f.e(A); + } finally { + f.f(); + } + if ( + "pointerId" in t && + r.internal.capturedMap.has(t.pointerId) + ) { + var v, + m = (0, Fd.Z)( + r.internal.capturedMap.get(t.pointerId).values() + ); + try { + for (m.s(); !(v = m.n()).done; ) { + var g = v.value; + i.has(Rh(g.intersection)) || a.push(g.intersection); + } + } catch (A) { + m.e(A); + } finally { + m.f(); + } + } + return a; + })(a, u ? t : void 0), + d = c + ? (function (t) { + var n = e.getState().internal, + r = t.offsetX - n.initialClick[0], + i = t.offsetY - n.initialClick[1]; + return Math.round(Math.sqrt(r * r + i * i)); + })(a) + : 0; + "onPointerDown" === i && + ((l.initialClick = [a.offsetX, a.offsetY]), + (l.initialHits = f.map(function (e) { + return e.eventObject; + }))), + c && !f.length && d <= 2 && (r(a, l.interaction), s && s(a)), + u && n(f), + (function (t, r, i, a) { + var o = e.getState(); + if (t.length) { + var s, + l = { stopped: !1 }, + u = (0, Fd.Z)(t); + try { + var c = function () { + var e = s.value, + u = Ah(e.object) || o, + c = u.raycaster, + f = u.pointer, + d = u.camera, + h = u.internal, + p = new Nd.Vector3(f.x, f.y, 0).unproject(d), + v = function (t) { + var n, r; + return ( + null != + (n = + null == (r = h.capturedMap.get(t)) + ? void 0 + : r.has(e.eventObject)) && n + ); + }, + m = function (t) { + var n = { intersection: e, target: r.target }; + h.capturedMap.has(t) + ? h.capturedMap.get(t).set(e.eventObject, n) + : h.capturedMap.set( + t, + new Map([[e.eventObject, n]]) + ), + r.target.setPointerCapture(t); + }, + g = function (t) { + var n = h.capturedMap.get(t); + n && Bh(h.capturedMap, e.eventObject, n, t); + }, + A = {}; + for (var y in r) { + var b = r[y]; + "function" !== typeof b && (A[y] = b); + } + var x = (0, Be.Z)( + (0, Be.Z)((0, Be.Z)({}, e), A), + {}, + { + pointer: f, + intersections: t, + stopped: l.stopped, + delta: i, + unprojectedPoint: p, + ray: c.ray, + camera: d, + stopPropagation: function () { + var i = + "pointerId" in r && + h.capturedMap.get(r.pointerId); + if ( + (!i || i.has(e.eventObject)) && + ((x.stopped = l.stopped = !0), + h.hovered.size && + Array.from(h.hovered.values()).find(function ( + t + ) { + return t.eventObject === e.eventObject; + })) + ) { + var a = t.slice(0, t.indexOf(e)); + n([].concat((0, xt.Z)(a), [e])); + } + }, + target: { + hasPointerCapture: v, + setPointerCapture: m, + releasePointerCapture: g, + }, + currentTarget: { + hasPointerCapture: v, + setPointerCapture: m, + releasePointerCapture: g, + }, + nativeEvent: r, + } + ); + if ((a(x), !0 === l.stopped)) return 1; + }; + for (u.s(); !(s = u.n()).done && !c(); ); + } catch (f) { + u.e(f); + } finally { + u.f(); + } + } + })(f, a, d, function (e) { + var t = e.eventObject, + n = t.__r3f, + o = null == n ? void 0 : n.handlers; + if (null != n && n.eventCount) + if (u) { + if ( + o.onPointerOver || + o.onPointerEnter || + o.onPointerOut || + o.onPointerLeave + ) { + var s = Rh(e), + f = l.hovered.get(s); + f + ? f.stopped && e.stopPropagation() + : (l.hovered.set(s, e), + null == o.onPointerOver || o.onPointerOver(e), + null == o.onPointerEnter || o.onPointerEnter(e)); + } + null == o.onPointerMove || o.onPointerMove(e); + } else { + var d = o[i]; + d + ? (c && !l.initialHits.includes(t)) || + (r( + a, + l.interaction.filter(function (e) { + return !l.initialHits.includes(e); + }) + ), + d(e)) + : c && + l.initialHits.includes(t) && + r( + a, + l.interaction.filter(function (e) { + return !l.initialHits.includes(e); + }) + ); + } + }); + }; + }, + }; + } + var Lh, + Dh = function (e) { + return !(null == e || !e.render); + }, + Uh = e.createContext(null), + Fh = function (t, n) { + var r = (function (t) { + var n = "function" === typeof t ? Zd(t) : t, + r = function () { + var t, + r = + arguments.length > 0 && void 0 !== arguments[0] + ? arguments[0] + : n.getState, + i = + arguments.length > 1 && void 0 !== arguments[1] + ? arguments[1] + : Object.is, + a = (0, e.useReducer)(function (e) { + return e + 1; + }, 0), + o = (0, Ot.Z)(a, 2)[1], + s = n.getState(), + l = (0, e.useRef)(s), + u = (0, e.useRef)(r), + c = (0, e.useRef)(i), + f = (0, e.useRef)(!1), + d = (0, e.useRef)(); + void 0 === d.current && (d.current = r(s)); + var h = !1; + (l.current !== s || + u.current !== r || + c.current !== i || + f.current) && + ((t = r(s)), (h = !i(d.current, t))), + zd(function () { + h && (d.current = t), + (l.current = s), + (u.current = r), + (c.current = i), + (f.current = !1); + }); + var p = (0, e.useRef)(s); + zd(function () { + var e = function () { + try { + var e = n.getState(), + t = u.current(e); + c.current(d.current, t) || + ((l.current = e), (d.current = t), o()); + } catch (r) { + (f.current = !0), o(); + } + }, + t = n.subscribe(e); + return n.getState() !== p.current && e(), t; + }, []); + var v = h ? t : d.current; + return (0, e.useDebugValue)(v), v; + }; + return ( + Object.assign(r, n), + (r[Symbol.iterator] = function () { + console.warn( + "[useStore, api] = create() is deprecated and will be removed in v4" + ); + var e = [r, n]; + return { + next: function () { + var t = e.length <= 0; + return { value: e.shift(), done: t }; + }, + }; + }), + r + ); + })(function (r, i) { + var a = new Nd.Vector3(), + o = new Nd.Vector3(), + s = new Nd.Vector3(); + function l() { + var e = + arguments.length > 0 && void 0 !== arguments[0] + ? arguments[0] + : i().camera, + t = + arguments.length > 1 && void 0 !== arguments[1] + ? arguments[1] + : o, + n = + arguments.length > 2 && void 0 !== arguments[2] + ? arguments[2] + : i().size, + r = n.width, + l = n.height, + u = n.top, + c = n.left, + f = r / l; + t instanceof Nd.Vector3 + ? s.copy(t) + : s.set.apply(s, (0, xt.Z)(t)); + var d = e.getWorldPosition(a).distanceTo(s); + if (uh(e)) + return { + width: r / e.zoom, + height: l / e.zoom, + top: u, + left: c, + factor: 1, + distance: d, + aspect: f, + }; + var h = (e.fov * Math.PI) / 180, + p = 2 * Math.tan(h / 2) * d, + v = p * (r / l); + return { + width: v, + height: p, + top: u, + left: c, + factor: r / v, + distance: d, + aspect: f, + }; + } + var u = void 0, + c = function (e) { + return r(function (t) { + return { + performance: (0, Be.Z)( + (0, Be.Z)({}, t.performance), + {}, + { current: e } + ), + }; + }); + }, + f = new Nd.Vector2(), + d = { + set: r, + get: i, + gl: null, + camera: null, + raycaster: null, + events: { priority: 1, enabled: !0, connected: !1 }, + xr: null, + scene: null, + invalidate: function () { + var e = + arguments.length > 0 && void 0 !== arguments[0] + ? arguments[0] + : 1; + return t(i(), e); + }, + advance: function (e, t) { + return n(e, t, i()); + }, + legacy: !1, + linear: !1, + flat: !1, + controls: null, + clock: new Nd.Clock(), + pointer: f, + mouse: f, + frameloop: "always", + onPointerMissed: void 0, + performance: { + current: 1, + min: 0.5, + max: 1, + debounce: 200, + regress: function () { + var e = i(); + u && clearTimeout(u), + e.performance.current !== e.performance.min && + c(e.performance.min), + (u = setTimeout(function () { + return c(i().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: function (e) { + return r(function (t) { + return (0, + Be.Z)((0, Be.Z)({}, t), {}, { events: (0, Be.Z)((0, Be.Z)({}, t.events), e) }); + }); + }, + setSize: function (e, t, n, a, s) { + var u = i().camera, + c = { + width: e, + height: t, + top: a || 0, + left: s || 0, + updateStyle: n, + }; + r(function (e) { + return { + size: c, + viewport: (0, Be.Z)( + (0, Be.Z)({}, e.viewport), + l(u, o, c) + ), + }; + }); + }, + setDpr: function (e) { + return r(function (t) { + var n = gh(e); + return { + viewport: (0, Be.Z)( + (0, Be.Z)({}, t.viewport), + {}, + { dpr: n, initialDpr: t.viewport.initialDpr || n } + ), + }; + }); + }, + setFrameloop: function () { + var e = + arguments.length > 0 && void 0 !== arguments[0] + ? arguments[0] + : "always", + t = i().clock; + t.stop(), + (t.elapsedTime = 0), + "never" !== e && (t.start(), (t.elapsedTime = 0)), + r(function () { + return { frameloop: e }; + }); + }, + previousRoot: void 0, + internal: { + active: !1, + priority: 0, + frames: 0, + lastEvent: e.createRef(), + interaction: [], + hovered: new Map(), + subscribers: [], + initialClick: [0, 0], + initialHits: [], + capturedMap: new Map(), + subscribe: function (e, t, n) { + var r = i().internal; + return ( + (r.priority = r.priority + (t > 0 ? 1 : 0)), + r.subscribers.push({ ref: e, priority: t, store: n }), + (r.subscribers = r.subscribers.sort(function (e, t) { + return e.priority - t.priority; + })), + function () { + var n = i().internal; + null != n && + n.subscribers && + ((n.priority = n.priority - (t > 0 ? 1 : 0)), + (n.subscribers = n.subscribers.filter(function (t) { + return t.ref !== e; + }))); + } + ); + }, + }, + }; + return d; + }), + i = r.getState(), + a = i.size, + o = i.viewport.dpr, + s = i.camera; + return ( + r.subscribe(function () { + var e = r.getState(), + t = e.camera, + n = e.size, + i = e.viewport, + l = e.gl, + u = e.set; + if (n !== a || i.dpr !== o) { + var c; + (a = n), (o = i.dpr), kh(t, n), l.setPixelRatio(i.dpr); + var f = + null != (c = n.updateStyle) + ? c + : "undefined" !== typeof HTMLCanvasElement && + l.domElement instanceof HTMLCanvasElement; + l.setSize(n.width, n.height, f); + } + t !== s && + ((s = t), + u(function (e) { + return { + viewport: (0, Be.Z)( + (0, Be.Z)({}, e.viewport), + e.viewport.getCurrentViewport(t) + ), + }; + })); + }), + r.subscribe(function (e) { + return t(e); + }), + r + ); + }; + function Oh(e, t) { + var n = { callback: e }; + return ( + t.add(n), + function () { + t.delete(n); + } + ); + } + var Nh, + Gh, + Zh = new Set(), + zh = new Set(), + Qh = new Set(); + function Hh(e, t) { + if (e.size) { + var n, + r = (0, Fd.Z)(e.values()); + try { + for (r.s(); !(n = r.n()).done; ) { + (0, n.value.callback)(t); + } + } catch (i) { + r.e(i); + } finally { + r.f(); + } + } + } + function Vh(e, t) { + switch (e) { + case "before": + return Hh(Zh, t); + case "after": + return Hh(zh, t); + case "tail": + return Hh(Qh, t); + } + } + function jh(e, t, n) { + var 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)), + Nh = t.internal.subscribers, + Lh = 0; + Lh < Nh.length; + Lh++ + ) + (Gh = Nh[Lh]).ref.current(Gh.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 Wh() { + var t = e.useContext(Uh); + if (!t) + throw new Error( + "R3F: Hooks can only be used within the Canvas component!" + ); + return t; + } + function Xh() { + var e = + arguments.length > 0 && void 0 !== arguments[0] + ? arguments[0] + : function (e) { + return e; + }, + t = arguments.length > 1 ? arguments[1] : void 0; + return Wh()(e, t); + } + function Yh(e) { + var t = + arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 0, + n = Wh(), + r = n.getState().internal.subscribe, + i = fh(e); + return ( + ch( + function () { + return r(i, t, n); + }, + [t, r, n] + ), + null + ); + } + var qh = new WeakMap(); + function Jh(e, t) { + return function (n) { + var r = qh.get(n); + r || ((r = new n()), qh.set(n, r)), e && e(r); + for ( + var i = arguments.length, a = new Array(i > 1 ? i - 1 : 0), o = 1; + o < i; + o++ + ) + a[o - 1] = arguments[o]; + return Promise.all( + a.map(function (e) { + return new Promise(function (n, i) { + return r.load( + e, + function (e) { + e.scene && Object.assign(e, bh(e.scene)), n(e); + }, + t, + function (t) { + return i( + new Error( + "Could not load " + .concat(e, ": ") + .concat(null == t ? void 0 : t.message) + ) + ); + } + ); + }); + }) + ).finally(function () { + return null == r.dispose ? void 0 : r.dispose(); + }); + }; + } + function Kh(e, t, n, r) { + var i = Array.isArray(t) ? t : [t], + a = Kd(Jh(n, r), [e].concat((0, xt.Z)(i)), { equal: yh.equ }); + return Array.isArray(t) ? a : a[0]; + } + (Kh.preload = function (e, t, n) { + var r = Array.isArray(t) ? t : [t]; + return (function (e, t, n) { + Yd(e, t, !0, n); + })(Jh(n), [e].concat((0, xt.Z)(r))); + }), + (Kh.clear = function (e, t) { + var n = Array.isArray(t) ? t : [t]; + return (function (e) { + if (void 0 === e || 0 === e.length) Wd.splice(0, Wd.length); + else { + var t = Wd.find(function (t) { + return Xd(e, t.keys, t.equal); + }); + t && t.remove(); + } + })([e].concat((0, xt.Z)(n))); + }); + var $h = new Map(), + ep = (function (e) { + var t, + n, + r, + i = !1; + function a(o) { + (n = requestAnimationFrame(a)), (i = !0), (t = 0), Vh("before", o); + var s, + l = (0, Fd.Z)(e.values()); + try { + for (l.s(); !(s = l.n()).done; ) { + var u, + c = s.value; + !(r = c.store.getState()).internal.active || + !("always" === r.frameloop || r.internal.frames > 0) || + (null != (u = r.gl.xr) && u.isPresenting) || + (t += jh(o, r)); + } + } catch (f) { + l.e(f); + } finally { + l.f(); + } + if ((Vh("after", o), 0 === t)) + return Vh("tail", o), (i = !1), cancelAnimationFrame(n); + } + return { + loop: a, + invalidate: function t(n) { + var r, + o = + arguments.length > 1 && void 0 !== arguments[1] + ? arguments[1] + : 1; + if (!n) + return e.forEach(function (e) { + return t(e.store.getState()); + }, o); + (null != (r = n.gl.xr) && r.isPresenting) || + !n.internal.active || + "never" === n.frameloop || + ((n.internal.frames = Math.min(60, n.internal.frames + o)), + i || ((i = !0), requestAnimationFrame(a))); + }, + advance: function (t) { + var 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 && Vh("before", t), r)) jh(t, r, i); + else { + var a, + o = (0, Fd.Z)(e.values()); + try { + for (o.s(); !(a = o.n()).done; ) { + jh(t, a.value.store.getState()); + } + } catch (s) { + o.e(s); + } finally { + o.f(); + } + } + n && Vh("after", t); + }, + }; + })($h), + tp = ep.invalidate, + np = ep.advance, + rp = (function (e, t) { + function n(e, t, n) { + var r, + i = t.args, + a = void 0 === i ? [] : i, + o = t.attach, + s = kd(t, $d), + l = "".concat(e[0].toUpperCase()).concat(e.slice(1)); + if ("primitive" === e) { + if (void 0 === s.object) + throw new Error("R3F: Primitives without 'object' are invalid!"); + r = xh(s.object, { type: e, root: n, attach: o, primitive: !0 }); + } else { + var u = ah[l]; + if (!u) + throw new Error( + "R3F: ".concat( + l, + " 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(a)) + throw new Error("R3F: The args prop must be an array!"); + r = xh((0, Od.Z)(u, (0, xt.Z)(a)), { + type: e, + root: n, + attach: o, + memoizedProps: { args: a }, + }); + } + return ( + void 0 === r.__r3f.attach && + (r instanceof Nd.BufferGeometry + ? (r.__r3f.attach = "geometry") + : r instanceof Nd.Material && (r.__r3f.attach = "material")), + "inject" !== l && Th(r, s), + r + ); + } + function r(e, t) { + var n, + r, + i = !1; + t && + (null != (n = t.__r3f) && n.attach + ? _h(e, t, t.__r3f.attach) + : t.isObject3D && e.isObject3D && (e.add(t), (i = !0)), + i || null == (r = e.__r3f) || r.objects.push(t), + t.__r3f || xh(t, {}), + (t.__r3f.parent = e), + Ih(t), + Mh(t)); + } + function i(e, t, n) { + var r = !1; + if (t) { + var i, a; + if (null != (i = t.__r3f) && i.attach) _h(e, t, t.__r3f.attach); + else if (t.isObject3D && e.isObject3D) { + (t.parent = e), t.dispatchEvent({ type: "added" }); + var o = e.children.filter(function (e) { + return e !== t; + }), + s = o.indexOf(n); + (e.children = [].concat( + (0, xt.Z)(o.slice(0, s)), + [t], + (0, xt.Z)(o.slice(s)) + )), + (r = !0); + } + r || null == (a = e.__r3f) || a.objects.push(t), + t.__r3f || xh(t, {}), + (t.__r3f.parent = e), + Ih(t), + Mh(t); + } + } + function a(e, t) { + var n = + arguments.length > 2 && void 0 !== arguments[2] && arguments[2]; + e && + (0, xt.Z)(e).forEach(function (e) { + return o(t, e, n); + }); + } + function o(e, t, n) { + if (t) { + var r, i, o; + if ( + (t.__r3f && (t.__r3f.parent = null), + null != (r = e.__r3f) && + r.objects && + (e.__r3f.objects = e.__r3f.objects.filter(function (e) { + return e !== t; + })), + null != (i = t.__r3f) && i.attach) + ) + Ch(e, t, t.__r3f.attach); + else if (t.isObject3D && e.isObject3D) { + var s; + e.remove(t), + null != (s = t.__r3f) && + s.root && + (function (e, t) { + var n = e.getState(), + r = n.internal; + (r.interaction = r.interaction.filter(function (e) { + return e !== t; + })), + (r.initialHits = r.initialHits.filter(function (e) { + return e !== t; + })), + r.hovered.forEach(function (e, n) { + (e.eventObject !== t && e.object !== t) || + r.hovered.delete(n); + }), + r.capturedMap.forEach(function (e, n) { + Bh(r.capturedMap, t, e, n); + }); + })(t.__r3f.root, t); + } + var l, + u = null == (o = t.__r3f) ? void 0 : o.primitive, + c = void 0 === n ? null !== t.dispose && !u : n; + if (!u) + a(null == (l = t.__r3f) ? void 0 : l.objects, t, c), + a(t.children, t, c); + delete t.__r3f, + c && + t.dispose && + "Scene" !== t.type && + (0, Vd.unstable_scheduleCallback)( + Vd.unstable_IdlePriority, + function () { + try { + t.dispose(); + } catch (e) {} + } + ), + Mh(e); + } + } + var s = function () { + return console.warn( + "Text is not allowed in the R3F tree! This could be stray whitespace or characters." + ); + }; + return { + reconciler: Hd()({ + createInstance: n, + removeChild: o, + appendChild: r, + appendInitialChild: r, + insertBefore: i, + supportsMutation: !0, + isPrimaryRenderer: !1, + supportsPersistence: !1, + supportsHydration: !1, + noTimeout: -1, + appendChildToContainer: function (e, t) { + if (t) { + var n = e.getState().scene; + n.__r3f && ((n.__r3f.root = e), r(n, t)); + } + }, + removeChildFromContainer: function (e, t) { + t && o(e.getState().scene, t); + }, + insertInContainerBefore: function (e, t, n) { + if (t && n) { + var r = e.getState().scene; + r.__r3f && i(r, t, n); + } + }, + getRootHostContext: function () { + return null; + }, + getChildHostContext: function (e) { + return e; + }, + finalizeInitialChildren: function (e) { + var t, + n = null != (t = null == e ? void 0 : e.__r3f) ? t : {}; + return Boolean(n.handlers); + }, + prepareUpdate: function (e, t, n, r) { + var i; + if ( + (null != (i = null == e ? void 0 : e.__r3f) ? i : {}) + .primitive && + r.object && + r.object !== e + ) + return [!0]; + var a = r.args, + o = void 0 === a ? [] : a, + s = (r.children, kd(r, eh)), + l = n.args, + u = void 0 === l ? [] : l, + c = (n.children, kd(n, th)); + if (!Array.isArray(o)) + throw new Error("R3F: the args prop must be an array!"); + if ( + o.some(function (e, t) { + return e !== u[t]; + }) + ) + return [!0]; + var f = wh(e, s, c, !0); + return f.changes.length ? [!1, f] : null; + }, + commitUpdate: function (e, t, i, a, s, l) { + var u = (0, Ot.Z)(t, 2), + c = u[0], + f = u[1]; + c + ? (function (e, t, i, a) { + var s, + l = null == (s = e.__r3f) ? void 0 : s.parent; + if (l) { + var u = n(t, i, e.__r3f.root); + if (e.children) { + var c, + f = (0, Fd.Z)(e.children); + try { + for (f.s(); !(c = f.n()).done; ) { + var d = c.value; + d.__r3f && r(u, d); + } + } catch (h) { + f.e(h); + } finally { + f.f(); + } + e.children = e.children.filter(function (e) { + return !e.__r3f; + }); + } + e.__r3f.objects.forEach(function (e) { + return r(u, e); + }), + (e.__r3f.objects = []), + e.__r3f.autoRemovedBeforeAppend || o(l, e), + u.parent && (u.__r3f.autoRemovedBeforeAppend = !0), + r(l, u), + u.raycast && + u.__r3f.eventCount && + u.__r3f.root.getState().internal.interaction.push(u), + [a, a.alternate].forEach(function (e) { + null !== e && + ((e.stateNode = u), + e.ref && + ("function" === typeof e.ref + ? e.ref(u) + : (e.ref.current = u))); + }); + } + })(e, i, s, l) + : Th(e, f); + }, + commitMount: function (e, t, n, r) { + var i, + a = null != (i = e.__r3f) ? i : {}; + e.raycast && + a.handlers && + a.eventCount && + e.__r3f.root.getState().internal.interaction.push(e); + }, + getPublicInstance: function (e) { + return e; + }, + prepareForCommit: function () { + return null; + }, + preparePortalMount: function (e) { + return xh(e.getState().scene); + }, + resetAfterCommit: function () {}, + shouldSetTextContent: function () { + return !1; + }, + clearContainer: function () { + return !1; + }, + hideInstance: function (e) { + var t, + n = null != (t = e.__r3f) ? t : {}, + r = n.attach, + i = n.parent; + r && i && Ch(i, e, r), e.isObject3D && (e.visible = !1), Mh(e); + }, + unhideInstance: function (e, t) { + var n, + r = null != (n = e.__r3f) ? n : {}, + i = r.attach, + a = r.parent; + i && a && _h(a, e, i), + ((e.isObject3D && null == t.visible) || t.visible) && + (e.visible = !0), + Mh(e); + }, + createTextInstance: s, + hideTextInstance: s, + unhideTextInstance: s, + getCurrentEventPriority: function () { + return t ? t() : Gd.DefaultEventPriority; + }, + beforeActiveInstanceBlur: function () {}, + afterActiveInstanceBlur: function () {}, + detachDeletedInstance: function () {}, + now: + "undefined" !== typeof performance && yh.fun(performance.now) + ? performance.now + : yh.fun(Date.now) + ? Date.now + : function () { + return 0; + }, + scheduleTimeout: yh.fun(setTimeout) ? setTimeout : void 0, + cancelTimeout: yh.fun(clearTimeout) ? clearTimeout : void 0, + }), + applyProps: Th, + }; + })(0, function () { + var e, + t = + ("undefined" !== typeof self && self) || + ("undefined" !== typeof window && window); + if (!t) return Gd.DefaultEventPriority; + switch (null == (e = t.event) ? void 0 : e.type) { + case "click": + case "contextmenu": + case "dblclick": + case "pointercancel": + case "pointerdown": + case "pointerup": + return Gd.DiscreteEventPriority; + case "pointermove": + case "pointerout": + case "pointerover": + case "pointerenter": + case "pointerleave": + case "wheel": + return Gd.ContinuousEventPriority; + default: + return Gd.DefaultEventPriority; + } + }), + ip = rp.reconciler, + ap = rp.applyProps, + op = { objects: "shallow", strict: !1 }, + sp = function (e, t) { + var n = "function" === typeof e ? e(t) : e; + return Dh(n) + ? n + : new Nd.WebGLRenderer( + (0, Be.Z)( + { + powerPreference: "high-performance", + canvas: t, + antialias: !0, + alpha: !0, + }, + e + ) + ); + }; + function lp(t) { + var n = $h.get(t), + r = null == n ? void 0 : n.fiber, + i = null == n ? void 0 : n.store; + n && console.warn("R3F.createRoot should only be called once!"); + var a, + o = "function" === typeof reportError ? reportError : console.error, + s = i || Fh(tp, np), + l = + r || + ip.createContainer(s, Gd.ConcurrentRoot, null, !1, null, "", o, null); + n || $h.set(t, { fiber: l, store: s }); + var u, + c = !1; + return { + configure: function () { + var e = + arguments.length > 0 && void 0 !== arguments[0] + ? arguments[0] + : {}, + n = e.gl, + r = e.size, + i = e.scene, + o = e.events, + l = e.onCreated, + f = e.shadows, + d = void 0 !== f && f, + h = e.linear, + p = void 0 !== h && h, + v = e.flat, + m = void 0 !== v && v, + g = e.legacy, + A = void 0 !== g && g, + y = e.orthographic, + b = void 0 !== y && y, + x = e.frameloop, + S = void 0 === x ? "always" : x, + E = e.dpr, + _ = void 0 === E ? [1, 2] : E, + C = e.performance, + w = e.raycaster, + T = e.camera, + M = e.onPointerMissed, + I = s.getState(), + k = I.gl; + I.gl || I.set({ gl: (k = sp(n, t)) }); + var R = I.raycaster; + R || I.set({ raycaster: (R = new Nd.Raycaster()) }); + var B, + P = w || {}, + L = P.params, + D = kd(P, ih); + if ( + (yh.equ(D, R, op) || ap(R, (0, Be.Z)({}, D)), + yh.equ(L, R.params, op) || + ap(R, { params: (0, Be.Z)((0, Be.Z)({}, R.params), L) }), + !I.camera || (I.camera === u && !yh.equ(u, T, op))) + ) { + u = T; + var U = T instanceof Nd.Camera, + F = U + ? T + : b + ? new Nd.OrthographicCamera(0, 0, 0, 0, 0.1, 1e3) + : new Nd.PerspectiveCamera(75, 0, 0.1, 1e3); + U || + ((F.position.z = 5), + T && ap(F, T), + I.camera || (null != T && T.rotation) || F.lookAt(0, 0, 0)), + I.set({ camera: F }); + } + I.scene || + (i instanceof Nd.Scene + ? (B = i) + : ((B = new Nd.Scene()), i && ap(B, i)), + I.set({ scene: xh(B) })); + if (!I.xr) { + var O, + N = function (e, t) { + var n = s.getState(); + "never" !== n.frameloop && np(e, !0, n, t); + }, + G = function () { + var e = s.getState(); + (e.gl.xr.enabled = e.gl.xr.isPresenting), + e.gl.xr.setAnimationLoop(e.gl.xr.isPresenting ? N : null), + e.gl.xr.isPresenting || tp(e); + }, + Z = { + connect: function () { + var e = s.getState().gl; + e.xr.addEventListener("sessionstart", G), + e.xr.addEventListener("sessionend", G); + }, + disconnect: function () { + var e = s.getState().gl; + e.xr.removeEventListener("sessionstart", G), + e.xr.removeEventListener("sessionend", G); + }, + }; + "function" === + typeof (null == (O = k.xr) ? void 0 : O.addEventListener) && + Z.connect(), + I.set({ xr: Z }); + } + if (k.shadowMap) { + var z = k.shadowMap.enabled, + Q = k.shadowMap.type; + if (((k.shadowMap.enabled = !!d), yh.boo(d))) + k.shadowMap.type = Nd.PCFSoftShadowMap; + else if (yh.str(d)) { + var H, + V = { + basic: Nd.BasicShadowMap, + percentage: Nd.PCFShadowMap, + soft: Nd.PCFSoftShadowMap, + variance: Nd.VSMShadowMap, + }; + k.shadowMap.type = null != (H = V[d]) ? H : Nd.PCFSoftShadowMap; + } else yh.obj(d) && Object.assign(k.shadowMap, d); + (z === k.shadowMap.enabled && Q === k.shadowMap.type) || + (k.shadowMap.needsUpdate = !0); + } + var j = lh(); + j && + ("enabled" in j + ? (j.enabled = !A) + : "legacyMode" in j && (j.legacyMode = A)); + ap(k, { + outputEncoding: p ? 3e3 : 3001, + toneMapping: m ? Nd.NoToneMapping : Nd.ACESFilmicToneMapping, + }), + I.legacy !== A && + I.set(function () { + return { legacy: A }; + }), + I.linear !== p && + I.set(function () { + return { linear: p }; + }), + I.flat !== m && + I.set(function () { + return { flat: m }; + }), + !n || yh.fun(n) || Dh(n) || yh.equ(n, k, op) || ap(k, n), + o && !I.events.handlers && I.set({ events: o(s) }); + var W = (function (e, t) { + if (t) return t; + if ( + "undefined" !== typeof HTMLCanvasElement && + e instanceof HTMLCanvasElement && + e.parentElement + ) { + var n = e.parentElement.getBoundingClientRect(); + return { + width: n.width, + height: n.height, + top: n.top, + left: n.left, + }; + } + return "undefined" !== typeof OffscreenCanvas && + e instanceof OffscreenCanvas + ? { width: e.width, height: e.height, top: 0, left: 0 } + : { width: 0, height: 0, top: 0, left: 0 }; + })(t, r); + return ( + yh.equ(W, I.size, op) || + I.setSize(W.width, W.height, W.updateStyle, W.top, W.left), + _ && I.viewport.dpr !== gh(_) && I.setDpr(_), + I.frameloop !== S && I.setFrameloop(S), + I.onPointerMissed || I.set({ onPointerMissed: M }), + C && + !yh.equ(C, I.performance, op) && + I.set(function (e) { + return { + performance: (0, Be.Z)((0, Be.Z)({}, e.performance), C), + }; + }), + (a = l), + (c = !0), + this + ); + }, + render: function (n) { + return ( + c || this.configure(), + ip.updateContainer( + e.createElement(up, { + store: s, + children: n, + onCreated: a, + rootElement: t, + }), + l, + null, + function () {} + ), + s + ); + }, + unmount: function () { + cp(t); + }, + }; + } + function up(t) { + var n = t.store, + r = t.children, + i = t.onCreated, + a = t.rootElement; + return ( + ch(function () { + var e = n.getState(); + e.set(function (e) { + return { + internal: (0, Be.Z)( + (0, Be.Z)({}, e.internal), + {}, + { active: !0 } + ), + }; + }), + i && i(e), + n.getState().events.connected || + null == e.events.connect || + e.events.connect(a); + }, []), + e.createElement(Uh.Provider, { value: n }, r) + ); + } + function cp(e, t) { + var n = $h.get(e), + r = null == n ? void 0 : n.fiber; + if (r) { + var i = null == n ? void 0 : n.store.getState(); + i && (i.internal.active = !1), + ip.updateContainer(null, r, null, function () { + i && + setTimeout(function () { + try { + var n, r, a, o; + null == i.events.disconnect || i.events.disconnect(), + null == (n = i.gl) || + null == (r = n.renderLists) || + null == r.dispose || + r.dispose(), + null == (a = i.gl) || + null == a.forceContextLoss || + a.forceContextLoss(), + null != (o = i.gl) && o.xr && i.xr.disconnect(), + (function (e) { + for (var t in (e.dispose && + "Scene" !== e.type && + e.dispose(), + e)) + null == t.dispose || t.dispose(), delete e[t]; + })(i), + $h.delete(e), + t && t(e); + } catch (s) {} + }, 500); + }); + } + } + ip.injectIntoDevTools({ + bundleType: 0, + rendererPackageName: "@react-three/fiber", + version: e.version, + }); + e.unstable_act; + var fp = n(3037), + dp = [ + "makeDefault", + "camera", + "regress", + "domElement", + "enableDamping", + "keyEvents", + "onChange", + "onStart", + "onEnd", + ], + hp = e.forwardRef(function (t, n) { + var r = t.makeDefault, + i = t.camera, + a = t.regress, + o = t.domElement, + s = t.enableDamping, + l = void 0 === s || s, + u = t.keyEvents, + c = void 0 !== u && u, + f = t.onChange, + d = t.onStart, + h = t.onEnd, + p = kd(t, dp), + v = Xh(function (e) { + return e.invalidate; + }), + m = Xh(function (e) { + return e.camera; + }), + g = Xh(function (e) { + return e.gl; + }), + A = Xh(function (e) { + return e.events; + }), + y = Xh(function (e) { + return e.setEvents; + }), + b = Xh(function (e) { + return e.set; + }), + x = Xh(function (e) { + return e.get; + }), + S = Xh(function (e) { + return e.performance; + }), + E = i || m, + _ = o || A.connected || g.domElement, + C = e.useMemo( + function () { + return new fp.zxs(E); + }, + [E] + ); + return ( + Yh(function () { + C.enabled && C.update(); + }, -1), + e.useEffect( + function () { + return ( + c && C.connect(!0 === c ? _ : c), + C.connect(_), + function () { + C.dispose(); + } + ); + }, + [c, _, a, C, v] + ), + e.useEffect( + function () { + var e = function (e) { + v(), a && S.regress(), f && f(e); + }, + t = function (e) { + d && d(e); + }, + n = function (e) { + h && h(e); + }; + return ( + C.addEventListener("change", e), + C.addEventListener("start", t), + C.addEventListener("end", n), + function () { + C.removeEventListener("start", t), + C.removeEventListener("end", n), + C.removeEventListener("change", e); + } + ); + }, + [f, d, h, C, v, y] + ), + e.useEffect( + function () { + if (r) { + var e = x().controls; + return ( + b({ controls: C }), + function () { + return b({ controls: e }); + } + ); + } + }, + [r, C] + ), + e.createElement( + "primitive", + (0, Nt.Z)({ ref: n, object: C, enableDamping: l }, p) + ) + ); + }), + pp = n(7494), + vp = n.n(pp); + function mp(t) { + var n = void 0 === t ? { debounce: 0, scroll: !1, offsetSize: !1 } : t, + r = n.debounce, + i = n.scroll, + a = n.polyfill, + o = n.offsetSize, + s = + a || + ("undefined" === typeof window + ? (0, Mi.Z)(function e() { + (0, Ti.Z)(this, e); + }) + : window.ResizeObserver); + if (!s) + 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" + ); + var l = (0, e.useState)({ + left: 0, + top: 0, + width: 0, + height: 0, + bottom: 0, + right: 0, + x: 0, + y: 0, + }), + u = (0, Ot.Z)(l, 2), + c = u[0], + f = u[1], + d = (0, e.useRef)({ + element: null, + scrollContainers: null, + resizeObserver: null, + lastBounds: c, + }), + h = r ? ("number" === typeof r ? r : r.scroll) : null, + p = r ? ("number" === typeof r ? r : r.resize) : null, + v = (0, e.useRef)(!1); + (0, e.useEffect)(function () { + return ( + (v.current = !0), + function () { + v.current = !1; + } + ); + }); + var m = (0, e.useMemo)( + function () { + var e = function () { + if (d.current.element) { + var e = d.current.element.getBoundingClientRect(), + t = { + left: e.left, + top: e.top, + width: e.width, + height: e.height, + bottom: e.bottom, + right: e.right, + x: e.x, + y: e.y, + }; + d.current.element instanceof HTMLElement && + o && + ((t.height = d.current.element.offsetHeight), + (t.width = d.current.element.offsetWidth)), + Object.freeze(t), + v.current && + !yp(d.current.lastBounds, t) && + f((d.current.lastBounds = t)); + } + }; + return [e, p ? vp()(e, p) : e, h ? vp()(e, h) : e]; + }, + [f, o, h, p] + ), + g = (0, Ot.Z)(m, 3), + A = g[0], + y = g[1], + b = g[2]; + function x() { + d.current.scrollContainers && + (d.current.scrollContainers.forEach(function (e) { + return e.removeEventListener("scroll", b, !0); + }), + (d.current.scrollContainers = null)), + d.current.resizeObserver && + (d.current.resizeObserver.disconnect(), + (d.current.resizeObserver = null)); + } + function S() { + d.current.element && + ((d.current.resizeObserver = new s(b)), + d.current.resizeObserver.observe(d.current.element), + i && + d.current.scrollContainers && + d.current.scrollContainers.forEach(function (e) { + return e.addEventListener("scroll", b, { + capture: !0, + passive: !0, + }); + })); + } + var E; + return ( + (function (t, n) { + (0, e.useEffect)( + function () { + if (n) { + var e = t; + return ( + window.addEventListener("scroll", e, { + capture: !0, + passive: !0, + }), + function () { + window.removeEventListener("scroll", e, !0); + } + ); + } + }, + [t, n] + ); + })(b, Boolean(i)), + (E = y), + (0, e.useEffect)( + function () { + var e = E; + return ( + window.addEventListener("resize", e), + function () { + window.removeEventListener("resize", e); + } + ); + }, + [E] + ), + (0, e.useEffect)( + function () { + x(), S(); + }, + [i, b, y] + ), + (0, e.useEffect)(function () { + return x; + }, []), + [ + function (e) { + e && + e !== d.current.element && + (x(), + (d.current.element = e), + (d.current.scrollContainers = gp(e)), + S()); + }, + c, + A, + ] + ); + } + function gp(e) { + var t = []; + if (!e || e === document.body) return t; + var n = window.getComputedStyle(e); + return ( + [n.overflow, n.overflowX, n.overflowY].some(function (e) { + return "auto" === e || "scroll" === e; + }) && t.push(e), + [].concat(t, (0, xt.Z)(gp(e.parentElement))) + ); + } + var Ap = ["x", "y", "top", "bottom", "left", "right", "width", "height"], + yp = function (e, t) { + return Ap.every(function (n) { + return e[n] === t[n]; + }); + }, + bp = Object.defineProperty, + xp = Object.defineProperties, + Sp = Object.getOwnPropertyDescriptors, + Ep = Object.getOwnPropertySymbols, + _p = Object.prototype.hasOwnProperty, + Cp = Object.prototype.propertyIsEnumerable, + wp = function (e, t, n) { + return t in e + ? bp(e, t, { + enumerable: !0, + configurable: !0, + writable: !0, + value: n, + }) + : (e[t] = n); + }, + Tp = function (e, t) { + for (var n in t || (t = {})) _p.call(t, n) && wp(e, n, t[n]); + if (Ep) { + var r, + i = (0, Fd.Z)(Ep(t)); + try { + for (i.s(); !(r = i.n()).done; ) { + n = r.value; + Cp.call(t, n) && wp(e, n, t[n]); + } + } catch (a) { + i.e(a); + } finally { + i.f(); + } + } + return e; + }; + function Mp(e, t, n) { + if (e) { + if (!0 === n(e)) return e; + for (var r = t ? e.return : e.child; r; ) { + var i = Mp(r, t, n); + if (i) return i; + r = t ? null : r.sibling; + } + } + } + function Ip(e) { + try { + return Object.defineProperties(e, { + _currentRenderer: { + get: function () { + return null; + }, + set: function () {}, + }, + _currentRenderer2: { + get: function () { + return null; + }, + set: function () {}, + }, + }); + } catch (Y) { + return e; + } + } + var kp = Ip(e.createContext(null)), + Rp = (function (t) { + (0, Dd.Z)(r, t); + var n = (0, Ud.Z)(r); + function r() { + return (0, Ti.Z)(this, r), n.apply(this, arguments); + } + return ( + (0, Mi.Z)(r, [ + { + key: "render", + value: function () { + return e.createElement( + kp.Provider, + { value: this._reactInternals }, + this.props.children + ); + }, + }, + ]), + r + ); + })(e.Component), + Bp = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED, + Pp = Bp.ReactCurrentOwner, + Lp = Bp.ReactCurrentDispatcher; + function Dp() { + var t = e.useContext(kp); + if (null === t) + throw new Error( + "its-fine: useFiber must be called within a !" + ); + var n = e.useId(); + return e.useMemo( + function () { + for ( + var e = 0, + r = [ + null == Pp ? void 0 : Pp.current, + t, + null == t ? void 0 : t.alternate, + ]; + e < r.length; + e++ + ) { + var i = r[e]; + if (i) { + var a = Mp(i, !1, function (e) { + for (var t = e.memoizedState; t; ) { + if (t.memoizedState === n) return !0; + t = t.next; + } + }); + if (a) return a; + } + } + }, + [t, n] + ); + } + function Up() { + var t = (function () { + var t, + n, + r = Dp(), + i = e.useState(function () { + return new Map(); + }), + a = (0, Ot.Z)(i, 1)[0]; + a.clear(); + for (var o = r; o; ) { + var s = null == (t = o.type) ? void 0 : t._context; + s && + s !== kp && + !a.has(s) && + a.set( + s, + null == (n = null == Lp ? void 0 : Lp.current) + ? void 0 + : n.readContext(Ip(s)) + ), + (o = o.return); + } + return a; + })(); + return e.useMemo( + function () { + return Array.from(t.keys()).reduce( + function (n, r) { + return function (i) { + return e.createElement( + n, + null, + e.createElement( + r.Provider, + (function (e, t) { + return xp(e, Sp(t)); + })(Tp({}, i), { value: t.get(r) }) + ) + ); + }; + }, + function (t) { + return e.createElement(Rp, Tp({}, t)); + } + ); + }, + [t] + ); + } + var Fp = [ + "children", + "fallback", + "resize", + "style", + "gl", + "events", + "eventSource", + "eventPrefix", + "shadows", + "linear", + "flat", + "legacy", + "orthographic", + "frameloop", + "dpr", + "performance", + "raycaster", + "camera", + "scene", + "onPointerMissed", + "onCreated", + ], + Op = { + 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 Np(e) { + var t = Ph(e).handlePointer; + return { + priority: 1, + enabled: !0, + compute: function (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(Op).reduce(function (e, n) { + return (0, Be.Z)((0, Be.Z)({}, e), {}, (0, l.Z)({}, n, t(n))); + }, {}), + update: function () { + var t, + n = e.getState(), + r = n.events, + i = n.internal; + null != (t = i.lastEvent) && + t.current && + r.handlers && + r.handlers.onPointerMove(i.lastEvent.current); + }, + connect: function (t) { + var n, + r = e.getState(), + i = r.set, + a = r.events; + null == a.disconnect || a.disconnect(), + i(function (e) { + return { + events: (0, Be.Z)( + (0, Be.Z)({}, e.events), + {}, + { connected: t } + ), + }; + }), + Object.entries(null != (n = a.handlers) ? n : []).forEach(function ( + e + ) { + var n = (0, Ot.Z)(e, 2), + r = n[0], + i = n[1], + a = (0, Ot.Z)(Op[r], 2), + o = a[0], + s = a[1]; + t.addEventListener(o, i, { passive: s }); + }); + }, + disconnect: function () { + var t, + n = e.getState(), + r = n.set, + i = n.events; + i.connected && + (Object.entries(null != (t = i.handlers) ? t : []).forEach( + function (e) { + var t = (0, Ot.Z)(e, 2), + n = t[0], + r = t[1]; + if (i && i.connected instanceof HTMLElement) { + var a = (0, Ot.Z)(Op[n], 1)[0]; + i.connected.removeEventListener(a, r); + } + } + ), + r(function (e) { + return { + events: (0, Be.Z)( + (0, Be.Z)({}, e.events), + {}, + { connected: void 0 } + ), + }; + })); + }, + }; + } + var Gp = e.forwardRef(function (t, n) { + var r = t.children, + i = t.fallback, + a = t.resize, + o = t.style, + s = t.gl, + l = t.events, + u = void 0 === l ? Np : l, + c = t.eventSource, + f = t.eventPrefix, + d = t.shadows, + h = t.linear, + p = t.flat, + v = t.legacy, + m = t.orthographic, + g = t.frameloop, + A = t.dpr, + y = t.performance, + b = t.raycaster, + x = t.camera, + S = t.scene, + E = t.onPointerMissed, + _ = t.onCreated, + C = kd(t, Fp); + e.useMemo(function () { + return oh(Nd); + }, []); + var w = Up(), + T = mp( + (0, Be.Z)({ scroll: !0, debounce: { scroll: 50, resize: 0 } }, a) + ), + M = (0, Ot.Z)(T, 2), + I = M[0], + k = M[1], + R = e.useRef(null), + B = e.useRef(null); + e.useImperativeHandle(n, function () { + return R.current; + }); + var P = fh(E), + L = e.useState(!1), + D = (0, Ot.Z)(L, 2), + U = D[0], + F = D[1], + O = e.useState(!1), + N = (0, Ot.Z)(O, 2), + G = N[0], + Z = N[1]; + if (U) throw U; + if (G) throw G; + var z = e.useRef(null); + ch(function () { + var t = R.current; + k.width > 0 && + k.height > 0 && + t && + (z.current || (z.current = lp(t)), + z.current.configure({ + gl: s, + events: u, + shadows: d, + linear: h, + flat: p, + legacy: v, + orthographic: m, + frameloop: g, + dpr: A, + performance: y, + raycaster: b, + camera: x, + scene: S, + size: k, + onPointerMissed: function () { + return null == P.current + ? void 0 + : P.current.apply(P, arguments); + }, + onCreated: function (e) { + var t; + null == e.events.connect || + e.events.connect( + c + ? (t = c) && t.hasOwnProperty("current") + ? c.current + : c + : B.current + ), + f && + e.setEvents({ + compute: function (e, t) { + var n = e[f + "X"], + r = e[f + "Y"]; + t.pointer.set( + (n / t.size.width) * 2 - 1, + (-r / t.size.height) * 2 + 1 + ), + t.raycaster.setFromCamera(t.pointer, t.camera); + }, + }), + null == _ || _(e); + }, + }), + z.current.render( + e.createElement( + w, + null, + e.createElement( + hh, + { set: Z }, + e.createElement( + e.Suspense, + { fallback: e.createElement(dh, { set: F }) }, + r + ) + ) + ) + )); + }), + e.useEffect(function () { + var e = R.current; + if (e) + return function () { + return cp(e); + }; + }, []); + var Q = c ? "none" : "auto"; + return e.createElement( + "div", + (0, Nt.Z)( + { + ref: B, + style: (0, Be.Z)( + { + position: "relative", + width: "100%", + height: "100%", + overflow: "hidden", + pointerEvents: Q, + }, + o + ), + }, + C + ), + e.createElement( + "div", + { ref: I, style: { width: "100%", height: "100%" } }, + e.createElement( + "canvas", + { ref: R, style: { display: "block" } }, + i + ) + ) + ); + }), + Zp = e.forwardRef(function (t, n) { + return e.createElement( + Rp, + null, + e.createElement(Gp, (0, Nt.Z)({}, t, { ref: n })) + ); + }); + var zp = function (e) { + return function (t) { + e.forEach(function (e) { + "function" === typeof e ? e(t) : null != e && (e.current = t); + }); + }; + }, + Qp = [ + "points", + "color", + "vertexColors", + "linewidth", + "lineWidth", + "segments", + "dashed", + ], + Hp = e.forwardRef(function (t, n) { + var r = t.points, + i = t.color, + a = void 0 === i ? "black" : i, + o = t.vertexColors, + s = t.linewidth, + l = t.lineWidth, + u = t.segments, + c = t.dashed, + f = kd(t, Qp), + d = Xh(function (e) { + return e.size; + }), + h = e.useMemo( + function () { + return u ? new fp.wUb() : new fp.w_R(); + }, + [u] + ), + p = e.useState(function () { + return new fp.YRm(); + }), + v = (0, Ot.Z)(p, 1)[0], + m = e.useMemo( + function () { + var e = u ? new fp.zOz() : new fp.L1_(), + t = r.map(function (e) { + var t = Array.isArray(e); + return e instanceof Nd.Vector3 + ? [e.x, e.y, e.z] + : e instanceof Nd.Vector2 + ? [e.x, e.y, 0] + : t && 3 === e.length + ? [e[0], e[1], e[2]] + : t && 2 === e.length + ? [e[0], e[1], 0] + : e; + }); + if ((e.setPositions(t.flat()), o)) { + var n = o.map(function (e) { + return e instanceof Nd.Color ? e.toArray() : e; + }); + e.setColors(n.flat()); + } + return e; + }, + [r, u, o] + ); + return ( + e.useLayoutEffect( + function () { + h.computeLineDistances(); + }, + [r, h] + ), + e.useLayoutEffect( + function () { + c ? (v.defines.USE_DASH = "") : delete v.defines.USE_DASH, + (v.needsUpdate = !0); + }, + [c, v] + ), + e.useEffect( + function () { + return function () { + return m.dispose(); + }; + }, + [m] + ), + e.createElement( + "primitive", + (0, Nt.Z)({ object: h, ref: n }, f), + e.createElement("primitive", { object: m, attach: "geometry" }), + e.createElement( + "primitive", + (0, Nt.Z)( + { + object: v, + attach: "material", + color: a, + vertexColors: Boolean(o), + resolution: [d.width, d.height], + linewidth: null !== s && void 0 !== s ? s : l, + dashed: c, + }, + f + ) + ) + ) + ); + }), + Vp = ["start", "end", "mid", "segments"], + jp = new Nd.Vector3(), + Wp = e.forwardRef(function (t, n) { + var r = t.start, + i = void 0 === r ? [0, 0, 0] : r, + a = t.end, + o = void 0 === a ? [0, 0, 0] : a, + s = t.mid, + l = t.segments, + u = void 0 === l ? 20 : l, + c = kd(t, Vp), + f = e.useRef(null), + d = e.useState(function () { + return new Nd.QuadraticBezierCurve3(void 0, void 0, void 0); + }), + h = (0, Ot.Z)(d, 1)[0], + p = e.useCallback(function (e, t, n) { + var r, + i, + a = + arguments.length > 3 && void 0 !== arguments[3] + ? arguments[3] + : 20; + if ( + (e instanceof Nd.Vector3 + ? h.v0.copy(e) + : (r = h.v0).set.apply(r, (0, xt.Z)(e)), + t instanceof Nd.Vector3 + ? h.v2.copy(t) + : (i = h.v2).set.apply(i, (0, xt.Z)(t)), + n instanceof Nd.Vector3) + ) + h.v1.copy(n); + else if (Array.isArray(n)) { + var o; + (o = h.v1).set.apply(o, (0, xt.Z)(n)); + } else + h.v1.copy( + h.v0 + .clone() + .add(h.v2.clone().sub(h.v0)) + .add(jp.set(0, h.v0.y - h.v2.y, 0)) + ); + return h.getPoints(a); + }, []); + e.useLayoutEffect(function () { + f.current.setPoints = function (e, t, n) { + var r = p(e, t, n); + f.current.geometry && + f.current.geometry.setPositions( + r + .map(function (e) { + return e.toArray(); + }) + .flat() + ); + }; + }, []); + var v = e.useMemo( + function () { + return p(i, o, s, u); + }, + [i, o, s, u] + ); + return e.createElement( + Hp, + (0, Nt.Z)({ ref: zp([f, n]), points: v }, c) + ); + }), + Xp = n(1752), + Yp = n(1120); + function qp() { + var e = Object.create(null); + function t(r, i) { + var a = r.id, + o = r.name, + s = r.dependencies; + void 0 === s && (s = []); + var l = r.init; + void 0 === l && (l = function () {}); + var u = r.getTransferables; + if ((void 0 === u && (u = null), !e[a])) + try { + (s = s.map(function (n) { + return ( + n && + n.isWorkerModule && + (t(n, function (e) { + if (e instanceof Error) throw e; + }), + (n = e[n.id].value)), + n + ); + })), + (l = n("<" + o + ">.init", l)), + u && (u = n("<" + o + ">.getTransferables", u)); + var c = null; + "function" === typeof l + ? (c = l.apply(void 0, s)) + : console.error( + "worker module init function failed to rehydrate" + ), + (e[a] = { id: a, value: c, getTransferables: u }), + i(c); + } catch (f) { + (f && f.noLog) || console.error(f), i(f); + } + } + function n(e, t) { + var n = void 0; + self.troikaDefine = function (e) { + return (n = e); + }; + var r = URL.createObjectURL( + new Blob( + [ + "/** " + + e.replace(/\*/g, "") + + " **/\n\ntroikaDefine(\n" + + t + + "\n)", + ], + { type: "application/javascript" } + ) + ); + try { + importScripts(r); + } catch (i) { + console.error(i); + } + return URL.revokeObjectURL(r), delete self.troikaDefine, n; + } + self.addEventListener("message", function (n) { + var r = n.data, + i = r.messageId, + a = r.action, + o = r.data; + try { + "registerModule" === a && + t(o, function (e) { + e instanceof Error + ? postMessage({ messageId: i, success: !1, error: e.message }) + : postMessage({ + messageId: i, + success: !0, + result: { isCallable: "function" === typeof e }, + }); + }), + "callModule" === a && + (function (t, n) { + var r, + i = t.id, + a = t.args; + (e[i] && "function" === typeof e[i].value) || + n( + new Error( + "Worker module " + + i + + ": not found or its 'init' did not return a function" + ) + ); + try { + var o = (r = e[i]).value.apply(r, a); + o && "function" === typeof o.then + ? o.then(s, function (e) { + return n(e instanceof Error ? e : new Error("" + e)); + }) + : s(o); + } catch (l) { + n(l); + } + function s(t) { + try { + var r = e[i].getTransferables && e[i].getTransferables(t); + (r && Array.isArray(r) && r.length) || (r = void 0), + n(t, r); + } catch (l) { + console.error(l), n(l); + } + } + })(o, function (e, t) { + e instanceof Error + ? postMessage({ messageId: i, success: !1, error: e.message }) + : postMessage( + { messageId: i, success: !0, result: e }, + t || void 0 + ); + }); + } catch (s) { + postMessage({ messageId: i, success: !1, error: s.stack }); + } + }); + } + var Jp = function () { + var e = !1; + if ( + "undefined" !== typeof window && + "undefined" !== typeof window.document + ) + try { + new Worker( + URL.createObjectURL( + new Blob([""], { type: "application/javascript" }) + ) + ).terminate(), + (e = !0); + } catch (t) { + console.log( + "Troika createWorkerModule: web workers not allowed; falling back to main thread execution. Cause: [" + + t.message + + "]" + ); + } + return ( + (Jp = function () { + return e; + }), + e + ); + }, + Kp = 0, + $p = 0, + ev = !1, + tv = Object.create(null), + nv = Object.create(null), + rv = Object.create(null); + function iv(e) { + if ((!e || "function" !== typeof e.init) && !ev) + throw new Error("requires `options.init` function"); + var t = e.dependencies, + n = e.init, + r = e.getTransferables, + i = e.workerId; + if (!Jp()) + return (function (e) { + var t = function e() { + for (var t = [], n = arguments.length; n--; ) t[n] = arguments[n]; + return e._getInitResult().then(function (e) { + if ("function" === typeof e) return e.apply(void 0, t); + throw new Error( + "Worker module function was called but `init` did not return a callable function" + ); + }); + }; + return ( + (t._getInitResult = function () { + var n = e.dependencies, + r = e.init; + n = Array.isArray(n) + ? n.map(function (e) { + return e && e._getInitResult ? e._getInitResult() : e; + }) + : []; + var i = Promise.all(n).then(function (e) { + return r.apply(null, e); + }); + return ( + (t._getInitResult = function () { + return i; + }), + i + ); + }), + t + ); + })(e); + null == i && (i = "#default"); + var a = "workerModule" + ++Kp, + o = e.name || a, + s = null; + function l() { + for (var e = [], t = arguments.length; t--; ) e[t] = arguments[t]; + if (!s) { + s = ov(i, "registerModule", l.workerModuleData); + (nv[i] || (nv[i] = new Set())).add(function e() { + (s = null), nv[i].delete(e); + }); + } + return s.then(function (t) { + if (t.isCallable) return ov(i, "callModule", { id: a, args: e }); + throw new Error( + "Worker module function was called but `init` did not return a callable function" + ); + }); + } + return ( + (t = + t && + t.map(function (e) { + return ( + "function" !== typeof e || + e.workerModuleData || + ((ev = !0), + (e = iv({ + workerId: i, + name: "<" + o + "> function dependency: " + e.name, + init: "function(){return (\n" + av(e) + "\n)}", + })), + (ev = !1)), + e && e.workerModuleData && (e = e.workerModuleData), + e + ); + })), + (l.workerModuleData = { + isWorkerModule: !0, + id: a, + name: o, + dependencies: t, + init: av(n), + getTransferables: r && av(r), + }), + l + ); + } + function av(e) { + var t = e.toString(); + return ( + !/^function/.test(t) && /^\w+\s*\(/.test(t) && (t = "function " + t), t + ); + } + function ov(e, t, n) { + return new Promise(function (r, i) { + var a = ++$p; + (rv[a] = function (e) { + e.success + ? r(e.result) + : i(new Error("Error in worker " + t + " call: " + e.error)); + }), + (function (e) { + var t = tv[e]; + if (!t) { + var n = av(qp); + (t = tv[e] = + new Worker( + URL.createObjectURL( + new Blob( + [ + "/** Worker Module Bootstrap: " + + e.replace(/\*/g, "") + + " **/\n\n;(" + + n + + ")()", + ], + { type: "application/javascript" } + ) + ) + )).onmessage = function (e) { + var t = e.data, + n = t.messageId, + r = rv[n]; + if (!r) + throw new Error( + "WorkerModule response with empty or unknown messageId" + ); + delete rv[n], r(t); + }; + } + return t; + })(e).postMessage({ messageId: a, action: t, data: n }); + }); + } + function sv() { + var e = (function (e) { + function t(e, t, n, r, i, a, o, s) { + var l = 1 - o; + (s.x = l * l * e + 2 * l * o * n + o * o * i), + (s.y = l * l * t + 2 * l * o * r + o * o * a); + } + function n(e, t, n, r, i, a, o, s, l, u) { + var c = 1 - l; + (u.x = + c * c * c * e + + 3 * c * c * l * n + + 3 * c * l * l * i + + l * l * l * o), + (u.y = + c * c * c * t + + 3 * c * c * l * r + + 3 * c * l * l * a + + l * l * l * s); + } + function r(e, t) { + for ( + var n, r, i, a, o, s = /([MLQCZ])([^MLQCZ]*)/g; + (n = s.exec(e)); + + ) { + var l = n[2] + .replace(/^\s*|\s*$/g, "") + .split(/[,\s]+/) + .map(function (e) { + return parseFloat(e); + }); + switch (n[1]) { + case "M": + (a = r = l[0]), (o = i = l[1]); + break; + case "L": + (l[0] === a && l[1] === o) || + t("L", a, o, (a = l[0]), (o = l[1])); + break; + case "Q": + t("Q", a, o, (a = l[2]), (o = l[3]), l[0], l[1]); + break; + case "C": + t("C", a, o, (a = l[4]), (o = l[5]), l[0], l[1], l[2], l[3]); + break; + case "Z": + (a === r && o === i) || t("L", a, o, r, i); + } + } + } + function i(e, i, a) { + void 0 === a && (a = 16); + var o = { x: 0, y: 0 }; + r(e, function (e, r, s, l, u, c, f, d, h) { + switch (e) { + case "L": + i(r, s, l, u); + break; + case "Q": + for (var p = r, v = s, m = 1; m < a; m++) + t(r, s, c, f, l, u, m / (a - 1), o), + i(p, v, o.x, o.y), + (p = o.x), + (v = o.y); + break; + case "C": + for (var g = r, A = s, y = 1; y < a; y++) + n(r, s, c, f, d, h, l, u, y / (a - 1), o), + i(g, A, o.x, o.y), + (g = o.x), + (A = o.y); + } + }); + } + var a = + "precision highp float;attribute vec2 aUV;varying vec2 vUV;void main(){vUV=aUV;gl_Position=vec4(mix(vec2(-1.0),vec2(1.0),aUV),0.0,1.0);}", + o = + "precision highp float;uniform sampler2D tex;varying vec2 vUV;void main(){gl_FragColor=texture2D(tex,vUV);}", + s = new WeakMap(), + l = { + premultipliedAlpha: !1, + preserveDrawingBuffer: !0, + antialias: !1, + depth: !1, + }; + function u(e, t) { + var n = e.getContext ? e.getContext("webgl", l) : e, + r = s.get(n); + if (!r) { + var i = function (e) { + var t = c[e]; + if (!t && !(t = c[e] = n.getExtension(e))) + throw new Error(e + " not supported"); + return t; + }, + a = function (e, t) { + var r = n.createShader(t); + return n.shaderSource(r, e), n.compileShader(r), r; + }, + o = function () { + (c = {}), (f = {}), (d = {}), (h = -1), (p.length = 0); + }, + u = + "undefined" !== typeof WebGL2RenderingContext && + n instanceof WebGL2RenderingContext, + c = {}, + f = {}, + d = {}, + h = -1, + p = []; + n.canvas.addEventListener( + "webglcontextlost", + function (e) { + o(), e.preventDefault(); + }, + !1 + ), + s.set( + n, + (r = { + gl: n, + isWebGL2: u, + getExtension: i, + withProgram: function (e, t, r, o) { + if (!f[e]) { + var s = {}, + l = {}, + c = n.createProgram(); + n.attachShader(c, a(t, n.VERTEX_SHADER)), + n.attachShader(c, a(r, n.FRAGMENT_SHADER)), + n.linkProgram(c), + (f[e] = { + program: c, + transaction: function (e) { + n.useProgram(c), + e({ + setUniform: function (e, t) { + for ( + var r = [], i = arguments.length - 2; + i-- > 0; + + ) + r[i] = arguments[i + 2]; + var a = + l[t] || (l[t] = n.getUniformLocation(c, t)); + n["uniform" + e].apply(n, [a].concat(r)); + }, + setAttribute: function (e, t, r, a, o) { + var l = s[e]; + l || + (l = s[e] = + { + buf: n.createBuffer(), + loc: n.getAttribLocation(c, e), + data: null, + }), + n.bindBuffer(n.ARRAY_BUFFER, l.buf), + n.vertexAttribPointer( + l.loc, + t, + n.FLOAT, + !1, + 0, + 0 + ), + n.enableVertexAttribArray(l.loc), + u + ? n.vertexAttribDivisor(l.loc, a) + : i( + "ANGLE_instanced_arrays" + ).vertexAttribDivisorANGLE(l.loc, a), + o !== l.data && + (n.bufferData(n.ARRAY_BUFFER, o, r), + (l.data = o)); + }, + }); + }, + }); + } + f[e].transaction(o); + }, + withTexture: function (e, t) { + h++; + try { + n.activeTexture(n.TEXTURE0 + h); + var r = d[e]; + r || + ((r = d[e] = n.createTexture()), + n.bindTexture(n.TEXTURE_2D, r), + n.texParameteri( + n.TEXTURE_2D, + n.TEXTURE_MIN_FILTER, + n.NEAREST + ), + n.texParameteri( + n.TEXTURE_2D, + n.TEXTURE_MAG_FILTER, + n.NEAREST + )), + n.bindTexture(n.TEXTURE_2D, r), + t(r, h); + } finally { + h--; + } + }, + withTextureFramebuffer: function (e, t, r) { + var i = n.createFramebuffer(); + p.push(i), + n.bindFramebuffer(n.FRAMEBUFFER, i), + n.activeTexture(n.TEXTURE0 + t), + n.bindTexture(n.TEXTURE_2D, e), + n.framebufferTexture2D( + n.FRAMEBUFFER, + n.COLOR_ATTACHMENT0, + n.TEXTURE_2D, + e, + 0 + ); + try { + r(i); + } finally { + n.deleteFramebuffer(i), + n.bindFramebuffer( + n.FRAMEBUFFER, + p[--p.length - 1] || null + ); + } + }, + handleContextLoss: o, + }) + ); + } + t(r); + } + function c(e, t, n, r, i, s, l, c) { + void 0 === l && (l = 15), + void 0 === c && (c = null), + u(e, function (e) { + var u = e.gl, + f = e.withProgram; + (0, e.withTexture)("copy", function (e, d) { + u.texImage2D( + u.TEXTURE_2D, + 0, + u.RGBA, + i, + s, + 0, + u.RGBA, + u.UNSIGNED_BYTE, + t + ), + f("copy", a, o, function (e) { + var t = e.setUniform; + (0, e.setAttribute)( + "aUV", + 2, + u.STATIC_DRAW, + 0, + new Float32Array([0, 0, 2, 0, 0, 2]) + ), + t("1i", "image", d), + u.bindFramebuffer(u.FRAMEBUFFER, c || null), + u.disable(u.BLEND), + u.colorMask(8 & l, 4 & l, 2 & l, 1 & l), + u.viewport(n, r, i, s), + u.scissor(n, r, i, s), + u.drawArrays(u.TRIANGLES, 0, 3); + }); + }); + }); + } + var f = Object.freeze({ + __proto__: null, + withWebGLContext: u, + renderImageData: c, + resizeWebGLCanvasWithoutClearing: function (e, t, n) { + var r = e.width, + i = e.height; + u(e, function (a) { + var o = a.gl, + s = new Uint8Array(r * i * 4); + o.readPixels(0, 0, r, i, o.RGBA, o.UNSIGNED_BYTE, s), + (e.width = t), + (e.height = n), + c(o, s, 0, 0, r, i); + }); + }, + }); + function d(e, t, n, r, a, o) { + void 0 === o && (o = 1); + var s = new Uint8Array(e * t), + l = r[2] - r[0], + u = r[3] - r[1], + c = []; + i(n, function (e, t, n, r) { + c.push({ + x1: e, + y1: t, + x2: n, + y2: r, + minX: Math.min(e, n), + minY: Math.min(t, r), + maxX: Math.max(e, n), + maxY: Math.max(t, r), + }); + }), + c.sort(function (e, t) { + return e.maxX - t.maxX; + }); + for (var f = 0; f < e; f++) + for (var d = 0; d < t; d++) { + var h = m(r[0] + (l * (f + 0.5)) / e, r[1] + (u * (d + 0.5)) / t), + p = Math.pow(1 - Math.abs(h) / a, o) / 2; + h < 0 && (p = 1 - p), + (p = Math.max(0, Math.min(255, Math.round(255 * p)))), + (s[d * e + f] = p); + } + return s; + function m(e, t) { + for (var n = 1 / 0, r = 1 / 0, i = c.length; i--; ) { + var a = c[i]; + if (a.maxX + r <= e) break; + if (e + r > a.minX && t - r < a.maxY && t + r > a.minY) { + var o = v(e, t, a.x1, a.y1, a.x2, a.y2); + o < n && ((n = o), (r = Math.sqrt(n))); + } + } + return ( + (function (e, t) { + for (var n = 0, r = c.length; r--; ) { + var i = c[r]; + if (i.maxX <= e) break; + i.y1 > t !== i.y2 > t && + e < ((i.x2 - i.x1) * (t - i.y1)) / (i.y2 - i.y1) + i.x1 && + (n += i.y1 < i.y2 ? 1 : -1); + } + return 0 !== n; + })(e, t) && (r = -r), + r + ); + } + } + function h(e, t, n, r, i, a, o, s, l, u) { + void 0 === a && (a = 1), + void 0 === s && (s = 0), + void 0 === l && (l = 0), + void 0 === u && (u = 0), + p(e, t, n, r, i, a, o, null, s, l, u); + } + function p(e, t, n, r, i, a, o, s, l, u, f) { + void 0 === a && (a = 1), + void 0 === l && (l = 0), + void 0 === u && (u = 0), + void 0 === f && (f = 0); + for ( + var h = d(e, t, n, r, i, a), + p = new Uint8Array(4 * h.length), + v = 0; + v < h.length; + v++ + ) + p[4 * v + f] = h[v]; + c(o, p, l, u, e, t, 1 << (3 - f), s); + } + function v(e, t, n, r, i, a) { + var o = i - n, + s = a - r, + l = o * o + s * s, + u = l + ? Math.max(0, Math.min(1, ((e - n) * o + (t - r) * s) / l)) + : 0, + c = e - (n + u * o), + f = t - (r + u * s); + return c * c + f * f; + } + var m = Object.freeze({ + __proto__: null, + generate: d, + generateIntoCanvas: h, + generateIntoFramebuffer: p, + }), + g = + "precision highp float;uniform vec4 uGlyphBounds;attribute vec2 aUV;attribute vec4 aLineSegment;varying vec4 vLineSegment;varying vec2 vGlyphXY;void main(){vLineSegment=aLineSegment;vGlyphXY=mix(uGlyphBounds.xy,uGlyphBounds.zw,aUV);gl_Position=vec4(mix(vec2(-1.0),vec2(1.0),aUV),0.0,1.0);}", + A = + "precision highp float;uniform vec4 uGlyphBounds;uniform float uMaxDistance;uniform float uExponent;varying vec4 vLineSegment;varying vec2 vGlyphXY;float absDistToSegment(vec2 point,vec2 lineA,vec2 lineB){vec2 lineDir=lineB-lineA;float lenSq=dot(lineDir,lineDir);float t=lenSq==0.0 ? 0.0 : clamp(dot(point-lineA,lineDir)/lenSq,0.0,1.0);vec2 linePt=lineA+t*lineDir;return distance(point,linePt);}void main(){vec4 seg=vLineSegment;vec2 p=vGlyphXY;float dist=absDistToSegment(p,seg.xy,seg.zw);float val=pow(1.0-clamp(dist/uMaxDistance,0.0,1.0),uExponent)*0.5;bool crossing=(seg.y>p.y!=seg.w>p.y)&&(p.x<(seg.z-seg.x)*(p.y-seg.y)/(seg.w-seg.y)+seg.x);bool crossingUp=crossing&&vLineSegment.y1,1e>2,u>2,2wt>1,1>1,1ge>1,1wp>1,1j>1,f>1,hm>1,1>1,u>1,u6>1,1>1,+5,28>1,w>1,1>1,+3,b8>1,1>1,+3,1>3,-1>-1,3>1,1>1,+2,1s>1,1>1,x>1,th>1,1>1,+2,db>1,1>1,+3,3>1,1>1,+2,14qm>1,1>1,+1,4q>1,1e>2,u>2,2>1,+1", + canonical: + "6f1>-6dx,6dy>-6dx,6ec>-6ed,6ee>-6ed,6ww>2jj,-2ji>2jj,14r4>-1e7l,1e7m>-1e7l,1e7m>-1e5c,1e5d>-1e5b,1e5c>-14qx,14qy>-14qx,14vn>-1ecg,1ech>-1ecg,1edu>-1ecg,1eci>-1ecg,1eda>-1ecg,1eci>-1ecg,1eci>-168q,168r>-168q,168s>-14ye,14yf>-14ye", + }; + function v(e, t) { + var n, + r = 0, + i = new Map(), + a = t && new Map(); + return ( + e.split(",").forEach(function e(o) { + if (-1 !== o.indexOf("+")) for (var s = +o; s--; ) e(n); + else { + n = o; + var l = o.split(">"), + u = l[0], + c = l[1]; + (u = String.fromCodePoint((r += parseInt(u, 36)))), + (c = String.fromCodePoint((r += parseInt(c, 36)))), + i.set(u, c), + t && a.set(c, u); + } + }), + { map: i, reverseMap: a } + ); + } + function m() { + if (!f) { + var e = v(p.pairs, !0), + t = e.map, + n = e.reverseMap; + (f = t), (d = n), (h = v(p.canonical, !1).map); + } + } + function g(e) { + return m(), f.get(e) || null; + } + function A(e) { + return m(), d.get(e) || null; + } + function y(e) { + return m(), h.get(e) || null; + } + var b = n.L, + x = n.R, + S = n.EN, + E = n.ES, + _ = n.ET, + C = n.AN, + w = n.CS, + T = n.B, + M = n.S, + I = n.ON, + k = n.BN, + R = n.NSM, + B = n.AL, + P = n.LRO, + L = n.RLO, + D = n.LRE, + U = n.RLE, + F = n.PDF, + O = n.LRI, + N = n.RLI, + G = n.FSI, + Z = n.PDI; + var z, + Q = + "14>1,j>2,t>2,u>2,1a>g,2v3>1,1>1,1ge>1,1wd>1,b>1,1j>1,f>1,ai>3,-2>3,+1,8>1k0,-1jq>1y7,-1y6>1hf,-1he>1h6,-1h5>1ha,-1h8>1qi,-1pu>1,6>3u,-3s>7,6>1,1>1,f>1,1>1,+2,3>1,1>1,+13,4>1,1>1,6>1eo,-1ee>1,3>1mg,-1me>1mk,-1mj>1mi,-1mg>1mi,-1md>1,1>1,+2,1>10k,-103>1,1>1,4>1,5>1,1>1,+10,3>1,1>8,-7>8,+1,-6>7,+1,a>1,1>1,u>1,u6>1,1>1,+5,26>1,1>1,2>1,2>2,8>1,7>1,4>1,1>1,+5,b8>1,1>1,+3,1>3,-2>1,2>1,1>1,+2,c>1,3>1,1>1,+2,h>1,3>1,a>1,1>1,2>1,3>1,1>1,d>1,f>1,3>1,1a>1,1>1,6>1,7>1,13>1,k>1,1>1,+19,4>1,1>1,+2,2>1,1>1,+18,m>1,a>1,1>1,lk>1,1>1,4>1,2>1,f>1,3>1,1>1,+3,db>1,1>1,+3,3>1,1>1,+2,14qm>1,1>1,+1,6>1,4j>1,j>2,t>2,u>2,2>1,+1"; + function H(e) { + return ( + (function () { + if (!z) { + var e = v(Q, !0), + t = e.map; + e.reverseMap.forEach(function (e, n) { + t.set(n, e); + }), + (z = t); + } + })(), + z.get(e) || null + ); + } + function V(e, t, n, r) { + var i = e.length; + (n = Math.max(0, null == n ? 0 : +n)), + (r = Math.min(i - 1, null == r ? i - 1 : +r)); + var a = []; + return ( + t.paragraphs.forEach(function (i) { + var o = Math.max(n, i.start), + s = Math.min(r, i.end); + if (o < s) { + for ( + var u = t.levels.slice(o, s + 1), f = s; + f >= o && c(e[f]) & l; + f-- + ) + u[f] = i.level; + for (var d = i.level, h = 1 / 0, p = 0; p < u.length; p++) { + var v = u[p]; + v > d && (d = v), v < h && (h = 1 | v); + } + for (var m = d; m >= h; m--) + for (var g = 0; g < u.length; g++) + if (u[g] >= m) { + for (var A = g; g + 1 < u.length && u[g + 1] >= m; ) + g++; + g > A && a.push([A + o, g + o]); + } + } + }), + a + ); + } + function j(e, t, n, r) { + for (var i = V(e, t, n, r), a = [], o = 0; o < e.length; o++) + a[o] = o; + return ( + i.forEach(function (e) { + for ( + var t = e[0], n = e[1], r = a.slice(t, n + 1), i = r.length; + i--; + + ) + a[n - i] = r[i]; + }), + a + ); + } + return ( + (e.closingToOpeningBracket = A), + (e.getBidiCharType = c), + (e.getBidiCharTypeName = function (e) { + return r[c(e)]; + }), + (e.getCanonicalBracket = y), + (e.getEmbeddingLevels = function (e, t) { + for (var n = new Uint32Array(e.length), r = 0; r < e.length; r++) + n[r] = c(e[r]); + var u = new Map(); + function f(e, t) { + var r = n[e]; + (n[e] = t), + u.set(r, u.get(r) - 1), + r & o && u.set(o, u.get(o) - 1), + u.set(t, (u.get(t) || 0) + 1), + t & o && u.set(o, (u.get(o) || 0) + 1); + } + for ( + var d = new Uint8Array(e.length), + h = new Map(), + p = [], + v = null, + m = 0; + m < e.length; + m++ + ) + v || + p.push( + (v = { + start: m, + end: e.length - 1, + level: "rtl" === t ? 1 : "ltr" === t ? 0 : Zt(m, !1), + }) + ), + n[m] & T && ((v.end = m), (v = null)); + for ( + var z = U | D | L | P | i | Z | F | T, + Q = function (e) { + return e + (1 & e ? 1 : 2); + }, + H = function (e) { + return e + (1 & e ? 2 : 1); + }, + V = 0; + V < p.length; + V++ + ) { + var j = [ + { _level: (v = p[V]).level, _override: 0, _isolate: 0 }, + ], + W = void 0, + X = 0, + Y = 0, + q = 0; + u.clear(); + for (var J = v.start; J <= v.end; J++) { + var K = n[J]; + if ( + ((W = j[j.length - 1]), + u.set(K, (u.get(K) || 0) + 1), + K & o && u.set(o, (u.get(o) || 0) + 1), + K & z) + ) + if (K & (U | D)) { + d[J] = W._level; + var $ = (K === U ? H : Q)(W._level); + $ <= 125 && !X && !Y + ? j.push({ _level: $, _override: 0, _isolate: 0 }) + : X || Y++; + } else if (K & (L | P)) { + d[J] = W._level; + var ee = (K === L ? H : Q)(W._level); + ee <= 125 && !X && !Y + ? j.push({ + _level: ee, + _override: K & L ? x : b, + _isolate: 0, + }) + : X || Y++; + } else if (K & i) { + K & G && (K = 1 === Zt(J + 1, !0) ? N : O), + (d[J] = W._level), + W._override && f(J, W._override); + var te = (K === N ? H : Q)(W._level); + te <= 125 && 0 === X && 0 === Y + ? (q++, + j.push({ + _level: te, + _override: 0, + _isolate: 1, + _isolInitIndex: J, + })) + : X++; + } else if (K & Z) { + if (X > 0) X--; + else if (q > 0) { + for (Y = 0; !j[j.length - 1]._isolate; ) j.pop(); + var ne = j[j.length - 1]._isolInitIndex; + null != ne && (h.set(ne, J), h.set(J, ne)), + j.pop(), + q--; + } + (W = j[j.length - 1]), + (d[J] = W._level), + W._override && f(J, W._override); + } else + K & F + ? (0 === X && + (Y > 0 + ? Y-- + : !W._isolate && + j.length > 1 && + (j.pop(), (W = j[j.length - 1]))), + (d[J] = W._level)) + : K & T && (d[J] = v.level); + else + (d[J] = W._level), + W._override && K !== k && f(J, W._override); + } + for (var re = [], ie = null, ae = v.start; ae <= v.end; ae++) { + var oe = n[ae]; + if (!(oe & s)) { + var se = d[ae], + le = oe & i, + ue = oe === Z; + ie && se === ie._level + ? ((ie._end = ae), (ie._endsWithIsolInit = le)) + : re.push( + (ie = { + _start: ae, + _end: ae, + _level: se, + _startsWithPDI: ue, + _endsWithIsolInit: le, + }) + ); + } + } + for (var ce = [], fe = 0; fe < re.length; fe++) { + var de = re[fe]; + if ( + !de._startsWithPDI || + (de._startsWithPDI && !h.has(de._start)) + ) { + for ( + var he = [(ie = de)], pe = void 0; + ie && + ie._endsWithIsolInit && + null != (pe = h.get(ie._end)); + + ) + for (var ve = fe + 1; ve < re.length; ve++) + if (re[ve]._start === pe) { + he.push((ie = re[ve])); + break; + } + for (var me = [], ge = 0; ge < he.length; ge++) + for (var Ae = he[ge], ye = Ae._start; ye <= Ae._end; ye++) + me.push(ye); + for ( + var be = d[me[0]], xe = v.level, Se = me[0] - 1; + Se >= 0; + Se-- + ) + if (!(n[Se] & s)) { + xe = d[Se]; + break; + } + var Ee = me[me.length - 1], + _e = d[Ee], + Ce = v.level; + if (!(n[Ee] & i)) + for (var we = Ee + 1; we <= v.end; we++) + if (!(n[we] & s)) { + Ce = d[we]; + break; + } + ce.push({ + _seqIndices: me, + _sosType: Math.max(xe, be) % 2 ? x : b, + _eosType: Math.max(Ce, _e) % 2 ? x : b, + }); + } + } + for (var Te = 0; Te < ce.length; Te++) { + var Me = ce[Te], + Ie = Me._seqIndices, + ke = Me._sosType, + Re = Me._eosType, + Be = 1 & d[Ie[0]] ? x : b; + if (u.get(R)) + for (var Pe = 0; Pe < Ie.length; Pe++) { + var Le = Ie[Pe]; + if (n[Le] & R) { + for (var De = ke, Ue = Pe - 1; Ue >= 0; Ue--) + if (!(n[Ie[Ue]] & s)) { + De = n[Ie[Ue]]; + break; + } + f(Le, De & (i | Z) ? I : De); + } + } + if (u.get(S)) + for (var Fe = 0; Fe < Ie.length; Fe++) { + var Oe = Ie[Fe]; + if (n[Oe] & S) + for (var Ne = Fe - 1; Ne >= -1; Ne--) { + var Ge = -1 === Ne ? ke : n[Ie[Ne]]; + if (Ge & a) { + Ge === B && f(Oe, C); + break; + } + } + } + if (u.get(B)) + for (var Ze = 0; Ze < Ie.length; Ze++) { + var ze = Ie[Ze]; + n[ze] & B && f(ze, x); + } + if (u.get(E) || u.get(w)) + for (var Qe = 1; Qe < Ie.length - 1; Qe++) { + var He = Ie[Qe]; + if (n[He] & (E | w)) { + for ( + var Ve = 0, je = 0, We = Qe - 1; + We >= 0 && (Ve = n[Ie[We]]) & s; + We-- + ); + for ( + var Xe = Qe + 1; + Xe < Ie.length && (je = n[Ie[Xe]]) & s; + Xe++ + ); + Ve === je && + (n[He] === E ? Ve === S : Ve & (S | C)) && + f(He, Ve); + } + } + if (u.get(S)) + for (var Ye = 0; Ye < Ie.length; Ye++) { + var qe = Ie[Ye]; + if (n[qe] & S) { + for ( + var Je = Ye - 1; + Je >= 0 && n[Ie[Je]] & (_ | s); + Je-- + ) + f(Ie[Je], S); + for ( + Ye++; + Ye < Ie.length && n[Ie[Ye]] & (_ | s | S); + Ye++ + ) + n[Ie[Ye]] !== S && f(Ie[Ye], S); + } + } + if (u.get(_) || u.get(E) || u.get(w)) + for (var Ke = 0; Ke < Ie.length; Ke++) { + var $e = Ie[Ke]; + if (n[$e] & (_ | E | w)) { + f($e, I); + for (var et = Ke - 1; et >= 0 && n[Ie[et]] & s; et--) + f(Ie[et], I); + for ( + var tt = Ke + 1; + tt < Ie.length && n[Ie[tt]] & s; + tt++ + ) + f(Ie[tt], I); + } + } + if (u.get(S)) + for (var nt = 0, rt = ke; nt < Ie.length; nt++) { + var it = Ie[nt], + at = n[it]; + at & S ? rt === b && f(it, b) : at & a && (rt = at); + } + if (u.get(o)) { + for ( + var ot = x | S | C, st = ot | b, lt = [], ut = [], ct = 0; + ct < Ie.length; + ct++ + ) + if (n[Ie[ct]] & o) { + var ft = e[Ie[ct]], + dt = void 0; + if (null !== g(ft)) { + if (!(ut.length < 63)) break; + ut.push({ char: ft, seqIndex: ct }); + } else if (null !== (dt = A(ft))) + for (var ht = ut.length - 1; ht >= 0; ht--) { + var pt = ut[ht].char; + if ( + pt === dt || + pt === A(y(ft)) || + g(y(pt)) === ft + ) { + lt.push([ut[ht].seqIndex, ct]), (ut.length = ht); + break; + } + } + } + lt.sort(function (e, t) { + return e[0] - t[0]; + }); + for (var vt = 0; vt < lt.length; vt++) { + for ( + var mt = lt[vt], + gt = mt[0], + At = mt[1], + yt = !1, + bt = 0, + xt = gt + 1; + xt < At; + xt++ + ) { + var St = Ie[xt]; + if (n[St] & st) { + yt = !0; + var Et = n[St] & ot ? x : b; + if (Et === Be) { + bt = Et; + break; + } + } + } + if (yt && !bt) { + bt = ke; + for (var _t = gt - 1; _t >= 0; _t--) { + var Ct = Ie[_t]; + if (n[Ct] & st) { + var wt = n[Ct] & ot ? x : b; + bt = wt !== Be ? wt : Be; + break; + } + } + } + if (bt) { + if (((n[Ie[gt]] = n[Ie[At]] = bt), bt !== Be)) + for (var Tt = gt + 1; Tt < Ie.length; Tt++) + if (!(n[Ie[Tt]] & s)) { + c(e[Ie[Tt]]) & R && (n[Ie[Tt]] = bt); + break; + } + if (bt !== Be) + for (var Mt = At + 1; Mt < Ie.length; Mt++) + if (!(n[Ie[Mt]] & s)) { + c(e[Ie[Mt]]) & R && (n[Ie[Mt]] = bt); + break; + } + } + } + for (var It = 0; It < Ie.length; It++) + if (n[Ie[It]] & o) { + for ( + var kt = It, Rt = It, Bt = ke, Pt = It - 1; + Pt >= 0; + Pt-- + ) { + if (!(n[Ie[Pt]] & s)) { + Bt = n[Ie[Pt]] & ot ? x : b; + break; + } + kt = Pt; + } + for (var Lt = Re, Dt = It + 1; Dt < Ie.length; Dt++) { + if (!(n[Ie[Dt]] & (o | s))) { + Lt = n[Ie[Dt]] & ot ? x : b; + break; + } + Rt = Dt; + } + for (var Ut = kt; Ut <= Rt; Ut++) + n[Ie[Ut]] = Bt === Lt ? Bt : Be; + It = Rt; + } + } + } + for (var Ft = v.start; Ft <= v.end; Ft++) { + var Ot = d[Ft], + Nt = n[Ft]; + if ( + (1 & Ot + ? Nt & (b | S | C) && d[Ft]++ + : Nt & x + ? d[Ft]++ + : Nt & (C | S) && (d[Ft] += 2), + Nt & s && (d[Ft] = 0 === Ft ? v.level : d[Ft - 1]), + Ft === v.end || c(e[Ft]) & (M | T)) + ) + for (var Gt = Ft; Gt >= 0 && c(e[Gt]) & l; Gt--) + d[Gt] = v.level; + } + } + return { levels: d, paragraphs: p }; + function Zt(t, r) { + for (var a = t; a < e.length; a++) { + var o = n[a]; + if (o & (x | B)) return 1; + if (o & (T | b) || (r && o === Z)) return 0; + if (o & i) { + var s = zt(a); + a = -1 === s ? e.length : s; + } + } + return 0; + } + function zt(t) { + for (var r = 1, a = t + 1; a < e.length; a++) { + var o = n[a]; + if (o & T) break; + if (o & Z) { + if (0 === --r) return a; + } else o & i && r++; + } + return -1; + } + }), + (e.getMirroredCharacter = H), + (e.getMirroredCharactersMap = function (e, t, n, r) { + var i = e.length; + (n = Math.max(0, null == n ? 0 : +n)), + (r = Math.min(i - 1, null == r ? i - 1 : +r)); + for (var a = new Map(), o = n; o <= r; o++) + if (1 & t[o]) { + var s = H(e[o]); + null !== s && a.set(o, s); + } + return a; + }), + (e.getReorderSegments = V), + (e.getReorderedIndices = j), + (e.getReorderedString = function (e, t, n, r) { + var i = j(e, t, n, r), + a = [].concat(e); + return ( + i.forEach(function (n, r) { + a[r] = (1 & t.levels[n] ? H(e[n]) : null) || e[n]; + }), + a.join("") + ); + }), + (e.openingToClosingBracket = g), + Object.defineProperty(e, "__esModule", { value: !0 }), + e + ); + })({}); + return e; + }, + uv = /\bvoid\s+main\s*\(\s*\)\s*{/g; + function cv(e) { + return e.replace(/^[ \t]*#include +<([\w\d./]+)>/gm, function (e, t) { + var n = Nd.ShaderChunk[t]; + return n ? cv(n) : e; + }); + } + for (var fv = [], dv = 0; dv < 256; dv++) + fv[dv] = (dv < 16 ? "0" : "") + dv.toString(16); + var hv = + Object.assign || + function () { + for (var e = arguments[0], t = 1, n = arguments.length; t < n; t++) { + var r = arguments[t]; + if (r) + for (var i in r) + Object.prototype.hasOwnProperty.call(r, i) && (e[i] = r[i]); + } + return e; + }, + pv = Date.now(), + vv = new WeakMap(), + mv = new Map(), + gv = 1e10; + function Av(e, t) { + var n = (function (e) { + var t = JSON.stringify(e, bv), + n = Sv.get(t); + null == n && Sv.set(t, (n = ++xv)); + return n; + })(t), + r = vv.get(e); + if ((r || vv.set(e, (r = Object.create(null))), r[n])) return new r[n](); + var i = "_onBeforeCompile".concat(n), + a = function (r, a) { + e.onBeforeCompile.call(this, r, a); + var o = + this.customProgramCacheKey() + + "|" + + r.vertexShader + + "|" + + r.fragmentShader, + s = mv[o]; + if (!s) { + var l = (function (e, t, n, r) { + var i = t.vertexShader, + a = t.fragmentShader, + o = n.vertexDefs, + s = n.vertexMainIntro, + l = n.vertexMainOutro, + u = n.vertexTransform, + c = n.fragmentDefs, + f = n.fragmentMainIntro, + d = n.fragmentMainOutro, + h = n.fragmentColorTransform, + p = n.customRewriter, + v = n.timeUniform; + (o = o || ""), + (s = s || ""), + (l = l || ""), + (c = c || ""), + (f = f || ""), + (d = d || ""), + (u || p) && (i = cv(i)); + (h || p) && + (a = cv( + (a = a.replace( + /^[ \t]*#include <((?:tonemapping|encodings|fog|premultiplied_alpha|dithering)_fragment)>/gm, + "\n//!BEGIN_POST_CHUNK $1\n$&\n//!END_POST_CHUNK\n" + )) + )); + if (p) { + var m = p({ vertexShader: i, fragmentShader: a }); + (i = m.vertexShader), (a = m.fragmentShader); + } + if (h) { + var g = []; + (a = a.replace( + /^\/\/!BEGIN_POST_CHUNK[^]+?^\/\/!END_POST_CHUNK/gm, + function (e) { + return g.push(e), ""; + } + )), + (d = "".concat(h, "\n").concat(g.join("\n"), "\n").concat(d)); + } + if (v) { + var A = "\nuniform float ".concat(v, ";\n"); + (o = A + o), (c = A + c); + } + u && + ((i = "vec3 troika_position_" + .concat(r, ";\nvec3 troika_normal_") + .concat(r, ";\nvec2 troika_uv_") + .concat(r, ";\n") + .concat(i, "\n")), + (o = "" + .concat(o, "\nvoid troikaVertexTransform") + .concat( + r, + "(inout vec3 position, inout vec3 normal, inout vec2 uv) {\n " + ) + .concat(u, "\n}\n")), + (s = "\ntroika_position_" + .concat(r, " = vec3(position);\ntroika_normal_") + .concat(r, " = vec3(normal);\ntroika_uv_") + .concat(r, " = vec2(uv);\ntroikaVertexTransform") + .concat(r, "(troika_position_") + .concat(r, ", troika_normal_") + .concat(r, ", troika_uv_") + .concat(r, ");\n") + .concat(s, "\n")), + (i = i.replace( + /\b(position|normal|uv)\b/g, + function (e, t, n, i) { + return /\battribute\s+vec[23]\s+$/.test(i.substr(0, n)) + ? t + : "troika_".concat(t, "_").concat(r); + } + )), + (e.map && e.map.channel > 0) || + (i = i.replace(/\bMAP_UV\b/g, "troika_uv_".concat(r)))); + return ( + (i = yv(i, r, o, s, l)), + (a = yv(a, r, c, f, d)), + { vertexShader: i, fragmentShader: a } + ); + })(this, r, t, n); + s = mv[o] = l; + } + (r.vertexShader = s.vertexShader), + (r.fragmentShader = s.fragmentShader), + hv(r.uniforms, this.uniforms), + t.timeUniform && + (r.uniforms[t.timeUniform] = { + get value() { + return Date.now() - pv; + }, + }), + this[i] && this[i](r); + }, + o = function () { + return s(t.chained ? e : e.clone()); + }, + s = function (r) { + var i = Object.create(r, l); + return ( + Object.defineProperty(i, "baseMaterial", { value: e }), + Object.defineProperty(i, "id", { value: gv++ }), + (i.uuid = (function () { + var e = (4294967295 * Math.random()) | 0, + t = (4294967295 * Math.random()) | 0, + n = (4294967295 * Math.random()) | 0, + r = (4294967295 * Math.random()) | 0; + return ( + fv[255 & e] + + fv[(e >> 8) & 255] + + fv[(e >> 16) & 255] + + fv[(e >> 24) & 255] + + "-" + + fv[255 & t] + + fv[(t >> 8) & 255] + + "-" + + fv[((t >> 16) & 15) | 64] + + fv[(t >> 24) & 255] + + "-" + + fv[(63 & n) | 128] + + fv[(n >> 8) & 255] + + "-" + + fv[(n >> 16) & 255] + + fv[(n >> 24) & 255] + + fv[255 & r] + + fv[(r >> 8) & 255] + + fv[(r >> 16) & 255] + + fv[(r >> 24) & 255] + ).toUpperCase(); + })()), + (i.uniforms = hv({}, r.uniforms, t.uniforms)), + (i.defines = hv({}, r.defines, t.defines)), + (i.defines["TROIKA_DERIVED_MATERIAL_".concat(n)] = ""), + (i.extensions = hv({}, r.extensions, t.extensions)), + (i._listeners = void 0), + i + ); + }, + l = { + constructor: { value: o }, + isDerivedMaterial: { value: !0 }, + customProgramCacheKey: { + writable: !0, + configurable: !0, + value: function () { + return e.customProgramCacheKey() + "|" + n; + }, + }, + onBeforeCompile: { + get: function () { + return a; + }, + set: function (e) { + this[i] = e; + }, + }, + copy: { + writable: !0, + configurable: !0, + value: function (t) { + return ( + e.copy.call(this, t), + e.isShaderMaterial || + e.isDerivedMaterial || + (hv(this.extensions, t.extensions), + hv(this.defines, t.defines), + hv(this.uniforms, Nd.UniformsUtils.clone(t.uniforms))), + this + ); + }, + }, + clone: { + writable: !0, + configurable: !0, + value: function () { + var t = new e.constructor(); + return s(t).copy(this); + }, + }, + getDepthMaterial: { + writable: !0, + configurable: !0, + value: function () { + var n = this._depthMaterial; + return ( + n || + (((n = this._depthMaterial = + Av( + e.isDerivedMaterial + ? e.getDepthMaterial() + : new Nd.MeshDepthMaterial({ + depthPacking: Nd.RGBADepthPacking, + }), + t + )).defines.IS_DEPTH_MATERIAL = ""), + (n.uniforms = this.uniforms)), + n + ); + }, + }, + getDistanceMaterial: { + writable: !0, + configurable: !0, + value: function () { + var n = this._distanceMaterial; + return ( + n || + (((n = this._distanceMaterial = + Av( + e.isDerivedMaterial + ? e.getDistanceMaterial() + : new Nd.MeshDistanceMaterial(), + t + )).defines.IS_DISTANCE_MATERIAL = ""), + (n.uniforms = this.uniforms)), + n + ); + }, + }, + dispose: { + writable: !0, + configurable: !0, + value: function () { + var t = this._depthMaterial, + n = this._distanceMaterial; + t && t.dispose(), n && n.dispose(), e.dispose.call(this); + }, + }, + }; + return (r[n] = o), new o(); + } + function yv(e, t, n, r, i) { + return ( + (r || i || n) && + ((e = e.replace( + uv, + "\n".concat(n, "\nvoid troikaOrigMain").concat(t, "() {") + )), + (e += "\nvoid main() {\n " + .concat(r, "\n troikaOrigMain") + .concat(t, "();\n ") + .concat(i, "\n}"))), + e + ); + } + function bv(e, t) { + return "uniforms" === e + ? void 0 + : "function" === typeof t + ? t.toString() + : t; + } + var xv = 0, + Sv = new Map(); + Nd.DoubleSide; + var Ev, + _v = function () { + return (self.performance || Date).now(); + }, + Cv = sv(); + var wv = [], + Tv = 0; + function Mv() { + for (var e = _v(); wv.length && _v() - e < 5; ) wv.shift()(); + Tv = wv.length ? setTimeout(Mv, 0) : 0; + } + var Iv = function () { + for (var e = arguments.length, t = new Array(e), n = 0; n < e; n++) + t[n] = arguments[n]; + return new Promise(function (e, n) { + wv.push(function () { + var r = _v(); + try { + var i; + (i = Cv.webgl).generateIntoCanvas.apply(i, t), + e({ timing: _v() - r }); + } catch (a) { + n(a); + } + }), + Tv || (Tv = setTimeout(Mv, 0)); + }); + }, + kv = 4, + Rv = 2e3, + Bv = {}, + Pv = 0; + function Lv(e, t, n, r, i, a, o, s, l, u) { + var c = "TroikaTextSDFGenerator_JS_" + (Pv++ % kv), + f = Bv[c]; + return ( + f || + (f = Bv[c] = + { + workerModule: iv({ + name: c, + workerId: c, + dependencies: [sv, _v], + init: function (e, t) { + var n = e().javascript.generate; + return function () { + var e = t(); + return { + textureData: n.apply(void 0, arguments), + timing: t() - e, + }; + }; + }, + getTransferables: function (e) { + return [e.textureData.buffer]; + }, + }), + requests: 0, + idleTimer: null, + }), + f.requests++, + clearTimeout(f.idleTimer), + f.workerModule(e, t, n, r, i, a).then(function (n) { + for ( + var r = n.textureData, + i = n.timing, + a = _v(), + d = new Uint8Array(4 * r.length), + h = 0; + h < r.length; + h++ + ) + d[4 * h + u] = r[h]; + return ( + Cv.webglUtils.renderImageData(o, d, s, l, e, t, 1 << (3 - u)), + (i += _v() - a), + 0 === --f.requests && + (f.idleTimer = setTimeout(function () { + !(function (e) { + nv[e] && + nv[e].forEach(function (e) { + e(); + }), + tv[e] && (tv[e].terminate(), delete tv[e]); + })(c); + }, Rv)), + { timing: i } + ); + }) + ); + } + var Dv = Cv.webglUtils.resizeWebGLCanvasWithoutClearing; + var Uv = iv({ + name: "Typr Font Parser", + dependencies: [ + function () { + return ( + "undefined" == typeof window && (self.window = self), + (function (e) { + var t = { + parse: function (e) { + var n = t._bin, + r = new Uint8Array(e); + if ("ttcf" == n.readASCII(r, 0, 4)) { + var i = 4; + n.readUshort(r, i), + (i += 2), + n.readUshort(r, i), + (i += 2); + var a = n.readUint(r, i); + i += 4; + for (var o = [], s = 0; s < a; s++) { + var l = n.readUint(r, i); + (i += 4), o.push(t._readFont(r, l)); + } + return o; + } + return [t._readFont(r, 0)]; + }, + _readFont: function (e, n) { + var r = t._bin, + i = n; + r.readFixed(e, n), (n += 4); + var a = r.readUshort(e, n); + (n += 2), + r.readUshort(e, n), + (n += 2), + r.readUshort(e, n), + (n += 2), + r.readUshort(e, n), + (n += 2); + for ( + var o = [ + "cmap", + "head", + "hhea", + "maxp", + "hmtx", + "name", + "OS/2", + "post", + "loca", + "glyf", + "kern", + "CFF ", + "GPOS", + "GSUB", + "SVG ", + ], + s = { _data: e, _offset: i }, + l = {}, + u = 0; + u < a; + u++ + ) { + var c = r.readASCII(e, n, 4); + (n += 4), r.readUint(e, n), (n += 4); + var f = r.readUint(e, n); + n += 4; + var d = r.readUint(e, n); + (n += 4), (l[c] = { offset: f, length: d }); + } + for (u = 0; u < o.length; u++) { + var h = o[u]; + l[h] && + (s[h.trim()] = t[h.trim()].parse( + e, + l[h].offset, + l[h].length, + s + )); + } + return s; + }, + _tabOffset: function (e, n, r) { + for ( + var i = t._bin, + a = i.readUshort(e, r + 4), + o = r + 12, + s = 0; + s < a; + s++ + ) { + var l = i.readASCII(e, o, 4); + (o += 4), i.readUint(e, o), (o += 4); + var u = i.readUint(e, o); + if (((o += 4), i.readUint(e, o), (o += 4), l == n)) + return u; + } + return 0; + }, + }; + (t._bin = { + readFixed: function (e, t) { + return ( + ((e[t] << 8) | e[t + 1]) + + ((e[t + 2] << 8) | e[t + 3]) / 65540 + ); + }, + readF2dot14: function (e, n) { + return t._bin.readShort(e, n) / 16384; + }, + readInt: function (e, n) { + return t._bin._view(e).getInt32(n); + }, + readInt8: function (e, n) { + return t._bin._view(e).getInt8(n); + }, + readShort: function (e, n) { + return t._bin._view(e).getInt16(n); + }, + readUshort: function (e, n) { + return t._bin._view(e).getUint16(n); + }, + readUshorts: function (e, n, r) { + for (var i = [], a = 0; a < r; a++) + i.push(t._bin.readUshort(e, n + 2 * a)); + return i; + }, + readUint: function (e, n) { + return t._bin._view(e).getUint32(n); + }, + readUint64: function (e, n) { + return ( + 4294967296 * t._bin.readUint(e, n) + + t._bin.readUint(e, n + 4) + ); + }, + readASCII: function (e, t, n) { + for (var r = "", i = 0; i < n; i++) + r += String.fromCharCode(e[t + i]); + return r; + }, + readUnicode: function (e, t, n) { + for (var r = "", i = 0; i < n; i++) { + var a = (e[t++] << 8) | e[t++]; + r += String.fromCharCode(a); + } + return r; + }, + _tdec: + "undefined" != typeof window && window.TextDecoder + ? new window.TextDecoder() + : null, + readUTF8: function (e, n, r) { + var i = t._bin._tdec; + return i && 0 == n && r == e.length + ? i.decode(e) + : t._bin.readASCII(e, n, r); + }, + readBytes: function (e, t, n) { + for (var r = [], i = 0; i < n; i++) r.push(e[t + i]); + return r; + }, + readASCIIArray: function (e, t, n) { + for (var r = [], i = 0; i < n; i++) + r.push(String.fromCharCode(e[t + i])); + return r; + }, + _view: function (e) { + return ( + e._dataView || + (e._dataView = e.buffer + ? new DataView(e.buffer, e.byteOffset, e.byteLength) + : new DataView(new Uint8Array(e).buffer)) + ); + }, + }), + (t._lctf = {}), + (t._lctf.parse = function (e, n, r, i, a) { + var o = t._bin, + s = {}, + l = n; + o.readFixed(e, n), (n += 4); + var u = o.readUshort(e, n); + n += 2; + var c = o.readUshort(e, n); + n += 2; + var f = o.readUshort(e, n); + return ( + (n += 2), + (s.scriptList = t._lctf.readScriptList(e, l + u)), + (s.featureList = t._lctf.readFeatureList(e, l + c)), + (s.lookupList = t._lctf.readLookupList(e, l + f, a)), + s + ); + }), + (t._lctf.readLookupList = function (e, n, r) { + var i = t._bin, + a = n, + o = [], + s = i.readUshort(e, n); + n += 2; + for (var l = 0; l < s; l++) { + var u = i.readUshort(e, n); + n += 2; + var c = t._lctf.readLookupTable(e, a + u, r); + o.push(c); + } + return o; + }), + (t._lctf.readLookupTable = function (e, n, r) { + var i = t._bin, + a = n, + o = { tabs: [] }; + (o.ltype = i.readUshort(e, n)), + (n += 2), + (o.flag = i.readUshort(e, n)), + (n += 2); + var s = i.readUshort(e, n); + n += 2; + for (var l = o.ltype, u = 0; u < s; u++) { + var c = i.readUshort(e, n); + n += 2; + var f = r(e, l, a + c, o); + o.tabs.push(f); + } + return o; + }), + (t._lctf.numOfOnes = function (e) { + for (var t = 0, n = 0; n < 32; n++) + 0 != ((e >>> n) & 1) && t++; + return t; + }), + (t._lctf.readClassDef = function (e, n) { + var r = t._bin, + i = [], + a = r.readUshort(e, n); + if (((n += 2), 1 == a)) { + var o = r.readUshort(e, n); + n += 2; + var s = r.readUshort(e, n); + n += 2; + for (var l = 0; l < s; l++) + i.push(o + l), + i.push(o + l), + i.push(r.readUshort(e, n)), + (n += 2); + } + if (2 == a) { + var u = r.readUshort(e, n); + for (n += 2, l = 0; l < u; l++) + i.push(r.readUshort(e, n)), + (n += 2), + i.push(r.readUshort(e, n)), + (n += 2), + i.push(r.readUshort(e, n)), + (n += 2); + } + return i; + }), + (t._lctf.getInterval = function (e, t) { + for (var n = 0; n < e.length; n += 3) { + var r = e[n], + i = e[n + 1]; + if ((e[n + 2], r <= t && t <= i)) return n; + } + return -1; + }), + (t._lctf.readCoverage = function (e, n) { + var r = t._bin, + i = {}; + (i.fmt = r.readUshort(e, n)), (n += 2); + var a = r.readUshort(e, n); + return ( + (n += 2), + 1 == i.fmt && (i.tab = r.readUshorts(e, n, a)), + 2 == i.fmt && (i.tab = r.readUshorts(e, n, 3 * a)), + i + ); + }), + (t._lctf.coverageIndex = function (e, n) { + var r = e.tab; + if (1 == e.fmt) return r.indexOf(n); + if (2 == e.fmt) { + var i = t._lctf.getInterval(r, n); + if (-1 != i) return r[i + 2] + (n - r[i]); + } + return -1; + }), + (t._lctf.readFeatureList = function (e, n) { + var r = t._bin, + i = n, + a = [], + o = r.readUshort(e, n); + n += 2; + for (var s = 0; s < o; s++) { + var l = r.readASCII(e, n, 4); + n += 4; + var u = r.readUshort(e, n); + n += 2; + var c = t._lctf.readFeatureTable(e, i + u); + (c.tag = l.trim()), a.push(c); + } + return a; + }), + (t._lctf.readFeatureTable = function (e, n) { + var r = t._bin, + i = n, + a = {}, + o = r.readUshort(e, n); + (n += 2), o > 0 && (a.featureParams = i + o); + var s = r.readUshort(e, n); + (n += 2), (a.tab = []); + for (var l = 0; l < s; l++) + a.tab.push(r.readUshort(e, n + 2 * l)); + return a; + }), + (t._lctf.readScriptList = function (e, n) { + var r = t._bin, + i = n, + a = {}, + o = r.readUshort(e, n); + n += 2; + for (var s = 0; s < o; s++) { + var l = r.readASCII(e, n, 4); + n += 4; + var u = r.readUshort(e, n); + (n += 2), + (a[l.trim()] = t._lctf.readScriptTable(e, i + u)); + } + return a; + }), + (t._lctf.readScriptTable = function (e, n) { + var r = t._bin, + i = n, + a = {}, + o = r.readUshort(e, n); + (n += 2), (a.default = t._lctf.readLangSysTable(e, i + o)); + var s = r.readUshort(e, n); + n += 2; + for (var l = 0; l < s; l++) { + var u = r.readASCII(e, n, 4); + n += 4; + var c = r.readUshort(e, n); + (n += 2), + (a[u.trim()] = t._lctf.readLangSysTable(e, i + c)); + } + return a; + }), + (t._lctf.readLangSysTable = function (e, n) { + var r = t._bin, + i = {}; + r.readUshort(e, n), + (n += 2), + (i.reqFeature = r.readUshort(e, n)), + (n += 2); + var a = r.readUshort(e, n); + return (n += 2), (i.features = r.readUshorts(e, n, a)), i; + }), + (t.CFF = {}), + (t.CFF.parse = function (e, n, r) { + var i = t._bin; + (e = new Uint8Array(e.buffer, n, r))[(n = 0)], + e[++n], + e[++n], + e[++n], + n++; + var a = []; + n = t.CFF.readIndex(e, n, a); + for (var o = [], s = 0; s < a.length - 1; s++) + o.push(i.readASCII(e, n + a[s], a[s + 1] - a[s])); + n += a[a.length - 1]; + var l = []; + n = t.CFF.readIndex(e, n, l); + var u = []; + for (s = 0; s < l.length - 1; s++) + u.push(t.CFF.readDict(e, n + l[s], n + l[s + 1])); + n += l[l.length - 1]; + var c = u[0], + f = []; + n = t.CFF.readIndex(e, n, f); + var d = []; + for (s = 0; s < f.length - 1; s++) + d.push(i.readASCII(e, n + f[s], f[s + 1] - f[s])); + if ( + ((n += f[f.length - 1]), + t.CFF.readSubrs(e, n, c), + c.CharStrings) + ) { + (n = c.CharStrings), + (f = []), + (n = t.CFF.readIndex(e, n, f)); + var h = []; + for (s = 0; s < f.length - 1; s++) + h.push(i.readBytes(e, n + f[s], f[s + 1] - f[s])); + c.CharStrings = h; + } + if (c.ROS) { + n = c.FDArray; + var p = []; + for ( + n = t.CFF.readIndex(e, n, p), c.FDArray = [], s = 0; + s < p.length - 1; + s++ + ) { + var v = t.CFF.readDict(e, n + p[s], n + p[s + 1]); + t.CFF._readFDict(e, v, d), c.FDArray.push(v); + } + (n += p[p.length - 1]), + (n = c.FDSelect), + (c.FDSelect = []); + var m = e[n]; + if ((n++, 3 != m)) throw m; + var g = i.readUshort(e, n); + for (n += 2, s = 0; s < g + 1; s++) + c.FDSelect.push(i.readUshort(e, n), e[n + 2]), (n += 3); + } + return ( + c.Encoding && + (c.Encoding = t.CFF.readEncoding( + e, + c.Encoding, + c.CharStrings.length + )), + c.charset && + (c.charset = t.CFF.readCharset( + e, + c.charset, + c.CharStrings.length + )), + t.CFF._readFDict(e, c, d), + c + ); + }), + (t.CFF._readFDict = function (e, n, r) { + var i; + for (var a in (n.Private && + ((i = n.Private[1]), + (n.Private = t.CFF.readDict(e, i, i + n.Private[0])), + n.Private.Subrs && + t.CFF.readSubrs(e, i + n.Private.Subrs, n.Private)), + n)) + -1 != + [ + "FamilyName", + "FontName", + "FullName", + "Notice", + "version", + "Copyright", + ].indexOf(a) && (n[a] = r[n[a] - 426 + 35]); + }), + (t.CFF.readSubrs = function (e, n, r) { + var i = t._bin, + a = []; + n = t.CFF.readIndex(e, n, a); + var o, + s = a.length; + (o = s < 1240 ? 107 : s < 33900 ? 1131 : 32768), + (r.Bias = o), + (r.Subrs = []); + for (var l = 0; l < a.length - 1; l++) + r.Subrs.push(i.readBytes(e, n + a[l], a[l + 1] - a[l])); + }), + (t.CFF.tableSE = [ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 5, 6, 7, 8, + 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, + 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, + 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, + 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, + 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, + 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 96, 97, 98, 99, 100, 101, 102, + 103, 104, 105, 106, 107, 108, 109, 110, 0, 111, 112, 113, + 114, 0, 115, 116, 117, 118, 119, 120, 121, 122, 0, 123, 0, + 124, 125, 126, 127, 128, 129, 130, 131, 0, 132, 133, 0, 134, + 135, 136, 137, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 138, 0, 139, 0, 0, 0, 0, 140, 141, 142, 143, 0, 0, 0, 0, + 0, 144, 0, 0, 0, 145, 0, 0, 146, 147, 148, 149, 0, 0, 0, 0, + ]), + (t.CFF.glyphByUnicode = function (e, t) { + for (var n = 0; n < e.charset.length; n++) + if (e.charset[n] == t) return n; + return -1; + }), + (t.CFF.glyphBySE = function (e, n) { + return n < 0 || n > 255 + ? -1 + : t.CFF.glyphByUnicode(e, t.CFF.tableSE[n]); + }), + (t.CFF.readEncoding = function (e, n, r) { + t._bin; + var i = [".notdef"], + a = e[n]; + if ((n++, 0 != a)) + throw "error: unknown encoding format: " + a; + var o = e[n]; + n++; + for (var s = 0; s < o; s++) i.push(e[n + s]); + return i; + }), + (t.CFF.readCharset = function (e, n, r) { + var i = t._bin, + a = [".notdef"], + o = e[n]; + if ((n++, 0 == o)) + for (var s = 0; s < r; s++) { + var l = i.readUshort(e, n); + (n += 2), a.push(l); + } + else { + if (1 != o && 2 != o) throw "error: format: " + o; + for (; a.length < r; ) { + (l = i.readUshort(e, n)), (n += 2); + var u = 0; + for ( + 1 == o + ? ((u = e[n]), n++) + : ((u = i.readUshort(e, n)), (n += 2)), + s = 0; + s <= u; + s++ + ) + a.push(l), l++; + } + } + return a; + }), + (t.CFF.readIndex = function (e, n, r) { + var i = t._bin, + a = i.readUshort(e, n) + 1, + o = e[(n += 2)]; + if ((n++, 1 == o)) + for (var s = 0; s < a; s++) r.push(e[n + s]); + else if (2 == o) + for (s = 0; s < a; s++) + r.push(i.readUshort(e, n + 2 * s)); + else if (3 == o) + for (s = 0; s < a; s++) + r.push(16777215 & i.readUint(e, n + 3 * s - 1)); + else if (1 != a) + throw "unsupported offset size: " + o + ", count: " + a; + return (n += a * o) - 1; + }), + (t.CFF.getCharString = function (e, n, r) { + var i = t._bin, + a = e[n], + o = e[n + 1]; + e[n + 2], e[n + 3], e[n + 4]; + var s = 1, + l = null, + u = null; + a <= 20 && ((l = a), (s = 1)), + 12 == a && ((l = 100 * a + o), (s = 2)), + 21 <= a && a <= 27 && ((l = a), (s = 1)), + 28 == a && ((u = i.readShort(e, n + 1)), (s = 3)), + 29 <= a && a <= 31 && ((l = a), (s = 1)), + 32 <= a && a <= 246 && ((u = a - 139), (s = 1)), + 247 <= a && + a <= 250 && + ((u = 256 * (a - 247) + o + 108), (s = 2)), + 251 <= a && + a <= 254 && + ((u = 256 * -(a - 251) - o - 108), (s = 2)), + 255 == a && ((u = i.readInt(e, n + 1) / 65535), (s = 5)), + (r.val = null != u ? u : "o" + l), + (r.size = s); + }), + (t.CFF.readCharString = function (e, n, r) { + for (var i = n + r, a = t._bin, o = []; n < i; ) { + var s = e[n], + l = e[n + 1]; + e[n + 2], e[n + 3], e[n + 4]; + var u = 1, + c = null, + f = null; + s <= 20 && ((c = s), (u = 1)), + 12 == s && ((c = 100 * s + l), (u = 2)), + (19 != s && 20 != s) || ((c = s), (u = 2)), + 21 <= s && s <= 27 && ((c = s), (u = 1)), + 28 == s && ((f = a.readShort(e, n + 1)), (u = 3)), + 29 <= s && s <= 31 && ((c = s), (u = 1)), + 32 <= s && s <= 246 && ((f = s - 139), (u = 1)), + 247 <= s && + s <= 250 && + ((f = 256 * (s - 247) + l + 108), (u = 2)), + 251 <= s && + s <= 254 && + ((f = 256 * -(s - 251) - l - 108), (u = 2)), + 255 == s && + ((f = a.readInt(e, n + 1) / 65535), (u = 5)), + o.push(null != f ? f : "o" + c), + (n += u); + } + return o; + }), + (t.CFF.readDict = function (e, n, r) { + for (var i = t._bin, a = {}, o = []; n < r; ) { + var s = e[n], + l = e[n + 1]; + e[n + 2], e[n + 3], e[n + 4]; + var u = 1, + c = null, + f = null; + if ( + (28 == s && ((f = i.readShort(e, n + 1)), (u = 3)), + 29 == s && ((f = i.readInt(e, n + 1)), (u = 5)), + 32 <= s && s <= 246 && ((f = s - 139), (u = 1)), + 247 <= s && + s <= 250 && + ((f = 256 * (s - 247) + l + 108), (u = 2)), + 251 <= s && + s <= 254 && + ((f = 256 * -(s - 251) - l - 108), (u = 2)), + 255 == s) + ) + throw ( + ((f = i.readInt(e, n + 1) / 65535), + (u = 5), + "unknown number") + ); + if (30 == s) { + var d = []; + for (u = 1; ; ) { + var h = e[n + u]; + u++; + var p = h >> 4, + v = 15 & h; + if ( + (15 != p && d.push(p), + 15 != v && d.push(v), + 15 == v) + ) + break; + } + for ( + var m = "", + g = [ + 0, + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + ".", + "e", + "e-", + "reserved", + "-", + "endOfNumber", + ], + A = 0; + A < d.length; + A++ + ) + m += g[d[A]]; + f = parseFloat(m); + } + s <= 21 && + ((c = [ + "version", + "Notice", + "FullName", + "FamilyName", + "Weight", + "FontBBox", + "BlueValues", + "OtherBlues", + "FamilyBlues", + "FamilyOtherBlues", + "StdHW", + "StdVW", + "escape", + "UniqueID", + "XUID", + "charset", + "Encoding", + "CharStrings", + "Private", + "Subrs", + "defaultWidthX", + "nominalWidthX", + ][s]), + (u = 1), + 12 == s && + ((c = [ + "Copyright", + "isFixedPitch", + "ItalicAngle", + "UnderlinePosition", + "UnderlineThickness", + "PaintType", + "CharstringType", + "FontMatrix", + "StrokeWidth", + "BlueScale", + "BlueShift", + "BlueFuzz", + "StemSnapH", + "StemSnapV", + "ForceBold", + 0, + 0, + "LanguageGroup", + "ExpansionFactor", + "initialRandomSeed", + "SyntheticBase", + "PostScript", + "BaseFontName", + "BaseFontBlend", + 0, + 0, + 0, + 0, + 0, + 0, + "ROS", + "CIDFontVersion", + "CIDFontRevision", + "CIDFontType", + "CIDCount", + "UIDBase", + "FDArray", + "FDSelect", + "FontName", + ][l]), + (u = 2))), + null != c + ? ((a[c] = 1 == o.length ? o[0] : o), (o = [])) + : o.push(f), + (n += u); + } + return a; + }), + (t.cmap = {}), + (t.cmap.parse = function (e, n, r) { + (e = new Uint8Array(e.buffer, n, r)), (n = 0); + var i = t._bin, + a = {}; + i.readUshort(e, n), (n += 2); + var o = i.readUshort(e, n); + n += 2; + var s = []; + a.tables = []; + for (var l = 0; l < o; l++) { + var u = i.readUshort(e, n); + n += 2; + var c = i.readUshort(e, n); + n += 2; + var f = i.readUint(e, n); + n += 4; + var d = "p" + u + "e" + c, + h = s.indexOf(f); + if (-1 == h) { + var p; + (h = a.tables.length), s.push(f); + var v = i.readUshort(e, f); + 0 == v + ? (p = t.cmap.parse0(e, f)) + : 4 == v + ? (p = t.cmap.parse4(e, f)) + : 6 == v + ? (p = t.cmap.parse6(e, f)) + : 12 == v + ? (p = t.cmap.parse12(e, f)) + : console.debug("unknown format: " + v, u, c, f), + a.tables.push(p); + } + if (null != a[d]) + throw "multiple tables for one platform+encoding"; + a[d] = h; + } + return a; + }), + (t.cmap.parse0 = function (e, n) { + var r = t._bin, + i = {}; + (i.format = r.readUshort(e, n)), (n += 2); + var a = r.readUshort(e, n); + (n += 2), r.readUshort(e, n), (n += 2), (i.map = []); + for (var o = 0; o < a - 6; o++) i.map.push(e[n + o]); + return i; + }), + (t.cmap.parse4 = function (e, n) { + var r = t._bin, + i = n, + a = {}; + (a.format = r.readUshort(e, n)), (n += 2); + var o = r.readUshort(e, n); + (n += 2), r.readUshort(e, n), (n += 2); + var s = r.readUshort(e, n); + n += 2; + var l = s / 2; + (a.searchRange = r.readUshort(e, n)), + (n += 2), + (a.entrySelector = r.readUshort(e, n)), + (n += 2), + (a.rangeShift = r.readUshort(e, n)), + (n += 2), + (a.endCount = r.readUshorts(e, n, l)), + (n += 2 * l), + (n += 2), + (a.startCount = r.readUshorts(e, n, l)), + (n += 2 * l), + (a.idDelta = []); + for (var u = 0; u < l; u++) + a.idDelta.push(r.readShort(e, n)), (n += 2); + for ( + a.idRangeOffset = r.readUshorts(e, n, l), + n += 2 * l, + a.glyphIdArray = []; + n < i + o; + + ) + a.glyphIdArray.push(r.readUshort(e, n)), (n += 2); + return a; + }), + (t.cmap.parse6 = function (e, n) { + var r = t._bin, + i = {}; + (i.format = r.readUshort(e, n)), + (n += 2), + r.readUshort(e, n), + (n += 2), + r.readUshort(e, n), + (n += 2), + (i.firstCode = r.readUshort(e, n)), + (n += 2); + var a = r.readUshort(e, n); + (n += 2), (i.glyphIdArray = []); + for (var o = 0; o < a; o++) + i.glyphIdArray.push(r.readUshort(e, n)), (n += 2); + return i; + }), + (t.cmap.parse12 = function (e, n) { + var r = t._bin, + i = {}; + (i.format = r.readUshort(e, n)), + (n += 2), + (n += 2), + r.readUint(e, n), + (n += 4), + r.readUint(e, n), + (n += 4); + var a = r.readUint(e, n); + (n += 4), (i.groups = []); + for (var o = 0; o < a; o++) { + var s = n + 12 * o, + l = r.readUint(e, s + 0), + u = r.readUint(e, s + 4), + c = r.readUint(e, s + 8); + i.groups.push([l, u, c]); + } + return i; + }), + (t.glyf = {}), + (t.glyf.parse = function (e, t, n, r) { + for (var i = [], a = 0; a < r.maxp.numGlyphs; a++) + i.push(null); + return i; + }), + (t.glyf._parseGlyf = function (e, n) { + var r = t._bin, + i = e._data, + a = t._tabOffset(i, "glyf", e._offset) + e.loca[n]; + if (e.loca[n] == e.loca[n + 1]) return null; + var o = {}; + if ( + ((o.noc = r.readShort(i, a)), + (a += 2), + (o.xMin = r.readShort(i, a)), + (a += 2), + (o.yMin = r.readShort(i, a)), + (a += 2), + (o.xMax = r.readShort(i, a)), + (a += 2), + (o.yMax = r.readShort(i, a)), + (a += 2), + o.xMin >= o.xMax || o.yMin >= o.yMax) + ) + return null; + if (o.noc > 0) { + o.endPts = []; + for (var s = 0; s < o.noc; s++) + o.endPts.push(r.readUshort(i, a)), (a += 2); + var l = r.readUshort(i, a); + if (((a += 2), i.length - a < l)) return null; + (o.instructions = r.readBytes(i, a, l)), (a += l); + var u = o.endPts[o.noc - 1] + 1; + for (o.flags = [], s = 0; s < u; s++) { + var c = i[a]; + if ((a++, o.flags.push(c), 0 != (8 & c))) { + var f = i[a]; + a++; + for (var d = 0; d < f; d++) o.flags.push(c), s++; + } + } + for (o.xs = [], s = 0; s < u; s++) { + var h = 0 != (2 & o.flags[s]), + p = 0 != (16 & o.flags[s]); + h + ? (o.xs.push(p ? i[a] : -i[a]), a++) + : p + ? o.xs.push(0) + : (o.xs.push(r.readShort(i, a)), (a += 2)); + } + for (o.ys = [], s = 0; s < u; s++) + (h = 0 != (4 & o.flags[s])), + (p = 0 != (32 & o.flags[s])), + h + ? (o.ys.push(p ? i[a] : -i[a]), a++) + : p + ? o.ys.push(0) + : (o.ys.push(r.readShort(i, a)), (a += 2)); + var v = 0, + m = 0; + for (s = 0; s < u; s++) + (v += o.xs[s]), + (m += o.ys[s]), + (o.xs[s] = v), + (o.ys[s] = m); + } else { + var g; + o.parts = []; + do { + (g = r.readUshort(i, a)), (a += 2); + var A = { + m: { a: 1, b: 0, c: 0, d: 1, tx: 0, ty: 0 }, + p1: -1, + p2: -1, + }; + if ( + (o.parts.push(A), + (A.glyphIndex = r.readUshort(i, a)), + (a += 2), + 1 & g) + ) { + var y = r.readShort(i, a); + a += 2; + var b = r.readShort(i, a); + a += 2; + } else + (y = r.readInt8(i, a)), + a++, + (b = r.readInt8(i, a)), + a++; + 2 & g + ? ((A.m.tx = y), (A.m.ty = b)) + : ((A.p1 = y), (A.p2 = b)), + 8 & g + ? ((A.m.a = A.m.d = r.readF2dot14(i, a)), (a += 2)) + : 64 & g + ? ((A.m.a = r.readF2dot14(i, a)), + (a += 2), + (A.m.d = r.readF2dot14(i, a)), + (a += 2)) + : 128 & g && + ((A.m.a = r.readF2dot14(i, a)), + (a += 2), + (A.m.b = r.readF2dot14(i, a)), + (a += 2), + (A.m.c = r.readF2dot14(i, a)), + (a += 2), + (A.m.d = r.readF2dot14(i, a)), + (a += 2)); + } while (32 & g); + if (256 & g) { + var x = r.readUshort(i, a); + for (a += 2, o.instr = [], s = 0; s < x; s++) + o.instr.push(i[a]), a++; + } + } + return o; + }), + (t.GPOS = {}), + (t.GPOS.parse = function (e, n, r, i) { + return t._lctf.parse(e, n, r, i, t.GPOS.subt); + }), + (t.GPOS.subt = function (e, n, r, i) { + var a = t._bin, + o = r, + s = {}; + if ( + ((s.fmt = a.readUshort(e, r)), + (r += 2), + 1 == n || + 2 == n || + 3 == n || + 7 == n || + (8 == n && s.fmt <= 2)) + ) { + var l = a.readUshort(e, r); + (r += 2), (s.coverage = t._lctf.readCoverage(e, l + o)); + } + if (1 == n && 1 == s.fmt) { + var u = a.readUshort(e, r); + r += 2; + var c = t._lctf.numOfOnes(u); + 0 != u && (s.pos = t.GPOS.readValueRecord(e, r, u)); + } else if (2 == n && s.fmt >= 1 && s.fmt <= 2) { + (u = a.readUshort(e, r)), (r += 2); + var f = a.readUshort(e, r); + (r += 2), (c = t._lctf.numOfOnes(u)); + var d = t._lctf.numOfOnes(f); + if (1 == s.fmt) { + s.pairsets = []; + var h = a.readUshort(e, r); + r += 2; + for (var p = 0; p < h; p++) { + var v = o + a.readUshort(e, r); + r += 2; + var m = a.readUshort(e, v); + v += 2; + for (var g = [], A = 0; A < m; A++) { + var y = a.readUshort(e, v); + (v += 2), + 0 != u && + ((C = t.GPOS.readValueRecord(e, v, u)), + (v += 2 * c)), + 0 != f && + ((w = t.GPOS.readValueRecord(e, v, f)), + (v += 2 * d)), + g.push({ gid2: y, val1: C, val2: w }); + } + s.pairsets.push(g); + } + } + if (2 == s.fmt) { + var b = a.readUshort(e, r); + r += 2; + var x = a.readUshort(e, r); + r += 2; + var S = a.readUshort(e, r); + r += 2; + var E = a.readUshort(e, r); + for ( + r += 2, + s.classDef1 = t._lctf.readClassDef(e, o + b), + s.classDef2 = t._lctf.readClassDef(e, o + x), + s.matrix = [], + p = 0; + p < S; + p++ + ) { + var _ = []; + for (A = 0; A < E; A++) { + var C = null, + w = null; + 0 != u && + ((C = t.GPOS.readValueRecord(e, r, u)), + (r += 2 * c)), + 0 != f && + ((w = t.GPOS.readValueRecord(e, r, f)), + (r += 2 * d)), + _.push({ val1: C, val2: w }); + } + s.matrix.push(_); + } + } + } else { + if (9 == n && 1 == s.fmt) { + var T = a.readUshort(e, r); + r += 2; + var M = a.readUint(e, r); + if (((r += 4), 9 == i.ltype)) i.ltype = T; + else if (i.ltype != T) + throw "invalid extension substitution"; + return t.GPOS.subt(e, i.ltype, o + M); + } + console.debug( + "unsupported GPOS table LookupType", + n, + "format", + s.fmt + ); + } + return s; + }), + (t.GPOS.readValueRecord = function (e, n, r) { + var i = t._bin, + a = []; + return ( + a.push(1 & r ? i.readShort(e, n) : 0), + (n += 1 & r ? 2 : 0), + a.push(2 & r ? i.readShort(e, n) : 0), + (n += 2 & r ? 2 : 0), + a.push(4 & r ? i.readShort(e, n) : 0), + (n += 4 & r ? 2 : 0), + a.push(8 & r ? i.readShort(e, n) : 0), + (n += 8 & r ? 2 : 0), + a + ); + }), + (t.GSUB = {}), + (t.GSUB.parse = function (e, n, r, i) { + return t._lctf.parse(e, n, r, i, t.GSUB.subt); + }), + (t.GSUB.subt = function (e, n, r, i) { + var a = t._bin, + o = r, + s = {}; + if ( + ((s.fmt = a.readUshort(e, r)), + (r += 2), + 1 != n && 4 != n && 5 != n && 6 != n) + ) + return null; + if ( + 1 == n || + 4 == n || + (5 == n && s.fmt <= 2) || + (6 == n && s.fmt <= 2) + ) { + var l = a.readUshort(e, r); + (r += 2), (s.coverage = t._lctf.readCoverage(e, o + l)); + } + if (1 == n && s.fmt >= 1 && s.fmt <= 2) { + if (1 == s.fmt) (s.delta = a.readShort(e, r)), (r += 2); + else if (2 == s.fmt) { + var u = a.readUshort(e, r); + (r += 2), + (s.newg = a.readUshorts(e, r, u)), + (r += 2 * s.newg.length); + } + } else if (4 == n) { + (s.vals = []), (u = a.readUshort(e, r)), (r += 2); + for (var c = 0; c < u; c++) { + var f = a.readUshort(e, r); + (r += 2), s.vals.push(t.GSUB.readLigatureSet(e, o + f)); + } + } else if (5 == n && 2 == s.fmt) { + if (2 == s.fmt) { + var d = a.readUshort(e, r); + (r += 2), + (s.cDef = t._lctf.readClassDef(e, o + d)), + (s.scset = []); + var h = a.readUshort(e, r); + for (r += 2, c = 0; c < h; c++) { + var p = a.readUshort(e, r); + (r += 2), + s.scset.push( + 0 == p ? null : t.GSUB.readSubClassSet(e, o + p) + ); + } + } + } else if (6 == n && 3 == s.fmt) { + if (3 == s.fmt) { + for (c = 0; c < 3; c++) { + (u = a.readUshort(e, r)), (r += 2); + for (var v = [], m = 0; m < u; m++) + v.push( + t._lctf.readCoverage( + e, + o + a.readUshort(e, r + 2 * m) + ) + ); + (r += 2 * u), + 0 == c && (s.backCvg = v), + 1 == c && (s.inptCvg = v), + 2 == c && (s.ahedCvg = v); + } + (u = a.readUshort(e, r)), + (r += 2), + (s.lookupRec = t.GSUB.readSubstLookupRecords( + e, + r, + u + )); + } + } else { + if (7 == n && 1 == s.fmt) { + var g = a.readUshort(e, r); + r += 2; + var A = a.readUint(e, r); + if (((r += 4), 9 == i.ltype)) i.ltype = g; + else if (i.ltype != g) + throw "invalid extension substitution"; + return t.GSUB.subt(e, i.ltype, o + A); + } + console.debug( + "unsupported GSUB table LookupType", + n, + "format", + s.fmt + ); + } + return s; + }), + (t.GSUB.readSubClassSet = function (e, n) { + var r = t._bin.readUshort, + i = n, + a = [], + o = r(e, n); + n += 2; + for (var s = 0; s < o; s++) { + var l = r(e, n); + (n += 2), a.push(t.GSUB.readSubClassRule(e, i + l)); + } + return a; + }), + (t.GSUB.readSubClassRule = function (e, n) { + var r = t._bin.readUshort, + i = {}, + a = r(e, n), + o = r(e, (n += 2)); + (n += 2), (i.input = []); + for (var s = 0; s < a - 1; s++) + i.input.push(r(e, n)), (n += 2); + return ( + (i.substLookupRecords = t.GSUB.readSubstLookupRecords( + e, + n, + o + )), + i + ); + }), + (t.GSUB.readSubstLookupRecords = function (e, n, r) { + for (var i = t._bin.readUshort, a = [], o = 0; o < r; o++) + a.push(i(e, n), i(e, n + 2)), (n += 4); + return a; + }), + (t.GSUB.readChainSubClassSet = function (e, n) { + var r = t._bin, + i = n, + a = [], + o = r.readUshort(e, n); + n += 2; + for (var s = 0; s < o; s++) { + var l = r.readUshort(e, n); + (n += 2), a.push(t.GSUB.readChainSubClassRule(e, i + l)); + } + return a; + }), + (t.GSUB.readChainSubClassRule = function (e, n) { + for ( + var r = t._bin, + i = {}, + a = ["backtrack", "input", "lookahead"], + o = 0; + o < a.length; + o++ + ) { + var s = r.readUshort(e, n); + (n += 2), + 1 == o && s--, + (i[a[o]] = r.readUshorts(e, n, s)), + (n += 2 * i[a[o]].length); + } + return ( + (s = r.readUshort(e, n)), + (n += 2), + (i.subst = r.readUshorts(e, n, 2 * s)), + (n += 2 * i.subst.length), + i + ); + }), + (t.GSUB.readLigatureSet = function (e, n) { + var r = t._bin, + i = n, + a = [], + o = r.readUshort(e, n); + n += 2; + for (var s = 0; s < o; s++) { + var l = r.readUshort(e, n); + (n += 2), a.push(t.GSUB.readLigature(e, i + l)); + } + return a; + }), + (t.GSUB.readLigature = function (e, n) { + var r = t._bin, + i = { chain: [] }; + (i.nglyph = r.readUshort(e, n)), (n += 2); + var a = r.readUshort(e, n); + n += 2; + for (var o = 0; o < a - 1; o++) + i.chain.push(r.readUshort(e, n)), (n += 2); + return i; + }), + (t.head = {}), + (t.head.parse = function (e, n, r) { + var i = t._bin, + a = {}; + return ( + i.readFixed(e, n), + (n += 4), + (a.fontRevision = i.readFixed(e, n)), + (n += 4), + i.readUint(e, n), + (n += 4), + i.readUint(e, n), + (n += 4), + (a.flags = i.readUshort(e, n)), + (n += 2), + (a.unitsPerEm = i.readUshort(e, n)), + (n += 2), + (a.created = i.readUint64(e, n)), + (n += 8), + (a.modified = i.readUint64(e, n)), + (n += 8), + (a.xMin = i.readShort(e, n)), + (n += 2), + (a.yMin = i.readShort(e, n)), + (n += 2), + (a.xMax = i.readShort(e, n)), + (n += 2), + (a.yMax = i.readShort(e, n)), + (n += 2), + (a.macStyle = i.readUshort(e, n)), + (n += 2), + (a.lowestRecPPEM = i.readUshort(e, n)), + (n += 2), + (a.fontDirectionHint = i.readShort(e, n)), + (n += 2), + (a.indexToLocFormat = i.readShort(e, n)), + (n += 2), + (a.glyphDataFormat = i.readShort(e, n)), + (n += 2), + a + ); + }), + (t.hhea = {}), + (t.hhea.parse = function (e, n, r) { + var i = t._bin, + a = {}; + return ( + i.readFixed(e, n), + (n += 4), + (a.ascender = i.readShort(e, n)), + (n += 2), + (a.descender = i.readShort(e, n)), + (n += 2), + (a.lineGap = i.readShort(e, n)), + (n += 2), + (a.advanceWidthMax = i.readUshort(e, n)), + (n += 2), + (a.minLeftSideBearing = i.readShort(e, n)), + (n += 2), + (a.minRightSideBearing = i.readShort(e, n)), + (n += 2), + (a.xMaxExtent = i.readShort(e, n)), + (n += 2), + (a.caretSlopeRise = i.readShort(e, n)), + (n += 2), + (a.caretSlopeRun = i.readShort(e, n)), + (n += 2), + (a.caretOffset = i.readShort(e, n)), + (n += 2), + (n += 8), + (a.metricDataFormat = i.readShort(e, n)), + (n += 2), + (a.numberOfHMetrics = i.readUshort(e, n)), + (n += 2), + a + ); + }), + (t.hmtx = {}), + (t.hmtx.parse = function (e, n, r, i) { + for ( + var a = t._bin, + o = { aWidth: [], lsBearing: [] }, + s = 0, + l = 0, + u = 0; + u < i.maxp.numGlyphs; + u++ + ) + u < i.hhea.numberOfHMetrics && + ((s = a.readUshort(e, n)), + (n += 2), + (l = a.readShort(e, n)), + (n += 2)), + o.aWidth.push(s), + o.lsBearing.push(l); + return o; + }), + (t.kern = {}), + (t.kern.parse = function (e, n, r, i) { + var a = t._bin, + o = a.readUshort(e, n); + if (((n += 2), 1 == o)) + return t.kern.parseV1(e, n - 2, r, i); + var s = a.readUshort(e, n); + n += 2; + for (var l = { glyph1: [], rval: [] }, u = 0; u < s; u++) { + (n += 2), (r = a.readUshort(e, n)), (n += 2); + var c = a.readUshort(e, n); + n += 2; + var f = c >>> 8; + if (0 != (f &= 15)) + throw "unknown kern table format: " + f; + n = t.kern.readFormat0(e, n, l); + } + return l; + }), + (t.kern.parseV1 = function (e, n, r, i) { + var a = t._bin; + a.readFixed(e, n), (n += 4); + var o = a.readUint(e, n); + n += 4; + for (var s = { glyph1: [], rval: [] }, l = 0; l < o; l++) { + a.readUint(e, n), (n += 4); + var u = a.readUshort(e, n); + (n += 2), a.readUshort(e, n), (n += 2); + var c = u >>> 8; + if (0 != (c &= 15)) + throw "unknown kern table format: " + c; + n = t.kern.readFormat0(e, n, s); + } + return s; + }), + (t.kern.readFormat0 = function (e, n, r) { + var i = t._bin, + a = -1, + o = i.readUshort(e, n); + (n += 2), + i.readUshort(e, n), + (n += 2), + i.readUshort(e, n), + (n += 2), + i.readUshort(e, n), + (n += 2); + for (var s = 0; s < o; s++) { + var l = i.readUshort(e, n); + n += 2; + var u = i.readUshort(e, n); + n += 2; + var c = i.readShort(e, n); + (n += 2), + l != a && + (r.glyph1.push(l), + r.rval.push({ glyph2: [], vals: [] })); + var f = r.rval[r.rval.length - 1]; + f.glyph2.push(u), f.vals.push(c), (a = l); + } + return n; + }), + (t.loca = {}), + (t.loca.parse = function (e, n, r, i) { + var a = t._bin, + o = [], + s = i.head.indexToLocFormat, + l = i.maxp.numGlyphs + 1; + if (0 == s) + for (var u = 0; u < l; u++) + o.push(a.readUshort(e, n + (u << 1)) << 1); + if (1 == s) + for (u = 0; u < l; u++) + o.push(a.readUint(e, n + (u << 2))); + return o; + }), + (t.maxp = {}), + (t.maxp.parse = function (e, n, r) { + var i = t._bin, + a = {}, + o = i.readUint(e, n); + return ( + (n += 4), + (a.numGlyphs = i.readUshort(e, n)), + (n += 2), + 65536 == o && + ((a.maxPoints = i.readUshort(e, n)), + (n += 2), + (a.maxContours = i.readUshort(e, n)), + (n += 2), + (a.maxCompositePoints = i.readUshort(e, n)), + (n += 2), + (a.maxCompositeContours = i.readUshort(e, n)), + (n += 2), + (a.maxZones = i.readUshort(e, n)), + (n += 2), + (a.maxTwilightPoints = i.readUshort(e, n)), + (n += 2), + (a.maxStorage = i.readUshort(e, n)), + (n += 2), + (a.maxFunctionDefs = i.readUshort(e, n)), + (n += 2), + (a.maxInstructionDefs = i.readUshort(e, n)), + (n += 2), + (a.maxStackElements = i.readUshort(e, n)), + (n += 2), + (a.maxSizeOfInstructions = i.readUshort(e, n)), + (n += 2), + (a.maxComponentElements = i.readUshort(e, n)), + (n += 2), + (a.maxComponentDepth = i.readUshort(e, n)), + (n += 2)), + a + ); + }), + (t.name = {}), + (t.name.parse = function (e, n, r) { + var i = t._bin, + a = {}; + i.readUshort(e, n), (n += 2); + var o = i.readUshort(e, n); + (n += 2), i.readUshort(e, n); + for ( + var s, + l = [ + "copyright", + "fontFamily", + "fontSubfamily", + "ID", + "fullName", + "version", + "postScriptName", + "trademark", + "manufacturer", + "designer", + "description", + "urlVendor", + "urlDesigner", + "licence", + "licenceURL", + "---", + "typoFamilyName", + "typoSubfamilyName", + "compatibleFull", + "sampleText", + "postScriptCID", + "wwsFamilyName", + "wwsSubfamilyName", + "lightPalette", + "darkPalette", + ], + u = (n += 2), + c = 0; + c < o; + c++ + ) { + var f = i.readUshort(e, n); + n += 2; + var d = i.readUshort(e, n); + n += 2; + var h = i.readUshort(e, n); + n += 2; + var p = i.readUshort(e, n); + n += 2; + var v = i.readUshort(e, n); + n += 2; + var m = i.readUshort(e, n); + n += 2; + var g, + A = l[p], + y = u + 12 * o + m; + if (0 == f) g = i.readUnicode(e, y, v / 2); + else if (3 == f && 0 == d) g = i.readUnicode(e, y, v / 2); + else if (0 == d) g = i.readASCII(e, y, v); + else if (1 == d) g = i.readUnicode(e, y, v / 2); + else if (3 == d) g = i.readUnicode(e, y, v / 2); + else { + if (1 != f) + throw "unknown encoding " + d + ", platformID: " + f; + (g = i.readASCII(e, y, v)), + console.debug( + "reading unknown MAC encoding " + d + " as ASCII" + ); + } + var b = "p" + f + "," + h.toString(16); + null == a[b] && (a[b] = {}), + (a[b][void 0 !== A ? A : p] = g), + (a[b]._lang = h); + } + for (var x in a) + if (null != a[x].postScriptName && 1033 == a[x]._lang) + return a[x]; + for (var x in a) + if (null != a[x].postScriptName && 0 == a[x]._lang) + return a[x]; + for (var x in a) + if (null != a[x].postScriptName && 3084 == a[x]._lang) + return a[x]; + for (var x in a) + if (null != a[x].postScriptName) return a[x]; + for (var x in a) { + s = x; + break; + } + return ( + console.debug( + "returning name table with languageID " + a[s]._lang + ), + a[s] + ); + }), + (t["OS/2"] = {}), + (t["OS/2"].parse = function (e, n, r) { + var i = t._bin.readUshort(e, n); + n += 2; + var a = {}; + if (0 == i) t["OS/2"].version0(e, n, a); + else if (1 == i) t["OS/2"].version1(e, n, a); + else if (2 == i || 3 == i || 4 == i) + t["OS/2"].version2(e, n, a); + else { + if (5 != i) throw "unknown OS/2 table version: " + i; + t["OS/2"].version5(e, n, a); + } + return a; + }), + (t["OS/2"].version0 = function (e, n, r) { + var i = t._bin; + return ( + (r.xAvgCharWidth = i.readShort(e, n)), + (n += 2), + (r.usWeightClass = i.readUshort(e, n)), + (n += 2), + (r.usWidthClass = i.readUshort(e, n)), + (n += 2), + (r.fsType = i.readUshort(e, n)), + (n += 2), + (r.ySubscriptXSize = i.readShort(e, n)), + (n += 2), + (r.ySubscriptYSize = i.readShort(e, n)), + (n += 2), + (r.ySubscriptXOffset = i.readShort(e, n)), + (n += 2), + (r.ySubscriptYOffset = i.readShort(e, n)), + (n += 2), + (r.ySuperscriptXSize = i.readShort(e, n)), + (n += 2), + (r.ySuperscriptYSize = i.readShort(e, n)), + (n += 2), + (r.ySuperscriptXOffset = i.readShort(e, n)), + (n += 2), + (r.ySuperscriptYOffset = i.readShort(e, n)), + (n += 2), + (r.yStrikeoutSize = i.readShort(e, n)), + (n += 2), + (r.yStrikeoutPosition = i.readShort(e, n)), + (n += 2), + (r.sFamilyClass = i.readShort(e, n)), + (n += 2), + (r.panose = i.readBytes(e, n, 10)), + (n += 10), + (r.ulUnicodeRange1 = i.readUint(e, n)), + (n += 4), + (r.ulUnicodeRange2 = i.readUint(e, n)), + (n += 4), + (r.ulUnicodeRange3 = i.readUint(e, n)), + (n += 4), + (r.ulUnicodeRange4 = i.readUint(e, n)), + (n += 4), + (r.achVendID = [ + i.readInt8(e, n), + i.readInt8(e, n + 1), + i.readInt8(e, n + 2), + i.readInt8(e, n + 3), + ]), + (n += 4), + (r.fsSelection = i.readUshort(e, n)), + (n += 2), + (r.usFirstCharIndex = i.readUshort(e, n)), + (n += 2), + (r.usLastCharIndex = i.readUshort(e, n)), + (n += 2), + (r.sTypoAscender = i.readShort(e, n)), + (n += 2), + (r.sTypoDescender = i.readShort(e, n)), + (n += 2), + (r.sTypoLineGap = i.readShort(e, n)), + (n += 2), + (r.usWinAscent = i.readUshort(e, n)), + (n += 2), + (r.usWinDescent = i.readUshort(e, n)), + n + 2 + ); + }), + (t["OS/2"].version1 = function (e, n, r) { + var i = t._bin; + return ( + (n = t["OS/2"].version0(e, n, r)), + (r.ulCodePageRange1 = i.readUint(e, n)), + (n += 4), + (r.ulCodePageRange2 = i.readUint(e, n)), + n + 4 + ); + }), + (t["OS/2"].version2 = function (e, n, r) { + var i = t._bin; + return ( + (n = t["OS/2"].version1(e, n, r)), + (r.sxHeight = i.readShort(e, n)), + (n += 2), + (r.sCapHeight = i.readShort(e, n)), + (n += 2), + (r.usDefault = i.readUshort(e, n)), + (n += 2), + (r.usBreak = i.readUshort(e, n)), + (n += 2), + (r.usMaxContext = i.readUshort(e, n)), + n + 2 + ); + }), + (t["OS/2"].version5 = function (e, n, r) { + var i = t._bin; + return ( + (n = t["OS/2"].version2(e, n, r)), + (r.usLowerOpticalPointSize = i.readUshort(e, n)), + (n += 2), + (r.usUpperOpticalPointSize = i.readUshort(e, n)), + n + 2 + ); + }), + (t.post = {}), + (t.post.parse = function (e, n, r) { + var i = t._bin, + a = {}; + return ( + (a.version = i.readFixed(e, n)), + (n += 4), + (a.italicAngle = i.readFixed(e, n)), + (n += 4), + (a.underlinePosition = i.readShort(e, n)), + (n += 2), + (a.underlineThickness = i.readShort(e, n)), + (n += 2), + a + ); + }), + null == t && (t = {}), + null == t.U && (t.U = {}), + (t.U.codeToGlyph = function (e, t) { + var n = e.cmap, + r = -1; + if ( + (null != n.p0e4 + ? (r = n.p0e4) + : null != n.p3e1 + ? (r = n.p3e1) + : null != n.p1e0 + ? (r = n.p1e0) + : null != n.p0e3 && (r = n.p0e3), + -1 == r) + ) + throw "no familiar platform and encoding!"; + var i = n.tables[r]; + if (0 == i.format) return t >= i.map.length ? 0 : i.map[t]; + if (4 == i.format) { + for (var a = -1, o = 0; o < i.endCount.length; o++) + if (t <= i.endCount[o]) { + a = o; + break; + } + return -1 == a || i.startCount[a] > t + ? 0 + : 65535 & + (0 != i.idRangeOffset[a] + ? i.glyphIdArray[ + t - + i.startCount[a] + + (i.idRangeOffset[a] >> 1) - + (i.idRangeOffset.length - a) + ] + : t + i.idDelta[a]); + } + if (12 == i.format) { + if (t > i.groups[i.groups.length - 1][1]) return 0; + for (o = 0; o < i.groups.length; o++) { + var s = i.groups[o]; + if (s[0] <= t && t <= s[1]) return s[2] + (t - s[0]); + } + return 0; + } + throw "unknown cmap table format " + i.format; + }), + (t.U.glyphToPath = function (e, n) { + var r = { cmds: [], crds: [] }; + if (e.SVG && e.SVG.entries[n]) { + var i = e.SVG.entries[n]; + return null == i + ? r + : ("string" == typeof i && + ((i = t.SVG.toPath(i)), (e.SVG.entries[n] = i)), + i); + } + if (e.CFF) { + var a = { + x: 0, + y: 0, + stack: [], + nStems: 0, + haveWidth: !1, + width: e.CFF.Private + ? e.CFF.Private.defaultWidthX + : 0, + open: !1, + }, + o = e.CFF, + s = e.CFF.Private; + if (o.ROS) { + for (var l = 0; o.FDSelect[l + 2] <= n; ) l += 2; + s = o.FDArray[o.FDSelect[l + 1]].Private; + } + t.U._drawCFF(e.CFF.CharStrings[n], a, o, s, r); + } else e.glyf && t.U._drawGlyf(n, e, r); + return r; + }), + (t.U._drawGlyf = function (e, n, r) { + var i = n.glyf[e]; + null == i && (i = n.glyf[e] = t.glyf._parseGlyf(n, e)), + null != i && + (i.noc > -1 + ? t.U._simpleGlyph(i, r) + : t.U._compoGlyph(i, n, r)); + }), + (t.U._simpleGlyph = function (e, n) { + for (var r = 0; r < e.noc; r++) { + for ( + var i = 0 == r ? 0 : e.endPts[r - 1] + 1, + a = e.endPts[r], + o = i; + o <= a; + o++ + ) { + var s = o == i ? a : o - 1, + l = o == a ? i : o + 1, + u = 1 & e.flags[o], + c = 1 & e.flags[s], + f = 1 & e.flags[l], + d = e.xs[o], + h = e.ys[o]; + if (o == i) + if (u) { + if (!c) { + t.U.P.moveTo(n, d, h); + continue; + } + t.U.P.moveTo(n, e.xs[s], e.ys[s]); + } else + c + ? t.U.P.moveTo(n, e.xs[s], e.ys[s]) + : t.U.P.moveTo( + n, + (e.xs[s] + d) / 2, + (e.ys[s] + h) / 2 + ); + u + ? c && t.U.P.lineTo(n, d, h) + : f + ? t.U.P.qcurveTo(n, d, h, e.xs[l], e.ys[l]) + : t.U.P.qcurveTo( + n, + d, + h, + (d + e.xs[l]) / 2, + (h + e.ys[l]) / 2 + ); + } + t.U.P.closePath(n); + } + }), + (t.U._compoGlyph = function (e, n, r) { + for (var i = 0; i < e.parts.length; i++) { + var a = { cmds: [], crds: [] }, + o = e.parts[i]; + t.U._drawGlyf(o.glyphIndex, n, a); + for (var s = o.m, l = 0; l < a.crds.length; l += 2) { + var u = a.crds[l], + c = a.crds[l + 1]; + r.crds.push(u * s.a + c * s.b + s.tx), + r.crds.push(u * s.c + c * s.d + s.ty); + } + for (l = 0; l < a.cmds.length; l++) + r.cmds.push(a.cmds[l]); + } + }), + (t.U._getGlyphClass = function (e, n) { + var r = t._lctf.getInterval(n, e); + return -1 == r ? 0 : n[r + 2]; + }), + (t.U.getPairAdjustment = function (e, n, r) { + var i = !1; + if (e.GPOS) + for ( + var a = e.GPOS, + o = a.lookupList, + s = a.featureList, + l = [], + u = 0; + u < s.length; + u++ + ) { + var c = s[u]; + if ("kern" == c.tag) { + i = !0; + for (var f = 0; f < c.tab.length; f++) + if (!l[c.tab[f]]) { + l[c.tab[f]] = !0; + for ( + var d = o[c.tab[f]], h = 0; + h < d.tabs.length; + h++ + ) + if (null != d.tabs[h]) { + var p, + v = d.tabs[h]; + if ( + !v.coverage || + -1 != + (p = t._lctf.coverageIndex(v.coverage, n)) + ) + if (1 == d.ltype); + else if (2 == d.ltype) { + var m = null; + if (1 == v.fmt) { + var g = v.pairsets[p]; + for (u = 0; u < g.length; u++) + g[u].gid2 == r && (m = g[u]); + } else if (2 == v.fmt) { + var A = t.U._getGlyphClass( + n, + v.classDef1 + ), + y = t.U._getGlyphClass( + r, + v.classDef2 + ); + m = v.matrix[A][y]; + } + if (m) { + var b = 0; + return ( + m.val1 && + m.val1[2] && + (b += m.val1[2]), + m.val2 && + m.val2[0] && + (b += m.val2[0]), + b + ); + } + } + } + } + } + } + if (e.kern && !i) { + var x = e.kern.glyph1.indexOf(n); + if (-1 != x) { + var S = e.kern.rval[x].glyph2.indexOf(r); + if (-1 != S) return e.kern.rval[x].vals[S]; + } + } + return 0; + }), + (t.U._applySubs = function (e, n, r, i) { + for ( + var a = e.length - n - 1, o = 0; + o < r.tabs.length; + o++ + ) + if (null != r.tabs[o]) { + var s, + l = r.tabs[o]; + if ( + !l.coverage || + -1 != (s = t._lctf.coverageIndex(l.coverage, e[n])) + ) + if (1 == r.ltype) + e[n], + 1 == l.fmt + ? (e[n] = e[n] + l.delta) + : (e[n] = l.newg[s]); + else if (4 == r.ltype) + for (var u = l.vals[s], c = 0; c < u.length; c++) { + var f = u[c], + d = f.chain.length; + if (!(d > a)) { + for (var h = !0, p = 0, v = 0; v < d; v++) { + for (; -1 == e[n + p + (1 + v)]; ) p++; + f.chain[v] != e[n + p + (1 + v)] && (h = !1); + } + if (h) { + for (e[n] = f.nglyph, v = 0; v < d + p; v++) + e[n + v + 1] = -1; + break; + } + } + } + else if (5 == r.ltype && 2 == l.fmt) + for ( + var m = t._lctf.getInterval(l.cDef, e[n]), + g = l.cDef[m + 2], + A = l.scset[g], + y = 0; + y < A.length; + y++ + ) { + var b = A[y], + x = b.input; + if (!(x.length > a)) { + for (h = !0, v = 0; v < x.length; v++) { + var S = t._lctf.getInterval( + l.cDef, + e[n + 1 + v] + ); + if (-1 == m && l.cDef[S + 2] != x[v]) { + h = !1; + break; + } + } + if (h) { + var E = b.substLookupRecords; + for (c = 0; c < E.length; c += 2) + E[c], E[c + 1]; + } + } + } + else if (6 == r.ltype && 3 == l.fmt) { + if ( + !t.U._glsCovered( + e, + l.backCvg, + n - l.backCvg.length + ) + ) + continue; + if (!t.U._glsCovered(e, l.inptCvg, n)) continue; + if ( + !t.U._glsCovered( + e, + l.ahedCvg, + n + l.inptCvg.length + ) + ) + continue; + var _ = l.lookupRec; + for (y = 0; y < _.length; y += 2) { + m = _[y]; + var C = i[_[y + 1]]; + t.U._applySubs(e, n + m, C, i); + } + } + } + }), + (t.U._glsCovered = function (e, n, r) { + for (var i = 0; i < n.length; i++) + if (-1 == t._lctf.coverageIndex(n[i], e[r + i])) + return !1; + return !0; + }), + (t.U.glyphsToPath = function (e, n, r) { + for ( + var i = { cmds: [], crds: [] }, a = 0, o = 0; + o < n.length; + o++ + ) { + var s = n[o]; + if (-1 != s) { + for ( + var l = + o < n.length - 1 && -1 != n[o + 1] ? n[o + 1] : 0, + u = t.U.glyphToPath(e, s), + c = 0; + c < u.crds.length; + c += 2 + ) + i.crds.push(u.crds[c] + a), + i.crds.push(u.crds[c + 1]); + for (r && i.cmds.push(r), c = 0; c < u.cmds.length; c++) + i.cmds.push(u.cmds[c]); + r && i.cmds.push("X"), + (a += e.hmtx.aWidth[s]), + o < n.length - 1 && + (a += t.U.getPairAdjustment(e, s, l)); + } + } + return i; + }), + (t.U.P = {}), + (t.U.P.moveTo = function (e, t, n) { + e.cmds.push("M"), e.crds.push(t, n); + }), + (t.U.P.lineTo = function (e, t, n) { + e.cmds.push("L"), e.crds.push(t, n); + }), + (t.U.P.curveTo = function (e, t, n, r, i, a, o) { + e.cmds.push("C"), e.crds.push(t, n, r, i, a, o); + }), + (t.U.P.qcurveTo = function (e, t, n, r, i) { + e.cmds.push("Q"), e.crds.push(t, n, r, i); + }), + (t.U.P.closePath = function (e) { + e.cmds.push("Z"); + }), + (t.U._drawCFF = function (e, n, r, i, a) { + for ( + var o = n.stack, + s = n.nStems, + l = n.haveWidth, + u = n.width, + c = n.open, + f = 0, + d = n.x, + h = n.y, + p = 0, + v = 0, + m = 0, + g = 0, + A = 0, + y = 0, + b = 0, + x = 0, + S = 0, + E = 0, + _ = { val: 0, size: 0 }; + f < e.length; + + ) { + t.CFF.getCharString(e, f, _); + var C = _.val; + if (((f += _.size), "o1" == C || "o18" == C)) + o.length % 2 != 0 && + !l && + (u = o.shift() + i.nominalWidthX), + (s += o.length >> 1), + (o.length = 0), + (l = !0); + else if ("o3" == C || "o23" == C) + o.length % 2 != 0 && + !l && + (u = o.shift() + i.nominalWidthX), + (s += o.length >> 1), + (o.length = 0), + (l = !0); + else if ("o4" == C) + o.length > 1 && + !l && + ((u = o.shift() + i.nominalWidthX), (l = !0)), + c && t.U.P.closePath(a), + (h += o.pop()), + t.U.P.moveTo(a, d, h), + (c = !0); + else if ("o5" == C) + for (; o.length > 0; ) + (d += o.shift()), + (h += o.shift()), + t.U.P.lineTo(a, d, h); + else if ("o6" == C || "o7" == C) + for ( + var w = o.length, T = "o6" == C, M = 0; + M < w; + M++ + ) { + var I = o.shift(); + T ? (d += I) : (h += I), + (T = !T), + t.U.P.lineTo(a, d, h); + } + else if ("o8" == C || "o24" == C) { + w = o.length; + for (var k = 0; k + 6 <= w; ) + (p = d + o.shift()), + (v = h + o.shift()), + (m = p + o.shift()), + (g = v + o.shift()), + (d = m + o.shift()), + (h = g + o.shift()), + t.U.P.curveTo(a, p, v, m, g, d, h), + (k += 6); + "o24" == C && + ((d += o.shift()), + (h += o.shift()), + t.U.P.lineTo(a, d, h)); + } else { + if ("o11" == C) break; + if ( + "o1234" == C || + "o1235" == C || + "o1236" == C || + "o1237" == C + ) + "o1234" == C && + ((v = h), + (m = (p = d + o.shift()) + o.shift()), + (E = g = v + o.shift()), + (y = g), + (x = h), + (d = + (b = + (A = (S = m + o.shift()) + o.shift()) + + o.shift()) + o.shift()), + t.U.P.curveTo(a, p, v, m, g, S, E), + t.U.P.curveTo(a, A, y, b, x, d, h)), + "o1235" == C && + ((p = d + o.shift()), + (v = h + o.shift()), + (m = p + o.shift()), + (g = v + o.shift()), + (S = m + o.shift()), + (E = g + o.shift()), + (A = S + o.shift()), + (y = E + o.shift()), + (b = A + o.shift()), + (x = y + o.shift()), + (d = b + o.shift()), + (h = x + o.shift()), + o.shift(), + t.U.P.curveTo(a, p, v, m, g, S, E), + t.U.P.curveTo(a, A, y, b, x, d, h)), + "o1236" == C && + ((p = d + o.shift()), + (v = h + o.shift()), + (m = p + o.shift()), + (E = g = v + o.shift()), + (y = g), + (b = + (A = (S = m + o.shift()) + o.shift()) + + o.shift()), + (x = y + o.shift()), + (d = b + o.shift()), + t.U.P.curveTo(a, p, v, m, g, S, E), + t.U.P.curveTo(a, A, y, b, x, d, h)), + "o1237" == C && + ((p = d + o.shift()), + (v = h + o.shift()), + (m = p + o.shift()), + (g = v + o.shift()), + (S = m + o.shift()), + (E = g + o.shift()), + (A = S + o.shift()), + (y = E + o.shift()), + (b = A + o.shift()), + (x = y + o.shift()), + Math.abs(b - d) > Math.abs(x - h) + ? (d = b + o.shift()) + : (h = x + o.shift()), + t.U.P.curveTo(a, p, v, m, g, S, E), + t.U.P.curveTo(a, A, y, b, x, d, h)); + else if ("o14" == C) { + if ( + (o.length > 0 && + !l && + ((u = o.shift() + r.nominalWidthX), (l = !0)), + 4 == o.length) + ) { + var R = o.shift(), + B = o.shift(), + P = o.shift(), + L = o.shift(), + D = t.CFF.glyphBySE(r, P), + U = t.CFF.glyphBySE(r, L); + t.U._drawCFF(r.CharStrings[D], n, r, i, a), + (n.x = R), + (n.y = B), + t.U._drawCFF(r.CharStrings[U], n, r, i, a); + } + c && (t.U.P.closePath(a), (c = !1)); + } else if ("o19" == C || "o20" == C) + o.length % 2 != 0 && + !l && + (u = o.shift() + i.nominalWidthX), + (s += o.length >> 1), + (o.length = 0), + (l = !0), + (f += (s + 7) >> 3); + else if ("o21" == C) + o.length > 2 && + !l && + ((u = o.shift() + i.nominalWidthX), (l = !0)), + (h += o.pop()), + (d += o.pop()), + c && t.U.P.closePath(a), + t.U.P.moveTo(a, d, h), + (c = !0); + else if ("o22" == C) + o.length > 1 && + !l && + ((u = o.shift() + i.nominalWidthX), (l = !0)), + (d += o.pop()), + c && t.U.P.closePath(a), + t.U.P.moveTo(a, d, h), + (c = !0); + else if ("o25" == C) { + for (; o.length > 6; ) + (d += o.shift()), + (h += o.shift()), + t.U.P.lineTo(a, d, h); + (p = d + o.shift()), + (v = h + o.shift()), + (m = p + o.shift()), + (g = v + o.shift()), + (d = m + o.shift()), + (h = g + o.shift()), + t.U.P.curveTo(a, p, v, m, g, d, h); + } else if ("o26" == C) + for (o.length % 2 && (d += o.shift()); o.length > 0; ) + (p = d), + (v = h + o.shift()), + (d = m = p + o.shift()), + (h = (g = v + o.shift()) + o.shift()), + t.U.P.curveTo(a, p, v, m, g, d, h); + else if ("o27" == C) + for (o.length % 2 && (h += o.shift()); o.length > 0; ) + (v = h), + (m = (p = d + o.shift()) + o.shift()), + (g = v + o.shift()), + (d = m + o.shift()), + (h = g), + t.U.P.curveTo(a, p, v, m, g, d, h); + else if ("o10" == C || "o29" == C) { + var F = "o10" == C ? i : r; + if (0 == o.length) + console.debug("error: empty stack"); + else { + var O = o.pop(), + N = F.Subrs[O + F.Bias]; + (n.x = d), + (n.y = h), + (n.nStems = s), + (n.haveWidth = l), + (n.width = u), + (n.open = c), + t.U._drawCFF(N, n, r, i, a), + (d = n.x), + (h = n.y), + (s = n.nStems), + (l = n.haveWidth), + (u = n.width), + (c = n.open); + } + } else if ("o30" == C || "o31" == C) { + var G = o.length, + Z = ((k = 0), "o31" == C); + for (k += G - (w = -3 & G); k < w; ) + Z + ? ((v = h), + (m = (p = d + o.shift()) + o.shift()), + (h = (g = v + o.shift()) + o.shift()), + w - k == 5 + ? ((d = m + o.shift()), k++) + : (d = m), + (Z = !1)) + : ((p = d), + (v = h + o.shift()), + (m = p + o.shift()), + (g = v + o.shift()), + (d = m + o.shift()), + w - k == 5 + ? ((h = g + o.shift()), k++) + : (h = g), + (Z = !0)), + t.U.P.curveTo(a, p, v, m, g, d, h), + (k += 4); + } else { + if ("o" == (C + "").charAt(0)) + throw ( + (console.debug("Unknown operation: " + C, e), C) + ); + o.push(C); + } + } + } + (n.x = d), + (n.y = h), + (n.nStems = s), + (n.haveWidth = l), + (n.width = u), + (n.open = c); + }); + var n = t, + r = { Typr: n }; + return ( + (e.Typr = n), + (e.default = r), + Object.defineProperty(e, "__esModule", { value: !0 }), + e + ); + })({}).Typr + ); + }, + function () { + return (function (e) { + var t = Uint8Array, + n = Uint16Array, + r = Uint32Array, + i = new t([ + 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, + 4, 4, 4, 5, 5, 5, 5, 0, 0, 0, 0, + ]), + a = new t([ + 0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, + 9, 10, 10, 11, 11, 12, 12, 13, 13, 0, 0, + ]), + o = new t([ + 16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, + 15, + ]), + s = function (e, t) { + for (var i = new n(31), a = 0; a < 31; ++a) + i[a] = t += 1 << e[a - 1]; + var o = new r(i[30]); + for (a = 1; a < 30; ++a) + for (var s = i[a]; s < i[a + 1]; ++s) + o[s] = ((s - i[a]) << 5) | a; + return [i, o]; + }, + l = s(i, 2), + u = l[0], + c = l[1]; + (u[28] = 258), (c[258] = 28); + for ( + var f = s(a, 0)[0], d = new n(32768), h = 0; + h < 32768; + ++h + ) { + var p = ((43690 & h) >>> 1) | ((21845 & h) << 1); + (p = + ((61680 & (p = ((52428 & p) >>> 2) | ((13107 & p) << 2))) >>> + 4) | + ((3855 & p) << 4)), + (d[h] = (((65280 & p) >>> 8) | ((255 & p) << 8)) >>> 1); + } + var v = function (e, t, r) { + for (var i = e.length, a = 0, o = new n(t); a < i; ++a) + ++o[e[a] - 1]; + var s, + l = new n(t); + for (a = 0; a < t; ++a) l[a] = (l[a - 1] + o[a - 1]) << 1; + if (r) { + s = new n(1 << t); + var u = 15 - t; + for (a = 0; a < i; ++a) + if (e[a]) + for ( + var c = (a << 4) | e[a], + f = t - e[a], + h = l[e[a] - 1]++ << f, + p = h | ((1 << f) - 1); + h <= p; + ++h + ) + s[d[h] >>> u] = c; + } else + for (s = new n(i), a = 0; a < i; ++a) + e[a] && (s[a] = d[l[e[a] - 1]++] >>> (15 - e[a])); + return s; + }, + m = new t(288); + for (h = 0; h < 144; ++h) m[h] = 8; + for (h = 144; h < 256; ++h) m[h] = 9; + for (h = 256; h < 280; ++h) m[h] = 7; + for (h = 280; h < 288; ++h) m[h] = 8; + var g = new t(32); + for (h = 0; h < 32; ++h) g[h] = 5; + var A = v(m, 9, 1), + y = v(g, 5, 1), + b = function (e) { + for (var t = e[0], n = 1; n < e.length; ++n) + e[n] > t && (t = e[n]); + return t; + }, + x = function (e, t, n) { + var r = (t / 8) | 0; + return ((e[r] | (e[r + 1] << 8)) >> (7 & t)) & n; + }, + S = function (e, t) { + var n = (t / 8) | 0; + return (e[n] | (e[n + 1] << 8) | (e[n + 2] << 16)) >> (7 & t); + }, + E = [ + "unexpected EOF", + "invalid block type", + "invalid length/literal", + "invalid distance", + "stream finished", + "no stream handler", + , + "no callback", + "invalid UTF-8 data", + "extra field too long", + "date not in range 1980-2099", + "filename too long", + "stream finishing", + "invalid zip data", + ], + _ = function e(t, n, r) { + var i = new Error(n || E[t]); + if ( + ((i.code = t), + Error.captureStackTrace && Error.captureStackTrace(i, e), + !r) + ) + throw i; + return i; + }, + C = function (e, s, l) { + var c = e.length; + if (!c || (l && !l.l && c < 5)) return s || new t(0); + var d = !s || l, + h = !l || l.i; + l || (l = {}), s || (s = new t(3 * c)); + var p, + m = function (e) { + var n = s.length; + if (e > n) { + var r = new t(Math.max(2 * n, e)); + r.set(s), (s = r); + } + }, + g = l.f || 0, + E = l.p || 0, + C = l.b || 0, + w = l.l, + T = l.d, + M = l.m, + I = l.n, + k = 8 * c; + do { + if (!w) { + l.f = g = x(e, E, 1); + var R = x(e, E + 1, 3); + if (((E += 3), !R)) { + var B = + e[ + (Q = (((p = E) / 8) | 0) + (7 & p && 1) + 4) - 4 + ] | + (e[Q - 3] << 8), + P = Q + B; + if (P > c) { + h && _(0); + break; + } + d && m(C + B), + s.set(e.subarray(Q, P), C), + (l.b = C += B), + (l.p = E = 8 * P); + continue; + } + if (1 == R) (w = A), (T = y), (M = 9), (I = 5); + else if (2 == R) { + var L = x(e, E, 31) + 257, + D = x(e, E + 10, 15) + 4, + U = L + x(e, E + 5, 31) + 1; + E += 14; + for (var F = new t(U), O = new t(19), N = 0; N < D; ++N) + O[o[N]] = x(e, E + 3 * N, 7); + E += 3 * D; + var G = b(O), + Z = (1 << G) - 1, + z = v(O, G, 1); + for (N = 0; N < U; ) { + var Q, + H = z[x(e, E, Z)]; + if (((E += 15 & H), (Q = H >>> 4) < 16)) F[N++] = Q; + else { + var V = 0, + j = 0; + for ( + 16 == Q + ? ((j = 3 + x(e, E, 3)), + (E += 2), + (V = F[N - 1])) + : 17 == Q + ? ((j = 3 + x(e, E, 7)), (E += 3)) + : 18 == Q && + ((j = 11 + x(e, E, 127)), (E += 7)); + j--; + + ) + F[N++] = V; + } + } + var W = F.subarray(0, L), + X = F.subarray(L); + (M = b(W)), + (I = b(X)), + (w = v(W, M, 1)), + (T = v(X, I, 1)); + } else _(1); + if (E > k) { + h && _(0); + break; + } + } + d && m(C + 131072); + for ( + var Y = (1 << M) - 1, q = (1 << I) - 1, J = E; + ; + J = E + ) { + var K = (V = w[S(e, E) & Y]) >>> 4; + if ((E += 15 & V) > k) { + h && _(0); + break; + } + if ((V || _(2), K < 256)) s[C++] = K; + else { + if (256 == K) { + (J = E), (w = null); + break; + } + var $ = K - 254; + if (K > 264) { + var ee = i[(N = K - 257)]; + ($ = x(e, E, (1 << ee) - 1) + u[N]), (E += ee); + } + var te = T[S(e, E) & q], + ne = te >>> 4; + if ( + (te || _(3), + (E += 15 & te), + (X = f[ne]), + ne > 3 && + ((ee = a[ne]), + (X += S(e, E) & ((1 << ee) - 1)), + (E += ee)), + E > k) + ) { + h && _(0); + break; + } + d && m(C + 131072); + for (var re = C + $; C < re; C += 4) + (s[C] = s[C - X]), + (s[C + 1] = s[C + 1 - X]), + (s[C + 2] = s[C + 2 - X]), + (s[C + 3] = s[C + 3 - X]); + C = re; + } + } + (l.l = w), + (l.p = J), + (l.b = C), + w && ((g = 1), (l.m = M), (l.d = T), (l.n = I)); + } while (!g); + return C == s.length + ? s + : (function (e, i, a) { + (null == i || i < 0) && (i = 0), + (null == a || a > e.length) && (a = e.length); + var o = new ( + e instanceof n ? n : e instanceof r ? r : t + )(a - i); + return o.set(e.subarray(i, a)), o; + })(s, 0, C); + }, + w = new t(0), + T = "undefined" != typeof TextDecoder && new TextDecoder(); + try { + T.decode(w, { stream: !0 }); + } catch (e) {} + return ( + (e.convert_streams = function (e) { + var t = new DataView(e), + n = 0; + function r() { + var e = t.getUint16(n); + return (n += 2), e; + } + function i() { + var e = t.getUint32(n); + return (n += 4), e; + } + function a(e) { + g.setUint16(A, e), (A += 2); + } + function o(e) { + g.setUint32(A, e), (A += 4); + } + for ( + var s = { + signature: i(), + flavor: i(), + length: i(), + numTables: r(), + reserved: r(), + totalSfntSize: i(), + majorVersion: r(), + minorVersion: r(), + metaOffset: i(), + metaLength: i(), + metaOrigLength: i(), + privOffset: i(), + privLength: i(), + }, + l = 0; + Math.pow(2, l) <= s.numTables; + + ) + l++; + l--; + for ( + var u = 16 * Math.pow(2, l), + c = 16 * s.numTables - u, + f = 12, + d = [], + h = 0; + h < s.numTables; + h++ + ) + d.push({ + tag: i(), + offset: i(), + compLength: i(), + origLength: i(), + origChecksum: i(), + }), + (f += 16); + var p, + v = new Uint8Array( + 12 + + 16 * d.length + + d.reduce(function (e, t) { + return e + t.origLength + 4; + }, 0) + ), + m = v.buffer, + g = new DataView(m), + A = 0; + return ( + o(s.flavor), + a(s.numTables), + a(u), + a(l), + a(c), + d.forEach(function (e) { + o(e.tag), + o(e.origChecksum), + o(f), + o(e.origLength), + (e.outOffset = f), + (f += e.origLength) % 4 != 0 && (f += 4 - (f % 4)); + }), + d.forEach(function (t) { + var n, + r = e.slice(t.offset, t.offset + t.compLength); + if (t.compLength != t.origLength) { + var i = new Uint8Array(t.origLength); + (n = new Uint8Array(r, 2)), C(n, i); + } else i = new Uint8Array(r); + v.set(i, t.outOffset); + var a = 0; + (f = t.outOffset + t.origLength) % 4 != 0 && + (a = 4 - (f % 4)), + v.set( + new Uint8Array(a).buffer, + t.outOffset + t.origLength + ), + (p = f + a); + }), + m.slice(0, p) + ); + }), + Object.defineProperty(e, "__esModule", { value: !0 }), + e + ); + })({}).convert_streams; + }, + function (e, t) { + var n, + r = { M: 2, L: 2, Q: 4, C: 6, Z: 0 }, + i = { + C: "18g,ca,368,1kz", + D: "17k,6,2,2+4,5+c,2+6,2+1,10+1,9+f,j+11,2+1,a,2,2+1,15+2,3,j+2,6+3,2+8,2,2,2+1,w+a,4+e,3+3,2,3+2,3+5,23+w,2f+4,3,2+9,2,b,2+3,3,1k+9,6+1,3+1,2+2,2+d,30g,p+y,1,1+1g,f+x,2,sd2+1d,jf3+4,f+3,2+4,2+2,b+3,42,2,4+2,2+1,2,3,t+1,9f+w,2,el+2,2+g,d+2,2l,2+1,5,3+1,2+1,2,3,6,16wm+1v", + R: "17m+3,2,2,6+3,m,15+2,2+2,h+h,13,3+8,2,2,3+1,2,p+1,x,5+4,5,a,2,2,3,u,c+2,g+1,5,2+1,4+1,5j,6+1,2,b,2+2,f,2+1,1s+2,2,3+1,7,1ez0,2,2+1,4+4,b,4,3,b,42,2+2,4,3,2+1,2,o+3,ae,ep,x,2o+2,3+1,3,5+1,6", + L: "x9u,jff,a,fd,jv", + T: "4t,gj+33,7o+4,1+1,7c+18,2,2+1,2+1,2,21+a,2,1b+k,h,2u+6,3+5,3+1,2+3,y,2,v+q,2k+a,1n+8,a,p+3,2+8,2+2,2+4,18+2,3c+e,2+v,1k,2,5+7,5,4+6,b+1,u,1n,5+3,9,l+1,r,3+1,1m,5+1,5+1,3+2,4,v+1,4,c+1,1m,5+4,2+1,5,l+1,n+5,2,1n,3,2+3,9,8+1,c+1,v,1q,d,1f,4,1m+2,6+2,2+3,8+1,c+1,u,1n,3,7,6+1,l+1,t+1,1m+1,5+3,9,l+1,u,21,8+2,2,2j,3+6,d+7,2r,3+8,c+5,23+1,s,2,2,1k+d,2+4,2+1,6+a,2+z,a,2v+3,2+5,2+1,3+1,q+1,5+2,h+3,e,3+1,7,g,jk+2,qb+2,u+2,u+1,v+1,1t+1,2+6,9,3+a,a,1a+2,3c+1,z,3b+2,5+1,a,7+2,64+1,3,1n,2+6,2,2,3+7,7+9,3,1d+d,1,1+1,1s+3,1d,2+4,2,6,15+8,d+1,x+3,3+1,2+2,1l,2+1,4,2+2,1n+7,3+1,49+2,2+c,2+6,5,7,4+1,5j+1l,2+4,ek,3+1,r+4,1e+4,6+5,2p+c,1+3,1,1+2,1+b,2db+2,3y,2p+v,ff+3,30+1,n9x,1+2,2+9,x+1,29+1,7l,4,5,q+1,6,48+1,r+h,e,13+7,q+a,1b+2,1d,3+3,3+1,14,1w+5,3+1,3+1,d,9,1c,1g,2+2,3+1,6+1,2,17+1,9,6n,3,5,fn5,ki+f,h+f,5s,6y+2,ea,6b,46+4,1af+2,2+1,6+3,15+2,5,4m+1,fy+3,as+1,4a+a,4x,1j+e,1l+2,1e+3,3+1,1y+2,11+4,2+7,1r,d+1,1h+8,b+3,3,2o+2,3,2+1,7,4h,4+7,m+1,1m+1,4,12+6,4+4,5g+7,3+2,2,o,2d+5,2,5+1,2+1,6n+3,7+1,2+1,s+1,2e+7,3,2+1,2z,2,3+5,2,2u+2,3+3,2+4,78+8,2+1,75+1,2,5,41+3,3+1,5,x+9,15+5,3+3,9,a+5,3+2,1b+c,2+1,bb+6,2+5,2,2b+l,3+6,2+1,2+1,3f+5,4,2+1,2+6,2,21+1,4,2,9o+1,470+8,at4+4,1o+6,t5,1s+3,2a,f5l+1,2+3,43o+2,a+7,1+7,3+6,v+3,45+2,1j0+1i,5+1d,9,f,n+4,2+e,11t+6,2+g,3+6,2+1,2+4,7a+6,c6+3,15t+6,32+6,1,gzau,v+2n,3l+6n", + }, + a = 1, + o = 2, + s = 4, + l = 8, + u = 16, + c = 32; + function f(e) { + if (!n) { + var t = { R: o, L: a, D: s, C: u, U: c, T: l }; + n = new Map(); + var r = function (e) { + var r = 0; + i[e].split(",").forEach(function (i) { + var a = i.split("+"), + o = (0, Ot.Z)(a, 2), + s = o[0], + l = o[1]; + (s = parseInt(s, 36)), + (l = l ? parseInt(l, 36) : 0), + n.set((r += s), t[e]); + for (var u = l; u--; ) n.set(++r, t[e]); + }); + }; + for (var f in i) r(f); + } + return n.get(e) || c; + } + var d = 1, + h = 2, + p = 3, + v = 4, + m = [null, "isol", "init", "fina", "medi"]; + function g(e) { + for ( + var t = new Uint8Array(e.length), n = c, r = d, i = -1, m = 0; + m < e.length; + m++ + ) { + var g = e.codePointAt(m), + A = 0 | f(g), + y = d; + A & l || + (n & (a | s | u) + ? A & (o | s | u) + ? ((y = p), (r !== d && r !== p) || t[i]++) + : A & (a | c) && ((r !== h && r !== v) || t[i]--) + : n & (o | c) && ((r !== h && r !== v) || t[i]--), + (r = t[m] = y), + (n = A), + (i = m), + g > 65535 && m++); + } + return t; + } + function A() { + for ( + var e = arguments.length, t = new Array(e), n = 0; + n < e; + n++ + ) + t[n] = arguments[n]; + for (var r = 0; r < t.length; r++) + if ("number" === typeof t[r]) return t[r]; + } + function y(t) { + var n = Object.create(null), + i = t["OS/2"], + a = t.hhea, + o = t.head.unitsPerEm, + s = A(i && i.sTypoAscender, a && a.ascender, o), + l = { + unitsPerEm: o, + ascender: s, + descender: A(i && i.sTypoDescender, a && a.descender, 0), + capHeight: A(i && i.sCapHeight, s), + xHeight: A(i && i.sxHeight, s), + lineGap: A(i && i.sTypoLineGap, a && a.lineGap), + forEachGlyph: function (i, a, o, s) { + var u = 0, + c = (1 / l.unitsPerEm) * a, + f = (function (t, n) { + for (var r = [], i = 0; i < n.length; i++) { + var a = n.codePointAt(i); + a > 65535 && i++, r.push(e.U.codeToGlyph(t, a)); + } + var o = t.GSUB; + if (o) { + var s, + l = o.lookupList, + u = o.featureList, + c = + /^(rlig|liga|mset|isol|init|fina|medi|half|pres|blws)$/, + f = []; + u.forEach(function (t) { + if (c.test(t.tag)) + for (var i = 0; i < t.tab.length; i++) + if (!f[t.tab[i]]) { + f[t.tab[i]] = !0; + var a = l[t.tab[i]], + o = /^(isol|init|fina|medi)$/.test(t.tag); + o && !s && (s = g(n)); + for (var u = 0; u < r.length; u++) + (s && o && m[s[u]] !== t.tag) || + e.U._applySubs(r, u, a, l); + } + }); + } + return r; + })(t, i), + d = 0, + h = -1; + return ( + f.forEach(function (l, f) { + if (-1 !== l) { + var p = n[l]; + if (!p) { + for ( + var v, + m, + g, + A, + y = e.U.glyphToPath(t, l), + b = y.cmds, + x = y.crds, + S = "", + E = 0, + _ = 0, + C = b.length; + _ < C; + _++ + ) { + var w = r[b[_]]; + S += b[_]; + for (var T = 1; T <= w; T++) + S += (T > 1 ? "," : "") + x[E++]; + } + if (x.length) { + (v = m = 1 / 0), (g = A = -1 / 0); + for (var M = 0, I = x.length; M < I; M += 2) { + var k = x[M], + R = x[M + 1]; + k < v && (v = k), + R < m && (m = R), + k > g && (g = k), + R > A && (A = R); + } + } else v = g = m = A = 0; + p = n[l] = { + index: l, + advanceWidth: t.hmtx.aWidth[l], + xMin: v, + yMin: m, + xMax: g, + yMax: A, + path: S, + pathCommandCount: b.length, + }; + } + -1 !== h && (u += e.U.getPairAdjustment(t, h, l) * c), + s.call(null, p, u, d), + p.advanceWidth && (u += p.advanceWidth * c), + o && (u += o * a), + (h = l); + } + d += i.codePointAt(d) > 65535 ? 2 : 1; + }), + u + ); + }, + }; + return l; + } + return function (n) { + var r = new Uint8Array(n, 0, 4), + i = e._bin.readASCII(r, 0, 4); + if ("wOFF" === i) n = t(n); + else if ("wOF2" === i) + throw new Error("woff2 fonts not supported"); + return y(e.parse(n)[0]); + }; + }, + ], + init: function (e, t, n) { + return n(e(), t()); + }, + }), + Fv = { + defaultFontURL: + "https://fonts.gstatic.com/s/roboto/v18/KFOmCnqEu92Fr1Mu4mxM.woff", + sdfGlyphSize: 64, + sdfMargin: 1 / 16, + sdfExponent: 9, + textureWidth: 2048, + }, + Ov = new Nd.Color(); + function Nv() { + return (self.performance || Date).now(); + } + var Gv, + Zv = Object.create(null); + function zv(e, t) { + !0, (e = Hv({}, e)); + var n = Nv(); + if ( + ((e.font = (function (e) { + Gv || + (Gv = + "undefined" === typeof document + ? {} + : document.createElement("a")); + return (Gv.href = e), Gv.href; + })(e.font || Fv.defaultFontURL)), + (e.text = "" + e.text), + (e.sdfGlyphSize = e.sdfGlyphSize || Fv.sdfGlyphSize), + null != e.colorRanges) + ) { + var r = {}; + for (var i in e.colorRanges) + if (e.colorRanges.hasOwnProperty(i)) { + var a = e.colorRanges[i]; + "number" !== typeof a && (a = Ov.set(a).getHex()), (r[i] = a); + } + e.colorRanges = r; + } + Object.freeze(e); + var o = Fv.textureWidth, + s = Fv.sdfExponent, + l = e.sdfGlyphSize, + u = (o / l) * 4, + c = Zv[l]; + if (!c) { + var f = document.createElement("canvas"); + (f.width = o), + (f.height = (256 * l) / u), + ((c = Zv[l] = + { + glyphCount: 0, + sdfGlyphSize: l, + sdfCanvas: f, + sdfTexture: new Nd.Texture( + f, + void 0, + void 0, + void 0, + Nd.LinearFilter, + Nd.LinearFilter + ), + contextLost: !1, + glyphsByFont: new Map(), + }).sdfTexture.generateMipmaps = !1), + (function (e) { + var t = e.sdfCanvas; + t.addEventListener("webglcontextlost", function (t) { + console.log("Context Lost", t), + t.preventDefault(), + (e.contextLost = !0); + }), + t.addEventListener("webglcontextrestored", function (t) { + console.log("Context Restored", t), (e.contextLost = !1); + var n = []; + e.glyphsByFont.forEach(function (t) { + t.forEach(function (t) { + n.push(Qv(t, e, !0)); + }); + }), + Promise.all(n).then(function () { + Vv(e), (e.sdfTexture.needsUpdate = !0); + }); + }); + })(c); + } + var d = c, + h = d.sdfTexture, + p = d.sdfCanvas, + v = c.glyphsByFont.get(e.font); + v || c.glyphsByFont.set(e.font, (v = new Map())), + Wv(e).then(function (r) { + var i = r.glyphIds, + a = r.glyphPositions, + f = r.fontSize, + d = r.unitsPerEm, + m = r.timings, + g = [], + A = new Float32Array(4 * i.length), + y = f / d, + b = 0, + x = 0, + S = Nv(); + i.forEach(function (e, t) { + var n = v.get(e); + if (!n) { + var o = r.glyphData[e], + s = o.path, + u = o.pathBounds, + f = + (Math.max(u[2] - u[0], u[3] - u[1]) / l) * + (Fv.sdfMargin * l + 0.5), + d = c.glyphCount++, + h = [u[0] - f, u[1] - f, u[2] + f, u[3] + f]; + v.set(e, (n = { path: s, atlasIndex: d, sdfViewBox: h })), + g.push(n); + } + var p = n.sdfViewBox, + m = a[x++], + S = a[x++]; + (A[b++] = m + p[0] * y), + (A[b++] = S + p[1] * y), + (A[b++] = m + p[2] * y), + (A[b++] = S + p[3] * y), + (i[t] = n.atlasIndex); + }), + (m.quads = (m.quads || 0) + (Nv() - S)); + var E = Nv(); + m.sdf = {}; + var _ = p.height, + C = Math.ceil(c.glyphCount / u), + w = Math.pow(2, Math.ceil(Math.log2(C * l))); + w > _ && + (console.info( + "Increasing SDF texture size ".concat(_, "->").concat(w) + ), + Dv(p, o, w), + h.dispose()), + Promise.all( + g.map(function (t) { + return Qv(t, c, e.gpuAccelerateSDF).then(function (e) { + var n = e.timing; + m.sdf[t.atlasIndex] = n; + }); + }) + ).then(function () { + g.length && !c.contextLost && (Vv(c), (h.needsUpdate = !0)), + (m.sdfTotal = Nv() - E), + (m.total = Nv() - n), + t( + Object.freeze({ + parameters: e, + sdfTexture: h, + sdfGlyphSize: l, + sdfExponent: s, + glyphBounds: A, + glyphAtlasIndices: i, + glyphColors: r.glyphColors, + caretPositions: r.caretPositions, + caretHeight: r.caretHeight, + chunkedBounds: r.chunkedBounds, + ascender: r.ascender, + descender: r.descender, + lineHeight: r.lineHeight, + capHeight: r.capHeight, + xHeight: r.xHeight, + topBaseline: r.topBaseline, + blockBounds: r.blockBounds, + visibleBounds: r.visibleBounds, + timings: r.timings, + }) + ); + }); + }), + Promise.resolve().then(function () { + c.contextLost || + (function (e) { + e._warm || (Cv.webgl.isSupported(e), (e._warm = !0)); + })(p); + }); + } + function Qv(e, t, n) { + var r = e.path, + i = e.atlasIndex, + a = e.sdfViewBox, + o = t.sdfGlyphSize, + s = t.sdfCanvas; + if (t.contextLost) return Promise.resolve({ timing: -1 }); + var l = Fv.textureWidth, + u = Fv.sdfExponent, + c = Math.max(a[2] - a[0], a[3] - a[1]), + f = Math.floor(i / 4); + return (function (e, t, n, r, i, a, o, s, l, u) { + return arguments.length > 10 && + void 0 !== arguments[10] && + !arguments[10] + ? Lv(e, t, n, r, i, a, o, s, l, u) + : Iv(e, t, n, r, i, a, o, s, l, u).then(null, function (c) { + return ( + Ev || + (console.warn( + "WebGL SDF generation failed, falling back to JS", + c + ), + (Ev = !0)), + Lv(e, t, n, r, i, a, o, s, l, u) + ); + }); + })( + o, + o, + r, + a, + c, + u, + s, + (f % (l / o)) * o, + Math.floor(f / (l / o)) * o, + i % 4, + n + ); + } + function Hv(e, t) { + for (var n in t) t.hasOwnProperty(n) && (e[n] = t[n]); + return e; + } + function Vv(e) { + if ("function" !== typeof createImageBitmap) { + console.info("Safari<15: applying SDF canvas workaround"); + var t = e.sdfCanvas, + n = e.sdfTexture, + r = t.width, + i = t.height, + a = e.sdfCanvas.getContext("webgl"), + o = n.image.data; + (o && o.length === r * i * 4) || + ((o = new Uint8Array(r * i * 4)), + (n.image = { width: r, height: i, data: o }), + (n.flipY = !1), + (n.isDataTexture = !0)), + a.readPixels(0, 0, r, i, a.RGBA, a.UNSIGNED_BYTE, o); + } + } + var jv = iv({ + name: "Typesetter", + dependencies: [ + Fv, + Uv, + function (e, t, n) { + var r = n.defaultFontURL, + i = Object.create(null), + a = 1 / 0, + o = + /[\u00AD\u034F\u061C\u115F-\u1160\u17B4-\u17B5\u180B-\u180E\u200B-\u200F\u202A-\u202E\u2060-\u206F\u3164\uFE00-\uFE0F\uFEFF\uFFA0\uFFF0-\uFFF8]/, + s = "[^\\S\\u00A0]", + l = new RegExp( + "".concat( + s, + "|[\\-\\u007C\\u00AD\\u2010\\u2012-\\u2014\\u2027\\u2056\\u2E17\\u2E40]" + ) + ); + function u(t, n) { + t || (t = r); + var a = i[t]; + a + ? a.pending + ? a.pending.push(n) + : n(a) + : ((i[t] = { pending: [n] }), + (function (t, n) { + !(function i() { + var a = function (e) { + console.error( + "Failure loading font " + .concat(t) + .concat(t === r ? "" : "; trying fallback"), + e + ), + t !== r && ((t = r), i()); + }; + try { + var o = new XMLHttpRequest(); + o.open("get", t, !0), + (o.responseType = "arraybuffer"), + (o.onload = function () { + if (o.status >= 400) a(new Error(o.statusText)); + else if (o.status > 0) + try { + var t = e(o.response); + n(t); + } catch (r) { + a(r); + } + }), + (o.onerror = a), + o.send(); + } catch (s) { + a(s); + } + })(); + })(t, function (e) { + var n = i[t].pending; + (i[t] = e), + n.forEach(function (t) { + return t(e); + }); + })); + } + function c(e, n) { + var i = e.text, + c = void 0 === i ? "" : i, + v = e.font, + m = void 0 === v ? r : v, + g = (e.sdfGlyphSize, e.fontSize), + A = void 0 === g ? 1 : g, + y = e.letterSpacing, + b = void 0 === y ? 0 : y, + x = e.lineHeight, + S = void 0 === x ? "normal" : x, + E = e.maxWidth, + _ = void 0 === E ? a : E, + C = e.direction, + w = e.textAlign, + T = void 0 === w ? "left" : w, + M = e.textIndent, + I = void 0 === M ? 0 : M, + k = e.whiteSpace, + R = void 0 === k ? "normal" : k, + B = e.overflowWrap, + P = void 0 === B ? "normal" : B, + L = e.anchorX, + D = void 0 === L ? 0 : L, + U = e.anchorY, + F = void 0 === U ? 0 : U, + O = e.includeCaretPositions, + N = void 0 !== O && O, + G = e.chunkedBoundsSize, + Z = void 0 === G ? 8192 : G, + z = e.colorRanges, + Q = void 0 === z ? null : z, + H = + arguments.length > 2 && + void 0 !== arguments[2] && + arguments[2], + V = h(), + j = { fontLoad: 0, typesetting: 0 }; + c.indexOf("\r") > -1 && + (console.info( + "Typesetter: got text with \\r chars; normalizing to \\n" + ), + (c = c.replace(/\r\n/g, "\n").replace(/\r/g, "\n"))), + (A = +A), + (b = +b), + (_ = +_), + (S = S || "normal"), + (I = +I), + u(m, function (e) { + var r = isFinite(_), + i = null, + u = null, + v = null, + m = null, + g = null, + y = null, + x = null, + E = 0, + w = 0, + M = "nowrap" !== R, + k = e.ascender, + B = e.descender, + L = e.unitsPerEm, + U = e.lineGap, + O = e.capHeight, + G = e.xHeight; + j.fontLoad = h() - V; + var z = h(), + W = A / L; + "normal" === S && (S = (k - B + U) / L); + var X = ((S *= A) - (k - B) * W) / 2, + Y = -(k * W + X), + q = Math.min(S, (k - B) * W), + J = ((k + B) / 2) * W - q / 2, + K = I, + $ = new p(), + ee = [$]; + e.forEachGlyph(c, A, b, function (e, t, n) { + var i, + a = c.charAt(n), + u = e.advanceWidth * W, + f = $.count; + if ( + ("isEmpty" in e || + ((e.isWhitespace = !!a && new RegExp(s).test(a)), + (e.canBreakAfter = !!a && l.test(a)), + (e.isEmpty = + e.xMin === e.xMax || e.yMin === e.yMax || o.test(a))), + e.isWhitespace || e.isEmpty || w++, + M && r && !e.isWhitespace && t + u + K > _ && f) + ) { + if ($.glyphAt(f - 1).glyphObj.canBreakAfter) + (i = new p()), (K = -t); + else + for (var d = f; d--; ) { + if (0 === d && "break-word" === P) { + (i = new p()), (K = -t); + break; + } + if ($.glyphAt(d).glyphObj.canBreakAfter) { + var h = (i = $.splitAt(d + 1)).glyphAt(0).x; + K -= h; + for (var v = i.count; v--; ) i.glyphAt(v).x -= h; + break; + } + } + i && + (($.isSoftWrapped = !0), ($ = i), ee.push($), (E = _)); + } + var m = $.glyphAt($.count); + (m.glyphObj = e), + (m.x = t + K), + (m.width = u), + (m.charIndex = n), + "\n" === a && + (($ = new p()), ee.push($), (K = -(t + u + b * A) + I)); + }), + ee.forEach(function (e) { + for (var t = e.count; t--; ) { + var n = e.glyphAt(t), + r = n.glyphObj, + i = n.x, + a = n.width; + if (!r.isWhitespace) + return ( + (e.width = i + a), + void (e.width > E && (E = e.width)) + ); + } + }); + var te = 0, + ne = 0; + if ( + (D && + ("number" === typeof D + ? (te = -D) + : "string" === typeof D && + (te = + -E * + ("left" === D + ? 0 + : "center" === D + ? 0.5 + : "right" === D + ? 1 + : f(D)))), + F) + ) + if ("number" === typeof F) ne = -F; + else if ("string" === typeof F) { + var re = ee.length * S; + ne = + "top" === F + ? 0 + : "top-baseline" === F + ? -Y + : "top-cap" === F + ? -Y - O * W + : "top-ex" === F + ? -Y - G * W + : "middle" === F + ? re / 2 + : "bottom" === F + ? re + : "bottom-baseline" === F + ? re - X + B * W + : f(F) * re; + } + if (!H) { + var ie = t.getEmbeddingLevels(c, C); + (i = new Uint16Array(w)), + (u = new Float32Array(2 * w)), + (v = {}), + (y = [a, a, -a, -a]), + (x = []); + var ae = Y; + N && (g = new Float32Array(3 * c.length)), + Q && (m = new Uint8Array(3 * w)); + var oe, + se, + le = 0, + ue = -1, + ce = -1; + if ( + (ee.forEach(function (n, r) { + var o = n.count, + s = n.width; + if (o > 0) { + for ( + var l = 0, f = o; + f-- && n.glyphAt(f).glyphObj.isWhitespace; + + ) + l++; + var h = 0, + p = 0; + if ("center" === T) h = (E - s) / 2; + else if ("right" === T) h = E - s; + else if ("justify" === T && n.isSoftWrapped) { + for (var A = 0, b = o - l; b--; ) + n.glyphAt(b).glyphObj.isWhitespace && A++; + p = (E - s) / A; + } + if (p || h) + for (var _ = 0, C = 0; C < o; C++) { + var w = n.glyphAt(C), + M = w.glyphObj; + (w.x += h + _), + 0 !== p && + M.isWhitespace && + C < o - l && + ((_ += p), (w.width += p)); + } + for ( + var I, + k = t.getReorderSegments( + c, + ie, + n.glyphAt(0).charIndex, + n.glyphAt(n.count - 1).charIndex + ), + R = 0; + R < k.length; + R++ + ) + for ( + var B = (0, Ot.Z)(k[R], 2), + P = B[0], + L = B[1], + D = 1 / 0, + U = -1 / 0, + F = 0; + F < o; + F++ + ) + if (n.glyphAt(F).charIndex >= P) { + for (var O = F, G = F; G < o; G++) { + var z = n.glyphAt(G); + if (z.charIndex > L) break; + G < o - l && + ((D = Math.min(D, z.x)), + (U = Math.max(U, z.x + z.width))); + } + for (var H = O; H < G; H++) { + var V = n.glyphAt(H); + V.x = U - (V.x + V.width - D); + } + break; + } + for ( + var j = function (e) { + return (I = e); + }, + X = 0; + X < o; + X++ + ) { + var Y = n.glyphAt(X), + q = (I = Y.glyphObj).index, + K = 1 & ie.levels[Y.charIndex]; + if (K) { + var $ = t.getMirroredCharacter(c[Y.charIndex]); + $ && e.forEachGlyph($, 0, 0, j); + } + if (N) { + var ee = Y.charIndex, + re = Y.x + te, + fe = Y.x + Y.width + te; + (g[3 * ee] = K ? fe : re), + (g[3 * ee + 1] = K ? re : fe), + (g[3 * ee + 2] = ae + J + ne); + var de = ee - ue; + de > 1 && d(g, ue, de), (ue = ee); + } + if (Q) + for (var he = Y.charIndex; he > ce; ) + ce++, Q.hasOwnProperty(ce) && (se = Q[ce]); + if (!I.isWhitespace && !I.isEmpty) { + var pe = le++; + v[q] || + (v[q] = { + path: I.path, + pathBounds: [I.xMin, I.yMin, I.xMax, I.yMax], + }); + var ve = Y.x + te, + me = ae + ne; + (u[2 * pe] = ve), (u[2 * pe + 1] = me); + var ge = ve + I.xMin * W, + Ae = me + I.yMin * W, + ye = ve + I.xMax * W, + be = me + I.yMax * W; + ge < y[0] && (y[0] = ge), + Ae < y[1] && (y[1] = Ae), + ye > y[2] && (y[2] = ye), + be > y[3] && (y[3] = be), + pe % Z === 0 && + ((oe = { + start: pe, + end: pe, + rect: [a, a, -a, -a], + }), + x.push(oe)), + oe.end++; + var xe = oe.rect; + if ( + (ge < xe[0] && (xe[0] = ge), + Ae < xe[1] && (xe[1] = Ae), + ye > xe[2] && (xe[2] = ye), + be > xe[3] && (xe[3] = be), + (i[pe] = q), + Q) + ) { + var Se = 3 * pe; + (m[Se] = (se >> 16) & 255), + (m[Se + 1] = (se >> 8) & 255), + (m[Se + 2] = 255 & se); + } + } + } + } + ae -= S; + }), + g) + ) { + var fe = c.length - ue; + fe > 1 && d(g, ue, fe); + } + } + (j.typesetting = h() - z), + n({ + glyphIds: i, + glyphPositions: u, + glyphData: v, + caretPositions: g, + caretHeight: q, + glyphColors: m, + chunkedBounds: x, + fontSize: A, + unitsPerEm: L, + ascender: k * W, + descender: B * W, + capHeight: O * W, + xHeight: G * W, + lineHeight: S, + topBaseline: Y, + blockBounds: [te, ne - ee.length * S, te + E, ne], + visibleBounds: y, + timings: j, + }); + }); + } + function f(e) { + var t = e.match(/^([\d.]+)%$/), + n = t ? parseFloat(t[1]) : NaN; + return isNaN(n) ? 0 : n / 100; + } + function d(e, t, n) { + for ( + var r = e[3 * t], + i = e[3 * t + 1], + a = e[3 * t + 2], + o = (i - r) / n, + s = 0; + s < n; + s++ + ) { + var l = 3 * (t + s); + (e[l] = r + o * s), + (e[l + 1] = r + o * (s + 1)), + (e[l + 2] = a); + } + } + function h() { + return (self.performance || Date).now(); + } + function p() { + this.data = []; + } + var v = ["glyphObj", "x", "width", "charIndex"]; + return ( + (p.prototype = { + width: 0, + isSoftWrapped: !1, + get count() { + return Math.ceil(this.data.length / v.length); + }, + glyphAt: function (e) { + var t = p.flyweight; + return (t.data = this.data), (t.index = e), t; + }, + splitAt: function (e) { + var t = new p(); + return (t.data = this.data.splice(e * v.length)), t; + }, + }), + (p.flyweight = v.reduce( + function (e, t, n, r) { + return ( + Object.defineProperty(e, t, { + get: function () { + return this.data[this.index * v.length + n]; + }, + set: function (e) { + this.data[this.index * v.length + n] = e; + }, + }), + e + ); + }, + { data: null, index: 0 } + )), + { + typeset: c, + measure: function (e, t) { + c( + e, + function (e) { + var n = (0, Ot.Z)(e.blockBounds, 4), + r = n[0], + i = n[1], + a = n[2], + o = n[3]; + t({ width: a - r, height: o - i }); + }, + { metricsOnly: !0 } + ); + }, + loadFont: u, + } + ); + }, + lv, + ], + init: function (e, t, n, r) { + var i = e.defaultFontURL; + return n(t, r(), { defaultFontURL: i }); + }, + }), + Wv = iv({ + name: "Typesetter", + dependencies: [jv], + init: function (e) { + return function (t) { + return new Promise(function (n) { + e.typeset(t, n); + }); + }; + }, + getTransferables: function (e) { + var t = [e.glyphPositions.buffer, e.glyphIds.buffer]; + return ( + e.caretPositions && t.push(e.caretPositions.buffer), + e.glyphColors && t.push(e.glyphColors.buffer), + t + ); + }, + }); + var Xv = {}; + var Yv = "aTroikaGlyphIndex", + qv = (function (e) { + (0, Dd.Z)(n, e); + var t = (0, Ud.Z)(n); + function n() { + var e; + return ( + (0, Ti.Z)(this, n), + ((e = t.call(this)).detail = 1), + (e.curveRadius = 0), + (e.groups = [ + { start: 0, count: 1 / 0, materialIndex: 0 }, + { start: 0, count: 1 / 0, materialIndex: 1 }, + ]), + (e.boundingSphere = new Nd.Sphere()), + (e.boundingBox = new Nd.Box3()), + e + ); + } + return ( + (0, Mi.Z)(n, [ + { key: "computeBoundingSphere", value: function () {} }, + { key: "computeBoundingBox", value: function () {} }, + { + key: "setSide", + value: function (e) { + var t = this.getIndex().count; + this.setDrawRange( + e === Nd.BackSide ? t / 2 : 0, + e === Nd.DoubleSide ? t : t / 2 + ); + }, + }, + { + key: "detail", + get: function () { + return this._detail; + }, + set: function (e) { + var t = this; + if (e !== this._detail) { + (this._detail = e), + ("number" !== typeof e || e < 1) && (e = 1); + var n = (function (e) { + var t = Xv[e]; + if (!t) { + for ( + var n = new Nd.PlaneGeometry(1, 1, e, e), + r = n.clone(), + i = n.attributes, + a = r.attributes, + o = new Nd.BufferGeometry(), + s = i.uv.count, + l = 0; + l < s; + l++ + ) + (a.position.array[3 * l] *= -1), + (a.normal.array[3 * l + 2] *= -1); + ["position", "normal", "uv"].forEach(function (e) { + o.setAttribute( + e, + new Nd.Float32BufferAttribute( + [].concat( + (0, xt.Z)(i[e].array), + (0, xt.Z)(a[e].array) + ), + i[e].itemSize + ) + ); + }), + o.setIndex( + [].concat( + (0, xt.Z)(n.index.array), + (0, xt.Z)( + r.index.array.map(function (e) { + return e + s; + }) + ) + ) + ), + o.translate(0.5, 0.5, 0), + (t = Xv[e] = o); + } + return t; + })(e); + ["position", "normal", "uv"].forEach(function (e) { + t.attributes[e] = n.attributes[e].clone(); + }), + this.setIndex(n.getIndex().clone()); + } + }, + }, + { + key: "curveRadius", + get: function () { + return this._curveRadius; + }, + set: function (e) { + e !== this._curveRadius && + ((this._curveRadius = e), this._updateBounds()); + }, + }, + { + key: "updateGlyphs", + value: function (e, t, n, r, i) { + Jv(this, "aTroikaGlyphBounds", e, 4), + Jv(this, Yv, t, 1), + Jv(this, "aTroikaGlyphColor", i, 3), + (this._blockBounds = n), + (this._chunkedBounds = r), + (this.instanceCount = t.length), + this._updateBounds(); + }, + }, + { + key: "_updateBounds", + value: function () { + var e = this._blockBounds; + if (e) { + var t = this.curveRadius, + n = this.boundingBox; + if (t) { + var r = Math.PI, + i = Math.floor, + a = Math.min, + o = Math.max, + s = Math.sin, + l = Math.cos, + u = r / 2, + c = 2 * r, + f = Math.abs(t), + d = e[0] / f, + h = e[2] / f, + p = + i((d + u) / c) !== i((h + u) / c) + ? -f + : a(s(d) * f, s(h) * f), + v = + i((d - u) / c) !== i((h - u) / c) + ? f + : o(s(d) * f, s(h) * f), + m = + i((d + r) / c) !== i((h + r) / c) + ? 2 * f + : o(f - l(d) * f, f - l(h) * f); + n.min.set(p, e[1], t < 0 ? -m : 0), + n.max.set(v, e[3], t < 0 ? 0 : m); + } else n.min.set(e[0], e[1], 0), n.max.set(e[2], e[3], 0); + n.getBoundingSphere(this.boundingSphere); + } + }, + }, + { + key: "applyClipRect", + value: function (e) { + var t = this.getAttribute(Yv).count, + n = this._chunkedBounds; + if (n) + for (var r = n.length; r--; ) { + t = n[r].end; + var i = n[r].rect; + if (i[1] < e.w && i[3] > e.y && i[0] < e.z && i[2] > e.x) + break; + } + this.instanceCount = t; + }, + }, + ]), + n + ); + })(Nd.InstancedBufferGeometry); + function Jv(e, t, n, r) { + var i = e.getAttribute(t); + n + ? i && i.array.length === n.length + ? (i.array.set(n), (i.needsUpdate = !0)) + : (e.setAttribute(t, new Nd.InstancedBufferAttribute(n, r)), + delete e._maxInstanceCount, + e.dispose()) + : i && e.deleteAttribute(t); + } + var Kv = + "\nvec4 bounds = aTroikaGlyphBounds;\nbounds.xz += uTroikaPositionOffset.x;\nbounds.yw -= uTroikaPositionOffset.y;\n\nvec4 outlineBounds = vec4(\n bounds.xy - uTroikaDistanceOffset - uTroikaBlurRadius,\n bounds.zw + uTroikaDistanceOffset + uTroikaBlurRadius\n);\nvec4 clippedBounds = vec4(\n clamp(outlineBounds.xy, uTroikaClipRect.xy, uTroikaClipRect.zw),\n clamp(outlineBounds.zw, uTroikaClipRect.xy, uTroikaClipRect.zw)\n);\n\nvec2 clippedXY = (mix(clippedBounds.xy, clippedBounds.zw, position.xy) - bounds.xy) / (bounds.zw - bounds.xy);\n\nposition.xy = mix(bounds.xy, bounds.zw, clippedXY);\n\nuv = (position.xy - uTroikaTotalBounds.xy) / (uTroikaTotalBounds.zw - uTroikaTotalBounds.xy);\n\nfloat rad = uTroikaCurveRadius;\nif (rad != 0.0) {\n float angle = position.x / rad;\n position.xz = vec2(sin(angle) * rad, rad - cos(angle) * rad);\n normal.xz = vec2(sin(angle), cos(angle));\n}\n \nposition = uTroikaOrient * position;\nnormal = uTroikaOrient * normal;\n\nvTroikaGlyphUV = clippedXY.xy;\nvTroikaGlyphDimensions = vec2(bounds[2] - bounds[0], bounds[3] - bounds[1]);\n\n".concat( + "\nfloat txCols = uTroikaSDFTextureSize.x / uTroikaSDFGlyphSize;\nvec2 txUvPerSquare = uTroikaSDFGlyphSize / uTroikaSDFTextureSize;\nvec2 txStartUV = txUvPerSquare * vec2(\n mod(floor(aTroikaGlyphIndex / 4.0), txCols),\n floor(floor(aTroikaGlyphIndex / 4.0) / txCols)\n);\nvTroikaTextureUVBounds = vec4(txStartUV, vec2(txStartUV) + txUvPerSquare);\nvTroikaTextureChannel = mod(aTroikaGlyphIndex, 4.0);\n" + ), + $v = + "\nuniform sampler2D uTroikaSDFTexture;\nuniform vec2 uTroikaSDFTextureSize;\nuniform float uTroikaSDFGlyphSize;\nuniform float uTroikaSDFExponent;\nuniform float uTroikaDistanceOffset;\nuniform float uTroikaFillOpacity;\nuniform float uTroikaOutlineOpacity;\nuniform float uTroikaBlurRadius;\nuniform vec3 uTroikaStrokeColor;\nuniform float uTroikaStrokeWidth;\nuniform float uTroikaStrokeOpacity;\nuniform bool uTroikaSDFDebug;\nvarying vec2 vTroikaGlyphUV;\nvarying vec4 vTroikaTextureUVBounds;\nvarying float vTroikaTextureChannel;\nvarying vec2 vTroikaGlyphDimensions;\n\nfloat troikaSdfValueToSignedDistance(float alpha) {\n // Inverse of exponential encoding in webgl-sdf-generator\n ".concat( + "\n float maxDimension = max(vTroikaGlyphDimensions.x, vTroikaGlyphDimensions.y);\n float absDist = (1.0 - pow(2.0 * (alpha > 0.5 ? 1.0 - alpha : alpha), 1.0 / uTroikaSDFExponent)) * maxDimension;\n float signedDist = absDist * (alpha > 0.5 ? -1.0 : 1.0);\n return signedDist;\n}\n\nfloat troikaGlyphUvToSdfValue(vec2 glyphUV) {\n vec2 textureUV = mix(vTroikaTextureUVBounds.xy, vTroikaTextureUVBounds.zw, glyphUV);\n vec4 rgba = texture2D(uTroikaSDFTexture, textureUV);\n float ch = floor(vTroikaTextureChannel + 0.5); //NOTE: can't use round() in WebGL1\n return ch == 0.0 ? rgba.r : ch == 1.0 ? rgba.g : ch == 2.0 ? rgba.b : rgba.a;\n}\n\nfloat troikaGlyphUvToDistance(vec2 uv) {\n return troikaSdfValueToSignedDistance(troikaGlyphUvToSdfValue(uv));\n}\n\nfloat troikaGetAADist() {\n ", + "\n #if defined(GL_OES_standard_derivatives) || __VERSION__ >= 300\n return length(fwidth(vTroikaGlyphUV * vTroikaGlyphDimensions)) * 0.5;\n #else\n return vTroikaGlyphDimensions.x / 64.0;\n #endif\n}\n\nfloat troikaGetFragDistValue() {\n vec2 clampedGlyphUV = clamp(vTroikaGlyphUV, 0.5 / uTroikaSDFGlyphSize, 1.0 - 0.5 / uTroikaSDFGlyphSize);\n float distance = troikaGlyphUvToDistance(clampedGlyphUV);\n \n // Extrapolate distance when outside bounds:\n distance += clampedGlyphUV == vTroikaGlyphUV ? 0.0 : \n length((vTroikaGlyphUV - clampedGlyphUV) * vTroikaGlyphDimensions);\n\n ", + "\n\n return distance;\n}\n\nfloat troikaGetEdgeAlpha(float distance, float distanceOffset, float aaDist) {\n #if defined(IS_DEPTH_MATERIAL) || defined(IS_DISTANCE_MATERIAL)\n float alpha = step(-distanceOffset, -distance);\n #else\n\n float alpha = smoothstep(\n distanceOffset + aaDist,\n distanceOffset - aaDist,\n distance\n );\n #endif\n\n return alpha;\n}\n" + ); + var em = new Nd.MeshBasicMaterial({ + color: 16777215, + side: Nd.DoubleSide, + transparent: !0, + }), + tm = 8421504, + nm = new Nd.Matrix4(), + rm = new Nd.Vector3(), + im = new Nd.Vector3(), + am = [], + om = new Nd.Vector3(), + sm = "+x+y"; + function lm(e) { + return Array.isArray(e) ? e[0] : e; + } + var um = function () { + var e = new Nd.Mesh(new Nd.PlaneGeometry(1, 1), em); + return ( + (um = function () { + return e; + }), + e + ); + }, + cm = function () { + var e = new Nd.Mesh(new Nd.PlaneGeometry(1, 1, 32, 1), em); + return ( + (cm = function () { + return e; + }), + e + ); + }, + fm = { type: "syncstart" }, + dm = { type: "synccomplete" }, + hm = [ + "font", + "fontSize", + "letterSpacing", + "lineHeight", + "maxWidth", + "overflowWrap", + "text", + "direction", + "textAlign", + "textIndent", + "whiteSpace", + "anchorX", + "anchorY", + "colorRanges", + "sdfGlyphSize", + ], + pm = hm.concat( + "material", + "color", + "depthOffset", + "clipRect", + "curveRadius", + "orientation", + "glyphGeometryDetail" + ), + vm = (function (e) { + (0, Dd.Z)(n, e); + var t = (0, Ud.Z)(n); + function n() { + var e; + (0, Ti.Z)(this, n); + var r = new qv(); + return ( + ((e = t.call(this, r, null)).text = ""), + (e.anchorX = 0), + (e.anchorY = 0), + (e.curveRadius = 0), + (e.direction = "auto"), + (e.font = null), + (e.fontSize = 0.1), + (e.letterSpacing = 0), + (e.lineHeight = "normal"), + (e.maxWidth = 1 / 0), + (e.overflowWrap = "normal"), + (e.textAlign = "left"), + (e.textIndent = 0), + (e.whiteSpace = "normal"), + (e.material = null), + (e.color = null), + (e.colorRanges = null), + (e.outlineWidth = 0), + (e.outlineColor = 0), + (e.outlineOpacity = 1), + (e.outlineBlur = 0), + (e.outlineOffsetX = 0), + (e.outlineOffsetY = 0), + (e.strokeWidth = 0), + (e.strokeColor = tm), + (e.strokeOpacity = 1), + (e.fillOpacity = 1), + (e.depthOffset = 0), + (e.clipRect = null), + (e.orientation = sm), + (e.glyphGeometryDetail = 1), + (e.sdfGlyphSize = null), + (e.gpuAccelerateSDF = !0), + (e.debugSDF = !1), + e + ); + } + return ( + (0, Mi.Z)(n, [ + { + key: "sync", + value: function (e) { + var t = this; + this._needsSync && + ((this._needsSync = !1), + this._isSyncing + ? (this._queuedSyncs || (this._queuedSyncs = [])).push(e) + : ((this._isSyncing = !0), + this.dispatchEvent(fm), + zv( + { + text: this.text, + font: this.font, + fontSize: this.fontSize || 0.1, + letterSpacing: this.letterSpacing || 0, + lineHeight: this.lineHeight || "normal", + maxWidth: this.maxWidth, + direction: this.direction || "auto", + textAlign: this.textAlign, + textIndent: this.textIndent, + whiteSpace: this.whiteSpace, + overflowWrap: this.overflowWrap, + anchorX: this.anchorX, + anchorY: this.anchorY, + colorRanges: this.colorRanges, + includeCaretPositions: !0, + sdfGlyphSize: this.sdfGlyphSize, + gpuAccelerateSDF: this.gpuAccelerateSDF, + }, + function (n) { + (t._isSyncing = !1), + (t._textRenderInfo = n), + t.geometry.updateGlyphs( + n.glyphBounds, + n.glyphAtlasIndices, + n.blockBounds, + n.chunkedBounds, + n.glyphColors + ); + var r = t._queuedSyncs; + r && + ((t._queuedSyncs = null), + (t._needsSync = !0), + t.sync(function () { + r.forEach(function (e) { + return e && e(); + }); + })), + t.dispatchEvent(dm), + e && e(); + } + ))); + }, + }, + { + key: "onBeforeRender", + value: function (e, t, n, r, i, a) { + this.sync(), + i.isTroikaTextMaterial && this._prepareForRender(i), + (i._hadOwnSide = i.hasOwnProperty("side")), + this.geometry.setSide((i._actualSide = i.side)), + (i.side = Nd.FrontSide); + }, + }, + { + key: "onAfterRender", + value: function (e, t, n, r, i, a) { + i._hadOwnSide ? (i.side = i._actualSide) : delete i.side; + }, + }, + { + key: "dispose", + value: function () { + this.geometry.dispose(); + }, + }, + { + key: "textRenderInfo", + get: function () { + return this._textRenderInfo || null; + }, + }, + { + key: "material", + get: function () { + var e = this._derivedMaterial, + t = + this._baseMaterial || + this._defaultMaterial || + (this._defaultMaterial = em.clone()); + if ( + ((e && e.baseMaterial === t) || + ((e = this._derivedMaterial = + (function (e) { + var t = Av(e, { + chained: !0, + extensions: { derivatives: !0 }, + uniforms: { + uTroikaSDFTexture: { value: null }, + uTroikaSDFTextureSize: { value: new Nd.Vector2() }, + uTroikaSDFGlyphSize: { value: 0 }, + uTroikaSDFExponent: { value: 0 }, + uTroikaTotalBounds: { + value: new Nd.Vector4(0, 0, 0, 0), + }, + uTroikaClipRect: { + value: new Nd.Vector4(0, 0, 0, 0), + }, + uTroikaDistanceOffset: { value: 0 }, + uTroikaOutlineOpacity: { value: 0 }, + uTroikaFillOpacity: { value: 1 }, + uTroikaPositionOffset: { value: new Nd.Vector2() }, + uTroikaCurveRadius: { value: 0 }, + uTroikaBlurRadius: { value: 0 }, + uTroikaStrokeWidth: { value: 0 }, + uTroikaStrokeColor: { value: new Nd.Color() }, + uTroikaStrokeOpacity: { value: 1 }, + uTroikaOrient: { value: new Nd.Matrix3() }, + uTroikaUseGlyphColors: { value: !0 }, + uTroikaSDFDebug: { value: !1 }, + }, + vertexDefs: + "\nuniform vec2 uTroikaSDFTextureSize;\nuniform float uTroikaSDFGlyphSize;\nuniform vec4 uTroikaTotalBounds;\nuniform vec4 uTroikaClipRect;\nuniform mat3 uTroikaOrient;\nuniform bool uTroikaUseGlyphColors;\nuniform float uTroikaDistanceOffset;\nuniform float uTroikaBlurRadius;\nuniform vec2 uTroikaPositionOffset;\nuniform float uTroikaCurveRadius;\nattribute vec4 aTroikaGlyphBounds;\nattribute float aTroikaGlyphIndex;\nattribute vec3 aTroikaGlyphColor;\nvarying vec2 vTroikaGlyphUV;\nvarying vec4 vTroikaTextureUVBounds;\nvarying float vTroikaTextureChannel;\nvarying vec3 vTroikaGlyphColor;\nvarying vec2 vTroikaGlyphDimensions;\n", + vertexTransform: Kv, + fragmentDefs: $v, + fragmentColorTransform: + "\nfloat aaDist = troikaGetAADist();\nfloat fragDistance = troikaGetFragDistValue();\nfloat edgeAlpha = uTroikaSDFDebug ?\n troikaGlyphUvToSdfValue(vTroikaGlyphUV) :\n troikaGetEdgeAlpha(fragDistance, uTroikaDistanceOffset, max(aaDist, uTroikaBlurRadius));\n\n#if !defined(IS_DEPTH_MATERIAL) && !defined(IS_DISTANCE_MATERIAL)\nvec4 fillRGBA = gl_FragColor;\nfillRGBA.a *= uTroikaFillOpacity;\nvec4 strokeRGBA = uTroikaStrokeWidth == 0.0 ? fillRGBA : vec4(uTroikaStrokeColor, uTroikaStrokeOpacity);\nif (fillRGBA.a == 0.0) fillRGBA.rgb = strokeRGBA.rgb;\ngl_FragColor = mix(fillRGBA, strokeRGBA, smoothstep(\n -uTroikaStrokeWidth - aaDist,\n -uTroikaStrokeWidth + aaDist,\n fragDistance\n));\ngl_FragColor.a *= edgeAlpha;\n#endif\n\nif (edgeAlpha == 0.0) {\n discard;\n}\n", + customRewriter: function (e) { + var t = e.vertexShader, + n = e.fragmentShader, + r = /\buniform\s+vec3\s+diffuse\b/; + return ( + r.test(n) && + ((n = n + .replace(r, "varying vec3 vTroikaGlyphColor") + .replace( + /\bdiffuse\b/g, + "vTroikaGlyphColor" + )), + r.test(t) || + (t = t.replace( + uv, + "uniform vec3 diffuse;\n$&\nvTroikaGlyphColor = uTroikaUseGlyphColors ? aTroikaGlyphColor / 255.0 : diffuse;\n" + ))), + { vertexShader: t, fragmentShader: n } + ); + }, + }); + return ( + (t.transparent = !0), + Object.defineProperties(t, { + isTroikaTextMaterial: { value: !0 }, + shadowSide: { + get: function () { + return this.side; + }, + set: function () {}, + }, + }), + t + ); + })(t)), + t.addEventListener("dispose", function n() { + t.removeEventListener("dispose", n), e.dispose(); + })), + this.outlineWidth || + this.outlineBlur || + this.outlineOffsetX || + this.outlineOffsetY) + ) { + var n = e._outlineMtl; + return ( + n || + (((n = e._outlineMtl = + Object.create(e, { + id: { value: e.id + 0.1 }, + })).isTextOutlineMaterial = !0), + (n.depthWrite = !1), + (n.map = null), + e.addEventListener("dispose", function t() { + e.removeEventListener("dispose", t), n.dispose(); + })), + [n, e] + ); + } + return e; + }, + set: function (e) { + e && e.isTroikaTextMaterial + ? ((this._derivedMaterial = e), + (this._baseMaterial = e.baseMaterial)) + : (this._baseMaterial = e); + }, + }, + { + key: "glyphGeometryDetail", + get: function () { + return this.geometry.detail; + }, + set: function (e) { + this.geometry.detail = e; + }, + }, + { + key: "curveRadius", + get: function () { + return this.geometry.curveRadius; + }, + set: function (e) { + this.geometry.curveRadius = e; + }, + }, + { + key: "customDepthMaterial", + get: function () { + return lm(this.material).getDepthMaterial(); + }, + }, + { + key: "customDistanceMaterial", + get: function () { + return lm(this.material).getDistanceMaterial(); + }, + }, + { + key: "_prepareForRender", + value: function (e) { + var t = e.isTextOutlineMaterial, + n = e.uniforms, + r = this.textRenderInfo; + if (r) { + var i = r.sdfTexture, + a = r.blockBounds; + (n.uTroikaSDFTexture.value = i), + n.uTroikaSDFTextureSize.value.set( + i.image.width, + i.image.height + ), + (n.uTroikaSDFGlyphSize.value = r.sdfGlyphSize), + (n.uTroikaSDFExponent.value = r.sdfExponent), + n.uTroikaTotalBounds.value.fromArray(a), + (n.uTroikaUseGlyphColors.value = !t && !!r.glyphColors); + var o, + s, + l, + u = 0, + c = 0, + f = 0, + d = 0, + h = 0; + if (t) { + var p = this.outlineWidth, + v = this.outlineOffsetX, + m = this.outlineOffsetY, + g = this.outlineBlur, + A = this.outlineOpacity; + (u = this._parsePercent(p) || 0), + (c = Math.max(0, this._parsePercent(g) || 0)), + (o = A), + (d = this._parsePercent(v) || 0), + (h = this._parsePercent(m) || 0); + } else + (f = Math.max( + 0, + this._parsePercent(this.strokeWidth) || 0 + )) && + ((l = this.strokeColor), + n.uTroikaStrokeColor.value.set(null == l ? tm : l), + null == (s = this.strokeOpacity) && (s = 1)), + (o = this.fillOpacity); + (n.uTroikaDistanceOffset.value = u), + n.uTroikaPositionOffset.value.set(d, h), + (n.uTroikaBlurRadius.value = c), + (n.uTroikaStrokeWidth.value = f), + (n.uTroikaStrokeOpacity.value = s), + (n.uTroikaFillOpacity.value = null == o ? 1 : o), + (n.uTroikaCurveRadius.value = this.curveRadius || 0); + var y = this.clipRect; + if (y && Array.isArray(y) && 4 === y.length) + n.uTroikaClipRect.value.fromArray(y); + else { + var b = 100 * (this.fontSize || 0.1); + n.uTroikaClipRect.value.set( + a[0] - b, + a[1] - b, + a[2] + b, + a[3] + b + ); + } + this.geometry.applyClipRect(n.uTroikaClipRect.value); + } + (n.uTroikaSDFDebug.value = !!this.debugSDF), + (e.polygonOffset = !!this.depthOffset), + (e.polygonOffsetFactor = e.polygonOffsetUnits = + this.depthOffset || 0); + var x = t ? this.outlineColor || 0 : this.color; + if (null == x) delete e.color; + else { + var S = e.hasOwnProperty("color") + ? e.color + : (e.color = new Nd.Color()); + (x === S._input && "object" !== typeof x) || + S.set((S._input = x)); + } + var E = this.orientation || sm; + if (E !== e._orientation) { + var _ = n.uTroikaOrient.value, + C = + (E = E.replace(/[^-+xyz]/g, "")) !== sm && + E.match(/^([-+])([xyz])([-+])([xyz])$/); + if (C) { + var w = (0, Ot.Z)(C, 5), + T = w[1], + M = w[2], + I = w[3], + k = w[4]; + (rm.set(0, 0, 0)[M] = "-" === T ? 1 : -1), + (im.set(0, 0, 0)[k] = "-" === I ? -1 : 1), + nm.lookAt(om, rm.cross(im), im), + _.setFromMatrix4(nm); + } else _.identity(); + e._orientation = E; + } + }, + }, + { + key: "_parsePercent", + value: function (e) { + if ("string" === typeof e) { + var t = e.match(/^(-?[\d.]+)%$/), + n = t ? parseFloat(t[1]) : NaN; + e = (isNaN(n) ? 0 : n / 100) * this.fontSize; + } + return e; + }, + }, + { + key: "localPositionToTextCoords", + value: function (e) { + var t = + arguments.length > 1 && void 0 !== arguments[1] + ? arguments[1] + : new Nd.Vector2(); + t.copy(e); + var n = this.curveRadius; + return ( + n && + (t.x = + Math.atan2(e.x, Math.abs(n) - Math.abs(e.z)) * + Math.abs(n)), + t + ); + }, + }, + { + key: "worldPositionToTextCoords", + value: function (e) { + var t = + arguments.length > 1 && void 0 !== arguments[1] + ? arguments[1] + : new Nd.Vector2(); + return ( + rm.copy(e), + this.localPositionToTextCoords(this.worldToLocal(rm), t) + ); + }, + }, + { + key: "raycast", + value: function (e, t) { + var n = this.textRenderInfo, + r = this.curveRadius; + if (n) { + for ( + var i = n.blockBounds, + a = r ? cm() : um(), + o = a.geometry, + s = o.attributes, + l = s.position, + u = s.uv, + c = 0; + c < u.count; + c++ + ) { + var f = i[0] + u.getX(c) * (i[2] - i[0]), + d = i[1] + u.getY(c) * (i[3] - i[1]), + h = 0; + r && + ((h = r - Math.cos(f / r) * r), + (f = Math.sin(f / r) * r)), + l.setXYZ(c, f, d, h); + } + (o.boundingSphere = this.geometry.boundingSphere), + (o.boundingBox = this.geometry.boundingBox), + (a.matrixWorld = this.matrixWorld), + (a.material.side = this.material.side), + (am.length = 0), + a.raycast(e, am); + for (var p = 0; p < am.length; p++) + (am[p].object = this), t.push(am[p]); + } + }, + }, + { + key: "copy", + value: function (e) { + var t = this, + r = this.geometry; + return ( + (0, Xp.Z)((0, Yp.Z)(n.prototype), "copy", this).call(this, e), + (this.geometry = r), + pm.forEach(function (n) { + t[n] = e[n]; + }), + this + ); + }, + }, + { + key: "clone", + value: function () { + return new this.constructor().copy(this); + }, + }, + ]), + n + ); + })(Nd.Mesh); + hm.forEach(function (e) { + var t = "_private_" + e; + Object.defineProperty(vm.prototype, e, { + get: function () { + return this[t]; + }, + set: function (e) { + e !== this[t] && ((this[t] = e), (this._needsSync = !0)); + }, + }); + }); + new WeakMap(); + new WeakMap(); + var mm = [ + "sdfGlyphSize", + "anchorX", + "anchorY", + "font", + "fontSize", + "children", + "characters", + "onSync", + ], + gm = e.forwardRef(function (t, n) { + var r = t.sdfGlyphSize, + i = void 0 === r ? 64 : r, + a = t.anchorX, + o = void 0 === a ? "center" : a, + s = t.anchorY, + l = void 0 === s ? "middle" : s, + u = t.font, + c = t.fontSize, + f = void 0 === c ? 1 : c, + d = t.children, + h = t.characters, + p = t.onSync, + v = kd(t, mm), + m = Xh(function (e) { + return e.invalidate; + }), + g = e.useState(function () { + return new vm(); + }), + A = (0, Ot.Z)(g, 1)[0], + y = e.useMemo( + function () { + var t = [], + n = ""; + return ( + e.Children.forEach(d, function (e) { + "string" === typeof e || "number" === typeof e + ? (n += e) + : t.push(e); + }), + [t, n] + ); + }, + [d] + ), + b = (0, Ot.Z)(y, 2), + x = b[0], + S = b[1]; + return ( + Kd( + function () { + return new Promise(function (e) { + return (function (e, t) { + var n = e.font, + r = e.characters; + zv( + { + font: n, + sdfGlyphSize: e.sdfGlyphSize, + text: Array.isArray(r) ? r.join("\n") : "" + r, + }, + t + ); + })({ font: u, characters: h }, e); + }); + }, + ["troika-text", u, h] + ), + e.useLayoutEffect(function () { + A.sync(function () { + m(), p && p(A); + }); + }), + e.useEffect( + function () { + return function () { + return A.dispose(); + }; + }, + [A] + ), + e.createElement( + "primitive", + (0, Nt.Z)( + { + object: A, + ref: n, + font: u, + text: S, + anchorX: o, + anchorY: l, + fontSize: f, + sdfGlyphSize: i, + }, + v + ), + x + ) + ); + }), + Am = ["args", "children"]; + function ym(t, n) { + var r = t + "Geometry"; + return e.forwardRef(function (t, i) { + var a = t.args, + o = t.children, + s = kd(t, Am), + l = e.useRef(null); + return ( + e.useImperativeHandle(i, function () { + return l.current; + }), + e.useLayoutEffect(function () { + null == n || n(l.current); + }), + e.createElement( + "mesh", + (0, Nt.Z)({ ref: l }, s), + e.createElement(r, { attach: "geometry", args: a }), + o + ) + ); + }); + } + var bm = ym("box"), + xm = ["speed"], + Sm = (function (e) { + (0, Dd.Z)(n, e); + var t = (0, Ud.Z)(n); + function n() { + var e, + r = + arguments.length > 0 && void 0 !== arguments[0] + ? arguments[0] + : {}; + return ( + (0, Ti.Z)(this, n), + (e = t.call(this, r)).setValues(r), + (e._time = { value: 0 }), + (e._factor = { value: 1 }), + e + ); + } + return ( + (0, Mi.Z)(n, [ + { + key: "onBeforeCompile", + value: function (e) { + (e.uniforms.time = this._time), + (e.uniforms.factor = this._factor), + (e.vertexShader = + "\n uniform float time;\n uniform float factor;\n ".concat( + e.vertexShader, + "\n " + )), + (e.vertexShader = e.vertexShader.replace( + "#include ", + "float theta = sin( time + position.y ) / 2.0 * factor;\n float c = cos( theta );\n float s = sin( theta );\n mat3 m = mat3( c, 0, s, 0, 1, 0, -s, 0, c );\n vec3 transformed = vec3( position ) * m;\n vNormal = vNormal * m;" + )); + }, + }, + { + key: "time", + get: function () { + return this._time.value; + }, + set: function (e) { + this._time.value = e; + }, + }, + { + key: "factor", + get: function () { + return this._factor.value; + }, + set: function (e) { + this._factor.value = e; + }, + }, + ]), + n + ); + })(Nd.MeshStandardMaterial), + Em = e.forwardRef(function (t, n) { + var r = t.speed, + i = void 0 === r ? 1 : r, + a = kd(t, xm), + o = e.useState(function () { + return new Sm(); + }), + s = (0, Ot.Z)(o, 1)[0]; + return ( + Yh(function (e) { + return s && (s.time = e.clock.getElapsedTime() * i); + }), + e.createElement( + "primitive", + (0, Nt.Z)({ object: s, ref: n, attach: "material" }, a) + ) + ); + }), + _m = Gm(), + Cm = function (e) { + return Um(e, _m); + }, + wm = Gm(); + Cm.write = function (e) { + return Um(e, wm); + }; + var Tm = Gm(); + Cm.onStart = function (e) { + return Um(e, Tm); + }; + var Mm = Gm(); + Cm.onFrame = function (e) { + return Um(e, Mm); + }; + var Im = Gm(); + Cm.onFinish = function (e) { + return Um(e, Im); + }; + var km = []; + Cm.setTimeout = function (e, t) { + var n = Cm.now() + t, + r = { + time: n, + handler: e, + cancel: function e() { + var t = km.findIndex(function (t) { + return t.cancel == e; + }); + ~t && km.splice(t, 1), (Lm -= ~t ? 1 : 0); + }, + }; + return km.splice(Rm(n), 0, r), (Lm += 1), Fm(), r; + }; + var Rm = function (e) { + return ~( + ~km.findIndex(function (t) { + return t.time > e; + }) || ~km.length + ); + }; + (Cm.cancel = function (e) { + Tm.delete(e), Mm.delete(e), Im.delete(e), _m.delete(e), wm.delete(e); + }), + (Cm.sync = function (e) { + (Dm = !0), Cm.batchedUpdates(e), (Dm = !1); + }), + (Cm.throttle = function (e) { + var t; + function n() { + try { + e.apply(void 0, (0, xt.Z)(t)); + } finally { + t = null; + } + } + function r() { + for (var e = arguments.length, r = new Array(e), i = 0; i < e; i++) + r[i] = arguments[i]; + (t = r), Cm.onStart(n); + } + return ( + (r.handler = e), + (r.cancel = function () { + Tm.delete(n), (t = null); + }), + r + ); + }); + var Bm = + "undefined" != typeof window + ? window.requestAnimationFrame + : function () {}; + (Cm.use = function (e) { + return (Bm = e); + }), + (Cm.now = + "undefined" != typeof performance + ? function () { + return performance.now(); + } + : Date.now), + (Cm.batchedUpdates = function (e) { + return e(); + }), + (Cm.catch = console.error), + (Cm.frameLoop = "always"), + (Cm.advance = function () { + "demand" !== Cm.frameLoop + ? console.warn( + "Cannot call the manual advancement of rafz whilst frameLoop is not set as demand" + ) + : Nm(); + }); + var Pm = -1, + Lm = 0, + Dm = !1; + function Um(e, t) { + Dm ? (t.delete(e), e(0)) : (t.add(e), Fm()); + } + function Fm() { + Pm < 0 && ((Pm = 0), "demand" !== Cm.frameLoop && Bm(Om)); + } + function Om() { + ~Pm && (Bm(Om), Cm.batchedUpdates(Nm)); + } + function Nm() { + var e = Pm; + Pm = Cm.now(); + var t = Rm(Pm); + t && + (Zm(km.splice(0, t), function (e) { + return e.handler(); + }), + (Lm -= t)), + Lm + ? (Tm.flush(), + _m.flush(e ? Math.min(64, Pm - e) : 16.667), + Mm.flush(), + wm.flush(), + Im.flush()) + : (Pm = -1); + } + function Gm() { + var e = new Set(), + t = e; + return { + add: function (n) { + (Lm += t != e || e.has(n) ? 0 : 1), e.add(n); + }, + delete: function (n) { + return (Lm -= t == e && e.has(n) ? 1 : 0), e.delete(n); + }, + flush: function (n) { + t.size && + ((e = new Set()), + (Lm -= t.size), + Zm(t, function (t) { + return t(n) && e.add(t); + }), + (Lm += e.size), + (t = e)); + }, + }; + } + function Zm(e, t) { + e.forEach(function (e) { + try { + t(e); + } catch (n) { + Cm.catch(n); + } + }); + } + var zm = { + arr: Array.isArray, + obj: function (e) { + return !!e && "Object" === e.constructor.name; + }, + fun: function (e) { + return "function" === typeof e; + }, + str: function (e) { + return "string" === typeof e; + }, + num: function (e) { + return "number" === typeof e; + }, + und: function (e) { + return void 0 === e; + }, + }; + var Qm = function (e, t) { + return e.forEach(t); + }; + function Hm(e, t, n) { + if (zm.arr(e)) + for (var r = 0; r < e.length; r++) t.call(n, e[r], "".concat(r)); + else for (var i in e) e.hasOwnProperty(i) && t.call(n, e[i], i); + } + var Vm = function (e) { + return zm.und(e) ? [] : zm.arr(e) ? e : [e]; + }; + var jm, + Wm, + Xm = function () { + return ( + "undefined" === typeof window || + !window.navigator || + /ServerSideRendering|^Deno\//.test(window.navigator.userAgent) + ); + }, + Ym = null, + qm = !1, + Jm = function () {}, + Km = function (e) { + e.to && (Wm = e.to), + e.now && (Cm.now = e.now), + void 0 !== e.colors && (Ym = e.colors), + null != e.skipAnimation && (qm = e.skipAnimation), + e.createStringInterpolator && (jm = e.createStringInterpolator), + e.requestAnimationFrame && Cm.use(e.requestAnimationFrame), + e.batchedUpdates && (Cm.batchedUpdates = e.batchedUpdates), + e.willAdvance && (Jm = e.willAdvance), + e.frameLoop && (Cm.frameLoop = e.frameLoop); + }, + $m = Object.freeze({ + __proto__: null, + get createStringInterpolator() { + return jm; + }, + get to() { + return Wm; + }, + get colors() { + return Ym; + }, + get skipAnimation() { + return qm; + }, + get willAdvance() { + return Jm; + }, + assign: Km, + }), + eg = new Set(), + tg = [], + ng = [], + rg = 0, + ig = { + get idle() { + return !eg.size && !tg.length; + }, + start: function (e) { + rg > e.priority ? (eg.add(e), Cm.onStart(ag)) : (og(e), Cm(lg)); + }, + advance: lg, + sort: function (e) { + if (rg) + Cm.onFrame(function () { + return ig.sort(e); + }); + else { + var t = tg.indexOf(e); + ~t && (tg.splice(t, 1), sg(e)); + } + }, + clear: function () { + (tg = []), eg.clear(); + }, + }; + function ag() { + eg.forEach(og), eg.clear(), Cm(lg); + } + function og(e) { + tg.includes(e) || sg(e); + } + function sg(e) { + tg.splice( + (function (e, t) { + var n = e.findIndex(t); + return n < 0 ? e.length : n; + })(tg, function (t) { + return t.priority > e.priority; + }), + 0, + e + ); + } + function lg(e) { + for (var t = ng, n = 0; n < tg.length; n++) { + var r = tg[n]; + (rg = r.priority), r.idle || (Jm(r), r.advance(e), r.idle || t.push(r)); + } + return (rg = 0), ((ng = tg).length = 0), (tg = t).length > 0; + } + var ug = "[-+]?\\d*\\.?\\d+", + cg = ug + "%"; + function fg() { + for (var e = arguments.length, t = new Array(e), n = 0; n < e; n++) + t[n] = arguments[n]; + return "\\(\\s*(" + t.join(")\\s*,\\s*(") + ")\\s*\\)"; + } + var dg = new RegExp("rgb" + fg(ug, ug, ug)), + hg = new RegExp("rgba" + fg(ug, ug, ug, ug)), + pg = new RegExp("hsl" + fg(ug, cg, cg)), + vg = new RegExp("hsla" + fg(ug, cg, cg, ug)), + mg = /^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/, + gg = + /^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/, + Ag = /^#([0-9a-fA-F]{6})$/, + yg = /^#([0-9a-fA-F]{8})$/; + function bg(e, t, n) { + return ( + n < 0 && (n += 1), + n > 1 && (n -= 1), + n < 1 / 6 + ? e + 6 * (t - e) * n + : n < 0.5 + ? t + : n < 2 / 3 + ? e + (t - e) * (2 / 3 - n) * 6 + : e + ); + } + function xg(e, t, n) { + var r = n < 0.5 ? n * (1 + t) : n + t - n * t, + i = 2 * n - r, + a = bg(i, r, e + 1 / 3), + o = bg(i, r, e), + s = bg(i, r, e - 1 / 3); + return ( + (Math.round(255 * a) << 24) | + (Math.round(255 * o) << 16) | + (Math.round(255 * s) << 8) + ); + } + function Sg(e) { + var t = parseInt(e, 10); + return t < 0 ? 0 : t > 255 ? 255 : t; + } + function Eg(e) { + return (((parseFloat(e) % 360) + 360) % 360) / 360; + } + function _g(e) { + var t = parseFloat(e); + return t < 0 ? 0 : t > 1 ? 255 : Math.round(255 * t); + } + function Cg(e) { + var t = parseFloat(e); + return t < 0 ? 0 : t > 100 ? 1 : t / 100; + } + function wg(e) { + var t = (function (e) { + var t; + return "number" === typeof e + ? e >>> 0 === e && e >= 0 && e <= 4294967295 + ? e + : null + : (t = Ag.exec(e)) + ? parseInt(t[1] + "ff", 16) >>> 0 + : Ym && void 0 !== Ym[e] + ? Ym[e] + : (t = dg.exec(e)) + ? ((Sg(t[1]) << 24) | (Sg(t[2]) << 16) | (Sg(t[3]) << 8) | 255) >>> 0 + : (t = hg.exec(e)) + ? ((Sg(t[1]) << 24) | + (Sg(t[2]) << 16) | + (Sg(t[3]) << 8) | + _g(t[4])) >>> + 0 + : (t = mg.exec(e)) + ? parseInt(t[1] + t[1] + t[2] + t[2] + t[3] + t[3] + "ff", 16) >>> 0 + : (t = yg.exec(e)) + ? parseInt(t[1], 16) >>> 0 + : (t = gg.exec(e)) + ? parseInt( + t[1] + t[1] + t[2] + t[2] + t[3] + t[3] + t[4] + t[4], + 16 + ) >>> 0 + : (t = pg.exec(e)) + ? (255 | xg(Eg(t[1]), Cg(t[2]), Cg(t[3]))) >>> 0 + : (t = vg.exec(e)) + ? (xg(Eg(t[1]), Cg(t[2]), Cg(t[3])) | _g(t[4])) >>> 0 + : null; + })(e); + if (null === t) return e; + var n = (16711680 & (t = t || 0)) >>> 16, + r = (65280 & t) >>> 8, + i = (255 & t) / 255; + return "rgba(" + .concat((4278190080 & t) >>> 24, ", ") + .concat(n, ", ") + .concat(r, ", ") + .concat(i, ")"); + } + var Tg = function e(t, n, r) { + if (zm.fun(t)) return t; + if (zm.arr(t)) return e({ range: t, output: n, extrapolate: r }); + if (zm.str(t.output[0])) return jm(t); + var i = t, + a = i.output, + o = i.range || [0, 1], + s = i.extrapolateLeft || i.extrapolate || "extend", + l = i.extrapolateRight || i.extrapolate || "extend", + u = + i.easing || + function (e) { + return e; + }; + return function (e) { + var t = (function (e, t) { + for (var n = 1; n < t.length - 1 && !(t[n] >= e); ++n); + return n - 1; + })(e, o); + return (function (e, t, n, r, i, a, o, s, l) { + var u = l ? l(e) : e; + if (u < t) { + if ("identity" === o) return u; + "clamp" === o && (u = t); + } + if (u > n) { + if ("identity" === s) return u; + "clamp" === s && (u = n); + } + if (r === i) return r; + if (t === n) return e <= t ? r : i; + t === -1 / 0 + ? (u = -u) + : n === 1 / 0 + ? (u -= t) + : (u = (u - t) / (n - t)); + (u = a(u)), + r === -1 / 0 + ? (u = -u) + : i === 1 / 0 + ? (u += r) + : (u = u * (i - r) + r); + return u; + })(e, o[t], o[t + 1], a[t], a[t + 1], u, s, l, i.map); + }; + }; + var Mg = 1.70158, + Ig = 1.525 * Mg, + kg = Mg + 1, + Rg = (2 * Math.PI) / 3, + Bg = (2 * Math.PI) / 4.5, + Pg = function (e) { + var t = 7.5625, + n = 2.75; + return e < 1 / n + ? t * e * e + : e < 2 / n + ? t * (e -= 1.5 / n) * e + 0.75 + : e < 2.5 / n + ? t * (e -= 2.25 / n) * e + 0.9375 + : t * (e -= 2.625 / n) * e + 0.984375; + }, + Lg = { + linear: function (e) { + return e; + }, + easeInQuad: function (e) { + return e * e; + }, + easeOutQuad: function (e) { + return 1 - (1 - e) * (1 - e); + }, + easeInOutQuad: function (e) { + return e < 0.5 ? 2 * e * e : 1 - Math.pow(-2 * e + 2, 2) / 2; + }, + easeInCubic: function (e) { + return e * e * e; + }, + easeOutCubic: function (e) { + return 1 - Math.pow(1 - e, 3); + }, + easeInOutCubic: function (e) { + return e < 0.5 ? 4 * e * e * e : 1 - Math.pow(-2 * e + 2, 3) / 2; + }, + easeInQuart: function (e) { + return e * e * e * e; + }, + easeOutQuart: function (e) { + return 1 - Math.pow(1 - e, 4); + }, + easeInOutQuart: function (e) { + return e < 0.5 ? 8 * e * e * e * e : 1 - Math.pow(-2 * e + 2, 4) / 2; + }, + easeInQuint: function (e) { + return e * e * e * e * e; + }, + easeOutQuint: function (e) { + return 1 - Math.pow(1 - e, 5); + }, + easeInOutQuint: function (e) { + return e < 0.5 + ? 16 * e * e * e * e * e + : 1 - Math.pow(-2 * e + 2, 5) / 2; + }, + easeInSine: function (e) { + return 1 - Math.cos((e * Math.PI) / 2); + }, + easeOutSine: function (e) { + return Math.sin((e * Math.PI) / 2); + }, + easeInOutSine: function (e) { + return -(Math.cos(Math.PI * e) - 1) / 2; + }, + easeInExpo: function (e) { + return 0 === e ? 0 : Math.pow(2, 10 * e - 10); + }, + easeOutExpo: function (e) { + return 1 === e ? 1 : 1 - Math.pow(2, -10 * e); + }, + easeInOutExpo: function (e) { + return 0 === e + ? 0 + : 1 === e + ? 1 + : e < 0.5 + ? Math.pow(2, 20 * e - 10) / 2 + : (2 - Math.pow(2, -20 * e + 10)) / 2; + }, + easeInCirc: function (e) { + return 1 - Math.sqrt(1 - Math.pow(e, 2)); + }, + easeOutCirc: function (e) { + return Math.sqrt(1 - Math.pow(e - 1, 2)); + }, + easeInOutCirc: function (e) { + return e < 0.5 + ? (1 - Math.sqrt(1 - Math.pow(2 * e, 2))) / 2 + : (Math.sqrt(1 - Math.pow(-2 * e + 2, 2)) + 1) / 2; + }, + easeInBack: function (e) { + return kg * e * e * e - Mg * e * e; + }, + easeOutBack: function (e) { + return 1 + kg * Math.pow(e - 1, 3) + Mg * Math.pow(e - 1, 2); + }, + easeInOutBack: function (e) { + return e < 0.5 + ? (Math.pow(2 * e, 2) * (7.189819 * e - Ig)) / 2 + : (Math.pow(2 * e - 2, 2) * ((Ig + 1) * (2 * e - 2) + Ig) + 2) / 2; + }, + easeInElastic: function (e) { + return 0 === e + ? 0 + : 1 === e + ? 1 + : -Math.pow(2, 10 * e - 10) * Math.sin((10 * e - 10.75) * Rg); + }, + easeOutElastic: function (e) { + return 0 === e + ? 0 + : 1 === e + ? 1 + : Math.pow(2, -10 * e) * Math.sin((10 * e - 0.75) * Rg) + 1; + }, + easeInOutElastic: function (e) { + return 0 === e + ? 0 + : 1 === e + ? 1 + : e < 0.5 + ? (-Math.pow(2, 20 * e - 10) * Math.sin((20 * e - 11.125) * Bg)) / 2 + : (Math.pow(2, -20 * e + 10) * Math.sin((20 * e - 11.125) * Bg)) / + 2 + + 1; + }, + easeInBounce: function (e) { + return 1 - Pg(1 - e); + }, + easeOutBounce: Pg, + easeInOutBounce: function (e) { + return e < 0.5 ? (1 - Pg(1 - 2 * e)) / 2 : (1 + Pg(2 * e - 1)) / 2; + }, + steps: function (e) { + var t = + arguments.length > 1 && void 0 !== arguments[1] + ? arguments[1] + : "end"; + return function (n) { + var r = + (n = "end" === t ? Math.min(n, 0.999) : Math.max(n, 0.001)) * e; + return (function (e, t, n) { + return Math.min(Math.max(n, e), t); + })(0, 1, ("end" === t ? Math.floor(r) : Math.ceil(r)) / e); + }; + }, + }; + function Dg() { + return ( + (Dg = 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; + }), + Dg.apply(this, arguments) + ); + } + var Ug = Symbol.for("FluidValue.get"), + Fg = Symbol.for("FluidValue.observers"), + Og = function (e) { + return Boolean(e && e[Ug]); + }, + Ng = function (e) { + return e && e[Ug] ? e[Ug]() : e; + }; + function Gg(e, t) { + var n = e[Fg]; + n && + n.forEach(function (e) { + !(function (e, t) { + e.eventObserved ? e.eventObserved(t) : e(t); + })(e, t); + }); + } + var Zg = (0, Mi.Z)(function e(t) { + if ( + ((0, Ti.Z)(this, e), + (this[Ug] = void 0), + (this[Fg] = void 0), + !t && !(t = this.get)) + ) + throw Error("Unknown getter"); + zg(this, t); + }), + zg = function (e, t) { + return jg(e, Ug, t); + }; + function Qg(e, t) { + if (e[Ug]) { + var n = e[Fg]; + n || jg(e, Fg, (n = new Set())), + n.has(t) || (n.add(t), e.observerAdded && e.observerAdded(n.size, t)); + } + return t; + } + function Hg(e, t) { + var n = e[Fg]; + if (n && n.has(t)) { + var r = n.size - 1; + r ? n.delete(t) : (e[Fg] = null), + e.observerRemoved && e.observerRemoved(r, t); + } + } + var Vg, + jg = function (e, t, n) { + return Object.defineProperty(e, t, { + value: n, + writable: !0, + configurable: !0, + }); + }, + Wg = /[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g, + Xg = + /(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi, + Yg = new RegExp("(".concat(Wg.source, ")(%|[a-z]+)"), "i"), + qg = /rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi, + Jg = /var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/, + Kg = function e(t) { + var n = $g(t), + r = (0, Ot.Z)(n, 2), + i = r[0], + a = r[1]; + if (!i || Xm()) return t; + var o = window + .getComputedStyle(document.documentElement) + .getPropertyValue(i); + if (o) return o.trim(); + if (a && a.startsWith("--")) { + var s = window + .getComputedStyle(document.documentElement) + .getPropertyValue(a); + return s || t; + } + return a && Jg.test(a) ? e(a) : a || t; + }, + $g = function (e) { + var t = Jg.exec(e); + if (!t) return [,]; + var n = (0, Ot.Z)(t, 3); + return [n[1], n[2]]; + }, + eA = function (e, t, n, r, i) { + return "rgba(" + .concat(Math.round(t), ", ") + .concat(Math.round(n), ", ") + .concat(Math.round(r), ", ") + .concat(i, ")"); + }, + tA = function (e) { + Vg || + (Vg = Ym + ? new RegExp("(".concat(Object.keys(Ym).join("|"), ")(?!\\w)"), "g") + : /^\b$/); + var t = e.output.map(function (e) { + return Ng(e).replace(Jg, Kg).replace(Xg, wg).replace(Vg, wg); + }), + n = t.map(function (e) { + return e.match(Wg).map(Number); + }), + r = n[0].map(function (e, t) { + return n.map(function (e) { + if (!(t in e)) + throw Error('The arity of each "output" value must be equal'); + return e[t]; + }); + }), + i = r.map(function (t) { + return Tg(Dg({}, e, { output: t })); + }); + return function (e) { + var n, + r = + !Yg.test(t[0]) && + (null == + (n = t.find(function (e) { + return Yg.test(e); + })) + ? void 0 + : n.replace(Wg, "")), + a = 0; + return t[0] + .replace(Wg, function () { + return "".concat(i[a++](e)).concat(r || ""); + }) + .replace(qg, eA); + }; + }, + nA = "react-spring: ", + rA = function (e) { + var t = e, + n = !1; + if ("function" != typeof t) + throw new TypeError( + "".concat(nA, "once requires a function parameter") + ); + return function () { + n || (t.apply(void 0, arguments), (n = !0)); + }; + }, + iA = rA(console.warn); + rA(console.warn); + function aA(e) { + return ( + zm.str(e) && + ("#" == e[0] || + /\d/.test(e) || + (!Xm() && Jg.test(e)) || + e in (Ym || {})) + ); + } + new WeakMap(); + new Set(), new WeakMap(), new WeakMap(), new WeakMap(); + var oA = Xm() ? e.useEffect : e.useLayoutEffect; + function sA() { + var t = (0, e.useState)()[1], + n = (function () { + var t = (0, e.useRef)(!1); + return ( + oA(function () { + return ( + (t.current = !0), + function () { + t.current = !1; + } + ); + }, []), + t + ); + })(); + return function () { + n.current && t(Math.random()); + }; + } + var lA = []; + var uA = Symbol.for("Animated:node"), + cA = function (e) { + return e && e[uA]; + }, + fA = function (e, t) { + return ( + (n = e), + (r = uA), + (i = t), + Object.defineProperty(n, r, { + value: i, + writable: !0, + configurable: !0, + }) + ); + var n, r, i; + }, + dA = function (e) { + return e && e[uA] && e[uA].getPayload(); + }, + hA = (function () { + function e() { + (0, Ti.Z)(this, e), (this.payload = void 0), fA(this, this); + } + return ( + (0, Mi.Z)(e, [ + { + key: "getPayload", + value: function () { + return this.payload || []; + }, + }, + ]), + e + ); + })(), + pA = (function (e) { + (0, Dd.Z)(n, e); + var t = (0, Ud.Z)(n); + function n(e) { + var r; + return ( + (0, Ti.Z)(this, n), + ((r = t.call(this)).done = !0), + (r.elapsedTime = void 0), + (r.lastPosition = void 0), + (r.lastVelocity = void 0), + (r.v0 = void 0), + (r.durationProgress = 0), + (r._value = e), + zm.num(r._value) && (r.lastPosition = r._value), + r + ); + } + return ( + (0, Mi.Z)( + n, + [ + { + key: "getPayload", + value: function () { + return [this]; + }, + }, + { + key: "getValue", + value: function () { + return this._value; + }, + }, + { + key: "setValue", + value: function (e, t) { + return ( + zm.num(e) && + ((this.lastPosition = e), + t && + ((e = Math.round(e / t) * t), + this.done && (this.lastPosition = e))), + this._value !== e && ((this._value = e), !0) + ); + }, + }, + { + key: "reset", + value: function () { + var e = this.done; + (this.done = !1), + zm.num(this._value) && + ((this.elapsedTime = 0), + (this.durationProgress = 0), + (this.lastPosition = this._value), + e && (this.lastVelocity = null), + (this.v0 = null)); + }, + }, + ], + [ + { + key: "create", + value: function (e) { + return new n(e); + }, + }, + ] + ), + n + ); + })(hA), + vA = (function (e) { + (0, Dd.Z)(n, e); + var t = (0, Ud.Z)(n); + function n(e) { + var r; + return ( + (0, Ti.Z)(this, n), + ((r = t.call(this, 0))._string = null), + (r._toString = void 0), + (r._toString = Tg({ output: [e, e] })), + r + ); + } + return ( + (0, Mi.Z)( + n, + [ + { + key: "getValue", + value: function () { + var e = this._string; + return null == e + ? (this._string = this._toString(this._value)) + : e; + }, + }, + { + key: "setValue", + value: function (e) { + if (zm.str(e)) { + if (e == this._string) return !1; + (this._string = e), (this._value = 1); + } else { + if ( + !(0, Xp.Z)((0, Yp.Z)(n.prototype), "setValue", this).call( + this, + e + ) + ) + return !1; + this._string = null; + } + return !0; + }, + }, + { + key: "reset", + value: function (e) { + e && (this._toString = Tg({ output: [this.getValue(), e] })), + (this._value = 0), + (0, Xp.Z)((0, Yp.Z)(n.prototype), "reset", this).call(this); + }, + }, + ], + [ + { + key: "create", + value: function (e) { + return new n(e); + }, + }, + ] + ), + n + ); + })(pA), + mA = { dependencies: null }, + gA = (function (e) { + (0, Dd.Z)(n, e); + var t = (0, Ud.Z)(n); + function n(e) { + var r; + return ( + (0, Ti.Z)(this, n), + ((r = t.call(this)).source = e), + r.setValue(e), + r + ); + } + return ( + (0, Mi.Z)(n, [ + { + key: "getValue", + value: function (e) { + var t = {}; + return ( + Hm(this.source, function (n, r) { + var i; + (i = n) && i[uA] === i + ? (t[r] = n.getValue(e)) + : Og(n) + ? (t[r] = Ng(n)) + : e || (t[r] = n); + }), + t + ); + }, + }, + { + key: "setValue", + value: function (e) { + (this.source = e), (this.payload = this._makePayload(e)); + }, + }, + { + key: "reset", + value: function () { + this.payload && + Qm(this.payload, function (e) { + return e.reset(); + }); + }, + }, + { + key: "_makePayload", + value: function (e) { + if (e) { + var t = new Set(); + return Hm(e, this._addToPayload, t), Array.from(t); + } + }, + }, + { + key: "_addToPayload", + value: function (e) { + var t = this; + mA.dependencies && Og(e) && mA.dependencies.add(e); + var n = dA(e); + n && + Qm(n, function (e) { + return t.add(e); + }); + }, + }, + ]), + n + ); + })(hA), + AA = (function (e) { + (0, Dd.Z)(n, e); + var t = (0, Ud.Z)(n); + function n(e) { + return (0, Ti.Z)(this, n), t.call(this, e); + } + return ( + (0, Mi.Z)( + n, + [ + { + key: "getValue", + value: function () { + return this.source.map(function (e) { + return e.getValue(); + }); + }, + }, + { + key: "setValue", + value: function (e) { + var t = this.getPayload(); + return e.length == t.length + ? t + .map(function (t, n) { + return t.setValue(e[n]); + }) + .some(Boolean) + : ((0, Xp.Z)((0, Yp.Z)(n.prototype), "setValue", this).call( + this, + e.map(yA) + ), + !0); + }, + }, + ], + [ + { + key: "create", + value: function (e) { + return new n(e); + }, + }, + ] + ), + n + ); + })(gA); + function yA(e) { + return (aA(e) ? vA : pA).create(e); + } + function bA() { + return ( + (bA = 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; + }), + bA.apply(this, arguments) + ); + } + var xA = function (t, n) { + var r = !zm.fun(t) || (t.prototype && t.prototype.isReactComponent); + return (0, e.forwardRef)(function (i, a) { + var o = (0, e.useRef)(null), + s = + r && + (0, e.useCallback)( + function (e) { + o.current = (function (e, t) { + e && (zm.fun(e) ? e(t) : (e.current = t)); + return t; + })(a, e); + }, + [a] + ), + l = (function (e, t) { + var n = new Set(); + (mA.dependencies = n), + e.style && + (e = bA({}, e, { style: t.createAnimatedStyle(e.style) })); + return (e = new gA(e)), (mA.dependencies = null), [e, n]; + })(i, n), + u = (0, Ot.Z)(l, 2), + c = u[0], + f = u[1], + d = sA(), + h = function () { + var e = o.current; + (r && !e) || + (!1 === (!!e && n.applyAnimatedValues(e, c.getValue(!0))) && + d()); + }, + p = new SA(h, f), + v = (0, e.useRef)(); + oA(function () { + return ( + (v.current = p), + Qm(f, function (e) { + return Qg(e, p); + }), + function () { + v.current && + (Qm(v.current.deps, function (e) { + return Hg(e, v.current); + }), + Cm.cancel(v.current.update)); + } + ); + }), + (0, e.useEffect)(h, []), + (function (t) { + (0, e.useEffect)(t, lA); + })(function () { + return function () { + var e = v.current; + Qm(e.deps, function (t) { + return Hg(t, e); + }); + }; + }); + var m = n.getComponentProps(c.getValue()); + return e.createElement(t, bA({}, m, { ref: s })); + }); + }, + SA = (function () { + function e(t, n) { + (0, Ti.Z)(this, e), (this.update = t), (this.deps = n); + } + return ( + (0, Mi.Z)(e, [ + { + key: "eventObserved", + value: function (e) { + "change" == e.type && Cm.write(this.update); + }, + }, + ]), + e + ); + })(); + var EA = Symbol.for("AnimatedComponent"), + _A = function (e) { + return zm.str(e) + ? e + : e && zm.str(e.displayName) + ? e.displayName + : (zm.fun(e) && e.name) || null; + }; + function CA() { + return ( + (CA = 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; + }), + CA.apply(this, arguments) + ); + } + CA( + {}, + { tension: 170, friction: 26 }, + { mass: 1, damping: 1, easing: Lg.linear, clamp: !1 } + ); + var wA = function (e) { + return e instanceof MA; + }, + TA = 1, + MA = (function (e) { + (0, Dd.Z)(n, e); + var t = (0, Ud.Z)(n); + function n() { + var e; + (0, Ti.Z)(this, n); + for (var r = arguments.length, i = new Array(r), a = 0; a < r; a++) + i[a] = arguments[a]; + return ( + ((e = t.call.apply(t, [this].concat(i))).id = TA++), + (e.key = void 0), + (e._priority = 0), + e + ); + } + return ( + (0, Mi.Z)(n, [ + { + key: "priority", + get: function () { + return this._priority; + }, + set: function (e) { + this._priority != e && + ((this._priority = e), this._onPriorityChange(e)); + }, + }, + { + key: "get", + value: function () { + var e = cA(this); + return e && e.getValue(); + }, + }, + { + key: "to", + value: function () { + for ( + var e = arguments.length, t = new Array(e), n = 0; + n < e; + n++ + ) + t[n] = arguments[n]; + return $m.to(this, t); + }, + }, + { + key: "interpolate", + value: function () { + iA( + "".concat( + nA, + 'The "interpolate" function is deprecated in v9 (use "to" instead)' + ) + ); + for ( + var e = arguments.length, t = new Array(e), n = 0; + n < e; + n++ + ) + t[n] = arguments[n]; + return $m.to(this, t); + }, + }, + { + key: "toJSON", + value: function () { + return this.get(); + }, + }, + { + key: "observerAdded", + value: function (e) { + 1 == e && this._attach(); + }, + }, + { + key: "observerRemoved", + value: function (e) { + 0 == e && this._detach(); + }, + }, + { key: "_attach", value: function () {} }, + { key: "_detach", value: function () {} }, + { + key: "_onChange", + value: function (e) { + Gg(this, { + type: "change", + parent: this, + value: e, + idle: + arguments.length > 1 && + void 0 !== arguments[1] && + arguments[1], + }); + }, + }, + { + key: "_onPriorityChange", + value: function (e) { + this.idle || ig.sort(this), + Gg(this, { type: "priority", parent: this, priority: e }); + }, + }, + ]), + n + ); + })(Zg); + Symbol.for("SpringPhase"); + function IA(e, t) { + if (null == e) return {}; + var n, + r, + i = {}, + a = Object.keys(e); + for (r = 0; r < a.length; r++) + (n = a[r]), t.indexOf(n) >= 0 || (i[n] = e[n]); + return i; + } + var kA, + RA, + BA = ["children"], + PA = function (t) { + var n = t.children, + r = IA(t, BA), + i = (0, e.useContext)(LA), + a = r.pause || !!i.pause, + o = r.immediate || !!i.immediate; + r = (function (t, n) { + var r = (0, e.useState)(function () { + return { inputs: n, result: t() }; + }), + i = (0, Ot.Z)(r, 1)[0], + a = (0, e.useRef)(), + o = a.current, + s = o; + return ( + s + ? Boolean( + n && + s.inputs && + (function (e, t) { + if (e.length !== t.length) return !1; + for (var n = 0; n < e.length; n++) + if (e[n] !== t[n]) return !1; + return !0; + })(n, s.inputs) + ) || (s = { inputs: n, result: t() }) + : (s = i), + (0, e.useEffect)( + function () { + (a.current = s), o == i && (i.inputs = i.result = void 0); + }, + [s] + ), + s.result + ); + })( + function () { + return { pause: a, immediate: o }; + }, + [a, o] + ); + var s = LA.Provider; + return e.createElement(s, { value: r }, n); + }, + LA = + ((kA = PA), + (RA = {}), + Object.assign(kA, e.createContext(RA)), + (kA.Provider._context = kA), + (kA.Consumer._context = kA), + kA); + (PA.Provider = LA.Provider), (PA.Consumer = LA.Consumer); + var DA; + !(function (e) { + (e.MOUNT = "mount"), + (e.ENTER = "enter"), + (e.UPDATE = "update"), + (e.LEAVE = "leave"); + })(DA || (DA = {})); + var UA = (function (e) { + (0, Dd.Z)(n, e); + var t = (0, Ud.Z)(n); + function n(e, r) { + var i; + (0, Ti.Z)(this, n), + ((i = t.call(this)).key = void 0), + (i.idle = !0), + (i.calc = void 0), + (i._active = new Set()), + (i.source = e), + (i.calc = Tg.apply(void 0, (0, xt.Z)(r))); + var a = i._get(), + o = (function (e) { + var t = cA(e); + return t ? t.constructor : zm.arr(e) ? AA : aA(e) ? vA : pA; + })(a); + return fA((0, bo.Z)(i), o.create(a)), i; + } + return ( + (0, Mi.Z)(n, [ + { + key: "advance", + value: function (e) { + var t = this._get(); + (function (e, t) { + if (zm.arr(e)) { + if (!zm.arr(t) || e.length !== t.length) return !1; + for (var n = 0; n < e.length; n++) + if (e[n] !== t[n]) return !1; + return !0; + } + return e === t; + })(t, this.get()) || + (cA(this).setValue(t), this._onChange(t, this.idle)), + !this.idle && OA(this._active) && NA(this); + }, + }, + { + key: "_get", + value: function () { + var e = zm.arr(this.source) + ? this.source.map(Ng) + : Vm(Ng(this.source)); + return this.calc.apply(this, (0, xt.Z)(e)); + }, + }, + { + key: "_start", + value: function () { + var e = this; + this.idle && + !OA(this._active) && + ((this.idle = !1), + Qm(dA(this), function (e) { + e.done = !1; + }), + $m.skipAnimation + ? (Cm.batchedUpdates(function () { + return e.advance(); + }), + NA(this)) + : ig.start(this)); + }, + }, + { + key: "_attach", + value: function () { + var e = this, + t = 1; + Qm(Vm(this.source), function (n) { + Og(n) && Qg(n, e), + wA(n) && + (n.idle || e._active.add(n), + (t = Math.max(t, n.priority + 1))); + }), + (this.priority = t), + this._start(); + }, + }, + { + key: "_detach", + value: function () { + var e = this; + Qm(Vm(this.source), function (t) { + Og(t) && Hg(t, e); + }), + this._active.clear(), + NA(this); + }, + }, + { + key: "eventObserved", + value: function (e) { + "change" == e.type + ? e.idle + ? this.advance() + : (this._active.add(e.parent), this._start()) + : "idle" == e.type + ? this._active.delete(e.parent) + : "priority" == e.type && + (this.priority = Vm(this.source).reduce(function (e, t) { + return Math.max(e, (wA(t) ? t.priority : 0) + 1); + }, 0)); + }, + }, + ]), + n + ); + })(MA); + function FA(e) { + return !1 !== e.idle; + } + function OA(e) { + return !e.size || Array.from(e).every(FA); + } + function NA(e) { + e.idle || + ((e.idle = !0), + Qm(dA(e), function (e) { + e.done = !0; + }), + Gg(e, { type: "idle", parent: e })); + } + $m.assign({ + createStringInterpolator: tA, + to: function (e, t) { + return new UA(e, t); + }, + }); + ig.advance; + var GA = ["primitive"].concat( + Object.keys(Nd) + .filter(function (e) { + return /^[A-Z]/.test(e); + }) + .map(function (e) { + return e[0].toLowerCase() + e.slice(1); + }) + ); + $m.assign({ + createStringInterpolator: tA, + colors: { + transparent: 0, + aliceblue: 4042850303, + antiquewhite: 4209760255, + aqua: 16777215, + aquamarine: 2147472639, + azure: 4043309055, + beige: 4126530815, + bisque: 4293182719, + black: 255, + blanchedalmond: 4293643775, + blue: 65535, + blueviolet: 2318131967, + brown: 2771004159, + burlywood: 3736635391, + burntsienna: 3934150143, + cadetblue: 1604231423, + chartreuse: 2147418367, + chocolate: 3530104575, + coral: 4286533887, + cornflowerblue: 1687547391, + cornsilk: 4294499583, + crimson: 3692313855, + cyan: 16777215, + darkblue: 35839, + darkcyan: 9145343, + darkgoldenrod: 3095792639, + darkgray: 2846468607, + darkgreen: 6553855, + darkgrey: 2846468607, + darkkhaki: 3182914559, + darkmagenta: 2332068863, + darkolivegreen: 1433087999, + darkorange: 4287365375, + darkorchid: 2570243327, + darkred: 2332033279, + darksalmon: 3918953215, + darkseagreen: 2411499519, + darkslateblue: 1211993087, + darkslategray: 793726975, + darkslategrey: 793726975, + darkturquoise: 13554175, + darkviolet: 2483082239, + deeppink: 4279538687, + deepskyblue: 12582911, + dimgray: 1768516095, + dimgrey: 1768516095, + dodgerblue: 512819199, + firebrick: 2988581631, + floralwhite: 4294635775, + forestgreen: 579543807, + fuchsia: 4278255615, + gainsboro: 3705462015, + ghostwhite: 4177068031, + gold: 4292280575, + goldenrod: 3668254975, + gray: 2155905279, + green: 8388863, + greenyellow: 2919182335, + grey: 2155905279, + honeydew: 4043305215, + hotpink: 4285117695, + indianred: 3445382399, + indigo: 1258324735, + ivory: 4294963455, + khaki: 4041641215, + lavender: 3873897215, + lavenderblush: 4293981695, + lawngreen: 2096890111, + lemonchiffon: 4294626815, + lightblue: 2916673279, + lightcoral: 4034953471, + lightcyan: 3774873599, + lightgoldenrodyellow: 4210742015, + lightgray: 3553874943, + lightgreen: 2431553791, + lightgrey: 3553874943, + lightpink: 4290167295, + lightsalmon: 4288707327, + lightseagreen: 548580095, + lightskyblue: 2278488831, + lightslategray: 2005441023, + lightslategrey: 2005441023, + lightsteelblue: 2965692159, + lightyellow: 4294959359, + lime: 16711935, + limegreen: 852308735, + linen: 4210091775, + magenta: 4278255615, + maroon: 2147483903, + mediumaquamarine: 1724754687, + mediumblue: 52735, + mediumorchid: 3126187007, + mediumpurple: 2473647103, + mediumseagreen: 1018393087, + mediumslateblue: 2070474495, + mediumspringgreen: 16423679, + mediumturquoise: 1221709055, + mediumvioletred: 3340076543, + midnightblue: 421097727, + mintcream: 4127193855, + mistyrose: 4293190143, + moccasin: 4293178879, + navajowhite: 4292783615, + navy: 33023, + oldlace: 4260751103, + olive: 2155872511, + olivedrab: 1804477439, + orange: 4289003775, + orangered: 4282712319, + orchid: 3664828159, + palegoldenrod: 4008225535, + palegreen: 2566625535, + paleturquoise: 2951671551, + palevioletred: 3681588223, + papayawhip: 4293907967, + peachpuff: 4292524543, + peru: 3448061951, + pink: 4290825215, + plum: 3718307327, + powderblue: 2967529215, + purple: 2147516671, + rebeccapurple: 1714657791, + red: 4278190335, + rosybrown: 3163525119, + royalblue: 1097458175, + saddlebrown: 2336560127, + salmon: 4202722047, + sandybrown: 4104413439, + seagreen: 780883967, + seashell: 4294307583, + sienna: 2689740287, + silver: 3233857791, + skyblue: 2278484991, + slateblue: 1784335871, + slategray: 1887473919, + slategrey: 1887473919, + snow: 4294638335, + springgreen: 16744447, + steelblue: 1182971135, + tan: 3535047935, + teal: 8421631, + thistle: 3636451583, + tomato: 4284696575, + turquoise: 1088475391, + violet: 4001558271, + wheat: 4125012991, + white: 4294967295, + whitesmoke: 4126537215, + yellow: 4294902015, + yellowgreen: 2597139199, + }, + frameLoop: "demand", + }), + Oh(function () { + Cm.advance(); + }, Zh); + var ZA = (function (e) { + var t = + arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {}, + n = t.applyAnimatedValues, + r = + void 0 === n + ? function () { + return !1; + } + : n, + i = t.createAnimatedStyle, + a = + void 0 === i + ? function (e) { + return new gA(e); + } + : i, + o = t.getComponentProps, + s = { + applyAnimatedValues: r, + createAnimatedStyle: a, + getComponentProps: + void 0 === o + ? function (e) { + return e; + } + : o, + }, + l = function e(t) { + var n = _A(t) || "Anonymous"; + return ( + ((t = zm.str(t) + ? e[t] || (e[t] = xA(t, s)) + : t[EA] || (t[EA] = xA(t, s))).displayName = "Animated(".concat( + n, + ")" + )), + t + ); + }; + return ( + Hm(e, function (t, n) { + zm.arr(e) && (n = _A(t)), (l[n] = l(t)); + }), + { animated: l } + ); + })(GA, { applyAnimatedValues: ap }), + zA = ZA.animated, + QA = n(2963), + HA = (function (e) { + (0, Dd.Z)(n, e); + var t = (0, Ud.Z)(n); + function n(e) { + var r, + i = + arguments.length > 1 && void 0 !== arguments[1] + ? arguments[1] + : {}; + (0, Ti.Z)(this, n); + var a = i.font; + if (void 0 === a) r = t.call(this); + else { + var o = a.generateShapes(e, i.size); + (i.depth = void 0 !== i.height ? i.height : 50), + void 0 === i.bevelThickness && (i.bevelThickness = 10), + void 0 === i.bevelSize && (i.bevelSize = 8), + void 0 === i.bevelEnabled && (i.bevelEnabled = !1), + (r = t.call(this, o, i)); + } + return (r.type = "TextGeometry"), (0, QA.Z)(r); + } + return (0, Mi.Z)(n); + })(Nd.ExtrudeGeometry), + VA = n.p + "images/cubeText1.jpg"; + oh({ TextGeometry: HA }); + var jA = [10, 6, 7, 8, 9], + WA = [2, 3, 4, 5], + XA = function (t) { + var n = t.texture, + r = t.item, + i = t.type, + a = (0, e.useRef)(), + o = (0, e.useState)(!0), + s = (0, Ot.Z)(o, 2), + l = s[0], + u = s[1]; + Yh(function () { + if ( + ("left" === i && l && (a.current.position.x += 0.05), + "right" === i && l) + ) { + if (6 === r.id) return void (a.current.position.y -= 0.05); + a.current.position.x -= 0.05; + } + }); + var c = function () { + console.log("object"), u(!1); + }; + return ( + (0, e.useLayoutEffect)( + function () { + if ((console.log("rendered"), l)) { + var e = setTimeout(c, 1400); + return function () { + clearTimeout(e); + }; + } + }, + [l] + ), + (0, Ut.jsx)("group", { + children: (0, Ut.jsxs)(Ut.Fragment, { + children: [ + (0, Ut.jsx)(Wp, { + start: (function (e) { + switch (e) { + case "left": + return [-0.7, 0, 0]; + case "right": + return 6 === r.id ? [0, 0.6, 0] : [0.6, 0, 0]; + } + })(i), + end: (function (e) { + switch (e) { + case "left": + return [-0.05, 0, 0]; + case "right": + return 6 === r.id ? [0, -0.1, 0] : [-0.1, 0, 0]; + } + })(i), + color: "BLUE", + lineWidth: 5, + dashed: !1, + scale: [8, 5, 1], + }), + (0, Ut.jsxs)("mesh", { + visible: l, + ref: a, + position: + "left" === i + ? [-5, 0, 0] + : 6 === r.id + ? [0, 4, 0] + : [6, 0, 0], + children: [ + (0, Ut.jsx)("boxGeometry", { args: [1, 0.5, 0.5, 6, 2] }), + (0, Ut.jsx)("meshBasicMaterial", { map: n }), + (0, Ut.jsx)( + gm, + (0, Be.Z)( + (0, Be.Z)( + { position: [0, 0.5, 0] }, + { + font: "/Inter-Bold.woff", + fontSize: 0.3, + letterSpacing: -0.05, + lineHeight: 1, + "material-toneMapped": !1, + color: "white", + } + ), + {}, + { + anchorX: "center", + anchorY: "middle", + children: "hash", + } + ) + ), + ], + }), + ], + }), + }) + ); + }; + var YA = function (t) { + var n = t.item, + r = (0, e.useRef)(), + i = Kh(Nd.TextureLoader, VA); + return ( + Yh(function () { + r.current.rotation.y += 0.007; + }), + (0, Ut.jsx)(Ut.Fragment, { + children: (0, Ut.jsx)( + "group", + { + onClick: function (e) { + return console.log(e); + }, + position: n.position, + children: (0, Ut.jsxs)(zA.mesh, { + castShadow: !0, + receiveShadow: !0, + children: [ + (0, Ut.jsx)(bm, { + ref: r, + args: [2, 2, 2], + children: (0, Ut.jsx)("meshBasicMaterial", { + attach: "material", + map: i, + toneMapped: !1, + }), + }), + (0, Ut.jsx)(bm, { + args: [3, 3, 3], + children: (0, Ut.jsx)("meshPhongMaterial", { + color: "#ddddff", + transparent: !0, + opacity: 0.3, + }), + }), + (0, Ut.jsxs)("group", { + position: [0.01, -1.5, 1.5], + children: [ + (0, Ut.jsxs)(bm, { + position: [0, 2.65, 0.08], + args: [3, 0.7, 0], + children: [ + (0, Ut.jsx)(Em, { + color: "blue", + factor: 0.1, + speed: 2, + opacity: 0.1, + transparent: !0, + }), + (0, Ut.jsx)(gm, { + position: [0, -0.1, 0.1], + rotation: [0, 0, 0], + fontSize: 0.2, + color: "#ffffff", + anchorX: "center", + anchorY: "middle", + children: "Header", + }), + ], + }), + (0, Ut.jsxs)(bm, { + position: [0, 1.9, 0.08], + args: [3, 0.7, 0], + children: [ + (0, Ut.jsx)(Em, { + color: "blue", + factor: 0.1, + speed: 2, + opacity: 0.1, + transparent: !0, + }), + (0, Ut.jsx)(gm, { + position: [0, -0.1, 0.1], + rotation: [0, 0, 0], + fontSize: 0.2, + color: "#ffffff", + anchorX: "center", + anchorY: "middle", + children: "Hash", + }), + ], + }), + (0, Ut.jsxs)(bm, { + position: [0, 1.15, 0.08], + args: [3, 0.7, 0], + children: [ + (0, Ut.jsx)(Em, { + color: "blue", + factor: 0.1, + speed: 2, + opacity: 0.1, + transparent: !0, + }), + (0, Ut.jsx)(gm, { + position: [0, -0.1, 0.1], + rotation: [0, 0, 0], + fontSize: 0.2, + color: "#ffffff", + anchorX: "center", + anchorY: "middle", + children: "Data", + }), + ], + }), + (0, Ut.jsxs)(bm, { + position: [0, 0.4, 0.08], + args: [3, 0.7, 0], + children: [ + (0, Ut.jsx)(Em, { + color: "blue", + factor: 0.1, + speed: 2, + opacity: 0.1, + transparent: !0, + }), + (0, Ut.jsx)(gm, { + position: [0, -0.1, 0.1], + rotation: [0, 0, 0], + fontSize: 0.2, + color: "#ffffff", + anchorX: "center", + anchorY: "middle", + children: "Time Stamp", + }), + ], + }), + ], + }), + WA.includes(n.id) && + (0, Ut.jsx)(XA, { type: "left", item: n }), + jA.includes(n.id) && + (0, Ut.jsx)(XA, { type: "right", item: n }), + ], + }), + }, + n.id + ), + }) + ); + }, + qA = function (t) { + var n = t.arr; + return (0, Ut.jsx)(Zp, { + camera: { position: [-10, 5, 12], rotation: [0, 90, 70] }, + style: { background: "#212529", height: "43vh", marginTop: 19 }, + children: (0, Ut.jsxs)(e.Suspense, { + fallback: null, + children: [ + (0, Ut.jsx)("ambientLight", { intensity: 0.5 }), + (0, Ut.jsx)("directionalLight", { + intensity: 0.5, + castShadow: !0, + position: [-8, 16, -8], + }), + (0, Ut.jsx)("pointLight", { intensity: 0.1 }), + (0, Ut.jsx)("group", { + position: [-2, 3, 4], + children: n.map(function (e, t) { + return (0, Ut.jsx)(YA, { item: e }); + }), + }), + (0, Ut.jsx)(hp, { target: [0, 1, 0] }), + (0, Ut.jsx)("color", { args: ["#212529"], attach: "background" }), + ], + }), + }); + }; + var JA = e.createContext(); + function KA(e) { + return (0, Tn.Z)("MuiTable", e); + } + (0, wn.Z)("MuiTable", ["root", "stickyHeader"]); + var $A = ["className", "component", "padding", "size", "stickyHeader"], + ey = (0, Ht.ZP)("table", { + name: "MuiTable", + slot: "Root", + overridesResolver: function (e, t) { + var n = e.ownerState; + return [t.root, n.stickyHeader && t.stickyHeader]; + }, + })(function (e) { + var t = e.theme, + n = e.ownerState; + return (0, + Nt.Z)({ display: "table", width: "100%", borderCollapse: "collapse", borderSpacing: 0, "& caption": (0, Nt.Z)({}, t.typography.body2, { padding: t.spacing(2), color: (t.vars || t).palette.text.secondary, textAlign: "left", captionSide: "bottom" }) }, n.stickyHeader && { borderCollapse: "separate" }); + }), + ty = "table", + ny = e.forwardRef(function (t, n) { + var r = (0, Vt.Z)({ props: t, name: "MuiTable" }), + i = r.className, + a = r.component, + o = void 0 === a ? ty : a, + s = r.padding, + l = void 0 === s ? "normal" : s, + u = r.size, + c = void 0 === u ? "medium" : u, + f = r.stickyHeader, + d = void 0 !== f && f, + h = (0, Gt.Z)(r, $A), + p = (0, Nt.Z)({}, r, { + component: o, + padding: l, + size: c, + stickyHeader: d, + }), + v = (function (e) { + var t = e.classes, + n = { root: ["root", e.stickyHeader && "stickyHeader"] }; + return (0, zt.Z)(n, KA, t); + })(p), + m = e.useMemo( + function () { + return { padding: l, size: c, stickyHeader: d }; + }, + [l, c, d] + ); + return (0, + Ut.jsx)(JA.Provider, { value: m, children: (0, Ut.jsx)(ey, (0, Nt.Z)({ as: o, role: o === ty ? null : "table", ref: n, className: (0, Zt.Z)(v.root, i), ownerState: p }, h)) }); + }), + ry = ny; + var iy = e.createContext(); + function ay(e) { + return (0, Tn.Z)("MuiTableBody", e); + } + (0, wn.Z)("MuiTableBody", ["root"]); + var oy = ["className", "component"], + sy = (0, Ht.ZP)("tbody", { + name: "MuiTableBody", + slot: "Root", + overridesResolver: function (e, t) { + return t.root; + }, + })({ display: "table-row-group" }), + ly = { variant: "body" }, + uy = "tbody", + cy = e.forwardRef(function (e, t) { + var n = (0, Vt.Z)({ props: e, name: "MuiTableBody" }), + r = n.className, + i = n.component, + a = void 0 === i ? uy : i, + o = (0, Gt.Z)(n, oy), + s = (0, Nt.Z)({}, n, { component: a }), + l = (function (e) { + var t = e.classes; + return (0, zt.Z)({ root: ["root"] }, ay, t); + })(s); + return (0, + Ut.jsx)(iy.Provider, { value: ly, children: (0, Ut.jsx)(sy, (0, Nt.Z)({ className: (0, Zt.Z)(l.root, r), as: a, ref: t, role: a === uy ? null : "rowgroup", ownerState: s }, o)) }); + }), + fy = cy; + function dy(e) { + return (0, Tn.Z)("MuiTableCell", e); + } + var hy = (0, wn.Z)("MuiTableCell", [ + "root", + "head", + "body", + "footer", + "sizeSmall", + "sizeMedium", + "paddingCheckbox", + "paddingNone", + "alignLeft", + "alignCenter", + "alignRight", + "alignJustify", + "stickyHeader", + ]), + py = [ + "align", + "className", + "component", + "padding", + "scope", + "size", + "sortDirection", + "variant", + ], + vy = (0, Ht.ZP)("td", { + name: "MuiTableCell", + slot: "Root", + overridesResolver: function (e, t) { + var n = e.ownerState; + return [ + t.root, + t[n.variant], + t["size".concat((0, ln.Z)(n.size))], + "normal" !== n.padding && t["padding".concat((0, ln.Z)(n.padding))], + "inherit" !== n.align && t["align".concat((0, ln.Z)(n.align))], + n.stickyHeader && t.stickyHeader, + ]; + }, + })(function (e) { + var t = e.theme, + n = e.ownerState; + return (0, + Nt.Z)({}, t.typography.body2, { display: "table-cell", verticalAlign: "inherit", borderBottom: t.vars ? "1px solid ".concat(t.vars.palette.TableCell.border) : "1px solid\n ".concat("light" === t.palette.mode ? (0, ia.$n)((0, ia.Fq)(t.palette.divider, 1), 0.88) : (0, ia._j)((0, ia.Fq)(t.palette.divider, 1), 0.68)), textAlign: "left", padding: 16 }, "head" === n.variant && { color: (t.vars || t).palette.text.primary, lineHeight: t.typography.pxToRem(24), fontWeight: t.typography.fontWeightMedium }, "body" === n.variant && { color: (t.vars || t).palette.text.primary }, "footer" === n.variant && { color: (t.vars || t).palette.text.secondary, lineHeight: t.typography.pxToRem(21), fontSize: t.typography.pxToRem(12) }, "small" === n.size && (0, l.Z)({ padding: "6px 16px" }, "&.".concat(hy.paddingCheckbox), { width: 24, padding: "0 12px 0 16px", "& > *": { padding: 0 } }), "checkbox" === n.padding && { width: 48, padding: "0 0 0 4px" }, "none" === n.padding && { padding: 0 }, "left" === n.align && { textAlign: "left" }, "center" === n.align && { textAlign: "center" }, "right" === n.align && { textAlign: "right", flexDirection: "row-reverse" }, "justify" === n.align && { textAlign: "justify" }, n.stickyHeader && { position: "sticky", top: 0, zIndex: 2, backgroundColor: (t.vars || t).palette.background.default }); + }), + my = e.forwardRef(function (t, n) { + var r, + i = (0, Vt.Z)({ props: t, name: "MuiTableCell" }), + a = i.align, + o = void 0 === a ? "inherit" : a, + s = i.className, + l = i.component, + u = i.padding, + c = i.scope, + f = i.size, + d = i.sortDirection, + h = i.variant, + p = (0, Gt.Z)(i, py), + v = e.useContext(JA), + m = e.useContext(iy), + g = m && "head" === m.variant, + A = c; + "td" === (r = l || (g ? "th" : "td")) + ? (A = void 0) + : !A && g && (A = "col"); + var y = h || (m && m.variant), + b = (0, Nt.Z)({}, i, { + align: o, + component: r, + padding: u || (v && v.padding ? v.padding : "normal"), + size: f || (v && v.size ? v.size : "medium"), + sortDirection: d, + stickyHeader: "head" === y && v && v.stickyHeader, + variant: y, + }), + x = (function (e) { + var t = e.classes, + n = e.variant, + r = e.align, + i = e.padding, + a = e.size, + o = { + root: [ + "root", + n, + e.stickyHeader && "stickyHeader", + "inherit" !== r && "align".concat((0, ln.Z)(r)), + "normal" !== i && "padding".concat((0, ln.Z)(i)), + "size".concat((0, ln.Z)(a)), + ], + }; + return (0, zt.Z)(o, dy, t); + })(b), + S = null; + return ( + d && (S = "asc" === d ? "ascending" : "descending"), + (0, Ut.jsx)( + vy, + (0, Nt.Z)( + { + as: r, + ref: n, + className: (0, Zt.Z)(x.root, s), + "aria-sort": S, + scope: A, + ownerState: b, + }, + p + ) + ) + ); + }), + gy = my; + function Ay(e) { + return (0, Tn.Z)("MuiTableContainer", e); + } + (0, wn.Z)("MuiTableContainer", ["root"]); + var yy = ["className", "component"], + by = (0, Ht.ZP)("div", { + name: "MuiTableContainer", + slot: "Root", + overridesResolver: function (e, t) { + return t.root; + }, + })({ width: "100%", overflowX: "auto" }), + xy = e.forwardRef(function (e, t) { + var n = (0, Vt.Z)({ props: e, name: "MuiTableContainer" }), + r = n.className, + i = n.component, + a = void 0 === i ? "div" : i, + o = (0, Gt.Z)(n, yy), + s = (0, Nt.Z)({}, n, { component: a }), + l = (function (e) { + var t = e.classes; + return (0, zt.Z)({ root: ["root"] }, Ay, t); + })(s); + return (0, + Ut.jsx)(by, (0, Nt.Z)({ ref: t, as: a, className: (0, Zt.Z)(l.root, r), ownerState: s }, o)); + }), + Sy = xy; + function Ey(e) { + return (0, Tn.Z)("MuiTableHead", e); + } + (0, wn.Z)("MuiTableHead", ["root"]); + var _y = ["className", "component"], + Cy = (0, Ht.ZP)("thead", { + name: "MuiTableHead", + slot: "Root", + overridesResolver: function (e, t) { + return t.root; + }, + })({ display: "table-header-group" }), + wy = { variant: "head" }, + Ty = "thead", + My = e.forwardRef(function (e, t) { + var n = (0, Vt.Z)({ props: e, name: "MuiTableHead" }), + r = n.className, + i = n.component, + a = void 0 === i ? Ty : i, + o = (0, Gt.Z)(n, _y), + s = (0, Nt.Z)({}, n, { component: a }), + l = (function (e) { + var t = e.classes; + return (0, zt.Z)({ root: ["root"] }, Ey, t); + })(s); + return (0, + Ut.jsx)(iy.Provider, { value: wy, children: (0, Ut.jsx)(Cy, (0, Nt.Z)({ as: a, className: (0, Zt.Z)(l.root, r), ref: t, role: a === Ty ? null : "rowgroup", ownerState: s }, o)) }); + }), + Iy = My; + function ky(e) { + return (0, Tn.Z)("MuiTableRow", e); + } + var Ry = (0, wn.Z)("MuiTableRow", [ + "root", + "selected", + "hover", + "head", + "footer", + ]), + By = ["className", "component", "hover", "selected"], + Py = (0, Ht.ZP)("tr", { + name: "MuiTableRow", + slot: "Root", + overridesResolver: function (e, t) { + var n = e.ownerState; + return [t.root, n.head && t.head, n.footer && t.footer]; + }, + })(function (e) { + var t, + n = e.theme; + return ( + (t = { + color: "inherit", + display: "table-row", + verticalAlign: "middle", + outline: 0, + }), + (0, l.Z)(t, "&.".concat(Ry.hover, ":hover"), { + backgroundColor: (n.vars || n).palette.action.hover, + }), + (0, l.Z)(t, "&.".concat(Ry.selected), { + backgroundColor: n.vars + ? "rgba(" + .concat(n.vars.palette.primary.mainChannel, " / ") + .concat(n.vars.palette.action.selectedOpacity, ")") + : (0, ia.Fq)( + n.palette.primary.main, + n.palette.action.selectedOpacity + ), + "&:hover": { + backgroundColor: n.vars + ? "rgba(" + .concat(n.vars.palette.primary.mainChannel, " / calc(") + .concat(n.vars.palette.action.selectedOpacity, " + ") + .concat(n.vars.palette.action.hoverOpacity, "))") + : (0, ia.Fq)( + n.palette.primary.main, + n.palette.action.selectedOpacity + + n.palette.action.hoverOpacity + ), + }, + }), + t + ); + }), + Ly = e.forwardRef(function (t, n) { + var r = (0, Vt.Z)({ props: t, name: "MuiTableRow" }), + i = r.className, + a = r.component, + o = void 0 === a ? "tr" : a, + s = r.hover, + l = void 0 !== s && s, + u = r.selected, + c = void 0 !== u && u, + f = (0, Gt.Z)(r, By), + d = e.useContext(iy), + h = (0, Nt.Z)({}, r, { + component: o, + hover: l, + selected: c, + head: d && "head" === d.variant, + footer: d && "footer" === d.variant, + }), + p = (function (e) { + var t = e.classes, + n = { + root: [ + "root", + e.selected && "selected", + e.hover && "hover", + e.head && "head", + e.footer && "footer", + ], + }; + return (0, zt.Z)(n, ky, t); + })(h); + return (0, + Ut.jsx)(Py, (0, Nt.Z)({ as: o, ref: n, className: (0, Zt.Z)(p.root, i), role: "tr" === o ? null : "row", ownerState: h }, f)); + }), + Dy = Ly, + Uy = (0, Ht.ZP)(gy)(function (e) { + var t, + n = e.theme; + return ( + (t = {}), + (0, l.Z)(t, "&.".concat(hy.head), { + backgroundColor: "black", + color: n.palette.common.white, + }), + (0, l.Z)(t, "&.".concat(hy.body), { fontSize: 14 }), + t + ); + }), + Fy = (0, Ht.ZP)(Dy)(function (e) { + return { + "&:nth-of-type(odd)": { + backgroundColor: e.theme.palette.action.hover, + }, + "&:last-child td, &:last-child th": { border: 0 }, + }; + }); + function Oy() { + var e = A(function (e) { + return e.products; + }).buyed_products; + return (0, Ut.jsx)(Ut.Fragment, { + children: (0, Ut.jsx)(Sy, { + className: "table", + style: { width: "70%", margin: "0 auto" }, + component: ca, + children: (0, Ut.jsxs)(ry, { + children: [ + (0, Ut.jsx)(Iy, { + children: (0, Ut.jsxs)(Dy, { + "aria-label": "customized table", + children: [ + (0, Ut.jsx)(Uy, { align: "left", children: "Id" }), + (0, Ut.jsx)(Uy, { children: "Product Name" }), + (0, Ut.jsx)(Uy, { + align: "right", + children: "Price(\u20b9)", + }), + (0, Ut.jsx)(Uy, { align: "right", children: "Quantity" }), + (0, Ut.jsx)(Uy, { + align: "right", + children: "Total Price( \u20b9)", + }), + (0, Ut.jsx)(Uy, { align: "right", children: "Time" }), + ], + }), + }), + (0, Ut.jsx)(fy, { + children: + e.length > 0 && + e.map(function (e, t) { + return (0, + Ut.jsxs)(Fy, { children: [(0, Ut.jsx)(Uy, { align: "left", children: t + 1 }), (0, Ut.jsx)(Uy, { children: e.name }), (0, Ut.jsx)(Uy, { align: "right", children: e.price }), (0, Ut.jsx)(Uy, { align: "right", children: e.quantity }), (0, Ut.jsx)(Uy, { align: "right", children: e.totalPrice }), (0, Ut.jsx)(Uy, { align: "right", children: e.purchasedAt })] }, e.id); + }), + }), + ], + }), + }), + }); + } + var Ny = function () { + var t = A(function (e) { + return e.products; + }), + n = t.showHistory, + r = t.blockChainDetails, + i = e.useState("blockChain"), + a = (0, Ot.Z)(i, 2), + o = a[0], + s = a[1], + l = function (e) { + switch (e) { + case "conventional": + s("blockChain"); + break; + case "blockChain": + s("conventional"); + } + }; + return ( + e.useEffect( + function () { + 0 === r.length && s("blockChain"); + }, + [r.length] + ), + (0, Ut.jsx)("div", { + children: + n && + (0, Ut.jsxs)("div", { + style: { color: "white" }, + children: [ + (0, Ut.jsxs)("div", { + style: { padding: 30 }, + children: [ + (0, Ut.jsx)(Gl, { + disabled: "blockChain" !== o, + children: "Conventional", + onClick: function () { + return l("conventional"); + }, + }), + (0, Ut.jsx)(Gl, { + disabled: "conventional" !== o, + children: "BlockChain", + onClick: function () { + return l("blockChain"); + }, + }), + ], + }), + "conventional" !== o + ? (0, Ut.jsx)(Ut.Fragment, { children: (0, Ut.jsx)(Oy, {}) }) + : (0, Ut.jsx)(qA, { arr: r }), + ], + }), + }) + ); + }; + var Gy = function () { + return (0, Ut.jsx)(e.Suspense, { + fallback: (0, Ut.jsx)("div", { children: "loading..." }), + children: (0, Ut.jsx)(C, { + store: Dt, + children: (0, Ut.jsx)(Td, { + children: (0, Ut.jsxs)("div", { + style: { + display: "flex", + flexDirection: "column", + height: "100vh", + }, + className: "App", + children: [ + (0, Ut.jsxs)("div", { + style: { + flex: 0.3, + flexDirection: "row", + paddingBlock: 20, + }, + children: [ + (0, Ut.jsx)(Ft, {}), + (0, Ut.jsxs)("div", { + style: { + display: "flex", + height: "80%", + justifyContent: "space-around", + }, + children: [ + (0, Ut.jsx)("div", { + style: { + flex: 0.2, + color: "white", + display: "flex", + justifyContent: "flex-start", + alignItems: "center", + paddingBlock: 20, + flexDirection: "column", + }, + children: (0, Ut.jsx)(zl, {}), + }), + (0, Ut.jsx)("div", { + style: { + flex: 0.5, + color: "white", + display: "flex", + flexDirection: "row", + }, + children: (0, Ut.jsx)(Id, {}), + }), + (0, Ut.jsx)("div", { + style: { + flex: 0.3, + color: "white", + display: "flex", + alignItem: "center", + }, + children: (0, Ut.jsx)(Qc, {}), + }), + ], + }), + ], + }), + (0, Ut.jsx)("div", { + style: { flex: 0.7, backgroundColor: "#212529" }, + children: (0, Ut.jsx)(Ny, {}), + }), + ], + }), + }), + }), + }); + }, + Zy = function (e) { + e && + e instanceof Function && + n + .e(787) + .then(n.bind(n, 787)) + .then(function (t) { + var n = t.getCLS, + r = t.getFID, + i = t.getFCP, + a = t.getLCP, + o = t.getTTFB; + n(e), r(e), i(e), a(e), o(e); + }); + }; + t.createRoot(document.getElementById("root")).render((0, Ut.jsx)(Gy, {})), + Zy(); + })(); +})(); +//# sourceMappingURL=main.2ba1ee00.js.map