vendor: 44,474 bytes, lines 1-919
1var pyxl; 2 3function Pyxl() { 4 this.currentDirection = "down", this.smoothAnchorOffset = 0, this.smoothAnchorSpeed = 1e3, this.item_template = $("#item-template").html(), this.pagination_template = $("#pagination-template").html(), this.action = $(".item-holder").data("action"), this.runChange = !0 5} 6 7function getAllFiltersForPosts(event){ 8 var filters = {}; 9 var target = event.target.nodeName == "SELECT" ? ".filter-menu select" : ".filter-menu input"; 10 var inputs; 11 12 if(target == ".filter-menu select"){ 13 inputs = $(target); 14 inputs.push($("#blog_page_search")); 15 } 16 else if($(event.target).attr("id") == 'blog_page_search'){ 17 inputs = $(target); 18 var selectInputs = $(".filter-menu select"); 19 $.each(selectInputs, function(i, selected){ 20 inputs.push(selected); 21 }); 22 } 23 else { 24 inputs = $(target); 25 inputs = inputs.filter(":checked"); 26 } 27 28 $.each(inputs,function(i, input){ 29 var $t = $(input); 30 var name = $t.attr("name"); 31 var value = $t.val(); 32 33 if(value != '' && name != "_gl"){ 34 filters[name] = filters[name] || []; 35 filters[name].push(value); 36 } 37 }); 38 39 return filters; 40} 41 42function get_options(e) { 43 return { 44 arrows: !0, 45 appendArrows: e.find(".pagination"), 46 dots: !0, 47 appendDots: e.find(".pagination"), 48 prevArrow: '<button type="button" class="slick-prev"><span class="show-for-sr">Previous</span></button>', 49 nextArrow: '<button type="button" class="slick-next"><span class="show-for-sr">Next</span></button>' 50 } 51}! function(e, t) { 52 "use strict"; 53 "object" == typeof module && "object" == typeof module.exports ? module.exports = e.document ? t(e, !0) : function(e) { 54 if (!e.document) throw new Error("jQuery requires a window with a document"); 55 return t(e) 56 } : t(e) 57}("undefined" != typeof window ? window : this, function(T, e) { 58 "use strict"; 59 var t = [], 60 E = T.document, 61 n = Object.getPrototypeOf, 62 s = t.slice, 63 m = t.concat, 64 l = t.push, 65 r = t.indexOf, 66 i = {}, 67 o = i.toString, 68 g = i.hasOwnProperty, 69 a = g.toString, 70 c = a.call(Object), 71 v = {}, 72 y = function(e) { 73 return "function" == typeof e && "number" != typeof e.nodeType 74 }, 75 b = function(e) { 76 return null != e && e === e.window 77 }, 78 u = { 79 type: !0, 80 src: !0, 81 noModule: !0 82 }; 83 84 function w(e, t, i) { 85 var n, r = (t = t || E).createElement("script"); 86 if (r.text = e, i) 87 for (n in u) i[n] && (r[n] = i[n]); 88 t.head.appendChild(r).parentNode.removeChild(r) 89 } 90 91 function x(e) { 92 return null == e ? e + "" : "object" == typeof e || "function" == typeof e ? i[o.call(e)] || "object" : typeof e 93 } 94 var M = function(e, t) { 95 return new M.fn.init(e, t) 96 }, 97 h = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g; 98 99 function d(e) { 100 var t = !!e && "length" in e && e.length, 101 i = x(e); 102 return !y(e) && !b(e) && ("array" === i || 0 === t || "number" == typeof t && 0 < t && t - 1 in e) 103 } 104 M.fn = M.prototype = { 105 jquery: "3.3.1", 106 constructor: M, 107 length: 0, 108 toArray: function() { 109 return s.call(this) 110 }, 111 get: function(e) { 112 return null == e ? s.call(this) : e < 0 ? this[e + this.length] : this[e] 113 }, 114 pushStack: function(e) { 115 var t = M.merge(this.constructor(), e); 116 return t.prevObject = this, t 117 }, 118 each: function(e) { 119 return M.each(this, e) 120 }, 121 map: function(i) { 122 return this.pushStack(M.map(this, function(e, t) { 123 return i.call(e, t, e) 124 })) 125 }, 126 slice: function() { 127 return this.pushStack(s.apply(this, arguments)) 128 }, 129 first: function() { 130 return this.eq(0) 131 }, 132 last: function() { 133 return this.eq(-1) 134 }, 135 eq: function(e) { 136 var t = this.length, 137 i = +e + (e < 0 ? t : 0); 138 return this.pushStack(0 <= i && i < t ? [this[i]] : []) 139 }, 140 end: function() { 141 return this.prevObject || this.constructor() 142 }, 143 push: l, 144 sort: t.sort, 145 splice: t.splice 146 }, M.extend = M.fn.extend = function() { 147 var e, t, i, n, r, o, a = arguments[0] || {}, 148 s = 1, 149 l = arguments.length, 150 c = !1; 151 for ("boolean" == typeof a && (c = a, a = arguments[s] || {}, s++), "object" == typeof a || y(a) || (a = {}), s === l && (a = this, s--); s < l; s++) 152 if (null != (e = arguments[s])) 153 for (t in e) i = a[t], a !== (n = e[t]) && (c && n && (M.isPlainObject(n) || (r = Array.isArray(n))) ? (r ? (r = !1, o = i && Array.isArray(i) ? i : []) : o = i && M.isPlainObject(i) ? i : {}, a[t] = M.extend(c, o, n)) : void 0 !== n && (a[t] = n)); 154 return a 155 }, M.extend({ 156 expando: "jQuery" + ("3.3.1" + Math.random()).replace(/\D/g, ""), 157 isReady: !0, 158 error: function(e) { 159 throw new Error(e) 160 }, 161 noop: function() {}, 162 isPlainObject: function(e) { 163 var t, i; 164 return !(!e || "[object Object]" !== o.call(e) || (t = n(e)) && ("function" != typeof(i = g.call(t, "constructor") && t.constructor) || a.call(i) !== c)) 165 }, 166 isEmptyObject: function(e) { 167 var t; 168 for (t in e) return !1; 169 return !0 170 }, 171 globalEval: function(e) { 172 w(e) 173 }, 174 each: function(e, t) { 175 var i, n = 0; 176 if (d(e)) 177 for (i = e.length; n < i && !1 !== t.call(e[n], n, e[n]); n++); 178 else 179 for (n in e) 180 if (!1 === t.call(e[n], n, e[n])) break; return e 181 }, 182 trim: function(e) { 183 return null == e ? "" : (e + "").replace(h, "") 184 }, 185 makeArray: function(e, t) { 186 var i = t || []; 187 return null != e && (d(Object(e)) ? M.merge(i, "string" == typeof e ? [e] : e) : l.call(i, e)), i 188 }, 189 inArray: function(e, t, i) { 190 return null == t ? -1 : r.call(t, e, i) 191 }, 192 merge: function(e, t) { 193 for (var i = +t.length, n = 0, r = e.length; n < i; n++) e[r++] = t[n]; 194 return e.length = r, e 195 }, 196 grep: function(e, t, i) { 197 for (var n = [], r = 0, o = e.length, a = !i; r < o; r++) !t(e[r], r) !== a && n.push(e[r]); 198 return n 199 }, 200 map: function(e, t, i) { 201 var n, r, o = 0, 202 a = []; 203 if (d(e)) 204 for (n = e.length; o < n; o++) null != (r = t(e[o], o, i)) && a.push(r); 205 else 206 for (o in e) null != (r = t(e[o], o, i)) && a.push(r); 207 return m.apply([], a) 208 }, 209 guid: 1, 210 support: v 211 }), "function" == typeof Symbol && (M.fn[Symbol.iterator] = t[Symbol.iterator]), M.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "), function(e, t) { 212 i["[object " + t + "]"] = t.toLowerCase() 213 }); 214 var p = function(i) { 215 var e, p, w, o, r, f, h, m, x, l, c, _, T, a, E, g, s, u, v, M = "sizzle" + 1 * new Date, 216 y = i.document, 217 S = 0, 218 n = 0, 219 d = ae(), 220 b = ae(), 221 C = ae(), 222 A = function(e, t) { 223 return e === t && (c = !0), 0 224 }, 225 R = {}.hasOwnProperty, 226 t = [], 227 L = t.pop, 228 P = t.push, 229 k = t.push, 230 O = t.slice, 231 D = function(e, t) { 232 for (var i = 0, n = e.length; i < n; i++) 233 if (e[i] === t) return i; 234 return -1 235 }, 236 I = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped", 237 z = "[\\x20\\t\\r\\n\\f]", 238 N = "(?:\\\\.|[\\w-]|[^\0-\\xa0])+", 239 F = "\\[" + z + "*(" + N + ")(?:" + z + "*([*^$|!~]?=)" + z + "*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|(" + N + "))|)" + z + "*\\]", 240 U = ":(" + N + ")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|" + F + ")*)|.*)\\)|)", 241 B = new RegExp(z + "+", "g"), 242 H = new RegExp("^" + z + "+|((?:^|[^\\\\])(?:\\\\.)*)" + z + "+$", "g"), 243 $ = new RegExp("^" + z + "*," + z + "*"), 244 j = new RegExp("^" + z + "*([>+~]|" + z + ")" + z + "*"), 245 G = new RegExp("=" + z + "*([^\\]'\"]*?)" + z + "*\\]", "g"), 246 V = new RegExp(U), 247 W = new RegExp("^" + N + "$"), 248 q = { 249 ID: new RegExp("^#(" + N + ")"), 250 CLASS: new RegExp("^\\.(" + N + ")"), 251 TAG: new RegExp("^(" + N + "|[*])"), 252 ATTR: new RegExp("^" + F), 253 PSEUDO: new RegExp("^" + U), 254 CHILD: new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + z + "*(even|odd|(([+-]|)(\\d*)n|)" + z + "*(?:([+-]|)" + z + "*(\\d+)|))" + z + "*\\)|)", "i"), 255 bool: new RegExp("^(?:" + I + ")$", "i"), 256 needsContext: new RegExp("^" + z + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" + z + "*((?:-\\d)?\\d*)" + z + "*\\)|)(?=[^-]|$)", "i") 257 }, 258 X = /^(?:input|select|textarea|button)$/i, 259 Y = /^h\d$/i, 260 Z = /^[^{]+\{\s*\[native \w/, 261 Q = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/, 262 J = /[+~]/, 263 K = new RegExp("\\\\([\\da-f]{1,6}" + z + "?|(" + z + ")|.)", "ig"), 264 ee = function(e, t, i) { 265 var n = "0x" + t - 65536; 266 return n != n || i ? t : n < 0 ? String.fromCharCode(n + 65536) : String.fromCharCode(n >> 10 | 55296, 1023 & n | 56320) 267 }, 268 te = /([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g, 269 ie = function(e, t) { 270 return t ? "\0" === e ? "�" : e.slice(0, -1) + "\\" + e.charCodeAt(e.length - 1).toString(16) + " " : "\\" + e 271 }, 272 ne = function() { 273 _() 274 }, 275 re = ye(function(e) { 276 return !0 === e.disabled && ("form" in e || "label" in e) 277 }, { 278 dir: "parentNode", 279 next: "legend" 280 }); 281 try { 282 k.apply(t = O.call(y.childNodes), y.childNodes), t[y.childNodes.length].nodeType 283 } catch (i) { 284 k = { 285 apply: t.length ? function(e, t) { 286 P.apply(e, O.call(t)) 287 } : function(e, t) { 288 for (var i = e.length, n = 0; e[i++] = t[n++];); 289 e.length = i - 1 290 } 291 } 292 } 293 294 function oe(e, t, i, n) { 295 var r, o, a, s, l, c, u, h = t && t.ownerDocument, 296 d = t ? t.nodeType : 9; 297 if (i = i || [], "string" != typeof e || !e || 1 !== d && 9 !== d && 11 !== d) return i; 298 if (!n && ((t ? t.ownerDocument || t : y) !== T && _(t), t = t || T, E)) { 299 if (11 !== d && (l = Q.exec(e))) 300 if (r = l[1]) { 301 if (9 === d) { 302 if (!(a = t.getElementById(r))) return i; 303 if (a.id === r) return i.push(a), i 304 } else if (h && (a = h.getElementById(r)) && v(t, a) && a.id === r) return i.push(a), i 305 } else { 306 if (l[2]) return k.apply(i, t.getElementsByTagName(e)), i; 307 if ((r = l[3]) && p.getElementsByClassName && t.getElementsByClassName) return k.apply(i, t.getElementsByClassName(r)), i 308 } 309 if (p.qsa && !C[e + " "] && (!g || !g.test(e))) { 310 if (1 !== d) h = t, u = e; 311 else if ("object" !== t.nodeName.toLowerCase()) { 312 for ((s = t.getAttribute("id")) ? s = s.replace(te, ie) : t.setAttribute("id", s = M), o = (c = f(e)).length; o--;) c[o] = "#" + s + " " + ve(c[o]); 313 u = c.join(","), h = J.test(e) && me(t.parentNode) || t 314 } 315 if (u) try { 316 return k.apply(i, h.querySelectorAll(u)), i 317 } catch (e) {} finally { 318 s === M && t.removeAttribute("id") 319 } 320 } 321 } 322 return m(e.replace(H, "$1"), t, i, n) 323 } 324 325 function ae() { 326 var n = []; 327 return function e(t, i) { 328 return n.push(t + " ") > w.cacheLength && delete e[n.shift()], e[t + " "] = i 329 } 330 } 331 332 function se(e) { 333 return e[M] = !0, e 334 } 335 336 function le(e) { 337 var t = T.createElement("fieldset"); 338 try { 339 return !!e(t) 340 } catch (e) { 341 return !1 342 } finally { 343 t.parentNode && t.parentNode.removeChild(t), t = null 344 } 345 } 346 347 function ce(e, t) { 348 for (var i = e.split("|"), n = i.length; n--;) w.attrHandle[i[n]] = t 349 } 350 351 function ue(e, t) { 352 var i = t && e, 353 n = i && 1 === e.nodeType && 1 === t.nodeType && e.sourceIndex - t.sourceIndex; 354 if (n) return n; 355 if (i) 356 for (; i = i.nextSibling;) 357 if (i === t) return -1; 358 return e ? 1 : -1 359 } 360 361 function he(t) { 362 return function(e) { 363 return "input" === e.nodeName.toLowerCase() && e.type === t 364 } 365 } 366 367 function de(i) { 368 return function(e) { 369 var t = e.nodeName.toLowerCase(); 370 return ("input" === t || "button" === t) && e.type === i 371 } 372 } 373 374 function pe(t) { 375 return function(e) { 376 return "form" in e ? e.parentNode && !1 === e.disabled ? "label" in e ? "label" in e.parentNode ? e.parentNode.disabled === t : e.disabled === t : e.isDisabled === t || e.isDisabled !== !t && re(e) === t : e.disabled === t : "label" in e && e.disabled === t 377 } 378 } 379 380 function fe(a) { 381 return se(function(o) { 382 return o = +o, se(function(e, t) { 383 for (var i, n = a([], e.length, o), r = n.length; r--;) e[i = n[r]] && (e[i] = !(t[i] = e[i])) 384 }) 385 }) 386 } 387 388 function me(e) { 389 return e && void 0 !== e.getElementsByTagName && e 390 } 391 for (e in p = oe.support = {}, r = oe.isXML = function(e) { 392 var t = e && (e.ownerDocument || e).documentElement; 393 return !!t && "HTML" !== t.nodeName 394 }, _ = oe.setDocument = function(e) { 395 var t, i, n = e ? e.ownerDocument || e : y; 396 return n !== T && 9 === n.nodeType && n.documentElement && (a = (T = n).documentElement, E = !r(T), y !== T && (i = T.defaultView) && i.top !== i && (i.addEventListener ? i.addEventListener("unload", ne, !1) : i.attachEvent && i.attachEvent("onunload", ne)), p.attributes = le(function(e) { 397 return e.className = "i", !e.getAttribute("className") 398 }), p.getElementsByTagName = le(function(e) { 399 return e.appendChild(T.createComment("")), !e.getElementsByTagName("*").length 400 }), p.getElementsByClassName = Z.test(T.getElementsByClassName), p.getById = le(function(e) { 401 return a.appendChild(e).id = M, !T.getElementsByName || !T.getElementsByName(M).length 402 }), p.getById ? (w.filter.ID = function(e) { 403 var t = e.replace(K, ee); 404 return function(e) { 405 return e.getAttribute("id") === t 406 } 407 }, w.find.ID = function(e, t) { 408 if (void 0 !== t.getElementById && E) { 409 var i = t.getElementById(e); 410 return i ? [i] : [] 411 } 412 }) : (w.filter.ID = function(e) { 413 var i = e.replace(K, ee); 414 return function(e) { 415 var t = void 0 !== e.getAttributeNode && e.getAttributeNode("id"); 416 return t && t.value === i 417 } 418 }, w.find.ID = function(e, t) { 419 if (void 0 !== t.getElementById && E) { 420 var i, n, r, o = t.getElementById(e); 421 if (o) { 422 if ((i = o.getAttributeNode("id")) && i.value === e) return [o]; 423 for (r = t.getElementsByName(e), n = 0; o = r[n++];) 424 if ((i = o.getAttributeNode("id")) && i.value === e) return [o] 425 } 426 return [] 427 } 428 }), w.find.TAG = p.getElementsByTagName ? function(e, t) { 429 return void 0 !== t.getElementsByTagName ? t.getElementsByTagName(e) : p.qsa ? t.querySelectorAll(e) : void 0 430 } : function(e, t) { 431 var i, n = [], 432 r = 0, 433 o = t.getElementsByTagName(e); 434 if ("*" === e) { 435 for (; i = o[r++];) 1 === i.nodeType && n.push(i); 436 return n 437 } 438 return o 439 }, w.find.CLASS = p.getElementsByClassName && function(e, t) { 440 if (void 0 !== t.getElementsByClassName && E) return t.getElementsByClassName(e) 441 }, s = [], g = [], (p.qsa = Z.test(T.querySelectorAll)) && (le(function(e) { 442 a.appendChild(e).innerHTML = "<a id='" + M + "'></a><select id='" + M + "-\r\\' msallowcapture=''><option selected=''></option></select>", e.querySelectorAll("[msallowcapture^='']").length && g.push("[*^$]=" + z + "*(?:''|\"\")"), e.querySelectorAll("[selected]").length || g.push("\\[" + z + "*(?:value|" + I + ")"), e.querySelectorAll("[id~=" + M + "-]").length || g.push("~="), e.querySelectorAll(":checked").length || g.push(":checked"), e.querySelectorAll("a#" + M + "+*").length || g.push(".#.+[+~]") 443 }), le(function(e) { 444 e.innerHTML = "<a href='' disabled='disabled'></a><select disabled='disabled'><option/></select>"; 445 var t = T.createElement("input"); 446 t.setAttribute("type", "hidden"), e.appendChild(t).setAttribute("name", "D"), e.querySelectorAll("[name=d]").length && g.push("name" + z + "*[*^$|!~]?="), 2 !== e.querySelectorAll(":enabled").length && g.push(":enabled", ":disabled"), a.appendChild(e).disabled = !0, 2 !== e.querySelectorAll(":disabled").length && g.push(":enabled", ":disabled"), e.querySelectorAll("*,:x"), g.push(",.*:") 447 })), (p.matchesSelector = Z.test(u = a.matches || a.webkitMatchesSelector || a.mozMatchesSelector || a.oMatchesSelector || a.msMatchesSelector)) && le(function(e) { 448 p.disconnectedMatch = u.call(e, "*"), u.call(e, "[s!='']:x"), s.push("!=", U) 449 }), g = g.length && new RegExp(g.join("|")), s = s.length && new RegExp(s.join("|")), t = Z.test(a.compareDocumentPosition), v = t || Z.test(a.contains) ? function(e, t) { 450 var i = 9 === e.nodeType ? e.documentElement : e, 451 n = t && t.parentNode; 452 return e === n || !(!n || 1 !== n.nodeType || !(i.contains ? i.contains(n) : e.compareDocumentPosition && 16 & e.compareDocumentPosition(n))) 453 } : function(e, t) { 454 if (t) 455 for (; t = t.parentNode;) 456 if (t === e) return !0; 457 return !1 458 }, A = t ? function(e, t) { 459 if (e === t) return c = !0, 0; 460 var i = !e.compareDocumentPosition - !t.compareDocumentPosition; 461 return i || (1 & (i = (e.ownerDocument || e) === (t.ownerDocument || t) ? e.compareDocumentPosition(t) : 1) || !p.sortDetached && t.compareDocumentPosition(e) === i ? e === T || e.ownerDocument === y && v(y, e) ? -1 : t === T || t.ownerDocument === y && v(y, t) ? 1 : l ? D(l, e) - D(l, t) : 0 : 4 & i ? -1 : 1) 462 } : function(e, t) { 463 if (e === t) return c = !0, 0; 464 var i, n = 0, 465 r = e.parentNode, 466 o = t.parentNode, 467 a = [e], 468 s = [t]; 469 if (!r || !o) return e === T ? -1 : t === T ? 1 : r ? -1 : o ? 1 : l ? D(l, e) - D(l, t) : 0; 470 if (r === o) return ue(e, t); 471 for (i = e; i = i.parentNode;) a.unshift(i); 472 for (i = t; i = i.parentNode;) s.unshift(i); 473 for (; a[n] === s[n];) n++; 474 return n ? ue(a[n], s[n]) : a[n] === y ? -1 : s[n] === y ? 1 : 0 475 }), T 476 }, oe.matches = function(e, t) { 477 return oe(e, null, null, t) 478 }, oe.matchesSelector = function(e, t) { 479 if ((e.ownerDocument || e) !== T && _(e), t = t.replace(G, "='$1']"), p.matchesSelector && E && !C[t + " "] && (!s || !s.test(t)) && (!g || !g.test(t))) try { 480 var i = u.call(e, t); 481 if (i || p.disconnectedMatch || e.document && 11 !== e.document.nodeType) return i 482 } catch (e) {} 483 return 0 < oe(t, T, null, [e]).length 484 }, oe.contains = function(e, t) { 485 return (e.ownerDocument || e) !== T && _(e), v(e, t) 486 }, oe.attr = function(e, t) { 487 (e.ownerDocument || e) !== T && _(e); 488 var i = w.attrHandle[t.toLowerCase()], 489 n = i && R.call(w.attrHandle, t.toLowerCase()) ? i(e, t, !E) : void 0; 490 return void 0 !== n ? n : p.attributes || !E ? e.getAttribute(t) : (n = e.getAttributeNode(t)) && n.specified ? n.value : null 491 }, oe.escape = function(e) { 492 return (e + "").replace(te, ie) 493 }, oe.error = function(e) { 494 throw new Error("Syntax error, unrecognized expression: " + e) 495 }, oe.uniqueSort = function(e) { 496 var t, i = [], 497 n = 0, 498 r = 0; 499 if (c = !p.detectDuplicates, l = !p.sortStable && e.slice(0), e.sort(A), c) { 500 for (; t = e[r++];) t === e[r] && (n = i.push(r)); 501 for (; n--;) e.splice(i[n], 1) 502 } 503 return l = null, e 504 }, o = oe.getText = function(e) { 505 var t, i = "", 506 n = 0, 507 r = e.nodeType; 508 if (r) { 509 if (1 === r || 9 === r || 11 === r) { 510 if ("string" == typeof e.textContent) return e.textContent; 511 for (e = e.firstChild; e; e = e.nextSibling) i += o(e) 512 } else if (3 === r || 4 === r) return e.nodeValue 513 } else 514 for (; t = e[n++];) i += o(t); 515 return i 516 }, (w = oe.selectors = { 517 cacheLength: 50, 518 createPseudo: se, 519 match: q, 520 attrHandle: {}, 521 find: {}, 522 relative: { 523 ">": { 524 dir: "parentNode", 525 first: !0 526 }, 527 " ": { 528 dir: "parentNode" 529 }, 530 "+": { 531 dir: "previousSibling", 532 first: !0 533 }, 534 "~": { 535 dir: "previousSibling" 536 } 537 }, 538 preFilter: { 539 ATTR: function(e) { 540 return e[1] = e[1].replace(K, ee), e[3] = (e[3] || e[4] || e[5] || "").replace(K, ee), "~=" === e[2] && (e[3] = " " + e[3] + " "), e.slice(0, 4) 541 }, 542 CHILD: function(e) { 543 return e[1] = e[1].toLowerCase(), "nth" === e[1].slice(0, 3) ? (e[3] || oe.error(e[0]), e[4] = +(e[4] ? e[5] + (e[6] || 1) : 2 * ("even" === e[3] || "odd" === e[3])), e[5] = +(e[7] + e[8] || "odd" === e[3])) : e[3] && oe.error(e[0]), e 544 }, 545 PSEUDO: function(e) { 546 var t, i = !e[6] && e[2]; 547 return q.CHILD.test(e[0]) ? null : (e[3] ? e[2] = e[4] || e[5] || "" : i && V.test(i) && (t = f(i, !0)) && (t = i.indexOf(")", i.length - t) - i.length) && (e[0] = e[0].slice(0, t), e[2] = i.slice(0, t)), e.slice(0, 3)) 548 } 549 }, 550 filter: { 551 TAG: function(e) { 552 var t = e.replace(K, ee).toLowerCase(); 553 return "*" === e ? function() { 554 return !0 555 } : function(e) { 556 return e.nodeName && e.nodeName.toLowerCase() === t 557 } 558 }, 559 CLASS: function(e) { 560 var t = d[e + " "]; 561 return t || (t = new RegExp("(^|" + z + ")" + e + "(" + z + "|$)")) && d(e, function(e) { 562 return t.test("string" == typeof e.className && e.className || void 0 !== e.getAttribute && e.getAttribute("class") || "") 563 }) 564 }, 565 ATTR: function(i, n, r) { 566 return function(e) { 567 var t = oe.attr(e, i); 568 return null == t ? "!=" === n : !n || (t += "", "=" === n ? t === r : "!=" === n ? t !== r : "^=" === n ? r && 0 === t.indexOf(r) : "*=" === n ? r && -1 < t.indexOf(r) : "$=" === n ? r && t.slice(-r.length) === r : "~=" === n ? -1 < (" " + t.replace(B, " ") + " ").indexOf(r) : "|=" === n && (t === r || t.slice(0, r.length + 1) === r + "-")) 569 } 570 }, 571 CHILD: function(f, e, t, m, g) { 572 var v = "nth" !== f.slice(0, 3), 573 y = "last" !== f.slice(-4), 574 b = "of-type" === e; 575 return 1 === m && 0 === g ? function(e) { 576 return !!e.parentNode 577 } : function(e, t, i) { 578 var n, r, o, a, s, l, c = v !== y ? "nextSibling" : "previousSibling", 579 u = e.parentNode, 580 h = b && e.nodeName.toLowerCase(), 581 d = !i && !b, 582 p = !1; 583 if (u) { 584 if (v) { 585 for (; c;) { 586 for (a = e; a = a[c];) 587 if (b ? a.nodeName.toLowerCase() === h : 1 === a.nodeType) return !1; 588 l = c = "only" === f && !l && "nextSibling" 589 } 590 return !0 591 } 592 if (l = [y ? u.firstChild : u.lastChild], y && d) { 593 for (p = (s = (n = (r = (o = (a = u)[M] || (a[M] = {}))[a.uniqueID] || (o[a.uniqueID] = {}))[f] || [])[0] === S && n[1]) && n[2], a = s && u.childNodes[s]; a = ++s && a && a[c] || (p = s = 0) || l.pop();) 594 if (1 === a.nodeType && ++p && a === e) { 595 r[f] = [S, s, p]; 596 break 597 } 598 } else if (d && (p = s = (n = (r = (o = (a = e)[M] || (a[M] = {}))[a.uniqueID] || (o[a.uniqueID] = {}))[f] || [])[0] === S && n[1]), !1 === p) 599 for (; 600 (a = ++s && a && a[c] || (p = s = 0) || l.pop()) && ((b ? a.nodeName.toLowerCase() !== h : 1 !== a.nodeType) || !++p || (d && ((r = (o = a[M] || (a[M] = {}))[a.uniqueID] || (o[a.uniqueID] = {}))[f] = [S, p]), a !== e));); 601 return (p -= g) === m || p % m == 0 && 0 <= p / m 602 } 603 } 604 }, 605 PSEUDO: function(e, o) { 606 var t, a = w.pseudos[e] || w.setFilters[e.toLowerCase()] || oe.error("unsupported pseudo: " + e); 607 return a[M] ? a(o) : 1 < a.length ? (t = [e, e, "", o], w.setFilters.hasOwnProperty(e.toLowerCase()) ? se(function(e, t) { 608 for (var i, n = a(e, o), r = n.length; r--;) e[i = D(e, n[r])] = !(t[i] = n[r]) 609 }) : function(e) { 610 return a(e, 0, t) 611 }) : a 612 } 613 }, 614 pseudos: { 615 not: se(function(e) { 616 var n = [], 617 r = [], 618 s = h(e.replace(H, "$1")); 619 return s[M] ? se(function(e, t, i, n) { 620 for (var r, o = s(e, null, n, []), a = e.length; a--;)(r = o[a]) && (e[a] = !(t[a] = r)) 621 }) : function(e, t, i) { 622 return n[0] = e, s(n, null, i, r), n[0] = null, !r.pop() 623 } 624 }), 625 has: se(function(t) { 626 return function(e) { 627 return 0 < oe(t, e).length 628 } 629 }), 630 contains: se(function(t) { 631 return t = t.replace(K, ee), 632 function(e) { 633 return -1 < (e.textContent || e.innerText || o(e)).indexOf(t) 634 } 635 }), 636 lang: se(function(i) { 637 return W.test(i || "") || oe.error("unsupported lang: " + i), i = i.replace(K, ee).toLowerCase(), 638 function(e) { 639 var t; 640 do { 641 if (t = E ? e.lang : e.getAttribute("xml:lang") || e.getAttribute("lang")) return (t = t.toLowerCase()) === i || 0 === t.indexOf(i + "-") 642 } while ((e = e.parentNode) && 1 === e.nodeType); 643 return !1 644 } 645 }), 646 target: function(e) { 647 var t = i.location && i.location.hash; 648 return t && t.slice(1) === e.id 649 }, 650 root: function(e) { 651 return e === a 652 }, 653 focus: function(e) { 654 return e === T.activeElement && (!T.hasFocus || T.hasFocus()) && !!(e.type || e.href || ~e.tabIndex) 655 }, 656 enabled: pe(!1), 657 disabled: pe(!0), 658 checked: function(e) { 659 var t = e.nodeName.toLowerCase(); 660 return "input" === t && !!e.checked || "option" === t && !!e.selected 661 }, 662 selected: function(e) { 663 return e.parentNode && e.parentNode.selectedIndex, !0 === e.selected 664 }, 665 empty: function(e) { 666 for (e = e.firstChild; e; e = e.nextSibling) 667 if (e.nodeType < 6) return !1; 668 return !0 669 }, 670 parent: function(e) { 671 return !w.pseudos.empty(e) 672 }, 673 header: function(e) { 674 return Y.test(e.nodeName) 675 }, 676 input: function(e) { 677 return X.test(e.nodeName) 678 }, 679 button: function(e) { 680 var t = e.nodeName.toLowerCase(); 681 return "input" === t && "button" === e.type || "button" === t 682 }, 683 text: function(e) { 684 var t; 685 return "input" === e.nodeName.toLowerCase() && "text" === e.type && (null == (t = e.getAttribute("type")) || "text" === t.toLowerCase()) 686 }, 687 first: fe(function() { 688 return [0] 689 }), 690 last: fe(function(e, t) { 691 return [t - 1] 692 }), 693 eq: fe(function(e, t, i) { 694 return [i < 0 ? i + t : i] 695 }), 696 even: fe(function(e, t) { 697 for (var i = 0; i < t; i += 2) e.push(i); 698 return e 699 }), 700 odd: fe(function(e, t) { 701 for (var i = 1; i < t; i += 2) e.push(i); 702 return e 703 }), 704 lt: fe(function(e, t, i) { 705 for (var n = i < 0 ? i + t : i; 0 <= --n;) e.push(n); 706 return e 707 }), 708 gt: fe(function(e, t, i) { 709 for (var n = i < 0 ? i + t : i; ++n < t;) e.push(n); 710 return e 711 }) 712 } 713 }).pseudos.nth = w.pseudos.eq, { 714 radio: !0, 715 checkbox: !0, 716 file: !0, 717 password: !0, 718 image: !0 719 }) w.pseudos[e] = he(e); 720 for (e in { 721 submit: !0, 722 reset: !0 723 }) w.pseudos[e] = de(e); 724 725 function ge() {} 726 727 function ve(e) { 728 for (var t = 0, i = e.length, n = ""; t < i; t++) n += e[t].value; 729 return n 730 } 731 732 function ye(s, e, t) { 733 var l = e.dir, 734 c = e.next, 735 u = c || l, 736 h = t && "parentNode" === u, 737 d = n++; 738 return e.first ? function(e, t, i) { 739 for (; e = e[l];) 740 if (1 === e.nodeType || h) return s(e, t, i); 741 return !1 742 } : function(e, t, i) { 743 var n, r, o, a = [S, d]; 744 if (i) { 745 for (; e = e[l];) 746 if ((1 === e.nodeType || h) && s(e, t, i)) return !0 747 } else 748 for (; e = e[l];) 749 if (1 === e.nodeType || h) 750 if (r = (o = e[M] || (e[M] = {}))[e.uniqueID] || (o[e.uniqueID] = {}), c && c === e.nodeName.toLowerCase()) e = e[l] || e; 751 else { 752 if ((n = r[u]) && n[0] === S && n[1] === d) return a[2] = n[2]; 753 if ((r[u] = a)[2] = s(e, t, i)) return !0 754 } return !1 755 } 756 } 757 758 function be(r) { 759 return 1 < r.length ? function(e, t, i) { 760 for (var n = r.length; n--;) 761 if (!r[n](e, t, i)) return !1; 762 return !0 763 } : r[0] 764 } 765 766 function we(e, t, i, n, r) { 767 for (var o, a = [], s = 0, l = e.length, c = null != t; s < l; s++)(o = e[s]) && (i && !i(o, n, r) || (a.push(o), c && t.push(s))); 768 return a 769 } 770 771 function xe(p, f, m, g, v, e) { 772 return g && !g[M] && (g = xe(g)), v && !v[M] && (v = xe(v, e)), se(function(e, t, i, n) { 773 var r, o, a, s = [], 774 l = [], 775 c = t.length, 776 u = e || function(e, t, i) { 777 for (var n = 0, r = t.length; n < r; n++) oe(e, t[n], i); 778 return i 779 }(f || "*", i.nodeType ? [i] : i, []), 780 h = !p || !e && f ? u : we(u, s, p, i, n), 781 d = m ? v || (e ? p : c || g) ? [] : t : h; 782 if (m && m(h, d, i, n), g) 783 for (r = we(d, l), g(r, [], i, n), o = r.length; o--;)(a = r[o]) && (d[l[o]] = !(h[l[o]] = a)); 784 if (e) { 785 if (v || p) { 786 if (v) { 787 for (r = [], o = d.length; o--;)(a = d[o]) && r.push(h[o] = a); 788 v(null, d = [], r, n) 789 } 790 for (o = d.length; o--;)(a = d[o]) && -1 < (r = v ? D(e, a) : s[o]) && (e[r] = !(t[r] = a)) 791 } 792 } else d = we(d === t ? d.splice(c, d.length) : d), v ? v(null, t, d, n) : k.apply(t, d) 793 }) 794 } 795 796 function _e(e) { 797 for (var r, t, i, n = e.length, o = w.relative[e[0].type], a = o || w.relative[" "], s = o ? 1 : 0, l = ye(function(e) { 798 return e === r 799 }, a, !0), c = ye(function(e) { 800 return -1 < D(r, e) 801 }, a, !0), u = [function(e, t, i) { 802 var n = !o && (i || t !== x) || ((r = t).nodeType ? l(e, t, i) : c(e, t, i)); 803 return r = null, n 804 }]; s < n; s++) 805 if (t = w.relative[e[s].type]) u = [ye(be(u), t)]; 806 else { 807 if ((t = w.filter[e[s].type].apply(null, e[s].matches))[M]) { 808 for (i = ++s; i < n && !w.relative[e[i].type]; i++); 809 return xe(1 < s && be(u), 1 < s && ve(e.slice(0, s - 1).concat({ 810 value: " " === e[s - 2].type ? "*" : "" 811 })).replace(H, "$1"), t, s < i && _e(e.slice(s, i)), i < n && _e(e = e.slice(i)), i < n && ve(e)) 812 } 813 u.push(t) 814 } 815 return be(u) 816 } 817 return ge.prototype = w.filters = w.pseudos, w.setFilters = new ge, f = oe.tokenize = function(e, t) { 818 var i, n, r, o, a, s, l, c = b[e + " "]; 819 if (c) return t ? 0 : c.slice(0); 820 for (a = e, s = [], l = w.preFilter; a;) { 821 for (o in i && !(n = $.exec(a)) || (n && (a = a.slice(n[0].length) || a), s.push(r = [])), i = !1, (n = j.exec(a)) && (i = n.shift(), r.push({ 822 value: i, 823 type: n[0].replace(H, " ") 824 }), a = a.slice(i.length)), w.filter) !(n = q[o].exec(a)) || l[o] && !(n = l[o](n)) || (i = n.shift(), r.push({ 825 value: i, 826 type: o, 827 matches: n 828 }), a = a.slice(i.length)); 829 if (!i) break 830 } 831 return t ? a.length : a ? oe.error(e) : b(e, s).slice(0) 832 }, h = oe.compile = function(e, t) { 833 var i, g, v, y, b, n, r = [], 834 o = [], 835 a = C[e + " "]; 836 if (!a) { 837 for (t || (t = f(e)), i = t.length; i--;)(a = _e(t[i]))[M] ? r.push(a) : o.push(a); 838 (a = C(e, (g = o, v = r, y = 0 < v.length, b = 0 < g.length, n = function(e, t, i, n, r) { 839 var o, a, s, l = 0, 840 c = "0", 841 u = e && [], 842 h = [], 843 d = x, 844 p = e || b && w.find.TAG("*", r), 845 f = S += null == d ? 1 : Math.random() || .1, 846 m = p.length; 847 for (r && (x = t === T || t || r); c !== m && null != (o = p[c]); c++) { 848 if (b && o) { 849 for (a = 0, t || o.ownerDocument === T || (_(o), i = !E); s = g[a++];) 850 if (s(o, t || T, i)) { 851 n.push(o); 852 break 853 } 854 r && (S = f) 855 } 856 y && ((o = !s && o) && l--, e && u.push(o)) 857 } 858 if (l += c, y && c !== l) { 859 for (a = 0; s = v[a++];) s(u, h, t, i); 860 if (e) { 861 if (0 < l) 862 for (; c--;) u[c] || h[c] || (h[c] = L.call(n)); 863 h = we(h) 864 } 865 k.apply(n, h), r && !e && 0 < h.length && 1 < l + v.length && oe.uniqueSort(n) 866 } 867 return r && (S = f, x = d), u 868 }, y ? se(n) : n))).selector = e 869 } 870 return a 871 }, m = oe.select = function(e, t, i, n) { 872 var r, o, a, s, l, c = "function" == typeof e && e, 873 u = !n && f(e = c.selector || e); 874 if (i = i || [], 1 === u.length) { 875 if (2 < (o = u[0] = u[0].slice(0)).length && "ID" === (a = o[0]).type && 9 === t.nodeType && E && w.relative[o[1].type]) { 876 if (!(t = (w.find.ID(a.matches[0].replace(K, ee), t) || [])[0])) return i; 877 c && (t = t.parentNode), e = e.slice(o.shift().value.length) 878 } 879 for (r = q.needsContext.test(e) ? 0 : o.length; r-- && (a = o[r], !w.relative[s = a.type]);) 880 if ((l = w.find[s]) && (n = l(a.matches[0].replace(K, ee), J.test(o[0].type) && me(t.parentNode) || t))) { 881 if (o.splice(r, 1), !(e = n.length && ve(o))) return k.apply(i, n), i; 882 break 883 } 884 } 885 return (c || h(e, u))(n, t, !E, i, !t || J.test(e) && me(t.parentNode) || t), i 886 }, p.sortStable = M.split("").sort(A).join("") === M, p.detectDuplicates = !!c, _(), p.sortDetached = le(function(e) { 887 return 1 & e.compareDocumentPosition(T.createElement("fieldset")) 888 }), le(function(e) { 889 return e.innerHTML = "<a href='#'></a>", "#" === e.firstChild.getAttribute("href") 890 }) || ce("type|href|height|width", function(e, t, i) { 891 if (!i) return e.getAttribute(t, "type" === t.toLowerCase() ? 1 : 2) 892 }), p.attributes && le(function(e) { 893 return e.innerHTML = "<input/>", e.firstChild.setAttribute("value", ""), "" === e.firstChild.getAttribute("value") 894 }) || ce("value", function(e, t, i) { 895 if (!i && "input" === e.nodeName.toLowerCase()) return e.defaultValue 896 }), le(function(e) { 897 return null == e.getAttribute("disabled") 898 }) || ce(I, function(e, t, i) { 899 var n; 900 if (!i) return !0 === e[t] ? t.toLowerCase() : (n = e.getAttributeNode(t)) && n.specified ? n.value : null 901 }), oe 902 }(T); 903 M.find = p, M.expr = p.selectors, M.expr[":"] = M.expr.pseudos, M.uniqueSort = M.unique = p.uniqueSort, M.text = p.getText, M.isXMLDoc = p.isXML, M.contains = p.contains, M.escapeSelector = p.escape; 904 var f = function(e, t, i) { 905 for (var n = [], r = void 0 !== i; 906 (e = e[t]) && 9 !== e.nodeType;) 907 if (1 === e.nodeType) { 908 if (r && M(e).is(i)) break; 909 n.push(e) 910 } 911 return n 912 }, 913 _ = function(e, t) { 914 for (var i = []; e; e = e.nextSibling) 1 === e.nodeType && e !== t && i.push(e); 915 return i 916 }, 917 S = M.expr.match.needsContext; 918 919 function C(e, t) {
vendor: 10,319 bytes, lines 920-1176
920 return e.nodeName && e.nodeName.toLowerCase() === t.toLowerCase() 921 } 922 var A = /^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i; 923 924 function R(e, i, n) { 925 return y(i) ? M.grep(e, function(e, t) { 926 return !!i.call(e, t, e) !== n 927 }) : i.nodeType ? M.grep(e, function(e) { 928 return e === i !== n 929 }) : "string" != typeof i ? M.grep(e, function(e) { 930 return -1 < r.call(i, e) !== n 931 }) : M.filter(i, e, n) 932 } 933 M.filter = function(e, t, i) { 934 var n = t[0]; 935 return i && (e = ":not(" + e + ")"), 1 === t.length && 1 === n.nodeType ? M.find.matchesSelector(n, e) ? [n] : [] : M.find.matches(e, M.grep(t, function(e) { 936 return 1 === e.nodeType 937 })) 938 }, M.fn.extend({ 939 find: function(e) { 940 var t, i, n = this.length, 941 r = this; 942 if ("string" != typeof e) return this.pushStack(M(e).filter(function() { 943 for (t = 0; t < n; t++) 944 if (M.contains(r[t], this)) return !0 945 })); 946 for (i = this.pushStack([]), t = 0; t < n; t++) M.find(e, r[t], i); 947 return 1 < n ? M.uniqueSort(i) : i 948 }, 949 filter: function(e) { 950 return this.pushStack(R(this, e || [], !1)) 951 }, 952 not: function(e) { 953 return this.pushStack(R(this, e || [], !0)) 954 }, 955 is: function(e) { 956 return !!R(this, "string" == typeof e && S.test(e) ? M(e) : e || [], !1).length 957 } 958 }); 959 var L, P = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/; 960 (M.fn.init = function(e, t, i) { 961 var n, r; 962 if (!e) return this; 963 if (i = i || L, "string" == typeof e) { 964 if (!(n = "<" === e[0] && ">" === e[e.length - 1] && 3 <= e.length ? [null, e, null] : P.exec(e)) || !n[1] && t) return !t || t.jquery ? (t || i).find(e) : this.constructor(t).find(e); 965 if (n[1]) { 966 if (t = t instanceof M ? t[0] : t, M.merge(this, M.parseHTML(n[1], t && t.nodeType ? t.ownerDocument || t : E, !0)), A.test(n[1]) && M.isPlainObject(t)) 967 for (n in t) y(this[n]) ? this[n](t[n]) : this.attr(n, t[n]); 968 return this 969 } 970 return (r = E.getElementById(n[2])) && (this[0] = r, this.length = 1), this 971 } 972 return e.nodeType ? (this[0] = e, this.length = 1, this) : y(e) ? void 0 !== i.ready ? i.ready(e) : e(M) : M.makeArray(e, this) 973 }).prototype = M.fn, L = M(E); 974 var k = /^(?:parents|prev(?:Until|All))/, 975 O = { 976 children: !0, 977 contents: !0, 978 next: !0, 979 prev: !0 980 }; 981 982 function D(e, t) { 983 for (; 984 (e = e[t]) && 1 !== e.nodeType;); 985 return e 986 } 987 M.fn.extend({ 988 has: function(e) { 989 var t = M(e, this), 990 i = t.length; 991 return this.filter(function() { 992 for (var e = 0; e < i; e++) 993 if (M.contains(this, t[e])) return !0 994 }) 995 }, 996 closest: function(e, t) { 997 var i, n = 0, 998 r = this.length, 999 o = [], 1000 a = "string" != typeof e && M(e); 1001 if (!S.test(e)) 1002 for (; n < r; n++) 1003 for (i = this[n]; i && i !== t; i = i.parentNode) 1004 if (i.nodeType < 11 && (a ? -1 < a.index(i) : 1 === i.nodeType && M.find.matchesSelector(i, e))) { 1005 o.push(i); 1006 break 1007 } 1008 return this.pushStack(1 < o.length ? M.uniqueSort(o) : o) 1009 }, 1010 index: function(e) { 1011 return e ? "string" == typeof e ? r.call(M(e), this[0]) : r.call(this, e.jquery ? e[0] : e) : this[0] && this[0].parentNode ? this.first().prevAll().length : -1 1012 }, 1013 add: function(e, t) { 1014 return this.pushStack(M.uniqueSort(M.merge(this.get(), M(e, t)))) 1015 }, 1016 addBack: function(e) { 1017 return this.add(null == e ? this.prevObject : this.prevObject.filter(e)) 1018 } 1019 }), M.each({ 1020 parent: function(e) { 1021 var t = e.parentNode; 1022 return t && 11 !== t.nodeType ? t : null 1023 }, 1024 parents: function(e) { 1025 return f(e, "parentNode") 1026 }, 1027 parentsUntil: function(e, t, i) { 1028 return f(e, "parentNode", i) 1029 }, 1030 next: function(e) { 1031 return D(e, "nextSibling") 1032 }, 1033 prev: function(e) { 1034 return D(e, "previousSibling") 1035 }, 1036 nextAll: function(e) { 1037 return f(e, "nextSibling") 1038 }, 1039 prevAll: function(e) { 1040 return f(e, "previousSibling") 1041 }, 1042 nextUntil: function(e, t, i) { 1043 return f(e, "nextSibling", i) 1044 }, 1045 prevUntil: function(e, t, i) { 1046 return f(e, "previousSibling", i) 1047 }, 1048 siblings: function(e) { 1049 return _((e.parentNode || {}).firstChild, e) 1050 }, 1051 children: function(e) { 1052 return _(e.firstChild) 1053 }, 1054 contents: function(e) { 1055 return C(e, "iframe") ? e.contentDocument : (C(e, "template") && (e = e.content || e), M.merge([], e.childNodes)) 1056 } 1057 }, function(n, r) { 1058 M.fn[n] = function(e, t) { 1059 var i = M.map(this, r, e); 1060 return "Until" !== n.slice(-5) && (t = e), t && "string" == typeof t && (i = M.filter(t, i)), 1 < this.length && (O[n] || M.uniqueSort(i), k.test(n) && i.reverse()), this.pushStack(i) 1061 } 1062 }); 1063 var I = /[^\x20\t\r\n\f]+/g; 1064 1065 function z(e) { 1066 return e 1067 } 1068 1069 function N(e) { 1070 throw e 1071 } 1072 1073 function F(e, t, i, n) { 1074 var r; 1075 try { 1076 e && y(r = e.promise) ? r.call(e).done(t).fail(i) : e && y(r = e.then) ? r.call(e, t, i) : t.apply(void 0, [e].slice(n)) 1077 } catch (e) { 1078 i.apply(void 0, [e]) 1079 } 1080 } 1081 M.Callbacks = function(n) { 1082 var e, i; 1083 n = "string" == typeof n ? (e = n, i = {}, M.each(e.match(I) || [], function(e, t) { 1084 i[t] = !0 1085 }), i) : M.extend({}, n); 1086 var r, t, o, a, s = [], 1087 l = [], 1088 c = -1, 1089 u = function() { 1090 for (a = a || n.once, o = r = !0; l.length; c = -1) 1091 for (t = l.shift(); ++c < s.length;) !1 === s[c].apply(t[0], t[1]) && n.stopOnFalse && (c = s.length, t = !1); 1092 n.memory || (t = !1), r = !1, a && (s = t ? [] : "") 1093 }, 1094 h = { 1095 add: function() { 1096 return s && (t && !r && (c = s.length - 1, l.push(t)), function i(e) { 1097 M.each(e, function(e, t) { 1098 y(t) ? n.unique && h.has(t) || s.push(t) : t && t.length && "string" !== x(t) && i(t) 1099 }) 1100 }(arguments), t && !r && u()), this 1101 }, 1102 remove: function() { 1103 return M.each(arguments, function(e, t) { 1104 for (var i; - 1 < (i = M.inArray(t, s, i));) s.splice(i, 1), i <= c && c-- 1105 }), this 1106 }, 1107 has: function(e) { 1108 return e ? -1 < M.inArray(e, s) : 0 < s.length 1109 }, 1110 empty: function() { 1111 return s && (s = []), this 1112 }, 1113 disable: function() { 1114 return a = l = [], s = t = "", this 1115 }, 1116 disabled: function() { 1117 return !s 1118 }, 1119 lock: function() { 1120 return a = l = [], t || r || (s = t = ""), this 1121 }, 1122 locked: function() { 1123 return !!a 1124 }, 1125 fireWith: function(e, t) { 1126 return a || (t = [e, (t = t || []).slice ? t.slice() : t], l.push(t), r || u()), this 1127 }, 1128 fire: function() { 1129 return h.fireWith(this, arguments), this 1130 }, 1131 fired: function() { 1132 return !!o 1133 } 1134 }; 1135 return h 1136 }, M.extend({ 1137 Deferred: function(e) { 1138 var o = [ 1139 ["notify", "progress", M.Callbacks("memory"), M.Callbacks("memory"), 2], 1140 ["resolve", "done", M.Callbacks("once memory"), M.Callbacks("once memory"), 0, "resolved"], 1141 ["reject", "fail", M.Callbacks("once memory"), M.Callbacks("once memory"), 1, "rejected"] 1142 ], 1143 r = "pending", 1144 a = { 1145 state: function() { 1146 return r 1147 }, 1148 always: function() { 1149 return s.done(arguments).fail(arguments), this 1150 }, 1151 catch: function(e) { 1152 return a.then(null, e) 1153 }, 1154 pipe: function() { 1155 var r = arguments; 1156 return M.Deferred(function(n) { 1157 M.each(o, function(e, t) { 1158 var i = y(r[t[4]]) && r[t[4]]; 1159 s[t[1]](function() { 1160 var e = i && i.apply(this, arguments); 1161 e && y(e.promise) ? e.promise().progress(n.notify).done(n.resolve).fail(n.reject) : n[t[0] + "With"](this, i ? [e] : arguments) 1162 }) 1163 }), r = null 1164 }).promise() 1165 }, 1166 then: function(t, i, n) { 1167 var l = 0; 1168 1169 function c(r, o, a, s) { 1170 return function() { 1171 var i = this, 1172 n = arguments, 1173 e = function() { 1174 var e, t; 1175 if (!(r < l)) { 1176 if ((e = a.apply(i, n)) === o.promise()) throw new TypeError("Thenable self
vendor: 22,992 bytes, lines 1176-1663
1176-resolution"); 1177 t = e && ("object" == typeof e || "function" == typeof e) && e.then, y(t) ? s ? t.call(e, c(l, o, z, s), c(l, o, N, s)) : (l++, t.call(e, c(l, o, z, s), c(l, o, N, s), c(l, o, z, o.notifyWith))) : (a !== z && (i = void 0, n = [e]), (s || o.resolveWith)(i, n)) 1178 } 1179 }, 1180 t = s ? e : function() { 1181 try { 1182 e() 1183 } catch (e) { 1184 M.Deferred.exceptionHook && M.Deferred.exceptionHook(e, t.stackTrace), l <= r + 1 && (a !== N && (i = void 0, n = [e]), o.rejectWith(i, n)) 1185 } 1186 }; 1187 r ? t() : (M.Deferred.getStackHook && (t.stackTrace = M.Deferred.getStackHook()), T.setTimeout(t)) 1188 } 1189 } 1190 return M.Deferred(function(e) { 1191 o[0][3].add(c(0, e, y(n) ? n : z, e.notifyWith)), o[1][3].add(c(0, e, y(t) ? t : z)), o[2][3].add(c(0, e, y(i) ? i : N)) 1192 }).promise() 1193 }, 1194 promise: function(e) { 1195 return null != e ? M.extend(e, a) : a 1196 } 1197 }, 1198 s = {}; 1199 return M.each(o, function(e, t) { 1200 var i = t[2], 1201 n = t[5]; 1202 a[t[1]] = i.add, n && i.add(function() { 1203 r = n 1204 }, o[3 - e][2].disable, o[3 - e][3].disable, o[0][2].lock, o[0][3].lock), i.add(t[3].fire), s[t[0]] = function() { 1205 return s[t[0] + "With"](this === s ? void 0 : this, arguments), this 1206 }, s[t[0] + "With"] = i.fireWith 1207 }), a.promise(s), e && e.call(s, s), s 1208 }, 1209 when: function(e) { 1210 var i = arguments.length, 1211 t = i, 1212 n = Array(t), 1213 r = s.call(arguments), 1214 o = M.Deferred(), 1215 a = function(t) { 1216 return function(e) { 1217 n[t] = this, r[t] = 1 < arguments.length ? s.call(arguments) : e, --i || o.resolveWith(n, r) 1218 } 1219 }; 1220 if (i <= 1 && (F(e, o.done(a(t)).resolve, o.reject, !i), "pending" === o.state() || y(r[t] && r[t].then))) return o.then(); 1221 for (; t--;) F(r[t], a(t), o.reject); 1222 return o.promise() 1223 } 1224 }); 1225 var U = /^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/; 1226 M.Deferred.exceptionHook = function(e, t) { 1227 T.console && T.console.warn && e && U.test(e.name) && T.console.warn("jQuery.Deferred exception: " + e.message, e.stack, t) 1228 }, M.readyException = function(e) { 1229 T.setTimeout(function() { 1230 throw e 1231 }) 1232 }; 1233 var B = M.Deferred(); 1234 1235 function H() { 1236 E.removeEventListener("DOMContentLoaded", H), T.removeEventListener("load", H), M.ready() 1237 } 1238 M.fn.ready = function(e) { 1239 return B.then(e).catch(function(e) { 1240 M.readyException(e) 1241 }), this 1242 }, M.extend({ 1243 isReady: !1, 1244 readyWait: 1, 1245 ready: function(e) { 1246 (!0 === e ? --M.readyWait : M.isReady) || ((M.isReady = !0) !== e && 0 < --M.readyWait || B.resolveWith(E, [M])) 1247 } 1248 }), M.ready.then = B.then, "complete" === E.readyState || "loading" !== E.readyState && !E.documentElement.doScroll ? T.setTimeout(M.ready) : (E.addEventListener("DOMContentLoaded", H), T.addEventListener("load", H)); 1249 var $ = function(e, t, i, n, r, o, a) { 1250 var s = 0, 1251 l = e.length, 1252 c = null == i; 1253 if ("object" === x(i)) 1254 for (s in r = !0, i) $(e, t, s, i[s], !0, o, a); 1255 else if (void 0 !== n && (r = !0, y(n) || (a = !0), c && (a ? (t.call(e, n), t = null) : (c = t, t = function(e, t, i) { 1256 return c.call(M(e), i) 1257 })), t)) 1258 for (; s < l; s++) t(e[s], i, a ? n : n.call(e[s], s, t(e[s], i))); 1259 return r ? e : c ? t.call(e) : l ? t(e[0], i) : o 1260 }, 1261 j = /^-ms-/, 1262 G = /-([a-z])/g; 1263 1264 function V(e, t) { 1265 return t.toUpperCase() 1266 } 1267 1268 function W(e) { 1269 return e.replace(j, "ms-").replace(G, V) 1270 } 1271 var q = function(e) { 1272 return 1 === e.nodeType || 9 === e.nodeType || !+e.nodeType 1273 }; 1274 1275 function X() { 1276 this.expando = M.expando + X.uid++ 1277 } 1278 X.uid = 1, X.prototype = { 1279 cache: function(e) { 1280 var t = e[this.expando]; 1281 return t || (t = {}, q(e) && (e.nodeType ? e[this.expando] = t : Object.defineProperty(e, this.expando, { 1282 value: t, 1283 configurable: !0 1284 }))), t 1285 }, 1286 set: function(e, t, i) { 1287 var n, r = this.cache(e); 1288 if ("string" == typeof t) r[W(t)] = i; 1289 else 1290 for (n in t) r[W(n)] = t[n]; 1291 return r 1292 }, 1293 get: function(e, t) { 1294 return void 0 === t ? this.cache(e) : e[this.expando] && e[this.expando][W(t)] 1295 }, 1296 access: function(e, t, i) { 1297 return void 0 === t || t && "string" == typeof t && void 0 === i ? this.get(e, t) : (this.set(e, t, i), void 0 !== i ? i : t) 1298 }, 1299 remove: function(e, t) { 1300 var i, n = e[this.expando]; 1301 if (void 0 !== n) { 1302 if (void 0 !== t) { 1303 i = (t = Array.isArray(t) ? t.map(W) : (t = W(t)) in n ? [t] : t.match(I) || []).length; 1304 for (; i--;) delete n[t[i]] 1305 }(void 0 === t || M.isEmptyObject(n)) && (e.nodeType ? e[this.expando] = void 0 : delete e[this.expando]) 1306 } 1307 }, 1308 hasData: function(e) { 1309 var t = e[this.expando]; 1310 return void 0 !== t && !M.isEmptyObject(t) 1311 } 1312 }; 1313 var Y = new X, 1314 Z = new X, 1315 Q = /^(?:\{[\w\W]*\}|\[[\w\W]*\])$/, 1316 J = /[A-Z]/g; 1317 1318 function K(e, t, i) { 1319 var n, r; 1320 if (void 0 === i && 1 === e.nodeType) 1321 if (n = "data-" + t.replace(J, "-$&").toLowerCase(), "string" == typeof(i = e.getAttribute(n))) { 1322 try { 1323 i = "true" === (r = i) || "false" !== r && ("null" === r ? null : r === +r + "" ? +r : Q.test(r) ? JSON.parse(r) : r) 1324 } catch (e) {} 1325 Z.set(e, t, i) 1326 } else i = void 0; 1327 return i 1328 } 1329 M.extend({ 1330 hasData: function(e) { 1331 return Z.hasData(e) || Y.hasData(e) 1332 }, 1333 data: function(e, t, i) { 1334 return Z.access(e, t, i) 1335 }, 1336 removeData: function(e, t) { 1337 Z.remove(e, t) 1338 }, 1339 _data: function(e, t, i) { 1340 return Y.access(e, t, i) 1341 }, 1342 _removeData: function(e, t) { 1343 Y.remove(e, t) 1344 } 1345 }), M.fn.extend({ 1346 data: function(i, e) { 1347 var t, n, r, o = this[0], 1348 a = o && o.attributes; 1349 if (void 0 === i) { 1350 if (this.length && (r = Z.get(o), 1 === o.nodeType && !Y.get(o, "hasDataAttrs"))) { 1351 for (t = a.length; t--;) a[t] && 0 === (n = a[t].name).indexOf("data-") && (n = W(n.slice(5)), K(o, n, r[n])); 1352 Y.set(o, "hasDataAttrs", !0) 1353 } 1354 return r 1355 } 1356 return "object" == typeof i ? this.each(function() { 1357 Z.set(this, i) 1358 }) : $(this, function(e) { 1359 var t; 1360 if (o && void 0 === e) { 1361 if (void 0 !== (t = Z.get(o, i))) return t; 1362 if (void 0 !== (t = K(o, i))) return t 1363 } else this.each(function() { 1364 Z.set(this, i, e) 1365 }) 1366 }, null, e, 1 < arguments.length, null, !0) 1367 }, 1368 removeData: function(e) { 1369 return this.each(function() { 1370 Z.remove(this, e) 1371 }) 1372 } 1373 }), M.extend({ 1374 queue: function(e, t, i) { 1375 var n; 1376 if (e) return t = (t || "fx") + "queue", n = Y.get(e, t), i && (!n || Array.isArray(i) ? n = Y.access(e, t, M.makeArray(i)) : n.push(i)), n || [] 1377 }, 1378 dequeue: function(e, t) { 1379 t = t || "fx"; 1380 var i = M.queue(e, t), 1381 n = i.length, 1382 r = i.shift(), 1383 o = M._queueHooks(e, t); 1384 "inprogress" === r && (r = i.shift(), n--), r && ("fx" === t && i.unshift("inprogress"), delete o.stop, r.call(e, function() { 1385 M.dequeue(e, t) 1386 }, o)), !n && o && o.empty.fire() 1387 }, 1388 _queueHooks: function(e, t) { 1389 var i = t + "queueHooks"; 1390 return Y.get(e, i) || Y.access(e, i, { 1391 empty: M.Callbacks("once memory").add(function() { 1392 Y.remove(e, [t + "queue", i]) 1393 }) 1394 }) 1395 } 1396 }), M.fn.extend({ 1397 queue: function(t, i) { 1398 var e = 2; 1399 return "string" != typeof t && (i = t, t = "fx", e--), arguments.length < e ? M.queue(this[0], t) : void 0 === i ? this : this.each(function() { 1400 var e = M.queue(this, t, i); 1401 M._queueHooks(this, t), "fx" === t && "inprogress" !== e[0] && M.dequeue(this, t) 1402 }) 1403 }, 1404 dequeue: function(e) { 1405 return this.each(function() { 1406 M.dequeue(this, e) 1407 }) 1408 }, 1409 clearQueue: function(e) { 1410 return this.queue(e || "fx", []) 1411 }, 1412 promise: function(e, t) { 1413 var i, n = 1, 1414 r = M.Deferred(), 1415 o = this, 1416 a = this.length, 1417 s = function() { 1418 --n || r.resolveWith(o, [o]) 1419 }; 1420 for ("string" != typeof e && (t = e, e = void 0), e = e || "fx"; a--;)(i = Y.get(o[a], e + "queueHooks")) && i.empty && (n++, i.empty.add(s)); 1421 return s(), r.promise(t) 1422 } 1423 }); 1424 var ee = /[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source, 1425 te = new RegExp("^(?:([+-])=|)(" + ee + ")([a-z%]*)$", "i"), 1426 ie = ["Top", "Right", "Bottom", "Left"], 1427 ne = function(e, t) { 1428 return "none" === (e = t || e).style.display || "" === e.style.display && M.contains(e.ownerDocument, e) && "none" === M.css(e, "display") 1429 }, 1430 re = function(e, t, i, n) { 1431 var r, o, a = {}; 1432 for (o in t) a[o] = e.style[o], e.style[o] = t[o]; 1433 for (o in r = i.apply(e, n || []), t) e.style[o] = a[o]; 1434 return r 1435 }; 1436 1437 function oe(e, t, i, n) { 1438 var r, o, a = 20, 1439 s = n ? function() { 1440 return n.cur() 1441 } : function() { 1442 return M.css(e, t, "") 1443 }, 1444 l = s(), 1445 c = i && i[3] || (M.cssNumber[t] ? "" : "px"), 1446 u = (M.cssNumber[t] || "px" !== c && +l) && te.exec(M.css(e, t)); 1447 if (u && u[3] !== c) { 1448 for (l /= 2, c = c || u[3], u = +l || 1; a--;) M.style(e, t, u + c), (1 - o) * (1 - (o = s() / l || .5)) <= 0 && (a = 0), u /= o; 1449 u *= 2, M.style(e, t, u + c), i = i || [] 1450 } 1451 return i && (u = +u || +l || 0, r = i[1] ? u + (i[1] + 1) * i[2] : +i[2], n && (n.unit = c, n.start = u, n.end = r)), r 1452 } 1453 var ae = {}; 1454 1455 function se(e, t) { 1456 for (var i, n, r = [], o = 0, a = e.length; o < a; o++)(n = e[o]).style && (i = n.style.display, t ? ("none" === i && (r[o] = Y.get(n, "display") || null, r[o] || (n.style.display = "")), "" === n.style.display && ne(n) && (r[o] = (h = c = l = void 0, c = (s = n).ownerDocument, u = s.nodeName, (h = ae[u]) || (l = c.body.appendChild(c.createElement(u)), h = M.css(l, "display"), l.parentNode.removeChild(l), "none" === h && (h = "block"), ae[u] = h)))) : "none" !== i && (r[o] = "none", Y.set(n, "display", i))); 1457 var s, l, c, u, h; 1458 for (o = 0; o < a; o++) null != r[o] && (e[o].style.display = r[o]); 1459 return e 1460 } 1461 M.fn.extend({ 1462 show: function() { 1463 return se(this, !0) 1464 }, 1465 hide: function() { 1466 return se(this) 1467 }, 1468 toggle: function(e) { 1469 return "boolean" == typeof e ? e ? this.show() : this.hide() : this.each(function() { 1470 ne(this) ? M(this).show() : M(this).hide() 1471 }) 1472 } 1473 }); 1474 var le = /^(?:checkbox|radio)$/i, 1475 ce = /<([a-z][^\/\0>\x20\t\r\n\f]+)/i, 1476 ue = /^$|^module$|\/(?:java|ecma)script/i, 1477 he = { 1478 option: [1, "<select multiple='multiple'>", "</select>"], 1479 thead: [1, "<table>", "</table>"], 1480 col: [2, "<table><colgroup>", "</colgroup></table>"], 1481 tr: [2, "<table><tbody>", "</tbody></table>"], 1482 td: [3, "<table><tbody><tr>", "</tr></tbody></table>"], 1483 _default: [0, "", ""] 1484 }; 1485 1486 function de(e, t) { 1487 var i; 1488 return i = void 0 !== e.getElementsByTagName ? e.getElementsByTagName(t || "*") : void 0 !== e.querySelectorAll ? e.querySelectorAll(t || "*") : [], void 0 === t || t && C(e, t) ? M.merge([e], i) : i 1489 } 1490 1491 function pe(e, t) { 1492 for (var i = 0, n = e.length; i < n; i++) Y.set(e[i], "globalEval", !t || Y.get(t[i], "globalEval")) 1493 } 1494 he.optgroup = he.option, he.tbody = he.tfoot = he.colgroup = he.caption = he.thead, he.th = he.td; 1495 var fe, me, ge = /<|&#?\w+;/; 1496 1497 function ve(e, t, i, n, r) { 1498 for (var o, a, s, l, c, u, h = t.createDocumentFragment(), d = [], p = 0, f = e.length; p < f; p++) 1499 if ((o = e[p]) || 0 === o) 1500 if ("object" === x(o)) M.merge(d, o.nodeType ? [o] : o); 1501 else if (ge.test(o)) { 1502 for (a = a || h.appendChild(t.createElement("div")), s = (ce.exec(o) || ["", ""])[1].toLowerCase(), l = he[s] || he._default, a.innerHTML = l[1] + M.htmlPrefilter(o) + l[2], u = l[0]; u--;) a = a.lastChild; 1503 M.merge(d, a.childNodes), (a = h.firstChild).textContent = "" 1504 } else d.push(t.createTextNode(o)); 1505 for (h.textContent = "", p = 0; o = d[p++];) 1506 if (n && -1 < M.inArray(o, n)) r && r.push(o); 1507 else if (c = M.contains(o.ownerDocument, o), a = de(h.appendChild(o), "script"), c && pe(a), i) 1508 for (u = 0; o = a[u++];) ue.test(o.type || "") && i.push(o); 1509 return h 1510 } 1511 fe = E.createDocumentFragment().appendChild(E.createElement("div")), (me = E.createElement("input")).setAttribute("type", "radio"), me.setAttribute("checked", "checked"), me.setAttribute("name", "t"), fe.appendChild(me), v.checkClone = fe.cloneNode(!0).cloneNode(!0).lastChild.checked, fe.innerHTML = "<textarea>x</textarea>", v.noCloneChecked = !!fe.cloneNode(!0).lastChild.defaultValue; 1512 var ye = E.documentElement, 1513 be = /^key/, 1514 we = /^(?:mouse|pointer|contextmenu|drag|drop)|click/, 1515 xe = /^([^.]*)(?:\.(.+)|)/; 1516 1517 function _e() { 1518 return !0 1519 } 1520 1521 function Te() { 1522 return !1 1523 } 1524 1525 function Ee() { 1526 try { 1527 return E.activeElement 1528 } catch (e) {} 1529 } 1530 1531 function Me(e, t, i, n, r, o) { 1532 var a, s; 1533 if ("object" == typeof t) { 1534 for (s in "string" != typeof i && (n = n || i, i = void 0), t) Me(e, s, i, n, t[s], o); 1535 return e 1536 } 1537 if (null == n && null == r ? (r = i, n = i = void 0) : null == r && ("string" == typeof i ? (r = n, n = void 0) : (r = n, n = i, i = void 0)), !1 === r) r = Te; 1538 else if (!r) return e; 1539 return 1 === o && (a = r, (r = function(e) { 1540 return M().off(e), a.apply(this, arguments) 1541 }).guid = a.guid || (a.guid = M.guid++)), e.each(function() { 1542 M.event.add(this, t, r, n, i) 1543 }) 1544 } 1545 M.event = { 1546 global: {}, 1547 add: function(t, e, i, n, r) { 1548 var o, a, s, l, c, u, h, d, p, f, m, g = Y.get(t); 1549 if (g) 1550 for (i.handler && (i = (o = i).handler, r = o.selector), r && M.find.matchesSelector(ye, r), i.guid || (i.guid = M.guid++), (l = g.events) || (l = g.events = {}), (a = g.handle) || (a = g.handle = function(e) { 1551 return void 0 !== M && M.event.triggered !== e.type ? M.event.dispatch.apply(t, arguments) : void 0 1552 }), c = (e = (e || "").match(I) || [""]).length; c--;) p = m = (s = xe.exec(e[c]) || [])[1], f = (s[2] || "").split(".").sort(), p && (h = M.event.special[p] || {}, p = (r ? h.delegateType : h.bindType) || p, h = M.event.special[p] || {}, u = M.extend({ 1553 type: p, 1554 origType: m, 1555 data: n, 1556 handler: i, 1557 guid: i.guid, 1558 selector: r, 1559 needsContext: r && M.expr.match.needsContext.test(r), 1560 namespace: f.join(".") 1561 }, o), (d = l[p]) || ((d = l[p] = []).delegateCount = 0, h.setup && !1 !== h.setup.call(t, n, f, a) || t.addEventListener && t.addEventListener(p, a)), h.add && (h.add.call(t, u), u.handler.guid || (u.handler.guid = i.guid)), r ? d.splice(d.delegateCount++, 0, u) : d.push(u), M.event.global[p] = !0) 1562 }, 1563 remove: function(e, t, i, n, r) { 1564 var o, a, s, l, c, u, h, d, p, f, m, g = Y.hasData(e) && Y.get(e); 1565 if (g && (l = g.events)) { 1566 for (c = (t = (t || "").match(I) || [""]).length; c--;) 1567 if (p = m = (s = xe.exec(t[c]) || [])[1], f = (s[2] || "").split(".").sort(), p) { 1568 for (h = M.event.special[p] || {}, d = l[p = (n ? h.delegateType : h.bindType) || p] || [], s = s[2] && new RegExp("(^|\\.)" + f.join("\\.(?:.*\\.|)") + "(\\.|$)"), a = o = d.length; o--;) u = d[o], !r && m !== u.origType || i && i.guid !== u.guid || s && !s.test(u.namespace) || n && n !== u.selector && ("**" !== n || !u.selector) || (d.splice(o, 1), u.selector && d.delegateCount--, h.remove && h.remove.call(e, u)); 1569 a && !d.length && (h.teardown && !1 !== h.teardown.call(e, f, g.handle) || M.removeEvent(e, p, g.handle), delete l[p]) 1570 } else 1571 for (p in l) M.event.remove(e, p + t[c], i, n, !0); 1572 M.isEmptyObject(l) && Y.remove(e, "handle events") 1573 } 1574 }, 1575 dispatch: function(e) { 1576 var t, i, n, r, o, a, s = M.event.fix(e), 1577 l = new Array(arguments.length), 1578 c = (Y.get(this, "events") || {})[s.type] || [], 1579 u = M.event.special[s.type] || {}; 1580 for (l[0] = s, t = 1; t < arguments.length; t++) l[t] = arguments[t]; 1581 if (s.delegateTarget = this, !u.preDispatch || !1 !== u.preDispatch.call(this, s)) { 1582 for (a = M.event.handlers.call(this, s, c), t = 0; 1583 (r = a[t++]) && !s.isPropagationStopped();) 1584 for (s.currentTarget = r.elem, i = 0; 1585 (o = r.handlers[i++]) && !s.isImmediatePropagationStopped();) s.rnamespace && !s.rnamespace.test(o.namespace) || (s.handleObj = o, s.data = o.data, void 0 !== (n = ((M.event.special[o.origType] || {}).handle || o.handler).apply(r.elem, l)) && !1 === (s.result = n) && (s.preventDefault(), s.stopPropagation())); 1586 return u.postDispatch && u.postDispatch.call(this, s), s.result 1587 } 1588 }, 1589 handlers: function(e, t) { 1590 var i, n, r, o, a, s = [], 1591 l = t.delegateCount, 1592 c = e.target; 1593 if (l && c.nodeType && !("click" === e.type && 1 <= e.button)) 1594 for (; c !== this; c = c.parentNode || this) 1595 if (1 === c.nodeType && ("click" !== e.type || !0 !== c.disabled)) { 1596 for (o = [], a = {}, i = 0; i < l; i++) void 0 === a[r = (n = t[i]).selector + " "] && (a[r] = n.needsContext ? -1 < M(r, this).index(c) : M.find(r, this, null, [c]).length), a[r] && o.push(n); 1597 o.length && s.push({ 1598 elem: c, 1599 handlers: o 1600 }) 1601 } 1602 return c = this, l < t.length && s.push({ 1603 elem: c, 1604 handlers: t.slice(l) 1605 }), s 1606 }, 1607 addProp: function(t, e) { 1608 Object.defineProperty(M.Event.prototype, t, { 1609 enumerable: !0, 1610 configurable: !0, 1611 get: y(e) ? function() { 1612 if (this.originalEvent) return e(this.originalEvent) 1613 } : function() { 1614 if (this.originalEvent) return this.originalEvent[t] 1615 }, 1616 set: function(e) { 1617 Object.defineProperty(this, t, { 1618 enumerable: !0, 1619 configurable: !0, 1620 writable: !0, 1621 value: e 1622 }) 1623 } 1624 }) 1625 }, 1626 fix: function(e) { 1627 return e[M.expando] ? e : new M.Event(e) 1628 }, 1629 special: { 1630 load: { 1631 noBubble: !0 1632 }, 1633 focus: { 1634 trigger: function() { 1635 if (this !== Ee() && this.focus) return this.focus(), !1 1636 }, 1637 delegateType: "focusin" 1638 }, 1639 blur: { 1640 trigger: function() { 1641 if (this === Ee() && this.blur) return this.blur(), !1 1642 }, 1643 delegateType: "focusout" 1644 }, 1645 click: { 1646 trigger: function() { 1647 if ("checkbox" === this.type && this.click && C(this, "input")) return this.click(), !1 1648 }, 1649 _default: function(e) { 1650 return C(e.target, "a") 1651 } 1652 }, 1653 beforeunload: { 1654 postDispatch: function(e) { 1655 void 0 !== e.result && e.originalEvent && (e.originalEvent.returnValue = e.result) 1656 } 1657 } 1658 } 1659 }, M.removeEvent = function(e, t, i) { 1660 e.removeEventListener && e.removeEventListener(t, i) 1661 }, M.Event = function(e, t) { 1662 if (!(this instanceof M.Event)) return new M.Event(e, t); 1663 e && e.type ? (this.originalEvent = e, this.type = e.type, this.isDefaultPrevented = e.defaultPrevented || void 0 === e.defaultPrevented && !1 === e.returnValue ? _e : Te, this.target = e.target && 3 === e.target.nodeType ? e.target.parentNode : e.target, this.currentTarget = e.currentTarget, this.relatedTarget = e.relatedTarget) : this.type = e, t && M.extend(this, t), this.timeStamp = e && e.t
vendor: 4,291 bytes, lines 1663-1782
1663imeStamp || Date.now(), this[M.expando] = !0 1664 }, M.Event.prototype = { 1665 constructor: M.Event, 1666 isDefaultPrevented: Te, 1667 isPropagationStopped: Te, 1668 isImmediatePropagationStopped: Te, 1669 isSimulated: !1, 1670 preventDefault: function() { 1671 var e = this.originalEvent; 1672 this.isDefaultPrevented = _e, e && !this.isSimulated && e.preventDefault() 1673 }, 1674 stopPropagation: function() { 1675 var e = this.originalEvent; 1676 this.isPropagationStopped = _e, e && !this.isSimulated && e.stopPropagation() 1677 }, 1678 stopImmediatePropagation: function() { 1679 var e = this.originalEvent; 1680 this.isImmediatePropagationStopped = _e, e && !this.isSimulated && e.stopImmediatePropagation(), this.stopPropagation() 1681 } 1682 }, M.each({ 1683 altKey: !0, 1684 bubbles: !0, 1685 cancelable: !0, 1686 changedTouches: !0, 1687 ctrlKey: !0, 1688 detail: !0, 1689 eventPhase: !0, 1690 metaKey: !0, 1691 pageX: !0, 1692 pageY: !0, 1693 shiftKey: !0, 1694 view: !0, 1695 char: !0, 1696 charCode: !0, 1697 key: !0, 1698 keyCode: !0, 1699 button: !0, 1700 buttons: !0, 1701 clientX: !0, 1702 clientY: !0, 1703 offsetX: !0, 1704 offsetY: !0, 1705 pointerId: !0, 1706 pointerType: !0, 1707 screenX: !0, 1708 screenY: !0, 1709 targetTouches: !0, 1710 toElement: !0, 1711 touches: !0, 1712 which: function(e) { 1713 var t = e.button; 1714 return null == e.which && be.test(e.type) ? null != e.charCode ? e.charCode : e.keyCode : !e.which && void 0 !== t && we.test(e.type) ? 1 & t ? 1 : 2 & t ? 3 : 4 & t ? 2 : 0 : e.which 1715 } 1716 }, M.event.addProp), M.each({ 1717 mouseenter: "mouseover", 1718 mouseleave: "mouseout", 1719 pointerenter: "pointerover", 1720 pointerleave: "pointerout" 1721 }, function(e, r) { 1722 M.event.special[e] = { 1723 delegateType: r, 1724 bindType: r, 1725 handle: function(e) { 1726 var t, i = e.relatedTarget, 1727 n = e.handleObj; 1728 return i && (i === this || M.contains(this, i)) || (e.type = n.origType, t = n.handler.apply(this, arguments), e.type = r), t 1729 } 1730 } 1731 }), M.fn.extend({ 1732 on: function(e, t, i, n) { 1733 return Me(this, e, t, i, n) 1734 }, 1735 one: function(e, t, i, n) { 1736 return Me(this, e, t, i, n, 1) 1737 }, 1738 off: function(e, t, i) { 1739 var n, r; 1740 if (e && e.preventDefault && e.handleObj) return n = e.handleObj, M(e.delegateTarget).off(n.namespace ? n.origType + "." + n.namespace : n.origType, n.selector, n.handler), this; 1741 if ("object" == typeof e) { 1742 for (r in e) this.off(r, t, e[r]); 1743 return this 1744 } 1745 return !1 !== t && "function" != typeof t || (i = t, t = void 0), !1 === i && (i = Te), this.each(function() { 1746 M.event.remove(this, e, i, t) 1747 }) 1748 } 1749 }); 1750 var Se = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([a-z][^\/\0>\x20\t\r\n\f]*)[^>]*)\/>/gi, 1751 Ce = /<script|<style|<link/i, 1752 Ae = /checked\s*(?:[^=]|=\s*.checked.)/i, 1753 Re = /^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g; 1754 1755 function Le(e, t) { 1756 return C(e, "table") && C(11 !== t.nodeType ? t : t.firstChild, "tr") && M(e).children("tbody")[0] || e 1757 } 1758 1759 function Pe(e) { 1760 return e.type = (null !== e.getAttribute("type")) + "/" + e.type, e 1761 } 1762 1763 function ke(e) { 1764 return "true/" === (e.type || "").slice(0, 5) ? e.type = e.type.slice(5) : e.removeAttribute("type"), e 1765 } 1766 1767 function Oe(e, t) { 1768 var i, n, r, o, a, s, l, c; 1769 if (1 === t.nodeType) { 1770 if (Y.hasData(e) && (o = Y.access(e), a = Y.set(t, o), c = o.events)) 1771 for (r in delete a.handle, a.events = {}, c) 1772 for (i = 0, n = c[r].length; i < n; i++) M.event.add(t, r, c[r][i]); 1773 Z.hasData(e) && (s = Z.access(e), l = M.extend({}, s), Z.set(t, l)) 1774 } 1775 } 1776 1777 function De(i, n, r, o) { 1778 n = m.apply([], n); 1779 var e, t, a, s, l, c, u = 0, 1780 h = i.length, 1781 d = h - 1, 1782 p = n[0],
vendor: 21,211 bytes, lines 1783-2239
1783 f = y(p); 1784 if (f || 1 < h && "string" == typeof p && !v.checkClone && Ae.test(p)) return i.each(function(e) { 1785 var t = i.eq(e); 1786 f && (n[0] = p.call(this, e, t.html())), De(t, n, r, o) 1787 }); 1788 if (h && (t = (e = ve(n, i[0].ownerDocument, !1, i, o)).firstChild, 1 === e.childNodes.length && (e = t), t || o)) { 1789 for (s = (a = M.map(de(e, "script"), Pe)).length; u < h; u++) l = e, u !== d && (l = M.clone(l, !0, !0), s && M.merge(a, de(l, "script"))), r.call(i[u], l, u); 1790 if (s) 1791 for (c = a[a.length - 1].ownerDocument, M.map(a, ke), u = 0; u < s; u++) l = a[u], ue.test(l.type || "") && !Y.access(l, "globalEval") && M.contains(c, l) && (l.src && "module" !== (l.type || "").toLowerCase() ? M._evalUrl && M._evalUrl(l.src) : w(l.textContent.replace(Re, ""), c, l)) 1792 } 1793 return i 1794 } 1795 1796 function Ie(e, t, i) { 1797 for (var n, r = t ? M.filter(t, e) : e, o = 0; null != (n = r[o]); o++) i || 1 !== n.nodeType || M.cleanData(de(n)), n.parentNode && (i && M.contains(n.ownerDocument, n) && pe(de(n, "script")), n.parentNode.removeChild(n)); 1798 return e 1799 } 1800 M.extend({ 1801 htmlPrefilter: function(e) { 1802 return e.replace(Se, "<$1></$2>") 1803 }, 1804 clone: function(e, t, i) { 1805 var n, r, o, a, s, l, c, u = e.cloneNode(!0), 1806 h = M.contains(e.ownerDocument, e); 1807 if (!(v.noCloneChecked || 1 !== e.nodeType && 11 !== e.nodeType || M.isXMLDoc(e))) 1808 for (a = de(u), n = 0, r = (o = de(e)).length; n < r; n++) s = o[n], l = a[n], void 0, "input" === (c = l.nodeName.toLowerCase()) && le.test(s.type) ? l.checked = s.checked : "input" !== c && "textarea" !== c || (l.defaultValue = s.defaultValue); 1809 if (t) 1810 if (i) 1811 for (o = o || de(e), a = a || de(u), n = 0, r = o.length; n < r; n++) Oe(o[n], a[n]); 1812 else Oe(e, u); 1813 return 0 < (a = de(u, "script")).length && pe(a, !h && de(e, "script")), u 1814 }, 1815 cleanData: function(e) { 1816 for (var t, i, n, r = M.event.special, o = 0; void 0 !== (i = e[o]); o++) 1817 if (q(i)) { 1818 if (t = i[Y.expando]) { 1819 if (t.events) 1820 for (n in t.events) r[n] ? M.event.remove(i, n) : M.removeEvent(i, n, t.handle); 1821 i[Y.expando] = void 0 1822 } 1823 i[Z.expando] && (i[Z.expando] = void 0) 1824 } 1825 } 1826 }), M.fn.extend({ 1827 detach: function(e) { 1828 return Ie(this, e, !0) 1829 }, 1830 remove: function(e) { 1831 return Ie(this, e) 1832 }, 1833 text: function(e) { 1834 return $(this, function(e) { 1835 return void 0 === e ? M.text(this) : this.empty().each(function() { 1836 1 !== this.nodeType && 11 !== this.nodeType && 9 !== this.nodeType || (this.textContent = e) 1837 }) 1838 }, null, e, arguments.length) 1839 }, 1840 append: function() { 1841 return De(this, arguments, function(e) { 1842 1 !== this.nodeType && 11 !== this.nodeType && 9 !== this.nodeType || Le(this, e).appendChild(e) 1843 }) 1844 }, 1845 prepend: function() { 1846 return De(this, arguments, function(e) { 1847 if (1 === this.nodeType || 11 === this.nodeType || 9 === this.nodeType) { 1848 var t = Le(this, e); 1849 t.insertBefore(e, t.firstChild) 1850 } 1851 }) 1852 }, 1853 before: function() { 1854 return De(this, arguments, function(e) { 1855 this.parentNode && this.parentNode.insertBefore(e, this) 1856 }) 1857 }, 1858 after: function() { 1859 return De(this, arguments, function(e) { 1860 this.parentNode && this.parentNode.insertBefore(e, this.nextSibling) 1861 }) 1862 }, 1863 empty: function() { 1864 for (var e, t = 0; null != (e = this[t]); t++) 1 === e.nodeType && (M.cleanData(de(e, !1)), e.textContent = ""); 1865 return this 1866 }, 1867 clone: function(e, t) { 1868 return e = null != e && e, t = null == t ? e : t, this.map(function() { 1869 return M.clone(this, e, t) 1870 }) 1871 }, 1872 html: function(e) { 1873 return $(this, function(e) { 1874 var t = this[0] || {}, 1875 i = 0, 1876 n = this.length; 1877 if (void 0 === e && 1 === t.nodeType) return t.innerHTML; 1878 if ("string" == typeof e && !Ce.test(e) && !he[(ce.exec(e) || ["", ""])[1].toLowerCase()]) { 1879 e = M.htmlPrefilter(e); 1880 try { 1881 for (; i < n; i++) 1 === (t = this[i] || {}).nodeType && (M.cleanData(de(t, !1)), t.innerHTML = e); 1882 t = 0 1883 } catch (e) {} 1884 } 1885 t && this.empty().append(e) 1886 }, null, e, arguments.length) 1887 }, 1888 replaceWith: function() { 1889 var i = []; 1890 return De(this, arguments, function(e) { 1891 var t = this.parentNode; 1892 M.inArray(this, i) < 0 && (M.cleanData(de(this)), t && t.replaceChild(e, this)) 1893 }, i) 1894 } 1895 }), M.each({ 1896 appendTo: "append", 1897 prependTo: "prepend", 1898 insertBefore: "before", 1899 insertAfter: "after", 1900 replaceAll: "replaceWith" 1901 }, function(e, a) { 1902 M.fn[e] = function(e) { 1903 for (var t, i = [], n = M(e), r = n.length - 1, o = 0; o <= r; o++) t = o === r ? this : this.clone(!0), M(n[o])[a](t), l.apply(i, t.get()); 1904 return this.pushStack(i) 1905 } 1906 }); 1907 var ze = new RegExp("^(" + ee + ")(?!px)[a-z%]+$", "i"), 1908 Ne = function(e) { 1909 var t = e.ownerDocument.defaultView; 1910 return t && t.opener || (t = T), t.getComputedStyle(e) 1911 }, 1912 Fe = new RegExp(ie.join("|"), "i"); 1913 1914 function Ue(e, t, i) { 1915 var n, r, o, a, s = e.style; 1916 return (i = i || Ne(e)) && ("" !== (a = i.getPropertyValue(t) || i[t]) || M.contains(e.ownerDocument, e) || (a = M.style(e, t)), !v.pixelBoxStyles() && ze.test(a) && Fe.test(t) && (n = s.width, r = s.minWidth, o = s.maxWidth, s.minWidth = s.maxWidth = s.width = a, a = i.width, s.width = n, s.minWidth = r, s.maxWidth = o)), void 0 !== a ? a + "" : a 1917 } 1918 1919 function Be(e, t) { 1920 return { 1921 get: function() { 1922 if (!e()) return (this.get = t).apply(this, arguments); 1923 delete this.get 1924 } 1925 } 1926 }! function() { 1927 function e() { 1928 if (l) { 1929 s.style.cssText = "position:absolute;left:-11111px;width:60px;margin-top:1px;padding:0;border:0", l.style.cssText = "position:relative;display:block;box-sizing:border-box;overflow:scroll;margin:auto;border:1px;padding:1px;width:60%;top:1%", ye.appendChild(s).appendChild(l); 1930 var e = T.getComputedStyle(l); 1931 i = "1%" !== e.top, a = 12 === t(e.marginLeft), l.style.right = "60%", o = 36 === t(e.right), n = 36 === t(e.width), l.style.position = "absolute", r = 36 === l.offsetWidth || "absolute", ye.removeChild(s), l = null 1932 } 1933 } 1934 1935 function t(e) { 1936 return Math.round(parseFloat(e)) 1937 } 1938 var i, n, r, o, a, s = E.createElement("div"), 1939 l = E.createElement("div"); 1940 l.style && (l.style.backgroundClip = "content-box", l.cloneNode(!0).style.backgroundClip = "", v.clearCloneStyle = "content-box" === l.style.backgroundClip, M.extend(v, { 1941 boxSizingReliable: function() { 1942 return e(), n 1943 }, 1944 pixelBoxStyles: function() { 1945 return e(), o 1946 }, 1947 pixelPosition: function() { 1948 return e(), i 1949 }, 1950 reliableMarginLeft: function() { 1951 return e(), a 1952 }, 1953 scrollboxSize: function() { 1954 return e(), r 1955 } 1956 })) 1957 }(); 1958 var He = /^(none|table(?!-c[ea]).+)/, 1959 $e = /^--/, 1960 je = { 1961 position: "absolute", 1962 visibility: "hidden", 1963 display: "block" 1964 }, 1965 Ge = { 1966 letterSpacing: "0", 1967 fontWeight: "400" 1968 }, 1969 Ve = ["Webkit", "Moz", "ms"], 1970 We = E.createElement("div").style; 1971 1972 function qe(e) { 1973 var t = M.cssProps[e]; 1974 return t || (t = M.cssProps[e] = function(e) { 1975 if (e in We) return e; 1976 for (var t = e[0].toUpperCase() + e.slice(1), i = Ve.length; i--;) 1977 if ((e = Ve[i] + t) in We) return e 1978 }(e) || e), t 1979 } 1980 1981 function Xe(e, t, i) { 1982 var n = te.exec(t); 1983 return n ? Math.max(0, n[2] - (i || 0)) + (n[3] || "px") : t 1984 } 1985 1986 function Ye(e, t, i, n, r, o) { 1987 var a = "width" === t ? 1 : 0, 1988 s = 0, 1989 l = 0; 1990 if (i === (n ? "border" : "content")) return 0; 1991 for (; a < 4; a += 2) "margin" === i && (l += M.css(e, i + ie[a], !0, r)), n ? ("content" === i && (l -= M.css(e, "padding" + ie[a], !0, r)), "margin" !== i && (l -= M.css(e, "border" + ie[a] + "Width", !0, r))) : (l += M.css(e, "padding" + ie[a], !0, r), "padding" !== i ? l += M.css(e, "border" + ie[a] + "Width", !0, r) : s += M.css(e, "border" + ie[a] + "Width", !0, r)); 1992 return !n && 0 <= o && (l += Math.max(0, Math.ceil(e["offset" + t[0].toUpperCase() + t.slice(1)] - o - l - s - .5))), l 1993 } 1994 1995 function Ze(e, t, i) { 1996 var n = Ne(e), 1997 r = Ue(e, t, n), 1998 o = "border-box" === M.css(e, "boxSizing", !1, n), 1999 a = o; 2000 if (ze.test(r)) { 2001 if (!i) return r; 2002 r = "auto" 2003 } 2004 return a = a && (v.boxSizingReliable() || r === e.style[t]), ("auto" === r || !parseFloat(r) && "inline" === M.css(e, "display", !1, n)) && (r = e["offset" + t[0].toUpperCase() + t.slice(1)], a = !0), (r = parseFloat(r) || 0) + Ye(e, t, i || (o ? "border" : "content"), a, n, r) + "px" 2005 } 2006 2007 function Qe(e, t, i, n, r) { 2008 return new Qe.prototype.init(e, t, i, n, r) 2009 } 2010 M.extend({ 2011 cssHooks: { 2012 opacity: { 2013 get: function(e, t) { 2014 if (t) { 2015 var i = Ue(e, "opacity"); 2016 return "" === i ? "1" : i 2017 } 2018 } 2019 } 2020 }, 2021 cssNumber: { 2022 animationIterationCount: !0, 2023 columnCount: !0, 2024 fillOpacity: !0, 2025 flexGrow: !0, 2026 flexShrink: !0, 2027 fontWeight: !0, 2028 lineHeight: !0, 2029 opacity: !0, 2030 order: !0, 2031 orphans: !0, 2032 widows: !0, 2033 zIndex: !0, 2034 zoom: !0 2035 }, 2036 cssProps: {}, 2037 style: function(e, t, i, n) { 2038 if (e && 3 !== e.nodeType && 8 !== e.nodeType && e.style) { 2039 var r, o, a, s = W(t), 2040 l = $e.test(t), 2041 c = e.style; 2042 if (l || (t = qe(s)), a = M.cssHooks[t] || M.cssHooks[s], void 0 === i) return a && "get" in a && void 0 !== (r = a.get(e, !1, n)) ? r : c[t]; 2043 "string" == (o = typeof i) && (r = te.exec(i)) && r[1] && (i = oe(e, t, r), o = "number"), null != i && i == i && ("number" === o && (i += r && r[3] || (M.cssNumber[s] ? "" : "px")), v.clearCloneStyle || "" !== i || 0 !== t.indexOf("background") || (c[t] = "inherit"), a && "set" in a && void 0 === (i = a.set(e, i, n)) || (l ? c.setProperty(t, i) : c[t] = i)) 2044 } 2045 }, 2046 css: function(e, t, i, n) { 2047 var r, o, a, s = W(t); 2048 return $e.test(t) || (t = qe(s)), (a = M.cssHooks[t] || M.cssHooks[s]) && "get" in a && (r = a.get(e, !0, i)), void 0 === r && (r = Ue(e, t, n)), "normal" === r && t in Ge && (r = Ge[t]), "" === i || i ? (o = parseFloat(r), !0 === i || isFinite(o) ? o || 0 : r) : r 2049 } 2050 }), M.each(["height", "width"], function(e, s) { 2051 M.cssHooks[s] = { 2052 get: function(e, t, i) { 2053 if (t) return !He.test(M.css(e, "display")) || e.getClientRects().length && e.getBoundingClientRect().width ? Ze(e, s, i) : re(e, je, function() { 2054 return Ze(e, s, i) 2055 }) 2056 }, 2057 set: function(e, t, i) { 2058 var n, r = Ne(e), 2059 o = "border-box" === M.css(e, "boxSizing", !1, r), 2060 a = i && Ye(e, s, i, o, r); 2061 return o && v.scrollboxSize() === r.position && (a -= Math.ceil(e["offset" + s[0].toUpperCase() + s.slice(1)] - parseFloat(r[s]) - Ye(e, s, "border", !1, r) - .5)), a && (n = te.exec(t)) && "px" !== (n[3] || "px") && (e.style[s] = t, t = M.css(e, s)), Xe(0, t, a) 2062 } 2063 } 2064 }), M.cssHooks.marginLeft = Be(v.reliableMarginLeft, function(e, t) { 2065 if (t) return (parseFloat(Ue(e, "marginLeft")) || e.getBoundingClientRect().left - re(e, { 2066 marginLeft: 0 2067 }, function() { 2068 return e.getBoundingClientRect().left 2069 })) + "px" 2070 }), M.each({ 2071 margin: "", 2072 padding: "", 2073 border: "Width" 2074 }, function(r, o) { 2075 M.cssHooks[r + o] = { 2076 expand: function(e) { 2077 for (var t = 0, i = {}, n = "string" == typeof e ? e.split(" ") : [e]; t < 4; t++) i[r + ie[t] + o] = n[t] || n[t - 2] || n[0]; 2078 return i 2079 } 2080 }, "margin" !== r && (M.cssHooks[r + o].set = Xe) 2081 }), M.fn.extend({ 2082 css: function(e, t) { 2083 return $(this, function(e, t, i) { 2084 var n, r, o = {}, 2085 a = 0; 2086 if (Array.isArray(t)) { 2087 for (n = Ne(e), r = t.length; a < r; a++) o[t[a]] = M.css(e, t[a], !1, n); 2088 return o 2089 } 2090 return void 0 !== i ? M.style(e, t, i) : M.css(e, t) 2091 }, e, t, 1 < arguments.length) 2092 } 2093 }), ((M.Tween = Qe).prototype = { 2094 constructor: Qe, 2095 init: function(e, t, i, n, r, o) { 2096 this.elem = e, this.prop = i, this.easing = r || M.easing._default, this.options = t, this.start = this.now = this.cur(), this.end = n, this.unit = o || (M.cssNumber[i] ? "" : "px") 2097 }, 2098 cur: function() { 2099 var e = Qe.propHooks[this.prop]; 2100 return e && e.get ? e.get(this) : Qe.propHooks._default.get(this) 2101 }, 2102 run: function(e) { 2103 var t, i = Qe.propHooks[this.prop]; 2104 return this.options.duration ? this.pos = t = M.easing[this.easing](e, this.options.duration * e, 0, 1, this.options.duration) : this.pos = t = e, this.now = (this.end - this.start) * t + this.start, this.options.step && this.options.step.call(this.elem, this.now, this), i && i.set ? i.set(this) : Qe.propHooks._default.set(this), this 2105 } 2106 }).init.prototype = Qe.prototype, (Qe.propHooks = { 2107 _default: { 2108 get: function(e) { 2109 var t; 2110 return 1 !== e.elem.nodeType || null != e.elem[e.prop] && null == e.elem.style[e.prop] ? e.elem[e.prop] : (t = M.css(e.elem, e.prop, "")) && "auto" !== t ? t : 0 2111 }, 2112 set: function(e) { 2113 M.fx.step[e.prop] ? M.fx.step[e.prop](e) : 1 !== e.elem.nodeType || null == e.elem.style[M.cssProps[e.prop]] && !M.cssHooks[e.prop] ? e.elem[e.prop] = e.now : M.style(e.elem, e.prop, e.now + e.unit) 2114 } 2115 } 2116 }).scrollTop = Qe.propHooks.scrollLeft = { 2117 set: function(e) { 2118 e.elem.nodeType && e.elem.parentNode && (e.elem[e.prop] = e.now) 2119 } 2120 }, M.easing = { 2121 linear: function(e) { 2122 return e 2123 }, 2124 swing: function(e) { 2125 return .5 - Math.cos(e * Math.PI) / 2 2126 }, 2127 _default: "swing" 2128 }, M.fx = Qe.prototype.init, M.fx.step = {}; 2129 var Je, Ke, et, tt, it = /^(?:toggle|show|hide)$/, 2130 nt = /queueHooks$/; 2131 2132 function rt() { 2133 Ke && (!1 === E.hidden && T.requestAnimationFrame ? T.requestAnimationFrame(rt) : T.setTimeout(rt, M.fx.interval), M.fx.tick()) 2134 } 2135 2136 function ot() { 2137 return T.setTimeout(function() { 2138 Je = void 0 2139 }), Je = Date.now() 2140 } 2141 2142 function at(e, t) { 2143 var i, n = 0, 2144 r = { 2145 height: e 2146 }; 2147 for (t = t ? 1 : 0; n < 4; n += 2 - t) r["margin" + (i = ie[n])] = r["padding" + i] = e; 2148 return t && (r.opacity = r.width = e), r 2149 } 2150 2151 function st(e, t, i) { 2152 for (var n, r = (lt.tweeners[t] || []).concat(lt.tweeners["*"]), o = 0, a = r.length; o < a; o++) 2153 if (n = r[o].call(i, t, e)) return n 2154 } 2155 2156 function lt(o, e, t) { 2157 var i, a, n = 0, 2158 r = lt.prefilters.length, 2159 s = M.Deferred().always(function() { 2160 delete l.elem 2161 }), 2162 l = function() { 2163 if (a) return !1; 2164 for (var e = Je || ot(), t = Math.max(0, c.startTime + c.duration - e), i = 1 - (t / c.duration || 0), n = 0, r = c.tweens.length; n < r; n++) c.tweens[n].run(i); 2165 return s.notifyWith(o, [c, i, t]), i < 1 && r ? t : (r || s.notifyWith(o, [c, 1, 0]), s.resolveWith(o, [c]), !1) 2166 }, 2167 c = s.promise({ 2168 elem: o, 2169 props: M.extend({}, e), 2170 opts: M.extend(!0, { 2171 specialEasing: {}, 2172 easing: M.easing._default 2173 }, t), 2174 originalProperties: e, 2175 originalOptions: t, 2176 startTime: Je || ot(), 2177 duration: t.duration, 2178 tweens: [], 2179 createTween: function(e, t) { 2180 var i = M.Tween(o, c.opts, e, t, c.opts.specialEasing[e] || c.opts.easing); 2181 return c.tweens.push(i), i 2182 }, 2183 stop: function(e) { 2184 var t = 0, 2185 i = e ? c.tweens.length : 0; 2186 if (a) return this; 2187 for (a = !0; t < i; t++) c.tweens[t].run(1); 2188 return e ? (s.notifyWith(o, [c, 1, 0]), s.resolveWith(o, [c, e])) : s.rejectWith(o, [c, e]), this 2189 } 2190 }), 2191 u = c.props; 2192 for (function(e, t) { 2193 var i, n, r, o, a; 2194 for (i in e) 2195 if (r = t[n = W(i)], o = e[i], Array.isArray(o) && (r = o[1], o = e[i] = o[0]), i !== n && (e[n] = o, delete e[i]), (a = M.cssHooks[n]) && "expand" in a) 2196 for (i in o = a.expand(o), delete e[n], o) i in e || (e[i] = o[i], t[i] = r); 2197 else t[n] = r 2198 }(u, c.opts.specialEasing); n < r; n++) 2199 if (i = lt.prefilters[n].call(c, o, u, c.opts)) return y(i.stop) && (M._queueHooks(c.elem, c.opts.queue).stop = i.stop.bind(i)), i; 2200 return M.map(u, st, c), y(c.opts.start) && c.opts.start.call(o, c), c.progress(c.opts.progress).done(c.opts.done, c.opts.complete).fail(c.opts.fail).always(c.opts.always), M.fx.timer(M.extend(l, { 2201 elem: o, 2202 anim: c, 2203 queue: c.opts.queue 2204 })), c 2205 } 2206 M.Animation = M.extend(lt, { 2207 tweeners: { 2208 "*": [function(e, t) { 2209 var i = this.createTween(e, t); 2210 return oe(i.elem, e, te.exec(t), i), i 2211 }] 2212 }, 2213 tweener: function(e, t) { 2214 y(e) ? (t = e, e = ["*"]) : e = e.match(I); 2215 for (var i, n = 0, r = e.length; n < r; n++) i = e[n], lt.tweeners[i] = lt.tweeners[i] || [], lt.tweeners[i].unshift(t) 2216 }, 2217 prefilters: [function(e, t, i) { 2218 var n, r, o, a, s, l, c, u, h = "width" in t || "height" in t, 2219 d = this, 2220 p = {}, 2221 f = e.style, 2222 m = e.nodeType && ne(e), 2223 g = Y.get(e, "fxshow"); 2224 for (n in i.queue || (null == (a = M._queueHooks(e, "fx")).unqueued && (a.unqueued = 0, s = a.empty.fire, a.empty.fire = function() { 2225 a.unqueued || s() 2226 }), a.unqueued++, d.always(function() { 2227 d.always(function() { 2228 a.unqueued--, M.queue(e, "fx").length || a.empty.fire() 2229 }) 2230 })), t) 2231 if (r = t[n], it.test(r)) { 2232 if (delete t[n], o = o || "toggle" === r, r === (m ? "hide" : "show")) { 2233 if ("show" !== r || !g || void 0 === g[n]) continue; 2234 m = !0 2235 } 2236 p[n] = g && g[n] || M.style(e, n) 2237 } 2238 if ((l = !M.isEmptyObject(t)) || !M.isEmptyObject(p)) 2239 for (n in h && 1 === e.nodeType && (i.overflow = [f.overflow, f.overflowX, f.overflowY], null == (c = g && g.display) && (c = Y.get(e, "display")), "none" === (u = M.css(e, "display")) && (c ? u = c : (se([e], !0), c = e.style.display || c, u = M.css(e, "display"), se([e]))), ("inline" === u || "inline-block" === u && null != c) && "n
vendor: 4,753 bytes, lines 2239-2342
2239one" === M.css(e, "float") && (l || (d.done(function() { 2240 f.display = c 2241 }), null == c && (u = f.display, c = "none" === u ? "" : u)), f.display = "inline-block")), i.overflow && (f.overflow = "hidden", d.always(function() { 2242 f.overflow = i.overflow[0], f.overflowX = i.overflow[1], f.overflowY = i.overflow[2] 2243 })), l = !1, p) l || (g ? "hidden" in g && (m = g.hidden) : g = Y.access(e, "fxshow", { 2244 display: c 2245 }), o && (g.hidden = !m), m && se([e], !0), d.done(function() { 2246 for (n in m || se([e]), Y.remove(e, "fxshow"), p) M.style(e, n, p[n]) 2247 })), l = st(m ? g[n] : 0, n, d), n in g || (g[n] = l.start, m && (l.end = l.start, l.start = 0)) 2248 }], 2249 prefilter: function(e, t) { 2250 t ? lt.prefilters.unshift(e) : lt.prefilters.push(e) 2251 } 2252 }), M.speed = function(e, t, i) { 2253 var n = e && "object" == typeof e ? M.extend({}, e) : { 2254 complete: i || !i && t || y(e) && e, 2255 duration: e, 2256 easing: i && t || t && !y(t) && t 2257 }; 2258 return M.fx.off ? n.duration = 0 : "number" != typeof n.duration && (n.duration in M.fx.speeds ? n.duration = M.fx.speeds[n.duration] : n.duration = M.fx.speeds._default), null != n.queue && !0 !== n.queue || (n.queue = "fx"), n.old = n.complete, n.complete = function() { 2259 y(n.old) && n.old.call(this), n.queue && M.dequeue(this, n.queue) 2260 }, n 2261 }, M.fn.extend({ 2262 fadeTo: function(e, t, i, n) { 2263 return this.filter(ne).css("opacity", 0).show().end().animate({ 2264 opacity: t 2265 }, e, i, n) 2266 }, 2267 animate: function(t, e, i, n) { 2268 var r = M.isEmptyObject(t), 2269 o = M.speed(e, i, n), 2270 a = function() { 2271 var e = lt(this, M.extend({}, t), o); 2272 (r || Y.get(this, "finish")) && e.stop(!0) 2273 }; 2274 return a.finish = a, r || !1 === o.queue ? this.each(a) : this.queue(o.queue, a) 2275 }, 2276 stop: function(r, e, o) { 2277 var a = function(e) { 2278 var t = e.stop; 2279 delete e.stop, t(o) 2280 }; 2281 return "string" != typeof r && (o = e, e = r, r = void 0), e && !1 !== r && this.queue(r || "fx", []), this.each(function() { 2282 var e = !0, 2283 t = null != r && r + "queueHooks", 2284 i = M.timers, 2285 n = Y.get(this); 2286 if (t) n[t] && n[t].stop && a(n[t]); 2287 else 2288 for (t in n) n[t] && n[t].stop && nt.test(t) && a(n[t]); 2289 for (t = i.length; t--;) i[t].elem !== this || null != r && i[t].queue !== r || (i[t].anim.stop(o), e = !1, i.splice(t, 1)); 2290 !e && o || M.dequeue(this, r) 2291 }) 2292 }, 2293 finish: function(a) { 2294 return !1 !== a && (a = a || "fx"), this.each(function() { 2295 var e, t = Y.get(this), 2296 i = t[a + "queue"], 2297 n = t[a + "queueHooks"], 2298 r = M.timers, 2299 o = i ? i.length : 0; 2300 for (t.finish = !0, M.queue(this, a, []), n && n.stop && n.stop.call(this, !0), e = r.length; e--;) r[e].elem === this && r[e].queue === a && (r[e].anim.stop(!0), r.splice(e, 1)); 2301 for (e = 0; e < o; e++) i[e] && i[e].finish && i[e].finish.call(this); 2302 delete t.finish 2303 }) 2304 } 2305 }), M.each(["toggle", "show", "hide"], function(e, n) { 2306 var r = M.fn[n]; 2307 M.fn[n] = function(e, t, i) { 2308 return null == e || "boolean" == typeof e ? r.apply(this, arguments) : this.animate(at(n, !0), e, t, i) 2309 } 2310 }), M.each({ 2311 slideDown: at("show"), 2312 slideUp: at("hide"), 2313 slideToggle: at("toggle"), 2314 fadeIn: { 2315 opacity: "show" 2316 }, 2317 fadeOut: { 2318 opacity: "hide" 2319 }, 2320 fadeToggle: { 2321 opacity: "toggle" 2322 } 2323 }, function(e, n) { 2324 M.fn[e] = function(e, t, i) { 2325 return this.animate(n, e, t, i) 2326 } 2327 }), M.timers = [], M.fx.tick = function() { 2328 var e, t = 0, 2329 i = M.timers; 2330 for (Je = Date.now(); t < i.length; t++)(e = i[t])() || i[t] !== e || i.splice(t--, 1); 2331 i.length || M.fx.stop(), Je = void 0 2332 }, M.fx.timer = function(e) { 2333 M.timers.push(e), M.fx.start() 2334 }, M.fx.interval = 13, M.fx.start = function() { 2335 Ke || (Ke = !0, rt()) 2336 }, M.fx.stop = function() { 2337 Ke = null 2338 }, M.fx.speeds = { 2339 slow: 600, 2340 fast: 200, 2341 _default: 400 2342 }
vendor: 9,666 bytes, lines 2342-2548
2342, M.fn.delay = function(n, e) { 2343 return n = M.fx && M.fx.speeds[n] || n, e = e || "fx", this.queue(e, function(e, t) { 2344 var i = T.setTimeout(e, n); 2345 t.stop = function() { 2346 T.clearTimeout(i) 2347 } 2348 }) 2349 }, et = E.createElement("input"), tt = E.createElement("select").appendChild(E.createElement("option")), et.type = "checkbox", v.checkOn = "" !== et.value, v.optSelected = tt.selected, (et = E.createElement("input")).value = "t", et.type = "radio", v.radioValue = "t" === et.value; 2350 var ct, ut = M.expr.attrHandle; 2351 M.fn.extend({ 2352 attr: function(e, t) { 2353 return $(this, M.attr, e, t, 1 < arguments.length) 2354 }, 2355 removeAttr: function(e) { 2356 return this.each(function() { 2357 M.removeAttr(this, e) 2358 }) 2359 } 2360 }), M.extend({ 2361 attr: function(e, t, i) { 2362 var n, r, o = e.nodeType; 2363 if (3 !== o && 8 !== o && 2 !== o) return void 0 === e.getAttribute ? M.prop(e, t, i) : (1 === o && M.isXMLDoc(e) || (r = M.attrHooks[t.toLowerCase()] || (M.expr.match.bool.test(t) ? ct : void 0)), void 0 !== i ? null === i ? void M.removeAttr(e, t) : r && "set" in r && void 0 !== (n = r.set(e, i, t)) ? n : (e.setAttribute(t, i + ""), i) : r && "get" in r && null !== (n = r.get(e, t)) ? n : null == (n = M.find.attr(e, t)) ? void 0 : n) 2364 }, 2365 attrHooks: { 2366 type: { 2367 set: function(e, t) { 2368 if (!v.radioValue && "radio" === t && C(e, "input")) { 2369 var i = e.value; 2370 return e.setAttribute("type", t), i && (e.value = i), t 2371 } 2372 } 2373 } 2374 }, 2375 removeAttr: function(e, t) { 2376 var i, n = 0, 2377 r = t && t.match(I); 2378 if (r && 1 === e.nodeType) 2379 for (; i = r[n++];) e.removeAttribute(i) 2380 } 2381 }), ct = { 2382 set: function(e, t, i) { 2383 return !1 === t ? M.removeAttr(e, i) : e.setAttribute(i, i), i 2384 } 2385 }, M.each(M.expr.match.bool.source.match(/\w+/g), function(e, t) { 2386 var a = ut[t] || M.find.attr; 2387 ut[t] = function(e, t, i) { 2388 var n, r, o = t.toLowerCase(); 2389 return i || (r = ut[o], ut[o] = n, n = null != a(e, t, i) ? o : null, ut[o] = r), n 2390 } 2391 }); 2392 var ht = /^(?:input|select|textarea|button)$/i, 2393 dt = /^(?:a|area)$/i; 2394 2395 function pt(e) { 2396 return (e.match(I) || []).join(" ") 2397 } 2398 2399 function ft(e) { 2400 return e.getAttribute && e.getAttribute("class") || "" 2401 } 2402 2403 function mt(e) { 2404 return Array.isArray(e) ? e : "string" == typeof e && e.match(I) || [] 2405 } 2406 M.fn.extend({ 2407 prop: function(e, t) { 2408 return $(this, M.prop, e, t, 1 < arguments.length) 2409 }, 2410 removeProp: function(e) { 2411 return this.each(function() { 2412 delete this[M.propFix[e] || e] 2413 }) 2414 } 2415 }), M.extend({ 2416 prop: function(e, t, i) { 2417 var n, r, o = e.nodeType; 2418 if (3 !== o && 8 !== o && 2 !== o) return 1 === o && M.isXMLDoc(e) || (t = M.propFix[t] || t, r = M.propHooks[t]), void 0 !== i ? r && "set" in r && void 0 !== (n = r.set(e, i, t)) ? n : e[t] = i : r && "get" in r && null !== (n = r.get(e, t)) ? n : e[t] 2419 }, 2420 propHooks: { 2421 tabIndex: { 2422 get: function(e) { 2423 var t = M.find.attr(e, "tabindex"); 2424 return t ? parseInt(t, 10) : ht.test(e.nodeName) || dt.test(e.nodeName) && e.href ? 0 : -1 2425 } 2426 } 2427 }, 2428 propFix: { 2429 for: "htmlFor", 2430 class: "className" 2431 } 2432 }), v.optSelected || (M.propHooks.selected = { 2433 get: function(e) { 2434 var t = e.parentNode; 2435 return t && t.parentNode && t.parentNode.selectedIndex, null 2436 }, 2437 set: function(e) { 2438 var t = e.parentNode; 2439 t && (t.selectedIndex, t.parentNode && t.parentNode.selectedIndex) 2440 } 2441 }), M.each(["tabIndex", "readOnly", "maxLength", "cellSpacing", "cellPadding", "rowSpan", "colSpan", "useMap", "frameBorder", "contentEditable"], function() { 2442 M.propFix[this.toLowerCase()] = this 2443 }), M.fn.extend({ 2444 addClass: function(t) { 2445 var e, i, n, r, o, a, s, l = 0; 2446 if (y(t)) return this.each(function(e) { 2447 M(this).addClass(t.call(this, e, ft(this))) 2448 }); 2449 if ((e = mt(t)).length) 2450 for (; i = this[l++];) 2451 if (r = ft(i), n = 1 === i.nodeType && " " + pt(r) + " ") { 2452 for (a = 0; o = e[a++];) n.indexOf(" " + o + " ") < 0 && (n += o + " "); 2453 r !== (s = pt(n)) && i.setAttribute("class", s) 2454 } 2455 return this 2456 }, 2457 removeClass: function(t) { 2458 var e, i, n, r, o, a, s, l = 0; 2459 if (y(t)) return this.each(function(e) { 2460 M(this).removeClass(t.call(this, e, ft(this))) 2461 }); 2462 if (!arguments.length) return this.attr("class", ""); 2463 if ((e = mt(t)).length) 2464 for (; i = this[l++];) 2465 if (r = ft(i), n = 1 === i.nodeType && " " + pt(r) + " ") { 2466 for (a = 0; o = e[a++];) 2467 for (; - 1 < n.indexOf(" " + o + " ");) n = n.replace(" " + o + " ", " "); 2468 r !== (s = pt(n)) && i.setAttribute("class", s) 2469 } 2470 return this 2471 }, 2472 toggleClass: function(r, t) { 2473 var o = typeof r, 2474 a = "string" === o || Array.isArray(r); 2475 return "boolean" == typeof t && a ? t ? this.addClass(r) : this.removeClass(r) : y(r) ? this.each(function(e) { 2476 M(this).toggleClass(r.call(this, e, ft(this), t), t) 2477 }) : this.each(function() { 2478 var e, t, i, n; 2479 if (a) 2480 for (t = 0, i = M(this), n = mt(r); e = n[t++];) i.hasClass(e) ? i.removeClass(e) : i.addClass(e); 2481 else void 0 !== r && "boolean" !== o || ((e = ft(this)) && Y.set(this, "__className__", e), this.setAttribute && this.setAttribute("class", e || !1 === r ? "" : Y.get(this, "__className__") || "")) 2482 }) 2483 }, 2484 hasClass: function(e) { 2485 var t, i, n = 0; 2486 for (t = " " + e + " "; i = this[n++];) 2487 if (1 === i.nodeType && -1 < (" " + pt(ft(i)) + " ").indexOf(t)) return !0; 2488 return !1 2489 } 2490 }); 2491 var gt = /\r/g; 2492 M.fn.extend({ 2493 val: function(i) { 2494 var n, e, r, t = this[0]; 2495 return arguments.length ? (r = y(i), this.each(function(e) { 2496 var t; 2497 1 === this.nodeType && (null == (t = r ? i.call(this, e, M(this).val()) : i) ? t = "" : "number" == typeof t ? t += "" : Array.isArray(t) && (t = M.map(t, function(e) { 2498 return null == e ? "" : e + "" 2499 })), (n = M.valHooks[this.type] || M.valHooks[this.nodeName.toLowerCase()]) && "set" in n && void 0 !== n.set(this, t, "value") || (this.value = t)) 2500 })) : t ? (n = M.valHooks[t.type] || M.valHooks[t.nodeName.toLowerCase()]) && "get" in n && void 0 !== (e = n.get(t, "value")) ? e : "string" == typeof(e = t.value) ? e.replace(gt, "") : null == e ? "" : e : void 0 2501 } 2502 }), M.extend({ 2503 valHooks: { 2504 option: { 2505 get: function(e) { 2506 var t = M.find.attr(e, "value"); 2507 return null != t ? t : pt(M.text(e)) 2508 } 2509 }, 2510 select: { 2511 get: function(e) { 2512 var t, i, n, r = e.options, 2513 o = e.selectedIndex, 2514 a = "select-one" === e.type, 2515 s = a ? null : [], 2516 l = a ? o + 1 : r.length; 2517 for (n = o < 0 ? l : a ? o : 0; n < l; n++) 2518 if (((i = r[n]).selected || n === o) && !i.disabled && (!i.parentNode.disabled || !C(i.parentNode, "optgroup"))) { 2519 if (t = M(i).val(), a) return t; 2520 s.push(t) 2521 } 2522 return s 2523 }, 2524 set: function(e, t) { 2525 for (var i, n, r = e.options, o = M.makeArray(t), a = r.length; a--;)((n = r[a]).selected = -1 < M.inArray(M.valHooks.option.get(n), o)) && (i = !0); 2526 return i || (e.selectedIndex = -1), o 2527 } 2528 } 2529 } 2530 }), M.each(["radio", "checkbox"], function() { 2531 M.valHooks[this] = { 2532 set: function(e, t) { 2533 if (Array.isArray(t)) return e.checked = -1 < M.inArray(M(e).val(), t) 2534 } 2535 }, v.checkOn || (M.valHooks[this].get = function(e) { 2536 return null === e.getAttribute("value") ? "on" : e.value 2537 }) 2538 }), v.focusin = "onfocusin" in T; 2539 var vt = /^(?:focusinfocus|focusoutblur)$/, 2540 yt = function(e) { 2541 e.stopPropagation() 2542 }; 2543 M.extend(M.event, { 2544 trigger: function(e, t, i, n) { 2545 var r, o, a, s, l, c, u, h, d = [i || E], 2546 p = g.call(e, "type") ? e.type : e, 2547 f = g.call(e, "namespace") ? e.namespace.split(".") : []; 2548 if (o = h = a = i = i || E, 3 !== i.nodeType && 8 !== i.nodeType && !vt.test(p + M.event.triggered) && (-1 < p.indexOf(".") && (p = (f = p.split(".")).shift(), f.sort()), l = p.indexOf(":") < 0 && "on"
vendor: 26,060 bytes, lines 2548-3095
2548+ p, (e = e[M.expando] ? e : new M.Event(p, "object" == typeof e && e)).isTrigger = n ? 2 : 3, e.namespace = f.join("."), e.rnamespace = e.namespace ? new RegExp("(^|\\.)" + f.join("\\.(?:.*\\.|)") + "(\\.|$)") : null, e.result = void 0, e.target || (e.target = i), t = null == t ? [e] : M.makeArray(t, [e]), u = M.event.special[p] || {}, n || !u.trigger || !1 !== u.trigger.apply(i, t))) { 2549 if (!n && !u.noBubble && !b(i)) { 2550 for (s = u.delegateType || p, vt.test(s + p) || (o = o.parentNode); o; o = o.parentNode) d.push(o), a = o; 2551 a === (i.ownerDocument || E) && d.push(a.defaultView || a.parentWindow || T) 2552 } 2553 for (r = 0; 2554 (o = d[r++]) && !e.isPropagationStopped();) h = o, e.type = 1 < r ? s : u.bindType || p, (c = (Y.get(o, "events") || {})[e.type] && Y.get(o, "handle")) && c.apply(o, t), (c = l && o[l]) && c.apply && q(o) && (e.result = c.apply(o, t), !1 === e.result && e.preventDefault()); 2555 return e.type = p, n || e.isDefaultPrevented() || u._default && !1 !== u._default.apply(d.pop(), t) || !q(i) || l && y(i[p]) && !b(i) && ((a = i[l]) && (i[l] = null), M.event.triggered = p, e.isPropagationStopped() && h.addEventListener(p, yt), i[p](), e.isPropagationStopped() && h.removeEventListener(p, yt), M.event.triggered = void 0, a && (i[l] = a)), e.result 2556 } 2557 }, 2558 simulate: function(e, t, i) { 2559 var n = M.extend(new M.Event, i, { 2560 type: e, 2561 isSimulated: !0 2562 }); 2563 M.event.trigger(n, null, t) 2564 } 2565 }), M.fn.extend({ 2566 trigger: function(e, t) { 2567 return this.each(function() { 2568 M.event.trigger(e, t, this) 2569 }) 2570 }, 2571 triggerHandler: function(e, t) { 2572 var i = this[0]; 2573 if (i) return M.event.trigger(e, t, i, !0) 2574 } 2575 }), v.focusin || M.each({ 2576 focus: "focusin", 2577 blur: "focusout" 2578 }, function(i, n) { 2579 var r = function(e) { 2580 M.event.simulate(n, e.target, M.event.fix(e)) 2581 }; 2582 M.event.special[n] = { 2583 setup: function() { 2584 var e = this.ownerDocument || this, 2585 t = Y.access(e, n); 2586 t || e.addEventListener(i, r, !0), Y.access(e, n, (t || 0) + 1) 2587 }, 2588 teardown: function() { 2589 var e = this.ownerDocument || this, 2590 t = Y.access(e, n) - 1; 2591 t ? Y.access(e, n, t) : (e.removeEventListener(i, r, !0), Y.remove(e, n)) 2592 } 2593 } 2594 }); 2595 var bt = T.location, 2596 wt = Date.now(), 2597 xt = /\?/; 2598 M.parseXML = function(e) { 2599 var t; 2600 if (!e || "string" != typeof e) return null; 2601 try { 2602 t = (new T.DOMParser).parseFromString(e, "text/xml") 2603 } catch (e) { 2604 t = void 0 2605 } 2606 return t && !t.getElementsByTagName("parsererror").length || M.error("Invalid XML: " + e), t 2607 }; 2608 var _t = /\[\]$/, 2609 Tt = /\r?\n/g, 2610 Et = /^(?:submit|button|image|reset|file)$/i, 2611 Mt = /^(?:input|select|textarea|keygen)/i; 2612 2613 function St(i, e, n, r) { 2614 var t; 2615 if (Array.isArray(e)) M.each(e, function(e, t) { 2616 n || _t.test(i) ? r(i, t) : St(i + "[" + ("object" == typeof t && null != t ? e : "") + "]", t, n, r) 2617 }); 2618 else if (n || "object" !== x(e)) r(i, e); 2619 else 2620 for (t in e) St(i + "[" + t + "]", e[t], n, r) 2621 } 2622 M.param = function(e, t) { 2623 var i, n = [], 2624 r = function(e, t) { 2625 var i = y(t) ? t() : t; 2626 n[n.length] = encodeURIComponent(e) + "=" + encodeURIComponent(null == i ? "" : i) 2627 }; 2628 if (Array.isArray(e) || e.jquery && !M.isPlainObject(e)) M.each(e, function() { 2629 r(this.name, this.value) 2630 }); 2631 else 2632 for (i in e) St(i, e[i], t, r); 2633 return n.join("&") 2634 }, M.fn.extend({ 2635 serialize: function() { 2636 return M.param(this.serializeArray()) 2637 }, 2638 serializeArray: function() { 2639 return this.map(function() { 2640 var e = M.prop(this, "elements"); 2641 return e ? M.makeArray(e) : this 2642 }).filter(function() { 2643 var e = this.type; 2644 return this.name && !M(this).is(":disabled") && Mt.test(this.nodeName) && !Et.test(e) && (this.checked || !le.test(e)) 2645 }).map(function(e, t) { 2646 var i = M(this).val(); 2647 return null == i ? null : Array.isArray(i) ? M.map(i, function(e) { 2648 return { 2649 name: t.name, 2650 value: e.replace(Tt, "\r\n") 2651 } 2652 }) : { 2653 name: t.name, 2654 value: i.replace(Tt, "\r\n") 2655 } 2656 }).get() 2657 } 2658 }); 2659 var Ct = /%20/g, 2660 At = /#.*$/, 2661 Rt = /([?&])_=[^&]*/, 2662 Lt = /^(.*?):[ \t]*([^\r\n]*)$/gm, 2663 Pt = /^(?:GET|HEAD)$/, 2664 kt = /^\/\//, 2665 Ot = {}, 2666 Dt = {}, 2667 It = "*/".concat("*"), 2668 zt = E.createElement("a"); 2669 2670 function Nt(o) { 2671 return function(e, t) { 2672 "string" != typeof e && (t = e, e = "*"); 2673 var i, n = 0, 2674 r = e.toLowerCase().match(I) || []; 2675 if (y(t)) 2676 for (; i = r[n++];) "+" === i[0] ? (i = i.slice(1) || "*", (o[i] = o[i] || []).unshift(t)) : (o[i] = o[i] || []).push(t) 2677 } 2678 } 2679 2680 function Ft(t, r, o, a) { 2681 var s = {}, 2682 l = t === Dt; 2683 2684 function c(e) { 2685 var n; 2686 return s[e] = !0, M.each(t[e] || [], function(e, t) { 2687 var i = t(r, o, a); 2688 return "string" != typeof i || l || s[i] ? l ? !(n = i) : void 0 : (r.dataTypes.unshift(i), c(i), !1) 2689 }), n 2690 } 2691 return c(r.dataTypes[0]) || !s["*"] && c("*") 2692 } 2693 2694 function Ut(e, t) { 2695 var i, n, r = M.ajaxSettings.flatOptions || {}; 2696 for (i in t) void 0 !== t[i] && ((r[i] ? e : n || (n = {}))[i] = t[i]); 2697 return n && M.extend(!0, e, n), e 2698 } 2699 zt.href = bt.href, M.extend({ 2700 active: 0, 2701 lastModified: {}, 2702 etag: {}, 2703 ajaxSettings: { 2704 url: bt.href, 2705 type: "GET", 2706 isLocal: /^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(bt.protocol), 2707 global: !0, 2708 processData: !0, 2709 async: !0, 2710 contentType: "application/x-www-form-urlencoded; charset=UTF-8", 2711 accepts: { 2712 "*": It, 2713 text: "text/plain", 2714 html: "text/html", 2715 xml: "application/xml, text/xml", 2716 json: "application/json, text/javascript" 2717 }, 2718 contents: { 2719 xml: /\bxml\b/, 2720 html: /\bhtml/, 2721 json: /\bjson\b/ 2722 }, 2723 responseFields: { 2724 xml: "responseXML", 2725 text: "responseText", 2726 json: "responseJSON" 2727 }, 2728 converters: { 2729 "* text": String, 2730 "text html": !0, 2731 "text json": JSON.parse, 2732 "text xml": M.parseXML 2733 }, 2734 flatOptions: { 2735 url: !0, 2736 context: !0 2737 } 2738 }, 2739 ajaxSetup: function(e, t) { 2740 return t ? Ut(Ut(e, M.ajaxSettings), t) : Ut(M.ajaxSettings, e) 2741 }, 2742 ajaxPrefilter: Nt(Ot), 2743 ajaxTransport: Nt(Dt), 2744 ajax: function(e, t) { 2745 "object" == typeof e && (t = e, e = void 0), t = t || {}; 2746 var u, h, d, i, p, n, f, m, r, o, g = M.ajaxSetup({}, t), 2747 v = g.context || g, 2748 y = g.context && (v.nodeType || v.jquery) ? M(v) : M.event, 2749 b = M.Deferred(), 2750 w = M.Callbacks("once memory"), 2751 x = g.statusCode || {}, 2752 a = {}, 2753 s = {}, 2754 l = "canceled", 2755 _ = { 2756 readyState: 0, 2757 getResponseHeader: function(e) { 2758 var t; 2759 if (f) { 2760 if (!i) 2761 for (i = {}; t = Lt.exec(d);) i[t[1].toLowerCase()] = t[2]; 2762 t = i[e.toLowerCase()] 2763 } 2764 return null == t ? null : t 2765 }, 2766 getAllResponseHeaders: function() { 2767 return f ? d : null 2768 }, 2769 setRequestHeader: function(e, t) { 2770 return null == f && (e = s[e.toLowerCase()] = s[e.toLowerCase()] || e, a[e] = t), this 2771 }, 2772 overrideMimeType: function(e) { 2773 return null == f && (g.mimeType = e), this 2774 }, 2775 statusCode: function(e) { 2776 var t; 2777 if (e) 2778 if (f) _.always(e[_.status]); 2779 else 2780 for (t in e) x[t] = [x[t], e[t]]; 2781 return this 2782 }, 2783 abort: function(e) { 2784 var t = e || l; 2785 return u && u.abort(t), c(0, t), this 2786 } 2787 }; 2788 if (b.promise(_), g.url = ((e || g.url || bt.href) + "").replace(kt, bt.protocol + "//"), g.type = t.method || t.type || g.method || g.type, g.dataTypes = (g.dataType || "*").toLowerCase().match(I) || [""], null == g.crossDomain) { 2789 n = E.createElement("a"); 2790 try { 2791 n.href = g.url, n.href = n.href, g.crossDomain = zt.protocol + "//" + zt.host != n.protocol + "//" + n.host 2792 } catch (e) { 2793 g.crossDomain = !0 2794 } 2795 } 2796 if (g.data && g.processData && "string" != typeof g.data && (g.data = M.param(g.data, g.traditional)), Ft(Ot, g, t, _), f) return _; 2797 for (r in (m = M.event && g.global) && 0 == M.active++ && M.event.trigger("ajaxStart"), g.type = g.type.toUpperCase(), g.hasContent = !Pt.test(g.type), h = g.url.replace(At, ""), g.hasContent ? g.data && g.processData && 0 === (g.contentType || "").indexOf("application/x-www-form-urlencoded") && (g.data = g.data.replace(Ct, "+")) : (o = g.url.slice(h.length), g.data && (g.processData || "string" == typeof g.data) && (h += (xt.test(h) ? "&" : "?") + g.data, delete g.data), !1 === g.cache && (h = h.replace(Rt, "$1"), o = (xt.test(h) ? "&" : "?") + "_=" + wt++ + o), g.url = h + o), g.ifModified && (M.lastModified[h] && _.setRequestHeader("If-Modified-Since", M.lastModified[h]), M.etag[h] && _.setRequestHeader("If-None-Match", M.etag[h])), (g.data && g.hasContent && !1 !== g.contentType || t.contentType) && _.setRequestHeader("Content-Type", g.contentType), _.setRequestHeader("Accept", g.dataTypes[0] && g.accepts[g.dataTypes[0]] ? g.accepts[g.dataTypes[0]] + ("*" !== g.dataTypes[0] ? ", " + It + "; q=0.01" : "") : g.accepts["*"]), g.headers) _.setRequestHeader(r, g.headers[r]); 2798 if (g.beforeSend && (!1 === g.beforeSend.call(v, _, g) || f)) return _.abort(); 2799 if (l = "abort", w.add(g.complete), _.done(g.success), _.fail(g.error), u = Ft(Dt, g, t, _)) { 2800 if (_.readyState = 1, m && y.trigger("ajaxSend", [_, g]), f) return _; 2801 g.async && 0 < g.timeout && (p = T.setTimeout(function() { 2802 _.abort("timeout") 2803 }, g.timeout)); 2804 try { 2805 f = !1, u.send(a, c) 2806 } catch (e) { 2807 if (f) throw e; 2808 c(-1, e) 2809 } 2810 } else c(-1, "No Transport"); 2811 2812 function c(e, t, i, n) { 2813 var r, o, a, s, l, c = t; 2814 f || (f = !0, p && T.clearTimeout(p), u = void 0, d = n || "", _.readyState = 0 < e ? 4 : 0, r = 200 <= e && e < 300 || 304 === e, i && (s = function(e, t, i) { 2815 for (var n, r, o, a, s = e.contents, l = e.dataTypes; 2816 "*" === l[0];) l.shift(), void 0 === n && (n = e.mimeType || t.getResponseHeader("Content-Type")); 2817 if (n) 2818 for (r in s) 2819 if (s[r] && s[r].test(n)) { 2820 l.unshift(r); 2821 break 2822 } 2823 if (l[0] in i) o = l[0]; 2824 else { 2825 for (r in i) { 2826 if (!l[0] || e.converters[r + " " + l[0]]) { 2827 o = r; 2828 break 2829 } 2830 a || (a = r) 2831 } 2832 o = o || a 2833 } 2834 if (o) return o !== l[0] && l.unshift(o), i[o] 2835 }(g, _, i)), s = function(e, t, i, n) { 2836 var r, o, a, s, l, c = {}, 2837 u = e.dataTypes.slice(); 2838 if (u[1]) 2839 for (a in e.converters) c[a.toLowerCase()] = e.converters[a]; 2840 for (o = u.shift(); o;) 2841 if (e.responseFields[o] && (i[e.responseFields[o]] = t), !l && n && e.dataFilter && (t = e.dataFilter(t, e.dataType)), l = o, o = u.shift()) 2842 if ("*" === o) o = l; 2843 else if ("*" !== l && l !== o) { 2844 if (!(a = c[l + " " + o] || c["* " + o])) 2845 for (r in c) 2846 if ((s = r.split(" "))[1] === o && (a = c[l + " " + s[0]] || c["* " + s[0]])) { 2847 !0 === a ? a = c[r] : !0 !== c[r] && (o = s[0], u.unshift(s[1])); 2848 break 2849 } 2850 if (!0 !== a) 2851 if (a && e.throws) t = a(t); 2852 else try { 2853 t = a(t) 2854 } catch (e) { 2855 return { 2856 state: "parsererror", 2857 error: a ? e : "No conversion from " + l + " to " + o 2858 } 2859 } 2860 } 2861 return { 2862 state: "success", 2863 data: t 2864 } 2865 }(g, s, _, r), r ? (g.ifModified && ((l = _.getResponseHeader("Last-Modified")) && (M.lastModified[h] = l), (l = _.getResponseHeader("etag")) && (M.etag[h] = l)), 204 === e || "HEAD" === g.type ? c = "nocontent" : 304 === e ? c = "notmodified" : (c = s.state, o = s.data, r = !(a = s.error))) : (a = c, !e && c || (c = "error", e < 0 && (e = 0))), _.status = e, _.statusText = (t || c) + "", r ? b.resolveWith(v, [o, c, _]) : b.rejectWith(v, [_, c, a]), _.statusCode(x), x = void 0, m && y.trigger(r ? "ajaxSuccess" : "ajaxError", [_, g, r ? o : a]), w.fireWith(v, [_, c]), m && (y.trigger("ajaxComplete", [_, g]), --M.active || M.event.trigger("ajaxStop"))) 2866 } 2867 return _ 2868 }, 2869 getJSON: function(e, t, i) { 2870 return M.get(e, t, i, "json") 2871 }, 2872 getScript: function(e, t) { 2873 return M.get(e, void 0, t, "script") 2874 } 2875 }), M.each(["get", "post"], function(e, r) { 2876 M[r] = function(e, t, i, n) { 2877 return y(t) && (n = n || i, i = t, t = void 0), M.ajax(M.extend({ 2878 url: e, 2879 type: r, 2880 dataType: n, 2881 data: t, 2882 success: i 2883 }, M.isPlainObject(e) && e)) 2884 } 2885 }), M._evalUrl = function(e) { 2886 return M.ajax({ 2887 url: e, 2888 type: "GET", 2889 dataType: "script", 2890 cache: !0, 2891 async: !1, 2892 global: !1, 2893 throws: !0 2894 }) 2895 }, M.fn.extend({ 2896 wrapAll: function(e) { 2897 var t; 2898 return this[0] && (y(e) && (e = e.call(this[0])), t = M(e, this[0].ownerDocument).eq(0).clone(!0), this[0].parentNode && t.insertBefore(this[0]), t.map(function() { 2899 for (var e = this; e.firstElementChild;) e = e.firstElementChild; 2900 return e 2901 }).append(this)), this 2902 }, 2903 wrapInner: function(i) { 2904 return y(i) ? this.each(function(e) { 2905 M(this).wrapInner(i.call(this, e)) 2906 }) : this.each(function() { 2907 var e = M(this), 2908 t = e.contents(); 2909 t.length ? t.wrapAll(i) : e.append(i) 2910 }) 2911 }, 2912 wrap: function(t) { 2913 var i = y(t); 2914 return this.each(function(e) { 2915 M(this).wrapAll(i ? t.call(this, e) : t) 2916 }) 2917 }, 2918 unwrap: function(e) { 2919 return this.parent(e).not("body").each(function() { 2920 M(this).replaceWith(this.childNodes) 2921 }), this 2922 } 2923 }), M.expr.pseudos.hidden = function(e) { 2924 return !M.expr.pseudos.visible(e) 2925 }, M.expr.pseudos.visible = function(e) { 2926 return !!(e.offsetWidth || e.offsetHeight || e.getClientRects().length) 2927 }, M.ajaxSettings.xhr = function() { 2928 try { 2929 return new T.XMLHttpRequest 2930 } catch (e) {} 2931 }; 2932 var Bt = { 2933 0: 200, 2934 1223: 204 2935 }, 2936 Ht = M.ajaxSettings.xhr(); 2937 v.cors = !!Ht && "withCredentials" in Ht, v.ajax = Ht = !!Ht, M.ajaxTransport(function(r) { 2938 var o, a; 2939 if (v.cors || Ht && !r.crossDomain) return { 2940 send: function(e, t) { 2941 var i, n = r.xhr(); 2942 if (n.open(r.type, r.url, r.async, r.username, r.password), r.xhrFields) 2943 for (i in r.xhrFields) n[i] = r.xhrFields[i]; 2944 for (i in r.mimeType && n.overrideMimeType && n.overrideMimeType(r.mimeType), r.crossDomain || e["X-Requested-With"] || (e["X-Requested-With"] = "XMLHttpRequest"), e) n.setRequestHeader(i, e[i]); 2945 o = function(e) { 2946 return function() { 2947 o && (o = a = n.onload = n.onerror = n.onabort = n.ontimeout = n.onreadystatechange = null, "abort" === e ? n.abort() : "error" === e ? "number" != typeof n.status ? t(0, "error") : t(n.status, n.statusText) : t(Bt[n.status] || n.status, n.statusText, "text" !== (n.responseType || "text") || "string" != typeof n.responseText ? { 2948 binary: n.response 2949 } : { 2950 text: n.responseText 2951 }, n.getAllResponseHeaders())) 2952 } 2953 }, n.onload = o(), a = n.onerror = n.ontimeout = o("error"), void 0 !== n.onabort ? n.onabort = a : n.onreadystatechange = function() { 2954 4 === n.readyState && T.setTimeout(function() { 2955 o && a() 2956 }) 2957 }, o = o("abort"); 2958 try { 2959 n.send(r.hasContent && r.data || null) 2960 } catch (e) { 2961 if (o) throw e 2962 } 2963 }, 2964 abort: function() { 2965 o && o() 2966 } 2967 } 2968 }), M.ajaxPrefilter(function(e) { 2969 e.crossDomain && (e.contents.script = !1) 2970 }), M.ajaxSetup({ 2971 accepts: { 2972 script: "text/javascript, application/javascript, application/ecmascript, application/x-ecmascript" 2973 }, 2974 contents: { 2975 script: /\b(?:java|ecma)script\b/ 2976 }, 2977 converters: { 2978 "text script": function(e) { 2979 return M.globalEval(e), e 2980 } 2981 } 2982 }), M.ajaxPrefilter("script", function(e) { 2983 void 0 === e.cache && (e.cache = !1), e.crossDomain && (e.type = "GET") 2984 }), M.ajaxTransport("script", function(i) { 2985 var n, r; 2986 if (i.crossDomain) return { 2987 send: function(e, t) { 2988 n = M("<script>").prop({ 2989 charset: i.scriptCharset, 2990 src: i.url 2991 }).on("load error", r = function(e) { 2992 n.remove(), r = null, e && t("error" === e.type ? 404 : 200, e.type) 2993 }), E.head.appendChild(n[0]) 2994 }, 2995 abort: function() { 2996 r && r() 2997 } 2998 } 2999 }); 3000 var $t, jt = [], 3001 Gt = /(=)\?(?=&|$)|\?\?/; 3002 M.ajaxSetup({ 3003 jsonp: "callback", 3004 jsonpCallback: function() { 3005 var e = jt.pop() || M.expando + "_" + wt++; 3006 return this[e] = !0, e 3007 } 3008 }), M.ajaxPrefilter("json jsonp", function(e, t, i) { 3009 var n, r, o, a = !1 !== e.jsonp && (Gt.test(e.url) ? "url" : "string" == typeof e.data && 0 === (e.contentType || "").indexOf("application/x-www-form-urlencoded") && Gt.test(e.data) && "data"); 3010 if (a || "jsonp" === e.dataTypes[0]) return n = e.jsonpCallback = y(e.jsonpCallback) ? e.jsonpCallback() : e.jsonpCallback, a ? e[a] = e[a].replace(Gt, "$1" + n) : !1 !== e.jsonp && (e.url += (xt.test(e.url) ? "&" : "?") + e.jsonp + "=" + n), e.converters["script json"] = function() { 3011 return o || M.error(n + " was not called"), o[0] 3012 }, e.dataTypes[0] = "json", r = T[n], T[n] = function() { 3013 o = arguments 3014 }, i.always(function() { 3015 void 0 === r ? M(T).removeProp(n) : T[n] = r, e[n] && (e.jsonpCallback = t.jsonpCallback, jt.push(n)), o && y(r) && r(o[0]), o = r = void 0 3016 }), "script" 3017 }), v.createHTMLDocument = (($t = E.implementation.createHTMLDocument("").body).innerHTML = "<form></form><form></form>", 2 === $t.childNodes.length), M.parseHTML = function(e, t, i) { 3018 return "string" != typeof e ? [] : ("boolean" == typeof t && (i = t, t = !1), t || (v.createHTMLDocument ? ((n = (t = E.implementation.createHTMLDocument("")).createElement("base")).href = E.location.href, t.head.appendChild(n)) : t = E), o = !i && [], (r = A.exec(e)) ? [t.createElement(r[1])] : (r = ve([e], t, o), o && o.length && M(o).remove(), M.merge([], r.childNodes))); 3019 var n, r, o 3020 }, M.fn.load = function(e, t, i) { 3021 var n, r, o, a = this, 3022 s = e.indexOf(" "); 3023 return -1 < s && (n = pt(e.slice(s)), e = e.slice(0, s)), y(t) ? (i = t, t = void 0) : t && "object" == typeof t && (r = "POST"), 0 < a.length && M.ajax({ 3024 url: e, 3025 type: r || "GET", 3026 dataType: "html", 3027 data: t 3028 }).done(function(e) { 3029 o = arguments, a.html(n ? M("<div>").append(M.parseHTML(e)).find(n) : e) 3030 }).always(i && function(e, t) { 3031 a.each(function() { 3032 i.apply(this, o || [e.responseText, t, e]) 3033 }) 3034 }), this 3035 }, M.each(["ajaxStart", "ajaxStop", "ajaxComplete", "ajaxError", "ajaxSuccess", "ajaxSend"], function(e, t) { 3036 M.fn[t] = function(e) { 3037 return this.on(t, e) 3038 } 3039 }), M.expr.pseudos.animated = function(t) { 3040 return M.grep(M.timers, function(e) { 3041 return t === e.elem 3042 }).length 3043 }, M.offset = { 3044 setOffset: function(e, t, i) { 3045 var n, r, o, a, s, l, c = M.css(e, "position"), 3046 u = M(e), 3047 h = {}; 3048 "static" === c && (e.style.position = "relative"), s = u.offset(), o = M.css(e, "top"), l = M.css(e, "left"), ("absolute" === c || "fixed" === c) && -1 < (o + l).indexOf("auto") ? (a = (n = u.position()).top, r = n.left) : (a = parseFloat(o) || 0, r = parseFloat(l) || 0), y(t) && (t = t.call(e, i, M.extend({}, s))), null != t.top && (h.top = t.top - s.top + a), null != t.left && (h.left = t.left - s.left + r), "using" in t ? t.using.call(e, h) : u.css(h) 3049 } 3050 }, M.fn.extend({ 3051 offset: function(t) { 3052 if (arguments.length) return void 0 === t ? this : this.each(function(e) { 3053 M.offset.setOffset(this, t, e) 3054 }); 3055 var e, i, n = this[0]; 3056 return n ? n.getClientRects().length ? (e = n.getBoundingClientRect(), i = n.ownerDocument.defaultView, { 3057 top: e.top + i.pageYOffset, 3058 left: e.left + i.pageXOffset 3059 }) : { 3060 top: 0, 3061 left: 0 3062 } : void 0 3063 }, 3064 position: function() { 3065 if (this[0]) { 3066 var e, t, i, n = this[0], 3067 r = { 3068 top: 0, 3069 left: 0 3070 }; 3071 if ("fixed" === M.css(n, "position")) t = n.getBoundingClientRect(); 3072 else { 3073 for (t = this.offset(), i = n.ownerDocument, e = n.offsetParent || i.documentElement; e && (e === i.body || e === i.documentElement) && "static" === M.css(e, "position");) e = e.parentNode; 3074 e && e !== n && 1 === e.nodeType && ((r = M(e).offset()).top += M.css(e, "borderTopWidth", !0), r.left += M.css(e, "borderLeftWidth", !0)) 3075 } 3076 return { 3077 top: t.top - r.top - M.css(n, "marginTop", !0), 3078 left: t.left - r.left - M.css(n, "marginLeft", !0) 3079 } 3080 } 3081 }, 3082 offsetParent: function() { 3083 return this.map(function() { 3084 for (var e = this.offsetParent; e && "static" === M.css(e, "position");) e = e.offsetParent; 3085 return e || ye 3086 }) 3087 } 3088 }), M.each({ 3089 scrollLeft: "pageXOffset", 3090 scrollTop: "pageYOffset" 3091 }, function(t, r) { 3092 var o = "pageYOffset" === r; 3093 M.fn[t] = function(e) { 3094 return $(this, function(e, t, i) { 3095 var n;
3096 if (b(e) ? n = e : 9 === e.nodeType && (n = e.defaultView), void 0 === i) return n ? n[r] : e[t]; 3097 n ? n.scrollTo(o ? n.pageXOffset : i, o ? i : n.pageYOffset) : e[t] = i 3098 }, t, e, arguments.length) 3099 } 3100 }), M.each(["top", "left"], function(e, i) { 3101 M.cssHooks[i] = Be(v.pixelPosition, function(e, t) { 3102 if (t) return t = Ue(e, i), ze.test(t) ? M(e).position()[i] + "px" : t 3103 }) 3104 }), M.each({ 3105 Height: "height", 3106 Width: "width" 3107 }, function(a, s) { 3108 M.each({ 3109 padding: "inner" + a, 3110 content: s, 3111 "": "outer" + a 3112 }, function(n, o) { 3113 M.fn[o] = function(e, t) { 3114 var i = arguments.length && (n || "boolean" != typeof e), 3115 r = n || (!0 === e || !0 === t ? "margin" : "border"); 3116 return $(this, function(e, t, i) { 3117 var n; 3118 return b(e) ? 0 === o.indexOf("outer") ? e["inner" + a] : e.document.documentElement["client" + a] : 9 === e.nodeType ? (n = e.documentElement, Math.max(e.body["scroll" + a], n["scroll" + a], e.body["offset" + a], n["offset" + a], n["client" + a])) : void 0 === i ? M.css(e, t, r) : M.style(e, t, i, r) 3119 }, s, i ? e : void 0, i) 3120 } 3121 }) 3122 }), M.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "), function(e, i) { 3123 M.fn[i] = function(e, t) { 3124 return 0 < arguments.length ? this.on(i, null, e, t) : this.trigger(i) 3125 } 3126 }), M.fn.extend({ 3127 hover: function(e, t) { 3128 return this.mouseenter(e).mouseleave(t || e) 3129 } 3130 }), M.fn.extend({ 3131 bind: function(e, t, i) { 3132 return this.on(e, null, t, i) 3133 }, 3134 unbind: function(e, t) { 3135 return this.off(e, null, t) 3136 }, 3137 delegate: function(e, t, i, n) { 3138 return this.on(t, e, i, n) 3139 }, 3140 undelegate: function(e, t, i) { 3141 return 1 === arguments.length ? this.off(e, "**") : this.off(t, e || "**", i) 3142 } 3143 }), M.proxy = function(e, t) { 3144 var i, n, r; 3145 if ("string" == typeof t && (i = e[t], t = e, e = i), y(e)) return n = s.call(arguments, 2), (r = function() { 3146 return e.apply(t || this, n.concat(s.call(arguments))) 3147 }).guid = e.guid = e.guid || M.guid++, r 3148 }, M.holdReady = function(e) { 3149 e ? M.readyWait++ : M.ready(!0) 3150 }, M.isArray = Array.isArray, M.parseJSON = JSON.parse, M.nodeName = C, M.isFunction = y, M.isWindow = b, M.camelCase = W, M.type = x, M.now = Date.now, M.isNumeric = function(e) { 3151 var t = M.type(e); 3152 return ("number" === t || "string" === t) && !isNaN(e - parseFloat(e)) 3153 }, "function" == typeof define && define.amd && define("jquery", [], function() { 3154 return M 3155 }); 3156 var Vt = T.jQuery, 3157 Wt = T.$; 3158 return M.noConflict = function(e) { 3159 return T.$ === M && (T.$ = Wt), e && T.jQuery === M && (T.jQuery = Vt), M 3160 }, e || (T.jQuery = T.$ = M), M 3161}), 3162function(e) { 3163 var t = !1; 3164 if ("function" == typeof define && define.amd && (define(e), t = !0), "object" == typeof exports && (module.exports = e(), t = !0), !t) { 3165 var i = window.Cookies, 3166 n = window.Cookies = e(); 3167 n.noConflict = function() { 3168 return window.Cookies = i, n 3169 } 3170 } 3171}(function() { 3172 function m() { 3173 for (var e = 0, t = {}; e < arguments.length; e++) { 3174 var i = arguments[e]; 3175 for (var n in i) t[n] = i[n] 3176 } 3177 return t 3178 } 3179 return function e(p) { 3180 function f(e, t, i) { 3181 var n; 3182 if ("undefined" != typeof document) { 3183 if (1 < arguments.length) { 3184 if ("number" == typeof(i = m({ 3185 path: "/" 3186 }, f.defaults, i)).expires) { 3187 var r = new Date; 3188 r.setMilliseconds(r.getMilliseconds() + 864e5 * i.expires), i.expires = r 3189 } 3190 i.expires = i.expires ? i.expires.toUTCString() : ""; 3191 try { 3192 n = JSON.stringify(t), /^[\{\[]/.test(n) && (t = n) 3193 } catch (e) {} 3194 t = p.write ? p.write(t, e) : encodeURIComponent(String(t)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g, decodeURIComponent), e = (e = (e = encodeURIComponent(String(e))).replace(/%(23|24|26|2B|5E|60|7C)/g, decodeURIComponent)).replace(/[\(\)]/g, escape); 3195 var o = ""; 3196 for (var a in i) i[a] && (o += "; " + a, !0 !== i[a] && (o += "=" + i[a])); 3197 return document.cookie = e + "=" + t + o 3198 } 3199 e || (n = {}); 3200 for (var s = document.cookie ? document.cookie.split("; ") : [], l = /(%[0-9A-Z]{2})+/g, c = 0; c < s.length; c++) { 3201 var u = s[c].split("="), 3202 h = u.slice(1).join("="); 3203 this.json || '"' !== h.charAt(0) || (h = h.slice(1, -1)); 3204 try { 3205 var d = u[0].replace(l, decodeURIComponent); 3206 if (h = p.read ? p.read(h, d) : p(h, d) || h.replace(l, decodeURIComponent), this.json) try { 3207 h = JSON.parse(h) 3208 } catch (e) {} 3209 if (e === d) { 3210 n = h; 3211 break 3212 } 3213 e || (n[d] = h) 3214 } catch (e) {} 3215 } 3216 return n 3217 } 3218 } 3219 return (f.set = f).get = function(e) { 3220 return f.call(f, e) 3221 }, f.getJSON = function() { 3222 return f.apply({ 3223 json: !0 3224 }, [].slice.call(arguments)) 3225 }, f.defaults = {}, f.remove = function(e, t) { 3226 f(e, "", m(t, { 3227 expires: -1 3228 })) 3229 }, f.withConverter = e, f 3230 }(function() {}) 3231}), 3232function(e, t) { 3233 "object" == typeof exports && "object" == typeof module ? module.exports = t() : "function" == typeof define && define.amd ? define("Navigo", [], t) : "object" == typeof exports ? exports.Navigo = t() : e.Navigo = t() 3234}(this, function() { 3235 return function(i) { 3236 function n(e) { 3237 if (r[e]) return r[e].exports; 3238 var t = r[e] = { 3239 exports: {}, 3240 id: e, 3241 loaded: !1 3242 };
3243 return i[e].call(t.exports, t, t.exports, n), t.loaded = !0, t.exports 3244 } 3245 var r = {}; 3246 return n.m = i, n.c = r, n.p = "", n(0) 3247 }([function(e, t) { 3248 "use strict"; 3249 3250 function s() { 3251 return !("undefined" == typeof window || !window.history || !window.history.pushState) 3252 } 3253 3254 function h(e, t, i) { 3255 this.root = null, this._routes = [], this._useHash = t, this._hash = void 0 === i ? "#" : i, this._paused = !1, this._destroyed = !1, this._lastRouteResolved = null, this._notFoundHandler = null, this._defaultHandler = null, this._usePushState = !t && s(), this._onLocationChange = this._onLocationChange.bind(this), this._genericHooks = null, this._historyAPIUpdateMethod = "pushState", e ? this.root = t ? e.replace(/\/$/, "/" + this._hash) : e.replace(/\/$/, "") : t && (this.root = this._cLoc().split(this._hash)[0].replace(/\/$/, "/" + this._hash)), this._listen(), this.updatePageLinks() 3256 } 3257 3258 function d(e) { 3259 return e instanceof RegExp ? e : e.replace(/\/+$/, "").replace(/^\/+/, "^/") 3260 } 3261 3262 function i(e) { 3263 return e.replace(/\/$/, "").split("/").length 3264 } 3265 3266 function o(e, t) { 3267 return i(t) - i(e) 3268 } 3269 3270 function n(u) { 3271 return (1 < arguments.length && void 0 !== arguments[1] ? arguments[1] : []).map(function(e) { 3272 var t, n, i, r, o = (i = d(e.route), r = [], { 3273 regexp: i instanceof RegExp ? i : new RegExp(i.replace(h.PARAMETER_REGEXP, function(e, t, i) { 3274 return r.push(i), h.REPLACE_VARIABLE_REGEXP 3275 }).replace(h.WILDCARD_REGEXP, h.REPLACE_WILDCARD) + h.FOLLOWED_BY_SLASH_REGEXP, h.MATCH_REGEXP_FLAGS), 3276 paramNames: r 3277 }), 3278 a = o.regexp, 3279 s = o.paramNames, 3280 l = u.replace(/^\/+/, "/").match(a), 3281 c = (t = l, 0 === (n = s).length ? null : t ? t.slice(1, t.length).reduce(function(e, t, i) { 3282 return null === e && (e = {}), e[n[i]] = decodeURIComponent(t), e 3283 }, null) : null); 3284 return !!l && { 3285 match: l, 3286 route: e, 3287 params: c 3288 } 3289 }).filter(function(e) { 3290 return e 3291 }) 3292 } 3293 3294 function l(e, t) { 3295 return n(e, t)[0] || !1 3296 } 3297 3298 function r(t, e) { 3299 var i = e.map(function(e) { 3300 return "" === e.route || "*" === e.route ? t : t.split(new RegExp(e.route + "($|/)"))[0] 3301 }), 3302 n = d(t); 3303 return 1 < i.length ? i.reduce(function(e, t) { 3304 return e.length > t.length && (e = t), e 3305 }, i[0]) : 1 === i.length ? i[0] : n 3306 } 3307 3308 function c(e, t, i) { 3309 var n, r = e, 3310 o = function(e) { 3311 return e.split(/\?(.*)?$/)[0] 3312 }; 3313 return void 0 === i && (i = "#"), s() && !t ? r = o(e).split(i)[0] : r = o(1 < (n = e.split(i)).length ? n[1] : n[0]), r 3314 } 3315 3316 function u(e, t, i) { 3317 return t && "object" === (void 0 === t ? "undefined" : a(t)) ? void(t.before ? t.before(function() { 3318 (!(0 < arguments.length && void 0 !== arguments[0]) || arguments[0]) && (e(), t.after && t.after(i)) 3319 }, i) : t.after && (e(), t.after && t.after(i))) : void e() 3320 } 3321 Object.defineProperty(t, "__esModule", { 3322 value: !0 3323 }); 3324 var a = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(e) { 3325 return typeof e 3326 } : function(e) { 3327 return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e 3328 }; 3329 h.prototype = { 3330 helpers: { 3331 match: l, 3332 root: r, 3333 clean: d, 3334 getOnlyURL: c 3335 }, 3336 navigate: function(e, t) { 3337 var i; 3338 return e = e || "", this._usePushState ? (i = (i = (t ? "" : this._getRoot() + "/") + e.replace(/^\/+/, "/")).replace(/([^:])(\/{2,})/g, "$1/"), history[this._historyAPIUpdateMethod]({}, "", i), this.resolve()) : "undefined" != typeof window && (e = e.replace(new RegExp("^" + this._hash), ""), window.location.href = window.location.href.replace(/#$/, "").replace(new RegExp(this._hash + ".*$"), "") + this._hash + e), this 3339 }, 3340 on: function() { 3341 for (var t = this, e = arguments.length, i = Array(e), n = 0; n < e; n++) i[n] = arguments[n]; 3342 if ("function" == typeof i[0]) this._defaultHandler = { 3343 handler: i[0], 3344 hooks: i[1] 3345 }; 3346 else if (2 <= i.length) 3347 if ("/" === i[0]) {
3348 var r = i[1]; 3349 "object" === a(i[1]) && (r = i[1].uses), this._defaultHandler = { 3350 handler: r, 3351 hooks: i[2] 3352 } 3353 } else this._add(i[0], i[1], i[2]); 3354 else if ("object" === a(i[0])) { 3355 Object.keys(i[0]).sort(o).forEach(function(e) { 3356 t.on(e, i[0][e]) 3357 }) 3358 } 3359 return this 3360 }, 3361 off: function(i) { 3362 return null !== this._defaultHandler && i === this._defaultHandler.handler ? this._defaultHandler = null : null !== this._notFoundHandler && i === this._notFoundHandler.handler && (this._notFoundHandler = null), this._routes = this._routes.reduce(function(e, t) { 3363 return t.handler !== i && e.push(t), e 3364 }, []), this 3365 }, 3366 notFound: function(e, t) { 3367 return this._notFoundHandler = { 3368 handler: e, 3369 hooks: t 3370 }, this 3371 }, 3372 resolve: function(e) { 3373 var t, i, n = this, 3374 r = (e || this._cLoc()).replace(this._getRoot(), ""); 3375 this._useHash && (r = r.replace(new RegExp("^/" + this._hash), "/")); 3376 var o = (e || this._cLoc()).split(/\?(.*)?$/).slice(1).join(""), 3377 a = c(r, this._useHash, this._hash); 3378 return !this._paused && (this._lastRouteResolved && a === this._lastRouteResolved.url && o === this._lastRouteResolved.query ? (this._lastRouteResolved.hooks && this._lastRouteResolved.hooks.already && this._lastRouteResolved.hooks.already(this._lastRouteResolved.params), !1) : (i = l(a, this._routes)) ? (this._callLeave(), this._lastRouteResolved = { 3379 url: a, 3380 query: o, 3381 hooks: i.route.hooks, 3382 params: i.params, 3383 name: i.route.name 3384 }, t = i.route.handler, u(function() { 3385 u(function() { 3386 i.route.route instanceof RegExp ? t.apply(void 0, function(e) { 3387 if (Array.isArray(e)) { 3388 for (var t = 0, i = Array(e.length); t < e.length; t++) i[t] = e[t]; 3389 return i 3390 } 3391 return Array.from(e) 3392 }(i.match.slice(1, i.match.length))) : t(i.params, o) 3393 }, i.route.hooks, i.params, n._genericHooks) 3394 }, this._genericHooks, i.params), i) : this._defaultHandler && ("" === a || "/" === a || a === this._hash || function(e, t, i) { 3395 if (s() && !t) return !1; 3396 if (!e.match(i)) return !1; 3397 var n = e.split(i); 3398 return n.length < 2 || "" === n[1] 3399 }(a, this._useHash, this._hash)) ? (u(function() { 3400 u(function() { 3401 n._callLeave(), n._lastRouteResolved = { 3402 url: a, 3403 query: o, 3404 hooks: n._defaultHandler.hooks 3405 }, n._defaultHandler.handler(o) 3406 }, n._defaultHandler.hooks) 3407 }, this._genericHooks), !0) : (this._notFoundHandler && u(function() { 3408 u(function() { 3409 n._callLeave(), n._lastRouteResolved = { 3410 url: a, 3411 query: o, 3412 hooks: n._notFoundHandler.hooks 3413 }, n._notFoundHandler.handler(o) 3414 }, n._notFoundHandler.hooks) 3415 }, this._genericHooks), !1)) 3416 }, 3417 destroy: function() { 3418 this._routes = [], this._destroyed = !0, clearTimeout(this._listeningInterval), "undefined" != typeof window && (window.removeEventListener("popstate", this._onLocationChange), window.removeEventListener("hashchange", this._onLocationChange)) 3419 }, 3420 updatePageLinks: function() { 3421 var n = this; 3422 "undefined" != typeof document && this._findLinks().forEac
3422h(function(i) { 3423 i.hasListenerAttached || (i.addEventListener("click", function(e) { 3424 var t = n.getLinkPath(i); 3425 n._destroyed || (e.preventDefault(), n.navigate(t.replace(/\/+$/, "").replace(/^\/+/, "/"))) 3426 }), i.hasListenerAttached = !0) 3427 }) 3428 }, 3429 generate: function(n) { 3430 var r = 1 < arguments.length && void 0 !== arguments[1] ? arguments[1] : {}, 3431 e = this._routes.reduce(function(e, t) { 3432 var i; 3433 if (t.name === n) 3434 for (i in e = t.route, r) e = e.toString().replace(":" + i, r[i]); 3435 return e 3436 }, ""); 3437 return this._useHash ? this._hash + e : e 3438 }, 3439 link: function(e) { 3440 return this._getRoot() + e 3441 }, 3442 pause: function() { 3443 var e = !(0 < arguments.length && void 0 !== arguments[0]) || arguments[0]; 3444 this._paused = e, this._historyAPIUpdateMethod = e ? "replaceState" : "pushState" 3445 }, 3446 resume: function() { 3447 this.pause(!1) 3448 }, 3449 historyAPIUpdateMethod: function(e) { 3450 return void 0 === e ? this._historyAPIUpdateMethod : this._historyAPIUpdateMethod = e 3451 }, 3452 disableIfAPINotAvailable: function() { 3453 s() || this.destroy() 3454 }, 3455 lastRouteResolved: function() { 3456 return this._lastRouteResolved 3457 }, 3458 getLinkPath: function(e) { 3459 return e.pathname || e.getAttribute("href") 3460 }, 3461 hooks: function(e) { 3462 this._genericHooks = e 3463 }, 3464 _add: function(e) { 3465 var t = 1 < arguments.length && void 0 !== arguments[1] ? arguments[1] : null, 3466 i = 2 < arguments.length && void 0 !== arguments[2] ? arguments[2] : null; 3467 return "string" == typeof e && (e = encodeURI(e)), "object" === (void 0 === t ? "undefined" : a(t)) ? this._routes.push({ 3468 route: e, 3469 handler: t.uses, 3470 name: t.as, 3471 hooks: i || t.hooks 3472 }) : this._routes.push({ 3473 route: e, 3474 handler: t, 3475 hooks: i 3476 }), this._add 3477 }, 3478 _getRoot: function() { 3479 return null !== this.root || (this.root = r(this._cLoc().split("?")[0], this._routes)), this.root 3480 }, 3481 _listen: function() { 3482 var e = this; 3483 if (this._usePushState) window.addEventListener("popstate", this._onLocationChange); 3484 else if ("undefined" != typeof window && "onhashchange" in window) window.addEventListener("hashchange", this._onLocationChange); 3485 else { 3486 var t = this._cLoc(), 3487 i = void 0, 3488 n = void 0; 3489 (n = function() { 3490 i = e._cLoc(), t !== i && (t = i, e.resolve()), e._listeningInterval = setTimeout(n, 200) 3491 })() 3492 } 3493 }, 3494 _cLoc: function() { 3495 return "undefined" != typeof window ? void 0 !== window.__NAVIGO_WINDOW_LOCATION_MOCK__ ? window.__NAVIGO_WINDOW_LOCATION_MOCK__ : d(window.location.href) : "" 3496 }, 3497 _findLinks: function() { 3498 return [].slice.call(document.querySelectorAll("[data-navigo]")) 3499 }, 3500 _onLocationChange: function() { 3501 this.resolve() 3502 }, 3503 _callLeave: function() { 3504 this._lastRouteResolved && this._lastRouteResolved.hooks && this._lastRouteResolved.hooks.leave && this._lastRouteResolved.hooks.leave() 3505 } 3506 }, h.PARAMETER_REGEXP = /([:*])(\w+)/g, h.WILDCARD_REGEXP = /\*/g, h.REPLACE_VARIABLE_REGEXP = "([^/]+)", h.REPLACE_WILDCARD = "(?:.*)", h.FOLLOWED_BY_SLASH_REGEXP = "(?:/$|$)", h.MATCH_REGEXP_FLAGS = "", t.default = h, e.exports = t.default 3507 }]) 3508}), 3509function(e, t) { 3510 "object" == typeof exports && "undefined" != typeof module ? t(exports) : "function" == typeof define && define.amd ? define(["exports"], t) : t(e.THREE = e.THREE || {}) 3511}(this, function(e) { 3512 "use strict"; 3513 3514 function t() {} 3515 void 0 === Number.EPSILON && (Number.EPSILON = Math.pow(2, -52)), void 0 === Number.isInteger && (Number.isInteger = function(e) { 3516 return "number" == typeof e && isFinite(e) && Math.floor(e) === e 3517 }), void 0 === Math.sign && (Math.sign = function(e) { 3518 return e < 0 ? -1 : 0 < e ? 1 : +e 3519 }
vendor: 8,433 bytes, lines 3519-3799
3519), void 0 === Function.prototype.name && Object.defineProperty(Function.prototype, "name", { 3520 get: function() { 3521 return this.toString().match(/^\s*function\s*([^\(\s]*)/)[1] 3522 } 3523 }), void 0 === Object.assign && (Object.assign = function(e) { 3524 if (null == e) throw new TypeError("Cannot convert undefined or null to object"); 3525 for (var t = Object(e), i = 1; i < arguments.length; i++) { 3526 var n = arguments[i]; 3527 if (null != n) 3528 for (var r in n) Object.prototype.hasOwnProperty.call(n, r) && (t[r] = n[r]) 3529 } 3530 return t 3531 }), Object.assign(t.prototype, { 3532 addEventListener: function(e, t) { 3533 void 0 === this._listeners && (this._listeners = {}); 3534 var i = this._listeners; 3535 void 0 === i[e] && (i[e] = []), -1 === i[e].indexOf(t) && i[e].push(t) 3536 }, 3537 hasEventListener: function(e, t) { 3538 if (void 0 === this._listeners) return !1; 3539 var i = this._listeners; 3540 return void 0 !== i[e] && -1 !== i[e].indexOf(t) 3541 }, 3542 removeEventListener: function(e, t) { 3543 if (void 0 !== this._listeners) { 3544 var i = this._listeners[e]; 3545 if (void 0 !== i) { 3546 var n = i.indexOf(t); - 1 !== n && i.splice(n, 1) 3547 } 3548 } 3549 }, 3550 dispatchEvent: function(e) { 3551 if (void 0 !== this._listeners) { 3552 var t = this._listeners[e.type]; 3553 if (void 0 !== t) { 3554 e.target = this; 3555 for (var i = t.slice(0), n = 0, r = i.length; n < r; n++) i[n].call(this, e) 3556 } 3557 } 3558 } 3559 }); 3560 var i, n, r, o, a, s, $ = 0, 3561 j = 1, 3562 G = 2, 3563 N = 1, 3564 F = 2, 3565 I = 0, 3566 Y = 1, 3567 Z = 2, 3568 Ce = 0, 3569 V = 0, 3570 W = 1, 3571 q = 2, 3572 X = 3, 3573 Q = 4, 3574 J = 5, 3575 l = 100, 3576 c = 101, 3577 u = 102, 3578 h = 103, 3579 d = 104, 3580 p = 200, 3581 f = 201, 3582 m = 202, 3583 g = 203, 3584 v = 204, 3585 y = 205, 3586 b = 206, 3587 w = 207, 3588 x = 208, 3589 _ = 209, 3590 T = 210, 3591 K = 0, 3592 ee = 1, 3593 te = 2, 3594 ie = 3, 3595 ne = 4, 3596 re = 5, 3597 oe = 6, 3598 ae = 7, 3599 U = 0, 3600 B = 1, 3601 H = 2, 3602 se = 0, 3603 Ae = 1, 3604 le = 2, 3605 ce = 3, 3606 ue = 4, 3607 he = 301, 3608 de = 302, 3609 pe = 303, 3610 fe = 304, 3611 me = 305, 3612 ge = 306, 3613 ve = 307, 3614 E = 1e3, 3615 M = 1001, 3616 S = 1002, 3617 z = 1003, 3618 C = 1004, 3619 A = 1005, 3620 R = 1006, 3621 L = 1007, 3622 P = 1008, 3623 Re = 1009, 3624 k = 1010, 3625 O = 1011, 3626 D = 1012, 3627 ye = 1013, 3628 be = 1014, 3629 Le = 1015, 3630 Pe = 1016, 3631 we = 1017, 3632 xe = 1018, 3633 _e = 1019, 3634 Te = 1020, 3635 Ee = 1021, 3636 Me = 1022, 3637 ke = 1023, 3638 Se = 1024, 3639 Oe = 1025, 3640 De = ke, 3641 Ie = 1026, 3642 ze = 1027, 3643 Ne = 2001, 3644 Fe = 2002, 3645 Ue = 2003, 3646 Be = 2004, 3647 He = 2100, 3648 $e = 2101, 3649 je = 2102, 3650 Ge = 2103, 3651 Ve = 2151, 3652 We = 2300, 3653 qe = 2301, 3654 Xe = 2400, 3655 Ye = 2401, 3656 Ze = 2402, 3657 Qe = 0, 3658 Je = 3e3, 3659 Ke = 3001, 3660 et = 3007, 3661 tt = 3002, 3662 it = 3004, 3663 nt = 3005, 3664 rt = 3006, 3665 ot = 3200, 3666 at = 3201, 3667 st = { 3668 DEG2RAD: Math.PI / 180, 3669 RAD2DEG: 180 / Math.PI, 3670 generateUUID: (n = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split(""), r = new Array(36), o = 0, function() { 3671 for (var e = 0; e < 36; e++) 8 === e || 13 === e || 18 === e || 23 === e ? r[e] = "-" : 14 === e ? r[e] = "4" : (o <= 2 && (o = 33554432 + 16777216 * Math.random() | 0), i = 15 & o, o >>= 4, r[e] = n[19 === e ? 3 & i | 8 : i]); 3672 return r.join("") 3673 }), 3674 clamp: function(e, t, i) { 3675 return Math.max(t, Math.min(i, e)) 3676 }, 3677 euclideanModulo: function(e, t) { 3678 return (e % t + t) % t 3679 }, 3680 mapLinear: function(e, t, i, n, r) { 3681 return n + (e - t) * (r - n) / (i - t) 3682 }, 3683 lerp: function(e, t, i) { 3684 return (1 - i) * e + i * t 3685 }, 3686 smoothstep: function(e, t, i) { 3687 return e <= t ? 0 : i <= e ? 1 : (e = (e - t) / (i - t)) * e * (3 - 2 * e) 3688 }, 3689 smootherstep: function(e, t, i) { 3690 return e <= t ? 0 : i <= e ? 1 : (e = (e - t) / (i - t)) * e * e * (e * (6 * e - 15) + 10) 3691 }, 3692 randInt: function(e, t) { 3693 return e + Math.floor(Math.random() * (t - e + 1)) 3694 }, 3695 randFloat: function(e, t) { 3696 return e + Math.random() * (t - e) 3697 }, 3698 randFloatSpread: function(e) { 3699 return e * (.5 - Math.random()) 3700 }, 3701 degToRad: function(e) { 3702 return e * st.DEG2RAD 3703 }, 3704 radToDeg: function(e) { 3705 return e * st.RAD2DEG 3706 }, 3707 isPowerOfTwo: function(e) { 3708 return 0 == (e & e - 1) && 0 !== e 3709 }, 3710 nearestPowerOfTwo: function(e) { 3711 return Math.pow(2, Math.round(Math.log(e) / Math.LN2)) 3712 }, 3713 nextPowerOfTwo: function(e) { 3714 return e--, e |= e >> 1, e |= e >> 2, e |= e >> 4, e |= e >> 8, e |= e >> 16, ++e 3715 } 3716 }; 3717 3718 function lt(e, t) { 3719 this.x = e || 0, this.y = t || 0 3720 } 3721 Object.defineProperties(lt.prototype, { 3722 width: { 3723 get: function() { 3724 return this.x 3725 }, 3726 set: function(e) { 3727 this.x = e 3728 } 3729 }, 3730 height: { 3731 get: function() { 3732 return this.y 3733 }, 3734 set: function(e) { 3735 this.y = e 3736 } 3737 } 3738 }), Object.assign(lt.prototype, { 3739 isVector2: !0, 3740 set: function(e, t) { 3741 return this.x = e, this.y = t, this 3742 }, 3743 setScalar: function(e) { 3744 return this.x = e, this.y = e, this 3745 }, 3746 setX: function(e) { 3747 return this.x = e, this 3748 }, 3749 setY: function(e) { 3750 return this.y = e, this 3751 }, 3752 setComponent: function(e, t) { 3753 switch (e) { 3754 case 0: 3755 this.x = t; 3756 break; 3757 case 1: 3758 this.y = t; 3759 break; 3760 default: 3761 throw new Error("index is out of range: " + e) 3762 } 3763 return this 3764 }, 3765 getComponent: function(e) { 3766 switch (e) { 3767 case 0: 3768 return this.x; 3769 case 1: 3770 return this.y; 3771 default: 3772 throw new Error("index is out of range: " + e) 3773 } 3774 }, 3775 clone: function() { 3776 return new this.constructor(this.x, this.y) 3777 }, 3778 copy: function(e) { 3779 return this.x = e.x, this.y = e.y, this 3780 }, 3781 add: function(e, t) { 3782 return void 0 !== t ? (console.warn("THREE.Vector2: .add() now only accepts one argument. Use .addVectors( a, b ) instead."), this.addVectors(e, t)) : (this.x += e.x, this.y += e.y, this) 3783 }, 3784 addScalar: function(e) { 3785 return this.x += e, this.y += e, this 3786 }, 3787 addVectors: function(e, t) { 3788 return this.x = e.x + t.x, this.y = e.y + t.y, this 3789 }, 3790 addScaledVector: function(e, t) { 3791 return this.x += e.x * t, this.y += e.y * t, this 3792 }, 3793 sub: function(e, t) { 3794 return void 0 !== t ? (console.warn("THREE.Vector2: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."), this.subVectors(e, t)) : (this.x -= e.x, this.y -= e.y, this) 3795 }, 3796 subScalar: function(e) { 3797 return this.x -= e, this.y -= e, this 3798 }, 3799 subVectors: function(e, t) {
vendor: 13,555 bytes, lines 3800-4104
3800 return this.x = e.x - t.x, this.y = e.y - t.y, this 3801 }, 3802 multiply: function(e) { 3803 return this.x *= e.x, this.y *= e.y, this 3804 }, 3805 multiplyScalar: function(e) { 3806 return this.x *= e, this.y *= e, this 3807 }, 3808 divide: function(e) { 3809 return this.x /= e.x, this.y /= e.y, this 3810 }, 3811 divideScalar: function(e) { 3812 return this.multiplyScalar(1 / e) 3813 }, 3814 min: function(e) { 3815 return this.x = Math.min(this.x, e.x), this.y = Math.min(this.y, e.y), this 3816 }, 3817 max: function(e) { 3818 return this.x = Math.max(this.x, e.x), this.y = Math.max(this.y, e.y), this 3819 }, 3820 clamp: function(e, t) { 3821 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 3822 }, 3823 clampScalar: (a = new lt, s = new lt, function(e, t) { 3824 return a.set(e, e), s.set(t, t), this.clamp(a, s) 3825 }), 3826 clampLength: function(e, t) { 3827 var i = this.length(); 3828 return this.divideScalar(i || 1).multiplyScalar(Math.max(e, Math.min(t, i))) 3829 }, 3830 floor: function() { 3831 return this.x = Math.floor(this.x), this.y = Math.floor(this.y), this 3832 }, 3833 ceil: function() { 3834 return this.x = Math.ceil(this.x), this.y = Math.ceil(this.y), this 3835 }, 3836 round: function() { 3837 return this.x = Math.round(this.x), this.y = Math.round(this.y), this 3838 }, 3839 roundToZero: function() { 3840 return this.x = this.x < 0 ? Math.ceil(this.x) : Math.floor(this.x), this.y = this.y < 0 ? Math.ceil(this.y) : Math.floor(this.y), this 3841 }, 3842 negate: function() { 3843 return this.x = -this.x, this.y = -this.y, this 3844 }, 3845 dot: function(e) { 3846 return this.x * e.x + this.y * e.y 3847 }, 3848 lengthSq: function() { 3849 return this.x * this.x + this.y * this.y 3850 }, 3851 length: function() { 3852 return Math.sqrt(this.x * this.x + this.y * this.y) 3853 }, 3854 lengthManhattan: function() { 3855 return Math.abs(this.x) + Math.abs(this.y) 3856 }, 3857 normalize: function() { 3858 return this.divideScalar(this.length() || 1) 3859 }, 3860 angle: function() { 3861 var e = Math.atan2(this.y, this.x); 3862 return e < 0 && (e += 2 * Math.PI), e 3863 }, 3864 distanceTo: function(e) { 3865 return Math.sqrt(this.distanceToSquared(e)) 3866 }, 3867 distanceToSquared: function(e) { 3868 var t = this.x - e.x, 3869 i = this.y - e.y; 3870 return t * t + i * i 3871 }, 3872 distanceToManhattan: function(e) { 3873 return Math.abs(this.x - e.x) + Math.abs(this.y - e.y) 3874 }, 3875 setLength: function(e) { 3876 return this.normalize().multiplyScalar(e) 3877 }, 3878 lerp: function(e, t) { 3879 return this.x += (e.x - this.x) * t, this.y += (e.y - this.y) * t, this 3880 }, 3881 lerpVectors: function(e, t, i) { 3882 return this.subVectors(t, e).multiplyScalar(i).add(e) 3883 }, 3884 equals: function(e) { 3885 return e.x === this.x && e.y === this.y 3886 }, 3887 fromArray: function(e, t) { 3888 return void 0 === t && (t = 0), this.x = e[t], this.y = e[t + 1], this 3889 }, 3890 toArray: function(e, t) { 3891 return void 0 === e && (e = []), void 0 === t && (t = 0), e[t] = this.x, e[t + 1] = this.y, e 3892 }, 3893 fromBufferAttribute: function(e, t, i) { 3894 return void 0 !== i && console.warn("THREE.Vector2: offset has been removed from .fromBufferAttribute()."), this.x = e.getX(t), this.y = e.getY(t), this 3895 }, 3896 rotateAround: function(e, t) { 3897 var i = Math.cos(t), 3898 n = Math.sin(t), 3899 r = this.x - e.x, 3900 o = this.y - e.y; 3901 return this.x = r * i - o * n + e.x, this.y = r * n + o * i + e.y, this 3902 } 3903 }); 3904 var ct, ut, ht, dt, pt, ft, mt, gt, vt, yt, bt, wt, xt, _t, Tt, Et, Mt, St, Ct, At = 0; 3905 3906 function Rt(e, t, i, n, r, o, a, s, l, c) { 3907 Object.defineProperty(this, "id", { 3908 value: At++ 3909 }), this.uuid = st.generateUUID(), this.name = "", this.image = void 0 !== e ? e : Rt.DEFAULT_IMAGE, this.mipmaps = [], this.mapping = void 0 !== t ? t : Rt.DEFAULT_MAPPING, this.wrapS = void 0 !== i ? i : M, this.wrapT = void 0 !== n ? n : M, this.magFilter = void 0 !== r ? r : R, this.minFilter = void 0 !== o ? o : P, this.anisotropy = void 0 !== l ? l : 1, this.format = void 0 !== a ? a : ke, this.type = void 0 !== s ? s : Re, this.offset = new lt(0, 0), this.repeat = new lt(1, 1), this.generateMipmaps = !0, this.premultiplyAlpha = !1, this.flipY = !0, this.unpackAlignment = 4, this.encoding = void 0 !== c ? c : Je, this.version = 0, this.onUpdate = null 3910 } 3911 3912 function Lt(e, t, i, n) { 3913 this.x = e || 0, this.y = t || 0, this.z = i || 0, this.w = void 0 !== n ? n : 1 3914 } 3915 3916 function Pt(e, t, i) { 3917 this.uuid = st.generateUUID(), this.width = e, this.height = t, this.scissor = new Lt(0, 0, e, t), this.scissorTest = !1, this.viewport = new Lt(0, 0, e, t), void 0 === (i = i || {}).minFilter && (i.minFilter = R), this.texture = new Rt(void 0, void 0, i.wrapS, i.wrapT, i.magFilter, i.minFilter, i.format, i.type, i.anisotropy, i.encoding), this.depthBuffer = void 0 === i.depthBuffer || i.depthBuffer, this.stencilBuffer = void 0 === i.stencilBuffer || i.stencilBuffer, this.depthTexture = void 0 !== i.depthTexture ? i.depthTexture : null 3918 } 3919 3920 function kt(e, t, i) { 3921 Pt.call(this, e, t, i), this.activeCubeFace = 0, this.activeMipMapLevel = 0 3922 } 3923 3924 function Ot(e, t, i, n) { 3925 this._x = e || 0, this._y = t || 0, this._z = i || 0, this._w = void 0 !== n ? n : 1 3926 } 3927 3928 function Dt(e, t, i) { 3929 this.x = e || 0, this.y = t || 0, this.z = i || 0 3930 } 3931 3932 function It() { 3933 this.elements = [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1], 0 < arguments.length && console.error("THREE.Matrix4: the constructor no longer reads arguments. use .set() instead.") 3934 } 3935 3936 function zt(e, t, i, n, r, o, a, s, l, c, u, h) { 3937 Rt.call(this, null, o, a, s, l, c, n, r, u, h), this.image = { 3938 data: e, 3939 width: t, 3940 height: i 3941 }, this.magFilter = void 0 !== l ? l : z, this.minFilter = void 0 !== c ? c : z, this.generateMipmaps = !1, this.flipY = !1, this.unpackAlignment = 1 3942 } 3943 3944 function Nt(e, t, i, n, r, o, a, s, l, c) { 3945 Rt.call(this, e = void 0 !== e ? e : [], t = void 0 !== t ? t : he, i, n, r, o, a, s, l, c), this.flipY = !1 3946 } 3947 Rt.DEFAULT_IMAGE = void 0, Rt.DEFAULT_MAPPING = 300, Object.defineProperty(Rt.prototype, "needsUpdate", { 3948 set: function(e) { 3949 !0 === e && this.version++ 3950 } 3951 }), Object.assign(Rt.prototype, t.prototype, { 3952 constructor: Rt, 3953 isTexture: !0, 3954 clone: function() { 3955 return (new this.constructor).copy(this) 3956 }, 3957 copy: function(e) { 3958 return this.name = e.name, this.image = e.image, this.mipmaps = e.mipmaps.slice(0), this.mapping = e.mapping, 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.type = e.type, this.offset.copy(e.offset), this.repeat.copy(e.repeat), this.generateMipmaps = e.generateMipmaps, this.premultiplyAlpha = e.premultiplyAlpha, this.flipY = e.flipY, this.unpackAlignment = e.unpackAlignment, this.encoding = e.encoding, this 3959 }, 3960 toJSON: function(e) { 3961 if (void 0 !== e.textures[this.uuid]) return e.textures[this.uuid]; 3962 var t = { 3963 metadata: { 3964 version: 4.5, 3965 type: "Texture", 3966 generator: "Texture.toJSON" 3967 }, 3968 uuid: this.uuid, 3969 name: this.name, 3970 mapping: this.mapping, 3971 repeat: [this.repeat.x, this.repeat.y], 3972 offset: [this.offset.x, this.offset.y], 3973 wrap: [this.wrapS, this.wrapT], 3974 minFilter: this.minFilter, 3975 magFilter: this.magFilter, 3976 anisotropy: this.anisotropy, 3977 flipY: this.flipY 3978 }; 3979 if (void 0 !== this.image) { 3980 var i = this.image; 3981 void 0 === i.uuid && (i.uuid = st.generateUUID()), void 0 === e.images[i.uuid] && (e.images[i.uuid] = { 3982 uuid: i.uuid, 3983 url: function(e) { 3984 var t; 3985 if (e instanceof HTMLCanvasElement) t = e; 3986 else { 3987 (t = document.createElementNS("http://www.w3.org/1999/xhtml", "canvas")).width = e.width, t.height = e.height; 3988 var i = t.getContext("2d"); 3989 e instanceof ImageData ? i.putImageData(e, 0, 0) : i.drawImage(e, 0, 0, e.width, e.height) 3990 } 3991 return 2048 < t.width || 2048 < t.height ? t.toDataURL("image/jpeg", .6) : t.toDataURL("image/png") 3992 }(i) 3993 }), t.image = i.uuid 3994 } 3995 return e.textures[this.uuid] = t 3996 }, 3997 dispose: function() { 3998 this.dispatchEvent({ 3999 type: "dispose" 4000 }) 4001 }, 4002 transformUv: function(e) { 4003 if (300 === this.mapping) { 4004 if (e.multiply(this.repeat), e.add(this.offset), e.x < 0 || 1 < e.x) switch (this.wrapS) { 4005 case E: 4006 e.x = e.x - Math.floor(e.x); 4007 break; 4008 case M: 4009 e.x = e.x < 0 ? 0 : 1; 4010 break; 4011 case S: 4012 1 === Math.abs(Math.floor(e.x) % 2) ? e.x = Math.ceil(e.x) - e.x : e.x = e.x - Math.floor(e.x) 4013 } 4014 if (e.y < 0 || 1 < e.y) switch (this.wrapT) { 4015 case E: 4016 e.y = e.y - Math.floor(e.y); 4017 break; 4018 case M: 4019 e.y = e.y < 0 ? 0 : 1; 4020 break; 4021 case S: 4022 1 === Math.abs(Math.floor(e.y) % 2) ? e.y = Math.ceil(e.y) - e.y : e.y = e.y - Math.floor(e.y) 4023 } 4024 this.flipY && (e.y = 1 - e.y) 4025 } 4026 } 4027 }), Object.assign(Lt.prototype, { 4028 isVector4: !0, 4029 set: function(e, t, i, n) { 4030 return this.x = e, this.y = t, this.z = i, this.w = n, this 4031 }, 4032 setScalar: function(e) { 4033 return this.x = e, this.y = e, this.z = e, this.w = e, this 4034 }, 4035 setX: function(e) { 4036 return this.x = e, this 4037 }, 4038 setY: function(e) { 4039 return this.y = e, this 4040 }, 4041 setZ: function(e) { 4042 return this.z = e, this 4043 }, 4044 setW: function(e) { 4045 return this.w = e, this 4046 }, 4047 setComponent: function(e, t) { 4048 switch (e) { 4049 case 0: 4050 this.x = t; 4051 break; 4052 case 1: 4053 this.y = t; 4054 break; 4055 case 2: 4056 this.z = t; 4057 break; 4058 case 3: 4059 this.w = t; 4060 break; 4061 default: 4062 throw new Error("index is out of range: " + e) 4063 } 4064 return this 4065 }, 4066 getComponent: function(e) { 4067 switch (e) { 4068 case 0: 4069 return this.x; 4070 case 1: 4071 return this.y; 4072 case 2: 4073 return this.z; 4074 case 3: 4075 return this.w; 4076 default: 4077 throw new Error("index is out of range: " + e) 4078 } 4079 }, 4080 clone: function() { 4081 return new this.constructor(this.x, this.y, this.z, this.w) 4082 }, 4083 copy: function(e) { 4084 return this.x = e.x, this.y = e.y, this.z = e.z, this.w = void 0 !== e.w ? e.w : 1, this 4085 }, 4086 add: function(e, t) { 4087 return void 0 !== t ? (console.warn("THREE.Vector4: .add() now only accepts one argument. Use .addVectors( a, b ) instead."), this.addVectors(e, t)) : (this.x += e.x, this.y += e.y, this.z += e.z, this.w += e.w, this) 4088 }, 4089 addScalar: function(e) { 4090 return this.x += e, this.y += e, this.z += e, this.w += e, this 4091 }, 4092 addVectors: function(e, t) { 4093 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 4094 }, 4095 addScaledVector: function(e, t) { 4096 return this.x += e.x * t, this.y += e.y * t, this.z += e.z * t, this.w += e.w * t, this 4097 }, 4098 sub: function(e, t) { 4099 return void 0 !== t ? (console.warn("THREE.Vector4: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."), this.subVectors(e, t)) : (this.x -= e.x, this.y -= e.y, this.z -= e.z, this.w -= e.w, this) 4100 }, 4101 subScalar: function(e) { 4102 return this.x -= e, this.y -= e, this.z -= e, this.w -= e, this 4103 }, 4104 subVectors: function(e, t) {
vendor: 16,384 bytes, lines 4105-4420
4105 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 4106 }, 4107 multiplyScalar: function(e) { 4108 return this.x *= e, this.y *= e, this.z *= e, this.w *= e, this 4109 }, 4110 applyMatrix4: function(e) { 4111 var t = this.x, 4112 i = this.y, 4113 n = this.z, 4114 r = this.w, 4115 o = e.elements; 4116 return this.x = o[0] * t + o[4] * i + o[8] * n + o[12] * r, this.y = o[1] * t + o[5] * i + o[9] * n + o[13] * r, this.z = o[2] * t + o[6] * i + o[10] * n + o[14] * r, this.w = o[3] * t + o[7] * i + o[11] * n + o[15] * r, this 4117 }, 4118 divideScalar: function(e) { 4119 return this.multiplyScalar(1 / e) 4120 }, 4121 setAxisAngleFromQuaternion: function(e) { 4122 this.w = 2 * Math.acos(e.w); 4123 var t = Math.sqrt(1 - e.w * e.w); 4124 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 4125 }, 4126 setAxisAngleFromRotationMatrix: function(e) { 4127 var t, i, n, r, o = e.elements, 4128 a = o[0], 4129 s = o[4], 4130 l = o[8], 4131 c = o[1], 4132 u = o[5], 4133 h = o[9], 4134 d = o[2], 4135 p = o[6], 4136 f = o[10]; 4137 if (Math.abs(s - c) < .01 && Math.abs(l - d) < .01 && Math.abs(h - p) < .01) { 4138 if (Math.abs(s + c) < .1 && Math.abs(l + d) < .1 && Math.abs(h + p) < .1 && Math.abs(a + u + f - 3) < .1) return this.set(1, 0, 0, 0), this; 4139 t = Math.PI; 4140 var m = (a + 1) / 2, 4141 g = (u + 1) / 2, 4142 v = (f + 1) / 2, 4143 y = (s + c) / 4, 4144 b = (l + d) / 4, 4145 w = (h + p) / 4; 4146 return g < m && v < m ? m < .01 ? (i = 0, r = n = .707106781) : (n = y / (i = Math.sqrt(m)), r = b / i) : v < g ? g < .01 ? (n = 0, r = i = .707106781) : (i = y / (n = Math.sqrt(g)), r = w / n) : v < .01 ? (n = i = .707106781, r = 0) : (i = b / (r = Math.sqrt(v)), n = w / r), this.set(i, n, r, t), this 4147 } 4148 var x = Math.sqrt((p - h) * (p - h) + (l - d) * (l - d) + (c - s) * (c - s)); 4149 return Math.abs(x) < .001 && (x = 1), this.x = (p - h) / x, this.y = (l - d) / x, this.z = (c - s) / x, this.w = Math.acos((a + u + f - 1) / 2), this 4150 }, 4151 min: function(e) { 4152 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 4153 }, 4154 max: function(e) { 4155 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 4156 }, 4157 clamp: function(e, t) { 4158 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 4159 }, 4160 clampScalar: function(e, t) { 4161 return void 0 === ct && (ct = new Lt, ut = new Lt), ct.set(e, e, e, e), ut.set(t, t, t, t), this.clamp(ct, ut) 4162 }, 4163 clampLength: function(e, t) { 4164 var i = this.length(); 4165 return this.divideScalar(i || 1).multiplyScalar(Math.max(e, Math.min(t, i))) 4166 }, 4167 floor: function() { 4168 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 4169 }, 4170 ceil: function() { 4171 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 4172 }, 4173 round: function() { 4174 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 4175 }, 4176 roundToZero: function() { 4177 return this.x = this.x < 0 ? Math.ceil(this.x) : Math.floor(this.x), this.y = this.y < 0 ? Math.ceil(this.y) : Math.floor(this.y), this.z = this.z < 0 ? Math.ceil(this.z) : Math.floor(this.z), this.w = this.w < 0 ? Math.ceil(this.w) : Math.floor(this.w), this 4178 }, 4179 negate: function() { 4180 return this.x = -this.x, this.y = -this.y, this.z = -this.z, this.w = -this.w, this 4181 }, 4182 dot: function(e) { 4183 return this.x * e.x + this.y * e.y + this.z * e.z + this.w * e.w 4184 }, 4185 lengthSq: function() { 4186 return this.x * this.x + this.y * this.y + this.z * this.z + this.w * this.w 4187 }, 4188 length: function() { 4189 return Math.sqrt(this.x * this.x + this.y * this.y + this.z * this.z + this.w * this.w) 4190 }, 4191 lengthManhattan: function() { 4192 return Math.abs(this.x) + Math.abs(this.y) + Math.abs(this.z) + Math.abs(this.w) 4193 }, 4194 normalize: function() { 4195 return this.divideScalar(this.length() || 1) 4196 }, 4197 setLength: function(e) { 4198 return this.normalize().multiplyScalar(e) 4199 }, 4200 lerp: function(e, t) { 4201 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 4202 }, 4203 lerpVectors: function(e, t, i) { 4204 return this.subVectors(t, e).multiplyScalar(i).add(e) 4205 }, 4206 equals: function(e) { 4207 return e.x === this.x && e.y === this.y && e.z === this.z && e.w === this.w 4208 }, 4209 fromArray: function(e, t) { 4210 return void 0 === t && (t = 0), this.x = e[t], this.y = e[t + 1], this.z = e[t + 2], this.w = e[t + 3], this 4211 }, 4212 toArray: function(e, t) { 4213 return void 0 === e && (e = []), void 0 === t && (t = 0), e[t] = this.x, e[t + 1] = this.y, e[t + 2] = this.z, e[t + 3] = this.w, e 4214 }, 4215 fromBufferAttribute: function(e, t, i) { 4216 return void 0 !== i && console.warn("THREE.Vector4: offset has been removed from .fromBufferAttribute()."), this.x = e.getX(t), this.y = e.getY(t), this.z = e.getZ(t), this.w = e.getW(t), this 4217 } 4218 }), Object.assign(Pt.prototype, t.prototype, { 4219 isWebGLRenderTarget: !0, 4220 setSize: function(e, t) { 4221 this.width === e && this.height === t || (this.width = e, this.height = t, this.dispose()), this.viewport.set(0, 0, e, t), this.scissor.set(0, 0, e, t) 4222 }, 4223 clone: function() { 4224 return (new this.constructor).copy(this) 4225 }, 4226 copy: function(e) { 4227 return this.width = e.width, this.height = e.height, this.viewport.copy(e.viewport), this.texture = e.texture.clone(), this.depthBuffer = e.depthBuffer, this.stencilBuffer = e.stencilBuffer, this.depthTexture = e.depthTexture, this 4228 }, 4229 dispose: function() { 4230 this.dispatchEvent({ 4231 type: "dispose" 4232 }) 4233 } 4234 }), ((kt.prototype = Object.create(Pt.prototype)).constructor = kt).prototype.isWebGLRenderTargetCube = !0, Object.assign(Ot, { 4235 slerp: function(e, t, i, n) { 4236 return i.copy(e).slerp(t, n) 4237 }, 4238 slerpFlat: function(e, t, i, n, r, o, a) { 4239 var s = i[n + 0], 4240 l = i[n + 1], 4241 c = i[n + 2], 4242 u = i[n + 3], 4243 h = r[o + 0], 4244 d = r[o + 1], 4245 p = r[o + 2], 4246 f = r[o + 3]; 4247 if (u !== f || s !== h || l !== d || c !== p) { 4248 var m = 1 - a, 4249 g = s * h + l * d + c * p + u * f, 4250 v = 0 <= g ? 1 : -1, 4251 y = 1 - g * g; 4252 if (y > Number.EPSILON) { 4253 var b = Math.sqrt(y), 4254 w = Math.atan2(b, g * v); 4255 m = Math.sin(m * w) / b, a = Math.sin(a * w) / b 4256 } 4257 var x = a * v; 4258 if (s = s * m + h * x, l = l * m + d * x, c = c * m + p * x, u = u * m + f * x, m === 1 - a) { 4259 var _ = 1 / Math.sqrt(s * s + l * l + c * c + u * u); 4260 s *= _, l *= _, c *= _, u *= _ 4261 } 4262 } 4263 e[t] = s, e[t + 1] = l, e[t + 2] = c, e[t + 3] = u 4264 } 4265 }), Object.defineProperties(Ot.prototype, { 4266 x: { 4267 get: function() { 4268 return this._x 4269 }, 4270 set: function(e) { 4271 this._x = e, this.onChangeCallback() 4272 } 4273 }, 4274 y: { 4275 get: function() { 4276 return this._y 4277 }, 4278 set: function(e) { 4279 this._y = e, this.onChangeCallback() 4280 } 4281 }, 4282 z: { 4283 get: function() { 4284 return this._z 4285 }, 4286 set: function(e) { 4287 this._z = e, this.onChangeCallback() 4288 } 4289 }, 4290 w: { 4291 get: function() { 4292 return this._w 4293 }, 4294 set: function(e) { 4295 this._w = e, this.onChangeCallback() 4296 } 4297 } 4298 }), Object.assign(Ot.prototype, { 4299 set: function(e, t, i, n) { 4300 return this._x = e, this._y = t, this._z = i, this._w = n, this.onChangeCallback(), this 4301 }, 4302 clone: function() { 4303 return new this.constructor(this._x, this._y, this._z, this._w) 4304 }, 4305 copy: function(e) { 4306 return this._x = e.x, this._y = e.y, this._z = e.z, this._w = e.w, this.onChangeCallback(), this 4307 }, 4308 setFromEuler: function(e, t) { 4309 if (!e || !e.isEuler) throw new Error("THREE.Quaternion: .setFromEuler() now expects an Euler rotation rather than a Vector3 and order."); 4310 var i = e._x, 4311 n = e._y, 4312 r = e._z, 4313 o = e.order, 4314 a = Math.cos, 4315 s = Math.sin, 4316 l = a(i / 2), 4317 c = a(n / 2), 4318 u = a(r / 2), 4319 h = s(i / 2), 4320 d = s(n / 2), 4321 p = s(r / 2); 4322 return "XYZ" === o ? (this._x = h * c * u + l * d * p, this._y = l * d * u - h * c * p, this._z = l * c * p + h * d * u, this._w = l * c * u - h * d * p) : "YXZ" === o ? (this._x = h * c * u + l * d * p, this._y = l * d * u - h * c * p, this._z = l * c * p - h * d * u, this._w = l * c * u + h * d * p) : "ZXY" === o ? (this._x = h * c * u - l * d * p, this._y = l * d * u + h * c * p, this._z = l * c * p + h * d * u, this._w = l * c * u - h * d * p) : "ZYX" === o ? (this._x = h * c * u - l * d * p, this._y = l * d * u + h * c * p, this._z = l * c * p - h * d * u, this._w = l * c * u + h * d * p) : "YZX" === o ? (this._x = h * c * u + l * d * p, this._y = l * d * u + h * c * p, this._z = l * c * p - h * d * u, this._w = l * c * u - h * d * p) : "XZY" === o && (this._x = h * c * u - l * d * p, this._y = l * d * u - h * c * p, this._z = l * c * p + h * d * u, this._w = l * c * u + h * d * p), !1 !== t && this.onChangeCallback(), this 4323 }, 4324 setFromAxisAngle: function(e, t) { 4325 var i = t / 2, 4326 n = Math.sin(i); 4327 return this._x = e.x * n, this._y = e.y * n, this._z = e.z * n, this._w = Math.cos(i), this.onChangeCallback(), this 4328 }, 4329 setFromRotationMatrix: function(e) { 4330 var t, i = e.elements, 4331 n = i[0], 4332 r = i[4], 4333 o = i[8], 4334 a = i[1], 4335 s = i[5], 4336 l = i[9], 4337 c = i[2], 4338 u = i[6], 4339 h = i[10], 4340 d = n + s + h; 4341 return 0 < d ? (t = .5 / Math.sqrt(d + 1), this._w = .25 / t, this._x = (u - l) * t, this._y = (o - c) * t, this._z = (a - r) * t) : s < n && h < n ? (t = 2 * Math.sqrt(1 + n - s - h), this._w = (u - l) / t, this._x = .25 * t, this._y = (r + a) / t, this._z = (o + c) / t) : h < s ? (t = 2 * Math.sqrt(1 + s - n - h), this._w = (o - c) / t, this._x = (r + a) / t, this._y = .25 * t, this._z = (l + u) / t) : (t = 2 * Math.sqrt(1 + h - n - s), this._w = (a - r) / t, this._x = (o + c) / t, this._y = (l + u) / t, this._z = .25 * t), this.onChangeCallback(), this 4342 }, 4343 setFromUnitVectors: (dt = new Dt, function(e, t) { 4344 return void 0 === dt && (dt = new Dt), (ht = e.dot(t) + 1) < 1e-6 ? (ht = 0, Math.abs(e.x) > Math.abs(e.z) ? dt.set(-e.y, e.x, 0) : dt.set(0, -e.z, e.y)) : dt.crossVectors(e, t), this._x = dt.x, this._y = dt.y, this._z = dt.z, this._w = ht, this.normalize() 4345 }), 4346 inverse: function() { 4347 return this.conjugate().normalize() 4348 }, 4349 conjugate: function() { 4350 return this._x *= -1, this._y *= -1, this._z *= -1, this.onChangeCallback(), this 4351 }, 4352 dot: function(e) { 4353 return this._x * e._x + this._y * e._y + this._z * e._z + this._w * e._w 4354 }, 4355 lengthSq: function() { 4356 return this._x * this._x + this._y * this._y + this._z * this._z + this._w * this._w 4357 }, 4358 length: function() { 4359 return Math.sqrt(this._x * this._x + this._y * this._y + this._z * this._z + this._w * this._w) 4360 }, 4361 normalize: function() { 4362 var e = this.length(); 4363 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 4364 }, 4365 multiply: function(e, t) { 4366 return void 0 !== t ? (console.warn("THREE.Quaternion: .multiply() now only accepts one argument. Use .multiplyQuaternions( a, b ) instead."), this.multiplyQuaternions(e, t)) : this.multiplyQuaternions(this, e) 4367 }, 4368 premultiply: function(e) { 4369 return this.multiplyQuaternions(e, this) 4370 }, 4371 multiplyQuaternions: function(e, t) { 4372 var i = e._x, 4373 n = e._y, 4374 r = e._z, 4375 o = e._w, 4376 a = t._x, 4377 s = t._y, 4378 l = t._z, 4379 c = t._w; 4380 return this._x = i * c + o * a + n * l - r * s, this._y = n * c + o * s + r * a - i * l, this._z = r * c + o * l + i * s - n * a, this._w = o * c - i * a - n * s - r * l, this.onChangeCallback(), this 4381 }, 4382 slerp: function(e, t) { 4383 if (0 === t) return this; 4384 if (1 === t) return this.copy(e); 4385 var i = this._x, 4386 n = this._y, 4387 r = this._z, 4388 o = this._w, 4389 a = o * e._w + i * e._x + n * e._y + r * e._z; 4390 if (a < 0 ? (this._w = -e._w, this._x = -e._x, this._y = -e._y, this._z = -e._z, a = -a) : this.copy(e), 1 <= a) return this._w = o, this._x = i, this._y = n, this._z = r, this; 4391 var s = Math.sqrt(1 - a * a); 4392 if (Math.abs(s) < .001) return this._w = .5 * (o + this._w), this._x = .5 * (i + this._x), this._y = .5 * (n + this._y), this._z = .5 * (r + this._z), this; 4393 var l = Math.atan2(s, a), 4394 c = Math.sin((1 - t) * l) / s, 4395 u = Math.sin(t * l) / s; 4396 return this._w = o * c + this._w * u, this._x = i * c + this._x * u, this._y = n * c + this._y * u, this._z = r * c + this._z * u, this.onChangeCallback(), this 4397 }, 4398 equals: function(e) { 4399 return e._x === this._x && e._y === this._y && e._z === this._z && e._w === this._w 4400 }, 4401 fromArray: function(e, t) { 4402 return void 0 === t && (t = 0), this._x = e[t], this._y = e[t + 1], this._z = e[t + 2], this._w = e[t + 3], this.onChangeCallback(), this 4403 }, 4404 toArray: function(e, t) { 4405 return void 0 === e && (e = []), void 0 === t && (t = 0), e[t] = this._x, e[t + 1] = this._y, e[t + 2] = this._z, e[t + 3] = this._w, e 4406 }, 4407 onChange: function(e) { 4408 return this.onChangeCallback = e, this 4409 }, 4410 onChangeCallback: function() {} 4411 }), Object.assign(Dt.prototype, { 4412 isVector3: !0, 4413 set: function(e, t, i) { 4414 return this.x = e, this.y = t, this.z = i, this 4415 }, 4416 setScalar: function(e) { 4417 return this.x = e, this.y = e, this.z = e, this 4418 }, 4419 setX: function(e) { 4420
vendor: 19,397 bytes, lines 4420-4826
4420 return this.x = e, this 4421 }, 4422 setY: function(e) { 4423 return this.y = e, this 4424 }, 4425 setZ: function(e) { 4426 return this.z = e, this 4427 }, 4428 setComponent: function(e, t) { 4429 switch (e) { 4430 case 0: 4431 this.x = t; 4432 break; 4433 case 1: 4434 this.y = t; 4435 break; 4436 case 2: 4437 this.z = t; 4438 break; 4439 default: 4440 throw new Error("index is out of range: " + e) 4441 } 4442 return this 4443 }, 4444 getComponent: function(e) { 4445 switch (e) { 4446 case 0: 4447 return this.x; 4448 case 1: 4449 return this.y; 4450 case 2: 4451 return this.z; 4452 default: 4453 throw new Error("index is out of range: " + e) 4454 } 4455 }, 4456 clone: function() { 4457 return new this.constructor(this.x, this.y, this.z) 4458 }, 4459 copy: function(e) { 4460 return this.x = e.x, this.y = e.y, this.z = e.z, this 4461 }, 4462 add: function(e, t) { 4463 return void 0 !== t ? (console.warn("THREE.Vector3: .add() now only accepts one argument. Use .addVectors( a, b ) instead."), this.addVectors(e, t)) : (this.x += e.x, this.y += e.y, this.z += e.z, this) 4464 }, 4465 addScalar: function(e) { 4466 return this.x += e, this.y += e, this.z += e, this 4467 }, 4468 addVectors: function(e, t) { 4469 return this.x = e.x + t.x, this.y = e.y + t.y, this.z = e.z + t.z, this 4470 }, 4471 addScaledVector: function(e, t) { 4472 return this.x += e.x * t, this.y += e.y * t, this.z += e.z * t, this 4473 }, 4474 sub: function(e, t) { 4475 return void 0 !== t ? (console.warn("THREE.Vector3: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."), this.subVectors(e, t)) : (this.x -= e.x, this.y -= e.y, this.z -= e.z, this) 4476 }, 4477 subScalar: function(e) { 4478 return this.x -= e, this.y -= e, this.z -= e, this 4479 }, 4480 subVectors: function(e, t) { 4481 return this.x = e.x - t.x, this.y = e.y - t.y, this.z = e.z - t.z, this 4482 }, 4483 multiply: function(e, t) { 4484 return void 0 !== t ? (console.warn("THREE.Vector3: .multiply() now only accepts one argument. Use .multiplyVectors( a, b ) instead."), this.multiplyVectors(e, t)) : (this.x *= e.x, this.y *= e.y, this.z *= e.z, this) 4485 }, 4486 multiplyScalar: function(e) { 4487 return this.x *= e, this.y *= e, this.z *= e, this 4488 }, 4489 multiplyVectors: function(e, t) { 4490 return this.x = e.x * t.x, this.y = e.y * t.y, this.z = e.z * t.z, this 4491 }, 4492 applyEuler: (wt = new Ot, function(e) { 4493 return e && e.isEuler || console.error("THREE.Vector3: .applyEuler() now expects an Euler rotation rather than a Vector3 and order."), this.applyQuaternion(wt.setFromEuler(e)) 4494 }), 4495 applyAxisAngle: (bt = new Ot, function(e, t) { 4496 return this.applyQuaternion(bt.setFromAxisAngle(e, t)) 4497 }), 4498 applyMatrix3: function(e) { 4499 var t = this.x, 4500 i = this.y, 4501 n = this.z, 4502 r = e.elements; 4503 return this.x = r[0] * t + r[3] * i + r[6] * n, this.y = r[1] * t + r[4] * i + r[7] * n, this.z = r[2] * t + r[5] * i + r[8] * n, this 4504 }, 4505 applyMatrix4: function(e) { 4506 var t = this.x, 4507 i = this.y, 4508 n = this.z, 4509 r = e.elements, 4510 o = 1 / (r[3] * t + r[7] * i + r[11] * n + r[15]); 4511 return this.x = (r[0] * t + r[4] * i + r[8] * n + r[12]) * o, this.y = (r[1] * t + r[5] * i + r[9] * n + r[13]) * o, this.z = (r[2] * t + r[6] * i + r[10] * n + r[14]) * o, this 4512 }, 4513 applyQuaternion: function(e) { 4514 var t = this.x, 4515 i = this.y, 4516 n = this.z, 4517 r = e.x, 4518 o = e.y, 4519 a = e.z, 4520 s = e.w, 4521 l = s * t + o * n - a * i, 4522 c = s * i + a * t - r * n, 4523 u = s * n + r * i - o * t, 4524 h = -r * t - o * i - a * n; 4525 return this.x = l * s + h * -r + c * -a - u * -o, this.y = c * s + h * -o + u * -r - l * -a, this.z = u * s + h * -a + l * -o - c * -r, this 4526 }, 4527 project: (yt = new It, function(e) { 4528 return yt.multiplyMatrices(e.projectionMatrix, yt.getInverse(e.matrixWorld)), this.applyMatrix4(yt) 4529 }), 4530 unproject: (vt = new It, function(e) { 4531 return vt.multiplyMatrices(e.matrixWorld, vt.getInverse(e.projectionMatrix)), this.applyMatrix4(vt) 4532 }), 4533 transformDirection: function(e) { 4534 var t = this.x, 4535 i = this.y, 4536 n = this.z, 4537 r = e.elements; 4538 return this.x = r[0] * t + r[4] * i + r[8] * n, this.y = r[1] * t + r[5] * i + r[9] * n, this.z = r[2] * t + r[6] * i + r[10] * n, this.normalize() 4539 }, 4540 divide: function(e) { 4541 return this.x /= e.x, this.y /= e.y, this.z /= e.z, this 4542 }, 4543 divideScalar: function(e) { 4544 return this.multiplyScalar(1 / e) 4545 }, 4546 min: function(e) { 4547 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 4548 }, 4549 max: function(e) { 4550 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 4551 }, 4552 clamp: function(e, t) { 4553 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 4554 }, 4555 clampScalar: (mt = new Dt, gt = new Dt, function(e, t) { 4556 return mt.set(e, e, e), gt.set(t, t, t), this.clamp(mt, gt) 4557 }), 4558 clampLength: function(e, t) { 4559 var i = this.length(); 4560 return this.divideScalar(i || 1).multiplyScalar(Math.max(e, Math.min(t, i))) 4561 }, 4562 floor: function() { 4563 return this.x = Math.floor(this.x), this.y = Math.floor(this.y), this.z = Math.floor(this.z), this 4564 }, 4565 ceil: function() { 4566 return this.x = Math.ceil(this.x), this.y = Math.ceil(this.y), this.z = Math.ceil(this.z), this 4567 }, 4568 round: function() { 4569 return this.x = Math.round(this.x), this.y = Math.round(this.y), this.z = Math.round(this.z), this 4570 }, 4571 roundToZero: function() { 4572 return this.x = this.x < 0 ? Math.ceil(this.x) : Math.floor(this.x), this.y = this.y < 0 ? Math.ceil(this.y) : Math.floor(this.y), this.z = this.z < 0 ? Math.ceil(this.z) : Math.floor(this.z), this 4573 }, 4574 negate: function() { 4575 return this.x = -this.x, this.y = -this.y, this.z = -this.z, this 4576 }, 4577 dot: function(e) { 4578 return this.x * e.x + this.y * e.y + this.z * e.z 4579 }, 4580 lengthSq: function() { 4581 return this.x * this.x + this.y * this.y + this.z * this.z 4582 }, 4583 length: function() { 4584 return Math.sqrt(this.x * this.x + this.y * this.y + this.z * this.z) 4585 }, 4586 lengthManhattan: function() { 4587 return Math.abs(this.x) + Math.abs(this.y) + Math.abs(this.z) 4588 }, 4589 normalize: function() { 4590 return this.divideScalar(this.length() || 1) 4591 }, 4592 setLength: function(e) { 4593 return this.normalize().multiplyScalar(e) 4594 }, 4595 lerp: function(e, t) { 4596 return this.x += (e.x - this.x) * t, this.y += (e.y - this.y) * t, this.z += (e.z - this.z) * t, this 4597 }, 4598 lerpVectors: function(e, t, i) { 4599 return this.subVectors(t, e).multiplyScalar(i).add(e) 4600 }, 4601 cross: function(e, t) { 4602 if (void 0 !== t) return console.warn("THREE.Vector3: .cross() now only accepts one argument. Use .crossVectors( a, b ) instead."), this.crossVectors(e, t); 4603 var i = this.x, 4604 n = this.y, 4605 r = this.z; 4606 return this.x = n * e.z - r * e.y, this.y = r * e.x - i * e.z, this.z = i * e.y - n * e.x, this 4607 }, 4608 crossVectors: function(e, t) { 4609 var i = e.x, 4610 n = e.y, 4611 r = e.z, 4612 o = t.x, 4613 a = t.y, 4614 s = t.z; 4615 return this.x = n * s - r * a, this.y = r * o - i * s, this.z = i * a - n * o, this 4616 }, 4617 projectOnVector: function(e) { 4618 var t = e.dot(this) / e.lengthSq(); 4619 return this.copy(e).multiplyScalar(t) 4620 }, 4621 projectOnPlane: (ft = new Dt, function(e) { 4622 return ft.copy(this).projectOnVector(e), this.sub(ft) 4623 }), 4624 reflect: (pt = new Dt, function(e) { 4625 return this.sub(pt.copy(e).multiplyScalar(2 * this.dot(e))) 4626 }), 4627 angleTo: function(e) { 4628 var t = this.dot(e) / Math.sqrt(this.lengthSq() * e.lengthSq()); 4629 return Math.acos(st.clamp(t, -1, 1)) 4630 }, 4631 distanceTo: function(e) { 4632 return Math.sqrt(this.distanceToSquared(e)) 4633 }, 4634 distanceToSquared: function(e) { 4635 var t = this.x - e.x, 4636 i = this.y - e.y, 4637 n = this.z - e.z; 4638 return t * t + i * i + n * n 4639 }, 4640 distanceToManhattan: function(e) { 4641 return Math.abs(this.x - e.x) + Math.abs(this.y - e.y) + Math.abs(this.z - e.z) 4642 }, 4643 setFromSpherical: function(e) { 4644 var t = Math.sin(e.phi) * e.radius; 4645 return this.x = t * Math.sin(e.theta), this.y = Math.cos(e.phi) * e.radius, this.z = t * Math.cos(e.theta), this 4646 }, 4647 setFromCylindrical: function(e) { 4648 return this.x = e.radius * Math.sin(e.theta), this.y = e.y, this.z = e.radius * Math.cos(e.theta), this 4649 }, 4650 setFromMatrixPosition: function(e) { 4651 var t = e.elements; 4652 return this.x = t[12], this.y = t[13], this.z = t[14], this 4653 }, 4654 setFromMatrixScale: function(e) { 4655 var t = this.setFromMatrixColumn(e, 0).length(), 4656 i = this.setFromMatrixColumn(e, 1).length(), 4657 n = this.setFromMatrixColumn(e, 2).length(); 4658 return this.x = t, this.y = i, this.z = n, this 4659 }, 4660 setFromMatrixColumn: function(e, t) { 4661 return this.fromArray(e.elements, 4 * t) 4662 }, 4663 equals: function(e) { 4664 return e.x === this.x && e.y === this.y && e.z === this.z 4665 }, 4666 fromArray: function(e, t) { 4667 return void 0 === t && (t = 0), this.x = e[t], this.y = e[t + 1], this.z = e[t + 2], this 4668 }, 4669 toArray: function(e, t) { 4670 return void 0 === e && (e = []), void 0 === t && (t = 0), e[t] = this.x, e[t + 1] = this.y, e[t + 2] = this.z, e 4671 }, 4672 fromBufferAttribute: function(e, t, i) { 4673 return void 0 !== i && console.warn("THREE.Vector3: offset has been removed from .fromBufferAttribute()."), this.x = e.getX(t), this.y = e.getY(t), this.z = e.getZ(t), this 4674 } 4675 }), Object.assign(It.prototype, { 4676 isMatrix4: !0, 4677 set: function(e, t, i, n, r, o, a, s, l, c, u, h, d, p, f, m) { 4678 var g = this.elements; 4679 return g[0] = e, g[4] = t, g[8] = i, g[12] = n, g[1] = r, g[5] = o, g[9] = a, g[13] = s, g[2] = l, g[6] = c, g[10] = u, g[14] = h, g[3] = d, g[7] = p, g[11] = f, g[15] = m, this 4680 }, 4681 identity: function() { 4682 return this.set(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1), this 4683 }, 4684 clone: function() { 4685 return (new It).fromArray(this.elements) 4686 }, 4687 copy: function(e) { 4688 var t = this.elements, 4689 i = e.elements; 4690 return t[0] = i[0], t[1] = i[1], t[2] = i[2], t[3] = i[3], t[4] = i[4], t[5] = i[5], t[6] = i[6], t[7] = i[7], t[8] = i[8], t[9] = i[9], t[10] = i[10], t[11] = i[11], t[12] = i[12], t[13] = i[13], t[14] = i[14], t[15] = i[15], this 4691 }, 4692 copyPosition: function(e) { 4693 var t = this.elements, 4694 i = e.elements; 4695 return t[12] = i[12], t[13] = i[13], t[14] = i[14], this 4696 }, 4697 extractBasis: function(e, t, i) { 4698 return e.setFromMatrixColumn(this, 0), t.setFromMatrixColumn(this, 1), i.setFromMatrixColumn(this, 2), this 4699 }, 4700 makeBasis: function(e, t, i) { 4701 return this.set(e.x, t.x, i.x, 0, e.y, t.y, i.y, 0, e.z, t.z, i.z, 0, 0, 0, 0, 1), this 4702 }, 4703 extractRotation: (Ct = new Dt, function(e) { 4704 var t = this.elements, 4705 i = e.elements, 4706 n = 1 / Ct.setFromMatrixColumn(e, 0).length(), 4707 r = 1 / Ct.setFromMatrixColumn(e, 1).length(), 4708 o = 1 / Ct.setFromMatrixColumn(e, 2).length(); 4709 return t[0] = i[0] * n, t[1] = i[1] * n, t[2] = i[2] * n, t[4] = i[4] * r, t[5] = i[5] * r, t[6] = i[6] * r, t[8] = i[8] * o, t[9] = i[9] * o, t[10] = i[10] * o, this 4710 }), 4711 makeRotationFromEuler: function(e) { 4712 e && e.isEuler || console.error("THREE.Matrix4: .makeRotationFromEuler() now expects a Euler rotation rather than a Vector3 and order."); 4713 var t = this.elements, 4714 i = e.x, 4715 n = e.y, 4716 r = e.z, 4717 o = Math.cos(i), 4718 a = Math.sin(i), 4719 s = Math.cos(n), 4720 l = Math.sin(n), 4721 c = Math.cos(r), 4722 u = Math.sin(r); 4723 if ("XYZ" === e.order) { 4724 var h = o * c, 4725 d = o * u, 4726 p = a * c, 4727 f = a * u; 4728 t[0] = s * c, t[4] = -s * u, t[8] = l, t[1] = d + p * l, t[5] = h - f * l, t[9] = -a * s, t[2] = f - h * l, t[6] = p + d * l, t[10] = o * s 4729 } else if ("YXZ" === e.order) { 4730 var m = s * c, 4731 g = s * u, 4732 v = l * c, 4733 y = l * u; 4734 t[0] = m + y * a, t[4] = v * a - g, t[8] = o * l, t[1] = o * u, t[5] = o * c, t[9] = -a, t[2] = g * a - v, t[6] = y + m * a, t[10] = o * s 4735 } else if ("ZXY" === e.order) { 4736 m = s * c, g = s * u, v = l * c, y = l * u; 4737 t[0] = m - y * a, t[4] = -o * u, t[8] = v + g * a, t[1] = g + v * a, t[5] = o * c, t[9] = y - m * a, t[2] = -o * l, t[6] = a, t[10] = o * s 4738 } else if ("ZYX" === e.order) { 4739 h = o * c, d = o * u, p = a * c, f = a * u; 4740 t[0] = s * c, t[4] = p * l - d, t[8] = h * l + f, t[1] = s * u, t[5] = f * l + h, t[9] = d * l - p, t[2] = -l, t[6] = a * s, t[10] = o * s 4741 } else if ("YZX" === e.order) { 4742 var b = o * s, 4743 w = o * l, 4744 x = a * s, 4745 _ = a * l; 4746 t[0] = s * c, t[4] = _ - b * u, t[8] = x * u + w, t[1] = u, t[5] = o * c, t[9] = -a * c, t[2] = -l * c, t[6] = w * u + x, t[10] = b - _ * u 4747 } else if ("XZY" === e.order) { 4748 b = o * s, w = o * l, x = a * s, _ = a * l; 4749 t[0] = s * c, t[4] = -u, t[8] = l * c, t[1] = b * u + _, t[5] = o * c, t[9] = w * u - x, t[2] = x * u - w, t[6] = a * c, t[10] = _ * u + b 4750 } 4751 return t[3] = 0, t[7] = 0, t[11] = 0, t[12] = 0, t[13] = 0, t[14] = 0, t[15] = 1, this 4752 }, 4753 makeRotationFromQuaternion: function(e) { 4754 var t = this.elements, 4755 i = e._x, 4756 n = e._y, 4757 r = e._z, 4758 o = e._w, 4759 a = i + i, 4760 s = n + n, 4761 l = r + r, 4762 c = i * a, 4763 u = i * s, 4764 h = i * l, 4765 d = n * s, 4766 p = n * l, 4767 f = r * l, 4768 m = o * a, 4769 g = o * s, 4770 v = o * l; 4771 return t[0] = 1 - (d + f), t[4] = u - v, t[8] = h + g, t[1] = u + v, t[5] = 1 - (c + f), t[9] = p - m, t[2] = h - g, t[6] = p + m, t[10] = 1 - (c + d), t[3] = 0, t[7] = 0, t[11] = 0, t[12] = 0, t[13] = 0, t[14] = 0, t[15] = 1, this 4772 }, 4773 lookAt: (Et = new Dt, Mt = new Dt, St = new Dt, function(e, t, i) { 4774 var n = this.elements; 4775 return St.subVectors(e, t), 0 === St.lengthSq() && (St.z = 1), St.normalize(), Et.crossVectors(i, St), 0 === Et.lengthSq() && (1 === Math.abs(i.z) ? St.x += 1e-4 : St.z += 1e-4, St.normalize(), Et.crossVectors(i, St)), Et.normalize(), Mt.crossVectors(St, Et), n[0] = Et.x, n[4] = Mt.x, n[8] = St.x, n[1] = Et.y, n[5] = Mt.y, n[9] = St.y, n[2] = Et.z, n[6] = Mt.z, n[10] = St.z, this 4776 }), 4777 multiply: function(e, t) { 4778 return void 0 !== t ? (console.warn("THREE.Matrix4: .multiply() now only accepts one argument. Use .multiplyMatrices( a, b ) instead."), this.multiplyMatrices(e, t)) : this.multiplyMatrices(this, e) 4779 }, 4780 premultiply: function(e) { 4781 return this.multiplyMatrices(e, this) 4782 }, 4783 multiplyMatrices: function(e, t) { 4784 var i = e.elements, 4785 n = t.elements, 4786 r = this.elements, 4787 o = i[0], 4788 a = i[4], 4789 s = i[8], 4790 l = i[12], 4791 c = i[1], 4792 u = i[5], 4793 h = i[9], 4794 d = i[13], 4795 p = i[2], 4796 f = i[6], 4797 m = i[10], 4798 g = i[14], 4799 v = i[3], 4800 y = i[7], 4801 b = i[11], 4802 w = i[15], 4803 x = n[0], 4804 _ = n[4], 4805 T = n[8], 4806 E = n[12], 4807 M = n[1], 4808 S = n[5], 4809 C = n[9], 4810 A = n[13], 4811 R = n[2], 4812 L = n[6], 4813 P = n[10], 4814 k = n[14], 4815 O = n[3], 4816 D = n[7], 4817 I = n[11], 4818 z = n[15]; 4819 return r[0] = o * x + a * M + s * R + l * O, r[4] = o * _ + a * S + s * L + l * D, r[8] = o * T + a * C + s * P + l * I, r[12] = o * E + a * A + s * k + l * z, r[1] = c * x + u * M + h * R + d * O, r[5] = c * _ + u * S + h * L + d * D, r[9] = c * T + u * C + h * P + d * I, r[13] = c * E + u * A + h * k + d * z, r[2] = p * x + f * M + m * R + g * O, r[6] = p * _ + f * S + m * L + g * D, r[10] = p * T + f * C + m * P + g * I, r[14] = p * E + f * A + m * k + g * z, r[3] = v * x + y * M + b * R + w * O, r[7] = v * _ + y * S + b * L + w * D, r[11] = v * T + y * C + b * P + w * I, r[15] = v * E + y * A + b * k + w * z, this 4820 }, 4821 multiplyScalar: function(e) { 4822 var t = this.elements; 4823 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 4824 }, 4825 applyToBufferAttribute: (Tt = new Dt, function(e) { 4826 for (var t = 0, i = e.count; t < i; t++) Tt.x = e.getX(t), Tt.y = e.getY(t), Tt.z = e.getZ(t), Tt.applyM
vendor: 4,392 bytes, lines 4826-4902
4826atrix4(this), e.setXYZ(t, Tt.x, Tt.y, Tt.z); 4827 return e 4828 }), 4829 determinant: function() { 4830 var e = this.elements, 4831 t = e[0], 4832 i = e[4], 4833 n = e[8], 4834 r = e[12], 4835 o = e[1], 4836 a = e[5], 4837 s = e[9], 4838 l = e[13], 4839 c = e[2], 4840 u = e[6], 4841 h = e[10], 4842 d = e[14]; 4843 return e[3] * (+r * s * u - n * l * u - r * a * h + i * l * h + n * a * d - i * s * d) + e[7] * (+t * s * d - t * l * h + r * o * h - n * o * d + n * l * c - r * s * c) + e[11] * (+t * l * u - t * a * d - r * o * u + i * o * d + r * a * c - i * l * c) + e[15] * (-n * a * c - t * s * u + t * a * h + n * o * u - i * o * h + i * s * c) 4844 }, 4845 transpose: function() { 4846 var e, t = this.elements; 4847 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 4848 }, 4849 setPosition: function(e) { 4850 var t = this.elements; 4851 return t[12] = e.x, t[13] = e.y, t[14] = e.z, this 4852 }, 4853 getInverse: function(e, t) { 4854 var i = this.elements, 4855 n = e.elements, 4856 r = n[0], 4857 o = n[1], 4858 a = n[2], 4859 s = n[3], 4860 l = n[4], 4861 c = n[5], 4862 u = n[6], 4863 h = n[7], 4864 d = n[8], 4865 p = n[9], 4866 f = n[10], 4867 m = n[11], 4868 g = n[12], 4869 v = n[13], 4870 y = n[14], 4871 b = n[15], 4872 w = p * y * h - v * f * h + v * u * m - c * y * m - p * u * b + c * f * b, 4873 x = g * f * h - d * y * h - g * u * m + l * y * m + d * u * b - l * f * b, 4874 _ = d * v * h - g * p * h + g * c * m - l * v * m - d * c * b + l * p * b, 4875 T = g * p * u - d * v * u - g * c * f + l * v * f + d * c * y - l * p * y, 4876 E = r * w + o * x + a * _ + s * T; 4877 if (0 === E) { 4878 var M = "THREE.Matrix4: .getInverse() can't invert matrix, determinant is 0"; 4879 if (!0 === t) throw new Error(M); 4880 return console.warn(M), this.identity() 4881 } 4882 var S = 1 / E; 4883 return i[0] = w * S, i[1] = (v * f * s - p * y * s - v * a * m + o * y * m + p * a * b - o * f * b) * S, i[2] = (c * y * s - v * u * s + v * a * h - o * y * h - c * a * b + o * u * b) * S, i[3] = (p * u * s - c * f * s - p * a * h + o * f * h + c * a * m - o * u * m) * S, i[4] = x * S, i[5] = (d * y * s - g * f * s + g * a * m - r * y * m - d * a * b + r * f * b) * S, i[6] = (g * u * s - l * y * s - g * a * h + r * y * h + l * a * b - r * u * b) * S, i[7] = (l * f * s - d * u * s + d * a * h - r * f * h - l * a * m + r * u * m) * S, i[8] = _ * S, i[9] = (g * p * s - d * v * s - g * o * m + r * v * m + d * o * b - r * p * b) * S, i[10] = (l * v * s - g * c * s + g * o * h - r * v * h - l * o * b + r * c * b) * S, i[11] = (d * c * s - l * p * s - d * o * h + r * p * h + l * o * m - r * c * m) * S, i[12] = T * S, i[13] = (d * v * a - g * p * a + g * o * f - r * v * f - d * o * y + r * p * y) * S, i[14] = (g * c * a - l * v * a - g * o * u + r * v * u + l * o * y - r * c * y) * S, i[15] = (l * p * a - d * c * a + d * o * u - r * p * u - l * o * f + r * c * f) * S, this 4884 }, 4885 scale: function(e) { 4886 var t = this.elements, 4887 i = e.x, 4888 n = e.y, 4889 r = e.z; 4890 return t[0] *= i, t[4] *= n, t[8] *= r, t[1] *= i, t[5] *= n, t[9] *= r, t[2] *= i, t[6] *= n, t[10] *= r, t[3] *= i, t[7] *= n, t[11] *= r, this 4891 }, 4892 getMaxScaleOnAxis: function() { 4893 var e = this.elements, 4894 t = e[0] * e[0] + e[1] * e[1] + e[2] * e[2], 4895 i = e[4] * e[4] + e[5] * e[5] + e[6] * e[6], 4896 n = e[8] * e[8] + e[9] * e[9] + e[10] * e[10]; 4897 return Math.sqrt(Math.max(t, i, n)) 4898 }, 4899 makeTranslation: function(e, t, i) { 4900 return this.set(1, 0, 0, e, 0, 1, 0, t, 0, 0, 1, i, 0, 0, 0, 1), this 4901 }, 4902 makeRotationX: function(e) {
vendor: 4,538 bytes, lines 4903-4992
4903 var t = Math.cos(e), 4904 i = Math.sin(e); 4905 return this.set(1, 0, 0, 0, 0, t, -i, 0, 0, i, t, 0, 0, 0, 0, 1), this 4906 }, 4907 makeRotationY: function(e) { 4908 var t = Math.cos(e), 4909 i = Math.sin(e); 4910 return this.set(t, 0, i, 0, 0, 1, 0, 0, -i, 0, t, 0, 0, 0, 0, 1), this 4911 }, 4912 makeRotationZ: function(e) { 4913 var t = Math.cos(e), 4914 i = Math.sin(e); 4915 return this.set(t, -i, 0, 0, i, t, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1), this 4916 }, 4917 makeRotationAxis: function(e, t) { 4918 var i = Math.cos(t), 4919 n = Math.sin(t), 4920 r = 1 - i, 4921 o = e.x, 4922 a = e.y, 4923 s = e.z, 4924 l = r * o, 4925 c = r * a; 4926 return this.set(l * o + i, l * a - n * s, l * s + n * a, 0, l * a + n * s, c * a + i, c * s - n * o, 0, l * s - n * a, c * s + n * o, r * s * s + i, 0, 0, 0, 0, 1), this 4927 }, 4928 makeScale: function(e, t, i) { 4929 return this.set(e, 0, 0, 0, 0, t, 0, 0, 0, 0, i, 0, 0, 0, 0, 1), this 4930 }, 4931 makeShear: function(e, t, i) { 4932 return this.set(1, t, i, 0, e, 1, i, 0, e, t, 1, 0, 0, 0, 0, 1), this 4933 }, 4934 compose: function(e, t, i) { 4935 return this.makeRotationFromQuaternion(t), this.scale(i), this.setPosition(e), this 4936 }, 4937 decompose: (xt = new Dt, _t = new It, function(e, t, i) { 4938 var n = this.elements, 4939 r = xt.set(n[0], n[1], n[2]).length(), 4940 o = xt.set(n[4], n[5], n[6]).length(), 4941 a = xt.set(n[8], n[9], n[10]).length(); 4942 this.determinant() < 0 && (r = -r), e.x = n[12], e.y = n[13], e.z = n[14], _t.copy(this); 4943 var s = 1 / r, 4944 l = 1 / o, 4945 c = 1 / a; 4946 return _t.elements[0] *= s, _t.elements[1] *= s, _t.elements[2] *= s, _t.elements[4] *= l, _t.elements[5] *= l, _t.elements[6] *= l, _t.elements[8] *= c, _t.elements[9] *= c, _t.elements[10] *= c, t.setFromRotationMatrix(_t), i.x = r, i.y = o, i.z = a, this 4947 }), 4948 makePerspective: function(e, t, i, n, r, o) { 4949 void 0 === o && console.warn("THREE.Matrix4: .makePerspective() has been redefined and has a new signature. Please check the docs."); 4950 var a = this.elements, 4951 s = 2 * r / (t - e), 4952 l = 2 * r / (i - n), 4953 c = (t + e) / (t - e), 4954 u = (i + n) / (i - n), 4955 h = -(o + r) / (o - r), 4956 d = -2 * o * r / (o - r); 4957 return a[0] = s, a[4] = 0, a[8] = c, a[12] = 0, a[1] = 0, a[5] = l, a[9] = u, a[13] = 0, a[2] = 0, a[6] = 0, a[10] = h, a[14] = d, a[3] = 0, a[7] = 0, a[11] = -1, a[15] = 0, this 4958 }, 4959 makeOrthographic: function(e, t, i, n, r, o) { 4960 var a = this.elements, 4961 s = 1 / (t - e), 4962 l = 1 / (i - n), 4963 c = 1 / (o - r), 4964 u = (t + e) * s, 4965 h = (i + n) * l, 4966 d = (o + r) * c; 4967 return a[0] = 2 * s, a[4] = 0, a[8] = 0, a[12] = -u, a[1] = 0, a[5] = 2 * l, a[9] = 0, a[13] = -h, a[2] = 0, a[6] = 0, a[10] = -2 * c, a[14] = -d, a[3] = 0, a[7] = 0, a[11] = 0, a[15] = 1, this 4968 }, 4969 equals: function(e) { 4970 for (var t = this.elements, i = e.elements, n = 0; n < 16; n++) 4971 if (t[n] !== i[n]) return !1; 4972 return !0 4973 }, 4974 fromArray: function(e, t) { 4975 void 0 === t && (t = 0); 4976 for (var i = 0; i < 16; i++) this.elements[i] = e[i + t]; 4977 return this 4978 }, 4979 toArray: function(e, t) { 4980 void 0 === e && (e = []), void 0 === t && (t = 0); 4981 var i = this.elements; 4982 return e[t] = i[0], e[t + 1] = i[1], e[t + 2] = i[2], e[t + 3] = i[3], e[t + 4] = i[4], e[t + 5] = i[5], e[t + 6] = i[6], e[t + 7] = i[7], e[t + 8] = i[8], e[t + 9] = i[9], e[t + 10] = i[10], e[t + 11] = i[11], e[t + 12] = i[12], e[t + 13] = i[13], e[t + 14] = i[14], e[t + 15] = i[15], e 4983 } 4984 }), ((zt.prototype = Object.create(Rt.prototype)).constructor = zt).prototype.isDataTexture = !0, ((Nt.prototype = Object.create(Rt.prototype)).constructor = Nt).prototype.isCubeTexture = !0, Object.defineProperty(Nt.prototype, "images", { 4985 get: function() { 4986 return this.image 4987 }, 4988 set: function(e) { 4989 this.image = e 4990 } 4991 }); 4992 var Ft = new Rt,
vendor: 26,423 bytes, lines 4993-5811
4993 Ut = new Nt; 4994 4995 function Bt() { 4996 this.seq = [], this.map = {} 4997 } 4998 var Ht = [], 4999 $t = [], 5000 jt = new Float32Array(16), 5001 Gt = new Float32Array(9); 5002 5003 function Vt(e, t, i) { 5004 var n = e[0]; 5005 if (n <= 0 || 0 < n) return e; 5006 var r = t * i, 5007 o = Ht[r]; 5008 if (void 0 === o && (o = new Float32Array(r), Ht[r] = o), 0 !== t) { 5009 n.toArray(o, 0); 5010 for (var a = 1, s = 0; a !== t; ++a) s += i, e[a].toArray(o, s) 5011 } 5012 return o 5013 } 5014 5015 function Wt(e, t) { 5016 var i = $t[t]; 5017 void 0 === i && (i = new Int32Array(t), $t[t] = i); 5018 for (var n = 0; n !== t; ++n) i[n] = e.allocTextureUnit(); 5019 return i 5020 } 5021 5022 function qt(e, t) { 5023 e.uniform1f(this.addr, t) 5024 } 5025 5026 function Xt(e, t) { 5027 e.uniform1i(this.addr, t) 5028 } 5029 5030 function Yt(e, t) { 5031 void 0 === t.x ? e.uniform2fv(this.addr, t) : e.uniform2f(this.addr, t.x, t.y) 5032 } 5033 5034 function Zt(e, t) { 5035 void 0 !== t.x ? e.uniform3f(this.addr, t.x, t.y, t.z) : void 0 !== t.r ? e.uniform3f(this.addr, t.r, t.g, t.b) : e.uniform3fv(this.addr, t) 5036 } 5037 5038 function Qt(e, t) { 5039 void 0 === t.x ? e.uniform4fv(this.addr, t) : e.uniform4f(this.addr, t.x, t.y, t.z, t.w) 5040 } 5041 5042 function Jt(e, t) { 5043 e.uniformMatrix2fv(this.addr, !1, t.elements || t) 5044 } 5045 5046 function Kt(e, t) { 5047 void 0 === t.elements ? e.uniformMatrix3fv(this.addr, !1, t) : (Gt.set(t.elements), e.uniformMatrix3fv(this.addr, !1, Gt)) 5048 } 5049 5050 function ei(e, t) { 5051 void 0 === t.elements ? e.uniformMatrix4fv(this.addr, !1, t) : (jt.set(t.elements), e.uniformMatrix4fv(this.addr, !1, jt)) 5052 } 5053 5054 function ti(e, t, i) { 5055 var n = i.allocTextureUnit(); 5056 e.uniform1i(this.addr, n), i.setTexture2D(t || Ft, n) 5057 } 5058 5059 function ii(e, t, i) { 5060 var n = i.allocTextureUnit(); 5061 e.uniform1i(this.addr, n), i.setTextureCube(t || Ut, n) 5062 } 5063 5064 function ni(e, t) { 5065 e.uniform2iv(this.addr, t) 5066 } 5067 5068 function ri(e, t) { 5069 e.uniform3iv(this.addr, t) 5070 } 5071 5072 function oi(e, t) { 5073 e.uniform4iv(this.addr, t) 5074 } 5075 5076 function ai(e, t) { 5077 e.uniform1fv(this.addr, t) 5078 } 5079 5080 function si(e, t) { 5081 e.uniform1iv(this.addr, t) 5082 } 5083 5084 function li(e, t) { 5085 e.uniform2fv(this.addr, Vt(t, this.size, 2)) 5086 } 5087 5088 function ci(e, t) { 5089 e.uniform3fv(this.addr, Vt(t, this.size, 3)) 5090 } 5091 5092 function ui(e, t) { 5093 e.uniform4fv(this.addr, Vt(t, this.size, 4)) 5094 } 5095 5096 function hi(e, t) { 5097 e.uniformMatrix2fv(this.addr, !1, Vt(t, this.size, 4)) 5098 } 5099 5100 function di(e, t) { 5101 e.uniformMatrix3fv(this.addr, !1, Vt(t, this.size, 9)) 5102 } 5103 5104 function pi(e, t) { 5105 e.uniformMatrix4fv(this.addr, !1, Vt(t, this.size, 16)) 5106 } 5107 5108 function fi(e, t, i) { 5109 var n = t.length, 5110 r = Wt(i, n); 5111 e.uniform1iv(this.addr, r); 5112 for (var o = 0; o !== n; ++o) i.setTexture2D(t[o] || Ft, r[o]) 5113 } 5114 5115 function mi(e, t, i) { 5116 var n = t.length, 5117 r = Wt(i, n); 5118 e.uniform1iv(this.addr, r); 5119 for (var o = 0; o !== n; ++o) i.setTextureCube(t[o] || Ut, r[o]) 5120 } 5121 5122 function gi(e, t, i) { 5123 this.id = e, this.addr = i, this.setValue = function(e) { 5124 switch (e) { 5125 case 5126: 5126 return qt; 5127 case 35664: 5128 return Yt; 5129 case 35665: 5130 return Zt; 5131 case 35666: 5132 return Qt; 5133 case 35674: 5134 return Jt; 5135 case 35675: 5136 return Kt; 5137 case 35676: 5138 return ei; 5139 case 35678: 5140 case 36198: 5141 return ti; 5142 case 35680: 5143 return ii; 5144 case 5124: 5145 case 35670: 5146 return Xt; 5147 case 35667: 5148 case 35671: 5149 return ni; 5150 case 35668: 5151 case 35672: 5152 return ri; 5153 case 35669: 5154 case 35673: 5155 return oi 5156 } 5157 }(t.type) 5158 } 5159 5160 function vi(e, t, i) { 5161 this.id = e, this.addr = i, this.size = t.size, this.setValue = function(e) { 5162 switch (e) { 5163 case 5126: 5164 return ai; 5165 case 35664: 5166 return li; 5167 case 35665: 5168 return ci; 5169 case 35666: 5170 return ui; 5171 case 35674: 5172 return hi; 5173 case 35675: 5174 return di; 5175 case 35676: 5176 return pi; 5177 case 35678: 5178 return fi; 5179 case 35680: 5180 return mi; 5181 case 5124: 5182 case 35670: 5183 return si; 5184 case 35667: 5185 case 35671: 5186 return ni; 5187 case 35668: 5188 case 35672: 5189 return ri; 5190 case 35669: 5191 case 35673: 5192 return oi 5193 } 5194 }(t.type) 5195 } 5196 5197 function yi(e) { 5198 this.id = e, Bt.call(this) 5199 } 5200 yi.prototype.setValue = function(e, t) { 5201 for (var i = this.seq, n = 0, r = i.length; n !== r; ++n) { 5202 var o = i[n]; 5203 o.setValue(e, t[o.id]) 5204 } 5205 }; 5206 var bi = /([\w\d_]+)(\])?(\[|\.)?/g; 5207 5208 function wi(e, t) { 5209 e.seq.push(t), e.map[t.id] = t 5210 } 5211 5212 function xi(e, t, i) { 5213 var n = e.name, 5214 r = n.length; 5215 for (bi.lastIndex = 0;;) { 5216 var o = bi.exec(n), 5217 a = bi.lastIndex, 5218 s = o[1], 5219 l = "]" === o[2], 5220 c = o[3]; 5221 if (l && (s |= 0), void 0 === c || "[" === c && a + 2 === r) { 5222 wi(i, void 0 === c ? new gi(s, e, t) : new vi(s, e, t)); 5223 break 5224 } 5225 var u = i.map[s]; 5226 void 0 === u && wi(i, u = new yi(s)), i = u 5227 } 5228 } 5229 5230 function _i(e, t, i) { 5231 Bt.call(this), this.renderer = i; 5232 for (var n = e.getProgramParameter(t, e.ACTIVE_UNIFORMS), r = 0; r < n; ++r) { 5233 var o = e.getActiveUniform(t, r), 5234 a = o.name; 5235 xi(o, e.getUniformLocation(t, a), this) 5236 } 5237 } 5238 _i.prototype.setValue = function(e, t, i) { 5239 var n = this.map[t]; 5240 void 0 !== n && n.setValue(e, i, this.renderer) 5241 }, _i.prototype.setOptional = function(e, t, i) { 5242 var n = t[i]; 5243 void 0 !== n && this.setValue(e, i, n) 5244 }, _i.upload = function(e, t, i, n) { 5245 for (var r = 0, o = t.length; r !== o; ++r) { 5246 var a = t[r], 5247 s = i[a.id]; 5248 !1 !== s.needsUpdate && a.setValue(e, s.value, n) 5249 } 5250 }, _i.seqWithValue = function(e, t) { 5251 for (var i = [], n = 0, r = e.length; n !== r; ++n) { 5252 var o = e[n]; 5253 o.id in t && i.push(o) 5254 } 5255 return i 5256 }; 5257 var Ti = { 5258 aliceblue: 15792383, 5259 antiquewhite: 16444375, 5260 aqua: 65535, 5261 aquamarine: 8388564, 5262 azure: 15794175, 5263 beige: 16119260, 5264 bisque: 16770244, 5265 black: 0, 5266 blanchedalmond: 16772045, 5267 blue: 255, 5268 blueviolet: 9055202, 5269 brown: 10824234, 5270 burlywood: 14596231, 5271 cadetblue: 6266528, 5272 chartreuse: 8388352, 5273 chocolate: 13789470, 5274 coral: 16744272, 5275 cornflowerblue: 6591981, 5276 cornsilk: 16775388, 5277 crimson: 14423100, 5278 cyan: 65535, 5279 darkblue: 139, 5280 darkcyan: 35723, 5281 darkgoldenrod: 12092939, 5282 darkgray: 11119017, 5283 darkgreen: 25600, 5284 darkgrey: 11119017, 5285 darkkhaki: 12433259, 5286 darkmagenta: 9109643, 5287 darkolivegreen: 5597999, 5288 darkorange: 16747520, 5289 darkorchid: 10040012, 5290 darkred: 9109504, 5291 darksalmon: 15308410, 5292 darkseagreen: 9419919, 5293 darkslateblue: 4734347, 5294 darkslategray: 3100495, 5295 darkslategrey: 3100495, 5296 darkturquoise: 52945, 5297 darkviolet: 9699539, 5298 deeppink: 16716947, 5299 deepskyblue: 49151, 5300 dimgray: 6908265, 5301 dimgrey: 6908265, 5302 dodgerblue: 2003199, 5303 firebrick: 11674146, 5304 floralwhite: 16775920, 5305 forestgreen: 2263842, 5306 fuchsia: 16711935, 5307 gainsboro: 14474460, 5308 ghostwhite: 16316671, 5309 gold: 16766720, 5310 goldenrod: 14329120, 5311 gray: 8421504, 5312 green: 32768, 5313 greenyellow: 11403055, 5314 grey: 8421504, 5315 honeydew: 15794160, 5316 hotpink: 16738740, 5317 indianred: 13458524, 5318 indigo: 4915330, 5319 ivory: 16777200, 5320 khaki: 15787660, 5321 lavender: 15132410, 5322 lavenderblush: 16773365, 5323 lawngreen: 8190976, 5324 lemonchiffon: 16775885, 5325 lightblue: 11393254, 5326 lightcoral: 15761536, 5327 lightcyan: 14745599, 5328 lightgoldenrodyellow: 16448210, 5329 lightgray: 13882323, 5330 lightgreen: 9498256, 5331 lightgrey: 13882323, 5332 lightpink: 16758465, 5333 lightsalmon: 16752762, 5334 lightseagreen: 2142890, 5335 lightskyblue: 8900346, 5336 lightslategray: 7833753, 5337 lightslategrey: 7833753, 5338 lightsteelblue: 11584734, 5339 lightyellow: 16777184, 5340 lime: 65280, 5341 limegreen: 3329330, 5342 linen: 16445670, 5343 magenta: 16711935, 5344 maroon: 8388608, 5345 mediumaquamarine: 6737322, 5346 mediumblue: 205, 5347 mediumorchid: 12211667, 5348 mediumpurple: 9662683, 5349 mediumseagreen: 3978097, 5350 mediumslateblue: 8087790, 5351 mediumspringgreen: 64154, 5352 mediumturquoise: 4772300, 5353 mediumvioletred: 13047173, 5354 midnightblue: 1644912, 5355 mintcream: 16121850, 5356 mistyrose: 16770273, 5357 moccasin: 16770229, 5358 navajowhite: 16768685, 5359 navy: 128, 5360 oldlace: 16643558, 5361 olive: 8421376, 5362 olivedrab: 7048739, 5363 orange: 16753920, 5364 orangered: 16729344, 5365 orchid: 14315734, 5366 palegoldenrod: 15657130, 5367 palegreen: 10025880, 5368 paleturquoise: 11529966, 5369 palevioletred: 14381203, 5370 papayawhip: 16773077, 5371 peachpuff: 16767673, 5372 peru: 13468991, 5373 pink: 16761035, 5374 plum: 14524637, 5375 powderblue: 11591910, 5376 purple: 8388736, 5377 rebeccapurple: 6697881, 5378 red: 16711680, 5379 rosybrown: 12357519, 5380 royalblue: 4286945, 5381 saddlebrown: 9127187, 5382 salmon: 16416882, 5383 sandybrown: 16032864, 5384 seagreen: 3050327, 5385 seashell: 16774638, 5386 sienna: 10506797, 5387 silver: 12632256, 5388 skyblue: 8900331, 5389 slateblue: 6970061, 5390 slategray: 7372944, 5391 slategrey: 7372944, 5392 snow: 16775930, 5393 springgreen: 65407, 5394 steelblue: 4620980, 5395 tan: 13808780, 5396 teal: 32896, 5397 thistle: 14204888, 5398 tomato: 16737095, 5399 turquoise: 4251856, 5400 violet: 15631086, 5401 wheat: 16113331, 5402 white: 16777215, 5403 whitesmoke: 16119285, 5404 yellow: 16776960, 5405 yellowgreen: 10145074 5406 }; 5407 5408 function Ei(e, t, i) { 5409 return void 0 === t && void 0 === i ? this.set(e) : this.setRGB(e, t, i) 5410 } 5411 Object.assign(Ei.prototype, { 5412 isColor: !0, 5413 r: 1, 5414 g: 1, 5415 b: 1, 5416 set: function(e) { 5417 return e && e.isColor ? this.copy(e) : "number" == typeof e ? this.setHex(e) : "string" == typeof e && this.setStyle(e), this 5418 }, 5419 setScalar: function(e) { 5420 return this.r = e, this.g = e, this.b = e, this 5421 }, 5422 setHex: function(e) { 5423 return e = Math.floor(e), this.r = (e >> 16 & 255) / 255, this.g = (e >> 8 & 255) / 255, this.b = (255 & e) / 255, this 5424 }, 5425 setRGB: function(e, t, i) { 5426 return this.r = e, this.g = t, this.b = i, this 5427 }, 5428 setHSL: function() { 5429 function o(e, t, i) { 5430 return i < 0 && (i += 1), 1 < i && (i -= 1), i < 1 / 6 ? e + 6 * (t - e) * i : i < .5 ? t : i < 2 / 3 ? e + 6 * (t - e) * (2 / 3 - i) : e 5431 } 5432 return function(e, t, i) { 5433 if (e = st.euclideanModulo(e, 1), t = st.clamp(t, 0, 1), i = st.clamp(i, 0, 1), 0 === t) this.r = this.g = this.b = i; 5434 else { 5435 var n = i <= .5 ? i * (1 + t) : i + t - i * t, 5436 r = 2 * i - n; 5437 this.r = o(r, n, e + 1 / 3), this.g = o(r, n, e), this.b = o(r, n, e - 1 / 3) 5438 } 5439 return this 5440 } 5441 }(), 5442 setStyle: function(t) { 5443 function e(e) { 5444 void 0 !== e && parseFloat(e) < 1 && console.warn("THREE.Color: Alpha component of " + t + " will be ignored.") 5445 } 5446 var i; 5447 if (i = /^((?:rgb|hsl)a?)\(\s*([^\)]*)\)/.exec(t)) { 5448 var n, r = i[1], 5449 o = i[2]; 5450 switch (r) { 5451 case "rgb": 5452 case "rgba": 5453 if (n = /^(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(,\s*([0-9]*\.?[0-9]+)\s*)?$/.exec(o)) return this.r = Math.min(255, parseInt(n[1], 10)) / 255, this.g = Math.min(255, parseInt(n[2], 10)) / 255, this.b = Math.min(255, parseInt(n[3], 10)) / 255, e(n[5]), this; 5454 if (n = /^(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(,\s*([0-9]*\.?[0-9]+)\s*)?$/.exec(o)) return this.r = Math.min(100, parseInt(n[1], 10)) / 100, this.g = Math.min(100, parseInt(n[2], 10)) / 100, this.b = Math.min(100, parseInt(n[3], 10)) / 100, e(n[5]), this; 5455 break; 5456 case "hsl": 5457 case "hsla": 5458 if (n = /^([0-9]*\.?[0-9]+)\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(,\s*([0-9]*\.?[0-9]+)\s*)?$/.exec(o)) { 5459 var a = parseFloat(n[1]) / 360, 5460 s = parseInt(n[2], 10) / 100, 5461 l = parseInt(n[3], 10) / 100; 5462 return e(n[5]), this.setHSL(a, s, l) 5463 } 5464 } 5465 } else if (i = /^\#([A-Fa-f0-9]+)$/.exec(t)) { 5466 var c, u = (c = i[1]).length; 5467 if (3 === u) return this.r = parseInt(c.charAt(0) + c.charAt(0), 16) / 255, this.g = parseInt(c.charAt(1) + c.charAt(1), 16) / 255, this.b = parseInt(c.charAt(2) + c.charAt(2), 16) / 255, this; 5468 if (6 === u) return this.r = parseInt(c.charAt(0) + c.charAt(1), 16) / 255, this.g = parseInt(c.charAt(2) + c.charAt(3), 16) / 255, this.b = parseInt(c.charAt(4) + c.charAt(5), 16) / 255, this 5469 } 5470 t && 0 < t.length && (void 0 !== (c = Ti[t]) ? this.setHex(c) : console.warn("THREE.Color: Unknown color " + t)); 5471 return this 5472 }, 5473 clone: function() { 5474 return new this.constructor(this.r, this.g, this.b) 5475 }, 5476 copy: function(e) { 5477 return this.r = e.r, this.g = e.g, this.b = e.b, this 5478 }, 5479 copyGammaToLinear: function(e, t) { 5480 return void 0 === t && (t = 2), this.r = Math.pow(e.r, t), this.g = Math.pow(e.g, t), this.b = Math.pow(e.b, t), this 5481 }, 5482 copyLinearToGamma: function(e, t) { 5483 void 0 === t && (t = 2); 5484 var i = 0 < t ? 1 / t : 1; 5485 return this.r = Math.pow(e.r, i), this.g = Math.pow(e.g, i), this.b = Math.pow(e.b, i), this 5486 }, 5487 convertGammaToLinear: function() { 5488 var e = this.r, 5489 t = this.g, 5490 i = this.b; 5491 return this.r = e * e, this.g = t * t, this.b = i * i, this 5492 }, 5493 convertLinearToGamma: function() { 5494 return this.r = Math.sqrt(this.r), this.g = Math.sqrt(this.g), this.b = Math.sqrt(this.b), this 5495 }, 5496 getHex: function() { 5497 return 255 * this.r << 16 ^ 255 * this.g << 8 ^ 255 * this.b << 0 5498 }, 5499 getHexString: function() { 5500 return ("000000" + this.getHex().toString(16)).slice(-6) 5501 }, 5502 getHSL: function(e) { 5503 var t, i, n = e || { 5504 h: 0, 5505 s: 0, 5506 l: 0 5507 }, 5508 r = this.r, 5509 o = this.g, 5510 a = this.b, 5511 s = Math.max(r, o, a), 5512 l = Math.min(r, o, a), 5513 c = (l + s) / 2; 5514 if (l === s) i = t = 0; 5515 else { 5516 var u = s - l; 5517 switch (i = c <= .5 ? u / (s + l) : u / (2 - s - l), s) { 5518 case r: 5519 t = (o - a) / u + (o < a ? 6 : 0); 5520 break; 5521 case o: 5522 t = (a - r) / u + 2; 5523 break; 5524 case a: 5525 t = (r - o) / u + 4 5526 } 5527 t /= 6 5528 } 5529 return n.h = t, n.s = i, n.l = c, n 5530 }, 5531 getStyle: function() { 5532 return "rgb(" + (255 * this.r | 0) + "," + (255 * this.g | 0) + "," + (255 * this.b | 0) + ")" 5533 }, 5534 offsetHSL: function(e, t, i) { 5535 var n = this.getHSL(); 5536 return n.h += e, n.s += t, n.l += i, this.setHSL(n.h, n.s, n.l), this 5537 }, 5538 add: function(e) { 5539 return this.r += e.r, this.g += e.g, this.b += e.b, this 5540 }, 5541 addColors: function(e, t) { 5542 return this.r = e.r + t.r, this.g = e.g + t.g, this.b = e.b + t.b, this 5543 }, 5544 addScalar: function(e) { 5545 return this.r += e, this.g += e, this.b += e, this 5546 }, 5547 sub: function(e) { 5548 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 5549 }, 5550 multiply: function(e) { 5551 return this.r *= e.r, this.g *= e.g, this.b *= e.b, this 5552 }, 5553 multiplyScalar: function(e) { 5554 return this.r *= e, this.g *= e, this.b *= e, this 5555 }, 5556 lerp: function(e, t) { 5557 return this.r += (e.r - this.r) * t, this.g += (e.g - this.g) * t, this.b += (e.b - this.b) * t, this 5558 }, 5559 equals: function(e) { 5560 return e.r === this.r && e.g === this.g && e.b === this.b 5561 }, 5562 fromArray: function(e, t) { 5563 return void 0 === t && (t = 0), this.r = e[t], this.g = e[t + 1], this.b = e[t + 2], this 5564 }, 5565 toArray: function(e, t) { 5566 return void 0 === e && (e = []), void 0 === t && (t = 0), e[t] = this.r, e[t + 1] = this.g, e[t + 2] = this.b, e 5567 }, 5568 toJSON: function() { 5569 return this.getHex() 5570 } 5571 }); 5572 var Mi, Si, Ci = { 5573 common: { 5574 diffuse: { 5575 value: new Ei(15658734) 5576 }, 5577 opacity: { 5578 value: 1 5579 }, 5580 map: { 5581 value: null 5582 }, 5583 offsetRepeat: { 5584 value: new Lt(0, 0, 1, 1) 5585 }, 5586 alphaMap: { 5587 value: null 5588 } 5589 }, 5590 specularmap: { 5591 specularMap: { 5592 value: null 5593 } 5594 }, 5595 envmap: { 5596 envMap: { 5597 value: null 5598 }, 5599 flipEnvMap: { 5600 value: -1 5601 }, 5602 reflectivity: { 5603 value: 1 5604 }, 5605 refractionRatio: { 5606 value: .98 5607 } 5608 }, 5609 aomap: { 5610 aoMap: { 5611 value: null 5612 }, 5613 aoMapIntensity: { 5614 value: 1 5615 } 5616 }, 5617 lightmap: { 5618 lightMap: { 5619 value: null 5620 }, 5621 lightMapIntensity: { 5622 value: 1 5623 } 5624 }, 5625 emissivemap: { 5626 emissiveMap: { 5627 value: null 5628 } 5629 }, 5630 bumpmap: { 5631 bumpMap: { 5632 value: null 5633 }, 5634 bumpScale: { 5635 value: 1 5636 } 5637 }, 5638 normalmap: { 5639 normalMap: { 5640 value: null 5641 }, 5642 normalScale: { 5643 value: new lt(1, 1) 5644 } 5645 }, 5646 displacementmap: { 5647 displacementMap: { 5648 value: null 5649 }, 5650 displacementScale: { 5651 value: 1 5652 }, 5653 displacementBias: { 5654 value: 0 5655 } 5656 }, 5657 roughnessmap: { 5658 roughnessMap: { 5659 value: null 5660 } 5661 }, 5662 metalnessmap: { 5663 metalnessMap: { 5664 value: null 5665 } 5666 }, 5667 gradientmap: { 5668 gradientMap: { 5669 value: null 5670 } 5671 }, 5672 fog: { 5673 fogDensity: { 5674 value: 25e-5 5675 }, 5676 fogNear: { 5677 value: 1 5678 }, 5679 fogFar: { 5680 value: 2e3 5681 }, 5682 fogColor: { 5683 value: new Ei(16777215) 5684 } 5685 }, 5686 lights: { 5687 ambientLightColor: { 5688 value: [] 5689 }, 5690 directionalLights: { 5691 value: [], 5692 properties: { 5693 direction: {}, 5694 color: {}, 5695 shadow: {}, 5696 shadowBias: {}, 5697 shadowRadius: {}, 5698 shadowMapSize: {} 5699 } 5700 }, 5701 directionalShadowMap: { 5702 value: [] 5703 }, 5704 directionalShadowMatrix: { 5705 value: [] 5706 }, 5707 spotLights: { 5708 value: [], 5709 properties: { 5710 color: {}, 5711 position: {}, 5712 direction: {}, 5713 distance: {}, 5714 coneCos: {}, 5715 penumbraCos: {}, 5716 decay: {}, 5717 shadow: {}, 5718 shadowBias: {}, 5719 shadowRadius: {}, 5720 shadowMapSize: {} 5721 } 5722 }, 5723 spotShadowMap: { 5724 value: [] 5725 }, 5726 spotShadowMatrix: { 5727 value: [] 5728 }, 5729 pointLights: { 5730 value: [], 5731 properties: { 5732 color: {}, 5733 position: {}, 5734 decay: {}, 5735 distance: {}, 5736 shadow: {}, 5737 shadowBias: {}, 5738 shadowRadius: {}, 5739 shadowMapSize: {}, 5740 shadowCameraNear: {}, 5741 shadowCameraFar: {} 5742 } 5743 }, 5744 pointShadowMap: { 5745 value: [] 5746 }, 5747 pointShadowMatrix: { 5748 value: [] 5749 }, 5750 hemisphereLights: { 5751 value: [], 5752 properties: { 5753 direction: {}, 5754 skyColor: {}, 5755 groundColor: {} 5756 } 5757 }, 5758 rectAreaLights: { 5759 value: [], 5760 properties: { 5761 color: {}, 5762 position: {}, 5763 width: {}, 5764 height: {} 5765 } 5766 } 5767 }, 5768 points: { 5769 diffuse: { 5770 value: new Ei(15658734) 5771 }, 5772 opacity: { 5773 value: 1 5774 }, 5775 size: { 5776 value: 1 5777 }, 5778 scale: { 5779 value: 1 5780 }, 5781 map: { 5782 value: null 5783 }, 5784 offsetRepeat: { 5785 value: new Lt(0, 0, 1, 1) 5786 } 5787 } 5788 }, 5789 Ai = { 5790 merge: function(e) { 5791 for (var t = {}, i = 0; i < e.length; i++) { 5792 var n = this.clone(e[i]); 5793 for (var r in n) t[r] = n[r] 5794 } 5795 return t 5796 }, 5797 clone: function(e) { 5798 var t = {}; 5799 for (var i in e) 5800 for (var n in t[i] = {}, e[i]) { 5801 var r = e[i][n]; 5802 r && (r.isColor || r.isMatrix3 || r.isMatrix4 || r.isVector2 || r.isVector3 || r.isVector4 || r.isTexture) ? t[i][n] = r.clone() : Array.isArray(r) ? t[i][n] = r.slice() : t[i][n] = r 5803 } 5804 return t 5805 } 5806 }, 5807 Ri = { 5808 alphamap_fragment: "#ifdef USE_ALPHAMAP\n\tdiffuseColor.a *= texture2D( alphaMap, vUv ).g;\n#endif\n", 5809 alphamap_pars_fragment: "#ifdef USE_ALPHAMAP\n\tuniform sampler2D alphaMap;\n#endif\n", 5810 alphatest_fragment: "#ifdef ALPHATEST\n\tif ( diffuseColor.a < ALPHATEST ) discard;\n#endif\n", 5811 aomap_fragment: "#ifdef USE_AOMAP\n\tfloat ambientOcclusion = ( texture2D( aoMap, vUv2 ).r - 1.0 ) * aoMapIntensity + 1.0;\n\treflectedLight.indirectDiffuse *= ambientOcclusion;\n\t#if defined( USE_ENVMAP ) && defined( PHYSICAL )\n\t\tfloat dotNV = saturate( dot
5811( geometry.normal, geometry.viewDir ) );\n\t\treflectedLight.indirectSpecular *= computeSpecularOcclusion( dotNV, ambientOcclusion, material.specularRoughness );\n\t#endif\n#endif\n", 5812 aomap_pars_fragment: "#ifdef USE_AOMAP\n\tuniform sampler2D aoMap;\n\tuniform float aoMapIntensity;\n#endif", 5813 begin_vertex: "\nvec3 transformed = vec3( position );\n", 5814 beginnormal_vertex: "\nvec3 objectNormal = vec3( normal );\n", 5815 bsdfs: "float punctualLightIntensityToIrradianceFactor( const in float lightDistance, const in float cutoffDistance, const in float decayExponent ) {\n\tif( decayExponent > 0.0 ) {\n#if defined ( PHYSICALLY_CORRECT_LIGHTS )\n\t\tfloat distanceFalloff = 1.0 / max( pow( lightDistance, decayExponent ), 0.01 );\n\t\tfloat maxDistanceCutoffFactor = pow2( saturate( 1.0 - pow4( lightDistance / cutoffDistance ) ) );\n\t\treturn distanceFalloff * maxDistanceCutoffFactor;\n#else\n\t\treturn pow( saturate( -lightDistance / cutoffDistance + 1.0 ), decayExponent );\n#endif\n\t}\n\treturn 1.0;\n}\nvec3 BRDF_Diffuse_Lambert( const in vec3 diffuseColor ) {\n\treturn RECIPROCAL_PI * diffuseColor;\n}\nvec3 F_Schlick( const in vec3 specularColor, const in float dotLH ) {\n\tfloat fresnel = exp2( ( -5.55473 * dotLH - 6.98316 ) * dotLH );\n\treturn ( 1.0 - specularColor ) * fresnel + specularColor;\n}\nfloat G_GGX_Smith( const in float alpha, const in float dotNL, const in float dotNV ) {\n\tfloat a2 = pow2( alpha );\n\tfloat gl = dotNL + sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) );\n\tfloat gv = dotNV + sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) );\n\treturn 1.0 / ( gl * gv );\n}\nfloat G_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}\nvec3 BRDF_Specular_GGX( const in IncidentLight incidentLight, const in GeometricContext geometry, const in vec3 specularColor, const in float roughness ) {\n\tfloat alpha = pow2( roughness );\n\tvec3 halfDir = normalize( incidentLight.direction + geometry.viewDir );\n\tfloat dotNL = saturate( dot( geometry.normal, incidentLight.direction ) );\n\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\n\tfloat dotNH = saturate( dot( geometry.normal, halfDir ) );\n\tfloat dotLH = saturate( dot( incidentLight.direction, halfDir ) );\n\tvec3 F = F_Schlick( specularColor, dotLH );
5815\n\tfloat G = G_GGX_SmithCorrelated( alpha, dotNL, dotNV );\n\tfloat D = D_GGX( alpha, dotNH );\n\treturn F * ( G * 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 theta = acos( dot( N, V ) );\n\tvec2 uv = vec2(\n\t\tsqrt( saturate( roughness ) ),\n\t\tsaturate( theta / ( 0.5 * PI ) ) );\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.86267 + (0.49788 + 0.01436 * y ) * y;\n\tfloat b = 3.45068 + (4.18814 + y) * y;\n\tfloat v = a / b;\n\tfloat theta_sintheta = (x > 0.0) ? v : 0.5 * inversesqrt( 1.0 - x * x ) - 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 * transpose( 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\tvec3 result = vec3( LTC_ClippedSphereFormFactor( vectorFormFactor ) );\n\treturn result;\n}\nvec3 BRDF_Specular_GGX_Environment( const in GeometricContext geometry, const in vec3 specularColor, const in float roughness ) {\n\tfloat dotNV = saturate( dot( geometry.normal, geometry.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 AB = vec2( -1.04, 1.04 ) * a004 + r.zw;\n\treturn specularColor * AB.x + AB.y;\n}\nfloat 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_Specular_BlinnPhong( const in IncidentLight incidentLight, const in GeometricContext geometry, const in vec3 specularColor, const in float shininess ) {\n\tvec3 halfDir = normalize( incidentLight.direction + geometry.viewDir );\n\tfloat dotNH = saturate( dot( geometry.normal, halfDir ) );\n\tfloat dotLH = saturate( dot( incidentLight.direction, halfDir ) );\n\tvec3 F = F_Schlick( specularColor, dotLH );\n\tfloat G = G_BlinnPhong_Implicit( );\n\tfloat D = D_BlinnPhong( shininess, dotNH );\n\treturn F * ( G * D );\n}\nfloat GGXRoughnessToBlinnExponent( const in float ggxRoughness ) {\n\treturn ( 2.0 / pow2( ggxRoughness + 0.0001 ) - 2.0 );\n}\nfloat BlinnExponentToGGXRoughness( const in float blinnExponent ) {\n\treturn sqrt( 2.0 / ( blinnExponent + 2.0 ) );\n}\n", 5816 bumpmap_pars_fragment: "#ifdef USE_BUMPMAP\n\tuniform sampler2D bumpMap;\n\tuniform float bumpScale;\n\tvec2 dHdxy_fwd() {\n\t\tvec2 dSTdx = dFdx( vUv );\n\t\tvec2 dSTdy = dFdy( vUv );\n\t\tfloat Hll = bumpScale * texture2D( bumpMap, vUv ).x;\n\t\tfloat dBx = bumpScale * texture2D( bumpMap, vUv + dSTdx ).x - Hll;\n\t\tfloat dBy = bumpScale * texture2D( bumpMap, vUv + dSTdy ).x - Hll;\n\t\treturn vec2( dBx, dBy );\n\t}
5816\n\tvec3 perturbNormalArb( vec3 surf_pos, vec3 surf_norm, vec2 dHdxy ) {\n\t\tvec3 vSigmaX = vec3( dFdx( surf_pos.x ), dFdx( surf_pos.y ), dFdx( surf_pos.z ) );\n\t\tvec3 vSigmaY = vec3( dFdy( surf_pos.x ), dFdy( surf_pos.y ), dFdy( surf_pos.z ) );\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 );\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\n", 5817 clipping_planes_fragment: "#if NUM_CLIPPING_PLANES > 0\n\tfor ( int i = 0; i < UNION_CLIPPING_PLANES; ++ i ) {\n\t\tvec4 plane = clippingPlanes[ i ];\n\t\tif ( dot( vViewPosition, plane.xyz ) > plane.w ) discard;\n\t}\n\t\t\n\t#if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES\n\t\tbool clipped = true;\n\t\tfor ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; ++ i ) {\n\t\t\tvec4 plane = clippingPlanes[ i ];\n\t\t\tclipped = ( dot( vViewPosition, plane.xyz ) > plane.w ) && clipped;\n\t\t}\n\t\tif ( clipped ) discard;\n\t\n\t#endif\n#endif\n", 5818 clipping_planes_pars_fragment: "#if NUM_CLIPPING_PLANES > 0\n\t#if ! defined( PHYSICAL ) && ! defined( PHONG )\n\t\tvarying vec3 vViewPosition;\n\t#endif\n\tuniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ];\n#endif\n", 5819 clipping_planes_pars_vertex: "#if NUM_CLIPPING_PLANES > 0 && ! defined( PHYSICAL ) && ! defined( PHONG )\n\tvarying vec3 vViewPosition;\n#endif\n", 5820 clipping_planes_vertex: "#if NUM_CLIPPING_PLANES > 0 && ! defined( PHYSICAL ) && ! defined( PHONG )\n\tvViewPosition = - mvPosition.xyz;\n#endif\n", 5821 color_fragment: "#ifdef USE_COLOR\n\tdiffuseColor.rgb *= vColor;\n#endif", 5822 color_pars_fragment: "#ifdef USE_COLOR\n\tvarying vec3 vColor;\n#endif\n", 5823 color_pars_vertex: "#ifdef USE_COLOR\n\tvarying vec3 vColor;\n#endif", 5824 color_vertex: "#ifdef USE_COLOR\n\tvColor.xyz = color.xyz;\n#endif", 5825 common: "#define PI 3.14159265359\n#define PI2 6.28318530718\n#define PI_HALF 1.5707963267949\n#define RECIPROCAL_PI 0.31830988618\n#define RECIPROCAL_PI2 0.15915494\n#define LOG2 1.442695\n#define EPSILON 1e-6\n#define saturate(a) clamp( a, 0.0, 1.0 )\n#define whiteCompliment(a) ( 1.0 - saturate( a ) )\nfloat pow2( const in float 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 average( const in vec3 color ) { return dot( color, vec3( 0.3333 ) ); }\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}\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};\nstruct GeometricContext {\n\tvec3 position;\n\tvec3 normal;\n\tvec3 viewDir;\n};\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}\nvec3 projectOnPlane(in vec3 point, in vec3 pointOnPlane, in vec3 planeNormal ) {\n\tfloat distance = dot( planeNormal, point - pointOnPlane );\n\treturn - distance * planeNormal + point;\n}\nfloat sideOfPlane( in vec3 point, in vec3 pointOnPlane, in vec3 planeNormal ) {\n\treturn sign( dot( point - pointOnPlane, planeNormal ) );\n}\nvec3 linePlaneIntersect( in vec3 pointOnLine, in vec3 lineDirection, in vec3 pointOnPlane, in vec3 planeNormal ) {\n\treturn lineDirection * ( dot( planeNormal, pointOnPlane - pointOnLine ) / dot( planeNormal, lineDirection ) ) + pointOnLine;\n}\nmat3 transpose( const in mat3 v ) {\n\tmat3 tmp;\n\ttmp[0] = vec3(v[0].x, v[1].x, v[2].x);\n\ttmp[1] = vec3(v[0].y, v[1].y, v[2].y);\n\ttmp[2] = vec3(v[0].z, v[1].z, v[2].z);\n\treturn tmp;\n}\n", 5826 cube_uv_reflection_fragment: "#ifdef ENVMAP_TYPE_CUBE_UV\n#define cubeUV_textureSize (1024.0)\nint getFaceFromDirection(vec3 direction) {\n\tvec3 absDirection = abs(direction);\n\tint face = -1;\n\tif( absDirection.x > absDirection.z ) {\n\t\tif(absDirection.x > absDirection.y )\n\t\t\tface = direction.x > 0.0 ? 0 : 3;\n\t\telse\n\t\t\tface = direction.y > 0.0 ? 1 : 4;\n\t}\n\telse {\n\t\tif(absDirection.z > absDirection.y )\n\t\t\tface = direction.z > 0.0 ? 2 : 5;\n\t\telse\n\t\t\tface = direction.y > 0.0 ? 1 : 4;\n\t}\n\treturn face;\n}\n#define cubeUV_maxLods1 (log2(cubeUV_textureSize*0.25) - 1.0)\n#define cubeUV_rangeClamp (exp2((6.0 - 1.0) * 2.0))\nvec2 MipLevelInfo( vec3 vec, float roughnessLevel, float roughness ) {\n\tfloat scale = exp2(cubeUV_maxLods1 - roughnessLevel);\n\tfloat dxRoughness = dFdx(roughness);\n\tfloat dyRoughness = dFdy(roughness);\n\tvec3 dx = dFdx( vec * scale * dxRoughness );\n\tvec3 dy = dFdy( vec * scale * dyRoughness );\n\tfloat d = max( dot( dx, dx ), dot( dy, dy ) );\n\td = clamp(d, 1.0, cubeUV_rangeClamp);
5826\n\tfloat mipLevel = 0.5 * log2(d);\n\treturn vec2(floor(mipLevel), fract(mipLevel));\n}\n#define cubeUV_maxLods2 (log2(cubeUV_textureSize*0.25) - 2.0)\n#define cubeUV_rcpTextureSize (1.0 / cubeUV_textureSize)\nvec2 getCubeUV(vec3 direction, float roughnessLevel, float mipLevel) {\n\tmipLevel = roughnessLevel > cubeUV_maxLods2 - 3.0 ? 0.0 : mipLevel;\n\tfloat a = 16.0 * cubeUV_rcpTextureSize;\n\tvec2 exp2_packed = exp2( vec2( roughnessLevel, mipLevel ) );\n\tvec2 rcp_exp2_packed = vec2( 1.0 ) / exp2_packed;\n\tfloat powScale = exp2_packed.x * exp2_packed.y;\n\tfloat scale = rcp_exp2_packed.x * rcp_exp2_packed.y * 0.25;\n\tfloat mipOffset = 0.75*(1.0 - rcp_exp2_packed.y) * rcp_exp2_packed.x;\n\tbool bRes = mipLevel == 0.0;\n\tscale = bRes && (scale < a) ? a : scale;\n\tvec3 r;\n\tvec2 offset;\n\tint face = getFaceFromDirection(direction);\n\tfloat rcpPowScale = 1.0 / powScale;\n\tif( face == 0) {\n\t\tr = vec3(direction.x, -direction.z, direction.y);\n\t\toffset = vec2(0.0+mipOffset,0.75 * rcpPowScale);\n\t\toffset.y = bRes && (offset.y < 2.0*a) ? a : offset.y;\n\t}\n\telse if( face == 1) {\n\t\tr = vec3(direction.y, direction.x, direction.z);\n\t\toffset = vec2(scale+mipOffset, 0.75 * rcpPowScale);\n\t\toffset.y = bRes && (offset.y < 2.0*a) ? a : offset.y;\n\t}\n\telse if( face == 2) {\n\t\tr = vec3(direction.z, direction.x, direction.y);\n\t\toffset = vec2(2.0*scale+mipOffset, 0.75 * rcpPowScale);\n\t\toffset.y = bRes && (offset.y < 2.0*a) ? a : offset.y;\n\t}\n\telse if( face == 3) {\n\t\tr = vec3(direction.x, direction.z, direction.y);\n\t\toffset = vec2(0.0+mipOffset,0.5 * rcpPowScale);\n\t\toffset.y = bRes && (offset.y < 2.0*a) ? 0.0 : offset.y;\n\t}\n\telse if( face == 4) {\n\t\tr = vec3(direction.y, direction.x, -direction.z);\n\t\toffset = vec2(scale+mipOffset, 0.5 * rcpPowScale);\n\t\toffset.y = bRes && (offset.y < 2.0*a) ? 0.0 : offset.y;\n\t}\n\telse {\n\t\tr = vec3(direction.z, -direction.x, direction.y);\n\t\toffset = vec2(2.0*scale+mipOffset, 0.5 * rcpPowScale);\n\t\toffset.y = bRes && (offset.y < 2.0*a) ? 0.0 : offset.y;\n\t}\n\tr = normalize(r);\n\tfloat texelOffset = 0.5 * cubeUV_rcpTextureSize;\n\tvec2 s = ( r.yz / abs( r.x ) + vec2( 1.0 ) ) * 0.5;\n\tvec2 base = offset + vec2( texelOffset );\n\treturn base + s * ( scale - 2.0 * texelOffset );\n}\n#define cubeUV_maxLods3 (log2(cubeUV_textureSize*0.25) - 3.0)\nvec4 textureCubeUV(vec3 reflectedDirection, float roughness ) {\n\tfloat roughnessVal = roughness* cubeUV_maxLods3;\n\tfloat r1 = floor(roughnessVal);\n\tfloat r2 = r1 + 1.0;\n\tfloat t = fract(roughnessVal);\n\tvec2 mipInfo = MipLevelInfo(reflectedDirection, r1, roughness);\n\tfloat s = mipInfo.y;\n\tfloat level0 = mipInfo.x;\n\tfloat level1 = level0 + 1.0;\n\tlevel1 = level1 > 5.0 ? 5.0 : level1;\n\tlevel0 += min( floor( s + 0.5 ), 5.0 );\n\tvec2 uv_10 = getCubeUV(reflectedDirection, r1, level0);\n\tvec4 color10 = envMapTexelToLinear(texture2D(envMap, uv_10));\n\tvec2 uv_20 = getCubeUV(reflectedDirection, r2, level0);\n\tvec4 color20 = envMapTexelToLinear(texture2D(envMap, uv_20));\n\tvec4 result = mix(color10, color20, t);\n\treturn vec4(result.rgb, 1.0);\n}\n#endif\n", 5827 defaultnormal_vertex: "vec3 transformedNormal = normalMatrix * objectNormal;\n#ifdef FLIP_SIDED\n\ttransformedNormal = - transformedNormal;\n#endif\n", 5828 displacementmap_pars_vertex: "#ifdef USE_DISPLACEMENTMAP\n\tuniform sampler2D displacementMap;\n\tuniform float displacementScale;\n\tuniform float displacementBias;\n#endif\n", 5829 displacementmap_vertex: "#ifdef USE_DISPLACEMENTMAP\n\ttransformed += normalize( objectNormal ) * ( texture2D( displacementMap, uv ).x * displacementScale + displacementBias );\n#endif\n", 5830 emissivemap_fragment: "#ifdef USE_EMISSIVEMAP\n\tvec4 emissiveColor = texture2D( emissiveMap, vUv );\n\temissiveColor.rgb = emissiveMapTexelToLinear( emissiveColor ).rgb;\n\ttotalEmissiveRadiance *= emissiveColor.rgb;\n#endif\n", 5831 emissivemap_pars_fragment: "#ifdef USE_EMISSIVEMAP\n\tuniform sampler2D emissiveMap;\n#endif\n", 5832 encodings_fragment: " gl_FragColor = linearToOutputTexel( gl_FragColor );\n", 5833 encodings_pars_fragment: "\nvec4 LinearToLinear( in vec4 value ) {\n\treturn value;\n}\nvec4 GammaToLinear( in vec4 value, in float gammaFactor ) {\n\treturn vec4( pow( value.xyz, vec3( gammaFactor ) ), value.w );\n}\nvec4 LinearToGamma( in vec4 value, in float gammaFactor ) {\n\treturn vec4( pow( value.xyz, vec3( 1.0 / gammaFactor ) ), value.w );\n}\nvec4 sRGBToLinear( in vec4 value ) {\n\treturn vec4( mix( pow( value.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), value.rgb * 0.0773993808, vec3( lessThanEqual( value.rgb, vec3( 0.04045 ) ) ) ), value.w );\n}\nvec4 LinearTosRGB( 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.w );\n}\nvec4 RGBEToLinear( in vec4 value ) {\n\treturn vec4( value.rgb * exp2( value.a * 255.0 - 128.0 ), 1.0 );\n}
5833\nvec4 LinearToRGBE( in vec4 value ) {\n\tfloat maxComponent = max( max( value.r, value.g ), value.b );\n\tfloat fExp = clamp( ceil( log2( maxComponent ) ), -128.0, 127.0 );\n\treturn vec4( value.rgb / exp2( fExp ), ( fExp + 128.0 ) / 255.0 );\n}\nvec4 RGBMToLinear( in vec4 value, in float maxRange ) {\n\treturn vec4( value.xyz * value.w * maxRange, 1.0 );\n}\nvec4 LinearToRGBM( in vec4 value, in float maxRange ) {\n\tfloat maxRGB = max( value.x, max( value.g, value.b ) );\n\tfloat M = clamp( maxRGB / maxRange, 0.0, 1.0 );\n\tM = ceil( M * 255.0 ) / 255.0;\n\treturn vec4( value.rgb / ( M * maxRange ), M );\n}\nvec4 RGBDToLinear( in vec4 value, in float maxRange ) {\n\treturn vec4( value.rgb * ( ( maxRange / 255.0 ) / value.a ), 1.0 );\n}\nvec4 LinearToRGBD( in vec4 value, in float maxRange ) {\n\tfloat maxRGB = max( value.x, max( value.g, value.b ) );\n\tfloat D = max( maxRange / maxRGB, 1.0 );\n\tD = min( floor( D ) / 255.0, 1.0 );\n\treturn vec4( value.rgb * ( D * ( 255.0 / maxRange ) ), D );\n}\nconst mat3 cLogLuvM = mat3( 0.2209, 0.3390, 0.4184, 0.1138, 0.6780, 0.7319, 0.0102, 0.1130, 0.2969 );\nvec4 LinearToLogLuv( in vec4 value ) {\n\tvec3 Xp_Y_XYZp = value.rgb * cLogLuvM;\n\tXp_Y_XYZp = max(Xp_Y_XYZp, vec3(1e-6, 1e-6, 1e-6));\n\tvec4 vResult;\n\tvResult.xy = Xp_Y_XYZp.xy / Xp_Y_XYZp.z;\n\tfloat Le = 2.0 * log2(Xp_Y_XYZp.y) + 127.0;\n\tvResult.w = fract(Le);\n\tvResult.z = (Le - (floor(vResult.w*255.0))/255.0)/255.0;\n\treturn vResult;\n}\nconst mat3 cLogLuvInverseM = mat3( 6.0014, -2.7008, -1.7996, -1.3320, 3.1029, -5.7721, 0.3008, -1.0882, 5.6268 );\nvec4 LogLuvToLinear( in vec4 value ) {\n\tfloat Le = value.z * 255.0 + value.w;\n\tvec3 Xp_Y_XYZp;\n\tXp_Y_XYZp.y = exp2((Le - 127.0) / 2.0);\n\tXp_Y_XYZp.z = Xp_Y_XYZp.y / value.y;\n\tXp_Y_XYZp.x = value.x * Xp_Y_XYZp.z;\n\tvec3 vRGB = Xp_Y_XYZp.rgb * cLogLuvInverseM;\n\treturn vec4( max(vRGB, 0.0), 1.0 );\n}\n", 5834 envmap_fragment: "#ifdef USE_ENVMAP\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG )\n\t\tvec3 cameraToVertex = normalize( vWorldPosition - cameraPosition );\n\t\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t\tvec3 reflectVec = reflect( cameraToVertex, worldNormal );\n\t\t#else\n\t\t\tvec3 reflectVec = refract( cameraToVertex, 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#elif defined( ENVMAP_TYPE_EQUIREC )\n\t\tvec2 sampleUV;\n\t\treflectVec = normalize( reflectVec );\n\t\tsampleUV.y = asin( clamp( reflectVec.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\n\t\tsampleUV.x = atan( reflectVec.z, reflectVec.x ) * RECIPROCAL_PI2 + 0.5;\n\t\tvec4 envColor = texture2D( envMap, sampleUV );\n\t#elif defined( ENVMAP_TYPE_SPHERE )\n\t\treflectVec = normalize( reflectVec );\n\t\tvec3 reflectView = normalize( ( viewMatrix * vec4( reflectVec, 0.0 ) ).xyz + vec3( 0.0, 0.0, 1.0 ) );\n\t\tvec4 envColor = texture2D( envMap, reflectView.xy * 0.5 + 0.5 );\n\t#else\n\t\tvec4 envColor = vec4( 0.0 );\n\t#endif\n\tenvColor = envMapTexelToLinear( envColor );\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\n", 5835 envmap_pars_fragment: "#if defined( USE_ENVMAP ) || defined( PHYSICAL )\n\tuniform float reflectivity;\n\tuniform float envMapIntensity;\n#endif\n#ifdef USE_ENVMAP\n\t#if ! defined( PHYSICAL ) && ( defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) )\n\t\tvarying vec3 vWorldPosition;\n\t#endif\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tuniform samplerCube envMap;\n\t#else\n\t\tuniform sampler2D envMap;\n\t#endif\n\tuniform float flipEnvMap;\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( PHYSICAL )\n\t\tuniform float refractionRatio;\n\t#else\n\t\tvarying vec3 vReflect;\n\t#endif\n#endif\n", 5836 envmap_pars_vertex: "#ifdef USE_ENVMAP\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG )\n\t\tvarying vec3 vWorldPosition;\n\t#else\n\t\tvarying vec3 vReflect;\n\t\tuniform float refractionRatio;\n\t#endif\n#endif\n", 5837 envmap_vertex: "#ifdef USE_ENVMAP\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG )\n\t\tvWorldPosition = worldPosition.xyz;
5837\n\t#else\n\t\tvec3 cameraToVertex = normalize( worldPosition.xyz - cameraPosition );\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\n", 5838 fog_vertex: "\n#ifdef USE_FOG\nfogDepth = -mvPosition.z;\n#endif", 5839 fog_pars_vertex: "#ifdef USE_FOG\n varying float fogDepth;\n#endif\n", 5840 fog_fragment: "#ifdef USE_FOG\n\t#ifdef FOG_EXP2\n\t\tfloat fogFactor = whiteCompliment( exp2( - fogDensity * fogDensity * fogDepth * fogDepth * LOG2 ) );\n\t#else\n\t\tfloat fogFactor = smoothstep( fogNear, fogFar, fogDepth );\n\t#endif\n\tgl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor );\n#endif\n", 5841 fog_pars_fragment: "#ifdef USE_FOG\n\tuniform vec3 fogColor;\n\tvarying float fogDepth;\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\n", 5842 gradientmap_pars_fragment: "#ifdef TOON\n\tuniform sampler2D gradientMap;\n\tvec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) {\n\t\tfloat dotNL = dot( normal, lightDirection );\n\t\tvec2 coord = vec2( dotNL * 0.5 + 0.5, 0.0 );\n\t\t#ifdef USE_GRADIENTMAP\n\t\t\treturn texture2D( gradientMap, coord ).rgb;\n\t\t#else\n\t\t\treturn ( coord.x < 0.7 ) ? vec3( 0.7 ) : vec3( 1.0 );\n\t\t#endif\n\t}\n#endif\n", 5843 lightmap_fragment: "#ifdef USE_LIGHTMAP\n\treflectedLight.indirectDiffuse += PI * texture2D( lightMap, vUv2 ).xyz * lightMapIntensity;\n#endif\n", 5844 lightmap_pars_fragment: "#ifdef USE_LIGHTMAP\n\tuniform sampler2D lightMap;\n\tuniform float lightMapIntensity;\n#endif", 5845 lights_lambert_vertex: "vec3 diffuse = vec3( 1.0 );\nGeometricContext geometry;\ngeometry.position = mvPosition.xyz;\ngeometry.normal = normalize( transformedNormal );\ngeometry.viewDir = normalize( -mvPosition.xyz );\nGeometricContext backGeometry;\nbackGeometry.position = geometry.position;\nbackGeometry.normal = -geometry.normal;\nbackGeometry.viewDir = geometry.viewDir;\nvLightFront = vec3( 0.0 );\n#ifdef DOUBLE_SIDED\n\tvLightBack = vec3( 0.0 );\n#endif\nIncidentLight directLight;\nfloat dotNL;\nvec3 directLightColor_Diffuse;\n#if NUM_POINT_LIGHTS > 0\n\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\n\t\tgetPointDirectLightIrradiance( pointLights[ i ], geometry, directLight );\n\t\tdotNL = dot( geometry.normal, directLight.direction );\n\t\tdirectLightColor_Diffuse = PI * directLight.color;\n\t\tvLightFront += saturate( dotNL ) * directLightColor_Diffuse;\n\t\t#ifdef DOUBLE_SIDED\n\t\t\tvLightBack += saturate( -dotNL ) * directLightColor_Diffuse;\n\t\t#endif\n\t}\n#endif\n#if NUM_SPOT_LIGHTS > 0\n\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\n\t\tgetSpotDirectLightIrradiance( spotLights[ i ], geometry, directLight );\n\t\tdotNL = dot( geometry.normal, directLight.direction );\n\t\tdirectLightColor_Diffuse = PI * directLight.color;\n\t\tvLightFront += saturate( dotNL ) * directLightColor_Diffuse;\n\t\t#ifdef DOUBLE_SIDED\n\t\t\tvLightBack += saturate( -dotNL ) * directLightColor_Diffuse;\n\t\t#endif\n\t}\n#endif\n#if NUM_DIR_LIGHTS > 0\n\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n\t\tgetDirectionalDirectLightIrradiance( directionalLights[ i ], geometry, directLight );\n\t\tdotNL = dot( geometry.normal, directLight.direction );\n\t\tdirectLightColor_Diffuse = PI * directLight.color;\n\t\tvLightFront += saturate( dotNL ) * directLightColor_Diffuse;\n\t\t#ifdef DOUBLE_SIDED\n\t\t\tvLightBack += saturate( -dotNL ) * directLightColor_Diffuse;\n\t\t#endif\n\t}\n#endif\n#if NUM_HEMI_LIGHTS > 0\n\tfor ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {\n\t\tvLightFront += getHemisphereLightIrradiance( hemisphereLights[ i ], geometry );\n\t\t#ifdef DOUBLE_SIDED\n\t\t\tvLightBack += getHemisphereLightIrradiance( hemisphereLights[ i ], backGeometry );\n\t\t#endif\n\t}\n#endif\n", 5846 lights_pars: "uniform vec3 ambientLightColor;\nvec3 getAmbientLightIrradiance( const in vec3 ambientLightColor ) {\n\tvec3 irradiance = ambientLightColor;\n\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\tirradiance *= PI;\n\t#endif\n\treturn irradiance;\n}\n#if NUM_DIR_LIGHTS > 0\n\tstruct DirectionalLight {\n\t\tvec3 direction;\n\t\tvec3 color;\n\t\tint shadow;\n\t\tfloat shadowBias;\n\t\tfloat shadowRadius;\n\t\tvec2 shadowMapSize;\n\t};\n\tuniform DirectionalLight directionalLights[ NUM_DIR_LIGHTS ];\n\tvoid getDirectionalDirectLightIrradiance( const in DirectionalLight directionalLight, const in GeometricContext geometry, out IncidentLight directLight ) {\n\t\tdirectLight.color = directionalLight.color;\n\t\tdirectLight.direction = directionalLight.direction;\n\t\tdirectLight.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\tint shadow;\n\t\tfloat shadowBias;\n\t\tfloat shadowRadius;\n\t\tvec2 shadowMapSize;\n\t\tfloat shadowCameraNear;\n\t\tfloat shadowCameraFar;\n\t};\n\tuniform PointLight pointLights[ NUM_POINT_LIGHTS ];\n\tvoid getPointDirectLightIrradiance( const in PointLight pointLight, const in GeometricContext geometry, out IncidentLight directLight ) {\n\t\tvec3 lVector = pointLight.position - geometry.position;\n\t\tdirectLight.direction = normalize( lVector );\n\t\tfloat lightDistance = length( lVector );\n\t\tdirectLight.color = pointLight.color;\n\t\tdirectLight.color *= punctualLightIntensityToIrradianceFactor( lightDistance, pointLight.distance, pointLight.decay );\n\t\tdirectLight.visible = ( directLight.color != vec3( 0.0 ) );\n\t}
5846\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\tint shadow;\n\t\tfloat shadowBias;\n\t\tfloat shadowRadius;\n\t\tvec2 shadowMapSize;\n\t};\n\tuniform SpotLight spotLights[ NUM_SPOT_LIGHTS ];\n\tvoid getSpotDirectLightIrradiance( const in SpotLight spotLight, const in GeometricContext geometry, out IncidentLight directLight ) {\n\t\tvec3 lVector = spotLight.position - geometry.position;\n\t\tdirectLight.direction = normalize( lVector );\n\t\tfloat lightDistance = length( lVector );\n\t\tfloat angleCos = dot( directLight.direction, spotLight.direction );\n\t\tif ( angleCos > spotLight.coneCos ) {\n\t\t\tfloat spotEffect = smoothstep( spotLight.coneCos, spotLight.penumbraCos, angleCos );\n\t\t\tdirectLight.color = spotLight.color;\n\t\t\tdirectLight.color *= spotEffect * punctualLightIntensityToIrradianceFactor( lightDistance, spotLight.distance, spotLight.decay );\n\t\t\tdirectLight.visible = true;\n\t\t} else {\n\t\t\tdirectLight.color = vec3( 0.0 );\n\t\t\tdirectLight.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 ltcMat;\tuniform sampler2D ltcMag;\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 GeometricContext geometry ) {\n\t\tfloat dotNL = dot( geometry.normal, hemiLight.direction );\n\t\tfloat hemiDiffuseWeight = 0.5 * dotNL + 0.5;\n\t\tvec3 irradiance = mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight );\n\t\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\t\tirradiance *= PI;\n\t\t#endif\n\t\treturn irradiance;\n\t}\n#endif\n#if defined( USE_ENVMAP ) && defined( PHYSICAL )\n\tvec3 getLightProbeIndirectIrradiance( const in GeometricContext geometry, const in int maxMIPLevel ) {\n\t\tvec3 worldNormal = inverseTransformDirection( geometry.normal, viewMatrix );\n\t\t#ifdef ENVMAP_TYPE_CUBE\n\t\t\tvec3 queryVec = vec3( flipEnvMap * worldNormal.x, worldNormal.yz );\n\t\t\t#ifdef TEXTURE_LOD_EXT\n\t\t\t\tvec4 envMapColor = textureCubeLodEXT( envMap, queryVec, float( maxMIPLevel ) );\n\t\t\t#else\n\t\t\t\tvec4 envMapColor = textureCube( envMap, queryVec, float( maxMIPLevel ) );\n\t\t\t#endif\n\t\t\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\n\t\t#elif defined( ENVMAP_TYPE_CUBE_UV )\n\t\t\tvec3 queryVec = vec3( flipEnvMap * worldNormal.x, worldNormal.yz );\n\t\t\tvec4 envMapColor = textureCubeUV( queryVec, 1.0 );\n\t\t#else\n\t\t\tvec4 envMapColor = vec4( 0.0 );\n\t\t#endif\n\t\treturn PI * envMapColor.rgb * envMapIntensity;\n\t}\n\tfloat getSpecularMIPLevel( const in float blinnShininessExponent, const in int maxMIPLevel ) {\n\t\tfloat maxMIPLevelScalar = float( maxMIPLevel );\n\t\tfloat desiredMIPLevel = maxMIPLevelScalar - 0.79248 - 0.5 * log2( pow2( blinnShininessExponent ) + 1.0 );\n\t\treturn clamp( desiredMIPLevel, 0.0, maxMIPLevelScalar );\n\t}\n\tvec3 getLightProbeIndirectRadiance( const in GeometricContext geometry, const in float blinnShininessExponent, const in int maxMIPLevel ) {\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t\tvec3 reflectVec = reflect( -geometry.viewDir, geometry.normal );\n\t\t#else\n\t\t\tvec3 reflectVec = refract( -geometry.viewDir, geometry.normal, refractionRatio );\n\t\t#endif\n\t\treflectVec = inverseTransformDirection( reflectVec, viewMatrix );\n\t\tfloat specularMIPLevel = getSpecularMIPLevel( blinnShininessExponent, maxMIPLevel );\n\t\t#ifdef ENVMAP_TYPE_CUBE\n\t\t\tvec3 queryReflectVec = vec3( flipEnvMap * reflectVec.x, reflectVec.yz );\n\t\t\t#ifdef TEXTURE_LOD_EXT\n\t\t\t\tvec4 envMapColor = textureCubeLodEXT( envMap, queryReflectVec, specularMIPLevel );\n\t\t\t#else\n\t\t\t\tvec4 envMapColor = textureCube( envMap, queryReflectVec, specularMIPLevel );\n\t\t\t#endif\n\t\t\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\n\t\t#elif defined( ENVMAP_TYPE_CUBE_UV )\n\t\t\tvec3 queryReflectVec = vec3( flipEnvMap * reflectVec.x, reflectVec.yz );\n\t\t\tvec4 envMapColor = textureCubeUV(queryReflectVec, BlinnExponentToGGXRoughness(blinnShinine
5846ssExponent));\n\t\t#elif defined( ENVMAP_TYPE_EQUIREC )\n\t\t\tvec2 sampleUV;\n\t\t\tsampleUV.y = asin( clamp( reflectVec.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\n\t\t\tsampleUV.x = atan( reflectVec.z, reflectVec.x ) * RECIPROCAL_PI2 + 0.5;\n\t\t\t#ifdef TEXTURE_LOD_EXT\n\t\t\t\tvec4 envMapColor = texture2DLodEXT( envMap, sampleUV, specularMIPLevel );\n\t\t\t#else\n\t\t\t\tvec4 envMapColor = texture2D( envMap, sampleUV, specularMIPLevel );\n\t\t\t#endif\n\t\t\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\n\t\t#elif defined( ENVMAP_TYPE_SPHERE )\n\t\t\tvec3 reflectView = normalize( ( viewMatrix * vec4( reflectVec, 0.0 ) ).xyz + vec3( 0.0,0.0,1.0 ) );\n\t\t\t#ifdef TEXTURE_LOD_EXT\n\t\t\t\tvec4 envMapColor = texture2DLodEXT( envMap, reflectView.xy * 0.5 + 0.5, specularMIPLevel );\n\t\t\t#else\n\t\t\t\tvec4 envMapColor = texture2D( envMap, reflectView.xy * 0.5 + 0.5, specularMIPLevel );\n\t\t\t#endif\n\t\t\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\n\t\t#endif\n\t\treturn envMapColor.rgb * envMapIntensity;\n\t}\n#endif\n", 5847 lights_phong_fragment: "BlinnPhongMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;\nmaterial.specularColor = specular;\nmaterial.specularShininess = shininess;\nmaterial.specularStrength = specularStrength;\n", 5848 lights_phong_pars_fragment: "varying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\nstruct BlinnPhongMaterial {\n\tvec3\tdiffuseColor;\n\tvec3\tspecularColor;\n\tfloat\tspecularShininess;\n\tfloat\tspecularStrength;\n};\nvoid RE_Direct_BlinnPhong( const in IncidentLight directLight, const in GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\n\t#ifdef TOON\n\t\tvec3 irradiance = getGradientIrradiance( geometry.normal, directLight.direction ) * directLight.color;\n\t#else\n\t\tfloat dotNL = saturate( dot( geometry.normal, directLight.direction ) );\n\t\tvec3 irradiance = dotNL * directLight.color;\n\t#endif\n\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\tirradiance *= PI;\n\t#endif\n\treflectedLight.directDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n\treflectedLight.directSpecular += irradiance * BRDF_Specular_BlinnPhong( directLight, geometry, material.specularColor, material.specularShininess ) * material.specularStrength;\n}\nvoid RE_IndirectDiffuse_BlinnPhong( const in vec3 irradiance, const in GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n}\n#define RE_Direct\t\t\t\tRE_Direct_BlinnPhong\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_BlinnPhong\n#define Material_LightProbeLOD( material )\t(0)\n", 5849 lights_physical_fragment: "PhysicalMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb * ( 1.0 - metalnessFactor );\nmaterial.specularRoughness = clamp( roughnessFactor, 0.04, 1.0 );\n#ifdef STANDARD\n\tmaterial.specularColor = mix( vec3( DEFAULT_SPECULAR_COEFFICIENT ), diffuseColor.rgb, metalnessFactor );\n#else\n\tmaterial.specularColor = mix( vec3( MAXIMUM_SPECULAR_COEFFICIENT * pow2( reflectivity ) ), diffuseColor.rgb, metalnessFactor );\n\tmaterial.clearCoat = saturate( clearCoat );\tmaterial.clearCoatRoughness = clamp( clearCoatRoughness, 0.04, 1.0 );\n#endif\n", 5850 lights_physical_pars_fragment: "struct PhysicalMaterial {\n\tvec3\tdiffuseColor;\n\tfloat\tspecularRoughness;\n\tvec3\tspecularColor;\n\t#ifndef STANDARD\n\t\tfloat clearCoat;\n\t\tfloat clearCoatRoughness;\n\t#endif\n};\n#define MAXIMUM_SPECULAR_COEFFICIENT 0.16\n#define DEFAULT_SPECULAR_COEFFICIENT 0.04\nfloat clearCoatDHRApprox( const in float roughness, const in float dotNL ) {\n\treturn DEFAULT_SPECULAR_COEFFICIENT + ( 1.0 - DEFAULT_SPECULAR_COEFFICIENT ) * ( pow( 1.0 - dotNL, 5.0 ) * pow( 1.0 - roughness, 2.0 ) );\n}\n#if NUM_RECT_AREA_LIGHTS > 0\n\tvoid RE_Direct_RectArea_Physical( const in RectAreaLight rectAreaLight, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\t\tvec3 normal = geometry.normal;\n\t\tvec3 viewDir = geometry.viewDir;\n\t\tvec3 position = geometry.position;
5850\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.specularRoughness;\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\tfloat norm = texture2D( ltcMag, uv ).a;\n\t\tvec4 t = texture2D( ltcMat, uv );\n\t\tmat3 mInv = mat3(\n\t\t\tvec3( 1, 0, t.y ),\n\t\t\tvec3( 0, t.z, 0 ),\n\t\t\tvec3( t.w, 0, t.x )\n\t\t);\n\t\treflectedLight.directSpecular += lightColor * material.specularColor * norm * LTC_Evaluate( normal, viewDir, position, mInv, rectCoords );\n\t\treflectedLight.directDiffuse += lightColor * material.diffuseColor * LTC_Evaluate( normal, viewDir, position, mat3( 1 ), rectCoords );\n\t}\n#endif\nvoid RE_Direct_Physical( const in IncidentLight directLight, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\tfloat dotNL = saturate( dot( geometry.normal, directLight.direction ) );\n\tvec3 irradiance = dotNL * directLight.color;\n\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\tirradiance *= PI;\n\t#endif\n\t#ifndef STANDARD\n\t\tfloat clearCoatDHR = material.clearCoat * clearCoatDHRApprox( material.clearCoatRoughness, dotNL );\n\t#else\n\t\tfloat clearCoatDHR = 0.0;\n\t#endif\n\treflectedLight.directSpecular += ( 1.0 - clearCoatDHR ) * irradiance * BRDF_Specular_GGX( directLight, geometry, material.specularColor, material.specularRoughness );\n\treflectedLight.directDiffuse += ( 1.0 - clearCoatDHR ) * irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n\t#ifndef STANDARD\n\t\treflectedLight.directSpecular += irradiance * material.clearCoat * BRDF_Specular_GGX( directLight, geometry, vec3( DEFAULT_SPECULAR_COEFFICIENT ), material.clearCoatRoughness );\n\t#endif\n}\nvoid RE_IndirectDiffuse_Physical( const in vec3 irradiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectSpecular_Physical( const in vec3 radiance, const in vec3 clearCoatRadiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\t#ifndef STANDARD\n\t\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\n\t\tfloat dotNL = dotNV;\n\t\tfloat clearCoatDHR = material.clearCoat * clearCoatDHRApprox( material.clearCoatRoughness, dotNL );\n\t#else\n\t\tfloat clearCoatDHR = 0.0;\n\t#endif\n\treflectedLight.indirectSpecular += ( 1.0 - clearCoatDHR ) * radiance * BRDF_Specular_GGX_Environment( geometry, material.specularColor, material.specularRoughness );\n\t#ifndef STANDARD\n\t\treflectedLight.indirectSpecular += clearCoatRadiance * material.clearCoat * BRDF_Specular_GGX_Environment( geometry, vec3( DEFAULT_SPECULAR_COEFFICIENT ), material.clearCoatRoughness );\n\t#endif\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\n#define Material_BlinnShininessExponent( material ) GGXRoughnessToBlinnExponent( material.specularRoughness )\n#define Material_ClearCoat_BlinnShininessExponent( material ) GGXRoughnessToBlinnExponent( material.clearCoatRoughness )\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}\n", 5851 lights_template: "\nGeometricContext geometry;\ngeometry.position = - vViewPosition;\ngeometry.normal = normal;\ngeometry.viewDir = normalize( vViewPosition );\nIncidentLight directLight;\n#if ( NUM_POINT_LIGHTS > 0 ) && defined( RE_Direct )\n\tPointLight pointLight;\n\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\n\t\tpointLight = pointLights[ i ];\n\t\tgetPointDirectLightIrradiance( pointLight, geometry, directLight );\n\t\t#ifdef USE_SHADOWMAP\n\t\tdirectLight.color *= all( bvec2( pointLight.shadow, directLight.visible ) ) ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometry, material, reflectedLight );\n\t}
5851\n#endif\n#if ( NUM_SPOT_LIGHTS > 0 ) && defined( RE_Direct )\n\tSpotLight spotLight;\n\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\n\t\tspotLight = spotLights[ i ];\n\t\tgetSpotDirectLightIrradiance( spotLight, geometry, directLight );\n\t\t#ifdef USE_SHADOWMAP\n\t\tdirectLight.color *= all( bvec2( spotLight.shadow, directLight.visible ) ) ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowBias, spotLight.shadowRadius, vSpotShadowCoord[ i ] ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometry, material, reflectedLight );\n\t}\n#endif\n#if ( NUM_DIR_LIGHTS > 0 ) && defined( RE_Direct )\n\tDirectionalLight directionalLight;\n\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n\t\tdirectionalLight = directionalLights[ i ];\n\t\tgetDirectionalDirectLightIrradiance( directionalLight, geometry, directLight );\n\t\t#ifdef USE_SHADOWMAP\n\t\tdirectLight.color *= all( bvec2( directionalLight.shadow, directLight.visible ) ) ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometry, material, reflectedLight );\n\t}\n#endif\n#if ( NUM_RECT_AREA_LIGHTS > 0 ) && defined( RE_Direct_RectArea )\n\tRectAreaLight rectAreaLight;\n\tfor ( int i = 0; i < NUM_RECT_AREA_LIGHTS; i ++ ) {\n\t\trectAreaLight = rectAreaLights[ i ];\n\t\tRE_Direct_RectArea( rectAreaLight, geometry, material, reflectedLight );\n\t}\n#endif\n#if defined( RE_IndirectDiffuse )\n\tvec3 irradiance = getAmbientLightIrradiance( ambientLightColor );\n\t#ifdef USE_LIGHTMAP\n\t\tvec3 lightMapIrradiance = texture2D( lightMap, vUv2 ).xyz * lightMapIntensity;\n\t\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\t\tlightMapIrradiance *= PI;\n\t\t#endif\n\t\tirradiance += lightMapIrradiance;\n\t#endif\n\t#if ( NUM_HEMI_LIGHTS > 0 )\n\t\tfor ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {\n\t\t\tirradiance += getHemisphereLightIrradiance( hemisphereLights[ i ], geometry );\n\t\t}\n\t#endif\n\t#if defined( USE_ENVMAP ) && defined( PHYSICAL ) && defined( ENVMAP_TYPE_CUBE_UV )\n\t\tirradiance += getLightProbeIndirectIrradiance( geometry, 8 );\n\t#endif\n\tRE_IndirectDiffuse( irradiance, geometry, material, reflectedLight );\n#endif\n#if defined( USE_ENVMAP ) && defined( RE_IndirectSpecular )\n\tvec3 radiance = getLightProbeIndirectRadiance( geometry, Material_BlinnShininessExponent( material ), 8 );\n\t#ifndef STANDARD\n\t\tvec3 clearCoatRadiance = getLightProbeIndirectRadiance( geometry, Material_ClearCoat_BlinnShininessExponent( material ), 8 );\n\t#else\n\t\tvec3 clearCoatRadiance = vec3( 0.0 );\n\t#endif\n\tRE_IndirectSpecular( radiance, clearCoatRadiance, geometry, material, reflectedLight );\n#endif\n", 5852 logdepthbuf_fragment: "#if defined(USE_LOGDEPTHBUF) && defined(USE_LOGDEPTHBUF_EXT)\n\tgl_FragDepthEXT = log2(vFragDepth) * logDepthBufFC * 0.5;\n#endif", 5853 logdepthbuf_pars_fragment: "#ifdef USE_LOGDEPTHBUF\n\tuniform float logDepthBufFC;\n\t#ifdef USE_LOGDEPTHBUF_EXT\n\t\tvarying float vFragDepth;\n\t#endif\n#endif\n", 5854 logdepthbuf_pars_vertex: "#ifdef USE_LOGDEPTHBUF\n\t#ifdef USE_LOGDEPTHBUF_EXT\n\t\tvarying float vFragDepth;\n\t#endif\n\tuniform float logDepthBufFC;\n#endif", 5855 logdepthbuf_vertex: "#ifdef USE_LOGDEPTHBUF\n\tgl_Position.z = log2(max( EPSILON, gl_Position.w + 1.0 )) * logDepthBufFC;\n\t#ifdef USE_LOGDEPTHBUF_EXT\n\t\tvFragDepth = 1.0 + gl_Position.w;\n\t#else\n\t\tgl_Position.z = (gl_Position.z - 1.0) * gl_Position.w;\n\t#endif\n#endif\n", 5856 map_fragment: "#ifdef USE_MAP\n\tvec4 texelColor = texture2D( map, vUv );\n\ttexelColor = mapTexelToLinear( texelColor );\n\tdiffuseColor *= texelColor;\n#endif\n", 5857 map_pars_fragment: "#ifdef USE_MAP\n\tuniform sampler2D map;\n#endif\n", 5858 map_particle_fragment: "#ifdef USE_MAP\n\tvec4 mapTexel = texture2D( map, vec2( gl_PointCoord.x, 1.0 - gl_PointCoord.y ) * offsetRepeat.zw + offsetRepeat.xy );\n\tdiffuseColor *= mapTexelToLinear( mapTexel );\n#endif\n", 5859 map_particle_pars_fragment: "#ifdef USE_MAP\n\tuniform vec4 offsetRepeat;\n\tuniform sampler2D map;\n#endif\n", 5860 metalnessmap_fragment: "float metalnessFactor = metalness;\n#ifdef USE_METALNESSMAP\n\tvec4 texelMetalness = texture2D( metalnessMap, vUv );\n\tmetalnessFactor *= texelMetalness.b;\n#endif\n", 5861 metalnessmap_pars_fragment: "#ifdef USE_METALNESSMAP\n\tuniform sampler2D metalnessMap;\n#endif", 5862 morphnormal_vertex: "#ifdef USE_MORPHNORMALS\n\tobjectNormal += ( morphNormal0 - normal ) * morphTargetInfluences[ 0 ];\n\tobjectNormal += ( morphNormal1 - normal ) * morphTargetInfluences[ 1 ];\n\tobjectNormal += ( morphNormal2 - normal ) * morphTargetInfluences[ 2 ];\n\tobjectNormal += ( morphNormal3 - normal ) * morphTargetInfluences[ 3 ];\n#endif\n", 5863 morphtarget_pars_vertex: "#ifdef USE_MORPHTARGETS\n\t#ifndef USE_MORPHNORMALS\n\tuniform float morphTargetInfluences[ 8 ];\n\t#else\n\tuniform float morphTargetInfluences[ 4 ];\n\t#endif\n#endif", 5864 morphtarget_vertex: "#ifdef USE_MORPHTARGETS\n\ttransformed += ( morphTarget0 - position ) * morphTargetInfluences[ 0 ];\n\ttransformed += ( morphTarget1 - position ) * morphTargetInfluences[ 1 ];\n\ttransformed += ( morphTarget2 - position ) * morphTargetInfluences[ 2 ];\n\ttransformed += ( morphTarget3 - position ) * morphTargetInfluences[ 3 ];\n\t#ifndef USE_MORPHNORMALS\n\ttransformed += ( morphTarget4 - position ) * morphTargetInfluences[ 4 ];\n\ttransformed += ( morphTarget5 - position ) * morphTargetInfluences[ 5 ];\n\ttransformed += ( morphTarget6 - position ) * morphTargetInfluences[ 6 ];\n\ttransformed += ( morphTarget7 - position ) * morphTargetInfluences[ 7 ];\n\t#endif\n#endif\n", 5865 normal_fragment: "#ifdef FLAT_SHADED\n\tvec3 fdx = vec3( dFdx( vViewPosition.x ), dFdx( vViewPosition.y ), dFdx( vViewPosition.z ) );\n\tvec3 fdy = vec3( dFdy( vViewPosition.x ), dFdy( vViewPosition.y ), dFdy( vViewPosition.z ) );\n\tvec3 normal = normalize( cross( fdx, fdy ) );\n#else\n\tvec3 normal = normalize( vNormal );\n\t#ifdef DOUBLE_SIDED\n\t\tnormal = normal * ( float( gl_FrontFacing ) * 2.0 - 1.0 );
5865\n\t#endif\n#endif\n#ifdef USE_NORMALMAP\n\tnormal = perturbNormal2Arb( -vViewPosition, normal );\n#elif defined( USE_BUMPMAP )\n\tnormal = perturbNormalArb( -vViewPosition, normal, dHdxy_fwd() );\n#endif\n", 5866 normalmap_pars_fragment: "#ifdef USE_NORMALMAP\n\tuniform sampler2D normalMap;\n\tuniform vec2 normalScale;\n\tvec3 perturbNormal2Arb( vec3 eye_pos, vec3 surf_norm ) {\n\t\tvec3 q0 = vec3( dFdx( eye_pos.x ), dFdx( eye_pos.y ), dFdx( eye_pos.z ) );\n\t\tvec3 q1 = vec3( dFdy( eye_pos.x ), dFdy( eye_pos.y ), dFdy( eye_pos.z ) );\n\t\tvec2 st0 = dFdx( vUv.st );\n\t\tvec2 st1 = dFdy( vUv.st );\n\t\tvec3 S = normalize( q0 * st1.t - q1 * st0.t );\n\t\tvec3 T = normalize( -q0 * st1.s + q1 * st0.s );\n\t\tvec3 N = normalize( surf_norm );\n\t\tvec3 mapN = texture2D( normalMap, vUv ).xyz * 2.0 - 1.0;\n\t\tmapN.xy = normalScale * mapN.xy;\n\t\tmat3 tsn = mat3( S, T, N );\n\t\treturn normalize( tsn * mapN );\n\t}\n#endif\n", 5867 packing: "vec3 packNormalToRGB( const in vec3 normal ) {\n\treturn normalize( normal ) * 0.5 + 0.5;\n}\nvec3 unpackRGBToNormal( const in vec3 rgb ) {\n\treturn 1.0 - 2.0 * rgb.xyz;\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}\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 linearClipZ, const in float near, const in float far ) {\n\treturn linearClipZ * ( 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 invClipZ, const in float near, const in float far ) {\n\treturn ( near * far ) / ( ( far - near ) * invClipZ - far );\n}\n", 5868 premultiplied_alpha_fragment: "#ifdef PREMULTIPLIED_ALPHA\n\tgl_FragColor.rgb *= gl_FragColor.a;\n#endif\n", 5869 project_vertex: "vec4 mvPosition = modelViewMatrix * vec4( transformed, 1.0 );\ngl_Position = projectionMatrix * mvPosition;\n", 5870 dithering_fragment: "#if defined( DITHERING )\n gl_FragColor.rgb = dithering( gl_FragColor.rgb );\n#endif\n", 5871 dithering_pars_fragment: "#if defined( 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\n", 5872 roughnessmap_fragment: "float roughnessFactor = roughness;\n#ifdef USE_ROUGHNESSMAP\n\tvec4 texelRoughness = texture2D( roughnessMap, vUv );\n\troughnessFactor *= texelRoughness.g;\n#endif\n", 5873 roughnessmap_pars_fragment: "#ifdef USE_ROUGHNESSMAP\n\tuniform sampler2D roughnessMap;\n#endif", 5874 shadowmap_pars_fragment: "#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHTS > 0\n\t\tuniform sampler2D directionalShadowMap[ NUM_DIR_LIGHTS ];\n\t\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHTS ];\n\t#endif\n\t#if NUM_SPOT_LIGHTS > 0\n\t\tuniform sampler2D spotShadowMap[ NUM_SPOT_LIGHTS ];\n\t\tvarying vec4 vSpotShadowCoord[ NUM_SPOT_LIGHTS ];\n\t#endif\n\t#if NUM_POINT_LIGHTS > 0\n\t\tuniform sampler2D pointShadowMap[ NUM_POINT_LIGHTS ];\n\t\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHTS ];\n\t#endif\n\tfloat texture2DCompare( sampler2D depths, vec2 uv, float compare ) {\n\t\treturn step( compare, unpackRGBAToDepth( texture2D( depths, uv ) ) );\n\t}\n\tfloat texture2DShadowLerp( sampler2D depths, vec2 size, vec2 uv, float compare ) {\n\t\tconst vec2 offset = vec2( 0.0, 1.0 );\n\t\tvec2 texelSize = vec2( 1.0 ) / size;\n\t\tvec2 centroidUV = floor( uv * size + 0.5 ) / size;\n\t\tfloat lb = texture2DCompare( depths, centroidUV + texelSize * offset.xx, compare );\n\t\tfloat lt = texture2DCompare( depths, centroidUV + texelSize * offset.xy, compare );\n\t\tfloat rb = texture2DCompare( depths, centroidUV + texelSize * offset.yx, compare );\n\t\tfloat rt = texture2DCompare( depths, centroidUV + texelSize * offset.yy, compare );\n\t\tvec2 f = fract( uv * size + 0.5 );\n\t\tfloat a = mix( lb, lt, f.y );\n\t\tfloat b = mix( rb, rt, f.y );\n\t\tfloat c = mix( a, b, f.x );\n\t\treturn c;\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\tbvec4 inFrustumVec = bvec4 ( shadowCoord.x >= 0.0, shadowCoord.x <= 1.0, shadowCoord.y >= 0.0, shadowCoord.y <= 1.0 );\n\t\tbool inFrustum = all( inFrustumVec );\n\t\tbvec2 frustumTestVec = bvec2( inFrustum, shadowCoord.z <= 1.0 );\n\t\tbool frustumTest = all( frustumTestVec );\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\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( dx0, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy, 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( 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 / 9.0 );\n\t\t#elif defined( SHADOWMAP_TYPE_PCF_SOFT )\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\tshadow = (\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx0, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( 0.0, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx1, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx0, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy, shadowCoord.z ) +\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx1, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx0, dy1 ), shadowCoord.z ) +\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( 0.0, dy1 ), shadowCoord.z ) +\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx1, dy1 ), shadowCoord.z )\n\t\t\t) * ( 1.0 / 9.0 );\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 );
5874\t\tdp += shadowBias;\n\t\tvec3 bd3D = normalize( lightToPosition );\n\t\t#if defined( SHADOWMAP_TYPE_PCF ) || defined( SHADOWMAP_TYPE_PCF_SOFT )\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\n", 5875 shadowmap_pars_vertex: "#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHTS > 0\n\t\tuniform mat4 directionalShadowMatrix[ NUM_DIR_LIGHTS ];\n\t\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHTS ];\n\t#endif\n\t#if NUM_SPOT_LIGHTS > 0\n\t\tuniform mat4 spotShadowMatrix[ NUM_SPOT_LIGHTS ];\n\t\tvarying vec4 vSpotShadowCoord[ NUM_SPOT_LIGHTS ];\n\t#endif\n\t#if NUM_POINT_LIGHTS > 0\n\t\tuniform mat4 pointShadowMatrix[ NUM_POINT_LIGHTS ];\n\t\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHTS ];\n\t#endif\n#endif\n", 5876 shadowmap_vertex: "#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHTS > 0\n\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n\t\tvDirectionalShadowCoord[ i ] = directionalShadowMatrix[ i ] * worldPosition;\n\t}\n\t#endif\n\t#if NUM_SPOT_LIGHTS > 0\n\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\n\t\tvSpotShadowCoord[ i ] = spotShadowMatrix[ i ] * worldPosition;\n\t}\n\t#endif\n\t#if NUM_POINT_LIGHTS > 0\n\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\n\t\tvPointShadowCoord[ i ] = pointShadowMatrix[ i ] * worldPosition;\n\t}\n\t#endif\n#endif\n", 5877 shadowmask_pars_fragment: "float getShadowMask() {\n\tfloat shadow = 1.0;\n\t#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHTS > 0\n\tDirectionalLight directionalLight;\n\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n\t\tdirectionalLight = directionalLights[ i ];\n\t\tshadow *= bool( directionalLight.shadow ) ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n\t}\n\t#endif\n\t#if NUM_SPOT_LIGHTS > 0\n\tSpotLight spotLight;\n\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\n\t\tspotLight = spotLights[ i ];\n\t\tshadow *= bool( spotLight.shadow ) ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowBias, spotLight.shadowRadius, vSpotShadowCoord[ i ] ) : 1.0;\n\t}\n\t#endif\n\t#if NUM_POINT_LIGHTS > 0\n\tPointLight pointLight;\n\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\n\t\tpointLight = pointLights[ i ];\n\t\tshadow *= bool( pointLight.shadow ) ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0;\n\t}\n\t#endif\n\t#endif\n\treturn shadow;\n}\n", 5878 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", 5879 skinning_pars_vertex: "#ifdef USE_SKINNING\n\tuniform mat4 bindMatrix;\n\tuniform mat4 bindMatrixInverse;\n\t#ifdef BONE_TEXTURE\n\t\tuniform sampler2D boneTexture;\n\t\tuniform int boneTextureSize;\n\t\tmat4 getBoneMatrix( const in float i ) {\n\t\t\tfloat j = i * 4.0;\n\t\t\tfloat x = mod( j, float( boneTextureSize ) );\n\t\t\tfloat y = floor( j / float( boneTextureSize ) );\n\t\t\tfloat dx = 1.0 / float( boneTextureSize );\n\t\t\tfloat dy = 1.0 / float( boneTextureSize );\n\t\t\ty = dy * ( y + 0.5 );\n\t\t\tvec4 v1 = texture2D( boneTexture, vec2( dx * ( x + 0.5 ), y ) );\n\t\t\tvec4 v2 = texture2D( boneTexture, vec2( dx * ( x + 1.5 ), y ) );\n\t\t\tvec4 v3 = texture2D( boneTexture, vec2( dx * ( x + 2.5 ), y ) );\n\t\t\tvec4 v4 = texture2D( boneTexture, vec2( dx * ( x + 3.5 ), y ) );\n\t\t\tmat4 bone = mat4( v1, v2, v3, v4 );\n\t\t\treturn bone;\n\t\t}\n\t#else\n\t\tuniform mat4 boneMatrices[ MAX_BONES ];\n\t\tmat4 getBoneMatrix( const in float i ) {\n\t\t\tmat4 bone = boneMatrices[ int(i) ];\n\t\t\treturn bone;\n\t\t}\n\t#endif\n#endif\n", 5880 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\n", 5881 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;
5881\n\tskinMatrix = bindMatrixInverse * skinMatrix * bindMatrix;\n\tobjectNormal = vec4( skinMatrix * vec4( objectNormal, 0.0 ) ).xyz;\n#endif\n", 5882 specularmap_fragment: "float specularStrength;\n#ifdef USE_SPECULARMAP\n\tvec4 texelSpecular = texture2D( specularMap, vUv );\n\tspecularStrength = texelSpecular.r;\n#else\n\tspecularStrength = 1.0;\n#endif", 5883 specularmap_pars_fragment: "#ifdef USE_SPECULARMAP\n\tuniform sampler2D specularMap;\n#endif", 5884 tonemapping_fragment: "#if defined( TONE_MAPPING )\n gl_FragColor.rgb = toneMapping( gl_FragColor.rgb );\n#endif\n", 5885 tonemapping_pars_fragment: "#define saturate(a) clamp( a, 0.0, 1.0 )\nuniform float toneMappingExposure;\nuniform float toneMappingWhitePoint;\nvec3 LinearToneMapping( vec3 color ) {\n\treturn toneMappingExposure * color;\n}\nvec3 ReinhardToneMapping( vec3 color ) {\n\tcolor *= toneMappingExposure;\n\treturn saturate( color / ( vec3( 1.0 ) + color ) );\n}\n#define Uncharted2Helper( x ) max( ( ( x * ( 0.15 * x + 0.10 * 0.50 ) + 0.20 * 0.02 ) / ( x * ( 0.15 * x + 0.50 ) + 0.20 * 0.30 ) ) - 0.02 / 0.30, vec3( 0.0 ) )\nvec3 Uncharted2ToneMapping( vec3 color ) {\n\tcolor *= toneMappingExposure;\n\treturn saturate( Uncharted2Helper( color ) / Uncharted2Helper( vec3( toneMappingWhitePoint ) ) );\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}\n", 5886 uv_pars_fragment: "#if defined( USE_MAP ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( USE_SPECULARMAP ) || defined( USE_ALPHAMAP ) || defined( USE_EMISSIVEMAP ) || defined( USE_ROUGHNESSMAP ) || defined( USE_METALNESSMAP )\n\tvarying vec2 vUv;\n#endif", 5887 uv_pars_vertex: "#if defined( USE_MAP ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( USE_SPECULARMAP ) || defined( USE_ALPHAMAP ) || defined( USE_EMISSIVEMAP ) || defined( USE_ROUGHNESSMAP ) || defined( USE_METALNESSMAP )\n\tvarying vec2 vUv;\n\tuniform vec4 offsetRepeat;\n#endif\n", 5888 uv_vertex: "#if defined( USE_MAP ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( USE_SPECULARMAP ) || defined( USE_ALPHAMAP ) || defined( USE_EMISSIVEMAP ) || defined( USE_ROUGHNESSMAP ) || defined( USE_METALNESSMAP )\n\tvUv = uv * offsetRepeat.zw + offsetRepeat.xy;\n#endif", 5889 uv2_pars_fragment: "#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\n\tvarying vec2 vUv2;\n#endif", 5890 uv2_pars_vertex: "#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\n\tattribute vec2 uv2;\n\tvarying vec2 vUv2;\n#endif", 5891 uv2_vertex: "#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\n\tvUv2 = uv2;\n#endif", 5892 worldpos_vertex: "#if defined( USE_ENVMAP ) || defined( PHONG ) || defined( PHYSICAL ) || defined( LAMBERT ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP )\n\tvec4 worldPosition = modelMatrix * vec4( transformed, 1.0 );\n#endif\n", 5893 cube_frag: "uniform samplerCube tCube;\nuniform float tFlip;\nuniform float opacity;\nvarying vec3 vWorldPosition;\nvoid main() {\n\tgl_FragColor = textureCube( tCube, vec3( tFlip * vWorldPosition.x, vWorldPosition.yz ) );\n\tgl_FragColor.a *= opacity;\n}\n", 5894 cube_vert: "varying vec3 vWorldPosition;\n#include <common>\nvoid main() {\n\tvWorldPosition = transformDirection( position, modelMatrix );\n\t#include <begin_vertex>\n\t#include <project_vertex>\n}\n", 5895 depth_frag: "#if DEPTH_PACKING == 3200\n\tuniform float opacity;\n#endif\n#include <common>\n#include <packing>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( 1.0 );\n\t#if DEPTH_PACKING == 3200\n\t\tdiffuseColor.a = opacity;\n\t#endif\n\t#include <map_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <logdepthbuf_fragment>\n\t#if DEPTH_PACKING == 3200\n\t\tgl_FragColor = vec4( vec3( gl_FragCoord.z ), opacity );\n\t#elif DEPTH_PACKING == 3201\n\t\tgl_FragColor = packDepthToRGBA( gl_FragCoord.z );\n\t#endif\n}\n", 5896 depth_vert: "#include <common>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <skinbase_vertex>\n\t#ifdef USE_DISPLACEMENTMAP\n\t\t#include <beginnormal_vertex>\n\t\t#include <morphnormal_vertex>\n\t\t#include <skinnormal_vertex>\n\t#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n}\n", 5897 distanceRGBA_frag: "#define DISTANCE\nuniform vec3 referencePosition;\nuniform float nearDistance;\nuniform float farDistance;\nvarying vec3 vWorldPosition;\n#include <common>\n#include <packing>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main () {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( 1.0 );\n\t#include <map_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\tfloat dist = length( vWorldPosition - referencePosition );\n\tdist = ( dist - nearDistance ) / ( farDistance - nearDistance );\n\tdist = saturate( dist );\n\tgl_FragColor = packDepthToRGBA( dist );\n}\n", 5898 distanceRGBA_vert: "#define DISTANCE\nvarying vec3 vWorldPosition;\n#include <common>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <skinbase_vertex>\n\t#ifdef USE_DISPLACEMENTMAP\n\t\t#include <beginnormal_vertex>\n\t\t#include <morphnormal_vertex>\n\t\t#include <skinnormal_vertex>\n\t#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <worldpos_vertex>\n\t#include <clipping_planes_vertex>\n\tvWorldPosition = worldPosition.xyz;\n}\n", 5899 equirect_frag: "uniform sampler2D tEquirect;\nvarying vec3 vWorldPosition;\n#include <common>\nvoid main() {\n\tvec3 direction = normalize( vWorldPosition );\n\tvec2 sampleUV;\n\tsampleUV.y = asin( clamp( direction.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\n\tsampleUV.x = atan( direction.z, direction.x ) * RECIPROCAL_PI2 + 0.5;\n\tgl_FragColor = texture2D( tEquirect, sampleUV );\n}\n", 5900 equirect_vert: "varying vec3 vWorldPosition;\n#include <common>\nvoid main() {\n\tvWorldPosition = transformDirection( position, modelMatrix );\n\t#include <begin_vertex>\n\t#include <project_vertex>\n}\n", 5901 linedashed_frag: "uniform vec3 diffuse;\nuniform float opacity;\nuniform float dashSize;\nuniform float totalSize;\nvarying float vLineDistance;\n#include <common>\n#include <color_pars_fragment>\n#include <fog_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\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 <logdepthbuf_fragment>\n\t#include <color_fragment>\n\toutgoingLight = diffuseColor.rgb;\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <premultiplied_alpha_fragment>\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n}\n", 5902 linedashed_vert: "uniform float scale;\nattribute float lineDistance;\nvarying float vLineDistance;\n#include <common>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <color_vertex>\n\tvLineDistance = scale * lineDistance;\n\tvec4 mvPosition = modelViewMatrix * vec4( position, 1.0 );\n\tgl_Position = projectionMatrix * mvPosition;\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <fog_vertex>\n}\n", 5903 meshbasic_frag: "uniform vec3 diffuse;\nuniform float opacity;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include <common>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <uv2_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <envmap_pars_fragment>\n#include <fog_pars_fragment>\n#include <specularmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <specularmap_fragment>\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\t#ifdef USE_LIGHTMAP\n\t\treflectedLight.indirectDiffuse += texture2D( lightMap, vUv2 ).xyz * lightMapIntensity;\n\t#else\n\t\treflectedLight.indirectDiffuse += vec3( 1.0 );\n\t#endif\n\t#include <aomap_fragment>\n\treflectedLight.indirectDiffuse *= diffuseColor.rgb;\n\tvec3 outgoingLight = reflectedLight.indirectDiffuse;\n\t#include <envmap_fragment>\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <premultiplied_alpha_fragment>\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n}\n", 5904 meshbasic_vert: "#include <common>\n#include <uv_pars_vertex>\n#include <uv2_pars_vertex>\n#include <envmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <uv2_vertex>\n\t#include <color_vertex>\n\t#include <skinbase_vertex>\n\t#ifdef USE_ENVMAP\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <worldpos_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <envmap_vertex>\n\t#include <fog_vertex>\n}\n", 5905 meshlambert_frag: "uniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float opacity;\nvarying vec3 vLightFront;\n#ifdef DOUBLE_SIDED\n\tvarying vec3 vLightBack;\n#endif\n#include <common>\n#include <packing>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <uv2_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <envmap_pars_fragment>\n#include <bsdfs>\n#include <lights_pars>\n#include <fog_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <shadowmask_pars_fragment>\n#include <specularmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\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 <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <specularmap_fragment>\n\t#include <emissivemap_fragment>\n\treflectedLight.indirectDiffuse = getAmbientLightIrradiance( ambientLightColor );\n\t#include <lightmap_fragment>\n\treflectedLight.indirectDiffuse *= BRDF_Diffuse_Lambert( diffuseColor.rgb );\n\t#ifdef DOUBLE_SIDED\n\t\treflectedLight.directDiffuse = ( gl_FrontFacing ) ? vLightFront : vLightBack;\n\t#else\n\t\treflectedLight.directDiffuse = vLightFront;\n\t#endif\n\treflectedLight.directDiffuse *= BRDF_Diffuse_Lambert( diffuseColor.rgb ) * getShadowMask();\n\t#include <aomap_fragment>\n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\n\t#include <envmap_fragment>\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}\n", 5906 meshlambert_vert: "#define LAMBERT\nvarying vec3 vLightFront;\n#ifdef DOUBLE_SIDED\n\tvarying vec3 vLightBack;\n#endif\n#include <common>\n#include <uv_pars_vertex>\n#include <uv2_pars_vertex>\n#include <envmap_pars_vertex>\n#include <bsdfs>\n#include <lights_pars>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <uv2_vertex>\n\t#include <color_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <worldpos_vertex>\n\t#include <envmap_vertex>\n\t#include <lights_lambert_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n}\n", 5907 meshphong_frag: "#define PHONG\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform vec3 specular;\nuniform float shininess;\nuniform float opacity;\n#include <common>\n#include <packing>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <uv2_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <envmap_pars_fragment>\n#include <gradientmap_pars_fragment>\n#include <fog_pars_fragment>\n#include <bsdfs>\n#include <lights_pars>\n#include <lights_phong_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <specularmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\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 <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <specularmap_fragment>\n\t#include <normal_fragment>\n\t#include <emissivemap_fragment>\n\t#include <lights_phong_fragment>\n\t#include <lights_template>\n\t#include <aomap_fragment>\n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;\n\t#include <envmap_fragment>\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}\n", 5908 meshphong_vert: "#define PHONG\nvarying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include <common>\n#include <uv_pars_vertex>\n#include <uv2_pars_vertex>\
5908n#include <displacementmap_pars_vertex>\n#include <envmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <uv2_vertex>\n\t#include <color_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n#ifndef FLAT_SHADED\n\tvNormal = normalize( transformedNormal );\n#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvViewPosition = - mvPosition.xyz;\n\t#include <worldpos_vertex>\n\t#include <envmap_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n}\n", 5909 meshphysical_frag: "#define PHYSICAL\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float roughness;\nuniform float metalness;\nuniform float opacity;\n#ifndef STANDARD\n\tuniform float clearCoat;\n\tuniform float clearCoatRoughness;\n#endif\nvarying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include <common>\n#include <packing>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <uv2_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <envmap_pars_fragment>\n#include <fog_pars_fragment>\n#include <bsdfs>\n#include <cube_uv_reflection_fragment>\n#include <lights_pars>\n#include <lights_physical_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <roughnessmap_pars_fragment>\n#include <metalnessmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\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 <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <roughnessmap_fragment>\n\t#include <metalnessmap_fragment>\n\t#include <normal_fragment>\n\t#include <emissivemap_fragment>\n\t#include <lights_physical_fragment>\n\t#include <lights_template>\n\t#include <aomap_fragment>\n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}\n", 5910 meshphysical_vert: "#define PHYSICAL\nvarying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include <common>\n#include <uv_pars_vertex>\n#include <uv2_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <uv2_vertex>\n\t#include <color_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n#ifndef FLAT_SHADED\n\tvNormal = normalize( transformedNormal );\n#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvViewPosition = - mvPosition.xyz;\n\t#include <worldpos_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n}\n", 5911 normal_frag: "#define NORMAL\nuniform float opacity;\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP )\n\tvarying vec3 vViewPosition;\n#endif\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include <packing>\n#include <uv_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\nvoid main() {\n\t#include <logdepthbuf_fragment>\n\t#include <normal_fragment>\n\tgl_FragColor = vec4( packNormalToRGB( normal ), opacity );\n}\n", 5912 normal_vert: "#define NORMAL\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP )\n\tvarying vec3 vViewPosition;\n#endif\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n#ifndef FLAT_SHADED\n\tvNormal = normalize( transformedNormal );\n#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP )\n\tvViewPosition = - mvPosition.xyz;\n#endif\n}\n", 5913 points_frag: "uniform vec3 diffuse;\nuniform float opacity;\n#include <common>\n#include <packing>\n#include <color_pars_fragment>\n#include <map_particle_pars_fragment>\n#include <fog_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec3 outgoingLight = vec3( 0.0 );\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <logdepthbuf_fragment>\n\t#include <map_particle_fragment>\n\t#include <color_fragment>\n\t#include <alphatest_fragment>\n\toutgoingLight = diffuseColor.rgb;\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <premultiplied_alpha_fragment>\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n}\n", 5914 points_vert: "uniform float size;\nuniform float scale;\n#include <common>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <color_vertex>\n\t#include <begin_vertex>\n\t#include <project_vertex>\n\t#ifdef USE_SIZEATTENUATION\n\t\tgl_PointSize = size * ( scale / - mvPosition.z );\n\t#else\n\t\tgl_PointSize = size;\n\t#endif\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <worldpos_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n}\n", 5915 shadow_frag: "uniform vec3 color;\nuniform float opacity;\n#include <common>\n#include <packing>\n#include <bsdfs>\n#include <lights_pars>\n#include <shadowmap_pars_fragment>\n#include <shadowmask_pars_fragment>\nvoid main() {\n\tgl_FragColor = vec4( color, opacity * ( 1.0 - getShadowMask() ) );\n}\n", 5916 shadow_vert: "#include <shadowmap_pars_vertex>\nvoid main() {\n\t#include <begin_vertex>\n\t#include <project_vertex>\n\t#include <worldpos_vertex>\n\t#include <shadowmap_vertex>\n}\n" 5917 }, 5918 Li = { 5919 basic: { 5920 uniforms: Ai.merge([Ci.common, Ci.specularmap, Ci.envmap, Ci.aomap, Ci.lightmap, Ci.fog]), 5921 vertexShader: Ri.meshbasic_vert, 5922 fragmentShader: Ri.meshbasic_frag 5923 }, 5924 lambert: { 5925 uniforms: Ai.merge([Ci.common, Ci.specularmap, Ci.envmap, Ci.aomap, Ci.lightmap, Ci.emissivemap, Ci.fog, Ci.lights, { 5926 emissive: { 5927 value: new Ei(0) 5928 } 5929 }]), 5930 vertexShader: Ri.meshlambert_vert, 5931 fragmentShader: Ri.meshlambert_frag 5932 }, 5933 phong: { 5934 uniforms: Ai.merge([Ci.common, Ci.specularmap, Ci.envmap, Ci.aomap, Ci.lightmap, Ci.emissivemap, Ci.bumpmap, Ci.normalmap, Ci.displacementmap, Ci.gradientmap, Ci.fog, Ci.lights, { 5935 emissive: { 5936 value: new Ei(0) 5937 }, 5938 specular: { 5939 value: new Ei(1118481) 5940 }, 5941 shininess: { 5942 value: 30 5943 } 5944 }]), 5945 vertexShader: Ri.meshphong_vert, 5946 fragmentShader: Ri.meshphong_frag 5947 }, 5948 standard: { 5949 uniforms: Ai.merge([Ci.common, Ci.envmap, Ci.aomap, Ci.lightmap, Ci.emissivemap, Ci.bumpmap, Ci.normalmap, Ci.displacementmap, Ci.roughnessmap, Ci.metalnessmap, Ci.fog, Ci.lights, { 5950 emissive: { 5951 value: new Ei(0) 5952 }, 5953 roughness: { 5954 value: .5 5955 }, 5956 metalness: { 5957 value: .5 5958 }, 5959 envMapIntensity: { 5960 value: 1 5961 } 5962 }]), 5963 vertexShader: Ri.meshphysical_vert, 5964 fragmentShader: Ri.meshphysical_frag 5965 }, 5966 points: { 5967 uniforms: Ai.merge([Ci.points, Ci.fog]), 5968 vertexShader: Ri.points_vert, 5969 fragmentShader: Ri.points_frag 5970 }, 5971 dashed: { 5972 uniforms: Ai.merge([Ci.common, Ci.fog, { 5973 scale: { 5974 value: 1 5975 }, 5976 dashSize: { 5977 value: 1 5978 }, 5979 totalSize: { 5980 value: 2 5981 } 5982 }]), 5983 vertexShader: Ri.linedashed_vert, 5984 fragmentShader: Ri.linedashed_frag 5985 }, 5986 depth: { 5987 uniforms: Ai.merge([Ci.common, Ci.displacementmap]), 5988 vertexShader: Ri.depth_vert, 5989 fragmentShader: Ri.depth_frag 5990 }, 5991 normal: { 5992 uniforms: Ai.merge([Ci.common, Ci.bumpmap, Ci.normalmap, Ci.displacementmap, { 5993 opacity: { 5994 value: 1 5995 } 5996 }]), 5997 vertexShader: Ri.normal_vert, 5998 fragmentShader: Ri.normal_frag 5999 }, 6000 cube: { 6001 uniforms: { 6002 tCube: { 6003 value: null 6004 }, 6005 tFlip: { 6006 value: -1 6007 }, 6008 opacity: { 6009 value: 1 6010 } 6011 }, 6012 vertexShader: Ri.cube_vert, 6013 fragmentShader: Ri.cube_frag 6014 }, 6015 equirect: { 6016 uniforms: { 6017 tEquirect: { 6018 value: null 6019 } 6020 }, 6021 vertexShader: Ri.equirect_vert, 6022 fragmentShader: Ri.equirect_frag 6023 }, 6024 distanceRGBA: { 6025 uniforms: Ai.merge([Ci.common, Ci.displacementmap, { 6026 referencePosition: { 6027 value: new Dt 6028 }, 6029 nearDistance: { 6030 value: 1 6031 }, 6032 farDistance: { 6033 value: 1e3 6034 } 6035 }]), 6036 vertexShader: Ri.distanceRGBA_vert, 6037 fragmentShader: Ri.distanceRGBA_frag 6038 }, 6039 shadow: { 6040 uniforms: Ai.merge([Ci.lights, { 6041 color: { 6042 value: new Ei(0) 6043 }, 6044 opacity: { 6045 value: 1 6046 } 6047 }]), 6048 vertexShader: Ri.shadow_vert, 6049 fragmentShader: Ri.shadow_frag 6050 } 6051 }; 6052 6053 function Pi(e, t) { 6054 this.min = void 0 !== e ? e : new lt(1 / 0, 1 / 0), this.max = void 0 !== t ? t : new lt(-1 / 0, -1 / 0) 6055 } 6056 6057 function ki(e, b, w, x, s) { 6058 var _, T, l, E, M, S, C, A; 6059 6060 function R() { 6061 var e, t, i, n, r, o = new Float32Array([-1, -1, 0, 0, 1, -1, 1, 0, 1, 1, 1, 1, -1, 1, 0, 1]), 6062 a = new Uint16Array([0, 1, 2, 0, 2, 3]); 6063 _ = b.createBuffer(), T = b.createBuffer(), b.bindBuffer(b.ARRAY_BUFFER, _), b.bufferData(b.ARRAY_BUFFER, o, b.STATIC_DRAW), b.bindBuffer(b.ELEMENT_ARRAY_BUFFER, T), b.bufferData(b.ELEMENT_ARRAY_BUFFER, a, b.STATIC_DRAW), C = b.createTexture(), A = b.createTexture(), w.bindTexture(b.TEXTURE_2D, C), b.texImage2D(b.TEXTURE_2D, 0, b.RGB, 16, 16, 0, b.RGB, b.UNSIGNED_BYTE, null), b.texParameteri(b.TEXTURE_2D, b.TEXTURE_WRAP_S, b.CLAMP_TO_EDGE), b.texParameteri(b.TEXTURE_2D, b.TEXTURE_WRAP_T, b.CLAMP_TO_EDGE), b.texParameteri(b.TEXTURE_2D, b.TEXTURE_MAG_FILTER, b.NEAREST), b.texParameteri(b.TEXTURE_2D, b.TEXTURE_MIN_FILTER, b.NEAREST), w.bindTexture(b.TEXTURE_2D, A), b.texImage2D(b.TEXTURE_2D, 0, b.RGBA, 16, 16, 0, b.RGBA, b.UNSIGNED_BYTE, null), b.texParameteri(b.TEXTURE_2D, b.TEXTURE_WRAP_S, b.CLAMP_TO_EDGE), b.texParameteri(b.TEXTURE_2D, b.TEXTURE_WRAP_T, b.CLAMP_TO_EDGE), b.texParameteri(b.TEXTURE_2D, b.TEXTURE_MAG_FILTER, b.NEAREST), b.texParameteri(b.TEXTURE_2D, b.TEXTURE_MIN_FILTER, b.NEAREST), l = { 6064 vertexShader: ["uniform lowp int renderType;", "uniform vec3 screenPosition;", "uniform vec2 scale;", "uniform float rotation;", "uniform sampler2D occlusionMap;", "attribute vec2 position;", "attribute vec2 uv;", "varying vec2 vUV;", "varying float vVisibility;", "void main() {", "vUV = uv;", "vec2 pos = position;", "if ( renderType == 2 ) {", "vec4 visibility = texture2D( occlusionMap, vec2( 0.1, 0.1 ) );", "visibility += texture2D( occlusionMap, vec2( 0.5, 0.1 ) );", "visibility += texture2D( occlusionMap, vec2( 0.9, 0.1 ) );", "visibility += texture2D( occlusionMap, vec2( 0.9, 0.5 ) );", "visibility += texture2D( occlusionMap, vec2( 0.9, 0.9 ) );", "visibility += texture2D( occlusionMap, vec2( 0.5, 0.9 ) );", "visibility += texture2D( occlusionMap, vec2( 0.1, 0.9 ) );", "visibility += texture2D( occlusionMap, vec2( 0.1, 0.5 ) );", "visibility += texture2D( occlusionMap, vec2( 0.5, 0.5 ) );", "vVisibility = visibility.r / 9.0;", "vVisibility *= 1.0 - visibility.g / 9.0;", "vVisibility *= visibility.b / 9.0;", "vVisibility *= 1.0 - visibility.a / 9.0;", "pos.x = cos( rotation ) * position.x - sin( rotation ) * position.y;", "pos.y = sin( rotation ) * position.x + cos( rotation ) * position.y;", "}", "gl_Position = vec4( ( pos * scale + screenPosition.xy ).xy, screenPosition.z, 1.0 );", "}"].join("\n"), 6065 fragmentShader: ["uniform lowp int renderType;", "uniform sampler2D map;", "uniform float opacity;", "uniform vec3 color;", "varying vec2 vUV;", "varying float vVisibility;", "void main() {", "if ( renderType == 0 ) {", "gl_FragColor = vec4( 1.0, 0.0, 1.0, 0.0 );", "} else if ( renderType == 1 ) {", "gl_FragColor = texture2D( map, vUV );", "} else {", "vec4 texture = texture2D( map, vUV );
6065", "texture.a *= opacity * vVisibility;", "gl_FragColor = texture;", "gl_FragColor.rgb *= color;", "}", "}"].join("\n") 6066 }, e = l, t = b.createProgram(), i = b.createShader(b.FRAGMENT_SHADER), n = b.createShader(b.VERTEX_SHADER), r = "precision " + s.precision + " float;\n", b.shaderSource(i, r + e.fragmentShader), b.shaderSource(n, r + e.vertexShader), b.compileShader(i), b.compileShader(n), b.attachShader(t, i), b.attachShader(t, n), b.linkProgram(t), E = t, M = { 6067 vertex: b.getAttribLocation(E, "position"), 6068 uv: b.getAttribLocation(E, "uv") 6069 }, S = { 6070 renderType: b.getUniformLocation(E, "renderType"), 6071 map: b.getUniformLocation(E, "map"), 6072 occlusionMap: b.getUniformLocation(E, "occlusionMap"), 6073 opacity: b.getUniformLocation(E, "opacity"), 6074 color: b.getUniformLocation(E, "color"), 6075 scale: b.getUniformLocation(E, "scale"), 6076 rotation: b.getUniformLocation(E, "rotation"), 6077 screenPosition: b.getUniformLocation(E, "screenPosition") 6078 } 6079 } 6080 this.render = function(e, t, i, n) { 6081 if (0 !== e.length) { 6082 var r = new Dt, 6083 o = n.w / n.z, 6084 a = .5 * n.z, 6085 s = .5 * n.w, 6086 l = 16 / n.w, 6087 c = new lt(l * o, l), 6088 u = new Dt(1, 1, 0), 6089 h = new lt(1, 1), 6090 d = new Pi; 6091 d.min.set(n.x, n.y), d.max.set(n.x + (n.z - 16), n.y + (n.w - 16)), void 0 === E && R(), w.useProgram(E), w.initAttributes(), w.enableAttribute(M.vertex), w.enableAttribute(M.uv), w.disableUnusedAttributes(), b.uniform1i(S.occlusionMap, 0), b.uniform1i(S.map, 1), b.bindBuffer(b.ARRAY_BUFFER, _), b.vertexAttribPointer(M.vertex, 2, b.FLOAT, !1, 16, 0), b.vertexAttribPointer(M.uv, 2, b.FLOAT, !1, 16, 8), b.bindBuffer(b.ELEMENT_ARRAY_BUFFER, T), w.disable(b.CULL_FACE), w.buffers.depth.setMask(!1); 6092 for (var p = 0, f = e.length; p < f; p++) { 6093 l = 16 / n.w, c.set(l * o, l); 6094 var m = e[p]; 6095 if (r.set(m.matrixWorld.elements[12], m.matrixWorld.elements[13], m.matrixWorld.elements[14]), r.applyMatrix4(i.matrixWorldInverse), r.applyMatrix4(i.projectionMatrix), u.copy(r), h.x = n.x + u.x * a + a - 8, h.y = n.y + u.y * s + s - 8, !0 === d.containsPoint(h)) { 6096 w.activeTexture(b.TEXTURE0), w.bindTexture(b.TEXTURE_2D, null), w.activeTexture(b.TEXTURE1), w.bindTexture(b.TEXTURE_2D, C), b.copyTexImage2D(b.TEXTURE_2D, 0, b.RGB, h.x, h.y, 16, 16, 0), b.uniform1i(S.renderType, 0), b.uniform2f(S.scale, c.x, c.y), b.uniform3f(S.screenPosition, u.x, u.y, u.z), w.disable(b.BLEND), w.enable(b.DEPTH_TEST), b.drawElements(b.TRIANGLES, 6, b.UNSIGNED_SHORT, 0), w.activeTexture(b.TEXTURE0), w.bindTexture(b.TEXTURE_2D, A), b.copyTexImage2D(b.TEXTURE_2D, 0, b.RGBA, h.x, h.y, 16, 16, 0), b.uniform1i(S.renderType, 1), w.disable(b.DEPTH_TEST), w.activeTexture(b.TEXTURE1), w.bindTexture(b.TEXTURE_2D, C), b.drawElements(b.TRIANGLES, 6, b.UNSIGNED_SHORT, 0), m.positionScreen.copy(u), m.customUpdateCallback ? m.customUpdateCallback(m) : m.updateLensFlares(), b.uniform1i(S.renderType, 2), w.enable(b.BLEND); 6097 for (var g = 0, v = m.lensFlares.length; g < v; g++) { 6098 var y = m.lensFlares[g];.001 < y.opacity && .001 < y.scale && (u.x = y.x, u.y = y.y, u.z = y.z, l = y.size * y.scale / n.w, c.x = l * o, c.y = l, b.uniform3f(S.screenPosition, u.x, u.y, u.z), b.uniform2f(S.scale, c.x, c.y), b.uniform1f(S.rotation, y.rotation), b.uniform1f(S.opacity, y.opacity), b.uniform3f(S.color, y.color.r, y.color.g, y.color.b), w.setBlending(y.blending, y.blendEquation, y.blendSrc, y.blendDst), x.setTexture2D(y.texture, 1), b.drawElements(b.TRIANGLES, 6, b.UNSIGNED_SHORT, 0)) 6099 } 6100 } 6101 } 6102 w.enable(b.CULL_FACE), w.enable(b.DEPTH_TEST), w.buffers.depth.setMask(!0), w.reset() 6103 } 6104 } 6105 } 6106 6107 function Oi(e, t, i, n, r, o, a, s, l) { 6108 Rt.call(this, e, t, i, n, r, o, a, s, l), this.needsUpdate = !0 6109 } 6110 6111 function Di(d, p, f, m, s) { 6112 var g, v, y, b, w, x, _ = new Dt, 6113 T = new Ot, 6114 E = new Dt; 6115 6116 function M() { 6117 var e, t, i, n = new Float32Array([-.5, -.5, 0, 0, .5, -.5, 1, 0, .5, .5, 1, 1, -.5, .5, 0, 1]), 6118 r = new Uint16Array([0, 1, 2, 0, 2, 3]); 6119 g = p.createBuffer(), v = p.createBuffer(), p.bindBuffer(p.ARRAY_BUFFER, g), p.bufferData(p.ARRAY_BUFFER, n, p.STATIC_DRAW), p.bindBuffer(p.ELEMENT_ARRAY_BUFFER, v), p.bufferData(p.ELEMENT_ARRAY_BUFFER, r, p.STATIC_DRAW), e = p.createProgram(), t = p.createShader(p.VERTEX_SHADER), i = p.createShader(p.FRAGMENT_SHADER), p.shaderSource(t, ["precision " + s.precision + " float;", "#define SHADER_NAME SpriteMaterial", "uniform mat4 modelViewMatrix;", "uniform mat4 projectionMatrix;", "uniform float rotation;", "uniform vec2 scale;", "uniform vec2 uvOffset;", "uniform vec2 uvScale;", "attribute vec2 position;", "attribute vec2 uv;", "varying vec2 vUV;", "void main() {", "vUV = uvOffset + uv * uvScale;", "vec2 alignedPosition = position * scale;", "vec2 rotatedPosition;", "rotatedPosition.x = cos( rotation ) * alignedPosition.x - sin( rotation ) * alignedPosition.y;", "rotatedPosition.y = sin( rotation ) * alignedPosition.x + cos( rotation ) * alignedPosition.y;", "vec4 finalPosition;", "finalPosition = modelViewMatrix * vec4( 0.0, 0.0, 0.0, 1.0 );", "finalPosition.xy += rotatedPosition;", "finalPosition = projectionMatrix * finalPosition;", "gl_Position = finalPosition;", "}"].join("\n")), p.shaderSource(i, ["precision " + s.precision + " float;", "#define SHADER_NAME SpriteMaterial", "uniform vec3 color;", "uniform sampler2D map;", "uniform float opacity;", "uniform int fogType;", "uniform vec3 fogColor;", "uniform float fogDensity;", "uniform float fogNear;", "uniform float fogFar;", "uniform float alphaTest;", "varying vec2 vUV;", "void main() {", "vec4 texture = texture2D( map, vUV );", "if ( texture.a < alphaTest ) discard;", "gl_FragColor = vec4( color * texture.xyz, texture.a * opacity );", "if ( fogType > 0 ) {", "float depth = gl_FragCoord.z / gl_FragCoord.w;", "float fogFactor = 0.0;", "if ( fogType == 1 ) {", "fogFactor = smoothstep( fogNear, fogFar, depth );", "} else {", "const float LOG2 = 1.442695;", "fogFactor = exp2( - fogDensity * fogDensity * depth * depth * LOG2 );", "fogFactor = 1.0 - clamp( fogFactor, 0.0, 1.0 );", "}", "gl_FragColor = mix( gl_FragColor, vec4( fogColor, gl_FragColor.w ), fogFactor );", "}", "}"].join("\n")), p.compileShader(t), p.compileShader(i), p.attachShader(e, t), p.attachShader(e, i), p.linkProgram(e), y = e, b = { 6120 position: p.getAttribLocation(y, "position"), 6121 uv: p.getAttribLocation(y, "uv") 6122 }, w = { 6123 uvOffset: p.getUniformLocation(y, "uvOffset"), 6124 uvScale: p.getUniformLocation(y, "uvScale"), 6125 rotation: p.getUniformLocation(y, "rotation"), 6126 scale: p.getUniformLocation(y, "scale"), 6127 color: p.getUniformLocation(y, "color"), 6128 map: p.getUniformLocation(y, "map"), 6129 opacity: p.getUniformLocation(y, "opacity"), 6130 modelViewMatrix: p.getUniformLocation(y, "modelViewMatrix"), 6131 projectionMatrix: p.getUniformLocation(y, "projectionMatrix"), 6132 fogType: p.getUniformLocation(y, "fogType"), 6133 fogDensity: p.getUniformLocation(y, "fogDensity"), 6134 fogNear: p.getUniformLocation(y, "fogNear"), 6135 fogFar: p.getUniformLocation(y, "fogFar"), 6136 fogColor: p.getUniformLocation(y, "fogColor"), 6137 alphaTest: p.getUniformLocation(y, "alphaTest") 6138 }; 6139 var o = document.createElementNS("http://www.w3.org/1999/xhtml", "canvas"); 6140 o.width = 8, o.height = 8; 6141 var a = o.getContext("2d"); 6142 a.fillStyle = "white", a.fillRect(0, 0, 8, 8), x = new Oi(o) 6143 } 6144 6145 function S(e, t) { 6146 return e.renderOrder !== t.renderOrder ? e.renderOrder - t.renderOrder : e.z !== t.z ? t.z - e.z : t.id - e.id 6147 } 6148 this.render = function(e, t, i) { 6149 if (0 !== e.length) { 6150 void 0 === y && M(), f.useProgram(y), f.initAttributes(), f.enableAttribute(b.position), f.enableAttribute(b.uv), f.disableUnusedAttributes(), f.disable(p.CULL_FACE), f.enable(p.BLEND), p.bindBuffer(p.ARRAY_BUFFER, g), p.vertexAttribPointer(b.position, 2, p.FLOAT, !1, 16, 0), p.vertexAttribPointer(b.uv, 2, p.FLOAT, !1, 16, 8), p.bindBuffer(p.ELEMENT_ARRAY_BUFFER, v), p.uniformMatrix4fv(w.projectionMatrix, !1, i.projectionMatrix.elements), f.activeTexture(p.TEXTURE0), p.uniform1i(w.map, 0); 6151 var n = 0, 6152 r = 0, 6153 o = t.fog; 6154 o ? (p.uniform3f(w.fogColor, o.color.r, o.color.g, o.color.b), o.isFog ? (p.uniform1f(w.fogNear, o.near), p.uniform1f(w.fogFar, o.far), p.uniform1i(w.fogType, 1), r = n = 1) : o.isFogExp2 && (p.uniform1f(w.fogDensity, o.density), p.uniform1i(w.fogType, 2), r = n = 2)) : (p.uniform1i(w.fogType, 0), r = n = 0); 6155 for (var a = 0, s = e.length; a < s; a++) { 6156 (c = e[a]).modelViewMatrix.multiplyMatrices(i.matrixWorldInverse, c.matrixWorld), c.z = -c.modelViewMatrix.elements[14] 6157 } 6158 e.sort(S); 6159 var l = []; 6160 for (a = 0, s = e.length; a < s; a++) { 6161 var c, u = (c = e[a]).material; 6162 if (!1 !== u.visible) { 6163 c.onBeforeRender(d, t, i, void 0, u, void 0), p.uniform1f(w.alphaTest, u.alphaTest), p.uniformMatrix4fv(w.modelViewMatrix, !1, c.modelViewMatrix.elements), c.matrixWorld.decompose(_, T, E), l[0] = E.x, l[1] = E.y; 6164 var h = 0; 6165 t.fog && u.fog && (h = r), n !== h && (p.uniform1i(w.fogType, h), n = h), null !== u.map ? (p.uniform2f(w.uvOffset, u.map.offset.x, u.map.offset.y), p.uniform2f(w.uvScale, u.map.repeat.x, u.map.repeat.y)) : (p.uniform2f(w.uvOffset, 0, 0), p.uniform2f(w.uvScale, 1, 1)), p.uniform1f(w.opacity, u.opacity), p.uniform3f(w.color, u.color.r, u.color.g, u.color.b), p.uniform1f(w.rotation, u.rotation), p.uniform2fv(w.scale, l), f.setBlending(u.blending, u.blendEquation, u.blendSrc, u.blendDst, u.blendEquationAlpha, u.blendSrcAlpha, u.blendDstAlpha, u.premultipliedAlpha), f.buffers.depth.setTest(u.depthTest), f.buffers.depth.setMask(u.depthWrite), m.setTexture2D(u.map || x, 0), p.drawElements(p.TRIANGLES, 6, p.UNSIGNED_SHORT, 0), c.onAfterRender(d, t, i, void 0, u, void 0) 6166 } 6167 } 6168 f.enable(p.CULL_FACE), f.reset() 6169 } 6170 } 6171 } 6172 Li.physical = { 6173 uniforms: Ai.merge([Li.standard.uniforms, { 6174 clearCoat: { 6175 value: 0 6176 }, 6177 clearCoatRoughness: { 6178 value: 0 6179 } 6180 }]), 6181 vertexShader: Ri.meshphysical_vert, 6182 fragmentShader: Ri.meshphysical_frag 6183 }, Object.assign(Pi.prototype, { 6184 set: function(e, t) { 6185 return this.min.copy(e), this.max.copy(t), this 6186 }, 6187 setFromPoints: function(e) { 6188 this.makeEmpty(); 6189 for (var t = 0, i = e.length; t < i; t++) this.expandByPoint(e[t]); 6190 return this 6191 }, 6192 setFromCenterAndSize: (Si = new lt, function(e, t) { 6193 var i = Si.copy(t).multiplyScalar(.5); 6194 return this.min.copy(e).sub(i), this.max.copy(e).add(i), this 6195 }), 6196 clone: function() { 6197 return (new this.constructor).copy(this) 6198 }, 6199 copy: function(e) { 6200 return this.min.copy(e.min), this.max.copy(e.max), this 6201 }, 6202 makeEmpty: function() { 6203 return this.min.x = this.min.y = 1 / 0, this.max.x = this.max.y = -1 / 0, this 6204 }, 6205 isEmpty: function() { 6206 return this.max.x < this.min.x || this.max.y < this.min.y 6207 }, 6208 getCenter: function(e) { 6209 var t = e || new lt; 6210 return this.isEmpty() ? t.set(0, 0) : t.addVectors(this.min, this.max).multiplyScalar(.5) 6211 }, 6212 getSize: function(e) { 6213 var t = e || new lt; 6214 return this.isEmpty() ? t.set(0, 0) : t.subVectors(this.max, this.min) 6215 }, 6216 expandByPoint: function(e) { 6217 return this.min.min(e), this.max.max(e), this 6218 }, 6219 expandByVector: function(e) { 6220 return this.min.sub(e), this.max.add(e), this 6221 }, 6222 expandByScalar: function(e) { 6223 return this.min.addScalar(-e), this.max.addScalar(e), this 6224 }, 6225 containsPoint: function(e) { 6226 return !(e.x < this.min.x || e.x > this.max.x || e.y < this.min.y || e.y > this.max.y) 6227 }, 6228 containsBox: function(e) { 6229 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 6230 }, 6231 getParameter: function(e, t) { 6232 return (t || new lt).set((e.x - this.min.x) / (this.max.x - this.min.x), (e.y - this.min.y) / (this.max.y - this.min.y)) 6233 }, 6234 intersectsBox: function(e) { 6235 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) 6236 }, 6237 clampPoint: function(e, t) { 6238 return (t || new lt).copy(e).clamp(this.min, this.max) 6239 }, 6240 distanceToPoint: (Mi = new lt, function(e) { 6241 return Mi.copy(e).clamp(this.min, this.max).sub(e).length() 6242 }), 6243 intersect: function(e) { 6244 return this.min.max(e.min), this.max.min(e.max), this 6245 }, 6246 union: function(e) { 6247 return this.min.min(e.min), this.max.max(e.max), this 6248 }, 6249 translate: function(e) { 6250 return this.min.add(e), this.max.add(e), this 6251 }, 6252 equals: function(e) { 6253 return e.min.equals(this.min) && e.max.equals(this.max) 6254 } 6255 }), (Oi.prototype = Object.create(Rt.prototype)).constructor = Oi; 6256 var Ii, zi, Ni, Fi, Ui, Bi, Hi, $i, ji, Gi, Vi, Wi, qi, Xi, Yi, Zi, Qi, Ji, Ki, en = 0; 6257 6258 function tn() { 6259 Object.defineProperty(this, "id", { 6260 value: en++ 6261 }), this.uuid = st.generateUUID(), this.name = "", this.type = "Material", this.fog = !0, this.lights = !0, this.blending = W, this.side = I, this.flatShading = !1, this.vertexColors = Ce, this.opacity = 1, this.transparent = !1, this.blendSrc = v, this.blendDst = y, this.blendEquation = l, this.blendSrcAlpha = null, this.blendDstAlpha = null, this.blendEquationAlpha = null, this.depthFunc = ie, this.depthTest = !0, this.depthWrite = !0, this.clippingPlanes = null, this.clipIntersection = !1, this.clipShadows = !1, this.colorWrite = !0, this.precision = null, this.polygonOffset = !1, this.polygonOffsetFactor = 0, this.polygonOffsetUnits = 0, this.dithering = !1, this.alphaTest = 0, this.premultipliedAlpha = !1, this.overdraw = 0, this.visible = !0, this.userData = {}, this.needsUpdate = !0 6262 } 6263 6264 function nn(e) { 6265 tn.call(this), this.type = "ShaderMaterial", this.defines = {}, this.uniforms = {}, this.vertexShader = "void main() {\n\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n}", this.fragmentShader = "void main() {\n\tgl_FragColor = vec4( 1.0, 0.0, 0.0, 1.0 );\n}", this.linewidth = 1, this.wireframe = !1, this.wireframeLinewidth = 1, this.fog = !1, this.lights = !1, this.clipping = !1, this.skinning = !1, this.morphTargets = !1, this.morphNormals = !1, this.extensions = { 6266 derivatives: !1, 6267 fragDepth: !1, 6268 drawBuffers: !1, 6269 shaderTextureLOD: !1 6270 }, this.defaultAttributeValues = { 6271 color: [1, 1, 1], 6272 uv: [0, 0], 6273 uv2: [0, 0] 6274 }, (this.index0AttributeName = void 0) !== e && (void 0 !== e.attributes && console.error("THREE.ShaderMaterial: attributes should now be defined in THREE.BufferGeometry instead."), this.setValues(e)) 6275 } 6276 6277 function rn(e) { 6278 tn.call(
6278this), this.type = "MeshDepthMaterial", this.depthPacking = ot, this.skinning = !1, this.morphTargets = !1, this.map = null, this.alphaMap = null, this.displacementMap = null, this.displacementScale = 1, this.displacementBias = 0, this.wireframe = !1, this.wireframeLinewidth = 1, this.fog = !1, this.lights = !1, this.setValues(e) 6279 } 6280 6281 function on(e) { 6282 tn.call(this), this.type = "MeshDistanceMaterial", this.referencePosition = new Dt, this.nearDistance = 1, this.farDistance = 1e3, this.skinning = !1, this.morphTargets = !1, this.map = null, this.alphaMap = null, this.displacementMap = null, this.displacementScale = 1, this.displacementBias = 0, this.fog = !1, this.lights = !1, this.setValues(e) 6283 } 6284 6285 function an(e, t) { 6286 this.min = void 0 !== e ? e : new Dt(1 / 0, 1 / 0, 1 / 0), this.max = void 0 !== t ? t : new Dt(-1 / 0, -1 / 0, -1 / 0) 6287 } 6288 6289 function sn(e, t) { 6290 this.center = void 0 !== e ? e : new Dt, this.radius = void 0 !== t ? t : 0 6291 } 6292 6293 function ln() { 6294 this.elements = [1, 0, 0, 0, 1, 0, 0, 0, 1], 0 < arguments.length && console.error("THREE.Matrix3: the constructor no longer reads arguments. use .set() instead.") 6295 } 6296 6297 function cn(e, t) { 6298 this.normal = void 0 !== e ? e : new Dt(1, 0, 0), this.constant = void 0 !== t ? t : 0 6299 } 6300 6301 function un(e, t, i, n, r, o) { 6302 this.planes = [void 0 !== e ? e : new cn, void 0 !== t ? t : new cn, void 0 !== i ? i : new cn, void 0 !== n ? n : new cn, void 0 !== r ? r : new cn, void 0 !== o ? o : new cn] 6303 } 6304 6305 function hn(b, m, e) { 6306 for (var w = new un, x = new It, _ = new lt, T = new lt(e, e), E = new Dt, M = new Dt, y = 1, S = 2, t = 1 + (y | S), C = new Array(t), A = new Array(t), R = {}, L = [new Dt(1, 0, 0), new Dt(-1, 0, 0), new Dt(0, 0, 1), new Dt(0, 0, -1), new Dt(0, 1, 0), new Dt(0, -1, 0)], P = [new Dt(0, 1, 0), new Dt(0, 1, 0), new Dt(0, 1, 0), new Dt(0, 1, 0), new Dt(0, 0, 1), new Dt(0, 0, -1)], k = [new Lt, new Lt, new Lt, new Lt, new Lt, new Lt], i = 0; i !== t; ++i) { 6307 var n = 0 != (i & y), 6308 r = 0 != (i & S), 6309 o = new rn({ 6310 depthPacking: at, 6311 morphTargets: n, 6312 skinning: r 6313 }); 6314 C[i] = o; 6315 var a = new on({ 6316 morphTargets: n, 6317 skinning: r 6318 }); 6319 A[i] = a 6320 } 6321 var O = this; 6322 6323 function g(e, t, i, n, r, o) { 6324 var a = e.geometry, 6325 s = null, 6326 l = C, 6327 c = e.customDepthMaterial; 6328 if (i && (l = A, c = e.customDistanceMaterial), c) s = c; 6329 else { 6330 var u = !1; 6331 t.morphTargets && (a && a.isBufferGeometry ? u = a.morphAttributes && a.morphAttributes.position && 0 < a.morphAttributes.position.length : a && a.isGeometry && (u = a.morphTargets && 0 < a.morphTargets.length)), e.isSkinnedMesh && !1 === t.skinning && console.warn("THREE.WebGLShadowMap: THREE.SkinnedMesh with material.skinning set to false:", e); 6332 var h = e.isSkinnedMesh && t.skinning, 6333 d = 0; 6334 u && (d |= y), h && (d |= S), s = l[d] 6335 } 6336 if (b.localClippingEnabled && !0 === t.clipShadows && 0 !== t.clippingPlanes.length) { 6337 var p = s.uuid, 6338 f = t.uuid, 6339 m = R[p]; 6340 void 0 === m && (m = {}, R[p] = m); 6341 var g = m[f]; 6342 void 0 === g && (g = s.clone(), m[f] = g), s = g 6343 } 6344 s.visible = t.visible, s.wireframe = t.wireframe; 6345 var v = t.side; 6346 return O.renderSingleSided && v == Z && (v = I), O.renderReverseSided && (v === I ? v = Y : v === Y && (v = I)), s.side = v, s.clipShadows = t.clipShadows, s.clippingPlanes = t.clippingPlanes, s.clipIntersection = t.clipIntersection, s.wireframeLinewidth = t.wireframeLinewidth, s.linewidth = t.linewidth, i && s.isMeshDistanceMaterial && (s.referencePosition.copy(n), s.nearDistance = r, s.farDistance = o), s 6347 } 6348 6349 function D(e, t, i, n) { 6350 if (!1 !== e.visible) { 6351 if (e.layers.test(t.layers) && (e.isMesh || e.isLine || e.isPoints) && e.castShadow && (!e.frustumCulled || w.intersectsObject(e))) { 6352 e.modelViewMatrix.multiplyMatrices(i.matrixWorldInverse, e.matrixWorld); 6353 var r = m.update(e), 6354 o = e.material; 6355 if (Array.isArray(o)) 6356 for (var a = r.groups, s = 0, l = a.length; s < l; s++) { 6357 var c = a[s], 6358 u = o[c.materialIndex]; 6359 if (u && u.visible) { 6360 var h = g(e, u, n, M, i.near, i.far); 6361 b.renderBufferDirect(i, null, r, h, e, c) 6362 } 6363 } else if (o.visible) { 6364 h = g(e, o, n, M, i.near, i.far); 6365 b.renderBufferDirect(i, null, r, h, e, null) 6366 } 6367 } 6368 for (var d = e.children, p = 0, f = d.length; p < f; p++) D(d[p], t, i, n) 6369 } 6370 } 6371 this.enabled = !1, this.autoUpdate = !0, this.needsUpdate = !1, this.type = N, this.renderReverseSided = !0, this.renderSingleSided = !0, this.render = function(e, t, i) { 6372 if (!1 !== O.enabled && (!1 !== O.autoUpdate || !1 !== O.needsUpdate) && 0 !== e.length) { 6373 var n, r = b.context, 6374 o = b.state; 6375 o.disable(r.BLEND), o.buffers.color.setClear(1, 1, 1, 1), o.buffers.depth.setTest(!0), o.setScissorTest(!1); 6376 for (var a = 0, s = e.length; a < s; a++) { 6377 var l = e[a], 6378 c = l.shadow, 6379 u = l && l.isPointLight; 6380 if (void 0 !== c) { 6381 var h = c.camera; 6382 if (_.copy(c.mapSize), _.min(T), u) { 6383 var d = _.x, 6384 p = _.y; 6385 k[0].set(2 * d, p, d, p), k[1].set(0, p, d, p), k[2].set(3 * d, p, d, p), k[3].set(d, p, d, p), k[4].set(3 * d, 0, d, p), k[5].set(d, 0, d, p), _.x *= 4, _.y *= 2 6386 } 6387 if (null === c.map) { 6388 var f = { 6389 minFilter: z, 6390 magFilter: z, 6391 format: ke 6392 }; 6393 c.map = new Pt(_.x, _.y, f), c.map.texture.name = l.name + ".shadowMap", h.updateProjectionMatrix() 6394 } 6395 c.isSpotLightShadow && c.update(l); 6396 var m = c.map, 6397 g = c.matrix; 6398 M.setFromMatrixPosition(l.matrixWorld), h.position.copy(M), u ? (n = 6, g.makeTranslation(-M.x, -M.y, -M.z)) : (n = 1, E.setFromMatrixPosition(l.target.matrixWorld), h.lookAt(E), h.updateMatrixWorld(), g.set(.5, 0, 0, .5, 0, .5, 0, .5, 0, 0, .5, .5, 0, 0, 0, 1), g.multiply(h.projectionMatrix), g.multiply(h.matrixWorldInverse)), b.setRenderTarget(m), b.clear(); 6399 for (var v = 0; v < n; v++) { 6400 if (u) { 6401 E.copy(h.position), E.add(L[v]), h.up.copy(P[v]), h.lookAt(E), h.updateMatrixWorld(); 6402 var y = k[v]; 6403 o.viewport(y) 6404 } 6405 x.multiplyMatrices(h.projectionMatrix, h.matrixWorldInverse), w.setFromMatrix(x), D(t, i, h, u) 6406 } 6407 } else console.warn("THREE.WebGLShadowMap:", l, "has no shadow.") 6408 } 6409 O.needsUpdate = !1 6410 } 6411 } 6412 } 6413 6414 function dn(l) { 6415 var c = {}; 6416 return { 6417 get: function(e) { 6418 return e.isInterleavedBufferAttribute && (e = e.data), c[e.uuid] 6419 }, 6420 remove: function(e) { 6421 e.isInterleavedBufferAttribute && (e = e.data); 6422 var t = c[e.uuid]; 6423 t && (l.deleteBuffer(t.buffer), delete c[e.uuid]) 6424 }, 6425 update: function(e, t) { 6426 e.isInterleavedBufferAttribute && (e = e.data); 6427 var i, n, r, o, a, s = c[e.uuid]; 6428 void 0 === s ? c[e.uuid] = function(e, t) { 6429 var i = e.array, 6430 n = e.dynamic ? l.DYNAMIC_DRAW : l.STATIC_DRAW, 6431 r = l.createBuffer(); 6432 l.bindBuffer(t, r), l.bufferData(t, i, n), e.onUploadCallback(); 6433 var o = l.FLOAT; 6434 return i instanceof Float32Array ? o = l.FLOAT : i instanceof Float64Array ? console.warn("THREE.WebGLAttributes: Unsupported data buffer format: Float64Array.") : i instanceof Uint16Array ? o = l.UNSIGNED_SHORT : i instanceof Int16Array ? o = l.SHORT : i instanceof Uint32Array ? o = l.UNSIGNED_INT : i instanceof Int32Array ? o = l.INT : i instanceof Int8Array ? o = l.BYTE : i instanceof Uint8Array && (o = l.UNSIGNED_BYTE), { 6435 buffer: r, 6436 type: o, 6437 bytesPerElement: i.BYTES_PER_ELEMENT, 6438 version: e.version 6439 } 6440 }(e, t) : s.version < e.version && (i = s.buffer, r = t, o = (n = e).array, a = n.updateRange, l.bindBuffer(r, i), !1 === n.dynamic ? l.bufferData(r, o, l.STATIC_DRAW) : -1
vendor: 12,228 bytes, lines 6440-6595
6440=== a.count ? l.bufferSubData(r, 0, o) : 0 === a.count ? console.error("THREE.WebGLObjects.updateBuffer: dynamic THREE.BufferAttribute marked as needsUpdate but updateRange.count is 0, ensure you are using set methods or updating manually.") : (l.bufferSubData(r, a.offset * o.BYTES_PER_ELEMENT, o.subarray(a.offset, a.offset + a.count)), a.count = -1), s.version = e.version) 6441 } 6442 } 6443 } 6444 6445 function pn(e, t, i, n) { 6446 this._x = e || 0, this._y = t || 0, this._z = i || 0, this._order = n || pn.DefaultOrder 6447 } 6448 6449 function fn() { 6450 this.mask = 1 6451 } 6452 Object.assign(tn.prototype, t.prototype, { 6453 isMaterial: !0, 6454 onBeforeCompile: function() {}, 6455 setValues: function(e) { 6456 if (void 0 !== e) 6457 for (var t in e) { 6458 var i = e[t]; 6459 if (void 0 !== i) 6460 if ("shading" !== t) { 6461 var n = this[t]; 6462 void 0 !== n ? n && n.isColor ? n.set(i) : n && n.isVector3 && i && i.isVector3 ? n.copy(i) : this[t] = "overdraw" === t ? Number(i) : i : console.warn("THREE." + this.type + ": '" + t + "' is not a property of this material.") 6463 } else console.warn("THREE." + this.type + ": .shading has been removed. Use the boolean .flatShading instead."), this.flatShading = 1 === i; 6464 else console.warn("THREE.Material: '" + t + "' parameter is undefined.") 6465 } 6466 }, 6467 toJSON: function(e) { 6468 var t = void 0 === e; 6469 t && (e = { 6470 textures: {}, 6471 images: {} 6472 }); 6473 var i = { 6474 metadata: { 6475 version: 4.5, 6476 type: "Material", 6477 generator: "Material.toJSON" 6478 } 6479 }; 6480 6481 function n(e) { 6482 var t = []; 6483 for (var i in e) { 6484 var n = e[i]; 6485 delete n.metadata, t.push(n) 6486 } 6487 return t 6488 } 6489 if (i.uuid = this.uuid, i.type = this.type, "" !== this.name && (i.name = this.name), this.color && this.color.isColor && (i.color = this.color.getHex()), void 0 !== this.roughness && (i.roughness = this.roughness), void 0 !== this.metalness && (i.metalness = this.metalness), this.emissive && this.emissive.isColor && (i.emissive = this.emissive.getHex()), this.specular && this.specular.isColor && (i.specular = this.specular.getHex()), void 0 !== this.shininess && (i.shininess = this.shininess), void 0 !== this.clearCoat && (i.clearCoat = this.clearCoat), void 0 !== this.clearCoatRoughness && (i.clearCoatRoughness = this.clearCoatRoughness), this.map && this.map.isTexture && (i.map = this.map.toJSON(e).uuid), this.alphaMap && this.alphaMap.isTexture && (i.alphaMap = this.alphaMap.toJSON(e).uuid), this.lightMap && this.lightMap.isTexture && (i.lightMap = this.lightMap.toJSON(e).uuid), this.bumpMap && this.bumpMap.isTexture && (i.bumpMap = this.bumpMap.toJSON(e).uuid, i.bumpScale = this.bumpScale), this.normalMap && this.normalMap.isTexture && (i.normalMap = this.normalMap.toJSON(e).uuid, i.normalScale = this.normalScale.toArray()), this.displacementMap && this.displacementMap.isTexture && (i.displacementMap = this.displacementMap.toJSON(e).uuid, i.displacementScale = this.displacementScale, i.displacementBias = this.displacementBias), this.roughnessMap && this.roughnessMap.isTexture && (i.roughnessMap = this.roughnessMap.toJSON(e).uuid), this.metalnessMap && this.metalnessMap.isTexture && (i.metalnessMap = this.metalnessMap.toJSON(e).uuid), this.emissiveMap && this.emissiveMap.isTexture && (i.emissiveMap = this.emissiveMap.toJSON(e).uuid), this.specularMap && this.specularMap.isTexture && (i.specularMap = this.specularMap.toJSON(e).uuid), this.envMap && this.envMap.isTexture && (i.envMap = this.envMap.toJSON(e).uuid, i.reflectivity = this.reflectivity), this.gradientMap && this.gradientMap.isTexture && (i.gradientMap = this.gradientMap.toJSON(e).uuid), void 0 !== this.size && (i.size = this.size), void 0 !== this.sizeAttenuation && (i.sizeAttenuation = this.sizeAttenuation), this.blending !== W && (i.blending = this.blending), !0 === this.flatShading && (i.flatShading = this.flatShading), this.side !== I && (i.side = this.side), this.vertexColors !== Ce && (i.vertexColors = this.vertexColors), this.opacity < 1 && (i.opacity = this.opacity), !0 === this.transparent && (i.transparent = this.transparent), i.depthFunc = this.depthFunc, i.depthTest = this.depthTest, i.depthWrite = this.depthWrite, !0 === this.dithering && (i.dithering = !0), 0 < this.alphaTest && (i.alphaTest = this.alphaTest), !0 === this.premultipliedAlpha && (i.premultipliedAlpha = this.premultipliedAlpha), !0 === this.wireframe && (i.wireframe = this.wireframe), 1 < this.wireframeLinewidth && (i.wireframeLinewidth = this.wireframeLinewidth), "round" !== this.wireframeLinecap && (i.wireframeLinecap = this.wireframeLinecap), "round" !== this.wireframeLinejoin && (i.wireframeLinejoin = this.wireframeLinejoin), !0 === this.morphTargets && (i.morphTargets = !0), !0 === this.skinning && (i.skinning = !0), !1 === this.visible && (i.visible = !1), "{}" !== JSON.stringify(this.userData) && (i.userData = this.userData), t) { 6490 var r = n(e.textures), 6491 o = n(e.images); 6492 0 < r.length && (i.textures = r), 0 < o.length && (i.images = o) 6493 } 6494 return i 6495 }, 6496 clone: function() { 6497 return (new this.constructor).copy(this) 6498 }, 6499 copy: function(e) { 6500 this.name = e.name, this.fog = e.fog, this.lights = e.lights, this.blending = e.blending, this.side = e.side, this.flatShading = e.flatShading, 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.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.premultipliedAlpha = e.premultipliedAlpha, this.overdraw = e.overdraw, this.visible = e.visible, this.userData = JSON.parse(JSON.stringify(e.userData)), this.clipShadows = e.clipShadows, this.clipIntersection = e.clipIntersection; 6501 var t = e.clippingPlanes, 6502 i = null; 6503 if (null !== t) { 6504 var n = t.length; 6505 i = new Array(n); 6506 for (var r = 0; r !== n; ++r) i[r] = t[r].clone() 6507 } 6508 return this.clippingPlanes = i, this 6509 }, 6510 dispose: function() { 6511 this.dispatchEvent({ 6512 type: "dispose" 6513 }) 6514 } 6515 }), ((nn.prototype = Object.create(tn.prototype)).constructor = nn).prototype.isShaderMaterial = !0, nn.prototype.copy = function(e) { 6516 return tn.prototype.copy.call(this, e), this.fragmentShader = e.fragmentShader, this.vertexShader = e.vertexShader, this.uniforms = Ai.clone(e.uniforms), this.defines = e.defines, this.wireframe = e.wireframe, this.wireframeLinewidth = e.wireframeLinewidth, this.lights = e.lights, this.clipping = e.clipping, this.skinning = e.skinning, this.morphTargets = e.morphTargets, this.morphNormals = e.morphNormals, this.extensions = e.extensions, this 6517 }, nn.prototype.toJSON = function(e) { 6518 var t = tn.prototype.toJSON.call(this, e); 6519 return t.uniforms = this.uniforms, t.vertexShader = this.vertexShader, t.fragmentShader = this.fragmentShader, t 6520 }, ((rn.prototype = Object.create(tn.prototype)).constructor = rn).prototype.isMeshDepthMaterial = !0, rn.prototype.copy = function(e) { 6521 return tn.prototype.copy.call(this, e), this.depthPacking = e.depthPacking, this.skinning = e.skinning, this.morphTargets = e.morphTargets, 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 6522 }, ((on.prototype = Object.create(tn.prototype)).constructor = on).prototype.isMeshDistanceMaterial = !0, on.prototype.copy = function(e) { 6523 return tn.prototype.copy.call(this, e), this.referencePosition.copy(e.referencePosition), this.nearDistance = e.nearDistance, this.farDistance = e.farDistance, this.skinning = e.skinning, this.morphTargets = e.morphTargets, this.map = e.map, this.alphaMap = e.alphaMap, this.displacementMap = e.displacementMap, this.displacementScale = e.displacementScale, this.displacementBias = e.displacementBias, this 6524 }, Object.assign(an.prototype, { 6525 isBox3: !0, 6526 set: function(e, t) { 6527 return this.min.copy(e), this.max.copy(t), this 6528 }, 6529 setFromArray: function(e) { 6530 for (var t = 1 / 0, i = 1 / 0, n = 1 / 0, r = -1 / 0, o = -1 / 0, a = -1 / 0, s = 0, l = e.length; s < l; s += 3) { 6531 var c = e[s], 6532 u = e[s + 1], 6533 h = e[s + 2]; 6534 c < t && (t = c), u < i && (i = u), h < n && (n = h), r < c && (r = c), o < u && (o = u), a < h && (a = h) 6535 } 6536 return this.min.set(t, i, n), this.max.set(r, o, a), this 6537 }, 6538 setFromBufferAttribute: function(e) { 6539 for (var t = 1 / 0, i = 1 / 0, n = 1 / 0, r = -1 / 0, o = -1 / 0, a = -1 / 0, s = 0, l = e.count; s < l; s++) { 6540 var c = e.getX(s), 6541 u = e.getY(s), 6542 h = e.getZ(s); 6543 c < t && (t = c), u < i && (i = u), h < n && (n = h), r < c && (r = c), o < u && (o = u), a < h && (a = h) 6544 } 6545 return this.min.set(t, i, n), this.max.set(r, o, a), this 6546 }, 6547 setFromPoints: function(e) { 6548 this.makeEmpty(); 6549 for (var t = 0, i = e.length; t < i; t++) this.expandByPoint(e[t]); 6550 return this 6551 }, 6552 setFromCenterAndSize: (Bi = new Dt, function(e, t) { 6553 var i = Bi.copy(t).multiplyScalar(.5); 6554 return this.min.copy(e).sub(i), this.max.copy(e).add(i), this 6555 }), 6556 setFromObject: function(e) { 6557 return this.makeEmpty(), this.expandByObject(e) 6558 }, 6559 clone: function() { 6560 return (new this.constructor).copy(this) 6561 }, 6562 copy: function(e) { 6563 return this.min.copy(e.min), this.max.copy(e.max), this 6564 }, 6565 makeEmpty: function() { 6566 return this.min.x = this.min.y = this.min.z = 1 / 0, this.max.x = this.max.y = this.max.z = -1 / 0, this 6567 }, 6568 isEmpty: function() { 6569 return this.max.x < this.min.x || this.max.y < this.min.y || this.max.z < this.min.z 6570 }, 6571 getCenter: function(e) { 6572 var t = e || new Dt; 6573 return this.isEmpty() ? t.set(0, 0, 0) : t.addVectors(this.min, this.max).multiplyScalar(.5) 6574 }, 6575 getSize: function(e) { 6576 var t = e || new Dt; 6577 return this.isEmpty() ? t.set(0, 0, 0) : t.subVectors(this.max, this.min) 6578 }, 6579 expandByPoint: function(e) { 6580 return this.min.min(e), this.max.max(e), this 6581 }, 6582 expandByVector: function(e) { 6583 return this.min.sub(e), this.max.add(e), this 6584 }, 6585 expandByScalar: function(e) { 6586 return this.min.addScalar(-e), this.max.addScalar(e), this 6587 }, 6588 expandByObject: (Ui = new Dt, function(e) { 6589 var a = this; 6590 return e.updateMatrixWorld(!0), e.traverse(function(e) { 6591 var t, i, n = e.geometry; 6592 if (void 0 !== n) 6593 if (n.isGeometry) { 6594 var r = n.vertices; 6595 for (t = 0, i = r.length; t < i;
6595 t++) Ui.copy(r[t]), Ui.applyMatrix4(e.matrixWorld), a.expandByPoint(Ui) 6596 } else if (n.isBufferGeometry) { 6597 var o = n.attributes.position; 6598 if (void 0 !== o) 6599 for (t = 0, i = o.count; t < i; t++) Ui.fromBufferAttribute(o, t).applyMatrix4(e.matrixWorld), a.expandByPoint(Ui) 6600 } 6601 }), this 6602 }), 6603 containsPoint: function(e) { 6604 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) 6605 }, 6606 containsBox: function(e) { 6607 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 6608 }, 6609 getParameter: function(e, t) { 6610 return (t || new Dt).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)) 6611 }, 6612 intersectsBox: function(e) { 6613 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) 6614 }, 6615 intersectsSphere: (Fi = new Dt, function(e) { 6616 return this.clampPoint(e.center, Fi), Fi.distanceToSquared(e.center) <= e.radius * e.radius 6617 }), 6618 intersectsPlane: function(e) { 6619 var t, i; 6620 return 0 < e.normal.x ? (t = e.normal.x * this.min.x, i = e.normal.x * this.max.x) : (t = e.normal.x * this.max.x, i = e.normal.x * this.min.x), 0 < e.normal.y ? (t += e.normal.y * this.min.y, i += e.normal.y * this.max.y) : (t += e.normal.y * this.max.y, i += e.normal.y * this.min.y), 0 < e.normal.z ? (t += e.normal.z * this.min.z, i += e.normal.z * this.max.z) : (t += e.normal.z * this.max.z, i += e.normal.z * this.min.z), t <= e.constant && i >= e.constant 6621 }, 6622 clampPoint: function(e, t) { 6623 return (t || new Dt).copy(e).clamp(this.min, this.max) 6624 }, 6625 distanceToPoint: (Ni = new Dt, function(e) { 6626 return Ni.copy(e).clamp(this.min, this.max).sub(e).length() 6627 }), 6628 getBoundingSphere: (zi = new Dt, function(e) { 6629 var t = e || new sn;
vendor: 16,791 bytes, lines 6630-7010
6630 return this.getCenter(t.center), t.radius = .5 * this.getSize(zi).length(), t 6631 }), 6632 intersect: function(e) { 6633 return this.min.max(e.min), this.max.min(e.max), this.isEmpty() && this.makeEmpty(), this 6634 }, 6635 union: function(e) { 6636 return this.min.min(e.min), this.max.max(e.max), this 6637 }, 6638 applyMatrix4: (Ii = [new Dt, new Dt, new Dt, new Dt, new Dt, new Dt, new Dt, new Dt], function(e) { 6639 return this.isEmpty() || (Ii[0].set(this.min.x, this.min.y, this.min.z).applyMatrix4(e), Ii[1].set(this.min.x, this.min.y, this.max.z).applyMatrix4(e), Ii[2].set(this.min.x, this.max.y, this.min.z).applyMatrix4(e), Ii[3].set(this.min.x, this.max.y, this.max.z).applyMatrix4(e), Ii[4].set(this.max.x, this.min.y, this.min.z).applyMatrix4(e), Ii[5].set(this.max.x, this.min.y, this.max.z).applyMatrix4(e), Ii[6].set(this.max.x, this.max.y, this.min.z).applyMatrix4(e), Ii[7].set(this.max.x, this.max.y, this.max.z).applyMatrix4(e), this.setFromPoints(Ii)), this 6640 }), 6641 translate: function(e) { 6642 return this.min.add(e), this.max.add(e), this 6643 }, 6644 equals: function(e) { 6645 return e.min.equals(this.min) && e.max.equals(this.max) 6646 } 6647 }), Object.assign(sn.prototype, { 6648 set: function(e, t) { 6649 return this.center.copy(e), this.radius = t, this 6650 }, 6651 setFromPoints: (Hi = new an, function(e, t) { 6652 var i = this.center; 6653 void 0 !== t ? i.copy(t) : Hi.setFromPoints(e).getCenter(i); 6654 for (var n = 0, r = 0, o = e.length; r < o; r++) n = Math.max(n, i.distanceToSquared(e[r])); 6655 return this.radius = Math.sqrt(n), this 6656 }), 6657 clone: function() { 6658 return (new this.constructor).copy(this) 6659 }, 6660 copy: function(e) { 6661 return this.center.copy(e.center), this.radius = e.radius, this 6662 }, 6663 empty: function() { 6664 return this.radius <= 0 6665 }, 6666 containsPoint: function(e) { 6667 return e.distanceToSquared(this.center) <= this.radius * this.radius 6668 }, 6669 distanceToPoint: function(e) { 6670 return e.distanceTo(this.center) - this.radius 6671 }, 6672 intersectsSphere: function(e) { 6673 var t = this.radius + e.radius; 6674 return e.center.distanceToSquared(this.center) <= t * t 6675 }, 6676 intersectsBox: function(e) { 6677 return e.intersectsSphere(this) 6678 }, 6679 intersectsPlane: function(e) { 6680 return Math.abs(e.distanceToPoint(this.center)) <= this.radius 6681 }, 6682 clampPoint: function(e, t) { 6683 var i = this.center.distanceToSquared(e), 6684 n = t || new Dt; 6685 return n.copy(e), i > this.radius * this.radius && (n.sub(this.center).normalize(), n.multiplyScalar(this.radius).add(this.center)), n 6686 }, 6687 getBoundingBox: function(e) { 6688 var t = e || new an; 6689 return t.set(this.center, this.center), t.expandByScalar(this.radius), t 6690 }, 6691 applyMatrix4: function(e) { 6692 return this.center.applyMatrix4(e), this.radius = this.radius * e.getMaxScaleOnAxis(), this 6693 }, 6694 translate: function(e) { 6695 return this.center.add(e), this 6696 }, 6697 equals: function(e) { 6698 return e.center.equals(this.center) && e.radius === this.radius 6699 } 6700 }), Object.assign(ln.prototype, { 6701 isMatrix3: !0, 6702 set: function(e, t, i, n, r, o, a, s, l) { 6703 var c = this.elements; 6704 return c[0] = e, c[1] = n, c[2] = a, c[3] = t, c[4] = r, c[5] = s, c[6] = i, c[7] = o, c[8] = l, this 6705 }, 6706 identity: function() { 6707 return this.set(1, 0, 0, 0, 1, 0, 0, 0, 1), this 6708 }, 6709 clone: function() { 6710 return (new this.constructor).fromArray(this.elements) 6711 }, 6712 copy: function(e) { 6713 var t = this.elements, 6714 i = e.elements; 6715 return t[0] = i[0], t[1] = i[1], t[2] = i[2], t[3] = i[3], t[4] = i[4], t[5] = i[5], t[6] = i[6], t[7] = i[7], t[8] = i[8], this 6716 }, 6717 setFromMatrix4: function(e) { 6718 var t = e.elements; 6719 return this.set(t[0], t[4], t[8], t[1], t[5], t[9], t[2], t[6], t[10]), this 6720 }, 6721 applyToBufferAttribute: ($i = new Dt, function(e) { 6722 for (var t = 0, i = e.count; t < i; t++) $i.x = e.getX(t), $i.y = e.getY(t), $i.z = e.getZ(t), $i.applyMatrix3(this), e.setXYZ(t, $i.x, $i.y, $i.z); 6723 return e 6724 }), 6725 multiply: function(e) { 6726 return this.multiplyMatrices(this, e) 6727 }, 6728 premultiply: function(e) { 6729 return this.multiplyMatrices(e, this) 6730 }, 6731 multiplyMatrices: function(e, t) { 6732 var i = e.elements, 6733 n = t.elements, 6734 r = this.elements, 6735 o = i[0], 6736 a = i[3], 6737 s = i[6], 6738 l = i[1], 6739 c = i[4], 6740 u = i[7], 6741 h = i[2], 6742 d = i[5], 6743 p = i[8], 6744 f = n[0], 6745 m = n[3], 6746 g = n[6], 6747 v = n[1], 6748 y = n[4], 6749 b = n[7], 6750 w = n[2], 6751 x = n[5], 6752 _ = n[8]; 6753 return r[0] = o * f + a * v + s * w, r[3] = o * m + a * y + s * x, r[6] = o * g + a * b + s * _, r[1] = l * f + c * v + u * w, r[4] = l * m + c * y + u * x, r[7] = l * g + c * b + u * _, r[2] = h * f + d * v + p * w, r[5] = h * m + d * y + p * x, r[8] = h * g + d * b + p * _, this 6754 }, 6755 multiplyScalar: function(e) { 6756 var t = this.elements; 6757 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 6758 }, 6759 determinant: function() { 6760 var e = this.elements, 6761 t = e[0], 6762 i = e[1], 6763 n = e[2], 6764 r = e[3], 6765 o = e[4], 6766 a = e[5], 6767 s = e[6], 6768 l = e[7], 6769 c = e[8]; 6770 return t * o * c - t * a * l - i * r * c + i * a * s + n * r * l - n * o * s 6771 }, 6772 getInverse: function(e, t) { 6773 e && e.isMatrix4 && console.error("THREE.Matrix3: .getInverse() no longer takes a Matrix4 argument."); 6774 var i = e.elements, 6775 n = this.elements, 6776 r = i[0], 6777 o = i[1], 6778 a = i[2], 6779 s = i[3], 6780 l = i[4], 6781 c = i[5], 6782 u = i[6], 6783 h = i[7], 6784 d = i[8], 6785 p = d * l - c * h, 6786 f = c * u - d * s, 6787 m = h * s - l * u, 6788 g = r * p + o * f + a * m; 6789 if (0 === g) { 6790 var v = "THREE.Matrix3: .getInverse() can't invert matrix, determinant is 0"; 6791 if (!0 === t) throw new Error(v); 6792 return console.warn(v), this.identity() 6793 } 6794 var y = 1 / g; 6795 return n[0] = p * y, n[1] = (a * h - d * o) * y, n[2] = (c * o - a * l) * y, n[3] = f * y, n[4] = (d * r - a * u) * y, n[5] = (a * s - c * r) * y, n[6] = m * y, n[7] = (o * u - h * r) * y, n[8] = (l * r - o * s) * y, this 6796 }, 6797 transpose: function() { 6798 var e, t = this.elements; 6799 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 6800 }, 6801 getNormalMatrix: function(e) { 6802 return this.setFromMatrix4(e).getInverse(this).transpose() 6803 }, 6804 transposeIntoArray: function(e) { 6805 var t = this.elements; 6806 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 6807 }, 6808 equals: function(e) { 6809 for (var t = this.elements, i = e.elements, n = 0; n < 9; n++) 6810 if (t[n] !== i[n]) return !1; 6811 return !0 6812 }, 6813 fromArray: function(e, t) { 6814 void 0 === t && (t = 0); 6815 for (var i = 0; i < 9; i++) this.elements[i] = e[i + t]; 6816 return this 6817 }, 6818 toArray: function(e, t) { 6819 void 0 === e && (e = []), void 0 === t && (t = 0); 6820 var i = this.elements; 6821 return e[t] = i[0], e[t + 1] = i[1], e[t + 2] = i[2], e[t + 3] = i[3], e[t + 4] = i[4], e[t + 5] = i[5], e[t + 6] = i[6], e[t + 7] = i[7], e[t + 8] = i[8], e 6822 } 6823 }), Object.assign(cn.prototype, { 6824 set: function(e, t) { 6825 return this.normal.copy(e), this.constant = t, this 6826 }, 6827 setComponents: function(e, t, i, n) { 6828 return this.normal.set(e, t, i), this.constant = n, this 6829 }, 6830 setFromNormalAndCoplanarPoint: function(e, t) { 6831 return this.normal.copy(e), this.constant = -t.dot(this.normal), this 6832 }, 6833 setFromCoplanarPoints: (Wi = new Dt, qi = new Dt, function(e, t, i) { 6834 var n = Wi.subVectors(i, t).cross(qi.subVectors(e, t)).normalize(); 6835 return this.setFromNormalAndCoplanarPoint(n, e), this 6836 }), 6837 clone: function() { 6838 return (new this.constructor).copy(this) 6839 }, 6840 copy: function(e) { 6841 return this.normal.copy(e.normal), this.constant = e.constant, this 6842 }, 6843 normalize: function() { 6844 var e = 1 / this.normal.length(); 6845 return this.normal.multiplyScalar(e), this.constant *= e, this 6846 }, 6847 negate: function() { 6848 return this.constant *= -1, this.normal.negate(), this 6849 }, 6850 distanceToPoint: function(e) { 6851 return this.normal.dot(e) + this.constant 6852 }, 6853 distanceToSphere: function(e) { 6854 return this.distanceToPoint(e.center) - e.radius 6855 }, 6856 projectPoint: function(e, t) { 6857 return (t || new Dt).copy(this.normal).multiplyScalar(-this.distanceToPoint(e)).add(e) 6858 }, 6859 intersectLine: (Vi = new Dt, function(e, t) { 6860 var i = t || new Dt, 6861 n = e.delta(Vi), 6862 r = this.normal.dot(n); 6863 if (0 === r) return 0 === this.distanceToPoint(e.start) ? i.copy(e.start) : void 0; 6864 var o = -(e.start.dot(this.normal) + this.constant) / r; 6865 return o < 0 || 1 < o ? void 0 : i.copy(n).multiplyScalar(o).add(e.start) 6866 }), 6867 intersectsLine: function(e) { 6868 var t = this.distanceToPoint(e.start), 6869 i = this.distanceToPoint(e.end); 6870 return t < 0 && 0 < i || i < 0 && 0 < t 6871 }, 6872 intersectsBox: function(e) { 6873 return e.intersectsPlane(this) 6874 }, 6875 intersectsSphere: function(e) { 6876 return e.intersectsPlane(this) 6877 }, 6878 coplanarPoint: function(e) { 6879 return (e || new Dt).copy(this.normal).multiplyScalar(-this.constant) 6880 }, 6881 applyMatrix4: (ji = new Dt, Gi = new ln, function(e, t) { 6882 var i = t || Gi.getNormalMatrix(e), 6883 n = this.coplanarPoint(ji).applyMatrix4(e), 6884 r = this.normal.applyMatrix3(i).normalize(); 6885 return this.constant = -n.dot(r), this 6886 }), 6887 translate: function(e) { 6888 return this.constant -= e.dot(this.normal), this 6889 }, 6890 equals: function(e) { 6891 return e.normal.equals(this.normal) && e.constant === this.constant 6892 } 6893 }), Object.assign(un.prototype, { 6894 set: function(e, t, i, n, r, o) { 6895 var a = this.planes; 6896 return a[0].copy(e), a[1].copy(t), a[2].copy(i), a[3].copy(n), a[4].copy(r), a[5].copy(o), this 6897 }, 6898 clone: function() { 6899 return (new this.constructor).copy(this) 6900 }, 6901 copy: function(e) { 6902 for (var t = this.planes, i = 0; i < 6; i++) t[i].copy(e.planes[i]); 6903 return this 6904 }, 6905 setFromMatrix: function(e) { 6906 var t = this.planes, 6907 i = e.elements, 6908 n = i[0], 6909 r = i[1], 6910 o = i[2], 6911 a = i[3], 6912 s = i[4], 6913 l = i[5], 6914 c = i[6], 6915 u = i[7], 6916 h = i[8], 6917 d = i[9], 6918 p = i[10], 6919 f = i[11], 6920 m = i[12], 6921 g = i[13], 6922 v = i[14], 6923 y = i[15]; 6924 return t[0].setComponents(a - n, u - s, f - h, y - m).normalize(), t[1].setComponents(a + n, u + s, f + h, y + m).normalize(), t[2].setComponents(a + r, u + l, f + d, y + g).normalize(), t[3].setComponents(a - r, u - l, f - d, y - g).normalize(), t[4].setComponents(a - o, u - c, f - p, y - v).normalize(), t[5].setComponents(a + o, u + c, f + p, y + v).normalize(), this 6925 }, 6926 intersectsObject: (Qi = new sn, function(e) { 6927 var t = e.geometry; 6928 return null === t.boundingSphere && t.computeBoundingSphere(), Qi.copy(t.boundingSphere).applyMatrix4(e.matrixWorld), this.intersectsSphere(Qi) 6929 }), 6930 intersectsSprite: (Zi = new sn, function(e) { 6931 return Zi.center.set(0, 0, 0), Zi.radius = .7071067811865476, Zi.applyMatrix4(e.matrixWorld), this.intersectsSphere(Zi) 6932 }), 6933 intersectsSphere: function(e) { 6934 for (var t = this.planes, i = e.center, n = -e.radius, r = 0; r < 6; r++) { 6935 if (t[r].distanceToPoint(i) < n) return !1 6936 } 6937 return !0 6938 }, 6939 intersectsBox: (Xi = new Dt, Yi = new Dt, function(e) { 6940 for (var t = this.planes, i = 0; i < 6; i++) { 6941 var n = t[i]; 6942 Xi.x = 0 < n.normal.x ? e.min.x : e.max.x, Yi.x = 0 < n.normal.x ? e.max.x : e.min.x, Xi.y = 0 < n.normal.y ? e.min.y : e.max.y, Yi.y = 0 < n.normal.y ? e.max.y : e.min.y, Xi.z = 0 < n.normal.z ? e.min.z : e.max.z, Yi.z = 0 < n.normal.z ? e.max.z : e.min.z; 6943 var r = n.distanceToPoint(Xi), 6944 o = n.distanceToPoint(Yi); 6945 if (r < 0 && o < 0) return !1 6946 } 6947 return !0 6948 }), 6949 containsPoint: function(e) { 6950 for (var t = this.planes, i = 0; i < 6; i++) 6951 if (t[i].distanceToPoint(e) < 0) return !1; 6952 return !0 6953 } 6954 }), pn.RotationOrders = ["XYZ", "YZX", "ZXY", "XZY", "YXZ", "ZYX"], pn.DefaultOrder = "XYZ", Object.defineProperties(pn.prototype, { 6955 x: { 6956 get: function() { 6957 return this._x 6958 }, 6959 set: function(e) { 6960 this._x = e, this.onChangeCallback() 6961 } 6962 }, 6963 y: { 6964 get: function() { 6965 return this._y 6966 }, 6967 set: function(e) { 6968 this._y = e, this.onChangeCallback() 6969 } 6970 }, 6971 z: { 6972 get: function() { 6973 return this._z 6974 }, 6975 set: function(e) { 6976 this._z = e, this.onChangeCallback() 6977 } 6978 }, 6979 order: { 6980 get: function() { 6981 return this._order 6982 }, 6983 set: function(e) { 6984 this._order = e, this.onChangeCallback() 6985 } 6986 } 6987 }), Object.assign(pn.prototype, { 6988 isEuler: !0, 6989 set: function(e, t, i, n) { 6990 return this._x = e, this._y = t, this._z = i, this._order = n || this._order, this.onChangeCallback(), this 6991 }, 6992 clone: function() { 6993 return new this.constructor(this._x, this._y, this._z, this._order) 6994 }, 6995 copy: function(e) { 6996 return this._x = e._x, this._y = e._y, this._z = e._z, this._order = e._order, this.onChangeCallback(), this 6997 }, 6998 setFromRotationMatrix: function(e, t, i) { 6999 var n = st.clamp, 7000 r = e.elements, 7001 o = r[0], 7002 a = r[4], 7003 s = r[8], 7004 l = r[1], 7005 c = r[5], 7006 u = r[9], 7007 h = r[2], 7008 d = r[6], 7009 p = r[10]; 7010 return "XYZ" === (t = t || this._order) ? (this._y = Math.asin(n(s, -1, 1)), Math.abs(s) < .99999 ? (this._x = Math.atan2(-u, p), this._z = Math.atan2(-a, o)) : (this._x = Math.atan2(d, c), this._z = 0)) : "YXZ" === t ? (this._x = Math.asin(-n(u, -1, 1)), Math.abs(u) < .99999 ? (this._y = Math.atan2(s, p), this._z = Math.atan2(l, c)) : (this._y = Math.atan2(-h, o), this._z = 0)) : "ZXY" === t ? (this._x = Math.asin(n(d, -1, 1)), Math.abs(d) < .99999 ? (this._y = Math.atan2(-h, p), this._z = Math.atan2(-a, c
vendor: 4,937 bytes, lines 7010-7108
7010)) : (this._y = 0, this._z = Math.atan2(l, o))) : "ZYX" === t ? (this._y = Math.asin(-n(h, -1, 1)), Math.abs(h) < .99999 ? (this._x = Math.atan2(d, p), this._z = Math.atan2(l, o)) : (this._x = 0, this._z = Math.atan2(-a, c))) : "YZX" === t ? (this._z = Math.asin(n(l, -1, 1)), Math.abs(l) < .99999 ? (this._x = Math.atan2(-u, c), this._y = Math.atan2(-h, o)) : (this._x = 0, this._y = Math.atan2(s, p))) : "XZY" === t ? (this._z = Math.asin(-n(a, -1, 1)), Math.abs(a) < .99999 ? (this._x = Math.atan2(d, c), this._y = Math.atan2(s, o)) : (this._x = Math.atan2(-u, p), this._y = 0)) : console.warn("THREE.Euler: .setFromRotationMatrix() given unsupported order: " + t), this._order = t, !1 !== i && this.onChangeCallback(), this 7011 }, 7012 setFromQuaternion: (Ki = new It, function(e, t, i) { 7013 return Ki.makeRotationFromQuaternion(e), this.setFromRotationMatrix(Ki, t, i) 7014 }), 7015 setFromVector3: function(e, t) { 7016 return this.set(e.x, e.y, e.z, t || this._order) 7017 }, 7018 reorder: (Ji = new Ot, function(e) { 7019 return Ji.setFromEuler(this), this.setFromQuaternion(Ji, e) 7020 }), 7021 equals: function(e) { 7022 return e._x === this._x && e._y === this._y && e._z === this._z && e._order === this._order 7023 }, 7024 fromArray: function(e) { 7025 return this._x = e[0], this._y = e[1], this._z = e[2], void 0 !== e[3] && (this._order = e[3]), this.onChangeCallback(), this 7026 }, 7027 toArray: function(e, t) { 7028 return void 0 === e && (e = []), void 0 === t && (t = 0), e[t] = this._x, e[t + 1] = this._y, e[t + 2] = this._z, e[t + 3] = this._order, e 7029 }, 7030 toVector3: function(e) { 7031 return e ? e.set(this._x, this._y, this._z) : new Dt(this._x, this._y, this._z) 7032 }, 7033 onChange: function(e) { 7034 return this.onChangeCallback = e, this 7035 }, 7036 onChangeCallback: function() {} 7037 }), Object.assign(fn.prototype, { 7038 set: function(e) { 7039 this.mask = 1 << e | 0 7040 }, 7041 enable: function(e) { 7042 this.mask |= 1 << e | 0 7043 }, 7044 toggle: function(e) { 7045 this.mask ^= 1 << e | 0 7046 }, 7047 disable: function(e) { 7048 this.mask &= ~(1 << e | 0) 7049 }, 7050 test: function(e) { 7051 return 0 != (this.mask & e.mask) 7052 } 7053 }); 7054 var mn, gn, vn, yn, bn, wn, xn, _n, Tn, En, Mn, Sn, Cn, An, Rn, Ln, Pn, kn = 0; 7055 7056 function On() { 7057 Object.defineProperty(this, "id", { 7058 value: kn++ 7059 }), this.uuid = st.generateUUID(), this.name = "", this.type = "Object3D", this.parent = null, this.children = [], this.up = On.DefaultUp.clone(); 7060 var e = new Dt, 7061 t = new pn, 7062 i = new Ot, 7063 n = new Dt(1, 1, 1); 7064 t.onChange(function() { 7065 i.setFromEuler(t, !1) 7066 }), i.onChange(function() { 7067 t.setFromQuaternion(i, void 0, !1) 7068 }), Object.defineProperties(this, { 7069 position: { 7070 enumerable: !0, 7071 value: e 7072 }, 7073 rotation: { 7074 enumerable: !0, 7075 value: t 7076 }, 7077 quaternion: { 7078 enumerable: !0, 7079 value: i 7080 }, 7081 scale: { 7082 enumerable: !0, 7083 value: n 7084 }, 7085 modelViewMatrix: { 7086 value: new It 7087 }, 7088 normalMatrix: { 7089 value: new ln 7090 } 7091 }), this.matrix = new It, this.matrixWorld = new It, this.matrixAutoUpdate = On.DefaultMatrixAutoUpdate, this.matrixWorldNeedsUpdate = !1, this.layers = new fn, this.visible = !0, this.castShadow = !1, this.receiveShadow = !1, this.frustumCulled = !0, this.renderOrder = 0, this.userData = {} 7092 } 7093 7094 function Dn() { 7095 On.call(this), this.type = "Camera", this.matrixWorldInverse = new It, this.projectionMatrix = new It 7096 } 7097 7098 function In(e, t, i, n, r, o) { 7099 Dn.call(this), this.type = "OrthographicCamera", this.zoom = 1, this.view = null, this.left = e, this.right = t, this.top = i, this.bottom = n, this.near = void 0 !== r ? r : .1, this.far = void 0 !== o ? o : 2e3, this.updateProjectionMatrix() 7100 } 7101 7102 function zn(e, t, i, n) { 7103 Dn.call(this), this.type = "PerspectiveCamera", this.fov = void 0 !== e ? e : 50, this.zoom = 1, this.near = void 0 !== i ? i : .1, this.far = void 0 !== n ? n : 2e3, this.focus = 10, this.aspect = void 0 !== t ? t : 1, this.view = null, this.filmGauge = 35, this.filmOffset = 0, this.updateProjectionMatrix() 7104 } 7105 7106 function Nn(e, t, i, n, r, o) { 7107 this.a = e, this.b = t, this.c = i, this.normal = n && n.isVector3 ? n : new Dt, this.vertexNormals = Array.isArray(n) ? n : [], this.color = r && r.isColor ? r : new Ei, this.vertexColors = Array.isArray(r) ? r : [], this.materialIndex = void 0 !== o ? o : 0 7108 }
7109 On.DefaultUp = new Dt(0, 1, 0), On.DefaultMatrixAutoUpdate = !0, Object.assign(On.prototype, t.prototype, { 7110 isObject3D: !0, 7111 onBeforeRender: function() {}, 7112 onAfterRender: function() {}, 7113 applyMatrix: function(e) { 7114 this.matrix.multiplyMatrices(e, this.matrix), this.matrix.decompose(this.position, this.quaternion, this.scale) 7115 }, 7116 applyQuaternion: function(e) { 7117 return this.quaternion.premultiply(e), this 7118 }, 7119 setRotationFromAxisAngle: function(e, t) { 7120 this.quaternion.setFromAxisAngle(e, t) 7121 }, 7122 setRotationFromEuler: function(e) { 7123 this.quaternion.setFromEuler(e, !0) 7124 }, 7125 setRotationFromMatrix: function(e) { 7126 this.quaternion.setFromRotationMatrix(e) 7127 }, 7128 setRotationFromQuaternion: function(e) { 7129 this.quaternion.copy(e) 7130 }, 7131 rotateOnAxis: (Ln = new Ot, function(e, t) { 7132 return Ln.setFromAxisAngle(e, t), this.quaternion.multiply(Ln), this 7133 }), 7134 rotateX: (Rn = new Dt(1, 0, 0), function(e) { 7135 return this.rotateOnAxis(Rn, e) 7136 }), 7137 rotateY: (An = new Dt(0, 1, 0), function(e) { 7138 return this.rotateOnAxis(An, e) 7139 }), 7140 rotateZ: (Cn = new Dt(0, 0, 1), function(e) { 7141 return this.rotateOnAxis(Cn, e) 7142 }), 7143 translateOnAxis: (Sn = new Dt, function(e, t) { 7144 return Sn.copy(e).applyQuaternion(this.quaternion), this.position.add(Sn.multiplyScalar(t)), this 7145 }), 7146 translateX: (Mn = new Dt(1, 0, 0), function(e) { 7147 return this.translateOnAxis(Mn, e) 7148 }), 7149 translateY: (En = new Dt(0, 1, 0), function(e) { 7150 return this.translateOnAxis(En, e) 7151 }), 7152 translateZ: (Tn = new Dt(0, 0, 1), function(e) { 7153 return this.translateOnAxis(Tn, e) 7154 }), 7155 localToWorld: function(e) { 7156 return e.applyMatrix4(this.matrixWorld) 7157 }, 7158 worldToLocal: (_n = new It, function(e) { 7159 return e.applyMatrix4(_n.getInverse(this.matrixWorld)) 7160 }), 7161 lookAt: (xn = new It, function(e) { 7162 this.isCamera ? xn.lookAt(this.position, e, this.up) : xn.lookAt(e, this.position, this.up), this.quaternion.setFromRotationMatrix(xn) 7163 }), 7164 add: function(e) { 7165 if (1 < arguments.length) { 7166 for (var t = 0; t < arguments.length; t++) this.add(arguments[t]); 7167 return this 7168 } 7169 return e === this ? console.error("THREE.Object3D.add: object can't be added as a child of itself.", e) : e && e.isObject3D ? (null !== e.parent && e.parent.remove(e), e.parent = this, e.dispatchEvent({ 7170 type: "added" 7171 }), this.children.push(e)) : console.error("THREE.Object3D.add: object not an instance of THREE.Object3D.", e), this 7172 }, 7173 remove: function(e) { 7174 if (1 < arguments.length) { 7175 for (var t = 0; t < arguments.length; t++) this.remove(arguments[t]); 7176 return this 7177 } 7178 var i = this.children.indexOf(e); 7179 return -1 !== i && (e.parent = null, e.dispatchEvent({ 7180 type: "removed" 7181 }), this.children.splice(i, 1)), this 7182 }, 7183 getObjectById: function(e) { 7184 return this.getObjectByProperty("id", e) 7185 }, 7186 getObjectByName: function(e) { 7187 return this.getObjectByProperty("name", e) 7188 }, 7189 getObjectByProperty: function(e, t) { 7190 if (this[e] === t) return this; 7191 for (var i = 0, n = this.children.length; i < n; i++) { 7192 var r = this.children[i].getObjectByProperty(e, t); 7193 if (void 0 !== r) return r 7194 } 7195 }, 7196 getWorldPosition: function(e) { 7197 var t = e || new Dt; 7198 return this.updateMatrixWorld(!0), t.setFromMatrixPosition(this.matrixWorld) 7199 }, 7200 getWorldQuaternion: (bn = new Dt, wn = new Dt, function(e) { 7201 var t = e || new Ot; 7202 return this.updateMatrixWorld(!0), this.matrixWorld.decompose(bn, t, wn), t 7203 }), 7204 getWorldRotation: (yn = new Ot, function(e) { 7205 var t = e || new pn; 7206 return this.getWorldQuaternion(yn), t.setFromQuaternion(yn, this.rotation.order, !1) 7207 }), 7208 getWorldScale: (gn = new Dt, vn = new Ot, function(e) { 7209 var t = e || new Dt; 7210 return this.updateMatrixWorld(!0), this.matrixWorld.decompose(gn, vn, t), t 7211 }), 7212 getWorldDirection: (mn = new Ot, function(e) { 7213 var t = e || new Dt; 7214 return this.getWorldQuaternion(mn), t.set(0, 0, 1).applyQuaternion(mn) 7215 }), 7216 raycast: function() {}, 7217 traverse: function(e) { 7218 e(this); 7219 for (var t = this.children, i = 0, n = t.length; i < n; i++) t[i].traverse(e) 7220 }, 7221 traverseVisible: function(e) { 7222 if (!1 !== this.visible) { 7223 e(this); 7224 for (var t = this.children, i = 0, n = t.length; i < n; i++) t[i].traverseVisible(e) 7225 } 7226 }, 7227 traverseAncestors: function(e) { 7228 var t = this.parent; 7229 null !== t && (e(t), t.traverseAncestors(e)) 7230 }, 7231 updateMatrix: function() { 7232 this.matrix.compose(this.position, this.quaternion, this.scale), this.matrixWorldNeedsUpdate = !0 7233 }, 7234 updateMatrixWorld: function(e) { 7235 this.matrixAutoUpdate && this.updateMatrix(), (this.matrixWorldNeedsUpdate || e) && (null === this.parent ? this.matrixWorld.copy(this.matrix
7235) : this.matrixWorld.multiplyMatrices(this.parent.matrixWorld, this.matrix), e = !(this.matrixWorldNeedsUpdate = !1)); 7236 for (var t = this.children, i = 0, n = t.length; i < n; i++) t[i].updateMatrixWorld(e) 7237 }, 7238 toJSON: function(i) { 7239 var e = void 0 === i || "" === i, 7240 t = {}; 7241 e && (i = { 7242 geometries: {}, 7243 materials: {}, 7244 textures: {}, 7245 images: {} 7246 }, t.metadata = { 7247 version: 4.5, 7248 type: "Object", 7249 generator: "Object3D.toJSON" 7250 }); 7251 var n = {}; 7252 7253 function r(e, t) { 7254 return void 0 === e[t.uuid] && (e[t.uuid] = t.toJSON(i)), t.uuid 7255 } 7256 if (n.uuid = this.uuid, n.type = this.type, "" !== this.name && (n.name = this.name), !0 === this.castShadow && (n.castShadow = !0), !0 === this.receiveShadow && (n.receiveShadow = !0), !1 === this.visible && (n.visible = !1), "{}" !== JSON.stringify(this.userData) && (n.userData = this.userData), n.matrix = this.matrix.toArray(), void 0 !== this.geometry && (n.geometry = r(i.geometries, this.geometry)), void 0 !== this.material) 7257 if (Array.isArray(this.material)) { 7258 for (var o = [], a = 0, s = this.material.length; a < s; a++) o.push(r(i.materials, this.material[a])); 7259 n.material = o 7260 } else n.material = r(i.materials, this.material); 7261 if (0 < this.children.length) { 7262 n.children = []; 7263 for (a = 0; a < this.children.length; a++) n.children.push(this.children[a].toJSON(i).object) 7264 } 7265 if (e) { 7266 var l = d(i.geometries), 7267 c = d(i.materials), 7268 u = d(i.textures), 7269 h = d(i.images); 7270 0 < l.length && (t.geometries = l), 0 < c.length && (t.materials = c), 0 < u.length && (t.textures = u), 0 < h.length && (t.images = h) 7271 } 7272 return t.object = n, t; 7273 7274 function d(e) { 7275 var t = []; 7276 for (var i in e) { 7277 var n = e[i]; 7278 delete n.metadata, t.push(n) 7279 } 7280 return t 7281 } 7282 }, 7283 clone: function(e) { 7284 return (new this.constructor).copy(this, e) 7285 }, 7286 copy: function(e, t) { 7287 if (void 0 === t && (t = !0), this.name = e.name, this.up.copy(e.up), this.position.copy(e.position), 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.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.userData = JSON.parse(JSON.stringify(e.userData)), !0 === t) 7288 for (var i = 0; i < e.children.length; i++) { 7289 var n = e.children[i]; 7290 this.add(n.clone()) 7291 } 7292 return this 7293 } 7294 }), Dn.prototype = Object.assign(Object.create(On.prototype), { 7295 constructor: Dn, 7296 isCamera: !0, 7297 copy: function(e, t) { 7298 return On.prototype.copy.call(this, e, t), this.matrixWorldInverse.copy(e.matrixWorldInverse), this.projectionMatrix.copy(e.projectionMatrix), this 7299 }, 7300 getWorldDirection: (Pn = new Ot, function(e) { 7301 var t = e || new Dt; 7302 return this.getWorldQuaternion(Pn), t.set(0, 0, -1).applyQuaternion(Pn) 7303 }), 7304 updateMatrixWorld: function(e) { 7305 On.prototype.updateMatrixWorld.call(this, e), this.matrixWorldInverse.getInverse(this.matrixWorld) 7306 }, 7307 clone: function() { 7308 return (new this.constructor).copy(this) 7309 } 7310 }), In.prototype = Object.assign(Object.create(Dn.prototype), { 7311 constructor: In, 7312 isOrthographicCamera: !0, 7313 copy: function(e, t) { 7314 return Dn.prototype.copy.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 7315 },
vendor: 9,339 bytes, lines 7316-7536
7316 setViewOffset: function(e, t, i, n, r, o) { 7317 this.view = { 7318 fullWidth: e, 7319 fullHeight: t, 7320 offsetX: i, 7321 offsetY: n, 7322 width: r, 7323 height: o 7324 }, this.updateProjectionMatrix() 7325 }, 7326 clearViewOffset: function() { 7327 this.view = null, this.updateProjectionMatrix() 7328 }, 7329 updateProjectionMatrix: function() { 7330 var e = (this.right - this.left) / (2 * this.zoom), 7331 t = (this.top - this.bottom) / (2 * this.zoom), 7332 i = (this.right + this.left) / 2, 7333 n = (this.top + this.bottom) / 2, 7334 r = i - e, 7335 o = i + e, 7336 a = n + t, 7337 s = n - t; 7338 if (null !== this.view) { 7339 var l = this.zoom / (this.view.width / this.view.fullWidth), 7340 c = this.zoom / (this.view.height / this.view.fullHeight), 7341 u = (this.right - this.left) / this.view.width, 7342 h = (this.top - this.bottom) / this.view.height; 7343 o = (r += u * (this.view.offsetX / l)) + u * (this.view.width / l), s = (a -= h * (this.view.offsetY / c)) - h * (this.view.height / c) 7344 } 7345 this.projectionMatrix.makeOrthographic(r, o, a, s, this.near, this.far) 7346 }, 7347 toJSON: function(e) { 7348 var t = On.prototype.toJSON.call(this, e); 7349 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 7350 } 7351 }), zn.prototype = Object.assign(Object.create(Dn.prototype), { 7352 constructor: zn, 7353 isPerspectiveCamera: !0, 7354 copy: function(e, t) { 7355 return Dn.prototype.copy.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 7356 }, 7357 setFocalLength: function(e) { 7358 var t = .5 * this.getFilmHeight() / e; 7359 this.fov = 2 * st.RAD2DEG * Math.atan(t), this.updateProjectionMatrix() 7360 }, 7361 getFocalLength: function() { 7362 var e = Math.tan(.5 * st.DEG2RAD * this.fov); 7363 return .5 * this.getFilmHeight() / e 7364 }, 7365 getEffectiveFOV: function() { 7366 return 2 * st.RAD2DEG * Math.atan(Math.tan(.5 * st.DEG2RAD * this.fov) / this.zoom) 7367 }, 7368 getFilmWidth: function() { 7369 return this.filmGauge * Math.min(this.aspect, 1) 7370 }, 7371 getFilmHeight: function() { 7372 return this.filmGauge / Math.max(this.aspect, 1) 7373 }, 7374 setViewOffset: function(e, t, i, n, r, o) { 7375 this.aspect = e / t, this.view = { 7376 fullWidth: e, 7377 fullHeight: t, 7378 offsetX: i, 7379 offsetY: n, 7380 width: r, 7381 height: o 7382 }, this.updateProjectionMatrix() 7383 }, 7384 clearViewOffset: function() { 7385 this.view = null, this.updateProjectionMatrix() 7386 }, 7387 updateProjectionMatrix: function() { 7388 var e = this.near, 7389 t = e * Math.tan(.5 * st.DEG2RAD * this.fov) / this.zoom, 7390 i = 2 * t, 7391 n = this.aspect * i, 7392 r = -.5 * n, 7393 o = this.view; 7394 if (null !== o) { 7395 var a = o.fullWidth, 7396 s = o.fullHeight; 7397 r += o.offsetX * n / a, t -= o.offsetY * i / s, n *= o.width / a, i *= o.height / s 7398 } 7399 var l = this.filmOffset; 7400 0 !== l && (r += e * l / this.getFilmWidth()), this.projectionMatrix.makePerspective(r, r + n, t, t - i, e, this.far) 7401 }, 7402 toJSON: function(e) { 7403 var t = On.prototype.toJSON.call(this, e); 7404 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 7405 } 7406 }), Object.assign(Nn.prototype, { 7407 clone: function() { 7408 return (new this.constructor).copy(this) 7409 }, 7410 copy: function(e) { 7411 this.a = e.a, this.b = e.b, this.c = e.c, this.normal.copy(e.normal), this.color.copy(e.color), this.materialIndex = e.materialIndex; 7412 for (var t = 0, i = e.vertexNormals.length; t < i; t++) this.vertexNormals[t] = e.vertexNormals[t].clone(); 7413 for (t = 0, i = e.vertexColors.length; t < i; t++) this.vertexColors[t] = e.vertexColors[t].clone(); 7414 return this 7415 } 7416 }); 7417 var Fn, Un, Bn, Hn, $n, jn, Gn, Vn, Wn, qn, Xn, Yn, Zn, Qn, Jn, Kn, er, tr, ir, nr, rr, or, ar, sr, lr, cr, ur, hr, dr, pr, fr, mr, gr, vr, yr, br, wr, xr, _r, Tr = 0; 7418 7419 function Er() { 7420 return Tr++ 7421 } 7422 7423 function Mr() { 7424 Object.defineProperty(this, "id", { 7425 value: Er() 7426 }), this.uuid = st.generateUUID(), this.name = "", this.type = "Geometry", this.vertices = [], this.colors = [], this.faces = [], this.faceVertexUvs = [ 7427 [] 7428 ], this.morphTargets = [], this.morphNormals = [], this.skinWeights = [], this.skinIndices = [], this.lineDistances = [], this.boundingBox = null, this.boundingSphere = null, this.elementsNeedUpdate = !1, this.verticesNeedUpdate = !1, this.uvsNeedUpdate = !1, this.normalsNeedUpdate = !1, this.colorsNeedUpdate = !1, this.lineDistancesNeedUpdate = !1, this.groupsNeedUpdate = !1 7429 } 7430 7431 function Sr(e, t, i) { 7432 if (Array.isArray(e)) throw new TypeError("THREE.BufferAttribute: array should be a Typed Array."); 7433 this.uuid = st.generateUUID(), this.name = "", this.array = e, this.itemSize = t, this.count = void 0 !== e ? e.length / t : 0, this.normalized = !0 === i, this.dynamic = !1, this.updateRange = { 7434 offset: 0, 7435 count: -1 7436 }, this.onUploadCallback = function() {}, this.version = 0 7437 } 7438 7439 function Cr(e, t) { 7440 Sr.call(this, new Int8Array(e), t) 7441 } 7442 7443 function Ar(e, t) { 7444 Sr.call(this, new Uint8Array(e), t) 7445 } 7446 7447 function Rr(e, t) { 7448 Sr.call(this, new Uint8ClampedArray(e), t) 7449 } 7450 7451 function Lr(e, t) { 7452 Sr.call(this, new Int16Array(e), t) 7453 } 7454 7455 function Pr(e, t) { 7456 Sr.call(this, new Uint16Array(e), t) 7457 } 7458 7459 function kr(e, t) { 7460 Sr.call(this, new Int32Array(e), t) 7461 } 7462 7463 function Or(e, t) { 7464 Sr.call(this, new Uint32Array(e), t) 7465 } 7466 7467 function Dr(e, t) { 7468 Sr.call(this, new Float32Array(e), t) 7469 } 7470 7471 function Ir(e, t) { 7472 Sr.call(this, new Float64Array(e), t) 7473 } 7474 7475 function zr() { 7476 this.indices = [], this.vertices = [], this.normals = [], this.colors = [], this.uvs = [], this.uvs2 = [], this.groups = [], this.morphTargets = {}, this.skinWeights = [], this.skinIndices = [], this.boundingBox = null, this.boundingSphere = null, this.verticesNeedUpdate = !1, this.normalsNeedUpdate = !1, this.colorsNeedUpdate = !1, this.uvsNeedUpdate = !1, this.groupsNeedUpdate = !1 7477 } 7478 7479 function Nr(e) { 7480 if (0 === e.length) return -1 / 0; 7481 for (var t = e[0], i = 1, n = e.length; i < n; ++i) e[i] > t && (t = e[i]); 7482 return t 7483 } 7484 7485 function Fr() { 7486 Object.defineProperty(this, "id", { 7487 value: Er() 7488 }), this.uuid = st.generateUUID(), this.name = "", this.type = "BufferGeometry", this.index = null, this.attributes = {}, this.morphAttributes = {}, this.groups = [], this.boundingBox = null, this.boundingSphere = null, this.drawRange = { 7489 start: 0, 7490 count: 1 / 0 7491 } 7492 } 7493 7494 function Ur(e, t, i, n, r, o) { 7495 Mr.call(this), this.type = "BoxGeometry", this.parameters = { 7496 width: e, 7497 height: t, 7498 depth: i, 7499 widthSegments: n, 7500 heightSegments: r, 7501 depthSegments: o 7502 }, this.fromBufferGeometry(new Br(e, t, i, n, r, o)), this.mergeVertices() 7503 } 7504 7505 function Br(e, t, i, n, r, o) { 7506 Fr.call(this), this.type = "BoxBufferGeometry", this.parameters = { 7507 width: e, 7508 height: t, 7509 depth: i, 7510 widthSegments: n, 7511 heightSegments: r, 7512 depthSegments: o 7513 }; 7514 var R = this; 7515 n = Math.floor(n) || 1, r = Math.floor(r) || 1, o = Math.floor(o) || 1; 7516 var L = [], 7517 P = [], 7518 k = [], 7519 O = [], 7520 D = 0, 7521 I = 0; 7522 7523 function a(e, t, i, n, r, o, a, s, l, c, u) { 7524 var h, d, p = o / l, 7525 f = a / c, 7526 m = o / 2, 7527 g = a / 2, 7528 v = s / 2, 7529 y = l + 1, 7530 b = c + 1, 7531 w = 0, 7532 x = 0, 7533 _ = new Dt; 7534 for (d = 0; d < b; d++) { 7535 var T = d * f - g; 7536 for (h = 0;
7536 h < y; h++) { 7537 var E = h * p - m; 7538 _[e] = E * n, _[t] = T * r, _[i] = v, P.push(_.x, _.y, _.z), _[e] = 0, _[t] = 0, _[i] = 0 < s ? 1 : -1, k.push(_.x, _.y, _.z), O.push(h / l), O.push(1 - d / c), w += 1 7539 } 7540 } 7541 for (d = 0; d < c; d++) 7542 for (h = 0; h < l; h++) { 7543 var M = D + h + y * d, 7544 S = D + h + y * (d + 1), 7545 C = D + (h + 1) + y * (d + 1), 7546 A = D + (h + 1) + y * d; 7547 L.push(M, S, A), L.push(S, C, A), x += 6 7548 } 7549 R.addGroup(I, x, u), I += x, D += w 7550 } 7551 a("z", "y", "x", -1, -1, i, t, e, o, r, 0), a("z", "y", "x", 1, -1, i, t, -e, o, r, 1), a("x", "z", "y", 1, 1, e, i, t, n, o, 2), a("x", "z", "y", 1, -1, e, i, -t, n, o, 3), a("x", "y", "z", 1, -1, e, t, i, n, r, 4), a("x", "y", "z", -1, -1, e, t, -i, n, r, 5), this.setIndex(L), this.addAttribute("position", new Dr(P, 3)), this.addAttribute("normal", new Dr(k, 3)), this.addAttribute("uv", new Dr(O, 2)) 7552 } 7553 7554 function Hr(e, t, i, n) { 7555 Mr.call(this), this.type = "PlaneGeometry", this.parameters = { 7556 width: e, 7557 height: t, 7558 widthSegments: i, 7559 heightSegments: n 7560 }, this.fromBufferGeometry(new $r(e, t, i, n)), this.mergeVertices() 7561 } 7562 7563 function $r(e, t, i, n) { 7564 Fr.call(this), this.type = "PlaneBufferGeometry", this.parameters = { 7565 width: e, 7566 height: t, 7567 widthSegments: i, 7568 heightSegments: n 7569 }; 7570 var r, o, a = e / 2, 7571 s = t / 2, 7572 l = Math.floor(i) || 1, 7573 c = Math.floor(n) || 1, 7574 u = l + 1, 7575 h = c + 1, 7576 d = e / l, 7577 p = t / c, 7578 f = [], 7579 m = [], 7580 g = [], 7581 v = []; 7582 for (o = 0; o < h; o++) { 7583 var y = o * p - s; 7584 for (r = 0; r < u; r++) { 7585 var b = r * d - a; 7586 m.push(b, -y, 0), g.push(0, 0, 1), v.push(r / l), v.push(1 - o / c) 7587 } 7588 } 7589 for (o = 0; o < c; o++) 7590 for (r = 0; r < l; r++) { 7591 var w = r + u * o, 7592 x = r + u * (o + 1), 7593 _ = r + 1 + u * (o + 1), 7594 T = r + 1 + u * o; 7595 f.push(w, x, T), f.push(x, _, T) 7596 } 7597 this.setIndex(f), this.addAttribute("position", new Dr(m, 3)), this.addAttribute("normal", new Dr(g, 3)), this.addAttribute("uv", new Dr(v, 2)) 7598 } 7599 7600 function jr(e) { 7601 tn.call(this), this.type = "MeshBasicMaterial", this.color = new Ei(16777215), this.map = null, this.lightMap = null, this.lightMapIntensity = 1, this.aoMap = null, this.aoMapIntensity = 1, this.specularMap = null, this.alphaMap = null, this.envMap = null, this.combine = U, this.reflectivity = 1, this.refractionRatio = .98, this.wireframe = !1, this.wireframeLinewidth = 1, this.wireframeLinecap = "round", this.wireframeLinejoin = "round", this.skinning = !1, this.morphTargets = !1, this.lights = !1, this.setValues(e) 7602 } 7603 7604 function Gr(e, t) { 7605 this.origin = void 0 !== e ? e : new Dt, this.direction = void 0 !== t ? t : new Dt 7606 } 7607 7608 function Vr(e, t) { 7609 this.start = void 0 !== e ? e : new Dt, this.end = void 0 !== t ? t : new Dt 7610 } 7611 7612 function Wr(e, t, i) { 7613 this.a = void 0 !== e ? e : new Dt, this.b = void 0 !== t ? t : new Dt, this.c = void 0 !== i ? i : new Dt 7614 } 7615 7616 function qr(e, t) { 7617 On.call(this), this.type = "Mesh", this.geometry = void 0 !== e ? e : new Fr, this.material = void 0 !== t ? t : new jr({ 7618 color: 16777215 * Math.random() 7619 }), this.drawMode = Qe, this.updateMorphTargets() 7620 } 7621 7622 function Xr(o, i, a, n) { 7623 var s, l, c, u = new Ei(0), 7624 h = 0; 7625 7626 function d(e, t) { 7627 i.buffers.color.setClear(e.r, e.g, e.b, t, n) 7628 } 7629 return { 7630 getClearColor: function() { 7631 return u 7632 }, 7633 setClearColor: function(e, t) { 7634 u.set(e), d(u, h = void 0 !== t ? t : 1) 7635 }, 7636 getClearAlpha: function() { 7637 return h 7638 }, 7639 setClearAlpha: function(e) { 7640 d(u, h = e) 7641 }, 7642 render: function(e, t, i, n) { 7643 var r = t.background; 7644 null === r ? d(u, h) : r && r.isColor && (d(r, 1), n = !0), (o.autoClear || n) && o.clear(o.autoClearColor, o.autoClearDepth, o.autoClearStencil), r && r.isCubeTexture ? (void 0 === c && ((c = new qr(new Br(1, 1, 1), new nn({ 7645 uniforms: Li.cube.uniforms, 7646 vertexShader: Li.cube.vertexShader, 7647 fragmentShader: Li.cube.fragmentShader, 7648 side: Y, 7649 depthTest: !0, 7650 depthWrite: !1, 7651 polygonOffset: !0, 7652 fog: !1 7653 }))).geometry.removeAttribute("normal"), c.geometry.removeAttribute("uv"), c.onBeforeRender = function(e, t, i) { 7654 var n = i.far; 7655 this.matrixWorld.makeScale(n, n, n), this.matrixWorld.copyPosition(i.matrixWorld), this.material.polygonOffsetUnits = 10 * n 7656 }, a.update(c.geometry)), c.material.uniforms.tCube.value = r, e.push(c, c.geometry, c.material, 0, null)) : r && r.isTexture && (void 0 === s && (s = new In(-1, 1, 1, -1, 0, 1), l = new qr(new $r(2, 2), new jr({ 7657 depthTest: !1, 7658 depthWrite: !1, 7659 fog: !1 7660 })), a.update(l.geometry)), l.material.map = r, o.renderBufferDirect(s, null, l.geometry, l.material, l, null)) 7661 } 7662 } 7663 } 7664 7665 function Yr(e, t) { 7666 return e.renderOrder !== t.renderOrder ? e.renderOrder - t.renderOrder : e.program && t.program && e.program !== t.program ? e.program.id - t.program.id : e.material.id !== t.material.id ? e.material.id - t.material.id : e.z !== t.z ? e.z - t.z : e.id - t.id 7667 } 7668 7669 function Zr(e, t) { 7670 return e.renderOrder !== t.renderOrder ? e.renderOrder - t.renderOrder : e.z !== t.z ? t.z - e.z : e.id - t.id 7671 } 7672 7673 function Qr() { 7674 var a = [], 7675 s = 0, 7676 l = [], 7677 c = []; 7678 return { 7679 opaque: l, 7680 transparent: c, 7681 init: function() { 7682 s = 0, l.length = 0, c.length = 0 7683 }, 7684 push: function(e, t, i, n, r) { 7685 var o = a[s]; 7686 void 0 === o ? (o = { 7687 id: e.id, 7688 object: e, 7689 geometry: t, 7690 material: i, 7691 program: i.program, 7692 renderOrder: e.renderOrder, 7693 z: n, 7694 group: r 7695 }, a[s] = o) : (o.id = e.id, o.object = e, o.geometry = t, o.material = i, o.program = i.program, o.renderOrder = e.renderOrder, o.z = n, o.group = r), (!0 === i.transparent ? c : l).push(o), s++ 7696 }, 7697 sort: function() { 7698 1 < l.length && l.sort(Yr), 1 < c.length && c.sort(Zr) 7699 } 7700 } 7701 } 7702 7703 function Jr() { 7704 var r = {}; 7705 return { 7706 get: function(e, t) { 7707 var i = e.id + "," + t.id, 7708 n = r[i];
7709 return void 0 === n && (n = new Qr, r[i] = n), n 7710 }, 7711 dispose: function() { 7712 r = {} 7713 } 7714 } 7715 } 7716 7717 function Kr(e, t) { 7718 return Math.abs(t[1]) - Math.abs(e[1]) 7719 } 7720 7721 function eo(p) { 7722 var f = {}, 7723 m = new Float32Array(8); 7724 return { 7725 update: function(e, t, i, n) { 7726 var r = e.morphTargetInfluences, 7727 o = r.length, 7728 a = f[t.id]; 7729 if (void 0 === a) { 7730 a = []; 7731 for (var s = 0; s < o; s++) a[s] = [s, 0]; 7732 f[t.id] = a 7733 } 7734 var l = i.morphTargets && t.morphAttributes.position, 7735 c = i.morphNormals && t.morphAttributes.normal; 7736 for (s = 0; s < o; s++) 0 !== (u = a[s])[1] && (l && t.removeAttribute("morphTarget" + s), c && t.removeAttribute("morphNormal" + s)); 7737 for (s = 0; s < o; s++)(u = a[s])[0] = s, u[1] = r[s]; 7738 for (a.sort(Kr), s = 0; s < 8; s++) { 7739 var u; 7740 if (u = a[s]) { 7741 var h = u[0], 7742 d = u[1]; 7743 if (d) { 7744 l && t.addAttribute("morphTarget" + s, l[h]), c && t.addAttribute("morphNormal" + s, c[h]), m[s] = d; 7745 continue 7746 } 7747 } 7748 m[s] = 0 7749 } 7750 n.getUniforms().setValue(p, "morphTargetInfluences", m) 7751 } 7752 } 7753 } 7754 7755 function to(r, o, a) { 7756 var s, l, c; 7757 this.setMode = function(e) { 7758 s = e 7759 }, this.setIndex = function(e) { 7760 l = e.type, c = e.bytesPerElement 7761 }, this.render = function(e, t) { 7762 r.drawElements(s, t, l, e * c), a.calls++, a.vertices += t, s === r.TRIANGLES ? a.faces += t / 3 : s === r.POINTS && (a.points += t) 7763 }, this.renderInstances = function(e, t, i) { 7764 var n = o.get("ANGLE_instanced_arrays"); 7765 null !== n ? (n.drawElementsInstancedANGLE(s, i, l, t * c, e.maxInstancedCount), a.calls++, a.vertices += i * e.maxInstancedCount, s === r.TRIANGLES ? a.faces += e.maxInstancedCount * i / 3 : s === r.POINTS && (a.points += e.maxInstancedCount * i)) : console.error("THREE.WebGLIndexedBufferRenderer: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.") 7766 } 7767 } 7768 7769 function io(o, a, s) { 7770 var l; 7771 this.setMode = function(e) { 7772 l = e 7773 }, this.render = function(e, t) { 7774 o.drawArrays(l, e, t), s.calls++, s.vertices += t, l === o.TRIANGLES ? s.faces += t / 3 : l === o.POINTS && (s.points += t) 7775 }, this.renderInstances = function(e, t, i) { 7776 var n = a.get("ANGLE_instanced_arrays"); 7777 if (null !== n) { 7778 var r = e.attributes.position; 7779 r.isInterleavedBufferAttribute ? (i = r.data.count, n.drawArraysInstancedANGLE(l, 0, i, e.maxInstancedCount)) : n.drawArraysInstancedANGLE(l, t, i, e.maxInstancedCount), s.calls++, s.vertices += i * e.maxInstancedCount, l === o.TRIANGLES ? s.faces += e.maxInstancedCount * i / 3 : l === o.POINTS && (s.points += e.maxInstancedCount * i) 7780 } else console.error("THREE.WebGLBufferRenderer: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.") 7781 } 7782 } 7783 7784 function no(h, d, o) { 7785 var a = {}, 7786 p = {}; 7787 7788 function s(e) { 7789 var t = e.target, 7790 i = a[t.id]; 7791 for (var n in null !== i.index && d.remove(i.index), i.attributes) d.remove(i.attributes[n]); 7792 t.removeEventListener("dispose", s), delete a[t.id]; 7793 var r = p[t.id]; 7794 r && (d.remove(r), delete p[t.id]), (r = p[i.id]) && (d.remove(r), delete p[i.id]), o.geometries-- 7795 } 7796 return { 7797 get: function(e, t) { 7798 var i = a[t.id]; 7799 return i || (t.addEventListener("dispose", s), t.isBufferGeometry ? i = t : t.isGeometry && (void 0 === t._bufferGeometry && (t._bufferGeometry = (ne
7799w Fr).setFromObject(e)), i = t._bufferGeometry), a[t.id] = i, o.geometries++, i) 7800 }, 7801 update: function(e) { 7802 var t = e.index, 7803 i = e.attributes; 7804 for (var n in null !== t && d.update(t, h.ELEMENT_ARRAY_BUFFER), i) d.update(i[n], h.ARRAY_BUFFER); 7805 var r = e.morphAttributes; 7806 for (var n in r) 7807 for (var o = r[n], a = 0, s = o.length; a < s; a++) d.update(o[a], h.ARRAY_BUFFER) 7808 }, 7809 getWireframeAttribute: function(e) { 7810 var t = p[e.id]; 7811 if (t) return t; 7812 var i, n = [], 7813 r = e.index, 7814 o = e.attributes; 7815 if (null !== r) 7816 for (var a = 0, s = (i = r.array).length; a < s; a += 3) { 7817 var l = i[a + 0], 7818 c = i[a + 1], 7819 u = i[a + 2]; 7820 n.push(l, c, c, u, u, l) 7821 } else 7822 for (a = 0, s = (i = o.position.array).length / 3 - 1; a < s; a += 3) l = a + 0, c = a + 1, u = a + 2, n.push(l, c, c, u, u, l); 7823 return t = new(65535 < Nr(n) ? Or : Pr)(n, 1), d.update(t, h.ELEMENT_ARRAY_BUFFER), p[e.id] = t 7824 } 7825 } 7826 } 7827 7828 function ro() { 7829 var i = {}; 7830 return { 7831 get: function(e) { 7832 if (void 0 !== i[e.id]) return i[e.id]; 7833 var t; 7834 switch (e.type) { 7835 case "DirectionalLight": 7836 t = { 7837 direction: new Dt, 7838 color: new Ei, 7839 shadow: !1, 7840 shadowBias: 0, 7841 shadowRadius: 1, 7842 shadowMapSize: new lt 7843 }; 7844 break; 7845 case "SpotLight": 7846 t = { 7847 position: new Dt, 7848 direction: new Dt, 7849 color: new Ei, 7850 distance: 0, 7851 coneCos: 0, 7852 penumbraCos: 0, 7853 decay: 0, 7854 shadow: !1, 7855 shadowBias: 0, 7856 shadowRadius: 1, 7857 shadowMapSize: new lt 7858 }; 7859 break; 7860 case "PointLight": 7861 t = { 7862 position: new Dt, 7863 color: new Ei, 7864 distance: 0, 7865 decay: 0, 7866 shadow: !1, 7867 shadowBias: 0, 7868 shadowRadius: 1, 7869 shadowMapSize: new lt, 7870 shadowCameraNear: 1, 7871 shadowCameraFar: 1e3 7872 }; 7873 break; 7874 case "HemisphereLight": 7875 t = { 7876 direction: new Dt, 7877 skyColor: new Ei, 7878 groundColor: new Ei 7879 }; 7880 break; 7881 case "RectAreaLight": 7882 t = { 7883 color: new Ei, 7884 position: new Dt, 7885 halfWidth: new Dt, 7886 halfHeight: new Dt 7887 } 7888 } 7889 return i[e.id] = t 7890 } 7891 } 7892 } 7893 7894 function oo() { 7895 var x = new ro, 7896 _ = { 7897 hash: "", 7898 ambient: [0, 0, 0], 7899 directional: [], 7900 directionalShadowMap: [], 7901 directionalShadowMatrix: [], 7902 spot: [], 7903 spotShadowMap: [], 7904 spotShadowMatrix: [], 7905 rectArea: [], 7906 point: [], 7907 pointShadowMap: [], 7908 pointShadowMatrix: [], 7909 hemi: [] 7910 }, 7911 T = new Dt, 7912 E = new It, 7913 M = new It; 7914 return { 7915 setup: function(e, t, i) { 7916 for (var n = 0, r = 0, o = 0, a = 0, s = 0, l = 0, c = 0, u = 0, h = i.matrixWorldInverse, d = 0, p = e.length; d < p; d++) { 7917 var f = e[d], 7918 m = f.color, 7919 g = f.intensity, 7920 v = f.distance, 7921 y = f.shadow && f.shadow.map ? f.shadow.map.texture : null; 7922 if (f.isAmbientLight) n += m.r * g, r += m.g * g, o += m.b * g; 7923 else if (f.isDirectionalLight) { 7924 if ((w = x.get(f)).color.copy(f.color).multiplyScalar(f.intensity), w.direction.setFromMatrixPosition(f.matrixWorld), T.setFromMatrixPosition(f.target.matrixWorld), w.direction.sub(T), w.direction.transformDirection(h), w.shadow = f.castShadow, f.castShadow) { 7925 var b = f.shadow; 7926 w.shadowBias = b.bias, w.shadowRadius = b.radius, w.shadowMapSize = b.mapSize 7927 } 7928 _.directionalShadowMap[a] = y, _.directionalShadowMatrix[a] = f.shadow.matrix, _.directional[a] = w, a++ 7929 } else if (f.isSpotLight)(w = x.get(f)).position.setFromMatrixPosition(f.matrixWorld), w.position.applyMatrix4(h), w.color.copy(m).multiplyScalar(g), w.distance = v, w.direction.setFromMatrixPosition(f.matrixWorld), T.setFromMatrixPosition(f.target.matrixWorld), w.direction.sub(T), w.direction.transformDirection(h), w.coneCos = Math.cos(f.angle), w.penumbraCos = Math.cos(f.angle * (1 - f.penumbra)), w.decay = 0 === f.distance ? 0 : f.decay, w.shadow = f.castShadow, f.castShadow && (b = f.shadow, w.shadowBias = b.bias, w.shadowRadius = b.radius, w.shadowMapSize = b.mapSize), _.spotShadowMap[l] = y, _.spotShadowMatrix[l] = f.shadow.matrix, _.spot[l] = w, l++; 7930 else if (f.isRectAreaLight)(w = x.get(f)).color.copy(m).multiplyScalar(g / (f.width * f.height)), w.position.setFromMatrixPosition(f.matrixWorld), w.position.applyMatrix4(h), M.identity(), E.copy(f.matrixWorld), E.premultiply(h), M.extractRotation(E), w.halfWidth.set(.5 * f.width, 0, 0), w.halfHeight.set(0, .5 * f.height, 0), w.halfWidth.applyMatrix4(M), w.halfHeight.applyMatrix4(M), _.rectArea[c] = w, c++; 7931 else if (f.isPointLight)(w = x.get(f)).position.setFromMatrixPosition(f.matrixWorld), w.position.applyMatrix4(h), w.color.copy(f.color).multiplyScalar(f.intensity), w.distance = f.distance, w.decay = 0 === f.distance ? 0 : f.decay, w.shadow = f.castShadow, f.castShadow && (b = f.shadow, w.shadowBias = b.bias, w.shadowRadius = b.radius, w.shadowMapSize = b.mapSize, w.shadowCameraNear = b.camera.near, w.shadowCameraFar = b.camera.far), _.pointShadowMap[s] = y, _.pointShadowMatrix[s] = f.shadow.matrix, _.point[s] = w, s++; 7932 else if (f.isHemisphereLight) { 7933 var w; 7934 (w = x.get(f)).direction.setFromMatrixPosition(f.matrixWorld), w.direction.transformDirection(h), w.direction.normalize(), w.skyColor.copy(f.color).multiplyScalar(g), w.groundColor.copy(f.groundColor).multiplyScalar(g), _.hemi[u] = w, u++ 7935 } 7936 } 7937 _.ambient[0] = n, _.ambient[1] = r, _.ambient[2] = o, _.directional.length = a, _.spot.length = l, _.rectArea.length = c, _.point.length = s, _.hemi.length = u, _.hash = a + "," + s + "," + l + "," + c + "," + u + "," + t.length 7938 }, 7939 state: _ 7940 } 7941 } 7942 7943 function ao(r, o) { 7944 var a = {}; 7945 return { 7946 update: function(e) { 7947 var t = o.frame, 7948 i = e.geometry, 7949 n = r.get(e, i); 7950 return a[n.id] !== t && (i.isGeometry && n.updateFromObject(e), r.update(n), a[n.id] = t), n 7951 }, 7952 clear: function() { 7953 a = {} 7954 } 7955 } 7956 } 7957 7958 function so(e, t, i) { 7959 var n = e.createShader(t); 7960 return e.shaderSource(n, i), e.compileShader(n), !1 === e.getShaderParameter(n, e.COMPILE_STATUS) && console.error("THREE.WebGLShader: Shader couldn't compile."), "" !== e.getShaderInfoLog(n) && console.warn("THREE.WebGLShader: gl.getShaderInfoLog()", t === e.VERTEX_SHADER ? "vertex" : "fragment", e.getShaderInfoLog(n), function(e) { 7961 for (var t = e.split("\n"), i = 0; i < t.length; i++) t[i] = i + 1 + ": " + t[i]; 7962 return t.join("\n") 7963 }(i)), n 7964 } 7965 Object.assign(Mr.prototype, t.prototype, { 7966 isGeometry: !0, 7967 applyMatrix: function(e) { 7968 for (var t = (new ln).getNormalMatrix(e), i = 0, n = this.vertices.length; i < n; i++) { 7969 this.vertices[i].applyMatrix4(e) 7970 } 7971 for (i = 0, n = this.faces.length; i < n; i++) { 7972 var r = this.faces[i];
7973 r.normal.applyMatrix3(t).normalize(); 7974 for (var o = 0, a = r.vertexNormals.length; o < a; o++) r.vertexNormals[o].applyMatrix3(t).normalize() 7975 } 7976 return null !== this.boundingBox && this.computeBoundingBox(), null !== this.boundingSphere && this.computeBoundingSphere(), this.verticesNeedUpdate = !0, this.normalsNeedUpdate = !0, this 7977 }, 7978 rotateX: (jn = new It, function(e) { 7979 return jn.makeRotationX(e), this.applyMatrix(jn), this 7980 }), 7981 rotateY: ($n = new It, function(e) { 7982 return $n.makeRotationY(e), this.applyMatrix($n), this 7983 }), 7984 rotateZ: (Hn = new It, function(e) { 7985 return Hn.makeRotationZ(e), this.applyMatrix(Hn), this 7986 }), 7987 translate: (Bn = new It, function(e, t, i) { 7988 return Bn.makeTranslation(e, t, i), this.applyMatrix(Bn), this 7989 }), 7990 scale: (Un = new It, function(e, t, i) { 7991 return Un.makeScale(e, t, i), this.applyMatrix(Un), this 7992 }), 7993 lookAt: (Fn = new On, function(e) { 7994 Fn.lookAt(e), Fn.updateMatrix(), this.applyMatrix(Fn.matrix) 7995 }), 7996 fromBufferGeometry: function(e) { 7997 var o = this, 7998 t = null !== e.index ? e.index.array : void 0, 7999 i = e.attributes, 8000 n = i.position.array, 8001 a = void 0 !== i.normal ? i.normal.array : void 0, 8002 s = void 0 !== i.color ? i.color.array : void 0, 8003 l = void 0 !== i.uv ? i.uv.array : void 0, 8004 c = void 0 !== i.uv2 ? i.uv2.array : void 0; 8005 void 0 !== c && (this.faceVertexUvs[1] = []); 8006 for (var u = [], h = [], d = [], r = 0, p = 0; r < n.length; r += 3, p += 2) o.vertices.push(new Dt(n[r], n[r + 1], n[r + 2])), void 0 !== a && u.push(new Dt(a[r], a[r + 1], a[r + 2])), void 0 !== s && o.colors.push(new Ei(s[r], s[r + 1], s[r + 2])), void 0 !== l && h.push(new lt(l[p], l[p + 1])), void 0 !== c && d.push(new lt(c[p], c[p + 1])); 8007 8008 function f(e, t, i, n) { 8009 var r = new Nn(e, t, i, void 0 !== a ? [u[e].clone(), u[t].clone(), u[i].clone()] : [], void 0 !== s ? [o.colors[e].clone(), o.colors[t].clone(), o.colors[i].clone()] : [], n); 8010 o.faces.push(r), void 0 !== l && o.faceVertexUvs[0].push([h[e].clone(), h[t].clone(), h[i].clone()]), void 0 !== c && o.faceVertexUvs[1].push([d[e].clone(), d[t].clone(), d[i].clone()]) 8011 } 8012 var m = e.groups; 8013 if (0 < m.length) 8014 for (r = 0; r < m.length; r++) 8015 for (var g = m[r], v = g.start, y = (p = v, v + g.count); p < y; p += 3) void 0 !== t ? f(t[p], t[p + 1], t[p + 2], g.materialIndex) : f(p, p + 1, p + 2, g.materialIndex); 8016 else if (void 0 !== t) 8017 for (r = 0; r < t.length; r += 3) f(t[r], t[r + 1], t[r + 2]); 8018 else 8019 for (r = 0; r < n.length / 3; r += 3) f(r, r + 1, r + 2); 8020 return this.computeFaceNormals(), null !== e.boundingBox && (this.boundingBox = e.boundingBox.clone()), null !== e.boundingSphere && (this.boundingSphere = e.boundingSphere.clone()), this 8021 }, 8022 center: function() { 8023 this.computeBoundingBox(); 8024 var e = this.boundingBox.getCenter().negate(); 8025 return this.translate(e.x, e.y, e.z), e 8026 }, 8027 normalize: function() { 8028 this.computeBoundingSphere(); 8029 var e = this.boundingSphere.center, 8030 t = this.boundingSphere.radius, 8031 i = 0 === t ? 1 : 1 / t, 8032 n = new It; 8033 return n.set(i, 0, 0, -i * e.x, 0, i, 0, -i * e.y, 0, 0, i, -i * e.z, 0, 0, 0, 1), this.applyMatrix(n), this 8034 }, 8035 computeFaceNormals: function() { 8036 for (var e = new Dt, t = new Dt, i = 0, n = this.faces.length; i < n; i++) { 8037 var r = this.faces[i], 8038 o = this.vertices[r.a], 8039 a = this.vertices[r.b], 8040 s = this.vertices[r.c]; 8041 e.subVectors(s, a), t.subVectors(o, a), e.cross(t), e.normalize(), r.normal.copy(e) 8042 } 8043 }, 8044 computeVertexNormals: function(e) { 8045 var t, i, n, r, o, a; 8046 for (void 0 === e && (e = !0), a = new Array(this.vertices.length), t = 0, i = this.vertices.length; t < i; t++) a[t] = new Dt; 8047 if (e) { 8048 var s, l, c, u = new Dt, 8049 h = new Dt; 8050 for (n = 0, r = this.faces.length; n < r; n++) o = this.faces[n], s = this.vertices[o.a], l = this.vertices[o.b], c = this.vertices[o.c], u.subVectors(c, l), h.subVectors(s, l), u.cross(h), a[o.a].add(u), a[o.b].add(u), a[o.c].add(u) 8051 } else 8052 for (this.computeFaceNormals(), n = 0, r = this.faces.length; n < r; n++) a[(o = this.faces[n]).a].add(o.normal), a[o.b].add(o.normal), a[o.c].add(o.normal); 8053 for (t = 0, i = this.vertices.length; t < i; t++) a[t].normalize(); 8054 for (n = 0, r = this.faces.length; n < r; n++) { 8055 var d = (o = this.faces[n]).vertexNormals; 8056 3 === d.length ? (d[0].copy(a[o.a]), d[1].copy(a[o.b]), d[2].copy(a[o.c])) : (d[0] = a[o.a].clone(), d[1] = a[o.b].clone(), d[2] = a[o.c].clone()) 8057 } 8058 0 < this.faces.length && (this.normalsNeedUpdate = !0) 8059 }, 8060 computeFlatVertexNormals: function() { 8061 var e, t, i; 8062 for (this.computeFaceNormals(), e = 0, t = this.faces.length; e < t; e++) { 8063 var n = (i = this.faces[e]).vertexNormals; 8064 3 === n.length ? (n[0].copy(i.normal), n[1].copy(i.normal), n[2].copy(i.normal)) : (n[0] = i.normal.clone(), n[1] = i.normal.clone(), n[2] = i.normal.clone()) 8065 } 8066 0 < this.faces.length && (this.normalsNeedUpdate = !0) 8067 }, 8068 computeMorphNormals: function() { 8069 var e, t, i, n, r; 8070 for (i = 0, n = this.faces.length; i < n; i++)
vendor: 17,293 bytes, lines 8071-8405
8071 for ((r = this.faces[i]).__originalFaceNormal ? r.__originalFaceNormal.copy(r.normal) : r.__originalFaceNormal = r.normal.clone(), r.__originalVertexNormals || (r.__originalVertexNormals = []), e = 0, t = r.vertexNormals.length; e < t; e++) r.__originalVertexNormals[e] ? r.__originalVertexNormals[e].copy(r.vertexNormals[e]) : r.__originalVertexNormals[e] = r.vertexNormals[e].clone(); 8072 var o = new Mr; 8073 for (o.faces = this.faces, e = 0, t = this.morphTargets.length; e < t; e++) { 8074 if (!this.morphNormals[e]) { 8075 this.morphNormals[e] = {}, this.morphNormals[e].faceNormals = [], this.morphNormals[e].vertexNormals = []; 8076 var a = this.morphNormals[e].faceNormals, 8077 s = this.morphNormals[e].vertexNormals; 8078 for (i = 0, n = this.faces.length; i < n; i++) l = new Dt, c = { 8079 a: new Dt, 8080 b: new Dt, 8081 c: new Dt 8082 }, a.push(l), s.push(c) 8083 } 8084 var l, c, u = this.morphNormals[e]; 8085 for (o.vertices = this.morphTargets[e].vertices, o.computeFaceNormals(), o.computeVertexNormals(), i = 0, n = this.faces.length; i < n; i++) r = this.faces[i], l = u.faceNormals[i], c = u.vertexNormals[i], l.copy(r.normal), c.a.copy(r.vertexNormals[0]), c.b.copy(r.vertexNormals[1]), c.c.copy(r.vertexNormals[2]) 8086 } 8087 for (i = 0, n = this.faces.length; i < n; i++)(r = this.faces[i]).normal = r.__originalFaceNormal, r.vertexNormals = r.__originalVertexNormals 8088 }, 8089 computeLineDistances: function() { 8090 for (var e = 0, t = this.vertices, i = 0, n = t.length; i < n; i++) 0 < i && (e += t[i].distanceTo(t[i - 1])), this.lineDistances[i] = e 8091 }, 8092 computeBoundingBox: function() { 8093 null === this.boundingBox && (this.boundingBox = new an), this.boundingBox.setFromPoints(this.vertices) 8094 }, 8095 computeBoundingSphere: function() { 8096 null === this.boundingSphere && (this.boundingSphere = new sn), this.boundingSphere.setFromPoints(this.vertices) 8097 }, 8098 merge: function(e, t, i) { 8099 if (e && e.isGeometry) { 8100 var n, r = this.vertices.length, 8101 o = this.vertices, 8102 a = e.vertices, 8103 s = this.faces, 8104 l = e.faces, 8105 c = this.faceVertexUvs[0], 8106 u = e.faceVertexUvs[0], 8107 h = this.colors, 8108 d = e.colors; 8109 void 0 === i && (i = 0), void 0 !== t && (n = (new ln).getNormalMatrix(t)); 8110 for (var p = 0, f = a.length; p < f; p++) { 8111 var m = a[p].clone(); 8112 void 0 !== t && m.applyMatrix4(t), o.push(m) 8113 } 8114 for (p = 0, f = d.length; p < f; p++) h.push(d[p].clone()); 8115 for (p = 0, f = l.length; p < f; p++) { 8116 var g, v, y, b = l[p], 8117 w = b.vertexNormals, 8118 x = b.vertexColors; 8119 (g = new Nn(b.a + r, b.b + r, b.c + r)).normal.copy(b.normal), void 0 !== n && g.normal.applyMatrix3(n).normalize(); 8120 for (var _ = 0, T = w.length; _ < T; _++) v = w[_].clone(), void 0 !== n && v.applyMatrix3(n).normalize(), g.vertexNormals.push(v); 8121 g.color.copy(b.color); 8122 for (_ = 0, T = x.length; _ < T; _++) y = x[_], g.vertexColors.push(y.clone()); 8123 g.materialIndex = b.materialIndex + i, s.push(g) 8124 } 8125 for (p = 0, f = u.length; p < f; p++) { 8126 var E = u[p], 8127 M = []; 8128 if (void 0 !== E) { 8129 for (_ = 0, T = E.length; _ < T; _++) M.push(E[_].clone()); 8130 c.push(M) 8131 } 8132 } 8133 } else console.error("THREE.Geometry.merge(): geometry not an instance of THREE.Geometry.", e) 8134 }, 8135 mergeMesh: function(e) { 8136 e && e.isMesh ? (e.matrixAutoUpdate && e.updateMatrix(), this.merge(e.geometry, e.matrix)) : console.error("THREE.Geometry.mergeMesh(): mesh not an instance of THREE.Mesh.", e) 8137 }, 8138 mergeVertices: function() { 8139 var e, t, i, n, r, o, a, s, l = {}, 8140 c = [], 8141 u = [], 8142 h = Math.pow(10, 4); 8143 for (i = 0, n = this.vertices.length; i < n; i++) e = this.vertices[i], void 0 === l[t = Math.round(e.x * h) + "_" + Math.round(e.y * h) + "_" + Math.round(e.z * h)] ? (l[t] = i, c.push(this.vertices[i]), u[i] = c.length - 1) : u[i] = u[l[t]]; 8144 var d = []; 8145 for (i = 0, n = this.faces.length; i < n; i++) { 8146 (r = this.faces[i]).a = u[r.a], r.b = u[r.b], r.c = u[r.c], o = [r.a, r.b, r.c]; 8147 for (var p = 0; p < 3; p++) 8148 if (o[p] === o[(p + 1) % 3]) { 8149 d.push(i); 8150 break 8151 } 8152 } 8153 for (i = d.length - 1; 0 <= i; i--) { 8154 var f = d[i]; 8155 for (this.faces.splice(f, 1), a = 0, s = this.faceVertexUvs.length; a < s; a++) this.faceVertexUvs[a].splice(f, 1) 8156 } 8157 var m = this.vertices.length - c.length; 8158 return this.vertices = c, m 8159 }, 8160 sortFacesByMaterialIndex: function() { 8161 for (var e = this.faces, t = e.length, i = 0; i < t; i++) e[i]._id = i; 8162 e.sort(function(e, t) { 8163 return e.materialIndex - t.materialIndex 8164 }); 8165 var n, r, o = this.faceVertexUvs[0], 8166 a = this.faceVertexUvs[1]; 8167 o && o.length === t && (n = []), a && a.length === t && (r = []); 8168 for (i = 0; i < t; i++) { 8169 var s = e[i]._id; 8170 n && n.push(o[s]), r && r.push(a[s]) 8171 } 8172 n && (this.faceVertexUvs[0] = n), r && (this.faceVertexUvs[1] = r) 8173 }, 8174 toJSON: function() { 8175 var e = { 8176 metadata: { 8177 version: 4.5, 8178 type: "Geometry", 8179 generator: "Geometry.toJSON" 8180 } 8181 }; 8182 if (e.uuid = this.uuid, e.type = this.type, "" !== this.name && (e.name = this.name), void 0 !== this.parameters) { 8183 var t = this.parameters; 8184 for (var i in t) void 0 !== t[i] && (e[i] = t[i]); 8185 return e 8186 } 8187 for (var n = [], r = 0; r < this.vertices.length; r++) { 8188 var o = this.vertices[r]; 8189 n.push(o.x, o.y, o.z) 8190 } 8191 var a = [], 8192 s = [], 8193 l = {}, 8194 c = [], 8195 u = {}, 8196 h = [], 8197 d = {}; 8198 for (r = 0; r < this.faces.length; r++) { 8199 var p = this.faces[r], 8200 f = void 0 !== this.faceVertexUvs[0][r], 8201 m = 0 < p.normal.length(), 8202 g = 0 < p.vertexNormals.length, 8203 v = 1 !== p.color.r || 1 !== p.color.g || 1 !== p.color.b, 8204 y = 0 < p.vertexColors.length, 8205 b = 0; 8206 if (b = T(b = T(b = T(b = T(b = T(b = T(b = T(b = T(b, 0, 0), 1, !0), 2, !1), 3, f), 4, m), 5, g), 6, v), 7, y), a.push(b), a.push(p.a, p.b, p.c), a.push(p.materialIndex), f) { 8207 var w = this.faceVertexUvs[0][r]; 8208 a.push(S(w[0]), S(w[1]), S(w[2])) 8209 } 8210 if (m && a.push(E(p.normal)), g) { 8211 var x = p.vertexNormals; 8212 a.push(E(x[0]), E(x[1]), E(x[2])) 8213 } 8214 if (v && a.push(M(p.color)), y) { 8215 var _ = p.vertexColors; 8216 a.push(M(_[0]), M(_[1]), M(_[2])) 8217 } 8218 } 8219 8220 function T(e, t, i) { 8221 return i ? e | 1 << t : e & ~(1 << t) 8222 } 8223 8224 function E(e) { 8225 var t = e.x.toString() + e.y.toString() + e.z.toString(); 8226 return void 0 !== l[t] || (l[t] = s.length / 3, s.push(e.x, e.y, e.z)), l[t] 8227 } 8228 8229 function M(e) { 8230 var t = e.r.toString() + e.g.toString() + e.b.toString(); 8231 return void 0 !== u[t] || (u[t] = c.length, c.push(e.getHex())), u[t] 8232 } 8233 8234 function S(e) { 8235 var t = e.x.toString() + e.y.toString(); 8236 return void 0 !== d[t] || (d[t] = h.length / 2, h.push(e.x, e.y)), d[t] 8237 } 8238 return e.data = {}, e.data.vertices = n, e.data.normals = s, 0 < c.length && (e.data.colors = c), 0 < h.length && (e.data.uvs = [h]), e.data.faces = a, e 8239 }, 8240 clone: function() { 8241 return (new Mr).copy(this) 8242 }, 8243 copy: function(e) { 8244 var t, i, n, r, o, a; 8245 this.vertices = [], this.colors = [], this.faces = [], this.faceVertexUvs = [ 8246 [] 8247 ], this.morphTargets = [], this.morphNormals = [], this.skinWeights = [], this.skinIndices = [], this.lineDistances = [], this.boundingBox = null, this.boundingSphere = null, this.name = e.name; 8248 var s = e.vertices; 8249 for (t = 0, i = s.length; t < i; t++) this.vertices.push(s[t].clone()); 8250 var l = e.colors; 8251 for (t = 0, i = l.length; t < i; t++) this.colors.push(l[t].clone()); 8252 var c = e.faces; 8253 for (t = 0, i = c.length; t < i; t++) this.faces.push(c[t].clone()); 8254 for (t = 0, i = e.faceVertexUvs.length; t < i; t++) { 8255 var u = e.faceVertexUvs[t]; 8256 for (void 0 === this.faceVertexUvs[t] && (this.faceVertexUvs[t] = []), n = 0, r = u.length; n < r; n++) { 8257 var h = u[n], 8258 d = []; 8259 for (o = 0, a = h.length; o < a; o++) { 8260 var p = h[o]; 8261 d.push(p.clone()) 8262 } 8263 this.faceVertexUvs[t].push(d) 8264 } 8265 } 8266 var f = e.morphTargets; 8267 for (t = 0, i = f.length; t < i; t++) { 8268 var m = {}; 8269 if (m.name = f[t].name, void 0 !== f[t].vertices) 8270 for (m.vertices = [], n = 0, r = f[t].vertices.length; n < r; n++) m.vertices.push(f[t].vertices[n].clone()); 8271 if (void 0 !== f[t].normals) 8272 for (m.normals = [], n = 0, r = f[t].normals.length; n < r; n++) m.normals.push(f[t].normals[n].clone()); 8273 this.morphTargets.push(m) 8274 } 8275 var g = e.morphNormals; 8276 for (t = 0, i = g.length; t < i; t++) { 8277 var v = {}; 8278 if (void 0 !== g[t].vertexNormals) 8279 for (v.vertexNormals = [], n = 0, r = g[t].vertexNormals.length; n < r; n++) { 8280 var y = g[t].vertexNormals[n], 8281 b = {}; 8282 b.a = y.a.clone(), b.b = y.b.clone(), b.c = y.c.clone(), v.vertexNormals.push(b) 8283 } 8284 if (void 0 !== g[t].faceNormals) 8285 for (v.faceNormals = [], n = 0, r = g[t].faceNormals.length; n < r; n++) v.faceNormals.push(g[t].faceNormals[n].clone()); 8286 this.morphNormals.push(v) 8287 } 8288 var w = e.skinWeights; 8289 for (t = 0, i = w.length; t < i; t++) this.skinWeights.push(w[t].clone()); 8290 var x = e.skinIndices; 8291 for (t = 0, i = x.length; t < i; t++) this.skinIndices.push(x[t].clone()); 8292 var _ = e.lineDistances; 8293 for (t = 0, i = _.length; t < i; t++) this.lineDistances.push(_[t]); 8294 var T = e.boundingBox; 8295 null !== T && (this.boundingBox = T.clone()); 8296 var E = e.boundingSphere; 8297 return null !== E && (this.boundingSphere = E.clone()), this.elementsNeedUpdate = e.elementsNeedUpdate, this.verticesNeedUpdate = e.verticesNeedUpdate, this.uvsNeedUpdate = e.uvsNeedUpdate, this.normalsNeedUpdate = e.normalsNeedUpdate, this.colorsNeedUpdate = e.colorsNeedUpdate, this.lineDistancesNeedUpdate = e.lineDistancesNeedUpdate, this.groupsNeedUpdate = e.groupsNeedUpdate, this 8298 }, 8299 dispose: function() { 8300 this.dispatchEvent({ 8301 type: "dispose" 8302 }) 8303 } 8304 }), Object.defineProperty(Sr.prototype, "needsUpdate", { 8305 set: function(e) { 8306 !0 === e && this.version++ 8307 } 8308 }), Object.assign(Sr.prototype, { 8309 isBufferAttribute: !0, 8310 setArray: function(e) { 8311 if (Array.isArray(e)) throw new TypeError("THREE.BufferAttribute: array should be a Typed Array."); 8312 this.count = void 0 !== e ? e.length / this.itemSize : 0, this.array = e 8313 }, 8314 setDynamic: function(e) { 8315 return this.dynamic = e, this 8316 }, 8317 copy: function(e) { 8318 return this.array = new e.array.constructor(e.array), this.itemSize = e.itemSize, this.count = e.count, this.normalized = e.normalized, this.dynamic = e.dynamic, this 8319 }, 8320 copyAt: function(e, t, i) { 8321 e *= this.itemSize, i *= t.itemSize; 8322 for (var n = 0, r = this.itemSize; n < r; n++) this.array[e + n] = t.array[i + n]; 8323 return this 8324 }, 8325 copyArray: function(e) { 8326 return this.array.set(e), this 8327 }, 8328 copyColorsArray: function(e) { 8329 for (var t = this.array, i = 0, n = 0, r = e.length; n < r; n++) { 8330 var o = e[n]; 8331 void 0 === o && (console.warn("THREE.BufferAttribute.copyColorsArray(): color is undefined", n), o = new Ei), t[i++] = o.r, t[i++] = o.g, t[i++] = o.b 8332 } 8333 return this 8334 }, 8335 copyIndicesArray: function(e) { 8336 for (var t = this.array, i = 0, n = 0, r = e.length; n < r; n++) { 8337 var o = e[n]; 8338 t[i++] = o.a, t[i++] = o.b, t[i++] = o.c 8339 } 8340 return this 8341 }, 8342 copyVector2sArray: function(e) { 8343 for (var t = this.array, i = 0, n = 0, r = e.length; n < r; n++) { 8344 var o = e[n]; 8345 void 0 === o && (console.warn("THREE.BufferAttribute.copyVector2sArray(): vector is undefined", n), o = new lt), t[i++] = o.x, t[i++] = o.y 8346 } 8347 return this 8348 }, 8349 copyVector3sArray: function(e) { 8350 for (var t = this.array, i = 0, n = 0, r = e.length; n < r; n++) { 8351 var o = e[n]; 8352 void 0 === o && (console.warn("THREE.BufferAttribute.copyVector3sArray(): vector is undefined", n), o = new Dt), t[i++] = o.x, t[i++] = o.y, t[i++] = o.z 8353 } 8354 return this 8355 }, 8356 copyVector4sArray: function(e) { 8357 for (var t = this.array, i = 0, n = 0, r = e.length; n < r; n++) { 8358 var o = e[n]; 8359 void 0 === o && (console.warn("THREE.BufferAttribute.copyVector4sArray(): vector is undefined", n), o = new Lt), t[i++] = o.x, t[i++] = o.y, t[i++] = o.z, t[i++] = o.w 8360 } 8361 return this 8362 }, 8363 set: function(e, t) { 8364 return void 0 === t && (t = 0), this.array.set(e, t), this 8365 }, 8366 getX: function(e) { 8367 return this.array[e * this.itemSize] 8368 }, 8369 setX: function(e, t) { 8370 return this.array[e * this.itemSize] = t, this 8371 }, 8372 getY: function(e) { 8373 return this.array[e * this.itemSize + 1] 8374 }, 8375 setY: function(e, t) { 8376 return this.array[e * this.itemSize + 1] = t, this 8377 }, 8378 getZ: function(e) { 8379 return this.array[e * this.itemSize + 2] 8380 }, 8381 setZ: function(e, t) { 8382 return this.array[e * this.itemSize + 2] = t, this 8383 }, 8384 getW: function(e) { 8385 return this.array[e * this.itemSize + 3] 8386 }, 8387 setW: function(e, t) { 8388 return this.array[e * this.itemSize + 3] = t, this 8389 }, 8390 setXY: function(e, t, i) { 8391 return e *= this.itemSize, this.array[e + 0] = t, this.array[e + 1] = i, this 8392 }, 8393 setXYZ: function(e, t, i, n) { 8394 return e *= this.itemSize, this.array[e + 0] = t, this.array[e + 1] = i, this.array[e + 2] = n, this 8395 }, 8396 setXYZW: function(e, t, i, n, r) { 8397 return e *= this.itemSize, this.array[e + 0] = t, this.array[e + 1] = i, this.array[e + 2] = n, this.array[e + 3] = r, this 8398 }, 8399 onUpload: function(e) { 8400 return this.onUploadCallback = e, this 8401 }, 8402 clone: function() { 8403 return new this.constructor(this.array, this.itemSize).copy(this) 8404 } 8405 }), (Cr.prototype = Object.create(Sr.prototype)).constructor = Cr, (Ar.prototype = Object.create(Sr.prototype)).constructor = Ar, (Rr.prototype = Object.create(Sr.prototype)).constructor = Rr, (Lr.prototype = Object.create(Sr.prototype)).constructor = Lr, (Pr.prototype = Object.create(Sr.prototype)).constructor = Pr, (kr.prototype = Object.create(Sr.prototype)).constructor = kr,
8405(Or.prototype = Object.create(Sr.prototype)).constructor = Or, (Dr.prototype = Object.create(Sr.prototype)).constructor = Dr, (Ir.prototype = Object.create(Sr.prototype)).constructor = Ir, Object.assign(zr.prototype, { 8406 computeGroups: function(e) { 8407 for (var t, i = [], n = void 0, r = e.faces, o = 0; o < r.length; o++) { 8408 var a = r[o]; 8409 a.materialIndex !== n && (n = a.materialIndex, void 0 !== t && (t.count = 3 * o - t.start, i.push(t)), t = { 8410 start: 3 * o, 8411 materialIndex: n 8412 }) 8413 } 8414 void 0 !== t && (t.count = 3 * o - t.start, i.push(t)), this.groups = i 8415 }, 8416 fromGeometry: function(e) { 8417 var t, i = e.faces, 8418 n = e.vertices, 8419 r = e.faceVertexUvs, 8420 o = r[0] && 0 < r[0].length, 8421 a = r[1] && 0 < r[1].length, 8422 s = e.morphTargets, 8423 l = s.length; 8424 if (0 < l) { 8425 t = []; 8426 for (var c = 0; c < l; c++) t[c] = []; 8427 this.morphTargets.position = t 8428 } 8429 var u, h = e.morphNormals, 8430 d = h.length; 8431 if (0 < d) { 8432 u = []; 8433 for (c = 0; c < d; c++) u[c] = []; 8434 this.morphTargets.normal = u 8435 } 8436 var p = e.skinIndices, 8437 f = e.skinWeights, 8438 m = p.length === n.length, 8439 g = f.length === n.length; 8440 for (c = 0; c < i.length; c++) { 8441 var v = i[c]; 8442 this.vertices.push(n[v.a], n[v.b], n[v.c]); 8443 var y = v.vertexNormals; 8444 if (3 === y.length) this.normals.push(y[0], y[1], y[2]); 8445 else { 8446 var b = v.normal; 8447 this.normals.push(b, b, b) 8448 } 8449 var w, x = v.vertexColors; 8450 if (3 === x.length) this.colors.push(x[0], x[1], x[2]); 8451 else { 8452 var _ = v.color; 8453 this.colors.push(_, _, _) 8454 } 8455 if (!0 === o) void 0 !== (w = r[0][c]) ? this.uvs.push(w[0], w[1], w[2]) : (console.warn("THREE.DirectGeometry.fromGeometry(): Undefined vertexUv ", c), this.uvs.push(new lt, new lt, new lt)); 8456 if (!0 === a) void 0 !== (w = r[1][c]) ? this.uvs2.push(w[0], w[1], w[2]) : (console.warn("THREE.DirectGeometry.fromGeometry(): Undefined vertexUv2 ", c), this.uvs2.push(new lt, new lt, new lt)); 8457 for (var T = 0; T < l; T++) { 8458 var E = s[T].vertices; 8459 t[T].push(E[v.a], E[v.b], E[v.c]) 8460 } 8461 for (T = 0; T < d; T++) { 8462 var M = h[T].vertexNormals[c]; 8463 u[T].push(M.a, M.b, M.c) 8464 } 8465 m && this.skinIndices.push(p[v.a], p[v.b], p[v.c]), g && this.skinWeights.push(f[v.a], f[v.b], f[v.c]) 8466 } 8467 return this.computeGroups(e), this.verticesNeedUpdate = e.verticesNeedUpdate, this.normalsNeedUpdate = e.normalsNeedUpdate, this.colorsNeedUpdate = e.colorsNeedUpdate, this.uvsNeedUpdate = e.uvsNeedUpdate, this.groupsNeedUpdate = e.groupsNeedUpdate, this 8468 } 8469 }), Fr.MaxIndex = 65535, Object.assign(Fr.prototype, t.prototype, { 8470 isBufferGeometry: !0, 8471 getIndex: function() { 8472 return this.index 8473 }, 8474 setIndex: function(e) { 8475 Array.isArray(e) ? this.index = new(65535 < Nr(e) ? Or : Pr)(e, 1) : this.index = e 8476 }, 8477 addAttribute: function(e, t) { 8478 return t && t.isBufferAttribute || t && t.isInterleavedBufferAttribute ? "index" === e ? (console.warn("THREE.BufferGeometry.addAttribute: Use .setIndex() for index attribute."), void this.setIndex(t)) : (this.attributes[e] = t, this) : (console.warn("THREE.BufferGeometry: .addAttribute() now expects ( name, attribute )."), void this.addAttribute(e, new Sr(t, arguments[2]))) 8479 }, 8480 getAttribute: function(e) { 8481 return this.attributes[e] 8482 }, 8483 removeAttribute: function(e) { 8484 return delete this.attributes[e], this 8485 }, 8486 addGroup: function(e, t, i) { 8487 this.groups.push({ 8488 start: e, 8489 count: t, 8490 materialIndex: void 0 !== i ? i : 0 8491 }) 8492 }, 8493 clearGroups: function() { 8494 this.groups = [] 8495 }, 8496 setDrawRange: function(e, t) { 8497 this.drawRange.start = e, this.drawRange.count = t 8498 }, 8499 applyMatrix: function(e) { 8500 var t = this.attributes.position; 8501 void 0 !== t && (e.applyToBufferAttribute(t), t.needsUpdate = !0); 8502 var i = this.attributes.normal; 8503 void 0 !== i && ((new ln).getNormalMatrix(e).applyToBufferAttribute(i), i.needsUpdate = !0); 8504 return null !== this.boundingBox && this.computeBoundingBox(), null !== this.boundingSphere && this.computeBoundingSphere(), this 8505 }, 8506 rotateX: (Jn = new It, function(e) { 8507 return Jn.makeRotationX(e), this.applyMatrix(Jn), this 8508 }), 8509 rotateY: (Qn = new It, function(e) { 8510 return Qn.makeRotationY(e), this.applyMatrix(Qn), this 8511 }), 8512 rotateZ: (Zn = new It, function(e) { 8513 return Zn.makeRotationZ(e), this.applyMatrix(Zn), this 8514 }), 8515 translate: (Yn = new It, function(e, t, i) { 8516 return Yn.makeTranslation(e, t, i), this.applyMatrix(Yn
8516), this 8517 }), 8518 scale: (Xn = new It, function(e, t, i) { 8519 return Xn.makeScale(e, t, i), this.applyMatrix(Xn), this 8520 }), 8521 lookAt: (qn = new On, function(e) { 8522 qn.lookAt(e), qn.updateMatrix(), this.applyMatrix(qn.matrix) 8523 }), 8524 center: function() { 8525 this.computeBoundingBox(); 8526 var e = this.boundingBox.getCenter().negate(); 8527 return this.translate(e.x, e.y, e.z), e 8528 }, 8529 setFromObject: function(e) { 8530 var t = e.geometry; 8531 if (e.isPoints || e.isLine) { 8532 var i = new Dr(3 * t.vertices.length, 3), 8533 n = new Dr(3 * t.colors.length, 3); 8534 if (this.addAttribute("position", i.copyVector3sArray(t.vertices)), this.addAttribute("color", n.copyColorsArray(t.colors)), t.lineDistances && t.lineDistances.length === t.vertices.length) { 8535 var r = new Dr(t.lineDistances.length, 1); 8536 this.addAttribute("lineDistance", r.copyArray(t.lineDistances)) 8537 } 8538 null !== t.boundingSphere && (this.boundingSphere = t.boundingSphere.clone()), null !== t.boundingBox && (this.boundingBox = t.boundingBox.clone()) 8539 } else e.isMesh && t && t.isGeometry && this.fromGeometry(t); 8540 return this 8541 }, 8542 updateFromObject: function(e) { 8543 var t, i = e.geometry; 8544 if (e.isMesh) { 8545 var n = i.__directGeometry; 8546 if (!0 === i.elementsNeedUpdate && (n = void 0, i.elementsNeedUpdate = !1), void 0 === n) return this.fromGeometry(i); 8547 n.verticesNeedUpdate = i.verticesNeedUpdate, n.normalsNeedUpdate = i.normalsNeedUpdate, n.colorsNeedUpdate = i.colorsNeedUpdate, n.uvsNeedUpdate = i.uvsNeedUpdate, n.groupsNeedUpdate = i.groupsNeedUpdate, i.verticesNeedUpdate = !1, i.normalsNeedUpdate = !1, i.colorsNeedUpdate = !1, i.uvsNeedUpdate = !1, i.groupsNeedUpdate = !1, i = n 8548 } 8549 return !0 === i.verticesNeedUpdate && (void 0 !== (t = this.attributes.position) && (t.copyVector3sArray(i.vertices), t.needsUpdate = !0), i.verticesNeedUpdate = !1), !0 === i.normalsNeedUpdate && (void 0 !== (t = this.attributes.normal) && (t.copyVector3sArray(i.normals), t.needsUpdate = !0), i.normalsNeedUpdate = !1), !0 === i.colorsNeedUpdate && (void 0 !== (t = this.attributes.color) && (t.copyColorsArray(i.colors), t.needsUpdate = !0), i.colorsNeedUpdate = !1), i.uvsNeedUpdate && (void 0 !== (t = this.attributes.uv) && (t.copyVector2sArray(i.uvs), t.needsUpdate = !0), i.uvsNeedUpdate = !1), i.lineDistancesNeedUpdate && (void 0 !== (t = this.attributes.lineDistance) && (t.copyArray(i.lineDistances), t.needsUpdate = !0), i.lineDistancesNeedUpdate = !1), i.groupsNeedUpdate && (i.computeGroups(e.geometry), this.groups = i.groups, i.groupsNeedUpdate = !1), this 8550 }, 8551 fromGeometry: function(e) { 8552 return e.__directGeometry = (new zr).fromGeometry(e), this.fromDirectGeometry(e.__directGeometry) 8553 }, 8554 fromDirectGeometry: function(e) { 8555 var t = new Float32Array(3 * e.vertices.length); 8556 if (this.addAttribute("position", new Sr(t, 3).copyVector3sArray(e.vertices)), 0 < e.normals.length) { 8557 var i = new Float32Array(3 * e.normals.length); 8558 this.addAttribute("normal", new Sr(i, 3).copyVector3sArray(e.normals)) 8559 } 8560 if (0 < e.colors.length) { 8561 var n = new Float32Array(3 * e.colors.length); 8562 this.addAttribute("color", new Sr(n, 3).copyColorsArray(e.colors)) 8563 } 8564 if (0 < e.uvs.length) { 8565 var r = new Float32Array(2 * e.uvs.length); 8566 this.addAttribute("uv", new Sr(r, 2).copyVector2sArray(e.uvs)) 8567 } 8568 if (0 < e.uvs2.length) { 8569 var o = new Float32Array(2 * e.uvs2.length); 8570 this.addAttribute("uv2", new Sr(o, 2).copyVector2sArray(e.uvs2)) 8571 } 8572 if (0 < e.indices.length) { 8573 var a = new(65535 < Nr(e.indices) ? Uint32Array : Uint16Array)(3 * e.indices.length);
8574 this.setIndex(new Sr(a, 1).copyIndicesArray(e.indices)) 8575 } 8576 for (var s in this.groups = e.groups, e.morphTargets) { 8577 for (var l = [], c = e.morphTargets[s], u = 0, h = c.length; u < h; u++) { 8578 var d = c[u], 8579 p = new Dr(3 * d.length, 3); 8580 l.push(p.copyVector3sArray(d)) 8581 } 8582 this.morphAttributes[s] = l 8583 } 8584 if (0 < e.skinIndices.length) { 8585 var f = new Dr(4 * e.skinIndices.length, 4); 8586 this.addAttribute("skinIndex", f.copyVector4sArray(e.skinIndices)) 8587 } 8588 if (0 < e.skinWeights.length) { 8589 var m = new Dr(4 * e.skinWeights.length, 4); 8590 this.addAttribute("skinWeight", m.copyVector4sArray(e.skinWeights)) 8591 } 8592 return null !== e.boundingSphere && (this.boundingSphere = e.boundingSphere.clone()), null !== e.boundingBox && (this.boundingBox = e.boundingBox.clone()), this 8593 }, 8594 computeBoundingBox: function() { 8595 null === this.boundingBox && (this.boundingBox = new an); 8596 var e = this.attributes.position; 8597 void 0 !== e ? this.boundingBox.setFromBufferAttribute(e) : 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) 8598 }, 8599 computeBoundingSphere: (Vn = new an, Wn = new Dt, function() { 8600 null === this.boundingSphere && (this.boundingSphere = new sn); 8601 var e = this.attributes.position; 8602 if (e) { 8603 var t = this.boundingSphere.center; 8604 Vn.setFromBufferAttribute(e), Vn.getCenter(t); 8605 for (var i = 0, n = 0, r = e.count; n < r; n++) Wn.x = e.getX(n), Wn.y = e.getY(n), Wn.z = e.getZ(n), i = Math.max(i, t.distanceToSquared(Wn)); 8606 this.boundingSphere.radius = Math.sqrt(i), isNaN(this.boundingSphere.radius) && console.error('THREE.BufferGeometry.computeBoundingSphere(): Computed radius is NaN. The "position" attribute is likely to have NaN values.', this) 8607 } 8608 }), 8609 computeFaceNormals: function() {}, 8610 computeVertexNormals: function() { 8611 var e = this.index, 8612 t = this.attributes, 8613 i = this.groups; 8614 if (t.position) { 8615 var n = t.position.array; 8616 if (void 0 === t.normal) this.addAttribute("normal", new Sr(new Float32Array(n.length), 3)); 8617 else 8618 for (var r = t.normal.array, o = 0, a = r.length; o < a; o++) r[o] = 0; 8619 var s, l, c, u = t.normal.array, 8620 h = new Dt, 8621 d = new Dt, 8622 p = new Dt, 8623 f = new Dt, 8624 m = new Dt; 8625 if (e) { 8626 var g = e.array; 8627 0 === i.length && this.addGroup(0, g.length); 8628 for (var v = 0, y = i.length; v < y; ++v) { 8629 var b = i[v], 8630 w = b.start; 8631 for (o = w, a = w + b.count; o < a; o += 3) s = 3 * g[o + 0], l = 3 * g[o + 1], c = 3 * g[o + 2], h.fromArray(n, s), d.fromArray(n, l), p.fromArray(n, c), f.subVectors(p, d), m.subVectors(h, d), f.cross(m), u[s] += f.x, u[s + 1] += f.y, u[s + 2] += f.z, u[l] += f.x, u[l + 1] += f.y, u[l + 2] += f.z, u[c] += f.x, u[c + 1] += f.y, u[c + 2] += f.z 8632 } 8633 } else 8634 for (o = 0, a = n.length; o < a; o += 9) h.fromArray(n, o), d.fromArray(n, o + 3), p.fromArray(n, o + 6), f.subVectors(p, d), m.subVectors(h, d), f.cross(m), u[o] = f.x, u[o + 1] = f.y, u[o + 2] = f.z, u[o + 3] = f.x, u[o + 4] = f.y, u[o + 5] = f.z, u[o + 6] = f.x, u[o + 7] = f.y, u[o + 8] = f.z; 8635 this.normalizeNormals(), t.normal.needsUpdate = !0 8636 } 8637 }, 8638 merge: function(e, t) { 8639 if (e && e.isBufferGeometry) { 8640 void 0 === t && (t = 0); 8641 var i = this.attributes; 8642 for (var n in i) 8643 if (void 0 !== e.attributes[n]) 8644 for (var r = i[n].array, o = e.attributes[n], a = o.array, s = 0, l = o.itemSize * t; s < a.length; s++, l++) r[l] = a[s]; 8645 return this 8646 } 8647 console.error("THREE.BufferGeometry.merge(): geometry not an instance of THREE.BufferGeometry.", e) 8648 }, 8649 normalizeNormals: (Gn = new Dt, function() { 8650 for (var e = this.attributes.normal, t = 0, i = e.count; t < i; t++) Gn.x = e.getX(t), Gn.y = e.getY(t), Gn.z = e.getZ(t), Gn.normalize(), e.setXYZ(t, Gn.x, Gn.y, Gn.z) 8651 }), 8652 toNonIndexed: function() { 8653 if (null === this.index) return console.warn("THREE.BufferGeometry.toNonIndexed(): Geometry is already non-indexed."), this; 8654 var e = new Fr, 8655 t = this.index.array, 8656 i = this.attributes; 8657 for (var n in i) { 8658 for (var r = i[n], o = r.array, a = r.itemSize, s = new o.constructor(t.length * a), l = 0, c = 0, u = 0, h = t.length; u < h; u++) { 8659 l = t[u] * a; 8660 for (var d = 0; d < a; d++) s[c++] = o[l++] 8661 } 8662 e.addAttribute(n, new Sr(s, a)) 8663 } 8664 return e 8665 }, 8666 toJSON: function() { 8667 var e = { 8668 metadata: { 8669 version: 4.5, 8670 type: "BufferGeometry", 8671 generator: "BufferGeometry.toJSON" 8672 } 8673 }; 8674 if (e.uuid = this.uuid, e.type = this.type, "" !== this.name && (e.name = this.name), void 0 !== this.parameters) { 8675 var t = this.parameters; 8676 for (var i in t) void 0 !== t[i] && (e[i] = t[i]); 8677 return e 8678 } 8679 e.data = { 8680 attributes: {} 8681 }; 8682 var n = this.index; 8683 if (null !== n) { 8684 var r = Array.prototype.slice.call(n.array); 8685 e.data.index = {
8686 type: n.array.constructor.name, 8687 array: r 8688 } 8689 } 8690 var o = this.attributes; 8691 for (var i in o) { 8692 var a = o[i]; 8693 r = Array.prototype.slice.call(a.array); 8694 e.data.attributes[i] = { 8695 itemSize: a.itemSize, 8696 type: a.array.constructor.name, 8697 array: r, 8698 normalized: a.normalized 8699 } 8700 } 8701 var s = this.groups; 8702 0 < s.length && (e.data.groups = JSON.parse(JSON.stringify(s))); 8703 var l = this.boundingSphere; 8704 return null !== l && (e.data.boundingSphere = { 8705 center: l.center.toArray(), 8706 radius: l.radius 8707 }), e 8708 }, 8709 clone: function() { 8710 return (new Fr).copy(this) 8711 }, 8712 copy: function(e) { 8713 var t, i, n; 8714 this.index = null, this.attributes = {}, this.morphAttributes = {}, this.groups = [], this.boundingBox = null, this.boundingSphere = null, this.name = e.name; 8715 var r = e.index; 8716 null !== r && this.setIndex(r.clone()); 8717 var o = e.attributes; 8718 for (t in o) { 8719 var a = o[t]; 8720 this.addAttribute(t, a.clone()) 8721 } 8722 var s = e.morphAttributes; 8723 for (t in s) { 8724 var l = [], 8725 c = s[t]; 8726 for (i = 0, n = c.length; i < n; i++) l.push(c[i].clone()); 8727 this.morphAttributes[t] = l
8728 } 8729 var u = e.groups; 8730 for (i = 0, n = u.length; i < n; i++) { 8731 var h = u[i]; 8732 this.addGroup(h.start, h.count, h.materialIndex) 8733 } 8734 var d = e.boundingBox; 8735 null !== d && (this.boundingBox = d.clone()); 8736 var p = e.boundingSphere; 8737 return null !== p && (this.boundingSphere = p.clone()), this.drawRange.start = e.drawRange.start, this.drawRange.count = e.drawRange.count, this 8738 }, 8739 dispose: function() { 8740 this.dispatchEvent({ 8741 type: "dispose" 8742 }) 8743 } 8744 }), (Ur.prototype = Object.create(Mr.prototype)).constructor = Ur, (Br.prototype = Object.create(Fr.prototype)).constructor = Br, (Hr.prototype = Object.create(Mr.prototype)).constructor = Hr, ($r.prototype = Object.create(Fr.prototype)).constructor = $r, ((jr.prototype = Object.create(tn.prototype)).constructor = jr).prototype.isMeshBasicMaterial = !0, jr.prototype.copy = function(e) { 8745 return tn.prototype.copy.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.skinning = e.skinning, this.morphTargets = e.morphTargets, this 8746 }, Object.assign(Gr.prototype, { 8747 set: function(e, t) { 8748 return this.origin.copy(e), this.direction.copy(t), this 8749 }, 8750 clone: function() { 8751 return (new this.constructor).copy(this) 8752 }, 8753 copy: function(e) { 8754 return this.origin.copy(e.origin), this.direction.copy(e.direction), this 8755 }, 8756 at: function(e, t) { 8757 return (t || new Dt).copy(this.direction).multiplyScalar(e).add(this.origin) 8758 }, 8759 lookAt: function(e) { 8760 return this.direction.copy(e).sub(this.origin).normalize(), this 8761 }, 8762 recast: (cr = new Dt, function(e) { 8763 return this.origin.copy(this.at(e, cr)), this 8764 }), 8765 closestPointToPoint: function(e, t) { 8766 var i = t || new Dt; 8767 i.subVectors(e, this.origin); 8768 var n = i.dot(this.direction); 8769 return n < 0 ? i.copy(this.origin) : i.copy(this.direction).multiplyScalar(n).add(this.origin) 8770 }, 8771 distanceToPoint: function(e) { 8772 return Math.sqrt(this.distanceSqToPoint(e)) 8773 }, 8774 distanceSqToPoint: (lr = new Dt, function(e) { 8775 var t = lr.subVectors(e, this.origin).dot(this.direction); 8776 return t < 0 ? this.origin.distanceToSquared(e) : (lr.copy(this.direction).multiplyScalar(t).add(this.origin), lr.distanceToSquared(e)) 8777 }), 8778 distanceSqToSegment: (or = new Dt, ar = new Dt, sr = new Dt, function(e, t, i, n) { 8779 or.copy(e).add(t).multiplyScalar(.5), ar.copy(t).sub(e).normalize(), sr.copy(this.origin).sub(or); 8780 var r, o, a, s, l = .5 * e.distanceTo(t), 8781 c = -this.direction.dot(ar), 8782 u = sr.dot(this.direction), 8783 h = -sr.dot(ar), 8784 d = sr.lengthSq(), 8785 p = Math.abs(1 - c * c); 8786 if (0 < p) 8787 if (o = c * u - h, s = l * p, 0 <= (r = c * h - u)) 8788 if (-s <= o) 8789 if (o <= s) { 8790 var f = 1 / p; 8791 a = (r *= f) * (r + c * (o *= f) + 2 * u) + o * (c * r + o + 2 * h) + d 8792 } else o = l, a = -(r = Math.max(0, -(c * o + u))) * r + o * (o + 2 * h) + d; 8793 else o = -l, a = -(r = Math.max(0, -(c * o + u))) * r + o * (o + 2 * h) + d; 8794 else o <= -s ? a = -(r = Math.max(0, -(-c * l + u))) * r + (o = 0 < r ? -l : Math.min(Math.max(-l, -h), l)) * (o + 2 * h) + d : o <= s ? (r = 0, a = (o = Math.min(Math.max(-l, -h), l)) * (o + 2 * h) + d) : a = -(r = Math.max(0, -(c * l + u))) * r + (o = 0 < r ? l : Math.min(Math.max(-l, -h), l)) * (o + 2 * h) + d; 8795 else o = 0 < c ? -l : l, a = -(r = Math.max(0, -(c * o + u))) * r + o * (o + 2 * h) + d; 8796 return i && i.copy(this.direction).multiplyScalar(r).add(this.origin), n && n.copy(ar).multiplyScalar(o).add(or), a 8797 }), 8798 intersectSphere: (rr = new Dt, function(e, t) { 8799 rr.subVectors(e.center, this.origin); 8800 var i = rr.dot(this.direction), 8801 n = rr.dot(rr) - i * i, 8802 r = e.radius * e.radius; 8803 if (r < n) return null; 8804 var o = Math.sqrt(r - n), 8805 a = i - o, 8806 s = i + o; 8807 return a < 0 && s < 0 ? null : a < 0 ? this.at(s, t) : this.at(a, t) 8808 }), 8809 intersectsSphere: function(e) { 8810 return this.distanceToPoint(e.center) <= e.radius 8811 }, 8812 distanceToPlane: function(e) { 8813 var t = e.normal.dot(this.direction); 8814 if (0 === t) return 0 === e.distanceToPoint(this.origin) ? 0 : null; 8815 var i = -(this.origin.dot(e.normal) + e.constant) / t;
8816 return 0 <= i ? i : null 8817 }, 8818 intersectPlane: function(e, t) { 8819 var i = this.distanceToPlane(e); 8820 return null === i ? null : this.at(i, t) 8821 }, 8822 intersectsPlane: function(e) { 8823 var t = e.distanceToPoint(this.origin); 8824 return 0 === t || e.normal.dot(this.direction) * t < 0 8825 }, 8826 intersectBox: function(e, t) { 8827 var i, n, r, o, a, s, l = 1 / this.direction.x, 8828 c = 1 / this.direction.y, 8829 u = 1 / this.direction.z, 8830 h = this.origin; 8831 return 0 <= l ? (i = (e.min.x - h.x) * l, n = (e.max.x - h.x) * l) : (i = (e.max.x - h.x) * l, n = (e.min.x - h.x) * l), 0 <= c ? (r = (e.min.y - h.y) * c, o = (e.max.y - h.y) * c) : (r = (e.max.y - h.y) * c, o = (e.min.y - h.y) * c), o < i || n < r ? null : ((i < r || i != i) && (i = r), (o < n || n != n) && (n = o), 0 <= u ? (a = (e.min.z - h.z) * u, s = (e.max.z - h.z) * u) : (a = (e.max.z - h.z) * u, s = (e.min.z - h.z) * u), s < i || n < a ? null : ((i < a || i != i) && (i = a), (s < n || n != n) && (n = s), n < 0 ? null : this.at(0 <= i ? i : n, t))) 8832 }, 8833 intersectsBox: (nr = new Dt, function(e) { 8834 return null !== this.intersectBox(e, nr) 8835 }), 8836 intersectTriangle: (Kn = new Dt, er = new Dt, tr = new Dt, ir = new Dt, function(e, t, i, n, r) { 8837 er.subVectors(t, e), tr.subVectors(i, e), ir.crossVectors(er, tr); 8838 var o, a = this.direction.dot(ir); 8839 if (0 < a) { 8840 if (n) return null; 8841 o = 1 8842 } else { 8843 if (!(a < 0)) return null; 8844 o = -1, a = -a 8845 } 8846 Kn.subVectors(this.origin, e); 8847 var s = o * this.direction.dot(tr.crossVectors(Kn, tr)); 8848 if (s < 0) return null; 8849 var l = o * this.direction.dot(er.cross(Kn)); 8850 if (l < 0) return null; 8851 if (a < s + l) return null; 8852 var c = -o * Kn.dot(ir); 8853 return c < 0 ? null : this.at(c / a, r) 8854 }), 8855 applyMatrix4: function(e) { 8856 return this.origin.applyMatrix4(e), this.direction.transformDirection(e), this 8857 }, 8858 equals: function(e) { 8859 return e.origin.equals(this.origin) && e.direction.equals(this.direction) 8860 } 8861 }), Object.assign(Vr.prototype, { 8862 set: function(e, t) { 8863 return this.start.copy(e), this.end.copy(t), this 8864 }, 8865 clone: function() { 8866 return (new this.constructor).copy(this) 8867 }, 8868 copy: function(e) { 8869 return this.start.copy(e.start), this.end.copy(e.end), this 8870 }, 8871 getCenter: function(e) { 8872 return (e || new Dt).addVectors(this.start, this.end).multiplyScalar(.5) 8873 }, 8874 delta: function(e) { 8875 return (e || new Dt).subVectors(this.end, this.start) 8876 }, 8877 distanceSq: function() { 8878 return this.start.distanceToSquared(this.end) 8879 }, 8880 distance: function() { 8881 return this.start.distanceTo(this.end) 8882 }, 8883 at: function(e, t) { 8884 var i = t || new Dt; 8885 return this.delta(i).multiplyScalar(e).add(this.start) 8886 }, 8887 closestPointToPointParameter: (ur = new Dt, hr = new Dt, function(e, t) { 8888 ur.subVectors(e, this.start), hr.subVectors(this.end, this.start); 8889 var i = hr.dot(hr), 8890 n = hr.dot(ur) / i; 8891 return t && (n = st.clamp(n, 0, 1)), n 8892 }), 8893 closestPointToPoint: function(e, t, i) { 8894 var n = this.closestPointToPointParameter(e, t), 8895 r = i || new Dt; 8896 return this.delta(r).multiplyScalar(n).add(this.start) 8897 }, 8898 applyMatrix4: function(e) { 8899 return this.start.applyMatrix4(e), this.end.applyMatrix4(e), this 8900 }, 8901 equals: function(e) { 8902 return e.start.equals(this.start) && e.end.equals(this.end) 8903 } 8904 }), Object.assign(Wr, { 8905 normal: (gr = new Dt, function(e, t, i, n) { 8906 var r = n || new Dt; 8907 r.subVectors(i, t), gr.subVectors(e, t), r.cross(gr); 8908 var o = r.lengthSq(); 8909 return 0 < o ? r.multiplyScalar(1 / Math.sqrt(o)) : r.set(0, 0, 0) 8910 }), 8911 barycoordFromPoint: (pr = new Dt, fr = new Dt, mr = new Dt, function(e, t, i, n, r) { 8912 pr.subVectors(n, t), fr.subVectors(i, t), mr.subVectors(e, t); 8913 var o = pr.dot(pr), 8914 a = pr.dot(fr), 8915 s = pr.dot(mr), 8916 l = fr.dot(fr), 8917 c = fr.dot(mr), 8918 u = o * l - a * a, 8919 h = r || new Dt; 8920 if (0 === u) return h.set(-2, -1, -1); 8921 var d = 1 / u, 8922 p = (l * s - a * c) * d, 8923 f = (o * c - a * s) * d; 8924 return h.set(1 - p - f, f, p) 8925 }), 8926 containsPoint: (dr = new Dt, function(e, t, i, n) { 8927 var r = Wr.barycoordFromPoint(e, t, i, n, dr); 8928 return 0 <= r.x && 0 <= r.y && r.x + r.y <= 1 8929 }) 8930 }), Object.assign(Wr.prototype, { 8931 set: function(e, t, i) { 8932 return this.a.copy(e), this.b.copy(t), this.c.copy(i), this 8933 }, 8934 setFromPointsAndIndices: function(e, t, i, n) { 8935 return this.a.copy(e[t]), this.b.copy(e[i]), this.c.copy(e[n]), this 8936 }, 8937 clone: function() { 8938 return (new this.constructor).copy(this) 8939 }, 8940 copy: function(e) { 8941 return this.a.copy(e.a), this.b.copy(e.b), this.c.copy(e.c), this 8942 }, 8943 area: (xr = new Dt, _r = new Dt, function() { 8944 return xr.subVectors(this.c, this.b), _r.subVectors(this.a, this.b), .5 * xr.cross(_r).length() 8945 }), 8946 midpoint: function(e) { 8947 return (e || new Dt).addVectors(this.a, this.b).add(this.c).multiplyScalar(1 / 3) 8948 }, 8949 normal: function(e) { 8950 return Wr.normal(this.a, this.b, this.c, e) 8951 },
8952 plane: function(e) { 8953 return (e || new cn).setFromCoplanarPoints(this.a, this.b, this.c) 8954 }, 8955 barycoordFromPoint: function(e, t) { 8956 return Wr.barycoordFromPoint(e, this.a, this.b, this.c, t) 8957 }, 8958 containsPoint: function(e) { 8959 return Wr.containsPoint(e, this.a, this.b, this.c) 8960 }, 8961 closestPointToPoint: (vr = new cn, yr = [new Vr, new Vr, new Vr], br = new Dt, wr = new Dt, function(e, t) { 8962 var i = t || new Dt, 8963 n = 1 / 0; 8964 if (vr.setFromCoplanarPoints(this.a, this.b, this.c), vr.projectPoint(e, br), !0 === this.containsPoint(br)) i.copy(br); 8965 else { 8966 yr[0].set(this.a, this.b), yr[1].set(this.b, this.c), yr[2].set(this.c, this.a); 8967 for (var r = 0; r < yr.length; r++) { 8968 yr[r].closestPointToPoint(br, !0, wr); 8969 var o = br.distanceToSquared(wr); 8970 o < n && (n = o, i.copy(wr)) 8971 } 8972 } 8973 return i 8974 }), 8975 equals: function(e) { 8976 return e.a.equals(this.a) && e.b.equals(this.b) && e.c.equals(this.c) 8977 } 8978 }), qr.prototype = Object.assign(Object.create(On.prototype), { 8979 constructor: qr, 8980 isMesh: !0, 8981 setDrawMode: function(e) { 8982 this.drawMode = e 8983 }, 8984 copy: function(e) { 8985 return On.prototype.copy.call(this, e), this.drawMode = e.drawMode, this 8986 }, 8987 updateMorphTargets: function() { 8988 var e, t, i, n = this.geometry; 8989 if (n.isBufferGeometry) { 8990 var r = n.morphAttributes, 8991 o = Object.keys(r); 8992 if (0 < o.length) { 8993 var a = r[o[0]]; 8994 if (void 0 !== a) 8995 for (this.morphTargetInfluences = [], this.morphTargetDictionary = {}, e = 0, t = a.length; e < t; e++) i = a[e].name || String(e), this.morphTargetInfluences.push(0), this.morphTargetDictionary[i] = e 8996 } 8997 } else { 8998 var s = n.morphTargets; 8999 if (void 0 !== s && 0 < s.length) 9000 for (this.morphTargetInfluences = [], this.morphTargetDictionary = {}, e = 0, t = s.length; e < t; e++) i = s[e].name || String(e), this.morphTargetInfluences.push(0), this.morphTargetDictionary[i] = e 9001 } 9002 }, 9003 raycast: function() { 9004 var O = new It, 9005 D = new Gr, 9006 I = new sn, 9007 z = new Dt, 9008 N = new Dt, 9009 F = new Dt, 9010 U = new Dt, 9011 B = new Dt, 9012 H = new Dt, 9013 $ = new lt, 9014 j = new lt, 9015 G = new lt, 9016 s = new Dt, 9017 V = new Dt, 9018 c = new Dt; 9019 9020 function W(e, t, i, n, r, o, a) { 9021 return Wr.barycoordFromPoint(e, t, i, n, s), r.multiplyScalar(s.x), o.multiplyScalar(s.y), a.multiplyScalar(s.z), r.add(o).add(a), r.clone() 9022 } 9023 9024 function q(e, t, i, n, r, o, a, s) { 9025 if (null === (t.side === Y ? n.intersectTriangle(a, o, r, !0, s) : n.intersectTriangle(r, o, a, t.side !== Z, s))) return null; 9026 c.copy(s), c.applyMatrix4(e.matrixWorld); 9027 var l = i.ray.origin.distanceTo(c); 9028 return l < i.near || l > i.far ? null : { 9029 distance: l, 9030 point: c.clone(), 9031 object: e 9032 } 9033 } 9034 9035 function X(e, t, i, n, r, o, a, s) { 9036 z.fromBufferAttribute(n, o), N.fromBufferAttribute(n, a), F.fromBufferAttribute(n, s); 9037 var l = q(e, e.material, t, i, z, N, F, V); 9038 return l && (r && ($.fromBufferAttribute(r, o), j.fromBufferAttribute(r, a), G.fromBufferAttribute(r, s), l.uv = W(V, z, N, F, $, j, G)), l.face = new Nn(o, a, s, Wr.normal(z, N, F)), l.faceIndex = o), l 9039 } 9040 return function(e, t) { 9041 var i, n = this.geometry, 9042 r = this.material, 9043 o = this.matrixWorld; 9044 if (void 0 !== r && (null === n.boundingSphere && n.computeBoundingSphere(), I.copy(n.boundingSphere), I.applyMatrix4(o), !1 !== e.ray.intersectsSphere(I) && (O.getInverse(o), D.copy(e.ray).applyMatrix4(O), null === n.boundingBox || !1 !== D.intersectsBox(n.boundingBox)))) 9045 if (n.isBufferGeometry) { 9046 var a, s, l, c, u, h = n.index, 9047 d = n.attributes.position, 9048 p = n.attributes.uv; 9049 if (null !== h) 9050 for (c = 0, u = h.count; c < u; c += 3) a = h.getX(c), s = h.getX(c + 1), l = h.getX(c + 2), (i = X(this, e, D, d, p, a, s, l)) && (i.faceIndex = Math.floor(c / 3), t.push(i)); 9051 else 9052 for (c = 0, u = d.count; c < u; c += 3)(i = X(this, e, D, d, p, a = c, s = c + 1, l = c + 2)) && (i.index = a, t.push(i)) 9053 } else if (n.isGeometry) { 9054 var f, m, g, v, y = Array.isArray(r), 9055 b = n.vertices, 9056 w = n.faces, 9057 x = n.faceVertexUvs[0]; 9058 0 < x.length && (v = x); 9059 for (var _ = 0, T = w.length; _ < T; _++) { 9060 var E = w[_], 9061 M = y ? r[E.materialIndex] : r; 9062 if (void 0 !== M) { 9063 if (f = b[E.a], m = b[E.b], g = b[E.c], !0 === M.morphTargets) { 9064 var S = n.morphTargets, 9065 C = this.morphTargetInfluences; 9066 z.set(0, 0, 0), N.set(0, 0, 0), F.set(0, 0, 0); 9067 for (var A = 0, R = S.length; A < R; A++) { 9068 var L = C[A]; 9069 if (0 !== L) { 9070 var P = S[A].vertices; 9071 z.addScaledVector(U.subVectors(P[E.a], f), L), N.addScaledVector(B.subVectors(P[E.b], m), L), F.addScaledVector(H.subVectors(P[E.c], g), L) 9072 } 9073 } 9074 z.add(f), N.add(m), F.add(g), f = z, m = N, g = F 9075 } 9076 if (i = q(this, M, e, D, f, m, g, V)) { 9077 if (v && v[_]) { 9078 var k = v[_]; 9079 $.copy(k[0]), j.copy(k[1]), G.copy(k[2]), i.uv = W(V, f, m, g, $, j, G) 9080 } 9081 i.face = E, i.faceIndex = _, t.push(i) 9082 } 9083 } 9084 } 9085 } 9086 } 9087 }(), 9088 clone: function() { 9089 return new this.constructor(this.geometry, this.material).copy(this) 9090 } 9091 }); 9092 var lo, co, uo, ho, po, fo, mo, go, vo, yo, bo, wo, xo, _o, To = 0; 9093 9094 function Eo(e) { 9095 switch (e) { 9096 case Je: 9097 return ["Linear", "( value )"]; 9098 case Ke: 9099 return ["sRGB", "( value )"]; 9100 case tt: 9101 return ["RGBE", "( value )"]; 9102 case it: 9103 return ["RGBM", "( value, 7.0 )"]; 9104 case nt: 9105 return ["RGBM", "( value, 16.0 )"]; 9106 case rt: 9107 return ["RGBD", "( value, 256.0 )"]; 9108 case et: 9109 return ["Gamma", "( value, float( GAMMA_FACTOR ) )"]; 9110 default: 9111 throw new Error("unsupported encoding: " + e) 9112 } 9113 } 9114 9115 function Mo(e, t) { 9116 var i = Eo(t); 9117 return "vec4 " + e + "( vec4 value ) { return " + i[0] + "ToLinear" + i[1] + "; }" 9118 } 9119 9120 function So(e) { 9121 return "" !== e 9122 } 9123 9124 function Co(e, t) { 9125 return e.replace(/NUM_DIR_LIGHTS/g, t.numDirLights).replace(/NUM_SPOT_L
9125IGHTS/g, t.numSpotLights).replace(/NUM_RECT_AREA_LIGHTS/g, t.numRectAreaLights).replace(/NUM_POINT_LIGHTS/g, t.numPointLights).replace(/NUM_HEMI_LIGHTS/g, t.numHemiLights) 9126 } 9127 9128 function Ao(e) { 9129 return e.replace(/^[ \t]*#include +<([\w\d.]+)>/gm, function(e, t) { 9130 var i = Ri[t]; 9131 if (void 0 === i) throw new Error("Can not resolve #include <" + t + ">"); 9132 return Ao(i) 9133 }) 9134 } 9135 9136 function Ro(e) { 9137 return e.replace(/for \( int i \= (\d+)\; i < (\d+)\; i \+\+ \) \{([\s\S]+?)(?=\})\}/g, function(e, t, i, n) { 9138 for (var r = "", o = parseInt(t); o < parseInt(i); o++) r += n.replace(/\[ i \]/g, "[ " + o + " ]"); 9139 return r 9140 }) 9141 } 9142 9143 function Lo(e, t, i, n, r, o) { 9144 var a = e.context, 9145 s = n.defines, 9146 l = r.vertexShader, 9147 c = r.fragmentShader, 9148 u = "SHADOWMAP_TYPE_BASIC"; 9149 o.shadowMapType === N ? u = "SHADOWMAP_TYPE_PCF" : o.shadowMapType === F && (u = "SHADOWMAP_TYPE_PCF_SOFT"); 9150 var h = "ENVMAP_TYPE_CUBE", 9151 d = "ENVMAP_MODE_REFLECTION", 9152 p = "ENVMAP_BLENDING_MULTIPLY"; 9153 if (o.envMap) { 9154 switch (n.envMap.mapping) { 9155 case he: 9156 case de: 9157 h = "ENVMAP_TYPE_CUBE"; 9158 break; 9159 case ge: 9160 case ve: 9161 h = "ENVMAP_TYPE_CUBE_UV"; 9162 break; 9163 case pe: 9164 case fe: 9165 h = "ENVMAP_TYPE_EQUIREC"; 9166 break; 9167 case me: 9168 h = "ENVMAP_TYPE_SPHERE" 9169 } 9170 switch (n.envMap.mapping) { 9171 case de: 9172 case fe: 9173 d = "ENVMAP_MODE_REFRACTION" 9174 } 9175 switch (n.combine) { 9176 case U: 9177 p = "ENVMAP_BLENDING_MULTIPLY"; 9178 break; 9179 case B: 9180 p = "ENVMAP_BLENDING_MIX"; 9181 break; 9182 case H: 9183 p = "ENVMAP_BLENDING_ADD" 9184 } 9185 } 9186 var f, m, g, v, y, b, w, x, _ = 0 < e.gammaFactor ? e.gammaFactor : 1, 9187 T = (f = n.extensions, m = o, g = t, [(f = f || {}).derivatives || m.envMapCubeUV || m.bumpMap || m.normalMap || m.flatShading ? "#extension GL_OES_standard_derivatives : enable" : "", (f.fragDepth || m.logarithmicDepthBuffer) && g.get("EXT_frag_depth") ? "#extension GL_EXT_frag_depth : enable" : "", f.drawBuffers && g.get("WEBGL_draw_buffers") ? "#extension GL_EXT_draw_buffers : require" : "", (f.shaderTextureLOD || m.envMap) && g.get("EXT_shader_texture_lod") ? "#extension GL_EXT_shader_texture_lod : enable" : ""].filter(So).join("\n")), 9188 E = function(e) { 9189 var t = []; 9190 for (var i in e) { 9191 var n = e[i]; 9192 !1 !== n && t.push("#define " + i + " " + n) 9193 } 9194 return t.join("\n") 9195 }(s), 9196 M = a.createProgram(); 9197 n.isRawShaderMaterial ? (v = [E, "\n"].filter(So).join("\n"), y = [T, E, "\n"].filter(So).join("\n")) : (v = ["precision " + o.precision + " float;", "precision " + o.precision + " int;", "#define SHADER_NAME " + r.name, E, o.supportsVertexTextures ? "#define VERTEX_TEXTURES" : "", "#define GAMMA_FACTOR " + _, "#define MAX_BONES " + o.maxBones, o.useFog && o.fog ? "#define USE_FOG" : "", o.useFog && o.fogExp ? "#define FOG_EXP2" : "", o.map ? "#define USE_MAP" : "", o.envMap ? "#define USE_ENVMAP" : "", o.envMap ? "#define " + d : "", o.lightMap ? "#define USE_LIGHTMAP" : "", o.aoMap ? "#define USE_AOMAP" : "", o.emissiveMap ? "#define USE_EMISSIVEMAP" : "", o.bumpMap ? "#define USE_BUMPMAP" : "", o.normalMap ? "#define USE_NORMALMAP" : "", o.displacementMap && o.supportsVertexTextures ? "#define USE_DISPLACEMENTMAP" : "", o.specularMap ? "#define USE_SPECULARMAP" : "", o.roughnessMap ? "#define USE_ROUGHNESSMAP" : "", o.metalnessMap ? "#define USE_METALNESSMAP" : "", o.alphaMap ? "#define USE_ALPHAMAP" : "", o.vertexColors ? "#define USE_COLOR" : "", o.flatShading ? "#define FLAT_SHADED" : "", o.skinning ? "#define USE_SKINNING" : "", o.useVertexTexture ? "#define BONE_TEXTURE" : "", o.morphTargets ? "#define USE_MORPHTARGETS" : "", o.morphNormals && !1 === o.flatShading ? "#define USE_MORPHNORMALS" : "", o.doubleSided ? "#define DOUBLE_SIDED" : "", o.flipSided ? "#define FLIP_SIDED" : "", "#define NUM_CLIPPING_PLANES " + o.numClippingPlanes, o.shadowMapEnabled ? "#define USE_SHADOWMAP" : "", o.shadowMapEnabled ? "#define " + u : "", o.sizeAttenuation ? "#define USE_SIZEATTENUATION" : "", o.logarithmicDepthBuffer ? "#define USE_LOGDEPTHBUF" : "", o.logarithmicDepthBuffer && t.get("EXT_frag_depth") ? "#define USE_LOGDEPTHBUF_EXT" : "", "uniform mat4 modelMatrix;", "uniform mat4 modelViewMatrix;", "uniform mat4 projectionMatrix;", "uniform mat4 viewMatrix;", "uniform mat3 normalMatrix;", "uniform vec3 cameraPosition;", "attribute vec3 position;", "attribute vec3 normal;", "attribute vec2 uv;", "#ifdef USE_COLOR", "\tattribute vec3 color;", "#endif", "#ifdef USE_MORPHTARGETS", "\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(So).join("\n"), y = [T, "precision " + o.precision + " float;", "precision " + o.precision + " int;", "#define SHADER_NAME " + r.name, E, o.alphaTest ? "#define ALPHATEST " + o.alphaTest : "", "#define GAMMA_FACTOR " + _, o.useFog && o.fog ? "#define USE_FOG" : "", o.useFog && o.fogExp ? "#define FOG_EXP2" : "", o.map ? "#define USE_MAP" : "", o.envMap ? "#define USE_ENVMAP" : "", o.envMap ? "#define " + h : "", o.envMap ? "#define " + d : "", o.envMap ? "#define " + p : "", o.lightMap ? "#define USE_LIGHTMAP" : "", o.aoMap ? "#define USE_AOMAP" : "", o.emissiveMap ? "#define USE_EMISSIVEMAP" : "", o.bumpMap ? "#define USE_BUMPMAP" : "", o.normalMap ? "#define USE_NORMALMAP" : "", o.specularMap ? "#define USE_SPECULARMAP" : "", o.roughnessMap ? "#define USE_ROUGHNESSMAP" : "", o.metalnessMap ? "#define USE_METALNESSMAP" : "", o.alphaMap ? "#define USE_ALPHAMAP" : "", o.vertexColors ? "#define USE_COLOR" : "", o.gradientMap ? "#define USE_GRADIENTMAP" : "", o.flatShading ? "#define FLAT_SHADED" : "", o.doubleSided ? "#define DOUBLE_SIDED" : "", o.flipSided ? "#define FLIP_SIDED" : "", "#define NUM_CLIPPING_PLANES " + o.numClippingPlanes, "#define UNION_CLIPPING_PLANES " + (o.numClippingPlanes - o.numClipIntersection), o.shadowMapEnabled ? "#define USE_SHADOWMAP" : "", o.shadowMapEnabled ? "#define " + u : "", o.premultipliedAlpha ? "#define PREMULTIPLIED_ALPHA" : "", o.physicallyCorrectLights ? "#define PHYSICALLY_CORRECT_LIGHTS" : "", o.logarithmicDepthBuffer ? "#define USE_LOGDEPTHBUF" : "", o.logarithmicDepthBuffer && t.get("EXT_frag_depth") ? "#define USE_LOGDEPTHBUF_EXT" : "", o.envMap && t.get("EXT_shader_texture_lod") ? "#define TEXTURE_LOD_EXT" : "", "uniform mat4 viewMatrix;", "uniform vec3 cameraPosition;", o.toneMapping !== se ? "#define TONE_MAPPING" : "", o.toneMapping !== se ? Ri.tonemapping_pars_fragment : "", o.toneMapping !== se ? function(e, t) { 9198 var i; 9199 switch (t) { 9200 case Ae: 9201 i = "Linear"; 9202 break; 9203 case le: 9204 i = "Reinhard"; 9205 break; 9206 case ce: 9207 i = "Uncharted2"; 9208 break; 9209 case ue: 9210 i = "OptimizedCineon"; 9211 break; 9212 default: 9213 throw new Error("unsupported toneMapping: " + t) 9214 } 9215 return "vec3 " + e + "( vec3 color ) { return " + i + "ToneMapping( color ); }" 9216 }("toneMapping", o.toneMapping) : "", o.dithering ? "#define DITHERING" : "", o.outputEncoding || o.mapEncoding || o.envMapEncoding || o.emissiveMapEncoding ? Ri.encodings_pars_fragment : "", o.mapEncoding ? Mo("mapTexelToLinear", o.mapEncoding) : "", o.envMapEncoding ? Mo("envMapTexelToLinear", o.envMapEncoding) : "", o.emissiveMapEncoding ? Mo("emissiveMapTexelToLinear", o.emissiveMapEncoding) : "", o.outputEncoding ? (b = "linearToOutputTexel", w = o.outputEncoding, x = Eo(w), "vec4 " + b + "( vec4 value ) { return LinearTo" + x[0] + x[1] + "; }") : "", o.depthPacking ? "#define DEPTH_PACKING " + n.depthPacking : "", "\n"].filter(So).join("\n")), l = Co(l = Ao(l), o), c = Co(c = Ao(c), o), n.isShaderMaterial || (l = Ro(l), c = Ro(c)); 9217 var S = v + l, 9218 C = y + c, 9219 A = so(a, a.VERTEX_SHADER, S), 9220 R = so(a, a.FRAGMENT_SHADER, C); 9221 a.attachShader(M, A), a.attachShader(M, R), void 0 !== n.index0AttributeName ? a.bindAttribLocation(M, 0, n.index0AttributeName) : !0 === o.morphTargets && a.bindAttribLocation(M, 0, "position"), a.linkProgram(M); 9222 var L, P, k = a.getProgramInfoLog(M), 9223 O = a.getShaderInfoLog(A), 9224 D = a.getShaderInfoLog(R), 9225 I = !0, 9226 z = !0;
vendor: 5,338 bytes, lines 9227-9316
9227 return !1 === a.getProgramParameter(M, a.LINK_STATUS) ? (I = !1, console.error("THREE.WebGLProgram: shader error: ", a.getError(), "gl.VALIDATE_STATUS", a.getProgramParameter(M, a.VALIDATE_STATUS), "gl.getProgramInfoLog", k, O, D)) : "" !== k ? console.warn("THREE.WebGLProgram: gl.getProgramInfoLog()", k) : "" !== O && "" !== D || (z = !1), z && (this.diagnostics = { 9228 runnable: I, 9229 material: n, 9230 programLog: k, 9231 vertexShader: { 9232 log: O, 9233 prefix: v 9234 }, 9235 fragmentShader: { 9236 log: D, 9237 prefix: y 9238 } 9239 }), a.deleteShader(A), a.deleteShader(R), this.getUniforms = function() { 9240 return void 0 === L && (L = new _i(a, M, e)), L 9241 }, this.getAttributes = function() { 9242 return void 0 === P && (P = function(e, t, i) { 9243 for (var n = {}, r = e.getProgramParameter(t, e.ACTIVE_ATTRIBUTES), o = 0; o < r; o++) { 9244 var a = e.getActiveAttrib(t, o).name; 9245 n[a] = e.getAttribLocation(t, a) 9246 } 9247 return n 9248 }(a, M)), P 9249 }, this.destroy = function() { 9250 a.deleteProgram(M), this.program = void 0 9251 }, Object.defineProperties(this, { 9252 uniforms: { 9253 get: function() { 9254 return console.warn("THREE.WebGLProgram: .uniforms is now .getUniforms()."), this.getUniforms() 9255 } 9256 }, 9257 attributes: { 9258 get: function() { 9259 return console.warn("THREE.WebGLProgram: .attributes is now .getAttributes()."), this.getAttributes() 9260 } 9261 } 9262 }), this.id = To++, this.code = i, this.usedTimes = 1, this.program = M, this.vertexShader = A, this.fragmentShader = R, this 9263 } 9264 9265 function Po(h, l, d) { 9266 var c = [], 9267 p = { 9268 MeshDepthMaterial: "depth", 9269 MeshDistanceMaterial: "distanceRGBA", 9270 MeshNormalMaterial: "normal", 9271 MeshBasicMaterial: "basic", 9272 MeshLambertMaterial: "lambert", 9273 MeshPhongMaterial: "phong", 9274 MeshToonMaterial: "phong", 9275 MeshStandardMaterial: "physical", 9276 MeshPhysicalMaterial: "physical", 9277 LineBasicMaterial: "basic", 9278 LineDashedMaterial: "dashed", 9279 PointsMaterial: "points", 9280 ShadowMaterial: "shadow" 9281 }, 9282 o = ["precision", "supportsVertexTextures", "map", "mapEncoding", "envMap", "envMapMode", "envMapEncoding", "lightMap", "aoMap", "emissiveMap", "emissiveMapEncoding", "bumpMap", "normalMap", "displacementMap", "specularMap", "roughnessMap", "metalnessMap", "gradientMap", "alphaMap", "combine", "vertexColors", "fog", "useFog", "fogExp", "flatShading", "sizeAttenuation", "logarithmicDepthBuffer", "skinning", "maxBones", "useVertexTexture", "morphTargets", "morphNormals", "maxMorphTargets", "maxMorphNormals", "premultipliedAlpha", "numDirLights", "numPointLights", "numSpotLights", "numHemiLights", "numRectAreaLights", "shadowMapEnabled", "shadowMapType", "toneMapping", "physicallyCorrectLights", "alphaTest", "doubleSided", "flipSided", "numClippingPlanes", "numClipIntersection", "depthPacking", "dithering"]; 9283 9284 function f(e, t) { 9285 var i; 9286 return e ? e.isTexture ? i = e.encoding : e.isWebGLRenderTarget && (console.warn("THREE.WebGLPrograms.getTextureEncodingFromMap: don't use render targets as textures. Use their .texture property instead."), i = e.texture.encoding) : i = Je, i === Je && t && (i = et), i 9287 } 9288 this.getParameters = function(e, t, i, n, r, o, a) { 9289 var s = p[e.type], 9290 l = a.isSkinnedMesh ? function(e) { 9291 var t = e.skeleton.bones; 9292 if (d.floatVertexTextures) return 1024; 9293 var i = d.maxVertexUniforms, 9294 n = Math.floor((i - 20) / 4), 9295 r = Math.min(n, t.length); 9296 return r < t.length ? (console.warn("THREE.WebGLRenderer: Skeleton has " + t.length + " bones. This GPU supports " + r + "."), 0) : r 9297 }(a) : 0, 9298 c = d.precision; 9299 null !== e.precision && (c = d.getMaxPrecision(e.precision)) !== e.precision && console.warn("THREE.WebGLProgram.getParameters:", e.precision, "not supported, using", c, "instead."); 9300 var u = h.getRenderTarget(); 9301 return { 9302 shaderID: s, 9303 precision: c, 9304 supportsVertexTextures: d.vertexTextures, 9305 outputEncoding: f(u ? u.texture : null, h.gammaOutput), 9306 map: !!e.map, 9307 mapEncoding: f(e.map, h.gammaInput), 9308 envMap: !!e.envMap, 9309 envMapMode: e.envMap && e.envMap.mapping, 9310 envMapEncoding: f(e.envMap, h.gammaInput), 9311 envMapCubeUV: !!e.envMap && (e.envMap.mapping === ge || e.envMap.mapping === ve), 9312 lightMap: !!e.lightMap, 9313 aoMap: !!e.aoMap, 9314 emissiveMap: !!e.emissiveMap, 9315 emissiveMapEncoding: f(e.emissiveMap, h.gammaInput), 9316 bumpMap: !!e.bumpMap,
9317 normalMap: !!e.normalMap, 9318 displacementMap: !!e.displacementMap, 9319 roughnessMap: !!e.roughnessMap, 9320 metalnessMap: !!e.metalnessMap, 9321 specularMap: !!e.specularMap, 9322 alphaMap: !!e.alphaMap, 9323 gradientMap: !!e.gradientMap, 9324 combine: e.combine, 9325 vertexColors: e.vertexColors, 9326 fog: !!n, 9327 useFog: e.fog, 9328 fogExp: n && n.isFogExp2, 9329 flatShading: e.flatShading, 9330 sizeAttenuation: e.sizeAttenuation, 9331 logarithmicDepthBuffer: d.logarithmicDepthBuffer, 9332 skinning: e.skinning && 0 < l, 9333 maxBones: l, 9334 useVertexTexture: d.floatVertexTextures, 9335 morphTargets: e.morphTargets, 9336 morphNormals: e.morphNormals, 9337 maxMorphTargets: h.maxMorphTargets, 9338 maxMorphNormals: h.maxMorphNormals, 9339 numDirLights: t.directional.length, 9340 numPointLights: t.point.length, 9341 numSpotLights: t.spot.length, 9342 numRectAreaLights: t.rectArea.length, 9343 numHemiLights: t.hemi.length, 9344 numClippingPlanes: r, 9345 numClipIntersection: o, 9346 dithering: e.dithering, 9347 shadowMapEnabled: h.shadowMap.enabled && a.receiveShadow && 0 < i.length, 9348 shadowMapType: h.shadowMap.type, 9349 toneMapping: h.toneMapping, 9350 physicallyCorrectLights: h.physicallyCorrectLights, 9351 premultipliedAlpha: e.premultipliedAlpha, 9352 alphaTest: e.alphaTest, 9353 doubleSided: e.side === Z, 9354 flipSided: e.side === Y, 9355 depthPacking: void 0 !== e.depthPacking && e.depthPacking 9356 } 9357 }, this.getProgramCode = function(e, t) { 9358 var i = []; 9359 if (t.shaderID ? i.push(t.shaderID) : (i.push(e.fragmentShader), i.push(e.vertexShader)), void 0 !== e.defines) 9360 for (var n in e.defines) i.push(n), i.push(e.defines[n]); 9361 for (var r = 0; r < o.length; r++) i.push(t[o[r]]); 9362 return i.push(e.onBeforeCompile.toString()), i.push(h.gammaOutput), i.join() 9363 }, this.acquireProgram = function(e, t, i, n) { 9364 for (var r, o = 0, a = c.length; o < a; o++) { 9365 var s = c[o]; 9366 if (s.code === n) { 9367 ++(r = s).usedTimes; 9368 break 9369 } 9370 } 9371 return void 0 === r && (r = new Lo(h, l, n, e, t, i), c.push(r)), r 9372 }, this.releaseProgram = function(e) { 9373 if (0 == --e.usedTimes) { 9374 var t = c.indexOf(e); 9375 c[t] = c[c.length - 1], c.pop(), e.destroy() 9376 } 9377 }, this.programs = c 9378 } 9379 9380 function ko(f, r, m, g, v, y, b) { 9381 var p = "undefined" != typeof WebGL2RenderingContext && f instanceof WebGL2RenderingContext; 9382 9383 function w(e, t) { 9384 if (e.width > t || e.height > t) { 9385 var i = t / Math.max(e.width, e.height), 9386 n = document.createElementNS("http://www.w3.org/1999/xhtml", "canvas"); 9387 return n.width = Math.floor(e.width * i), n.height = Math.floor(e.height * i), n.getContext("2d").drawImage(e, 0, 0, e.width, e.height, 0, 0, n.width, n.height), console.warn("THREE.WebGLRenderer: image is too big (" + e.width + "x" + e.height + "). Resized to " + n.width + "x" + n.height, e), n 9388 } 9389 return e 9390 } 9391 9392 function x(e) { 9393 return st.isPowerOfTwo(e.width) && st.isPowerOfTwo(e.height) 9394 } 9395 9396 function _(e, t) { 9397 return e.generateMipmaps && t && e.minFilter !== z && e.minFilter !== R 9398 } 9399 9400 function o(e) { 9401 return e === z || e === C || e === A ? f.NEAREST : f.LINEAR 9402 } 9403 9404 function T(e) { 9405 var t = e.target; 9406 t.removeEventListener("dispose", T), 9407 function(e) { 9408 var t = g.get(e); 9409 if (e.image && t.__image__webglTextureCube) f.deleteTexture(t.__image__webglTextureCube); 9410 else { 9411 if (void 0 === t.__webglInit) return; 9412 f.deleteTexture(t.__webglTexture) 9413 } 9414 g.remove(e) 9415 }(t), b.textures-- 9416 } 9417 9418 function a(e) { 9419 var t = e.target; 9420 t.removeEventListener("dispose", a), 9421 function(e) { 9422 var t = g.get(e), 9423 i = g.get(e.texture); 9424 if (!e) return; 9425 void 0 !== i.__webglTexture && f.deleteTexture(i.__webglTexture); 9426 e.depthTexture && e.depthTexture.dispose(); 9427 if (e.isWebGLRenderTargetCube) 9428 for (var n = 0; n < 6; n++) f.deleteFramebuffer(t.__webglFramebuffer[n]), t.__webglDepthbuffer && f.deleteRenderbuffer(t.__webglDepthbuffer[n]); 9429 else f.deleteFramebuffer(t.__webglFramebuffer), t.__webglDepthbuffer && f.deleteRenderbuffer(t.__webglDepthbuffer); 9430 g.remove(e.texture), g.remove(e) 9431 }(t), b.textures-- 9432 } 9433 9434 function s(e, t) { 9435 var i = g.get(e); 9436 if (0 < e.version && i.__version !== e.version) { 9437 var n = e.image; 9438 if (void 0 === n) console.warn("THREE.WebGLRenderer: Texture marked for update but image is undefined", e); 9439 else { 9440 if (!1 !== n.complete) return void 9441 function(e, t, i) { 9442 void 0 === e.__webglInit && (e.__webglInit = !0, t.addEventListener("dispose", T), e.__webglTexture = f.createTexture(), b.textures++); 9443 m.activeTexture(f.TEXTURE0 + i), m.bindTexture(f.TEXTURE_2D, e.__webglTexture), f.pixelStorei(f.UNPACK_FLIP_Y_WEBGL, t.flipY), f.pixelStorei(f.UNPACK_PREMULTIPLY_ALPHA_WEBGL, t.premultiplyAlpha), f.pixelStorei(f.UNPACK_ALIGNMENT, t.unpackAlignment); 9444 var n = w(t.image, v.maxTextureSize); 9445 r = t, (r.wrapS !== M || r.wrapT !== M || r.minFilter !== z && r.minFilter !== R) && !1 === x(n) && (n = function(e) { 9446 if (e instanceof HTMLImageElement || e instanceof HTMLCanvasElement) { 9447 var t = document.createElementNS("http://www.w3.org/1999/xhtml", "canvas"); 9448 return t.width = st.nearestPowerOfTwo(e.width), t.height = st.nearestPowerOfTwo(e.height), t.getContext("2d").drawImage(e, 0, 0, t.width, t.height), console.warn("THREE.WebGLRenderer: image is not power of two (" + e.width + "x" + e.height + "). Resized to " + t.width + "x" + t.height, e), t 9449 } 9450 return e 9451 }(n)); 9452 var r; 9453 var o = x(n), 9454 a = y.convert(t.format), 9455 s = y.convert(t.type); 9456 E(f.TEXTURE_2D, t, o); 9457 var l, c = t.mipmaps; 9458 if (t.isDepthTexture) { 9459 var u = f.DEPTH_COMPONENT; 9460 if (t.type === Le) { 9461 if (!p) throw new Error("Float Depth Texture only supported in WebGL2.0"); 9462 u = f.DEPTH_COMPONENT32F 9463 } else p && (u = f.DEPTH_COMPONENT16); 9464 t.format === Ie && u === f.DEPTH_COMPONENT && t.type !== D && t.type !== be && (console.warn("THREE.WebGLRenderer: Use UnsignedShortType or UnsignedIntType for DepthFormat DepthTexture."), t.type = D, s = y.convert(t.type)), t.format === ze && (u = f.DEPTH_STENCIL, t.type !== Te && (console.warn("THREE.WebGLRenderer: Use UnsignedInt248Type for DepthStencilFormat DepthTexture."), t.type = Te, s = y.convert(t.type))), m.texImage2D(f.TEXTURE_2D, 0, u, n.width, n.height, 0, a, s, null) 9465 } else if (t.isDataTexture) 9466 if (0 < c.length && o) { 9467 for (var h = 0, d = c.length; h < d; h++) l = c[h], m.texImage2D(f.TEXTURE_2D, h, a, l.width, l.height, 0, a, s, l.data); 9468 t.generateMipmaps = !1 9469 } else m.texImage2D(f.TEXTURE_2D, 0, a, n.width, n.height, 0, a, s, n.data); 9470 else if (t.isCompressedTexture) 9471 for (var h = 0, d = c.length; h < d; h++) l = c[h], t.format !== ke && t.format !== Me ? -1 < m.getCompressedTextureFormats().indexOf(a) ? m.compressedTexImage2D(f.TEXTURE_2D, h, a, l.width, l.height, 0, l.data) : console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()") : m.texImage2D(f.TEXTURE_2D, h, a, l.width, l.height, 0, a, s, l.data); 9472 else if (0 < c.length && o) { 9473 for (var h = 0, d = c.length; h < d; h++) l = c[h], m.texImage2D(f.TEXTURE_2D, h, a, a, s, l); 9474 t.generateMipmaps = !1 9475 } else m.texImage2D(f.TEXTURE_2D, 0, a, a, s, n); 9476 _(t, o) && f.generateMipmap(f.TEXTURE_2D); 9477 e.__version = t.version, t.onUpdate && t.onUpdate(t) 9478 }(i, e, t); 9479 console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete", e) 9480 } 9481 } 9482 m.activeTexture(f.TEXTURE0 + t), m.bindTexture(f.TEXTURE_2D, i.__webglTexture) 9483 } 9484 9485 function E(e, t, i) { 9486 var n; 9487 if (i ? (f.texParameteri(e, f.TEXTURE_WRAP_S, y.convert(t.wrapS)), f.texParameteri(e, f.TEXTURE_WRAP_T, y.convert(t.wrapT)), f.texParameteri(e, f.TEXTURE_MAG_FILTER, y.convert(t.magFilter)), f.texParameteri(e, f.TEXTURE_MIN_FILTER, y.convert(t.minFilter))) : (f.texParameteri(e, f.TEXTURE_WRAP_S, f.CLAMP_TO_EDGE), f.texParameteri(e, f.TEXTURE_WRAP_T, f.CLAMP_TO_EDGE), t.wrapS === M && t.wrapT === M || console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.wrapS and Texture.wrapT should be set to THREE.ClampToEdgeWrapping.", t), f.texParameteri(e, f.TEXTURE_MAG_FILTER, o(t.magFilter)), f.texParameteri(e, f.TEXTURE_MIN_FILTER, o(t.minFilter)), t.minFilter !== z && t.minFilter !== R && console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.minFilter should be set to THREE.NearestFilter or THREE.LinearFilter.", t)), n = r.get("EXT_texture_filter_anisotropic")) { 9488 if (t.type === Le && null === r.get("OES_texture_float_linear")) return; 9489 if (t.type === Pe && null === r.get("OES_texture_half_float_linear")) return; 9490 (1 < t.anisotropy || g.get(t).__currentAnisotropy) && (f.texParameterf(e, n.TEXTURE_MAX_ANISOTROPY_EXT, Math.min(t.anisotropy, v.getMaxAnisotropy())), g.get(t).__currentAnisotropy = t.anisotropy) 9491 } 9492 } 9493 9494 function l(e, t, i, n) { 9495 var r = y.convert(t.texture.format), 9496 o = y.convert(t.texture.type); 9497 m.texImage2D(n, 0, r, t.width, t.height, 0, r, o, null), f.bindFramebuffer(f.FRAMEBUFFER, e), f.framebufferTexture2D(f.FRAMEBUFFER, i, n, g.get(t.texture).__webglTexture, 0), f.bindFramebuffer(f.FRAMEBUFFER, null) 9498 } 9499 9500 function c(e, t) { 9501 f.bindRenderbuffer(f.RENDERBUFFER, e), t.depthBuffer && !t.stencilBuffer ? (f.renderbufferStorage(f.RENDERBUFFER, f.DEPTH_COMPONENT16, t.width, t.height), f.framebufferRenderbuffer(f.FRAMEBUFFER, f.DEPTH_ATTACHMENT, f.RENDERBUFFER, e)) : t.depthBuffer && t.stencilBuffer ? (f.renderbufferStorage(f.RENDERBUFFER, f.DEPTH_STENCIL, t.width, t.height), f.framebufferRenderbuffer(f.FRAMEBUFFER, f.DEPTH_STENCIL_ATTACHMENT, f.RENDERBUFFER, e)) : f.renderbufferStorage(f.RENDERBUFFER, f.RGBA4, t.width, t.height), f.bindRenderbuffer(f.RENDERBUFFER, null) 9502 } 9503 9504 function u(e) { 9505 var t = g.get(e), 9506 i = !0 === e.isWebGLRenderTargetCube; 9507 if (e.depthTexture) { 9508 if (i) throw new Error("target.depthTexture not supported in Cube render targets"); 9509 ! function(e, t) { 9510 if (t && t.isWebGLRenderTargetCube) throw new Error("Depth Texture with cube render targets is not supported"); 9511 if (f.bindFramebuffer(f.FRAMEBUFFER, e), !t.depthTexture || !t.depthTexture.isDepthTexture) throw new Error("renderTarget.depthTexture must be an instance of THREE.DepthTexture"); 9512 g.get(t.depthTexture).__webglTexture && t.depthTexture.image.width === t.width && t.depthTexture.image.height === t.height || (t.depthTexture.image.width = t.width, t.depthTexture.image.height = t.height, t.depthTexture.needsUpdate = !0), s(t.depthTexture, 0); 9513 var i = g.get(t.depthTexture).__webglTexture; 9514 if (t.depthTexture.format === Ie) f.framebufferTexture2D(f.FRAMEBUFFER, f.DEPTH_ATTACHMENT, f.TEXTURE_2D, i, 0); 9515 else { 9516 if (t.depthTexture.format !== ze) throw new Error("Unknown depthTexture format"); 9517 f.framebufferTexture2D(f.FRAMEBUFFER, f.DEPTH_STENCIL_ATTACHMENT, f.TEXTURE_2D, i, 0) 9518 } 9519 }(t.__webglFramebuffer, e) 9520 } else if (i) { 9521 t.__webglDepthbuffer = []; 9522 for (var n = 0; n < 6; n++) f.bindFramebuffer(f.FRAMEBUFFER, t.__webglFramebuffer[n]), t.__webglDepthbuffer[n] = f.createRenderbuffer(), c(t.__webglDepthbuffer[n], e) 9523 } else f.bindFramebuffer(f.FRAMEBUFFER, t.__webglFramebuffer), t.__webglDepthbuffer = f.createRenderbuffer(), c(t.__webglDepthbuffer, e); 9524 f.bindFramebuffer(f.FRAMEBUFFER, null) 9525 } 9526 this.setTexture2D = s, this.setTextureCube = function(e, t) { 9527 var i = g.get(e); 9528 if (6 === e.image.length) 9529 if (0 < e.version && i.__version !== e.version) { 9530 i.__image__webglTextureCube || (e.addEventListener("dispose", T), i.__image__webglTextureCube = f.createTexture(), b.textures++), m.activeTexture(f.TEXTURE0 + t), m.bindTexture(f.TEXTURE_CUBE_MAP, i.__image__webglTextureCube), f.pixelStorei(f.UNPACK_FLIP_Y_WEBGL, e.flipY); 9531 for (var n = e && e.isCompressedTexture, r = e.image[0] && e.image[0].isDataTexture, o = [], a = 0; a < 6; a++) o[a] = n || r ? r ? e.image[a].image : e.image[a] : w(e.image[a], v.maxCubemapSize); 9532 var s = x(o[0]), 9533 l = y.convert(e.format), 9534 c = y.convert(e.type); 9535 for (E(f.TEXTURE_CUBE_MAP, e, s), a = 0; a < 6; a++) 9536 if (n) 9537 for (var u, h = o[a].mipmaps, d = 0, p = h.length; d < p; d++) u = h[d], e.format !== ke && e.format !== Me ? -1 < m.getCompressedTextureFormats().indexOf(l) ? m.compressedTexImage2D(f.TEXTURE_CUBE_MAP_POSITIVE_X + a, d, l, u.width, u.height, 0, u.data) : console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .setTextureCube()") : m.texImage2D(f.TEXTURE_CUBE_MAP_POSITIVE_X + a, d, l, u.width, u.height, 0, l, c, u.data); 9538 else r ? m.texImage2D(f.TEXTURE_CUBE_MAP_POSITIVE_X + a, 0, l, o[a].width, o[a].height, 0, l, c, o[a].data) : m.texImage2D(f.TEXTURE_CUBE_MAP_POSITIVE_X + a, 0, l, l, c, o[a]); 9539 _(e, s) && f.generateMipmap(f.TEXTURE_CUBE_MAP), i.__version = e.version, e.onUpdate && e.onUpdate(e) 9540 } else m.activeTexture(f.TEXTURE0 + t), m.bindTexture(f.TEXTURE_CUBE_MAP, i.__image__webglTextureCube) 9541 }, this.setTextureCubeDynamic = function(e, t) { 9542 m.activeTexture(f.TEXTURE0 + t), m.bindTexture(f.TEXTURE_CUBE_MAP, g.get(e).__webglTexture) 9543 }, this.setupRenderTarget = function(e) { 9544 var t = g.get(e), 9545 i = g.get(e.texture); 9546 e.addEventListener("dispose", a), i.__webglTexture = f.createTexture(), b.textures++; 9547 var n = !0 === e.isWebGLRenderTargetCube, 9548 r = x(e); 9549 if (n) { 9550 t
9550.__webglFramebuffer = []; 9551 for (var o = 0; o < 6; o++) t.__webglFramebuffer[o] = f.createFramebuffer() 9552 } else t.__webglFramebuffer = f.createFramebuffer(); 9553 if (n) { 9554 for (m.bindTexture(f.TEXTURE_CUBE_MAP, i.__webglTexture), E(f.TEXTURE_CUBE_MAP, e.texture, r), o = 0; o < 6; o++) l(t.__webglFramebuffer[o], e, f.COLOR_ATTACHMENT0, f.TEXTURE_CUBE_MAP_POSITIVE_X + o); 9555 _(e.texture, r) && f.generateMipmap(f.TEXTURE_CUBE_MAP), m.bindTexture(f.TEXTURE_CUBE_MAP, null) 9556 } else m.bindTexture(f.TEXTURE_2D, i.__webglTexture), E(f.TEXTURE_2D, e.texture, r), l(t.__webglFramebuffer, e, f.COLOR_ATTACHMENT0, f.TEXTURE_2D), _(e.texture, r) && f.generateMipmap(f.TEXTURE_2D), m.bindTexture(f.TEXTURE_2D, null); 9557 e.depthBuffer && u(e) 9558 }, this.updateRenderTargetMipmap = function(e) { 9559 var t = e.texture; 9560 if (_(t, x(e))) { 9561 var i = e.isWebGLRenderTargetCube ? f.TEXTURE_CUBE_MAP : f.TEXTURE_2D, 9562 n = g.get(t).__webglTexture; 9563 m.bindTexture(i, n), f.generateMipmap(i), m.bindTexture(i, null) 9564 } 9565 } 9566 } 9567 9568 function Oo() { 9569 var n = {}; 9570 return { 9571 get: function(e) { 9572 var t = e.uuid, 9573 i = n[t]; 9574 return void 0 === i && (i = {}, n[t] = i), i 9575 }, 9576 remove: function(e) { 9577 delete n[e.uuid] 9578 }, 9579 clear: function() { 9580 n = {} 9581 } 9582 } 9583 } 9584 9585 function Do(u, i, l) { 9586 var t = new function() { 9587 var t = !1, 9588 o = new Lt, 9589 i = null, 9590 a = new Lt(0, 0, 0, 0); 9591 return { 9592 setMask: function(e) { 9593 i === e || t || (u.colorMask(e, e, e, e), i = e) 9594 }, 9595 setLocked: function(e) { 9596 t = e 9597 }, 9598 setClear: function(e, t, i, n, r) { 9599 !0 === r && (e *= n, t *= n, i *= n), o.set(e, t, i, n), !1 === a.equals(o) && (u.clearColor(e, t, i, n), a.copy(o)) 9600 }, 9601 reset: function() { 9602 t = !1, i = null, a.set(-1, 0, 0, 0) 9603 } 9604 } 9605 }, 9606 n = new function() { 9607 var t = !1, 9608 i = null, 9609 n = null, 9610 r = null; 9611 return { 9612 setTest: function(e) { 9613 e ? I(u.DEPTH_TEST) : z(u.DEPTH_TEST) 9614 }, 9615 setMask: function(e) { 9616 i === e || t || (u.depthMask(e), i = e) 9617 }, 9618 setFunc: function(e) { 9619 if (n !== e) { 9620 if (e) switch (e) { 9621 case K: 9622 u.depthFunc(u.NEVER); 9623 break; 9624 case ee: 9625 u.depthFunc(u.ALWAYS); 9626 break; 9627 case te: 9628 u.depthFunc(u.LESS); 9629 break; 9630 case ie: 9631 u.depthFunc(u.LEQUAL); 9632 break; 9633 case ne: 9634 u.depthFunc(u.EQUAL); 9635 break; 9636 case re: 9637 u.depthFunc(u.GEQUAL); 9638 break; 9639 case oe: 9640 u.depthFunc(u.GREATER); 9641 break; 9642 case ae: 9643 u.depthFunc(u.NOTEQUAL); 9644 break; 9645 default: 9646 u.depthFunc(u.LEQUAL) 9647 } else u.depthFunc(u.LEQUAL); 9648 n = e 9649 } 9650 }, 9651 setLocked: function(e) { 9652 t = e 9653 }, 9654 setClear: function(e) { 9655 r !== e && (u.clearDepth(e), r = e) 9656 }, 9657 reset: function() { 9658 t = !1, r = n = i = null 9659 } 9660 } 9661 }, 9662 r = new function() { 9663 var t = !1, 9664 i = null, 9665 n = null, 9666 r = null, 9667 o = null, 9668 a = null, 9669 s = null, 9670 l = null, 9671 c = null; 9672 return { 9673 setTest: function(e) {
9674 e ? I(u.STENCIL_TEST) : z(u.STENCIL_TEST) 9675 }, 9676 setMask: function(e) { 9677 i === e || t || (u.stencilMask(e), i = e) 9678 }, 9679 setFunc: function(e, t, i) { 9680 n === e && r === t && o === i || (u.stencilFunc(e, t, i), n = e, r = t, o = i) 9681 }, 9682 setOp: function(e, t, i) { 9683 a === e && s === t && l === i || (u.stencilOp(e, t, i), a = e, s = t, l = i) 9684 }, 9685 setLocked: function(e) { 9686 t = e 9687 }, 9688 setClear: function(e) { 9689 c !== e && (u.clearStencil(e), c = e) 9690 }, 9691 reset: function() { 9692 t = !1, c = l = s = a = o = r = n = i = null 9693 } 9694 } 9695 }, 9696 e = u.getParameter(u.MAX_VERTEX_ATTRIBS), 9697 o = new Uint8Array(e), 9698 a = new Uint8Array(e), 9699 s = new Uint8Array(e), 9700 c = {}, 9701 h = null, 9702 d = null, 9703 p = null, 9704 f = null, 9705 m = null, 9706 g = null, 9707 v = null, 9708 y = null, 9709 b = null, 9710 w = !1, 9711 x = null, 9712 _ = null, 9713 T = null, 9714 E = null, 9715 M = null, 9716 S = u.getParameter(u.MAX_COMBINED_TEXTURE_IMAGE_UNITS), 9717 C = parseFloat(/^WebGL\ ([0-9])/.exec(u.getParameter(u.VERSION))[1]), 9718 A = 1 <= parseFloat(C), 9719 R = null, 9720 L = {}, 9721 P = new Lt, 9722 k = new Lt; 9723 9724 function O(e, t, i) { 9725 var n = new Uint8Array(4), 9726 r = u.createTexture(); 9727 u.bindTexture(e, r), u.texParameteri(e, u.TEXTURE_MIN_FILTER, u.NEAREST), u.texParameteri(e, u.TEXTURE_MAG_FILTER, u.NEAREST); 9728 for (var o = 0; o < i; o++) u.texImage2D(t + o, 0, u.RGBA, 1, 1, 0, u.RGBA, u.UNSIGNED_BYTE, n); 9729 return r 9730 } 9731 var D = {}; 9732 9733 function I(e) { 9734 !0 !== c[e] && (u.enable(e), c[e] = !0) 9735 } 9736 9737 function z(e) { 9738 !1 !== c[e] && (u.disable(e), c[e] = !1) 9739 } 9740 9741 function N(e, t, i, n, r, o, a, s) { 9742 if (e !== V ? I(u.BLEND) : z(u.BLEND), e !== J) { 9743 if (e !== p || s !== w) switch (e) { 9744 case q: 9745 s ? (u.blendEquationSeparate(u.FUNC_ADD, u.FUNC_ADD), u.blendFuncSeparate(u.ONE, u.ONE, u.ONE, u.ONE)) : (u.blendEquation(u.FUNC_ADD), u.blendFunc(u.SRC_ALPHA, u.ONE)); 9746 break; 9747 case X: 9748 s ? (u.blendEquationSeparate(u.FUNC_ADD, u.FUNC_ADD), u.blendFuncSeparate(u.ZERO, u.ZERO, u.ONE_MINUS_SRC_COLOR, u.ONE_MINUS_SRC_ALPHA)) : (u.blendEquation(u.FUNC_ADD), u.blendFunc(u.ZERO, u.ONE_MINUS_SRC_COLOR)); 9749 break; 9750 case Q: 9751 s ? (u.blendEquationSeparate(u.FUNC_ADD, u.FUNC_ADD), u.blendFuncSeparate(u.ZERO, u.SRC_COLOR, u.ZERO, u.SRC_ALPHA)) : (u.blendEquation(u.FUNC_ADD), u.blendFunc(u.ZERO, u.SRC_COLOR)); 9752 break; 9753 default: 9754 s ? (u.blendEquationSeparate(u.FUNC_ADD, u.FUNC_ADD), u.blendFuncSeparate(u.ONE, u.ONE_MINUS_SRC_ALPHA, u.ONE, u.ONE_MINUS_SRC_ALPHA)) : (u.blendEquationSeparate(u.FUNC_ADD, u.FUNC_ADD), u.blendFuncSeparate(u.SRC_ALPHA, u.ONE_MINUS_SRC_ALPHA, u.ONE, u.ONE_MINUS_SRC_ALPHA)) 9755 } 9756 b = y = v = g = m = f = null 9757 } else r = r || t, o = o || i, a = a || n, t === f && r === v || (u.blendEquationSeparate(l.convert(t), l.convert(r)), f = t, v = r), i === m && n === g && o === y && a === b || (u.blendFuncSeparate(l.convert(i), l.convert(n), l.convert(o), l.convert(a)), m = i, g = n, y = o, b = a); 9758 p = e, w = s 9759 } 9760 9761 function F(e) { 9762 x !== e && (e ? u.frontFace(u.CW) : u.frontFace(u.CCW), x = e) 9763 } 9764 9765 function U(e) { 9766 e !== $ ? (I(u.CULL_FACE), e !== _ && (e === j ? u.cullFace(u.BACK) : e === G ? u.cullFace(u.FRONT) : u.cullFace(u.FRONT_AND_BACK))) : z(u.CULL_FACE), _ = e 9767 } 9768 9769 function B(e, t, i) { 9770 e ? (I(u.POLYGON_OFFSET_FILL), E === t && M === i || (u.polygonOffset(t, i), E = t, M = i)) : z(u.POLYGON_OFFSET_FILL) 9771 } 9772 9773 function H(e) { 9774 void 0 === e && (e = u.TEXTURE0 + S - 1), R !== e && (u.activeTexture(e), R = e) 9775 } 9776 return D[u.TEXTURE_2D] = O(u.TEXTURE_2D, u.TEXTURE_2D, 1), D[u.TEXTURE_CUBE_MAP] = O(u.TEXTURE_CUBE_MAP, u.TEXTURE_CUBE_MAP_POSITIVE_X, 6), t.setClear(0, 0, 0, 1), n.setClear(1), r.setClear(0), I(u.DEPTH_TEST), n.setFunc(ie), F(!1), U(j), I(u.CULL_FACE), I(u.BLEND), N(W), { 9777 buffers: { 9778 color: t, 9779 depth: n, 9780 stencil: r 9781 }, 9782 initAttributes: function() { 9783 for (var e = 0, t = o.length; e < t; e++) o[e] = 0 9784 }, 9785 enableAttribute: function(e) { 9786 o[e] = 1, 0 === a[e] && (u.enableVertexAttribArray(e), a[e] = 1), 0 !== s[e] && (i.get("ANGLE_instanced_arrays").vertexAttribDivisorANGLE(e, 0), s[e] = 0) 9787 }, 9788 enableAttributeAndDivisor: function(e, t) { 9789 o[e] = 1, 0 === a[e] && (u.enableVertexAttribArray(e), a[e] = 1), s[e] !== t && (i.get("ANGLE_instanced_arrays").vertexAttribDivisorANGLE(e, t), s[e] = t) 9790 }, 9791 disableUnusedAttributes: function() { 9792 for (var e = 0, t = a.length; e !== t; ++e) a[e] !== o[e] && (u.disableVertexAttribArray(e), a[e] = 0) 9793 }, 9794 enable: I, 9795 disable: z, 9796 getCompressedTextureFormats: function() { 9797 if (null === h && (h = [], i.get("WEBGL_compressed_texture_pvrtc") || i.get("WEBGL_compressed_texture_s3tc") || i.get("WEBGL_compressed_texture_etc1"))) 9798 for (var e = u.getParameter(u.COMPRESSED_TEXTURE_FORMATS), t = 0; t < e.length; t++) h.push(e[t]); 9799 return h 9800 }, 9801 useProgram: function(e) { 9802 return d !== e && (u.useProgram(e), d = e, !0) 9803 }, 9804 setBlending: N, 9805 setMaterial: function(e) { 9806 e.side === Z ? z(u.CULL_FACE) : I(u.CULL_FACE), F(e.side === Y), !0 === e.transparent ? N(e.blending, e.blendEquation, e.blendSrc, e.blendDst, e.blendEquationAlpha, e.blendSrcAlpha, e.blendDstAlpha, e.premultipliedAlpha) : N(V), n.setFunc(e.depthFunc), n.setTest(e.depthTest), n.setMask(e.depthWrite), t.setMask(e.colorWrite), B(e.polygonOffset, e.polygonOffsetFactor, e.polygonOffsetUnits) 9807 }, 9808 setFlipSided: F, 9809 setCullFace: U, 9810 setLineWidth: function(e) { 9811 e !== T && (A && u.lineWidth(e), T = e) 9812 }, 9813 setPolygonOffset: B, 9814 setScissorTest: function(e) {
9815 e ? I(u.SCISSOR_TEST) : z(u.SCISSOR_TEST) 9816 }, 9817 activeTexture: H, 9818 bindTexture: function(e, t) { 9819 null === R && H(); 9820 var i = L[R]; 9821 void 0 === i && (i = { 9822 type: void 0, 9823 texture: void 0 9824 }, L[R] = i), i.type === e && i.texture === t || (u.bindTexture(e, t || D[e]), i.type = e, i.texture = t) 9825 }, 9826 compressedTexImage2D: function() { 9827 try { 9828 u.compressedTexImage2D.apply(u, arguments) 9829 } catch (e) { 9830 console.error("THREE.WebGLState:", e) 9831 } 9832 }, 9833 texImage2D: function() { 9834 try { 9835 u.texImage2D.apply(u, arguments) 9836 } catch (e) { 9837 console.error("THREE.WebGLState:", e) 9838 } 9839 }, 9840 scissor: function(e) { 9841 !1 === P.equals(e) && (u.scissor(e.x, e.y, e.z, e.w), P.copy(e)) 9842 }, 9843 viewport: function(e) { 9844 !1 === k.equals(e) && (u.viewport(e.x, e.y, e.z, e.w), k.copy(e)) 9845 }, 9846 reset: function() { 9847 for (var e = 0; e < a.length; e++) 1 === a[e] && (u.disableVertexAttribArray(e), a[e] = 0); 9848 c = {}, L = {}, _ = x = p = d = R = h = null, t.reset(), n.reset(), r.reset() 9849 } 9850 } 9851 } 9852 9853 function Io(t, i, e) { 9854 var n; 9855 9856 function r(e) { 9857 if ("highp" === e) { 9858 if (0 < t.getShaderPrecisionFormat(t.VERTEX_SHADER, t.HIGH_FLOAT).precision && 0 < t.getShaderPrecisionFormat(t.FRAGMENT_SHADER, t.HIGH_FLOAT).precision) return "highp"; 9859 e = "mediump" 9860 } 9861 return "mediump" === e && 0 < t.getShaderPrecisionFormat(t.VERTEX_SHADER, t.MEDIUM_FLOAT).precision && 0 < t.getShaderPrecisionFormat(t.FRAGMENT_SHADER, t.MEDIUM_FLOAT).precision ? "mediump" : "lowp" 9862 } 9863 var o = void 0 !== e.precision ? e.precision : "highp", 9864 a = r(o); 9865 a !== o && (console.warn("THREE.WebGLRenderer:", o, "not supported, using", a, "instead."), o = a); 9866 var s = !0 === e.logarithmicDepthBuffer && !!i.get("EXT_frag_depth"), 9867 l = t.getParameter(t.MAX_TEXTURE_IMAGE_UNITS), 9868 c = t.getParameter(t.MAX_VERTEX_TEXTURE_IMAGE_UNITS), 9869 u = t.getParameter(t.MAX_TEXTURE_SIZE), 9870 h = t.getParameter(t.MAX_CUBE_MAP_TEXTURE_SIZE), 9871 d = t.getParameter(t.MAX_VERTEX_ATTRIBS), 9872 p = t.getParameter(t.MAX_VERTEX_UNIFORM_VECTORS), 9873 f = t.getParameter(t.MAX_VARYING_VECTORS), 9874 m = t.getParameter(t.MAX_FRAGMENT_UNIFORM_VECTORS), 9875 g = 0 < c, 9876 v = !!i.get("OES_texture_float"); 9877 return { 9878 getMaxAnisotropy: function() { 9879 if (void 0 !== n) return n; 9880 var e = i.get("EXT_texture_filter_anisotropic"); 9881 return n = null !== e ? t.getParameter(e.MAX_TEXTURE_MAX_ANISOTROPY_EXT) : 0 9882 }, 9883 getMaxPrecision: r, 9884 precision: o, 9885 logarithmicDepthBuffer: s, 9886 maxTextures: l, 9887 maxVertexTextures: c, 9888 maxTextureSize: u, 9889 maxCubemapSize: h, 9890 maxAttributes: d, 9891 maxVertexUniforms: p, 9892 maxVaryings: f, 9893 maxFragmentUniforms: m, 9894 vertexTextures: g, 9895 floatFragmentTextures: v, 9896 floatVertexTextures: g && v 9897 } 9898 } 9899 9900 function zo(e) { 9901 zn.call(this), this.cameras = e || [] 9902 } 9903 9904 function No(n) { 9905 var r = this, 9906 a = null, 9907 s = null; 9908 "VRFrameData" in window && (s = new window.VRFrameData); 9909 var l = new It, 9910 c = new It, 9911 u = new It, 9912 h = new zn; 9913 h.bounds = new Lt(0, 0, .5, 1), h.layers.enable(1); 9914 var d = new zn; 9915 d.bounds = new Lt(.5, 0, .5, 1), d.layers.enable(2); 9916 var o, p, f = new zo([h, d]); 9917 9918 function e() { 9919 if (null !== a && a.isPresenting) { 9920 var e = a.getEyeParameters("left"), 9921 t = e.renderWidth, 9922 i = e.renderHeight; 9923 p = n.getPixelRatio(), o = n.getSize(), n.setDrawingBufferSize(2 * t, i, 1) 9924 } else r.enabled && n.setDrawingBufferSize(o.width, o.height, p) 9925 } 9926 f.layers.enable(1), f.layers.enable(2), window.addEventListener("vrdisplaypresentchange", e, !1), this.enabled = !1, this.standing = !1, this.getDevice = function() { 9927 return a 9928 }, this.setDevice = function(e) { 9929 void 0 !== e && (a = e) 9930 }, this.getCamera = function(e) { 9931 if (null === a) return e; 9932 a.depthNear = e.near, a.depthFar = e.far, a.getFrameData(s); 9933 var t = s.pose; 9934 null !== t.position ? e.position.fromArray(t.position) : e.position.set(0, 0, 0), null !== t.orientation && e.quaternion.fromArray(t.orientation), e.updateMatrixWorld(); 9935 var i = a.stageParameters; 9936 if (this.standing && i && (c.fromArray(i.sittingToStandingTransform), u.getInverse(c), e.matrixWorld.multiply(c), e.matrixWorldInverse.multiply(u)), !1 === a.isPresenting) return e; 9937 h.near = e.near, d.near = e.near, h.far = e.far, d.far = e.far, f.matrixWorld.copy(e.matrixWorld), f.matrixWorldInverse.copy(e.matrixWorldInverse), h.matrixWorldInverse.fromArray(s.leftVie
vendor: 8,140 bytes, lines 9937-10094
9937wMatrix), d.matrixWorldInverse.fromArray(s.rightViewMatrix), this.standing && i && (h.matrixWorldInverse.multiply(u), d.matrixWorldInverse.multiply(u)); 9938 var n = e.parent; 9939 null !== n && (l.getInverse(n.matrixWorld), h.matrixWorldInverse.multiply(l), d.matrixWorldInverse.multiply(l)), h.matrixWorld.getInverse(h.matrixWorldInverse), d.matrixWorld.getInverse(d.matrixWorldInverse), h.projectionMatrix.fromArray(s.leftProjectionMatrix), d.projectionMatrix.fromArray(s.rightProjectionMatrix), f.projectionMatrix.copy(h.projectionMatrix); 9940 var r = a.getLayers(); 9941 if (r.length) { 9942 var o = r[0]; 9943 null !== o.leftBounds && 4 === o.leftBounds.length && h.bounds.fromArray(o.leftBounds), null !== o.rightBounds && 4 === o.rightBounds.length && d.bounds.fromArray(o.rightBounds) 9944 } 9945 return f 9946 }, this.getStandingMatrix = function() { 9947 return c 9948 }, this.submitFrame = function() { 9949 a && a.isPresenting && a.submitFrame() 9950 }, this.dispose = function() { 9951 window.removeEventListener("vrdisplaypresentchange", e) 9952 } 9953 } 9954 9955 function Fo(i) { 9956 var n = {}; 9957 return { 9958 get: function(e) { 9959 if (void 0 !== n[e]) return n[e]; 9960 var t; 9961 switch (e) { 9962 case "WEBGL_depth_texture": 9963 t = i.getExtension("WEBGL_depth_texture") || i.getExtension("MOZ_WEBGL_depth_texture") || i.getExtension("WEBKIT_WEBGL_depth_texture"); 9964 break; 9965 case "EXT_texture_filter_anisotropic": 9966 t = i.getExtension("EXT_texture_filter_anisotropic") || i.getExtension("MOZ_EXT_texture_filter_anisotropic") || i.getExtension("WEBKIT_EXT_texture_filter_anisotropic"); 9967 break; 9968 case "WEBGL_compressed_texture_s3tc": 9969 t = i.getExtension("WEBGL_compressed_texture_s3tc") || i.getExtension("MOZ_WEBGL_compressed_texture_s3tc") || i.getExtension("WEBKIT_WEBGL_compressed_texture_s3tc"); 9970 break; 9971 case "WEBGL_compressed_texture_pvrtc": 9972 t = i.getExtension("WEBGL_compressed_texture_pvrtc") || i.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc"); 9973 break; 9974 case "WEBGL_compressed_texture_etc1": 9975 t = i.getExtension("WEBGL_compressed_texture_etc1"); 9976 break; 9977 default: 9978 t = i.getExtension(e) 9979 } 9980 return null === t && console.warn("THREE.WebGLRenderer: " + e + " extension not supported."), n[e] = t 9981 } 9982 } 9983 } 9984 9985 function Uo() { 9986 var u = this, 9987 h = null, 9988 d = 0, 9989 p = !1, 9990 f = !1, 9991 m = new cn, 9992 g = new ln, 9993 v = { 9994 value: null, 9995 needsUpdate: !1 9996 }; 9997 9998 function y() { 9999 v.value !== h && (v.value = h, v.needsUpdate = 0 < d), u.numPlanes = d, u.numIntersection = 0 10000 } 10001 10002 function b(e, t, i, n) { 10003 var r = null !== e ? e.length : 0, 10004 o = null; 10005 if (0 !== r) { 10006 if (o = v.value, !0 !== n || null === o) { 10007 var a = i + 4 * r, 10008 s = t.matrixWorldInverse; 10009 g.getNormalMatrix(s), (null === o || o.length < a) && (o = new Float32Array(a)); 10010 for (var l = 0, c = i; l !== r; ++l, c += 4) m.copy(e[l]).applyMatrix4(s, g), m.normal.toArray(o, c), o[c + 3] = m.constant 10011 } 10012 v.value = o, v.needsUpdate = !0 10013 } 10014 return u.numPlanes = r, o 10015 } 10016 this.uniform = v, this.numPlanes = 0, this.numIntersection = 0, this.init = function(e, t, i) { 10017 var n = 0 !== e.length || t || 0 !== d || p; 10018 return p = t, h = b(e, i, 0), d = e.length, n 10019 }, this.beginShadows = function() { 10020 f = !0, b(null) 10021 }, this.endShadows = function() { 10022 f = !1, y() 10023 }, this.setState = function(e, t, i, n, r, o) { 10024 if (!p || null === e || 0 === e.length || f && !i) f ? b(null) : y(); 10025 else { 10026 var a = f ? 0 : d, 10027 s = 4 * a, 10028 l = r.clippingState || null; 10029 v.value = l, l = b(e, n, s, o); 10030 for (var c = 0; c !== s; ++c) l[c] = h[c]; 10031 r.clippingState = l, this.numIntersection = t ? this.numPlanes : 0, this.numPlanes += a 10032 } 10033 } 10034 } 10035 10036 function Bo(i, n) { 10037 return { 10038 convert: function(e) { 10039 var t; 10040 if (e === E) return i.REPEAT; 10041 if (e === M) return i.CLAMP_TO_EDGE; 10042 if (e === S) return i.MIRRORED_REPEAT; 10043 if (e === z) return i.NEAREST; 10044 if (e === C) return i.NEAREST_MIPMAP_NEAREST; 10045 if (e === A) return i.NEAREST_MIPMAP_LINEAR; 10046 if (e === R) return i.LINEAR; 10047 if (e === L) return i.LINEAR_MIPMAP_NEAREST; 10048 if (e === P) return i.LINEAR_MIPMAP_LINEAR; 10049 if (e === Re) return i.UNSIGNED_BYTE; 10050 if (e === we) return i.UNSIGNED_SHORT_4_4_4_4; 10051 if (e === xe) return i.UNSIGNED_SHORT_5_5_5_1; 10052 if (e === _e) return i.UNSIGNED_SHORT_5_6_5; 10053 if (e === k) return i.BYTE; 10054 if (e === O) return i.SHORT; 10055 if (e === D) return i.UNSIGNED_SHORT; 10056 if (e === ye) return i.INT; 10057 if (e === be) return i.UNSIGNED_INT; 10058 if (e === Le) return i.FLOAT; 10059 if (e === Pe && null !== (t = n.get("OES_texture_half_float"))) return t.HALF_FLOAT_OES; 10060 if (e === Ee) return i.ALPHA; 10061 if (e === Me) return i.RGB; 10062 if (e === ke) return i.RGBA; 10063 if (e === Se) return i.LUMINANCE; 10064 if (e === Oe) return i.LUMINANCE_ALPHA; 10065 if (e === Ie) return i.DEPTH_COMPONENT; 10066 if (e === ze) return i.DEPTH_STENCIL; 10067 if (e === l) return i.FUNC_ADD; 10068 if (e === c) return i.FUNC_SUBTRACT; 10069 if (e === u) return i.FUNC_REVERSE_SUBTRACT; 10070 if (e === p) return i.ZERO; 10071 if (e === f) return i.ONE; 10072 if (e === m) return i.SRC_COLOR; 10073 if (e === g) return i.ONE_MINUS_SRC_COLOR; 10074 if (e === v) return i.SRC_ALPHA; 10075 if (e === y) return i.ONE_MINUS_SRC_ALPHA; 10076 if (e === b) return i.DST_ALPHA; 10077 if (e === w) return i.ONE_MINUS_DST_ALPHA; 10078 if (e === x) return i.DST_COLOR; 10079 if (e === _) return i.ONE_MINUS_DST_COLOR; 10080 if (e === T) return i.SRC_ALPHA_SATURATE; 10081 if ((e === Ne || e === Fe || e === Ue || e === Be) && null !== (t = n.get("WEBGL_compressed_texture_s3tc"))) { 10082 if (e === Ne) return t.COMPRESSED_RGB_S3TC_DXT1_EXT; 10083 if (e === Fe) return t.COMPRESSED_RGBA_S3TC_DXT1_EXT; 10084 if (e === Ue) return t.COMPRESSED_RGBA_S3TC_DXT3_EXT; 10085 if (e === Be) return t.COMPRESSED_RGBA_S3TC_DXT5_EXT 10086 } 10087 if ((e === He || e === $e || e === je || e === Ge) && null !== (t = n.get("WEBGL_compressed_texture_pvrtc"))) { 10088 if (e === He) return t.COMPRESSED_RGB_PVRTC_4BPPV1_IMG; 10089 if (e === $e) return t.COMPRESSED_RGB_PVRTC_2BPPV1_IMG; 10090 if (e === je) return t.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG; 10091 if (e === Ge) return t.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG 10092 } 10093 if (e === Ve && null !== (t = n.get("WEBGL_compressed_texture_etc1"))) return t.COMPRESSED_RGB_ETC1_WEBGL; 10094 if ((e === h || e === d) && null !== (t = n.get("EXT_blend_minmax"))) {
10095 if (e === h) return t.MIN_EXT; 10096 if (e === d) return t.MAX_EXT 10097 } 10098 return e === Te && null !== (t = n.get("WEBGL_depth_texture")) ? t.UNSIGNED_INT_24_8_WEBGL : 0 10099 } 10100 } 10101 } 10102 10103 function Ho(e) { 10104 console.log("THREE.WebGLRenderer", "87"); 10105 var r = void 0 !== (e = e || {}).canvas ? e.canvas : document.createElementNS("http://www.w3.org/1999/xhtml", "canvas"), 10106 t = void 0 !== e.context ? e.context : null, 10107 i = void 0 !== e.alpha && e.alpha, 10108 n = void 0 === e.depth || e.depth, 10109 o = void 0 === e.stencil || e.stencil, 10110 a = void 0 !== e.antialias && e.antialias, 10111 s = void 0 === e.premultipliedAlpha || e.premultipliedAlpha, 10112 l = void 0 !== e.preserveDrawingBuffer && e.preserveDrawingBuffer, 10113 p = [], 10114 f = [], 10115 m = null, 10116 g = [], 10117 v = []; 10118 this.domElement = r, this.context = null, this.autoClear = !0, this.autoClearColor = !0, this.autoClearDepth = !0, this.autoClearStencil = !0, this.sortObjects = !0, this.clippingPlanes = [], this.localClippingEnabled = !1, this.gammaFactor = 2, this.gammaInput = !1, this.gammaOutput = !1, this.physicallyCorrectLights = !1, this.toneMapping = Ae, this.toneMappingExposure = 1, this.toneMappingWhitePoint = 1, this.maxMorphTargets = 8, this.maxMorphNormals = 4; 10119 var D, T, I, z, N, c, E, M, y, F, b, u, h, S, C, A, d, w, x, U = this, 10120 _ = !1, 10121 R = null, 10122 L = null, 10123 B = -1, 10124 P = "", 10125 H = null, 10126 $ = null, 10127 k = new Lt, 10128 O = new Lt, 10129 j = null, 10130 G = 0, 10131 V = r.width, 10132 W = r.height, 10133 q = 1, 10134 X = new Lt(0, 0, V, W), 10135 Y = new Lt(0, 0, V, W), 10136 Z = !1, 10137 Q = new un, 10138 J = new Uo, 10139 K = !1, 10140 ee = !1, 10141 te = new It, 10142 ie = new Dt, 10143 ne = { 10144 geometries: 0, 10145 textures: 0 10146 }, 10147 re = { 10148 frame: 0, 10149 calls: 0, 10150 vertices: 0, 10151 faces: 0, 10152 points: 0 10153 }; 10154 10155 function oe() { 10156 return null === R ? q : 1 10157 } 10158 this.info = { 10159 render: re, 10160 memory: ne, 10161 programs: null 10162 }; 10163 try { 10164 var ae = { 10165 alpha: i, 10166 depth: n, 10167 stencil: o, 10168 antialias: a, 10169 premultipliedAlpha: s, 10170 preserveDrawingBuffer: l 10171 }; 10172 if (null === (D = t || r.getContext("webgl", ae) || r.getContext("experimental-webgl", ae))) throw null !== r.getContext("webgl") ? "Error creating WebGL context with your selected attributes." : "Error creating WebGL context."; 10173 void 0 === D.getShaderPrecisionFormat && (D.getShaderPrecisionFormat = function() { 10174 return { 10175 rangeMin: 1, 10176 rangeMax: 1, 10177 precision: 1 10178 } 10179 }), r.addEventListener("webglcontextlost", ue, !1), r.addEventListener("webglcontextrestored", he, !1) 10180 } catch (e) { 10181 console.error("THREE.WebGLRenderer: " + e) 10182 } 10183 10184 function se() { 10185 (T = new Fo(D)).get("WEBGL_depth_texture"), T.get("OES_texture_float"), T.get("OES_texture_float_linear"), T.get("OES_texture_half_float"), T.get("OES_texture_half_float_linear"), T.get("OES_standard_derivatives"), T.get("ANGLE_instanced_arrays"), T.get("OES_element_index_uint") && (Fr.MaxIndex = 4294967296), x = new Bo(D, T), I = new Io(D, T, e), (z = new Do(D, T, x)).scissor(O.copy(Y).multiplyScalar(q)), z.viewport(k.copy(X).multiplyScalar(q)), N = new Oo, c = new ko(D, T, z, N, I, x, ne), E = new dn(D), M = new no(D, E, ne), y = new ao(M, re), S = new eo(D), b = new Po(U, T, I), F = new oo, u = new Jr, h = new Xr(U, z, M, s), C = new io(D, T, re), A = new to(D, T, re), d = new ki(U, D, z, c, I), w = new Di(U, D, z, c, I), U.info.programs = b.programs, U.c
10185ontext = D, U.capabilities = I, U.extensions = T, U.properties = N, U.renderLists = u, U.state = z 10186 } 10187 se(); 10188 var le = new No(U); 10189 this.vr = le; 10190 var ce = new hn(U, y, I.maxTextureSize); 10191 10192 function ue(e) { 10193 e.preventDefault(), console.log("THREE.WebGLRenderer: Context Lost."), _ = !0 10194 } 10195 10196 function he(e) { 10197 console.log("THREE.WebGLRenderer: Context Restored."), _ = !1, se() 10198 } 10199 10200 function de(e) { 10201 var t, i = e.target; 10202 i.removeEventListener("dispose", de), pe(t = i), N.remove(t) 10203 } 10204 10205 function pe(e) { 10206 var t = N.get(e).program; 10207 (e.program = void 0) !== t && b.releaseProgram(t) 10208 } 10209 this.shadowMap = ce, this.getContext = function() { 10210 return D 10211 }, this.getContextAttributes = function() { 10212 return D.getContextAttributes() 10213 }, this.forceContextLoss = function() { 10214 var e = T.get("WEBGL_lose_context"); 10215 e && e.loseContext() 10216 }, this.forceContextRestore = function() { 10217 var e = T.get("WEBGL_lose_context"); 10218 e && e.restoreContext() 10219 }, this.getPixelRatio = function() { 10220 return q 10221 }, this.setPixelRatio = function(e) { 10222 void 0 !== e && (q = e, this.setSize(V, W, !1)) 10223 }, this.getSize = function() { 10224 return { 10225 width: V, 10226 height: W 10227 } 10228 }, this.setSize = function(e, t, i) { 10229 var n = le.getDevice(); 10230 n && n.isPresenting ? console.warn("THREE.WebGLRenderer: Can't change size while VR device is presenting.") : (V = e, W = t, r.width = e * q, r.height = t * q, !1 !== i && (r.style.width = e + "px", r.style.height = t + "px"), this.setViewport(0, 0, e, t)) 10231 }, this.getDrawingBufferSize = function() { 10232 return { 10233 width: V * q, 10234 height: W * q 10235 } 10236 }, this.setDrawingBufferSize = function(e, t, i) { 10237 V = e, W = t, q = i, r.width = e * i, r.height = t * i, this.setViewport(0, 0, e, t) 10238 }, this.setViewport = function(e, t, i, n) { 10239 X.set(e, W - t - n, i, n), z.viewport(k.copy(X).multiplyScalar(q)) 10240 }, this.setScissor = function(e, t, i, n) { 10241 Y.set(e, W - t - n, i, n), z.scissor(O.copy(Y).multiplyScalar(q)) 10242 }, this.setScissorTest = function(e) { 10243 z.setScissorTest(Z = e) 10244 }, this.getClearColor = h.getClearColor, this.setClearColor = h.setClearColor, this.getClearAlpha = h.getClearAlpha, this.setClearAlpha = h.setClearAlpha, this.clear = function(e, t, i) { 10245 var n = 0; 10246 (void 0 === e || e) && (n |= D.COLOR_BUFFER_BIT), (void 0 === t || t) && (n |= D.DEPTH_BUFFER_BIT), (void 0 === i || i) && (n |= D.STENCIL_BUFFER_BIT), D.clear(n) 10247 }, this.clearColor = function() { 10248 this.clear(!0, !1, !1) 10249 }, this.clearDepth = function() { 10250 this.clear(!1, !0, !1) 10251 }, this.clearStencil = function() { 10252 this.clear(!1, !1, !0) 10253 }, this.clearTarget = function(e, t, i, n) { 10254 this.setRenderTarget(e), this.clear(t, i, n) 10255 }, this.dispose = function() { 10256 r.removeEventListener("webglcontextlost", ue, !1), r.removeEventListener("webglcontextrestored", he, !1), u.dispose(), le.dispose() 10257 }, this.renderBufferImmediate = function(e, t, i) { 10258 z.initAttributes(); 10259 var n = N.get(e); 10260 e.hasPositions && !n.position && (n.position = D.createBuffer()), e.hasNormals && !n.normal && (n.normal = D.createBuffer()), e.hasUvs && !n.uv && (n.uv = D.createBuffer()), e.hasColors && !n.color && (n.color = D.createBuffer()); 10261 var r = t.getAttributes(); 10262 if (e.hasPositions && (D.bindBuffer(D.ARRAY_BUFFER, n.position), D.bufferData(D.ARRAY_BUFFER, e.positionArray, D.DYNAMIC_DRAW), z.enableAttribute(r.position), D.vertexAttribPointer(r.position, 3, D.FLOAT, !1, 0, 0)), e.hasNormals) { 10263 if (D.bindBuffer(D.ARRAY_BUFFER, n.normal), !i.isMeshPhongMaterial && !i.isMeshStandardMaterial && !i.isMeshNormalMaterial && !0 === i.flatShading) 10264 for (var o = 0, a = 3 * e.count; o < a; o += 9) { 10265 var s = e.normalArray, 10266 l = (s[o + 0] + s[o + 3] + s[o + 6]) / 3, 10267 c = (s[o + 1] + s[o + 4] + s[o + 7]) / 3, 10268 u = (s[o + 2] + s[o + 5] + s[o + 8]) / 3; 10269 s[o + 0] = l, s[o + 1] = c, s[o + 2] = u, s[o + 3] = l, s[o + 4] = c, s[o + 5] = u, s[o + 6] = l, s[o + 7] = c, s[o + 8] = u 10270 } 10271 D.bufferData(D.ARRAY_BUFFER, e.normalArray, D.DYNAMIC_DRAW), z.enableAttribute(r.normal), D.vertexAttribPointer(r.normal, 3, D.FLOAT, !1, 0, 0) 10272 } 10273 e.hasUvs && i.map && (D.bindBuffer(D.ARRAY_BUFFER, n.uv), D.bufferData(D.ARRAY_BUFFER, e.uvArray, D.DYNAMIC_DRAW), z.enableAttribute(r.uv), D.vertexAttribPointer(r.uv, 2, D.FLOAT, !1, 0, 0)), e.hasColors && i.vertexColors !== Ce && (D.bindBuffer(D.ARRAY_BUFFER, n.color), D.bufferData(D.ARRAY_BUFFER, e.colorArray, D.DYNAMIC_DRAW), z.enableAttribute(r.color), D.vertexAttribPointer(r.color, 3, D.FLOAT, !1, 0, 0)), z.disableUnusedAttributes(), D.drawArrays(D.TRIANGLES, 0, e.count), e.count = 0 10274 }, this.renderBufferDirect = function(e, t, i, n, r, o) { 10275 z.setMaterial(n); 10276 var a = Te(e, t, n, r), 10277 s = i.id + "_" + a.id + "_" + (!0 === n.wireframe), 10278 l = !1; 10279 s !== P && (P = s, l = !0), r.morphTargetInfluences && (S.update(r, i, n, a), l = !0); 10280 var c, u = i.index, 10281 h = i.attributes.position, 10282 d = 1; 10283 !0 === n.wireframe && (u = M.getWireframeAttribute(i), d = 2); 10284 var p = C; 10285 null !== u && (c = E.get(u), (p = A).setIndex(c)), l && (! function(e, t, i, n) { 10286 if (i && i.isInstancedBufferGeometry && null === T.get("ANGLE_instanced_arrays")) return console.error("THREE.WebGLRenderer.setupVertexAttributes: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_
10286instanced_arrays."); 10287 void 0 === n && (n = 0); 10288 z.initAttributes(); 10289 var r = i.attributes, 10290 o = t.getAttributes(), 10291 a = e.defaultAttributeValues; 10292 for (var s in o) { 10293 var l = o[s]; 10294 if (0 <= l) { 10295 var c = r[s]; 10296 if (void 0 !== c) { 10297 var u = c.normalized, 10298 h = c.itemSize, 10299 d = E.get(c); 10300 if (void 0 === d) continue; 10301 var p = d.buffer, 10302 f = d.type, 10303 m = d.bytesPerElement; 10304 if (c.isInterleavedBufferAttribute) { 10305 var g = c.data, 10306 v = g.stride, 10307 y = c.offset; 10308 g && g.isInstancedInterleavedBuffer ? (z.enableAttributeAndDivisor(l, g.meshPerAttribute), void 0 === i.maxInstancedCount && (i.maxInstancedCount = g.meshPerAttribute * g.count)) : z.enableAttribute(l), D.bindBuffer(D.ARRAY_BUFFER, p), D.vertexAttribPointer(l, h, f, u, v * m, (n * v + y) * m) 10309 } else c.isInstancedBufferAttribute ? (z.enableAttributeAndDivisor(l, c.meshPerAttribute), void 0 === i.maxInstancedCount && (i.maxInstancedCount = c.meshPerAttribute * c.count)) : z.enableAttribute(l), D.bindBuffer(D.ARRAY_BUFFER, p), D.vertexAttribPointer(l, h, f, u, 0, n * h * m) 10310 } else if (void 0 !== a) { 10311 var b = a[s]; 10312 if (void 0 !== b) switch (b.length) { 10313 case 2: 10314 D.vertexAttrib2fv(l, b); 10315 break; 10316 case 3: 10317 D.vertexAttrib3fv(l, b); 10318 break; 10319 case 4: 10320 D.vertexAttrib4fv(l, b); 10321 break; 10322 default: 10323 D.vertexAttrib1fv(l, b) 10324 } 10325 } 10326 } 10327 } 10328 z.disableUnusedAttributes() 10329 }(n, a, i), null !== u && D.bindBuffer(D.ELEMENT_ARRAY_BUFFER, c.buffer)); 10330 var f = 0; 10331 null !== u ? f = u.count : void 0 !== h && (f = h.count); 10332 var m = i.drawRange.start * d, 10333 g = i.drawRange.count * d, 10334 v = null !== o ? o.start * d : 0, 10335 y = null !== o ? o.count * d : 1 / 0, 10336 b = Math.max(m, v), 10337 w = Math.min(f, m + g, v + y) - 1, 10338 x = Math.max(0, w - b + 1); 10339 if (0 !== x) { 10340 if (r.isMesh) 10341 if (!0 === n.wireframe) z.setLineWidth(n.wireframeLinewidth * oe()), p.setMode(D.LINES); 10342 else switch (r.drawMode) { 10343 case Qe: 10344 p.setMode(D.TRIANGLES); 10345 break; 10346 case 1: 10347 p.setMode(D.TRIANGLE_STRIP); 10348 break; 10349 case 2: 10350 p.setMode(D.TRIANGLE_FAN) 10351 } else if (r.isLine) { 10352 var _ = n.linewidth; 10353 void 0 === _ && (_ = 1), z.setLineWidth(_ * oe()), r.isLineSegments ? p.setMode(D.LINES) : r.isLineLoop ? p.setMode(D.LINE_LOOP) : p.setMode(D.LINE_STRIP) 10354 } else r.isPoints && p.setMode(D.POINTS); 10355 i && i.isInstancedBufferGeometry ? 0 < i.maxInstancedCount && p.renderInstances(i, b, x) : p.render(b, x) 10356 } 10357 }; 10358 var fe, me, ge, ve = !(this.compile = function(i, e) { 10359 p.length = 0, f.length = 0, i.traverse(function(e) { 10360 e.isLight && (p.push(e), e.castShadow && f.push(e)) 10361 }), F.setup(p, f, e), i.traverse(function(e) { 10362 if (e.material) 10363 if (Array.isArray(e.material)) 10364 for (var t = 0; t < e.material.length; t++) _e(e.material[t], i.fog, e); 10365 else _e(e.material, i.fog, e) 10366 }) 10367 }), 10368 ye = null; 10369 10370 function be(e) { 10371 null !== ye && ye(e), (le.getDevice() || window).requestAnimationFrame(be) 10372 } 10373 10374 function we(e, t, i, n) { 10375 for (var r = 0, o = e.length; r < o; r++) { 10376 var a = e[r], 10377 s = a.object, 10378 l = a.geometry, 10379 c = void 0 === n ? a.material : n, 10380 u = a.group; 10381 if (i.isArrayCamera) 10382 for (var h = ($ = i).cameras, d = 0, p = h.length; d < p; d++) { 10383 var f = h[d]; 10384 if (s.layers.test(f.layers)) { 10385 var m = f.bounds, 10386 g = m.x * V, 10387 v = m.y * W, 10388 y = m.z * V, 10389 b = m.w * W; 10390 z.viewport(k.set(g, v, y, b).multiplyScalar(q)), xe(s, t, f, l, c, u) 10391 } 10392 } else $ = null, xe(s, t, i, l, c, u) 10393 } 10394 } 10395 10396 function xe(e, t, i, n, r, o) { 10397 if (e.onBeforeRender(U, t, i, n, r, o), e.modelViewMatrix.multiplyMatrices(i.matrixWorldInverse, e.matrixWorld), e.normalMatrix.getNormalMatrix(e.modelViewMatrix), e.isImmediateRenderObject) { 10398 z.setMaterial(r); 10399 var a = Te(i, t.fog, r, e); 10400 P = "", s = a, l = r, e.render(function(e) { 10401 U.renderBufferImmediate(e, s, l) 10402 }) 10403 } else U.renderBufferDirect(i, t.fog, n, r, e, o); 10404 var s, l; 10405 e.onAfterRender(U, t, i, n, r, o) 10406 } 10407 10408 function _e(e, t, i) { 10409 var n = N.get(e), 10410 r = b.getParameters(e, F.state, f, t, J.numPlanes, J.numIntersection, i), 10411 o = b.getProgramCode(e, r), 10412 a = n.program, 10413 s = !0; 10414 if (void 0 === a) e.addEventListener("dispose", de); 10415 else if (a.code !== o) pe(e); 10416 else { 10417 if (void 0 !== r.shaderID) return; 10418 s = !1 10419 } 10420 if (s) { 10421 if (r.shaderID) { 10422 var l = Li[r.shaderID]; 10423 n.shader = { 10424 name: e.type, 10425 uniforms: Ai.clone(l.uniforms), 10426 vertexShader: l.vertexShader, 10427 fragmentShader: l.fragmentShader 10428 } 10429 } else n.shader = { 10430 name: e.type, 10431 uniforms: e.uniforms, 10432 vertexShader: e.vertexShader, 10433 fragmentShader: e.fragmentShader 10434 }; 10435 e.onBeforeCompile(n.shader), a = b.acquireProgram(e, n.shader, r, o), n.program = a, e.program = a 10436 } 10437 var c = a.getAttributes(); 10438 if (e.morphTargets) 10439 for (var u = e.numSupportedMorphTargets = 0; u < U.maxMorphTargets; u++) 0 <= c["morphTarget" + u] && e.numSupportedMorphTargets++; 10440 if (e.morphNormals) 10441 for (u = e.numSupportedMorphNormals = 0; u < U.maxMorphNormals; u++) 0 <= c["morphNormal" + u] && e.numSupportedMorphNormals++; 10442 var h = n.shader.uniforms; 10443 (e.isShaderMaterial || e.isRawShaderMaterial) && !0 !== e.clipping || (n.numClippingPlanes = J.numPlanes, n.numIntersection = J.numIntersection, h.clippingPlanes = J.uniform), n.fog = t, n.lightsHash = F.state.hash, e.lights && (h.ambientLightColor.value = F.state.ambient, h.directionalLights.value = F.state.directional, h.spotLights.value = F.state.spot, h.rectAreaLights.value = F.state.rectArea, h.pointLights.value = F.state.point, h.hemisphereLights.value = F.state.hemi, h.directionalShadowMap.value = F.state.directionalShadowMap, h.directionalShadowMatrix.value = F.state.directionalShadowMatrix, h.spotShadowMap.value = F.state.spotShadowMap, h.spotShadowMatrix.value = F.state.spotShadowMatrix, h.pointShadowMap.value = F.state.pointShadowMap, h.pointShadowMatrix.value = F.state.pointShadowMatrix); 10444 var d = n.program.getUniforms(), 10445 p = _i.seqWithValue(d.seq, h); 10446 n.uniformsList = p 10447 } 10448 10449 function Te(e, t, i, n) { 10450 G = 0; 10451 var r = N.get(i); 10452 if (K && (ee || e !== H)) { 10453 var o = e === H && i.id === B; 10454 J.setState(i.clippingPlanes, i.clipIntersection, i.clipShadows, e, r, o) 10455 }!1 === i.needsUpdate && (void 0 === r.program ? i.needsUpdate = !0 : i.fog && r.fog !== t ? i.needsUpdate = !0 : i.lights && r.lightsHash !== F.state.hash ? i.needsUpdate = !0 : void 0 === r.numClippingPlanes || r.numClippingPlanes === J.numPlanes && r.numIntersection === J.numIntersection || (i.needsUpdate = !0)), i.needsUpdate && (_e(i, t, n), i.needsUpdate = !1); 10456 var a, s, l, c, u, h, d, p, f, m, g, v, y, b, w, x, _ = !1, 10457 T = !1, 10458 E = !1, 10459 M = r.program, 10460 S = M.getUniforms(), 10461 C = r.shader.uniforms; 10462 if (z.useProgram(M.program) && (E = T = _ = !0), i.id !== B && (B = i.id, T = !0), _ || e !== H) { 10463 if (S.setValue(D, "projectionMatrix", e.projectionMatrix), I.logarithmicDepthBuffer && S.setValue(D, "logDepthBufFC", 2 / (Math.log(e.far + 1) / Math.LN2)), H !== ($ || e) && (H = $ || e, E = T = !0), i.isShaderMaterial || i.isMeshPhongMaterial || i.isMeshStandardMaterial || i.envMap) { 10464 var A = S.map.cameraPosition; 10465 void 0 !== A && A.setValue(D, ie.setFromMatrixPosition(e.matrixWorld)) 10466 }(i.isMeshPhongMaterial || i.isMeshLambertMaterial || i.isMeshBasicMaterial || i.isMeshStandardMaterial || i.isShaderMaterial || i.skinning) && S.setValue(D, "viewMatrix", e.matrixWorldInverse) 10467 } 10468 if (i.skinning) { 10469 S.setOptional(D, n, "bindMatrix"), S.setOptional(D, n, "bindMatrixInverse"); 10470 var R = n.skeleton; 10471 if (R) { 10472 var L = R.bones; 10473 if (I.floatVertexTextures) { 10474 if (void 0 === R.boneTexture) { 10475 var P = Math.sqrt(4 * L.length); 10476 P = st.nextPowerOfTwo(Math.ceil(P)), P = Math.max(P, 4); 10477 var k = new Float32Array(P * P * 4); 10478 k.set(R.boneMatrices); 10479 var O = new zt(k, P, P, ke, Le); 10480 R.boneMatrices = k, R.boneTexture = O, R.boneTextureSize = P 10481 } 10482 S.setValue(D, "boneTexture", R.boneTexture), S.setValue(D, "boneTextureSize", R.boneTextureSize) 10483 } else S.setOptional(D, R, "boneMatrices") 10484 } 10485 } 10486 return T && (S.setValue(D, "toneMappingExposure", U.toneMappingExposure), S.setValue(D, "toneMappingWhitePoint", U.toneMappingWhitePoint), i.lights && (x = E, (w = C).ambientLightColor.needsUpdate = x, w.directionalLights.needsUpdate = x, w.pointLights.needsUpdate = x, w.spotLights.needsUpdate = x, w.rectAreaLights.needsUpdate = x, w.hemisphereLights.needsUpdate = x), t && i.fog && (b = t, (y = C).fogColor.value = b.color, b.isFog ? (y.fogNear.value = b.near, y.fogFar.value = b.far) : b.isFogExp2 && (y.fogDensity.value = b.density)), i.isMeshBasicMaterial ? Ee(C, i) : i.isMeshLambertMaterial ? (Ee(C, i), g = C, (v = i).emissiveMap && (g.emissiveMap.value = v.emissiveMap)) : i.isMeshPhongMaterial ? (Ee(C, i), i.isMeshToonMaterial ? (Me(f = C, m = i), m.gradientMap && (f.gradientMap.value = m.gradientMap)) : Me(C, i)) : i.isMeshStandardMaterial ? (Ee(C, i), i.isMeshPhysicalMaterial ? (p = i, (d = C).clearCoat.value = p.clearCoat, d.clearCoatRoughness.value = p.clearCoatRoughness, Se(d, p)) : Se(C, i)) : i.isMeshDepthMaterial ? (Ee(C, i), u = C, (h = i).displacementMap && (u.displacementMap.value = h.displacementMap, u.displacementScale.value = h.displacementScale, u.displacementBias.value = h.displacementBias)) : i.isMeshDistanceMaterial ? (Ee(C, i), function(e, t) {
10487 t.displacementMap && (e.displacementMap.value = t.displacementMap, e.displacementScale.value = t.displacementScale, e.displacementBias.value = t.displacementBias); 10488 e.referencePosition.value.copy(t.referencePosition), e.nearDistance.value = t.nearDistance, e.farDistance.value = t.farDistance 10489 }(C, i)) : i.isMeshNormalMaterial ? (Ee(C, i), function(e, t) { 10490 t.bumpMap && (e.bumpMap.value = t.bumpMap, e.bumpScale.value = t.bumpScale); 10491 t.normalMap && (e.normalMap.value = t.normalMap, e.normalScale.value.copy(t.normalScale)); 10492 t.displacementMap && (e.displacementMap.value = t.displacementMap, e.displacementScale.value = t.displacementScale, e.displacementBias.value = t.displacementBias) 10493 }(C, i)) : i.isLineBasicMaterial ? (c = i, (l = C).diffuse.value = c.color, l.opacity.value = c.opacity, i.isLineDashedMaterial && (s = i, (a = C).dashSize.value = s.dashSize, a.totalSize.value = s.dashSize + s.gapSize, a.scale.value = s.scale)) : i.isPointsMaterial ? function(e, t) { 10494 if (e.diffuse.value = t.color, e.opacity.value = t.opacity, e.size.value = t.size * q, e.scale.value = .5 * W, e.map.value = t.map, null !== t.map) { 10495 var i = t.map.offset, 10496 n = t.map.repeat; 10497 e.offsetRepeat.value.set(i.x, i.y, n.x, n.y) 10498 } 10499 }(C, i) : i.isShadowMaterial && (C.color.value = i.color, C.opacity.value = i.opacity), void 0 !== C.ltcMat && (C.ltcMat.value = Ci.LTC_MAT_TEXTURE), void 0 !== C.ltcMag && (C.ltcMag.value = Ci.LTC_MAG_TEXTURE), _i.upload(D, r.uniformsList, C, U)), S.setValue(D, "modelViewMatrix", n.modelViewMatrix), S.setValue(D, "normalMatrix", n.normalMatrix), S.setValue(D, "modelMatrix", n.matrixWorld), M 10500 } 10501 10502 function Ee(e, t) { 10503 var i; 10504 if (e.opacity.value = t.opacity, t.color && (e.diffuse.value = t.color), t.emissive && e.emissive.value.copy(t.emissive).multiplyScalar(t.emissiveIntensity), t.map && (e.map.value = t.map), t.alphaMap && (e.alphaMap.value = t.alphaMap), t.specularMap && (e.specularMap.value = t.specularMap), t.envMap && (e.envMap.value = t.envMap, e.flipEnvMap.value = t.envMap && t.envMap.isCubeTexture ? -1 : 1, e.reflectivity.value = t.reflectivity, e.refractionRatio.value = t.refractionRatio), t.lightMap && (e.lightMap.value = t.lightMap, e.lightMapIntensity.value = t.lightMapIntensity), t.aoMap && (e.aoMap.value = t.aoMap, e.aoMapIntensity.value = t.aoMapIntensity), t.map ? i = t.map : t.specularMap ? i = t.specularMap : t.displacementMap ? i = t.displacementMap : t.normalMap ? i = t.normalMap : t.bumpMap ? i = t.bumpMap : t.roughnessMap ? i = t.roughnessMap : t.metalnessMap ? i = t.metalnessMap : t.alphaMap ? i = t.alphaMap : t.emissiveMap && (i = t.emissiveMap), void 0 !== i) { 10505 i.isWebGLRenderTarget && (i = i.texture); 10506 var n = i.offset, 10507 r = i.repeat; 10508 e.offsetRepeat.value.set(n.x, n.y, r.x, r.y) 10509 } 10510 } 10511 10512 function Me(e, t) { 10513 e.specular.value = t.specular, e.shininess.value = Math.max(t.shininess, 1e-4), t.emissiveMap && (e.emissiveMap.value = t.emissiveMap), t.bumpMap && (e.bumpMap.value = t.bumpMap, e.bumpScale.value = t.bumpScale), t.normalMap && (e.normalMap.value = t.normalMap, e.normalScale.value.copy(t.normalScale)), t.displacementMap && (e.displacementMap.value = t.displacementMap, e.displacementScale.value = t.displacementScale, e.displacementBias.value = t.displacementBias) 10514 } 10515 10516 function Se(e, t) { 10517 e.roughness.value = t.roughness, e.metalness.value = t.metalness, t.roughnessMap && (e.roughnessMap.value = t.roughnessMap), t.metalnessMap && (e.metalnessMap.value = t.metalnessMap), t.emissiveMap && (e.emissiveMap.value = t.emissiveMap), t.bumpMap && (e.bumpMap.value = t.bumpMap, e.bumpScale.value = t.bumpScale), t.normalMap && (e.normalMap.value = t.normalMap, e.normalScale.value.copy(t.normalScale)), t.displacementMap && (e.displacementMap.value = t.displacementMap, e.displacementScale.value = t.displacementScale, e.displacementBias.value = t.displacementBias), t.envMap && (e.envMapIntensity.value = t.envMapIntensity) 10518 } 10519 this.animate = function(e) { 10520 ye = e, ve || ((le.getDevice() || window).requestAnimationFrame(be), ve = !0) 10521 }, this.render = function(e, t, i, n) { 10522 if (t && t.isCamera) { 10523 if (!_) { 10524 P = "", B = -1, !(H = null) === e.autoUpdate && e.updateMatrixWorld(), null === t.parent && t.updateMatrixWorld(), le.enabled && (t = le.getCamera(t)), te.multiplyMatrices(t.projectionMatrix, t.matrixWorldInverse), Q.setFromMatrix(te), p.length = 0, f.length = 0, g.length = 0, v.length = 0, ee = this.localClippingEnabled, K = J.init(this.clippingPlanes, ee, t), (m = u.get(e, t)).init(), 10525 function e(t, i, n) { 10526 if (!t.visible) return; 10527 var r = t.layers.test(i.layers); 10528 if (r) 10529 if (t.isLight) p.push(t), t.castShadow && f.push(t); 10530 else if (t.isSprite) t.frustumCulled && !Q.intersectsSprite(t) || g.push(t); 10531 else if (t.isLensFlare) v.push(t); 10532 else if (t.isImmediateRenderObject) n && ie.setFromMatrixPosition(t.matrixWorld).applyMatrix4(te), m.push(t, null, t.material, ie.z, null); 10533 else if ((t.isMesh || t.isLine || t.isPoints) && (t.isSkinnedMesh && t.skeleton.update(), !t.frustumCulled || Q.intersectsObject(t))) { 10534 n && ie.setFromMatrixPosition(t.matrixWorld).applyMatrix4(te); 10535 var o = y.update(t), 10536 a = t.material; 10537 if (Array.isArray(a)) 10538 for (var s = o.groups, l = 0, c = s.length; l < c; l++) { 10539 var u = s[l], 10540 h = a[u.materialIndex]; 10541 h && h.visible && m.push(t, o, h, ie.z, u) 10542 } else a.visible && m.push(t, o, a, ie.z, null) 10543 } 10544 var d = t.children; 10545 for (var l = 0, c = d.length; l < c; l++) e(d[l], i, n) 10546 }(e, t, U.sortObjects), !0 === U.sortObjects && m.sort(), K && J.beginShadows(), ce.render(f, e, t), F.setup(p, f, t), K && J.endShadows(), re.frame++, re.calls = 0, re.vertices = 0, re.faces = 0, void(re.points = 0) === i && (i = null), this.setRenderTarget(i), h.render(m, e, t, n); 10547 var r = m.opaque, 10548 o = m.transparent; 10549 if (e.overrideMaterial) { 10550 var a = e.overrideMaterial; 10551 r.length && we(r, e, t, a), o.length && we(o, e, t, a) 10552 } else r.length && we(r, e, t), o.length && we(o, e, t); 10553 w.render(g, e, t), d.render(v, e, t, k), i && c.updateRenderTargetMipmap(i), z.buffers.depth.setTest(!0), z.buffers.depth.setMask(!0), z.buffers.color.setMask(!0), z.setPolygonOffset(!1), le.enabled && le.submitFrame() 10554 } 10555 } else console.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.") 10556 }, this.setFaceCulling = function(e, t) { 10557 z.setCullFace(e), z.setFlipSided(0 === t) 10558 }, this.allocTextureUnit = function() { 10559 var e = G; 10560 return e >= I.maxTextures && console.warn("THREE.WebGLRenderer: Trying to use " + e + " texture units while this GPU supports only " + I.maxTextures), G += 1, e 10561 }, this.setTexture2D = (fe = !1, function(e, t) { 10562 e && e.isWebGLRenderTarget && (fe || (console.warn("THREE.WebGLRenderer.setTexture2D: don't use render targets as textures. Use their .texture property instead."), fe = !0), e = e.texture), c.setTexture2D(e, t) 10563 }), this.setTexture = (me = !1, function(e, t) { 10564 me || (console.warn("THREE.WebGLRenderer: .setTexture is deprecated, use setTexture2D instead."), me = !0), c.setTexture2D(e, t) 10565 }), this.setTextureCube = (ge = !1, function(e, t) { 10566 e && e.isWebGLRenderTargetCube && (ge || (console.warn("THREE.WebGLRenderer.setTextureCube: don't use cube render targets as textures. Use their .texture property instead."), ge = !0), e = e.texture), e && e.isCubeTexture || Array.isArray(e.image) && 6 === e.image.length ? c.setTextureCube(e, t) : c.setTextureCubeDynamic(e, t) 10567 }), this.getRenderTarget = function() { 10568 return R 10569 }, this.setRenderTarget = function(e) { 10570 (R = e) && void 0 === N.get(e).__webglFramebuffer && c.setupRenderTarget(e); 10571 var t = null, 10572 i = !1; 10573 if (e) { 10574 var n = N.get(e).__webglFramebuffer; 10575 e.isWebGLRenderTargetCube ? (t = n[e.activeCubeFace], i = !0) : t = n, k.copy(e.viewport), O.copy(e.scissor), j = e.scissorTest 10576 } else k.copy(X).multiplyScalar(q), O.copy(Y).multiplyScalar(q), j = Z; 10577 if (L !== t && (D.bindFramebuffer(D.FRAMEBUFFER, t), L = t), z.viewport(k), z.scissor(O), z.setScissorTest(j), i) { 10578 var r = N.get(e.texture); 10579 D.framebufferTexture2D(D.FRAMEBUFFER, D.COLOR_ATTACHMENT0, D.TEXTURE_CUBE_MAP_POSITIVE_X + e.activeCubeFace, r.__webglTexture, e.activeMipMapLevel) 10580 } 10581 }, this.readRenderTargetPixels = function(e, t, i, n, r, o) { 10582 if (e && e.isWebGLRenderTarget) { 10583 var a = N.get(e).__webglFramebuffer; 10584 if (a) { 10585 var s = !1; 10586 a !== L && (D.bindFramebuffer(D.FRAMEBUFFER, a), s = !0); 10587 try { 10588 var l = e.texture, 10589 c = l.format, 10590 u = l.type; 10591 if (c !== ke && x.convert(c) !== D.getParameter(D.IMPLEMENTATION_COLOR_READ_FORMAT)) return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format."); 10592 if (!(u === Re || x.convert(u) === D.getParameter(D.IMPLEMENTATION_COLOR_READ_TYPE) || u === Le && (T.get("OES_texture_float") || T.get("WEBGL_color_buffer_float")) || u === Pe && T.get("EXT_color_buffer_half_float"))) return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type."); 10593 D.checkFramebufferStatus(D.FRAMEBUFFER) === D.FRAMEBUFFER_COMPLETE ? 0 <= t && t <= e.width - n && 0 <= i && i <= e.height - r && D.readPixels(t, i, n, r, x.convert(c), x.convert(u), o) : console.error("THREE.WebGLRenderer.readRenderTargetPixels: readPixels from renderTarget failed. Framebuffer not complete.") 10594 } finally { 10595 s && D.bindFramebuffer(D.FRAMEBUFFER, L) 10596 } 10597 } 10598 } else console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.") 10599 } 10600 } 10601 10602 function $o(e, t) { 10603 this.name = "", this.color = new Ei(e), this.density = void 0 !== t ? t : 25e-5 10604 } 10605 10606 function jo(e, t, i) { 10607 this.name = "", this.color = new Ei(e), this.near = void 0 !== t ? t : 1, this.far = void 0 !== i ? i : 1e3 10608 } 10609 10610 function Go() { 10611 On.call(this), this.type = "Scene", this.background = null, this.fog = null, this.overrideMaterial = null, this.autoUpdate = !0 10612 } 10613 10614 function Vo(e, t, i, n, r) { 10615 On.call(this), this.lensFlares = [], this.positionScreen = new Dt, (this.customUpdateCallback = void 0) !== e && this.add(e, t, i, n, r) 10616 } 10617 10618 function Wo(e) { 10619 tn.call(this), this.type = "SpriteMaterial", this.color = new Ei(16777215), this.map = null, this.rotation = 0, this.fog = !1, this.lights = !1, this.setValues(e) 10620 } 10621 10622 function qo(e) { 10623 On.call(this), this.type = "Sprite", this.material = void 0 !== e ? e : new Wo 10624 } 10625 10626 function Xo() { 10627 On.call(this), this.type = "LOD", Object.defineProperties(this, { 10628 levels: { 10629 enumerable: !0, 10630 value: [] 10631 } 10632 }) 10633 } 10634 10635 function Yo(e, t) { 10636 if (e = e || [], this.bones = e.slice(0), this.boneMatrices = new Float32Array(16 * this.bones.length), void 0 === t) this.calculateInverses(); 10637 else if (this.bones.length === t.length) this.boneInverses = t.slice(0); 10638 else { 10639 console.warn("THREE.Skeleton boneInverses is the wrong length."), this.boneInverses = []; 10640 for (var i = 0, n = this.bones.length; i < n; i++) this.boneInverses.push(new It) 10641 } 10642 } 10643 10644 function Zo() { 10645 On.call(this), this.type = "Bone" 10646 } 10647 10648 function Qo(e, t) { 10649 qr.call(this, e, t), this.type = "SkinnedMesh", this.bindMode = "attached", this.bindMatrix = new It, this.bindMatrixInverse = new It; 10650 var i = new Yo(this.initBones()); 10651 this.bind(i, this.matrixWorld), this.normalizeSkinWeights() 10652 } 10653 10654 function Jo(e) { 10655 tn.call(this), this.type = "LineBasicMaterial", this.color = new Ei(16777215), this.linewidth = 1, this.linecap = "round", this.linejoin = "round", this.lights = !1, this.setValues(e) 10656 } 10657 10658 function Ko(e, t, i) { 10659 if (1 === i) return console.warn("THREE.Line: parameter THREE.LinePieces no longer supported. Created THREE.LineSegments instead."), new ea(e, t); 10660 On.call(this), this.type = "Line", this.geometry = void 0 !== e ? e : new Fr, this.material = void 0 !== t ? t : new Jo({ 10661 color: 16777215 * Math.random() 10662 }) 10663 } 10664 10665 function ea(e, t) { 10666 Ko.call(this, e, t), this.type = "LineSegments" 10667 } 10668 10669 function ta(e, t) { 10670 Ko.call(this, e, t), this.type = "LineLoop" 10671 } 10672 10673 function ia(e) { 10674 tn.call(this), this.type = "PointsMaterial", this.color = new Ei(16777215), this.map = null, this.size = 1, this.sizeAttenuation = !0, this.lights = !1, this.setValues(e) 10675 } 10676 10677 function na(e, t) { 10678 On.call(this), this.type = "Points", this.geometry = void 0 !== e ? e : new Fr, this.material = void 0 !== t ? t : new ia({ 10679 color: 16777215 * Math.random() 10680 }) 10681 } 10682 10683 function ra() { 10684 On.call(this), this.type = "Group" 10685 } 10686 10687 function oa(t, e, i, n, r, o, a, s, l) { 10688 Rt.call(this, t, e, i, n, r, o, a, s, l), this.generateMipmaps = !1; 10689 var c = this; 10690 ! function e() { 10691 requestAnimationFrame(e), t.readyState >= t.HAVE_CURRENT_DATA && (c.needsUpdate = !0) 10692 }() 10693 } 10694 10695 function aa(e, t, i, n, r, o, a, s, l, c, u, h) { 10696 Rt.call(this, null, o, a, s, l, c, n, r, u, h), this.image = { 10697 width: t, 10698 height: i 10699 }, this.mipmaps = e, this.flipY = !1, this.generateMipmaps = !1 10700 } 10701 10702 function sa(e, t, i, n, r, o, a, s, l, c) { 10703 if ((c = void 0 !== c ? c : Ie) !== Ie && c !== ze) throw new Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat"); 10704 void 0 === i && c === Ie && (i = D), void 0 === i && c === ze && (i = Te), Rt.call(this, null, n, r, o, a, s, c, i, l), this.image = { 10705 width: e, 10706 height: t 10707 }, this.magFilter = void 0 !== a ? a : z, this.minFilter = void 0 !== s ? s : z, this.flipY = !1, this.generateMipmaps = !1 10708 } 10709 10710 function la(e) { 10711 Fr.call(this), this.type = "WireframeGeometry"; 10712 var t, i, n, r, o, a, s, l, c, u, h = [], 10713 d = [0, 0], 10714 p = {}, 10715 f = ["a", "b", "c"]; 10716 if (e && e.isGeometry) { 10717 var m = e.faces; 10718 for (t = 0, n = m.length; t < n; t++) { 10719 var g = m[t]; 10720 for (i = 0; i < 3; i++) s = g[f[i]], l = g[f[(i + 1) % 3]], d[0] = Math.min(s, l), d[1] = Math.max(s, l), void 0 === p[c = d[0] + "," + d[1]] && (p[c] = { 10721 index1: d[0], 10722 index2: d[1] 10723 }) 10724 } 10725 for (c in p) a = p[c], u = e.vertices[a.index1], h.push(u.x, u.y, u.z), u = e.vertices[a.index2]
vendor: 5,680 bytes, lines 10725-10856
10725, h.push(u.x, u.y, u.z) 10726 } else if (e && e.isBufferGeometry) { 10727 var v, y, b, w, x, _; 10728 if (u = new Dt, null !== e.index) { 10729 for (v = e.attributes.position, y = e.index, 0 === (b = e.groups).length && (b = [{ 10730 start: 0, 10731 count: y.count, 10732 materialIndex: 0 10733 }]), r = 0, o = b.length; r < o; ++r) 10734 for (n = (t = (w = b[r]).start) + w.count; t < n; t += 3) 10735 for (i = 0; i < 3; i++) s = y.getX(t + i), l = y.getX(t + (i + 1) % 3), d[0] = Math.min(s, l), d[1] = Math.max(s, l), void 0 === p[c = d[0] + "," + d[1]] && (p[c] = { 10736 index1: d[0], 10737 index2: d[1] 10738 }); 10739 for (c in p) a = p[c], u.fromBufferAttribute(v, a.index1), h.push(u.x, u.y, u.z), u.fromBufferAttribute(v, a.index2), h.push(u.x, u.y, u.z) 10740 } else 10741 for (t = 0, n = (v = e.attributes.position).count / 3; t < n; t++) 10742 for (i = 0; i < 3; i++) x = 3 * t + i, u.fromBufferAttribute(v, x), h.push(u.x, u.y, u.z), _ = 3 * t + (i + 1) % 3, u.fromBufferAttribute(v, _), h.push(u.x, u.y, u.z) 10743 } 10744 this.addAttribute("position", new Dr(h, 3)) 10745 } 10746 10747 function ca(e, t, i) { 10748 Mr.call(this), this.type = "ParametricGeometry", this.parameters = { 10749 func: e, 10750 slices: t, 10751 stacks: i 10752 }, this.fromBufferGeometry(new ua(e, t, i)), this.mergeVertices() 10753 } 10754 10755 function ua(e, t, i) { 10756 Fr.call(this), this.type = "ParametricBufferGeometry", this.parameters = { 10757 func: e, 10758 slices: t, 10759 stacks: i 10760 }; 10761 var n, r, o = [], 10762 a = [], 10763 s = [], 10764 l = [], 10765 c = new Dt, 10766 u = new Dt, 10767 h = new Dt, 10768 d = new Dt, 10769 p = new Dt, 10770 f = t + 1; 10771 for (n = 0; n <= i; n++) { 10772 var m = n / i; 10773 for (r = 0; r <= t; r++) { 10774 var g = r / t; 10775 u = e(g, m, u), a.push(u.x, u.y, u.z), 0 <= g - 1e-5 ? (h = e(g - 1e-5, m, h), d.subVectors(u, h)) : (h = e(g + 1e-5, m, h), d.subVectors(h, u)), 0 <= m - 1e-5 ? (h = e(g, m - 1e-5, h), p.subVectors(u, h)) : (h = e(g, m + 1e-5, h), p.subVectors(h, u)), c.crossVectors(d, p).normalize(), s.push(c.x, c.y, c.z), l.push(g, m) 10776 } 10777 } 10778 for (n = 0; n < i; n++) 10779 for (r = 0; r < t; r++) { 10780 var v = n * f + r, 10781 y = n * f + r + 1, 10782 b = (n + 1) * f + r + 1, 10783 w = (n + 1) * f + r; 10784 o.push(v, y, w), o.push(y, b, w) 10785 } 10786 this.setIndex(o), this.addAttribute("position", new Dr(a, 3)), this.addAttribute("normal", new Dr(s, 3)), this.addAttribute("uv", new Dr(l, 2)) 10787 } 10788 10789 function ha(e, t, i, n) { 10790 Mr.call(this), this.type = "PolyhedronGeometry", this.parameters = { 10791 vertices: e, 10792 indices: t, 10793 radius: i, 10794 detail: n 10795 }, this.fromBufferGeometry(new da(e, t, i, n)), this.mergeVertices() 10796 } 10797 10798 function da(n, o, e, t) { 10799 Fr.call(this), this.type = "PolyhedronBufferGeometry", this.parameters = { 10800 vertices: n, 10801 indices: o, 10802 radius: e, 10803 detail: t 10804 }, e = e || 1; 10805 var u = [], 10806 h = []; 10807 10808 function a(e, t, i, n) { 10809 var r, o, a = Math.pow(2, n), 10810 s = []; 10811 for (r = 0; r <= a; r++) { 10812 s[r] = []; 10813 var l = e.clone().lerp(i, r / a), 10814 c = t.clone().lerp(i, r / a), 10815 u = a - r; 10816 for (o = 0; o <= u; o++) s[r][o] = 0 === o && r === a ? l : l.clone().lerp(c, o / u) 10817 } 10818 for (r = 0; r < a; r++) 10819 for (o = 0; o < 2 * (a - r) - 1; o++) { 10820 var h = Math.floor(o / 2); 10821 o % 2 == 0 ? (d(s[r][h + 1]), d(s[r + 1][h]), d(s[r][h])) : (d(s[r][h + 1]), d(s[r + 1][h + 1]), d(s[r + 1][h])) 10822 } 10823 } 10824 10825 function d(e) { 10826 u.push(e.x, e.y, e.z) 10827 } 10828 10829 function s(e, t) { 10830 var i = 3 * e; 10831 t.x = n[i + 0], t.y = n[i + 1], t.z = n[i + 2] 10832 } 10833 10834 function p(e, t, i, n) { 10835 n < 0 && 1 === e.x && (h[t] = e.x - 1), 0 === i.x && 0 === i.z && (h[t] = n / 2 / Math.PI + .5) 10836 } 10837 10838 function f(e) { 10839 return Math.atan2(e.z, -e.x) 10840 }! function(e) { 10841 for (var t = new Dt, i = new Dt, n = new Dt, r = 0; r < o.length; r += 3) s(o[r + 0], t), s(o[r + 1], i), s(o[r + 2], n), a(t, i, n, e) 10842 }(t = t || 0), 10843 function(e) { 10844 for (var t = new Dt, i = 0; i < u.length; i += 3) t.x = u[i + 0], t.y = u[i + 1], t.z = u[i + 2], t.normalize().multiplyScalar(e), u[i + 0] = t.x, u[i + 1] = t.y, u[i + 2] = t.z 10845 }(e), 10846 function() { 10847 for (var e = new Dt, t = 0; t < u.length; t += 3) { 10848 e.x = u[t + 0], e.y = u[t + 1], e.z = u[t + 2]; 10849 var i = f(e) / 2 / Math.PI + .5, 10850 n = (r = e, Math.atan2(-r.y, Math.sqrt(r.x * r.x + r.z * r.z)) / Math.PI + .5); 10851 h.push(i, 1 - n) 10852 } 10853 var r; 10854 (function() { 10855 for (var e = new Dt, t = new Dt, i = new Dt, n = new Dt, r = new lt, o = new lt, a = new lt, s = 0, l = 0; s < u.length; s += 9, l += 6) { 10856 e.set(u[s + 0], u[s + 1], u[s + 2]), t.set(u[s + 3], u[s + 4], u[s + 5]), i.set(u[
vendor: 4,706 bytes, lines 10856-10953
10856s + 6], u[s + 7], u[s + 8]), r.set(h[l + 0], h[l + 1]), o.set(h[l + 2], h[l + 3]), a.set(h[l + 4], h[l + 5]), n.copy(e).add(t).add(i).divideScalar(3); 10857 var c = f(n); 10858 p(r, l + 0, e, c), p(o, l + 2, t, c), p(a, l + 4, i, c) 10859 } 10860 })(), 10861 function() { 10862 for (var e = 0; e < h.length; e += 6) { 10863 var t = h[e + 0], 10864 i = h[e + 2], 10865 n = h[e + 4], 10866 r = Math.max(t, i, n), 10867 o = Math.min(t, i, n);.9 < r && o < .1 && (t < .2 && (h[e + 0] += 1), i < .2 && (h[e + 2] += 1), n < .2 && (h[e + 4] += 1)) 10868 } 10869 }() 10870 }(), this.addAttribute("position", new Dr(u, 3)), this.addAttribute("normal", new Dr(u.slice(), 3)), this.addAttribute("uv", new Dr(h, 2)), 0 === t ? this.computeVertexNormals() : this.normalizeNormals() 10871 } 10872 10873 function pa(e, t) { 10874 Mr.call(this), this.type = "TetrahedronGeometry", this.parameters = { 10875 radius: e, 10876 detail: t 10877 }, this.fromBufferGeometry(new fa(e, t)), this.mergeVertices() 10878 } 10879 10880 function fa(e, t) { 10881 da.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], e, t), this.type = "TetrahedronBufferGeometry", this.parameters = { 10882 radius: e, 10883 detail: t 10884 } 10885 } 10886 10887 function ma(e, t) { 10888 Mr.call(this), this.type = "OctahedronGeometry", this.parameters = { 10889 radius: e, 10890 detail: t 10891 }, this.fromBufferGeometry(new ga(e, t)), this.mergeVertices() 10892 } 10893 10894 function ga(e, t) { 10895 da.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], e, t), this.type = "OctahedronBufferGeometry", this.parameters = { 10896 radius: e, 10897 detail: t 10898 } 10899 } 10900 10901 function va(e, t) { 10902 Mr.call(this), this.type = "IcosahedronGeometry", this.parameters = { 10903 radius: e, 10904 detail: t 10905 }, this.fromBufferGeometry(new ya(e, t)), this.mergeVertices() 10906 } 10907 10908 function ya(e, t) { 10909 var i = (1 + Math.sqrt(5)) / 2; 10910 da.call(this, [-1, i, 0, 1, i, 0, -1, -i, 0, 1, -i, 0, 0, -1, i, 0, 1, i, 0, -1, -i, 0, 1, -i, i, 0, -1, i, 0, 1, -i, 0, -1, -i, 0, 1], [0, 11, 5, 0, 5, 1, 0, 1, 7, 0, 7, 10, 0, 10, 11, 1, 5, 9, 5, 11, 4, 11, 10, 2, 10, 7, 6, 7, 1, 8, 3, 9, 4, 3, 4, 2, 3, 2, 6, 3, 6, 8, 3, 8, 9, 4, 9, 5, 2, 4, 11, 6, 2, 10, 8, 6, 7, 9, 8, 1], e, t), this.type = "IcosahedronBufferGeometry", this.parameters = { 10911 radius: e, 10912 detail: t 10913 } 10914 } 10915 10916 function ba(e, t) { 10917 Mr.call(this), this.type = "DodecahedronGeometry", this.parameters = { 10918 radius: e, 10919 detail: t 10920 }, this.fromBufferGeometry(new wa(e, t)), this.mergeVertices() 10921 } 10922 10923 function wa(e, t) { 10924 var i = (1 + Math.sqrt(5)) / 2, 10925 n = 1 / i; 10926 da.call(this, [-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, -n, -i, 0, -n, i, 0, n, -i, 0, n, i, -n, -i, 0, -n, i, 0, n, -i, 0, n, i, 0, -i, 0, -n, i, 0, -n, -i, 0, n, i, 0, n], [3, 11, 7, 3, 7, 15, 3, 15, 13, 7, 19, 17, 7, 17, 6, 7, 6, 15, 17, 4, 8, 17, 8, 10, 17, 10, 6, 8, 0, 16, 8, 16, 2, 8, 2, 10, 0, 12, 1, 0, 1, 18, 0, 18, 16, 6, 10, 2, 6, 2, 13, 6, 13, 15, 2, 16, 18, 2, 18, 3, 2, 3, 13, 18, 1, 9, 18, 9, 11, 18, 11, 3, 4, 14, 12, 4, 12, 0, 4, 0, 8, 11, 9, 5, 11, 5, 19, 11, 19, 7, 19, 5, 14, 19, 14, 4, 19, 4, 17, 1, 12, 14, 1, 14, 5, 1, 5, 9], e, t), this.type = "DodecahedronBufferGeometry", this.parameters = { 10927 radius: e, 10928 detail: t 10929 } 10930 } 10931 10932 function xa(e, t, i, n, r, o) { 10933 Mr.call(this), this.type = "TubeGeometry", this.parameters = { 10934 path: e, 10935 tubularSegments: t, 10936 radius: i, 10937 radialSegments: n, 10938 closed: r 10939 }, void 0 !== o && console.warn("THREE.TubeGeometry: taper has been removed."); 10940 var a = new _a(e, t, i, n, r); 10941 this.tangents = a.tangents, this.normals = a.normals, this.binormals = a.binormals, this.fromBufferGeometry(a), this.mergeVertices() 10942 } 10943 10944 function _a(s, l, c, u, e) { 10945 Fr.call(this), this.type = "TubeBufferGeometry", this.parameters = { 10946 path: s, 10947 tubularSegments: l, 10948 radius: c, 10949 radialSegments: u, 10950 closed: e 10951 }, l = l || 64, c = c || 1, u = u || 8, e = e || !1; 10952 var h = s.computeFrenetFrames(l, e); 10953 this.tangents = h.tangents, this.normals = h.normals, this.binormals = h.binormals;
vendor: 16,101 bytes, lines 10954-11287
10954 var r, d, p = new Dt, 10955 f = new Dt, 10956 t = new lt, 10957 m = [], 10958 g = [], 10959 i = [], 10960 o = []; 10961 10962 function n(e) { 10963 var t = s.getPointAt(e / l), 10964 i = h.normals[e], 10965 n = h.binormals[e]; 10966 for (d = 0; d <= u; d++) { 10967 var r = d / u * Math.PI * 2, 10968 o = Math.sin(r), 10969 a = -Math.cos(r); 10970 f.x = a * i.x + o * n.x, f.y = a * i.y + o * n.y, f.z = a * i.z + o * n.z, f.normalize(), g.push(f.x, f.y, f.z), p.x = t.x + c * f.x, p.y = t.y + c * f.y, p.z = t.z + c * f.z, m.push(p.x, p.y, p.z) 10971 } 10972 }! function() { 10973 for (r = 0; r < l; r++) n(r); 10974 n(!1 === e ? l : 0), 10975 function() { 10976 for (r = 0; r <= l; r++) 10977 for (d = 0; d <= u; d++) t.x = r / l, t.y = d / u, i.push(t.x, t.y) 10978 }(), 10979 function() { 10980 for (d = 1; d <= l; d++) 10981 for (r = 1; r <= u; r++) { 10982 var e = (u + 1) * (d - 1) + (r - 1), 10983 t = (u + 1) * d + (r - 1), 10984 i = (u + 1) * d + r, 10985 n = (u + 1) * (d - 1) + r; 10986 o.push(e, t, n), o.push(t, i, n) 10987 } 10988 }() 10989 }(), this.setIndex(o), this.addAttribute("position", new Dr(m, 3)), this.addAttribute("normal", new Dr(g, 3)), this.addAttribute("uv", new Dr(i, 2)) 10990 } 10991 10992 function Ta(e, t, i, n, r, o, a) { 10993 Mr.call(this), this.type = "TorusKnotGeometry", this.parameters = { 10994 radius: e, 10995 tube: t, 10996 tubularSegments: i, 10997 radialSegments: n, 10998 p: r, 10999 q: o 11000 }, void 0 !== a && console.warn("THREE.TorusKnotGeometry: heightScale has been deprecated. Use .scale( x, y, z ) instead."), this.fromBufferGeometry(new Ea(e, t, i, n, r, o)), this.mergeVertices() 11001 } 11002 11003 function Ea(e, t, i, n, r, o) { 11004 Fr.call(this), this.type = "TorusKnotBufferGeometry", this.parameters = { 11005 radius: e, 11006 tube: t, 11007 tubularSegments: i, 11008 radialSegments: n, 11009 p: r, 11010 q: o 11011 }, e = e || 100, t = t || 40, i = Math.floor(i) || 64, n = Math.floor(n) || 8, r = r || 2, o = o || 3; 11012 var a, s, l = [], 11013 c = [], 11014 u = [], 11015 h = [], 11016 d = new Dt, 11017 p = new Dt, 11018 f = new Dt, 11019 m = new Dt, 11020 g = new Dt, 11021 v = new Dt, 11022 y = new Dt; 11023 for (a = 0; a <= i; ++a) { 11024 var b = a / i * r * Math.PI * 2; 11025 for (C(b, r, o, e, f), C(b + .01, r, o, e, m), v.subVectors(m, f), y.addVectors(m, f), g.crossVectors(v, y), y.crossVectors(g, v), g.normalize(), y.normalize(), s = 0; s <= n; ++s) { 11026 var w = s / n * Math.PI * 2, 11027 x = -t * Math.cos(w), 11028 _ = t * Math.sin(w); 11029 d.x = f.x + (x * y.x + _ * g.x), d.y = f.y + (x * y.y + _ * g.y), d.z = f.z + (x * y.z + _ * g.z), c.push(d.x, d.y, d.z), p.subVectors(d, f).normalize(), u.push(p.x, p.y, p.z), h.push(a / i), h.push(s / n) 11030 } 11031 } 11032 for (s = 1; s <= i; s++) 11033 for (a = 1; a <= n; a++) { 11034 var T = (n + 1) * (s - 1) + (a - 1), 11035 E = (n + 1) * s + (a - 1), 11036 M = (n + 1) * s + a, 11037 S = (n + 1) * (s - 1) + a; 11038 l.push(T, E, S), l.push(E, M, S) 11039 } 11040 11041 function C(e, t, i, n, r) { 11042 var o = Math.cos(e), 11043 a = Math.sin(e), 11044 s = i / t * e, 11045 l = Math.cos(s); 11046 r.x = n * (2 + l) * .5 * o, r.y = n * (2 + l) * a * .5, r.z = n * Math.sin(s) * .5 11047 } 11048 this.setIndex(l), this.addAttribute("position", new Dr(c, 3)), this.addAttribute("normal", new Dr(u, 3)), this.addAttribute("uv", new Dr(h, 2)) 11049 } 11050 11051 function Ma(e, t, i, n, r) { 11052 Mr.call(this), this.type = "TorusGeometry", this.parameters = { 11053 radius: e, 11054 tube: t, 11055 radialSegments: i, 11056 tubularSegments: n, 11057 arc: r 11058 }, this.fromBufferGeometry(new Sa(e, t, i, n, r)), this.mergeVertices() 11059 } 11060 11061 function Sa(e, t, i, n, r) { 11062 Fr.call(this), this.type = "TorusBufferGeometry", this.parameters = { 11063 radius: e, 11064 tube: t, 11065 radialSegments: i, 11066 tubularSegments: n, 11067 arc: r 11068 }, e = e || 100, t = t || 40, i = Math.floor(i) || 8, n = Math.floor(n) || 6, r = r || 2 * Math.PI; 11069 var o, a, s = [], 11070 l = [], 11071 c = [], 11072 u = [], 11073 h = new Dt, 11074 d = new Dt, 11075 p = new Dt; 11076 for (o = 0; o <= i; o++) 11077 for (a = 0; a <= n; a++) { 11078 var f = a / n * r, 11079 m = o / i * Math.PI * 2; 11080 d.x = (e + t * Math.cos(m)) * Math.cos(f), d.y = (e + t * Math.cos(m)) * Math.sin(f), d.z = t * Math.sin(m), l.push(d.x, d.y, d.z), h.x = e * Math.cos(f), h.y = e * Math.sin(f), p.subVectors(d, h).normalize(), c.push(p.x, p.y, p.z), u.push(a / n), u.push(o / i) 11081 } 11082 for (o = 1; o <= i; o++) 11083 for (a = 1; a <= n; a++) { 11084 var g = (n + 1) * o + a - 1, 11085 v = (n + 1) * (o - 1) + a - 1, 11086 y = (n + 1) * (o - 1) + a, 11087 b = (n + 1) * o + a; 11088 s.push(g, v, b), s.push(v, y, b) 11089 } 11090 this.setIndex(s), this.addAttribute("position", new Dr(l, 3)), this.addAttribute("normal", new Dr(c, 3)), this.addAttribute("uv", new Dr(u, 2)) 11091 } 11092 zo.prototype = Object.assign(Object.create(zn.prototype), { 11093 constructor: zo, 11094 isArrayCamera: !0 11095 }), $o.prototype.isFogExp2 = !0, $o.prototype.clone = function() { 11096 return new $o(this.color.getHex(), this.density) 11097 }, $o.prototype.toJSON = function(e) { 11098 return { 11099 type: "FogExp2", 11100 color: this.color.getHex(), 11101 density: this.density 11102 } 11103 }, jo.prototype.isFog = !0, jo.prototype.clone = function() { 11104 return new jo(this.color.getHex(), this.near, this.far) 11105 }, jo.prototype.toJSON = function(e) { 11106 return { 11107 type: "Fog", 11108 color: this.color.getHex(), 11109 near: this.near, 11110 far: this.far 11111 } 11112 }, Go.prototype = Object.assign(Object.create(On.prototype), { 11113 constructor: Go, 11114 copy: function(e, t) { 11115 return On.prototype.copy.call(this, e, t), null !== e.background && (this.background = e.background.clone()), null !== e.fog && (this.fog = e.fog.clone()), null !== e.overrideMaterial && (this.overrideMaterial = e.overrideMaterial.clone()), this.autoUpdate = e.autoUpdate, this.matrixAutoUpdate = e.matrixAutoUpdate, this 11116 }, 11117 toJSON: function(e) { 11118 var t = On.prototype.toJSON.call(this, e); 11119 return null !== this.background && (t.object.background = this.background.toJSON(e)), null !== this.fog && (t.object.fog = this.fog.toJSON()), t 11120 } 11121 }), Vo.prototype = Object.assign(Object.create(On.prototype), { 11122 constructor: Vo, 11123 isLensFlare: !0, 11124 copy: function(e) { 11125 On.prototype.copy.call(this, e), this.positionScreen.copy(e.positionScreen), this.customUpdateCallback = e.customUpdateCallback; 11126 for (var t = 0, i = e.lensFlares.length; t < i; t++) this.lensFlares.push(e.lensFlares[t]); 11127 return this 11128 }, 11129 add: function(e, t, i, n, r, o) { 11130 void 0 === t && (t = -1), void 0 === i && (i = 0), void 0 === o && (o = 1), void 0 === r && (r = new Ei(16777215)), void 0 === n && (n = W), i = Math.min(i, Math.max(0, i)), this.lensFlares.push({ 11131 texture: e, 11132 size: t, 11133 distance: i, 11134 x: 0, 11135 y: 0, 11136 z: 0, 11137 scale: 1, 11138 rotation: 0, 11139 opacity: o, 11140 color: r, 11141 blending: n 11142 }) 11143 }, 11144 updateLensFlares: function() { 11145 var e, t, i = this.lensFlares.length, 11146 n = 2 * -this.positionScreen.x, 11147 r = 2 * -this.positionScreen.y; 11148 for (e = 0; e < i; e++)(t = this.lensFlares[e]).x = this.positionScreen.x + n * t.distance, t.y = this.positionScreen.y + r * t.distance, t.wantedRotation = t.x * Math.PI * .25, t.rotation += .25 * (t.wantedRotation - t.rotation) 11149 } 11150 }), ((Wo.prototype = Object.create(tn.prototype)).constructor = Wo).prototype.isSpriteMaterial = !0, Wo.prototype.copy = function(e) { 11151 return tn.prototype.copy.call(this, e), this.color.copy(e.color), this.map = e.map, this.rotation = e.rotation, this 11152 }, qo.prototype = Object.assign(Object.create(On.prototype), { 11153 constructor: qo, 11154 isSprite: !0, 11155 raycast: (lo = new Dt, co = new Dt, uo = new Dt, function(e, t) { 11156 co.setFromMatrixPosition(this.matrixWorld), e.ray.closestPointToPoint(co, lo), uo.setFromMatrixScale(this.matrixWorld); 11157 var i = uo.x * uo.y / 4; 11158 if (!(co.distanceToSquared(lo) > i)) { 11159 var n = e.ray.origin.distanceTo(lo); 11160 n < e.near || n > e.far || t.push({ 11161 distance: n, 11162 point: lo.clone(), 11163 face: null, 11164 object: this 11165 }) 11166 } 11167 }), 11168 clone: function() { 11169 return new this.constructor(this.material).copy(this) 11170 } 11171 }), Xo.prototype = Object.assign(Object.create(On.prototype), { 11172 constructor: Xo, 11173 copy: function(e) { 11174 On.prototype.copy.call(this, e, !1); 11175 for (var t = e.levels, i = 0, n = t.length; i < n; i++) { 11176 var r = t[i]; 11177 this.addLevel(r.object.clone(), r.distance) 11178 } 11179 return this 11180 }, 11181 addLevel: function(e, t) { 11182 void 0 === t && (t = 0), t = Math.abs(t); 11183 for (var i = this.levels, n = 0; n < i.length && !(t < i[n].distance); n++); 11184 i.splice(n, 0, { 11185 distance: t, 11186 object: e 11187 }), this.add(e) 11188 }, 11189 getObjectForDistance: function(e) { 11190 for (var t = this.levels, i = 1, n = t.length; i < n && !(e < t[i].distance); i++); 11191 return t[i - 1].object 11192 }, 11193 raycast: (fo = new Dt, function(e, t) { 11194 fo.setFromMatrixPosition(this.matrixWorld); 11195 var i = e.ray.origin.distanceTo(fo); 11196 this.getObjectForDistance(i).raycast(e, t) 11197 }), 11198 update: (ho = new Dt, po = new Dt, function(e) { 11199 var t = this.levels; 11200 if (1 < t.length) { 11201 ho.setFromMatrixPosition(e.matrixWorld), po.setFromMatrixPosition(this.matrixWorld); 11202 var i = ho.distanceTo(po); 11203 t[0].object.visible = !0; 11204 for (var n = 1, r = t.length; n < r && i >= t[n].distance; n++) t[n - 1].object.visible = !1, t[n].object.visible = !0; 11205 for (; n < r; n++) t[n].object.visible = !1 11206 } 11207 }), 11208 toJSON: function(e) { 11209 var t = On.prototype.toJSON.call(this, e); 11210 t.object.levels = []; 11211 for (var i = this.levels, n = 0, r = i.length; n < r; n++) { 11212 var o = i[n]; 11213 t.object.levels.push({ 11214 object: o.object.uuid, 11215 distance: o.distance 11216 }) 11217 } 11218 return t 11219 } 11220 }), Object.assign(Yo.prototype, { 11221 calculateInverses: function() { 11222 this.boneInverses = []; 11223 for (var e = 0, t = this.bones.length; e < t; e++) { 11224 var i = new It; 11225 this.bones[e] && i.getInverse(this.bones[e].matrixWorld), this.boneInverses.push(i) 11226 } 11227 }, 11228 pose: function() { 11229 var e, t, i; 11230 for (t = 0, i = this.bones.length; t < i; t++)(e = this.bones[t]) && e.matrixWorld.getInverse(this.boneInverses[t]); 11231 for (t = 0, i = this.bones.length; t < i; t++)(e = this.bones[t]) && (e.parent && e.parent.isBone ? (e.matrix.getInverse(e.parent.matrixWorld), e.matrix.multiply(e.matrixWorld)) : e.matrix.copy(e.matrixWorld), e.matrix.decompose(e.position, e.quaternion, e.scale)) 11232 }, 11233 update: (mo = new It, go = new It, function() { 11234 for (var e = this.bones, t = this.boneInverses, i = this.boneMatrices, n = this.boneTexture, r = 0, o = e.length; r < o; r++) { 11235 var a = e[r] ? e[r].matrixWorld : go; 11236 mo.multiplyMatrices(a, t[r]), mo.toArray(i, 16 * r) 11237 } 11238 void 0 !== n && (n.needsUpdate = !0) 11239 }), 11240 clone: function() { 11241 return new Yo(this.bones, this.boneInverses) 11242 } 11243 }), Zo.prototype = Object.assign(Object.create(On.prototype), { 11244 constructor: Zo, 11245 isBone: !0 11246 }), Qo.prototype = Object.assign(Object.create(qr.prototype), { 11247 constructor: Qo, 11248 isSkinnedMesh: !0, 11249 initBones: function() { 11250 var e, t, i, n, r = []; 11251 if (this.geometry && void 0 !== this.geometry.bones) { 11252 for (i = 0, n = this.geometry.bones.length; i < n; i++) t = this.geometry.bones[i], e = new Zo, r.push(e), e.name = t.name, e.position.fromArray(t.pos), e.quaternion.fromArray(t.rotq), void 0 !== t.scl && e.scale.fromArray(t.scl); 11253 for (i = 0, n = this.geometry.bones.length; i < n; i++) - 1 !== (t = this.geometry.bones[i]).parent && null !== t.parent && void 0 !== r[t.parent] ? r[t.parent].add(r[i]) : this.add(r[i]) 11254 } 11255 return this.updateMatrixWorld(!0), r 11256 }, 11257 bind: function(e, t) { 11258 this.skeleton = e, void 0 === t && (this.updateMatrixWorld(!0), this.skeleton.calculateInverses(), t = this.matrixWorld), this.bindMatrix.copy(t), this.bindMatrixInverse.getInverse(t) 11259 }, 11260 pose: function() { 11261 this.skeleton.pose() 11262 }, 11263 normalizeSkinWeights: function() { 11264 var e, t; 11265 if (this.geometry && this.geometry.isGeometry) 11266 for (t = 0; t < this.geometry.skinWeights.length; t++) { 11267 var i = this.geometry.skinWeights[t]; 11268 (e = 1 / i.lengthManhattan()) !== 1 / 0 ? i.multiplyScalar(e) : i.set(1, 0, 0, 0) 11269 } else if (this.geometry && this.geometry.isBufferGeometry) { 11270 var n = new Lt, 11271 r = this.geometry.attributes.skinWeight; 11272 for (t = 0; t < r.count; t++) n.x = r.getX(t), n.y = r.getY(t), n.z = r.getZ(t), n.w = r.getW(t), (e = 1 / n.lengthManhattan()) !== 1 / 0 ? n.multiplyScalar(e) : n.set(1, 0, 0, 0), r.setXYZW(t, n.x, n.y, n.z, n.w) 11273 } 11274 }, 11275 updateMatrixWorld: function(e) { 11276 qr.prototype.updateMatrixWorld.call(this, e), "attached" === this.bindMode ? this.bindMatrixInverse.getInverse(this.matrixWorld) : "detached" === this.bindMode ? this.bindMatrixInverse.getInverse(this.bindMatrix) : console.warn("THREE.SkinnedMesh: Unrecognized bindMode: " + this.bindMode) 11277 }, 11278 clone: function() { 11279 return new this.constructor(this.geometry, this.material).copy(this) 11280 } 11281 }), ((Jo.prototype = Object.create(tn.prototype)).constructor = Jo).prototype.isLineBasicMaterial = !0, Jo.prototype.copy = function(e) { 11282 return tn.prototype.copy.call(this, e), this.color.copy(e.color), this.linewidth = e.linewidth, this.linecap = e.linecap, this.linejoin = e.linejoin, this 11283 }, Ko.prototype = Object.assign(Object.create(On.prototype), { 11284 constructor: Ko, 11285 isLine: !0, 11286 raycast: (vo = new It, yo = new Gr, bo = new sn, function(e, t) { 11287 var i = e.linePrecision,
11288 n = i * i, 11289 r = this.geometry, 11290 o = this.matrixWorld; 11291 if (null === r.boundingSphere && r.computeBoundingSphere(), bo.copy(r.boundingSphere), bo.applyMatrix4(o), !1 !== e.ray.intersectsSphere(bo)) { 11292 vo.getInverse(o), yo.copy(e.ray).applyMatrix4(vo); 11293 var a = new Dt, 11294 s = new Dt, 11295 l = new Dt, 11296 c = new Dt, 11297 u = this && this.isLineSegments ? 2 : 1; 11298 if (r.isBufferGeometry) { 11299 var h = r.index, 11300 d = r.attributes.position.array; 11301 if (null !== h) 11302 for (var p = h.array, f = 0, m = p.length - 1; f < m; f += u) { 11303 var g = p[f], 11304 v = p[f + 1]; 11305 a.fromArray(d, 3 * g), s.fromArray(d, 3 * v), n < yo.distanceSqToSegment(a, s, c, l) || (c.applyMatrix4(this.matrixWorld), (w = e.ray.origin.distanceTo(c)) < e.near || w > e.far || t.push({ 11306 distance: w, 11307 point: l.clone().applyMatrix4(this.matrixWorld), 11308 index: f, 11309 face: null, 11310 faceIndex: null, 11311 object: this 11312 })) 11313 } else 11314 for (f = 0, m = d.length / 3 - 1; f < m; f += u) a.fromArray(d, 3 * f), s.fromArray(d, 3 * f + 3), n < yo.distanceSqToSegment(a, s, c, l) || (c.applyMatrix4(this.matrixWorld), (w = e.ray.origin.distanceTo(c)) < e.near || w > e.far || t.push({ 11315 distance: w, 11316 point: l.clone().applyMatrix4(this.matrixWorld), 11317 index: f, 11318 face: null, 11319 faceIndex: null, 11320 object: this 11321 })) 11322 } else if (r.isGeometry) { 11323 var y = r.vertices, 11324 b = y.length; 11325 for (f = 0; f < b - 1; f += u) { 11326 var w; 11327 n < yo.distanceSqToSegment(y[f], y[f + 1], c, l) || (c.applyMatrix4(this.matrixWorld), (w = e.ray.origin.distanceTo(c)) < e.near || w > e.far || t.push({ 11328 distance: w, 11329 point: l.clone().applyMatrix4(this.matrixWorld), 11330 index: f, 11331 face: null, 11332 faceIndex: null, 11333 object: this 11334 })) 11335 } 11336 } 11337 } 11338 }), 11339 clone: function() { 11340 return new this.constructor(this.geometry, this.material).copy(this) 11341 } 11342 }), ea.prototype = Object.assign(Object.create(Ko.prototype), { 11343 constructor: ea, 11344 isLineSegments: !0 11345 }), ta.prototype = Object.assign(Object.create(Ko.prototype), { 11346 constructor: ta, 11347 isLineLoop: !0 11348 }), ((ia.prototype = Object.create(tn.prototype)).constructor = ia).prototype.isPointsMaterial = !0, ia.prototype.copy = function(e) { 11349 return tn.prototype.copy.call(this, e), this.color.copy(e.color), this.map = e.map, this.size = e.size, this.sizeAttenuation = e.sizeAttenuation, this 11350 }, na.prototype = Object.assign(Object.create(On.prototype), { 11351 constructor: na, 11352 isPoints: !0, 11353 raycast: (wo = new It, xo = new Gr, _o = new sn, function(o, a) { 11354 var s = this, 11355 e = this.geometry, 11356 l = this.matrixWorld, 11357 t = o.params.Points.threshold; 11358 if (null === e.boundingSphere && e.computeBoundingSphere(), _o.copy(e.boundingSphere), _o.applyMatrix4(l), _o.radius += t, !1 !== o.ray.intersectsSphere(_o)) { 11359 wo.getInverse(l), xo.copy(o.ray).applyMatrix4(wo); 11360 var i = t / ((this.scale.x + this.scale.y + this.scale.z) / 3), 11361 c = i * i, 11362 n = new Dt; 11363 if (e.isBufferGeometry) { 11364 var r = e.index, 11365 u = e.attributes.position.array; 11366 if (null !== r) 11367 for (var h = r.array, d = 0, p = h.length; d < p; d++) { 11368 var f = h[d]; 11369 n.fromArray(u, 3 * f), v(n, f) 11370 } else { 11371 d = 0; 11372 for (var m = u.length / 3; d < m; d++) n.fromArray(u, 3 * d), v(n, d) 11373 } 11374 } else { 11375 var g = e.vertices; 11376 for (d = 0, m = g.length; d < m; d++) v(g[d], d) 11377 } 11378 } 11379 11380 function v(e, t) { 11381 var i = xo.distanceSqToPoint(e); 11382 if (i < c) { 11383 var n = xo.closestPointToPoint(e); 11384 n.applyMatrix4(l); 11385 var r = o.ray.origin.distanceTo(n); 11386 if (r < o.near || r > o.far) return; 11387 a.push({ 11388 distance: r, 11389 distanceToRay: Math.sqrt(i), 11390 point: n.clone(), 11391 index: t, 11392 face: null, 11393 object: s 11394 }) 11395 } 11396 } 11397 }), 11398 clone: function() { 11399 return new this.constructor(this.geometry, this.material).copy(this) 11400 } 11401 }), ra.prototype = Object.assign(Object.create(On.prototype), { 11402 constructor: ra 11403 }), (oa.prototype = Object.create(Rt.prototype)).constructor = oa, ((aa.prototype = Object.create(Rt.prototype)).constructor = aa).prototype.isCompressedTexture = !0, ((sa.prototype = Object.create(Rt.prototype)).constructor = sa).prototype.isDepthTexture = !0, (la.prototype = Object.create(Fr.prototype)).constructor = la, (ca.prototype = Object.create(Mr.prototype)).constructor = ca, (ua.prototype = Object.create(Fr.prototype)).constructor = ua, (ha.prototype = Object.create(Mr.prototype)).constructor = ha, (da.prototype = Object.create(Fr.prototype)).constructor = da, (pa.prototype = Object.create(Mr.prototype)).constructor = pa, (fa.prototype = Object.create(da.prototype)).constructor = fa, (ma.prototype = Object.create(Mr.prototype)).constructor = ma, (ga.prototype = Object.create(da.prototype)).constructor = ga, (va.prototype = Object.create(Mr.prototype)).constructor = va, (ya.prototype = Object.create(da.prototype)).constructor = ya, (ba.prototype = Object.create(Mr.prototype)).constructor = ba, (wa.prototype = Object.create(da.prototype)).constructor = wa, (xa.prototype = Object.create(Mr.prototype)).constructor = xa, (_a.prototype = Object.create(Fr.prototype)).constructor = _a, (Ta.prototype = Object.create(Mr.prototype)).constructor = Ta, (Ea.prototype = Object.create(Fr.prototype)).constructor = Ea, (Ma.prototype = Object.create(Mr.prototype)).constructor = Ma, (Sa.prototype = Object.create(Fr.prototype)).constructor = Sa; 11404 var Ca = { 11405 area: function(e) { 11406 for (var t = e.length, i = 0, n = t - 1, r = 0; r < t; n = r++) i += e[n].x * e[r].y - e[r].x * e[n].y; 11407 return .5 * i 11408 }, 11409 triangulate: function() { 11410 function g(e, t, i, n, r, o) { 11411 var a, s, l, c, u, h, d, p, f, m, g, v, y, b, w, x, _; 11412 if (s = e[o[t]].x, l = e[o[t]].y, c = e[o[i]].x, u = e[o[i]].y, h = e[o[n]].x, (c - s) * ((d = e[o[n]].y) - l) - (u - l) * (h - s) <= 0) return !1;
11413 for (m = h - c, g = d - u, v = s - h, y = l - d, b = c - s, w = u - l, a = 0; a < r; a++) 11414 if (p = e[o[a]].x, f = e[o[a]].y, !(p === s && f === l || p === c && f === u || p === h && f === d) && (x = b * (f - l) - w * (p - s), _ = v * (f - d) - y * (p - h), m * (f - u) - g * (p - c) >= -Number.EPSILON && _ >= -Number.EPSILON && x >= -Number.EPSILON)) return !1; 11415 return !0 11416 } 11417 return function(e, t) { 11418 var i = e.length; 11419 if (i < 3) return null; 11420 var n, r, o, a = [], 11421 s = [], 11422 l = []; 11423 if (0 < Ca.area(e)) 11424 for (r = 0; r < i; r++) s[r] = r; 11425 else 11426 for (r = 0; r < i; r++) s[r] = i - 1 - r; 11427 var c = i, 11428 u = 2 * c; 11429 for (r = c - 1; 2 < c;) { 11430 if (u-- <= 0) return console.warn("THREE.ShapeUtils: Unable to triangulate polygon! in triangulate()"), t ? l : a; 11431 if (c <= (n = r) && (n = 0), c <= (r = n + 1) && (r = 0), c <= (o = r + 1) && (o = 0), g(e, n, r, o, c, s)) { 11432 var h, d, p, f, m; 11433 for (h = s[n], d = s[r], p = s[o], a.push([e[h], e[d], e[p]]), l.push([s[n], s[r], s[o]]), m = (f = r) + 1; m < c; f++, m++) s[f] = s[m]; 11434 u = 2 * --c 11435 } 11436 } 11437 return t ? l : a 11438 } 11439 }(), 11440 triangulateShape: function(e, t) { 11441 function i(e) { 11442 var t = e.length; 11443 2 < t && e[t - 1].equals(e[0]) && e.pop() 11444 } 11445 11446 function M(e, t, i) { 11447 return e.x !== t.x ? e.x < t.x ? e.x <= i.x && i.x <= t.x : t.x <= i.x && i.x <= e.x : e.y < t.y ? e.y <= i.y && i.y <= t.y : t.y <= i.y && i.y <= e.y 11448 } 11449 11450 function E(e, t, i, n, r) { 11451 var o = t.x - e.x, 11452 a = t.y - e.y, 11453 s = n.x - i.x, 11454 l = n.y - i.y, 11455 c = e.x - i.x, 11456 u = e.y - i.y, 11457 h = a * s - o * l, 11458 d = a * c - o * u; 11459 if (Math.abs(h) > Number.EPSILON) { 11460 var p; 11461 if (0 < h) { 11462 if (d < 0 || h < d) return []; 11463 if ((p = l * c - s * u) < 0 || h < p) return [] 11464 } else { 11465 if (0 < d || d < h) return []; 11466 if (0 < (p = l * c - s * u) || p < h) return [] 11467 } 11468 if (0 === p) return !r || 0 !== d && d !== h ? [e] : []; 11469 if (p === h) return !r || 0 !== d && d !== h ? [t] : []; 11470 if (0 === d) return [i]; 11471 if (d === h) return [n]; 11472 var f = p / h; 11473 return [{ 11474 x: e.x + f * o, 11475 y: e.y + f * a 11476 }] 11477 } 11478 if (0 !== d || l * c != s * u) return []; 11479 var m, g, v, y, b, w, x, _, T = 0 === o && 0 === a, 11480 E = 0 === s && 0 === l; 11481 return T && E ? e.x !== i.x || e.y !== i.y ? [] : [e] : T ? M(i, n, e) ? [e] : [] : E ? M(e, t, i) ? [i] : [] : (0 !== o ? (e.x < t.x ? (v = (m = e).x, y = (g = t).x) : (v = (m = t).x, y = (g = e).x), i.x < n.x ? (x = (b = i).x, _ = (w = n).x) : (x = (b = n).x, _ = (w = i).x)) : (e.y < t.y ? (v = (m = e).y, y = (g = t).y) : (v = (m = t).y, y = (g = e).y), i.y < n.y ? (x = (b = i).y, _ = (w = n).y) : (x = (b = n).y, _ = (w = i).y)), v <= x ? y < x ? [] : y === x ? r ? [] : [b] : y <= _ ? [b, g] : [b, w] : _ < v ? [] : v === _ ? r ? [] : [m] : y <= _ ? [m, g] : [m, w]) 11482 } 11483 11484 function S(e, t, i, n) { 11485 var r = t.x - e.x, 11486 o = t.y - e.y, 11487 a = i.x - e.x, 11488 s = i.y - e.y, 11489 l = n.x - e.x, 11490 c = n.y - e.y, 11491 u = r * s - o * a, 11492 h = r * c - o * l; 11493 if (Math.abs(u) > Number.EPSILON) { 11494 var d = l * s - c * a; 11495 return 0 < u ? 0 <= h && 0 <= d : 0 <= h || 0 <= d 11496 } 11497 return 0 < h 11498 } 11499 i(e), t.forEach(i); 11500 for (var n, r, o, a, s, l, c = {}, u = e.concat(), h = 0, d = t.length; h < d; h++) Array.prototype.push.apply(u, t[h]); 11501 for (n = 0, r = u.length; n < r; n++) void 0 !== c[s = u[n].x + ":" + u[n].y] && console.warn("THREE.ShapeUtils: Duplicate point", s, n), c[s] = n; 11502 var p = function(e, a) { 11503 var c, u = e.concat(); 11504 11505 function t(e, t) { 11506 var i = u.length - 1, 11507 n = e - 1; 11508 n < 0 && (n = i); 11509 var r = e + 1; 11510 i < r && (r = 0); 11511 var o = S(u[e], u[n], u[r], c[t]); 11512 if (!o) return !1; 11513 var a = c.length - 1, 11514 s = t - 1; 11515 s < 0 && (s = a); 11516 var l = t + 1; 11517 return a < l && (l = 0), !!(o = S(c[t], c[s], c[l], u[e])) 11518 } 11519 11520 function i(e, t) { 11521 var i, n; 11522 for (i = 0; i < u.length; i++) 11523 if (n = i + 1, n %= u.length, 0 < E(e, t, u[i], u[n], !0).length) return !0; 11524 return !1 11525 } 11526 var s = []; 11527 11528 function n(e, t) { 11529 var i, n, r, o; 11530 for (i = 0; i < s.length; i++) 11531 for (n = a[s[i]], r = 0; r < n.length; r++) 11532 if (o = r + 1, o %= n.length, 0 < E(e, t, n[r], n[o], !0).length) return !0; 11533 return !1 11534 } 11535 for (var r, o, l, h, d, p, f, m, g, v, y = [], b = 0, w = a.length; b < w; b++) s.push(b); 11536 for (var x = 0, _ = 2 * s.length; 0 < s.length;) { 11537 if (--_ < 0) { 11538 console.log('THREE.ShapeUtils: Infinite Loop! Holes left:" + indepHoles.length + ", Probably Hole outside Shape!'); 11539 break 11540 } 11541 for (o = x; o < u.length; o++) { 11542 for (l = u[o], r = -1, b = 0; b < s.length; b++) 11543 if (d = s[b], void 0 === y[p = l.x + ":" + l.y + ":" + d]) { 11544 c = a[d]; 11545 for (var T = 0; T < c.length; T++) 11546 if (h = c[T], t(o, T) && !i(l, h) && !n(l, h)) { 11547 r = T, s.splice(b, 1), f = u.slice(0, o + 1), m = u.slice(o), g = c.slice(r), v = c.slice(0, r + 1), u = f.concat(g).concat(v).concat(m), x = o; 11548 break 11549 } 11550 if (0 <= r) break; 11551 y[p] = !0 11552 } 11553 if (0 <= r) break 11554 } 11555 } 11556 return u 11557 }(e, t), 11558 f = Ca.triangulate(p, !1); 11559 for (n = 0, r = f.length; n < r; n++) 11560 for (a = f[n], o = 0; o < 3; o++) void 0 !== (l = c[s = a[o].x + ":" + a[o].y]) && (a[o] = l); 11561 return f.concat() 11562 }, 11563 isClockWise: function(e) { 11564 return Ca.area(e) < 0 11565 } 11566 }; 11567 11568 function Aa(e, t) { 11569 Mr.call(this), this.type = "ExtrudeGeometry", this.parameters = { 11570 shapes: e, 11571 options: t 11572 }, this.fromBufferGeometry(new Ra(e, t)), this.mergeVertices() 11573 } 11574 11575 function Ra(e, t) { 11576 void 0 !== e && (Fr.call(this), this.type = "ExtrudeBufferGeometry", e = Array.isArray(e) ? e : [e], this.addShapeList(e, t), this.computeVertexNormals()) 11577 } 11578 11579 function La(e, t) { 11580 Mr.call(this), this.type = "TextGeometry", this.parameters = { 11581 text: e, 11582 parameters: t 11583 }, this.fromBufferGeometry(new Pa(e, t)), this.mergeVertices() 11584 } 11585 11586 function Pa(e, t) { 11587 var i = (t = t || {}).font; 11588 if (!i || !i.isFont) return console.error("THREE.TextGeometry: font parameter is not an instance of THREE.Font."), new Mr; 11589 var n = i.generateShapes(e, t.size, t.curveSegments); 11590 t.amount = void 0 !== t.height ? t.height : 50, void 0 === t.bevelThickness && (t.bevelThickness = 10), void 0 === t.bevelSize && (t.bevelSize = 8), void 0 === t.bevelEnabled && (t.bevelEnabled = !1), Ra.call(this, n, t), this.type = "TextBufferGeometry" 11591 } 11592 11593 function ka(e, t, i, n, r, o, a) { 11594 Mr.call(this), this.type = "SphereGeometry", this.parameters = { 11595 radius: e, 11596 widthSegments: t, 11597 heightSegments: i, 11598 phiStart: n, 11599 phiLength: r, 11600 thetaStart: o, 11601 thetaLength: a 11602 }, this.fromBufferGeometry(new Oa(e, t, i, n, r, o, a)), this.mergeVertices() 11603 } 11604 11605 function Oa(e, t, i, n, r, o, a) { 11606 Fr.call(this), this.type = "SphereBufferGeometry", this.parameters = { 11607 radius: e, 11608 widthSegments: t, 11609 heightSegments: i, 11610 phiStart: n, 11611 phiLength: r, 11612 thetaStart: o, 11613 thetaLength: a 11614 }, e = e || 50, t = Math.max(3, Math.floor(t) || 8), i = Math.max(2, Math.floor(i) || 6), n = void 0 !== n ? n : 0, r = void 0 !== r ? r : 2 * Math.PI; 11615 var s, l, c = (o = void 0 !== o ? o : 0) + (a = void 0 !== a ? a : Math.PI), 11616 u = 0, 11617 h = [], 11618 d = new Dt, 11619 p = new Dt, 11620 f = [], 11621 m = [], 11622 g = [], 11623 v = []; 11624 for (l = 0; l <= i; l++) { 11625 var y = [], 11626 b = l / i; 11627 for (s = 0; s <= t; s++) { 11628 var w = s / t; 11629 d.x = -e * Math.cos(n + w * r) * Math.sin(o + b * a), d.y = e * Math.cos(o + b * a), d.z = e * Math.sin(n + w * r) * Math.sin(o + b * a), m.push(d.x, d.y, d.z), p.set(d.x, d.y, d.z).normalize(), g.push(p.x, p.y, p.z), v.push(w, 1 - b), y.push(u++) 11630 } 11631 h.push(y) 11632 } 11633 for (l = 0; l < i; l++) 11634 for (s = 0; s < t; s++) { 11635 var x = h[l][s + 1], 11636 _ = h[l][s], 11637 T = h[l + 1][s], 11638 E = h[l + 1][s + 1]; 11639 (0 !== l || 0 < o) && f.push(x, _, E), (l !== i - 1 || c < Math.PI) && f.push(_, T, E) 11640 } 11641 this.setIndex(f), this.addAttribute("position", new Dr(m, 3)), this.addAttribute("normal", new Dr(g, 3)), this.addAttribute("uv", new Dr(v, 2)) 11642 } 11643 11644 function Da(e, t, i, n, r, o) { 11645 Mr.call(this), this.type = "RingGeometry", this.parameters = { 11646 innerRadius: e, 11647 outerRadius: t, 11648 thetaSegments: i, 11649 phiSegments: n, 11650 thetaStart: r, 11651 thetaLength: o 11652 }, this.fromBufferGeometry(new Ia(e, t, i, n, r, o)), this.mergeVertices() 11653 } 11654 11655 function Ia(e, t, i, n, r, o) { 11656 Fr.call(this), this.type = "RingBufferGeometry", this.parameters = { 11657 innerRadius: e, 11658 outerRadius: t, 11659 thetaSegments: i, 11660 phiSegments: n, 11661 thetaStart: r, 11662 thetaLength: o 11663 }, e = e || 20, t = t || 50, r = void 0 !== r ? r : 0, o = void 0 !== o ? o : 2 * Math.PI, i = void 0 !== i ? Math.max(3, i) : 8; 11664 var a, s, l, c = [], 11665 u = [], 11666 h = [], 11667 d = [], 11668 p = e, 11669 f = (t - e) / (n = void 0 !== n ? Math.max(1, n) : 1), 11670 m = new Dt, 11671 g = new lt; 11672 for (s = 0; s <= n; s++) { 11673 for (l = 0; l <= i; l++) a = r + l / i * o, m.x = p * Math.cos(a), m.y = p * Math.sin(a), u.push(m.x, m.y, m.z), h.push(0, 0, 1), g.x = (m.x / t + 1) / 2, g.y = (m.y / t + 1) / 2, d.push(g.x, g.y); 11674 p += f 11675 } 11676 for (s = 0; s < n; s++) { 11677 var v = s * (i + 1); 11678 for (l = 0; l < i; l++) { 11679 var y = a = l + v, 11680 b = a + i + 1, 11681 w = a + i + 2, 11682 x = a + 1; 11683 c.push(y, b, x), c.push(b, w, x) 11684 } 11685 } 11686 this.setIndex(c), this.addAttribute("position", new Dr(u, 3)), this.addAttribute("normal", new Dr(h, 3)), this.addAttribute("uv", new Dr(d, 2)) 11687 } 11688 11689 function za(e, t, i, n) { 11690 Mr.call(this), this.type = "LatheGeometry", this.parameters = { 11691 points: e, 11692 segments: t, 11693 phiStart: i, 11694 phiLength: n 11695 }, this.fromBufferGeometry(new Na(e, t, i, n)), this.mergeVertices() 11696 } 11697 11698 function Na(e, t, i, n) { 11699 Fr.call(this), this.type = "LatheBufferGeometry", this.parameters = { 11700 points: e, 11701 segments: t, 11702 phiStart: i, 11703 phiLength: n 11704 }, t = Math.floor(t) || 12, i = i || 0, n = n || 2 * Math.PI, n = st.clamp(n, 0, 2 * Math.PI); 11705 var r, o, a, s = [], 11706 l = [], 11707 c = [], 11708 u = 1 / t, 11709 h = new Dt, 11710 d = new lt; 11711 for (o = 0; o <= t; o++) { 11712 var p = i + o * u * n, 11713 f = Math.sin(p),
vendor: 5,725 bytes, lines 11714-11850
11714 m = Math.cos(p); 11715 for (a = 0; a <= e.length - 1; a++) h.x = e[a].x * f, h.y = e[a].y, h.z = e[a].x * m, l.push(h.x, h.y, h.z), d.x = o / t, d.y = a / (e.length - 1), c.push(d.x, d.y) 11716 } 11717 for (o = 0; o < t; o++) 11718 for (a = 0; a < e.length - 1; a++) { 11719 var g = r = a + o * e.length, 11720 v = r + e.length, 11721 y = r + e.length + 1, 11722 b = r + 1; 11723 s.push(g, v, b), s.push(v, y, b) 11724 } 11725 if (this.setIndex(s), this.addAttribute("position", new Dr(l, 3)), this.addAttribute("uv", new Dr(c, 2)), this.computeVertexNormals(), n === 2 * Math.PI) { 11726 var w = this.attributes.normal.array, 11727 x = new Dt, 11728 _ = new Dt, 11729 T = new Dt; 11730 for (r = t * e.length * 3, a = o = 0; o < e.length; o++, a += 3) x.x = w[a + 0], x.y = w[a + 1], x.z = w[a + 2], _.x = w[r + a + 0], _.y = w[r + a + 1], _.z = w[r + a + 2], T.addVectors(x, _).normalize(), w[a + 0] = w[r + a + 0] = T.x, w[a + 1] = w[r + a + 1] = T.y, w[a + 2] = w[r + a + 2] = T.z 11731 } 11732 } 11733 11734 function Fa(e, t) { 11735 Mr.call(this), this.type = "ShapeGeometry", "object" == typeof t && (console.warn("THREE.ShapeGeometry: Options parameter has been removed."), t = t.curveSegments), this.parameters = { 11736 shapes: e, 11737 curveSegments: t 11738 }, this.fromBufferGeometry(new Ua(e, t)), this.mergeVertices() 11739 } 11740 11741 function Ua(e, f) { 11742 Fr.call(this), this.type = "ShapeBufferGeometry", this.parameters = { 11743 shapes: e, 11744 curveSegments: f 11745 }, f = f || 12; 11746 var m = [], 11747 g = [], 11748 v = [], 11749 y = [], 11750 t = 0, 11751 b = 0; 11752 if (!1 === Array.isArray(e)) n(e); 11753 else 11754 for (var i = 0; i < e.length; i++) n(e[i]), this.addGroup(t, b, i), t += b, b = 0; 11755 11756 function n(e) { 11757 var t, i, n, r = g.length / 3, 11758 o = e.extractPoints(f), 11759 a = o.shape, 11760 s = o.holes; 11761 if (!1 === Ca.isClockWise(a)) 11762 for (a = a.reverse(), t = 0, i = s.length; t < i; t++) n = s[t], !0 === Ca.isClockWise(n) && (s[t] = n.reverse()); 11763 var l = Ca.triangulateShape(a, s); 11764 for (t = 0, i = s.length; t < i; t++) n = s[t], a = a.concat(n); 11765 for (t = 0, i = a.length; t < i; t++) { 11766 var c = a[t]; 11767 g.push(c.x, c.y, 0), v.push(0, 0, 1), y.push(c.x, c.y) 11768 } 11769 for (t = 0, i = l.length; t < i; t++) { 11770 var u = l[t], 11771 h = u[0] + r, 11772 d = u[1] + r, 11773 p = u[2] + r; 11774 m.push(h, d, p), b += 3 11775 } 11776 } 11777 this.setIndex(m), this.addAttribute("position", new Dr(g, 3)), this.addAttribute("normal", new Dr(v, 3)), this.addAttribute("uv", new Dr(y, 2)) 11778 } 11779 11780 function Ba(e, t) { 11781 Fr.call(this), this.type = "EdgesGeometry", this.parameters = { 11782 thresholdAngle: t 11783 }, t = void 0 !== t ? t : 1; 11784 var i, n, r, o, a = [], 11785 s = Math.cos(st.DEG2RAD * t), 11786 l = [0, 0], 11787 c = {}, 11788 u = ["a", "b", "c"]; 11789 e.isBufferGeometry ? (o = new Mr).fromBufferGeometry(e) : o = e.clone(), o.mergeVertices(), o.computeFaceNormals(); 11790 for (var h = o.vertices, d = o.faces, p = 0, f = d.length; p < f; p++) 11791 for (var m = d[p], g = 0; g < 3; g++) i = m[u[g]], n = m[u[(g + 1) % 3]], l[0] = Math.min(i, n), l[1] = Math.max(i, n), void 0 === c[r = l[0] + "," + l[1]] ? c[r] = { 11792 index1: l[0], 11793 index2: l[1], 11794 face1: p, 11795 face2: void 0 11796 } : c[r].face2 = p; 11797 for (r in c) { 11798 var v = c[r]; 11799 if (void 0 === v.face2 || d[v.face1].normal.dot(d[v.face2].normal) <= s) { 11800 var y = h[v.index1]; 11801 a.push(y.x, y.y, y.z), y = h[v.index2], a.push(y.x, y.y, y.z) 11802 } 11803 } 11804 this.addAttribute("position", new Dr(a, 3)) 11805 } 11806 11807 function Ha(e, t, i, n, r, o, a, s) { 11808 Mr.call(this), this.type = "CylinderGeometry", this.parameters = { 11809 radiusTop: e, 11810 radiusBottom: t, 11811 height: i, 11812 radialSegments: n, 11813 heightSegments: r, 11814 openEnded: o, 11815 thetaStart: a, 11816 thetaLength: s 11817 }, this.fromBufferGeometry(new $a(e, t, i, n, r, o, a, s)), this.mergeVertices() 11818 } 11819 11820 function $a(v, y, b, w, x, e, _, T) { 11821 Fr.call(this), this.type = "CylinderBufferGeometry", this.parameters = { 11822 radiusTop: v, 11823 radiusBottom: y, 11824 height: b, 11825 radialSegments: w, 11826 heightSegments: x, 11827 openEnded: e, 11828 thetaStart: _, 11829 thetaLength: T 11830 }; 11831 var E = this; 11832 v = void 0 !== v ? v : 20, y = void 0 !== y ? y : 20, b = void 0 !== b ? b : 100, w = Math.floor(w) || 8, x = Math.floor(x) || 1, e = void 0 !== e && e, _ = void 0 !== _ ? _ : 0, T = void 0 !== T ? T : 2 * Math.PI; 11833 var M = [], 11834 S = [], 11835 C = [], 11836 A = [], 11837 R = 0, 11838 L = [], 11839 P = b / 2, 11840 k = 0; 11841 11842 function t(e) { 11843 var t, i, n, r = new lt, 11844 o = new Dt, 11845 a = 0, 11846 s = !0 === e ? v : y, 11847 l = !0 === e ? 1 : -1; 11848 for (i = R, t = 1; t <= w; t++) S.push(0, P * l, 0), C.push(0, l, 0), A.push(.5, .5), R++; 11849 for (n = R, t = 0; t <= w; t++) { 11850 var c = t / w * T + _,
vendor: 12,223 bytes, lines 11851-12118
11851 u = Math.cos(c), 11852 h = Math.sin(c); 11853 o.x = s * h, o.y = P * l, o.z = s * u, S.push(o.x, o.y, o.z), C.push(0, l, 0), r.x = .5 * u + .5, r.y = .5 * h * l + .5, A.push(r.x, r.y), R++ 11854 } 11855 for (t = 0; t < w; t++) { 11856 var d = i + t, 11857 p = n + t; 11858 !0 === e ? M.push(p, p + 1, d) : M.push(p + 1, p, d), a += 3 11859 } 11860 E.addGroup(k, a, !0 === e ? 1 : 2), k += a 11861 }! function() { 11862 var e, t, i = new Dt, 11863 n = new Dt, 11864 r = 0, 11865 o = (y - v) / b; 11866 for (t = 0; t <= x; t++) { 11867 var a = [], 11868 s = t / x, 11869 l = s * (y - v) + v; 11870 for (e = 0; e <= w; e++) { 11871 var c = e / w, 11872 u = c * T + _, 11873 h = Math.sin(u), 11874 d = Math.cos(u); 11875 n.x = l * h, n.y = -s * b + P, n.z = l * d, S.push(n.x, n.y, n.z), i.set(h, o, d).normalize(), C.push(i.x, i.y, i.z), A.push(c, 1 - s), a.push(R++) 11876 } 11877 L.push(a) 11878 } 11879 for (e = 0; e < w; e++) 11880 for (t = 0; t < x; t++) { 11881 var p = L[t][e], 11882 f = L[t + 1][e], 11883 m = L[t + 1][e + 1], 11884 g = L[t][e + 1]; 11885 M.push(p, f, g), M.push(f, m, g), r += 6 11886 } 11887 E.addGroup(k, r, 0), k += r 11888 }(), !1 === e && (0 < v && t(!0), 0 < y && t(!1)), this.setIndex(M), this.addAttribute("position", new Dr(S, 3)), this.addAttribute("normal", new Dr(C, 3)), this.addAttribute("uv", new Dr(A, 2)) 11889 } 11890 11891 function ja(e, t, i, n, r, o, a) { 11892 Ha.call(this, 0, e, t, i, n, r, o, a), this.type = "ConeGeometry", this.parameters = { 11893 radius: e, 11894 height: t, 11895 radialSegments: i, 11896 heightSegments: n, 11897 openEnded: r, 11898 thetaStart: o, 11899 thetaLength: a 11900 } 11901 } 11902 11903 function Ga(e, t, i, n, r, o, a) { 11904 $a.call(this, 0, e, t, i, n, r, o, a), this.type = "ConeBufferGeometry", this.parameters = { 11905 radius: e, 11906 height: t, 11907 radialSegments: i, 11908 heightSegments: n, 11909 openEnded: r, 11910 thetaStart: o, 11911 thetaLength: a 11912 } 11913 } 11914 11915 function Va(e, t, i, n) { 11916 Mr.call(this), this.type = "CircleGeometry", this.parameters = { 11917 radius: e, 11918 segments: t, 11919 thetaStart: i, 11920 thetaLength: n 11921 }, this.fromBufferGeometry(new Wa(e, t, i, n)), this.mergeVertices() 11922 } 11923 11924 function Wa(e, t, i, n) { 11925 Fr.call(this), this.type = "CircleBufferGeometry", this.parameters = { 11926 radius: e, 11927 segments: t, 11928 thetaStart: i, 11929 thetaLength: n 11930 }, e = e || 50, t = void 0 !== t ? Math.max(3, t) : 8, i = void 0 !== i ? i : 0, n = void 0 !== n ? n : 2 * Math.PI; 11931 var r, o, a = [], 11932 s = [], 11933 l = [], 11934 c = [], 11935 u = new Dt, 11936 h = new lt; 11937 for (s.push(0, 0, 0), l.push(0, 0, 1), c.push(.5, .5), o = 0, r = 3; o <= t; o++, r += 3) { 11938 var d = i + o / t * n; 11939 u.x = e * Math.cos(d), u.y = e * Math.sin(d), s.push(u.x, u.y, u.z), l.push(0, 0, 1), h.x = (s[r] / e + 1) / 2, h.y = (s[r + 1] / e + 1) / 2, c.push(h.x, h.y) 11940 } 11941 for (r = 1; r <= t; r++) a.push(r, r + 1, 0); 11942 this.setIndex(a), this.addAttribute("position", new Dr(s, 3)), this.addAttribute("normal", new Dr(l, 3)), this.addAttribute("uv", new Dr(c, 2)) 11943 }(Aa.prototype = Object.create(Mr.prototype)).constructor = Aa, ((Ra.prototype = Object.create(Fr.prototype)).constructor = Ra).prototype.getArrays = function() { 11944 var e = this.getAttribute("position"), 11945 t = e ? Array.prototype.slice.call(e.array) : [], 11946 i = this.getAttribute("uv"), 11947 n = i ? Array.prototype.slice.call(i.array) : [], 11948 r = this.index; 11949 return { 11950 position: t, 11951 uv: n, 11952 index: r ? Array.prototype.slice.call(r.array) : [] 11953 } 11954 }, Ra.prototype.addShapeList = function(e, t) { 11955 var i = e.length; 11956 t.arrays = this.getArrays(); 11957 for (var n = 0; n < i; n++) { 11958 var r = e[n]; 11959 this.addShape(r, t) 11960 } 11961 this.setIndex(t.arrays.index), this.addAttribute("position", new Dr(t.arrays.position, 3)), this.addAttribute("uv", new Dr(t.arrays.uv, 2)) 11962 }, Ra.prototype.addShape = function(e, n) { 11963 var t, i, r, o, a, s, l, c, u = n.arrays ? n.arrays : this.getArrays(), 11964 h = u.position, 11965 d = u.index, 11966 p = u.uv, 11967 f = [], 11968 m = void 0 !== n.amount ? n.amount : 100, 11969 g = void 0 !== n.bevelThickness ? n.bevelThickness : 6, 11970 v = void 0 !== n.bevelSize ? n.bevelSize : g - 2, 11971 y = void 0 !== n.bevelSegments ? n.bevelSegments : 3, 11972 b = void 0 === n.bevelEnabled || n.bevelEnabled, 11973 w = void 0 !== n.curveSegments ? n.curveSegments : 12, 11974 x = void 0 !== n.steps ? n.steps : 1, 11975 _ = n.extrudePath, 11976 T = !1, 11977 E = void 0 !== n.UVGenerator ? n.UVGenerator : Aa.WorldUVGenerator; 11978 _ && (t = _.getSpacedPoints(x), b = !(T = !0), i = void 0 !== n.frames ? n.frames : _.computeFrenetFrames(x, !1), r = new Dt, o = new Dt, a = new Dt), b || (v = g = y = 0); 11979 var M = this, 11980 S = e.extractPoints(w), 11981 C = S.shape, 11982 A = S.holes; 11983 if (!Ca.isClockWise(C)) 11984 for (C = C.reverse(), l = 0, c = A.length; l < c; l++) s = A[l], Ca.isClockWise(s) && (A[l] = s.reverse()); 11985 var R = Ca.triangulateShape(C, A), 11986 L = C; 11987 for (l = 0, c = A.length; l < c; l++) s = A[l], C = C.concat(s); 11988 11989 function P(e, t, i) { 11990 return t || console.error("THREE.ExtrudeGeometry: vec does not exist"), t.clone().multiplyScalar(i).add(e) 11991 } 11992 var k, O, D, I, z, N, F = C.length, 11993 U = R.length; 11994 11995 function B(e, t, i) { 11996 var n, r, o, a = e.x - t.x, 11997 s = e.y - t.y, 11998 l = i.x - e.x, 11999 c = i.y - e.y, 12000 u = a * a + s * s, 12001 h = a * c - s * l; 12002 if (Math.abs(h) > Number.EPSILON) { 12003 var d = Math.sqrt(u), 12004 p = Math.sqrt(l * l + c * c), 12005 f = t.x - s / d, 12006 m = t.y + a / d, 12007 g = ((i.x - c / p - f) * c - (i.y + l / p - m) * l) / (a * c - s * l), 12008 v = (n = f + a * g - e.x) * n + (r = m + s * g - e.y) * r; 12009 if (v <= 2) return new lt(n, r); 12010 o = Math.sqrt(v / 2) 12011 } else { 12012 var y = !1; 12013 a > Number.EPSILON ? l > Number.EPSILON && (y = !0) : a < -Number.EPSILON ? l < -Number.EPSILON && (y = !0) : Math.sign(s) === Math.sign(c) && (y = !0), y ? (n = -s, r = a, o = Math.sqrt(u)) : (n = a, r = s, o = Math.sqrt(u / 2)) 12014 } 12015 return new lt(n / o, r / o) 12016 } 12017 for (var H = [], $ = 0, j = L.length, G = j - 1, V = $ + 1; $ < j; $++, G++, V++) G === j && (G = 0), V === j && (V = 0), H[$] = B(L[$], L[G], L[V]); 12018 var W, q, X = [], 12019 Y = H.concat(); 12020 for (l = 0, c = A.length; l < c; l++) { 12021 for (s = A[l], W = [], $ = 0, G = (j = s.length) - 1, V = $ + 1; $ < j; $++, G++, V++) G === j && (G = 0), V === j && (V = 0), W[$] = B(s[$], s[G], s[V]); 12022 X.push(W), Y = Y.concat(W) 12023 } 12024 for (k = 0; k < y; k++) { 12025 for (D = k / y, I = g * Math.cos(D * Math.PI / 2), O = v * Math.sin(D * Math.PI / 2), $ = 0, j = L.length; $ < j; $++) Q((z = P(L[$], H[$], O)).x, z.y, -I); 12026 for (l = 0, c = A.length; l < c; l++) 12027 for (s = A[l], W = X[l], $ = 0, j = s.length; $ < j; $++) Q((z = P(s[$], W[$], O)).x, z.y, -I) 12028 } 12029 for (O = v, $ = 0; $ < F; $++) z = b ? P(C[$], Y[$], O) : C[$], T ? (o.copy(i.normals[0]).multiplyScalar(z.x), r.copy(i.binormals[0]).multiplyScalar(z.y), a.copy(t[0]).add(o).add(r), Q(a.x, a.y, a.z)) : Q(z.x, z.y, 0); 12030 for (q = 1; q <= x; q++) 12031 for ($ = 0; $ < F; $++) z = b ? P(C[$], Y[$], O) : C[$], T ? (o.copy(i.normals[q]).multiplyScalar(z.x), r.copy(i.binormals[q]).multiplyScalar(z.y), a.copy(t[q]).add(o).add(r), Q(a.x, a.y, a.z)) : Q(z.x, z.y, m / x * q); 12032 for (k = y - 1; 0 <= k; k--) { 12033 for (D = k / y, I = g * Math.cos(D * Math.PI / 2), O = v * Math.sin(D * Math.PI / 2), $ = 0, j = L.length; $ < j; $++) Q((z = P(L[$], H[$], O)).x, z.y, m + I); 12034 for (l = 0, c = A.length; l < c; l++) 12035 for (s = A[l], W = X[l], $ = 0, j = s.length; $ < j; $++) z = P(s[$], W[$], O), T ? Q(z.x, z.y + t[x - 1].y, t[x - 1].x + I) : Q(z.x, z.y, m + I) 12036 } 12037 12038 function Z(e, t) { 12039 var i, n; 12040 for ($ = e.length; 0 <= --$;) { 12041 (n = (i = $) - 1) < 0 && (n = e.length - 1); 12042 var r = 0, 12043 o = x + 2 * y; 12044 for (r = 0; r < o; r++) { 12045 var a = F * r, 12046 s = F * (r + 1); 12047 K(t + i + a, t + n + a, t + n + s, t + i + s, e, r, o, i, n) 12048 } 12049 } 12050 } 12051 12052 function Q(e, t, i) { 12053 f.push(e), f.push(t), f.push(i) 12054 } 12055 12056 function J(e, t, i) { 12057 ee(e), ee(t), ee(i); 12058 var n = h.length / 3, 12059 r = E.generateTopUV(M, h, n - 3, n - 2, n - 1); 12060 te(r[0]), te(r[1]), te(r[2]) 12061 } 12062 12063 function K(e, t, i, n, r, o, a, s, l) { 12064 ee(e), ee(t), ee(n), ee(t), ee(i), ee(n); 12065 var c = h.length / 3, 12066 u = E.generateSideWallUV(M, h, c - 6, c - 3, c - 2, c - 1); 12067 te(u[0]), te(u[1]), te(u[3]), te(u[1]), te(u[2]), te(u[3]) 12068 } 12069 12070 function ee(e) { 12071 d.push(h.length / 3), h.push(f[3 * e + 0]), h.push(f[3 * e + 1]), h.push(f[3 * e + 2]) 12072 } 12073 12074 function te(e) { 12075 p.push(e.x), p.push(e.y) 12076 }! function() { 12077 var e = h.length / 3; 12078 if (b) { 12079 var t = 0, 12080 i = F * t; 12081 for ($ = 0; $ < U; $++) J((N = R[$])[2] + i, N[1] + i, N[0] + i); 12082 for (i = F * (t = x + 2 * y), $ = 0; $ < U; $++) J((N = R[$])[0] + i, N[1] + i, N[2] + i) 12083 } else { 12084 for ($ = 0; $ < U; $++) J((N = R[$])[2], N[1], N[0]); 12085 for ($ = 0; $ < U; $++) J((N = R[$])[0] + F * x, N[1] + F * x, N[2] + F * x) 12086 } 12087 M.addGroup(e, h.length / 3 - e, void 0 !== n.material ? n.material : 0) 12088 }(), 12089 function() { 12090 var e = h.length / 3, 12091 t = 0; 12092 for (Z(L, t), t += L.length, l = 0, c = A.length; l < c; l++) Z(s = A[l], t), t += s.length; 12093 M.addGroup(e, h.length / 3 - e, void 0 !== n.extrudeMaterial ? n.extrudeMaterial : 1) 12094 }(), n.arrays || (this.setIndex(d), this.addAttribute("position", new Dr(h, 3)), this.addAttribute("uv", new Dr(n.arrays.uv, 2))) 12095 }, Aa.WorldUVGenerator = { 12096 generateTopUV: function(e, t, i, n, r) { 12097 var o = t[3 * i], 12098 a = t[3 * i + 1], 12099 s = t[3 * n], 12100 l = t[3 * n + 1], 12101 c = t[3 * r], 12102 u = t[3 * r + 1]; 12103 return [new lt(o, a), new lt(s, l), new lt(c, u)] 12104 }, 12105 generateSideWallUV: function(e, t, i, n, r, o) { 12106 var a = t[3 * i], 12107 s = t[3 * i + 1], 12108 l = t[3 * i + 2], 12109 c = t[3 * n], 12110 u = t[3 * n + 1], 12111 h = t[3 * n + 2], 12112 d = t[3 * r], 12113 p = t[3 * r + 1], 12114 f = t[3 * r + 2], 12115 m = t[3 * o], 12116 g = t[3 * o + 1], 12117 v = t[3 * o + 2]; 12118 return Math.abs(s - u) < .01 ? [new lt(a, 1 - l), new lt(c, 1
12118- h), new lt(d, 1 - f), new lt(m, 1 - v)] : [new lt(s, 1 - l), new lt(u, 1 - h), new lt(p, 1 - f), new lt(g, 1 - v)] 12119 } 12120 }, (La.prototype = Object.create(Mr.prototype)).constructor = La, (Pa.prototype = Object.create(Ra.prototype)).constructor = Pa, (ka.prototype = Object.create(Mr.prototype)).constructor = ka, (Oa.prototype = Object.create(Fr.prototype)).constructor = Oa, (Da.prototype = Object.create(Mr.prototype)).constructor = Da, (Ia.prototype = Object.create(Fr.prototype)).constructor = Ia, (za.prototype = Object.create(Mr.prototype)).constructor = za, (Na.prototype = Object.create(Fr.prototype)).constructor = Na, (Fa.prototype = Object.create(Mr.prototype)).constructor = Fa, (Ua.prototype = Object.create(Fr.prototype)).constructor = Ua, (Ba.prototype = Object.create(Fr.prototype)).constructor = Ba, (Ha.prototype = Object.create(Mr.prototype)).constructor = Ha, ($a.prototype = Object.create(Fr.prototype)).constructor = $a, (ja.prototype = Object.create(Ha.prototype)).constructor = ja, (Ga.prototype = Object.create($a.prototype)).constructor = Ga, (Va.prototype = Object.create(Mr.prototype)).constructor = Va, (Wa.prototype = Object.create(Fr.prototype)).constructor = Wa; 12121 var qa = Object.freeze({ 12122 WireframeGeometry: la, 12123 ParametricGeometry: ca, 12124 ParametricBufferGeometry: ua, 12125 TetrahedronGeometry: pa, 12126 TetrahedronBufferGeometry: fa, 12127 OctahedronGeometry: ma, 12128 OctahedronBufferGeometry: ga, 12129 IcosahedronGeometry: va, 12130 IcosahedronBufferGeometry: ya, 12131 DodecahedronGeometry: ba, 12132 DodecahedronBufferGeometry: wa, 12133 PolyhedronGeometry: ha, 12134 PolyhedronBufferGeometry: da, 12135 TubeGeometry: xa, 12136 TubeBufferGeometry: _a, 12137 TorusKnotGeometry: Ta, 12138 TorusKnotBufferGeometry: Ea, 12139 TorusGeometry: Ma, 12140 TorusBufferGeometry: Sa, 12141 TextGeometry: La, 12142 TextBufferGeometry: Pa, 12143 SphereGeometry: ka, 12144 SphereBufferGeometry: Oa, 12145 RingGeometry: Da, 12146 RingBufferGeometry: Ia, 12147 PlaneGeometry: Hr, 12148 PlaneBufferGeometry: $r, 12149 LatheGeometry: za, 12150 LatheBufferGeometry: Na, 12151 ShapeGeometry: Fa, 12152 ShapeBufferGeometry: Ua, 12153 ExtrudeGeometry: Aa, 12154 ExtrudeBufferGeometry: Ra, 12155 EdgesGeometry: Ba, 12156 ConeGeometry: ja, 12157 ConeBufferGeometry: Ga, 12158 CylinderGeometry: Ha, 12159 CylinderBufferGeometry: $a, 12160 CircleGeometry: Va, 12161 CircleBufferGeometry: Wa, 12162 BoxGeometry: Ur, 12163 BoxBufferGeometry: Br 12164 }); 12165 12166 function Xa(e) { 12167 tn.call(this), this.type = "ShadowMaterial", this.color = new Ei(0), this.opacity = 1, this.lights = !0, this.transparent = !0, this.setValues(e) 12168 } 12169 12170 function Ya(e) { 12171 nn.call(this, e), this.type = "RawShaderMaterial" 12172 } 12173 12174 function Za(e) { 12175 tn.call(this), this.defines = { 12176 STANDARD: "" 12177 }, this.type = "MeshStandardMaterial", this.color = new Ei(16777215), this.roughness = .5, this.metalness = .5, this.map = null, this.lightMap = null, this.lightMapIntensity = 1, this.aoMap = null, this.aoMapIntensity = 1, this.emissive = new Ei(0), this.emissiveIntensity = 1, this.emissiveMap = null, this.bumpMap = null, this.bumpScale = 1, this.normalMap = null, this.normalScale = new lt(1, 1), this.displacementMap = null, this.displacementScale = 1, this.displacementBias = 0, this.roughnessMap = null, this.metalnessMap = null, this.alphaMap = null, this.envMap = null, this.envMapIntensity = 1, this.refractionRatio = .98, this.wireframe = !1, this.wireframeLinewidth = 1, this.wireframeLinecap = "round", this.wireframeLinejoin = "round", this.skinning = !1, this.morphTargets = !1, this.morphNormals = !1, this.setValues(e) 12178 } 12179 12180 function Qa(e) { 12181 Za.call(this), this.defines = { 12182 PHYSICAL: "" 12183 }, this.type = "MeshPhysicalMaterial", this.reflectivity = .5, this.clearCoat = 0, this.clearCoatRoughness = 0, this.setValues(e) 12184 } 12185 12186 function Ja(e) { 12187 tn.call(this), this.type = "MeshPhongMaterial", this.color = new Ei(16777215), this.specular = new Ei(1118481), this.shininess = 30, this.map = null, this.lightMap = null, this.lightMapIntensity = 1, this.aoMap = null, this.aoMapIntensity = 1, this.emissive = new Ei(0), this.emissiveIntensity = 1, this.emissiveMap = null, this.bumpMap = null, this.bumpScale = 1, this.normalMap = null, this.normalScale = new lt(1, 1), this.displacementMap = null, this.displacementScale = 1, this.displacementBias = 0, this.specularMap = null, this.alphaMap = null, this.envMap = null, this.combine = U, this.reflectivity = 1, this.refractionRatio = .98, this.wireframe = !1, this.wireframeLinewidth = 1, this.wireframeLinecap = "round", this.wireframeLinejoin = "round", this.skinning = !1, this.morphTargets = !1, this.morphNormals = !1, this.setValues(e) 12188 } 12189 12190 function Ka(e) { 12191 Ja.call(this), this.defines = { 12192 TOON: "" 12193 }, this.type = "MeshToonMaterial", this.gradientMap = null, this.setValues(e) 12194 } 12195 12196 function es(e) { 12197 tn.call(this), this.type = "MeshNormalMaterial", this.bumpMap = null, this.bumpScale = 1, this.normalMap = null, this.normalScale = new lt(1, 1), this.displacementMap = null, this.displacementScale = 1, this.displacementBias = 0, this.wireframe = !1, this.wireframeLinewidth = 1, this.fog = !1, this.lights = !1, this.skinning = !1, this.morphTargets = !1, this.morphNormals = !1, this.setValues(e) 12198 } 12199 12200 function ts(e) { 12201 tn.call(this), this.type = "MeshLambertMaterial", this.color = new Ei(16777215), this.map = null, this.lightMap = null, this.lightMapIntensity = 1, this.aoMap = null, this.aoMapIntensity = 1, this.emissive = new Ei(0), this.emissiveIntensity = 1, this.emissiveMap = null, this.specularMap = null, this.alphaMap = null, this.envMap = null, this.combine = U, this.reflectivity = 1, this.refractionRatio = .98, this.wireframe = !1, this.wireframeLinewidth = 1, this.wireframeLinecap = "round", this.wireframeLinejoin = "round", this.skinning = !1, this.morphTargets = !1, this.morphNormals = !1, this.setValues(e) 12202 } 12203 12204 function is(e) { 12205 Jo.call(this), this.type = "LineDashedMaterial", this.scale = 1, this.dashSize = 3, this.gapSize = 1, this.setValues(e) 12206 }((Xa.prototype = Object.create(tn.prototype)).constructor = Xa).prototype.isShadowMaterial = !0, ((Ya.prototype = Object.create(nn.prototype)).constructor = Ya).prototype.isRawShaderMaterial = !0, ((Za.prototype = Object.create(tn.prototype)).constructor = Za).prototype.isMeshStandardMaterial = !0, Za.prototype.copy = function(e) { 12207 return tn.prototype.copy.call(this, e), this.defines = { 12208 STANDARD: "" 12209 }, 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.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.refractionRatio = e.refractionRatio, this.wireframe = e.wireframe, this.wireframeLinewidth = e.wireframeLinewidth, this.wireframeLinecap = e.wireframeLinecap, this.wireframeLinejoin = e.wireframeLinejoin, this.skinning = e.skinning, this.morphTargets = e.morphTargets, this.morphNormals = e.morphNormals, this 12210 }, ((Qa.prototype = Object.create(Za.prototype)).constructor = Qa).prototype.isMeshPhysicalMaterial = !0, Qa.prototype.copy = function(e) { 12211 return Za.prototype.copy.call(this, e), this.defines = { 12212 PHYSICAL: "" 12213 }, this.reflectivity = e.reflectivity, this.clearCoat = e.clearCoat, this.clearCoatRoughness = e.clearCoatRoughness, this 12214 }, ((Ja.prototype = Object.create(tn.prototype)).constructor = Ja).prototype.isMeshPhongMaterial = !0, Ja.prototype.copy = function(e) { 12215 return tn.prototype.copy.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.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.skinning = e.skinning, this.morphTargets = e.morphTargets, this.morphNormals = e.morphNormals, this 12216 }, ((Ka.prototype = Object.create(Ja.prototype)).constructor = Ka).prototype.isMeshToonMaterial = !0, Ka.prototype.copy = function(e) { 12217 return Ja.prototype.copy.call(this, e), this.gradientMap = e.gradientMap, this 12218 }, ((es.prototype = Object.create(tn.prototype)).constructor = es).prototype.isMeshNormalMaterial = !0, es.prototype.copy = function(e) { 12219 return tn.prototype.copy.call(this, e), this.bumpMap = e.bumpMap, this.bumpScale = e.bumpScale, this.normalMap = e.normalMap, 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.skinning = e.skinning, this.morphTargets = e.morphTargets, this.morphNormals = e.morphNormals, this 12220 }
vendor: 6,575 bytes, lines 12220-12373
12220, ((ts.prototype = Object.create(tn.prototype)).constructor = ts).prototype.isMeshLambertMaterial = !0, ts.prototype.copy = function(e) { 12221 return tn.prototype.copy.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.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.skinning = e.skinning, this.morphTargets = e.morphTargets, this.morphNormals = e.morphNormals, this 12222 }, ((is.prototype = Object.create(Jo.prototype)).constructor = is).prototype.isLineDashedMaterial = !0, is.prototype.copy = function(e) { 12223 return Jo.prototype.copy.call(this, e), this.scale = e.scale, this.dashSize = e.dashSize, this.gapSize = e.gapSize, this 12224 }; 12225 var ns = Object.freeze({ 12226 ShadowMaterial: Xa, 12227 SpriteMaterial: Wo, 12228 RawShaderMaterial: Ya, 12229 ShaderMaterial: nn, 12230 PointsMaterial: ia, 12231 MeshPhysicalMaterial: Qa, 12232 MeshStandardMaterial: Za, 12233 MeshPhongMaterial: Ja, 12234 MeshToonMaterial: Ka, 12235 MeshNormalMaterial: es, 12236 MeshLambertMaterial: ts, 12237 MeshDepthMaterial: rn, 12238 MeshDistanceMaterial: on, 12239 MeshBasicMaterial: jr, 12240 LineDashedMaterial: is, 12241 LineBasicMaterial: Jo, 12242 Material: tn 12243 }), 12244 rs = { 12245 enabled: !1, 12246 files: {}, 12247 add: function(e, t) { 12248 !1 !== this.enabled && (this.files[e] = t) 12249 }, 12250 get: function(e) { 12251 if (!1 !== this.enabled) return this.files[e] 12252 }, 12253 remove: function(e) { 12254 delete this.files[e] 12255 }, 12256 clear: function() { 12257 this.files = {} 12258 } 12259 }; 12260 12261 function os(e, t, i) { 12262 var n = this, 12263 r = !1, 12264 o = 0, 12265 a = 0; 12266 this.onStart = void 0, this.onLoad = e, this.onProgress = t, this.onError = i, this.itemStart = function(e) { 12267 a++, !1 === r && void 0 !== n.onStart && n.onStart(e, o, a), r = !0 12268 }, this.itemEnd = function(e) { 12269 o++, void 0 !== n.onProgress && n.onProgress(e, o, a), o === a && (r = !1, void 0 !== n.onLoad && n.onLoad()) 12270 }, this.itemError = function(e) { 12271 void 0 !== n.onError && n.onError(e) 12272 } 12273 } 12274 var as = new os; 12275 12276 function ss(e) { 12277 this.manager = void 0 !== e ? e : as 12278 } 12279 12280 function ls(e) { 12281 this.manager = void 0 !== e ? e : as, this._parser = null 12282 } 12283 12284 function cs(e) { 12285 this.manager = void 0 !== e ? e : as, this._parser = null 12286 } 12287 12288 function us(e) { 12289 this.manager = void 0 !== e ? e : as 12290 } 12291 12292 function hs(e) { 12293 this.manager = void 0 !== e ? e : as 12294 } 12295 12296 function ds(e) { 12297 this.manager = void 0 !== e ? e : as 12298 } 12299 12300 function ps(e, t) { 12301 On.call(this), this.type = "Light", this.color = new Ei(e), this.intensity = void 0 !== t ? t : 1, this.receiveShadow = void 0 12302 } 12303 12304 function fs(e, t, i) { 12305 ps.call(this, e, i), this.type = "HemisphereLight", this.castShadow = void 0, this.position.copy(On.DefaultUp), this.updateMatrix(), this.groundColor = new Ei(t) 12306 } 12307 12308 function ms(e) { 12309 this.camera = e, this.bias = 0, this.radius = 1, this.mapSize = new lt(512, 512), this.map = null, this.matrix = new It 12310 } 12311 12312 function gs() { 12313 ms.call(this, new zn(50, 1, .5, 500)) 12314 } 12315 12316 function vs(e, t, i, n, r, o) { 12317 ps.call(this, e, t), this.type = "SpotLight", this.position.copy(On.DefaultUp), this.updateMatrix(), this.target = new On, Object.defineProperty(this, "power", { 12318 get: function() { 12319 return this.intensity * Math.PI 12320 }, 12321 set: function(e) { 12322 this.intensity = e / Math.PI 12323 } 12324 }), this.distance = void 0 !== i ? i : 0, this.angle = void 0 !== n ? n : Math.PI / 3, this.penumbra = void 0 !== r ? r : 0, this.decay = void 0 !== o ? o : 1, this.shadow = new gs 12325 } 12326 12327 function ys(e, t, i, n) { 12328 ps.call(this, e, t), this.type = "PointLight", Object.defineProperty(this, "power", { 12329 get: function() { 12330 return 4 * this.intensity * Math.PI 12331 }, 12332 set: function(e) { 12333 this.intensity = e / (4 * Math.PI) 12334 } 12335 }), this.distance = void 0 !== i ? i : 0, this.decay = void 0 !== n ? n : 1, this.shadow = new ms(new zn(90, 1, .5, 500)) 12336 } 12337 12338 function bs() { 12339 ms.call(this, new In(-5, 5, 5, -5, .5, 500)) 12340 } 12341 12342 function ws(e, t) { 12343 ps.call(this, e, t), this.type = "DirectionalLight", this.position.copy(On.DefaultUp), this.updateMatrix(), this.target = new On, this.shadow = new bs 12344 } 12345 12346 function xs(e, t) { 12347 ps.call(this, e, t), this.type = "AmbientLight", this.castShadow = void 0 12348 } 12349 12350 function _s(e, t, i, n) { 12351 ps.call(this, e, t), this.type = "RectAreaLight", this.position.set(0, 1, 0), this.updateMatrix(), this.width = void 0 !== i ? i : 10, this.height = void 0 !== n ? n : 10 12352 } 12353 Object.assign(ss.prototype, { 12354 load: function(i, n, t, r) { 12355 void 0 === i && (i = ""), void 0 !== this.path && (i = this.path + i); 12356 var o = this, 12357 e = rs.get(i); 12358 if (void 0 !== e) return o.manager.itemStart(i), setTimeout(function() { 12359 n && n(e), o.manager.itemEnd(i) 12360 }, 0), e; 12361 var a = i.match(/^data:(.*?)(;base64)?,(.*)$/); 12362 if (a) { 12363 var s = a[1], 12364 l = !!a[2], 12365 c = a[3]; 12366 c = window.decodeURIComponent(c), l && (c = window.atob(c)); 12367 try { 12368 var u, h = (this.responseType || "").toLowerCase(); 12369 switch (h) { 12370 case "arraybuffer": 12371 case "blob": 12372 u = new ArrayBuffer(c.length); 12373 for (var d = new Uint8Array(u), p = 0; p < c.length;
12373 p++) d[p] = c.charCodeAt(p); 12374 "blob" === h && (u = new Blob([u], { 12375 type: s 12376 })); 12377 break; 12378 case "document": 12379 var f = new DOMParser; 12380 u = f.parseFromString(c, s); 12381 break; 12382 case "json": 12383 u = JSON.parse(c); 12384 break; 12385 default: 12386 u = c 12387 } 12388 window.setTimeout(function() { 12389 n && n(u), o.manager.itemEnd(i) 12390 }, 0) 12391 } catch (e) { 12392 window.setTimeout(function() { 12393 r && r(e), o.manager.itemEnd(i), o.manager.itemError(i) 12394 }, 0) 12395 } 12396 } else { 12397 var m = new XMLHttpRequest; 12398 for (var g in m.open("GET", i, !0), m.addEventListener("load", function(e) { 12399 var t = e.target.response; 12400 rs.add(i, t), 200 === this.status ? (n && n(t), o.manager.itemEnd(i)) : 0 === this.status ? (console.warn("THREE.FileLoader: HTTP Status 0 received."), n && n(t), o.manager.itemEnd(i)) : (r && r(e), o.manager.itemEnd(i), o.manager.itemError(i)) 12401 }, !1), void 0 !== t && m.addEventListener("progress", function(e) { 12402 t(e) 12403 }, !1), m.addEventListener("error", function(e) { 12404 r && r(e), o.manager.itemEnd(i), o.manager.itemError(i) 12405 }, !1), void 0 !== this.responseType && (m.responseType = this.responseType), void 0 !== this.withCredentials && (m.withCredentials = this.withCredentials), m.overrideMimeType && m.overrideMimeType(void 0 !== this.mimeType ? this.mimeType : "text/plain"), this.requestHeader) m.setRequestHeader(g, this.requestHeader[g]); 12406 m.send(null) 12407 } 12408 return o.manager.itemStart(i), m 12409 }, 12410 setPath: function(e) { 12411 return this.path = e, this 12412 }, 12413 setResponseType: function(e) { 12414 return this.responseType = e, this 12415 }, 12416 setWithCredentials: function(e) { 12417 return this.withCredentials = e, this 12418 }, 12419 setMimeType: function(e) { 12420 return this.mimeType = e, this 12421 }, 12422 setRequestHeader: function(e) { 12423 return this.requestHeader = e, this 12424 } 12425 }), Object.assign(ls.prototype, { 12426 load: function(e, o, t, n) { 12427 var a = this, 12428 s = [], 12429 l = new aa; 12430 l.image = s; 12431 var r = new ss(this.manager); 12432 12433 function i(i) { 12434 r.load(e[i], function(e) { 12435 var t = a._parser(e, !0); 12436 s[i] = { 12437 width: t.width, 12438 height: t.height, 12439 format: t.format, 12440 mipmaps: t.mipmaps 12441 }, 6 === (c += 1) && (1 === t.mipmapCount && (l.minFilter = R), l.format = t.format, l.needsUpdate = !0, o && o(l)) 12442 }, t, n) 12443 } 12444 if (r.setPath(this.path), r.setResponseType("arraybuffer"), Array.isArray(e)) 12445 for (var c = 0, u = 0, h = e.length; u < h; ++u) i(u); 12446 else r.load(e, function(e) { 12447 var t = a._parser(e, !0); 12448 if (t.isCubemap) 12449 for (var i = t.mipmaps.length / t.mipmapCount, n = 0; n < i; n++) { 12450 s[n] = { 12451 mipmaps: [] 12452 }; 12453 for (var r = 0; r < t.mipmapCount; r++) s[n].mipmaps.push(t.mipmaps[n * t.mipmapCount + r]), s[n].format = t.format, s[n].width = t.width, s[n].height = t.height 12454 } else l.image.width = t.width, l.image.height = t.height, l.mipmaps = t.mipmaps; 12455 1 === t.mipmapCount && (l.minFilter = R), l.format = t.format, l.needsUpdate = !0, o && o(l) 12456 }, t, n); 12457 return l 12458 }, 12459 setPath: function(e) { 12460 return this.path = e, this 12461 } 12462 }), Object.assign(cs.prototype, { 12463 load: function(e, i, t, n) { 12464 var r = this, 12465 o = new zt, 12466 a = new ss(this.manager); 12467 return a.setResponseType("arraybuffer"), a.load(e, function(e) { 12468 var t = r._parser(e); 12469 t && (void 0 !== t.image ? o.image = t.image : void 0 !== t.data && (
vendor: 4,635 bytes, lines 12469-12558
12469o.image.width = t.width, o.image.height = t.height, o.image.data = t.data), o.wrapS = void 0 !== t.wrapS ? t.wrapS : M, o.wrapT = void 0 !== t.wrapT ? t.wrapT : M, o.magFilter = void 0 !== t.magFilter ? t.magFilter : R, o.minFilter = void 0 !== t.minFilter ? t.minFilter : P, o.anisotropy = void 0 !== t.anisotropy ? t.anisotropy : 1, void 0 !== t.format && (o.format = t.format), void 0 !== t.type && (o.type = t.type), void 0 !== t.mipmaps && (o.mipmaps = t.mipmaps), 1 === t.mipmapCount && (o.minFilter = R), o.needsUpdate = !0, i && i(o, t)) 12470 }, t, n), o 12471 } 12472 }), Object.assign(us.prototype, { 12473 crossOrigin: "Anonymous", 12474 load: function(t, e, i, n) { 12475 void 0 === t && (t = ""), void 0 !== this.path && (t = this.path + t); 12476 var r = this, 12477 o = rs.get(t); 12478 if (void 0 !== o) return r.manager.itemStart(t), setTimeout(function() { 12479 e && e(o), r.manager.itemEnd(t) 12480 }, 0), o; 12481 var a = document.createElementNS("http://www.w3.org/1999/xhtml", "img"); 12482 return a.addEventListener("load", function() { 12483 rs.add(t, this), e && e(this), r.manager.itemEnd(t) 12484 }, !1), a.addEventListener("error", function(e) { 12485 n && n(e), r.manager.itemEnd(t), r.manager.itemError(t) 12486 }, !1), "data:" !== t.substr(0, 5) && void 0 !== this.crossOrigin && (a.crossOrigin = this.crossOrigin), r.manager.itemStart(t), a.src = t, a 12487 }, 12488 setCrossOrigin: function(e) { 12489 return this.crossOrigin = e, this 12490 }, 12491 setPath: function(e) { 12492 return this.path = e, this 12493 } 12494 }), Object.assign(hs.prototype, { 12495 crossOrigin: "Anonymous", 12496 load: function(e, i, t, n) { 12497 var r = new Nt, 12498 o = new us(this.manager); 12499 o.setCrossOrigin(this.crossOrigin), o.setPath(this.path); 12500 var a = 0; 12501 12502 function s(t) { 12503 o.load(e[t], function(e) { 12504 r.images[t] = e, 6 === ++a && (r.needsUpdate = !0, i && i(r)) 12505 }, void 0, n) 12506 } 12507 for (var l = 0; l < e.length; ++l) s(l); 12508 return r 12509 }, 12510 setCrossOrigin: function(e) { 12511 return this.crossOrigin = e, this 12512 }, 12513 setPath: function(e) { 12514 return this.path = e, this 12515 } 12516 }), Object.assign(ds.prototype, { 12517 crossOrigin: "Anonymous", 12518 load: function(t, i, e, n) { 12519 var r = new us(this.manager); 12520 r.setCrossOrigin(this.crossOrigin), r.setPath(this.path); 12521 var o = new Rt; 12522 return o.image = r.load(t, function() { 12523 var e = 0 < t.search(/\.(jpg|jpeg)$/) || 0 === t.search(/^data\:image\/jpeg/); 12524 o.format = e ? Me : ke, o.needsUpdate = !0, void 0 !== i && i(o) 12525 }, e, n), o 12526 }, 12527 setCrossOrigin: function(e) { 12528 return this.crossOrigin = e, this 12529 }, 12530 setPath: function(e) { 12531 return this.path = e, this 12532 } 12533 }), ps.prototype = Object.assign(Object.create(On.prototype), { 12534 constructor: ps, 12535 isLight: !0, 12536 copy: function(e) { 12537 return On.prototype.copy.call(this, e), this.color.copy(e.color), this.intensity = e.intensity, this 12538 }, 12539 toJSON: function(e) { 12540 var t = On.prototype.toJSON.call(this, e); 12541 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 12542 } 12543 }), fs.prototype = Object.assign(Object.create(ps.prototype), { 12544 constructor: fs, 12545 isHemisphereLight: !0, 12546 copy: function(e) { 12547 return ps.prototype.copy.call(this, e), this.groundColor.copy(e.groundColor), this 12548 } 12549 }), Object.assign(ms.prototype, { 12550 copy: function(e) { 12551 return this.camera = e.camera.clone(), this.bias = e.bias, this.radius = e.radius, this.mapSize.copy(e.mapSize), this 12552 }, 12553 clone: function() { 12554 return (new this.constructor).copy(this) 12555 }, 12556 toJSON: function() { 12557 var e = {}; 12558 return 0 !== this.bias && (e.bias = this.bias), 1 !== this.radius && (e.radiu
vendor: 6,411 bytes, lines 12558-12719
12558s = 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 12559 } 12560 }), gs.prototype = Object.assign(Object.create(ms.prototype), { 12561 constructor: gs, 12562 isSpotLightShadow: !0, 12563 update: function(e) { 12564 var t = this.camera, 12565 i = 2 * st.RAD2DEG * e.angle, 12566 n = this.mapSize.width / this.mapSize.height, 12567 r = e.distance || t.far; 12568 i === t.fov && n === t.aspect && r === t.far || (t.fov = i, t.aspect = n, t.far = r, t.updateProjectionMatrix()) 12569 } 12570 }), vs.prototype = Object.assign(Object.create(ps.prototype), { 12571 constructor: vs, 12572 isSpotLight: !0, 12573 copy: function(e) { 12574 return ps.prototype.copy.call(this, e), 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 12575 } 12576 }), ys.prototype = Object.assign(Object.create(ps.prototype), { 12577 constructor: ys, 12578 isPointLight: !0, 12579 copy: function(e) { 12580 return ps.prototype.copy.call(this, e), this.distance = e.distance, this.decay = e.decay, this.shadow = e.shadow.clone(), this 12581 } 12582 }), bs.prototype = Object.assign(Object.create(ms.prototype), { 12583 constructor: bs 12584 }), ws.prototype = Object.assign(Object.create(ps.prototype), { 12585 constructor: ws, 12586 isDirectionalLight: !0, 12587 copy: function(e) { 12588 return ps.prototype.copy.call(this, e), this.target = e.target.clone(), this.shadow = e.shadow.clone(), this 12589 } 12590 }), xs.prototype = Object.assign(Object.create(ps.prototype), { 12591 constructor: xs, 12592 isAmbientLight: !0 12593 }), _s.prototype = Object.assign(Object.create(ps.prototype), { 12594 constructor: _s, 12595 isRectAreaLight: !0, 12596 copy: function(e) { 12597 return ps.prototype.copy.call(this, e), this.width = e.width, this.height = e.height, this 12598 }, 12599 toJSON: function(e) { 12600 var t = ps.prototype.toJSON.call(this, e); 12601 return t.object.width = this.width, t.object.height = this.height, t 12602 } 12603 }); 12604 var Ts, Es = { 12605 arraySlice: function(e, t, i) { 12606 return Es.isTypedArray(e) ? new e.constructor(e.subarray(t, void 0 !== i ? i : e.length)) : e.slice(t, i) 12607 }, 12608 convertArray: function(e, t, i) { 12609 return !e || !i && e.constructor === t ? e : "number" == typeof t.BYTES_PER_ELEMENT ? new t(e) : Array.prototype.slice.call(e) 12610 }, 12611 isTypedArray: function(e) { 12612 return ArrayBuffer.isView(e) && !(e instanceof DataView) 12613 }, 12614 getKeyframeOrder: function(i) { 12615 for (var e = i.length, t = new Array(e), n = 0; n !== e; ++n) t[n] = n; 12616 return t.sort(function(e, t) { 12617 return i[e] - i[t] 12618 }), t 12619 }, 12620 sortedArray: function(e, t, i) { 12621 for (var n = e.length, r = new e.constructor(n), o = 0, a = 0; a !== n; ++o) 12622 for (var s = i[o] * t, l = 0; l !== t; ++l) r[a++] = e[s + l]; 12623 return r 12624 }, 12625 flattenJSON: function(e, t, i, n) { 12626 for (var r = 1, o = e[0]; void 0 !== o && void 0 === o[n];) o = e[r++]; 12627 if (void 0 !== o) { 12628 var a = o[n]; 12629 if (void 0 !== a) 12630 if (Array.isArray(a)) 12631 for (; void 0 !== (a = o[n]) && (t.push(o.time), i.push.apply(i, a)), void 0 !== (o = e[r++]);); 12632 else if (void 0 !== a.toArray) 12633 for (; void 0 !== (a = o[n]) && (t.push(o.time), a.toArray(i, i.length)), void 0 !== (o = e[r++]);); 12634 else 12635 for (; void 0 !== (a = o[n]) && (t.push(o.time), i.push(a)), void 0 !== (o = e[r++]);); 12636 } 12637 } 12638 }; 12639 12640 function Ms(e, t, i, n) { 12641 this.parameterPositions = e, this._cachedIndex = 0, this.resultBuffer = void 0 !== n ? n : new t.constructor(i), this.sampleValues = t, this.valueSize = i 12642 } 12643 12644 function Ss(e, t, i, n) { 12645 Ms.call(this, e, t, i, n), this._weightPrev = -0, this._offsetPrev = -0, this._weightNext = -0, this._offsetNext = -0 12646 } 12647 12648 function Cs(e, t, i, n) { 12649 Ms.call(this, e, t, i, n) 12650 } 12651 12652 function As(e, t, i, n) { 12653 Ms.call(this, e, t, i, n) 12654 } 12655 12656 function Rs(e, t, i, n) { 12657 if (void 0 === e) throw new Error("track name is undefined"); 12658 if (void 0 === t || 0 === t.length) throw new Error("no keyframes in track named " + e); 12659 this.name = e, this.times = Es.convertArray(t, this.TimeBufferType), this.values = Es.convertArray(i, this.ValueBufferType), this.setInterpolation(n || this.DefaultInterpolation), this.validate(), this.optimize() 12660 } 12661 12662 function Ls(e, t, i, n) { 12663 Rs.call(this, e, t, i, n) 12664 } 12665 12666 function Ps(e, t, i, n) { 12667 Ms.call(this, e, t, i, n) 12668 } 12669 12670 function ks(e, t, i, n) { 12671 Rs.call(this, e, t, i, n) 12672 } 12673 12674 function Os(e, t, i, n) { 12675 Rs.call(this, e, t, i, n) 12676 } 12677 12678 function Ds(e, t, i, n) { 12679 Rs.call(this, e, t, i, n) 12680 } 12681 12682 function Is(e, t, i) { 12683 Rs.call(this, e, t, i) 12684 } 12685 12686 function zs(e, t, i, n) { 12687 Rs.call(this, e, t, i, n) 12688 } 12689 12690 function Ns(e, t, i, n) { 12691 Rs.apply(this, arguments) 12692 } 12693 12694 function Fs(e, t, i) { 12695 this.name = e, this.tracks = i, this.duration = void 0 !== t ? t : -1, this.uuid = st.generateUUID(), this.duration < 0 && this.resetDuration(), this.optimize() 12696 } 12697 12698 function Us(e) { 12699 this.manager = void 0 !== e ? e : as, this.textures = {} 12700 } 12701 12702 function Bs(e) { 12703 this.manager = void 0 !== e ? e : as 12704 } 12705 Object.assign(Ms.prototype, { 12706 evaluate: function(e) { 12707 var t = this.parameterPositions, 12708 i = this._cachedIndex, 12709 n = t[i], 12710 r = t[i - 1]; 12711 e: { 12712 t: { 12713 var o; 12714 i: { 12715 n: if (!(e < n)) { 12716 for (var a = i + 2;;) { 12717 if (void 0 === n) { 12718 if (e < r) break n; 12719 return i = t.length, this._cachedIndex = i, this.after
vendor: 12,967 bytes, lines 12719-13017
12719End_(i - 1, e, r) 12720 } 12721 if (i === a) break; 12722 if (r = n, e < (n = t[++i])) break t 12723 } 12724 o = t.length; 12725 break i 12726 }if (r <= e) break e; 12727 var s = t[1];e < s && (i = 2, r = s); 12728 for (a = i - 2;;) { 12729 if (void 0 === r) return this._cachedIndex = 0, this.beforeStart_(0, e, n); 12730 if (i === a) break; 12731 if (n = r, (r = t[--i - 1]) <= e) break t 12732 } 12733 o = i, 12734 i = 0 12735 } 12736 for (; i < o;) { 12737 var l = i + o >>> 1; 12738 e < t[l] ? o = l : i = l + 1 12739 } 12740 if (n = t[i], void 0 === (r = t[i - 1])) return this._cachedIndex = 0, this.beforeStart_(0, e, n); 12741 if (void 0 === n) return i = t.length, this._cachedIndex = i, this.afterEnd_(i - 1, r, e) 12742 } 12743 this._cachedIndex = i, 12744 this.intervalChanged_(i, r, n) 12745 } 12746 return this.interpolate_(i, r, e, n) 12747 }, 12748 settings: null, 12749 DefaultSettings_: {}, 12750 getSettings_: function() { 12751 return this.settings || this.DefaultSettings_ 12752 }, 12753 copySampleValue_: function(e) { 12754 for (var t = this.resultBuffer, i = this.sampleValues, n = this.valueSize, r = e * n, o = 0; o !== n; ++o) t[o] = i[r + o]; 12755 return t 12756 }, 12757 interpolate_: function(e, t, i, n) { 12758 throw new Error("call to abstract method") 12759 }, 12760 intervalChanged_: function(e, t, i) {} 12761 }), Object.assign(Ms.prototype, { 12762 beforeStart_: Ms.prototype.copySampleValue_, 12763 afterEnd_: Ms.prototype.copySampleValue_ 12764 }), Ss.prototype = Object.assign(Object.create(Ms.prototype), { 12765 constructor: Ss, 12766 DefaultSettings_: { 12767 endingStart: Xe, 12768 endingEnd: Xe 12769 }, 12770 intervalChanged_: function(e, t, i) { 12771 var n = this.parameterPositions, 12772 r = e - 2, 12773 o = e + 1, 12774 a = n[r], 12775 s = n[o]; 12776 if (void 0 === a) switch (this.getSettings_().endingStart) { 12777 case Ye: 12778 r = e, a = 2 * t - i; 12779 break; 12780 case Ze: 12781 a = t + n[r = n.length - 2] - n[r + 1]; 12782 break; 12783 default: 12784 r = e, a = i 12785 } 12786 if (void 0 === s) switch (this.getSettings_().endingEnd) { 12787 case Ye: 12788 o = e, s = 2 * i - t; 12789 break; 12790 case Ze: 12791 s = i + n[o = 1] - n[0]; 12792 break; 12793 default: 12794 o = e - 1, s = t 12795 } 12796 var l = .5 * (i - t), 12797 c = this.valueSize; 12798 this._weightPrev = l / (t - a), this._weightNext = l / (s - i), this._offsetPrev = r * c, this._offsetNext = o * c 12799 }, 12800 interpolate_: function(e, t, i, n) { 12801 for (var r = this.resultBuffer, o = this.sampleValues, a = this.valueSize, s = e * a, l = s - a, c = this._offsetPrev, u = this._offsetNext, h = this._weightPrev, d = this._weightNext, p = (i - t) / (n - t), f = p * p, m = f * p, g = -h * m + 2 * h * f - h * p, v = (1 + h) * m + (-1.5 - 2 * h) * f + (-.5 + h) * p + 1, y = (-1 - d) * m + (1.5 + d) * f + .5 * p, b = d * m - d * f, w = 0; w !== a; ++w) r[w] = g * o[c + w] + v * o[l + w] + y * o[s + w] + b * o[u + w]; 12802 return r 12803 } 12804 }), Cs.prototype = Object.assign(Object.create(Ms.prototype), { 12805 constructor: Cs, 12806 interpolate_: function(e, t, i, n) { 12807 for (var r = this.resultBuffer, o = this.sampleValues, a = this.valueSize, s = e * a, l = s - a, c = (i - t) / (n - t), u = 1 - c, h = 0; h !== a; ++h) r[h] = o[l + h] * u + o[s + h] * c; 12808 return r 12809 } 12810 }), As.prototype = Object.assign(Object.create(Ms.prototype), { 12811 constructor: As, 12812 interpolate_: function(e, t, i, n) { 12813 return this.copySampleValue_(e - 1) 12814 } 12815 }), Ts = { 12816 TimeBufferType: Float32Array, 12817 ValueBufferType: Float32Array, 12818 DefaultInterpolation: qe, 12819 InterpolantFactoryMethodDiscrete: function(e) { 12820 return new As(this.times, this.values, this.getValueSize(), e) 12821 }, 12822 InterpolantFactoryMethodLinear: function(e) { 12823 return new Cs(this.times, this.values, this.getValueSize(), e) 12824 }, 12825 InterpolantFactoryMethodSmooth: function(e) { 12826 return new Ss(this.times, this.values, this.getValueSize(), e) 12827 }, 12828 setInterpolation: function(e) { 12829 var t; 12830 switch (e) { 12831 case We: 12832 t = this.InterpolantFactoryMethodDiscrete; 12833 break; 12834 case qe: 12835 t = this.InterpolantFactoryMethodLinear; 12836 break; 12837 case 2302: 12838 t = this.InterpolantFactoryMethodSmooth 12839 } 12840 if (void 0 !== t) this.createInterpolant = t; 12841 else { 12842 var i = "unsupported interpolation for " + this.ValueTypeName + " keyframe track named " + this.name; 12843 if (void 0 === this.createInterpolant) { 12844 if (e === this.DefaultInterpolation) throw new Error(i); 12845 this.setInterpolation(this.DefaultInterpolation) 12846 } 12847 console.warn("THREE.KeyframeTrackPrototype:", i) 12848 } 12849 }, 12850 getInterpolation: function() { 12851 switch (this.createInterpolant) { 12852 case this.InterpolantFactoryMethodDiscrete: 12853 return We; 12854 case this.InterpolantFactoryMethodLinear: 12855 return qe; 12856 case this.InterpolantFactoryMethodSmooth: 12857 return 2302 12858 } 12859 }, 12860 getValueSize: function() { 12861 return this.values.length / this.times.length 12862 }, 12863 shift: function(e) { 12864 if (0 !== e) 12865 for (var t = this.times, i = 0, n = t.length; i !== n; ++i) t[i] += e; 12866 return this 12867 }, 12868 scale: function(e) { 12869 if (1 !== e) 12870 for (var t = this.times, i = 0, n = t.length; i !== n; ++i) t[i] *= e; 12871 return this 12872 }, 12873 trim: function(e, t) { 12874 for (var i = this.times, n = i.length, r = 0, o = n - 1; r !== n && i[r] < e;) ++r; 12875 for (; - 1 !== o && i[o] > t;) --o; 12876 if (++o, 0 !== r || o !== n) { 12877 o <= r && (r = (o = Math.max(o, 1)) - 1); 12878 var a = this.getValueSize(); 12879 this.times = Es.arraySlice(i, r, o), this.values = Es.arraySlice(this.values, r * a, o * a) 12880 } 12881 return this 12882 }, 12883 validate: function() { 12884 var e = !0, 12885 t = this.getValueSize(); 12886 t - Math.floor(t) != 0 && (console.error("THREE.KeyframeTrackPrototype: Invalid value size in track.", this), e = !1); 12887 var i = this.times, 12888 n = this.values, 12889 r = i.length; 12890 0 === r && (console.error("THREE.KeyframeTrackPrototype: Track is empty.", this), e = !1); 12891 for (var o = null, a = 0; a !== r; a++) { 12892 var s = i[a]; 12893 if ("number" == typeof s && isNaN(s)) { 12894 console.error("THREE.KeyframeTrackPrototype: Time is not a valid number.", this, a, s), e = !1; 12895 break 12896 } 12897 if (null !== o && s < o) { 12898 console.error("THREE.KeyframeTrackPrototype: Out of order keys.", this, a, s, o), e = !1; 12899 break 12900 } 12901 o = s 12902 } 12903 if (void 0 !== n && Es.isTypedArray(n)) { 12904 a = 0; 12905 for (var l = n.length; a !== l; ++a) { 12906 var c = n[a]; 12907 if (isNaN(c)) { 12908 console.error("THREE.KeyframeTrackPrototype: Value is not a valid number.", this, a, c), e = !1; 12909 break 12910 } 12911 } 12912 } 12913 return e 12914 }, 12915 optimize: function() { 12916 for (var e = this.times, t = this.values, i = this.getValueSize(), n = 2302 === this.getInterpolation(), r = 1, o = e.length - 1, a = 1; a < o; ++a) { 12917 var s = !1, 12918 l = e[a]; 12919 if (l !== e[a + 1] && (1 !== a || l !== l[0])) 12920 if (n) s = !0; 12921 else 12922 for (var c = a * i, u = c - i, h = c + i, d = 0; d !== i; ++d) { 12923 var p = t[c + d]; 12924 if (p !== t[u + d] || p !== t[h + d]) { 12925 s = !0; 12926 break 12927 } 12928 } 12929 if (s) { 12930 if (a !== r) { 12931 e[r] = e[a]; 12932 var f = a * i, 12933 m = r * i; 12934 for (d = 0; d !== i; ++d) t[m + d] = t[f + d] 12935 }++r 12936 } 12937 } 12938 if (0 < o) { 12939 e[r] = e[o]; 12940 for (f = o * i, m = r * i, d = 0; d !== i; ++d) t[m + d] = t[f + d]; 12941 ++r 12942 } 12943 return r !== e.length && (this.times = Es.arraySlice(e, 0, r), this.values = Es.arraySlice(t, 0, r * i)), this 12944 } 12945 }, Ls.prototype = Object.assign(Object.create(Ts), { 12946 constructor: Ls, 12947 ValueTypeName: "vector" 12948 }), Ps.prototype = Object.assign(Object.create(Ms.prototype), { 12949 constructor: Ps, 12950 interpolate_: function(e, t, i, n) { 12951 for (var r = this.resultBuffer, o = this.sampleValues, a = this.valueSize, s = e * a, l = (i - t) / (n - t), c = s + a; s !== c; s += 4) Ot.slerpFlat(r, 0, o, s - a, o, s, l); 12952 return r 12953 } 12954 }), ks.prototype = Object.assign(Object.create(Ts), { 12955 constructor: ks, 12956 ValueTypeName: "quaternion", 12957 DefaultInterpolation: qe, 12958 InterpolantFactoryMethodLinear: function(e) { 12959 return new Ps(this.times, this.values, this.getValueSize(), e) 12960 }, 12961 InterpolantFactoryMethodSmooth: void 0 12962 }), Os.prototype = Object.assign(Object.create(Ts), { 12963 constructor: Os, 12964 ValueTypeName: "number" 12965 }), Ds.prototype = Object.assign(Object.create(Ts), { 12966 constructor: Ds, 12967 ValueTypeName: "string", 12968 ValueBufferType: Array, 12969 DefaultInterpolation: We, 12970 InterpolantFactoryMethodLinear: void 0, 12971 InterpolantFactoryMethodSmooth: void 0 12972 }), Is.prototype = Object.assign(Object.create(Ts), { 12973 constructor: Is, 12974 ValueTypeName: "bool", 12975 ValueBufferType: Array, 12976 DefaultInterpolation: We, 12977 InterpolantFactoryMethodLinear: void 0, 12978 InterpolantFactoryMethodSmooth: void 0 12979 }), zs.prototype = Object.assign(Object.create(Ts), { 12980 constructor: zs, 12981 ValueTypeName: "color" 12982 }), (Ns.prototype = Ts).constructor = Ns, Object.assign(Ns, { 12983 parse: function(e) { 12984 if (void 0 === e.type) throw new Error("track type undefined, can not parse"); 12985 var t = Ns._getTrackTypeForValueTypeName(e.type); 12986 if (void 0 === e.times) { 12987 var i = [], 12988 n = []; 12989 Es.flattenJSON(e.keys, i, n, "value"), e.times = i, e.values = n 12990 } 12991 return void 0 !== t.parse ? t.parse(e) : new t(e.name, e.times, e.values, e.interpolation) 12992 }, 12993 toJSON: function(e) { 12994 var t, i = e.constructor; 12995 if (void 0 !== i.toJSON) t = i.toJSON(e); 12996 else { 12997 t = { 12998 name: e.name, 12999 times: Es.convertArray(e.times, Array), 13000 values: Es.convertArray(e.values, Array) 13001 }; 13002 var n = e.getInterpolation(); 13003 n !== e.DefaultInterpolation && (t.interpolation = n) 13004 } 13005 return t.type = e.ValueTypeName, t 13006 }, 13007 _getTrackTypeForValueTypeName: function(e) { 13008 switch (e.toLowerCase()) { 13009 case "scalar": 13010 case "double": 13011 case "float": 13012 case "number": 13013 case "integer": 13014 return Os; 13015 case "vector": 13016 case "vector2": 13017 case "vector3":
vendor: 18,254 bytes, lines 13018-13361
13018 case "vector4": 13019 return Ls; 13020 case "color": 13021 return zs; 13022 case "quaternion": 13023 return ks; 13024 case "bool": 13025 case "boolean": 13026 return Is; 13027 case "string": 13028 return Ds 13029 } 13030 throw new Error("Unsupported typeName: " + e) 13031 } 13032 }), Object.assign(Fs, { 13033 parse: function(e) { 13034 for (var t = [], i = e.tracks, n = 1 / (e.fps || 1), r = 0, o = i.length; r !== o; ++r) t.push(Ns.parse(i[r]).scale(n)); 13035 return new Fs(e.name, e.duration, t) 13036 }, 13037 toJSON: function(e) { 13038 for (var t = [], i = e.tracks, n = { 13039 name: e.name, 13040 duration: e.duration, 13041 tracks: t 13042 }, r = 0, o = i.length; r !== o; ++r) t.push(Ns.toJSON(i[r])); 13043 return n 13044 }, 13045 CreateFromMorphTargetSequence: function(e, t, i, n) { 13046 for (var r = t.length, o = [], a = 0; a < r; a++) { 13047 var s = [], 13048 l = []; 13049 s.push((a + r - 1) % r, a, (a + 1) % r), l.push(0, 1, 0); 13050 var c = Es.getKeyframeOrder(s); 13051 s = Es.sortedArray(s, 1, c), l = Es.sortedArray(l, 1, c), n || 0 !== s[0] || (s.push(r), l.push(l[0])), o.push(new Os(".morphTargetInfluences[" + t[a].name + "]", s, l).scale(1 / i)) 13052 } 13053 return new Fs(e, -1, o) 13054 }, 13055 findByName: function(e, t) { 13056 var i = e; 13057 if (!Array.isArray(e)) { 13058 var n = e; 13059 i = n.geometry && n.geometry.animations || n.animations 13060 } 13061 for (var r = 0; r < i.length; r++) 13062 if (i[r].name === t) return i[r]; 13063 return null 13064 }, 13065 CreateClipsFromMorphTargetSequences: function(e, t, i) { 13066 for (var n = {}, r = /^([\w-]*?)([\d]+)$/, o = 0, a = e.length; o < a; o++) { 13067 var s = e[o], 13068 l = s.name.match(r); 13069 if (l && 1 < l.length) { 13070 var c = n[h = l[1]]; 13071 c || (n[h] = c = []), c.push(s) 13072 } 13073 } 13074 var u = []; 13075 for (var h in n) u.push(Fs.CreateFromMorphTargetSequence(h, n[h], t, i)); 13076 return u 13077 }, 13078 parseAnimation: function(e, t) { 13079 if (!e) return console.error("THREE.AnimationClip: No animation in JSONLoader data."), null; 13080 for (var i = function(e, t, i, n, r) { 13081 if (0 !== i.length) { 13082 var o = [], 13083 a = []; 13084 Es.flattenJSON(i, o, a, n), 0 !== o.length && r.push(new e(t, o, a)) 13085 } 13086 }, n = [], r = e.name || "default", o = e.length || -1, a = e.fps || 30, s = e.hierarchy || [], l = 0; l < s.length; l++) { 13087 var c = s[l].keys; 13088 if (c && 0 !== c.length) 13089 if (c[0].morphTargets) { 13090 for (var u = {}, h = 0; h < c.length; h++) 13091 if (c[h].morphTargets) 13092 for (var d = 0; d < c[h].morphTargets.length; d++) u[c[h].morphTargets[d]] = -1; 13093 for (var p in u) { 13094 var f = [], 13095 m = []; 13096 for (d = 0; d !== c[h].morphTargets.length; ++d) { 13097 var g = c[h]; 13098 f.push(g.time), m.push(g.morphTarget === p ? 1 : 0) 13099 } 13100 n.push(new Os(".morphTargetInfluence[" + p + "]", f, m)) 13101 } 13102 o = u.length * (a || 1) 13103 } else { 13104 var v = ".bones[" + t[l].name + "]"; 13105 i(Ls, v + ".position", c, "pos", n), i(ks, v + ".quaternion", c, "rot", n), i(Ls, v + ".scale", c, "scl", n) 13106 } 13107 } 13108 return 0 === n.length ? null : new Fs(r, o, n) 13109 } 13110 }), Object.assign(Fs.prototype, { 13111 resetDuration: function() { 13112 for (var e = 0, t = 0, i = this.tracks.length; t !== i; ++t) { 13113 var n = this.tracks[t]; 13114 e = Math.max(e, n.times[n.times.length - 1]) 13115 } 13116 this.duration = e 13117 }, 13118 trim: function() { 13119 for (var e = 0; e < this.tracks.length; e++) this.tracks[e].trim(0, this.duration); 13120 return this 13121 }, 13122 optimize: function() { 13123 for (var e = 0; e < this.tracks.length; e++) this.tracks[e].optimize(); 13124 return this 13125 } 13126 }), Object.assign(Us.prototype, { 13127 load: function(e, t, i, n) { 13128 var r = this; 13129 new ss(r.manager).load(e, function(e) { 13130 t(r.parse(JSON.parse(e))) 13131 }, i, n) 13132 }, 13133 setTextures: function(e) { 13134 this.textures = e 13135 }, 13136 parse: function(e) { 13137 var t = this.textures; 13138 13139 function i(e) { 13140 return void 0 === t[e] && console.warn("THREE.MaterialLoader: Undefined texture", e), t[e] 13141 } 13142 var n = new ns[e.type]; 13143 if (void 0 !== e.uuid && (n.uuid = e.uuid), void 0 !== e.name && (n.name = e.name), void 0 !== e.color && n.color.setHex(e.color), void 0 !== e.roughness && (n.roughness = e.roughness), void 0 !== e.metalness && (n.metalness = e.metalness), void 0 !== e.emissive && n.emissive.setHex(e.emissive), void 0 !== e.specular && n.specular.setHex(e.specular), void 0 !== e.shininess && (n.shininess = e.shininess), void 0 !== e.clearCoat && (n.clearCoat = e.clearCoat), void 0 !== e.clearCoatRoughness && (n.clearCoatRoughness = e.clearCoatRoughness), void 0 !== e.uniforms && (n.uniforms = e.uniforms), void 0 !== e.vertexShader && (n.vertexShader = e.vertexShader), void 0 !== e.fragmentShader && (n.fragmentShader = e.fragmentShader), void 0 !== e.vertexColors && (n.vertexColors = e.vertexColors), void 0 !== e.fog && (n.fog = e.fog), void 0 !== e.flatShading && (n.flatShading = e.flatShading), void 0 !== e.blending && (n.blending = e.blending), void 0 !== e.side && (n.side = e.side), void 0 !== e.opacity && (n.opacity = e.opacity), void 0 !== e.transparent && (n.transparent = e.transparent), void 0 !== e.alphaTest && (n.alphaTest = e.alphaTest), void 0 !== e.depthTest && (n.depthTest = e.depthTest), void 0 !== e.depthWrite && (n.depthWrite = e.depthWrite), void 0 !== e.colorWrite && (n.colorWrite = e.colorWrite), void 0 !== e.wireframe && (n.wireframe = e.wireframe), void 0 !== e.wireframeLinewidth && (n.wireframeLinewidth = e.wireframeLinewidth), void 0 !== e.wireframeLinecap && (n.wireframeLinecap = e.wireframeLinecap), void 0 !== e.wireframeLinejoin && (n.wireframeLinejoin = e.wireframeLinejoin), void 0 !== e.skinning && (n.skinning = e.skinning), void 0 !== e.morphTargets && (n.morphTargets = e.morphTargets), void 0 !== e.dithering && (n.dithering = e.dithering), void 0 !== e.visible && (n.visible = e.visible), void 0 !== e.userData && (n.userData = e.userData), void 0 !== e.shading && (n.flatShading = 1 === e.shading), void 0 !== e.size && (n.size = e.size), void 0 !== e.sizeAttenuation && (n.sizeAttenuation = e.sizeAttenuation), void 0 !== e.map && (n.map = i(e.map)), void 0 !== e.alphaMap && (n.alphaMap = i(e.alphaMap), n.transparent = !0), void 0 !== e.bumpMap && (n.bumpMap = i(e.bumpMap)), void 0 !== e.bumpScale && (n.bumpScale = e.bumpScale), void 0 !== e.normalMap && (n.normalMap = i(e.normalMap)), void 0 !== e.normalScale) { 13144 var r = e.normalScale; 13145 !1 === Array.isArray(r) && (r = [r, r]), n.normalScale = (new lt).fromArray(r) 13146 } 13147 return void 0 !== e.displacementMap && (n.displacementMap = i(e.displacementMap)), void 0 !== e.displacementScale && (n.displacementScale = e.displacementScale), void 0 !== e.displacementBias && (n.displacementBias = e.displacementBias), void 0 !== e.roughnessMap && (n.roughnessMap = i(e.roughnessMap)), void 0 !== e.metalnessMap && (n.metalnessMap = i(e.metalnessMap)), void 0 !== e.emissiveMap && (n.emissiveMap = i(e.emissiveMap)), void 0 !== e.emissiveIntensity && (n.emissiveIntensity = e.emissiveIntensity), void 0 !== e.specularMap && (n.specularMap = i(e.specularMap)), void 0 !== e.envMap && (n.envMap = i(e.envMap)), void 0 !== e.reflectivity && (n.reflectivity = e.reflectivity), void 0 !== e.lightMap && (n.lightMap = i(e.lightMap)), void 0 !== e.lightMapIntensity && (n.lightMapIntensity = e.lightMapIntensity), void 0 !== e.aoMap && (n.aoMap = i(e.aoMap)), void 0 !== e.aoMapIntensity && (n.aoMapIntensity = e.aoMapIntensity), void 0 !== e.gradientMap && (n.gradientMap = i(e.gradientMap)), n 13148 } 13149 }), Object.assign(Bs.prototype, { 13150 load: function(e, t, i, n) { 13151 var r = this; 13152 new ss(r.manager).load(e, function(e) { 13153 t(r.parse(JSON.parse(e))) 13154 }, i, n) 13155 }, 13156 parse: function(e) { 13157 var t = new Fr, 13158 i = e.data.index; 13159 if (void 0 !== i) { 13160 var n = new Ws[i.type](i.array); 13161 t.setIndex(new Sr(n, 1)) 13162 } 13163 var r = e.data.attributes; 13164 for (var o in r) { 13165 var a = r[o]; 13166 n = new Ws[a.type](a.array); 13167 t.addAttribute(o, new Sr(n, a.itemSize, a.normalized)) 13168 } 13169 var s = e.data.groups || e.data.drawcalls || e.data.offsets; 13170 if (void 0 !== s) 13171 for (var l = 0, c = s.length; l !== c; ++l) { 13172 var u = s[l]; 13173 t.addGroup(u.start, u.count, u.materialIndex) 13174 } 13175 var h = e.data.boundingSphere; 13176 if (void 0 !== h) { 13177 var d = new Dt; 13178 void 0 !== h.center && d.fromArray(h.center), t.boundingSphere = new sn(d, h.radius) 13179 } 13180 return t 13181 } 13182 }); 13183 var Hs, $s, js, Gs, Vs, Ws = { 13184 Int8Array: Int8Array, 13185 Uint8Array: Uint8Array, 13186 Uint8ClampedArray: "undefined" != typeof Uint8ClampedArray ? Uint8ClampedArray : Uint8Array, 13187 Int16Array: Int16Array, 13188 Uint16Array: Uint16Array, 13189 Int32Array: Int32Array, 13190 Uint32Array: Uint32Array, 13191 Float32Array: Float32Array, 13192 Float64Array: Float64Array 13193 }; 13194 13195 function qs() { 13196 this.onLoadStart = function() {}, this.onLoadProgress = function() {}, this.onLoadComplete = function() {} 13197 } 13198 13199 function Xs(e) { 13200 "boolean" == typeof e && (console.warn("THREE.JSONLoader: showStatus parameter has been removed from constructor."), e = void 0), this.manager = void 0 !== e ? e : as, this.withCredentials = !1 13201 } 13202 13203 function Ys(e) { 13204 this.manager = void 0 !== e ? e : as, this.texturePath = "" 13205 } 13206 qs.Handlers = { 13207 handlers: [], 13208 add: function(e, t) { 13209 this.handlers.push(e, t) 13210 }, 13211 get: function(e) { 13212 for (var t = this.handlers, i = 0, n = t.length; i < n; i += 2) { 13213 var r = t[i], 13214 o = t[i + 1]; 13215 if (r.test(e)) return o 13216 } 13217 return null 13218 } 13219 }, Object.assign(qs.prototype, { 13220 crossOrigin: void 0, 13221 extractUrlBase: function(e) { 13222 var t = e.split("/"); 13223 return 1 === t.length ? "./" : (t.pop(), t.join("/") + "/") 13224 }, 13225 initMaterials: function(e, t, i) { 13226 for (var n = [], r = 0; r < e.length; ++r) n[r] = this.createMaterial(e[r], t, i); 13227 return n 13228 }, 13229 createMaterial: (Hs = { 13230 NoBlending: V, 13231 NormalBlending: W, 13232 AdditiveBlending: q, 13233 SubtractiveBlending: X, 13234 MultiplyBlending: Q, 13235 CustomBlending: J 13236 }, $s = new Ei, js = new ds, Gs = new Us, function(e, c, u) { 13237 var h = {}; 13238 13239 function t(e, t, i, n, r) { 13240 var o, a = c + e, 13241 s = qs.Handlers.get(a); 13242 null !== s ? o = s.load(a) : (js.setCrossOrigin(u), o = js.load(a)), void 0 !== t && (o.repeat.fromArray(t), 1 !== t[0] && (o.wrapS = E), 1 !== t[1] && (o.wrapT = E)), void 0 !== i && o.offset.fromArray(i), void 0 !== n && ("repeat" === n[0] && (o.wrapS = E), "mirror" === n[0] && (o.wrapS = S), "repeat" === n[1] && (o.wrapT = E), "mirror" === n[1] && (o.wrapT = S)), void 0 !== r && (o.anisotropy = r); 13243 var l = st.generateUUID(); 13244 return h[l] = o, l 13245 } 13246 var i = { 13247 uuid: st.generateUUID(), 13248 type: "MeshLambertMaterial" 13249 }; 13250 for (var n in e) { 13251 var r = e[n]; 13252 switch (n) { 13253 case "DbgColor": 13254 case "DbgIndex": 13255 case "opticalDensity": 13256 case "illumination": 13257 break; 13258 case "DbgName": 13259 i.name = r; 13260 break; 13261 case "blending": 13262 i.blending = Hs[r]; 13263 break; 13264 case "colorAmbient": 13265 case "mapAmbient": 13266 console.warn("THREE.Loader.createMaterial:", n, "is no longer supported."); 13267 break; 13268 case "colorDiffuse": 13269 i.color = $s.fromArray(r).getHex(); 13270 break; 13271 case "colorSpecular": 13272 i.specular = $s.fromArray(r).getHex(); 13273 break; 13274 case "colorEmissive": 13275 i.emissive = $s.fromArray(r).getHex(); 13276 break; 13277 case "specularCoef": 13278 i.shininess = r; 13279 break; 13280 case "shading": 13281 "basic" === r.toLowerCase() && (i.type = "MeshBasicMaterial"), "phong" === r.toLowerCase() && (i.type = "MeshPhongMaterial"), "standard" === r.toLowerCase() && (i.type = "MeshStandardMaterial"); 13282 break; 13283 case "mapDiffuse": 13284 i.map = t(r, e.mapDiffuseRepeat, e.mapDiffuseOffset, e.mapDiffuseWrap, e.mapDiffuseAnisotropy); 13285 break; 13286 case "mapDiffuseRepeat": 13287 case "mapDiffuseOffset": 13288 case "mapDiffuseWrap": 13289 case "mapDiffuseAnisotropy": 13290 break; 13291 case "mapEmissive": 13292 i.emissiveMap = t(r, e.mapEmissiveRepeat, e.mapEmissiveOffset, e.mapEmissiveWrap, e.mapEmissiveAnisotropy); 13293 break; 13294 case "mapEmissiveRepeat": 13295 case "mapEmissiveOffset": 13296 case "mapEmissiveWrap": 13297 case "mapEmissiveAnisotropy": 13298 break; 13299 case "mapLight": 13300 i.lightMap = t(r, e.mapLightRepeat, e.mapLightOffset, e.mapLightWrap, e.mapLightAnisotropy); 13301 break; 13302 case "mapLightRepeat": 13303 case "mapLightOffset": 13304 case "mapLightWrap": 13305 case "mapLightAnisotropy": 13306 break; 13307 case "mapAO": 13308 i.aoMap = t(r, e.mapAORepeat, e.mapAOOffset, e.mapAOWrap, e.mapAOAnisotropy); 13309 break; 13310 case "mapAORepeat": 13311 case "mapAOOffset": 13312 case "mapAOWrap": 13313 case "mapAOAnisotropy": 13314 break; 13315 case "mapBump": 13316 i.bumpMap = t(r, e.mapBumpRepeat, e.mapBumpOffset, e.mapBumpWrap, e.mapBumpAnisotropy); 13317 break; 13318 case "mapBumpScale": 13319 i.bumpScale = r; 13320 break; 13321 case "mapBumpRepeat": 13322 case "mapBumpOffset": 13323 case "mapBumpWrap": 13324 case "mapBumpAnisotropy": 13325 break; 13326 case "mapNormal": 13327 i.normalMap = t(r, e.mapNormalRepeat, e.mapNormalOffset, e.mapNormalWrap, e.mapNormalAnisotropy); 13328 break; 13329 case "mapNormalFactor": 13330 i.normalScale = [r, r]; 13331 break; 13332 case "mapNormalRepeat": 13333 case "mapNormalOffset": 13334 case "mapNormalWrap": 13335 case "mapNormalAnisotropy": 13336 break; 13337 case "mapSpecular": 13338 i.specularMap = t(r, e.mapSpecularRepeat, e.mapSpecularOffset, e.mapSpecularWrap, e.mapSpecularAnisotropy); 13339 break; 13340 case "mapSpecularRepeat": 13341 case "mapSpecularOffset": 13342 case "mapSpecularWrap": 13343 case "mapSpecularAnisotropy": 13344 break; 13345 case "mapMetalness": 13346 i.metalnessMap = t(r, e.mapMetalnessRepeat, e.mapMetalnessOffset, e.mapMetalnessWrap, e.mapMetalnessAnisotropy); 13347 break; 13348 case "mapMetalnessRepeat": 13349 case "mapMetalnessOffset": 13350 case "mapMetalnessWrap": 13351 case "mapMetalnessAnisotropy": 13352 break; 13353 case "mapRoughness": 13354 i.roughnessMap = t(r, e.mapRoughnessRepeat, e.mapRoughnessOffset, e.mapRoughnessWrap, e.mapRoughnessAnisotropy); 13355 break; 13356 case "mapRoughnessRepeat": 13357 case "mapRoughnessOffset": 13358 case "mapRoughnessWrap": 13359 case "mapRoughnessAnisotropy": 13360 break; 13361 case "mapAlpha":
13362 i.alphaMap = t(r, e.mapAlphaRepeat, e.mapAlphaOffset, e.mapAlphaWrap, e.mapAlphaAnisotropy); 13363 break; 13364 case "mapAlphaRepeat": 13365 case "mapAlphaOffset": 13366 case "mapAlphaWrap": 13367 case "mapAlphaAnisotropy": 13368 break; 13369 case "flipSided": 13370 i.side = Y; 13371 break; 13372 case "doubleSided": 13373 i.side = Z; 13374 break; 13375 case "transparency": 13376 console.warn("THREE.Loader.createMaterial: transparency has been renamed to opacity"), i.opacity = r; 13377 break; 13378 case "depthTest": 13379 case "depthWrite": 13380 case "colorWrite": 13381 case "opacity": 13382 case "reflectivity": 13383 case "transparent": 13384 case "visible": 13385 case "wireframe": 13386 i[n] = r; 13387 break; 13388 case "vertexColors": 13389 !0 === r && (i.vertexColors = 2), "face" === r && (i.vertexColors = 1); 13390 break; 13391 default: 13392 console.error("THREE.Loader.createMaterial: Unsupported", n, r) 13393 } 13394 } 13395 return "MeshBasicMaterial" === i.type && delete i.emissive, "MeshPhongMaterial" !== i.type && delete i.specular, i.opacity < 1 && (i.transparent = !0), Gs.setTextures(h), Gs.parse(i) 13396 }) 13397 }), Object.assign(Xs.prototype, { 13398 load: function(o, a, e, t) { 13399 var s = this, 13400 l = this.texturePath && "string" == typeof this.texturePath ? this.texturePath : qs.prototype.extractUrlBase(o), 13401 i = new ss(this.manager); 13402 i.setWithCredentials(this.withCredentials), i.load(o, function(e) { 13403 var t = JSON.parse(e), 13404 i = t.metadata; 13405 if (void 0 !== i) { 13406 var n = i.type; 13407 if (void 0 !== n) { 13408 if ("object" === n.toLowerCase()) return void console.error("THREE.JSONLoader: " + o + " should be loaded with THREE.ObjectLoader instead."); 13409 if ("scene" === n.toLowerCase()) return void console.error("THREE.JSONLoader: " + o + " should be loaded with THREE.SceneLoader instead.") 13410 } 13411 } 13412 var r = s.parse(t, l); 13413 a(r.geometry, r.materials) 13414 }, e, t) 13415 }, 13416 setTexturePath: function(e) { 13417 this.texturePath = e 13418 }, 13419 parse: function(e, t) { 13420 void 0 !== e.data && (e = e.data), void 0 !== e.scale ? e.scale = 1 / e.scale : e.scale = 1; 13421 var i = new Mr; 13422 return function(e, t) { 13423 function i(e, t) { 13424 return e & 1 << t 13425 } 13426 var n, r, o, a, s, l, c, u, h, d, p, f, m, g, v, y, b, w, x, _, T, E, M, S, C, A = e.faces, 13427 R = e.vertices, 13428 L = e.normals, 13429 P = e.colors, 13430 k = e.scale, 13431 O = 0; 13432 if (void 0 !== e.uvs) { 13433 for (n = 0; n < e.uvs.length; n++) e.uvs[n].length && O++; 13434 for (n = 0; n < O; n++) t.faceVertexUvs[n] = [] 13435 } 13436 for (a = 0, s = R.length; a < s;)(w = new Dt).x = R[a++] * k, w.y = R[a++] * k, w.z = R[a++] * k, t.vertices.push(w); 13437 for (a = 0, s = A.length; a < s;) 13438 if (p = i(d = A[a++], 0), f = i(d, 1), m = i(d, 3), g = i(d, 4), v = i(d, 5), y = i(d, 6), b = i(d, 7), p) { 13439 if ((_ = new Nn).a = A[a], _.b = A[a + 1], _.c = A[a + 3], (T = new Nn).a = A[a + 1], T.b = A[a + 2], T.c = A[a + 3], a += 4, f && (h = A[a++], _.materialIndex = h, T.materialIndex = h), o = t.faces.length, m) 13440 for (n = 0; n < O; n++) 13441 for (S = e.uvs[n], t.faceVertexUvs[n][o] = [], t.faceVertexUvs[n][o + 1] = [], r = 0; r < 4; r++) C = new lt(S[2 * (u = A[a++])], S[2 * u + 1]), 2 !== r && t.faceVertexUvs[n][o].push(C), 0 !== r && t.faceVertexUvs[n][o + 1].push(C); 13442 if (g && (c = 3 * A[a++], _.normal.set(L[c++], L[c++], L[c]), T.normal.copy(_.normal)), v) 13443 for (n = 0; n < 4; n++) c = 3 * A[a++], M = new Dt(L[c++], L[c++], L[c]), 2 !== n && _.vertexNormals.push(M), 0 !== n && T.vertexNormals.push(M); 13444 if (y && (E = P[l = A[a++]], _.color.setHex(E), T.color.setHex(E)), b) 13445 for (n = 0; n < 4; n++) E = P[l = A[a++]], 2 !== n && _.vertexColors.push(new Ei(E)), 0 !== n && T.vertexColors.push(new Ei(E)); 13446 t.faces.push(_), t.faces.push(T) 13447 } else { 13448 if ((x = new Nn).a = A[a++], x.b = A[a++], x.c = A[a++], f && (h = A[a++], x.materialIndex = h), o = t.faces.length, m) 13449 for (n = 0; n < O; n++) 13450 for (S = e.uvs[n], t.faceVertexUvs[n][o] = [], r = 0; r < 3; r++) C = new lt(S[2 * (u = A[a++])], S[2 * u + 1]), t.faceVertexUvs[n][o].push(C); 13451 if (g && (c = 3 * A[a++], x.normal.set(L[c++], L[c++], L[c])), v) 13452 for (n = 0; n < 3; n++) c = 3 * A[a++], M = new Dt(L[c++], L[c++], L[c]), x.vertexNormals.push(M); 13453 if (y && (l = A[a++], x.color.setHex(P[l])), b) 13454 for (n = 0; n < 3; n++) l = A[a++], x.vertexColors.push(new Ei(P[l])); 13455 t.faces.push(x) 13456 } 13457 }(e, i), 13458 function(e, t) { 13459 var i = void 0 !== e.influencesPerVertex ? e.influencesPerVertex : 2; 13460 if (e.skinWeights) 13461 for (var n = 0, r = e.skinWeights.length; n < r; n += i) { 13462 var o = e.skinWeights[n], 13463 a = 1 < i ? e.skinWeights[n + 1] : 0, 13464 s = 2 < i ? e.skinWeights[n + 2] : 0, 13465 l = 3 < i ? e.skinWeights[n + 3] : 0; 13466 t.skinWeights.push(new Lt(o, a, s, l)) 13467 } 13468 if (e.skinIndices) 13469 for (n = 0, r = e.skinIndices.length; n < r; n += i) { 13470 var c = e.skinIndices[n], 13471 u = 1 < i ? e.skinIndices[n + 1] : 0, 13472 h = 2 < i ? e.skinIndices[n + 2] : 0, 13473 d = 3 < i ? e.skinIndices[n + 3] : 0; 13474 t.skinIndices.push(new Lt(c, u, h, d)) 13475 }
13476 t.bones = e.bones, t.bones && 0 < t.bones.length && (t.skinWeights.length !== t.skinIndices.length || t.skinIndices.length !== t.vertices.length) && console.warn("When skinning, number of vertices (" + t.vertices.length + "), skinIndices (" + t.skinIndices.length + "), and skinWeights (" + t.skinWeights.length + ") should match.") 13477 }(e, i), 13478 function(e, t) { 13479 var i = e.scale; 13480 if (void 0 !== e.morphTargets) 13481 for (var n = 0, r = e.morphTargets.length; n < r; n++) { 13482 t.morphTargets[n] = {}, t.morphTargets[n].name = e.morphTargets[n].name, t.morphTargets[n].vertices = []; 13483 for (var o = t.morphTargets[n].vertices, a = e.morphTargets[n].vertices, s = 0, l = a.length; s < l; s += 3) { 13484 var c = new Dt; 13485 c.x = a[s] * i, c.y = a[s + 1] * i, c.z = a[s + 2] * i, o.push(c) 13486 } 13487 } 13488 if (void 0 !== e.morphColors && 0 < e.morphColors.length) { 13489 console.warn('THREE.JSONLoader: "morphColors" no longer supported. Using them as face colors.'); 13490 var u = t.faces, 13491 h = e.morphColors[0].colors; 13492 for (n = 0, r = u.length; n < r; n++) u[n].color.fromArray(h, 3 * n) 13493 } 13494 }(e, i), 13495 function(e, t) { 13496 var i = [], 13497 n = []; 13498 void 0 !== e.animation && n.push(e.animation), void 0 !== e.animations && (e.animations.length ? n = n.concat(e.animations) : n.push(e.animations)); 13499 for (var r = 0; r < n.length; r++) {
13500 var o = Fs.parseAnimation(n[r], t.bones); 13501 o && i.push(o) 13502 } 13503 if (t.morphTargets) { 13504 var a = Fs.CreateClipsFromMorphTargetSequences(t.morphTargets, 10); 13505 i = i.concat(a) 13506 } 13507 0 < i.length && (t.animations = i) 13508 }(e, i), i.computeFaceNormals(), i.computeBoundingSphere(), void 0 === e.materials || 0 === e.materials.length ? { 13509 geometry: i 13510 } : { 13511 geometry: i, 13512 materials: qs.prototype.initMaterials(e.materials, t, this.crossOrigin) 13513 } 13514 } 13515 }), Object.assign(Ys.prototype, { 13516 load: function(n, r, e, o) { 13517 "" === this.texturePath && (this.texturePath = n.substring(0, n.lastIndexOf("/") + 1)); 13518 var a = this; 13519 new ss(a.manager).load(n, function(e) { 13520 var t = null; 13521 try { 13522 t = JSON.parse(e) 13523 } catch (e) { 13524 return void 0 !== o && o(e), void console.error("THREE:ObjectLoader: Can't parse " + n + ".", e.message) 13525 } 13526 var i = t.metadata; 13527 void 0 !== i && void 0 !== i.type && "geometry" !== i.type.toLowerCase() ? a.parse(t, r) : console.error("THREE.ObjectLoader: Can't load " + n + ". Use THREE.JSONLoader instead.") 13528 }, e, o) 13529 }, 13530 setTexturePath: function(e) { 13531 this.texturePath = e 13532 }, 13533 setCrossOrigin: function(e) { 13534 this.crossOrigin = e 13535 }, 13536 parse: function(e, t) { 13537 var i = this.parseGeometries(e.geometries), 13538 n = this.parseImages(e.images, function() { 13539 void 0 !== t && t(a) 13540 }), 13541 r = this.parseTextures(e.textures, n), 13542 o = this.parseMaterials(e.materials, r), 13543 a = this.parseObject(e.object, i, o); 13544 return e.animations && (a.animations = this.parseAnimations(e.animations)), void 0 !== e.images && 0 !== e.images.length || void 0 !== t && t(a), a 13545 }, 13546 parseGeometries: function(e) { 13547 var t = {}; 13548 if (void 0 !== e) 13549 for (var i = new Xs, n = new Bs, r = 0, o = e.length; r < o; r++) { 13550 var a, s = e[r]; 13551 switch (s.type) { 13552 case "PlaneGeometry": 13553 case "PlaneBufferGeometry": 13554 a = new qa[s.type](s.width, s.height, s.widthSegments, s.heightSegments); 13555 break; 13556 case "BoxGeometry": 13557 case "BoxBufferGeometry": 13558 case "CubeGeometry": 13559 a = new qa[s.type](s.width, s.height, s.depth, s.widthSegments, s.heightSegments, s.depthSegments); 13560 break; 13561 case "CircleGeometry": 13562 case "CircleBufferGeometry": 13563 a = new qa[s.type](s.radius, s.segments, s.thetaStart, s.thetaLength); 13564 break; 13565 case "CylinderGeometry": 13566 case "CylinderBufferGeometry": 13567 a = new qa[s.type](s.radiusTop, s.radiusBottom, s.height, s.radialSegments, s.heightSegments, s.openEnded, s.thetaStart, s.thetaLength); 13568 break; 13569 case "ConeGeometry": 13570 case "ConeBufferGeometry": 13571 a = new qa[s.type](s.radius, s.height, s.radialSegments, s.heightSegments, s.openEnded, s.thetaStart, s.thetaLength); 13572 break; 13573 case "SphereGeometry": 13574 case "SphereBufferGeometry": 13575 a = new qa[s.type](s.radius, s.widthSegments, s.heightSegments, s.phiStart, s.phiLength, s.thetaStart, s.thetaLength); 13576 break; 13577 case "DodecahedronGeometry": 13578 case "IcosahedronGeometry": 13579 case "OctahedronGeometry": 13580 case "TetrahedronGeometry": 13581 a = new qa[s.type](s.radius, s.detail); 13582 break; 13583 case "RingGeometry": 13584 case "RingBufferGeometry": 13585 a = new qa[s.type](s.innerRadius, s.outerRadius, s.thetaSegments, s.phiSegments, s.thetaStart, s.thetaLength); 13586 break; 13587 case "TorusGeometry": 13588 case "TorusBufferGeometry": 13589 a = new qa[s.type](s.radius, s.tube, s.radialSegments, s.tubularSegments, s.arc); 13590 break; 13591 case "TorusKnotGeometry": 13592 case "TorusKnotBufferGeometry": 13593 a = new qa[s.type](s.radius, s.tube, s.tubularSegments, s.radialSegments, s.p, s.q); 13594 break; 13595 case "LatheGeometry": 13596 case "LatheBufferGeometry": 13597 a = new qa[s.type](s.points, s.segments, s.phiStart, s.phiLength); 13598 break; 13599 case "BufferGeometry": 13600 a = n.parse(s); 13601 break; 13602 case "Geometry": 13603 a = i.parse(s, this.texturePath).geometry; 13604 break; 13605 default: 13606 console.warn('THREE.ObjectLoader: Unsupported geometry type "' + s.type + '"'); 13607 continue 13608 } 13609 a.uuid = s.uuid, void 0 !== s.name && (a.name = s.name), t[s.uuid] = a 13610 } 13611 return t 13612 }, 13613 parseMaterials: function(e, t) { 13614 var i = {}; 13615 if (void 0 !== e) { 13616 var n = new Us; 13617 n.setTextures(t); 13618 for (var r = 0, o = e.length; r < o; r++) { 13619 var a = e[r]; 13620 if ("MultiMaterial" === a.type) { 13621 for (var s = [], l = 0; l < a.materials.length; l++) s.push(n.parse(a.materials[l])); 13622 i[a.uuid] = s 13623 } else i[a.uuid] = n.parse(a) 13624 } 13625 } 13626 return i 13627 }, 13628 parseAnimations: function(e) { 13629 for (var t = [], i = 0; i < e.length; i++) { 13630 var n = Fs.parse(e[i]); 13631 t.push(n) 13632 } 13633 return t 13634 }, 13635 parseImages: function(e, t) { 13636 var i = this, 13637 n = {}; 13638 13639 function r(e) { 13640 return i.manager.itemStart(e), o.load(e, function() { 13641 i.manager.itemEnd(e) 13642 }, void 0, function() { 13643 i.manager.itemEnd(e), i.manager.itemError(e) 13644 }) 13645 } 13646 if (void 0 !== e && 0 < e.length) { 13647 var o = new us(new os(t)); 13648 o.setCrossOrigin(this.crossOrigin); 13649 for (var a = 0, s = e.length; a < s; a++) { 13650 var l = e[a], 13651 c = /^(\/\/)|([a-z]+:(\/\/)?)/i.test(l.url) ? l.url : i.texturePath + l.url; 13652 n[l.uuid] = r(c) 13653 } 13654 } 13655 return n 13656 }, 13657 parseTextures: function(e, t) { 13658 function i(e, t) { 13659 return "number" == typeof e ? e : (console.warn("THREE.ObjectLoader.parseTexture: Constant should be in numeric form.", e), t[e]) 13660 } 13661 var n = {}; 13662 if (void 0 !== e) 13663 for (var r = 0, o = e.length; r < o; r++) { 13664 var a = e[r]; 13665 void 0 === a.image && console.warn('THREE.ObjectLoader: No "image" specified for', a.uuid), void 0 === t[a.image] && console.warn("THREE.ObjectLoader: Undefined image", a.image); 13666 var s = new Rt(t[a.image]); 13667 s.needsUpdate = !0, s.uuid = a.uuid, void 0 !== a.name && (s.name = a.name), void 0 !== a.mapping && (s.mapping = i(a.mapping, Zs)), void 0 !== a.offset && s.offset.fromArray(a.offset), void 0 !== a.repeat && s.repeat.fromArray(a.repeat), void 0 !== a.wrap && (s.wrapS = i(a.wrap[0], Qs), s.wrapT = i(a.wrap[1], Qs)), void 0 !== a.minFilter && (s.minFilter = i(a.minFilter, Js)
vendor: 5,751 bytes, lines 13667-13770
13667), void 0 !== a.magFilter && (s.magFilter = i(a.magFilter, Js)), void 0 !== a.anisotropy && (s.anisotropy = a.anisotropy), void 0 !== a.flipY && (s.flipY = a.flipY), n[a.uuid] = s 13668 } 13669 return n 13670 }, 13671 parseObject: (Vs = new It, function(e, t, o) { 13672 var i; 13673 13674 function n(e) { 13675 return void 0 === t[e] && console.warn("THREE.ObjectLoader: Undefined geometry", e), t[e] 13676 } 13677 13678 function r(e) { 13679 if (void 0 !== e) { 13680 if (Array.isArray(e)) { 13681 for (var t = [], i = 0, n = e.length; i < n; i++) { 13682 var r = e[i]; 13683 void 0 === o[r] && console.warn("THREE.ObjectLoader: Undefined material", r), t.push(o[r]) 13684 } 13685 return t 13686 } 13687 return void 0 === o[e] && console.warn("THREE.ObjectLoader: Undefined material", e), o[e] 13688 } 13689 } 13690 switch (e.type) { 13691 case "Scene": 13692 i = new Go, void 0 !== e.background && Number.isInteger(e.background) && (i.background = new Ei(e.background)), void 0 !== e.fog && ("Fog" === e.fog.type ? i.fog = new jo(e.fog.color, e.fog.near, e.fog.far) : "FogExp2" === e.fog.type && (i.fog = new $o(e.fog.color, e.fog.density))); 13693 break; 13694 case "PerspectiveCamera": 13695 i = new zn(e.fov, e.aspect, e.near, e.far), void 0 !== e.focus && (i.focus = e.focus), void 0 !== e.zoom && (i.zoom = e.zoom), void 0 !== e.filmGauge && (i.filmGauge = e.filmGauge), void 0 !== e.filmOffset && (i.filmOffset = e.filmOffset), void 0 !== e.view && (i.view = Object.assign({}, e.view)); 13696 break; 13697 case "OrthographicCamera": 13698 i = new In(e.left, e.right, e.top, e.bottom, e.near, e.far); 13699 break; 13700 case "AmbientLight": 13701 i = new xs(e.color, e.intensity); 13702 break; 13703 case "DirectionalLight": 13704 i = new ws(e.color, e.intensity); 13705 break; 13706 case "PointLight": 13707 i = new ys(e.color, e.intensity, e.distance, e.decay); 13708 break; 13709 case "RectAreaLight": 13710 i = new _s(e.color, e.intensity, e.width, e.height); 13711 break; 13712 case "SpotLight": 13713 i = new vs(e.color, e.intensity, e.distance, e.angle, e.penumbra, e.decay); 13714 break; 13715 case "HemisphereLight": 13716 i = new fs(e.color, e.groundColor, e.intensity); 13717 break; 13718 case "SkinnedMesh": 13719 console.warn("THREE.ObjectLoader.parseObject() does not support SkinnedMesh yet."); 13720 case "Mesh": 13721 var a = n(e.geometry), 13722 s = r(e.material); 13723 i = a.bones && 0 < a.bones.length ? new Qo(a, s) : new qr(a, s); 13724 break; 13725 case "LOD": 13726 i = new Xo; 13727 break; 13728 case "Line": 13729 i = new Ko(n(e.geometry), r(e.material), e.mode); 13730 break; 13731 case "LineLoop": 13732 i = new ta(n(e.geometry), r(e.material)); 13733 break; 13734 case "LineSegments": 13735 i = new ea(n(e.geometry), r(e.material)); 13736 break; 13737 case "PointCloud": 13738 case "Points": 13739 i = new na(n(e.geometry), r(e.material)); 13740 break; 13741 case "Sprite": 13742 i = new qo(r(e.material)); 13743 break; 13744 case "Group": 13745 i = new ra; 13746 break; 13747 default: 13748 i = new On 13749 } 13750 if (i.uuid = e.uuid, void 0 !== e.name && (i.name = e.name), void 0 !== e.matrix ? (Vs.fromArray(e.matrix), Vs.decompose(i.position, i.quaternion, i.scale)) : (void 0 !== e.position && i.position.fromArray(e.position), void 0 !== e.rotation && i.rotation.fromArray(e.rotation), void 0 !== e.quaternion && i.quaternion.fromArray(e.quaternion), void 0 !== e.scale && i.scale.fromArray(e.scale)), void 0 !== e.castShadow && (i.castShadow = e.castShadow), void 0 !== e.receiveShadow && (i.receiveShadow = e.receiveShadow), e.shadow && (void 0 !== e.shadow.bias && (i.shadow.bias = e.shadow.bias), void 0 !== e.shadow.radius && (i.shadow.radius = e.shadow.radius), void 0 !== e.shadow.mapSize && i.shadow.mapSize.fromArray(e.shadow.mapSize), void 0 !== e.shadow.camera && (i.shadow.camera = this.parseObject(e.shadow.camera))), void 0 !== e.visible && (i.visible = e.visible), void 0 !== e.userData && (i.userData = e.userData), void 0 !== e.children) 13751 for (var l = e.children, c = 0; c < l.length; c++) i.add(this.parseObject(l[c], t, o)); 13752 if ("LOD" === e.type) 13753 for (var u = e.levels, h = 0; h < u.length; h++) { 13754 var d = u[h], 13755 p = i.getObjectByProperty("uuid", d.object); 13756 void 0 !== p && i.addLevel(p, d.distance) 13757 } 13758 return i 13759 }) 13760 }); 13761 var Zs = { 13762 UVMapping: 300, 13763 CubeReflectionMapping: he, 13764 CubeRefractionMapping: de, 13765 EquirectangularReflectionMapping: pe, 13766 EquirectangularRefractionMapping: fe, 13767 SphericalReflectionMapping: me, 13768 CubeUVReflectionMapping: ge, 13769 CubeUVRefractionMapping: ve 13770 },
vendor: 8,314 bytes, lines 13771-13975
13771 Qs = { 13772 RepeatWrapping: E, 13773 ClampToEdgeWrapping: M, 13774 MirroredRepeatWrapping: S 13775 }, 13776 Js = { 13777 NearestFilter: z, 13778 NearestMipMapNearestFilter: C, 13779 NearestMipMapLinearFilter: A, 13780 LinearFilter: R, 13781 LinearMipMapNearestFilter: L, 13782 LinearMipMapLinearFilter: P 13783 }; 13784 13785 function Ks(e, t, i, n, r) { 13786 var o = .5 * (n - t), 13787 a = .5 * (r - i), 13788 s = e * e; 13789 return (2 * i - 2 * n + o + a) * (e * s) + (-3 * i + 3 * n - 2 * o - a) * s + o * e + i 13790 } 13791 13792 function el(e, t, i, n) { 13793 return (a = 1 - e) * a * t + 2 * (1 - (o = e)) * o * i + (r = e) * r * n; 13794 var r, o, a 13795 } 13796 13797 function tl(e, t, i, n, r) { 13798 return (c = 1 - e) * c * c * t + 3 * (l = 1 - (s = e)) * l * s * i + 3 * (1 - (a = e)) * a * a * n + (o = e) * o * o * r; 13799 var o, a, s, l, c 13800 } 13801 13802 function il() { 13803 this.arcLengthDivisions = 200 13804 } 13805 13806 function nl(e, t) { 13807 il.call(this), this.v1 = e, this.v2 = t 13808 } 13809 13810 function rl() { 13811 il.call(this), this.curves = [], this.autoClose = !1 13812 } 13813 13814 function ol(e, t, i, n, r, o, a, s) { 13815 il.call(this), this.aX = e, this.aY = t, this.xRadius = i, this.yRadius = n, this.aStartAngle = r, this.aEndAngle = o, this.aClockwise = a, this.aRotation = s || 0 13816 } 13817 13818 function al(e) { 13819 il.call(this), this.points = void 0 === e ? [] : e 13820 } 13821 13822 function sl(e, t, i, n) { 13823 il.call(this), this.v0 = e, this.v1 = t, this.v2 = i, this.v3 = n 13824 } 13825 13826 function ll(e, t, i) { 13827 il.call(this), this.v0 = e, this.v1 = t, this.v2 = i 13828 } 13829 Object.assign(il.prototype, { 13830 getPoint: function() { 13831 return console.warn("THREE.Curve: .getPoint() not implemented."), null 13832 }, 13833 getPointAt: function(e) { 13834 var t = this.getUtoTmapping(e); 13835 return this.getPoint(t) 13836 }, 13837 getPoints: function(e) { 13838 void 0 === e && (e = 5); 13839 for (var t = [], i = 0; i <= e; i++) t.push(this.getPoint(i / e)); 13840 return t 13841 }, 13842 getSpacedPoints: function(e) { 13843 void 0 === e && (e = 5); 13844 for (var t = [], i = 0; i <= e; i++) t.push(this.getPointAt(i / e)); 13845 return t 13846 }, 13847 getLength: function() { 13848 var e = this.getLengths(); 13849 return e[e.length - 1] 13850 }, 13851 getLengths: function(e) { 13852 if (void 0 === e && (e = this.arcLengthDivisions), this.cacheArcLengths && this.cacheArcLengths.length === e + 1 && !this.needsUpdate) return this.cacheArcLengths; 13853 this.needsUpdate = !1; 13854 var t, i, n = [], 13855 r = this.getPoint(0), 13856 o = 0; 13857 for (n.push(0), i = 1; i <= e; i++) o += (t = this.getPoint(i / e)).distanceTo(r), n.push(o), r = t; 13858 return this.cacheArcLengths = n 13859 }, 13860 updateArcLengths: function() { 13861 this.needsUpdate = !0, this.getLengths() 13862 }, 13863 getUtoTmapping: function(e, t) { 13864 var i, n = this.getLengths(), 13865 r = 0, 13866 o = n.length; 13867 i = t || e * n[o - 1]; 13868 for (var a, s = 0, l = o - 1; s <= l;) 13869 if ((a = n[r = Math.floor(s + (l - s) / 2)] - i) < 0) s = r + 1; 13870 else { 13871 if (!(0 < a)) { 13872 l = r; 13873 break 13874 } 13875 l = r - 1 13876 } 13877 if (n[r = l] === i) return r / (o - 1); 13878 var c = n[r]; 13879 return (r + (i - c) / (n[r + 1] - c)) / (o - 1) 13880 }, 13881 getTangent: function(e) { 13882 var t = e - 1e-4, 13883 i = e + 1e-4; 13884 t < 0 && (t = 0), 1 < i && (i = 1); 13885 var n = this.getPoint(t); 13886 return this.getPoint(i).clone().sub(n).normalize() 13887 }, 13888 getTangentAt: function(e) { 13889 var t = this.getUtoTmapping(e); 13890 return this.getTangent(t) 13891 }, 13892 computeFrenetFrames: function(e, t) { 13893 var i, n, r, o = new Dt, 13894 a = [], 13895 s = [], 13896 l = [], 13897 c = new Dt, 13898 u = new It; 13899 for (i = 0; i <= e; i++) n = i / e, a[i] = this.getTangentAt(n), a[i].normalize(); 13900 s[0] = new Dt, l[0] = new Dt; 13901 var h = Number.MAX_VALUE, 13902 d = Math.abs(a[0].x), 13903 p = Math.abs(a[0].y), 13904 f = Math.abs(a[0].z); 13905 for (d <= h && (h = d, o.set(1, 0, 0)), p <= h && (h = p, o.set(0, 1, 0)), f <= h && o.set(0, 0, 1), c.crossVectors(a[0], o).normalize(), s[0].crossVectors(a[0], c), l[0].crossVectors(a[0], s[0]), i = 1; i <= e; i++) s[i] = s[i - 1].clone(), l[i] = l[i - 1].clone(), c.crossVectors(a[i - 1], a[i]), c.length() > Number.EPSILON && (c.normalize(), r = Math.acos(st.clamp(a[i - 1].dot(a[i]), -1, 1)), s[i].applyMatrix4(u.makeRotationAxis(c, r))), l[i].crossVectors(a[i], s[i]); 13906 if (!0 === t) 13907 for (r = Math.acos(st.clamp(s[0].dot(s[e]), -1, 1)), r /= e, 0 < a[0].dot(c.crossVectors(s[0], s[e])) && (r = -r), i = 1; i <= e; i++) s[i].applyMatrix4(u.makeRotationAxis(a[i], r * i)), l[i].crossVectors(a[i], s[i]); 13908 return { 13909 tangents: a, 13910 normals: s, 13911 binormals: l 13912 } 13913 } 13914 }), ((nl.prototype = Object.create(il.prototype)).constructor = nl).prototype.isLineCurve = !0, nl.prototype.getPoint = function(e) { 13915 if (1 === e) return this.v2.clone(); 13916 var t = this.v2.clone().sub(this.v1); 13917 return t.multiplyScalar(e).add(this.v1), t 13918 }, nl.prototype.getPointAt = function(e) { 13919 return this.getPoint(e) 13920 }, nl.prototype.getTangent = function(e) { 13921 return this.v2.clone().sub(this.v1).normalize() 13922 }, rl.prototype = Object.assign(Object.create(il.prototype), { 13923 constructor: rl, 13924 add: function(e) { 13925 this.curves.push(e) 13926 }, 13927 closePath: function() { 13928 var e = this.curves[0].getPoint(0), 13929 t = this.curves[this.curves.length - 1].getPoint(1); 13930 e.equals(t) || this.curves.push(new nl(t, e)) 13931 }, 13932 getPoint: function(e) { 13933 for (var t = e * this.getLength(), i = this.getCurveLengths(), n = 0; n < i.length;) { 13934 if (i[n] >= t) { 13935 var r = i[n] - t, 13936 o = this.curves[n], 13937 a = o.getLength(), 13938 s = 0 === a ? 0 : 1 - r / a; 13939 return o.getPointAt(s) 13940 } 13941 n++ 13942 } 13943 return null 13944 }, 13945 getLength: function() { 13946 var e = this.getCurveLengths(); 13947 return e[e.length - 1] 13948 }, 13949 updateArcLengths: function() { 13950 this.needsUpdate = !0, this.cacheLengths = null, this.getCurveLengths() 13951 }, 13952 getCurveLengths: function() { 13953 if (this.cacheLengths && this.cacheLengths.length === this.curves.length) return this.cacheLengths; 13954 for (var e = [], t = 0, i = 0, n = this.curves.length; i < n; i++) t += this.curves[i].getLength(), e.push(t); 13955 return this.cacheLengths = e 13956 }, 13957 getSpacedPoints: function(e) { 13958 void 0 === e && (e = 40); 13959 for (var t = [], i = 0; i <= e; i++) t.push(this.getPoint(i / e)); 13960 return this.autoClose && t.push(t[0]), t 13961 }, 13962 getPoints: function(e) { 13963 e = e || 12; 13964 for (var t, i = [], n = 0, r = this.curves; n < r.length; n++) 13965 for (var o = r[n], a = o && o.isEllipseCurve ? 2 * e : o && o.isLineCurve ? 1 : o && o.isSplineCurve ? e * o.points.length : e, s = o.getPoints(a), l = 0; l < s.length; l++) { 13966 var c = s[l]; 13967 t && t.equals(c) || (i.push(c), t = c) 13968 } 13969 return this.autoClose && 1 < i.length && !i[i.length - 1].equals(i[0]) && i.push(i[0]), i 13970 }, 13971 createPointsGeometry: function(e) { 13972 var t = this.getPoints(e); 13973 return this.createGeometry(t) 13974 }, 13975 createSpacedPointsGeometry: function(e) {
13976 var t = this.getSpacedPoints(e); 13977 return this.createGeometry(t) 13978 }, 13979 createGeometry: function(e) { 13980 for (var t = new Mr, i = 0, n = e.length; i < n; i++) { 13981 var r = e[i]; 13982 t.vertices.push(new Dt(r.x, r.y, r.z || 0)) 13983 } 13984 return t 13985 } 13986 }), ((ol.prototype = Object.create(il.prototype)).constructor = ol).prototype.isEllipseCurve = !0, ol.prototype.getPoint = function(e) { 13987 for (var t = 2 * Math.PI, i = this.aEndAngle - this.aStartAngle, n = Math.abs(i) < Number.EPSILON; i < 0;) i += t; 13988 for (; t < i;) i -= t; 13989 i < Number.EPSILON && (i = n ? 0 : t), !0 !== this.aClockwise || n || (i === t ? i = -t : i -= t); 13990 var r = this.aStartAngle + e * i, 13991 o = this.aX + this.xRadius * Math.cos(r), 13992 a = this.aY + this.yRadius * Math.sin(r); 13993 if (0 !== this.aRotation) { 13994 var s = Math.cos(this.aRotation), 13995 l = Math.sin(this.aRotation), 13996 c = o - this.aX, 13997 u = a - this.aY; 13998 o = c * s - u * l + this.aX, a = c * l + u * s + this.aY 13999 } 14000 return new lt(o, a) 14001 }, ((al.prototype = Object.create(il.prototype)).constructor = al).prototype.isSplineCurve = !0, al.prototype.getPoint = function(e) { 14002 var t = this.points, 14003 i = (t.length - 1) * e, 14004 n = Math.floor(i), 14005 r = i - n, 14006 o = t[0 === n ? n : n - 1], 14007 a = t[n], 14008 s = t[n > t.length - 2 ? t.length - 1 : n + 1], 14009 l = t[n > t.length - 3 ? t.length - 1 : n + 2]; 14010 return new lt(Ks(r, o.x, a.x, s.x, l.x), Ks(r, o.y, a.y, s.y, l.y)) 14011 }, ((sl.prototype = Object.create(il.prototype)).constructor = sl).prototype.getPoint = function(e) { 14012 var t = this.v0, 14013 i = this.v1, 14014 n = this.v2, 14015 r = this.v3; 14016 return new lt(tl(e, t.x, i.x, n.x, r.x), tl(e, t.y, i.y, n.y, r.y)) 14017 }, ((ll.prototype = Object.create(il.prototype)).constructor = ll).prototype.getPoint = function(e) { 14018 var t = this.v0, 14019 i = this.v1, 14020 n = this.v2; 14021 return new lt(el(e, t.x, i.x, n.x), el(e, t.y, i.y, n.y)) 14022 }; 14023 var cl, ul = Object.assign(Object.create(rl.prototype), { 14024 fromPoints: function(e) { 14025 this.moveTo(e[0].x, e[0].y); 14026 for (var t = 1, i = e.length; t < i; t++) this.lineTo(e[t].x, e[t].y) 14027 }, 14028 moveTo: function(e, t) { 14029 this.currentPoint.set(e, t) 14030 }, 14031 lineTo: function(e, t) { 14032 var i = new nl(this.currentPoint.clone(), new lt(e, t)); 14033 this.curves.push(i), this.currentPoint.set(e, t) 14034 }, 14035 quadraticCurveTo: function(e, t, i, n) { 14036 var r = new ll(this.currentPoint.clone(), new lt(e, t), new lt(i, n)); 14037 this.curves.push(r), this.currentPoint.set(i, n) 14038 }, 14039 bezierCurveTo: function(e, t, i, n, r, o) { 14040 var a = new sl(this.currentPoint.clone(), new lt(e, t), new lt(i, n), new lt(r, o)); 14041 this.curves.push(a), this.currentPoint.set(r, o) 14042 }, 14043 splineThru: function(e) { 14044 var t = new al([this.currentPoint.clone()].concat(e)); 14045 this.curves.push(t), this.currentPoint.copy(e[e.length - 1]) 14046 }, 14047 arc: function(e, t, i, n, r, o) { 14048 var a = this.currentPoint.x, 14049 s = this.currentPoint.y; 14050 this.absarc(e + a, t + s, i, n, r, o) 14051 }, 14052 absarc: function(e, t, i, n, r, o) { 14053 this.absellipse(e, t, i, i, n, r, o) 14054 }, 14055 ellipse: function(e, t, i, n, r, o, a, s) { 14056 var l = this.currentPoint.x, 14057 c = this.currentPoint.y; 14058 this.absellipse(e + l, t + c, i, n, r, o, a, s) 14059 }, 14060 absellipse: function(e, t, i, n, r, o, a, s) { 14061 var l = new ol(e, t, i, n, r, o, a, s); 14062 if (0 < this.curves.length) { 14063 var c = l.getPoint(0); 14064 c.equals(this.currentPoint) || this.lineTo(c.x, c.y) 14065 } 14066 this.curves.push(l); 14067 var u = l.getPoint(1); 14068 this.currentPoint.copy(u) 14069 } 14070 }); 14071 14072 function hl(e) { 14073 rl.call(this), this.currentPoint = new lt, e && this.fromPoints(e) 14074 } 14075 14076 function dl() { 14077 hl.apply(this, arguments), this.holes = [] 14078 } 14079 14080 function pl() { 14081 this.subPaths = [], this.currentPath = null 14082 } 14083 14084 function fl(e) { 14085 this.data = e 14086 } 14087 14088 function ml(e) { 14089 this.manager = void 0 !== e ? e : as 14090 }(hl.prototype = ul).constructor = hl, dl.prototype = Object.assign(Object.create(ul), { 14091 constructor: dl, 14092 getPointsHoles: function(e) { 14093 for (var t = [], i = 0, n = this.holes.length; i < n; i++) t[i] = this.holes[i].getPoints(e); 14094 return t 14095 }, 14096 extractAllPoints: function(e) { 14097 return { 14098 shape: this.getPoints(e), 14099 holes: this.getPointsHoles(e) 14100 } 14101 }, 14102 extractPoints: function(e) { 14103 return this.extractAllPoints(e) 14104 } 14105 }), Object.assign(pl.prototype, { 14106 moveTo: function(e, t) { 14107 this.currentPath = new hl, this.subPaths.push(this.currentPath), this.currentPath.moveTo(e, t) 14108 }, 14109 lineTo: function(e, t) { 14110 this.currentPath.lineTo(e, t) 14111 }, 14112 quadraticCurveTo: function(e, t, i, n) { 14113 this.currentPath.quadraticCurveTo(e, t, i, n) 14114 }, 14115 bezierCurveTo: function(e, t, i, n, r, o) { 14116 this.currentPath.bezierCurveTo(e, t, i, n, r, o) 14117 }, 14118 splineThru: function(e) { 14119 this.currentPath.splineThru(e) 14120 }, 14121 toShapes: function(e, t) { 14122 function i(e) { 14123 for (var t = [], i = 0, n = e.length; i < n; i++) { 14124 var r = e[i], 14125 o = new dl; 14126 o.curves = r.curves, t.push(o) 14127 } 14128 return t 14129 } 14130 14131 function n(e, t) { 14132 for (var i = t.length, n = !1, r = i - 1, o = 0; o < i; r = o++) { 14133 var a = t[r], 14134 s = t[o], 14135 l = s.x - a.x, 14136 c = s.y - a.y; 14137 if (Math.abs(c) > Number.EPSILON) { 14138 if (c < 0 && (a = t[o], l = -l, s = t[r], c = -c), e.y < a.y || e.y > s.y) continue; 14139 if (e.y === a.y) { 14140 if (e.x === a.x) return !0 14141 } else { 14142 var u = c * (e.x - a.x) - l * (e.y - a.y); 14143 if (0 === u) return !0; 14144 if (u < 0) continue; 14145 n = !n 14146 } 14147 } else { 14148 if (e.y !== a.y) continue; 14149 if (s.x <= e.x && e.x <= a.x || a.x <= e.x && e.x <= s.x) return !0 14150 } 14151 } 14152 return n 14153 } 14154 var r = Ca.isClockWise, 14155 o = this.subPaths; 14156 if (0 === o.length) return []; 14157 if (!0 === t) return i(o); 14158 var a, s, l, c = []; 14159 if (1 === o.length) return s = o[0], (l = new dl).curves = s.curves, c.push(l), c;
14160 var u = !r(o[0].getPoints()); 14161 u = e ? !u : u; 14162 var h, d, p = [], 14163 f = [], 14164 m = [], 14165 g = 0; 14166 f[g] = void 0, m[g] = []; 14167 for (var v = 0, y = o.length; v < y; v++) a = r(h = (s = o[v]).getPoints()), (a = e ? !a : a) ? (!u && f[g] && g++, f[g] = { 14168 s: new dl, 14169 p: h 14170 }, f[g].s.curves = s.curves, u && g++, m[g] = []) : m[g].push({ 14171 h: s, 14172 p: h[0] 14173 }); 14174 if (!f[0]) return i(o); 14175 if (1 < f.length) { 14176 for (var b = !1, w = [], x = 0, _ = f.length; x < _; x++) p[x] = []; 14177 for (x = 0, _ = f.length; x < _; x++) 14178 for (var T = m[x], E = 0; E < T.length; E++) { 14179 for (var M = T[E], S = !0, C = 0; C < f.length; C++) n(M.p, f[C].p) && (x !== C && w.push({ 14180 froms: x, 14181 tos: C, 14182 hole: E 14183 }), S ? (S = !1, p[C].push(M)) : b = !0); 14184 S && p[x].push(M) 14185 } 14186 0 < w.length && (b || (m = p)) 14187 } 14188 v = 0; 14189 for (var A = f.length; v < A; v++) { 14190 l = f[v].s, c.push(l); 14191 for (var R = 0, L = (d = m[v]).length; R < L; R++) l.holes.push(d[R].h) 14192 } 14193 return c 14194 } 14195 }), Object.assign(fl.prototype, { 14196 isFont: !0, 14197 generateShapes: function(e, u, T) { 14198 function h(e, t, i, n) { 14199 var r = E.glyphs[e] || E.glyphs["?"]; 14200 if (r) { 14201 var o, a, s, l, c, u, h, d, p, f, m, g = new pl, 14202 v = []; 14203 if (r.o) 14204 for (var y = r._cachedOutline || (r._cachedOutline = r.o.split(" ")), b = 0, w = y.length; b < w;) { 14205 switch (y[b++]) { 14206 case "m": 14207 o = y[b++] * t + i, a = y[b++] * t + n, g.moveTo(o, a); 14208 break; 14209 case "l": 14210 o = y[b++] * t + i, a = y[b++] * t + n, g.lineTo(o, a); 14211 break; 14212 case "q": 14213 if (s = y[b++] * t + i, l = y[b++] * t + n, h = y[b++] * t + i, d = y[b++] * t + n, g.quadraticCurveTo(h, d, s, l), m = v[v.length - 1]) { 14214 c = m.x, u = m.y; 14215 for (var x = 1; x <= T; x++) { 14216 el(_ = x / T, c, h, s), el(_, u, d, l) 14217 } 14218 } 14219 break; 14220 case "b": 14221 if (s = y[b++] * t + i, l = y[b++] * t + n, h = y[b++] * t + i, d = y[b++] * t + n, p = y[b++] * t + i, f = y[b++] * t + n, g.bezierCurveTo(h, d, p, f, s, l), m = v[v.length - 1]) { 14222 c = m.x, u = m.y; 14223 for (x = 1; x <= T; x++) { 14224 var _; 14225 tl(_ = x / T, c, h, p, s), tl(_, u, d, f, l) 14226 } 14227 } 14228 } 14229 } 14230 return { 14231 offsetX: r.ha * t, 14232 path: g 14233 } 14234 } 14235 } 14236 void 0 === u && (u = 100), void 0 === T && (T = 4); 14237 for (var E = this.data, t = function(e) { 14238 for (var t = String(e).split(""), i = u / E.resolution, n = (E.boundingBox.yMax - E.boundingBox.yMin + E.underlineThickness) * i, r = 0, o = 0, a = [], s = 0; s < t.length; s++) { 14239 var l = t[s]; 14240 if ("\n" === l) r = 0, o -= n; 14241 else { 14242 var c = h(l, i, r, o); 14243 r += c.offsetX, a.push(c.path) 14244 } 14245 } 14246 return a 14247 }(e), i = [], n = 0, r = t.length; n < r;
vendor: 12,726 bytes, lines 14247-14546
14247 n++) Array.prototype.push.apply(i, t[n].toShapes()); 14248 return i 14249 } 14250 }), Object.assign(ml.prototype, { 14251 load: function(e, n, t, i) { 14252 var r = this; 14253 new ss(this.manager).load(e, function(t) { 14254 var i; 14255 try { 14256 i = JSON.parse(t) 14257 } catch (e) { 14258 console.warn("THREE.FontLoader: typeface.js support is being deprecated. Use typeface.json instead."), i = JSON.parse(t.substring(65, t.length - 2)) 14259 } 14260 var e = r.parse(i); 14261 n && n(e) 14262 }, t, i) 14263 }, 14264 parse: function(e) { 14265 return new fl(e) 14266 } 14267 }); 14268 var gl, vl, yl, bl, wl, xl, _l, Tl, El, Ml, Sl, Cl, Al, Rl, Ll, Pl, kl, Ol, Dl, Il, zl, Nl, Fl, Ul, Bl, Hl, $l, jl, Gl, Vl, Wl, ql, Xl, Yl, Zl, Ql, Jl, Kl, ec, tc = { 14269 getContext: function() { 14270 return void 0 === cl && (cl = new(window.AudioContext || window.webkitAudioContext)), cl 14271 }, 14272 setContext: function(e) { 14273 cl = e 14274 } 14275 }; 14276 14277 function ic(e) { 14278 this.manager = void 0 !== e ? e : as 14279 } 14280 14281 function nc() { 14282 this.type = "StereoCamera", this.aspect = 1, this.eyeSep = .064, this.cameraL = new zn, this.cameraL.layers.enable(1), this.cameraL.matrixAutoUpdate = !1, this.cameraR = new zn, this.cameraR.layers.enable(2), this.cameraR.matrixAutoUpdate = !1 14283 } 14284 14285 function rc(e, t, i) { 14286 On.call(this), this.type = "CubeCamera"; 14287 var r = new zn(90, 1, e, t); 14288 r.up.set(0, -1, 0), r.lookAt(new Dt(1, 0, 0)), this.add(r); 14289 var o = new zn(90, 1, e, t); 14290 o.up.set(0, -1, 0), o.lookAt(new Dt(-1, 0, 0)), this.add(o); 14291 var a = new zn(90, 1, e, t); 14292 a.up.set(0, 0, 1), a.lookAt(new Dt(0, 1, 0)), this.add(a); 14293 var s = new zn(90, 1, e, t); 14294 s.up.set(0, 0, -1), s.lookAt(new Dt(0, -1, 0)), this.add(s); 14295 var l = new zn(90, 1, e, t); 14296 l.up.set(0, -1, 0), l.lookAt(new Dt(0, 0, 1)), this.add(l); 14297 var c = new zn(90, 1, e, t); 14298 c.up.set(0, -1, 0), c.lookAt(new Dt(0, 0, -1)), this.add(c); 14299 var n = { 14300 format: Me, 14301 magFilter: R, 14302 minFilter: R 14303 }; 14304 this.renderTarget = new kt(i, i, n), this.renderTarget.texture.name = "CubeCamera", this.update = function(e, t) { 14305 null === this.parent && this.updateMatrixWorld(); 14306 var i = this.renderTarget, 14307 n = i.texture.generateMipmaps; 14308 i.texture.generateMipmaps = !1, i.activeCubeFace = 0, e.render(t, r, i), i.activeCubeFace = 1, e.render(t, o, i), i.activeCubeFace = 2, e.render(t, a, i), i.activeCubeFace = 3, e.render(t, s, i), i.activeCubeFace = 4, e.render(t, l, i), i.texture.generateMipmaps = n, i.activeCubeFace = 5, e.render(t, c, i), e.setRenderTarget(null) 14309 }, this.clear = function(e, t, i, n) { 14310 for (var r = this.renderTarget, o = 0; o < 6; o++) r.activeCubeFace = o, e.setRenderTarget(r), e.clear(t, i, n); 14311 e.setRenderTarget(null) 14312 } 14313 } 14314 14315 function oc() { 14316 On.call(this), this.type = "AudioListener", this.context = tc.getContext(), this.gain = this.context.createGain(), this.gain.connect(this.context.destination), this.filter = null 14317 } 14318 14319 function ac(e) { 14320 On.call(this), this.type = "Audio", this.context = e.context, this.gain = this.context.createGain(), this.gain.connect(e.getInput()), this.autoplay = !1, this.buffer = null, this.loop = !1, this.startTime = 0, this.playbackRate = 1, this.isPlaying = !1, this.hasPlaybackControl = !0, this.sourceType = "empty", this.filters = [] 14321 } 14322 14323 function sc(e) { 14324 ac.call(this, e), this.panner = this.context.createPanner(), this.panner.connect(this.gain) 14325 } 14326 14327 function lc(e, t) { 14328 this.analyser = e.context.createAnalyser(), this.analyser.fftSize = void 0 !== t ? t : 2048, this.data = new Uint8Array(this.analyser.frequencyBinCount), e.getOutput().connect(this.analyser) 14329 } 14330 14331 function cc(e, t, i) { 14332 this.binding = e, this.valueSize = i; 14333 var n, r = Float64Array; 14334 switch (t) { 14335 case "quaternion": 14336 n = this._slerp; 14337 break; 14338 case "string": 14339 case "bool": 14340 r = Array, n = this._select; 14341 break; 14342 default: 14343 n = this._lerp 14344 } 14345 this.buffer = new r(4 * i), this._mixBufferRegion = n, this.cumulativeWeight = 0, this.useCount = 0, this.referenceCount = 0 14346 } 14347 14348 function uc(e, t, i) { 14349 var n = i || hc.parseTrackName(t); 14350 this._targetGroup = e, this._bindings = e.subscribe_(t, n) 14351 } 14352 14353 function hc(e, t, i) { 14354 this.path = t, this.parsedPath = i || hc.parseTrackName(t), this.node = hc.findNode(e, this.parsedPath.nodeName) || e, this.rootNode = e 14355 } 14356 14357 function dc(e) { 14358 this.uuid = st.generateUUID(), this._objects = Array.prototype.slice.call(arguments), this.nCachedObjects_ = 0; 14359 var t = {}; 14360 this._indicesByUUID = t; 14361 for (var i = 0, n = arguments.length; i !== n; ++i) t[arguments[i].uuid] = i; 14362 this._paths = [], this._parsedPaths = [], this._bindings = [], this._bindingsIndicesByPath = {}; 14363 var r = this; 14364 this.stats = { 14365 objects: {get total() { 14366 return r._objects.length 14367 }, 14368 get inUse() { 14369 return this.total - r.nCachedObjects_ 14370 } 14371 }, 14372 get bindingsPerObject() { 14373 return r._bindings.length 14374 } 14375 } 14376 } 14377 14378 function pc(e, t, i) { 14379 this._mixer = e, this._clip = t, this._localRoot = i || null; 14380 for (var n = t.tracks, r = n.length, o = new Array(r), a = { 14381 endingStart: Xe, 14382 endingEnd: Xe 14383 }, s = 0; s !== r; ++s) { 14384 var l = n[s].createInterpolant(null); 14385 (o[s] = l).settings = a 14386 } 14387 this._interpolantSettings = a, this._interpolants = o, this._propertyBindings = new Array(r), this._cacheIndex = null, this._byClipCacheIndex = null, this._timeScaleInterpolant = null, this._weightInterpolant = null, this.loop = 2201, 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 14388 } 14389 14390 function fc(e) { 14391 this._root = e, this._initMemoryManager(), this._accuIndex = 0, this.time = 0, this.timeScale = 1 14392 } 14393 14394 function mc(e) { 14395 "string" == typeof e && (console.warn("THREE.Uniform: Type parameter is no longer needed."), e = arguments[1]), this.value = e 14396 } 14397 14398 function gc() { 14399 Fr.call(this), this.type = "InstancedBufferGeometry", this.maxInstancedCount = void 0 14400 } 14401 14402 function vc(e, t, i, n) { 14403 this.uuid = st.generateUUID(), this.data = e, this.itemSize = t, this.offset = i, this.normalized = !0 === n 14404 } 14405 14406 function yc(e, t) { 14407 this.uuid = st.generateUUID(), this.array = e, this.stride = t, this.count = void 0 !== e ? e.length / t : 0, this.dynamic = !1, this.updateRange = { 14408 offset: 0, 14409 count: -1 14410 }, this.onUploadCallback = function() {}, this.version = 0 14411 } 14412 14413 function bc(e, t, i) { 14414 yc.call(this, e, t), this.meshPerAttribute = i || 1 14415 } 14416 14417 function wc(e, t, i) { 14418 Sr.call(this, e, t), this.meshPerAttribute = i || 1 14419 } 14420 14421 function xc(e, t, i, n) { 14422 this.ray = new Gr(e, t), this.near = i || 0, this.far = n || 1 / 0, this.params = { 14423 Mesh: {}, 14424 Line: {}, 14425 LOD: {}, 14426 Points: { 14427 threshold: 1 14428 }, 14429 Sprite: {} 14430 }, Object.defineProperties(this.params, { 14431 PointCloud: { 14432 get: function() { 14433 return console.warn("THREE.Raycaster: params.PointCloud has been renamed to params.Points."), this.Points 14434 } 14435 } 14436 }) 14437 } 14438 14439 function _c(e, t) { 14440 return e.distance - t.distance 14441 } 14442 14443 function Tc(e, t, i, n) { 14444 if (!1 !== e.visible && (e.raycast(t, i), !0 === n)) 14445 for (var r = e.children, o = 0, a = r.length; o < a; o++) Tc(r[o], t, i, !0) 14446 } 14447 14448 function Ec(e) { 14449 this.autoStart = void 0 === e || e, this.startTime = 0, this.oldTime = 0, this.elapsedTime = 0, this.running = !1 14450 } 14451 14452 function Mc(e, t, i) { 14453 return this.radius = void 0 !== e ? e : 1, this.phi = void 0 !== t ? t : 0, this.theta = void 0 !== i ? i : 0, this 14454 } 14455 14456 function Sc(e, t, i) { 14457 return this.radius = void 0 !== e ? e : 1, this.theta = void 0 !== t ? t : 0, this.y = void 0 !== i ? i : 0, this 14458 } 14459 14460 function Cc(e) { 14461 On.call(this), this.material = e, this.render = function(e) {} 14462 } 14463 14464 function Ac(e, t, i, n) { 14465 this.object = e, this.size = void 0 !== t ? t : 1; 14466 var r = void 0 !== i ? i : 16711680, 14467 o = void 0 !== n ? n : 1, 14468 a = 0, 14469 s = this.object.geometry; 14470 s && s.isGeometry ? a = 3 * s.faces.length : s && s.isBufferGeometry && (a = s.attributes.normal.count); 14471 var l = new Fr, 14472 c = new Dr(2 * a * 3, 3); 14473 l.addAttribute("position", c), ea.call(this, l, new Jo({ 14474 color: r, 14475 linewidth: o 14476 })), this.matrixAutoUpdate = !1, this.update() 14477 } 14478 14479 function Rc(e, t) { 14480 On.call(this), this.light = e, this.light.updateMatrixWorld(), this.matrix = e.matrixWorld, this.matrixAutoUpdate = !1, this.color = t; 14481 for (var i = new Fr, n = [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], r = 0, o = 1; r < 32; r++, o++) { 14482 var a = r / 32 * Math.PI * 2, 14483 s = o / 32 * Math.PI * 2; 14484 n.push(Math.cos(a), Math.sin(a), 1, Math.cos(s), Math.sin(s), 1) 14485 } 14486 i.addAttribute("position", new Dr(n, 3)); 14487 var l = new Jo({ 14488 fog: !1 14489 }); 14490 this.cone = new ea(i, l), this.add(this.cone), this.update() 14491 } 14492 14493 function Lc(e) { 14494 for (var t = function e(t) { 14495 var i = []; 14496 t && t.isBone && i.push(t); 14497 for (var n = 0; n < t.children.length; n++) i.push.apply(i, e(t.children[n])); 14498 return i 14499 }(e), i = new Fr, n = [], r = [], o = new Ei(0, 0, 1), a = new Ei(0, 1, 0), s = 0; s < t.length; s++) { 14500 var l = t[s]; 14501 l.parent && l.parent.isBone && (n.push(0, 0, 0), n.push(0, 0, 0), r.push(o.r, o.g, o.b), r.push(a.r, a.g, a.b)) 14502 } 14503 i.addAttribute("position", new Dr(n, 3)), i.addAttribute("color", new Dr(r, 3)); 14504 var c = new Jo({ 14505 vertexColors: 2, 14506 depthTest: !1, 14507 depthWrite: !1, 14508 transparent: !0 14509 }); 14510 ea.call(this, i, c), this.root = e, this.bones = t, this.matrix = e.matrixWorld, this.matrixAutoUpdate = !1, this.onBeforeRender() 14511 } 14512 14513 function Pc(e, t, i) { 14514 this.light = e, this.light.updateMatrixWorld(), this.color = i; 14515 var n = new Oa(t, 4, 2), 14516 r = new jr({ 14517 wireframe: !0, 14518 fog: !1 14519 }); 14520 qr.call(this, n, r), this.matrix = this.light.matrixWorld, this.matrixAutoUpdate = !1, this.update() 14521 } 14522 14523 function kc(e, t) { 14524 On.call(this), this.light = e, this.light.updateMatrixWorld(), this.matrix = e.matrixWorld, this.matrixAutoUpdate = !1, this.color = t; 14525 var i = new Jo({ 14526 fog: !1 14527 }), 14528 n = new Fr; 14529 n.addAttribute("position", new Sr(new Float32Array(15), 3)), this.line = new Ko(n, i), this.add(this.line), this.update() 14530 } 14531 14532 function Oc(e, t, i) { 14533 On.call(this), this.light = e, this.light.updateMatrixWorld(), this.matrix = e.matrixWorld, this.matrixAutoUpdate = !1, this.color = i; 14534 var n = new ga(t); 14535 n.rotateY(.5 * Math.PI), this.material = new jr({ 14536 wireframe: !0, 14537 fog: !1 14538 }), void 0 === this.color && (this.material.vertexColors = 2); 14539 var r = n.getAttribute("position"), 14540 o = new Float32Array(3 * r.count); 14541 n.addAttribute("color", new Sr(o, 3)), this.add(new qr(n, this.material)), this.update() 14542 } 14543 14544 function Dc(e, t, i, n) { 14545 e = e || 10, t = t || 10, i = new Ei(void 0 !== i ? i : 4473924), n = new Ei(void 0 !== n ? n : 8947848); 14546 for (var r = t / 2, o = e / t, a = e / 2, s = [], l = [], c = 0, u = 0, h = -a;
vendor: 15,632 bytes, lines 14546-14852
14546 c <= t; c++, h += o) { 14547 s.push(-a, 0, h, a, 0, h), s.push(h, 0, -a, h, 0, a); 14548 var d = c === r ? i : n; 14549 d.toArray(l, u), u += 3, d.toArray(l, u), u += 3, d.toArray(l, u), u += 3, d.toArray(l, u), u += 3 14550 } 14551 var p = new Fr; 14552 p.addAttribute("position", new Dr(s, 3)), p.addAttribute("color", new Dr(l, 3)); 14553 var f = new Jo({ 14554 vertexColors: 2 14555 }); 14556 ea.call(this, p, f) 14557 } 14558 14559 function Ic(e, t, i, n, r, o) { 14560 e = e || 10, t = t || 16, i = i || 8, n = n || 64, r = new Ei(void 0 !== r ? r : 4473924), o = new Ei(void 0 !== o ? o : 8947848); 14561 var a, s, l, c, u, h, d, p = [], 14562 f = []; 14563 for (c = 0; c <= t; c++) l = c / t * (2 * Math.PI), a = Math.sin(l) * e, s = Math.cos(l) * e, p.push(0, 0, 0), p.push(a, 0, s), d = 1 & c ? r : o, f.push(d.r, d.g, d.b), f.push(d.r, d.g, d.b); 14564 for (c = 0; c <= i; c++) 14565 for (d = 1 & c ? r : o, h = e - e / i * c, u = 0; u < n; u++) l = u / n * (2 * Math.PI), a = Math.sin(l) * h, s = Math.cos(l) * h, p.push(a, 0, s), f.push(d.r, d.g, d.b), l = (u + 1) / n * (2 * Math.PI), a = Math.sin(l) * h, s = Math.cos(l) * h, p.push(a, 0, s), f.push(d.r, d.g, d.b); 14566 var m = new Fr; 14567 m.addAttribute("position", new Dr(p, 3)), m.addAttribute("color", new Dr(f, 3)); 14568 var g = new Jo({ 14569 vertexColors: 2 14570 }); 14571 ea.call(this, m, g) 14572 } 14573 14574 function zc(e, t, i, n) { 14575 this.object = e, this.size = void 0 !== t ? t : 1; 14576 var r = void 0 !== i ? i : 16776960, 14577 o = void 0 !== n ? n : 1, 14578 a = 0, 14579 s = this.object.geometry; 14580 s && s.isGeometry ? a = s.faces.length : console.warn("THREE.FaceNormalsHelper: only THREE.Geometry is supported. Use THREE.VertexNormalsHelper, instead."); 14581 var l = new Fr, 14582 c = new Dr(2 * a * 3, 3); 14583 l.addAttribute("position", c), ea.call(this, l, new Jo({ 14584 color: r, 14585 linewidth: o 14586 })), this.matrixAutoUpdate = !1, this.update() 14587 } 14588 14589 function Nc(e, t, i) { 14590 On.call(this), this.light = e, this.light.updateMatrixWorld(), this.matrix = e.matrixWorld, this.matrixAutoUpdate = !1, this.color = i, void 0 === t && (t = 1); 14591 var n = new Fr; 14592 n.addAttribute("position", new Dr([-t, t, 0, t, t, 0, t, -t, 0, -t, -t, 0, -t, t, 0], 3)); 14593 var r = new Jo({ 14594 fog: !1 14595 }); 14596 this.lightPlane = new Ko(n, r), this.add(this.lightPlane), (n = new Fr).addAttribute("position", new Dr([0, 0, 0, 0, 0, 1], 3)), this.targetLine = new Ko(n, r), this.add(this.targetLine), this.update() 14597 } 14598 14599 function Fc(e) { 14600 var t = new Fr, 14601 i = new Jo({ 14602 color: 16777215, 14603 vertexColors: 1 14604 }), 14605 n = [], 14606 r = [], 14607 o = {}, 14608 a = new Ei(16755200), 14609 s = new Ei(16711680), 14610 l = new Ei(43775), 14611 c = new Ei(16777215), 14612 u = new Ei(3355443); 14613 14614 function h(e, t, i) { 14615 d(e, i), d(t, i) 14616 } 14617 14618 function d(e, t) { 14619 n.push(0, 0, 0), r.push(t.r, t.g, t.b), void 0 === o[e] && (o[e] = []), o[e].push(n.length / 3 - 1) 14620 } 14621 h("n1", "n2", a), h("n2", "n4", a), h("n4", "n3", a), h("n3", "n1", a), h("f1", "f2", a), h("f2", "f4", a), h("f4", "f3", a), h("f3", "f1", a), h("n1", "f1", a), h("n2", "f2", a), h("n3", "f3", a), h("n4", "f4", a), h("p", "n1", s), h("p", "n2", s), h("p", "n3", s), h("p", "n4", s), h("u1", "u2", l), h("u2", "u3", l), h("u3", "u1", l), h("c", "t", c), h("p", "c", u), h("cn1", "cn2", u), h("cn3", "cn4", u), h("cf1", "cf2", u), h("cf3", "cf4", u), t.addAttribute("position", new Dr(n, 3)), t.addAttribute("color", new Dr(r, 3)), ea.call(this, t, i), this.camera = e, this.camera.updateProjectionMatrix && this.camera.updateProjectionMatrix(), this.matrix = e.matrixWorld, this.matrixAutoUpdate = !1, this.pointMap = o, this.update() 14622 } 14623 14624 function Uc(e, t) { 14625 this.object = e, void 0 === t && (t = 16776960); 14626 var i = 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]), 14627 n = new Float32Array(24), 14628 r = new Fr; 14629 r.setIndex(new Sr(i, 1)), r.addAttribute("position", new Sr(n, 3)), ea.call(this, r, new Jo({ 14630 color: t 14631 })), this.matrixAutoUpdate = !1, this.update() 14632 } 14633 14634 function Bc(e, t) { 14635 this.type = "Box3Helper", this.box = e; 14636 var i = void 0 !== t ? t : 16776960, 14637 n = new Uint16Array([0, 1, 1, 2, 2, 3, 3, 0, 4, 5, 5, 6, 6, 7, 7, 4, 0, 4, 1, 5, 2, 6, 3, 7]), 14638 r = new Fr; 14639 r.setIndex(new Sr(n, 1)), r.addAttribute("position", new Dr([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)), ea.call(this, r, new Jo({ 14640 color: i 14641 })), this.geometry.computeBoundingSphere(), this.onBeforeRender() 14642 } 14643 14644 function Hc(e, t, i) { 14645 this.type = "PlaneHelper", this.plane = e, this.size = void 0 === t ? 1 : t; 14646 var n = void 0 !== i ? i : 16776960, 14647 r = new Fr; 14648 r.addAttribute("position", new Dr([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, 0, 1, 0, 0, 0], 3)), r.computeBoundingSphere(), Ko.call(this, r, new Jo({ 14649 color: n 14650 })); 14651 var o = new Fr; 14652 o.addAttribute("position", new Dr([1, 1, 1, -1, 1, 1, -1, -1, 1, 1, 1, 1, -1, -1, 1, 1, -1, 1], 3)), o.computeBoundingSphere(), this.add(new qr(o, new jr({ 14653 color: n, 14654 opacity: .2, 14655 transparent: !0, 14656 depthWrite: !1 14657 }))), this.onBeforeRender() 14658 } 14659 14660 function $c(e, t, i, n, r, o) { 14661 On.call(this), void 0 === n && (n = 16776960), void 0 === i && (i = 1), void 0 === r && (r = .2 * i), void 0 === o && (o = .2 * r), void 0 === Ql && ((Ql = new Fr).addAttribute("position", new Dr([0, 0, 0, 0, 1, 0], 3)), (Jl = new $a(0, .5, 1, 5, 1)).translate(0, -.5, 0)), this.position.copy(t), this.line = new Ko(Ql, new Jo({ 14662 color: n 14663 })), this.line.matrixAutoUpdate = !1, this.add(this.line), this.cone = new qr(Jl, new jr({ 14664 color: n 14665 })), this.cone.matrixAutoUpdate = !1, this.add(this.cone), this.setDirection(e), this.setLength(i, r, o) 14666 } 14667 14668 function jc(e) { 14669 var t = [0, 0, 0, e = e || 1, 0, 0, 0, 0, 0, 0, e, 0, 0, 0, 0, 0, 0, e], 14670 i = new Fr; 14671 i.addAttribute("position", new Dr(t, 3)), i.addAttribute("color", new Dr([1, 0, 0, 1, .6, 0, 0, 1, 0, .6, 1, 0, 0, 0, 1, 0, .6, 1], 3)); 14672 var n = new Jo({ 14673 vertexColors: 2 14674 }); 14675 ea.call(this, i, n) 14676 } 14677 14678 function Gc() { 14679 var r = 0, 14680 o = 0, 14681 a = 0, 14682 s = 0; 14683 14684 function c(e, t, i, n) { 14685 a = -3 * (r = e) + 3 * t - 2 * (o = i) - n, s = 2 * e - 2 * t + i + n 14686 } 14687 return { 14688 initCatmullRom: function(e, t, i, n, r) { 14689 c(t, i, r * (i - e), r * (n - t)) 14690 }, 14691 initNonuniformCatmullRom: function(e, t, i, n, r, o, a) { 14692 var s = (t - e) / r - (i - e) / (r + o) + (i - t) / o, 14693 l = (i - t) / o - (n - t) / (o + a) + (n - i) / a; 14694 c(t, i, s *= o, l *= o) 14695 }, 14696 calc: function(e) { 14697 var t = e * e; 14698 return r + o * e + a * t + s * (t * e) 14699 } 14700 } 14701 } 14702 Object.assign(ic.prototype, { 14703 load: function(e, t, i, n) { 14704 var r = new ss(this.manager); 14705 r.setResponseType("arraybuffer"), r.load(e, function(e) { 14706 tc.getContext().decodeAudioData(e, function(e) { 14707 t(e) 14708 }) 14709 }, i, n) 14710 } 14711 }), Object.assign(nc.prototype, { 14712 update: (El = new It, Ml = new It, function(e) { 14713 if (gl !== this || vl !== e.focus || yl !== e.fov || bl !== e.aspect * this.aspect || wl !== e.near || xl !== e.far || _l !== e.zoom || Tl !== this.eyeSep) { 14714 gl = this, vl = e.focus, yl = e.fov, bl = e.aspect * this.aspect, wl = e.near, xl = e.far, _l = e.zoom; 14715 var t, i, n = e.projectionMatrix.clone(), 14716 r = (Tl = this.eyeSep / 2) * wl / vl, 14717 o = wl * Math.tan(st.DEG2RAD * yl * .5) / _l; 14718 Ml.elements[12] = -Tl, El.elements[12] = Tl, t = -o * bl + r, i = o * bl + r, n.elements[0] = 2 * wl / (i - t), n.elements[8] = (i + t) / (i - t), this.cameraL.projectionMatrix.copy(n), t = -o * bl - r, i = o * bl - r, n.elements[0] = 2 * wl / (i - t), n.elements[8] = (i + t) / (i - t), this.cameraR.projectionMatrix.copy(n) 14719 } 14720 this.cameraL.matrixWorld.copy(e.matrixWorld).multiply(Ml), this.cameraR.matrixWorld.copy(e.matrixWorld).multiply(El) 14721 }) 14722 }), (rc.prototype = Object.create(On.prototype)).constructor = rc, oc.prototype = Object.assign(Object.create(On.prototype), { 14723 constructor: oc, 14724 getInput: function() { 14725 return this.gain 14726 }, 14727 removeFilter: function() { 14728 null !== this.filter && (this.gain.disconnect(this.filter), this.filter.disconnect(this.context.destination), this.gain.connect(this.context.destination), this.filter = null) 14729 }, 14730 getFilter: function() { 14731 return this.filter 14732 }, 14733 setFilter: function(e) { 14734 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) 14735 }, 14736 getMasterVolume: function() { 14737 return this.gain.gain.value 14738 }, 14739 setMasterVolume: function(e) { 14740 this.gain.gain.value = e 14741 }, 14742 updateMatrixWorld: (Sl = new Dt, Cl = new Ot, Al = new Dt, Rl = new Dt, function(e) { 14743 On.prototype.updateMatrixWorld.call(this, e); 14744 var t = this.context.listener, 14745 i = this.up; 14746 this.matrixWorld.decompose(Sl, Cl, Al), Rl.set(0, 0, -1).applyQuaternion(Cl), t.positionX ? (t.positionX.setValueAtTime(Sl.x, this.context.currentTime), t.positionY.setValueAtTime(Sl.y, this.context.currentTime), t.positionZ.setValueAtTime(Sl.z, this.context.currentTime), t.forwardX.setValueAtTime(Rl.x, this.context.currentTime), t.forwardY.setValueAtTime(Rl.y, this.context.currentTime), t.forwardZ.setValueAtTime(Rl.z, this.context.currentTime), t.upX.setValueAtTime(i.x, this.context.currentTime), t.upY.setValueAtTime(i.y, this.context.currentTime), t.upZ.setValueAtTime(i.z, this.context.currentTime)) : (t.setPosition(Sl.x, Sl.y, Sl.z), t.setOrientation(Rl.x, Rl.y, Rl.z, i.x, i.y, i.z)) 14747 }) 14748 }), ac.prototype = Object.assign(Object.create(On.prototype), { 14749 constructor: ac, 14750 getOutput: function() { 14751 return this.gain 14752 }, 14753 setNodeSource: function(e) { 14754 return this.hasPlaybackControl = !1, this.sourceType = "audioNode", this.source = e, this.connect(), this 14755 }, 14756 setBuffer: function(e) { 14757 return this.buffer = e, this.sourceType = "buffer", this.autoplay && this.play(), this 14758 }, 14759 play: function() { 14760 if (!0 !== this.isPlaying) { 14761 if (!1 !== this.hasPlaybackControl) { 14762 var e = this.context.createBufferSource(); 14763 return e.buffer = this.buffer, e.loop = this.loop, e.onended = this.onEnded.bind(this), e.playbackRate.setValueAtTime(this.playbackRate, this.startTime), e.start(0, this.startTime), this.isPlaying = !0, this.source = e, this.connect() 14764 } 14765 console.warn("THREE.Audio: this Audio has no playback control.") 14766 } else console.warn("THREE.Audio: Audio is already playing.") 14767 }, 14768 pause: function() { 14769 if (!1 !== this.hasPlaybackControl) return this.source.stop(), this.startTime = this.context.currentTime, this.isPlaying = !1, this; 14770 console.warn("THREE.Audio: this Audio has no playback control.") 14771 }, 14772 stop: function() { 14773 if (!1 !== this.hasPlaybackControl) return this.source.stop(), this.startTime = 0, this.isPlaying = !1, this; 14774 console.warn("THREE.Audio: this Audio has no playback control.") 14775 }, 14776 connect: function() { 14777 if (0 < this.filters.length) { 14778 this.source.connect(this.filters[0]); 14779 for (var e = 1, t = this.filters.length; e < t; e++) this.filters[e - 1].connect(this.filters[e]); 14780 this.filters[this.filters.length - 1].connect(this.getOutput()) 14781 } else this.source.connect(this.getOutput()); 14782 return this 14783 }, 14784 disconnect: function() { 14785 if (0 < this.filters.length) { 14786 this.source.disconnect(this.filters[0]); 14787 for (var e = 1, t = this.filters.length; e < t; e++) this.filters[e - 1].disconnect(this.filters[e]); 14788 this.filters[this.filters.length - 1].disconnect(this.getOutput()) 14789 } else this.source.disconnect(this.getOutput()); 14790 return this 14791 }, 14792 getFilters: function() { 14793 return this.filters 14794 }, 14795 setFilters: function(e) { 14796 return e || (e = []), !0 === this.isPlaying ? (this.disconnect(), this.filters = e, this.connect()) : this.filters = e, this 14797 }, 14798 getFilter: function() { 14799 return this.getFilters()[0] 14800 }, 14801 setFilter: function(e) { 14802 return this.setFilters(e ? [e] : []) 14803 }, 14804 setPlaybackRate: function(e) { 14805 if (!1 !== this.hasPlaybackControl) return this.playbackRate = e, !0 === this.isPlaying && this.source.playbackRate.setValueAtTime(this.playbackRate, this.context.currentTime), this; 14806 console.warn("THREE.Audio: this Audio has no playback control.") 14807 }, 14808 getPlaybackRate: function() { 14809 return this.playbackRate 14810 }, 14811 onEnded: function() { 14812 this.isPlaying = !1 14813 }, 14814 getLoop: function() { 14815 return !1 === this.hasPlaybackControl ? (console.warn("THREE.Audio: this Audio has no playback control."), !1) : this.loop 14816 }, 14817 setLoop: function(e) { 14818 if (!1 !== this.hasPlaybackControl) return this.loop = e, !0 === this.isPlaying && (this.source.loop = this.loop), this; 14819 console.warn("THREE.Audio: this Audio has no playback control.") 14820 }, 14821 getVolume: function() { 14822 return this.gain.gain.value 14823 }, 14824 setVolume: function(e) { 14825 return this.gain.gain.value = e, this 14826 } 14827 }), sc.prototype = Object.assign(Object.create(ac.prototype), { 14828 constructor: sc, 14829 getOutput: function() { 14830 return this.panner 14831 }, 14832 getRefDistance: function() { 14833 return this.panner.refDistance 14834 }, 14835 setRefDistance: function(e) { 14836 this.panner.refDistance = e 14837 }, 14838 getRolloffFactor: function() { 14839 return this.panner.rolloffFactor 14840 }, 14841 setRolloffFactor: function(e) { 14842 this.panner.rolloffFactor = e 14843 }, 14844 getDistanceModel: function() { 14845 return this.panner.distanceModel 14846 }, 14847 setDistanceModel: function(e) { 14848 this.panner.distanceModel = e 14849 }, 14850 getMaxDistance: function() { 14851 return this.panner.maxDistance 14852 },
vendor: 9,039 bytes, lines 14853-15064
14853 setMaxDistance: function(e) { 14854 this.panner.maxDistance = e 14855 }, 14856 updateMatrixWorld: (Ll = new Dt, function(e) { 14857 On.prototype.updateMatrixWorld.call(this, e), Ll.setFromMatrixPosition(this.matrixWorld), this.panner.setPosition(Ll.x, Ll.y, Ll.z) 14858 }) 14859 }), Object.assign(lc.prototype, { 14860 getFrequencyData: function() { 14861 return this.analyser.getByteFrequencyData(this.data), this.data 14862 }, 14863 getAverageFrequency: function() { 14864 for (var e = 0, t = this.getFrequencyData(), i = 0; i < t.length; i++) e += t[i]; 14865 return e / t.length 14866 } 14867 }), Object.assign(cc.prototype, { 14868 accumulate: function(e, t) { 14869 var i = this.buffer, 14870 n = this.valueSize, 14871 r = e * n + n, 14872 o = this.cumulativeWeight; 14873 if (0 === o) { 14874 for (var a = 0; a !== n; ++a) i[r + a] = i[a]; 14875 o = t 14876 } else { 14877 var s = t / (o += t); 14878 this._mixBufferRegion(i, r, 0, s, n) 14879 } 14880 this.cumulativeWeight = o 14881 }, 14882 apply: function(e) { 14883 var t = this.valueSize, 14884 i = this.buffer, 14885 n = e * t + t, 14886 r = this.cumulativeWeight, 14887 o = this.binding; 14888 if (this.cumulativeWeight = 0, r < 1) { 14889 var a = 3 * t; 14890 this._mixBufferRegion(i, n, a, 1 - r, t) 14891 } 14892 for (var s = t, l = t + t; s !== l; ++s) 14893 if (i[s] !== i[s + t]) { 14894 o.setValue(i, n); 14895 break 14896 } 14897 }, 14898 saveOriginalState: function() { 14899 var e = this.binding, 14900 t = this.buffer, 14901 i = this.valueSize, 14902 n = 3 * i; 14903 e.getValue(t, n); 14904 for (var r = i, o = n; r !== o; ++r) t[r] = t[n + r % i]; 14905 this.cumulativeWeight = 0 14906 }, 14907 restoreOriginalState: function() { 14908 var e = 3 * this.valueSize; 14909 this.binding.setValue(this.buffer, e) 14910 }, 14911 _select: function(e, t, i, n, r) { 14912 if (.5 <= n) 14913 for (var o = 0; o !== r; ++o) e[t + o] = e[i + o] 14914 }, 14915 _slerp: function(e, t, i, n) { 14916 Ot.slerpFlat(e, t, e, t, e, i, n) 14917 }, 14918 _lerp: function(e, t, i, n, r) { 14919 for (var o = 1 - n, a = 0; a !== r; ++a) { 14920 var s = t + a; 14921 e[s] = e[s] * o + e[i + a] * n 14922 } 14923 } 14924 }), Object.assign(uc.prototype, { 14925 getValue: function(e, t) { 14926 this.bind(); 14927 var i = this._targetGroup.nCachedObjects_, 14928 n = this._bindings[i]; 14929 void 0 !== n && n.getValue(e, t) 14930 }, 14931 setValue: function(e, t) { 14932 for (var i = this._bindings, n = this._targetGroup.nCachedObjects_, r = i.length; n !== r; ++n) i[n].setValue(e, t) 14933 }, 14934 bind: function() { 14935 for (var e = this._bindings, t = this._targetGroup.nCachedObjects_, i = e.length; t !== i; ++t) e[t].bind() 14936 }, 14937 unbind: function() { 14938 for (var e = this._bindings, t = this._targetGroup.nCachedObjects_, i = e.length; t !== i; ++t) e[t].unbind() 14939 } 14940 }), Object.assign(hc, { 14941 Composite: uc, 14942 create: function(e, t, i) { 14943 return e && e.isAnimationObjectGroup ? new hc.Composite(e, t, i) : new hc(e, t, i) 14944 }, 14945 sanitizeNodeName: function(e) { 14946 return e.replace(/\s/g, "_").replace(/[^\w-]/g, "") 14947 }, 14948 parseTrackName: (Pl = new RegExp("^" + /((?:[\w-]+[\/:])*)/.source + /([\w-\.]+)?/.source + /(?:\.([\w-]+)(?:\[(.+)\])?)?/.source + /\.([\w-]+)(?:\[(.+)\])?/.source + "$"), kl = ["material", "materials", "bones"], function(e) { 14949 var t = Pl.exec(e); 14950 if (!t) throw new Error("PropertyBinding: Cannot parse trackName: " + e); 14951 var i = { 14952 nodeName: t[2], 14953 objectName: t[3], 14954 objectIndex: t[4], 14955 propertyName: t[5], 14956 propertyIndex: t[6] 14957 }, 14958 n = i.nodeName && i.nodeName.lastIndexOf("."); 14959 if (void 0 !== n && -1 !== n) { 14960 var r = i.nodeName.substring(n + 1); - 1 !== kl.indexOf(r) && (i.nodeName = i.nodeName.substring(0, n), i.objectName = r) 14961 } 14962 if (null === i.propertyName || 0 === i.propertyName.length) throw new Error("PropertyBinding: can not parse propertyName from trackName: " + e); 14963 return i 14964 }), 14965 findNode: function(e, r) { 14966 if (!r || "" === r || "root" === r || "." === r || -1 === r || r === e.name || r === e.uuid) return e; 14967 if (e.skeleton) { 14968 var t = function(e) { 14969 for (var t = 0; t < e.bones.length; t++) { 14970 var i = e.bones[t]; 14971 if (i.name === r) return i 14972 } 14973 return null 14974 }(e.skeleton); 14975 if (t) return t 14976 } 14977 if (e.children) { 14978 var o = function(e) { 14979 for (var t = 0; t < e.length; t++) { 14980 var i = e[t]; 14981 if (i.name === r || i.uuid === r) return i; 14982 var n = o(i.children); 14983 if (n) return n 14984 } 14985 return null 14986 }, 14987 i = o(e.children); 14988 if (i) return i 14989 } 14990 return null 14991 } 14992 }), Object.assign(hc.prototype, { 14993 _getValue_unavailable: function() {}, 14994 _setValue_unavailable: function() {}, 14995 BindingType: { 14996 Direct: 0, 14997 EntireArray: 1, 14998 ArrayElement: 2, 14999 HasFromToArray: 3 15000 }, 15001 Versioning: { 15002 None: 0, 15003 NeedsUpdate: 1, 15004 MatrixWorldNeedsUpdate: 2 15005 }, 15006 GetterByBindingType: [function(e, t) { 15007 e[t] = this.node[this.propertyName] 15008 }, function(e, t) { 15009 for (var i = this.resolvedProperty, n = 0, r = i.length; n !== r; ++n) e[t++] = i[n] 15010 }, function(e, t) { 15011 e[t] = this.resolvedProperty[this.propertyIndex] 15012 }, function(e, t) { 15013 this.resolvedProperty.toArray(e, t) 15014 }], 15015 SetterByBindingTypeAndVersioning: [ 15016 [function(e, t) { 15017 this.node[this.propertyName] = e[t] 15018 }, function(e, t) { 15019 this.node[this.propertyName] = e[t], this.targetObject.needsUpdate = !0 15020 }, function(e, t) { 15021 this.node[this.propertyName] = e[t], this.targetObject.matrixWorldNeedsUpdate = !0 15022 }], 15023 [function(e, t) { 15024 for (var i = this.resolvedProperty, n = 0, r = i.length; n !== r; ++n) i[n] = e[t++] 15025 }, function(e, t) { 15026 for (var i = this.resolvedProperty, n = 0, r = i.length; n !== r; ++n) i[n] = e[t++]; 15027 this.targetObject.needsUpdate = !0 15028 }, function(e, t) { 15029 for (var i = this.resolvedProperty, n = 0, r = i.length; n !== r; ++n) i[n] = e[t++]; 15030 this.targetObject.matrixWorldNeedsUpdate = !0 15031 }], 15032 [function(e, t) { 15033 this.resolvedProperty[this.propertyIndex] = e[t] 15034 }, function(e, t) { 15035 this.resolvedProperty[this.propertyIndex] = e[t], this.targetObject.needsUpdate = !0 15036 }, function(e, t) { 15037 this.resolvedProperty[this.propertyIndex] = e[t], this.targetObject.matrixWorldNeedsUpdate = !0 15038 }], 15039 [function(e, t) { 15040 this.resolvedProperty.fromArray(e, t) 15041 }, function(e, t) { 15042 this.resolvedProperty.fromArray(e, t), this.targetObject.needsUpdate = !0 15043 }, function(e, t) { 15044 this.resolvedProperty.fromArray(e, t), this.targetObject.matrixWorldNeedsUpdate = !0 15045 }] 15046 ], 15047 getValue: function(e, t) { 15048 this.bind(), this.getValue(e, t) 15049 }, 15050 setValue: function(e, t) { 15051 this.bind(), this.setValue(e, t) 15052 }, 15053 bind: function() { 15054 var e = this.node, 15055 t = this.parsedPath, 15056 i = t.objectName, 15057 n = t.propertyName, 15058 r = t.propertyIndex; 15059 if (e || (e = hc.findNode(this.rootNode, t.nodeName) || this.rootNode, this.node = e), this.getValue = this._getValue_unavailable, this.setValue = this._setValue_unavailable, e) { 15060 if (i) { 15061 var o = t.objectIndex; 15062 switch (i) { 15063 case "materials": 15064 if (!e.material) return void console.error("THREE.PropertyBinding: Can not bind to material as no
vendor: 5,666 bytes, lines 15064-15147
15064de does not have a material.", this); 15065 if (!e.material.materials) return void console.error("THREE.PropertyBinding: Can not bind to material.materials as node.material does not have a materials array.", this); 15066 e = e.material.materials; 15067 break; 15068 case "bones": 15069 if (!e.skeleton) return void console.error("THREE.PropertyBinding: Can not bind to bones as node does not have a skeleton.", this); 15070 e = e.skeleton.bones; 15071 for (var a = 0; a < e.length; a++) 15072 if (e[a].name === o) { 15073 o = a; 15074 break 15075 } 15076 break; 15077 default: 15078 if (void 0 === e[i]) return void console.error("THREE.PropertyBinding: Can not bind to objectName of node undefined.", this); 15079 e = e[i] 15080 } 15081 if (void 0 !== o) { 15082 if (void 0 === e[o]) return void console.error("THREE.PropertyBinding: Trying to bind to objectIndex of objectName, but is undefined.", this, e); 15083 e = e[o] 15084 } 15085 } 15086 var s = e[n]; 15087 if (void 0 !== s) { 15088 var l = this.Versioning.None; 15089 void 0 !== e.needsUpdate ? (l = this.Versioning.NeedsUpdate, this.targetObject = e) : void 0 !== e.matrixWorldNeedsUpdate && (l = this.Versioning.MatrixWorldNeedsUpdate, this.targetObject = e); 15090 var c = this.BindingType.Direct; 15091 if (void 0 !== r) { 15092 if ("morphTargetInfluences" === n) { 15093 if (!e.geometry) return void console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.", this); 15094 if (e.geometry.isBufferGeometry) { 15095 if (!e.geometry.morphAttributes) return void console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.morphAttributes.", this); 15096 for (a = 0; a < this.node.geometry.morphAttributes.position.length; a++) 15097 if (e.geometry.morphAttributes.position[a].name === r) { 15098 r = a; 15099 break 15100 } 15101 } else { 15102 if (!e.geometry.morphTargets) return void console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.morphTargets.", this); 15103 for (a = 0; a < this.node.geometry.morphTargets.length; a++) 15104 if (e.geometry.morphTargets[a].name === r) { 15105 r = a; 15106 break 15107 } 15108 } 15109 } 15110 c = this.BindingType.ArrayElement, this.resolvedProperty = s, this.propertyIndex = r 15111 } else void 0 !== s.fromArray && void 0 !== s.toArray ? (c = this.BindingType.HasFromToArray, this.resolvedProperty = s) : Array.isArray(s) ? (c = this.BindingType.EntireArray, this.resolvedProperty = s) : this.propertyName = n; 15112 this.getValue = this.GetterByBindingType[c], this.setValue = this.SetterByBindingTypeAndVersioning[c][l] 15113 } else { 15114 var u = t.nodeName; 15115 console.error("THREE.PropertyBinding: Trying to update property for track: " + u + "." + n + " but it wasn't found.", e) 15116 } 15117 } else console.error("THREE.PropertyBinding: Trying to update node for track: " + this.path + " but it wasn't found.") 15118 }, 15119 unbind: function() { 15120 this.node = null, this.getValue = this._getValue_unbound, this.setValue = this._setValue_unbound 15121 } 15122 }), Object.assign(hc.prototype, { 15123 _getValue_unbound: hc.prototype.getValue, 15124 _setValue_unbound: hc.prototype.setValue 15125 }), Object.assign(dc.prototype, { 15126 isAnimationObjectGroup: !0, 15127 add: function(e) { 15128 for (var t = this._objects, i = t.length, n = this.nCachedObjects_, r = this._indicesByUUID, o = this._paths, a = this._parsedPaths, s = this._bindings, l = s.length, c = 0, u = arguments.length; c !== u; ++c) { 15129 var h = arguments[c], 15130 d = h.uuid, 15131 p = r[d], 15132 f = void 0; 15133 if (void 0 === p) { 15134 p = i++, r[d] = p, t.push(h); 15135 for (var m = 0, g = l; m !== g; ++m) s[m].push(new hc(h, o[m], a[m])) 15136 } else if (p < n) { 15137 f = t[p]; 15138 var v = --n, 15139 y = t[v]; 15140 t[r[y.uuid] = p] = y, t[r[d] = v] = h; 15141 for (m = 0, g = l; m !== g; ++m) { 15142 var b = s[m], 15143 w = b[v], 15144 x = b[p]; 15145 b[p] = w, void 0 === x && (x = new hc(h, o[m], a[m])), b[v] = x 15146 } 15147 } else t[p] !== f && console.error("THREE.AnimationObjectGroup: Different objects with the same UUID detected. Clean the caches or recreate your infrastru
15147cture when reloading scenes.") 15148 } 15149 this.nCachedObjects_ = n 15150 }, 15151 remove: function(e) { 15152 for (var t = this._objects, i = this.nCachedObjects_, n = this._indicesByUUID, r = this._bindings, o = r.length, a = 0, s = arguments.length; a !== s; ++a) { 15153 var l = arguments[a], 15154 c = l.uuid, 15155 u = n[c]; 15156 if (void 0 !== u && i <= u) { 15157 var h = i++, 15158 d = t[h]; 15159 t[n[d.uuid] = u] = d, t[n[c] = h] = l; 15160 for (var p = 0, f = o; p !== f; ++p) { 15161 var m = r[p], 15162 g = m[h], 15163 v = m[u]; 15164 m[u] = g, m[h] = v 15165 } 15166 } 15167 } 15168 this.nCachedObjects_ = i 15169 }, 15170 uncache: function(e) { 15171 for (var t = this._objects, i = t.length, n = this.nCachedObjects_, r = this._indicesByUUID, o = this._bindings, a = o.length, s = 0, l = arguments.length; s !== l; ++s) { 15172 var c = arguments[s].uuid, 15173 u = r[c]; 15174 if (void 0 !== u) 15175 if (delete r[c], u < n) { 15176 var h = --n, 15177 d = t[h], 15178 p = t[y = --i]; 15179 t[r[d.uuid] = u] = d, t[r[p.uuid] = h] = p, t.pop(); 15180 for (var f = 0, m = a; f !== m; ++f) { 15181 var g = (b = o[f])[h], 15182 v = b[y]; 15183 b[u] = g, b[h] = v, b.pop() 15184 } 15185 } else { 15186 var y; 15187 t[r[(p = t[y = --i]).uuid] = u] = p, t.pop(); 15188 for (f = 0, m = a; f !== m; ++f) { 15189 var b; 15190 (b = o[f])[u] = b[y], b.pop() 15191 } 15192 } 15193 } 15194 this.nCachedObjects_ = n 15195 }, 15196 subscribe_: function(e, t) { 15197 var i = this._bindingsIndicesByPath, 15198 n = i[e], 15199 r = this._bindings; 15200 if (void 0 !== n) return r[n]; 15201 var o = this._paths, 15202 a = this._parsedPaths, 15203 s = this._objects, 15204 l = s.length, 15205 c = this.nCachedObjects_, 15206 u = new Array(l); 15207 n = r.length, i[e] = n, o.push(e), a.push(t), r.push(u); 15208 for (var h = c, d = s.length; h !== d; ++h) { 15209 var p = s[h]; 15210 u[h] = new hc(p, e, t) 15211 } 15212 return u 15213 }, 15214 unsubscribe_: function(e) { 15215 var t = this._bindingsIndicesByPath, 15216 i = t[e]; 15217 if (void 0 !== i) { 15218 var n = this._paths, 15219 r = this._parsedPaths, 15220 o = this._bindings, 15221 a = o.length - 1, 15222 s = o[a]; 15223 o[t[e[a]] = i] = s, o.pop(), r[i] = r[a], r.pop(), n[i] = n[a], n.pop() 15224 } 15225 } 15226 }), Object.assign(pc.prototype, { 15227 play: function() { 15228 return this._mixer._activateAction(this), this 15229 }, 15230 stop: function() { 15231 return this._mixer._deactivateAction(this), this.reset() 15232 }, 15233 reset: function() { 15234 return this.paused = !1, this.enabled = !0, this.time = 0, this._loopCount = -1, this._startTime = null, this.stopFading().stopWarping() 15235 }, 15236 isRunning: function() { 15237 return this.enabled && !this.paused && 0 !== this.timeScale && null === this._startTime && this._mixer._isActiveAction(this) 15238 }, 15239 isScheduled: function() { 15240 return this._mixer._isActiveAction(this) 15241 }, 15242 startAt: function(e) { 15243 return this._startTime = e, this 15244 }, 15245 setLoop: function(e, t) { 15246 return this.loop = e, this.repetitions = t, this 15247 }, 15248 setEffectiveWeight: function(e) { 15249 return this.weight = e, this._effectiveWeight = this.enabled ? e : 0, this.stopFading() 15250 }, 15251 getEffectiveWeight: function() { 15252 return this._effectiveWeight 15253 }, 15254 fadeIn: function(e) { 15255 return this._scheduleFading(e, 0, 1) 15256 }, 15257 fadeOut: function(e) { 15258 return this._scheduleFading(e, 1, 0) 15259 }, 15260 crossFadeFrom: function(e, t, i) { 15261 if (e.fadeOut(t), this.fadeIn(t), i) { 15262 var n = this._clip.duration, 15263 r = e._clip.duration, 15264 o = r / n, 15265 a = n / r;
vendor: 20,859 bytes, lines 15266-15770
15266 e.warp(1, o, t), this.warp(a, 1, t) 15267 } 15268 return this 15269 }, 15270 crossFadeTo: function(e, t, i) { 15271 return e.crossFadeFrom(this, t, i) 15272 }, 15273 stopFading: function() { 15274 var e = this._weightInterpolant; 15275 return null !== e && (this._weightInterpolant = null, this._mixer._takeBackControlInterpolant(e)), this 15276 }, 15277 setEffectiveTimeScale: function(e) { 15278 return this.timeScale = e, this._effectiveTimeScale = this.paused ? 0 : e, this.stopWarping() 15279 }, 15280 getEffectiveTimeScale: function() { 15281 return this._effectiveTimeScale 15282 }, 15283 setDuration: function(e) { 15284 return this.timeScale = this._clip.duration / e, this.stopWarping() 15285 }, 15286 syncWith: function(e) { 15287 return this.time = e.time, this.timeScale = e.timeScale, this.stopWarping() 15288 }, 15289 halt: function(e) { 15290 return this.warp(this._effectiveTimeScale, 0, e) 15291 }, 15292 warp: function(e, t, i) { 15293 var n = this._mixer, 15294 r = n.time, 15295 o = this._timeScaleInterpolant, 15296 a = this.timeScale; 15297 null === o && (o = n._lendControlInterpolant(), this._timeScaleInterpolant = o); 15298 var s = o.parameterPositions, 15299 l = o.sampleValues; 15300 return s[0] = r, s[1] = r + i, l[0] = e / a, l[1] = t / a, this 15301 }, 15302 stopWarping: function() { 15303 var e = this._timeScaleInterpolant; 15304 return null !== e && (this._timeScaleInterpolant = null, this._mixer._takeBackControlInterpolant(e)), this 15305 }, 15306 getMixer: function() { 15307 return this._mixer 15308 }, 15309 getClip: function() { 15310 return this._clip 15311 }, 15312 getRoot: function() { 15313 return this._localRoot || this._mixer._root 15314 }, 15315 _update: function(e, t, i, n) { 15316 if (this.enabled) { 15317 var r = this._startTime; 15318 if (null !== r) { 15319 var o = (e - r) * i; 15320 if (o < 0 || 0 === i) return; 15321 this._startTime = null, t = i * o 15322 } 15323 t *= this._updateTimeScale(e); 15324 var a = this._updateTime(t), 15325 s = this._updateWeight(e); 15326 if (0 < s) 15327 for (var l = this._interpolants, c = this._propertyBindings, u = 0, h = l.length; u !== h; ++u) l[u].evaluate(a), c[u].accumulate(n, s) 15328 } else this._updateWeight(e) 15329 }, 15330 _updateWeight: function(e) { 15331 var t = 0; 15332 if (this.enabled) { 15333 t = this.weight; 15334 var i = this._weightInterpolant; 15335 if (null !== i) { 15336 var n = i.evaluate(e)[0]; 15337 t *= n, e > i.parameterPositions[1] && (this.stopFading(), 0 === n && (this.enabled = !1)) 15338 } 15339 } 15340 return this._effectiveWeight = t 15341 }, 15342 _updateTimeScale: function(e) { 15343 var t = 0; 15344 if (!this.paused) { 15345 t = this.timeScale; 15346 var i = this._timeScaleInterpolant; 15347 if (null !== i) t *= i.evaluate(e)[0], e > i.parameterPositions[1] && (this.stopWarping(), 0 === t ? this.paused = !0 : this.timeScale = t) 15348 } 15349 return this._effectiveTimeScale = t 15350 }, 15351 _updateTime: function(e) { 15352 var t = this.time + e; 15353 if (0 === e) return t; 15354 var i = this._clip.duration, 15355 n = this.loop, 15356 r = this._loopCount; 15357 if (2200 === n) { 15358 -1 === r && (this._loopCount = 0, this._setEndings(!0, !0, !1)); 15359 e: { 15360 if (i <= t) t = i; 15361 else { 15362 if (!(t < 0)) break e; 15363 t = 0 15364 } 15365 this.clampWhenFinished ? this.paused = !0 : this.enabled = !1, this._mixer.dispatchEvent({ 15366 type: "finished", 15367 action: this, 15368 direction: e < 0 ? -1 : 1 15369 }) 15370 } 15371 } else { 15372 var o = 2202 === n; 15373 if (-1 === r && (0 <= e ? (r = 0, this._setEndings(!0, 0 === this.repetitions, o)) : this._setEndings(0 === this.repetitions, !0, o)), i <= t || t < 0) { 15374 var a = Math.floor(t / i); 15375 t -= i * a, r += Math.abs(a); 15376 var s = this.repetitions - r; 15377 if (s < 0) this.clampWhenFinished ? this.paused = !0 : this.enabled = !1, t = 0 < e ? i : 0, this._mixer.dispatchEvent({ 15378 type: "finished", 15379 action: this, 15380 direction: 0 < e ? 1 : -1 15381 }); 15382 else { 15383 if (0 === s) { 15384 var l = e < 0; 15385 this._setEndings(l, !l, o) 15386 } else this._setEndings(!1, !1, o); 15387 this._loopCount = r, this._mixer.dispatchEvent({ 15388 type: "loop", 15389 action: this, 15390 loopDelta: a 15391 }) 15392 } 15393 } 15394 if (o && 1 == (1 & r)) return i - (this.time = t) 15395 } 15396 return this.time = t 15397 }, 15398 _setEndings: function(e, t, i) { 15399 var n = this._interpolantSettings; 15400 i ? (n.endingStart = Ye, n.endingEnd = Ye) : (n.endingStart = e ? this.zeroSlopeAtStart ? Ye : Xe : Ze, n.endingEnd = t ? this.zeroSlopeAtEnd ? Ye : Xe : Ze) 15401 }, 15402 _scheduleFading: function(e, t, i) { 15403 var n = this._mixer, 15404 r = n.time, 15405 o = this._weightInterpolant; 15406 null === o && (o = n._lendControlInterpolant(), this._weightInterpolant = o); 15407 var a = o.parameterPositions, 15408 s = o.sampleValues; 15409 return a[0] = r, s[0] = t, a[1] = r + e, s[1] = i, this 15410 } 15411 }), Object.assign(fc.prototype, t.prototype, { 15412 _bindAction: function(e, t) { 15413 var i = e._localRoot || this._root, 15414 n = e._clip.tracks, 15415 r = n.length, 15416 o = e._propertyBindings, 15417 a = e._interpolants, 15418 s = i.uuid, 15419 l = this._bindingsByRootAndName, 15420 c = l[s]; 15421 void 0 === c && (c = {}, l[s] = c); 15422 for (var u = 0; u !== r; ++u) { 15423 var h = n[u], 15424 d = h.name, 15425 p = c[d]; 15426 if (void 0 !== p) o[u] = p; 15427 else { 15428 if (void 0 !== (p = o[u])) { 15429 null === p._cacheIndex && (++p.referenceCount, this._addInactiveBinding(p, s, d)); 15430 continue 15431 } 15432 var f = t && t._propertyBindings[u].binding.parsedPath; 15433 ++(p = new cc(hc.create(i, d, f), h.ValueTypeName, h.getValueSize())).referenceCount, this._addInactiveBinding(p, s, d), o[u] = p 15434 } 15435 a[u].resultBuffer = p.buffer 15436 } 15437 }, 15438 _activateAction: function(e) { 15439 if (!this._isActiveAction(e)) { 15440 if (null === e._cacheIndex) { 15441 var t = (e._localRoot || this._root).uuid, 15442 i = e._clip.uuid, 15443 n = this._actionsByClip[i]; 15444 this._bindAction(e, n && n.knownActions[0]), this._addInactiveAction(e, i, t) 15445 } 15446 for (var r = e._propertyBindings, o = 0, a = r.length; o !== a; ++o) { 15447 var s = r[o]; 15448 0 == s.useCount++ && (this._lendBinding(s), s.saveOriginalState()) 15449 } 15450 this._lendAction(e) 15451 } 15452 }, 15453 _deactivateAction: function(e) { 15454 if (this._isActiveAction(e)) { 15455 for (var t = e._propertyBindings, i = 0, n = t.length; i !== n; ++i) { 15456 var r = t[i]; 15457 0 == --r.useCount && (r.restoreOriginalState(), this._takeBackBinding(r)) 15458 } 15459 this._takeBackAction(e) 15460 } 15461 }, 15462 _initMemoryManager: function() { 15463 this._actions = [], this._nActiveActions = 0, this._actionsByClip = {}, this._bindings = [], this._nActiveBindings = 0, this._bindingsByRootAndName = {}, this._controlInterpolants = [], this._nActiveControlInterpolants = 0; 15464 var e = this; 15465 this.stats = { 15466 actions: {get total() { 15467 return e._actions.length 15468 }, 15469 get inUse() { 15470 return e._nActiveActions 15471 } 15472 }, 15473 bindings: {get total() { 15474 return e._bindings.length 15475 }, 15476 get inUse() { 15477 return e._nActiveBindings 15478 } 15479 }, 15480 controlInterpolants: {get total() { 15481 return e._controlInterpolants.length 15482 }, 15483 get inUse() { 15484 return e._nActiveControlInterpolants 15485 } 15486 } 15487 } 15488 }, 15489 _isActiveAction: function(e) { 15490 var t = e._cacheIndex; 15491 return null !== t && t < this._nActiveActions 15492 }, 15493 _addInactiveAction: function(e, t, i) { 15494 var n = this._actions, 15495 r = this._actionsByClip, 15496 o = r[t]; 15497 if (void 0 === o) o = { 15498 knownActions: [e], 15499 actionByRoot: {} 15500 }, e._byClipCacheIndex = 0, r[t] = o; 15501 else { 15502 var a = o.knownActions; 15503 e._byClipCacheIndex = a.length, a.push(e) 15504 } 15505 e._cacheIndex = n.length, n.push(e), o.actionByRoot[i] = e 15506 }, 15507 _removeInactiveAction: function(e) { 15508 var t = this._actions, 15509 i = t[t.length - 1], 15510 n = e._cacheIndex; 15511 t[i._cacheIndex = n] = i, t.pop(), e._cacheIndex = null; 15512 var r = e._clip.uuid, 15513 o = this._actionsByClip, 15514 a = o[r], 15515 s = a.knownActions, 15516 l = s[s.length - 1], 15517 c = e._byClipCacheIndex; 15518 s[l._byClipCacheIndex = c] = l, s.pop(), e._byClipCacheIndex = null, delete a.actionByRoot[(e._localRoot || this._root).uuid], 0 === s.length && delete o[r], this._removeInactiveBindingsForAction(e) 15519 }, 15520 _removeInactiveBindingsForAction: function(e) { 15521 for (var t = e._propertyBindings, i = 0, n = t.length; i !== n; ++i) { 15522 var r = t[i]; 15523 0 == --r.referenceCount && this._removeInactiveBinding(r) 15524 } 15525 }, 15526 _lendAction: function(e) { 15527 var t = this._actions, 15528 i = e._cacheIndex, 15529 n = this._nActiveActions++, 15530 r = t[n]; 15531 t[e._cacheIndex = n] = e, t[r._cacheIndex = i] = r 15532 }, 15533 _takeBackAction: function(e) { 15534 var t = this._actions, 15535 i = e._cacheIndex, 15536 n = --this._nActiveActions, 15537 r = t[n]; 15538 t[e._cacheIndex = n] = e, t[r._cacheIndex = i] = r 15539 }, 15540 _addInactiveBinding: function(e, t, i) { 15541 var n = this._bindingsByRootAndName, 15542 r = n[t], 15543 o = this._bindings; 15544 void 0 === r && (r = {}, n[t] = r), (r[i] = e)._cacheIndex = o.length, o.push(e) 15545 }, 15546 _removeInactiveBinding: function(e) { 15547 var t = this._bindings, 15548 i = e.binding, 15549 n = i.rootNode.uuid, 15550 r = i.path, 15551 o = this._bindingsByRootAndName, 15552 a = o[n], 15553 s = t[t.length - 1], 15554 l = e._cacheIndex; 15555 t[s._cacheIndex = l] = s, t.pop(), delete a[r]; 15556 e: { 15557 for (var c in a) break e; 15558 delete o[n] 15559 } 15560 }, 15561 _lendBinding: function(e) { 15562 var t = this._bindings, 15563 i = e._cacheIndex, 15564 n = this._nActiveBindings++, 15565 r = t[n]; 15566 t[e._cacheIndex = n] = e, t[r._cacheIndex = i] = r 15567 }, 15568 _takeBackBinding: function(e) { 15569 var t = this._bindings, 15570 i = e._cacheIndex, 15571 n = --this._nActiveBindings, 15572 r = t[n]; 15573 t[e._cacheIndex = n] = e, t[r._cacheIndex = i] = r 15574 }, 15575 _lendControlInterpolant: function() { 15576 var e = this._controlInterpolants, 15577 t = this._nActiveControlInterpolants++, 15578 i = e[t]; 15579 return void 0 === i && (e[(i = new Cs(new Float32Array(2), new Float32Array(2), 1, this._controlInterpolantsResultBuffer)).__cacheIndex = t] = i), i 15580 }, 15581 _takeBackControlInterpolant: function(e) { 15582 var t = this._controlInterpolants, 15583 i = e.__cacheIndex, 15584 n = --this._nActiveControlInterpolants, 15585 r = t[n]; 15586 t[e.__cacheIndex = n] = e, t[r.__cacheIndex = i] = r 15587 }, 15588 _controlInterpolantsResultBuffer: new Float32Array(1), 15589 clipAction: function(e, t) { 15590 var i = t || this._root, 15591 n = i.uuid, 15592 r = "string" == typeof e ? Fs.findByName(i, e) : e, 15593 o = null !== r ? r.uuid : e, 15594 a = this._actionsByClip[o], 15595 s = null; 15596 if (void 0 !== a) { 15597 var l = a.actionByRoot[n]; 15598 if (void 0 !== l) return l; 15599 s = a.knownActions[0], null === r && (r = s._clip) 15600 } 15601 if (null === r) return null; 15602 var c = new pc(this, r, t); 15603 return this._bindAction(c, s), this._addInactiveAction(c, o, n), c 15604 }, 15605 existingAction: function(e, t) { 15606 var i = t || this._root, 15607 n = i.uuid, 15608 r = "string" == typeof e ? Fs.findByName(i, e) : e, 15609 o = r ? r.uuid : e, 15610 a = this._actionsByClip[o]; 15611 return void 0 !== a && a.actionByRoot[n] || null 15612 }, 15613 stopAllAction: function() { 15614 var e = this._actions, 15615 t = this._nActiveActions, 15616 i = this._bindings, 15617 n = this._nActiveBindings; 15618 this._nActiveActions = 0; 15619 for (var r = this._nActiveBindings = 0; r !== t; ++r) e[r].reset(); 15620 for (r = 0; r !== n; ++r) i[r].useCount = 0; 15621 return this 15622 }, 15623 update: function(e) { 15624 e *= this.timeScale; 15625 for (var t = this._actions, i = this._nActiveActions, n = this.time += e, r = Math.sign(e), o = this._accuIndex ^= 1, a = 0; a !== i; ++a) { 15626 t[a]._update(n, e, r, o) 15627 } 15628 var s = this._bindings, 15629 l = this._nActiveBindings; 15630 for (a = 0; a !== l; ++a) s[a].apply(o); 15631 return this 15632 }, 15633 getRoot: function() { 15634 return this._root 15635 }, 15636 uncacheClip: function(e) { 15637 var t = this._actions, 15638 i = e.uuid, 15639 n = this._actionsByClip, 15640 r = n[i]; 15641 if (void 0 !== r) { 15642 for (var o = r.knownActions, a = 0, s = o.length; a !== s; ++a) { 15643 var l = o[a]; 15644 this._deactivateAction(l); 15645 var c = l._cacheIndex, 15646 u = t[t.length - 1]; 15647 l._cacheIndex = null, l._byClipCacheIndex = null, t[u._cacheIndex = c] = u, t.pop(), this._removeInactiveBindingsForAction(l) 15648 } 15649 delete n[i] 15650 } 15651 }, 15652 uncacheRoot: function(e) { 15653 var t = e.uuid, 15654 i = this._actionsByClip; 15655 for (var n in i) { 15656 var r = i[n].actionByRoot[t]; 15657 void 0 !== r && (this._deactivateAction(r), this._removeInactiveAction(r)) 15658 } 15659 var o = this._bindingsByRootAndName[t]; 15660 if (void 0 !== o) 15661 for (var a in o) { 15662 var s = o[a]; 15663 s.restoreOriginalState(), this._removeInactiveBinding(s) 15664 } 15665 }, 15666 uncacheAction: function(e, t) { 15667 var i = this.existingAction(e, t); 15668 null !== i && (this._deactivateAction(i), this._removeInactiveAction(i)) 15669 } 15670 }), mc.prototype.clone = function() { 15671 return new mc(void 0 === this.value.clone ? this.value : this.value.clone()) 15672 }, gc.prototype = Object.assign(Object.create(Fr.prototype), { 15673 constructor: gc, 15674 isInstancedBufferGeometry: !0, 15675 addGroup: function(e, t, i) { 15676 this.groups.push({ 15677 start: e, 15678 count: t, 15679 materialIndex: i 15680 }) 15681 }, 15682 copy: function(e) { 15683 var t = e.index; 15684 null !== t && this.setIndex(t.clone()); 15685 var i = e.attributes; 15686 for (var n in i) { 15687 var r = i[n]; 15688 this.addAttribute(n, r.clone()) 15689 } 15690 for (var o = e.groups, a = 0, s = o.length; a < s; a++) { 15691 var l = o[a]; 15692 this.addGroup(l.start, l.count, l.materialIndex) 15693 } 15694 return this 15695 } 15696 }), Object.defineProperties(vc.prototype, { 15697 count: { 15698 get: function() { 15699 return this.data.count 15700 } 15701 }, 15702 array: { 15703 get: function() { 15704 return this.data.array 15705 } 15706 } 15707 }), Object.assign(vc.prototype, { 15708 isInterleavedBufferAttribute: !0, 15709 setX: function(e, t) { 15710 return this.data.array[e * this.data.stride + this.offset] = t, this 15711 }, 15712 setY: function(e, t) { 15713 return this.data.array[e * this.data.stride + this.offset + 1] = t, this 15714 }, 15715 setZ: function(e, t) { 15716 return this.data.array[e * this.data.stride + this.offset + 2] = t, this 15717 }, 15718 setW: function(e, t) { 15719 return this.data.array[e * this.data.stride + this.offset + 3] = t, this 15720 }, 15721 getX: function(e) { 15722 return this.data.array[e * this.data.stride + this.offset] 15723 }, 15724 getY: function(e) { 15725 return this.data.array[e * this.data.stride + this.offset + 1] 15726 }, 15727 getZ: function(e) { 15728 return this.data.array[e * this.data.stride + this.offset + 2] 15729 }, 15730 getW: function(e) { 15731 return this.data.array[e * this.data.stride + this.offset + 3] 15732 }, 15733 setXY: function(e, t, i) { 15734 return e = e * this.data.stride + this.offset, this.data.array[e + 0] = t, this.data.array[e + 1] = i, this 15735 }, 15736 setXYZ: function(e, t, i, n) { 15737 return e = e * this.data.stride + this.offset, this.data.array[e + 0] = t, this.data.array[e + 1] = i, this.data.array[e + 2] = n, this 15738 }, 15739 setXYZW: function(e, t, i, n, r) { 15740 return e = e * this.data.stride + this.offset, this.data.array[e + 0] = t, this.data.array[e + 1] = i, this.data.array[e + 2] = n, this.data.array[e + 3] = r, this 15741 } 15742 }), Object.defineProperty(yc.prototype, "needsUpdate", { 15743 set: function(e) { 15744 !0 === e && this.version++ 15745 } 15746 }), Object.assign(yc.prototype, { 15747 isInterleavedBuffer: !0, 15748 setArray: function(e) { 15749 if (Array.isArray(e)) throw new TypeError("THREE.BufferAttribute: array should be a Typed Array."); 15750 this.count = void 0 !== e ? e.length / this.stride : 0, this.array = e 15751 }, 15752 setDynamic: function(e) { 15753 return this.dynamic = e, this 15754 }, 15755 copy: function(e) { 15756 return this.array = new e.array.constructor(e.array), this.count = e.count, this.stride = e.stride, this.dynamic = e.dynamic, this 15757 }, 15758 copyAt: function(e, t, i) { 15759 e *= this.stride, i *= t.stride; 15760 for (var n = 0, r = this.stride; n < r; n++) this.array[e + n] = t.array[i + n]; 15761 return this 15762 }, 15763 set: function(e, t) { 15764 return void 0 === t && (t = 0), this.array.set(e, t), this 15765 }, 15766 clone: function() { 15767 return (new this.constructor).copy(this) 15768 }, 15769 onUpload: function(e) { 15770
15770 return this.onUploadCallback = e, this 15771 } 15772 }), bc.prototype = Object.assign(Object.create(yc.prototype), { 15773 constructor: bc, 15774 isInstancedInterleavedBuffer: !0, 15775 copy: function(e) { 15776 return yc.prototype.copy.call(this, e), this.meshPerAttribute = e.meshPerAttribute, this 15777 } 15778 }), wc.prototype = Object.assign(Object.create(Sr.prototype), { 15779 constructor: wc, 15780 isInstancedBufferAttribute: !0, 15781 copy: function(e) { 15782 return Sr.prototype.copy.call(this, e), this.meshPerAttribute = e.meshPerAttribute, this 15783 } 15784 }), Object.assign(xc.prototype, { 15785 linePrecision: 1, 15786 set: function(e, t) { 15787 this.ray.set(e, t) 15788 }, 15789 setFromCamera: function(e, t) { 15790 t && t.isPerspectiveCamera ? (this.ray.origin.setFromMatrixPosition(t.matrixWorld), this.ray.direction.set(e.x, e.y, .5).unproject(t).sub(this.ray.origin).normalize()) : 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)) : console.error("THREE.Raycaster: Unsupported camera type.") 15791 }, 15792 intersectObject: function(e, t) { 15793 var i = []; 15794 return Tc(e, this, i, t), i.sort(_c), i 15795 }, 15796 intersectObjects: function(e, t) { 15797 var i = []; 15798 if (!1 === Array.isArray(e)) return console.warn("THREE.Raycaster.intersectObjects: objects is not an Array."), i; 15799 for (var n = 0, r = e.length; n < r; n++) Tc(e[n], this, i, t); 15800 return i.sort(_c), i 15801 } 15802 }), Object.assign(Ec.prototype, { 15803 start: function() { 15804 this.startTime = ("undefined" == typeof performance ? Date : performance).now(), this.oldTime = this.startTime, this.elapsedTime = 0, this.running = !0 15805 }, 15806 stop: function() { 15807 this.getElapsedTime(), this.running = !1, this.autoStart = !1 15808 }, 15809 getElapsedTime: function() { 15810 return this.getDelta(), this.elapsedTime 15811 }, 15812 getDelta: function() { 15813 var e = 0; 15814 if (this.autoStart && !this.running) return this.start(), 0; 15815 if (this.running) { 15816 var t = ("undefined" == typeof performance ? Date : performance).now(); 15817 e = (t - this.oldTime) / 1e3, this.oldTime = t, this.elapsedTime += e 15818 } 15819 return e 15820 } 15821 }), Object.assign(Mc.prototype, { 15822 set: function(e, t, i) { 15823 return this.radius = e, this.phi = t, this.theta = i, this 15824 }, 15825 clone: function() { 15826 return (new this.constructor).copy(this) 15827 }, 15828 copy: function(e) { 15829 return this.radius = e.radius, this.phi = e.phi, this.theta = e.theta, this 15830 }, 15831 makeSafe: function() { 15832 return this.phi = Math.max(1e-6, Math.min(Math.PI - 1e-6, this.phi)), this 15833 }, 15834 setFromVector3: function(e) { 15835 return this.radius = e.length(), 0 === this.radius ? (this.theta = 0, this.phi = 0) : (this.theta = Math.atan2(e.x, e.z), this.phi = Math.acos(st.clamp(e.y / this.radius, -1, 1))), this 15836 } 15837 }), Object.assign(Sc.prototype, { 15838 set: function(e, t, i) { 15839 return this.radius = e, this.theta = t, this.y = i, this 15840 }, 15841 clone: function() { 15842 return (new this.constructor).copy(this) 15843 }, 15844 copy: function(e) { 15845 return this.radius = e.radius, this.theta = e.theta, this.y = e.y, this 15846 }, 15847 setFromVector3: function(e) { 15848 return this.radius = Math.sqrt(e.x * e.x + e.z * e.z), this.theta = Math.atan2(e.x, e.z), this.y = e.y, this 15849 } 15850 }), ((Cc.prototype = Object.create(On.prototype)).constructor = Cc).prototype.isImmediateRenderObject = !0, ((Ac.prototype = Object.create(ea.prototype)).constructor = Ac).prototype.update = (Ol = new Dt, Dl = new Dt, Il = new ln, function() { 15851 var e = ["a", "b", "c"]; 15852 this.object.updateMatrixWorld(!0), Il.getNormalMatrix(this.object.matrixWorld); 15853 var t = this.object.matrixWorld, 15854 i = this.geometry.attributes.position, 15855 n = this.object.geometry; 15856 if (n && n.isGeometry) 15857 for (var r = n.vertices, o = n.faces, a = 0, s = 0, l = o.length; s < l; s++) 15858 for (var c = o[s], u = 0, h = c.vertexNormals.length; u < h; u++) { 15859 var d = r[c[e[u]]], 15860 p = c.vertexNormals[u]; 15861 Ol.copy(d).applyMatrix4(t), Dl.copy(p).applyMatrix3(Il).normalize().multiplyScalar(this.size).add(Ol), i.setXYZ(a, Ol.x, Ol.y, Ol.z), a += 1, i.setXYZ(a, Dl.x, Dl.y, Dl.z), a += 1 15862 } else if (n && n.isBufferGeometry) { 15863 var f = n.attributes.position, 15864 m = n.attributes.normal; 15865 for (u = a = 0, h = f.count; u < h; u++) Ol.set(f.getX(u), f.getY(u), f.getZ(u)).applyMatrix4(t), Dl.set(m.getX(u), m.getY(u), m.getZ(u)), Dl.applyM
15865atrix3(Il).normalize().multiplyScalar(this.size).add(Ol), i.setXYZ(a, Ol.x, Ol.y, Ol.z), a += 1, i.setXYZ(a, Dl.x, Dl.y, Dl.z), a += 1 15866 } 15867 i.needsUpdate = !0 15868 }), ((Rc.prototype = Object.create(On.prototype)).constructor = Rc).prototype.dispose = function() { 15869 this.cone.geometry.dispose(), this.cone.material.dispose() 15870 }, Rc.prototype.update = (zl = new Dt, Nl = new Dt, function() { 15871 this.light.updateMatrixWorld(); 15872 var e = this.light.distance ? this.light.distance : 1e3, 15873 t = e * Math.tan(this.light.angle); 15874 this.cone.scale.set(t, t, e), zl.setFromMatrixPosition(this.light.matrixWorld), Nl.setFromMatrixPosition(this.light.target.matrixWorld), this.cone.lookAt(Nl.sub(zl)), void 0 !== this.color ? this.cone.material.color.set(this.color) : this.cone.material.color.copy(this.light.color) 15875 }), ((Lc.prototype = Object.create(ea.prototype)).constructor = Lc).prototype.onBeforeRender = (Fl = new Dt, Ul = new It, Bl = new It, function() { 15876 var e = this.bones, 15877 t = this.geometry, 15878 i = t.getAttribute("position"); 15879 Bl.getInverse(this.root.matrixWorld); 15880 for (var n = 0, r = 0; n < e.length; n++) { 15881 var o = e[n]; 15882 o.parent && o.parent.isBone && (Ul.multiplyMatrices(Bl, o.matrixWorld), Fl.setFromMatrixPosition(Ul), i.setXYZ(r, Fl.x, Fl.y, Fl.z), Ul.multiplyMatrices(Bl, o.parent.matrixWorld), Fl.setFromMatrixPosition(Ul), i.setXYZ(r + 1, Fl.x, Fl.y, Fl.z), r += 2) 15883 } 15884 t.getAttribute("position").needsUpdate = !0 15885 }), ((Pc.prototype = Object.create(qr.prototype)).constructor = Pc).prototype.dispose = function() { 15886 this.geometry.dispose(), this.material.dispose() 15887 }, Pc.prototype.update = function() { 15888 void 0 !== this.color ? this.material.color.set(this.color) : this.material.color.copy(this.light.color) 15889 }, ((kc.prototype = Object.create(On.prototype)).constructor = kc).prototype.dispose = function() { 15890 this.children[0].geometry.dispose(), this.children[0].material.dispose() 15891 }, kc.prototype.update = function() { 15892 var e = .5 * this.light.width, 15893 t = .5 * this.light.height, 15894 i = this.line.geometry.attributes.position, 15895 n = i.array; 15896 n[0] = e, n[1] = -t, n[2] = 0, n[3] = e, n[4] = t, n[5] = 0, n[6] = -e, n[7] = t, n[8] = 0, n[9] = -e, n[10] = -t, n[11] = 0, n[12] = e, n[13] = -t, n[14] = 0, i.needsUpdate = !0, void 0 !== this.color ? this.line.material.color.set(this.color) : this.line.material.color.copy(this.light.color) 15897 }, ((Oc.prototype = Object.create(On.prototype)).constructor = Oc).prototype.dispose = function() { 15898 this.children[0].geometry.dispose(), this.children[0].material.dispose() 15899 }, Oc.prototype.update = (Hl = new Dt, $l = new Ei, jl = new Ei, function() { 15900 var e = this.children[0]; 15901 if (void 0 !== this.color) this.material.color.set(this.color); 15902 else { 15903 var t = e.geometry.getAttribute("color"); 15904 $l.copy(this.light.color), jl.copy(this.light.groundColor); 15905 for (var i = 0, n = t.count; i < n; i++) { 15906 var r = i < n / 2 ? $l : jl; 15907 t.setXYZ(i, r.r, r.g, r.b) 15908 } 15909 t.needsUpdate = !0 15910 } 15911 e.lookAt(Hl.setFromMatrixPosition(this.light.matrixWorld).negate()) 15912 }), (Dc.prototype = Object.create(ea.prototype)).constructor = Dc, (Ic.prototype = Object.create(ea.prototype)).constructor = Ic, ((zc.prototype = Object.create(ea.prototype)).constructor = zc).prototype.update = (Gl = new Dt, Vl = new Dt, Wl = new ln, function() { 15913 this.object.updateMatrixWorld(!0), Wl.getNormalMatrix(this.object.matrixWorld); 15914 for (var e = this.object.matrixWorld, t = this.geometry.attributes.position, i = this.object.geometry, n = i.vertices, r = i.faces, o = 0, a = 0, s = r.length; a < s; a++) { 15915 var l = r[a], 15916 c = l.normal; 15917 Gl.copy(n[l.a]).add(n[l.b]).add(n[l.c]).divideScalar(3).applyMatrix4(e), Vl.copy(c).applyMatrix3(Wl).normalize().multiplyScalar(this.size).add(Gl), t.setXYZ(o, Gl.x, Gl.y, Gl.z), o += 1, t.setXYZ(o, Vl.x, Vl.y, Vl.z), o += 1 15918 } 15919 t.needsUpdate = !0 15920 }), ((Nc.prototype = Object.create(On.prototype)).constructor = Nc).prototype.dispose = function() { 15921 this.lightPlane.geometry.dispose(), this.lightPlane.material.dispose(), this.targetLine.geometry.dispose(), this.targetLine.material.dispose() 15922 }, Nc.prototype.update = (ql = new Dt, Xl = new Dt, Yl = new Dt, function() { 15923 ql.setFromMatrixPosition(this.light.matrixWorld), Xl.setFromMatrixPosition(this.light.target.matrixWorld), Yl.subVectors(Xl, ql), this.lightPlane.lookAt(Yl), 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(Yl), this.targetLine.scale.z = Yl.length() 15924 }), ((Fc.prototype = Object.create(ea.prototype)).constructor = Fc).prototype.update = function() { 15925 var l, c, u = new Dt, 15926 h = new Dn; 15927 15928 function e(e, t, i, n) { 15929 u.set(t, i, n).unproject(h); 15930 var r = c[e]; 15931 if (void 0 !== r) 15932 for (var o = l.getAttribute("position"), a = 0, s = r.length; a < s; a++) o.setXYZ(r[a], u.x, u.y, u.z) 15933 } 15934 return function() { 15935 l = this.geometry, c = this.pointMap; 15936 h.projectionMatrix.copy(this.camera.projectionMatrix), e("c", 0, 0, -1), e("t", 0, 0, 1), e("n1", -1, -1, -1), e("n2", 1, -1, -1), e("n3", -1, 1, -1), e("n4", 1, 1, -1), e("f1", -1, -1, 1), e("f2", 1, -1, 1), e("f3", -1, 1, 1), e("f4", 1, 1, 1), e("u1", .7, 1.1, -1), e("u2", -.7, 1.1, -1), e("u3", 0, 2, -1), e("cf1", -1, 0, 1), e("cf2", 1, 0, 1), e("cf3", 0, -1, 1), e("cf4", 0, 1, 1), e("cn1", -1, 0, -1), e("cn2", 1, 0, -1), e("cn3", 0, -1, -1), e("cn4", 0, 1, -1), l.getAttribute("position").needsUpdate = !0 15937 } 15938 }(), ((Uc.prototype = Object.create(ea.prototype)).constructor = Uc).prototype.update = (Zl = new an, function(e) { 15939 if (void 0 !== e && console.warn("THREE.BoxHelper: .update(
15939) has no longer arguments."), void 0 !== this.object && Zl.setFromObject(this.object), !Zl.isEmpty()) { 15940 var t = Zl.min, 15941 i = Zl.max, 15942 n = this.geometry.attributes.position, 15943 r = n.array; 15944 r[0] = i.x, r[1] = i.y, r[2] = i.z, r[3] = t.x, r[4] = i.y, r[5] = i.z, r[6] = t.x, r[7] = t.y, r[8] = i.z, r[9] = i.x, r[10] = t.y, r[11] = i.z, r[12] = i.x, r[13] = i.y, r[14] = t.z, r[15] = t.x, r[16] = i.y, r[17] = t.z, r[18] = t.x, r[19] = t.y, r[20] = t.z, r[21] = i.x, r[22] = t.y, r[23] = t.z, n.needsUpdate = !0, this.geometry.computeBoundingSphere() 15945 } 15946 }), Uc.prototype.setFromObject = function(e) { 15947 return this.object = e, this.update(), this 15948 }, ((Bc.prototype = Object.create(ea.prototype)).constructor = Bc).prototype.onBeforeRender = function() { 15949 var e = this.box; 15950 e.isEmpty() || (e.getCenter(this.position), e.getSize(this.scale), this.scale.multiplyScalar(.5)) 15951 }, ((Hc.prototype = Object.create(Ko.prototype)).constructor = Hc).prototype.onBeforeRender = function() { 15952 var e = -this.plane.constant; 15953 Math.abs(e) < 1e-8 && (e = 1e-8), this.scale.set(.5 * this.size, .5 * this.size, e), this.lookAt(this.plane.normal), this.updateMatrixWorld() 15954 }, (($c.prototype = Object.create(On.prototype)).constructor = $c).prototype.setDirection = (ec = new Dt, function(e) {.99999 < e.y ? this.quaternion.set(0, 0, 0, 1) : e.y < -.99999 ? this.quaternion.set(1, 0, 0, 0) : (ec.set(e.z, 0, -e.x).normalize(), Kl = Math.acos(e.y), this.quaternion.setFromAxisAngle(ec, Kl)) 15955 }), $c.prototype.setLength = function(e, t, i) { 15956 void 0 === t && (t = .2 * e), void 0 === i && (i = .2 * t), this.line.scale.set(1, Math.max(0, e - t), 1), this.line.updateMatrix(), this.cone.scale.set(i, t, i), this.cone.position.y = e, this.cone.updateMatrix() 15957 }, $c.prototype.setColor = function(e) { 15958 this.line.material.color.copy(e), this.cone.material.color.copy(e) 15959 }, (jc.prototype = Object.create(ea.prototype)).constructor = jc; 15960 var Vc = new Dt, 15961 Wc = new Gc, 15962 qc = new Gc, 15963 Xc = new Gc; 15964 15965 function Yc(e) { 15966 il.call(this), e.length < 2 && console.warn("THREE.CatmullRomCurve3: Points array needs at least two entries."), this.points = e || [], this.closed = !1 15967 } 15968 15969 function Zc(e, t, i, n) { 15970 il.call(this), this.v0 = e, this.v1 = t, this.v2 = i, this.v3 = n 15971 } 15972 15973 function Qc(e, t, i) { 15974 il.call(this), this.v0 = e, this.v1 = t, this.v2 = i 15975 } 15976 15977 function Jc(e, t) { 15978 il.call(this), this.v1 = e, this.v2 = t 15979 } 15980 15981 function Kc(e, t, i, n, r, o) { 15982 ol.call(this, e, t, i, i, n, r, o) 15983 }((Yc.prototype = Object.create(il.prototype)).constructor = Yc).prototype.getPoint = function(e) { 15984 var t, i, n, r, o = this.points, 15985 a = o.length, 15986 s = (a - (this.closed ? 0 : 1)) * e, 15987 l = Math.floor(s), 15988 c = s - l; 15989 if (this.closed ? l += 0 < l ? 0 : (Math.floor(Math.abs(l) / o.length) + 1) * o.length : 0 === c && l === a - 1 && (l = a - 2, c = 1), this.closed || 0 < l ? t = o[(l - 1) % a] : (Vc.subVectors(o[0], o[1]).add(o[0]), t = Vc), i = o[l % a], n = o[(l + 1) % a], this.closed || l + 2 < a ? r = o[(l + 2) % a] : (Vc.subVectors(o[a - 1], o[a - 2]).add(o[a - 1]), r = Vc), void 0 === this.type || "centripetal" === this.type || "chordal" === this.type) { 15990 var u = "chordal" === this.type ? .5 : .25, 15991 h = Math.pow(t.distanceToSquared(i), u), 15992 d = Math.pow(i.distanceToSquared(n), u), 15993 p = Math.pow(n.distanceToSquared(r), u); 15994 d < 1e-4 && (d = 1), h < 1e-4 && (h = d), p < 1e-4 && (p = d), Wc.initNonuniformCatmullRom(t.x, i.x, n.x, r.x, h, d, p), qc.initNonuniformCatmullRom(t.y, i.y, n.y, r.y, h, d, p), Xc.initNonuniformCatmullRom(t.z, i.z, n.z, r.z, h, d, p) 15995 } else if ("catmullrom" === this.type) { 15996 var f = void 0 !== this.tension ? this.tension : .5; 15997 Wc.initCatmullRom(t.x, i.x, n.x, r.x, f), qc.initCatmullRom(t.y, i.y, n.y, r.y, f), Xc.initCatmullRom(t.z, i.z, n.z, r.z, f) 15998 }
15999 return new Dt(Wc.calc(c), qc.calc(c), Xc.calc(c)) 16000 }, ((Zc.prototype = Object.create(il.prototype)).constructor = Zc).prototype.getPoint = function(e) { 16001 var t = this.v0, 16002 i = this.v1, 16003 n = this.v2, 16004 r = this.v3; 16005 return new Dt(tl(e, t.x, i.x, n.x, r.x), tl(e, t.y, i.y, n.y, r.y), tl(e, t.z, i.z, n.z, r.z)) 16006 }, ((Qc.prototype = Object.create(il.prototype)).constructor = Qc).prototype.getPoint = function(e) { 16007 var t = this.v0, 16008 i = this.v1, 16009 n = this.v2; 16010 return new Dt(el(e, t.x, i.x, n.x), el(e, t.y, i.y, n.y), el(e, t.z, i.z, n.z)) 16011 }, ((Jc.prototype = Object.create(il.prototype)).constructor = Jc).prototype.getPoint = function(e) { 16012 if (1 === e) return this.v2.clone(); 16013 var t = new Dt; 16014 return t.subVectors(this.v2, this.v1), t.multiplyScalar(e), t.add(this.v1), t 16015 }, (Kc.prototype = Object.create(ol.prototype)).constructor = Kc; 16016 var eu = { 16017 createMultiMaterialObject: function(e, t) { 16018 for (var i = new ra, n = 0, r = t.length; n < r; n++) i.add(new qr(e, t[n])); 16019 return i 16020 }, 16021 detach: function(e, t, i) { 16022 e.applyMatrix(t.matrixWorld), t.remove(e), i.add(e) 16023 }, 16024 attach: function(e, t, i) { 16025 e.applyMatrix((new It).getInverse(i.matrixWorld)), t.remove(e), i.add(e) 16026 } 16027 }; 16028 var tu; 16029 16030 function iu(e) { 16031 console.warn("THREE.ClosedSplineCurve3 has been deprecated. Use THREE.CatmullRomCurve3 instead."), Yc.call(this, e), this.type = "catmullrom", this.closed = !0 16032 } 16033 16034 function nu(e) { 16035 console.warn("THREE.SplineCurve3 has been deprecated. Use THREE.CatmullRomCurve3 instead."), Yc.call(this, e), this.type = "catmullrom" 16036 } 16037 16038 function ru(e) { 16039 console.warn("THREE.Spline has been removed. Use THREE.CatmullRomCurve3 instead."), Yc.call(this, e), this.type = "catmullrom" 16040 } 16041 il.create = function(e, t) { 16042 return console.log("THREE.Curve.create() has been deprecated"), e.prototype = Object.create(il.prototype), (e.prototype.constructor = e).prototype.getPoint = t, e 16043 }, iu.prototype = Object.create(Yc.prototype), nu.prototype = Object.create(Yc.prototype), ru.prototype = Object.create(Yc.prototype), Object.assign(ru.prototype, { 16044 initFromArray: function(e) { 16045 console.error("THREE.Spline: .initFromArray() has been removed.") 16046 }, 16047 getControlPointsArray: function(e) { 16048 console.error("THREE.Spline: .getControlPointsArray() has been removed.") 16049 }, 16050 reparametrizeByArcLength: function(e) { 16051 console.error("THREE.Spline: .reparametrizeByArcLength() has been removed.") 16052 } 16053 }), Dc.prototype.setColors = function() { 16054 console.error("THREE.GridHelper: setColors() has been deprecated, pass them in the constructor instead.") 16055 }, Lc.prototype.update = function() { 16056 console.error("THREE.SkeletonHelper: update() no longer needs to be called.") 16057 }, Object.assign(Pi.prototype, { 16058 center: function(e) { 16059 return console.warn("THREE.Box2: .center() has been renamed to .getCenter()."), this.getCenter(e) 16060 }, 16061 empty: function() { 16062 return console.warn("THREE.Box2: .empty() has been renamed to .isEmpty()."), this.isEmpty() 16063 }, 16064 isIntersectionBox: function(e) { 16065 return console.warn("THREE.Box2: .isIntersectionBox() has been renamed to .intersectsBox()."), this.intersectsBox(e) 16066 }, 16067 size: function(e) { 16068 return console.warn("THREE.Box2: .size() has been renamed to .getSize()."), this.getSize(e) 16069 } 16070 }), Object.assign(an.prototype, { 16071 center: function(e) { 16072 return console.warn("THREE.Box3: .center() has been renamed to .getCenter()."), this.getCenter(e) 16073 }, 16074 empty: function() { 16075 return console.warn("THREE.Box3: .empty() has been renamed to .isEmpty()."), this.isEmpty() 16076 }, 16077 isIntersectionBox: function(e) { 16078 return console.warn("THREE.Box3: .isIntersectionBox() has been renamed to .intersectsBox()."), this.intersectsBox(e) 16079 }, 16080 isIntersectionSphere: function(e) { 16081 return console.warn("THREE.Box3: .isIntersectionSphere() has been renamed to .intersectsSphere()."), this.intersectsSphere(e) 16082 }, 16083 size: function(e) { 16084 return console.warn("THREE.Box3: .size() has been renamed to .getSize()."), this.get
16084Size(e) 16085 } 16086 }), Vr.prototype.center = function(e) { 16087 return console.warn("THREE.Line3: .center() has been renamed to .getCenter()."), this.getCenter(e) 16088 }, st.random16 = function() { 16089 return console.warn("THREE.Math.random16() has been deprecated. Use Math.random() instead."), Math.random() 16090 }, Object.assign(ln.prototype, { 16091 flattenToArrayOffset: function(e, t) { 16092 return console.warn("THREE.Matrix3: .flattenToArrayOffset() has been deprecated. Use .toArray() instead."), this.toArray(e, t) 16093 }, 16094 multiplyVector3: function(e) { 16095 return console.warn("THREE.Matrix3: .multiplyVector3() has been removed. Use vector.applyMatrix3( matrix ) instead."), e.applyMatrix3(this) 16096 }, 16097 multiplyVector3Array: function(e) { 16098 console.error("THREE.Matrix3: .multiplyVector3Array() has been removed.") 16099 }, 16100 applyToBuffer: function(e, t, i) { 16101 return console.warn("THREE.Matrix3: .applyToBuffer() has been removed. Use matrix.applyToBufferAttribute( attribute ) instead."), this.applyToBufferAttribute(e) 16102 }, 16103 applyToVector3Array: function(e, t, i) { 16104 console.error("THREE.Matrix3: .applyToVector3Array() has been removed.") 16105 } 16106 }), Object.assign(It.prototype, { 16107 extractPosition: function(e) { 16108 return console.warn("THREE.Matrix4: .extractPosition() has been renamed to .copyPosition()."), this.copyPosition(e) 16109 }, 16110 flattenToArrayOffset: function(e, t) { 16111 return console.warn("THREE.Matrix4: .flattenToArrayOffset() has been deprecated. Use .toArray() instead."), this.toArray(e, t) 16112 }, 16113 getPosition: function() { 16114 return void 0 === tu && (tu = new Dt), console.warn("THREE.Matrix4: .getPosition() has been removed. Use Vector3.setFromMatrixPosition( matrix ) instead."), tu.setFromMatrixColumn(this, 3) 16115 }, 16116 setRotationFromQuaternion: function(e) { 16117 return console.warn("THREE.Matrix4: .setRotationFromQuaternion() has been renamed to .makeRotationFromQuaternion()."), this.makeRotationFromQuaternion(e) 16118 }, 16119 multiplyToArray: function() { 16120 console.warn("THREE.Matrix4: .multiplyToArray() has been removed.") 16121 }, 16122 multiplyVector3: function(e) { 16123 return console.warn("THREE.Matrix4: .multiplyVector3(
16123) has been removed. Use vector.applyMatrix4( matrix ) instead."), e.applyMatrix4(this) 16124 }, 16125 multiplyVector4: function(e) { 16126 return console.warn("THREE.Matrix4: .multiplyVector4() has been removed. Use vector.applyMatrix4( matrix ) instead."), e.applyMatrix4(this) 16127 }, 16128 multiplyVector3Array: function(e) { 16129 console.error("THREE.Matrix4: .multiplyVector3Array() has been removed.") 16130 }, 16131 rotateAxis: function(e) { 16132 console.warn("THREE.Matrix4: .rotateAxis() has been removed. Use Vector3.transformDirection( matrix ) instead."), e.transformDirection(this) 16133 }, 16134 crossVector: function(e) { 16135 return console.warn("THREE.Matrix4: .crossVector() has been removed. Use vector.applyMatrix4( matrix ) instead."), e.applyMatrix4(this) 16136 }, 16137 translate: function() { 16138 console.error("THREE.Matrix4: .translate() has been removed.") 16139 }, 16140 rotateX: function() { 16141 console.error("THREE.Matrix4: .rotateX() has been removed.") 16142 }, 16143 rotateY: function() { 16144 console.error("THREE.Matrix4: .rotateY() has been removed.") 16145 }, 16146 rotateZ: function() { 16147 console.error("THREE.Matrix4: .rotateZ() has been removed.") 16148 }, 16149 rotateByAxis: function() { 16150 console.error("THREE.Matrix4: .rotateByAxis() has been removed.") 16151 }, 16152 applyToBuffer: function(e, t, i) { 16153 return console.warn("THREE.Matrix4: .applyToBuffer() has been removed. Use matrix.applyToBufferAttribute( attribute ) instead."), this.applyToBufferAttribute(e) 16154 }, 16155 applyToVector3Array: function(e, t, i) { 16156 console.error("THREE.Matrix4: .applyToVector3Array() has been removed.") 16157 }, 16158 makeFrustum: function(e, t, i, n, r, o) { 16159 return console.warn("THREE.Matrix4: .makeFrustum() has been removed. Use .makePerspective( left, right, top, bottom, near, far ) instead."), this.makePerspective(e, t, n, i, r, o) 16160 } 16161 }), cn.prototype.isIntersectionLine = function(e) { 16162 return console.warn("THREE.Plane: .isIntersectionLine() has been renamed to .intersectsLine()."), this.intersectsLine(e) 16163 }, Ot.prototype.multiplyVector3 = function(e) { 16164 return console.warn("THREE.Quaternion: .multiplyVector3(
vendor: 14,396 bytes, lines 16164-16445
16164) has been removed. Use is now vector.applyQuaternion( quaternion ) instead."), e.applyQuaternion(this) 16165 }, Object.assign(Gr.prototype, { 16166 isIntersectionBox: function(e) { 16167 return console.warn("THREE.Ray: .isIntersectionBox() has been renamed to .intersectsBox()."), this.intersectsBox(e) 16168 }, 16169 isIntersectionPlane: function(e) { 16170 return console.warn("THREE.Ray: .isIntersectionPlane() has been renamed to .intersectsPlane()."), this.intersectsPlane(e) 16171 }, 16172 isIntersectionSphere: function(e) { 16173 return console.warn("THREE.Ray: .isIntersectionSphere() has been renamed to .intersectsSphere()."), this.intersectsSphere(e) 16174 } 16175 }), Object.assign(dl.prototype, { 16176 extrude: function(e) { 16177 return console.warn("THREE.Shape: .extrude() has been removed. Use ExtrudeGeometry() instead."), new Aa(this, e) 16178 }, 16179 makeGeometry: function(e) { 16180 return console.warn("THREE.Shape: .makeGeometry() has been removed. Use ShapeGeometry() instead."), new Fa(this, e) 16181 } 16182 }), Object.assign(lt.prototype, { 16183 fromAttribute: function(e, t, i) { 16184 return console.error("THREE.Vector2: .fromAttribute() has been renamed to .fromBufferAttribute()."), this.fromBufferAttribute(e, t, i) 16185 } 16186 }), Object.assign(Dt.prototype, { 16187 setEulerFromRotationMatrix: function() { 16188 console.error("THREE.Vector3: .setEulerFromRotationMatrix() has been removed. Use Euler.setFromRotationMatrix() instead.") 16189 }, 16190 setEulerFromQuaternion: function() { 16191 console.error("THREE.Vector3: .setEulerFromQuaternion() has been removed. Use Euler.setFromQuaternion() instead.") 16192 }, 16193 getPositionFromMatrix: function(e) { 16194 return console.warn("THREE.Vector3: .getPositionFromMatrix() has been renamed to .setFromMatrixPosition()."), this.setFromMatrixPosition(e) 16195 }, 16196 getScaleFromMatrix: function(e) { 16197 return console.warn("THREE.Vector3: .getScaleFromMatrix() has been renamed to .setFromMatrixScale()."), this.setFromMatrixScale(e) 16198 }, 16199 getColumnFromMatrix: function(e, t) { 16200 return console.warn("THREE.Vector3: .getColumnFromMatrix() has been renamed to .setFromMatrixColumn()."), this.setFromMatrixColumn(t, e) 16201 }, 16202 applyProjection: function(e) { 16203 return console.warn("THREE.Vector3: .applyProjection() has been removed. Use .applyMatrix4( m ) instead."), this.applyMatrix4(e) 16204 }, 16205 fromAttribute: function(e, t, i) { 16206 return console.error("THREE.Vector3: .fromAttribute() has been renamed to .fromBufferAttribute()."), this.fromBufferAttribute(e, t, i) 16207 } 16208 }), Object.assign(Lt.prototype, { 16209 fromAttribute: function(e, t, i) { 16210 return console.error("THREE.Vector4: .fromAttribute() has been renamed to .fromBufferAttribute()."), this.fromBufferAttribute(e, t, i) 16211 } 16212 }), Mr.prototype.computeTangents = function() { 16213 console.warn("THREE.Geometry: .computeTangents() has been removed.") 16214 }, Object.assign(On.prototype, { 16215 getChildByName: function(e) { 16216 return console.warn("THREE.Object3D: .getChildByName() has been renamed to .getObjectByName()."), this.getObjectByName(e) 16217 }, 16218 renderDepth: function() { 16219 console.warn("THREE.Object3D: .renderDepth has been removed. Use .renderOrder, instead.") 16220 }, 16221 translate: function(e, t) { 16222 return console.warn("THREE.Object3D: .translate() has been removed. Use .translateOnAxis( axis, distance ) instead."), this.translateOnAxis(t, e) 16223 } 16224 }), Object.defineProperties(On.prototype, { 16225 eulerOrder: { 16226 get: function() { 16227 return console.warn("THREE.Object3D: .eulerOrder is now .rotation.order."), this.rotation.order 16228 }, 16229 set: function(e) { 16230 console.warn("THREE.Object3D: .eulerOrder is now .rotation.order."), this.rotation.order = e 16231 } 16232 }, 16233 useQuaternion: { 16234 get: function() { 16235 console.warn("THREE.Object3D: .useQuaternion has been removed. The library now uses quaternions by default.") 16236 }, 16237 set: function() { 16238 console.warn("THREE.Object3D: .useQuaternion has been removed. The library now uses quaternions by default.") 16239 } 16240 } 16241 }), Object.defineProperties(Xo.prototype, { 16242 objects: { 16243 get: function() { 16244 return console.warn("THREE.LOD: .objects has been renamed to .levels."), this.levels 16245 } 16246 } 16247 }), Object.defineProperty(Yo.prototype, "useVertexTexture", { 16248 get: function() { 16249 console.warn("THREE.Skeleton: useVertexTexture has been removed.") 16250 }, 16251 set: function() { 16252 console.warn("THREE.Skeleton: useVertexTexture has been removed.") 16253 } 16254 }), Object.defineProperty(il.prototype, "__arcLengthDivisions", { 16255 get: function() { 16256 return console.warn("THREE.Curve: .__arcLengthDivisions is now .arcLengthDivisions."), this.arcLengthDivisions 16257 }, 16258 set: function(e) { 16259 console.warn("THREE.Curve: .__arcLengthDivisions is now .arcLengthDivisions."), this.arcLengthDivisions = e 16260 } 16261 }), zn.prototype.setLens = function(e, t) { 16262 console.warn("THREE.PerspectiveCamera.setLens is deprecated. Use .setFocalLength and .filmGauge for a photographic setup."), void 0 !== t && (this.filmGauge = t), this.setFocalLength(e) 16263 }, Object.defineProperties(ps.prototype, { 16264 onlyShadow: { 16265 set: function() { 16266 console.warn("THREE.Light: .onlyShadow has been removed.") 16267 } 16268 }, 16269 shadowCameraFov: { 16270 set: function(e) { 16271 console.warn("THREE.Light: .shadowCameraFov is now .shadow.camera.fov."), this.shadow.camera.fov = e 16272 } 16273 }, 16274 shadowCameraLeft: { 16275 set: function(e) { 16276 console.warn("THREE.Light: .shadowCameraLeft is now .shadow.camera.left."), this.shadow.camera.left = e 16277 } 16278 }, 16279 shadowCameraRight: { 16280 set: function(e) { 16281 console.warn("THREE.Light: .shadowCameraRight is now .shadow.camera.right."), this.shadow.camera.right = e 16282 } 16283 }, 16284 shadowCameraTop: { 16285 set: function(e) { 16286 console.warn("THREE.Light: .shadowCameraTop is now .shadow.camera.top."), this.shadow.camera.top = e 16287 } 16288 }, 16289 shadowCameraBottom: { 16290 set: function(e) { 16291 console.warn("THREE.Light: .shadowCameraBottom is now .shadow.camera.bottom."), this.shadow.camera.bottom = e 16292 } 16293 }, 16294 shadowCameraNear: { 16295 set: function(e) { 16296 console.warn("THREE.Light: .shadowCameraNear is now .shadow.camera.near."), this.shadow.camera.near = e 16297 } 16298 }, 16299 shadowCameraFar: { 16300 set: function(e) { 16301 console.warn("THREE.Light: .shadowCameraFar is now .shadow.camera.far."), this.shadow.camera.far = e 16302 } 16303 }, 16304 shadowCameraVisible: { 16305 set: function() { 16306 console.warn("THREE.Light: .shadowCameraVisible has been removed. Use new THREE.CameraHelper( light.shadow.camera ) instead.") 16307 } 16308 }, 16309 shadowBias: { 16310 set: function(e) { 16311 console.warn("THREE.Light: .shadowBias is now .shadow.bias."), this.shadow.bias = e 16312 } 16313 }, 16314 shadowDarkness: { 16315 set: function() { 16316 console.warn("THREE.Light: .shadowDarkness has been removed.") 16317 } 16318 }, 16319 shadowMapWidth: { 16320 set: function(e) { 16321 console.warn("THREE.Light: .shadowMapWidth is now .shadow.mapSize.width."), this.shadow.mapSize.width = e 16322 } 16323 }, 16324 shadowMapHeight: { 16325 set: function(e) { 16326 console.warn("THREE.Light: .shadowMapHeight is now .shadow.mapSize.height."), this.shadow.mapSize.height = e 16327 } 16328 } 16329 }), Object.defineProperties(Sr.prototype, { 16330 length: { 16331 get: function() { 16332 return console.warn("THREE.BufferAttribute: .length has been deprecated. Use .count instead."), this.array.length 16333 } 16334 } 16335 }), Object.assign(Fr.prototype, { 16336 addIndex: function(e) { 16337 console.warn("THREE.BufferGeometry: .addIndex() has been renamed to .setIndex()."), this.setIndex(e) 16338 }, 16339 addDrawCall: function(e, t, i) { 16340 void 0 !== i && console.warn("THREE.BufferGeometry: .addDrawCall() no longer supports indexOffset."), console.warn("THREE.BufferGeometry: .addDrawCall() is now .addGroup()."), this.addGroup(e, t) 16341 }, 16342 clearDrawCalls: function() { 16343 console.warn("THREE.BufferGeometry: .clearDrawCalls() is now .clearGroups()."), this.clearGroups() 16344 }, 16345 computeTangents: function() { 16346 console.warn("THREE.BufferGeometry: .computeTangents() has been removed.") 16347 }, 16348 computeOffsets: function() { 16349 console.warn("THREE.BufferGeometry: .computeOffsets() has been removed.") 16350 } 16351 }), Object.defineProperties(Fr.prototype, { 16352 drawcalls: { 16353 get: function() { 16354 return console.error("THREE.BufferGeometry: .drawcalls has been renamed to .groups."), this.groups 16355 } 16356 }, 16357 offsets: { 16358 get: function() { 16359 return console.warn("THREE.BufferGeometry: .offsets has been renamed to .groups."), this.groups 16360 } 16361 } 16362 }), Object.defineProperties(mc.prototype, { 16363 dynamic: { 16364 set: function() { 16365 console.warn("THREE.Uniform: .dynamic has been removed. Use object.onBeforeRender() instead.") 16366 } 16367 }, 16368 onUpdate: { 16369 value: function() { 16370 return console.warn("THREE.Uniform: .onUpdate() has been removed. Use object.onBeforeRender() instead."), this 16371 } 16372 } 16373 }), Object.defineProperties(tn.prototype, { 16374 wrapAround: { 16375 get: function() { 16376 console.warn("THREE.Material: .wrapAround has been removed.") 16377 }, 16378 set: function() { 16379 console.warn("THREE.Material: .wrapAround has been removed.") 16380 } 16381 }, 16382 wrapRGB: { 16383 get: function() { 16384 return console.warn("THREE.Material: .wrapRGB has been removed."), new Ei 16385 } 16386 }, 16387 shading: { 16388 get: function() { 16389 console.error("THREE." + this.type + ": .shading has been removed. Use the boolean .flatShading instead.") 16390 }, 16391 set: function(e) { 16392 console.warn("THREE." + this.type + ": .shading has been removed. Use the boolean .flatShading instead."), this.flatShading = 1 === e 16393 } 16394 } 16395 }), Object.defineProperties(Ja.prototype, { 16396 metal: { 16397 get: function() { 16398 return console.warn("THREE.MeshPhongMaterial: .metal has been removed. Use THREE.MeshStandardMaterial instead."), !1 16399 }, 16400 set: function() { 16401 console.warn("THREE.MeshPhongMaterial: .metal has been removed. Use THREE.MeshStandardMaterial instead") 16402 } 16403 } 16404 }), Object.defineProperties(nn.prototype, { 16405 derivatives: { 16406 get: function() { 16407 return console.warn("THREE.ShaderMaterial: .derivatives has been moved to .extensions.derivatives."), this.extensions.derivatives 16408 }, 16409 set: function(e) { 16410 console.warn("THREE. ShaderMaterial: .derivatives has been moved to .extensions.derivatives."), this.extensions.derivatives = e 16411 } 16412 } 16413 }), Object.assign(Ho.prototype, { 16414 getCurrentRenderTarget: function() { 16415 return console.warn("THREE.WebGLRenderer: .getCurrentRenderTarget() is now .getRenderTarget()."), this.getRenderTarget() 16416 }, 16417 getMaxAnisotropy: function() { 16418 return console.warn("THREE.WebGLRenderer: .getMaxAnisotropy() is now .capabilities.getMaxAnisotropy()."), this.capabilities.getMaxAnisotropy() 16419 }, 16420 getPrecision: function() { 16421 return console.warn("THREE.WebGLRenderer: .getPrecision() is now .capabilities.precision."), this.capabilities.precision 16422 }, 16423 supportsFloatTextures: function() { 16424 return console.warn("THREE.WebGLRenderer: .supportsFloatTextures() is now .extensions.get( 'OES_texture_float' )."), this.extensions.get("OES_texture_float") 16425 }, 16426 supportsHalfFloatTextures: function() { 16427 return console.warn("THREE.WebGLRenderer: .supportsHalfFloatTextures() is now .extensions.get( 'OES_texture_half_float' )."), this.extensions.get("OES_texture_half_float") 16428 }, 16429 supportsStandardDerivatives: function() { 16430 return console.warn("THREE.WebGLRenderer: .supportsStandardDerivatives() is now .extensions.get( 'OES_standard_derivatives' )."), this.extensions.get("OES_standard_derivatives") 16431 }, 16432 supportsCompressedTextureS3TC: function() { 16433 return console.warn("THREE.WebGLRenderer: .supportsCompressedTextureS3TC() is now .extensions.get( 'WEBGL_compressed_texture_s3tc' )."), this.extensions.get("WEBGL_compressed_texture_s3tc") 16434 }, 16435 supportsCompressedTexturePVRTC: function() { 16436 return console.warn("THREE.WebGLRenderer: .supportsCompressedTexturePVRTC() is now .extensions.get( 'WEBGL_compressed_texture_pvrtc' )."), this.extensions.get("WEBGL_compressed_texture_pvrtc") 16437 }, 16438 supportsBlendMinMax: function() { 16439 return console.warn("THREE.WebGLRenderer: .supportsBlendMinMax() is now .extensions.get( 'EXT_blend_minmax' )."), this.extensions.get("EXT_blend_minmax") 16440 }, 16441 supportsVertexTextures: function() { 16442 return console.warn("THREE.WebGLRenderer: .supportsVertexTextures() is now .capabilities.vertexTextures."), this.capabilities.vertexTextures 16443 }, 16444 supportsInstancedArrays: function() { 16445 return console.warn("THREE.WebGLRenderer: .supportsInstancedArrays() is now .extensions.get( 'ANGLE_
16445instanced_arrays' )."), this.extensions.get("ANGLE_instanced_arrays") 16446 }, 16447 enableScissorTest: function(e) { 16448 console.warn("THREE.WebGLRenderer: .enableScissorTest() is now .setScissorTest()."), this.setScissorTest(e) 16449 }, 16450 initMaterial: function() { 16451 console.warn("THREE.WebGLRenderer: .initMaterial() has been removed.") 16452 }, 16453 addPrePlugin: function() { 16454 console.warn("THREE.WebGLRenderer: .addPrePlugin() has been removed.") 16455 }, 16456 addPostPlugin: function() { 16457 console.warn("THREE.WebGLRenderer: .addPostPlugin() has been removed.") 16458 }, 16459 updateShadowMap: function() { 16460 console.warn("THREE.WebGLRenderer: .updateShadowMap() has been removed.") 16461 } 16462 }), Object.defineProperties(Ho.prototype, { 16463 shadowMapEnabled: { 16464 get: function() { 16465 return this.shadowMap.enabled 16466 }, 16467 set: function(e) { 16468 console.warn("THREE.WebGLRenderer: .shadowMapEnabled is now .shadowMap.enabled."), this.shadowMap.enabled = e 16469 } 16470 }, 16471 shadowMapType: { 16472 get: function() { 16473 return this.shadowMap.type 16474 }, 16475 set: function(e) { 16476 console.warn("THREE.WebGLRenderer: .shadowMapType is now .shadowMap.type."), this.shadowMap.type = e 16477 } 16478 }, 16479 shadowMapCullFace: { 16480 get: function() { 16481 return this.shadowMap.cullFace 16482 }, 16483 set: function(e) { 16484 console.warn("THREE.WebGLRenderer: .shadowMapCullFace is now .shadowMap.cullFace."), this.shadowMap.cullFace = e 16485 } 16486 } 16487 }), Object.defineProperties(hn.prototype, { 16488 cullFace: { 16489 get: function() { 16490 return this.renderReverseSided ? G : j 16491 }, 16492 set: function(e) { 16493 var t = e !== j; 16494 console.warn("WebGLRenderer: .shadowMap.cullFace is deprecated. Set .shadowMap.renderReverseSided to " + t + "."), this.renderReverseSided = t 16495 } 16496 } 16497 }), Object.defineProperties(Pt.prototype, { 16498 wrapS: { 16499 get: function() { 16500 return console.warn("THREE.WebGLRenderTarget: .wrapS is now .texture.wrapS."), this.texture.wrapS 16501 }, 16502 set: function(e) { 16503 console.warn("THREE.WebGLRenderTarget: .wrapS is now .texture.wrapS."), this.texture.wrapS = e 16504 } 16505 }, 16506 wrapT: { 16507 get: function() { 16508 return console.warn("THREE.WebGLRenderTarget: .wrapT is now .texture.wrapT."), this.texture.wrapT 16509 }, 16510 set: function(e) { 16511 console.warn("THREE.WebGLRenderTarget: .wrapT is now .texture.wrapT."), this.texture.wrapT = e 16512 } 16513 }, 16514 magFilter: { 16515 get: function() { 16516 return console.warn("THREE.WebGLRenderTarget: .magFilter is now .texture.magFilter."), this.texture.magFilter 16517 }, 16518 set: function(e) { 16519 console.warn("THREE.WebGLRenderTarget: .magFilter is now .texture.magFilter."), this.texture.magFilter = e 16520 } 16521 }, 16522 minFilter: { 16523 get: function() { 16524 return console.warn("THREE.WebGLRenderTarget: .minFilter is now .texture.minFilter."), this.texture.minFilter 16525 }, 16526 set: function(e) { 16527 console.warn("THREE.WebGLRenderTarget: .minFilter is now .texture.minFilter."), this.texture.minFilter = e 16528 } 16529 }, 16530 anisotropy: { 16531 get: function() { 16532 return console.warn("THREE.WebGLRenderTarget: .anisotropy is now .texture.anisotropy."), this.texture.anisotropy 16533 }, 16534 set: function(e) { 16535 console.warn("THREE.WebGLRenderTarget: .anisotropy is now .texture.anisotropy."), this.texture.anisotropy = e 16536 } 16537 }, 16538 offset: { 16539 get: function() { 16540 return console.warn("THREE.WebGLRenderTarget: .offset is now .texture.offset."), this.texture.offset 16541 }, 16542 set: function(e) { 16543 console.warn("THREE.WebGLRenderTarget: .offset is now .texture.offset."), this.texture.offset = e 16544 } 16545 }, 16546 repeat: { 16547 get: function() { 16548 return console.warn("THREE.WebGLRenderTarget: .repeat is now .texture.repeat."), this.texture.repeat 16549 }, 16550 set: function(e) { 16551 console.warn("THREE.WebGLRenderTarget: .repeat is now .texture.repeat."), this.texture.repeat = e 16552 } 16553 }, 16554 format: { 16555 get: function() { 16556 return console.warn("THREE.WebGLRenderTarget: .format is now .texture.format."), this.texture.format 16557 }, 16558 set: function(e) { 16559 console.warn("THREE.WebGLRenderTarget: .format is now .texture.format."), this.texture.format = e 16560 } 16561 }, 16562 type: { 16563 get: function() { 16564 return console.warn("THREE.WebGLRenderTarget: .type is now .texture.type."), this.texture.type 16565 }, 16566 set: function(e) { 16567 console.warn("THREE.WebGLRenderTarget: .type is now .texture.type."), this.texture.type = e 16568 } 16569 }, 16570 generateMipmaps: { 16571 get: function() { 16572 return console.warn("THREE.WebGLRenderTarget: .generateMipmaps is now .texture.generateMipmaps."), this.texture.generateMipmaps 16573 }, 16574 set: function(e) { 16575 console.warn("THREE.WebGLRenderTarget: .generateMipmaps is now .texture.generateMipmaps."), this.texture.generateMipmaps = e 16576 } 16577 } 16578 }), ac.prototype.load = function(e) { 16579 console.warn("THREE.Audio: .load has been deprecated. Use THREE.AudioLoader instead."); 16580 var t = this; 16581 return (new ic).load(e, function(e) { 16582 t.setBuffer(e) 16583 }), this 16584 }, lc.prototype.getData = function() { 16585 return console.warn("THREE.AudioAnalyser: .getData() is now .getFrequencyData()."), this.getFrequencyData() 16586 }, rc.prototype.updateCubeMap = function(e, t) { 16587 return console.warn("THREE.CubeCamera: .updateCubeMap() is now .update(
16587)."), this.update(e, t) 16588 }; 16589 var ou = { 16590 merge: function(e, t, i) { 16591 var n; 16592 console.warn("THREE.GeometryUtils: .merge() has been moved to Geometry. Use geometry.merge( geometry2, matrix, materialIndexOffset ) instead."), t.isMesh && (t.matrixAutoUpdate && t.updateMatrix(), n = t.matrix, t = t.geometry), e.merge(t, n, i) 16593 }, 16594 center: function(e) { 16595 return console.warn("THREE.GeometryUtils: .center() has been moved to Geometry. Use geometry.center() instead."), e.center() 16596 } 16597 }, 16598 au = { 16599 crossOrigin: void 0, 16600 loadTexture: function(e, t, i, n) { 16601 console.warn("THREE.ImageUtils.loadTexture has been deprecated. Use THREE.TextureLoader() instead."); 16602 var r = new ds; 16603 r.setCrossOrigin(this.crossOrigin); 16604 var o = r.load(e, i, void 0, n); 16605 return t && (o.mapping = t), o 16606 }, 16607 loadTextureCube: function(e, t, i, n) { 16608 console.warn("THREE.ImageUtils.loadTextureCube has been deprecated. Use THREE.CubeTextureLoader() instead."); 16609 var r = new hs; 16610 r.setCrossOrigin(this.crossOrigin); 16611 var o = r.load(e, i, void 0, n); 16612 return t && (o.mapping = t), o 16613 }, 16614 loadCompressedTexture: function() { 16615 console.error("THREE.ImageUtils.loadCompressedTexture has been removed. Use THREE.DDSLoader instead.") 16616 }, 16617 loadCompressedTextureCube: function() { 16618 console.error("THREE.ImageUtils.loadCompressedTextureCube has been removed. Use THREE.DDSLoader instead.") 16619 } 16620 }; 16621 e.WebGLRenderTargetCube = kt, e.WebGLRenderTarget = Pt, e.WebGLRenderer = Ho, e.ShaderLib = Li, e.UniformsLib = Ci, e.UniformsUtils = Ai, e.ShaderChunk = Ri, e.FogExp2 = $o, e.Fog = jo, e.Scene = Go, e.LensFlare = Vo, e.Sprite = qo, e.LOD = Xo, e.SkinnedMesh = Qo, e.Skeleton = Yo, e.Bone = Zo, e.Mesh = qr, e.LineSegments = ea, e.LineLoop = ta, e.Line = Ko, e.Points = na, e.Group = ra, e.VideoTexture = oa, e.DataTexture = zt, e.CompressedTexture = aa, e.CubeTexture = Nt, e.CanvasTexture = Oi, e.DepthTexture = sa, e.Texture = Rt, e.CompressedTextureLoader = ls, e.DataTextureLoader = cs, e.CubeTextureLoader = hs, e.TextureLoader = ds, e.ObjectLoader = Ys, e.MaterialLoader = Us, e.BufferGeometryLoader = Bs, e.DefaultLoadingManager = as, e.LoadingManager = os, e.JSONLoader = Xs, e.ImageLoader = us, e.FontLoader = ml, e.FileLoader = ss, e.Loader = qs, e.Cache = rs, e.AudioLoader = ic, e.SpotLightShadow = gs, e.SpotLight = vs, e.PointLight = ys, e.RectAreaLight = _s, e.HemisphereLight = fs, e.DirectionalLightShadow = bs, e.DirectionalLight = ws, e.AmbientLight = xs, e.LightShadow = ms, e.Light = ps, e.StereoCamera = nc, e.PerspectiveCamera = zn, e.OrthographicCamera = In, e.CubeCamera = rc, e.ArrayCamera = zo, e.Camera = Dn, e.AudioListener = oc, e.PositionalAudio = sc, e.AudioContext = tc, e.AudioAnalyser = lc, e.Audio = ac, e.VectorKeyframeTrack = Ls, e.StringKeyframeTrack = Ds, e.QuaternionKeyframeTrack = ks, e.NumberKeyframeTrack = Os, e.ColorKeyframeTrack = zs, e.BooleanKeyframeTrack = Is, e.PropertyMixer = cc, e.PropertyBinding = hc, e.KeyframeTrack = Ns, e.AnimationUtils = Es, e.AnimationObjectGroup = dc, e.AnimationMixer = fc, e.AnimationClip = Fs, e.Uniform = mc, e.InstancedBufferGeometry = gc, e.BufferGeometry = Fr, e.GeometryIdCount = Er, e.Geometry = Mr, e.InterleavedBufferAttribute = vc, e.InstancedInterleavedBuffer = bc, e.InterleavedBuffer = yc, e.InstancedBufferAttribute = wc, e.Face3 = Nn, e.Object3D = On, e.Raycaster = xc, e.Layers = fn, e.EventDispatcher = t, e.Clock = Ec, e.QuaternionLinearInterpolant = Ps, e.LinearInterpolant = Cs, e.DiscreteInterpolant = As, e.CubicInterpolant = Ss, e.Interpolant = Ms, e.Triangle = Wr, e.Math = st, e.Spherical = Mc, e.Cylindrical = Sc, e.Plane = cn, e.Frustum = un, e.Sphere = sn, e.Ray = Gr, e.Matrix4 = It, e.Matrix3 = ln, e.Box3 = an, e.Box2 = Pi, e.Line3 = Vr, e.Euler = pn, e.Vector4 = Lt, e.Vector3 = Dt, e.Vector2 = lt, e.Quaternion = Ot, e.Color = Ei, e.ImmediateRenderObject = Cc, e.VertexNormalsHelper = Ac, e.SpotLightHelper = Rc, e.SkeletonHelper = Lc, e.PointLightHelper = Pc, e.RectAreaLightHelper = kc, e.HemisphereLightHelper = Oc, e.GridHelper = Dc, e.PolarGridHelper = Ic, e.FaceNormalsHelper = zc, e.DirectionalLightHelper = Nc, e.CameraHelper = Fc, e.BoxHelper = Uc, e.Box3Helper = Bc, e.PlaneHelper = Hc, e.ArrowHelper = $c, e.AxisHelper = jc, e.CatmullRomCurve3 = Yc, e.CubicBezierCurve3 = Zc, e.QuadraticBezierCurve3 = Qc, e.LineCurve3 = Jc, e.ArcCurve = Kc, e.EllipseCurve = ol, e.SplineCurve = al, e.CubicBezierCurve = sl, e.QuadraticBezierCurve = ll, e.LineCurve = nl, e.Shape = dl, e.Path = hl, e.ShapePath = pl, e.Font = fl, e.CurvePath
16621= rl, e.Curve = il, e.ShapeUtils = Ca, e.SceneUtils = eu, e.WebGLUtils = Bo, e.WireframeGeometry = la, e.ParametricGeometry = ca, e.ParametricBufferGeometry = ua, e.TetrahedronGeometry = pa, e.TetrahedronBufferGeometry = fa, e.OctahedronGeometry = ma, e.OctahedronBufferGeometry = ga, e.IcosahedronGeometry = va, e.IcosahedronBufferGeometry = ya, e.DodecahedronGeometry = ba, e.DodecahedronBufferGeometry = wa, e.PolyhedronGeometry = ha, e.PolyhedronBufferGeometry = da, e.TubeGeometry = xa, e.TubeBufferGeometry = _a, e.TorusKnotGeometry = Ta, e.TorusKnotBufferGeometry = Ea, e.TorusGeometry = Ma, e.TorusBufferGeometry = Sa, e.TextGeometry = La, e.TextBufferGeometry = Pa, e.SphereGeometry = ka, e.SphereBufferGeometry = Oa, e.RingGeometry = Da, e.RingBufferGeometry = Ia, e.PlaneGeometry = Hr, e.PlaneBufferGeometry = $r, e.LatheGeometry = za, e.LatheBufferGeometry = Na, e.ShapeGeometry = Fa, e.ShapeBufferGeometry = Ua, e.ExtrudeGeometry = Aa, e.ExtrudeBufferGeometry = Ra, e.EdgesGeometry = Ba, e.ConeGeometry = ja, e.ConeBufferGeometry = Ga, e.CylinderGeometry = Ha, e.CylinderBufferGeometry = $a, e.CircleGeometry = Va, e.CircleBufferGeometry = Wa, e.BoxGeometry = Ur, e.BoxBufferGeometry = Br, e.ShadowMaterial = Xa, e.SpriteMaterial = Wo, e.RawShaderMaterial = Ya, e.ShaderMaterial = nn, e.PointsMaterial = ia, e.MeshPhysicalMaterial = Qa, e.MeshStandardMaterial = Za, e.MeshPhongMaterial = Ja, e.MeshToonMaterial = Ka, e.MeshNormalMaterial = es, e.MeshLambertMaterial = ts, e.MeshDepthMaterial = rn, e.MeshDistanceMaterial = on, e.MeshBasicMaterial = jr, e.LineDashedMaterial = is, e.LineBasicMaterial = Jo, e.Material = tn, e.Float64BufferAttribute = Ir, e.Float32BufferAttribute = Dr, e.Uint32BufferAttribute = Or, e.Int32BufferAttribute = kr, e.Uint16BufferAttribute = Pr, e.Int16BufferAttribute = Lr, e.Uint8ClampedBufferAttribute = Rr, e.Uint8BufferAttribute = Ar, e.Int8BufferAttribute = Cr, e.BufferAttribute = Sr, e.REVISION = "87", e.MOUSE = { 16622 LEFT: 0, 16623 MIDDLE: 1, 16624 RIGHT: 2 16625 }, e.CullFaceNone = $, e.CullFaceBack = j, e.CullFaceFront = G, e.CullFaceFrontBack = 3, e.FrontFaceDirectionCW = 0, e.FrontFaceDirectionCCW = 1, e.BasicShadowMap = 0, e.PCFShadowMap = N, e.PCFSoftShadowMap = F, e.FrontSide = I, e.BackSide = Y, e.DoubleSide = Z, e.FlatShading = 1, e.SmoothShading = 2, e.NoColors = Ce, e.FaceColors = 1, e.VertexColors = 2, e.NoBlending = V, e.NormalBlending = W, e.AdditiveBlending = q, e.SubtractiveBlending = X, e.MultiplyBlending = Q, e.CustomBlending = J, e.AddEquation = l, e.SubtractEquation = c, e.ReverseSubtractEquation = u, e.MinEquation = h, e.MaxEquation = d, e.ZeroFactor = p, e.OneFactor = f, e.SrcColorFactor = m, e.OneMinusSrcColorFactor = g, e.SrcAlphaFactor = v, e.OneMinusSrcAlphaFactor = y, e.DstAlphaFactor = b, e.OneMinusDstAlphaFactor = w, e.DstColorFactor = x, e.OneMinusDstColorFactor = _, e.SrcAlphaSaturateFactor = T, e.NeverDepth = K, e.AlwaysDepth = ee, e.LessDepth = te, e.LessEqualDepth = ie, e.EqualDepth = ne, e.GreaterEqualDepth = re, e.GreaterDepth = oe, e.NotEqualDepth = ae, e.MultiplyOperation = U, e.MixOperation = B, e.AddOperation = H, e.NoToneMapping = se, e.LinearToneMapping = Ae, e.ReinhardToneMapping = le, e.Uncharted2ToneMapping = ce, e.CineonToneMapping = ue, e.UVMapping = 300, e.CubeReflectionMapping = he, e.CubeRefractionMapping = de, e.EquirectangularReflectionMapping = pe, e.EquirectangularRefractionMapping = fe, e.SphericalReflectionMapping = me, e.CubeUVReflectionMapping = ge, e.CubeUVRefractionMapping = ve, e.RepeatWrapping = E, e.ClampToEdgeWrapping = M, e.MirroredRepeatWrapping = S, e.NearestFilter = z, e.NearestMipMapNearestFilter = C, e.NearestMipMapLinearFilter = A, e.LinearFilter = R, e.LinearMipMapNearestFilter = L, e.LinearMipMapLinearFilter = P, e.UnsignedByteType = Re, e.ByteType = k, e.ShortType = O, e.UnsignedShortType = D, e.IntType = ye, e.UnsignedIntType = be, e.FloatType = Le, e.HalfFloatType = Pe, e.UnsignedShort4444Type = we, e.UnsignedShort5551Type = xe, e.UnsignedShort565Type = _e, e.UnsignedInt248Type = Te, e.AlphaFormat = Ee, e.RGBFormat = Me, e.RGBAFormat = ke, e.LuminanceFormat = Se, e.LuminanceAlphaFormat = Oe, e.RGBEFormat = De, e.DepthFormat = Ie, e.DepthStencilFormat = ze, e.RGB_S3TC_DXT1_Format = Ne, e.RGBA_S3TC_DXT1_Format = Fe, e.RGBA_S3TC_DXT3_Format = Ue, e.RGBA_S3TC_DXT5_Format = Be, e.RGB_PVRTC_4BPPV1_Format = He, e.RGB_PVRTC_2BPPV1_Format = $e, e.RGBA_PVRTC_4BPPV1_Format = je, e.RGBA_PVRTC_2BPPV1_Format = Ge, e.RGB_ETC1_Format = Ve, e.LoopOnce = 2200, e.LoopRepeat = 2201, e.LoopPingPong = 2202, e.InterpolateDiscrete = We, e.InterpolateLinear = qe, e.InterpolateSmooth = 2302, e.ZeroCurvatureEnding = Xe, e.ZeroSlopeEnding = Ye, e.WrapAroundEnding = Ze, e.TrianglesDrawMode = Qe, e.TriangleStripDrawMode = 1, e.TriangleFanDrawMode = 2, e.LinearEncoding = Je, e.sRGBEncoding = Ke, e.GammaEncoding = et, e.RGBEEncoding = tt, e.LogLuvEncoding = 3003, e.RGBM7Encoding = it, e.RGBM16Encoding = nt, e.RGBDEncoding = rt, e.BasicDepthPacking = ot, e.RGBADepthPacking = at, e.CubeGeometry = Ur, e.Face4 = function(e, t, i, n, r, o, a) { 16626 return console.warn("THREE.Face4 has been removed. A THREE.Face3 will be created instead."), new Nn(e, t, i, r, o, a) 16627 }, e.LineStrip = 0, e.LinePieces = 1, e.MeshFaceMaterial = function(e) { 16628 return console.warn("THREE.MeshFaceMaterial has been removed. Use an Array instead."), e 16629 }, e.MultiMaterial = function(e) { 16630 return void 0 === e && (e = []), console.warn("THREE.MultiMaterial has been removed. Use an Array instead."), e.isMultiMaterial = !0, (e.materials = e).clone = function() { 16631 return e.slice() 16632 }, e 16633 }, e.PointCloud = function(e, t) { 16634 return console.warn("THREE.PointCloud has been renamed to THREE.Points."), new na(e, t) 16635 }, e.Particle = function(e) { 16636 return console.warn("THREE.Particle has been renamed to THREE.Sprite."), new qo(e) 16637 }, e.ParticleSystem = function(e, t) { 16638 return console.warn("THREE.ParticleSystem has been renamed to THREE.Points."), new na(e, t) 16639 }, e.PointCloudMaterial = function(e) { 16640 return console.warn("THREE.PointCloudMaterial has been renamed to THREE.PointsMaterial."), new ia(e) 16641 }, e.ParticleBasicMaterial = function(e) { 16642 return console.warn("THREE.ParticleBasicMaterial has been renamed to THREE.PointsMaterial."), new ia(e) 16643 }, e.ParticleSystemMaterial = function(e) { 16644 return console.warn("THREE.ParticleSystemMaterial has been renamed to THREE.PointsMaterial."), new ia(e) 16645 }, e.Vertex = function(e, t, i) { 16646 return console.warn("THREE.Vertex has been removed. Use THREE.Vector3 instead."), new Dt(e, t, i) 16647 }, e.DynamicBufferAttribute = function(e, t) { 16648 return console.warn("THREE.DynamicBufferAttribute has been removed. Use new THREE.BufferAttribute().setDynamic( true ) instead."), new Sr(e, t).setDynamic(!0) 16649 }, e.Int8Attribute = function(e, t) { 16650 return console.warn("THREE.Int8Attribute has been removed. Use new THREE.Int8BufferAttribute() instead."), new Cr(e, t) 16651 }, e.Uint8Attribute = function(e, t) { 16652 return console.warn("THREE.Uint8Attribute has been removed. Use new THREE.Uint8BufferAttribute() instead."), new Ar(e, t) 16653 }, e.Uint8ClampedAttribute = function(e, t) { 16654 return console.warn("THREE.Uint8ClampedAttribute has been removed. Use new THREE.Uint8ClampedBufferAttribute() instead."), new Rr
16654(e, t) 16655 }, e.Int16Attribute = function(e, t) { 16656 return console.warn("THREE.Int16Attribute has been removed. Use new THREE.Int16BufferAttribute() instead."), new Lr(e, t) 16657 }, e.Uint16Attribute = function(e, t) { 16658 return console.warn("THREE.Uint16Attribute has been removed. Use new THREE.Uint16BufferAttribute() instead."), new Pr(e, t) 16659 }, e.Int32Attribute = function(e, t) { 16660 return console.warn("THREE.Int32Attribute has been removed. Use new THREE.Int32BufferAttribute() instead."), new kr(e, t) 16661 }, e.Uint32Attribute = function(e, t) { 16662 return console.warn("THREE.Uint32Attribute has been removed. Use new THREE.Uint32BufferAttribute() instead."), new Or(e, t) 16663 }, e.Float32Attribute = function(e, t) { 16664 return console.warn("THREE.Float32Attribute has been removed. Use new THREE.Float32BufferAttribute() instead."), new Dr(e, t) 16665 }, e.Float64Attribute = function(e, t) { 16666 return console.warn("THREE.Float64Attribute has been removed. Use new THREE.Float64BufferAttribute() instead."), new Ir(e, t) 16667 }, e.ClosedSplineCurve3 = iu, e.SplineCurve3 = nu, e.Spline = ru, e.BoundingBoxHelper = function(e, t) { 16668 return console.warn("THREE.BoundingBoxHelper has been deprecated. Creating a THREE.BoxHelper instead."), new Uc(e, t) 16669 }, e.EdgesHelper = function(e, t) { 16670 return console.warn("THREE.EdgesHelper has been removed. Use THREE.EdgesGeometry instead."), new ea(new Ba(e.geometry), new Jo({ 16671 color: void 0 !== t ? t : 16777215 16672 })) 16673 }, e.WireframeHelper = function(e, t) { 16674 return console.warn("THREE.WireframeHelper has been removed. Use THREE.WireframeGeometry instead."), new ea(new la(e.geometry), new Jo({ 16675 color: void 0 !== t ? t : 16777215 16676 })) 16677 }, e.XHRLoader = function(e) { 16678 return console.warn("THREE.XHRLoader has been renamed to THREE.FileLoader."), new ss(e) 16679 }, e.BinaryTextureLoader = function(e) { 16680 return console.warn("THREE.BinaryTextureLoader has been renamed to THREE.DataTextureLoader."), new cs(e) 16681 }, e.GeometryUtils = ou, e.ImageUtils = au, e.Projector = function() { 16682 console.error("THREE.Projector has been moved to /examples/js/renderers/Projector.js."), this.projectVector = function(e, t) { 16683 console.warn("THREE.Projector: .projectVector() is now vector.project()."), e.project(t) 16684 }, this.unprojectVector = function(e, t) { 16685 console.warn("THREE.Projector: .unprojectVector() is now vector.unproject()."), e.unproject(t) 16686 }, this.pickingRay = function() { 16687 console.error("THREE.Projector: .pickingRay() is now raycaster.setFromCamera().") 16688 } 16689 }, e.CanvasRenderer = function() { 16690 console.error("THREE.CanvasRenderer has been moved to /examples/js/renderers/CanvasRenderer.js"), this.domElement = document.createElementNS("http://www.w3.org/1999/xhtml", "canvas"), this.clear = function() {}, this.render = function() {}, this.setClearColor = function() {}, this.setSize = function() {} 16691 }, Object.defineProperty(e, "__esModule", { 16692 value: !0 16693 }) 16694}), 16695function(e) { 16696 "use strict"; 16697 "function" == typeof define && define.amd ? define(["jquery"], e) : "undefined" != typeof exports ? module.exports = e(require("jquery")) : e(jQuery) 16698}(function(c) { 16699 "use strict"; 16700 var r, o = window.Slick || {}; 16701 r = 0, (o = function(e, t) { 16702 var i, n = this; 16703 n.defaults = { 16704 accessibility: !0, 16705 adaptiveHeight: !1, 16706 appendArrows: c(e), 16707 appendDots: c(e), 16708 arrows: !0, 16709 asNavFor: null, 16710 prevArrow: '<button class="slick-prev" aria-label="Previous" type="button">Previous</button>', 16711 nextArrow: '<button class="slick-next" aria-label="Next" type="button">Next</button>', 16712 autoplay: !1, 16713 autoplaySpeed: 3e3, 16714 centerMode: !1, 16715 centerPadding: "50px", 16716 cssEase: "ease", 16717 customPaging: function(e, t) { 16718 return c('<button type="button" />').text(t + 1) 16719 }, 16720 dots: !1, 16721 dotsClass: "slick-dots", 16722 draggable: !0, 16723 easing: "linear", 16724 edgeFriction: .35, 16725 fade: !1, 16726 focusOnSelect: !1, 16727 focusOnChange: !1, 16728 infinite: !0, 16729 initialSlide: 0, 16730 lazyLoad: "ondemand", 16731 mobileFirst: !1, 16732 pauseOnHover: !0, 16733 pauseOnFocus: !0, 16734 pauseOnDotsHover: !1, 16735 respondTo: "window", 16736 responsive: null, 16737 rows: 1, 16738 rtl: !1, 16739 slide: "", 16740 slidesPerRow: 1, 16741 slidesToShow: 1, 16742 slidesToScroll: 1, 16743 speed: 500, 16744 swipe: !0, 16745 swipeToSlide: !1, 16746 touchMove: !0, 16747 touchThreshold: 5, 16748 useCSS: !0, 16749 useTransform: !0, 16750 variableWidth: !1, 16751 vertical: !1, 16752 verticalSwiping: !1, 16753 waitForAnimate: !0, 16754 zIndex: 1e3 16755 }, n.initials = { 16756 animating: !1, 16757 dragging: !1, 16758 autoPlayTimer: null, 16759 currentDirection: 0, 16760 currentLeft: null, 16761 currentSlide: 0, 16762 direction: 1, 16763 $dots: null, 16764 listWidth: null, 16765 listHeight: null, 16766 loadIndex: 0, 16767 $nextArrow: null, 16768 $prevArrow: null, 16769 scrolling: !1, 16770 slideCount: null, 16771 slideWidth: null, 16772 $slideTrack: null, 16773 $slides: null, 16774 sliding: !1, 16775 slideOffset: 0, 16776 swipeLeft: null, 16777 swiping: !1, 16778 $list: null, 16779 touchObject: {}, 16780 transformsEnabled: !1, 16781 unslicked: !1 16782 }, c.extend(n, n.initials), n.activeBreakpoint = null, n.animType = null, n.animProp = null, n.breakpoints = [], n.breakpointSettings = [], n.cssTransitions = !1, n.focussed = !1, n.interrupted = !1, n.hidden = "hidden", n.paused = !0, n.positionProp = null, n.respondTo = null, n.rowCount = 1, n.shouldClick = !0, n.$slider = c(e), n.$slidesCache = null, n.transformType = null, n.transitionType = null, n.visibilityChange = "visibilitychange", n.windowWidth = 0, n.windowTimer = null, i = c(e).data("slick") || {}, n.options = c.extend({}, n.defaults, t, i), n.currentSlide = n.options.initialSlide, n.originalSettings = n.options, void 0 !== document.mozHidden ? (n.hidden = "mozHidden", n.visibilityChange = "mozvisibilitychange") : void 0 !== document.webkitHidden && (n.hidden = "webkitHidden", n.visibilityChange = "webkitvisibilitychange"), n.autoPlay = c.proxy(n.autoPlay, n), n.autoPlayClear = c.proxy(n.autoPlayClear, n), n.autoPlayIterator = c.proxy(n.autoPlayIterator, n), n.changeSlide = c.proxy(n.changeSlide, n), n.clickHandler = c.proxy(n.clickHandler, n), n.selectHandler = c.proxy(n.selectHandler, n), n.setPosition = c.proxy(n.setPosition, n), n.swipeHandler = c.proxy(n.swipeHandler, n), n.dragHandler = c.proxy(n.dragHandler, n), n.keyHandler = c.proxy(n.keyHandler, n), n.instanceUid = r++, n.htmlExpr = /^(?:\s*(<[\w\W]+>)[^>]*)$/, n.registerBreakpoints(), n.init(!0) 16783 }).prototype.activateADA = function() { 16784 this.$slideTrack.find(".slick-active").attr({ 16785 "aria-hidden": "false" 16786 }).find("a, input, button, select").attr({ 16787 tabindex: "0" 16788 }) 16789 }, o.prototype.addSlide = o.prototype.slickAdd = function(e, t, i) { 16790 var n = this; 16791 if ("boolean" == typeof t) i = t, t = null; 16792 else if (t < 0 || t >= n.slideCount) return !1; 16793 n.unload(), "number" == typeof t ? 0 === t && 0 === n.$slides.length ? c(e).appendTo(n.$slideTrack) : i ? c(e).insertBefore(n.$slides.eq(t)) : c(e).insertAfter(n.$slides.eq(t)) : !0 === i ? c(e).prependTo(n.$slideTrack) : c(e).appendTo(n.$slideTrack), n.$slides = n.$slideTrack.children(this.options.slide), n.$slideTrack.children(this.options.slide).detach(), n.$slideTrack.append(n.$slides), n.$slides.each(function(e, t) { 16794 c(t).attr("data-slick-index", e) 16795 }), n.$slidesCache = n.$slides, n.reinit() 16796 }, o.prototype.animateHeight = function() { 16797 if (1 === this.options.slidesToShow && !0 === this.options.adaptiveHeight && !1 === this.options.vertical) { 16798 var e = this.$slides.eq(this.currentSlide).outerHeight(!0); 16799 this.$list.animate({ 16800 height: e 16801 }, this.options.speed) 16802 } 16803 }, o.prototype.animateSlide = function(e, t) { 16804 var i = {}, 16805 n = this; 16806 n.animateHeight(), !0 === n.options.rtl && !1 === n.options.vertical && (e = -e), !1 === n.transformsEnabled ? !1 === n.options.vertical ? n.$slideTrack.animate({ 16807 left: e 16808 }, n.options.speed, n.options.easing, t) : n.$slideTrack.animate({ 16809 top: e 16810 }, n.options.speed, n.options.easing, t) : !1 === n.cssTransitions ? (!0 === n.options.rtl && (n.currentLeft = -n.currentLeft), c({ 16811 animStart: n.currentLeft 16812 }).animate({ 16813 animStart: e
vendor: 9,350 bytes, lines 16814-16924
16814 }, { 16815 duration: n.options.speed, 16816 easing: n.options.easing, 16817 step: function(e) { 16818 e = Math.ceil(e), !1 === n.options.vertical ? i[n.animType] = "translate(" + e + "px, 0px)" : i[n.animType] = "translate(0px," + e + "px)", n.$slideTrack.css(i) 16819 }, 16820 complete: function() { 16821 t && t.call() 16822 } 16823 })) : (n.applyTransition(), e = Math.ceil(e), !1 === n.options.vertical ? i[n.animType] = "translate3d(" + e + "px, 0px, 0px)" : i[n.animType] = "translate3d(0px," + e + "px, 0px)", n.$slideTrack.css(i), t && setTimeout(function() { 16824 n.disableTransition(), t.call() 16825 }, n.options.speed)) 16826 }, o.prototype.getNavTarget = function() { 16827 var e = this.options.asNavFor; 16828 return e && null !== e && (e = c(e).not(this.$slider)), e 16829 }, o.prototype.asNavFor = function(t) { 16830 var e = this.getNavTarget(); 16831 null !== e && "object" == typeof e && e.each(function() { 16832 var e = c(this).slick("getSlick"); 16833 e.unslicked || e.slideHandler(t, !0) 16834 }) 16835 }, o.prototype.applyTransition = function(e) { 16836 var t = this, 16837 i = {}; 16838 !1 === t.options.fade ? i[t.transitionType] = t.transformType + " " + t.options.speed + "ms " + t.options.cssEase : i[t.transitionType] = "opacity " + t.options.speed + "ms " + t.options.cssEase, !1 === t.options.fade ? t.$slideTrack.css(i) : t.$slides.eq(e).css(i) 16839 }, o.prototype.autoPlay = function() { 16840 this.autoPlayClear(), this.slideCount > this.options.slidesToShow && (this.autoPlayTimer = setInterval(this.autoPlayIterator, this.options.autoplaySpeed)) 16841 }, o.prototype.autoPlayClear = function() { 16842 this.autoPlayTimer && clearInterval(this.autoPlayTimer) 16843 }, o.prototype.autoPlayIterator = function() { 16844 var e = this, 16845 t = e.currentSlide + e.options.slidesToScroll; 16846 e.paused || e.interrupted || e.focussed || (!1 === e.options.infinite && (1 === e.direction && e.currentSlide + 1 === e.slideCount - 1 ? e.direction = 0 : 0 === e.direction && (t = e.currentSlide - e.options.slidesToScroll, e.currentSlide - 1 == 0 && (e.direction = 1))), e.slideHandler(t)) 16847 }, o.prototype.buildArrows = function() { 16848 var e = this; 16849 !0 === e.options.arrows && (e.$prevArrow = c(e.options.prevArrow).addClass("slick-arrow"), e.$nextArrow = c(e.options.nextArrow).addClass("slick-arrow"), e.slideCount > e.options.slidesToShow ? (e.$prevArrow.removeClass("slick-hidden").removeAttr("aria-hidden tabindex"), e.$nextArrow.removeClass("slick-hidden").removeAttr("aria-hidden tabindex"), e.htmlExpr.test(e.options.prevArrow) && e.$prevArrow.prependTo(e.options.appendArrows), e.htmlExpr.test(e.options.nextArrow) && e.$nextArrow.appendTo(e.options.appendArrows), !0 !== e.options.infinite && e.$prevArrow.addClass("slick-disabled").attr("aria-disabled", "true")) : e.$prevArrow.add(e.$nextArrow).addClass("slick-hidden").attr({ 16850 "aria-disabled": "true", 16851 tabindex: "-1" 16852 })) 16853 }, o.prototype.buildDots = function() { 16854 var e, t, i = this; 16855 if (!0 === i.options.dots && i.slideCount > i.options.slidesToShow) { 16856 for (i.$slider.addClass("slick-dotted"), t = c("<ul />").addClass(i.options.dotsClass), e = 0; e <= i.getDotCount(); e += 1) t.append(c("<li />").append(i.options.customPaging.call(this, i, e))); 16857 i.$dots = t.appendTo(i.options.appendDots), i.$dots.find("li").first().addClass("slick-active") 16858 } 16859 }, o.prototype.buildOut = function() { 16860 var e = this; 16861 e.$slides = e.$slider.children(e.options.slide + ":not(.slick-cloned)").addClass("slick-slide"), e.slideCount = e.$slides.length, e.$slides.each(function(e, t) { 16862 c(t).attr("data-slick-index", e).data("originalStyling", c(t).attr("style") || "") 16863 }), e.$slider.addClass("slick-slider"), e.$slideTrack = 0 === e.slideCount ? c('<div class="slick-track"/>').appendTo(e.$slider) : e.$slides.wrapAll('<div class="slick-track"/>').parent(), e.$list = e.$slideTrack.wrap('<div class="slick-list"/>').parent(), e.$slideTrack.css("opacity", 0), !0 !== e.options.centerMode && !0 !== e.options.swipeToSlide || (e.options.slidesToScroll = 1), c("img[data-lazy]", e.$slider).not("[src]").addClass("slick-loading"), e.setupInfinite(), e.buildArrows(), e.buildDots(), e.updateDots(), e.setSlideClasses("number" == typeof e.currentSlide ? e.currentSlide : 0), !0 === e.options.draggable && e.$list.addClass("draggable") 16864 }, o.prototype.buildRows = function() { 16865 var e, t, i, n, r, o, a, s = this; 16866 if (n = document.createDocumentFragment(), o = s.$slider.children(), 0 < s.options.rows) { 16867 for (a = s.options.slidesPerRow * s.options.rows, r = Math.ceil(o.length / a), e = 0; e < r; e++) { 16868 var l = document.createElement("div"); 16869 for (t = 0; t < s.options.rows; t++) { 16870 var c = document.createElement("div"); 16871 for (i = 0; i < s.options.slidesPerRow; i++) { 16872 var u = e * a + (t * s.options.slidesPerRow + i); 16873 o.get(u) && c.appendChild(o.get(u)) 16874 } 16875 l.appendChild(c) 16876 } 16877 n.appendChild(l) 16878 } 16879 s.$slider.empty().append(n), s.$slider.children().children().children().css({ 16880 width: 100 / s.options.slidesPerRow + "%", 16881 display: "inline-block" 16882 }) 16883 } 16884 }, o.prototype.checkResponsive = function(e, t) { 16885 var i, n, r, o = this, 16886 a = !1, 16887 s = o.$slider.width(), 16888 l = window.innerWidth || c(window).width(); 16889 if ("window" === o.respondTo ? r = l : "slider" === o.respondTo ? r = s : "min" === o.respondTo && (r = Math.min(l, s)), o.options.responsive && o.options.responsive.length && null !== o.options.responsive) { 16890 for (i in n = null, o.breakpoints) o.breakpoints.hasOwnProperty(i) && (!1 === o.originalSettings.mobileFirst ? r < o.breakpoints[i] && (n = o.breakpoints[i]) : r > o.breakpoints[i] && (n = o.breakpoints[i])); 16891 null !== n ? null !== o.activeBreakpoint ? (n !== o.activeBreakpoint || t) && (o.activeBreakpoint = n, "unslick" === o.breakpointSettings[n] ? o.unslick(n) : (o.options = c.extend({}, o.originalSettings, o.breakpointSettings[n]), !0 === e && (o.currentSlide = o.options.initialSlide), o.refresh(e)), a = n) : (o.activeBreakpoint = n, "unslick" === o.breakpointSettings[n] ? o.unslick(n) : (o.options = c.extend({}, o.originalSettings, o.breakpointSettings[n]), !0 === e && (o.currentSlide = o.options.initialSlide), o.refresh(e)), a = n) : null !== o.activeBreakpoint && (o.activeBreakpoint = null, o.options = o.originalSettings, !0 === e && (o.currentSlide = o.options.initialSlide), o.refresh(e), a = n), e || !1 === a || o.$slider.trigger("breakpoint", [o, a]) 16892 } 16893 }, o.prototype.changeSlide = function(e, t) { 16894 var i, n, r = this, 16895 o = c(e.currentTarget); 16896 switch (o.is("a") && e.preventDefault(), o.is("li") || (o = o.closest("li")), i = r.slideCount % r.options.slidesToScroll != 0 ? 0 : (r.slideCount - r.currentSlide) % r.options.slidesToScroll, e.data.message) { 16897 case "previous": 16898 n = 0 === i ? r.options.slidesToScroll : r.options.slidesToShow - i, r.slideCount > r.options.slidesToShow && r.slideHandler(r.currentSlide - n, !1, t); 16899 break; 16900 case "next": 16901 n = 0 === i ? r.options.slidesToScroll : i, r.slideCount > r.options.slidesToShow && r.slideHandler(r.currentSlide + n, !1, t); 16902 break; 16903 case "index": 16904 var a = 0 === e.data.index ? 0 : e.data.index || o.index() * r.options.slidesToScroll; 16905 r.slideHandler(r.checkNavigable(a), !1, t), o.children().trigger("focus"); 16906 break; 16907 default: 16908 return 16909 } 16910 }, o.prototype.checkNavigable = function(e) { 16911 var t, i; 16912 if (i = 0, e > (t = this.getNavigableIndexes())[t.length - 1]) e = t[t.length - 1]; 16913 else 16914 for (var n in t) { 16915 if (e < t[n]) { 16916 e = i; 16917 break 16918 } 16919 i = t[n] 16920 } 16921 return e 16922 }, o.prototype.cleanUpEvents = function() { 16923 var e = this; 16924 e.options.dots && null !== e.$dots && (c("li", e.$dots).off("click.slick", e.changeSlide).off("mouseenter.slick", c.proxy(e.interrupt, e, !0)).off("mouseleave.slick", c.proxy(e.interrupt, e, !1)), !0 === e.options.accessibility && e.$dots.off("keydown.slick", e.keyHandler)), e.$slider.off("focus.slick blur.slick"), !0 === e.options.arrows && e.slideCount > e.options.slidesToShow && (e.$prevArrow && e.$prevArrow.off("click.slick", e.changeSlide), e.$nextArrow && e.$nextArrow.off("click.slick", e.changeSlide), !0 === e.options.accessibility && (e.$prevArrow && e.$prevArrow.off("keydown.slick", e.keyHandler), e.$nextArrow && e.$nextArrow.off("keydown.slick", e.keyHandler))), e.$list.off("touchstart.slick mousedown.slick", e.swipeHandler), e.$list.off("touchmove.slick mousemove.slick", e.swipeHandler), e.$list.off("touchend.slick mouseup.slick", e.swipeHandler), e.$list.off("touchcancel.
16924slick mouseleave.slick", e.swipeHandler), e.$list.off("click.slick", e.clickHandler), c(document).off(e.visibilityChange, e.visibility), e.cleanUpSlideEvents(), !0 === e.options.accessibility && e.$list.off("keydown.slick", e.keyHandler), !0 === e.options.focusOnSelect && c(e.$slideTrack).children().off("click.slick", e.selectHandler), c(window).off("orientationchange.slick.slick-" + e.instanceUid, e.orientationChange), c(window).off("resize.slick.slick-" + e.instanceUid, e.resize), c("[draggable!=true]", e.$slideTrack).off("dragstart", e.preventDefault), c(window).off("load.slick.slick-" + e.instanceUid, e.setPosition) 16925 }, o.prototype.cleanUpSlideEvents = function() { 16926 this.$list.off("mouseenter.slick", c.proxy(this.interrupt, this, !0)), this.$list.off("mouseleave.slick", c.proxy(this.interrupt, this, !1)) 16927 }, o.prototype.cleanUpRows = function() { 16928 var e; 16929 0 < this.options.rows && ((e = this.$slides.children().children()).removeAttr("style"), this.$slider.empty().append(e)) 16930 }, o.prototype.clickHandler = function(e) { 16931 !1 === this.shouldClick && (e.stopImmediatePropagation(), e.stopPropagation(), e.preventDefault()) 16932 }, o.prototype.destroy = function(e) { 16933 var t = this; 16934 t.autoPlayClear(), t.touchObject = {}, t.cleanUpEvents(), c(".slick-cloned", t.$slider).detach(), t.$dots && t.$dots.remove(), t.$prevArrow && t.$prevArrow.length && (t.$prevArrow.removeClass("slick-disabled slick-arrow slick-hidden").removeAttr("aria-hidden aria-disabled tabindex").css("display", ""), t.htmlExpr.test(t.options.prevArrow) && t.$prevArrow.remove()), t.$nextArrow && t.$nextArrow.length && (t.$nextArrow.removeClass("slick-disabled slick-arrow slick-hidden").removeAttr("aria-hidden aria-disabled tabindex").css("display", ""), t.htmlExpr.test(t.options.nextArrow) && t.$nextArrow.remove()), t.$slides && (t.$slides.removeClass("slick-slide slick-active slick-center slick-visible slick-current").removeAttr("aria-hidden").removeAttr("data-slick-index").each(function() { 16935 c(this).attr("style", c(this).data("originalStyling")) 16936 }), t.$slideTrack.children(this.options.slide).detach(), t.$slideTrack.detach(), t.$list.detach(), t.$slider.append(t.$slides)), t.cleanUpRows(), t.$slider.removeClass("slick-slider"), t.$slider.removeClass("slick-initialized"), t.$slider.removeClass("slick-dotted"), t.unslicked = !0, e || t.$slider.trigger("destroy", [t]) 16937 }, o.prototype.disableTransition = function(e) { 16938 var t = {}; 16939 t[this.transitionType] = "", !1 === this.options.fade ? this.$slideTrack.css(t) : this.$slides.eq(e).css(t) 16940 }, o.prototype.fadeSlide = function(e, t) { 16941 var i = this; 16942 !1 === i.cssTransitions ? (i.$slides.eq(e).css({ 16943 zIndex: i.options.zIndex 16944 }), i.$slides.eq(e).animate({ 16945 opacity: 1 16946 }, i.options.speed, i.options.easing, t)) : (i.applyTransition(e), i.$slides.eq(e).css({ 16947 opacity: 1, 16948 zIndex: i.options.zIndex 16949 }), t && setTimeout(function() { 16950 i.disableTransition(e), t.call() 16951 }, i.options.speed)) 16952 }, o.prototype.fadeSlideOut = function(e) { 16953 !1 === this.cssTransitions ? this.$slides.eq(e).animate({ 16954 opacity: 0, 16955 zIndex: this.options.zIndex - 2 16956 }, this.options.speed, this.options.easing) : (this.applyTransition(e), this.$slides.eq(e).css({ 16957 opacity: 0, 16958 zIndex: this.options.zIndex - 2 16959 })) 16960 }, o.prototype.filterSlides = o.prototype.slickFilter = function(e) { 16961 null !== e && (this.$slidesCache = this.$slides, this.unload(), this.$slideTrack.children(this.options.slide).detach(), this.$slidesCache.filter(e).appendTo(this.$slideTrack), this.reinit()) 16962 }, o.prototype.focusHandler = function() { 16963 var i = this; 16964 i.$slider.off("focus.slick blur.slick").on("focus.slick blur.slick", "*", function(e) { 16965 e.stopImmediatePropagation(); 16966 var t = c(this); 16967 setTimeout(function() { 16968 i.options.pauseOnFocus && (i.focussed = t.is(":focus"), i.autoPlay()) 16969 }, 0) 16970 }) 16971 }, o.prototype.getCurrent = o.prototype.slickCurrentSlide = function() { 16972 return this.currentSlide 16973 }, o.prototype.getDotCount = function() { 16974 var e = this, 16975 t = 0, 16976 i = 0, 16977 n = 0; 16978 if (!0 === e.options.infinite) 16979 if (e.slideCount <= e.options.slidesToShow) ++n; 16980 else 16981 for (; t < e.slideCount;) ++n, t = i + e.options.slidesToScroll, i += e.options.slidesToScroll <= e.options.slidesToShow ? e.options.slidesToScroll : e.options.slidesToShow; 16982 else if (!0 === e.options.centerMode) n = e.slideCount; 16983 else if (e.options.asNavFor) 16984 for (; t < e.slideCount;) ++n, t = i + e.options.slidesToScroll, i += e.options.slidesToScroll <= e.options.slidesToShow ? e.options.slidesToScroll : e.options.slidesToShow;
16985 else n = 1 + Math.ceil((e.slideCount - e.options.slidesToShow) / e.options.slidesToScroll); 16986 return n - 1 16987 }, o.prototype.getLeft = function(e) { 16988 var t, i, n, r, o = this, 16989 a = 0; 16990 return o.slideOffset = 0, i = o.$slides.first().outerHeight(!0), !0 === o.options.infinite ? (o.slideCount > o.options.slidesToShow && (o.slideOffset = o.slideWidth * o.options.slidesToShow * -1, r = -1, !0 === o.options.vertical && !0 === o.options.centerMode && (2 === o.options.slidesToShow ? r = -1.5 : 1 === o.options.slidesToShow && (r = -2)), a = i * o.options.slidesToShow * r), o.slideCount % o.options.slidesToScroll != 0 && e + o.options.slidesToScroll > o.slideCount && o.slideCount > o.options.slidesToShow && (e > o.slideCount ? (o.slideOffset = (o.options.slidesToShow - (e - o.slideCount)) * o.slideWidth * -1, a = (o.options.slidesToShow - (e - o.slideCount)) * i * -1) : (o.slideOffset = o.slideCount % o.options.slidesToScroll * o.slideWidth * -1, a = o.slideCount % o.options.slidesToScroll * i * -1))) : e + o.options.slidesToShow > o.slideCount && (o.slideOffset = (e + o.options.slidesToShow - o.slideCount) * o.slideWidth, a = (e + o.options.slidesToShow - o.slideCount) * i), o.slideCount <= o.options.slidesToShow && (a = o.slideOffset = 0), !0 === o.options.centerMode && o.slideCount <= o.options.slidesToShow ? o.slideOffset = o.slideWidth * Math.floor(o.options.slidesToShow) / 2 - o.slideWidth * o.slideCount / 2 : !0 === o.options.centerMode && !0 === o.options.infinite ? o.slideOffset += o.slideWidth * Math.floor(o.options.slidesToShow / 2) - o.slideWidth : !0 === o.options.centerMode && (o.slideOffset = 0, o.slideOffset += o.slideWidth * Math.floor(o.options.slidesToShow / 2)), t = !1 === o.options.vertical ? e * o.slideWidth * -1 + o.slideOffset : e * i * -1 + a, !0 === o.options.variableWidth && (n = o.slideCount <= o.options.slidesToShow || !1 === o.options.infinite ? o.$slideTrack.children(".slick-slide").eq(e) : o.$slideTrack.children(".slick-slide").eq(e + o.options.slidesToShow), t = !0 === o.options.rtl ? n[0] ? -1 * (o.$slideTrack.width() - n[0].offsetLeft - n.width()) : 0 : n[0] ? -1 * n[0].offsetLeft : 0, !0 === o.options.centerMode && (n = o.slideCount <= o.options.slidesToShow || !1 === o.options.infinite ? o.$slideTrack.children(".slick-slide").eq(e) : o.$slideTrack.children(".slick-slide").eq(e + o.options.slidesToShow + 1), t = !0 === o.options.rtl ? n[0] ? -1 * (o.$slideTrack.width() - n[0].offsetLeft - n.width()) : 0 : n[0] ? -1 * n[0].offsetLeft : 0, t += (o.$list.width() - n.outerWidth()) / 2)), t 16991 }, o.prototype.getOption = o.prototype.slickGetOption = function(e) { 16992 return this.options[e] 16993 }, o.prototype.getNavigableIndexes = function() { 16994 var e, t = this, 16995 i = 0, 16996 n = 0, 16997 r = []; 16998 for (!1 === t.options.infinite ? e = t.slideCount : (i = -1 * t.options.slidesToScroll, n = -1 * t.options.slidesToScroll, e = 2 * t.slideCount); i < e;) r.push(i), i = n + t.options.slidesToScroll, n += t.options.slidesToScroll <= t.options.slidesToShow ? t.options.slidesToScroll : t.options.slidesToShow; 16999 return r 17000 }, o.prototype.getSlick = function() { 17001 return this 17002 }, o.prototype.getSlideCount = function() { 17003 var i, n, r = this; 17004 return n = !0 === r.options.centerMode ? r.slideWidth * Math.floor(r.options.slidesToShow / 2) : 0, !0 === r.options.swipeToSlide ? (r.$slideTrack.find(".slick-slide").each(function(e, t) { 17005 if (t.offsetLeft - n + c(t).outerWidth() / 2 > -1 * r.swipeLeft) return i = t, !1 17006 }), Math.abs(c(i).attr("data-slick-index") - r.currentSlide) || 1) : r.options.slidesToScroll 17007 }, o.prototype.goTo = o.prototype.slickGoTo = function(e, t) { 17008 this.changeSlide({ 17009 data: { 17010 message: "index", 17011 index: parseInt(e) 17012 } 17013 }, t) 17014 }, o.prototype.init = function(e) { 17015 var t = this; 17016 c(t.$slider).hasClass("slick-initialized") || (c(t.$slider).addClass("slick-initialized"), t.buildRows(), t.buildOut(), t.setProps(), t.startLoad(), t.loadSlider(), t.initializeEvents(), t.updateArrows(), t.updateDots(), t.checkResponsive(!0), t.focusHandler()), e && t.$slider.trigger("init", [t]), !0 === t.options.accessibility && t.initADA(), t.options.autoplay && (t.paused = !1, t.autoPlay()) 17017 }, o.prototype.initADA = function() { 17018 var n = this, 17019 i = Math.ceil(n.slideCount / n.options.slidesToShow), 17020 r = n.getNavigableIndexes().filter(function(e) { 17021 return 0 <= e && e < n.slideCount 17022 }); 17023 n.$slides.add(n.$slideTrack.find(".slick-cloned")).attr({ 17024 "aria-hidden": "true", 17025 tabindex: "-1" 17026 }).find("a, input, button, select").attr({ 17027 tabindex: "-1" 17028 }), null !== n.$dots && (n.$slides.not(n.$slideTrack.find(".slick-cloned")).each(function(e) { 17029 var t = r.indexOf(e); 17030 if (c(this).attr({ 17031 role: "tabpanel", 17032 id: "slick-slide" + n.instanceUid + e, 17033 tabindex: -1 17034 }), -1 !== t) { 17035 var i = "slick-slide-control" + n.instanceUid + t; 17036 c("#" + i).length && c(this).attr({ 17037 "aria-describedby": i 17038 }) 17039 } 17040 }), n.$dots.attr("role", "tablist").find("li").each(function(e) { 17041 var t = r[e]; 17042 c(this).attr({ 17043 role: "presentation" 17044 }), c(this).find("button").first().attr({ 17045 role: "tab", 17046 id: "slick-slide-control" + n.instanceUid + e, 17047 "aria-controls": "slick-slide" + n.instanceUid + t, 17048 "aria-label": e + 1 + " of " + i, 17049 "aria-selected": null, 17050 tabindex: "-1" 17051 }) 17052 }).eq(n.currentSlide).find("button").attr({ 17053 "aria-selected": "true", 17054 tabindex: "0" 17055 }).end()); 17056 for (var e = n.currentSlide, t = e + n.options.slidesToShow; e < t; e++) n.options.focusOnChange ? n.$slides.eq(e).attr({ 17057 tabindex: "0" 17058 }) : n.$slides.eq(e).removeAttr("tabindex"); 17059 n.activateADA() 17060 }, o.prototype.initArrowEvents = function() { 17061 var e = this; 17062 !0 === e.options.arrows && e.slideCount > e.options.slidesToShow && (e.$prevArrow.off("click.slick").on("click.slick", { 17063 message: "previous" 17064 }, e.changeSlide), e.$nextArrow.off("click.slick").on("click.slick", { 17065 message: "next" 17066 }, e.changeSlide), !0 === e.options.accessibility && (e.$prevArrow.on("keydown.slick", e.keyHandler), e.$nextArrow.on("keydown.slick", e.keyHandler))) 17067 }, o.prototype.initDotEvents = function() { 17068 var e = this; 17069 !0 === e.options.dots && e.slideCount > e.options.slidesToShow && (c("li", e.$dots).on("click.slick", { 17070 message: "index" 17071 }, e.changeSlide), !0 === e.options.accessibility && e.$dots.on("keydown.slick", e.keyHandler)), !0 === e.options.dots && !0 === e.options.pauseOnDotsHover && e.slideCount > e.options.slidesToShow && c("li", e.$dots).on("mouseenter.slick", c.proxy(e.interrupt, e, !0)).on("mouseleave.
vendor: 14,149 bytes, lines 17071-17256
17071slick", c.proxy(e.interrupt, e, !1)) 17072 }, o.prototype.initSlideEvents = function() { 17073 this.options.pauseOnHover && (this.$list.on("mouseenter.slick", c.proxy(this.interrupt, this, !0)), this.$list.on("mouseleave.slick", c.proxy(this.interrupt, this, !1))) 17074 }, o.prototype.initializeEvents = function() { 17075 var e = this; 17076 e.initArrowEvents(), e.initDotEvents(), e.initSlideEvents(), e.$list.on("touchstart.slick mousedown.slick", { 17077 action: "start" 17078 }, e.swipeHandler), e.$list.on("touchmove.slick mousemove.slick", { 17079 action: "move" 17080 }, e.swipeHandler), e.$list.on("touchend.slick mouseup.slick", { 17081 action: "end" 17082 }, e.swipeHandler), e.$list.on("touchcancel.slick mouseleave.slick", { 17083 action: "end" 17084 }, e.swipeHandler), e.$list.on("click.slick", e.clickHandler), c(document).on(e.visibilityChange, c.proxy(e.visibility, e)), !0 === e.options.accessibility && e.$list.on("keydown.slick", e.keyHandler), !0 === e.options.focusOnSelect && c(e.$slideTrack).children().on("click.slick", e.selectHandler), c(window).on("orientationchange.slick.slick-" + e.instanceUid, c.proxy(e.orientationChange, e)), c(window).on("resize.slick.slick-" + e.instanceUid, c.proxy(e.resize, e)), c("[draggable!=true]", e.$slideTrack).on("dragstart", e.preventDefault), c(window).on("load.slick.slick-" + e.instanceUid, e.setPosition), c(e.setPosition) 17085 }, o.prototype.initUI = function() { 17086 !0 === this.options.arrows && this.slideCount > this.options.slidesToShow && (this.$prevArrow.show(), this.$nextArrow.show()), !0 === this.options.dots && this.slideCount > this.options.slidesToShow && this.$dots.show() 17087 }, o.prototype.keyHandler = function(e) { 17088 e.target.tagName.match("TEXTAREA|INPUT|SELECT") || (37 === e.keyCode && !0 === this.options.accessibility ? this.changeSlide({ 17089 data: { 17090 message: !0 === this.options.rtl ? "next" : "previous" 17091 } 17092 }) : 39 === e.keyCode && !0 === this.options.accessibility && this.changeSlide({ 17093 data: { 17094 message: !0 === this.options.rtl ? "previous" : "next" 17095 } 17096 })) 17097 }, o.prototype.lazyLoad = function() { 17098 var e, t, i, o = this; 17099 17100 function n(e) { 17101 c("img[data-lazy]", e).each(function() { 17102 var e = c(this), 17103 t = c(this).attr("data-lazy"), 17104 i = c(this).attr("data-srcset"), 17105 n = c(this).attr("data-sizes") || o.$slider.attr("data-sizes"), 17106 r = document.createElement("img"); 17107 r.onload = function() { 17108 e.animate({ 17109 opacity: 0 17110 }, 100, function() { 17111 i && (e.attr("srcset", i), n && e.attr("sizes", n)), e.attr("src", t).animate({ 17112 opacity: 1 17113 }, 200, function() { 17114 e.removeAttr("data-lazy data-srcset data-sizes").removeClass("slick-loading") 17115 }), o.$slider.trigger("lazyLoaded", [o, e, t]) 17116 }) 17117 }, r.onerror = function() { 17118 e.removeAttr("data-lazy").removeClass("slick-loading").addClass("slick-lazyload-error"), o.$slider.trigger("lazyLoadError", [o, e, t]) 17119 }, r.src = t 17120 }) 17121 } 17122 if (!0 === o.options.centerMode ? !0 === o.options.infinite ? i = (t = o.currentSlide + (o.options.slidesToShow / 2 + 1)) + o.options.slidesToShow + 2 : (t = Math.max(0, o.currentSlide - (o.options.slidesToShow / 2 + 1)), i = o.options.slidesToShow / 2 + 1 + 2 + o.currentSlide) : (t = o.options.infinite ? o.options.slidesToShow + o.currentSlide : o.currentSlide, i = Math.ceil(t + o.options.slidesToShow), !0 === o.options.fade && (0 < t && t--, i <= o.slideCount && i++)), e = o.$slider.find(".slick-slide").slice(t, i), "anticipated" === o.options.lazyLoad) 17123 for (var r = t - 1, a = i, s = o.$slider.find(".slick-slide"), l = 0; l < o.options.slidesToScroll; l++) r < 0 && (r = o.slideCount - 1), e = (e = e.add(s.eq(r))).add(s.eq(a)), r--, a++; 17124 n(e), o.slideCount <= o.options.slidesToShow ? n(o.$slider.find(".slick-slide")) : o.currentSlide >= o.slideCount - o.options.slidesToShow ? n(o.$slider.find(".slick-cloned").slice(0, o.options.slidesToShow)) : 0 === o.currentSlide && n(o.$slider.find(".slick-cloned").slice(-1 * o.options.slidesToShow)) 17125 }, o.prototype.loadSlider = function() { 17126 this.setPosition(), this.$slideTrack.css({ 17127 opacity: 1 17128 }), this.$slider.removeClass("slick-loading"), this.initUI(), "progressive" === this.options.lazyLoad && this.progressiveLazyLoad() 17129 }, o.prototype.next = o.prototype.slickNext = function() { 17130 this.changeSlide({ 17131 data: { 17132 message: "next" 17133 } 17134 }) 17135 }, o.prototype.orientationChange = function() { 17136 this.checkResponsive(), this.setPosition() 17137 }, o.prototype.pause = o.prototype.slickPause = function() { 17138 this.autoPlayClear(), this.paused = !0 17139 }, o.prototype.play = o.prototype.slickPlay = function() { 17140 this.autoPlay(), this.options.autoplay = !0, this.paused = !1, this.focussed = !1, this.interrupted = !1 17141 }, o.prototype.postSlide = function(e) { 17142 var t = this; 17143 t.unslicked || (t.$slider.trigger("afterChange", [t, e]), t.animating = !1, t.slideCount > t.options.slidesToShow && t.setPosition(), t.swipeLeft = null, t.options.autoplay && t.autoPlay(), !0 === t.options.accessibility && (t.initADA(), t.options.focusOnChange && c(t.$slides.get(t.currentSlide)).attr("tabindex", 0).focus())) 17144 }, o.prototype.prev = o.prototype.slickPrev = function() { 17145 this.changeSlide({ 17146 data: { 17147 message: "previous" 17148 } 17149 }) 17150 }, o.prototype.preventDefault = function(e) { 17151 e.preventDefault() 17152 }, o.prototype.progressiveLazyLoad = function(e) { 17153 e = e || 1; 17154 var t, i, n, r, o, a = this, 17155 s = c("img[data-lazy]", a.$slider); 17156 s.length ? (t = s.first(), i = t.attr("data-lazy"), n = t.attr("data-srcset"), r = t.attr("data-sizes") || a.$slider.attr("data-sizes"), (o = document.createElement("img")).onload = function() { 17157 n && (t.attr("srcset", n), r && t.attr("sizes", r)), t.attr("src", i).removeAttr("data-lazy data-srcset data-sizes").removeClass("slick-loading"), !0 === a.options.adaptiveHeight && a.setPosition(), a.$slider.trigger("lazyLoaded", [a, t, i]), a.progressiveLazyLoad() 17158 }, o.onerror = function() { 17159 e < 3 ? setTimeout(function() { 17160 a.progressiveLazyLoad(e + 1) 17161 }, 500) : (t.removeAttr("data-lazy").removeClass("slick-loading").addClass("slick-lazyload-error"), a.$slider.trigger("lazyLoadError", [a, t, i]), a.progressiveLazyLoad()) 17162 }, o.src = i) : a.$slider.trigger("allImagesLoaded", [a]) 17163 }, o.prototype.refresh = function(e) { 17164 var t, i, n = this; 17165 i = n.slideCount - n.options.slidesToShow, !n.options.infinite && n.currentSlide > i && (n.currentSlide = i), n.slideCount <= n.options.slidesToShow && (n.currentSlide = 0), t = n.currentSlide, n.destroy(!0), c.extend(n, n.initials, { 17166 currentSlide: t 17167 }), n.init(), e || n.changeSlide({ 17168 data: { 17169 message: "index", 17170 index: t 17171 } 17172 }, !1) 17173 }, o.prototype.registerBreakpoints = function() { 17174 var e, t, i, n = this, 17175 r = n.options.responsive || null; 17176 if ("array" === c.type(r) && r.length) { 17177 for (e in n.respondTo = n.options.respondTo || "window", r) 17178 if (i = n.breakpoints.length - 1, r.hasOwnProperty(e)) { 17179 for (t = r[e].breakpoint; 0 <= i;) n.breakpoints[i] && n.breakpoints[i] === t && n.breakpoints.splice(i, 1), i--; 17180 n.breakpoints.push(t), n.breakpointSettings[t] = r[e].settings 17181 } 17182 n.breakpoints.sort(function(e, t) { 17183 return n.options.mobileFirst ? e - t : t - e 17184 }) 17185 } 17186 }, o.prototype.reinit = function() { 17187 var e = this; 17188 e.$slides = e.$slideTrack.children(e.options.slide).addClass("slick-slide"), e.slideCount = e.$slides.length, e.currentSlide >= e.slideCount && 0 !== e.currentSlide && (e.currentSlide = e.currentSlide - e.options.slidesToScroll), e.slideCount <= e.options.slidesToShow && (e.currentSlide = 0), e.registerBreakpoints(), e.setProps(), e.setupInfinite(), e.buildArrows(), e.updateArrows(), e.initArrowEvents(), e.buildDots(), e.updateDots(), e.initDotEvents(), e.cleanUpSlideEvents(), e.initSlideEvents(), e.checkResponsive(!1, !0), !0 === e.options.focusOnSelect && c(e.$slideTrack).children().on("click.slick", e.selectHandler), e.setSlideClasses("number" == typeof e.currentSlide ? e.currentSlide : 0), e.setPosition(), e.focusHandler(), e.paused = !e.options.autoplay, e.autoPlay(), e.$slider.trigger("reInit", [e]) 17189 }, o.prototype.resize = function() { 17190 var e = this; 17191 c(window).width() !== e.windowWidth && (clearTimeout(e.windowDelay), e.windowDelay = window.setTimeout(function() { 17192 e.windowWidth = c(window).width(), e.checkResponsive(), e.unslicked || e.setPosition() 17193 }, 50)) 17194 }, o.prototype.removeSlide = o.prototype.slickRemove = function(e, t, i) { 17195 var n = this; 17196 if (e = "boolean" == typeof e ? !0 === (t = e) ? 0 : n.slideCount - 1 : !0 === t ? --e : e, n.slideCount < 1 || e < 0 || e > n.slideCount - 1) return !1; 17197 n.unload(), !0 === i ? n.$slideTrack.children().remove() : n.$slideTrack.children(this.options.slide).eq(e).remove(), n.$slides = n.$slideTrack.children(this.options.slide), n.$slideTrack.children(this.options.slide).detach(), n.$slideTrack.append(n.$slides), n.$slidesCache = n.$slides, n.reinit() 17198 }, o.prototype.setCSS = function(e) { 17199 var t, i, n = this, 17200 r = {}; 17201 !0 === n.options.rtl && (e = -e), t = "left" == n.positionProp ? Math.ceil(e) + "px" : "0px", i = "top" == n.positionProp ? Math.ceil(e) + "px" : "0px", r[n.positionProp] = e, !1 === n.transformsEnabled || (!(r = {}) === n.cssTransitions ? r[n.animType] = "translate(" + t + ", " + i + ")" : r[n.animType] = "translate3d(" + t + ", " + i + ", 0px)"), n.$slideTrack.css(r) 17202 }, o.prototype.setDimensions = function() { 17203 var e = this; 17204 !1 === e.options.vertical ? !0 === e.options.centerMode && e.$list.css({ 17205 padding: "0px " + e.options.centerPadding 17206 }) : (e.$list.height(e.$slides.first().outerHeight(!0) * e.options.slidesToShow), !0 === e.options.centerMode && e.$list.css({ 17207 padding: e.options.centerPadding + " 0px" 17208 })), e.listWidth = e.$list.width(), e.listHeight = e.$list.height(), !1 === e.options.vertical && !1 === e.options.variableWidth ? (e.slideWidth = Math.ceil(e.listWidth / e.options.slidesToShow), e.$slideTrack.width(Math.ceil(e.slideWidth * e.$slideTrack.children(".slick-slide").length))) : !0 === e.options.variableWidth ? e.$slideTrack.width(5e3 * e.slideCount) : (e.slideWidth = Math.ceil(e.listWidth), e.$slideTrack.height(Math.ceil(e.$slides.first().outerHeight(!0) * e.$slideTrack.children(".slick-slide").length))); 17209 var t = e.$slides.first().outerWidth(!0) - e.$slides.first().width(); 17210 !1 === e.options.variableWidth && e.$slideTrack.children(".slick-slide").width(e.slideWidth - t) 17211 }, o.prototype.setFade = function() { 17212 var i, n = this; 17213 n.$slides.each(function(e, t) { 17214 i = n.slideWidth * e * -1, !0 === n.options.rtl ? c(t).css({ 17215 position: "relative", 17216 right: i, 17217 top: 0, 17218 zIndex: n.options.zIndex - 2, 17219 opacity: 0 17220 }) : c(t).css({ 17221 position: "relative", 17222 left: i, 17223 top: 0, 17224 zIndex: n.options.zIndex - 2, 17225 opacity: 0 17226 }) 17227 }), n.$slides.eq(n.currentSlide).css({ 17228 zIndex: n.options.zIndex - 1, 17229 opacity: 1 17230 }) 17231 }, o.prototype.setHeight = function() { 17232 if (1 === this.options.slidesToShow && !0 === this.options.adaptiveHeight && !1 === this.options.vertical) { 17233 var e = this.$slides.eq(this.currentSlide).outerHeight(!0); 17234 this.$list.css("height", e) 17235 } 17236 }, o.prototype.setOption = o.prototype.slickSetOption = function() { 17237 var e, t, i, n, r, o = this, 17238 a = !1; 17239 if ("object" === c.type(arguments[0]) ? (i = arguments[0], a = arguments[1], r = "multiple") : "string" === c.type(arguments[0]) && (i = arguments[0], n = arguments[1], a = arguments[2], "responsive" === arguments[0] && "array" === c.type(arguments[1]) ? r = "responsive" : void 0 !== arguments[1] && (r = "single")), "single" === r) o.options[i] = n; 17240 else if ("multiple" === r) c.each(i, function(e, t) { 17241 o.options[e] = t 17242 }); 17243 else if ("responsive" === r) 17244 for (t in n) 17245 if ("array" !== c.type(o.options.responsive)) o.options.responsive = [n[t]]; 17246 else { 17247 for (e = o.options.responsive.length - 1; 0 <= e;) o.options.responsive[e].breakpoint === n[t].breakpoint && o.options.responsive.splice(e, 1), e--; 17248 o.options.responsive.push(n[t]) 17249 } 17250 a && (o.unload(), o.reinit()) 17251 }, o.prototype.setPosition = function() { 17252 this.setDimensions(), this.setHeight(), !1 === this.options.fade ? this.setCSS(this.getLeft(this.currentSlide)) : this.setFade(), this.$slider.trigger("setPosition", [this]) 17253 }, o.prototype.setProps = function() { 17254 var e = this, 17255 t = document.body.style; 17256 e.positionProp = !0 === e.options.vertical ? "top" : "left", "top" === e.positionProp ? e.$slider.addClass("slick-vertical") : e.$slider.removeClass("slick-vertical"), void 0 === t.WebkitTransition && void 0 === t.MozTransition && void 0 === t.msTransition || !0 === e.options.useCSS && (e.cssTransitions = !0), e.o
17256ptions.fade && ("number" == typeof e.options.zIndex ? e.options.zIndex < 3 && (e.options.zIndex = 3) : e.options.zIndex = e.defaults.zIndex), void 0 !== t.OTransform && (e.animType = "OTransform", e.transformType = "-o-transform", e.transitionType = "OTransition", void 0 === t.perspectiveProperty && void 0 === t.webkitPerspective && (e.animType = !1)), void 0 !== t.MozTransform && (e.animType = "MozTransform", e.transformType = "-moz-transform", e.transitionType = "MozTransition", void 0 === t.perspectiveProperty && void 0 === t.MozPerspective && (e.animType = !1)), void 0 !== t.webkitTransform && (e.animType = "webkitTransform", e.transformType = "-webkit-transform", e.transitionType = "webkitTransition", void 0 === t.perspectiveProperty && void 0 === t.webkitPerspective && (e.animType = !1)), void 0 !== t.msTransform && (e.animType = "msTransform", e.transformType = "-ms-transform", e.transitionType = "msTransition", void 0 === t.msTransform && (e.animType = !1)), void 0 !== t.transform && !1 !== e.animType && (e.animType = "transform", e.transformType = "transform", e.transitionType = "transition"), e.transformsEnabled = e.options.useTransform && null !== e.animType && !1 !== e.animType 17257 }, o.prototype.setSlideClasses = function(e) { 17258 var t, i, n, r, o = this; 17259 if (i = o.$slider.find(".slick-slide").removeClass("slick-active slick-center slick-current").attr("aria-hidden", "true"), o.$slides.eq(e).addClass("slick-current"), !0 === o.options.centerMode) { 17260 var a = o.options.slidesToShow % 2 == 0 ? 1 : 0; 17261 t = Math.floor(o.options.slidesToShow / 2), !0 === o.options.infinite && (t <= e && e <= o.slideCount - 1 - t ? o.$slides.slice(e - t + a, e + t + 1).addClass("slick-active").attr("aria-hidden", "false") : (n = o.options.slidesToShow + e, i.slice(n - t + 1 + a, n + t + 2).addClass("slick-active").attr("aria-hidden", "false")), 0 === e ? i.eq(i.length - 1 - o.options.slidesToShow).addClass("slick-center") : e === o.slideCount - 1 && i.eq(o.options.slidesToShow).addClass("slick-center")), o.$slides.eq(e).addClass("slick-center") 17262 } else 0 <= e && e <= o.slideCount - o.options.slidesToShow ? o.$slides.slice(e, e + o.options.slidesToShow).addClass("slick-active").attr("aria-hidden", "false") : i.length <= o.options.slidesToShow ? i.addClass("slick-active").attr("aria-hidden", "false") : (r = o.slideCount % o.options.slidesToShow, n = !0 === o.options.infinite ? o.options.slidesToShow + e : e, o.options.slidesToShow == o.options.slidesToScroll && o.slideCount - e < o.options.slidesToShow ? i.slice(n - (o.options.slidesToShow - r), n + r).addClass("slick-active").attr("aria-hidden", "false") : i.slice(n, n + o.options.slidesToShow).addClass("slick-active").attr("aria-hidden", "false")); 17263 "ondemand" !== o.options.lazyLoad && "anticipated" !== o.options.lazyLoad || o.lazyLoad() 17264 }, o.prototype.setupInfinite = function() { 17265 var e, t, i, n = this; 17266 if (!0 === n.options.fade && (n.options.centerMode = !1), !0 === n.options.infinite && !1 === n.options.fade && (t = null, n.slideCount > n.options.slidesToShow)) { 17267 for (i = !0 === n.options.centerMode ? n.options.slidesToShow + 1 : n.options.slidesToShow, e = n.slideCount; e > n.slideCount - i; e -= 1) t = e - 1, c(n.$slides[t]).clone(!0).attr("id", "").attr("data-slick-index", t - n.slideCount).prependTo(n.$slideTrack).addClass("slick-cloned"); 17268 for (e = 0; e < i + n.slideCount; e += 1) t = e, c(n.$slides[t]).clone(!0).attr("id", "").attr("data-slick-index", t + n.slideCount).appendTo(n.$slideTrack).addClass("slick-cloned"); 17269 n.$slideTrack.find(".slick-cloned").find("[id]").each(function() { 17270 c(this).attr("id", "") 17271 }) 17272 } 17273 }, o.prototype.interrupt = function(e) { 17274 e || this.autoPlay(), this.interrupted = e 17275 }, o.prototype.selectHandler = function(e) { 17276 var t = c(e.target).is(".slick-slide") ? c(e.target) : c(e.target).parents(".slick-slide"), 17277 i = parseInt(t.attr("data-slick-index")); 17278 i || (i = 0), this.slideCount <= this.options.slidesToShow ? this.slideHandler(i, !1, !0) : this.slideHandler(i) 17279 }, o.prototype.slideHandler = function(e, t, i) { 17280 var n, r, o, a, s, l, c = this; 17281 if (t = t || !1, !(!0 === c.animating && !0 === c.options.waitForAnimate || !0 === c.options.fade && c.currentSlide === e)) 17282 if (!1 === t && c.asNavFor(e), n = e, s = c.getLeft(n), a = c.getLeft(c.
vendor: 7,286 bytes, lines 17282-17342
17282currentSlide), c.currentLeft = null === c.swipeLeft ? a : c.swipeLeft, !1 === c.options.infinite && !1 === c.options.centerMode && (e < 0 || e > c.getDotCount() * c.options.slidesToScroll)) !1 === c.options.fade && (n = c.currentSlide, !0 !== i && c.slideCount > c.options.slidesToShow ? c.animateSlide(a, function() { 17283 c.postSlide(n) 17284 }) : c.postSlide(n)); 17285 else if (!1 === c.options.infinite && !0 === c.options.centerMode && (e < 0 || e > c.slideCount - c.options.slidesToScroll)) !1 === c.options.fade && (n = c.currentSlide, !0 !== i && c.slideCount > c.options.slidesToShow ? c.animateSlide(a, function() { 17286 c.postSlide(n) 17287 }) : c.postSlide(n)); 17288 else { 17289 if (c.options.autoplay && clearInterval(c.autoPlayTimer), r = n < 0 ? c.slideCount % c.options.slidesToScroll != 0 ? c.slideCount - c.slideCount % c.options.slidesToScroll : c.slideCount + n : n >= c.slideCount ? c.slideCount % c.options.slidesToScroll != 0 ? 0 : n - c.slideCount : n, c.animating = !0, c.$slider.trigger("beforeChange", [c, c.currentSlide, r]), o = c.currentSlide, c.currentSlide = r, c.setSlideClasses(c.currentSlide), c.options.asNavFor && (l = (l = c.getNavTarget()).slick("getSlick")).slideCount <= l.options.slidesToShow && l.setSlideClasses(c.currentSlide), c.updateDots(), c.updateArrows(), !0 === c.options.fade) return !0 !== i ? (c.fadeSlideOut(o), c.fadeSlide(r, function() { 17290 c.postSlide(r) 17291 })) : c.postSlide(r), void c.animateHeight(); 17292 !0 !== i && c.slideCount > c.options.slidesToShow ? c.animateSlide(s, function() { 17293 c.postSlide(r) 17294 }) : c.postSlide(r) 17295 } 17296 }, o.prototype.startLoad = function() { 17297 var e = this; 17298 !0 === e.options.arrows && e.slideCount > e.options.slidesToShow && (e.$prevArrow.hide(), e.$nextArrow.hide()), !0 === e.options.dots && e.slideCount > e.options.slidesToShow && e.$dots.hide(), e.$slider.addClass("slick-loading") 17299 }, o.prototype.swipeDirection = function() { 17300 var e, t, i, n; 17301 return e = this.touchObject.startX - this.touchObject.curX, t = this.touchObject.startY - this.touchObject.curY, i = Math.atan2(t, e), (n = Math.round(180 * i / Math.PI)) < 0 && (n = 360 - Math.abs(n)), n <= 45 && 0 <= n ? !1 === this.options.rtl ? "left" : "right" : n <= 360 && 315 <= n ? !1 === this.options.rtl ? "left" : "right" : 135 <= n && n <= 225 ? !1 === this.options.rtl ? "right" : "left" : !0 === this.options.verticalSwiping ? 35 <= n && n <= 135 ? "down" : "up" : "vertical" 17302 }, o.prototype.swipeEnd = function(e) { 17303 var t, i, n = this; 17304 if (n.dragging = !1, n.swiping = !1, n.scrolling) return n.scrolling = !1; 17305 if (n.interrupted = !1, n.shouldClick = !(10 < n.touchObject.swipeLength), void 0 === n.touchObject.curX) return !1; 17306 if (!0 === n.touchObject.edgeHit && n.$slider.trigger("edge", [n, n.swipeDirection()]), n.touchObject.swipeLength >= n.touchObject.minSwipe) { 17307 switch (i = n.swipeDirection()) { 17308 case "left": 17309 case "down": 17310 t = n.options.swipeToSlide ? n.checkNavigable(n.currentSlide + n.getSlideCount()) : n.currentSlide + n.getSlideCount(), n.currentDirection = 0; 17311 break; 17312 case "right": 17313 case "up": 17314 t = n.options.swipeToSlide ? n.checkNavigable(n.currentSlide - n.getSlideCount()) : n.currentSlide - n.getSlideCount(), n.currentDirection = 1 17315 } 17316 "vertical" != i && (n.slideHandler(t), n.touchObject = {}, n.$slider.trigger("swipe", [n, i])) 17317 } else n.touchObject.startX !== n.touchObject.curX && (n.slideHandler(n.currentSlide), n.touchObject = {}) 17318 }, o.prototype.swipeHandler = function(e) { 17319 var t = this; 17320 if (!(!1 === t.options.swipe || "ontouchend" in document && !1 === t.options.swipe || !1 === t.options.draggable && -1 !== e.type.indexOf("mouse"))) switch (t.touchObject.fingerCount = e.originalEvent && void 0 !== e.originalEvent.touches ? e.originalEvent.touches.length : 1, t.touchObject.minSwipe = t.listWidth / t.options.touchThreshold, !0 === t.options.verticalSwiping && (t.touchObject.minSwipe = t.listHeight / t.options.touchThreshold), e.data.action) { 17321 case "start": 17322 t.swipeStart(e); 17323 break; 17324 case "move": 17325 t.swipeMove(e); 17326 break; 17327 case "end": 17328 t.swipeEnd(e) 17329 } 17330 }, o.prototype.swipeMove = function(e) { 17331 var t, i, n, r, o, a, s = this; 17332 return o = void 0 !== e.originalEvent ? e.originalEvent.touches : null, !(!s.dragging || s.scrolling || o && 1 !== o.length) && (t = s.getLeft(s.currentSlide), s.touchObject.curX = void 0 !== o ? o[0].pageX : e.clientX, s.touchObject.curY = void 0 !== o ? o[0].pageY : e.clientY, s.touchObject.swipeLength = Math.round(Math.sqrt(Math.pow(s.touchObject.curX - s.touchObject.startX, 2))), a = Math.round(Math.sqrt(Math.pow(s.touchObject.curY - s.touchObject.startY, 2))), !s.options.verticalSwiping && !s.swiping && 4 < a ? !(s.scrolling = !0) : (!0 === s.options.verticalSwiping && (s.touchObject.swipeLength = a), i = s.swipeDirection(), void 0 !== e.originalEvent && 4 < s.touchObject.swipeLength && (s.swiping = !0, e.preventDefault()), r = (!1 === s.options.rtl ? 1 : -1) * (s.touchObject.curX > s.touchObject.startX ? 1 : -1), !0 === s.options.verticalSwiping && (r = s.touchObject.curY > s.touchObject.startY ? 1 : -1), n = s.touchObject.swipeLength, (s.touchObject.edgeHit = !1) === s.options.infinite && (0 === s.currentSlide && "right" === i || s.currentSlide >= s.getDotCount() && "left" === i) && (n = s.touchObject.swipeLength * s.options.edgeFriction, s.touchObject.edgeHit = !0), !1 === s.options.vertical ? s.swipeLeft = t + n * r : s.swipeLeft = t + n * (s.$list.height() / s.listWidth) * r, !0 === s.options.verticalSwiping && (s.swipeLeft = t + n * r), !0 !== s.options.fade && !1 !== s.options.touchMove && (!0 === s.animating ? (s.swipeLeft = null, !1) : void s.setCSS(s.swipeLeft)))) 17333 }, o.prototype.swipeStart = function(e) { 17334 var t, i = this; 17335 if (i.interrupted = !0, 1 !== i.touchObject.fingerCount || i.slideCount <= i.options.slidesToShow) return !(i.touchObject = {}); 17336 void 0 !== e.originalEvent && void 0 !== e.originalEvent.touches && (t = e.originalEvent.touches[0]), i.touchObject.startX = i.touchObject.curX = void 0 !== t ? t.pageX : e.clientX, i.touchObject.startY = i.touchObject.curY = void 0 !== t ? t.pageY : e.clientY, i.dragging = !0 17337 }, o.prototype.unfilterSlides = o.prototype.slickUnfilter = function() { 17338 null !== this.$slidesCache && (this.unload(), this.$slideTrack.children(this.options.slide).detach(), this.$slidesCache.appendTo(this.$slideTrack), this.reinit()) 17339 }, o.prototype.unload = function() { 17340 var e = this; 17341 c(".slick-cloned", e.$slider).remove(), e.$dots && e.$dots.remove(), e.$prevArrow && e.htmlExpr.test(e.options.prevArrow) && e.$prevArrow.remove(), e.$nextArrow && e.htmlExpr.test(e.options.nextArrow) && e.$nextArrow.remove(), e.$slides.removeClass("slick-slide slick-active slick-visible slick-current").attr("aria-hidden", "true").css("width", "") 17342 }
17342, o.prototype.unslick = function(e) { 17343 this.$slider.trigger("unslick", [this, e]), this.destroy() 17344 }, o.prototype.updateArrows = function() { 17345 var e = this; 17346 Math.floor(e.options.slidesToShow / 2), !0 === e.options.arrows && e.slideCount > e.options.slidesToShow && !e.options.infinite && (e.$prevArrow.removeClass("slick-disabled").attr("aria-disabled", "false"), e.$nextArrow.removeClass("slick-disabled").attr("aria-disabled", "false"), 0 === e.currentSlide ? (e.$prevArrow.addClass("slick-disabled").attr("aria-disabled", "true"), e.$nextArrow.removeClass("slick-disabled").attr("aria-disabled", "false")) : e.currentSlide >= e.slideCount - e.options.slidesToShow && !1 === e.options.centerMode ? (e.$nextArrow.addClass("slick-disabled").attr("aria-disabled", "true"), e.$prevArrow.removeClass("slick-disabled").attr("aria-disabled", "false")) : e.currentSlide >= e.slideCount - 1 && !0 === e.options.centerMode && (e.$nextArrow.addClass("slick-disabled").attr("aria-disabled", "true"), e.$prevArrow.removeClass("slick-disabled").attr("aria-disabled", "false"))) 17347 }, o.prototype.updateDots = function() { 17348 null !== this.$dots && (this.$dots.find("li").removeClass("slick-active").end(), this.$dots.find("li").eq(Math.floor(this.currentSlide / this.options.slidesToScroll)).addClass("slick-active")) 17349 }, o.prototype.visibility = function() { 17350 this.options.autoplay && (document[this.hidden] ? this.interrupted = !0 : this.interrupted = !1) 17351 }, c.fn.slick = function() { 17352 var e, t, i = arguments[0], 17353 n = Array.prototype.slice.call(arguments, 1), 17354 r = this.length; 17355 for (e = 0; e < r; e++) 17356 if ("object" == typeof i || void 0 === i ? this[e].slick = new o(this[e], i) : t = this[e].slick[i].apply(this[e].slick, n), void 0 !== t) return t; 17357 return this 17358 } 17359}), 17360function(i) { 17361 var n = {}; 17362 17363 function r(e) { 17364 if (n[e]) return n[e].exports; 17365 var t = n[e] = { 17366 i: e, 17367 l: !1, 17368 exports: {} 17369 };
17370 return i[e].call(t.exports, t, t.exports, r), t.l = !0, t.exports 17371 } 17372 r.m = i, r.c = n, r.i = function(e) { 17373 return e 17374 }, r.d = function(e, t, i) { 17375 r.o(e, t) || Object.defineProperty(e, t, { 17376 configurable: !1, 17377 enumerable: !0, 17378 get: i 17379 }) 17380 }, r.n = function(e) { 17381 var t = e && e.__esModule ? function() { 17382 return e.default 17383 } : function() { 17384 return e 17385 }; 17386 return r.d(t, "a", t), t 17387 }, r.o = function(e, t) { 17388 return Object.prototype.hasOwnProperty.call(e, t) 17389 }, r.p = "", r(r.s = 36) 17390}([function(e, t) { 17391 e.exports = jQuery 17392}, function(e, t, i) { 17393 "use strict"; 17394 i.d(t, "a", function() { 17395 return o 17396 }), i.d(t, "b", function() { 17397 return a 17398 }), i.d(t, "c", function() { 17399 return s 17400 }); 17401 var n = i(0), 17402 r = i.n(n); 17403 17404 function o() { 17405 return "rtl" === r()("html").attr("dir") 17406 } 17407 17408 function a(e, t) { 17409 return e = e || 6, Math.round(Math.pow(36, e + 1) - Math.random() * Math.pow(36, e)).toString(36).slice(1) + (t ? "-" + t : "") 17410 } 17411 17412 function s(e) { 17413 var t, i = { 17414 transition: "transitionend", 17415 WebkitTransition: "webkitTransitionEnd", 17416 MozTransition: "transitionend", 17417 OTransition: "otransitionend" 17418 }, 17419 n = document.createElement("div"); 17420 for (var r in i) void 0 !== n.style[r] && (t = i[r]); 17421 return t || (t = setTimeout(function() { 17422 e.triggerHandler("transitionend", [e]) 17423 }, 1), "transitionend") 17424 } 17425}, function(e, t, r) { 17426 "use strict"; 17427 r.d(t, "a", function() { 17428 return n 17429 }); 17430 var i = r(0), 17431 o = (r.n(i), r(1)), 17432 a = function() { 17433 function n(e, t) { 17434 for (var i = 0; i < t.length; i++) { 17435 var n = t[i]; 17436 n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(e, n.key, n) 17437 } 17438 } 17439 return function(e, t, i) { 17440 return t && n(e.prototype, t), i && n(e, i), e 17441 } 17442 }(); 17443 var n = function() { 17444 function n(e, t) { 17445 ! function(e, t) { 17446 if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function") 17447 }(this, n), this._setup(e, t); 17448 var i = l(this); 17449 this.uuid = r.i(o.b)(6, i), this.$element.attr("data-" + i) || this.$element.attr("data-" + i, this.uuid), this.$element.data("zfPlugin") || this.$element.data("zfPlugin", this), this.$element.trigger("init.zf." + i) 17450 } 17451 return a(n, [{ 17452 key: "destroy", 17453 value: function() { 17454 this._destroy(); 17455 var e = l(this); 17456 for (var t in this.$element.removeAttr("data-" + e).removeData("zfPlugin").trigger("destroyed.zf." + e), this) this[t] = null 17457 } 17458 }]), n 17459 }(); 17460 17461 function s(e) { 17462 return e.replace(/([a-z])([A-Z])/g, "$1-$2").toLowerCase() 17463 } 17464 17465 function l(e) { 17466 return void 0 !== e.constructor.name ? s(e.constructor.name) : s(e.className) 17467 } 17468}, function(e, t, s) { 17469 "use strict"; 17470 s.d(t, "a", function() { 17471 return a 17472 }); 17473 var i = s(0), 17474 l = s.n(i), 17475 c = s(1), 17476 n = { 17477 9: "TAB", 17478 13: "ENTER", 17479 27: "ESCAPE", 17480 32: "SPACE", 17481 35: "END", 17482 36: "HOME", 17483 37: "ARROW_LEFT", 17484 38: "ARROW_UP", 17485 39: "ARROW_RIGHT", 17486 40: "ARROW_DOWN" 17487 }, 17488 u = {}; 17489 17490 function r(e) { 17491 return !!e && e.find("a[href], area[href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled]), iframe, object, embed, *[tabindex], *[contenteditable]").filter(function() { 17492 return !(!l()(this).is(":visible") || l()(this).attr("tabindex") < 0) 17493 }) 17494 } 17495 17496 function o(e) { 17497 var t = n[e.which || e.keyCode] || String.fromCharCode(e.which).toUpperCase(); 17498 return t = t.replace(/\W+/, ""), e.shiftKey && (t = "SHIFT_" + t), e.ctrlKey && (t = "CTRL_" + t), e.altKey && (t = "ALT_" + t), t = t.replace(/_$/, "") 17499 } 17500 var a = { 17501 keys: function(e) { 17502 var t = {}; 17503 for (var i in e) t[e[i]] = e[i]; 17504 return t 17505 }(n), 17506 parseKey: o, 17507 handleKey: function(e, t, i) { 17508 var n, r = u[t], 17509 o = this.parseKey(e); 17510 if (!r) return console.warn("Component not defined!"); 17511 if ((n = i[(void 0 === r.ltr ? r : s.i(c.a)() ? l.a.extend({}, r.ltr, r.rtl) : l.a.extend({}, r.rtl, r.ltr))[o]]) && "function" == typeof n) { 17512 var a = n.apply(); 17513 (i.handled || "function" == typeof i.handled) && i.handled(a) 17514 } else(i.unhandled || "function" == typeof i.unhandled) && i.unhandled() 17515 }, 17516 findFocusable: r, 17517 register: function(e, t) { 17518 u[e] = t 17519 }, 17520 trapFocus: function(e) { 17521 var t = r(e), 17522 i = t.eq(0), 17523 n = t.eq(-1);
17524 e.on("keydown.zf.trapfocus", function(e) { 17525 e.target === n[0] && "TAB" === o(e) ? (e.preventDefault(), i.focus()) : e.target === i[0] && "SHIFT_TAB" === o(e) && (e.preventDefault(), n.focus()) 17526 }) 17527 }, 17528 releaseFocus: function(e) { 17529 e.off("keydown.zf.trapfocus") 17530 } 17531 } 17532}, function(e, t, i) { 17533 "use strict"; 17534 i.d(t, "a", function() { 17535 return a 17536 }); 17537 var n = i(0), 17538 r = i.n(n), 17539 o = window.matchMedia || function() { 17540 var t = window.styleMedia || window.media; 17541 if (!t) { 17542 var i, n = document.createElement("style"), 17543 e = document.getElementsByTagName("script")[0]; 17544 n.type = "text/css", n.id = "matchmediajs-test", e && e.parentNode && e.parentNode.insertBefore(n, e), i = "getComputedStyle" in window && window.getComputedStyle(n, null) || n.currentStyle, t = { 17545 matchMedium: function(e) { 17546 var t = "@media " + e + "{ #matchmediajs-test { width: 1px; } }"; 17547 return n.styleSheet ? n.styleSheet.cssText = t : n.textContent = t, "1px" === i.width 17548 } 17549 } 17550 } 17551 return function(e) { 17552 return { 17553 matches: t.matchMedium(e || "all"), 17554 media: e || "all" 17555 } 17556 } 17557 }(), 17558 a = { 17559 queries: [], 17560 current: "", 17561 _init: function() { 17562 r()("meta.foundation-mq").length || r()('<meta class="foundation-mq">').appendTo(document.head); 17563 var e, t = r()(".foundation-mq").css("font-family"); 17564 for (var i in e = function(e) { 17565 var t = {}; 17566 if ("string" != typeof e) return t; 17567 if (!(e = e.trim().slice(1, -1))) return t; 17568 return t = e.split("&").reduce(function(e, t) { 17569 var i = t.replace(/\+/g, " ").split("="), 17570 n = i[0], 17571 r = i[1]; 17572 return n = decodeURIComponent(n), r = void 0 === r ? null : decodeURIComponent(r), e.hasOwnProperty(n) ? Array.isArray(e[n]) ? e[n].push(r) : e[n] = [e[n], r] : e[n] = r, e 17573 }, {}) 17574 }(t)) e.hasOwnProperty(i) && this.queries.push({ 17575 name: i, 17576 value: "only screen and (min-width: " + e[i] + ")" 17577 }); 17578 this.current = this._getCurrentSize(), this._watcher() 17579 }, 17580 atLeast: function(e) { 17581 var t = this.get(e); 17582 return !!t && o(t).matches 17583 }, 17584 is: function(e) { 17585 return 1 < (e = e.trim().split(" ")).length && "only" === e[1] ? e[0] === this._getCurrentSize() : this.atLeast(e[0]) 17586 }, 17587 get: function(e) { 17588 for (var t in this.queries) 17589 if (this.queries.hasOwnProperty(t)) { 17590 var i = this.queries[t]; 17591 if (e === i.name) return i.value 17592 } 17593 return null 17594 }, 17595 _getCurrentSize: function() { 17596 for (var e, t = 0; t < this.queries.length; t++) { 17597 var i = this.queries[t]; 17598 o(i.value).matches && (e = i) 17599 } 17600 return "object" == typeof e ? e.name : e 17601 }, 17602 _watcher: function() { 17603 var i = this; 17604 r()(window).off("resize.zf.mediaquery").on("resize.zf.mediaquery", function() { 17605 var e = i._getCurrentSize(), 17606 t = i.current; 17607 e !== t && (i.current = e, r()(window).trigger("changed.zf.mediaquery", [e, t])) 17608 }) 17609 } 17610 } 17611}, function(e, t, i) { 17612 "use strict"; 17613 i.d(t, "a", function() { 17614 return l 17615 }); 17616 var n = i(0), 17617 o = i.n(n), 17618 r = i(6), 17619 a = function() { 17620 for (var e = ["WebKit", "Moz", "O", "Ms", ""], t = 0; t < e.length; t++) 17621 if (e[t] + "MutationObserver" in window) return window[e[t] + "MutationObserver"]; 17622 return !1 17623 }(), 17624 s = function(t, i) { 17625 t.data(i).split(" ").forEach(function(e) { 17626 o()("#" + e)["close" === i ? "trigger" : "triggerHandler"](i + ".zf.trigger", [t]) 17627 }) 17628 }, 17629 l = { 17630 Listeners: { 17631 Basic: {}, 17632 Global: {} 17633 },
17634 Initializers: {} 17635 }; 17636 17637 function c(t, e, i) { 17638 var n = void 0, 17639 r = Array.prototype.slice.call(arguments, 3); 17640 o()(window).off(e).on(e, function(e) { 17641 n && clearTimeout(n), n = setTimeout(function() { 17642 i.apply(null, r) 17643 }, t || 10) 17644 }) 17645 } 17646 l.Listeners.Basic = { 17647 openListener: function() { 17648 s(o()(this), "open") 17649 }, 17650 closeListener: function() { 17651 o()(this).data("close") ? s(o()(this), "close") : o()(this).trigger("close.zf.trigger") 17652 }, 17653 toggleListener: function() { 17654 o()(this).data("toggle") ? s(o()(this), "toggle") : o()(this).trigger("toggle.zf.trigger") 17655 }, 17656 closeableListener: function(e) { 17657 e.stopPropagation(); 17658 var t = o()(this).data("closable"); 17659 "" !== t ? r.a.animateOut(o()(this), t, function() { 17660 o()(this).trigger("closed.zf") 17661 }) : o()(this).fadeOut().trigger("closed.zf") 17662 }, 17663 toggleFocusListener: function() { 17664 var e = o()(this).data("toggle-focus"); 17665 o()("#" + e).triggerHandler("toggle.zf.trigger", [o()(this)]) 17666 } 17667 }, l.Initializers.addOpenListener = function(e) { 17668 e.off("click.zf.trigger", l.Listeners.Basic.openListener), e.on("click.zf.trigger", "[data-open]", l.Listeners.Basic.openListener) 17669 }, l.Initializers.addCloseListener = function(e) { 17670 e.off("click.zf.trigger", l.Listeners.Basic.closeListener), e.on("click.zf.trigger", "[data-close]", l.Listeners.Basic.closeListener) 17671 }, l.Initializers.addToggleListener = function(e) { 17672 e.off("click.zf.trigger", l.Listeners.Basic.toggleListener), e.on("click.zf.trigger", "[data-toggle]", l.Listeners.Basic.toggleListener) 17673 }, l.Initializers.addCloseableListener = function(e) { 17674 e.off("close.zf.trigger", l.Listeners.Basic.closeableListener), e.on("close.zf.trigger", "[data-closeable], [data-closable]", l.Listeners.Basic.closeableListener) 17675 }, l.Initializers.addToggleFocusListener = function(e) { 17676 e.off("focus.zf.trigger blur.zf.trigger", l.Listeners.Basic.toggleFocusListener), e.on("focus.zf.trigger blur.zf.trigger", "[data-toggle-focus]", l.Listeners.Basic.toggleFocusListener) 17677 }, l.Listeners.Global = { 17678 resizeListener: function(e) { 17679 a || e.each(function() { 17680 o()(this).triggerHandler("resizeme.zf.trigger") 17681 }), e.attr("data-events", "resize") 17682 }, 17683 scrollListener: function(e) { 17684 a || e.each(function() { 17685 o()(this).triggerHandler("scrollme.zf.trigger") 17686 }), e.attr("data-events", "scroll") 17687 }, 17688 closeMeListener: function(e, t) { 17689 var i = e.namespace.split(".")[0]; 17690 o()("[data-" + i + "]").not('[data-yeti-box="' + t + '"]').each(function() { 17691 var e = o()(this); 17692 e.triggerHandler("close.zf.trigger", [e]) 17693 }) 17694 } 17695 }, l.Initializers.addClosemeListener = function(e) { 17696 var t = o()("[data-yeti-box]"), 17697 i = ["dropdown", "tooltip", "reveal"]; 17698 if (e && ("string" == typeof e ? i.push(e) : "object" == typeof e && "string" == typeof e[0] ? i.concat(e) : console.error("Plugin names must be strings")), t.length) { 17699 var n = i.map(function(e) { 17700 return "closeme.zf." + e 17701 }).join(" "); 17702 o()(window).off(n).on(n, l.Listeners.Global.closeMeListener) 17703 } 17704 }, l.Initializers.addResizeListener = function(e) { 17705 var t = o()("[data-resize]"); 17706 t.length && c(e, "resize.zf.trigger", l.Listeners.Global.resizeListener, t) 17707 }, l.Initializers.addScrollListener = function(e) { 17708 var t = o()("[data-scroll]"); 17709 t.length && c(e, "scroll.zf.trigger", l.Listeners.Global.scrollListener, t) 17710 }, l.Initializers.addMutationEventsListener = function(e) { 17711 if (!a) return !1; 17712 var t = e.find("[data-resize], [data-scroll], [data-mutate]"), 17713 i = function(e) { 17714 var t = o()(e[0].target); 17715 switch (e[0].type) { 17716 case "attributes": 17717 "scroll" === t.attr("data-events") && "data-events" === e[0].attributeName && t.triggerHandler("scrollme.zf.trigger", [t, window.pageYOffset]), "resize" === t.attr("data-events") && "data-events" === e[0].attributeName && t.triggerHandler("resizeme.zf.trigger", [t]), "style" === e[0].attributeName && (t.closest("[data-mutate]").attr("data-events", "mutate"), t.closest("[data-mutate]").triggerHandler("mutateme.zf.trigger", [t.closest("[data-mutate]")])); 17718 break; 17719 case "childList": 17720 t.closest("[data-mutate]").attr("data-events", "mutate"), t.closest("[data-mutate]").triggerHandler("mutateme.zf.trigger", [t.closest("[data-mutate]")]); 17721 break; 17722 default: 17723 return !1 17724 } 17725 }; 17726 if (t.length) 17727 for (var n = 0; n <= t.length - 1; n++) { 17728 new a(i).observe(t[n], { 17729 attributes: !0, 17730 childList: !0, 17731 characterData: !1, 17732 subtree: !0, 17733 attributeFilter: ["data-events", "style"] 17734 }) 17735 } 17736 }
17736, l.Initializers.addSimpleListeners = function() { 17737 var e = o()(document); 17738 l.Initializers.addOpenListener(e), l.Initializers.addCloseListener(e), l.Initializers.addToggleListener(e), l.Initializers.addCloseableListener(e), l.Initializers.addToggleFocusListener(e) 17739 }, l.Initializers.addGlobalListeners = function() { 17740 var e = o()(document); 17741 l.Initializers.addMutationEventsListener(e), l.Initializers.addResizeListener(), l.Initializers.addScrollListener(), l.Initializers.addClosemeListener() 17742 }, l.init = function(e, t) { 17743 if (void 0 === e.triggersInitialized) { 17744 e(document); 17745 "complete" === document.readyState ? (l.Initializers.addSimpleListeners(), l.Initializers.addGlobalListeners()) : e(window).on("load", function() { 17746 l.Initializers.addSimpleListeners(), l.Initializers.addGlobalListeners() 17747 }), e.triggersInitialized = !0 17748 } 17749 t && (t.Triggers = l, t.IHearYou = l.Initializers.addGlobalListeners) 17750 } 17751}, function(e, t, s) { 17752 "use strict"; 17753 s.d(t, "b", function() { 17754 return r 17755 }), s.d(t, "a", function() { 17756 return n 17757 }); 17758 var i = s(0), 17759 l = s.n(i), 17760 c = s(1), 17761 u = ["mui-enter", "mui-leave"],
17762 h = ["mui-enter-active", "mui-leave-active"], 17763 n = { 17764 animateIn: function(e, t, i) { 17765 o(!0, e, t, i) 17766 }, 17767 animateOut: function(e, t, i) { 17768 o(!1, e, t, i) 17769 } 17770 }; 17771 17772 function r(i, n, r) { 17773 var o, a, s = null; 17774 if (0 === i) return r.apply(n), void n.trigger("finished.zf.animate", [n]).triggerHandler("finished.zf.animate", [n]); 17775 o = window.requestAnimationFrame(function e(t) { 17776 s || (s = t), a = t - s, r.apply(n), a < i ? o = window.requestAnimationFrame(e, n) : (window.cancelAnimationFrame(o), n.trigger("finished.zf.animate", [n]).triggerHandler("finished.zf.animate", [n])) 17777 }) 17778 } 17779 17780 function o(e, t, i, n) { 17781 if ((t = l()(t).eq(0)).length) { 17782 var r = e ? u[0] : u[1], 17783 o = e ? h[0] : h[1]; 17784 a(), t.addClass(i).css("transition", "none"), requestAnimationFrame(function() { 17785 t.addClass(r), e && t.show() 17786 }), requestAnimationFrame(function() { 17787 t[0].offsetWidth, t.css("transition", "").addClass(o) 17788 }), t.one(s.i(c.c)(t), function() { 17789 e || t.hide(); 17790 a(), n && n.apply(t) 17791 }) 17792 } 17793 17794 function a() { 17795 t[0].style.transitionDuration = 0, t.removeClass(r + " " + o + " " + i) 17796 } 17797 } 17798}, function(e, t, a) { 17799 "use strict"; 17800 a.d(t, "a", function() { 17801 return i 17802 }); 17803 var s = a(1), 17804 i = { 17805 ImNotTouchingYou: function(e, t, i, n, r) { 17806 return 0 === o(e, t, i, n, r) 17807 }, 17808 OverlapArea: o, 17809 GetDimensions: h, 17810 GetOffsets: function(e, t, i, n, r, o) { 17811 switch (console.log("NOTE: GetOffsets is deprecated in favor of GetExplicitOffsets and will be removed in 6.5"), i) { 17812 case "top": 17813 return a.i(s.a)() ? l(e, t, "top", "left", n, r, o) : l(e, t, "top", "right", n, r, o); 17814 case "bottom": 17815 return a.i(s.a)() ? l(e, t, "bottom", "left", n, r, o) : l(e, t, "bottom", "right", n, r, o); 17816 case "center top": 17817 return l(e, t, "top", "center", n, r, o); 17818 case "center bottom": 17819 return l(e, t, "bottom", "center", n, r, o); 17820 case "center left": 17821 return l(e, t, "left", "center", n, r, o); 17822 case "center right": 17823 return l(e, t, "right", "center", n, r, o); 17824 case "left bottom": 17825 return l(e, t, "bottom", "left", n, r, o); 17826 case "right bottom": 17827 return l(e, t, "bottom", "right", n, r, o); 17828 case "center": 17829 return { 17830 left: $eleDims.windowDims.offset.left + $eleDims.windowDims.width / 2 - $eleDims.width / 2 + r, 17831 top: $eleDims.windowDims.offset.top + $eleDims.windowDims.height / 2 - ($eleDims.height / 2 + n) 17832 }; 17833 case "reveal": 17834 return { 17835 left: ($eleDims.windowDims.width - $eleDims.width) / 2 + r, 17836 top: $eleDims.windowDims.offset.top + n 17837 }; 17838 case "reveal full": 17839 return { 17840 left: $eleDims.windowDims.offset.left, 17841 top: $eleDims.windowDims.offset.top 17842 }; 17843 default: 17844 return { 17845 left: a.i(s.a)() ? $anchorDims.offset.left - $eleDims.width + $anchorDims.width - r : $anchorDims.offset.left + r, 17846 top: $anchorDims.offset.top + $anchorDims.height + n 17847 } 17848 } 17849 }, 17850 GetExplicitOffsets: l 17851 }; 17852 17853 function o(e, t, i, n, r) { 17854 var o, a, s, l, c = h(e); 17855 if (t) { 17856 var u = h(t); 17857 a = u.height + u.offset.top - (c.offset.top + c.height), o = c.offset.top - u.offset.top, s = c.offset.left - u.offset.left, l = u.width + u.offset.left - (c.offset.left + c.width) 17858 } else a = c.windowDims.height + c.windowDims.offset.top - (c.offset.top + c.height), o = c.offset.top - c.windowDims.offset.top, s = c.offset.left - c.windowDims.offset.left, l = c.windowDims.width - (c.offset.left + c.width); 17859 return a = r ? 0 : Math.min(a, 0), o = Math.min(o, 0), s = Math.min(s, 0), l = Math.min(l, 0), i ? s + l : n ? o + a : Math.sqrt(o * o + a * a + s * s + l * l) 17860 } 17861 17862 function h(e) { 17863 if ((e = e.length ? e[0] : e) === window || e === document) throw new Error("I'm sorry, Dave. I'm afraid I can't do that."); 17864 var t = e.getBoundingClientRect(), 17865 i = e.parentNode.getBoundingClientRect(), 17866 n = document.body.getBoundingClientRect(), 17867 r = window.pageYOffset, 17868 o = window.pageXOffset; 17869 return { 17870 width: t.width, 17871 height: t.height, 17872 offset: { 17873 top: t.top + r, 17874 left: t.left + o 17875 }, 17876 parentDims: { 17877 width: i.width, 17878 height: i.height, 17879 offset: { 17880 top: i.top + r, 17881 left: i.left + o 17882 } 17883 }, 17884 windowDims: { 17885 width: n.width, 17886 height: n.height, 17887 offset: { 17888 top: r, 17889 left: o 17890 } 17891 } 17892 } 17893 } 17894 17895 function l(e, t, i, n, r, o, a) { 17896 var s, l, c = h(e), 17897 u = t ? h(t) : null; 17898 switch (i) { 17899 case "top": 17900 s = u.offset.top - (c.height + r); 17901 break; 17902 case "bottom": 17903 s = u.offset.top + u.height + r; 17904 break;
17905 case "left": 17906 l = u.offset.left - (c.width + o); 17907 break; 17908 case "right": 17909 l = u.offset.left + u.width + o 17910 } 17911 switch (i) { 17912 case "top": 17913 case "bottom": 17914 switch (n) { 17915 case "left": 17916 l = u.offset.left + o; 17917 break; 17918 case "right": 17919 l = u.offset.left - c.width + u.width - o; 17920 break; 17921 case "center": 17922 l = a ? o : u.offset.left + u.width / 2 - c.width / 2 + o 17923 } 17924 break; 17925 case "right": 17926 case "left": 17927 switch (n) { 17928 case "bottom": 17929 s = u.offset.top - r + u.height - c.height; 17930 break; 17931 case "top": 17932 s = u.offset.top + r; 17933 break; 17934 case "center": 17935 s = u.offset.top + r + u.height / 2 - c.height / 2 17936 } 17937 } 17938 return { 17939 top: s, 17940 left: l 17941 } 17942 } 17943}, function(e, t, i) { 17944 "use strict"; 17945 i.d(t, "a", function() { 17946 return o 17947 }); 17948 var n = i(0), 17949 r = i.n(n); 17950 17951 function o(e, t) { 17952 var i = e.length; 17953 17954 function n() { 17955 0 === --i && t() 17956 } 17957 0 === i && t(), e.each(function() { 17958 if (this.complete && void 0 !== this.naturalWidth) n(); 17959 else { 17960 var e = new Image, 17961 i = "load.zf.images error.zf.images"; 17962 r()(e).one(i, function e(t) { 17963 r()(this).off(i, e), n() 17964 }), e.src = r()(this).attr("src") 17965 } 17966 }) 17967 } 17968}, function(e, t, i) { 17969 "use strict"; 17970 i.d(t, "a", function() { 17971 return r 17972 }); 17973 var n = i(0), 17974 s = i.n(n), 17975 r = { 17976 Feather: function(e) { 17977 var i = 1 < arguments.length && void 0 !== arguments[1] ? arguments[1] : "zf"; 17978 e.attr("role", "menubar"); 17979 var t = e.find("li").attr({ 17980 role: "menuitem" 17981 }), 17982 n = "is-" + i + "-submenu", 17983 r = n + "-item", 17984 o = "is-" + i + "-submenu-parent", 17985 a = "accordion" !== i; 17986 t.each(function() { 17987 var e = s()(this), 17988 t = e.children("ul"); 17989 t.length && (e.addClass(o), t.addClass("submenu " + n).attr({ 17990 "data-submenu": "" 17991 }), a && (e.attr({ 17992 "aria-haspopup": !0, 17993 "aria-label": e.children("a:first").text() 17994 }), "drilldown" === i && e.attr({ 17995 "aria-expanded": !1 17996 })), t.addClass("submenu " + n).attr({ 17997 "data-submenu": "", 17998 role: "menu" 17999 }), "drilldown" === i && t.attr({ 18000 "aria-hidden": !0 18001 })), e.parent("[data-submenu]").length && e.addClass("is-submenu-item " + r) 18002 }) 18003 }, 18004 Burn: function(e, t) { 18005 var i = "is-" + t + "-submenu", 18006 n = i + "-item", 18007 r = "is-" + t + "-submenu-parent"; 18008 e.find(">li, .menu, .menu > li").removeClass(i + " " + n + " " + r + " is-submenu-item submenu is-active").removeAttr("data-submenu").css("display", "") 18009 } 18010 } 18011}, function(e, t, i) { 18012 "use strict"; 18013 i.d(t, "a", function() { 18014 return c 18015 }); 18016 var n = i(0), 18017 r = i.n(n), 18018 o = function() { 18019 function n(e, t) { 18020 for (var i = 0; i < t.length; i++) { 18021 var n = t[i]; 18022 n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(e, n.key, n) 18023 } 18024 } 18025 return function(e, t, i) { 18026 return t && n(e.prototype, t), i && n(e, i), e 18027 } 18028 }(); 18029 var a, s, l, c = {}, 18030 u = !1; 18031 18032 function h() { 18033 this.removeEventListener("touchmove", d), this.removeEventListener("touchend", h), u = !1 18034 } 18035 18036 function d(e) { 18037 if (r.a.spotSwipe.preventDefault && e.preventDefault(), u) { 18038 var t, i = e.touches[0].pageX, 18039 n = (e.touches[0].pageY, a - i); 18040 l = (new Date).getTime() - s, Math.abs(n) >= r.a.spotSwipe.moveThreshold && l <= r.a.spotSwipe.timeThreshold && (t = 0 < n ? "left" : "right"), t && (e.preventDefault(), h.call(this), r()(this).trigger("swipe", t).trigger("swipe" + t)) 18041 } 18042 } 18043 18044 function p(e) { 18045 1 == e.touches.length && (a = e.touches[0].pageX, e.touches[0].pageY, u = !0, s = (new Date).getTime(), this.addEventListener("touchmove", d, !1), this.addEventListener("touchend", h, !1)) 18046 } 18047 18048 function f() { 18049 this.addEventListener && this.addEventListener("touchstart", p, !1) 18050 } 18051 var m = function() { 18052 function t(e) { 18053 ! function(e, t) { 18054 if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function") 18055 }(this, t), this.version = "1.0.0", this.enabled = "ontouchstart" in document.documentElement, this.preventDefault = !1, this.moveThreshold = 75, this.timeThreshold = 200, this.$ = e, this._init() 18056 } 18057 return o(t, [{ 18058 key: "_init", 18059 value: function() { 18060 var e = this.$; 18061 e.event.special.swipe = { 18062 setup: f 18063 }, e.each(["left", "up", "down", "right"], function() { 18064 e.event.special["swipe" + this] = { 18065 setup: function() { 18066 e(this).on("swipe", e.noop) 18067 } 18068 } 18069 }) 18070 } 18071 }]), t 18072 }(); 18073 c.setupSpotSwipe = function(e) { 18074 e.spotSwipe = new m(e) 18075 }, c.setupTouchHandler = function(n) { 18076 n.fn.addTouch = function() { 18077 this.each(function(e, t) { 18078 n(t).bind("touchstart touchmove touchend touchcancel", function() { 18079 i(event) 18080 }) 18081 }); 18082 var i = function(e) { 18083 var t, i = e.changedTouches[0], 18084 n = { 18085 touchstart: "mousedown", 18086 touchmove: "mousemove", 18087 touchend: "mouseup" 18088 }[e.type]; 18089 "MouseEvent" in window && "function" == typeof window.MouseEvent ? t = new window.MouseEvent(n, { 18090 bubbles: !0, 18091 cancelable: !0, 18092 screenX: i.screenX, 18093 screenY: i.screenY, 18094 clientX: i.clientX, 18095 clientY: i.clientY 18096 }) : (t = document.createEvent("MouseEvent")).initMouseEvent(n, !0, !0, window, 1, i.screenX, i.screenY, i.clientX, i.clientY, !1, !1, !1, !1, 0, null), i.target.dispatchEvent(t) 18097 } 18098 } 18099 }, c.init = function(e) { 18100 void 0 === e.spotSwipe && (c.setupSpotSwipe(e), c.setupTouchHandler(e)) 18101 } 18102}, function(e, t, a) { 18103 "use strict"; 18104 a.d(t, "a", function() { 18105 return c 18106 }); 18107 var i = a(0), 18108 s = a.n(i), 18109 r = a(3), 18110 l = a(1), 18111 n = a(2), 18112 o = function() { 18113 function n(e, t) { 18114 for (var i = 0; i < t.length; i++) { 18115 var n = t[i]; 18116 n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(e, n.key, n) 18117 } 18118 } 18119 return function(e, t, i) { 18120 return t && n(e.prototype, t), i && n(e, i), e 18121 } 18122 }(); 18123 var c = function(e) { 18124 function i() { 18125 return function(e, t) { 18126 if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function") 18127 }(this, i), 18128 function(e, t) { 18129 if (!e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); 18130 return !t || "object" != typeof t && "function" != typeof t ? e : t 18131 }(this, (i.__proto__ || Object.getPrototypeOf(i)).apply(this, arguments)) 18132 } 18133 return function(e, t) { 18134 if ("function" != typeof t && null !== t) throw new TypeError("Super expression must either be null or a function, not " + typeof t); 18135 e.prototype = Object.create(t && t.prototype, { 18136 constructor: { 18137 value: e, 18138 enumerable: !1, 18139 writable: !0, 18140 configurable: !0 18141 } 18142 }), t && (Object.setPrototypeOf ? Object.setPrototypeOf(e, t) : e.__proto__ = t) 18143 }(i, n["a"]), o(i, [{ 18144 key: "_setup", 18145 value: function(e, t) { 18146 this.$element = e, this.options = s.a.extend({}, i.defaults, this.$element.data(), t), this.className = "Accordion", this._init(), r.a.register("Accordion", { 18147 ENTER: "toggle", 18148 SPACE: "toggle", 18149 ARROW_DOWN: "next", 18150 ARROW_UP: "previous" 18151 }) 18152 } 18153 }, { 18154 key: "_init", 18155 value: function() { 18156 var r = this; 18157 this.$element.attr("role", "tablist"), this.$tabs = this.$element.children("[data-accordion-item]"), this.$tabs.each(function(e, t) { 18158 var i = s()(t), 18159 n = i.children("[data-tab-content]"), 18160 r = n[0].id || a.i(l.b)(6, "accordion"), 18161 o = t.id || r + "-label"; 18162 i.find("a:first").attr({ 18163 "aria-controls": r, 18164 role: "tab", 18165 id: o, 18166 "aria-expanded": !1, 18167 "aria-selected": !1 18168 }), n.attr({ 18169 role: "tabpanel", 18170 "aria-labelledby": o, 18171 "aria-hidden": !0, 18172 id: r 18173 }) 18174 });
18175 var e = this.$element.find(".is-active").children("[data-tab-content]"); 18176 this.firstTimeInit = !0, e.length && (this.down(e, this.firstTimeInit), this.firstTimeInit = !1), this._checkDeepLink = function() { 18177 var e = window.location.hash; 18178 if (e.length) { 18179 var t = r.$element.find('[href$="' + e + '"]'), 18180 i = s()(e); 18181 if (t.length && i) { 18182 if (t.parent("[data-accordion-item]").hasClass("is-active") || (r.down(i, r.firstTimeInit), r.firstTimeInit = !1), r.options.deepLinkSmudge) { 18183 var n = r; 18184 s()(window).load(function() { 18185 var e = n.$element.offset(); 18186 s()("html, body").animate({ 18187 scrollTop: e.top 18188 }, n.options.deepLinkSmudgeDelay) 18189 }) 18190 } 18191 r.$element.trigger("deeplink.zf.accordion", [t, i]) 18192 } 18193 } 18194 }, this.options.deepLink && this._checkDeepLink(), this._events() 18195 } 18196 }, { 18197 key: "_events", 18198 value: function() { 18199 var n = this; 18200 this.$tabs.each(function() { 18201 var t = s()(this), 18202 i = t.children("[data-tab-content]"); 18203 i.length && t.children("a").off("click.zf.accordion keydown.zf.accordion").on("click.zf.accordion", function(e) { 18204 e.preventDefault(), n.toggle(i) 18205 }).on("keydown.zf.accordion", function(e) { 18206 r.a.handleKey(e, "Accordion", { 18207 toggle: function() { 18208 n.toggle(i) 18209 }, 18210 next: function() { 18211 var e = t.next().find("a").focus(); 18212 n.options.multiExpand || e.trigger("click.zf.accordion") 18213 }, 18214 previous: function() { 18215 var e = t.prev().find("a").focus(); 18216 n.options.multiExpand || e.trigger("click.zf.accordion") 18217 }, 18218 handled: function() { 18219 e.preventDefault(), e.stopPropagation() 18220 } 18221 }) 18222 }) 18223 }), this.options.deepLink && s()(window).on("popstate", this._checkDeepLink) 18224 } 18225 }, { 18226 key: "toggle", 18227 value: function(e) { 18228 if (e.closest("[data-accordion]").is("[disabled]")) console.info("Cannot toggle an accordion that is disabled."); 18229 else if (e.parent().hasClass("is-active") ? this.up(e) : this.down(e), this.options.deepLink) { 18230 var t = e.prev("a").attr("href"); 18231 this.options.updateHistory ? history.pushState({}, "", t) : history.replaceState({}, "", t) 18232 } 18233 } 18234 }, { 18235 key: "down", 18236 value: function(e, t) { 18237 var i = this; 18238 if (!e.closest("[data-accordion]").is("[disabled]") || t) { 18239 if (e.attr("aria-hidden", !1).parent("[data-tab-content]").addBack().parent().addClass("is-active"), !this.options.multiExpand && !t) { 18240 var n = this.$element.children(".is-active").children("[data-tab-content]"); 18241 n.length && this.up(n.not(e)) 18242 } 18243 e.slideDown(this.options.slideSpeed, function() { 18244 i.$element.trigger("down.zf.accordion", [e]) 18245 }), s()("#" + e.attr("aria-labelledby")).attr({ 18246 "aria-expanded": !0, 18247 "aria-selected": !0 18248 }) 18249 } else console.info("Cannot call down on an accordion that is disabled.") 18250 } 18251 }, { 18252 key: "up", 18253 value: function(e) { 18254 if (e.closest("[data-accordion]").is("[disabled]")) console.info("Cannot call up on an accordion that is disabled."); 18255 else { 18256 var t = e.parent().siblings(), 18257 i = this; 18258 (this.options.allowAllClosed || t.hasClass("is-active")) && e.parent().hasClass("is-active") && (e.slideUp(i.options.slideSpeed, function() { 18259 i.$element.trigger("up.zf.accordion", [e]) 18260 }), e.attr("aria-hidden", !0).parent().removeClass("is-active"), s()("#" + e.attr("aria-labelledby")).attr({ 18261 "aria-expanded": !1, 18262 "aria-selected": !1 18263 })) 18264 } 18265 } 18266 }, { 18267 key: "_destroy", 18268 value: function() { 18269 this.$element.find("[data-tab-content]").stop(!0).slideUp(0).css("display", ""), this.$element.find("a").off(".zf.accordion"), this.options.deepLink && s()(window).off("popstate", this._checkDeepLink) 18270 } 18271 }]), i 18272 }(); 18273 c.defaults = { 18274 slideSpeed: 250, 18275 multiExpand: !1, 18276 allowAllClosed: !1, 18277 deepLink: !1, 18278 deepLinkSmudge: !1, 18279 deepLinkSmudgeDelay: 300, 18280 updateHistory: !1 18281 } 18282}, function(e, t, a) { 18283 "use strict"; 18284 a.d(t, "a", function() { 18285 return u 18286 }); 18287 var i = a(0), 18288 s = a.n(i), 18289 l = a(3), 18290 n = a(9), 18291 c = a(1), 18292 r = a(2), 18293 o = function() { 18294 function n(e, t) { 18295 for (var i = 0; i < t.length; i++) { 18296 var n = t[i]; 18297 n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(e, n.key, n) 18298 } 18299 } 18300 return function(e, t, i) { 18301 return t && n(e.prototype, t), i && n(e, i), e 18302 } 18303 }(); 18304 var u = function(e) { 18305 function i() { 18306 return function(e, t) { 18307 if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function") 18308 }(this, i), 18309 function(e, t) { 18310 if (!e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); 18311 return !t || "object" != typeof t && "function" != typeof t ? e : t 18312 }(this, (i.__proto__ || Object.getPrototypeOf(i)).apply(this, arguments)) 18313 } 18314 return function(e, t) { 18315 if ("function" != typeof t && null !== t) throw new TypeError("Super expression must either be null or a function, not " + typeof t); 18316 e.prototype = Object.create(t && t.prototype, { 18317 constructor: { 18318 value: e, 18319 enumerable: !1, 18320 writable: !0, 18321 configurable: !0 18322 } 18323 }), t && (Object.setPrototypeOf ? Object.setPrototypeOf(e, t) : e.__proto__ = t) 18324 }(i, r["a"]), o(i, [{ 18325 key: "_setup", 18326 value: function(e, t) { 18327 this.$element = e, this.options = s.a.extend({}, i.defaults, this.$element.data(), t), this.className = "AccordionMenu", this._init(), l.a.register("AccordionMenu", { 18328 ENTER: "toggle", 18329 SPACE: "toggle", 18330 ARROW_RIGHT: "open", 18331 ARROW_UP: "up", 18332 ARROW_DOWN: "down", 18333 ARROW_LEFT: "close", 18334 ESCAPE: "closeAll" 18335 }) 18336 } 18337 }, { 18338 key: "_init", 18339 value: function() { 18340 n.a.Feather(this.$element, "accordion"); 18341 var o = this; 18342 this.$element.find("[data-submenu]").not(".is-active").slideUp(0), this.$element.attr({ 18343 role: "tree", 18344 "aria-multiselectable": this.options.multiOpe
vendor: 4,819 bytes, lines 18344-18433
18344n 18345 }), this.$menuLinks = this.$element.find(".is-accordion-submenu-parent"), this.$menuLinks.each(function() { 18346 var e = this.id || a.i(c.b)(6, "acc-menu-link"), 18347 t = s()(this), 18348 i = t.children("[data-submenu]"), 18349 n = i[0].id || a.i(c.b)(6, "acc-menu"), 18350 r = i.hasClass("is-active"); 18351 o.options.submenuToggle ? (t.addClass("has-submenu-toggle"), t.children("a").after('<button id="' + e + '" class="submenu-toggle" aria-controls="' + n + '" aria-expanded="' + r + '" title="' + o.options.submenuToggleText + '"><span class="submenu-toggle-text">' + o.options.submenuToggleText + "</span></button>")) : t.attr({ 18352 "aria-controls": n, 18353 "aria-expanded": r, 18354 id: e 18355 }), i.attr({ 18356 "aria-labelledby": e, 18357 "aria-hidden": !r, 18358 role: "group", 18359 id: n 18360 }) 18361 }), this.$element.find("li").attr({ 18362 role: "treeitem" 18363 }); 18364 var e = this.$element.find(".is-active"); 18365 if (e.length) { 18366 o = this; 18367 e.each(function() { 18368 o.down(s()(this)) 18369 }) 18370 } 18371 this._events() 18372 } 18373 }, { 18374 key: "_events", 18375 value: function() { 18376 var a = this; 18377 this.$element.find("li").each(function() { 18378 var t = s()(this).children("[data-submenu]"); 18379 t.length && (a.options.submenuToggle ? s()(this).children(".submenu-toggle").off("click.zf.accordionMenu").on("click.zf.accordionMenu", function(e) { 18380 a.toggle(t) 18381 }) : s()(this).children("a").off("click.zf.accordionMenu").on("click.zf.accordionMenu", function(e) { 18382 e.preventDefault(), a.toggle(t) 18383 })) 18384 }).on("keydown.zf.accordionmenu", function(t) { 18385 var i, n, r = s()(this), 18386 o = r.parent("ul").children("li"), 18387 e = r.children("[data-submenu]"); 18388 o.each(function(e) { 18389 if (s()(this).is(r)) return i = o.eq(Math.max(0, e - 1)).find("a").first(), n = o.eq(Math.min(e + 1, o.length - 1)).find("a").first(), s()(this).children("[data-submenu]:visible").length && (n = r.find("li:first-child").find("a").first()), s()(this).is(":first-child") ? i = r.parents("li").first().find("a").first() : i.parents("li").first().children("[data-submenu]:visible").length && (i = i.parents("li").find("li:last-child").find("a").first()), void(s()(this).is(":last-child") && (n = r.parents("li").first().next("li").find("a").first())) 18390 }), l.a.handleKey(t, "AccordionMenu", { 18391 open: function() { 18392 e.is(":hidden") && (a.down(e), e.find("li").first().find("a").first().focus()) 18393 }, 18394 close: function() { 18395 e.length && !e.is(":hidden") ? a.up(e) : r.parent("[data-submenu]").length && (a.up(r.parent("[data-submenu]")), r.parents("li").first().find("a").first().focus()) 18396 }, 18397 up: function() { 18398 return i.focus(), !0 18399 }, 18400 down: function() { 18401 return n.focus(), !0 18402 }, 18403 toggle: function() { 18404 return !a.options.submenuToggle && (r.children("[data-submenu]").length ? (a.toggle(r.children("[data-submenu]")), !0) : void 0) 18405 }, 18406 closeAll: function() { 18407 a.hideAll() 18408 }, 18409 handled: function(e) { 18410 e && t.preventDefault(), t.stopImmediatePropagation() 18411 } 18412 }) 18413 }) 18414 } 18415 }, { 18416 key: "hideAll", 18417 value: function() { 18418 this.up(this.$element.find("[data-submenu]")) 18419 } 18420 }, { 18421 key: "showAll", 18422 value: function() { 18423 this.down(this.$element.find("[data-submenu]")) 18424 } 18425 }, { 18426 key: "toggle", 18427 value: function(e) { 18428 e.is(":animated") || (e.is(":hidden") ? this.down(e) : this.up(e)) 18429 } 18430 }, { 18431 key: "down", 18432 value: function(e) { 18433 var t = this;
18434 this.options.multiOpen || this.up(this.$element.find(".is-active").not(e.parentsUntil(this.$element).add(e))), e.addClass("is-active").attr({ 18435 "aria-hidden": !1 18436 }), this.options.submenuToggle ? e.prev(".submenu-toggle").attr({ 18437 "aria-expanded": !0 18438 }) : e.parent(".is-accordion-submenu-parent").attr({ 18439 "aria-expanded": !0 18440 }), e.slideDown(t.options.slideSpeed, function() { 18441 t.$element.trigger("down.zf.accordionMenu", [e]) 18442 }) 18443 } 18444 }, { 18445 key: "up", 18446 value: function(e) { 18447 var t = this; 18448 e.slideUp(t.options.slideSpeed, function() { 18449 t.$element.trigger("up.zf.accordionMenu", [e]) 18450 }); 18451 var i = e.find("[data-submenu]").slideUp(0).addBack().attr("aria-hidden", !0); 18452 this.options.submenuToggle ? i.prev(".submenu-toggle").attr("aria-expanded", !1) : i.parent(".is-accordion-submenu-parent").attr("aria-expanded", !1) 18453 } 18454 }, { 18455 key: "_destroy", 18456 value: function() { 18457 this.$element.find("[data-submenu]").slideDown(0).css("display", ""), this.$element.find("a").off("click.zf.accordionMenu"), this.options.submenuToggle && (this.$element.find(".has-submenu-toggle").removeClass("has-submenu-toggle"), this.$element.find(".submenu-toggle").remove()), n.a.Burn(this.$element, "accordion") 18458 } 18459 }]), i 18460 }(); 18461 u.defaults = { 18462 slideSpeed: 250, 18463 submenuToggle: !1, 18464 submenuToggleText: "Toggle menu", 18465 multiOpen: !0 18466 } 18467}, function(e, t, a) { 18468 "use strict"; 18469 a.d(t, "a", function() { 18470 return h 18471 }); 18472 var i = a(0), 18473 s = a.n(i), 18474 l = a(3), 18475 n = a(9), 18476 c = a(1), 18477 r = a(7), 18478 o = a(2), 18479 u = function() { 18480 function n(e, t) { 18481 for (var i = 0; i < t.length; i++) { 18482 var n = t[i]; 18483 n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(e, n.key, n) 18484 } 18485 } 18486 return function(e, t, i) { 18487 return t && n(e.prototype, t), i && n(e, i), e 18488 } 18489 }(); 18490 var h = function(e) { 18491 function i() { 18492 return function(e, t) { 18493 if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function") 18494 }(this, i), 18495 function(e, t) { 18496 if (!e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); 18497 return !t || "object" != typeof t && "function" != typeof t ? e : t 18498 }(this, (i.__proto__ || Object.getPrototypeOf(i)).apply(this, arguments)) 18499 } 18500 return function(e, t) { 18501 if ("function" != typeof t && null !== t) throw new TypeError("Super expression must either be null or a function, not " + typeof t); 18502 e.prototype = Object.create(t && t.prototype, { 18503 constructor: { 18504 value: e, 18505 enumerable: !1, 18506 writable: !0, 18507 configurable: !0 18508 } 18509 }), t && (Object.setPrototypeOf ? Object.setPrototypeOf(e, t) : e.__proto__ = t) 18510 }(i, o["a"]), u(i, [{ 18511 key: "_setup", 18512 value: function(e, t) { 18513 this.$element = e, this.options = s.a.extend({}, i.defaults, this.$element.data(), t), this.className = "Drilldown", this._init(), l.a.register("Drilldown", { 18514 ENTER: "open", 18515 SPACE: "open", 18516 ARROW_RIGHT: "next", 18517 ARROW_UP: "up", 18518 ARROW_DOWN: "down", 18519 ARROW_LEFT: "previous", 18520 ESCAPE: "close", 18521 TAB: "down", 18522 SHIFT_TAB: "up" 18523 }) 18524 } 18525 }, { 18526 key: "_init", 18527 value: function() { 18528 n.a.Feather(this.$element, "drilldown"), this.options.autoApplyClass && this.$element.addClass("drilldown"), this.$element.attr({ 18529 role: "tree", 18530 "aria-multiselectable": !1 18531 }), this.$submenuAnchors = this.$element.find("li.is-drilldown-submenu-parent").children("a"), this.$submenus = this.$submenuAnchors.parent("li").children("[data-submenu]").attr("role", "group"), this.$menuItems = this.$element.find("li").not(".js-drilldown-back").attr("role", "treeitem").find("a"), this.$element.attr("data-mutate", this.$element.attr("data-drilldown") || a.i(c.b)(6, "drilldown")), this._prepareMenu(), this._registerEvents(), this._keyboardEvents() 18532 } 18533 }, { 18534 key: "_prepareMenu", 18535 value: function() { 18536 var i = this; 18537 this.$submenuAnchors.each(function() { 18538 var e = s()(this), 18539 t = e.parent(); 18540 i.options.parentLink && e.clone().prependTo(t.children("[data-submenu]")).wrap('<li class="is-submenu-parent-item is-submenu-item is-drilldown-submenu-item" role="menuitem"></li>'), e.data("savedHref", e.attr("href")).removeAttr("href").attr("tabindex", 0), e.children("[data-submenu]").attr({ 18541 "aria-hidden": !0, 18542 tabindex: 0, 18543 role: "group" 18544 }), i._events(e) 18545 }), this.$submenus.each(function() { 18546 var e = s()(this); 18547 if (!e.find(".js-drilldown-back").length) switch (i.options.backButtonPosition) { 18548 case "bottom": 18549 e.append(i.options.backButton); 18550 break; 18551 case "top": 18552 e.prepend(i.options.backButton); 18553 break; 18554 default: 18555 console.error("Unsupported backButtonPosition value '" + i.options.backButtonPosition + "'") 18556 } 18557 i._back(e) 18558 }), this.$submenus.addClass("invisible"), this.options.autoHeight || this.$submenus.addClass("drilldown-submenu-cover-previous"), this.$element.parent().hasClass("is-drilldown") || (this.$wrapper = s()(this.options.wrapper).addClass("is-drilldown"), this.options.animateHeight && this.$wrapper.addClass("animate-height"), this.$element.wrap(this.$wrapper)), this.$wrapper = this.$element.parent(), this.$wrapper.css(this._getMaxDims()) 18559 } 18560 }, { 18561 key: "_resize", 18562 value: function() { 18563 this.$wrapper.css({ 18564 "max-width": "none", 18565 "min-height": "none" 18566 }), this.$wrapper.css(this._getMaxDims()) 18567 } 18568 }, { 18569 key: "_events", 18570 value: function(i) { 18571 var n = this; 18572 i.off("click.zf.drilldown").on("click.zf.drilldown", function(e) { 18573 if (s()(e.target).parentsUntil("ul", "li").hasClass("is-drilldown-submenu-parent") && (e.stopImmediatePropagation(), e.preventDefault()), n._show(i.parent("li")), n.options.closeOnClick) { 18574 var t = s()("body"); 18575 t.off(".zf.drilldown").on("click.zf.drilldown", function(e) { 18576 e.target === n.$element[0] || s.a.contains(n.$element[0], e.target) || (e.preventDefault(), n._hideAll(), t.off(".zf.drilldown")) 18577 }) 18578 } 18579 }) 18580 } 18581 }, { 18582 key: "_registerEvents", 18583 value: function() { 18584 this.options.scrollTop && (this._bindHandler = this._scrollTop.bind(this), this.$element.on("open.zf.drilldown hide.zf.drilldown closed.zf.drilldown", this._bindHandler)), this.$element.on("mutateme.zf.trigger", this._resize.bind(this)) 18585 } 18586 }, { 18587 key: "_scrollTop", 18588 value: function() { 18589 var e = this, 18590 t = "" != e.options.scrollTopElement ? s()(e.options.scrollTopElement) : e.$element, 18591 i = parseInt(t.offset().top + e.options.scrollTopOffset, 10); 18592 s()("html, body").stop(!0).animate({ 18593 scrollTop: i 18594 }, e.options.animationDuration, e.options.animationEasing, function() { 18595 this === s()("html")[0] && e.$element.trigger("scrollme.zf.drilldown") 18596 }) 18597 } 18598 }, { 18599 key: "_keyboardEvents", 18600 value: function() { 18601 var e = this; 18602 this.$menuItems.add(this.$element.find(".js-drilldown-back > a, .is-submenu-parent-item > a")).on("keydown.zf.drilldown", function(t) { 18603 var i, n, r = s()(this), 18604 o = r.parent("li").parent("ul").children("li").children("a"); 18605 o.each(function(e) { 18606 if (s()(this).is(r)) return i = o.eq(Math.max(0, e - 1)), void(n = o.eq(Math.min(e + 1, o.length - 1))) 18607 }), l.a.handleKey(t, "Drilldown", { 18608 next: function() { 18609 if (r.is(e.$submenuAnchors)) return e._show(r.parent("li")), r.parent("li").one(a.i(c.c)(r), function() { 18610 r.parent("li").find("ul li a").filter(e.$menuItems).first().focus() 18611 }), !0 18612 }, 18613 previous: function() { 18614 return e._hide(r.parent("li").parent("ul")), r.parent("li").parent("ul").one(a.i(c.c)(r), function() { 18615 setTimeout(function() { 18616 r.parent("li").parent("ul").parent("li").children("a").first().focus() 18617 }, 1) 18618 }), !0 18619 }, 18620 up: function() { 18621 return i.focus(), !r.is(e.$element.find("> li:first-child > a")) 18622 }, 18623 down: function() { 18624 return n.focus(), !r.is(e.$element.find("> li:last-child > a")) 18625 }, 18626 close: function() { 18627 r.is(e.$element.find("> li > a")) || (e._hide(r.parent().parent()), r.parent().parent().siblings("a").focus()) 18628 }, 18629 open: function() { 18630 return r.is(e.$menuItems) ? r.is(e.$submenuAnchors) ? (e._show(r.parent("li")), r.parent("li").one(a.i(c.c)(r), function() { 18631 r.parent("li").find("ul li a").filter(e.$menuItems).first().focus() 18632 }), !0) : void 0 : (e._hide(r.parent("li").parent("ul")), r.parent("li").parent("ul").one(a.i(c.c)(r), function() { 18633 setTimeout(function() { 18634 r.parent("li").parent("ul").parent("li").children("a").first().focus() 18635 }, 1) 18636 }), !0) 18637 }, 18638 handled: function(e) { 18639 e && t.preventDefault(), t.stopImmediatePropagation() 18640 } 18641 }) 18642 }) 18643 } 18644 }, { 18645 key: "_hideAll", 18646 value: function() {
18647 var t = this.$element.find(".is-drilldown-submenu.is-active").addClass("is-closing"); 18648 this.options.autoHeight && this.$wrapper.css({ 18649 height: t.parent().closest("ul").data("calcHeight") 18650 }), t.one(a.i(c.c)(t), function(e) { 18651 t.removeClass("is-active is-closing") 18652 }), this.$element.trigger("closed.zf.drilldown") 18653 } 18654 }, { 18655 key: "_back", 18656 value: function(i) { 18657 var n = this; 18658 i.off("click.zf.drilldown"), i.children(".js-drilldown-back").on("click.zf.drilldown", function(e) { 18659 e.stopImmediatePropagation(), n._hide(i); 18660 var t = i.parent("li").parent("ul").parent("li"); 18661 t.length && n._show(t) 18662 }) 18663 } 18664 }, { 18665 key: "_menuLinkEvents", 18666 value: function() { 18667 var t = this; 18668 this.$menuItems.not(".is-drilldown-submenu-parent").off("click.zf.drilldown").on("click.zf.drilldown", function(e) { 18669 setTimeout(function() { 18670 t._hideAll() 18671 }, 0) 18672 }) 18673 } 18674 }, { 18675 key: "_show", 18676 value: function(e) { 18677 this.options.autoHeight && this.$wrapper.css({ 18678 height: e.children("[data-submenu]").data("calcHeight") 18679 }), e.attr("aria-expanded", !0), e.children("[data-submenu]").addClass("is-active").removeClass("invisible").attr("aria-hidden", !1), this.$element.trigger("open.zf.drilldown", [e]) 18680 } 18681 }, { 18682 key: "_hide", 18683 value: function(e) { 18684 this.options.autoHeight && this.$wrapper.css({ 18685 height: e.parent().closest("ul").data("calcHeight") 18686 }); 18687 e.parent("li").attr("aria-expanded", !1), e.attr("aria-hidden", !0).addClass("is-closing"), e.addClass("is-closing").one(a.i(c.c)(e), function() { 18688 e.removeClass("is-active is-closing"), e.blur().addClass("invisible") 18689 }), e.trigger("hide.zf.drilldown", [e]) 18690 } 18691 }, { 18692 key: "_getMaxDims", 18693 value: function() { 18694 var t = 0, 18695 i = {}, 18696 n = this; 18697 return this.$submenus.add(this.$element).each(function() { 18698 s()(this).children("li").length; 18699 var e = r.a.GetDimensions(this).height; 18700 t = t < e ? e : t, n.options.autoHeight && (s()(this).data("calcHeight", e), s()(this).hasClass("is-drilldown-submenu") || (i.height = e)) 18701 }), this.options.autoHeight || (i["min-height"] = t + "px"), i["max-width"] = this.$element[0].getBoundingClientRect().width + "px", i 18702 } 18703 }, { 18704 key: "_destroy", 18705 value: function() { 18706 this.options.scrollTop && this.$element.off(".zf.drilldown", this._bindHandler), this._hideAll(), this.$element.off("mutateme.zf.trigger"), n.a.Burn(this.$element, "drilldown"), this.$element.unwrap().find(".js-drilldown-back, .is-submenu-parent-item").remove().end().find(".is-active, .is-closing, .is-drilldown-submenu").removeClass("is-active is-closing is-drilldown-submenu").end().find("[data-submenu]").removeAttr("aria-hidden tabindex role"), this.$submenuAnchors.each(function() { 18707 s()(this).off(".zf.drilldown") 18708 }), this.$submenus.removeClass("drilldown-submenu-cover-previous invisible"), this.$element.find("a").each(function() { 18709 var e = s()(this); 18710 e.removeAttr("tabindex"), e.data("savedHref") && e.attr("href", e.data("savedHref")).removeData("savedHref") 18711 }) 18712 } 18713 }]), i 18714 }(); 18715 h.defaults = { 18716 autoApplyClass: !0, 18717 backButton: '<li class="js-drilldown-back"><a tabindex="0">Back</a></li>', 18718 backButtonPosition: "top", 18719 wrapper: "<div></div>", 18720 parentLink: !1, 18721 closeOnClick: !1, 18722 autoHeight: !1, 18723 animateHeight: !1, 18724 scrollTop: !1, 18725 scrollTopElement: "", 18726 scrollTopOffset: 0, 18727 animationDuration: 500, 18728 animationEasing: "swing" 18729 } 18730}, function(e, t, n) { 18731 "use strict"; 18732 n.d(t, "a", function() { 18733 return c 18734 }); 18735 var i = n(0), 18736 d = n.n(i), 18737 p = n(3), 18738 r = n(9), 18739 a = n(7), 18740 o = n(1), 18741 s = n(2), 18742 l = function() { 18743 function n(e, t) { 18744 for (var i = 0; i < t.length; i++) { 18745 var n = t[i]; 18746 n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(e, n.key, n) 18747 } 18748 } 18749 return function(e, t, i) { 18750 return t && n(e.prototype, t), i && n(e, i), e 18751 } 18752 }(); 18753 var c = function(e) { 18754 function i() { 18755 return function(e, t) { 18756 if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function") 18757 }(this, i), 18758 function(e, t) { 18759 if (!e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); 18760 return !t || "object" != typeof t && "function" != typeof t ? e : t 18761 }(this, (i.__proto__ || Object.getPrototypeOf(i)).apply(this, arguments)) 18762 } 18763 return function(e, t) { 18764 if ("function" != typeof t && null !== t) throw new TypeError("Super expression must either be null or a function, not " + typeof t); 18765 e.prototype = Object.create(t && t.prototype, { 18766 constructor: { 18767 value: e, 18768 enumerable: !1, 18769 writable: !0, 18770 configurable: !0 18771 } 18772 }), t && (Object.setPrototypeOf ? Object.setPrototypeOf(e, t) : e.__proto__ = t) 18773 }(i, s["a"]), l(i, [{ 18774 key: "_setup", 18775 value: function(e, t) { 18776 this.$element = e, this.options = d.a.extend({}, i.defaults, this.$element.data(), t), this.className = "DropdownMenu", this._init(), p.a.register("DropdownMenu", { 18777 ENTER: "open", 18778 SPACE: "open", 18779 ARROW_RIGHT: "next", 18780 ARROW_UP: "up", 18781 ARROW_DOWN: "down", 18782 ARROW_LEFT: "previous", 18783 ESCAPE: "close" 18784 }) 18785 } 18786 }, { 18787 key: "_init", 18788 value: function() { 18789 r.a.Feather(this.$element, "dropdown"); 18790 var e = this.$element.find("li.is-dropdown-submenu-parent"); 18791 this.$element.children(".is-dropdown-submenu-parent").children(".is-dropdown-submenu").addClass("first-sub"), this.$menuItems = this.$element.find('[role="menuitem"]'), this.$tabs = this.$element.children('[role="menuitem"]'), this.$tabs.find("ul.is-dropdown-submenu").addClass(this.options.verticalClass), "auto" === this.options.alignment ? this.$element.hasClass(this.options.rightClass) || n.i(o.a)() || this.$element.parents(".top-bar-right").is("*") ? (this.options.alignment = "right", e.addClass("opens-left")) : (this.options.alignment = "left", e.addClass("opens-right")) : "right" === this.options.alignment ? e.addClass("opens-left") : e.addClass("opens-right"), this.changed = !1, this._events() 18792 } 18793 }, { 18794 key: "_isVertical", 18795 value: function() { 18796 return "block" === this.$tabs.css("display") || "column" === this.$element.css("flex-direction") 18797 } 18798 }, { 18799 key: "_isRtl", 18800 value: function() { 18801 return this.$element.hasClass("align-right") || n.i(o.a)() && !this.$element.hasClass("align-left") 18802 } 18803 }, { 18804 key: "_events", 18805 value: function() { 18806 var h = this, 18807 o = "ontouchstart" in window || void 0 !== window.ontouchstart, 18808 a = "is-dropdown-submenu-parent";
18809 (this.options.clickOpen || o) && this.$menuItems.on("click.zf.dropdownmenu touchstart.zf.dropdownmenu", function(e) { 18810 var t = d()(e.target).parentsUntil("ul", "." + a), 18811 i = t.hasClass(a), 18812 n = "true" === t.attr("data-is-click"), 18813 r = t.children(".is-dropdown-submenu"); 18814 if (i) 18815 if (n) { 18816 if (!h.options.closeOnClick || !h.options.clickOpen && !o || h.options.forceFollow && o) return; 18817 e.stopImmediatePropagation(), e.preventDefault(), h._hide(t) 18818 } else e.preventDefault(), e.stopImmediatePropagation(), h._show(r), t.add(t.parentsUntil(h.$element, "." + a)).attr("data-is-click", !0) 18819 }), h.options.closeOnClickInside && this.$menuItems.on("click.zf.dropdownmenu", function(e) { 18820 d()(this).hasClass(a) || h._hide() 18821 }), this.options.disableHover || this.$menuItems.on("mouseenter.zf.dropdownmenu", function(e) { 18822 var t = d()(this); 18823 t.hasClass(a) && (clearTimeout(t.data("_delay")), t.data("_delay", setTimeout(function() { 18824 h._show(t.children(".is-dropdown-submenu")) 18825 }, h.options.hoverDelay))) 18826 }).on("mouseleave.zf.dropdownmenu", function(e) { 18827 var t = d()(this); 18828 if (t.hasClass(a) && h.options.autoclose) { 18829 if ("true" === t.attr("data-is-click") && h.options.clickOpen) return !1; 18830 clearTimeout(t.data("_delay")), t.data("_delay", setTimeout(function() { 18831 h._hide(t) 18832 }, h.options.closingTime)) 18833 } 18834 }), this.$menuItems.on("keydown.zf.dropdownmenu", function(t) { 18835 var i, n, r = d()(t.target).parentsUntil("ul", '[role="menuitem"]'), 18836 e = -1 < h.$tabs.index(r), 18837 o = e ? h.$tabs : r.siblings("li").add(r); 18838 o.each(function(e) { 18839 if (d()(this).is(r)) return i = o.eq(e - 1), void(n = o.eq(e + 1)) 18840 }); 18841 var a = function() { 18842 n.children("a:first").focus(), t.preventDefault() 18843 }, 18844 s = function() { 18845 i.children("a:first").focus(), t.preventDefault() 18846 }, 18847 l = function() { 18848 var e = r.children("ul.is-dropdown-submenu"); 18849 e.length && (h._show(e), r.find("li > a:first").focus(), t.preventDefault()) 18850 }, 18851 c = function() { 18852 var e = r.parent("ul").parent("li"); 18853 e.children("a:first").focus(), h._hide(e), t.preventDefault() 18854 }, 18855 u = { 18856 open: l, 18857 close: function() { 18858 h._hide(h.$element), h.$menuItems.eq(0).children("a").focus(), t.preventDefault() 18859 }, 18860 handled: function() { 18861 t.stopImmediatePropagation() 18862 } 18863 }; 18864 e ? h._isVertical() ? h._isRtl() ? d.a.extend(u, { 18865 down: a, 18866 up: s, 18867 next: c, 18868 previous: l 18869 }) : d.a.extend(u, { 18870 down: a, 18871 up: s, 18872 next: l, 18873 previous: c 18874 }) : h._isRtl() ? d.a.extend(u, { 18875 next: s, 18876 previous: a, 18877 down: l, 18878 up: c 18879 }) : d.a.extend(u, { 18880 next: a, 18881 previous: s, 18882 down: l, 18883 up: c 18884 }) : h._isRtl() ? d.a.extend(u, { 18885 next: c, 18886 previous: l, 18887 down: a, 18888 up: s 18889 }) : d.a.extend(u, { 18890 next: l, 18891 previous: c, 18892 down: a, 18893 up: s 18894 }), p.a.handleKey(t, "DropdownMenu", u) 18895 }) 18896 } 18897 }, { 18898 key: "_addBodyHandler", 18899 value: function() { 18900 var t = d()(document.body), 18901 i = this; 18902 t.off("mouseup.zf.dropdownmenu touchend.zf.dropdownmenu").on("mouseup.zf.dropdownmenu touchend.zf.dropdownmenu", function(e) { 18903 i.$element.find(e.target).length || (i._hide(), t.off("mouseup.zf.dropdownmenu touchend.zf.dropdownmenu")) 18904 }) 18905 } 18906 }, { 18907 key: "_show", 18908 value: function(i) { 18909 var e = this.$tabs.index(this.$tabs.filter(function(e, t) { 18910 return 0 < d()(t).find(i).length 18911 })), 18912 t = i.parent("li.is-dropdown-submenu-parent").siblings("li.is-dropdown-submenu-parent"); 18913 this._hide(t, e), i.css("visibility", "hidden").addClass("js-dropdown-active").parent("li.is-dropdown-submenu-parent").addClass("is-active"); 18914 var n = a.a.ImNotTouchingYou(i, null, !0); 18915 if (!n) { 18916 var r = "left" === this.options.alignment ? "-right" : "-left", 18917 o = i.parent(".is-dropdown-submenu-parent"); 18918 o.removeClass("opens" + r).addClass("opens-" + this.options.alignment), (n = a.a.ImNotTouchingYou(i, null, !0)) || o.removeClass("opens-" + this.options.alignment).addClass("opens-inner"), this.changed = !0 18919 } 18920 i.css("visibility", ""), this.options.closeOnClick && this._addBodyHandler(), this.$element.trigger("show.zf.dropdownmenu", [i]) 18921 } 18922 }, { 18923 key: "_hide", 18924 value: function(e, i) { 18925 var t; 18926 if ((t = e && e.length ? e : void 0 !== i ? this.$tabs.not(function(e, t) { 18927 return e === i 18928 }
18928) : this.$element).hasClass("is-active") || 0 < t.find(".is-active").length) { 18929 if (t.find("li.is-active").add(t).attr({ 18930 "data-is-click": !1 18931 }).removeClass("is-active"), t.find("ul.js-dropdown-active").removeClass("js-dropdown-active"), this.changed || t.find("opens-inner").length) { 18932 var n = "left" === this.options.alignment ? "right" : "left"; 18933 t.find("li.is-dropdown-submenu-parent").add(t).removeClass("opens-inner opens-" + this.options.alignment).addClass("opens-" + n), this.changed = !1 18934 } 18935 this.$element.trigger("hide.zf.dropdownmenu", [t]) 18936 } 18937 } 18938 }, { 18939 key: "_destroy", 18940 value: function() { 18941 this.$menuItems.off(".zf.dropdownmenu").removeAttr("data-is-click").removeClass("is-right-arrow is-left-arrow is-down-arrow opens-right opens-left opens-inner"), d()(document.body).off(".zf.dropdownmenu"), r.a.Burn(this.$element, "dropdown") 18942 } 18943 }]), i 18944 }(); 18945 c.defaults = { 18946 disableHover: !1, 18947 autoclose: !0, 18948 hoverDelay: 50, 18949 clickOpen: !1, 18950 closingTime: 500, 18951 alignment: "auto", 18952 closeOnClick: !0, 18953 closeOnClickInside: !0, 18954 verticalClass: "vertical", 18955 rightClass: "align-right", 18956 forceFollow: !0 18957 } 18958}, function(e, t, i) { 18959 "use strict"; 18960 i.d(t, "a", function() { 18961 return d 18962 }); 18963 var a = i(7), 18964 n = i(2), 18965 r = i(1), 18966 o = function() { 18967 function n(e, t) { 18968 for (var i = 0; i < t.length; i++) { 18969 var n = t[i]; 18970 n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(e, n.key, n) 18971 } 18972 } 18973 return function(e, t, i) { 18974 return t && n(e.prototype, t), i && n(e, i), e 18975 } 18976 }(); 18977 var s = ["left", "right", "top", "bottom"], 18978 l = ["top", "bottom", "center"], 18979 c = ["left", "right", "center"], 18980 u = { 18981 left: l, 18982 right: l, 18983 top: c, 18984 bottom: c 18985 }; 18986 18987 function h(e, t) { 18988 var i = t.indexOf(e); 18989 return i === t.length - 1 ? t[0] : t[i + 1] 18990 } 18991 var d = function(e) { 18992 function t() { 18993 return function(e, t) { 18994 if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function") 18995 }(this, t), 18996 function(e, t) { 18997 if (!e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); 18998 return !t || "object" != typeof t && "function" != typeof t ? e : t 18999 }(this, (t.__proto__ || Object.getPrototypeOf(t)).apply(this, arguments)) 19000 } 19001 return function(e, t) { 19002 if ("function" != typeof t && null !== t) throw new TypeError("Super expression must either be null or a function, not " + typeof t); 19003 e.prototype = Object.create(t && t.prototype, { 19004 constructor: { 19005 value: e, 19006 enumerable: !1, 19007 writable: !0, 19008 configurable: !0 19009 } 19010 }), t && (Object.setPrototypeOf ? Object.setPrototypeOf(e, t) : e.__proto__ = t) 19011 }(t, n["a"]), o(t, [{ 19012 key: "_init", 19013 value: function() { 19014 this.triedPositions = {}, this.position = "auto" === this.options.position ? this._getDefaultPosition() : this.options.position, this.alignment = "auto" === this.options.alignment ? this._getDefaultAlignment() : this.options.alignment 19015 } 19016 }, { 19017 key: "_getDefaultPosition", 19018 value: function() { 19019 return "bottom" 19020 } 19021 }, { 19022 key: "_getDefaultAlignment", 19023 value: function() { 19024 switch (this.position) { 19025 case "bottom": 19026 case "top": 19027 return i.i(r.a)() ? "right" : "left";
19028 case "left": 19029 case "right": 19030 return "bottom" 19031 } 19032 } 19033 }, { 19034 key: "_reposition", 19035 value: function() { 19036 this._alignmentsExhausted(this.position) ? (this.position = h(this.position, s), this.alignment = u[this.position][0]) : this._realign() 19037 } 19038 }, { 19039 key: "_realign", 19040 value: function() { 19041 this._addTriedPosition(this.position, this.alignment), this.alignment = h(this.alignment, u[this.position]) 19042 } 19043 }, { 19044 key: "_addTriedPosition", 19045 value: function(e, t) { 19046 this.triedPositions[e] = this.triedPositions[e] || [], this.triedPositions[e].push(t) 19047 } 19048 }, { 19049 key: "_positionsExhausted", 19050 value: function() { 19051 for (var e = !0, t = 0; t < s.length; t++) e = e && this._alignmentsExhausted(s[t]); 19052 return e 19053 } 19054 }, { 19055 key: "_alignmentsExhausted", 19056 value: function(e) { 19057 return this.triedPositions[e] && this.triedPositions[e].length == u[e].length 19058 } 19059 }, { 19060 key: "_getVOffset", 19061 value: function() { 19062 return this.options.vOffset 19063 } 19064 }, { 19065 key: "_getHOffset", 19066 value: function() { 19067 return this.options.hOffset 19068 } 19069 }, { 19070 key: "_setPosition", 19071 value: function(e, t, i) { 19072 if ("false" === e.attr("aria-expanded")) return !1; 19073 a.a.GetDimensions(t), a.a.GetDimensions(e); 19074 if (t.offset(a.a.GetExplicitOffsets(t, e, this.position, this.alignment, this._getVOffset(), this._getHOffset())), !this.options.allowOverlap) { 19075 for (var n = 1e8, r = { 19076 position: this.position, 19077 alignment: this.alignment 19078 }; !this._positionsExhausted();) { 19079 var o = a.a.OverlapArea(t, i, !1, !1, this.options.allowBottomOverlap); 19080 if (0 === o) return; 19081 o < n && (n = o, r = { 19082 position: this.position, 19083 alignment: this.alignment 19084 }), this._reposition(), t.offset(a.a.GetExplicitOffsets(t, e, this.position, this.alignment, this._getVOffset(), this._getHOffset())) 19085 } 19086 this.position = r.position, this.alignment = r.alignment, t.offset(a.a.GetExplicitOffsets(t, e, this.position, this.alignment, this._getVOffset(), this._getHOffset())) 19087 } 19088 } 19089 }]), t 19090 }(); 19091 d.defaults = { 19092 position: "auto", 19093 alignment: "auto", 19094 allowOverlap: !1, 19095 allowBottomOverlap: !0, 19096 vOffset: 0, 19097 hOffset: 0 19098 } 19099}, function(e, t, i) { 19100 "use strict"; 19101 i.d(t, "a", function() { 19102 return r 19103 }); 19104 var n = i(0), 19105 o = i.n(n), 19106 a = i(1), 19107 s = i(2), 19108 l = function() { 19109 function n(e, t) { 19110 for (var i = 0; i < t.length; i++) { 19111 var n = t[i]; 19112 n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(e, n.key, n) 19113 } 19114 } 19115 return function(e, t, i) { 19116 return t && n(e.prototype, t), i && n(e, i), e 19117 } 19118 }(); 19119 var r = function(e) { 19120 function r() { 19121 return function(e, t) { 19122 if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function") 19123 }(this, r), 19124 function(e, t) { 19125 if (!e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); 19126 return !t || "object" != typeof t && "function" != typeof t ? e : t 19127 }(this, (r.__proto__ || Object.getPrototypeOf(r)).apply(this, arguments)) 19128 } 19129 return function(e, t) { 19130 if ("function" != typeof t && null !== t) throw new TypeError("Super expression must either be null or a function, not " + typeof t); 19131 e.prototype = Object.create(t && t.prototype, { 19132 constructor: { 19133 value: e, 19134 enumerable: !1, 19135 writable: !0, 19136 configurable: !0 19137 } 19138 }), t && (Object.setPrototypeOf ? Object.setPrototypeOf(e, t) : e.__proto__ = t) 19139 }(r, s["a"]), l(r, [{ 19140 key: "_setup", 19141 value: function(e, t) { 19142 this.$element = e, this.options = o.a.extend({}, r.defaults, this.$element.data(), t), this.className = "SmoothScroll", this._init() 19143 } 19144 }, { 19145 key: "_init", 19146 value: function() { 19147 var e = this.$element[0].id || i.i(a.b)(6, "smooth-scroll"); 19148 this.$element.attr({ 19149 id: e 19150 }), this._events() 19151 } 19152 }, { 19153 key: "_events", 19154 value: function() { 19155 var i = this, 19156 e = function(e) { 19157 if (!o()(this).is('a[href^="#"]')) return !1; 19158 var t = this.getAttribute("href"); 19159 i._inTransition = !0, r.scrollToLoc(t, i.options, function() { 19160 i._inTransition = !1 19161 }), e.preventDefault() 19162 }; 19163 this.$element.on("click.zf.smoothScroll", e), this.$element.on("click.zf.smoothScroll", 'a[href^="#"]', e) 19164 } 19165 }], [{ 19166 key: "scrollToLoc", 19167 value: function(e) { 19168 var t = 1 < arguments.length && void 0 !== arguments[1] ? arguments[1] : r.defaults, 19169 i = arguments[2]; 19170 if (!o()(e).length) return !1; 19171 var n = Math.round(o()(e).offset().top - t.threshold / 2 - t.offset); 19172 o()("html, body").stop(!0).animate({ 19173 scrollTop: n 19174 }, t.animationDuration, t.animationEasing, function() { 19175 i && "function" == typeof i && i() 19176 }) 19177 } 19178 }]), r 19179 }(); 19180 r.defaults = { 19181 animationDuration: 500, 19182 animationEasing: "linear", 19183 threshold: 50, 19184 offset: 0 19185 } 19186}, function(e, t, r) { 19187 "use strict"; 19188 r.d(t, "a", function() { 19189 return c 19190 }); 19191 var i = r(0), 19192 s = r.n(i), 19193 a = r(3), 19194 o = r(8), 19195 n = r(2), 19196 l = function() { 19197 function n(e, t) { 19198 for (var i = 0; i < t.length; i++) { 19199 var n = t[i]; 19200 n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(e, n.key, n) 19201 } 19202 } 19203 return function(e, t, i) { 19204 return t && n(e.prototype, t), i && n(e, i), e 19205 } 19206 }(); 19207 var c = function(e) { 19208 function i() { 19209 return function(e, t) { 19210 if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function") 19211 }(this, i), 19212 function(e, t) { 19213 if (!e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); 19214 return !t || "object" != typeof t && "function" != typeof t ? e : t 19215 }(this, (i.__proto__ || Object.getPrototypeOf(i)).apply(this, arguments)) 19216 } 19217 return function(e, t) { 19218 if ("function" != typeof t && null !== t) throw new TypeError("Super expression must either be null or a function, not " + typeof t); 19219 e.prototype = Object.create(t && t.prototype, { 19220 constructor: { 19221 value: e, 19222 enumerable: !1, 19223 writable: !0, 19224 configurable: !0 19225 } 19226 }), t && (Object.setPrototypeOf ? Object.setPrototypeOf(e, t) : e.__proto__ = t) 19227 }(i, n["a"]), l(i, [{ 19228 key: "_setup", 19229 value: function(e, t) { 19230 this.$element = e, this.options = s.a.extend({}, i.defaults, this.$element.data(), t), this.className = "Tabs", this._init(), a.a.register("Tabs", { 19231 ENTER: "open", 19232 SPACE: "open", 19233 ARROW_RIGHT: "next", 19234 ARROW_UP: "previous", 19235 ARROW_DOWN: "next", 19236 ARROW_LEFT: "previous" 19237 }) 19238 } 19239 }, { 19240 key: "_init", 19241 value: function() { 19242 var n = this, 19243 a = this; 19244 if (this.$element.attr({ 19245 role: "tablist" 19246 }), this.$tabTitles = this.$element.find("." + this.options.linkClass), this.$tabContent = s()('[data-tabs-content="' + this.$element[0].id + '"]'), this.$tabTitles.each(function() { 19247 var e = s()(this), 19248 t = e.find("a"), 19249 i = e.hasClass("" + a.options.linkActiveClass), 19250 n = t.attr("data-tabs-target") || t[0].hash.slice(1), 19251 r = t[0].id ? t[0].id : n + "-label", 19252 o = s()("#" + n); 19253 e.attr({ 19254 role: "presentation" 19255 }), t.attr({ 19256 role: "tab", 19257 "aria-controls": n, 19258 "aria-selected": i, 19259 id: r, 19260 tabindex: i ? "0" : "-1" 19261 }), o.attr({ 19262 role: "tabpanel", 19263 "aria-labelledby": r 19264 }), i || o.attr("aria-hidden", "true"), i && a.options.autoFocus && s()(window).load(function() { 19265 s()("html, body").animate({ 19266 scrollTop: e.offset().top 19267 }, a.options.deepLinkSmudgeDelay, function() { 19268 t.focus() 19269 }) 19270 }) 19271 }), this.options.matchHeight) { 19272 var e = this.$tabContent.find("img"); 19273 e.length ? r.i(o.a)(e, this._setHeight.bind(this)) : this._setHeight() 19274 } 19275 this._checkDeepLink = function() { 19276 var e = window.location.hash; 19277 if (e.length) { 19278 var t = n.$element.find('[href$="' + e + '"]'); 19279 if (t.length) { 19280 if (n.selectTab(s()(e), !0), n.options.deepLinkSmudge) { 19281 var i = n.$element.offset(); 19282 s()("html, body").animate({ 19283 scrollTop: i.top 19284 }, n.options.deepLinkSmudgeDelay) 19285 } 19286 n.$element.trigger("deeplink.zf.tabs", [t, s()(e)]) 19287 } 19288 } 19289 }, this.options.deepLink && this._checkDeepLink(), this._events() 19290 } 19291 }, { 19292 key: "_events", 19293 value: function() { 19294 this._addKeyHandler(), this._addClickHandler(), this._setHeightMqHandler = null, this.options.matchHeight && (this._setHeightMqHandler = this._setHeight.bind(this), s()(window).on("changed.zf.mediaquery", this._setHeightMqHandler)), this.options.deepLink && s()(window).on("popstate", this._checkDeepLink) 19295 } 19296 }, { 19297 key: "_addClickHandler", 19298 value: function() { 19299 var t = this; 19300 this.$element.off("click.zf.tabs").on("click.zf.tabs", "." + this.options.linkClass, function(e) { 19301 e.preventDefault(), e.stopPropagation(), t._handleTabChange(s()(this)) 19302 }) 19303 } 19304 }, { 19305 key: "_addKeyHandler", 19306 value: function() { 19307 var o = this; 19308 this.$tabTitles.off("keydown.zf.tabs").on("keydown.zf.tabs", function(e) { 19309 if (9 !== e.which) { 19310 var t, i, n = s()(this), 19311 r = n.parent("ul").children("li"); 19312 r.each(function(e) { 19313 s()(this).is(n) && (o.options.wrapOnKeys ? (t = 0 === e ? r.last() : r.eq(e - 1), i = e === r.length - 1 ? r.first() : r.eq(e + 1)) : (t = r.eq(Math.max(0, e - 1)), i = r.eq(Math.min(e + 1, r.length - 1)))) 19314 }), a.a.handleKey(e, "Tabs", { 19315 open: function() { 19316 n.find('[role="tab"]').focus(), o._handleTabChange(n) 19317 }, 19318 previous: function() { 19319 t.find('[role="tab"]').focus(), o._handleTabChange(t) 19320 }, 19321 next: function() { 19322 i.find('[role="tab"]').focus(), o._handleTabChange(i) 19323 }, 19324 handled: function() { 19325 e.stopPropagation(), e.preventDefault() 19326 } 19327 }) 19328 } 19329 }) 19330 } 19331 }, { 19332 key: "_handleTabChange", 19333 value: function(e, t) { 19334 if (e.hasClass("" + this.options.linkActiveClass)) this.options.activeCollapse && (this._collapseTab(e), this.$element.trigger("collapse.zf.tabs", [e])); 19335 else { 19336 var i = this.$element.find("." + this.options.linkClass + "." + this.options.linkActiveClass), 19337 n = e.find('[role="tab"]'), 19338 r = n.attr("data-tabs-target") || n[0].hash.slice(1), 19339 o = this.$tabContent.find("#" + r); 19340 if (this._collapseTab(i), this._openTab(e), this.options.deepLink && !t) { 19341 var a = e.find("a").attr("href"); 19342 this.options.updateHistory ? history.pushState({}, "", a) : history.replaceState({}, "", a) 19343 } 19344 this.$element.trigger("change.zf.tabs", [e, o]), o.find("[data-mutate]").trigger("mutateme.zf.trigger") 19345 } 19346 } 19347 }, { 19348 key: "_openTab", 19349 value: function(e) { 19350 var t = e.find('[role="tab"]'), 19351 i = t.attr("data-tabs-target") || t[0].hash.slice(1), 19352 n = this.$tabContent.find("#" + i); 19353 e.addClass("" + this.options.linkActiveClass), t.attr({ 19354 "aria-selected": "true", 19355 tabindex: "0" 19356 }), n.addClass("" + this.options.panelActiveClass).removeAttr("aria-hidden") 19357 } 19358 }, { 19359 key: "_collapseTab", 19360 value: function(e) { 19361 var t = e.removeClass("" + this.options.linkActiveClass).find('[role="tab"]').attr({ 19362 "aria-selected": "false", 19363 tabindex: -1 19364 }); 19365 s()("#" + t.attr("aria-controls")).removeClass("" + this.options.panelActiveClass).attr({ 19366 "aria-hidden": "true" 19367 }) 19368 } 19369 }, { 19370 key: "selectTab", 19371 value: function(e, t) { 19372 var i; 19373 (i = "object" == typeof e ? e[0].id : e).indexOf("#") < 0 && (i = "#" + i); 19374 var n = this.$tabTitles.find('[href$="' + i + '"]').parent("." + this.options.linkClass); 19375 this._handleTabChange(n, t) 19376 } 19377 }, { 19378 key: "_setHeight", 19379 value: function() { 19380 var n = 0, 19381 r = this; 19382 this.$tabContent.find("." + this.options.panelClass).css("height", "").each(function() { 19383 var e = s()(this), 19384 t = e.hasClass("" + r.options.panelActiveClass); 19385 t |
19385| e.css({ 19386 visibility: "hidden", 19387 display: "block" 19388 }); 19389 var i = this.getBoundingClientRect().height; 19390 t || e.css({ 19391 visibility: "", 19392 display: "" 19393 }), n = n < i ? i : n 19394 }).css("height", n + "px") 19395 } 19396 }, { 19397 key: "_destroy", 19398 value: function() { 19399 this.$element.find("." + this.options.linkClass).off(".zf.tabs").hide().end().find("." + this.options.panelClass).hide(), this.options.matchHeight && null != this._setHeightMqHandler && s()(window).off("changed.zf.mediaquery", this._setHeightMqHandler), this.options.deepLink && s()(window).off("popstate", this._checkDeepLink) 19400 } 19401 }]), i 19402 }(); 19403 c.defaults = { 19404 deepLink: !1, 19405 deepLinkSmudge: !1, 19406 deepLinkSmudgeDelay: 300, 19407 updateHistory: !1, 19408 autoFocus: !1, 19409 wrapOnKeys: !0, 19410 matchHeight: !1, 19411 activeCollapse: !1, 19412 linkClass: "tabs-title", 19413 linkActiveClass: "is-active", 19414 panelClass: "tabs-panel", 19415 panelActiveClass: "is-active" 19416 } 19417}, function(e, t, i) { 19418 "use strict"; 19419 i.d(t, "a", function() { 19420 return r 19421 }); 19422 var n = i(0); 19423 i.n(n); 19424 19425 function r(t, e, i) { 19426 var n, r, o = this, 19427 a = e.duration, 19428 s = Object.keys(t.data())[0] || "timer", 19429 l = -1; 19430 this.isPaused = !1, this.restart = function() { 19431 l = -1, clearTimeout(r), this.start() 19432 }, this.start = function() { 19433 this.isPaused = !1, clearTimeout(r), l = l <= 0 ? a : l, t.data("paused", !1), n = Date.now(), r = setTimeout(function() { 19434 e.infinite && o.restart(), i && "function" == typeof i && i() 19435 }, l), t.trigger("timerstart.zf." + s) 19436 }, this.pause = function() { 19437 this.isPaused = !0, clearTimeout(r), t.data("paused", !0); 19438 var e = Date.now(); 19439 l -= e - n, t.trigger("timerpaused.zf." + s) 19440 } 19441 } 19442}, function(e, t, i) { 19443 "use strict"; 19444 Object.defineProperty(t, "__esModule", { 19445 value: !0 19446 }); 19447 var n = i(0), 19448 r = i.n(n), 19449 o = i(21), 19450 a = i(1), 19451 s = i(7), 19452 l = i(8), 19453 c = i(3), 19454 u = i(4), 19455 h = i(6), 19456 d = i(9), 19457 p = i(18), 19458 f = i(10), 19459 m = i(5), 19460 g = i(20), 19461 v = i(11), 19462 y = i(12), 19463 b = i(13), 19464 w = i(22), 19465 x = i(14), 19466 _ = i(23), 19467 T = i(24), 19468 E = i(25), 19469 M = i(26), 19470 S = i(27), 19471 C = i(29), 19472 A = i(30), 19473 R = i(31), 19474 L = i(32), 19475 P = i(16), 19476 k = i(33), 19477 O = i(17), 19478 D = i(34), 19479 I = i(35), 19480 z = i(28); 19481 o.a.addToJquery(r.a), o.a.rtl = a.a, o.a.GetYoDigits = a.b, o.a.transitionend = a.c, o.a.Box = s.a, o.a.onImagesLoaded = l.a, o.a.Keyboard = c.a, o.a.MediaQuery = u.a, o.a.Motion = h.a, o.a.Move = h.b, o.a.Nest = d.a, o.a.Timer = p.a, f.a.init(r.a), m.a.init(r.a, o.a), o.a.plugin(g.a, "Abide"), o.a.plugin(v.a, "Accordion"), o.a.plugin(y.a, "AccordionMenu"), o.a.plugin(b.a, "Drilldown"), o.a.plugin(w.a, "Dropdown"), o.a.plugin(x.a, "DropdownMenu"), o.a.plugin(_.a, "Equalizer"), o.a.plugin(T.a, "Interchange"), o.a.plugin(E.a, "Magellan"), o.a.plugin(M.a, "OffCanvas"), o.a.plugin(S.a, "Orbit"), o.a.plugin(C.a, "ResponsiveMenu"), o.a.plugin(A.a, "ResponsiveToggle"), o.a.plugin(R.a, "Reveal"), o.a.plugin(L.a, "Slider"), o.a.plugin(P.a, "SmoothScroll"), o.a.plugin(k.a, "Sticky"), o.a.plugin(O.a, "Tabs"), o.a.plugin(D.a, "Toggler"), o.a.plugin(I.a, "Tooltip"), o.a.plugin(z.a, "ResponsiveAccordionTabs") 19482}, function(e, t, i) { 19483 "use strict"; 19484 i.d(t, "a", function() { 19485 return a 19486 }); 19487 var n = i(0), 19488 u = i.n(n), 19489 r = i(2), 19490 o = function() { 19491 function n(e, t) { 19492 for (var i = 0; i < t.length; i++) { 19493 var n = t[i]; 19494 n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(e, n.key, n) 19495 } 19496 } 19497 return function(e, t, i) { 19498 return t && n(e.prototype, t), i && n(e, i), e 19499 } 19500 }(); 19501 var a = function(e) { 19502 function i() { 19503 return function(e, t) { 19504 if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function") 19505 }(this, i), 19506 function(e, t) { 19507 if (!e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); 19508 return !t || "object" != typeof t && "function" != typeof t ? e : t 19509 }(this, (i.__proto__ || Object.getPrototypeOf(i)).apply(this, arguments)) 19510 } 19511 return function(e, t) { 19512 if ("function" != typeof t && null !== t) throw new TypeError("Super expression must either be null or a function, not " + typeof t); 19513 e.prototype = Object.create(t && t.prototype, { 19514 constructor: { 19515 value: e, 19516 enumerable: !1, 19517 writable: !0, 19518 configurable: !0 19519 } 19520 }), t && (Object.setPrototypeOf ? Object.setPrototypeOf(e, t) : e.__proto__ = t) 19521 }(i, r["a"]), o(i, [{ 19522 key: "_setup", 19523 value: function(e) { 19524 var t = 1 < arguments.length && void 0 !== arguments[1] ? arguments[1] : {}; 19525 this.$element = e, this.options = u.a.extend(!0, {}, i.defaults, this.$element.data(), t), this.className = "Abide", this._init() 19526 } 19527 }, { 19528 key: "_init", 19529 value: function() { 19530 this.$inputs = this.$element.find("input, textarea, select"), this._events() 19531 } 19532 }, { 19533 key: "_events", 19534 value: function() { 19535 var t = this; 19536 this.$element.off(".abide").on("reset.zf.abide", function() { 19537 t.resetForm() 19538 }).on("submit.zf.abide", function() { 19539 return t.validateForm() 19540 }), "fieldChange" === this.options.validateOn && this.$inputs.off("change.zf.abide").on("change.zf.abide", function(e) { 19541 t.validateInput(u()(e.target)) 19542 }), this.options.liveValidate && this.$inputs.off("input.zf.abide").on("input.zf.abide", function(e) { 19543 t.validateInput(u()(e.target)) 19544 }), this.options.validateOnBlur && this.$inputs.off("blur.zf.abide").on("blur.zf.abide", function(e) { 19545 t.validateInput(u()(e.target)) 19546 }) 19547 } 19548 }, { 19549 key: "_reflow", 19550 value: function() { 19551 this._init() 19552 } 19553 }, { 19554 key: "requiredCheck", 19555 value: function(e) { 19556 if (!e.attr("required")) return !0; 19557 var t = !0; 19558 switch (e[0].type) { 19559 case "checkbox": 19560 t = e[0].checked; 19561 break; 19562 case "select": 19563 case "select-one": 19564 case "select-multiple": 19565 var i = e.find("option:selected"); 19566 i.length && i.val() || (t = !1); 19567 break; 19568 default: 19569 e.val() && e.val().length || (t = !1) 19570 } 19571 return t 19572 } 19573 }, { 19574 key: "findFormError", 19575 value: function(e) { 19576 var t = e[0].id, 19577 i = e.siblings(this.options.formErrorSelector); 19578 return i.length || (i = e.parent().find(this.options.formErrorSelector)), i = i.add(this.$element.find('[data-form-error-for="' + t + '"]')) 19579 } 19580 }, { 19581 key: "findLabel", 19582 value: function(e) { 19583 var t = e[0].id, 19584 i = this.$element.find('label[for="' + t + '"]'); 19585 return i.length ? i : e.closest("label") 19586 } 19587 }, {
19588 key: "findRadioLabels", 19589 value: function(e) { 19590 var r = this, 19591 t = e.map(function(e, t) { 19592 var i = t.id, 19593 n = r.$element.find('label[for="' + i + '"]'); 19594 return n.length || (n = u()(t).closest("label")), n[0] 19595 }); 19596 return u()(t) 19597 } 19598 }, { 19599 key: "addErrorClasses", 19600 value: function(e) { 19601 var t = this.findLabel(e), 19602 i = this.findFormError(e); 19603 t.length && t.addClass(this.options.labelErrorClass), i.length && i.addClass(this.options.formErrorClass), e.addClass(this.options.inputErrorClass).attr("data-invalid", "") 19604 } 19605 }, { 19606 key: "removeRadioErrorClasses", 19607 value: function(e) { 19608 var t = this.$element.find(':radio[name="' + e + '"]'), 19609 i = this.findRadioLabels(t), 19610 n = this.findFormError(t); 19611 i.length && i.removeClass(this.options.labelErrorClass), n.length && n.removeClass(this.options.formErrorClass), t.removeClass(this.options.inputErrorClass).removeAttr("data-invalid") 19612 } 19613 }, { 19614 key: "removeErrorClasses", 19615 value: function(e) { 19616 if ("radio" == e[0].type) return this.removeRadioErrorClasses(e.attr("name")); 19617 var t = this.findLabel(e), 19618 i = this.findFormError(e); 19619 t.length && t.removeClass(this.options.labelErrorClass), i.length && i.removeClass(this.options.formErrorClass), e.removeClass(this.options.inputErrorClass).removeAttr("data-invalid") 19620 } 19621 }, { 19622 key: "validateInput", 19623 value: function(e) { 19624 var t = this.requiredCheck(e), 19625 i = !1, 19626 n = !0, 19627 r = e.attr("data-validator"), 19628 o = !0; 19629 if (e.is("[data-abide-ignore]") || e.is('[type="hidden"]') || e.is("[disabled]")) return !0; 19630 switch (e[0].type) { 19631 case "radio": 19632 i = this.validateRadio(e.attr("name")); 19633 break; 19634 case "checkbox": 19635 i = t; 19636 break; 19637 case "select": 19638 case "select-one": 19639 case "select-multiple": 19640 i = t; 19641 break; 19642 default: 19643 i = this.validateText(e) 19644 } 19645 r && (n = this.matchValidation(e, r, e.attr("required"))), e.attr("data-equalto") && (o = this.options.validators.equalTo(e)); 19646 var a = -1 === [t, i, n, o].indexOf(!1), 19647 s = (a ? "valid" : "invalid") + ".zf.abide"; 19648 if (a) { 19649 var l = this.$element.find('[data-equalto="' + e.attr("id") + '"]'); 19650 if (l.length) { 19651 var c = this; 19652 l.each(function() { 19653 u()(this).val() && c.validateInput(u()(this)) 19654 }) 19655 } 19656 } 19657 return this[a ? "removeErrorClasses" : "addErrorClasses"](e), e.trigger(s, [e]), a 19658 } 19659 }, { 19660 key: "validateForm", 19661 value: function() { 19662 var e = [], 19663 t = this; 19664 this.$inputs.each(function() { 19665 e.push(t.validateInput(u()(this))) 19666 }); 19667 var i = -1 === e.indexOf(!1); 19668 return this.$element.find("[data-abide-error]").css("display", i ? "none" : "block"), this.$element.trigger((i ? "formvalid" : "forminvalid") + ".zf.abide", [this.$element]), i 19669 } 19670 }, { 19671 key: "validateText", 19672 value: function(e, t) { 19673 t = t || e.attr("pattern") || e.attr("type"); 19674 var i = e.val(), 19675 n = !1; 19676 return i.length ? n = this.options.patterns.hasOwnProperty(t) ? this.options.patterns[t].test(i) : t === e.attr("type") || new RegExp(t).test(i) : e.prop("required") || (n = !0), n 19677 } 19678 }, { 19679 key: "validateRadio", 19680 value: function(e) { 19681 var t = this.$element.find(':radio[name="' + e + '"]'), 19682 i = !1, 19683 n = !1; 19684 return t.each(function(e, t) { 19685 u()(t).attr("required") && (n = !0) 19686 }), n || (i = !0), i || t.each(function(e, t) { 19687 u()(t).prop("checked") && (i = !0) 19688 }), i 19689 } 19690 }, { 19691 key: "matchValidation", 19692 value: function(t, e, i) { 19693 var n = this; 19694 return i = !!i, -1 === e.split(" ").map(function(e) { 19695 return n.options.validators[e](t, i, t.parent()) 19696 }).indexOf(!1) 19697 } 19698 }, { 19699 key: "resetForm", 19700 value: function() { 19701 var e = this.$element, 19702 t = this.options; 19703 u()("." + t.labelErrorClass, e).not("small").removeClass(t.labelErrorClass), u()("." + t.inputErrorClass, e).not("small").removeClass(t.inputErrorClass), u()(t.formErrorSelector + "." + t.formErrorClass).removeClass(t.formErrorClass), e.find("[data-abide-error]").css("display", "none"), u()(":input", e).not(":button, :submit, :reset, :hidden, :radio, :checkbox, [data-abide-ignore]").val("").removeAttr("data-invalid"), u()(":input:radio", e).not("[data-abide-ignore]").prop("checked", !1).removeAttr("data-invalid"), u()(":input:checkbox", e).not("[data-abide-ignore]").prop("checked", !1).removeAttr("data-invalid"), e.trigger("formreset.zf.abide", [e]) 19704 } 19705 }, { 19706 key: "_destroy", 19707 value: function() { 19708 var e = this; 19709 this.$element.off(".abide").find("[data-abide-error]").css("display", "none"), this.$inputs.off(".abide").each(function() { 19710 e.removeErrorClasses(u()(this)) 19711 }) 19712 } 19713 }]), i 19714 }(); 19715 a.defaults = { 19716 validateOn: "fieldChange", 19717 labelErrorClass: "is-invalid-label", 19718 inputErrorClass: "is-invalid-input", 19719 formErrorSelector: ".form-error", 19720 formErrorClass: "is-visible", 19721 liveValidate: !1, 19722 validateOnBlur: !1, 19723 patterns: { 19724 alpha: /^[a-zA-Z]+$/, 19725 alpha_numeric: /^[a-zA-Z0-9]+$/, 19726 integer: /^[-+]?\d+$/, 19727 number: /^[-+]?\d*(?:[\.\,]\d+)?$/, 19728 card: /^(?:4[0-9]{12}(?:[0-9]{3})?|5[1-5][0-9]{14}|(?:222[1-9]|2[3-6][0-9]{2}|27[0-1][0-9]|2720)[0-9]{12}|6(?:011|5[0-9][0-9])[0-9]{12}|3[47][0-9]{13}|3(?:0[0-5]|[68][0-9])[0-9]{11}|(?:2131|1800|35\d{3})\d{11})$/, 19729 cvv: /^([0-9]){3,4}$/, 19730 email: /^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+$/,
19731 url: /^(https?|ftp|file|ssh):\/\/(((([a-zA-Z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-zA-Z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-zA-Z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-zA-Z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-zA-Z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-zA-Z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-zA-Z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-zA-Z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-zA-Z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-zA-Z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-zA-Z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-zA-Z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-zA-Z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/, 19732 domain: /^([a-zA-Z0-9]([a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,8}$/, 19733 datetime: /^([0-2][0-9]{3})\-([0-1][0-9])\-([0-3][0-9])T([0-5][0-9])\:([0-5][0-9])\:([0-5][0-9])(Z|([\-\+]([0-1][0-9])\:00))$/, 19734 date: /(?:19|20)[0-9]{2}-(?:(?:0[1-9]|1[0-2])-(?:0[1-9]|1[0-9]|2[0-9])|(?:(?!02)(?:0[1-9]|1[0-2])-(?:30))|(?:(?:0[13578]|1[02])-31))$/, 19735 time: /^(0[0-9]|1[0-9]|2[0-3])(:[0-5][0-9]){2}$/, 19736 dateISO: /^\d{4}[\/\-]\d{1,2}[\/\-]\d{1,2}$/, 19737 month_day_year: /^(0[1-9]|1[012])[- \/.](0[1-9]|[12][0-9]|3[01])[- \/.]\d{4}$/, 19738 day_month_year: /^(0[1-9]|[12][0-9]|3[01])[- \/.](0[1-9]|1[012])[- \/.]\d{4}$/, 19739 color: /^#?([a-fA-F0-9]{6}|[a-fA-F0-9]{3})$/, 19740 website: { 19741 test: function(e) { 19742 return a.defaults.patterns.domain.test(e) || a.defaults.patterns.url.test(e) 19743 } 19744 } 19745 }, 19746 validators: { 19747 equalTo: function(e, t, i) { 19748 return u()("#" + e.attr("data-equalto")).val() === e.val() 19749 } 19750 } 19751 } 19752}, function(e, t, n) { 19753 "use strict"; 19754 n.d(t, "a", function() { 19755 return s 19756 }); 19757 var i = n(0), 19758 o = n.n(i), 19759 r = n(1), 19760 a = n(4), 19761 s = { 19762 version: "6.4.3", 19763 _plugins: {}, 19764 _uuids: [], 19765 plugin: function(e, t) { 19766 var i = t || l(e), 19767 n = c(i); 19768 this._plugins[n] = this[i] = e 19769 }, 19770 registerPlugin: function(e, t) { 19771 var i = t ? c(t) : l(e.constructor).toLowerCase(); 19772 e.uuid = n.i(r.b)(6, i), e.$element.attr("data-" + i) || e.$element.attr("data-" + i, e.uuid), e.$element.data("zfPlugin") || e.$element.data("zfPlugin", e), e.$element.trigger("init.zf." + i), this._uuids.push(e.uuid) 19773 }, 19774 unregisterPlugin: function(e) { 19775 var t = c(l(e.$element.data("zfPlugin").constructor)); 19776 for (var i in this._uuids.splice(this._uuids.indexOf(e.uuid), 1), e.$element.removeAttr("data-" + t).removeData("zfPlugin").trigger("destroyed.zf." + t), e) e[i] = null 19777 }, 19778 reInit: function(e) { 19779 var t = e instanceof o.a; 19780 try { 19781 if (t) e.each(function() { 19782 o()(this).data("zfPlugin")._init() 19783 }); 19784 else { 19785 var i = this; 19786 ({ 19787 object: function(e) { 19788 e.forEach(function(e) { 19789 e = c(e), o()("[data-" + e + "]").foundation("_init") 19790 }) 19791 }, 19792 string: function() { 19793 e = c(e), o()("[data-" + e + "]").foundation("_init") 19794 }, 19795 undefined: function() { 19796 this.object(Object.keys(i._plugins)) 19797 } 19798 })[typeof e](e) 19799 } 19800 } catch (e) { 19801 console.error(e) 19802 } finally { 19803 return e 19804 } 19805 }, 19806 reflow: function(n, e) { 19807 void 0 === e ? e = Object.keys(this._plugins) : "string" == typeof e && (e = [e]); 19808 var r = this; 19809 o.a.each(e, function(e, t) { 19810 var i = r._plugins[t]; 19811 o()(n).find("[data-" + t + "]").addBack("[data-" + t + "]").each(function() { 19812 var e = o()(this), 19813 n = {}; 19814 if (e.data("zfPlugin")) console.warn("Tried to initialize " + t + " on an element that already has a Foundation plugin."); 19815 else { 19816 if (e.attr("data-options")) e.attr("data-options").split(";").forEach(function(e, t) { 19817 var i = e.split(":").map(function(e) { 19818 return e.trim() 19819 }); 19820 i[0] && (n[i[0]] = function(e) { 19821 { 19822 if ("true" === e) return !0; 19823 if ("false" === e) return !1; 19824 if (!isNaN(1 * e)) return parseFloat(e) 19825 } 19826 return e 19827 }(i[1])) 19828 }); 19829 try { 19830 e.data("zfPlugin", new i(o()(this), n)) 19831 } catch (e) { 19832 console.error(e) 19833 } finally { 19834 return 19835 } 19836 } 19837 }) 19838 }) 19839 }, 19840 getFnName: l, 19841 addToJquery: function(o) { 19842 return o.fn.foundation = function(i) { 19843 var e = typeof i, 19844 t = o(".no-js"); 19845 if (t.length && t.removeClass("no-js"), "undefined" === e) a.a._init(), s.reflow(this); 19846 else { 19847 if ("string" !== e) throw new TypeError("We're sorry, " + e + " is not a valid parameter. You must use a string representing the method you wish to invoke."); 19848 var n = Array.prototype.slice.call(arguments, 1), 19849 r = this.data("zfPlugin"); 19850 if (void 0 === r || void 0 === r[i]) throw new ReferenceError("We're sorry, '" + i + "' is not an available method for " + (r ? l(r) : "this element") + "."); 19851 1 === this.length ? r[i].apply(r, n) : this.each(function(e, t) { 19852 r[i].apply(o(t).data("zfPlugin"), n) 19853 }) 19854 } 19855 return this 19856 }, o 19857 } 19858 }; 19859 19860 function l(e) { 19861 if (void 0 === Function.prototype.name) { 19862 var t = /function\s([^(]{1,})\(/.exec(e.toString()); 19863 return t && 1 < t.length ? t[1].trim() : "" 19864 } 19865 return void 0 === e.prototype ? e.constructor.name : e.prototype.constructor.name 19866 } 19867 19868 function c(e) { 19869 return e.replace(/([a-z])([A-Z])/g, "$1-$2").toLowerCase() 19870 } 19871 s.util = { 19872 throttle: function(i, n) { 19873 var r = null; 19874 return function() { 19875 var e = this, 19876 t = arguments; 19877 null === r && (r = setTimeout(function() { 19878 i.apply(e, t), r = null 19879 }, n)) 19880 } 19881 } 19882 }, window.Foundation = s, 19883 function() { 19884 Date.now && window.Date.now || (window.Date.now = Date.now = function() { 19885 return (new Date).getTime() 19886 }); 19887 for (var e = ["webkit", "moz"], t = 0; t < e.length && !window.requestAnimationFrame; ++t) { 19888 var i = e[t]; 19889 window.requestAnimationFrame = window[i + "RequestAnimationFrame"], window.cancelAnimationFrame = window[i + "CancelAnimationFrame"] || window[i + "CancelRequestAnimationFrame"] 19890 } 19891 if (/iP(ad|hone|od).*OS 6/.test(window.navigator.userAgent) || !window.requestAnimationFrame || !window.cancelAnimationFrame) { 19892 var n = 0; 19893 window.requestAnimationFrame = function(e) { 19894 var t = Date.now(), 19895 i = Math.max(n + 16, t); 19896 return setTimeout(function() { 19897 e(n = i) 19898 }, i - t) 19899 }, window.cancelAnimationFrame = clearTimeout 19900 } 19901 window.performance && window.performance.now || (window.performance = { 19902 start: Date.now(), 19903 now: function() { 19904 return Date.now() - this.start 19905 } 19906 }) 19907 }(), Function.prototype.bind || (Function.prototype.bind = function(e) { 19908 if ("function" != typeof this) throw new TypeError("Function.prototype.bind - what is trying to be bound is not callable"); 19909 var t = Array.prototype.slice.call(arguments, 1), 19910 i = this, 19911 n = function() {}, 19912 r = function() {
19913 return i.apply(this instanceof n ? this : e, t.concat(Array.prototype.slice.call(arguments))) 19914 }; 19915 return this.prototype && (n.prototype = this.prototype), r.prototype = new n, r 19916 }) 19917}, function(e, t, n) { 19918 "use strict"; 19919 n.d(t, "a", function() { 19920 return h 19921 }); 19922 var i = n(0), 19923 r = n.n(i), 19924 o = n(3), 19925 a = n(1), 19926 s = n(15), 19927 l = n(5), 19928 c = function() { 19929 function n(e, t) { 19930 for (var i = 0; i < t.length; i++) { 19931 var n = t[i]; 19932 n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(e, n.key, n) 19933 } 19934 } 19935 return function(e, t, i) { 19936 return t && n(e.prototype, t), i && n(e, i), e 19937 } 19938 }(), 19939 u = function e(t, i, n) { 19940 null === t && (t = Function.prototype); 19941 var r = Object.getOwnPropertyDescriptor(t, i); 19942 if (void 0 === r) { 19943 var o = Object.getPrototypeOf(t); 19944 return null === o ? void 0 : e(o, i, n) 19945 } 19946 if ("value" in r) return r.value; 19947 var a = r.get; 19948 return void 0 !== a ? a.call(n) : void 0 19949 }; 19950 var h = function(e) { 19951 function i() { 19952 return function(e, t) { 19953 if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function") 19954 }(this, i), 19955 function(e, t) { 19956 if (!e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); 19957 return !t || "object" != typeof t && "function" != typeof t ? e : t 19958 }(this, (i.__proto__ || Object.getPrototypeOf(i)).apply(this, arguments)) 19959 } 19960 return function(e, t) { 19961 if ("function" != typeof t && null !== t) throw new TypeError("Super expression must either be null or a function, not " + typeof t); 19962 e.prototype = Object.create(t && t.prototype, { 19963 constructor: { 19964 value: e, 19965 enumerable: !1, 19966 writable: !0, 19967 configurable: !0 19968 } 19969 }), t && (Object.setPrototypeOf ? Object.setPrototypeOf(e, t) : e.__proto__ = t) 19970 }(i, s["a"]), c(i, [{ 19971 key: "_setup", 19972 value: function(e, t) { 19973 this.$element = e, this.options = r.a.extend({}, i.defaults, this.$element.data(), t), this.className = "Dropdown", l.a.init(r.a), this._init(), o.a.register("Dropdown", { 19974 ENTER: "open", 19975 SPACE: "open", 19976 ESCAPE: "close" 19977 }) 19978 } 19979 }, { 19980 key: "_init", 19981 value: function() { 19982 var e = this.$element.attr("id"); 19983 this.$anchors = r()('[data-toggle="' + e + '"]').length ? r()('[data-toggle="' + e + '"]') : r()('[data-open="' + e + '"]'), this.$anchors.attr({ 19984 "aria-controls": e, 19985 "data-is-focus": !1, 19986 "data-yeti-box": e, 19987 "aria-haspopup": !0, 19988 "aria-expanded": !1 19989 }), this._setCurrentAnchor(this.$anchors.first()), this.options.parentClass ? this.$parent = this.$element.parents("." + this.options.parentClass) : this.$parent = null, this.$element.attr({ 19990 "aria-hidden": "true", 19991 "data-yeti-box": e, 19992 "data-resize": e, 19993 "aria-labelledby": this.$currentAnchor.id || n.i(a.b)(6, "dd-anchor") 19994 }), u(i.prototype.__proto__ || Object.getPrototypeOf(i.prototype), "_init", this).call(this), this._events() 19995 } 19996 }, { 19997 key: "_getDefaultPosition", 19998 value: function() { 19999 var e = this.$element[0].className.match(/(top|left|right|bottom)/g); 20000 return e ? e[0] : "bottom" 20001 } 20002 }, { 20003 key: "_getDefaultAlignment", 20004 value: function() { 20005 var e = /float-(\S+)/.exec(this.$currentAnchor.className); 20006 return e ? e[1] : u(i.prototype.__proto__ || Object.getPrototypeOf(i.prototype), "_getDefaultAlignment", this).call(this) 20007 } 20008 }, { 20009 key: "_setPosition", 20010 value: function() { 20011 u(i.prototype.__proto__ || Object.getPrototypeOf(i.prototype), "_setPosition", this).call(this, this.$currentAnchor, this.$element, this.$parent) 20012 } 20013 }, { 20014 key: "_setCurrentAnchor", 20015 value: function(e) { 20016 this.$currentAnchor = r()(e) 20017 } 20018 }, { 20019 key: "_events", 20020 value: function() { 20021 var i = this; 20022 this.$element.on({ 20023 "open.zf.trigger": this.open.bind(this), 20024 "close.zf.trigger": this.close.bind(this), 20025 "toggle.zf.trigger": this.toggle.bind(this), 20026 "resizeme.zf.trigger": this._setPosition.bind(this) 20027 }), this.$anchors.off("click.zf.trigger").on("click.zf.trigger", function() { 20028 i._setCurrentAnchor(this) 20029 }), this.options.hover && (this.$anchors.off("mouseenter.zf.dropdown mouseleave.zf.dropdown").on("mouseenter.zf.dropdown", function() { 20030 i._setCurrentAnchor(this); 20031 var e = r()("body").data(); 20032 void 0 !== e.whatinput && "mouse" !== e.whatinput || (clearTimeout(i.timeout), i.timeout = setTimeout(function() { 20033 i.open(), i.$anchors.data("hover", !0) 20034 }, i.options.hoverDelay)) 20035 }).on("mouseleave.zf.dropdown", function() { 20036 clearTimeout(i.timeout), i.timeout = setTimeout(function() { 20037 i.close(), i.$anchors.data("hover", !1) 20038 }, i.options.hoverDelay) 20039 }), this.options.hoverPane && this.$element.off("mouseenter.zf.dropdown mouseleave.zf.dropdown").on("mouseenter.zf.dropdown", function() { 20040 clearTimeout(i.timeout) 20041 }).on("mouseleave.zf.dropdown", function() { 20042 clearTimeout(i.timeout), i.timeout = setTimeout(function() { 20043 i.close(), i.$anchors.data("hover", !1) 20044 }, i.options.hoverDelay) 20045 })), this.$anchors.add(this.$element).on("keydown.zf.dropdown", function(e) { 20046 var t = r()(this); 20047 o.a.findFocusable(i.$element); 20048 o.a.handleKey(e, "Dropdown", { 20049 open: function() { 20050 t.is(i.$anchors) && (i.open(), i.$element.attr("tabindex", -1).focus(), e.preventDefault()) 20051 }, 20052 close: function() { 20053 i.close(), i.$anchors.focus() 20054 } 20055 }) 20056 }) 20057 } 20058 }, { 20059 key: "_addBodyHandler", 20060 value: function() { 20061 var t = r()(document.body).not(this.$element), 20062 i = this; 20063 t.off("click.zf.dropdown").on("click.zf.dropdown", function(e) { 20064 i.$anchors.is(e.target) || i.$anchors.find(e.target).length || i.$element.find(e.target).length || (i.close(), t.off("click.zf.dropdown")) 20065 }) 20066 } 20067 }, { 20068 key: "open", 20069 value: function() { 20070 if (this.$element.trigger("closeme.zf.dropdown", this.$element.attr("id")), this.$anchors.addClass("hover").attr({ 20071 "aria-expanded": !0 20072 }), this.$element.addClass("is-opening"), this._setPosition(), this.$element.removeClass("is-opening").addClass("is-open").attr({ 20073 "aria-hidden": !1 20074 }), this.options.autoFocus) { 20075 var e = o.a.findFocusable(this.$element); 20076 e.length && e.eq(0).focus() 20077 } 20078 this.options.closeOnClick && this._addBodyHandler(), this.options.trapFocus && o.a.trapFocus(this.$element), this.$element.trigger("show.zf.dropdown", [this.$element]) 20079 } 20080 }, { 20081 key: "close", 20082 value: function() { 20083 if (!this.$element.hasClass("is-open")) return !1; 20084 this.$element.removeClass("is-open").attr({ 20085 "aria-hidden": !0 20086 }), this.$anchors.removeClass("hover").attr("aria-expanded", !1), this.$element.trigger("hide.zf.dropdown", [this.$element]), this.options.trapFocus && o.a.releaseFocus(this.$element) 20087 } 20088 }, { 20089 key: "toggle", 20090 value: function() { 20091 if (this.$element.hasClass("is-open")) { 20092 if (this.$anchors.data("hover")) return; 20093 this.close() 20094 } else this.open() 20095 } 20096 }, { 20097 key: "_destroy", 20098 value: function() { 20099 this.$element.off(".zf.trigger").hide(), this.$anchors.off(".zf.dropdown"), r()(document.body).off("click.zf.dropdown") 20100 } 20101 }]), i 20102 }(); 20103 h.defaults = { 20104 parentClass: null, 20105 hoverDelay: 250, 20106 hover: !1, 20107 hoverPane: !1, 20108 vOffset: 0, 20109 hOffset: 0, 20110 positionClass: "", 20111 position: "auto", 20112 alignment: "auto", 20113 allowOverlap: !1, 20114 allowBottomOverlap: !0, 20115 trapFocus: !1, 20116 autoFocus: !1, 20117 closeOnClick: !1 20118 } 20119}, function(e, t, r) { 20120 "use strict"; 20121 r.d(t, "a", function() { 20122 return c 20123 }); 20124 var i = r(0), 20125 h = r.n(i), 20126 o = r(4), 20127 a = r(8), 20128 s = r(1), 20129 n = r(2), 20130 l = function() { 20131 function n(e, t) { 20132 for (var i = 0; i < t.length; i++) { 20133 var n = t[i]; 20134 n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(e, n.key, n) 20135 } 20136 } 20137 return function(e, t, i) { 20138 return t && n(e.prototype, t), i && n(e, i), e 20139 } 20140 }(); 20141 var c = function(e) { 20142 function i() { 20143 return function(e, t) { 20144 if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function") 20145 }(this, i), 20146 function(e, t) { 20147 if (!e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); 20148 return !t || "object" != typeof t && "function" != typeof t ? e : t 20149 }(this, (i.__proto__ || Object.getPrototypeOf(i)).apply(this, arguments)) 20150 } 20151 return function(e, t) { 20152 if ("function" != typeof t && null !== t) throw new TypeError("Super expression must either be null or a function, not " + typeof t); 20153 e.prototype = Object.create(t && t.prototype, { 20154 constructor: { 20155 value: e, 20156 enumerable: !1, 20157 writable: !0, 20158 configurable: !0 20159 } 20160 }), t && (Object.setPrototypeOf ? Object.setPrototypeOf(e, t) : e.__proto__ = t) 20161 }(i, n["a"]), l(i, [{ 20162 key: "_setup", 20163 value: function(e, t) { 20164 this.$element = e, this.options = h.a.extend({}, i.defaults, this.$element.data(), t), this.className = "Equalizer", this._init() 20165 } 20166 }, { 20167 key: "_init", 20168 value: function() { 20169 var e = this.$element.attr("data-equalizer") || "", 20170 t = this.$element.find('[data-equalizer-watch="' + e + '"]'); 20171 o.a._init(), this.$watched = t.length ? t : this.$element.find("[data-equalizer-watch]"), this.$element.attr("data-resize", e || r.i(s.b)(6, "eq")), this.$element.attr("data-mutate", e || r.i(s.b)(6, "eq")), this.hasNested = 0 < this.$element.find("[data-equalizer]").length, this.isNested = 0 < this.$element.parentsUntil(document.body, "[data-equalizer]").length, this.isOn = !1, this._bindHandler = { 20172 onResizeMeBound: this._onResizeMe.bind(this), 20173 onPostEqualizedBound: this._onPostEqualized.bind(this) 20174 }; 20175 var i, n = this.$element.find("img"); 20176 this.options.equalizeOn ? (i = this._checkMQ(), h()(window).on("changed.zf.mediaquery", this._checkMQ.bind(this))) : this._events(), (void 0 !== i && !1 === i || void 0 === i) && (n.length ? r.i(a.a)(n, this._reflow.bind(this)) : this._reflow()) 20177 } 20178 }, { 20179 key: "_pauseEvents", 20180 value: function() { 20181 this.isOn = !1, this.$element.off({
vendor: 4,117 bytes, lines 20182-20270
20182 ".zf.equalizer": this._bindHandler.onPostEqualizedBound, 20183 "resizeme.zf.trigger": this._bindHandler.onResizeMeBound, 20184 "mutateme.zf.trigger": this._bindHandler.onResizeMeBound 20185 }) 20186 } 20187 }, { 20188 key: "_onResizeMe", 20189 value: function(e) { 20190 this._reflow() 20191 } 20192 }, { 20193 key: "_onPostEqualized", 20194 value: function(e) { 20195 e.target !== this.$element[0] && this._reflow() 20196 } 20197 }, { 20198 key: "_events", 20199 value: function() { 20200 this._pauseEvents(), this.hasNested ? this.$element.on("postequalized.zf.equalizer", this._bindHandler.onPostEqualizedBound) : (this.$element.on("resizeme.zf.trigger", this._bindHandler.onResizeMeBound), this.$element.on("mutateme.zf.trigger", this._bindHandler.onResizeMeBound)), this.isOn = !0 20201 } 20202 }, { 20203 key: "_checkMQ", 20204 value: function() { 20205 var e = !o.a.is(this.options.equalizeOn); 20206 return e ? this.isOn && (this._pauseEvents(), this.$watched.css("height", "auto")) : this.isOn || this._events(), e 20207 } 20208 }, { 20209 key: "_killswitch", 20210 value: function() {} 20211 }, { 20212 key: "_reflow", 20213 value: function() { 20214 if (!this.options.equalizeOnStack && this._isStacked()) return this.$watched.css("height", "auto"), !1; 20215 this.options.equalizeByRow ? this.getHeightsByRow(this.applyHeightByRow.bind(this)) : this.getHeights(this.applyHeight.bind(this)) 20216 } 20217 }, { 20218 key: "_isStacked", 20219 value: function() { 20220 return !this.$watched[0] || !this.$watched[1] || this.$watched[0].getBoundingClientRect().top !== this.$watched[1].getBoundingClientRect().top 20221 } 20222 }, { 20223 key: "getHeights", 20224 value: function(e) { 20225 for (var t = [], i = 0, n = this.$watched.length; i < n; i++) this.$watched[i].style.height = "auto", t.push(this.$watched[i].offsetHeight); 20226 e(t) 20227 } 20228 }, { 20229 key: "getHeightsByRow", 20230 value: function(e) { 20231 var t = this.$watched.length ? this.$watched.first().offset().top : 0, 20232 i = [], 20233 n = 0; 20234 i[n] = []; 20235 for (var r = 0, o = this.$watched.length; r < o; r++) { 20236 this.$watched[r].style.height = "auto"; 20237 var a = h()(this.$watched[r]).offset().top; 20238 a != t && (i[++n] = [], t = a), i[n].push([this.$watched[r], this.$watched[r].offsetHeight]) 20239 } 20240 for (var s = 0, l = i.length; s < l; s++) { 20241 var c = h()(i[s]).map(function() { 20242 return this[1] 20243 }).get(), 20244 u = Math.max.apply(null, c); 20245 i[s].push(u) 20246 } 20247 e(i) 20248 } 20249 }, { 20250 key: "applyHeight", 20251 value: function(e) { 20252 var t = Math.max.apply(null, e); 20253 this.$element.trigger("preequalized.zf.equalizer"), this.$watched.css("height", t), this.$element.trigger("postequalized.zf.equalizer") 20254 } 20255 }, { 20256 key: "applyHeightByRow", 20257 value: function(e) { 20258 this.$element.trigger("preequalized.zf.equalizer"); 20259 for (var t = 0, i = e.length; t < i; t++) { 20260 var n = e[t].length, 20261 r = e[t][n - 1]; 20262 if (n <= 2) h()(e[t][0][0]).css({ 20263 height: "auto" 20264 }); 20265 else { 20266 this.$element.trigger("preequalizedrow.zf.equalizer"); 20267 for (var o = 0, a = n - 1; o < a; o++) h()(e[t][o][0]).css({ 20268 height: r 20269 }); 20270 this.$element.trigger("postequalizedrow.zf.equal
20270izer") 20271 } 20272 } 20273 this.$element.trigger("postequalized.zf.equalizer") 20274 } 20275 }, { 20276 key: "_destroy", 20277 value: function() { 20278 this._pauseEvents(), this.$watched.css("height", "auto") 20279 } 20280 }]), i 20281 }(); 20282 c.defaults = { 20283 equalizeOnStack: !1, 20284 equalizeByRow: !1, 20285 equalizeOn: "" 20286 } 20287}, function(e, t, i) { 20288 "use strict"; 20289 i.d(t, "a", function() { 20290 return s 20291 }); 20292 var n = i(0), 20293 r = i.n(n), 20294 o = i(4), 20295 a = i(2), 20296 l = i(1), 20297 c = function() { 20298 function n(e, t) { 20299 for (var i = 0; i < t.length; i++) { 20300 var n = t[i]; 20301 n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(e, n.key, n) 20302 } 20303 } 20304 return function(e, t, i) { 20305 return t && n(e.prototype, t), i && n(e, i), e 20306 } 20307 }(); 20308 var s = function(e) { 20309 function s() { 20310 return function(e, t) { 20311 if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function") 20312 }(this, s), 20313 function(e, t) { 20314 if (!e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); 20315 return !t || "object" != typeof t && "function" != typeof t ? e : t 20316 }(this, (s.__proto__ || Object.getPrototypeOf(s)).apply(this, arguments)) 20317 } 20318 return function(e, t) { 20319 if ("function" != typeof t && null !== t) throw new TypeError("Super expression must either be null or a function, not " + typeof t); 20320 e.prototype = Object.create(t && t.prototype, { 20321 constructor: { 20322 value: e, 20323 enumerable: !1, 20324 writable: !0, 20325 configurable: !0 20326 } 20327 }), t && (Object.setPrototypeOf ? Object.setPrototypeOf(e, t) : e.__proto__ = t) 20328 }(s, a["a"]), c(s, [{ 20329 key: "_setup", 20330 value: function(e, t) { 20331 this.$element = e, this.options = r.a.extend({}, s.defaults, t), this.rules = [], this.currentPath = "", this.className = "Interchange", this._init(), this._events() 20332 } 20333 }, { 20334 key: "_init", 20335 value: function() { 20336 o.a._init(); 20337 var e = this.$element[0].id || i.i(l.b)(6, "interchange"); 20338 this.$element.attr({ 20339 "data-resize": e, 20340 id: e 20341 }), this._addBreakpoints(), this._generateRules(), this._reflow() 20342 } 20343 }, { 20344 key: "_events", 20345 value: function() { 20346 var e = this; 20347 this.$element.off("resizeme.zf.trigger").on("resizeme.zf.trigger", function() { 20348 return e._reflow() 20349 }) 20350 } 20351 }, { 20352 key: "_reflow", 20353 value: function() { 20354 var e; 20355 for (var t in this.rules) 20356 if (this.rules.hasOwnProperty(t)) { 20357 var i = this.rules[t]; 20358 window.matchMedia(i.query).matches && (e = i) 20359 } 20360 e && this.replace(e.path) 20361 } 20362 }, { 20363 key: "_addBreakpoints", 20364 value: function() { 20365 for (var e in o.a.queries) 20366 if (o.a.queries.hasOwnProperty(e)) { 20367 var t = o.a.queries[e]; 20368 s.SPECIAL_QUERIES[t.name] = t.value 20369 } 20370 } 20371 }, { 20372 key: "_generateRules", 20373 value: function(e) { 20374 var t, i = []; 20375 for (var n in t = "string" == typeof(t = this.options.rules ? this.options.rules : this.$element.data("interchange")) ? t.match(/\[.*?\]/g) : t) 20376 if (t.hasOwnProperty(n)) { 20377 var r = t[n].slice(1, -1).split(", "), 20378 o = r.slice(0, -1).join(""), 20379 a = r[r.length - 1]; 20380 s.SPECIAL_QUERIES[a] && (a = s.SPECIAL_QUERIES[a]), i.push({ 20381 path: o, 20382 query: a 20383 }) 20384 } 20385 this.rules = i 20386 } 20387 }, { 20388 key: "replace", 20389 value: function(t) { 20390 if (this.currentPath !== t) { 20391 var i = this, 20392 n = "replaced.zf.interchange"; 20393 "IMG" === this.$element[0].nodeName ? this.$element.attr("src", t).on("load", function() { 20394 i.currentPath = t 20395 }).trigger(n) : t.match(/\.(gif|jpg|jpeg|png|svg|tiff)([?#].*)?/i) ? (t = t.replace(/\(/g, "%28").replace(/\)/g, "%29"), this.$element.css({ 20396 "background-image": "url(" + t + ")" 20397 }).trigger(n)) : r.a.get(t, function(e) { 20398 i.$element.html(e).trigger(n), r()(e).foundation(), i.currentPath = t 20399 }) 20400 } 20401 } 20402 }, { 20403 key: "_destroy", 20404 value: function() { 20405 this.$element.off("resizeme.zf.trigger") 20406 } 20407 }]), s 20408 }(); 20409 s.defaults = { 20410 rules: null 20411 }, s.SPECIAL_QUERIES = { 20412 landscape: "screen and (orientation: landscape)", 20413 portrait: "screen and (orientation: portrait)", 20414 retina: "only screen and (-webkit-min-device-pixel-ratio: 2), only screen and (min--moz-device-pixel-ratio: 2), only screen and (-o-min-device-pixel-ratio: 2/1), only screen and (min-device-pixel-ratio: 2), only screen and (min-resolution: 192dpi), only screen and (min-resolution: 2dppx)" 20415 } 20416}, function(e, t, n) { 20417 "use strict"; 20418 n.d(t, "a", function() { 20419 return c 20420 }); 20421 var i = n(0), 20422 r = n.n(i), 20423 o = n(1), 20424 a = n(2), 20425 s = n(16), 20426 l = function() { 20427 function n(e, t) { 20428 for (var i = 0; i < t.length; i++) { 20429 var n = t[i]; 20430 n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(e, n.key, n) 20431 } 20432 } 20433 return function(e, t, i) { 20434 return t && n(e.prototype, t), i && n(e, i), e 20435 } 20436 }(); 20437 var c = function(e) { 20438 function i() { 20439 return function(e, t) { 20440 if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function") 20441 }(this, i), 20442 function(e, t) { 20443 if (!e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); 20444 return !t || "object" != typeof t && "function" != typeof t ? e : t 20445 }(this, (i.__proto__ || Object.getPrototypeOf(i)).apply(this, arguments)) 20446 } 20447 return function(e, t) { 20448 if ("function" != typeof t && null !== t) throw new TypeError("Super expression must either be null or a function, not " + typeof t); 20449 e.prototype = Object.create(t && t.prototype, { 20450 constructor: { 20451 value: e, 20452 enumerable: !1, 20453 writable: !0, 20454 configurable: !0 20455 } 20456 }), t && (Object.setPrototypeOf ? Object.setPrototypeOf(e, t) : e.__proto__ = t) 20457 }(i, a["a"]), l(i, [{ 20458 key: "_setup", 20459 value: function(e, t) { 20460 this.$element = e, this.options = r.a.extend({}, i.defaults, this.$element.data(), t), this.className = "Magellan", this._init(), this.calcPoints() 20461 } 20462 }, { 20463 key: "_init", 20464 value: function() { 20465 var e = this.$element[0].id || n.i(o.b)(6, "magellan"); 20466 this.$targets = r()("[data-magellan-target]"), this.$links = this.$element.find("a"), this.$element.attr({ 20467 "data-resize": e, 20468 "data-scroll": e, 20469 id: e 20470 }), this.$active = r()(), this.scrollPos = parseInt(window.pageYOffset, 10), this._events() 20471 } 20472 }, { 20473 key: "calcPoints", 20474 value: function() { 20475 var i = this, 20476 e = document.body, 20477 t = document.documentElement; 20478 this.points = [], this.winHeight = Math.round(Math.max(window.innerHeight, t.clientHeight)), this.docHeight = Math.round(Math.max(e.scrollHeight, e.offsetHeight, t.clientHeight, t.scrollHeight, t.offsetHeight)), this.$targets.each(function() { 20479 var e = r()(this), 20480 t = Math.round(e.offset().top - i.options.threshold); 20481 e.targetPoint = t, i.points.push(t) 20482 }) 20483 } 20484 }, { 20485 key: "_events", 20486 value: function() { 20487 var i = this; 20488 r()("html, body"), i.options.animationDuration, i.options.animationEasing; 20489 r()(window).one("load", function() { 20490 i.options.deepLinking && location.hash && i.scrollToLoc(location.hash), i.calcPoints(), i._updateActive() 20491 }), this.$element.on({ 20492 "resizeme.zf.trigger": this.reflow.bind(this), 20493 "scrollme.zf.trigger": this._updateActive.bind(this) 20494 }).on("click.zf.magellan", 'a[href^="#"]', function(e) { 20495 e.preventDefault(); 20496 var t = this.getAttribute("href"); 20497 i.scrollToLoc(t) 20498 }), this._deepLinkScroll = function(e) { 20499 i.options.deepLinking && i.scrollToLoc(window.location.hash) 20500 }, r()(window).on("popstate", this._deepLinkScroll) 20501 } 20502 }, { 20503 key: "scrollToLoc", 20504 value: function(e) { 20505 this._inTransition = !0; 20506 var t = this, 20507 i = { 20508 animationEasing: this.options.animationEasing, 20509 animationDuration: this.options.animationDuration, 20510 threshold: this.options.threshold, 20511 offset: this.options.offset 20512 }; 20513 s.a.scrollToLoc(e, i, function() { 20514 t._inTransition = !1, t._updateActive() 20515 }) 20516 } 20517 }, { 20518 key: "reflow", 20519 value: function() { 20520 this.calcPoints(), this._updateActive() 20521 } 20522 }, { 20523 key: "_updateActive", 20524 value: function() { 20525 if (!this._inTransition) { 20526 var e, i = parseInt(window.pageYOffset, 10); 20527 if (i + this.winHeight === this.docHeight) e = this.points.length - 1; 20528 else if (i < this.points[0]) e = void 0; 20529 else { 20530 var n = this.scrollPos < i, 20531 r = this, 20532 t = this.points.filter(function(e, t) { 20533 return n ? e - r.options.offset <= i : e - r.options.offset - r.options.threshold <= i 20534 }); 20535 e = t.length ? t.length - 1 : 0 20536 } 20537 if (this.$active.removeClass(this.options.activeClass), this.$active = this.$links.filter('[href="#' + this.$targets.eq(e).data("magellan-target") + '"]').addClass(this.options.activeClass), this.options.deepLinking) { 20538 var o = ""; 20539 null != e && (o = this.$active[0].getAttribute("href")), o !== window.location.hash && (window.history.pushState ? window.history.pushState(null, null, o) : window.location.hash = o) 20540 } 20541 this.scrollPos = i, this.$element.trigger("update.zf.magellan", [this.$active]) 20542 } 20543 } 20544 }, { 20545 key: "_destroy", 20546 value: function() { 20547 if (this.$element.off(".zf.trigger .zf.magellan").find("." + this.options.activeClass).removeClass(this.options.activeClass), this.options.deepLinking) { 20548 var e = this.$active[0].getAttribute("href"); 20549 window.location.hash.replace(e, "") 20550 } 20551 r()(window).off("popstate", this._deepLinkScroll) 20552 } 20553 }]), i 20554 }(); 20555 c.defaults = { 20556 animationDuration: 500, 20557 animationEasing: "linear", 20558 threshold: 50, 20559 activeClass: "is-active", 20560 deepLinking: !1, 20561 offset: 0 20562 } 20563}, function(e, t, r) { 20564 "use strict"; 20565 r.d(t, "a", function() { 20566 return n 20567 }); 20568 var i = r(0), 20569 o = r.n(i), 20570 a = r(3), 20571 s = r(4), 20572 l = r(1), 20573 c = r(2), 20574 u = r(5), 20575 h = function() { 20576 function n(e, t) { 20577 for (var i = 0; i < t.length; i++) { 20578 var n = t[i]; 20579 n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(e, n.key, n) 20580 } 20581 } 20582 return function(e, t, i) { 20583 return t && n(e.prototype, t), i && n(e, i), e 20584 } 20585 }(); 20586 var n = function(e) { 20587 function n() { 20588 return function(e, t) { 20589 if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function") 20590 }(this, n), 20591 function(e, t) { 20592 if (!e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); 20593 return !t || "object" != typeof t && "function" != typeof t ? e : t 20594 }(this, (n.__proto__ || Object.getPrototypeOf(n)).apply(this, arguments)) 20595 } 20596 return function(e, t) { 20597 if ("function" != typeof t && null !== t) throw new TypeError("Super expression must either be null or a function, not " + typeof t); 20598 e.prototype = Object.create(t && t.prototype, { 20599 constructor: { 20600 value: e, 20601 enumerable: !1, 20602 writable: !0, 20603 configurable: !0 20604 } 20605 }), t && (Object.setPrototypeOf ? Object.setPrototypeOf(e, t) : e.__proto__ = t) 20606 }(n, c["a"]), h(n, [{ 20607 key: "_setup", 20608 value: function(e, t) { 20609 var i = this; 20610 this.className = "OffCanvas", this.$element = e, this.options = o.a.extend({}, n.defaults, this.$element.data(), t), this.contentClasses = { 20611 base: [], 20612 reveal: [] 20613 }, this.$lastTrigger = o()(), this.$triggers = o()(), this.position = "left", this.$content = o()(), this.nested = !!this.options.nested, o()(["push", "overlap"]).each(function(e, t) { 20614 i.contentClasses.base.push("has-transition-" + t) 20615 }), o()(["left", "right", "top", "bottom"]).each(function(e, t) { 20616 i.contentClasses.base.push("has-position-" + t), i.contentClasses.reveal.push("has-reveal-" + t) 20617 }), u.a.init(o.a), s.a._init(), this._init(), this._events(), a.a.register("OffCanvas", { 20618 ESCAPE: "close" 20619 }) 20620 } 20621 }, { 20622 key: "_init", 20623 value: function() { 20624 var e = this.$element.attr("id"); 20625 if (this.$element.attr("aria-hidden", "true"), this.options.contentId ? this.$content = o()("#" + this.options.contentId) : this.$element.siblings("[data-off-canvas-content]").length ? this.$content = this.$element.siblings("[data-off-canvas-content]").first() : this.$content = this.$element.closest("[data-off-canvas-content]").first(), this.options.contentId ? this.options.contentId && null === this.options.nested && console.warn("Remember to use the nested option if using the content ID option!") : this.nested = 0 === this.$element.siblings("[data-off-canvas-content]").length, !0 === this.nested && (this.options.transition = "overlap", this
20625.$element.removeClass("is-transition-push")), this.$element.addClass("is-transition-" + this.options.transition + " is-closed"), this.$triggers = o()(document).find('[data-open="' + e + '"], [data-close="' + e + '"], [data-toggle="' + e + '"]').attr("aria-expanded", "false").attr("aria-controls", e), this.position = this.$element.is(".position-left, .position-top, .position-right, .position-bottom") ? this.$element.attr("class").match(/position\-(left|top|right|bottom)/)[1] : this.position, !0 === this.options.contentOverlay) { 20626 var t = document.createElement("div"), 20627 i = "fixed" === o()(this.$element).css("position") ? "is-overlay-fixed" : "is-overlay-absolute"; 20628 t.setAttribute("class", "js-off-canvas-overlay " + i), this.$overlay = o()(t), "is-overlay-fixed" === i ? o()(this.$overlay).insertAfter(this.$element) : this.$content.append(this.$overlay) 20629 } 20630 this.options.isRevealed = this.options.isRevealed || new RegExp(this.options.revealClass, "g").test(this.$element[0].className), !0 === this.options.isRevealed && (this.options.revealOn = this.options.revealOn || this.$element[0].className.match(/(reveal-for-medium|reveal-for-large)/g)[0].split("-")[2], this._setMQChecker()), this.options.transitionTime && this.$element.css("transition-duration", this.options.transitionTime), this._removeContentClasses() 20631 } 20632 }, { 20633 key: "_events", 20634 value: function() { 20635 (this.$element.off(".zf.trigger .zf.offcanvas").on({ 20636 "open.zf.trigger": this.open.bind(this), 20637 "close.zf.trigger": this.close.bind(this), 20638 "toggle.zf.trigger": this.toggle.bind(this), 20639 "keydown.zf.offcanvas": this._handleKeyboard.bind(this) 20640 }), !0 === this.options.closeOnClick) && (this.options.contentOverlay ? this.$overlay : this.$content).on({ 20641 "click.zf.offcanvas": this.close.bind(this) 20642 }) 20643 } 20644 }, { 20645 key: "_setMQChecker", 20646 value: function() { 20647 var e = this; 20648 o()(window).on("changed.zf.mediaquery", function() { 20649 s.a.atLeast(e.options.revealOn) ? e.reveal(!0) : e.reveal(!1) 20650 }).one("load.zf.offcanvas", function() { 20651 s.a.atLeast(e.options.revealOn) && e.reveal(!0) 20652 }) 20653 } 20654 }, { 20655 key: "_removeContentClasses", 20656 value: function(e) { 20657 "boolean" != typeof e ? this.$content.removeClass(this.contentClasses.base.join(" ")) : !1 === e && this.$content.removeClass("has-reveal-" + this.position) 20658 } 20659 }, { 20660 key: "_addContentClasses", 20661 value: function(e) { 20662 this._removeContentClasses(e), "boolean" != typeof e ? this.$content.addClass("has-transition-" + this.options.transition + " has-position-" + this.position) : !0 === e && this.$content.addClass("has-reveal-" + this.position) 20663 } 20664 }, { 20665 key: "reveal", 20666 value: function(e) { 20667 e ? (this.close(), this.isRevealed = !0, this.$element.attr("aria-hidden", "false"), this.$element.off("open.zf.trigger toggle.zf.trigger"), this.$element.removeClass("is-closed")) : (this.isRevealed = !1, this.$element.attr("aria-hidden", "true"), this.$element.off("open.zf.trigger toggle.zf.trigger").on({ 20668 "open.zf.trigger": this.open.bind(this), 20669 "toggle.zf.trigger": this.toggle.bind(this) 20670 }), this.$element.addClass("is-closed")), this._addContentClasses(e) 20671 } 20672 }, { 20673 key: "_stopScrolling", 20674 value: function(e) { 20675 return !1 20676 } 20677 }, { 20678 key: "_recordScrollable", 20679 value: function(e) { 20680 var t = this; 20681 t.scrollHeight !== t.clientHeight && (0 === t.scrollTop && (t.scrollTop = 1), t.scrollTop === t.scrollHeight - t.clientHeight && (t.scrollTop = t.scrollHeight - t.clientHeight - 1)), t.allowUp = 0 < t.scrollTop, t.allowDown = t.scrollTop < t.scrollHeight - t.clientHeight, t.lastY = e.originalEvent.pageY 20682 } 20683 }, { 20684 key: "_stopScrollPropagation", 20685 value: function(e) { 20686 var t = e.pageY < this.lastY, 20687 i = !t; 20688 this.lastY = e.pageY, t && this.allowUp || i && this.allowDown ? e.stopPropagation() : e.preventDefault() 20689 } 20690 }, { 20691 key: "open", 20692 value: function(e, t) { 20693 if (!this.$element.hasClass("is-open") && !this.isRevealed) { 20694 var i = this; 20695 t && (this.$lastTrigger = t), "top" === this.options.forceTo ? window.scrollTo(0, 0) : "bottom" === this.options.forceTo && window.scrollTo(0, document.body.scrollHeight), this.options.transitionTime && "overlap" !== this.options.transition ? this.$element.siblings("[data-off-canvas-content]").css("transition-duration", this.options.transitionTime) : this.$element.siblings("[data-off-canvas-content]").css("transition-duration", ""), this.$element.addClass("is-open").removeClass("is-closed"), this.$triggers.attr("aria-expanded", "true"), this.$element.attr("aria-hidden", "false").trigger("opened.zf.offcanvas"), this.$content.addClass("is-open-" + this.position), !1 === this.options.contentScroll && (o()("body").addClass("is-off-canvas-open").on("touchmove", this._stopScrolling), this.$element.on("touchstart", this._recordScrollable), this.$element.on("touchmove", this._stopScrollPropagation)), !0 === this.options.contentOverlay && this.$overlay.addClass("is-visible"), !0 === this.options.closeOnClick && !0 === this.options.contentOverlay && this.$overlay.addClass("is-closable"), !0 === this.options.autoFocus && this.$element.one(r.i(l.c)(this.$element), function() { 20696 if (i.$element.hasClass("is-open")) { 20697 var e = i.$element.find("[data-autofocus]"); 20698 e.length ? e.eq(0).focus() : i.$element.find("a, button").eq(0).focus() 20699 } 20700 }), !0 === this.options.trapFocus && (this.$content.attr("tabindex", "-1"), a.a.trapFocus(this.$element)), this._addContentClasses() 20701 } 20702 } 20703 }, { 20704 key: "close", 20705 value: function(e) { 20706 if (this.$element.hasClass("is-open") && !this.isRevealed) { 20707 var t = this; 20708 this.$element.removeClass("is-open"), this.$element.attr("aria-hidden", "true").trigger("closed.zf.offcanvas"), this.$content.removeClass("is-open-left is-open-top is-open-right is-open-bottom"), !1 === this.options.contentScroll && (o()("body").removeClass("is-off-canvas-open").off("touchmove", this._stopScrolling), this.$element.off("touchstart", this._recordScrollable), this.$element.off("touchmove", this._stopScrollPropagation)), !0 === this.options.contentOverlay && this.$overlay.removeClass("is-visible"), !0 === this.options.closeOnClick && !0 === this.options.contentOverlay && this.$overlay.removeClass("is-closable"), this.$triggers.attr("aria-expanded", "false"), !0 === this.options.trapFocus && (this.$content.removeAttr("tabindex"), a.a.releaseFocus(this.$element)), this.$element.one(r.i(l.c)(this.$element), function(e) { 20709 t.$element.addClass("is-closed"), t._removeContentClasses() 20710 }) 20711 } 20712 } 20713 }, { 20714 key: "toggle", 20715 value: function(e, t) { 20716 this.$element.hasClass("is-open") ? this.close(e, t) : this.open(e, t) 20717 } 20718 }, { 20719 key: "_handleKeyboard", 20720 value: function(e) { 20721 var t = this; 20722 a.a.handleKey(e, "OffCanvas", { 20723 close: function() { 20724 return t.close(), t.$lastTrigger.focus(), !0 20725 }, 20726 handled: function() { 20727 e.stopPropagation(), e.preventDefault() 20728 } 20729 }) 20730 } 20731 }, { 20732 key: "_destroy", 20733 value: function() { 20734 this.close(), this.$element.off(".zf.trigger .zf.offcanvas"), this.$overlay.off(".zf.offcanvas") 20735 } 20736 }]), n 20737 }(); 20738 n.defaults = { 20739 closeOnClick: !0, 20740 contentOverlay: !0, 20741 contentId: null, 20742 nested: null, 20743 contentScroll: !0, 20744 transitionTime: null, 20745 transition: "push", 20746 forceTo: null, 20747 isRevealed: !1, 20748 revealOn: null, 20749 autoFocus: !0, 20750 revealClass: "reveal-for-", 20751 trapFocus: !1 20752 } 20753}, function(e, t, n) { 20754 "use strict"; 20755 n.d(t, "a", function() { 20756 return p 20757 }); 20758 var i = n(0), 20759 o = n.n(i), 20760 r = n(3), 20761 u = n(6), 20762 a = n(18), 20763 s = n(8), 20764 l = n(1), 20765 c = n(2), 20766 h = n(10), 20767 d = function() { 20768 function n(e, t) { 20769 for (var i = 0; i < t.length; i++) { 20770 var n = t[i]; 20771 n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(e, n.key, n) 20772 } 20773 } 20774 return function(e, t, i) { 20775 return t && n(e.prototype, t), i && n(e, i), e 20776 } 20777 }(); 20778 var p = function(e) { 20779 function i() { 20780 return function(e, t) { 20781 if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function") 20782 }(this, i), 20783 function(e, t) { 20784 if (!e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); 20785 return !t || "object" != typeof t && "function" != typeof t ? e : t 20786 }(this, (i.__proto__ || Object.getPrototypeOf(i)).apply(this, arguments)) 20787 } 20788 return function(e, t) { 20789 if ("function" != typeof t && null !== t) throw new TypeError("Super expression must either be null or a function, not " + typeof t); 20790 e.prototype = Object.create(t && t.prototype, { 20791 constructor: { 20792 value: e, 20793 enumerable: !1, 20794 writable: !0, 20795 configurable: !0 20796 } 20797 }), t && (Object.setPrototypeOf ? Object.setPrototypeOf(e, t) : e.__proto__ = t) 20798 }(i, c["a"]), d(i, [{ 20799 key: "_setup", 20800 value: function(e, t) { 20801 this.$element = e, this.options = o.a.extend({}, i.defaults, this.$element.data(), t), this.className = "Orbit", h.a.init(o.a), this._init(), r.a.register("Orbit", { 20802 ltr: { 20803 ARROW_RIGHT: "next", 20804 ARROW_LEFT: "previous" 20805 }, 20806 rtl: { 20807 ARROW_LEFT: "next", 20808 ARROW_RIGHT: "previous" 20809 } 20810 }) 20811 } 20812 }, { 20813 key: "_init", 20814 value: function() { 20815 this._reset(), this.$wrapper = this.$element.find("." + this.options.containerClass), this.$slides = this.$element.find("." + this.options.slideClass); 20816 var e = this.$element.find("img"), 20817 t = this.$slides.filter(".is-active"), 20818 i = this.$element[0].id || n.i(l.b)(6, "orbit"); 20819 this.$element.attr({ 20820 "data-resize": i, 20821 id: i 20822 }), t.length || this.$slides.eq(0).addClass("is-active"), this.options.useMUI || this.$slides.addClass("no-motionui"), e.length ? n.i(s.a)(e, this._prepareForOrbit.bind(this)) : this._prepareForOrbit(), this.options.bullets && this._loadBullets(), this._events(), this.options.autoPlay && 1 < this.$slides.length && this.geoSync(), this.options.accessible && this.$wrapper.attr("tabindex", 0) 20823 } 20824 }, { 20825 key: "_loadBullets", 20826 value: function() { 20827 this.$bullets = this.$element.find("." + this.options.boxOfBullets).find("button") 20828 } 20829 }, { 20830 key: "geoSync", 20831 value: function() { 20832 var e = this; 20833 this.timer = new a.a(this.$element, { 20834 duration: this.options.timerDelay, 20835 infinite: !1 20836 }, function() { 20837 e.changeSlide(!0) 20838 }), this.timer.start() 20839 } 20840 }, { 20841 key: "_prepareForOrbit", 20842 value: function() { 20843 this._setWrapperHeight() 20844 } 20845 }, { 20846 key: "_setWrapperHeight", 20847 value: function(e) { 20848 var t, i = 0, 20849 n = 0, 20850 r = this; 20851 this.$slides.each(function() { 20852 t = this.getBoundingClientRect().height, o()(this).attr("data-sli
20852de", n), /mui/g.test(o()(this)[0].className) || r.$slides.filter(".is-active")[0] === r.$slides.eq(n)[0] || o()(this).css({ 20853 position: "relative", 20854 display: "none" 20855 }), i = i < t ? t : i, n++ 20856 }), n === this.$slides.length && (this.$wrapper.css({ 20857 height: i 20858 }), e && e(i)) 20859 } 20860 }, { 20861 key: "_setSlideHeight", 20862 value: function(e) { 20863 this.$slides.each(function() { 20864 o()(this).css("max-height", e) 20865 }) 20866 } 20867 }, { 20868 key: "_events", 20869 value: function() { 20870 var n = this; 20871 if (this.$element.off(".resizeme.zf.trigger").on({ 20872 "resizeme.zf.trigger": this._prepareForOrbit.bind(this) 20873 }), 1 < this.$slides.length) { 20874 if (this.options.swipe && this.$slides.off("swipeleft.zf.orbit swiperight.zf.orbit").on("swipeleft.zf.orbit", function(e) { 20875 e.preventDefault(), n.changeSlide(!0) 20876 }).on("swiperight.zf.orbit", function(e) { 20877 e.preventDefault(), n.changeSlide(!1) 20878 }), this.options.autoPlay && (this.$slides.on("click.zf.orbit", function() { 20879 n.$element.data("clickedOn", !n.$element.data("clickedOn")), n.timer[n.$element.data("clickedOn") ? "pause" : "start"]() 20880 }), this.options.pauseOnHover && this.$element.on("mouseenter.zf.orbit", function() { 20881 n.timer.pause() 20882 }).on("mouseleave.zf.orbit", function() { 20883 n.$element.data("clickedOn") || n.timer.start() 20884 })), this.options.navButtons) this.$element.find("." + this.options.nextClass + ", ." + this.options.prevClass).attr("tabindex", 0).on("click.zf.orbit touchend.zf.orbit", function(e) { 20885 e.preventDefault(), n.changeSlide(o()(this).hasClass(n.options.nextClass)) 20886 }); 20887 this.options.bullets && this.$bullets.on("click.zf.orbit touchend.zf.orbit", function() { 20888 if (/is-active/g.test(this.className)) return !1; 20889 var e = o()(this).data("slide"), 20890 t = e > n.$slides.filter(".is-active").data("slide"), 20891 i = n.$slides.eq(e); 20892 n.changeSlide(t, i, e) 20893 }), this.options.accessible && this.$wrapper.add(this.$bullets).on("keydown.zf.orbit", function(e) { 20894 r.a.handleKey(e, "Orbit", { 20895 next: function() { 20896 n.changeSlide(!0) 20897 }, 20898 previous: function() { 20899 n.changeSlide(!1) 20900 }, 20901 handled: function() { 20902 o()(e.target).is(n.$bullets) && n.$bullets.filter(".is-active").focus() 20903 } 20904 }) 20905 }) 20906 } 20907 } 20908 }, { 20909 key: "_reset", 20910 value: function() { 20911 void 0 !== this.$slides && 1 < this.$slides.length && (this.$element.off(".zf.orbit").find("*").off(".zf.orbit"), this.options.autoPlay && this.timer.restart(), this.$slides.each(function(e) { 20912 o()(e).removeClass("is-active is-active is-in").removeAttr("aria-live").hide() 20913 }), this.$slides.first().addClass("is-active").show(), this.$element.trigger("slidechange.zf.orbit", [this.$slides.first()]), this.options.bullets && this._updateBullets(0)) 20914 } 20915 }, { 20916 key: "changeSlide", 20917 value: function(e, t, i) { 20918 if (this.$slides) { 20919 var n = this.$slides.filter(".is-active").eq(0); 20920 if (/mui/g.test(n[0].className)) return !1; 20921 var r, o = this.$slides.first(), 20922 a = this.$slides.last(), 20923 s = e ? "Right" : "Left", 20924 l = e ? "Left" : "Right", 20925 c = this; 20926 (r = t || (e ? this.options.infiniteWrap ? n.next("." + this.options.slideClass).length ? n.next("." + this.options.slideClass) : o : n.next("." + this.options.slideClass) : this.options.infiniteWrap ? n.prev("." + this.options.slideClass).length ? n.prev("." + this.options.slideClass) : a : n.prev("." + this.options.slideClass))).length && (this.$element.trigger("beforeslidechange.zf.orbit", [n, r]), this.options.bullets && (i = i || this.$slides.index(r), this._updateBullets(i)), this.options.useMUI && !this.$element.is(":hidden") ? (u.a.animateIn(r.addClass("is-active").css({ 20927 position: "absolute", 20928 top: 0 20929 }), this.options["animInFrom" + s], function() { 20930 r.css({ 20931 position: "relative", 20932 display: "block" 20933 }).attr("aria-live", "polite") 20934 }), u.a.animateOut(n.removeClass("is-active"), this.options["animOutTo" + l], function() { 20935 n.removeAttr("aria-live"), c.options.autoPlay && !c.timer.isPaused && c.timer.restart() 20936 })) : (n.removeClass("is-active is-in").removeAttr("aria-live").hide(), r.addClass("is-active is-in").attr("aria-live", "polite").show(), this.options.autoPlay && !this.timer.isPaused && this.timer.restart()), this.$element.trigger("slidechange.zf.orbit", [r])) 20937 } 20938 } 20939 }, { 20940 key: "_updateBullets", 20941 value: function(e) { 20942 var t = this.$element.find("." + this.options.boxOfBullets).find(".is-active").removeClass("is-active").blur().find("span:last").detach(); 20943 this.$bullets.eq(e).addClass("is-active").append(t) 20944 } 20945 }, { 20946 key: "_destroy", 20947 value: function() { 20948 this.$element.off(".zf.orbit").find("*").off(".zf.orbit").end().hide() 20949 } 20950 }]), i 20951 }(); 20952 p.defaults = { 20953 bullets: !0, 20954 navButtons: !0, 20955 animInFromRight: "slide-in-right", 20956 animOutToRight: "slide-out-right", 20957 animInFromLeft: "slide-in-left", 20958 animOutToLeft: "slide-out-left", 20959 autoPlay: !0, 20960 timerDelay: 5e3, 20961 infiniteWrap: !0, 20962 swipe: !0, 20963 pauseOnHover: !0, 20964 accessible: !0, 20965 containerClass: "orbit-container", 20966 slideClass: "orbit-slide", 20967 boxOfBullets: "orbit-bullets", 20968 nextClass: "orbit-next", 20969 prevClass: "orbit-previous", 20970 useMUI: !0 20971 } 20972}, function(e, t, u) { 20973 "use strict"; 20974 u.d(t, "a", function() { 20975 return c 20976 }); 20977 var i = u(0), 20978 h = u.n(i), 20979 a = u(4), 20980 d = u(1), 20981 n = u(2), 20982 r = u(11), 20983 o = u(17), 20984 s = function() { 20985 function n(e, t) { 20986 for (var i = 0; i < t.length; i++) { 20987 var n = t[i]; 20988 n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(e, n.key, n) 20989 } 20990 } 20991 return function(e, t, i) { 20992 return t && n(e.prototype, t), i && n(e, i), e 20993 } 20994 }(); 20995 var l = { 20996 tabs: { 20997 cssClass: "tabs", 20998 plugin: o.a 20999 }, 21000 accordion: { 21001 cssClass: "accordion", 21002 plugin: r.a 21003 } 21004 }, 21005 c = function(e) { 21006 function t() { 21007 return function(e, t) { 21008 if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function") 21009 }(this, t), 21010 function(e, t) { 21011 if (!e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); 21012 return !t || "object" != typeof t && "function" != typeof t ? e : t 21013 }(this, (t.__proto__ || Object.getPrototypeOf(t)).apply(this, arguments)) 21014 } 21015 return function(e, t) { 21016 if ("function" != typeof t && null !== t) throw new TypeError("Super expression must either be null or a function, not " + typeof t); 21017 e.prototype = Object.create(t && t.prototype, { 21018 constructor: { 21019 value: e, 21020 enumerable: !1, 21021 writable: !0, 21022 configurable: !0 21023 } 21024 }), t && (Object.setPrototypeOf ? Object.setPrototypeOf(e, t) : e.__proto__ = t) 21025 }(t, n["a"]), s(t, [{ 21026 key: "_setup", 21027 value: function(e, t) { 21028 this.$element = h()(e), this.options = h.a.extend({}, this.$element.data(), t), this.rules = this.$element.data("responsive-accordion-tabs"), this.currentMq = null, this.currentPlugin = null, this.className = "ResponsiveAccordionTabs", this.$element.attr("id") || this.$element.attr("id", u.i(d.b)(6, "responsiveaccordiontabs")), this._init(), this._events() 21029 } 21030 }, { 21031 key: "_init", 21032 value: function() { 21033 if (a.a._init(), "string" == typeof this.rules) { 21034 for (var e = {}, t = this.rules.split(" "), i = 0; i < t.length; i++) { 21035 var n = t[i].split("-"), 21036 r = 1 < n.length ? n[0] : "small", 21037 o = 1 < n.length ? n[1] : n[0]; 21038 null !== l[o] && (e[r] = l[o]) 21039 } 21040 this.rules = e 21041 } 21042 this._getAllOptions(), h.a.isEmptyObject(this.rules) || this._checkMediaQueries() 21043 } 21044 }, { 21045 key: "_getAllOptions", 21046 value: function() { 21047 for (var e in this.allOptions = {}, l) 21048 if (l.hasOwnProperty(e)) { 21049 var t = l[e]; 21050 try { 21051 var i = h()("<ul></ul>"), 21052 n = new t.plugin(i, this.options); 21053 for (var r in n.options) 21054 if (n.options.hasOwnProperty(r) && "zfPlugin" !== r) { 21055 var o = n.options[r]; 21056 this.allOptions[r] = o 21057 } 21058 n.destroy() 21059 } catch (e) {} 21060 } 21061 } 21062 }, { 21063 key: "_events", 21064 value: function() { 21065 var e = this; 21066 h()(window).on("changed.zf.mediaquery", function() { 21067 e._checkMediaQueries() 21068 }) 21069 } 21070 }, { 21071 key: "_checkMediaQueries", 21072 value: function() { 21073 var t, i = this; 21074 h.a.each(this.rules, function(e) { 21075 a.a.atLeast(e) && (t = e) 21076 }), t && (this.currentPlugin instanceof this.rules[t].plugin || (h.a.each(l, function(e, t) { 21077 i.$element.removeClass(t.cssClass) 21078 }), this.$element.addClass(this.rules[t].cssClass), this.currentPlugin && (!this.currentPlugin.$element.data("zfPlugin") && this.storezfData && this.currentPlugin.$element.data("zfPlugin", this.storezfData), this.currentPlugin.destroy()), this._handleMarkup(this.rules[t].cssClass), this.currentPlugin = new this.rules[t].plugin(this.$element, {}), this.storezfData = this.currentPlugin.$element.data("zfPlugin"))) 21079 } 21080 }, { 21081 key: "_handleMarkup", 21082 value: function(e) { 21083 var i = this, 21084 t = "accordion", 21085 n = h()("[data-tabs-content=" + this.$element.attr("id") + "]"); 21086 if (n.length && (t = "tabs"), t !== e) { 21087 var r = i.allOptions.linkClass ? i.allOptions.linkClass : "tabs-title", 21088 o = i.allOptions.panelClass ? i.allOptions.panelClass : "tabs-panel"; 21089 this.$element.removeAttr("role"); 21090 var a = this.$element.children("." + r + ",[data-accordion-item]").removeClass(r).removeClass("accordion-item").removeAttr("data-accordion-item"), 21091 s = a.children("a").removeClass("accordion-title"); 21092 if ("tabs" === t ? (n = n.children("." + o).removeClass(o).removeAttr("role").removeAttr("aria-hidden").removeAttr("aria-labelledby")).children("a").removeAttr("role").removeAttr("aria-controls").removeAttr("aria-selected") : n = a.children("[data-tab-content]").removeClass("accordion-content"), n.css({ 21093 display: "", 21094 visibility: "" 21095 }), a.css({ 21096 display: "", 21097 visibility: "" 21098 }), "accordion" === e) n.each(function(e, t) { 21099 h()(t).appendTo(a.get(e)).addClass("accordion-content").attr("data-tab-content", "").removeClass("is-active").css({ 21100 height: "" 21101 }), h()("[data-tabs-content=" + i.$element.attr("id") + "]").after('<div id="tabs-placeholder-' + i.$element.attr("id") + '"></div>').detach(), a.addClass("accordion-item").attr("data-accordion-item", ""), s.addClass("accordion-title") 21102 }); 21103 else if ("tabs" === e) { 21104 var l = h()("[data-tabs-content=" + i.$element.attr("id") + "]"), 21105 c = h()("#tabs-placeholder-" + i.$element.attr("id")); 21106 c.length ? (l = h()('<div class="tabs-content"></div>').insertAfter(c).attr("data-tabs-content", i.$element.attr("id")), c.remove()) : l = h()('<div class="tabs-content"></div>').insertAfter(i.$element).attr("data-tabs-content", i.$element.attr("id")), n.each(function(e, t) { 21107 var i = h()(t).appendTo(l).addClass(o), 21108 n = s.get(e).hash.slice(1), 21109 r = h()(t).attr("id") || u.i(d.b)(6, "accordion"); 21110 n !== r && ("" !== n ? h()(t).attr("id", n) : (n = r, h()(t).attr("id", n), h()(s.get(e)).attr("href", h()(s.get(e)).attr("href").replace("#", "") + "#" + n))), h()(a.get(e)).hasClass("is-active") && i.addClass("is-active") 21111 }), a.addClass(r) 21112 } 21113 } 21114 } 21115 }, { 21116 key: "_destroy", 21117 value: function() { 21118 this.currentPlugin && this.currentPlugin.destroy(), h()(window).off(".zf.ResponsiveAccordionTabs") 21119 } 21120 }]), t 21121 }(); 21122 c.defaults = {} 21123}, function(e, t, a) { 21124 "use strict"; 21125 a.d(t, "a", function() { 21126 return p 21127 }); 21128 var i = a(0), 21129 s = a.n(i), 21130 l = a(4), 21131 c = a(1), 21132 n = a(2), 21133 r = a(14), 21134 o = a(13), 21135 u = a(12), 21136 h = function() { 21137 function n(e, t) { 21138 for (var i = 0; i < t.length; i++) { 21139 var n = t[i]; 21140 n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(e, n.key, n) 21141 } 21142 } 21143 return function(e, t, i) { 21144 return t && n(e.prototype, t), i && n(e, i), e 21145 } 21146 }(); 21147 var d = { 21148 dropdown: { 21149 cssClass: "dropdown", 21150 plugin: r.a 21151 }, 21152 drilldown: { 21153 cssClass: "drilldown", 21154 plugin: o.a 21155
21155 }, 21156 accordion: { 21157 cssClass: "accordion-menu", 21158 plugin: u.a 21159 } 21160 }, 21161 p = function(e) { 21162 function t() { 21163 return function(e, t) { 21164 if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function") 21165 }(this, t), 21166 function(e, t) { 21167 if (!e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); 21168 return !t || "object" != typeof t && "function" != typeof t ? e : t 21169 }(this, (t.__proto__ || Object.getPrototypeOf(t)).apply(this, arguments)) 21170 } 21171 return function(e, t) { 21172 if ("function" != typeof t && null !== t) throw new TypeError("Super expression must either be null or a function, not " + typeof t); 21173 e.prototype = Object.create(t && t.prototype, { 21174 constructor: { 21175 value: e, 21176 enumerable: !1, 21177 writable: !0, 21178 configurable: !0 21179 } 21180 }), t && (Object.setPrototypeOf ? Object.setPrototypeOf(e, t) : e.__proto__ = t) 21181 }(t, n["a"]), h(t, [{ 21182 key: "_setup", 21183 value: function(e, t) { 21184 this.$element = s()(e), this.rules = this.$element.data("responsive-menu"), this.currentMq = null, this.currentPlugin = null, this.className = "ResponsiveMenu", this._init(), this._events() 21185 } 21186 }, { 21187 key: "_init", 21188 value: function() { 21189 if (l.a._init(), "string" == typeof this.rules) { 21190 for (var e = {}, t = this.rules.split(" "), i = 0; i < t.length; i++) { 21191 var n = t[i].split("-"), 21192 r = 1 < n.length ? n[0] : "small", 21193 o = 1 < n.length ? n[1] : n[0]; 21194 null !== d[o] && (e[r] = d[o]) 21195 } 21196 this.rules = e 21197 } 21198 s.a.isEmptyObject(this.rules) || this._checkMediaQueries(), this.$element.attr("data-mutate", this.$element.attr("data-mutate") || a.i(c.b)(6, "responsive-menu")) 21199 } 21200 }, { 21201 key: "_events", 21202 value: function() { 21203 var e = this; 21204 s()(window).on("changed.zf.mediaquery", function() { 21205 e._checkMediaQueries() 21206 }) 21207 } 21208 }, { 21209 key: "_checkMediaQueries", 21210 value: function() { 21211 var t, i = this; 21212 s.a.each(this.rules, function(e) { 21213 l.a.atLeast(e) && (t = e) 21214 }), t && (this.currentPlugin instanceof this.rules[t].plugin || (s.a.each(d, function(e, t) { 21215 i.$element.removeClass(t.cssClass) 21216 }), this.$element.addClass(this.rules[t].cssClass), this.currentPlugin && this.currentPlugin.destroy(), this.currentPlugin = new this.rules[t].plugin(this.$element, {}))) 21217 } 21218 }, { 21219 key: "_destroy", 21220 value: function() { 21221 this.currentPlugin.destroy(), s()(window).off(".zf.ResponsiveMenu") 21222 } 21223 }]), t 21224 }(); 21225 p.defaults = {} 21226}, function(e, t, i) { 21227 "use strict"; 21228 i.d(t, "a", function() { 21229 return c 21230 }); 21231 var n = i(0), 21232 r = i.n(n), 21233 o = i(4), 21234 a = i(6), 21235 s = i(2), 21236 l = function() { 21237 function n(e, t) { 21238 for (var i = 0; i < t.length; i++) { 21239 var n = t[i]; 21240 n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(e, n.key, n) 21241 } 21242 } 21243 return function(e, t, i) { 21244 return t && n(e.prototype, t), i && n(e, i), e 21245 } 21246 }(); 21247 var c = function(e) { 21248 function i() { 21249 return function(e, t) { 21250 if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function") 21251 }(this, i), 21252 function(e, t) { 21253 if (!e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); 21254 return !t || "object" != typeof t && "function" != typeof t ? e : t 21255 }(this, (i.__proto__ || Object.getPrototypeOf(i)).apply(this, arguments)) 21256 } 21257 return function(e, t) { 21258 if ("function" != typeof t && null !== t) throw new TypeError("Super expression must either be null or a function, not " + typeof t); 21259 e.prototype = Object.create(t && t.prototype, { 21260 constructor: { 21261 value: e, 21262 enumerable: !1, 21263 writable: !0, 21264 configurable: !0 21265 } 21266 }), t && (Object.setPrototypeOf ? Object.setPrototypeOf(e, t) : e.__proto__ = t) 21267 }(i, s["a"]), l(i, [{ 21268 key: "_setup", 21269 value: function(e, t) { 21270 this.$element = r()(e), this.options = r.a.extend({}, i.defaults, this.$element.data(), t), this.className = "ResponsiveToggle", this._init(), this._events() 21271 } 21272 }, { 21273 key: "_init", 21274 value: function() { 21275 o.a._init(); 21276 var t = this.$element.data("responsive-toggle"); 21277 if (t || console.error("Your tab bar needs an ID of a Menu as the value of data-tab-bar."), this.$targetMenu = r()("#" + t), this.$toggler = this.$element.find("[data-toggle]").filter(function() { 21278 var e = r()(this).data("toggle"); 21279 return e === t || "" === e 21280 }), this.options = r.a.extend({}, this.options, this.$targetMenu.data()), this.options.animate) { 21281 var e = this.options.animate.split(" "); 21282 this.animationIn = e[0], this.animationOut = e[1] || null 21283 } 21284 this._update() 21285 } 21286 }, { 21287 key: "_events", 21288 value: function() { 21289 this._updateMqHandler = this._update.bind(this), r()(window).on("changed.zf.mediaquery", this._updateMqHandler), this.$toggler.on("click.zf.responsiveToggle", this.toggleMenu.bind(this)) 21290 } 21291 }, { 21292 key: "_update", 21293 value: function() { 21294 o.a.atLeast(this.options.hideFor) ? (this.$element.hide(), this.$targetMenu.show()) : (this.$element.show(), this.$targetMenu.hide()) 21295 } 21296 }, { 21297 key: "toggleMenu", 21298 value: function() { 21299 var e = this; 21300 o.a.atLeast(this.options.hideFor) || (this.options.animate ? this.$targetMenu.is(":hidden") ? a.a.animateIn(this.$targetMenu, this.animationIn, function() { 21301 e.$element.trigger("toggled.zf.responsiveToggle"), e.$targetMenu.find("[data-mutate]").triggerHandler("mutateme.zf.trigger") 21302 }) : a.a.animateOut(this.$targetMenu, this.animationOut, function() { 21303 e.$element.trigger("toggled.zf.responsiveToggle") 21304 }) : (this.$targetMenu.toggle(0), this.$targetMenu.find("[data-mutate]").trigger("mutateme.zf.trigger"), this.$element.trigger("toggled.zf.responsiveToggle"))) 21305 } 21306 }, { 21307 key: "_destroy", 21308 value: function() { 21309 this.$element.off(".zf.responsiveToggle"), this.$toggler.off(".zf.responsiveToggle"), r()(window).off("changed.zf.mediaquery", this._updateMqHandler) 21310 } 21311 }]), i 21312 }(); 21313 c.defaults = { 21314 hideFor: "medium", 21315 animate: !1 21316 } 21317}, function(e, t, i) { 21318 "use strict"; 21319 i.d(t, "a", function() { 21320 return h 21321 }); 21322 var n = i(0), 21323 a = i.n(n), 21324 r = i(3), 21325 o = i(4), 21326 s = i(6), 21327 l = i(2), 21328 c = i(5), 21329 u = function() { 21330 function n(e, t) { 21331 for (var i = 0; i < t.length; i++) { 21332 var n = t[i]; 21333 n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(e, n.key, n) 21334 } 21335 } 21336 return function(e, t, i) { 21337 return t && n(e.prototype, t), i && n(e, i), e 21338 } 21339 }(); 21340 var h = function(e) { 21341 function i() { 21342 return function(e, t) { 21343 if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function") 21344 }(this, i), 21345 function(e, t) { 21346 if (!e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); 21347 return !t || "object" != typeof t && "function" != typeof t ? e : t 21348 }(this, (i.__proto__ || Object.getPrototypeOf(i)).apply(this, arguments)) 21349 } 21350 return function(e, t) { 21351 if ("function" != typeof t && null !== t) throw new TypeError("Super expression must either be null or a function, not " + typeof t); 21352 e.prototype = Object.create(t && t.prototype, { 21353 constructor: { 21354 value: e, 21355 enumerable: !1, 21356 writable: !0, 21357 configurable: !0 21358 } 21359 }), t && (Object.setPrototypeOf ? Object.setPrototypeOf(e, t) : e.__proto__ = t) 21360 }(i, l["a"]), u(i, [{ 21361 key: "_setup", 21362 value: function(e, t) { 21363 this.$element = e, this.options = a.a.extend({}, i.defaults, this.$element.data(), t), this.className = "Reveal", this._init(), c.a.init(a.a), r.a.register("Reveal", { 21364 ESCAPE: "close" 21365 }) 21366 } 21367 }, { 21368 key: "_init", 21369 value: function() { 21370 o.a._init(), this.id = this.$element.attr("id"), this.isActive = !1, this.cached = { 21371 mq: o.a.current 21372 }, this.isMobile = /iP(ad|hone|od).*OS/.test(window.navigator.userAgent) || /Android/.test(window.navigator.userAgent), this.$anchor = a()('[data-open="' + this.id + '"]').length ? a()('[data-open="' + this.id + '"]') : a()('[data-toggle="' + this.id + '"]'), this.$anchor.attr({ 21373 "aria-controls": this.id, 21374 "aria-haspopup": !0, 21375 tabindex: 0 21376 }), (this.options.fullScreen || this.$element.hasClass("full")) && (this.options.fullScreen = !0, this.options.overlay
21376= !1), this.options.overlay && !this.$overlay && (this.$overlay = this._makeOverlay(this.id)), this.$element.attr({ 21377 role: "dialog", 21378 "aria-hidden": !0, 21379 "data-yeti-box": this.id, 21380 "data-resize": this.id 21381 }), this.$overlay ? this.$element.detach().appendTo(this.$overlay) : (this.$element.detach().appendTo(a()(this.options.appendTo)), this.$element.addClass("without-overlay")), this._events(), this.options.deepLink && window.location.hash === "#" + this.id && a()(window).one("load.zf.reveal", this.open.bind(this)) 21382 } 21383 }, { 21384 key: "_makeOverlay", 21385 value: function() { 21386 var e = ""; 21387 return this.options.additionalOverlayClasses && (e = " " + this.options.additionalOverlayClasses), a()("<div></div>").addClass("reveal-overlay" + e).appendTo(this.options.appendTo) 21388 } 21389 }, { 21390 key: "_updatePosition", 21391 value: function() { 21392 var e, t, i = this.$element.outerWidth(), 21393 n = a()(window).width(), 21394 r = this.$element.outerHeight(), 21395 o = a()(window).height(); 21396 e = "auto" === this.options.hOffset ? parseInt((n - i) / 2, 10) : parseInt(this.options.hOffset, 10), t = "auto" === this.options.vOffset ? o < r ? parseInt(Math.min(100, o / 10), 10) : parseInt((o - r) / 4, 10) : parseInt(this.options.vOffset, 10), this.$element.css({ 21397 top: t + "px" 21398 }), this.$overlay && "auto" === this.options.hOffset || (this.$element.css({ 21399 left: e + "px" 21400 }), this.$element.css({ 21401 margin: "0px" 21402 })) 21403 } 21404 }, { 21405 key: "_events", 21406 value: function() { 21407 var i = this, 21408 n = this; 21409 this.$element.on({ 21410 "open.zf.trigger": this.open.bind(this), 21411 "close.zf.trigger": function(e, t) { 21412 if (e.target === n.$element[0] || a()(e.target).parents("[data-closable]")[0] === t) return i.close.apply(i) 21413 }, 21414 "toggle.zf.trigger": this.toggle.bind(this), 21415 "resizeme.zf.trigger": function() { 21416 n._updatePosition() 21417 } 21418 }), this.options.closeOnClick && this.options.overlay && this.$overlay.off(".zf.reveal").on("click.zf.reveal", function(e) { 21419 e.target !== n.$element[0] && !a.a.contains(n.$element[0], e.target) && a.a.contains(document, e.target) && n.close() 21420 }), this.options.deepLink && a()(window).on("popstate.zf.reveal:" + this.id, this._handleState.bind(this)) 21421 } 21422 }, { 21423 key: "_handleState", 21424 value: function(e) { 21425 window.location.hash !== "#" + this.id || this.isActive ? this.close() : this.open() 21426 } 21427 }, { 21428 key: "open", 21429 value: function() { 21430 var e = this; 21431 if (this.options.deepLink) { 21432 var t = "#" + this.id; 21433 window.history.pushState ? this.options.updateHistory ? window.history.pushState({}, "", t) : window.history.replaceState({}, "", t) : window.location.hash = t 21434 } 21435 this.isActive = !0, this.$element.css({ 21436 visibility: "hidden" 21437 }).show().scrollTop(0), this.options.overlay && this.$overlay.css({ 21438 visibility: "hidden" 21439 }).show(), this._updatePosition(), this.$element.hide().css({ 21440 visibility: "" 21441 }), this.$overlay && (this.$overlay.css({ 21442 visibility: "" 21443 }).hide(), this.$element.hasClass("fast") ? this.$overlay.addClass("fast") : this.$element.hasClass("slow") && this.$overlay.addClass("slow")), this.options.multipleOpened || this.$element.trigger("closeme.zf.reveal", this.id); 21444 var i = this; 21445 21446 function n() { 21447 i.isMobile ? (i.originalScrollPos || (i.originalScrollPos = window.pageYOffset), a()("html, body").addClass("is-reveal-open")) : a()("body").addClass("is-reveal-open") 21448 } 21449 if (this.options.animationIn) { 21450 this.options.overlay && s.a.animateIn(this.$overlay, "fade-in"), s.a.animateIn(this.$element, this.options.animationIn, function() { 21451 e.$element && (e.focusableElements = r.a.findFocusable(e.$element), i.$element.attr({ 21452 "aria-hidden": !1, 21453 tabindex: -1 21454 }).focus(), n(), r.a.trapFocus(i.$element)) 21455 }) 21456 } else this.options.overlay && this.$overlay.show(0), this.$element.show(this.options.showDelay); 21457 this.$element.attr({ 21458 "aria-hidden": !1, 21459 tabindex: -1 21460 }).focus(), r.a.trapFocus(this.$element), n(), this._extraHandlers(), this.$element.trigger("open.zf.reveal") 21461 } 21462 }, { 21463 key: "_extraHandlers", 21464 value: function() { 21465 var t = this; 21466 this.$element && (this.focusableElements = r.a.findFocusable(this.$element), this.options.overlay || !this.options.closeOnClick || this.options.fullScreen || a()("body").on("click.zf.reveal", function(e) { 21467 e.target !== t.$element[0] && !a.a.contains(t.$element[0], e.target) && a.a.contains(document, e.target) && t.close() 21468 }), this.options.closeOnEsc && a()(window).on("keydown.zf.reveal", function(e) { 21469 r.a.handleKey(e, "Reveal", { 21470 close: function() { 21471 t.options.closeOnEsc && t.close() 21472 } 21473 }) 21474 })) 21475 } 21476 }, { 21477 key: "close", 21478 value: function() { 21479 if (!this.isActive || !this.$element.is(":visible")) return !1; 21480 var e = this; 21481 21482 function t() { 21483 e.isMobile ? (0 === a()(".reveal:visible").length && a()("html, body").removeClass("is-reveal-open"), e.originalScrollPos && (a()("body").scrollTop(e.originalScrollPos), e.originalScrollPos = null)) : 0 === a()(".reveal:visible").length && a()("body").removeClass("is-reveal-open"), r.a.releaseFocus(e.$element), e.$element.attr("aria-hidden", !0), e.$element.trigger("closed.zf.reveal") 21484 } 21485 this.options.animationOut ? (this.options.overlay && s.a.animateOut(this.$overlay, "fade-out"), s.a.animateOut(this.$element, this.options.animationOut, t)) : (this.$element.hide(this.options.hideDelay), this.options.overlay ? this.$overlay.hide(0, t) : t()), this.options.closeOnEsc && a()(window).off("keydown.zf.reveal"), !this.options.overlay && this.options.closeOnClick && a()("body").off("
21485click.zf.reveal"), this.$element.off("keydown.zf.reveal"), this.options.resetOnClose && this.$element.html(this.$element.html()), this.isActive = !1, e.options.deepLink && (window.history.replaceState ? window.history.replaceState("", document.title, window.location.href.replace("#" + this.id, "")) : window.location.hash = ""), this.$anchor.focus() 21486 } 21487 }, { 21488 key: "toggle", 21489 value: function() { 21490 this.isActive ? this.close() : this.open() 21491 } 21492 }, { 21493 key: "_destroy", 21494 value: function() { 21495 this.options.overlay && (this.$element.appendTo(a()(this.options.appendTo)), this.$overlay.hide().off().remove()), this.$element.hide().off(), this.$anchor.off(".zf"), a()(window).off(".zf.reveal:" + this.id) 21496 } 21497 }]), i 21498 }(); 21499 h.defaults = { 21500 animationIn: "", 21501 animationOut: "", 21502 showDelay: 0, 21503 hideDelay: 0, 21504 closeOnClick: !0, 21505 closeOnEsc: !0, 21506 multipleOpened: !1, 21507 vOffset: "auto", 21508 hOffset: "auto", 21509 fullScreen: !1, 21510 btmOffsetPct: 10, 21511 overlay: !0, 21512 resetOnClose: !1, 21513 deepLink: !1, 21514 updateHistory: !1, 21515 appendTo: "body", 21516 additionalOverlayClasses: "" 21517 } 21518}, function(e, t, x) { 21519 "use strict"; 21520 x.d(t, "a", function() { 21521 return l 21522 }); 21523 var i = x(0), 21524 m = x.n(i), 21525 a = x(3), 21526 _ = x(6), 21527 g = x(1), 21528 n = x(2), 21529 r = x(10), 21530 o = x(5), 21531 s = function() { 21532 function n(e, t) { 21533 for (var i = 0; i < t.length; i++) { 21534 var n = t[i]; 21535 n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(e, n.key, n) 21536 } 21537 } 21538 return function(e, t, i) { 21539 return t && n(e.prototype, t), i && n(e, i), e 21540 } 21541 }(); 21542 var l = function(e) { 21543 function i() { 21544 return function(e, t) { 21545 if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function") 21546 }(this, i), 21547 function(e, t) { 21548 if (!e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); 21549 return !t || "object" != typeof t && "function" != typeof t ? e : t 21550 }(this, (i.__proto__ || Object.getPrototypeOf(i)).apply(this, arguments)) 21551 } 21552 return function(e, t) { 21553 if ("function" != typeof t && null !== t) throw new TypeError("Super expression must either be null or a function, not " + typeof t); 21554 e.prototype = Object.create(t && t.prototype, { 21555 constructor: { 21556 value: e, 21557 enumerable: !1, 21558 writable: !0, 21559 configurable: !0 21560 } 21561 }), t && (Object.setPrototypeOf ? Object.setPrototypeOf(e, t) : e.__proto__ = t) 21562 }(i, n["a"]), s(i, [{ 21563 key: "_setup", 21564 value: function(e, t) { 21565 this.$element = e, this.options = m.a.extend({}, i.defaults, this.$element.data(), t), this.className = "Slider", r.a.init(m.a), o.a.init(m.a), this._init(), a.a.register("Slider", { 21566 ltr: { 21567 ARROW_RIGHT: "increase", 21568 ARROW_UP: "increase", 21569 ARROW_DOWN: "decrease", 21570 ARROW_LEFT: "decrease", 21571 SHIFT_ARROW_RIGHT: "increase_fast", 21572 SHIFT_ARROW_UP: "increase_fast", 21573 SHIFT_ARROW_DOWN: "decrease_fast", 21574 SHIFT_ARROW_LEFT: "decrease_fast", 21575 HOME: "min", 21576 END: "max" 21577 }, 21578 rtl: { 21579 ARROW_LEFT: "increase", 21580 ARROW_RIGHT: "decrease", 21581 SHIFT_ARROW_LEFT: "increase_fast", 21582 SHIFT_ARROW_RIGHT: "decrease_fast" 21583 } 21584 }) 21585 } 21586 }, { 21587 key: "_init", 21588 value: function() { 21589 this.inputs = this.$element.find("input"), this.handles = this.$element.find("[data-sli
21589der-handle]"), this.$handle = this.handles.eq(0), this.$input = this.inputs.length ? this.inputs.eq(0) : m()("#" + this.$handle.attr("aria-controls")), this.$fill = this.$element.find("[data-slider-fill]").css(this.options.vertical ? "height" : "width", 0); 21590 (this.options.disabled || this.$element.hasClass(this.options.disabledClass)) && (this.options.disabled = !0, this.$element.addClass(this.options.disabledClass)), this.inputs.length || (this.inputs = m()().add(this.$input), this.options.binding = !0), this._setInitAttr(0), this.handles[1] && (this.options.doubleSided = !0, this.$handle2 = this.handles.eq(1), this.$input2 = 1 < this.inputs.length ? this.inputs.eq(1) : m()("#" + this.$handle2.attr("aria-controls")), this.inputs[1] || (this.inputs = this.inputs.add(this.$input2)), !0, this._setInitAttr(1)), this.setHandles(), this._events() 21591 } 21592 }, { 21593 key: "setHandles", 21594 value: function() { 21595 var e = this; 21596 this.handles[1] ? this._setHandlePos(this.$handle, this.inputs.eq(0).val(), !0, function() { 21597 e._setHandlePos(e.$handle2, e.inputs.eq(1).val(), !0) 21598 }) : this._setHandlePos(this.$handle, this.inputs.eq(0).val(), !0) 21599 } 21600 }, { 21601 key: "_reflow", 21602 value: function() { 21603 this.setHandles() 21604 } 21605 }, { 21606 key: "_pctOfBar", 21607 value: function(e) { 21608 var t = T(e - this.options.start, this.options.end - this.options.start); 21609 switch (this.options.positionValueFunction) { 21610 case "pow": 21611 t = this._logTransform(t); 21612 break; 21613 case "log": 21614 t = this._powTransform(t) 21615 } 21616 return t.toFixed(2) 21617 } 21618 }, { 21619 key: "_value", 21620 value: function(e) { 21621 switch (this.options.positionValueFunction) { 21622 case "pow": 21623 e = this._powTransform(e); 21624 break; 21625 case "log": 21626 e = this._logTransform(e) 21627 } 21628 return (this.options.end - this.options.start) * e + this.options.start 21629 } 21630 }, { 21631 key: "_logTransform", 21632 value: function(e) { 21633 return t = this.options.nonLinearBase, i = e * (this.options.nonLinearBase - 1) + 1, Math.log(i) / Math.log(t); 21634 var t, i 21635 } 21636 }, { 21637 key: "_powTransform", 21638 value: function(e) { 21639 return (Math.pow(this.options.nonLinearBase, e) - 1) / (this.options.nonLinearBase - 1) 21640 } 21641 }, { 21642 key: "_setHandlePos", 21643 value: function(e, t, i, n) { 21644 if (!this.$element.hasClass(this.options.disabledClass)) { 21645 (t = parseFloat(t)) < this.options.start ? t = this.options.start : t > this.options.end && (t = this.options.end); 21646 var r = this.options.doubleSided; 21647 if (this.options.vertical && !i && (t = this.options.end - t), r) 21648 if (0 === this.handles.index(e)) { 21649 var o = parseFloat(this.$handle2.attr("aria-valuenow")); 21650 t = o <= t ? o - this.options.step : t 21651 } else { 21652 var a = parseFloat(this.$handle.attr("aria-valuenow")); 21653 t = t <= a ? a + this.options.step : t 21654 } 21655 var s = this, 21656 l = this.options.vertical, 21657 c = l ? "height" : "width", 21658 u = l ? "top" : "left", 21659 h = e[0].getBoundingClientRect()[c], 21660 d = this.$element[0].getBoundingClientRect()[c], 21661 p = this._pctOfBar(t), 21662 f = (100 * T((d - h) * p, d)).toFixed(this.options.decimal); 21663 t = parseFloat(t.toFixed(this.options.decimal)); 21664 var m = {}; 21665 if (this._setValues(e, t), r) { 21666 var g, v = 0 === this.handles.index(e), 21667 y = ~~(100 * T(h, d)); 21668 if (v) m[u] = f + "%", g = parseFloat(this.$handle2[0].style[u]) - f + y, n && "function" == typeof n && n(); 21669 else { 21670 var b = parseFloat(this.$handle[0].style[u]); 21671 g = f - (isNaN(b) ? (this.options.initialStart - this.options.start) / ((this.options.end - this.options.start) / 100) : b) + y 21672 } 21673 m["min-" + c] = g + "%" 21674 } 21675 this.$element.one("finished.zf.animate", function() { 21676 s.$element.trigger("moved.zf.slider", [e]) 21677 }); 21678 var w = this.$element.data("dragging") ? 1e3 / 60 : this.options.moveTime; 21679 x.i(_.b)(w, e, function() {
21680 isNaN(f) ? e.css(u, 100 * p + "%") : e.css(u, f + "%"), s.options.doubleSided ? s.$fill.css(m) : s.$fill.css(c, 100 * p + "%") 21681 }), clearTimeout(s.timeout), s.timeout = setTimeout(function() { 21682 s.$element.trigger("changed.zf.slider", [e]) 21683 }, s.options.changedDelay) 21684 } 21685 } 21686 }, { 21687 key: "_setInitAttr", 21688 value: function(e) { 21689 var t = 0 === e ? this.options.initialStart : this.options.initialEnd, 21690 i = this.inputs.eq(e).attr("id") || x.i(g.b)(6, "slider"); 21691 this.inputs.eq(e).attr({ 21692 id: i, 21693 max: this.options.end, 21694 min: this.options.start, 21695 step: this.options.step 21696 }), this.inputs.eq(e).val(t), this.handles.eq(e).attr({ 21697 role: "slider", 21698 "aria-controls": i, 21699 "aria-valuemax": this.options.end, 21700 "aria-valuemin": this.options.start, 21701 "aria-valuenow": t, 21702 "aria-orientation": this.options.vertical ? "vertical" : "horizontal", 21703 tabindex: 0 21704 }) 21705 } 21706 }, { 21707 key: "_setValues", 21708 value: function(e, t) { 21709 var i = this.options.doubleSided ? this.handles.index(e) : 0; 21710 this.inputs.eq(i).val(t), e.attr("aria-valuenow", t) 21711 } 21712 }, { 21713 key: "_handleEvent", 21714 value: function(e, t, i) { 21715 var n, r; 21716 if (i) n = this._adjustValue(null, i), r = !0; 21717 else { 21718 e.preventDefault(); 21719 var o = this.options.vertical, 21720 a = o ? "height" : "width", 21721 s = o ? "top" : "left", 21722 l = o ? e.pageY : e.pageX, 21723 c = (this.$handle[0].getBoundingClientRect()[a], this.$element[0].getBoundingClientRect()[a]), 21724 u = o ? m()(window).scrollTop() : m()(window).scrollLeft(), 21725 h = this.$element.offset()[s]; 21726 e.clientY === e.pageY && (l += u); 21727 var d, p = l - h, 21728 f = T(d = p < 0 ? 0 : c < p ? c : p, c); 21729 if (n = this._value(f), x.i(g.a)() && !this.options.vertical && (n = this.options.end - n), n = this._adjustValue(null, n), r = !1, !t) t = v(this.$handle, s, d, a) <= v(this.$handle2, s, d, a) ? this.$handle : this.$handle2 21730 } 21731 this._setHandlePos(t, n, r) 21732 } 21733 }, { 21734 key: "_adjustValue", 21735 value: function(e, t) { 21736 var i, n, r, o = this.options.step, 21737 a = parseFloat(o / 2); 21738 return 0 === (n = (i = e ? parseFloat(e.attr("aria-valuenow")) : t) % o) ? i : i = (r = i - n) + a <= i ? r + o : r 21739 } 21740 }, { 21741 key: "_events", 21742 value: function() { 21743 this._eventsForHandle(this.$handle), this.handles[1] && this._eventsForHandle(this.$handle2) 21744 } 21745 }, { 21746 key: "_eventsForHandle", 21747 value: function(t) { 21748 var i, o = this; 21749 if (this.inputs.off("change.zf.slider").on("change.zf.slider", function(e) { 21750 var t = o.inputs.index(m()(this)); 21751 o._handleEvent(e, o.handles.eq(t), m()(this).val()) 21752 }), this.options.clickSelect && this.$element.off("click.zf.slider").on("click.zf.slider", function(e) { 21753 if (o.$element.data("dragging")) return !1; 21754 m()(e.target).is("[data-slider-handle]") || (o.options.doubleSided ? o._handleEvent(e) : o._handleEvent(e, o.$handle)) 21755 }), this.options.draggable) { 21756 this.handles.addTouch(); 21757 var n = m()("body"); 21758 t.off("mousedown.zf.slider").on("mousedown.zf.slider", function(e) { 21759 t.addClass("is-dragging"), o.$fill.addClass("is-dragging"), o.$element.data("dragging", !0), i = m()(e.currentTarget), n.on("mousemove.zf.slider", function(e) { 21760 e.preventDefault(), o._handleEvent(e, i) 21761 }).on("mouseup.zf.slider", function(e) { 21762 o._handleEvent(e, i), t.removeClass("is-dragging"), o.$fill.removeClass("is-dragging"), o.$element.data("dragging", !1), n.off("mousemove.zf.slider mouseup.zf.slider") 21763 }) 21764 }).on("selectstart.zf.slider touchmove.zf.slider", function(e) { 21765 e.preventDefault() 21766 }) 21767 } 21768 t.off("keydown.zf.slider").on("keydown.zf.slider", function(e) {
21769 var t, i = m()(this), 21770 n = o.options.doubleSided ? o.handles.index(i) : 0, 21771 r = parseFloat(o.inputs.eq(n).val()); 21772 a.a.handleKey(e, "Slider", { 21773 decrease: function() { 21774 t = r - o.options.step 21775 }, 21776 increase: function() { 21777 t = r + o.options.step 21778 }, 21779 decrease_fast: function() { 21780 t = r - 10 * o.options.step 21781 }, 21782 increase_fast: function() { 21783 t = r + 10 * o.options.step 21784 }, 21785 min: function() { 21786 t = o.options.start 21787 }, 21788 max: function() { 21789 t = o.options.end 21790 }, 21791 handled: function() { 21792 e.preventDefault(), o._setHandlePos(i, t, !0) 21793 } 21794 }) 21795 }) 21796 } 21797 }, { 21798 key: "_destroy", 21799 value: function() { 21800 this.handles.off(".zf.slider"), this.inputs.off(".zf.slider"), this.$element.off(".zf.slider"), clearTimeout(this.timeout) 21801 } 21802 }]), i 21803 }(); 21804 21805 function T(e, t) { 21806 return e / t 21807 } 21808 21809 function v(e, t, i, n) { 21810 return Math.abs(e.position()[t] + e[n]() / 2 - i) 21811 } 21812 l.defaults = { 21813 start: 0, 21814 end: 100, 21815 step: 1, 21816 initialStart: 0, 21817 initialEnd: 100, 21818 binding: !1, 21819 clickSelect: !0, 21820 vertical: !1, 21821 draggable: !0, 21822 disabled: !1, 21823 doubleSided: !1, 21824 decimal: 2, 21825 moveTime: 200, 21826 disabledClass: "disabled", 21827 invertVertical: !1, 21828 changedDelay: 500, 21829 nonLinearBase: 5, 21830 positionValueFunction: "linear" 21831 } 21832}, function(e, t, n) { 21833 "use strict"; 21834 n.d(t, "a", function() { 21835 return u 21836 }); 21837 var i = n(0), 21838 s = n.n(i), 21839 r = n(1), 21840 l = n(4), 21841 o = n(2), 21842 a = n(5), 21843 c = function() { 21844 function n(e, t) { 21845 for (var i = 0; i < t.length; i++) { 21846 var n = t[i]; 21847 n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(e, n.key, n) 21848 } 21849 } 21850 return function(e, t, i) { 21851 return t && n(e.prototype, t), i && n(e, i), e 21852 } 21853 }(); 21854 var u = function(e) { 21855 function i() { 21856 return function(e, t) { 21857 if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function") 21858 }(this, i), 21859 function(e, t) { 21860 if (!e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); 21861 return !t || "object" != typeof t && "function" != typeof t ? e : t 21862 }(this, (i.__proto__ || Object.getPrototypeOf(i)).apply(this, arguments)) 21863 } 21864 return function(e, t) { 21865 if ("function" != typeof t && null !== t) throw new TypeError("Super expression must either be null or a function, not " + typeof t); 21866 e.prototype = Object.create(t && t.prototype, { 21867 constructor: { 21868 value: e, 21869 enumerable: !1, 21870 writable: !0, 21871 configurable: !0 21872 } 21873 }), t && (Object.setPrototypeOf ? Object.setPrototypeOf(e, t) : e.__proto__ = t) 21874 }(i, o["a"]), c(i, [{ 21875 key: "_setup", 21876 value: function(e, t) { 21877 this.$element = e, this.options = s.a.extend({}, i.defaults, this.$element.data(), t), this.className = "Sticky", a.a.init(s.a), this._init() 21878 } 21879 }, { 21880 key: "_init", 21881 value: function() { 21882 l.a._init(); 21883 var e = this.$element.parent("[data-sticky-container]"), 21884 t = this.$element[0].id || n.i(r.b)(6, "sticky"), 21885 i = this; 21886 e.length ? this.$container = e : (this.wasWrapped = !0, this.$element.wrap(this.options.container), this.$container = this.$element.parent()), this.$container.addClass(this.options.containerClass), this.$element.addClass(this.options.stickyClass).attr({ 21887 "data-resize": t, 21888 "data-mutate": t 21889 }), "" !== this.options.anchor && s()("#" + i.options.anchor).attr({ 21890 "data-mutate": t 21891 }), this.scrollCount = this.options.checkEvery, this.isStuck = !1, s()(window).one("load.zf.sticky", function() { 21892 i.containerHeight = "none" == i.$element.css("display") ? 0 : i.$element[0].getBoundingClientRect().height, i.$container.css("height", i.containerHeight), i.elemHeight = i.containerHeight, "" !== i.options.anchor ? i.$anchor = s()("#" + i.options.anchor) : i._parsePoints(), i._setSizes(function() { 21893 var e = window.pageYOffset; 21894 i._calc(!1, e), i.isStuck || i._removeSticky(!(e >= i.topPoint)) 21895 }), i._events(t.split("-").reverse().join("-")) 21896 }) 21897 } 21898 }, { 21899 key: "_parsePoints", 21900 value: function() { 21901 for (var e = ["" == this.options.topAnchor ? 1 : this.options.topAnchor, "" == this.options.btmAnchor ? document.documentElement.scrollHeight : this.options.btmAnchor], t = {}, i = 0, n = e.length; i < n && e[i]; i++) { 21902 var r; 21903 if ("number" == typeof e[i]) r = e[i]; 21904 else { 21905 var o = e[i].split(":"), 21906 a = s()("#" + o[0]); 21907 r = a.offset().top, o[1] && "bottom" === o[1].toLowerCase() && (r += a[0].getBoundingClientRect().height) 21908 } 21909 t[i] = r 21910 } 21911 this.points = t 21912 } 21913 }, { 21914 key: "_events", 21915 value: function(i) { 21916 var n = this, 21917 e = this.scrollListener = "scroll.zf." + i; 21918 this.isOn || (this.canStick && (this.isOn = !0, s()(window).off(e).on(e, function(e) { 21919 0 === n.scrollCount ? (n.scrollCount = n.options.checkEvery, n._setSizes(function() { 21920 n._calc(!1, window.pageYOffset) 21921 })) : (n.scrollCount--, n._calc(!1, window.pageYOffset)) 21922 })), this.$element.off("resizeme.zf.trigger").on("resizeme.zf.trigger", function(e, t) { 21923 n._eventsHandler(i) 21924 }), this.$element.on("mutateme.zf.trigger", function(e, t) { 21925 n._eventsHandler(i) 21926 }), this.$anchor && this.$anchor.on("mutateme.zf.trigger", function(e, t) { 21927 n._eventsHandler(i) 21928 })) 21929 } 21930 }, { 21931 key: "_eventsHandler", 21932 value: function(e) { 21933 var t = this, 21934 i = this.scrollListener = "scroll.zf." + e; 21935 t._setSizes(function() { 21936 t._calc(!1), t.canStick ? t.isOn || t._events(e) : t.isOn && t._pauseListeners(i) 21937 }) 21938 } 21939 }, { 21940 key: "_pauseListeners", 21941 value: function(e) { 21942 this.isOn = !1, s()(window).off(e), this.$element.trigger("pause.zf.sticky") 21943 } 21944 }, { 21945 key: "_calc", 21946 value: function(e, t) { 21947 if (e && this._setSizes(), !this.canStick) return this.isStuck && this._removeSticky(!0), !1; 21948 t || (t = window.pageYOffset), t >= this.topPoint ? t <= this.bottomPoint ? this.isStuck || this._setSticky() : this.isStuck && this._removeSticky(!1) : this.isStuck && this._removeSticky(!0) 21949 } 21950 }, { 21951 key: "_setSticky", 21952 value: function() { 21953 var e = this, 21954 t = this.options.stickTo, 21955 i = "top" === t ? "marginTop" : "marginBottom", 21956 n = "top" === t ? "bottom" : "top", 21957 r = {}; 21958 r[i] = this.options[i] + "em", r[t] = 0, r[n] = "auto", this.isStuck = !0, this.$element.removeClass("is-anchored is-at-" + n).addClass("is-stuck is-at-" + t).css(r).trigger("sticky.zf.stuckto:" + t), this.$element.on("transitionend webkitTransitionEnd oTransitionEnd otransitionend MSTransitionEnd", function() { 21959 e._setSizes() 21960 }) 21961 } 21962 }, { 21963 key: "_removeSticky", 21964 value: function(e) { 21965 var t = this.options.stickTo, 21966 i = "top" === t, 21967 n = {}, 21968 r = (this.points ? this.points[1] - this.points[0] : this.anchorHeight) - this.elemHeight, 21969 o = e ? "top" : "bottom"; 21970 n[i ? "marginTop" : "marginBottom"] = 0, n.bottom = "auto", n.top = e ? 0 : r, this.isStuck = !1, this.$element.removeClass("is-stuck is-at-" + t).addClass("is-anchored is-at-" + o).css(n).trigger("sticky.zf.unstuckfrom:" + o) 21971 } 21972 }, { 21973 key: "_setSizes", 21974 value: function(e) { 21975 this.canStick = l.a.is(this.options.stickyOn), this.canStick || e && "function" == typeof e && e(); 21976 var t = this.$container[0].getBoundingClientRect().width, 21977 i = window.getComputedStyle(this.$container[0]), 21978 n = parseInt(i["padding-left"], 10), 21979 r = parseInt(i["padding-right"], 10); 21980 this.$anchor && this.$anchor.length ? this.anchorHeight = this.$anchor[0].getBoundingClientRect().height : this._parsePoints(), this.$element.css({ 21981 "max-width": t - n - r + "px" 21982 }); 21983 var o = this.$element[0].getBoundingClientRect().height || this.containerHeight; 21984 if ("none" == this.$element.css("display") && (o = 0), this.containerHeight = o, this.$container.css({ 21985 height: o 21986 }), this.elemHeight = o, !this.isStuck && this.$element.hasClass("is-at-bottom")) { 21987 var a = (this.points ? this.points[1] - this.$container.offset().top : this.anchorHeight) - this.elemHeight; 21988 this.$element.css("top", a) 21989 } 21990 this._setBreakPoints(o, function() { 21991 e && "function" == typeof e && e() 21992 }) 21993 } 21994 }, { 21995 key: "_setBreakPoints", 21996 value: function(e, t) { 21997 if (!this.canStick) { 21998 if (!t || "function" != typeof t) return !1; 21999 t() 22000 } 22001 var i = h(this.options.marginTop), 22002 n = h(this.options.marginBottom), 22003 r = this.points ? this.points[0] : this.$anchor.offset().top, 22004 o = this.points ? this.points[1] : r + this.anchorHeight, 22005 a = window.innerHeight; 22006 "top" === this.options.stickTo ? (r -= i, o -= e + i) : "bottom" === this.options.stickTo && (r -= a - (e + n), o -= a - n
22006), this.topPoint = r, this.bottomPoint = o, t && "function" == typeof t && t() 22007 } 22008 }, { 22009 key: "_destroy", 22010 value: function() { 22011 this._removeSticky(!0), this.$element.removeClass(this.options.stickyClass + " is-anchored is-at-top").css({ 22012 height: "", 22013 top: "", 22014 bottom: "", 22015 "max-width": "" 22016 }).off("resizeme.zf.trigger").off("mutateme.zf.trigger"), this.$anchor && this.$anchor.length && this.$anchor.off("change.zf.sticky"), s()(window).off(this.scrollListener), this.wasWrapped ? this.$element.unwrap() : this.$container.removeClass(this.options.containerClass).css({ 22017 height: "" 22018 }) 22019 } 22020 }]), i 22021 }(); 22022 22023 function h(e) { 22024 return parseInt(window.getComputedStyle(document.body, null).fontSize, 10) * e 22025 } 22026 u.defaults = { 22027 container: "<div data-sticky-container></div>", 22028 stickTo: "top", 22029 anchor: "", 22030 topAnchor: "", 22031 btmAnchor: "", 22032 marginTop: 1, 22033 marginBottom: 1, 22034 stickyOn: "medium", 22035 stickyClass: "sticky", 22036 containerClass: "sticky-container", 22037 checkEvery: -1 22038 } 22039}, function(e, t, i) { 22040 "use strict"; 22041 i.d(t, "a", function() { 22042 return c 22043 }); 22044 var n = i(0), 22045 r = i.n(n), 22046 o = i(6), 22047 a = i(2), 22048 s = i(5), 22049 l = function() { 22050 function n(e, t) { 22051 for (var i = 0; i < t.length; i++) { 22052 var n = t[i]; 22053 n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(e, n.key, n) 22054 } 22055 } 22056 return function(e, t, i) { 22057 return t && n(e.prototype, t), i && n(e, i), e 22058 } 22059 }(); 22060 var c = function(e) { 22061 function i() { 22062 return function(e, t) { 22063 if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function") 22064 }(this, i), 22065 function(e, t) { 22066 if (!e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); 22067 return !t || "object" != typeof t && "function" != typeof t ? e : t 22068 }(this, (i.__proto__ || Object.getPrototypeOf(i)).apply(this, arguments)) 22069 } 22070 return function(e, t) { 22071 if ("function" != typeof t && null !== t) throw new TypeError("Super expression must either be null or a function, not " + typeof t); 22072 e.prototype = Object.create(t && t.prototype, { 22073 constructor: { 22074 value: e, 22075 enumerable: !1, 22076 writable: !0, 22077 configurable: !0 22078 } 22079 }), t && (Object.setPrototypeOf ? Object.setPrototypeOf(e, t) : e.__proto__ = t) 22080 }(i, a["a"]), l(i, [{ 22081 key: "_setup", 22082 value: function(e, t) { 22083 this.$element = e, this.options = r.a.extend({}, i.defaults, e.data(), t), this.className = "", this.className = "Toggler", s.a.init(r.a), this._init(), this._events() 22084 } 22085 }, { 22086 key: "_init", 22087 value: function() { 22088 var e; 22089 this.options.animate ? (e = this.options.animate.split(" "), this.animationIn = e[0], this.animationOut = e[1] || null) : (e = this.$element.data("toggler"), this.className = "." === e[0] ? e.slice(1) : e); 22090 var t = this.$element[0].id; 22091 r()('[data-open="' + t + '"], [data-close="' + t + '"], [data-toggle="' + t + '"]').attr("aria-controls", t), this.$element.attr("aria-expanded", !this.$element.is(":hidden")) 22092 } 22093 }, { 22094 key: "_events", 22095 value: function() { 22096 this.$element.off("toggle.zf.trigger").on("toggle.zf.trigger", this.toggle.bind(this)) 22097 } 22098 }, { 22099 key: "toggle", 22100 value: function() { 22101 this[this.options.animate ? "_toggleAnimate" : "_toggleClass"]() 22102 } 22103 }, { 22104 key: "_toggleClass", 22105 value: function() { 22106 this.$element.toggleClass(this.className); 22107 var e = this.$element.hasClass(this.className); 22108 e ? this.$element.trigger("on.zf.toggler") : this.$element.trigger("off.zf.toggler"), this._updateARIA(e), this.$element.find("[data-mutate]").trigger("mutateme.zf.trigger") 22109 } 22110 }, { 22111 key: "_toggleAnimate", 22112 value: function() { 22113 var e = this; 22114 this.$element.is(":hidden") ? o.a.animateIn(this.$element, this.animationIn, function() { 22115 e._updateARIA(!0), this.trigger("on.zf.toggler"), this.find("[data-mutate]").trigger("mutateme.zf.trigger") 22116 }) : o.a.animateOut(this.$element, this.animationOut, function() { 22117 e._updateARIA(!1), this.trigger("off.zf.toggler"), this.find("[data-mutate]").trigger("mutateme.zf.trigger") 22118 }) 22119 } 22120 }, { 22121 key: "_updateARIA", 22122 value: function(e) { 22123 this.$element.attr("aria-expanded", !!e) 22124 } 22125 }, { 22126 key: "_destroy", 22127 value: function() { 22128 this.$element.off(".zf.toggler") 22129 } 22130 }]), i 22131 }(); 22132 c.defaults = { 22133 animate: !1 22134 } 22135}, function(e, t, n) { 22136 "use strict"; 22137 n.d(t, "a", function() { 22138 return h 22139 }); 22140 var i = n(0), 22141 r = n.n(i), 22142 o = n(1), 22143 a = n(4), 22144 s = n(5), 22145 l = n(15), 22146 c = function() { 22147 function n(e, t) { 22148 for (var i = 0; i < t.length; i++) { 22149 var n = t[i]; 22150 n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(e, n.key, n) 22151 } 22152 } 22153 return function(e, t, i) { 22154 return t && n(e.prototype, t), i && n(e, i), e 22155 } 22156 }(), 22157 u = function e(t, i, n) { 22158 null === t && (t = Function.prototype); 22159 var r = Object.getOwnPropertyDescriptor(t, i); 22160 if (void 0 === r) { 22161 var o = Object.getPrototypeOf(t); 22162 return null === o ? void 0 : e(o, i, n) 22163 } 22164 if ("value" in r) return r.value; 22165 var a = r.get; 22166 return void 0 !== a ? a.call(n) : void 0 22167 }; 22168 var h = function(e) { 22169 function i() { 22170 return function(e, t) { 22171 if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function") 22172 }(this, i), 22173 function(e, t) { 22174 if (!e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); 22175 return !t || "object" != typeof t && "function" != typeof t ? e : t 22176 }(this, (i.__proto__ || Object.getPrototypeOf(i)).apply(this, arguments)) 22177 } 22178 return function(e, t) { 22179 if ("function" != typeof t && null !== t) throw new TypeError("Super expression must either be null or a function, not " + typeof t); 22180 e.prototype = Object.create(t && t.prototype, { 22181 constructor: { 22182 value: e, 22183 enumerable: !1, 22184 writable: !0, 22185 configurable: !0 22186 } 22187 }), t && (Object.setPrototypeOf ? Object.setPrototypeOf(e, t) : e.__proto__ = t) 22188 }(i, l["a"]), c(i, [{ 22189 key: "_setup", 22190 value: function(e, t) { 22191 this.$element = e, this.options = r.a.extend({}, i.defaults, this.$element.data(), t), this.className = "Tooltip", this.isActive = !1, this.isClick = !1, s.a.init(r.a), this._init() 22192 } 22193 }, { 22194 key: "_init", 22195 value: function() { 22196 a.a._init(); 22197 var e = this.$element.attr("aria-describedby") || n.i(o.b)(6, "tooltip"); 22198 this.options.tipText = this.options.tipText || this.$element.attr("title"), this.template = this.options.template ? r()(this.options.template) : this._buildTemplate(e), this.options.allowHtml ? this.template.appendTo(document.body).html(this.options.tipText).hide() : this.template.appendTo(document.body).text(this.options.tipText).hide(), this.$element.attr({ 22199 title: "", 22200 "aria-describedby": e, 22201 "data-yeti-box": e, 22202 "data-toggle": e, 22203 "data-resize": e 22204 }).addClass(this.options.triggerClass), u(i.prototype.__proto__ || Object.getPrototypeOf(i.prototype), "_init", this).call(this), this._events() 22205 } 22206 }, { 22207 key: "_getDefaultPosition", 22208 value: function() { 22209 var e = this.$element[0].className.match(/\b(top|left|right|bottom)\b/g); 22210 return e ? e[0] : "top" 22211 } 22212 }, { 22213 key: "_getDefaultAlignment", 22214 value: function() { 22215 return "center" 22216 } 22217 }, { 22218 key: "_getHOffset", 22219 value: function() { 22220 return "left" === this.position || "right" === this.position ? this.options.hOffset + this.options.tooltipWidth : this.options.hOffset 22221 } 22222 }, { 22223 key: "_getVOffset", 22224 value: function() { 22225 return "top" === this.position || "bottom" === this.position ? this.options.vOffset + this.options.tooltipHeight : this.options.vOffset 22226 } 22227 }, { 22228 key: "_buildTemplate", 22229 value: function(e) { 22230 var t = (this.options.tooltipClass + " " + this.options.positionClass + " " + this.options.templateClasses).trim(); 22231 return r()("<div></div>").addClass(t).attr({ 22232 role: "tooltip", 22233 "aria-hidden": !0, 22234 "data-is-active": !1, 22235 "data-is-focus": !1, 22236 id: e 22237 }) 22238 } 22239 }, { 22240 key: "_setPosition", 22241 value: function() { 22242 u(i.prototype.__proto__ || Object.getPrototypeOf(i.prototype), "_setPosition", this).call(this, this.$element, this.template) 22243 } 22244 }, { 22245 key: "show", 22246 value: function() { 22247 if ("all" !== this.options.showOn && !a.a.is(this.options.showOn)) return !1; 22248 this.template.css("visibility", "hidden").show(), this._setPosition(), this.template.removeClass("top bottom left right").addClass(this.position), this.template.removeClass("align-top align-bottom align-left align-right al
22248ign-center").addClass("align-" + this.alignment), this.$element.trigger("closeme.zf.tooltip", this.template.attr("id")), this.template.attr({ 22249 "data-is-active": !0, 22250 "aria-hidden": !1 22251 }), this.isActive = !0, this.template.stop().hide().css("visibility", "").fadeIn(this.options.fadeInDuration, function() {}), this.$element.trigger("show.zf.tooltip") 22252 } 22253 }, { 22254 key: "hide", 22255 value: function() { 22256 var e = this; 22257 this.template.stop().attr({ 22258 "aria-hidden": !0, 22259 "data-is-active": !1 22260 }).fadeOut(this.options.fadeOutDuration, function() { 22261 e.isActive = !1, e.isClick = !1 22262 }), this.$element.trigger("hide.zf.tooltip") 22263 } 22264 }, { 22265 key: "_events", 22266 value: function() { 22267 var t = this, 22268 i = (this.template, !1); 22269 this.options.disableHover || this.$element.on("mouseenter.zf.tooltip", function(e) { 22270 t.isActive || (t.timeout = setTimeout(function() { 22271 t.show() 22272 }, t.options.hoverDelay)) 22273 }).on("mouseleave.zf.tooltip", function(e) { 22274 clearTimeout(t.timeout), (!i || t.isClick && !t.options.clickOpen) && t.hide() 22275 }), this.options.clickOpen ? this.$element.on("mousedown.zf.tooltip", function(e) { 22276 e.stopImmediatePropagation(), t.isClick || (t.isClick = !0, !t.options.disableHover && t.$element.attr("tabindex") || t.isActive || t.show()) 22277 }) : this.$element.on("mousedown.zf.tooltip", function(e) { 22278 e.stopImmediatePropagation(), t.isClick = !0 22279 }), this.options.disableForTouch || this.$element.on("tap.zf.tooltip touchend.zf.tooltip", function(e) { 22280 t.isActive ? t.hide() : t.show() 22281 }), this.$element.on({ 22282 "close.zf.trigger": this.hide.bind(this) 22283 }), this.$element.on("focus.zf.tooltip", function(e) { 22284 if (i = !0, t.isClick) return t.options.clickOpen || (i = !1), !1; 22285 t.show() 22286 }).on("focusout.zf.tooltip", function(e) { 22287 i = !1, t.isClick = !1, t.hide() 22288 }).on("resizeme.zf.trigger", function() { 22289 t.isActive && t._setPosition() 22290 }) 22291 } 22292 }, { 22293 key: "toggle", 22294 value: function() { 22295 this.isActive ? this.hide() : this.show() 22296 } 22297 }, { 22298 key: "_destroy", 22299 value: function() { 22300 this.$element.attr("title", this.template.text()).off(".zf.trigger .zf.tooltip").removeClass("has-tip top right left").removeAttr("aria-describedby aria-haspopup data-disable-hover data-resize data-toggle data-tooltip data-yeti-box"), this.template.remove() 22301 } 22302 }]), i 22303 }(); 22304 h.defaults = { 22305 disableForTouch: !1, 22306 hoverDelay: 200, 22307 fadeInDuration: 150, 22308 fadeOutDuration: 150, 22309 disableHover: !1, 22310 templateClasses: "", 22311 tooltipClass: "tooltip", 22312 triggerClass: "has-tip", 22313 showOn: "small", 22314 template: "", 22315 tipText: "", 22316 touchCloseText: "Tap to close.", 22317 clickOpen: !0, 22318 positionClass: "", 22319 position: "auto", 22320 alignment: "auto", 22321 allowOverlap: !1, 22322 allowBottomOverlap: !1, 22323 vOffset: 0, 22324 hOffset: 0, 22325 tooltipHeight: 14, 22326 tooltipWidth: 12, 22327 allowHtml: !1 22328 } 22329}, function(e, t, i) { 22330 e.exports = i(19) 22331}]), 22332function() { 22333 var R, L; 22334 R = this.jQuery || window.jQuery, L = R(window), R.fn.stick_in_parent = function(e) { 22335 var x, _, T, E, M, S, i, C, A, t, n, r; 22336 for (null == e && (e = {}), A = e.sticky_class, T = e.inner_scrolling, C = e.recalc_every, i = e.parent, M = e.offset_top, E = e.spacer, _ = e.bottoming, null == M && (M = 0), null == i && (i = void 0), null == T && (T = !0), null == A && (A = "is_stuck"), x = R(document), null == _ && (_ = !0), S = function(e) { 22337 var t; 22338 return window.getComputedStyle ? (e = window.getComputedStyle(e[0]), t = parseFloat(e.getPropertyValue("width")) + parseFloat(e.getPropertyValue("margin-left")) + parseFloat(e.getPropertyValue("margin-right")), "border-box" !== e.getPropertyValue("box-sizing") && (t += parseFloat(e.getPropertyValue("border-left-width")) + parseFloat(e.getPropertyValue("border-right-width")) + parseFloat(e.getPropertyValue("padding-left")) + parseFloat(e.getPropertyValue("padding-right"))), t) : e.outerWidth(!0) 22339 }, t = function(r, o, a, s, l, c, u, h) { 22340 var d, e, p, f, m, g, v, y, t, b, w, n; 22341 if (!r.data("sticky_kit")) { 22342 if (r.data("sticky_kit", !0), m = x.height(), v = r.parent(), null != i && (v = v.closest(i)), !v.length) throw "failed to find stick parent"; 22343 if (d = p = !1, (w = null != E ? E && r.closest(E) : R("<div />")) && w.css("position", r.css("position")), (y = function() { 22344 var e, t, i; 22345 if (!h && (m = x.height(), e = parseInt(v.css("border-top-width"), 10), t = parseInt(v.css("padding-top"), 10), o = parseInt(v.css("padding-bottom"), 10), a = v.offset().top + e + t, s = v.height(), p && (d = p = !1, null == E && (r.insertAfter(w), w.detach()), r.css({ 22346 position: "", 22347 top: "", 22348 width: "", 22349 bottom: "" 22350 }).removeClass(A), i = !0), l = r.offset().top - (parseInt(r.css("margin-top"), 10) || 0) - M, c = r.outerHeight(!0), u = r.css("float"), w && w.css({ 22351 width: S(r), 22352 height: c, 22353 display: r.css("display"), 22354 "vertical-align": r.css("vertical-align"), 22355 float: u 22356 }), i)) return n() 22357 })(), c !== s) return f = void 0, g = M, b = C, n = function() { 22358 var e, t, i, n; 22359 if (!h && (i = !1, null != b && (--b <= 0 && (b = C, y(), i = !0)), i || x.height() === m || y(), i = L.scrollTop(), null != f && (t = i - f), f = i, p ? (_ && (n = s + a < i + c + g, d && !n && (d = !1, r.css({ 22360 position: "fixed", 22361 bottom: "", 22362 top: g 22363 }).trigger("sticky_kit:unbottom"))), i < l && (p = !1, g = M, null == E && ("left" !== u && "right" !== u || r.insertAfter(w), w.detach()), e = { 22364 position: "", 22365 width: "", 22366 top: "" 22367 }, r.css(e).removeClass(A).trigger("sticky_kit:unstick")), T && ((e = L.height()) < c + M && !d && (g -= t, g = Math.max(e - c, g), g = Math.min(M, g), p && r.css({ 22368 top: g + "px" 22369 })))) : l < i && (p = !0, (e = { 22370 position: "fixed", 22371 top: g 22372 }).width = "border-box" === r.css("box-sizing") ? r.outerWidth() + "px" : r.width() + "px", r.css(e).addClass(A), null == E && (r.after(w), "left" !== u && "right" !== u || w.append(r)), r.trigger("sticky_kit:stick")), p && _ && (null == n && (n = s + a < i + c + g), !d && n))) return d = !0, "static" === v.css("position") && v.css({ 22373 position: "relative" 22374 }), r.css({ 22375 position: "absolute", 22376 bottom: o, 22377 top: "auto" 22378 }).trigger("sticky_kit:bottom") 22379 }, t = function() { 22380 return y(), n() 22381 }, e = function() { 22382 if (h = !0, L.off("touchmove", n), L.off("scroll", n), L.off("resize", t), R(document.body).off("sticky_kit:recalc", t), r.off("sticky_kit:detach", e), r.removeData("sticky_kit"), r.css({ 22383 position: "", 22384 bottom: "", 22385 top: "", 22386 width: "" 22387 }), v.position("position", ""), p) return null == E && ("left" !== u && "right" !== u || r.insertAfter(w), w.remove()), r.removeClass(A) 22388 }, L.on("touchmove", n), L.on("scroll", n), L.on("resize", t), R(document.body).on("sticky_kit:recalc", t), r.on("sticky_kit:detach", e), setTimeout(n, 0) 22389 } 22390 }, n = 0, r = this.length; n < r; n++) e = this[n], t(R(e)); 22391 return this 22392 } 22393}.call(this), 22394 function(e, t) { 22395 "object" == typeof exports && exports && "string" != typeof exports.nodeName ? t(exports) : "function" == typeof define && define.amd ? define(["exports"], t) : (e.Mustache = {}, t(e.Mustache)) 22396 }(this, function(x) { 22397 var t = Object.prototype.toString, 22398 _ = Array.isArray || function(e) { 22399 return "[object Array]" === t.call(e) 22400 }; 22401 22402 function c(e) { 22403 return "function" == typeof e 22404 } 22405 22406 function T(e) { 22407 return e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g, "\\$&") 22408 } 22409 22410 function s(e, t) { 22411 return null != e && "object" == typeof e && t in e 22412 } 22413 var n = RegExp.prototype.test; 22414 var r = /\S/; 22415 22416 function E(e) { 22417 return t = r, i = e, !n.call(t, i); 22418 var t, i 22419 } 22420 var i = { 22421 "&": "&", 22422 "<": "<", 22423 ">": ">", 22424 '"': """, 22425 "'": "'", 22426 "/": "/", 22427 "`": "`", 22428 "=": "=" 22429 }; 22430 var M = /\s*/, 22431 S = /\s+/, 22432 C = /\s*=/, 22433 A = /\s*\}/, 22434 R = /#|\^|\/|>|\{|&|=|!/; 22435 22436 function L(e) { 22437 this.string = e, this.tail = e, this.pos = 0 22438 } 22439 22440 function o(e, t) { 22441 this.view = e, this.cache = { 22442 ".": this.view 22443 }, this.parent = t 22444 } 22445 22446 function e() { 22447 this.cache = {} 22448 } 22449 L.prototype.eos = function() { 22450 return "" === this.tail 22451 }, L.prototype.scan = function(e) { 22452 var t = this.tail.match(e); 22453 if (!t || 0 !== t.index) return ""; 22454 var i = t[0]; 22455 return this.tail = this.tail.substring(i.length), this.pos += i.length, i 22456 }, L.prototype.scanUntil = function(e) { 22457 var t, i = this.tail.search(e); 22458 switch (i) { 22459 case -1: 22460 t = this.tail, this.tail = ""; 22461 break; 22462 case 0: 22463 t = ""; 22464 break; 22465 default: 22466 t = this.tail.substring(0, i), this.tail = this.tail.substring(i) 22467 } 22468 return this.pos += t.length, t 22469 }, o.prototype.push = function(e) { 22470 return new o(e, this) 22471 }, o.prototype.lookup = function(e) { 22472 var t, i = this.cache; 22473 if (i.hasOwnProperty(e)) t = i[e]; 22474 else { 22475 for (var n, r, o = this, a = !1; o;) { 22476 if (0 < e.indexOf(".")) 22477 for (t = o.view, n = e.split("."), r = 0; null != t && r < n.length;) r === n.length - 1 && (a = s(t, n[r])), t = t[n[r++]]; 22478 else t = o.view[e], a = s(o.view, e); 22479 if (a) break; 22480 o = o.parent 22481 } 22482 i[e] = t 22483 } 22484 return c(t) && (t = t.call(this.view)), t 22485 }, e.prototype.clearCache = function() { 22486 this.cache = {} 22487 }, e.prototype.parse = function(e, t) { 22488 var i = this.cache, 22489 n = i[e]; 22490 return null == n && (n = i[e] = function(e, t) { 22491 if (!e) return []; 22492 var i, n, r, o = [], 22493 a = [], 22494 s = [], 22495 l = !1, 22496 c = !1; 22497 22498 function u() { 22499 if (l && !c) 22500 for (; s.length;) delete a[s.pop()]; 22501 else s = []; 22502 c = l = !1 22503 } 22504 22505 function h(e) { 22506 if ("string" == typeof e && (e = e.split(S, 2)), !_(e) || 2 !== e.length) throw new Error("Invalid tags: " + e); 22507 i = new RegExp(T(e[0]) + "\\s*"), n = new RegExp("\\s*" + T(e[1])), r = new RegExp("\\s*" + T("}" + e[1])) 22508 } 22509 h(t || x.tags); 22510 for (var d, p, f, m, g, v, y = new L(e); !y.eos();) { 22511 if (d = y.pos, f = y.scanUntil(i)) 22512 for (var b = 0, w = f.length; b < w; ++b) E(m = f.charAt(b)) ? s.push(a.length) : c = !0, a.push(["text", m, d, d + 1]), d += 1, "\n" === m && u(); 22513 if (!y.scan(i)) break; 22514 if (l = !0, p = y.scan(R) || "name", y.scan(M), "=" === p ? (f = y.scanUntil(C), y.scan(C), y.scanUntil(n)) : "{" === p ? (f = y.scanUntil(r), y.scan(A), y.scanUntil(n), p = "&") : f = y.scanUntil(n), !y.scan(n)) throw new Error("Unclosed tag at " + y.pos); 22515 if (g = [p, f, d, y.pos], a.push(g), "#" === p || "^" === p) o.push(g); 22516 else if ("/" === p) { 22517 if (!(v = o.pop())) throw new Error('Unopened section "' + f + '" at ' + d); 22518 if (v[1] !== f) throw new Error('Unclosed section "' + v[1] + '" at ' + d) 22519 } else "name" === p || "{" === p || "&" === p ? c = !0 : "=" === p && h(f) 22520 } 22521 if (v = o.pop()) throw new Error('Unclosed section "' + v[1] + '" at ' + y.pos); 22522 return function(e) { 22523 for (var t, i = [], n = i, r = [], o = 0, a = e.length; o < a; ++o) switch ((t = e[o])[0]) { 22524 case "#": 22525 case "^": 22526 n.push(t), r.push(t), n = t[4] = []; 22527 break; 22528 case "/": 22529 r.pop()[5] = t[2], n = 0 < r.length ? r[r.length - 1][4] : i; 22530 break; 22531 default: 22532 n.push(t) 22533 } 22534 return i 22535 }(function(e) { 22536 for (var t, i, n = [], r = 0, o = e.length; r < o; ++r)(t = e[r]) && ("text" === t[0] && i && "text" === i[0] ? (i[1] += t[1], i[3] = t[3]) : (n.push(t), i = t)); 22537 return n 22538 }(a)) 22539 }(e, t)), n 22540 }, e.prototype.render = function(e, t, i) { 22541 var n = this.parse(e), 22542 r = t instanceof o ? t : new o(t); 22543 return this.renderTokens(n, r, i, e) 22544 }, e.prototype.renderTokens = function(e, t, i, n) { 22545 for (var r, o, a, s = "", l = 0, c = e.length; l < c;
22545 ++l) a = void 0, "#" === (o = (r = e[l])[0]) ? a = this.renderSection(r, t, i, n) : "^" === o ? a = this.renderInverted(r, t, i, n) : ">" === o ? a = this.renderPartial(r, t, i, n) : "&" === o ? a = this.unescapedValue(r, t) : "name" === o ? a = this.escapedValue(r, t) : "text" === o && (a = this.rawValue(r)), void 0 !== a && (s += a); 22546 return s 22547 }, e.prototype.renderSection = function(e, t, i, n) { 22548 var r = this, 22549 o = "", 22550 a = t.lookup(e[1]); 22551 if (a) { 22552 if (_(a)) 22553 for (var s = 0, l = a.length; s < l; ++s) o += this.renderTokens(e[4], t.push(a[s]), i, n); 22554 else if ("object" == typeof a || "string" == typeof a || "number" == typeof a) o += this.renderTokens(e[4], t.push(a), i, n); 22555 else if (c(a)) { 22556 if ("string" != typeof n) throw new Error("Cannot use higher-order sections without the original template"); 22557 null != (a = a.call(t.view, n.slice(e[3], e[5]), function(e) { 22558 return r.render(e, t, i) 22559 })) && (o += a) 22560 } else o += this.renderTokens(e[4], t, i, n); 22561 return o 22562 } 22563 }, e.prototype.renderInverted = function(e, t, i, n) { 22564 var r = t.lookup(e[1]); 22565 if (!r || _(r) && 0 === r.length) return this.renderTokens(e[4], t, i, n) 22566 }, e.prototype.renderPartial = function(e, t, i) { 22567 if (i) { 22568 var n = c(i) ? i(e[1]) : i[e[1]]; 22569 return null != n ? this.renderTokens(this.parse(n), t, i, n) : void 0 22570 } 22571 }, e.prototype.unescapedValue = function(e, t) { 22572 var i = t.lookup(e[1]); 22573 if (null != i) return i 22574 }, e.prototype.escapedValue = function(e, t) { 22575 var i = t.lookup(e[1]); 22576 if (null != i) return x.escape(i) 22577 }, e.prototype.rawValue = function(e) { 22578 return e[1] 22579 }, x.name = "mustache.js", x.version = "2.3.0", x.tags = ["{{", "}}"]; 22580 var a = new e; 22581 return x.clearCache = function() { 22582 return a.clearCache() 22583 }, x.parse = function(e, t) { 22584 return a.parse(e, t) 22585 }, x.render = function(e, t, i) { 22586 if ("string" != typeof e) throw new TypeError('Invalid template! Template should be a "string" but "' + (_(n = e) ? "array" : typeof n) + '" was given as the first argument for mustache#render(template, view, partials)'); 22587 var n; 22588 return a.render(e, t, i) 22589 }, x.to_html = function(e, t, i, n) { 22590 var r = x.render(e, t, i); 22591 if (!c(n)) return r; 22592 n(r) 22593 }, x.escape = function(e) { 22594 return String(e).replace(/[&<>"'`=\/]/g, function(e) { 22595 return i[e] 22596 }) 22597 }, x.Scanner = L, x.Context = o, x.Writer = e, x 22598 }), Pyxl.prototype.post = function(e, n) { 22599 $.ajax({ 22600 type: "POST", 22601 url: globals.urls.ajax, 22602 dataType: "json", 22603 data: e, 22604 success: function(e, t, i) { 22605 n(e, t, i) 22606 } 22607 }) 22608 }, Pyxl.prototype.load_animation = function(e, t, i, n) { 22609 n = void 0 === n; 22610 var r = { 22611 container: e[0], 22612 renderer: "svg", 22613 loop: n, 22614 autoplay: !1, 22615 path: i 22616 }, 22617 o = bodymovin.loadAnimation(r); 22618 return this.animations[t] = o 22619 }, Pyxl.prototype.hashCode = function(e) { 22620 var t, i = 0; 22621 if (0 === e.length) return i; 22622 for (t = 0; t < e.length; t++) i = (i << 5) - i + e.charCodeAt(t), i |= 0; 22623 return i 22624 }, Pyxl.prototype.isBlank = function(e) { 22625 return !e || /^\s*$/.test(e) 22626 }, Pyxl.prototype.stripSlashes = function(e) { 22627 return e.replace(/^\/|\/$/g, "") 22628 }, Pyxl.prototype.activateSmoothAnchors = function(e) { 22629 var n = this; 22630 if (void 0 === e) var t = 'a[href*="#"]'; 22631 else t = e + '[href*="#"]'; 22632 $("body").on("click", t, function(e) { 22633 var t = $(this); 22634 if (t.is('[href*="#/page"]') || t.is('[href="#"]') || t.is('[href="#0"]')) return null; 22635 if (location.pathname.replace(/^\//, "") == this.pathname.replace(/^\//, "") && location.hostname == this.hostname) { 22636 var i = $(this.hash); 22637 (i = i.length ? i : $("[name=" + this.hash.slice(1) + "]")).length && (e.preventDefault(), $("html, body").animate({ 22638 scrollTop: i.offset().top - n.smoothAnchorOffset 22639 }, n.smoothAnchorSpeed, function() { 22640 var e = $(i); 22641 if (e.focus(), e.is(":focus")) return !1; 22642 e.attr("tabindex", "-1"), e.focus() 22643 })) 22644 } 22645 }) 22646 }, Pyxl.prototype.getPosts = function(e, o, a) { 22647 if (1 === o && (this.router.pause(), this.router.navigate(this.params.root_page), this.router.resume()), globals._GET) { 22648 var n = globals._GET; 22649 this.filters = n, this.runChange = !1, Object.keys(n).map(function(e, t) { 22650 if(e == '__hstc' || e == '__hssc' || e == 'hsCtaTracking' ||e == 'utm_campaign') { 22651 window.location.href = window.location.origin + window.location.pathname 22652} 22653 if (e != "_gl") { 22654 for (var i = n[e].length - 1; 0 <= i; i--) { 22655 var f = $("[name=" + e + "]").get(0); 22656 22657 if (!f) { 22658 console.error("Missing field:", e, n[e]); 22659 continue; 22660 } 22661 22662 console.log($("[name=" + e + "]").get(0).nodeName); 22663 22664 if ("SELECT" == $("[name=" + e + "]").get(0).nodeName) { 22665 $("[name=" + e + "]").val(n[e][i]); 22666 } else { 22667 $("[name=" + e + "][value=" + n[e][i] + "]").prop("checked", !0); 22668 } 22669 } 22670 } 22671 }), globals._GET = null, this.runChange = !0 22672 } 22673 var t = { 22674 action: e, 22675 paged: o, 22676 base_url: $("#base_page").val() 22677 }; 22678 void 0 !== this.filters && this.filters && Object.keys(this.filters).length && (t.filters = this.filters, this.router.pause(), this.router.navigate(window.location.pathname + "?" + $.param(this.filters)), this.router.resume()); 22679 var s = this; 22680 if(this.filters != null){ 22681 this.filters["_gl"] = undefined; 22682 } 22683 this.post(t, function(e, t, i) { 22684 if (console.log('ajax filter response',e), e.data.posts.length) { 22685 e.data.processed_content = function() { 22686 return Foundation.MediaQuery.is("small only") ? this.content.substring(0, 100) + "..." : this.content 22687 }; 22688 var n = Mustache.render(s.item_template, e.data); 22689 if ($(".item-holder").html(n), a) { 22690 var r = Mustache.render(s.pagination_template, e.data); 22691 $(".pagination").html(r) 22692 } 22693 $(".pagination").find("li.number a").removeClass("active").eq(o - 1).addClass("active"), current_page = Math.abs(o) 22694 } else { 22695 $(".filter-menu .no-results").fadeIn(200).delay(2e3).fadeOut(200); 22696 e.data.processed_content = function() { 22697 return Foundation.MediaQuery.is("small only") ? this.content.substring(0, 100) + "..." : this.content 22698 }; 22699 var n = Mustache.render(s.item_template, e.data); 22700 if ($(".item-holder").html(n), a) { 22701 var r = Mustache.render(s.pagination_template, e.data); 22702 $(".pagination").html(r) 22703 } 22704 $(".pagination").find("li.number a").removeClass("active").eq(o - 1).addClass("active"), current_page = Math.abs(o) 22705 } 22706 }) 22707 }, Pyxl.prototype.setupRouting = function(e) { 22708 var t = this, 22709 i = { 22710 ":root_page": function(e) { 22711 t.params = e, globals.has_pagination && t.getPosts(t.action, 1, !0) 22712 }, 22713 ":root_page/page/:page": function(e) { 22714 t.params = e, t.getPosts(t.action, e.page, !0) 22715 } 22716 }; 22717 this.router = new Navigo(globals.urls.root, "hash" === e), this.router.on(i), this.router.resolve() 22718 }, Pyxl.prototype.cardSetup = function() { 22719 var a, s; 22720 $(".card-wrap").each(function() { 22721 var e = $(this), 22722 t = [e.width() / 2, e.height() / 2], 22723 i = e.offset(), 22724 n = e.find(".card"),
22725 r = e.find(".shadow"), 22726 o = e.closest(".cards-row"); 22727 1 === n.find("a").length && n.css("cursor", "pointer").click(function(e) { 22728 e.preventDefault(); 22729 var t = $(this).find("a").attr("href"); 22730 window.location.href = t 22731 }), o.hasClass("medium-up-2") || o.hasClass("medium-up-1") ? e.addClass("no-expand") : e.mousemove(function(e) { 22732 a = e.pageX - i.left, s = e.pageY - i.top, n.css("transform", "rotateX(" + (s - t[0]) / 50 * -1 + "deg) rotateY(" + (a - t[1]) / 50 + "deg)"), r.css("transform", "rotateX(" + (s - t[0]) / 25 * -1 + "deg) rotateY(" + (a - t[1]) / 25 + "deg) translateZ(-3em)") 22733 }).mouseout(function() { 22734 n.css("transform", "rotateX(0deg) rotateY(0deg)"), r.css("transform", "rotateX(0deg) rotateY(0deg) translateZ(-3em)") 22735 }) 22736 }) 22737 }, (pyxl = new Pyxl).smoothAnchorOffset = 150, pyxl.smoothAnchorSpeed = 300, pyxl.activateSmoothAnchors(), pyxl.setupRouting("history-api"), $(document).foundation(), $("body").on("click", ".scroll", function(e) { 22738 var t = $(this).closest("section").next().offset().top; 22739 $("body,html").animate({ 22740 scrollTop: t 22741 }, 300), $("body").addClass("nav-up").removeClass("nav-down") 22742 }), $(window).bind("mousewheel", function(e) { 22743 var t = e.originalEvent.wheelDelta; 22744 pyxl.currentDirection = 0 <= t ? "up" : "down" 22745 }), 22746 function(o) { 22747 o("body").on("click", "li.search form button", function(e) { 22748 var t = o(this).closest("form"); 22749 if (t.hasClass("open")) { 22750 var i = t.find("input").val(); 22751 if (!pyxl.isBlank(i)) return !0; 22752 e.preventDefault(), t.find("input").focus() 22753 } else e.preventDefault(), t.addClass("open").find("input").focus() 22754 }), o("body").on("click", function(e) { 22755 !o(e.target).closest(".searchform").length && o(".searchform").hasClass("open") && o(".searchform").removeClass("open") 22756 }); 22757 o(window).scroll(function() { 22758 var e = o(this).scrollTop(); 22759 o("header").hasClass("menu-open") || (50 < e ? "up" == pyxl.currentDirection ? o("body").addClass("nav-down").removeClass("nav-up") : o("body").addClass("nav-up scrolling").removeClass("nav-down") : o("body").addClass("nav-down").removeClass("nav-up scrolling")), e 22760 }).scroll(); 22761 var n = o("header").hasClass("white"); 22762 o(window).on("changed.zf.mediaquery", function(e, t, i) { 22763 n && ("small" == t ? o("header").removeClass("white") : o("header").addClass("white")) 22764 }), n && (Foundation.MediaQuery.is("small only") ? o("header").removeClass("white") : o("header").addClass("white")), o("body").on("click", ".menu-toggle", function(e) { 22765 e.preventDefault(), o("header").toggleClass("menu-open") 22766 }), o("body").on("click", ".mega-menu > a", function(e) { 22767 if (o("header").hasClass("menu-open")) { 22768 var t = o(this), 22769 i = t.closest("li"), 22770 n = t.siblings("ul"), 22771 r = t.text(); 22772 i.addClass("dropdown-open"), n.find(".title").length < 1 && n.prepend('<li class="title"><h3>' + r + '</h3><a href="#" class="close">Back</a></li>') 22773 } 22774 }), o("body").on("click", ".mega-menu .close", function(e) { 22775 o("header").hasClass("menu-open") && o(this).closest(".dropdown-open").removeClass("dropdown-open") 22776 }), o("body").on("click", ".mega-menu > ul > li > a:not(.close)", function(e) { 22777 o("header").hasClass("menu-open") && o(this).closest("li").toggleClass("dropdown-open") 22778 }) 22779 }(jQuery), 22780 function(n) { 22781 n(document).ready(function() { 22782 (n(".logo-slider").length && n(".logo-slider").slick({ 22783 infinite: !0, 22784 slidesToShow: 3, 22785 slidesToScroll: 3, 22786 dots: !0, 22787 arrows: !1, 22788 responsive: [{ 22789 breakpoint: 600, 22790 settings: { 22791 slidesToShow: 1, 22792 slidesToScroll: 1 22793 } 22794 }] 22795 }), n(".featured-posts").length) && (n(window).width() < 1024 && n(".featured-posts .cards-row").slick({ 22796 infinite: !0, 22797 slidesToShow: 1, 22798 slidesToScroll: 1, 22799 dots: !1, 22800 arrows: !1, 22801 centerMode: !0, 22802 centerPadding: "30px", 22803 infinite: !1 22804 }));
22805 if (n(".tabbed-slider-content").length && (n(".tabbed-slider-content").each(function() { 22806 var e = n(this); 22807 e.slick(get_options(e.closest(".tabs-panel"))) 22808 }), n("body").on("change.zf.tabs", ".tabbed-slider", function(e, t, i) { 22809 n(i).find(".tabbed-slider-content").slick("unslick"), n(i).find(".tabbed-slider-content").slick(get_options(i)) 22810 })), n(".card-wrap").length && !n("body").hasClass("single-resources")) 22811 if (n(".large-form").length || n(".download-form").length) var e = setInterval(function() { 22812 console.log("interval running"), formRendered && (pyxl.cardSetup(), clearInterval(e)) 22813 }, 10); 22814 else pyxl.cardSetup() 22815 }) 22816 }(jQuery), 22817 function(o) { 22818 o(document).ready(function() { 22819 if (o(".item-holder").length) { 22820 var r = o(".item-holder").data("action"); 22821 o(".filter-menu input").on("keydown", function(e){ 22822 if(e.keyCode === 13){ 22823 e.preventDefault(); 22824 return false; 22825 } 22826 }) 22827 o(".filter-menu input").keyup(_.debounce(function(e){ 22828 if (pyxl.runChange) { 22829 var n = getAllFiltersForPosts(e); 22830 console.log('method filters', n),Object.keys(n).length ? pyxl.filters = n : pyxl.filters = null, console.log('current pyxl filters', pyxl.filters), pyxl.getPosts(r, 1, !0) 22831 } 22832 }, 300)), 22833 o("body").on("change", ".filter-menu input, .filter-menu select", function(e) { 22834 if (pyxl.runChange) { 22835 var n = getAllFiltersForPosts(e); 22836 console.log('method filters', n),Object.keys(n).length ? pyxl.filters = n : pyxl.filters = null, console.log('current pyxl filters', pyxl.filters), pyxl.getPosts(r, 1, !0) 22837 } 22838 }), o("body").on("click", ".filter-menu button[type=reset]", function() { 22839 pyxl.filters = null, pyxl.getPosts(r, 1, !0) 22840 }), o(".pagination").length && o("body").on("click", ".pagination li.number a", function(e) { 22841 e.preventDefault(), pyxl.router.navigate(o(this)[0].pathname) 22842 }) 22843 } 22844 if (o("#resource-content-template").length) { 22845 var e = void 0 !== Cookies.get("form_submitted_" + globals.post_id); 22846 pyxl.post({ 22847 action: "get_resource_content", 22848 id: globals.post_id, 22849 bypass_gate: e 22850 }, function(e, t, i) { 22851 var n = e.data; 22852 if (console.log(n), n.is_gated) { 22853 var r = o("#resource-gate-template").html(); 22854 resource_rendered = Mustache.render(r, n), o(".content-holder").html(resource_rendered), hbspt.forms.create({ 22855 css: "", 22856 portalId: hubspot_portal_id, 22857 formId: n.form_id, 22858 target: ".hs-form-container", 22859 inlineMessage: n.inline_message, 22860 onFormSubmit: function(e) { 22861 Cookies.set("form_submitted_" + globals.post_id, n.url, { 22862 expires: 7 22863 }), setTimeout(function() { 22864 pyxl.post({ 22865 action: "get_resource_content", 22866 id: globals.post_id, 22867 bypass_gate: !0 22868 }, function(e, t, i) { 22869 var n = e.data, 22870 r = o("#resource-content-template").html(); 22871 resource_rendered = Mustache.render(r, n), o(".content-holder").html(resource_rendered) 22872 }) 22873 }, 3e3) 22874 }, 22875 onFormReady: function() { 22876 o(".card-wrap").length && pyxl.cardSetup() 22877 } 22878 }) 22879 } else { 22880 r = o("#resource-content-template").html(); 22881 resource_rendered = Mustache.render(r, n), o(".content-holder").html(resource_rendered), o(".card-wrap").length && pyxl.cardSetup() 22882 } 22883 }) 22884 } 22885 if (o(".filter-toggle").length && o(".filter-toggle").
22885click(function(e) { 22886 e.preventDefault(); 22887 var t = o(this), 22888 i = t.closest(".courses").length ? o(".filter-menu") : t.closest("form"); 22889 i.toggleClass("open"), i.hasClass("open") ? t.find(".show-text").text("Hide") : t.find(".show-text").text("Show") 22890 }), o(".comments-toggle").length && o(".comments-toggle").click(function(e) { 22891 e.preventDefault(); 22892 var t = o(this), 22893 i = o(".comments-area"); 22894 i.toggleClass("open"), i.hasClass("open") ? t.find(".show-text").text("Hide") : t.find(".show-text").text("Show") 22895 }), o(".collapse-course-content").length && o(".collapse-course-content").click(function(e) { 22896 e.preventDefault(); 22897 var t = o(this), 22898 i = o(".standard-header"); 22899 i.toggleClass("collapse"), i.hasClass("collapse") ? t.addClass("collapsed").find(".show-text").text("Expand") : t.removeClass("collapsed").find(".show-text").text("Collapse") 22900 }), o(".subpages").length && (Foundation.MediaQuery.is("small only") ? o(".subpages li a").click(function(e) { 22901 var t = o(this), 22902 i = o(".subpages"); 22903 i.hasClass("open") ? t.hasClass("close") && i.removeClass("open") : (e.preventDefault(), i.addClass("open")) 22904 }) : o(".subpages").stick_in_parent({ 22905 offset_top: 150 22906 })), o(".post-container").length) { 22907 var t = /youtube.com/; 22908 o(".post-container iframe").each(function() { 22909 -1 != o(this)[0].src.search(t) && o(this).wrap('<div class="video-ctnr" />') 22910 }) 22911 } 22912 }) 22913 }(jQuery), 22914 function(p) { 22915 p(document).ready(function() { 22916 if (p(".home-hero, .wave-header").length) { 22917 for (var e, t, i, n = p(".home-hero, .wave-header").innerWidth(), r = p(".home-hero, .wave-header").innerHeight(), o = new THREE.Scene, a = new THREE.PerspectiveCamera(80, p(".home-hero, .wave-header").innerWidth() / (.5 * p(".home-hero, .wave-header").innerWidth()), .1, 1e3), s = new THREE.WebGLRenderer({ 22918 alpha: !0 22919 }), l = new THREE.PointsMaterial({ 22920 map: function(e, t) { 22921 var i = document.createElement("canvas"); 22922 i.width = i.height = t; 22923 var n = i.getContext("2d"), 22924 r = new THREE.Texture(i), 22925 o = t / 2; 22926 return n.beginPath(), n.arc(o, o, t / 2, 0, 2 * Math.PI, !1), n.closePath(), n.fillStyle = e, n.fill(), r.needsUpdate = !0, r 22927 }("#646b6e", 60) 22928 }), c = new THREE.Geometry, u = 0; u < 1e3; u++) e = 800 * Math.random() - 400, t = 800 * Math.random() - 400, i = 800 * Math.random() - 400, c.vertices.push(new THREE.Vector3(e, t, i)); 22929 var h = new THREE.Points(c, l); 22930 o.add(h), s.setSize(n, r), p("body").mousemove(function(e) { 22931 var t = [p(window).width() / 2, p(window).height() / 2]; 22932 e.originalEvent.clientX - t[0], e.originalEvent.clientY - t[1] 22933 }), p(".home-hero, .wave-header").append(p(s.domElement).addClass("particles")), a.position.z = 50, s.setSize(p(".home-hero, .wave-header").innerWidth(), p(".home-hero, .wave-header").innerHeight()); 22934 var d = function() { 22935 o.rotation.x += 2e-4, o.rotation.z += 2e-4, o.rotation.y += 2e-4, s.render(o, a), requestAnimationFrame(d) 22936 }; 22937 d() 22938 } 22939 }) 22940 }(jQuery);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.