vendor: 18,672 bytes, line 1
1!function(e,t){"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(T,e){var t=[],E=T.document,u=t.slice,m=t.concat,s=t.push,r=t.indexOf,i={},n=i.toString,f=i.hasOwnProperty,g={},o="2.2.4",S=function(e,t){return new S.fn.init(e,t)},a=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,l=/^-ms-/,c=/-([\da-z])/gi,h=function(e,t){return t.toUpperCase()};function d(e){var t=!!e&&"length"in e&&e.length,i=S.type(e);return"function"!==i&&!S.isWindow(e)&&("array"===i||0===t||"number"==typeof t&&0<t&&t-1 in e)}S.fn=S.prototype={jquery:o,constructor:S,selector:"",length:0,toArray:function(){return u.call(this)},get:function(e){return null!=e?e<0?this[e+this.length]:this[e]:u.call(this)},pushStack:function(e){var t=S.merge(this.constructor(),e);return t.prevObject=this,t.context=this.context,t},each:function(e){return S.each(this,e)},map:function(i){return this.pushStack(S.map(this,function(e,t){return i.call(e,t,e)}))},slice:function(){return this.pushStack(u.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,i=+e+(e<0?t:0);return this.pushStack(0<=i&&i<t?[this[i]]:[])},end:function(){return this.prevObject||this.constructor()},push:s,sort:t.sort,splice:t.splice},S.extend=S.fn.extend=function(){var e,t,i,n,r,o,a=arguments[0]||{},s=1,l=arguments.length,c=!1;for("boolean"==typeof a&&(c=a,a=arguments[s]||{},s++),"object"==typeof a||S.isFunction(a)||(a={}),s===l&&(a=this,s--);s<l;s++)if(null!=(e=arguments[s]))for(t in e)i=a[t],a!==(n=e[t])&&(c&&n&&(S.isPlainObject(n)||(r=S.isArray(n)))?(r?(r=!1,o=i&&S.isArray(i)?i:[]):o=i&&S.isPlainObject(i)?i:{},a[t]=S.extend(c,o,n)):void 0!==n&&(a[t]=n));return a},S.extend({expando:"jQuery"+(o+Math.random()).replace(/\D/g,""),isReady:!0,error:function(e){throw new Error(e)},noop:function(){},isFunction:function(e){return"function"===S.type(e)},isArray:Array.isArray,isWindow:function(e){return null!=e&&e===e.window},isNumeric:function(e){var t=e&&e.toString();return!S.isArray(e)&&0<=t-parseFloat(t)+1},isPlainObject:function(e){var t;if("object"!==S.type(e)||e.nodeType||S.isWindow(e))return!1;if(e.constructor&&!f.call(e,"constructor")&&!f.call(e.constructor.prototype||{},"isPrototypeOf"))return!1;for(t in e);return void 0===t||f.call(e,t)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},type:function(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?i[n.call(e)]||"object":typeof e},globalEval:function(e){var t,i=eval;(e=S.trim(e))&&(1===e.indexOf("use strict")?((t=E.createElement("script")).text=e,E.head.appendChild(t).parentNode.removeChild(t)):i(e))},camelCase:function(e){return e.replace(l,"ms-").replace(c,h)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,t){var i,n=0;if(d(e))for(i=e.length;n<i&&!1!==t.call(e[n],n,e[n]);n++);else for(n in e)if(!1===t.call(e[n],n,e[n]))break;return e},trim:function(e){return null==e?"":(e+"").replace(a,"")},makeArray:function(e,t){var i=t||[];return null!=e&&(d(Object(e))?S.merge(i,"string"==typeof e?[e]:e):s.call(i,e)),i},inArray:function(e,t,i){return null==t?-1:r.call(t,e,i)},merge:function(e,t){for(var i=+t.length,n=0,r=e.length;n<i;n++)e[r++]=t[n];return e.length=r,e},grep:function(e,t,i){for(var n=[],r=0,o=e.length,a=!i;r<o;r++)!t(e[r],r)!==a&&n.push(e[r]);return n},map:function(e,t,i){var n,r,o=0,a=[];if(d(e))for(n=e.length;o<n;o++)null!=(r=t(e[o],o,i))&&a.push(r);else for(o in e)null!=(r=t(e[o],o,i))&&a.push(r);return m.apply([],a)},guid:1,proxy:function(e,t){var i,n,r;return"string"==typeof t&&(i=e[t],t=e,e=i),S.isFunction(e)?(n=u.call(arguments,2),(r=function(){return e.apply(t||this,n.concat(u.call(arguments)))}).guid=e.guid=e.guid||S.guid++,r):void 0},now:Date.now,support:g}),"function"==typeof Symbol&&(S.fn[Symbol.iterator]=t[Symbol.iterator]),S.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(e,t){i["[object "+t+"]"]=t.toLowerCase()});var p=function(i){var e,f,b,o,r,m,h,g,w,l,c,_,T,a,E,v,s,u,y,S="sizzle"+1*new Date,x=i.document,M=0,n=0,d=oe(),p=oe(),A=oe(),C=function(e,t){return e===t&&(c=!0),0},L=1<<31,R={}.hasOwnProperty,t=[],P=t.pop,k=t.push,N=t.push,D=t.slice,O=function(e,t){for(var i=0,n=e.length;i<n;i++)if(e[i]===t)return i;return-1},I="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",U="[\\x20\\t\\r\\n\\f]",z="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",H="\\["+U+"*("+z+")(?:"+U+"*([*^$|!~]?=)"+U+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+z+"))|)"+U+"*\\]",F=":("+z+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+H+")*)|.*)\\)|)",B=new RegExp(U+"+","g"),G=new RegExp("^"+U+"+|((?:^|[^\\\\])(?:\\\\.)*)"+U+"+$","g"),j=new RegExp("^"+U+"*,"+U+"*"),V=new RegExp("^"+U+"*([>+~]|"+U+")"+U+"*"),W=new RegExp("="+U+"*([^\\]'\"]*?)"+U+"*\\]","g"),$=new RegExp(F),q=new RegExp("^"+z+"$"),X={ID:new RegExp("^#("+z+")"),CLASS:new RegExp("^\\.("+z+")"),TAG:new RegExp("^("+z+"|[*])"),ATTR:new RegExp("^"+H),PSEUDO:new RegExp("^"+F),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+U+"*(even|odd|(([+-]|)(\\d*)n|)"+U+"*(?:([+-]|)"+U+"*(\\d+)|))"+U+"*\\)|)","i"),bool:new RegExp("^(?:"+I+")$","i"),needsContext:new RegExp("^"+U+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+U+"*((?:-\\d)?\\d*)"+U+"*\\)|)(?=[^-]|$)","i")},Y=/^(?:input|select|textarea|button)$/i,J=/^h\d$/i,Z=/^[^{]+\{\s*\[native \w/,Q=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,K=/[+~]/,ee=/'|\\/g,te=new RegExp("\\\\([\\da-f]{1,6}"+U+"?|("+U+")|.)","ig"),ie=function(e,t,i){var n="0x"+t-65536;return n!=n||i?t:n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320)},ne=function(){_()};try{N.apply(t=D.call(x.childNodes),x.childNodes),t[x.childNodes.length].nodeType}catch(e){N={apply:t.length?function(e,t){k.apply(e,D.call(t))}:function(e,t){for(var i=e.length,n=0;e[i++]=t[n++];);e.length=i-1}}}function re(e,t,i,n){var r,o,a,s,l,c,u,h,d=t&&t.ownerDocument,p=t?t.nodeType:9;if(i=i||[],"string"!=typeof e||!e||1!==p&&9!==p&&11!==p)return i;if(!n&&((t?t.ownerDocument||t:x)!==T&&_(t),t=t||T,E)){if(11!==p&&(c=Q.exec(e)))if(r=c[1]){if(9===p){if(!(a=t.getElementById(r)))return i;if(a.id===r)return i.push(a),i}else if(d&&(a=d.getElementById(r))&&y(t,a)&&a.id===r)return i.push(a),i}else{if(c[2])return N.apply(i,t.getElementsByTagName(e)),i;if((r=c[3])&&f.getElementsByClassName&&t.getElementsByClassName)return N.apply(i,t.getElementsByClassName(r)),i}if(f.qsa&&!A[e+" "]&&(!v||!v.test(e))){if(1!==p)d=t,h=e;else if("object"!==t.nodeName.toLowerCase()){for((s=t.getAttribute("id"))?s=s.replace(ee,"\\$&"):t.setAttribute("id",s=S),o=(u=m(e)).length,l=q.test(s)?"#"+s:"[id='"+s+"']";o--;)u[o]=l+" "+me(u[o]);h=u.join(","),d=K.test(e)&&pe(t.parentNode)||t}if(h)try{return N.apply(i,d.querySelectorAll(h)),i}catch(e){}finally{s===S&&t.removeAttribute("id")}}}return g(e.replace(G,"$1"),t,i,n)}function oe(){var n=[];return function e(t,i){return n.push(t+" ")>b.cacheLength&&delete e[n.shift()],e[t+" "]=i}}function ae(e){return e[S]=!0,e}function se(e){var t=T.createElement("div");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function le(e,t){for(var i=e.split("|"),n=i.length;n--;)b.attrHandle[i[n]]=t}function ce(e,t){var i=t&&e,n=i&&1===e.nodeType&&1===t.nodeType&&(~t.sourceIndex||L)-(~e.sourceIndex||L);if(n)return n;if(i)for(;i=i.nextSibling;)if(i===t)return-1;return e?1:-1}function ue(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function he(i){return function(e){var t=e.nodeName.toLowerCase();return("input"===t||"button"===t)&&e.type===i}}function de(a){return ae(function(o){return o=+o,ae(function(e,t){for(var i,n=a([],e.length,o),r=n.length;r--;)e[i=n[r]]&&(e[i]=!(t[i]=e[i]))})})}function pe(e){return e&&void 0!==e.getElementsByTagName&&e}for(e in f=re.support={},r=re.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return!!t&&"HTML"!==t.nodeName},_=re.setDocument=function(e){var t,i,n=e?e.ownerDocument||e:x;return n!==T&&9===n.nodeType&&n.documentElement&&(a=(T=n).documentElement,E=!r(T),(i=T.defaultView)&&i.top!==i&&(i.addEventListener?i.addEventListener("unload",ne,!1):i.attachEvent&&i.attachEvent("onunload",ne)),f.attributes=se(function(e){return e.className="i",!e.getAttribute("className")}),f.getElementsByTagName=se(function(e){return e.appendChild(T.createComment("")),!e.getElementsByTagName("*").length}),f.getElementsByClassName=Z.test(T.getElementsByClassName),f.getById=se(function(e){return a.appendChild(e).id=S,!T.getElementsByName||!T.getElementsByName(S).length}),f.getById?(b.find.ID=function(e,t){if(void 0!==t.getElementById&&E){var i=t.getElementById(e);return i?[i]:[]}},b.filter.ID=function(e){var t=e.replace(te,ie);return function(e){return e.getAttribute("id")===t}}):(delete b.find.ID,b.filter.ID=function(e){var i=e.replace(te,ie);return function(e){var t=void 0!==e.getAttributeNode&&e.getAttributeNode("id");return t&&t.value===i}}),b.find.TAG=f.getElementsByTagName?function(e,t){return void 0!==t.getElementsByTagName?t.getElementsByTagName(e):f.qsa?t.querySelectorAll(e):void 0}:function(e,t){var i,n=[],r=0,o=t.getElementsByTagName(e);if("*"===e){for(;i=o[r++];)1===i.nodeType&&n.push(i);return n}return o},b.find.CLASS=f.getElementsByClassName&&function(e,t){return void 0!==t.getElementsByClassName&&E?t.getElementsByClassName(e):void 0},s=[],v=[],(f.qsa=Z.test(T.querySelectorAll))&&(se(function(e){a.appendChild(e).innerHTML="<a id='"+S+"'></a><select id='"+S+"-\r\\' msallowcapture=''><option selected=''></option></select>",e.querySelectorAll("[msallowcapture^='']").length&&v.push("[*^$]="+U+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||v.push("\\["+U+"*(?:value|"+I+")"),e.querySelectorAll("[id~="+S+"-]").length||v.push("~="),e.querySelectorAll(":checked").length||v.push(":checked"),e.querySelectorAll("a#"+S+"+*").length||v.push(".#.+[+~]")}),se(function(e){var t=T.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&v.push("name"+U+"*[*^$|!~]?="),e.querySelectorAll(":enabled").length||v.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),v.push(",.*:")})),(f.matchesSelector=Z.test(u=a.matches||a.webkitMatchesSelector||a.mozMatchesSelector||a.oMatchesSelector||a.msMatchesSelector))&&se(function(e){f.disconnectedMatch=u.call(e,"div"),u.call(e,"[s!='']:x"),s.push("!=",F)}),v=v.length&&new RegExp(v.join("|")),s=s.length&&new RegExp(s.join("|")),t=Z.test(a.compareDocumentPosition),y=t||Z.test(a.contains)?function(e,t){var i=9===e.nodeType?e.documentElement:e,n=t&&t.parentNode;return e===n||!(!n||1!==n.nodeType||!(i.contains?i.contains(n):e.compareDocumentPosition&&16&e.compareDocumentPosition(n)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},C=t?function(e,t){if(e===t)return c=!0,0;var i=!e.compareDocumentPosition-!t.compareDocumentPosition;return i||(1&(i=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!f.sortDetached&&t.compareDocumentPosition(e)===i?e===T||e.ownerDocument===x&&y(x,e)?-1:t===T||t.ownerDocument===x&&y(x,t)?1:l?O(l,e)-O(l,t):0:4&i?-1:1)}:function(e,t){if(e===t)return c=!0,0;var i,n=0,r=e.parentNode,o=t.parentNode,a=[e],s=[t];if(!r||!o)return e===T?-1:t===T?1:r?-1:o?1:l?O(l,e)-O(l,t):0;if(r===o)return ce(e,t);for(i=e;i=i.parentNode;)a.unshift(i);for(i=t;i=i.parentNode;)s.unshift(i);for(;a[n]===s[n];)n++;return n?ce(a[n],s[n]):a[n]===x?-1:s[n]===x?1:0}),T},re.matches=function(e,t){return re(e,null,null,t)},re.matchesSelector=function(e,t){if((e.ownerDocument||e)!==T&&_(e),t=t.replace(W,"='$1']"),f.matchesSelector&&E&&!A[t+" "]&&(!s||!s.test(t))&&(!v||!v.test(t)))try{var i=u.call(e,t);if(i||f.disconnectedMatch||e.document&&11!==e.document.nodeType)return i}catch(e){}return 0<re(t,T,null,[e]).length},re.contains=function(e,t){return(e.ownerDocument||e)!==T&&_(e),y(e,t)},re.attr=function(e,t){(e.ownerDocument||e)!==T&&_(e);var i=b.attrHandle[t.toLowerCase()],n=i&&R.call(b.attrHandle,t.toLowerCase())?i(e,t,!E):void 0;return void 0!==n?n:f.attributes||!E?e.getAttribute(t):(n=e.getAttributeNode(t))&&n.specified?n.value:null},re.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},re.uniqueSort=function(e){var t,i=[],n=0,r=0;if(c=!f.detectDuplicates,l=!f.sortStable&&e.slice(0),e.sort(C),c){for(;t=e[r++];)t===e[r]&&(n=i.push(r));for(;n--;)e.splice(i[n],1)}return l=null,e},o=re.getText=function(e){var t,i="",n=0,r=e.nodeType;if(r){if(1===r||9===r||11===r){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)i+=o(e)}else if(3===r||4===r)return e.nodeValue}else for(;t=e[n++];)i+=o(t);return i},(b=re.selectors={cacheLength:50,createPseudo:ae,match:X,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(te,ie),e[3]=(e[3]||e[4]||e[5]||"").replace(te,ie),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||re.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]&&re.error(e[0]),e},PSEUDO:function(e){var t,i=!e[6]&&e[2];return X.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":i&&$.test(i)&&(t=m(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))}},filter:{TAG:function(e){var t=e.replace(te,ie).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=d[e+" "];return t||(t=new RegExp("(^|"+U+")"+e+"("+U+"|$)"))&&d(e,function(e){return t.test("string"==typeof e.className&&e.className||void 0!==e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(i,n,r){return function(e){var t=re.attr(e,i);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+"-"))}},CHILD:function(f,e,t,m,g){var v="nth"!==f.slice(0,3),y="last"!==f.slice(-4),x="of-type"===e;return 1===m&&0===g?function(e){return!!e.parentNode}:function(e,t,i){var n,r,o,a,s,l,c=v!==y?"nextSibling":"previousSibling",u=e.parentNode,h=x&&e.nodeName.toLowerCase(),d=!i&&!x,p=!1;if(u){if(v){for(;c;){for(a=e;a=a[c];)if(x?a.nodeName.toLowerCase()===h:1===a.nodeType)return!1;l=c="only"===f&&!l&&"nextSibling"}return!0}if(l=[y?u.firstChild:u.lastChild],y&&d){for(p=(s=(n=(r=(o=(a=u)[S]||(a[S]={}))[a.uniqueID]||(o[a.uniqueID]={}))[f]||[])[0]===M&&n[1])&&n[2],a=s&&u.childNodes[s];a=++s&&a&&a[c]||(p=s=0)||l.pop();)if(1===a.nodeType&&++p&&a===e){r[f]=[M,s,p];break}}else if(d&&(p=s=(n=(r=(o=(a=e)[S]||(a[S]={}))[a.uniqueID]||(o[a.uniqueID]={}))[f]||[])[0]===M&&n[1]),!1===p)for(;(a=++s&&a&&a[c]||(p=s=0)||l.pop())&&((x?a.nodeName.toLowerCase()!==h:1!==a.nodeType)||!++p||(d&&((r=(o=a[S]||(a[S]={}))[a.uniqueID]||(o[a.uniqueID]={}))[f]=[M,p]),a!==e)););return(p-=g)===m||p%m==0&&0<=p/m}}},PSEUDO:function(e,o){var t,a=b.pseudos[e]||b.setFilters[e.toLowerCase()]||re.error("unsupported pseudo: "+e);return a[S]?a(o):1<a.length?(t=[e,e,"",o],b.setFilters.hasOwnProperty(e.toLowerCase())?ae(function(e,t){for(var i,n=a(e,o),r=n.length;r--;)e[i=O(e,n[r])]=!(t[i]=n[r])}):function(e){return a(e,0,t)}):a}},pseudos:{not:ae(function(e){var n=[],r=[],s=h(e.replace(G,"$1"));return s[S]?ae(function(e,t,i,n){for(var r,o=s(e,null,n,[]),a=e.length;a--;)(r=o[a])&&(e[a]=!(t[a]=r))}):function(e,t,i){return n[0]=e,s(n,null,i,r),n[0]=null,!r.pop()}}),has:ae(function(t){return function(e){return 0<re(t,e).length}}),contains:ae(function(t){return t=t.replace(te,ie),function(e){return-1<(e.textContent||e.innerText||o(e)).indexOf(t)}}),lang:ae(function(i){return q.test(i||"")||re.error("unsupported lang: "+i),i=i.replace(te,ie).toLowerCase(),function(e){var t;do{if(t=E?e.lang:e.getAttribute("xml:lang")||e.getAttribute("lang"))return(t=t.toLowerCase())===i||0===t.indexOf(i+"-")}while((e=e.parentNode)&&1===e.nodeType);return!1}}),target:function(e){var t=i.location&&i.location.hash;return t&&t.slice(1)===e.id},root:function(e){return e===a},focus:function(e){return e===T.activeElement&&(!T.hasFocus||T.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:function(e){return!1===e.disabled},disabled:function(e){return!0===e.disabled},checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!b.pseudos.empty(e)},header:function(e){return J.test(e.nodeName)},input:function(e){return Y.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:de(function(){return[0]}),last:de(function(e,t){return[t-1]}),eq:de(function(e,t,i){return[i<0?i+t:i]}),even:de(function(e,t){for(var i=0;i<t;i+=2)e.push(i);return e}),odd:de(function(e,t){for(var i=1;i<t;i+=2)e.push(i);return e}),lt:de(function(e,t,i){for(var n=i<0?i+t:i;0<=--n;)e.push(n);return e}),gt:de(function(e,t,i){for(var n=i<0?i+t:i;++n<t;)e.push(n);return e})}}).pseudos.nth=b.pseudos.eq,{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})b.pseudos[e]=ue(e);for(e in{submit:!0,reset:!0})b.pseudos[e]=he(e);function fe(){}function me(e){for(var t=0,i=e.length,n="";t<i;t++)n+=e[t].value;return n}function ge(s,e,t){var l=e.dir,c=t&&"parentNode"===l,u=n++;return e.first?function(e,t,i){for(;e=e[l];)if(1===e.nodeType||c)return s(e,t,i)}:function(e,t,i){var n,r,o,a=[M,u];if(i){for(;e=e[l];)if((1===e.nodeType||c)&&s(e,t,i))return!0}else for(;e=e[l];)if(1===e.nodeType||c){if((n=(r=(o=e[S]||(e[S]={}))[e.uniqueID]||(o[e.uniqueID]={}))[l])&&n[0]===M&&n[1]===u)return a[2]=n[2];if((r[l]=a)[2]=s(e,t,i))return!0}}}function ve(r){return 1<r.length?function(e,t,i){for(var n=r.length;n--;)if(!r[n](e,t,i))return!1;return!0}:r[0]}function ye(e,t,i,n,r){for(var o,a=[],s=0,l=e.length,c=null!=t;s<l;
vendor: 2,327 bytes, line 1
1s++)(o=e[s])&&(i&&!i(o,n,r)||(a.push(o),c&&t.push(s)));return a}function xe(p,f,m,g,v,e){return g&&!g[S]&&(g=xe(g)),v&&!v[S]&&(v=xe(v,e)),ae(function(e,t,i,n){var r,o,a,s=[],l=[],c=t.length,u=e||function(e,t,i){for(var n=0,r=t.length;n<r;n++)re(e,t[n],i);return i}(f||"*",i.nodeType?[i]:i,[]),h=!p||!e&&f?u:ye(u,s,p,i,n),d=m?v||(e?p:c||g)?[]:t:h;if(m&&m(h,d,i,n),g)for(r=ye(d,l),g(r,[],i,n),o=r.length;o--;)(a=r[o])&&(d[l[o]]=!(h[l[o]]=a));if(e){if(v||p){if(v){for(r=[],o=d.length;o--;)(a=d[o])&&r.push(h[o]=a);v(null,d=[],r,n)}for(o=d.length;o--;)(a=d[o])&&-1<(r=v?O(e,a):s[o])&&(e[r]=!(t[r]=a))}}else d=ye(d===t?d.splice(c,d.length):d),v?v(null,t,d,n):N.apply(t,d)})}function be(e){for(var r,t,i,n=e.length,o=b.relative[e[0].type],a=o||b.relative[" "],s=o?1:0,l=ge(function(e){return e===r},a,!0),c=ge(function(e){return-1<O(r,e)},a,!0),u=[function(e,t,i){var n=!o&&(i||t!==w)||((r=t).nodeType?l(e,t,i):c(e,t,i));return r=null,n}];s<n;s++)if(t=b.relative[e[s].type])u=[ge(ve(u),t)];else{if((t=b.filter[e[s].type].apply(null,e[s].matches))[S]){for(i=++s;i<n&&!b.relative[e[i].type];i++);return xe(1<s&&ve(u),1<s&&me(e.slice(0,s-1).concat({value:" "===e[s-2].type?"*":""})).replace(G,"$1"),t,s<i&&be(e.slice(s,i)),i<n&&be(e=e.slice(i)),i<n&&me(e))}u.push(t)}return ve(u)}return fe.prototype=b.filters=b.pseudos,b.setFilters=new fe,m=re.tokenize=function(e,t){var i,n,r,o,a,s,l,c=p[e+" "];if(c)return t?0:c.slice(0);for(a=e,s=[],l=b.preFilter;a;){for(o in i&&!(n=j.exec(a))||(n&&(a=a.slice(n[0].length)||a),s.push(r=[])),i=!1,(n=V.exec(a))&&(i=n.shift(),r.push({value:i,type:n[0].replace(G," ")}),a=a.slice(i.length)),b.filter)!(n=X[o].exec(a))||l[o]&&!(n=l[o](n))||(i=n.shift(),r.push({value:i,type:o,matches:n}),a=a.slice(i.length));if(!i)break}return t?a.length:a?re.error(e):p(e,s).slice(0)},h=re.compile=function(e,t){var i,g,v,y,x,n,r=[],o=[],a=A[e+" "];if(!a){for(t||(t=m(e)),i=t.length;i--;)(a=be(t[i]))[S]?r.push(a):o.push(a);(a=A(e,(g=o,y=0<(v=r).length,x=0<g.length,n=function(e,t,i,n,r){var o,a,s,l=0,c="0",u=e&&[],h=[],d=w,p=e||x&&b.find.TAG("*",r),f=M+=null==d?1:Math.random()||.1,m=p.length;for(r&&(w=t===T||t||r);c!==m&&null!=(o=p[c]);c++){if(x&&o){for(a=0,t||o.ownerDocument===T||(_(o),i=!E);s=g[a++];)if(s(o,t||T,i)){n.push(o);break}r&&(M=f)}y&&((o=!s&&o)&&l--,e&&u.push(o))}if(l+=c,y&&c!==l){for(a=0;s=v[a++];
vendor: 61,395 bytes, line 1
1)s(u,h,t,i);if(e){if(0<l)for(;c--;)u[c]||h[c]||(h[c]=P.call(n));h=ye(h)}N.apply(n,h),r&&!e&&0<h.length&&1<l+v.length&&re.uniqueSort(n)}return r&&(M=f,w=d),u},y?ae(n):n))).selector=e}return a},g=re.select=function(e,t,i,n){var r,o,a,s,l,c="function"==typeof e&&e,u=!n&&m(e=c.selector||e);if(i=i||[],1===u.length){if(2<(o=u[0]=u[0].slice(0)).length&&"ID"===(a=o[0]).type&&f.getById&&9===t.nodeType&&E&&b.relative[o[1].type]){if(!(t=(b.find.ID(a.matches[0].replace(te,ie),t)||[])[0]))return i;c&&(t=t.parentNode),e=e.slice(o.shift().value.length)}for(r=X.needsContext.test(e)?0:o.length;r--&&(a=o[r],!b.relative[s=a.type]);)if((l=b.find[s])&&(n=l(a.matches[0].replace(te,ie),K.test(o[0].type)&&pe(t.parentNode)||t))){if(o.splice(r,1),!(e=n.length&&me(o)))return N.apply(i,n),i;break}}return(c||h(e,u))(n,t,!E,i,!t||K.test(e)&&pe(t.parentNode)||t),i},f.sortStable=S.split("").sort(C).join("")===S,f.detectDuplicates=!!c,_(),f.sortDetached=se(function(e){return 1&e.compareDocumentPosition(T.createElement("div"))}),se(function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")})||le("type|href|height|width",function(e,t,i){return i?void 0:e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),f.attributes&&se(function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||le("value",function(e,t,i){return i||"input"!==e.nodeName.toLowerCase()?void 0:e.defaultValue}),se(function(e){return null==e.getAttribute("disabled")})||le(I,function(e,t,i){var n;return i?void 0:!0===e[t]?t.toLowerCase():(n=e.getAttributeNode(t))&&n.specified?n.value:null}),re}(T);S.find=p,S.expr=p.selectors,S.expr[":"]=S.expr.pseudos,S.uniqueSort=S.unique=p.uniqueSort,S.text=p.getText,S.isXMLDoc=p.isXML,S.contains=p.contains;var v=function(e,t,i){for(var n=[],r=void 0!==i;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(r&&S(e).is(i))break;n.push(e)}return n},y=function(e,t){for(var i=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&i.push(e);return i},x=S.expr.match.needsContext,b=/^<([\w-]+)\s*\/?>(?:<\/\1>|)$/,w=/^.[^:#\[\.,]*$/;function _(e,i,n){if(S.isFunction(i))return S.grep(e,function(e,t){return!!i.call(e,t,e)!==n});if(i.nodeType)return S.grep(e,function(e){return e===i!==n});if("string"==typeof i){if(w.test(i))return S.filter(i,e,n);i=S.filter(i,e)}return S.grep(e,function(e){return-1<r.call(i,e)!==n})}S.filter=function(e,t,i){var n=t[0];return i&&(e=":not("+e+")"),1===t.length&&1===n.nodeType?S.find.matchesSelector(n,e)?[n]:[]:S.find.matches(e,S.grep(t,function(e){return 1===e.nodeType}))},S.fn.extend({find:function(e){var t,i=this.length,n=[],r=this;if("string"!=typeof e)return this.pushStack(S(e).filter(function(){for(t=0;t<i;t++)if(S.contains(r[t],this))return!0}));for(t=0;t<i;t++)S.find(e,r[t],n);return(n=this.pushStack(1<i?S.unique(n):n)).selector=this.selector?this.selector+" "+e:e,n},filter:function(e){return this.pushStack(_(this,e||[],!1))},not:function(e){return this.pushStack(_(this,e||[],!0))},is:function(e){return!!_(this,"string"==typeof e&&x.test(e)?S(e):e||[],!1).length}});var M,A=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/;(S.fn.init=function(e,t,i){var n,r;if(!e)return this;if(i=i||M,"string"==typeof e){if(!(n="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:A.exec(e))||!n[1]&&t)return!t||t.jquery?(t||i).find(e):this.constructor(t).find(e);if(n[1]){if(t=t instanceof S?t[0]:t,S.merge(this,S.parseHTML(n[1],t&&t.nodeType?t.ownerDocument||t:E,!0)),b.test(n[1])&&S.isPlainObject(t))for(n in t)S.isFunction(this[n])?this[n](t[n]):this.attr(n,t[n]);return this}return(r=E.getElementById(n[2]))&&r.parentNode&&(this.length=1,this[0]=r),this.context=E,this.selector=e,this}return e.nodeType?(this.context=this[0]=e,this.length=1,this):S.isFunction(e)?void 0!==i.ready?i.ready(e):e(S):(void 0!==e.selector&&(this.selector=e.selector,this.context=e.context),S.makeArray(e,this))}).prototype=S.fn,M=S(E);var C=/^(?:parents|prev(?:Until|All))/,L={children:!0,contents:!0,next:!0,prev:!0};function R(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}S.fn.extend({has:function(e){var t=S(e,this),i=t.length;return this.filter(function(){for(var e=0;e<i;e++)if(S.contains(this,t[e]))return!0})},closest:function(e,t){for(var i,n=0,r=this.length,o=[],a=x.test(e)||"string"!=typeof e?S(e,t||this.context):0;n<r;n++)for(i=this[n];i&&i!==t;i=i.parentNode)if(i.nodeType<11&&(a?-1<a.index(i):1===i.nodeType&&S.find.matchesSelector(i,e))){o.push(i);break}return this.pushStack(1<o.length?S.uniqueSort(o):o)},index:function(e){return e?"string"==typeof e?r.call(S(e),this[0]):r.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(S.uniqueSort(S.merge(this.get(),S(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),S.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return v(e,"parentNode")},parentsUntil:function(e,t,i){return v(e,"parentNode",i)},next:function(e){return R(e,"nextSibling")},prev:function(e){return R(e,"previousSibling")},nextAll:function(e){return v(e,"nextSibling")},prevAll:function(e){return v(e,"previousSibling")},nextUntil:function(e,t,i){return v(e,"nextSibling",i)},prevUntil:function(e,t,i){return v(e,"previousSibling",i)},siblings:function(e){return y((e.parentNode||{}).firstChild,e)},children:function(e){return y(e.firstChild)},contents:function(e){return e.contentDocument||S.merge([],e.childNodes)}},function(n,r){S.fn[n]=function(e,t){var i=S.map(this,r,e);return"Until"!==n.slice(-5)&&(t=e),t&&"string"==typeof t&&(i=S.filter(t,i)),1<this.length&&(L[n]||S.uniqueSort(i),C.test(n)&&i.reverse()),this.pushStack(i)}});var P,k=/\S+/g;function N(){E.removeEventListener("DOMContentLoaded",N),T.removeEventListener("load",N),S.ready()}S.Callbacks=function(n){var e,i;n="string"==typeof n?(e=n,i={},S.each(e.match(k)||[],function(e,t){i[t]=!0}),i):S.extend({},n);var r,t,o,a,s=[],l=[],c=-1,u=function(){for(a=n.once,o=r=!0;l.length;c=-1)for(t=l.shift();++c<s.length;)!1===s[c].apply(t[0],t[1])&&n.stopOnFalse&&(c=s.length,t=!1);n.memory||(t=!1),r=!1,a&&(s=t?[]:"")},h={add:function(){return s&&(t&&!r&&(c=s.length-1,l.push(t)),function i(e){S.each(e,function(e,t){S.isFunction(t)?n.unique&&h.has(t)||s.push(t):t&&t.length&&"string"!==S.type(t)&&i(t)})}(arguments),t&&!r&&u()),this},remove:function(){return S.each(arguments,function(e,t){for(var i;-1<(i=S.inArray(t,s,i));)s.splice(i,1),i<=c&&c--}),this},has:function(e){return e?-1<S.inArray(e,s):0<s.length},empty:function(){return s&&(s=[]),this},disable:function(){return a=l=[],s=t="",this},disabled:function(){return!s},lock:function(){return a=l=[],t||(s=t=""),this},locked:function(){return!!a},fireWith:function(e,t){return a||(t=[e,(t=t||[]).slice?t.slice():t],l.push(t),r||u()),this},fire:function(){return h.fireWith(this,arguments),this},fired:function(){return!!o}};return h},S.extend({Deferred:function(e){var o=[["resolve","done",S.Callbacks("once memory"),"resolved"],["reject","fail",S.Callbacks("once memory"),"rejected"],["notify","progress",S.Callbacks("memory")]],r="pending",a={state:function(){return r},always:function(){return s.done(arguments).fail(arguments),this},then:function(){var r=arguments;return S.Deferred(function(n){S.each(o,function(e,t){var i=S.isFunction(r[e])&&r[e];s[t[1]](function(){var e=i&&i.apply(this,arguments);e&&S.isFunction(e.promise)?e.promise().progress(n.notify).done(n.resolve).fail(n.reject):n[t[0]+"With"](this===a?n.promise():this,i?[e]:arguments)})}),r=null}).promise()},promise:function(e){return null!=e?S.extend(e,a):a}},s={};return a.pipe=a.then,S.each(o,function(e,t){var i=t[2],n=t[3];a[t[1]]=i.add,n&&i.add(function(){r=n},o[1^e][2].disable,o[2][2].lock),s[t[0]]=function(){return s[t[0]+"With"](this===s?a:this,arguments),this},s[t[0]+"With"]=i.fireWith}),a.promise(s),e&&e.call(s,s),s},when:function(e){var r,t,i,n=0,o=u.call(arguments),a=o.length,s=1!==a||e&&S.isFunction(e.promise)?a:0,l=1===s?e:S.Deferred(),c=function(t,i,n){return function(e){i[t]=this,n[t]=1<arguments.length?u.call(arguments):e,n===r?l.notifyWith(i,n):--s||l.resolveWith(i,n)}};if(1<a)for(r=new Array(a),t=new Array(a),i=new Array(a);n<a;n++)o[n]&&S.isFunction(o[n].promise)?o[n].promise().progress(c(n,t,r)).done(c(n,i,o)).fail(l.reject):--s;return s||l.resolveWith(i,o),l.promise()}}),S.fn.ready=function(e){return S.ready.promise().done(e),this},S.extend({isReady:!1,readyWait:1,holdReady:function(e){e?S.readyWait++:S.ready(!0)},ready:function(e){(!0===e?--S.readyWait:S.isReady)||((S.isReady=!0)!==e&&0<--S.readyWait||(P.resolveWith(E,[S]),S.fn.triggerHandler&&(S(E).triggerHandler("ready"),S(E).off("ready"))))}}),S.ready.promise=function(e){return P||(P=S.Deferred(),"complete"===E.readyState||"loading"!==E.readyState&&!E.documentElement.doScroll?T.setTimeout(S.ready):(E.addEventListener("DOMContentLoaded",N),T.addEventListener("load",N))),P.promise(e)},S.ready.promise();var D=function(e,t,i,n,r,o,a){var s=0,l=e.length,c=null==i;if("object"===S.type(i))for(s in r=!0,i)D(e,t,s,i[s],!0,o,a);else if(void 0!==n&&(r=!0,S.isFunction(n)||(a=!0),c&&(a?(t.call(e,n),t=null):(c=t,t=function(e,t,i){return c.call(S(e),i)})),t))for(;s<l;s++)t(e[s],i,a?n:n.call(e[s],s,t(e[s],i)));return r?e:c?t.call(e):l?t(e[0],i):o},O=function(e){return 1===e.nodeType||9===e.nodeType||!+e.nodeType};function I(){this.expando=S.expando+I.uid++}I.uid=1,I.prototype={register:function(e,t){var i=t||{};return e.nodeType?e[this.expando]=i:Object.defineProperty(e,this.expando,{value:i,writable:!0,configurable:!0}),e[this.expando]},cache:function(e){if(!O(e))return{};var t=e[this.expando];return t||(t={},O(e)&&(e.nodeType?e[this.expando]=t:Object.defineProperty(e,this.expando,{value:t,configurable:!0}))),t},set:function(e,t,i){var n,r=this.cache(e);if("string"==typeof t)r[t]=i;else for(n in t)r[n]=t[n];return r},get:function(e,t){return void 0===t?this.cache(e):e[this.expando]&&e[this.expando][t]},access:function(e,t,i){var n;return void 0===t||t&&"string"==typeof t&&void 0===i?void 0!==(n=this.get(e,t))?n:this.get(e,S.camelCase(t)):(this.set(e,t,i),void 0!==i?i:t)},remove:function(e,t){var i,n,r,o=e[this.expando];if(void 0!==o){if(void 0===t)this.register(e);else{S.isArray(t)?n=t.concat(t.map(S.camelCase)):(r=S.camelCase(t),t in o?n=[t,r]:n=(n=r)in o?[n]:n.match(k)||[]),i=n.length;for(;i--;)delete o[n[i]]}(void 0===t||S.isEmptyObject(o))&&(e.nodeType?e[this.expando]=void 0:delete e[this.expando])}},hasData:function(e){var t=e[this.expando];return void 0!==t&&!S.isEmptyObject(t)}};var U=new I,z=new I,H=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,F=/[A-Z]/g;function B(e,t,i){var n;if(void 0===i&&1===e.nodeType)if(n="data-"+t.replace(F,"-$&").toLowerCase(),"string"==typeof(i=e.getAttribute(n))){try{i="true"===i||"false"!==i&&("null"===i?null:+i+""===i?+i:H.test(i)?S.parseJSON(i):i)}catch(e){}z.set(e,t,i)}else i=void 0;return i}S.extend({hasData:function(e){return z.hasData(e)||U.hasData(e)},data:function(e,t,i){return z.access(e,t,i)},removeData:function(e,t){z.remove(e,t)},_data:function(e,t,i){return U.access(e,t,i)},_removeData:function(e,t){U.remove(e,t)}}),S.fn.extend({data:function(n,e){var t,i,r,o=this[0],a=o&&o.attributes;if(void 0===n){if(this.length&&(r=z.get(o),1===o.nodeType&&!U.get(o,"hasDataAttrs"))){for(t=a.length;t--;)a[t]&&(0===(i=a[t].name).indexOf("data-")&&(i=S.camelCase(i.slice(5)),B(o,i,r[i])));U.set(o,"hasDataAttrs",!0)}return r}return"object"==typeof n?this.each(function(){z.set(this,n)}):D(this,function(t){var e,i;if(o&&void 0===t){if(void 0!==(e=z.get(o,n)||z.get(o,n.replace(F,"-$&").toLowerCase())))return e;if(i=S.camelCase(n),void 0!==(e=z.get(o,i)))return e;if(void 0!==(e=B(o,i,void 0)))return e}else i=S.camelCase(n),this.each(function(){var e=z.get(this,i);z.set(this,i,t),-1<n.indexOf("-")&&void 0!==e&&z.set(this,n,t)})},null,e,1<arguments.length,null,!0)},removeData:function(e){return this.each(function(){z.remove(this,e)})}}),S.extend({queue:function(e,t,i){var n;return e?(t=(t||"fx")+"queue",n=U.get(e,t),i&&(!n||S.isArray(i)?n=U.access(e,t,S.makeArray(i)):n.push(i)),n||[]):void 0},dequeue:function(e,t){t=t||"fx";var i=S.queue(e,t),n=i.length,r=i.shift(),o=S._queueHooks(e,t);"inprogress"===r&&(r=i.shift(),n--),r&&("fx"===t&&i.unshift("inprogress"),delete o.stop,r.call(e,function(){S.dequeue(e,t)},o)),!n&&o&&o.empty.fire()},_queueHooks:function(e,t){var i=t+"queueHooks";return U.get(e,i)||U.access(e,i,{empty:S.Callbacks("once memory").add(function(){U.remove(e,[t+"queue",i])})})}}),S.fn.extend({queue:function(t,i){var e=2;return"string"!=typeof t&&(i=t,t="fx",e--),arguments.length<e?S.queue(this[0],t):void 0===i?this:this.each(function(){var e=S.queue(this,t,i);S._queueHooks(this,t),"fx"===t&&"inprogress"!==e[0]&&S.dequeue(this,t)})},dequeue:function(e){return this.each(function(){S.dequeue(this,e)})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,t){var i,n=1,r=S.Deferred(),o=this,a=this.length,s=function(){--n||r.resolveWith(o,[o])};for("string"!=typeof e&&(t=e,e=void 0),e=e||"fx";a--;)(i=U.get(o[a],e+"queueHooks"))&&i.empty&&(n++,i.empty.add(s));return s(),r.promise(t)}});var G=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,j=new RegExp("^(?:([+-])=|)("+G+")([a-z%]*)$","i"),V=["Top","Right","Bottom","Left"],W=function(e,t){return e=t||e,"none"===S.css(e,"display")||!S.contains(e.ownerDocument,e)};function $(e,t,i,n){var r,o=1,a=20,s=n?function(){return n.cur()}:function(){return S.css(e,t,"")},l=s(),c=i&&i[3]||(S.cssNumber[t]?"":"px"),u=(S.cssNumber[t]||"px"!==c&&+l)&&j.exec(S.css(e,t));if(u&&u[3]!==c)for(c=c||u[3],i=i||[],u=+l||1;u/=o=o||".5",S.style(e,t,u+c),o!==(o=s()/l)&&1!==o&&--a;);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}var q=/^(?:checkbox|radio)$/i,X=/<([\w:-]+)/,Y=/^$|\/(?:java|ecma)script/i,J={option:[1,"<select multiple='multiple'>","</select>"],thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};function Z(e,t){var i=void 0!==e.getElementsByTagName?e.getElementsByTagName(t||"*"):void 0!==e.querySelectorAll?e.querySelectorAll(t||"*"):[];return void 0===t||t&&S.nodeName(e,t)?S.merge([e],i):i}function Q(e,t){for(var i=0,n=e.length;i<n;i++)U.set(e[i],"globalEval",!t||U.get(t[i],"globalEval"))}J.optgroup=J.option,J.tbody=J.tfoot=J.colgroup=J.caption=J.thead,J.th=J.td;var K,ee,te=/<|&#?\w+;/;function ie(e,t,i,n,r){for(var o,a,s,l,c,u,h=t.createDocumentFragment(),d=[],p=0,f=e.length;p<f;p++)if((o=e[p])||0===o)if("object"===S.type(o))S.merge(d,o.nodeType?[o]:o);else if(te.test(o)){for(a=a||h.appendChild(t.createElement("div")),s=(X.exec(o)||["",""])[1].toLowerCase(),l=J[s]||J._default,a.innerHTML=l[1]+S.htmlPrefilter(o)+l[2],u=l[0];u--;)a=a.lastChild;S.merge(d,a.childNodes),(a=h.firstChild).textContent=""}else d.push(t.createTextNode(o));for(h.textContent="",p=0;o=d[p++];)if(n&&-1<S.inArray(o,n))r&&r.push(o);else if(c=S.contains(o.ownerDocument,o),a=Z(h.appendChild(o),"script"),c&&Q(a),i)for(u=0;o=a[u++];)Y.test(o.type||"")&&i.push(o);return h}K=E.createDocumentFragment().appendChild(E.createElement("div")),(ee=E.createElement("input")).setAttribute("type","radio"),ee.setAttribute("checked","checked"),ee.setAttribute("name","t"),K.appendChild(ee),g.checkClone=K.cloneNode(!0).cloneNode(!0).lastChild.checked,K.innerHTML="<textarea>x</textarea>",g.noCloneChecked=!!K.cloneNode(!0).lastChild.defaultValue;var ne=/^key/,re=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,oe=/^([^.]*)(?:\.(.+)|)/;function ae(){return!0}function se(){return!1}function le(){try{return E.activeElement}catch(e){}}function ce(e,t,i,n,r,o){var a,s;if("object"==typeof t){for(s in"string"!=typeof i&&(n=n||i,i=void 0),t)ce(e,s,i,n,t[s],o);return e}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=se;else if(!r)return e;return 1===o&&(a=r,(r=function(e){return S().off(e),a.apply(this,arguments)}).guid=a.guid||(a.guid=S.guid++)),e.each(function(){S.event.add(this,t,r,n,i)})}S.event={global:{},add:function(t,e,i,n,r){var o,a,s,l,c,u,h,d,p,f,m,g=U.get(t);if(g)for(i.handler&&(i=(o=i).handler,r=o.selector),i.guid||(i.guid=S.guid++),(l=g.events)||(l=g.events={}),(a=g.handle)||(a=g.handle=function(e){return void 0!==S&&S.event.triggered!==e.type?S.event.dispatch.apply(t,arguments):void 0}),c=(e=(e||"").match(k)||[""]).length;c--;)p=m=(s=oe.exec(e[c])||[])[1],f=(s[2]||"").split(".").sort(),p&&(h=S.event.special[p]||{},p=(r?h.delegateType:h.bindType)||p,h=S.event.special[p]||{},u=S.extend({type:p,origType:m,data:n,handler:i,guid:i.guid,selector:r,needsContext:r&&S.expr.match.needsContext.test(r),namespace:f.join(".")},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),S.event.global[p]=!0)},remove:function(e,t,i,n,r){var o,a,s,l,c,u,h,d,p,f,m,g=U.hasData(e)&&U.get(e);if(g&&(l=g.events)){for(c=(t=(t||"").match(k)||[""]).length;c--;)if(p=m=(s=oe.exec(t[c])||[])[1],f=(s[2]||"").split(".").sort(),p){for(h=S.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));a&&!d.length&&(h.teardown&&!1!==h.teardown.call(e,f,g.handle)||S.removeEvent(e,p,g.handle),delete l[p])}else for(p in l)S.event.remove(e,p+t[c],i,n,!0);S.isEmptyObject(l)&&U.remove(e,"handle events")}},dispatch:function(e){e=S.event.fix(e);var t,i,n,r,o,a=[],s=u.call(arguments),l=(U.get(this,"events")||{})[e.type]||[],c=S.event.special[e.type]||{};if((s[0]=e).delegateTarget=this,!c.preDispatch||!1!==c.preDispatch.call(this,e)){for(a=S.event.handlers.call(this,e,l),t=0;(r=a[t++])&&!e.isPropagationStopped();)for(e.currentTarget=r.elem,i=0;(o=r.handlers[i++])&&!e.isImmediatePropagationStopped();)e.rnamespace&&!e.rnamespace.test(o.namespace)||(e.handleObj=o,e.data=o.data,void 0!==(n=((S.event.special[o.origType]||{}).handle||o.handler).apply(r.elem,s))&&!1===(e.result=n)&&(e.preventDefault(),e.stopPropagation()));return c.postDispatch&&c.postDispatch.call(this,e),e.result}},handlers:function(e,t){var i,n,r,o,a=[],s=t.delegateCount,l=e.target;if(s&&l.nodeType&&("click"!==e.type||isNaN(e.button)||e.button<1))for(;l!==this;l=l.parentNode||this)if(1===l.nodeType&&(!0!==l.disabled||"click"!==e.type)){for(n=[],i=0;i<s;i++)void 0===n[r=(o=t[i]).selector+" "]&&(n[r]=o.needsContext?-1<S(r,this).index(l):S.find(r,this,null,[l]).length),n[r]&&n.push(o);n.length&&a.push({elem:l,handlers:n})}return s<t.length&&a.push({elem:this,handlers:t.slice(s)}),a},props:"altKey bubbles cancelable ctrlKey currentTarget detail eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(e,t){return null==e.which&&(e.which=null!=t.charCode?t.charCode:t.keyCode),e}},mouseHooks:{props:"button buttons clientX clientY offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(e,t){var i,n,r,o=t.button;return null==e.pageX&&null!=t.clientX&&(n=(i=e.target.ownerDocument||E).documentElement,r=i.body,e.pageX=t.clientX+(n&&n.scrollLeft||r&&r.scrollLeft||0)-(n&&n.clientLeft||r&&r.clientLeft||0),e.pageY=t.clientY+(n&&n.scrollTop||r&&r.scrollTop||0)-(n&&n.clientTop||r&&r.clientTop||0)),e.which||void 0===o||(e.which=1&o?1:2&o?3:4&o?2:0),e}},fix:function(e){if(e[S.expando])return e;var t,i,n,r=e.type,o=e,a=this.fixHooks[r];for(a||(this.fixHooks[r]=a=re.test(r)?this.mouseHooks:ne.test(r)?this.keyHooks:{}),n=a.props?this.props.concat(a.props):this.props,e=new S.Event(o),t=n.length;t--;)e[i=n[t]]=o[i];return e.target||(e.target=E),3===e.target.nodeType&&(e.target=e.target.parentNode),a.filter?a.filter(e,o):e},special:{load:{noBubble:!0},focus:{trigger:function(){return this!==le()&&this.focus?(this.focus(),!1):void 0},delegateType:"focusin"},blur:{trigger:function(){return this===le()&&this.blur?(this.blur(),!1):void 0},delegateType:"focusout"},click:{trigger:function(){return"checkbox"===this.type&&this.click&&S.nodeName(this,"input")?(this.click(),!1):void 0},_default:function(e){return S.nodeName(e.target,"a")}},beforeunload:{postDispatch:function(e){void 0!==e.result&&e.originalEvent&&(e.originalEvent.returnValue=e.result)}}}},S.removeEvent=function(e,t,i){e.removeEventListener&&e.removeEventListener(t,i)},S.Event=function(e,t){return this instanceof S.Event?(e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||void 0===e.defaultPrevented&&!1===e.returnValue?ae:se):this.type=e,t&&S.extend(this,t),this.timeStamp=e&&e.timeStamp||S.now(),void(this[S.expando]=!0)):new S.Event(e,t)},S.Event.prototype={constructor:S.Event,isDefaultPrevented:se,isPropagationStopped:se,isImmediatePropagationStopped:se,isSimulated:!1,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=ae,e&&!this.isSimulated&&e.preventDefault()},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=ae,e&&!this.isSimulated&&e.stopPropagation()},stopImmediatePropagation:function(){var e=this.originalEvent;this.isImmediatePropagationStopped=ae,e&&!this.isSimulated&&e.stopImmediatePropagation(),this.stopPropagation()}},S.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(e,r){S.event.special[e]={delegateType:r,bindType:r,handle:function(e){var t,i=e.relatedTarget,n=e.handleObj;return i&&(i===this||S.contains(this,i))||(e.type=n.origType,t=n.handler.apply(this,arguments),e.type=r),t}}}),S.fn.extend({on:function(e,t,i,n){return ce(this,e,t,i,n)},one:function(e,t,i,n){return ce(this,e,t,i,n,1)},off:function(e,t,i){var n,r;if(e&&e.preventDefault&&e.handleObj)return n=e.handleObj,S(e.delegateTarget).off(n.namespace?n.origType+"."+n.namespace:n.origType,n.selector,n.handler),this;if("object"==typeof e){for(r in e)this.off(r,t,e[r]);return this}return!1!==t&&"function"!=typeof t||(i=t,t=void 0),!1===i&&(i=se),this.each(function(){S.event.remove(this,e,i,t)})}});var ue=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:-]+)[^>]*)\/>/gi,he=/<script|<style|<link/i,de=/checked\s*(?:[^=]|=\s*.checked.)/i,pe=/^true\/(.*)/,fe=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;function me(e,t){return S.nodeName(e,"table")&&S.nodeName(11!==t.nodeType?t:t.firstChild,"tr")?e.getElementsByTagName("tbody")[0]||e.appendChild(e.ownerDocument.createElement("tbody")):e}function ge(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function ve(e){var t=pe.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function ye(e,t){var i,n,r,o,a,s,l,c;if(1===t.nodeType){if(U.hasData(e)&&(o=U.access(e),a=U.set(t,o),c=o.events))for(r in delete a.handle,a.events={},c)for(i=0,n=c[r].length;i<n;i++)S.event.add(t,r,c[r][i]);z.hasData(e)&&(s=z.access(e),l=S.extend({},s),z.set(t,l))}}function xe(i,n,r,o){n=m.apply([],n);var e,t,a,s,l,c,u=0,h=i.length,d=h-1,p=n[0],f=S.isFunction(p);if(f||1<h&&"string"==typeof p&&!g.checkClone&&de.test(p))return i.each(function(e){var t=i.eq(e);f&&(n[0]=p.call(this,e,t.html())),xe(t,n,r,o)});if(h&&(t=(e=ie(n,i[0].ownerDocument,!1,i,o)).firstChild,1===e.childNodes.length&&(e=t),t||o)){for(s=(a=S.map(Z(e,"script"),ge)).length;u<h;u++)l=e,u!==d&&(l=S.clone(l,!0,!0),s&&S.merge(a,Z(l,"script"))),r.call(i[u],l,u);if(s)for(c=a[a.length-1].ownerDocument,S.map(a,ve),u=0;u<s;u++)l=a[u],Y.test(l.type||"")&&!U.access(l,"globalEval")&&S.contains(c,l)&&(l.src?S._evalUrl&&S._evalUrl(l.src):S.globalEval(l.textContent.replace(fe,"")))}return i}function be(e,t,i){for(var n,r=t?S.filter(t,e):e,o=0;null!=(n=r[o]);o++)i||1!==n.nodeType||S.cleanData(Z(n)),n.parentNode&&(i&&S.contains(n.ownerDocument,n)&&Q(Z(n,"script")),n.parentNode.removeChild(n));return e}S.extend({htmlPrefilter:function(e){return e.replace(ue,"<$1></$2>")},clone:function(e,t,i){var n,r,o,a,s,l,c,u=e.cloneNode(!0),h=S.contains(e.ownerDocument,e);if(!(g.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||S.isXMLDoc(e)))for(a=Z(u),n=0,r=(o=Z(e)).length;n<r;n++)s=o[n],l=a[n],void 0,"input"===(c=l.nodeName.toLowerCase())&&q.test(s.type)?l.checked=s.checked:"input"!==c&&"textarea"!==c||(l.defaultValue=s.defaultValue);if(t)if(i)for(o=o||Z(e),a=a||Z(u),n=0,r=o.length;n<r;n++)ye(o[n],a[n]);else ye(e,u);return 0<(a=Z(u,"script")).length&&Q(a,!h&&Z(e,"script")),u},cleanData:function(e){for(var t,i,n,r=S.event.special,o=0;void 0!==(i=e[o]);o++)if(O(i)){if(t=i[U.expando]){if(t.events)for(n in t.events)r[n]?S.event.remove(i,n):S.removeEvent(i,n,t.handle);i[U.expando]=void 0}i[z.expando]&&(i[z.expando]=void 0)}}}),S.fn.extend({domManip:xe,detach:function(e){return be(this,e,!0)},remove:function(e){return be(this,e)},text:function(e){return D(this,function(e){return void 0===e?S.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=e)})},null,e,arguments.length)},append:function(){return xe(this,arguments,function(e){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||me(this,e).appendChild(e)})},prepend:function(){return xe(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=me(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return xe(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return xe(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(S.cleanData(Z(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map(function(){return S.clone(this,e,t)})},html:function(e){return D(this,function(e){var t=this[0]||{},i=0,n=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!he.test(e)&&!J[(X.exec(e)||["",""])[1].toLowerCase()]){e=S.htmlPrefilter(e);try{for(;i<n;i++)1===(t=this[i]||{}).nodeType&&(S.cleanData(Z(t,!1)),t.innerHTML=e);t=0}catch(e){}}t&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var i=[];return xe(this,arguments,function(e){var t=this.parentNode;S.inArray(this,i)<0&&(S.cleanData(Z(this)),t&&t.replaceChild(e,this))},i)}}),S.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,a){S.fn[e]=function(e){for(var t,i=[],n=S(e),r=n.length-1,o=0;o<=r;o++)t=o===r?this:this.clone(!0),S(n[o])[a](t),s.apply(i,t.get());return this.pushStack(i)}});var we,_e={HTML:"block",BODY:"block"};function Te(e,t){var i=S(t.createElement(e)).appendTo(t.body),n=S.css(i[0],"display");return i.detach(),n}function Ee(e){var t=E,i=_e[e];return i||("none"!==(i=Te(e,t))&&i||((t=(we=(we||S("<iframe frameborder='0' width='0' height='0'/>")).appendTo(t.documentElement))[0].contentDocument).write(),t.close(),i=Te(e,t),we.detach()),_e[e]=i),i}var Se=/^margin/,Me=new RegExp("^("+G+")(?!px)[a-z%]+$","i"),Ae=function(e){var t=e.ownerDocument.defaultView;return t&&t.opener||(t=T),t.getComputedStyle(e)},Ce=function(e,t,i,n){var r,o,a={};for(o in t)a[o]=e.style[o],e.style[o]=t[o];for(o in r=i.apply(e,n||[]),t)e.style[o]=a[o];return r},Le=E.documentElement;function Re(e,t,i){var n,r,o,a,s=e.style;return""!==(a=(i=i||Ae(e))?i.getPropertyValue(t)||i[t]:void 0)&&void 0!==a||S.contains(e.ownerDocument,e)||(a=S.style(e,t)),i&&!g.pixelMarginRight()&&Me.test(a)&&Se.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}function Pe(e,t){return{get:function(){return e()?void delete this.get:(this.get=t).apply(this,arguments)}}}!function(){var t,i,n,r,o=E.createElement("div"),a=E.createElement("div");if(a.style){function e(){a.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;position:relative;display:block;margin:auto;border:1px;padding:1px;top:1%;width:50%",a.innerHTML="",Le.appendChild(o);var e=T.getComputedStyle(a);t="1%"!==e.top,r="2px"===e.marginLeft,i="4px"===e.width,a.style.marginRight="50%",n="4px"===e.marginRight,Le.removeChild(o)}a.style.backgroundClip="content-box",a.cloneNode(!0).style.backgroundClip="",g.clearCloneStyle="content-box"===a.style.backgroundClip,o.style.cssText="border:0;width:8px;height:0;top:0;left:-9999px;padding:0;margin-top:1px;position:absolute",o.appendChild(a),S.extend(g,{pixelPosition:function(){return e(),t},boxSizingReliable:function(){return null==i&&e(),i},pixelMarginRight:function(){return null==i&&e(),n},reliableMarginLeft:function(){return null==i&&e(),r},reliableMarginRight:function(){var e,t=a.appendChild(E.createElement("div"));return t.style.cssText=a.style.cssText="-webkit-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:0",t.style.marginRight=t.style.width="0",a.style.width="1px",Le.appendChild(o),e=!parseFloat(T.getComputedStyle(t).marginRight),Le.removeChild(o),a.removeChild(t),e}})}}();var ke=/^(none|table(?!-c[ea]).+)/,Ne={position:"absolute",visibility:"hidden",display:"block"},De={letterSpacing:"0",fontWeight:"400"},Oe=["Webkit","O","Moz","ms"],Ie=E.createElement("div").style;function Ue(e){if(e in Ie)return e;for(var t=e[0].toUpperCase()+e.slice(1),i=Oe.length;i--;)if((e=Oe[i]+t)in Ie)return e}function ze(e,t,i){var n=j.exec(t);return n?Math.max(0,n[2]-(i||0))+(n[3]||"px"):t}function He(e,t,i,n,r){for(var o=i===(n?"border":"content")?4:"width"===t?1:0,a=0;o<4;o+=2)"margin"===i&&(a+=S.css(e,i+V[o],!0,r)),n?("content"===i&&(a-=S.css(e,"padding"+V[o],!0,r)),"margin"!==i&&(a-=S.css(e,"border"+V[o]+"Width",!0,r))):(a+=S.css(e,"padding"+V[o],!0,r),"padding"!==i&&(a+=S.css(e,"border"+V[o]+"Width",!0,r)));return a}function Fe(e,t,i){var n=!0,r="width"===t?e.offsetWidth:e.offsetHeight,o=Ae(e),a="border-box"===S.css(e,"boxSizing",!1,o);if(r<=0||null==r){if(((r=Re(e,t,o))<0||null==r)&&(r=e.style[t]),Me.test(r))return r;n=a&&(g.boxSizingReliable()||r===e.style[t]),r=parseFloat(r)||0}return r+He(e,t,i||(a?"border":"content"),n,o)+"px"}function Be(e,t){for(var i,n,r,o=[],a=0,s=e.length;a<s;a++)(n=e[a]).style&&(o[a]=U.get(n,"olddisplay"),i=n.style.display,t?(o[a]||"none"!==i||(n.style.display=""),""===n.style.display&&W(n)&&(o[a]=U.access(n,"olddisplay",Ee(n.nodeName)))):(r=W(n),"none"===i&&r||U.set(n,"olddisplay",r?i:S.css(n,"display"))));for(a=0;a<s;a++)(n=e[a]).style&&(t&&"none"!==n.style.display&&""!==n.style.display||(n.style.display=t?o[a]||"":"none"));return e}function Ge(e,t,i,n,r){return new Ge.prototype.init(e,t,i,n,r)}S.extend({cssHooks:{opacity:{get:function(e,t){if(t){var i=Re(e,"opacity");return""===i?"1":i}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{float:"cssFloat"},style:function(e,t,i,n){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var r,o,a,s=S.camelCase(t),l=e.style;return t=S.cssProps[s]||(S.cssProps[s]=Ue(s)||s),a=S.cssHooks[t]||S.cssHooks[s],void 0===i?a&&"get"in a&&void 0!==(r=a.get(e,!1,n))?r:l[t]:("string"===(o=typeof i)&&(r=j.exec(i))&&r[1]&&(i=$(e,t,r),o="number"),void(null!=i&&i==i&&("number"===o&&(i+=r&&r[3]||(S.cssNumber[s]?"":"px")),g.clearCloneStyle||""!==i||0!==t.indexOf("background")||(l[t]="inherit"),a&&"set"in a&&void 0===(i=a.set(e,i,n))||(l[t]=i))))}},css:function(e,t,i,n){var r,o,a,s=S.camelCase(t);return t=S.cssProps[s]||(S.cssProps[s]=Ue(s)||s),(a=S.cssHooks[t]||S.cssHooks[s])&&"get"in a&&(r=a.get(e,!0,i)),void 0===r&&(r=Re(e,t,n)),"normal"===r&&t in De&&(r=De[t]),""===i||i?(o=parseFloat(r),!0===i||isFinite(o)?o||0:r):r}}),S.each(["height","width"],function(e,a){S.cssHooks[a]={get:function(e,t,i){return t?ke.test(S.css(e,"display"))&&0===e.offsetWidth?Ce(e,Ne,function(){return Fe(e,a,i)}):Fe(e,a,i):void 0},set:function(e,t,i){var n,r=i&&Ae(e),o=i&&He(e,a,i,"border-box"===S.css(e,"boxSizing",!1,r),r);return o&&(n=j.exec(t))&&"px"!==(n[3]||"px")&&(e.style[a]=t,t=S.css(e,a)),ze(0,t,o)}}}),S.cssHooks.marginLeft=Pe(g.reliableMarginLeft,function(e,t){return t?(parseFloat(Re(e,"marginLeft"))||e.getBoundingClientRect().left-Ce(e,{marginLeft:0},function(){return e.getBoundingClientRect().left}))+"px":void 0}),S.cssHooks.marginRight=Pe(g.reliableMarginRight,function(e,t){return t?Ce(e,{display:"inline-block"},Re,[e,"marginRight"]):void 0}),S.each({margin:"",padding:"",border:"Width"},function(r,o){S.cssHooks[r+o]={expand:function(e){for(var t=0,i={},n="string"==typeof e?e.split(" "):[e];t<4;t++)i[r+V[t]+o]=n[t]||n[t-2]||n[0];return i}},Se.test(r)||(S.cssHooks[r+o].set=ze)}),S.fn.extend({css:function(e,t){return D(this,function(e,t,i){var n,r,o={},a=0;if(S.isArray(t)){for(n=Ae(e),r=t.length;a<r;a++)o[t[a]]=S.css(e,t[a],!1,n);return o}return void 0!==i?S.style(e,t,i):S.css(e,t)},e,t,1<arguments.length)},show:function(){return Be(this,!0)},hide:function(){return Be(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){W(this)?S(this).show():S(this).hide()})}}),((S.Tween=Ge).prototype={constructor:Ge,init:function(e,t,i,n,r,o){this.elem=e,this.prop=i,this.easing=r||S.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=n,this.unit=o||(S.cssNumber[i]?"":"px")},cur:function(){var e=Ge.propHooks[this.prop];return e&&e.get?e.get(this):Ge.propHooks._default.get(this)},run:function(e){var t,i=Ge.propHooks[this.prop];return this.options.duration?this.pos=t=S.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):Ge.propHooks._default.set(this),this}}).init.prototype=Ge.prototype,(Ge.propHooks={_default:{get:function(e){var t;return 1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(t=S.css(e.elem,e.prop,""))&&"auto"!==t?t:0},set:function(e){S.fx.step[e.prop]?S.fx.step[e.prop](e):1!==e.elem.nodeType||null==e.elem.style[S.cssProps[e.prop]]&&!S.cssHooks[e.prop]?e.elem[e.prop]=e.now:S.style(e.elem,e.prop,e.now+e.unit)}}}).scrollTop=Ge.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},S.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},S.fx=Ge.prototype.init,S.fx.step={};var je,Ve,We,$e,qe,Xe=/^(?:toggle|show|hide)$/,Ye=/queueHooks$/;function Je(){return T.setTimeout(function(){je=void 0}),je=S.now()}function Ze(e,t){var i,n=0,r={height:e};for(t=t?1:0;n<4;n+=2-t)r["margin"+(i=V[n])]=r["padding"+i]=e;return t&&(r.opacity=r.width=e),r}function Qe(e,t,i){for(var n,r=(Ke.tweeners[t]||[]).concat(Ke.tweeners["*"]),o=0,a=r.length;o<a;o++)if(n=r[o].call(i,t,e))return n}function Ke(o,e,t){var i,a,n=0,r=Ke.prefilters.length,s=S.Deferred().always(function(){delete l.elem}),l=function(){if(a)return!1;for(var e=je||Je(),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);return s.notifyWith(o,[c,i,t]),i<1&&r?t:(s.resolveWith(o,[c]),!1)},c=s.promise({elem:o,props:S.extend({},e),opts:S.extend(!0,{specialEasing:{},easing:S.easing._default},t),originalProperties:e,originalOptions:t,startTime:je||Je(),duration:t.duration,tweens:[],createTween:function(e,t){var i=S.Tween(o,c.opts,e,t,c.opts.specialEasing[e]||c.opts.easing);return c.tweens.push(i),i},stop:function(e){var t=0,i=e?c.tweens.length:0;if(a)return this;for(a=!0;t<i;t++)c.tweens[t].run(1);return e?(s.notifyWith(o,[c,1,0]),s.resolveWith(o,[c,e])):s.rejectWith(o,[c,e]),this}}),u=c.props;for(function(e,t){var i,n,r,o,a;for(i in e)if(r=t[n=S.camelCase(i)],o=e[i],S.isArray(o)&&(r=o[1],o=e[i]=o[0]),i!==n&&(e[n]=o,delete e[i]),(a=S.cssHooks[n])&&"expand"in a)for(i in o=a.expand(o),delete e[n],o)i in e||(e[i]=o[i],t[i]=r);else t[n]=r}(u,c.opts.specialEasing);n<r;n++)if(i=Ke.prefilters[n].call(c,o,u,c.opts))return S.isFunction(i.stop)&&(S._queueHooks(c.elem,c.opts.queue).stop=S.proxy(i.stop,i)),i;return S.map(u,Qe,c),S.isFunction(c.opts.start)&&c.opts.start.call(o,c),S.fx.timer(S.extend(l,{elem:o,anim:c,queue:c.opts.queue})),c.progress(c.opts.progress).done(c.opts.done,c.opts.complete).fail(c.opts.fail).always(c.opts.always)}S.Animation=S.extend(Ke,{tweeners:{"*":[function(e,t){var i=this.createTween(e,t);return $(i.elem,e,j.exec(t),i),i}]},tweener:function(e,t){S.isFunction(e)?(t=e,e=["*"]):e=e.match(k);for(var i,n=0,r=e.length;n<r;n++)i=e[n],Ke.tweeners[i]=Ke.tweeners[i]||[],Ke.tweeners[i].unshift(t)},prefilters:[function(t,e,i){var n,r,o,a,s,l,c,u=this,h={},d=t.style,p=t.nodeType&&W(t),f=U.get(t,"fxshow");for(n in i.queue||(null==(s=S._queueHooks(t,"fx")).unqueued&&(s.unqueued=0,l=s.empty.fire,s.empty.fire=function(){s.unqueued||l()}),s.unqueued++,u.always(function(){u.always(function(){s.unqueued--,S.queue(t,"fx").length||s.empty.fire()})})),1===t.nodeType&&("height"in e||"width"in e)&&(i.overflow=[d.overflow,d.overflowX,d.overflowY],"inline"===("none"===(c=S.css(t,"display"))?U.get(t,"olddisplay")||Ee(t.nodeName):c)&&"none"===S.css(t,"float")&&(d.display="inline-block")),i.overflow&&(d.overflow="hidden",u.always(function(){d.overflow=i.overflow[0],d.overflowX=i.overflow[1],d.overflowY=i.overflow[2]})),e)if(r=e[n],Xe.exec(r)){if(delete e[n],o=o||"toggle"===r,r===(p?"hide":"show")){if("show"!==r||!f||void 0===f[n])continue;p=!0}h[n]=f&&f[n]||S.style(t,n)}else c=void 0;if(S.isEmptyObject(h))"inline"===("none"===c?Ee(t.nodeName):c)&&(d.display=c);else for(n in f?"hidden"in f&&(p=f.hidden):f=U.access(t,"fxshow",{}),o&&(f.hidden=!p),p?S(t).show():u.done(function(){S(t).hide()}),u.done(function(){var e;for(e in U.remove(t,"fxshow"),h)S.style(t,e,h[e])}),h)a=Qe(p?f[n]:0,n,u),n in f||(f[n]=a.start,p&&(a.end=a.start,a.start="width"===n||"height"===n?1:0))}],prefilter:function(e,t){t?Ke.prefilters.unshift(e):Ke.prefilters.push(e)}}),S.speed=function(e,t,i){var n=e&&"object"==typeof e?S.extend({},e):{complete:i||!i&&t||S.isFunction(e)&&e,duration:e,easing:i&&t||t&&!S.isFunction(t)&&t};return n.duration=S.fx.off?0:"number"==typeof n.duration?n.duration:n.duration in S.fx.speeds?S.fx.speeds[n.duration]:S.fx.speeds._default,null!=n.queue&&!0!==n.queue||(n.queue="fx"),n.old=n.complete,n.complete=function(){S.isFunction(n.old)&&n.old.call(this),n.queue&&S.dequeue(this,n.queue)},n},S.fn.extend({fadeTo:function(e,t,i,n){return this.filter(W).css("opacity",0).show().end().animate({opacity:t},e,i,n)},animate:function(t,e,i,n){var r=S.isEmptyObject(t),o=S.speed(e,i,n),a=function(){var e=Ke(this,S.extend({},t),o);(r||U.get(this,"finish"))&&e.stop(!0)};return a.finish=a,r||!1===o.queue?this.each(a):this.queue(o.queue,a)},stop:function(r,e,o){var a=function(e){var t=e.stop;delete e.stop,t(o)};return"string"!=typeof r&&(o=e,e=r,r=void 0),e&&!1!==r&&this.queue(r||"fx",[]),this.each(function(){var e=!0,t=null!=r&&r+"queueHooks",i=S.timers,n=U.get(this);if(t)n[t]&&n[t].stop&&a(n[t]);else for(t in n)n[t]&&n[t].stop&&Ye.test(t)&&a(n[t]);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));!e&&o||S.dequeue(this,r)})},finish:function(a){return!1!==a&&(a=a||"fx"),this.each(function(){var e,t=U.get(this),i=t[a+"queue"],n=t[a+"queueHooks"],r=S.timers,o=i?i.length:0;for(t.finish=!0,S.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));for(e=0;e<o;e++)i[e]&&i[e].finish&&i[e].finish.call(this);delete t.finish})}}),S.each(["toggle","show","hide"],function(e,n){var r=S.fn[n];S.fn[n]=function(e,t,i){return null==e||"boolean"==typeof e?r.apply(this,arguments):this.animate(Ze(n,!0),e,t,i)}}),S.each({slideDown:Ze("show"),slideUp:Ze("hide"),slideToggle:Ze("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,n){S.fn[e]=function(e,t,i){return this.animate(n,e,t,i)}}),S.timers=[],S.fx.tick=function(){var e,t=0,i=S.timers;for(je=S.now();t<i.length;t++)(e=i[t])()||i[t]!==e||i.splice(t--,1);i.length||S.fx.stop(),je=void 0},S.fx.timer=function(e){S.timers.push(e),e()?S.fx.start():S.timers.pop()},S.fx.interval=13,S.fx.start=function(){Ve||(Ve=T.setInterval(S.fx.tick,S.fx.interval))},S.fx.stop=function(){T.clearInterval(Ve),Ve=null},S.fx.speeds={slow:600,fast:200,_default:400},S.fn.delay=function(n,e){return n=S.fx&&S.fx.speeds[n]||n,e=e||"fx",this.queue(e,function(e,t){var i=T.setTimeout(e,n);t.stop=function(){T.clearTimeout(i)}})},We=E.createElement("input"),$e=E.createElement("select"),qe=$e.appendChild(E.createElement("option")),We.type="checkbox",g.checkOn=""!==We.value,g.optSelected=qe.selected,$e.disabled=!0,g.optDisabled=!qe.disabled,(We=E.createElement("input")).value="t",We.type="radio",g.radioValue="t"===We.value;var et,tt=S.expr.attrHandle;S.fn.extend({attr:function(e,t){return D(this,S.attr,e,t,1<arguments.length)},removeAttr:function(e){return this.each(function(){S.removeAttr(this,e)})}}),S.extend({attr:function(e,t,i){var n,r,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return void 0===e.getAttribute?S.prop(e,t,i):(1===o&&S.isXMLDoc(e)||(t=t.toLowerCase(),r=S.attrHooks[t]||(S.expr.match.bool.test(t)?et:void 0)),void 0!==i?null===i?void S.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=S.find.attr(e,t))?void 0:n)},attrHooks:{type:{set:function(e,t){if(!g.radioValue&&"radio"===t&&S.nodeName(e,"input")){var i=e.value;return e.setAttribute("type",t),i&&(e.value=i),t}}}},removeAttr:function(e,t){var i,n,r=0,o=t&&t.match(k);if(o&&1===e.nodeType)for(;i=o[r++];)n=S.propFix[i]||i,S.expr.match.bool.test(i)&&(e[n]=!1),e.removeAttribute(i)}}),et={set:function(e,t,i){return!1===t?S.removeAttr(e,i):e.setAttribute(i,i),i}},S.each(S.expr.match.bool.source.match(/\w+/g),function(e,t){var o=tt[t]||S.find.attr;tt[t]=function(e,t,i){var n,r;return i||(r=tt[t],tt[t]=n,n=null!=o(e,t,i)?t.toLowerCase():null,tt[t]=r),n}});var it=/^(?:input|select|textarea|button)$/i,nt=/^(?:a|area)$/i;S.fn.extend({prop:function(e,t){return D(this,S.prop,e,t,1<arguments.length)},removeProp:function(e){return this.each(function(){delete this[S.propFix[e]||e]})}}),S.extend({prop:function(e,t,i){var n,r,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&S.isXMLDoc(e)||(t=S.propFix[t]||t,r=S.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]},propHooks:{tabIndex:{get:function(e){var t=S.find.attr(e,"tabindex");return t?parseInt(t,10):it.test(e.nodeName)||nt.test(e.nodeName)&&e.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),g.optSelected||(S.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),S.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){S.propFix[this.toLowerCase()]=this});var rt=/[\t\r\n\f]/g;function ot(e){return e.getAttribute&&e.getAttribute("class")||""}S.fn.extend({addClass:function(t){var e,i,n,r,o,a,s,l=0;if(S.isFunction(t))return this.each(function(e){S(this).addClass(t.call(this,e,ot(this)))});if("string"==typeof t&&t)for(e=t.match(k)||[];i=this[l++];)if(r=ot(i),n=1===i.nodeType&&(" "+r+" ").replace(rt," ")){for(a=0;o=e[a++];)n.indexOf(" "+o+" ")<0&&(n+=o+" ");r!==(s=S.trim(n))&&i.setAttribute("class",s)}return this},removeClass:function(t){var e,i,n,r,o,a,s,l=0;if(S.isFunction(t))return this.each(function(e){S(this).removeClass(t.call(this,e,ot(this)))});if(!arguments.length)return this.attr("class","");if("string"==typeof t&&t)for(e=t.match(k)||[];i=this[l++];)if(r=ot(i),n=1===i.nodeType&&(" "+r+" ").replace(rt," ")){for(a=0;o=e[a++];)for(;-1<n.indexOf(" "+o+" ");)n=n.replace(" "+o+" "," ");r!==(s=S.trim(n))&&i.setAttribute("class",s)}return this},toggleClass:function(r,t){var o=typeof r;return"boolean"==typeof t&&"string"===o?t?this.addClass(r):this.removeClass(r):S.isFunction(r)?this.each(function(e){S(this).toggleClass(r.call(this,e,ot(this),t),t)}):this.each(function(){var e,t,i,n;if("string"===o)for(t=0,i=S(this),n=r.match(k)||[];e=n[t++];)i.hasClass(e)?i.removeClass(e):i.addClass(e);else void 0!==r&&"boolean"!==o||((e=ot(this))&&U.set(this,"__className__",e),this.setAttribute&&this.setAttribute("class",e||!1===r?"":U.get(this,"__className__")||""))})},hasClass:function(e){var t,i,n=0;for(t=" "+e+" ";i=this[n++];)if(1===i.nodeType&&-1<(" "+ot(i)+" ").replace(rt," ").indexOf(t))return!0;return!1}});var at=/\r/g,st=/[\x20\t\r\n\f]+/g;S.fn.extend({val:function(i){var n,e,r,t=this[0];return arguments.length?(r=S.isFunction(i),this.each(function(e){var t;1===this.nodeType&&(null==(t=r?i.call(this,e,S(this).val()):i)?t="":"number"==typeof t?t+="":S.isArray(t)&&(t=S.map(t,function(e){return null==e?"":e+""})),(n=S.valHooks[this.type]||S.valHooks[this.nodeName.toLowerCase()])&&"set"in n&&void 0!==n.set(this,t,"value")||(this.value=t))})):t?(n=S.valHooks[t.type]||S.valHooks[t.nodeName.toLowerCase()])&&"get"in n&&void 0!==(e=n.get(t,"value"))?e:"string"==typeof(e=t.value)?e.replace(at,""):null==e?"":e:void 0}}),S.extend({valHooks:{option:{get:function(e){var t=S.find.attr(e,"value");return null!=t?t:S.trim(S.text(e)).replace(st," ")}},select:{get:function(e){for(var t,i,n=e.options,r=e.selectedIndex,o="select-one"===e.type||r<0,a=o?null:[],s=o?r+1:n.length,l=r<0?s:o?r:0;l<s;l++)if(((i=n[l]).selected||l===r)&&(g.optDisabled?!i.disabled:null===i.getAttribute("disabled"))&&(!i.parentNode.disabled||!S.nodeName(i.parentNode,"optgroup"))){if(t=S(i).val(),o)return t;a.push(t)}return a},set:function(e,t){for(var i,n,r=e.options,o=S.makeArray(t),a=r.length;a--;)((n=r[a]).selected=-1<S.inArray(S.valHooks.option.get(n),o))&&(i=!0);return i||(e.selectedIndex=-1),o}}}}),S.each(["radio","checkbox"],function(){S.valHooks[this]={set:function(e,t){return S.isArray(t)?e.checked=-1<S.inArray(S(e).val(),t):void 0}},g.checkOn||(S.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})});var lt=/^(?:focusinfocus|focusoutblur)$/;S.extend(S.event,{trigger:function(e,t,i,n){var r,o,a,s,l,c,u,h=[i||E],d=f.call(e,"type")?e.type:e,p=f.call(e,"namespace")?e.namespace.split("."):[];if(o=a=i=i||E,3!==i.nodeType&&8!==i.nodeType&&!lt.test(d+S.event.triggered)&&(-1<d.indexOf(".")&&(d=(p=d.split(".")).shift(),p.sort()),l=d.indexOf(":")<0&&"on"+d,(e=e[S.expando]?e:new S.Event(d,"object"==typeof e&&e)).isTrigger=n?2:3,e.namespace=p.join("."),e.rnamespace=e.namespace?new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,e.result=void 0,e.target||(e.target=i),t=null==t?[e]:S.makeArray(t,[e]),u=S.event.special[d]||{},n||!u.trigger||!1!==u.trigger.apply(i,t))){if(!n&&!u.noBubble&&!S.isWindow(i)){for(s=u.delegateType||d,lt.test(s+d)||(o=o.parentNode);o;o=o.parentNode)h.push(o),a=o;a===(i.ownerDocument||E)&&h.push(a.defaultView||a.parentWindow||T)}for(r=0;(o=h[r++])&&!e.isPropagationStopped();)e.type=1<r?s:u.bindType||d,(c=(U.get(o,"events")||{})[e.type]&&U.get(o,"handle"))&&c.apply(o,t),(c=l&&o[l])&&c.apply&&O(o)&&(e.result=c.apply(o,t),!1===e.result&&e.preventDefault());return e.type=d,n||e.isDefaultPrevented()||u._default&&!1!==u._default.apply(h.pop(),t)||!O(i)||l&&S.isFunction(i[d])&&!S.isWindow(i)&&((a=i[l])&&(i[l]=null),i[S.event.triggered=d](),S.event.triggered=void 0,a&&(i[l]=a)),e.result}},simulate:function(e,t,i){var n=S.extend(new S.Event,i,{type:e,isSimulated:!0});S.event.trigger(n,null,t)}}),S.fn.extend({trigger:function(e,t){return this.each(function(){S.event.trigger(e,t,this)})},triggerHandler:function(e,t){var i=this[0];return i?S.event.trigger(e,t,i,!0):void 0}}),S.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(e,i){S.fn[i]=function(e,t){return 0<arguments.length?this.on(i,null,e,t):this.trigger(i)}}),S.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),g.focusin="onfocusin"in T,g.focusin||S.each({focus:"focusin",blur:"focusout"},function(i,n){var r=function(e){S.event.simulate(n,e.target,S.event.fix(e))};S.event.special[n]={setup:function(){var e=this.ownerDocument||this,t=U.access(e,n);t||e.addEventListener(i,r,!0),U.access(e,n,(t||0)+1)},teardown:function(){var e=this.ownerDocument||this,t=U.access(e,n)-1;t?U.access(e,n,t):(e.removeEventListener(i,r,!0),U.remove(e,n))}}});var ct=T.location,ut=S.now(),ht=/\?/;S.parseJSON=function(e){return JSON.parse(e+"")},S.parseXML=function(e){var t;if(!e||"string"!=typeof e)return null;try{t=(new T.DOMParser).parseFromString(e,"text/xml")}catch(e){t=void 0}return t&&!t.getElementsByTagName("parsererror").length||S.error("Invalid XML: "+e),t};var dt=/#.*$/,pt=/([?&])_=[^&]*/,ft=/^(.*?):[ \t]*([^\r\n]*)$/gm,mt=/^(?:GET|HEAD)$/,gt=/^\/\//,vt={},yt={},xt="*/".concat("*"),bt=E.createElement("a");function wt(o){return function(e,t){"string"!=typeof e&&(t=e,e="*");var i,n=0,r=e.toLowerCase().match(k)||[];if(S.isFunction(t))for(;i=r[n++];)"+"===i[0]?(i=i.slice(1)||"*",(o[i]=o[i]||[]).unshift(t)):(o[i]=o[i]||[]).push(t)}}function _t(t,r,o,a){var s={},l=t===yt;function c(e){var n;return s[e]=!0,S.each(t[e]||[],function(e,t){var i=t(r,o,a);return"string"!=typeof i||l||s[i]?l?!(n=i):void 0:(r.dataTypes.unshift(i),c(i),!1)}),n}return c(r.dataTypes[0])||!s["*"]&&c("*")}function Tt(e,t){var i,n,r=S.ajaxSettings.flatOptions||{};for(i in t)void 0!==t[i]&&((r[i]?e:n||(n={}))[i]=t[i]);return n&&S.extend(!0,e,n),e}bt.href=ct.href,S.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:ct.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(ct.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":xt,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":S.parseJSON,"text xml":S.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?Tt(Tt(e,S.ajaxSettings),t):Tt(S.ajaxSettings,e)},ajaxPrefilter:wt(vt),ajaxTransport:wt(yt),ajax:function(e,t){"object"==typeof e&&(t=e,e=void 0),t=t||{};var u,h,d,i,p,n,f,r,m=S.ajaxSetup({},t),g=m.context||m,v=m.context&&(g.nodeType||g.jquery)?S(g):S.event,y=S.Deferred(),x=S.Callbacks("once memory"),b=m.statusCode||{},o={},a={},w=0,s="canceled",_={readyState:0,getResponseHeader:function(e){var t;if(2===w){if(!i)for(i={};t=ft.exec(d);)i[t[1].toLowerCase()]=t[2];t=i[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return 2===w?d:null},setRequestHeader:function(e,t){var i=e.toLowerCase();return w||(e=a[i]=a[i]||e,o[e]=t),this},overrideMimeType:function(e){return w||(m.mimeType=e),this},statusCode:function(e){var t;if(e)if(w<2)for(t in e)b[t]=[b[t],e[t]];else _.always(e[_.status]);return this},abort:function(e){var t=e||s;return u&&u.abort(t),l(0,t),this}};if(y.promise(_).complete=x.add,_.success=_.done,_.error=_.fail,m.url=((e||m.url||ct.href)+"").replace(dt,"").replace(gt,ct.protocol+"//"),m.type=t.method||t.type||m.method||m.type,m.dataTypes=S.trim(m.dataType||"*").toLowerCase().match(k)||[""],null==m.crossDomain){n=E.createElement("a");try{n.href=m.url,n.href=n.href,m.crossDomain=bt.protocol+"//"+bt.host!=n.protocol+"//"+n.host}catch(e){m.crossDomain=!0}}if(m.data&&m.processData&&"string"!=typeof m.data&&(m.data=S.param(m.data,m.traditional)),_t(vt,m,t,_),2===w)return _;for(r in(f=S.event&&m.global)&&0==S.active++&&S.event.trigger("ajaxStart"),m.type=m.type.toUpperCase(),m.hasContent=!mt.test(m.type),h=m.url,m.hasContent||(m.data&&(h=m.url+=(ht.test(h)?"&":"?")+m.data,delete m.data),!1===m.cache&&(m.url=pt.test(h)?h.replace(pt,"$1_="+ut++):h+(ht.test(h)?"&":"?")+"_="+ut++)),m.ifModified&&(S.lastModified[h]&&_.setRequestHeader("If-Modified-Since",S.lastModified[h]),S.etag[h]&&_.setRequestHeader("If-None-Match",S.etag[h])),(m.data&&m.hasContent&&!1!==m.contentType||t.contentType)&&_.setRequestHeader("Content-Type",m.contentType),_.setRequestHeader("Accept",m.dataTypes[0]&&m.accepts[m.dataTypes[0]]?m.accepts[m.dataTypes[0]]+("*"!==m.dataTypes[0]?", "+xt+"; q=0.01":""):m.accepts["*"]),m.headers)_.setRequestHeader(r,m.headers[r]);if(m.beforeSend&&(!1===m.beforeSend.call(g,_,m)||2===w))return _.abort();for(r in s="abort",{success:1,error:1,complete:1})_[r](m[r]);if(u=_t(yt,m,t,_)){if(_.readyState=1,f&&v.trigger("ajaxSend",[_,m]),2===w)return _;m.async&&0<m.timeout&&(p=T.setTimeout(function(){_.abort("timeout")},m.timeout));try{w=1,u.send(o,l)}catch(e){if(!(w<2))throw e;l(-1,e)}}else l(-1,"No Transport");function l(e,t,i,n){var r,o,a,s,l,c=t;2!==w&&(w=2,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){for(var n,r,o,a,s=e.contents,l=e.dataTypes;"*"===l[0];)l.shift(),void 0===n&&(n=e.mimeType||t.getResponseHeader("Content-Type"));if(n)for(r in s)if(s[r]&&s[r].test(n)){l.unshift(r);break}if(l[0]in i)o=l[0];else{for(r in i){if(!l[0]||e.converters[r+" "+l[0]]){o=r;break}a||(a=r)}o=o||a}return o?(o!==l[0]&&l.unshift(o),i[o]):void 0}(m,_,i)),s=function(e,t,i,n){var r,o,a,s,l,c={},u=e.dataTypes.slice();if(u[1])for(a in e.converters)c[a.toLowerCase()]=e.converters[a];for(o=u.shift();o;)if(e.responseFields[o]&&(i[e.responseFields[o]]=t),!l&&n&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),l=o,o=u.shift())if("*"===o)o=l;else if("*"!==l&&l!==o){if(!(a=c[l+" "+o]||c["* "+o]))for(r in c)if((s=r.split(" "))[1]===o&&(a=c[l+" "+s[0]]||c["* "+s[0]])){!0===a?a=c[r]:!0!==c[r]&&(o=s[0],u.unshift(s[1]));break}if(!0!==a)if(a&&e.throws)t=a(t);else try{t=a(t)}catch(e){return{state:"parsererror",error:a?e:"No conversion from "+l+" to "+o}}}return{state:"success",data:t}}(m,s,_,r),r?(m.ifModified&&((l=_.getResponseHeader("Last-Modified"))&&(S.lastModified[h]=l),(l=_.getResponseHeader("etag"))&&(S.etag[h]=l)),204===e||"HEAD"===m.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?y.resolveWith(g,[o,c,_]):y.rejectWith(g,[_,c,a]),_.statusCode(b),b=void 0,f&&v.trigger(r?"ajaxSuccess":"ajaxError",[_,m,r?o:a]),x.fireWith(g,[_,c]),f&&(v.trigger("ajaxComplete",[_,m]),--S.active||S.event.trigger("ajaxStop")))}return _},getJSON:function(e,t,i){return S.get(e,t,i,"json")},getScript:function(e,t){return S.get(e,void 0,t,"script")}}),S.each(["get","post"],function(e,r){S[r]=function(e,t,i,n){return S.isFunction(t)&&(n=n||i,i=t,t=void 0),S.ajax(S.extend({url:e,type:r,dataType:n,data:t,success:i},S.isPlainObject(e)&&e))}}),S._evalUrl=function(e){return S.ajax({url:e,type:"GET",dataType:"script",async:!1,global:!1,throws:!0})},S.fn.extend({wrapAll:function(t){var e;return S.isFunction(t)?this.each(function(e){S(this).wrapAll(t.call(this,e))}):(this[0]&&(e=S(t,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&e.insertBefore(this[0]),e.map(function(){for(var e=this;e.firstElementChild;)e=e.firstElementChild;return e}).append(this)),this)},wrapInner:function(i){return S.isFunction(i)?this.each(function(e){S(this).wrapInner(i.call(this,e))}):this.each(function(){var e=S(this),t=e.contents();t.length?t.wrapAll(i):e.append(i)})},wrap:function(t){var i=S.isFunction(t);return this.each(function(e){S(this).wrapAll(i?t.call(this,e):t)})},unwrap:function(){return this.parent().each(function(){S.nodeName(this,"body")||S(this).replaceWith(this.childNodes)}).end()}}),S.expr.filters.hidden=function(e){return!S.expr.filters.visible(e)},S.expr.filters.visible=function(e){return 0<e.offsetWidth||0<e.offsetHeight||0<e.getClientRects().length};var Et=/%20/g,St=/\[\]$/,Mt=/\r?\n/g,At=/^(?:submit|button|image|reset|file)$/i,Ct=/^(?:input|select|textarea|keygen)/i;function Lt(i,e,n,r){var t;if(S.isArray(e))S.each(e,function(e,t){n||St.test(i)?r(i,t):Lt(i+"["+("object"==typeof t&&null!=t?e:"")+"]",t,n,r)});else if(n||"object"!==S.type(e))r(i,e);else for(t in e)Lt(i+"["+t+"]",e[t],n,r)}S.param=function(e,t){var i,n=[],r=function(e,t){t=S.isFunction(t)?t():null==t?"":t,n[n.length]=encodeURIComponent(e)+"="+encodeURIComponent(t)};if(void 0===t&&(t=S.ajaxSettings&&S.ajaxSettings.traditional),S.isArray(e)||e.jquery&&!S.isPlainObject(e))S.each(e,function(){r(this.name,this.value)});else for(i in e)Lt(i,e[i],t,r);return n.join("&").replace(Et,"+")},S.fn.extend({serialize:function(){return S.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=S.prop(this,"elements");return e?S.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!S(this).is(":disabled")&&Ct.test(this.nodeName)&&!At.test(e)&&(this.checked||!q.test(e))}).map(function(e,t){var i=S(this).val();return null==i?null:S.isArray(i)?S.map(i,function(e){return{name:t.name,value:e.replace(Mt,"\r\n")}}):{name:t.name,value:i.replace(Mt,"\r\n")}}).get()}}),S.ajaxSettings.xhr=function(){try{return new T.XMLHttpRequest}catch(e){}};var Rt={0:200,1223:204},Pt=S.ajaxSettings.xhr();g.cors=!!Pt&&"withCredentials"in Pt,g.ajax=Pt=!!Pt,S.ajaxTransport(function(r){var o,a;return g.cors||Pt&&!r.crossDomain?{send:function(e,t){var i,n=r.xhr();if(n.open(r.type,r.url,r.async,r.username,r.password),r.xhrFields)for(i in r.xhrFields)n[i]=r.xhrFields[i];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]);o=function(e){return function(){o&&(o=a=n.onload=n.onerror=n.onabort=n.onreadystatechange=null,"abort"===e?n.abort():"error"===e?"number"!=typeof n.status?t(0,"error"):t(n.status,n.statusText):t(Rt[n.status]||n.status,n.statusText,"text"!==(n.responseType||"text")||"string"!=typeof n.responseText?{binary:n.response}:{text:n.responseText},n.getAllResponseHeaders()))}},n.onload=o(),a=n.onerror=o("error"),void 0!==n.onabort?n.onabort=a:n.onreadystatechange=function(){4===n.readyState&&T.setTimeout(function(){o&&a()})},o=o("abort");try{n.send(r.hasContent&&r.data||null)}catch(e){if(o)throw e}},abort:function(){o&&o()}}:void 0}),S.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(e){return S.globalEval(e),e}}}),S.ajaxPrefilter("script",function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")}),S.ajaxTransport("script",function(i){var n,r;if(i.crossDomain)return{send:function(e,t){n=S("<script>").prop({charset:i.scriptCharset,src:i.url}).on("load error",r=function(e){n.remove(),r=null,e&&t("error"===e.type?404:200,e.type)}),E.head.appendChild(n[0])},abort:function(){r&&r()}}});var kt=[],Nt=/(=)\?(?=&|$)|\?\?/;S.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=kt.pop()||S.expando+"_"+ut++;return this[e]=!0,e}}),S.ajaxPrefilter("json jsonp",function(e,t,i){var n,r,o,a=!1!==e.jsonp&&(Nt.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Nt.test(e.data)&&"data");return a||"jsonp"===e.dataTypes[0]?(n=e.jsonpCallback=S.isFunction(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(Nt,"$1"+n):!1!==e.jsonp&&(e.url+=(ht.test(e.url)?"&":"?")+e.jsonp+"="+n),e.converters["script json"]=function(){return o||S.error(n+" was not called"),o[0]},e.dataTypes[0]="json",r=T[n],T[n]=function(){o=arguments},i.always(function(){void 0===r?S(T).removeProp(n):T[n]=r,e[n]&&(e.jsonpCallback=t.jsonpCallback,kt.push(n)),o&&S.isFunction(r)&&r(o[0]),o=r=void 0}),"script"):void 0}),S.parseHTML=function(e,t,i){if(!e||"string"!=typeof e)return null;"boolean"==typeof t&&(i=t,t=!1),t=t||E;var n=b.exec(e),r=!i&&[];return n?[t.createElement(n[1])]:(n=ie([e],t,r),r&&r.length&&S(r).remove(),S.merge([],n.childNodes))};var Dt=S.fn.load;function Ot(e){return S.isWindow(e)?e:9===e.nodeType&&e.defaultView}S.fn.load=function(e,t,i){if("string"!=typeof e&&Dt)return Dt.apply(this,arguments);var n,r,o,a=this,s=e.indexOf(" ");return-1<s&&(n=S.trim(e.slice(s)),e=e.slice(0,s)),S.isFunction(t)?(i=t,t=void 0):t&&"object"==typeof t&&(r="POST"),0<a.length&&S.ajax({url:e,type:r||"GET",dataType:"html",data:t}).done(function(e){o=arguments,a.html(n?S("<div>").append(S.parseHTML(e)).find(n):e)}).always(i&&function(e,t){a.each(function(){i.apply(this,o||[e.responseText,t,e])})}),this},S.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){S.fn[t]=function(e){return this.on(t,e)}}),S.expr.filters.animated=function(t){return S.grep(S.timers,function(e){return t===e.elem}).length},S.offset={setOffset:function(e,t,i){var n,r,o,a,s,l,c=S.css(e,"position"),u=S(e),h={};"static"===c&&(e.style.position="relative"),s=u.offset(),o=S.css(e,"to
1p"),l=S.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),S.isFunction(t)&&(t=t.call(e,i,S.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)}},S.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){S.offset.setOffset(this,t,e)});var e,i,n=this[0],r={top:0,left:0},o=n&&n.ownerDocument;return o?(e=o.documentElement,S.contains(e,n)?(r=n.getBoundingClientRect(),i=Ot(o),{top:r.top+i.pageYOffset-e.clientTop,left:r.left+i.pageXOffset-e.clientLeft}):r):void 0},position:function(){if(this[0]){var e,t,i=this[0],n={top:0,left:0};return"fixed"===S.css(i,"position")?t=i.getBoundingClientRect():(e=this.offsetParent(),t=this.offset(),S.nodeName(e[0],"html")||(n=e.offset()),n.top+=S.css(e[0],"borderTopWidth",!0),n.left+=S.css(e[0],"borderLeftWidth",!0)),{top:t.top-n.top-S.css(i,"marginTop",!0),left:t.left-n.left-S.css(i,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var e=this.offsetParent;e&&"static"===S.css(e,"position");)e=e.offsetParent;return e||Le})}}),S.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,r){var o="pageYOffset"===r;S.fn[t]=function(e){return D(this,function(e,t,i){var n=Ot(e);return void 0===i?n?n[r]:e[t]:void(n?n.scrollTo(o?n.pageXOffset:i,o?i:n.pageYOffset):e[t]=i)},t,e,arguments.length)}}),S.each(["top","left"],function(e,i){S.cssHooks[i]=Pe(g.pixelPosition,function(e,t){return t?(t=Re(e,i),Me.test(t)?S(e).position()[i]+"px":t):void 0})}),S.each({Height:"height",Width:"width"},function(o,a){S.each({padding:"inner"+o,content:a,"":"outer"+o},function(n,e){S.fn[e]=function(e,t){var i=arguments.length&&(n||"boolean"!=typeof e),r=n||(!0===e||!0===t?"margin":"border");return D(this,function(e,t,i){var n;return S.isWindow(e)?e.document.documentElement["client"+o]:9===e.nodeType?(n=e.documentElement,Math.max(e.body["scroll"+o],n["scroll"+o],e.body["offset"+o],n["offset"+o],n["client"+o])):void 0===i?S.css(e,t,r):S.style(e,t,i,r)},a,i?e:void 0,i,null)}})}),S.fn.extend({bind:function(e,t,i){return this.on(e,null,t,i)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,i,n){return this.on(t,e,i,n)},undelegate:function(e,t,i){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",i)},size:function(){return this.length}}),S.fn.andSelf=S.fn.addBack,"function"==typeof define&&define.amd&&define("jquery",[],function(){return S});var It=T.jQuery,Ut=T.$;return S.noConflict=function(e){return T.$===S&&(T.$=Ut),e&&T.jQuery===S&&(T.jQuery=It),S},e||(T.jQuery=T.$=S),S});var modules={data:[],add:function(e){modules.data.push(e)},init:function(){for(var e=0,t=modules.data.length;e<t;e++)window[modules.data[e]].init()}};!function(e){"use strict";"function"==typeof define&&define.amd?define(["jquery"],e):"undefined"!=typeof exports?module.exports=e(require("jquery")):e(jQuery)}(function(c){"use strict";var r,a=window.Slick||{};(r=0,a=function(e,t){var i,n=this;n.defaults={accessibility:!0,adaptiveHeight:!1,appendArrows:c(e),appendDots:c(e),arrows:!0,asNavFor:null,prevArrow:'<button class="slick-prev" aria-label="Previous" type="button">Previous</button>',nextArrow:'<button class="slick-next" aria-label="Next" type="button">Next</button>',autoplay:!1,autoplaySpeed:3e3,centerMode:!1,centerPadding:"50px",cssEase:"ease",customPaging:function(e,t){return c('<button type="button" />').text(t+1)},dots:!1,dotsClass:"slick-dots",draggable:!0,easing:"linear",edgeFriction:.35,fade:!1,focusOnSelect:!1,focusOnChange:!1,infinite:!0,initialSlide:0,lazyLoad:"ondemand",mobileFirst:!1,pauseOnHover:!0,pauseOnFocus:!0,pauseOnDotsHover:!1,respondTo:"window",responsive:null,rows:1,rtl:!1,slide:"",slidesPerRow:1,slidesToShow:1,slidesToScroll:1,speed:500,swipe:!0,swipeToSlide:!1,touchMove:!0,touchThreshold:5,useCSS:!0,useTransform:!0,variableWidth:!1,vertical:!1,verticalSwiping:!1,waitForAnimate:!0,zIndex:1e3},n.initials={animating:!1,dragging:!1,autoPlayTimer:null,currentDirection:0,currentLeft:null,currentSlide:0,direction:1,$dots:null,listWidth:null,listHeight:null,loadIndex:0,$nextArrow:null,$prevArrow:null,scrolling:!1,slideCount:null,slideWidth:null,$slideTrack:null,$slides:null,
vendor: 7,616 bytes, line 1
1sliding:!1,slideOffset:0,swipeLeft:null,swiping:!1,$list:null,touchObject:{},transformsEnabled:!1,unslicked:!1},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)}).prototype.activateADA=function(){this.$slideTrack.find(".slick-active").attr({"aria-hidden":"false"}).find("a, input, button, select").attr({tabindex:"0"})},a.prototype.addSlide=a.prototype.slickAdd=function(e,t,i){var n=this;if("boolean"==typeof t)i=t,t=null;else if(t<0||t>=n.slideCount)return!1;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){c(t).attr("data-slick-index",e)}),n.$slidesCache=n.$slides,n.reinit()},a.prototype.animateHeight=function(){var e=this;if(1===e.options.slidesToShow&&!0===e.options.adaptiveHeight&&!1===e.options.vertical){var t=e.$slides.eq(e.currentSlide).outerHeight(!0);e.$list.animate({height:t},e.options.speed)}},a.prototype.animateSlide=function(e,t){var i={},n=this;n.animateHeight(),!0===n.options.rtl&&!1===n.options.vertical&&(e=-e),!1===n.transformsEnabled?!1===n.options.vertical?n.$slideTrack.animate({left:e},n.options.speed,n.options.easing,t):n.$slideTrack.animate({top:e},n.options.speed,n.options.easing,t):!1===n.cssTransitions?(!0===n.options.rtl&&(n.currentLeft=-n.currentLeft),c({animStart:n.currentLeft}).animate({animStart:e},{duration:n.options.speed,easing:n.options.easing,step:function(e){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)},complete:function(){t&&t.call()}})):(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(){n.disableTransition(),t.call()},n.options.speed))},a.prototype.getNavTarget=function(){var e=this.options.asNavFor;return e&&null!==e&&(e=c(e).not(this.$slider)),e},a.prototype.asNavFor=function(t){var e=this.getNavTarget();null!==e&&"object"==typeof e&&e.each(function(){var e=c(this).slick("getSlick");e.unslicked||e.slideHandler(t,!0)})},a.prototype.applyTransition=function(e){var t=this,i={};!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)},a.prototype.autoPlay=function(){var e=this;e.autoPlayClear(),e.slideCount>e.options.slidesToShow&&(e.autoPlayTimer=setInterval(e.autoPlayIterator,e.options.autoplaySpeed))},a.prototype.autoPlayClear=function(){this.autoPlayTimer&&clearInterval(this.autoPlayTimer)},a.prototype.autoPlayIterator=function(){var e=this,t=e.currentSlide+e.options.slidesToScroll;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))},a.prototype.buildArrows=function(){var e=this;!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({"aria-disabled":"true",tabindex:"-1"}))},a.prototype.buildDots=function(){var e,t,i=this;if(!0===i.options.dots){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)));i.$dots=t.appendTo(i.options.appendDots),i.$dots.find("li").first().addClass("slick-active")}},a.prototype.buildOut=function(){var e=this;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){c(t).attr("data-slick-index",e).data("originalStyling",c(t).attr("style")||"")}),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")},a.prototype.buildRows=function(){var e,t,i,n,r,o,a,s=this;if(n=document.createDocumentFragment(),o=s.$slider.children(),1<s.options.rows){for(a=s.options.slidesPerRow*s.options.rows,r=Math.ceil(o.length/a),e=0;e<r;e++){var l=document.createElement("div");for(t=0;t<s.options.rows;t++){var c=document.createElement("div");for(i=0;i<s.options.slidesPerRow;i++){var u=e*a+(t*s.options.slidesPerRow+i);o.get(u)&&c.appendChild(o.get(u))}l.appendChild(c)}n.appendChild(l)}s.$slider.empty().append(n),s.$slider.children().children().children().css({width:100/s.options.slidesPerRow+"%",display:"inline-block"})}},a.prototype.checkResponsive=function(e,t){var i,n,r,o=this,a=!1,s=o.$slider.width(),l=window.innerWidth||c(window).width();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){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]));null!==n?null!==o.activeBreakpoint?(n!==o.activeBreakpoint||t)&&(o.activeBreakpoint=n,"unsl
1ick"===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])}},a.prototype.changeSlide=function(e,t){var i,n,r=this,o=c(e.currentTarget);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){case"previous":n=0===i?r.options.slidesToScroll:r.options.slidesToShow-i,r.slideCount>r.options.slidesToShow&&r.slideHandler(r.currentSlide-n,!1,t);break;case"next":n=0===i?r.options.slidesToScroll:i,r.slideCount>r.options.slidesToShow&&r.slideHandler(r.currentSlide+n,!1,t);break;case"index":var a=0===e.data.index?0:e.data.index||o.index()*r.options.slidesToScroll;r.slideHandler(r.checkNavigable(a),!1,t),o.children().trigger("focus");break;default:return}},a.prototype.checkNavigable=function(e){var t,i;if(i=0,e>(t=this.getNavigableIndexes())[t.length-1])e=t[t.length-1];else for(var n in t){if(e<t[n]){e=i;break}i=t[n]}return e},a.prototype.cleanUpEvents=function(){var e=this;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.slick mouseleave.
1slick",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)},a.prototype.cleanUpSlideEvents=function(){var e=this;e.$list.off("mouseenter.slick",c.proxy(e.interrupt,e,!0)),e.$list.off("mouseleave.slick",c.proxy(e.interrupt,e,!1))},a.prototype.cleanUpRows=function(){var e;1<this.options.rows&&((e=this.$slides.children().children()).removeAttr("style"),this.$slider.empty().append(e))},a.prototype.clickHandler=function(e){!1===this.shouldClick&&(e.stopImmediatePropagation(),e.stopPropagation(),e.preventDefault())},a.prototype.destroy=function(e){var t=this;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(){c(this).attr("style",c(this).data("originalStyling"))}),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])},a.prototype.disableTransition=function(e){var t={};t[this.transitionType]="",!1===this.options.fade?this.$slideTrack.css(t):this.$slides.eq(e).css(t)},a.prototype.fadeSlide=function(e,t){var i=this;!1===i.cssTransitions?(i.$slides.eq(e).css({zIndex:i.options.zIndex}),i.$slides.eq(e).animate({opacity:1},i.options.speed,i.options.easing,t)):(i.applyTransition(e),i.$slides.eq(e).css({opacity:1,zIndex:i.options.zIndex}),t&&setTimeout(function(){i.disableTransition(e),t.call()},i.options.speed))},a.prototype.fadeSlideOut=function(e){var t=this;!1===t.cssTransitions?t.$slides.eq(e).animate({opacity:0,zIndex:t.options.zIndex-2},t.options.speed,t.options.easing):(t.applyTransition(e),t.$slides.eq(e).css({opacity:0,zIndex:t.options.zIndex-2}))},a.prototype.filterSlides=a.prototype.slickFilter=function(e){var t=this;null!==e&&(t.$slidesCache=t.$slides,t.unload(),t.$slideTrack.children(this.options.slide).detach(),t.$slidesCache.filter(e).appendTo(t.$slideTrack),t.reinit())},a.prototype.focusHandler=function(){var i=this;i.$slider.off("focus.slick blur.slick").on("focus.slick blur.slick","*",function(e){e.stopImmediatePropagation();var t=c(this);setTimeout(function(){i.options.pauseOnFocus&&(i.focussed=t.is(":focus"),i.autoPlay())},0)})},a.prototype.getCurrent=a.prototype.slickCurrentSlide=function(){return this.currentSlide},a.prototype.getDotCount=function(){var e=this,t=0,i=0,n=0;if(!0===e.options.infinite)if(e.slideCount<=e.options.slidesToShow)++n;else for(;t<e.slideCount;)++n,t=i+e.options.slidesToScroll,i+=e.options.slidesToScroll<=e.options.slidesToShow?e.options.slidesToScroll:e.options.slidesToShow;else if(!0===e.options.centerMode)n=e.slideCount;else if(e.options.asNavFor)for(;t<e.slideCount;)++n,t=i+e.options.slidesToScroll,i+=e.options.slidesToScroll<=e.options.slidesToShow?e.options.slidesToScroll:e.options.slidesToShow;else n=1+Math.ceil((e.slideCount-e.options.slidesToShow)/e.options.slidesToScroll);return n-1},a.prototype.getLeft=function(e){var t,i,n,r,o=this,a=0;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},a.prototype.getOption=a.prototype.slickGetOption=function(e){return this.options[e]},a.prototype.getNavigableIndexes=function(){var e,t=this,i=0,n=0,r=[];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;return r},a.prototype.getSlick=function(){return this},a.prototype.getSlideCount=function(){var i,n,r=this;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){if(t.offsetLeft-n+c(t).outerWidth()/2>-1*r.swipeLeft)return i=t,!1}),Math.abs(c(i).attr("data-slick-index")-r.currentSlide)||1):r.options.slidesToScroll},a.prototype.goTo=a.prototype.slickGoTo=function(e,t){this.changeSlide({data:{message:"index",index:
1parseInt(e)}},t)},a.prototype.init=function(e){var t=this;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())},a.prototype.initADA=function(){var i=this,n=Math.ceil(i.slideCount/i.options.slidesToShow),r=i.getNavigableIndexes().filter(function(e){return 0<=e&&e<i.slideCount});i.$slides.add(i.$slideTrack.find(".slick-cloned")).attr({"aria-hidden":"true",tabindex:"-1"}).find("a, input, button, select").attr({tabindex:"-1"}),null!==i.$dots&&(i.$slides.not(i.$slideTrack.find(".slick-cloned")).each(function(e){var t=r.indexOf(e);c(this).attr({role:"tabpanel",id:"slick-slide"+i.instanceUid+e,tabindex:-1}),-1!==t&&c(this).attr({"aria-describedby":"slick-slide-control"+i.instanceUid+t})}),i.$dots.attr("role","tablist").find("li").each(function(e){var t=r[e];c(this).attr({role:"presentation"}),c(this).find("button").first().attr({role:"tab",id:"slick-slide-control"+i.instanceUid+e,"aria-controls":"slick-slide"+i.instanceUid+t,"aria-label":e+1+" of "+n,"aria-selected":null,tabindex:"-1"})}).eq(i.currentSlide).find("button").attr({"aria-selected":"true",tabindex:"0"}).end());for(var e=i.currentSlide,t=e+i.options.slidesToShow;e<t;e++)i.$slides.eq(e).attr("tabindex",0);i.activateADA()},a.prototype.initArrowEvents=function(){var e=this;!0===e.options.arrows&&e.slideCount>e.options.slidesToShow&&(e.$prevArrow.off("click.slick").on("click.slick",{message:"previous"},e.changeSlide),e.$nextArrow.off("click.slick").on("click.slick",{message:"next"},e.changeSlide),!0===e.options.accessibility&&(e.$prevArrow.on("keydown.slick",e.keyHandler),e.$nextArrow.on("keydown.slick",e.keyHandler)))},a.prototype.initDotEvents=function(){var e=this;!0===e.options.dots&&(c("li",e.$dots).on("click.slick",{message:"index"},e.changeSlide),!0===e.options.accessibility&&e.$dots.on("keydown.slick",e.keyHandler)),!0===e.options.dots&&!0===e.options.pauseOnDotsHover&&c("li",e.$dots).on("mouseenter.slick",c.proxy(e.interrupt,e,!0)).on("mouseleave.slick",c.proxy(e.interrupt,e,!1))},a.prototype.initSlideEvents=function(){var e=this;e.options.pauseOnHover&&(e.$list.on("mouseenter.slick",c.proxy(e.interrupt,e,!0)),e.$list.on("mouseleave.slick",c.proxy(e.interrupt,e,!1)))},a.prototype.initializeEvents=function(){var e=this;e.initArrowEvents(),e.initDotEvents(),e.initSlideEvents(),e.$list.on("touchstart.slick mousedown.slick",{action:"start"},e.swipeHandler),e.$list.on("touchmove.slick mousemove.slick",{action:"move"},e.swipeHandler),e.$list.on("touchend.slick mouseup.slick",{action:"end"}
1,e.swipeHandler),e.$list.on("touchcancel.slick mouseleave.slick",{action:"end"},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)},a.prototype.initUI=function(){var e=this;!0===e.options.arrows&&e.slideCount>e.options.slidesToShow&&(e.$prevArrow.show(),e.$nextArrow.show()),!0===e.options.dots&&e.slideCount>e.options.slidesToShow&&e.$dots.show()},a.prototype.keyHandler=function(e){var t=this;e.target.tagName.match("TEXTAREA|INPUT|SELECT")||(37===e.keyCode&&!0===t.options.accessibility?t.changeSlide({data:{message:!0===t.options.rtl?"next":"previous"}}):39===e.keyCode&&!0===t.options.accessibility&&t.changeSlide({data:{message:!0===t.options.rtl?"previous":"next"}}))},a.prototype.lazyLoad=function(){function e(e){c("img[data-lazy]",e).each(function(){var e=c(this),t=c(this).attr("data-lazy"),i=c(this).attr("data-srcset"),n=c(this).attr("data-sizes")||o.$slider.attr("data-sizes"),r=document.createElement("img");r.onload=function(){e.animate({opacity:0}
vendor: 7,057 bytes, line 1
1,100,function(){i&&(e.attr("srcset",i),n&&e.attr("sizes",n)),e.attr("src",t).animate({opacity:1},200,function(){e.removeAttr("data-lazy data-srcset data-sizes").removeClass("slick-loading")}),o.$slider.trigger("lazyLoaded",[o,e,t])})},r.onerror=function(){e.removeAttr("data-lazy").removeClass("slick-loading").addClass("slick-lazyload-error"),o.$slider.trigger("lazyLoadError",[o,e,t])},r.src=t})}var t,i,n,o=this;if(!0===o.options.centerMode?!0===o.options.infinite?n=(i=o.currentSlide+(o.options.slidesToShow/2+1))+o.options.slidesToShow+2:(i=Math.max(0,o.currentSlide-(o.options.slidesToShow/2+1)),n=o.options.slidesToShow/2+1+2+o.currentSlide):(i=o.options.infinite?o.options.slidesToShow+o.currentSlide:o.currentSlide,n=Math.ceil(i+o.options.slidesToShow),!0===o.options.fade&&(0<i&&i--,n<=o.slideCount&&n++)),t=o.$slider.find(".slick-slide").slice(i,n),"anticipated"===o.options.lazyLoad)for(var r=i-1,a=n,s=o.$slider.find(".slick-slide"),l=0;l<o.options.slidesToScroll;l++)r<0&&(r=o.slideCount-1),t=(t=t.add(s.eq(r))).add(s.eq(a)),r--,a++;e(t),o.slideCount<=o.options.slidesToShow?e(o.$slider.find(".slick-slide")):o.currentSlide>=o.slideCount-o.options.slidesToShow?e(o.$slider.find(".slick-cloned").slice(0,o.options.slidesToShow)):0===o.currentSlide&&e(o.$slider.find(".slick-cloned").slice(-1*o.options.slidesToShow))},a.prototype.loadSlider=function(){var e=this;e.setPosition(),e.$slideTrack.css({opacity:1}),e.$slider.removeClass("slick-loading"),e.initUI(),"progressive"===e.options.lazyLoad&&e.progressiveLazyLoad()},a.prototype.next=a.prototype.slickNext=function(){this.changeSlide({data:{message:"next"}})},a.prototype.orientationChange=function(){this.checkResponsive(),this.setPosition()},a.prototype.pause=a.prototype.slickPause=function(){this.autoPlayClear(),this.paused=!0},a.prototype.play=a.prototype.slickPlay=function(){var e=this;e.autoPlay(),e.options.autoplay=!0,e.paused=!1,e.focussed=!1,e.interrupted=!1},a.prototype.postSlide=function(e){var t=this;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()))},a.prototype.prev=a.prototype.slickPrev=function(){this.changeSlide({data:{message:"previous"}})},a.prototype.preventDefault=function(e){e.preventDefault()},a.prototype.progressiveLazyLoad=function(e){e=e||1;var t,i,n,r,o,a=this,s=c("img[data-lazy]",a.$slider);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(){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()},o.onerror=function(){e<3?setTimeout(function(){a.progressiveLazyLoad(e+1)},500):(t.removeAttr("data-lazy").removeClass("slick-loading").addClass("slick-lazyload-error"),a.$slider.trigger("lazyLoadError",[a,t,i]),a.progressiveLazyLoad())},o.src=i):a.$slider.trigger("allImagesLoaded",[a])},a.prototype.refresh=function(e){var t,i,n=this;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,{currentSlide:t}),n.init(),e||n.changeSlide({data:{message:"index",index:t}},!1)},a.prototype.registerBreakpoints=function(){var e,t,i,n=this,r=n.options.responsive||null;if("array"===c.type(r)&&r.length){for(e in n.respondTo=n.options.respondTo||"window",r)if(i=n.breakpoints.length-1,r.hasOwnProperty(e)){for(t=r[e].breakpoint;0<=i;)n.breakpoints[i]&&n.breakpoints[i]===t&&n.breakpoints.splice(i,1),i--;n.breakpoints.push(t),n.breakpointSettings[t]=r[e].settings}n.breakpoints.sort(function(e,t){return n.options.mobileFirst?e-t:t-e})}},a.prototype.reinit=function(){var e=this;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])},a.prototype.resize=function(){var e=this;c(window).width()!==e.windowWidth&&(clearTimeout(e.windowDelay),e.windowDelay=window.setTimeout(function(){e.windowWidth=c(window).width(),e.checkResponsive(),e.unslicked||e.setPosition()},50))},a.prototype.removeSlide=a.prototype.slickRemove=function(e,t,i){var n=this;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;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()},a.prototype.setCSS=function(e){var t,i,n=this,r={};!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)},a.prototype.setDimensions=function(){var e=this;!1===e.options.vertical?!0===e.options.centerMode&&e.$list.css({padding:"0px "+e.options.centerPadding}):(e.$list.height(e.$slides.first().outerHeight(!0)*e.options.slidesToShow),!0===e.options.centerMode&&e.$list.css({padding:e.options.centerPadding+" 0px"})),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)));var t=e.$slides.first().outerWidth(!0)-e.$slides.first().width();!1===e.options.variableWidth&&e.$slideTrack.children(".slick-slide").width(e.slideWidth-t)},a.prototype.setFade=function(){var i,n=this;n.$slides.each(function(e,t){i=n.slideWidth*e*-1,!0===n.options.rtl?c(t).css({position:"relative",right:i,top:0,zIndex:n.options.zIndex-2,opacity:0}
1):c(t).css({position:"relative",left:i,top:0,zIndex:n.options.zIndex-2,opacity:0})}),n.$slides.eq(n.currentSlide).css({zIndex:n.options.zIndex-1,opacity:1})},a.prototype.setHeight=function(){var e=this;if(1===e.options.slidesToShow&&!0===e.options.adaptiveHeight&&!1===e.options.vertical){var t=e.$slides.eq(e.currentSlide).outerHeight(!0);e.$list.css("height",t)}},a.prototype.setOption=a.prototype.slickSetOption=function(){var e,t,i,n,r,o=this,a=!1;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;else if("multiple"===r)c.each(i,function(e,t){o.options[e]=t});else if("responsive"===r)for(t in n)if("array"!==c.type(o.options.responsive))o.options.responsive=[n[t]];else{for(e=o.options.responsive.length-1;0<=e;)o.options.responsive[e].breakpoint===n[t].breakpoint&&o.options.responsive.splice(e,1),e--;o.options.responsive.push(n[t])}a&&(o.unload(),o.reinit())},a.prototype.setPosition=function(){var e=this;e.setDimensions(),e.setHeight(),!1===e.options.fade?e.setCSS(e.getLeft(e.currentSlide)):e.setFade(),e.$slider.trigger("setPosition",[e])},a.prototype.setProps=function(){var e=this,t=document.body.style;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.options.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},a.prototype.setSlideClasses=function(e){var t,i,n,r,o=this;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){var a=o.options.slidesToShow%2==0?1:0;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")}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"));"ondemand"!==o.options.lazyLoad&&"anticipated"!==o.options.lazyLoad||o.lazyLoad()},a.prototype.setupInfinite=function(){var e,t,i,n=this;if(!0===n.options.fade&&(n.options.centerMode=!1),!0===n.options.infinite&&!1===n.options.fade&&(t=null,n.slideCount>n.options.slidesToShow)){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");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");n.$slideTrack.find(".slick-cloned").find("[id]").each(function(){c(this).attr("id","")})}},a.prototype.interrupt=function(e){e||this.autoPlay(),this.interrupted=e},a.prototype.selectHandler=function(e){var t=c(e.target).is(".slick-slide")?c(e.target):c(e.target).parents(".slick-slide"),i=parseInt(t.attr("data-slick-index"));i||(i=0),this.slideCount<=this.options.slidesToShow?this.slideHandler(i,!1,!0):this.slideHandler(i)},a.prototype.slideHandler=function(e,t,i){var n,r,o,a,s,l=null,c=this;if(t=t||!1,!(!0===c.animating&&!0===c.options.waitForAnimate||!0===c.options.fade&&c.currentSlide===e))if(!1===t&&c.asNavFor(e),n=e,l=c.getLeft(n),a=c.getLeft(c.
vendor: 5,705 bytes, line 1
1currentSlide),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.animateSlide(a,function(){c.postSlide(n)}):c.postSlide(n));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.animateSlide(a,function(){c.postSlide(n)}):c.postSlide(n));else{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&&(s=(s=c.getNavTarget()).slick("getSlick")).slideCount<=s.options.slidesToShow&&s.setSlideClasses(c.currentSlide),c.updateDots(),c.updateArrows(),!0===c.options.fade)return!0!==i?(c.fadeSlideOut(o),c.fadeSlide(r,function(){c.postSlide(r)})):c.postSlide(r),void c.animateHeight();!0!==i?c.animateSlide(l,function(){c.postSlide(r)}):c.postSlide(r)}},a.prototype.startLoad=function(){var e=this;!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")},a.prototype.swipeDirection=function(){var e,t,i,n,r=this;return e=r.touchObject.startX-r.touchObject.curX,t=r.touchObject.startY-r.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===r.options.rtl?"left":"right":n<=360&&315<=n?!1===r.options.rtl?"left":"right":135<=n&&n<=225?!1===r.options.rtl?"right":"left":!0===r.options.verticalSwiping?35<=n&&n<=135?"down":"up":"vertical"},a.prototype.swipeEnd=function(e){var t,i,n=this;if(n.dragging=!1,n.swiping=!1,n.scrolling)return n.scrolling=!1;if(n.interrupted=!1,n.shouldClick=!(10<n.touchObject.swipeLength),void 0===n.touchObject.curX)return!1;if(!0===n.touchObject.edgeHit&&n.$slider.trigger("edge",[n,n.swipeDirection()]),n.touchObject.swipeLength>=n.touchObject.minSwipe){switch(i=n.swipeDirection()){case"left":case"down":t=n.options.swipeToSlide?n.checkNavigable(n.currentSlide+n.getSlideCount()):n.currentSlide+n.getSlideCount(),n.currentDirection=0;break;case"right":case"up":t=n.options.swipeToSlide?n.checkNavigable(n.currentSlide-n.getSlideCount()):n.currentSlide-n.getSlideCount(),n.currentDirection=1}"vertical"!=i&&(n.slideHandler(t),n.touchObject={},n.$slider.trigger("swipe",[n,i]))}else n.touchObject.startX!==n.touchObject.curX&&(n.slideHandler(n.currentSlide),n.touchObject={})},a.prototype.swipeHandler=function(e){var t=this;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){case"start":t.swipeStart(e);break;case"move":t.swipeMove(e);break;case"end":t.swipeEnd(e)}},a.prototype.swipeMove=function(e){var t,i,n,r,o,a,s=this;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))))},a.prototype.swipeStart=function(e){var t,i=this;if(i.interrupted=!0,1!==i.touchObject.fingerCount||i.slideCount<=i.options.slidesToShow)return!(i.touchObject={});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},a.prototype.unfilterSlides=a.prototype.slickUnfilter=function(){var e=this;null!==e.$slidesCache&&(e.unload(),e.$slideTrack.children(this.options.slide).detach(),e.$slidesCache.appendTo(e.$slideTrack),e.reinit())},a.prototype.unload=function(){var e=this;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","")}
1,a.prototype.unslick=function(e){this.$slider.trigger("unslick",[this,e]),this.destroy()},a.prototype.updateArrows=function(){var e=this;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")))},a.prototype.updateDots=function(){var e=this;null!==e.$dots&&(e.$dots.find("li").removeClass("slick-active").end(),e.$dots.find("li").eq(Math.floor(e.currentSlide/e.options.slidesToScroll)).addClass("slick-active"))},a.prototype.visibility=function(){this.options.autoplay&&(document[this.hidden]?this.interrupted=!0:this.interrupted=!1)},c.fn.slick=function(){var e,t,i=this,n=arguments[0],r=Array.prototype.slice.call(arguments,1),o=i.length;for(e=0;e<o;e++)if("object"==typeof n||void 0===n?i[e].slick=new a(i[e],n):t=i[e].slick[n].apply(i[e].slick,r),void 0!==t)return t;return i}}),function(e){"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?module.exports=e():window.noUiSlider=e()}(function(){"use strict";function s(e){return null!=e}function Z(e){e.preventDefault()}function r(e){return"number"==typeof e&&!isNaN(e)&&isFinite(e)}function Q(e,t,i){0<i&&(te(e,t),setTimeout(function(){ie(e,t)},i))}function K(e){return Math.max(Math.min(e,100),0)}function ee(e){return Array.isArray(e)?e:[e]}function t(e){var t=(e=String(e)).split(".");return 1<t.length?t[1].length:0}function te(e,t){e.classList?e.classList.add(t):e.className+=" "+t}function ie(e,t){e.classList?e.classList.remove(t):e.className=e.className.replace(new RegExp("(^|\\b)"+t.split(" ").join("|")+"(\\b|$)","gi")," ")}function ne(e){var t=void 0!==window.pageXOffset,i="CSS1Compat"===(e.compatMode||"");return{x:t?window.pageXOffset:i?e.documentElement.scrollLeft:e.body.scrollLeft,y:t?window.pageYOffset:i?e.documentElement.scrollTop:e.body.scrollTop}}function u(e,t){return 100/(t-e)}function h(e,t){return 100*t/(e[1]-e[0])}function d(e,t){for(var i=1;e>=t[i];)i+=1;return i}function i(e,t,i){if(i>=e.slice(-1)[0])return 100;var n,r,o=d(i,e),a=e[o-1],s=e[o],l=t[o-1],c=t[o];return l+(r=i,h(n=[a,s],n[0]<0?r+Math.abs(n[0]):r-n[0])/u(l,c))}function n(e,t,i,n){if(100===n)return n;var r,o,a=d(n,e),s=e[a-1],l=e[a];return i?(l-s)/2<n-s?l:s:t[a-1]?e[a-1]+(r=n-e[a-1],o=t[a-1],Math.round(r/o)*o):n}function o(e,t,i){var n;if("number"==typeof t&&(t=[t]),!Array.isArray(t))throw new Error("noUiSlider ("+oe+"): 'range' contains invalid value.");if(!r(n="min"===e?0:"max"===e?100:parseFloat(e))||!r(t[0]))throw new Error("noUiSlider ("+oe+"): 'range' value isn't numeric.");i.xPct.push(n),i.xVal.push(t[0]),n?i.xSteps.push(!isNaN(t[1])&&t[1]):isNaN(t[1])||(i.xSteps[0]=t[1]),i.xHighestCompleteStep.push(0)}function a(e,t,i){if(!t)return!0;i.xSteps[e]=h([i.xVal[e],i.xVal[e+1]],t)/u(i.xPct[e],i.xPct[e+1]);var n=(i.xVal[e+1]-i.xVal[e])/i.xNumSteps[e],r=Math.ceil(Number(n.toFixed(3))-1),o=i.xVal[e]+i.xNumSteps[e]*r;i.xHighestCompleteStep[e]=o}function l(e,t,i){this.xPct=[],this.xVal=[],this.xSteps=[i||!1],this.xNumSteps=[!1],this.xHighestCompleteStep=[],this.snap=t;var n,r=[];for(n in e)e.hasOwnProperty(n)&&r.push([e[n],n]);for(r.length&&"object"==typeof r[0][0]?r.sort(function(e,t){return e[0][0]-t[0][0]}):r.sort(function(e,t){return e[0]-t[0]}),n=0;n<r.length;n++)o(r[n][1],r[n][0],this);for(this.xNumSteps=this.xSteps.slice(0),n=0;n<this.xNumSteps.length;n++)a(n,this.xNumSteps[n],this)}function c(e){if("object"==typeof(t=e)&&"function"==typeof t.to&&"function"==typeof t.from)return!0;var t;throw new Error("noUiSlider ("+oe+"): 'format' requires 'to' and 'from' methods.")}function p(e,t){if(!r(t))throw new Error("noUiSlider ("+oe+"): 'step' is not numeric.");e.singleStep=t}function f(e,t){if("object"!=typeof t||Array.isArray(t))throw new Error("noUiSlider ("+oe+"): 'range' is not an object.");if(void 0===t.min||void 0===t.max)throw new Error("noUiSlider ("+oe+"): Missing 'min' or 'max' in 'range'.");if(t.min===t.max)throw new Error("noUiSlider ("+oe+"): 'range' 'min' and 'max' cannot be equal.");e.spectrum=new l(t,e.snap,e.singleStep)}function m(e,t){if(t=ee(t),!Array.isArray(t)||!t.length)throw new Error("noUiSlider ("+oe+"): 'start' option is incorrect.");e.handles=t.length,e.start=t}function g(e,t){if("boolean"!=typeof(e.snap=t))throw new Error("noUiSlider ("+oe+"): 'snap' option must be a boolean.")}function v(e,t){if("boolean"!=typeof(e.animate=t))throw new Error("noUiSlider ("+oe+"): 'animate' option must be a boolean.")}function y(e,t){if("number"!=typeof(e.animationDuration=t))throw new Error("noUiSlider ("+oe+"): 'animationDuration' option must be a number.")}function x(e,t){var i,n=[!1];if("lower"===t?t=[!0,!1]:"upper"===t&&(t=[!1,!0]),!0===t||!1===t){for(i=1;i<e.handles;i++)n.push(t);n.push(!1)}else{if(!Array.isArray(t)||!t.length||t.length!==e.handles+1)throw new Error("noUiSlider ("+oe+"): 'connect' option doesn't match handle count.");n=t}e.connect=n}function b(e,t){switch(t){case"horizontal":e.ort=0;break;case"vertical":e.ort=1;break;default:throw new Error("noUiSlider ("+oe+"): 'orientation' option is invali
1d.")}}function w(e,t){if(!r(t))throw new Error("noUiSlider ("+oe+"): 'margin' option must be numeric.");if(0!==t&&(e.margin=e.spectrum.getMargin(t),!e.margin))throw new Error("noUiSlider ("+oe+"): 'margin' option is only supported on linear sliders.")}function _(e,t){if(!r(t))throw new Error("noUiSlider ("+oe+"): 'limit' option must be numeric.");if(e.limit=e.spectrum.getMargin(t),!e.limit||e.handles<2)throw new Error("noUiSlider ("+oe+"): 'limit' option is only supported on linear sliders with 2 or more handles.")}function T(e,t){if(!r(t)&&!Array.isArray(t))throw new Error("noUiSlider ("+oe+"): 'padding' option must be numeric or array of exactly 2 numbers.");if(Array.isArray(t)&&2!==t.length&&!r(t[0])&&!r(t[1]))throw new Error("noUiSlider ("+oe+"): 'padding' option must be numeric or array of exactly 2 numbers.");if(0!==t){if(Array.isArray(t)||(t=[t,t]),!(e.padding=[e.spectrum.getMargin(t[0]),e.spectrum.getMargin(t[1])])===e.padding[0]||!1===e.padding[1])throw new Error("noUiSlider ("+oe+"): 'padding' option is only supported on linear sliders.");if(e.padding[0]<0||e.padding[1]<0)throw new Error("noUiSlider ("+oe+"): 'padding' option must be a positive number(s).");if(100<=e.padding[0]+e.padding[1])throw new Error("noUiSlider ("+oe+"): 'padding' option must not exceed 100% of the range.")}}function E(e,t){switch(t){case"ltr":e.dir=0;break;case"rtl":e.dir=1;break;default:throw new Error("noUiSlider ("+oe+"): 'direction' option was not recognized.")}}function S(e,t){if("string"!=typeof t)throw new Error("noUiSlider ("+oe+"): 'behaviour' must be a string containing options.");var i=0<=t.indexOf("tap"),n=0<=t.indexOf("drag"),r=0<=t.indexOf("fixed"),o=0<=t.indexOf("snap"),a=0<=t.indexOf("hover");if(r){if(2!==e.handles)throw new Error("noUiSlider ("+oe+"): 'fixed' behaviour must be used with 2 handles");w(e,e.start[1]-e.start[0])}e.events={tap:i||o,drag:n,fixed:r,snap:o,hover:a}}function M(e,t){if(!1!==t)if(!0===t){e.tooltips=[];for(var i=0;i<e.handles;i++)e.tooltips.push(!0)}else{if(e.tooltips=ee(t),e.tooltips.length!==e.handles)throw new Error("noUiSlider ("+oe+"): must pass a formatter for all handles.");e.tooltips.forEach(function(e){if("boolean"!=typeof e&&("object"!=typeof e||"function"!=typeof e.to))throw new Error("noUiSlider ("+oe+"): 'tooltips' must be passed a formatter or 'false'.")})}}function A(e,t){c(e.ariaFormat=t)}function C(e,t){c(e.format=t)}function L(e,t){if("string"!=typeof t&&!1!==t)throw new Error("noUiSlider ("+oe+"): 'cssPrefix' must be a string or `false`.");e.cssPrefix=t}function R(e,t){if("object"!=typeof t)throw new Error("noUiSlider ("+oe+"): 'cssClasses' must be an object.");if("string"==typeof e.cssPrefix)for(var i in e.cssClasses={},t)t.hasOwnProperty(i)&&(e.cssClasses[i]=e.cssPrefix+t[i]);else e.cssClasses=t}function re(t){var i={margin:0,limit:0,padding:0,animate:!0,animationDuration:300,ariaFormat:k,format:k},n={step:{r:!1,t:p},start:{r:!0,t:m},connect:{r:!0,t:x},direction:{r:!0,t:E},snap:{r:!1,t:g},animate:{r:!1,t:v},animationDuration:{r:!1,t:y},range:{r:!0,t:f},orientation:{r:!1,t:b},margin:{r:!1,t:w},limit:{r:!1,t:_},padding:{r:!1,t:T},behaviour:{r:!0,t:S},ariaFormat:{r:!1,t:A},format:{r:!1,t:C},tooltips:{r:!1,t:M},cssPrefix:{r:!0,t:L}
vendor: 2,038 bytes, line 1
1,cssClasses:{r:!0,t:R}},r={connect:!1,direction:"ltr",behaviour:"tap",orientation:"horizontal",cssPrefix:"noUi-",cssClasses:{target:"target",base:"base",origin:"origin",handle:"handle",handleLower:"handle-lower",handleUpper:"handle-upper",horizontal:"horizontal",vertical:"vertical",background:"background",connect:"connect",connects:"connects",ltr:"ltr",rtl:"rtl",draggable:"draggable",drag:"state-drag",tap:"state-tap",active:"active",tooltip:"tooltip",pips:"pips",pipsHorizontal:"pips-horizontal",pipsVertical:"pips-vertical",marker:"marker",markerHorizontal:"marker-horizontal",markerVertical:"marker-vertical",markerNormal:"marker-normal",markerLarge:"marker-large",markerSub:"marker-sub",value:"value",valueHorizontal:"value-horizontal",valueVertical:"value-vertical",valueNormal:"value-normal",valueLarge:"value-large",valueSub:"value-sub"}};t.format&&!t.ariaFormat&&(t.ariaFormat=t.format),Object.keys(n).forEach(function(e){if(!s(t[e])&&void 0===r[e]){if(n[e].r)throw new Error("noUiSlider ("+oe+"): '"+e+"' is required.");return!0}n[e].t(i,s(t[e])?t[e]:r[e])}),i.pips=t.pips;var e=document.createElement("div"),o=void 0!==e.style.msTransform,a=void 0!==e.style.transform;i.transformRule=a?"transform":o?"msTransform":"webkitTransform";return i.style=[["left","top"],["right","bottom"]][i.dir][i.ort],i}function P(e,h,o){function d(e,t){var i=q.createElement("div");return t&&te(i,t),e.appendChild(i),i}function s(e,t){return!!t&&d(e,h.cssClasses.connect)}function t(e,t){return!!h.tooltips[t]&&d(e.firstChild,h.cssClasses.tooltip)}function u(t,n,r){function o(e,t){var i=t===h.cssClasses.value,n=i?s:l;return t+" "+(i?c:u)[h.ort]+" "+n[e]}var a=q.createElement("div"),s=[h.cssClasses.valueNormal,h.cssClasses.valueLarge,h.cssClasses.valueSub],l=[h.cssClasses.markerNormal,h.cssClasses.markerLarge,h.cssClasses.markerSub],c=[h.cssClasses.valueHorizontal,h.cssClasses.valueVertical],u=[h.cssClasses.markerHorizontal,h.cssClasses.markerVertical];return te(a,h.cssClasses.pips),te(a,0===h.ort?h.cssClasses.pipsHorizontal:h.cssClasse
1s.pipsVertical),Object.keys(t).forEach(function(e){!function(e,t){t[1]=t[1]&&n?n(t[0],t[1]):t[1];var i=d(a,!1);i.className=o(t[1],h.cssClasses.marker),i.style[h.style]=e+"%",t[1]&&((i=d(a,!1)).className=o(t[1],h.cssClasses.value),i.setAttribute("data-value",t[0]),i.style[h.style]=e+"%",i.innerText=r.to(t[0]))}(e,t[e])}),a}function b(){var e;D&&((e=D).parentElement.removeChild(e),D=null)}function a(e){b();var p,f,m,t,g,i,n,v,y,x,r=e.mode,o=e.density||1,a=e.filter||!1,s=function(e,t,i){if("range"===e||"steps"===e)return V.xVal;if("count"===e){if(t<2)throw new Error("noUiSlider ("+oe+"): 'values' (>= 2) required for mode 'count'.");var n=t-1,r=100/n;for(t=[];n--;)t[n]=n*r;t.push(100),e="positions"}return"positions"===e?t.map(function(e){return V.fromStepping(i?V.getStep(e):e)}):"values"===e?i?t.map(function(e){return V.fromStepping(V.getStep(V.toStepping(e)))}):t:void 0}(r,e.values||!1,e.stepped||!1),l=(p=o,f=r,m=s,g={},i=V.xVal[0],n=V.xVal[V.xVal.length-1],y=v=!1,x=0,t=m.slice().sort(function(e,t){return e-t}),(m=t.filter(function(e){return!this[e]&&(this[e]=!0)},{}))[0]!==i&&(m.unshift(i),v=!0),m[m.length-1]!==n&&(m.push(n),y=!0),m.forEach(function(e,t){var i,n,r,o,a,s,l,c,u,h=e,d=m[t+1];if("steps"===f&&(i=V.xNumSteps[t]),i||(i=d-h),!1!==h&&void 0!==d)for(i=Math.max(i,1e-7),n=h;n<=d;n=(n+i).toFixed(7)/1){for(l=(a=(o=V.toStepping(n))-x)/p,u=a/(c=Math.round(l)),r=1;r<=c;r+=1)g[(x+r*u).toFixed(5)]=["x",0];s=-1<m.indexOf(n)?1:"steps"===f?2:0,!t&&v&&(s=0),n===d&&y||(g[o.toFixed(5)]=[n,s]),x=o}}),g),c=e.format||{to:Math.round};return D=F.appendChild(u(l,a,c))}function l(){var e=R.getBoundingClientRect(),t="offset"+["Width","Height"][h.ort];return 0===h.ort?e.width||R[t]:e.height||R[t]}function c(n,r,o,a){var t=function(e){return!!(e=function(e,t,i){var n,r,o=0===e.type.indexOf("touch"),a=0===e.type.indexOf("mouse"),s=0===e.type.indexOf("pointer");if(0===e.type.indexOf("MSPointer")&&(s=!0),o){var l=function(e){return e.target===i||i.contains(e.target)};if("touchstart"===e.type){var c=Array.prototype.filter.call(e.touches,l);if(1<c.length)return!1;n=c[0].pageX,r=c[0].pageY}else{var u=Array.prototype.find.call(e.changedTouches,l);if(!u)return!1;n=u.pageX,r=u.pageY}}return t=t||ne(q),(a||s)&&(n=e.clientX+t.x,r=e.clientY+t.y),e.pageOffset=t,e.points=[n,r],e.cursor=a||s,e}(e,a.pageOffset,a.target||r))&&!(F.hasAttribute("disabled")&&!a.doNotReject)&&(t=F,i=h.cssClasses.tap,!((t.classList?t.classList.contains(i):new RegExp("\\b"+i+"\\b").test(t.className))&&!a.doNotReject)&&!(n===z.start&&void 0!==e.buttons&&1<e.buttons)&&(!a.hover||!e.buttons)&&(H||e.preventDefault(),e.calcPoint=e.points[h.ort],void o(e,a)));var t,i},i=[];return n.split(" ").forEach(function(e){r.addEventListener(e,t,!!H&&{passive:!0}),i.push([e,t])}),i}function p(e){var t,i,n,r,o,a,s=100*(e-(t=R,i=h.ort,n=t.getBoundingClientRect(),r=t.ownerDocument,o=r.documentElement,a=ne(r),/webkit.*Chrome.*Mobile/i.test(navigator.userAgent)&&(a.x=0),i?n.top+a.y-o.clientTop:n.left+a.x-o.clientLeft))/l();return s=K(s),h.dir?100-s:s}function f(e,t){"mouseout"===e.type&&"HTML"===e.target.nodeName&&null===e.relatedTarget&&g(e,t)}function m(e,t){if(-1===navigator.appVersion.indexOf("MSIE 9")&&0===e.buttons&&0!==t.buttonsProperty)return g(e,t);var i=(h.dir?-1:1)*(e.calcPoint-t.startCalcPoint);T(0<i,100*i/t.baseSize,t.locations,t.handleNumbers)}function g(e,t){t.handle&&(ie(t.handle,h.cssClasses.active),j-=1),t.listeners.forEach(function(e){X.removeEventListener(e[0],e[1])}),0===j&&(ie(F,h.cssClasses.drag),S(),e.cursor&&(Y.style.cursor="",Y.removeEventListener("selectstart",Z))),t.handleNumbers.forEach(function(e){y("change",e),y("set",e),y("end",e)})}function v(e,t){var i;if(1===t.handleNumbers.length){var n=P[t.handleNumbers[0]];if(n.hasAttribute("disabled"))return!1;i=n.children[0],j+=1,te(i,h.cssClasses.active)}e.stopPropagation();var r=[],o=c(z.move,X,m,{target:e.target,handle:i,listeners:r,startCalcPoint:e.calcPoint,baseSize:l(),pageOffset:e.pageOffset,handleNumbers:t.handleNumbers,buttonsProperty:e.buttons,locations:B.slice()}),a=c(z.end,X,g,{target:e.target,handle:i,listeners:r,doNotReject:!0,handleNumbers:t.handleNumbers}),s=c("mouseout",X,f,{target:e.target,handle:i,listeners:r,doNotReject:!0,handleNumbers:t.handleNumbers});r.push.apply(r,o.concat(a,s)),e.cursor&&(Y.style.cursor=getComputedStyle(e.target).cursor,1<P.length&&te(F,h.cssClasse
1s.drag),Y.addEventListener("selectstart",Z,!1)),t.handleNumbers.forEach(function(e){y("start",e)})}function i(e){e.stopPropagation();var n,r,o,t=p(e.calcPoint),i=(n=t,o=!(r=100),P.forEach(function(e,t){if(!e.hasAttribute("disabled")){var i=Math.abs(B[t]-n);(i<r||100===i&&100===r)&&(o=t,r=i)}}),o);if(!1===i)return!1;h.events.snap||Q(F,h.cssClasses.tap,h.animationDuration),M(i,t,!0,!0),S(),y("slide",i,!0),y("update",i,!0),y("change",i,!0),y("set",i,!0),h.events.snap&&v(e,{handleNumbers:[i]})}function n(e){var t=p(e.calcPoint),i=V.getStep(t),n=V.fromStepping(i);Object.keys($).forEach(function(e){"hover"===e.split(".")[0]&&$[e].forEach(function(e){e.call(N,n)})})}function r(e,t){$[e]=$[e]||[],$[e].push(t),"update"===e.split(".")[0]&&P.forEach(function(e,t){y("update",t)})}function y(i,n,r){Object.keys($).forEach(function(e){var t=e.split(".")[0];i===t&&$[e].forEach(function(e){e.call(N,W.map(h.format.to),n,W.slice(),r||!1,B.slice())})})}function x(e){return e+"%"}function w(e,t,i,n,r,o){return 1<P.length&&(n&&0<t&&(i=Math.max(i,e[t-1]+h.margin)),r&&t<P.length-1&&(i=Math.min(i,e[t+1]-h.margin))),1<P.length&&h.limit&&(n&&0<t&&(i=Math.min(i,e[t-1]+h.limit)),r&&t<P.length-1&&(i=Math.max(i,e[t+1]-h.limit))),h.padding&&(0===t&&(i=Math.max(i,h.padding[0])),t===P.length-1&&(i=Math.min(i,100-h.padding[1]))),!((i=K(i=V.getStep(i)))===e[t]&&!o)&&i}function _(e,t){var i=h.ort;return(i?t:e)+", "+(i?e:t)}function T(e,n,i,t){var r=i.slice(),o=[!e,e],a=[e,!e];t=t.slice(),e&&t.reverse(),1<t.length?t.forEach(function(e,t){var i=w(r,e,r[e]+n,o[t],a[t],!1);!1===i?n=0:(n=i-r[e],r[e]=i)}):o=a=[!0];var s=!1;t.forEach(function(e,t){s=M(e,i[e]+n,o[t],a[t])||s}),s&&t.forEach(function(e){y("update",e),y("slide",e)})}function E(e,t){return h.dir?100-e-t:e}function S(){G.forEach(function(e){var t=50<B[e]?-1:1,i=3+(P.length+t*e);P[e].style.zIndex=i})}function M(e,t,i,n){return!1!==(t=w(B,e,t,i,n,!1))&&(function(e,t){B[e]=t,W[e]=V.fromStepping(t);var i="translate("+_(x(E(t,0)-J),"0")+")";P[e].style[h.transformRule]=i,A(e),A(e+1)}(e,t),!0)}function A(e){if(k[e]){var t=0,i=100;0!==e&&(t=B[e-1]),e!==k.length-1&&(i=B[e]);var n=i-t,r="translate("+_(x(E(t,n)),"0")+")",o="scale("+_(n/100,"1")+")";k[e].style[h.transformRule]=r+" "+o}}function C(e,t){var n=ee(e),i=void 0===B[0];t=void 0===t||!!t,h.animate&&!i&&Q(F,h.cssClasses.tap,h.animationDuration),G.forEach(function(e){var t,i;M(e,(t=n[e],i=e,null===t||!1===t||void 0===t?B[i]:("number"==typeof t&&(t=String(t)),t=h.format.from(t),!1===(t=V.toStepping(t))||isNaN(t)?B[i]:t)),!0,!1)}),G.forEach(function(e){M(e,B[e],!0,!0)}),S(),G.forEach(function(e){y("update",e),null!==n[e]&&t&&y("set",e)})}function L(){var e=W.map(h.format.to);return 1===e.length?e[0]:e}var R,P,k,N,D,O,I,U,z=window.navigator.pointerEnabled?{start:"pointerdown",move:"pointermove",end:"pointerup"}:window.navigator.msPointerEnabled?{start:"MSPointerDown",move:"MSPointerMove",end:"MSPointerUp"}:{start:"mousedown touchstart",move:"mousemove touchmove",end:"mouseup touchend"},H=window.CSS&&CSS.supports&&CSS.supports("touch-action","none")&&function(){var e=!1;try{var t=Object.defineProperty({},"passive",{get:function(){e=!0}});window.addEventListener("test",null,t)}catch(e){}return e}(),F=e,B=[],G=[],j=0,V=h.spectrum,W=[],$={},q=e.ownerDocument,X=q.documentElement,Y=q.body,J="rtl"===q.dir||1===h.ort?0:100;return te(U=F,h.cssClasses.target),0===h.dir?te(U,h.cssClasses.ltr):te(U,h.cssClasses.rtl),0===h.ort?te(U,h.cssClasses.horizontal):te(U,h.cssClasses.vertical),R=d(U,h.cssClasses.base),function(e,t){var i,n,r,o=d(t,h.cssClasses.connects);P=[],(k=[]).push(s(o,e[0]));for(var a=0;a<h.handles;a++)P.push((i=a,r=void 0,n=d(t,h.cssClasses.origin),(r=d(n,h.cssClasses.handle)).setAttribute("data-handle",i),r.setAttribute("tabindex","0"),r.setAttribute("role","slider"),r.setAttribute("aria-orientation",h.ort?"vertical":"horizontal"),0===i?te(r,h.cssClasses.handleLower):i===h.handles-1&&te(r,h.cssClasses.handleUpper),n)),G[a]=a,k.push(s(o,e[a+1]))}(h.connect,R),(I=h.events).fixed||P.forEach(function(e,t){c(z.start,e.children[0],v,{handleNumbers:[t]})}),I.tap&&c(z.start,R,i,{}),I.hover&&c(z.move,R,n,{hover:!0}
1),I.drag&&k.forEach(function(e,t){if(!1!==e&&0!==t&&t!==k.length-1){var i=P[t-1],n=P[t],r=[e];te(e,h.cssClasses.draggable),I.fixed&&(r.push(i.children[0]),r.push(n.children[0])),r.forEach(function(e){c(z.start,e,v,{handles:[i,n],handleNumbers:[t-1,t]})})}}),C(h.start),N={destroy:function(){for(var e in h.cssClasses)h.cssClasses.hasOwnProperty(e)&&ie(F,h.cssClasses[e]);for(;F.firstChild;)F.removeChild(F.firstChild);delete F.noUiSlider},steps:function(){return B.map(function(e,t){var i=V.getNearbySteps(e),n=W[t],r=i.thisStep.step,o=null;!1!==r&&n+r>i.stepAfter.startValue&&(r=i.stepAfter.startValue-n),o=n>i.thisStep.startValue?i.thisStep.step:!1!==i.stepBefore.step&&n-i.stepBefore.highestStep,100===e?r=null:0===e&&(o=null);var a=V.countStepDecimals();return null!==r&&!1!==r&&(r=Number(r.toFixed(a))),null!==o&&!1!==o&&(o=Number(o.toFixed(a))),[o,r]})},on:r,off:function(e){var n=e&&e.split(".")[0],r=n&&e.substring(n.length);Object.keys($).forEach(function(e){var t=e.split(".")[0],i=e.substring(t.length);n&&n!==t||r&&r!==i||delete $[e]})},get:L,set:C,reset:function(e){C(h.start,e)},__moveHandles:function(e,t,i){T(e,t,B,i)},options:o,updateOptions:function(t,e){var i=L(),n=["margin","limit","padding","range","animate","snap","step","format"];n.forEach(function(e){void 0!==t[e]&&(o[e]=t[e])});var r=re(o);n.forEach(function(e){void 0!==t[e]&&(h[e]=r[e])}),V=r.spectrum,h.margin=r.margin,h.limit=r.limit,h.padding=r.padding,h.pips&&a(h.pips),B=[],C(t.start||i,e)},target:F,removePips:b,pips:a},h.pips&&a(h.pips),h.tooltips&&(O=P.map(t),r("update",function(e,t,i){if(O[t]){var n=e[t];!0!==h.tooltips[t]&&(n=h.tooltips[t].to(i[t])),O[t].innerHTML=n}})),r("update",function(e,t,a,i,s){G.forEach(function(e){var t=P[e],i=w(B,e,0,!0,!0,!0),n=w(B,e,100,!0,!0,!0),r=s[e],o=h.ariaFormat.to(a[e]);t.children[0].setAttribute("aria-valuemin",i.toFixed(1)),t.children[0].setAttribute("aria-valuemax",n.toFixed(1)),t.children[0].setAttribute("aria-valuenow",r.toFixed(1)),t.children[0].setAttribute("aria-valuetext",o)})}),N}var oe="11.1.0";l.prototype.getMargin=function(e){var t=this.xNumSteps[0];if(t&&e/t%1!=0)throw new Error("noUiSlider ("+oe+"): 'limit', 'margin' and 'padding' must be divisible by step.");return 2===this.xPct.length&&h(this.xVal,e)},l.prototype.toStepping=function(e){return i(this.xVal,this.xPct,e)},l.prototype.fromStepping=function(e){return function(e,t,i){if(100<=i)return e.slice(-1)[0];var n,r=d(i,t),o=e[r-1],a=e[r],s=t[r-1];return n=[o,a],(i-s)*u(s,t[r])*(n[1]-n[0])/100+n[0]}(this.xVal,this.xPct,e)},l.prototype.getStep=function(e){return n(this.xPct,this.xSteps,this.snap,e)},l.prototype.getNearbySteps=function(e){var t=d(e,this.xPct);return{stepBefore:{startValue:this.xVal[t-2],step:this.xNumSteps[t-2],highestStep:this.xHighestCompleteStep[t-2]},thisStep:{startValue:this.xVal[t-1],step:this.xNumSteps[t-1],highestStep:this.xHighestCompleteStep[t-1]},stepAfter:{startValue:this.xVal[t-0],step:this.xNumSteps[t-0],highestStep:this.xHighestCompleteStep[t-0]}}},l.prototype.countStepDecimals=function(){var e=this.xNumSteps.map(t);return Math.max.apply(null,e)},l.prototype.convert=function(e){return this.getStep(this.toStepping(e))};var k={to:function(e){return void 0!==e&&e.toFixed(2)},from:Number};return{version:oe,create:function(e,t){if(!e||!e.nodeName)throw new Error("noUiSlider ("+oe+"): create requires a single element, got: "+e);if(e.noUiSlider)throw new Error("noUiSlider ("+oe+"): Slider was already initialized.");var i=P(e,re(t),t);return e.noUiSlider=i}}}),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t(e.THREE={})}(this,function(e){function t(){}function $(e,t){this.x=e||0,this.y=t||0}function we(){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.")}function j(e,t,i,n){this._x=e||0,this._y=t||0,this._z=i||0,this._w=void 0!==n?n:1}function _e(e,t,i){this.x=e||0,this.y=t||0,this.z=i||0}function g(){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.")}function d(e,t,i,n,r,o,a,s,l,c){Object.defineProperty(this,"id",{value:Eo++}),this.uuid=oo.generateUUID(),this.name="",this.image=void 0!==e?e:d.DEFAULT_IMAGE,this.mipmaps=[],this.mapping=void 0!==t?t:d.DEFAULT_MAPPING,this.wrapS=void 0!==i?i:1001,this.wrapT=void 0!==n?n:1001,this.magFilter=void 0!==r?r:1006,this.minFilter=void 0!==o?o:1008,this.anisotropy=void 0!==l?l:1,this.format=void 0!==a?a:1023,this.type=void 0!==s?s:1009,this.offset=new $(0,0),this.repeat=new $(1,1),this.center=new $(0,0),this.rotation=0,this.matrixAutoUpdate=!0,this.matrix=new g,this.generateMipmaps=!0,this.premultiplyAlpha=!1,this.flipY=!0,this.unpackAlignment=4,this.encoding=void 0!==c?c:3e3,this.version=0,this.onUpdate=null}function Te(e,t,i,n){this.x=e||0,this.y=t||0,this.z=i||0,this.w=void 0!==n?n:1}function A(e,t,i){this.width=e,this.height=t,this.scissor=new Te(0,0,e,t),this.scissorTest=!1,this.viewport=new Te(0,0,e,t),void 0===(i=i||{}).minFilter&&(i.minFilter=1006),this.texture=new d(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}function n(e,t,i){A.call(this,e,t,i),this.activeMipMapLevel=this.activeCubeFace=0}function Ee(e,t,i,n,r,o,a,s,l,c,u,h){d.call(this,null,o,a,s,l,c,n,r,u,h),this.image={data:e,width:t,height:i},this.magFilter=void 0!==l?l:1003,this.minFilter=void 0!==c?c:1003,this.flipY=this.generateMipmaps=!1,this.unpackAlignment=1}function i(e,t){this.min=void 0!==e?e:new _e(1/0,1/0,1/0),this.max=void 0!==t?t:new _e(-1/0,-1/0,-1/0)}function a(e,t){this.center=void 0!==e?e:new _e,this.radius=void 0!==t?t:0}function v(e,t){this.normal=void 0!==e?e:new _e(1,0,0),this.constant=void 0!==t?t:0}function Se(e,t,i,n,r,o){this.planes=[void 0!==e?e:new v,void 0!==t?t:new v,void 0!==i?i:new v,void 0!==n?n:new v,void 0!==r?r:new v,void 0!==o?o:new v]}function _(e,t,i){return void 0===t&&void 0===i?this.set(e):this.setRGB(e,t,i)}function Me(h){var d=new WeakMap;return{get:function(e){return e.isInterleavedBufferAttribute&&(e=e.data),d.get(e)},remove:function(e){e.isInterleavedBufferAttribute&&(e=e.data);var t=d.get(e);t&&(h.deleteBuffer(t.buffer),d.delete(e))},update:function(e,t){e.isInterleavedBufferAttribute&&(e=e.data);var i,n,r,o,a,s=d.get(e);if(void 0===s)d.set(e,(n=t,r=(i=e).array,o=i.dynamic?h.DYNAMIC_DRAW:h.STATIC_DRAW,a=h.createBuffer(),h.bindBuffer(n,a),h.bufferData(n,r,o),i.onUploadCallback(),n=h.FLOAT,r instanceof Float32Array?n=h.FLOAT:r instanceof Float64Array?console.warn("THREE.WebGLAttributes: Unsupported data buffer format: Float64Array."):r instanceof Uint16Array?n=h.UNSIGNED_SHORT:r instanceof Int16Array?n=h.SHORT:r instanceof Uint32Array?n=h.UNSIGNED_INT:r instanceof Int32Array?n=h.INT:r instanceof Int8Array?n=h.BYTE:r instanceof Uint8Array&&(n=h.UNSIGNED_BYTE),{buffer:a,type:n,bytesPerElement:r.BYTES_PER_ELEMENT,version:i.version}));else if(s.version<e.version){var l=e,c=l.array,u=l.updateRange;h.bindBuffer(t,s.buffer),!1===l.dynamic?h.bufferData(t,c,h.STATIC_DRAW):-1===u.count?h.bufferSubData(t,0,c):0===u.count?console.error("THREE.WebGLObjects.updateBuffer: dynamic THREE.BufferAttribute marked as
1needsUpdate but updateRange.count is 0, ensure you are using set methods or updating manually."):(h.bufferSubData(t,u.offset*c.BYTES_PER_ELEMENT,c.subarray(u.offset,u.offset+u.count)),u.count=-1),s.version=e.version}}}}function r(e,t,i,n){this._x=e||0,this._y=t||0,this._z=i||0,this._order=n||r.DefaultOrder}function o(){this.mask=1}function u(){Object.defineProperty(this,"id",{value:Zo++}),this.uuid=oo.generateUUID(),this.name="",this.type="Object3D",this.parent=null,this.children=[],this.up=u.DefaultUp.clone();var e=new _e,t=new r,i=new j,n=new _e(1,1,1);t.onChange(function(){i.setFromEuler(t,!1)}),i.onChange(function(){t.setFromQuaternion(i,void 0,!1)}),Object.defineProperties(this,{position:{enumerable:!0,value:e},rotation:{enumerable:!0,value:t},quaternion:{enumerable:!0,value:i},scale:{enumerable:!0,value:n},modelViewMatrix:{value:new we},normalMatrix:{value:new g}}),this.matrix=new we,this.matrixWorld=new we,this.matrixAutoUpdate=u.DefaultMatrixAutoUpdate,this.matrixWorldNeedsUpdate=!1,this.layers=new o,this.visible=!0,this.receiveShadow=this.castShadow=!1,this.frustumCulled=!0,this.renderOrder=0,this.userData={}}function l(){u.call(this),this.type="Camera",this.matrixWorldInverse=new we,this.projectionMatrix=new we}function p(e,t,i,n,r,o){l.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()}function U(e,t,i,n,r,o){this.a=e,this.b=t,this.c=i,this.normal=n&&n.isVector3?n:new _e,this.vertexNormals=Array.isArray(n)?n:[],this.color=r&&r.isColor?r:new _,this.vertexColors=Array.isArray(r)?r:[],this.materialIndex=void 0!==o?o:0}function T(){Object.defineProperty(this,"id",{value:oa+=2}),this.uuid=oo.generateUUID(),this.name="",this.type="Geometry",this.vertices=[],this.colors=[],this.faces=[],this.faceVertexUvs=[[]],this.morphTargets=[],this.morphNormals=[],this.skinWeights=[],this.skinIndices=[],this.lineDistances=[],this.boundingSphere=this.boundingBox=null,this.groupsNeedUpdate=this.lineDistancesNeedUpdate=this.colorsNeedUpdate=this.normalsNeedUpdate=this.uvsNeedUpdate=this.verticesNeedUpdate=this.elementsNeedUpdate=!1}function y(e,t,i){if(Array.isArray(e))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");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={offset:0,count:-1},this.version=0}function s(e,t,i){y.call(this,new Int8Array(e),t,i)}function c(e,t,i){y.call(this,new Uint8Array(e),t,i)}function h(e,t,i){y.call(this,new Uint8ClampedArray(e),t,i)}function f(e,t,i){y.call(this,new Int16Array(e),t,i)}function m(e,t,i){y.call(this,new Uint16Array(e),t,i)}function x(e,t,i){y.call(this,new Int32Array(e),t,i)}function b(e,t,i){y.call(this,new Uint32Array(e),t,i)}function q(e,t,i){y.call(this,new Float32Array(e),t,i)}function w(e,t,i){y.call(this,new Float64Array(e),t,i)}function E(){this.vertices=[],this.normals=[],this.colors=[],this.uvs=[],this.uvs2=[],this.groups=[],this.morphTargets={},this.skinWeights=[],this.skinIndices=[],this.boundingSphere=this.boundingBox=null,this.groupsNeedUpdate=this.uvsNeedUpdate=this.colorsNeedUpdate=this.normalsNeedUpdate=this.verticesNeedUpdate=!1}function S(e){if(0===e.length)return-1/0;for(var t=e[0],i=1,n=e.length;i<n;++i)e[i]>t&&(t=e[i]);return t}function L(){Object.defineProperty(this,"id",{value:ga+=2}),this.uuid=oo.generateUUID(),this.name="",this.type="BufferGeometry",this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingSphere=this.boundingBox=null,this.drawRange={start:0,count:1/0}}function M(e,t,i,n,r,o){T.call(this),this.type="BoxGeometry",this.parameters={width:e,height:t,depth:i,widthSegments:n,heightSegments:r,depthSegments:o},this.fromBufferGeometry(new C(e,t,i,n,r,o)),this.mergeVertices()}function C(e,t,i,n,r,o){function a(e,t,i,n,r,o,a,s,l,c,u){var h=o/l,d=a/c,p=o/2,f=a/2,m=s/2;a=l+1;var g,v,y=c+1,x=o=0,b=new _e;for(v=0;v<y;v++){var w=v*d-f;for(g=0;g<a;g++)b[e]=(g*h-p)*n,b[t]=w*r,b[i]=m,E.push(b.x,b.y,b.z),b[e]=0,b[t]=0,b[i]=0<s?1:-1,S.push(b.x,b.y,b.z),M.push(g/l),M.push(1-v/c),o+=1}for(v=0;v<c;v++)for(g=0;g<l;g++)e=A+g+a*(v+1),t=A+(g+1)+a*(v+1),i=A+(g+1)+a*v,T.push(A+g+a*v,e,i),T.push(e,t,i),x+=6;_.addGroup(C,x,u),C+=x,A+=o}L.call(this),this.type="BoxBufferGeometry",this.parameters={width:e,height:t,depth:i,widthSegments:n,heightSegments:r,depthSegments:o};var _=this;e=e||1,t=t||1,i=i||1,n=Math.floor(n)||1,r=Math.floor(r)||1,o=Math.floor(o)||1;var T=[],E=[],S=[],M=[],A=0,C=0;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(T),this.addAttribute("position",new q(E,3)),this.addAttribute("normal",new q(S,3)),this.addAttribute("uv",new q(M,2))}function R(e,t,i,n){T.call(this),this.type="PlaneGeometry",this.parameters={width:e,height:t,widthSegments:i,heightSegments:n},this.fromBufferGeometry(new P(e,t,i,n)),this.mergeVertices()}function P(e,t,i,n){L.call(this),this.type="PlaneBufferGeometry",this.parameters={width:e,height:t,widthSegments:i,heightSegments:n};var r=(e=e||1)/2,o=(t=t||1)/2,a=(i=Math.floor(i)||1)+1,s=(n=Math.floor(n)||1)+1,l=e/i,c=t/n,u=[],h=[],d=[],p=[];for(e=0;e<s;e++){var f=e*c-o;for(t=0;t<a;t++)h.push(t*l-r,-f,0),d.push(0,0,1),p.push(t/i),p.push(1-e/n)}for(e=0;e<n;e++)for(t=0;t<i;
1t++)r=t+a*(e+1),o=t+1+a*(e+1),s=t+1+a*e,u.push(t+a*e,r,s),u.push(r,o,s);this.setIndex(u),this.addAttribute("position",new q(h,3)),this.addAttribute("normal",new q(d,3)),this.addAttribute("uv",new q(p,2))}function k(){Object.defineProperty(this,"id",{value:Ba++}),this.uuid=oo.generateUUID(),this.name="",this.type="Material",this.lights=this.fog=!0,this.blending=1,this.side=0,this.flatShading=!1,this.vertexColors=0,this.opacity=1,this.transparent=!1,this.blendSrc=204,this.blendDst=205,this.blendEquation=100,this.blendEquationAlpha=this.blendDstAlpha=this.blendSrcAlpha=null,this.depthFunc=3,this.depthWrite=this.depthTest=!0,this.clippingPlanes=null,this.clipShadows=this.clipIntersection=!1,this.shadowSide=null,this.colorWrite=!0,this.precision=null,this.polygonOffset=!1,this.polygonOffsetUnits=this.polygonOffsetFactor=0,this.dithering=!1,this.alphaTest=0,this.premultipliedAlpha=!1,this.overdraw=0,this.visible=!0,this.userData={},this.needsUpdate=!0}function N(e){k.call(this),this.type="MeshBasicMaterial",this.color=new _(16777215),this.lightMap=this.map=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.envMap=this.alphaMap=this.specularMap=null,this.combine=0,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinejoin=this.wireframeLinecap="round",this.lights=this.morphTargets=this.skinning=!1,this.setValues(e)}function D(e){k.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.morphNormals=this.morphTargets=this.skinning=this.clipping=this.lights=this.fog=!1,this.extensions={derivatives:!1,fragDepth:!1,drawBuffers:!1,shaderTextureLOD:!1},this.defaultAttributeValues={color:[1,1,1],uv:[0,0],uv2:[0,0]},this.index0AttributeName=void 0,this.uniformsNeedUpdate=!1,void 0!==e&&(void 0!==e.attributes&&console.error("THREE.ShaderMaterial: attributes should now be defined in THREE.BufferGeometry instead."),this.setValues(e))}function z(e,t){this.origin=void 0!==e?e:new _e,this.direction=void 0!==t?t:new _e}function O(e,t){this.start=void 0!==e?e:new _e,this.end=void 0!==t?t:new _e}function H(e,t,i){this.a=void 0!==e?e:new _e,this.b=void 0!==t?t:new _e,this.c=void 0!==i?i:new _e}function I(e,t){u.call(this),this.type="Mesh",this.geometry=void 0!==e?e:new L,this.material=void 0!==t?t:new N({color:16777215*Math.random()}),this.drawMode=0,this.updateMorphTargets()}function Ae(r,i,o,n){function a(e,t){i.buffers.color.setClear(e.r,e.g,e.b,t,n)}var s,l,c,u=new _(0),h=0;return{getClearColor:function(){return u},setClearColor:function(e,t){u.set(e),a(u,h=void 0!==t?t:1)},getClearAlpha:function(){return h},setClearAlpha:function(e){a(u,h=e)},render:function(e,t,i,n){null===(t=t.background)?a(u,h):t&&t.isColor&&(a(t,1),n=!0),(r.autoClear||n)&&r.clear(r.autoClearColor,r.autoClearDepth,r.autoClearStencil),t&&t.isCubeTexture?(void 0===c&&((c=new I(new C(1,1,1),new D({uniforms:ko.cube.uniforms,vertexShader:ko.cube.vertexShader,fragmentShader:ko.cube.fragmentShader,side:1,depthTest:!0,depthWrite:!1,fog:!1}))).geometry.removeAttribute("normal"),c.geometry.removeAttribute("uv"),c.onBeforeRender=function(e,t,i){this.matrixWorld.copyPosition(i.matrixWorld)},o.update(c.geometry)),c.material.uniforms.tCube.value=t,e.push(c,c.geometry,c.material,0,null)):t&&t.isTexture&&(void 0===s&&(s=new p(-1,1,1,-1,0,1),l=new I(new P(2,2),new N({depthTest:!1,depthWrite:!1,fog:!1})),o.update(l.geometry)),l.material.map=t,r.renderBufferDirect(s,null,l.geometry,l.material,l,null))}}}function Ce(i,o,a){var s;this.setMode=function(e){s=e},this.render=function(e,t){i.drawArrays(s,e,t),a.update(t,s)},this.renderInstances=function(e,t,i){var n=o.get("ANGLE_instanced_arrays");if(null===n)console.error("THREE.WebGLBufferRenderer: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.");else{var r=e.attributes.position;r.isInterleavedBufferAttribute?(i=r.data.count,n.drawArraysInstancedANGLE(s,0,i,e.maxInstancedCount)):n.drawArraysInstancedANGLE(s,t,i,e.maxInstancedCount),a.update(i,s,e.maxInstancedCount)}}}function Le(t,i,e){function n(e){if("highp"===e){if(0<t.getShaderPrecisionFormat(t.VERTEX_SHADER,t.HIGH_FLOAT).precision&&0<t.getShaderPrecisionFormat(t.FRAGMENT_SHADER,t.HIGH_FLOAT).precision)return"highp";e="mediump"}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"}var r,o=void 0!==e.precision?e.precision:"highp",a=n(o);a!==o&&(console.warn("THREE.WebGLRenderer:",o,"not supported, using",a,"instead."),o=a),e=!0===e.logarithmicDepthBuffer,a=t.getParameter(t.MAX_TEXTURE_IMAGE_UNITS);var s=t.getParameter(t.MAX_VERTEX_TEXTURE_IMAGE_UNITS),l=t.getParameter(t.MAX_TEXTURE_SIZE),c=t.getParameter(t.MAX_CUBE_MAP_TEXTURE_SIZE),u=t.getParameter(t.MAX_VERTEX_ATTRIBS),h=t.getParameter(t.MAX_VERTEX_UNIFORM_VECTORS),d=t.getParameter(t.MAX_VARYING_VECTORS),p=t.getParameter(t.MAX_FRAGMENT_UNIFORM_VECTORS),f=0<s,m=!!i.get("OES_texture_float");return{getMaxAnisotropy:function(){if(void 0!==r)return r;var e=i.get("EXT_texture_filter_anisotropic");return r=null!==e?t.getParameter(e.MAX_TEXTURE_MAX_ANISOTROPY_EXT):0},getMaxPrecision:n,precision:o,logarithmicDepthBuffer:e,maxTextures:a,maxVertexTextures:s,maxTextureSize:l,maxCubemapSize:c,maxAttributes:u,maxVertexUniforms:h,maxVaryings:d,maxFragmentUniforms:p,vertexTextures:f,floatFragmentTextures:m,floatVertexTextures:f&&m}}function Re(){function l(){m.value!==u&&(m.value=u,m.needsUpdate=0<h),a.numPlanes=h,a.numIntersection=0}function c(e,t,i,n){var r=null!==e?e.length:0,o=null;if(0!==r){if(o=m.value,!0!==n||null===o)for(n=i+4*r,t=t.matrixWorldInverse,f.getNormalMatrix(t),(null===o||o.length<n)&&(o=new Float32Array(n)),n=0;n!==r;
1++n,i+=4)s.copy(e[n]).applyMatrix4(t,f),s.normal.toArray(o,i),o[i+3]=s.constant;m.value=o,m.needsUpdate=!0}return a.numPlanes=r,o}var a=this,u=null,h=0,d=!1,p=!1,s=new v,f=new g,m={value:null,needsUpdate:!1};this.uniform=m,this.numIntersection=this.numPlanes=0,this.init=function(e,t,i){var n=0!==e.length||t||0!==h||d;return d=t,u=c(e,i,0),h=e.length,n},this.beginShadows=function(){p=!0,c(null)},this.endShadows=function(){p=!1,l()},this.setState=function(e,t,i,n,r,o){if(!d||null===e||0===e.length||p&&!i)p?c(null):l();else{var a=4*(i=p?0:h),s=r.clippingState||null;for(m.value=s,s=c(e,n,a,o),e=0;e!==a;++e)s[e]=u[e];r.clippingState=s,this.numIntersection=t?this.numPlanes:0,this.numPlanes+=i}}}function Pe(i){var n={};return{get:function(e){if(void 0!==n[e])return n[e];switch(e){case"WEBGL_depth_texture":var t=i.getExtension("WEBGL_depth_texture")||i.getExtension("MOZ_WEBGL_depth_texture")||i.getExtension("WEBKIT_WEBGL_depth_texture");break;case"EXT_texture_filter_anisotropic":t=i.getExtension("EXT_texture_filter_anisotropic")||i.getExtension("MOZ_EXT_texture_filter_anisotropic")||i.getExtension("WEBKIT_EXT_texture_filter_anisotropic");break;case"WEBGL_compressed_texture_s3tc":t=i.getExtension("WEBGL_compressed_texture_s3tc")||i.getExtension("MOZ_WEBGL_compressed_texture_s3tc")||i.getExtension("WEBKIT_WEBGL_compressed_texture_s3tc");break;case"WEBGL_compressed_texture_pvrtc":t=i.getExtension("WEBGL_compressed_texture_pvrtc")||i.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc");break;case"WEBGL_compressed_texture_etc1":t=i.getExtension("WEBGL_compressed_texture_etc1");break;default:t=i.getExtension(e)}return null===t&&console.warn("THREE.WebGLRenderer: "+e+" extension not supported."),n[e]=t}}}function ke(l,c,n){function r(e){e=e.target;var t=o[e.id];for(var i in null!==t.index&&c.remove(t.index),t.attributes)c.remove(t.attributes[i]);e.removeEventListener("dispose",r),delete o[e.id],(i=u[e.id])&&(c.remove(i),delete u[e.id]),(i=u[t.id])&&(c.remove(i),delete u[t.id]),n.memory.geometries--}var o={},u={};return{get:function(e,t){var i=o[t.id];return i||(t.addEventListener("dispose",r),t.isBufferGeometry?i=t:t.isGeometry&&(void 0===t._bufferGeometry&&(t._bufferGeometry=(new L).setFromObject(e)),i=t._bufferGeometry),o[t.id]=i,n.memory.geometries++,i)},update:function(e){var t=e.index,i=e.attributes;for(var n in null!==t&&c.update(t,l.ELEMENT_ARRAY_BUFFER),i)c.update(i[n],l.ARRAY_BUFFER);for(n in e=e.morphAttributes){i=0;for(var r=(t=e[n]).length;i<r;i++)c.update(t[i],l.ARRAY_BUFFER)}},getWireframeAttribute:function(e){var t=u[e.id];if(t)return t;t=[];var i=e.index,n=e.attributes;if(null!==i){n=0;for(var r=(i=i.array).length;n<r;n+=3){var o=i[n+0],a=i[n+1],s=i[n+2];t.push(o,a,a,s,s,o)}}else for(i=n.position.array,n=0,r=i.length/3-1;n<r;n+=3)o=n+0,a=n+1,s=n+2,t.push(o,a,a,s,s,o);return t=new(65535<S(t)?b:m)(t,1),c.update(t,l.ELEMENT_ARRAY_BUFFER),u[e.id]=t}}}function Ne(i,r,o){var a,s,l;this.setMode=function(e){a=e},this.setIndex=function(e){s=e.type,l=e.bytesPerElement},this.render=function(e,t){i.drawElements(a,t,s,e*l),o.update(t,a)},this.renderInstances=function(e,t,i){var n=r.get("ANGLE_instanced_arrays");null===n?console.error("THREE.WebGLIndexedBufferRenderer: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays."):(n.drawElementsInstancedANGLE(a,i,s,t*l,e.maxInstancedCount),o.update(i,a,e.maxInstancedCount))}}function De(n){var r={frame:0,calls:0,triangles:0,points:0,lines:0};return{memory:{geometries:0,textures:0},render:r,programs:null,autoReset:!0,reset:function(){r.frame++,r.calls=0,r.triangles=0,r.points=0,r.lines=0},update:function(e,t,i){switch(i=i||1,r.calls++,t){case n.TRIANGLES:r.triangles+=e/3*i;break;case n.TRIANGLE_STRIP:case n.TRIANGLE_FAN:r.triangles+=i*(e-2);break;case n.LINES:r.lines+=e/2*i;break;case n.LINE_STRIP:r.lines+=i*(e-1);break;case n.LINE_LOOP:r.lines+=i*e;break;case n.POINTS:r.points+=i*e;break;default:console.error("THREE.WebGLInfo: Unknown draw mode:",t)}}}}function F(e,t){return Math.abs(t[1])-Math.abs(e[1])}function Oe(c){var u={},h=new Float32Array(8);return{update:function(e,t,i,n){var r=e.morphTargetInfluences,o=r.length;if(void 0===(e=u[t.id])){e=[];for(var a=0;a<o;a++)e[a]=[a,0];u[t.id]=e}var s=i.morphTargets&&t.morphAttributes.position;for(i=i.morphNormals&&t.morphAttributes.normal,a=0;a<o;a++){var l=e[a];0!==l[1]&&(s&&t.removeAttribute("morphTarget"+a),i&&t.removeAttribute("morphNormal"+a))}for(a=0;a<o;a++)(l=e[a])[0]=a,l[1]=r[a];for(e.sort(F),a=0;a<8;a++)(l=e[a])&&(r=l[0],o=l[1])?(s&&t.addAttribute("morphTarget"+a,s[r]),i&&t.addAttribute("morphNormal"+a,i[r]),h[a]=o):h[a]=0;n.getUniforms().setValue(c,"morphTargetInfluences",h)}}}function Ie(r,o){var a={};return{update:function(e){var t=o.render.frame,i=e.geometry,n=r.get(e,i);return a[n.id]!==t&&(i.isGeometry&&n.updateFromObject(e),r.update(n),a[n.id]=t),n},dispose:function(){a={}}}}function B(e,t,i,n,r,o,a,s,l,c){d.call(this,e=void 0!==e?e:[],void 0!==t?t:301,i,n,r,o,a,s,l,c),this.flipY=!1}function G(e,t,i){var n=e[0];if(n<=0||0<n)return e;var r=t*i,o=Va[r];if(void 0===o&&(o=new Float32Array(r),Va[r]=o),0!==t)for(n.toArray(o,0),n=1,r=0;n!==t;++n)r+=i,e[n].toArray(o,r);return o}function V(e,t){var i=Wa[t];void 0===i&&(i=new Int32Array(t),Wa[t]=i);for(var n=0;n!==t;++n)i[n]=e.allocTextureUnit();return i}function W(e,t){e.uniform1f(this.addr,t)}function X(e,t){e.uniform1i(this.addr,t)}function Y(e,t){void 0===t.x?e.uniform2fv(this.addr,t):e.uniform2f(this.addr,t.x,t.y)}function J(e,t){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)}function Z(e,t){void 0===t.x?e.uniform4fv(this.addr,t):e.uniform4f(this.addr,t.x,t.y,t.z,t.w)}function Q(e,t){e.uniformMatrix2fv(this.addr,!1,t.elements||t)}function K(e,t){void 0===t.elements?e.uniformMatrix3fv(this.addr,!1,t):(qa.set(t.elements),e.uniformMatrix3fv(this.addr,!1,qa))}function ee(e,t){void 0===t.elements?e.uniformMatrix4fv(this.addr,!1,t):($a.set(t.elements),e.uniformMatrix4fv(this.addr,!1,$a))}function te(e,t,i){var n=i.allocTextureUnit();e.uniform1i(this.addr,n),i.setTexture2D(t||Ga,n)}function ie(e,t,i){var n=i.allocTextureUnit();e.uniform1i(this.addr,n),i.setTextureCube(t||ja,n)}function ne(e,t){e.uniform2iv(this.addr,t)}function re(e,t){e.uniform3iv(this.addr,t)}function oe(e,t){e.uniform4iv(this.addr,t)}function ae(e,t){e.uniform1fv(this.addr,t)}function se(e,t){e.uniform1iv(this.addr,t)}function le(e,t){e.uniform2fv(this.addr,G(t,this.size,2))}function ce(e,t){e.uniform3fv(this.addr,G(t,this.size,3))}function ue(e,t){e.uniform4fv(this.addr,G(t,this.size,4))}function he(e,t){e.uniformMatrix2fv(this.addr,!1,G(t,this.size,4))}function de(e,t){e.uniformMatrix3fv(this.addr,!1,G(t,this.size,9))}function pe(e,t){e.uniformMatrix4fv(this.addr,!1,G(t,this.size,16))}function fe(e,t,i){var n=t.length,r=V(i,n);for(e.uniform1iv(this.addr,r),e=0;e!==n;++e)i.setTexture2D(t[e]||Ga,r[e])}function me(e,t,i){var n=t.length,r=V(i,n);for(e.uniform1iv(this.addr,r),e=0;e!==n;++e)i.setTextureCube(t[e]||ja,r[e])}function ge(e,t,i){this.id=e,this.addr=i,this.setValue=function(e){switch(e){case 5126:return W;case 35664:return Y;case 35665:return J;case 35666:return Z;case 35674:return Q;case 35675:return K;case 35676:return ee;case 35678:case 36198:return te;case 35680:return ie;case 5124:case 35670:return X;case 35667:case 35671:return ne;case 35668:case 35672:return re;case 35669:case 35673:return oe}}(t.type)}function ve(e,t,i){this.id=e,this.addr=i,this.size=t.size,this.setValue=function(e){switch(e){case 5126:return ae;case 35664:return le;case 35665:return ce;case 35666:return ue;case 35674:return he;case 35675:return de;case 35676:return pe;case 35678:return fe;case 35680:return me;case 5124:case 35670:return se;case 35667:case 35671:return ne;case 35668:case 35672:return re;case 35669:case 35673:return oe}}(t.type)}function ye(e){this.id=e,this.seq=[],this.map={}}function Ue(e,t,i){this.seq=[],this.map={},this.renderer=i,i=e.getProgramParameter(t,e.ACTIVE_UNIFORMS);for(var n=0;n<i;++n){var r=e.getActiveUniform(t,n),o=e.getUniformLocation(t,r.name),a=this,s=r.name,l=s.length;for(Xa.lastIndex=0;;){var c=Xa.exec(s),u=Xa.lastIndex,h=c[1],d=c[3];if("]"===c[2]&&(h|=0),void 0===d||"["===d&&u+2===l){s=a,r=void 0===d?new ge(h,r,o):new ve(h,r,o),s.seq.push(r),s.map[r.id]=r;break}
1void 0===(d=a.map[h])&&(d=new ye(h),h=a,a=d,h.seq.push(a),h.map[a.id]=a),a=d}}}function xe(e,t,i){var n=e.createShader(t);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){e=e.split("\n");for(var t=0;t<e.length;t++)e[t]=t+1+": "+e[t];return e.join("\n")}(i)),n}function be(e){switch(e){case 3e3:return["Linear","( value )"];case 3001:return["sRGB","( value )"];case 3002:return["RGBE","( value )"];case 3004:return["RGBM","( value, 7.0 )"];case 3005:return["RGBM","( value, 16.0 )"];case 3006:return["RGBD","( value, 256.0 )"];case 3007:return["Gamma","( value, float( GAMMA_FACTOR ) )"];default:throw Error("unsupported encoding: "+e)}}function ze(e,t){return"vec4 "+e+"( vec4 value ) { return "+(t=be(t))[0]+"ToLinear"+t[1]+"; }"}function He(e){return""!==e}function Fe(e,t){return e.replace(/NUM_DIR_LIGHTS/g,t.numDirLights).replace(/NUM_SPOT_LIGHTS/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)}function Be(e,t){return e.replace(/NUM_CLIPPING_PLANES/g,t.numClippingPlanes).replace(/UNION_CLIPPING_PLANES/g,t.numClippingPlanes-t.numClipIntersection)}function Ge(e){return e.replace(/^[ \t]*#include +<([\w\d.]+)>/gm,function(e,t){if(void 0===(e=Mo[t]))throw Error("Can not resolve #include <"+t+">");return Ge(e)})}function je(e){return e.replace(/#pragma unroll_loop[\s]+?for \( int i = (\d+); i < (\d+); i \+\+ \) \{([\s\S]+?)(?=\})\}/g,function(e,t,i,n){for(e="",t=parseInt(t);t<parseInt(i);t++)e+=n.replace(/\[ i \]/g,"[ "+t+" ]");return e})}function Ve(e,t,i,n,r,o){var a=e.context,s=n.defines,l=r.vertexShader,c=r.fragmentShader,u="SHADOWMAP_TYPE_BASIC";1===o.shadowMapType?u="SHADOWMAP_TYPE_PCF":2===o.shadowMapType&&(u="SHADOWMAP_TYPE_PCF_SOFT");var h="ENVMAP_TYPE_CUBE",d="ENVMAP_MODE_REFLECTION",p="ENVMAP_BLENDING_MULTIPLY";if(o.envMap){switch(n.envMap.mapping){case 301:case 302:h="ENVMAP_TYPE_CUBE";break;case 306:case 307:h="ENVMAP_TYPE_CUBE_UV";break;case 303:case 304:h="ENVMAP_TYPE_EQUIREC";break;case 305:h="ENVMAP_TYPE_SPHERE"}switch(n.envMap.mapping){case 302:case 304:d="ENVMAP_MODE_REFRACTION"}switch(n.combine){case 0:p="ENVMAP_BLENDING_MULTIPLY";break;case 1:p="ENVMAP_BLENDING_MIX";break;case 2:p="ENVMAP_BLENDING_ADD"}}var f,m,g,v,y,x,b,w=0<e.gammaFactor?e.gammaFactor:1,_=(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(He).join("\n")),T=function(e){var t,i=[];for(t in e){var n=e[t];!1!==n&&i.push("#define "+t+" "+n)}return i.join("\n")}(s),E=a.createProgram();return n.isRawShaderMaterial?(0<(s=[T].filter(He).join("\n")).length&&(s+="\n"),0<(t=[_,T].filter(He).join("\n")).length&&(t+="\n")):(s=["precision "+o.precision+" float;","precision "+o.precision+" int;","#define SHADER_NAME "+r.name,T,o.supportsVertexTextures?"#define VERTEX_TEXTURES":"","#define GAMMA_FACTOR "+w,"#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":"",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(He).join("\n"),t=[_,"precision "+o.precision+" float;","precision "+o.precision+" int;","#define SHADER_NAME "+r.name,T,o.alphaTest?"#define ALPHATEST "+o.alph
1aTest:"","#define GAMMA_FACTOR "+w,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":"",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;",0!==o.toneMapping?"#define TONE_MAPPING":"",0!==o.toneMapping?Mo.tonemapping_pars_fragment:"",0!==o.toneMapping?function(e,t){switch(t){case 1:t="Linear";break;case 2:t="Reinhard";break;case 3:t="Uncharted2";break;case 4:t="OptimizedCineon";break;default:throw Error("unsupported toneMapping: "+t)}return"vec3 "+e+"( vec3 color ) { return "+t+"ToneMapping( color ); }"}("toneMapping",o.toneMapping):"",o.dithering?"#define DITHERING":"",o.outputEncoding||o.mapEncoding||o.envMapEncoding||o.emissiveMapEncoding?Mo.encodings_pars_fragment:"",o.mapEncoding?ze("mapTexelToLinear",o.mapEncoding):"",o.envMapEncoding?ze("envMapTexelToLinear",o.envMapEncoding):"",o.emissiveMapEncoding?ze("emissiveMapTexelToLinear",o.emissiveMapEncoding):"",o.outputEncoding?(v="linearToOutputTexel",y=o.outputEncoding,"vec4 "+v+"( vec4 value ) { return LinearTo"+(y=be(y))[0]+y[1]+"; }"):"",o.depthPacking?"#define DEPTH_PACKING "+n.depthPacking:"","\n"].filter(He).join("\n")),l=Be(l=Fe(l=Ge(l),o),o),c=Be(c=Fe(c=Ge(c),o),o),l=je(l),c=t+(c=je(c)),l=xe(a,a.VERTEX_SHADER,s+l),c=xe(a,a.FRAGMENT_SHADER,c),a.attachShader(E,l),a.attachShader(E,c),void 0!==n.index0AttributeName?a.bindAttribLocation(E,0,n.index0AttributeName):!0===o.morphTargets&&a.bindAttribLocation(E,0,"position"),a.linkProgram(E),o=a.getProgramInfoLog(E).trim(),r=a.getShaderInfoLog(l).trim(),u=a.getShaderInfoLog(c).trim(),d=h=!0,!1===a.getProgramParameter(E,a.LINK_STATUS)?(h=!1,console.error("THREE.WebGLProgram: shader error: ",a.getError(),"gl.VALIDATE_STATUS",a.getProgramParameter(E,a.VALIDATE_STATUS),"gl.getProgramInfoLog",o,r,u)):""!==o?console.warn("THREE.WebGLProgram: gl.getProgramInfoLog()",o):""!==r&&""!==u||(d=!1),d&&(this.diagnostics={runnable:h,material:n,programLog:o,vertexShader:{log:r,prefix:s},fragmentShader:{log:u,prefix:t}}
1),a.deleteShader(l),a.deleteShader(c),this.getUniforms=function(){return void 0===x&&(x=new Ue(a,E,e)),x},this.getAttributes=function(){if(void 0===b){for(var e={},t=a.getProgramParameter(E,a.ACTIVE_ATTRIBUTES),i=0;i<t;i++){var n=a.getActiveAttrib(E,i).name;e[n]=a.getAttribLocation(E,n)}b=e}return b},this.destroy=function(){a.deleteProgram(E),this.program=void 0},Object.defineProperties(this,{uniforms:{get:function(){return console.warn("THREE.WebGLProgram: .uniforms is now .getUniforms()."),this.getUniforms()}},attributes:{get:function(){return console.warn("THREE.WebGLProgram: .attributes is now .getAttributes()."),this.getAttributes()}}}),this.id=ps++,this.code=i,this.usedTimes=1,this.program=E,this.vertexShader=l,this.fragmentShader=c,this}function We(h,l,d){function p(e,t){if(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);else var i=3e3;return 3e3===i&&t&&(i=3007),i}var c=[],f={MeshDepthMaterial:"depth",MeshDistanceMaterial:"distanceRGBA",MeshNormalMaterial:"normal",MeshBasicMaterial:"basic",MeshLambertMaterial:"lambert",MeshPhongMaterial:"phong",MeshToonMaterial:"phong",MeshStandardMaterial:"physical",MeshPhysicalMaterial:"physical",LineBasicMaterial:"basic",LineDashedMaterial:"dashed",PointsMaterial:"points",ShadowMaterial:"shadow"},r="precision supportsVertexTextures map mapEncoding envMap envMapMode envMapEncoding lightMap aoMap emissiveMap emissiveMapEncoding bumpMap normalMap displacementMap specularMap roughnessMap metalnessMap gradientMap alphaMap comb
1ine 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".split(" ");this.getParameters=function(e,t,i,n,r,o,a){var s=f[e.type];if(a.isSkinnedMesh){var l=a.skeleton.bones;if(d.floatVertexTextures)l=1024;else{var c=Math.min(Math.floor((d.maxVertexUniforms-20)/4),l.length);c<l.length?(console.warn("THREE.WebGLRenderer: Skeleton has "+l.length+" bones. This GPU supports "+c+"."),l=0):l=c}}else l=0;c=d.precision,null!==e.precision&&((c=d.getMaxPrecision(e.precision))!==e.precision&&console.warn("THREE.WebGLProgram.getParameters:",e.precision,"not supported, using",c,"instead."));var u=h.getRenderTarget();return{shaderID:s,precision:c,supportsVertexTextures:d.vertexTextures,outputEncoding:p(u?u.texture:null,h.gammaOutput),map:!!e.map,mapEncoding:p(e.map,h.gammaInput),envMap:!!e.envMap,envMapMode:e.envMap&&e.envMap.mapping,envMapEncoding:p(e.envMap,h.gammaInput),envMapCubeUV:!!e.envMap&&(306===e.envMap.mapping||307===e.envMap.mapping),lightMap:!!e.lightMap,aoMap:!!e.aoMap,emissiveMap:!!e.emissiveMap,emissiveMapEncoding:p(e.emissiveMap,h.gammaInput),bumpMap:!!e.bumpMap,normalMap:!!e.normalMap,displacementMap:!!e.displacementMap,roughnessMap:!!e.roughnessMap,metalnessMap:!!e.metalnessMap,specularMap:!!e.specularMap,alphaMap:!!e.alphaMap,gradientMap:!!e.gradientMap,combine:e.combine,vertexColors:e.vertexColors,fog:!!n,useFog:e.fog,fogExp:n&&n.isFogExp2,flatShading:e.flatShading,sizeAttenuation:e.sizeAttenuation,logarithmicDepthBuffer:d.logarithmicDepthBuffer,skinning:e.skinning&&0<l,maxBones:l,useVertexTexture:d.floatVertexTextures,morphTargets:e.morphTargets,morphNormals:e.morphNormals,maxMorphTargets:h.maxMorphTargets,maxMorphNormals:h.maxMorphNormals,numDirLights:t.directional.length,numPointLights:t.point.length,numSpotLights:t.spot.length,numRectAreaLights:t.rectArea.length,numHemiLights:t.hemi.length,numClippingPlanes:r,numClipIntersection:o,dithering:e.dithering,shadowMapEnabled:h.shadowMap.enabled&&a.receiveShadow&&0<i.length,shadowMapType:h.shadowMap.type,toneMapping:h.toneMapping,physicallyCorrectLights:h.physicallyCorrectLights,premultipliedAlpha:e.premultipliedAlpha,alphaTest:e.alphaTest,doubleSided:2===e.side,flipSided:1===e.side,depthPacking:void 0!==e.depthPacking&&e.depthPacking}},this.getProgramCode=function(e,t){var i=[];if(t.shaderID?i.push(t.shaderID):(i.push(e.fragmentShader),i.push(e.vertexShader)),void 0!==e.defines)for(var n in e.defines)i.push(n),i.push(e.defines[n]);for(n=0;n<r.length;n++)i.push(t[r[n]]);return i.push(e.onBeforeCompile.toString()),i.push(h.gammaOutput),i.join()},this.acquireProgram=function(e,t,i,n){for(var r,o=0,a=c.length;o<a;o++){var s=c[o];if(s.code===n){++(r=s).usedTimes;break}}return void 0===r&&(r=new Ve(h,l,n,e,t,i),c.push(r)),r},this.releaseProgram=function(e){if(0==--e.usedTimes){var t=c.indexOf(e);c[t]=c[c.length-1],c.pop(),e.destroy()}},this.programs=c}function $e(){var n=new WeakMap;return{get:function(e){var t=n.get(e);return void 0===t&&(t={},n.set(e,t)),t},remove:function(e){n.delete(e)},update:function(e,t,i){n.get(e)[t]=i},dispose:function(){n=new WeakMap}}}function qe(e,t){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}function Xe(e,t){return e.renderOrder!==t.renderOrder?e.renderOrder-t.renderOrder:e.z!==t.z?t.z-e.z:e.id-t.id}function Ye(){var a=[],s=0,l=[],c=[];return{opaque:l,transparent:c,init:function(){s=0,l.length=0,c.length=0},push:function(e,t,i,n,r){var o=a[s];void 0===o?(o={id:e.id,object:e,geometry:t,material:i,program:i.program,renderOrder:e.renderOrder,z:n,group:r},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++},sort:function(){1<l.length&&l.sort(qe),1<c.length&&c.sort(Xe)}}}function Je(){var i={};return{get:function(e,t){return e=e.id+","+t.id,void 0===(t=i[e])&&(t=new Ye,i[e]=t),t},dispose:function(){i={}}}}function Ze(){var i={};return{get:function(e){if(void 0!==i[e.id])return i[e.id];switch(e.type){case"DirectionalLight":var t={direction:new _e,color:new _,shadow:!1,shadowBias:0,shadowRadius:1,shadowMapSize:new $};break;case"SpotLight":t={position:new _e,direction:new _e,color:new _,distance:0,coneCos:0,penumbraCos:0,decay:0,shadow:!1,shadowBias:0,shadowRadius:1,shadowMapSize:new $};break;case"PointLight":t={position:new _e,color:new _,distance:0,decay:0,shadow:!1,shadowBias:0,shadowRadius:1,shadowMapSize:new $,shadowCameraNear:1,shadowCameraFar:1e3};break;case"HemisphereLight":t={direction:new _e,skyColor:new _,groundColor:new _};break;case"RectAreaLight":t={color:new _,position:new _e,halfWidth:new _e,halfHeight:new _e}}return i[e.id]=t}}}function Qe(){var x=new Ze,b={id:fs++,hash:"",ambient:[0,0,0],directional:[],directionalShadowMap:[],directionalShadowMatrix:[],spot:[],spotShadowMap:[],spotShadowMatrix:[],rectArea:[],point:[],pointShadowMap:[],pointShadowMatrix:[],hemi:[]},w=new _e,_=new we,T=new we;return{setup:function(e,t,i){var n=0,r=0,o=0,a=0,s=0,l=0,c=0,u=0;i=i.matrixWorldInverse;for(var h=0,d=e.length;h<d;h++){var p=e[h],f=p.color,m=p.intensity,g=p.distance,v=p.shadow&&p.shadow.map?p.shadow.map.texture:null;if(p.isAmbientLight)n+=f.r*m,r+=f.g*m,o+=f.b*m;else if(p.isDirectionalLight){var y=x.get(p);y.color.copy(p.color).multiplyScalar(p.intensity),y.direction.setFromMatrixPosition(p.matrixWorld),w.setFromMatrixPosition(p.target.matrixWorld),y.direction.sub(w),y.direction.transformDirection(i),(y.shadow=p.castShadow)&&(f=p.shadow,y.shadowBias=f.bias,y.shadowRadius=f.radius,y.shadowMapSize=f.mapSize),b.directionalShadowMap[a]=v,b.directionalShadowMatrix[a]=p.shadow.matrix,b.directional[a]=y,a++}else p.isSpotLight?((y=x.get(p)).position.setFromMatrixPosition(p.matrixWorld),y.position.applyMatrix4(i),y.color.copy(f).multiplyScalar(m),y.distance=g,y.direction.setFromMatrixPosition(p.matrixWorld),w.setFromMatrixPosition(p.target.matrixWorld),y.direction.sub(w),y.direction.transformDirection(i),y.coneCos=Math.cos(p.angle),y.penumbraCos=Math.cos(p.angle*(1-p.penumbra)),y.decay=0===p.distance?0:p.decay,(y.shadow=p.castShadow)&&(f=p.shadow,y.shadowBias=f.bias,y.shadowRadius=f.radius,y.shadowMapSize=f.mapSize),b.spotShadowMap[l]=v,b.spotShadowMatrix[l]=p.shadow.matrix,b.spot[l]=y,l++):p.isRectAreaLight?((y=x.get(p)).color.copy(f).multiplyScalar(m),y.position.setFromMatrixPosition(p.matrixWorld),y.position.applyMatrix4(i),T.identity(),_.copy(p.matrixWorld),_.premultiply(i),T.extractRotation(_),y.halfWidth.set(.5*p.width,0,0),y.halfHeight.set(0,.5*p.height,0),y.halfWidth.applyMatrix4(T),y.halfHeight.applyMatrix4(T),b.rectArea[c]=y,c++):p.isPointLight?((y=x.get(p)).position.setFromMatrixPosition(p.matrixWorld),y.position.applyMatrix4(i),y.color.copy(p.color).multiplyScalar(p.intensity),y.distance=p.distance,y.decay=0===p.distance?0:p.decay,(y.shadow=p.castShadow)&&(f=p.shadow,y.shadowBias=f.bias,y.shadowRadius=f.radius,y.shadowMapSize=f.mapSize,y.shadowCameraNear=f.camera.near,y.shadowCameraFar=f.camera.far),b.pointShadowMap[s]=v,b.pointShadowMatrix[s]=p.shadow.matrix,b.point[s]=y,s++):p.isHemisphereLight&&((y=x.get(p)).direction.setFromMatrixPosition(p.matrixWorld),y.direction.transformDirection(i),y.direction.normalize(),y.skyColor.copy(p.color).multiplyScalar(m),y.groundColor.copy(p.groundColor).multiplyScalar(m),b.hemi[u]=y,u++)}b.ambient[0]=n,b.ambient[1]=r,b.ambient[2]=o,b.directional.length=a,b.spot.length=l,b.rectArea.length=c,b.point.length=s,b.hemi.length=u,b.hash=b.id+","+a+","+s+","+l+","+c+","+u+","+t.length},state:b}}function Ke(){var t=new Qe,i=[],n=[],r=[];return{init:function(){i.length=0,n.length=0,r.length=0},state:{lightsArray:i,shadowsArray:n,spritesArray:r,lights:t},setupLights:function(e){t.setup(i,n,e)},pushLight:function(e){i.push(e)},pushShadow:function(e){n.push(e)},pushSprite:function(e){r.push(e)}}}function et(){var i={};return{get:function(e,t){return e=e.id+","+t.id,void 0===(t=i[e])&&(t=new Ke,i[e]=t),t},dispose:function(){i={}}}}function tt(e){k.call(this),this.type="MeshDepthMaterial",this.depthPacking=3200,this.morphTargets=this.skinning=!1,this.displacementMap=this.alphaMap=this.map=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.lights=this.fog=!1,this.setValues(e)}function it(e){k.call(this),this.type="MeshDistanceMaterial",this.referencePosition=new _e,this.nearDistance=1,this.farDistance=1e3,this.morphTargets=this.skinning=!1,this.displacementMap=this.alphaMap=this.map=null,this.displacementScale=1,this.displacementBias=0,this.lights=this.fog=!1,this.setValues(e)}
1function nt(d,h,e){function p(e,t,i,n,r,o){var a=e.geometry,s=c,l=e.customDepthMaterial;return i&&(s=u,l=e.customDistanceMaterial),l?s=l:(l=!1,t.morphTargets&&(a&&a.isBufferGeometry?l=a.morphAttributes&&a.morphAttributes.position&&0<a.morphAttributes.position.length:a&&a.isGeometry&&(l=a.morphTargets&&0<a.morphTargets.length)),e.isSkinnedMesh&&!1===t.skinning&&console.warn("THREE.WebGLShadowMap: THREE.SkinnedMesh with material.skinning set to false:",e),a=0,l&&(a|=1),(e=e.isSkinnedMesh&&t.skinning)&&(a|=2),s=s[a]),d.localClippingEnabled&&!0===t.clipShadows&&0!==t.clippingPlanes.length&&(a=s.uuid,l=t.uuid,void 0===(e=w[a])&&(e={},w[a]=e),void 0===(a=e[l])&&(a=s.clone(),e[l]=a),s=a),s.visible=t.visible,s.wireframe=t.wireframe,s.side=null!=t.shadowSide?t.shadowSide:_[t.side],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}function f(e,t,i,n){if(!1!==e.visible){if(e.layers.test(t.layers)&&(e.isMesh||e.isLine||e.isPoints)&&e.castShadow&&(!e.frustumCulled||m.intersectsObject(e))){e.modelViewMatrix.multiplyMatrices(i.matrixWorldInverse,e.matrixWorld);var r=h.update(e),o=e.material;if(Array.isArray(o))for(var a=r.groups,s=0,l=a.length;s<l;s++){var c=a[s],u=o[c.materialIndex];u&&u.visible&&(u=p(e,u,n,b,i.near,i.far),d.renderBufferDirect(i,null,r,u,e,c))}else o.visible&&(u=p(e,o,n,b,i.near,i.far),d.renderBufferDirect(i,null,r,u,e,null))}for(r=0,o=(e=e.children).length;r<o;r++)f(e[r],t,i,n)}}var m=new Se,g=new we,v=new $,y=new $(e,e),x=new _e,b=new _e,c=Array(4),u=Array(4),w={},_={0:1,1:0,2:2},T=[new _e(1,0,0),new _e(-1,0,0),new _e(0,0,1),new _e(0,0,-1),new _e(0,1,0),new _e(0,-1,0)],E=[new _e(0,1,0),new _e(0,1,0),new _e(0,1,0),new _e(0,1,0),new _e(0,0,1),new _e(0,0,-1)],S=[new Te,new Te,new Te,new Te,new Te,new Te];for(e=0;4!==e;++e){var t=0!=(1&e),i=0!=(2&e),n=new tt({depthPacking:3201,morphTargets:t,skinning:i});c[e]=n,t=new it({morphTargets:t,skinning:i}),u[e]=t}var M=this;this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=1,this.render=function(e,t,i){if(!1!==M.enabled&&(!1!==M.autoUpdate||!1!==M.needsUpdate)&&0!==e.length){var n=d.state;n.disable(d.context.BLEND),n.buffers.color.setClear(1,1,1,1),n.buffers.depth.setTest(!0),n.setScissorTest(!1);for(var r,o=0,a=e.length;o<a;o++){var s=e[o];r=s.shadow;var l=s&&s.isPointLight;if(void 0===r)console.warn("THREE.WebGLShadowMap:",s,"has no shadow.");else{var c=r.camera;if(v.copy(r.mapSize),v.min(y),l){var u=v.x,h=v.y;S[0].set(2*u,h,u,h),S[1].set(0,h,u,h),S[2].set(3*u,h,u,h),S[3].set(u,h,u,h),S[4].set(3*u,0,u,h),S[5].set(u,0,u,h),v.x*=4,v.y*=2}for(null===r.map&&(r.map=new A(v.x,v.y,{minFilter:1003,magFilter:1003,format:1023}),r.map.texture.name=s.name+".shadowMap",c.updateProjectionMatrix()),r.isSpotLightShadow&&r.update(s),u=r.map,h=r.matrix,b.setFromMatrixPosition(s.matrixWorld),c.position.copy(b),l?(r=6,h.makeTranslation(-b.x,-b.y,-b.z)):(r=1,x.setFromMatrixPosition(s.target.matrixWorld),c.lookAt(x),c.updateMatrixWorld(),h.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1),h.multiply(c.projectionMatrix),h.multiply(c.matrixWorldInverse)),d.setRenderTarget(u),d.clear(),s=0;s<r;s++)l&&(x.copy(c.position),x.add(T[s]),c.up.copy(E[s]),c.lookAt(x),c.updateMatrixWorld(),n.viewport(S[s])),g.multiplyMatrices(c.projectionMatrix,c.matrixWorldInverse),m.setFromMatrix(g),f(t,i,c,l)}}M.needsUpdate=!1}}}function rt(e,t,i,n,r,o,a,s,l){d.call(this,e,t,i,n,r,o,a,s,l),this.needsUpdate=!0}function ot(d,p,f,m,g){var v,y,x,b,w,_,T,E,S,M,A,C,L,R,P,k,N,D;function O(e,t){return e.renderOrder!==t.renderOrder?e.renderOrder-t.renderOrder:e.z!==t.z?t.z-e.z:t.id-e.id}var I,U,z,H,F=new _e,B=new j,G=new _e;this.render=function(e,t,i){if(0!==e.length){if(void 0===z){var n=new Float32Array([-.5,-.5,0,0,.5,-.5,1,0,.5,.5,1,1,-.5,.5,0,1]),r=new Uint16Array([0,1,2,0,2,3]);I=p.createBuffer(),U=p.createBuffer(),p.bindBuffer(p.ARRAY_BUFFER,I),p.bufferData(p.ARRAY_BUFFER,n,p.STATIC_DRAW),p.bindBuffer(p.ELEMENT_ARRAY_BUFFER,U),p.bufferData(p.ELEMENT_ARRAY_BUFFER,r,p.STATIC_DRAW),n=p.createProgram(),r=p.createShader(p.VERTEX_SHADER);var o=p.createShader(p.FRAGMENT_SHADER);p.shaderSource(r,["precision "+g.precision+" float;","#define SHADER_NAME SpriteMaterial\nuniform mat4 modelViewMatrix;\nuniform mat4 projectionMatrix;\nuniform float rotation;\nuniform vec2 center;\nuniform vec2 scale;\nuniform vec2 uvOffset;\nuniform vec2 uvScale;\nattribute vec2 position;\nattribute vec2 uv;\nvarying vec2 vUV;\nvarying float fogDepth;\nvoid main() {\n\tvUV = uvOffset + uv * uvScale;\n\tvec2 alignedPosition = ( position - center ) * scale;\n\tvec2 rotatedPosition;\n\trotatedPosition.x = cos( rotation ) * alignedPosition.x - sin( rotation ) * alignedPosition.y;\n\trotatedPosition.y = sin( rotation ) * alignedPosition.x + cos( rotation ) * alignedPosition.y;\n\tvec4 mvPosition;\n\tmvPosition = modelViewMatrix * vec4( 0.0, 0.0, 0.0, 1.0 );\n\tmvPosition.xy += rotatedPosition;\n\tgl_Position = projectionMatrix * mvPosition;\n\tfogDepth = - mvPosition.z;\n}"].join("\n")),p.shaderSource(o,["precision "+g.precision+" float;","#define SHADER_NAME SpriteMaterial\nuniform vec3 color;\nuniform sampler2D map;\nuniform float opacity;\nuniform int fogType;\nuniform vec3 fogColor;\nuniform float fogDensity;\nuniform float fogNear;\nuniform float fogFar;\nuniform float alphaTest;\nvarying vec2 vUV;\nvarying float fogDepth;\nvoid main() {\n\tvec4 texture = texture2D( map, vUV );\n\tgl_FragColor = vec4( color * texture.xyz, texture.a * opacity );\n\tif ( gl_FragColor.a < alphaTest ) discard;\n\tif ( fogType > 0 ) {\n\t\tfloat fogFactor = 0.0;\n\t\tif ( fogType == 1 ) {\n\t\t\tfogFactor = smoothstep( fogNear, fogFar, fogDepth );\n\t\t} else {\n\t\t\tconst float LOG2 = 1.442695;\n\t\t\tfogFactor = exp2( - fogDensity * fogDensity * fogDepth * fogDepth * LOG2 );\n\t\t\tfogFactor = 1.0 - clamp( fogFactor, 0.0, 1.0 );\n\t\t}\n\t\tgl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor );\n\t}\n}"].join("\n")),p.compileShader(r),p.compileShader(o),p.attachShader(n,r),p.attachShader(n,o),p.linkProgram(n),z=n,N=p.getAttribLocation(z,"position"),D=p.getAttribLocation(z,"uv"),v=p.getUniformLocation(z,"uvOffset"),y=p.getUniformLocation(z,"uvScale"),x=p.getUniformLocation(z,"rotation"),b=p.getUniformLocation(z,"center"),w=p.getUniformLocation(z,"scale"),_=p.getUniformLocation(z,"color"),T=p.getUniformLocation(z,"map"),E=p.getUniformLocation(z,"opacity"),S=p.getUniformLocation(z,"modelViewMatrix"),M=p.getUniformLocation(z,"projectionMatrix"),A=p.getUniformLocation(z,"fogType"),C=p.getUniformLocation(z,"fogDensity"),L=p.getUniformLocation(z,"fogNear"),R=p.getUniformLocation(z,"fogFar"),P=p.getUniformLocation(z,"fogColor"),p.getUniformLocation(z,"fogDepth"),k=p.getUniformLocation(z,"alphaTest"),(n=document.createElementNS("http://www.w3.org/1999/xhtml","canvas")).width=8,n.height=8,(r=n.getContext("2d")).fillStyle="white",r.fillRect(0,0,8,8),H=new rt(n)}f.useProgram(z),f.initAttributes(),f.enableAttribute(N),f.enableAttribute(D),f.disableUnusedAttributes(),f.disable(p.CULL_FACE),f.enable(p.BLEND),p.bindBuffer(p.ARRAY_BUFFER,I),p.vertexAttribPointer(N,2,p.FLOAT,!1,16,0),p.vertexAttribPointer(D,2,p.FLOAT,!1,16,8),p.bindBuffer(p.ELEMENT_ARRAY_BUFFER,U),p.uniformMatrix4fv(M,!1,i.projectionMatrix.elements),f.activeTexture(p.TEXTURE0),p.uniform1i(T,0),r=n=0,(o=t.fog)?(p.uniform3f(P,o.color.r,o.color.g,o.color.b),o.isFog?(p.uniform1f(L,o.near),p.uniform1f(R,o.far),p.uniform1i(A,1),r
1=n=1):o.isFogExp2&&(p.uniform1f(C,o.density),p.uniform1i(A,2),r=n=2)):(p.uniform1i(A,0),r=n=0),o=0;for(var a=e.length;o<a;o++){var s=e[o];s.modelViewMatrix.multiplyMatrices(i.matrixWorldInverse,s.matrixWorld),s.z=-s.modelViewMatrix.elements[14]}e.sort(O);var l=[],c=[];for(o=0,a=e.length;o<a;o++){var u=(s=e[o]).material;if(!1!==u.visible){s.onBeforeRender(d,t,i,void 0,u,void 0),p.uniform1f(k,u.alphaTest),p.uniformMatrix4fv(S,!1,s.modelViewMatrix.elements),s.matrixWorld.decompose(F,B,G),l[0]=G.x,l[1]=G.y,c[0]=s.center.x-.5,c[1]=s.center.y-.5;var h=0;t.fog&&u.fog&&(h=r),n!==h&&(p.uniform1i(A,h),n=h),null!==u.map?(p.uniform2f(v,u.map.offset.x,u.map.offset.y),p.uniform2f(y,u.map.repeat.x,u.map.repeat.y)):(p.uniform2f(v,0,0),p.uniform2f(y,1,1)),p.uniform1f(E,u.opacity),p.uniform3f(_,u.color.r,u.color.g,u.color.b),p.uniform1f(x,u.rotation),p.uniform2fv(b,c),p.uniform2fv(w,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),f.buffers.color.setMask(u.colorWrite),m.setTexture2D(u.map||H,0),p.drawElements(p.TRIANGLES,6,p.UNSIGNED_SHORT,0),s.onAfterRender(d,t,i,void 0,u,void 0)}}f.enable(p.CULL_FACE),f.reset()}}}function at(u,i,l){function e(e,t,i){var n=new Uint8Array(4),r=u.createTexture();for(u.bindTexture(e,r),u.texParameteri(e,u.TEXTURE_MIN_FILTER,u.NEAREST),u.texParameteri(e,u.TEXTURE_MAG_FILTER,u.NEAREST),e=0;e<i;e++)u.texImage2D(t+e,0,u.RGBA,1,1,0,u.RGBA,u.UNSIGNED_BYTE,n);return r}function h(e){!0!==y[e]&&(u.enable(e),y[e]=!0)}function d(e){!1!==y[e]&&(u.disable(e),y[e]=!1)}function n(e,t,i,n,r,o,a,s){if(0!==e?h(u.BLEND):d(u.BLEND),5!==e){if(e!==w||s!==C)switch(e){case 2: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));break;case 3: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));break;case 4: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));break;default: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))}A=M=S=E=T=_=null}else r=r||t,o=o||i,a=a||n,t===_&&r===S||(u.blendEquationSeparate(l.convert(t),l.convert(r)),_=t,S=r),i===T&&n===E&&o===M&&a===A||(u.blendFuncSeparate(l.convert(i),l.convert(n),l.convert(o),l.convert(a)),T=i,E=n,M=o,A=a);w=e,C=s}function r(e){L!==e&&(e?u.frontFace(u.CW):u.frontFace(u.CCW),L=e)}function t(e){0!==e?(h(u.CULL_FACE),e!==R&&(1===e?u.cullFace(u.BACK):2===e?u.cullFace(u.FRONT):u.cullFace(u.FRONT_AND_BACK))):d(u.CULL_FACE),R=e}function o(e,t,i){e?(h(u.POLYGON_OFFSET_FILL),(k!==t||N!==i)&&(u.polygonOffset(t,i),k=t,N=i)):d(u.POLYGON_OFFSET_FILL)}function a(e){void 0===e&&(e=u.TEXTURE0+D-1),I!==e&&(u.activeTexture(e),I=e)}var s=new function(){var t=!1,o=new Te,i=null,a=new Te(0,0,0,0);return{setMask:function(e){i===e||t||(u.colorMask(e,e,e,e),i=e)},setLocked:function(e){t=e},setClear:function(e,t,i,n,r){!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))},reset:function(){t=!1,i=null,a.set(-1,0,0,0)}}},c=new function(){var t=!1,i=null,n=null,r=null;return{setTest:function(e){e?h(u.DEPTH_TEST):d(u.DEPTH_TEST)},setMask:function(e){i===e||t||(u.depthMask(e),i=e)},setFunc:function(e){if(n!==e){if(e)switch(e){case 0:u.depthFunc(u.NEVER);break;case 1:u.depthFunc(u.ALWAYS);break;case 2:u.depthFunc(u.LESS);break;case 3:u.depthFunc(u.LEQUAL);break;case 4:u.depthFunc(u.EQUAL);break;case 5:u.depthFunc(u.GEQUAL);break;case 6:u.depthFunc(u.GREATER);break;case 7:u.depthFunc(u.NOTEQUAL);break;default:u.depthFunc(u.LEQUAL)}else u.depthFunc(u.LEQUAL);n=e}},setLocked:function(e){t=e},setClear:function(e){r!==e&&(u.clearDepth(e),r=e)},reset:function(){t=!1,r=n=i=null}}},p=new function(){var t=!1,i=null,n=null,r=null,o=null,a=null,s=null,l=null,c=null;return{setTest:function(e){e?h(u.STENCIL_TEST):d(u.STENCIL_TEST)},setMask:function(e){i===e||t||(u.stencilMask(e),i=e)},setFunc:function(e,t,i){n===e&&r===t&&o===i||(u.stencilFunc(e,t,i),n=e,r=t,o=i)},setOp:function(e,t,i){a===e&&s===t&&l===i||(u.stencilOp(e,t,i),a=e,s=t,l=i)},setLocked:function(e){t=e},setClear:function(e){c!==e&&(u.clearStencil(e),c=e)},reset:function(){t=!1,c=l=s=a=o=r=n=i=null}}},f=u.getParameter(u.MAX_VERTEX_ATTRIBS),m=new Uint8Array(f),g=new Uint8Array(f),v=new Uint8Array(f),y={},x=null,b=null,w=null,_=null,T=null,E=null,S=null,M=null,A=null,C=!1,L=null,R=null,P=null,k=null,N=null,D=u.getParameter(u.MAX_COMBINED_TEXTURE_IMAGE_UNITS),O=!1;f=0,-1!==(f=u.getParameter(u.VERSION)).indexOf("WebGL")?(f=parseFloat(/^WebGL ([0-9])/.exec(f)[1]),O=1<=f):-1!==f.indexOf("OpenGL ES")&&(f=parseFloat(/^OpenGL ES ([0-9])/.exec(f)[1]),O=2<=f);var I=null,U={},z=new Te,H=new Te,F={};return F[u.TEXTURE_2D]=e(u.TEXTURE_2D,u.TEXTURE_2D,1),F[u.TEXTURE_CUBE_MAP]=e(u.TEXTURE_CUBE_MAP,u.TEXTURE_CUBE_MAP_POSITIVE_X,6),s.setClear(0,0,0,1),c.setClear(1),p.setClear(0),h(u.DEPTH_TEST),c.setFunc(3),r(!1),t(1),h(u.CULL_FACE),h(u.BLEND),n(1),{buffers:{color:s,depth:c,stencil:p},initAttributes:function(){for(var e=0,t=m.length;e<t;e++)m[e]=0},enableAttribute:function(e){m[e]=1,0===g[e]&&(u.enableVertexAttribArray(e),g[e]=1),0!==v[e]&&(i.get("ANGLE_instanced_arrays").vertexAttribDivisorANGLE(e,0),v[e]=0)},enableAttributeAndDivisor:function(e,t){m[e]=1,0===g[e]&&(u.enableVertexAttribArray(e),g[e]=1),v[e]!==t&&(i.get("ANGLE_instanced_arrays").vertexAttribDivisorANGLE(e,t),v[e]=t)},disableUnusedAttributes:function(){for(var e=0,t=g.length;e!==t;++e)g[e]!==m[e]&&(u.disableVertexAttribArray(e),g[e]=0)},enable:h,disable:d,getCompressedTextureFormats:function(){if(null===x&&(x=[],i.get("WEBGL_compressed_texture_pvrtc")||i.get("WEBGL_compressed_texture_s3tc")||i.get("WEBGL_compressed_texture_etc1")||i.get("WEBGL_compressed_texture_astc")))for(var e=u.getParameter(u.COMPRESSED_TEXTURE_FORMATS),t=0;t<e.length;t++)x.push(e[t]);return x},useProgram:function(e){return b!==e&&(u.useProgram(e),b=e,!0)},setBlending:n,setMaterial:function(e,t){2===e.side?d(u.CULL_FACE):h(u.CULL_FACE);var i=1===e.side;t&&(i=!i),r(i),!0===e.transparent?n(e.blending,e.blendEquation,e.blendSrc,e.blendDst,e.blendEquationAlpha,e.blendSrcAlpha,e.blendDstAlpha,e.premultipliedAlpha):n(0),c.setFunc(e.depthFunc),c.setTest(e.depthTest),c.setMask(e.depthWrite),s.setMask(e.colorWrite),o(e.polygonOffset,e.polygonOffsetFactor,e.polygonOffsetUnits)},setFlipSided:r,setCullFace:t,setLineWidth:function(e){e!==P&&(O&&u.lineWidth(e),P=e)},setPolygonOffset:o,setScissorTest:function(e){e?h(u.SCISSOR_TEST):d(u.SCISSOR_TEST)},activeTexture:a,bindTexture:function(e,t){null===I&&a();var i=U[I];void 0===i&&(i={type:void 0,texture:void 0},U[I]=i),i.type===e&&i.texture===t||(u.bindTexture(e,t||F[e]),i.type=e,i.texture=t)},compressedTexImage2D:function(){try{u.compressedTexImage2D.apply(u,arguments)}catch(e){console.error("THREE.WebGLState:",e)}},texImage2D:function(){try{u.texImage2D.apply(u,arguments)}catch(e){console.error("THREE.WebGLState:",e)}},scissor:function(e){!1===z.equals(e)&&(u.scissor(e.x,e.y,e.z,e.w),z.copy(e))},viewport:function(e){!1===H.equals(e)&&(u.viewport(e.x,e.y,e.z,e.w),H.copy(e))},reset:function(){for(var e=0;e<g.length;e++)1===g[e]&&(u.disableVertexAttribArray(e),g[e]=0);y={},I=x=null,U={},R=L=w=b=null,s.reset(),c.reset(),p.reset()}}}function st(f,n,m,g,v,y,x){function b(e,t){if(e.width>t||e.height>t){if("data"in e)return void console.warn("THREE.WebGLRenderer: image in DataTexture is too big ("+e.width+"x"+e.height+").");t/=Math.max(e.width,e.height);var i=document.createElementNS("http://www.w3.org/1999/xhtml","canvas");return i.width=Math.floor(e.width*t),i.height=Math.floor(e.height*t),i.getContext("2d").drawImage(e,0,0,e.width,e.height,0,0,i.width,i.height),console.warn("THREE.WebGLRenderer: image is too big ("+e.width+"x"+e.height+"). Resized to "+i.width+"x"+i.height,e),i}return e}function w(e){return oo.isPowerOfTwo(e.width)&&oo.isPowerOfTwo(e.height)}function _(e,t){return e.generateMipmaps&&t&&1003!==e.minFilter&&1006!==e.minFilter}function T(e,t,i,n){f.generateMipmap(e),g.get(t).__maxMipLevel=Math.log2(Math.max(i,n))}function r(e){return 1003===e||1004===e||1005===e?f.NEAREST:f.LINEAR}function E(e){(e=e.target).removeEventListener("dispose",E);e:{var t=g.get(e);if(e.image&&t.__image__webglTextureCube)f.deleteTexture(t.__image__webglTextureCube);else{if(void 0===t.__webglInit)break e;f.deleteTexture(t.__webglTexture)}g.remove(e)}e.isVideoTexture&&delete d[e.id],x.memory.textures--}function a(e){(e=e.target).removeEventListener("dispose",a);var t=g.get(e),i=g.get(e.texture);if(e){if(void 0!==i.__webglTexture&&f.deleteTexture(i.__webglTexture),e.depthTexture&&e.depthTexture.dispose(),e.isWebGLRenderTargetCube)for(i=0;i<6;i++)f.deleteFramebuffer(t.__webglFramebuffer[i]),t.__webglDepthbuffer&&f.deleteRenderbuffer(t.__webglDepthbuffer[i]);else f.deleteFramebuffer(t.__webglFramebuffer),t.__webglDepthbuffer&&f.deleteRenderbuffer(t.__webglDepthbuffer);g.remove(e.texture),g.remove(e)}x.memory.textures--}function s(e,t){var i=g.get(e);if(e.isVideoTexture){var n=e.id,r=x.render.frame;
1d[n]!==r&&(d[n]=r,e.update())}if(0<e.version&&i.__version!==e.version)if(void 0===(n=e.image))console.warn("THREE.WebGLRenderer: Texture marked for update but image is undefined",e);else{if(!1!==n.complete){void 0===i.__webglInit&&(i.__webglInit=!0,e.addEventListener("dispose",E),i.__webglTexture=f.createTexture(),x.memory.textures++),m.activeTexture(f.TEXTURE0+t),m.bindTexture(f.TEXTURE_2D,i.__webglTexture),f.pixelStorei(f.UNPACK_FLIP_Y_WEBGL,e.flipY),f.pixelStorei(f.UNPACK_PREMULTIPLY_ALPHA_WEBGL,e.premultiplyAlpha),f.pixelStorei(f.UNPACK_ALIGNMENT,e.unpackAlignment),t=b(e.image,v.maxTextureSize),(1001!==e.wrapS||1001!==e.wrapT||1003!==e.minFilter&&1006!==e.minFilter)&&!1===w(t)&&(t instanceof HTMLImageElement||t instanceof HTMLCanvasElement||t instanceof ImageBitmap)&&(void 0===u&&(u=document.createElementNS("http://www.w3.org/1999/xhtml","canvas")),u.width=oo.floorPowerOfTwo(t.width),u.height=oo.floorPowerOfTwo(t.height),u.getContext("2d").drawImage(t,0,0,u.width,u.height),console.warn("THREE.WebGLRenderer: image is not power of two ("+t.width+"x"+t.height+"). Resized to "+u.width+"x"+u.height,t),t=u),n=w(t),r=y.convert(e.format);var o=y.convert(e.type);S(f.TEXTURE_2D,e,n);var a=e.mipmaps;if(e.isDepthTexture){var s=f.DEPTH_COMPONENT;if(1015===e.type){if(!h)throw Error("Float Depth Texture only supported in WebGL2.0");s=f.DEPTH_COMPONENT32F}else h&&(s=f.DEPTH_COMPONENT16);1026===e.format&&s===f.DEPTH_COMPONENT&&1012!==e.type&&1014!==e.type&&(console.warn("THREE.WebGLRenderer: Use UnsignedShortType or UnsignedIntType for DepthFormat DepthTexture."),e.type=1012,o=y.convert(e.type)),1027===e.format&&(s=f.DEPTH_STENCIL,1020!==e.type&&(console.warn("THREE.WebGLRenderer: Use UnsignedInt248Type for DepthStencilFormat DepthTexture."),e.type=1020,o=y.convert(e.type))),m.texImage2D(f.TEXTURE_2D,0,s,t.width,t.height,0,r,o,null)}else if(e.isDataTexture)if(0<a.length&&n){for(var l=0,c=a.length;l<c;l++)s=a[l],m.texImage2D(f.TEXTURE_2D,l,r,s.width,s.height,0,r,o,s.data);e.generateMipmaps=!1,i.__maxMipLevel=a.length-1}else m.texImage2D(f.TEXTURE_2D,0,r,t.width,t.height,0,r,o,t.data),i.__maxMipLevel=0;else if(e.isCompressedTexture){for(l=0,c=a.length;l<c;l++)s=a[l],1023!==e.format&&1022!==e.format?-1<m.getCompressedTextureFormats().indexOf(r)?m.compressedTexImage2D(f.TEXTURE_2D,l,r,s.width,s.height,0,s.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()"):m.texImage2D(f.TEXTURE_2D,l,r,s.width,s.height,0,r,o,s.data);i.__maxMipLevel=a.length-1}else if(0<a.length&&n){for(l=0,c=a.length;l<c;l++)s=a[l],m.texImage2D(f.TEXTURE_2D,l,r,r,o,s);e.generateMipmaps=!1,i.__maxMipLevel=a.length-1}else m.texImage2D(f.TEXTURE_2D,0,r,r,o,t),i.__maxMipLevel=0;return _(e,n)&&T(f.TEXTURE_2D,e,t.width,t.height),i.__version=e.version,void(e.onUpdate&&e.onUpdate(e))}console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete",e)}m.activeTexture(f.TEXTURE0+t),m.bindTexture(f.TEXTURE_2D,i.__webglTexture)}function S(e,t,i){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),1001===t.wrapS&&1001===t.wrapT||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,r(t.magFilter)),f.texParameteri(e,f.TEXTURE_MIN_FILTER,r(t.minFilter)),1003!==t.minFilter&&1006!==t.minFilter&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.minFilter should be set to THREE.NearestFilter or THREE.LinearFilter.",t)),!(i=n.get("EXT_texture_filter_anisotropic"))||1015===t.type&&null===n.get("OES_texture_float_linear")||1016===t.type&&null===n.get("OES_texture_half_float_linear")||!(1<t.anisotropy||g.get(t).__currentAnisotropy)||(f.texParameterf(e,i.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(t.anisotropy,v.getMaxAnisotropy())),g.get(t).__currentAnisotropy=t.anisotropy)}function l(e,t,i,n){var r=y.convert(t.texture.format),o=y.convert(t.texture.type);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)}function c(e,t){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)}var u,h="undefined"!=typeof WebGL2RenderingContext&&f instanceof WebGL2RenderingContext,d={};this.setTexture2D=s,this.setTextureCube=function(e,t){var i=g.get(e);if(6===e.image.length)if(0<e.version&&i.__version!==e.version){i.__image__webglTextureCube||(e.addEventListener("dispose",E),i.__image__webglTextureCube=f.createTexture(),x.memory.textures++),m.activeTexture(f.TEXTURE0+t),m.bindTexture(f.TEXTURE_CUBE_MAP,i.__image__webglTextureCube),f.pixelStorei(f.UNPACK_FLIP_Y_WEBGL,e.flipY),t=e&&e.isCompressedTexture;for(var n=e.image[0]&&e.image[0].isDataTexture,r=[],o=0;o<6;o++)r[o]=t||n?n?e.image[o].image:e.image[o]:b(e.image[o],v.maxCubemapSize);var a=r[0],s=w(a),l=y.convert(e.format),c=y.convert(e.type);for(S(f.TEXTURE_CUBE_MAP,e,s),o=0;o<6;o++)if(t)for(var u,h=r[o].mipmaps,d=0,p=h.length;d<p;d++)u=h[d],1023!==e.format&&1022!==e.format?-1<m.getCompressedTextureFormats().indexOf(l)?m.compressedTexImage2D(f.TEXTURE_CUBE_MAP_POSITIVE_X+o,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+o,d,l,u.width,u.height,0,l,c,u.data);else n?m.texImage2D(f.TEXTURE_CUBE_MAP_POSITIVE_X+o,0,l,r[o].width,r[o].height,0,l,c,r[o].data):m.texImage2D(f.TEXTURE_CUBE_MAP_POSITIVE_X+o,0,l,l,c,r[o]);i.__maxMipLevel=t?h.length-1:0,_(e,s)&&T(f.TEXTURE_CUBE_MAP,e,a.width,a.height),i.__version=e.version,e.onUpdate&&e.onUpdate(e)}else m.activeTexture(f.TEXTURE0+t),m.bindTexture(f.TEXTURE_CUBE_MAP,i.__image__webglTextureCube)},this.setTextureCubeDynamic=function(e,t){m.activeTexture(f.TEXTURE0+t),m.bindTexture(f.TEXTURE_CUBE_MAP,g.get(e).__webglTexture)},this.setupRenderTarget=function(e){var t=g.get(e),i=g.get(e.texture);e.addEventListener("dispose",a),i.__webglTexture=f.createTexture(),x.memory.textures++;var n=!0===e.isWebGLRenderTargetCube,r=w(e);if(n){t.__webglFramebuffer=[];for(var o=0;o<6;o++)t.__webglFramebuffer[o]=f.createFramebuffer()}else t.__webglFramebuffer=f.createFramebuffer();if(n){for(m.bindTexture(f.TEXTURE_CUBE_MAP,i.__webglTexture),S(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);_(e.texture,r)&&T(f.TEXTURE_CUBE_MAP,e.texture,e.width,e.height),m.bindTexture(f.TEXTURE_CUBE_MAP,null)}else m.bindTexture(f.TEXTURE_2D,i.__webglTexture),S(f.TEXTURE_2D,e.texture,r),l(t.__webglFramebuffer,e,f.COLOR_ATTACHMENT0,f.TEXTURE_2D),_(e.texture,r)&&T(f.TEXTURE_2D,e.texture,e.width,e.height),m.bindTexture(f.TEXTURE_2D,null);if(e.depthBuffer){if(t=g.get(e),i=!0===e.isWebGLRenderTargetCube,e.depthTexture){if(i)throw Error("target.depthTexture not supported in Cube render targets");if(e&&e.isWebGLRenderTargetCube)throw Error("Depth Texture with cube render targets is not supported");if(f.bindFramebuffer(f.FRAMEBUFFER,t.__webglFramebuffer),!e.depthTexture||!e.depthTexture.isDepthTexture)throw Error("renderTarget.depthTexture must be an instance of THREE.DepthTexture");
1if(g.get(e.depthTexture).__webglTexture&&e.depthTexture.image.width===e.width&&e.depthTexture.image.height===e.height||(e.depthTexture.image.width=e.width,e.depthTexture.image.height=e.height,e.depthTexture.needsUpdate=!0),s(e.depthTexture,0),t=g.get(e.depthTexture).__webglTexture,1026===e.depthTexture.format)f.framebufferTexture2D(f.FRAMEBUFFER,f.DEPTH_ATTACHMENT,f.TEXTURE_2D,t,0);else{if(1027!==e.depthTexture.format)throw Error("Unknown depthTexture format");f.framebufferTexture2D(f.FRAMEBUFFER,f.DEPTH_STENCIL_ATTACHMENT,f.TEXTURE_2D,t,0)}}else if(i)for(t.__webglDepthbuffer=[],i=0;i<6;i++)f.bindFramebuffer(f.FRAMEBUFFER,t.__webglFramebuffer[i]),t.__webglDepthbuffer[i]=f.createRenderbuffer(),c(t.__webglDepthbuffer[i],e);else f.bindFramebuffer(f.FRAMEBUFFER,t.__webglFramebuffer),t.__webglDepthbuffer=f.createRenderbuffer(),c(t.__webglDepthbuffer,e);f.bindFramebuffer(f.FRAMEBUFFER,null)}},this.updateRenderTargetMipmap=function(e){var t=e.texture,i=w(e);if(_(t,i)){i=e.isWebGLRenderTargetCube?f.TEXTURE_CUBE_MAP:f.TEXTURE_2D;var n=g.get(t).__webglTexture;m.bindTexture(i,n),T(i,t,e.width,e.height),m.bindTexture(i,null)}}}function lt(i,n){return{convert:function(e){if(1e3===e)return i.REPEAT;if(1001===e)return i.CLAMP_TO_EDGE;if(1002===e)return i.MIRRORED_REPEAT;if(1003===e)return i.NEAREST;if(1004===e)return i.NEAREST_MIPMAP_NEAREST;if(1005===e)return i.NEAREST_MIPMAP_LINEAR;if(1006===e)return i.LINEAR;if(1007===e)return i.LINEAR_MIPMAP_NEAREST;if(1008===e)return i.LINEAR_MIPMAP_LINEAR;if(1009===e)return i.UNSIGNED_BYTE;if(1017===e)return i.UNSIGNED_SHORT_4_4_4_4;if(1018===e)return i.UNSIGNED_SHORT_5_5_5_1;if(1019===e)return i.UNSIGNED_SHORT_5_6_5;if(1010===e)return i.BYTE;if(1011===e)return i.SHORT;if(1012===e)return i.UNSIGNED_SHORT;if(1013===e)return i.INT;if(1014===e)return i.UNSIGNED_INT;if(1015===e)return i.FLOAT;if(1016===e){var t=n.get("OES_texture_half_float");if(null!==t)return t.HALF_FLOAT_OES}if(1021===e)return i.ALPHA;if(1022===e)return i.RGB;if(1023===e)return i.RGBA;if(1024===e)return i.LUMINANCE;if(1025===e)return i.LUMINANCE_ALPHA;if(1026===e)return i.DEPTH_COMPONENT;if(1027===e)return i.DEPTH_STENCIL;if(100===e)return i.FUNC_ADD;if(101===e)return i.FUNC_SUBTRACT;if(102===e)return i.FUNC_REVERSE_SUBTRACT;if(200===e)return i.ZERO;if(201===e)return i.ONE;if(202===e)return i.SRC_COLOR;if(203===e)return i.ONE_MINUS_SRC_COLOR;if(204===e)return i.SRC_ALPHA;if(205===e)return i.ONE_MINUS_SRC_ALPHA;if(206===e)return i.DST_ALPHA;if(207===e)return i.ONE_MINUS_DST_ALPHA;if(208===e)return i.DST_COLOR;if(209===e)return i.ONE_MINUS_DST_COLOR;if(210===e)return i.SRC_ALPHA_SATURATE;if((33776===e||33777===e||33778===e||33779===e)&&null!==(t=n.get("WEBGL_compressed_texture_s3tc"))){if(33776===e)return t.COMPRESSED_RGB_S3TC_DXT1_EXT;if(33777===e)return t.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(33778===e)return t.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(33779===e)return t.COMPRESSED_RGBA_S3TC_DXT5_EXT}if((35840===e||35841===e||35842===e||35843===e)&&null!==(t=n.get("WEBGL_compressed_texture_pvrtc"))){if
1(35840===e)return t.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(35841===e)return t.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(35842===e)return t.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(35843===e)return t.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}if(36196===e&&null!==(t=n.get("WEBGL_compressed_texture_etc1")))return t.COMPRESSED_RGB_ETC1_WEBGL;if((37808===e||37809===e||37810===e||37811===e||37812===e||37813===e||37814===e||37815===e||37816===e||37817===e||37818===e||37819===e||37820===e||37821===e)&&null!==(t=n.get("WEBGL_compressed_texture_astc")))return e;if((103===e||104===e)&&null!==(t=n.get("EXT_blend_minmax"))){if(103===e)return t.MIN_EXT;if(104===e)return t.MAX_EXT}return 1020===e&&null!==(t=n.get("WEBGL_depth_texture"))?t.UNSIGNED_INT_24_8_WEBGL:0}}}function ct(e,t,i,n){l.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()}function ut(e){ct.call(this),this.cameras=e||[]}function ht(i){function e(){if(null!==r&&r.isPresenting){var e=r.getEyeParameters("left"),t=e.renderWidth;e=e.renderHeight,m=i.getPixelRatio(),f=i.getSize(),i.setDrawingBufferSize(2*t,e,1)}else n.enabled&&i.setDrawingBufferSize(f.width,f.height,m)}var n=this,r=null,o=null,a=null,s=new we,l=new we;"undefined"!=typeof window&&"VRFrameData"in window&&(o=new window.VRFrameData);var c=new we,u=new j,h=new _e,d=new ct;d.bounds=new Te(0,0,.5,1),d.layers.enable(1);var p=new ct;p.bounds=new Te(.5,0,.5,1),p.layers.enable(2);var f,m,g=new ut([d,p]);g.layers.enable(1),g.layers.enable(2),"undefined"!=typeof window&&window.addEventListener("vrdisplaypresentchange",e,!1),this.enabled=!1,this.userHeight=1.6,this.getDevice=function(){return r},this.setDevice=function(e){void 0!==e&&(r=e)},this.setPoseTarget=function(e){void 0!==e&&(a=e)},this.getCamera=function(e){if(null===r)return e;r.depthNear=e.near,r.depthFar=e.far,r.getFrameData(o);var t=r.stageParameters;t?s.fromArray(t.sittingToStandingTransform):s.makeTranslation(0,n.userHeight,0),t=o.pose;var i=null!==a?a:e;return i.matrix.copy(s),i.matrix.decompose(i.position,i.quaternion,i.scale),null!==t.orientation&&(u.fromArray(t.orientation),i.quaternion.multiply(u)),null!==t.position&&(u.setFromRotationMatrix(s),h.fromArray(t.position),h.applyQuaternion(u),i.position.add(h)),i.updateMatrixWorld(),!1===r.isPresenting?e:(d.near=e.near,p.near=e.near,d.far=e.far,p.far=e.far,g.matrixWorld.copy(e.matrixWorld),g.matrixWorldInverse.copy(e.matrixWorldInverse),d.matrixWorldInverse.fromArray(o.leftViewMatrix),p.matrixWorldInverse.fromArray(o.rightViewMatrix),l.getInverse(s),d.matrixWorldInverse.multiply(l),p.matrixWorldInverse.multiply(l),null!==(e=i.parent)&&(c.getInverse(e.matrixWorld),d.matrixWorldInverse.multiply(c),p.matrixWorldInverse.multiply(c)),d.matrixWorld.getInverse(d.matrixWorldInverse),p.matrixWorld.getInverse(p.matrixWorldInverse),d.projectionMatrix.fromArray(o.leftProjectionMatrix),p.projectionMatrix.fromArray(o.rightProjectionMatrix),g.projectionMatrix.copy(d.projectionMatrix),(e=r.getLayers()).length&&(null!==(e=e[0]).leftBounds&&4===e.leftBounds.length&&d.bounds.fromArray(e.leftBounds),null!==e.rightBounds&&4===e.rightBounds.length&&p.bounds.fromArray(e.rightBounds)),g)},this.getStandingMatrix=function(){return s},this.submitFrame=function(){r&&r.isPresenting&&r.submitFrame()},this.dispose=function(){"undefined"!=typeof window&&window.removeEventListener("vrdisplaypresentchange",e)}}function dt(e){function t(){(S=new Pe(pe)).get("WEBGL_depth_texture"),S.get("OES_texture_float"),S.get("OES_texture_float_linear"),S.get("OES_texture_half_float"),S.get("OES_texture_half_float_linear"),S.get("OES_standard_derivatives"),S.get("OES_element_index_uint"),S.get("ANGLE_instanced_arrays"),G=new lt(pe,S),M=new Le(pe,S,e),(A=new at(pe,S,G)).scissor(Q.copy(oe).multiplyScalar(ne)),A.viewport(Z.copy(re).multiplyScalar(ne)),C=new De(pe),L=new $e,R=new st(pe,S,A,L,M,G,C),P=new Me(pe),k=new ke(pe,P,C),N=new Ie(k,C),z=new Oe(pe),D=new We(j,S,M),O=new Je,I=new et,U=new Ae(j,A,k,x),H=new Ce(pe,S,C),F=new Ne(pe,S,C),B=new ot(j,pe,A,R,M),C.programs=D.programs,j.context=pe,j.capabilities=M,j.extensions=S,j.properties=L,j.renderLists=O,j.state=A,j.info=C}function i(e){e.preventDefault(),console.log("THREE.WebGLRenderer: Context Lost."),V=!0}function n(){console.log("THREE.WebGLRenderer: Context Restored."),V=!1,t()}function l(e){(e=e.target).removeEventListener("dispose",l),c(e),L.remove(e)}function c(e){var t=L.get(e).program;(e.program=void 0)!==t&&D.releaseProgram(t)}function r(){var e=fe.getDevice();e&&e.isPresenting?e.requestAnimationFrame(o):window.requestAnimationFrame(o)}function o(e){!1!==xe&&(be(e),r())}function a(e,t,i,n){for(var r=0,o=e.length;r<o;r++){var a=e[r],s=a.object,l=a.geometry,c=void 0===n?a.material:n;if(a=a.group,i.isArrayCamera)for(var u=(J=i).cameras,h=0,d=u.length;h<d;h++){var p=u[h];if(s.layers.test(p.layers)){var f=p.bounds;A.viewport(Z.set(f.x*te,f.y*ie,f.z*te,f.w*ie).multiplyScalar(ne)),m(s,t,p,l,c,a)}}else J=null,m(s,t,i,l,c,a)}}function m(e,t,i,n,r,o){if(e.onBeforeRender(j,t,i,n,r,o),E=I.get(t,J||i),e.modelViewMatrix.multiplyMatrices(i.matrixWorldInverse,e.matrixWorld),e.normalMatrix.getNormalMatrix(e.modelViewMatrix),e.isImmediateRenderObject){var a=e.isMesh&&e.matrixWorld.determinant()<0;A.setMaterial(r,a),a=T(i,t.fog,r,e),X="",s=a,l=r,e.render(function(e){j.renderBufferImmediate(e,s,l)})}else j.renderBufferDirect(i,t.fog,n,r,e,o);var s,l;e.onAfterRender(j,t,i,n,r,o),E=I.get(t,J||i)}function p(e,t,i){var n=L.get(e),r=E.state.lights;i=D.getParameters(e,r.state,E.state.shadowsArray,t,le.numPlanes,le.numIntersection,i);var o=D.getProgramCode(e,i),a=n.program,s=!0;if(void 0===a)e.addEventListener("dispose",l);else if(a.code!==o)c(e);else{if(n.lightsHash!==r.state.hash)L.update(e,"lightsHash",r.state.hash);else if(void 0!==i.shaderID)return;s=!1}if(s&&(i.shaderID?(a=ko[i.shaderID],n.shader={name:e.type,uniforms:Ao.clone(a.uniforms),vertexShader:a.vertexShader,fragmentShader:a.fragmentShader}):n.shader={name:e.type,uniforms:e.uniforms,vertexShader:e.vertexShader,fragmentShader:e.fragmentShader},e.onBeforeCompile(n.shader,j),a=D.acquireProgram(e,n.shader,i,o),n.program=a,e.program=a),i=a.getAttributes(),e.morphTargets)for(o=e.numSupportedMorphTargets=0;o<j.maxMorphTargets;o++)0<=i["morphTarget"+o]&&e.numSupportedMorphTargets++;if(e.morphNormals)for(o=e.numSupportedMorphNormals=0;o<j.maxMorphNormals;o++)0<=i["morphNormal"+o]&&e.numSupportedMorphNormals++;i=n.shader.uniforms,(e.isShaderMaterial||e.isRawShaderMaterial)&&!0!==e.clipping||(n.numClippingPlanes=le.numPlanes,n.numIntersection=le.numIntersection,i.clippingPlanes=le.uniform),n.fog=t,n.lightsHash=r.state.hash,e.lights&&(i.ambientLightColor.value=r.state.ambient,i.directionalLights.value=r.state.directional,i.spotLights.value=r.state.spot,i.rectAreaLights.value=r.state.rectArea,i.pointLights.value=r.state.point,i.hemisphereLights.value=r.state.hemi,i.directionalShadowMap.value=r.state.directionalShadowMap,i.directionalShadowMatrix.value=r.state.directionalShadowMatrix,i.spotShadowMap.value=r.state.spotShadowMap,i.spotShadowMatrix.value=r.state.spotShadowMatrix,i.pointShadowMap.value=r.state.pointShadowMap,i.pointShadowMatrix.value=r.state.pointShadowMatrix),e=n.program.getUniforms(),e=Ue.seqWithValue(e.seq,i),n.uniformsList=e}function T(e,t,i,n){ee=0;var r=L.get(i),o=E.state.lights;ce&&(ue||e!==Y)&&le.setState(i.clippingPlanes,i.clipIntersection,i.clipShadows,e,r,e===Y&&i.id===q),!1===i.needsUpdate&&(void 0===r.program?i.needsUpdate=!0:i.fog&&r.fog!==t?i.needsUpdate=!0:i.lights&&r.lightsHash!==o.state.hash?i.needsUpdate=!0:void 0===r.numClippingPlanes||r.numClippingPlanes===le.numPlanes&&r.numIntersection===le.numIntersection||(i.needsUpdate=!0)),i.needsUpdate&&(p(i,t,n),i.needsUpdate=!1);var a=!1,s=!1,l=!1,c=(o=r.program).getUniforms(),u=r.shader.uniforms;if(A.useProgram(o.program)&&(l=s=a=!0),i.id!==q&&(q=i.id,s=!0),(a||e!==Y)&&(c.setValue(pe,"projectionMatrix",e.projectionMatrix),M.logarithmicDepthBuffer&&c.setValue(pe,"logDepthBufFC",2/(Math.log(e.far+1)/Math.LN2)),Y!==(J||e)&&(Y=J||e,l=s=!0),(i.isShaderMaterial||i.isMeshPhongMaterial||i.isMeshStandardMaterial||i.envMap)&&(void 0!==(a=c.map.cameraPosition)&&a.setValue(pe,de.setFromMatrixPosition(e.matrixWorld))),(i.isMeshPhongMaterial||i.isMeshLambertMaterial||i.isMeshBasicMaterial||i.isMeshStandardMaterial||i.isShaderMaterial||i.skinning)&&c.setValue(pe,"viewMatrix",e.matrixWorldInverse)),i.skinning&&(c.setOptional(pe,n,"bindMatrix"),c.setOptional(pe,n,"bindMatrixInverse"),e=n.skeleton))if(a=e.bones,M.floatVertexTextures){if(void 0===e.boneTexture){a=Math.sqrt(4*a.length),a=oo.ceilPowerOfTwo(a),a=Math.max(a,4);var h=new Float32Array(a*a*4);h.set(e.boneMatrices);var d=new Ee(h,a,a,1023,1015);d.needsUpdate=!0,e.boneMatrices=h,e.boneTexture=d,e.boneTextureSize=a}c.setValue(pe,"boneTexture",e.boneTexture),c.setValue(pe,"boneTextureSize",e.boneTextureSize)}else c.setOptional(pe,e,"boneMatrices");return s&&(c.setValue(pe,"toneMappingExposure",j.toneMappingExposure),c.setValue(pe,"toneMappingWhitePoint",j.toneMappingWhitePoint),i.lights&&(s=l,u.ambientLightColor.needsUpdate=s,u.directionalLights.needsUpdate=s,u.pointLights.needsUpdate=s,u.spotLights.needsUpdate=s,u.rectAreaLights.needsUpdate=s,u.hemisphereLights.needsUpdate=s),t&&i.fog&&(u.fogColor.value=t.color,t.isFog?(u.fogNear.value=t.near,u.fogFar.value=t.far):t.isFogExp2&&(u.fogDensity.value=t.density)),i.isMeshBasicMaterial?f(u,i):i.isMeshLambertMaterial?(f(u,i),i.emissiveMap&&(u.emissiveMap.value=i.emissiveMap)):i.isMeshPhongMaterial?(f(u,i),i.isMeshToonMaterial?(g(u,i),i.gradientMap&&(u.gradientMap.value=i.gradientMap)):g(u,i)):i.isMeshStandardMaterial?(f(u,i),i.isMeshPhysicalMaterial&&(u.clearCoat.value=i.clearCoat,u.clearCoatRoughness.value=i.clearCoatRoughness),u.roughness.value=i.roughness,u.metalness.value=i.metalness,i.roughnessMap&&(u.roughnessMap.value=i.roughnessMap),i.metalnessMap&&(u.metalnessMap.value=i.metalnessMap),i.emissiveMap&&(u.emissiveMap.value=i.emissiveMap),i.bumpMap&&(u.bumpMap.value=i.bumpMap,u.bumpScale.value=i.bumpScale),i.normalMap&&(u.normalMap.value=i.normalMap,u.normalScale.value.copy(i.normalScale)),i.displacementMap&&(u.displacementMap.value=i.displacementMap,u.displacementScale.value=i.displacementScale,u.displacementBias.value=i.displacementBias),i.envMap&&(u.envMapIntensity.value=i.envMapIntensity)):i.isMeshDepthMaterial?(f(u,i),i.displacementMap&&(u.displacementMap.value=i.displacementMap,u.displacementScale.value=i.displacementScale,u.displacementBias.value=i.displacementBias)):i.isMeshDistanceMaterial?(f(u,i),i.displacementMap&&(u.displacementMap.value=i.displacementMap,u.displacementScale.value=i.displacementScale,u.displacementBias.value=i.displacementBias),u.referencePosition.value.copy(i.referencePosition),u.nearDistance.value=i.nearDistance,u.farDistance.value=i.farDistance):i.isMeshNormalMaterial?(f(u,i),i.bumpMap&&(u.bumpMap.value=i.bumpMap,u.bumpScale.value=i.bumpScale),i.normalMap&&(u.normalMap.value=i.normalMap,u.normalScale.value.copy(i.normalScale)),i.displacementMap&&(u.displacementMap.value=i.displacementMap,u.displacementScale.value=i.displacementScale,u.displacementBias.value=i.displacementBias)):i.isLineBasicMaterial?(u.diffuse.value=i.color,u.opacity.value=i.opacity,i.isLineDashedMaterial&&(u.dashSize.value=i.dashSize,u.totalSize.value=i.dashSize
1+i.gapSize,u.scale.value=i.scale)):i.isPointsMaterial?(u.diffuse.value=i.color,u.opacity.value=i.opacity,u.size.value=i.size*ne,u.scale.value=.5*ie,u.map.value=i.map,null!==i.map&&(!0===i.map.matrixAutoUpdate&&(t=i.map.offset,s=i.map.repeat,l=i.map.center,i.map.matrix.setUvTransform(t.x,t.y,s.x,s.y,i.map.rotation,l.x,l.y)),u.uvTransform.value.copy(i.map.matrix))):i.isShadowMaterial&&(u.color.value=i.color,u.opacity.value=i.opacity),void 0!==u.ltc_1&&(u.ltc_1.value=Po.LTC_1),void 0!==u.ltc_2&&(u.ltc_2.value=Po.LTC_2),Ue.upload(pe,r.uniformsList,u,j)),i.isShaderMaterial&&!0===i.uniformsNeedUpdate&&(Ue.upload(pe,r.uniformsList,u,j),i.uniformsNeedUpdate=!1),c.setValue(pe,"modelViewMatrix",n.modelViewMatrix),c.setValue(pe,"normalMatrix",n.normalMatrix),c.setValue(pe,"modelMatrix",n.matrixWorld),o}function f(e,t){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,e.maxMipLevel.value=L.get(t.envMap).__maxMipLevel),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)var i=t.map;else 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);
1if(void 0!==i){if(i.isWebGLRenderTarget&&(i=i.texture),!0===i.matrixAutoUpdate){t=i.offset;var n=i.repeat,r=i.center;i.matrix.setUvTransform(t.x,t.y,n.x,n.y,i.rotation,r.x,r.y)}e.uvTransform.value.copy(i.matrix)}}function g(e,t){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)}console.log("THREE.WebGLRenderer","91");var s=void 0!==(e=e||{}).canvas?e.canvas:document.createElementNS("http://www.w3.org/1999/xhtml","canvas"),u=void 0!==e.context?e.context:null,h=void 0!==e.alpha&&e.alpha,d=void 0===e.depth||e.depth,v=void 0===e.stencil||e.stencil,y=void 0!==e.antialias&&e.antialias,x=void 0===e.premultipliedAlpha||e.premultipliedAlpha,b=void 0!==e.preserveDrawingBuffer&&e.preserveDrawingBuffer,w=void 0!==e.powerPreference?e.powerPreference:"default",_=null,E=null;this.domElement=s,this.context=null,this.sortObjects=this.autoClearStencil=this.autoClearDepth=this.autoClearColor=this.autoClear=!0,this.clippingPlanes=[],this.localClippingEnabled=!1,this.gammaFactor=2,this.physicallyCorrectLights=this.gammaOutput=this.gammaInput=!1,this.toneMappingWhitePoint=this.toneMappingExposure=this.toneMapping=1,this.maxMorphTargets=8,this.maxMorphNormals=4;var S,M,A,C,L,R,P,k,N,D,O,I,U,z,H,F,B,G,j=this,V=!1,W=null,$=null,q=-1,X="",Y=null,J=null,Z=new Te,Q=new Te,K=null,ee=0,te=s.width,ie=s.height,ne=1,re=new Te(0,0,te,ie),oe=new Te(0,0,te,ie),ae=!1,se=new Se,le=new Re,ce=!1,ue=!1,he=new we,de=new _e;try{h={alpha:h,depth:d,stencil:v,antialias:y,premultipliedAlpha:x,preserveDrawingBuffer:b,powerPreference:w},s.addEventListener("webglcontextlost",i,!1),s.addEventListener("webglcontextrestored",n,!1);var pe=u||s.getContext("webgl",h)||s.getContext("experimental-webgl",h);if(null===pe){if(null!==s.getContext("webgl"))throw Error("Error creating WebGL context with your selected attributes.");throw Error("Error creating WebGL context.")}void 0===pe.getShaderPrecisionFormat&&(pe.getShaderPrecisionFormat=function(){return{rangeMin:1,rangeMax:1,precision:1}})}catch(e){console.error("THREE.WebGLRenderer: "+e.message)}t();var fe=new ht(j);this.vr=fe;var me=new nt(j,N,M.maxTextureSize);this.shadowMap=me,this.getContext=function(){return pe},this.getContextAttributes=function(){return pe.getContextAttributes()},this.forceContextLoss=function(){var e=S.get("WEBGL_lose_context");e&&e.loseContext()},this.forceContextRestore=function(){var e=S.get("WEBGL_lose_context");e&&e.restoreContext()},this.getPixelRatio=function(){return ne},this.setPixelRatio=function(e){void 0!==e&&(ne=e,this.setSize(te,ie,!1))},this.getSize=function(){return{width:te,height:ie}},this.setSize=function(e,t,i){var n=fe.getDevice();n&&n.isPresenting?console.warn("THREE.WebGLRenderer: Can't change size while VR device is presenting."):(te=e,ie=t,s.width=e*ne,s.height=t*ne,!1!==i&&(s.style.width=e+"px",s.style.height=t+"px"),this.setViewport(0,0,e,t))},this.getDrawingBufferSize=function(){return{width:te*ne,height:ie*ne}},this.setDrawingBufferSize=function(e,t,i){te=e,ie=t,ne=i,s.width=e*i,s.height=t*i,this.setViewport(0,0,e,t)},this.getCurrentViewport=function(){return Z},this.setViewport=function(e,t,i,n){re.set(e,ie-t-n,i,n),A.viewport(Z.copy(re).multiplyScalar(ne))},this.setScissor=function(e,t,i,n){oe.set(e,ie-t-n,i,n),A.scissor(Q.copy(oe).multiplyScalar(ne))},this.setScissorTest=function(e){A.setScissorTest(ae=e)},this.getClearColor=function(){return U.getClearColor()},this.setClearColor=function(){U.setClearColor.apply(U,arguments)},this.getClearAlpha=function(){return U.getClearAlpha()},this.setClearAlpha=function(){U.setClearAlpha.apply(U,arguments)},this.clear=function(e,t,i){var n=0;(void 0===e||e)&&(n|=pe.COLOR_BUFFER_BIT),(void 0===t||t)&&(n|=pe.DEPTH_BUFFER_BIT),(void 0===i||i)&&(n|=pe.STENCIL_BUFFER_BIT),pe.clear(n)},this.clearColor=function(){this.clear(!0,!1,!1)},this.clearDepth=function(){this.clear(!1,!0,!1)},this.clearStencil=function(){this.clear(!1,!1,!0)},this.clearTarget=function(e,t,i,n){this.setRenderTarget(e),this.clear(t,i,n)},this.dispose=function(){s.removeEventListener("webglcontextlost",i,!1),s.removeEventListener("webglcontextrestored",n,!1),O.dispose(),I.dispose(),L.dispose(),N.dispose(),fe.dispose(),xe=!1},this.renderBufferImmediate=function(e,t,i){A.initAttributes();var n=L.get(e);if(e.hasPositions&&!n.position&&(n.position=pe.createBuffer()),e.hasNormals&&!n.normal&&(n.normal=pe.createBuffer()),e.hasUvs&&!n.uv&&(n.uv=pe.createBuffer()),e.hasColors&&!n.color&&(n.color=pe.createBuffer()),t=t.getAttributes(),e.hasPositions&&(pe.bindBuffer(pe.ARRAY_BUFFER,n.position),pe.bufferData(pe.ARRAY_BUFFER,e.positionArray,pe.DYNAMIC_DRAW),A.enableAttribute(t.position),pe.vertexAttribPointer(t.position,3,pe.FLOAT,!1,0,0)),e.hasNormals){if(pe.bindBuffer(pe.ARRAY_BUFFER,n.normal),!i.isMeshPhongMaterial&&!i.isMeshStandardMaterial&&!i.isMeshNormalMaterial&&!0===i.flatShading)for(var r=0,o=3*e.count;r<o;
1r+=9){var a=e.normalArray,s=(a[r+0]+a[r+3]+a[r+6])/3,l=(a[r+1]+a[r+4]+a[r+7])/3,c=(a[r+2]+a[r+5]+a[r+8])/3;a[r+0]=s,a[r+1]=l,a[r+2]=c,a[r+3]=s,a[r+4]=l,a[r+5]=c,a[r+6]=s,a[r+7]=l,a[r+8]=c}pe.bufferData(pe.ARRAY_BUFFER,e.normalArray,pe.DYNAMIC_DRAW),A.enableAttribute(t.normal),pe.vertexAttribPointer(t.normal,3,pe.FLOAT,!1,0,0)}e.hasUvs&&i.map&&(pe.bindBuffer(pe.ARRAY_BUFFER,n.uv),pe.bufferData(pe.ARRAY_BUFFER,e.uvArray,pe.DYNAMIC_DRAW),A.enableAttribute(t.uv),pe.vertexAttribPointer(t.uv,2,pe.FLOAT,!1,0,0)),e.hasColors&&0!==i.vertexColors&&(pe.bindBuffer(pe.ARRAY_BUFFER,n.color),pe.bufferData(pe.ARRAY_BUFFER,e.colorArray,pe.DYNAMIC_DRAW),A.enableAttribute(t.color),pe.vertexAttribPointer(t.color,3,pe.FLOAT,!1,0,0)),A.disableUnusedAttributes(),pe.drawArrays(pe.TRIANGLES,0,e.count),e.count=0},this.renderBufferDirect=function(e,t,i,n,r,o){var a=r.isMesh&&r.matrixWorld.determinant()<0;A.setMaterial(n,a);var s=T(e,t,n,r),l=!1;(e=i.id+"_"+s.id+"_"+(!0===n.wireframe))!==X&&(X=e,l=!0),r.morphTargetInfluences&&(z.update(r,i,n,s),l=!0),a=i.index;var c=i.attributes.position;if(t=1,!0===n.wireframe&&(a=k.getWireframeAttribute(i),t=2),e=H,null!==a){var u=P.get(a);(e=F).setIndex(u)}if(l){if(l=void 0,i&&i.isInstancedBufferGeometry&&null===S.get("ANGLE_instanced_arrays"))console.error("THREE.WebGLRenderer.setupVertexAttributes: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.");else{void 0===l&&(l=0),A.initAttributes();var h=i.attributes;s=s.getAttributes();var d=n.defaultAttributeValues;for(_ in s){var p=s[_];if(0<=p){var f=h[_];if(void 0!==f){var m=f.normalized,g=f.itemSize,v=P.get(f);if(void 0!==v){var y=v.buffer,x=v.type;if(v=v.bytesPerElement,f.isInterleavedBufferAttribute){var b=f.data,w=b.stride;f=f.offset,b&&b.isInstancedInterleavedBuffer?(A.enableAttributeAndDivisor(p,b.meshPerAttribute),void 0===i.maxInstancedCount&&(i.maxInstancedCount=b.meshPerAttribute*b.count)):A.enableAttribute(p),pe.bindBuffer(pe.ARRAY_BUFFER,y),pe.vertexAttribPointer(p,g,x,m,w*v,(l*w+f)*v)}else f.isInstancedBufferAttribute?(A.enableAttributeAndDivisor(p,f.meshPerAttribute),void 0===i.maxInstancedCount&&(i.maxInstancedCount=f.meshPerAttribute*f.count)):A.enableAttribute(p),pe.bindBuffer(pe.ARRAY_BUFFER,y),pe.vertexAttribPointer(p,g,x,m,0,l*g*v)}}else if(void 0!==d&&void 0!==(m=d[_]))switch(m.length){case 2:pe.vertexAttrib2fv(p,m);break;case 3:pe.vertexAttrib3fv(p,m);break;case 4:pe.vertexAttrib4fv(p,m);break;default:pe.vertexAttrib1fv(p,m)}}}A.disableUnusedAttributes()}null!==a&&pe.bindBuffer(pe.ELEMENT_ARRAY_BUFFER,u.buffer)}u=1/0,null!==a?u=a.count:void 0!==c&&(u=c.count),a=i.drawRange.start*t,c=null!==o?o.start*t:0;var _=Math.max(a,c);if(0!==(o=Math.max(0,Math.min(u,a+i.drawRange.count*t,c+(null!==o?o.count*t:1/0))-1-_+1))){if(r.isMesh)if(!0===n.wireframe)A.setLineWidth(n.wireframeLinewidth*(null===W?ne:1)),e.setMode(pe.LINES);else switch(r.drawMode){case 0:e.setMode(pe.TRIANGLES);break;case 1:e.setMode(pe.TRIANGLE_STRIP);break;case 2:e.setMode(pe.TRIANGLE_FAN)}else r.isLine?(void 0===(n=n.linewidth)&&(n=1),A.setLineWidth(n*(null===W?ne:1)),r.isLineSegments?e.setMode(pe.LINES):r.isLineLoop?e.setMode(pe.LINE_LOOP):e.setMode(pe.LINE_STRIP)):r.isPoints&&e.setMode(pe.POINTS);i&&i.isInstancedBufferGeometry?0<i.maxInstancedCount&&e.renderInstances(i,_,o):e.render(_,o)}};var ge,ve,ye,xe=!(this.compile=function(i,e){(E=I.get(i,e)).init(),i.traverse(function(e){e.isLight&&(E.pushLight(e),e.castShadow&&E.pushShadow(e))}),E.setupLights(e),i.traverse(function(e){if(e.material)if(Array.isArray(e.material))for(var t=0;t<e.material.length;t++)p(e.material[t],i.fog,e);else p(e.material,i.fog,e)})}),be=null;this.animate=function(e){null!==(be=e)?xe||(r(),xe=!0):xe=!1},this.render=function(e,t,i,n){if(t&&t.isCamera){if(!V){X="",q=-1,!(Y=null)===e.autoUpdate&&e.updateMatrixWorld(),null===t.parent&&t.updateMatrixWorld(),fe.enabled&&(t=fe.getCamera(t)),(E=I.get(e,t)).init(),e.onBeforeRender(j,e,t,i),he.multiplyMatrices(t.projectionMatrix,t.matrixWorldInverse),se.setFromMatrix(he),ue=this.localClippingEnabled,ce=le.init(this.clippingPlanes,ue,t),(_=O.get(e,t)).init(),function e(t,i,n){if(!1!==t.visible){if(t.layers.test(i.layers))if(t.isLight)E.pushLight(t),t.castShadow&&E.pushShadow(t);else if(t.isSprite)t.frustumCulled&&!se.intersectsSprite(t)||E.pushSprite(t);else if(t.isImmediateRenderObject)n&&de.setFromMatrixPosition(t.matrixWorld).applyMatrix4(he),_.push(t,null,t.material,de.z,null);else if((t.isMesh||t.isLine||t.isPoints)&&(t.isSkinnedMesh&&t.skeleton.update(),!t.frustumCulled||se.intersectsObject(t))){n&&de.setFromMatrixPosition(t.matrixWorld).applyMatrix4(he);var r=N.update(t),o=t.material;if(Array.isArray(o))for(var a=r.groups,s=0,l=a.length;s<l;s++){var c=a[s],u=o[c.materialIndex];u&&u.visible&&_.push(t,r,u,de.z,c)}else o.visible&&_.push(t,r,o,de.z,null)}for(s=0,l=(t=t.children).length;s<l;s++)e(t[s],i,n)}}(e,t,j.sortObjects),!0===j.sortObjects&&_.sort(),ce&&le.beginShadows(),me.render(E.state.shadowsArray,e,t),E.setupLights(t),
1ce&&le.endShadows(),this.info.autoReset&&this.info.reset(),void 0===i&&(i=null),this.setRenderTarget(i),U.render(_,e,t,n),n=_.opaque;var r=_.transparent;if(e.overrideMaterial){var o=e.overrideMaterial;n.length&&a(n,e,t,o),r.length&&a(r,e,t,o)}else n.length&&a(n,e,t),r.length&&a(r,e,t);B.render(E.state.spritesArray,e,t),i&&R.updateRenderTargetMipmap(i),A.buffers.depth.setTest(!0),A.buffers.depth.setMask(!0),A.buffers.color.setMask(!0),A.setPolygonOffset(!1),e.onAfterRender(j,e,t),fe.enabled&&fe.submitFrame(),E=_=null}}else console.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.")},this.allocTextureUnit=function(){var e=ee;return e>=M.maxTextures&&console.warn("THREE.WebGLRenderer: Trying to use "+e+" texture units while this GPU supports only "+M.maxTextures),ee+=1,e},this.setTexture2D=(ge=!1,function(e,t){e&&e.isWebGLRenderTarget&&(ge||(console.warn("THREE.WebGLRenderer.setTexture2D: don't use render targets as textures. Use their .texture property instead."),ge=!0),e=e.texture),R.setTexture2D(e,t)}),this.setTexture=(ve=!1,function(e,t){ve||(console.warn("THREE.WebGLRenderer: .setTexture is deprecated, use setTexture2D instead."),ve=!0),R.setTexture2D(e,t)}),this.setTextureCube=(ye=!1,function(e,t){e&&e.isWebGLRenderTargetCube&&(ye||(console.warn("THREE.WebGLRenderer.setTextureCube: don't use cube render targets as textures. Use their .texture property instead."),ye=!0),e=e.texture),e&&e.isCubeTexture||Array.isArray(e.image)&&6===e.image.length?R.setTextureCube(e,t):R.setTextureCubeDynamic(e,t)}),this.getRenderTarget=function(){return W},this.setRenderTarget=function(e){(W=e)&&void 0===L.get(e).__webglFramebuffer&&R.setupRenderTarget(e);var t=null,i=!1;e?(t=L.get(e).__webglFramebuffer,e.isWebGLRenderTargetCube&&(t=t[e.activeCubeFace],i=!0),Z.copy(e.viewport),Q.copy(e.scissor),K=e.scissorTest):(Z.copy(re).multiplyScalar(ne),Q.copy(oe).multiplyScalar(ne),K=ae),$!==t&&(pe.bindFramebuffer(pe.FRAMEBUFFER,t),$=t),A.viewport(Z),A.scissor(Q),A.setScissorTest(K),i&&(i=L.get(e.texture),pe.framebufferTexture2D(pe.FRAMEBUFFER,pe.COLOR_ATTACHMENT0,pe.TEXTURE_CUBE_MAP_POSITIVE_X+e.activeCubeFace,i.__webglTexture,e.activeMipMapLevel))},this.readRenderTargetPixels=function(e,t,i,n,r,o){if(e&&e.isWebGLRenderTarget){var a=L.get(e).__webglFramebuffer;if(a){var s=!1;a!==$&&(pe.bindFramebuffer(pe.FRAMEBUFFER,a),s=!0);try{var l=e.texture,c=l.format,u=l.type;1023!==c&&G.convert(c)!==pe.getParameter(pe.IMPLEMENTATION_COLOR_READ_FORMAT)?console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format."):1009===u||G.convert(u)===pe.getParameter(pe.IMPLEMENTATION_COLOR_READ_TYPE)||1015===u&&(S.get("OES_texture_float")||S.get("WEBGL_color_buffer_float"))||1016===u&&S.get("EXT_color_buffer_half_float")?pe.checkFramebufferStatus(pe.FRAMEBUFFER)===pe.FRAMEBUFFER_COMPLETE?0<=t&&t<=e.width-n&&0<=i&&i<=e.height-r&&pe.readPixels(t,i,n,r,G.convert(c),G.convert(u),o):console.error("THREE.WebGLRenderer.readRenderTargetPixels: readPixels from renderTarget failed. Framebuffer not complete."):console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.")}finally{s&&pe.bindFramebuffer(pe.FRAMEBUFFER,$)}}}else console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.")},this.copyFramebufferToTexture=function(e,t,i){var n=t.image.width,r=t.image.height,o=G.convert(t.format);this.setTexture2D(t,0),pe.copyTexImage2D(pe.TEXTURE_2D,i||0,o,e.x,e.y,n,r,0)},this.copyTextureToTexture=function(e,t,i,n){var r=t.image.width,o=t.image.height,a=G.convert(i.format),s=G.convert(i.type);t=t.isDataTexture?t.image.data:t.image,this.setTexture2D(i,0),pe.texSubImage2D(pe.TEXTURE_2D,n||0,e.x,e.y,r,o,a,s,t)}}function pt(e,t){this.name="",this.color=new _(e),this.density=void 0!==t?t:25e-5}function ft(e,t,i){this.name="",this.color=new _(e),this.near=void 0!==t?t:1,this.far=void 0!==i?i:1e3}function mt(){u.call(this),this.type="Scene",this.overrideMaterial=this.fog=this.background=null,this.autoUpdate=!0}function gt(e){k.call(this),this.type="SpriteMaterial",this.color=new _(16777215),this.map=null,this.rotation=0,this.lights=this.fog=!1,this.setValues(e)}function vt(e){u.call(this),this.type="Sprite",this.material=void 0!==e?e:new gt,this.center=new $(.5,.5)}function yt(){u.call(this),this.type="LOD",Object.defineProperties(this,{levels:{enumerable:!0,value:[]}})}function xt(e,t){if(e=e||[],this.bones=e.slice(0),this.boneMatrices=new Float32Array(16*this.bones.length),void 0===t)this.calculateInverses();else if(this.bones.length===t.length)this.boneInverses=t.slice(0);else for(console.warn("THREE.Skeleton boneInverses is the wrong length."),this.boneInverses=[],e=0,t=this.bones.length;e<t;e++)this.boneInverses.push(new we)}function bt(){u.call(this),this.type="Bone"}function wt(e,t){I.call(this,e,t),this.type="SkinnedMesh",this.bindMode="attached",this.bindMatrix=new we,this.bindMatrixInverse=new we,e=new xt(e=this.initBones()),this.bind(e,this.matrixWorld),this.normalizeSkinWeights()}function _t(e){k.call(this),this.type="LineBasicMaterial",this.color=new _(16777215),this.linewidth=1,this.linejoin=this.linecap="round",this.lights=!1,this.setValues(e)}function Tt(e,t,i){if(1===i)return console.warn("THREE.Line: parameter THREE.LinePieces no longer supported. Created THREE.LineSegments instead."),new Et(e,t);u.call(this),this.type="Line",this.geometry=void 0!==e?e:new L,this.material=void 0!==t?t:new _t({color:16777215*Math.random()})}function Et(e,t){Tt.call(this,e,t),this.type="LineSegments"}function St(e,t){Tt.call(this,e,t),this.type="LineLoop"}function Mt(e){k.call(this),this.type="PointsMaterial",this.color=new _(16777215),this.map=null,this.size=1,this.sizeAttenuation=!0,this.lights=!1,this.setValues(e)}function At(e,t){u.call(this),this.type="Points",this.geometry=void 0!==e?e:new L,this.material=void 0!==t?t:new Mt({color:16777215*Math.random()})}function Ct(){u.call(this),this.type="Group"}function Lt(e,t,i,n,r,o,a,s,l){d.call(this,e,t,i,n,r,o,a,s,l),this.generateMipmaps=!1}function Rt(e,t,i,n,r,o,a,s,l,c,u,h){d.call(this,null,o,a,s,l,c,n,r,u,h),this.image={width:t,height:i},this.mipmaps=e,this.generateMipmaps=this.flipY=!1}function Pt(e,t,i,n,r,o,a,s,l,c){if(1026!==(c=void 0!==c?c:1026)&&1027!==c)throw Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat");void 0===i&&1026===c&&(i=1012),void 0===i&&1027===c&&(i=1020),d.call(this,null,n,r,o,a,s,c,i,l),this.image={width:e,height:t},this.magFilter=void 0!==a?a:1003,this.minFilter=void 0!==s?s:1003,this.generateMipmaps=this.flipY=!1}function kt(e){L.call(this),this.type="WireframeGeometry";var t,i,n,r=[],o=[0,0],a={},s=["a","b","c"];if(e&&e.isGeometry){var l=e.faces,c=0;for(i=l.length;c<i;c++){var u=l[c];for(t=0;t<3;t++){var h=u[s[t]],d=u[s[(t+1)%3]];o[0]=Math.min(h,d),o[1]=Math.max(h,d),void 0===a[h=o[0]+","+o[1]]&&(a[h]={index1:o[0],index2:o[
11]})}}for(h in a)c=a[h],s=e.vertices[c.index1],r.push(s.x,s.y,s.z),s=e.vertices[c.index2],r.push(s.x,s.y,s.z)}else if(e&&e.isBufferGeometry)if(s=new _e,null!==e.index){l=e.attributes.position,u=e.index;var p=e.groups;for(0===p.length&&(p=[{start:0,count:u.count,materialIndex:0}]),e=0,n=p.length;e<n;++e)for(t=(c=p[e]).start,i=c.count,i=(c=t)+i;c<i;c+=3)for(t=0;t<3;t++)h=u.getX(c+t),d=u.getX(c+(t+1)%3),o[0]=Math.min(h,d),o[1]=Math.max(h,d),void 0===a[h=o[0]+","+o[1]]&&(a[h]={index1:o[0],index2:o[1]});for(h in a)c=a[h],s.fromBufferAttribute(l,c.index1),r.push(s.x,s.y,s.z),s.fromBufferAttribute(l,c.index2),r.push(s.x,s.y,s.z)}else for(c=0,i=(l=e.attributes.position).count/3;c<i;c++)for(t=0;t<3;t++)a=3*c+t,s.fromBufferAttribute(l,a),r.push(s.x,s.y,s.z),a=3*c+(t+1)%3,s.fromBufferAttribute(l,a),r.push(s.x,s.y,s.z);this.addAttribute("position",new q(r,3))}function Nt(e,t,i){T.call(this),this.type="ParametricGeometry",this.parameters={func:e,slices:t,stacks:i},this.fromBufferGeometry(new Dt(e,t,i)),this.mergeVertices()}function Dt(e,t,i){L.call(this),this.type="ParametricBufferGeometry",this.parameters={func:e,slices:t,stacks:i};var n,r,o=[],a=[],s=[],l=[],c=new _e,u=new _e,h=new _e,d=new _e,p=new _e,f=t+1;for(n=0;n<=i;n++){var m=n/i;for(r=0;r<=t;r++){var g=r/t;e(g,m,u),a.push(u.x,u.y,u.z),0<=g-1e-5?(e(g-1e-5,m,h),d.subVectors(u,h)):(e(g+1e-5,m,h),d.subVectors(h,u)),0<=m-1e-5?(e(g,m-1e-5,h),p.subVectors(u,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)}}for(n=0;n<i;n++)for(r=0;r<t;r++)e=n*f+r+1,c=(n+1)*f+r+1,u=(n+1)*f+r,o.push(n*f+r,e,u),o.push(e,c,u);this.setIndex(o),this.addAttribute("position",new q(a,3)),this.addAttribute("normal",new q(s,3)),this.addAttribute("uv",new q(l,2))}function Ot(e,t,i,n){T.call(this),this.type="PolyhedronGeometry",this.parameters={vertices:e,indices:t,radius:i,detail:n},this.fromBufferGeometry(new It(e,t,i,n)),this.mergeVertices()}function It(i,m,e,t){function g(e){h.push(e.x,e.y,e.z)}function v(e,t){e*=3,t.x=i[e+0],t.y=i[e+1],t.z=i[e+2]}function u(e,t,i,n){n<0&&1===e.x&&(d[t]=e.x-1),0===i.x&&0===i.z&&(d[t]=n/2/Math.PI+.5)}L.call(this),this.type="PolyhedronBufferGeometry",this.parameters={vertices:i,indices:m,radius:e,detail:t},e=e||1;var h=[],d=[];!function(e){for(var t=new _e,i=new _e,n=new _e,r=0;r<m.length;r+=3){v(m[r+0],t),v(m[r+1],i),v(m[r+2],n);var o,a,s=t,l=i,c=n,u=Math.pow(2,e),h=[];for(a=0;a<=u;a++){h[a]=[];var d=s.clone().lerp(c,a/u),p=l.clone().lerp(c,a/u),f=u-a;for(o=0;o<=f;o++)h[a][o]=0===o&&a===u?d:d.clone().lerp(p,o/f)}for(a=0;a<u;a++)for(o=0;o<2*(u-a)-1;o++)s=Math.floor(o/2),0==o%2?(g(h[a][s+1]),g(h[a+1][s]),g(h[a][s])):(g(h[a][s+1]),g(h[a+1][s+1]),g(h[a+1][s]))}}(t=t||0),function(e){for(var t=new _e,i=0;i<h.length;i+=3)t.x=h[i+0],t.y=h[i+1],t.z=h[i+2],t.normalize().multiplyScalar(e),h[i+0]=t.x,h[i+1]=t.y,h[i+2]=t.z}(e),function(){for(var e=new _e,t=0;t<h.length;t+=3)e.x=h[t+0],e.y=h[t+1],e.z=h[t+2],d.push(Math.atan2(e.z,-e.x)/2/Math.PI+.5,1-(Math.atan2(-e.y,Math.sqrt(e.x*e.x+e.z*e.z))/Math.PI+.5));e=new _e,t=new _e;for(var i=new _e,n=new _e,r=new $,o=new $,a=new $,s=0,l=0;s<h.length;s+=9,l+=6){e.set(h[s+0],h[s+1],h[s+2]),t.set(h[s+3],h[s+4],h[s+5]),i.set(h[s+6],h[s+7],h[s+8]),r.set(d[l+0],d[l+1]),o.set(d[l+2],d[l+3]),a.set(d[l+4],d[l+5]),n.copy(e).add(t).add(i).divideScalar(3);var c=Math.atan2(n.z,-n.x);u(r,l+0,e,c),u(o,l+2,t,c),u(a,l+4,i,c)}for(e=0;e<d.length;e+=6)t=d[e+0],i=d[e+2],n=d[e+4],r=Math.min(t,i,n),.9<Math.max(t,i,n)&&r<.1&&(t<.2&&(d[e+0]+=1),i<.2&&(d[e+2]+=1),n<.2&&(d[e+4]+=1))}(),this.addAttribute("position",new q(h,3)),this.addAttribute("normal",new q(h.slice(),3)),this.addAttribute("uv",new q(d,2)),0===t?this.computeVertexNormals():this.normalizeNormals()}function Ut(e,t){T.call(this),this.type="TetrahedronGeometry",this.parameters={radius:e,detail:t},this.fromBufferGeometry(new zt(e,t)),this.mergeVertices()}function zt(e,t){It.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={radius:e,detail:t}}function Ht(e,t){T.call(this),this.type="OctahedronGeometry",this.parameters={radiu
1s:e,detail:t},this.fromBufferGeometry(new Ft(e,t)),this.mergeVertices()}function Ft(e,t){It.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={radius:e,detail:t}}function Bt(e,t){T.call(this),this.type="IcosahedronGeometry",this.parameters={radius:e,detail:t},this.fromBufferGeometry(new Gt(e,t)),this.mergeVertices()}function Gt(e,t){var i=(1+Math.sqrt(5))/2;It.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={radius:e,detail:t}}function jt(e,t){T.call(this),this.type="DodecahedronGeometry",this.parameters={radius:e,detail:t},this.fromBufferGeometry(new Vt(e,t)),this.mergeVertices()}function Vt(e,t){var i=(1+Math.sqrt(5))/2,n=1/i;It.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,
119,5,14,19,14,4,19,4,17,1,12,14,1,14,5,1,5,9],e,t),this.type="DodecahedronBufferGeometry",this.parameters={radius:e,detail:t}}function Wt(e,t,i,n,r,o){T.call(this),this.type="TubeGeometry",this.parameters={path:e,tubularSegments:t,radius:i,radialSegments:n,closed:r},void 0!==o&&console.warn("THREE.TubeGeometry: taper has been removed."),e=new $t(e,t,i,n,r),this.tangents=e.tangents,this.normals=e.normals,this.binormals=e.binormals,this.fromBufferGeometry(e),this.mergeVertices()}function $t(r,o,a,s,e){function t(e){d=r.getPointAt(e/o,d);var t=l.normals[e];for(e=l.binormals[e],c=0;c<=s;c++){var i=c/s*Math.PI*2,n=Math.sin(i);i=-Math.cos(i),h.x=i*t.x+n*e.x,h.y=i*t.y+n*e.y,h.z=i*t.z+n*e.z,h.normalize(),f.push(h.x,h.y,h.z),u.x=d.x+a*h.x,u.y=d.y+a*h.y,u.z=d.z+a*h.z,p.push(u.x,u.y,u.z)}}L.call(this),this.type="TubeBufferGeometry",this.parameters={path:r,tubularSegments:o,radius:a,radialSegments:s,closed:e},o=o||64,a=a||1,s=s||8,e=e||!1;var l=r.computeFrenetFrames(o,e);this.tangents=l.tangents,this.normals=l.normals,this.binormals=l.binormals;var n,c,u=new _e,h=new _e,i=new $,d=new _e,p=[],f=[],m=[],g=[];for(n=0;n<o;n++)t(n);for(t(!1===e?o:0),n=0;n<=o;n++)for(c=0;c<=s;c++)i.x=n/o,i.y=c/s,m.push(i.x,i.y);!function(){for(c=1;c<=o;c++)for(n=1;n<=s;n++){var e=(s+1)*c+(n-1),t=(s+1)*c+n,i=(s+1)*(c-1)+n;g.push((s+1)*(c-1)+(n-1),e,i),g.push(e,t,i)}}(),this.setIndex(g),this.addAttribute("position",new q(p,3)),this.addAttribute("normal",new q(f,3)),this.addAttribute("uv",new q(m,2))}function qt(e,t,i,n,r,o,a){T.call(this),this.type="TorusKnotGeometry",this.parameters={radius:e,tube:t,tubularSegments:i,radialSegments:n,p:r,q:o},void 0!==a&&console.warn("THREE.TorusKnotGeometry: heightScale has been deprecated. Use .scale( x, y, z ) instead."),this.fromBufferGeometry(new Xt(e,t,i,n,r,o)),this.mergeVertices()}function Xt(e,t,i,n,r,o){function a(e,t,i,n,r){var o=Math.sin(e);t=i/t*e,i=Math.cos(t),r.x=n*(2+i)*.5*Math.cos(e),r.y=n*(2+i)*o*.5,r.z=n*Math.sin(t)*.5}L.call(this),this.type="TorusKnotBufferGeometry",this.parameters={radius:e,tube:t,tubularSegments:i,radialSegments:n,p:r,q:o},e=e||1,t=t||.4,i=Math.floor(i)||64,n=Math.floor(n)||8,r=r||2,o=o||3;var s,l=[],c=[],u=[],h=[],d=new _e,p=new _e,f=new _e,m=new _e,g=new _e,v=new _e,y=new _e;for(s=0;s<=i;++s){var x=s/i*r*Math.PI*2;for(a(x,r,o,e,f),a(x+.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(),x=0;x<=n;++x){var b=x/n*Math.PI*2,w=-t*Math.cos(b);b=t*Math.sin(b),d.x=f.x+(w*y.x+b*g.x),d.y=f.y+(w*y.y+b*g.y),d.z=f.z+(w*y.z+b*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(s/i),h.push(x/n)}}for(x=1;x<=i;x++)for(s=1;s<=n;s++)e=(n+1)*x+(s-1),t=(n+1)*x+s,r=(n+1)*(x-1)+s,l.push((n+1)*(x-1)+(s-1),e,r),l.push(e,t,r);this.setIndex(l),this.addAttribute("position",new q(c,3)),this.addAttribute("normal",new q(u,3)),this.addAttribute("uv",new q(h,2))}function Yt(e,t,i,n,r){T.call(this),this.type="TorusGeometry",this.parameters={radius:e,tube:t,radialSegments:i,tubularSegments:n,arc:r},this.fromBufferGeometry(new Jt(e,t,i,n,r)),this.mergeVertices()}function Jt(e,t,i,n,r){L.call(this),this.type="TorusBufferGeometry",this.parameters={radius:e,tube:t,radialSegments:i,tubularSegments:n,arc:r},e=e||1,t=t||.4,i=Math.floor(i)||8,n=Math.floor(n)||6,r=r||2*Math.PI;var o,a,s=[],l=[],c=[],u=[],h=new _e,d=new _e,p=new _e;for(o=0;o<=i;o++)for(a=0;a<=n;a++){var f=a/n*r,m=o/i*Math.PI*2;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)}for(o=1;o<=i;o++)for(a=1;a<=n;a++)e=(n+1)*(o-1)+a-1,t=(n+1)*(o-1)+a,r=(n+1)*o+a,s.push((n+1)*o+a-1,e,r),s.push(e,t,r);this.setIndex(s),this.addAttribute("position",new q(l,3)),this.addAttribute("normal",new q(c,3)),this.addAttribute("uv",new q(u,2))}function Zt(e,t,i,n,r){for(var o,a=0,s=t,l=i-n;s<i;s+=n)a+=(e[l]-e[s])*(e[s+1]+e[l+1]),l=s;if(r===0<a)for(r=t;r<i;r+=n)o=ci(r,e[r],e[r+1],o);else for(r=i-n;t<=r;r-=n)o=ci(r,e[r],e[r+1],o);return o&&oi(o,o.next)&&(ui(o),o=o.next),o}function Qt(e,t){if(!e)return e;t||(t=e);do{var i=!1;if(e.steiner||!oi(e,e.next)&&0!==ri(e.prev,e,e.next))e=e.next;else{if(ui(e),(e=t=e.prev)===e.next)break;
1i=!0}}while(i||e!==t);return t}function Kt(e,t){return e.x-t.x}function ei(e,t){var i=t,n=e.x,r=e.y,o=-1/0;do{if(r<=i.y&&r>=i.next.y&&i.next.y!==i.y){var a=i.x+(r-i.y)*(i.next.x-i.x)/(i.next.y-i.y);if(a<=n&&o<a){if((o=a)===n){if(r===i.y)return i;if(r===i.next.y)return i.next}var s=i.x<i.next.x?i:i.next}}i=i.next}while(i!==t);if(!s)return null;if(n===o)return s.prev;a=(t=s).x;var l=s.y,c=1/0;for(i=s.next;i!==t;){if(n>=i.x&&i.x>=a&&n!==i.x&&ni(r<l?n:o,r,a,l,r<l?o:n,r,i.x,i.y)){var u=Math.abs(r-i.y)/(n-i.x);(u<c||u===c&&i.x>s.x)&&si(i,e)&&(s=i,c=u)}i=i.next}return s}function ti(e,t,i,n,r){return 1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-i)*r)|e<<8))|e<<4))|e<<2))|e<<1)|(1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-n)*r)|t<<8))|t<<4))|t<<2))|t<<1))<<1}function ii(e){for(var t=e,i=e;t.x<i.x&&(i=t),(t=t.next)!==e;);return i}function ni(e,t,i,n,r,o,a,s){return 0<=(r-a)*(t-s)-(e-a)*(o-s)&&0<=(e-a)*(n-s)-(i-a)*(t-s)&&0<=(i-a)*(o-s)-(r-a)*(n-s)}function ri(e,t,i){return(t.y-e.y)*(i.x-t.x)-(t.x-e.x)*(i.y-t.y)}function oi(e,t){return e.x===t.x&&e.y===t.y}function ai(e,t,i,n){return!!(oi(e,t)&&oi(i,n)||oi(e,n)&&oi(i,t))||0<ri(e,t,i)!=0<ri(e,t,n)&&0<ri(i,n,e)!=0<ri(i,n,t)}function si(e,t){return ri(e.prev,e,e.next)<0?0<=ri(e,t,e.next)&&0<=ri(e,e.prev,t):ri(e,t,e.prev)<0||ri(e,e.next,t)<0}function li(e,t){var i=new hi(e.i,e.x,e.y),n=new hi(t.i,t.x,t.y),r=e.next,o=t.prev;return(e.next=t).prev=e,(i.next=r).prev=i,(n.next=i).prev=n,(o.next=n).prev=o,n}function ci(e,t,i,n){return e=new hi(e,t,i),n?(e.next=n.next,(e.prev=n).next.prev=e,n.next=e):(e.prev=e).next=e,e}function ui(e){e.next.prev=e.prev,e.prev.next=e.next,e.prevZ&&(e.prevZ.nextZ=e.nextZ),e.nextZ&&(e.nextZ.prevZ=e.prevZ)}function hi(e,t,i){this.i=e,this.x=t,this.y=i,this.nextZ=this.prevZ=this.z=this.next=this.prev=null,this.steiner=!1}function di(e){var t=e.length;2<t&&e[t-1].equals(e[0])&&e.pop()}function pi(e,t){for(var i=0;i<t.length;i++)e.push(t[i].x),e.push(t[i].y)}function fi(e,t){T.call(this),this.type="ExtrudeGeometry",this.parameters={shapes:e,options:t},this.fromBufferGeometry(new mi(e,t)),this.mergeVertices()}function mi(e,t){void 0!==e&&(L.call(this),this.type="ExtrudeBufferGeometry",e=Array.isArray(e)?e:[e],this.addShapeList(e,t),this.computeVertexNormals())}function gi(e,t){T.call(this),this.type="TextGeometry",this.parameters={text:e,parameters:t},this.fromBufferGeometry(new vi(e,t)),this.mergeVertices()}function vi(e,t){var i=(t=t||{}).font;if(!i||!i.isFont)return console.error("THREE.TextGeometry: font parameter is not an instance of THREE.Font."),new T;e=i.generateShapes(e,t.size,t.curveSegments),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),mi.call(this,e,t),this.type="TextBufferGeometry"}function yi(e,t,i,n,r,o,a){T.call(this),this.type="SphereGeometry",this.parameters={radius:e,widthSegments:t,heightSegments:i,phiStart:n,phiLength:r,thetaStart:o,thetaLength:a},this.fromBufferGeometry(new xi(e,t,i,n,r,o,a)),this.mergeVertices()}function xi(e,t,i,n,r,o,a){L.call(this),this.type="SphereBufferGeometry",this.parameters={radius:e,widthSegments:t,heightSegments:i,phiStart:n,phiLength:r,thetaStart:o,thetaLength:a},e=e||1,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;var s,l,c=(o=void 0!==o?o:0)+(a=void 0!==a?a:Math.PI),u=0,h=[],d=new _e,p=new _e,f=[],m=[],g=[],v=[];for(l=0;l<=i;l++){var y=[],x=l/i;for(s=0;s<=t;s++){var b=s/t;d.x=-e*Math.cos(n+b*r)*Math.sin(o+x*a),d.y=e*Math.cos(o+x*a),d.z=e*Math.sin(n+b*r)*Math.sin(o+x*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(b,1-x),y.push(u++)}h.push(y)}for(l=0;l<i;l++)for(s=0;s<t;s++)e=h[l][s+1],n=h[l][s],r=h[l+1][s],a=h[l+1][s+1],(0!==l||0<o)&&f.push(e,n,a),(l!==i-1||c<Math.PI)&&f.push(n,r,a);this.setIndex(f),this.addAttribute("position",new q(m,3)),this.addAttribute("normal",new q(g,3)),this.addAttribute("uv",new q(v,2))}function bi(e,t,i,n,r,o){T.call(this),this.type="RingGeometry",this.parameters={innerRadius:e,outerRadius:t,thetaSegments:i,phiSegments:n,thetaStart:r,thetaLength:o},this.fromBufferGeometry(new wi(e,t,i,n,r,o)),this.mergeVertices()}function wi(e,t,i,n,r,o){L.call(this),this.type="RingBufferGeometry",this.parameters={innerRadius:e,outerRadius:t,thetaSegments:i,phiSegments:n,thetaStart:r,thetaLength:o},e=e||.5,t=t||1,r=void 0!==r?r:0,o=void 0!==o?o:2*Math.PI,i=void 0!==i?Math.max(3,i):8;var a,s,l=[],c=[],u=[],h=[],d=e,p=(t-e)/(n=void 0!==n?Math.max(1,n):1),f=new _e,m=new $;for(a=0;a<=n;a++){for(s=0;s<=i;
1s++)e=r+s/i*o,f.x=d*Math.cos(e),f.y=d*Math.sin(e),c.push(f.x,f.y,f.z),u.push(0,0,1),m.x=(f.x/t+1)/2,m.y=(f.y/t+1)/2,h.push(m.x,m.y);d+=p}for(a=0;a<n;a++)for(t=a*(i+1),s=0;s<i;s++)r=(e=s+t)+i+1,o=e+i+2,d=e+1,l.push(e,r,d),l.push(r,o,d);this.setIndex(l),this.addAttribute("position",new q(c,3)),this.addAttribute("normal",new q(u,3)),this.addAttribute("uv",new q(h,2))}function _i(e,t,i,n){T.call(this),this.type="LatheGeometry",this.parameters={points:e,segments:t,phiStart:i,phiLength:n},this.fromBufferGeometry(new Ti(e,t,i,n)),this.mergeVertices()}function Ti(e,t,i,n){L.call(this),this.type="LatheBufferGeometry",this.parameters={points:e,segments:t,phiStart:i,phiLength:n},t=Math.floor(t)||12,i=i||0,n=n||2*Math.PI,n=oo.clamp(n,0,2*Math.PI);var r,o=[],a=[],s=[],l=1/t,c=new _e,u=new $;for(r=0;r<=t;r++){var h=i+r*l*n,d=Math.sin(h),p=Math.cos(h);for(h=0;h<=e.length-1;h++)c.x=e[h].x*d,c.y=e[h].y,c.z=e[h].x*p,a.push(c.x,c.y,c.z),u.x=r/t,u.y=h/(e.length-1),s.push(u.x,u.y)}for(r=0;r<t;r++)for(h=0;h<e.length-1;h++)l=(i=h+r*e.length)+e.length,c=i+e.length+1,u=i+1,o.push(i,l,u),o.push(l,c,u);if(this.setIndex(o),this.addAttribute("position",new q(a,3)),this.addAttribute("uv",new q(s,2)),this.computeVertexNormals(),n===2*Math.PI)for(n=this.attributes.normal.array,o=new _e,a=new _e,s=new _e,i=t*e.length*3,h=r=0;r<e.length;r++,h+=3)o.x=n[h+0],o.y=n[h+1],o.z=n[h+2],a.x=n[i+h+0],a.y=n[i+h+1],a.z=n[i+h+2],s.addVectors(o,a).normalize(),n[h+0]=n[i+h+0]=s.x,n[h+1]=n[i+h+1]=s.y,n[h+2]=n[i+h+2]=s.z}function Ei(e,t){T.call(this),this.type="ShapeGeometry","object"==typeof t&&(console.warn("THREE.ShapeGeometry: Options parameter has been removed."),t=t.curveSegments),this.parameters={shapes:e,curveSegments:t},this.fromBufferGeometry(new Si(e,t)),this.mergeVertices()}function Si(e,s){function t(e){var t,i=c.length/3,n=(e=e.extractPoints(s)).shape,r=e.holes;if(!1===gs.isClockWise(n))for(n=n.reverse(),e=0,t=r.length;e<t;e++){var o=r[e];!0===gs.isClockWise(o)&&(r[e]=o.reverse())}var a=gs.triangulateShape(n,r);for(e=0,t=r.length;e<t;e++)o=r[e],n=n.concat(o);for(e=0,t=n.length;e<t;e++)o=n[e],c.push(o.x,o.y,0),u.push(0,0,1),h.push(o.x,o.y);for(e=0,t=a.length;e<t;e++)n=a[e],l.push(n[0]+i,n[1]+i,n[2]+i),d+=3}L.call(this),this.type="ShapeBufferGeometry",this.parameters={shapes:e,curveSegments:s},s=s||12;var l=[],c=[],u=[],h=[],i=0,d=0;if(!1===Array.isArray(e))t(e);else for(var n=0;n<e.length;n++)t(e[n]),this.addGroup(i,d,n),i+=d,d=0;this.setIndex(l),this.addAttribute("position",new q(c,3)),this.addAttribute("normal",new q(u,3)),this.addAttribute("uv",new q(h,2))}function Mi(e,t){if(t.shapes=[],Array.isArray(e))for(var i=0,n=e.length;i<n;i++)t.shapes.push(e[i].uuid);else t.shapes.push(e.uuid);return t}function Ai(e,t){L.call(this),this.type="EdgesGeometry",this.parameters={thresholdAngle:t};var i=[];t=Math.cos(oo.DEG2RAD*(void 0!==t?t:1));var n=[0,0],r={},o=["a","b","c"];if(e.isBufferGeometry){var a=new T;a.fromBufferGeometry(e)}else a=e.clone();a.mergeVertices(),a.computeFaceNormals(),e=a.vertices;for(var s=0,l=(a=a.faces).length;s<l;s++)for(var c=a[s],u=0;u<3;u++){var h=c[o[u]],d=c[o[(u+1)%3]];n[0]=Math.min(h,d),n[1]=Math.max(h,d),void 0===r[h=n[0]+","+n[1]]?r[h]={index1:n[0],index2:n[1],face1:s,face2:void 0}:r[h].face2=s}for(h in r)(void 0===(n=r[h]).face2||a[n.face1].normal.dot(a[n.face2].normal)<=t)&&(o=e[n.index1],i.push(o.x,o.y,o.z),o=e[n.index2],i.push(o.x,o.y,o.z));this.addAttribute("position",new q(i,3))}function Ci(e,t,i,n,r,o,a,s){T.call(this),this.type="CylinderGeometry",this.parameters={radiusTop:e,radiusBottom:t,height:i,radialSegments:n,heightSegments:r,openEnded:o,thetaStart:a,thetaLength:s},this.fromBufferGeometry(new Li(e,t,i,n,r,o,a,s)),this.mergeVertices()}function Li(d,p,f,m,g,e,v,y){function t(e){var t,i=new $,n=new _e,r=0,o=!0===e?d:p,a=!0===e?1:-1,s=E;for(t=1;t<=m;t++)w.push(0,M*a,0),_.push(0,a,0),T.push(.5,.5),E++;var l=E;for(t=0;t<=m;t++){var c=t/m*y+v,u=Math.cos(c);c=Math.sin(c),n.x=o*c,n.y=M*a,n.z=o*u,w.push(n.x,n.y,n.z),_.push(0,a,0),i.x=.5*u+.5,i.y=.5*c*a+.5,T.push(i.x,i.y),E++}for(t=0;t<m;t++)i=s+t,n=l+t,!0===e?b.push(n,n+1,i):b.push(n+1,n,i),r+=3;x.addGroup(A,r,!0===e?1:2),A+=r}L.call(this),this.type="CylinderBufferGeometry",this.parameters={radiu
1sTop:d,radiusBottom:p,height:f,radialSegments:m,heightSegments:g,openEnded:e,thetaStart:v,thetaLength:y};var x=this;d=void 0!==d?d:1,p=void 0!==p?p:1,f=f||1,m=Math.floor(m)||8,g=Math.floor(g)||1,e=void 0!==e&&e,v=void 0!==v?v:0,y=void 0!==y?y:2*Math.PI;var b=[],w=[],_=[],T=[],E=0,S=[],M=f/2,A=0;!function(){var e,t,i=new _e,n=new _e,r=0,o=(p-d)/f;for(t=0;t<=g;t++){var a=[],s=t/g,l=s*(p-d)+d;for(e=0;e<=m;e++){var c=e/m,u=c*y+v,h=Math.sin(u);u=Math.cos(u),n.x=l*h,n.y=-s*f+M,n.z=l*u,w.push(n.x,n.y,n.z),i.set(h,o,u).normalize(),_.push(i.x,i.y,i.z),T.push(c,1-s),a.push(E++)}S.push(a)}for(e=0;e<m;e++)for(t=0;t<g;t++)i=S[t+1][e],n=S[t+1][e+1],o=S[t][e+1],b.push(S[t][e],i,o),b.push(i,n,o),r+=6;x.addGroup(A,r,0),A+=r}(),!1===e&&(0<d&&t(!0),0<p&&t(!1)),this.setIndex(b),this.addAttribute("position",new q(w,3)),this.addAttribute("normal",new q(_,3)),this.addAttribute("uv",new q(T,2))}function Ri(e,t,i,n,r,o,a){Ci.call(this,0,e,t,i,n,r,o,a),this.type="ConeGeometry",this.parameters={radius:e,height:t,radialSegments:i,heightSegments:n,openEnded:r,thetaStart:o,thetaLength:a}}function Pi(e,t,i,n,r,o,a){Li.call(this,0,e,t,i,n,r,o,a),this.type="C
1oneBufferGeometry",this.parameters={radius:e,height:t,radialSegments:i,heightSegments:n,openEnded:r,thetaStart:o,thetaLength:a}}function ki(e,t,i,n){T.call(this),this.type="CircleGeometry",this.parameters={radius:e,segments:t,thetaStart:i,thetaLength:n},this.fromBufferGeometry(new Ni(e,t,i,n)),this.mergeVertices()}function Ni(e,t,i,n){L.call(this),this.type="CircleBufferGeometry",this.parameters={radius:e,segments:t,thetaStart:i,thetaLength:n},e=e||1,t=void 0!==t?Math.max(3,t):8,i=void 0!==i?i:0,n=void 0!==n?n:2*Math.PI;var r,o=[],a=[],s=[],l=[],c=new _e,u=new $;a.push(0,0,0),s.push(0,0,1),l.push(.5,.5);var h=0;for(r=3;h<=t;h++,r+=3){var d=i+h/t*n;c.x=e*Math.cos(d),c.y=e*Math.sin(d),a.push(c.x,c.y,c.z),s.push(0,0,1),u.x=(a[r]/e+1)/2,u.y=(a[r+1]/e+1)/2,l.push(u.x,u.y)}for(r=1;r<=t;r++)o.push(r,r+1,0);this.setIndex(o),this.addAttribute("position",new q(a,3)),this.addAttribute("normal",new q(s,3)),this.addAttribute("uv",new q(l,2))}function Di(e){k.call(this),this.type="ShadowMaterial",this.color=new _(0),this.transparent=!0,this.setValues(e)}function Oi(e){D.call(this,e),this.type="RawShaderMaterial"}function Ii(e){k.call(this),this.defines={STANDARD:""},this.type="MeshStandardMaterial",this.color=new _(16777215),this.metalness=this.roughness=.5,this.lightMap=this.map=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new _(0),this.emissiveIntensity=1,this.bumpMap=this.emissiveMap=null,this.bumpScale=1,this.normalMap=null,this.normalScale=new $(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.envMap=this.alphaMap=this.metalnessMap=this.roughnessMap=null,this.envMapIntensity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinejoin=this.wireframeLinecap="round",this.morphNormals=this.morphTargets=this.skinning=!1,this.setValues(e)}function Ui(e){Ii.call(this),this.defines={PHYSICAL:""},this.type="MeshPhysicalMaterial",this.reflectivity=.5,this.clearCoatRoughness=this.clearCoat=0,this.setValues(e)}function zi(e){k.call(this),this.type="MeshPhongMaterial",this.color=new _(16777215),this.specular=new _(1118481),this.shininess=30,this.lightMap=this.map=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new _(0),this.emissiveIntensity=1,this.bumpMap=this.emissiveMap=null,this.bumpScale=1,this.normalMap=null,this.normalScale=new $(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.envMap=this.alphaMap=this.specularMap=null,this.combine=0,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinejoin=this.wireframeLinecap="round",this.morphNormals=this.morphTargets=this.skinning=!1,this.setValues(e)}function Hi(e){zi.call(this),this.defines={TOON:""},this.type="MeshToonMaterial",this.gradientMap=null,this.setValues(e)}function Fi(e){k.call(this),this.type="MeshNormalMaterial",this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalScale=new $(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.morphNormals=this.morphTargets=this.skinning=this.lights=this.fog=!1,this.setValues(e)}function Bi(e){k.call(this),this.type="MeshLambertMaterial",this.color=new _(16777215),this.lightMap=this.map=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new _(0),this.emissiveIntensity=1,this.envMap=this.alphaMap=this.specularMap=this.emissiveMap=null,this.combine=0,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinejoin=this.wireframeLinecap="round",this.morphNormals=this.morphTargets=this.skinning=!1,this.setValues(e)}function Gi(e){_t.call(this),this.type="LineDashedMaterial",this.scale=1,this.dashSize=3,this.gapSize=1,this.setValues(e)}function ji(e,t,i){var n=this,r=!1,o=0,a=0,s=void 0;this.onStart=void 0,this.onLoad=e,this.onProgress=t,this.onError=i,this.itemStart=function(e){a++,!1===r&&void 0!==n.onStart&&n.onStart(e,o,a),r=!0},this.itemEnd=function(e){o++,void 0!==n.onProgress&&n.onProgress(e,o,a),o===a&&(r=!1,void 0!==n.onLoad)&&n.onLoad()},this.itemError=function(e){void 0!==n.onError&&n.onError(e)},this.resolveURL=function(e){return s?s(e):e},this.setURLModifier=function(e){return s=e,this}}function Vi(e){this.manager=void 0!==e?e:bs}function Wi(e){this.manager=void 0!==e?e:bs,this._parser=null}function $i(e){this.manager=void 0!==e?e:bs,this._parser=null}function qi(e){this.manager=void 0!==e?e:bs}function Xi(e){this.manager=void 0!==e?e:bs}function Yi(e){this.manager=void 0!==e?e:bs}function Ji(){this.type="Curve",this.arcLengthDivisions=200}function Zi(e,t,i,n,r,o,a,s){Ji.call(this),this.type="EllipseCurve",this.aX=e||0,this.aY=t||0,this.xRadius=i||1,this.yRadius=n||1,this.aStartAngle=r||0,this.aEndAngle=o||2*Math.PI,this.aClockwise=a||!1,this.aRotation=s||0}function Qi(e,t,i,n,r,o){Zi.call(this,e,t,i,i,n,r,o),this.type="ArcCurve"}function Ki(){var s=0,l=0,c=0,u=0;return{initCatmullRom:function(e,t,i,n,r){c=-3*(s=t)+3*i-2*(l=e=r*(i-e))-(n=r*(n-t)),u=2*t-2*i+e+n},initNonuniformCatmullRom:function(e,t,i,n,r,o,a){c=-3*(s=t)+3*i-2*(l=e=((t-e)/r-(i-e)/(r+o)+(i-t)/o)*o)-(n=((i-t)/o-(n-t)/(o+a)+(n-i)/a)*o),u=2*t-2*i+e+n},calc:function(e){var t=e*e;return s+l*e+c*t+u*t*e}}}function en(e,t,i,n){Ji.call(this),this.type="CatmullRomCurve3",this.points=e||[],this.closed=t||!1,this.curveType=i||"centripetal",this.tension=n||.5}function tn(e,t,i,n,r){var o=e*e;return(2*i-2*n+(t=.5*(n-t))+(r=.5*(r-i)))*e*o+(-3*i+3*n-2*t-r)*o+t*e+i}function nn(e,t,i,n){var r=1-e;return r*r*t+2*(1-e)*e*i+e*e*n}function rn(e,t,i,n,r){var o=1-e,a=1-e;return o*o*o*t+3*a*a*e*i+3*(1-e)*e*e*n+e*e*e*r}function on(e,t,i,n){Ji.call(this),this.type="CubicBezierCurve",this.v0=e||new $,this.v1=t||new $,this.v2=i||new $,this.v3=n||new $}function an(e,t,i,n){Ji.call(this),this.type="CubicBezierCurve3",this.v0=e||new _e,this.v1=t||new _e,this.v2=i||new _e,this.v3=n||new _e}function sn(e,t){Ji.call(this),this.type="LineCurve",this.v1=e||new $,this.v2=t||new $}function ln(e,t){Ji.call(this),this.type="LineCurve3",this.v1=e||new _e,this.v2=t||new _e}function cn(e,t,i){Ji.call(this),this.type="QuadraticBezierCurve",this.v0=e||new $,this.v1=t||new $,this.v2=i||new $}function un(e,t,i){Ji.call(this),this.type="QuadraticBezierCurve3",this.v0=e||new _e,this.v1=t||new _e,this.v2=i||new _e}function hn(e){Ji.call(this),this.type="SplineCurve",this.points=e||[]}function dn(){Ji.call(this),this.type="CurvePath",this.curves=[],this.autoClose=!1}function pn(e){dn.call(this),this.type="Path",this.currentPoint=new $,e&&this.setFromPoints(e)}function fn(e){pn.call(this,e),this.uuid=oo.generateUUID(),this.type="Shape",this.holes=[]}function mn(e,t){u.call(this),this.type="Light",this.color=new _(e),this.intensity=void 0!==t?t:1,this.receiveShadow=void 0}function gn(e,t,i){mn.call(this,e,i),this.type="HemisphereLight",this.castShadow=void 0,this.position.copy(u.DefaultUp),this.updateMatrix(),this.groundColor=new _(t)}function vn(e){this.camera=e,this.bias=0,this.radius=1,this.mapSize=new $(512,512),this.map=null,this.matrix=new we}function yn(){vn.call(this,new ct(50,1,.5,500))}function xn(e,t,i,n,r,o){mn.call(this,e,t),this.type="SpotLight",this.position.copy(u.DefaultUp),this.updateMatrix(),this.target=new u,Object.defineProperty(this,"power",{get:function(){return this.intensity*Math.PI},set:function(e){this.intensity=e/Math.PI}}),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 yn}function bn(e,t,i,n){mn.call(this,e,t),this.type="PointLight",Object.defineProperty(this,"power",{get:function(){return 4*this.intensity*Math.PI},set:function(e){this.intensity=e/(4*Math.PI)}}),this.distance=void 0!==i?i:0,this.decay=void 0!==n?n:1,this.shadow=new vn(new ct(90,1,.5,500))}function wn(){vn.call(this,new p(-5,5,5,-5,.5,500))}function _n(e,t){mn.call(this,e,t),this.type="DirectionalLight",this.position.copy(u.DefaultUp),this.updateMatrix(),this.target=new u,this.shadow=new wn}function Tn(e,t){mn.call(this,e,t),this.type="AmbientLight",this.castShadow=void 0}function En(e,t,i,n){mn.call(this,e,t),this.type="RectAreaLight",this.width=void 0!==i?i:10,this.height=void 0!==n?n:10}function Sn(e,t,i,n){On.call(this,e,t,i,n)}function Mn(e,t,i){On.call(this,e,t,i)}function An(e,t,i,n){this.parameterPositions=e,this._cachedIndex=0,this.resultBuffer=void 0!==n?n:new t.constructor(i),this.sampleValues=t,this.valueSize=i}function Cn(e,t,i,n){An.call(this,e,t,i,n)}function Ln(e,t,i,n){On.call(this,e,t,i,n)}function Rn(e,t,i,n){On.call(this,e,t,i,n)}function Pn(e,t,i,n){On.call(this,e,t,i,n)}function kn(e,t,i,n){An.call(this,e,t,i,n),this._offsetNext=this._weightNext=this._offsetPrev=this._weightPrev=-0}function Nn(e,t,i,n){An.call(this,e,t,i,n)}function Dn(e,t,i,n){An.call(this,e,t,i,n)}function On(e,t,i,n){if(void 0===e)throw Error("THREE.KeyframeTrack: track name is undefined");if(void 0===t||0===t.length)throw Error("THREE.KeyframeTrack: no keyframes in track named "+e);this.name=e,this.times=As.convertArray(t,this.TimeBufferType),this.values=As.convertArray(i,this.ValueBufferType),this.setInterpolation(n||this.DefaultInterpolation),this.validate(),this.optimize()}function In(e,t,i,n){On.call(this,e,t,i,n)}function Un(e,t,i){this.name=e,this.tracks=i,this.duration=void 0!==t?t:-1,this.uuid=oo.generateUUID(),this.duration<0&&this.resetDuration(),this.optimize()}function zn(e){this.manager=void 0!==e?e:bs,this.textures={}}function Hn(e){this.manager=void 0!==e?e:bs}function Fn(){}function Bn(e){"boolean"==typeof e&&(console.warn("THREE.JSONLoader: showStatus parameter has been removed from constructor."),e=void 0),this.manager=void 0!==e?e:bs,this.withCredentials=!1}function Gn(e){this.manager=void 0!==e?e:bs,this.texturePath=""}function jn(e){"undefined"==typeof createImageBitmap&&console.warn("THREE.ImageBitmapLoader: createImageBitmap() not supported."),"undefined"==typeof fetch&&console.warn("THREE.ImageBitmapLoader: fetch() not supported."),this.manager=void 0!==e?e:bs,this.options=void 0}function Vn(){this.type="ShapePath",this.subPaths=[],this.currentPath=null}function Wn(e){this.type="Font",this.data=e}function $n(e){this.manager=void 0!==e?e:bs}function qn(e){this.manager=void 0!==e?e:bs}function Xn(){this.type="StereoCamera",this.aspect=1,this.eyeSep=.064,this.cameraL=new ct,this.cameraL.layers.enable(1),this.cameraL.matrixAutoUpdate=!1,this.cameraR=new ct,this.cameraR.layers.enable(2),this.cameraR.matrixAutoUpdate=!1}function Yn(e,t,i){u.call(this),this.type="CubeCamera";var r=new ct(90,1,e,t);r.up.set(0,-1,0),r.lookAt(new _e(1,0,0)),this.add(r);var o=new ct(90,1,e,t);o.up.set(0,-1,0),o.lookAt(new _e(-1,0,0)),this.add(o);var a=new ct(90,1,e,t);a.up.set(0,0,1),a.lookAt(new _e(0,1,0)),this.add(a);var s=new ct(90,1,e,t);s.up.set(0,0,-1),s.lookAt(new _e(0,-1,0)),this.add(s);var l=new ct(90,1,e,t);l.up.set(0,-1,0),l.lookAt(new _e(0,0,1)),this.add(l);var c=new ct(90,1,e,t);c.up.set(0,-1,0),c.lookAt(new _e(0,0,-1)),this.add(c),this.renderTarget=new n(i,i,{format:1022,magFilter:1006,minFilter:1006}
1),this.renderTarget.texture.name="CubeCamera",this.update=function(e,t){null===this.parent&&this.updateMatrixWorld();var i=this.renderTarget,n=i.texture.generateMipmaps;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)},this.clear=function(e,t,i,n){for(var r=this.renderTarget,o=0;o<6;o++)r.activeCubeFace=o,e.setRenderTarget(r),e.clear(t,i,n);e.setRenderTarget(null)}}function Jn(){u.call(this),this.type="AudioListener",this.context=Sl.getContext(),this.gain=this.context.createGain(),this.gain.connect(this.context.destination),this.filter=null}function Zn(e){u.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.offset=this.startTime=0,this.playbackRate=1,this.isPlaying=!1,this.hasPlaybackControl=!0,this.sourceType="empty",this.filters=[]}function Qn(e){Zn.call(this,e),this.panner=this.context.createPanner(),this.panner.connect(this.gain)}function Kn(e,t){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)}function er(e,t,i){switch(this.binding=e,this.valueSize=i,e=Float64Array,t){case"quaternion":t=this._slerp;break;case"string":case"bool":e=Array,t=this._select;break;default:t=this._lerp}this.buffer=new e(4*i),this._mixBufferRegion=t,this.referenceCount=this.useCount=this.cumulativeWeight=0}function tr(e,t,i){i=i||ir.parseTrackName(t),this._targetGroup=e,this._bindings=e.subscribe_(t,i)}function ir(e,t,i){this.path=t,this.parsedPath=i||ir.parseTrackName(t),this.node=ir.findNode(e,this.parsedPath.nodeName)||e,this.rootNode=e}function nr(){this.uuid=oo.generateUUID(),this._objects=Array.prototype.slice.call(arguments),this.nCachedObjects_=0;var e={};this._indicesByUUID=e;for(var t=0,i=arguments.length;t!==i;++t)e[arguments[t].uuid]=t;this._paths=[],this._parsedPaths=[],this._bindings=[],this._bindingsIndicesByPath={};var n=this;this.stats={objects:{get total(){return n._objects.length},get inUse(){return this.total-n.nCachedObjects_}},get bindingsPerObject(){return n._bindings.length}}}function rr(e,t,i){this._mixer=e,this._clip=t,this._localRoot=i||null,t=(e=t.tracks).length,i=Array(t);for(var n={endingStart:2400,endingEnd:2400},r=0;r!==t;++r){var o=e[r].createInterpolant(null);(i[r]=o).settings=n}this._interpolantSettings=n,this._interpolants=i,this._propertyBindings=Array(t),this._weightInterpolant=this._timeScaleInterpolant=this._byClipCacheIndex=this._cacheIndex=null,this.loop=2201,this._loopCount=-1,this._startTime=null,this.time=0,this._effectiveWeight=this.weight=this._effectiveTimeScale=this.timeScale=1,this.repetitions=1/0,this.paused=!1,this.enabled=!0,this.clampWhenFinished=!1,this.zeroSlopeAtEnd=this.zeroSlopeAtStart=!0}function or(e){this._root=e,this._initMemoryManager(),this.time=this._accuIndex=0,this.timeScale=1}function ar(e,t){"string"==typeof e&&(console.warn("THREE.Uniform: Type parameter is no longer needed."),e=t),this.value=e}function sr(){L.call(this),this.type="InstancedBufferGeometry",this.maxInstancedCount=void 0}function lr(e,t,i,n){this.data=e,this.itemSize=t,this.offset=i,this.normalized=!0===n}function cr(e,t){this.array=e,this.stride=t,this.count=void 0!==e?e.length/t:0,this.dynamic=!1,this.updateRange={offset:0,count:-1},this.version=0}function ur(e,t,i){cr.call(this,e,t),this.meshPerAttribute=i||1}function hr(e,t,i){y.call(this,e,t),this.meshPerAttribute=i||1}function dr(e,t,i,n){this.ray=new z(e,t),this.near=i||0,this.far=n||1/0,this.params={Mesh:{},Line:{},LOD:{},Points:{threshold:1},Sprite:{}},Object.defineProperties(this.params,{PointCloud:{get:function(){return console.warn("THREE.Raycaster: params.PointCloud has been renamed to params.Points."),this.Points}}})}function pr(e,t){return e.distance-t.distance}function fr(e,t,i,n){if(!1!==e.visible&&(e.raycast(t,i),!0===n)){n=0;
1for(var r=(e=e.children).length;n<r;n++)fr(e[n],t,i,!0)}}function mr(e){this.autoStart=void 0===e||e,this.elapsedTime=this.oldTime=this.startTime=0,this.running=!1}function gr(e,t,i){return this.radius=void 0!==e?e:1,this.phi=void 0!==t?t:0,this.theta=void 0!==i?i:0,this}function vr(e,t,i){return this.radius=void 0!==e?e:1,this.theta=void 0!==t?t:0,this.y=void 0!==i?i:0,this}function yr(e,t){this.min=void 0!==e?e:new $(1/0,1/0),this.max=void 0!==t?t:new $(-1/0,-1/0)}function xr(e){u.call(this),this.material=e,this.render=function(){}}function br(e,t,i,n){this.object=e,this.size=void 0!==t?t:1,e=void 0!==i?i:16711680,n=void 0!==n?n:1,t=0,(i=this.object.geometry)&&i.isGeometry?t=3*i.faces.length:i&&i.isBufferGeometry&&(t=i.attributes.normal.count),i=new L,t=new q(6*t,3),i.addAttribute("position",t),Et.call(this,i,new _t({color:e,linewidth:n})),this.matrixAutoUpdate=!1,this.update()}function wr(e,t){u.call(this),this.light=e,this.light.updateMatrixWorld(),this.matrix=e.matrixWorld,this.matrixAutoUpdate=!1,this.color=t,e=new L,t=[0,0,0,0,0,1,0,0,0,1,0,1,0,0,0,-1,0,1,0,0,0,0,1,1,0,0,0,0,-1,1];for(var i=0,n=1;i<32;i++,n++){var r=i/32*Math.PI*2,o=n/32*Math.PI*2;t.push(Math.cos(r),Math.sin(r),1,Math.cos(o),Math.sin(o),1)}e.addAttribute("position",new q(t,3)),t=new _t({fog:!1}),this.cone=new Et(e,t),this.add(this.cone),this.update()}function _r(e){for(var t=function e(t){var i=[];t&&t.isBone&&i.push(t);for(var n=0;n<t.children.length;n++)i.push.apply(i,e(t.children[n]));return i}(e),i=new L,n=[],r=[],o=new _(0,0,1),a=new _(0,1,0),s=0;s<t.length;s++){var l=t[s];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))}i.addAttribute("position",new q(n,3)),i.addAttribute("color",new q(r,3)),n=new _t({vertexColors:2,depthTest:!1,depthWrite:!1,transparent:!0}),Et.call(this,i,n),this.root=e,this.bones=t,this.matrix=e.matrixWorld,this.matrixAutoUpdate=!1}function Tr(e,t,i){this.light=e,this.light.updateMatrixWorld(),this.color=i,e=new xi(t,4,2),t=new N({wireframe:!0,fog:!1}),I.call(this,e,t),this.matrix=this.light.matrixWorld,this.matrixAutoUpdate=!1,this.update()}function Er(e,t){u.call(this),this.light=e,this.light.updateMatrixWorld(),this.matrix=e.matrixWorld,this.matrixAutoUpdate=!1,this.color=t,e=new _t({fog:!1}),(t=new L).addAttribute("position",new y(new Float32Array(15),3)),this.line=new Tt(t,e),this.add(this.line),this.update()}function Sr(e,t,i){u.call(this),this.light=e,this.light.updateMatrixWorld(),this.matrix=e.matrixWorld,this.matrixAutoUpdate=!1,this.color=i,(e=new Ft(t)).rotateY(.5*Math.PI),this.material=new N({wireframe:!0,fog:!1}),void 0===this.color&&(this.material.vertexColors=2),t=e.getAttribute("position"),t=new Float32Array(3*t.count),e.addAttribute("color",new y(t,3)),this.add(new I(e,this.material)),this.update()}function Mr(e,t,i,n){e=e||10,t=t||10,i=new _(void 0!==i?i:4473924),n=new _(void 0!==n?n:8947848);var r=t/2,o=e/t,a=e/2;e=[];for(var s=[],l=0,c=0,u=-a;l<=t;l++,u+=o){e.push(-a,0,u,a,0,u),e.push(u,0,-a,u,0,a);var h=l===r?i:n;h.toArray(s,c),c+=3,h.toArray(s,c),c+=3,h.toArray(s,c),c+=3,h.toArray(s,c),c+=3}(t=new L).addAttribute("position",new q(e,3)),t.addAttribute("color",new q(s,3)),i=new _t({vertexColors:2}),Et.call(this,t,i)}function Ar(e,t,i,n,r,o){e=e||10,t=t||16,i=i||8,n=n||64,r=new _(void 0!==r?r:4473924),o=new _(void 0!==o?o:8947848);var a,s=[],l=[];for(a=0;a<=t;a++){var c=a/t*2*Math.PI,u=Math.sin(c)*e;c=Math.cos(c)*e,s.push(0,0,0),s.push(u,0,c);var h=1&a?r:o;l.push(h.r,h.g,h.b),l.push(h.r,h.g,h.b)}for(a=0;a<=i;a++){h=1&a?r:o;var d=e-e/i*a;for(t=0;t<n;t++)c=t/n*2*Math.PI,u=Math.sin(c)*d,c=Math.cos(c)*d,s.push(u,0,c),l.push(h.r,h.g,h.b),c=(t+1)/n*2*Math.PI,u=Math.sin(c)*d,c=Math.cos(c)*d,s.push(u,0,c),l.push(h.r,h.g,h.b)}(e=new L).addAttribute("position",new q(s,3)),e.addAttribute("color",new q(l,3)),s=new _t({vertexColors:2}),Et.call(this,e,s)}function Cr(e,t,i,n){this.object=e,this.size=void 0!==t?t:1,e=void 0!==i?i:16776960,n=void 0!==n?n:1,t=0,(i=this.object.geometry)&&i.isGeometry?t=i.faces.length:console.warn("THREE.FaceNormalsHelper: only THREE.Geometry is supported. Use THREE.VertexNormalsHelper, instead."),i=new L,t=new q(6*t,3),i.addAttribute("position",t),Et.call(this,i,new _t({color:e,linewidth:n})),this.matrixAutoUpdate=!1,this.update()}function Lr(e,t,i){u.call(this),this.light=e,this.light.updateMatrixWorld(),this.matrix=e.matrixWorld,this.matrixAutoUpdate=!1,this.color=i,void 0===t&&(t=1),(e=new L).addAttribute("position",new q([-t,t,0,t,t,0,t,-t,0,-t,-t,0,-t,t,0],3)),t=new _t({fog:!1}),this.lightPlane=new Tt(e,t),this.add(this.lightPlane),(e=new L).addAttribute("position",new q([0,0,0,0,0,1],3)),this.targetLine=new Tt(e,t),this.add(this.targetLine),this.update()}function Rr(e){function t(e,t,i){n(e,i),n(t,i)}function n(e,t){o.push(0,0,0),a.push(t.r,t.g,t.b),void 0===s[e]&&(s[e]=[]),s[e].push(o.length/3-1)}var i=new L,r=new _t({color:16777215,vertexColors:1}),o=[],a=[],s={},l=new _(16755200),c=new _(16711680),u=new _(43775),h=new _(16777215),d=new _(3355443);t("n1","n2",l),t("n2","n4",l),t("n4","n3",l),t("n3","n1",l),t("f1","f2",l),t("f2","f4",l),t("f4","f3",l),t("f3","f1",l),t("n1","f1",l),t("n2","f2",l),t("n3","f3",l),t("n4","f4",l),t("p","n1",c),t("p","n2",c),t("p","n3",c),t("p","n4",c),t("u1","u2",u),t("u2","u3",u),t("u3","u1",u),t("c","t",h),t("p","c",d),t("cn1","cn2",d),t("cn3","cn4",d),t("cf1","cf2",d),t("cf3","cf4",d),i.addAttribute("position",new q(o,3)),i.addAttribute("color",new q(a,3)),Et.call(this,i,r),this.camera=e,this.camera.updateProjectionMatrix&&this.camera.updateProjectionMatrix(),this.matrix=e.matrixWorld,this.matrixAutoUpdate=!1,this.pointMap=s,this.update()}function Pr(e,t){this.object=e,void 0===t&&(t=16776960),e=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]);var i=new Float32Array(24),n=new L;n.setIndex(new y(e,1)),n.addAttribute("position",new y(i,3)),Et.call(this,n,new _t({color:t})),this.matrixAutoUpdate=!1,this.update()}function kr(e,t){this.type="Box3Helper",this.box=e,e=void 0!==t?t:16776960,t=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]);var i=new L;i.setIndex(new y(t,1)),i.addAttribute("position",new q([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)),Et.call(this,i,new _t({color:e})),this.geometry.computeBoundingSphere()}function Nr(e,t,i){this.type="PlaneHelper",this.plane=e,this.size=void 0===t?1:t,e=void 0!==i?i:16776960,(t=new L).addAttribute("position",new q([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)),t.computeBoundingSphere(),Tt.call(this,t,new _t({color:e})),(t=new L).addAttribute("position",new q([1,1,1,-1,1,1,-1,-1,1,1,1,1,-1,-1,1,1,-1,1],3)),t.computeBoundingSphere(),this.add(new I(t,new N({color:e,opacity:.2,transparent:!0,depthWrite:!1})))}function Dr(e,t,i,n,r,o){u.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===bl&&((bl=new L).addAttribute("position",new q([0,0,0,0,1,0],3)),(wl=new Li(0,.5,1,5,1)).translate(0,-.5,0)),this.position.copy(t),this.line=new Tt(bl,
1new _t({color:n})),this.line.matrixAutoUpdate=!1,this.add(this.line),this.cone=new I(wl,new N({color:n})),this.cone.matrixAutoUpdate=!1,this.add(this.cone),this.setDirection(e),this.setLength(i,r,o)}function Or(e){var t=[0,0,0,e=e||1,0,0,0,0,0,0,e,0,0,0,0,0,0,e];(e=new L).addAttribute("position",new q(t,3)),e.addAttribute("color",new q([1,0,0,1,.6,0,0,1,0,.6,1,0,0,0,1,0,.6,1],3)),t=new _t({vertexColors:2}),Et.call(this,e,t)}function Ir(e){console.warn("THREE.ClosedSplineCurve3 has been deprecated. Use THREE.CatmullRomCurve3 instead."),en.call(this,e),this.type="catmullrom",this.closed=!0}function Ur(e){console.warn("THREE.SplineCurve3 has been deprecated. Use THREE.CatmullRomCurve3 instead."),en.call(this,e),this.type="catmullrom"}function zr(e){console.warn("THREE.Spline has been removed. Use THREE.CatmullRomCurve3 instead."),en.call(this,e),this.type="catmullrom"}void 0===Number.EPSILON&&(Number.EPSILON=Math.pow(2,-52)),void 0===Number.isInteger&&(Number.isInteger=function(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e}),void 0===Math.sign&&(Math.sign=function(e){return e<0?-1:0<e?1:+e}),!1=="name"in Function.prototype&&Object.defineProperty(Function.prototype,"name",{get:function(){return this.toString().match(/^\s*function\s*([^\(\s]*)/)[1]}}),void 0===Object.assign&&(Object.assign=function(e){if(null==e)throw new TypeError("Cannot convert undefined or null to object");for(var t=Object(e),i=1;i<arguments.length;i++){var n=arguments[i];if(null!=n)for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t}),Object.assign(t.prototype,{addEventListener:function(e,t){void 0===this._listeners&&(this._listeners={});var i=this._listeners;void 0===i[e]&&(i[e]=[]),-1===i[e].indexOf(t)&&i[e].push(t)},hasEventListener:function(e,t){if(void 0===this._listeners)return!1;var i=this._listeners;return void 0!==i[e]&&-1!==i[e].indexOf(t)},removeEventListener:function(e,t){void 0!==this._listeners&&(void 0!==(e=this._listeners[e])&&(-1!==(t=e.indexOf(t))&&e.splice(t,1)))},dispatchEvent:function(e){if(void 0!==this._listeners){var t=this._listeners[e.type];if(void 0!==t){e.target=this;for(var i=0,n=(t=t.slice(0)).length;i<n;i++)t[i].call(this,e)}}}});var Hr,Fr,Br,Gr,jr,Vr,Wr,$r,qr,Xr,Yr,Jr,Zr,Qr,Kr,eo,to,io,no,ro,oo={DEG2RAD:Math.PI/180,RAD2DEG:180/Math.PI,generateUUID:function(){for(var r=[],e=0;e<256;e++)r[e]=(e<16?"0":"")+e.toString(16).toUpperCase();return function(){var e=4294967295*Math.random()|0,t=4294967295*Math.random()|0,i=4294967295*Math.random()|0,n=4294967295*Math.random()|0;return r[255&e]+r[e>>8&255]+r[e>>16&255]+r[e>>24&255]+"-"+r[255&t]+r[t>>8&255]+"-"+r[t>>16&15|64]+r[t>>24&255]+"-"+r[63&i|128]+r[i>>8&255]+"-"+r[i>>16&255]+r[i>>24&255]+r[255&n]+r[n>>8&255]+r[n>>16&255]+r[n>>24&255]}}(),clamp:function(e,t,i){return Math.max(t,Math.min(i,e))},euclideanModulo:function(e,t){return(e%t+t)%t},mapLinear:function(e,t,i,n,r){return n+(e-t)*(r-n)/(i-t)},lerp:function(e,t,i){return(1-i)*e+i*t},smoothstep:function(e,t,i){return e<=t?0:i<=e?1:(e=(e-t)/(i-t))*e*(3-2*e)},smootherstep:function(e,t,i){return e<=t?0:i<=e?1:(e=(e-t)/(i-t))*e*e*(e*(6*e-15)+10)},randInt:function(e,t){return e+Math.floor(Math.random()*(t-e+1))},randFloat:function(e,t){return e+Math.random()*(t-e)},randFloatSpread:function(e){return e*(.5-Math.random())},degToRad:function(e){return e*oo.DEG2RAD},radToDeg:function(e){return e*oo.RAD2DEG},isPowerOfTwo:function(e){return 0==(e&e-1)&&0!==e},ceilPowerOfTwo:function(e){return Math.pow(2,Math.ceil(Math.log(e)/Math.LN2))},floorPowerOfTwo:function(e){return Math.pow(2,Math.floor(Math.log(e)/Math.LN2))}};Object.defineProperties($.prototype,{width:{get:function(){return this.x},set:function(e){this.x=e}},height:{get:function(){return this.y},set:function(e){this.y=e}}}),Object.assign($.prototype,{isVector2:!0,set:function(e,t){return this.x=e,this.y=t,this},setScalar:function(e){return this.y=this.x=e,this},setX:function(e){return this.x=e,this},setY:function(e){return this.y=e,this},setComponent:function(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;default:throw Error("index is out of range: "+e)}return this},getComponent:function(e){switch(e){case 0:return this.x;case 1:return this.y;default:throw Error("index is out of range: "+e)}},clone:function(){return new this.constructor(this.x,this.y)},copy:function(e){return this.x=e.x,this.y=e.y,this},add:function(e,t){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)},addScalar:function(e){return this.x+=e,this.y+=e,this},addVectors:function(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this},addScaledVector:function(e,t){return this.x+=e.x*t,this.y+=e.y*t,this},sub:function(e,t){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.
1y,this)},subScalar:function(e){return this.x-=e,this.y-=e,this},subVectors:function(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this},multiply:function(e){return this.x*=e.x,this.y*=e.y,this},multiplyScalar:function(e){return this.x*=e,this.y*=e,this},divide:function(e){return this.x/=e.x,this.y/=e.y,this},divideScalar:function(e){return this.multiplyScalar(1/e)},applyMatrix3:function(e){var t=this.x,i=this.y;return e=e.elements,this.x=e[0]*t+e[3]*i+e[6],this.y=e[1]*t+e[4]*i+e[7],this},min:function(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this},max:function(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this},clamp:function(e,t){return this.x=Math.max(e.x,Math.min(t.x,this.x)),this.y=Math.max(e.y,Math.min(t.y,this.y)),this},clampScalar:(Hr=new $,Fr=new $,function(e,t){return Hr.set(e,e),Fr.set(t,t),this.clamp(Hr,Fr)}),clampLength:function(e,t){var i=this.length();return this.divideScalar(i||1).multiplyScalar(Math.max(e,Math.min(t,i)))},floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this},ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this},round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},roundToZero:function(){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},negate:function(){return this.x=-this.x,this.y=-this.y,this},dot:function(e){return this.x*e.x+this.y*e.y},lengthSq:function(){return this.x*this.x+this.y*this.y},length:function(){return Math.sqrt(this.x*this.x+this.y*this.y)},manhattanLength:function(){return Math.abs(this.x)+Math.abs(this.y)},normalize:function(){return this.divideScalar(this.length()||1)},angle:function(){var e=Math.atan2(this.y,this.x);return e<0&&(e+=2*Math.PI),e},distanceTo:function(e){return Math.sqrt(this.distanceToSquared(e))},distanceToSquared:function(e){var t=this.x-e.x;return t*t+(e=this.y-e.y)*e},manhattanDistanceTo:function(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)},setLength:function(e){return this.normalize().multiplyScalar(e)},lerp:function(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this},lerpVectors:function(e,t,i){return this.subVectors(t,e).multiplyScalar(i).add(e)},equals:function(e){return e.x===this.x&&e.y===this.y},fromArray:function(e,t){return void 0===t&&(t=0),this.x=e[t],this.y=e[t+1],this},toArray:function(e,t){return void 0===e&&(e=[]),void 0===t&&(t=0),e[t]=this.x,e[t+1]=this.y,e},fromBufferAttribute:function(e,t,i){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},rotateAround:function(e,t){var i=Math.cos(t);t=Math.sin(t);var n=this.x-e.x,r=this.y-e.y;return this.x=n*i-r*t+e.x,this.y=n*t+r*i+e.y,this}}),Object.assign(we.prototype,{isMatrix4:!0,set:function(e,t,i,n,r,o,a,s,l,c,u,h,d,p,f,m){var g=this.elements;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},identity:function(){return this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),this},clone:function(){return(new we).fromArray(this.elements)},copy:function(e){var t=this.elements;return e=e.elements,t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],this},copyPosition:function(e){var t=this.elements;return e=e.elements,t[12]=e[12],t[13]=e[13],t[14]=e[14],this},extractBasis:function(e,t,i){return e.setFromMatrixColumn(this,0),t.setFromMatrixColumn(this,1),i.setFromMatrixColumn(this,2),this},makeBasis:function(e,t,i){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},extractRotation:(qr=new _e,function(e){var t=this.elements,i=e.elements,n=1/qr.setFromMatrixColumn(e,0).length(),r=1/qr.setFromMatrixColumn(e,1).length();return e=1/qr.setFromMatrixColumn(e,2).length(),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]*e,t[9]=i[9]*e,t[10]=i[10]*e,this}),makeRotationFromEuler:function(e){e&&e.isEuler||console.error("THREE.Matrix4: .makeRotationFromEuler() now expects a Euler rotation rather than a Vector3 and order.");var t=this.elements,i=e.x,n=e.y,r=e.z,o=Math.cos(i);i=Math.sin(i);var a=Math.cos(n);n=Math.sin(n);var s=Math.cos(r);if(r=Math.sin(r),"XYZ"===e.order){e=o*s;var l=o*r,c=i*s,u=i*r;t[0]=a*s,t[4]=-a*r,t[8]=n,t[1]=l+c*n,t[5]=e-u*n,t[9]=-i*a,t[2]=u-e*n,t[6]=c+l*n,t[10]=o*a}else"YXZ"===e.order?(e=a*s,l=a*r,c=n*s,u=n*r,t[0]=e+u*i,t[4]=c*i-l,t[8]=o*n,t[1]=o*r,t[5]=o*s,t[9]=-i,t[2]=l*i-c,t[6]=u+e*i,t[10]=o*a):"ZXY"===e.order?(e=a*s,l=a*r,c=n*s,u=n*r,t[0]=e-u*i,t[4]=-o*r,t[8]=c+l*i,t[1]=l+c*i,t[5]=o*s,t[9]=u-e*i,t[2]=-o*n,t[6]=i,t[10]=o*a):"ZYX"===e.order?(e=o*s,l=o*r,c=i*s,u=i*r,t[0]=a*s,t[4]=c*n-l,t[8]=e*n+u,t[1]=a*r,t[5]=u*n+e,t[9]=l*n-c,t[2]=-n,t[6]=i*a,t[10]=o*a):"YZX"===e.order?(e=o*a,l=o*n,c=i*a,u=i*n,t[0]=a*s,t[4]=u-e*r,t[8]=c*r+l,t[1]=r,t[5]=o*s,t[9]=-i*s,t[2]=-n*s,t[6]=l*r+c,t[10]=e-u*r):"XZY"===e.order&&(e=o*a,l=o*n,c=i*a,u=i*n,t[0]=a*s,t[4]=-r,t[8]=n*s,t[1]=e*r+u,t[5]=o*s,t[9]=l*r-c,t[2]=c*r-l,t[6]=i*s,t[10]=u*r+e);return t[3]=0,t[7]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this},makeRotationFromQuaternion:function(e){var t=this.elements,i=e._x,n=e._y,r=e._z,o=e._w,a=i+i,s=n+n,l=r+r;e=i*a;var c=i*s;i*=l;var u=n*s;return n*=l,r*=l,a*=o,s*=o,o*=l,t[0]=1-(u+r),t[4]=c-o,t[8]=i+s,t[1]=c+o,t[5]=1-(e+r),t[9]=n-a,t[2]=i-s,t[6]=n+a,t[10]=1-(e+u),t[3]=0,t[7]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this},lookAt:(Vr=new _e,Wr=new _e,$r=new _e,function(e,t,i){var n=this.elements;return $r.subVectors(e,t),0===$r.lengthSq()&&($r.z=1),$r.normalize(),Vr.crossVectors(i,$r),0===Vr.lengthSq()&&(1===Math.abs(i.z)?$r.x+=1e-4:$r.z+=1e-4,$r.normalize(),Vr.crossVectors(i,$r)),Vr.normalize(),Wr.crossVectors($r,Vr),n[0]=Vr.x,n[4]=Wr.x,n[8]=$r.x,n[1]=Vr.y,n[5]=Wr.y,n[9]=$r.y,n[2]=Vr.z,n[6]=Wr.z,n[10]=$r.z,this}),multiply:function(e,t){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)},premultiply:function(e){return this.multiplyMatrices(e,this)},multiplyMatrices:function(e,t){var i=e.elements,n=t.elements;t=this.elements,e=i[0];var r=i[4],o=i[8],a=i[12],s=i[1],l=i[5],c=i[9],u=i[13],h=i[2],d=i[6],p=i[10],f=i[14],m=i[3],g=i[7],v=i[11];i=i[15];var y=n[0],x=n[4],b=n[8],w=n[12],_=n[1],T=n[5],E=n[9],S=n[13],M=n[2],A=n[6],C=n[10],L=n[14],R=n[3],P=n[7],k=n[11];return n=n[15],t[0]=e*y+r*_+o*M+a*R,t[4]=e*x+r*T+o*A+a*P,t[8]=e*b+r*E+o
1*C+a*k,t[12]=e*w+r*S+o*L+a*n,t[1]=s*y+l*_+c*M+u*R,t[5]=s*x+l*T+c*A+u*P,t[9]=s*b+l*E+c*C+u*k,t[13]=s*w+l*S+c*L+u*n,t[2]=h*y+d*_+p*M+f*R,t[6]=h*x+d*T+p*A+f*P,t[10]=h*b+d*E+p*C+f*k,t[14]=h*w+d*S+p*L+f*n,t[3]=m*y+g*_+v*M+i*R,t[7]=m*x+g*T+v*A+i*P,t[11]=m*b+g*E+v*C+i*k,t[15]=m*w+g*S+v*L+i*n,this},multiplyScalar:function(e){var t=this.elements;return t[0]*=e,t[4]*=e,t[8]*=e,t[12]*=e,t[1]*=e,t[5]*=e,t[9]*=e,t[13]*=e,t[2]*=e,t[6]*=e,t[10]*=e,t[14]*=e,t[3]*=e,t[7]*=e,t[11]*=e,t[15]*=e,this},applyToBufferAttribute:(jr=new _e,function(e){for(var t=0,i=e.count;t<i;t++)jr.x=e.getX(t),jr.y=e.getY(t),jr.z=e.getZ(t),jr.applyMatrix4(this),e.setXYZ(t,jr.x,jr.y,jr.z);return e}),determinant:function(){var e=this.elements,t=e[0],i=e[4],n=e[8],r=e[12],o=e[1],a=e[5],s=e[9],l=e[13],c=e[2],u=e[6],h=e[10],d=e[14];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)},transpose:function(){var e=this.elements,t=e[1];return e[1]=e[4],e[4]=t,t=e[2],e[2]=e[8],e[8]=t,t=e[6],e[6]=e[9],e[9]=t,t=e[3],e[3]=e[12],e[12]=t,t=e[7],e[7]=e[13],e[13]=t,t=e[11],e[11]=e[14],e[14]=t,this},setPosition:function(e){var t=this.elements;return t[12]=e.x,t[13]=e.y,t[14]=e.z,this},getInverse:function(e,t){var i=this.elements,n=e.elements;e=n[0];var r=n[1],o=n[2],a=n[3],s=n[4],l=n[5],c=n[6],u=n[7],h=n[8],d=n[9],p=n[10],f=n[11],m=n[12],g=n[13],v=n[14],y=d*v*u-g*p*u+g*c*f-l*v*f-d*c*(n=n[15])+l*p*n,x=m*p*u-h*v*u-m*c*f+s*v*f+h*c*n-s*p*n,b=h*g*u-m*d*u+m*l*f-s*g*f-h*l*n+s*d*n,w=m*d*c-h*g*c-m*l*p+s*g*p+h*l*v-s*d*v,_=e*y+r*x+o*b+a*w;if(0===_){if(!0===t)throw Error("THREE.Matrix4: .getInverse() can't invert matrix, determinant is 0");return console.warn("THREE.Matrix4: .getInverse() can't invert matrix, determinant is 0"),this.identity()}return t=1/_,i[0]=y*t,i[1]=(g*p*a-d*v*a-g*o*f+r*v*f+d*o*n-r*p*n)*t,i[2]=(l*v*a-g*c*a+g*o*u-r*v*u-l*o*n+r*c*n)*t,i[3]=(d*c*a-l*p*a-d*o*u+r*p*u+l*o*f-r*c*f)*t,i[4]=x*t,i[5]=(h*v*a-m*p*a+m*o*f-e*v*f-h*o*n+e*p*n)*t,i[6]=(m*c*a-s*v*a-m*o*u+e*v*u+s*o*n-e*c*n)*t,i[7]=(s*p*a-h*c*a+h*o*u-e*p*u-s*o*f+e*c*f)*t,i[8]=b*t,i[9]=(m*d*a-h*g*a-m*r*f+e*g*f+h*r*n-e*d*n)*t,i[10]=(s*g*a-m*l*a+m*r*u-e*g*u-s*r*n+e*l*n)*t,i[11]=(h*l*a-s*d*a-h*r*u+e*d*u+s*r*f-e*l*f)*t,i[12]=w*t,i[13]=(h*g*o-m*d*o+m*r*p-e*g*p-h*r*v+e*d*v)*t,i[14]=(m*l*o-s*g*o-m*r*c+e*g*c+s*r*v-e*l*v)*t,i[15]=(s*d*o-h*l*o+h*r*c-e*d*c-s*r*p+e*l*p)*t,this},scale:function(e){var t=this.elements,i=e.x,n=e.y;return e=e.z,t[0]*=i,t[4]*=n,t[8]*=e,t[1]*=i,t[5]*=n,t[9]*=e,t[2]*=i,t[6]*=n,t[10]*=e,t[3]*=i,t[7]*=n,t[11]*=e,this},getMaxScaleOnAxis:function(){var e=this.elements;return Math.sqrt(Math.max(e[0]*e[0]+e[1]*e[1]+e[2]*e[2],e[4]*e[4]+e[5]*e[5]+e[6]*e[6],e[8]*e[8]+e[9]*e[9]+e[10]*e[10]))},makeTranslation:function(e,t,i){return this.set(1,0,0,e,0,1,0,t,0,0,1,i,0,0,0,1),this},makeRotationX:function(e){var t=Math.cos(e);return e=Math.sin(e),this.set(1,0,0,0,0,t,-e,0,0,e,t,0,0,0,0,1),this},makeRotationY:function(e){var t=Math.cos(e);return e=Math.sin(e),this.set(t,0,e,0,0,1,0,0,-e,0,t,0,0,0,0,1),this},makeRotationZ:function(e){var t=Math.cos(e);return e=Math.sin(e),this.set(t,-e,0,0,e,t,0,0,0,0,1,0,0,0,0,1),this},makeRotationAxis:function(e,t){var i=Math.cos(t);t=Math.sin(t);var n=1-i,r=e.x,o=e.y;e=e.z;var a=n*r,s=n*o;return this.set(a*r+i,a*o-t*e,a*e+t*o,0,a*o+t*e,s*o+i,s*e-t*r,0,a*e-t*o,s*e+t*r,n*e*e+i,0,0,0,0,1),this},makeScale:function(e,t,i){return this.set(e,0,0,0,0,t,0,0,0,0,i,0,0,0,0,1),this},makeShear:function(e,t,i){return this.set(1,t,i,0,e,1,i,0,e,t,1,0,0,0,0,1),this},compose:function(e,t,i){return this.makeRotationFromQuaternion(t),this.scale(i),this.setPosition(e),this},decompose:(Br=new _e,Gr=new we,function(e,t,i){var n=this.elements,r=Br.set(n[0],n[1],n[2]).length(),o=Br.set(n[4],n[5],n[6]).length(),a=Br.set(n[8],n[9],n[10]).length();this.determinant()<0&&(r=-r),e.x=n[12],e.y=n[13],e.z=n[14],Gr.copy(this),e=1/r,n=1/o;var s=1/a;return Gr.elements[0]*=e,Gr.elements[1]*=e,Gr.elements[2]*=e,Gr.elements[4]*=n,Gr.elements[5]*=n,Gr.elements[6]*=n,Gr.elements[8]*=s,Gr.elements[9]*=s,Gr.elements[10]*=s,t.setFromRotationMatrix(Gr),i.x=r,i.y=o,i.z=a,this}),makePerspective:function(e,t,i,n,r,o){void 0===o&&console.warn("THREE.Matrix4: .makePerspective() has been redefined and has a
1new signature. Please check the docs.");var a=this.elements;return a[0]=2*r/(t-e),a[4]=0,a[8]=(t+e)/(t-e),a[12]=0,a[1]=0,a[5]=2*r/(i-n),a[9]=(i+n)/(i-n),a[13]=0,a[2]=0,a[6]=0,a[10]=-(o+r)/(o-r),a[14]=-2*o*r/(o-r),a[3]=0,a[7]=0,a[11]=-1,a[15]=0,this},makeOrthographic:function(e,t,i,n,r,o){var a=this.elements,s=1/(t-e),l=1/(i-n),c=1/(o-r);return a[0]=2*s,a[4]=0,a[8]=0,a[12]=-(t+e)*s,a[1]=0,a[5]=2*l,a[9]=0,a[13]=-(i+n)*l,a[2]=0,a[6]=0,a[10]=-2*c,a[14]=-(o+r)*c,a[3]=0,a[7]=0,a[11]=0,a[15]=1,this},equals:function(e){var t=this.elements;e=e.elements;for(var i=0;i<16;i++)if(t[i]!==e[i])return!1;return!0},fromArray:function(e,t){void 0===t&&(t=0);for(var i=0;i<16;i++)this.elements[i]=e[i+t];return this},toArray:function(e,t){void 0===e&&(e=[]),void 0===t&&(t=0);var i=this.elements;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}}),Object.assign(j,{slerp:function(e,t,i,n){return i.copy(e).slerp(t,n)},slerpFlat:function(e,t,i,n,r,o,a){var s=i[n+0],l=i[n+1],c=i[n+2];i=i[n+3],n=r[o+0];var u=r[o+1],h=r[o+2];if(i!==(r=r[o+3])||s!==n||l!==u||c!==h){o=1-a;var d=s*n+l*u+c*h+i*r,p=0<=d?1:-1,f=1-d*d;f>Number.EPSILON&&(f=Math.sqrt(f),d=Math.atan2(f,d*p),o=Math.sin(o*d)/f,a=Math.sin(a*d)/f),s=s*o+n*(p*=a),l=l*o+u*p,c=c*o+h*p,i=i*o+r*p,o===1-a&&(s*=a=1/Math.sqrt(s*s+l*l+c*c+i*i),l*=a,c*=a,i*=a)}e[t]=s,e[t+1]=l,e[t+2]=c,e[t+3]=i}}),Object.defineProperties(j.prototype,{x:{get:function(){return this._x},set:function(e){this._x=e,this.onChangeCallback()}},y:{get:function(){return this._y},set:function(e){this._y=e,this.onChangeCallback()}},z:{get:function(){return this._z},set:function(e){this._z=e,this.onChangeCallback()}},w:{get:function(){return this._w},set:function(e){this._w=e,this.onChangeCallback()}}}),Object.assign(j.prototype,{set:function(e,t,i,n){return this._x=e,this._y=t,this._z=i,this._w=n,this.onChangeCallback(),this},clone:function(){return new this.constructor(this._x,this._y,this._z,this._w)},copy:function(e){return this._x=e.x,this._y=e.y,this._z=e.z,this._w=e.w,this.onChangeCallback(),this},setFromEuler:function(e,t){if(!e||!e.isEuler)throw Error("THREE.Quaternion: .setFromEuler() now expects an Euler rotation rather than a Vector3 and order.");var i=e._x,n=e._y,r=e._z;e=e.order;var o=Math.cos,a=Math.sin,s=o(i/2),l=o(n/2);return o=o(r/2),i=a(i/2),n=a(n/2),r=a(r/2),"XYZ"===e?(this._x=i*l*o+s*n*r,this._y=s*n*o-i*l*r,this._z=s*l*r+i*n*o,this._w=s*l*o-i*n*r):"YXZ"===e?(this._x=i*l*o+s*n*r,this._y=s*n*o-i*l*r,this._z=s*l*r-i*n*o,this._w=s*l*o+i*n*r):"ZXY"===e?(this._x=i*l*o-s*n*r,this._y=s*n*o+i*l*r,this._z=s*l*r+i*n*o,this._w=s*l*o-i*n*r):"ZYX"===e?(this._x=i*l*o-s*n*r,this._y=s*n*o+i*l*r,this._z=s*l*r-i*n*o,this._w=s*l*o+i*n*r):"YZX"===e?(this._x=i*l*o+s*n*r,this._y=s*n*o+i*l*r,this._z=s*l*r-i*n*o,this._w=s*l*o-i*n*r):"XZY"===e&&(this._x=i*l*o-s*n*r,this._y=s*n*o-i*l*r,this._z=s*l*r+i*n*o,this._w=s*l*o+i*n*r),!1!==t&&this.onChangeCallback(),this},setFromAxisAngle:function(e,t){t/=2;var i=Math.sin(t);return this._x=e.x*i,this._y=e.y*i,this._z=e.z*i,this._w=Math.cos(t),this.onChangeCallback(),this},setFromRotationMatrix:function(e){var t=e.elements,i=t[0];e=t[4];var n=t[8],r=t[1],o=t[5],a=t[9],s=t[2],l=t[6],c=i+o+(t=t[10]);return 0<c?(i=.5/Math.sqrt(c+1),this._w=.25/i,this._x=(l-a)*i,this._y=(n-s)*i,this._z=(r-e)*i):o<i&&t<i?(i=2*Math.sqrt(1+i-o-t),this._w=(l-a)/i,this._x=.25*i,this._y=(e+r)/i,this._z=(n+s)/i):t<o?(i=2*Math.sqrt(1+o-i-t),this._w=(n-s)/i,this._x=(e+r)/i,this._y=.25*i,this._z=(a+l)/i):(i=2*Math.sqrt(1+t-i-o),this._w=(r-e)/i,this._x=(n+s)/i,this._y=(a+l)/i,this._z=.25*i),this.onChangeCallback(),this},setFromUnitVectors:(Yr=new _e,function(e,t){return void 0===Yr&&(Yr=new _e),(Xr=e.dot(t)+1)<1e-6?(Xr=0,Math.abs(e.x)>Math.abs(e.z)?Yr.set(-e.y,e.x,0):Yr.set(0,-e.z,e.y)):Yr.crossVectors(e,t),this._x=Yr.x,this._y=Yr.y,this._z=Yr.z,this._w=Xr,this.normalize()}),inverse:function(){return this.conjugate()},conjugate:function(){return this._x*=-1,this._y*=-1,this._z*=-1,this.onChangeCallback(),this},dot:function(e){return this._x*e._x+this._y*e._y+this._z*e._z+this._w*e._w},lengthSq:function(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w},length:function(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)},normalize:function(){var e=this.length();return 0===e?(this._z=this._y=this._x=0,this._w=1):(e=1/e,this._x*=e,this._y*=e,this._z*=e,this._w*=e),this.onChangeCallback(),this},multiply:function(e,t){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)},premultiply:function(e){return this.multiplyQuaternions(e,this)},multiplyQuaternions:function(e,t){var i=e._x,n=e._y,r=e._z;e=e._w;var o=t._x,a=t._y,s=t._z;return t=t._w,this._x=i*t+e*o+n*s-r*a,this._y=n*t+e*a+r*o-i*s,this._z=r*t+e*s+i*a-n*o,this._w=e*t-i*o-n*a-r*s,this.onChangeCallback(),this},slerp:function(e,t){if(0===t)return this;if(1===t)return this.copy(e);var i=this._x,n=this._y,r=this._z,o=this._w,a=o*e._w+i*e._x+n*e._y+r*e._z;if(a<0?(this._w=-e._w,this._x=-e._x,this._y=-e._y,this._z=-e._z,a=-a):this.copy(e),1<=a)return this._w=o,this._x=i,this._y=n,this._z=r,this;if(e=Math.sqrt(1-a*a),Math.abs(e)<.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;var s=Math.atan2(e,a);return a=Math.sin((1-t)*s)/e,t=Math.sin(t*s)/e,this._w=o*a+this._w*t,this._x=i*a+this._x*t,this._y=n*a+this._y*t,this._z=r*a+this._z*t,this.onChangeCallback(),this},equals:function(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._w===this._w},fromArray:function(e,t){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},toArray:function(e,t){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},onChange:function(e){return this.onChangeCallback=e,this},onChangeCallback:function(){}}),Object.assign(_e.prototype,{isVector3:!0,set:function(e,t,i){return this.x=e,this.y=t,this.z=i,this},setScalar:function(e){return this.z=this.y=this.x=e,this},setX:function(e){return this.x=e,this},setY:function(e){return this.y=e,this},setZ:function(e){return this.z=e,this},setComponent:function(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;default:throw Error("index is out of range: "+e)}return this},getComponent:function(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw Error("index is out of range: "+e)}},clone:function(){return new this.constructor(this.x,this.y,this.z)}
vendor: 5,525 bytes, line 1
1,copy:function(e){return this.x=e.x,this.y=e.y,this.z=e.z,this},add:function(e,t){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)},addScalar:function(e){return this.x+=e,this.y+=e,this.z+=e,this},addVectors:function(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this},addScaledVector:function(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this},sub:function(e,t){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)},subScalar:function(e){return this.x-=e,this.y-=e,this.z-=e,this},subVectors:function(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this},multiply:function(e,t){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)},multiplyScalar:function(e){return this.x*=e,this.y*=e,this.z*=e,this},multiplyVectors:function(e,t){return this.x=e.x*t.x,this.y=e.y*t.y,this.z=e.z*t.z,this},applyEuler:(no=new j,function(e){return e&&e.isEuler||console.error("THREE.Vector3: .applyEuler() now expects an Euler rotation rather than a Vector3 and order."),this.applyQuaternion(no.setFromEuler(e))}),applyAxisAngle:(io=new j,function(e,t){return this.applyQuaternion(io.setFromAxisAngle(e,t))}),applyMatrix3:function(e){var t=this.x,i=this.y,n=this.z;return e=e.elements,this.x=e[0]*t+e[3]*i+e[6]*n,this.y=e[1]*t+e[4]*i+e[7]*n,this.z=e[2]*t+e[5]*i+e[8]*n,this},applyMatrix4:function(e){var t=this.x,i=this.y,n=this.z,r=1/((e=e.elements)[3]*t+e[7]*i+e[11]*n+e[15]);return this.x=(e[0]*t+e[4]*i+e[8]*n+e[12])*r,this.y=(e[1]*t+e[5]*i+e[9]*n+e[13])*r,this.z=(e[2]*t+e[6]*i+e[10]*n+e[14])*r,this},applyQuaternion:function(e){var t=this.x,i=this.y,n=this.z,r=e.x,o=e.y,a=e.z,s=(e=e.w)*t+o*n-a*i,l=e*i+a*t-r*n,c=e*n+r*i-o*t;return t=-r*t-o*i-a*n,this.x=s*e+t*-r+l*-a-c*-o,this.y=l*e+t*-o+c*-r-s*-a,this.z=c*e+t*-a+s*-o-l*-r,this},project:(to=new we,function(e){return to.multiplyMatrices(e.projectionMatrix,to.getInverse(e.matrixWorld)),this.applyMatrix4(to)}),unproject:(eo=new we,function(e){return eo.multiplyMatrices(e.matrixWorld,eo.getInverse(e.projectionMatrix)),this.applyMatrix4(eo)}),transformDirection:function(e){var t=this.x,i=this.y,n=this.z;return e=e.elements,this.x=e[0]*t+e[4]*i+e[8]*n,this.y=e[1]*t+e[5]*i+e[9]*n,this.z=e[2]*t+e[6]*i+e[10]*n,this.normalize()},divide:function(e){return this.x/=e.x,this.y/=e.y,this.z/=e.z,this},divideScalar:function(e){return this.multiplyScalar(1/e)},min:function(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this},max:function(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this},clamp:function(e,t){return this.x=Math.max(e.x,Math.min(t.x,this.x)),this.y=Math.max(e.y,Math.min(t.y,this.y)),this.z=Math.max(e.z,Math.min(t.z,this.z)),this},clampScalar:(Qr=new _e,Kr=new _e,function(e,t){return Qr.set(e,e,e),Kr.set(t,t,t),this.clamp(Qr,Kr)}),clampLength:function(e,t){var i=this.length();return this.divideScalar(i||1).multiplyScalar(Math.max(e,Math.min(t,i)))},floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this},ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this},round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this},roundToZero:function(){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},negate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this},dot:function(e){return this.x*e.x+this.y*e.y+this.z*e.z},lengthSq:function(){return this.x*this.x+this.y*this.y+this.z*this.z},length:function(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)},manhattanLength:function(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)},normalize:function(){return this.divideScalar(this.length()||1)},setLength:function(e){return this.normalize().multiplyScalar(e)},lerp:function(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this.z+=(e.z-this.z)*t,this},lerpVectors:function(e,t,i){return this.subVectors(t,e).multiplyScalar(i).add(e)},cross:function(e,t){return void 0!==t?(console.warn("THREE.Vector3: .cross() now only accepts one argument. Use .crossVectors( a, b ) instead."),this.crossVectors(e,t)):this.crossVectors(this,e)},crossVectors:function(e,t){var i=e.x,n=e.y;e=e.z;var r=t.x,o=t.y;return t=t.z,this.x=n*t-e*o,this.y=e*r-i*t,this.z=i*o-n*r,this},projectOnVector:function(e){var t=e.dot(this)/e.lengthSq();return this.copy(e).multiplyScalar(t)},projectOnPlane:(Zr=new _e,function(e){return Zr.copy(this).projectOnVector(e),this.sub(Zr)}),reflect:(Jr=new _e,function(e){return this.sub(Jr.copy(e).multiplyScalar(2*this.dot(e)))}),angleTo:function(e){return e=this.dot(e)/Math.sqrt(this.lengthSq()*e.lengthSq()),Math.acos(oo.clamp(e,-1,1))},distanceTo:function(e){return Math.sqrt(this.distanceToSquared(e))},distanceToSquared:function(e){var t=this.x-e.x,i=this.y-e.y;return t*t+i*i+(e=this.z-e.z)*e},manhattanDistanceTo:function(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)+Math.abs(this.z-e.z)}
1,setFromSpherical:function(e){var t=Math.sin(e.phi)*e.radius;return this.x=t*Math.sin(e.theta),this.y=Math.cos(e.phi)*e.radius,this.z=t*Math.cos(e.theta),this},setFromCylindrical:function(e){return this.x=e.radius*Math.sin(e.theta),this.y=e.y,this.z=e.radius*Math.cos(e.theta),this},setFromMatrixPosition:function(e){return e=e.elements,this.x=e[12],this.y=e[13],this.z=e[14],this},setFromMatrixScale:function(e){var t=this.setFromMatrixColumn(e,0).length(),i=this.setFromMatrixColumn(e,1).length();return e=this.setFromMatrixColumn(e,2).length(),this.x=t,this.y=i,this.z=e,this},setFromMatrixColumn:function(e,t){return this.fromArray(e.elements,4*t)},equals:function(e){return e.x===this.x&&e.y===this.y&&e.z===this.z},fromArray:function(e,t){return void 0===t&&(t=0),this.x=e[t],this.y=e[t+1],this.z=e[t+2],this},toArray:function(e,t){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},fromBufferAttribute:function(e,t,i){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}}),Object.assign(g.prototype,{isMatrix3:!0,set:function(e,t,i,n,r,o,a,s,l){var c=this.elements;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},identity:function(){return this.set(1,0,0,0,1,0,0,0,1),this},clone:function(){return(new this.constructor).fromArray(this.elements)},copy:function(e){var t=this.elements;return e=e.elements,t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],this},setFromMatrix4:function(e){return e=e.elements,this.set(e[0],e[4],e[8],e[1],e[5],e[9],e[2],e[6],e[10]),this},applyToBufferAttribute:(ro=new _e,function(e){for(var t=0,i=e.count;t<i;t++)ro.x=e.getX(t),ro.y=e.getY(t),ro.z=e.getZ(t),ro.applyMatrix3(this),e.setXYZ(t,ro.x,ro.y,ro.z);return e}),multiply:function(e){return this.multiplyMatrices(this,e)},premultiply:function(e){return this.multiplyMatrices(e,this)},multiplyMatrices:function(e,t){var i=e.elements,n=t.elements;t=this.elements,e=i[0];var r=i[3],o=i[6],a=i[1],s=i[4],l=i[7],c=i[2],u=i[5];i=i[8];var h=n[0],d=n[3],p=n[6],f=n[1],m=n[4],g=n[7],v=n[2],y=n[5];return n=n[8],t[0]=e*h+r*f+o*v,t[3]=e*d+r*m+o*y,t[6]=e*p+r*g+o*n,t[1]=a*h+s*f+l*v,t[4]=a*d+s*m+l*y,t[7]=a*p+s*g+l*n,t[2]=c*h+u*f+i*v,t[5]=c*d+u*m+i*y,t[8]=c*p+u*g+i*n,this},multiplyScalar:function(e){var t=this.elements;return t[0]*=e,t[3]*=e,t[6]*=e,t[1]*=e,t[4]*=e,t[7]*=e,t[2]*=e,t[5]*=e,t[8]*=e,this},determinant:function(){var e=this.elements,t=e[0],i=e[1],n=e[2],r=e[3],o=e[4],a=e[5],s=e[6],l=e[7];return t*o*(e=e[8])-t*a*l-i*r*e+i*a*s+n*r*l-n*o*s},getInverse:function(e,t){e&&e.isMatrix4&&console.error("THREE.Matrix3: .getInverse() no longer takes a Matrix4 argument.");var i=e.elements;e=this.elements;var n=i[0],r=i[1],o=i[2],a=i[3],s=i[4],l=i[5],c=i[6],u=i[7],h=(i=i[8])*s-l*u,d=l*c-i*a,p=u*a-s*c,f=n*h+r*d+o*p;if(0===f){if(!0===t)throw Error("THREE.Matrix3: .getInverse() can't invert matrix, determinant is 0");return console.warn("THREE.Matrix3: .getInverse() can't invert matrix, determinant is 0"),this.identity()}return t=1/f,e[0]=h*t,e[1]=(o*u-i*r)*t,e[2]=(l*r-o*s)*t,e[3]=d*t,e[4]=(i*n-o*c)*t,e[5]=(o*a-l*n)*t,e[6]=p*t,e[7]=(r*c-u*n)*t,e[8]=(s*n-r*a)*t,this},transpose:function(){var e=this.elements,t=e[1];return e[1]=e[3],e[3]=t,t=e[2],e[2]=e[6],e[6]=t,t=e[5],e[5]=e[7],e[7]=t,this},getNormalMatrix:function(e){return this.setFromMatrix4(e).getInverse(this).transpose()},transposeIntoArray:function(e){var t=this.elements;return e[0]=t[0],e[1]=t[3],e[2]=t[6],e[3]=t[1],e[4]=t[4],e[5]=t[7],e[6]=t[2],e[7]=t[5],e[8]=t[8],this},setUvTransform:function(e,t,i,n,r,o,a){var s=Math.cos(r);r=Math.sin(r),this.set(i*s,i*r,-i*(s*o+r*a)+o+e,-n*r,n*s,-n*(-r*o+s*a)+a+t,0,0,1)},scale:function(e,t){var i=this.elements;
1return i[0]*=e,i[3]*=e,i[6]*=e,i[1]*=t,i[4]*=t,i[7]*=t,this},rotate:function(e){var t=Math.cos(e);e=Math.sin(e);var i=this.elements,n=i[0],r=i[3],o=i[6],a=i[1],s=i[4],l=i[7];return i[0]=t*n+e*a,i[3]=t*r+e*s,i[6]=t*o+e*l,i[1]=-e*n+t*a,i[4]=-e*r+t*s,i[7]=-e*o+t*l,this},translate:function(e,t){var i=this.elements;return i[0]+=e*i[2],i[3]+=e*i[5],i[6]+=e*i[8],i[1]+=t*i[2],i[4]+=t*i[5],i[7]+=t*i[8],this},equals:function(e){var t=this.elements;e=e.elements;for(var i=0;i<9;i++)if(t[i]!==e[i])return!1;return!0},fromArray:function(e,t){void 0===t&&(t=0);for(var i=0;i<9;i++)this.elements[i]=e[i+t];return this},toArray:function(e,t){void 0===e&&(e=[]),void 0===t&&(t=0);var i=this.elements;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}});var ao,so,lo,co,uo,ho,po,fo,mo,go,vo,yo,xo,bo,wo,_o,To,Eo=0;d.DEFAULT_IMAGE=void 0,d.DEFAULT_MAPPING=300,d.prototype=Object.assign(Object.create(t.prototype),{constructor:d,isTexture:!0,clone:function(){return(new this.constructor).copy(this)},copy:function(e){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.center.copy(e.center),this.rotation=e.rotation,this.matrixAutoUpdate=e.matrixAutoUpdate,this.matrix.copy(e.matrix),this.generateMipmaps=e.generateMipmaps,this.premultiplyAlpha=e.premultiplyAlpha,this.flipY=e.flipY,this.unpackAlignment=e.unpackAlignment,this.encoding=e.encoding,this},toJSON:function(e){var t=void 0===e||"string"==typeof e;if(!t&&void 0!==e.textures[this.uuid])return e.textures[this.uuid];var i={metadata:{version:4.5,type:"Texture",generator:"Texture.toJSON"},uuid:this.uuid,name:this.name,mapping:this.mapping,repeat:[this.repeat.x,this.repeat.y],offset:[this.offset.x,this.offset.y],center:[this.center.x,this.center.y],rotation:this.rotation,wrap:[this.wrapS,this.wrapT],format:this.format,minFilter:this.minFilter,magFilter:this.magFilter,anisotropy:this.anisotropy,flipY:this.flipY};if(void 0!==this.image){var n=this.image;if(void 0===n.uuid&&(n.uuid=oo.generateUUID()),!t&&void 0===e.images[n.uuid]){var r=e.images,o=n.uuid,a=n.uuid;if(n instanceof HTMLCanvasElement)var s=n;else{(s=document.createElementNS("http://www.w3.org/1999/xhtml","canvas")).width=n.width,s.height=n.height;var l=s.getContext("2d");n instanceof ImageData?l.putImageData(n,0,0):l.drawImage(n,0,0,n.width,n.height)}s=2048<s.width||2048<s.height?s.toDataURL("image/jpeg",.6):s.toDataURL("image/png"),r[o]={uuid:a,url:s}}i.image=n.uuid}return t||(e.textures[this.uuid]=i),i},dispose:function(){this.dispatchEvent({type:"dispose"})},transformUv:function(e){if(300===this.mapping){if(e.applyMatrix3(this.matrix),e.x<0||1<e.x)switch(this.wrapS){case 1e3:e.x-=Math.floor(e.x);break;case 1001:e.x=e.x<0?0:1;break;case 1002:e.x=1===Math.abs(Math.floor(e.x)%2)?Math.ceil(e.x)-e.x:e.x-Math.floor(e.x)}if(e.y<0||1<e.y)switch(this.wrapT){case 1e3:e.y-=Math.floor(e.y);break;case 1001:e.y=e.y<0?0:1;break;case 1002:e.y=1===Math.abs(Math.floor(e.y)%2)?Math.ceil(e.y)-e.y:e.y-Math.floor(e.y)}this.flipY&&(e.y=1-e.y)}}}),Object.defineProperty(d.prototype,"needsUpdate",{set:function(e){!0===e&&this.version++}}),Object.assign(Te.prototype,{isVector4:!0,set:function(e,t,i,n){return this.x=e,this.y=t,this.z=i,this.w=n,this},setScalar:function(e){return this.w=this.z=this.y=this.x=e,this},setX:function(e){return this.x=e,this},setY:function(e){return this.y=e,this},setZ:function(e){return this.z=e,this},setW:function(e){return this.w=e,this},setComponent:function(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;case 3:this.w=t;break;default:throw Error("index is out of range: "+e)}return this},getComponent:function(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;case 3:return this.w;default:throw Error("index is out of range: "+e)}},clone:function(){return new this.constructor(this.x,this.y,this.z,this.w)},copy:function(e){return this.x=e.x,this.y=e.y,this.z=e.z,this.w=void 0!==e.w?e.w:1,this},add:function(e,t){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)},addScalar:function(e){return this.x+=e,this.y+=e,this.z+=e,this.w+=e,this},addVectors:function(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this.w=e.w+t.w,this},addScaledVector:function(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this.w+=e.w*t,this},sub:function(e,t){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.
1y,this.z-=e.z,this.w-=e.w,this)},subScalar:function(e){return this.x-=e,this.y-=e,this.z-=e,this.w-=e,this},subVectors:function(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this.w=e.w-t.w,this},multiplyScalar:function(e){return this.x*=e,this.y*=e,this.z*=e,this.w*=e,this},applyMatrix4:function(e){var t=this.x,i=this.y,n=this.z,r=this.w;return e=e.elements,this.x=e[0]*t+e[4]*i+e[8]*n+e[12]*r,this.y=e[1]*t+e[5]*i+e[9]*n+e[13]*r,this.z=e[2]*t+e[6]*i+e[10]*n+e[14]*r,this.w=e[3]*t+e[7]*i+e[11]*n+e[15]*r,this},divideScalar:function(e){return this.multiplyScalar(1/e)},setAxisAngleFromQuaternion:function(e){this.w=2*Math.acos(e.w);var t=Math.sqrt(1-e.w*e.w);return t<1e-4?(this.x=1,this.z=this.y=0):(this.x=e.x/t,this.y=e.y/t,this.z=e.z/t),this},setAxisAngleFromRotationMatrix:function(e){var t=(e=e.elements)[0],i=e[4],n=e[8],r=e[1],o=e[5],a=e[9],s=e[2],l=e[6],c=e[10];return Math.abs(i-r)<.01&&Math.abs(n-s)<.01&&Math.abs(a-l)<.01?Math.abs(i+r)<.1&&Math.abs(n+s)<.1&&Math.abs(a+l)<.1&&Math.abs(t+o+c-3)<.1?this.set(1,0,0,0):(e=Math.PI,c=(c+1)/2,i=(i+r)/4,n=(n+s)/4,a=(a+l)/4,(o=(o+1)/2)<(t=(t+1)/2)&&c<t?t<.01?(l=0,i=s=.707106781):(s=i/(l=Math.sqrt(t)),i=n/l):c<o?o<.01?(s=0,i=l=.707106781):(l=i/(s=Math.sqrt(o)),i=a/s):c<.01?(s=l=.707106781,i=0):(l=n/(i=Math.sqrt(c)),s=a/i),this.set(l,s,i,e)):(e=Math.sqrt((l-a)*(l-a)+(n-s)*(n-s)+(r-i)*(r-i)),Math.abs(e)<.001&&(e=1),this.x=(l-a)/e,this.y=(n-s)/e,this.z=(r-i)/e,this.w=Math.acos((t+o+c-1)/2)),this},min:function(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this.w=Math.min(this.w,e.w),this},max:function(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this.w=Math.max(this.w,e.w),this},clamp:function(e,t){return this.x=Math.max(e.x,Math.min(t.x,this.x)),this.y=Math.max(e.y,Math.min(t.y,this.y)),this.z=Math.max(e.z,Math.min(t.z,this.z)),this.w=Math.max(e.w,Math.min(t.w,this.w)),this},clampScalar:function(e,t){return void 0===ao&&(ao=new Te,so=new Te),ao.set(e,e,e,e),so.set(t,t,t,t),this.clamp(ao,so)},clampLength:function(e,t){var i=this.length();return this.divideScalar(i||1).multiplyScalar(Math.max(e,Math.min(t,i)))},floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this.w=Math.floor(this.w),this},ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this.w=Math.ceil(this.w),this},round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this.w=Math.round(this.w),this},roundToZero:function(){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},negate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this},dot:function(e){return this.x*e.x+this.y*e.y+this.z*e.z+this.w*e.w},lengthSq:function(){return this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w},length:function(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)},manhattanLength:function(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)+Math.abs(this.w)},normalize:function(){return this.divideScalar(this.length()||1)},setLength:function(e){return this.normalize().multiplyScalar(e)},lerp:function(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this.z+=(e.z-this.z)*t,this.w+=(e.w-this.w)*t,this},lerpVectors:function(e,t,i){return this.subVectors(t,e).multiplyScalar(i).add(e)},equals:function(e){return e.x===this.x&&e.y===this.y&&e.z===this.z&&e.w===this.w},fromArray:function(e,t){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},toArray:function(e,t){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},fromBufferAttribute:function(e,t,i){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}}),A.prototype=Object.assign(Object.create(t.prototype),{constructor:A,isWebGLRenderTarget:!0,setSize:function(e,t){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)},clone:function(){return(new this.constructor).copy(this)},copy:function(e){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},dispose:function(){this.dispatchEvent({type:"dispose"})}}),((n.prototype=Object.create(A.prototype)).constructor=n).prototype.isWebGLRenderTargetCube=!0,((Ee.prototype=Object.create(d.prototype)).constructor=Ee).prototype.isDataTexture=!0,Object.assign(i.prototype,{isBox3:!0,set:function(e,t){return this.min.copy(e),this.max.copy(t),this},setFromArray:function(e){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){var c=e[s],u=e[s+1],h=e[s+2];c<t&&(t=c),u<i&&(i=u),h<n&&(n=h),r<c&&(r=c),o<u&&(o=u),a<h&&(a=h)}return this.min.set(t,i,n),this.max.set(r,o,a),this},setFromBufferAttribute:function(e){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++){var c=e.getX(s),u=e.getY(s),h=e.getZ(s);c<t&&(t=c),u<i&&(i=u),h<n&&(n=h),r<c&&(r=c),o<u&&(o=u),a<h&&(a=h)}return this.min.set(t,i,n),this.max.set(r,o,a),this},setFromPoints:function(e){this.makeEmpty();for(var t=0,i=e.length;t<i;t++)this.expandByPoint(e[t]);return this},setFromCenterAndSize:(po=new _e,function(e,t){return t=po.copy(t).multiplyScalar(.5),this.min.copy(e).sub(t),this.max.copy(e).add(t),this}),setFromObject:function(e){return this.makeEmpty(),this.expandByObject(e)},clone:function(){return(new this.constructor).copy(this)},copy:function(e){return this.min.copy(e.min),this.max.copy(e.max),this},makeEmpty:function(){return this.min.x=this.min.y=this.min.z=1/0,this.max.x=this.max.y=this.max.z=-1/0,this},isEmpty:function(){return this.max.x<this.min.x||this.max.y<this.min.y||this.max.z<this.min.z},getCenter:function(e){return void 0===e&&(console.warn("THREE.Box3: .getCenter() target is now required"),e=new _e),this.isEmpty()?e.set(0,0,0):e.addVectors(this.min,this.max).multiplyScalar(.5)},getSize:function(e){return void 0===e&&(console.warn("THREE.Box3: .getSize() target is now required"),e=new _e),this.isEmpty()?e.set(0,0,0):e.subVectors(this.max,this.min)},expandByPoint:function(e){return this.min.min(e),this.max.max(e),this},expandByVector:function(e){return this.min.sub(e),this.max.add(e),this},expandByScalar:function(e){return this.min.addScalar(-e),this.max.addScalar(e),this},expandByObject:function(){function t(e){var t=e.geometry;if(void 0!==t)if(t.isGeometry)for(t=t.vertices,n=0,r=t.length;n<r;n++)o.copy(t[n]),o.applyMatrix4(e.matrixWorld),i.expandByPoint(o);else if(t.isBufferGeometry&&void 0!==(t=t.attributes.position))for(n=0,r=t.count;n<r;n++)o.fromBufferAttribute(t,n).applyMatrix4(e.matrixWorld),i.expandByPoint(o)}var i,n,r,o=new _e;return function(e){return i=this,e.updateMatrixWorld(!0),e.traverse(t),this}}(),containsPoint:function(e){return!(e.x<this.min.x||e.x>this.max.x||e.y<this.min.y||e.y>this.max.y||e.z<this.min.z||e.z>this.max.z)},containsBox:function(e){return this.min.x<=e.min.x&&e.max.x<=this.max.x&&this.min.y<=e.min.y&&e.max.y<=this.max.y&&this.min.z<=e.min.z&&e.max.z<=this.max.z},getParameter:function(e,t){return void 0===t&&(console.warn("THREE.Box3: .getParameter() target is now required"),t=new _e),t.set((e.x-this.min.x)/(this.max.x-this.min.x),(e.y-this.min.y)/(this.max.y-this.min.y),(e.z-this.min.z)/(this.max.z-this.min.z))},intersectsBox:function(e){return!(e.max.x<this.min.x||e.min.x>this.max.x||e.max.y<this.min.y||e.min.y>this.max.y||e.max.z<this.min.z||e.min.z>this.max.z)},intersectsSphere:(ho=new _e,function(e){return this.clampPoint(e.center,ho),ho.distanceToSquared(e.center)<=e.radius*e.radiu
1s}),intersectsPlane:function(e){if(0<e.normal.x)var t=e.normal.x*this.min.x,i=e.normal.x*this.max.x;else t=e.normal.x*this.max.x,i=e.normal.x*this.min.x;return 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},intersectsTriangle:function(){function t(e){var t,i=0;for(t=e.length-3;i<=t;i+=3){u.fromArray(e,i);var n=h.x*Math.abs(u.x)+h.y*Math.abs(u.y)+h.z*Math.abs(u.z),r=s.dot(u),o=l.dot(u),a=c.dot(u);if(Math.max(-Math.max(r,o,a),Math.min(r,o,a))>n)return!1}return!0}var s=new _e,l=new _e,c=new _e,i=new _e,n=new _e,r=new _e,u=new _e,o=new _e,h=new _e,a=new _e;return function(e){return!this.isEmpty()&&(this.getCenter(o),h.subVectors(this.max,o),s.subVectors(e.a,o),l.subVectors(e.b,o),c.subVectors(e.c,o),i.subVectors(l,s),n.subVectors(c,l),r.subVectors(s,c),!!t(e=[0,-i.z,i.y,0,-n.z,n.y,0,-r.z,r.y,i.z,0,-i.x,n.z,0,-n.x,r.z,0,-r.x,-i.y,i.x,0,-n.y,n.x,0,-r.y,r.x,0])&&(!!t(e=[1,0,0,0,1,0,0,0,1])&&(a.crossVectors(i,n),t(e=[a.x,a.y,a.z]))))}}(),clampPoint:function(e,t){return void 0===t&&(console.warn("THREE.Box3: .clampPoint() target is now required"),t=new _e),t.copy(e).clamp(this.min,this.max)},distanceToPoint:(uo=new _e,function(e){return uo.copy(e).clamp(this.min,this.max).sub(e).length()}),getBoundingSphere:(co=new _e,function(e){return void 0===e&&(console.warn("THREE.Box3: .getBoundingSphere() target is now required"),e=new a),this.getCenter(e.center),e.radius=.5*this.getSize(co).length(),e}),intersect:function(e){return this.min.max(e.min),this.max.min(e.max),this.isEmpty()&&this.makeEmpty(),this},union:function(e){return this.min.min(e.min),this.max.max(e.max),this},applyMatrix4:(lo=[new _e,new _e,new _e,new _e,new _e,new _e,new _e,new _e],function(e){return this.isEmpty()||(lo[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(e),lo[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(e),lo[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(e),lo[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(e),lo[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(e),lo[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(e),lo[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(e),lo[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(e),this.setFromPoints(lo)),this}),translate:function(e){return this.min.add(e),this.max.add(e),this},equals:function(e){return e.min.equals(this.min)&&e.max.equals(this.max)}}),Object.assign(a.prototype,{set:function(e,t){return this.center.copy(e),this.radius=t,this},setFromPoints:(fo=new i,function(e,t){var i=this.center;void 0!==t?i.copy(t):fo.setFromPoints(e).getCenter(i);for(var n=t=0,r=e.length;n<r;n++)t=Math.max(t,i.distanceToSquared(e[n]));return this.radius=Math.sqrt(t),this}),clone:function(){return(new this.constructor).copy(this)},copy:function(e){return this.center.copy(e.center),this.radius=e.radius,this},empty:function(){return this.radius<=0},containsPoint:function(e){return e.distanceToSquared(this.center)<=this.radius*this.radius},distanceToPoint:function(e){return e.distanceTo(this.center)-this.radius},intersectsSphere:function(e){var t=this.radius+e.radius;return e.center.distanceToSquared(this.center)<=t*t},intersectsBox:function(e){return e.intersectsSphere(this)},intersectsPlane:function(e){return Math.abs(e.distanceToPoint(this.center))<=this.radius},clampPoint:function(e,t){var i=this.center.distanceToSquared(e);return void 0===t&&(console.warn("THREE.Sphere: .clampPoint() target is now required"),t=new _e),t.copy(e),i>this.radius*this.radius&&(t.sub(this.center).normalize(),t.multiplyScalar(this.radius).add(this.center)),t},getBoundingBox:function(e){return void 0===e&&(console.warn("THREE.Sphere: .getBoundingBox() target is now required"),e=new i),e.set(this.center,this.center),e.expandByScalar(this.radius),e},applyMatrix4:function(e){return this.center.applyMatrix4(e),this.radius*=e.getMaxScaleOnAxis(),this},translate:function(e){return this.center.add(e),this},equals:function(e){return e.center.equals(this.center)&&e.radius===this.radius}}),Object.assign(v.prototype,{set:function(e,t){return this.normal.copy(e),this.constant=t,this},setComponents:function(e,t,i,n){return this.normal.set(e,t,i),this.constant=n,this},setFromNormalAndCoplanarPoint:function(e,t){return this.normal.copy(e),this.constant=-t.dot(this.normal),this},setFromCoplanarPoints:(yo=new _e,xo=new _e,function(e,t,i){return t=yo.subVectors(i,t).
1cross(xo.subVectors(e,t)).normalize(),this.setFromNormalAndCoplanarPoint(t,e),this}),clone:function(){return(new this.constructor).copy(this)},copy:function(e){return this.normal.copy(e.normal),this.constant=e.constant,this},normalize:function(){var e=1/this.normal.length();return this.normal.multiplyScalar(e),this.constant*=e,this},negate:function(){return this.constant*=-1,this.normal.negate(),this},distanceToPoint:function(e){return this.normal.dot(e)+this.constant},distanceToSphere:function(e){return this.distanceToPoint(e.center)-e.radius},projectPoint:function(e,t){return void 0===t&&(console.warn("THREE.Plane: .projectPoint() target is now required"),t=new _e),t.copy(this.normal).multiplyScalar(-this.distanceToPoint(e)).add(e)},intersectLine:(vo=new _e,function(e,t){void 0===t&&(console.warn("THREE.Plane: .intersectLine() target is now required"),t=new _e);var i=e.delta(vo),n=this.normal.dot(i);if(0===n){if(0===this.distanceToPoint(e.start))return t.copy(e.start)}else if(!((n=-(e.start.dot(this.normal)+this.constant)/n)<0||1<n))return t.copy(i).multiplyScalar(n).add(e.start)}),intersectsLine:function(e){var t=this.distanceToPoint(e.start);return e=this.distanceToPoint(e.end),t<0&&0<e||e<0&&0<t},intersectsBox:function(e){return e.intersectsPlane(this)},intersectsSphere:function(e){return e.intersectsPlane(this)},coplanarPoint:function(e){return void 0===e&&(console.warn("THREE.Plane: .coplanarPoint() target is now required"),e=new _e),e.copy(this.normal).multiplyScalar(-this.constant)},applyMatrix4:(mo=new _e,go=new g,function(e,t){return t=t||go.getNormalMatrix(e),e=this.coplanarPoint(mo).applyMatrix4(e),t=this.normal.applyMatrix3(t).normalize(),this.constant=-e.dot(t),this}),translate:function(e){return this.constant-=e.dot(this.normal),this},equals:function(e){return e.normal.equals(this.normal)&&e.constant===this.constant}}),Object.assign(Se.prototype,{set:function(e,t,i,n,r,o){var a=this.planes;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},clone:function(){return(new this.constructor).copy(this)},copy:function(e){for(var t=this.planes,i=0;i<6;i++)t[i].copy(e.planes[i]);return this},setFromMatrix:function(e){var t=this.planes,i=e.elements;e=i[0];var n=i[1],r=i[2],o=i[3],a=i[4],s=i[5],l=i[6],c=i[7],u=i[8],h=i[9],d=i[10],p=i[11],f=i[12],m=i[13],g=i[14];return i=i[15],t[0].setComponents(o-e,c-a,p-u,i-f).normalize(),t[1].setComponents(o+e,c+a,p+u,i+f).normalize(),t[2].setComponents(o+n,c+s,p+h,i+m).normalize(),t[3].setComponents(o-n,c-s,p-h,i-m).normalize(),t[4].setComponents(o-r,c-l,p-d,i-g).normalize(),t[5].setComponents(o+r,c+l,p+d,i+g).normalize(),this},intersectsObject:(To=new a,function(e){var t=e.geometry;return null===t.boundingSphere&&t.computeBoundingSphere(),To.copy(t.boundingSphere).applyMatrix4(e.matrixWorld),this.intersectsSphere(To)}),intersectsSprite:(_o=new a,function(e){return _o.center.set(0,0,0),_o.radius=.7071067811865476,_o.applyMatrix4(e.matrixWorld),this.intersectsSphere(_o)}),intersectsSphere:function(e){var t=this.planes,i=e.center;e=-e.radius;for(var n=0;n<6;n++)if(t[n].distanceToPoint(i)<e)return!1;return!0},intersectsBox:(bo=new _e,wo=new _e,function(e){for(var t=this.planes,i=0;i<6;i++){var n=t[i];bo.x=0<n.normal.x?e.min.x:e.max.x,wo.x=0<n.normal.x?e.max.x:e.min.x,bo.y=0<n.normal.y?e.min.y:e.max.y,wo.y=0<n.normal.y?e.max.y:e.min.y,bo.z=0<n.normal.z?e.min.z:e.max.z,wo.z=0<n.normal.z?e.max.z:e.min.z;var r=n.distanceToPoint(bo);if(n=n.distanceToPoint(wo),r<0&&n<0)return!1}return!0}),containsPoint:function(e){for(var t=this.planes,i=0;i<6;i++)if(t[i].distanceToPoint(e)<0)return!1;return!0}});var So,Mo={alphamap_fragment:"#ifdef USE_ALPHAMAP\n\tdiffuseColor.a *= texture2D( alphaMap, vUv ).g;\n#endif\n",alphamap_pars_fragment:"#ifdef USE_ALPHAMAP\n\tuniform sampler2D alphaMap;\n#endif\n",alphatest_fragment:"#ifdef ALPHATEST\n\tif ( diffuseColor.a < ALPHATEST ) discard;\n#endif\n",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
1( geometry.normal, geometry.viewDir ) );\n\t\treflectedLight.indirectSpecular *= computeSpecularOcclusion( dotNV, ambientOcclusion, material.specularRoughness );\n\t#endif\n#endif\n",aomap_pars_fragment:"#ifdef USE_AOMAP\n\tuniform sampler2D aoMap;\n\tuniform float aoMapIntensity;\n#endif",begin_vertex:"\nvec3 transformed = vec3( position );\n",beginnormal_vertex:"\nvec3 objectNormal = vec3( normal );\n",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 );
1\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 dotNV = saturate( dot( N, V ) );\n\tvec2 uv = vec2( roughness, sqrt( 1.0 - dotNV ) );\n\tuv = uv * LUT_SCALE + LUT_BIAS;\n\treturn uv;\n}\nfloat LTC_ClippedSphereFormFactor( const in vec3 f ) {\n\tfloat l = length( f );\n\treturn max( ( l * l + f.z ) / ( l + 1.0 ), 0.0 );\n}\nvec3 LTC_EdgeVectorFormFactor( const in vec3 v1, const in vec3 v2 ) {\n\tfloat x = dot( v1, v2 );\n\tfloat y = abs( x );\n\tfloat a = 0.8543985 + ( 0.4965155 + 0.0145206 * y ) * y;\n\tfloat b = 3.4175940 + ( 4.1616724 + y ) * y;\n\tfloat v = a / b;\n\tfloat theta_sintheta = ( x > 0.0 ) ? v : 0.5 * inversesqrt( max( 1.0 - x * x, 1e-7 ) ) - v;\n\treturn cross( v1, v2 ) * theta_sintheta;\n}\nvec3 LTC_Evaluate( const in vec3 N, const in vec3 V, const in vec3 P, const in mat3 mInv, const in vec3 rectCoords[ 4 ] ) {\n\tvec3 v1 = rectCoords[ 1 ] - rectCoords[ 0 ];\n\tvec3 v2 = rectCoords[ 3 ] - rectCoords[ 0 ];\n\tvec3 lightNormal = cross( v1, v2 );\n\tif( dot( lightNormal, P - rectCoords[ 0 ] ) < 0.0 ) return vec3( 0.0 );\n\tvec3 T1, T2;\n\tT1 = normalize( V - N * dot( V, N ) );\n\tT2 = - cross( N, T1 );\n\tmat3 mat = mInv * transposeMat3( mat3( T1, T2, N ) );\n\tvec3 coords[ 4 ];\n\tcoords[ 0 ] = mat * ( rectCoords[ 0 ] - P );\n\tcoords[ 1 ] = mat * ( rectCoords[ 1 ] - P );\n\tcoords[ 2 ] = mat * ( rectCoords[ 2 ] - P );\n\tcoords[ 3 ] = mat * ( rectCoords[ 3 ] - P );\n\tcoords[ 0 ] = normalize( coords[ 0 ] );\n\tcoords[ 1 ] = normalize( coords[ 1 ] );\n\tcoords[ 2 ] = normalize( coords[ 2 ] );\n\tcoords[ 3 ] = normalize( coords[ 3 ] );\n\tvec3 vectorFormFactor = vec3( 0.0 );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 0 ], coords[ 1 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 1 ], coords[ 2 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 2 ], coords[ 3 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 3 ], coords[ 0 ] );\n\tfloat result = LTC_ClippedSphereFormFactor( vectorFormFactor );\n\treturn vec3( result );\n}\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",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}
1\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",clipping_planes_fragment:"#if NUM_CLIPPING_PLANES > 0\n\tvec4 plane;\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) {\n\t\tplane = clippingPlanes[ i ];\n\t\tif ( dot( vViewPosition, plane.xyz ) > plane.w ) discard;\n\t}\n\t#if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES\n\t\tbool clipped = true;\n\t\t#pragma unroll_loop\n\t\tfor ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) {\n\t\t\tplane = clippingPlanes[ i ];\n\t\t\tclipped = ( dot( vViewPosition, plane.xyz ) > plane.w ) && clipped;\n\t\t}\n\t\tif ( clipped ) discard;\n\t#endif\n#endif\n",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",clipping_planes_pars_vertex:"#if NUM_CLIPPING_PLANES > 0 && ! defined( PHYSICAL ) && ! defined( PHONG )\n\tvarying vec3 vViewPosition;\n#endif\n",clipping_planes_vertex:"#if NUM_CLIPPING_PLANES > 0 && ! defined( PHYSICAL ) && ! defined( PHONG )\n\tvViewPosition = - mvPosition.xyz;\n#endif\n",color_fragment:"#ifdef USE_COLOR\n\tdiffuseColor.rgb *= vColor;\n#endif",color_pars_fragment:"#ifdef USE_COLOR\n\tvarying vec3 vColor;\n#endif\n",color_pars_vertex:"#ifdef USE_COLOR\n\tvarying vec3 vColor;\n#endif",color_vertex:"#ifdef USE_COLOR\n\tvColor.xyz = color.xyz;\n#endif",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 transposeMat3( const in mat3 m ) {\n\tmat3 tmp;\n\ttmp[ 0 ] = vec3( m[ 0 ].x, m[ 1 ].x, m[ 2 ].x );\n\ttmp[ 1 ] = vec3( m[ 0 ].y, m[ 1 ].y, m[ 2 ].y );\n\ttmp[ 2 ] = vec3( m[ 0 ].z, m[ 1 ].z, m[ 2 ].z );\n\treturn tmp;\n}\nfloat linearToRelativeLuminance( const in vec3 color ) {\n\tvec3 weights = vec3( 0.2126, 0.7152, 0.0722 );\n\treturn dot( weights, color.rgb );\n}\n",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);
1\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",defaultnormal_vertex:"vec3 transformedNormal = normalMatrix * objectNormal;\n#ifdef FLIP_SIDED\n\ttransformedNormal = - transformedNormal;\n#endif\n",displacementmap_pars_vertex:"#ifdef USE_DISPLACEMENTMAP\n\tuniform sampler2D displacementMap;\n\tuniform float displacementScale;\n\tuniform float displacementBias;\n#endif\n",displacementmap_vertex:"#ifdef USE_DISPLACEMENTMAP\n\ttransformed += normalize( objectNormal ) * ( texture2D( displacementMap, uv ).x * displacementScale + displacementBias );\n#endif\n",emissivemap_fragment:"#ifdef USE_EMISSIVEMAP\n\tvec4 emissiveColor = texture2D( emissiveMap, vUv );\n\temissiveColor.rgb = emissiveMapTexelToLinear( emissiveColor ).rgb;\n\ttotalEmissiveRadiance *= emissiveColor.rgb;\n#endif\n",emissivemap_pars_fragment:"#ifdef USE_EMISSIVEMAP\n\tuniform sampler2D emissiveMap;\n#endif\n",encodings_fragment:" gl_FragColor = linearToOutputTexel( gl_FragColor );\n",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}
1\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",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",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\tuniform int maxMipLevel;\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",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",envmap_vertex:"#ifdef USE_ENVMAP\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG )\n\t\tvWorldPosition = worldPosition.xyz;
1\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",fog_vertex:"\n#ifdef USE_FOG\nfogDepth = -mvPosition.z;\n#endif",fog_pars_vertex:"#ifdef USE_FOG\n varying float fogDepth;\n#endif\n",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",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",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",lightmap_fragment:"#ifdef USE_LIGHTMAP\n\treflectedLight.indirectDiffuse += PI * texture2D( lightMap, vUv2 ).xyz * lightMapIntensity;\n#endif\n",lightmap_pars_fragment:"#ifdef USE_LIGHTMAP\n\tuniform sampler2D lightMap;\n\tuniform float lightMapIntensity;\n#endif",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\t#pragma unroll_loop\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\t#pragma unroll_loop\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\t#pragma unroll_loop\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\t#pragma unroll_loop\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",lights_pars_begin:"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}
1\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 ltc_1;\tuniform sampler2D ltc_2;\n\tuniform RectAreaLight rectAreaLights[ NUM_RECT_AREA_LIGHTS ];\n#endif\n#if NUM_HEMI_LIGHTS > 0\n\tstruct HemisphereLight {\n\t\tvec3 direction;\n\t\tvec3 skyColor;\n\t\tvec3 groundColor;\n\t};\n\tuniform HemisphereLight hemisphereLights[ NUM_HEMI_LIGHTS ];\n\tvec3 getHemisphereLightIrradiance( const in HemisphereLight hemiLight, const in 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",lights_pars_maps:"#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
1ssExponent));\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",lights_phong_fragment:"BlinnPhongMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;\nmaterial.specularColor = specular;\nmaterial.specularShininess = shininess;\nmaterial.specularStrength = specularStrength;\n",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",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",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;
1\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\tvec4 t1 = texture2D( ltc_1, uv );\n\t\tvec4 t2 = texture2D( ltc_2, uv );\n\t\tmat3 mInv = mat3(\n\t\t\tvec3( t1.x, 0, t1.y ),\n\t\t\tvec3( 0, 1, 0 ),\n\t\t\tvec3( t1.z, 0, t1.w )\n\t\t);\n\t\tvec3 fresnel = ( material.specularColor * t2.x + ( vec3( 1.0 ) - material.specularColor ) * t2.y );\n\t\treflectedLight.directSpecular += lightColor * fresnel * LTC_Evaluate( normal, viewDir, position, mInv, rectCoords );\n\t\treflectedLight.directDiffuse += lightColor * material.diffuseColor * LTC_Evaluate( normal, viewDir, position, mat3( 1.0 ), rectCoords );\n\t}\n#endif\nvoid RE_Direct_Physical( const in IncidentLight directLight, const in 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",lights_fragment_begin:"\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\t#pragma unroll_loop\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}
1\n#endif\n#if ( NUM_SPOT_LIGHTS > 0 ) && defined( RE_Direct )\n\tSpotLight spotLight;\n\t#pragma unroll_loop\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\t#pragma unroll_loop\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\t#pragma unroll_loop\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#if ( NUM_HEMI_LIGHTS > 0 )\n\t\t#pragma unroll_loop\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#endif\n#if defined( RE_IndirectSpecular )\n\tvec3 radiance = vec3( 0.0 );\n\tvec3 clearCoatRadiance = vec3( 0.0 );\n#endif\n",lights_fragment_maps:"#if defined( RE_IndirectDiffuse )\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 defined( USE_ENVMAP ) && defined( PHYSICAL ) && defined( ENVMAP_TYPE_CUBE_UV )\n\t\tirradiance += getLightProbeIndirectIrradiance( geometry, maxMipLevel );\n\t#endif\n#endif\n#if defined( USE_ENVMAP ) && defined( RE_IndirectSpecular )\n\tradiance += getLightProbeIndirectRadiance( geometry, Material_BlinnShininessExponent( material ), maxMipLevel );\n\t#ifndef STANDARD\n\t\tclearCoatRadiance += getLightProbeIndirectRadiance( geometry, Material_ClearCoat_BlinnShininessExponent( material ), maxMipLevel );\n\t#endif\n#endif\n",lights_fragment_end:"#if defined( RE_IndirectDiffuse )\n\tRE_IndirectDiffuse( irradiance, geometry, material, reflectedLight );\n#endif\n#if defined( RE_IndirectSpecular )\n\tRE_IndirectSpecular( radiance, clearCoatRadiance, geometry, material, reflectedLight );\n#endif\n",logdepthbuf_fragment:"#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT )\n\tgl_FragDepthEXT = log2( vFragDepth ) * logDepthBufFC * 0.5;\n#endif",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",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",logdepthbuf_vertex:"#ifdef USE_LOGDEPTHBUF\n\t#ifdef USE_LOGDEPTHBUF_EXT\n\t\tvFragDepth = 1.0 + gl_Position.w;\n\t#else\n\t\tgl_Position.z = log2( max( EPSILON, gl_Position.w + 1.0 ) ) * logDepthBufFC - 1.0;\n\t\tgl_Position.z *= gl_Position.w;\n\t#endif\n#endif\n",map_fragment:"#ifdef USE_MAP\n\tvec4 texelColor = texture2D( map, vUv );\n\ttexelColor = mapTexelToLinear( texelColor );\n\tdiffuseColor *= texelColor;\n#endif\n",map_pars_fragment:"#ifdef USE_MAP\n\tuniform sampler2D map;\n#endif\n",map_particle_fragment:"#ifdef USE_MAP\n\tvec2 uv = ( uvTransform * vec3( gl_PointCoord.x, 1.0 - gl_PointCoord.y, 1 ) ).xy;\n\tvec4 mapTexel = texture2D( map, uv );\n\tdiffuseColor *= mapTexelToLinear( mapTexel );\n#endif\n",map_particle_pars_fragment:"#ifdef USE_MAP\n\tuniform mat3 uvTransform;\n\tuniform sampler2D map;\n#endif\n",metalnessmap_fragment:"float metalnessFactor = metalness;\n#ifdef USE_METALNESSMAP\n\tvec4 texelMetalness = texture2D( metalnessMap, vUv );\n\tmetalnessFactor *= texelMetalness.b;\n#endif\n",metalnessmap_pars_fragment:"#ifdef USE_METALNESSMAP\n\tuniform sampler2D metalnessMap;\n#endif",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",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",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",normal_fragment_begin:"#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 );\n\t#endif\n#endif\n",normal_fragment_maps:"#ifdef USE_NORMALMAP\n\tnormal = perturbN
1ormal2Arb( -vViewPosition, normal );\n#elif defined( USE_BUMPMAP )\n\tnormal = perturbNormalArb( -vViewPosition, normal, dHdxy_fwd() );\n#endif\n",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",packing:"vec3 packNormalToRGB( const in vec3 normal ) {\n\treturn normalize( normal ) * 0.5 + 0.5;\n}\nvec3 unpackRGBToNormal( const in vec3 rgb ) {\n\treturn 2.0 * rgb.xyz - 1.0;\n}\nconst float PackUpscale = 256. / 255.;const float UnpackDownscale = 255. / 256.;\nconst vec3 PackFactors = vec3( 256. * 256. * 256., 256. * 256., 256. );\nconst vec4 UnpackFactors = UnpackDownscale / vec4( PackFactors, 1. );\nconst float ShiftRight8 = 1. / 256.;\nvec4 packDepthToRGBA( const in float v ) {\n\tvec4 r = vec4( fract( v * PackFactors ), v );\n\tr.yzw -= r.xyz * ShiftRight8;\treturn r * PackUpscale;\n}\nfloat unpackRGBAToDepth( const in vec4 v ) {\n\treturn dot( v, UnpackFactors );\n}\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",premultiplied_alpha_fragment:"#ifdef PREMULTIPLIED_ALPHA\n\tgl_FragColor.rgb *= gl_FragColor.a;\n#endif\n",project_vertex:"vec4 mvPosition = modelViewMatrix * vec4( transformed, 1.0 );\ngl_Position = projectionMatrix * mvPosition;\n",dithering_fragment:"#if defined( DITHERING )\n gl_FragColor.rgb = dithering( gl_FragColor.rgb );\n#endif\n",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",roughnessmap_fragment:"float roughnessFactor = roughness;\n#ifdef USE_ROUGHNESSMAP\n\tvec4 texelRoughness = texture2D( roughnessMap, vUv );\n\troughnessFactor *= texelRoughness.g;\n#endif\n",roughnessmap_pars_fragment:"#ifdef USE_ROUGHNESSMAP\n\tuniform sampler2D roughnessMap;\n#endif",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 );
1\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",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",shadowmap_vertex:"#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHTS > 0\n\t#pragma unroll_loop\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\t#pragma unroll_loop\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\t#pragma unroll_loop\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",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\t#pragma unroll_loop\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\t#pragma unroll_loop\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\t#pragma unroll_loop\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",skinbase_vertex:"#ifdef USE_SKINNING\n\tmat4 boneMatX = getBoneMatrix( skinIndex.x );\n\tmat4 boneMatY = getBoneMatrix( skinIndex.y );\n\tmat4 boneMatZ = getBoneMatrix( skinIndex.z );\n\tmat4 boneMatW = getBoneMatrix( skinIndex.w );\n#endif",skinning_pars_vertex:"#ifdef USE_SKINNING\n\tuniform mat4 bindMatrix;\n\tuniform mat4 bindMatrixInverse;\n\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",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",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;
1\n\tskinMatrix = bindMatrixInverse * skinMatrix * bindMatrix;\n\tobjectNormal = vec4( skinMatrix * vec4( objectNormal, 0.0 ) ).xyz;\n#endif\n",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",specularmap_pars_fragment:"#ifdef USE_SPECULARMAP\n\tuniform sampler2D specularMap;\n#endif",tonemapping_fragment:"#if defined( TONE_MAPPING )\n gl_FragColor.rgb = toneMapping( gl_FragColor.rgb );\n#endif\n",tonemapping_pars_fragment:"#ifndef saturate\n\t#define saturate(a) clamp( a, 0.0, 1.0 )\n#endif\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",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",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 mat3 uvTransform;\n#endif\n",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 = ( uvTransform * vec3( uv, 1 ) ).xy;\n#endif",uv2_pars_fragment:"#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\n\tvarying vec2 vUv2;\n#endif",uv2_pars_vertex:"#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\n\tattribute vec2 uv2;\n\tvarying vec2 vUv2;\n#endif",uv2_vertex:"#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\n\tvUv2 = uv2;\n#endif",worldpos_vertex:"#if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP )\n\tvec4 worldPosition = modelMatrix * vec4( transformed, 1.0 );\n#endif\n",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",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\tgl_Position.z = gl_Position.w;\n}\n",depth_frag:"#if DEPTH_PACKING == 3200\n\tuniform float opacity;\n#endif\n#include <common>\n#include <packing>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <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( 1.0 - gl_FragCoord.z ), opacity );\n\t#elif DEPTH_PACKING == 3201\n\t\tgl_FragColor = packDepthToRGBA( gl_FragCoord.z );\n\t#endif\n}\n",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",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",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",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",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",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",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",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",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",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_begin>\n#include <lights_pars_maps>\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",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_begin>\n#include <lights_pars_maps>\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",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_begin>\n#include <lights_pars_maps>\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_begin>\n\t#include <normal_fragment_maps>\n\t#include <emissivemap_fragment>\n\t#include <lights_phong_fragment>\n\t#include <lights_fragment_begin>\n\t#include <lights_fragment_maps>\n\t#include <lights_fragment_end>\n\t#include <aomap_fragment>\n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;\n\t#include <envmap_fragment>\n\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",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>\n#include <displacementmap_pars_vertex>\n#include <envmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_ve
1rtex>\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",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_begin>\n#include <lights_pars_maps>\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_begin>\n\t#include <normal_fragment_maps>\n\t#include <emissivemap_fragment>\n\t#include <lights_physical_fragment>\n\t#include <lights_fragment_begin>\n\t#include <lights_fragment_maps>\n\t#include <lights_fragment_end>\n\t#include <aomap_fragment>\n\tvec3 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",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",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_begin>\n\t#include <normal_fragment_maps>\n\tgl_FragColor = vec4( packNormalToRGB( normal ), opacity );\n}\n",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",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",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",shadow_frag:"uniform vec3 color;\nuniform float opacity;\n#include <common>\n#include <packing>\n#include <fog_pars_fragment>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <shadowmap_pars_fragment>\n#include <shadowmask_pars_fragment>\nvoid main() {\n\tgl_FragColor = vec4( color, opacity * ( 1.0 - getShadowMask() ) );\n\t#include <fog_fragment>\n}\n",shadow_vert:"#include <fog_pars_vertex>\n#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\t#include <fog_vertex>\n}\n"},Ao={merge:function(e){for(var t={},i=0;i<e.length;i++){var n,r=this.clone(e[i]);for(n in r)t[n]=r[n]}return t},clone:function(e){var t,i={};for(t in e)for(var n in i[t]={},e[t]){var r=e[t][n];r&&(r.isColor||r.isMatrix3||r.isMatrix4||r.isVector2||r.isVector3||r.isVector4||r.isTexture)?i[t][n]=r.clone():Array.isArray(r)?i[t][n]=r.slice():i[t][n]=r}return i}},Co={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};Object.assign(_.prototype,{isColor:!0,r:1,g:1,b:1,set:function(e){return e&&e.isColor?this.copy(e):"number"==typeof e?this.setHex(e):"string"==typeof e&&this.setStyle(e),this},setScalar:function(e){return this.b=this.g=this.r=e,this},setHex:function(e){return e=Math.floor(e),this.r=(e>>16&255)/255,this.g=(e>>8&255)/255,this.b=(255&e)/255,this},setRGB:function(e,t,i){return this.r=e,this.g=t,this.b=i,this},setHSL:function(){function n(e,t,i){return i<0&&(i+=1),1<i&&--i,i<1/6?e+6*(t-e)*i:i<.5?t:i<2/3?e+6*(t-e)*(2/3-i):e}return function(e,t,i){return e=oo.euclideanModulo(e,1),t=oo.clamp(t,0,1),i=oo.clamp(i,0,1),0===t?this.r=this.g=this.b=i:(i=2*i-(t=i<=.5?i*(1+t):i+t-i*t),this.r=n(i,t,e+1/3),this.g=n(i,t,e),this.b=n(i,t,e-1/3)),this}}(),setStyle:function(t){function e(e){void 0!==e&&parseFloat(e)<1&&console.warn("THREE.Color: Alpha component of "+t+" will be ignored.")}var i;if(i=/^((?:rgb|hsl)a?)\(\s*([^\)]*)\)/.exec(t)){var n=i[2];switch(i[1]){case"rgb":case"rgba":if(i=/^(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(,\s*([0-9]*\.?[0-9]+)\s*)?$/.exec(n))return this.r=Math.min(255,parseInt(i[1],10))/255,this.g=Math.min(255,parseInt(i[2],10))/255,this.b=Math.min(255,parseInt(i[3],10))/255,e(i[5]),this;if(i=/^(\d+)%\s*,\s*(\d+)%\s*,\s*(\d+)%\s*(,\s*([0-9]*\.?[0-9]+)\s*)?$/.exec(n))return this.r=Math.min(100,parseInt(i[1],10))/100,this.g=Math.min(100,parseInt(i[2],10))/100,this.b=Math.min(100,parseInt(i[3],10))/100,e(i[5]),this;break;case"hsl":case"hsla":if(i=/^([0-9]*\.?[0-9]+)\s*,\s*(\d+)%\s*,\s*(\d+)%\s*(,\s*([0-9]*\.?[0-9]+)\s*)?$/.exec(n)){n=parseFloat(i[1])/360;var r=parseInt(i[2],10)/100,o=parseInt(i[3],10)/100;return e(i[5]),this.setHSL(n,r,o)}}}else if(i=/^#([A-Fa-f0-9]+)$/.exec(t)){if(3===(n=(i=i[1]).length))return this.r=parseInt(i.charAt(0)+i.charAt(0),16)/255,this.g=parseInt(i.charAt(1)+i.charAt(1),16)/255,this.b=parseInt(i.charAt(2)+i.charAt(2),16)/255,this;if(6===n)return this.r=parseInt(i.charAt(0)+i.charAt(1),16)/255,this.g=parseInt(i.charAt(2)+i.charAt(3),16)/255,this.b=parseInt(i.charAt(4)+i.charAt(5),16)/255,this}return t&&0<t.length&&(void 0!==(i=Co[t])?this.setHex(i):console.warn("THREE.Color: Unknown color "+t)),this},clone:function(){return new this.constructor(this.r,this.g,this.b)}
vendor: 4,203 bytes, line 1
1,copy:function(e){return this.r=e.r,this.g=e.g,this.b=e.b,this},copyGammaToLinear:function(e,t){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},copyLinearToGamma:function(e,t){return void 0===t&&(t=2),t=0<t?1/t:1,this.r=Math.pow(e.r,t),this.g=Math.pow(e.g,t),this.b=Math.pow(e.b,t),this},convertGammaToLinear:function(){var e=this.r,t=this.g,i=this.b;return this.r=e*e,this.g=t*t,this.b=i*i,this},convertLinearToGamma:function(){return this.r=Math.sqrt(this.r),this.g=Math.sqrt(this.g),this.b=Math.sqrt(this.b),this},getHex:function(){return 255*this.r<<16^255*this.g<<8^255*this.b<<0},getHexString:function(){return("000000"+this.getHex().toString(16)).slice(-6)},getHSL:function(e){void 0===e&&(console.warn("THREE.Color: .getHSL() target is now required"),e={h:0,s:0,l:0});var t,i=this.r,n=this.g,r=this.b,o=Math.max(i,n,r),a=Math.min(i,n,r),s=(a+o)/2;if(a===o)a=t=0;else{var l=o-a;switch(a=s<=.5?l/(o+a):l/(2-o-a),o){case i:t=(n-r)/l+(n<r?6:0);break;case n:t=(r-i)/l+2;break;case r:t=(i-n)/l+4}t/=6}return e.h=t,e.s=a,e.l=s,e},getStyle:function(){return"rgb("+(255*this.r|0)+","+(255*this.g|0)+","+(255*this.b|0)+")"},offsetHSL:(So={},function(e,t,i){return this.getHSL(So),So.h+=e,So.s+=t,So.l+=i,this.setHSL(So.h,So.s,So.l),this}),add:function(e){return this.r+=e.r,this.g+=e.g,this.b+=e.b,this},addColors:function(e,t){return this.r=e.r+t.r,this.g=e.g+t.g,this.b=e.b+t.b,this},addScalar:function(e){return this.r+=e,this.g+=e,this.b+=e,this},sub:function(e){return this.r=Math.max(0,this.r-e.r),this.g=Math.max(0,this.g-e.g),this.b=Math.max(0,this.b-e.b),this},multiply:function(e){return this.r*=e.r,this.g*=e.g,this.b*=e.b,this},multiplyScalar:function(e){return this.r*=e,this.g*=e,this.b*=e,this},lerp:function(e,t){return this.r+=(e.r-this.r)*t,this.g+=(e.g-this.g)*t,this.b+=(e.b-this.b)*t,this},equals:function(e){return e.r===this.r&&e.g===this.g&&e.b===this.b},fromArray:function(e,t){return void 0===t&&(t=0),this.r=e[t],this.g=e[t+1],this.b=e[t+2],this},toArray:function(e,t){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},toJSON:function(){return this.getHex()}});var Lo,Ro,Po={common:{diffuse:{value:new _(15658734)},opacity:{value:1},map:{value:null},uvTransform:{value:new g},alphaMap:{value:null}},specularmap:{specularMap:{value:null}},envmap:{envMap:{value:null},flipEnvMap:{value:-1},reflectivity:{value:1},refractionRatio:{value:.98},maxMipLevel:{value:0}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1}},emissivemap:{emissiveMap:{value:null}},bumpmap:{bumpMap:{value:null},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalScale:{value:new $(1,1)}},displacementmap:{displacementMap:{value:null},displacementScale:{value:1},displacementBias:{value:0}},roughnessmap:{roughnessMap:{value:null}},metalnessmap:{metalnessMap:{value:null}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new _(16777215)}},lights:{ambientLightColor:{value:[]},directionalLights:{value:[],properties:{direction:{},color:{},shadow:{},shadowBias:{},shadowRadius:{},shadowMapSize:{}}},directionalShadowMap:{value:[]},directionalShadowMatrix:{value:[]},spotLights:{value:[],properties:{color:{},position:{},direction:{},distance:{},coneCos:{},penumbraCos:{},decay:{},shadow:{},shadowBias:{},shadowRadius:{},shadowMapSize:{}}},spotShadowMap:{value:[]},spotShadowMatrix:{value:[]},pointLights:{value:[],properties:{color:{},position:{},decay:{},distance:{},shadow:{},shadowBias:{},shadowRadius:{},shadowMapSize:{},shadowCameraNear:{},shadowCameraFar:{}}},pointShadowMap:{value:[]},pointShadowMatrix:{value:[]},hemisphereLights:{value:[],properties:{direction:{},skyColor:{},groundColor:{}}},rectAreaLights:{value:[],properties:{color:{},position:{},width:{},height:{}}}},points:{diffuse:{value:new _(15658734)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},uvTransform:{value:new g}}},ko={basic:{uniforms:Ao.merge([Po.common,Po.specularmap,Po.envmap,Po.aomap,Po.lightmap,Po.fog]),vertexShader:Mo.meshbasic_vert,fragmentShader:Mo.meshbasic_frag}
1,lambert:{uniforms:Ao.merge([Po.common,Po.specularmap,Po.envmap,Po.aomap,Po.lightmap,Po.emissivemap,Po.fog,Po.lights,{emissive:{value:new _(0)}}]),vertexShader:Mo.meshlambert_vert,fragmentShader:Mo.meshlambert_frag},phong:{uniforms:Ao.merge([Po.common,Po.specularmap,Po.envmap,Po.aomap,Po.lightmap,Po.emissivemap,Po.bumpmap,Po.normalmap,Po.displacementmap,Po.gradientmap,Po.fog,Po.lights,{emissive:{value:new _(0)},specular:{value:new _(1118481)},shininess:{value:30}}]),vertexShader:Mo.meshphong_vert,fragmentShader:Mo.meshphong_frag},standard:{uniforms:Ao.merge([Po.common,Po.envmap,Po.aomap,Po.lightmap,Po.emissivemap,Po.bumpmap,Po.normalmap,Po.displacementmap,Po.roughnessmap,Po.metalnessmap,Po.fog,Po.lights,{emissive:{value:new _(0)},roughness:{value:.5},metalness:{value:.5},envMapIntensity:{value:1}}]),vertexShader:Mo.meshphysical_vert,fragmentShader:Mo.meshphysical_frag},points:{uniforms:Ao.merge([Po.points,Po.fog]),vertexShader:Mo.points_vert,fragmentShader:Mo.points_frag},dashed:{uniforms:Ao.merge([Po.common,Po.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:Mo.linedashed_vert,fragmentShader:Mo.linedashed_frag},depth:{uniforms:Ao.merge([Po.common,Po.displacementmap]),vertexShader:Mo.depth_vert,fragmentShader:Mo.depth_frag},normal:{uniforms:Ao.merge([Po.common,Po.bumpmap,Po.normalmap,Po.displacementmap,{opacity:{value:1}}]),vertexShader:Mo.normal_vert,fragmentShader:Mo.normal_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:Mo.cube_vert,fragmentShader:Mo.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:Mo.equirect_vert,fragmentShader:Mo.equirect_frag},distanceRGBA:{uniforms:Ao.merge([Po.common,Po.displacementmap,{referencePosition:{value:new _e},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:Mo.distanceRGBA_vert,fragmentShader:Mo.distanceRGBA_frag},shadow:{uniforms:Ao.merge([Po.lights,Po.fog,{color:{value:new _(0)},opacity:{value:1}}]),vertexShader:Mo.shadow_vert,fragmentShader:Mo.shadow_frag}};ko.physical={uniforms:Ao.merge([ko.standard.uniforms,{clearCoat:{value:0},clearCoatRoughness:{value:0}}]),vertexShader:Mo.meshphysical_vert,fragmentShader:Mo.meshphysical_frag},r.RotationOrders="XYZ YZX ZXY XZY YXZ ZYX".split(" "),r.DefaultOrder="XYZ",Object.defineProperties(r.prototype,{x:{get:function(){return this._x},set:function(e){this._x=e,this.onChangeCallback()}},y:{get:function(){return this._y},set:function(e){this._y=e,this.onChangeCallback()}},z:{get:function(){return this._z},set:function(e){this._z=e,this.onChangeCallback()}},order:{get:function(){return this._order},set:function(e){this._order=e,this.onChangeCallback()}}}),Object.assign(r.prototype,{isEuler:!0,set:function(e,t,i,n){return this._x=e,this._y=t,this._z=i,this._order=n||this._order,this.onChangeCallback(),this},clone:function(){return new this.constructor(this._x,this._y,this._z,this._order)},copy:function(e){return this._x=e._x,this._y=e._y,this._z=e._z,this._order=e._order,this.onChangeCallback(),this},setFromRotationMatrix:function(e,t,i){var n=oo.clamp,r=e.elements;e=r[0];var o=r[4],a=r[8],s=r[1],l=r[5],c=r[9],u=r[2],h=r[6];return r=r[10],"XYZ"===(t=t||this._order)?(this._y=Math.asin(n(a,-1,1)),Math.abs(a)<.99999?(this._x=Math.atan2(-c,r),this._z=Math.atan2(-o,e)):(this._x=Math.atan2(h,l),this._z=0)):"YXZ"===t?(this._x=Math.asin(-n(c,-1,1)),Math.abs(c)<.99999?(this._y=Math.atan2(a,r),this._z=Math.atan2(s,l)):(this._y=Math.atan2(-u,e),this._z=0)):"ZXY"===t?(this._x=Math.asin(n(h,-1,1)),Math.abs(h)<.99999?(this._y=Math.atan2(-u,r),this._z=Math.atan2(-o,l)):(this._y=0,this._z=Math.atan2(s,e))):"ZYX"===t?(this._y=Math.asin(-n(u,-1,1)),Math.abs(u)<.99999?(this._x=Math.atan2(h,r),this._z=Math.atan2(s,e)):(this._x=0,this._z=Math.atan2(-o,l))):"YZX"===t?(this._z=Math.asin(n(s,-1,1)),Math.abs(s)<.99999?(this._x=Math.atan2(-c,l),this._y=Math.atan2(-u,e)):(this._x=0,this._y=Math.atan2(a,r))):"XZY"===t?(this._z=Math.asin(-n(o,-1,1)),Math.abs(o)<.99999?(this._x=Math.atan2(h,l),this._y=Math.atan2(a,e)):(this._x=Math.atan2(-c,r),this._y=0)):console.warn("THREE.Euler: .setFromRotationMatrix() given unsupported order: "+t),this._order=t,!1!==i&&this.onChangeCallback(),this},setFromQuaternion:(Ro=new we,function(e,t,i){return Ro.makeRotationFromQuaternion(e),this.setFromRotationMatrix(Ro,t,i)}),setFromVector3:function(e,t){return this.set(e.x,e.y,e.z,t||this._order)},reorder:(Lo=new j,function(e){return Lo.setFromEuler(this),this.setFromQuaternion(Lo,e)}),equals:function(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._order===this._order},fromArray:function(e){return this._x=e[0],this._y=e[1],this._z=e[2],void 0!==e[3]&&(this._order=e[3]),this.onChangeCallback(),this},toArray:function(e,t){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},toVector3:function(e){return e?e.set(this._x,this._y,this._z):new _e(this._x,this._y,this._z)},onChange:function(e){return this.onChangeCallback=e,this},onChangeCallback:function(){}}),Object.assign(o.prototype,{set:function(e){this.mask=1<<e|0},enable:function(e){this.mask=this.mask|1<<e|0},toggle:function(e){this.mask^=1<<e|0},disable:function(e){this.mask&=~(1<<e|0)},test:function(e){return 0!=(this.mask&e.mask)}});var No,Do,Oo,Io,Uo,zo,Ho,Fo,Bo,Go,jo,Vo,Wo,$o,qo,Xo,Yo,Jo,Zo=0;u.DefaultUp=new _e(0,1,0),u.DefaultMatrixAutoUpdate=!0,u.prototype=Object.assign(Object.create(t.prototype),{constructor:u,isObject3D:!0,onBeforeRender:function(){},onAfterRender:function(){},applyMatrix:function(e){this.matrix.multiplyMatrices(e,this.matrix
1),this.matrix.decompose(this.position,this.quaternion,this.scale)},applyQuaternion:function(e){return this.quaternion.premultiply(e),this},setRotationFromAxisAngle:function(e,t){this.quaternion.setFromAxisAngle(e,t)},setRotationFromEuler:function(e){this.quaternion.setFromEuler(e,!0)},setRotationFromMatrix:function(e){this.quaternion.setFromRotationMatrix(e)},setRotationFromQuaternion:function(e){this.quaternion.copy(e)},rotateOnAxis:(Yo=new j,function(e,t){return Yo.setFromAxisAngle(e,t),this.quaternion.multiply(Yo),this}),rotateOnWorldAxis:(Xo=new j,function(e,t){return Xo.setFromAxisAngle(e,t),this.quaternion.premultiply(Xo),this}),rotateX:(qo=new _e(1,0,0),function(e){return this.rotateOnAxis(qo,e)}),rotateY:($o=new _e(0,1,0),function(e){return this.rotateOnAxis($o,e)}),rotateZ:(Wo=new _e(0,0,1),function(e){return this.rotateOnAxis(Wo,e)}),translateOnAxis:(Vo=new _e,function(e,t){return Vo.copy(e).applyQuaternion(this.quaternion),this.position.add(Vo.multiplyScalar(t)),this}),translateX:(jo=new _e(1,0,0),function(e){return this.translateOnAxis(jo,e)}),translateY:(Go=new _e(0,1,0),function(e){return this.translateOnAxis(Go,e)}),translateZ:(Bo=new _e(0,0,1),function(e){return this.translateOnAxis(Bo,e)}),localToWorld:function(e){return e.applyMatrix4(this.matrixWorld)},worldToLocal:(Fo=new we,function(e){return e.applyMatrix4(Fo.getInverse(this.matrixWorld))}),lookAt:(zo=new we,Ho=new _e,function(e,t,i){e.isVector3?Ho.copy(e):Ho.set(e,t,i),this.isCamera?zo.lookAt(this.position,Ho,this.up):zo.lookAt(Ho,this.position,this.up),this.quaternion.setFromRotationMatrix(zo)}),add:function(e){if(1<arguments.length){for(var t=0;t<arguments.length;t++)this.add(arguments[t]);return this}return e===this?console.error("THREE.Object3D.add: object can't be added as a child of itself.",e):e&&e.isObject3D?(null!==e.parent&&e.parent.remove(e),e.parent=this,e.dispatchEvent({type:"added"}),this.children.push(e)):console.error("THREE.Object3D.add: object not an instance of THREE.Object3D.",e),this},remove:function(e){if(1<arguments.length){for(var t=0;t<arguments.length;t++)this.remove(arguments[t]);return this}return-1!==(t=this.children.indexOf(e))&&(e.parent=null,e.dispatchEvent({type:"removed"}),this.children.splice(t,1)),this},getObjectById:function(e){return this.getObjectByProperty("id",e)},getObjectByName:function(e){return this.getObjectByProperty("name",e)},getObjectByProperty:function(e,t){if(this[e]===t)return this;for(var i=0,n=this.children.length;i<n;i++){var r=this.children[i].getObjectByProperty(e,t);if(void 0!==r)return r}},getWorldPosition:function(e){return void 0===e&&(console.warn("THREE.Object3D: .getWorldPosition() target is now required"),e=new _e),this.updateMatrixWorld(!0),e.setFromMatrixPosition(this.matrixWorld)},getWorldQuaternion:(Io=new _e,Uo=new _e,function(e){return void 0===e&&(console.warn("THREE.Object3D: .getWorldQuaternion() target is now required"),e=new j),this.updateMatrixWorld(!0),this.matrixWorld.decompose(Io,e,Uo),e}),getWorldScale:(Do=new _e,Oo=new j,function(e){return void 0===e&&(console.warn("THREE.Object3D: .getWorldScale() target is now required"),e=new _e),this.updateMatrixWorld(!0),this.matrixWorld.decompose(Do,Oo,e),e}),getWorldDirection:(No=new j,function(e){return void 0===e&&(console.warn("THREE.Object3D: .getWorldDirection() target is now required"),e=new _e),this.getWorldQuaternion(No),e.set(0,0,1).applyQuaternion(No)}),raycast:function(){},traverse:function(e){e(this);for(var t=this.children,i=0,n=t.length;i<n;i++)t[i].traverse(e)},traverseVisible:function(e){if(!1!==this.visible){e(this);for(var t=this.children,i=0,n=t.length;i<n;i++)t[i].traverseVisible(e)}},traverseAncestors:function(e){var t=this.parent;null!==t&&(e(t),t.traverseAncestors(e))},updateMatrix:function(){this.matrix.compose(this.position,this.quaternion,this.scale),this.matrixWorldNeedsUpdate=!0},updateMatrixWorld:function(e){this.matrixAutoUpdate&&this.updateMatrix(),(this.matrixWorldNeedsUpdate||e)&&(null===this.parent?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix
1),e=!(this.matrixWorldNeedsUpdate=!1));for(var t=this.children,i=0,n=t.length;i<n;i++)t[i].updateMatrixWorld(e)},toJSON:function(i){function e(e,t){return void 0===e[t.uuid]&&(e[t.uuid]=t.toJSON(i)),t.uuid}function t(e){var t,i=[];for(t in e){var n=e[t];delete n.metadata,i.push(n)}return i}var n=void 0===i||"string"==typeof i,r={};n&&(i={geometries:{},materials:{},textures:{},images:{},shapes:{}},r.metadata={version:4.5,type:"Object",generator:"Object3D.toJSON"});var o={};if(o.uuid=this.uuid,o.type=this.type,""!==this.name&&(o.name=this.name),!0===this.castShadow&&(o.castShadow=!0),!0===this.receiveShadow&&(o.receiveShadow=!0),!1===this.visible&&(o.visible=!1),!1===this.frustumCulled&&(o.frustumCulled=!1),0!==this.renderOrder&&(o.renderOrder=this.renderOrder),"{}"!==JSON.stringify(this.userData)&&(o.userData=this.userData),o.matrix=this.matrix.toArray(),void 0!==this.geometry){o.geometry=e(i.geometries,this.geometry);var a=this.geometry.parameters;if(void 0!==a&&void 0!==a.shapes)if(a=a.shapes,Array.isArray(a))for(var s=0,l=a.length;s<l;s++)e(i.shapes,a[s]);else e(i.shapes,a)}if(void 0!==this.material)if(Array.isArray(this.material)){for(a=[],s=0,l=this.material.length;s<l;s++)a.push(e(i.materials,this.material[s]));o.material=a}else o.material=e(i.materials,this.material);if(0<this.children.length)for(o.children=[],s=0;s<this.children.length;s++)o.children.push(this.children[s].toJSON(i).object);if(n){n=t(i.geometries),s=t(i.materials),l=t(i.textures);var c=t(i.images);a=t(i.shapes),0<n.length&&(r.geometries=n),0<s.length&&(r.materials=s),0<l.length&&(r.textures=l),0<c.length&&(r.images=c),0<a.length&&(r.shapes=a)}return r.object=o,r},clone:function(e){return(new this.constructor).copy(this,e)},copy:function(e,t){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)for(t=0;t<e.children.length;t++)this.add(e.children[t].clone());return this}}),l.prototype=Object.assign(Object.create(u.prototype),{constructor:l,isCamera:!0,copy:function(e,t){return u.prototype.copy.call(this,e,t),this.matrixWorldInverse.copy(e.matrixWorldInverse),this.projectionMatrix.copy(e.projectionMatrix),this},getWorldDirection:(Jo=new j,function(e){return void 0===e&&(console.warn("THREE.Camera: .getWorldDirection() target is now required"),e=new _e),this.getWorldQuaternion(Jo),e.set(0,0,-1).applyQuaternion(Jo)}),updateMatrixWorld:function(e){u.prototype.updateMatrixWorld.call(this,e),this.matrixWorldInverse.getInverse(this.matrixWorld)},clone:function(){return(new this.constructor).copy(this)}}),p.prototype=Object.assign(Object.create(l.prototype),{constructor:p,isOrthographicCamera:!0,copy:function(e,t){return l.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},setViewOffset:function(e,t,i,n,r,o){null===this.view&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=e,this.view.fullHeight=t,this.view.offsetX=i,this.view.offsetY=n,this.view.width=r,this.view.height=o,this.updateProjectionMatrix()},clearViewOffset:function(){null!==this.view&&(this.view.enabled=!1),this.updateProjectionMatrix()},updateProjectionMatrix:function(){var e=(this.right-this.left)/(2*this.zoom),t=(this.top-this.bottom)/(2*this.zoom),i=(this.right+this.left)/2,n=(this.top+this.bottom)/2,r=i-e;if(i+=e,e=n+t,t=n-t,null!==this.view&&this.view.enabled){i=this.zoom/(this.view.width/this.view.fullWidth),t=this.zoom/(this.view.height/this.view.fullHeight);var o=(this.right-this.left)/this.view.width;n=(this.top-this.bottom)/this.view.height,i=(r+=this.view.offsetX/i*o)+this.view.width/i*o,t=(e-=this.view.offsetY/t*n)-this.view.height/t*n}
1this.projectionMatrix.makeOrthographic(r,i,e,t,this.near,this.far)},toJSON:function(e){return(e=u.prototype.toJSON.call(this,e)).object.zoom=this.zoom,e.object.left=this.left,e.object.right=this.right,e.object.top=this.top,e.object.bottom=this.bottom,e.object.near=this.near,e.object.far=this.far,null!==this.view&&(e.object.view=Object.assign({},this.view)),e}}),Object.assign(U.prototype,{clone:function(){return(new this.constructor).copy(this)},copy:function(e){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;for(var t=0,i=e.vertexNormals.length;t<i;t++)this.vertexNormals[t]=e.vertexNormals[t].clone();for(t=0,i=e.vertexColors.length;t<i;t++)this.vertexColors[t]=e.vertexColors[t].clone();return this}});var Qo,Ko,ea,ta,ia,na,ra,oa=0;T.prototype=Object.assign(Object.create(t.prototype),{constructor:T,isGeometry:!0,applyMatrix:function(e){for(var t=(new g).getNormalMatrix(e),i=0,n=this.vertices.length;i<n;i++)this.vertices[i].applyMatrix4(e);for(i=0,n=this.faces.length;i<n;i++){(e=this.faces[i]).normal.applyMatrix3(t).normalize();for(var r=0,o=e.vertexNormals.length;r<o;r++)e.vertexNormals[r].applyMatrix3(t).normalize()}return null!==this.boundingBox&&this.computeBoundingBox(),null!==this.boundingSphere&&this.computeBoundingSphere(),this.normalsNeedUpdate=this.verticesNeedUpdate=!0,this},rotateX:(ra=new we,function(e){return ra.makeRotationX(e),this.applyMatrix(ra),this}),rotateY:(na=new we,function(e){return na.makeRotationY(e),this.applyMatrix(na),this}),rotateZ:(ia=new we,function(e){return ia.makeRotationZ(e),this.applyMatrix(ia),this}),translate:(ta=new we,function(e,t,i){return ta.makeTranslation(e,t,i),this.applyMatrix(ta),this}),scale:(ea=new we,function(e,t,i){return ea.makeScale(e,t,i),this.applyMatrix(ea),this}),lookAt:(Ko=new u,function(e){Ko.lookAt(e),Ko.updateMatrix(),this.applyMatrix(Ko.matrix)}),fromBufferGeometry:function(e){function t(e,t,i,n){n=new U(e,t,i,void 0!==a?[u[e].clone(),u[t].clone(),u[i].clone()]:[],void 0!==s?[r.colors[e].clone(),r.colors[t].clone(),r.colors[i].clone()]:[],n),r.faces.push(n),void 0!==l&&r.faceVertexUvs[0].push([h[e].clone(),h[t].clone(),h[i].clone()]),void 0!==c&&r.faceVertexUvs[1].push([d[e].clone(),d[t].clone(),d[i].clone()])}var r=this,i=null!==e.index?e.index.array:void 0,n=e.attributes,o=n.position.array,a=void 0!==n.normal?n.normal.array:void 0,s=void 0!==n.color?n.color.array:void 0,l=void 0!==n.uv?n.uv.array:void 0,c=void 0!==n.uv2?n.uv2.array:void 0;void 0!==c&&(this.faceVertexUvs[1]=[]);for(var u=[],h=[],d=[],p=n=0;n<o.length;n+=3,p+=2)r.vertices.push(new _e(o[n],o[n+1],o[n+2])),void 0!==a&&u.push(new _e(a[n],a[n+1],a[n+2])),void 0!==s&&r.colors.push(new _(s[n],s[n+1],s[n+2])),void 0!==l&&h.push(new $(l[p],l[p+1])),void 0!==c&&d.push(new $(c[p],c[p+1]));var f=e.groups;if(0<f.length)for(n=0;n<f.length;n++){var m=(o=f[n]).start;for(p=m,m+=o.count;p<m;p+=3)void 0!==i?t(i[p],i[p+1],i[p+2],o.materialIndex):t(p,p+1,p+2,o.materialIndex)}else if(void 0!==i)for(n=0;n<i.length;n+=3)t(i[n],i[n+1],i[n+2]);else for(n=0;n<o.length/3;n+=3)t(n,n+1,n+2);return this.computeFaceNormals(),null!==e.boundingBox&&(this.boundingBox=e.boundingBox.clone()),null!==e.boundingSphere&&(this.boundingSphere=e.boundingSphere.clone()),this},center:(Qo=new _e,function(){return this.computeBoundingBox(),this.boundingBox.getCenter(Qo).negate(),this.translate(Qo.x,Qo.y,Qo.z),this}),normalize:function(){this.computeBoundingSphere();var e=this.boundingSphere.center,t=this.boundingSphere.radius;t=0===t?1:1/t;var i=new we;return i.set(t,0,0,-t*e.x,0,t,0,-t*e.y,0,0,t,-t*e.z,0,0,0,1),this.applyMatrix(i),this},computeFaceNormals:function(){for(var e=new _e,t=new _e,i=0,n=this.faces.length;i<n;i++){var r=this.faces[i],o=this.vertices[r.a],a=this.vertices[r.b];e.subVectors(this.vertices[r.c],a),t.subVectors(o,a),e.cross(t),e.normalize(),r.normal.copy(e)}},computeVertexNormals:function(e){var t;void 0===e&&(e=!0);var i=Array(this.vertices.length),n=0;for(t=this.vertices.length;n<t;n++)i[n]=new _e;if(e){var r=new _e,o=new _e;for(e=0,n=this.faces.length;e<n;e++){t=this.faces[e];var a=this.vertices[t.a],s=this.vertices[t.b],l=this.vertices[t.c];r.subVectors(l,s),o.subVectors(a,s),r.cross(o),i[t.a].add(r),i[t.b].add(r),i[t.c].add(r)}}else for(this.computeFaceNormals(),e=0,n=this.faces.length;e<n;e++)i[(t=this.faces[e]).a].add(t.normal),i[t.b].add(t.normal),i[t.c].add(t.normal);for(n=0,t=this.vertices.length;n<t;n++)i[n].normalize();for(e=0,n=this.faces.length;e<n;
1e++)3===(a=(t=this.faces[e]).vertexNormals).length?(a[0].copy(i[t.a]),a[1].copy(i[t.b]),a[2].copy(i[t.c])):(a[0]=i[t.a].clone(),a[1]=i[t.b].clone(),a[2]=i[t.c].clone());0<this.faces.length&&(this.normalsNeedUpdate=!0)},computeFlatVertexNormals:function(){var e;this.computeFaceNormals();var t=0;for(e=this.faces.length;t<e;t++){var i=this.faces[t],n=i.vertexNormals;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())}0<this.faces.length&&(this.normalsNeedUpdate=!0)},computeMorphNormals:function(){var e,t,i=0;for(t=this.faces.length;i<t;i++){var n=this.faces[i];n.__originalFaceNormal?n.__originalFaceNormal.copy(n.normal):n.__originalFaceNormal=n.normal.clone(),n.__originalVertexNormals||(n.__originalVertexNormals=[]);var r=0;for(e=n.vertexNormals.length;r<e;r++)n.__originalVertexNormals[r]?n.__originalVertexNormals[r].copy(n.vertexNormals[r]):n.__originalVertexNormals[r]=n.vertexNormals[r].clone()}var o=new T;for(o.faces=this.faces,r=0,e=this.morphTargets.length;r<e;r++){if(!this.morphNormals[r]){this.morphNormals[r]={},this.morphNormals[r].faceNormals=[],this.morphNormals[r].vertexNormals=[],n=this.morphNormals[r].faceNormals;var a=this.morphNormals[r].vertexNormals;for(i=0,t=this.faces.length;i<t;i++){var s=new _e,l={a:new _e,b:new _e,c:new _e};n.push(s),a.push(l)}}for(a=this.morphNormals[r],o.vertices=this.morphTargets[r].vertices,o.computeFaceNormals(),o.computeVertexNormals(),i=0,t=this.faces.length;i<t;i++)n=this.faces[i],s=a.faceNormals[i],l=a.vertexNormals[i],s.copy(n.normal),l.a.copy(n.vertexNormals[0]),l.b.copy(n.vertexNormals[1]),l.c.copy(n.vertexNormals[2])}for(i=0,t=this.faces.length;i<t;
1i++)(n=this.faces[i]).normal=n.__originalFaceNormal,n.vertexNormals=n.__originalVertexNormals},computeBoundingBox:function(){null===this.boundingBox&&(this.boundingBox=new i),this.boundingBox.setFromPoints(this.vertices)},computeBoundingSphere:function(){null===this.boundingSphere&&(this.boundingSphere=new a),this.boundingSphere.setFromPoints(this.vertices)},merge:function(e,t,i){if(e&&e.isGeometry){var n,r=this.vertices.length,o=this.vertices,a=e.vertices,s=this.faces,l=e.faces,c=this.faceVertexUvs[0],u=e.faceVertexUvs[0],h=this.colors,d=e.colors;void 0===i&&(i=0),void 0!==t&&(n=(new g).getNormalMatrix(t)),e=0;for(var p=a.length;e<p;e++){var f=a[e].clone();void 0!==t&&f.applyMatrix4(t),o.push(f)}for(e=0,p=d.length;e<p;e++)h.push(d[e].clone());for(e=0,p=l.length;e<p;e++){var m=(a=l[e]).vertexNormals;for(d=a.vertexColors,(h=new U(a.a+r,a.b+r,a.c+r)).normal.copy(a.normal),void 0!==n&&h.normal.applyMatrix3(n).normalize(),t=0,o=m.length;t<o;t++)f=m[t].clone(),void 0!==n&&f.applyMatrix3(n).normalize(),h.vertexNormals.push(f);for(h.color.copy(a.color),t=0,o=d.length;t<o;t++)f=d[t],h.vertexColors.push(f.clone());h.materialIndex=a.materialIndex+i,s.push(h)}for(e=0,p=u.length;e<p;e++)if(n=[],void 0!==(i=u[e])){for(t=0,o=i.length;t<o;t++)n.push(i[t].clone());c.push(n)}}else console.error("THREE.Geometry.merge(): geometry not an instance of THREE.Geometry.",e)},mergeMesh:function(e){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)},mergeVertices:function(){var e,t={},i=[],n=[],r=Math.pow(10,4),o=0;for(e=this.vertices.length;o<e;o++){var a=this.vertices[o];void 0===t[a=Math.round(a.x*r)+"_"+Math.round(a.y*r)+"_"+Math.round(a.z*r)]?(t[a]=o,i.push(this.vertices[o]),n[o]=i.length-1):n[o]=n[t[a]]}for(t=[],o=0,e=this.faces.length;o<e;o++)for((r=this.faces[o]).a=n[r.a],r.b=n[r.b],r.c=n[r.c],r=[r.a,r.b,r.c],a=0;a<3;a++)if(r[a]===r[(a+1)%3]){t.push(o);break}for(o=t.length-1;0<=o;o--)for(r=t[o],this.faces.splice(r,1),n=0,e=this.faceVertexUvs.length;n<e;n++)this.faceVertexUvs[n].splice(r,1);return o=this.vertices.length-i.length,this.vertices=i,o},setFromPoints:function(e){this.vertices=[];for(var t=0,i=e.length;t<i;t++){var n=e[t];this.vertices.push(new _e(n.x,n.y,n.z||0))}return this},sortFacesByMaterialIndex:function(){for(var e=this.faces,t=e.length,i=0;i<t;i++)e[i]._id=i;e.sort(function(e,t){return e.materialIndex-t.materialIndex});var n,r,o=this.faceVertexUvs[0],a=this.faceVertexUvs[1];for(o&&o.length===t&&(n=[]),a&&a.length===t&&(r=[]),i=0;i<t;i++){var s=e[i]._id;n&&n.push(o[s]),r&&r.push(a[s])}n&&(this.faceVertexUvs[0]=n),r&&(this.faceVertexUvs[1]=r)},toJSON:function(){function e(e,t,i){return i?e|1<<t:e&~(1<<t)}function t(e){var t=e.x.toString()+e.y.toString()+e.z.toString();return void 0!==c[t]||(c[t]=l.length/3,l.push(e.x,e.y,e.z)),c[t]}function i(e){var t=e.r.toString()+e.g.toString()+e.b.toString();return void 0!==h[t]||(h[t]=u.length,u.push(e.getHex())),h[t]}function n(e){var t=e.x.toString()+e.y.toString();return void 0!==p[t]||(p[t]=d.length/2,d.push(e.x,e.y)),p[t]}var r={metadata:{version:4.5,type:"Geometry",generator:"Geometry.toJSON"}};if(r.uuid=this.uuid,r.type=this.type,""!==this.name&&(r.name=this.name),void 0!==this.parameters){var o,a=this.parameters;for(o in a)void 0!==a[o]&&(r[o]=a[o]);return r}for(a=[],o=0;o<this.vertices.length;o++){var s=this.vertices[o];a.push(s.x,s.y,s.z)}s=[];var l=[],c={},u=[],h={},d=[],p={};for(o=0;o<this.faces.length;o++){var f=this.faces[o],m=void 0!==this.faceVertexUvs[0][o],g=0<f.normal.length(),v=0<f.vertexNormals.length,y=1!==f.color.r||1!==f.color.g||1!==f.color.b,x=0<f.vertexColors.length,b=0;b=e(b=e(b=e(b=e(b=e(b=e(b=e(b=e(b,0,0),1,!0),2,!1),3,m),4,g),5,v),6,y),7,x),s.push(b),s.push(f.a,f.b,f.c),s.push(f.materialIndex),m&&(m=this.faceVertexUvs[0][o],s.push(n(m[0]),n(m[1]),n(m[2]))),g&&s.push(t(f.normal)),v&&(g=f.vertexNormals,s.push(t(g[0]),t(g[1]),t(g[2]))),y&&s.push(i(f.color)),x&&(f=f.vertexColors,s.push(i(f[0]),i(f[1]),i(f[2])))}return r.data={},r.data.vertices=a,r.data.normals=l,0<u.length&&(r.data.colors=u),0<d.length&&(r.data.uvs=[d]),r.data.faces=s,r},clone:function(){return(new T).copy(this)},copy:function(e){var t,i,n;this.vertices=[],this.colors=[],this.faces=[],this.faceVertexUvs=[[]],this.morphTargets=[],this.morphNormals=[],this.skinWeights=[],this.skinIndices=[],this.lineDistances=[],this.boundingSphere=this.boundingBox=null,this.name=e.name;var r=e.vertices,o=0;for(t=r.length;o<t;o++)this.vertices.push(r[o].clone());for(o=0,t=(r=e.colors).length;o<t;o++)this.colors.push(r[o].clone());for(o=0,t=(r=e.faces).length;o<t;o++)this.faces.push(r[o].clone());for(o=0,t=e.faceVertexUvs.length;o<t;o++){var a=e.faceVertexUvs[o];for(void 0===this.faceVertexUvs[o]&&(this.faceVertexUvs[o]=[]),r=0,i=a.length;r<i;r++){var s=a[r],l=[],c=0;for(n=s.length;c<n;
1c++)l.push(s[c].clone());this.faceVertexUvs[o].push(l)}}for(o=0,t=(c=e.morphTargets).length;o<t;o++){if((n={}).name=c[o].name,void 0!==c[o].vertices)for(n.vertices=[],r=0,i=c[o].vertices.length;r<i;r++)n.vertices.push(c[o].vertices[r].clone());if(void 0!==c[o].normals)for(n.normals=[],r=0,i=c[o].normals.length;r<i;r++)n.normals.push(c[o].normals[r].clone());this.morphTargets.push(n)}for(o=0,t=(c=e.morphNormals).length;o<t;o++){if(n={},void 0!==c[o].vertexNormals)for(n.vertexNormals=[],r=0,i=c[o].vertexNormals.length;r<i;r++)a=c[o].vertexNormals[r],(s={}).a=a.a.clone(),s.b=a.b.clone(),s.c=a.c.clone(),n.vertexNormals.push(s);if(void 0!==c[o].faceNormals)for(n.faceNormals=[],r=0,i=c[o].faceNormals.length;r<i;r++)n.faceNormals.push(c[o].faceNormals[r].clone());this.morphNormals.push(n)}for(o=0,t=(r=e.skinWeights).length;o<t;o++)this.skinWeights.push(r[o].clone());for(o=0,t=(r=e.skinIndices).length;o<t;o++)this.skinIndices.push(r[o].clone());for(o=0,t=(r=e.lineDistances).length;o<t;o++)this.lineDistances.push(r[o]);return null!==(o=e.boundingBox)&&(this.boundingBox=o.clone()),null!==(o=e.boundingSphere)&&(this.boundingSphere=o.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},dispose:function(){this.dispatchEvent({type:"dispose"})}}),Object.defineProperty(y.prototype,"needsUpdate",{set:function(e){!0===e&&this.version++}}),Object.assign(y.prototype,{isBufferAttribute:!0,onUploadCallback:function(){},setArray:function(e){if(Array.isArray(e))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.count=void 0!==e?e.length/this.itemSize:0,this.array=e},setDynamic:function(e){return this.dynamic=e,this},copy:function(e){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},copyAt:function(e,t,i){e*=this.itemSize,i*=t.itemSize;for(var n=0,r=this.itemSize;n<r;n++)this.array[e+n]=t.array[i+n];return this},copyArray:function(e){return this.array.set(e),this},copyColorsArray:function(e){for(var t=this.array,i=0,n=0,r=e.length;n<r;n++){var o=e[n];void 0===o&&(console.warn("THREE.BufferAttribute.copyColorsArray(): color is undefined",n),o=new _),t[i++]=o.r,t[i++]=o.g,t[i++]=o.b}return this},copyVector2sArray:function(e){for(var t=this.array,i=0,n=0,r=e.length;n<r;n++){var o=e[n];void 0===o&&(console.warn("THREE.BufferAttribute.copyVector2sArray(): vector is undefined",n),o=new $),t[i++]=o.x,t[i++]=o.y}return this},copyVector3sArray:function(e){for(var t=this.array,i=0,n=0,r=e.length;n<r;n++){var o=e[n];void 0===o&&(console.warn("THREE.BufferAttribute.copyVector3sArray(): vector is undefined",n),o=new _e),t[i++]=o.x,t[i++]=o.y,t[i++]=o.z}return this},copyVector4sArray:function(e){for(var t=this.array,i=0,n=0,r=e.length;n<r;n++){var o=e[n];void 0===o&&(console.warn("THREE.BufferAttribute.copyVector4sArray(): vector is undefined",n),o=new Te),t[i++]=o.x,t[i++]=o.y,t[i++]=o.z,t[i++]=o.w}return this},set:function(e,t){return void 0===t&&(t=0),this.array.set(e,t),this},getX:function(e){return this.array[e*this.itemSize]},setX:function(e,t){return this.array[e*this.itemSize]=t,this},getY:function(e){return this.array[e*this.itemSize+1]},setY:function(e,t){return this.array[e*this.itemSize+1]=t,this},getZ:function(e){return this.array[e*this.itemSize+2]},setZ:function(e,t){return this.array[e*this.itemSize+2]=t,this},getW:function(e){return this.array[e*this.itemSize+3]},setW:function(e,t){return this.array[e*this.itemSize+3]=t,this},setXY:function(e,t,i){return e*=this.itemSize,this.array[e+0]=t,this.array[e+1]=i,this},setXYZ:function(e,t,i,n){return e*=this.itemSize,this.array[e+0]=t,this.array[e+1]=i,this.array[e+2]=n,this},setXYZW:function(e,t,i,n,r){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},onUpload:function(e){return this.onUploadCallback=e,this},clone:function(){return new this.constructor(this.array,this.itemSize).copy(this)}}),(s.prototype=Object.create(y.prototype)).constructor=s,(c.prototype=Object.create(y.prototype)).constructor=c,(h.prototype=Object.create(y.prototype)).constructor=h,(f.prototype=Object.create(y.prototype)).constructor=f,(m.prototype=Object.create(y.prototype)).constructor=m,(x.prototype=Object.create(y.prototype)).constructor=x,(b.prototype=Object.create(y.prototype)).constructor=b,(q.prototype=Object.create(y.prototype)).constructor=q,(w.prototype=Object.create(y.prototype)).constructor=w,Object.assign(E.prototype,{computeGroups:function(e){var t=[],i=void 0;e=e.faces;for(var n=0;n<e.length;n++){var r=e[n];if(r.materialIndex!==i){i=r.materialIndex,void 0!==o&&(o.count=3*n-o.start,t.push(o));var o={start:3*n,materialIndex:i}}}void 0!==o&&(o.count=3*n-o.start,t.push(o)),this.groups=t},fromGeometry:function(e){var t=e.faces,i=e.vertices,n=e.faceVertexUvs,r=n[0]&&0<n[0].length,o=n[1]&&0<n[1].length,a=e.morphTargets,s=a.length;if(0<s){for(var l=[],c=0;c<s;c++)l[c]=[];this.morphTargets.position=l}var u=e.morphNormals,h=u.length;if(0<h){var d=[];for(c=0;c<h;c++)d[c]=[];this.morphTargets.normal=d}var p=e.skinIndices,f=e.skinWeights,m=p.length===i.length,g=f.length===i.length;for(c=0;c<t.length;c++){var v=t[c];this.vertices.push(i[v.a],i[v.b],i[v.c]);var y=v.vertexNormals;for(3===y.length?this.normals.push(y[0],y[1],y[2]):(y=v.normal,this.normals.push(y,y,y)),3===(y=v.vertexColors).length?this.colors.push(y[0],y[1],y[2]):(y=v.color,this.colors.push(y,y,y)),!0===r&&(void 0!==(y=n[0][c])?this.uvs.push(y[0],y[1],y[2]):(console.warn("THREE.DirectGeometry.fromGeometry(): Undefined vertexUv ",c),this.uvs.push(new $,new $,new $))),!0===o&&(void 0!==(y=n[1][c])?this.uvs2.push(y[0],y[1],y[2]):(console.warn("THREE.DirectGeometry.fromGeometry(): Undefined vertexUv2 ",c),this.uvs2.push(new $,new $,new $))),y=0;y<s;y++){var x=a[y].vertices;l[y].push(x[v.a],x[v.b],x[v.c])}for(y=0;y<h;y++)x=u[y].vertexNormals[c],d[y].push(x.a,x.b,x.c);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])}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}});var aa,sa,la,ca,ua,ha,da,pa,fa,ma,ga=1;L.prototype=Object.assign(Object.create(t.prototype),{constructor:L,isBufferGeometry:!0,getIndex:function(){return this.index},setIndex:function(e){Array.isArray(e)?this.index=new(65535<S(e)?b:m)(e,1):this.index=e},addAttribute:function(e,t,i){if(t&&t.isBufferAttribute||t&&t.isInterleavedBufferAttribute){if("index"!==e)return this.attributes[e]=t,this;console.warn("THREE.BufferGeometry.addAttribute: Use .setIndex() for index attribute."),this.setIndex(t)}else console.warn("THREE.BufferGeometry: .addAttribute() now expects ( name, attribute )."),this.addAttribute(e,new y(t,i))},getAttribute:function(e){return this.attributes[e]},removeAttribute:function(e){return delete this.attributes[e],this},addGroup:function(e,t,i){this.groups.push({start:e,count:t,materialIndex:void 0!==i?i:0})},clearGroups:function(){this.groups=[]},setDrawRange:function(e,t){this.drawRange.start=e,this.drawRange.count=t},applyMatrix:function(e){var t=this.attributes.position;return void 0!==t&&(e.applyToBufferAttribute(t),t.needsUpdate=!0),void 0!==(t=this.attributes.normal)&&((new g).getNormalMatrix(e).applyToBufferAttribute(t),t.needsUpdate=!0),null!==this.boundingBox&&this.computeBoundingBox(),null!==this.boundingSphere&&this.computeBoundingSphere(),this},rotateX:(ma=new we,function(e){return ma.makeRotationX(e),this.applyMatrix(ma),this}),rotateY:(fa=new we,function(e){return fa.makeRotationY(e),this.applyMatrix(fa),this}),rotateZ:(pa=new we,function(e){return pa.makeRotationZ(e),this.applyMatrix(pa),this}),translate:(da=new we,function(e,t,i){return da.makeTranslation(e,t,i),this.applyMatrix(da),this}),scale:(ha=new we,function(e,t,i){return ha.makeScale(e,t,i),this.applyMatrix(ha),this}),lookAt:(ua=new u,function(e){ua.lookAt(e),ua.updateMatrix(),this.applyMatrix(ua.matrix
1)}),center:(ca=new _e,function(){return this.computeBoundingBox(),this.boundingBox.getCenter(ca).negate(),this.translate(ca.x,ca.y,ca.z),this}),setFromObject:function(e){var t=e.geometry;if(e.isPoints||e.isLine){e=new q(3*t.vertices.length,3);var i=new q(3*t.colors.length,3);this.addAttribute("position",e.copyVector3sArray(t.vertices)),this.addAttribute("color",i.copyColorsArray(t.colors)),t.lineDistances&&t.lineDistances.length===t.vertices.length&&(e=new q(t.lineDistances.length,1),this.addAttribute("lineDistance",e.copyArray(t.lineDistances))),null!==t.boundingSphere&&(this.boundingSphere=t.boundingSphere.clone()),null!==t.boundingBox&&(this.boundingBox=t.boundingBox.clone())}else e.isMesh&&t&&t.isGeometry&&this.fromGeometry(t);return this},setFromPoints:function(e){for(var t=[],i=0,n=e.length;i<n;i++){var r=e[i];t.push(r.x,r.y,r.z||0)}return this.addAttribute("position",new q(t,3)),this},updateFromObject:function(e){var t=e.geometry;if(e.isMesh){var i=t.__directGeometry;if(!0===t.elementsNeedUpdate&&(i=void 0,t.elementsNeedUpdate=!1),void 0===i)return this.fromGeometry(t);i.verticesNeedUpdate=t.verticesNeedUpdate,i.normalsNeedUpdate=t.normalsNeedUpdate,i.colorsNeedUpdate=t.colorsNeedUpdate,i.uvsNeedUpdate=t.uvsNeedUpdate,i.groupsNeedUpdate=t.groupsNeedUpdate,t.verticesNeedUpdate=!1,t.normalsNeedUpdate=!1,t.colorsNeedUpdate=!1,t.uvsNeedUpdate=!1,t.groupsNeedUpdate=!1,t=i}return!0===t.verticesNeedUpdate&&(void 0!==(i=this.attributes.position)&&(i.copyVector3sArray(t.vertices),i.needsUpdate=!0),t.verticesNeedUpdate=!1),!0===t.normalsNeedUpdate&&(void 0!==(i=this.attributes.normal)&&(i.copyVector3sArray(t.normals),i.needsUpdate=!0),t.normalsNeedUpdate=!1),!0===t.colorsNeedUpdate&&(void 0!==(i=this.attributes.color)&&(i.copyColorsArray(t.colors),i.needsUpdate=!0),t.colorsNeedUpdate=!1),t.uvsNeedUpdate&&(void 0!==(i=this.attributes.uv)&&(i.copyVector2sArray(t.uvs),i.needsUpdate=!0),t.uvsNeedUpdate=!1),t.lineDistancesNeedUpdate&&(void 0!==(i=this.attributes.lineDistance)&&(i.copyArray(t.lineDistances),i.needsUpdate=!0),t.lineDistancesNeedUpdate=!1),t.groupsNeedUpdate&&(t.computeGroups(e.geometry),this.groups=t.groups,t.groupsNeedUpdate=!1),this},fromGeometry:function(e){return e.__directGeometry=(new E).fromGeometry(e),this.fromDirectGeometry(e.__directGeometry)},fromDirectGeometry:function(e){var t=new Float32Array(3*e.vertices.length);for(var i in this.addAttribute("position",new y(t,3).copyVector3sArray(e.vertices)),0<e.normals.length&&(t=new Float32Array(3*e.normals.length),this.addAttribute("normal",new y(t,3).copyVector3sArray(e.normals))),0<e.colors.length&&(t=new Float32Array(3*e.colors.length),this.addAttribute("color",new y(t,3).copyColorsArray(e.colors))),0<e.uvs.length&&(t=new Float32Array(2*e.uvs.length),this.addAttribute("uv",new y(t,2).copyVector2sArray(e.uvs))),0<e.uvs2.length&&(t=new Float32Array(2*e.uvs2.length),this.addAttribute("uv2",new y(t,2).copyVector2sArray(e.uvs2))),this.groups=e.groups,e.morphTargets){t=[];for(var n=e.morphTargets[i],r=0,o=n.length;r<o;r++){var a=n[r],s=new q(3*a.length,3);t.push(s.copyVector3sArray(a))}this.morphAttributes[i]=t}return 0<e.skinIndices.length&&(i=new q(4*e.skinIndices.length,4),this.addAttribute("skinIndex",i.copyVector4sArray(e.skinIndices))),0<e.skinWeights.length&&(i=new q(4*e.skinWeights.length,4),this.addAttribute("skinWeight",i.copyVector4sArray(e.skinWeights))),null!==e.boundingSphere&&(this.boundingSphere=e.boundingSphere.clone()),null!==e.boundingBox&&(this.boundingBox=e.boundingBox.clone()),this},computeBoundingBox:function(){null===this.boundingBox&&(this.boundingBox=new i);var e=this.attributes.position;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)},computeBoundingSphere:(sa=new i,la=new _e,function(){null===this.boundingSphere&&(this.boundingSphere=new a);var e=this.attributes.position;if(e){var t=this.boundingSphere.center;sa.setFromBufferAttribute(e),sa.getCenter(t);for(var i=0,n=0,r=e.count;n<r;n++)la.x=e.getX(n),la.y=e.getY(n),la.z=e.getZ(n),i=Math.max(i,t.distanceToSquared(la));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)}}),computeFaceNormals:function(){},computeVertexNormals:function(){var e=this.index,t=this.attributes,i=this.groups;if(t.position){var n=t.position.array;if(void 0===t.normal)this.addAttribute("normal",new y(new Float32Array(n.length),3));else for(var r=t.normal.array,o=0,a=r.length;o<a;o++)r[o]=0;r=t.normal.array;var s=new _e,l=new _e,c=new _e,u=new _e,h=new _e;if(e){e=e.array,0===i.length&&this.addGroup(0,e.length);for(var d=0,p=i.length;d<p;++d){a=(o=i[d]).start;var f=o.count;for(o=a,a+=f;o<a;o+=3){f=3*e[o+0];var m=3*e[o+1],g=3*e[o+2];s.fromArray(n,f),l.fromArray(n,m),c.fromArray(n,g),u.subVectors(c,l),h.subVectors(s,l),u.cross(h),r[f]+=u.x,r[f+1]+=u.y,r[f+2]+=u.z,r[m]+=u.x,r[m+1]+=u.y,r[m+2]+=u.z,r[g]+=u.x,r[g+1
1]+=u.y,r[g+2]+=u.z}}}else for(o=0,a=n.length;o<a;o+=9)s.fromArray(n,o),l.fromArray(n,o+3),c.fromArray(n,o+6),u.subVectors(c,l),h.subVectors(s,l),u.cross(h),r[o]=u.x,r[o+1]=u.y,r[o+2]=u.z,r[o+3]=u.x,r[o+4]=u.y,r[o+5]=u.z,r[o+6]=u.x,r[o+7]=u.y,r[o+8]=u.z;this.normalizeNormals(),t.normal.needsUpdate=!0}},merge:function(e,t){if(e&&e.isBufferGeometry){void 0===t&&(t=0,console.warn("THREE.BufferGeometry.merge(): Overwriting original geometry, starting at offset=0. Use BufferGeometryUtils.mergeBufferGeometries() for lossless merge."));var i,n=this.attributes;for(i in n)if(void 0!==e.attributes[i]){var r=n[i].array,o=e.attributes[i],a=o.array,s=0;for(o=o.itemSize*t;s<a.length;s++,o++)r[o]=a[s]}return this}console.error("THREE.BufferGeometry.merge(): geometry not an instance of THREE.BufferGeometry.",e)},normalizeNormals:(aa=new _e,function(){for(var e=this.attributes.normal,t=0,i=e.count;t<i;t++)aa.x=e.getX(t),aa.y=e.getY(t),aa.z=e.getZ(t),aa.normalize(),e.setXYZ(t,aa.x,aa.y,aa.z)}),toNonIndexed:function(){if(null===this.index)return console.warn("THREE.BufferGeometry.toNonIndexed(): Geometry is already non-indexed."),this;var e,t=new L,i=this.index.array,n=this.attributes;for(e in n){var r=n[e],o=r.array,a=r.itemSize,s=new o.constructor(i.length*a),l=0;r=0;for(var c=i.length;r<c;r++)for(var u=i[r]*a,h=0;h<a;h++)s[l++]=o[u++];t.addAttribute(e,new y(s,a))}for(r=0,c=(i=this.groups).length;r<c;r++)n=i[r],t.addGroup(n.start,n.count,n.materialIndex);return t},toJSON:function(){var e={metadata:{version:4.5,type:"BufferGeometry",generator:"BufferGeometry.toJSON"}};if(e.uuid=this.uuid,e.type=this.type,""!==this.name&&(e.name=this.name),void 0!==this.parameters){var t=this.parameters;for(r in t)void 0!==t[r]&&(e[r]=t[r]);return e}e.data={attributes:{}};var i=this.index;for(r in null!==i&&(t=Array.prototype.slice.call(i.array),e.data.index={type:i.array.constructor.name,array:t}),i=this.attributes){var n=i[r];t=Array.prototype.slice.call(n.array),e.data.attributes[r]={itemSize:n.itemSize,type:n.array.constructor.name,array:t,normalized:n.normalized}}var r=this.groups;return 0<r.length&&(e.data.groups=JSON.parse(JSON.stringify(r))),null!==(r=this.boundingSphere)&&(e.data.boundingSphere={center:r.center.toArray(),radius:r.radius}),e},clone:function(){return(new L).copy(this)},copy:function(e){var t;this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingSphere=this.boundingBox=null,this.name=e.name;var i=e.index;for(a in null!==i&&this.setIndex(i.clone()),i=e.attributes)this.addAttribute(a,i[a].clone());var n=e.morphAttributes;for(a in n){var r=[],o=n[a];for(i=0,t=o.length;i<t;i++)r.push(o[i].clone());this.morphAttributes[a]=r}var a=e.groups;for(i=0,t=a.length;i<t;i++)n=a[i],this.addGroup(n.start,n.count,n.materialIndex);return null!==(a=e.boundingBox)&&(this.boundingBox=a.clone()),null!==(a=e.boundingSphere)&&(this.boundingSphere=a.clone()),this.drawRange.start=e.drawRange.start,this.drawRange.count=e.drawRange.count,this},dispose:function(){this.dispatchEvent({type:"dispose"})}}),(M.prototype=Object.create(T.prototype)).constructor=M,(C.prototype=Object.create(L.prototype)).constructor=C,(R.prototype=Object.create(T.prototype)).constructor=R,(P.prototype=Object.create(L.prototype)).constructor=P;var va,ya,xa,ba,wa,_a,Ta,Ea,Sa,Ma,Aa,Ca,La,Ra,Pa,ka,Na,Da,Oa,Ia,Ua,za,Ha,Fa,Ba=0;k.prototype=Object.assign(Object.create(t.prototype),{constructor:k,isMaterial:!0,onBeforeCompile:function(){},setValues:function(e){if(void 0!==e)for(var t in e){var i=e[t];if(void 0===i)console.warn("THREE.Material: '"+t+"' parameter is undefined.");else if("shading"===t)console.warn("THREE."+this.type+": .shading has been removed. Use the boolean .flatShading instead."),this.flatShading=1===i;else{var n=this[t];void 0===n?console.warn("THREE."+this.type+": '"+t+"' is not a property of this material."):n&&n.isColor?n.set(i):n&&n.isVector3&&i&&i.isVector3?n.copy(i):this[t]="overdraw"===t?Number(i):i}}},toJSON:function(e){function t(e){var t,i=[];for(t in e){var n=e[t];delete n.metadata,i.push(n)}return i}var i=void 0===e||"string"==typeof e;i&&(e={textures:{},images:{}});var n={metadata:{version:4.5,type:"Material",generator:"Material.toJSON"}};
1return n.uuid=this.uuid,n.type=this.type,""!==this.name&&(n.name=this.name),this.color&&this.color.isColor&&(n.color=this.color.getHex()),void 0!==this.roughness&&(n.roughness=this.roughness),void 0!==this.metalness&&(n.metalness=this.metalness),this.emissive&&this.emissive.isColor&&(n.emissive=this.emissive.getHex()),1!==this.emissiveIntensity&&(n.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(n.specular=this.specular.getHex()),void 0!==this.shininess&&(n.shininess=this.shininess),void 0!==this.clearCoat&&(n.clearCoat=this.clearCoat),void 0!==this.clearCoatRoughness&&(n.clearCoatRoughness=this.clearCoatRoughness),this.map&&this.map.isTexture&&(n.map=this.map.toJSON(e).uuid),this.alphaMap&&this.alphaMap.isTexture&&(n.alphaMap=this.alphaMap.toJSON(e).uuid),this.lightMap&&this.lightMap.isTexture&&(n.lightMap=this.lightMap.toJSON(e).uuid),this.bumpMap&&this.bumpMap.isTexture&&(n.bumpMap=this.bumpMap.toJSON(e).uuid,n.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(n.normalMap=this.normalMap.toJSON(e).uuid,n.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(n.displacementMap=this.displacementMap.toJSON(e).uuid,n.displacementScale=this.displacementScale,n.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(n.roughnessMap=this.roughnessMap.toJSON(e).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(n.metalnessMap=this.metalnessMap.toJSON(e).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(n.emissiveMap=this.emissiveMap.toJSON(e).uuid),this.specularMap&&this.specularMap.isTexture&&(n.specularMap=this.specularMap.toJSON(e).uuid),this.envMap&&this.envMap.isTexture&&(n.envMap=this.envMap.toJSON(e).uuid,n.reflectivity=this.reflectivity),this.gradientMap&&this.gradientMap.isTexture&&(n.gradientMap=this.gradientMap.toJSON(e).uuid),void 0!==this.size&&(n.size=this.size),void 0!==this.sizeAttenuation&&(n.sizeAttenuation=this.sizeAttenuation),1!==this.blending&&(n.blending=this.blending),!0===this.flatShading&&(n.flatShading=this.flatShading),0!==this.side&&(n.side=this.side),0!==this.vertexColors&&(n.vertexColors=this.vertexColors),this.opacity<1&&(n.opacity=this.opacity),!0===this.transparent&&(n.transparent=this.transparent),n.depthFunc=this.depthFunc,n.depthTest=this.depthTest,n.depthWrite=this.depthWrite,0!==this.rotation&&(n.rotation=this.rotation),1!==this.linewidth&&(n.linewidth=this.linewidth),void 0!==this.dashSize&&(n.dashSize=this.dashSize),void 0!==this.gapSize&&(n.gapSize=this.gapSize),void 0!==this.scale&&(n.scale=this.scale),!0===this.dithering&&(n.dithering=!0),0<this.alphaTest&&(n.alphaTest=this.alphaTest),!0===this.premultipliedAlpha&&(n.premultipliedAlpha=this.premultipliedAlpha),!0===this.wireframe&&(n.wireframe=this.wireframe),1<this.wireframeLinewidth&&(n.wireframeLinewidth=this.wireframeLinewidth),"round"!==this.wireframeLinecap&&(n.wireframeLinecap=this.wireframeLinecap),"round"!==this.wireframeLinejoin&&(n.wireframeLinejoin=this.wireframeLinejoin),!0===this.morphTargets&&(n.morphTargets=!0),!0===this.skinning&&(n.skinning=!0),!1===this.visible&&(n.visible=!1),"{}"!==JSON.stringify(this.userData)&&(n.userData=this.userData),i&&(i=t(e.textures),e=t(e.images),0<i.length&&(n.textures=i),0<e.length&&(n.images=e)),n},clone:function(){return(new this.constructor).copy(this)},copy:function(e){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.clipSh
1adows,this.clipIntersection=e.clipIntersection;var t=e.clippingPlanes,i=null;if(null!==t){var n=t.length;i=Array(n);for(var r=0;r!==n;++r)i[r]=t[r].clone()}return this.clippingPlanes=i,this.shadowSide=e.shadowSide,this},dispose:function(){this.dispatchEvent({type:"dispose"})}}),((N.prototype=Object.create(k.prototype)).constructor=N).prototype.isMeshBasicMaterial=!0,N.prototype.copy=function(e){return k.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},((D.prototype=Object.create(k.prototype)).constructor=D).prototype.isShaderMaterial=!0,D.prototype.copy=function(e){return k.prototype.copy.call(this,e),this.fragmentShader=e.fragmentShader,this.vertexShader=e.vertexShader,this.uniforms=Ao.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},D.prototype.toJSON=function(e){return(e=k.prototype.toJSON.call(this,e)).uniforms=this.uniforms,e.vertexShader=this.vertexShader,e.fragmentShader=this.fragmentShader,e},Object.assign(z.prototype,{set:function(e,t){return this.origin.copy(e),this.direction.copy(t),this},clone:function(){return(new this.constructor).copy(this)},copy:function(e){return this.origin.copy(e.origin),this.direction.copy(e.direction),this},at:function(e,t){return void 0===t&&(console.warn("THREE.Ray: .at() target is now required"),t=new _e),t.copy(this.direction).multiplyScalar(e).add(this.origin)},lookAt:function(e){return this.direction.copy(e).sub(this.origin).normalize(),this},recast:(Aa=new _e,function(e){return this.origin.copy(this.at(e,Aa)),this}),closestPointToPoint:function(e,t){return void 0===t&&(console.warn("THREE.Ray: .closestPointToPoint() target is now required"),t=new _e),t.subVectors(e,this.origin),(e=t.dot(this.direction))<0?t.copy(this.origin):t.copy(this.direction).multiplyScalar(e).add(this.origin)},distanceToPoint:function(e){return Math.sqrt(this.distanceSqToPoint(e))},distanceSqToPoint:(Ma=new _e,function(e){var t=Ma.subVectors(e,this.origin).dot(this.direction);return t<0?this.origin.distanceToSquared(e):(Ma.copy(this.direction).multiplyScalar(t).add(this.origin),Ma.distanceToSquared(e))}),distanceSqToSegment:(Ta=new _e,Ea=new _e,Sa=new _e,function(e,t,i,n){Ta.copy(e).add(t).multiplyScalar(.5),Ea.copy(t).sub(e).normalize(),Sa.copy(this.origin).sub(Ta);var r=.5*e.distanceTo(t),o=-this.direction.dot(Ea),a=Sa.dot(this.direction),s=-Sa.dot(Ea),l=Sa.lengthSq(),c=Math.abs(1-o*o);if(0<c){t=o*a-s;var u=r*c;0<=(e=o*s-a)?-u<=t?t<=u?o=(e*=r=1/c)*(e+o*(t*=r)+2*a)+t*(o*e+t+2*s)+l:(t=r,o=-(e=Math.max(0,-(o*t+a)))*e+t*(t+2*s)+l):(t=-r,o=-(e=Math.max(0,-(o*t+a)))*e+t*(t+2*s)+l):t<=-u?o=-(e=Math.max(0,-(-o*r+a)))*e+(t=0<e?-r:Math.min(Math.max(-r,-s),r))*(t+2*s)+l:t<=u?(e=0,o=(t=Math.min(Math.max(-r,-s),r))*(t+2*s)+l):o=-(e=Math.max(0,-(o*r+a)))*e+(t=0<e?r:Math.min(Math.max(-r,-s),r))*(t+2*s)+l}else t=0<o?-r:r,o=-(e=Math.max(0,-(o*t+a)))*e+t*(t+2*s)+l;return i&&i.copy(this.direction).multiplyScalar(e).add(this.origin),n&&n.copy(Ea).multiplyScalar(t).add(Ta),o}),intersectSphere:(_a=new _e,function(e,t){_a.subVectors(e.center,this.origin);var i=_a.dot(this.direction),n=_a.dot(_a)-i*i;return(e=e.radius*e.radius)<n?null:(n=i-(e=Math.sqrt(e-n)),i+=e,n<0&&i<0?null:n<0?this.at(i,t):this.at(n,t))}),intersectsSphere:function(e){return this.distanceToPoint(e.center)<=e.radius},distanceToPlane:function(e){var t=e.normal.dot(this.direction);return 0===t?0===e.distanceToPoint(this.origin)?0:null:0<=(e=-(this.origin.dot(e.normal)+e.constant)/t)?e:null},intersectPlane:function(e,t){return null===(e=this.distanceToPlane(e))?null:this.at(e,t)},intersectsPlane:function(e){var t=e.distanceToPoint(this.origin);return 0===t||e.normal.dot(this.direction)*t<0},intersectBox:function(e,t){var i=1/this.direction.x,n=1/this.direction.y,r=1/this.direction.z,o=this.origin;if(0<=i){var a=(e.min.x-o.x)*i;i*=e.max.x-o.x}else a=(e.max.x-o.x)*i,i*=e.min.x-o.x;if(0<=n){var s=(e.min.y-o.y)*n;n*=e.max.y-o.y}else s=(e.max.y-o.y)*n,n*=e.min.y-o.y;return n<a||i<s?null:((a<s||a!=a)&&(a=s),(n<i||i!=i)&&(i=n),0<=r?(s=(e.min.z-o.z)*r,e=(e.max.z-o.z)*r):(s=(e.max.z-o.z)*r,e=(e.min.z-o.z)*r),e<a||i<s?null:((a<s||a!=a)&&(a=s),(e<i||i!=i)&&(i=e),i<0?null:this.at(0<=a?a:i,t)))},intersectsBox:(wa=new _e,function(e){return null!==this.intersectBox(e,wa)}),intersectTriangle:(va=new _e,ya=new _e,xa=new _e,ba=new _e,function(e,t,i,n,r){if(ya.subVectors(t,e),xa.subVectors(i,e),ba.crossVectors(ya,xa),0<(t=this.direction.dot(ba))){if(n)return null;n=1}else{if(!(t<0))return null;n=-1,t=-t}return va.subVectors(this.origin,e),(e=n*this.direction.dot(xa.crossVectors(va,xa)))<0?null:(i=n*this.direction.dot(ya.cross(va)))<0||t<e+i?null:(e=-n*va.dot(ba))<0?null:this.at(e/t,r)}),applyMatrix4:function(e){return this.origin.applyMatrix4(e),this.direction.transformDirection(e),this},equals:function(e){return e.origin.equals(this.origin)&&e.direction.equals(this.direction)}}),Object.assign(O.prototype,{set:function(e,t){return this.start.copy(e),this.end.copy(t),this},clone:function(){return(new this.constructor).copy(this)},copy:function(e){return this.start.copy(e.start),this.end.copy(e.end),this},getCenter:function(e){return void 0===e&&(console.warn("THREE.Line3: .getCenter() target is now required"),e=new _e),e.addVectors(this.start,this.end).multiplyScalar(.5)},delta:function(e){return void 0===e&&(console.warn("THREE.Line3: .delta() target is now required"),e=new _e),e.subVectors(this.end,this.start)},distanceSq:function(){return this.start.distanceToSquared(this.end)},distance:function(){return this.start.distanceTo(this.end)},at:function(e,t){return void 0===t&&(console.warn("THREE.Line3: .at(
1) target is now required"),t=new _e),this.delta(t).multiplyScalar(e).add(this.start)},closestPointToPointParameter:(Ca=new _e,La=new _e,function(e,t){return Ca.subVectors(e,this.start),La.subVectors(this.end,this.start),e=La.dot(La),e=La.dot(Ca)/e,t&&(e=oo.clamp(e,0,1)),e}),closestPointToPoint:function(e,t,i){return e=this.closestPointToPointParameter(e,t),void 0===i&&(console.warn("THREE.Line3: .closestPointToPoint() target is now required"),i=new _e),this.delta(i).multiplyScalar(e).add(this.start)},applyMatrix4:function(e){return this.start.applyMatrix4(e),this.end.applyMatrix4(e),this},equals:function(e){return e.start.equals(this.start)&&e.end.equals(this.end)}}),Object.assign(H,{getNormal:(Da=new _e,function(e,t,i,n){return void 0===n&&(console.warn("THREE.Triangle: .getNormal() target is now required"),n=new _e),n.subVectors(i,t),Da.subVectors(e,t),n.cross(Da),0<(e=n.lengthSq())?n.multiplyScalar(1/Math.sqrt(e)):n.set(0,0,0)}),getBarycoord:(Pa=new _e,ka=new _e,Na=new _e,function(e,t,i,n,r){Pa.subVectors(n,t),ka.subVectors(i,t),Na.subVectors(e,t),e=Pa.dot(Pa),t=Pa.dot(ka),i=Pa.dot(Na);var o=ka.dot(ka);n=ka.dot(Na);var a=e*o-t*t;return void 0===r&&(console.warn("THREE.Triangle: .getBarycoord() target is now required"),r=new _e),0===a?r.set(-2,-1,-1):(o=(o*i-t*n)*(a=1/a),e=(e*n-t*i)*a,r.set(1-o-e,e,o))}),containsPoint:(Ra=new _e,function(e,t,i,n){return H.getBarycoord(e,t,i,n,Ra),0<=Ra.x&&0<=Ra.y&&Ra.x+Ra.y<=1})}),Object.assign(H.prototype,{set:function(e,t,i){return this.a.copy(e),this.b.copy(t),this.c.copy(i),this},setFromPointsAndIndices:function(e,t,i,n){return this.a.copy(e[t]),this.b.copy(e[i]),this.c.copy(e[n]),this},clone:function(){return(new this.constructor).copy(this)},copy:function(e){return this.a.copy(e.a),this.b.copy(e.b),this.c.copy(e.c),this},getArea:(Ha=new _e,Fa=new _e,function(){return Ha.subVectors(this.c,this.b),Fa.subVectors(this.a,this.b),.5*Ha.cross(Fa).length()}),getMidpoint:function(e){return void 0===e&&(console.warn("THREE.Triangle: .getMidpoint() target is now required"),e=new _e),e.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)},getNormal:function(e){return H.getNormal(this.a,this.b,this.c,e)},getPlane:function(e){return void 0===e&&(console.warn("THREE.Triangle: .getPlane() target is now required"),e=new _e),e.setFromCoplanarPoints(this.a,this.b,this.c)},getBarycoord:function(e,t){return H.getBarycoord(e,this.a,this.b,this.c,t)},containsPoint:function(e){return H.containsPoint(e,this.a,this.b,this.c)},intersectsBox:function(e){return e.intersectsTriangle(this)},closestPointToPoint:(Oa=new v,Ia=[new O,new O,new O],Ua=new _e,za=new _e,function(e,t){void 0===t&&(console.warn("THREE.Triangle: .closestPointToPoint() target is now required"),t=new _e);var i=1/0;if(Oa.setFromCoplanarPoints(this.a,this.b,this.c),Oa.projectPoint(e,Ua),!0===this.containsPoint(Ua))t.copy(Ua);else for(Ia[0].set(this.a,this.b),Ia[1].set(this.b,this.c),Ia[2].set(this.c,this.a),e=0;e<Ia.length;e++){Ia[e].closestPointToPoint(Ua,!0,za);var n=Ua.distanceToSquared(za);n<i&&(i=n,t.copy(za))}return t}),equals:function(e){return e.a.equals(this.a)&&e.b.equals(this.b)&&e.c.equals(this.c)}}),I.prototype=Object.assign(Object.create(u.prototype),{constructor:I,isMesh:!0,setDrawMode:function(e){this.drawMode=e},copy:function(e){return u.prototype.copy.call(this,e),this.drawMode=e.drawMode,void 0!==e.morphTargetInfluences&&(this.morphTargetInfluences=e.morphTargetInfluences.slice()),void 0!==e.morphTargetDictionary&&(this.morphTargetDictionary=Object.assign({},e.morphTargetDictionary)),this},updateMorphTargets:function(){var e=this.geometry;if(e.isBufferGeometry){e=e.morphAttributes;var t=Object.keys(e);if(0<t.length){var i=e[t[0]];if(void 0!==i)for(this.morphTargetInfluences=[],this.morphTargetDictionary={},e=0,t=i.length;e<t;e++){var n=i[e].name||String(e);this.morphTargetInfluences.push(0),this.morphTargetDictionary[n]=e}}}else if(void 0!==(i=e.morphTargets)&&0<i.length)for(this.morphTargetInfluences=[],this.morphTargetDictionary={},e=0,t=i.length;e<t;e++)n=i[e].name||String(e),this.morphTargetInfluences.push(0),this.morphTargetDictionary[n]=e},raycast:function(){function w(e,t,i,n,r,o,a){return H.getBarycoord(e,t,i,n,s),r.multiplyScalar(s.x),o.multiplyScalar(s.y),a.multiplyScalar(s.z),r.add(o).add(a),r.clone()}function _(e,t,i,n,r,o,a,s){return null===(1===t.side?n.intersectTriangle(a,o,r,!0,s):n.intersectTriangle(r,o,a,2!==t.side,s))?null:(l.copy(s),l.applyMatrix4(e.matrixWorld),(t=i.ray.origin.distanceTo(l))<i.near||t>i.far?null:{distance:t,point:l.clone(),object:e})}function T(e,t,i,n,r,o,a,s){return A.fromBufferAttribute(n,o),C.fromBufferAttribute(n,a),L.fromBufferAttribute(n,s),(e=_(e,e.material,t,i,A,C,L,I))&&(r&&(N.fromBufferAttribute(r,o),D.fromBufferAttribute(r,a),O.fromBufferAttribute(r,s),e.uv=w(I,A,C,L,N,D,O)),r=new
1U(o,a,s),H.getNormal(A,C,L,r.normal),e.face=r,e.faceIndex=o),e}var E=new we,S=new z,M=new a,A=new _e,C=new _e,L=new _e,R=new _e,P=new _e,k=new _e,N=new $,D=new $,O=new $,s=new _e,I=new _e,l=new _e;return function(e,t){var i,n=this.geometry,r=this.material,o=this.matrixWorld;if(void 0!==r&&(null===n.boundingSphere&&n.computeBoundingSphere(),M.copy(n.boundingSphere),M.applyMatrix4(o),!1!==e.ray.intersectsSphere(M)&&(E.getInverse(o),S.copy(e.ray).applyMatrix4(E),null===n.boundingBox||!1!==S.intersectsBox(n.boundingBox))))if(n.isBufferGeometry){r=n.index;var a,s=n.attributes.position;if(o=n.attributes.uv,null!==r){var l=0;for(a=r.count;l<a;l+=3){n=r.getX(l);var c=r.getX(l+1),u=r.getX(l+2);(i=T(this,e,S,s,o,n,c,u))&&(i.faceIndex=Math.floor(l/3),t.push(i))}}else if(void 0!==s)for(l=0,a=s.count;l<a;l+=3)(i=T(this,e,S,s,o,n=l,c=l+1,u=l+2))&&(i.index=n,t.push(i))}else if(n.isGeometry){o=Array.isArray(r),l=n.vertices,a=n.faces,0<(c=n.faceVertexUvs[0]).length&&(s=c);for(var h=0,d=a.length;h<d;h++){var p=a[h];if(void 0!==(i=o?r[p.materialIndex]:r)){c=l[p.a],u=l[p.b];var f=l[p.c];if(!0===i.morphTargets){var m=n.morphTargets,g=this.morphTargetInfluences;A.set(0,0,0),C.set(0,0,0),L.set(0,0,0);for(var v=0,y=m.length;v<y;v++){var x=g[v];if(0!==x){var b=m[v].vertices;A.addScaledVector(R.subVectors(b[p.a],c),x),C.addScaledVector(P.subVectors(b[p.b],u),x),L.addScaledVector(k.subVectors(b[p.c],f),x)}}A.add(c),C.add(u),L.add(f),c=A,u=C,f=L}(i=_(this,i,e,S,c,u,f,I))&&(s&&s[h]&&(m=s[h],N.copy(m[0]),D.copy(m[1]),O.copy(m[2]),i.uv=w(I,c,u,f,N,D,O)),i.face=p,i.faceIndex=h,t.push(i))}}}}}(),clone:function(){return new this.constructor(this.geometry,this.material).copy(this)}}),((B.prototype=Object.create(d.prototype)).constructor=B).prototype.isCubeTexture=!0,Object.defineProperty(B.prototype,"images",{get:function(){return this.image},set:function(e){this.image=e}});var Ga=new d,ja=new B,Va=[],Wa=[],$a=new Float32Array(16),qa=new Float32Array(9);ye.prototype.setValue=function(e,t){for(var i=this.seq,n=0,r=i.length;n!==r;++n){var o=i[n];o.setValue(e,t[o.id])}};var Xa=/([\w\d_]+)(\])?(\[|\.)?/g;Ue.prototype.setValue=function(e,t,i){void 0!==(t=this.map[t])&&t.setValue(e,i,this.renderer)},Ue.prototype.setOptional=function(e,t,i){void 0!==(t=t[i])&&this.setValue(e,i,t)},Ue.upload=function(e,t,i,n){for(var r=0,o=t.length;r!==o;++r){var a=t[r],s=i[a.id];!1!==s.needsUpdate&&a.setValue(e,s.value,n)}},Ue.seqWithValue=function(e,t){for(var i=[],n=0,r=e.length;n!==r;++n){var o=e[n];o.id in t&&i.push(o)}return i};var Ya,Ja,Za,Qa,Ka,es,ts,is,ns,rs,os,as,ss,ls,cs,us,hs,ds,ps=0,fs=0;((tt.prototype=Object.create(k.prototype)).constructor=tt).prototype.isMeshDepthMaterial=!0,tt.prototype.copy=function(e){return k.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},((it.prototype=Object.create(k.prototype)).constructor=it).prototype.isMeshDistanceMaterial=!0,it.prototype.copy=function(e){return k.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},(rt.prototype=Object.create(d.prototype)).constructor=rt,ct.prototype=Object.assign(Object.create(l.prototype),{constructor:ct,isPerspectiveCamera:!0,copy:function(e,t){return l.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},setFocalLength:function(e){e=.5*this.getFilmHeight()/e,this.fov=2*oo.RAD2DEG*Math.atan(e),this.updateProjectionMatrix()},getFocalLength:function(){var e=Math.tan(.5*oo.DEG2RAD*this.fov);return.5*this.getFilmHeight()/e}
1,getEffectiveFOV:function(){return 2*oo.RAD2DEG*Math.atan(Math.tan(.5*oo.DEG2RAD*this.fov)/this.zoom)},getFilmWidth:function(){return this.filmGauge*Math.min(this.aspect,1)},getFilmHeight:function(){return this.filmGauge/Math.max(this.aspect,1)},setViewOffset:function(e,t,i,n,r,o){this.aspect=e/t,null===this.view&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=e,this.view.fullHeight=t,this.view.offsetX=i,this.view.offsetY=n,this.view.width=r,this.view.height=o,this.updateProjectionMatrix()},clearViewOffset:function(){null!==this.view&&(this.view.enabled=!1),this.updateProjectionMatrix()},updateProjectionMatrix:function(){var e=this.near,t=e*Math.tan(.5*oo.DEG2RAD*this.fov)/this.zoom,i=2*t,n=this.aspect*i,r=-.5*n,o=this.view;if(null!==this.view&&this.view.enabled){var a=o.fullWidth,s=o.fullHeight;r+=o.offsetX*n/a,t-=o.offsetY*i/s,n*=o.width/a,i*=o.height/s}0!==(o=this.filmOffset)&&(r+=e*o/this.getFilmWidth()),this.projectionMatrix.makePerspective(r,r+n,t,t-i,e,this.far)},toJSON:function(e){return(e=u.prototype.toJSON.call(this,e)).object.fov=this.fov,e.object.zoom=this.zoom,e.object.near=this.near,e.object.far=this.far,e.object.focus=this.focus,e.object.aspect=this.aspect,null!==this.view&&(e.object.view=Object.assign({},this.view)),e.object.filmGauge=this.filmGauge,e.object.filmOffset=this.filmOffset,e}}),ut.prototype=Object.assign(Object.create(ct.prototype),{constructor:ut,isArrayCamera:!0}),pt.prototype.isFogExp2=!0,pt.prototype.clone=function(){return new pt(this.color.getHex(),this.density)},pt.prototype.toJSON=function(){return{type:"FogExp2",color:this.color.getHex(),density:this.density}},ft.prototype.isFog=!0,ft.prototype.clone=function(){return new ft(this.color.getHex(),this.near,this.far)},ft.prototype.toJSON=function(){return{type:"Fog",color:this.color.getHex(),near:this.near,far:this.far}},mt.prototype=Object.assign(Object.create(u.prototype),{constructor:mt,copy:function(e,t){return u.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},toJSON:function(e){var t=u.prototype.toJSON.call(this,e);return null!==this.background&&(t.object.background=this.background.toJSON(e)),null!==this.fog&&(t.object.fog=this.fog.toJSON()),t}}),((gt.prototype=Object.create(k.prototype)).constructor=gt).prototype.isSpriteMaterial=!0,gt.prototype.copy=function(e){return k.prototype.copy.call(this,e),this.color.copy(e.color),this.map=e.map,this.rotation=e.rotation,this},vt.prototype=Object.assign(Object.create(u.prototype),{constructor:vt,isSprite:!0,raycast:(Ya=new _e,Ja=new _e,Za=new _e,function(e,t){Ja.setFromMatrixPosition(this.matrixWorld),e.ray.closestPointToPoint(Ja,Ya),Za.setFromMatrixScale(this.matrixWorld);var i=Za.x*Za.y/4;Ja.distanceToSquared(Ya)>i||(i=e.ray.origin.distanceTo(Ya))<e.near||i>e.far||t.push({distance:i,point:Ya.clone(),face:null,object:this})}),clone:function(){return new this.constructor(this.material).copy(this)},copy:function(e){return u.prototype.copy.call(this,e),void 0!==e.center&&this.center.copy(e.center),this}}),yt.prototype=Object.assign(Object.create(u.prototype),{constructor:yt,copy:function(e){u.prototype.copy.call(this,e,!1);for(var t=0,i=(e=e.levels).length;t<i;t++){var n=e[t];this.addLevel(n.object.clone(),n.distance)}return this},addLevel:function(e,t){void 0===t&&(t=0),t=Math.abs(t);for(var i=this.levels,n=0;n<i.length&&!(t<i[n].distance);n++);i.splice(n,0,{distance:t,object:e}),this.add(e)},getObjectForDistance:function(e){for(var t=this.levels,i=1,n=t.length;i<n&&!(e<t[i].distance);i++);return t[i-1].object},raycast:(es=new _e,function(e,t){es.setFromMatrixPosition(this.matrixWorld);var i=e.ray.origin.distanceTo(es);this.getObjectForDistance(i).raycast(e,t)}),update:(Qa=new _e,Ka=new _e,function(e){var t=this.levels;if(1<t.length){Qa.setFromMatrixPosition(e.matrixWorld),Ka.setFromMatrixPosition(this.matrixWorld),e=Qa.distanceTo(Ka),t[0].object.visible=!0;for(var i=1,n=t.length;i<n&&e>=t[i].distance;i++)t[i-1].object.visible=!1,t[i].object.visible=!0;for(;i<n;i++)t[i].object.visible=!1}}),toJSON:function(e){(e=u.prototype.toJSON.call(this,e)).object.levels=[];for(var t=this.levels,i=0,n=t.length;i<n;i++){var r=t[i];e.object.levels.push({object:r.object.uuid,distance:r.distance})}return e}}),Object.assign(xt.prototype,{calculateInverses:function(){this.boneInverses=[];for(var e=0,t=this.bones.length;e<t;e++){var i=new we;this.bones[e]&&i.getInverse(this.bones[e].matrixWorld),this.boneInverses.push(i)}},pose:function(){var e,t,i=0;for(t=this.bones.length;i<t;i++)(e=this.bones[i])&&e.matrixWorld.getInverse(this.boneInverses[i]);for(i=0,t=this.bones.length;i<t;i++)(e=this.bones[i])&&(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))},update:(ts=new we,is=new we,function(){for(var e=this.bones,t=this.boneInverses,i=this.boneMatrices,n=this.boneTexture,r=0,o=e.length;r<o;r++)ts.multiplyMatrices(e[r]?e[r].matrixWorld:is,t[r]),ts.toArray(i,16*r);void 0!==n&&(n.needsUpdate=!0)}),clone:function(){return new xt(this.bones,this.boneInverses)},getBoneByName:function(e){for(var t=0,i=this.bones.length;t<i;t++){var n=this.bones[t];if(n.name===e)return n}}}),bt.prototype=Object.assign(Object.create(u.prototype),{constructor:bt,isBone:!0}),wt.prototype=Object.assign(Object.create(I.prototype),{constructor:wt,isSkinnedMesh:!0,initBones:function(){var e,t=[];if(this.geometry&&void 0!==this.geometry.bones){var i=0;for(e=this.geometry.bones.length;i<e;i++){var n=this.geometry.bones[i],r=new bt;t.push(r),r.name=n.name,r.position.fromArray(n.pos),r.quaternion.fromArray(n.rotq),void 0!==n.scl&&r.scale.fromArray(n.scl)}for(i=0,e=this.geometry.bones.length;i<e;i++)-1!==(n=this.geometry.bones[i]).parent&&null!==n.parent&&void 0!==t[n.parent]?t[n.parent].add(t[i]):this.add(t[i])}return this.updateMatrixWorld(!0),t},bind:function(e,t){this.skeleton=e,void 0===t&&(this.updateMatrixWorld(!0),this.skeleton.calculateInverses(),t=this.matrixWorld),this.bindMatrix.copy(t),this.bindMatrixInverse.getInverse(t)},pose:function(){this.skeleton.pose()},normalizeSkinWeights:function(){var e;if(this.geometry&&this.geometry.isGeometry)for(e=0;e<this.geometry.skinWeights.length;e++){var t=this.geometry.skinWeights[e],i=1/t.manhattanLength();1/0!==i?t.multiplyScalar(i):t.set(1,0,0,0)}else if(this.geometry&&this.geometry.isBufferGeometry){t=new Te;var n=this.geometry.attributes.skinWeight;for(e=0;e<n.count;e++)t.x=n.getX(e),t.y=n.getY(e),t.z=n.getZ(e),t.w=n.getW(e),1/0!==(i=1/t.manhattanLength())?t.multiplyScalar(i):t.set(1,0,0,0),n.setXYZW(e,t.x,t.y,t.z,t.w)}},updateMatrixWorld:function(e){I.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)},clone:function(){return new this.constructor(this.geometry,this.material).copy(this)}}),((_t.prototype=Object.create(k.prototype)).constructor=_t).prototype.isLineBasicMaterial=!0,_t.prototype.copy=function(e){return k.prototype.copy.call(this,e),this.color.copy(e.color),this.linewidth=e.linewidth,this.linecap=e.linecap,this.linejoin=e.linejoin,this},Tt.prototype=Object.assign(Object.create(u.prototype),{constructor:Tt,isLine:!0,computeLineDistances:(as=new _e,ss=new _e,function(){var e=this.geometry;if(e.isBufferGeometry)if(null===e.index){for(var t=e.attributes.position,i=[0],n=1,r=t.count;n<r;n++)as.fromBufferAttribute(t,n-1),ss.fromBufferAttribute(t,n),i[n]=i[n-1],i[n]+=as.distanceTo(ss);e.addAttribute("lineDistance",new THREE.Float32BufferAttribute(i,1))}else console.warn("THREE.Line.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");else if(e.isGeometry)for(t=e.vertices,(i=e.lineDistances)[0]=0,n=1,r=t.length;n<r;n++)i[n]=i[n-1],i[n]+=t[n-1].distanceTo(t[n]);return this}),raycast:(ns=new we,rs=new z,os=new a,function(e,t){var i=e.linePrecision;i*=i;var n=this.geometry,r=this.matrixWorld;if(null===n.boundingSphere&&n.computeBoundingSphere(),os.copy(n.boundingSphere),os.applyMatrix4(r),!1!==e.ray.intersectsSphere(os)){ns.getInverse(r),rs.copy(e.ray).applyMatrix4(ns);var o=new _e,a=new _e;r=new _e;var s=new _e,l=this&&this.isLineSegments?2:1;if(n.isBufferGeometry){var c=n.index,u=n.attributes.position.array;if(null!==c){n=0;for(var h=(c=c.array).length-1;n<h;n+=l){var d=c[n+1];o.fromArray(u,3*c[n]),a.fromArray(u,3*d),i<(d=rs.distanceSqToSegment(o,a,s,r))||(s.applyMatrix4(this.matrixWorld),(d=e.ray.origin.distanceTo(s))<e.near||d>e.far||t.push({distance:d,point:r.clone().applyMatrix4(this.matrixWorld),index:n,face:null,faceIndex:null,object:this}))}}else for(n=0,h=u.length/3-1;n<h;n+=l)o.fromArray(u,3*n),a.fromArray(u,3*n+3),i<(d=rs.distanceSqToSegment(o,a,s,r))||(s.applyMatrix4(this.matrixWorld),(d=e.ray.origin.distanceTo(s))<e.near||d>e.far||t.push({distance:d,point:r.clone().applyMatrix4(this.matrixWorld),index:n,face:null,faceIndex:null,object:this}))}else if(n.isGeometry)for(a=(o=n.vertices).length,n=0;n<a-1;n+=l)i<(d=rs.distanceSqToSegment(o[n],o[n+1],s,r))||(s.applyMatrix4(this.matrixWorld),(d=e.ray.origin.distanceTo(s))<e.near||d>e.far||t.push({distance:d,point:r.clone().applyMatrix4(this.matrixWorld),index:n,face:null,faceIndex:null,object:this}))}}),clone:function(){return new this.constructor(this.geometry,this.material).copy(this)}}),Et.prototype=Object.assign(Object.create(Tt.prototype),{constructor:Et,isLineSegments:!0,computeLineDistances:(ls=new _e,cs=new _e,function(){var e=this.geometry;if(e.isBufferGeometry)if(null===e.index){for(var t=e.attributes.position,i=[],n=0,r=t.count;n<r;n+=2)ls.fromBufferAttribute(t,n),cs.fromBufferAttribute(t,n+1),i[n]=0===n?0:i[n-1],i[n+1]=i[n]+ls.distanceTo(cs);e.addAttribute("lineDistance",new THREE.Float32BufferAttribute(i,1))}else console.warn("THREE.LineSegments.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");else if(e.isGeometry)for(t=e.vertices,i=e.lineDistances,n=0,r=t.length;n<r;n+=2)ls.copy(t[n]),cs.copy(t[n+1]),i[n]=0===n?0:i[n-1],i[n+1]=i[n]+ls.distanceTo(cs);return this})}),St.prototype=Object.assign(Object.create(Tt.prototype),{constructor:St,isLineLoop:!0}),((Mt.prototype=Object.create(k.prototype)).constructor=Mt).prototype.isPointsMaterial=!0,Mt.prototype.copy=function(e){return k.prototype.copy.call(this,e),this.color.copy(e.color),this.map=e.map,this.size=e.size,this.sizeAttenuation=e.sizeAttenuation,this},At.prototype=Object.assign(Object.create(u.prototype),{constructor:At,isPoints:!0,raycast:(us=new we,hs=new z,ds=new a,function(n,r){function e(e,t){var i=hs.distanceSqToPoint(e);i<s&&(hs.closestPointToPoint(e,l),l.applyMatrix4(a),(e=n.ray.origin.distanceTo(l))<n.near||e>n.far||r.push({distance:e,distanceToRay:Math.sqrt(i),point:l.clone(),index:t,face:null,object:o}))}var o=this,t=this.geometry,a=this.matrixWorld,i=n.params.Points.threshold;if(null===t.boundingSphere&&t.computeBoundingSphere(),ds.copy(t.boundingSphere),ds.applyMatrix4(a),ds.radius+=i,!1!==n.ray.intersectsSphere(ds)){us.getInverse(a),hs.copy(n.ray).applyMatrix4(us);var s=(i/=(this.scale.x+this.scale.y+this.scale.z)/3)*i;i=new _e;var l=new _e;if(t.isBufferGeometry){var c=t.index;if(t=t.attributes.position.array,null!==c){var u=c.array;c=0;for(var h=u.length;c<h;c++){var d=u[c];i.fromArray(t,3*d),e(i,d)}}else for(c=0,u=t.length/3;c<u;c++)i.fromArray(t,3*c),e(i,c)}else for(c=0,u=(i=t.vertices).length;c<u;c++)e(i[c],c)}}),clone:function(){return new this.constructor(this.geometry,this.material).copy(this)}}),Ct.prototype=Object.assign(Object.create(u.prototype),{constructor:Ct,isGroup:!0}),Lt.prototype=Object.assign(Object.create(d.prototype),{constructor:Lt,isVideoTexture:!0,update:function(){var e=this.image;e.readyState>=e.HAVE_CURRENT_DATA&&(this.needsUpdate=!0)}}),((Rt.prototype=Object.create(d.prototype)).constructor=Rt).prototype.isCompressedTexture=!0,((Pt.prototype=Object.create(d.prototype)).constructor=Pt).prototype.isDepthTexture=!0,(kt.prototype=Object.create(L.prototype)).constructor=kt,(Nt.prototype=Object.create(T.prototype)).constructor=Nt,(Dt.prototype=Object.create(L.prototype)).constructor=Dt,(Ot.prototype=Object.create(T.prototype)).constructor=Ot,(It.prototype=Object.create(L.prototype)).constructor=It,(Ut.prototype=Object.create(T.prototype)).constructor=Ut,(zt.prototype=Object.create(It.prototype)).constructor=zt,(Ht.prototype=Object.create(T.prototype)).constructor=Ht,(Ft.prototype=Object.create(It.prototype)).constructor=Ft,(Bt.prototype=Object.create(T.prototype)).constructor=Bt,(Gt.prototype=Object.create(It.prototype)).constructor=Gt,(jt.prototype=Object.create(T.prototype)).constructor=jt,(Vt.prototype=Object.create(It.prototype)).constructor=Vt,(Wt.prototype=Object.create(T.prototype)).constructor=Wt,($t.prototype=Object.create(L.prototype)).constructor=$t,(qt.prototype=Object.create(T.prototype)).constructor=qt,(Xt.prototype=Object.create(L.prototype)).constructor=Xt,(Yt.prototype=Object.create(T.prototype)).constructor=Yt,(Jt.prototype=Object.create(L.prototype)).constructor=Jt;var ms=function(e,t,i){i=i||2;var n,r=t&&t.length,o=r?t[0]*i:e.length,a=Zt(e,0,o,i,!0),s=[];if(!a)return s;if(r){var l,c=i;r=[];var u=0;for(l=t.length;u<l;u++){var h=t[u]*c;(h=Zt(e,h,u<l-1?t[u+1]*c:e.length,c,!1))===h.next&&(h.steiner=!0),r.push(ii(h))}for(r.sort(Kt),u=0;u<r.length;u++)(c=ei(t=r[u],c=a))&&Qt(t=li(c,t),t.next),a=Qt(a,a.next)}if(e.length>80*i){var d=n=e[0],p=r=e[1];for(c=i;c<o;
1c+=i)(u=e[c])<d&&(d=u),(t=e[c+1])<p&&(p=t),n<u&&(n=u),r<t&&(r=t);n=0!==(n=Math.max(n-d,r-p))?1/n:0}return function e(t,i,n,r,o,a,s){if(t){if(!s&&a){for(var l=t,c=l;null===c.z&&(c.z=ti(c.x,c.y,r,o,a)),c.prevZ=c.prev,(c=c.nextZ=c.next)!==l;);c.prevZ.nextZ=null,c.prevZ=null,l=c;var u,h,d,p,f=1;do{c=l;var m=l=null;for(h=0;c;){h++;var g=c;for(u=d=0;u<f&&(d++,g=g.nextZ);u++);for(p=f;0<d||0<p&&g;)0!==d&&(0===p||!g||c.z<=g.z)?(c=(u=c).nextZ,d--):(g=(u=g).nextZ,p--),m?m.nextZ=u:l=u,u.prevZ=m,m=u;c=g}m.nextZ=null,f*=2}while(1<h)}for(l=t;t.prev!==t.next;){if(c=t.prev,g=t.next,a)e:{p=r;var v=o,y=a;if(0<=ri(h=(m=t).prev,d=m,f=m.next))m=!1;else{var x=h.x>d.x?h.x>f.x?h.x:f.x:d.x>f.x?d.x:f.x,b=h.y>d.y?h.y>f.y?h.y:f.y:d.y>f.y?d.y:f.y;for(u=ti(h.x<d.x?h.x<f.x?h.x:f.x:d.x<f.x?d.x:f.x,h.y<d.y?h.y<f.y?h.y:f.y:d.y<f.y?d.y:f.y,p,v,y),p=ti(x,b,p,v,y),v=m.nextZ;v&&v.z<=p;){if(v!==m.prev&&v!==m.next&&ni(h.x,h.y,d.x,d.y,f.x,f.y,v.x,v.y)&&0<=ri(v.prev,v,v.next)){m=!1;break e}v=v.nextZ}for(v=m.prevZ;v&&v.z>=u;){if(v!==m.prev&&v!==m.next&&ni(h.x,h.y,d.x,d.y,f.x,f.y,v.x,v.y)&&0<=ri(v.prev,v,v.next)){m=!1;break e}v=v.prevZ}m=!0}}else e:if(m=t,h=m.prev,d=m,f=m.next,0<=ri(h,d,f))m=!1;else{for(u=m.next.next;u!==m.prev;){if(ni(h.x,h.y,d.x,d.y,f.x,f.y,u.x,u.y)&&0<=ri(u.prev,u,u.next)){m=!1;break e}u=u.next}m=!0}if(m)i.push(c.i/n),i.push(t.i/n),i.push(g.i/n),ui(t),l=t=g.next;else if((t=g)===l){if(s){if(1===s){for(s=i,l=n,c=t;!oi(g=c.prev,m=c.next.next)&&ai(g,c,c.next,m)&&si(g,m)&&si(m,g)&&(s.push(g.i/l),s.push(c.i/l),s.push(m.i/l),ui(c),ui(c.next),c=t=m),(c=c.next)!==t;);e(t=c,i,n,r,o,a,2)}else if(2===s)e:{s=t;do{for(l=s.next.next;l!==s.prev;){if(c=s.i!==l.i){if(g=l,m=(c=s).next.i!==g.i&&c.prev.i!==g.i){t:{m=c;do{if(m.i!==c.i&&m.next.i!==c.i&&m.i!==g.i&&m.next.i!==g.i&&ai(m,m.next,c,g)){m=!0;break t}m=m.next}while(m!==c);m=!1}m=!m}if(m=m&&si(c,g)&&si(g,c)){for(h=!1,d=((m=c).x+g.x)/2,g=(c.y+g.y)/2;m.y>g!=m.next.y>g&&m.next.y!==m.y&&d<(m.next.x-m.x)*(g-m.y)/(m.next.y-m.y)+m.x&&(h=!h),(m=m.next)!==c;);m=h}c=m}if(c){t=li(s,l),s=Qt(s,s.next),t=Qt(t,t.next),e(s,i,n,r,o,a),e(t,i,n,r,o,a);break e}l=l.next}s=s.next}while(s!==t)}}else e(Qt(t),i,n,r,o,a,1);break}}}}(a,s,i,d,p,n),s},gs={area:function(e){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;return.5*i},isClockWise:function(e){return gs.area(e)<0},triangulateShape:function(e,t){var i=[],n=[],r=[];di(e),pi(i,e);var o=e.length;for(t.forEach(di),e=0;e<t.length;e++)n.push(o),o+=t[e].length,pi(i,t[e]);for(t=ms(i,n),e=0;e<t.length;e+=3)r.push(t.slice(e,e+3));return r}};(fi.prototype=Object.create(T.prototype)).constructor=fi,((mi.prototype=Object.create(L.prototype)).constructor=mi).prototype.getArrays=function(){var e=this.getAttribute("position");e=e?Array.prototype.slice.call(e.array):[];var t=this.getAttribute("uv");t=t?Array.prototype.slice.call(t.array):[];var i=this.index;return{position:e,uv:t,index:i=i?Array.prototype.slice.call(i.array):[]}},mi.prototype.addShapeList=function(e,t){var i=e.length;t.arrays=this.getArrays();for(var n=0;n<i;n++)this.addShape(e[n],t);this.setIndex(t.arrays.index),this.addAttribute("position",new q(t.arrays.position,3)),this.addAttribute("uv",new q(t.arrays.uv,2))},mi.prototype.addShape=function(e,t){function i(e,t,i){return t||console.error("THREE.ExtrudeGeometry: vec does not exist"),t.clone().multiplyScalar(i).add(e)}function n(e,t,i){var n=e.x-t.x,r=e.y-t.y,o=i.x-e.x,a=i.y-e.y,s=n*n+r*r;if(Math.abs(n*a-r*o)>Number.EPSILON){var l=Math.sqrt(s),c=Math.sqrt(o*o+a*a);if(s=t.x-r/l,t=t.y+n/l,(r=(o=s+n*(a=((i.x-a/c-s)*a-(i.y+o/c-t)*o)/(n*a-r*o))-e.x)*o+(n=t+r*a-e.y)*n)<=2)return new $(o,n);r=Math.sqrt(r/2)}else e=!1,n>Number.EPSILON?o>Number.EPSILON&&(e=!0):n<-Number.EPSILON?o<-Number.EPSILON&&(e=!0):Math.sign(r)===Math.sign(a)&&(e=!0),e?(o=-r,r=Math.sqrt(s)):(o=n,n=r,r=Math.sqrt(s/2));return new $(o/r,n/r)}function r(e,t){for(H=e.length;0<=--H;){var i=H,n=H-1;n<0&&(n=e.length-1);var r,o=x+2*g;for(r=0;r<o;r++){var a=U*r,s=U*(r+1),l=t+n+a,c=t+n+s;s=t+i+s,u(t+i+a),u(l),u(s),u(l),u(c),u(s),a=d.length/3,h((a=_.generateSideWallUV(L,d,a-6,a-3,a-2,a-1))[0]),h(a[1]),h(a[3]),h(a[1]),h(a[2]),h(a[3])}}}function o(e,t,i){p.push(e),p.push(t),p.push(i)}function a(e,t,i){u(e),u(t),u(i),e=d.length/3,h((e=_.generateTopUV(L,d,e-3,e-2,e-1))[0]),h(e[1]),h(e[2])}function u(e){l.push(d.length/3),d.push(p[3*e]),d.push(p[3*e+1]),d.push(p[3*e+2])}function h(e){c.push(e.x),c.push(e.y)}var s=t.arrays?t.arrays:this.getArrays(),d=s.position,l=s.index,c=s.uv,p=[];s=void 0!==t.amount?t.amount:100;var f=void 0!==t.bevelThickness?t.bevelThickness:6,m=void 0!==t.bevelSize?t.bevelSize:f-2,g=void 0!==t.bevelSegments?t.bevelSegments:3,v=void 0===t.bevelEnabled||t.bevelEnabled,y=void 0!==t.curveSegments?t.curveSegments:12,x=void 0!==t.steps?t.steps:1,b=t.extrudePath,w=!1,_=void 0!==t.UVGenerator?t.UVGenerator:fi.WorldUVGenerator;if(b){var T=b.getSpacedPoints(x);v=!(w=!0);var E=void 0!==t.frames?t.frames:b.computeFrenetFrames(x,!1),S=new _e,M=new _e,A=new _e}v||(m=f=g=0);
1var C,L=this;e=(y=e.extractPoints(y)).shape;var R=y.holes;if(!gs.isClockWise(e)){e=e.reverse();var P=0;for(C=R.length;P<C;P++){var k=R[P];gs.isClockWise(k)&&(R[P]=k.reverse())}}var N=gs.triangulateShape(e,R),D=e;for(P=0,C=R.length;P<C;P++)k=R[P],e=e.concat(k);var O,I,U=e.length,z=N.length;y=[];var H=0,F=D.length,B=F-1;for(O=H+1;H<F;H++,B++,O++)B===F&&(B=0),O===F&&(O=0),y[H]=n(D[H],D[B],D[O]);b=[];var G=y.concat();for(P=0,C=R.length;P<C;P++){k=R[P];var j=[];for(H=0,B=(F=k.length)-1,O=H+1;H<F;H++,B++,O++)B===F&&(B=0),O===F&&(O=0),j[H]=n(k[H],k[B],k[O]);b.push(j),G=G.concat(j)}for(B=0;B<g;B++){F=B/g;var V=f*Math.cos(F*Math.PI/2);for(O=m*Math.sin(F*Math.PI/2),H=0,F=D.length;H<F;H++){var W=i(D[H],y[H],O);o(W.x,W.y,-V)}for(P=0,C=R.length;P<C;P++)for(k=R[P],j=b[P],H=0,F=k.length;H<F;H++)o((W=i(k[H],j[H],O)).x,W.y,-V)}for(O=m,H=0;H<U;H++)W=v?i(e[H],G[H],O):e[H],w?(M.copy(E.normals[0]).multiplyScalar(W.x),S.copy(E.binormals[0]).multiplyScalar(W.y),A.copy(T[0]).add(M).add(S),o(A.x,A.y,A.z)):o(W.x,W.y,0);for(F=1;F<=x;F++)for(H=0;H<U;H++)W=v?i(e[H],G[H],O):e[H],w?(M.copy(E.normals[F]).multiplyScalar(W.x),S.copy(E.binormals[F]).multiplyScalar(W.y),A.copy(T[F]).add(M).add(S),o(A.x,A.y,A.z)):o(W.x,W.y,s/x*F);for(B=g-1;0<=B;B--){for(F=B/g,V=f*Math.cos(F*Math.PI/2),O=m*Math.sin(F*Math.PI/2),H=0,F=D.length;H<F;H++)o((W=i(D[H],y[H],O)).x,W.y,s+V);for(P=0,C=R.length;P<C;P++)for(k=R[P],j=b[P],H=0,F=k.length;H<F;H++)W=i(k[H],j[H],O),w?o(W.x,W.y+T[x-1].y,T[x-1].x+V):o(W.x,W.y,s+V)}!function(){var e=d.length/3;if(v){var t=0*U;for(H=0;H<z;H++)a((I=N[H])[2]+t,I[1]+t,I[0]+t);for(t=U*(x+2*g),H=0;H<z;H++)a((I=N[H])[0]+t,I[1]+t,I[2]+t)}else{for(H=0;H<z;H++)a((I=N[H])[2],I[1],I[0]);for(H=0;H<z;H++)a((I=N[H])[0]+U*x,I[1]+U*x,I[2]+U*x)}L.addGroup(e,d.length/3-e,0)}(),function(){var e=d.length/3,t=0;for(r(D,t),t+=D.length,P=0,C=R.length;P<C;P++)r(k=R[P],t),t+=k.length;L.addGroup(e,d.length/3-e,1)}(),t.arrays||(this.setIndex(l),this.addAttribute("position",new q(d,3)),this.addAttribute("uv",new q(c,2)))},fi.WorldUVGenerator={generateTopUV:function(e,t,i,n,r){e=t[3*n],n=t[3*n+1];var o=t[3*r];return r=t[3*r+1],[new $(t[3*i],t[3*i+1]),new $(e,n),new $(o,r)]},generateSideWallUV:function(e,t,i,n,r,o){e=t[3*i];var a=t[3*i+1];i=t[3*i+2];var s=t[3*n],l=t[3*n+1];n=t[3*n+2];var c=t[3*r],u=t[3*r+1];r=t[3*r+2];var h=t[3*o],d=t[3*o+1];return t=t[3*o+2],Math.abs(a-l)<.01?[new $(e,1-i),new $(s,1-n),new $(c,1-r),new $(h,1-t)]:[new $(a,1-i),new $(l,1-n),new $(u,1-r),new $(d,1-t)]}},(gi.prototype=Object.create(T.prototype)).constructor=gi,(vi.prototype=Object.create(mi.prototype)).constructor=vi,(yi.prototype=Object.create(T.prototype)).constructor=yi,(xi.prototype=Object.create(L.prototype)).constructor=xi,(bi.prototype=Object.create(T.prototype)).constructor=bi,(wi.prototype=Object.create(L.prototype)).constructor=wi,(_i.prototype=Object.create(T.prototype)).constructor=_i,(Ti.prototype=Object.create(L.prototype)).constructor=Ti,((Ei.prototype=Object.create(T.prototype)).constructor=Ei).prototype.toJSON=function(){var e=T.prototype.toJSON.call(this);return Mi(this.parameters.shapes,e)},((Si.prototype=Object.create(L.prototype)).constructor=Si).prototype.toJSON=function(){var e=L.prototype.toJSON.call(this);return Mi(this.parameters.shapes,e)},(Ai.prototype=Object.create(L.prototype)).constructor=Ai,(Ci.prototype=Object.create(T.prototype)).constructor=Ci,(Li.prototype=Object.create(L.prototype)).constructor=Li,(Ri.prototype=Object.create(Ci.prototype)).constructor=Ri,(Pi.prototype=Object.create(Li.prototype)).constructor=Pi,(ki.prototype=Object.create(T.prototype)).constructor=ki,(Ni.prototype=Object.create(L.prototype)).constructor=Ni;var vs=Object.freeze({WireframeGeometry:kt,ParametricGeometry:Nt,ParametricBufferGeometry:Dt,TetrahedronGeometry:Ut,TetrahedronBufferGeometry:zt,OctahedronGeometry:Ht,OctahedronBufferGeometry:Ft,IcosahedronGeometry:Bt,IcosahedronBufferGeometry:Gt,DodecahedronGeometry:jt,DodecahedronBufferGeometry:Vt,PolyhedronGeometry:Ot,PolyhedronBufferGeometry:It,TubeGeometry:Wt,TubeBufferGeometry:$t,TorusKnotGeometry:qt,TorusKnotBufferGeometry:Xt,TorusGeometry:Yt,TorusBufferGeometry:Jt,TextGeometry:gi,TextBufferGeometry:vi,SphereGeometry:yi,SphereBufferGeometry:xi,RingGeometry:bi,RingBufferGeometry:wi,PlaneGeometry:R,PlaneBufferGeometry:P,LatheGeometry:_i,LatheBufferGeometry:Ti,ShapeGeometry:Ei,ShapeBufferGeometry:Si,ExtrudeGeometry:fi,ExtrudeBufferGeometry:mi,EdgesGeometry:Ai,ConeGeometry:Ri,ConeBufferGeometry:Pi,CylinderGeometry:Ci,CylinderBufferGeometry:Li,CircleGeometry:ki,CircleBufferGeometry:Ni,BoxGeometry:M,BoxBufferGeometry:C});((Di.prototype=Object.create(k.prototype)).constructor=Di).prototype.isShadowMaterial=!0,Di.prototype.copy=function(e){return k.prototype.copy.call(this,e),this.color.copy(e.color),this},((Oi.prototype=Object.create(D.prototype)).constructor=Oi).prototype.isRawShaderMaterial=!0,((Ii.prototype=Object.create(k.prototype)).constructor=Ii).prototype.isMeshStandardMaterial=!0,Ii.prototype.copy=function(e){return k.prototype.copy.call(this,e),this.defines={STANDARD:""},this.color.copy(e.color),this.roughness=e.roughness,this.metalness=e.metalness,this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.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},((Ui.prototype=Object.create(Ii.prototype)).constructor=Ui).prototype.isMeshPhysicalMaterial=!0,Ui.prototype.copy=function(e){return Ii.prototype.copy.call(this,e),this.defines={PHYSICAL:""},this.reflectivity=e.reflectivity,this.clearCoat=e.clearCoat,this.clearCoatRoughness=e.clearCoatRoughness,this},((zi.prototype=Object.create(k.prototype)).constructor=zi).prototype.isMeshPhongMaterial=!0,zi.prototype.copy=function(e){return k.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},((Hi.prototype=Object.create(zi.prototype)).constructor=Hi).prototype.isMeshToonMaterial=!0,Hi.prototype.copy=function(e){return zi.prototype.copy.call(this,e),this.gradientMap=e.gradientMap,this},((Fi.prototype=Object.create(k.prototype)).constructor=Fi).prototype.isMeshNormalMaterial=!0,Fi.prototype.copy=function(e){return k.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},((Bi.prototype=Object.create(k.prototype)).constructor=Bi).prototype.isMeshLambertMaterial=!0,Bi.prototype.copy=function(e){return k.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},((Gi.prototype=Object.create(_t.prototype)).constructor=Gi).prototype.isLineDashedMaterial=!0,Gi.prototype.copy=function(e){return _t.prototype.copy.call(this,e),this.scale=e.scale,this.dashSize=e.dashSize,this.gapSize=e.gapSize,this};var ys=Object.freeze({ShadowMaterial:Di,SpriteMaterial:gt,RawShaderMaterial:Oi,ShaderMaterial:D,PointsMaterial:Mt,MeshPhysicalMaterial:Ui,MeshStandardMaterial:Ii,MeshPhongMaterial:zi,MeshToonMaterial:Hi,MeshNormalMaterial:Fi,MeshLambertMaterial:Bi,MeshDepthMaterial:tt,MeshDistanceMaterial:it,MeshBasicMaterial:N,LineDashedMaterial:Gi,LineBasicMaterial:_t,Material:k}),xs={enabled:!1,files:{},add:function(e,t){!1!==this.enabled&&(this.files[e]=t)},get:function(e){if(!1!==this.enabled)return this.files[e]},remove:function(e){delete this.files[e]},clear:function(){this.files={}}},bs=new ji,ws={};Object.assign(Vi.prototype,{load:function(a,e,t,i){void 0===a&&(a=""),void 0!==this.path&&(a=this.path+a),a=this.manager.resolveURL(a);var s=this,n=xs.get(a);if(void 0!==n)return s.manager.itemStart(a),setTimeout(function(){e&&e(n),s.manager.itemEnd(a)},0),n;if(void 0===ws[a]){var r=a.match(/^data:(.*?)(;base64)?,(.*)$/);if(r){t=r[1];var o=!!r[2];r=r[3],r=window.decodeURIComponent(r),o&&(r=window.atob(r));try{var l=(this.responseType||"").toLowerCase();switch(l){case"arraybuffer":case"blob":var c=new Uint8Array(r.length);for(o=0;o<r.length;o++)c[o]=r.charCodeAt(o);var u="blob"===l?new Blob([c.buffer],{type:t}):c.buffer;break;case"document":u=(new DOMParser).parseFromString(r,t);break;case"json":u=JSON.parse(r);break;default:u=r}window.setTimeout(function(){e&&e(u),s.manager.itemEnd(a)},0)}catch(e){window.setTimeout(function(){i&&i(e),s.manager.itemEnd(a),s.manager.itemError(a)},0)}}else{ws[a]=[],ws[a].push({onLoad:e,onProgress:t,onError:i});var h=new XMLHttpRequest;for(o in h.open("GET",a,!0),h.addEventListener("load",function(e){var t=this.response;xs.add(a,t);var i=ws[a];if(delete ws[a],200===this.status){for(var n=0,r=i.length;n<r;n++){var o=i[n];o.onLoad&&o.onLoad(t)}s.manager.itemEnd(a)}else if(0===this.status){for(console.warn("THREE.FileLoader: HTTP Status 0 received."),n=0,r=i.length;n<r;n++)(o=i[n]).onLoad&&o.onLoad(t);s.manager.itemEnd(a)}else{for(n=0,r=i.length;n<r;n++)(o=i[n]).onError&&o.onError(e);s.manager.itemEnd(a),s.manager.itemError(a)}},!1),h.addEventListener("progress",function(e){for(var t=ws[a],i=0,n=t.length;i<n;i++){var r=t[i];r.onProgress&&r.onProgress(e)}},!1),h.addEventListener("error",function(e){var t=ws[a];delete ws[a];for(var i=0,n=t.length;i<n;i++){var r=t[i];r.onError&&r.onError(e)}s.manager.itemEnd(a),s.manager.itemError(a)},!1),void 0!==this.responseType&&(h.responseType=this.responseType),void 0!==this.withCredentials&&(h.withCredentials=this.withCredentials),h.overrideMimeType&&h.overrideMimeType(void 0!==this.mimeType?this.mimeType:"text/plain"),this.requestHeader)h.setRequestHeader(o,this.requestHeader[o]);h.send(null)}return s.manager.itemStart(a),h}ws[a].push({onLoad:e,onProgress:t,onError:i})},setPath:function(e){return this.path=e,this},setResponseType:function(e){return this.responseType=e,this},setWithCredentials:function(e){return this.withCredentials=e,this},setMimeType:function(e){return this.mimeType=e,this},setRequestHeader:function(e){return this.requestHeader=e,this}}),Object.assign(Wi.prototype,{load:function(e,r,i,n){function t(t){l.load(e[t],function(e){e=o._parser(e,!0),a[t]={width:e.width,height:e.height,format:e.format,mipmaps:e.mipmaps},6===(c+=1)&&(1===e.mipmapCount&&(s.minFilter=1006),s.format=e.format,s.needsUpdate=!0,r&&r(s))},i,n)}var o=this,a=[],s=new Rt;s.image=a;var l=new Vi(this.manager);if(l.setPath(this.path),l.setResponseType("arraybuffer"),Array.isArray(e))for(var c=0,u=0,h=e.length;u<h;++u)t(u);else l.load(e,function(e){if((e=o._parser(e,!0)).isCubemap)for(var t=e.mipmaps.length/e.mipmapCount,i=0;i<t;i++){a[i]={mipmaps:[]};for(var n=0;n<e.mipmapCount;n++)a[i].mipmaps.push(e.mipmaps[i*e.mipmapCount+n]),a[i].format=e.format,a[i].width=e.width,a[i].height=e.height}else s.image.width=e.width,s.image.height=e.height,s.mipmaps=e.mipmaps;1===e.mipmapCount&&(s.minFilter=1006),s.format=e.format,s.needsUpdate=!0,r&&r(s)},i,n);return s},setPath:function(e){return this.path=e,this}}),Object.assign($i.prototype,{load:function(e,t,i,n){var r=this,o=new Ee,a=new Vi(this.manager);return a.setResponseType("arraybuffer"),a.load(e,function(e){(e=r._parser(e))&&(void 0!==e.image?o.image=e.image:void 0!==e.data&&(o.image.width=e.width,o.image.height=e.height,o.image.data=e.data),o.wrapS=void 0!==e.wrapS?e.wrapS:1001,o.wrapT=void 0!==e.wrapT?e.wrapT:1001,o.magFilter=void 0!==e.magFilter?e.magFilter:1006,o.minFilter=void 0!==e.minFilter?e.minFilter:1008,o.anisotropy=void 0!==e.anisotropy?e.anisotropy:1,void 0!==e.format&&(o.format=e.format),void 0!==e.type&&(o.type=e.type),void 0!==e.mipmaps&&(o.mipmaps=e.mipmaps),1===e.mipmapCount&&(o.minFilter=1006),o.needsUpdate=!0,t&&t(o,e))},i,n),o}}),Object.assign(qi.prototype,{crossOrigin:"Anonymous",load:function(t,e,
1i,n){void 0===t&&(t=""),void 0!==this.path&&(t=this.path+t),t=this.manager.resolveURL(t);var r=this,o=xs.get(t);return void 0!==o?(r.manager.itemStart(t),setTimeout(function(){e&&e(o),r.manager.itemEnd(t)},0),o):((i=document.createElementNS("http://www.w3.org/1999/xhtml","img")).addEventListener("load",function(){xs.add(t,this),e&&e(this),r.manager.itemEnd(t)},!1),i.addEventListener("error",function(e){n&&n(e),r.manager.itemEnd(t),r.manager.itemError(t)},!1),"data:"!==t.substr(0,5)&&void 0!==this.crossOrigin&&(i.crossOrigin=this.crossOrigin),r.manager.itemStart(t),i.src=t,i)},setCrossOrigin:function(e){return this.crossOrigin=e,this},setPath:function(e){return this.path=e,this}}),Object.assign(Xi.prototype,{crossOrigin:"Anonymous",load:function(e,i,t,n){function r(t){a.load(e[t],function(e){o.images[t]=e,6===++s&&(o.needsUpdate=!0,i&&i(o))},void 0,n)}var o=new B,a=new qi(this.manager);a.setCrossOrigin(this.crossOrigin),a.setPath(this.path);var s=0;for(t=0;t<e.length;++t)r(t);return o},setCrossOrigin:function(e){return this.crossOrigin=e,this},setPath:function(e){return this.path=e,this}}),Object.assign(Yi.prototype,{crossOrigin:"Anonymous",load:function(t,i,e,n){var r=new d,o=new qi(this.manager);return o.setCrossOrigin(this.crossOrigin),o.setPath(this.path),o.load(t,function(e){r.image=e,e=0<t.search(/\.(jpg|jpeg)$/)||0===t.search(/^data:image\/jpeg/),r.format=e?1022:1023,r.needsUpdate=!0,void 0!==i&&i(r)},e,n),r},setCrossOrigin:function(e){return this.crossOrigin=e,this},setPath:function(e){return this.path=e,this}}),Object.assign(Ji.prototype,{getPoint:function(){return console.warn("THREE.Curve: .getPoint() not implemented."),null},getPointAt:function(e,t){return e=this.getUtoTmapping(e),this.getPoint(e,t)},getPoints:function(e){void 0===e&&(e=5);for(var t=[],i=0;i<=e;i++)t.push(this.getPoint(i/e));return t},getSpacedPoints:function(e){void 0===e&&(e=5);for(var t=[],i=0;i<=e;i++)t.push(this.getPointAt(i/e));return t},getLength:function(){var e=this.getLengths();return e[e.length-1]},getLengths:function(e){if(void 0===e&&(e=this.arcLengthDivisions),this.cacheArcLengths&&this.cacheArcLengths.length===e+1&&!this.needsUpdate)return this.cacheArcLengths;this.needsUpdate=!1;var t,i=[],n=this.getPoint(0),r=0;for(i.push(0),t=1;t<=e;t++){var o=this.getPoint(t/e);r+=o.distanceTo(n),i.push(r),n=o}return this.cacheArcLengths=i},updateArcLengths:function(){this.needsUpdate=!0,this.getLengths()},getUtoTmapping:function(e,t){var i=this.getLengths(),n=i.length;t=t||e*i[n-1];for(var r,o=0,a=n-1;o<=a;)if((r=i[e=Math.floor(o+(a-o)/2)]-t)<0)o=e+1;else{if(!(0<r)){a=e;break}a=e-1}return i[e=a]===t?e/(n-1):(e+(t-(o=i[e]))/(i[e+1]-o))/(n-1)},getTangent:function(e){var t=e-1e-4;return t<0&&(t=0),1<(e+=1e-4)&&(e=1),t=this.getPoint(t),this.getPoint(e).clone().sub(t).normalize()},getTangentAt:function(e){return e=this.getUtoTmapping(e),this.getTangent(e)},computeFrenetFrames:function(e,t){var i,n=new _e,r=[],o=[],a=[],s=new _e,l=new we;for(i=0;i<=e;i++){var c=i/e;r[i]=this.getTangentAt(c),r[i].normalize()}o[0]=new _e,a[0]=new _e,i=Number.MAX_VALUE,c=Math.abs(r[0].x);var u=Math.abs(r[0].y),h=Math.abs(r[0].z);for(c<=i&&(i=c,n.set(1,0,0)),u<=i&&(i=u,n.set(0,1,0)),h<=i&&n.set(0,0,1),s.crossVectors(r[0],n).normalize(),o[0].crossVectors(r[0],s),a[0].crossVectors(r[0],o[0]),i=1;i<=e;i++)o[i]=o[i-1].clone(),a[i]=a[i-1].clone(),s.crossVectors(r[i-1],r[i]),s.length()>Number.EPSILON&&(s.normalize(),n=Math.acos(oo.clamp(r[i-1].dot(r[i]),-1,1)),o[i].applyMatrix4(l.makeRotationAxis(s,n))),a[i].crossVectors(r[i],o[i]);if(!0===t)for(n=Math.acos(oo.clamp(o[0].dot(o[e]),-1,1)),n/=e,0<r[0].dot(s.crossVectors(o[0],o[e]))&&(n=-n),i=1;i<=e;i++)o[i].applyMatrix4(l.makeRotationAxis(r[i],n*i)),a[i].crossVectors(r[i],o[i]);return{tangents:r,normals:o,binormals:a}},clone:function(){return(new this.constructor).copy(this)},copy:function(e){return this.arcLengthDivisions=e.arcLengthDivisions,this},toJSON:function(){var e={metadata:{version:4.5,type:"Curve",generator:"Curve.toJSON"}};return e.arcLengthDivisions=this.arcLengthDivisions,e.type=this.type,e},fromJSON:function(e){return this.arcLengthDivisions=e.arcLengthDivisions,this}}),((Zi.prototype=Object.create(Ji.prototype)).constructor=Zi).prototype.isEllipseCurve=!0,Zi.prototype.getPoint=function(e,t){t=t||new $;for(var i=2*Math.PI,n=this.aEndAngle-this.aStartAngle,r=Math.abs(n)<Number.EPSILON;n<0;)n+=i;for(;i<n;)n-=i;n<Number.EPSILON&&(n=r?0:i),!0!==this.aClockwise||r||(n=n===i?-i:n-i),i=this.aStartAngle+e*n,e=this.aX+this.xRadius*Math.cos(i);var o=this.aY+this.yRadius*Math.sin(i);return 0!==this.aRotation&&(i=Math.cos(this.aRotation),n=Math.sin(this.aRotation),e=(r=e-this.aX)*i-(o-=this.aY)*n+this.aX,o=r*n+o
1*i+this.aY),t.set(e,o)},Zi.prototype.copy=function(e){return Ji.prototype.copy.call(this,e),this.aX=e.aX,this.aY=e.aY,this.xRadius=e.xRadius,this.yRadius=e.yRadius,this.aStartAngle=e.aStartAngle,this.aEndAngle=e.aEndAngle,this.aClockwise=e.aClockwise,this.aRotation=e.aRotation,this},Zi.prototype.toJSON=function(){var e=Ji.prototype.toJSON.call(this);return e.aX=this.aX,e.aY=this.aY,e.xRadius=this.xRadius,e.yRadius=this.yRadius,e.aStartAngle=this.aStartAngle,e.aEndAngle=this.aEndAngle,e.aClockwise=this.aClockwise,e.aRotation=this.aRotation,e},Zi.prototype.fromJSON=function(e){return Ji.prototype.fromJSON.call(this,e),this.aX=e.aX,this.aY=e.aY,this.xRadius=e.xRadius,this.yRadius=e.yRadius,this.aStartAngle=e.aStartAngle,this.aEndAngle=e.aEndAngle,this.aClockwise=e.aClockwise,this.aRotation=e.aRotation,this},((Qi.prototype=Object.create(Zi.prototype)).constructor=Qi).prototype.isArcCurve=!0;var _s=new _e,Ts=new Ki,Es=new Ki,Ss=new Ki;((en.prototype=Object.create(Ji.prototype)).constructor=en).prototype.isCatmullRomCurve3=!0,en.prototype.getPoint=function(e,t){t=t||new _e;var i=this.points,n=i.length;e*=n-(this.closed?0:1);var r=Math.floor(e);if(e-=r,this.closed?r+=0<r?0:(Math.floor(Math.abs(r)/i.length)+1)*i.length:0===e&&r===n-1&&(r=n-2,e=1),this.closed||0<r)var o=i[(r-1)%n];else _s.subVectors(i[0],i[1]).add(i[0]),o=_s;var a=i[r%n],s=i[(r+1)%n];if(this.closed||r+2<n?i=i[(r+2)%n]:(_s.subVectors(i[n-1],i[n-2]).add(i[n-1]),i=_s),"centripetal"===this.curveType||"chordal"===this.curveType){var l="chordal"===this.curveType?.5:.25;n=Math.pow(o.distanceToSquared(a),l),(r=Math.pow(a.distanceToSquared(s),l))<1e-4&&(r=1),n<1e-4&&(n=r),(l=Math.pow(s.distanceToSquared(i),l))<1e-4&&(l=r),Ts.initNonuniformCatmullRom(o.x,a.x,s.x,i.x,n,r,l),Es.initNonuniformCatmullRom(o.y,a.y,s.y,i.y,n,r,l),Ss.initNonuniformCatmullRom(o.z,a.z,s.z,i.z,n,r,l)}else"catmullrom"===this.curveType&&(Ts.initCatmullRom(o.x,a.x,s.x,i.x,this.tension),Es.initCatmullRom(o.y,a.y,s.y,i.y,this.tension),Ss.initCatmullRom(o.z,a.z,s.z,i.z,this.tension));return t.set(Ts.calc(e),Es.calc(e),Ss.calc(e)),t},en.prototype.copy=function(e){Ji.prototype.copy.call(this,e),this.points=[];for(var t=0,i=e.points.length;t<i;t++)this.points.push(e.points[t].clone());return this.closed=e.closed,this.curveType=e.curveType,this.tension=e.tension,this},en.prototype.toJSON=function(){var e=Ji.prototype.toJSON.call(this);e.points=[];for(var t=0,i=this.points.length;t<i;t++)e.points.push(this.points[t].toArray());return e.closed=this.closed,e.curveType=this.curveType,e.tension=this.tension,e},en.prototype.fromJSON=function(e){Ji.prototype.fromJSON.call(this,e),this.points=[];for(var t=0,i=e.points.length;t<i;t++){var n=e.points[t];this.points.push((new _e).fromArray(n))}return this.closed=e.closed,this.curveType=e.curveType,this.tension=e.tension,this},((on.prototype=Object.create(Ji.prototype)).constructor=on).prototype.isCubicBezierCurve=!0,on.prototype.getPoint=function(e,t){t=t||new $;var i=this.v0,n=this.v1,r=this.v2,o=this.v3;return t.set(rn(e,i.x,n.x,r.x,o.x),rn(e,i.y,n.y,r.y,o.y)),t},on.prototype.copy=function(e){return Ji.prototype.copy.call(this,e),this.v0.copy(e.v0),this.v1.copy(e.v1),this.v2.copy(e.v2),this.v3.copy(e.v3),this},on.prototype.toJSON=function(){var e=Ji.prototype.toJSON.call(this);return e.v0=this.v0.toArray(),e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e.v3=this.v3.toArray(),e},on.prototype.fromJSON=function(e){return Ji.prototype.fromJSON.call(this,e),this.v0.fromArray(e.v0),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this.v3.fromArray(e.v3),this},((an.prototype=Object.create(Ji.prototype)).constructor=an).prototype.isCubicBezierCurve3=!0,an.prototype.getPoint=function(e,t){t=t||new _e;var i=this.v0,n=this.v1,r=this.v2,o=this.v3;return t.set(rn(e,i.x,n.x,r.x,o.x),rn(e,i.y,n.y,r.y,o.y),rn(e,i.z,n.z,r.z,o.z)),t},an.prototype.copy=function(e){return Ji.prototype.copy.call(this,e),this.v0.copy(e.v0),this.v1.copy(e.v1),this.v2.copy(e.v2),this.v3.copy(e.v3),this},an.prototype.toJSON=function(){var e=Ji.prototype.toJSON.call(this);return e.v0=this.v0.toArray(),e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e.v3=this.v3.toArray(),e},an.prototype.fromJSON=function(e){return Ji.prototype.fromJSON.call(this,e),this.v0.fromArray(e.v0),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this.v3.fromArray(e.v3),this},((sn.prototype=Object.create(Ji.prototype)).constructor=sn).prototype.isLineCurve=!0,sn.prototype.getPoint=function(e,t){return t=t||new $,1===e?t.copy(this.v2):(t.copy(this.v2).sub(this.v1),t.multiplyScalar(e).add(this.v1)),t},sn.prototype.getPointAt=function(e,t){return this.getPoint(e,t)},sn.prototype.getTangent=function(){return this.v2.clone().sub(this.v1).normalize()},sn.prototype.copy=function(e){return Ji.prototype.copy.call(this,e),this.v1.copy(e.v1),this.v2.copy(e.v2),this},sn.prototype.toJSON=function(){var e=Ji.prototype.toJSON.call(this);return e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e},sn.prototype.fromJSON=function(e){return Ji.prototype.fromJSON.call(this,e),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this},((ln.prototype=Object.create(Ji.prototype)).constructor=ln).prototype.isLineCurve3=!0,ln.prototype.getPoint=function(e,t){return t=t||new _e,1===e?t.copy(this.v2):(t.copy(this.v2).sub(this.v1),t.multiplyScalar(e).add(this.v1)),t},ln.prototype.getPointAt=function(e,t){return this.getPoint(e,t)},ln.prototype.copy=function(e){return Ji.prototype.copy.call(this,e),this.v1.copy(e.v1),this.v2.copy(e.v2),this},ln.prototype.toJSON=function(){var e=Ji.prototype.toJSON.call(this);return e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e},ln.prototype.fromJSON=function(e){return Ji.prototype.fromJSON.call(this,e),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this},((cn.prototype=Object.create(Ji.prototype)).constructor=cn).prototype.isQuadraticBezierCurve=!0,cn.prototype.getPoint=function(e,t){t=t||new $;var i=this.v0,n=this.v1,r=this.v2;return t.set(nn(e,i.x,n.x,r.x),nn(e,i.y,n.y,r.y)),t},cn.prototype.copy=function(e){return Ji.prototype.copy.call(this,e),this.v0.copy(e.v0),this.v1.copy(e.v1),this.v2.copy(e.v2),this},cn.prototype.toJSON=function(){var e=Ji.prototype.toJSON.call(this);return e.v0=this.v0.toArray(),e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e},cn.prototype.fromJSON=function(e){return Ji.prototype.fromJSON.call(this,e),this.v0.fromArray(e.v0),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this},((un.prototype=Object.create(Ji.prototype)).constructor=un).prototype.isQuadraticBezierCurve3=!0,un.prototype.getPoint=function(e,t){t=t||new _e;var i=this.v0,n=this.v1,r=this.v2;return t.set(nn(e,i.x,n.x,r.x),nn(e,i.y,n.y,r.y),nn(e,i.z,n.z,r.z)),t},un.prototype.copy=function(e){return Ji.prototype.copy.call(this,e),this.v0.copy(e.v0),this.v1.copy(e.v1),this.v2.copy(e.v2),this},un.prototype.toJSON=function(){var e=Ji.prototype.toJSON.call(this);return e.v0=this.v0.toArray(),e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e},un.prototype.fromJSON=function(e){return Ji.prototype.fromJSON.call(this,e),this.v0.fromArray(e.v0),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this},((hn.prototype=Object.create(Ji.prototype)).constructor=hn).prototype.isSplineCurve=!0,hn.prototype.getPoint=function(e,t){t=t||new $;var i=this.points,n=(i.length-1)*e;n-=e=Math.floor(n);var r=i[0===e?e:e-1],o=i[e],a=i[e>i.length-2?i.length-1:e+1];return i=i[e>i.length-3?i.length-1:e+2],t.set(tn(n,r.x,o.x,a.x,i.x),tn(n,r.y,o.y,a.y,i.y)),t},hn.prototype.copy=function(e){Ji.prototype.copy.call(this,e),this.points=[];for(var t=0,i=e.points.length;t<i;t++)this.points.push(e.points[t].clone());return this},hn.prototype.toJSON=function(){var e=Ji.prototype.toJSON.call(this);e.points=[];for(var t=0,i=this.points.length;t<i;t++)e.points.push(this.points[t].toArray());return e},hn.prototype.fromJSON=function(e){Ji.prototype.fromJSON.call(this,e),this.points=[];for(var t=0,i=e.points.length;t<i;t++){var n=e.points[t];this.points.push((new $).fromArray(n))}return this};var Ms=Object.freeze({ArcCurve:Qi,CatmullRomCurve3:en,CubicBezierCurve:on,CubicBezierCurve3:an,EllipseCurve:Zi,LineCurve:sn,LineCurve3:ln,QuadraticBezierCurve:cn,QuadraticBezierCurve3:un,SplineCurve:hn});dn.prototype=Object.assign(Object.create(Ji.prototype),{constructor:dn,add:function(e){this.curves.push(e)},closePath:function(){var e=this.curves[0].getPoint(0),t=this.curves[this.curves.length-1].getPoint(1);e.equals(t)||this.curves.push(new sn(t,e))},getPoint:function(e){var t=e*this.getLength(),i=this.getCurveLengths();for(e=0;e<i.length;){if(i[e]>=t)return t=i[e]-t,i=(e=this.curves[e]).getLength(),e.getPointAt(0===i?0:1-t/i);e++}return null},getLength:function(){var e=this.getCurveLengths();return e[e.length-1]},updateArcLengths:function(){this.needsUpdate=!0,this.cacheLengths=null,this.getCurveLengths()},getCurveLengths:function(){if(this.cacheLengths&&this.cacheLengths.length===this.curves.length)return this.cacheLengths;for(var e=[],t=0,i=0,n=this.curves.length;i<n;i++)t+=this.curves[i].getLength(),e.push(t);return this.cacheLengths=e},getSpacedPoints:function(e){void 0===e&&(e=40);for(var t=[],i=0;i<=e;i++)t.push(this.getPoint(i/e));return this.autoClose&&t.push(t[0]),t},getPoints:function(e){e=e||12;for(var t,i=[],n=0,r=this.curves;n<r.length;n++){var o=r[n];o=o.getPoints(o&&o.isEllipseCurve?2*e:o&&o.isLineCurve?1:o&&o.isSplineCurve?e*o.points.length:e);for(var a=0;a<o.length;a++){var s=o[a];t&&t.equals(s)||(i.push(s),t=s)}}return this.autoClose&&1<i.length&&!i[i.length-1].equals(i[0])&&i.push(i[0]),i},copy:function(e){Ji.prototype.copy.call(this,e),this.curves=[];for(var t=0,i=e.curves.length;t<i;t++)this.curves.push(e.curves[t].clone());return this.autoClose=e.autoClose,this},toJSON:function(){var e=Ji.prototype.toJSON.call(this);e.autoClose=this.autoClose,e.curves=[];for(var t=0,i=this.curves.length;t<i;t++)e.curves.push(this.curves[t].toJSON());return e},fromJSON:function(e){Ji.prototype.fromJSON.call(this,e),this.autoClose=e.autoClose,this.curves=[];for(var t=0,i=e.curves.length;t<i;t++){var n=e.curves[t];this.curves.push((new Ms[n.type]).fromJSON(n))}return this}}),pn.prototype=Object.assign(Object.create(dn.prototype),{constructor:pn,setFromPoints:function(e){this.moveTo(e[0].x,e[0].y);for(var t=1,i=e.length;t<i;t++)this.lineTo(e[t].x,e[t].y)},moveTo:function(e,t){this.currentPoint.set(e,t)},lineTo:function(e,t){var i=new sn(this.currentPoint.clone(),new $(e,t));this.curves.push(i),this.currentPoint.set(e,t)},quadraticCurveTo:function(e,t,i,n){e=new cn(this.currentPoint.clone(),new $(e,t),new $(i,n)),this.curves.push(e),this.currentPoint.set(i,n)}
1,bezierCurveTo:function(e,t,i,n,r,o){e=new on(this.currentPoint.clone(),new $(e,t),new $(i,n),new $(r,o)),this.curves.push(e),this.currentPoint.set(r,o)},splineThru:function(e){var t=[this.currentPoint.clone()].concat(e);t=new hn(t),this.curves.push(t),this.currentPoint.copy(e[e.length-1])},arc:function(e,t,i,n,r,o){this.absarc(e+this.currentPoint.x,t+this.currentPoint.y,i,n,r,o)},absarc:function(e,t,i,n,r,o){this.absellipse(e,t,i,i,n,r,o)},ellipse:function(e,t,i,n,r,o,a,s){this.absellipse(e+this.currentPoint.x,t+this.currentPoint.y,i,n,r,o,a,s)},absellipse:function(e,t,i,n,r,o,a,s){e=new Zi(e,t,i,n,r,o,a,s),0<this.curves.length&&((t=e.getPoint(0)).equals(this.currentPoint)||this.lineTo(t.x,t.y)),this.curves.push(e),e=e.getPoint(1),this.currentPoint.copy(e)},copy:function(e){return dn.prototype.copy.call(this,e),this.currentPoint.copy(e.currentPoint),this},toJSON:function(){var e=dn.prototype.toJSON.call(this);return e.currentPoint=this.currentPoint.toArray(),e},fromJSON:function(e){return dn.prototype.fromJSON.call(this,e),this.currentPoint.fromArray(e.currentPoint),this}}),fn.prototype=Object.assign(Object.create(pn.prototype),{constructor:fn,getPointsHoles:function(e){for(var t=[],i=0,n=this.holes.length;i<n;i++)t[i]=this.holes[i].getPoints(e);return t},extractPoints:function(e){return{shape:this.getPoints(e),holes:this.getPointsHoles(e)}},copy:function(e){pn.prototype.copy.call(this,e),this.holes=[];for(var t=0,i=e.holes.length;t<i;t++)this.holes.push(e.holes[t].clone());return this},toJSON:function(){var e=pn.prototype.toJSON.call(this);e.uuid=this.uuid,e.holes=[];for(var t=0,i=this.holes.length;t<i;t++)e.holes.push(this.holes[t].toJSON());return e},fromJSON:function(e){pn.prototype.fromJSON.call(this,e),this.uuid=e.uuid,this.holes=[];for(var t=0,i=e.holes.length;t<i;t++){var n=e.holes[t];this.holes.push((new pn).fromJSON(n))}return this}}),mn.prototype=Object.assign(Object.create(u.prototype),{constructor:mn,isLight:!0,copy:function(e){return u.prototype.copy.call(this,e),this.color.copy(e.color),this.intensity=e.intensity,this},toJSON:function(e){return(e=u.prototype.toJSON.call(this,e)).object.color=this.color.getHex(),e.object.intensity=this.intensity,void 0!==this.groundColor&&(e.object.groundColor=this.groundColor.getHex()),void 0!==this.distance&&(e.object.distance=this.distance),void 0!==this.angle&&(e.object.angle=this.angle),void 0!==this.decay&&(e.object.decay=this.decay),void 0!==this.penumbra&&(e.object.penumbra=this.penumbra),void 0!==this.shadow&&(e.object.shadow=this.shadow.toJSON()),e}}),gn.prototype=Object.assign(Object.create(mn.prototype),{constructor:gn,isHemisphereLight:!0,copy:function(e){return mn.prototype.copy.call(this,e),this.groundColor.copy(e.groundColor),this}}),Object.assign(vn.prototype,{copy:function(e){return this.camera=e.camera.clone(),this.bias=e.bias,this.radius=e.radius,this.mapSize.copy(e.mapSize),this},clone:function(){return(new this.constructor).copy(this)},toJSON:function(){var e={};return 0!==this.bias&&(e.bias=this.bias),1!==this.radius&&(e.radius=this.radius),512===this.mapSize.x&&512===this.mapSize.y||(e.mapSize=this.mapSize.toArray()),e.camera=this.camera.toJSON(!1).object,delete e.camera.matrix,e}}),yn.prototype=Object.assign(Object.create(vn.prototype),{constructor:yn,isSpotLightShadow:!0,update:function(e){var t=this.camera,i=2*oo.RAD2DEG*e.angle,n=this.mapSize.width/this.mapSize.height;e=e.distance||t.far,i===t.fov&&n===t.aspect&&e===t.far||(t.fov=i,t.aspect=n,t.far=e,t.updateProjectionMatrix())}}),xn.prototype=Object.assign(Object.create(mn.prototype),{constructor:xn,isSpotLight:!0,copy:function(e){return mn.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}}),bn.prototype=Object.assign(Object.create(mn.prototype),{constructor:bn,isPointLight:!0,copy:function(e){return mn.prototype.copy.call(this,e),this.distance=e.distance,this.decay=e.decay,this.shadow=e.shadow.clone(),this}}),wn.prototype=Object.assign(Object.create(vn.prototype),{constructor:wn}),_n.prototype=Object.assign(Object.create(mn.prototype),{constructor:_n,isDirectionalLight:!0,copy:function(e){return mn.prototype.copy.call(this,e),this.target=e.target.clone(),this.shadow=e.shadow.clone(),this}}),Tn.prototype=Object.assign(Object.create(mn.prototype),{constructor:Tn,isAmbientLight:!0}),En.prototype=Object.assign(Object.create(mn.prototype),{constructor:En,isRectAreaLight:!0,copy:function(e){return mn.prototype.copy.call(this,e),this.width=e.width,this.height=e.height,this},toJSON:function(e){return(e=mn.prototype.toJSON.call(this,e)).object.width=this.width,e.object.height=this.height,e}}),Sn.prototype=Object.assign(Object.create(On.prototype),{constructor:Sn,ValueTypeName:"string",ValueBufferType:Array,DefaultInterpolation:2300,InterpolantFactoryMethodLinear:void 0,InterpolantFactoryMethodSmooth:void 0}),Mn.prototype=Object.assign(Object.create(On.prototype),{constructor:Mn,ValueTypeName:"bool",ValueBufferType:Array,DefaultInterpolation:2300,InterpolantFactoryMethodLinear:void 0,InterpolantFactoryMethodSmooth:void 0}),Object.assign(An.prototype,{evaluate:function(e){var t=this.parameterPositions,i=this._cachedIndex,n=t[i],r=t[i-1];e:{t:{i:{n:if(!(e<n)){for(var o=i+2;;){if(void 0===n){if(e<r)break n;
1return this._cachedIndex=i=t.length,this.afterEnd_(i-1,e,r)}if(i===o)break;if(r=n,e<(n=t[++i]))break t}n=t.length;break i}if(r<=e)break e;for(e<(o=t[1])&&(i=2,r=o),o=i-2;;){if(void 0===r)return this._cachedIndex=0,this.beforeStart_(0,e,n);if(i===o)break;if(n=r,(r=t[--i-1])<=e)break t}n=i,i=0}for(;i<n;)e<t[r=i+n>>>1]?n=r:i=r+1;if(n=t[i],void 0===(r=t[i-1]))return this._cachedIndex=0,this.beforeStart_(0,e,n);if(void 0===n)return this._cachedIndex=i=t.length,this.afterEnd_(i-1,r,e)}this._cachedIndex=i,this.intervalChanged_(i,r,n)}return this.interpolate_(i,r,e,n)},settings:null,DefaultSettings_:{},getSettings_:function(){return this.settings||this.DefaultSettings_},copySampleValue_:function(e){var t=this.resultBuffer,i=this.sampleValues,n=this.valueSize;e*=n;for(var r=0;r!==n;++r)t[r]=i[e+r];return t},interpolate_:function(){throw Error("call to abstract method")},intervalChanged_:function(){}}),Object.assign(An.prototype,{beforeStart_:An.prototype.copySampleValue_,afterEnd_:An.prototype.copySampleValue_}),Cn.prototype=Object.assign(Object.create(An.prototype),{constructor:Cn,interpolate_:function(e,t,i,n){var r=this.resultBuffer,o=this.sampleValues,a=this.valueSize;for(t=(i-t)/(n-t),i=(e*=a)+a;e!==i;e+=4)j.slerpFlat(r,0,o,e-a,o,e,t);return r}}),Ln.prototype=Object.assign(Object.create(On.prototype),{constructor:Ln,ValueTypeName:"quaternion",DefaultInterpolation:2301,InterpolantFactoryMethodLinear:function(e){return new Cn(this.times,this.values,this.getValueSize(),e)},InterpolantFactoryMethodSmooth:void 0}),Rn.prototype=Object.assign(Object.create(On.prototype),{constructor:Rn,ValueTypeName:"color"}),Pn.prototype=Object.assign(Object.create(On.prototype),{constructor:Pn,ValueTypeName:"number"}),kn.prototype=Object.assign(Object.create(An.prototype),{constructor:kn,DefaultSettings_:{endingStart:2400,endingEnd:2400},intervalChanged_:function(e,t,i){var n=this.parameterPositions,r=e-2,o=e+1,a=n[r],s=n[o];if(void 0===a)switch(this.getSettings_().endingStart){case 2401:r=e,a=2*t-i;break;case 2402:a=t+n[r=n.length-2]-n[r+1];break;default:r=e,a=i}if(void 0===s)switch(this.getSettings_().endingEnd){case 2401:o=e,s=2*i-t;break;case 2402:s=i+n[o=1]-n[0];break;default:o=e-1,s=t}e=.5*(i-t),n=this.valueSize,this._weightPrev=e/(t-a),this._weightNext=e/(s-i),this._offsetPrev=r*n,this._offsetNext=o*n},interpolate_:function(e,t,i,n){var r=this.resultBuffer,o=this.sampleValues,a=this.valueSize,s=(e*=a)-a,l=this._offsetPrev,c=this._offsetNext,u=this._weightPrev,h=this._weightNext,d=(i-t)/(n-t);for(t=-u*(n=(i=d*d)*d)+2*u*i-u*d,u=(1+u)*n+(-1.5-2*u)*i+(-.5+u)*d+1,d=(-1-h)*n+(1.5+h)*i+.5*d,h=h*n-h*i,i=0;i!==a;++i)r[i]=t*o[l+i]+u*o[s+i]+d*o[e+i]+h*o[c+i];return r}}),Nn.prototype=Object.assign(Object.create(An.prototype),{constructor:Nn,interpolate_:function(e,t,i,n){var r=this.resultBuffer,o=this.sampleValues,a=this.valueSize,s=(e*=a)-a;for(i=1-(t=(i-t)/(n-t)),n=0;n!==a;++n)r[n]=o[s+n]*i+o[e+n]*t;return r}}),Dn.prototype=Object.assign(Object.create(An.prototype),{constructor:Dn,interpolate_:function(e){return this.copySampleValue_(e-1)}});var As={arraySlice:function(e,t,i){return As.isTypedArray(e)?new e.constructor(e.subarray(t,void 0!==i?i:e.length)):e.slice(t,i)},convertArray:function(e,t,i){return!e||!i&&e.constructor===t?e:"number"==typeof t.BYTES_PER_ELEMENT?new t(e):Array.prototype.slice.call(e)},isTypedArray:function(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)},getKeyframeOrder:function(i){for(var e=i.length,t=Array(e),n=0;n!==e;++n)t[n]=n;return t.sort(function(e,t){return i[e]-i[t]}),t},sortedArray:function(e,t,i){for(var n=e.length,r=new e.constructor(n),o=0,a=0;a!==n;++o)for(var s=i[o]*t,l=0;l!==t;++l)r[a++]=e[s+l];return r},flattenJSON:function(e,t,i,n){for(var r=1,o=e[0];void 0!==o&&void 0===o[n];)o=e[r++];if(void 0!==o){var a=o[n];if(void 0!==a)if(Array.isArray(a))for(;void 0!==(a=o[n])&&(t.push(o.time),i.push.apply(i,a)),void 0!==(o=e[r++]););else if(void 0!==a.toArray)for(;void 0!==(a=o[n])&&(t.push(o.time),a.toArray(i,i.length)),void 0!==(o=e[r++]););else for(;void 0!==(a=o[n])&&(t.push(o.time),i.push(a)),void 0!==(o=e[r++]););}}};Object.assign(On,{parse:function(e){if(void 0===e.type)throw Error("THREE.KeyframeTrack: track type undefined, can not parse");var t=On._getTrackTypeForValueTypeName(e.type);if(void 0===e.times){var i=[],n=[];As.flattenJSON(e.keys,i,n,"value"),e.times=i,e.values=n}return void 0!==t.parse?t.parse(e):new t(e.name,e.times,e.values,e.interpolation)},toJSON:function(e){var t=e.constructor;if(void 0!==t.toJSON)t=t.toJSON(e);else{t={name:e.name,times:As.convertArray(e.times,Array),values:As.convertArray(e.values,Array)};var i=e.getInterpolation();i!==e.DefaultInterpolation&&(t.interpolation=i)}return t.type=e.ValueTypeName,t},_getTrackTypeForValueTypeName:function(e){switch(e.toLowerCase()){case"scalar":case"double":case"float":case"number":case"integer":return Pn;
1case"vector":case"vector2":case"vector3":case"vector4":return In;case"color":return Rn;case"quaternion":return Ln;case"bool":case"boolean":return Mn;case"string":return Sn}throw Error("THREE.KeyframeTrack: Unsupported typeName: "+e)}}),Object.assign(On.prototype,{constructor:On,TimeBufferType:Float32Array,ValueBufferType:Float32Array,DefaultInterpolation:2301,InterpolantFactoryMethodDiscrete:function(e){return new Dn(this.times,this.values,this.getValueSize(),e)},InterpolantFactoryMethodLinear:function(e){return new Nn(this.times,this.values,this.getValueSize(),e)},InterpolantFactoryMethodSmooth:function(e){return new kn(this.times,this.values,this.getValueSize(),e)},setInterpolation:function(e){switch(e){case 2300:var t=this.InterpolantFactoryMethodDiscrete;break;case 2301:t=this.InterpolantFactoryMethodLinear;break;case 2302:t=this.InterpolantFactoryMethodSmooth}if(void 0===t){if(t="unsupported interpolation for "+this.ValueTypeName+" keyframe track named "+this.name,void 0===this.createInterpolant){if(e===this.DefaultInterpolation)throw Error(t);this.setInterpolation(this.DefaultInterpolation)}console.warn("THREE.KeyframeTrack:",t)}else this.createInterpolant=t},getInterpolation:function(){switch(this.createInterpolant){case this.InterpolantFactoryMethodDiscrete:return 2300;case this.InterpolantFactoryMethodLinear:return 2301;case this.InterpolantFactoryMethodSmooth:return 2302}},getValueSize:function(){return this.values.length/this.times.length},shift:function(e){if(0!==e)for(var t=this.times,i=0,n=t.length;i!==n;++i)t[i]+=e;return this},scale:function(e){if(1!==e)for(var t=this.times,i=0,n=t.length;i!==n;++i)t[i]*=e;return this},trim:function(e,t){for(var i=this.times,n=i.length,r=0,o=n-1;r!==n&&i[r]<e;)++r;for(;-1!==o&&i[o]>t;)--o;return++o,0===r&&o===n||(o<=r&&(r=(o=Math.max(o,1))-1),e=this.getValueSize(),this.times=As.arraySlice(i,r,o),this.values=As.arraySlice(this.values,r*e,o*e)),this},validate:function(){var e=!0,t=this.getValueSize();0!=t-Math.floor(t)&&(console.error("THREE.KeyframeTrack: Invalid value size in track.",this),e=!1);var i=this.times;t=this.values;var n=i.length;0===n&&(console.error("THREE.KeyframeTrack: Track is empty.",this),e=!1);for(var r=null,o=0;o!==n;o++){var a=i[o];if("number"==typeof a&&isNaN(a)){console.error("THREE.KeyframeTrack: Time is not a valid number.",this,o,a),e=!1;break}if(null!==r&&a<r){console.error("THREE.KeyframeTrack: Out of order keys.",this,o,a,r),e=!1;break}r=a}if(void 0!==t&&As.isTypedArray(t))for(o=0,i=t.length;o!==i;++o)if(n=t[o],isNaN(n)){console.error("THREE.KeyframeTrack: Value is not a valid number.",this,o,n),e=!1;break}return e},optimize:function(){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){var s=!1,l=e[a];if(l!==e[a+1]&&(1!==a||l!==l[0]))if(n)s=!0;else{var c=a*i,u=c-i,h=c+i;for(l=0;l!==i;++l){var d=t[c+l];if(d!==t[u+l]||d!==t[h+l]){s=!0;break}}}if(s){if(a!==r)for(e[r]=e[a],s=a*i,c=r*i,l=0;l!==i;++l)t[c+l]=t[s+l];++r}}if(0<o){for(e[r]=e[o],s=o*i,c=r*i,l=0;l!==i;++l)t[c+l]=t[s+l];++r}return r!==e.length&&(this.times=As.arraySlice(e,0,r),this.values=As.arraySlice(t,0,r*i)),this}}),In.prototype=Object.assign(Object.create(On.prototype),{constructor:In,ValueTypeName:"vector"}),Object.assign(Un,{parse:function(e){for(var t=[],i=e.tracks,n=1/(e.fps||1),r=0,o=i.length;r!==o;++r)t.push(On.parse(i[r]).scale(n));return new Un(e.name,e.duration,t)},toJSON:function(e){var t=[],i=e.tracks;e={name:e.name,duration:e.duration,tracks:t};for(var n=0,r=i.length;n!==r;++n)t.push(On.toJSON(i[n]));return e},CreateFromMorphTargetSequence:function(e,t,i,n){for(var r=t.length,o=[],a=0;a<r;a++){var s=[],l=[];s.push((a+r-1)%r,a,(a+1)%r),l.push(0,1,0);var c=As.getKeyframeOrder(s);s=As.sortedArray(s,1,c),l=As.sortedArray(l,1,c),n||0!==s[0]||(s.push(r),l.push(l[0])),o.push(new Pn(".morphTargetInfluences["+t[a].name+"]",s,l).scale(1/i))}return new Un(e,-1,o)},findByName:function(e,t){var i=e;for(Array.isArray(e)||(i=e.geometry&&e.geometry.animations||e.animations),e=0;e<i.length;e++)if(i[e].name===t)return i[e];return null},CreateClipsFromMorphTargetSequences:function(e,t,i){for(var n={},r=/^([\w-]*?)([\d]+)$/,o=0,a=e.length;o<a;o++){var s=e[o],l=s.name.match(r);if(l&&1<l.length){var c=l[1];(l=n[c])||(n[c]=l=[]),l.push(s)}}for(c in e=[],n)e.push(Un.CreateFromMorphTargetSequence(c,n[c],t,i));return e},parseAnimation:function(e,t){if(!e)return console.error("THREE.AnimationClip: No animation in JSONLoader data."),null;var i=function(e,t,i,n,r){if(0!==i.length){var o=[],a=[];As.flattenJSON(i,o,a,n),0!==o.length&&r.push(new e(t,o,a))}},n=[],r=e.name||"default",o=e.length||-1,a=e.fps||30;e=e.hierarchy||[];for(var s=0;s<e.length;s++){var l=e[s].keys;if(l&&0!==l.length)if(l[0].morphTargets){o={};for(var c=0;c<l.length;c++)if(l[c].morphTargets)for(var u=0;u<l[c].morphTargets.length;u++)o[l[c].morphTargets[u]]=-1;for(var h in o){var d=[],p=[];for(u=0;u!==l[c].morphTargets.length;++u){var f=l[c];d.push(f.time),p.push(f.morphTarget===h?1:0)}n.push(new Pn(".morphTargetInfluence["+h+"]",d,p))}o=o.length*(a||1)}else i(In,(c=".bones["+t[s].name+"]")+".position",l,"pos",n),i(Ln,c+".quaternion",l,"rot",n),i(In,c+".scale",l,"scl",n)}return 0===n.length?null:new Un(r,o,n)}}),Object.assign(Un.prototype,{resetDuration:function(){for(var e=0,t=0,i=this.tracks.length;t!==i;++t){var n=this.tracks[t];e=Math.max(e,n.times[n.times.length-1])}this.duration=e},trim:function(){for(var e=0;e<this.tracks.length;e++)this.tracks[e].trim(0,this.duration);return this},optimize:function(){for(var e=0;e<this.tracks.length;e++)this.tracks[e].optimize();return this}}),Object.assign(zn.prototype,{load:function(e,t,i,n){var r=this;new Vi(r.manager).load(e,function(e){t(r.parse(JSON.parse(e)))},i,n)},setTextures:function(e){this.textures=e},parse:function(e){function t(e){return void 0===i[e]&&console.warn("THREE.MaterialLoader: Undefined texture",e),i[e]}var i=this.textures,n=new ys[e.type];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.op
1acity=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.rotation&&(n.rotation=e.rotation),1!==e.linewidth&&(n.linewidth=e.linewidth),void 0!==e.dashSize&&(n.dashSize=e.dashSize),void 0!==e.gapSize&&(n.gapSize=e.gapSize),void 0!==e.scale&&(n.scale=e.scale),void 0!==e.polygonOffset&&(n.polygonOffset=e.polygonOffset),void 0!==e.polygonOffsetFactor&&(n.polygonOffsetFactor=e.polygonOffsetFactor),void 0!==e.polygonOffsetUnits&&(n.polygonOffsetUnits=e.polygonOffsetUnits),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=t(e.map)),void 0!==e.alphaMap&&(n.alphaMap=t(e.alphaMap),n.transparent=!0),void 0!==e.bumpMap&&(n.bumpMap=t(e.bumpMap)),void 0!==e.bumpScale&&(n.bumpScale=e.bumpScale),void 0!==e.normalMap&&(n.normalMap=t(e.normalMap)),void 0!==e.normalScale){var r=e.normalScale;!1===Array.isArray(r)&&(r=[r,r]),n.normalScale=(new $).fromArray(r)}return void 0!==e.displacementMap&&(n.displacementMap=t(e.displacementMap)),void 0!==e.displacementScale&&(n.displacementScale=e.displacementScale),void 0!==e.displacementBias&&(n.displacementBias=e.displacementBias),void 0!==e.roughnessMap&&(n.roughnessMap=t(e.roughnessMap)),void 0!==e.metalnessMap&&(n.metalnessMap=t(e.metalnessMap)),void 0!==e.emissiveMap&&(n.emissiveMap=t(e.emissiveMap)),void 0!==e.emissiveIntensity&&(n.emissiveIntensity=e.emissiveIntensity),void 0!==e.specularMap&&(n.specularMap=t(e.specularMap)),void 0!==e.envMap&&(n.envMap=t(e.envMap)),void 0!==e.reflectivity&&(n.reflectivity=e.reflectivity),void 0!==e.lightMap&&(n.lightMap=t(e.lightMap)),void 0!==e.lightMapIntensity&&(n.lightMapIntensity=e.lightMapIntensity),void 0!==e.aoMap&&(n.aoMap=t(e.aoMap)),void 0!==e.aoMapIntensity&&(n.aoMapIntensity=e.aoMapIntensity),void 0!==e.gradientMap&&(n.gradientMap=t(e.gradientMap)),n}}),Object.assign(Hn.prototype,{load:function(e,t,i,n){var r=this;new Vi(r.manager).load(e,function(e){t(r.parse(JSON.parse(e)))},i,n)},parse:function(e){var t=new L,i=e.data.index;void 0!==i&&(i=new ks[i.type](i.array),t.setIndex(new y(i,1)));var n=e.data.attributes;for(o in n){var r=n[o];i=new ks[r.type](r.array),t.addAttribute(o,new y(i,r.itemSize,r.normalized))}var o=e.data.groups||e.data.drawcalls||e.data.offsets;if(void 0!==o)for(i=0,n=o.length;i!==n;++i)r=o[i],t.addGroup(r.start,r.count,r.materialIndex);return void 0!==(e=e.data.boundingSphere)&&(o=new _e,void 0!==e.center&&o.fromArray(e.center),t.boundingSphere=new a(o,e.radius)),t}});var Cs,Ls,Rs,Ps,ks={Int8Array:Int8Array,Uint8Array:Uint8Array,Uint8ClampedArray:"undefined"!=typeof Uint8ClampedArray?Uint8ClampedArray:Uint8Array,Int16Array:Int16Array,Uint16Array:Uint16Array,Int32Array:Int32Array,Uint32Array:Uint32Array,Float32Array:Float32Array,Float64Array:Float64Array};Fn.Handlers={handlers:[],add:function(e,t){this.handlers.push(e,t)},get:function(e){for(var t=this.handlers,i=0,n=t.length;i<n;i+=2){var r=t[i+1];if(t[i].test(e))return r}return null}},Object.assign(Fn.prototype,{crossOrigin:void 0,onLoadStart:function(){},onLoadProgress:function(){},onLoadComplete:function(){},initMaterials:function(e,t,i){for(var n=[],r=0;r<e.length;++r)n[r]=this.createMaterial(e[r],t,i);return n},createMaterial:(Cs={NoBlending:0,NormalBlending:1,AdditiveBlending:2,SubtractiveBlending:3,MultiplyBlending:4,CustomBlending:5},Ls=new _,Rs=new Yi,Ps=new zn,function(e,a,s){function t(e,t,i,n,r){e=a+e;var o=Fn.Handlers.get(e);return null!==o?e=o.load(e):(Rs.setCrossOrigin(s),e=Rs.load(e)),void 0!==t&&(e.repeat.fromArray(t),1!==t[0]&&(e.wrapS=1e3),1!==t[1]&&(e.wrapT=1e3)),void 0!==i&&e.offset.fromArray(i),void 0!==n&&("repeat"===n[0]&&(e.wrapS=1e3),"mirror"===n[0]&&(e.wrapS=1002),"repeat"===n[1]&&(e.wrapT=1e3),"mirror"===n[1]&&(e.wrapT=1002)),void 0!==r&&(e.anisotropy=r),t=oo.generateUUID(),l[t]=e,t}var i,l={},n={uuid:oo.generateUUID(),type:"MeshLambertMaterial"};for(i in e){var r=e[i];switch(i){case"DbgColor":case"DbgIndex":case"opticalDensity":case"illumination":break;case"DbgName":n.name=r;break;case"blending":n.blending=Cs[r];break;case"colorAmbient":case"mapAmbient":console.warn("THREE.Loader.createMaterial:",i,"is no longer supported.");break;case"colorDiffuse":n.color=Ls.fromArray(r).getHex();break;case"colorSpecular":n.specular=Ls.fromArray(r).getHex();break;case"colorEmissive":n.emissive=Ls.fromArray(r).getHex();break;case"specularCoef":n.shininess=r;break;case"shading":"basic"===r.toLowerCase()&&(n.type="MeshBasicMaterial"),"phong"===r.toLowerCase()&&(n.type="MeshPhongMaterial"),"standard"===r.toLowerCase()&&(n.type="MeshStandardMaterial");break;case"mapDiffuse":n.map=t(r,e.mapDiffuseRepeat,e.mapDiffuseOffset,e.mapDiffuseWrap,e.mapDiffuseAnisotropy);break;case"mapDiffuseRepeat":case"mapDiffuseOffset":case"mapDiffuseWrap":case"mapDiffuseAnisotropy":break;case"mapEmissive":n.emissiveMap=t(r,e.mapEmissiveRepeat,e.mapEmissiveOffset,e.mapEmissiveWrap,e.mapEmissiveAnisotropy);break;case"mapEmissiveRepeat":case"mapEmissiveOffset":case"mapEmissiveWrap":case"mapEmissiveAnisotropy":break;case"mapLight":n.lightMap=t(r,e.mapLightRepeat,e.mapLightOffset,e.mapLightWrap,e.mapLightAnisotropy);break;case"mapLightRepeat":case"mapLightOffset":case"mapLightWrap":case"mapLightAnisotropy":break;case"mapAO":n.aoMap=t(r,e.mapAORepeat,e.mapAOOffset,e.mapAOWrap,e.mapAOAnisotropy);break;case"mapAORepeat":case"mapAOOffset":case"mapAOWrap":case"mapAOAnisotropy":break;case"mapBump":n.bumpMap=t(r,e.mapBumpRepeat,e.mapBumpOffset,e.mapBumpWrap,e.mapBumpAnisotropy);break;case"mapBumpScale":n.bumpScale=r;break;case"mapBumpRepeat":case"mapBumpOffset":case"mapBumpWrap":case"mapBumpAnisotropy":break;case"mapNormal":n.normalMap=t(r,e.mapNormalRepeat,e.mapNormalOffset,e.mapNormalWrap,e.mapNormalAnisotropy);break;case"mapNormalFactor":n.normalScale=r;break;case"mapNormalRepeat":case"mapNormalOffset":case"mapNormalWrap":case"mapNormalAnisotropy":break;case"mapSpecular":n.specularMap=t(r,e.mapSpecularRepeat,e.mapSpecularOffset,e.mapSpecularWrap,e.mapSpecularAnisotropy);break;case"mapSpecularRepeat":case"mapSpecularOffset":case"mapSpecularWrap":case"mapSpecularAnisotropy":break;case"mapMetalness":n.metalnessMap=t(r,e.mapMetalnessRepeat,e.mapMetalnessOffset,e.mapMetalnessWrap,e.mapMetalnessAnisotropy);break;case"mapMetalnessRepeat":case"mapMetalnessOffset":case"mapMetalnessWrap":case"mapMetalnessAnisotropy":break;case"mapRoughness":n.roughnessMap=t(r,e.mapRoughnessRepeat,e.mapRoughnessOffset,e.mapRoughnessWrap,e.mapRoughnessAnisotropy);break;case"mapRoughnessRepeat":case"mapRoughnessOffset":case"mapRoughnessWrap":case"mapRoughnessAnisotropy":break;
1case"mapAlpha":n.alphaMap=t(r,e.mapAlphaRepeat,e.mapAlphaOffset,e.mapAlphaWrap,e.mapAlphaAnisotropy);break;case"mapAlphaRepeat":case"mapAlphaOffset":case"mapAlphaWrap":case"mapAlphaAnisotropy":break;case"flipSided":n.side=1;break;case"doubleSided":n.side=2;break;case"transparency":console.warn("THREE.Loader.createMaterial: transparency has been renamed to opacity"),n.opacity=r;break;case"depthTest":case"depthWrite":case"colorWrite":case"opacity":case"reflectivity":case"transparent":case"visible":case"wireframe":n[i]=r;break;case"vertexColors":!0===r&&(n.vertexColors=2),"face"===r&&(n.vertexColors=1);break;default:console.error("THREE.Loader.createMaterial: Unsupported",i,r)}}return"MeshBasicMaterial"===n.type&&delete n.emissive,"MeshPhongMaterial"!==n.type&&delete n.specular,n.opacity<1&&(n.transparent=!0),Ps.setTextures(l),Ps.parse(n)})});var Ns={decodeText:function(e){if("undefined"!=typeof TextDecoder)return(new TextDecoder).decode(e);for(var t="",i=0,n=e.length;i<n;i++)t+=String.fromCharCode(e[i]);return decodeURIComponent(escape(t))},extractUrlBase:function(e){return 1===(e=e.split("/")).length?"./":(e.pop(),e.join("/")+"/")}};Object.assign(Bn.prototype,{load:function(i,n,e,t){var r=this,o=this.texturePath&&"string"==typeof this.texturePath?this.texturePath:Ns.extractUrlBase(i),a=new Vi(this.manager);a.setWithCredentials(this.withCredentials),a.load(i,function(e){var t=(e=JSON.parse(e)).metadata;void 0===t||(void 0===(t=t.type)||"object"!==t.toLowerCase())?(e=r.parse(e,o),n(e.geometry,e.materials)):console.error("THREE.JSONLoader: "+i+" should be loaded with THREE.ObjectLoader instead.")},e,t)},setTexturePath:function(e){this.texturePath=e},parse:function(e,t){void 0!==e.data&&(e=e.data),e.scale=void 0!==e.scale?1/e.scale:1;var i,n,r,o=new T,a=e,s=a.faces,l=a.vertices,c=a.normals,u=a.colors,h=a.scale,d=0;if(void 0!==a.uvs){for(i=0;i<a.uvs.length;i++)a.uvs[i].length&&d++;for(i=0;i<d;i++)o.faceVertexUvs[i]=[]}var p=0;for(r=l.length;p<r;)(i=new _e).x=l[p++]*h,i.y=l[p++]*h,i.z=l[p++]*h,o.vertices.push(i);for(p=0,r=s.length;p<r;){var f=1&(l=s[p++]),m=2&l;i=8&l;var g=16&l,v=32&l;if(h=64&l,l&=128,f){(f=new U).a=s[p],f.b=s[p+1],f.c=s[p+3];var y=new U;if(y.a=s[p+1],y.b=s[p+2],y.c=s[p+3],p+=4,m&&(m=s[p++],f.materialIndex=m,y.materialIndex=m),m=o.faces.length,i)for(i=0;i<d;i++){var x=a.uvs[i];for(o.faceVertexUvs[i][m]=[],o.faceVertexUvs[i][m+1]=[],n=0;n<4;n++){var b=s[p++],w=x[2*b];w=new $(w,b=x[2*b+1]),2!==n&&o.faceVertexUvs[i][m].push(w),0!==n&&o.faceVertexUvs[i][m+1].push(w)}}if(g&&(g=3*s[p++],f.normal.set(c[g++],c[g++],c[g]),y.normal.copy(f.normal)),v)for(i=0;i<4;i++)g=3*s[p++],v=new _e(c[g++],c[g++],c[g]),2!==i&&f.vertexNormals.push(v),0!==i&&y.vertexNormals.push(v);if(h&&(h=u[h=s[p++]],f.color.setHex(h),y.color.setHex(h)),l)for(i=0;i<4;i++)h=u[h=s[p++]],2!==i&&f.vertexColors.push(new _(h)),0!==i&&y.vertexColors.push(new _(h));o.faces.push(f),o.faces.push(y)}else{if((f=new U).a=s[p++],f.b=s[p++],f.c=s[p++],m&&(m=s[p++],f.materialIndex=m),m=o.faces.length,i)for(i=0;i<d;i++)for(x=a.uvs[i],o.faceVertexUvs[i][m]=[],n=0;n<3;n++)w=new $(w=x[2*(b=s[p++])],b=x[2*b+1]),o.faceVertexUvs[i][m].push(w);if(g&&(g=3*s[p++],f.normal.set(c[g++],c[g++],c[g])),v)for(i=0;i<3;i++)g=3*s[p++],v=new _e(c[g++],c[g++],c[g]),f.vertexNormals.push(v);if(h&&(h=s[p++],f.color.setHex(u[h])),l)for(i=0;i<3;i++)h=s[p++],f.vertexColors.push(new _(u[h]));o.faces.push(f)}}if(p=void 0!==(a=e).influencesPerVertex?a.influencesPerVertex:2,a.skinWeights)for(r=0,s=a.skinWeights.length;r<s;r+=p)o.skinWeights.push(new Te(a.skinWeights[r],1<p?a.skinWeights[r+1]:0,2<p?a.skinWeights[r+2]:0,3<p?a.skinWeights[r+3]:0));if(a.skinIndices)for(r=0,s=a.skinIndices.length;r<s;r+=p)o.skinIndices.push(new Te(a.skinIndices[r],1<p?a.skinIndices[r+1]:0,2<p?a.skinIndices[r+2]:0,3<p?a.skinIndices[r+3]:0));if(o.bones=a.bones,o.bones&&0<o.bones.length&&(o.skinWeights.length!==o.skinIndices.length||o.skinIndices.length!==o.vertices.length)&&console.warn("When skinning, number of vertices ("+o.vertices.length+"), skinIndices ("+o.skinIndices.length+"), and skinWeights ("+o.skinWeights.length+") should match."),s=(r=e).scale,void 0!==r.morphTargets)for(a=0,p=r.morphTargets.length;a<p;a++)for(o.morphTargets[a]={},o.morphTargets[a].name=r.morphTargets[a].name,o.morphTargets[a].vertices=[],c=o.morphTargets[a].vertices,d=0,l=(u=r.morphTargets[a].vertices).length;d<l;d+=3)(h=new _e).x=u[d]*s,h.y=u[d+1]*s,h.z=u[d+2]*s,c.push(h);if(void 0!==r.morphColors&&0<r.morphColors.length)for(console.warn('THREE.JSONLoader: "morphColors" no longer supported. Using them as face colors.'),s=o.faces,r=r.morphColors[0].colors,a=0,p=s.length;a<p;a++)s[a].color.fromArray(r,3*a);for(a=[],p=[],void 0!==(r=e).animation&&p.push(r.animation),void 0!==r.animations&&(r.animations.length?p=p.concat(r.animations):p.push(r.animations)),r=0;r<p.length;r++)(s=Un.parseAnimation(p[r],o.bones))&&a.push(s);return o.morphTargets&&(p=Un.CreateClipsFromMorphTargetSequences(o.morphTargets,10),a=a.concat(p)),0<a.length&&(o.animations=a),o.computeFaceNormals(),o.computeBoundingSphere(),void 0===e.materials||0===e.materials.length?{geometry:o}:{geometry:o,materials:e=Fn.prototype.initMaterials(e.materials,t,this.crossOrigin)}}}),Object.assign(Gn.prototype,{load:function(i,n,e,r){""===this.texturePath&&(this.texturePath=i.substring(0,i.lastIndexOf("/")+1));var o=this;new Vi(o.manager).load(i,function(e){var t=null;try{t=JSON.parse(e)}catch(e){return void 0!==r&&r(e),void console.error("THREE:ObjectLoader: Can't parse "+i+".",e.message)}void 0===(e=t.metadata)||void 0===e.type||"geometry"===e.type.toLowerCase()?console.error("THREE.ObjectLoader: Can't load "+i+". Use THREE.JSONLoader instead."):o.parse(t,n)},e,r)},setTexturePath:function(e){this.texturePath=e},setCrossOrigin:function(e){this.crossOrigin=e},parse:function(e,t){var i=this.parseShape(e.shapes);i=this.parseGeometries(e.geometries,i);var n=this.parseImages(e.images,function(){void 0!==t&&t(r)});n=this.parseTextures(e.textures,n),n=this.parseMaterials(e.materials,n);var r=this.parseObject(e.object,i,n);return e.animations&&(r.animations=this.parseAnimations(e.animations)),void 0!==e.images&&0!==e.images.length||void 0===t||t(r),r},parseShape:function(e){var t={};if(void 0!==e)for(var i=0,n=e.length;i<n;i++){var r=(new fn).fromJSON(e[i]);t[r.uuid]=r}return t},parseGeometries:function(e,t){var i={};if(void 0!==e)for(var n=new Bn,r=new Hn,o=0,a=e.length;o<a;o++){var s=e[o];switch(s.type){case"PlaneGeometry":case"PlaneBufferGeometry":var l=new vs[s.type](s.width,s.height,s.widthSegments,s.heightSegments);break;case"BoxGeometry":case"BoxBufferGeometry":case"CubeGeometry":l=new vs[s.type](s.width,s.height,s.depth,s.widthSegments,s.heightSegments,s.depthSegments);break;
1case"CircleGeometry":case"CircleBufferGeometry":l=new vs[s.type](s.radius,s.segments,s.thetaStart,s.thetaLength);break;case"CylinderGeometry":case"CylinderBufferGeometry":l=new vs[s.type](s.radiusTop,s.radiusBottom,s.height,s.radialSegments,s.heightSegments,s.openEnded,s.thetaStart,s.thetaLength);break;case"ConeGeometry":case"ConeBufferGeometry":l=new vs[s.type](s.radius,s.height,s.radialSegments,s.heightSegments,s.openEnded,s.thetaStart,s.thetaLength);break;case"SphereGeometry":case"SphereBufferGeometry":l=new vs[s.type](s.radius,s.widthSegments,s.heightSegments,s.phiStart,s.phiLength,s.thetaStart,s.thetaLength);break;case"DodecahedronGeometry":case"DodecahedronBufferGeometry":case"IcosahedronGeometry":case"IcosahedronBufferGeometry":case"OctahedronGeometry":case"OctahedronBufferGeometry":case"TetrahedronGeometry":case"TetrahedronBufferGeometry":l=new vs[s.type](s.radius,s.detail);break;case"RingGeometry":case"RingBufferGeometry":l=new vs[s.type](s.innerRadius,s.outerRadius,s.thetaSegments,s.phiSegments,s.thetaStart,s.thetaLength);break;case"TorusGeometry":case"TorusBufferGeometry":l=new vs[s.type](s.radius,s.tube,s.radialSegments,s.tubularSegments,s.arc);break;case"TorusKnotGeometry":case"TorusKnotBufferGeometry":l=new vs[s.type](s.radius,s.tube,s.tubularSegments,s.radialSegments,s.p,s.q);break;case"LatheGeometry":case"LatheBufferGeometry":l=new vs[s.type](s.points,s.segments,s.phiStart,s.phiLength);break;case"PolyhedronGeometry":case"PolyhedronBufferGeometry":l=new vs[s.type](s.vertices,s.indices,s.radius,s.details);break;case"ShapeGeometry":case"ShapeBufferGeometry":for(l=[],o=0,a=s.shapes.length;o<a;o++)l.push(t[s.shapes[o]]);l=new vs[s.type](l,s.curveSegments);break;case"BufferGeometry":l=r.parse(s);break;case"Geometry":l=n.parse(s,this.texturePath).geometry;break;default:console.warn('THREE.ObjectLoader: Unsupported geometry type "'+s.type+'"');continue}l.uuid=s.uuid,void 0!==s.name&&(l.name=s.name),i[s.uuid]=l}return i},parseMaterials:function(e,t){var i={};if(void 0!==e){var n=new zn;n.setTextures(t),t=0;for(var r=e.length;t<r;t++){var o=e[t];if("MultiMaterial"===o.type){for(var a=[],s=0;s<o.materials.length;s++)a.push(n.parse(o.materials[s]));i[o.uuid]=a}else i[o.uuid]=n.parse(o)}}return i},parseAnimations:function(e){for(var t=[],i=0;i<e.length;i++){var n=Un.parse(e[i]);t.push(n)}return t},parseImages:function(e,t){function i(e){return n.manager.itemStart(e),o.load(e,function(){n.manager.itemEnd(e)},void 0,function(){n.manager.itemEnd(e),n.manager.itemError(e)})}var n=this,r={};if(void 0!==e&&0<e.length){var o=new qi(t=new ji(t));o.setCrossOrigin(this.crossOrigin),t=0;for(var a=e.length;t<a;t++){var s=e[t],l=/^(\/\/)|([a-z]+:(\/\/)?)/i.test(s.url)?s.url:n.texturePath+s.url;r[s.uuid]=i(l)}}return r},parseTextures:function(e,t){function i(e,t){return"number"==typeof e?e:(console.warn("THREE.ObjectLoader.parseTexture: Constant should be in numeric form.",e),t[e])}var n={};if(void 0!==e)for(var r=0,o=e.length;r<o;r++){var a=e[r];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);var s=new d(t[a.image]);s.needsUpdate=!0,s.uuid=a.uuid,void 0!==a.name&&(s.name=a.name),void 0!==a.mapping&&(s.mapping=i(a.mapping,Ds)),void 0!==a.offset&&s.offset.fromArray(a.offset),void 0!==a.repeat&&s.repeat.fromArray(a.repeat),void 0!==a.center&&s.center.fromArray(a.center),void 0!==a.rotation&&(s.rotation=a.rotation),void 0!==a.wrap&&(s.wrapS=i(a.wrap[0],Os),s.wrapT=i(a.wrap[1],Os)),void 0!==a.format&&(s.format=a.format),void 0!==a.minFilter&&(s.minFilter=i(a.minFilter,Is)),void 0!==a.magFilter&&(s.magFilter=i(a.magFilter,Is)),void 0!==a.anisotropy&&(s.anisotropy=a.anisotropy),void 0!==a.flipY&&(s.flipY=a.flipY),n[a.uuid]=s}return n},parseObject:function(e,t,o){function i(e){return void 0===t[e]&&console.warn("THREE.ObjectLoader: Undefined geometry",e),t[e]}function n(e){if(void 0!==e){if(Array.isArray(e)){for(var t=[],i=0,n=e.length;i<n;i++){var r=e[i];void 0===o[r]&&console.warn("THREE.ObjectLoader: Undefined material",r),t.pu
1sh(o[r])}return t}return void 0===o[e]&&console.warn("THREE.ObjectLoader: Undefined material",e),o[e]}}switch(e.type){case"Scene":var r=new mt;void 0!==e.background&&Number.isInteger(e.background)&&(r.background=new _(e.background)),void 0!==e.fog&&("Fog"===e.fog.type?r.fog=new ft(e.fog.color,e.fog.near,e.fog.far):"FogExp2"===e.fog.type&&(r.fog=new pt(e.fog.color,e.fog.density)));break;case"PerspectiveCamera":r=new ct(e.fov,e.aspect,e.near,e.far),void 0!==e.focus&&(r.focus=e.focus),void 0!==e.zoom&&(r.zoom=e.zoom),void 0!==e.filmGauge&&(r.filmGauge=e.filmGauge),void 0!==e.filmOffset&&(r.filmOffset=e.filmOffset),void 0!==e.view&&(r.view=Object.assign({},e.view));break;case"OrthographicCamera":r=new p(e.left,e.right,e.top,e.bottom,e.near,e.far),void 0!==e.zoom&&(r.zoom=e.zoom),void 0!==e.view&&(r.view=Object.assign({},e.view));break;case"AmbientLight":r=new Tn(e.color,e.intensity);break;case"DirectionalLight":r=new _n(e.color,e.intensity);break;case"PointLight":r=new bn(e.color,e.intensity,e.distance,e.decay);break;case"RectAreaLight":r=new En(e.color,e.intensity,e.width,e.height);break;case"SpotLight":r=new xn(e.color,e.intensity,e.distance,e.angle,e.penumbra,e.decay);break;case"HemisphereLight":r=new gn(e.color,e.groundColor,e.intensity);break;case"SkinnedMesh":console.warn("THREE.ObjectLoader.parseObject() does not support SkinnedMesh yet.");case"Mesh":r=i(e.geometry);var a=n(e.material);r=r.bones&&0<r.bones.length?new wt(r,a):new I(r,a);break;case"LOD":r=new yt;break;case"Line":r=new Tt(i(e.geometry),n(e.material),e.mode);break;case"LineLoop":r=new St(i(e.geometry),n(e.material));break;case"LineSegments":r=new Et(i(e.geometry),n(e.material));break;case"PointCloud":case"Points":r=new At(i(e.geometry),n(e.material));break;case"Sprite":r=new vt(n(e.material));break;case"Group":r=new Ct;break;default:r=new u}if(r.uuid=e.uuid,void 0!==e.name&&(r.name=e.name),void 0!==e.matrix?(r.matrix.fromArray(e.matrix),r.matrix.decompose(r.position,r.quaternion,r.scale)):(void 0!==e.position&&r.position.fromArray(e.position),void 0!==e.rotation&&r.rotation.fromArray(e.rotation),void 0!==e.quaternion&&r.quaternion.fromArray(e.quaternion),void 0!==e.scale&&r.scale.fromArray(e.scale)),void 0!==e.castShadow&&(r.castShadow=e.castShadow),void 0!==e.receiveShadow&&(r.receiveShadow=e.receiveShadow),e.shadow&&(void 0!==e.shadow.bias&&(r.shadow.bias=e.shadow.bias),void 0!==e.shadow.radius&&(r.shadow.radius=e.shadow.radius),void 0!==e.shadow.mapSize&&r.shadow.mapSize.fromArray(e.shadow.mapSize),void 0!==e.shadow.camera&&(r.shadow.camera=this.parseObject(e.shadow.camera))),void 0!==e.visible&&(r.visible=e.visible),void 0!==e.frustumCulled&&(r.frustumCulled=e.frustumCulled),void 0!==e.renderOrder&&(r.renderOrder=e.renderOrder),void 0!==e.userData&&(r.userData=e.userData),void 0!==e.children){a=e.children;for(var s=0;s<a.length;s++)r.add(this.parseObject(a[s],t,o))}if("LOD"===e.type)for(e=e.levels,a=0;a<e.length;a++){s=e[a];var l=r.getObjectByProperty("uuid",s.object);void 0!==l&&r.addLevel(l,s.distance)}return r}});var Ds={UVMapping:300,CubeReflectionMapping:301,CubeRefractionMapping:302,EquirectangularReflectionMapping:303,EquirectangularRefractionMapping:304,SphericalReflectionMapping:305,CubeUVReflectionMapping:306,CubeUVRefractionMapping:307},Os={RepeatWrapping:1e3,ClampToEdgeWrapping:1001,MirroredRepeatWrapping:1002},Is={NearestFilter:1003,NearestMipMapNearestFilter:1004,NearestMipMapLinearFilter:1005,LinearFilter:1006,LinearMipMapNearestFilter:1007,LinearMipMapLinearFilter:1008};jn.prototype={constructor:jn,setOptions:function(e){return this.options=e,this},load:function(t,i,e,n){void 0===t&&(t=""),void 0!==this.path&&(t=this.path+t);var r=this,o=xs.get(t);if(void 0!==o)return r.manager.itemStart(t),setTimeout(function(){i&&i(o),r.manager.itemEnd(t)},0),o;fetch(t).then(function(e){return e.blob()}).then(function(e){return createImageBitmap(e,r.options)}).then(function(e){xs.add(t,e),i&&i(e),r.manager.itemEnd(t)}
1).catch(function(e){n&&n(e),r.manager.itemEnd(t),r.manager.itemError(t)})},setCrossOrigin:function(){return this},setPath:function(e){return this.path=e,this}},Object.assign(Vn.prototype,{moveTo:function(e,t){this.currentPath=new pn,this.subPaths.push(this.currentPath),this.currentPath.moveTo(e,t)},lineTo:function(e,t){this.currentPath.lineTo(e,t)},quadraticCurveTo:function(e,t,i,n){this.currentPath.quadraticCurveTo(e,t,i,n)},bezierCurveTo:function(e,t,i,n,r,o){this.currentPath.bezierCurveTo(e,t,i,n,r,o)},splineThru:function(e){this.currentPath.splineThru(e)},toShapes:function(e,t){function i(e){for(var t=[],i=0,n=e.length;i<n;i++){var r=e[i],o=new fn;o.curves=r.curves,t.push(o)}return t}function n(e,t){for(var i=t.length,n=!1,r=i-1,o=0;o<i;r=o++){var a=t[r],s=t[o],l=s.x-a.x,c=s.y-a.y;if(Math.abs(c)>Number.EPSILON){if(c<0&&(a=t[o],l=-l,s=t[r],c=-c),!(e.y<a.y||e.y>s.y))if(e.y===a.y){if(e.x===a.x)return!0}else{if(0===(r=c*(e.x-a.x)-l*(e.y-a.y)))return!0;r<0||(n=!n)}}else if(e.y===a.y&&(s.x<=e.x&&e.x<=a.x||a.x<=e.x&&e.x<=s.x))return!0}return n}var r=gs.isClockWise,o=this.subPaths;if(0===o.length)return[];if(!0===t)return i(o);if(t=[],1===o.length){var a=o[0],s=new fn;return s.curves=a.curves,t.push(s),t}var l=!r(o[0].getPoints());l=e?!l:l,s=[];var c=[],u=[],h=0;c[h]=void 0,u[h]=[];for(var d=0,p=o.length;d<p;d++){var f=(a=o[d]).getPoints(),m=r(f);(m=e?!m:m)?(!l&&c[h]&&h++,c[h]={s:new fn,p:f},c[h].s.curves=a.curves,l&&h++,u[h]=[]):u[h].push({h:a,p:f[0]})}if(!c[0])return i(o);if(1<c.length){for(d=!1,e=[],r=0,o=c.length;r<o;r++)s[r]=[];for(r=0,o=c.length;r<o;r++)for(a=u[r],m=0;m<a.length;m++){for(l=a[m],h=!0,f=0;f<c.length;f++)n(l.p,c[f].p)&&(r!==f&&e.push({froms:r,tos:f,hole:m}),h?(h=!1,s[f].push(l)):d=!0);h&&s[r].push(l)}0<e.length&&(d||(u=s))}for(d=0,r=c.length;d<r;d++)for(s=c[d].s,t.push(s),o=0,a=(e=u[d]).length;o<a;o++)s.holes.push(e[o].h);return t}}),Object.assign(Wn.prototype,{isFont:!0,generateShapes:function(e,t,i){void 0===t&&(t=100),i=[];var n=t;t=this.data;var r=String(e).split("");n/=t.resolution;var o=(t.boundingBox.yMax-t.boundingBox.yMin+t.underlineThickness)*n;e=[];for(var a=0,s=0,l=0;l<r.length;l++){var c=r[l];if("\n"===c)a=0,s-=o;else{var u=n,h=a,d=s;if(c=t.glyphs[c]||t.glyphs["?"]){var p=new Vn;if(c.o)for(var f=c._cachedOutline||(c._cachedOutline=c.o.split(" ")),m=0,g=f.length;m<g;)switch(f[m++]){case"m":var v=f[m++]*u+h,y=f[m++]*u+d;p.moveTo(v,y);break;case"l":v=f[m++]*u+h,y=f[m++]*u+d,p.lineTo(v,y);break;case"q":var x=f[m++]*u+h,b=f[m++]*u+d,w=f[m++]*u+h,_=f[m++]*u+d;p.quadraticCurveTo(w,_,x,b);break;case"b":x=f[m++]*u+h,b=f[m++]*u+d,w=f[m++]*u+h,_=f[m++]*u+d,v=f[m++]*u+h,y=f[m++]*u+d,p.bezierCurveTo(w,_,v,y,x,b)}u={offsetX:c.ha*u,path:p}}else u=void 0;a+=u.offsetX,e.push(u.path)}}for(t=0,r=e.length;t<r;t++)Array.prototype.push.apply(i,e[t].toShapes());return i}}),Object.assign($n.prototype,{load:function(e,n,t,i){var r=this,o=new Vi(this.manager);o.setPath(this.path),o.load(e,function(t){try{var i=JSON.parse(t)}catch(e){console.warn("THREE.FontLoader: typeface.js support is being deprecated. Use typeface.json instead."),i=JSON.parse(t.substring(65,t.length-2))}t=r.parse(i),n&&n(t)},t,i)},parse:function(e){return new Wn(e)},setPath:function(e){return this.path=e,this}});var Us,zs,Hs,Fs,Bs,Gs,js,Vs,Ws,$s,qs,Xs,Ys,Js,Zs,Qs,Ks,el,tl,il,nl,rl,ol,al,sl,ll,cl,ul,hl,dl,pl,fl,ml,gl,vl,yl,xl,bl,wl,_l,Tl,El,Sl={getContext:function(){return void 0===Us&&(Us=new(window.AudioContext||window.webkitAudioContext)),Us},setContext:function(e){Us=e}};Object.assign(qn.prototype,{load:function(e,t,i,n){var r=new Vi(this.manager);r.setResponseType("arraybuffer"),r.load(e,function(e){Sl.getContext().decodeAudioData(e,function(e){t(e)})},i,n)}}),Object.assign(Xn.prototype,{update:($s=new we,qs=new we,function(e){if(zs!==this||Hs!==e.focus||Fs!==e.fov||Bs!==e.aspect*this.aspect||Gs!==e.near||js!==e.far||Vs!==e.zoom||Ws!==this.eyeSep){zs=this,Hs=e.focus,Fs=e.fov,Bs=e.aspect*this.aspect,Gs=e.near,js=e.far,Vs=e.zoom;var t=e.projectionMatrix.clone(),i=(Ws=this.eyeSep/2)*Gs/Hs,n=Gs*Math.tan(oo.DEG2RAD*Fs*.5)/Vs;qs.elements[12]=-Ws,$s.elements[12]=Ws;var r=-n*Bs+i,o=n*Bs+i;t.elements[0]=2*Gs/(o-r),t.elements[8]=(o+r)/(o-r),this.cameraL.projectionMatrix.copy(t),r=-n*Bs-i,o=n*Bs-i,t.elements[0]=2*Gs/(o-r),t.elements[8]=(o+r)/(o-r),this.cameraR.projectionMatrix.copy(t)}this.cameraL.matrixWorld.copy(e.matrixWorld).multiply(qs),this.cameraR.matrixWorld.copy(e.matrixWorld).multiply($s)})}),(Yn.prototype=Object.create(u.prototype)).constructor=Yn,Jn.prototype=Object.assign(Object.create(u.prototype),{constructor:Jn,getInput:function(){return this.gain},removeFilter:function(){null!==this.filter&&(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination),this.gain.connect(this.context.destination),this.filter=null)},getFilter:function(){return this.filter},setFilter:function(e){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)},getMasterVolume:function(){return this.gain.gain.value},setMasterVolume:function(e){this.gain.gain.value=e},updateMatrixWorld:(Xs=new _e,Ys=new j,Js=new _e,Zs=new _e,function(e){u.prototype.updateMatrixWorld.call(this,e),e=this.context.listener;var t=this.up;this.matrixWorld.decompose(Xs,Ys,Js),Zs.set(0,0,-1).applyQuaternion(Ys),e.positionX?(e.positionX.setValueAtTime(Xs.x,this.context.currentTime),e.positionY.setValueAtTime(Xs.y,this.context.currentTime),e.positionZ.setValueAtTime(Xs.z,this.context.currentTime),e.forwardX.setValueAtTime(Zs.x,this.context.currentTime),e.forwardY.setValueAtTime(Zs.y,this.context.currentTime),e.forwardZ.setValueAtTime(Zs.z,this.context.currentTime),e.upX.setValueAtTime(t.x,this.context.currentTime),e.upY.setValueAtTime(t.y,this.context.currentTime),e.upZ.setValueAtTime(t.z,this.context.currentTime)):(e.setPosition(Xs.x,Xs.y,Xs.z),e.setOrientation(Zs.x,Zs.y,Zs.z,t.x,t.y,t.z))})}),Zn.prototype=Object.assign(Object.create(u.prototype),{constructor:Zn,getOutput:function(){return this.gain}
1,setNodeSource:function(e){return this.hasPlaybackControl=!1,this.sourceType="audioNode",this.source=e,this.connect(),this},setBuffer:function(e){return this.buffer=e,this.sourceType="buffer",this.autoplay&&this.play(),this},play:function(){if(!0===this.isPlaying)console.warn("THREE.Audio: Audio is already playing.");else{if(!1!==this.hasPlaybackControl){var e=this.context.createBufferSource();return e.buffer=this.buffer,e.loop=this.loop,e.onended=this.onEnded.bind(this),e.playbackRate.setValueAtTime(this.playbackRate,this.startTime),this.startTime=this.context.currentTime,e.start(this.startTime,this.offset),this.isPlaying=!0,this.source=e,this.connect()}console.warn("THREE.Audio: this Audio has no playback control.")}},pause:function(){if(!1!==this.hasPlaybackControl)return!0===this.isPlaying&&(this.source.stop(),this.offset+=(this.context.currentTime-this.startTime)*this.playbackRate,this.isPlaying=!1),this;console.warn("THREE.Audio: this Audio has no playback control.")},stop:function(){if(!1!==this.hasPlaybackControl)return this.source.stop(),this.offset=0,this.isPlaying=!1,this;console.warn("THREE.Audio: this Audio has no playback control.")},connect:function(){if(0<this.filters.length){this.source.connect(this.filters[0]);for(var e=1,t=this.filters.length;e<t;e++)this.filters[e-1].connect(this.filters[e]);this.filters[this.filters.length-1].connect(this.getOutput())}else this.source.connect(this.getOutput());return this},disconnect:function(){if(0<this.filters.length){this.source.disconnect(this.filters[0]);for(var e=1,t=this.filters.length;e<t;e++)this.filters[e-1].disconnect(this.filters[e]);this.filters[this.filters.length-1].disconnect(this.getOutput())}else this.source.disconnect(this.getOutput());return this},getFilters:function(){return this.filters},setFilters:function(e){return e||(e=[]),!0===this.isPlaying?(this.disconnect(),this.filters=e,this.connect()):this.filters=e,this},getFilter:function(){return this.getFilters()[0]},setFilter:function(e){return this.setFilters(e?[e]:[])},setPlaybackRate:function(e){if(!1!==this.hasPlaybackControl)return this.playbackRate=e,!0===this.isPlaying&&this.source.playbackRate.setValueAtTime(this.playbackRate,this.context.currentTime),this;console.warn("THREE.Audio: this Audio has no playback control.")},getPlaybackRate:function(){return this.playbackRate},onEnded:function(){this.isPlaying=!1},getLoop:function(){return!1===this.hasPlaybackControl?(console.warn("THREE.Audio: this Audio has no playback control."),!1):this.loop},setLoop:function(e){if(!1!==this.hasPlaybackControl)return this.loop=e,!0===this.isPlaying&&(this.source.loop=this.loop),this;console.warn("THREE.Audio: this Audio has no playback control.")},getVolume:function(){return this.gain.gain.value},setVolume:function(e){return this.gain.gain.value=e,this}}),Qn.prototype=Object.assign(Object.create(Zn.prototype),{constructor:Qn,getOutput:function(){return this.panner},getRefDistance:function(){return this.panner.refDistance},setRefDistance:function(e){this.panner.refDistance=e},getRolloffFactor:function(){return this.panner.rolloffFactor},setRolloffFactor:function(e){this.panner.rolloffFactor=e},getDistanceModel:function(){return this.panner.distanceModel},setDistanceModel:function(e){this.panner.distanceModel=e},getMaxDistance:function(){return this.panner.maxDistance},setMaxDistance:function(e){this.panner.maxDistance=e},updateMatrixWorld:(Qs=new _e,function(e){u.prototype.updateMatrixWorld.call(this,e),Qs.setFromMatrixPosition(this.matrixWorld),this.panner.setPosition(Qs.x,Qs.y,Qs.z)})}),Object.assign(Kn.prototype,{getFrequencyData:function(){return this.analyser.getByteFrequencyData(this.data),this.data},getAverageFrequency:function(){for(var e=0,t=this.getFrequencyData(),i=0;i<t.length;i++)e+=t[i];return e/t.length}}),Object.assign(er.prototype,{accumulate:function(e,t){var i=this.buffer,n=this.valueSize;e=e*n+n;var r=this.cumulativeWeight;if(0===r){for(r=0;r!==n;++r)i[e+r]=i[r];r=t}else r+=t,this._mixBufferRegion(i,e,0,t/r,n);this.cumulativeWeight=r},apply:function(e){var t=this.valueSize,i=this.buffer;e=e*t+t;var n=this.cumulativeWeight,r=this.binding;this.cumulativeWeight=0,n<1&&this._mixBufferRegion(i,e,3*t,1-n,t);for(var o=(n=t)+t;n!==o;++n)if(i[n]!==i[n+t]){r.setValue(i,e);break}},saveOriginalState:function(){var e=this.buffer,t=this.valueSize,i=3*t;this.binding.getValue(e,i);for(var n=t;n!==i;++n)e[n]=e[i+n%t];this.cumulativeWeight=0},restoreOriginalState:function(){this.binding.setValue(this.buffer,3*this.valueSize)},_select:function(e,t,i,n,r){if(.5<=n)for(n=0;n!==r;++n)e[t+n]=e[i+n]},_slerp:function(e,t,i,n){j.slerpFlat(e,t,e,t,e,i,n)},_lerp:function(e,t,i,n,r){for(var o=1-n,a=0;a!==r;++a){var s=t+a;e[s]=e[s]*o+e[i+a]*n}
1}}),Object.assign(tr.prototype,{getValue:function(e,t){this.bind();var i=this._bindings[this._targetGroup.nCachedObjects_];void 0!==i&&i.getValue(e,t)},setValue:function(e,t){for(var i=this._bindings,n=this._targetGroup.nCachedObjects_,r=i.length;n!==r;++n)i[n].setValue(e,t)},bind:function(){for(var e=this._bindings,t=this._targetGroup.nCachedObjects_,i=e.length;t!==i;++t)e[t].bind()},unbind:function(){for(var e=this._bindings,t=this._targetGroup.nCachedObjects_,i=e.length;t!==i;++t)e[t].unbind()}}),Object.assign(ir,{Composite:tr,create:function(e,t,i){return e&&e.isAnimationObjectGroup?new ir.Composite(e,t,i):new ir(e,t,i)},sanitizeNodeName:(Ks=/[\[\]\.:\/]/g,function(e){return e.replace(/\s/g,"_").replace(Ks,"")}),parseTrackName:function(){var e="[^"+"\\[\\]\\.:\\/".replace("\\.","")+"]",t=/((?:WC+[\/:])*)/.source.replace("WC","[^\\[\\]\\.:\\/]");e=/(WCOD+)?/.source.replace("WCOD",e);var i=/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC","[^\\[\\]\\.:\\/]"),n=/\.(WC+)(?:\[(.+)\])?/.source.replace("WC","[^\\[\\]\\.:\\/]"),r=new RegExp("^"+t+e+i+n+"$"),o=["material","materials","bones"];return function(e){var t=r.exec(e);if(!t)throw Error("PropertyBinding: Cannot parse trackName: "+e);var i=(t={nodeName:t[2],objectName:t[3],objectIndex:t[4],propertyName:t[5],propertyIndex:t[6]}).nodeName&&t.nodeName.lastIndexOf(".");if(void 0!==i&&-1!==i){var n=t.nodeName.substring(i+1);-1!==o.indexOf(n)&&(t.nodeName=t.nodeName.substring(0,i),t.objectName=n)}if(null===t.propertyName||0===t.propertyName.length)throw Error("PropertyBinding: can not parse propertyName from trackName: "+e);return t}}(),findNode:function(e,n){if(!n||""===n||"root"===n||"."===n||-1===n||n===e.name||n===e.uuid)return e;if(e.skeleton){var t=e.skeleton.getBoneByName(n);if(void 0!==t)return t}if(e.children){var r=function(e){for(var t=0;t<e.length;t++){var i=e[t];if(i.name===n||i.uuid===n||(i=r(i.children)))return i}return null};if(e=r(e.children))return e}return null}}),Object.assign(ir.prototype,{_getValue_unavailable:function(){},_setValue_unavailable:function(){},BindingType:{Direct:0,EntireArray:1,ArrayElement:2,HasFromToArray:3},Versioning:{None:0,NeedsUpdate:1,MatrixWorldNeedsUpdate:2},GetterByBindingType:[function(e,t){e[t]=this.node[this.propertyName]},function(e,t){for(var i=this.resolvedProperty,n=0,r=i.length;n!==r;++n)e[t++]=i[n]},function(e,t){e[t]=this.resolvedProperty[this.propertyIndex]},function(e,t){this.resolvedProperty.toArray(e,t)}],SetterByBindingTypeAndVersioning:[[function(e,t){this.targetObject[this.propertyName]=e[t]},function(e,t){this.targetObject[this.propertyName]=e[t],this.targetObject.needsUpdate=!0},function(e,t){this.targetObject[this.propertyName]=e[t],this.targetObject.matrixWorldNeedsUpdate=!0}],[function(e,t){for(var i=this.resolvedProperty,n=0,r=i.length;n!==r;++n)i[n]=e[t++]},function(e,t){for(var i=this.resolvedProperty,n=0,r=i.length;n!==r;++n)i[n]=e[t++];this.targetObject.needsUpdate=!0},function(e,t){for(var i=this.resolvedProperty,n=0,r=i.length;n!==r;++n)i[n]=e[t++];this.targetObject.matrixWorldNeedsUpdate=!0}],[function(e,t){this.resolvedProperty[this.propertyIndex]=e[t]},function(e,t){this.resolvedProperty[this.propertyIndex]=e[t],this.targetObject.needsUpdate=!0},function(e,t){this.resolvedProperty[this.propertyIndex]=e[t],this.targetObject.matrixWorldNeedsUpdate=!0}],[function(e,t){this.resolvedProperty.fromArray(e,t)},function(e,t){this.resolvedProperty.fromArray(e,t),this.targetObject.needsUpdate=!0},function(e,t){this.resolvedProperty.fromArray(e,t),this.targetObject.matrixWorldNeedsUpdate=!0}]],getValue:function(e,t){this.bind(),this.getValue(e,t)},setValue:function(e,t){this.bind(),this.setValue(e,t)},bind:function(){var e=this.node,t=this.parsedPath,i=t.objectName,n=t.propertyName,r=t.propertyIndex;if(e||(this.node=e=ir.findNode(this.rootNode,t.nodeName)||this.rootNode),this.getValue=this._getValue_unavailable,this.setValue=this._setValue_unavailable,e){if(i){var o=t.objectIndex;switch(i){case"materials":if(!e.material)return void console.error("THREE.PropertyBinding: Can not bind to material as node does not have a material.",this);if(!e.material.materials)return void console.error("THREE.PropertyBinding: Can not bind to material.materials as node.material does not have a materials array.",this);e=e.material.materials;break;case"bones":if(!e.skeleton)return void console.error("THREE.PropertyBinding: Can not bind to bones as node does not have a skeleton.",this);for(e=e.skeleton.bones,i=0;i<e.length;i++)if(e[i].name===o){o=i;break}break;default:if(void 0===e[i])return void console.error("THREE.PropertyBinding: Can not bind to objectName of node undefined.",this);e=e[i]}if(void 0!==o){if(void 0===e[o])return void console.error("THREE.PropertyBinding: Trying to bind to objectIndex of objectName, but is undefined.",this,e);e=e[o]}}if(void 0===(o=e[n]))console.error("THREE.PropertyBinding: Trying to update property for track: "+t.nodeName+"."+n+" but it wasn't found.",e);else{if(t=this.Versioning.None,void 0!==e.needsUpdate?(t=this.Versioning.NeedsUpdate,this.targetObject=e):void 0!==e.matrixWorldNeedsUpdate&&(t=this.Versioning.MatrixWorldNeedsUpdate,this.targetObject=e),i=this.BindingType.Direct,void 0!==r){if("morphTargetInfluences"===n){if(!e.geometry)return void console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.",this);if(e.geometry.isBufferGeometry){if(!e.geometry.morphAttributes)return void console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.morphAttributes.",this);for(i=0;i<this.node.geometry.morphAttributes.position.length;i++)if(e.geometry.morphAttributes.position[i].name===r){r=i;break}}else{if(!e.geometry.morphTargets)return void console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.morphTargets.",this);for(i=0;i<this.node.geometry.morphTargets.length;i++)if(e.geometry.morphTargets[i].name===r){r=i;break}}}i=this.BindingType.ArrayElement,this.resolvedProperty=o,this.propertyIndex=r}else void 0!==o.fromArray&&void 0!==o.toArray?(i=this.BindingType.HasFromToArray,this.resolvedProperty=o):Array.isArray(o)?(i=this.BindingType.EntireArray,this.resolvedProperty=o):this.propertyName=n;this.getValue=this.GetterByBindingType[i],this.setValue=this.SetterByBindingTypeAndVersioning[i][t]}}else console.error("THREE.PropertyBinding: Trying to update node for track: "+this.path+" but it wasn't found.")},unbind:function(){this.node=null,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}}),Object.assign(ir.prototype,{_getValue_unbound:ir.prototype.getValue,_setValue_unbound:ir.prototype.setValue}),Object.assign(nr.prototype,{isAnimationObjectGroup:!0,add:function(){for(var e=this._objects,t=e.length,i=this.nCachedObjects_,n=this._indicesByUUID,r=this._paths,o=this._parsedPaths,a=this._bindings,s=a.length,l=void 0,c=0,u=arguments.length;c!==u;++c){var h=arguments[c],d=h.uuid,p=n[d];if(void 0===p){p=t++,n[d]=p,e.push(h),d=0;for(var f=s;d!==f;++d)a[d].push(new ir(h,r[d],o[d]))}else if(p<i){l=e[p];var m=--i;for(e[n[(f=e[m]).uuid]=p]=f,e[n[d]=m]=h,d=0,f=s;d!==f;++d){var g=a[d],v=g[p];g[p]=g[m],void 0===v&&(v=new ir(h,r[d],o[d])),g[m]=v}}else e[p]!==l&&console.error("THREE.AnimationObjectGroup: Different objects with the same UUID detected. Clean the caches or recreate your infrastru
1cture when reloading scenes.")}this.nCachedObjects_=i},remove:function(){for(var e=this._objects,t=this.nCachedObjects_,i=this._indicesByUUID,n=this._bindings,r=n.length,o=0,a=arguments.length;o!==a;++o){var s=arguments[o],l=s.uuid,c=i[l];if(void 0!==c&&t<=c){var u=t++,h=e[u];for(e[i[h.uuid]=c]=h,e[i[l]=u]=s,s=0,l=r;s!==l;++s){var d=(h=n[s])[c];h[c]=h[u],h[u]=d}}}this.nCachedObjects_=t},uncache:function(){for(var e=this._objects,t=e.length,i=this.nCachedObjects_,n=this._indicesByUUID,r=this._bindings,o=r.length,a=0,s=arguments.length;a!==s;++a){var l=arguments[a].uuid,c=n[l];if(void 0!==c)if(delete n[l],c<i){var u=e[l=--i],h=--t,d=e[h];for(e[n[u.uuid]=c]=u,e[n[d.uuid]=l]=d,e.pop(),u=0,d=o;u!==d;++u){var p=r[u],f=p[h];p[c]=p[l],p[l]=f,p.pop()}}else for(e[n[(d=e[h=--t]).uuid]=c]=d,e.pop(),u=0,d=o;u!==d;++u)(p=r[u])[c]=p[h],p.pop()}this.nCachedObjects_=i},subscribe_:function(e,t){var i=this._bindingsIndicesByPath,n=i[e],r=this._bindings;if(void 0!==n)return r[n];var o=this._paths,a=this._parsedPaths,s=this._objects,l=this.nCachedObjects_,c=Array(s.length);for(n=r.length,i[e]=n,o.push(e),a.push(t),r.push(c),i=l,n=s.length;i!==n;++i)c[i]=new ir(s[i],e,t);return c},unsubscribe_:function(e){var t=this._bindingsIndicesByPath,i=t[e];if(void 0!==i){var n=this._paths,r=this._parsedPaths,o=this._bindings,a=o.length-1,s=o[a];o[t[e[a]]=i]=s,o.pop(),r[i]=r[a],r.pop(),n[i]=n[a],n.pop()}}}),Object.assign(rr.prototype,{play:function(){return this._mixer._activateAction(this),this},stop:function(){return this._mixer._deactivateAction(this),this.reset()},reset:function(){return this.paused=!1,this.enabled=!0,this.time=0,this._loopCount=-1,this._startTime=null,this.stopFading().stopWarping()},isRunning:function(){return this.enabled&&!this.paused&&0!==this.timeScale&&null===this._startTime&&this._mixer._isActiveAction(this)},isScheduled:function(){return this._mixer._isActiveAction(this)},startAt:function(e){return this._startTime=e,this},setLoop:function(e,t){return this.loop=e,this.repetitions=t,this},setEffectiveWeight:function(e){return this.weight=e,this._effectiveWeight=this.enabled?e:0,this.stopFading()},getEffectiveWeight:function(){return this._effectiveWeight},fadeIn:function(e){return this._scheduleFading(e,0,1)},fadeOut:function(e){return this._scheduleFading(e,1,0)},crossFadeFrom:function(e,t,i){if(e.fadeOut(t),this.fadeIn(t),i){i=this._clip.duration;var n=e._clip.duration,r=i/n;e.warp(1,n/i,t),this.warp(r,1,t)}return this},crossFadeTo:function(e,t,i){return e.crossFadeFrom(this,t,i)},stopFading:function(){var e=this._weightInterpolant;return null!==e&&(this._weightInterpolant=null,this._mixer._takeBackControlInterpolant(e)),this},setEffectiveTimeScale:function(e){return this.timeScale=e,this._effectiveTimeScale=this.paused?0:e,this.stopWarping()},getEffectiveTimeScale:function(){return this._effectiveTimeScale},setDuration:function(e){return this.timeScale=this._clip.duration/e,this.stopWarping()},syncWith:function(e){return this.time=e.time,this.timeScale=e.timeScale,this.stopWarping()},halt:function(e){return this.warp(this._effectiveTimeScale,0,e)},warp:function(e,t,i){var n=this._mixer,r=n.time,o=this._timeScaleInterpolant,a=this.timeScale;return null===o&&(this._timeScaleInterpolant=o=n._lendControlInterpolant()),n=o.parameterPositions,o=o.sampleValues,n[0]=r,n[1]=r+i,o[0]=e/a,o[1]=t/a,this},stopWarping:function(){var e=this._timeScaleInterpolant;return null!==e&&(this._timeScaleInterpolant=null,this._mixer._takeBackControlInterpolant(e)),this},getMixer:function(){return this._mixer},getClip:function(){return this._clip},getRoot:function(){return this._localRoot||this._mixer._root},_update:function(e,t,i,n){if(this.enabled){var r=this._startTime;if(null!==r){if((t=(e-r)*i)<0||0===i)return;this._startTime=null,t*=i}if(t*=this._updateTimeScale(e),i=this._updateTime(t),0<(e=this._updateWeight(e))){t=this._interpolants,r=this._propertyBindings;for(var o=0,a=t.length;o!==a;++o)t[o].evaluate(i),r[o].accumulate(n,e)}}else this._updateWeight(e)},_updateWeight:function(e){var t=0;if(this.enabled){t=this.weight;var i=this._weightInterpolant;if(null!==i){var n=i.evaluate(e)[0];t*=n,e>i.parameterPositions[1]&&(this.stopFading(),0===n&&(this.enabled=!1))}}return this._effectiveWeight=t},_updateTimeScale:function(e){var t=0;if(!this.paused){t=this.timeScale;var i=this._timeScaleInterpolant;if(null!==i)t*=i.evaluate(e)[0],e>i.parameterPositions[1]&&(this.stopWarping(),0===t?this.paused=!0:this.timeScale=t)}return this._effectiveTimeScale=t},_updateTime:function(e){var t=this.time+e;if(0===e)return t;var i=this._clip.duration,n=this.loop,r=this._loopCount;if(2200===n)e:{if(-1===r&&(this._loopCount=0,this._setEndings(!0,!0,!1)),i<=t)t=i;else{if(!(t<0))break e;t=0}this.clampWhenFinished?this.paused=!0:this.enabled=!1,this._mixer.dispatchEvent({type:"finished",action:this,direction:e<0?-1:1})}else{if(n=2202===n,-1===r&&(0<=e?(r=0,this._setEndings(!0,0===this.repetitions,n)):this._setEndings(0===this.repetitions,!0,n)),i<=t||t<0){var o=Math.floor(t/i);t-=i*o,r+=Math.abs(o);var a=this.repetitions-r;a<=0?(this.clampWhenFinished?this.paused=!0:this.enabled=!1,t=0<e?i:0,this._mixer.dispatchEvent({type:"finished",action:this,direction:0<e?1:-1})):(1===a?(e=e<0,this._setEndings(e,!e,n)):this._setEndings(!1,!1,n),this._loopCount=r,this._mixer.dispatchEvent({type:"loop",action:this,loopDelta:o}))}if(n&&1==(1&r))return i-(this.time=t)}return this.time=t},_setEndings:function(e,t,i){var n=this._interpolantSettings;i?(n.endingStart=2401,n.endingEnd=2401):(n.endingStart=e?this.zeroSlopeAtStart?2401:2400:2402,n.endingEnd=t?this.zeroSlopeAtEnd?2401:2400:2402)},_scheduleFading:function(e,t,i){var n=this._mixer,r=n.time,o=this._weightInterpolant;return null===o&&(this._weightInterpolant=o=n._lendControlInterpolant()),n=o.parameterPositions,o=o.sampleValues,n[0]=r,o[0]=t,n[1]=r+e,o[1]=i,this}}),or.prototype=Object.assign(Object.create(t.prototype),{constructor:or,_bindAction:function(e,t){var i=e._localRoot||this._root,n=e._clip.tracks,r=n.length,o=e._propertyBindings;e=e._interpolants;var a=i.uuid,s=this._bindingsByRootAndName,l=s[a];for(void 0===l&&(l={},s[a]=l),s=0;s!==r;++s){var c=n[s],u=c.name,h=l[u];
1if(void 0===h){if(void 0!==(h=o[s])){null===h._cacheIndex&&(++h.referenceCount,this._addInactiveBinding(h,a,u));continue}++(h=new er(ir.create(i,u,t&&t._propertyBindings[s].binding.parsedPath),c.ValueTypeName,c.getValueSize())).referenceCount,this._addInactiveBinding(h,a,u)}o[s]=h,e[s].resultBuffer=h.buffer}},_activateAction:function(e){if(!this._isActiveAction(e)){if(null===e._cacheIndex){var t=(e._localRoot||this._root).uuid,i=e._clip.uuid,n=this._actionsByClip[i];this._bindAction(e,n&&n.knownActions[0]),this._addInactiveAction(e,i,t)}for(i=0,n=(t=e._propertyBindings).length;i!==n;++i){var r=t[i];0==r.useCount++&&(this._lendBinding(r),r.saveOriginalState())}this._lendAction(e)}},_deactivateAction:function(e){if(this._isActiveAction(e)){for(var t=e._propertyBindings,i=0,n=t.length;i!==n;++i){var r=t[i];0==--r.useCount&&(r.restoreOriginalState(),this._takeBackBinding(r))}this._takeBackAction(e)}},_initMemoryManager:function(){this._actions=[],this._nActiveActions=0,this._actionsByClip={},this._bindings=[],this._nActiveBindings=0,this._bindingsByRootAndName={},this._controlInterpolants=[],this._nActiveControlInterpolants=0;var e=this;this.stats={actions:{get total(){return e._actions.length},get inUse(){return e._nActiveActions}},bindings:{get total(){return e._bindings.length},get inUse(){return e._nActiveBindings}},controlInterpolants:{get total(){return e._controlInterpolants.length},get inUse(){return e._nActiveControlInterpolants}}}},_isActiveAction:function(e){return null!==(e=e._cacheIndex)&&e<this._nActiveActions},_addInactiveAction:function(e,t,i){var n=this._actions,r=this._actionsByClip,o=r[t];void 0===o?(o={knownActions:[e],actionByRoot:{}},e._byClipCacheIndex=0,r[t]=o):(t=o.knownActions,e._byClipCacheIndex=t.length,t.push(e)),e._cacheIndex=n.length,n.push(e),o.actionByRoot[i]=e},_removeInactiveAction:function(e){var t=this._actions,i=t[t.length-1],n=e._cacheIndex;t[i._cacheIndex=n]=i,t.pop(),e._cacheIndex=null,t=e._clip.uuid;var r=(n=(i=this._actionsByClip)[t]).knownActions,o=r[r.length-1],a=e._byClipCacheIndex;r[o._byClipCacheIndex=a]=o,r.pop(),e._byClipCacheIndex=null,delete n.actionByRoot[(e._localRoot||this._root).uuid],0===r.length&&delete i[t],this._removeInactiveBindingsForAction(e)},_removeInactiveBindingsForAction:function(e){for(var t=0,i=(e=e._propertyBindings).length;t!==i;++t){var n=e[t];0==--n.referenceCount&&this._removeInactiveBinding(n)}},_lendAction:function(e){var t=this._actions,i=e._cacheIndex,n=this._nActiveActions++,r=t[n];t[e._cacheIndex=n]=e,t[r._cacheIndex=i]=r},_takeBackAction:function(e){var t=this._actions,i=e._cacheIndex,n=--this._nActiveActions,r=t[n];t[e._cacheIndex=n]=e,t[r._cacheIndex=i]=r},_addInactiveBinding:function(e,t,i){var n=this._bindingsByRootAndName,r=n[t],o=this._bindings;void 0===r&&(r={},n[t]=r),(r[i]=e)._cacheIndex=o.length,o.push(e)},_removeInactiveBinding:function(e){var t=this._bindings,i=e.binding,n=i.rootNode.uuid;i=i.path;var r=this._bindingsByRootAndName,o=r[n],a=t[t.length-1];e=e._cacheIndex,t[a._cacheIndex=e]=a,t.pop(),delete o[i];e:{for(var s in o)break e;delete r[n]}},_lendBinding:function(e){var t=this._bindings,i=e._cacheIndex,n=this._nActiveBindings++,r=t[n];t[e._cacheIndex=n]=e,t[r._cacheIndex=i]=r},_takeBackBinding:function(e){var t=this._bindings,i=e._cacheIndex,n=--this._nActiveBindings,r=t[n];t[e._cacheIndex=n]=e,t[r._cacheIndex=i]=r},_lendControlInterpolant:function(){var e=this._controlInterpolants,t=this._nActiveControlInterpolants++,i=e[t];return void 0===i&&(e[(i=new Nn(new Float32Array(2),new Float32Array(2),1,this._controlInterpolantsResultBuffer)).__cacheIndex=t]=i),i},_takeBackControlInterpolant:function(e){var t=this._controlInterpolants,i=e.__cacheIndex,n=--this._nActiveControlInterpolants,r=t[n];t[e.__cacheIndex=n]=e,t[r.__cacheIndex=i]=r},_controlInterpolantsResultBuffer:new Float32Array(1),clipAction:function(e,t){var i=t||this._root,n=i.uuid;e=null!==(i="string"==typeof e?Un.findByName(i,e):e)?i.uuid:e;var r=this._actionsByClip[e],o=null;if(void 0!==r){if(void 0!==(o=r.actionByRoot[n]))return o;o=r.knownActions[0],null===i&&(i=o._clip)}return null===i?null:(t=new rr(this,i,t),this._bindAction(t,o),this._addInactiveAction(t,e,n),t)},existingAction:function(e,t){var i=t||this._root;return t=i.uuid,i="string"==typeof e?Un.findByName(i,e):e,void 0!==(e=this._actionsByClip[i?i.uuid:e])&&e.actionByRoot[t]||null},stopAllAction:function(){for(var e=this._actions,t=this._nActiveActions,i=this._bindings,n=this._nActiveBindings,r=this._nActiveBindings=this._nActiveActions=0;r!==t;++r)e[r].reset();for(r=0;r!==n;++r)i[r].useCount=0;return this},update:function(e){e*=this.timeScale;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)t[a]._update(n,e,r,o);for(e=this._bindings,t=this._nActiveBindings,a=0;a!==t;++a)e[a].apply(o);return this},getRoot:function(){return this._root},uncacheClip:function(e){var t=this._actions;e=e.uuid;var i=this._actionsByClip,n=i[e];if(void 0!==n){for(var r=0,o=(n=n.knownActions).length;r!==o;++r){var a=n[r];this._deactivateAction(a);var s=a._cacheIndex,l=t[t.length-1];a._cacheIndex=null,a._byClipCacheIndex=null,t[l._cacheIndex=s]=l,t.pop(),this._removeInactiveBindingsForAction(a)}delete i[e]}},uncacheRoot:function(e){e=e.uuid;var t=this._actionsByClip;for(n in t){var i=t[n].actionByRoot[e];void 0!==i&&(this._deactivateAction(i),this._removeInactiveAction(i))}var n=this._bindingsByRootAndName[e];if(void 0!==n)for(var r in n)(e=n[r]).restoreOriginalState(),this._removeInactiveBinding(e)},uncacheAction:function(e,t){null!==(e=this.existingAction(e,t))&&(this._deactivateAction(e),this._removeInactiveAction(e))}}),ar.prototype.clone=function(){return new ar(void 0===this.value.clone?this.value:this.value.clone())},sr.prototype=Object.assign(Object.create(L.prototype),{constructor:sr,isInstancedBufferGeometry:!0,copy:function(e){return L.prototype.copy.call(this,e),this.maxInstancedCount=e.maxInstancedCount,this},clone:function(){return(new this.constructor).copy(this)}}),Object.defineProperties(lr.prototype,{count:{get:function(){return this.data.count}},array:{get:function(){return this.data.array}}}),Object.assign(lr.prototype,{isInterleavedBufferAttribute:!0,setX:function(e,t){return this.data.array[e*this.data.stride+this.offset]=t,this},setY:function(e,t){return this.data.array[e*this.data.stride+this.offset+1]=t,this},setZ:function(e,t){return this.data.array[e*this.data.stride+this.offset+2]=t,this},setW:function(e,t){return this.data.array[e*this.data.stride+this.offset+3]=t,this},getX:function(e){return this.data.array[e*this.data.stride+this.offset]},getY:function(e){return this.data.array[e*this.data.stride+this.offset+1]},getZ:function(e){return this.data.array[e*this.data.stride+this.offset+2]},getW:function(e){return this.data.array[e*this.data.stride+this.offset+3]},setXY:function(e,t,i){return e=e*this.data.stride+this.offset,this.data.array[e+0]=t,this.data.array[e+1]=i,this},setXYZ:function(e,t,i,n){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},setXYZW:function(e,t,i,n,r){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}}),Object.defineProperty(cr.prototype,"needsUpdate",{set:function(e){!0===e&&this.version++}}),Object.assign(cr.prototype,{isInterleavedBuffer:!0,onUploadCallback:function(){},setArray:function(e){if(Array.isArray(e))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.count=void 0!==e?e.length/this.stride:0,this.array=e},setDynamic:function(e){return this.dynamic=e,this},copy:function(e){return this.array=new e.array.constructor(e.array),this.count=e.count,this.stride=e.stride,this.dynamic=e.dynamic,this},copyAt:function(e,t,i){e*=this.stride,i*=t.stride;for(var n=0,r=this.stride;n<r;n++)this.array[e+n]=t.array[i+n];return this},set:function(e,t){return void 0===t&&(t=0),this.array.set(e,t),this},clone:function(){return(new this.constructor).copy(this)},onUpload:function(e){return this.onUploadCallback=e,this}}),ur.prototype=Object.assign(Object.create(cr.prototype),{constructor:ur,isInstancedInterleavedBuffer:!0,copy:function(e){return cr.prototype.copy.call(this,e),this.meshPerAttribute=e.meshPerAttribute,this}}),hr.prototype=Object.assign(Object.create(y.prototype),{constructor:hr,isInstancedBufferAttribute:!0,copy:function(e){return y.prototype.copy.call(this,e),this.meshPerAttribute=e.meshPerAttribute,this}}),Object.assign(dr.prototype,{linePrecision:1,set:function(e,t){this.ray.set(e,t)},setFromCamera:function(e,t){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:
1Unsupported camera type.")},intersectObject:function(e,t,i){return fr(e,this,i=i||[],t),i.sort(pr),i},intersectObjects:function(e,t,i){if(i=i||[],!1===Array.isArray(e))return console.warn("THREE.Raycaster.intersectObjects: objects is not an Array."),i;for(var n=0,r=e.length;n<r;n++)fr(e[n],this,i,t);return i.sort(pr),i}}),Object.assign(mr.prototype,{start:function(){this.oldTime=this.startTime=("undefined"==typeof performance?Date:performance).now(),this.elapsedTime=0,this.running=!0},stop:function(){this.getElapsedTime(),this.autoStart=this.running=!1},getElapsedTime:function(){return this.getDelta(),this.elapsedTime},getDelta:function(){var e=0;if(this.autoStart&&!this.running)return this.start(),0;if(this.running){var t=("undefined"==typeof performance?Date:performance).now();e=(t-this.oldTime)/1e3,this.oldTime=t,this.elapsedTime+=e}return e}}),Object.assign(gr.prototype,{set:function(e,t,i){return this.radius=e,this.phi=t,this.theta=i,this},clone:function(){return(new this.constructor).copy(this)},copy:function(e){return this.radius=e.radius,this.phi=e.phi,this.theta=e.theta,this},makeSafe:function(){return this.phi=Math.max(1e-6,Math.min(Math.PI-1e-6,this.phi)),this},setFromVector3:function(e){return this.radius=e.length(),0===this.radius?this.phi=this.theta=0:(this.theta=Math.atan2(e.x,e.z),this.phi=Math.acos(oo.clamp(e.y/this.radius,-1,1))),this}}),Object.assign(vr.prototype,{set:function(e,t,i){return this.radius=e,this.theta=t,this.y=i,this},clone:function(){return(new this.constructor).copy(this)},copy:function(e){return this.radius=e.radius,this.theta=e.theta,this.y=e.y,this},setFromVector3:function(e){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}}),Object.assign(yr.prototype,{set:function(e,t){return this.min.copy(e),this.max.copy(t),this},setFromPoints:function(e){this.makeEmpty();for(var t=0,i=e.length;t<i;t++)this.expandByPoint(e[t]);return this},setFromCenterAndSize:(tl=new $,function(e,t){return t=tl.copy(t).multiplyScalar(.5),this.min.copy(e).sub(t),this.max.copy(e).add(t),this}),clone:function(){return(new this.constructor).copy(this)},copy:function(e){return this.min.copy(e.min),this.max.copy(e.max),this},makeEmpty:function(){return this.min.x=this.min.y=1/0,this.max.x=this.max.y=-1/0,this},isEmpty:function(){return this.max.x<this.min.x||this.max.y<this.min.y},getCenter:function(e){return void 0===e&&(console.warn("THREE.Box2: .getCenter() target is now required"),e=new $),this.isEmpty()?e.set(0,0):e.addVectors(this.min,this.max).multiplyScalar(.5)},getSize:function(e){return void 0===e&&(console.warn("THREE.Box2: .getSize() target is now required"),e=new $),this.isEmpty()?e.set(0,0):e.subVectors(this.max,this.min)},expandByPoint:function(e){return this.min.min(e),this.max.max(e),this},expandByVector:function(e){return this.min.sub(e),this.max.add(e),this},expandByScalar:function(e){return this.min.addScalar(-e),this.max.addScalar(e),this},containsPoint:function(e){return!(e.x<this.min.x||e.x>this.max.x||e.y<this.min.y||e.y>this.max.y)},containsBox:function(e){return this.min.x<=e.min.x&&e.max.x<=this.max.x&&this.min.y<=e.min.y&&e.max.y<=this.max.y},getParameter:function(e,t){return void 0===t&&(console.warn("THREE.Box2: .getParameter() target is now required"),t=new $),t.set((e.x-this.min.x)/(this.max.x-this.min.x),(e.y-this.min.y)/(this.max.y-this.min.y))},intersectsBox:function(e){return!(e.max.x<this.min.x||e.min.x>this.max.x||e.max.y<this.min.y||e.min.y>this.max.y)},clampPoint:function(e,t){return void 0===t&&(console.warn("THREE.Box2: .clampPoint() target is now required"),t=new $),t.copy(e).clamp(this.min,this.max)},distanceToPoint:(el=new $,function(e){return el.copy(e).clamp(this.min,this.max).sub(e).length()}),intersect:function(e){return this.min.max(e.min),this.max.min(e.max),this},union:function(e){return this.min.min(e.min),this.max.max(e.max),this},translate:function(e){return this.min.add(e),this.max.add(e),this},equals:function(e){return e.min.equals(this.min)&&e.max.equals(this.max)}}),((xr.prototype=Object.create(u.prototype)).constructor=xr).prototype.isImmediateRenderObject=!0,((br.prototype=Object.create(Et.prototype)).constructor=br).prototype.update=(il=new _e,nl=new _e,rl=new g,function(){var e=["a","b","c"];this.object.updateMatrixWorld(!0),rl.getNormalMatrix(this.object.matrixWorld);var t=this.object.matrixWorld,i=this.geometry.attributes.position,n=this.object.geometry;if(n&&n.isGeometry)for(var r=n.vertices,o=n.faces,a=n=0,s=o.length;a<s;a++)for(var l=o[a],c=0,u=l.vertexNormals.length;c<u;c++){var h=l.vertexNormals[c];il.copy(r[l[e[c]]]).applyMatrix4(t),nl.copy(h).applyMatrix3(rl).normalize().multiplyScalar(this.size).add(il),i.setXYZ(n,il.x,il.y,il.z),n+=1,i.setXYZ(n,nl.x,nl.y,nl.z),n+=1}else if(n&&n.isBufferGeometry)for(e=n.attributes.position,r=n.attributes.normal,c=n=0,u=e.count;c<u;c++)il.set(e.getX(c),e.getY(c),e.getZ(c)).applyMatrix4(t),nl.set(r.getX(c),r.getY(c),r.getZ(c)),nl.applyM
1atrix3(rl).normalize().multiplyScalar(this.size).add(il),i.setXYZ(n,il.x,il.y,il.z),n+=1,i.setXYZ(n,nl.x,nl.y,nl.z),n+=1;i.needsUpdate=!0}),((wr.prototype=Object.create(u.prototype)).constructor=wr).prototype.dispose=function(){this.cone.geometry.dispose(),this.cone.material.dispose()},wr.prototype.update=(ol=new _e,al=new _e,function(){this.light.updateMatrixWorld();var e=this.light.distance?this.light.distance:1e3,t=e*Math.tan(this.light.angle);this.cone.scale.set(t,t,e),ol.setFromMatrixPosition(this.light.matrixWorld),al.setFromMatrixPosition(this.light.target.matrixWorld),this.cone.lookAt(al.sub(ol)),void 0!==this.color?this.cone.material.color.set(this.color):this.cone.material.color.copy(this.light.color)}),((_r.prototype=Object.create(Et.prototype)).constructor=_r).prototype.updateMatrixWorld=(sl=new _e,ll=new we,cl=new we,function(e){var t=this.bones,i=this.geometry,n=i.getAttribute("position");cl.getInverse(this.root.matrixWorld);for(var r=0,o=0;r<t.length;r++){var a=t[r];a.parent&&a.parent.isBone&&(ll.multiplyMatrices(cl,a.matrixWorld),sl.setFromMatrixPosition(ll),n.setXYZ(o,sl.x,sl.y,sl.z),ll.multiplyMatrices(cl,a.parent.matrixWorld),sl.setFromMatrixPosition(ll),n.setXYZ(o+1,sl.x,sl.y,sl.z),o+=2)}i.getAttribute("position").needsUpdate=!0,u.prototype.updateMatrixWorld.call(this,e)}),((Tr.prototype=Object.create(I.prototype)).constructor=Tr).prototype.dispose=function(){this.geometry.dispose(),this.material.dispose()},Tr.prototype.update=function(){void 0!==this.color?this.material.color.set(this.color):this.material.color.copy(this.light.color)},((Er.prototype=Object.create(u.prototype)).constructor=Er).prototype.dispose=function(){this.children[0].geometry.dispose(),this.children[0].material.dispose()},Er.prototype.update=function(){var e=.5*this.light.width,t=.5*this.light.height,i=this.line.geometry.attributes.position,n=i.array;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)},((Sr.prototype=Object.create(u.prototype)).constructor=Sr).prototype.dispose=function(){this.children[0].geometry.dispose(),this.children[0].material.dispose()},Sr.prototype.update=(ul=new _e,hl=new _,dl=new _,function(){var e=this.children[0];if(void 0!==this.color)this.material.color.set(this.color);else{var t=e.geometry.getAttribute("color");hl.copy(this.light.color),dl.copy(this.light.groundColor);for(var i=0,n=t.count;i<n;i++){var r=i<n/2?hl:dl;t.setXYZ(i,r.r,r.g,r.b)}t.needsUpdate=!0}e.lookAt(ul.setFromMatrixPosition(this.light.matrixWorld).negate())}),(Mr.prototype=Object.create(Et.prototype)).constructor=Mr,(Ar.prototype=Object.create(Et.prototype)).constructor=Ar,((Cr.prototype=Object.create(Et.prototype)).constructor=Cr).prototype.update=(pl=new _e,fl=new _e,ml=new g,function(){this.object.updateMatrixWorld(!0),ml.getNormalMatrix(this.object.matrixWorld);for(var e=this.object.matrixWorld,t=this.geometry.attributes.position,i=this.object.geometry,n=i.vertices,r=0,o=0,a=(i=i.faces).length;o<a;o++){var s=i[o],l=s.normal;pl.copy(n[s.a]).add(n[s.b]).add(n[s.c]).divideScalar(3).applyMatrix4(e),fl.copy(l).applyMatrix3(ml).normalize().multiplyScalar(this.size).add(pl),t.setXYZ(r,pl.x,pl.y,pl.z),r+=1,t.setXYZ(r,fl.x,fl.y,fl.z),r+=1}t.needsUpdate=!0}),((Lr.prototype=Object.create(u.prototype)).constructor=Lr).prototype.dispose=function(){this.lightPlane.geometry.dispose(),this.lightPlane.material.dispose(),this.targetLine.geometry.dispose(),this.targetLine.material.dispose()},Lr.prototype.update=(gl=new _e,vl=new _e,yl=new _e,function(){gl.setFromMatrixPosition(this.light.matrixWorld),vl.setFromMatrixPosition(this.light.target.matrixWorld),yl.subVectors(vl,gl),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
1=yl.length()}),((Rr.prototype=Object.create(Et.prototype)).constructor=Rr).prototype.update=function(){function e(e,t,i,n){if(a.set(t,i,n).unproject(s),void 0!==(e=o[e]))for(t=r.getAttribute("position"),i=0,n=e.length;i<n;i++)t.setXYZ(e[i],a.x,a.y,a.z)}var r,o,a=new _e,s=new l;return function(){r=this.geometry,o=this.pointMap,s.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),r.getAttribute("position").needsUpdate=!0}}(),((Pr.prototype=Object.create(Et.prototype)).constructor=Pr).prototype.update=(xl=new i,function(e){if(void 0!==e&&console.warn("THREE.BoxHelper: .update() has no longer arguments."),void 0!==this.object&&xl.setFromObject(this.object),!xl.isEmpty()){e=xl.min;var t=xl.max,i=this.geometry.attributes.position,n=i.array;n[0]=t.x,n[1]=t.y,n[2]=t.z,n[3]=e.x,n[4]=t.y,n[5]=t.z,n[6]=e.x,n[7]=e.y,n[8]=t.z,n[9]=t.x,n[10]=e.y,n[11]=t.z,n[12]=t.x,n[13]=t.y,n[14]=e.z,n[15]=e.x,n[16]=t.y,n[17]=e.z,n[18]=e.x,n[19]=e.y,n[20]=e.z,n[21]=t.x,n[22]=e.y,n[23]=e.z,i.needsUpdate=!0,this.geometry.computeBoundingSphere()}}),Pr.prototype.setFromObject=function(e){return this.object=e,this.update(),this},((kr.prototype=Object.create(Et.prototype)).constructor=kr).prototype.updateMatrixWorld=function(e){var t=this.box;t.isEmpty()||(t.getCenter(this.position),t.getSize(this.scale),this.scale.multiplyScalar(.5),u.prototype.updateMatrixWorld.call(this,e))},((Nr.prototype=Object.create(Tt.prototype)).constructor=Nr).prototype.updateMatrixWorld=function(e){var t=-this.plane.constant;Math.abs(t)<1e-8&&(t=1e-8),this.scale.set(.5*this.size,.5*this.size,t),this.lookAt(this.plane.normal),u.prototype.updateMatrixWorld.call(this,e)},((Dr.prototype=Object.create(u.prototype)).constructor=Dr).prototype.setDirection=(Tl=new _e,function(e){.99999<e.y?this.quaternion.set(0,0,0,1):e.y<-.99999?this.quaternion.set(1,0,0,0):(Tl.set(e.z,0,-e.x).normalize(),_l=Math.acos(e.y),this.quaternion.setFromAxisAngle(Tl,_l))}),Dr.prototype.setLength=function(e,t,i){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()},Dr.prototype.setColor=function(e){this.line.material.color.copy(e),this.cone.material.color.copy(e)},(Or.prototype=Object.create(Et.prototype)).constructor=Or,Ji.create=function(e,t){return console.log("THREE.Curve.create() has been deprecated"),e.prototype=Object.create(Ji.prototype),(e.prototype.constructor=e).prototype.getPoint=t,e},Object.assign(dn.prototype,{createPointsGeometry:function(e){return console.warn("THREE.CurvePath: .createPointsGeometry() has been removed. Use new THREE.Geometry().setFromPoints( points ) instead."),e=this.getPoints(e),this.createGeometry(e)},createSpacedPointsGeometry:function(e){return console.warn("THREE.CurvePath: .createSpacedPointsGeometry() has been removed. Use new THREE.Geometry().setFromPoints( points ) instead."),e=this.getSpacedPoints(e),this.createGeometry(e)},createGeometry:function(e){console.warn("THREE.CurvePath: .createGeometry() has been removed. Use new THREE.Geometry().setFromPoints( points ) instead.");for(var t=new T,i=0,n=e.length;i<n;i++){var r=e[i];t.vertices.push(new _e(r.x,r.y,r.z||0))}return t}}),Object.assign(pn.prototype,{fromPoints:function(e){console.warn("THREE.Path: .fromPoints() has been renamed to .setFromPoints()."),this.setFromPoints(e)}}),Ir.prototype=Object.create(en.prototype),Ur.prototype=Object.create(en.prototype),zr.prototype=Object.create(en.prototype),Object.assign(zr.prototype,{initFromArray:function(){console.error("THREE.Spline: .initFromArray() has been removed.")},getControlPointsArray:function(){console.error("THREE.Spline: .getControlPointsArray() has been removed.")},reparametrizeByArcLength:function(){console.error("THREE.Spline: .reparametrizeByArcLength() has been removed.")}}),Mr.prototype.setColors=function(){console.error("THREE.GridHelper: setColors() has been deprecated, pass them in the constructor instead.")},_r.prototype.update=function(){console.error("THREE.SkeletonHelper: update(
1) no longer needs to be called.")},Object.assign(Fn.prototype,{extractUrlBase:function(e){return console.warn("THREE.Loader: .extractUrlBase() has been deprecated. Use THREE.LoaderUtils.extractUrlBase() instead."),Ns.extractUrlBase(e)}}),Object.assign(yr.prototype,{center:function(e){return console.warn("THREE.Box2: .center() has been renamed to .getCenter()."),this.getCenter(e)},empty:function(){return console.warn("THREE.Box2: .empty() has been renamed to .isEmpty()."),this.isEmpty()},isIntersectionBox:function(e){return console.warn("THREE.Box2: .isIntersectionBox() has been renamed to .intersectsBox()."),this.intersectsBox(e)},size:function(e){return console.warn("THREE.Box2: .size() has been renamed to .getSize()."),this.getSize(e)}}),Object.assign(i.prototype,{center:function(e){return console.warn("THREE.Box3: .center() has been renamed to .getCenter()."),this.getCenter(e)},empty:function(){return console.warn("THREE.Box3: .empty() has been renamed to .isEmpty()."),this.isEmpty()},isIntersectionBox:function(e){return console.warn("THREE.Box3: .isIntersectionBox() has been renamed to .intersectsBox()."),this.intersectsBox(e)},isIntersectionSphere:function(e){return console.warn("THREE.Box3: .isIntersectionSphere() has been renamed to .intersectsSphere()."),this.intersectsSphere(e)},size:function(e){return console.warn("THREE.Box3: .size() has been renamed to .getSize()."),this.getSize(e)}}),O.prototype.center=function(e){return console.warn("THREE.Line3: .center() has been renamed to .getCenter()."),this.getCenter(e)},Object.assign(oo,{random16:function(){return console.warn("THREE.Math: .random16() has been deprecated. Use Math.random() instead."),Math.random()},nearestPowerOfTwo:function(e){return console.warn("THREE.Math: .nearestPowerOfTwo() has been renamed to .floorPowerOfTwo()."),oo.floorPowerOfTwo(e)},nextPowerOfTwo:function(e){return console.warn("THREE.Math: .nextPowerOfTwo() has been renamed to .ceilPowerOfTwo()."),oo.ceilPowerOfTwo(e)}}),Object.assign(g.prototype,{flattenToArrayOffset:function(e,t){return console.warn("THREE.Matrix3: .flattenToArrayOffset() has been deprecated. Use .toArray() instead."),this.toArray(e,t)},multiplyVector3:function(e){return console.warn("THREE.Matrix3: .multiplyVector3(
1) has been removed. Use vector.applyMatrix3( matrix ) instead."),e.applyMatrix3(this)},multiplyVector3Array:function(){console.error("THREE.Matrix3: .multiplyVector3Array() has been removed.")},applyToBuffer:function(e){return console.warn("THREE.Matrix3: .applyToBuffer() has been removed. Use matrix.applyToBufferAttribute( attribute ) instead."),this.applyToBufferAttribute(e)},applyToVector3Array:function(){console.error("THREE.Matrix3: .applyToVector3Array() has been removed.")}}),Object.assign(we.prototype,{extractPosition:function(e){return console.warn("THREE.Matrix4: .extractPosition() has been renamed to .copyPosition()."),this.copyPosition(e)},flattenToArrayOffset:function(e,t){return console.warn("THREE.Matrix4: .flattenToArrayOffset() has been deprecated. Use .toArray() instead."),this.toArray(e,t)},getPosition:function(){return void 0===El&&(El=new _e),console.warn("THREE.Matrix4: .getPosition() has been removed. Use Vector3.setFromMatrixPosition( matrix ) instead."),El.setFromMatrixColumn(this,3)},setRotationFromQuaternion:function(e){return console.warn("THREE.Matrix4: .setRotationFromQuaternion() has been renamed to .makeRotationFromQuaternion()."),this.makeRotationFromQuaternion(e)},multiplyToArray:function(){console.warn("THREE.Matrix4: .multiplyToArray() has been removed.")},multiplyVector3:function(e){return console.warn("THREE.Matrix4: .multiplyVector3(
1) has been removed. Use vector.applyMatrix4( matrix ) instead."),e.applyMatrix4(this)},multiplyVector4:function(e){return console.warn("THREE.Matrix4: .multiplyVector4() has been removed. Use vector.applyMatrix4( matrix ) instead."),e.applyMatrix4(this)},multiplyVector3Array:function(){console.error("THREE.Matrix4: .multiplyVector3Array() has been removed.")},rotateAxis:function(e){console.warn("THREE.Matrix4: .rotateAxis() has been removed. Use Vector3.transformDirection( matrix ) instead."),e.transformDirection(this)},crossVector:function(e){return console.warn("THREE.Matrix4: .crossVector() has been removed. Use vector.applyMatrix4( matrix ) instead."),e.applyMatrix4(this)},translate:function(){console.error("THREE.Matrix4: .translate() has been removed.")},rotateX:function(){console.error("THREE.Matrix4: .rotateX() has been removed.")},rotateY:function(){console.error("THREE.Matrix4: .rotateY() has been removed.")},rotateZ:function(){console.error("THREE.Matrix4: .rotateZ() has been removed.")},rotateByAxis:function(){console.error("THREE.Matrix4: .rotateByAxis() has been removed.")},applyToBuffer:function(e){return console.warn("THREE.Matrix4: .applyToBuffer() has been removed. Use matrix.applyToBufferAttribute( attribute ) instead."),this.applyToBufferAttribute(e)},applyToVector3Array:function(){console.error("THREE.Matrix4: .applyToVector3Array() has been removed.")},makeFrustum:function(e,t,i,n,r,o){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)}}),v.prototype.isIntersectionLine=function(e){return console.warn("THREE.Plane: .isIntersectionLine() has been renamed to .intersectsLine()."),this.intersectsLine(e)},j.prototype.multiplyVector3=function(e){return console.warn("THREE.Quaternion: .multiplyVector3(
1) has been removed. Use is now vector.applyQuaternion( quaternion ) instead."),e.applyQuaternion(this)},Object.assign(z.prototype,{isIntersectionBox:function(e){return console.warn("THREE.Ray: .isIntersectionBox() has been renamed to .intersectsBox()."),this.intersectsBox(e)},isIntersectionPlane:function(e){return console.warn("THREE.Ray: .isIntersectionPlane() has been renamed to .intersectsPlane()."),this.intersectsPlane(e)},isIntersectionSphere:function(e){return console.warn("THREE.Ray: .isIntersectionSphere() has been renamed to .intersectsSphere()."),this.intersectsSphere(e)}}),Object.assign(H.prototype,{area:function(){return console.warn("THREE.Triangle: .area() has been renamed to .getArea()."),this.getArea()},barycoordFromPoint:function(e,t){return console.warn("THREE.Triangle: .barycoordFromPoint() has been renamed to .getBarycoord()."),this.getBarycoord(e,t)},midpoint:function(e){return console.warn("THREE.Triangle: .midpoint() has been renamed to .getMidpoint()."),this.getMidpoint(e)},normal:function(e){return console.warn("THREE.Triangle: .normal() has been renamed to .getNormal()."),this.getNormal(e)},plane:function(e){return console.warn("THREE.Triangle: .plane() has been renamed to .getPlane()."),this.getPlane(e)}}),Object.assign(H,{barycoordFromPoint:function(e,t,i,n,r){return console.warn("THREE.Triangle: .barycoordFromPoint() has been renamed to .getBarycoord()."),H.getBarycoord(e,t,i,n,r)},normal:function(e,t,i,n){return console.warn("THREE.Triangle: .normal() has been renamed to .getNormal()."),H.getNormal(e,t,i,n)}}),Object.assign(fn.prototype,{extractAllPoints:function(e){return console.warn("THREE.Shape: .extractAllPoints() has been removed. Use .extractPoints() instead."),this.extractPoints(e)},extrude:function(e){return console.warn("THREE.Shape: .extrude() has been removed. Use ExtrudeGeometry() instead."),new fi(this,e)},makeGeometry:function(e){return console.warn("THREE.Shape: .makeGeometry() has been removed. Use ShapeGeometry() instead."),new Ei(this,e)}}),Object.assign($.prototype,{fromAttribute:function(e,t,i){return console.warn("THREE.Vector2: .fromAttribute() has been renamed to .fromBufferAttribute()."),this.fromBufferAttribute(e,t,i)},distanceToManhattan:function(e){return console.warn("THREE.Vector2: .distanceToManhattan() has been renamed to .manhattanDistanceTo()."),this.manhattanDistanceTo(e)},lengthManhattan:function(){return console.warn("THREE.Vector2: .lengthManhattan() has been renamed to .manhattanLength()."),this.manhattanLength()}}),Object.assign(_e.prototype,{setEulerFromRotationMatrix:function(){console.error("THREE.Vector3: .setEulerFromRotationMatrix() has been removed. Use Euler.setFromRotationMatrix() instead.")},setEulerFromQuaternion:function(){console.error("THREE.Vector3: .setEulerFromQuaternion() has been removed. Use Euler.setFromQuaternion() instead.")},getPositionFromMatrix:function(e){return console.warn("THREE.Vector3: .getPositionFromMatrix() has been renamed to .setFromMatrixPosition()."),this.setFromMatrixPosition(e)},getScaleFromMatrix:function(e){return console.warn("THREE.Vector3: .getScaleFromMatrix() has been renamed to .setFromMatrixScale()."),this.setFromMatrixScale(e)},getColumnFromMatrix:function(e,t){return console.warn("THREE.Vector3: .getColumnFromMatrix() has been renamed to .setFromMatrixColumn()."),this.setFromMatrixColumn(t,e)},applyProjection:function(e){return console.warn("THREE.Vector3: .applyProjection() has been removed. Use .applyMatrix4( m ) instead."),this.applyMatrix4(e)},fromAttribute:function(e,t,i){return console.warn("THREE.Vector3: .fromAttribute() has been renamed to .fromBufferAttribute()."),this.fromBufferAttribute(e,t,i)},distanceToManhattan:function(e){return console.warn("THREE.Vector3: .distanceToManhattan() has been renamed to .manhattanDistanceTo()."),this.manhattanDistanceTo(e)},lengthManhattan:function(){return console.warn("THREE.Vector3: .lengthManhattan() has been renamed to .manhattanLength()."),this.manhattanLength()}}),Object.assign(Te.prototype,{fromAttribute:function(e,t,i){return console.warn("THREE.Vector4: .fromAttribute() has been renamed to .fromBufferAttribute()."),this.fromBufferAttribute(e,t,i)},lengthManhattan:function(){return console.warn("THREE.Vector4: .lengthManhattan() has been renamed to .manhattanLength()."),this.manhattanLength()}}),Object.assign(T.prototype,{computeTangents:function(){console.error("THREE.Geometry: .computeTangents() has been removed.")},computeLineDistances:function(){console.error("THREE.Geometry: .computeLineDistances() has been removed. Use THREE.Line.computeLineDistances() instead.")}}),Object.assign(u.prototype,{getChildByName:function(e){return console.warn("THREE.Object3D: .getChildByName() has been renamed to .getObjectByName()."),this.getObjectByName(e)},renderDepth:function(){console.warn("THREE.Object3D: .renderDepth has been removed. Use .renderOrder, instead.")},translate:function(e,t){return console.warn("THREE.Object3D: .translate() has been removed. Use .translateOnAxis( axis, distance ) instead."),this.translateOnAxis(t,e)},getWorldRotation:function(){console.error("THREE.Object3D: .getWorldRotation() has been removed. Use THREE.Object3D.getWorldQuaternion( target ) instead.")}}),Object.defineProperties(u.prototype,{eulerOrder:{get:function(){return console.warn("THREE.Object3D: .eulerOrder is now .rotation.order."),this.rotation.order},set:function(e){console.warn("THREE.Object3D: .eulerOrder is now .rotation.order."),this.rotation.order=e}},useQuaternion:{get:function(){console.warn("THREE.Object3D: .useQuaternion has been removed. The library n
1ow uses quaternions by default.")},set:function(){console.warn("THREE.Object3D: .useQuaternion has been removed. The library now uses quaternions by default.")}}}),Object.defineProperties(yt.prototype,{objects:{get:function(){return console.warn("THREE.LOD: .objects has been renamed to .levels."),this.levels}}}),Object.defineProperty(xt.prototype,"useVertexTexture",{get:function(){console.warn("THREE.Skeleton: useVertexTexture has been removed.")},set:function(){console.warn("THREE.Skeleton: useVertexTexture has been removed.")}}),Object.defineProperty(Ji.prototype,"__arcLengthDivisions",{get:function(){return console.warn("THREE.Curve: .__arcLengthDivisions is now .arcLengthDivisions."),this.arcLengthDivisions},set:function(e){console.warn("THREE.Curve: .__arcLengthDivisions is now .arcLengthDivisions."),this.arcLengthDivisions=e}}),ct.prototype.setLens=function(e,t){console.warn("THREE.PerspectiveCamera.setLens is deprecated. Use .setFocalLength and .filmGauge for a photographic setup."),void 0!==t&&(this.filmGauge=t),this.setFocalLength(e)},Object.defineProperties(mn.prototype,{onlyShadow:{set:function(){console.warn("THREE.Light: .onlyShadow has been removed.")}},shadowCameraFov:{set:function(e){console.warn("THREE.Light: .shadowCameraFov is now .shadow.camera.fov."),this.shadow.camera.fov=e}},shadowCameraLeft:{set:function(e){console.warn("THREE.Light: .shadowCameraLeft is now .shadow.camera.left."),this.shadow.camera.left=e}},shadowCameraRight:{set:function(e){console.warn("THREE.Light: .shadowCameraRight is now .shadow.camera.right."),this.shadow.camera.right=e}},shadowCameraTop:{set:function(e){console.warn("THREE.Light: .shadowCameraTop is now .shadow.camera.top."),this.shadow.camera.top=e}},shadowCameraBottom:{set:function(e){console.warn("THREE.Light: .shadowCameraBottom is now .shadow.camera.bottom."),this.shadow.camera.bottom=e}},shadowCameraNear:{set:function(e){console.warn("THREE.Light: .shadowCameraNear is now .shadow.camera.near."),this.shadow.camera.near=e}},shadowCameraFar:{set:function(e){console.warn("THREE.Light: .shadowCameraFar is now .shadow.camera.far."),this.shadow.camera.far=e}},shadowCameraVisible:{set:function(){console.warn("THREE.Light: .shadowCameraVisible has been removed. Use new THREE.CameraHelper( light.shadow.camera ) instead.")}},shadowBias:{set:function(e){console.warn("THREE.Light: .shadowBias is now .shadow.bias."),this.shadow.bias=e}},shadowDarkness:{set:function(){console.warn("THREE.Light: .shadowDarkness has been removed.")}},shadowMapWidth:{set:function(e){console.warn("THREE.Light: .shadowMapWidth is now .shadow.mapSize.width."),this.shadow.mapSize.width=e}},shadowMapHeight:{set:function(e){console.warn("THREE.Light: .shadowMapHeight is now .shadow.mapSize.height."),this.shadow.mapSize.height=e}}}),Object.defineProperties(y.prototype,{length:{get:function(){return console.warn("THREE.BufferAttribute: .length has been deprecated. Use .count instead."),this.array.length}},copyIndicesArray:function(){console.error("THREE.BufferAttribute: .copyIndicesArray() has been removed.")}}),Object.assign(L.prototype,{addIndex:function(e){console.warn("THREE.BufferGeometry: .addIndex() has been renamed to .setIndex()."),this.setIndex(e)},addDrawCall:function(e,t,i){void 0!==i&&console.warn("THREE.BufferGeometry: .addDrawCall() no longer supports indexOffset."),console.warn("THREE.BufferGeometry: .addDrawCall() is now .addGroup()."),this.addGroup(e,t)},clearDrawCalls:function(){console.warn("THREE.BufferGeometry: .clearDrawCalls() is now .clearGroups()."),this.clearGroups()},computeTangents:function(){console.warn("THREE.BufferGeometry: .computeTangents() has been removed.")},computeOffsets:function(){console.warn("THREE.BufferGeometry: .computeOffsets() has been removed.")}}),Object.defineProperties(L.prototype,{drawcalls:{get:function(){return console.error("THREE.BufferGeometry: .drawcalls has been renamed to .groups."),this.groups}},offsets:{get:function(){return console.warn("THREE.BufferGeometry: .offsets has been renamed to .groups."),this.groups}}}),Object.defineProperties(ar.prototype,{dynamic:{set:function(){console.warn("THREE.Uniform: .dynamic has been removed. Use object.onBeforeRender() instead.")}},onUpdate:{value:function(){return console.warn("THREE.Uniform: .onUpdate() has been removed. Use object.onBeforeRender() instead."),this}}}),Object.defineProperties(k.prototype,{wrapAround:{get:function(){console.warn("THREE.Material: .wrapAround has been removed.")}
vendor: 4,540 bytes, line 1
1,set:function(){console.warn("THREE.Material: .wrapAround has been removed.")}},wrapRGB:{get:function(){return console.warn("THREE.Material: .wrapRGB has been removed."),new _}},shading:{get:function(){console.error("THREE."+this.type+": .shading has been removed. Use the boolean .flatShading instead.")},set:function(e){console.warn("THREE."+this.type+": .shading has been removed. Use the boolean .flatShading instead."),this.flatShading=1===e}}}),Object.defineProperties(zi.prototype,{metal:{get:function(){return console.warn("THREE.MeshPhongMaterial: .metal has been removed. Use THREE.MeshStandardMaterial instead."),!1},set:function(){console.warn("THREE.MeshPhongMaterial: .metal has been removed. Use THREE.MeshStandardMaterial instead")}}}),Object.defineProperties(D.prototype,{derivatives:{get:function(){return console.warn("THREE.ShaderMaterial: .derivatives has been moved to .extensions.derivatives."),this.extensions.derivatives},set:function(e){console.warn("THREE. ShaderMaterial: .derivatives has been moved to .extensions.derivatives."),this.extensions.derivatives=e}}}),Object.assign(dt.prototype,{getCurrentRenderTarget:function(){return console.warn("THREE.WebGLRenderer: .getCurrentRenderTarget() is now .getRenderTarget()."),this.getRenderTarget()},getMaxAnisotropy:function(){return console.warn("THREE.WebGLRenderer: .getMaxAnisotropy() is now .capabilities.getMaxAnisotropy()."),this.capabilities.getMaxAnisotropy()},getPrecision:function(){return console.warn("THREE.WebGLRenderer: .getPrecision() is now .capabilities.precision."),this.capabilities.precision},resetGLState:function(){return console.warn("THREE.WebGLRenderer: .resetGLState() is now .state.reset()."),this.state.reset()},supportsFloatTextures:function(){return console.warn("THREE.WebGLRenderer: .supportsFloatTextures() is now .extensions.get( 'OES_texture_float' )."),this.extensions.get("OES_texture_float")},supportsHalfFloatTextures:function(){return console.warn("THREE.WebGLRenderer: .supportsHalfFloatTextures() is now .extensions.get( 'OES_texture_half_float' )."),this.extensions.get("OES_texture_half_float")},supportsStandardDerivatives:function(){return console.warn("THREE.WebGLRenderer: .supportsStandardDerivatives() is now .extensions.get( 'OES_standard_derivatives' )."),this.extensions.get("OES_standard_derivatives")},supportsCompressedTextureS3TC:function(){return console.warn("THREE.WebGLRenderer: .supportsCompressedTextureS3TC() is now .extensions.get( 'WEBGL_compressed_texture_s3tc' )."),this.extensions.get("WEBGL_compressed_texture_s3tc")},supportsCompressedTexturePVRTC:function(){return console.warn("THREE.WebGLRenderer: .supportsCompressedTexturePVRTC() is now .extensions.get( 'WEBGL_compressed_texture_pvrtc' )."),this.extensions.get("WEBGL_compressed_texture_pvrtc")},supportsBlendMinMax:function(){return console.warn("THREE.WebGLRenderer: .supportsBlendMinMax() is now .extensions.get( 'EXT_blend_minmax' )."),this.extensions.get("EXT_blend_minmax")},supportsVertexTextures:function(){return console.warn("THREE.WebGLRenderer: .supportsVertexTextures() is now .capabilities.vertexTextures."),this.capabilities.vertexTextures},supportsInstancedArrays:function(){return console.warn("THREE.WebGLRenderer: .supportsInstancedArrays() is now .extensions.get( 'ANGLE_instanced_arrays' )."),this.extensions.get("ANGLE_instanced_arrays")},enableScissorTest:function(e){console.warn("THREE.WebGLRenderer: .enableScissorTest() is now .setScissorTest()."),this.setScissorTest(e)},initMaterial:function(){console.warn("THREE.WebGLRenderer: .initMaterial() has been removed.")},addPrePlugin:function(){console.warn("THREE.WebGLRenderer: .addPrePlugin() has been removed.")},addPostPlugin:function(){console.warn("THREE.WebGLRenderer: .addPostPlugin() has been removed.")},updateShadowMap:function(){console.warn("THREE.WebGLRenderer: .updateShadowMap() has been removed.")},setFaceCulling:function(){console.warn("THREE.WebGLRenderer: .setFaceCulling() has been removed.")}}),Object.defineProperties(dt.prototype,{shadowMapEnabled:{get:function(){return this.shadowMap.enabled},set:function(e){console.warn("THREE.WebGLRenderer: .shadowMapEnabled is now .shadowMap.enabled."),this.shadowMap.enabled=e}},shadowMapType:{get:function(){return this.shadowMap.type},set:function(e){console.warn("THREE.WebGLRenderer: .shadowMapType is now .shadowMap.type."),this.shadowMap.type=e}},shadowMapCullFace:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMapCullFace has been removed. Set Material.shadowSide instead.")}
vendor: 4,083 bytes, line 1
1,set:function(){console.warn("THREE.WebGLRenderer: .shadowMapCullFace has been removed. Set Material.shadowSide instead.")}}}),Object.defineProperties(nt.prototype,{cullFace:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMap.cullFace has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMap.cullFace has been removed. Set Material.shadowSide instead.")}},renderReverseSided:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderReverseSided has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderReverseSided has been removed. Set Material.shadowSide instead.")}},renderSingleSided:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderSingleSided has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderSingleSided has been removed. Set Material.shadowSide instead.")}}}),Object.defineProperties(A.prototype,{wrapS:{get:function(){return console.warn("THREE.WebGLRenderTarget: .wrapS is now .texture.wrapS."),this.texture.wrapS},set:function(e){console.warn("THREE.WebGLRenderTarget: .wrapS is now .texture.wrapS."),this.texture.wrapS=e}},wrapT:{get:function(){return console.warn("THREE.WebGLRenderTarget: .wrapT is now .texture.wrapT."),this.texture.wrapT},set:function(e){console.warn("THREE.WebGLRenderTarget: .wrapT is now .texture.wrapT."),this.texture.wrapT=e}},magFilter:{get:function(){return console.warn("THREE.WebGLRenderTarget: .magFilter is now .texture.magFilter."),this.texture.magFilter},set:function(e){console.warn("THREE.WebGLRenderTarget: .magFilter is now .texture.magFilter."),this.texture.magFilter=e}},minFilter:{get:function(){return console.warn("THREE.WebGLRenderTarget: .minFilter is now .texture.minFilter."),this.texture.minFilter},set:function(e){console.warn("THREE.WebGLRenderTarget: .minFilter is now .texture.minFilter."),this.texture.minFilter=e}},anisotropy:{get:function(){return console.warn("THREE.WebGLRenderTarget: .anisotropy is now .texture.anisotropy."),this.texture.anisotropy},set:function(e){console.warn("THREE.WebGLRenderTarget: .anisotropy is now .texture.anisotropy."),this.texture.anisotropy=e}},offset:{get:function(){return console.warn("THREE.WebGLRenderTarget: .offset is now .texture.offset."),this.texture.offset},set:function(e){console.warn("THREE.WebGLRenderTarget: .offset is now .texture.offset."),this.texture.offset=e}},repeat:{get:function(){return console.warn("THREE.WebGLRenderTarget: .repeat is now .texture.repeat."),this.texture.repeat},set:function(e){console.warn("THREE.WebGLRenderTarget: .repeat is now .texture.repeat."),this.texture.repeat=e}},format:{get:function(){return console.warn("THREE.WebGLRenderTarget: .format is now .texture.format."),this.texture.format},set:function(e){console.warn("THREE.WebGLRenderTarget: .format is now .texture.format."),this.texture.format=e}},type:{get:function(){return console.warn("THREE.WebGLRenderTarget: .type is now .texture.type."),this.texture.type},set:function(e){console.warn("THREE.WebGLRenderTarget: .type is now .texture.type."),this.texture.type=e}},generateMipmaps:{get:function(){return console.warn("THREE.WebGLRenderTarget: .generateMipmaps is now .texture.generateMipmaps."),this.texture.generateMipmaps},set:function(e){console.warn("THREE.WebGLRenderTarget: .generateMipmaps is now .texture.generateMipmaps."),this.texture.generateMipmaps=e}}}),Object.defineProperties(ht.prototype,{standing:{set:function(){console.warn("THREE.WebVRManager: .standing has been removed.")}}}),Zn.prototype.load=function(e){console.warn("THREE.Audio: .load has been deprecated. Use THREE.AudioLoader instead.");var t=this;return(new qn).load(e,function(e){t.setBuffer(e)}),this},Kn.prototype.getData=function(){return console.warn("THREE.AudioAnalyser: .getData() is now .getFrequencyData()."),this.getFrequencyData()},Yn.prototype.updateCubeMap=function(e,t){return console.warn("THREE.CubeCamera: .updateCubeMap() is now .update(
1)."),this.update(e,t)},e.WebGLRenderTargetCube=n,e.WebGLRenderTarget=A,e.WebGLRenderer=dt,e.ShaderLib=ko,e.UniformsLib=Po,e.UniformsUtils=Ao,e.ShaderChunk=Mo,e.FogExp2=pt,e.Fog=ft,e.Scene=mt,e.Sprite=vt,e.LOD=yt,e.SkinnedMesh=wt,e.Skeleton=xt,e.Bone=bt,e.Mesh=I,e.LineSegments=Et,e.LineLoop=St,e.Line=Tt,e.Points=At,e.Group=Ct,e.VideoTexture=Lt,e.DataTexture=Ee,e.CompressedTexture=Rt,e.CubeTexture=B,e.CanvasTexture=rt,e.DepthTexture=Pt,e.Texture=d,e.CompressedTextureLoader=Wi,e.DataTextureLoader=$i,e.CubeTextureLoader=Xi,e.TextureLoader=Yi,e.ObjectLoader=Gn,e.MaterialLoader=zn,e.BufferGeometryLoader=Hn,e.DefaultLoadingManager=bs,e.LoadingManager=ji,e.JSONLoader=Bn,e.ImageLoader=qi,e.ImageBitmapLoader=jn,e.FontLoader=$n,e.FileLoader=Vi,e.Loader=Fn,e.LoaderUtils=Ns,e.Cache=xs,e.AudioLoader=qn,e.SpotLightShadow=yn,e.SpotLight=xn,e.PointLight=bn,e.RectAreaLight=En,e.HemisphereLight=gn,e.DirectionalLightShadow=wn,e.DirectionalLight=_n,e.AmbientLight=Tn,e.LightShadow=vn,e.Light=mn,e.StereoCamera=Xn,e.PerspectiveCamera=ct,e.OrthographicCamera=p,e.CubeCamera=Yn,e.ArrayCamera=ut,e.Camera=l,e.AudioListener=Jn,e.PositionalAudio=Qn,e.AudioContext=Sl,e.AudioAnalyser=Kn,e.Audio=Zn,e.VectorKeyframeTrack=In,e.StringKeyframeTrack=Sn,e.QuaternionKeyframeTrack=Ln,e.NumberKeyframeTrack=Pn,e.ColorKeyframeTrack=Rn,e.BooleanKeyframeTrack=Mn,e.PropertyMixer=er,e.PropertyBinding=ir,e.KeyframeTrack=On,e.AnimationUtils=As,e.AnimationObjectGroup=nr,e.AnimationMixer=or,e.AnimationClip=Un,e.Uniform=ar,e.InstancedBufferGeometry=sr,e.BufferGeometry=L,e.Geometry=T,e.InterleavedBufferAttribute=lr,e.InstancedInterleavedBuffer=ur,e.InterleavedBuffer=cr,e.InstancedBufferAttribute=hr,e.Face3=U,e.Object3D=u,e.Raycaster=dr,e.Layers=o,e.EventDispatcher=t,e.Clock=mr,e.QuaternionLinearInterpolant=Cn,e.LinearInterpolant=Nn,e.DiscreteInterpolant=Dn,e.CubicInterpolant=kn,e.Interpolant=An,e.Triangle=H,e.Math=oo,e.Spherical=gr,e.Cylindrical=vr,e.Plane=v,e.Frustum=Se,e.Sphere=a,e.Ray=z,e.Matrix4=we,e.Matrix3=g,e.Box3=i,e.Box2=yr,e.Line3=O,e.Euler=r,e.Vector4=Te,e.Vector3=_e,e.Vector2=$,e.Quaternion=j,e.Color=_,e.ImmediateRenderObject=xr,e.VertexNormalsHelper=br,e.SpotLightHelper=wr,e.SkeletonHelper=_r,e.PointLightHelper=Tr,e.RectAreaLightHelper=Er,e.HemisphereLightHelper=Sr,e.GridHelper=Mr,e.PolarGridHelper=Ar,e.FaceNormalsHelper=Cr,e.DirectionalLightHelper=Lr,e.CameraHelper=Rr,e.BoxHelper=Pr,e.Box3Helper=kr,e.PlaneHelper=Nr,e.ArrowHelper=Dr,e.AxesHelper=Or,e.Shape=fn,e.Path=pn,e.ShapePath=Vn,e.Font=Wn,e.CurvePath=dn,e.Curve=Ji,e.ShapeUtils=gs,e.WebGLUtils=lt,e.WireframeGeometry=kt,e.ParametricGeometry=Nt,e.ParametricBufferGeometry=Dt,e.TetrahedronGeometry=Ut,e.TetrahedronBufferGeometry=zt,e.OctahedronGeometry=Ht,e.OctahedronBufferGeometry=Ft,e.IcosahedronGeometry=Bt,e.IcosahedronBufferGeometry=Gt,e.DodecahedronGeometry=jt,e.DodecahedronBufferGeometry=Vt,e.PolyhedronGeometry=Ot,e.PolyhedronBufferGeometry=It,e.TubeGeometry=Wt,e.TubeBufferGeometry=$t,e.TorusKnotGeometry=qt,e.TorusKnotBufferGeometry=Xt,e.TorusGeometry=Yt,e.TorusBufferGeometry=Jt,e.TextGeometry=gi,e.TextBufferGeometry=vi,e.SphereGeometry=yi,e.SphereBufferGeometry=xi,e.RingGeometry=bi,e.RingBufferGeometry=wi,e.PlaneGeometry=R,e.PlaneBufferGeometry=P,e.LatheGeometry=_i,e.LatheBufferGeometry=Ti,e.ShapeGeometry=Ei,e.ShapeBufferGeometry=Si,e.ExtrudeGeometry=fi,e.ExtrudeBufferGeometry=mi,e.EdgesGeometry=Ai,e.ConeGeometry=Ri,e.ConeBufferGeometry=Pi,e.CylinderGeometry=Ci,e.CylinderBufferGeometry=Li,e.CircleGeometry=ki,e.CircleBufferGeometry=Ni,e.BoxGeometry=M,e.BoxBufferGeometry=C,e.ShadowMaterial=Di,e.SpriteMaterial=gt,e.RawShaderMaterial=Oi,e.ShaderMaterial=D,e.PointsMaterial=Mt,e.MeshPhysicalMaterial=Ui,e.MeshStandardMaterial=Ii,e.MeshPhongMaterial=zi,e.MeshToonMaterial=Hi,e.MeshNormalMaterial=Fi,e.MeshLambertMaterial=Bi,e.MeshDepthMaterial=tt,e.MeshDistanceMaterial=it,e.MeshBasicMaterial=N,e.LineDashedMaterial=Gi,e.LineBasicMaterial=_t,e.Material=k,e.Float64BufferAttribute=w,e.Float32BufferAttribute=q,e.Uint32BufferAttribute=b,e.Int32BufferAttribute=x,e.Uint16BufferAttribute=m,e.Int16BufferAttribute=f,e.Uint8ClampedBufferAttribute=h,e.Uint8BufferAttribute=c,e.Int8BufferAttribute=s,e.BufferAttribute=y,e.ArcCurve=Qi,e.CatmullRomCurve3=en,e.CubicBezierCurve=on,e.CubicBezierCurve3=an,e.EllipseCurve=Zi,e.LineCurve=sn,e.LineCurve3=ln,e.QuadraticBezierCurve=cn,e.QuadraticBezierCurve3=un,e.SplineCurve=hn,e.REVISION="91",e.MOUSE={LEFT:0,MIDDLE:1,RIGHT:2},e.CullFaceNone=0,e.CullFaceBack=1,e.CullFaceFront=2,e.CullFaceFrontBack=3,e.FrontFaceDirectionCW=0,e.FrontFaceDirectionCCW=1,e.BasicShadowMap=0,e.PCFShadowMap=1,e.PCFSoftShadowMap=2,e.FrontSide=0,e.BackSide=1,e.DoubleSide=2,e.FlatShading=1,e.SmoothShading=2,e.NoColors=0,e.FaceColors=1,e.VertexColors=2,e.NoBlending=0,e.NormalBlending=1,e.AdditiveBlending=2,e.SubtractiveBlending=3,e.MultiplyBlending=4,e.CustomBlending=5,e.AddEquation=100,e.SubtractEquation=101,e.ReverseSubtractEquation=102,e.MinEquation=103,e.MaxEquation=104,e.ZeroFactor=200,e.OneFactor=201,e.SrcColorFactor=202,e.OneMinusSrcColorFactor=203,e.SrcAlphaFactor=204,e.OneMinusSrcAlphaFactor=205,e.DstAlphaFactor=206,e.OneMinusDstAlphaFactor=207,e.DstColorFactor=208,e.OneMinusDstColorFactor=209,e.SrcAlphaSaturateFactor=210,e.NeverDepth=0,e.AlwaysDepth=1,e.LessDepth=2,e.LessEqualDepth=3,e.EqualDepth=4,e.GreaterEqualDepth=5,e.GreaterDepth=6,e.NotEqualDepth=
17,e.MultiplyOperation=0,e.MixOperation=1,e.AddOperation=2,e.NoToneMapping=0,e.LinearToneMapping=1,e.ReinhardToneMapping=2,e.Uncharted2ToneMapping=3,e.CineonToneMapping=4,e.UVMapping=300,e.CubeReflectionMapping=301,e.CubeRefractionMapping=302,e.EquirectangularReflectionMapping=303,e.EquirectangularRefractionMapping=304,e.SphericalReflectionMapping=305,e.CubeUVReflectionMapping=306,e.CubeUVRefractionMapping=307,e.RepeatWrapping=1e3,e.ClampToEdgeWrapping=1001,e.MirroredRepeatWrapping=1002,e.NearestFilter=1003,e.NearestMipMapNearestFilter=1004,e.NearestMipMapLinearFilter=1005,e.LinearFilter=1006,e.LinearMipMapNearestFilter=1007,e.LinearMipMapLinearFilter=1008,e.UnsignedByteType=1009,e.ByteType=1010,e.ShortType=1011,e.UnsignedShortType=1012,e.IntType=1013,e.UnsignedIntType=1014,e.FloatType=1015,e.HalfFloatType=1016,e.UnsignedShort4444Type=1017,e.UnsignedShort5551Type=1018,e.UnsignedShort565Type=1019,e.UnsignedInt248Type=1020,e.AlphaFormat=1021,e.RGBFormat=1022,e.RGBAFormat=1023,e.LuminanceFormat=1024,e.LuminanceAlphaFormat=1025,e.RGBEFormat=1023,e.DepthFormat=1026,e.DepthStencilFormat=1027,e.RGB_S3TC_DXT1_Format=33776,e.RGBA_S3TC_DXT1_Format=33777,e.RGBA_S3TC_DXT3_Format=33778,e.RGBA_S3TC_DXT5_Format=33779,e.RGB_PVRTC_4BPPV1_Format=35840,e.RGB_PVRTC_2BPPV1_Format=35841,e.RGBA_PVRTC_4BPPV1_Format=35842,e.RGBA_PVRTC_2BPPV1_Format=35843,e.RGB_ETC1_Format=36196,e.RGBA_ASTC_4x4_Format=37808,e.RGBA_ASTC_5x4_Format=37809,e.RGBA_ASTC_5x5_Format=37810,e.RGBA_ASTC_6x5_Format=37811,e.RGBA_ASTC_6x6_Format=37812,e.RGBA_ASTC_8x5_Format=37813,e.RGBA_ASTC_8x6_Format=37814,e.RGBA_ASTC_8x8_Format=37815,e.RGBA_ASTC_10x5_Format=37816,e.RGBA_ASTC_10x6_Format=37817,e.RGBA_ASTC_10x8_Format=37818,e.RGBA_ASTC_10x10_Format=37819,e.RGBA_ASTC_12x10_Format=37820,e.RGBA_ASTC_12x12_Format=37821,e.LoopOnce=2200,e.LoopRepeat=2201,e.LoopPingPong=2202,e.InterpolateDiscrete=2300,e.InterpolateLinear=2301,e.InterpolateSmooth=2302,e.ZeroCurvatureEnding=2400,e.ZeroSlopeEnding=2401,e.WrapAroundEnding=2402,e.TrianglesDrawMode=0,e.TriangleStripDrawMode=1,e.TriangleFanDrawMode=2,e.LinearEncoding=3e3,e.sRGBEncoding=3001,e.GammaEncoding=3007,e.RGBEEncoding=3002,e.LogLuvEncoding=3003,e.RGBM7Encoding=3004,e.RGBM16Encoding=3005,e.RGBDEncoding=3006,e.BasicDepthPacking=3200,e.RGBADepthPacking=3201,e.CubeGeometry=M,e.Face4=function(e,t,i,n,r,o,a){return console.warn("THREE.Face4 has been removed. A THREE.Face3 will be created instead."),new U(e,t,i,r,o,a)},e.LineStrip=0,e.LinePieces=1,e.MeshFaceMaterial=function(e){return console.warn("THREE.MeshFaceMaterial has been removed. Use an Array instead."),e},e.MultiMaterial=function(e){return void 0===e&&(e=[]),console.warn("THREE.MultiMaterial has been removed. Use an Array instead."),e.isMultiMaterial=!0,(e.materials=e).clone=function(){return e.slice()},e},e.PointCloud=function(e,t){return console.warn("THREE.PointCloud has been renamed to THREE.Points."),new At(e,t)},e.Particle=function(e){return console.warn("THREE.Particle has been renamed to THREE.Sprite."),new vt(e)},e.ParticleSystem=function(e,t){return console.warn("THREE.ParticleSystem has been renamed to THREE.Points."),new At(e,t)},e.PointCloudMaterial=function(e){return console.warn("THREE.PointCloudMaterial has been renamed to THREE.PointsMaterial."),new Mt(e)},e.ParticleBasicMaterial=function(e){return console.warn("THREE.ParticleBasicMaterial has been renamed to THREE.PointsMaterial."),new Mt(e)},e.ParticleSystemMaterial=function(e){return console.warn("THREE.ParticleSystemMaterial has been renamed to THREE.PointsMaterial."),new Mt(e)},e.Vertex=function(e,t,i){return console.warn("THREE.Vertex has been removed. Use THREE.Vector3 instead."),new _e(e,t,i)},e.DynamicBufferAttribute=function(e,t){return console.warn("THREE.DynamicBufferAttribute has been removed. Use new THREE.BufferAttribute().setDynamic( true ) instead."),new y(e,t).setDynamic(!0)},e.Int8Attribute=function(e,t){return console.warn("THREE.Int8Attribute has been removed. Use new THREE.Int8BufferAttribute() instead."),new s(e,t)},e.Uint8Attribute=function(e,t){return console.warn("THREE.Uint8Attribute has been removed. Use new THREE.Uint8BufferAttribute() instead."),new c(e,t)},e.Uint8ClampedAttribute=function(e,t){return console.warn("THREE.Uint8ClampedAttribute has been removed. Use new THREE.Uint8ClampedBufferAttribute() instead."),new h(e,t)},e.Int16Attribute=function(e,t){return console.warn("THREE.Int16Attribute has been removed. Use new THREE.Int16BufferAttribute() instead."),new f(e,t)},e.Uint16Attribute=function(e,t){return console.warn("THREE.Uint16Attribute has been removed. Use new THREE.Uint16BufferAttribute() instead."),new m(e,t)},e.Int32Attribute=function(e,t){return console.warn("THREE.Int32Attribute has been removed. Use new THREE.Int32BufferAttribute() instead."),new x(e,t)},e.Uint32Attribute=function(e,t){return console.warn("THREE.Uint32Attribute has been removed. Use new THREE.Uint32BufferAttribute() instead."),new b(e,t)},e.Float32Attribute=function(e,t){return console.warn("THREE.Float32Attribute has been removed. Use new THREE.Float32BufferAttribute() instead."),new q(e,t)},e.Float64Attribute=function(e,t){return console.warn("THREE.Float64Attribute has been removed. Use new THREE.Float64BufferAttribute() instead."),new w(e,t)},e.ClosedSplineCurve3=Ir,e.SplineCurve3=Ur,e.Spline=zr,e.AxisHelper=function(e){return console.warn("THREE.AxisHelper has been renamed to THREE.AxesHelper."),new Or(e)},e.BoundingBoxHelper=function(e,t){return console.warn("THREE.BoundingBoxHelper has been deprecated. Creating a THREE.BoxHelper instead."),new Pr(e,t)},e.EdgesHelper=function(e,t){return console.warn("THREE.EdgesHelper has been removed. Use THREE.EdgesGeometry instead."),new Et(new Ai(e.geometry),new _t({color:void 0!==t?t:16777215}))},e.WireframeHelper=function(e,t){return console.warn("THREE.WireframeHelper has been removed. Use THREE.WireframeGeometry instead."),new Et(new kt(e.geometry),new _t({color:void 0!==t?t:16777215}))},e.XHRLoader=function(e){return console.warn("THREE.XHRLoader has been renamed to THREE.FileLoader."),new Vi(e)},e.BinaryTextureLoader=function(e){return console.warn("THREE.BinaryTextureLoader has been renamed to THREE.DataTextureLoader."),new $i(e)},e.GeometryUtils={merge:function(e,t,i){if(console.warn("THREE.GeometryUtils: .merge() has been moved to Geometry. Use geometry.merge( geometry2, matrix, materialIndexOffset ) instead."),t.isMesh){t.matrixAutoUpdate&&t.updateMatrix();var n=t.matrix;t=t.geometry}e.merge(t,n,i)},center:function(e){return console.warn("THREE.GeometryUtils: .center() has been moved to Geometry. Use geometry.center() instead."),e.center()}},e.ImageUtils={crossOrigin:void 0,loadTexture:function(e,t,i,n){console.warn("THREE.ImageUtils.loadTexture has been deprecated. Use THREE.TextureLoader() instead.");var r=new Yi;return r.setCrossOrigin(this.crossOrigin),e=r.load(e,i,void 0,n),t&&(e.mapping=t),e},loadTextureCube:function(e,t,i,n){console.warn("THREE.ImageUtils.loadTextureCube has been deprecated. Use THREE.CubeTextureLoader() instead.");var r=new Xi;return r.setCrossOrigin(this.crossOrigin),e=r.load(e,i,void 0,n),t&&(e.mapping=t),e},loadCompressedTexture:function(){console.error("THREE.ImageUtils.loadCompressedTexture has been removed. Use THREE.DDSLoader instead.")},loadCompressedTextureCube:function(){console.error("THREE.ImageUtils.loadCompressedTextureCube has been removed. Use THREE.DDSLoader instead.")}},e.Projector=function(){console.error("THREE.Projector has been moved to /examples/js/renderers/Projector.js."),this.project
1Vector=function(e,t){console.warn("THREE.Projector: .projectVector() is now vector.project()."),e.project(t)},this.unprojectVector=function(e,t){console.warn("THREE.Projector: .unprojectVector() is now vector.unproject()."),e.unproject(t)},this.pickingRay=function(){console.error("THREE.Projector: .pickingRay() is now raycaster.setFromCamera().")}},e.CanvasRenderer=function(){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(){}},e.SceneUtils={createMultiMaterialObject:function(){console.error("THREE.SceneUtils has been moved to /examples/js/utils/SceneUtils.js")},detach:function(){console.error("THREE.SceneUtils has been moved to /examples/js/utils/SceneUtils.js")},attach:function(){console.error("THREE.SceneUtils has been moved to /examples/js/utils/SceneUtils.js")}},e.LensFlare=function(){console.error("THREE.LensFlare has been moved to /examples/js/objects/Lensflare.js")},Object.defineProperty(e,"__esModule",{value:!0})}),function(t,i){"use strict";"function"==typeof define&&define.amd?define("jquery-bridget/jquery-bridget",["jquery"],function(e){i(t,e)}):"object"==typeof module&&module.exports?module.exports=i(t,require("jquery")):t.jQueryBridget=i(t,t.jQuery)}(window,function(e,t){"use strict";function i(c,r,u){(u=u||t||e.jQuery)&&(r.prototype.option||(r.prototype.option=function(e){u.isPlainObject(e)&&(this.options=u.extend(!0,this.options,e))}),u.fn[c]=function(e){if("string"==typeof e){var t=h.call(arguments,1);return a=t,l="$()."+c+'("'+(o=e)+'")',(i=this).each(function(e,t){var i=u.data(t,c);if(i){var n=i[o];if(n&&"_"!=o.charAt(0)){var r=n.apply(i,a);s=void 0===s?r:s}else d(l+" is not a valid method")}else d(c+" not initialized. Cannot call methods, i.e. "+l)}),void 0!==s?s:i}var i,o,a,s,l,n;return n=e,this.each(function(e,t){var i=u.data(t,c);i?(i.option(n),i._init()):(i=new r(t,n),u.data(t,c,i))}),this},n(u))}function n(e){!e||e&&e.bridget||(e.bridget=i)}var h=Array.prototype.slice,r=e.console,d=void 0===r?function(){}:function(e){r.error(e)};return n(t||e.jQuery),i}),function(e,t){"use strict";"function"==typeof define&&define.amd?define("get-size/get-size",[],function(){return t()}):"object"==typeof module&&module.exports?module.exports=t():e.getSize=t()}(window,function(){"use strict";function v(e){var t=parseFloat(e);return-1==e.indexOf("%")&&!isNaN(t)&&t}function y(e){var t=getComputedStyle(e);return t||i("Style returned "+t+". Are you running this code in a hidden iframe on Firefox? See http://bit.ly/getsizebug1"),t}function x(e){if(function(){if(!T){T=!0;var e=document.createElement("div");e.style.width="200px",e.style.padding="1px 2px 3px 4px",e.style.borderStyle="solid",e.style.borderWidth="1px 2px 3px 4px",e.style.boxSizing="border-box";var t=document.body||document.documentElement;t.appendChild(e);var i=y(e);x.isBoxSizeOuter=b=200==v(i.width),t.removeChild(e)}}(),"string"==typeof e&&(e=document.querySelector(e)),e&&"object"==typeof e&&e.nodeType){var t=y(e);if("none"==t.display)return function(){for(var e={width:0,height:0,innerWidth:0,innerHeight:0,outerWidth:0,outerHeight:0},t=0;t<_;t++)e[w[t]]=0;return e}();var i={};i.width=e.offsetWidth,i.height=e.offsetHeight;for(var n=i.isBorderBox="border-box"==t.boxSizing,r=0;r<_;r++){var o=w[r],a=t[o],s=parseFloat(a);i[o]=isNaN(s)?0:s}var l=i.paddingLeft+i.paddingRight,c=i.paddingTop+i.paddingBottom,u=i.marginLeft+i.marginRight,h=i.marginTop+i.marginBottom,d=i.borderLeftWidth+i.borderRightWidth,p=i.borderTopWidth+i.borderBottomWidth,f=n&&b,m=v(t.width);!1!==m&&(i.width=m+(f?0:l+d));var g=v(t.height);return!1!==g&&(i.height=g+(f?0:c+p)),i.innerWidth=i.width-(l+d),i.innerHeight=i.height-(c+p),i.outerWidth=i.width+u,i.outerHeight=i.height+h,i}}var b,i="undefined"==typeof console?function(){}:function(e){console.error(e)},w=["paddingLeft","paddingRight","paddingTop","paddingBottom","marginLeft","marginRight","marginTop","marginBottom","borderLeftWidth","borderRightWidth","borderTopWidth","borderBottomWidth"],_=w.length,T=!1;return x}),function(e,t){"function"==typeof define&&define.amd?define("ev-emitter/ev-emitter",t):"object"==typeof module&&module.exports?module.exports=t():e.EvEmitter=t()}(this,function(){function e(){}var t=e.prototype;return t.on=function(e,t){if(e&&t){var i=this._events=this._events||{},n=i[e]=i[e]||[];return-1==n.indexOf(t)&&n.push(t),this}},t.once=function(e,t){if(e&&t){this.on(e,t);var i=this._onceEvents=this._onceEvents||{};return(i[e]=i[e]||{})[t]=!0,this}},t.off=function(e,t){var i=this._events&&this._events[e];if(i&&i.length){var n=i.indexOf(t);return-1!=n&&i.splice(n,1),this}},t.emitEvent=function(e,t){var i=this._events&&this._events[e];if(i&&i.length){var n=0,r=i[n];t=t||[];for(var o=this._onceEvents&&this._onceEvents[e];r;){var a=o&&o[r];a&&(this.off(e,r),delete o[r]),r.apply(this,t),r=i[n+=a?0:1]}return this}},e}),function(e,t){"use strict";"function"==typeof define&&define.amd?define("desandro-matches-selector/matches-selector",t):"object"==typeof module&&module.exports?module.exports=t():e.matchesSelector=t()}(window,function(){"use strict";var i=function(){var e=Element.prototype;if(e.matches)return"matches";if(e.matchesSelector)return"matchesSelector";for(var t=["webkit","moz","ms","o"],i=0;i<t.length;i++){var n=t[i]+"MatchesSelector";if(e[n])return n}}();return function(e,t){return e[i](t)}}),function(t,i){"function"==typeof define&&define.amd?define("fizzy-ui-utils/utils",["de
1sandro-matches-selector/matches-selector"],function(e){return i(t,e)}):"object"==typeof module&&module.exports?module.exports=i(t,require("desandro-matches-selector")):t.fizzyUIUtils=i(t,t.matchesSelector)}(window,function(c,o){var u={extend:function(e,t){for(var i in t)e[i]=t[i];return e},modulo:function(e,t){return(e%t+t)%t},makeArray:function(e){var t=[];if(Array.isArray(e))t=e;else if(e&&"number"==typeof e.length)for(var i=0;i<e.length;i++)t.push(e[i]);else t.push(e);return t},removeFrom:function(e,t){var i=e.indexOf(t);-1!=i&&e.splice(i,1)},getParent:function(e,t){for(;e!=document.body;)if(e=e.parentNode,o(e,t))return e},getQueryElement:function(e){return"string"==typeof e?document.querySelector(e):e},handleEvent:function(e){var t="on"+e.type;this[t]&&this[t](e)},filterFindElements:function(e,n){e=u.makeArray(e);var r=[];return e.forEach(function(e){if(e instanceof HTMLElement){if(!n)return void r.push(e);o(e,n)&&r.push(e);for(var t=e.querySelectorAll(n),i=0;i<t.length;i++)r.push(t[i])}}),r},debounceMethod:function(e,t,n){var r=e.prototype[t],o=t+"Timeout";e.prototype[t]=function(){var e=this[o];e&&clearTimeout(e);var t=arguments,i=this;this[o]=setTimeout(function(){r.apply(i,t),delete i[o]},n||100)}},docReady:function(e){"complete"==document.readyState?e():document.addEventListener("DOMContentLoaded",e)},toDashed:function(e){return e.replace(/(.)([A-Z])/g,function(e,t,i){return t+"-"+i}).toLowerCase()}},h=c.console;return u.htmlInit=function(s,l){u.docReady(function(){var e=u.toDashed(l),r="data-"+e,t=document.querySelectorAll("["+r+"]"),i=document.querySelectorAll(".js-"+e),n=u.makeArray(t).concat(u.makeArray(i)),o=r+"-options",a=c.jQuery;n.forEach(function(t){var e,i=t.getAttribute(r)||t.getAttribute(o);try{e=i&&JSON.parse(i)}catch(e){return void(h&&h.error("Error parsing "+r+" on "+t.className+": "+e))}var n=new s(t,e);a&&a.data(t,l,n)})})},u}),function(e,t){"function"==typeof define&&define.amd?define("outlayer/item",["ev-emitter/ev-emitter","get-size/get-size"],t):"object"==typeof module&&module.exports?module.exports=t(require("ev-emitter"),require("get-size")):(e.Outlayer={},e.Outlayer.Item=t(e.EvEmitter,e.getSize))}(window,function(e,t){"use strict";function i(e,t){e&&(this.element=e,this.layout=t,this.position={x:0,y:0},this._create())}var n=document.documentElement.style,r="string"==typeof n.transition?"transition":"WebkitTransition",o="string"==typeof n.transform?"transform":"WebkitTransform",a={WebkitTransition:"webkitTransitionEnd",transition:"transitionend"}[r],s={transform:o,transition:r,transitionDuration:r+"Duration",transitionProperty:r+"Property",transitionDelay:r+"Delay"},l=i.prototype=Object.create(e.prototype);l.constructor=i,l._create=function(){this._transn={ingProperties:{},clean:{},onEnd:{}},this.css({position:"absolute"})},l.handleEvent=function(e){var t="on"+e.type;this[t]&&this[t](e)},l.getSize=function(){this.size=t(this.element)},l.css=function(e){var t=this.element.style;for(var i in e){t[s[i]||i]=e[i]}},l.getPosition=function(){var e=getComputedStyle(this.element),t=this.layout._getOption("originLeft"),i=this.layout._getOption("originTop"),n=e[t?"left":"right"],r=e[i?"top":"bottom"],o=this.layout.size,a=-1!=n.indexOf("%")?parseFloat(n)/100*o.width:parseInt(n,10),s=-1!=r.indexOf("%")?parseFloat(r)/100*o.height:parseInt(r,10);a=isNaN(a)?0:a,s=isNaN(s)?0:s,a-=t?o.paddingLeft:o.paddingRight,s-=i?o.paddingTop:o.paddingBottom,this.position.x=a,this.position.y=s},l.layoutPosition=function(){var e=this.layout.size,t={},i=this.layout._getOption("originLeft"),n=this.layout._getOption("originTop"),r=i?"paddingLeft":"paddingRight",o=i?"left":"right",a=i?"right":"left",s=this.position.x+e[r];t[o]=this.getXValue(s),t[a]="";var l=n?"paddingTop":"paddingBottom",c=n?"top":"bottom",u=n?"bottom":"top",h=this.position.y+e[l];t[c]=this.getYValue(h),t[u]="",this.css(t),this.emitEvent("layout",[this])},l.getXValue=function(e){var t=this.layout._getOption("horizontal");return this.layout.options.percentPosition&&!t?e/this.layout.size.width*100+"%":e+"px"},l.getYValue=function(e){var t=this.layout._getOption("horizontal");return this.layout.options.percentPosition&&t?e/this.layout.size.height*100+"%":e+"px"},l._transitionTo=function(e,t){this.getPosition();var i=this.position.x,n=this.position.y,r=parseInt(e,10),o=parseInt(t,10),a=r===this.position.x&&o===this.position.y;if(this.setPosition(e,t),!a||this.isTransitioning){var s=e-i,l=t-n,c={};c.transform=this.getTranslate(s,l),this.transition({to:c,onTransitionEnd:{transform:this.layoutPosition},isCleaning:!0})}else this.layoutPosition()},l.getTranslate=function(e,t){return"translate3d("+(e=this.layout._getOption("originLeft")?e:-e)+"px, "+(t=this.layout._getOption("originTop")?t:-t)+"px, 0)"},l.goTo=function(e,t){this.setPosition(e,t),this.layoutPosition()},l.moveTo=l._transitionTo,l.setPosition=function(e,t){this.position.x=parseInt(e,10),this.position.y=parseInt(t,10)},l._nonTransition=function(e){for(var t in this.css(e.to),e.isCleaning&&this._removeStyles(e.to),e.onTransitionEnd)e.onTransitionEnd[t].call(this)},l.transition=function(e){if(parseFloat(this.layout.options.transitionDuration)){var t=this._transn;for(var i in e.onTransitionEnd)t.onEnd[i]=e.onTransitionEnd[i];for(i in e.to)t.ingProperties[i]=!0,e.isCleaning&&(t.clean[i]=!0);if(e.from){this.css(e.from);this.element.offsetHeight;null}this.enableTransition(e.to),this.css(e.to),this.isTransitioning=!0}else this._nonTransition(e)};var c="opacity,"+o.replace(/([A-Z])/g,function(e){return"-"+e.toLowerCase()});l.enableTransition=function(){if(!this.isTransitioning){var e=this.layout.options.transitionDuration;e="number"==typeof e?e+"ms":e,this.css({transitionProperty:c,transitionDuration:e,transitionDelay:this.staggerDelay||0}),this.element.addEventListener(a,this,!1)}},l.onwebkitTransitionEnd=function(e){this.ontransitionend(e)},l.onotransitionend=function(e){this.ontransitionend(e)};var u={"-webkit-transform":"transform"};l.ontransitionend=function(e){if(e.target===this.element){var t=this._transn,i=u[e.propertyName]||e.propertyName;if(delete t.ingProperties[i],function(e){for(var t in e)return!1;return!0}(t.ingProperties)&&this.disableTransition(),i in t.clean&&(this.element.style[e.propertyName]="",delete t.clean[i]),i in t.onEnd)t.onEnd[i].call(this),delete t.onEnd[i];this.emitEvent("transitionEnd",[this])}},l.disableTransition=function(){this.removeTransitionStyles(),this.element.removeEventListener(a,this,!1),this.isTransitioning=!1},l._removeStyles=function(e){var t={};for(var i in e)t[i]="";this.css(t)};var h={transitionProperty:"",transitionDuration:"",transitionDelay:""};return l.removeTransitionStyles=function(){this.css(h)},l.stagger=function(e){e=isNaN(e)?0:e,this.staggerDelay=e+"ms"},l.removeElem=function(){this.element.parentNode.removeChild(this.element),this.css({display:""}),this.emitEvent("remove",[this])},l.remove=function(){return r&&parseFloat(this.layout.options.transitionDuration)?(this.once("transitionEnd",function(){this.removeElem()}),void this.hide()):void this.removeElem()},l.reveal=function(){delete this.isHidden,this.css({display:""});var e=this.layout.options,t={};t[this.getHideRevealTransitionEndProperty("visibleStyle")]=this.onRevealTransitionEnd,this.transition({from:e.hiddenStyle,to:e.visibleStyle,isCleaning:!0,onTransitionEnd:t})},l.onRevealTransitionEnd=function(){this.isHidden||this.emitEvent("reveal")},l.getHideRevealTransitionEndProperty=function(e){var t=this.layout.options[e];if(t.opacity)return"opacity";for(var i in t)return i},l.hide=function(){this.isHidden=!0,this.css({display:""});var e=this.layout.options,t={};t[this.getHideRevealTransitionEndProperty("hiddenStyle")]=this.onHideTransitionEnd,this.transition({from:e.visibleStyle,to:e.hiddenStyle,isCleaning:!0,onTransitionEnd:t})},l.onHideTransitionEnd=function(){this.isHidden&&(this.css({display:"none"}),this.emitEvent("hide"))},l.destroy=function(){this.css({position:"",left:"",right:"",top:"",bottom:"",transition:"",transform:""})},i}),function(r,o){"use strict";"function"==typeof define&&define.amd?define("outlayer/outlayer",["ev-emitter/ev-emitter","get-size/get-size","fizzy-ui-utils/utils","./item"],function(e,t,i,n){return o(r,e,t,i,n)}):"object"==typeof module&&module.exports?module.exports=o(r,require("ev-emitter"),require("get-size"),require("fizzy-ui-utils"),require("./item")):r.Outlayer=o(r,r.EvEmitter,r.getSize,r.fizzyUIUtils,r.Outlayer.Item)}(window,function(e,t,r,o,n){"use strict";function a(e,t){var i=o.getQueryElement(e);
vendor: 4,143 bytes, line 1
1if(i){this.element=i,c&&(this.$element=c(this.element)),this.options=o.extend({},this.constructor.defaults),this.option(t);var n=++u;this.element.outlayerGUID=n,(h[n]=this)._create(),this._getOption("initLayout")&&this.layout()}else l&&l.error("Bad element for "+this.constructor.namespace+": "+(i||e))}function s(e){function t(){e.apply(this,arguments)}return(t.prototype=Object.create(e.prototype)).constructor=t}var l=e.console,c=e.jQuery,i=function(){},u=0,h={};a.namespace="outlayer",a.Item=n,a.defaults={containerStyle:{position:"relative"},initLayout:!0,originLeft:!0,originTop:!0,resize:!0,resizeContainer:!0,transitionDuration:"0.4s",hiddenStyle:{opacity:0,transform:"scale(0.001)"},visibleStyle:{opacity:1,transform:"scale(1)"}};var d=a.prototype;o.extend(d,t.prototype),d.option=function(e){o.extend(this.options,e)},d._getOption=function(e){var t=this.constructor.compatOptions[e];return t&&void 0!==this.options[t]?this.options[t]:this.options[e]},a.compatOptions={initLayout:"isInitLayout",horizontal:"isHorizontal",layoutInstant:"isLayoutInstant",originLeft:"isOriginLeft",originTop:"isOriginTop",resize:"isResizeBound",resizeContainer:"isResizingContainer"},d._create=function(){this.reloadItems(),this.stamps=[],this.stamp(this.options.stamp),o.extend(this.element.style,this.options.containerStyle),this._getOption("resize")&&this.bindResize()},d.reloadItems=function(){this.items=this._itemize(this.element.children)},d._itemize=function(e){for(var t=this._filterFindItemElements(e),i=this.constructor.Item,n=[],r=0;r<t.length;r++){var o=new i(t[r],this);n.push(o)}return n},d._filterFindItemElements=function(e){return o.filterFindElements(e,this.options.itemSelector)},d.getItemElements=function(){return this.items.map(function(e){return e.element})},d.layout=function(){this._resetLayout(),this._manageStamps();var e=this._getOption("layoutInstant"),t=void 0!==e?e:!this._isLayoutInited;this.layoutItems(this.items,t),this._isLayoutInited=!0},d._init=d.layout,d._resetLayout=function(){this.getSize()},d.getSize=function(){this.size=r(this.element)},d._getMeasurement=function(e,t){var i,n=this.options[e];n?("string"==typeof n?i=this.element.querySelector(n):n instanceof HTMLElement&&(i=n),this[e]=i?r(i)[t]:n):this[e]=0},d.layoutItems=function(e,t){e=this._getItemsForLayout(e),this._layoutItems(e,t),this._postLayout()},d._getItemsForLayout=function(e){return e.filter(function(e){return!e.isIgnored})},d._layoutItems=function(e,i){if(this._emitCompleteOnItems("layout",e),e&&e.length){var n=[];e.forEach(function(e){var t=this._getItemLayoutPosition(e);t.item=e,t.isInstant=i||e.isLayoutInstant,n.push(t)},this),this._processLayoutQueue(n)}},d._getItemLayoutPosition=function(){return{x:0,y:0}},d._processLayoutQueue=function(e){this.updateStagger(),e.forEach(function(e,t){this._positionItem(e.item,e.x,e.y,e.isInstant,t)},this)},d.updateStagger=function(){var e=this.options.stagger;return null==e?void(this.stagger=0):(this.stagger=function(e){if("number"==typeof e)return e;var t=e.match(/(^\d*\.?\d*)(\w*)/),i=t&&t[1],n=t&&t[2];return i.length?(i=parseFloat(i))*(p[n]||1):0}(e),this.stagger)},d._positionItem=function(e,t,i,n,r){n?e.goTo(t,i):(e.stagger(r*this.stagger),e.moveTo(t,i))},d._postLayout=function(){this.resizeContainer()},d.resizeContainer=function(){if(this._getOption("resizeContainer")){var e=this._getContainerSize();e&&(this._setContainerMeasure(e.width,!0),this._setContainerMeasure(e.height,!1))}},d._getContainerSize=i,d._setContainerMeasure=function(e,t){if(void 0!==e){var i=this.size;i.isBorderBox&&(e+=t?i.paddingLeft+i.paddingRight+i.borderLeftWidth+i.borderRightWidth:i.paddingBottom+i.paddingTop+i.borderTopWidth+i.borderBottomWidth),e=Math.max(e,0),this.element.style[t?"width":"height"]=e+"px"}},d._emitCompleteOnItems=function(t,e){function i(){r.dispatchEvent(t+"Complete",null,[e])}function n(){++a==o&&i()}var r=this,o=e.length;if(e&&o){var a=0;e.forEach(function(e){e.once(t,n)})}else i()},d.dispatchEvent=function(e,t,i){var n=t?[t].concat(i):i;if(this.emitEvent(e,n),c)if(this.$element=this.$element||c(this.element),t){var r=c.Event(t);r.type=e,this.$element.trigger(r,i)}
vendor: 9,569 bytes, line 1
1else this.$element.trigger(e,i)},d.ignore=function(e){var t=this.getItem(e);t&&(t.isIgnored=!0)},d.unignore=function(e){var t=this.getItem(e);t&&delete t.isIgnored},d.stamp=function(e){(e=this._find(e))&&(this.stamps=this.stamps.concat(e),e.forEach(this.ignore,this))},d.unstamp=function(e){(e=this._find(e))&&e.forEach(function(e){o.removeFrom(this.stamps,e),this.unignore(e)},this)},d._find=function(e){return e?("string"==typeof e&&(e=this.element.querySelectorAll(e)),e=o.makeArray(e)):void 0},d._manageStamps=function(){this.stamps&&this.stamps.length&&(this._getBoundingRect(),this.stamps.forEach(this._manageStamp,this))},d._getBoundingRect=function(){var e=this.element.getBoundingClientRect(),t=this.size;this._boundingRect={left:e.left+t.paddingLeft+t.borderLeftWidth,top:e.top+t.paddingTop+t.borderTopWidth,right:e.right-(t.paddingRight+t.borderRightWidth),bottom:e.bottom-(t.paddingBottom+t.borderBottomWidth)}},d._manageStamp=i,d._getElementOffset=function(e){var t=e.getBoundingClientRect(),i=this._boundingRect,n=r(e);return{left:t.left-i.left-n.marginLeft,top:t.top-i.top-n.marginTop,right:i.right-t.right-n.marginRight,bottom:i.bottom-t.bottom-n.marginBottom}},d.handleEvent=o.handleEvent,d.bindResize=function(){e.addEventListener("resize",this),this.isResizeBound=!0},d.unbindResize=function(){e.removeEventListener("resize",this),this.isResizeBound=!1},d.onresize=function(){this.resize()},o.debounceMethod(a,"onresize",100),d.resize=function(){this.isResizeBound&&this.needsResizeLayout()&&this.layout()},d.needsResizeLayout=function(){var e=r(this.element);return this.size&&e&&e.innerWidth!==this.size.innerWidth},d.addItems=function(e){var t=this._itemize(e);return t.length&&(this.items=this.items.concat(t)),t},d.appended=function(e){var t=this.addItems(e);t.length&&(this.layoutItems(t,!0),this.reveal(t))},d.prepended=function(e){var t=this._itemize(e);if(t.length){var i=this.items.slice(0);this.items=t.concat(i),this._resetLayout(),this._manageStamps(),this.layoutItems(t,!0),this.reveal(t),this.layoutItems(i)}},d.reveal=function(e){if(this._emitCompleteOnItems("reveal",e),e&&e.length){var i=this.updateStagger();e.forEach(function(e,t){e.stagger(t*i),e.reveal()})}},d.hide=function(e){if(this._emitCompleteOnItems("hide",e),e&&e.length){var i=this.updateStagger();e.forEach(function(e,t){e.stagger(t*i),e.hide()})}},d.revealItemElements=function(e){var t=this.getItems(e);this.reveal(t)},d.hideItemElements=function(e){var t=this.getItems(e);this.hide(t)},d.getItem=function(e){for(var t=0;t<this.items.length;t++){var i=this.items[t];if(i.element==e)return i}},d.getItems=function(e){e=o.makeArray(e);var i=[];return e.forEach(function(e){var t=this.getItem(e);t&&i.push(t)},this),i},d.remove=function(e){var t=this.getItems(e);this._emitCompleteOnItems("remove",t),t&&t.length&&t.forEach(function(e){e.remove(),o.removeFrom(this.items,e)},this)},d.destroy=function(){var e=this.element.style;e.height="",e.position="",e.width="",this.items.forEach(function(e){e.destroy()}),this.unbindResize();var t=this.element.outlayerGUID;delete h[t],delete this.element.outlayerGUID,c&&c.removeData(this.element,this.constructor.namespace)},a.data=function(e){var t=(e=o.getQueryElement(e))&&e.outlayerGUID;return t&&h[t]},a.create=function(e,t){var i=s(a);return i.defaults=o.extend({},a.defaults),o.extend(i.defaults,t),i.compatOptions=o.extend({},a.compatOptions),i.namespace=e,i.data=a.data,i.Item=s(n),o.htmlInit(i,e),c&&c.bridget&&c.bridget(e,i),i};var p={ms:1,s:1e3};return a.Item=n,a}),function(e,t){"function"==typeof define&&define.amd?define("packery/js/rect",t):"object"==typeof module&&module.exports?module.exports=t():(e.Packery=e.Packery||{},e.Packery.Rect=t())}(window,function(){"use strict";function s(e){for(var t in s.defaults)this[t]=s.defaults[t];for(t in e)this[t]=e[t]}s.defaults={x:0,y:0,width:0,height:0};var e=s.prototype;return e.contains=function(e){var t=e.width||0,i=e.height||0;return this.x<=e.x&&this.y<=e.y&&this.x+this.width>=e.x+t&&this.y+this.height>=e.y+i},e.overlaps=function(e){var t=this.x+this.width,i=this.y+this.height,n=e.x+e.width,r=e.y+e.height;return this.x<n&&t>e.x&&this.y<r&&i>e.y},e.getMaximalFreeRects=function(e){if(!this.overlaps(e))return!1;var t,i=[],n=this.x+this.width,r=this.y+this.height,o=e.x+e.width,a=e.y+e.height;return this.y<e.y&&(t=new s({x:this.x,y:this.y,width:this.width,height:e.y-this.y}),i.push(t)),o<n&&(t=new s({x:o,y:this.y,width:n-o,height:this.height}),i.push(t)),a<r&&(t=new s({x:this.x,y:a,width:this.width,height:r-a}),i.push(t)),this.x<e.x&&(t=new s({x:this.x,y:this.y,width:e.x-this.x,height:this.height}),i.push(t)),i},e.canFit=function(e){return this.width>=e.width&&this.height>=e.height},s}),function(e,t){if("function"==typeof define&&define.amd)define("packery/js/packer",["./rect"],t);else if("object"==typeof module&&module.exports)module.exports=t(require("./rect"));else{var i=e.Packery=e.Packery||{};i.Packer=t(i.Rect)}}(window,function(t){"use strict";function e(e,t,i){this.width=e||0,this.height=t||0,this.sortDirection=i||"downwardLeftToRight",this.reset()}var i=e.prototype;i.reset=function(){this.spaces=[];var e=new t({x:0,y:0,width:this.width,height:this.height});this.spaces.push(e),this.sorter=n[this.sortDirection]||n.downwardLeftToRight},i.pack=function(e){for(var t=0;t<this.spaces.length;t++){var i=this.spaces[t];if(i.canFit(e)){this.placeInSpace(e,i);break}}},i.columnPack=function(e){for(var t=0;t<this.spaces.length;t++){var i=this.spaces[t];if(i.x<=e.x&&i.x+i.width>=e.x+e.width&&i.height>=e.height-.01){e.y=i.y,this.placed(e);break}}},i.rowPack=function(e){for(var t=0;t<this.spaces.length;t++){var i=this.spaces[t];if(i.y<=e.y&&i.y+i.height>=e.y+e.height&&i.width>=e.width-.01){e.x=i.x,this.placed(e);break}}},i.placeInSpace=function(e,t){e.x=t.x,e.y=t.y,this.placed(e)},i.placed=function(e){for(var t=[],i=0;i<this.spaces.length;i++){var n=this.spaces[i],r=n.getMaximalFreeRects(e);r?t.push.apply(t,r):t.push(n)}this.spaces=t,this.mergeSortSpaces()},i.mergeSortSpaces=function(){e.mergeRects(this.spaces),this.spaces.sort(this.sorter)},i.addSpace=function(e){this.spaces.push(e),this.mergeSortSpaces()},e.mergeRects=function(e){var t=0,i=e[t];e:for(;i;){for(var n=0,r=e[t+n];r;){if(r==i)n++;else{if(r.contains(i)){e.splice(t,1),i=e[t];continue e}i.contains(r)?e.splice(t+n,1):n++}r=e[t+n]}i=e[++t]}return e};var n={downwardLeftToRight:function(e,t){return e.y-t.y||e.x-t.x},rightwardTopToBottom:function(e,t){return e.x-t.x||e.y-t.y}};return e}),function(e,t){"function"==typeof define&&define.amd?define("packery/js/item",["outlayer/outlayer","./rect"],t):"object"==typeof module&&module.exports?module.exports=t(require("outlayer"),require("./rect")):e.Packery.Item=t(e.Outlayer,e.Packery.Rect)}(window,function(e,t){"use strict";var i="string"==typeof document.documentElement.style.transform?"transform":"WebkitTransform",n=function(){e.Item.apply(this,arguments)},r=n.prototype=Object.create(e.Item.prototype),o=r._create;r._create=function(){o.call(this),this.rect=new t};var a=r.moveTo;return r.moveTo=function(e,t){var i=Math.abs(this.position.x-e),n=Math.abs(this.position.y-t);return this.layout.dragItemCount&&!this.isPlacing&&!this.isTransitioning&&i<1&&n<1?void this.goTo(e,t):void a.apply(this,arguments)},r.enablePlacing=function(){this.removeTransitionStyles(),this.isTransitioning&&i&&(this.element.style[i]="none"),this.isTransitioning=!1,this.getSize(),this.layout._setRectSize(this.element,this.rect),this.isPlacing=!0},r.disablePlacing=function(){this.isPlacing=!1},r.removeElem=function(){this.element.parentNode.removeChild(this.element),this.layout.packer.addSpace(this.rect),this.emitEvent("remove",[this])},r.showDropPlaceholder=function(){var e=this.dropPlaceholder;e||((e=this.dropPlaceholder=document.createElement("div")).className="packery-drop-placeholder",e.style.position="absolute"),e.style.width=this.size.width+"px",e.style.height=this.size.height+"px",this.positionDropPlaceholder(),this.layout.element.appendChild(e)},r.positionDropPlaceholder=function(){this.dropPlaceholder.style[i]="translate("+this.rect.x+"px, "+this.rect.y+"px)"},r.hideDropPlaceholder=function(){var e=this.dropPlaceholder.parentNode;e&&e.removeChild(this.dropPlaceholder)},n}),function(e,t){"function"==typeof define&&define.amd?define(["get-size/get-size","outlayer/outlayer","packery/js/rect","packery/js/packer","packery/js/item"],t):"object"==typeof module&&module.exports?module.exports=t(require("get-size"),require("outlayer"),require("./rect"),require("./packer"),require("./item")):e.Packery=t(e.getSize,e.Outlayer,e.Packery.Rect,e.Packery.Packer,e.Packery.Item)}(window,function(u,e,m,t,i){"use strict";function n(e,t){return e.position.y-t.position.y||e.position.x-t.position.x}function r(e,t){return e.position.x-t.position.x||e.position.y-t.position.y}m.prototype.canFit=function(e){return this.width>=e.width-1&&this.height>=e.height-1};var o=e.create("packery");o.Item=i;var a=o.prototype;a._create=function(){e.prototype._create.call(this),this.packer=new t,this.shiftPacker=new t,this.isEnabled=!0,this.dragItemCount=0;var i=this;this.handleDraggabilly={dragStart:function(){i.itemDragStart(this.element)},dragMove:function(){i.itemDragMove(this.element,this.position.x,this.position.y)},dragEnd:function(){i.itemDragEnd(this.element)}},this.handleUIDraggable={start:function(e,t){t&&i.itemDragStart(e.currentTarget)},drag:function(e,t){t&&i.itemDragMove(e.currentTarget,t.position.left,t.position.top)},stop:function(e,t){t&&i.itemDragEnd(e.currentTarget)}}},a._resetLayout=function(){var e,t,i;
1this.getSize(),this._getMeasurements(),this._getOption("horizontal")?(e=1/0,t=this.size.innerHeight+this.gutter,i="rightwardTopToBottom"):(e=this.size.innerWidth+this.gutter,t=1/0,i="downwardLeftToRight"),this.packer.width=this.shiftPacker.width=e,this.packer.height=this.shiftPacker.height=t,this.packer.sortDirection=this.shiftPacker.sortDirection=i,this.packer.reset(),this.maxY=0,this.maxX=0},a._getMeasurements=function(){this._getMeasurement("columnWidth","width"),this._getMeasurement("rowHeight","height"),this._getMeasurement("gutter","width")},a._getItemLayoutPosition=function(e){if(this._setRectSize(e.element,e.rect),this.isShifting||0<this.dragItemCount){var t=this._getPackMethod();this.packer[t](e.rect)}else this.packer.pack(e.rect);return this._setMaxXY(e.rect),e.rect},a.shiftLayout=function(){this.isShifting=!0,this.layout(),delete this.isShifting},a._getPackMethod=function(){return this._getOption("horizontal")?"rowPack":"columnPack"},a._setMaxXY=function(e){this.maxX=Math.max(e.x+e.width,this.maxX),this.maxY=Math.max(e.y+e.height,this.maxY)},a._setRectSize=function(e,t){var i=u(e),n=i.outerWidth,r=i.outerHeight;(n||r)&&(n=this._applyGridGutter(n,this.columnWidth),r=this._applyGridGutter(r,this.rowHeight)),t.width=Math.min(n,this.packer.width),t.height=Math.min(r,this.packer.height)},a._applyGridGutter=function(e,t){if(!t)return e+this.gutter;var i=e%(t+=this.gutter);return Math[i&&i<1?"round":"ceil"](e/t)*t},a._getContainerSize=function(){return this._getOption("horizontal")?{width:this.maxX-this.gutter}:{height:this.maxY-this.gutter}},a._manageStamp=function(e){var t,i=this.getItem(e);if(i&&i.isPlacing)t=i.rect;else{var n=this._getElementOffset(e);
1t=new m({x:this._getOption("originLeft")?n.left:n.right,y:this._getOption("originTop")?n.top:n.bottom})}this._setRectSize(e,t),this.packer.placed(t),this._setMaxXY(t)},a.sortItemsByPosition=function(){var e=this._getOption("horizontal")?r:n;this.items.sort(e)},a.fit=function(e,t,i){var n=this.getItem(e);n&&(this.stamp(n.element),n.enablePlacing(),this.updateShiftTargets(n),t=void 0===t?n.rect.x:t,i=void 0===i?n.rect.y:i,this.shift(n,t,i),this._bindFitEvents(n),n.moveTo(n.rect.x,n.rect.y),this.shiftLayout(),this.unstamp(n.element),this.sortItemsByPosition(),n.disablePlacing())},a._bindFitEvents=function(e){function t(){2==++n&&i.dispatchEvent("fitComplete",null,[e])}var i=this,n=0;e.once("layout",t),this.once("layoutComplete",t)},a.resize=function(){this.isResizeBound&&this.needsResizeLayout()&&(this.options.shiftPercentResize?this.resizeShiftPercentLayout():this.layout())},a.needsResizeLayout=function(){var e=u(this.element),t=this._getOption("horizontal")?"innerHeight":"innerWidth";return e[t]!=this.size[t]},a.resizeShiftPercentLayout=function(){var e=this._getItemsForLayout(this.items),t=this._getOption("horizontal"),i=t?"y":"x",n=t?"height":"width",r=t?"rowHeight":"columnWidth",o=t?"innerHeight":"innerWidth",a=this[r];if(a=a&&a+this.gutter){this._getMeasurements();var s=this[r]+this.gutter;e.forEach(function(e){var t=Math.round(e.rect[i]/a);e.rect[i]=t*s})}else{var l=u(this.element)[o]+this.gutter,c=this.packer[n];e.forEach(function(e){e.rect[i]=e.rect[i]/c*l})}this.shiftLayout()},a.itemDragStart=function(e){if(this.isEnabled){this.stamp(e);var t=this.getItem(e);t&&(t.enablePlacing(),t.showDropPlaceholder(),this.dragItemCount++,this.updateShiftTargets(t))}},a.updateShiftTargets=function(e){this.shiftPacker.reset(),this._getBoundingRect();var r=this._getOption("originLeft"),o=this._getOption("originTop");this.stamps.forEach(function(e){var t=this.getItem(e);if(!t||!t.isPlacing){var i=this._getElementOffset(e),n=new m({x:r?i.left:i.right,y:o?i.top:i.bottom});this._setRectSize(e,n),this.shiftPacker.placed(n)}},this);var l=this._getOption("horizontal"),t=l?"rowHeight":"columnWidth",c=l?"height":"width";this.shiftTargetKeys=[],this.shiftTargets=[];var u,h=this[t];if(h=h&&h+this.gutter){var i=Math.ceil(e.rect[c]/h),n=Math.floor((this.shiftPacker[c]+this.gutter)/h);u=(n-i)*h;for(var a=0;a<n;a++){var s=l?0:a*h,d=l?a*h:0;this._addShiftTarget(s,d,u)}}else u=this.shiftPacker[c]+this.gutter-e.rect[c],this._addShiftTarget(0,0,u);var p=this._getItemsForLayout(this.items),f=this._getPackMethod();p.forEach(function(e){var t=e.rect;this._setRectSize(e.element,t),this.shiftPacker[f](t),this._addShiftTarget(t.x,t.y,u);var i=l?t.x+t.width:t.x,n=l?t.y:t.y+t.height;if(this._addShiftTarget(i,n,u),h)for(var r=Math.round(t[c]/h),o=1;o<r;o++){var a=l?i:t.x+h*o,s=l?t.y+h*o:n;this._addShiftTarget(a,s,u)}},this)},a._addShiftTarget=function(e,t,i){var n=this._getOption("horizontal")?t:e;if(!(0!==n&&i<n)){var r=e+","+t;-1!=this.shiftTargetKeys.indexOf(r)||(this.shiftTargetKeys.push(r),this.shiftTargets.push({x:e,y:t}))}},a.shift=function(e,t,i){var a,s=1/0,l={x:t,y:i};this.shiftTargets.forEach(function(e){var t,i,n,r,o=(n=(i=l).x-(t=e).x,r=i.y-t.y,Math.sqrt(n*n+r*r));o<s&&(a=e,s=o)}),e.rect.x=a.x,e.rect.y=a.y};a.itemDragMove=function(e,t,i){function n(){o.shift(r,t,i),r.positionDropPlaceholder(),o.layout()}var r=this.isEnabled&&this.getItem(e);if(r){t-=this.size.paddingLeft,i-=this.size.paddingTop;var o=this,a=new Date;this._itemDragTime&&a-this._itemDragTime<120?(clearTimeout(this.dragTimeout),this.dragTimeout=setTimeout(n,120)):(n(),this._itemDragTime=a)}},a.itemDragEnd=function(e){function t(){2==++n&&(i.element.classList.remove("is-positioning-post-drag"),i.hideDropPlaceholder(),r.dispatchEvent("dragItemPositioned",null,[i]))}var i=this.isEnabled&&this.getItem(e);if(i){clearTimeout(this.dragTimeout),i.element.classList.add("is-positioning-post-drag");var n=0,r=this;i.once("layout",t),this.once("layoutComplete",t),i.moveTo(i.rect.x,i.rect.y),this.layout(),this.dragItemCount=Math.max(0,this.dragItemCount-1),this.sortItemsByPosition(),i.disablePlacing(),this.unstamp(i.element)}},a.bindDraggabillyEvents=function(e){this._bindDraggabillyEvents(e,"on")},a.unbindDraggabillyEvents=function(e){this._bindDraggabillyEvents(e,"off")},a._bindDraggabillyEvents=function(e,t){var i=this.handleDraggabilly;e[t]("dragStart",i.dragStart),e[t]("dragMove",i.dragMove),e[t]("dragEnd",i.dragEnd)},a.bindUIDraggableEvents=function(e){this._bindUIDraggableEvents(e,"on")},a.unbindUIDraggableEvents=function(e){this._bindUIDraggableEvents(e,"off")},a._bindUIDraggableEvents=function(e,t){var i=this.handleUIDraggable;e[t]("dragstart",i.start)[t]("drag",i.drag)[t]("dragstop",i.stop)};var s=a.destroy;return a.destroy=function(){s.apply(this,arguments),this.isEnabled=!1},o.Rect=m,o.Packer=t,o}),function(){var L,R;L=this.jQuery||window.jQuery,R=L(window),L.fn.stick_in_parent=function(e){var w,_,t,i,T,n,E,S,M,A,C;for(null==e&&(e={}),C=e.sticky_class,T=e.inner_scrolling,A=e.recalc_every,M=e.parent,S=e.offset_top,E=e.spacer,_=e.bottoming,null==S&&(S=0),null==M&&(M=void 0),null==T&&(T=!0),null==C&&(C="is_stuck"),w=L(document),null==_&&(_=!0),t=function(r,o,a,s,l,c,u,h){var d,e,p,f,m,g,v,y,t,x,b,n;if(!r.data("sticky_kit")){if(r.data("sticky_kit",!0),m=w.height(),v=r.parent(),null!=M&&(v=v.closest(M)),!v.length)throw"failed to find stick parent";
1if(d=p=!1,(b=null!=E?E&&r.closest(E):L("<div />"))&&b.css("position",r.css("position")),(y=function(){var e,t,i;if(!h&&(m=w.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(b),b.detach()),r.css({position:"",top:"",width:"",bottom:""}).removeClass(C),i=!0),l=r.offset().top-(parseInt(r.css("margin-top"),10)||0)-S,c=r.outerHeight(!0),u=r.css("float"),b&&b.css({width:r.outerWidth(!0),height:c,display:r.css("display"),"vertical-align":r.css("vertical-align"),float:u}),i))return n()})(),c!==s)return f=void 0,g=S,x=A,n=function(){var e,t,i,n;if(!h&&(i=!1,null!=x&&(--x<=0&&(x=A,y(),i=!0)),i||w.height()===m||y(),i=R.scrollTop(),null!=f&&(t=i-f),f=i,p?(_&&(n=s+a<i+c+g,d&&!n&&(d=!1,r.css({position:"fixed",bottom:"",top:g}).trigger("sticky_kit:unbottom"))),i<l&&(p=!1,g=S,null==E&&("left"!==u&&"right"!==u||r.insertAfter(b),b.detach()),e={position:"",width:"",top:""},r.css(e).removeClass(C).trigger("sticky_kit:unstick")),T&&((e=R.height())<c+S&&!d&&(g-=t,g=Math.max(e-c,g),g=Math.min(S,g),p&&r.css({top:g+"px"})))):l<i&&(p=!0,(e={position:"fixed",top:g}).width="border-box"===r.css("box-sizing")?r.outerWidth()+"px":r.width()+"px",r.css(e).addClass(C),null==E&&(r.after(b),"left"!==u&&"right"!==u||b.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({position:"relative"}),r.css({position:"absolute",bottom:o,top:"auto"}).trigger("sticky_kit:bottom")},t=function(){return y(),n()},e=function(){if(h=!0,R.off("touchmove",n),R.off("scroll",n),R.off("resize",t),L(document.body).off("sticky_kit:recalc",t),r.off("sticky_kit:detach",e),r.removeData("sticky_kit"),r.css({position:"",bottom:"",top:"",width:""}),v.position("position",""),p)return null==E&&("left"!==u&&"right"!==u||r.insertAfter(b),b.remove()),r.removeClass(C)},R.on("touchmove",n),R.on("scroll",n),R.on("resize",t),L(document.body).on("sticky_kit:recalc",t),r.on("sticky_kit:detach",e),setTimeout(n,0)}},i=0,n=this.length;i<n;i++)e=this[i],t(L(e));return this}}.call(this),$(window).width()<1201||(THREE.ColladaLoader=function(e){this.manager=void 0!==e?e:THREE.DefaultLoadingManager},THREE.ColladaLoader.prototype={constructor:THREE.ColladaLoader,crossOrigin:"Anonymous",load:function(e,t,i,n){var r=this,o=void 0===r.path?THREE.LoaderUtils.extractUrlBase(e):r.path;new THREE.FileLoader(r.manager).load(e,function(e){t(r.parse(e,o))},i,n)},setPath:function(e){this.path=e},options:{set convertUpAxis(e){console.warn("THREE.ColladaLoader: options.convertUpAxis() has been removed. Up axis is converted automatically.")}},setCrossOrigin:function(e){this.crossOrigin=e},parse:function(e,t){function s(e,t){for(var i=[],n=e.childNodes,r=0,o=n.length;r<o;r++){var a=n[r];a.nodeName===t&&i.push(a)}return i}function o(e){if(0===e.length)return[];for(var t=e.trim().split(/\s+/),i=new Array(t.length),n=0,r=t.length;n<r;n++)i[n]=t[n];return i}function v(e){if(0===e.length)return[];for(var t=e.trim().split(/\s+/),i=new Array(t.length),n=0,r=t.length;n<r;n++)i[n]=parseFloat(t[n]);return i}function l(e){if(0===e.length)return[];for(var t=e.trim().split(/\s+/),i=new Array(t.length),n=0,r=t.length;n<r;n++)i[n]=parseInt(t[n]);return i}function c(e){return e.substring(1)}function p(e){return 0===Object.keys(e).length}function i(e,t,i,n){var r=s(e,t)[0];if(void 0!==r)for(var o=s(r,i),a=0;a<o.length;a++)n(o[a])}function n(e,t){for(var i in e)e[i].build=t(e[i])}function M(e,t){return void 0!==e.build||(e.build=t(e)),e.build}function a(e){for(var t={inputs:{}},i=0,n=e.childNodes.length;i<n;i++){var r=e.childNodes[i];if(1===r.nodeType)switch(r.nodeName){case"input":var o=c(r.getAttribute("source")),a=r.getAttribute("semantic");t.inputs[a]=o}}return t}function u(e){var t={},i=e.getAttribute("target").split("/"),n=i.shift(),r=i.shift(),o=-1!==r.indexOf("("),a=-1!==r.indexOf(".");if(a)r=(i=r.split(".")).shift(),t.member=i.shift();else if(o){var s=r.split("(");r=s.shift();for(var l=0;l<s.length;l++)s[l]=parseInt(s[l].replace(/\)/,""));t.indices=s}return t.id=n,t.sid=r,t.arraySyntax=o,t.memberSyntax=a,t.sampler=c(e.getAttribute("source")),t}function r(e){var t=[],i=e.channels,n=e.samplers,r=e.sources;for(var o in i)if(i.hasOwnProperty(o)){var a=i[o],s=n[a.sampler],l=s.inputs.INPUT,c=s.inputs.OUTPUT;y(d(a,r[l],r[c]),t)}return t}function h(e){return M(Ue.animations[e],r)}function d(e,t,i){var n,r,o,a,s,l,c=Ue.nodes[e.id],u=Te(c.id),h=c.transforms[e.sid],d=c.matrix.clone().transpose(),p={};switch(h){case"matrix":for(o=0,a=t.array.length;o<a;o++)if(n=t.array[o],r=o*i.stride,void 0===p[n]&&(p[n]={}
1),!0===e.arraySyntax){var f=i.array[r],m=e.indices[0]+4*e.indices[1];p[n][m]=f}else for(s=0,l=i.stride;s<l;s++)p[n][s]=i.array[r+s];break;case"translate":case"rotate":case"scale":console.warn('THREE.ColladaLoader: Animation transform type "%s" not yet implemented.',h)}var g=function(e,t){var i=[];for(var n in e)i.push({time:parseFloat(n),value:e[n]});i.sort(function(e,t){return e.time-t.time});for(var r=0;r<16;r++)x(i,r,t.elements[r]);return i}(p,d);return{name:u.uuid,keyframes:g}}var f=new THREE.Vector3,m=new THREE.Vector3,g=new THREE.Quaternion;function y(e,t){for(var i=e.keyframes,n=e.name,r=[],o=[],a=[],s=[],l=0,c=i.length;l<c;l++){var u=i[l],h=u.time,d=u.value;fe.fromArray(d).transpose(),fe.decompose(f,g,m),r.push(h),o.push(f.x,f.y,f.z),a.push(g.x,g.y,g.z,g.w),s.push(m.x,m.y,m.z)}return 0<o.length&&t.push(new THREE.VectorKeyframeTrack(n+".position",r,o)),0<a.length&&t.push(new THREE.QuaternionKeyframeTrack(n+".quaternion",r,a)),0<s.length&&t.push(new THREE.VectorKeyframeTrack(n+".scale",r,s)),t}function x(e,t,i){var n,r,o,a=!0;for(r=0,o=e.length;r<o;r++)void 0===(n=e[r]).value[t]?n.value[t]=null:a=!1;if(!0===a)for(r=0,o=e.length;r<o;r++)(n=e[r]).value[t]=i;else!function(e,t){for(var i,n,r=0,o=e.length;r<o;r++){var a=e[r];if(null===a.value[t]){if(i=b(e,r,t),n=w(e,r,t),null===i){a.value[t]=n.value[t];continue}if(null===n){a.value[t]=i.value[t];continue}s=a,l=i,u=t,(c=n).time-l.time!=0?s.value[u]=(s.time-l.time)*(c.value[u]-l.value[u])/(c.time-l.time)+l.value[u]:s.value[u]=l.value[u]}}var s,l,c,u}(e,t)}function b(e,t,i){for(;0<=t;){var n=e[t];if(null!==n.value[i])return n;t--}return null}function w(e,t,i){for(;t<e.length;){var n=e[t];if(null!==n.value[i])return n;t++}return null}function _(e){for(var t=[],i=e.name,n=e.end-e.start||-1,r=e.animations,o=0,a=r.length;o<a;o++)for(var s=h(r[o]),l=0,c=s.length;l<c;l++)t.push(s[l]);return new THREE.AnimationClip(i,n,t)}function T(e){for(var t={sources:{}},i=0,n=e.childNodes.length;i<n;i++){var r=e.childNodes[i];if(1===r.nodeType)switch(r.nodeName){case"bind_shape_matrix":t.bindShapeMatrix=v(r.textContent);break;case"source":var o=r.getAttribute("id");t.sources[o]=Z(r);break;case"joints":t.joints=E(r);break;case"vertex_weights":t.vertexWeights=S(r)}}return t}function E(e){for(var t={inputs:{}},i=0,n=e.childNodes.length;i<n;i++){var r=e.childNodes[i];if(1===r.nodeType)switch(r.nodeName){case"input":var o=r.getAttribute("semantic"),a=c(r.getAttribute("source"));t.inputs[o]=a}}return t}function S(e){for(var t={inputs:{}},i=0,n=e.childNodes.length;i<n;i++){var r=e.childNodes[i];if(1===r.nodeType)switch(r.nodeName){case"input":var o=r.getAttribute("semantic"),a=c(r.getAttribute("source")),s=parseInt(r.getAttribute("offset"));t.inputs[o]={id:a,offset:s};break;case"vcount":t.vcount=l(r.textContent);break;case"v":t.v=l(r.textContent)}}return t}function A(e){var t={id:e.id},i=Ue.geometries[t.id];return void 0!==e.skin&&(t.skin=function(e){var t,i,n,r={joints:[],indices:{array:[],stride:4},weights:{array:[],stride:4}},o=e.sources,a=e.vertexWeights,s=a.vcount,l=a.v,c=a.inputs.JOINT.offset,u=a.inputs.WEIGHT.offset,h=e.sources[e.joints.inputs.JOINT],d=e.sources[e.joints.inputs.INV_BIND_MATRIX],p=o[a.inputs.WEIGHT.id].array,f=0;for(t=0,n=s.length;t<n;t++){var m=s[t],g=[];for(i=0;i<m;i++){var v=l[f+c],y=l[f+u],x=p[y];g.push({index:v,weight:x}),f+=2}for(g.sort(T),i=0;i<4;i++){var b=g[i];void 0!==b?(r.indices.array.push(b.index),r.weights.array.push(b.weight)):(r.indices.array.push(0),r.weights.array.push(0))}}for(r.bindMatrix=(new THREE.Matrix4).fromArray(e.bindShapeMatrix).transpose(),t=0,n=h.array.length;t<n;t++){var w=h.array[t],_=(new THREE.Matrix4).fromArray(d.array,t*d.stride).transpose();r.joints.push({name:w,boneInverse:_})}return r;function T(e,t){return t.weight-e.weight}}(e.skin),i.sources.skinIndices=t.skin.indices,i.sources.skinWeights=t.skin.weights),t}function C(e){return void 0!==e.build?e.build:e.init_from}function L(e){return M(Ue.images[e],C)}function R(e){for(var t={surfaces:{},samplers:{}},i=0,n=e.childNodes.length;i<n;i++){var r=e.childNodes[i];if(1===r.nodeType)switch(r.nodeName){case"newparam":P(r,t);break;case"technique":t.technique=D(r);break;case"extra":t.extra=F(r)}}return t}function P(e,t){for(var i=e.getAttribute("sid"),n=0,r=e.childNodes.length;n<r;n++){var o=e.childNodes[n];if(1===o.nodeType)switch(o.nodeName){case"surface":t.surfaces[i]=k(o);break;case"sampler2D":t.samplers[i]=N(o)}}}function k(e){for(var t={},i=0,n=e.childNodes.length;i<n;i++){var r=e.childNodes[i];if(1===r.nodeType)switch(r.nodeName){case"init_from":t.init_from=r.textContent}}return t}function N(e){for(var t={},i=0,n=e.childNodes.length;i<n;i++){var r=e.childNodes[i];if(1===r.nodeType)switch(r.nodeName){case"source":t.source=r.textContent}}return t}function D(e){for(var t={},i=0,n=e.childNodes.length;i<n;i++){var r=e.childNodes[i];if(1===r.nodeType)switch(r.nodeName){case"constant":case"lambert":case"blinn":case"phong":t.type=r.nodeName,t.parameters=O(r)}}return t}function O(e){for(var t={},i=0,n=e.childNodes.length;i<n;i++){var r=e.childNodes[i];if(1===r.nodeType)switch(r.nodeName){case"emission":case"diffuse":case"specular":case"shininess":case"transparency":t[r.nodeName]=I(r);break;
1case"transparent":t[r.nodeName]={opaque:r.getAttribute("opaque"),data:I(r)}}}return t}function I(e){for(var t={},i=0,n=e.childNodes.length;i<n;i++){var r=e.childNodes[i];if(1===r.nodeType)switch(r.nodeName){case"color":t[r.nodeName]=v(r.textContent);break;case"float":t[r.nodeName]=parseFloat(r.textContent);break;case"texture":t[r.nodeName]={id:r.getAttribute("texture"),extra:U(r)}}}return t}function U(e){for(var t={technique:{}},i=0,n=e.childNodes.length;i<n;i++){var r=e.childNodes[i];if(1===r.nodeType)switch(r.nodeName){case"extra":z(r,t)}}return t}function z(e,t){for(var i=0,n=e.childNodes.length;i<n;i++){var r=e.childNodes[i];if(1===r.nodeType)switch(r.nodeName){case"technique":H(r,t)}}}function H(e,t){for(var i=0,n=e.childNodes.length;i<n;i++){var r=e.childNodes[i];if(1===r.nodeType)switch(r.nodeName){case"repeatU":case"repeatV":case"offsetU":case"offsetV":t.technique[r.nodeName]=parseFloat(r.textContent);break;case"wrapU":case"wrapV":"TRUE"===r.textContent.toUpperCase()?t.technique[r.nodeName]=1:"FALSE"===r.textContent.toUpperCase()?t.technique[r.nodeName]=0:t.technique[r.nodeName]=parseInt(r.textContent)}}}function F(e){for(var t={},i=0,n=e.childNodes.length;i<n;i++){var r=e.childNodes[i];if(1===r.nodeType)switch(r.nodeName){case"technique":t.technique=B(r)}}return t}function B(e){for(var t={},i=0,n=e.childNodes.length;i<n;i++){var r=e.childNodes[i];if(1===r.nodeType)switch(r.nodeName){case"double_sided":t[r.nodeName]=parseInt(r.textContent)}}return t}function G(e){return e}function j(e){var t,i,a=(t=e.url,M(Ue.effects[t],G)),n=a.profile.technique,r=a.profile.extra;switch(n.type){case"phong":case"blinn":i=new THREE.MeshPhongMaterial;break;case"lambert":i=new THREE.MeshLambertMaterial;break;default:i=new THREE.MeshBasicMaterial}function o(e){var t,i=a.profile.samplers[e.id];if(void 0!==i?t=L(a.profile.surfaces[i.source].init_from):(console.warn("THREE.ColladaLoader: Undefined sampler. Access image directly (see #12530)."),t=L(e.id)),void 0!==t){var n=Ne.load(t),r=e.extra;if(void 0!==r&&void 0!==r.technique&&!1===p(r.technique)){var o=r.technique;n.wrapS=o.wrapU?THREE.RepeatWrapping:THREE.ClampToEdgeWrapping,n.wrapT=o.wrapV?THREE.RepeatWrapping:THREE.ClampToEdgeWrapping,n.offset.set(o.offsetU||0,o.offsetV||0),n.repeat.set(o.repeatU||1,o.repeatV||1)}else n.wrapS=THREE.RepeatWrapping,n.wrapT=THREE.RepeatWrapping;return n}return console.error("THREE.ColladaLoader: Unable to load texture with ID:",e.id),null}i.name=e.name;var s=n.parameters;for(var l in s){var c=s[l];switch(l){case"diffuse":c.color&&i.color.fromArray(c.color),c.texture&&(i.map=o(c.texture));break;case"specular":c.color&&i.specular&&i.specular.fromArray(c.color),c.texture&&(i.specularMap=o(c.texture));break;case"shininess":c.float&&i.shininess&&(i.shininess=c.float);break;case"emission":c.color&&i.emissive&&i.emissive.fromArray(c.color)}}var u=s.transparent,h=s.transparency;if(void 0===h&&u&&(h={float:1}),void 0===u&&h&&(u={opaque:"A_ONE",data:{color:[1,1,1,1]}}),u&&h)if(u.data.texture)i.alphaMap=o(u.data.texture),i.transparent=!0;else{var d=u.data.color;switch(u.opaque){case"A_ONE":i.opacity=d[3]*h.float;break;case"RGB_ZERO":i.opacity=1-d[0]*h.float;break;case"A_ZERO":i.opacity=1-d[3]*h.float;break;case"RGB_ONE":i.opacity=d[0]*h.float;break;default:console.warn('THREE.ColladaLoader: Invalid opaque type "%s" of transparent tag.',u.opaque)}i.opacity<1&&(i.transparent=!0)}return void 0!==r&&void 0!==r.technique&&1===r.technique.double_sided&&(i.side=THREE.DoubleSide),i}function V(e){for(var t=0;t<e.childNodes.length;t++){var i=e.childNodes[t];switch(i.nodeName){case"technique_common":return W(i)}}return{}}function W(e){for(var t={},i=0;i<e.childNodes.length;i++){var n=e.childNodes[i];switch(n.nodeName){case"perspective":case"orthographic":t.technique=n.nodeName,t.parameters=$(n)}}return t}function $(e){for(var t={},i=0;i<e.childNodes.length;i++){var n=e.childNodes[i];switch(n.nodeName){case"xfov":case"yfov":case"xmag":case"ymag":case"znear":case"zfar":case"aspect_ratio":t[n.nodeName]=parseFloat(n.textContent)}}return t}function q(e){var t;switch(e.optics.technique){case"perspective":t=new THREE.PerspectiveCamera(e.optics.parameters.yfov,e.optics.parameters.aspect_ratio,e.optics.parameters.znear,e.optics.parameters.zfar);break;case"orthographic":var i=e.optics.parameters.ymag,n=e.optics.parameters.xmag,r=e.optics.parameters.aspect_ratio;n=void 0===n?i*r:n,i=void 0===i?n/r:i,n*=.5,i*=.5,t=new THREE.Orthogra
1phicCamera(-n,n,i,-i,e.optics.parameters.znear,e.optics.parameters.zfar);break;default:t=new THREE.PerspectiveCamera}return t.name=e.name,t}function X(e){for(var t={},i=0,n=e.childNodes.length;i<n;i++){var r=e.childNodes[i];if(1===r.nodeType)switch(r.nodeName){case"directional":case"point":case"spot":case"ambient":t.technique=r.nodeName,t.parameters=Y(r)}}return t}function Y(e){for(var t={},i=0,n=e.childNodes.length;i<n;i++){var r=e.childNodes[i];if(1===r.nodeType)switch(r.nodeName){case"color":var o=v(r.textContent);t.color=(new THREE.Color).fromArray(o);break;case"falloff_angle":t.falloffAngle=parseFloat(r.textContent);break;case"quadratic_attenuation":var a=parseFloat(r.textContent);t.distance=a?Math.sqrt(1/a):0}}return t}function J(e){var t;switch(e.technique){case"directional":t=new THREE.DirectionalLight;break;case"point":t=new THREE.PointLight;break;case"spot":t=new THREE.SpotLight;break;case"ambient":t=new THREE.AmbientLight}return e.parameters.color&&t.color.copy(e.parameters.color),e.parameters.distance&&(t.distance=e.parameters.distance),t}function Z(e){for(var t={array:[],stride:3},i=0;i<e.childNodes.length;i++){var n=e.childNodes[i];if(1===n.nodeType)switch(n.nodeName){case"float_array":t.array=v(n.textContent);break;case"Name_array":t.array=o(n.textContent);break;case"technique_common":var r=s(n,"accessor")[0];void 0!==r&&(t.stride=parseInt(r.getAttribute("stride")))}}return t}function Q(e){for(var t={},i=0;i<e.childNodes.length;i++){var n=e.childNodes[i];1===n.nodeType&&(t[n.getAttribute("semantic")]=c(n.getAttribute("source")))}return t}function K(e){for(var t={type:e.nodeName,material:e.getAttribute("material"),count:parseInt(e.getAttribute("count")),inputs:{},stride:0,hasUV:!1},i=0,n=e.childNodes.length;i<n;i++){var r=e.childNodes[i];if(1===r.nodeType)switch(r.nodeName){case"input":var o=c(r.getAttribute("source")),a=r.getAttribute("semantic"),s=parseInt(r.getAttribute("offset"));t.inputs[a]={id:o,offset:s},t.stride=Math.max(t.stride,s+1),"TEXCOORD"===a&&(t.hasUV=!0);break;case"vcount":t.vcount=l(r.textContent);break;case"p":t.p=l(r.textContent)}}return t}function ee(e){for(var t=0,i=0,n=e.length;i<n;i++)!0===e[i].hasUV&&t++;0<t&&t<e.length&&(e.uvsNeedsFix=!0)}function te(e){var t={},i=e.sources,n=e.vertices,r=e.primitives;if(0===r.length)return{};var o=function(e){for(var t={},i=0;i<e.length;i++){var n=e[i];void 0===t[n.type]&&(t[n.type]=[]),t[n.type].push(n)}return t}(r);for(var a in o){var s=o[a];ee(s),t[a]=ie(s,i,n)}return t}function ie(e,t,i){for(var n={},r={array:[],stride:0},o={array:[],stride:0},a={array:[],stride:0},s={array:[],stride:0},l=[],c=4,u=[],h=4,d=new THREE.BufferGeometry,p=[],f=0,m=0,g=0;g<e.length;g++){var v=e[g],y=v.inputs,x=1;for(var b in v.vcount&&4===v.vcount[0]&&(x=2),m="lines"===v.type||"linestrips"===v.type?2*v.count:3*v.count*x,d.addGroup(f,m,g),f+=m,v.material&&p.push(v.material),y){var w=y[b];switch(b){case"VERTEX":for(var _ in i){var T=i[_];switch(_){case"POSITION":var E=r.array.length;if(ne(v,t[T],w.offset,r.array),r.stride=t[T].stride,t.skinWeights&&t.skinIndices&&(ne(v,t.skinIndices,w.offset,l),ne(v,t.skinWeights,w.offset,u)),!1===v.hasUV&&!0===e.uvsNeedsFix){m=(r.array.length-E)/r.stride;for(var S=0;S<m;S++)a.array.push(0,0)}break;case"NORMAL":ne(v,t[T],w.offset,o.array),o.stride=t[T].stride;break;case"COLOR":ne(v,t[T],w.offset,s.array),s.stride=t[T].stride;break;case"TEXCOORD":ne(v,t[T],w.offset,a.array),a.stride=t[T].stride;break;default:console.warn('THREE.ColladaLoader: Semantic "%s" not handled in geometry build process.',_)}}break;case"NORMAL":ne(v,t[w.id],w.offset,o.array),o.stride=t[w.id].stride;break;case"COLOR":ne(v,t[w.id],w.offset,s.array),s.stride=t[w.id].stride;break;case"TEXCOORD":ne(v,t[w.id],w.offset,a.array),a.stride=t[w.id].stride}}}return 0<r.array.length&&d.addAttribute("position",new THREE.Float32BufferAttribute(r.array,r.stride)),0<o.array.length&&d.addAttribute("normal",new THREE.Float32BufferAttribute(o.array,o.stride)),0<s.array.length&&d.addAttribute("color",new THREE.Float32BufferAttribute(s.array,s.stride)),0<a.array.length&&d.addAttribute("uv",new THREE.Float32BufferAttribute(a.array,a.stride)),0<l.length&&d.addAttribute("skinIndex",new THREE.Float32BufferAttribute(l,c)),0<u.length&&d.addAttribute("skinWeight",new THREE.Float32BufferAttribute(u,h)),n.data=d,n.type=e[0].type,n.materialKeys=p,n}function ne(e,t,n,r){var o=e.p,i=e.stride,a=e.vcount;function s(e){for(var t=o[e+n]*u,i=t+u;t<i;t++)r.push(c[t])}var l=0,c=t.array,u=t.stride;if(void 0!==e.vcount){for(var h=0,d=0,p=a.length;d<p;d++){var f=a[d];if(4===f){var m=h+1*i,g=h+2*i,v=h+3*i;s(h+0*i),s(m),s(v),s(m),s(g),s(v)}else 3===f?(m=h+1*i,g=h+2*i,s(h+0*i),s(m),s(g)):l=Math.max(l,f);h+=i*f}0<l&&console.log("THREE.ColladaLoader: Geometry has faces with more than 4 vertices.")}else for(d=0,p=o.length;d<p;d+=i)s(d)}function re(e){return M(Ue.geometries[e],te)}function oe(e){return void 0!==e.build?e.build:e}function ae(e,t){for(var i=0;i<e.childNodes.length;i++){var n=e.childNodes[i];if(1===n.nodeType)switch(n.nodeName){case"joint":t.joints[n.getAttribute("sid")]=se(n);break;case"link":t.links.push(ce(n))}}}function se(e){for(var t,i=0;i<e.childNodes.length;i++){var n=e.childNodes[i];if(1===n.nodeType)switch(n.nodeName){case"prismatic":case"revolute":t=le(n)}}return t}function le(e,t){t={sid:e.getAttribute("sid"),name:e.getAttribute("name")||"",axis:new THREE.Vector3,limits:{min:0,max:0},type:e.nodeName,static:!1,zeroPosition:0,middlePosition:0};for(var i=0;i<e.childNodes.length;i++){var n=e.childNodes[i];if(1===n.nodeType)switch(n.nodeName){case"axis":var r=v(n.textContent);t.axis.fromArray(r);break;case"limits":var o=n.getElementsByTagName("max")[0],a=n.getElementsByTagName("min")[0];t.limits.max=parseFloat(o.textContent),t.limits.min=parseFloat(a.textContent)}}return t.limits.min>=t.limits.max&&(t.static=!0),t.middlePosition=(t.limits.min+t.limits.max)/2,t}function ce(e){for(var t={sid:e.getAttribute("sid"),name:e.getAttribute("name")||"",attachments:[],transforms:[]},i=0;i<e.childNodes.length;i++){var n=e.childNodes[i];if(1===n.nodeType)switch(n.nodeName){case"attachment_full":t.attachments.push(ue(n));break;case"matrix":case"translate":case"rotate":t.transforms.push(he(n))}}return t}function ue(e){for(var t={joint:e.getAttribute("joint").split("/").pop(),transforms:[],links:[]},i=0;i<e.childNodes.length;i++){var n=e.childNodes[i];if(1===n.nodeType)switch(n.nodeName){case"link":t.links.push(ce(n));break;case"matrix":case"translate":case"rotate":t.transforms.push(he(n))}}return t}function he(e){var t={type:e.nodeName},i=v(e.textContent);switch(t.type){case"matrix":t.obj=new THREE.Matrix4,t.obj.fromArray(i).transpose();break;case"translate":t.obj=new THREE.Vector3,t.obj.fromArray(i);break;case"rotate":t.obj=new THREE.Vector3,t.obj.fromArray(i),t.angle=THREE.Math.degToRad(i[3])}return t}function de(e){for(var t={target:e.getAttribute("target").split("/").pop()},i=0;i<e.childNodes.length;i++){var n=e.childNodes[i];if(1===n.nodeType)switch(n.nodeName){case"axis":var r=n.getElementsByTagName("param")[0];t.axis=r.textContent;var o=t.axis.split("inst_").pop().split("axis")[0];t.jointIndex=o.substr(0,o.length-1)}}return t}function pe(e){return void 0!==e.build?e.build:e}var fe=new THREE.Matrix4,me=new THREE.Vector3;function ge(e){for(var t={name:e.getAttribute("name")||"",type:e.getAttribute("type"),id:e.getAttribute("id"),sid:e.getAttribute("sid"),matrix:new THREE.Matrix4,nodes:[],instanceCameras:[],instanceControllers:[],instanceLights:[],instanceGeometries:[],instanceNodes:[],transforms:{}},i=0;i<e.childNodes.length;i++){var n=e.childNodes[i];if(1===n.nodeType)switch(n.nodeName){case"node":t.nodes.push(n.getAttribute("id")),ge(n);break;case"instance_camera":t.instanceCameras.push(c(n.getAttribute("url")));break;case"instance_controller":t.instanceControllers.push(ve(n));break;case"instance_light":t.instanceLights.push(c(n.getAttribute("url")));break;case"instance_geometry":t.instanceGeometries.push(ve(n));break;case"instance_node":t.instanceNodes.push(c(n.getAttribute("url")));break;
1case"matrix":var r=v(n.textContent);t.matrix.multiply(fe.fromArray(r).transpose()),t.transforms[n.getAttribute("sid")]=n.nodeName;break;case"translate":r=v(n.textContent),me.fromArray(r),t.matrix.multiply(fe.makeTranslation(me.x,me.y,me.z)),t.transforms[n.getAttribute("sid")]=n.nodeName;break;case"rotate":r=v(n.textContent);var o=THREE.Math.degToRad(r[3]);t.matrix.multiply(fe.makeRotationAxis(me.fromArray(r),o)),t.transforms[n.getAttribute("sid")]=n.nodeName;break;case"scale":r=v(n.textContent),t.matrix.scale(me.fromArray(r)),t.transforms[n.getAttribute("sid")]=n.nodeName;break;case"extra":break;default:console.log(n)}}return Ue.nodes[t.id]=t}function ve(e){for(var t={id:c(e.getAttribute("url")),materials:{},skeletons:[]},i=0;i<e.childNodes.length;i++){var n=e.childNodes[i];switch(n.nodeName){case"bind_material":for(var r=n.getElementsByTagName("instance_material"),o=0;o<r.length;o++){var a=r[o],s=a.getAttribute("symbol"),l=a.getAttribute("target");t.materials[s]=c(l)}break;case"skeleton":t.skeletons.push(c(n.textContent))}}return t}function ye(e,t){var i,n,r,o,a=[],s=[];for(i=0;i<e.length;i++){var l=e[i];if(o=l,void 0!==Ue.nodes[o])xe(Te(l),t,a);else if(r=l,void 0!==Ue.visualScenes[r])for(var c=Ue.visualScenes[l].children,u=0;u<c.length;u++){var h=c[u];"JOINT"===h.type&&xe(Te(h.id),t,a)}else console.error("THREE.ColladaLoader: Unable to find root bone of skeleton with ID:",l)}for(i=0;i<t.length;i++)for(u=0;u<a.length;u++)if((n=a[u]).bone.name===t[i].name){(s[i]=n).processed=!0;break}for(i=0;i<a.length;i++)!1===(n=a[i]).processed&&(s.push(n),n.processed=!0);var d=[],p=[];for(i=0;i<s.length;i++)n=s[i],d.push(n.bone),p.push(n.boneInverse);return new THREE.Skeleton(d,p)}function xe(e,r,o){e.traverse(function(e){if(!0===e.isBone){for(var t,i=0;i<r.length;i++){var n=r[i];if(n.name===e.name){t=n.boneInverse;break}}void 0===t&&(t=new THREE.Matrix4),o.push({bone:e,boneInverse:t,processed:!1})}})}function be(e){for(var t,i,n,r,o,a=[],s=e.matrix,l=e.nodes,c=e.type,u=e.instanceCameras,h=e.instanceControllers,d=e.instanceLights,p=e.instanceGeometries,f=e.instanceNodes,m=0,g=l.length;m<g;m++)a.push(Te(l[m]));for(m=0,g=u.length;m<g;m++){var v=(t=u[m],void 0!==(i=Ue.cameras[t])?M(i,q):(console.warn("THREE.ColladaLoader: Couldn't find camera with ID:",t),null));null!==v&&a.push(v.clone())}for(m=0,g=h.length;m<g;m++)for(var y=h[m],x=(n=y.id,M(Ue.controllers[n],A)),b=_e(re(x.id),y.materials),w=ye(y.skeletons,x.skin.joints),_=0,T=b.length;_<T;_++){var E;(E=b[_]).isSkinnedMesh&&(E.bind(w,x.skin.bindMatrix),E.normalizeSkinWeights()),a.push(E)}for(m=0,g=d.length;m<g;m++){var S=(r=d[m],void 0!==(o=Ue.lights[r])?M(o,J):(console.warn("THREE.ColladaLoader: Couldn't find light with ID:",r),null));null!==S&&a.push(S.clone())}for(m=0,g=p.length;m<g;m++)for(_=0,T=(b=_e(re((y=p[m]).id),y.materials)).length;_<T;_++)a.push(b[_]);for(m=0,g=f.length;m<g;m++)a.push(Te(f[m]).clone());if(0===l.length&&1===a.length)E=a[0];else for(E="JOINT"===c?new THREE.Bone:new THREE.Group,m=0;m<a.length;m++)E.add(a[m]);return""===E.name&&(E.name="JOINT"===c?e.sid:e.name),E.matrix.copy(s),E.matrix.decompose(E.position,E.quaternion,E.scale),E}function we(e,t){for(var i,n=[],r=0,o=e.length;r<o;r++){var a=t[e[r]];n.push((i=a,M(Ue.materials[i],j)))}return n}function _e(e,t){var i=[];for(var n in e){var r=e[n],o=we(r.materialKeys,t);0===o.length&&("lines"===n||"linestrips"===n?o.push(new THREE.LineBasicMaterial):o.push(new THREE.MeshPhongMaterial));var a=void 0!==r.data.attributes.skinIndex;if(a)for(var s=0,l=o.length;s<l;s++)o[s].skinning=!0;var c,u=1===o.length?o[0]:o;switch(n){case"lines":c=new THREE.LineSegments(r.data,u);break;case"linestrips":c=new THREE.Line(r.data,u);break;case"triangles":case"polylist":c=a?new THREE.SkinnedMesh(r.data,u):new THREE.Mesh(r.data,u)}i.push(c)}return i}function Te(e){return M(Ue.nodes[e],be)}function Ee(e){var t=new THREE.Group;t.name=e.name;for(var i=e.children,n=0;n<i.length;n++){var r=i[n];t.add(Te(r.id))}return t}function Se(e){return M(Ue.visualScenes[e],Ee)}if(console.time("THREE.ColladaLoader"),0===e.length)return{scene:new THREE.Scene};console.time("THREE.ColladaLoader: DOMParser");var Me=(new DOMParser).parseFromString(e,"application/xml");console.timeEnd("THREE.ColladaLoader: DOMParser");var Ae=s(Me,"COLLADA")[0],Ce=Ae.getAttribute("version");console.log("THREE.ColladaLoader: File version",Ce);var Le,Re,Pe,ke=(Le=s(Ae,"asset")[0],{unit:(Pe=s(Le,"unit")[0],void 0!==Pe&&!0===Pe.hasAttribute("meter")?parseFloat(Pe.getAttribute("meter")):1),upAxis:(Re=s(Le,"up_axis")[0],void 0!==Re?Re.textContent:"Y_UP")}),Ne=new THREE.TextureLoader(this.manager);Ne.setPath(t).setCrossOrigin(this.crossOrigin);var De=[],Oe={},Ie=0,Ue={animations:{},clips:{},controllers:{},images:{},effects:{},materials:{},cameras:{},lights:{},geometries:{},nodes:{},visualScenes:{},kinematicsModels:{},kinematicsScenes:{}};console.time("THREE.ColladaLoader: Parse"),i(Ae,"library_animations","animation",function(e){for(var t={sources:{},samplers:{},channels:{}},i=0,n=e.childNodes.length;i<n;i++){var r,o=e.childNodes[i];if(1===o.nodeType)switch(o.nodeName){case"source":r=o.getAttribute("id"),t.sources[r]=Z(o);break;
1case"sampler":r=o.getAttribute("id"),t.samplers[r]=a(o);break;case"channel":r=o.getAttribute("target"),t.channels[r]=u(o);break;default:console.log(o)}}Ue.animations[e.getAttribute("id")]=t}),i(Ae,"library_animation_clips","animation_clip",function(e){for(var t={name:e.getAttribute("id")||"default",start:parseFloat(e.getAttribute("start")||0),end:parseFloat(e.getAttribute("end")||0),animations:[]},i=0,n=e.childNodes.length;i<n;i++){var r=e.childNodes[i];if(1===r.nodeType)switch(r.nodeName){case"instance_animation":t.animations.push(c(r.getAttribute("url")))}}Ue.clips[e.getAttribute("id")]=t}),i(Ae,"library_controllers","controller",function(e){for(var t={},i=0,n=e.childNodes.length;i<n;i++){var r=e.childNodes[i];if(1===r.nodeType)switch(r.nodeName){case"skin":t.id=c(r.getAttribute("source")),t.skin=T(r);break;case"morph":t.id=c(r.getAttribute("source")),console.warn("THREE.ColladaLoader: Morph target animation not supported yet.")}}Ue.controllers[e.getAttribute("id")]=t}),i(Ae,"library_images","image",function(e){var t={init_from:s(e,"init_from")[0].textContent};Ue.images[e.getAttribute("id")]=t}),i(Ae,"library_effects","effect",function(e){for(var t={},i=0,n=e.childNodes.length;i<n;i++){var r=e.childNodes[i];if(1===r.nodeType)switch(r.nodeName){case"profile_COMMON":t.profile=R(r)}}Ue.effects[e.getAttribute("id")]=t}),i(Ae,"library_materials","material",function(e){for(var t={name:e.getAttribute("name")},i=0,n=e.childNodes.length;i<n;i++){var r=e.childNodes[i];if(1===r.nodeType)switch(r.nodeName){case"instance_effect":t.url=c(r.getAttribute("url"))}}Ue.materials[e.getAttribute("id")]=t}),i(Ae,"library_cameras","camera",function(e){for(var t={name:e.getAttribute("name")},i=0,n=e.childNodes.length;i<n;i++){var r=e.childNodes[i];if(1===r.nodeType)switch(r.nodeName){case"optics":t.optics=V(r)}}Ue.cameras[e.getAttribute("id")]=t}),i(Ae,"library_lights","light",function(e){for(var t={},i=0,n=e.childNodes.length;i<n;i++){var r=e.childNodes[i];if(1===r.nodeType)switch(r.nodeName){case"technique_common":t=X(r)}}Ue.lights[e.getAttribute("id")]=t}),i(Ae,"library_geometries","geometry",function(e){var t={name:e.getAttribute("name"),sources:{},vertices:{},primitives:[]},i=s(e,"mesh")[0];if(void 0!==i){for(var n=0;n<i.childNodes.length;n++){var r=i.childNodes[n];if(1===r.nodeType){var o=r.getAttribute("id");switch(r.nodeName){case"source":t.sources[o]=Z(r);break;case"vertices":t.vertices=Q(r);break;case"polygons":console.warn("THREE.ColladaLoader: Unsupported primitive type: ",r.nodeName);break;case"lines":case"linestrips":case"polylist":case"triangles":t.primitives.push(K(r));break;default:console.log(r)}}}Ue.geometries[e.getAttribute("id")]=t}}),i(Ae,"library_nodes","node",ge),i(Ae,"library_visual_scenes","visual_scene",function(e){var t={name:e.getAttribute("name"),children:[]};!function(e){for(var t=e.getElementsByTagName("node"),i=0;i<t.length;i++){var n=t[i];!1===n.hasAttribute("id")&&n.setAttribute("id","three_default_"+Ie++)}}(e);for(var i=s(e,"node"),n=0;n<i.length;n++)t.children.push(ge(i[n]));Ue.visualScenes[e.getAttribute("id")]=t}),i(Ae,"library_kinematics_models","kinematics_model",function(e){for(var t={name:e.getAttribute("name")||"",joints:{},links:[]},i=0;i<e.childNodes.length;i++){var n=e.childNodes[i];if(1===n.nodeType)switch(n.nodeName){case"technique_common":ae(n,t)}}Ue.kinematicsModels[e.getAttribute("id")]=t}),i(Ae,"scene","instance_kinematics_scene",function(e){for(var t={bindJointAxis:[]},i=0;i<e.childNodes.length;i++){var n=e.childNodes[i];if(1===n.nodeType)switch(n.nodeName){case"bind_joint_axis":t.bindJointAxis.push(de(n))}}Ue.kinematicsScenes[c(e.getAttribute("url"))]=t}),console.timeEnd("THREE.ColladaLoader: Parse"),console.time("THREE.ColladaLoader: Build"),n(Ue.animations,r),n(Ue.clips,_),n(Ue.controllers,A),n(Ue.images,C),n(Ue.effects,G),n(Ue.materials,j),n(Ue.cameras,q),n(Ue.lights,J),n(Ue.geometries,te),n(Ue.visualScenes,Ee),console.timeEnd("THREE.ColladaLoader: Build"),function(){var e,t=Ue.clips;if(!0===p(t)){if(!1===p(Ue.animations)){var i=[];for(var n in Ue.animations)for(var r=h(n),o=0,a=r.length;o<a;o++)i.push(r[o]);De.push(new THREE.AnimationClip("default",-1,i))}}else for(var n in t)De.push((e=n,M(Ue.clips[e],_)))}(),function(){var e=Object.keys(Ue.kinematicsModels)[0],t=Object.keys(Ue.kinematicsScenes)[0],i=Object.keys(Ue.visualScenes)[0];if(void 0!==e&&void 0!==t){for(var n,r,o=(n=e,M(Ue.kinematicsModels[n],oe)),a=(r=t,M(Ue.kinematicsScenes[r],pe)),s=Se(i),l=a.bindJointAxis,c={},u=0,h=l.length;u<h;u++){var d=l[u],p=Ae.querySelector('[sid="'+d.target+'"]');if(p){var f=p.parentElement;g(d.jointIndex,f)}}var m=new THREE.Matrix4;Oe={joints:o&&o.joints,getJointValue:function(e){var t=c[e];if(t)return t.position;console.warn("THREE.ColladaLoader: Joint "+e+" doesn't exist.")},setJointValue:function(e,t){var i=c[e];if(i){var n=i.joint;if(t>n.limits.max||t<n.limits.min)console.warn("THREE.ColladaLoader: Joint "+e+" value "+t+" outside of limits (min: "+n.limits.min+", max: "+n.limits.max+").");else if(n.static)console.warn("THREE.ColladaLoader: Joint "+e+" is static.");else{var r=i.object,o=n.axis,a=i.transforms;fe.identity();for(var s=0;s<a.length;s++){var l=a[s];if(l.sid&&-1!==l.sid.indexOf(e))switch(n.type){case"revolute":fe.multiply(m.makeRotationAxis(o,THREE.Math.degToRad(t)));break;case"prismatic":fe.multiply(m.makeTranslation(o.x*t,o.y*t,o.z*t));break;default:console.warn("THREE.ColladaLoader: Unknown joint type: "+n.type)}else switch(l.type){case"matrix":fe.multiply(l.obj);break;case"translate":fe.multiply(m.makeTranslation(l.obj.x,l.obj.y,l.obj.z));break;case"scale":fe.scale(l.obj);break;case"rotate":fe.multiply(m.makeRotationAxis(l.obj,l.angle))}}r.matrix.copy(fe),r.matrix.decompose(r.position,r.quaternion,r.scale),c[e].position=t}}else console.log("THREE.ColladaLoader: "+e+" does not exist.")}}}function g(t,i){var n=i.getAttribute("name"),r=o.joints[t];s.traverse(function(e){e.name===n&&(c[t]={object:e,transforms:function(e){for(var t=[],i=Ae.querySelector('[id="'+e.id+'"]'),n=0;n<i.childNodes.length;n++){var r=i.childNodes[n];if(1===r.nodeType)switch(r.nodeName){case"matrix":var o=v(r.textContent),a=(new THREE.Matrix4).fromArray(o).transpose();t.push({sid:r.getAttribute("sid"),type:r.nodeName,obj:a});break;case"translate":case"scale":var o=v(r.textContent),s=(new THREE.Vector3).fromArray(o);t.push({sid:r.getAttribute("sid"),type:r.nodeName,obj:s});break;case"rotate":var o=v(r.textContent),s=(new THREE.Vector3).fromArray(o),l=THREE.Math.degToRad(o[3]);t.push({sid:r.getAttribute("sid"),type:r.nodeName,obj:s,angle:l})}}return t}(i),joint:r,position:r.zeroPosition})})}}();
1var ze=Se(c(s(s(Ae,"scene")[0],"instance_visual_scene")[0].getAttribute("url")));return"Z_UP"===ke.upAxis&&ze.quaternion.setFromEuler(new THREE.Euler(-Math.PI/2,0,0)),ze.scale.multiplyScalar(ke.unit),console.timeEnd("THREE.ColladaLoader"),{animations:De,kinematics:Oe,library:Ue,scene:ze}}});var Detector={canvas:!!window.CanvasRenderingContext2D,webgl:function(){try{var e=document.createElement("canvas");return!(!window.WebGLRenderingContext||!e.getContext("webgl")&&!e.getContext("experimental-webgl"))}catch(e){return!1}}(),workers:!!window.Worker,fileapi:window.File&&window.FileReader&&window.FileList&&window.Blob,getWebGLErrorMessage:function(){var e=document.createElement("div");return e.id="webgl-error-message",e.style.fontFamily="monospace",e.style.fontSize="13px",e.style.fontWeight="normal",e.style.textAlign="center",e.style.background="#fff",e.style.color="#000",e.style.padding="1.5em",e.style.width="400px",e.style.margin="5em auto 0",this.webgl||(e.innerHTML=window.WebGLRenderingContext?['Your graphics card does not seem to support <a href="http://khronos.org/webgl/wiki/Getting_a_WebGL_Implementation" style="color:#000">WebGL</a>.<br />','Find out how to get it <a href="http://get.webgl.org/" style="color:#000">here</a>.'].join("\n"):['Your browser does not seem to support <a href="http://khronos.org/webgl/wiki/Getting_a_WebGL_Implementation" style="color:#000">WebGL</a>.<br/>','Find out how to get it <a href="http://get.webgl.org/" style="color:#000">here</a>.'].join("\n")),e},addGetWebGLMessage:function(e){var t,i,n;t=void 0!==(e=e||{}).parent?e.parent:document.body,i=void 0!==e.id?e.id:"oldie",(n=Detector.getWebGLErrorMessage()).id=i,t.appendChild(n)}};"object"==typeof module&&(module.exports=Detector);var tools={init:function(e){if(this.client(),null!=e)for(var t=0,i=e.length;t<i;t++)tools[e[t]]()},client:function(){window.client={get:function(){this.$document=$(document),this.$window=$(window),this.windowW=this.$window.width(),this.windowH=this.$window.height(),this.isMobile=this.windowW<=1200,this.scrollW=this.getScrollWidth(),this.isRetina=this.checkRetina()},getScrollWidth:function(){var e=document.createElement("div");e.style.visibility="hidden",e.style.width="100px",e.style.msOverflowStyle="scrollbar",document.body.appendChild(e);var t=e.offsetWidth;e.style.overflow="scroll";var i=document.createElement("div");i.style.width="100%",e.appendChild(i);var n=i.offsetWidth;return e.parentNode.removeChild(e),t-n},checkRetina:function(){if(window.matchMedia){var e=window.matchMedia("only screen and (min--moz-device-pixel-ratio: 1.3), only screen and (-o-min-device-pixel-ratio: 2.6/2), only screen and (-webkit-min-device-pixel-ratio: 1.3), only screen and (min-device-pixel-ratio: 1.3), only screen and (min-resolution: 1.3dppx)");return e&&e.matches||1<window.devicePixelRatio}}},client.get(),client.$window.on("resize",function(){client.get()})},backgrounds:function(){for(var e=document.querySelectorAll("[data-bg-src]"),t=e.length,i=0;i<t;i++){var n=e[i],r=n.getAttribute("data-bg-src")||"",o=n.getAttribute("data-bg-size")||"auto",a=n.getAttribute("data-bg-pos")||"auto";n.style.background="url("+r+") "+a+" / "+o+" no-repeat"}},tabs:function(){window.tabs={init:function(){var e=document.querySelectorAll("[data-tabs]");this.classTabActive="tabs__tab_active",this.classBtnActive="tabs__btn_active",this.tagTab="[data-tab]",this.tagBtn="[data-open-tab]";for(var t=0,i=e.length;t<i;t++){var n=e[t],r=n.querySelector("[data-tab]").getAttribute("data-tab");this.open(n,r),n.classList.add("tabs_initialized")}this.events()},open:function(e,t){for(var i=e.querySelectorAll(this.tagTab),n=0,r=i.length;n<r;n++){i[n].classList.remove(this.classTabActive)}e.querySelector("[data-tab='"+t+"']").classList.add(this.classTabActive);for(var o=e.querySelectorAll(this.tagBtn),a=0,s=o.length;a<s;a++){o[a].classList.remove(this.classBtnActive)}e.querySelector("[data-open-tab='"+t+"']").classList.add(this.classBtnActive)},events:function(){var n=this;client.$document.on("click","[data-open-tab]",function(){var e=$
1(this),t=e.closest(".tabs"),i=e.data("open-tab");n.open(t[0],i)})}},tabs.init()},modals:function(){window.modals={init:function(){this.container=document.querySelector("[data-modals]"),this.tagBtnClose="[data-modal-close]",this.tagBtnOpen="[data-modal-open]",this.classModalActive="modal_active",this.countOpened=0,this.events()},open:function(e,t){var i=modals,n=document.querySelector("[data-modal='"+e+"']");null!==n&&(i.hideOverflow(),n.classList.add(i.classModalActive),i.countOpened++,$(n).trigger("modalOpened"),t&&t(n))},close:function(e,t){var i=this;if(i.countOpened){var n=document.querySelector("[data-modal='"+e+"']");null!==n&&(n.classList.remove(i.classModalActive),i.countOpened--,i.countOpened||setTimeout(function(){i.showOverflow()},500),$(n).trigger("modalClosed"),t&&t(n))}},closeAll:function(e){for(var t=this,i=t.container.querySelectorAll("[data-modal]"),n=0,r=i.length;n<r;n++){i[n].classList.remove(t.classModalActive)}t.countOpened=0,setTimeout(function(){t.showOverflow()},500),e&&e()},hideOverflow:function(){document.body.style.overflowY="hidden",document.body.style.paddingRight=client.scrollW+"px"},showOverflow:function(){document.body.style.overflowY="auto",document.body.style.paddingRight="0"},events:function(){var i=this;client.$document.on("click",i.tagBtnClose,function(e){e.preventDefault();var t=$(this).closest(".modal").data("modal");i.close(t)}),client.$document.on("click",i.tagBtnOpen,function(e){e.preventDefault();var t=$(this).data("modal-open");i.open(t)})}},modals.init()},preloader:function(){window.preloader={init:function(){this.urls=this.getUrls(),this.loadImages(this.urls)},getUrls:function(){for(var e=[],t=document.getElementsByTagName("img"),i=t.length,n=0,r=document.querySelectorAll("[data-bg-src]"),o=r.length,a=0;n<i;n++){var s=t[n].getAttribute("src");e.push(s)}for(;a<o;a++){s=r[a].getAttribute("data-bg-src");e.push(s)}return this.total=i+o,this.loaded=0,e},loadImages:function(e){for(var t=this,i=0,n=e.length;i<n;i++){var r=e[i],o=new Image;o.src=r,o.addEventListener("load",function(){t.loaded++,t.check()}),o.addEventListener("error",function(){t.loaded++,t.check()})}},getProgress:function(){return(this.loaded/this.total).toFixed(2)},check:function(){this.loaded===this.total&&this.done()},done:function(){var e;document.createEvent?(e=document.createEvent("HTMLEvents")).initEvent("preloaderDone",!0,!0):(e=document.createEventObject()).eventType="preloaderDone",e.eventName="preloaderDone",document.createEvent?document.dispatchEvent(e):document.fireEvent("on"+e.eventType,e)}},preloader.init()},select:function(){window.customSelect={init:function(){this.html={$elements:$("[data-custom-select]")},this.render(),this.events()},render:function(){var n=this;
1n.html.$elements.each(function(){var e=$(this),t=e.find("select"),r=[];t.find("option").each(function(){var e=$(this),t=e.val(),i=e.text(),n=e.prop("selected");r.push({value:t,text:i,isSelected:n})});var i=n.build(r);e.append(i)})},build:function(e){for(var t="",i="",n=0,r=e.length;n<r;n++){var o=e[n].value,a=e[n].text,s=e[n].isSelected;if(o.length&&!s)i+='<button class="custom-select__item" data-select-item-value="'+o+'" data-select-item-text="'+a+'">'+a+"</button>";if(o.length&&s)i+='<button class="custom-select__item custom-select__item_hide" data-select-item-value="'+o+'" data-select-item-text="'+a+'">'+a+"</button>";s&&($(this).addClass("custom-select__item_hide"),t=a)}return'<div class="custom-select__outer"><button class="custom-select__head"><div class="custom-select__value">'+t+'</div></button><div class="custom-select__body"><div class="custom-select__list">'+i+"</div></div></div>"},setActiveItem:function(e,t,i,n){e.find(".custom-select__value").text(n),t.val(i),this.close(e),t.trigger("change")},open:function(e){e.find(".custom-select__body").stop().slideDown(300),e.addClass("custom-select_opened")},close:function(e){e.find(".custom-select__body").stop().slideUp(300),e.removeClass("custom-select_opened")},closeAll:function(){this.html.$elements.each(function(){var e=$
1(this);e.find(".custom-select__body").slideUp(300),e.removeClass("custom-select_opened")})},rebuildSelect:function(e){e.siblings(".custom-select__outer").remove();var t=e.parent(),r=[];e.find("option").each(function(){var e=$(this),t=e.val(),i=e.text(),n=e.prop("selected");r.push({value:t,text:i,isSelected:n})});var i=this.build(r);t.append(i)},events:function(){var a=this;client.$document.on("click",".custom-select__head",function(e){e.preventDefault();var t=$(this).closest("[data-custom-select]");t.hasClass("custom-select_opened")?a.close(t):(a.closeAll(),a.open(t))}),client.$document.on("click","[data-select-item-value]",function(e){e.preventDefault();var t=$(this),i=t.closest("[data-custom-select]"),n=i.find("select"),r=t.data("select-item-value"),o=t.data("select-item-text");a.setActiveItem(i,n,r,o),setTimeout(function(){t.siblings().removeClass("custom-select__item_hide"),t.addClass("custom-select__item_hide")},300)}),client.$document.on("click",function(e){$(e.target).hasClass("custom-select")||$(e.target).closest(".custom-select").length||a.closeAll()}),a.html.$elements.find("select").on("reinitSelect",function(){var e=$
1(this);a.rebuildSelect(e)})}},customSelect.init()},forms:function(){window.forms={init:function(){var e=forms;e.elements={$form:$("[data-form]")},e.elements.$form.find("input, textarea").each(function(){$(this).val().length&&$(this).closest(".fieldset").addClass("has-data")}),e.events()},onSubmit:function(e){var t=forms,i=e.serializeArray();t.validate(e,i)&&t.send(e,i)},onError:function(e,t){console.log(t);forms;modals.open(e.data("error-id"))},onSuccess:function(e,t){console.log(t);forms;modals.closeAll(),modals.open(e.data("success-id")),e[0].reset(),e.find(".focus").removeClass("focus has-error")},validate:function(e,t){console.log(t);forms;for(var i=1,n={name:function(e){return 2<e.length},email:function(e){return/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(String(e).toLowerCase())},message:function(e){return 5<e.length},phone:function(e){return 5<e.length}},r=t.length;r--;){var o=t[r],a=o.name,s=e.find("[name='"+a+"']"),l=s.data("required");if(void 0!==l&&!1!==l){var c=s.data("field-name"),u=o.value,h=s.closest(".fieldset");n.hasOwnProperty(c)&&(n[c](u)?h.removeClass("has-error"):(i=0,h.addClass("has-error")))}}var d=e.find('[data-field-name="agreement"]');if(d.length){h=d.closest(".fieldset");d.prop("checked")?h.removeClass("has-error"):(i=0,h.addClass("has-error"))}return i},send:function(t,e){var i=forms;$.ajax({type:t.attr("method"),url:t.attr("action"),data:e,success:function(e){1===e.status?i.onSuccess(t,e):i.onError(t,e)},error:function(e){i.onError(t,e)}})},events:function(){var i=forms;i.elements.$form.on("submit",function(e){e.preventDefault();var t=$(this).closest("form");i.onSubmit(t)}),i.elements.$form.find("input, textarea").focus(function(){$(this).closest(".fieldset").removeClass("has-error").addClass("focus")}),i.elements.$form.find("input, textarea").blur(function(){var e=$
1(this);e.closest(".fieldset").removeClass("focus"),e.val().length?e.closest(".fieldset").addClass("has-data"):e.closest(".fieldset").removeClass("has-data")}),i.elements.$form.find("input, textarea").on("keyup",function(){$(this).val().length?$(this).closest(".fieldset").addClass("has-data"):$(this).closest(".fieldset").removeClass("has-data")})}},forms.init()}},adaptive={init:function(){var e=adaptive;e.check(),e.events()},check:function(){var e=$(window).width();if(1920<=e){var t=e/1440;$("body").css("transform","scale("+t+")")}else $("body").css("transform","scale(1)")},events:function(){var e=adaptive;$(window).on("resize",function(){e.check()})}},sliders={init:function(){var e=sliders;e.elements={$slicks:$("[data-slick]")},e.elements.$slicks.slick(),e.events()},events:function(){}};modules.add("sliders");var sticky={init:function(){th=sticky,th.events()},events:function(){var e=$("[data-sticky-sidebar]"),t=$(window).width();e.stick_in_parent({offset_top:69}),t<767&&e.trigger("sticky_kit:detach")}};modules.add("sticky"),function(e,t){"function"==typeof define&&define.amd?define(t):"object"==typeof exports?module.exports=t():e.pickmeup=t()}(this,function(){function p(e){!function(e,t,i){var n,r;if(i=i||[],e instanceof Element)t.apply(t,[e].concat(i));else for(n=e.length,r=0;r<n;++r)t.apply(t,[e[r]].concat(i))}(e,function(e){e.parentElement.removeChild(e)})}function l(e,t){for(var i=e;(i=i.parentElement)&&!f(i,t););return i}function f(e,t){return(e.matches||e.webkitMatchesSelector||e.msMatchesSelector).call(e,t)}function y(e,t){return e&&e.classList.contains(t)}function x(e,t){e.classList.add(t)}function m(e,t){e.classList.remove(t)}function b(e,t){return e.querySelector(t)}function w(e,t){return Array.prototype.slice.call(e.querySelectorAll(t))}function g(e,t,i,n){if(-1!==i.indexOf(" ")){var r,o=i.split(" "),a=o.length;for(r=0;r<a;++r)g(e,t,o[r],n)}else e.__pickmeup.events.push([t,i,n]),t.addEventListener(i,n)}function c(e,t,i,n){var r,o,a;if(i&&-1!==i.indexOf(" "))for(o=(r=i.split(" ")).length,a=0;a<o;++a)c(e,t,r[a],n);else for(o=(r=e.__pickmeup.events).length,a=0;a<o;++a)t&&t!=r[a][0]||i&&i!=r[a][1]||n&&n!=r[a][2]||r[a][0].removeEventListener(r[a][1],r[a][2])}function _(e,t,i){var n=document.createEvent("Event");return i&&(n.detail=i),n.initEvent("pickmeup-"+t,!1,!0),e.dispatchEvent(n)}function n(e){for(var t=new Date(e),i=28,n=t.getMonth();t.getMonth()==n;)++i,t.setDate(i);return i-1}function T(e,t){e.setDate(e.getDate()+t)}function E(e,t){var i=e.getDate();e.setDate(1),e.setMonth(e.getMonth()+t),e.setDate(Math.min(i,n(e)))}function S(e,t){var i=e.getDate();e.setDate(1),e.setFullYear(e.getFullYear()+t),e.setDate(Math.min(i,n(e)))}function v(e,n){var t,i=n.format,r=n.separator,o=n.locales[n.locale];if(e instanceof Date||e instanceof Number)return M(new Date(e));if(!e)return M(new Date);if(e instanceof Array){for(e=e.slice(),t=0;t<e.length;++t)e[t]=v(e[t],n);return e}var a=e.split(r);if(1<a.length)return a.forEach(function(e,t,i){i[t]=v(e.trim(),n)}),a;r=(r=[].concat(o.daysShort,o.daysMin,o.days,o.monthsShort,o.months)).map(function(e){return"("+e+")"}),r=new RegExp("[^0-9a-zA-Z"+r.join("")+"]+");var s,l,c,u,h,d=e.split(r),p=i.split(r),f=new Date;for(t=0;t<d.length;t++)switch(p[t]){case"b":l=o.monthsShort.indexOf(d[t]);break;case"B":l=o.months.indexOf(d[t]);break;case"d":case"e":s=parseInt(d[t],10);break;case"m":l=parseInt(d[t],10)-1;break;case"Y":case"y":c=parseInt(d[t],10),c+=100<c?0:c<29?2e3:1900;break;case"H":case"I":case"k":case"l":u=parseInt(d[t],10);break;case"P":case"p":/pm/i.test(d[t])&&u<12?u+=12:/am/i.test(d[t])&&12<=u&&(u-=12);break;case"M":h=parseInt(d[t],10)}var m=new Date(void 0===c?f.getFullYear():c,void 0===l?f.getMonth():l,void 0===s?f.getDate():s,void 0===u?f.getHours():u,void 0===h?f.getMinutes():h,0);return isNaN(1*m)&&(m=new Date),M(m)}function M(e){return e.setHours(0,0,0,0),e}function A(e,t,i){var n,r,o=e.getMonth(),a=e.getDate(),s=e.getFullYear(),l=e.getDay(),c=e.getHours(),u=12<=c,h=u?c-12:c,d=(n=e,r=new Date(n.getFullYear(),n.getMonth(),n.getDate(),0,0,0)-new Date(n.getFullYear(),0,0,0,0,0),Math.floor(r/864e5));0==h&&(h=12);for(var p,f=e.getMinutes(),m=e.getSeconds(),g=t.split(""),v=0;v<g.length;v++){switch(p=g[v]){case"a":p=i.daysShort[l];break;case"A":p=i.days[l];break;case"b":p=i.monthsShort[o];break;case"B":p=i.months[o];break;case"C":p=1+Math.floor(s/100);break;case"d":p=a<10?"0"+a:a;break;case"e":p=a;break;case"H":p=c<10?"0"+c:c;break;case"I":p=h<10?"0"+h:h;break;case"j":p=d<100?d<10?"00"+d:"0"+d:d;break;case"k":p=c;break;case"l":p=h;break;case"m":p=o<9?"0"+(1+o):1+o;break;case"M":p=f<10?"0"+f:f;break;case"p":case"P":p=u?"PM":"AM";break;case"s":p=Math.floor(e.getTime()/1e3);break;case"S":p=m<10?"0"+m:m;break;case"u":p=l+1;break;case"w":p=l;break;case"y":p=(""+s).substr(2,2);break;case"Y":p=s}g[v]=p}return g.join("")}function u(i){var n;return"single"==i.mode?{formatted_date:A(n=new Date(i.date),i.format,i.locales[i.locale]),date:n}:(n={formatted_date:[],date:[]},i.date.forEach(function(e){var t=new Date(e);n.formatted_date.push(A(t,i.format,i.locales[i.locale])),n.date.push(t)}),n)}function h(e,t){var i,n,r=e.__pickmeup.element;if(t||y(r,"pmu-hidden")){var o=e.__pickmeup.options,a={top:(n=e.getBoundingClientRect()).top+window.pageYOffset-document.documentElement.clientTop,left:n.left+window.pageXOffset-document.documentElement.clientLeft},s=window.pageXOffset,l=window.pageYOffset,c=document.documentElement.clientWidth,u=document.documentElement.clientHeight,h=a.top,d=a.left;if(o.bound.fill(),f(e,"input")&&((i=e.value)&&o.bound.set_date(i),g(e,e,"keydown",function(e){9==e.which&&o.bound.hide()}),o.lastSel=!1),!_(e,"show"))return;if(!o.flat){if(m(r,"pmu-hidden"),o.position instanceof Function)d=(a=o.position.call(e)).left,h=a.top;else{switch(o.position){case"top":h-=r.offsetHeight;break;case"left":d-=r.offsetWidth;break;case"right":d+=e.offsetWidth;break;case"bottom":h+=e.offsetHeight}h+r.offsetHeight>l+u&&(h=a.top-r.offsetHeight),h<l&&(h=a.top+e.offsetHeight),d+r.offsetWidth>s+c&&(d=a.left-r.offsetWidth),d<s&&(d=a.left+e.offsetWidth),d+="px",h+="px"}r.style.left=d,r.style.top=h,setTimeout(function(){g(e,document.documentElement,"click",o.bound.hide),g(e,window,"resize",o.bound.forced_show)})}}}function d(e,t,i){return t&&e<t?new Date(t):i&&i<e?new Date(i):e}function C(e,t){if("string"==typeof e&&(e=document.querySelector(e)),!e)return null;if(!e.__pickmeup){var i,n,r={};for(i in t=t||{},C.defaults)r[i]=i in t?t[i]:C.defaults[i];for(i in r)null!==(n=e.getAttribute("data-pmu-"+i))&&(r[i]=n);"days"!=r.view||r.select_day||(r.view="months"),"months"!=r.view||r.select_month||(r.view="years"),"years"!=r.view||r.select_year||(r.view="days"),"days"!=r.view||r.select_day||(r.view="months"),r.calendars=Math.max(1,parseInt(r.calendars,10)||1),r.mode=/single|multiple|range/.test(r.mode)?r.mode:"single",r.min&&(r.min=v(r.min,r),r.select_day||r.min.setDate(1)),r.max&&(r.max=v(r.max,r),r.select_day||r.max.setDate(1));var o=document.createElement("div");e.__pickmeup={options:r,events:[],element:o},o.__pickmeup_target=e,x(o,"pickmeup"),r.class_name&&x(o,r.class_name),r.bound={fill:function(e){var f,t,m,i,n,r,o=e.__pickmeup.element,g=e.__pickmeup.options,a=Math.floor(g.calendars/2),v=g.date,s=g.current,l=g.min?new Date(g.min):null,c=g.max?new Date(g.max):null;l&&(l.setDate(1),E(l,1),T(l,-1)),c&&(c.setDate(1),E(c,1),T(c,-1)),p(w(o,".pmu-instance > :not(nav)"));for(var u=0;u<g.calendars;u++)M(f=new Date(s)),m=w(o,".pmu-instance")[u],y(o,"pmu-view-years")?(S(f,12*(u-a)),t=f.getFullYear()-6+" - "+(f.getFullYear()+5)):y(o,"pmu-view-months")?(S(f,u-a),t=f.getFullYear()):y(o,"pmu-view-days")&&(E(f,u-a),t=A(f,g.title_format,g.locales[g.locale])),!n&&c&&(r=new Date(f),g.select_day?E(r,g.calendars-1):g.select_month?S(r,g.calendars-1):S(r,12*(g.calendars-1)),c<r)?(--u,E(s,-1),n=void 0):(n=new Date(f),!i&&((i=new Date(f)).setDate(1),E(i,1),T(i,-1),l&&i<l)?(--u,E(s,1),i=void 0):(b(m,".pmu-month").textContent=t,function(){var e,t,i,n,r=[],o=f.getFullYear()-6,a=new Date(g.min).getFullYear(),s=new Date(g.max).getFullYear();for(i=0;i<12;++i)e=o+i,(t=document.createElement("div")).textContent=e,t.__pickmeup_year=e,g.min&&e<a||g.max&&s<e?x(t,"pmu-disabled"):(n=e,("range"==g.mode&&n>=new Date(v[0]).getFullYear()&&n<=new Date(v[1]).getFullYear()||"multiple"==g.mode&&-1!==v.reduce(function(e,t){return e.push(new Date(t).getFullYear()),e},[]).indexOf(n)||new Date(v).getFullYear()==n)&&x(t,"pmu-selected")),r.push(t);m.appendChild(g.instance_content_template(r,"pmu-years"))}(),function(){var e,t,i,n,r,o,a,s,l=[],c=f.getFullYear(),u=new Date(g.min).getFullYear(),h=new Date(g.min).getMonth(),d=new Date(g.max).getFullYear(),p=new Date(g.max).getMonth();for(e=0;e<12;++e)(t=document.createElement("div")).textContent=g.locales[g.locale].monthsShort[e],t.__pickmeup_month=e,t.__pickmeup_year=c,g.min&&(c<u||e<h&&c==u)||g.max&&(d<c||p<e&&d<=c)?x(t,"pmu-disabled"):(i=c,n=e,r=new Date(v[0]).getFullYear(),o=new Date(v[1]).getFullYear(),a=new Date(v[0]).getMonth(),s=new Date(v[1]).getMonth(),("range"==g.mode&&(r<i&&i<o||r<i&&i==o&&n<=s||i==r&&i<o&&a<=n||i==r&&i==o&&a<=n&&n<=s)||"multiple"==g.mode&&-1!==v.reduce(function(e,t){return t=new Date(t),e.push(t.getFullYear()+"-"+t.getMonth()),e},[]).indexOf(i+"-"+n)||new Date(v).getFullYear()==i&&new Date(v).getMonth()==n)&&x(t,"pmu-selected")),l.push(t);m.appendChild(g.instance_content_template(l,"pmu-months"))}(),function(){var e,t,i,n,r,o,a=[],s=f.getMonth(),l=M(new Date).valueOf();for(function(){f.setDate(1);var e=(f.getDay()-g.first_day)%7;T(f,-(e+(e<0?7:0)))}(),e=0;e<42;++e)(t=document.createElement("div")).textContent=f.getDate(),t.__pickmeup_day=f.getDate(),t.__pickmeup_month=f.getMonth(),t.__pickmeup_year=f.getFullYear(),s!=f.getMonth()&&x(t,"pmu-not-in-month"),0==f.getDay()?x(t,"pmu-su
1nday"):6==f.getDay()&&x(t,"pmu-saturday"),i=g.render(new Date(f))||{},n=M(new Date(f)).valueOf(),r=g.min&&g.min>f||g.max&&g.max<f,o=g.date.valueOf()==n||g.date instanceof Array&&g.date.reduce(function(e,t){return e||n===t.valueOf()},!1)||"range"==g.mode&&n>=g.date[0]&&n<=g.date[1],i.disabled||!("disabled"in i)&&r?x(t,"pmu-disabled"):(i.selected||!("selected"in i)&&o)&&x(t,"pmu-selected"),n==l&&x(t,"pmu-today"),i.class_name&&i.class_name.split(" ").forEach(x.bind(t,t)),a.push(t),T(f,1);m.appendChild(g.instance_content_template(a,"pmu-days"))}()));i.setDate(1),n.setDate(1),E(n,1),T(n,-1);var h=b(o,".pmu-prev"),d=b(o,".pmu-next");h&&(h.style.visibility=g.min&&g.min>=i?"hidden":"visible"),d&&(d.style.visibility=g.max&&g.max<=n?"hidden":"visible"),_(e,"fill")}.bind(e,e),update_date:function(e,t){var i,n=e.__pickmeup.options;M(t),function(){var e;switch(n.mode){case"multiple":for(e=t.valueOf(),i=0;i<n.date.length;++i)if(n.date[i].valueOf()===e)return n.date.splice(i,1);n.date.push(t);break;case"range":n.lastSel||(n.date[0]=t),t<=n.date[0]?(n.date[1]=n.date[0],n.date[0]=t):n.date[1]=t,n.lastSel=!n.lastSel;break;default:n.date=t.valueOf()}}();var r=u(n);f(e,"input")&&(e.value="single"==n.mode?r.formatted_date:r.formatted_date.join(n.separator)),_(e,"change",r),n.flat||!n.hide_on_select||"range"==n.mode&&n.lastSel||n.bound.hide()}.bind(e,e),click:function(e,t){var i=t.target;if(y(i,"pmu-button")||(i=l(i,".pmu-button")),!y(i,"pmu-button")||y(i,"pmu-disabled"))return!1;t.preventDefault(),t.stopPropagation();var n=e.__pickmeup.options,r=l(i,".pmu-instance"),o=r.parentElement,a=w(o,".pmu-instance").indexOf(r);if(f(i.parentElement,"nav"))y(i,"pmu-month")?(E(n.current,a-Math.floor(n.calendars/2)),y(o,"pmu-view-years")?("single"!=n.mode?n.current=new Date(n.date[n.date.length-1]):n.current=new Date(n.date),n.select_day?(m(o,"pmu-view-years"),x(o,"pmu-view-days")):n.select_month&&(m(o,"pmu-view-years"),x(o,"pmu-view-months"))):y(o,"pmu-view-months")?n.select_year?(m(o,"pmu-view-months"),x(o,"pmu-view-years")):n.select_day&&(m(o,"pmu-view-months"),x(o,"pmu-view-days")):y(o,"pmu-view-days")&&(n.select_month?(m(o,"pmu-view-days"),x(o,"pmu-view-months")):n.select_year&&(m(o,"pmu-view-days"),x(o,"pmu-view-years")))):y(i,"pmu-prev")?n.bound.prev(!1):n.bound.next(!1);else if(y(o,"pmu-view-years"))n.current.setFullYear(i.__pickmeup_year),n.select_month?(m(o,"pmu-view-years"),x(o,"pmu-view-months")):n.select_day?(m(o,"pmu-view-years"),x(o,"pmu-view-days")):n.bound.update_date(n.current);else if(y(o,"pmu-view-months"))n.current.setMonth(i.__pickmeup_month),n.current.setFullYear(i.__pickmeup_year),n.select_day?(m(o,"pmu-view-months"),x(o,"pmu-view-days")):n.bound.update_date(n.current),E(n.current,Math.floor(n.calendars/2)-a);else{var s=new Date(n.current);s.setYear(i.__pickmeup_year),s.setMonth(i.__pickmeup_month),s.setDate(i.__pickmeup_day),n.bound.update_date(s)}return n.bound.fill(),!0}.bind(e,e),show:h.bind(e,e),forced_show:h.bind(e,e,!0),hide:function(e,t){var i=e.__pickmeup.element,n=e.__pickmeup.options;t&&t.target&&(t.target==e||16&i.compareDocumentPosition(t.target))||_(e,"hide")&&(x(i,"pmu-hidden"),c(e,document.documentElement,"click",n.bound.hide),c(e,window,"resize",n.bound.forced_show),n.lastSel=!1)}.bind(e,e),update:function(e){var t=e.__pickmeup.options;c(e,document.documentElement,"click",t.bound.hide),c(e,window,"resize",t.bound.forced_show),t.bound.forced_show()}.bind(e,e),clear:function(e){var t=e.__pickmeup.options;"single"!=t.mode&&(t.date=[],t.lastSel=!1,t.bound.fill())}.bind(e,e),prev:function(e,t){void 0===t&&(t=!0);var i=e.__pickmeup.element,n=e.__pickmeup.options;y(i,"pmu-view-years")?S(n.current,-12):y(i,"pmu-view-months")?S(n.current,-1):y(i,"pmu-view-days")&&E(n.current,-1),t&&n.bound.fill()}.bind(e,e),next:function(e,t){void 0===t&&(t=!0);var i=e.__pickmeup.element,n=e.__pickmeup.options;y(i,"pmu-view-years")?S(n.current,12):y(i,"pmu-view-months")?S(n.current,1):y(i,"pmu-view-days")&&E(n.current,1),t&&n.bound.fill()}.bind(e,e),get_date:function(e,t){var i=e.__pickmeup.options,n=u(i);if("string"==typeof t){var r=n.date;return r instanceof Date?A(r,t,i.locales[i.locale]):r.map(function(e){return A(e,t,i.locales[i.locale])})}return n[t?"formatted_date":"date"]}.bind(e,e),set_date:function(e,t,i){var n,r=e.__pickmeup.options;if(!(t instanceof Array)||0<t.length)if(r.date=v(t,r),"single"!=r.mode)for(r.date instanceof Array?(r.date[0]=r.date[0]||v(new Date,r),"range"==r.mode&&(r.date[1]=r.date[1]||v(r.date[0],r))):(r.date=[r.date],"range"==r.mode&&r.date.push(v(r.date[0],r))),n=0;n<r.date.length;++n)r.date[n]=d(r.date[n],r.min,r.max);else r.date instanceof Array&&(r.date=r.date[0]),r.date=d(r.date,r.min,r.max);else r.date=[];
1if(!r.select_day)if(r.date instanceof Array)for(n=0;n<r.date.length;++n)r.date[n].setDate(1);else r.date.setDate(1);if("multiple"==r.mode)for(n=0;n<r.date.length;++n)r.date.indexOf(r.date[n])!==n&&(r.date.splice(n,1),--n);if(i?r.current=v(i,r):(i="single"===r.mode?r.date:r.date[r.date.length-1],r.current=i?new Date(i):new Date),r.current.setDate(1),r.bound.fill(),f(e,"input")&&!1!==r.default_date){var o=u(r),a=e.value,s="single"==r.mode?o.formatted_date:o.formatted_date.join(r.separator);a||_(e,"change",o),a!=s&&(e.value=s)}}.bind(e,e),destroy:function(e){var t=e.__pickmeup.element;c(e),p(t),delete e.__pickmeup}.bind(e,e)},x(o,"pmu-view-"+r.view);var a=r.instance_template(r),s="";for(i=0;i<r.calendars;++i)s+=a;o.innerHTML=s,g(e,o,"click",r.bound.click),g(e,o,"onselectstart"in Element.prototype?"selectstart":"mousedown",function(e){e.preventDefault()}),r.flat?(x(o,"pmu-flat"),e.appendChild(o)):(x(o,"pmu-hidden"),document.body.appendChild(o),g(e,e,"click",h.bind(e,e,!1)),g(e,e,"input",r.bound.update),g(e,e,"change",r.bound.update)),r.bound.set_date(r.date,r.current)}return{hide:(r=e.__pickmeup.options).bound.hide,show:r.bound.show,clear:r.bound.clear,update:r.bound.update,prev:r.bound.prev,next:r.bound.next,get_date:r.bound.get_date,set_date:r.bound.set_date,destroy:r.bound.destroy}}return C.defaults={current:null,date:new Date,default_date:new Date,flat:!1,first_day:1,prev:"◀",next:"▶",mode:"single",select_year:!0,select_month:!0,select_day:!0,view:"days",calendars:1,format:"d-m-Y",title_format:"B, Y",position:"bottom",class_name:"",separator:" - ",hide_on_select:!1,min:null,max:null,render:function(){},locale:"en",locales:{en:{days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],daysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],daysMin:["Su","Mo","Tu","We","Th","Fr","Sa"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],monthsShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]}},instance_template:function(e){var t=e.locales[e.locale].daysMin.slice();return e.first_day&&t.push(t.shift()),'<div class="pmu-instance"><nav><div class="pmu-prev pmu-button">'+e.prev+'</div><div class="pmu-month pmu-button"></div><div class="pmu-next pmu-button">'+e.next+'</div></nav><nav class="pmu-day-of-week"><div>'+t.join("</div><div>")+"</div></nav></div>"},instance_content_template:function(e,t){var i=document.createElement("div");x(i,t);for(var n=0;n<e.length;++n)x(e[n],"pmu-button"),i.appendChild(e[n]);return i}},C}),function(e){"object"==typeof module&&"object"==typeof module.exports?e(require("jquery"),window,document):"undefined"!=typeof jQuery&&e(jQuery,window,document)}(function(d,e,p,t){!function(){function c(e,t,i){return new Array(i+1-e.length).join(t)+e}function l(){if(1===arguments.length){var e=arguments[0];return"string"==typeof e&&(e=d.fn.timepicker.parseTime(e)),new Date(0,0,0,e.getHours(),e.getMinutes(),e.getSeconds())}return 3===arguments.length?new Date(0,0,0,arguments[0],arguments[1],arguments[2]):2===arguments.length?new Date(0,0,0,arguments[0],arguments[1],0):new Date(0,0,0)}var u,h;d.TimePicker=function(){var t=this;t.container=d(".ui-timepicker-container"),t.ui=t.container.find(".ui-timepicker"),0===t.container.length&&(t.container=d("<div></div>").addClass("ui-timepicker-container").addClass("ui-timepicker-hidden ui-helper-hidden").appendTo("body").hide(),t.ui=d("<div></div>").addClass("ui-timepicker").addClass("ui-widget ui-widget-content ui-menu").addClass("ui-corner-all").appendTo(t.container),t.viewport=d("<ul></ul>").addClass("ui-timepicker-viewport").appendTo(t.ui),"1.4.2"<=d.fn.jquery&&t.ui.delegate("a","mouseenter.timepicker",function(){t.activate(!1,d(this).parent())}).delegate("a","mouseleave.timepicker",function(){t.deactivate(!1)}).delegate("a","click.timepicker",function(e){e.preventDefault(),t.select(!1,d(this).parent())}))},d.TimePicker.count=0,d.TimePicker.instance=function(){return d.TimePicker._instance||(d.TimePicker._instance=new d.TimePicker),d.TimePicker._instance},d.TimePicker.prototype={keyCode:{ALT:18,BLOQ_MAYUS:20,CTRL:17,DOWN:40,END:35,ENTER:13,HOME:36,LEFT:37,NUMPAD_ENTER:108,PAGE_DOWN:34,PAGE_UP:33,RIGHT:39,SHIFT:16,TAB:9,UP:38},_items:function(e,t){var i,n,r=d("<ul></ul>"),o=null;for(-1===e.options.timeFormat.indexOf("m")&&e.options.interval%60!=0&&(e.options.interval=60*Math.max(Math.round(e.options.interval/60),1)),i=t?l(t):e.options.startTime?l(e.options.startTime):l(e.options.startHour,e.options.startMinutes),n=new Date(i.getTime()+864e5);i<n;)this._isValidTime(e,i)&&(o=d("<li>").addClass("ui-menu-item").appendTo(r),d("<a>").addClass("ui-corner-all").text(d.fn.timepicker.formatTime(e.options.timeFormat,i)).appendTo(o),o.data("time-value",i)),i=new Date(i.getTime()+60*e.options.interval*1e3);return r.children()},_isValidTime:function(e,t){var i=null,n=null;return t=l(t),null!==e.options.minTime?i=l(e.options.minTime):null===e.options.minHour&&null===e.options.minMinutes||(i=l(e.options.minHour,e.options.minMinutes)),null!==e.options.maxTime?n=l(e.options.maxTime):null===e.options.maxHour&&null===e.options.maxMinutes||(n=l(e.options.maxHour,e.options.maxMinutes)),null!==i&&null!==n?i<=t&&t<=n:null!==i?i<=t:null===n||t<=n},_hasScroll:function(){var e=void 0!==this.ui.prop?"prop":"attr";return this.ui.height()<this.ui[e]("scrollHeight")},_move:function(e,t,i){if(this.closed()&&this.open(e),this.active){var n=this.active[t+"All"](".ui-menu-item").eq(0);n.length?this.activate(e,n):this.activate(e,this.viewport.children(i))}else this.activate(e,this.viewport.children(i))},register:function(e,t){var i=this,n={};n.element=d(e),n.element.data("TimePicker")||(n.options=d.metadata?d.extend({},t,n.element.metadata()):d.extend({},t),n.widget=i,d.extend(n,{next:function(){return i.next(n)},previous:function(){return i.previous(n)},first:function(){return i.first(n)},last:function(){return i.last(n)},selected:function(){return i.selected(n)},open:function(){return i.open(n)},close:function(){return i.close(n)},closed:function(){return i.closed(n)},destroy:function(){return i.destroy(n)},parse:function(e){return i.parse(n,e)},format:function(e,t){return i.format(n,e,t)},getTime:function(){return i.getTime(n)},setTime:function(e,t){return i.setTime(n,e,t)},option:function(e,t){return i.option(n,e,t)}}),i._setDefaultTime(n),i._addInputEventsHandlers(n),n.element.data("TimePicker",n))},_setDefaultTime:function(e){"now"===e.options.defaultTime?e.setTime(l(new Date)):e.options.defaultTime&&e.options.defaultTime.getFullYear?e.setTime(l(e.options.defaultTime)):e.options.defaultTime&&e.setTime(d.fn.timepicker.parseTime(e.options.defaultTime))},_addInputEventsHandlers:function(t){var i=this;t.element.bind("keydown.timepicker",function(e){switch(e.which||e.keyCode){case i.keyCode.ENTER:case i.keyCode.NUMPAD_ENTER:e.preventDefault(),i.closed()?t.element.trigger("change.timepicker"):i.select(t,i.active);break;case i.keyCode.UP:t.previous();break;case i.keyCode.DOWN:t.next();break;default:i.closed()||t.close(!0)}}).bind("focus.timepicker",function(){t.open()}).bind("blur.timepicker",function(){setTimeout(function(){t.element.data("timepicker-user-clicked-outside")&&t.close()})}).bind("change.timepicker",function(){t.closed()&&t.setTime(d.fn.timepicker.parseTime(t.element.val()))})},select:function(e,t){var i=!1===e?this.instance:e;this.setTime(i,d.fn.timepicker.parseTime(t.children("a").text())),this.close(i,!0)},activate:function(e,t){var i=this;if((!1===e?i.instance:e)===i.instance){if(i.deactivate(),i._hasScroll()){var n=t.offset().top-i.ui.offset().top,r=i.ui.scrollTop(),o=i.ui.height();n<0?i.ui.scrollTop(r+n):o<=n&&i.ui.scrollTop(r+n-o+t.height())}i.active=t.eq(0).children("a").addClass("ui-state-hover").attr("id","ui-active-item").end()}},deactivate:function(){this.active&&(this.active.children("a").removeClass("ui-state-hover").removeAttr("id"),this.active=null)},next:function(e){return(this.closed()||this.instance===e)&&this._move(e,"next",".ui-menu-item:first"),e.element},previous:function(e){return(this.closed()||this.instance===e)&&this._move(e,"prev",".ui-menu-item:last"),e.element},first:function(e){return this.instance===e&&(this.active&&0===this.active.prevAll(".ui-menu-item").length)},last:function(e){return this.instance===e&&(this.active&&0===this.active.nextAll(".ui-menu-item").length)},selected:function(e){return this.instance===e&&this.active?this.active:null},open:function(t){var i=this,n=t.getTime(),e=t.options.dynamic&&n;if(!t.options.dropdown)return t.element;switch(t.element.data("timepicker-event-namespace",Math.random()),d(p).bind("click.timepicker-"+t.element.data("timepicker-event-namespace"),function(e){t.element.get(0)===e.target?t.element.data("timepicker-user-clicked-outside",!1):t.element.data("timepicker-user-clicked-outside",!0).blur()}),(t.rebuild||!t.items||e)&&(t.items=i._items(t,e?n:null)),(t.rebuild||i.instance!==t||e)&&(
1d.fn.jquery<"1.4.2"?(i.viewport.children().remove(),i.viewport.append(t.items),i.viewport.find("a").bind("mouseover.timepicker",function(){i.activate(t,d(this).parent())}).bind("mouseout.timepicker",function(){i.deactivate(t)}).bind("click.timepicker",function(e){e.preventDefault(),i.select(t,d(this).parent())})):(i.viewport.children().detach(),i.viewport.append(t.items))),t.rebuild=!1,i.container.removeClass("ui-helper-hidden ui-timepicker-hidden ui-timepicker-standard ui-timepicker-corners").show(),t.options.theme){case"standard":i.container.addClass("ui-timepicker-standard");break;case"standard-rounded-corners":i.container.addClass("ui-timepicker-standard ui-timepicker-corners")}i.container.hasClass("ui-timepicker-no-scrollbar")||t.options.scrollbar||(i.container.addClass("ui-timepicker-no-scrollbar"),i.viewport.css({paddingRight:40}));var r=i.container.outerHeight()-i.container.height(),o=t.options.zindex?t.options.zindex:t.element.offsetParent().css("z-index"),a=t.element.offset();i.container.css({top:a.top+t.element.outerHeight(),left:a.left}),i.container.show(),i.container.css({left:t.element.offset().left,height:i.ui.outerHeight()+r,width:t.element.outerWidth(),zIndex:o,cursor:"default"});var s=i.container.width()-(i.ui.outerWidth()-i.ui.width());return i.ui.css({width:s}),i.viewport.css({width:s}),t.items.css({width:s}),i.instance=t,n?t.items.each(function(){var e=d(this);return(d.fn.jquery<"1.4.2"?d.fn.timepicker.parseTime(e.find("a").text()):e.data("time-value")).getTime()!==n.getTime()||(i.activate(t,e),!1)}):i.deactivate(t),t.element},close:function(e){return this.instance===e&&(this.container.addClass("ui-helper-hidden ui-timepicker-hidden").hide(),this.ui.scrollTop(0),this.ui.children().removeClass("ui-state-hover")),d(p).unbind("click.timepicker-"+e.element.data("timepicker-event-namespace")),e.element},closed:function(){return this.ui.is(":hidden")},destroy:function(e){return this.close(e,!0),e.element.unbind(".timepicker").data("TimePicker",null)},parse:function(e,t){return d.fn.timepicker.parseTime(t)},format:function(e,t,i){return i=i||e.options.timeFormat,d.fn.timepicker.formatTime(i,t)},getTime:function(e){var t=d.fn.timepicker.parseTime(e.element.val());return t instanceof Date&&!this._isValidTime(e,t)?null:t instanceof Date&&e.selectedTime?e.format(t)===e.format(e.selectedTime)?e.selectedTime:t:t instanceof Date?t:null},setTime:function(e,t,i){var n=e.selectedTime;if("string"==typeof t&&(t=e.parse(t)),t&&t.getMinutes&&this._isValidTime(e,t)){if(t=l(t),e.selectedTime=t,e.element.val(e.format(t,e.options.timeFormat)),i)return e}else e.selectedTime=null;return null===n&&null===e.selectedTime||(e.element.trigger("time-change",[t]),d.isFunction(e.options.change)&&e.options.change.apply(e.element,[t])),e.element},option:function(t,e,i){if(void 0===i)return t.options[e];var n,r,o=t.getTime();"string"==typeof e?(n={})[e]=i:n=e,r=["minHour","minMinutes","minTime","maxHour","maxMinutes","maxTime","startHour","startMinutes","startTime","timeFormat","interval","dropdown"],d.each(n,function(e){t.options[e]=n[e],t.rebuild=t.rebuild||-1<d.inArray(e,r)}),t.rebuild&&t.setTime(o)}},d.TimePicker.defaults={timeFormat:"hh:mm p",minHour:null,minMinutes:null,minTime:null,maxHour:null,maxMinutes:null,maxTime:null,startHour:null,startMinutes:null,startTime:null,interval:30,dynamic:!0,theme:"standard",zindex:null,dropdown:!0,scrollbar:!1,change:function(){}},d.TimePicker.methods={chainable:["next","previous","open","close","destroy","setTime"]},d.fn.timepicker=function(t){if("string"==typeof t){var e,i,n=Array.prototype.slice.call(arguments,1);return i=this[e="option"===t&&2<arguments.length?"each":-1!==d.inArray(t,d.TimePicker.methods.chainable)?"each":"map"](function(){var e=d(this).data("TimePicker");if("object"==typeof e)return e[t].apply(e,n)}),"map"===e&&1===this.length?d.makeArray(i).shift():"map"===e?d.makeArray(i):i}if(1===this.length&&this.data("TimePicker"))return this.data("TimePicker");var r=d.extend({},d.TimePicker.defaults,t);return this.each(function(){d.TimePicker.instance().register(this,r)})},d.fn.timepicker.formatTime=function(e,t){var i=t.getHours(),n=i%12,r=t.getMinutes(),o=t.getSeconds(),a={hh:c((0===n?12:n).toString(),"0",2),HH:c(i.toString(),"0",2),mm:c(r.toString(),"0",2),ss:c(o.toString(),"0",2),h:0===n?12:n,H:i,m:r,s:o,p:11<i?"PM":"AM"},s=e,l="";for(l in a)a.hasOwnProperty(l)&&(s=s.replace(new RegExp(l,"g"),a[l]));
1return s=s.replace(new RegExp("a","g"),11<i?"pm":"am")},d.fn.timepicker.parseTime=(h=(u=[[/^(\d+)$/,"$1"],[/^:(\d)$/,"$10"],[/^:(\d+)/,"$1"],[/^(\d):([7-9])$/,"0$10$2"],[/^(\d):(\d\d)$/,"$1$2"],[/^(\d):(\d{1,})$/,"0$1$20"],[/^(\d\d):([7-9])$/,"$10$2"],[/^(\d\d):(\d)$/,"$1$20"],[/^(\d\d):(\d*)$/,"$1$2"],[/^(\d{3,}):(\d)$/,"$10$2"],[/^(\d{3,}):(\d{2,})/,"$1$2"],[/^(\d):(\d):(\d)$/,"0$10$20$3"],[/^(\d{1,2}):(\d):(\d\d)/,"$10$2$3"]]).length,function(e){var t,i,n=l(new Date),r=!1,o=!1,a=!1;if(void 0===e||!e.toLowerCase)return null;e=e.toLowerCase(),i=!(t=/a/.test(e))&&/p/.test(e),e=e.replace(/[^0-9:]/g,"").replace(/:+/g,":");for(var s=0;s<h;s+=1)if(u[s][0].test(e)){e=e.replace(u[s][0],u[s][1]);break}return 1===(e=e.replace(/:/g,"")).length?r=e:2===e.length?r=e:3===e.length||5===e.length?(r=e.substr(0,1),o=e.substr(1,2),a=e.substr(3,2)):(4===e.length||5<e.length)&&(r=e.substr(0,2),o=e.substr(2,2),a=e.substr(4,2)),0<e.length&&e.length<5&&(e.length<3&&(o=0),a=0),!1!==r&&!1!==o&&!1!==a&&(r=parseInt(r,10),o=parseInt(o,10),a=parseInt(a,10),t&&12===r?r=0:i&&r<12&&(r+=12),24<r?6<=e.length?d.fn.timepicker.parseTime(e.substr(0,5)):d.fn.timepicker.parseTime(e+"0"+(t?"a":"")+(i?"p":"")):(n.setHours(r,o,a),n))})}()});var mapStyle=[{featureType:"administrative",elementType:"labels.text.fill",stylers:[{color:"#444444"}]},{featureType:"landscape",elementType:"all",stylers:[{color:"#F4F5FB"}]},{featureType:"poi",elementType:"all",stylers:[{visibility:"off"}]},{featureType:"road",elementType:"all",stylers:[{saturation:-100},{lightness:45}]},{featureType:"road.highway",elementType:"all",stylers:[{visibility:"simplified"}]},{featureType:"road.arterial",elementType:"labels.icon",stylers:[{visibility:"off"}]},{featureType:"transit",elementType:"all",stylers:[{visibility:"off"}]},{featureType:"water",elementType:"all",stylers:[{color:"#c0e4f3"},{visibility:"on"}]}],map={init:function(){var e=map;e.elements={$map:$("#map")},e.elements.$map.length&&e.domLoaded()},check:function(){var e=map;e.api&&e.dom&&e.build()},build:function(){var e=map,t=e.elements.$map.data("map");e.map=new google.maps.Map(e.elements.$map[0],{center:{lat:t.center.lat,lng:t.center.lng},zoom:t.zoom,styles:mapStyle});var i={url:t.marker.icon,anchor:new google.maps.Point(36,36)};new google.maps.Marker({position:t.marker.position,map:e.map,icon:i})},apiLoaded:function(){var e=map;e.api=1,e.check()},domLoaded:function(){var e=map;e.dom=1,e.check()}};modules.add("map");var effect3d=function(){var n,r,o,a,s,l;null!=document.querySelectorAll(".card__place")[0]&&(Detector.webgl||Detector.addGetWebGLMessage(),function(){n=document.querySelectorAll(".card__place")[0],(o=new THREE.PerspectiveCamera(45,400/230,.1,2e3)).position.set(8,10,8),o.lookAt(new THREE.Vector3(0,3,0)),a=new THREE.Scene,r=new THREE.Clock;var e=new THREE.LoadingManager(function(){a.add(l)});new THREE.ColladaLoader(e).load("uploads/elf.dae",function(e){l=e.scene});var t=new THREE.AmbientLight(13421772,.4);a.add(t);var i=new THREE.DirectionalLight(16777215,.8);i.position.set(1,1,0).normalize(),a.add(i),(s=new THREE.WebGLRenderer({alpha:!0})).setPixelRatio(window.devicePixelRatio),s.setSize(400,230),n.appendChild(s.domElement),window.addEventListener("resize",c,!1)}(),function e(){requestAnimationFrame(e);!function(){var e=r.getDelta();void 0!==l&&(l.rotation.z+=.5*e);s.render(a,o)}()}());function c(){o.aspect=400/230,o.updateProjectionMatrix(),s.setSize(400,230)}};function pauseEvent(e){return e.stopPropagation&&e.stopPropagation(),e.preventDefault&&e.preventDefault(),e.cancelBubble=!0,e.returnValue=!1}$(document).ready(function(){1200<$(window).width()&&effect3d()});var labSubscriptions={init:function(){var e=labSubscriptions;e.elements={$body:$(".lab-subscriptions__body"),$list:$(".lab-subscriptions__list"),$value:$(".lab-subscriptions__value"),$progress:$(".lab-subscriptions__progress")},e.data={mouseX:0,startDragX:0,listWidth:0,progressWidth:400,currentX:0,staticX:0,percent:0,progressW:340},e.events(),e.start()},start:function(){var n=labSubscriptions,e=n.elements.$list.width();n.data.listWidth=e,n.data.diff=n.data.listWidth-client.windowW,e<=client.windowW||(n.diff=e-client.windowW,noUiSlider.create(n.elements.$progress[0],{start:[0],connect:!0,animate:!1,range:{min:0,max:1}}),n.elements.$progress[0].noUiSlider.on("update",function(e,t){var i=parseFloat(e[0]);n.data.percent=i,n.data.isMouseDown||n.updateList()}))},updateList:function(){var e=labSubscriptions,t=e.data.percent*-e.data.diff;e.elements.$list.css({"-moz-transform":"translate3d("+t+"px, 0, 1px)","-webkit-transform":"translate3d("+t+"px, 0, 1px)",transform:"translate3d("+t+"px, 0, 1px)"}),e.data.currentX=t},updateSlider:function(){var e=labSubscriptions;e.elements.$progress[0].noUiSlider.set(e.data.percent)}
1,drag:function(){var e=labSubscriptions,t=0,i=e.data.mouseX-e.data.startDragX;if(0<(t=e.data.staticX+i)&&(t/=5),t<-e.data.diff){var n=e.data.diff/5;t=-e.data.diff+(e.data.staticX+i)/5+n}e.elements.$list.css({"-moz-transform":"translate3d("+t+"px, 0, 1px)","-webkit-transform":"translate3d("+t+"px, 0, 1px)",transform:"translate3d("+t+"px, 0, 1px)"}),e.data.currentX=t,e.data.percent=-t/e.data.diff,e.data.isMouseDown&&e.updateSlider()},setToStart:function(){var e=labSubscriptions;e.elements.$list.css({"-moz-transform":"translate3d("+x+"px, 0, 1px)","-webkit-transform":"translate3d("+x+"px, 0, 1px)",transform:"translate3d(0px, 0, 1px)"}),e.data.currentX=0,e.data.percent=0,e.updateSlider()},setToEnd:function(){var e=labSubscriptions;e.elements.$list.css({"-moz-transform":"translate3d("+-e.data.diff+"px, 0, 1px)","-webkit-transform":"translate3d("+-e.data.diff+"px, 0, 1px)",transform:"translate3d("+-e.data.diff+"px, 0, 1px)"}),e.data.currentX=-e.data.diff,e.data.percent=1,e.updateSlider()},events:function(){var t=labSubscriptions;t.elements.$body.on("mousedown",function(){t.data.isMouseDown=1,t.data.startDragX=t.data.mouseX,t.data.staticX=t.data.currentX,t.elements.$progress.css("pointer-events","none")}),t.elements.$body.on("mousemove",function(e){t.data.mouseX=e.pageX,t.data.isMouseDown&&(pauseEvent(e=e||window.event),t.drag())}),t.elements.$body.on("mouseup",function(){t.data.isMouseDown=0,t.data.staticX=t.data.currentX,0<t.data.currentX&&t.setToStart(),t.data.currentX<-t.data.diff&&t.setToEnd(),t.elements.$progress.css("pointer-events","visible")}),t.elements.$body.on("mouseleave",function(){t.data.isMouseDown=0,t.data.staticX=t.data.currentX,0<t.data.currentX&&t.setToStart(),t.data.currentX<-t.data.diff&&t.setToEnd()}),t.elements.$body.on("dragstart",function(e){e.preventDefault()},!1),$(document).on("mousedown",".noUi-base",function(){t.data.focusList=0})}};modules.add("labSubscriptions");var cardAlone={init:function(){cardAlone.events()}
1,add:function(){var e=$(".for-whom__card");e.length%2==0||e.last().addClass("for-whom__card_alone")},events:function(){cardAlone.add()}};modules.add("cardAlone");var subscriptions={init:function(){var e=subscriptions;e.elements={$table:$(".subscriptions__table"),$td:$(".subscriptions .td"),$radio:$(".subscriptions input[type=radio]")},e.mods={tdHover:"td_hovered",tdActive:"td_active"},e.events();var t=e.elements.$table.find("input[type=radio][checked]").closest(".td").index();e.elements.$table.find(".td").removeClass(e.mods.tdActive),e.elements.$table.find(".td:nth-child("+(t+1)+")").addClass(e.mods.tdActive)},events:function(){var t=subscriptions;t.elements.$td.on("mouseenter",function(){var e=$(this).index();t.elements.$table.find(".td:nth-child("+(e+1)+")").addClass(t.mods.tdHover)}),t.elements.$td.on("mouseleave",function(){var e=$(this).index();t.elements.$table.find(".td:nth-child("+(e+1)+")").removeClass(t.mods.tdHover)}),t.elements.$radio.on("change",function(){var e=$(this).closest(".td").index();t.elements.$table.find(".td").removeClass(t.mods.tdActive),t.elements.$table.find(".td:nth-child("+(e+1)+")").addClass(t.mods.tdActive)})}};modules.add("subscriptions");var openCardCtrl={init:function(){openCardCtrl.events()},events:function(){$(document).on("click",".card__question",function(e){e.preventDefault(),e.target.parentElement.classList.toggleClass("card_active")})}};modules.add("openCardCtrl");var subscriptionsCardActive={init:function(){var e=subscriptionsCardActive;e.elements={$element1:$(".card")},e.events()},toChoose:function(e){e=e;var t=subscriptionsCardActive.elements.$element1;for(i=0;i<t.length;i++)value=t.eq(i).data("subscValue"),value==e&&(t.removeClass("card_active"),t.eq(i).addClass("card_active"))},events:function(){var i=subscriptionsCardActive;i.elements.$element1.eq(0).addClass("card_active"),$(document).on("click",".custom-select__item",function(e){e.preventDefault;var t=e.target.dataset.selectItemText;i.toChoose(t)})}};modules.add("subscriptionsCardActive");var openFormPass={init:function(){openFormPass.events()}
1,events:function(){var e=$("[data-open-password]");$(document).on("click",".form__change-pass-text",function(){e.toggleClass("fieldset_active"),$(".form__change-pass-text").toggleClass("form__change-pass-text_active")})}};modules.add("openFormPass");var header={init:function(){var e=header;e.elements={$langs:$(".langs"),$langsHead:$(".langs__head"),$langsBody:$(".langs__body"),$btnUser:$(".btn-user"),$btnUserHead:$(".btn-user__head"),$btnUserBody:$(".btn-user__body")},e.classes={langsActive:"langs_active",userActive:"btn-user_active"},e.events()},events:function(){var t=header;t.elements.$langsHead.on("click",function(){t.elements.$langs.hasClass(t.classes.langsActive)?t.elements.$langsBody.stop().slideUp(function(){t.elements.$langs.removeClass(t.classes.langsActive)}):t.elements.$langsBody.stop().slideDown(function(){t.elements.$langs.addClass(t.classes.langsActive)})}),t.elements.$btnUserHead.on("click",function(){t.elements.$btnUser.hasClass(t.classes.userActive)?t.elements.$btnUserBody.stop().slideUp(function(){t.elements.$btnUser.removeClass(t.classes.userActive)}):t.elements.$btnUserBody.stop().slideDown(function(){t.elements.$btnUser.addClass(t.classes.userActive)})}),$(document).on("click",function(e){$(e.target).hasClass(".langs")||$(e.target).closest(".langs").length||t.elements.$langsBody.stop().slideUp(function(){t.elements.$langs.removeClass(t.classes.langsActive)}),$(e.target).hasClass(".btn-user")||$(e.target).closest(".btn-user").length||t.elements.$btnUserBody.stop().slideUp(function(){t.elements.$btnUser.removeClass(t.classes.userActive)})})}};modules.add("header");var eventsDropdown={init:function(){var e=eventsDropdown;e.elements={$body:$("[data-category-dropdown]"),$category:$(".choose-category")},e.elements.$body.length&&e.events()},open:function(){var e=eventsDropdown;e.elements.$category.addClass("choose-category_opened"),e.elements.$body.show(500)},close:function(){var e=eventsDropdown;e.elements.$category.removeClass("choose-category_opened"),e.elements.$body.hide(500)},events:function(){var e=eventsDropdown;$(window).width()<1200?e.open():($(document).on("click","[data-open-category]",function(){e.elements.$category.hasClass("choose-category_opened")?e.close():e.open()}),$(document).on("click",".choose-category__close",function(){e.close()}))}},eventsInnerDropdown={init:function(){eventsInnerDropdown.events()},open:function(){$("[data-open-filters]");$(".calendar-of-events__inner").slideDown(900)},close:function(){$(".calendar-of-events__inner").slideUp(900)},events:function(){var e=eventsInnerDropdown;$(document).on("click touchstart","[data-open-filters]",function(){$("[data-open-filters]").addClass("invisible"),e.open()}),$(document).on("click touchstart","[data-close-filters]",function(){$("[data-open-filters]").removeClass("invisible"),e.close()})}},seetPlaces={init:function(){seetPlaces.events()},calcHeight:function(){for(var e,t,i,n,r=$(".card__number-first"),o=$(".card__number-second"),a=$(".card__line-bg"),s=$(".calendar-of-events__card"),l=0;l<r.length;l++)e=r.eq(l).text(),t=o.eq(l).text(),i=s.eq(l),Number(e),Number(t),e==t&&i.addClass("card_no-places"),n=e/t*100,a.eq(l).height(n+"%")},calcWidth:function(){for(var e,t,i,n,r=$(".card__number-first"),o=$(".card__number-second"),a=$(".card__line-bg"),s=$(".calendar-of-events__card"),l=0;l<r.length;l++)e=r.eq(l).text(),t=o.eq(l).text(),i=s.eq(l),Number(e),Number(t),e==t&&i.addClass("card_no-places"),n=e/t*100,a.eq(l).width(n+"%")},events:function(){var e=seetPlaces;1200<$(window).width()?e.calcHeight():e.calcWidth()}},calendarPickmeUp={init:function(){calendarPickmeUp.events()},events:function(){var n=$("[data-range]");pickmeup(".calendar__pick",{flat:!0,mode:"range",locales:{ua:{days:["ÐедÑлÑ","ÐонедÑлок","ÐÑвÑоÑок","СеÑеда","ЧеÑвеÑ","Ð'ÑÑниÑа","СÑбоÑа"],daysShort:["Ðдл","Ðнд","ÐÑÑ","СÑд","ЧÑв","ÐÑн","СбÑ"],daysMin:["Ðд","Ðн","ÐÑ","СÑ","ЧÑ","ÐÑ","Сб"],months:["СÑÑенÑ","ÐÑÑий","ÐеÑезенÑ","ÐвÑÑенÑ","ТÑавенÑ","ЧеÑвенÑ","ÐипенÑ","СеÑпенÑ","ÐеÑеÑенÑ","ÐовÑенÑ","ÐиÑÑопад","ÐÑÑденÑ"],monthsShort:["СÑÑ","ÐÑÑ","ÐеÑ","ÐвÑÑ","ТÑав","ЧеÑв","Ðип","СеÑп","ÐеÑ","ÐовÑ","ÐиÑÑ","ÐÑÑд"]}},locale:"ua",title_format:"B Y"}),$(".pmu-month.pmu-button").bind("click",function(){return!1});var r=$(".pmu-days > .pmu-button");n.on("click",function(e){n.removeClass("calendar__item_active"),r.removeClass("selected");var t=$(this);t.addClass("calendar__item_active");var i=t.data("range");null==i.date?pickmeup(".calendar__pick").set_date([i.from,i.to]):pickmeup(".calendar__pick").set_date(i.date)});var t=$(".calendar-of-events__button");t.on("click",function(e){t.removeClass("calendar-of-events__button_active"),$(this).addClass("calendar-of-events__button_active")})}},calendarDropDown={init:function(){var e=calendarDropDown;e.elements={$body:$("[data-calendar-dropdown]"),$calendar:$(".calendar")},e.events()},open:function(){var e=calendarDropDown;e.elements.$calendar.addClass("calendar_opened"),e.elements.$body.show(500)},close:function(){var e=calendarDropDown;e.elements.$calendar.removeClass("calendar_opened"),e.elements.$body.hide(500)},events:function(){var e=calendarDropDown;$(window).width()<1200?e.open():($(document).on("click","[data-open-calendar]",function(){e.elements.$calendar.hasClass("calendar_opened")?e.close():e.open()}),$(document).on("click",".calendar__close",function(){e.close()}))}},eventsMobileIcon={init:function(){var e=eventsMobileIcon;e.elements={$element1:$(".calendar-of-events__icon-mobile")},e.elements.$element1.length&&e.events()},open:function(){eventsMobileIcon.elements.$element1;$(".calendar-of-events__inner").slideDown(900)},show:function(){eventsMobileIcon.elements.$element1.addClass("active-icon")},hide:function(){eventsMobileIcon.elements.$element1.removeClass("active-icon")},getOffset:function(){var e=eventsMobileIcon;$(".calendar-of-events__filter").offset().top-$(document).scrollTop()<-16?e.show():e.hide()},events:function(){var e=eventsMobileIcon,t=$(window).width();$(document).on("click touchstart",".calendar-of-events__icon-mobile",function(){e.open(),$("[data-open-filters]").addClass("invisible"),$("html, body").stop().animate({scrollTop:203},500)}),t<587&&$(window).on("scroll",function(){e.getOffset()})}};modules.add("eventsDropdown"),modules.add("seetPlaces"),modules.add("calendarPickmeUp"),modules.add("calendarDropDown"),modules.add("eventsMobileIcon"),modules.add("eventsInnerDropdown");var equipBooking={init:function(){var e=equipBooking;e.elements={$body:$("[data-choose-time]"),$category:$(".choose-time")},e.events()},open:function(){var e=equipBooking;e.elements.$category.addClass("choose-time_opened"),e.elements.$body.show(500)},close:function(){var e=equipBooking;e.elements.$category.removeClass("choose-time_opened"),e.elements.$body.hide(500)},events:function(){var e=equipBooking;$(document).on("click","[data-open-time]",function(){e.elements.$category.hasClass("choose-time_opened")?e.close():e.open()}),$(document).on("click",".choose-time__close",function(){e.close()})}},inputTime={init:function(){inputTime.events()}
1,events:function(){var e=$(".choose-time__pick-1 > input"),t=$(".choose-time__pick-2 > input");$(document).ready(function(){e.timepicker({timeFormat:"HH:mm",interval:10,minTime:"10",maxTime:"10:00pm",defaultTime:"10",startTime:"10:00",dynamic:!0,dropdown:!0,scrollbar:!1})}),$(document).ready(function(){t.timepicker({timeFormat:"HH:mm",interval:10,minTime:"10",maxTime:"10:00pm",defaultTime:"10",startTime:"10:00",dynamic:!0,dropdown:!0,scrollbar:!1})})}},selectionEvents={init:function(){selectionEvents.events()},events:function(){var e=$(".choose-category__label-value"),t=$(".choose-category__value");e.on("click",function(){var e=$(this).text();t.text(e),eventsDropdown.close()})}},addCurrentDate={init:function(){var e=addCurrentDate;e.elements={$element0:$(".calendar__head-value_booking")},e.events()},findDate:function(){var e=addCurrentDate,t=new Date,i=t.getDate(),n=t.getMonth(),r=t.getFullYear(),o=e.elements.$element0;n<=9?o.text(i+".0"+n+"."+r):o.text(i+"."+n+"."+r)},events:function(){addCurrentDate.findDate()}};modules.add("equipBooking"),modules.add("inputTime"),modules.add("selectionEvents"),modules.add("addCurrentDate");var popularEquipment={init:function(){var e=popularEquipment;e.elements={$slider:$("[data-slick-tablet]")},e.data={options:e.elements.$slider.data("slick-tablet")},e.events(),e.check()},set:function(){var e=popularEquipment,t=e.elements.$slider;t.hasClass("slick-initialized")?t.slick("setPosition"):t.slick(e.data.options)},unset:function(){var e=popularEquipment.elements.$slider;e.hasClass("slick-initialized")&&e.slick("unslick")},check:function(){var e=popularEquipment;client.windowW<1201?e.set():e.unset()},events:function(){var e=popularEquipment;$(window).resize(e.check)}};modules.add("popularEquipment");var modalSearch={init:function(){var e=modalSearch;e.elements={$btnOpen:$("[data-open-search]"),$btnClose:$("[data-close-search]"),$modal:$(".modal-search"),$input:$(".modal-search__input")},e.classes={modalActive:"modal-search_active"},e.events()},open:function(){var e=modalSearch;e.elements.$modal.addClass(e.classes.modalActive),e.elements.$input.focus(),panelMenu.close()},close:function(){var e=modalSearch;e.elements.$modal.removeClass(e.classes.modalActive),e.elements.$input.blur()},events:function(){var e=modalSearch;e.elements.$btnOpen.on("click",function(){e.open()}),e.elements.$btnClose.on("click",function(){e.close()})}};modules.add("modalSearch");var panelMenu={init:function(){var e=panelMenu;e.elements={$panel:$(".panel-menu"),$btnOpen:$(".btn-menu"),$btnClose:$(".panel-menu__close")},e.classes={activePanel:"panel-menu_active"},e.events()},open:function(){var e=panelMenu;e.elements.$panel.addClass(e.classes.activePanel)},close:function(){var e=panelMenu;e.elements.$panel.removeClass(e.classes.activePanel)},events:function(){var e=panelMenu;e.elements.$btnOpen.on("click",function(){e.open()}),e.elements.$btnClose.on("click",function(){e.close()})}};modules.add("panelMenu");var border={init:function(){var e=border;e.elements={$border:$(".border"),$sections:$("[data-section-color]:visible")},e.mods={dark:"border_dark",light:"border_light"},e.data={isDark:0,positions:[]},e.events(),$(document).on("preloaderDone",function(){e.getSizes(),e.check(!0)})},set:function(e){var t=border;t.elements.$border.removeClass(t.mods.dark+" "+t.mods.light).addClass(e),e===t.mods.dark?t.data.isDark=1:t.data.isDark=0},getSizes:function(){var i=border;$(window).scrollTop();i.data.positions=[],i.elements.$sections=$("[data-section-color]:visible"),i.elements.$sections.each(function(e){var t=$(this).offset().top;i.data.positions.push(t)}),i.data.positions.push($(document).height())},check:function(e){for(var t,i=border,n=$(window).scrollTop(),r=window.innerHeight,o=0;o<i.data.positions.length;o++){if(n+r/2<i.data.positions[o]){t=i.elements.$sections.eq(o-1);break}}var a="dark";t&&(a=t.data("section-color")),e?"dark"===a?i.set(i.mods.dark):i.set(i.mods.light):("dark"!==a||i.data.isDark||i.set(i.mods.dark),"light"===a&&i.data.isDark&&i.set(i.mods.light))},events:function(){var e=border;$(window).on("scroll",function(){e.check()}),$(window).on("resize",function(){e.getSizes(),e.check()}),window.addEventListener("orientationchange",function(){e.getSizes(),e.check()},!1)}};modules.add("border");var app={init:function(){tools.init(["backgrounds","tabs","modals","forms","select","preloader"]),modules.init()}};$(document).ready(function(){app.init()});
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.