text: !function(t){function e(r){if(n[r])return n[r].exports;var i=n[r]={exports:{},id:r,loaded:!1};return t[r].call(i.exports,i,i.exports,e),i.loaded=!0,i.exports}var n={};return e.m=t,e.c=n,e.p="",e(0)}([function(t,e,n){t.exports=n(126)},function(t,e,n){var r=n(3),i=n(25),o=n(13),a=n(14),s=n(26),c="prototype",u=function(t,e,n){var l,h,f,p,d=t&u.F,m=t&u.G,v=t&u.S,g=t&u.P,y=t&u.B,x=m?r:v?r[e]||(r[e]={}):(r[e]||{})[c],_=m?i:i[e]||(i[e]={}),w=_[c]||(_[c]={});m&&(n=e);for(l in n)h=!d&&x&&void 0!==x[l],f=(h?x:n)[l],p=y&&h?s(f,r):g&&"function"==typeof f?s(Function.call,f):f,x&&a(x,l,f,t&u.U),_[l]!=f&&o(_,l,p),g&&w[l]!=f&&(w[l]=f)};r.core=i,u.F=1,u.G=2,u.S=4,u.P=8,u.B=16,u.W=32,u.U=64,u.R=128,t.exports=u},function(t,e,n){var r=n(5);t.exports=function(t){if(!r(t))throw TypeError(t+" is not an object!");return t}},function(t,e){var n=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(t,e){t.exports=function(t){try{return!!t()}catch(e){return!0}}},function(t,e){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(t,e,n){var r=n(59)("wks"),i=n(40),o=n(3).Symbol,a="function"==typeof o,s=t.exports=function(t){return r[t]||(r[t]=a&&o[t]||(a?o:i)("Symbol."+t))};s.store=r},function(t,e,n){t.exports=!n(4)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(t,e,n){var r=n(2),i=n(98),o=n(24),a=Object.defineProperty;e.f=n(7)?Object.defineProperty:function(t,e,n){if(r(t),e=o(e,!0),r(n),i)try{return a(t,e,n)}catch(s){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(t[e]=n.value),t}},function(t,e,n){var r=n(31),i=Math.min;t.exports=function(t){return t>0?i(r(t),9007199254740991):0}},function(t,e,n){var r=n(20);t.exports=function(t){return Object(r(t))}},function(t,e){var n={}.hasOwnProperty;t.exports=function(t,e){return n.call(t,e)}},function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},function(t,e,n){var r=n(8),i=n(30);t.exports=n(7)?function(t,e,n){return r.f(t,e,i(1,n))}:function(t,e,n){return t[e]=n,t}},function(t,e,n){var r=n(3),i=n(13),o=n(11),a=n(40)("src"),s="toString",c=Function[s],u=(""+c).split(s);n(25).inspectSource=function(t){return c.call(t)},(t.exports=function(t,e,n,s){var c="function"==typeof n;c&&(o(n,"name")||i(n,"name",e)),t[e]!==n&&(c&&(o(n,a)||i(n,a,t[e]?""+t[e]:u.join(String(e)))),t===r?t[e]=n:s?t[e]?t[e]=n:i(t,e,n):(delete t[e],i(t,e,n)))})(Function.prototype,s,function(){return"function"==typeof this&&this[a]||c.call(this)})},function(t,e,n){var r=n(1),i=n(4),o=n(20),a=/"/g,s=function(t,e,n,r){var i=String(o(t)),s="<"+e;return""!==n&&(s+=" "+n+'="'+String(r).replace(a,"&quot;")+'"'),s+">"+i+"</"+e+">"};t.exports=function(t,e){var n={};n[t]=e(s),r(r.P+r.F*i(function(){var e=""[t]('"');return e!==e.toLowerCase()||e.split('"').length>3}),"String",n)}},function(t,e,n){var r=n(47),i=n(20);t.exports=function(t){return r(i(t))}},function(t,e,n){var r=n(48),i=n(30),o=n(16),a=n(24),s=n(11),c=n(98),u=Object.getOwnPropertyDescriptor;e.f=n(7)?u:function(t,e){if(t=o(t),e=a(e,!0),c)try{return u(t,e)}catch(n){}if(s(t,e))return i(!r.f.call(t,e),t[e])}},function(t,e,n){var r=n(11),i=n(10),o=n(78)("IE_PROTO"),a=Object.prototype;t.exports=Object.getPrototypeOf||function(t){return t=i(t),r(t,o)?t[o]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?a:null}},function(t,e){var n={}.toString;t.exports=function(t){return n.call(t).slice(8,-1)}},function(t,e){t.exports=function(t){if(void 0==t)throw TypeError("Can't call method on  "+t);return t}},function(t,e,n){var r=n(4);t.exports=function(t,e){return!!t&&r(function(){e?t.call(null,function(){},1):t.call(null)})}},function(t,e,n){var r=n(26),i=n(47),o=n(10),a=n(9),s=n(134);t.exports=function(t,e){var n=1==t,c=2==t,u=3==t,l=4==t,h=6==t,f=5==t||h,p=e||s;return function(e,s,d){for(var m,v,g=o(e),y=i(g),x=r(s,d,3),_=a(y.length),w=0,b=n?p(e,_):c?p(e,0):void 0;_>w;w++)if((f||w in y)&&(m=y[w],v=x(m,w,g),t))if(n)b[w]=v;else if(v)switch(t){case 3:return!0;case 5:return m;case 6:return w;case 2:b.push(m)}else if(l)return!1;return h?-1:u||l?l:b}}},function(t,e,n){var r=n(1),i=n(25),o=n(4);t.exports=function(t,e){var n=(i.Object||{})[t]||Object[t],a={};a[t]=e(n),r(r.S+r.F*o(function(){n(1)}),"Object",a)}},function(t,e,n){var r=n(5);t.exports=function(t,e){if(!r(t))return t;var n,i;if(e&&"function"==typeof(n=t.toString)&&!r(i=n.call(t)))return i;if("function"==typeof(n=t.valueOf)&&!r(i=n.call(t)))return i;if(!e&&"function"==typeof(n=t.toString)&&!r(i=n.call(t)))return i;throw TypeError("Can't convert object to primitive value")}},function(t,e){var n=t.exports={version:"2.4.0"};"number"==typeof __e&&(__e=n)},function(t,e,n){var r=n(12);t.exports=function(t,e,n){if(r(t),void 0===e)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,i){return t.call(e,n,r,i)}}return function(){return t.apply(e,arguments)}}},function(t,e,n){var r=n(114),i=n(1),o=n(59)("metadata"),a=o.store||(o.store=new(n(117))),s=function(t,e,n){var i=a.get(t);if(!i){if(!n)return;a.set(t,i=new r)}var o=i.get(e);if(!o){if(!n)return;i.set(e,o=new r)}return o},c=function(t,e,n){var r=s(e,n,!1);return void 0!==r&&r.has(t)},u=function(t,e,n){var r=s(e,n,!1);return void 0===r?void 0:r.get(t)},l=function(t,e,n,r){s(n,r,!0).set(t,e)},h=function(t,e){var n=s(t,e,!1),r=[];return n&&n.forEach(function(t,e){r.push(e)}),r},f=function(t){return void 0===t||"symbol"==typeof t?t:String(t)},p=function(t){i(i.S,"Reflect",t)};t.exports={store:a,map:s,has:c,get:u,set:l,keys:h,key:f,exp:p}},function(t,e,n){"use strict";if(n(7)){var r=n(33),i=n(3),o=n(4),a=n(1),s=n(60),c=n(85),u=n(26),l=n(32),h=n(30),f=n(13),p=n(37),d=n(31),m=n(9),v=n(39),g=n(24),y=n(11),x=n(111),_=n(46),w=n(5),b=n(10),M=n(70),E=n(34),S=n(18),T=n(35).f,A=n(87),L=n(40),C=n(6),P=n(22),R=n(50),I=n(79),O=n(88),U=n(43),N=n(56),F=n(38),D=n(63),z=n(91),B=n(8),k=n(17),j=B.f,G=k.f,V=i.RangeError,H=i.TypeError,W=i.Uint8Array,X="ArrayBuffer",q="Shared"+X,Y="BYTES_PER_ELEMENT",Z="prototype",J=Array[Z],$=c.ArrayBuffer,K=c.DataView,Q=P(0),tt=P(2),et=P(3),nt=P(4),rt=P(5),it=P(6),ot=R(!0),at=R(!1),st=O.values,ct=O.keys,ut=O.entries,lt=J.lastIndexOf,ht=J.reduce,ft=J.reduceRight,pt=J.join,dt=J.sort,mt=J.slice,vt=J.toString,gt=J.toLocaleString,yt=C("iterator"),xt=C("toStringTag"),_t=L("typed_constructor"),wt=L("def_constructor"),bt=s.CONSTR,Mt=s.TYPED,Et=s.VIEW,St="Wrong length!",Tt=P(1,function(t,e){return It(I(t,t[wt]),e)}),At=o(function(){return 1===new W(new Uint16Array([1]).buffer)[0]}),Lt=!!W&&!!W[Z].set&&o(function(){new W(1).set({})}),Ct=function(t,e){if(void 0===t)throw H(St);var n=+t,r=m(t);if(e&&!x(n,r))throw V(St);return r},Pt=function(t,e){var n=d(t);if(n<0||n%e)throw V("Wrong offset!");return n},Rt=function(t){if(w(t)&&Mt in t)return t;throw H(t+" is not a typed array!")},It=function(t,e){if(!(w(t)&&_t in t))throw H("It is not a typed array constructor!");return new t(e)},Ot=function(t,e){return Ut(I(t,t[wt]),e)},Ut=function(t,e){for(var n=0,r=e.length,i=It(t,r);r>n;)i[n]=e[n++];return i},Nt=function(t,e,n){j(t,e,{get:function(){return this._d[n]}})},Ft=function(t){var e,n,r,i,o,a,s=b(t),c=arguments.length,l=c>1?arguments[1]:void 0,h=void 0!==l,f=A(s);if(void 0!=f&&!M(f)){for(a=f.call(s),r=[],e=0;!(o=a.next()).done;e++)r.push(o.value);s=r}for(h&&c>2&&(l=u(l,arguments[2],2)),e=0,n=m(s.length),i=It(this,n);n>e;e++)i[e]=h?l(s[e],e):s[e];return i},Dt=function(){for(var t=0,e=arguments.length,n=It(this,e);e>t;)n[t]=arguments[t++];return n},zt=!!W&&o(function(){gt.call(new W(1))}),Bt=function(){return gt.apply(zt?mt.call(Rt(this)):Rt(this),arguments)},kt={copyWithin:function(t,e){return z.call(Rt(this),t,e,arguments.length>2?arguments[2]:void 0)},every:function(t){return nt(Rt(this),t,arguments.length>1?arguments[1]:void 0)},fill:function(t){return D.apply(Rt(this),arguments)},filter:function(t){return Ot(this,tt(Rt(this),t,arguments.length>1?arguments[1]:void 0))},find:function(t){return rt(Rt(this),t,arguments.length>1?arguments[1]:void 0)},findIndex:function(t){return it(Rt(this),t,arguments.length>1?arguments[1]:void 0)},forEach:function(t){Q(Rt(this),t,arguments.length>1?arguments[1]:void 0)},indexOf:function(t){return at(Rt(this),t,arguments.length>1?arguments[1]:void 0)},includes:function(t){return ot(Rt(this),t,arguments.length>1?arguments[1]:void 0)},join:function(t){return pt.apply(Rt(this),arguments)},lastIndexOf:function(t){return lt.apply(Rt(this),arguments)},map:function(t){return Tt(Rt(this),t,arguments.length>1?arguments[1]:void 0)},reduce:function(t){return ht.apply(Rt(this),arguments)},reduceRight:function(t){return ft.apply(Rt(this),arguments)},reverse:function(){for(var t,e=this,n=Rt(e).length,r=Math.floor(n/2),i=0;i<r;)t=e[i],e[i++]=e[--n],e[n]=t;return e},some:function(t){return et(Rt(this),t,arguments.length>1?arguments[1]:void 0)},sort:function(t){return dt.call(Rt(this),t)},subarray:function(t,e){var n=Rt(this),r=n.length,i=v(t,r);return new(I(n,n[wt]))(n.buffer,n.byteOffset+i*n.BYTES_PER_ELEMENT,m((void 0===e?r:v(e,r))-i))}},jt=function(t,e){return Ot(this,mt.call(Rt(this),t,e))},Gt=function(t){Rt(this);var e=Pt(arguments[1],1),n=this.length,r=b(t),i=m(r.length),o=0;if(i+e>n)throw V(St);for(;o<i;)this[e+o]=r[o++]},Vt={entries:function(){return ut.call(Rt(this))},keys:function(){return ct.call(Rt(this))},values:function(){return st.call(Rt(this))}},Ht=function(t,e){return w(t)&&t[Mt]&&"symbol"!=typeof e&&e in t&&String(+e)==String(e)},Wt=function(t,e){return Ht(t,e=g(e,!0))?h(2,t[e]):G(t,e)},Xt=function(t,e,n){return!(Ht(t,e=g(e,!0))&&w(n)&&y(n,"value"))||y(n,"get")||y(n,"set")||n.configurable||y(n,"writable")&&!n.writable||y(n,"enumerable")&&!n.enumerable?j(t,e,n):(t[e]=n.value,t)};bt||(k.f=Wt,B.f=Xt),a(a.S+a.F*!bt,"Object",{getOwnPropertyDescriptor:Wt,defineProperty:Xt}),o(function(){vt.call({})})&&(vt=gt=function(){return pt.call(this)});var qt=p({},kt);p(qt,Vt),f(qt,yt,Vt.values),p(qt,{slice:jt,set:Gt,constructor:function(){},toString:vt,toLocaleString:Bt}),Nt(qt,"buffer","b"),Nt(qt,"byteOffset","o"),Nt(qt,"byteLength","l"),Nt(qt,"length","e"),j(qt,xt,{get:function(){return this[Mt]}}),t.exports=function(t,e,n,c){c=!!c;var u=t+(c?"Clamped":"")+"Array",h="Uint8Array"!=u,p="get"+t,d="set"+t,v=i[u],g=v||{},y=v&&S(v),x=!v||!s.ABV,b={},M=v&&v[Z],A=function(t,n){var r=t._d;return r.v[p](n*e+r.o,At)},L=function(t,n,r){var i=t._d;c&&(r=(r=Math.round(r))<0?0:r>255?255:255&r),i.v[d](n*e+i.o,r,At)},C=function(t,e){j(t,e,{get:function(){return A(this,e)},set:function(t){return L(this,e,t)},enumerable:!0})};x?(v=n(function(t,n,r,i){l(t,v,u,"_d");var o,a,s,c,h=0,p=0;if(w(n)){if(!(n instanceof $||(c=_(n))==X||c==q))return Mt in n?Ut(v,n):Ft.call(v,n);o=n,p=Pt(r,e);var d=n.byteLength;if(void 0===i){if(d%e)throw V(St);if(a=d-p,a<0)throw V(St)}else if(a=m(i)*e,a+p>d)throw V(St);s=a/e}else s=Ct(n,!0),a=s*e,o=new $(a);for(f(t,"_d",{b:o,o:p,l:a,e:s,v:new K(o)});h<s;)C(t,h++)}),M=v[Z]=E(qt),f(M,"constructor",v)):N(function(t){new v(null),new v(t)},!0)||(v=n(function(t,n,r,i){l(t,v,u);var o;return w(n)?n instanceof $||(o=_(n))==X||o==q?void 0!==i?new g(n,Pt(r,e),i):void 0!==r?new g(n,Pt(r,e)):new g(n):Mt in n?Ut(v,n):Ft.call(v,n):new g(Ct(n,h))}),Q(y!==Function.prototype?T(g).concat(T(y)):T(g),function(t){t in v||f(v,t,g[t])}),v[Z]=M,r||(M.constructor=v));var P=M[yt],R=!!P&&("values"==P.name||void 0==P.name),I=Vt.values;f(v,_t,!0),f(M,Mt,u),f(M,Et,!0),f(M,wt,v),(c?new v(1)[xt]==u:xt in M)||j(M,xt,{get:function(){return u}}),b[u]=v,a(a.G+a.W+a.F*(v!=g),b),a(a.S,u,{BYTES_PER_ELEMENT:e,from:Ft,of:Dt}),Y in M||f(M,Y,e),a(a.P,u,kt),F(u),a(a.P+a.F*Lt,u,{set:Gt}),a(a.P+a.F*!R,u,Vt),a(a.P+a.F*(M.toString!=vt),u,{toString:vt}),a(a.P+a.F*o(function(){new v(1).slice()}),u,{slice:jt}),a(a.P+a.F*(o(function(){return[1,2].toLocaleString()!=new v([1,2]).toLocaleString()})||!o(function(){M.toLocaleString.call([1,2])})),u,{toLocaleString:Bt}),U[u]=R?P:I,r||R||f(M,yt,I)}}else t.exports=function(){}},function(t,e,n){var r=n(40)("meta"),i=n(5),o=n(11),a=n(8).f,s=0,c=Object.isExtensible||function(){return!0},u=!n(4)(function(){return c(Object.preventExtensions({}))}),l=function(t){a(t,r,{value:{i:"O"+ ++s,w:{}}})},h=function(t,e){if(!i(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!o(t,r)){if(!c(t))return"F";if(!e)return"E";l(t)}return t[r].i},f=function(t,e){if(!o(t,r)){if(!c(t))return!0;if(!e)return!1;l(t)}return t[r].w},p=function(t){return u&&d.NEED&&c(t)&&!o(t,r)&&l(t),t},d=t.exports={KEY:r,NEED:!1,fastKey:h,getWeak:f,onFreeze:p}},function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},function(t,e){var n=Math.ceil,r=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?r:n)(t)}},function(t,e){t.exports=function(t,e,n,r){if(!(t instanceof e)||void 0!==r&&r in t)throw TypeError(n+": incorrect invocation!");return t}},function(t,e){t.exports=!1},function(t,e,n){var r=n(2),i=n(104),o=n(66),a=n(78)("IE_PROTO"),s=function(){},c="prototype",u=function(){var t,e=n(65)("iframe"),r=o.length,i="<",a=">";for(e.style.display="none",n(68).appendChild(e),e.src="javascript:",t=e.contentWindow.document,t.open(),t.write(i+"script"+a+"document.F=Object"+i+"/script"+a),t.close(),u=t.F;r--;)delete u[c][o[r]];return u()};t.exports=Object.create||function(t,e){var n;return null!==t?(s[c]=r(t),n=new s,s[c]=null,n[a]=t):n=u(),void 0===e?n:i(n,e)}},function(t,e,n){var r=n(106),i=n(66).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return r(t,i)}},function(t,e,n){var r=n(106),i=n(66);t.exports=Object.keys||function(t){return r(t,i)}},function(t,e,n){var r=n(14);t.exports=function(t,e,n){for(var i in e)r(t,i,e[i],n);return t}},function(t,e,n){"use strict";var r=n(3),i=n(8),o=n(7),a=n(6)("species");t.exports=function(t){var e=r[t];o&&e&&!e[a]&&i.f(e,a,{configurable:!0,get:function(){return this}})}},function(t,e,n){var r=n(31),i=Math.max,o=Math.min;t.exports=function(t,e){return t=r(t),t<0?i(t+e,0):o(t,e)}},function(t,e){var n=0,r=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++n+r).toString(36))}},function(t,e,n){var r=n(6)("unscopables"),i=Array.prototype;void 0==i[r]&&n(13)(i,r,{}),t.exports=function(t){i[r][t]=!0}},function(t,e,n){var r=n(26),i=n(100),o=n(70),a=n(2),s=n(9),c=n(87),u={},l={},e=t.exports=function(t,e,n,h,f){var p,d,m,v,g=f?function(){return t}:c(t),y=r(n,h,e?2:1),x=0;if("function"!=typeof g)throw TypeError(t+" is not iterable!");if(o(g)){for(p=s(t.length);p>x;x++)if(v=e?y(a(d=t[x])[0],d[1]):y(t[x]),v===u||v===l)return v}else for(m=g.call(t);!(d=m.next()).done;)if(v=i(m,y,d.value,e),v===u||v===l)return v};e.BREAK=u,e.RETURN=l},function(t,e){t.exports={}},function(t,e,n){var r=n(8).f,i=n(11),o=n(6)("toStringTag");t.exports=function(t,e,n){t&&!i(t=n?t:t.prototype,o)&&r(t,o,{configurable:!0,value:e})}},function(t,e,n){var r=n(1),i=n(20),o=n(4),a=n(83),s="["+a+"]",c="​",u=RegExp("^"+s+s+"*"),l=RegExp(s+s+"*$"),h=function(t,e,n){var i={},s=o(function(){return!!a[t]()||c[t]()!=c}),u=i[t]=s?e(f):a[t];n&&(i[n]=u),r(r.P+r.F*s,"String",i)},f=h.trim=function(t,e){return t=String(i(t)),1&e&&(t=t.replace(u,"")),2&e&&(t=t.replace(l,"")),t};t.exports=h},function(t,e,n){var r=n(19),i=n(6)("toStringTag"),o="Arguments"==r(function(){return arguments}()),a=function(t,e){try{return t[e]}catch(n){}};t.exports=function(t){var e,n,s;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=a(e=Object(t),i))?n:o?r(e):"Object"==(s=r(e))&&"function"==typeof e.callee?"Arguments":s}},function(t,e,n){var r=n(19);t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==r(t)?t.split(""):Object(t)}},function(t,e){e.f={}.propertyIsEnumerable},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}Object.defineProperty(e,"__esModule",{value:!0});var i=n(89);Object.defineProperty(e,"_",{enumerable:!0,get:function(){return r(i)["default"]}});var o=n(118);Object.defineProperty(e,"$",{enumerable:!0,get:function(){return r(o)["default"]}});var a=n(125);Object.defineProperty(e,"BaseObject",{enumerable:!0,get:function(){return r(a)["default"]}})},function(t,e,n){var r=n(16),i=n(9),o=n(39);t.exports=function(t){return function(e,n,a){var s,c=r(e),u=i(c.length),l=o(a,u);if(t&&n!=n){for(;u>l;)if(s=c[l++],s!=s)return!0}else for(;u>l;l++)if((t||l in c)&&c[l]===n)return t||l||0;return!t&&-1}}},function(t,e,n){"use strict";var r=n(3),i=n(1),o=n(14),a=n(37),s=n(29),c=n(42),u=n(32),l=n(5),h=n(4),f=n(56),p=n(44),d=n(69);t.exports=function(t,e,n,m,v,g){var y=r[t],x=y,_=v?"set":"add",w=x&&x.prototype,b={},M=function(t){var e=w[t];o(w,t,"delete"==t?function(t){return!(g&&!l(t))&&e.call(this,0===t?0:t)}:"has"==t?function(t){return!(g&&!l(t))&&e.call(this,0===t?0:t)}:"get"==t?function(t){return g&&!l(t)?void 0:e.call(this,0===t?0:t)}:"add"==t?function(t){return e.call(this,0===t?0:t),this}:function(t,n){return e.call(this,0===t?0:t,n),this})};if("function"==typeof x&&(g||w.forEach&&!h(function(){(new x).entries().next()}))){var E=new x,S=E[_](g?{}:-0,1)!=E,T=h(function(){E.has(1)}),A=f(function(t){new x(t)}),L=!g&&h(function(){for(var t=new x,e=5;e--;)t[_](e,e);return!t.has(-0)});A||(x=e(function(e,n){u(e,x,t);var r=d(new y,e,x);return void 0!=n&&c(n,v,r[_],r),r}),x.prototype=w,w.constructor=x),(T||L)&&(M("delete"),M("has"),v&&M("get")),(L||S)&&M(_),g&&w.clear&&delete w.clear}else x=m.getConstructor(e,t,v,_),a(x.prototype,n),s.NEED=!0;return p(x,t),b[t]=x,i(i.G+i.W+i.F*(x!=y),b),g||m.setStrong(x,t,v),x}},function(t,e,n){"use strict";var r=n(13),i=n(14),o=n(4),a=n(20),s=n(6);t.exports=function(t,e,n){var c=s(t),u=n(a,c,""[t]),l=u[0],h=u[1];o(function(){var e={};return e[c]=function(){return 7},7!=""[t](e)})&&(i(String.prototype,t,l),r(RegExp.prototype,c,2==e?function(t,e){return h.call(t,this,e)}:function(t){return h.call(t,this)}))}},function(t,e,n){"use strict";var r=n(2);t.exports=function(){var t=r(this),e="";return t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.unicode&&(e+="u"),t.sticky&&(e+="y"),e}},function(t,e){t.exports=function(t,e,n){var r=void 0===n;switch(e.length){case 0:return r?t():t.call(n);case 1:return r?t(e[0]):t.call(n,e[0]);case 2:return r?t(e[0],e[1]):t.call(n,e[0],e[1]);case 3:return r?t(e[0],e[1],e[2]):t.call(n,e[0],e[1],e[2]);case 4:return r?t(e[0],e[1],e[2],e[3]):t.call(n,e[0],e[1],e[2],e[3])}return t.apply(n,e)}},function(t,e,n){var r=n(5),i=n(19),o=n(6)("match");t.exports=function(t){var e;return r(t)&&(void 0!==(e=t[o])?!!e:"RegExp"==i(t))}},function(t,e,n){var r=n(6)("iterator"),i=!1;try{var o=[7][r]();o["return"]=function(){i=!0},Array.from(o,function(){throw 2})}catch(a){}t.exports=function(t,e){if(!e&&!i)return!1;var n=!1;try{var o=[7],a=o[r]();a.next=function(){return{done:n=!0}},o[r]=function(){return a},t(o)}catch(s){}return n}},function(t,e,n){t.exports=n(33)||!n(4)(function(){var t=Math.random();__defineSetter__.call(null,t,function(){}),delete n(3)[t]})},function(t,e){e.f=Object.getOwnPropertySymbols},function(t,e,n){var r=n(3),i="__core-js_shared__",o=r[i]||(r[i]={});t.exports=function(t){return o[t]||(o[t]={})}},function(t,e,n){for(var r,i=n(3),o=n(13),a=n(40),s=a("typed_array"),c=a("view"),u=!(!i.ArrayBuffer||!i.DataView),l=u,h=0,f=9,p="Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array".split(",");h<f;)(r=i[p[h++]])?(o(r.prototype,s,!0),o(r.prototype,c,!0)):l=!1;t.exports={ABV:u,CONSTR:l,TYPED:s,VIEW:c}},function(t,e){"use strict";t.exports=Date.now||function(){return(new Date).getTime()}},function(t,e){var n;n="undefined"!=typeof window?window:"undefined"!=typeof self?self:this,t.exports=n},function(t,e,n){"use strict";var r=n(10),i=n(39),o=n(9);t.exports=function(t){for(var e=r(this),n=o(e.length),a=arguments.length,s=i(a>1?arguments[1]:void 0,n),c=a>2?arguments[2]:void 0,u=void 0===c?n:i(c,n);u>s;)e[s++]=t;return e}},function(t,e,n){"use strict";var r=n(8),i=n(30);t.exports=function(t,e,n){e in t?r.f(t,e,i(0,n)):t[e]=n}},function(t,e,n){var r=n(5),i=n(3).document,o=r(i)&&r(i.createElement);t.exports=function(t){return o?i.createElement(t):{}}},function(t,e){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(t,e,n){var r=n(6)("match");t.exports=function(t){var e=/./;try{"/./"[t](e)}catch(n){try{return e[r]=!1,!"/./"[t](e)}catch(i){}}return!0}},function(t,e,n){t.exports=n(3).document&&document.documentElement},function(t,e,n){var r=n(5),i=n(77).set;t.exports=function(t,e,n){var o,a=e.constructor;return a!==n&&"function"==typeof a&&(o=a.prototype)!==n.prototype&&r(o)&&i&&i(t,o),t}},function(t,e,n){var r=n(43),i=n(6)("iterator"),o=Array.prototype;t.exports=function(t){return void 0!==t&&(r.Array===t||o[i]===t)}},function(t,e,n){var r=n(19);t.exports=Array.isArray||function(t){return"Array"==r(t)}},function(t,e,n){"use strict";var r=n(34),i=n(30),o=n(44),a={};n(13)(a,n(6)("iterator"),function(){return this}),t.exports=function(t,e,n){t.prototype=r(a,{next:i(1,n)}),o(t,e+" Iterator")}},function(t,e,n){"use strict";var r=n(33),i=n(1),o=n(14),a=n(13),s=n(11),c=n(43),u=n(72),l=n(44),h=n(18),f=n(6)("iterator"),p=!([].keys&&"next"in[].keys()),d="@@iterator",m="keys",v="values",g=function(){return this};t.exports=function(t,e,n,y,x,_,w){u(n,e,y);var b,M,E,S=function(t){if(!p&&t in C)return C[t];switch(t){case m:return function(){return new n(this,t)};case v:return function(){return new n(this,t)}}return function(){return new n(this,t)}},T=e+" Iterator",A=x==v,L=!1,C=t.prototype,P=C[f]||C[d]||x&&C[x],R=P||S(x),I=x?A?S("entries"):R:void 0,O="Array"==e?C.entries||P:P;if(O&&(E=h(O.call(new t)),E!==Object.prototype&&(l(E,T,!0),r||s(E,f)||a(E,f,g))),A&&P&&P.name!==v&&(L=!0,R=function(){return P.call(this)}),r&&!w||!p&&!L&&C[f]||a(C,f,R),c[e]=R,c[T]=g,x)if(b={values:A?R:S(v),keys:_?R:S(m),entries:I},w)for(M in b)M in C||o(C,M,b[M]);else i(i.P+i.F*(p||L),e,b);return b}},function(t,e){var n=Math.expm1;t.exports=!n||n(10)>22025.465794806718||n(10)<22025.465794806718||n(-2e-17)!=-2e-17?function(t){return 0==(t=+t)?t:t>-1e-6&&t<1e-6?t+t*t/2:Math.exp(t)-1}:n},function(t,e){t.exports=Math.sign||function(t){return 0==(t=+t)||t!=t?t:t<0?-1:1}},function(t,e,n){var r=n(3),i=n(84).set,o=r.MutationObserver||r.WebKitMutationObserver,a=r.process,s=r.Promise,c="process"==n(19)(a);t.exports=function(){var t,e,n,u=function(){var r,i;for(c&&(r=a.domain)&&r.exit();t;){i=t.fn,t=t.next;try{i()}catch(o){throw t?n():e=void 0,o}}e=void 0,r&&r.enter()};if(c)n=function(){a.nextTick(u)};else if(o){var l=!0,h=document.createTextNode("");new o(u).observe(h,{characterData:!0}),n=function(){h.data=l=!l}}else if(s&&s.resolve){var f=s.resolve();n=function(){f.then(u)}}else n=function(){i.call(r,u)};return function(r){var i={fn:r,next:void 0};e&&(e.next=i),t||(t=i,n()),e=i}}},function(t,e,n){var r=n(5),i=n(2),o=function(t,e){if(i(t),!r(e)&&null!==e)throw TypeError(e+": can't set as prototype!")};t.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(t,e,r){try{r=n(26)(Function.call,n(17).f(Object.prototype,"__proto__").set,2),r(t,[]),e=!(t instanceof Array)}catch(i){e=!0}return function(t,n){return o(t,n),e?t.__proto__=n:r(t,n),t}}({},!1):void 0),check:o}},function(t,e,n){var r=n(59)("keys"),i=n(40);t.exports=function(t){return r[t]||(r[t]=i(t))}},function(t,e,n){var r=n(2),i=n(12),o=n(6)("species");t.exports=function(t,e){var n,a=r(t).constructor;return void 0===a||void 0==(n=r(a)[o])?e:i(n)}},function(t,e,n){var r=n(31),i=n(20);t.exports=function(t){return function(e,n){var o,a,s=String(i(e)),c=r(n),u=s.length;return c<0||c>=u?t?"":void 0:(o=s.charCodeAt(c),o<55296||o>56319||c+1===u||(a=s.charCodeAt(c+1))<56320||a>57343?t?s.charAt(c):o:t?s.slice(c,c+2):(o-55296<<10)+(a-56320)+65536)}}},function(t,e,n){var r=n(55),i=n(20);t.exports=function(t,e,n){if(r(e))throw TypeError("String#"+n+" doesn't accept regex!");return String(i(t))}},function(t,e,n){"use strict";var r=n(31),i=n(20);t.exports=function(t){var e=String(i(this)),n="",o=r(t);if(o<0||o==1/0)throw RangeError("Count can't be negative");for(;o>0;(o>>>=1)&&(e+=e))1&o&&(n+=e);return n}},function(t,e){t.exports="\t\n\x0B\f\r   ᠎             　\u2028\u2029\ufeff"},function(t,e,n){var r,i,o,a=n(26),s=n(54),c=n(68),u=n(65),l=n(3),h=l.process,f=l.setImmediate,p=l.clearImmediate,d=l.MessageChannel,m=0,v={},g="onreadystatechange",y=function(){var t=+this;if(v.hasOwnProperty(t)){var e=v[t];delete v[t],e()}},x=function(t){y.call(t.data)};f&&p||(f=function(t){for(var e=[],n=1;arguments.length>n;)e.push(arguments[n++]);return v[++m]=function(){s("function"==typeof t?t:Function(t),e)},r(m),m},p=function(t){delete v[t]},"process"==n(19)(h)?r=function(t){h.nextTick(a(y,t,1))}:d?(i=new d,o=i.port2,i.port1.onmessage=x,r=a(o.postMessage,o,1)):l.addEventListener&&"function"==typeof postMessage&&!l.importScripts?(r=function(t){l.postMessage(t+"","*")},l.addEventListener("message",x,!1)):r=g in u("script")?function(t){c.appendChild(u("script"))[g]=function(){c.removeChild(this),y.call(t)}}:function(t){setTimeout(a(y,t,1),0)}),t.exports={set:f,clear:p}},function(t,e,n){"use strict";var r=n(3),i=n(7),o=n(33),a=n(60),s=n(13),c=n(37),u=n(4),l=n(32),h=n(31),f=n(9),p=n(35).f,d=n(8).f,m=n(63),v=n(44),g="ArrayBuffer",y="DataView",x="prototype",_="Wrong length!",w="Wrong index!",b=r[g],M=r[y],E=r.Math,S=r.RangeError,T=r.Infinity,A=b,L=E.abs,C=E.pow,P=E.floor,R=E.log,I=E.LN2,O="buffer",U="byteLength",N="byteOffset",F=i?"_b":O,D=i?"_l":U,z=i?"_o":N,B=function(t,e,n){var r,i,o,a=Array(n),s=8*n-e-1,c=(1<<s)-1,u=c>>1,l=23===e?C(2,-24)-C(2,-77):0,h=0,f=t<0||0===t&&1/t<0?1:0;for(t=L(t),t!=t||t===T?(i=t!=t?1:0,r=c):(r=P(R(t)/I),t*(o=C(2,-r))<1&&(r--,o*=2),t+=r+u>=1?l/o:l*C(2,1-u),t*o>=2&&(r++,o/=2),r+u>=c?(i=0,r=c):r+u>=1?(i=(t*o-1)*C(2,e),r+=u):(i=t*C(2,u-1)*C(2,e),r=0));e>=8;a[h++]=255&i,i/=256,e-=8);for(r=r<<e|i,s+=e;s>0;a[h++]=255&r,r/=256,s-=8);return a[--h]|=128*f,a},k=function(t,e,n){var r,i=8*n-e-1,o=(1<<i)-1,a=o>>1,s=i-7,c=n-1,u=t[c--],l=127&u;for(u>>=7;s>0;l=256*l+t[c],c--,s-=8);for(r=l&(1<<-s)-1,l>>=-s,s+=e;s>0;r=256*r+t[c],c--,s-=8);if(0===l)l=1-a;else{if(l===o)return r?NaN:u?-T:T;r+=C(2,e),l-=a}return(u?-1:1)*r*C(2,l-e)},j=function(t){return t[3]<<24|t[2]<<16|t[1]<<8|t[0]},G=function(t){return[255&t]},V=function(t){return[255&t,t>>8&255]},H=function(t){return[255&t,t>>8&255,t>>16&255,t>>24&255]},W=function(t){return B(t,52,8)},X=function(t){return B(t,23,4)},q=function(t,e,n){d(t[x],e,{get:function(){return this[n]}})},Y=function(t,e,n,r){var i=+n,o=h(i);if(i!=o||o<0||o+e>t[D])throw S(w);var a=t[F]._b,s=o+t[z],c=a.slice(s,s+e);return r?c:c.reverse()},Z=function(t,e,n,r,i,o){var a=+n,s=h(a);if(a!=s||s<0||s+e>t[D])throw S(w);for(var c=t[F]._b,u=s+t[z],l=r(+i),f=0;f<e;f++)c[u+f]=l[o?f:e-f-1]},J=function(t,e){l(t,b,g);var n=+e,r=f(n);if(n!=r)throw S(_);return r};if(a.ABV){if(!u(function(){new b})||!u(function(){new b(.5)})){b=function(t){return new A(J(this,t))};for(var $,K=b[x]=A[x],Q=p(A),tt=0;Q.length>tt;)($=Q[tt++])in b||s(b,$,A[$]);o||(K.constructor=b)}var et=new M(new b(2)),nt=M[x].setInt8;et.setInt8(0,2147483648),et.setInt8(1,2147483649),!et.getInt8(0)&&et.getInt8(1)||c(M[x],{setInt8:function(t,e){nt.call(this,t,e<<24>>24)},setUint8:function(t,e){nt.call(this,t,e<<24>>24)}},!0)}else b=function(t){var e=J(this,t);this._b=m.call(Array(e),0),this[D]=e},M=function(t,e,n){l(this,M,y),l(t,b,y);var r=t[D],i=h(e);if(i<0||i>r)throw S("Wrong offset!");if(n=void 0===n?r-i:f(n),i+n>r)throw S(_);this[F]=t,this[z]=i,this[D]=n},i&&(q(b,U,"_l"),q(M,O,"_b"),q(M,U,"_l"),q(M,N,"_o")),c(M[x],{getInt8:function(t){return Y(this,1,t)[0]<<24>>24},getUint8:function(t){return Y(this,1,t)[0]},getInt16:function(t){var e=Y(this,2,t,arguments[1]);return(e[1]<<8|e[0])<<16>>16},getUint16:function(t){var e=Y(this,2,t,arguments[1]);return e[1]<<8|e[0]},getInt32:function(t){return j(Y(this,4,t,arguments[1]))},getUint32:function(t){return j(Y(this,4,t,arguments[1]))>>>0},getFloat32:function(t){return k(Y(this,4,t,arguments[1]),23,4)},getFloat64:function(t){return k(Y(this,8,t,arguments[1]),52,8)},setInt8:function(t,e){Z(this,1,t,G,e)},setUint8:function(t,e){Z(this,1,t,G,e)},setInt16:function(t,e){Z(this,2,t,V,e,arguments[2])},setUint16:function(t,e){Z(this,2,t,V,e,arguments[2])},setInt32:function(t,e){Z(this,4,t,H,e,arguments[2])},setUint32:function(t,e){Z(this,4,t,H,e,arguments[2])},setFloat32:function(t,e){Z(this,4,t,X,e,arguments[2])},setFloat64:function(t,e){Z(this,8,t,W,e,arguments[2])}});v(b,g),v(M,y),s(M[x],a.VIEW,!0),e[g]=b,e[y]=M},function(t,e,n){var r=n(3),i=n(25),o=n(33),a=n(113),s=n(8).f;t.exports=function(t){var e=i.Symbol||(i.Symbol=o?{}:r.Symbol||{});"_"==t.charAt(0)||t in e||s(e,t,{value:a.f(t)})}},function(t,e,n){var r=n(46),i=n(6)("iterator"),o=n(43);t.exports=n(25).getIteratorMethod=function(t){if(void 0!=t)return t[i]||t["@@iterator"]||o[r(t)]}},function(t,e,n){"use strict";var r=n(41),i=n(101),o=n(43),a=n(16);t.exports=n(73)(Array,"Array",function(t,e){this._t=a(t),this._i=0,this._k=e},function(){var t=this._t,e=this._k,n=this._i++;return!t||n>=t.length?(this._t=void 0,i(1)):"keys"==e?i(0,n):"values"==e?i(0,t[n]):i(0,[n,t[n]])},"values"),o.Arguments=o.Array,r("keys"),r("values"),r("entries")},function(t,e,n){var r;(function(t,i){(function(){function o(t,e){return t.set(e[0],e[1]),t}function a(t,e){return t.add(e),t}function s(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}function c(t,e,n,r){for(var i=-1,o=t?t.length:0;++i<o;){var a=t[i];e(r,a,n(a),t)}return r}function u(t,e){for(var n=-1,r=t?t.length:0;++n<r&&e(t[n],n,t)!==!1;);return t}function l(t,e){for(var n=t?t.length:0;n--&&e(t[n],n,t)!==!1;);return t}function h(t,e){for(var n=-1,r=t?t.length:0;++n<r;)if(!e(t[n],n,t))return!1;return!0}function f(t,e){for(var n=-1,r=t?t.length:0,i=0,o=[];++n<r;){var a=t[n];e(a,n,t)&&(o[i++]=a)}return o}function p(t,e){var n=t?t.length:0;return!!n&&E(t,e,0)>-1}function d(t,e,n){for(var r=-1,i=t?t.length:0;++r<i;)if(n(e,t[r]))return!0;return!1}function m(t,e){for(var n=-1,r=t?t.length:0,i=Array(r);++n<r;)i[n]=e(t[n],n,t);return i}function v(t,e){for(var n=-1,r=e.length,i=t.length;++n<r;)t[i+n]=e[n];return t}function g(t,e,n,r){var i=-1,o=t?t.length:0;for(r&&o&&(n=t[++i]);++i<o;)n=e(n,t[i],i,t);return n}function y(t,e,n,r){var i=t?t.length:0;for(r&&i&&(n=t[--i]);i--;)n=e(n,t[i],i,t);return n}function x(t,e){for(var n=-1,r=t?t.length:0;++n<r;)if(e(t[n],n,t))return!0;return!1}function _(t){return t.split("")}function w(t){return t.match(Fe)||[]}function b(t,e,n){var r;return n(t,function(t,n,i){if(e(t,n,i))return r=n,!1}),r}function M(t,e,n,r){for(var i=t.length,o=n+(r?1:-1);r?o--:++o<i;)if(e(t[o],o,t))return o;return-1}function E(t,e,n){return e===e?$(t,e,n):M(t,T,n)}function S(t,e,n,r){for(var i=n-1,o=t.length;++i<o;)if(r(t[i],e))return i;return-1}function T(t){return t!==t}function A(t,e){var n=t?t.length:0;return n?I(t,e)/n:Ut}function L(t){return function(e){return null==e?it:e[t]}}function C(t){return function(e){return null==t?it:t[e]}}function P(t,e,n,r,i){return i(t,function(t,i,o){n=r?(r=!1,t):e(n,t,i,o)}),n}function R(t,e){var n=t.length;for(t.sort(e);n--;)t[n]=t[n].value;return t}function I(t,e){for(var n,r=-1,i=t.length;++r<i;){var o=e(t[r]);o!==it&&(n=n===it?o:n+o)}return n}function O(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}function U(t,e){return m(e,function(e){return[e,t[e]]})}function N(t){return function(e){return t(e)}}function F(t,e){return m(e,function(e){return t[e]})}function D(t,e){return t.has(e)}function z(t,e){for(var n=-1,r=t.length;++n<r&&E(e,t[n],0)>-1;);return n}function B(t,e){for(var n=t.length;n--&&E(e,t[n],0)>-1;);return n}function k(t,e){for(var n=t.length,r=0;n--;)t[n]===e&&++r;return r;
  }function j(t){return"\\"+Wn[t]}function G(t,e){return null==t?it:t[e]}function V(t){return Fn.test(t)}function H(t){return Dn.test(t)}function W(t){for(var e,n=[];!(e=t.next()).done;)n.push(e.value);return n}function X(t){var e=-1,n=Array(t.size);return t.forEach(function(t,r){n[++e]=[r,t]}),n}function q(t,e){return function(n){return t(e(n))}}function Y(t,e){for(var n=-1,r=t.length,i=0,o=[];++n<r;){var a=t[n];a!==e&&a!==ht||(t[n]=ht,o[i++]=n)}return o}function Z(t){var e=-1,n=Array(t.size);return t.forEach(function(t){n[++e]=t}),n}function J(t){var e=-1,n=Array(t.size);return t.forEach(function(t){n[++e]=[t,t]}),n}function $(t,e,n){for(var r=n-1,i=t.length;++r<i;)if(t[r]===e)return r;return-1}function K(t,e,n){for(var r=n+1;r--;)if(t[r]===e)return r;return r}function Q(t){return V(t)?et(t):cr(t)}function tt(t){return V(t)?nt(t):_(t)}function et(t){for(var e=Un.lastIndex=0;Un.test(t);)++e;return e}function nt(t){return t.match(Un)||[]}function rt(t){return t.match(Nn)||[]}var it,ot="4.16.4",at=200,st="Unsupported core-js use. Try https://github.com/es-shims.",ct="Expected a function",ut="__lodash_hash_undefined__",lt=500,ht="__lodash_placeholder__",ft=1,pt=2,dt=4,mt=8,vt=16,gt=32,yt=64,xt=128,_t=256,wt=512,bt=1,Mt=2,Et=30,St="...",Tt=500,At=16,Lt=1,Ct=2,Pt=3,Rt=1/0,It=9007199254740991,Ot=1.7976931348623157e308,Ut=NaN,Nt=4294967295,Ft=Nt-1,Dt=Nt>>>1,zt=[["ary",xt],["bind",ft],["bindKey",pt],["curry",mt],["curryRight",vt],["flip",wt],["partial",gt],["partialRight",yt],["rearg",_t]],Bt="[object Arguments]",kt="[object Array]",jt="[object Boolean]",Gt="[object Date]",Vt="[object Error]",Ht="[object Function]",Wt="[object GeneratorFunction]",Xt="[object Map]",qt="[object Number]",Yt="[object Object]",Zt="[object Promise]",Jt="[object Proxy]",$t="[object RegExp]",Kt="[object Set]",Qt="[object String]",te="[object Symbol]",ee="[object WeakMap]",ne="[object WeakSet]",re="[object ArrayBuffer]",ie="[object DataView]",oe="[object Float32Array]",ae="[object Float64Array]",se="[object Int8Array]",ce="[object Int16Array]",ue="[object Int32Array]",le="[object Uint8Array]",he="[object Uint8ClampedArray]",fe="[object Uint16Array]",pe="[object Uint32Array]",de=/\b__p \+= '';/g,me=/\b(__p \+=) '' \+/g,ve=/(__e\(.*?\)|\b__t\)) \+\n'';/g,ge=/&(?:amp|lt|gt|quot|#39);/g,ye=/[&<>"']/g,xe=RegExp(ge.source),_e=RegExp(ye.source),we=/<%-([\s\S]+?)%>/g,be=/<%([\s\S]+?)%>/g,Me=/<%=([\s\S]+?)%>/g,Ee=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Se=/^\w*$/,Te=/^\./,Ae=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Le=/[\\^$.*+?()[\]{}|]/g,Ce=RegExp(Le.source),Pe=/^\s+|\s+$/g,Re=/^\s+/,Ie=/\s+$/,Oe=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Ue=/\{\n\/\* \[wrapped with (.+)\] \*/,Ne=/,? & /,Fe=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,De=/\\(\\)?/g,ze=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Be=/\w*$/,ke=/^[-+]0x[0-9a-f]+$/i,je=/^0b[01]+$/i,Ge=/^\[object .+?Constructor\]$/,Ve=/^0o[0-7]+$/i,He=/^(?:0|[1-9]\d*)$/,We=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Xe=/($^)/,qe=/['\n\r\u2028\u2029\\]/g,Ye="\\ud800-\\udfff",Ze="\\u0300-\\u036f\\ufe20-\\ufe23",Je="\\u20d0-\\u20f0",$e="\\u2700-\\u27bf",Ke="a-z\\xdf-\\xf6\\xf8-\\xff",Qe="\\xac\\xb1\\xd7\\xf7",tn="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",en="\\u2000-\\u206f",nn=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",rn="A-Z\\xc0-\\xd6\\xd8-\\xde",on="\\ufe0e\\ufe0f",an=Qe+tn+en+nn,sn="['’]",cn="["+Ye+"]",un="["+an+"]",ln="["+Ze+Je+"]",hn="\\d+",fn="["+$e+"]",pn="["+Ke+"]",dn="[^"+Ye+an+hn+$e+Ke+rn+"]",mn="\\ud83c[\\udffb-\\udfff]",vn="(?:"+ln+"|"+mn+")",gn="[^"+Ye+"]",yn="(?:\\ud83c[\\udde6-\\uddff]){2}",xn="[\\ud800-\\udbff][\\udc00-\\udfff]",_n="["+rn+"]",wn="\\u200d",bn="(?:"+pn+"|"+dn+")",Mn="(?:"+_n+"|"+dn+")",En="(?:"+sn+"(?:d|ll|m|re|s|t|ve))?",Sn="(?:"+sn+"(?:D|LL|M|RE|S|T|VE))?",Tn=vn+"?",An="["+on+"]?",Ln="(?:"+wn+"(?:"+[gn,yn,xn].join("|")+")"+An+Tn+")*",Cn=An+Tn+Ln,Pn="(?:"+[fn,yn,xn].join("|")+")"+Cn,Rn="(?:"+[gn+ln+"?",ln,yn,xn,cn].join("|")+")",In=RegExp(sn,"g"),On=RegExp(ln,"g"),Un=RegExp(mn+"(?="+mn+")|"+Rn+Cn,"g"),Nn=RegExp([_n+"?"+pn+"+"+En+"(?="+[un,_n,"$"].join("|")+")",Mn+"+"+Sn+"(?="+[un,_n+bn,"$"].join("|")+")",_n+"?"+bn+"+"+En,_n+"+"+Sn,hn,Pn].join("|"),"g"),Fn=RegExp("["+wn+Ye+Ze+Je+on+"]"),Dn=/[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,zn=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Bn=-1,kn={};kn[oe]=kn[ae]=kn[se]=kn[ce]=kn[ue]=kn[le]=kn[he]=kn[fe]=kn[pe]=!0,kn[Bt]=kn[kt]=kn[re]=kn[jt]=kn[ie]=kn[Gt]=kn[Vt]=kn[Ht]=kn[Xt]=kn[qt]=kn[Yt]=kn[$t]=kn[Kt]=kn[Qt]=kn[ee]=!1;var jn={};jn[Bt]=jn[kt]=jn[re]=jn[ie]=jn[jt]=jn[Gt]=jn[oe]=jn[ae]=jn[se]=jn[ce]=jn[ue]=jn[Xt]=jn[qt]=jn[Yt]=jn[$t]=jn[Kt]=jn[Qt]=jn[te]=jn[le]=jn[he]=jn[fe]=jn[pe]=!0,jn[Vt]=jn[Ht]=jn[ee]=!1;var Gn={"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","Ĳ":"IJ","ĳ":"ij","Œ":"Oe","œ":"oe","ŉ":"'n","ſ":"s"},Vn={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Hn={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"},Wn={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Xn=parseFloat,qn=parseInt,Yn="object"==typeof t&&t&&t.Object===Object&&t,Zn="object"==typeof self&&self&&self.Object===Object&&self,Jn=Yn||Zn||Function("return this")(),$n="object"==typeof e&&e&&!e.nodeType&&e,Kn=$n&&"object"==typeof i&&i&&!i.nodeType&&i,Qn=Kn&&Kn.exports===$n,tr=Qn&&Yn.process,er=function(){try{return tr&&tr.binding("util")}catch(t){}}(),nr=er&&er.isArrayBuffer,rr=er&&er.isDate,ir=er&&er.isMap,or=er&&er.isRegExp,ar=er&&er.isSet,sr=er&&er.isTypedArray,cr=L("length"),ur=C(Gn),lr=C(Vn),hr=C(Hn),fr=function dr(t){function e(t){if($s(t)&&!cf(t)&&!(t instanceof i)){if(t instanceof r)return t;if(ul.call(t,"__wrapped__"))return Yo(t)}return new r(t)}function n(){}function r(t,e){this.__wrapped__=t,this.__actions__=[],this.__chain__=!!e,this.__index__=0,this.__values__=it}function i(t){this.__wrapped__=t,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=Nt,this.__views__=[]}function _(){var t=new i(this.__wrapped__);return t.__actions__=Oi(this.__actions__),t.__dir__=this.__dir__,t.__filtered__=this.__filtered__,t.__iteratees__=Oi(this.__iteratees__),t.__takeCount__=this.__takeCount__,t.__views__=Oi(this.__views__),t}function C(){if(this.__filtered__){var t=new i(this);t.__dir__=-1,t.__filtered__=!0}else t=this.clone(),t.__dir__*=-1;return t}function $(){var t=this.__wrapped__.value(),e=this.__dir__,n=cf(t),r=e<0,i=n?t.length:0,o=yo(0,i,this.__views__),a=o.start,s=o.end,c=s-a,u=r?s:a-1,l=this.__iteratees__,h=l.length,f=0,p=Dl(c,this.__takeCount__);if(!n||i<at||i==c&&p==c)return di(t,this.__actions__);var d=[];t:for(;c--&&f<p;){u+=e;for(var m=-1,v=t[u];++m<h;){var g=l[m],y=g.iteratee,x=g.type,_=y(v);if(x==Ct)v=_;else if(!_){if(x==Lt)continue t;break t}}d[f++]=v}return d}function et(t){var e=-1,n=t?t.length:0;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function nt(){this.__data__=ql?ql(null):{},this.size=0}function Fe(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}function Ye(t){var e=this.__data__;if(ql){var n=e[t];return n===ut?it:n}return ul.call(e,t)?e[t]:it}function Ze(t){var e=this.__data__;return ql?e[t]!==it:ul.call(e,t)}function Je(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=ql&&e===it?ut:e,this}function $e(t){var e=-1,n=t?t.length:0;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function Ke(){this.__data__=[],this.size=0}function Qe(t){var e=this.__data__,n=Tn(e,t);if(n<0)return!1;var r=e.length-1;return n==r?e.pop():Ml.call(e,n,1),--this.size,!0}function tn(t){var e=this.__data__,n=Tn(e,t);return n<0?it:e[n][1]}function en(t){return Tn(this.__data__,t)>-1}function nn(t,e){var n=this.__data__,r=Tn(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this}function rn(t){var e=-1,n=t?t.length:0;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function on(){this.size=0,this.__data__={hash:new et,map:new(Vl||$e),string:new et}}function an(t){var e=mo(this,t)["delete"](t);return this.size-=e?1:0,e}function sn(t){return mo(this,t).get(t)}function cn(t){return mo(this,t).has(t)}function un(t,e){var n=mo(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this}function ln(t){var e=-1,n=t?t.length:0;for(this.__data__=new rn;++e<n;)this.add(t[e])}function hn(t){return this.__data__.set(t,ut),this}function fn(t){return this.__data__.has(t)}function pn(t){var e=this.__data__=new $e(t);this.size=e.size}function dn(){this.__data__=new $e,this.size=0}function mn(t){var e=this.__data__,n=e["delete"](t);return this.size=e.size,n}function vn(t){return this.__data__.get(t)}function gn(t){return this.__data__.has(t)}function yn(t,e){var n=this.__data__;if(n instanceof $e){var r=n.__data__;if(!Vl||r.length<at-1)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new rn(r)}return n.set(t,e),this.size=n.size,this}function xn(t,e){var n=cf(t),r=!n&&sf(t),i=!n&&!r&&lf(t),o=!n&&!r&&!i&&mf(t),a=n||r||i||o,s=a?O(t.length,el):[],c=s.length;for(var u in t)!e&&!ul.call(t,u)||a&&("length"==u||i&&("offset"==u||"parent"==u)||o&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||To(u,c))||s.push(u);return s}function _n(t){var e=t.length;return e?t[Zr(0,e-1)]:it}function wn(t,e){return Ho(Oi(t),Rn(e,0,t.length))}function bn(t){return Ho(Oi(t))}function Mn(t,e,n,r){return t===it||Ds(t,ol[n])&&!ul.call(r,n)?e:t}function En(t,e,n){(n===it||Ds(t[e],n))&&(n!==it||e in t)||Cn(t,e,n)}function Sn(t,e,n){var r=t[e];ul.call(t,e)&&Ds(r,n)&&(n!==it||e in t)||Cn(t,e,n)}function Tn(t,e){for(var n=t.length;n--;)if(Ds(t[n][0],e))return n;return-1}function An(t,e,n,r){return oh(t,function(t,i,o){e(r,t,n(t),o)}),r}function Ln(t,e){return t&&Ui(e,Ic(e),t)}function Cn(t,e,n){"__proto__"==e&&Sl?Sl(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}function Pn(t,e){for(var n=-1,r=null==t,i=e.length,o=Yu(i);++n<i;)o[n]=r?it:Cc(t,e[n]);return o}function Rn(t,e,n){return t===t&&(n!==it&&(t=t<=n?t:n),e!==it&&(t=t>=e?t:e)),t}function Un(t,e,n,r,i,o,a){var s;if(r&&(s=o?r(t,i,o,a):r(t)),s!==it)return s;if(!Js(t))return t;var c=cf(t);if(c){if(s=wo(t),!e)return Oi(t,s)}else{var l=gh(t),h=l==Ht||l==Wt;if(lf(t))return wi(t,e);if(l==Yt||l==Bt||h&&!o){if(s=bo(h?{}:t),!e)return Ni(t,Ln(s,t))}else{if(!jn[l])return o?t:{};s=Mo(t,l,Un,e)}}a||(a=new pn);var f=a.get(t);if(f)return f;a.set(t,s);var p=c?it:(n?uo:Ic)(t);return u(p||t,function(i,o){p&&(o=i,i=t[o]),Sn(s,o,Un(i,e,n,r,o,t,a))}),s}function Nn(t){var e=Ic(t);return function(n){return Fn(n,t,e)}}function Fn(t,e,n){var r=n.length;if(null==t)return!r;for(t=Qu(t);r--;){var i=n[r],o=e[i],a=t[i];if(a===it&&!(i in t)||!o(a))return!1}return!0}function Dn(t,e,n){if("function"!=typeof t)throw new nl(ct);return _h(function(){t.apply(it,n)},e)}function Gn(t,e,n,r){var i=-1,o=p,a=!0,s=t.length,c=[],u=e.length;if(!s)return c;n&&(e=m(e,N(n))),r?(o=d,a=!1):e.length>=at&&(o=D,a=!1,e=new ln(e));t:for(;++i<s;){var l=t[i],h=n?n(l):l;if(l=r||0!==l?l:0,a&&h===h){for(var f=u;f--;)if(e[f]===h)continue t;c.push(l)}else o(e,h,r)||c.push(l)}return c}function Vn(t,e){var n=!0;return oh(t,function(t,r,i){return n=!!e(t,r,i)}),n}function Hn(t,e,n){for(var r=-1,i=t.length;++r<i;){var o=t[r],a=e(o);if(null!=a&&(s===it?a===a&&!cc(a):n(a,s)))var s=a,c=o}return c}function Wn(t,e,n,r){var i=t.length;for(n=dc(n),n<0&&(n=-n>i?0:i+n),r=r===it||r>i?i:dc(r),r<0&&(r+=i),r=n>r?0:mc(r);n<r;)t[n++]=e;return t}function Yn(t,e){var n=[];return oh(t,function(t,r,i){e(t,r,i)&&n.push(t)}),n}function Zn(t,e,n,r,i){var o=-1,a=t.length;for(n||(n=So),i||(i=[]);++o<a;){var s=t[o];e>0&&n(s)?e>1?Zn(s,e-1,n,r,i):v(i,s):r||(i[i.length]=s)}return i}function $n(t,e){return t&&sh(t,e,Ic)}function Kn(t,e){return t&&ch(t,e,Ic)}function tr(t,e){return f(e,function(e){return qs(t[e])})}function er(t,e){e=Lo(e,t)?[e]:xi(e);for(var n=0,r=e.length;null!=t&&n<r;)t=t[Wo(e[n++])];return n&&n==r?t:it}function cr(t,e,n){var r=e(t);return cf(t)?r:v(r,n(t))}function fr(t){return fl.call(t)}function mr(t,e){return t>e}function vr(t,e){return null!=t&&ul.call(t,e)}function gr(t,e){return null!=t&&e in Qu(t)}function yr(t,e,n){return t>=Dl(e,n)&&t<Fl(e,n)}function xr(t,e,n){for(var r=n?d:p,i=t[0].length,o=t.length,a=o,s=Yu(o),c=1/0,u=[];a--;){var l=t[a];a&&e&&(l=m(l,N(e))),c=Dl(l.length,c),s[a]=!n&&(e||i>=120&&l.length>=120)?new ln(a&&l):it}l=t[0];var h=-1,f=s[0];t:for(;++h<i&&u.length<c;){var v=l[h],g=e?e(v):v;if(v=n||0!==v?v:0,!(f?D(f,g):r(u,g,n))){for(a=o;--a;){var y=s[a];if(!(y?D(y,g):r(t[a],g,n)))continue t}f&&f.push(g),u.push(v)}}return u}function _r(t,e,n,r){return $n(t,function(t,i,o){e(r,n(t),i,o)}),r}function wr(t,e,n){Lo(e,t)||(e=xi(e),t=ko(t,e),e=pa(e));var r=null==t?t:t[Wo(e)];return null==r?it:s(r,t,n)}function br(t){return $s(t)&&fl.call(t)==Bt}function Mr(t){return $s(t)&&fl.call(t)==re}function Er(t){return $s(t)&&fl.call(t)==Gt}function Sr(t,e,n,r,i){return t===e||(null==t||null==e||!Js(t)&&!$s(e)?t!==t&&e!==e:Tr(t,e,Sr,n,r,i))}function Tr(t,e,n,r,i,o){var a=cf(t),s=cf(e),c=kt,u=kt;a||(c=gh(t),c=c==Bt?Yt:c),s||(u=gh(e),u=u==Bt?Yt:u);var l=c==Yt,h=u==Yt,f=c==u;if(f&&lf(t)){if(!lf(e))return!1;a=!0,l=!1}if(f&&!l)return o||(o=new pn),a||mf(t)?oo(t,e,n,r,i,o):ao(t,e,c,n,r,i,o);if(!(i&Mt)){var p=l&&ul.call(t,"__wrapped__"),d=h&&ul.call(e,"__wrapped__");if(p||d){var m=p?t.value():t,v=d?e.value():e;return o||(o=new pn),n(m,v,r,i,o)}}return!!f&&(o||(o=new pn),so(t,e,n,r,i,o))}function Ar(t){return $s(t)&&gh(t)==Xt}function Lr(t,e,n,r){var i=n.length,o=i,a=!r;if(null==t)return!o;for(t=Qu(t);i--;){var s=n[i];if(a&&s[2]?s[1]!==t[s[0]]:!(s[0]in t))return!1}for(;++i<o;){s=n[i];var c=s[0],u=t[c],l=s[1];if(a&&s[2]){if(u===it&&!(c in t))return!1}else{var h=new pn;if(r)var f=r(u,l,c,t,e,h);if(!(f===it?Sr(l,u,r,bt|Mt,h):f))return!1}}return!0}function Cr(t){if(!Js(t)||Ro(t))return!1;var e=qs(t)?dl:Ge;return e.test(Xo(t))}function Pr(t){return Js(t)&&fl.call(t)==$t}function Rr(t){return $s(t)&&gh(t)==Kt}function Ir(t){return $s(t)&&Zs(t.length)&&!!kn[fl.call(t)]}function Or(t){return"function"==typeof t?t:null==t?bu:"object"==typeof t?cf(t)?Br(t[0],t[1]):zr(t):Pu(t)}function Ur(t){if(!Io(t))return Nl(t);var e=[];for(var n in Qu(t))ul.call(t,n)&&"constructor"!=n&&e.push(n);return e}function Nr(t){if(!Js(t))return zo(t);var e=Io(t),n=[];for(var r in t)("constructor"!=r||!e&&ul.call(t,r))&&n.push(r);return n}function Fr(t,e){return t<e}function Dr(t,e){var n=-1,r=zs(t)?Yu(t.length):[];return oh(t,function(t,i,o){r[++n]=e(t,i,o)}),r}function zr(t){var e=vo(t);return 1==e.length&&e[0][2]?Uo(e[0][0],e[0][1]):function(n){return n===t||Lr(n,t,e)}}function Br(t,e){return Lo(t)&&Oo(e)?Uo(Wo(t),e):function(n){var r=Cc(n,t);return r===it&&r===e?Rc(n,t):Sr(e,r,it,bt|Mt)}}function kr(t,e,n,r,i){t!==e&&sh(e,function(o,a){if(Js(o))i||(i=new pn),jr(t,e,a,n,kr,r,i);else{var s=r?r(t[a],o,a+"",t,e,i):it;s===it&&(s=o),En(t,a,s)}},Oc)}function jr(t,e,n,r,i,o,a){var s=t[n],c=e[n],u=a.get(c);if(u)return void En(t,n,u);var l=o?o(s,c,n+"",t,e,a):it,h=l===it;if(h){var f=cf(c),p=!f&&lf(c),d=!f&&!p&&mf(c);l=c,f||p||d?cf(s)?l=s:Bs(s)?l=Oi(s):p?(h=!1,l=wi(c,!0)):d?(h=!1,l=Li(c,!0)):l=[]:oc(c)||sf(c)?(l=s,sf(s)?l=gc(s):(!Js(s)||r&&qs(s))&&(l=bo(c))):h=!1}h&&(a.set(c,l),i(l,c,r,o,a),a["delete"](c)),En(t,n,l)}function Gr(t,e){var n=t.length;if(n)return e+=e<0?n:0,To(e,n)?t[e]:it}function Vr(t,e,n){var r=-1;e=m(e.length?e:[bu],N(po()));var i=Dr(t,function(t,n,i){var o=m(e,function(e){return e(t)});return{criteria:o,index:++r,value:t}});return R(i,function(t,e){return Pi(t,e,n)})}function Hr(t,e){return t=Qu(t),Wr(t,e,function(e,n){return n in t})}function Wr(t,e,n){for(var r=-1,i=e.length,o={};++r<i;){var a=e[r],s=t[a];n(s,a)&&Cn(o,a,s)}return o}function Xr(t){return function(e){return er(e,t)}}function qr(t,e,n,r){var i=r?S:E,o=-1,a=e.length,s=t;for(t===e&&(e=Oi(e)),n&&(s=m(t,N(n)));++o<a;)for(var c=0,u=e[o],l=n?n(u):u;(c=i(s,l,c,r))>-1;)s!==t&&Ml.call(s,c,1),Ml.call(t,c,1);return t}function Yr(t,e){for(var n=t?e.length:0,r=n-1;n--;){var i=e[n];if(n==r||i!==o){var o=i;if(To(i))Ml.call(t,i,1);else if(Lo(i,t))delete t[Wo(i)];else{var a=xi(i),s=ko(t,a);null!=s&&delete s[Wo(pa(a))]}}}return t}function Zr(t,e){return t+Pl(kl()*(e-t+1))}function Jr(t,e,n,r){for(var i=-1,o=Fl(Cl((e-t)/(n||1)),0),a=Yu(o);o--;)a[r?o:++i]=t,t+=n;return a}function $r(t,e){var n="";if(!t||e<1||e>It)return n;do e%2&&(n+=t),e=Pl(e/2),e&&(t+=t);while(e);return n}function Kr(t,e){return wh(Bo(t,e,bu),t+"")}function Qr(t){return _n(Wc(t))}function ti(t,e){var n=Wc(t);return Ho(n,Rn(e,0,n.length))}function ei(t,e,n,r){if(!Js(t))return t;e=Lo(e,t)?[e]:xi(e);for(var i=-1,o=e.length,a=o-1,s=t;null!=s&&++i<o;){var c=Wo(e[i]),u=n;if(i!=a){var l=s[c];u=r?r(l,c,s):it,u===it&&(u=Js(l)?l:To(e[i+1])?[]:{})}Sn(s,c,u),s=s[c]}return t}function ni(t){return Ho(Wc(t))}function ri(t,e,n){var r=-1,i=t.length;e<0&&(e=-e>i?0:i+e),n=n>i?i:n,n<0&&(n+=i),i=e>n?0:n-e>>>0,e>>>=0;for(var o=Yu(i);++r<i;)o[r]=t[r+e];return o}function ii(t,e){var n;return oh(t,function(t,r,i){return n=e(t,r,i),!n}),!!n}function oi(t,e,n){var r=0,i=t?t.length:r;if("number"==typeof e&&e===e&&i<=Dt){for(;r<i;){var o=r+i>>>1,a=t[o];null!==a&&!cc(a)&&(n?a<=e:a<e)?r=o+1:i=o}return i}return ai(t,e,bu,n)}function ai(t,e,n,r){e=n(e);for(var i=0,o=t?t.length:0,a=e!==e,s=null===e,c=cc(e),u=e===it;i<o;){var l=Pl((i+o)/2),h=n(t[l]),f=h!==it,p=null===h,d=h===h,m=cc(h);if(a)var v=r||d;else v=u?d&&(r||f):s?d&&f&&(r||!p):c?d&&f&&!p&&(r||!m):!p&&!m&&(r?h<=e:h<e);v?i=l+1:o=l}return Dl(o,Ft)}function si(t,e){for(var n=-1,r=t.length,i=0,o=[];++n<r;){var a=t[n],s=e?e(a):a;if(!n||!Ds(s,c)){var c=s;o[i++]=0===a?0:a}}return o}function ci(t){return"number"==typeof t?t:cc(t)?Ut:+t}function ui(t){if("string"==typeof t)return t;if(cf(t))return m(t,ui)+"";if(cc(t))return rh?rh.call(t):"";var e=t+"";return"0"==e&&1/t==-Rt?"-0":e}function li(t,e,n){var r=-1,i=p,o=t.length,a=!0,s=[],c=s;if(n)a=!1,i=d;else if(o>=at){var u=e?null:ph(t);if(u)return Z(u);a=!1,i=D,c=new ln}else c=e?[]:s;t:for(;++r<o;){var l=t[r],h=e?e(l):l;if(l=n||0!==l?l:0,a&&h===h){for(var f=c.length;f--;)if(c[f]===h)continue t;e&&c.push(h),s.push(l)}else i(c,h,n)||(c!==s&&c.push(h),s.push(l))}return s}function hi(t,e){e=Lo(e,t)?[e]:xi(e),t=ko(t,e);var n=Wo(pa(e));return!(null!=t&&ul.call(t,n))||delete t[n]}function fi(t,e,n,r){return ei(t,e,n(er(t,e)),r)}function pi(t,e,n,r){for(var i=t.length,o=r?i:-1;(r?o--:++o<i)&&e(t[o],o,t););return n?ri(t,r?0:o,r?o+1:i):ri(t,r?o+1:0,r?i:o)}function di(t,e){var n=t;return n instanceof i&&(n=n.value()),g(e,function(t,e){return e.func.apply(e.thisArg,v([t],e.args))},n)}function mi(t,e,n){for(var r=-1,i=t.length;++r<i;)var o=o?v(Gn(o,t[r],e,n),Gn(t[r],o,e,n)):t[r];return o&&o.length?li(o,e,n):[]}function vi(t,e,n){for(var r=-1,i=t.length,o=e.length,a={};++r<i;){var s=r<o?e[r]:it;n(a,t[r],s)}return a}function gi(t){return Bs(t)?t:[]}function yi(t){return"function"==typeof t?t:bu}function xi(t){return cf(t)?t:bh(t)}function _i(t,e,n){var r=t.length;return n=n===it?r:n,!e&&n>=r?t:ri(t,e,n)}function wi(t,e){if(e)return t.slice();var n=t.length,r=yl?yl(n):new t.constructor(n);return t.copy(r),r}function bi(t){var e=new t.constructor(t.byteLength);return new gl(e).set(new gl(t)),e}function Mi(t,e){var n=e?bi(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)}function Ei(t,e,n){var r=e?n(X(t),!0):X(t);return g(r,o,new t.constructor)}function Si(t){var e=new t.constructor(t.source,Be.exec(t));return e.lastIndex=t.lastIndex,e}function Ti(t,e,n){var r=e?n(Z(t),!0):Z(t);return g(r,a,new t.constructor)}function Ai(t){return nh?Qu(nh.call(t)):{}}function Li(t,e){var n=e?bi(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}function Ci(t,e){if(t!==e){var n=t!==it,r=null===t,i=t===t,o=cc(t),a=e!==it,s=null===e,c=e===e,u=cc(e);if(!s&&!u&&!o&&t>e||o&&a&&c&&!s&&!u||r&&a&&c||!n&&c||!i)return 1;if(!r&&!o&&!u&&t<e||u&&n&&i&&!r&&!o||s&&n&&i||!a&&i||!c)return-1}return 0}function Pi(t,e,n){for(var r=-1,i=t.criteria,o=e.criteria,a=i.length,s=n.length;++r<a;){var c=Ci(i[r],o[r]);if(c){if(r>=s)return c;var u=n[r];return c*("desc"==u?-1:1)}}return t.index-e.index}function Ri(t,e,n,r){for(var i=-1,o=t.length,a=n.length,s=-1,c=e.length,u=Fl(o-a,0),l=Yu(c+u),h=!r;++s<c;)l[s]=e[s];for(;++i<a;)(h||i<o)&&(l[n[i]]=t[i]);for(;u--;)l[s++]=t[i++];return l}function Ii(t,e,n,r){for(var i=-1,o=t.length,a=-1,s=n.length,c=-1,u=e.length,l=Fl(o-s,0),h=Yu(l+u),f=!r;++i<l;)h[i]=t[i];for(var p=i;++c<u;)h[p+c]=e[c];for(;++a<s;)(f||i<o)&&(h[p+n[a]]=t[i++]);return h}function Oi(t,e){var n=-1,r=t.length;for(e||(e=Yu(r));++n<r;)e[n]=t[n];return e}function Ui(t,e,n,r){var i=!n;n||(n={});for(var o=-1,a=e.length;++o<a;){var s=e[o],c=r?r(n[s],t[s],s,n,t):it;c===it&&(c=t[s]),i?Cn(n,s,c):Sn(n,s,c)}return n}function Ni(t,e){return Ui(t,mh(t),e)}function Fi(t,e){return function(n,r){var i=cf(n)?c:An,o=e?e():{};return i(n,t,po(r,2),o)}}function Di(t){return Kr(function(e,n){var r=-1,i=n.length,o=i>1?n[i-1]:it,a=i>2?n[2]:it;for(o=t.length>3&&"function"==typeof o?(i--,o):it,a&&Ao(n[0],n[1],a)&&(o=i<3?it:o,i=1),e=Qu(e);++r<i;){var s=n[r];s&&t(e,s,r,o)}return e})}function zi(t,e){return function(n,r){if(null==n)return n;if(!zs(n))return t(n,r);for(var i=n.length,o=e?i:-1,a=Qu(n);(e?o--:++o<i)&&r(a[o],o,a)!==!1;);return n}}function Bi(t){return function(e,n,r){for(var i=-1,o=Qu(e),a=r(e),s=a.length;s--;){var c=a[t?s:++i];if(n(o[c],c,o)===!1)break}return e}}function ki(t,e,n){function r(){var e=this&&this!==Jn&&this instanceof r?o:t;return e.apply(i?n:this,arguments)}var i=e&ft,o=Vi(t);return r}function ji(t){return function(e){e=xc(e);var n=V(e)?tt(e):it,r=n?n[0]:e.charAt(0),i=n?_i(n,1).join(""):e.slice(1);return r[t]()+i}}function Gi(t){return function(e){return g(gu($c(e).replace(In,"")),t,"")}}function Vi(t){return function(){var e=arguments;switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3]);case 5:return new t(e[0],e[1],e[2],e[3],e[4]);case 6:return new t(e[0],e[1],e[2],e[3],e[4],e[5]);case 7:return new t(e[0],e[1],e[2],e[3],e[4],e[5],e[6])}var n=ih(t.prototype),r=t.apply(n,e);return Js(r)?r:n}}function Hi(t,e,n){function r(){for(var o=arguments.length,a=Yu(o),c=o,u=fo(r);c--;)a[c]=arguments[c];var l=o<3&&a[0]!==u&&a[o-1]!==u?[]:Y(a,u);if(o-=l.length,o<n)return eo(t,e,qi,r.placeholder,it,a,l,it,it,n-o);var h=this&&this!==Jn&&this instanceof r?i:t;return s(h,this,a)}var i=Vi(t);return r}function Wi(t){return function(e,n,r){var i=Qu(e);if(!zs(e)){var o=po(n,3);e=Ic(e),n=function(t){return o(i[t],t,i)}}var a=t(e,n,r);return a>-1?i[o?e[a]:a]:it}}function Xi(t){return co(function(e){var n=e.length,i=n,o=r.prototype.thru;for(t&&e.reverse();i--;){var a=e[i];if("function"!=typeof a)throw new nl(ct);if(o&&!s&&"wrapper"==ho(a))var s=new r([],(!0))}for(i=s?i:n;++i<n;){a=e[i];var c=ho(a),u="wrapper"==c?dh(a):it;s=u&&Po(u[0])&&u[1]==(xt|mt|gt|_t)&&!u[4].length&&1==u[9]?s[ho(u[0])].apply(s,u[3]):1==a.length&&Po(a)?s[c]():s.thru(a)}return function(){var t=arguments,r=t[0];if(s&&1==t.length&&cf(r)&&r.length>=at)return s.plant(r).value();for(var i=0,o=n?e[i].apply(this,t):r;++i<n;)o=e[i].call(this,o);return o}})}function qi(t,e,n,r,i,o,a,s,c,u){function l(){for(var g=arguments.length,y=Yu(g),x=g;x--;)y[x]=arguments[x];if(d)var _=fo(l),w=k(y,_);if(r&&(y=Ri(y,r,i,d)),o&&(y=Ii(y,o,a,d)),g-=w,d&&g<u){var b=Y(y,_);return eo(t,e,qi,l.placeholder,n,y,b,s,c,u-g)}var M=f?n:this,E=p?M[t]:t;return g=y.length,s?y=jo(y,s):m&&g>1&&y.reverse(),h&&c<g&&(y.length=c),this&&this!==Jn&&this instanceof l&&(E=v||Vi(E)),E.apply(M,y)}var h=e&xt,f=e&ft,p=e&pt,d=e&(mt|vt),m=e&wt,v=p?it:Vi(t);return l}function Yi(t,e){return function(n,r){return _r(n,t,e(r),{})}}function Zi(t,e){return function(n,r){var i;if(n===it&&r===it)return e;if(n!==it&&(i=n),r!==it){if(i===it)return r;"string"==typeof n||"string"==typeof r?(n=ui(n),r=ui(r)):(n=ci(n),r=ci(r)),i=t(n,r)}return i}}function Ji(t){return co(function(e){return e=m(e,N(po())),Kr(function(n){var r=this;return t(e,function(t){return s(t,r,n)})})})}function $i(t,e){e=e===it?" ":ui(e);var n=e.length;if(n<2)return n?$r(e,t):e;var r=$r(e,Cl(t/Q(e)));return V(e)?_i(tt(r),0,t).join(""):r.slice(0,t)}function Ki(t,e,n,r){function i(){for(var e=-1,c=arguments.length,u=-1,l=r.length,h=Yu(l+c),f=this&&this!==Jn&&this instanceof i?a:t;++u<l;)h[u]=r[u];for(;c--;)h[u++]=arguments[++e];return s(f,o?n:this,h)}var o=e&ft,a=Vi(t);return i}function Qi(t){return function(e,n,r){return r&&"number"!=typeof r&&Ao(e,n,r)&&(n=r=it),e=pc(e),n===it?(n=e,e=0):n=pc(n),r=r===it?e<n?1:-1:pc(r),Jr(e,n,r,t)}}function to(t){return function(e,n){return"string"==typeof e&&"string"==typeof n||(e=vc(e),n=vc(n)),t(e,n)}}function eo(t,e,n,r,i,o,a,s,c,u){var l=e&mt,h=l?a:it,f=l?it:a,p=l?o:it,d=l?it:o;e|=l?gt:yt,e&=~(l?yt:gt),e&dt||(e&=~(ft|pt));var m=[t,e,i,p,h,d,f,s,c,u],v=n.apply(it,m);return Po(t)&&xh(v,m),v.placeholder=r,Go(v,t,e)}function no(t){var e=Ku[t];return function(t,n){if(t=vc(t),n=Dl(dc(n),292)){var r=(xc(t)+"e").split("e"),i=e(r[0]+"e"+(+r[1]+n));return r=(xc(i)+"e").split("e"),+(r[0]+"e"+(+r[1]-n))}return e(t)}}function ro(t){return function(e){var n=gh(e);return n==Xt?X(e):n==Kt?J(e):U(e,t(e))}}function io(t,e,n,r,i,o,a,s){var c=e&pt;if(!c&&"function"!=typeof t)throw new nl(ct);var u=r?r.length:0;if(u||(e&=~(gt|yt),r=i=it),a=a===it?a:Fl(dc(a),0),s=s===it?s:dc(s),u-=i?i.length:0,e&yt){var l=r,h=i;r=i=it}var f=c?it:dh(t),p=[t,e,n,r,i,l,h,o,a,s];if(f&&Fo(p,f),t=p[0],e=p[1],n=p[2],r=p[3],i=p[4],s=p[9]=null==p[9]?c?0:t.length:Fl(p[9]-u,0),!s&&e&(mt|vt)&&(e&=~(mt|vt)),e&&e!=ft)d=e==mt||e==vt?Hi(t,e,s):e!=gt&&e!=(ft|gt)||i.length?qi.apply(it,p):Ki(t,e,n,r);else var d=ki(t,e,n);var m=f?uh:xh;return Go(m(d,p),t,e)}function oo(t,e,n,r,i,o){var a=i&Mt,s=t.length,c=e.length;if(s!=c&&!(a&&c>s))return!1;var u=o.get(t);if(u&&o.get(e))return u==e;var l=-1,h=!0,f=i&bt?new ln:it;for(o.set(t,e),o.set(e,t);++l<s;){var p=t[l],d=e[l];if(r)var m=a?r(d,p,l,e,t,o):r(p,d,l,t,e,o);if(m!==it){if(m)continue;h=!1;break}if(f){if(!x(e,function(t,e){if(!D(f,e)&&(p===t||n(p,t,r,i,o)))return f.push(e)})){h=!1;break}}else if(p!==d&&!n(p,d,r,i,o)){h=!1;break}}return o["delete"](t),o["delete"](e),h}function ao(t,e,n,r,i,o,a){switch(n){case ie:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case re:return!(t.byteLength!=e.byteLength||!r(new gl(t),new gl(e)));case jt:case Gt:case qt:return Ds(+t,+e);case Vt:return t.name==e.name&&t.message==e.message;case $t:case Qt:return t==e+"";case Xt:var s=X;case Kt:var c=o&Mt;if(s||(s=Z),t.size!=e.size&&!c)return!1;var u=a.get(t);if(u)return u==e;o|=bt,a.set(t,e);var l=oo(s(t),s(e),r,i,o,a);return a["delete"](t),l;case te:if(nh)return nh.call(t)==nh.call(e)}return!1}function so(t,e,n,r,i,o){var a=i&Mt,s=Ic(t),c=s.length,u=Ic(e),l=u.length;if(c!=l&&!a)return!1;for(var h=c;h--;){var f=s[h];if(!(a?f in e:ul.call(e,f)))return!1}var p=o.get(t);if(p&&o.get(e))return p==e;var d=!0;o.set(t,e),o.set(e,t);for(var m=a;++h<c;){f=s[h];var v=t[f],g=e[f];if(r)var y=a?r(g,v,f,e,t,o):r(v,g,f,t,e,o);if(!(y===it?v===g||n(v,g,r,i,o):y)){d=!1;break}m||(m="constructor"==f)}if(d&&!m){var x=t.constructor,_=e.constructor;x!=_&&"constructor"in t&&"constructor"in e&&!("function"==typeof x&&x instanceof x&&"function"==typeof _&&_ instanceof _)&&(d=!1)}return o["delete"](t),o["delete"](e),d}function co(t){return wh(Bo(t,it,oa),t+"")}function uo(t){return cr(t,Ic,mh)}function lo(t){return cr(t,Oc,vh)}function ho(t){for(var e=t.name+"",n=Zl[e],r=ul.call(Zl,e)?n.length:0;r--;){var i=n[r],o=i.func;if(null==o||o==t)return i.name}return e}function fo(t){var n=ul.call(e,"placeholder")?e:t;return n.placeholder}function po(){var t=e.iteratee||Mu;return t=t===Mu?Or:t,arguments.length?t(arguments[0],arguments[1]):t}function mo(t,e){var n=t.__data__;return Co(e)?n["string"==typeof e?"string":"hash"]:n.map}function vo(t){for(var e=Ic(t),n=e.length;n--;){var r=e[n],i=t[r];e[n]=[r,i,Oo(i)]}return e}function go(t,e){var n=G(t,e);return Cr(n)?n:it}function yo(t,e,n){for(var r=-1,i=n.length;++r<i;){var o=n[r],a=o.size;switch(o.type){case"drop":t+=a;break;case"dropRight":e-=a;break;case"take":e=Dl(e,t+a);break;case"takeRight":t=Fl(t,e-a)}}return{start:t,end:e}}function xo(t){var e=t.match(Ue);return e?e[1].split(Ne):[]}function _o(t,e,n){e=Lo(e,t)?[e]:xi(e);for(var r=-1,i=e.length,o=!1;++r<i;){var a=Wo(e[r]);if(!(o=null!=t&&n(t,a)))break;t=t[a]}return o||++r!=i?o:(i=t?t.length:0,!!i&&Zs(i)&&To(a,i)&&(cf(t)||sf(t)))}function wo(t){var e=t.length,n=t.constructor(e);return e&&"string"==typeof t[0]&&ul.call(t,"index")&&(n.index=t.index,n.input=t.input),n}function bo(t){return"function"!=typeof t.constructor||Io(t)?{}:ih(xl(t))}function Mo(t,e,n,r){var i=t.constructor;switch(e){case re:return bi(t);case jt:case Gt:return new i((+t));case ie:return Mi(t,r);case oe:case ae:case se:case ce:case ue:case le:case he:case fe:case pe:return Li(t,r);case Xt:return Ei(t,r,n);case qt:case Qt:return new i(t);case $t:return Si(t);case Kt:return Ti(t,r,n);case te:return Ai(t)}}function Eo(t,e){var n=e.length;if(!n)return t;var r=n-1;return e[r]=(n>1?"& ":"")+e[r],e=e.join(n>2?", ":" "),t.replace(Oe,"{\n/* [wrapped with "+e+"] */\n")}function So(t){return cf(t)||sf(t)||!!(El&&t&&t[El])}function To(t,e){return e=null==e?It:e,!!e&&("number"==typeof t||He.test(t))&&t>-1&&t%1==0&&t<e}function Ao(t,e,n){if(!Js(n))return!1;var r=typeof e;return!!("number"==r?zs(n)&&To(e,n.length):"string"==r&&e in n)&&Ds(n[e],t)}function Lo(t,e){if(cf(t))return!1;var n=typeof t;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!cc(t))||(Se.test(t)||!Ee.test(t)||null!=e&&t in Qu(e))}function Co(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}function Po(t){var n=ho(t),r=e[n];if("function"!=typeof r||!(n in i.prototype))return!1;if(t===r)return!0;var o=dh(r);return!!o&&t===o[0]}function Ro(t){return!!sl&&sl in t}function Io(t){var e=t&&t.constructor,n="function"==typeof e&&e.prototype||ol;return t===n}function Oo(t){return t===t&&!Js(t)}function Uo(t,e){return function(n){return null!=n&&(n[t]===e&&(e!==it||t in Qu(n)))}}function No(t){var e=Ms(t,function(t){return n.size===lt&&n.clear(),t}),n=e.cache;return e;
  }function Fo(t,e){var n=t[1],r=e[1],i=n|r,o=i<(ft|pt|xt),a=r==xt&&n==mt||r==xt&&n==_t&&t[7].length<=e[8]||r==(xt|_t)&&e[7].length<=e[8]&&n==mt;if(!o&&!a)return t;r&ft&&(t[2]=e[2],i|=n&ft?0:dt);var s=e[3];if(s){var c=t[3];t[3]=c?Ri(c,s,e[4]):s,t[4]=c?Y(t[3],ht):e[4]}return s=e[5],s&&(c=t[5],t[5]=c?Ii(c,s,e[6]):s,t[6]=c?Y(t[5],ht):e[6]),s=e[7],s&&(t[7]=s),r&xt&&(t[8]=null==t[8]?e[8]:Dl(t[8],e[8])),null==t[9]&&(t[9]=e[9]),t[0]=e[0],t[1]=i,t}function Do(t,e,n,r,i,o){return Js(t)&&Js(e)&&(o.set(e,t),kr(t,e,it,Do,o),o["delete"](e)),t}function zo(t){var e=[];if(null!=t)for(var n in Qu(t))e.push(n);return e}function Bo(t,e,n){return e=Fl(e===it?t.length-1:e,0),function(){for(var r=arguments,i=-1,o=Fl(r.length-e,0),a=Yu(o);++i<o;)a[i]=r[e+i];i=-1;for(var c=Yu(e+1);++i<e;)c[i]=r[i];return c[e]=n(a),s(t,this,c)}}function ko(t,e){return 1==e.length?t:er(t,ri(e,0,-1))}function jo(t,e){for(var n=t.length,r=Dl(e.length,n),i=Oi(t);r--;){var o=e[r];t[r]=To(o,n)?i[o]:it}return t}function Go(t,e,n){var r=e+"";return wh(t,Eo(r,qo(xo(r),n)))}function Vo(t){var e=0,n=0;return function(){var r=zl(),i=At-(r-n);if(n=r,i>0){if(++e>=Tt)return arguments[0]}else e=0;return t.apply(it,arguments)}}function Ho(t,e){var n=-1,r=t.length,i=r-1;for(e=e===it?r:e;++n<e;){var o=Zr(n,i),a=t[o];t[o]=t[n],t[n]=a}return t.length=e,t}function Wo(t){if("string"==typeof t||cc(t))return t;var e=t+"";return"0"==e&&1/t==-Rt?"-0":e}function Xo(t){if(null!=t){try{return cl.call(t)}catch(e){}try{return t+""}catch(e){}}return""}function qo(t,e){return u(zt,function(n){var r="_."+n[0];e&n[1]&&!p(t,r)&&t.push(r)}),t.sort()}function Yo(t){if(t instanceof i)return t.clone();var e=new r(t.__wrapped__,t.__chain__);return e.__actions__=Oi(t.__actions__),e.__index__=t.__index__,e.__values__=t.__values__,e}function Zo(t,e,n){e=(n?Ao(t,e,n):e===it)?1:Fl(dc(e),0);var r=t?t.length:0;if(!r||e<1)return[];for(var i=0,o=0,a=Yu(Cl(r/e));i<r;)a[o++]=ri(t,i,i+=e);return a}function Jo(t){for(var e=-1,n=t?t.length:0,r=0,i=[];++e<n;){var o=t[e];o&&(i[r++]=o)}return i}function $o(){var t=arguments.length;if(!t)return[];for(var e=Yu(t-1),n=arguments[0],r=t;r--;)e[r-1]=arguments[r];return v(cf(n)?Oi(n):[n],Zn(e,1))}function Ko(t,e,n){var r=t?t.length:0;return r?(e=n||e===it?1:dc(e),ri(t,e<0?0:e,r)):[]}function Qo(t,e,n){var r=t?t.length:0;return r?(e=n||e===it?1:dc(e),e=r-e,ri(t,0,e<0?0:e)):[]}function ta(t,e){return t&&t.length?pi(t,po(e,3),!0,!0):[]}function ea(t,e){return t&&t.length?pi(t,po(e,3),!0):[]}function na(t,e,n,r){var i=t?t.length:0;return i?(n&&"number"!=typeof n&&Ao(t,e,n)&&(n=0,r=i),Wn(t,e,n,r)):[]}function ra(t,e,n){var r=t?t.length:0;if(!r)return-1;var i=null==n?0:dc(n);return i<0&&(i=Fl(r+i,0)),M(t,po(e,3),i)}function ia(t,e,n){var r=t?t.length:0;if(!r)return-1;var i=r-1;return n!==it&&(i=dc(n),i=n<0?Fl(r+i,0):Dl(i,r-1)),M(t,po(e,3),i,!0)}function oa(t){var e=t?t.length:0;return e?Zn(t,1):[]}function aa(t){var e=t?t.length:0;return e?Zn(t,Rt):[]}function sa(t,e){var n=t?t.length:0;return n?(e=e===it?1:dc(e),Zn(t,e)):[]}function ca(t){for(var e=-1,n=t?t.length:0,r={};++e<n;){var i=t[e];r[i[0]]=i[1]}return r}function ua(t){return t&&t.length?t[0]:it}function la(t,e,n){var r=t?t.length:0;if(!r)return-1;var i=null==n?0:dc(n);return i<0&&(i=Fl(r+i,0)),E(t,e,i)}function ha(t){var e=t?t.length:0;return e?ri(t,0,-1):[]}function fa(t,e){return t?Ul.call(t,e):""}function pa(t){var e=t?t.length:0;return e?t[e-1]:it}function da(t,e,n){var r=t?t.length:0;if(!r)return-1;var i=r;return n!==it&&(i=dc(n),i=i<0?Fl(r+i,0):Dl(i,r-1)),e===e?K(t,e,i):M(t,T,i,!0)}function ma(t,e){return t&&t.length?Gr(t,dc(e)):it}function va(t,e){return t&&t.length&&e&&e.length?qr(t,e):t}function ga(t,e,n){return t&&t.length&&e&&e.length?qr(t,e,po(n,2)):t}function ya(t,e,n){return t&&t.length&&e&&e.length?qr(t,e,it,n):t}function xa(t,e){var n=[];if(!t||!t.length)return n;var r=-1,i=[],o=t.length;for(e=po(e,3);++r<o;){var a=t[r];e(a,r,t)&&(n.push(a),i.push(r))}return Yr(t,i),n}function _a(t){return t?jl.call(t):t}function wa(t,e,n){var r=t?t.length:0;return r?(n&&"number"!=typeof n&&Ao(t,e,n)?(e=0,n=r):(e=null==e?0:dc(e),n=n===it?r:dc(n)),ri(t,e,n)):[]}function ba(t,e){return oi(t,e)}function Ma(t,e,n){return ai(t,e,po(n,2))}function Ea(t,e){var n=t?t.length:0;if(n){var r=oi(t,e);if(r<n&&Ds(t[r],e))return r}return-1}function Sa(t,e){return oi(t,e,!0)}function Ta(t,e,n){return ai(t,e,po(n,2),!0)}function Aa(t,e){var n=t?t.length:0;if(n){var r=oi(t,e,!0)-1;if(Ds(t[r],e))return r}return-1}function La(t){return t&&t.length?si(t):[]}function Ca(t,e){return t&&t.length?si(t,po(e,2)):[]}function Pa(t){var e=t?t.length:0;return e?ri(t,1,e):[]}function Ra(t,e,n){return t&&t.length?(e=n||e===it?1:dc(e),ri(t,0,e<0?0:e)):[]}function Ia(t,e,n){var r=t?t.length:0;return r?(e=n||e===it?1:dc(e),e=r-e,ri(t,e<0?0:e,r)):[]}function Oa(t,e){return t&&t.length?pi(t,po(e,3),!1,!0):[]}function Ua(t,e){return t&&t.length?pi(t,po(e,3)):[]}function Na(t){return t&&t.length?li(t):[]}function Fa(t,e){return t&&t.length?li(t,po(e,2)):[]}function Da(t,e){return t&&t.length?li(t,it,e):[]}function za(t){if(!t||!t.length)return[];var e=0;return t=f(t,function(t){if(Bs(t))return e=Fl(t.length,e),!0}),O(e,function(e){return m(t,L(e))})}function Ba(t,e){if(!t||!t.length)return[];var n=za(t);return null==e?n:m(n,function(t){return s(e,it,t)})}function ka(t,e){return vi(t||[],e||[],Sn)}function ja(t,e){return vi(t||[],e||[],ei)}function Ga(t){var n=e(t);return n.__chain__=!0,n}function Va(t,e){return e(t),t}function Ha(t,e){return e(t)}function Wa(){return Ga(this)}function Xa(){return new r(this.value(),this.__chain__)}function qa(){this.__values__===it&&(this.__values__=fc(this.value()));var t=this.__index__>=this.__values__.length,e=t?it:this.__values__[this.__index__++];return{done:t,value:e}}function Ya(){return this}function Za(t){for(var e,r=this;r instanceof n;){var i=Yo(r);i.__index__=0,i.__values__=it,e?o.__wrapped__=i:e=i;var o=i;r=r.__wrapped__}return o.__wrapped__=t,e}function Ja(){var t=this.__wrapped__;if(t instanceof i){var e=t;return this.__actions__.length&&(e=new i(this)),e=e.reverse(),e.__actions__.push({func:Ha,args:[_a],thisArg:it}),new r(e,this.__chain__)}return this.thru(_a)}function $a(){return di(this.__wrapped__,this.__actions__)}function Ka(t,e,n){var r=cf(t)?h:Vn;return n&&Ao(t,e,n)&&(e=it),r(t,po(e,3))}function Qa(t,e){var n=cf(t)?f:Yn;return n(t,po(e,3))}function ts(t,e){return Zn(as(t,e),1)}function es(t,e){return Zn(as(t,e),Rt)}function ns(t,e,n){return n=n===it?1:dc(n),Zn(as(t,e),n)}function rs(t,e){var n=cf(t)?u:oh;return n(t,po(e,3))}function is(t,e){var n=cf(t)?l:ah;return n(t,po(e,3))}function os(t,e,n,r){t=zs(t)?t:Wc(t),n=n&&!r?dc(n):0;var i=t.length;return n<0&&(n=Fl(i+n,0)),sc(t)?n<=i&&t.indexOf(e,n)>-1:!!i&&E(t,e,n)>-1}function as(t,e){var n=cf(t)?m:Dr;return n(t,po(e,3))}function ss(t,e,n,r){return null==t?[]:(cf(e)||(e=null==e?[]:[e]),n=r?it:n,cf(n)||(n=null==n?[]:[n]),Vr(t,e,n))}function cs(t,e,n){var r=cf(t)?g:P,i=arguments.length<3;return r(t,po(e,4),n,i,oh)}function us(t,e,n){var r=cf(t)?y:P,i=arguments.length<3;return r(t,po(e,4),n,i,ah)}function ls(t,e){var n=cf(t)?f:Yn;return n(t,Es(po(e,3)))}function hs(t){var e=cf(t)?_n:Qr;return e(t)}function fs(t,e,n){e=(n?Ao(t,e,n):e===it)?1:dc(e);var r=cf(t)?wn:ti;return r(t,e)}function ps(t){var e=cf(t)?bn:ni;return e(t)}function ds(t){if(null==t)return 0;if(zs(t))return sc(t)?Q(t):t.length;var e=gh(t);return e==Xt||e==Kt?t.size:Ur(t).length}function ms(t,e,n){var r=cf(t)?x:ii;return n&&Ao(t,e,n)&&(e=it),r(t,po(e,3))}function vs(t,e){if("function"!=typeof e)throw new nl(ct);return t=dc(t),function(){if(--t<1)return e.apply(this,arguments)}}function gs(t,e,n){return e=n?it:e,e=t&&null==e?t.length:e,io(t,xt,it,it,it,it,e)}function ys(t,e){var n;if("function"!=typeof e)throw new nl(ct);return t=dc(t),function(){return--t>0&&(n=e.apply(this,arguments)),t<=1&&(e=it),n}}function xs(t,e,n){e=n?it:e;var r=io(t,mt,it,it,it,it,it,e);return r.placeholder=xs.placeholder,r}function _s(t,e,n){e=n?it:e;var r=io(t,vt,it,it,it,it,it,e);return r.placeholder=_s.placeholder,r}function ws(t,e,n){function r(e){var n=f,r=p;return f=p=it,y=e,m=t.apply(r,n)}function i(t){return y=t,v=_h(s,e),x?r(t):m}function o(t){var n=t-g,r=t-y,i=e-n;return _?Dl(i,d-r):i}function a(t){var n=t-g,r=t-y;return g===it||n>=e||n<0||_&&r>=d}function s(){var t=Zh();return a(t)?c(t):void(v=_h(s,o(t)))}function c(t){return v=it,w&&f?r(t):(f=p=it,m)}function u(){v!==it&&fh(v),y=0,f=g=p=v=it}function l(){return v===it?m:c(Zh())}function h(){var t=Zh(),n=a(t);if(f=arguments,p=this,g=t,n){if(v===it)return i(g);if(_)return v=_h(s,e),r(g)}return v===it&&(v=_h(s,e)),m}var f,p,d,m,v,g,y=0,x=!1,_=!1,w=!0;if("function"!=typeof t)throw new nl(ct);return e=vc(e)||0,Js(n)&&(x=!!n.leading,_="maxWait"in n,d=_?Fl(vc(n.maxWait)||0,e):d,w="trailing"in n?!!n.trailing:w),h.cancel=u,h.flush=l,h}function bs(t){return io(t,wt)}function Ms(t,e){if("function"!=typeof t||e&&"function"!=typeof e)throw new nl(ct);var n=function(){var r=arguments,i=e?e.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=t.apply(this,r);return n.cache=o.set(i,a)||o,a};return n.cache=new(Ms.Cache||rn),n}function Es(t){if("function"!=typeof t)throw new nl(ct);return function(){var e=arguments;switch(e.length){case 0:return!t.call(this);case 1:return!t.call(this,e[0]);case 2:return!t.call(this,e[0],e[1]);case 3:return!t.call(this,e[0],e[1],e[2])}return!t.apply(this,e)}}function Ss(t){return ys(2,t)}function Ts(t,e){if("function"!=typeof t)throw new nl(ct);return e=e===it?e:dc(e),Kr(t,e)}function As(t,e){if("function"!=typeof t)throw new nl(ct);return e=e===it?0:Fl(dc(e),0),Kr(function(n){var r=n[e],i=_i(n,0,e);return r&&v(i,r),s(t,this,i)})}function Ls(t,e,n){var r=!0,i=!0;if("function"!=typeof t)throw new nl(ct);return Js(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),ws(t,e,{leading:r,maxWait:e,trailing:i})}function Cs(t){return gs(t,1)}function Ps(t,e){return e=null==e?bu:e,ef(e,t)}function Rs(){if(!arguments.length)return[];var t=arguments[0];return cf(t)?t:[t]}function Is(t){return Un(t,!1,!0)}function Os(t,e){return Un(t,!1,!0,e)}function Us(t){return Un(t,!0,!0)}function Ns(t,e){return Un(t,!0,!0,e)}function Fs(t,e){return null==e||Fn(t,e,Ic(e))}function Ds(t,e){return t===e||t!==t&&e!==e}function zs(t){return null!=t&&Zs(t.length)&&!qs(t)}function Bs(t){return $s(t)&&zs(t)}function ks(t){return t===!0||t===!1||$s(t)&&fl.call(t)==jt}function js(t){return null!=t&&1===t.nodeType&&$s(t)&&!oc(t)}function Gs(t){if(zs(t)&&(cf(t)||"string"==typeof t||"function"==typeof t.splice||lf(t)||mf(t)||sf(t)))return!t.length;var e=gh(t);if(e==Xt||e==Kt)return!t.size;if(Io(t))return!Ur(t).length;for(var n in t)if(ul.call(t,n))return!1;return!0}function Vs(t,e){return Sr(t,e)}function Hs(t,e,n){n="function"==typeof n?n:it;var r=n?n(t,e):it;return r===it?Sr(t,e,n):!!r}function Ws(t){return!!$s(t)&&(fl.call(t)==Vt||"string"==typeof t.message&&"string"==typeof t.name)}function Xs(t){return"number"==typeof t&&Ol(t)}function qs(t){var e=Js(t)?fl.call(t):"";return e==Ht||e==Wt||e==Jt}function Ys(t){return"number"==typeof t&&t==dc(t)}function Zs(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=It}function Js(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function $s(t){return null!=t&&"object"==typeof t}function Ks(t,e){return t===e||Lr(t,e,vo(e))}function Qs(t,e,n){return n="function"==typeof n?n:it,Lr(t,e,vo(e),n)}function tc(t){return ic(t)&&t!=+t}function ec(t){if(yh(t))throw new Ju(st);return Cr(t)}function nc(t){return null===t}function rc(t){return null==t}function ic(t){return"number"==typeof t||$s(t)&&fl.call(t)==qt}function oc(t){if(!$s(t)||fl.call(t)!=Yt)return!1;var e=xl(t);if(null===e)return!0;var n=ul.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&cl.call(n)==hl}function ac(t){return Ys(t)&&t>=-It&&t<=It}function sc(t){return"string"==typeof t||!cf(t)&&$s(t)&&fl.call(t)==Qt}function cc(t){return"symbol"==typeof t||$s(t)&&fl.call(t)==te}function uc(t){return t===it}function lc(t){return $s(t)&&gh(t)==ee}function hc(t){return $s(t)&&fl.call(t)==ne}function fc(t){if(!t)return[];if(zs(t))return sc(t)?tt(t):Oi(t);if(_l&&t[_l])return W(t[_l]());var e=gh(t),n=e==Xt?X:e==Kt?Z:Wc;return n(t)}function pc(t){if(!t)return 0===t?t:0;if(t=vc(t),t===Rt||t===-Rt){var e=t<0?-1:1;return e*Ot}return t===t?t:0}function dc(t){var e=pc(t),n=e%1;return e===e?n?e-n:e:0}function mc(t){return t?Rn(dc(t),0,Nt):0}function vc(t){if("number"==typeof t)return t;if(cc(t))return Ut;if(Js(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=Js(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(Pe,"");var n=je.test(t);return n||Ve.test(t)?qn(t.slice(2),n?2:8):ke.test(t)?Ut:+t}function gc(t){return Ui(t,Oc(t))}function yc(t){return Rn(dc(t),-It,It)}function xc(t){return null==t?"":ui(t)}function _c(t,e){var n=ih(t);return e?Ln(n,e):n}function wc(t,e){return b(t,po(e,3),$n)}function bc(t,e){return b(t,po(e,3),Kn)}function Mc(t,e){return null==t?t:sh(t,po(e,3),Oc)}function Ec(t,e){return null==t?t:ch(t,po(e,3),Oc)}function Sc(t,e){return t&&$n(t,po(e,3))}function Tc(t,e){return t&&Kn(t,po(e,3))}function Ac(t){return null==t?[]:tr(t,Ic(t))}function Lc(t){return null==t?[]:tr(t,Oc(t))}function Cc(t,e,n){var r=null==t?it:er(t,e);return r===it?n:r}function Pc(t,e){return null!=t&&_o(t,e,vr)}function Rc(t,e){return null!=t&&_o(t,e,gr)}function Ic(t){return zs(t)?xn(t):Ur(t)}function Oc(t){return zs(t)?xn(t,!0):Nr(t)}function Uc(t,e){var n={};return e=po(e,3),$n(t,function(t,r,i){Cn(n,e(t,r,i),t)}),n}function Nc(t,e){var n={};return e=po(e,3),$n(t,function(t,r,i){Cn(n,r,e(t,r,i))}),n}function Fc(t,e){return Dc(t,Es(po(e)))}function Dc(t,e){return null==t?{}:Wr(t,lo(t),po(e))}function zc(t,e,n){e=Lo(e,t)?[e]:xi(e);var r=-1,i=e.length;for(i||(t=it,i=1);++r<i;){var o=null==t?it:t[Wo(e[r])];o===it&&(r=i,o=n),t=qs(o)?o.call(t):o}return t}function Bc(t,e,n){return null==t?t:ei(t,e,n)}function kc(t,e,n,r){return r="function"==typeof r?r:it,null==t?t:ei(t,e,n,r)}function jc(t,e,n){var r=cf(t),i=r||lf(t)||mf(t);if(e=po(e,4),null==n){var o=t&&t.constructor;n=i?r?new o:[]:Js(t)&&qs(o)?ih(xl(t)):{}}return(i?u:$n)(t,function(t,r,i){return e(n,t,r,i)}),n}function Gc(t,e){return null==t||hi(t,e)}function Vc(t,e,n){return null==t?t:fi(t,e,yi(n))}function Hc(t,e,n,r){return r="function"==typeof r?r:it,null==t?t:fi(t,e,yi(n),r)}function Wc(t){return t?F(t,Ic(t)):[]}function Xc(t){return null==t?[]:F(t,Oc(t))}function qc(t,e,n){return n===it&&(n=e,e=it),n!==it&&(n=vc(n),n=n===n?n:0),e!==it&&(e=vc(e),e=e===e?e:0),Rn(vc(t),e,n)}function Yc(t,e,n){return e=pc(e),n===it?(n=e,e=0):n=pc(n),t=vc(t),yr(t,e,n)}function Zc(t,e,n){if(n&&"boolean"!=typeof n&&Ao(t,e,n)&&(e=n=it),n===it&&("boolean"==typeof e?(n=e,e=it):"boolean"==typeof t&&(n=t,t=it)),t===it&&e===it?(t=0,e=1):(t=pc(t),e===it?(e=t,t=0):e=pc(e)),t>e){var r=t;t=e,e=r}if(n||t%1||e%1){var i=kl();return Dl(t+i*(e-t+Xn("1e-"+((i+"").length-1))),e)}return Zr(t,e)}function Jc(t){return jf(xc(t).toLowerCase())}function $c(t){return t=xc(t),t&&t.replace(We,ur).replace(On,"")}function Kc(t,e,n){t=xc(t),e=ui(e);var r=t.length;n=n===it?r:Rn(dc(n),0,r);var i=n;return n-=e.length,n>=0&&t.slice(n,i)==e}function Qc(t){return t=xc(t),t&&_e.test(t)?t.replace(ye,lr):t}function tu(t){return t=xc(t),t&&Ce.test(t)?t.replace(Le,"\\$&"):t}function eu(t,e,n){t=xc(t),e=dc(e);var r=e?Q(t):0;if(!e||r>=e)return t;var i=(e-r)/2;return $i(Pl(i),n)+t+$i(Cl(i),n)}function nu(t,e,n){t=xc(t),e=dc(e);var r=e?Q(t):0;return e&&r<e?t+$i(e-r,n):t}function ru(t,e,n){t=xc(t),e=dc(e);var r=e?Q(t):0;return e&&r<e?$i(e-r,n)+t:t}function iu(t,e,n){return n||null==e?e=0:e&&(e=+e),Bl(xc(t).replace(Re,""),e||0)}function ou(t,e,n){return e=(n?Ao(t,e,n):e===it)?1:dc(e),$r(xc(t),e)}function au(){var t=arguments,e=xc(t[0]);return t.length<3?e:e.replace(t[1],t[2])}function su(t,e,n){return n&&"number"!=typeof n&&Ao(t,e,n)&&(e=n=it),(n=n===it?Nt:n>>>0)?(t=xc(t),t&&("string"==typeof e||null!=e&&!pf(e))&&(e=ui(e),!e&&V(t))?_i(tt(t),0,n):t.split(e,n)):[]}function cu(t,e,n){return t=xc(t),n=Rn(dc(n),0,t.length),e=ui(e),t.slice(n,n+e.length)==e}function uu(t,n,r){var i=e.templateSettings;r&&Ao(t,n,r)&&(n=it),t=xc(t),n=_f({},n,i,Mn);var o,a,s=_f({},n.imports,i.imports,Mn),c=Ic(s),u=F(s,c),l=0,h=n.interpolate||Xe,f="__p += '",p=tl((n.escape||Xe).source+"|"+h.source+"|"+(h===Me?ze:Xe).source+"|"+(n.evaluate||Xe).source+"|$","g"),d="//# sourceURL="+("sourceURL"in n?n.sourceURL:"lodash.templateSources["+ ++Bn+"]")+"\n";t.replace(p,function(e,n,r,i,s,c){return r||(r=i),f+=t.slice(l,c).replace(qe,j),n&&(o=!0,f+="' +\n__e("+n+") +\n'"),s&&(a=!0,f+="';\n"+s+";\n__p += '"),r&&(f+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),l=c+e.length,e}),f+="';\n";var m=n.variable;m||(f="with (obj) {\n"+f+"\n}\n"),f=(a?f.replace(de,""):f).replace(me,"$1").replace(ve,"$1;"),f="function("+(m||"obj")+") {\n"+(m?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(o?", __e = _.escape":"")+(a?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+f+"return __p\n}";var v=Gf(function(){return $u(c,d+"return "+f).apply(it,u)});if(v.source=f,Ws(v))throw v;return v}function lu(t){return xc(t).toLowerCase()}function hu(t){return xc(t).toUpperCase()}function fu(t,e,n){if(t=xc(t),t&&(n||e===it))return t.replace(Pe,"");if(!t||!(e=ui(e)))return t;var r=tt(t),i=tt(e),o=z(r,i),a=B(r,i)+1;return _i(r,o,a).join("")}function pu(t,e,n){if(t=xc(t),t&&(n||e===it))return t.replace(Ie,"");if(!t||!(e=ui(e)))return t;var r=tt(t),i=B(r,tt(e))+1;return _i(r,0,i).join("")}function du(t,e,n){if(t=xc(t),t&&(n||e===it))return t.replace(Re,"");if(!t||!(e=ui(e)))return t;var r=tt(t),i=z(r,tt(e));return _i(r,i).join("")}function mu(t,e){var n=Et,r=St;if(Js(e)){var i="separator"in e?e.separator:i;n="length"in e?dc(e.length):n,r="omission"in e?ui(e.omission):r}t=xc(t);var o=t.length;if(V(t)){var a=tt(t);o=a.length}if(n>=o)return t;var s=n-Q(r);if(s<1)return r;var c=a?_i(a,0,s).join(""):t.slice(0,s);if(i===it)return c+r;if(a&&(s+=c.length-s),pf(i)){if(t.slice(s).search(i)){var u,l=c;for(i.global||(i=tl(i.source,xc(Be.exec(i))+"g")),i.lastIndex=0;u=i.exec(l);)var h=u.index;c=c.slice(0,h===it?s:h)}}else if(t.indexOf(ui(i),s)!=s){var f=c.lastIndexOf(i);f>-1&&(c=c.slice(0,f))}return c+r}function vu(t){return t=xc(t),t&&xe.test(t)?t.replace(ge,hr):t}function gu(t,e,n){return t=xc(t),e=n?it:e,e===it?H(t)?rt(t):w(t):t.match(e)||[]}function yu(t){var e=t?t.length:0,n=po();return t=e?m(t,function(t){if("function"!=typeof t[1])throw new nl(ct);return[n(t[0]),t[1]]}):[],Kr(function(n){for(var r=-1;++r<e;){var i=t[r];if(s(i[0],this,n))return s(i[1],this,n)}})}function xu(t){return Nn(Un(t,!0))}function _u(t){return function(){return t}}function wu(t,e){return null==t||t!==t?e:t}function bu(t){return t}function Mu(t){return Or("function"==typeof t?t:Un(t,!0))}function Eu(t){return zr(Un(t,!0))}function Su(t,e){return Br(t,Un(e,!0))}function Tu(t,e,n){var r=Ic(e),i=tr(e,r);null!=n||Js(e)&&(i.length||!r.length)||(n=e,e=t,t=this,i=tr(e,Ic(e)));var o=!(Js(n)&&"chain"in n&&!n.chain),a=qs(t);return u(i,function(n){var r=e[n];t[n]=r,a&&(t.prototype[n]=function(){var e=this.__chain__;if(o||e){var n=t(this.__wrapped__),i=n.__actions__=Oi(this.__actions__);return i.push({func:r,args:arguments,thisArg:t}),n.__chain__=e,n}return r.apply(t,v([this.value()],arguments))})}),t}function Au(){return Jn._===this&&(Jn._=pl),this}function Lu(){}function Cu(t){return t=dc(t),Kr(function(e){return Gr(e,t)})}function Pu(t){return Lo(t)?L(Wo(t)):Xr(t)}function Ru(t){return function(e){return null==t?it:er(t,e)}}function Iu(){return[]}function Ou(){return!1}function Uu(){return{}}function Nu(){return""}function Fu(){return!0}function Du(t,e){if(t=dc(t),t<1||t>It)return[];var n=Nt,r=Dl(t,Nt);e=po(e),t-=Nt;for(var i=O(r,e);++n<t;)e(n);return i}function zu(t){return cf(t)?m(t,Wo):cc(t)?[t]:Oi(bh(t))}function Bu(t){var e=++ll;return xc(t)+e}function ku(t){return t&&t.length?Hn(t,bu,mr):it}function ju(t,e){return t&&t.length?Hn(t,po(e,2),mr):it}function Gu(t){return A(t,bu)}function Vu(t,e){return A(t,po(e,2))}function Hu(t){return t&&t.length?Hn(t,bu,Fr):it}function Wu(t,e){return t&&t.length?Hn(t,po(e,2),Fr):it}function Xu(t){return t&&t.length?I(t,bu):0}function qu(t,e){return t&&t.length?I(t,po(e,2)):0}t=t?pr.defaults(Jn.Object(),t,pr.pick(Jn,zn)):Jn;var Yu=t.Array,Zu=t.Date,Ju=t.Error,$u=t.Function,Ku=t.Math,Qu=t.Object,tl=t.RegExp,el=t.String,nl=t.TypeError,rl=Yu.prototype,il=$u.prototype,ol=Qu.prototype,al=t["__core-js_shared__"],sl=function(){var t=/[^.]+$/.exec(al&&al.keys&&al.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}(),cl=il.toString,ul=ol.hasOwnProperty,ll=0,hl=cl.call(Qu),fl=ol.toString,pl=Jn._,dl=tl("^"+cl.call(ul).replace(Le,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ml=Qn?t.Buffer:it,vl=t.Symbol,gl=t.Uint8Array,yl=ml?ml.allocUnsafe:it,xl=q(Qu.getPrototypeOf,Qu),_l=vl?vl.iterator:it,wl=Qu.create,bl=ol.propertyIsEnumerable,Ml=rl.splice,El=vl?vl.isConcatSpreadable:it,Sl=function(){try{var t=go(Qu,"defineProperty");return t({},"",{}),t}catch(e){}}(),Tl=t.clearTimeout!==Jn.clearTimeout&&t.clearTimeout,Al=Zu&&Zu.now!==Jn.Date.now&&Zu.now,Ll=t.setTimeout!==Jn.setTimeout&&t.setTimeout,Cl=Ku.ceil,Pl=Ku.floor,Rl=Qu.getOwnPropertySymbols,Il=ml?ml.isBuffer:it,Ol=t.isFinite,Ul=rl.join,Nl=q(Qu.keys,Qu),Fl=Ku.max,Dl=Ku.min,zl=Zu.now,Bl=t.parseInt,kl=Ku.random,jl=rl.reverse,Gl=go(t,"DataView"),Vl=go(t,"Map"),Hl=go(t,"Promise"),Wl=go(t,"Set"),Xl=go(t,"WeakMap"),ql=go(Qu,"create"),Yl=Xl&&new Xl,Zl={},Jl=Xo(Gl),$l=Xo(Vl),Kl=Xo(Hl),Ql=Xo(Wl),th=Xo(Xl),eh=vl?vl.prototype:it,nh=eh?eh.valueOf:it,rh=eh?eh.toString:it,ih=function(){function t(){}return function(e){if(!Js(e))return{};if(wl)return wl(e);t.prototype=e;var n=new t;return t.prototype=it,n}}();e.templateSettings={escape:we,evaluate:be,interpolate:Me,variable:"",imports:{_:e}},e.prototype=n.prototype,e.prototype.constructor=e,r.prototype=ih(n.prototype),r.prototype.constructor=r,i.prototype=ih(n.prototype),i.prototype.constructor=i,et.prototype.clear=nt,et.prototype["delete"]=Fe,et.prototype.get=Ye,et.prototype.has=Ze,et.prototype.set=Je,$e.prototype.clear=Ke,$e.prototype["delete"]=Qe,$e.prototype.get=tn,$e.prototype.has=en,$e.prototype.set=nn,rn.prototype.clear=on,rn.prototype["delete"]=an,rn.prototype.get=sn,rn.prototype.has=cn,rn.prototype.set=un,ln.prototype.add=ln.prototype.push=hn,ln.prototype.has=fn,pn.prototype.clear=dn,pn.prototype["delete"]=mn,pn.prototype.get=vn,pn.prototype.has=gn,pn.prototype.set=yn;var oh=zi($n),ah=zi(Kn,!0),sh=Bi(),ch=Bi(!0),uh=Yl?function(t,e){return Yl.set(t,e),t}:bu,lh=Sl?function(t,e){return Sl(t,"toString",{configurable:!0,enumerable:!1,value:_u(e),writable:!0})}:bu,hh=Kr,fh=Tl||function(t){return Jn.clearTimeout(t)},ph=Wl&&1/Z(new Wl([,-0]))[1]==Rt?function(t){return new Wl(t)}:Lu,dh=Yl?function(t){return Yl.get(t)}:Lu,mh=Rl?q(Rl,Qu):Iu,vh=Rl?function(t){for(var e=[];t;)v(e,mh(t)),t=xl(t);return e}:Iu,gh=fr;(Gl&&gh(new Gl(new ArrayBuffer(1)))!=ie||Vl&&gh(new Vl)!=Xt||Hl&&gh(Hl.resolve())!=Zt||Wl&&gh(new Wl)!=Kt||Xl&&gh(new Xl)!=ee)&&(gh=function(t){var e=fl.call(t),n=e==Yt?t.constructor:it,r=n?Xo(n):it;if(r)switch(r){case Jl:return ie;case $l:return Xt;case Kl:return Zt;case Ql:return Kt;case th:return ee}return e});var yh=al?qs:Ou,xh=Vo(uh),_h=Ll||function(t,e){return Jn.setTimeout(t,e)},wh=Vo(lh),bh=No(function(t){t=xc(t);var e=[];return Te.test(t)&&e.push(""),t.replace(Ae,function(t,n,r,i){e.push(r?i.replace(De,"$1"):n||t)}),e}),Mh=Kr(function(t,e){return Bs(t)?Gn(t,Zn(e,1,Bs,!0)):[]}),Eh=Kr(function(t,e){var n=pa(e);return Bs(n)&&(n=it),Bs(t)?Gn(t,Zn(e,1,Bs,!0),po(n,2)):[]}),Sh=Kr(function(t,e){var n=pa(e);return Bs(n)&&(n=it),Bs(t)?Gn(t,Zn(e,1,Bs,!0),it,n):[]}),Th=Kr(function(t){var e=m(t,gi);return e.length&&e[0]===t[0]?xr(e):[]}),Ah=Kr(function(t){var e=pa(t),n=m(t,gi);return e===pa(n)?e=it:n.pop(),n.length&&n[0]===t[0]?xr(n,po(e,2)):[]}),Lh=Kr(function(t){var e=pa(t),n=m(t,gi);return e===pa(n)?e=it:n.pop(),n.length&&n[0]===t[0]?xr(n,it,e):[]}),Ch=Kr(va),Ph=co(function(t,e){var n=t?t.length:0,r=Pn(t,e);return Yr(t,m(e,function(t){return To(t,n)?+t:t}).sort(Ci)),r}),Rh=Kr(function(t){return li(Zn(t,1,Bs,!0))}),Ih=Kr(function(t){var e=pa(t);return Bs(e)&&(e=it),li(Zn(t,1,Bs,!0),po(e,2))}),Oh=Kr(function(t){var e=pa(t);return Bs(e)&&(e=it),li(Zn(t,1,Bs,!0),it,e)}),Uh=Kr(function(t,e){return Bs(t)?Gn(t,e):[]}),Nh=Kr(function(t){return mi(f(t,Bs))}),Fh=Kr(function(t){var e=pa(t);return Bs(e)&&(e=it),mi(f(t,Bs),po(e,2))}),Dh=Kr(function(t){var e=pa(t);return Bs(e)&&(e=it),mi(f(t,Bs),it,e)}),zh=Kr(za),Bh=Kr(function(t){var e=t.length,n=e>1?t[e-1]:it;return n="function"==typeof n?(t.pop(),n):it,Ba(t,n)}),kh=co(function(t){var e=t.length,n=e?t[0]:0,o=this.__wrapped__,a=function(e){return Pn(e,t)};return!(e>1||this.__actions__.length)&&o instanceof i&&To(n)?(o=o.slice(n,+n+(e?1:0)),o.__actions__.push({func:Ha,args:[a],thisArg:it}),new r(o,this.__chain__).thru(function(t){return e&&!t.length&&t.push(it),t})):this.thru(a)}),jh=Fi(function(t,e,n){ul.call(t,n)?++t[n]:Cn(t,n,1)}),Gh=Wi(ra),Vh=Wi(ia),Hh=Fi(function(t,e,n){ul.call(t,n)?t[n].push(e):Cn(t,n,[e])}),Wh=Kr(function(t,e,n){var r=-1,i="function"==typeof e,o=Lo(e),a=zs(t)?Yu(t.length):[];return oh(t,function(t){var c=i?e:o&&null!=t?t[e]:it;a[++r]=c?s(c,t,n):wr(t,e,n)}),a}),Xh=Fi(function(t,e,n){Cn(t,n,e)}),qh=Fi(function(t,e,n){t[n?0:1].push(e)},function(){return[[],[]]}),Yh=Kr(function(t,e){if(null==t)return[];var n=e.length;return n>1&&Ao(t,e[0],e[1])?e=[]:n>2&&Ao(e[0],e[1],e[2])&&(e=[e[0]]),Vr(t,Zn(e,1),[])}),Zh=Al||function(){return Jn.Date.now()},Jh=Kr(function(t,e,n){var r=ft;if(n.length){var i=Y(n,fo(Jh));r|=gt}return io(t,r,e,n,i)}),$h=Kr(function(t,e,n){var r=ft|pt;if(n.length){var i=Y(n,fo($h));r|=gt}return io(e,r,t,n,i)}),Kh=Kr(function(t,e){return Dn(t,1,e)}),Qh=Kr(function(t,e,n){return Dn(t,vc(e)||0,n)});Ms.Cache=rn;var tf=hh(function(t,e){e=1==e.length&&cf(e[0])?m(e[0],N(po())):m(Zn(e,1),N(po()));var n=e.length;return Kr(function(r){for(var i=-1,o=Dl(r.length,n);++i<o;)r[i]=e[i].call(this,r[i]);return s(t,this,r)})}),ef=Kr(function(t,e){var n=Y(e,fo(ef));return io(t,gt,it,e,n)}),nf=Kr(function(t,e){var n=Y(e,fo(nf));return io(t,yt,it,e,n)}),rf=co(function(t,e){return io(t,_t,it,it,it,e)}),of=to(mr),af=to(function(t,e){return t>=e}),sf=br(function(){return arguments}())?br:function(t){return $s(t)&&ul.call(t,"callee")&&!bl.call(t,"callee")},cf=Yu.isArray,uf=nr?N(nr):Mr,lf=Il||Ou,hf=rr?N(rr):Er,ff=ir?N(ir):Ar,pf=or?N(or):Pr,df=ar?N(ar):Rr,mf=sr?N(sr):Ir,vf=to(Fr),gf=to(function(t,e){return t<=e}),yf=Di(function(t,e){if(Io(e)||zs(e))return void Ui(e,Ic(e),t);for(var n in e)ul.call(e,n)&&Sn(t,n,e[n])}),xf=Di(function(t,e){Ui(e,Oc(e),t)}),_f=Di(function(t,e,n,r){Ui(e,Oc(e),t,r)}),wf=Di(function(t,e,n,r){Ui(e,Ic(e),t,r)}),bf=co(Pn),Mf=Kr(function(t){return t.push(it,Mn),s(_f,it,t)}),Ef=Kr(function(t){return t.push(it,Do),s(Cf,it,t)}),Sf=Yi(function(t,e,n){t[e]=n},_u(bu)),Tf=Yi(function(t,e,n){ul.call(t,e)?t[e].push(n):t[e]=[n]},po),Af=Kr(wr),Lf=Di(function(t,e,n){kr(t,e,n)}),Cf=Di(function(t,e,n,r){kr(t,e,n,r)}),Pf=co(function(t,e){return null==t?{}:(e=m(e,Wo),Hr(t,Gn(lo(t),e)))}),Rf=co(function(t,e){return null==t?{}:Hr(t,m(e,Wo))}),If=ro(Ic),Of=ro(Oc),Uf=Gi(function(t,e,n){return e=e.toLowerCase(),t+(n?Jc(e):e)}),Nf=Gi(function(t,e,n){return t+(n?"-":"")+e.toLowerCase()}),Ff=Gi(function(t,e,n){return t+(n?" ":"")+e.toLowerCase()}),Df=ji("toLowerCase"),zf=Gi(function(t,e,n){return t+(n?"_":"")+e.toLowerCase()}),Bf=Gi(function(t,e,n){return t+(n?" ":"")+jf(e)}),kf=Gi(function(t,e,n){return t+(n?" ":"")+e.toUpperCase()}),jf=ji("toUpperCase"),Gf=Kr(function(t,e){try{return s(t,it,e)}catch(n){return Ws(n)?n:new Ju(n)}}),Vf=co(function(t,e){return u(e,function(e){e=Wo(e),Cn(t,e,Jh(t[e],t))}),t}),Hf=Xi(),Wf=Xi(!0),Xf=Kr(function(t,e){return function(n){return wr(n,t,e)}}),qf=Kr(function(t,e){return function(n){return wr(t,n,e)}}),Yf=Ji(m),Zf=Ji(h),Jf=Ji(x),$f=Qi(),Kf=Qi(!0),Qf=Zi(function(t,e){return t+e},0),tp=no("ceil"),ep=Zi(function(t,e){return t/e},1),np=no("floor"),rp=Zi(function(t,e){return t*e},1),ip=no("round"),op=Zi(function(t,e){return t-e},0);return e.after=vs,e.ary=gs,e.assign=yf,e.assignIn=xf,e.assignInWith=_f,e.assignWith=wf,e.at=bf,e.before=ys,e.bind=Jh,e.bindAll=Vf,e.bindKey=$h,e.castArray=Rs,e.chain=Ga,e.chunk=Zo,e.compact=Jo,e.concat=$o,e.cond=yu,e.conforms=xu,e.constant=_u,e.countBy=jh,e.create=_c,e.curry=xs,e.curryRight=_s,e.debounce=ws,e.defaults=Mf,e.defaultsDeep=Ef,e.defer=Kh,e.delay=Qh,e.difference=Mh,e.differenceBy=Eh,e.differenceWith=Sh,e.drop=Ko,e.dropRight=Qo,e.dropRightWhile=ta,e.dropWhile=ea,e.fill=na,e.filter=Qa,e.flatMap=ts,e.flatMapDeep=es,e.flatMapDepth=ns,e.flatten=oa,e.flattenDeep=aa,e.flattenDepth=sa,e.flip=bs,e.flow=Hf,e.flowRight=Wf,e.fromPairs=ca,e.functions=Ac,e.functionsIn=Lc,e.groupBy=Hh,e.initial=ha,e.intersection=Th,e.intersectionBy=Ah,e.intersectionWith=Lh,e.invert=Sf,e.invertBy=Tf,e.invokeMap=Wh,e.iteratee=Mu,e.keyBy=Xh,e.keys=Ic,e.keysIn=Oc,e.map=as,e.mapKeys=Uc,e.mapValues=Nc,e.matches=Eu,e.matchesProperty=Su,e.memoize=Ms,e.merge=Lf,e.mergeWith=Cf,e.method=Xf,e.methodOf=qf,e.mixin=Tu,e.negate=Es,e.nthArg=Cu,e.omit=Pf,e.omitBy=Fc,e.once=Ss,e.orderBy=ss,e.over=Yf,e.overArgs=tf,e.overEvery=Zf,e.overSome=Jf,e.partial=ef,e.partialRight=nf,e.partition=qh,e.pick=Rf,e.pickBy=Dc,e.property=Pu,e.propertyOf=Ru,e.pull=Ch,e.pullAll=va,e.pullAllBy=ga,e.pullAllWith=ya,e.pullAt=Ph,e.range=$f,e.rangeRight=Kf,e.rearg=rf,e.reject=ls,e.remove=xa,e.rest=Ts,e.reverse=_a,e.sampleSize=fs,e.set=Bc,e.setWith=kc,e.shuffle=ps,e.slice=wa,e.sortBy=Yh,e.sortedUniq=La,e.sortedUniqBy=Ca,e.split=su,e.spread=As,e.tail=Pa,e.take=Ra,e.takeRight=Ia,e.takeRightWhile=Oa,e.takeWhile=Ua,e.tap=Va,e.throttle=Ls,e.thru=Ha,e.toArray=fc,e.toPairs=If,e.toPairsIn=Of,e.toPath=zu,e.toPlainObject=gc,e.transform=jc,e.unary=Cs,e.union=Rh,e.unionBy=Ih,e.unionWith=Oh,e.uniq=Na,e.uniqBy=Fa,e.uniqWith=Da,e.unset=Gc,e.unzip=za,e.unzipWith=Ba,e.update=Vc,e.updateWith=Hc,e.values=Wc,e.valuesIn=Xc,e.without=Uh,e.words=gu,e.wrap=Ps,e.xor=Nh,e.xorBy=Fh,e.xorWith=Dh,e.zip=zh,e.zipObject=ka,e.zipObjectDeep=ja,e.zipWith=Bh,e.entries=If,e.entriesIn=Of,e.extend=xf,e.extendWith=_f,Tu(e,e),e.add=Qf,e.attempt=Gf,e.camelCase=Uf,e.capitalize=Jc,e.ceil=tp,e.clamp=qc,e.clone=Is,e.cloneDeep=Us,e.cloneDeepWith=Ns,e.cloneWith=Os,e.conformsTo=Fs,e.deburr=$c,e.defaultTo=wu,e.divide=ep,e.endsWith=Kc,e.eq=Ds,e.escape=Qc,e.escapeRegExp=tu,e.every=Ka,e.find=Gh,e.findIndex=ra,e.findKey=wc,e.findLast=Vh,e.findLastIndex=ia,e.findLastKey=bc,e.floor=np,e.forEach=rs,e.forEachRight=is,e.forIn=Mc,e.forInRight=Ec,e.forOwn=Sc,e.forOwnRight=Tc,e.get=Cc,e.gt=of,e.gte=af,e.has=Pc,e.hasIn=Rc,e.head=ua,e.identity=bu,e.includes=os,e.indexOf=la,e.inRange=Yc,e.invoke=Af,e.isArguments=sf,e.isArray=cf,e.isArrayBuffer=uf,e.isArrayLike=zs,e.isArrayLikeObject=Bs,e.isBoolean=ks,e.isBuffer=lf,e.isDate=hf,e.isElement=js,e.isEmpty=Gs,e.isEqual=Vs,e.isEqualWith=Hs,e.isError=Ws,e.isFinite=Xs,e.isFunction=qs,e.isInteger=Ys,e.isLength=Zs,e.isMap=ff,e.isMatch=Ks,e.isMatchWith=Qs,e.isNaN=tc,e.isNative=ec,e.isNil=rc,e.isNull=nc,e.isNumber=ic,e.isObject=Js,e.isObjectLike=$s,e.isPlainObject=oc,e.isRegExp=pf,e.isSafeInteger=ac,e.isSet=df,e.isString=sc,e.isSymbol=cc,e.isTypedArray=mf,e.isUndefined=uc,e.isWeakMap=lc,e.isWeakSet=hc,e.join=fa,e.kebabCase=Nf,e.last=pa,e.lastIndexOf=da,e.lowerCase=Ff,e.lowerFirst=Df,e.lt=vf,e.lte=gf,e.max=ku,e.maxBy=ju,e.mean=Gu,e.meanBy=Vu,e.min=Hu,e.minBy=Wu,e.stubArray=Iu,e.stubFalse=Ou,e.stubObject=Uu,e.stubString=Nu,e.stubTrue=Fu,e.multiply=rp,e.nth=ma,e.noConflict=Au,e.noop=Lu,e.now=Zh,e.pad=eu,e.padEnd=nu,e.padStart=ru,e.parseInt=iu,e.random=Zc,e.reduce=cs,e.reduceRight=us,e.repeat=ou,e.replace=au,e.result=zc,e.round=ip,e.runInContext=dr,e.sample=hs,e.size=ds,e.snakeCase=zf,e.some=ms,e.sortedIndex=ba,e.sortedIndexBy=Ma,e.sortedIndexOf=Ea,e.sortedLastIndex=Sa,e.sortedLastIndexBy=Ta,e.sortedLastIndexOf=Aa,e.startCase=Bf,
  e.startsWith=cu,e.subtract=op,e.sum=Xu,e.sumBy=qu,e.template=uu,e.times=Du,e.toFinite=pc,e.toInteger=dc,e.toLength=mc,e.toLower=lu,e.toNumber=vc,e.toSafeInteger=yc,e.toString=xc,e.toUpper=hu,e.trim=fu,e.trimEnd=pu,e.trimStart=du,e.truncate=mu,e.unescape=vu,e.uniqueId=Bu,e.upperCase=kf,e.upperFirst=jf,e.each=rs,e.eachRight=is,e.first=ua,Tu(e,function(){var t={};return $n(e,function(n,r){ul.call(e.prototype,r)||(t[r]=n)}),t}(),{chain:!1}),e.VERSION=ot,u(["bind","bindKey","curry","curryRight","partial","partialRight"],function(t){e[t].placeholder=e}),u(["drop","take"],function(t,e){i.prototype[t]=function(n){var r=this.__filtered__;if(r&&!e)return new i(this);n=n===it?1:Fl(dc(n),0);var o=this.clone();return r?o.__takeCount__=Dl(n,o.__takeCount__):o.__views__.push({size:Dl(n,Nt),type:t+(o.__dir__<0?"Right":"")}),o},i.prototype[t+"Right"]=function(e){return this.reverse()[t](e).reverse()}}),u(["filter","map","takeWhile"],function(t,e){var n=e+1,r=n==Lt||n==Pt;i.prototype[t]=function(t){var e=this.clone();return e.__iteratees__.push({iteratee:po(t,3),type:n}),e.__filtered__=e.__filtered__||r,e}}),u(["head","last"],function(t,e){var n="take"+(e?"Right":"");i.prototype[t]=function(){return this[n](1).value()[0]}}),u(["initial","tail"],function(t,e){var n="drop"+(e?"":"Right");i.prototype[t]=function(){return this.__filtered__?new i(this):this[n](1)}}),i.prototype.compact=function(){return this.filter(bu)},i.prototype.find=function(t){return this.filter(t).head()},i.prototype.findLast=function(t){return this.reverse().find(t)},i.prototype.invokeMap=Kr(function(t,e){return"function"==typeof t?new i(this):this.map(function(n){return wr(n,t,e)})}),i.prototype.reject=function(t){return this.filter(Es(po(t)))},i.prototype.slice=function(t,e){t=dc(t);var n=this;return n.__filtered__&&(t>0||e<0)?new i(n):(t<0?n=n.takeRight(-t):t&&(n=n.drop(t)),e!==it&&(e=dc(e),n=e<0?n.dropRight(-e):n.take(e-t)),n)},i.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()},i.prototype.toArray=function(){return this.take(Nt)},$n(i.prototype,function(t,n){var o=/^(?:filter|find|map|reject)|While$/.test(n),a=/^(?:head|last)$/.test(n),s=e[a?"take"+("last"==n?"Right":""):n],c=a||/^find/.test(n);s&&(e.prototype[n]=function(){var n=this.__wrapped__,u=a?[1]:arguments,l=n instanceof i,h=u[0],f=l||cf(n),p=function(t){var n=s.apply(e,v([t],u));return a&&d?n[0]:n};f&&o&&"function"==typeof h&&1!=h.length&&(l=f=!1);var d=this.__chain__,m=!!this.__actions__.length,g=c&&!d,y=l&&!m;if(!c&&f){n=y?n:new i(this);var x=t.apply(n,u);return x.__actions__.push({func:Ha,args:[p],thisArg:it}),new r(x,d)}return g&&y?t.apply(this,u):(x=this.thru(p),g?a?x.value()[0]:x.value():x)})}),u(["pop","push","shift","sort","splice","unshift"],function(t){var n=rl[t],r=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",i=/^(?:pop|shift)$/.test(t);e.prototype[t]=function(){var t=arguments;if(i&&!this.__chain__){var e=this.value();return n.apply(cf(e)?e:[],t)}return this[r](function(e){return n.apply(cf(e)?e:[],t)})}}),$n(i.prototype,function(t,n){var r=e[n];if(r){var i=r.name+"",o=Zl[i]||(Zl[i]=[]);o.push({name:n,func:r})}}),Zl[qi(it,pt).name]=[{name:"wrapper",func:it}],i.prototype.clone=_,i.prototype.reverse=C,i.prototype.value=$,e.prototype.at=kh,e.prototype.chain=Wa,e.prototype.commit=Xa,e.prototype.next=qa,e.prototype.plant=Za,e.prototype.reverse=Ja,e.prototype.toJSON=e.prototype.valueOf=e.prototype.value=$a,e.prototype.first=e.prototype.head,_l&&(e.prototype[_l]=Ya),e},pr=fr();Jn._=pr,r=function(){return pr}.call(e,n,e,i),!(r!==it&&(i.exports=r))}).call(this)}).call(e,function(){return this}(),n(319)(t))},function(t,e,n){var r=n(19);t.exports=function(t,e){if("number"!=typeof t&&"Number"!=r(t))throw TypeError(e);return+t}},function(t,e,n){"use strict";var r=n(10),i=n(39),o=n(9);t.exports=[].copyWithin||function(t,e){var n=r(this),a=o(n.length),s=i(t,a),c=i(e,a),u=arguments.length>2?arguments[2]:void 0,l=Math.min((void 0===u?a:i(u,a))-c,a-s),h=1;for(c<s&&s<c+l&&(h=-1,c+=l-1,s+=l-1);l-- >0;)c in n?n[s]=n[c]:delete n[s],s+=h,c+=h;return n}},function(t,e,n){var r=n(42);t.exports=function(t,e){var n=[];return r(t,!1,n.push,n,e),n}},function(t,e,n){var r=n(12),i=n(10),o=n(47),a=n(9);t.exports=function(t,e,n,s,c){r(e);var u=i(t),l=o(u),h=a(u.length),f=c?h-1:0,p=c?-1:1;if(n<2)for(;;){if(f in l){s=l[f],f+=p;break}if(f+=p,c?f<0:h<=f)throw TypeError("Reduce of empty array with no initial value")}for(;c?f>=0:h>f;f+=p)f in l&&(s=e(s,l[f],f,u));return s}},function(t,e,n){"use strict";var r=n(12),i=n(5),o=n(54),a=[].slice,s={},c=function(t,e,n){if(!(e in s)){for(var r=[],i=0;i<e;i++)r[i]="a["+i+"]";s[e]=Function("F,a","return new F("+r.join(",")+")")}return s[e](t,n)};t.exports=Function.bind||function(t){var e=r(this),n=a.call(arguments,1),s=function(){var r=n.concat(a.call(arguments));return this instanceof s?c(e,r.length,r):o(e,r,t)};return i(e.prototype)&&(s.prototype=e.prototype),s}},function(t,e,n){"use strict";var r=n(8).f,i=n(34),o=n(37),a=n(26),s=n(32),c=n(20),u=n(42),l=n(73),h=n(101),f=n(38),p=n(7),d=n(29).fastKey,m=p?"_s":"size",v=function(t,e){var n,r=d(e);if("F"!==r)return t._i[r];for(n=t._f;n;n=n.n)if(n.k==e)return n};t.exports={getConstructor:function(t,e,n,l){var h=t(function(t,r){s(t,h,e,"_i"),t._i=i(null),t._f=void 0,t._l=void 0,t[m]=0,void 0!=r&&u(r,n,t[l],t)});return o(h.prototype,{clear:function(){for(var t=this,e=t._i,n=t._f;n;n=n.n)n.r=!0,n.p&&(n.p=n.p.n=void 0),delete e[n.i];t._f=t._l=void 0,t[m]=0},"delete":function(t){var e=this,n=v(e,t);if(n){var r=n.n,i=n.p;delete e._i[n.i],n.r=!0,i&&(i.n=r),r&&(r.p=i),e._f==n&&(e._f=r),e._l==n&&(e._l=i),e[m]--}return!!n},forEach:function(t){s(this,h,"forEach");for(var e,n=a(t,arguments.length>1?arguments[1]:void 0,3);e=e?e.n:this._f;)for(n(e.v,e.k,this);e&&e.r;)e=e.p},has:function(t){return!!v(this,t)}}),p&&r(h.prototype,"size",{get:function(){return c(this[m])}}),h},def:function(t,e,n){var r,i,o=v(t,e);return o?o.v=n:(t._l=o={i:i=d(e,!0),k:e,v:n,p:r=t._l,n:void 0,r:!1},t._f||(t._f=o),r&&(r.n=o),t[m]++,"F"!==i&&(t._i[i]=o)),t},getEntry:v,setStrong:function(t,e,n){l(t,e,function(t,e){this._t=t,this._k=e,this._l=void 0},function(){for(var t=this,e=t._k,n=t._l;n&&n.r;)n=n.p;return t._t&&(t._l=n=n?n.n:t._t._f)?"keys"==e?h(0,n.k):"values"==e?h(0,n.v):h(0,[n.k,n.v]):(t._t=void 0,h(1))},n?"entries":"values",!n,!0),f(e)}}},function(t,e,n){var r=n(46),i=n(92);t.exports=function(t){return function(){if(r(this)!=t)throw TypeError(t+"#toJSON isn't generic");return i(this)}}},function(t,e,n){"use strict";var r=n(37),i=n(29).getWeak,o=n(2),a=n(5),s=n(32),c=n(42),u=n(22),l=n(11),h=u(5),f=u(6),p=0,d=function(t){return t._l||(t._l=new m)},m=function(){this.a=[]},v=function(t,e){return h(t.a,function(t){return t[0]===e})};m.prototype={get:function(t){var e=v(this,t);if(e)return e[1]},has:function(t){return!!v(this,t)},set:function(t,e){var n=v(this,t);n?n[1]=e:this.a.push([t,e])},"delete":function(t){var e=f(this.a,function(e){return e[0]===t});return~e&&this.a.splice(e,1),!!~e}},t.exports={getConstructor:function(t,e,n,o){var u=t(function(t,r){s(t,u,e,"_i"),t._i=p++,t._l=void 0,void 0!=r&&c(r,n,t[o],t)});return r(u.prototype,{"delete":function(t){if(!a(t))return!1;var e=i(t);return e===!0?d(this)["delete"](t):e&&l(e,this._i)&&delete e[this._i]},has:function(t){if(!a(t))return!1;var e=i(t);return e===!0?d(this).has(t):e&&l(e,this._i)}}),u},def:function(t,e,n){var r=i(o(e),!0);return r===!0?d(t).set(e,n):r[t._i]=n,t},ufstore:d}},function(t,e,n){t.exports=!n(7)&&!n(4)(function(){return 7!=Object.defineProperty(n(65)("div"),"a",{get:function(){return 7}}).a})},function(t,e,n){var r=n(5),i=Math.floor;t.exports=function(t){return!r(t)&&isFinite(t)&&i(t)===t}},function(t,e,n){var r=n(2);t.exports=function(t,e,n,i){try{return i?e(r(n)[0],n[1]):e(n)}catch(o){var a=t["return"];throw void 0!==a&&r(a.call(t)),o}}},function(t,e){t.exports=function(t,e){return{value:e,done:!!t}}},function(t,e){t.exports=Math.log1p||function(t){return(t=+t)>-1e-8&&t<1e-8?t-t*t/2:Math.log(1+t)}},function(t,e,n){"use strict";var r=n(36),i=n(58),o=n(48),a=n(10),s=n(47),c=Object.assign;t.exports=!c||n(4)(function(){var t={},e={},n=Symbol(),r="abcdefghijklmnopqrst";return t[n]=7,r.split("").forEach(function(t){e[t]=t}),7!=c({},t)[n]||Object.keys(c({},e)).join("")!=r})?function(t,e){for(var n=a(t),c=arguments.length,u=1,l=i.f,h=o.f;c>u;)for(var f,p=s(arguments[u++]),d=l?r(p).concat(l(p)):r(p),m=d.length,v=0;m>v;)h.call(p,f=d[v++])&&(n[f]=p[f]);return n}:c},function(t,e,n){var r=n(8),i=n(2),o=n(36);t.exports=n(7)?Object.defineProperties:function(t,e){i(t);for(var n,a=o(e),s=a.length,c=0;s>c;)r.f(t,n=a[c++],e[n]);return t}},function(t,e,n){var r=n(16),i=n(35).f,o={}.toString,a="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],s=function(t){try{return i(t)}catch(e){return a.slice()}};t.exports.f=function(t){return a&&"[object Window]"==o.call(t)?s(t):i(r(t))}},function(t,e,n){var r=n(11),i=n(16),o=n(50)(!1),a=n(78)("IE_PROTO");t.exports=function(t,e){var n,s=i(t),c=0,u=[];for(n in s)n!=a&&r(s,n)&&u.push(n);for(;e.length>c;)r(s,n=e[c++])&&(~o(u,n)||u.push(n));return u}},function(t,e,n){var r=n(36),i=n(16),o=n(48).f;t.exports=function(t){return function(e){for(var n,a=i(e),s=r(a),c=s.length,u=0,l=[];c>u;)o.call(a,n=s[u++])&&l.push(t?[n,a[n]]:a[n]);return l}}},function(t,e,n){var r=n(35),i=n(58),o=n(2),a=n(3).Reflect;t.exports=a&&a.ownKeys||function(t){var e=r.f(o(t)),n=i.f;return n?e.concat(n(t)):e}},function(t,e,n){var r=n(3).parseFloat,i=n(45).trim;t.exports=1/r(n(83)+"-0")!==-(1/0)?function(t){var e=i(String(t),3),n=r(e);return 0===n&&"-"==e.charAt(0)?-0:n}:r},function(t,e,n){var r=n(3).parseInt,i=n(45).trim,o=n(83),a=/^[\-+]?0[xX]/;t.exports=8!==r(o+"08")||22!==r(o+"0x16")?function(t,e){var n=i(String(t),3);return r(n,e>>>0||(a.test(n)?16:10))}:r},function(t,e){t.exports=Object.is||function(t,e){return t===e?0!==t||1/t===1/e:t!=t&&e!=e}},function(t,e,n){var r=n(9),i=n(82),o=n(20);t.exports=function(t,e,n,a){var s=String(o(t)),c=s.length,u=void 0===n?" ":String(n),l=r(e);if(l<=c||""==u)return s;var h=l-c,f=i.call(u,Math.ceil(h/u.length));return f.length>h&&(f=f.slice(0,h)),a?f+s:s+f}},function(t,e,n){e.f=n(6)},function(t,e,n){"use strict";var r=n(95);t.exports=n(51)("Map",function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}},{get:function(t){var e=r.getEntry(this,t);return e&&e.v},set:function(t,e){return r.def(this,0===t?0:t,e)}},r,!0)},function(t,e,n){n(7)&&"g"!=/./g.flags&&n(8).f(RegExp.prototype,"flags",{configurable:!0,get:n(53)})},function(t,e,n){"use strict";var r=n(95);t.exports=n(51)("Set",function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}},{add:function(t){return r.def(this,t=0===t?0:t,t)}},r)},function(t,e,n){"use strict";var r,i=n(22)(0),o=n(14),a=n(29),s=n(103),c=n(97),u=n(5),l=a.getWeak,h=Object.isExtensible,f=c.ufstore,p={},d=function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}},m={get:function(t){if(u(t)){var e=l(t);return e===!0?f(this).get(t):e?e[this._i]:void 0}},set:function(t,e){return c.def(this,t,e)}},v=t.exports=n(51)("WeakMap",d,m,c,!0,!0);7!=(new v).set((Object.freeze||Object)(p),7).get(p)&&(r=c.getConstructor(d),s(r.prototype,m),a.NEED=!0,i(["delete","has","get","set"],function(t){var e=v.prototype,n=e[t];o(e,t,function(e,i){if(u(e)&&!h(e)){this._f||(this._f=new r);var o=this._f[t](e,i);return"set"==t?this:o}return n.call(this,e,i)})}))},function(t,e){var n=t.exports=function(){function t(t){return null==t?String(t):X[q.call(t)]||"object"}function e(e){return"function"==t(e)}function n(t){return null!=t&&t==t.window}function r(t){return null!=t&&t.nodeType==t.DOCUMENT_NODE}function i(e){return"object"==t(e)}function o(t){return i(t)&&!n(t)&&Object.getPrototypeOf(t)==Object.prototype}function a(t){return"number"==typeof t.length}function s(t){return C.call(t,function(t){return null!=t})}function c(t){return t.length>0?M.fn.concat.apply([],t):t}function u(t){return t.replace(/::/g,"/").replace(/([A-Z]+)([A-Z][a-z])/g,"$1_$2").replace(/([a-z\d])([A-Z])/g,"$1_$2").replace(/_/g,"-").toLowerCase()}function l(t){return t in I?I[t]:I[t]=new RegExp("(^|\\s)"+t+"(\\s|$)")}function h(t,e){return"number"!=typeof e||O[u(t)]?e:e+"px"}function f(t){var e,n;return R[t]||(e=P.createElement(t),P.body.appendChild(e),n=getComputedStyle(e,"").getPropertyValue("display"),e.parentNode.removeChild(e),"none"==n&&(n="block"),R[t]=n),R[t]}function p(t){return"children"in t?L.call(t.children):M.map(t.childNodes,function(t){if(1==t.nodeType)return t})}function d(t,e,n){for(b in e)n&&(o(e[b])||$(e[b]))?(o(e[b])&&!o(t[b])&&(t[b]={}),$(e[b])&&!$(t[b])&&(t[b]=[]),d(t[b],e[b],n)):e[b]!==w&&(t[b]=e[b])}function m(t,e){return null==e?M(t):M(t).filter(e)}function v(t,n,r,i){return e(n)?n.call(t,r,i):n}function g(t,e,n){null==n?t.removeAttribute(e):t.setAttribute(e,n)}function y(t,e){var n=t.className||"",r=n&&n.baseVal!==w;return e===w?r?n.baseVal:n:void(r?n.baseVal=e:t.className=e)}function x(t){try{return t?"true"==t||"false"!=t&&("null"==t?null:+t+""==t?+t:/^[\[\{]/.test(t)?M.parseJSON(t):t):t}catch(e){return t}}function _(t,e){e(t);for(var n=0,r=t.childNodes.length;n<r;n++)_(t.childNodes[n],e)}var w,b,M,E,S,T,A=[],L=A.slice,C=A.filter,P=window.document,R={},I={},O={"column-count":1,columns:1,"font-weight":1,"line-height":1,opacity:1,"z-index":1,zoom:1},U=/^\s*<(\w+|!)[^>]*>/,N=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,F=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,D=/^(?:body|html)$/i,z=/([A-Z])/g,B=["val","css","html","text","data","width","height","offset"],k=["after","prepend","before","append"],j=P.createElement("table"),G=P.createElement("tr"),V={tr:P.createElement("tbody"),tbody:j,thead:j,tfoot:j,td:G,th:G,"*":P.createElement("div")},H=/complete|loaded|interactive/,W=/^[\w-]*$/,X={},q=X.toString,Y={},Z=P.createElement("div"),J={tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},$=Array.isArray||function(t){return t instanceof Array};return Y.matches=function(t,e){if(!e||!t||1!==t.nodeType)return!1;var n=t.webkitMatchesSelector||t.mozMatchesSelector||t.oMatchesSelector||t.matchesSelector;if(n)return n.call(t,e);var r,i=t.parentNode,o=!i;return o&&(i=Z).appendChild(t),r=~Y.qsa(i,e).indexOf(t),o&&Z.removeChild(t),r},S=function(t){return t.replace(/-+(.)?/g,function(t,e){return e?e.toUpperCase():""})},T=function(t){return C.call(t,function(e,n){return t.indexOf(e)==n})},Y.fragment=function(t,e,n){var r,i,a;return N.test(t)&&(r=M(P.createElement(RegExp.$1))),r||(t.replace&&(t=t.replace(F,"<$1></$2>")),e===w&&(e=U.test(t)&&RegExp.$1),e in V||(e="*"),a=V[e],a.innerHTML=""+t,r=M.each(L.call(a.childNodes),function(){a.removeChild(this)})),o(n)&&(i=M(r),M.each(n,function(t,e){B.indexOf(t)>-1?i[t](e):i.attr(t,e)})),r},Y.Z=function(t,e){return t=t||[],t.__proto__=M.fn,t.selector=e||"",t},Y.isZ=function(t){return t instanceof Y.Z},Y.init=function(t,n){var r;if(!t)return Y.Z();if("string"==typeof t)if(t=t.trim(),"<"==t[0]&&U.test(t))r=Y.fragment(t,RegExp.$1,n),t=null;else{if(n!==w)return M(n).find(t);r=Y.qsa(P,t)}else{if(e(t))return M(P).ready(t);if(Y.isZ(t))return t;if($(t))r=s(t);else if(i(t))r=[t],t=null;else if(U.test(t))r=Y.fragment(t.trim(),RegExp.$1,n),t=null;else{if(n!==w)return M(n).find(t);r=Y.qsa(P,t)}}return Y.Z(r,t)},M=function(t,e){return Y.init(t,e)},M.extend=function(t){var e,n=L.call(arguments,1);return"boolean"==typeof t&&(e=t,t=n.shift()),n.forEach(function(n){d(t,n,e)}),t},Y.qsa=function(t,e){var n,i="#"==e[0],o=!i&&"."==e[0],a=i||o?e.slice(1):e,s=W.test(a);return r(t)&&s&&i?(n=t.getElementById(a))?[n]:[]:1!==t.nodeType&&9!==t.nodeType?[]:L.call(s&&!i?o?t.getElementsByClassName(a):t.getElementsByTagName(e):t.querySelectorAll(e))},M.contains=P.documentElement.contains?function(t,e){return t!==e&&t.contains(e)}:function(t,e){for(;e&&(e=e.parentNode);)if(e===t)return!0;return!1},M.type=t,M.isFunction=e,M.isWindow=n,M.isArray=$,M.isPlainObject=o,M.isEmptyObject=function(t){var e;for(e in t)return!1;return!0},M.inArray=function(t,e,n){return A.indexOf.call(e,t,n)},M.camelCase=S,M.trim=function(t){return null==t?"":String.prototype.trim.call(t)},M.uuid=0,M.support={},M.expr={},M.map=function(t,e){var n,r,i,o=[];if(a(t))for(r=0;r<t.length;r++)n=e(t[r],r),null!=n&&o.push(n);else for(i in t)n=e(t[i],i),null!=n&&o.push(n);return c(o)},M.each=function(t,e){var n,r;if(a(t)){for(n=0;n<t.length;n++)if(e.call(t[n],n,t[n])===!1)return t}else for(r in t)if(e.call(t[r],r,t[r])===!1)return t;return t},M.grep=function(t,e){return C.call(t,e)},window.JSON&&(M.parseJSON=JSON.parse),M.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(t,e){X["[object "+e+"]"]=e.toLowerCase()}),M.fn={forEach:A.forEach,reduce:A.reduce,push:A.push,sort:A.sort,indexOf:A.indexOf,concat:A.concat,map:function(t){return M(M.map(this,function(e,n){return t.call(e,n,e)}))},slice:function(){return M(L.apply(this,arguments))},ready:function(t){return H.test(P.readyState)&&P.body?t(M):P.addEventListener("DOMContentLoaded",function(){t(M)},!1),this},get:function(t){return t===w?L.call(this):this[t>=0?t:t+this.length]},toArray:function(){return this.get()},size:function(){return this.length},remove:function(){return this.each(function(){null!=this.parentNode&&this.parentNode.removeChild(this)})},each:function(t){return A.every.call(this,function(e,n){return t.call(e,n,e)!==!1}),this},filter:function(t){return e(t)?this.not(this.not(t)):M(C.call(this,function(e){return Y.matches(e,t)}))},add:function(t,e){return M(T(this.concat(M(t,e))))},is:function(t){return this.length>0&&Y.matches(this[0],t)},not:function(t){var n=[];if(e(t)&&t.call!==w)this.each(function(e){t.call(this,e)||n.push(this)});else{var r="string"==typeof t?this.filter(t):a(t)&&e(t.item)?L.call(t):M(t);this.forEach(function(t){r.indexOf(t)<0&&n.push(t)})}return M(n)},has:function(t){return this.filter(function(){return i(t)?M.contains(this,t):M(this).find(t).size()})},eq:function(t){return t===-1?this.slice(t):this.slice(t,+t+1)},first:function(){var t=this[0];return t&&!i(t)?t:M(t)},last:function(){var t=this[this.length-1];return t&&!i(t)?t:M(t)},find:function(t){var e,n=this;return e=t?"object"==typeof t?M(t).filter(function(){var t=this;return A.some.call(n,function(e){return M.contains(e,t)})}):1==this.length?M(Y.qsa(this[0],t)):this.map(function(){return Y.qsa(this,t)}):M()},closest:function(t,e){var n=this[0],i=!1;for("object"==typeof t&&(i=M(t));n&&!(i?i.indexOf(n)>=0:Y.matches(n,t));)n=n!==e&&!r(n)&&n.parentNode;return M(n)},parents:function(t){for(var e=[],n=this;n.length>0;)n=M.map(n,function(t){if((t=t.parentNode)&&!r(t)&&e.indexOf(t)<0)return e.push(t),t});return m(e,t)},parent:function(t){return m(T(this.pluck("parentNode")),t)},children:function(t){return m(this.map(function(){return p(this)}),t)},contents:function(){return this.map(function(){return L.call(this.childNodes)})},siblings:function(t){return m(this.map(function(t,e){return C.call(p(e.parentNode),function(t){return t!==e})}),t)},empty:function(){return this.each(function(){this.innerHTML=""})},pluck:function(t){return M.map(this,function(e){return e[t]})},show:function(){return this.each(function(){"none"==this.style.display&&(this.style.display=""),"none"==getComputedStyle(this,"").getPropertyValue("display")&&(this.style.display=f(this.nodeName))})},replaceWith:function(t){return this.before(t).remove()},wrap:function(t){var n=e(t);if(this[0]&&!n)var r=M(t).get(0),i=r.parentNode||this.length>1;return this.each(function(e){M(this).wrapAll(n?t.call(this,e):i?r.cloneNode(!0):r)})},wrapAll:function(t){if(this[0]){M(this[0]).before(t=M(t));for(var e;(e=t.children()).length;)t=e.first();M(t).append(this)}return this},wrapInner:function(t){var n=e(t);return this.each(function(e){var r=M(this),i=r.contents(),o=n?t.call(this,e):t;i.length?i.wrapAll(o):r.append(o)})},unwrap:function(){return this.parent().each(function(){M(this).replaceWith(M(this).children())}),this},clone:function(){return this.map(function(){return this.cloneNode(!0)})},hide:function(){return this.css("display","none")},toggle:function(t){return this.each(function(){var e=M(this);(t===w?"none"==e.css("display"):t)?e.show():e.hide()})},prev:function(t){return M(this.pluck("previousElementSibling")).filter(t||"*")},next:function(t){return M(this.pluck("nextElementSibling")).filter(t||"*")},html:function(t){return 0 in arguments?this.each(function(e){var n=this.innerHTML;M(this).empty().append(v(this,t,e,n))}):0 in this?this[0].innerHTML:null},text:function(t){return 0 in arguments?this.each(function(e){var n=v(this,t,e,this.textContent);this.textContent=null==n?"":""+n}):0 in this?this[0].textContent:null},attr:function(t,e){var n;return"string"!=typeof t||1 in arguments?this.each(function(n){if(1===this.nodeType)if(i(t))for(b in t)g(this,b,t[b]);else g(this,t,v(this,e,n,this.getAttribute(t)))}):this.length&&1===this[0].nodeType?!(n=this[0].getAttribute(t))&&t in this[0]?this[0][t]:n:w},removeAttr:function(t){return this.each(function(){1===this.nodeType&&t.split(" ").forEach(function(t){g(this,t)},this)})},prop:function(t,e){return t=J[t]||t,1 in arguments?this.each(function(n){this[t]=v(this,e,n,this[t])}):this[0]&&this[0][t]},data:function(t,e){var n="data-"+t.replace(z,"-$1").toLowerCase(),r=1 in arguments?this.attr(n,e):this.attr(n);return null!==r?x(r):w},val:function(t){return 0 in arguments?this.each(function(e){this.value=v(this,t,e,this.value)}):this[0]&&(this[0].multiple?M(this[0]).find("option").filter(function(){return this.selected}).pluck("value"):this[0].value)},offset:function(t){if(t)return this.each(function(e){var n=M(this),r=v(this,t,e,n.offset()),i=n.offsetParent().offset(),o={top:r.top-i.top,left:r.left-i.left};"static"==n.css("position")&&(o.position="relative"),n.css(o)});if(!this.length)return null;var e=this[0].getBoundingClientRect();return{left:e.left+window.pageXOffset,top:e.top+window.pageYOffset,width:Math.round(e.width),height:Math.round(e.height)}},css:function(e,n){if(arguments.length<2){var r,i=this[0];if(!i)return;if(r=getComputedStyle(i,""),"string"==typeof e)return i.style[S(e)]||r.getPropertyValue(e);if($(e)){var o={};return M.each(e,function(t,e){o[e]=i.style[S(e)]||r.getPropertyValue(e)}),o}}var a="";if("string"==t(e))n||0===n?a=u(e)+":"+h(e,n):this.each(function(){this.style.removeProperty(u(e))});else for(b in e)e[b]||0===e[b]?a+=u(b)+":"+h(b,e[b])+";":this.each(function(){this.style.removeProperty(u(b))});return this.each(function(){this.style.cssText+=";"+a})},index:function(t){return t?this.indexOf(M(t)[0]):this.parent().children().indexOf(this[0])},hasClass:function(t){return!!t&&A.some.call(this,function(t){return this.test(y(t))},l(t))},addClass:function(t){return t?this.each(function(e){if("className"in this){E=[];var n=y(this),r=v(this,t,e,n);r.split(/\s+/g).forEach(function(t){M(this).hasClass(t)||E.push(t)},this),E.length&&y(this,n+(n?" ":"")+E.join(" "))}}):this},removeClass:function(t){return this.each(function(e){if("className"in this){if(t===w)return y(this,"");E=y(this),v(this,t,e,E).split(/\s+/g).forEach(function(t){E=E.replace(l(t)," ")}),y(this,E.trim())}})},toggleClass:function(t,e){return t?this.each(function(n){var r=M(this),i=v(this,t,n,y(this));i.split(/\s+/g).forEach(function(t){(e===w?!r.hasClass(t):e)?r.addClass(t):r.removeClass(t)})}):this},scrollTop:function(t){if(this.length){var e="scrollTop"in this[0];return t===w?e?this[0].scrollTop:this[0].pageYOffset:this.each(e?function(){this.scrollTop=t}:function(){this.scrollTo(this.scrollX,t)})}},scrollLeft:function(t){if(this.length){var e="scrollLeft"in this[0];return t===w?e?this[0].scrollLeft:this[0].pageXOffset:this.each(e?function(){this.scrollLeft=t}:function(){this.scrollTo(t,this.scrollY)})}},position:function(){if(this.length){var t=this[0],e=this.offsetParent(),n=this.offset(),r=D.test(e[0].nodeName)?{top:0,left:0}:e.offset();return n.top-=parseFloat(M(t).css("margin-top"))||0,n.left-=parseFloat(M(t).css("margin-left"))||0,r.top+=parseFloat(M(e[0]).css("border-top-width"))||0,r.left+=parseFloat(M(e[0]).css("border-left-width"))||0,{top:n.top-r.top,left:n.left-r.left}}},offsetParent:function(){return this.map(function(){for(var t=this.offsetParent||P.body;t&&!D.test(t.nodeName)&&"static"==M(t).css("position");)t=t.offsetParent;return t})}},M.fn.detach=M.fn.remove,["width","height"].forEach(function(t){var e=t.replace(/./,function(t){return t[0].toUpperCase()});M.fn[t]=function(i){var o,a=this[0];return i===w?n(a)?a["inner"+e]:r(a)?a.documentElement["scroll"+e]:(o=this.offset())&&o[t]:this.each(function(e){a=M(this),a.css(t,v(this,i,e,a[t]()))})}}),k.forEach(function(e,n){var r=n%2;M.fn[e]=function(){var e,i,o=M.map(arguments,function(n){return e=t(n),"object"==e||"array"==e||null==n?n:Y.fragment(n)}),a=this.length>1;return o.length<1?this:this.each(function(t,e){i=r?e:e.parentNode,e=0==n?e.nextSibling:1==n?e.firstChild:2==n?e:null;var s=M.contains(P.documentElement,i);o.forEach(function(t){if(a)t=t.cloneNode(!0);else if(!i)return M(t).remove();i.insertBefore(t,e),s&&_(t,function(t){null==t.nodeName||"SCRIPT"!==t.nodeName.toUpperCase()||t.type&&"text/javascript"!==t.type||t.src||window.eval.call(window,t.innerHTML)})})})},M.fn[r?e+"To":"insert"+(n?"Before":"After")]=function(t){return M(t)[e](this),this}}),Y.Z.prototype=M.fn,Y.uniq=T,Y.deserializeValue=x,M.zepto=Y,M}();!function(t){function e(t){return t._zid||(t._zid=f++)}function n(t,n,o,a){if(n=r(n),n.ns)var s=i(n.ns);return(v[e(t)]||[]).filter(function(t){return t&&(!n.e||t.e==n.e)&&(!n.ns||s.test(t.ns))&&(!o||e(t.fn)===e(o))&&(!a||t.sel==a)})}function r(t){var e=(""+t).split(".");return{e:e[0],ns:e.slice(1).sort().join(" ")}}function i(t){return new RegExp("(?:^| )"+t.replace(" "," .* ?")+"(?: |$)")}function o(t,e){return t.del&&!y&&t.e in x||!!e}function a(t){return _[t]||y&&x[t]||t}function s(n,i,s,c,l,f,p){var d=e(n),m=v[d]||(v[d]=[]);i.split(/\s/).forEach(function(e){if("ready"==e)return t(document).ready(s);var i=r(e);i.fn=s,i.sel=l,i.e in _&&(s=function(e){var n=e.relatedTarget;if(!n||n!==this&&!t.contains(this,n))return i.fn.apply(this,arguments)}),i.del=f;var d=f||s;i.proxy=function(t){if(t=u(t),!t.isImmediatePropagationStopped()){t.data=c;var e=d.apply(n,t._args==h?[t]:[t].concat(t._args));return e===!1&&(t.preventDefault(),t.stopPropagation()),e}},i.i=m.length,m.push(i),"addEventListener"in n&&n.addEventListener(a(i.e),i.proxy,o(i,p))})}function c(t,r,i,s,c){var u=e(t);(r||"").split(/\s/).forEach(function(e){n(t,e,i,s).forEach(function(e){delete v[u][e.i],"removeEventListener"in t&&t.removeEventListener(a(e.e),e.proxy,o(e,c))})})}function u(e,n){return!n&&e.isDefaultPrevented||(n||(n=e),t.each(E,function(t,r){var i=n[t];e[t]=function(){return this[r]=w,i&&i.apply(n,arguments)},e[r]=b}),(n.defaultPrevented!==h?n.defaultPrevented:"returnValue"in n?n.returnValue===!1:n.getPreventDefault&&n.getPreventDefault())&&(e.isDefaultPrevented=w)),e}function l(t){var e,n={originalEvent:t};for(e in t)M.test(e)||t[e]===h||(n[e]=t[e]);return u(n,t)}var h,f=1,p=Array.prototype.slice,d=t.isFunction,m=function(t){return"string"==typeof t},v={},g={},y="onfocusin"in window,x={focus:"focusin",blur:"focusout"},_={mouseenter:"mouseover",mouseleave:"mouseout"};g.click=g.mousedown=g.mouseup=g.mousemove="MouseEvents",t.event={add:s,remove:c},t.proxy=function(n,r){var i=2 in arguments&&p.call(arguments,2);if(d(n)){var o=function(){return n.apply(r,i?i.concat(p.call(arguments)):arguments)};return o._zid=e(n),o}if(m(r))return i?(i.unshift(n[r],n),t.proxy.apply(null,i)):t.proxy(n[r],n);throw new TypeError("expected function")},t.fn.bind=function(t,e,n){return this.on(t,e,n)},t.fn.unbind=function(t,e){return this.off(t,e)},t.fn.one=function(t,e,n,r){return this.on(t,e,n,r,1)};var w=function(){return!0},b=function(){return!1},M=/^([A-Z]|returnValue$|layer[XY]$)/,E={preventDefault:"isDefaultPrevented",stopImmediatePropagation:"isImmediatePropagationStopped",stopPropagation:"isPropagationStopped"};t.fn.delegate=function(t,e,n){return this.on(e,t,n)},t.fn.undelegate=function(t,e,n){return this.off(e,t,n)},t.fn.live=function(e,n){return t(document.body).delegate(this.selector,e,n),this},t.fn.die=function(e,n){return t(document.body).undelegate(this.selector,e,n),this},t.fn.on=function(e,n,r,i,o){var a,u,f=this;return e&&!m(e)?(t.each(e,function(t,e){f.on(t,n,r,e,o)}),f):(m(n)||d(i)||i===!1||(i=r,r=n,n=h),(d(r)||r===!1)&&(i=r,r=h),i===!1&&(i=b),f.each(function(h,f){o&&(a=function(t){return c(f,t.type,i),i.apply(this,arguments)}),n&&(u=function(e){var r,o=t(e.target).closest(n,f).get(0);if(o&&o!==f)return r=t.extend(l(e),{currentTarget:o,liveFired:f}),(a||i).apply(o,[r].concat(p.call(arguments,1)))}),s(f,e,i,r,n,u||a)}))},t.fn.off=function(e,n,r){var i=this;return e&&!m(e)?(t.each(e,function(t,e){i.off(t,n,e)}),i):(m(n)||d(r)||r===!1||(r=n,n=h),r===!1&&(r=b),i.each(function(){c(this,e,r,n)}))},t.fn.trigger=function(e,n){return e=m(e)||t.isPlainObject(e)?t.Event(e):u(e),e._args=n,this.each(function(){e.type in x&&"function"==typeof this[e.type]?this[e.type]():"dispatchEvent"in this?this.dispatchEvent(e):t(this).triggerHandler(e,n)})},t.fn.triggerHandler=function(e,r){var i,o;return this.each(function(a,s){i=l(m(e)?t.Event(e):e),i._args=r,i.target=s,t.each(n(s,e.type||e),function(t,e){if(o=e.proxy(i),i.isImmediatePropagationStopped())return!1})}),o},"focusin focusout focus blur load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select keydown keypress keyup error".split(" ").forEach(function(e){t.fn[e]=function(t){return 0 in arguments?this.bind(e,t):this.trigger(e)}}),t.Event=function(t,e){m(t)||(e=t,t=e.type);var n=document.createEvent(g[t]||"Events"),r=!0;if(e)for(var i in e)"bubbles"==i?r=!!e[i]:n[i]=e[i];return n.initEvent(t,r,!0),u(n)}}(n),function(t){function e(e,n,r){var i=t.Event(n);return t(e).trigger(i,r),!i.isDefaultPrevented()}function n(t,n,r,i){if(t.global)return e(n||y,r,i)}function r(e){e.global&&0===t.active++&&n(e,null,"ajaxStart")}function i(e){e.global&&!--t.active&&n(e,null,"ajaxStop")}function o(t,e){var r=e.context;return e.beforeSend.call(r,t,e)!==!1&&n(e,r,"ajaxBeforeSend",[t,e])!==!1&&void n(e,r,"ajaxSend",[t,e])}function a(t,e,r,i){var o=r.context,a="success";r.success.call(o,t,a,e),i&&i.resolveWith(o,[t,a,e]),n(r,o,"ajaxSuccess",[e,r,t]),c(a,e,r)}function s(t,e,r,i,o){var a=i.context;i.error.call(a,r,e,t),o&&o.rejectWith(a,[r,e,t]),n(i,a,"ajaxError",[r,i,t||e]),c(e,r,i)}function c(t,e,r){var o=r.context;r.complete.call(o,e,t),n(r,o,"ajaxComplete",[e,r]),i(r)}function u(){}function l(t){return t&&(t=t.split(";",2)[0]),t&&(t==M?"html":t==b?"json":_.test(t)?"script":w.test(t)&&"xml")||"text"}function h(t,e){return""==e?t:(t+"&"+e).replace(/[&?]{1,2}/,"?")}function f(e){e.processData&&e.data&&"string"!=t.type(e.data)&&(e.data=t.param(e.data,e.traditional)),!e.data||e.type&&"GET"!=e.type.toUpperCase()||(e.url=h(e.url,e.data),e.data=void 0)}function p(e,n,r,i){return t.isFunction(n)&&(i=r,r=n,n=void 0),t.isFunction(r)||(i=r,r=void 0),{url:e,data:n,success:r,dataType:i}}function d(e,n,r,i){var o,a=t.isArray(n),s=t.isPlainObject(n);t.each(n,function(n,c){o=t.type(c),i&&(n=r?i:i+"["+(s||"object"==o||"array"==o?n:"")+"]"),!i&&a?e.add(c.name,c.value):"array"==o||!r&&"object"==o?d(e,c,r,n):e.add(n,c)})}var m,v,g=0,y=window.document,x=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,_=/^(?:text|application)\/javascript/i,w=/^(?:text|application)\/xml/i,b="application/json",M="text/html",E=/^\s*$/,S=y.createElement("a");S.href=window.location.href,t.active=0,t.ajaxJSONP=function(e,n){if(!("type"in e))return t.ajax(e);var r,i,c=e.jsonpCallback,u=(t.isFunction(c)?c():c)||"jsonp"+ ++g,l=y.createElement("script"),h=window[u],f=function(e){t(l).triggerHandler("error",e||"abort");
  },p={abort:f};return n&&n.promise(p),t(l).on("load error",function(o,c){clearTimeout(i),t(l).off().remove(),"error"!=o.type&&r?a(r[0],p,e,n):s(null,c||"error",p,e,n),window[u]=h,r&&t.isFunction(h)&&h(r[0]),h=r=void 0}),o(p,e)===!1?(f("abort"),p):(window[u]=function(){r=arguments},l.src=e.url.replace(/\?(.+)=\?/,"?$1="+u),y.head.appendChild(l),e.timeout>0&&(i=setTimeout(function(){f("timeout")},e.timeout)),p)},t.ajaxSettings={type:"GET",beforeSend:u,success:u,error:u,complete:u,context:null,global:!0,xhr:function(){return new window.XMLHttpRequest},accepts:{script:"text/javascript, application/javascript, application/x-javascript",json:b,xml:"application/xml, text/xml",html:M,text:"text/plain"},crossDomain:!1,timeout:0,processData:!0,cache:!0},t.ajax=function(e){var n,i=t.extend({},e||{}),c=t.Deferred&&t.Deferred();for(m in t.ajaxSettings)void 0===i[m]&&(i[m]=t.ajaxSettings[m]);r(i),i.crossDomain||(n=y.createElement("a"),n.href=i.url,n.href=n.href,i.crossDomain=S.protocol+"//"+S.host!=n.protocol+"//"+n.host),i.url||(i.url=window.location.toString()),f(i);var p=i.dataType,d=/\?.+=\?/.test(i.url);if(d&&(p="jsonp"),i.cache!==!1&&(e&&e.cache===!0||"script"!=p&&"jsonp"!=p)||(i.url=h(i.url,"_="+Date.now())),"jsonp"==p)return d||(i.url=h(i.url,i.jsonp?i.jsonp+"=?":i.jsonp===!1?"":"callback=?")),t.ajaxJSONP(i,c);var g,x=i.accepts[p],_={},w=function(t,e){_[t.toLowerCase()]=[t,e]},b=/^([\w-]+:)\/\//.test(i.url)?RegExp.$1:window.location.protocol,M=i.xhr(),T=M.setRequestHeader;if(c&&c.promise(M),i.crossDomain||w("X-Requested-With","XMLHttpRequest"),w("Accept",x||"*/*"),(x=i.mimeType||x)&&(x.indexOf(",")>-1&&(x=x.split(",",2)[0]),M.overrideMimeType&&M.overrideMimeType(x)),(i.contentType||i.contentType!==!1&&i.data&&"GET"!=i.type.toUpperCase())&&w("Content-Type",i.contentType||"application/x-www-form-urlencoded"),i.headers)for(v in i.headers)w(v,i.headers[v]);if(M.setRequestHeader=w,M.onreadystatechange=function(){if(4==M.readyState){M.onreadystatechange=u,clearTimeout(g);var e,n=!1;if(M.status>=200&&M.status<300||304==M.status||0==M.status&&"file:"==b){p=p||l(i.mimeType||M.getResponseHeader("content-type")),e=M.responseText;try{"script"==p?(0,eval)(e):"xml"==p?e=M.responseXML:"json"==p&&(e=E.test(e)?null:t.parseJSON(e))}catch(r){n=r}n?s(n,"parsererror",M,i,c):a(e,M,i,c)}else s(M.statusText||null,M.status?"error":"abort",M,i,c)}},o(M,i)===!1)return M.abort(),s(null,"abort",M,i,c),M;if(i.xhrFields)for(v in i.xhrFields)M[v]=i.xhrFields[v];var A=!("async"in i)||i.async;M.open(i.type,i.url,A,i.username,i.password);for(v in _)T.apply(M,_[v]);return i.timeout>0&&(g=setTimeout(function(){M.onreadystatechange=u,M.abort(),s(null,"timeout",M,i,c)},i.timeout)),M.send(i.data?i.data:null),M},t.get=function(){return t.ajax(p.apply(null,arguments))},t.post=function(){var e=p.apply(null,arguments);return e.type="POST",t.ajax(e)},t.getJSON=function(){var e=p.apply(null,arguments);return e.dataType="json",t.ajax(e)},t.fn.load=function(e,n,r){if(!this.length)return this;var i,o=this,a=e.split(/\s/),s=p(e,n,r),c=s.success;return a.length>1&&(s.url=a[0],i=a[1]),s.success=function(e){o.html(i?t("<div>").html(e.replace(x,"")).find(i):e),c&&c.apply(o,arguments)},t.ajax(s),this};var T=encodeURIComponent;t.param=function(e,n){var r=[];return r.add=function(e,n){t.isFunction(n)&&(n=n()),null==n&&(n=""),this.push(T(e)+"="+T(n))},d(r,e,n),r.join("&").replace(/%20/g,"+")}}(n),function(t){t.fn.serializeArray=function(){var e,n,r=[],i=function(t){return t.forEach?t.forEach(i):void r.push({name:e,value:t})};return this[0]&&t.each(this[0].elements,function(r,o){n=o.type,e=o.name,e&&"fieldset"!=o.nodeName.toLowerCase()&&!o.disabled&&"submit"!=n&&"reset"!=n&&"button"!=n&&"file"!=n&&("radio"!=n&&"checkbox"!=n||o.checked)&&i(t(o).val())}),r},t.fn.serialize=function(){var t=[];return this.serializeArray().forEach(function(e){t.push(encodeURIComponent(e.name)+"="+encodeURIComponent(e.value))}),t.join("&")},t.fn.submit=function(e){if(0 in arguments)this.bind("submit",e);else if(this.length){var n=t.Event("submit");this.eq(0).trigger(n),n.isDefaultPrevented()||this.get(0).submit()}return this}}(n),function(t){"__proto__"in{}||t.extend(t.zepto,{Z:function(e,n){return e=e||[],t.extend(e,t.fn),e.selector=n||"",e.__Z=!0,e},isZ:function(e){return"array"===t.type(e)&&"__Z"in e}});try{getComputedStyle(void 0)}catch(e){var n=getComputedStyle;window.getComputedStyle=function(t){try{return n(t)}catch(e){return null}}}}(n)},function(t,e,n){/**
  	 * An even better animation frame.
  	 *
  	 * @copyright Oleg Slobodskoi 2016
  	 * @website https://github.com/kof/animationFrame
  	 * @license MIT
  	 */
  t.exports=n(120)},function(t,e,n){"use strict";function r(t){return this instanceof r?(t||(t={}),"number"==typeof t&&(t={frameRate:t}),null!=t.useNative||(t.useNative=!0),this.options=t,this.frameRate=t.frameRate||r.FRAME_RATE,this._frameLength=1e3/this.frameRate,this._isCustomFrameRate=this.frameRate!==r.FRAME_RATE,this._timeoutId=null,this._callbacks={},this._lastTickTime=0,void(this._tickCounter=0)):new r(t)}var i=n(121),o=n(61),a=n(123),s=n(62),c=i.request,u=i.cancel;t.exports=r,r.FRAME_RATE=60,r.shim=function(t){var e=new r(t);return s.requestAnimationFrame=function(t){return e.request(t)},s.cancelAnimationFrame=function(t){return e.cancel(t)},e},r.prototype.request=function(t){var e=this;if(++this._tickCounter,i.supported&&this.options.useNative&&!this._isCustomFrameRate)return c(t);if(!t)throw new TypeError("Not enough arguments");if(null==this._timeoutId){var n=this._frameLength+this._lastTickTime-o();n<0&&(n=0),this._timeoutId=setTimeout(function(){e._lastTickTime=o(),e._timeoutId=null,++e._tickCounter;var t=e._callbacks;e._callbacks={};for(var n in t)t[n]&&(i.supported&&e.options.useNative?c(t[n]):t[n](a.now()))},n)}return this._callbacks[this._tickCounter]=t,this._tickCounter},r.prototype.cancel=function(t){i.supported&&this.options.useNative&&u(t),delete this._callbacks[t]}},function(t,e,n){"use strict";var r=n(62);try{r.top.name,r=r.top}catch(i){}e.request=r.requestAnimationFrame,e.cancel=r.cancelAnimationFrame||r.cancelRequestAnimationFrame,e.supported=!1;for(var o=["Webkit","Moz","ms","O"],a=0;a<o.length&&!e.request;a++)e.request=r[o[a]+"RequestAnimationFrame"],e.cancel=r[o[a]+"CancelAnimationFrame"]||r[o[a]+"CancelRequestAnimationFrame"];e.request&&e.request.call(null,function(){e.supported=!0})},function(t,e,n){"use strict";var r=n(61);e.navigationStart=r()},function(t,e,n){"use strict";var r=n(61),i=n(122),o=n(62);e.now=function(){return o.performance&&o.performance.now?o.performance.now():r()-i.navigationStart}},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e["default"]=t,e}Object.defineProperty(e,"__esModule",{value:!0});var o=n(49),a=n(318),s=i(a),c=n(316),u=r(c),l=n(315),h=r(l);e["default"]=Object.assign(Object.create(o.BaseObject),{ctx:null,width:0,height:0,renderer:null,scene:null,camera:null,uniforms:null,material:null,mesh:null,setup:function(t){this.renderer=new s.WebGLRenderer({canvas:t.config.canvas,antialias:!0}),this.renderer.setClearColor("rgb(37, 26, 48)",1),this.ctx=this.renderer.context,this.scene=new s.Scene,this.camera=new s.OrthographicCamera((-1),1,1,(-1),0,1),this.setupShader()},setupShader:function(){this.uniforms={dimensions:{type:"v2",value:new s.Vector2},DETAIL_LEVEL:{type:"f",value:.58},DEFORMATION_LEVEL:{type:"f",value:1.2},DEPTH_LEVEL:{type:"f",value:.25},TIME:{type:"f",value:100}},this.material=new s.ShaderMaterial({uniforms:this.uniforms,vertexShader:u["default"],fragmentShader:h["default"]}),this.mesh=new s.Mesh(new s.PlaneBufferGeometry(2,2),this.material),this.scene.add(this.mesh)},draw:function(){var t=this.width*this.appConfig.PRINT_RESOLUTION,e=this.height*this.appConfig.PRINT_RESOLUTION;this.renderer.setSize(t,e),this.camera.aspect=this.width/this.height,this.camera.updateProjectionMatrix(),this.uniforms.dimensions.value=new s.Vector2(t,e),this.renderer.render(this.scene,this.camera)}})},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}Object.defineProperty(e,"__esModule",{value:!0});var i=n(89),o=(r(i),n(118));r(o);e["default"]={appConfig:null,windowData:null,mouseData:null,time:null,node:null,init:function(t){this.appConfig=t.appConfig,this.windowData=t.windowData,this.mouseData=t.mouseData,this.node=t.node,this.setup(t)},setup:function(t){},createChild:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=Object.create(t);return r.init({appConfig:this.appConfig,windowData:this.windowData,mouseData:this.mouseData,node:e,config:n}),r},resize:function(){},mouseMove:function(){},animFrame:function(t,e){this.time=t,this.onAnimFrame(e)},onAnimFrame:function(){}}},function(t,e,n){(function(t){"use strict";function e(t){return t&&t.__esModule?t:{"default":t}}n(313);var r=n(127),i=e(r),o=n(119);o.shim(),t._babelPolyfill||n(131),(0,i["default"])()}).call(e,function(){return this}())},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}Object.defineProperty(e,"__esModule",{value:!0}),e["default"]=function(){function t(){p={$window:(0,i.$)(window),$document:(0,i.$)(document),$html:(0,i.$)(document.documentElement),$root:(0,i.$)(".js-root"),$controls:(0,i.$)(".js-controls"),$workboard:(0,i.$)(".js-workboard")},d={PAPER_SIZES:{A0:{WIDTH:841,HEIGHT:1189},A1:{WIDTH:594,HEIGHT:841},A2:{WIDTH:420,HEIGHT:594},A3:{WIDTH:297,HEIGHT:420},A4:{WIDTH:210,HEIGHT:297},A5:{WIDTH:148,HEIGHT:210}},PRINT_RESOLUTION:11.81102362204724,CONTROLS_WIDTH:240,selectedPrintConfig:null},m={width:0,height:0,ratio:0},v={x:0,y:0,nX:0,nY:0},e(),n(),r(),o(),s(),window.requestAnimationFrame(l)}function e(){d.selectedPrintConfig={paperColour:"#fff",paperSize:d.PAPER_SIZES.A3,paperOrientation:"portrait",paperMarginTop:10,paperMarginBottom:10,paperMarginLeft:10,paperMarginRight:10,drawFixedScale:!0,drawFooter:!1}}function n(){console.log(p),g=Object.create(a["default"]),g.init({appConfig:d,windowData:m,mouseData:v,node:p.$controls,config:{}})}function r(){y=Object.create(c["default"]),y.init({appConfig:d,windowData:m,mouseData:v,node:p.$workboard,config:{}})}function o(){p.$window.on("resize",s),p.$document.on("mousemove",u),g.addEventListener("controls:draw",h),g.addEventListener("controls:save",f)}function s(){m.width=p.$window.width(),m.height=p.$window.height(),m.ratio=m.width/m.height,p.$html[0].style.fontSize=10*m.scale+"px",g.resize(),y.resize()}function u(t){v.x=t.clientX,v.y=t.clientY,v.nX=v.x/m.width*2-1,v.nY=v.y/m.height*2-1}function l(t){Date.now();window.requestAnimationFrame(l)}function h(){s(),y.drawArtwork()}function f(){window.open(y.getCanvas().toDataURL())}var p=null,d=null,m=null,v=null,g=null,y=null;t()};var i=n(49),o=n(128),a=r(o),s=n(129),c=r(s)},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}Object.defineProperty(e,"__esModule",{value:!0});var i=n(49),o=n(130),a=r(o);e["default"]=Object.assign(Object.create(i.BaseObject),a["default"],{ui:null,setup:function(t){this.ui={colorWhite:this.node.find(".js-paper-colour__white"),colorBlack:this.node.find(".js-paper-colour__black"),sizeA0:this.node.find(".js-paper-size__a0"),sizeA1:this.node.find(".js-paper-size__a1"),sizeA2:this.node.find(".js-paper-size__a2"),sizeA3:this.node.find(".js-paper-size__a3"),sizeA4:this.node.find(".js-paper-size__a4"),sizeA5:this.node.find(".js-paper-size__a5"),orientationPortrait:this.node.find(".js-orientation__portrait"),orientationLandscape:this.node.find(".js-orientation__landscape"),marginTop:this.node.find(".js-margin__top"),marginBottom:this.node.find(".js-margin__bottom"),marginLeft:this.node.find(".js-margin__left"),marginRight:this.node.find(".js-margin__right"),scaleFixed:this.node.find(".js-scale__fixed"),scaleToPaper:this.node.find(".js-scale__paper"),footerToggle:this.node.find(".js-footer__toggle"),drawButton:this.node.find(".js-draw__button"),saveButton:this.node.find(".js-save__button")},this.addEvents()},addEvents:function(){i._.bindAll(this,"onColorWhiteClick","onColorBlackClick","onSizeA0Click","onSizeA1Click","onSizeA2Click","onSizeA3Click","onSizeA4Click","onSizeA5Click","onOrientationPortraitClick","onOrientationLandscapeClick","_onMarginTopChange","_onMarginBottomChange","_onMarginLeftChange","_onMarginRightChange","onScaleFixedClick","onScaleToPaperClick","onFooterToggleChange","onDrawButtonClick","onSaveButtonClick"),this.ui.colorWhite.on("click",this.onColorWhiteClick),this.ui.colorBlack.on("click",this.onColorBlackClick),this.ui.sizeA0.on("click",this.onSizeA0Click),this.ui.sizeA1.on("click",this.onSizeA1Click),this.ui.sizeA2.on("click",this.onSizeA2Click),this.ui.sizeA3.on("click",this.onSizeA3Click),this.ui.sizeA4.on("click",this.onSizeA4Click),this.ui.sizeA5.on("click",this.onSizeA5Click),this.ui.orientationPortrait.on("click",this.onOrientationPortraitClick),this.ui.orientationLandscape.on("click",this.onOrientationLandscapeClick),this.ui.marginTop.on("change paste keyup",this._onMarginTopChange),this.ui.marginBottom.on("change paste keyup",this._onMarginBottomChange),this.ui.marginLeft.on("change paste keyup",this._onMarginLeftChange),this.ui.marginRight.on("change paste keyup",this._onMarginRightChange),this.ui.scaleFixed.on("click",this.onScaleFixedClick),this.ui.scaleToPaper.on("click",this.onScaleToPaperClick),this.ui.footerToggle.on("change",this.onFooterToggleChange),this.ui.drawButton.on("click",this.onDrawButtonClick),this.ui.saveButton.on("click",this.onSaveButtonClick)},resize:function(){},mouseMove:function(){},onAnimFrame:function(){},onColorWhiteClick:function(){this.appConfig.selectedPrintConfig.paperColour="#fff",this.ui.colorBlack.removeClass("is-selected"),this.ui.colorWhite.addClass("is-selected")},onColorBlackClick:function(){this.appConfig.selectedPrintConfig.paperColour="#000",this.ui.colorBlack.addClass("is-selected"),this.ui.colorWhite.removeClass("is-selected")},onSizeA0Click:function(){this.appConfig.selectedPrintConfig.paperSize=this.appConfig.PAPER_SIZES.A0,this.selectPaperSize(this.ui.sizeA0)},onSizeA1Click:function(){this.appConfig.selectedPrintConfig.paperSize=this.appConfig.PAPER_SIZES.A1,this.selectPaperSize(this.ui.sizeA1)},onSizeA2Click:function(){this.appConfig.selectedPrintConfig.paperSize=this.appConfig.PAPER_SIZES.A2,this.selectPaperSize(this.ui.sizeA2)},onSizeA3Click:function(){this.appConfig.selectedPrintConfig.paperSize=this.appConfig.PAPER_SIZES.A3,this.selectPaperSize(this.ui.sizeA3)},onSizeA4Click:function(){this.appConfig.selectedPrintConfig.paperSize=this.appConfig.PAPER_SIZES.A4,this.selectPaperSize(this.ui.sizeA4)},onSizeA5Click:function(){this.appConfig.selectedPrintConfig.paperSize=this.appConfig.PAPER_SIZES.A5,this.selectPaperSize(this.ui.sizeA5)},onOrientationPortraitClick:function(){this.appConfig.selectedPrintConfig.paperOrientation="portrait",this.ui.orientationPortrait.addClass("is-selected"),this.ui.orientationLandscape.removeClass("is-selected")},onOrientationLandscapeClick:function(){this.appConfig.selectedPrintConfig.paperOrientation="landscape",this.ui.orientationLandscape.addClass("is-selected"),this.ui.orientationPortrait.removeClass("is-selected")},_onMarginTopChange:function(){this.appConfig.selectedPrintConfig.paperMarginTop=this.ui.marginTop[0].value},_onMarginBottomChange:function(){this.appConfig.selectedPrintConfig.paperMarginBottom=this.ui.marginBottom[0].value},_onMarginLeftChange:function(){this.appConfig.selectedPrintConfig.paperMarginLeft=this.ui.marginLeft[0].value},_onMarginRightChange:function(){this.appConfig.selectedPrintConfig.paperMarginRight=this.ui.marginRight[0].value},onScaleFixedClick:function(){this.appConfig.selectedPrintConfig.drawFixedScale=!0,this.ui.scaleFixed.addClass("is-selected"),this.ui.scaleToPaper.removeClass("is-selected")},onScaleToPaperClick:function(){this.appConfig.selectedPrintConfig.drawFixedScale=!1,this.ui.scaleToPaper.addClass("is-selected"),this.ui.scaleFixed.removeClass("is-selected")},onFooterToggleChange:function(){this.ui.footerToggle[0].checked===!0?this.appConfig.selectedPrintConfig.drawFooter=!0:this.appConfig.selectedPrintConfig.drawFooter=!1},onDrawButtonClick:function(){this.dispatchEvent({type:"controls:draw"})},onSaveButtonClick:function(){this.dispatchEvent({type:"controls:save"})},selectPaperSize:function(t){this.ui.sizeA0.removeClass("is-selected"),this.ui.sizeA1.removeClass("is-selected"),this.ui.sizeA2.removeClass("is-selected"),this.ui.sizeA3.removeClass("is-selected"),this.ui.sizeA4.removeClass("is-selected"),this.ui.sizeA5.removeClass("is-selected"),t.addClass("is-selected ")}})},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}Object.defineProperty(e,"__esModule",{value:!0});var i=n(49),o=n(124),a=r(o);e["default"]=Object.assign(Object.create(i.BaseObject),{workboardWidth:0,previewWidth:0,previewHeight:0,artworkWidth:0,artworkHeight:0,paperCtx:null,artworkCtx:null,artworkCtxType:null,artwork:null,drawConfig:null,$paper:null,setup:function(t){this.$paper=this.node.find(".js-workboard__paper");var e=document.createElement("canvas");this.paperCtx=e.getContext("2d"),this.$paper.append(e);var n=document.createElement("canvas");if(this.artwork=this.createChild(a["default"],null,{canvas:n}),!this.artwork.ctx)throw this.artworkCtx=n.getContext("2d"),this.resize(),this.paperCtx.font="72pt Roboto Mono",this.paperCtx.fillStyle="red",this.paperCtx.fillText("ERROR: No arwork canvas context... Check console...",280,400),new Error("The artwork canvas doesn't have a context! Ensure you're creating one in setup() in artwork.js");this.artworkCtx=this.artwork.ctx,this.artworkCtx instanceof CanvasRenderingContext2D&&(this.artworkCtxType="2d"),this.artworkCtx instanceof WebGLRenderingContext&&(this.artworkCtxType="webgl"),this.resize()},resize:function(){var t=50,e="landscape"===this.appConfig.selectedPrintConfig.paperOrientation?this.appConfig.selectedPrintConfig.paperSize.HEIGHT:this.appConfig.selectedPrintConfig.paperSize.WIDTH,n="landscape"===this.appConfig.selectedPrintConfig.paperOrientation?this.appConfig.selectedPrintConfig.paperSize.WIDTH:this.appConfig.selectedPrintConfig.paperSize.HEIGHT,r=this.appConfig.selectedPrintConfig.drawFixedScale?this.appConfig.selectedPrintConfig.paperSize.WIDTH/this.appConfig.PAPER_SIZES.A3.WIDTH:1,i=e-this.appConfig.selectedPrintConfig.paperMarginLeft-this.appConfig.selectedPrintConfig.paperMarginRight,o=n-this.appConfig.selectedPrintConfig.paperMarginTop-this.appConfig.selectedPrintConfig.paperMarginBottom;this.artwork.width=i/r,this.artwork.height=o/r,this.workboardWidth=this.windowData.width-this.appConfig.CONTROLS_WIDTH,this.previewWidth=this.workboardWidth-2*t,this.previewHeight=this.previewWidth/(e/n),this.$paper[0].style.width=this.previewWidth+"px",this.$paper[0].style.height=this.previewHeight+"px",this.$paper[0].style.marginLeft=t+"px",this.$paper[0].style.marginRight=t+"px",this.node[0].style.paddingTop=t-6+"px",this.node[0].style.paddingBottom=t+"px";var a=parseInt(e*this.appConfig.PRINT_RESOLUTION,10),s=parseInt(n*this.appConfig.PRINT_RESOLUTION,10);this.paperCtx.canvas.width=a,this.paperCtx.canvas.height=s;var c={top:this.appConfig.selectedPrintConfig.paperMarginTop*this.appConfig.PRINT_RESOLUTION,bottom:this.appConfig.selectedPrintConfig.paperMarginBottom*this.appConfig.PRINT_RESOLUTION,left:this.appConfig.selectedPrintConfig.paperMarginLeft*this.appConfig.PRINT_RESOLUTION,right:this.appConfig.selectedPrintConfig.paperMarginRight*this.appConfig.PRINT_RESOLUTION},u=a-c.left-c.right,l=s-c.top-c.bottom;this.artworkCtx.canvas.width=u,this.artworkCtx.canvas.height=l,"2d"===this.artworkCtxType&&this.artworkCtx.scale(this.appConfig.PRINT_RESOLUTION*r,this.appConfig.PRINT_RESOLUTION*r),this.drawConfig={paperWidth:a,paperHeight:s,paperMargins:c,artworkPaperWidth:u,artworkPaperHeight:l}},mouseMove:function(){},onAnimFrame:function(){},drawArtwork:function(){this.paperCtx.clearRect(0,0,this.paperCtx.canvas.width,this.paperCtx.canvas.height),"2d"===this.artworkCtxType?(this.artworkCtx.clearRect(0,0,this.artworkCtx.canvas.width,this.artworkCtx.canvas.height),this.artworkCtx.save(),this.artwork.draw(),this.artworkCtx.restore()):this.artwork.draw(),this.paperCtx.fillStyle=this.appConfig.selectedPrintConfig.paperColour,this.paperCtx.fillRect(0,0,this.paperCtx.canvas.width,this.paperCtx.canvas.height),this.paperCtx.drawImage(this.artworkCtx.canvas,this.drawConfig.paperMargins.left,this.drawConfig.paperMargins.top,this.drawConfig.artworkPaperWidth,this.drawConfig.artworkPaperHeight)},getCanvas:function(){return this.paperCtx.canvas}})},function(t,e,n){var r,i;r=[n(89)],i=function(t){"use strict";var e=function(){};return t.assign(e,{addEventListener:function(t,e){void 0===this._listeners&&(this._listeners={});var n=this._listeners;void 0===n[t]&&(n[t]=[]),n[t].indexOf(e)===-1&&n[t].push(e)},hasEventListener:function(t,e){if(void 0===this._listeners)return!1;var n=this._listeners;return void 0!==n[t]&&n[t].indexOf(e)!==-1},removeEventListener:function(t,e){if(void 0!==this._listeners){var n=this._listeners,r=n[t];if(void 0!==r){var i=r.indexOf(e);i!==-1&&r.splice(i,1)}}},dispatchEvent:function(t){if(void 0!==this._listeners){var e=this._listeners,n=e[t.type];if(void 0!==n){t.target=this;var r=[],i=0,o=n.length;for(i=0;i<o;i++)r[i]=n[i];for(i=0;i<o;i++)r[i].call(this,t)}}}}),e}.apply(e,r),!(void 0!==i&&(t.exports=i))},function(t,e,n){(function(t){"use strict";function e(t,e,n){t[e]||Object[r](t,e,{writable:!0,configurable:!0,value:n})}if(n(312),n(317),n(132),t._babelPolyfill)throw new Error("only one instance of babel-polyfill is allowed");t._babelPolyfill=!0;var r="defineProperty";e(String.prototype,"padLeft","".padStart),e(String.prototype,"padRight","".padEnd),"pop,reverse,shift,keys,values,entries,indexOf,every,some,forEach,map,filter,find,findIndex,includes,join,slice,concat,push,splice,unshift,sort,lastIndexOf,reduce,reduceRight,copyWithin,fill".split(",").forEach(function(t){[][t]&&e(Array,t,Function.call.bind([][t]))})}).call(e,function(){return this}())},function(t,e,n){n(141),t.exports=n(25).RegExp.escape},function(t,e,n){var r=n(5),i=n(71),o=n(6)("species");t.exports=function(t){var e;return i(t)&&(e=t.constructor,"function"!=typeof e||e!==Array&&!i(e.prototype)||(e=void 0),r(e)&&(e=e[o],null===e&&(e=void 0))),void 0===e?Array:e}},function(t,e,n){var r=n(133);t.exports=function(t,e){return new(r(t))(e)}},function(t,e,n){"use strict";var r=n(2),i=n(24),o="number";t.exports=function(t){if("string"!==t&&t!==o&&"default"!==t)throw TypeError("Incorrect hint");return i(r(this),t!=o)}},function(t,e,n){var r=n(36),i=n(58),o=n(48);t.exports=function(t){var e=r(t),n=i.f;if(n)for(var a,s=n(t),c=o.f,u=0;s.length>u;)c.call(t,a=s[u++])&&e.push(a);return e}},function(t,e,n){var r=n(36),i=n(16);t.exports=function(t,e){for(var n,o=i(t),a=r(o),s=a.length,c=0;s>c;)if(o[n=a[c++]]===e)return n}},function(t,e,n){"use strict";var r=n(139),i=n(54),o=n(12);t.exports=function(){for(var t=o(this),e=arguments.length,n=Array(e),a=0,s=r._,c=!1;e>a;)(n[a]=arguments[a++])===s&&(c=!0);return function(){var r,o=this,a=arguments.length,u=0,l=0;if(!c&&!a)return i(t,n,o);if(r=n.slice(),c)for(;e>u;u++)r[u]===s&&(r[u]=arguments[l++]);for(;a>l;)r.push(arguments[l++]);return i(t,r,o)}}},function(t,e,n){t.exports=n(3)},function(t,e){t.exports=function(t,e){var n=e===Object(e)?function(t){return e[t]}:e;return function(e){return String(e).replace(t,n)}}},function(t,e,n){var r=n(1),i=n(140)(/[\\^$*+?.()|[\]{}]/g,"\\$&");r(r.S,"RegExp",{escape:function(t){return i(t)}})},function(t,e,n){var r=n(1);r(r.P,"Array",{copyWithin:n(91)}),n(41)("copyWithin")},function(t,e,n){"use strict";var r=n(1),i=n(22)(4);r(r.P+r.F*!n(21)([].every,!0),"Array",{every:function(t){return i(this,t,arguments[1])}})},function(t,e,n){var r=n(1);r(r.P,"Array",{fill:n(63)}),n(41)("fill")},function(t,e,n){"use strict";var r=n(1),i=n(22)(2);r(r.P+r.F*!n(21)([].filter,!0),"Array",{filter:function(t){return i(this,t,arguments[1])}})},function(t,e,n){"use strict";var r=n(1),i=n(22)(6),o="findIndex",a=!0;o in[]&&Array(1)[o](function(){a=!1}),r(r.P+r.F*a,"Array",{findIndex:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}}),n(41)(o)},function(t,e,n){"use strict";var r=n(1),i=n(22)(5),o="find",a=!0;o in[]&&Array(1)[o](function(){a=!1}),r(r.P+r.F*a,"Array",{find:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}}),n(41)(o)},function(t,e,n){"use strict";var r=n(1),i=n(22)(0),o=n(21)([].forEach,!0);r(r.P+r.F*!o,"Array",{forEach:function(t){return i(this,t,arguments[1])}})},function(t,e,n){"use strict";var r=n(26),i=n(1),o=n(10),a=n(100),s=n(70),c=n(9),u=n(64),l=n(87);i(i.S+i.F*!n(56)(function(t){Array.from(t)}),"Array",{from:function(t){var e,n,i,h,f=o(t),p="function"==typeof this?this:Array,d=arguments.length,m=d>1?arguments[1]:void 0,v=void 0!==m,g=0,y=l(f);if(v&&(m=r(m,d>2?arguments[2]:void 0,2)),void 0==y||p==Array&&s(y))for(e=c(f.length),n=new p(e);e>g;g++)u(n,g,v?m(f[g],g):f[g]);else for(h=y.call(f),n=new p;!(i=h.next()).done;g++)u(n,g,v?a(h,m,[i.value,g],!0):i.value);return n.length=g,n}})},function(t,e,n){"use strict";var r=n(1),i=n(50)(!1),o=[].indexOf,a=!!o&&1/[1].indexOf(1,-0)<0;r(r.P+r.F*(a||!n(21)(o)),"Array",{indexOf:function(t){return a?o.apply(this,arguments)||0:i(this,t,arguments[1])}})},function(t,e,n){var r=n(1);r(r.S,"Array",{isArray:n(71)})},function(t,e,n){"use strict";var r=n(1),i=n(16),o=[].join;r(r.P+r.F*(n(47)!=Object||!n(21)(o)),"Array",{join:function(t){return o.call(i(this),void 0===t?",":t)}})},function(t,e,n){"use strict";var r=n(1),i=n(16),o=n(31),a=n(9),s=[].lastIndexOf,c=!!s&&1/[1].lastIndexOf(1,-0)<0;r(r.P+r.F*(c||!n(21)(s)),"Array",{lastIndexOf:function(t){if(c)return s.apply(this,arguments)||0;var e=i(this),n=a(e.length),r=n-1;for(arguments.length>1&&(r=Math.min(r,o(arguments[1]))),r<0&&(r=n+r);r>=0;r--)if(r in e&&e[r]===t)return r||0;return-1}})},function(t,e,n){"use strict";var r=n(1),i=n(22)(1);r(r.P+r.F*!n(21)([].map,!0),"Array",{map:function(t){return i(this,t,arguments[1])}})},function(t,e,n){"use strict";var r=n(1),i=n(64);r(r.S+r.F*n(4)(function(){function t(){}return!(Array.of.call(t)instanceof t)}),"Array",{of:function(){for(var t=0,e=arguments.length,n=new("function"==typeof this?this:Array)(e);e>t;)i(n,t,arguments[t++]);return n.length=e,n}})},function(t,e,n){"use strict";var r=n(1),i=n(93);r(r.P+r.F*!n(21)([].reduceRight,!0),"Array",{reduceRight:function(t){return i(this,t,arguments.length,arguments[1],!0)}})},function(t,e,n){"use strict";var r=n(1),i=n(93);r(r.P+r.F*!n(21)([].reduce,!0),"Array",{reduce:function(t){return i(this,t,arguments.length,arguments[1],!1)}})},function(t,e,n){"use strict";var r=n(1),i=n(68),o=n(19),a=n(39),s=n(9),c=[].slice;r(r.P+r.F*n(4)(function(){i&&c.call(i)}),"Array",{slice:function(t,e){var n=s(this.length),r=o(this);if(e=void 0===e?n:e,"Array"==r)return c.call(this,t,e);for(var i=a(t,n),u=a(e,n),l=s(u-i),h=Array(l),f=0;f<l;f++)h[f]="String"==r?this.charAt(i+f):this[i+f];return h}})},function(t,e,n){"use strict";var r=n(1),i=n(22)(3);r(r.P+r.F*!n(21)([].some,!0),"Array",{some:function(t){return i(this,t,arguments[1])}})},function(t,e,n){"use strict";var r=n(1),i=n(12),o=n(10),a=n(4),s=[].sort,c=[1,2,3];r(r.P+r.F*(a(function(){c.sort(void 0)})||!a(function(){c.sort(null)})||!n(21)(s)),"Array",{sort:function(t){return void 0===t?s.call(o(this)):s.call(o(this),i(t))}})},function(t,e,n){n(38)("Array")},function(t,e,n){var r=n(1);r(r.S,"Date",{now:function(){return(new Date).getTime()}})},function(t,e,n){"use strict";var r=n(1),i=n(4),o=Date.prototype.getTime,a=function(t){return t>9?t:"0"+t};r(r.P+r.F*(i(function(){return"0385-07-25T07:06:39.999Z"!=new Date(-5e13-1).toISOString()})||!i(function(){new Date(NaN).toISOString()})),"Date",{toISOString:function(){if(!isFinite(o.call(this)))throw RangeError("Invalid time value");var t=this,e=t.getUTCFullYear(),n=t.getUTCMilliseconds(),r=e<0?"-":e>9999?"+":"";return r+("00000"+Math.abs(e)).slice(r?-6:-4)+"-"+a(t.getUTCMonth()+1)+"-"+a(t.getUTCDate())+"T"+a(t.getUTCHours())+":"+a(t.getUTCMinutes())+":"+a(t.getUTCSeconds())+"."+(n>99?n:"0"+a(n))+"Z"}})},function(t,e,n){"use strict";var r=n(1),i=n(10),o=n(24);r(r.P+r.F*n(4)(function(){return null!==new Date(NaN).toJSON()||1!==Date.prototype.toJSON.call({toISOString:function(){return 1}})}),"Date",{toJSON:function(t){var e=i(this),n=o(e);return"number"!=typeof n||isFinite(n)?e.toISOString():null}})},function(t,e,n){var r=n(6)("toPrimitive"),i=Date.prototype;r in i||n(13)(i,r,n(135))},function(t,e,n){var r=Date.prototype,i="Invalid Date",o="toString",a=r[o],s=r.getTime;new Date(NaN)+""!=i&&n(14)(r,o,function(){var t=s.call(this);return t===t?a.call(this):i})},function(t,e,n){var r=n(1);r(r.P,"Function",{bind:n(94)})},function(t,e,n){"use strict";var r=n(5),i=n(18),o=n(6)("hasInstance"),a=Function.prototype;o in a||n(8).f(a,o,{value:function(t){if("function"!=typeof this||!r(t))return!1;if(!r(this.prototype))return t instanceof this;for(;t=i(t);)if(this.prototype===t)return!0;return!1}})},function(t,e,n){var r=n(8).f,i=n(30),o=n(11),a=Function.prototype,s=/^\s*function ([^ (]*)/,c="name",u=Object.isExtensible||function(){return!0};c in a||n(7)&&r(a,c,{configurable:!0,get:function(){try{var t=this,e=(""+t).match(s)[1];return o(t,c)||!u(t)||r(t,c,i(5,e)),e}catch(n){return""}}})},function(t,e,n){var r=n(1),i=n(102),o=Math.sqrt,a=Math.acosh;r(r.S+r.F*!(a&&710==Math.floor(a(Number.MAX_VALUE))&&a(1/0)==1/0),"Math",{acosh:function(t){return(t=+t)<1?NaN:t>94906265.62425156?Math.log(t)+Math.LN2:i(t-1+o(t-1)*o(t+1))}})},function(t,e,n){function r(t){return isFinite(t=+t)&&0!=t?t<0?-r(-t):Math.log(t+Math.sqrt(t*t+1)):t}var i=n(1),o=Math.asinh;i(i.S+i.F*!(o&&1/o(0)>0),"Math",{asinh:r})},function(t,e,n){var r=n(1),i=Math.atanh;r(r.S+r.F*!(i&&1/i(-0)<0),"Math",{atanh:function(t){return 0==(t=+t)?t:Math.log((1+t)/(1-t))/2}})},function(t,e,n){var r=n(1),i=n(75);r(r.S,"Math",{cbrt:function(t){return i(t=+t)*Math.pow(Math.abs(t),1/3)}})},function(t,e,n){var r=n(1);r(r.S,"Math",{clz32:function(t){return(t>>>=0)?31-Math.floor(Math.log(t+.5)*Math.LOG2E):32}})},function(t,e,n){var r=n(1),i=Math.exp;r(r.S,"Math",{cosh:function(t){return(i(t=+t)+i(-t))/2}})},function(t,e,n){var r=n(1),i=n(74);r(r.S+r.F*(i!=Math.expm1),"Math",{expm1:i})},function(t,e,n){var r=n(1),i=n(75),o=Math.pow,a=o(2,-52),s=o(2,-23),c=o(2,127)*(2-s),u=o(2,-126),l=function(t){return t+1/a-1/a};r(r.S,"Math",{fround:function(t){var e,n,r=Math.abs(t),o=i(t);return r<u?o*l(r/u/s)*u*s:(e=(1+s/a)*r,n=e-(e-r),n>c||n!=n?o*(1/0):o*n)}})},function(t,e,n){var r=n(1),i=Math.abs;r(r.S,"Math",{hypot:function(t,e){for(var n,r,o=0,a=0,s=arguments.length,c=0;a<s;)n=i(arguments[a++]),c<n?(r=c/n,o=o*r*r+1,c=n):n>0?(r=n/c,o+=r*r):o+=n;return c===1/0?1/0:c*Math.sqrt(o)}})},function(t,e,n){var r=n(1),i=Math.imul;r(r.S+r.F*n(4)(function(){return i(4294967295,5)!=-5||2!=i.length}),"Math",{imul:function(t,e){var n=65535,r=+t,i=+e,o=n&r,a=n&i;return 0|o*a+((n&r>>>16)*a+o*(n&i>>>16)<<16>>>0)}})},function(t,e,n){var r=n(1);r(r.S,"Math",{log10:function(t){return Math.log(t)/Math.LN10}})},function(t,e,n){var r=n(1);r(r.S,"Math",{log1p:n(102)})},function(t,e,n){var r=n(1);r(r.S,"Math",{log2:function(t){return Math.log(t)/Math.LN2}})},function(t,e,n){var r=n(1);r(r.S,"Math",{sign:n(75)})},function(t,e,n){var r=n(1),i=n(74),o=Math.exp;r(r.S+r.F*n(4)(function(){return!Math.sinh(-2e-17)!=-2e-17}),"Math",{sinh:function(t){return Math.abs(t=+t)<1?(i(t)-i(-t))/2:(o(t-1)-o(-t-1))*(Math.E/2)}})},function(t,e,n){var r=n(1),i=n(74),o=Math.exp;r(r.S,"Math",{tanh:function(t){var e=i(t=+t),n=i(-t);return e==1/0?1:n==1/0?-1:(e-n)/(o(t)+o(-t))}})},function(t,e,n){var r=n(1);r(r.S,"Math",{trunc:function(t){return(t>0?Math.floor:Math.ceil)(t)}})},function(t,e,n){"use strict";var r=n(3),i=n(11),o=n(19),a=n(69),s=n(24),c=n(4),u=n(35).f,l=n(17).f,h=n(8).f,f=n(45).trim,p="Number",d=r[p],m=d,v=d.prototype,g=o(n(34)(v))==p,y="trim"in String.prototype,x=function(t){var e=s(t,!1);if("string"==typeof e&&e.length>2){e=y?e.trim():f(e,3);var n,r,i,o=e.charCodeAt(0);if(43===o||45===o){if(n=e.charCodeAt(2),88===n||120===n)return NaN}else if(48===o){switch(e.charCodeAt(1)){case 66:case 98:r=2,i=49;break;case 79:case 111:r=8,i=55;break;default:return+e}for(var a,c=e.slice(2),u=0,l=c.length;u<l;u++)if(a=c.charCodeAt(u),a<48||a>i)return NaN;return parseInt(c,r)}}return+e};if(!d(" 0o1")||!d("0b1")||d("+0x1")){d=function(t){var e=arguments.length<1?0:t,n=this;return n instanceof d&&(g?c(function(){v.valueOf.call(n)}):o(n)!=p)?a(new m(x(e)),n,d):x(e)};for(var _,w=n(7)?u(m):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger".split(","),b=0;w.length>b;b++)i(m,_=w[b])&&!i(d,_)&&h(d,_,l(m,_));d.prototype=v,v.constructor=d,n(14)(r,p,d)}},function(t,e,n){var r=n(1);r(r.S,"Number",{EPSILON:Math.pow(2,-52)})},function(t,e,n){var r=n(1),i=n(3).isFinite;r(r.S,"Number",{isFinite:function(t){return"number"==typeof t&&i(t)}})},function(t,e,n){var r=n(1);r(r.S,"Number",{isInteger:n(99)})},function(t,e,n){var r=n(1);r(r.S,"Number",{isNaN:function(t){return t!=t}})},function(t,e,n){var r=n(1),i=n(99),o=Math.abs;r(r.S,"Number",{isSafeInteger:function(t){return i(t)&&o(t)<=9007199254740991}})},function(t,e,n){var r=n(1);r(r.S,"Number",{MAX_SAFE_INTEGER:9007199254740991})},function(t,e,n){var r=n(1);r(r.S,"Number",{MIN_SAFE_INTEGER:-9007199254740991})},function(t,e,n){var r=n(1),i=n(109);r(r.S+r.F*(Number.parseFloat!=i),"Number",{parseFloat:i})},function(t,e,n){var r=n(1),i=n(110);r(r.S+r.F*(Number.parseInt!=i),"Number",{parseInt:i})},function(t,e,n){"use strict";var r=n(1),i=n(31),o=n(90),a=n(82),s=1..toFixed,c=Math.floor,u=[0,0,0,0,0,0],l="Number.toFixed: incorrect invocation!",h="0",f=function(t,e){for(var n=-1,r=e;++n<6;)r+=t*u[n],u[n]=r%1e7,r=c(r/1e7)},p=function(t){for(var e=6,n=0;--e>=0;)n+=u[e],u[e]=c(n/t),n=n%t*1e7},d=function(){for(var t=6,e="";--t>=0;)if(""!==e||0===t||0!==u[t]){var n=String(u[t]);e=""===e?n:e+a.call(h,7-n.length)+n}return e},m=function(t,e,n){return 0===e?n:e%2===1?m(t,e-1,n*t):m(t*t,e/2,n)},v=function(t){for(var e=0,n=t;n>=4096;)e+=12,n/=4096;for(;n>=2;)e+=1,n/=2;return e};r(r.P+r.F*(!!s&&("0.000"!==8e-5.toFixed(3)||"1"!==.9.toFixed(0)||"1.25"!==1.255.toFixed(2)||"1000000000000000128"!==(0xde0b6b3a7640080).toFixed(0))||!n(4)(function(){s.call({})})),"Number",{toFixed:function(t){var e,n,r,s,c=o(this,l),u=i(t),g="",y=h;if(u<0||u>20)throw RangeError(l);if(c!=c)return"NaN";if(c<=-1e21||c>=1e21)return String(c);if(c<0&&(g="-",c=-c),c>1e-21)if(e=v(c*m(2,69,1))-69,n=e<0?c*m(2,-e,1):c/m(2,e,1),n*=4503599627370496,e=52-e,e>0){for(f(0,n),r=u;r>=7;)f(1e7,0),r-=7;for(f(m(10,r,1),0),r=e-1;r>=23;)p(1<<23),r-=23;p(1<<r),f(1,1),p(2),y=d()}else f(0,n),f(1<<-e,0),y=d()+a.call(h,u);return u>0?(s=y.length,y=g+(s<=u?"0."+a.call(h,u-s)+y:y.slice(0,s-u)+"."+y.slice(s-u))):y=g+y,y}})},function(t,e,n){"use strict";var r=n(1),i=n(4),o=n(90),a=1..toPrecision;r(r.P+r.F*(i(function(){return"1"!==a.call(1,void 0)})||!i(function(){a.call({})})),"Number",{toPrecision:function(t){var e=o(this,"Number#toPrecision: incorrect invocation!");return void 0===t?a.call(e):a.call(e,t)}})},function(t,e,n){var r=n(1);r(r.S+r.F,"Object",{assign:n(103)})},function(t,e,n){var r=n(1);r(r.S,"Object",{create:n(34)})},function(t,e,n){var r=n(1);r(r.S+r.F*!n(7),"Object",{defineProperties:n(104)})},function(t,e,n){var r=n(1);r(r.S+r.F*!n(7),"Object",{defineProperty:n(8).f})},function(t,e,n){var r=n(5),i=n(29).onFreeze;n(23)("freeze",function(t){return function(e){return t&&r(e)?t(i(e)):e}})},function(t,e,n){var r=n(16),i=n(17).f;n(23)("getOwnPropertyDescriptor",function(){return function(t,e){return i(r(t),e)}})},function(t,e,n){n(23)("getOwnPropertyNames",function(){return n(105).f})},function(t,e,n){var r=n(10),i=n(18);n(23)("getPrototypeOf",function(){return function(t){return i(r(t))}})},function(t,e,n){var r=n(5);n(23)("isExtensible",function(t){return function(e){return!!r(e)&&(!t||t(e))}})},function(t,e,n){var r=n(5);n(23)("isFrozen",function(t){return function(e){return!r(e)||!!t&&t(e)}})},function(t,e,n){var r=n(5);n(23)("isSealed",function(t){return function(e){return!r(e)||!!t&&t(e)}})},function(t,e,n){var r=n(1);r(r.S,"Object",{is:n(111)})},function(t,e,n){var r=n(10),i=n(36);n(23)("keys",function(){return function(t){return i(r(t))}})},function(t,e,n){var r=n(5),i=n(29).onFreeze;n(23)("preventExtensions",function(t){return function(e){
  return t&&r(e)?t(i(e)):e}})},function(t,e,n){var r=n(5),i=n(29).onFreeze;n(23)("seal",function(t){return function(e){return t&&r(e)?t(i(e)):e}})},function(t,e,n){var r=n(1);r(r.S,"Object",{setPrototypeOf:n(77).set})},function(t,e,n){"use strict";var r=n(46),i={};i[n(6)("toStringTag")]="z",i+""!="[object z]"&&n(14)(Object.prototype,"toString",function(){return"[object "+r(this)+"]"},!0)},function(t,e,n){var r=n(1),i=n(109);r(r.G+r.F*(parseFloat!=i),{parseFloat:i})},function(t,e,n){var r=n(1),i=n(110);r(r.G+r.F*(parseInt!=i),{parseInt:i})},function(t,e,n){"use strict";var r,i,o,a=n(33),s=n(3),c=n(26),u=n(46),l=n(1),h=n(5),f=n(12),p=n(32),d=n(42),m=n(79),v=n(84).set,g=n(76)(),y="Promise",x=s.TypeError,_=s.process,w=s[y],_=s.process,b="process"==u(_),M=function(){},E=!!function(){try{var t=w.resolve(1),e=(t.constructor={})[n(6)("species")]=function(t){t(M,M)};return(b||"function"==typeof PromiseRejectionEvent)&&t.then(M)instanceof e}catch(r){}}(),S=function(t,e){return t===e||t===w&&e===o},T=function(t){var e;return!(!h(t)||"function"!=typeof(e=t.then))&&e},A=function(t){return S(w,t)?new L(t):new i(t)},L=i=function(t){var e,n;this.promise=new t(function(t,r){if(void 0!==e||void 0!==n)throw x("Bad Promise constructor");e=t,n=r}),this.resolve=f(e),this.reject=f(n)},C=function(t){try{t()}catch(e){return{error:e}}},P=function(t,e){if(!t._n){t._n=!0;var n=t._c;g(function(){for(var r=t._v,i=1==t._s,o=0,a=function(e){var n,o,a=i?e.ok:e.fail,s=e.resolve,c=e.reject,u=e.domain;try{a?(i||(2==t._h&&O(t),t._h=1),a===!0?n=r:(u&&u.enter(),n=a(r),u&&u.exit()),n===e.promise?c(x("Promise-chain cycle")):(o=T(n))?o.call(n,s,c):s(n)):c(r)}catch(l){c(l)}};n.length>o;)a(n[o++]);t._c=[],t._n=!1,e&&!t._h&&R(t)})}},R=function(t){v.call(s,function(){var e,n,r,i=t._v;if(I(t)&&(e=C(function(){b?_.emit("unhandledRejection",i,t):(n=s.onunhandledrejection)?n({promise:t,reason:i}):(r=s.console)&&r.error&&r.error("Unhandled promise rejection",i)}),t._h=b||I(t)?2:1),t._a=void 0,e)throw e.error})},I=function(t){if(1==t._h)return!1;for(var e,n=t._a||t._c,r=0;n.length>r;)if(e=n[r++],e.fail||!I(e.promise))return!1;return!0},O=function(t){v.call(s,function(){var e;b?_.emit("rejectionHandled",t):(e=s.onrejectionhandled)&&e({promise:t,reason:t._v})})},U=function(t){var e=this;e._d||(e._d=!0,e=e._w||e,e._v=t,e._s=2,e._a||(e._a=e._c.slice()),P(e,!0))},N=function(t){var e,n=this;if(!n._d){n._d=!0,n=n._w||n;try{if(n===t)throw x("Promise can't be resolved itself");(e=T(t))?g(function(){var r={_w:n,_d:!1};try{e.call(t,c(N,r,1),c(U,r,1))}catch(i){U.call(r,i)}}):(n._v=t,n._s=1,P(n,!1))}catch(r){U.call({_w:n,_d:!1},r)}}};E||(w=function(t){p(this,w,y,"_h"),f(t),r.call(this);try{t(c(N,this,1),c(U,this,1))}catch(e){U.call(this,e)}},r=function(t){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1},r.prototype=n(37)(w.prototype,{then:function(t,e){var n=A(m(this,w));return n.ok="function"!=typeof t||t,n.fail="function"==typeof e&&e,n.domain=b?_.domain:void 0,this._c.push(n),this._a&&this._a.push(n),this._s&&P(this,!1),n.promise},"catch":function(t){return this.then(void 0,t)}}),L=function(){var t=new r;this.promise=t,this.resolve=c(N,t,1),this.reject=c(U,t,1)}),l(l.G+l.W+l.F*!E,{Promise:w}),n(44)(w,y),n(38)(y),o=n(25)[y],l(l.S+l.F*!E,y,{reject:function(t){var e=A(this),n=e.reject;return n(t),e.promise}}),l(l.S+l.F*(a||!E),y,{resolve:function(t){if(t instanceof w&&S(t.constructor,this))return t;var e=A(this),n=e.resolve;return n(t),e.promise}}),l(l.S+l.F*!(E&&n(56)(function(t){w.all(t)["catch"](M)})),y,{all:function(t){var e=this,n=A(e),r=n.resolve,i=n.reject,o=C(function(){var n=[],o=0,a=1;d(t,!1,function(t){var s=o++,c=!1;n.push(void 0),a++,e.resolve(t).then(function(t){c||(c=!0,n[s]=t,--a||r(n))},i)}),--a||r(n)});return o&&i(o.error),n.promise},race:function(t){var e=this,n=A(e),r=n.reject,i=C(function(){d(t,!1,function(t){e.resolve(t).then(n.resolve,r)})});return i&&r(i.error),n.promise}})},function(t,e,n){var r=n(1),i=n(12),o=n(2),a=(n(3).Reflect||{}).apply,s=Function.apply;r(r.S+r.F*!n(4)(function(){a(function(){})}),"Reflect",{apply:function(t,e,n){var r=i(t),c=o(n);return a?a(r,e,c):s.call(r,e,c)}})},function(t,e,n){var r=n(1),i=n(34),o=n(12),a=n(2),s=n(5),c=n(4),u=n(94),l=(n(3).Reflect||{}).construct,h=c(function(){function t(){}return!(l(function(){},[],t)instanceof t)}),f=!c(function(){l(function(){})});r(r.S+r.F*(h||f),"Reflect",{construct:function(t,e){o(t),a(e);var n=arguments.length<3?t:o(arguments[2]);if(f&&!h)return l(t,e,n);if(t==n){switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3])}var r=[null];return r.push.apply(r,e),new(u.apply(t,r))}var c=n.prototype,p=i(s(c)?c:Object.prototype),d=Function.apply.call(t,p,e);return s(d)?d:p}})},function(t,e,n){var r=n(8),i=n(1),o=n(2),a=n(24);i(i.S+i.F*n(4)(function(){Reflect.defineProperty(r.f({},1,{value:1}),1,{value:2})}),"Reflect",{defineProperty:function(t,e,n){o(t),e=a(e,!0),o(n);try{return r.f(t,e,n),!0}catch(i){return!1}}})},function(t,e,n){var r=n(1),i=n(17).f,o=n(2);r(r.S,"Reflect",{deleteProperty:function(t,e){var n=i(o(t),e);return!(n&&!n.configurable)&&delete t[e]}})},function(t,e,n){"use strict";var r=n(1),i=n(2),o=function(t){this._t=i(t),this._i=0;var e,n=this._k=[];for(e in t)n.push(e)};n(72)(o,"Object",function(){var t,e=this,n=e._k;do if(e._i>=n.length)return{value:void 0,done:!0};while(!((t=n[e._i++])in e._t));return{value:t,done:!1}}),r(r.S,"Reflect",{enumerate:function(t){return new o(t)}})},function(t,e,n){var r=n(17),i=n(1),o=n(2);i(i.S,"Reflect",{getOwnPropertyDescriptor:function(t,e){return r.f(o(t),e)}})},function(t,e,n){var r=n(1),i=n(18),o=n(2);r(r.S,"Reflect",{getPrototypeOf:function(t){return i(o(t))}})},function(t,e,n){function r(t,e){var n,s,l=arguments.length<3?t:arguments[2];return u(t)===l?t[e]:(n=i.f(t,e))?a(n,"value")?n.value:void 0!==n.get?n.get.call(l):void 0:c(s=o(t))?r(s,e,l):void 0}var i=n(17),o=n(18),a=n(11),s=n(1),c=n(5),u=n(2);s(s.S,"Reflect",{get:r})},function(t,e,n){var r=n(1);r(r.S,"Reflect",{has:function(t,e){return e in t}})},function(t,e,n){var r=n(1),i=n(2),o=Object.isExtensible;r(r.S,"Reflect",{isExtensible:function(t){return i(t),!o||o(t)}})},function(t,e,n){var r=n(1);r(r.S,"Reflect",{ownKeys:n(108)})},function(t,e,n){var r=n(1),i=n(2),o=Object.preventExtensions;r(r.S,"Reflect",{preventExtensions:function(t){i(t);try{return o&&o(t),!0}catch(e){return!1}}})},function(t,e,n){var r=n(1),i=n(77);i&&r(r.S,"Reflect",{setPrototypeOf:function(t,e){i.check(t,e);try{return i.set(t,e),!0}catch(n){return!1}}})},function(t,e,n){function r(t,e,n){var c,f,p=arguments.length<4?t:arguments[3],d=o.f(l(t),e);if(!d){if(h(f=a(t)))return r(f,e,n,p);d=u(0)}return s(d,"value")?!(d.writable===!1||!h(p))&&(c=o.f(p,e)||u(0),c.value=n,i.f(p,e,c),!0):void 0!==d.set&&(d.set.call(p,n),!0)}var i=n(8),o=n(17),a=n(18),s=n(11),c=n(1),u=n(30),l=n(2),h=n(5);c(c.S,"Reflect",{set:r})},function(t,e,n){var r=n(3),i=n(69),o=n(8).f,a=n(35).f,s=n(55),c=n(53),u=r.RegExp,l=u,h=u.prototype,f=/a/g,p=/a/g,d=new u(f)!==f;if(n(7)&&(!d||n(4)(function(){return p[n(6)("match")]=!1,u(f)!=f||u(p)==p||"/a/i"!=u(f,"i")}))){u=function(t,e){var n=this instanceof u,r=s(t),o=void 0===e;return!n&&r&&t.constructor===u&&o?t:i(d?new l(r&&!o?t.source:t,e):l((r=t instanceof u)?t.source:t,r&&o?c.call(t):e),n?this:h,u)};for(var m=(function(t){t in u||o(u,t,{configurable:!0,get:function(){return l[t]},set:function(e){l[t]=e}})}),v=a(l),g=0;v.length>g;)m(v[g++]);h.constructor=u,u.prototype=h,n(14)(r,"RegExp",u)}n(38)("RegExp")},function(t,e,n){n(52)("match",1,function(t,e,n){return[function(n){"use strict";var r=t(this),i=void 0==n?void 0:n[e];return void 0!==i?i.call(n,r):new RegExp(n)[e](String(r))},n]})},function(t,e,n){n(52)("replace",2,function(t,e,n){return[function(r,i){"use strict";var o=t(this),a=void 0==r?void 0:r[e];return void 0!==a?a.call(r,o,i):n.call(String(o),r,i)},n]})},function(t,e,n){n(52)("search",1,function(t,e,n){return[function(n){"use strict";var r=t(this),i=void 0==n?void 0:n[e];return void 0!==i?i.call(n,r):new RegExp(n)[e](String(r))},n]})},function(t,e,n){n(52)("split",2,function(t,e,r){"use strict";var i=n(55),o=r,a=[].push,s="split",c="length",u="lastIndex";if("c"=="abbc"[s](/(b)*/)[1]||4!="test"[s](/(?:)/,-1)[c]||2!="ab"[s](/(?:ab)*/)[c]||4!="."[s](/(.?)(.?)/)[c]||"."[s](/()()/)[c]>1||""[s](/.?/)[c]){var l=void 0===/()??/.exec("")[1];r=function(t,e){var n=String(this);if(void 0===t&&0===e)return[];if(!i(t))return o.call(n,t,e);var r,s,h,f,p,d=[],m=(t.ignoreCase?"i":"")+(t.multiline?"m":"")+(t.unicode?"u":"")+(t.sticky?"y":""),v=0,g=void 0===e?4294967295:e>>>0,y=new RegExp(t.source,m+"g");for(l||(r=new RegExp("^"+y.source+"$(?!\\s)",m));(s=y.exec(n))&&(h=s.index+s[0][c],!(h>v&&(d.push(n.slice(v,s.index)),!l&&s[c]>1&&s[0].replace(r,function(){for(p=1;p<arguments[c]-2;p++)void 0===arguments[p]&&(s[p]=void 0)}),s[c]>1&&s.index<n[c]&&a.apply(d,s.slice(1)),f=s[0][c],v=h,d[c]>=g)));)y[u]===s.index&&y[u]++;return v===n[c]?!f&&y.test("")||d.push(""):d.push(n.slice(v)),d[c]>g?d.slice(0,g):d}}else"0"[s](void 0,0)[c]&&(r=function(t,e){return void 0===t&&0===e?[]:o.call(this,t,e)});return[function(n,i){var o=t(this),a=void 0==n?void 0:n[e];return void 0!==a?a.call(n,o,i):r.call(String(o),n,i)},r]})},function(t,e,n){"use strict";n(115);var r=n(2),i=n(53),o=n(7),a="toString",s=/./[a],c=function(t){n(14)(RegExp.prototype,a,t,!0)};n(4)(function(){return"/a/b"!=s.call({source:"a",flags:"b"})})?c(function(){var t=r(this);return"/".concat(t.source,"/","flags"in t?t.flags:!o&&t instanceof RegExp?i.call(t):void 0)}):s.name!=a&&c(function(){return s.call(this)})},function(t,e,n){"use strict";n(15)("anchor",function(t){return function(e){return t(this,"a","name",e)}})},function(t,e,n){"use strict";n(15)("big",function(t){return function(){return t(this,"big","","")}})},function(t,e,n){"use strict";n(15)("blink",function(t){return function(){return t(this,"blink","","")}})},function(t,e,n){"use strict";n(15)("bold",function(t){return function(){return t(this,"b","","")}})},function(t,e,n){"use strict";var r=n(1),i=n(80)(!1);r(r.P,"String",{codePointAt:function(t){return i(this,t)}})},function(t,e,n){"use strict";var r=n(1),i=n(9),o=n(81),a="endsWith",s=""[a];r(r.P+r.F*n(67)(a),"String",{endsWith:function(t){var e=o(this,t,a),n=arguments.length>1?arguments[1]:void 0,r=i(e.length),c=void 0===n?r:Math.min(i(n),r),u=String(t);return s?s.call(e,u,c):e.slice(c-u.length,c)===u}})},function(t,e,n){"use strict";n(15)("fixed",function(t){return function(){return t(this,"tt","","")}})},function(t,e,n){"use strict";n(15)("fontcolor",function(t){return function(e){return t(this,"font","color",e)}})},function(t,e,n){"use strict";n(15)("fontsize",function(t){return function(e){return t(this,"font","size",e)}})},function(t,e,n){var r=n(1),i=n(39),o=String.fromCharCode,a=String.fromCodePoint;r(r.S+r.F*(!!a&&1!=a.length),"String",{fromCodePoint:function(t){for(var e,n=[],r=arguments.length,a=0;r>a;){if(e=+arguments[a++],i(e,1114111)!==e)throw RangeError(e+" is not a valid code point");n.push(e<65536?o(e):o(((e-=65536)>>10)+55296,e%1024+56320))}return n.join("")}})},function(t,e,n){"use strict";var r=n(1),i=n(81),o="includes";r(r.P+r.F*n(67)(o),"String",{includes:function(t){return!!~i(this,t,o).indexOf(t,arguments.length>1?arguments[1]:void 0)}})},function(t,e,n){"use strict";n(15)("italics",function(t){return function(){return t(this,"i","","")}})},function(t,e,n){"use strict";var r=n(80)(!0);n(73)(String,"String",function(t){this._t=String(t),this._i=0},function(){var t,e=this._t,n=this._i;return n>=e.length?{value:void 0,done:!0}:(t=r(e,n),this._i+=t.length,{value:t,done:!1})})},function(t,e,n){"use strict";n(15)("link",function(t){return function(e){return t(this,"a","href",e)}})},function(t,e,n){var r=n(1),i=n(16),o=n(9);r(r.S,"String",{raw:function(t){for(var e=i(t.raw),n=o(e.length),r=arguments.length,a=[],s=0;n>s;)a.push(String(e[s++])),s<r&&a.push(String(arguments[s]));return a.join("")}})},function(t,e,n){var r=n(1);r(r.P,"String",{repeat:n(82)})},function(t,e,n){"use strict";n(15)("small",function(t){return function(){return t(this,"small","","")}})},function(t,e,n){"use strict";var r=n(1),i=n(9),o=n(81),a="startsWith",s=""[a];r(r.P+r.F*n(67)(a),"String",{startsWith:function(t){var e=o(this,t,a),n=i(Math.min(arguments.length>1?arguments[1]:void 0,e.length)),r=String(t);return s?s.call(e,r,n):e.slice(n,n+r.length)===r}})},function(t,e,n){"use strict";n(15)("strike",function(t){return function(){return t(this,"strike","","")}})},function(t,e,n){"use strict";n(15)("sub",function(t){return function(){return t(this,"sub","","")}})},function(t,e,n){"use strict";n(15)("sup",function(t){return function(){return t(this,"sup","","")}})},function(t,e,n){"use strict";n(45)("trim",function(t){return function(){return t(this,3)}})},function(t,e,n){"use strict";var r=n(3),i=n(11),o=n(7),a=n(1),s=n(14),c=n(29).KEY,u=n(4),l=n(59),h=n(44),f=n(40),p=n(6),d=n(113),m=n(86),v=n(137),g=n(136),y=n(71),x=n(2),_=n(16),w=n(24),b=n(30),M=n(34),E=n(105),S=n(17),T=n(8),A=n(36),L=S.f,C=T.f,P=E.f,R=r.Symbol,I=r.JSON,O=I&&I.stringify,U="prototype",N=p("_hidden"),F=p("toPrimitive"),D={}.propertyIsEnumerable,z=l("symbol-registry"),B=l("symbols"),k=l("op-symbols"),j=Object[U],G="function"==typeof R,V=r.QObject,H=!V||!V[U]||!V[U].findChild,W=o&&u(function(){return 7!=M(C({},"a",{get:function(){return C(this,"a",{value:7}).a}})).a})?function(t,e,n){var r=L(j,e);r&&delete j[e],C(t,e,n),r&&t!==j&&C(j,e,r)}:C,X=function(t){var e=B[t]=M(R[U]);return e._k=t,e},q=G&&"symbol"==typeof R.iterator?function(t){return"symbol"==typeof t}:function(t){return t instanceof R},Y=function(t,e,n){return t===j&&Y(k,e,n),x(t),e=w(e,!0),x(n),i(B,e)?(n.enumerable?(i(t,N)&&t[N][e]&&(t[N][e]=!1),n=M(n,{enumerable:b(0,!1)})):(i(t,N)||C(t,N,b(1,{})),t[N][e]=!0),W(t,e,n)):C(t,e,n)},Z=function(t,e){x(t);for(var n,r=g(e=_(e)),i=0,o=r.length;o>i;)Y(t,n=r[i++],e[n]);return t},J=function(t,e){return void 0===e?M(t):Z(M(t),e)},$=function(t){var e=D.call(this,t=w(t,!0));return!(this===j&&i(B,t)&&!i(k,t))&&(!(e||!i(this,t)||!i(B,t)||i(this,N)&&this[N][t])||e)},K=function(t,e){if(t=_(t),e=w(e,!0),t!==j||!i(B,e)||i(k,e)){var n=L(t,e);return!n||!i(B,e)||i(t,N)&&t[N][e]||(n.enumerable=!0),n}},Q=function(t){for(var e,n=P(_(t)),r=[],o=0;n.length>o;)i(B,e=n[o++])||e==N||e==c||r.push(e);return r},tt=function(t){for(var e,n=t===j,r=P(n?k:_(t)),o=[],a=0;r.length>a;)!i(B,e=r[a++])||n&&!i(j,e)||o.push(B[e]);return o};G||(R=function(){if(this instanceof R)throw TypeError("Symbol is not a constructor!");var t=f(arguments.length>0?arguments[0]:void 0),e=function(n){this===j&&e.call(k,n),i(this,N)&&i(this[N],t)&&(this[N][t]=!1),W(this,t,b(1,n))};return o&&H&&W(j,t,{configurable:!0,set:e}),X(t)},s(R[U],"toString",function(){return this._k}),S.f=K,T.f=Y,n(35).f=E.f=Q,n(48).f=$,n(58).f=tt,o&&!n(33)&&s(j,"propertyIsEnumerable",$,!0),d.f=function(t){return X(p(t))}),a(a.G+a.W+a.F*!G,{Symbol:R});for(var et="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),nt=0;et.length>nt;)p(et[nt++]);for(var et=A(p.store),nt=0;et.length>nt;)m(et[nt++]);a(a.S+a.F*!G,"Symbol",{"for":function(t){return i(z,t+="")?z[t]:z[t]=R(t)},keyFor:function(t){if(q(t))return v(z,t);throw TypeError(t+" is not a symbol!")},useSetter:function(){H=!0},useSimple:function(){H=!1}}),a(a.S+a.F*!G,"Object",{create:J,defineProperty:Y,defineProperties:Z,getOwnPropertyDescriptor:K,getOwnPropertyNames:Q,getOwnPropertySymbols:tt}),I&&a(a.S+a.F*(!G||u(function(){var t=R();return"[null]"!=O([t])||"{}"!=O({a:t})||"{}"!=O(Object(t))})),"JSON",{stringify:function(t){if(void 0!==t&&!q(t)){for(var e,n,r=[t],i=1;arguments.length>i;)r.push(arguments[i++]);return e=r[1],"function"==typeof e&&(n=e),!n&&y(e)||(e=function(t,e){if(n&&(e=n.call(this,t,e)),!q(e))return e}),r[1]=e,O.apply(I,r)}}}),R[U][F]||n(13)(R[U],F,R[U].valueOf),h(R,"Symbol"),h(Math,"Math",!0),h(r.JSON,"JSON",!0)},function(t,e,n){"use strict";var r=n(1),i=n(60),o=n(85),a=n(2),s=n(39),c=n(9),u=n(5),l=n(3).ArrayBuffer,h=n(79),f=o.ArrayBuffer,p=o.DataView,d=i.ABV&&l.isView,m=f.prototype.slice,v=i.VIEW,g="ArrayBuffer";r(r.G+r.W+r.F*(l!==f),{ArrayBuffer:f}),r(r.S+r.F*!i.CONSTR,g,{isView:function(t){return d&&d(t)||u(t)&&v in t}}),r(r.P+r.U+r.F*n(4)(function(){return!new f(2).slice(1,void 0).byteLength}),g,{slice:function(t,e){if(void 0!==m&&void 0===e)return m.call(a(this),t);for(var n=a(this).byteLength,r=s(t,n),i=s(void 0===e?n:e,n),o=new(h(this,f))(c(i-r)),u=new p(this),l=new p(o),d=0;r<i;)l.setUint8(d++,u.getUint8(r++));return o}}),n(38)(g)},function(t,e,n){var r=n(1);r(r.G+r.W+r.F*!n(60).ABV,{DataView:n(85).DataView})},function(t,e,n){n(28)("Float32",4,function(t){return function(e,n,r){return t(this,e,n,r)}})},function(t,e,n){n(28)("Float64",8,function(t){return function(e,n,r){return t(this,e,n,r)}})},function(t,e,n){n(28)("Int16",2,function(t){return function(e,n,r){return t(this,e,n,r)}})},function(t,e,n){n(28)("Int32",4,function(t){return function(e,n,r){return t(this,e,n,r)}})},function(t,e,n){n(28)("Int8",1,function(t){return function(e,n,r){return t(this,e,n,r)}})},function(t,e,n){n(28)("Uint16",2,function(t){return function(e,n,r){return t(this,e,n,r)}})},function(t,e,n){n(28)("Uint32",4,function(t){return function(e,n,r){return t(this,e,n,r)}})},function(t,e,n){n(28)("Uint8",1,function(t){return function(e,n,r){return t(this,e,n,r)}})},function(t,e,n){n(28)("Uint8",1,function(t){return function(e,n,r){return t(this,e,n,r)}},!0)},function(t,e,n){"use strict";var r=n(97);n(51)("WeakSet",function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}},{add:function(t){return r.def(this,t,!0)}},r,!1,!0)},function(t,e,n){"use strict";var r=n(1),i=n(50)(!0);r(r.P,"Array",{includes:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}}),n(41)("includes")},function(t,e,n){var r=n(1),i=n(76)(),o=n(3).process,a="process"==n(19)(o);r(r.G,{asap:function(t){var e=a&&o.domain;i(e?e.bind(t):t)}})},function(t,e,n){var r=n(1),i=n(19);r(r.S,"Error",{isError:function(t){return"Error"===i(t)}})},function(t,e,n){var r=n(1);r(r.P+r.R,"Map",{toJSON:n(96)("Map")})},function(t,e,n){var r=n(1);r(r.S,"Math",{iaddh:function(t,e,n,r){var i=t>>>0,o=e>>>0,a=n>>>0;return o+(r>>>0)+((i&a|(i|a)&~(i+a>>>0))>>>31)|0}})},function(t,e,n){var r=n(1);r(r.S,"Math",{imulh:function(t,e){var n=65535,r=+t,i=+e,o=r&n,a=i&n,s=r>>16,c=i>>16,u=(s*a>>>0)+(o*a>>>16);return s*c+(u>>16)+((o*c>>>0)+(u&n)>>16)}})},function(t,e,n){var r=n(1);r(r.S,"Math",{isubh:function(t,e,n,r){var i=t>>>0,o=e>>>0,a=n>>>0;return o-(r>>>0)-((~i&a|~(i^a)&i-a>>>0)>>>31)|0}})},function(t,e,n){var r=n(1);r(r.S,"Math",{umulh:function(t,e){var n=65535,r=+t,i=+e,o=r&n,a=i&n,s=r>>>16,c=i>>>16,u=(s*a>>>0)+(o*a>>>16);return s*c+(u>>>16)+((o*c>>>0)+(u&n)>>>16)}})},function(t,e,n){"use strict";var r=n(1),i=n(10),o=n(12),a=n(8);n(7)&&r(r.P+n(57),"Object",{__defineGetter__:function(t,e){a.f(i(this),t,{get:o(e),enumerable:!0,configurable:!0})}})},function(t,e,n){"use strict";var r=n(1),i=n(10),o=n(12),a=n(8);n(7)&&r(r.P+n(57),"Object",{__defineSetter__:function(t,e){a.f(i(this),t,{set:o(e),enumerable:!0,configurable:!0})}})},function(t,e,n){var r=n(1),i=n(107)(!0);r(r.S,"Object",{entries:function(t){return i(t)}})},function(t,e,n){var r=n(1),i=n(108),o=n(16),a=n(17),s=n(64);r(r.S,"Object",{getOwnPropertyDescriptors:function(t){for(var e,n=o(t),r=a.f,c=i(n),u={},l=0;c.length>l;)s(u,e=c[l++],r(n,e));return u}})},function(t,e,n){"use strict";var r=n(1),i=n(10),o=n(24),a=n(18),s=n(17).f;n(7)&&r(r.P+n(57),"Object",{__lookupGetter__:function(t){var e,n=i(this),r=o(t,!0);do if(e=s(n,r))return e.get;while(n=a(n))}})},function(t,e,n){"use strict";var r=n(1),i=n(10),o=n(24),a=n(18),s=n(17).f;n(7)&&r(r.P+n(57),"Object",{__lookupSetter__:function(t){var e,n=i(this),r=o(t,!0);do if(e=s(n,r))return e.set;while(n=a(n))}})},function(t,e,n){var r=n(1),i=n(107)(!1);r(r.S,"Object",{values:function(t){return i(t)}})},function(t,e,n){"use strict";var r=n(1),i=n(3),o=n(25),a=n(76)(),s=n(6)("observable"),c=n(12),u=n(2),l=n(32),h=n(37),f=n(13),p=n(42),d=p.RETURN,m=function(t){return null==t?void 0:c(t)},v=function(t){var e=t._c;e&&(t._c=void 0,e())},g=function(t){return void 0===t._o},y=function(t){g(t)||(t._o=void 0,v(t))},x=function(t,e){u(t),this._c=void 0,this._o=t,t=new _(this);try{var n=e(t),r=n;null!=n&&("function"==typeof n.unsubscribe?n=function(){r.unsubscribe()}:c(n),this._c=n)}catch(i){return void t.error(i)}g(this)&&v(this)};x.prototype=h({},{unsubscribe:function(){y(this)}});var _=function(t){this._s=t};_.prototype=h({},{next:function(t){var e=this._s;if(!g(e)){var n=e._o;try{var r=m(n.next);if(r)return r.call(n,t)}catch(i){try{y(e)}finally{throw i}}}},error:function(t){var e=this._s;if(g(e))throw t;var n=e._o;e._o=void 0;try{var r=m(n.error);if(!r)throw t;t=r.call(n,t)}catch(i){try{v(e)}finally{throw i}}return v(e),t},complete:function(t){var e=this._s;if(!g(e)){var n=e._o;e._o=void 0;try{var r=m(n.complete);t=r?r.call(n,t):void 0}catch(i){try{v(e)}finally{throw i}}return v(e),t}}});var w=function(t){l(this,w,"Observable","_f")._f=c(t)};h(w.prototype,{subscribe:function(t){return new x(t,this._f)},forEach:function(t){var e=this;return new(o.Promise||i.Promise)(function(n,r){c(t);var i=e.subscribe({next:function(e){try{return t(e)}catch(n){r(n),i.unsubscribe()}},error:r,complete:n})})}}),h(w,{from:function(t){var e="function"==typeof this?this:w,n=m(u(t)[s]);if(n){var r=u(n.call(t));return r.constructor===e?r:new e(function(t){return r.subscribe(t)})}return new e(function(e){var n=!1;return a(function(){if(!n){try{if(p(t,!1,function(t){if(e.next(t),n)return d})===d)return}catch(r){if(n)throw r;return void e.error(r)}e.complete()}}),function(){n=!0}})},of:function(){for(var t=0,e=arguments.length,n=Array(e);t<e;)n[t]=arguments[t++];return new("function"==typeof this?this:w)(function(t){var e=!1;return a(function(){if(!e){for(var r=0;r<n.length;++r)if(t.next(n[r]),e)return;t.complete()}}),function(){e=!0}})}}),f(w.prototype,s,function(){return this}),r(r.G,{Observable:w}),n(38)("Observable")},function(t,e,n){var r=n(27),i=n(2),o=r.key,a=r.set;r.exp({defineMetadata:function(t,e,n,r){a(t,e,i(n),o(r))}})},function(t,e,n){var r=n(27),i=n(2),o=r.key,a=r.map,s=r.store;r.exp({deleteMetadata:function(t,e){var n=arguments.length<3?void 0:o(arguments[2]),r=a(i(e),n,!1);if(void 0===r||!r["delete"](t))return!1;if(r.size)return!0;var c=s.get(e);return c["delete"](n),!!c.size||s["delete"](e)}})},function(t,e,n){var r=n(116),i=n(92),o=n(27),a=n(2),s=n(18),c=o.keys,u=o.key,l=function(t,e){var n=c(t,e),o=s(t);if(null===o)return n;var a=l(o,e);return a.length?n.length?i(new r(n.concat(a))):a:n};o.exp({getMetadataKeys:function(t){return l(a(t),arguments.length<2?void 0:u(arguments[1]))}})},function(t,e,n){var r=n(27),i=n(2),o=n(18),a=r.has,s=r.get,c=r.key,u=function(t,e,n){var r=a(t,e,n);if(r)return s(t,e,n);var i=o(e);return null!==i?u(t,i,n):void 0};r.exp({getMetadata:function(t,e){return u(t,i(e),arguments.length<3?void 0:c(arguments[2]))}})},function(t,e,n){var r=n(27),i=n(2),o=r.keys,a=r.key;r.exp({getOwnMetadataKeys:function(t){return o(i(t),arguments.length<2?void 0:a(arguments[1]))}})},function(t,e,n){var r=n(27),i=n(2),o=r.get,a=r.key;r.exp({getOwnMetadata:function(t,e){return o(t,i(e),arguments.length<3?void 0:a(arguments[2]))}})},function(t,e,n){var r=n(27),i=n(2),o=n(18),a=r.has,s=r.key,c=function(t,e,n){var r=a(t,e,n);if(r)return!0;var i=o(e);return null!==i&&c(t,i,n)};r.exp({hasMetadata:function(t,e){return c(t,i(e),arguments.length<3?void 0:s(arguments[2]))}})},function(t,e,n){var r=n(27),i=n(2),o=r.has,a=r.key;r.exp({hasOwnMetadata:function(t,e){return o(t,i(e),arguments.length<3?void 0:a(arguments[2]))}})},function(t,e,n){var r=n(27),i=n(2),o=n(12),a=r.key,s=r.set;r.exp({metadata:function(t,e){return function(n,r){s(t,e,(void 0!==r?i:o)(n),a(r))}}})},function(t,e,n){var r=n(1);r(r.P+r.R,"Set",{toJSON:n(96)("Set")})},function(t,e,n){"use strict";var r=n(1),i=n(80)(!0);r(r.P,"String",{at:function(t){return i(this,t)}})},function(t,e,n){"use strict";var r=n(1),i=n(20),o=n(9),a=n(55),s=n(53),c=RegExp.prototype,u=function(t,e){this._r=t,this._s=e};n(72)(u,"RegExp String",function(){var t=this._r.exec(this._s);return{value:t,done:null===t}}),r(r.P,"String",{matchAll:function(t){if(i(this),!a(t))throw TypeError(t+" is not a regexp!");var e=String(this),n="flags"in c?String(t.flags):s.call(t),r=new RegExp(t.source,~n.indexOf("g")?n:"g"+n);return r.lastIndex=o(t.lastIndex),new u(r,e)}})},function(t,e,n){"use strict";var r=n(1),i=n(112);r(r.P,"String",{padEnd:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0,!1)}})},function(t,e,n){"use strict";var r=n(1),i=n(112);r(r.P,"String",{padStart:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0,!0)}})},function(t,e,n){"use strict";n(45)("trimLeft",function(t){return function(){return t(this,1)}},"trimStart")},function(t,e,n){"use strict";n(45)("trimRight",function(t){return function(){return t(this,2)}},"trimEnd")},function(t,e,n){n(86)("asyncIterator")},function(t,e,n){n(86)("observable")},function(t,e,n){var r=n(1);r(r.S,"System",{global:n(3)})},function(t,e,n){for(var r=n(88),i=n(14),o=n(3),a=n(13),s=n(43),c=n(6),u=c("iterator"),l=c("toStringTag"),h=s.Array,f=["NodeList","DOMTokenList","MediaList","StyleSheetList","CSSRuleList"],p=0;p<5;p++){var d,m=f[p],v=o[m],g=v&&v.prototype;if(g){g[u]||a(g,u,h),g[l]||a(g,l,m),s[m]=h;for(d in r)g[d]||i(g,d,r[d],!0)}}},function(t,e,n){var r=n(1),i=n(84);r(r.G+r.B,{setImmediate:i.set,clearImmediate:i.clear})},function(t,e,n){var r=n(3),i=n(1),o=n(54),a=n(138),s=r.navigator,c=!!s&&/MSIE .\./.test(s.userAgent),u=function(t){return c?function(e,n){return t(o(a,[].slice.call(arguments,2),"function"==typeof e?e:Function(e)),n)}:t};i(i.G+i.B+i.F*c,{setTimeout:u(r.setTimeout),setInterval:u(r.setInterval)})},function(t,e,n){n(261),n(200),n(202),n(201),n(204),n(206),n(211),n(205),n(203),n(213),n(212),n(208),n(209),n(207),n(199),n(210),n(214),n(215),n(167),n(169),n(168),n(217),n(216),n(187),n(197),n(198),n(188),n(189),n(190),n(191),n(192),n(193),n(194),n(195),n(196),n(170),n(171),n(172),n(173),n(174),n(175),n(176),n(177),n(178),n(179),n(180),n(181),n(182),n(183),n(184),n(185),n(186),n(248),n(253),n(260),n(251),n(243),n(244),n(249),n(254),n(256),n(239),n(240),n(241),n(242),n(245),n(246),n(247),n(250),n(252),n(255),n(257),n(258),n(259),n(162),n(164),n(163),n(166),n(165),n(151),n(149),n(155),n(152),n(158),n(160),n(148),n(154),n(145),n(159),n(143),n(157),n(156),n(150),n(153),n(142),n(144),n(147),n(146),n(161),n(88),n(233),n(238),n(115),n(234),n(235),n(236),n(237),n(218),n(114),n(116),n(117),n(273),n(262),n(263),n(268),n(271),n(272),n(266),n(269),n(267),n(270),n(264),n(265),n(219),n(220),n(221),n(222),n(223),n(226),n(224),n(225),n(227),n(228),n(229),n(230),n(232),n(231),n(274),n(300),n(303),n(302),n(304),n(305),n(301),n(306),n(307),n(285),n(288),n(284),n(282),n(283),n(286),n(287),n(277),n(299),n(308),n(276),n(278),n(280),n(279),n(281),n(290),n(291),n(293),n(292),n(295),n(294),n(296),n(297),n(298),n(275),n(289),n(311),n(310),n(309),t.exports=n(25)},function(t,e){},function(t,e){function n(){throw new Error("setTimeout has not been defined")}function r(){throw new Error("clearTimeout has not been defined")}function i(t){if(l===setTimeout)return setTimeout(t,0);if((l===n||!l)&&setTimeout)return l=setTimeout,setTimeout(t,0);try{return l(t,0)}catch(e){try{return l.call(null,t,0)}catch(e){return l.call(this,t,0)}}}function o(t){if(h===clearTimeout)return clearTimeout(t);if((h===r||!h)&&clearTimeout)return h=clearTimeout,clearTimeout(t);try{return h(t)}catch(e){try{return h.call(null,t)}catch(e){return h.call(this,t)}}}function a(){m&&p&&(m=!1,p.length?d=p.concat(d):v=-1,d.length&&s())}function s(){if(!m){var t=i(a);m=!0;for(var e=d.length;e;){for(p=d,d=[];++v<e;)p&&p[v].run();v=-1,e=d.length}p=null,m=!1,o(t)}}function c(t,e){this.fun=t,this.array=e}function u(){}var l,h,f=t.exports={};!function(){try{l="function"==typeof setTimeout?setTimeout:n}catch(t){l=n}try{h="function"==typeof clearTimeout?clearTimeout:r}catch(t){h=r}}();var p,d=[],m=!1,v=-1;f.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];d.push(new c(t,e)),1!==d.length||m||i(s)},c.prototype.run=function(){this.fun.apply(null,this.array)},f.title="browser",f.browser=!0,f.env={},f.argv=[],f.version="",f.versions={},f.on=u,f.addListener=u,f.once=u,f.off=u,f.removeListener=u,f.removeAllListeners=u,f.emit=u,f.binding=function(t){throw new Error("process.binding is not supported")},f.cwd=function(){return"/"},f.chdir=function(t){throw new Error("process.chdir is not supported")},f.umask=function(){return 0}},function(t,e){t.exports="varying vec2  vUv;\n\nuniform vec2  dimensions;\n\nuniform float DETAIL_LEVEL;\nuniform float DEFORMATION_LEVEL;\nuniform float DEPTH_LEVEL;\nuniform float TIME;\n\n// const float TIME = 10000000.0;\n// const float TIME = 5000000.0;\n// const float TIME = 50000.0;\n\nconst float PI = 3.14159265359;\n\n\n// Utils\n// -----\n\nvec3  mod289( vec3 x ) { return x - floor(x * (1.0 / 289.0)) * 289.0; }\nvec2  mod289( vec2 x ) { return x - floor(x * (1.0 / 289.0)) * 289.0; }\nvec3  permute( vec3 x ) { return mod289( ( ( x * 34.0 ) + 1.0 ) * x ); }\nfloat rand( vec2 co ) { return fract( sin( dot( co.xy, vec2( 12.9898, 78.233 ) ) ) * 43758.5453 ); }\nfloat snoise( vec2 v ) {\n\n    const vec4 C = vec4( 0.211324865405187, 0.366025403784439, -0.577350269189626, 0.024390243902439 );\n    vec2 i = floor( v + dot( v, C.yy ) );\n    vec2 x0 = v -   i + dot(i, C.xx);\n    vec2 i1;\n    i1 = (x0.x > x0.y) ? vec2(1.0, 0.0) : vec2(0.0, 1.0);\n    vec4 x12 = x0.xyxy + C.xxzz;\n    x12.xy -= i1;\n    i = mod289(i); // Avoid truncation effects in permutation\n    vec3 p = permute( permute( i.y + vec3(0.0, i1.y, 1.0 ))\n        + i.x + vec3(0.0, i1.x, 1.0 ));\n\n    vec3 m = max(0.5 - vec3(dot(x0,x0), dot(x12.xy,x12.xy), dot(x12.zw,x12.zw)), 0.0);\n    m = m*m ;\n    m = m*m ;\n    vec3 x = 2.0 * fract(p * C.www) - 1.0;\n    vec3 h = abs(x) - 0.5;\n    vec3 ox = floor(x + 0.5);\n    vec3 a0 = x - ox;\n    m *= 1.79284291400159 - 0.85373472095314 * ( a0*a0 + h*h );\n    vec3 g;\n    g.x  = a0.x  * x0.x  + h.x  * x0.y;\n    g.yz = a0.yz * x12.xz + h.yz * x12.yw;\n    return 100.0 * dot(m, g);\n}\n\n\n// Helpers\n// -------\n\nfloat deform( vec2 p, vec2 v ) {\n\n    return snoise( p + v ) * DEPTH_LEVEL + DEPTH_LEVEL;\n}\n\n\n// Main\n// ----\n\nvoid main() {\n\n    vec2  screenPos = gl_FragCoord.xy / dimensions.xy;\n    vec2  offsetPos = screenPos * 2.0 - 1.0;\n\n    vec2  velocity = vec2( 0.0 );\n    float deformation = 0.0;\n    float point = 0.0;\n\n    // Add first deformation\n    velocity = vec2( TIME * vUv.x * DETAIL_LEVEL, TIME * vUv.y * DETAIL_LEVEL / ( dimensions.x / dimensions.y ) );\n    deformation += deform( offsetPos, velocity );\n\n    // Add second deformation\n    point = snoise( offsetPos * vec2( cos( TIME * 0.3 ) * sin( TIME * 1.5 ), sin( TIME * 0.5 ) * cos( TIME * 1.5 ) ) * DEFORMATION_LEVEL ) * PI;\n    velocity = vec2( cos( point ), sin( point ) + TIME );\n    deformation += deform( offsetPos, velocity );\n\n    // Clip and apply deformation\n    vec3 color = vec3( smoothstep( 0.49, 0.51, fract( deformation ) ) );\n\n    // Dilute colour strength\n    // color = min( ( color + ( 0.75 ) ), 1.0 );\n\n    // Add grit\n    // color += min( rand( offsetPos + deformation * 0.00005 ) * 0.35, 1.0 );\n\n    gl_FragColor = vec4( color, 1.0 );\n}\n"},function(t,e){t.exports="varying vec2 vUv;\n\nvoid main() {\n\n    vUv = uv;\n\n    gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);\n}"},function(t,e,n){(function(e,n){!function(e){"use strict";function r(t,e,n,r){var i=Object.create((e||o).prototype),a=new d(r||[]);return i._invoke=h(t,n,a),i}function i(t,e,n){try{
  return{type:"normal",arg:t.call(e,n)}}catch(r){return{type:"throw",arg:r}}}function o(){}function a(){}function s(){}function c(t){["next","throw","return"].forEach(function(e){t[e]=function(t){return this._invoke(e,t)}})}function u(t){this.arg=t}function l(t){function e(n,r,o,a){var s=i(t[n],t,r);if("throw"!==s.type){var c=s.arg,l=c.value;return l instanceof u?Promise.resolve(l.arg).then(function(t){e("next",t,o,a)},function(t){e("throw",t,o,a)}):Promise.resolve(l).then(function(t){c.value=t,o(c)},a)}a(s.arg)}function r(t,n){function r(){return new Promise(function(r,i){e(t,n,r,i)})}return o=o?o.then(r,r):r()}"object"==typeof n&&n.domain&&(e=n.domain.bind(e));var o;this._invoke=r}function h(t,e,n){var r=E;return function(o,a){if(r===T)throw new Error("Generator is already running");if(r===A){if("throw"===o)throw a;return v()}for(;;){var s=n.delegate;if(s){if("return"===o||"throw"===o&&s.iterator[o]===g){n.delegate=null;var c=s.iterator["return"];if(c){var u=i(c,s.iterator,a);if("throw"===u.type){o="throw",a=u.arg;continue}}if("return"===o)continue}var u=i(s.iterator[o],s.iterator,a);if("throw"===u.type){n.delegate=null,o="throw",a=u.arg;continue}o="next",a=g;var l=u.arg;if(!l.done)return r=S,l;n[s.resultName]=l.value,n.next=s.nextLoc,n.delegate=null}if("next"===o)n.sent=n._sent=a;else if("throw"===o){if(r===E)throw r=A,a;n.dispatchException(a)&&(o="next",a=g)}else"return"===o&&n.abrupt("return",a);r=T;var u=i(t,e,n);if("normal"===u.type){r=n.done?A:S;var l={value:u.arg,done:n.done};if(u.arg!==L)return l;n.delegate&&"next"===o&&(a=g)}else"throw"===u.type&&(r=A,o="throw",a=u.arg)}}}function f(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function p(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function d(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(f,this),this.reset(!0)}function m(t){if(t){var e=t[_];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,r=function i(){for(;++n<t.length;)if(y.call(t,n))return i.value=t[n],i.done=!1,i;return i.value=g,i.done=!0,i};return r.next=r}}return{next:v}}function v(){return{value:g,done:!0}}var g,y=Object.prototype.hasOwnProperty,x="function"==typeof Symbol?Symbol:{},_=x.iterator||"@@iterator",w=x.toStringTag||"@@toStringTag",b="object"==typeof t,M=e.regeneratorRuntime;if(M)return void(b&&(t.exports=M));M=e.regeneratorRuntime=b?t.exports:{},M.wrap=r;var E="suspendedStart",S="suspendedYield",T="executing",A="completed",L={},C=s.prototype=o.prototype;a.prototype=C.constructor=s,s.constructor=a,s[w]=a.displayName="GeneratorFunction",M.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===a||"GeneratorFunction"===(e.displayName||e.name))},M.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,s):(t.__proto__=s,w in t||(t[w]="GeneratorFunction")),t.prototype=Object.create(C),t},M.awrap=function(t){return new u(t)},c(l.prototype),M.async=function(t,e,n,i){var o=new l(r(t,e,n,i));return M.isGeneratorFunction(e)?o:o.next().then(function(t){return t.done?t.value:o.next()})},c(C),C[_]=function(){return this},C[w]="Generator",C.toString=function(){return"[object Generator]"},M.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},M.values=m,d.prototype={constructor:d,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=g,this.done=!1,this.delegate=null,this.tryEntries.forEach(p),!t)for(var e in this)"t"===e.charAt(0)&&y.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=g)},stop:function(){this.done=!0;var t=this.tryEntries[0],e=t.completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){function e(e,r){return o.type="throw",o.arg=t,n.next=e,!!r}if(this.done)throw t;for(var n=this,r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r],o=i.completion;if("root"===i.tryLoc)return e("end");if(i.tryLoc<=this.prev){var a=y.call(i,"catchLoc"),s=y.call(i,"finallyLoc");if(a&&s){if(this.prev<i.catchLoc)return e(i.catchLoc,!0);if(this.prev<i.finallyLoc)return e(i.finallyLoc)}else if(a){if(this.prev<i.catchLoc)return e(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return e(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&y.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var i=r;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var o=i?i.completion:{};return o.type=t,o.arg=e,i?this.next=i.finallyLoc:this.complete(o),L},complete:function(t,e){if("throw"===t.type)throw t.arg;"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=t.arg,this.next="end"):"normal"===t.type&&e&&(this.next=e)},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),p(n),L}},"catch":function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;p(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:m(t),resultName:e,nextLoc:n},L}}}("object"==typeof e?e:"object"==typeof window?window:"object"==typeof self?self:this)}).call(e,function(){return this}(),n(314))},function(t,e,n){!function(t,n){n(e)}(this,function(t){"use strict";function e(){}function n(t,e){this.x=t||0,this.y=e||0}function r(e,o,a,s,c,u,l,h,f,p){Object.defineProperty(this,"id",{value:i()}),this.uuid=t.Math.generateUUID(),this.name="",this.sourceFile="",this.image=void 0!==e?e:r.DEFAULT_IMAGE,this.mipmaps=[],this.mapping=void 0!==o?o:r.DEFAULT_MAPPING,this.wrapS=void 0!==a?a:Mo,this.wrapT=void 0!==s?s:Mo,this.magFilter=void 0!==c?c:Co,this.minFilter=void 0!==u?u:Ro,this.anisotropy=void 0!==f?f:1,this.format=void 0!==l?l:qo,this.type=void 0!==h?h:Oo,this.offset=new n(0,0),this.repeat=new n(1,1),this.generateMipmaps=!0,this.premultiplyAlpha=!1,this.flipY=!0,this.unpackAlignment=4,this.encoding=void 0!==p?p:_a,this.version=0,this.onUpdate=null}function i(){return Pa++}function o(t,e,n,r){this.x=t||0,this.y=e||0,this.z=n||0,this.w=void 0!==r?r:1}function a(e,n,i){this.uuid=t.Math.generateUUID(),this.width=e,this.height=n,this.scissor=new o(0,0,e,n),this.scissorTest=!1,this.viewport=new o(0,0,e,n),i=i||{},void 0===i.minFilter&&(i.minFilter=Co),this.texture=new r((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 s(t,e,n){a.call(this,t,e,n),this.activeCubeFace=0,this.activeMipMapLevel=0}function c(t,e,n,r){this._x=t||0,this._y=e||0,this._z=n||0,this._w=void 0!==r?r:1}function u(t,e,n){this.x=t||0,this.y=e||0,this.z=n||0}function l(){this.elements=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),arguments.length>0&&console.error("THREE.Matrix4: the constructor no longer reads arguments. use .set() instead.")}function h(t,e,n,i,o,a,s,c,u,l){t=void 0!==t?t:[],e=void 0!==e?e:po,r.call(this,t,e,n,i,o,a,s,c,u,l),this.flipY=!1}function f(){this.seq=[],this.map={}}function p(t,e,n){var r=t[0];if(r<=0||r>0)return t;var i=e*n,o=Oa[i];if(void 0===o&&(o=new Float32Array(i),Oa[i]=o),0!==e){r.toArray(o,0);for(var a=1,s=0;a!==e;++a)s+=n,t[a].toArray(o,s)}return o}function d(t,e){var n=Ua[e];void 0===n&&(n=new Int32Array(e),Ua[e]=n);for(var r=0;r!==e;++r)n[r]=t.allocTextureUnit();return n}function m(t,e){t.uniform1f(this.addr,e)}function v(t,e){t.uniform1i(this.addr,e)}function g(t,e){void 0===e.x?t.uniform2fv(this.addr,e):t.uniform2f(this.addr,e.x,e.y)}function y(t,e){void 0!==e.x?t.uniform3f(this.addr,e.x,e.y,e.z):void 0!==e.r?t.uniform3f(this.addr,e.r,e.g,e.b):t.uniform3fv(this.addr,e)}function x(t,e){void 0===e.x?t.uniform4fv(this.addr,e):t.uniform4f(this.addr,e.x,e.y,e.z,e.w)}function _(t,e){t.uniformMatrix2fv(this.addr,!1,e.elements||e)}function w(t,e){t.uniformMatrix3fv(this.addr,!1,e.elements||e)}function b(t,e){t.uniformMatrix4fv(this.addr,!1,e.elements||e)}function M(t,e,n){var r=n.allocTextureUnit();t.uniform1i(this.addr,r),n.setTexture2D(e||Ra,r)}function E(t,e,n){var r=n.allocTextureUnit();t.uniform1i(this.addr,r),n.setTextureCube(e||Ia,r)}function S(t,e){t.uniform2iv(this.addr,e)}function T(t,e){t.uniform3iv(this.addr,e)}function A(t,e){t.uniform4iv(this.addr,e)}function L(t){switch(t){case 5126:return m;case 35664:return g;case 35665:return y;case 35666:return x;case 35674:return _;case 35675:return w;case 35676:return b;case 35678:return M;case 35680:return E;case 5124:case 35670:return v;case 35667:case 35671:return S;case 35668:case 35672:return T;case 35669:case 35673:return A}}function C(t,e){t.uniform1fv(this.addr,e)}function P(t,e){t.uniform1iv(this.addr,e)}function R(t,e){t.uniform2fv(this.addr,p(e,this.size,2))}function I(t,e){t.uniform3fv(this.addr,p(e,this.size,3))}function O(t,e){t.uniform4fv(this.addr,p(e,this.size,4))}function U(t,e){t.uniformMatrix2fv(this.addr,!1,p(e,this.size,4))}function N(t,e){t.uniformMatrix3fv(this.addr,!1,p(e,this.size,9))}function F(t,e){t.uniformMatrix4fv(this.addr,!1,p(e,this.size,16))}function D(t,e,n){var r=e.length,i=d(n,r);t.uniform1iv(this.addr,i);for(var o=0;o!==r;++o)n.setTexture2D(e[o]||Ra,i[o])}function z(t,e,n){var r=e.length,i=d(n,r);t.uniform1iv(this.addr,i);for(var o=0;o!==r;++o)n.setTextureCube(e[o]||Ia,i[o])}function B(t){switch(t){case 5126:return C;case 35664:return R;case 35665:return I;case 35666:return O;case 35674:return U;case 35675:return N;case 35676:return F;case 35678:return D;case 35680:return z;case 5124:case 35670:return P;case 35667:case 35671:return S;case 35668:case 35672:return T;case 35669:case 35673:return A}}function k(t,e,n){this.id=t,this.addr=n,this.setValue=L(e.type)}function j(t,e,n){this.id=t,this.addr=n,this.size=e.size,this.setValue=B(e.type)}function G(t){this.id=t,f.call(this)}function V(t,e){t.seq.push(e),t.map[e.id]=e}function H(t,e,n){var r=t.name,i=r.length;for(Na.lastIndex=0;;){var o=Na.exec(r),a=Na.lastIndex,s=o[1],c="]"===o[2],u=o[3];if(c&&(s=0|s),void 0===u||"["===u&&a+2===i){V(n,void 0===u?new k(s,t,e):new j(s,t,e));break}var l=n.map,h=l[s];void 0===h&&(h=new G(s),V(n,h)),n=h}}function W(t,e,n){f.call(this),this.renderer=n;for(var r=t.getProgramParameter(e,t.ACTIVE_UNIFORMS),i=0;i!==r;++i){var o=t.getActiveUniform(e,i),a=o.name,s=t.getUniformLocation(e,a);H(o,s,this)}}function X(t,e,n){return void 0===e&&void 0===n?this.set(t):this.setRGB(t,e,n)}function q(t,e){this.min=void 0!==t?t:new n((+(1/0)),(+(1/0))),this.max=void 0!==e?e:new n((-(1/0)),(-(1/0)))}function Y(t,e){function r(){var t=new Float32Array([-1,-1,0,0,1,-1,1,0,1,1,1,1,-1,1,0,1]),e=new Uint16Array([0,1,2,0,2,3]);o=d.createBuffer(),a=d.createBuffer(),d.bindBuffer(d.ARRAY_BUFFER,o),d.bufferData(d.ARRAY_BUFFER,t,d.STATIC_DRAW),d.bindBuffer(d.ELEMENT_ARRAY_BUFFER,a),d.bufferData(d.ELEMENT_ARRAY_BUFFER,e,d.STATIC_DRAW),f=d.createTexture(),p=d.createTexture(),m.bindTexture(d.TEXTURE_2D,f),d.texImage2D(d.TEXTURE_2D,0,d.RGB,16,16,0,d.RGB,d.UNSIGNED_BYTE,null),d.texParameteri(d.TEXTURE_2D,d.TEXTURE_WRAP_S,d.CLAMP_TO_EDGE),d.texParameteri(d.TEXTURE_2D,d.TEXTURE_WRAP_T,d.CLAMP_TO_EDGE),d.texParameteri(d.TEXTURE_2D,d.TEXTURE_MAG_FILTER,d.NEAREST),d.texParameteri(d.TEXTURE_2D,d.TEXTURE_MIN_FILTER,d.NEAREST),m.bindTexture(d.TEXTURE_2D,p),d.texImage2D(d.TEXTURE_2D,0,d.RGBA,16,16,0,d.RGBA,d.UNSIGNED_BYTE,null),d.texParameteri(d.TEXTURE_2D,d.TEXTURE_WRAP_S,d.CLAMP_TO_EDGE),d.texParameteri(d.TEXTURE_2D,d.TEXTURE_WRAP_T,d.CLAMP_TO_EDGE),d.texParameteri(d.TEXTURE_2D,d.TEXTURE_MAG_FILTER,d.NEAREST),d.texParameteri(d.TEXTURE_2D,d.TEXTURE_MIN_FILTER,d.NEAREST),s={vertexShader:["uniform lowp int renderType;","uniform vec3 screenPosition;","uniform vec2 scale;","uniform float rotation;","uniform sampler2D occlusionMap;","attribute vec2 position;","attribute vec2 uv;","varying vec2 vUV;","varying float vVisibility;","void main() {","vUV = uv;","vec2 pos = position;","if ( renderType == 2 ) {","vec4 visibility = texture2D( occlusionMap, vec2( 0.1, 0.1 ) );","visibility += texture2D( occlusionMap, vec2( 0.5, 0.1 ) );","visibility += texture2D( occlusionMap, vec2( 0.9, 0.1 ) );","visibility += texture2D( occlusionMap, vec2( 0.9, 0.5 ) );","visibility += texture2D( occlusionMap, vec2( 0.9, 0.9 ) );","visibility += texture2D( occlusionMap, vec2( 0.5, 0.9 ) );","visibility += texture2D( occlusionMap, vec2( 0.1, 0.9 ) );","visibility += texture2D( occlusionMap, vec2( 0.1, 0.5 ) );","visibility += texture2D( occlusionMap, vec2( 0.5, 0.5 ) );","vVisibility =        visibility.r / 9.0;","vVisibility *= 1.0 - visibility.g / 9.0;","vVisibility *=       visibility.b / 9.0;","vVisibility *= 1.0 - visibility.a / 9.0;","pos.x = cos( rotation ) * position.x - sin( rotation ) * position.y;","pos.y = sin( rotation ) * position.x + cos( rotation ) * position.y;","}","gl_Position = vec4( ( pos * scale + screenPosition.xy ).xy, screenPosition.z, 1.0 );","}"].join("\n"),fragmentShader:["uniform lowp int renderType;","uniform sampler2D map;","uniform float opacity;","uniform vec3 color;","varying vec2 vUV;","varying float vVisibility;","void main() {","if ( renderType == 0 ) {","gl_FragColor = vec4( 1.0, 0.0, 1.0, 0.0 );","} else if ( renderType == 1 ) {","gl_FragColor = texture2D( map, vUV );","} else {","vec4 texture = texture2D( map, vUV );","texture.a *= opacity * vVisibility;","gl_FragColor = texture;","gl_FragColor.rgb *= color;","}","}"].join("\n")},c=i(s),l={vertex:d.getAttribLocation(c,"position"),uv:d.getAttribLocation(c,"uv")},h={renderType:d.getUniformLocation(c,"renderType"),map:d.getUniformLocation(c,"map"),occlusionMap:d.getUniformLocation(c,"occlusionMap"),opacity:d.getUniformLocation(c,"opacity"),color:d.getUniformLocation(c,"color"),scale:d.getUniformLocation(c,"scale"),rotation:d.getUniformLocation(c,"rotation"),screenPosition:d.getUniformLocation(c,"screenPosition")}}function i(e){var n=d.createProgram(),r=d.createShader(d.FRAGMENT_SHADER),i=d.createShader(d.VERTEX_SHADER),o="precision "+t.getPrecision()+" float;\n";return d.shaderSource(r,o+e.fragmentShader),d.shaderSource(i,o+e.vertexShader),d.compileShader(r),d.compileShader(i),d.attachShader(n,r),d.attachShader(n,i),d.linkProgram(n),n}var o,a,s,c,l,h,f,p,d=t.context,m=t.state;this.render=function(i,s,v){if(0!==e.length){var g=new u,y=v.w/v.z,x=.5*v.z,_=.5*v.w,w=16/v.w,b=new n(w*y,w),M=new u(1,1,0),E=new n(1,1),S=new q;S.min.set(0,0),S.max.set(v.z-16,v.w-16),void 0===c&&r(),d.useProgram(c),m.initAttributes(),m.enableAttribute(l.vertex),m.enableAttribute(l.uv),m.disableUnusedAttributes(),d.uniform1i(h.occlusionMap,0),d.uniform1i(h.map,1),d.bindBuffer(d.ARRAY_BUFFER,o),d.vertexAttribPointer(l.vertex,2,d.FLOAT,!1,16,0),d.vertexAttribPointer(l.uv,2,d.FLOAT,!1,16,8),d.bindBuffer(d.ELEMENT_ARRAY_BUFFER,a),m.disable(d.CULL_FACE),m.setDepthWrite(!1);for(var T=0,A=e.length;T<A;T++){w=16/v.w,b.set(w*y,w);var L=e[T];if(g.set(L.matrixWorld.elements[12],L.matrixWorld.elements[13],L.matrixWorld.elements[14]),g.applyMatrix4(s.matrixWorldInverse),g.applyProjection(s.projectionMatrix),M.copy(g),E.x=v.x+M.x*x+x-8,E.y=v.y+M.y*_+_-8,S.containsPoint(E)===!0){m.activeTexture(d.TEXTURE0),m.bindTexture(d.TEXTURE_2D,null),m.activeTexture(d.TEXTURE1),m.bindTexture(d.TEXTURE_2D,f),d.copyTexImage2D(d.TEXTURE_2D,0,d.RGB,E.x,E.y,16,16,0),d.uniform1i(h.renderType,0),d.uniform2f(h.scale,b.x,b.y),d.uniform3f(h.screenPosition,M.x,M.y,M.z),m.disable(d.BLEND),m.enable(d.DEPTH_TEST),d.drawElements(d.TRIANGLES,6,d.UNSIGNED_SHORT,0),m.activeTexture(d.TEXTURE0),m.bindTexture(d.TEXTURE_2D,p),d.copyTexImage2D(d.TEXTURE_2D,0,d.RGBA,E.x,E.y,16,16,0),d.uniform1i(h.renderType,1),m.disable(d.DEPTH_TEST),m.activeTexture(d.TEXTURE1),m.bindTexture(d.TEXTURE_2D,f),d.drawElements(d.TRIANGLES,6,d.UNSIGNED_SHORT,0),L.positionScreen.copy(M),L.customUpdateCallback?L.customUpdateCallback(L):L.updateLensFlares(),d.uniform1i(h.renderType,2),m.enable(d.BLEND);for(var C=0,P=L.lensFlares.length;C<P;C++){var R=L.lensFlares[C];R.opacity>.001&&R.scale>.001&&(M.x=R.x,M.y=R.y,M.z=R.z,w=R.size*R.scale/v.w,b.x=w*y,b.y=w,d.uniform3f(h.screenPosition,M.x,M.y,M.z),d.uniform2f(h.scale,b.x,b.y),d.uniform1f(h.rotation,R.rotation),d.uniform1f(h.opacity,R.opacity),d.uniform3f(h.color,R.color.r,R.color.g,R.color.b),m.setBlending(R.blending,R.blendEquation,R.blendSrc,R.blendDst),t.setTexture2D(R.texture,1),d.drawElements(d.TRIANGLES,6,d.UNSIGNED_SHORT,0))}}}m.enable(d.CULL_FACE),m.enable(d.DEPTH_TEST),m.setDepthWrite(!0),t.resetGLState()}}}function Z(t,e){function n(){var t=new Float32Array([-.5,-.5,0,0,.5,-.5,1,0,.5,.5,1,1,-.5,.5,0,1]),e=new Uint16Array([0,1,2,0,2,3]);a=d.createBuffer(),s=d.createBuffer(),d.bindBuffer(d.ARRAY_BUFFER,a),d.bufferData(d.ARRAY_BUFFER,t,d.STATIC_DRAW),d.bindBuffer(d.ELEMENT_ARRAY_BUFFER,s),d.bufferData(d.ELEMENT_ARRAY_BUFFER,e,d.STATIC_DRAW),l=i(),h={position:d.getAttribLocation(l,"position"),uv:d.getAttribLocation(l,"uv")},f={uvOffset:d.getUniformLocation(l,"uvOffset"),uvScale:d.getUniformLocation(l,"uvScale"),rotation:d.getUniformLocation(l,"rotation"),scale:d.getUniformLocation(l,"scale"),color:d.getUniformLocation(l,"color"),map:d.getUniformLocation(l,"map"),opacity:d.getUniformLocation(l,"opacity"),modelViewMatrix:d.getUniformLocation(l,"modelViewMatrix"),projectionMatrix:d.getUniformLocation(l,"projectionMatrix"),fogType:d.getUniformLocation(l,"fogType"),fogDensity:d.getUniformLocation(l,"fogDensity"),fogNear:d.getUniformLocation(l,"fogNear"),fogFar:d.getUniformLocation(l,"fogFar"),fogColor:d.getUniformLocation(l,"fogColor"),alphaTest:d.getUniformLocation(l,"alphaTest")};var n=document.createElementNS("http://www.w3.org/1999/xhtml","canvas");n.width=8,n.height=8;var o=n.getContext("2d");o.fillStyle="white",o.fillRect(0,0,8,8),p=new r(n),p.needsUpdate=!0}function i(){var e=d.createProgram(),n=d.createShader(d.VERTEX_SHADER),r=d.createShader(d.FRAGMENT_SHADER);return d.shaderSource(n,["precision "+t.getPrecision()+" float;","uniform mat4 modelViewMatrix;","uniform mat4 projectionMatrix;","uniform float rotation;","uniform vec2 scale;","uniform vec2 uvOffset;","uniform vec2 uvScale;","attribute vec2 position;","attribute vec2 uv;","varying vec2 vUV;","void main() {","vUV = uvOffset + uv * uvScale;","vec2 alignedPosition = position * scale;","vec2 rotatedPosition;","rotatedPosition.x = cos( rotation ) * alignedPosition.x - sin( rotation ) * alignedPosition.y;","rotatedPosition.y = sin( rotation ) * alignedPosition.x + cos( rotation ) * alignedPosition.y;","vec4 finalPosition;","finalPosition = modelViewMatrix * vec4( 0.0, 0.0, 0.0, 1.0 );","finalPosition.xy += rotatedPosition;","finalPosition = projectionMatrix * finalPosition;","gl_Position = finalPosition;","}"].join("\n")),d.shaderSource(r,["precision "+t.getPrecision()+" float;","uniform vec3 color;","uniform sampler2D map;","uniform float opacity;","uniform int fogType;","uniform vec3 fogColor;","uniform float fogDensity;","uniform float fogNear;","uniform float fogFar;","uniform float alphaTest;","varying vec2 vUV;","void main() {","vec4 texture = texture2D( map, vUV );","if ( texture.a < alphaTest ) discard;","gl_FragColor = vec4( color * texture.xyz, texture.a * opacity );","if ( fogType > 0 ) {","float depth = gl_FragCoord.z / gl_FragCoord.w;","float fogFactor = 0.0;","if ( fogType == 1 ) {","fogFactor = smoothstep( fogNear, fogFar, depth );","} else {","const float LOG2 = 1.442695;","fogFactor = exp2( - fogDensity * fogDensity * depth * depth * LOG2 );","fogFactor = 1.0 - clamp( fogFactor, 0.0, 1.0 );","}","gl_FragColor = mix( gl_FragColor, vec4( fogColor, gl_FragColor.w ), fogFactor );","}","}"].join("\n")),d.compileShader(n),d.compileShader(r),d.attachShader(e,n),d.attachShader(e,r),d.linkProgram(e),e}function o(t,e){return t.renderOrder!==e.renderOrder?t.renderOrder-e.renderOrder:t.z!==e.z?e.z-t.z:e.id-t.id}var a,s,l,h,f,p,d=t.context,m=t.state,v=new u,g=new c,y=new u;this.render=function(r,i){if(0!==e.length){void 0===l&&n(),d.useProgram(l),m.initAttributes(),m.enableAttribute(h.position),m.enableAttribute(h.uv),m.disableUnusedAttributes(),m.disable(d.CULL_FACE),m.enable(d.BLEND),d.bindBuffer(d.ARRAY_BUFFER,a),d.vertexAttribPointer(h.position,2,d.FLOAT,!1,16,0),d.vertexAttribPointer(h.uv,2,d.FLOAT,!1,16,8),d.bindBuffer(d.ELEMENT_ARRAY_BUFFER,s),d.uniformMatrix4fv(f.projectionMatrix,!1,i.projectionMatrix.elements),m.activeTexture(d.TEXTURE0),d.uniform1i(f.map,0);var c=0,u=0,x=r.fog;x?(d.uniform3f(f.fogColor,x.color.r,x.color.g,x.color.b),x&&x.isFog?(d.uniform1f(f.fogNear,x.near),d.uniform1f(f.fogFar,x.far),d.uniform1i(f.fogType,1),c=1,u=1):x&&x.isFogExp2&&(d.uniform1f(f.fogDensity,x.density),d.uniform1i(f.fogType,2),c=2,u=2)):(d.uniform1i(f.fogType,0),c=0,u=0);for(var _=0,w=e.length;_<w;_++){var b=e[_];b.modelViewMatrix.multiplyMatrices(i.matrixWorldInverse,b.matrixWorld),b.z=-b.modelViewMatrix.elements[14]}e.sort(o);for(var M=[],_=0,w=e.length;_<w;_++){var b=e[_],E=b.material;if(E.visible!==!1){d.uniform1f(f.alphaTest,E.alphaTest),d.uniformMatrix4fv(f.modelViewMatrix,!1,b.modelViewMatrix.elements),b.matrixWorld.decompose(v,g,y),M[0]=y.x,M[1]=y.y;var S=0;r.fog&&E.fog&&(S=u),c!==S&&(d.uniform1i(f.fogType,S),c=S),null!==E.map?(d.uniform2f(f.uvOffset,E.map.offset.x,E.map.offset.y),d.uniform2f(f.uvScale,E.map.repeat.x,E.map.repeat.y)):(d.uniform2f(f.uvOffset,0,0),d.uniform2f(f.uvScale,1,1)),d.uniform1f(f.opacity,E.opacity),d.uniform3f(f.color,E.color.r,E.color.g,E.color.b),d.uniform1f(f.rotation,E.rotation),d.uniform2fv(f.scale,M),m.setBlending(E.blending,E.blendEquation,E.blendSrc,E.blendDst),m.setDepthTest(E.depthTest),m.setDepthWrite(E.depthWrite),E.map?t.setTexture2D(E.map,0):t.setTexture2D(p,0),d.drawElements(d.TRIANGLES,6,d.UNSIGNED_SHORT,0)}}m.enable(d.CULL_FACE),t.resetGLState()}}}function J(){Object.defineProperty(this,"id",{value:$()}),this.uuid=t.Math.generateUUID(),this.name="",this.type="Material",this.fog=!0,this.lights=!0,this.blending=Li,this.side=xi,this.shading=Mi,this.vertexColors=Ei,this.opacity=1,this.transparent=!1,this.blendSrc=Vi,this.blendDst=Hi,this.blendEquation=Ui,this.blendSrcAlpha=null,this.blendDstAlpha=null,this.blendEquationAlpha=null,this.depthFunc=Qi,this.depthTest=!0,this.depthWrite=!0,this.clippingPlanes=null,this.clipShadows=!1,this.colorWrite=!0,this.precision=null,this.polygonOffset=!1,this.polygonOffsetFactor=0,this.polygonOffsetUnits=0,this.alphaTest=0,this.premultipliedAlpha=!1,this.overdraw=0,this.visible=!0,this._needsUpdate=!0}function $(){return Fc++}function K(t){J.call(this),this.type="ShaderMaterial",this.defines={},this.uniforms={},this.vertexShader="void main() {\n\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n}",this.fragmentShader="void main() {\n\tgl_FragColor = vec4( 1.0, 0.0, 0.0, 1.0 );\n}",this.linewidth=1,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.lights=!1,this.clipping=!1,this.skinning=!1,this.morphTargets=!1,this.morphNormals=!1,this.extensions={derivatives:!1,fragDepth:!1,drawBuffers:!1,shaderTextureLOD:!1},this.defaultAttributeValues={color:[1,1,1],uv:[0,0],uv2:[0,0]},this.index0AttributeName=void 0,void 0!==t&&(void 0!==t.attributes&&console.error("THREE.ShaderMaterial: attributes should now be defined in THREE.BufferGeometry instead."),this.setValues(t))}function Q(t){J.call(this),this.type="MeshDepthMaterial",this.depthPacking=La,this.skinning=!1,this.morphTargets=!1,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.lights=!1,this.setValues(t)}function tt(t,e){this.min=void 0!==t?t:new u((+(1/0)),(+(1/0)),(+(1/0))),this.max=void 0!==e?e:new u((-(1/0)),(-(1/0)),(-(1/0)))}function et(t,e){this.center=void 0!==t?t:new u,this.radius=void 0!==e?e:0}function nt(){this.elements=new Float32Array([1,0,0,0,1,0,0,0,1]),arguments.length>0&&console.error("THREE.Matrix3: the constructor no longer reads arguments. use .set() instead.")}function rt(t,e){this.normal=void 0!==t?t:new u(1,0,0),this.constant=void 0!==e?e:0}function it(t,e,n,r,i,o){this.planes=[void 0!==t?t:new rt,void 0!==e?e:new rt,void 0!==n?n:new rt,void 0!==r?r:new rt,void 0!==i?i:new rt,void 0!==o?o:new rt]}function ot(e,r,i,s){function c(t,n,r,i){var o=t.geometry,a=null,s=S,c=t.customDepthMaterial;if(r&&(s=T,c=t.customDistanceMaterial),c)a=c;else{var u=!1;n.morphTargets&&(o&&o.isBufferGeometry?u=o.morphAttributes&&o.morphAttributes.position&&o.morphAttributes.position.length>0:o&&o.isGeometry&&(u=o.morphTargets&&o.morphTargets.length>0));var l=t.isSkinnedMesh&&n.skinning,h=0;u&&(h|=b),l&&(h|=M),a=s[h]}if(e.localClippingEnabled&&n.clipShadows===!0&&0!==n.clippingPlanes.length){var f=a.uuid,p=n.uuid,d=A[f];void 0===d&&(d={},A[f]=d);var m=d[p];void 0===m&&(m=a.clone(),d[p]=m),a=m}a.visible=n.visible,a.wireframe=n.wireframe;var v=n.side;return B.renderSingleSided&&v==wi&&(v=xi),B.renderReverseSided&&(v===xi?v=_i:v===_i&&(v=xi)),a.side=v,a.clipShadows=n.clipShadows,a.clippingPlanes=n.clippingPlanes,a.wireframeLinewidth=n.wireframeLinewidth,a.linewidth=n.linewidth,r&&void 0!==a.uniforms.lightPos&&a.uniforms.lightPos.value.copy(i),a}function h(t,e,n){if(t.visible!==!1){var r=0!==(t.layers.mask&e.layers.mask);if(r&&(t.isMesh||t.isLine||t.isPoints)&&t.castShadow&&(t.frustumCulled===!1||d.intersectsObject(t)===!0)){var i=t.material;i.visible===!0&&(t.modelViewMatrix.multiplyMatrices(n.matrixWorldInverse,t.matrixWorld),w.push(t))}for(var o=t.children,a=0,s=o.length;a<s;a++)h(o[a],e,n)}}var f=e.context,p=e.state,d=new it,m=new l,v=r.shadows,g=new n,y=new n(s.maxTextureSize,s.maxTextureSize),x=new u,_=new u,w=[],b=1,M=2,E=(b|M)+1,S=new Array(E),T=new Array(E),A={},L=[new u(1,0,0),new u((-1),0,0),new u(0,0,1),new u(0,0,(-1)),new u(0,1,0),new u(0,(-1),0)],C=[new u(0,1,0),new u(0,1,0),new u(0,1,0),new u(0,1,0),new u(0,0,1),new u(0,0,(-1))],P=[new o,new o,new o,new o,new o,new o],R=new Q;R.depthPacking=Ca,R.clipping=!0;for(var I=Nc.distanceRGBA,O=t.UniformsUtils.clone(I.uniforms),U=0;U!==E;++U){var N=0!==(U&b),F=0!==(U&M),D=R.clone();D.morphTargets=N,D.skinning=F,S[U]=D;var z=new K({defines:{USE_SHADOWMAP:""},uniforms:O,vertexShader:I.vertexShader,fragmentShader:I.fragmentShader,morphTargets:N,skinning:F,clipping:!0});T[U]=z}var B=this;this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=gi,this.renderReverseSided=!0,this.renderSingleSided=!0,this.render=function(t,n){if(B.enabled!==!1&&(B.autoUpdate!==!1||B.needsUpdate!==!1)&&0!==v.length){p.clearColor(1,1,1,1),p.disable(f.BLEND),p.setDepthTest(!0),p.setScissorTest(!1);for(var r,o,s=0,u=v.length;s<u;s++){var l=v[s],b=l.shadow;if(void 0!==b){var M=b.camera;if(g.copy(b.mapSize),g.min(y),l&&l.isPointLight){r=6,o=!0;var E=g.x,S=g.y;P[0].set(2*E,S,E,S),P[1].set(0,S,E,S),P[2].set(3*E,S,E,S),P[3].set(E,S,E,S),P[4].set(3*E,0,E,S),P[5].set(E,0,E,S),g.x*=4,g.y*=2}else r=1,o=!1;if(null===b.map){var T={minFilter:To,magFilter:To,format:qo};b.map=new a(g.x,g.y,T),M.updateProjectionMatrix()}b&&b.isSpotLightShadow&&b.update(l);var A=b.map,R=b.matrix;_.setFromMatrixPosition(l.matrixWorld),M.position.copy(_),e.setRenderTarget(A),e.clear();for(var I=0;I<r;I++){if(o){x.copy(M.position),x.add(L[I]),M.up.copy(C[I]),M.lookAt(x);var O=P[I];p.viewport(O)}else x.setFromMatrixPosition(l.target.matrixWorld),M.lookAt(x);M.updateMatrixWorld(),M.matrixWorldInverse.getInverse(M.matrixWorld),R.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1),R.multiply(M.projectionMatrix),R.multiply(M.matrixWorldInverse),m.multiplyMatrices(M.projectionMatrix,M.matrixWorldInverse),d.setFromMatrix(m),w.length=0,h(t,n,M);for(var U=0,N=w.length;U<N;U++){var F=w[U],D=i.update(F),z=F.material;if(z&&z.isMultiMaterial)for(var k=D.groups,j=z.materials,G=0,V=k.length;G<V;G++){var H=k[G],W=j[H.materialIndex];if(W.visible===!0){var X=c(F,W,o,_);e.renderBufferDirect(M,null,D,X,F,H)}}else{var X=c(F,z,o,_);e.renderBufferDirect(M,null,D,X,F,null)}}}}else console.warn("THREE.WebGLShadowMap:",l,"has no shadow.")}var q=e.getClearColor(),Y=e.getClearAlpha();e.setClearColor(q,Y),B.needsUpdate=!1}}}function at(t,e){this.origin=void 0!==t?t:new u,this.direction=void 0!==e?e:new u}function st(t,e,n,r){this._x=t||0,this._y=e||0,this._z=n||0,this._order=r||st.DefaultOrder}function ct(){this.mask=1}function ut(){function e(){o.setFromEuler(i,!1)}function n(){i.setFromQuaternion(o,void 0,!1)}Object.defineProperty(this,"id",{value:lt()}),this.uuid=t.Math.generateUUID(),this.name="",this.type="Object3D",this.parent=null,this.children=[],this.up=ut.DefaultUp.clone();var r=new u,i=new st,o=new c,a=new u(1,1,1);i.onChange(e),o.onChange(n),Object.defineProperties(this,{position:{enumerable:!0,value:r},rotation:{enumerable:!0,value:i},quaternion:{enumerable:!0,value:o},scale:{enumerable:!0,value:a},modelViewMatrix:{value:new l},normalMatrix:{value:new nt}}),this.matrix=new l,this.matrixWorld=new l,this.matrixAutoUpdate=ut.DefaultMatrixAutoUpdate,this.matrixWorldNeedsUpdate=!1,this.layers=new ct,this.visible=!0,this.castShadow=!1,this.receiveShadow=!1,this.frustumCulled=!0,this.renderOrder=0,this.userData={},this.onBeforeRender=null}function lt(){return Dc++}function ht(t,e){this.start=void 0!==t?t:new u,this.end=void 0!==e?e:new u}function ft(t,e,n){this.a=void 0!==t?t:new u,this.b=void 0!==e?e:new u,this.c=void 0!==n?n:new u}function pt(t,e,n,r,i,o){this.a=t,this.b=e,this.c=n,this.normal=r&&r.isVector3?r:new u,this.vertexNormals=Array.isArray(r)?r:[],this.color=i&&i.isColor?i:new X,this.vertexColors=Array.isArray(i)?i:[],this.materialIndex=void 0!==o?o:0}function dt(t){J.call(this),this.type="MeshBasicMaterial",this.color=new X(16777215),this.map=null,this.aoMap=null,this.aoMapIntensity=1,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=io,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.skinning=!1,this.morphTargets=!1,this.lights=!1,this.setValues(t)}function mt(e,n,r){if(Array.isArray(e))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.uuid=t.Math.generateUUID(),this.array=e,this.itemSize=n,this.count=void 0!==e?e.length/n:0,this.normalized=r===!0,this.dynamic=!1,this.updateRange={offset:0,count:-1},this.version=0}function vt(t,e){return new mt(new Int8Array(t),e)}function gt(t,e){return new mt(new Uint8Array(t),e)}function yt(t,e){return new mt(new Uint8ClampedArray(t),e)}function xt(t,e){return new mt(new Int16Array(t),e)}function _t(t,e){return new mt(new Uint16Array(t),e)}function wt(t,e){return new mt(new Int32Array(t),e)}function bt(t,e){return new mt(new Uint32Array(t),e)}function Mt(t,e){return new mt(new Float32Array(t),e)}function Et(t,e){return new mt(new Float64Array(t),e)}function St(t,e){return console.warn("THREE.DynamicBufferAttribute has been removed. Use new THREE.BufferAttribute().setDynamic( true ) instead."),new mt(t,e).setDynamic(!0)}function Tt(){Object.defineProperty(this,"id",{value:At()}),this.uuid=t.Math.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.boundingBox=null,this.boundingSphere=null,this.elementsNeedUpdate=!1,this.verticesNeedUpdate=!1,this.uvsNeedUpdate=!1,this.normalsNeedUpdate=!1,this.colorsNeedUpdate=!1,this.lineDistancesNeedUpdate=!1,this.groupsNeedUpdate=!1}function At(){return zc++}function Lt(){Object.defineProperty(this,"id",{value:At()}),this.uuid=t.Math.generateUUID(),this.name="",this.type="DirectGeometry",this.indices=[],this.vertices=[],this.normals=[],this.colors=[],this.uvs=[],this.uvs2=[],
  this.groups=[],this.morphTargets={},this.skinWeights=[],this.skinIndices=[],this.boundingBox=null,this.boundingSphere=null,this.verticesNeedUpdate=!1,this.normalsNeedUpdate=!1,this.colorsNeedUpdate=!1,this.uvsNeedUpdate=!1,this.groupsNeedUpdate=!1}function Ct(){Object.defineProperty(this,"id",{value:At()}),this.uuid=t.Math.generateUUID(),this.name="",this.type="BufferGeometry",this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null,this.drawRange={start:0,count:1/0}}function Pt(t,e){ut.call(this),this.type="Mesh",this.geometry=void 0!==t?t:new Ct,this.material=void 0!==e?e:new dt({color:16777215*Math.random()}),this.drawMode=ga,this.updateMorphTargets()}function Rt(t,e,n,r,i,o){function a(t,e,n){var r=0;return r+=(t+1)*(e+1)*2,r+=(t+1)*(n+1)*2,r+=(n+1)*(e+1)*2}function s(t,e,n){var r=0;return r+=t*e*2,r+=t*n*2,r+=n*e*2,6*r}function c(t,e,n,r,i,o,a,s,c,h,f){for(var b=o/c,M=a/h,E=o/2,S=a/2,T=s/2,A=c+1,L=h+1,C=0,P=0,R=new u,I=0;I<L;I++)for(var O=I*M-S,U=0;U<A;U++){var N=U*b-E;R[t]=N*r,R[e]=O*i,R[n]=T,d[g]=R.x,d[g+1]=R.y,d[g+2]=R.z,R[t]=0,R[e]=0,R[n]=s>0?1:-1,m[g]=R.x,m[g+1]=R.y,m[g+2]=R.z,v[y]=U/c,v[y+1]=1-I/h,g+=3,y+=2,C+=1}for(I=0;I<h;I++)for(U=0;U<c;U++){var F=_+U+A*I,D=_+U+A*(I+1),z=_+(U+1)+A*(I+1),B=_+(U+1)+A*I;p[x]=F,p[x+1]=D,p[x+2]=B,p[x+3]=D,p[x+4]=z,p[x+5]=B,x+=6,P+=6}l.addGroup(w,P,f),w+=P,_+=C}Ct.call(this),this.type="BoxBufferGeometry",this.parameters={width:t,height:e,depth:n,widthSegments:r,heightSegments:i,depthSegments:o};var l=this;r=Math.floor(r)||1,i=Math.floor(i)||1,o=Math.floor(o)||1;var h=a(r,i,o),f=s(r,i,o),p=new(f>65535?Uint32Array:Uint16Array)(f),d=new Float32Array(3*h),m=new Float32Array(3*h),v=new Float32Array(2*h),g=0,y=0,x=0,_=0,w=0;c("z","y","x",-1,-1,n,e,t,o,i,0),c("z","y","x",1,-1,n,e,-t,o,i,1),c("x","z","y",1,1,t,n,e,r,o,2),c("x","z","y",1,-1,t,n,-e,r,o,3),c("x","y","z",1,-1,t,e,n,r,i,4),c("x","y","z",-1,-1,t,e,-n,r,i,5),this.setIndex(new mt(p,1)),this.addAttribute("position",new mt(d,3)),this.addAttribute("normal",new mt(m,3)),this.addAttribute("uv",new mt(v,2))}function It(t,e,n,r){Ct.call(this),this.type="PlaneBufferGeometry",this.parameters={width:t,height:e,widthSegments:n,heightSegments:r};for(var i=t/2,o=e/2,a=Math.floor(n)||1,s=Math.floor(r)||1,c=a+1,u=s+1,l=t/a,h=e/s,f=new Float32Array(c*u*3),p=new Float32Array(c*u*3),d=new Float32Array(c*u*2),m=0,v=0,g=0;g<u;g++)for(var y=g*h-o,x=0;x<c;x++){var _=x*l-i;f[m]=_,f[m+1]=-y,p[m+2]=1,d[v]=x/a,d[v+1]=1-g/s,m+=3,v+=2}m=0;for(var w=new(f.length/3>65535?Uint32Array:Uint16Array)(a*s*6),g=0;g<s;g++)for(var x=0;x<a;x++){var b=x+c*g,M=x+c*(g+1),E=x+1+c*(g+1),S=x+1+c*g;w[m]=b,w[m+1]=M,w[m+2]=S,w[m+3]=M,w[m+4]=E,w[m+5]=S,m+=6}this.setIndex(new mt(w,1)),this.addAttribute("position",new mt(f,3)),this.addAttribute("normal",new mt(p,3)),this.addAttribute("uv",new mt(d,2))}function Ot(){ut.call(this),this.type="Camera",this.matrixWorldInverse=new l,this.projectionMatrix=new l}function Ut(t,e,n,r){Ot.call(this),this.type="PerspectiveCamera",this.fov=void 0!==t?t:50,this.zoom=1,this.near=void 0!==n?n:.1,this.far=void 0!==r?r:2e3,this.focus=10,this.aspect=void 0!==e?e:1,this.view=null,this.filmGauge=35,this.filmOffset=0,this.updateProjectionMatrix()}function Nt(t,e,n,r,i,o){Ot.call(this),this.type="OrthographicCamera",this.zoom=1,this.view=null,this.left=t,this.right=e,this.top=n,this.bottom=r,this.near=void 0!==i?i:.1,this.far=void 0!==o?o:2e3,this.updateProjectionMatrix()}function Ft(t,e,n){function r(t){s=t}function i(n){n.array instanceof Uint32Array&&e.get("OES_element_index_uint")?(c=t.UNSIGNED_INT,u=4):(c=t.UNSIGNED_SHORT,u=2)}function o(e,r){t.drawElements(s,r,c,e*u),n.calls++,n.vertices+=r,s===t.TRIANGLES&&(n.faces+=r/3)}function a(r,i,o){var a=e.get("ANGLE_instanced_arrays");return null===a?void console.error("THREE.WebGLBufferRenderer: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays."):(a.drawElementsInstancedANGLE(s,o,c,i*u,r.maxInstancedCount),n.calls++,n.vertices+=o*r.maxInstancedCount,void(s===t.TRIANGLES&&(n.faces+=r.maxInstancedCount*o/3)))}var s,c,u;return{setMode:r,setIndex:i,render:o,renderInstances:a}}function Dt(t,e,n){function r(t){a=t}function i(e,r){t.drawArrays(a,e,r),n.calls++,n.vertices+=r,a===t.TRIANGLES&&(n.faces+=r/3)}function o(r){var i=e.get("ANGLE_instanced_arrays");if(null===i)return void console.error("THREE.WebGLBufferRenderer: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.");var o=r.attributes.position,s=0;o&&o.isInterleavedBufferAttribute?(s=o.data.count,i.drawArraysInstancedANGLE(a,0,s,r.maxInstancedCount)):(s=o.count,i.drawArraysInstancedANGLE(a,0,s,r.maxInstancedCount)),n.calls++,n.vertices+=s*r.maxInstancedCount,a===t.TRIANGLES&&(n.faces+=r.maxInstancedCount*s/3)}var a;return{setMode:r,render:i,renderInstances:o}}function zt(){var t={};return{get:function(e){if(void 0!==t[e.id])return t[e.id];var r;switch(e.type){case"DirectionalLight":r={direction:new u,color:new X,shadow:!1,shadowBias:0,shadowRadius:1,shadowMapSize:new n};break;case"SpotLight":r={position:new u,direction:new u,color:new X,distance:0,coneCos:0,penumbraCos:0,decay:0,shadow:!1,shadowBias:0,shadowRadius:1,shadowMapSize:new n};break;case"PointLight":r={position:new u,color:new X,distance:0,decay:0,shadow:!1,shadowBias:0,shadowRadius:1,shadowMapSize:new n};break;case"HemisphereLight":r={direction:new u,skyColor:new X,groundColor:new X}}return t[e.id]=r,r}}}function Bt(t){for(var e=t.split("\n"),n=0;n<e.length;n++)e[n]=n+1+": "+e[n];return e.join("\n")}function kt(t,e,n){var r=t.createShader(e);return t.shaderSource(r,n),t.compileShader(r),t.getShaderParameter(r,t.COMPILE_STATUS)===!1&&console.error("THREE.WebGLShader: Shader couldn't compile."),""!==t.getShaderInfoLog(r)&&console.warn("THREE.WebGLShader: gl.getShaderInfoLog()",e===t.VERTEX_SHADER?"vertex":"fragment",t.getShaderInfoLog(r),Bt(n)),r}function jt(t){switch(t){case _a:return["Linear","( value )"];case wa:return["sRGB","( value )"];case Ma:return["RGBE","( value )"];case Sa:return["RGBM","( value, 7.0 )"];case Ta:return["RGBM","( value, 16.0 )"];case Aa:return["RGBD","( value, 256.0 )"];case ba:return["Gamma","( value, float( GAMMA_FACTOR ) )"];default:throw new Error("unsupported encoding: "+t)}}function Gt(t,e){var n=jt(e);return"vec4 "+t+"( vec4 value ) { return "+n[0]+"ToLinear"+n[1]+"; }"}function Vt(t,e){var n=jt(e);return"vec4 "+t+"( vec4 value ) { return LinearTo"+n[0]+n[1]+"; }"}function Ht(t,e){var n;switch(e){case co:n="Linear";break;case uo:n="Reinhard";break;case lo:n="Uncharted2";break;case ho:n="OptimizedCineon";break;default:throw new Error("unsupported toneMapping: "+e)}return"vec3 "+t+"( vec3 color ) { return "+n+"ToneMapping( color ); }"}function Wt(t,e,n){t=t||{};var r=[t.derivatives||e.envMapCubeUV||e.bumpMap||e.normalMap||e.flatShading?"#extension GL_OES_standard_derivatives : enable":"",(t.fragDepth||e.logarithmicDepthBuffer)&&n.get("EXT_frag_depth")?"#extension GL_EXT_frag_depth : enable":"",t.drawBuffers&&n.get("WEBGL_draw_buffers")?"#extension GL_EXT_draw_buffers : require":"",(t.shaderTextureLOD||e.envMap)&&n.get("EXT_shader_texture_lod")?"#extension GL_EXT_shader_texture_lod : enable":""];return r.filter(Yt).join("\n")}function Xt(t){var e=[];for(var n in t){var r=t[n];r!==!1&&e.push("#define "+n+" "+r)}return e.join("\n")}function qt(t,e,n){for(var r={},i=t.getProgramParameter(e,t.ACTIVE_ATTRIBUTES),o=0;o<i;o++){var a=t.getActiveAttrib(e,o),s=a.name;r[s]=t.getAttribLocation(e,s)}return r}function Yt(t){return""!==t}function Zt(t,e){return t.replace(/NUM_DIR_LIGHTS/g,e.numDirLights).replace(/NUM_SPOT_LIGHTS/g,e.numSpotLights).replace(/NUM_POINT_LIGHTS/g,e.numPointLights).replace(/NUM_HEMI_LIGHTS/g,e.numHemiLights)}function Jt(t){function e(t,e){var n=Oc[e];if(void 0===n)throw new Error("Can not resolve #include <"+e+">");return Jt(n)}var n=/#include +<([\w\d.]+)>/g;return t.replace(n,e)}function $t(t){function e(t,e,n,r){for(var i="",o=parseInt(e);o<parseInt(n);o++)i+=r.replace(/\[ i \]/g,"[ "+o+" ]");return i}var n=/for \( int i \= (\d+)\; i < (\d+)\; i \+\+ \) \{([\s\S]+?)(?=\})\}/g;return t.replace(n,e)}function Kt(t,e,n,r){var i=t.context,o=n.extensions,a=n.defines,s=n.__webglShader.vertexShader,c=n.__webglShader.fragmentShader,u="SHADOWMAP_TYPE_BASIC";r.shadowMapType===gi?u="SHADOWMAP_TYPE_PCF":r.shadowMapType===yi&&(u="SHADOWMAP_TYPE_PCF_SOFT");var l="ENVMAP_TYPE_CUBE",h="ENVMAP_MODE_REFLECTION",f="ENVMAP_BLENDING_MULTIPLY";if(r.envMap){switch(n.envMap.mapping){case po:case mo:l="ENVMAP_TYPE_CUBE";break;case xo:case _o:l="ENVMAP_TYPE_CUBE_UV";break;case vo:case go:l="ENVMAP_TYPE_EQUIREC";break;case yo:l="ENVMAP_TYPE_SPHERE"}switch(n.envMap.mapping){case mo:case go:h="ENVMAP_MODE_REFRACTION"}switch(n.combine){case io:f="ENVMAP_BLENDING_MULTIPLY";break;case oo:f="ENVMAP_BLENDING_MIX";break;case ao:f="ENVMAP_BLENDING_ADD"}}var p,d,m=t.gammaFactor>0?t.gammaFactor:1,v=Wt(o,r,t.extensions),g=Xt(a),y=i.createProgram();n.isRawShaderMaterial?(p=[g,"\n"].filter(Yt).join("\n"),d=[v,g,"\n"].filter(Yt).join("\n")):(p=["precision "+r.precision+" float;","precision "+r.precision+" int;","#define SHADER_NAME "+n.__webglShader.name,g,r.supportsVertexTextures?"#define VERTEX_TEXTURES":"","#define GAMMA_FACTOR "+m,"#define MAX_BONES "+r.maxBones,r.map?"#define USE_MAP":"",r.envMap?"#define USE_ENVMAP":"",r.envMap?"#define "+h:"",r.lightMap?"#define USE_LIGHTMAP":"",r.aoMap?"#define USE_AOMAP":"",r.emissiveMap?"#define USE_EMISSIVEMAP":"",r.bumpMap?"#define USE_BUMPMAP":"",r.normalMap?"#define USE_NORMALMAP":"",r.displacementMap&&r.supportsVertexTextures?"#define USE_DISPLACEMENTMAP":"",r.specularMap?"#define USE_SPECULARMAP":"",r.roughnessMap?"#define USE_ROUGHNESSMAP":"",r.metalnessMap?"#define USE_METALNESSMAP":"",r.alphaMap?"#define USE_ALPHAMAP":"",r.vertexColors?"#define USE_COLOR":"",r.flatShading?"#define FLAT_SHADED":"",r.skinning?"#define USE_SKINNING":"",r.useVertexTexture?"#define BONE_TEXTURE":"",r.morphTargets?"#define USE_MORPHTARGETS":"",r.morphNormals&&r.flatShading===!1?"#define USE_MORPHNORMALS":"",r.doubleSided?"#define DOUBLE_SIDED":"",r.flipSided?"#define FLIP_SIDED":"","#define NUM_CLIPPING_PLANES "+r.numClippingPlanes,r.shadowMapEnabled?"#define USE_SHADOWMAP":"",r.shadowMapEnabled?"#define "+u:"",r.sizeAttenuation?"#define USE_SIZEATTENUATION":"",r.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",r.logarithmicDepthBuffer&&t.extensions.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(Yt).join("\n"),d=[v,"precision "+r.precision+" float;","precision "+r.precision+" int;","#define SHADER_NAME "+n.__webglShader.name,g,r.alphaTest?"#define ALPHATEST "+r.alphaTest:"","#define GAMMA_FACTOR "+m,r.useFog&&r.fog?"#define USE_FOG":"",r.useFog&&r.fogExp?"#define FOG_EXP2":"",r.map?"#define USE_MAP":"",r.envMap?"#define USE_ENVMAP":"",r.envMap?"#define "+l:"",r.envMap?"#define "+h:"",r.envMap?"#define "+f:"",r.lightMap?"#define USE_LIGHTMAP":"",r.aoMap?"#define USE_AOMAP":"",r.emissiveMap?"#define USE_EMISSIVEMAP":"",r.bumpMap?"#define USE_BUMPMAP":"",r.normalMap?"#define USE_NORMALMAP":"",r.specularMap?"#define USE_SPECULARMAP":"",r.roughnessMap?"#define USE_ROUGHNESSMAP":"",r.metalnessMap?"#define USE_METALNESSMAP":"",r.alphaMap?"#define USE_ALPHAMAP":"",r.vertexColors?"#define USE_COLOR":"",r.flatShading?"#define FLAT_SHADED":"",r.doubleSided?"#define DOUBLE_SIDED":"",r.flipSided?"#define FLIP_SIDED":"","#define NUM_CLIPPING_PLANES "+r.numClippingPlanes,r.shadowMapEnabled?"#define USE_SHADOWMAP":"",r.shadowMapEnabled?"#define "+u:"",r.premultipliedAlpha?"#define PREMULTIPLIED_ALPHA":"",r.physicallyCorrectLights?"#define PHYSICALLY_CORRECT_LIGHTS":"",r.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",r.logarithmicDepthBuffer&&t.extensions.get("EXT_frag_depth")?"#define USE_LOGDEPTHBUF_EXT":"",r.envMap&&t.extensions.get("EXT_shader_texture_lod")?"#define TEXTURE_LOD_EXT":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;",r.toneMapping!==so?"#define TONE_MAPPING":"",r.toneMapping!==so?Oc.tonemapping_pars_fragment:"",r.toneMapping!==so?Ht("toneMapping",r.toneMapping):"",r.outputEncoding||r.mapEncoding||r.envMapEncoding||r.emissiveMapEncoding?Oc.encodings_pars_fragment:"",r.mapEncoding?Gt("mapTexelToLinear",r.mapEncoding):"",r.envMapEncoding?Gt("envMapTexelToLinear",r.envMapEncoding):"",r.emissiveMapEncoding?Gt("emissiveMapTexelToLinear",r.emissiveMapEncoding):"",r.outputEncoding?Vt("linearToOutputTexel",r.outputEncoding):"",r.depthPacking?"#define DEPTH_PACKING "+n.depthPacking:"","\n"].filter(Yt).join("\n")),s=Jt(s,r),s=Zt(s,r),c=Jt(c,r),c=Zt(c,r),n.isShaderMaterial||(s=$t(s),c=$t(c));var x=p+s,_=d+c,w=kt(i,i.VERTEX_SHADER,x),b=kt(i,i.FRAGMENT_SHADER,_);i.attachShader(y,w),i.attachShader(y,b),void 0!==n.index0AttributeName?i.bindAttribLocation(y,0,n.index0AttributeName):r.morphTargets===!0&&i.bindAttribLocation(y,0,"position"),i.linkProgram(y);var M=i.getProgramInfoLog(y),E=i.getShaderInfoLog(w),S=i.getShaderInfoLog(b),T=!0,A=!0;i.getProgramParameter(y,i.LINK_STATUS)===!1?(T=!1,console.error("THREE.WebGLProgram: shader error: ",i.getError(),"gl.VALIDATE_STATUS",i.getProgramParameter(y,i.VALIDATE_STATUS),"gl.getProgramInfoLog",M,E,S)):""!==M?console.warn("THREE.WebGLProgram: gl.getProgramInfoLog()",M):""!==E&&""!==S||(A=!1),A&&(this.diagnostics={runnable:T,material:n,programLog:M,vertexShader:{log:E,prefix:p},fragmentShader:{log:S,prefix:d}}),i.deleteShader(w),i.deleteShader(b);var L;this.getUniforms=function(){return void 0===L&&(L=new W(i,y,t)),L};var C;return this.getAttributes=function(){return void 0===C&&(C=qt(i,y)),C},this.destroy=function(){i.deleteProgram(y),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=Bc++,this.code=e,this.usedTimes=1,this.program=y,this.vertexShader=w,this.fragmentShader=b,this}function Qt(t,e){function n(t){if(e.floatVertexTextures&&t&&t.skeleton&&t.skeleton.useVertexTexture)return 1024;var n=e.maxVertexUniforms,r=Math.floor((n-20)/4),i=r;return void 0!==t&&t&&t.isSkinnedMesh&&(i=Math.min(t.skeleton.bones.length,i),i<t.skeleton.bones.length&&console.warn("WebGLRenderer: too many bones - "+t.skeleton.bones.length+", this GPU supports just "+i+" (try OpenGL instead of ANGLE)")),i}function r(t,e){var n;return t?t&&t.isTexture?n=t.encoding:t&&t.isWebGLRenderTarget&&(console.warn("THREE.WebGLPrograms.getTextureEncodingFromMap: don't use render targets as textures. Use their .texture property instead."),n=t.texture.encoding):n=_a,n===_a&&e&&(n=ba),n}var i=[],o={MeshDepthMaterial:"depth",MeshNormalMaterial:"normal",MeshBasicMaterial:"basic",MeshLambertMaterial:"lambert",MeshPhongMaterial:"phong",MeshStandardMaterial:"physical",MeshPhysicalMaterial:"physical",LineBasicMaterial:"basic",LineDashedMaterial:"dashed",PointsMaterial:"points"},a=["precision","supportsVertexTextures","map","mapEncoding","envMap","envMapMode","envMapEncoding","lightMap","aoMap","emissiveMap","emissiveMapEncoding","bumpMap","normalMap","displacementMap","specularMap","roughnessMap","metalnessMap","alphaMap","combine","vertexColors","fog","useFog","fogExp","flatShading","sizeAttenuation","logarithmicDepthBuffer","skinning","maxBones","useVertexTexture","morphTargets","morphNormals","maxMorphTargets","maxMorphNormals","premultipliedAlpha","numDirLights","numPointLights","numSpotLights","numHemiLights","shadowMapEnabled","shadowMapType","toneMapping","physicallyCorrectLights","alphaTest","doubleSided","flipSided","numClippingPlanes","depthPacking"];this.getParameters=function(i,a,s,c,u){var l=o[i.type],h=n(u),f=t.getPrecision();null!==i.precision&&(f=e.getMaxPrecision(i.precision),f!==i.precision&&console.warn("THREE.WebGLProgram.getParameters:",i.precision,"not supported, using",f,"instead."));var p=t.getCurrentRenderTarget(),d={shaderID:l,precision:f,supportsVertexTextures:e.vertexTextures,outputEncoding:r(p?p.texture:null,t.gammaOutput),map:!!i.map,mapEncoding:r(i.map,t.gammaInput),envMap:!!i.envMap,envMapMode:i.envMap&&i.envMap.mapping,envMapEncoding:r(i.envMap,t.gammaInput),envMapCubeUV:!!i.envMap&&(i.envMap.mapping===xo||i.envMap.mapping===_o),lightMap:!!i.lightMap,aoMap:!!i.aoMap,emissiveMap:!!i.emissiveMap,emissiveMapEncoding:r(i.emissiveMap,t.gammaInput),bumpMap:!!i.bumpMap,normalMap:!!i.normalMap,displacementMap:!!i.displacementMap,roughnessMap:!!i.roughnessMap,metalnessMap:!!i.metalnessMap,specularMap:!!i.specularMap,alphaMap:!!i.alphaMap,combine:i.combine,vertexColors:i.vertexColors,fog:!!s,useFog:i.fog,fogExp:s&&s.isFogExp2,flatShading:i.shading===bi,sizeAttenuation:i.sizeAttenuation,logarithmicDepthBuffer:e.logarithmicDepthBuffer,skinning:i.skinning,maxBones:h,useVertexTexture:e.floatVertexTextures&&u&&u.skeleton&&u.skeleton.useVertexTexture,morphTargets:i.morphTargets,morphNormals:i.morphNormals,maxMorphTargets:t.maxMorphTargets,maxMorphNormals:t.maxMorphNormals,numDirLights:a.directional.length,numPointLights:a.point.length,numSpotLights:a.spot.length,numHemiLights:a.hemi.length,numClippingPlanes:c,shadowMapEnabled:t.shadowMap.enabled&&u.receiveShadow&&a.shadows.length>0,shadowMapType:t.shadowMap.type,toneMapping:t.toneMapping,physicallyCorrectLights:t.physicallyCorrectLights,premultipliedAlpha:i.premultipliedAlpha,alphaTest:i.alphaTest,doubleSided:i.side===wi,flipSided:i.side===_i,depthPacking:void 0!==i.depthPacking&&i.depthPacking};return d},this.getProgramCode=function(t,e){var n=[];if(e.shaderID?n.push(e.shaderID):(n.push(t.fragmentShader),n.push(t.vertexShader)),void 0!==t.defines)for(var r in t.defines)n.push(r),n.push(t.defines[r]);for(var i=0;i<a.length;i++)n.push(e[a[i]]);return n.join()},this.acquireProgram=function(e,n,r){for(var o,a=0,s=i.length;a<s;a++){var c=i[a];if(c.code===r){o=c,++o.usedTimes;break}}return void 0===o&&(o=new Kt(t,r,e,n),i.push(o)),o},this.releaseProgram=function(t){if(0===--t.usedTimes){var e=i.indexOf(t);i[e]=i[i.length-1],i.pop(),t.destroy()}},this.programs=i}function te(t,e,n){function r(t){var i=t.target,s=c[i.id];null!==s.index&&o(s.index),a(s.attributes),i.removeEventListener("dispose",r),delete c[i.id];var u=e.get(i);u.wireframe&&o(u.wireframe),e["delete"](i);var l=e.get(s);l.wireframe&&o(l.wireframe),e["delete"](s),n.memory.geometries--}function i(t){return t.isInterleavedBufferAttribute?e.get(t.data).__webglBuffer:e.get(t).__webglBuffer}function o(e){var n=i(e);void 0!==n&&(t.deleteBuffer(n),s(e))}function a(t){for(var e in t)o(t[e])}function s(t){t.isInterleavedBufferAttribute?e["delete"](t.data):e["delete"](t)}var c={};return{get:function(t){var e=t.geometry;if(void 0!==c[e.id])return c[e.id];e.addEventListener("dispose",r);var i;return e.isBufferGeometry?i=e:e.isGeometry&&(void 0===e._bufferGeometry&&(e._bufferGeometry=(new Ct).setFromObject(t)),i=e._bufferGeometry),c[e.id]=i,n.memory.geometries++,i}}}function ee(t,e,n){function r(e){var n=u.get(e);e.geometry.isGeometry&&n.updateFromObject(e);var r=n.index,o=n.attributes;null!==r&&i(r,t.ELEMENT_ARRAY_BUFFER);for(var a in o)i(o[a],t.ARRAY_BUFFER);var s=n.morphAttributes;for(var a in s)for(var c=s[a],l=0,h=c.length;l<h;l++)i(c[l],t.ARRAY_BUFFER);return n}function i(t,n){var r=t.isInterleavedBufferAttribute?t.data:t,i=e.get(r);void 0===i.__webglBuffer?o(i,r,n):i.version!==r.version&&a(i,r,n)}function o(e,n,r){e.__webglBuffer=t.createBuffer(),t.bindBuffer(r,e.__webglBuffer);var i=n.dynamic?t.DYNAMIC_DRAW:t.STATIC_DRAW;t.bufferData(r,n.array,i),e.version=n.version}function a(e,n,r){t.bindBuffer(r,e.__webglBuffer),n.dynamic===!1||n.updateRange.count===-1?t.bufferSubData(r,0,n.array):0===n.updateRange.count?console.error("THREE.WebGLObjects.updateBuffer: dynamic THREE.BufferAttribute marked as needsUpdate but updateRange.count is 0, ensure you are using set methods or updating manually."):(t.bufferSubData(r,n.updateRange.offset*n.array.BYTES_PER_ELEMENT,n.array.subarray(n.updateRange.offset,n.updateRange.offset+n.updateRange.count)),n.updateRange.count=0),e.version=n.version}function s(t){return t.isInterleavedBufferAttribute?e.get(t.data).__webglBuffer:e.get(t).__webglBuffer}function c(n){var r=e.get(n);if(void 0!==r.wireframe)return r.wireframe;var o=[],a=n.index,s=n.attributes,c=s.position;if(null!==a)for(var u=a.array,l=0,h=u.length;l<h;l+=3){var f=u[l+0],p=u[l+1],d=u[l+2];o.push(f,p,p,d,d,f)}else for(var u=s.position.array,l=0,h=u.length/3-1;l<h;l+=3){var f=l+0,p=l+1,d=l+2;o.push(f,p,p,d,d,f)}var m=c.count>65535?Uint32Array:Uint16Array,v=new mt(new m(o),1);return i(v,t.ELEMENT_ARRAY_BUFFER),r.wireframe=v,v}var u=new te(t,e,n);return{getAttributeBuffer:s,getWireframeAttribute:c,update:r}}function ne(e,n,r,i,o,a,s){function c(t,e){if(t.width>e||t.height>e){var n=e/Math.max(t.width,t.height),r=document.createElementNS("http://www.w3.org/1999/xhtml","canvas");r.width=Math.floor(t.width*n),r.height=Math.floor(t.height*n);var i=r.getContext("2d");return i.drawImage(t,0,0,t.width,t.height,0,0,r.width,r.height),console.warn("THREE.WebGLRenderer: image is too big ("+t.width+"x"+t.height+"). Resized to "+r.width+"x"+r.height,t),r}return t}function u(e){return t.Math.isPowerOfTwo(e.width)&&t.Math.isPowerOfTwo(e.height)}function l(e){if(e instanceof HTMLImageElement||e instanceof HTMLCanvasElement){var n=document.createElementNS("http://www.w3.org/1999/xhtml","canvas");n.width=t.Math.nearestPowerOfTwo(e.width),n.height=t.Math.nearestPowerOfTwo(e.height);var r=n.getContext("2d");return r.drawImage(e,0,0,n.width,n.height),console.warn("THREE.WebGLRenderer: image is not power of two ("+e.width+"x"+e.height+"). Resized to "+n.width+"x"+n.height,e),n}return e}function h(t){return t.wrapS!==Mo||t.wrapT!==Mo||t.minFilter!==To&&t.minFilter!==Co}function f(t){return t===To||t===Ao||t===Lo?e.NEAREST:e.LINEAR}function p(t){var e=t.target;e.removeEventListener("dispose",p),m(e),L.textures--}function d(t){var e=t.target;e.removeEventListener("dispose",d),v(e),L.textures--}function m(t){var n=i.get(t);if(t.image&&n.__image__webglTextureCube)e.deleteTexture(n.__image__webglTextureCube);else{if(void 0===n.__webglInit)return;e.deleteTexture(n.__webglTexture)}i["delete"](t)}function v(t){var n=i.get(t),r=i.get(t.texture);if(t){if(void 0!==r.__webglTexture&&e.deleteTexture(r.__webglTexture),t.depthTexture&&t.depthTexture.dispose(),t&&t.isWebGLRenderTargetCube)for(var o=0;o<6;o++)e.deleteFramebuffer(n.__webglFramebuffer[o]),n.__webglDepthbuffer&&e.deleteRenderbuffer(n.__webglDepthbuffer[o]);else e.deleteFramebuffer(n.__webglFramebuffer),n.__webglDepthbuffer&&e.deleteRenderbuffer(n.__webglDepthbuffer);i["delete"](t.texture),i["delete"](t)}}function g(t,n){var o=i.get(t);if(t.version>0&&o.__version!==t.version){var a=t.image;if(void 0===a)console.warn("THREE.WebGLRenderer: Texture marked for update but image is undefined",t);else{if(a.complete!==!1)return void w(o,t,n);console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete",t)}}r.activeTexture(e.TEXTURE0+n),r.bindTexture(e.TEXTURE_2D,o.__webglTexture)}function y(t,n){var s=i.get(t);if(6===t.image.length)if(t.version>0&&s.__version!==t.version){s.__image__webglTextureCube||(t.addEventListener("dispose",p),s.__image__webglTextureCube=e.createTexture(),L.textures++),r.activeTexture(e.TEXTURE0+n),r.bindTexture(e.TEXTURE_CUBE_MAP,s.__image__webglTextureCube),e.pixelStorei(e.UNPACK_FLIP_Y_WEBGL,t.flipY);for(var l=t&&t.isCompressedTexture,h=t.image[0]&&t.image[0].isDataTexture,f=[],d=0;d<6;d++)l||h?f[d]=h?t.image[d].image:t.image[d]:f[d]=c(t.image[d],o.maxCubemapSize);var m=f[0],v=u(m),g=a(t.format),y=a(t.type);_(e.TEXTURE_CUBE_MAP,t,v);for(var d=0;d<6;d++)if(l)for(var x,w=f[d].mipmaps,b=0,M=w.length;b<M;b++)x=w[b],t.format!==qo&&t.format!==Xo?r.getCompressedTextureFormats().indexOf(g)>-1?r.compressedTexImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+d,b,g,x.width,x.height,0,x.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .setTextureCube()"):r.texImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+d,b,g,x.width,x.height,0,g,y,x.data);else h?r.texImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+d,0,g,f[d].width,f[d].height,0,g,y,f[d].data):r.texImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+d,0,g,g,y,f[d]);t.generateMipmaps&&v&&e.generateMipmap(e.TEXTURE_CUBE_MAP),s.__version=t.version,t.onUpdate&&t.onUpdate(t)}else r.activeTexture(e.TEXTURE0+n),r.bindTexture(e.TEXTURE_CUBE_MAP,s.__image__webglTextureCube)}function x(t,n){r.activeTexture(e.TEXTURE0+n),r.bindTexture(e.TEXTURE_CUBE_MAP,i.get(t).__webglTexture)}function _(t,r,s){var c;if(s?(e.texParameteri(t,e.TEXTURE_WRAP_S,a(r.wrapS)),e.texParameteri(t,e.TEXTURE_WRAP_T,a(r.wrapT)),e.texParameteri(t,e.TEXTURE_MAG_FILTER,a(r.magFilter)),e.texParameteri(t,e.TEXTURE_MIN_FILTER,a(r.minFilter))):(e.texParameteri(t,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(t,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),r.wrapS===Mo&&r.wrapT===Mo||console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.wrapS and Texture.wrapT should be set to THREE.ClampToEdgeWrapping.",r),e.texParameteri(t,e.TEXTURE_MAG_FILTER,f(r.magFilter)),e.texParameteri(t,e.TEXTURE_MIN_FILTER,f(r.minFilter)),r.minFilter!==To&&r.minFilter!==Co&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.minFilter should be set to THREE.NearestFilter or THREE.LinearFilter.",r)),c=n.get("EXT_texture_filter_anisotropic")){if(r.type===Bo&&null===n.get("OES_texture_float_linear"))return;if(r.type===ko&&null===n.get("OES_texture_half_float_linear"))return;(r.anisotropy>1||i.get(r).__currentAnisotropy)&&(e.texParameterf(t,c.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(r.anisotropy,o.getMaxAnisotropy())),i.get(r).__currentAnisotropy=r.anisotropy)}}function w(t,n,i){void 0===t.__webglInit&&(t.__webglInit=!0,n.addEventListener("dispose",p),t.__webglTexture=e.createTexture(),L.textures++),r.activeTexture(e.TEXTURE0+i),r.bindTexture(e.TEXTURE_2D,t.__webglTexture),e.pixelStorei(e.UNPACK_FLIP_Y_WEBGL,n.flipY),e.pixelStorei(e.UNPACK_PREMULTIPLY_ALPHA_WEBGL,n.premultiplyAlpha),e.pixelStorei(e.UNPACK_ALIGNMENT,n.unpackAlignment);var s=c(n.image,o.maxTextureSize);h(n)&&u(s)===!1&&(s=l(s));var f=u(s),d=a(n.format),m=a(n.type);_(e.TEXTURE_2D,n,f);var v,g=n.mipmaps;if(n&&n.isDepthTexture){var y=e.DEPTH_COMPONENT;if(n.type===Bo){if(!C)throw new Error("Float Depth Texture only supported in WebGL2.0");y=e.DEPTH_COMPONENT32F}else C&&(y=e.DEPTH_COMPONENT16);n.format===Ko&&(y=e.DEPTH_STENCIL),r.texImage2D(e.TEXTURE_2D,0,y,s.width,s.height,0,d,m,null)}else if(n&&n.isDataTexture)if(g.length>0&&f){for(var x=0,w=g.length;x<w;x++)v=g[x],r.texImage2D(e.TEXTURE_2D,x,d,v.width,v.height,0,d,m,v.data);n.generateMipmaps=!1}else r.texImage2D(e.TEXTURE_2D,0,d,s.width,s.height,0,d,m,s.data);else if(n&&n.isCompressedTexture)for(var x=0,w=g.length;x<w;x++)v=g[x],n.format!==qo&&n.format!==Xo?r.getCompressedTextureFormats().indexOf(d)>-1?r.compressedTexImage2D(e.TEXTURE_2D,x,d,v.width,v.height,0,v.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()"):r.texImage2D(e.TEXTURE_2D,x,d,v.width,v.height,0,d,m,v.data);else if(g.length>0&&f){for(var x=0,w=g.length;x<w;x++)v=g[x],r.texImage2D(e.TEXTURE_2D,x,d,d,m,v);n.generateMipmaps=!1}else r.texImage2D(e.TEXTURE_2D,0,d,d,m,s);n.generateMipmaps&&f&&e.generateMipmap(e.TEXTURE_2D),t.__version=n.version,n.onUpdate&&n.onUpdate(n)}function b(t,n,o,s){var c=a(n.texture.format),u=a(n.texture.type);r.texImage2D(s,0,c,n.width,n.height,0,c,u,null),e.bindFramebuffer(e.FRAMEBUFFER,t),e.framebufferTexture2D(e.FRAMEBUFFER,o,s,i.get(n.texture).__webglTexture,0),e.bindFramebuffer(e.FRAMEBUFFER,null)}function M(t,n){e.bindRenderbuffer(e.RENDERBUFFER,t),n.depthBuffer&&!n.stencilBuffer?(e.renderbufferStorage(e.RENDERBUFFER,e.DEPTH_COMPONENT16,n.width,n.height),e.framebufferRenderbuffer(e.FRAMEBUFFER,e.DEPTH_ATTACHMENT,e.RENDERBUFFER,t)):n.depthBuffer&&n.stencilBuffer?(e.renderbufferStorage(e.RENDERBUFFER,e.DEPTH_STENCIL,n.width,n.height),e.framebufferRenderbuffer(e.FRAMEBUFFER,e.DEPTH_STENCIL_ATTACHMENT,e.RENDERBUFFER,t)):e.renderbufferStorage(e.RENDERBUFFER,e.RGBA4,n.width,n.height),e.bindRenderbuffer(e.RENDERBUFFER,null)}function E(t,n){var r=n&&n.isWebGLRenderTargetCube;if(r)throw new Error("Depth Texture with cube render targets is not supported!");if(e.bindFramebuffer(e.FRAMEBUFFER,t),!n.depthTexture||!n.depthTexture.isDepthTexture)throw new Error("renderTarget.depthTexture must be an instance of THREE.DepthTexture");i.get(n.depthTexture).__webglTexture&&n.depthTexture.image.width===n.width&&n.depthTexture.image.height===n.height||(n.depthTexture.image.width=n.width,n.depthTexture.image.height=n.height,n.depthTexture.needsUpdate=!0),g(n.depthTexture,0);var o=i.get(n.depthTexture).__webglTexture;if(n.depthTexture.format===$o)e.framebufferTexture2D(e.FRAMEBUFFER,e.DEPTH_ATTACHMENT,e.TEXTURE_2D,o,0);else{if(n.depthTexture.format!==Ko)throw new Error("Unknown depthTexture format");e.framebufferTexture2D(e.FRAMEBUFFER,e.DEPTH_STENCIL_ATTACHMENT,e.TEXTURE_2D,o,0)}}function S(t){var n=i.get(t),r=t&&t.isWebGLRenderTargetCube;if(t.depthTexture){if(r)throw new Error("target.depthTexture not supported in Cube render targets");E(n.__webglFramebuffer,t)}else if(r){n.__webglDepthbuffer=[];for(var o=0;o<6;o++)e.bindFramebuffer(e.FRAMEBUFFER,n.__webglFramebuffer[o]),n.__webglDepthbuffer[o]=e.createRenderbuffer(),M(n.__webglDepthbuffer[o],t)}else e.bindFramebuffer(e.FRAMEBUFFER,n.__webglFramebuffer),n.__webglDepthbuffer=e.createRenderbuffer(),M(n.__webglDepthbuffer,t);e.bindFramebuffer(e.FRAMEBUFFER,null)}function T(t){var n=i.get(t),o=i.get(t.texture);t.addEventListener("dispose",d),o.__webglTexture=e.createTexture(),L.textures++;var a=t&&t.isWebGLRenderTargetCube,s=u(t);if(a){n.__webglFramebuffer=[];for(var c=0;c<6;c++)n.__webglFramebuffer[c]=e.createFramebuffer()}else n.__webglFramebuffer=e.createFramebuffer();if(a){r.bindTexture(e.TEXTURE_CUBE_MAP,o.__webglTexture),_(e.TEXTURE_CUBE_MAP,t.texture,s);for(var c=0;c<6;c++)b(n.__webglFramebuffer[c],t,e.COLOR_ATTACHMENT0,e.TEXTURE_CUBE_MAP_POSITIVE_X+c);t.texture.generateMipmaps&&s&&e.generateMipmap(e.TEXTURE_CUBE_MAP),r.bindTexture(e.TEXTURE_CUBE_MAP,null)}else r.bindTexture(e.TEXTURE_2D,o.__webglTexture),_(e.TEXTURE_2D,t.texture,s),b(n.__webglFramebuffer,t,e.COLOR_ATTACHMENT0,e.TEXTURE_2D),t.texture.generateMipmaps&&s&&e.generateMipmap(e.TEXTURE_2D),r.bindTexture(e.TEXTURE_2D,null);t.depthBuffer&&S(t)}function A(t){var n=t.texture;if(n.generateMipmaps&&u(t)&&n.minFilter!==To&&n.minFilter!==Co){var o=t&&t.isWebGLRenderTargetCube?e.TEXTURE_CUBE_MAP:e.TEXTURE_2D,a=i.get(n).__webglTexture;r.bindTexture(o,a),e.generateMipmap(o),r.bindTexture(o,null)}}var L=s.memory,C="undefined"!=typeof WebGL2RenderingContext&&e instanceof WebGL2RenderingContext;this.setTexture2D=g,this.setTextureCube=y,this.setTextureCubeDynamic=x,this.setupRenderTarget=T,this.updateRenderTargetMipmap=A}function re(){var t={};return{get:function(e){var n=e.uuid,r=t[n];return void 0===r&&(r={},
  t[n]=r),r},"delete":function(e){delete t[e.uuid]},clear:function(){t={}}}}function ie(t,e,n){function r(){var e=!1,n=new o,r=null,i=new o;return{setMask:function(n){r===n||e||(t.colorMask(n,n,n,n),r=n)},setLocked:function(t){e=t},setClear:function(e,r,o,a){n.set(e,r,o,a),i.equals(n)===!1&&(t.clearColor(e,r,o,a),i.copy(n))},reset:function(){e=!1,r=null,i.set(0,0,0,1)}}}function i(){var e=!1,n=null,r=null,i=null;return{setTest:function(e){e?p(t.DEPTH_TEST):d(t.DEPTH_TEST)},setMask:function(r){n===r||e||(t.depthMask(r),n=r)},setFunc:function(e){if(r!==e){if(e)switch(e){case Ji:t.depthFunc(t.NEVER);break;case $i:t.depthFunc(t.ALWAYS);break;case Ki:t.depthFunc(t.LESS);break;case Qi:t.depthFunc(t.LEQUAL);break;case to:t.depthFunc(t.EQUAL);break;case eo:t.depthFunc(t.GEQUAL);break;case no:t.depthFunc(t.GREATER);break;case ro:t.depthFunc(t.NOTEQUAL);break;default:t.depthFunc(t.LEQUAL)}else t.depthFunc(t.LEQUAL);r=e}},setLocked:function(t){e=t},setClear:function(e){i!==e&&(t.clearDepth(e),i=e)},reset:function(){e=!1,n=null,r=null,i=null}}}function a(){var e=!1,n=null,r=null,i=null,o=null,a=null,s=null,c=null,u=null;return{setTest:function(e){e?p(t.STENCIL_TEST):d(t.STENCIL_TEST)},setMask:function(r){n===r||e||(t.stencilMask(r),n=r)},setFunc:function(e,n,a){r===e&&i===n&&o===a||(t.stencilFunc(e,n,a),r=e,i=n,o=a)},setOp:function(e,n,r){a===e&&s===n&&c===r||(t.stencilOp(e,n,r),a=e,s=n,c=r)},setLocked:function(t){e=t},setClear:function(e){u!==e&&(t.clearStencil(e),u=e)},reset:function(){e=!1,n=null,r=null,i=null,o=null,a=null,s=null,c=null,u=null}}}function s(e,n,r){var i=new Uint8Array(4),o=t.createTexture();t.bindTexture(e,o),t.texParameteri(e,t.TEXTURE_MIN_FILTER,t.NEAREST),t.texParameteri(e,t.TEXTURE_MAG_FILTER,t.NEAREST);for(var a=0;a<r;a++)t.texImage2D(n+a,0,t.RGBA,1,1,0,t.RGBA,t.UNSIGNED_BYTE,i);return o}function c(){N(0,0,0,1),F(1),D(0),p(t.DEPTH_TEST),_(Qi),S(!1),T(hi),p(t.CULL_FACE),p(t.BLEND),v(Li)}function u(){for(var t=0,e=W.length;t<e;t++)W[t]=0}function l(n){if(W[n]=1,0===X[n]&&(t.enableVertexAttribArray(n),X[n]=1),0!==q[n]){var r=e.get("ANGLE_instanced_arrays");r.vertexAttribDivisorANGLE(n,0),q[n]=0}}function h(e,n,r){W[e]=1,0===X[e]&&(t.enableVertexAttribArray(e),X[e]=1),q[e]!==n&&(r.vertexAttribDivisorANGLE(e,n),q[e]=n)}function f(){for(var e=0,n=X.length;e!==n;++e)X[e]!==W[e]&&(t.disableVertexAttribArray(e),X[e]=0)}function p(e){Y[e]!==!0&&(t.enable(e),Y[e]=!0)}function d(e){Y[e]!==!1&&(t.disable(e),Y[e]=!1)}function m(){if(null===Z&&(Z=[],e.get("WEBGL_compressed_texture_pvrtc")||e.get("WEBGL_compressed_texture_s3tc")||e.get("WEBGL_compressed_texture_etc1")))for(var n=t.getParameter(t.COMPRESSED_TEXTURE_FORMATS),r=0;r<n.length;r++)Z.push(n[r]);return Z}function v(e,r,i,o,a,s,c,u){return e===Ai?(d(t.BLEND),void(J=e)):(p(t.BLEND),e===J&&u===rt||(e===Ci?u?(t.blendEquationSeparate(t.FUNC_ADD,t.FUNC_ADD),t.blendFuncSeparate(t.ONE,t.ONE,t.ONE,t.ONE)):(t.blendEquation(t.FUNC_ADD),t.blendFunc(t.SRC_ALPHA,t.ONE)):e===Pi?u?(t.blendEquationSeparate(t.FUNC_ADD,t.FUNC_ADD),t.blendFuncSeparate(t.ZERO,t.ZERO,t.ONE_MINUS_SRC_COLOR,t.ONE_MINUS_SRC_ALPHA)):(t.blendEquation(t.FUNC_ADD),t.blendFunc(t.ZERO,t.ONE_MINUS_SRC_COLOR)):e===Ri?u?(t.blendEquationSeparate(t.FUNC_ADD,t.FUNC_ADD),t.blendFuncSeparate(t.ZERO,t.SRC_COLOR,t.ZERO,t.SRC_ALPHA)):(t.blendEquation(t.FUNC_ADD),t.blendFunc(t.ZERO,t.SRC_COLOR)):u?(t.blendEquationSeparate(t.FUNC_ADD,t.FUNC_ADD),t.blendFuncSeparate(t.ONE,t.ONE_MINUS_SRC_ALPHA,t.ONE,t.ONE_MINUS_SRC_ALPHA)):(t.blendEquationSeparate(t.FUNC_ADD,t.FUNC_ADD),t.blendFuncSeparate(t.SRC_ALPHA,t.ONE_MINUS_SRC_ALPHA,t.ONE,t.ONE_MINUS_SRC_ALPHA)),J=e,rt=u),void(e===Ii?(a=a||r,s=s||i,c=c||o,r===$&&a===tt||(t.blendEquationSeparate(n(r),n(a)),$=r,tt=a),i===K&&o===Q&&s===et&&c===nt||(t.blendFuncSeparate(n(i),n(o),n(s),n(c)),K=i,Q=o,et=s,nt=c)):($=null,K=null,Q=null,tt=null,et=null,nt=null)))}function g(t){j.setMask(t)}function y(t){G.setTest(t)}function x(t){G.setMask(t)}function _(t){G.setFunc(t)}function w(t){V.setTest(t)}function b(t){V.setMask(t)}function M(t,e,n){V.setFunc(t,e,n)}function E(t,e,n){V.setOp(t,e,n)}function S(e){it!==e&&(e?t.frontFace(t.CW):t.frontFace(t.CCW),it=e)}function T(e){e!==li?(p(t.CULL_FACE),e!==ot&&(e===hi?t.cullFace(t.BACK):e===fi?t.cullFace(t.FRONT):t.cullFace(t.FRONT_AND_BACK))):d(t.CULL_FACE),ot=e}function A(e){e!==at&&(t.lineWidth(e),at=e)}function L(e,n,r){e?(p(t.POLYGON_OFFSET_FILL),st===n&&ct===r||(t.polygonOffset(n,r),st=n,ct=r)):d(t.POLYGON_OFFSET_FILL)}function C(){return ut}function P(e){ut=e,e?p(t.SCISSOR_TEST):d(t.SCISSOR_TEST)}function R(e){void 0===e&&(e=t.TEXTURE0+lt-1),ht!==e&&(t.activeTexture(e),ht=e)}function I(e,n){null===ht&&R();var r=ft[ht];void 0===r&&(r={type:void 0,texture:void 0},ft[ht]=r),r.type===e&&r.texture===n||(t.bindTexture(e,n||mt[e]),r.type=e,r.texture=n)}function O(){try{t.compressedTexImage2D.apply(t,arguments)}catch(e){console.error(e)}}function U(){try{t.texImage2D.apply(t,arguments)}catch(e){console.error(e)}}function N(t,e,n,r){j.setClear(t,e,n,r)}function F(t){G.setClear(t)}function D(t){V.setClear(t)}function z(e){pt.equals(e)===!1&&(t.scissor(e.x,e.y,e.z,e.w),pt.copy(e))}function B(e){dt.equals(e)===!1&&(t.viewport(e.x,e.y,e.z,e.w),dt.copy(e))}function k(){for(var e=0;e<X.length;e++)1===X[e]&&(t.disableVertexAttribArray(e),X[e]=0);Y={},Z=null,ht=null,ft={},J=null,it=null,ot=null,j.reset(),G.reset(),V.reset()}var j=new r,G=new i,V=new a,H=t.getParameter(t.MAX_VERTEX_ATTRIBS),W=new Uint8Array(H),X=new Uint8Array(H),q=new Uint8Array(H),Y={},Z=null,J=null,$=null,K=null,Q=null,tt=null,et=null,nt=null,rt=!1,it=null,ot=null,at=null,st=null,ct=null,ut=null,lt=t.getParameter(t.MAX_TEXTURE_IMAGE_UNITS),ht=null,ft={},pt=new o,dt=new o,mt={};return mt[t.TEXTURE_2D]=s(t.TEXTURE_2D,t.TEXTURE_2D,1),mt[t.TEXTURE_CUBE_MAP]=s(t.TEXTURE_CUBE_MAP,t.TEXTURE_CUBE_MAP_POSITIVE_X,6),{buffers:{color:j,depth:G,stencil:V},init:c,initAttributes:u,enableAttribute:l,enableAttributeAndDivisor:h,disableUnusedAttributes:f,enable:p,disable:d,getCompressedTextureFormats:m,setBlending:v,setColorWrite:g,setDepthTest:y,setDepthWrite:x,setDepthFunc:_,setStencilTest:w,setStencilWrite:b,setStencilFunc:M,setStencilOp:E,setFlipSided:S,setCullFace:T,setLineWidth:A,setPolygonOffset:L,getScissorTest:C,setScissorTest:P,activeTexture:R,bindTexture:I,compressedTexImage2D:O,texImage2D:U,clearColor:N,clearDepth:F,clearStencil:D,scissor:z,viewport:B,reset:k}}function oe(t,e,n){function r(){if(void 0!==o)return o;var n=e.get("EXT_texture_filter_anisotropic");return o=null!==n?t.getParameter(n.MAX_TEXTURE_MAX_ANISOTROPY_EXT):0}function i(e){if("highp"===e){if(t.getShaderPrecisionFormat(t.VERTEX_SHADER,t.HIGH_FLOAT).precision>0&&t.getShaderPrecisionFormat(t.FRAGMENT_SHADER,t.HIGH_FLOAT).precision>0)return"highp";e="mediump"}return"mediump"===e&&t.getShaderPrecisionFormat(t.VERTEX_SHADER,t.MEDIUM_FLOAT).precision>0&&t.getShaderPrecisionFormat(t.FRAGMENT_SHADER,t.MEDIUM_FLOAT).precision>0?"mediump":"lowp"}var o,a=void 0!==n.precision?n.precision:"highp",s=i(a);s!==a&&(console.warn("THREE.WebGLRenderer:",a,"not supported, using",s,"instead."),a=s);var c=n.logarithmicDepthBuffer===!0&&!!e.get("EXT_frag_depth"),u=t.getParameter(t.MAX_TEXTURE_IMAGE_UNITS),l=t.getParameter(t.MAX_VERTEX_TEXTURE_IMAGE_UNITS),h=t.getParameter(t.MAX_TEXTURE_SIZE),f=t.getParameter(t.MAX_CUBE_MAP_TEXTURE_SIZE),p=t.getParameter(t.MAX_VERTEX_ATTRIBS),d=t.getParameter(t.MAX_VERTEX_UNIFORM_VECTORS),m=t.getParameter(t.MAX_VARYING_VECTORS),v=t.getParameter(t.MAX_FRAGMENT_UNIFORM_VECTORS),g=l>0,y=!!e.get("OES_texture_float"),x=g&&y;return{getMaxAnisotropy:r,getMaxPrecision:i,precision:a,logarithmicDepthBuffer:c,maxTextures:u,maxVertexTextures:l,maxTextureSize:h,maxCubemapSize:f,maxAttributes:p,maxVertexUniforms:d,maxVaryings:m,maxFragmentUniforms:v,vertexTextures:g,floatFragmentTextures:y,floatVertexTextures:x}}function ae(t){var e={};return{get:function(n){if(void 0!==e[n])return e[n];var r;switch(n){case"WEBGL_depth_texture":r=t.getExtension("WEBGL_depth_texture")||t.getExtension("MOZ_WEBGL_depth_texture")||t.getExtension("WEBKIT_WEBGL_depth_texture");break;case"EXT_texture_filter_anisotropic":r=t.getExtension("EXT_texture_filter_anisotropic")||t.getExtension("MOZ_EXT_texture_filter_anisotropic")||t.getExtension("WEBKIT_EXT_texture_filter_anisotropic");break;case"WEBGL_compressed_texture_s3tc":r=t.getExtension("WEBGL_compressed_texture_s3tc")||t.getExtension("MOZ_WEBGL_compressed_texture_s3tc")||t.getExtension("WEBKIT_WEBGL_compressed_texture_s3tc");break;case"WEBGL_compressed_texture_pvrtc":r=t.getExtension("WEBGL_compressed_texture_pvrtc")||t.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc");break;case"WEBGL_compressed_texture_etc1":r=t.getExtension("WEBGL_compressed_texture_etc1");break;default:r=t.getExtension(n)}return null===r&&console.warn("THREE.WebGLRenderer: "+n+" extension not supported."),e[n]=r,r}}}function se(){function t(){u.value!==r&&(u.value=r,u.needsUpdate=i>0),n.numPlanes=i}function e(t,e,r,i){var o=null!==t?t.length:0,a=null;if(0!==o){if(a=u.value,i!==!0||null===a){var l=r+4*o,h=e.matrixWorldInverse;c.getNormalMatrix(h),(null===a||a.length<l)&&(a=new Float32Array(l));for(var f=0,p=r;f!==o;++f,p+=4)s.copy(t[f]).applyMatrix4(h,c),s.normal.toArray(a,p),a[p+3]=s.constant}u.value=a,u.needsUpdate=!0}return n.numPlanes=o,a}var n=this,r=null,i=0,o=!1,a=!1,s=new rt,c=new nt,u={value:null,needsUpdate:!1};this.uniform=u,this.numPlanes=0,this.init=function(t,n,a){var s=0!==t.length||n||0!==i||o;return o=n,r=e(t,a,0),i=t.length,s},this.beginShadows=function(){a=!0,e(null)},this.endShadows=function(){a=!1,t()},this.setState=function(n,s,c,l,h){if(!o||null===n||0===n.length||a&&!s)a?e(null):t();else{var f=a?0:i,p=4*f,d=l.clippingState||null;u.value=d,d=e(n,c,p,h);for(var m=0;m!==p;++m)d[m]=r[m];l.clippingState=d,this.numPlanes+=f}}}function ce(e){function n(){return null===ft?Tt:1}function r(t,e,n,r){J===!0&&(t*=r,e*=r,n*=r),te.clearColor(t,e,n,r)}function i(){te.init(),te.scissor(yt.copy(At).multiplyScalar(Tt)),te.viewport(_t.copy(Ot).multiplyScalar(Tt)),r(bt.r,bt.g,bt.b,Mt)}function a(){ht=null,gt=null,vt="",mt=-1,te.reset()}function s(t){t.preventDefault(),a(),i(),ce.clear()}function c(t){var e=t.target;e.removeEventListener("dispose",c),h(e)}function h(t){f(t),ce["delete"](t)}function f(t){var e=ce.get(t).program;t.program=void 0,void 0!==e&&he.releaseProgram(e)}function p(t,e,n,r){var i;if(n&&n.isInstancedBufferGeometry&&(i=$t.get("ANGLE_instanced_arrays"),null===i))return void console.error("THREE.WebGLRenderer.setupVertexAttributes: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.");void 0===r&&(r=0),te.initAttributes();var o=n.attributes,a=e.getAttributes(),s=t.defaultAttributeValues;for(var c in a){var u=a[c];if(u>=0){var l=o[c];if(void 0!==l){var h=Yt.FLOAT,f=l.array,p=l.normalized;f instanceof Float32Array?h=Yt.FLOAT:f instanceof Float64Array?console.warn("Unsupported data buffer format: Float64Array"):f instanceof Uint16Array?h=Yt.UNSIGNED_SHORT:f instanceof Int16Array?h=Yt.SHORT:f instanceof Uint32Array?h=Yt.UNSIGNED_INT:f instanceof Int32Array?h=Yt.INT:f instanceof Int8Array?h=Yt.BYTE:f instanceof Uint8Array&&(h=Yt.UNSIGNED_BYTE);var d=l.itemSize,m=le.getAttributeBuffer(l);if(l&&l.isInterleavedBufferAttribute){var v=l.data,g=v.stride,y=l.offset;v&&v.isInstancedInterleavedBuffer?(te.enableAttributeAndDivisor(u,v.meshPerAttribute,i),void 0===n.maxInstancedCount&&(n.maxInstancedCount=v.meshPerAttribute*v.count)):te.enableAttribute(u),Yt.bindBuffer(Yt.ARRAY_BUFFER,m),Yt.vertexAttribPointer(u,d,h,p,g*v.array.BYTES_PER_ELEMENT,(r*g+y)*v.array.BYTES_PER_ELEMENT)}else l&&l.isInstancedBufferAttribute?(te.enableAttributeAndDivisor(u,l.meshPerAttribute,i),void 0===n.maxInstancedCount&&(n.maxInstancedCount=l.meshPerAttribute*l.count)):te.enableAttribute(u),Yt.bindBuffer(Yt.ARRAY_BUFFER,m),Yt.vertexAttribPointer(u,d,h,p,0,r*d*l.array.BYTES_PER_ELEMENT)}else if(void 0!==s){var x=s[c];if(void 0!==x)switch(x.length){case 2:Yt.vertexAttrib2fv(u,x);break;case 3:Yt.vertexAttrib3fv(u,x);break;case 4:Yt.vertexAttrib4fv(u,x);break;default:Yt.vertexAttrib1fv(u,x)}}}}te.disableUnusedAttributes()}function d(t,e){return Math.abs(e[0])-Math.abs(t[0])}function m(t,e){return t.object.renderOrder!==e.object.renderOrder?t.object.renderOrder-e.object.renderOrder:t.material.program&&e.material.program&&t.material.program!==e.material.program?t.material.program.id-e.material.program.id:t.material.id!==e.material.id?t.material.id-e.material.id:t.z!==e.z?t.z-e.z:t.id-e.id}function v(t,e){return t.object.renderOrder!==e.object.renderOrder?t.object.renderOrder-e.object.renderOrder:t.z!==e.z?e.z-t.z:t.id-e.id}function g(t,e,n,r,i){var o,a;n.transparent?(o=rt,a=++at):(o=tt,a=++nt);var s=o[a];void 0!==s?(s.id=t.id,s.object=t,s.geometry=e,s.material=n,s.z=Wt.z,s.group=i):(s={id:t.id,object:t,geometry:e,material:n,z:Wt.z,group:i},o.push(s))}function y(t){var e=t.geometry;return null===e.boundingSphere&&e.computeBoundingSphere(),Vt.copy(e.boundingSphere).applyMatrix4(t.matrixWorld),_(Vt)}function x(t){return Vt.center.set(0,0,0),Vt.radius=.7071067811865476,Vt.applyMatrix4(t.matrixWorld),_(Vt)}function _(t){if(!Bt.intersectsSphere(t))return!1;var e=kt.numPlanes;if(0===e)return!0;var n=lt.clippingPlanes,r=t.center,i=-t.radius,o=0;do if(n[o].distanceToPoint(r)<i)return!1;while(++o!==e);return!0}function w(t,e){if(t.visible!==!1){var n=0!==(t.layers.mask&e.layers.mask);if(n)if(t.isLight)Q.push(t);else if(t.isSprite)t.frustumCulled!==!1&&x(t)!==!0||ct.push(t);else if(t.isLensFlare)ut.push(t);else if(t.isImmediateRenderObject)lt.sortObjects===!0&&(Wt.setFromMatrixPosition(t.matrixWorld),Wt.applyProjection(Ht)),g(t,null,t.material,Wt.z,null);else if((t.isMesh||t.isLine||t.isPoints)&&(t.isSkinnedMesh&&t.skeleton.update(),t.frustumCulled===!1||y(t)===!0)){var r=t.material;if(r.visible===!0){lt.sortObjects===!0&&(Wt.setFromMatrixPosition(t.matrixWorld),Wt.applyProjection(Ht));var i=le.update(t);if(r.isMultiMaterial)for(var o=i.groups,a=r.materials,s=0,c=o.length;s<c;s++){var u=o[s],l=a[u.materialIndex];l.visible===!0&&g(t,i,l,Wt.z,u)}else g(t,i,r,Wt.z,null)}}for(var h=t.children,s=0,c=h.length;s<c;s++)w(h[s],e)}}function b(t,e,n,r){for(var i=0,o=t.length;i<o;i++){var a=t[i],s=a.object,c=a.geometry,u=void 0===r?a.material:r,l=a.group;if(s.modelViewMatrix.multiplyMatrices(e.matrixWorldInverse,s.matrixWorld),s.normalMatrix.getNormalMatrix(s.modelViewMatrix),s.isImmediateRenderObject){E(u);var h=S(e,n,u,s);vt="",s.render(function(t){lt.renderBufferImmediate(t,h,u)})}else null!==s.onBeforeRender&&s.onBeforeRender(),lt.renderBufferDirect(e,n,c,u,s,l)}}function M(e,n,r){var i=ce.get(e),o=he.getParameters(e,Xt,n,kt.numPlanes,r),a=he.getProgramCode(e,o),s=i.program,u=!0;if(void 0===s)e.addEventListener("dispose",c);else if(s.code!==a)f(e);else{if(void 0!==o.shaderID)return;u=!1}if(u){if(o.shaderID){var l=Nc[o.shaderID];i.__webglShader={name:e.type,uniforms:t.UniformsUtils.clone(l.uniforms),vertexShader:l.vertexShader,fragmentShader:l.fragmentShader}}else i.__webglShader={name:e.type,uniforms:e.uniforms,vertexShader:e.vertexShader,fragmentShader:e.fragmentShader};e.__webglShader=i.__webglShader,s=he.acquireProgram(e,o,a),i.program=s,e.program=s}var h=s.getAttributes();if(e.morphTargets){e.numSupportedMorphTargets=0;for(var p=0;p<lt.maxMorphTargets;p++)h["morphTarget"+p]>=0&&e.numSupportedMorphTargets++}if(e.morphNormals){e.numSupportedMorphNormals=0;for(var p=0;p<lt.maxMorphNormals;p++)h["morphNormal"+p]>=0&&e.numSupportedMorphNormals++}var d=i.__webglShader.uniforms;(e.isShaderMaterial||e.isRawShaderMaterial)&&e.clipping!==!0||(i.numClippingPlanes=kt.numPlanes,d.clippingPlanes=kt.uniform),i.fog=n,i.lightsHash=Xt.hash,e.lights&&(d.ambientLightColor.value=Xt.ambient,d.directionalLights.value=Xt.directional,d.spotLights.value=Xt.spot,d.pointLights.value=Xt.point,d.hemisphereLights.value=Xt.hemi,d.directionalShadowMap.value=Xt.directionalShadowMap,d.directionalShadowMatrix.value=Xt.directionalShadowMatrix,d.spotShadowMap.value=Xt.spotShadowMap,d.spotShadowMatrix.value=Xt.spotShadowMatrix,d.pointShadowMap.value=Xt.pointShadowMap,d.pointShadowMatrix.value=Xt.pointShadowMatrix);var m=i.program.getUniforms(),v=W.seqWithValue(m.seq,d);i.uniformsList=v,i.dynamicUniforms=W.splitDynamic(v,d)}function E(t){t.side===wi?te.disable(Yt.CULL_FACE):te.enable(Yt.CULL_FACE),te.setFlipSided(t.side===_i),t.transparent===!0?te.setBlending(t.blending,t.blendEquation,t.blendSrc,t.blendDst,t.blendEquationAlpha,t.blendSrcAlpha,t.blendDstAlpha,t.premultipliedAlpha):te.setBlending(Ai),te.setDepthFunc(t.depthFunc),te.setDepthTest(t.depthTest),te.setDepthWrite(t.depthWrite),te.setColorWrite(t.colorWrite),te.setPolygonOffset(t.polygonOffset,t.polygonOffsetFactor,t.polygonOffsetUnits)}function S(t,e,n,r){wt=0;var i=ce.get(n);if(jt&&(Gt||t!==gt)){var o=t===gt&&n.id===mt;kt.setState(n.clippingPlanes,n.clipShadows,t,i,o)}n.needsUpdate===!1&&(void 0===i.program?n.needsUpdate=!0:n.fog&&i.fog!==e?n.needsUpdate=!0:n.lights&&i.lightsHash!==Xt.hash?n.needsUpdate=!0:void 0!==i.numClippingPlanes&&i.numClippingPlanes!==kt.numPlanes&&(n.needsUpdate=!0)),n.needsUpdate&&(M(n,e,r),n.needsUpdate=!1);var a=!1,s=!1,c=!1,u=i.program,l=u.getUniforms(),h=i.__webglShader.uniforms;if(u.id!==ht&&(Yt.useProgram(u.program),ht=u.id,a=!0,s=!0,c=!0),n.id!==mt&&(mt=n.id,s=!0),a||t!==gt){if(l.set(Yt,t,"projectionMatrix"),Kt.logarithmicDepthBuffer&&l.setValue(Yt,"logDepthBufFC",2/(Math.log(t.far+1)/Math.LN2)),t!==gt&&(gt=t,s=!0,c=!0),n.isShaderMaterial||n.isMeshPhongMaterial||n.isMeshStandardMaterial||n.envMap){var f=l.map.cameraPosition;void 0!==f&&f.setValue(Yt,Wt.setFromMatrixPosition(t.matrixWorld))}(n.isMeshPhongMaterial||n.isMeshLambertMaterial||n.isMeshBasicMaterial||n.isMeshStandardMaterial||n.isShaderMaterial||n.skinning)&&l.setValue(Yt,"viewMatrix",t.matrixWorldInverse),l.set(Yt,lt,"toneMappingExposure"),l.set(Yt,lt,"toneMappingWhitePoint")}if(n.skinning){l.setOptional(Yt,r,"bindMatrix"),l.setOptional(Yt,r,"bindMatrixInverse");var p=r.skeleton;p&&(Kt.floatVertexTextures&&p.useVertexTexture?(l.set(Yt,p,"boneTexture"),l.set(Yt,p,"boneTextureWidth"),l.set(Yt,p,"boneTextureHeight")):l.setOptional(Yt,p,"boneMatrices"))}s&&(n.lights&&N(h,c),e&&n.fog&&P(h,e),(n.isMeshBasicMaterial||n.isMeshLambertMaterial||n.isMeshPhongMaterial||n.isMeshStandardMaterial||n.isMeshDepthMaterial)&&T(h,n),n.isLineBasicMaterial?A(h,n):n.isLineDashedMaterial?(A(h,n),L(h,n)):n.isPointsMaterial?C(h,n):n.isMeshLambertMaterial?R(h,n):n.isMeshPhongMaterial?I(h,n):n.isMeshPhysicalMaterial?U(h,n):n.isMeshStandardMaterial?O(h,n):n.isMeshDepthMaterial?n.displacementMap&&(h.displacementMap.value=n.displacementMap,h.displacementScale.value=n.displacementScale,h.displacementBias.value=n.displacementBias):n.isMeshNormalMaterial&&(h.opacity.value=n.opacity),W.upload(Yt,i.uniformsList,h,lt)),l.set(Yt,r,"modelViewMatrix"),l.set(Yt,r,"normalMatrix"),l.setValue(Yt,"modelMatrix",r.matrixWorld);var d=i.dynamicUniforms;return null!==d&&(W.evalDynamic(d,h,r,n,t),W.upload(Yt,d,h,lt)),u}function T(t,e){t.opacity.value=e.opacity,t.diffuse.value=e.color,e.emissive&&t.emissive.value.copy(e.emissive).multiplyScalar(e.emissiveIntensity),t.map.value=e.map,t.specularMap.value=e.specularMap,t.alphaMap.value=e.alphaMap,e.aoMap&&(t.aoMap.value=e.aoMap,t.aoMapIntensity.value=e.aoMapIntensity);var n;if(e.map?n=e.map:e.specularMap?n=e.specularMap:e.displacementMap?n=e.displacementMap:e.normalMap?n=e.normalMap:e.bumpMap?n=e.bumpMap:e.roughnessMap?n=e.roughnessMap:e.metalnessMap?n=e.metalnessMap:e.alphaMap?n=e.alphaMap:e.emissiveMap&&(n=e.emissiveMap),void 0!==n){n.isWebGLRenderTarget&&(n=n.texture);var r=n.offset,i=n.repeat;t.offsetRepeat.value.set(r.x,r.y,i.x,i.y)}t.envMap.value=e.envMap,t.flipEnvMap.value=e.envMap&&e.envMap.isCubeTexture?-1:1,t.reflectivity.value=e.reflectivity,t.refractionRatio.value=e.refractionRatio}function A(t,e){t.diffuse.value=e.color,t.opacity.value=e.opacity}function L(t,e){t.dashSize.value=e.dashSize,t.totalSize.value=e.dashSize+e.gapSize,t.scale.value=e.scale}function C(t,e){if(t.diffuse.value=e.color,t.opacity.value=e.opacity,t.size.value=e.size*Tt,t.scale.value=.5*k.clientHeight,t.map.value=e.map,null!==e.map){var n=e.map.offset,r=e.map.repeat;t.offsetRepeat.value.set(n.x,n.y,r.x,r.y)}}function P(t,e){t.fogColor.value=e.color,e.isFog?(t.fogNear.value=e.near,t.fogFar.value=e.far):e.isFogExp2&&(t.fogDensity.value=e.density)}function R(t,e){e.lightMap&&(t.lightMap.value=e.lightMap,t.lightMapIntensity.value=e.lightMapIntensity),e.emissiveMap&&(t.emissiveMap.value=e.emissiveMap)}function I(t,e){t.specular.value=e.specular,t.shininess.value=Math.max(e.shininess,1e-4),e.lightMap&&(t.lightMap.value=e.lightMap,t.lightMapIntensity.value=e.lightMapIntensity),e.emissiveMap&&(t.emissiveMap.value=e.emissiveMap),e.bumpMap&&(t.bumpMap.value=e.bumpMap,t.bumpScale.value=e.bumpScale),e.normalMap&&(t.normalMap.value=e.normalMap,t.normalScale.value.copy(e.normalScale)),e.displacementMap&&(t.displacementMap.value=e.displacementMap,t.displacementScale.value=e.displacementScale,t.displacementBias.value=e.displacementBias)}function O(t,e){t.roughness.value=e.roughness,t.metalness.value=e.metalness,e.roughnessMap&&(t.roughnessMap.value=e.roughnessMap),e.metalnessMap&&(t.metalnessMap.value=e.metalnessMap),e.lightMap&&(t.lightMap.value=e.lightMap,t.lightMapIntensity.value=e.lightMapIntensity),e.emissiveMap&&(t.emissiveMap.value=e.emissiveMap),e.bumpMap&&(t.bumpMap.value=e.bumpMap,t.bumpScale.value=e.bumpScale),e.normalMap&&(t.normalMap.value=e.normalMap,t.normalScale.value.copy(e.normalScale)),e.displacementMap&&(t.displacementMap.value=e.displacementMap,t.displacementScale.value=e.displacementScale,t.displacementBias.value=e.displacementBias),e.envMap&&(t.envMapIntensity.value=e.envMapIntensity)}function U(t,e){t.clearCoat.value=e.clearCoat,t.clearCoatRoughness.value=e.clearCoatRoughness,O(t,e)}function N(t,e){t.ambientLightColor.needsUpdate=e,t.directionalLights.needsUpdate=e,t.pointLights.needsUpdate=e,t.spotLights.needsUpdate=e,t.hemisphereLights.needsUpdate=e}function F(t){for(var e=0,n=0,r=t.length;n<r;n++){var i=t[n];i.castShadow&&(Xt.shadows[e++]=i)}Xt.shadows.length=e}function D(t,e){var n,r,i,o,a,s,c,u=0,h=0,f=0,p=e.matrixWorldInverse,d=0,m=0,v=0,g=0;for(n=0,r=t.length;n<r;n++)if(i=t[n],o=i.color,a=i.intensity,s=i.distance,c=i.shadow&&i.shadow.map?i.shadow.map.texture:null,i.isAmbientLight)u+=o.r*a,h+=o.g*a,f+=o.b*a;else if(i.isDirectionalLight){var y=fe.get(i);y.color.copy(i.color).multiplyScalar(i.intensity),y.direction.setFromMatrixPosition(i.matrixWorld),Wt.setFromMatrixPosition(i.target.matrixWorld),y.direction.sub(Wt),y.direction.transformDirection(p),y.shadow=i.castShadow,i.castShadow&&(y.shadowBias=i.shadow.bias,y.shadowRadius=i.shadow.radius,y.shadowMapSize=i.shadow.mapSize),Xt.directionalShadowMap[d]=c,Xt.directionalShadowMatrix[d]=i.shadow.matrix,Xt.directional[d++]=y}else if(i.isSpotLight){var y=fe.get(i);y.position.setFromMatrixPosition(i.matrixWorld),y.position.applyMatrix4(p),y.color.copy(o).multiplyScalar(a),y.distance=s,y.direction.setFromMatrixPosition(i.matrixWorld),Wt.setFromMatrixPosition(i.target.matrixWorld),y.direction.sub(Wt),y.direction.transformDirection(p),y.coneCos=Math.cos(i.angle),y.penumbraCos=Math.cos(i.angle*(1-i.penumbra)),y.decay=0===i.distance?0:i.decay,y.shadow=i.castShadow,i.castShadow&&(y.shadowBias=i.shadow.bias,y.shadowRadius=i.shadow.radius,y.shadowMapSize=i.shadow.mapSize),Xt.spotShadowMap[v]=c,Xt.spotShadowMatrix[v]=i.shadow.matrix,Xt.spot[v++]=y}else if(i.isPointLight){var y=fe.get(i);y.position.setFromMatrixPosition(i.matrixWorld),y.position.applyMatrix4(p),y.color.copy(i.color).multiplyScalar(i.intensity),y.distance=i.distance,y.decay=0===i.distance?0:i.decay,y.shadow=i.castShadow,i.castShadow&&(y.shadowBias=i.shadow.bias,y.shadowRadius=i.shadow.radius,y.shadowMapSize=i.shadow.mapSize),Xt.pointShadowMap[m]=c,void 0===Xt.pointShadowMatrix[m]&&(Xt.pointShadowMatrix[m]=new l),Wt.setFromMatrixPosition(i.matrixWorld).negate(),Xt.pointShadowMatrix[m].identity().setPosition(Wt),Xt.point[m++]=y}else if(i.isHemisphereLight){var y=fe.get(i);y.direction.setFromMatrixPosition(i.matrixWorld),y.direction.transformDirection(p),y.direction.normalize(),y.skyColor.copy(i.color).multiplyScalar(a),y.groundColor.copy(i.groundColor).multiplyScalar(a),Xt.hemi[g++]=y}Xt.ambient[0]=u,Xt.ambient[1]=h,Xt.ambient[2]=f,Xt.directional.length=d,Xt.spot.length=v,Xt.point.length=m,Xt.hemi.length=g,Xt.hash=d+","+m+","+v+","+g+","+Xt.shadows.length}function z(){var t=wt;return t>=Kt.maxTextures&&console.warn("WebGLRenderer: trying to use "+t+" texture units while this GPU supports only "+Kt.maxTextures),wt+=1,t}function B(t){var e;if(t===bo)return Yt.REPEAT;if(t===Mo)return Yt.CLAMP_TO_EDGE;if(t===Eo)return Yt.MIRRORED_REPEAT;if(t===To)return Yt.NEAREST;if(t===Ao)return Yt.NEAREST_MIPMAP_NEAREST;if(t===Lo)return Yt.NEAREST_MIPMAP_LINEAR;if(t===Co)return Yt.LINEAR;if(t===Po)return Yt.LINEAR_MIPMAP_NEAREST;if(t===Ro)return Yt.LINEAR_MIPMAP_LINEAR;if(t===Oo)return Yt.UNSIGNED_BYTE;if(t===jo)return Yt.UNSIGNED_SHORT_4_4_4_4;if(t===Go)return Yt.UNSIGNED_SHORT_5_5_5_1;if(t===Vo)return Yt.UNSIGNED_SHORT_5_6_5;if(t===Uo)return Yt.BYTE;if(t===No)return Yt.SHORT;if(t===Fo)return Yt.UNSIGNED_SHORT;if(t===Do)return Yt.INT;if(t===zo)return Yt.UNSIGNED_INT;if(t===Bo)return Yt.FLOAT;if(e=$t.get("OES_texture_half_float"),null!==e&&t===ko)return e.HALF_FLOAT_OES;if(t===Wo)return Yt.ALPHA;if(t===Xo)return Yt.RGB;if(t===qo)return Yt.RGBA;if(t===Yo)return Yt.LUMINANCE;if(t===Zo)return Yt.LUMINANCE_ALPHA;if(t===$o)return Yt.DEPTH_COMPONENT;if(t===Ko)return Yt.DEPTH_STENCIL;if(t===Ui)return Yt.FUNC_ADD;if(t===Ni)return Yt.FUNC_SUBTRACT;if(t===Fi)return Yt.FUNC_REVERSE_SUBTRACT;if(t===Bi)return Yt.ZERO;if(t===ki)return Yt.ONE;if(t===ji)return Yt.SRC_COLOR;if(t===Gi)return Yt.ONE_MINUS_SRC_COLOR;if(t===Vi)return Yt.SRC_ALPHA;if(t===Hi)return Yt.ONE_MINUS_SRC_ALPHA;if(t===Wi)return Yt.DST_ALPHA;if(t===Xi)return Yt.ONE_MINUS_DST_ALPHA;if(t===qi)return Yt.DST_COLOR;if(t===Yi)return Yt.ONE_MINUS_DST_COLOR;if(t===Zi)return Yt.SRC_ALPHA_SATURATE;if(e=$t.get("WEBGL_compressed_texture_s3tc"),null!==e){if(t===Qo)return e.COMPRESSED_RGB_S3TC_DXT1_EXT;if(t===ta)return e.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(t===ea)return e.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(t===na)return e.COMPRESSED_RGBA_S3TC_DXT5_EXT}if(e=$t.get("WEBGL_compressed_texture_pvrtc"),null!==e){if(t===ra)return e.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(t===ia)return e.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(t===oa)return e.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(t===aa)return e.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}if(e=$t.get("WEBGL_compressed_texture_etc1"),null!==e&&t===sa)return e.COMPRESSED_RGB_ETC1_WEBGL;if(e=$t.get("EXT_blend_minmax"),null!==e){if(t===Di)return e.MIN_EXT;if(t===zi)return e.MAX_EXT}return e=$t.get("WEBGL_depth_texture"),null!==e&&t===Ho?e.UNSIGNED_INT_24_8_WEBGL:0}console.log("THREE.WebGLRenderer",ci),e=e||{};var k=void 0!==e.canvas?e.canvas:document.createElementNS("http://www.w3.org/1999/xhtml","canvas"),j=void 0!==e.context?e.context:null,G=void 0!==e.alpha&&e.alpha,V=void 0===e.depth||e.depth,H=void 0===e.stencil||e.stencil,q=void 0!==e.antialias&&e.antialias,J=void 0===e.premultipliedAlpha||e.premultipliedAlpha,$=void 0!==e.preserveDrawingBuffer&&e.preserveDrawingBuffer,Q=[],tt=[],nt=-1,rt=[],at=-1,st=new Float32Array(8),ct=[],ut=[];this.domElement=k,this.context=null,this.autoClear=!0,this.autoClearColor=!0,this.autoClearDepth=!0,this.autoClearStencil=!0,this.sortObjects=!0,this.clippingPlanes=[],this.localClippingEnabled=!1,this.gammaFactor=2,this.gammaInput=!1,this.gammaOutput=!1,this.physicallyCorrectLights=!1,this.toneMapping=co,this.toneMappingExposure=1,this.toneMappingWhitePoint=1,this.maxMorphTargets=8,this.maxMorphNormals=4;var lt=this,ht=null,ft=null,pt=null,mt=-1,vt="",gt=null,yt=new o,xt=null,_t=new o,wt=0,bt=new X(0),Mt=0,Et=k.width,St=k.height,Tt=1,At=new o(0,0,Et,St),Lt=!1,Ot=new o(0,0,Et,St),Bt=new it,kt=new se,jt=!1,Gt=!1,Vt=new et,Ht=new l,Wt=new u,Xt={hash:"",ambient:[0,0,0],directional:[],directionalShadowMap:[],directionalShadowMatrix:[],spot:[],spotShadowMap:[],spotShadowMatrix:[],point:[],pointShadowMap:[],pointShadowMatrix:[],hemi:[],shadows:[]},qt={calls:0,vertices:0,faces:0,points:0};this.info={render:qt,memory:{geometries:0,textures:0},programs:null};var Yt;try{var Zt={alpha:G,depth:V,stencil:H,antialias:q,premultipliedAlpha:J,preserveDrawingBuffer:$};if(Yt=j||k.getContext("webgl",Zt)||k.getContext("experimental-webgl",Zt),null===Yt)throw null!==k.getContext("webgl")?"Error creating WebGL context with your selected attributes.":"Error creating WebGL context.";void 0===Yt.getShaderPrecisionFormat&&(Yt.getShaderPrecisionFormat=function(){return{rangeMin:1,rangeMax:1,precision:1}}),k.addEventListener("webglcontextlost",s,!1)}catch(Jt){console.error("THREE.WebGLRenderer: "+Jt)}var $t=new ae(Yt);$t.get("WEBGL_depth_texture"),$t.get("OES_texture_float"),$t.get("OES_texture_float_linear"),$t.get("OES_texture_half_float"),$t.get("OES_texture_half_float_linear"),$t.get("OES_standard_derivatives"),$t.get("ANGLE_instanced_arrays"),$t.get("OES_element_index_uint")&&(Ct.MaxIndex=4294967296);var Kt=new oe(Yt,$t,e),te=new ie(Yt,$t,B),ce=new re,ue=new ne(Yt,$t,te,ce,Kt,B,this.info),le=new ee(Yt,ce,this.info),he=new Qt(this,Kt),fe=new zt;this.info.programs=he.programs;var pe=new Dt(Yt,$t,qt),de=new Ft(Yt,$t,qt),me=new Nt((-1),1,1,(-1),0,1),ve=new Ut,ge=new Pt(new It(2,2),new dt({depthTest:!1,depthWrite:!1,fog:!1})),ye=Nc.cube,xe=new Pt(new Rt(5,5,5),new K({uniforms:ye.uniforms,vertexShader:ye.vertexShader,fragmentShader:ye.fragmentShader,side:_i,depthTest:!1,depthWrite:!1,fog:!1}));i(),this.context=Yt,this.capabilities=Kt,this.extensions=$t,this.properties=ce,this.state=te;var _e=new ot(this,Xt,le,Kt);this.shadowMap=_e;var we=new Z(this,ct),be=new Y(this,ut);this.getContext=function(){return Yt},this.getContextAttributes=function(){return Yt.getContextAttributes()},this.forceContextLoss=function(){$t.get("WEBGL_lose_context").loseContext()},this.getMaxAnisotropy=function(){return Kt.getMaxAnisotropy()},this.getPrecision=function(){return Kt.precision},this.getPixelRatio=function(){return Tt},this.setPixelRatio=function(t){void 0!==t&&(Tt=t,this.setSize(Ot.z,Ot.w,!1))},this.getSize=function(){return{width:Et,height:St}},this.setSize=function(t,e,n){Et=t,St=e,k.width=t*Tt,k.height=e*Tt,n!==!1&&(k.style.width=t+"px",k.style.height=e+"px"),this.setViewport(0,0,t,e)},this.setViewport=function(t,e,n,r){te.viewport(Ot.set(t,e,n,r))},this.setScissor=function(t,e,n,r){te.scissor(At.set(t,e,n,r))},this.setScissorTest=function(t){te.setScissorTest(Lt=t)},this.getClearColor=function(){return bt},this.setClearColor=function(t,e){bt.set(t),Mt=void 0!==e?e:1,r(bt.r,bt.g,bt.b,Mt)},this.getClearAlpha=function(){return Mt},this.setClearAlpha=function(t){Mt=t,r(bt.r,bt.g,bt.b,Mt)},this.clear=function(t,e,n){var r=0;(void 0===t||t)&&(r|=Yt.COLOR_BUFFER_BIT),(void 0===e||e)&&(r|=Yt.DEPTH_BUFFER_BIT),(void 0===n||n)&&(r|=Yt.STENCIL_BUFFER_BIT),Yt.clear(r)},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(t,e,n,r){this.setRenderTarget(t),this.clear(e,n,r)},this.resetGLState=a,this.dispose=function(){rt=[],at=-1,tt=[],nt=-1,k.removeEventListener("webglcontextlost",s,!1)},this.renderBufferImmediate=function(t,e,n){te.initAttributes();var r=ce.get(t);t.hasPositions&&!r.position&&(r.position=Yt.createBuffer()),t.hasNormals&&!r.normal&&(r.normal=Yt.createBuffer()),t.hasUvs&&!r.uv&&(r.uv=Yt.createBuffer()),t.hasColors&&!r.color&&(r.color=Yt.createBuffer());var i=e.getAttributes();if(t.hasPositions&&(Yt.bindBuffer(Yt.ARRAY_BUFFER,r.position),Yt.bufferData(Yt.ARRAY_BUFFER,t.positionArray,Yt.DYNAMIC_DRAW),te.enableAttribute(i.position),Yt.vertexAttribPointer(i.position,3,Yt.FLOAT,!1,0,0)),t.hasNormals){if(Yt.bindBuffer(Yt.ARRAY_BUFFER,r.normal),!n.isMeshPhongMaterial&&!n.isMeshStandardMaterial&&n.shading===bi)for(var o=0,a=3*t.count;o<a;o+=9){
  var s=t.normalArray,c=(s[o+0]+s[o+3]+s[o+6])/3,u=(s[o+1]+s[o+4]+s[o+7])/3,l=(s[o+2]+s[o+5]+s[o+8])/3;s[o+0]=c,s[o+1]=u,s[o+2]=l,s[o+3]=c,s[o+4]=u,s[o+5]=l,s[o+6]=c,s[o+7]=u,s[o+8]=l}Yt.bufferData(Yt.ARRAY_BUFFER,t.normalArray,Yt.DYNAMIC_DRAW),te.enableAttribute(i.normal),Yt.vertexAttribPointer(i.normal,3,Yt.FLOAT,!1,0,0)}t.hasUvs&&n.map&&(Yt.bindBuffer(Yt.ARRAY_BUFFER,r.uv),Yt.bufferData(Yt.ARRAY_BUFFER,t.uvArray,Yt.DYNAMIC_DRAW),te.enableAttribute(i.uv),Yt.vertexAttribPointer(i.uv,2,Yt.FLOAT,!1,0,0)),t.hasColors&&n.vertexColors!==Ei&&(Yt.bindBuffer(Yt.ARRAY_BUFFER,r.color),Yt.bufferData(Yt.ARRAY_BUFFER,t.colorArray,Yt.DYNAMIC_DRAW),te.enableAttribute(i.color),Yt.vertexAttribPointer(i.color,3,Yt.FLOAT,!1,0,0)),te.disableUnusedAttributes(),Yt.drawArrays(Yt.TRIANGLES,0,t.count),t.count=0},this.renderBufferDirect=function(t,e,r,i,o,a){E(i);var s=S(t,e,i,o),c=!1,u=r.id+"_"+s.id+"_"+i.wireframe;u!==vt&&(vt=u,c=!0);var l=o.morphTargetInfluences;if(void 0!==l){for(var h=[],f=0,m=l.length;f<m;f++){var v=l[f];h.push([v,f])}h.sort(d),h.length>8&&(h.length=8);for(var g=r.morphAttributes,f=0,m=h.length;f<m;f++){var v=h[f];if(st[f]=v[0],0!==v[0]){var y=v[1];i.morphTargets===!0&&g.position&&r.addAttribute("morphTarget"+f,g.position[y]),i.morphNormals===!0&&g.normal&&r.addAttribute("morphNormal"+f,g.normal[y])}else i.morphTargets===!0&&r.removeAttribute("morphTarget"+f),i.morphNormals===!0&&r.removeAttribute("morphNormal"+f)}for(var f=h.length,x=st.length;f<x;f++)st[f]=0;s.getUniforms().setValue(Yt,"morphTargetInfluences",st),c=!0}var y=r.index,_=r.attributes.position,w=1;i.wireframe===!0&&(y=le.getWireframeAttribute(r),w=2);var b;null!==y?(b=de,b.setIndex(y)):b=pe,c&&(p(i,s,r),null!==y&&Yt.bindBuffer(Yt.ELEMENT_ARRAY_BUFFER,le.getAttributeBuffer(y)));var M=0;null!==y?M=y.count:void 0!==_&&(M=_.count);var T=r.drawRange.start*w,A=r.drawRange.count*w,L=null!==a?a.start*w:0,C=null!==a?a.count*w:1/0,P=Math.max(T,L),R=Math.min(M,T+A,L+C)-1,I=Math.max(0,R-P+1);if(0!==I){if(o.isMesh)if(i.wireframe===!0)te.setLineWidth(i.wireframeLinewidth*n()),b.setMode(Yt.LINES);else switch(o.drawMode){case ga:b.setMode(Yt.TRIANGLES);break;case ya:b.setMode(Yt.TRIANGLE_STRIP);break;case xa:b.setMode(Yt.TRIANGLE_FAN)}else if(o.isLine){var O=i.linewidth;void 0===O&&(O=1),te.setLineWidth(O*n()),o.isLineSegments?b.setMode(Yt.LINES):b.setMode(Yt.LINE_STRIP)}else o.isPoints&&b.setMode(Yt.POINTS);r&&r.isInstancedBufferGeometry?r.maxInstancedCount>0&&b.renderInstances(r,P,I):b.render(P,I)}},this.render=function(t,e,n,i){if(void 0!==e&&e.isCamera!==!0)return void console.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.");var o=t.fog;vt="",mt=-1,gt=null,t.autoUpdate===!0&&t.updateMatrixWorld(),null===e.parent&&e.updateMatrixWorld(),e.matrixWorldInverse.getInverse(e.matrixWorld),Ht.multiplyMatrices(e.projectionMatrix,e.matrixWorldInverse),Bt.setFromMatrix(Ht),Q.length=0,nt=-1,at=-1,ct.length=0,ut.length=0,Gt=this.localClippingEnabled,jt=kt.init(this.clippingPlanes,Gt,e),w(t,e),tt.length=nt+1,rt.length=at+1,lt.sortObjects===!0&&(tt.sort(m),rt.sort(v)),jt&&kt.beginShadows(),F(Q),_e.render(t,e),D(Q,e),jt&&kt.endShadows(),qt.calls=0,qt.vertices=0,qt.faces=0,qt.points=0,void 0===n&&(n=null),this.setRenderTarget(n);var a=t.background;if(null===a?r(bt.r,bt.g,bt.b,Mt):a&&a.isColor&&(r(a.r,a.g,a.b,1),i=!0),(this.autoClear||i)&&this.clear(this.autoClearColor,this.autoClearDepth,this.autoClearStencil),a&&a.isCubeTexture?(ve.projectionMatrix.copy(e.projectionMatrix),ve.matrixWorld.extractRotation(e.matrixWorld),ve.matrixWorldInverse.getInverse(ve.matrixWorld),xe.material.uniforms.tCube.value=a,xe.modelViewMatrix.multiplyMatrices(ve.matrixWorldInverse,xe.matrixWorld),le.update(xe),lt.renderBufferDirect(ve,null,xe.geometry,xe.material,xe,null)):a&&a.isTexture&&(ge.material.map=a,le.update(ge),lt.renderBufferDirect(me,null,ge.geometry,ge.material,ge,null)),t.overrideMaterial){var s=t.overrideMaterial;b(tt,e,o,s),b(rt,e,o,s)}else te.setBlending(Ai),b(tt,e,o),b(rt,e,o);we.render(t,e),be.render(t,e,_t),n&&ue.updateRenderTargetMipmap(n),te.setDepthTest(!0),te.setDepthWrite(!0),te.setColorWrite(!0)},this.setFaceCulling=function(t,e){te.setCullFace(t),te.setFlipSided(e===di)},this.allocTextureUnit=z,this.setTexture2D=function(){var t=!1;return function(e,n){e&&e.isWebGLRenderTarget&&(t||(console.warn("THREE.WebGLRenderer.setTexture2D: don't use render targets as textures. Use their .texture property instead."),t=!0),e=e.texture),ue.setTexture2D(e,n)}}(),this.setTexture=function(){var t=!1;return function(e,n){t||(console.warn("THREE.WebGLRenderer: .setTexture is deprecated, use setTexture2D instead."),t=!0),ue.setTexture2D(e,n)}}(),this.setTextureCube=function(){var t=!1;return function(e,n){e&&e.isWebGLRenderTargetCube&&(t||(console.warn("THREE.WebGLRenderer.setTextureCube: don't use cube render targets as textures. Use their .texture property instead."),t=!0),e=e.texture),e&&e.isCubeTexture||Array.isArray(e.image)&&6===e.image.length?ue.setTextureCube(e,n):ue.setTextureCubeDynamic(e,n)}}(),this.getCurrentRenderTarget=function(){return ft},this.setRenderTarget=function(t){ft=t,t&&void 0===ce.get(t).__webglFramebuffer&&ue.setupRenderTarget(t);var e,n=t&&t.isWebGLRenderTargetCube;if(t){var r=ce.get(t);e=n?r.__webglFramebuffer[t.activeCubeFace]:r.__webglFramebuffer,yt.copy(t.scissor),xt=t.scissorTest,_t.copy(t.viewport)}else e=null,yt.copy(At).multiplyScalar(Tt),xt=Lt,_t.copy(Ot).multiplyScalar(Tt);if(pt!==e&&(Yt.bindFramebuffer(Yt.FRAMEBUFFER,e),pt=e),te.scissor(yt),te.setScissorTest(xt),te.viewport(_t),n){var i=ce.get(t.texture);Yt.framebufferTexture2D(Yt.FRAMEBUFFER,Yt.COLOR_ATTACHMENT0,Yt.TEXTURE_CUBE_MAP_POSITIVE_X+t.activeCubeFace,i.__webglTexture,t.activeMipMapLevel)}},this.readRenderTargetPixels=function(t,e,n,r,i,o){if((t&&t.isWebGLRenderTarget)===!1)return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");var a=ce.get(t).__webglFramebuffer;if(a){var s=!1;a!==pt&&(Yt.bindFramebuffer(Yt.FRAMEBUFFER,a),s=!0);try{var c=t.texture,u=c.format,l=c.type;if(u!==qo&&B(u)!==Yt.getParameter(Yt.IMPLEMENTATION_COLOR_READ_FORMAT))return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");if(!(l===Oo||B(l)===Yt.getParameter(Yt.IMPLEMENTATION_COLOR_READ_TYPE)||l===Bo&&($t.get("OES_texture_float")||$t.get("WEBGL_color_buffer_float"))||l===ko&&$t.get("EXT_color_buffer_half_float")))return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");Yt.checkFramebufferStatus(Yt.FRAMEBUFFER)===Yt.FRAMEBUFFER_COMPLETE?e>=0&&e<=t.width-r&&n>=0&&n<=t.height-i&&Yt.readPixels(e,n,r,i,B(u),B(l),o):console.error("THREE.WebGLRenderer.readRenderTargetPixels: readPixels from renderTarget failed. Framebuffer not complete.")}finally{s&&Yt.bindFramebuffer(Yt.FRAMEBUFFER,pt)}}}}function ue(t,e){this.name="",this.color=new X(t),this.density=void 0!==e?e:25e-5}function le(t,e,n){this.name="",this.color=new X(t),this.near=void 0!==e?e:1,this.far=void 0!==n?n:1e3}function he(){ut.call(this),this.type="Scene",this.background=null,this.fog=null,this.overrideMaterial=null,this.autoUpdate=!0}function fe(t,e,n,r,i){ut.call(this),this.lensFlares=[],this.positionScreen=new u,this.customUpdateCallback=void 0,void 0!==t&&this.add(t,e,n,r,i)}function pe(t){J.call(this),this.type="SpriteMaterial",this.color=new X(16777215),this.map=null,this.rotation=0,this.fog=!1,this.lights=!1,this.setValues(t)}function de(t){ut.call(this),this.type="Sprite",this.material=void 0!==t?t:new pe}function me(){ut.call(this),this.type="LOD",Object.defineProperties(this,{levels:{enumerable:!0,value:[]}})}function ve(t,e,n,i,o,a,s,c,u,l,h,f){r.call(this,null,a,s,c,u,l,i,o,h,f),this.image={data:t,width:e,height:n},this.magFilter=void 0!==u?u:To,this.minFilter=void 0!==l?l:To,this.flipY=!1,this.generateMipmaps=!1}function ge(e,n,r){if(this.useVertexTexture=void 0===r||r,this.identityMatrix=new l,e=e||[],this.bones=e.slice(0),this.useVertexTexture){var i=Math.sqrt(4*this.bones.length);i=t.Math.nextPowerOfTwo(Math.ceil(i)),i=Math.max(i,4),this.boneTextureWidth=i,this.boneTextureHeight=i,this.boneMatrices=new Float32Array(this.boneTextureWidth*this.boneTextureHeight*4),this.boneTexture=new ve(this.boneMatrices,this.boneTextureWidth,this.boneTextureHeight,qo,Bo)}else this.boneMatrices=new Float32Array(16*this.bones.length);if(void 0===n)this.calculateInverses();else if(this.bones.length===n.length)this.boneInverses=n.slice(0);else{console.warn("THREE.Skeleton bonInverses is the wrong length."),this.boneInverses=[];for(var o=0,a=this.bones.length;o<a;o++)this.boneInverses.push(new l)}}function ye(t){ut.call(this),this.type="Bone",this.skin=t}function xe(t,e,n){Pt.call(this,t,e),this.type="SkinnedMesh",this.bindMode="attached",this.bindMatrix=new l,this.bindMatrixInverse=new l;var r=[];if(this.geometry&&void 0!==this.geometry.bones){for(var i,o,a=0,s=this.geometry.bones.length;a<s;++a)o=this.geometry.bones[a],i=new ye(this),r.push(i),i.name=o.name,i.position.fromArray(o.pos),i.quaternion.fromArray(o.rotq),void 0!==o.scl&&i.scale.fromArray(o.scl);for(var a=0,s=this.geometry.bones.length;a<s;++a)o=this.geometry.bones[a],o.parent!==-1&&null!==o.parent&&void 0!==r[o.parent]?r[o.parent].add(r[a]):this.add(r[a])}this.normalizeSkinWeights(),this.updateMatrixWorld(!0),this.bind(new ge(r,(void 0),n),this.matrixWorld)}function _e(t){J.call(this),this.type="LineBasicMaterial",this.color=new X(16777215),this.linewidth=1,this.linecap="round",this.linejoin="round",this.lights=!1,this.setValues(t)}function we(t,e,n){return 1===n?(console.warn("THREE.Line: parameter THREE.LinePieces no longer supported. Created THREE.LineSegments instead."),new be(t,e)):(ut.call(this),this.type="Line",this.geometry=void 0!==t?t:new Ct,void(this.material=void 0!==e?e:new _e({color:16777215*Math.random()})))}function be(t,e){we.call(this,t,e),this.type="LineSegments"}function Me(t){J.call(this),this.type="PointsMaterial",this.color=new X(16777215),this.map=null,this.size=1,this.sizeAttenuation=!0,this.lights=!1,this.setValues(t)}function Ee(t,e){ut.call(this),this.type="Points",this.geometry=void 0!==t?t:new Ct,this.material=void 0!==e?e:new Me({color:16777215*Math.random()})}function Se(){ut.call(this),this.type="Group"}function Te(t,e,n,i,o,a,s,c,u){function l(){requestAnimationFrame(l),t.readyState>=t.HAVE_CURRENT_DATA&&(h.needsUpdate=!0)}r.call(this,t,e,n,i,o,a,s,c,u),this.generateMipmaps=!1;var h=this;l()}function Ae(t,e,n,i,o,a,s,c,u,l,h,f){r.call(this,null,a,s,c,u,l,i,o,h,f),this.image={width:e,height:n},this.mipmaps=t,this.flipY=!1,this.generateMipmaps=!1}function Le(t,e,n,i,o,a,s,c,u){r.call(this,t,e,n,i,o,a,s,c,u),this.needsUpdate=!0}function Ce(t,e,n,i,o,a,s,c,u,l){if(l=void 0!==l?l:$o,l!==$o&&l!==Ko)throw new Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat");r.call(this,null,i,o,a,s,c,l,n,u),this.image={width:t,height:e},this.type=void 0!==n?n:Fo,this.magFilter=void 0!==s?s:To,this.minFilter=void 0!==c?c:To,this.flipY=!1,this.generateMipmaps=!1}function Pe(t){function e(t,e){return t-e}Ct.call(this);var n=[0,0],r={},i=["a","b","c"];if(t&&t.isGeometry){for(var o=t.vertices,a=t.faces,s=0,c=new Uint32Array(6*a.length),u=0,l=a.length;u<l;u++)for(var h=a[u],f=0;f<3;f++){n[0]=h[i[f]],n[1]=h[i[(f+1)%3]],n.sort(e);var p=n.toString();void 0===r[p]&&(c[2*s]=n[0],c[2*s+1]=n[1],r[p]=!0,s++)}for(var d=new Float32Array(2*s*3),u=0,l=s;u<l;u++)for(var f=0;f<2;f++){var m=o[c[2*u+f]],v=6*u+3*f;d[v+0]=m.x,d[v+1]=m.y,d[v+2]=m.z}this.addAttribute("position",new mt(d,3))}else if(t&&t.isBufferGeometry)if(null!==t.index){var g=t.index.array,o=t.attributes.position,y=t.groups,s=0;0===y.length&&t.addGroup(0,g.length);for(var c=new Uint32Array(2*g.length),x=0,_=y.length;x<_;++x)for(var w=y[x],b=w.start,M=w.count,u=b,E=b+M;u<E;u+=3)for(var f=0;f<3;f++){n[0]=g[u+f],n[1]=g[u+(f+1)%3],n.sort(e);var p=n.toString();void 0===r[p]&&(c[2*s]=n[0],c[2*s+1]=n[1],r[p]=!0,s++)}for(var d=new Float32Array(2*s*3),u=0,l=s;u<l;u++)for(var f=0;f<2;f++){var v=6*u+3*f,S=c[2*u+f];d[v+0]=o.getX(S),d[v+1]=o.getY(S),d[v+2]=o.getZ(S)}this.addAttribute("position",new mt(d,3))}else{for(var o=t.attributes.position.array,s=o.length/3,T=s/3,d=new Float32Array(2*s*3),u=0,l=T;u<l;u++)for(var f=0;f<3;f++){var v=18*u+6*f,A=9*u+3*f;d[v+0]=o[A],d[v+1]=o[A+1],d[v+2]=o[A+2];var S=9*u+3*((f+1)%3);d[v+3]=o[S],d[v+4]=o[S+1],d[v+5]=o[S+2]}this.addAttribute("position",new mt(d,3))}}function Re(t,e,r){Tt.call(this),this.type="ParametricGeometry",this.parameters={func:t,slices:e,stacks:r};var i,o,a,s,c,u=this.vertices,l=this.faces,h=this.faceVertexUvs[0],f=e+1;for(i=0;i<=r;i++)for(c=i/r,o=0;o<=e;o++)s=o/e,a=t(s,c),u.push(a);var p,d,m,v,g,y,x,_;for(i=0;i<r;i++)for(o=0;o<e;o++)p=i*f+o,d=i*f+o+1,m=(i+1)*f+o+1,v=(i+1)*f+o,g=new n(o/e,i/r),y=new n((o+1)/e,i/r),x=new n((o+1)/e,(i+1)/r),_=new n(o/e,(i+1)/r),l.push(new pt(p,d,v)),h.push([g,y,_]),l.push(new pt(d,m,v)),h.push([y.clone(),x,_.clone()]);this.computeFaceNormals(),this.computeVertexNormals()}function Ie(t,e,r,i){function o(t){var e=t.normalize().clone();e.index=f.vertices.push(e)-1;var r=c(t)/2/Math.PI+.5,i=l(t)/Math.PI+.5;return e.uv=new n(r,1-i),e}function a(t,e,n){var r=new pt(t.index,e.index,n.index,[t.clone(),e.clone(),n.clone()]);f.faces.push(r),w.copy(t).add(e).add(n).divideScalar(3);var i=c(w);f.faceVertexUvs[0].push([h(t.uv,t,i),h(e.uv,e,i),h(n.uv,n,i)])}function s(t,e){for(var n=Math.pow(2,e),r=o(f.vertices[t.a]),i=o(f.vertices[t.b]),s=o(f.vertices[t.c]),c=[],u=0;u<=n;u++){c[u]=[];for(var l=o(r.clone().lerp(s,u/n)),h=o(i.clone().lerp(s,u/n)),p=n-u,d=0;d<=p;d++)0===d&&u===n?c[u][d]=l:c[u][d]=o(l.clone().lerp(h,d/p))}for(var u=0;u<n;u++)for(var d=0;d<2*(n-u)-1;d++){var m=Math.floor(d/2);d%2===0?a(c[u][m+1],c[u+1][m],c[u][m]):a(c[u][m+1],c[u+1][m+1],c[u+1][m])}}function c(t){return Math.atan2(t.z,-t.x)}function l(t){return Math.atan2(-t.y,Math.sqrt(t.x*t.x+t.z*t.z))}function h(t,e,r){return r<0&&1===t.x&&(t=new n(t.x-1,t.y)),0===e.x&&0===e.z&&(t=new n(r/2/Math.PI+.5,t.y)),t.clone()}Tt.call(this),this.type="PolyhedronGeometry",this.parameters={vertices:t,indices:e,radius:r,detail:i},r=r||1,i=i||0;for(var f=this,p=0,d=t.length;p<d;p+=3)o(new u(t[p],t[p+1],t[p+2]));for(var m=this.vertices,v=[],p=0,g=0,d=e.length;p<d;p+=3,g++){var y=m[e[p]],x=m[e[p+1]],_=m[e[p+2]];v[g]=new pt(y.index,x.index,_.index,[y.clone(),x.clone(),_.clone()])}for(var w=new u,p=0,d=v.length;p<d;p++)s(v[p],i);for(var p=0,d=this.faceVertexUvs[0].length;p<d;p++){var b=this.faceVertexUvs[0][p],M=b[0].x,E=b[1].x,S=b[2].x,T=Math.max(M,E,S),A=Math.min(M,E,S);T>.9&&A<.1&&(M<.2&&(b[0].x+=1),E<.2&&(b[1].x+=1),S<.2&&(b[2].x+=1))}for(var p=0,d=this.vertices.length;p<d;p++)this.vertices[p].multiplyScalar(r);this.mergeVertices(),this.computeFaceNormals(),this.boundingSphere=new et(new u,r)}function Oe(t,e){var n=[1,1,1,-1,-1,1,-1,1,-1,1,-1,-1],r=[2,1,0,0,3,2,1,3,0,2,3,1];Ie.call(this,n,r,t,e),this.type="TetrahedronGeometry",this.parameters={radius:t,detail:e}}function Ue(t,e){var n=[1,0,0,-1,0,0,0,1,0,0,-1,0,0,0,1,0,0,-1],r=[0,2,4,0,4,3,0,3,5,0,5,2,1,2,5,1,5,3,1,3,4,1,4,2];Ie.call(this,n,r,t,e),this.type="OctahedronGeometry",this.parameters={radius:t,detail:e}}function Ne(t,e){var n=(1+Math.sqrt(5))/2,r=[-1,n,0,1,n,0,-1,-n,0,1,-n,0,0,-1,n,0,1,n,0,-1,-n,0,1,-n,n,0,-1,n,0,1,-n,0,-1,-n,0,1],i=[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];Ie.call(this,r,i,t,e),this.type="IcosahedronGeometry",this.parameters={radius:t,detail:e}}function Fe(t,e){var n=(1+Math.sqrt(5))/2,r=1/n,i=[-1,-1,-1,-1,-1,1,-1,1,-1,-1,1,1,1,-1,-1,1,-1,1,1,1,-1,1,1,1,0,-r,-n,0,-r,n,0,r,-n,0,r,n,-r,-n,0,-r,n,0,r,-n,0,r,n,0,-n,0,-r,n,0,-r,-n,0,r,n,0,r],o=[3,11,7,3,7,15,3,15,13,7,19,17,7,17,6,7,6,15,17,4,8,17,8,10,17,10,6,8,0,16,8,16,2,8,2,10,0,12,1,0,1,18,0,18,16,6,10,2,6,2,13,6,13,15,2,16,18,2,18,3,2,3,13,18,1,9,18,9,11,18,11,3,4,14,12,4,12,0,4,0,8,11,9,5,11,5,19,11,19,7,19,5,14,19,14,4,19,4,17,1,12,14,1,14,5,1,5,9];Ie.call(this,i,o,t,e),this.type="DodecahedronGeometry",this.parameters={radius:t,detail:e}}function De(t,e,r,i,o,a){function s(t,e,n){return R.vertices.push(new u(t,e,n))-1}Tt.call(this),this.type="TubeGeometry",this.parameters={path:t,segments:e,radius:r,radialSegments:i,closed:o,taper:a},e=e||64,r=r||1,i=i||8,o=o||!1,a=a||De.NoTaper;var c,l,h,f,p,d,m,v,g,y,x,_,w,b,M,E,S,T,A,L,C,P=[],R=this,I=e+1,O=new u,U=new De.FrenetFrames(t,e,o),N=U.tangents,F=U.normals,D=U.binormals;for(this.tangents=N,this.normals=F,this.binormals=D,y=0;y<I;y++)for(P[y]=[],f=y/(I-1),g=t.getPointAt(f),c=N[y],l=F[y],h=D[y],d=r*a(f),x=0;x<i;x++)p=x/i*2*Math.PI,m=-d*Math.cos(p),v=d*Math.sin(p),O.copy(g),O.x+=m*l.x+v*h.x,O.y+=m*l.y+v*h.y,O.z+=m*l.z+v*h.z,P[y][x]=s(O.x,O.y,O.z);for(y=0;y<e;y++)for(x=0;x<i;x++)_=o?(y+1)%e:y+1,w=(x+1)%i,b=P[y][x],M=P[_][x],E=P[_][w],S=P[y][w],T=new n(y/e,x/i),A=new n((y+1)/e,x/i),L=new n((y+1)/e,(x+1)/i),C=new n(y/e,(x+1)/i),this.faces.push(new pt(b,M,S)),this.faceVertexUvs[0].push([T,A,C]),this.faces.push(new pt(M,E,S)),this.faceVertexUvs[0].push([A.clone(),L,C.clone()]);this.computeFaceNormals(),this.computeVertexNormals()}function ze(t,e,r,i,o,a){function s(t,e,n,r,i){var o=Math.cos(t),a=Math.sin(t),s=n/e*t,c=Math.cos(s);i.x=r*(2+c)*.5*o,i.y=r*(2+c)*a*.5,i.z=r*Math.sin(s)*.5}Ct.call(this),this.type="TorusKnotBufferGeometry",this.parameters={radius:t,tube:e,tubularSegments:r,radialSegments:i,p:o,q:a},t=t||100,e=e||40,r=Math.floor(r)||64,i=Math.floor(i)||8,o=o||2,a=a||3;var c,l,h=(i+1)*(r+1),f=i*r*2*3,p=new mt(new(f>65535?Uint32Array:Uint16Array)(f),1),d=new mt(new Float32Array(3*h),3),m=new mt(new Float32Array(3*h),3),v=new mt(new Float32Array(2*h),2),g=0,y=0,x=new u,_=new u,w=new n,b=new u,M=new u,E=new u,S=new u,T=new u;for(c=0;c<=r;++c){var A=c/r*o*Math.PI*2;for(s(A,o,a,t,b),s(A+.01,o,a,t,M),S.subVectors(M,b),T.addVectors(M,b),E.crossVectors(S,T),T.crossVectors(E,S),E.normalize(),T.normalize(),l=0;l<=i;++l){var L=l/i*Math.PI*2,C=-e*Math.cos(L),P=e*Math.sin(L);x.x=b.x+(C*T.x+P*E.x),x.y=b.y+(C*T.y+P*E.y),x.z=b.z+(C*T.z+P*E.z),d.setXYZ(g,x.x,x.y,x.z),_.subVectors(x,b).normalize(),m.setXYZ(g,_.x,_.y,_.z),w.x=c/r,w.y=l/i,v.setXY(g,w.x,w.y),g++}}for(l=1;l<=r;l++)for(c=1;c<=i;c++){var R=(i+1)*(l-1)+(c-1),I=(i+1)*l+(c-1),O=(i+1)*l+c,U=(i+1)*(l-1)+c;p.setX(y,R),y++,p.setX(y,I),y++,p.setX(y,U),y++,p.setX(y,I),y++,p.setX(y,O),y++,p.setX(y,U),y++}this.setIndex(p),this.addAttribute("position",d),this.addAttribute("normal",m),this.addAttribute("uv",v)}function Be(t,e,n,r,i,o,a){Tt.call(this),this.type="TorusKnotGeometry",this.parameters={radius:t,tube:e,tubularSegments:n,radialSegments:r,p:i,q:o},void 0!==a&&console.warn("THREE.TorusKnotGeometry: heightScale has been deprecated. Use .scale( x, y, z ) instead."),this.fromBufferGeometry(new ze(t,e,n,r,i,o)),this.mergeVertices()}function ke(t,e,n,r,i){Ct.call(this),this.type="TorusBufferGeometry",this.parameters={radius:t,tube:e,radialSegments:n,tubularSegments:r,arc:i},t=t||100,e=e||40,n=Math.floor(n)||8,r=Math.floor(r)||6,i=i||2*Math.PI;var o,a,s=(n+1)*(r+1),c=n*r*2*3,l=new(c>65535?Uint32Array:Uint16Array)(c),h=new Float32Array(3*s),f=new Float32Array(3*s),p=new Float32Array(2*s),d=0,m=0,v=0,g=new u,y=new u,x=new u;for(o=0;o<=n;o++)for(a=0;a<=r;a++){var _=a/r*i,w=o/n*Math.PI*2;y.x=(t+e*Math.cos(w))*Math.cos(_),y.y=(t+e*Math.cos(w))*Math.sin(_),y.z=e*Math.sin(w),h[d]=y.x,h[d+1]=y.y,h[d+2]=y.z,g.x=t*Math.cos(_),g.y=t*Math.sin(_),x.subVectors(y,g).normalize(),f[d]=x.x,f[d+1]=x.y,f[d+2]=x.z,p[m]=a/r,p[m+1]=o/n,d+=3,m+=2}for(o=1;o<=n;o++)for(a=1;a<=r;a++){var b=(r+1)*o+a-1,M=(r+1)*(o-1)+a-1,E=(r+1)*(o-1)+a,S=(r+1)*o+a;l[v]=b,l[v+1]=M,l[v+2]=S,l[v+3]=M,l[v+4]=E,l[v+5]=S,v+=6}this.setIndex(new mt(l,1)),this.addAttribute("position",new mt(h,3)),this.addAttribute("normal",new mt(f,3)),this.addAttribute("uv",new mt(p,2))}function je(t,e,n,r,i){Tt.call(this),this.type="TorusGeometry",this.parameters={radius:t,tube:e,radialSegments:n,tubularSegments:r,arc:i},this.fromBufferGeometry(new ke(t,e,n,r,i))}function Ge(t,e){return"undefined"==typeof t?void(t=[]):(Tt.call(this),this.type="ExtrudeGeometry",t=Array.isArray(t)?t:[t],this.addShapeList(t,e),void this.computeFaceNormals())}function Ve(t,e){e=e||{};var n=e.font;if((n&&n.isFont)===!1)return console.error("THREE.TextGeometry: font parameter is not an instance of THREE.Font."),new Tt;var r=n.generateShapes(t,e.size,e.curveSegments);e.amount=void 0!==e.height?e.height:50,void 0===e.bevelThickness&&(e.bevelThickness=10),void 0===e.bevelSize&&(e.bevelSize=8),void 0===e.bevelEnabled&&(e.bevelEnabled=!1),Ge.call(this,r,e),this.type="TextGeometry"}function He(t,e,n,r,i,o,a){Ct.call(this),this.type="SphereBufferGeometry",this.parameters={radius:t,widthSegments:e,heightSegments:n,phiStart:r,phiLength:i,thetaStart:o,thetaLength:a},t=t||50,e=Math.max(3,Math.floor(e)||8),n=Math.max(2,Math.floor(n)||6),r=void 0!==r?r:0,i=void 0!==i?i:2*Math.PI,o=void 0!==o?o:0,a=void 0!==a?a:Math.PI;for(var s=o+a,c=(e+1)*(n+1),l=new mt(new Float32Array(3*c),3),h=new mt(new Float32Array(3*c),3),f=new mt(new Float32Array(2*c),2),p=0,d=[],m=new u,v=0;v<=n;v++){for(var g=[],y=v/n,x=0;x<=e;x++){var _=x/e,w=-t*Math.cos(r+_*i)*Math.sin(o+y*a),b=t*Math.cos(o+y*a),M=t*Math.sin(r+_*i)*Math.sin(o+y*a);m.set(w,b,M).normalize(),l.setXYZ(p,w,b,M),h.setXYZ(p,m.x,m.y,m.z),f.setXY(p,_,1-y),g.push(p),p++}d.push(g)}for(var E=[],v=0;v<n;v++)for(var x=0;x<e;x++){var S=d[v][x+1],T=d[v][x],A=d[v+1][x],L=d[v+1][x+1];(0!==v||o>0)&&E.push(S,T,L),(v!==n-1||s<Math.PI)&&E.push(T,A,L)}this.setIndex(new(l.count>65535?bt:_t)(E,1)),this.addAttribute("position",l),this.addAttribute("normal",h),this.addAttribute("uv",f),this.boundingSphere=new et(new u,t)}function We(t,e,n,r,i,o,a){Tt.call(this),this.type="SphereGeometry",this.parameters={radius:t,widthSegments:e,heightSegments:n,phiStart:r,phiLength:i,thetaStart:o,thetaLength:a},this.fromBufferGeometry(new He(t,e,n,r,i,o,a))}function Xe(t,e,r,i,o,a){Ct.call(this),this.type="RingBufferGeometry",this.parameters={innerRadius:t,outerRadius:e,thetaSegments:r,phiSegments:i,thetaStart:o,thetaLength:a},t=t||20,e=e||50,o=void 0!==o?o:0,a=void 0!==a?a:2*Math.PI,r=void 0!==r?Math.max(3,r):8,i=void 0!==i?Math.max(1,i):1;var s,c,l,h=(r+1)*(i+1),f=r*i*2*3,p=new mt(new(f>65535?Uint32Array:Uint16Array)(f),1),d=new mt(new Float32Array(3*h),3),m=new mt(new Float32Array(3*h),3),v=new mt(new Float32Array(2*h),2),g=0,y=0,x=t,_=(e-t)/i,w=new u,b=new n;for(c=0;c<=i;c++){for(l=0;l<=r;l++)s=o+l/r*a,w.x=x*Math.cos(s),w.y=x*Math.sin(s),d.setXYZ(g,w.x,w.y,w.z),m.setXYZ(g,0,0,1),b.x=(w.x/e+1)/2,b.y=(w.y/e+1)/2,v.setXY(g,b.x,b.y),g++;x+=_}for(c=0;c<i;c++){var M=c*(r+1);for(l=0;l<r;l++){s=l+M;var E=s,S=s+r+1,T=s+r+2,A=s+1;p.setX(y,E),y++,p.setX(y,S),y++,p.setX(y,T),y++,p.setX(y,E),y++,p.setX(y,T),y++,p.setX(y,A),y++}}this.setIndex(p),this.addAttribute("position",d),this.addAttribute("normal",m),this.addAttribute("uv",v)}function qe(t,e,n,r,i,o){Tt.call(this),this.type="RingGeometry",this.parameters={innerRadius:t,outerRadius:e,thetaSegments:n,phiSegments:r,thetaStart:i,thetaLength:o},this.fromBufferGeometry(new Xe(t,e,n,r,i,o))}function Ye(t,e,n,r){Tt.call(this),this.type="PlaneGeometry",this.parameters={width:t,height:e,widthSegments:n,heightSegments:r},this.fromBufferGeometry(new It(t,e,n,r))}function Ze(e,r,i,o){Ct.call(this),this.type="LatheBufferGeometry",this.parameters={points:e,segments:r,phiStart:i,phiLength:o},r=Math.floor(r)||12,i=i||0,o=o||2*Math.PI,o=t.Math.clamp(o,0,2*Math.PI);var a,s,c,l=(r+1)*e.length,h=r*e.length*2*3,f=new mt(new(h>65535?Uint32Array:Uint16Array)(h),1),p=new mt(new Float32Array(3*l),3),d=new mt(new Float32Array(2*l),2),m=0,v=0,g=1/r,y=new u,x=new n;for(s=0;s<=r;s++){var _=i+s*g*o,w=Math.sin(_),b=Math.cos(_);for(c=0;c<=e.length-1;c++)y.x=e[c].x*w,y.y=e[c].y,y.z=e[c].x*b,p.setXYZ(m,y.x,y.y,y.z),x.x=s/r,x.y=c/(e.length-1),d.setXY(m,x.x,x.y),m++}for(s=0;s<r;s++)for(c=0;c<e.length-1;c++){a=c+s*e.length;var M=a,E=a+e.length,S=a+e.length+1,T=a+1;f.setX(v,M),v++,f.setX(v,E),v++,f.setX(v,T),v++,f.setX(v,E),v++,f.setX(v,S),v++,f.setX(v,T),v++}if(this.setIndex(f),this.addAttribute("position",p),this.addAttribute("uv",d),this.computeVertexNormals(),o===2*Math.PI){var A=this.attributes.normal.array,L=new u,C=new u,P=new u;for(a=r*e.length*3,s=0,c=0;s<e.length;s++,c+=3)L.x=A[c+0],L.y=A[c+1],L.z=A[c+2],C.x=A[a+c+0],C.y=A[a+c+1],C.z=A[a+c+2],P.addVectors(L,C).normalize(),A[c+0]=A[a+c+0]=P.x,A[c+1]=A[a+c+1]=P.y,A[c+2]=A[a+c+2]=P.z}}function Je(t,e,n,r){Tt.call(this),this.type="LatheGeometry",this.parameters={points:t,segments:e,phiStart:n,phiLength:r},this.fromBufferGeometry(new Ze(t,e,n,r)),this.mergeVertices()}function $e(t,e){Tt.call(this),this.type="ShapeGeometry",Array.isArray(t)===!1&&(t=[t]),this.addShapeList(t,e),this.computeFaceNormals()}function Ke(e,n){function r(t,e){return t-e}Ct.call(this),n=void 0!==n?n:1;var i,o=Math.cos(t.Math.DEG2RAD*n),a=[0,0],s={},c=["a","b","c"];e&&e.isBufferGeometry?(i=new Tt,i.fromBufferGeometry(e)):i=e.clone(),i.mergeVertices(),i.computeFaceNormals();for(var u=i.vertices,l=i.faces,h=0,f=l.length;h<f;h++)for(var p=l[h],d=0;d<3;d++){a[0]=p[c[d]],a[1]=p[c[(d+1)%3]],a.sort(r);var m=a.toString();void 0===s[m]?s[m]={vert1:a[0],vert2:a[1],face1:h,face2:void 0}:s[m].face2=h}var v=[];for(var m in s){var g=s[m];if(void 0===g.face2||l[g.face1].normal.dot(l[g.face2].normal)<=o){var y=u[g.vert1];v.push(y.x),v.push(y.y),v.push(y.z),y=u[g.vert2],v.push(y.x),v.push(y.y),v.push(y.z)}}this.addAttribute("position",new mt(new Float32Array(v),3))}function Qe(t,e,r,i,o,a,s,c){function l(){var t=(i+1)*(o+1);return a===!1&&(t+=(i+1)*m+i*m),t}function h(){var t=i*o*2*3;return a===!1&&(t+=i*m*3),t}function f(){var n,a,l=new u,h=new u,f=0,p=(e-t)/r;for(a=0;a<=o;a++){var m=[],v=a/o,g=v*(e-t)+t;for(n=0;n<=i;n++){var A=n/i,L=A*c+s,C=Math.sin(L),P=Math.cos(L);h.x=g*C,h.y=-v*r+S,h.z=g*P,x.setXYZ(b,h.x,h.y,h.z),l.set(C,p,P).normalize(),_.setXYZ(b,l.x,l.y,l.z),w.setXY(b,A,1-v),m.push(b),b++}E.push(m)}for(n=0;n<i;n++)for(a=0;a<o;a++){var R=E[a][n],I=E[a+1][n],O=E[a+1][n+1],U=E[a][n+1];y.setX(M,R),M++,y.setX(M,I),M++,y.setX(M,U),M++,y.setX(M,I),M++,y.setX(M,O),M++,y.setX(M,U),M++,f+=6}d.addGroup(T,f,0),T+=f}function p(r){var o,a,l,h=new n,f=new u,p=0,m=r===!0?t:e,v=r===!0?1:-1;for(a=b,o=1;o<=i;o++)x.setXYZ(b,0,S*v,0),_.setXYZ(b,0,v,0),h.x=.5,h.y=.5,w.setXY(b,h.x,h.y),b++;for(l=b,o=0;o<=i;o++){var g=o/i,E=g*c+s,A=Math.cos(E),L=Math.sin(E);f.x=m*L,f.y=S*v,f.z=m*A,x.setXYZ(b,f.x,f.y,f.z),_.setXYZ(b,0,v,0),h.x=.5*A+.5,h.y=.5*L*v+.5,w.setXY(b,h.x,h.y),b++}for(o=0;o<i;o++){var C=a+o,P=l+o;r===!0?(y.setX(M,P),M++,y.setX(M,P+1),M++,y.setX(M,C),M++):(y.setX(M,P+1),M++,y.setX(M,P),M++,y.setX(M,C),M++),p+=3}d.addGroup(T,p,r===!0?1:2),T+=p}Ct.call(this),this.type="CylinderBufferGeometry",this.parameters={radiusTop:t,radiusBottom:e,height:r,radialSegments:i,heightSegments:o,openEnded:a,thetaStart:s,thetaLength:c};var d=this;t=void 0!==t?t:20,e=void 0!==e?e:20,r=void 0!==r?r:100,i=Math.floor(i)||8,o=Math.floor(o)||1,a=void 0!==a&&a,s=void 0!==s?s:0,c=void 0!==c?c:2*Math.PI;var m=0;a===!1&&(t>0&&m++,e>0&&m++);var v=l(),g=h(),y=new mt(new(g>65535?Uint32Array:Uint16Array)(g),1),x=new mt(new Float32Array(3*v),3),_=new mt(new Float32Array(3*v),3),w=new mt(new Float32Array(2*v),2),b=0,M=0,E=[],S=r/2,T=0;f(),a===!1&&(t>0&&p(!0),e>0&&p(!1)),this.setIndex(y),this.addAttribute("position",x),this.addAttribute("normal",_),this.addAttribute("uv",w)}function tn(t,e,n,r,i,o,a,s){Tt.call(this),this.type="CylinderGeometry",this.parameters={radiusTop:t,radiusBottom:e,height:n,radialSegments:r,heightSegments:i,openEnded:o,thetaStart:a,thetaLength:s},this.fromBufferGeometry(new Qe(t,e,n,r,i,o,a,s)),this.mergeVertices()}function en(t,e,n,r,i,o,a){tn.call(this,0,t,e,n,r,i,o,a),this.type="ConeGeometry",this.parameters={radius:t,height:e,radialSegments:n,heightSegments:r,openEnded:i,thetaStart:o,thetaLength:a}}function nn(t,e,n,r,i,o,a){Qe.call(this,0,t,e,n,r,i,o,a),this.type="ConeBufferGeometry",this.parameters={radius:t,height:e,radialSegments:n,heightSegments:r,thetaStart:o,thetaLength:a}}function rn(t,e,n,r){Ct.call(this),this.type="CircleBufferGeometry",this.parameters={radius:t,segments:e,thetaStart:n,thetaLength:r},t=t||50,e=void 0!==e?Math.max(3,e):8,n=void 0!==n?n:0,r=void 0!==r?r:2*Math.PI;var i=e+2,o=new Float32Array(3*i),a=new Float32Array(3*i),s=new Float32Array(2*i);a[2]=1,s[0]=.5,s[1]=.5;for(var c=0,l=3,h=2;c<=e;c++,l+=3,h+=2){var f=n+c/e*r;o[l]=t*Math.cos(f),o[l+1]=t*Math.sin(f),a[l+2]=1,s[h]=(o[l]/t+1)/2,s[h+1]=(o[l+1]/t+1)/2}for(var p=[],l=1;l<=e;l++)p.push(l,l+1,0);this.setIndex(new mt(new Uint16Array(p),1)),this.addAttribute("position",new mt(o,3)),this.addAttribute("normal",new mt(a,3)),this.addAttribute("uv",new mt(s,2)),this.boundingSphere=new et(new u,t)}function on(t,e,n,r){Tt.call(this),this.type="CircleGeometry",this.parameters={radius:t,segments:e,thetaStart:n,thetaLength:r},this.fromBufferGeometry(new rn(t,e,n,r))}function an(t,e,n,r,i,o){Tt.call(this),this.type="BoxGeometry",this.parameters={width:t,height:e,depth:n,widthSegments:r,heightSegments:i,depthSegments:o},this.fromBufferGeometry(new Rt(t,e,n,r,i,o)),this.mergeVertices()}function sn(){K.call(this,{uniforms:t.UniformsUtils.merge([Uc.lights,{opacity:{value:1}}]),vertexShader:Oc.shadow_vert,fragmentShader:Oc.shadow_frag}),this.lights=!0,this.transparent=!0,Object.defineProperties(this,{opacity:{enumerable:!0,get:function(){return this.uniforms.opacity.value},set:function(t){this.uniforms.opacity.value=t}}})}function cn(t){K.call(this,t),this.type="RawShaderMaterial"}function un(e){this.uuid=t.Math.generateUUID(),this.type="MultiMaterial",this.materials=e instanceof Array?e:[],this.visible=!0}function ln(t){J.call(this),this.defines={STANDARD:""},this.type="MeshStandardMaterial",this.color=new X(16777215),this.roughness=.5,this.metalness=.5,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new X(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalScale=new n(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.roughnessMap=null,this.metalnessMap=null,this.alphaMap=null,this.envMap=null,this.envMapIntensity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.skinning=!1,this.morphTargets=!1,this.morphNormals=!1,this.setValues(t)}function hn(t){ln.call(this),this.defines={PHYSICAL:""},this.type="MeshPhysicalMaterial",this.reflectivity=.5,this.clearCoat=0,this.clearCoatRoughness=0,this.setValues(t)}function fn(t){J.call(this),this.type="MeshPhongMaterial",this.color=new X(16777215),this.specular=new X(1118481),this.shininess=30,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new X(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalScale=new n(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=io,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.skinning=!1,this.morphTargets=!1,this.morphNormals=!1,this.setValues(t)}function pn(t){J.call(this,t),this.type="MeshNormalMaterial",this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.lights=!1,this.morphTargets=!1,this.setValues(t)}function dn(t){J.call(this),this.type="MeshLambertMaterial",this.color=new X(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new X(0),this.emissiveIntensity=1,this.emissiveMap=null,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=io,
  this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.skinning=!1,this.morphTargets=!1,this.morphNormals=!1,this.setValues(t)}function mn(t){J.call(this),this.type="LineDashedMaterial",this.color=new X(16777215),this.linewidth=1,this.scale=1,this.dashSize=3,this.gapSize=1,this.lights=!1,this.setValues(t)}function vn(t,e,n){var r=this,i=!1,o=0,a=0;this.onStart=void 0,this.onLoad=t,this.onProgress=e,this.onError=n,this.itemStart=function(t){a++,i===!1&&void 0!==r.onStart&&r.onStart(t,o,a),i=!0},this.itemEnd=function(t){o++,void 0!==r.onProgress&&r.onProgress(t,o,a),o===a&&(i=!1,void 0!==r.onLoad&&r.onLoad())},this.itemError=function(t){void 0!==r.onError&&r.onError(t)}}function gn(e){this.manager=void 0!==e?e:t.DefaultLoadingManager}function yn(e){this.manager=void 0!==e?e:t.DefaultLoadingManager,this._parser=null}function xn(e){this.manager=void 0!==e?e:t.DefaultLoadingManager,this._parser=null}function _n(e){this.manager=void 0!==e?e:t.DefaultLoadingManager}function wn(e){this.manager=void 0!==e?e:t.DefaultLoadingManager}function bn(e){this.manager=void 0!==e?e:t.DefaultLoadingManager}function Mn(t,e){ut.call(this),this.type="Light",this.color=new X(t),this.intensity=void 0!==e?e:1,this.receiveShadow=void 0}function En(t,e,n){Mn.call(this,t,n),this.type="HemisphereLight",this.castShadow=void 0,this.position.copy(ut.DefaultUp),this.updateMatrix(),this.groundColor=new X(e)}function Sn(t){this.camera=t,this.bias=0,this.radius=1,this.mapSize=new n(512,512),this.map=null,this.matrix=new l}function Tn(){Sn.call(this,new Ut(50,1,.5,500))}function An(t,e,n,r,i,o){Mn.call(this,t,e),this.type="SpotLight",this.position.copy(ut.DefaultUp),this.updateMatrix(),this.target=new ut,Object.defineProperty(this,"power",{get:function(){return this.intensity*Math.PI},set:function(t){this.intensity=t/Math.PI}}),this.distance=void 0!==n?n:0,this.angle=void 0!==r?r:Math.PI/3,this.penumbra=void 0!==i?i:0,this.decay=void 0!==o?o:1,this.shadow=new Tn}function Ln(t,e,n,r){Mn.call(this,t,e),this.type="PointLight",Object.defineProperty(this,"power",{get:function(){return 4*this.intensity*Math.PI},set:function(t){this.intensity=t/(4*Math.PI)}}),this.distance=void 0!==n?n:0,this.decay=void 0!==r?r:1,this.shadow=new Sn(new Ut(90,1,.5,500))}function Cn(t){Sn.call(this,new Nt((-5),5,5,(-5),.5,500))}function Pn(t,e){Mn.call(this,t,e),this.type="DirectionalLight",this.position.copy(ut.DefaultUp),this.updateMatrix(),this.target=new ut,this.shadow=new Cn}function Rn(t,e){Mn.call(this,t,e),this.type="AmbientLight",this.castShadow=void 0}function In(t,e,n,r){this.parameterPositions=t,this._cachedIndex=0,this.resultBuffer=void 0!==r?r:new e.constructor(n),this.sampleValues=e,this.valueSize=n}function On(t,e,n,r){In.call(this,t,e,n,r),this._weightPrev=-0,this._offsetPrev=-0,this._weightNext=-0,this._offsetNext=-0}function Un(t,e,n,r){In.call(this,t,e,n,r)}function Nn(t,e,n,r){In.call(this,t,e,n,r)}function Fn(e,n,r,i){if(void 0===e)throw new Error("track name is undefined");if(void 0===n||0===n.length)throw new Error("no keyframes in track named "+e);this.name=e,this.times=t.AnimationUtils.convertArray(n,this.TimeBufferType),this.values=t.AnimationUtils.convertArray(r,this.ValueBufferType),this.setInterpolation(i||this.DefaultInterpolation),this.validate(),this.optimize()}function Dn(t,e,n,r){Fn.call(this,t,e,n,r)}function zn(t,e,n,r){In.call(this,t,e,n,r)}function Bn(t,e,n,r){Fn.call(this,t,e,n,r)}function kn(t,e,n,r){Fn.call(this,t,e,n,r)}function jn(t,e,n,r){Fn.call(this,t,e,n,r)}function Gn(t,e,n){Fn.call(this,t,e,n)}function Vn(t,e,n,r){Fn.call(this,t,e,n,r)}function Hn(t,e,n,r){Fn.apply(this,arguments)}function Wn(e,n,r){this.name=e,this.tracks=r,this.duration=void 0!==n?n:-1,this.uuid=t.Math.generateUUID(),this.duration<0&&this.resetDuration(),this.optimize()}function Xn(e){this.manager=void 0!==e?e:t.DefaultLoadingManager,this.textures={}}function qn(e){this.manager=void 0!==e?e:t.DefaultLoadingManager}function Yn(){this.onLoadStart=function(){},this.onLoadProgress=function(){},this.onLoadComplete=function(){}}function Zn(e){"boolean"==typeof e&&(console.warn("THREE.JSONLoader: showStatus parameter has been removed from constructor."),e=void 0),this.manager=void 0!==e?e:t.DefaultLoadingManager,this.withCredentials=!1}function Jn(e){this.manager=void 0!==e?e:t.DefaultLoadingManager,this.texturePath=""}function $n(){}function Kn(t,e){this.v1=t,this.v2=e}function Qn(){this.curves=[],this.autoClose=!1}function tr(t,e,n,r,i,o,a,s){this.aX=t,this.aY=e,this.xRadius=n,this.yRadius=r,this.aStartAngle=i,this.aEndAngle=o,this.aClockwise=a,this.aRotation=s||0}function er(t){this.points=void 0===t?[]:t}function nr(t,e,n,r){this.v0=t,this.v1=e,this.v2=n,this.v3=r}function rr(t,e,n){this.v0=t,this.v1=e,this.v2=n}function ir(){or.apply(this,arguments),this.holes=[]}function or(t){Qn.call(this),this.currentPoint=new n,t&&this.fromPoints(t)}function ar(){this.subPaths=[],this.currentPath=null}function sr(t){this.data=t}function cr(e){this.manager=void 0!==e?e:t.DefaultLoadingManager}function ur(){return void 0===Wc&&(Wc=new(window.AudioContext||window.webkitAudioContext)),Wc}function lr(e){this.manager=void 0!==e?e:t.DefaultLoadingManager}function hr(){this.type="StereoCamera",this.aspect=1,this.eyeSep=.064,this.cameraL=new Ut,this.cameraL.layers.enable(1),this.cameraL.matrixAutoUpdate=!1,this.cameraR=new Ut,this.cameraR.layers.enable(2),this.cameraR.matrixAutoUpdate=!1}function fr(t,e,n){ut.call(this),this.type="CubeCamera";var r=90,i=1,o=new Ut(r,i,t,e);o.up.set(0,-1,0),o.lookAt(new u(1,0,0)),this.add(o);var a=new Ut(r,i,t,e);a.up.set(0,-1,0),a.lookAt(new u((-1),0,0)),this.add(a);var c=new Ut(r,i,t,e);c.up.set(0,0,1),c.lookAt(new u(0,1,0)),this.add(c);var l=new Ut(r,i,t,e);l.up.set(0,0,-1),l.lookAt(new u(0,(-1),0)),this.add(l);var h=new Ut(r,i,t,e);h.up.set(0,-1,0),h.lookAt(new u(0,0,1)),this.add(h);var f=new Ut(r,i,t,e);f.up.set(0,-1,0),f.lookAt(new u(0,0,(-1))),this.add(f);var p={format:Xo,magFilter:Co,minFilter:Co};this.renderTarget=new s(n,n,p),this.updateCubeMap=function(t,e){null===this.parent&&this.updateMatrixWorld();var n=this.renderTarget,r=n.texture.generateMipmaps;n.texture.generateMipmaps=!1,n.activeCubeFace=0,t.render(e,o,n),n.activeCubeFace=1,t.render(e,a,n),n.activeCubeFace=2,t.render(e,c,n),n.activeCubeFace=3,t.render(e,l,n),n.activeCubeFace=4,t.render(e,h,n),n.texture.generateMipmaps=r,n.activeCubeFace=5,t.render(e,f,n),t.setRenderTarget(null)}}function pr(){ut.call(this),this.type="AudioListener",this.context=ur(),this.gain=this.context.createGain(),this.gain.connect(this.context.destination),this.filter=null}function dr(t){ut.call(this),this.type="Audio",this.context=t.context,this.source=this.context.createBufferSource(),this.source.onended=this.onEnded.bind(this),this.gain=this.context.createGain(),this.gain.connect(t.getInput()),this.autoplay=!1,this.startTime=0,this.playbackRate=1,this.isPlaying=!1,this.hasPlaybackControl=!0,this.sourceType="empty",this.filters=[]}function mr(t){dr.call(this,t),this.panner=this.context.createPanner(),this.panner.connect(this.gain)}function vr(t,e){this.analyser=t.context.createAnalyser(),this.analyser.fftSize=void 0!==e?e:2048,this.data=new Uint8Array(this.analyser.frequencyBinCount),t.getOutput().connect(this.analyser)}function gr(t,e,n){this.binding=t,this.valueSize=n;var r,i=Float64Array;switch(e){case"quaternion":r=this._slerp;break;case"string":case"bool":i=Array,r=this._select;break;default:r=this._lerp}this.buffer=new i(4*n),this._mixBufferRegion=r,this.cumulativeWeight=0,this.useCount=0,this.referenceCount=0}function yr(t,e,n){this.path=e,this.parsedPath=n||yr.parseTrackName(e),this.node=yr.findNode(t,this.parsedPath.nodeName)||t,this.rootNode=t}function xr(e){this.uuid=t.Math.generateUUID(),this._objects=Array.prototype.slice.call(arguments),this.nCachedObjects_=0;var n={};this._indicesByUUID=n;for(var r=0,i=arguments.length;r!==i;++r)n[arguments[r].uuid]=r;this._paths=[],this._parsedPaths=[],this._bindings=[],this._bindingsIndicesByPath={};var o=this;this.stats={objects:{get total(){return o._objects.length},get inUse(){return this.total-o.nCachedObjects_}},get bindingsPerObject(){return o._bindings.length}}}function _r(t,e,n){this._mixer=t,this._clip=e,this._localRoot=n||null;for(var r=e.tracks,i=r.length,o=new Array(i),a={endingStart:da,endingEnd:da},s=0;s!==i;++s){var c=r[s].createInterpolant(null);o[s]=c,c.settings=a}this._interpolantSettings=a,this._interpolants=o,this._propertyBindings=new Array(i),this._cacheIndex=null,this._byClipCacheIndex=null,this._timeScaleInterpolant=null,this._weightInterpolant=null,this.loop=ua,this._loopCount=-1,this._startTime=null,this.time=0,this.timeScale=1,this._effectiveTimeScale=1,this.weight=1,this._effectiveWeight=1,this.repetitions=1/0,this.paused=!1,this.enabled=!0,this.clampWhenFinished=!1,this.zeroSlopeAtStart=!0,this.zeroSlopeAtEnd=!0}function wr(t){this._root=t,this._initMemoryManager(),this._accuIndex=0,this.time=0,this.timeScale=1}function br(t){"string"==typeof t&&(console.warn("THREE.Uniform: Type parameter is no longer needed."),t=arguments[1]),this.value=t,this.dynamic=!1}function Mr(){Ct.call(this),this.type="InstancedBufferGeometry",this.maxInstancedCount=void 0}function Er(e,n,r,i){this.uuid=t.Math.generateUUID(),this.data=e,this.itemSize=n,this.offset=r,this.normalized=i===!0}function Sr(e,n){this.uuid=t.Math.generateUUID(),this.array=e,this.stride=n,this.count=void 0!==e?e.length/n:0,this.dynamic=!1,this.updateRange={offset:0,count:-1},this.version=0}function Tr(t,e,n){Sr.call(this,t,e),this.meshPerAttribute=n||1}function Ar(t,e,n){mt.call(this,t,e),this.meshPerAttribute=n||1}function Lr(t,e,n,r){this.ray=new at(t,e),this.near=n||0,this.far=r||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 Cr(t,e){return t.distance-e.distance}function Pr(t,e,n,r){if(t.visible!==!1&&(t.raycast(e,n),r===!0))for(var i=t.children,o=0,a=i.length;o<a;o++)Pr(i[o],e,n,!0)}function Rr(t){this.autoStart=void 0===t||t,this.startTime=0,this.oldTime=0,this.elapsedTime=0,this.running=!1}function Ir(t){function e(t,e,n,r,i,o,a){var s=.5*(n-t),c=.5*(r-e);return(2*(e-n)+s+c)*a+(-3*(e-n)-2*s-c)*o+s*i+e}this.points=t;var n,r,i,o,a,s,c,l,h,f=[],p={x:0,y:0,z:0};this.initFromArray=function(t){this.points=[];for(var e=0;e<t.length;e++)this.points[e]={x:t[e][0],y:t[e][1],z:t[e][2]}},this.getPoint=function(t){return n=(this.points.length-1)*t,r=Math.floor(n),i=n-r,f[0]=0===r?r:r-1,f[1]=r,f[2]=r>this.points.length-2?this.points.length-1:r+1,f[3]=r>this.points.length-3?this.points.length-1:r+2,s=this.points[f[0]],c=this.points[f[1]],l=this.points[f[2]],h=this.points[f[3]],o=i*i,a=i*o,p.x=e(s.x,c.x,l.x,h.x,i,o,a),p.y=e(s.y,c.y,l.y,h.y,i,o,a),p.z=e(s.z,c.z,l.z,h.z,i,o,a),p},this.getControlPointsArray=function(){var t,e,n=this.points.length,r=[];for(t=0;t<n;t++)e=this.points[t],r[t]=[e.x,e.y,e.z];return r},this.getLength=function(t){var e,n,r,i,o=0,a=0,s=0,c=new u,l=new u,h=[],f=0;for(h[0]=0,t||(t=100),r=this.points.length*t,c.copy(this.points[0]),e=1;e<r;e++)n=e/r,i=this.getPoint(n),l.copy(i),f+=l.distanceTo(c),c.copy(i),o=(this.points.length-1)*n,a=Math.floor(o),a!==s&&(h[a]=f,s=a);return h[h.length]=f,{chunks:h,total:f}},this.reparametrizeByArcLength=function(t){var e,n,r,i,o,a,s,c,l=[],h=new u,f=this.getLength();for(l.push(h.copy(this.points[0]).clone()),e=1;e<this.points.length;e++){for(a=f.chunks[e]-f.chunks[e-1],s=Math.ceil(t*a/f.total),i=(e-1)/(this.points.length-1),o=e/(this.points.length-1),n=1;n<s-1;n++)r=i+n*(1/s)*(o-i),c=this.getPoint(r),l.push(h.copy(c).clone());l.push(h.copy(this.points[e]).clone())}this.points=l}}function Or(t,e,n){return this.radius=void 0!==t?t:1,this.phi=void 0!==e?e:0,this.theta=void 0!==n?n:0,this}function Ur(t,e){Pt.call(this,t,e),this.animationsMap={},this.animationsList=[];var n=this.geometry.morphTargets.length,r="__default",i=0,o=n-1,a=n/1;this.createAnimation(r,i,o,a),this.setAnimationWeight(r,1)}function Nr(t){ut.call(this),this.material=t,this.render=function(t){}}function Fr(t,e,n,r){this.object=t,this.size=void 0!==e?e:1;var i=void 0!==n?n:16711680,o=void 0!==r?r:1,a=0,s=this.object.geometry;s&&s.isGeometry?a=3*s.faces.length:s&&s.isBufferGeometry&&(a=s.attributes.normal.count);var c=new Ct,u=new Mt(2*a*3,3);c.addAttribute("position",u),be.call(this,c,new _e({color:i,linewidth:o})),this.matrixAutoUpdate=!1,this.update()}function Dr(t){ut.call(this),this.light=t,this.light.updateMatrixWorld(),this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1;for(var e=new Ct,n=[0,0,0,0,0,1,0,0,0,1,0,1,0,0,0,-1,0,1,0,0,0,0,1,1,0,0,0,0,-1,1],r=0,i=1,o=32;r<o;r++,i++){var a=r/o*Math.PI*2,s=i/o*Math.PI*2;n.push(Math.cos(a),Math.sin(a),1,Math.cos(s),Math.sin(s),1)}e.addAttribute("position",new Mt(n,3));var c=new _e({fog:!1});this.cone=new be(e,c),this.add(this.cone),this.update()}function zr(t){this.bones=this.getBoneList(t);for(var e=new Tt,n=0;n<this.bones.length;n++){var r=this.bones[n];r.parent&&r.parent.isBone&&(e.vertices.push(new u),e.vertices.push(new u),e.colors.push(new X(0,0,1)),e.colors.push(new X(0,1,0)))}e.dynamic=!0;var i=new _e({vertexColors:Ti,depthTest:!1,depthWrite:!1,transparent:!0});be.call(this,e,i),this.root=t,this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1,this.update()}function Br(t,e){this.light=t,this.light.updateMatrixWorld();var n=new He(e,4,2),r=new dt({wireframe:!0,fog:!1});r.color.copy(this.light.color).multiplyScalar(this.light.intensity),Pt.call(this,n,r),this.matrix=this.light.matrixWorld,this.matrixAutoUpdate=!1}function kr(t,e){ut.call(this),this.light=t,this.light.updateMatrixWorld(),this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1,this.colors=[new X,new X];var n=new We(e,4,2);n.rotateX(-Math.PI/2);for(var r=0,i=8;r<i;r++)n.faces[r].color=this.colors[r<4?0:1];var o=new dt({vertexColors:Si,wireframe:!0});this.lightSphere=new Pt(n,o),this.add(this.lightSphere),this.update()}function jr(t,e,n,r){e=e||1,n=new X(void 0!==n?n:4473924),r=new X(void 0!==r?r:8947848);for(var i=e/2,o=2*t/e,a=[],s=[],c=0,u=0,l=-t;c<=e;c++,l+=o){a.push(-t,0,l,t,0,l),a.push(l,0,-t,l,0,t);var h=c===i?n:r;h.toArray(s,u),u+=3,h.toArray(s,u),u+=3,h.toArray(s,u),u+=3,h.toArray(s,u),u+=3}var f=new Ct;f.addAttribute("position",new Mt(a,3)),f.addAttribute("color",new Mt(s,3));var p=new _e({vertexColors:Ti});be.call(this,f,p)}function Gr(t,e,n,r){this.object=t,this.size=void 0!==e?e:1;var i=void 0!==n?n:16776960,o=void 0!==r?r:1,a=0,s=this.object.geometry;s&&s.isGeometry?a=s.faces.length:console.warn("THREE.FaceNormalsHelper: only THREE.Geometry is supported. Use THREE.VertexNormalsHelper, instead.");var c=new Ct,u=new Mt(2*a*3,3);c.addAttribute("position",u),be.call(this,c,new _e({color:i,linewidth:o})),this.matrixAutoUpdate=!1,this.update()}function Vr(t,e){ut.call(this),this.light=t,this.light.updateMatrixWorld(),this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1,void 0===e&&(e=1);var n=new Ct;n.addAttribute("position",new Mt([-e,e,0,e,e,0,e,-e,0,-e,-e,0,-e,e,0],3));var r=new _e({fog:!1});this.add(new we(n,r)),n=new Ct,n.addAttribute("position",new Mt([0,0,0,0,0,1],3)),this.add(new we(n,r)),this.update()}function Hr(t){function e(t,e,r){n(t,r),n(e,r)}function n(t,e){r.vertices.push(new u),r.colors.push(new X(e)),void 0===o[t]&&(o[t]=[]),o[t].push(r.vertices.length-1)}var r=new Tt,i=new _e({color:16777215,vertexColors:Si}),o={},a=16755200,s=16711680,c=43775,l=16777215,h=3355443;e("n1","n2",a),e("n2","n4",a),e("n4","n3",a),e("n3","n1",a),e("f1","f2",a),e("f2","f4",a),e("f4","f3",a),e("f3","f1",a),e("n1","f1",a),e("n2","f2",a),e("n3","f3",a),e("n4","f4",a),e("p","n1",s),e("p","n2",s),e("p","n3",s),e("p","n4",s),e("u1","u2",c),e("u2","u3",c),e("u3","u1",c),e("c","t",l),e("p","c",h),e("cn1","cn2",h),e("cn3","cn4",h),e("cf1","cf2",h),e("cf3","cf4",h),be.call(this,r,i),this.camera=t,this.camera.updateProjectionMatrix&&this.camera.updateProjectionMatrix(),this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1,this.pointMap=o,this.update()}function Wr(t,e){var n=void 0!==e?e:8947848;this.object=t,this.box=new tt,Pt.call(this,new an(1,1,1),new dt({color:n,wireframe:!0}))}function Xr(t,e){void 0===e&&(e=16776960);var n=new Uint16Array([0,1,1,2,2,3,3,0,4,5,5,6,6,7,7,4,0,4,1,5,2,6,3,7]),r=new Float32Array(24),i=new Ct;i.setIndex(new mt(n,1)),i.addAttribute("position",new mt(r,3)),be.call(this,i,new _e({color:e})),void 0!==t&&this.update(t)}function qr(t,e,n,r,i,o){ut.call(this),void 0===r&&(r=16776960),void 0===n&&(n=1),void 0===i&&(i=.2*n),void 0===o&&(o=.2*i),this.position.copy(e),this.line=new we(Xc,new _e({color:r})),this.line.matrixAutoUpdate=!1,this.add(this.line),this.cone=new Pt(qc,new dt({color:r})),this.cone.matrixAutoUpdate=!1,this.add(this.cone),this.setDirection(t),this.setLength(n,i,o)}function Yr(t){t=t||1;var e=new Float32Array([0,0,0,t,0,0,0,0,0,0,t,0,0,0,0,0,0,t]),n=new Float32Array([1,0,0,1,.6,0,0,1,0,.6,1,0,0,0,1,0,.6,1]),r=new Ct;r.addAttribute("position",new mt(e,3)),r.addAttribute("color",new mt(n,3));var i=new _e({vertexColors:Ti});be.call(this,r,i)}function Zr(e){console.warn("THREE.ClosedSplineCurve3 has been deprecated. Please use THREE.CatmullRomCurve3."),t.CatmullRomCurve3.call(this,e),this.type="catmullrom",this.closed=!0}function Jr(t,e,n,r,i,o){tr.call(this,t,e,n,n,r,i,o)}function $r(t,e,n,r,i,o,a){return console.warn("THREE.Face4 has been removed. A THREE.Face3 will be created instead."),new pt(t,e,n,i,o,a)}function Kr(t,e){return console.warn("THREE.PointCloud has been renamed to THREE.Points."),new Ee(t,e)}function Qr(t,e){return console.warn("THREE.ParticleSystem has been renamed to THREE.Points."),new Ee(t,e)}function ti(t){return console.warn("THREE.PointCloudMaterial has been renamed to THREE.PointsMaterial."),new Me(t)}function ei(t){return console.warn("THREE.ParticleBasicMaterial has been renamed to THREE.PointsMaterial."),new Me(t)}function ni(t){return console.warn("THREE.ParticleSystemMaterial has been renamed to THREE.PointsMaterial."),new Me(t)}function ri(t,e,n){return console.warn("THREE.Vertex has been removed. Use THREE.Vector3 instead."),new u(t,e,n)}function ii(t,e){return console.warn("THREE.EdgesHelper has been removed. Use THREE.EdgesGeometry instead."),new be(new Ke(t.geometry),new _e({color:void 0!==e?e:16777215}))}function oi(t,e){return console.warn("THREE.WireframeHelper has been removed. Use THREE.WireframeGeometry instead."),new be(new Pe(t.geometry),new _e({color:void 0!==e?e:16777215}))}function ai(){console.error("THREE.Projector has been moved to /examples/js/renderers/Projector.js."),this.projectVector=function(t,e){console.warn("THREE.Projector: .projectVector() is now vector.project()."),t.project(e)},this.unprojectVector=function(t,e){console.warn("THREE.Projector: .unprojectVector() is now vector.unproject()."),t.unproject(e)},this.pickingRay=function(t,e){console.error("THREE.Projector: .pickingRay() is now raycaster.setFromCamera().")}}function si(){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(){}}void 0===Number.EPSILON&&(Number.EPSILON=Math.pow(2,-52)),void 0===Math.sign&&(Math.sign=function(t){return t<0?-1:t>0?1:+t}),void 0===Function.prototype.name&&Object.defineProperty(Function.prototype,"name",{get:function(){return this.toString().match(/^\s*function\s*(\S*)\s*\(/)[1]}}),void 0===Object.assign&&!function(){Object.assign=function(t){if(void 0===t||null===t)throw new TypeError("Cannot convert undefined or null to object");for(var e=Object(t),n=1;n<arguments.length;n++){var r=arguments[n];if(void 0!==r&&null!==r)for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(e[i]=r[i])}return e}}(),Object.assign(e.prototype,{addEventListener:function(t,e){void 0===this._listeners&&(this._listeners={});var n=this._listeners;void 0===n[t]&&(n[t]=[]),n[t].indexOf(e)===-1&&n[t].push(e)},hasEventListener:function(t,e){if(void 0===this._listeners)return!1;var n=this._listeners;return void 0!==n[t]&&n[t].indexOf(e)!==-1},removeEventListener:function(t,e){if(void 0!==this._listeners){var n=this._listeners,r=n[t];if(void 0!==r){var i=r.indexOf(e);i!==-1&&r.splice(i,1)}}},dispatchEvent:function(t){if(void 0!==this._listeners){var e=this._listeners,n=e[t.type];if(void 0!==n){t.target=this;var r=[],i=0,o=n.length;for(i=0;i<o;i++)r[i]=n[i];for(i=0;i<o;i++)r[i].call(this,t)}}}});var ci="81",ui={LEFT:0,MIDDLE:1,RIGHT:2},li=0,hi=1,fi=2,pi=3,di=0,mi=1,vi=0,gi=1,yi=2,xi=0,_i=1,wi=2,bi=1,Mi=2,Ei=0,Si=1,Ti=2,Ai=0,Li=1,Ci=2,Pi=3,Ri=4,Ii=5,Oi={NoBlending:Ai,NormalBlending:Li,AdditiveBlending:Ci,SubtractiveBlending:Pi,MultiplyBlending:Ri,CustomBlending:Ii},Ui=100,Ni=101,Fi=102,Di=103,zi=104,Bi=200,ki=201,ji=202,Gi=203,Vi=204,Hi=205,Wi=206,Xi=207,qi=208,Yi=209,Zi=210,Ji=0,$i=1,Ki=2,Qi=3,to=4,eo=5,no=6,ro=7,io=0,oo=1,ao=2,so=0,co=1,uo=2,lo=3,ho=4,fo=300,po=301,mo=302,vo=303,go=304,yo=305,xo=306,_o=307,wo={UVMapping:fo,CubeReflectionMapping:po,CubeRefractionMapping:mo,EquirectangularReflectionMapping:vo,EquirectangularRefractionMapping:go,SphericalReflectionMapping:yo,CubeUVReflectionMapping:xo,CubeUVRefractionMapping:_o},bo=1e3,Mo=1001,Eo=1002,So={RepeatWrapping:bo,ClampToEdgeWrapping:Mo,MirroredRepeatWrapping:Eo},To=1003,Ao=1004,Lo=1005,Co=1006,Po=1007,Ro=1008,Io={NearestFilter:To,NearestMipMapNearestFilter:Ao,NearestMipMapLinearFilter:Lo,LinearFilter:Co,LinearMipMapNearestFilter:Po,LinearMipMapLinearFilter:Ro},Oo=1009,Uo=1010,No=1011,Fo=1012,Do=1013,zo=1014,Bo=1015,ko=1016,jo=1017,Go=1018,Vo=1019,Ho=1020,Wo=1021,Xo=1022,qo=1023,Yo=1024,Zo=1025,Jo=qo,$o=1026,Ko=1027,Qo=2001,ta=2002,ea=2003,na=2004,ra=2100,ia=2101,oa=2102,aa=2103,sa=2151,ca=2200,ua=2201,la=2202,ha=2300,fa=2301,pa=2302,da=2400,ma=2401,va=2402,ga=0,ya=1,xa=2,_a=3e3,wa=3001,ba=3007,Ma=3002,Ea=3003,Sa=3004,Ta=3005,Aa=3006,La=3200,Ca=3201;t.Math={DEG2RAD:Math.PI/180,RAD2DEG:180/Math.PI,generateUUID:function(){var t,e="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split(""),n=new Array(36),r=0;return function(){for(var i=0;i<36;i++)8===i||13===i||18===i||23===i?n[i]="-":14===i?n[i]="4":(r<=2&&(r=33554432+16777216*Math.random()|0),t=15&r,r>>=4,n[i]=e[19===i?3&t|8:t]);return n.join("")}}(),clamp:function(t,e,n){return Math.max(e,Math.min(n,t))},euclideanModulo:function(t,e){return(t%e+e)%e},mapLinear:function(t,e,n,r,i){return r+(t-e)*(i-r)/(n-e)},smoothstep:function(t,e,n){return t<=e?0:t>=n?1:(t=(t-e)/(n-e),t*t*(3-2*t))},smootherstep:function(t,e,n){return t<=e?0:t>=n?1:(t=(t-e)/(n-e),t*t*t*(t*(6*t-15)+10))},random16:function(){return console.warn("THREE.Math.random16() has been deprecated. Use Math.random() instead."),Math.random()},randInt:function(t,e){return t+Math.floor(Math.random()*(e-t+1))},randFloat:function(t,e){return t+Math.random()*(e-t)},randFloatSpread:function(t){return t*(.5-Math.random())},degToRad:function(e){return e*t.Math.DEG2RAD},radToDeg:function(e){return e*t.Math.RAD2DEG},isPowerOfTwo:function(t){return 0===(t&t-1)&&0!==t},nearestPowerOfTwo:function(t){return Math.pow(2,Math.round(Math.log(t)/Math.LN2))},nextPowerOfTwo:function(t){return t--,t|=t>>1,t|=t>>2,t|=t>>4,t|=t>>8,t|=t>>16,t++,t}},n.prototype={constructor:n,isVector2:!0,get width(){return this.x},set width(t){this.x=t},get height(){return this.y},set height(t){this.y=t},set:function(t,e){return this.x=t,this.y=e,this},setScalar:function(t){return this.x=t,this.y=t,this},setX:function(t){return this.x=t,this},setY:function(t){return this.y=t,this},setComponent:function(t,e){switch(t){case 0:this.x=e;break;case 1:this.y=e;break;default:throw new Error("index is out of range: "+t)}},getComponent:function(t){switch(t){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+t)}},clone:function(){return new this.constructor(this.x,this.y)},copy:function(t){return this.x=t.x,this.y=t.y,this},add:function(t,e){return void 0!==e?(console.warn("THREE.Vector2: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(t,e)):(this.x+=t.x,this.y+=t.y,this)},addScalar:function(t){return this.x+=t,this.y+=t,this},addVectors:function(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this},addScaledVector:function(t,e){return this.x+=t.x*e,this.y+=t.y*e,this},sub:function(t,e){return void 0!==e?(console.warn("THREE.Vector2: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(t,e)):(this.x-=t.x,this.y-=t.y,this)},subScalar:function(t){return this.x-=t,this.y-=t,this},subVectors:function(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this},multiply:function(t){return this.x*=t.x,this.y*=t.y,this},multiplyScalar:function(t){return isFinite(t)?(this.x*=t,this.y*=t):(this.x=0,this.y=0),this},divide:function(t){return this.x/=t.x,this.y/=t.y,this},divideScalar:function(t){return this.multiplyScalar(1/t)},min:function(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this},max:function(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this},clamp:function(t,e){return this.x=Math.max(t.x,Math.min(e.x,this.x)),this.y=Math.max(t.y,Math.min(e.y,this.y)),this},clampScalar:function(){var t,e;return function(r,i){return void 0===t&&(t=new n,e=new n),t.set(r,r),e.set(i,i),this.clamp(t,e)}}(),clampLength:function(t,e){var n=this.length();return this.multiplyScalar(Math.max(t,Math.min(e,n))/n)},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(t){return this.x*t.x+this.y*t.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)},lengthManhattan:function(){return Math.abs(this.x)+Math.abs(this.y)},normalize:function(){return this.divideScalar(this.length())},angle:function(){var t=Math.atan2(this.y,this.x);return t<0&&(t+=2*Math.PI),t},distanceTo:function(t){return Math.sqrt(this.distanceToSquared(t))},distanceToSquared:function(t){var e=this.x-t.x,n=this.y-t.y;return e*e+n*n},distanceToManhattan:function(t){return Math.abs(this.x-t.x)+Math.abs(this.y-t.y)},setLength:function(t){return this.multiplyScalar(t/this.length())},lerp:function(t,e){return this.x+=(t.x-this.x)*e,this.y+=(t.y-this.y)*e,this},lerpVectors:function(t,e,n){return this.subVectors(e,t).multiplyScalar(n).add(t)},equals:function(t){return t.x===this.x&&t.y===this.y},fromArray:function(t,e){return void 0===e&&(e=0),this.x=t[e],this.y=t[e+1],this},toArray:function(t,e){return void 0===t&&(t=[]),void 0===e&&(e=0),t[e]=this.x,t[e+1]=this.y,t},fromAttribute:function(t,e,n){return void 0===n&&(n=0),e=e*t.itemSize+n,this.x=t.array[e],this.y=t.array[e+1],this},rotateAround:function(t,e){var n=Math.cos(e),r=Math.sin(e),i=this.x-t.x,o=this.y-t.y;return this.x=i*n-o*r+t.x,this.y=i*r+o*n+t.y,this}},r.DEFAULT_IMAGE=void 0,r.DEFAULT_MAPPING=fo,r.prototype={constructor:r,isTexture:!0,set needsUpdate(t){t===!0&&this.version++},clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.image=t.image,this.mipmaps=t.mipmaps.slice(0),this.mapping=t.mapping,this.wrapS=t.wrapS,this.wrapT=t.wrapT,this.magFilter=t.magFilter,this.minFilter=t.minFilter,this.anisotropy=t.anisotropy,this.format=t.format,this.type=t.type,this.offset.copy(t.offset),this.repeat.copy(t.repeat),this.generateMipmaps=t.generateMipmaps,this.premultiplyAlpha=t.premultiplyAlpha,this.flipY=t.flipY,this.unpackAlignment=t.unpackAlignment,this.encoding=t.encoding,this},toJSON:function(e){function n(t){var e;return void 0!==t.toDataURL?e=t:(e=document.createElementNS("http://www.w3.org/1999/xhtml","canvas"),e.width=t.width,e.height=t.height,e.getContext("2d").drawImage(t,0,0,t.width,t.height)),e.width>2048||e.height>2048?e.toDataURL("image/jpeg",.6):e.toDataURL("image/png")}if(void 0!==e.textures[this.uuid])return e.textures[this.uuid];var r={metadata:{version:4.4,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],wrap:[this.wrapS,this.wrapT],minFilter:this.minFilter,magFilter:this.magFilter,anisotropy:this.anisotropy,flipY:this.flipY};if(void 0!==this.image){var i=this.image;void 0===i.uuid&&(i.uuid=t.Math.generateUUID()),void 0===e.images[i.uuid]&&(e.images[i.uuid]={uuid:i.uuid,url:n(i)}),r.image=i.uuid}return e.textures[this.uuid]=r,r},dispose:function(){this.dispatchEvent({type:"dispose"})},transformUv:function(t){if(this.mapping===fo){if(t.multiply(this.repeat),t.add(this.offset),t.x<0||t.x>1)switch(this.wrapS){case bo:t.x=t.x-Math.floor(t.x);break;case Mo:t.x=t.x<0?0:1;break;case Eo:1===Math.abs(Math.floor(t.x)%2)?t.x=Math.ceil(t.x)-t.x:t.x=t.x-Math.floor(t.x)}if(t.y<0||t.y>1)switch(this.wrapT){case bo:t.y=t.y-Math.floor(t.y);break;case Mo:t.y=t.y<0?0:1;break;case Eo:1===Math.abs(Math.floor(t.y)%2)?t.y=Math.ceil(t.y)-t.y:t.y=t.y-Math.floor(t.y)}this.flipY&&(t.y=1-t.y)}}},Object.assign(r.prototype,e.prototype);var Pa=0;o.prototype={constructor:o,isVector4:!0,set:function(t,e,n,r){return this.x=t,this.y=e,this.z=n,this.w=r,this},setScalar:function(t){return this.x=t,this.y=t,this.z=t,this.w=t,this},setX:function(t){return this.x=t,this},setY:function(t){return this.y=t,this},setZ:function(t){return this.z=t,this},setW:function(t){return this.w=t,this},setComponent:function(t,e){switch(t){case 0:this.x=e;break;case 1:this.y=e;break;case 2:this.z=e;break;case 3:this.w=e;break;default:throw new Error("index is out of range: "+t)}},getComponent:function(t){switch(t){case 0:return this.x;case 1:return this.y;case 2:return this.z;case 3:return this.w;default:throw new Error("index is out of range: "+t)}},clone:function(){return new this.constructor(this.x,this.y,this.z,this.w)},copy:function(t){return this.x=t.x,this.y=t.y,this.z=t.z,this.w=void 0!==t.w?t.w:1,this},add:function(t,e){return void 0!==e?(console.warn("THREE.Vector4: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(t,e)):(this.x+=t.x,this.y+=t.y,this.z+=t.z,this.w+=t.w,this)},addScalar:function(t){return this.x+=t,this.y+=t,this.z+=t,this.w+=t,this},addVectors:function(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this.z=t.z+e.z,this.w=t.w+e.w,this},addScaledVector:function(t,e){return this.x+=t.x*e,this.y+=t.y*e,this.z+=t.z*e,this.w+=t.w*e,this},sub:function(t,e){return void 0!==e?(console.warn("THREE.Vector4: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(t,e)):(this.x-=t.x,this.y-=t.y,this.z-=t.z,this.w-=t.w,this)},subScalar:function(t){return this.x-=t,this.y-=t,this.z-=t,this.w-=t,this},subVectors:function(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this.z=t.z-e.z,this.w=t.w-e.w,this},multiplyScalar:function(t){return isFinite(t)?(this.x*=t,this.y*=t,this.z*=t,this.w*=t):(this.x=0,this.y=0,this.z=0,this.w=0),this},applyMatrix4:function(t){var e=this.x,n=this.y,r=this.z,i=this.w,o=t.elements;return this.x=o[0]*e+o[4]*n+o[8]*r+o[12]*i,this.y=o[1]*e+o[5]*n+o[9]*r+o[13]*i,this.z=o[2]*e+o[6]*n+o[10]*r+o[14]*i,this.w=o[3]*e+o[7]*n+o[11]*r+o[15]*i,this},divideScalar:function(t){return this.multiplyScalar(1/t)},setAxisAngleFromQuaternion:function(t){this.w=2*Math.acos(t.w);var e=Math.sqrt(1-t.w*t.w);return e<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=t.x/e,this.y=t.y/e,this.z=t.z/e),this},setAxisAngleFromRotationMatrix:function(t){var e,n,r,i,o=.01,a=.1,s=t.elements,c=s[0],u=s[4],l=s[8],h=s[1],f=s[5],p=s[9],d=s[2],m=s[6],v=s[10];
  if(Math.abs(u-h)<o&&Math.abs(l-d)<o&&Math.abs(p-m)<o){if(Math.abs(u+h)<a&&Math.abs(l+d)<a&&Math.abs(p+m)<a&&Math.abs(c+f+v-3)<a)return this.set(1,0,0,0),this;e=Math.PI;var g=(c+1)/2,y=(f+1)/2,x=(v+1)/2,_=(u+h)/4,w=(l+d)/4,b=(p+m)/4;return g>y&&g>x?g<o?(n=0,r=.707106781,i=.707106781):(n=Math.sqrt(g),r=_/n,i=w/n):y>x?y<o?(n=.707106781,r=0,i=.707106781):(r=Math.sqrt(y),n=_/r,i=b/r):x<o?(n=.707106781,r=.707106781,i=0):(i=Math.sqrt(x),n=w/i,r=b/i),this.set(n,r,i,e),this}var M=Math.sqrt((m-p)*(m-p)+(l-d)*(l-d)+(h-u)*(h-u));return Math.abs(M)<.001&&(M=1),this.x=(m-p)/M,this.y=(l-d)/M,this.z=(h-u)/M,this.w=Math.acos((c+f+v-1)/2),this},min:function(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this.z=Math.min(this.z,t.z),this.w=Math.min(this.w,t.w),this},max:function(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this.z=Math.max(this.z,t.z),this.w=Math.max(this.w,t.w),this},clamp:function(t,e){return this.x=Math.max(t.x,Math.min(e.x,this.x)),this.y=Math.max(t.y,Math.min(e.y,this.y)),this.z=Math.max(t.z,Math.min(e.z,this.z)),this.w=Math.max(t.w,Math.min(e.w,this.w)),this},clampScalar:function(){var t,e;return function(n,r){return void 0===t&&(t=new o,e=new o),t.set(n,n,n,n),e.set(r,r,r,r),this.clamp(t,e)}}(),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(t){return this.x*t.x+this.y*t.y+this.z*t.z+this.w*t.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)},lengthManhattan: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())},setLength:function(t){return this.multiplyScalar(t/this.length())},lerp:function(t,e){return this.x+=(t.x-this.x)*e,this.y+=(t.y-this.y)*e,this.z+=(t.z-this.z)*e,this.w+=(t.w-this.w)*e,this},lerpVectors:function(t,e,n){return this.subVectors(e,t).multiplyScalar(n).add(t)},equals:function(t){return t.x===this.x&&t.y===this.y&&t.z===this.z&&t.w===this.w},fromArray:function(t,e){return void 0===e&&(e=0),this.x=t[e],this.y=t[e+1],this.z=t[e+2],this.w=t[e+3],this},toArray:function(t,e){return void 0===t&&(t=[]),void 0===e&&(e=0),t[e]=this.x,t[e+1]=this.y,t[e+2]=this.z,t[e+3]=this.w,t},fromAttribute:function(t,e,n){return void 0===n&&(n=0),e=e*t.itemSize+n,this.x=t.array[e],this.y=t.array[e+1],this.z=t.array[e+2],this.w=t.array[e+3],this}},Object.assign(a.prototype,e.prototype,{isWebGLRenderTarget:!0,setSize:function(t,e){this.width===t&&this.height===e||(this.width=t,this.height=e,this.dispose()),this.viewport.set(0,0,t,e),this.scissor.set(0,0,t,e)},clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.width=t.width,this.height=t.height,this.viewport.copy(t.viewport),this.texture=t.texture.clone(),this.depthBuffer=t.depthBuffer,this.stencilBuffer=t.stencilBuffer,this.depthTexture=t.depthTexture,this},dispose:function(){this.dispatchEvent({type:"dispose"})}}),s.prototype=Object.create(a.prototype),s.prototype.constructor=s,s.prototype.isWebGLRenderTargetCube=!0,c.prototype={constructor:c,get x(){return this._x},set x(t){this._x=t,this.onChangeCallback()},get y(){return this._y},set y(t){this._y=t,this.onChangeCallback()},get z(){return this._z},set z(t){this._z=t,this.onChangeCallback()},get w(){return this._w},set w(t){this._w=t,this.onChangeCallback()},set:function(t,e,n,r){return this._x=t,this._y=e,this._z=n,this._w=r,this.onChangeCallback(),this},clone:function(){return new this.constructor(this._x,this._y,this._z,this._w)},copy:function(t){return this._x=t.x,this._y=t.y,this._z=t.z,this._w=t.w,this.onChangeCallback(),this},setFromEuler:function(t,e){if((t&&t.isEuler)===!1)throw new Error("THREE.Quaternion: .setFromEuler() now expects a Euler rotation rather than a Vector3 and order.");var n=Math.cos(t._x/2),r=Math.cos(t._y/2),i=Math.cos(t._z/2),o=Math.sin(t._x/2),a=Math.sin(t._y/2),s=Math.sin(t._z/2),c=t.order;return"XYZ"===c?(this._x=o*r*i+n*a*s,this._y=n*a*i-o*r*s,this._z=n*r*s+o*a*i,this._w=n*r*i-o*a*s):"YXZ"===c?(this._x=o*r*i+n*a*s,this._y=n*a*i-o*r*s,this._z=n*r*s-o*a*i,this._w=n*r*i+o*a*s):"ZXY"===c?(this._x=o*r*i-n*a*s,this._y=n*a*i+o*r*s,this._z=n*r*s+o*a*i,this._w=n*r*i-o*a*s):"ZYX"===c?(this._x=o*r*i-n*a*s,this._y=n*a*i+o*r*s,this._z=n*r*s-o*a*i,this._w=n*r*i+o*a*s):"YZX"===c?(this._x=o*r*i+n*a*s,this._y=n*a*i+o*r*s,this._z=n*r*s-o*a*i,this._w=n*r*i-o*a*s):"XZY"===c&&(this._x=o*r*i-n*a*s,this._y=n*a*i-o*r*s,this._z=n*r*s+o*a*i,this._w=n*r*i+o*a*s),e!==!1&&this.onChangeCallback(),this},setFromAxisAngle:function(t,e){var n=e/2,r=Math.sin(n);return this._x=t.x*r,this._y=t.y*r,this._z=t.z*r,this._w=Math.cos(n),this.onChangeCallback(),this},setFromRotationMatrix:function(t){var e,n=t.elements,r=n[0],i=n[4],o=n[8],a=n[1],s=n[5],c=n[9],u=n[2],l=n[6],h=n[10],f=r+s+h;return f>0?(e=.5/Math.sqrt(f+1),this._w=.25/e,this._x=(l-c)*e,this._y=(o-u)*e,this._z=(a-i)*e):r>s&&r>h?(e=2*Math.sqrt(1+r-s-h),this._w=(l-c)/e,this._x=.25*e,this._y=(i+a)/e,this._z=(o+u)/e):s>h?(e=2*Math.sqrt(1+s-r-h),this._w=(o-u)/e,this._x=(i+a)/e,this._y=.25*e,this._z=(c+l)/e):(e=2*Math.sqrt(1+h-r-s),this._w=(a-i)/e,this._x=(o+u)/e,this._y=(c+l)/e,this._z=.25*e),this.onChangeCallback(),this},setFromUnitVectors:function(){var t,e,n=1e-6;return function(r,i){return void 0===t&&(t=new u),e=r.dot(i)+1,e<n?(e=0,Math.abs(r.x)>Math.abs(r.z)?t.set(-r.y,r.x,0):t.set(0,-r.z,r.y)):t.crossVectors(r,i),this._x=t.x,this._y=t.y,this._z=t.z,this._w=e,this.normalize()}}(),inverse:function(){return this.conjugate().normalize()},conjugate:function(){return this._x*=-1,this._y*=-1,this._z*=-1,this.onChangeCallback(),this},dot:function(t){return this._x*t._x+this._y*t._y+this._z*t._z+this._w*t._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 t=this.length();return 0===t?(this._x=0,this._y=0,this._z=0,this._w=1):(t=1/t,this._x=this._x*t,this._y=this._y*t,this._z=this._z*t,this._w=this._w*t),this.onChangeCallback(),this},multiply:function(t,e){return void 0!==e?(console.warn("THREE.Quaternion: .multiply() now only accepts one argument. Use .multiplyQuaternions( a, b ) instead."),this.multiplyQuaternions(t,e)):this.multiplyQuaternions(this,t)},premultiply:function(t){return this.multiplyQuaternions(t,this)},multiplyQuaternions:function(t,e){var n=t._x,r=t._y,i=t._z,o=t._w,a=e._x,s=e._y,c=e._z,u=e._w;return this._x=n*u+o*a+r*c-i*s,this._y=r*u+o*s+i*a-n*c,this._z=i*u+o*c+n*s-r*a,this._w=o*u-n*a-r*s-i*c,this.onChangeCallback(),this},slerp:function(t,e){if(0===e)return this;if(1===e)return this.copy(t);var n=this._x,r=this._y,i=this._z,o=this._w,a=o*t._w+n*t._x+r*t._y+i*t._z;if(a<0?(this._w=-t._w,this._x=-t._x,this._y=-t._y,this._z=-t._z,a=-a):this.copy(t),a>=1)return this._w=o,this._x=n,this._y=r,this._z=i,this;var s=Math.sqrt(1-a*a);if(Math.abs(s)<.001)return this._w=.5*(o+this._w),this._x=.5*(n+this._x),this._y=.5*(r+this._y),this._z=.5*(i+this._z),this;var c=Math.atan2(s,a),u=Math.sin((1-e)*c)/s,l=Math.sin(e*c)/s;return this._w=o*u+this._w*l,this._x=n*u+this._x*l,this._y=r*u+this._y*l,this._z=i*u+this._z*l,this.onChangeCallback(),this},equals:function(t){return t._x===this._x&&t._y===this._y&&t._z===this._z&&t._w===this._w},fromArray:function(t,e){return void 0===e&&(e=0),this._x=t[e],this._y=t[e+1],this._z=t[e+2],this._w=t[e+3],this.onChangeCallback(),this},toArray:function(t,e){return void 0===t&&(t=[]),void 0===e&&(e=0),t[e]=this._x,t[e+1]=this._y,t[e+2]=this._z,t[e+3]=this._w,t},onChange:function(t){return this.onChangeCallback=t,this},onChangeCallback:function(){}},Object.assign(c,{slerp:function(t,e,n,r){return n.copy(t).slerp(e,r)},slerpFlat:function(t,e,n,r,i,o,a){var s=n[r+0],c=n[r+1],u=n[r+2],l=n[r+3],h=i[o+0],f=i[o+1],p=i[o+2],d=i[o+3];if(l!==d||s!==h||c!==f||u!==p){var m=1-a,v=s*h+c*f+u*p+l*d,g=v>=0?1:-1,y=1-v*v;if(y>Number.EPSILON){var x=Math.sqrt(y),_=Math.atan2(x,v*g);m=Math.sin(m*_)/x,a=Math.sin(a*_)/x}var w=a*g;if(s=s*m+h*w,c=c*m+f*w,u=u*m+p*w,l=l*m+d*w,m===1-a){var b=1/Math.sqrt(s*s+c*c+u*u+l*l);s*=b,c*=b,u*=b,l*=b}}t[e]=s,t[e+1]=c,t[e+2]=u,t[e+3]=l}}),u.prototype={constructor:u,isVector3:!0,set:function(t,e,n){return this.x=t,this.y=e,this.z=n,this},setScalar:function(t){return this.x=t,this.y=t,this.z=t,this},setX:function(t){return this.x=t,this},setY:function(t){return this.y=t,this},setZ:function(t){return this.z=t,this},setComponent:function(t,e){switch(t){case 0:this.x=e;break;case 1:this.y=e;break;case 2:this.z=e;break;default:throw new Error("index is out of range: "+t)}},getComponent:function(t){switch(t){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+t)}},clone:function(){return new this.constructor(this.x,this.y,this.z)},copy:function(t){return this.x=t.x,this.y=t.y,this.z=t.z,this},add:function(t,e){return void 0!==e?(console.warn("THREE.Vector3: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(t,e)):(this.x+=t.x,this.y+=t.y,this.z+=t.z,this)},addScalar:function(t){return this.x+=t,this.y+=t,this.z+=t,this},addVectors:function(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this.z=t.z+e.z,this},addScaledVector:function(t,e){return this.x+=t.x*e,this.y+=t.y*e,this.z+=t.z*e,this},sub:function(t,e){return void 0!==e?(console.warn("THREE.Vector3: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(t,e)):(this.x-=t.x,this.y-=t.y,this.z-=t.z,this)},subScalar:function(t){return this.x-=t,this.y-=t,this.z-=t,this},subVectors:function(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this.z=t.z-e.z,this},multiply:function(t,e){return void 0!==e?(console.warn("THREE.Vector3: .multiply() now only accepts one argument. Use .multiplyVectors( a, b ) instead."),this.multiplyVectors(t,e)):(this.x*=t.x,this.y*=t.y,this.z*=t.z,this)},multiplyScalar:function(t){return isFinite(t)?(this.x*=t,this.y*=t,this.z*=t):(this.x=0,this.y=0,this.z=0),this},multiplyVectors:function(t,e){return this.x=t.x*e.x,this.y=t.y*e.y,this.z=t.z*e.z,this},applyEuler:function(){var t;return function(e){return(e&&e.isEuler)===!1&&console.error("THREE.Vector3: .applyEuler() now expects an Euler rotation rather than a Vector3 and order."),void 0===t&&(t=new c),this.applyQuaternion(t.setFromEuler(e))}}(),applyAxisAngle:function(){var t;return function(e,n){return void 0===t&&(t=new c),this.applyQuaternion(t.setFromAxisAngle(e,n))}}(),applyMatrix3:function(t){var e=this.x,n=this.y,r=this.z,i=t.elements;return this.x=i[0]*e+i[3]*n+i[6]*r,this.y=i[1]*e+i[4]*n+i[7]*r,this.z=i[2]*e+i[5]*n+i[8]*r,this},applyMatrix4:function(t){var e=this.x,n=this.y,r=this.z,i=t.elements;return this.x=i[0]*e+i[4]*n+i[8]*r+i[12],this.y=i[1]*e+i[5]*n+i[9]*r+i[13],this.z=i[2]*e+i[6]*n+i[10]*r+i[14],this},applyProjection:function(t){var e=this.x,n=this.y,r=this.z,i=t.elements,o=1/(i[3]*e+i[7]*n+i[11]*r+i[15]);return this.x=(i[0]*e+i[4]*n+i[8]*r+i[12])*o,this.y=(i[1]*e+i[5]*n+i[9]*r+i[13])*o,this.z=(i[2]*e+i[6]*n+i[10]*r+i[14])*o,this},applyQuaternion:function(t){var e=this.x,n=this.y,r=this.z,i=t.x,o=t.y,a=t.z,s=t.w,c=s*e+o*r-a*n,u=s*n+a*e-i*r,l=s*r+i*n-o*e,h=-i*e-o*n-a*r;return this.x=c*s+h*-i+u*-a-l*-o,this.y=u*s+h*-o+l*-i-c*-a,this.z=l*s+h*-a+c*-o-u*-i,this},project:function(){var t;return function(e){return void 0===t&&(t=new l),t.multiplyMatrices(e.projectionMatrix,t.getInverse(e.matrixWorld)),this.applyProjection(t)}}(),unproject:function(){var t;return function(e){return void 0===t&&(t=new l),t.multiplyMatrices(e.matrixWorld,t.getInverse(e.projectionMatrix)),this.applyProjection(t)}}(),transformDirection:function(t){var e=this.x,n=this.y,r=this.z,i=t.elements;return this.x=i[0]*e+i[4]*n+i[8]*r,this.y=i[1]*e+i[5]*n+i[9]*r,this.z=i[2]*e+i[6]*n+i[10]*r,this.normalize()},divide:function(t){return this.x/=t.x,this.y/=t.y,this.z/=t.z,this},divideScalar:function(t){return this.multiplyScalar(1/t)},min:function(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this.z=Math.min(this.z,t.z),this},max:function(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this.z=Math.max(this.z,t.z),this},clamp:function(t,e){return this.x=Math.max(t.x,Math.min(e.x,this.x)),this.y=Math.max(t.y,Math.min(e.y,this.y)),this.z=Math.max(t.z,Math.min(e.z,this.z)),this},clampScalar:function(){var t,e;return function(n,r){return void 0===t&&(t=new u,e=new u),t.set(n,n,n),e.set(r,r,r),this.clamp(t,e)}}(),clampLength:function(t,e){var n=this.length();return this.multiplyScalar(Math.max(t,Math.min(e,n))/n)},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(t){return this.x*t.x+this.y*t.y+this.z*t.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)},lengthManhattan:function(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)},normalize:function(){return this.divideScalar(this.length())},setLength:function(t){return this.multiplyScalar(t/this.length())},lerp:function(t,e){return this.x+=(t.x-this.x)*e,this.y+=(t.y-this.y)*e,this.z+=(t.z-this.z)*e,this},lerpVectors:function(t,e,n){return this.subVectors(e,t).multiplyScalar(n).add(t)},cross:function(t,e){if(void 0!==e)return console.warn("THREE.Vector3: .cross() now only accepts one argument. Use .crossVectors( a, b ) instead."),this.crossVectors(t,e);var n=this.x,r=this.y,i=this.z;return this.x=r*t.z-i*t.y,this.y=i*t.x-n*t.z,this.z=n*t.y-r*t.x,this},crossVectors:function(t,e){var n=t.x,r=t.y,i=t.z,o=e.x,a=e.y,s=e.z;return this.x=r*s-i*a,this.y=i*o-n*s,this.z=n*a-r*o,this},projectOnVector:function(t){var e=t.dot(this)/t.lengthSq();return this.copy(t).multiplyScalar(e)},projectOnPlane:function(){var t;return function(e){return void 0===t&&(t=new u),t.copy(this).projectOnVector(e),this.sub(t)}}(),reflect:function(){var t;return function(e){return void 0===t&&(t=new u),this.sub(t.copy(e).multiplyScalar(2*this.dot(e)))}}(),angleTo:function(e){var n=this.dot(e)/Math.sqrt(this.lengthSq()*e.lengthSq());return Math.acos(t.Math.clamp(n,-1,1))},distanceTo:function(t){return Math.sqrt(this.distanceToSquared(t))},distanceToSquared:function(t){var e=this.x-t.x,n=this.y-t.y,r=this.z-t.z;return e*e+n*n+r*r},distanceToManhattan:function(t){return Math.abs(this.x-t.x)+Math.abs(this.y-t.y)+Math.abs(this.z-t.z)},setFromSpherical:function(t){var e=Math.sin(t.phi)*t.radius;return this.x=e*Math.sin(t.theta),this.y=Math.cos(t.phi)*t.radius,this.z=e*Math.cos(t.theta),this},setFromMatrixPosition:function(t){return this.setFromMatrixColumn(t,3)},setFromMatrixScale:function(t){var e=this.setFromMatrixColumn(t,0).length(),n=this.setFromMatrixColumn(t,1).length(),r=this.setFromMatrixColumn(t,2).length();return this.x=e,this.y=n,this.z=r,this},setFromMatrixColumn:function(t,e){if("number"==typeof t){console.warn("THREE.Vector3: setFromMatrixColumn now expects ( matrix, index ).");var n=t;t=e,e=n}return this.fromArray(t.elements,4*e)},equals:function(t){return t.x===this.x&&t.y===this.y&&t.z===this.z},fromArray:function(t,e){return void 0===e&&(e=0),this.x=t[e],this.y=t[e+1],this.z=t[e+2],this},toArray:function(t,e){return void 0===t&&(t=[]),void 0===e&&(e=0),t[e]=this.x,t[e+1]=this.y,t[e+2]=this.z,t},fromAttribute:function(t,e,n){return void 0===n&&(n=0),e=e*t.itemSize+n,this.x=t.array[e],this.y=t.array[e+1],this.z=t.array[e+2],this}},l.prototype={constructor:l,isMatrix4:!0,set:function(t,e,n,r,i,o,a,s,c,u,l,h,f,p,d,m){var v=this.elements;return v[0]=t,v[4]=e,v[8]=n,v[12]=r,v[1]=i,v[5]=o,v[9]=a,v[13]=s,v[2]=c,v[6]=u,v[10]=l,v[14]=h,v[3]=f,v[7]=p,v[11]=d,v[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 l).fromArray(this.elements)},copy:function(t){return this.elements.set(t.elements),this},copyPosition:function(t){var e=this.elements,n=t.elements;return e[12]=n[12],e[13]=n[13],e[14]=n[14],this},extractBasis:function(t,e,n){return t.setFromMatrixColumn(this,0),e.setFromMatrixColumn(this,1),n.setFromMatrixColumn(this,2),this},makeBasis:function(t,e,n){return this.set(t.x,e.x,n.x,0,t.y,e.y,n.y,0,t.z,e.z,n.z,0,0,0,0,1),this},extractRotation:function(){var t;return function(e){void 0===t&&(t=new u);var n=this.elements,r=e.elements,i=1/t.setFromMatrixColumn(e,0).length(),o=1/t.setFromMatrixColumn(e,1).length(),a=1/t.setFromMatrixColumn(e,2).length();return n[0]=r[0]*i,n[1]=r[1]*i,n[2]=r[2]*i,n[4]=r[4]*o,n[5]=r[5]*o,n[6]=r[6]*o,n[8]=r[8]*a,n[9]=r[9]*a,n[10]=r[10]*a,this}}(),makeRotationFromEuler:function(t){(t&&t.isEuler)===!1&&console.error("THREE.Matrix: .makeRotationFromEuler() now expects a Euler rotation rather than a Vector3 and order.");var e=this.elements,n=t.x,r=t.y,i=t.z,o=Math.cos(n),a=Math.sin(n),s=Math.cos(r),c=Math.sin(r),u=Math.cos(i),l=Math.sin(i);if("XYZ"===t.order){var h=o*u,f=o*l,p=a*u,d=a*l;e[0]=s*u,e[4]=-s*l,e[8]=c,e[1]=f+p*c,e[5]=h-d*c,e[9]=-a*s,e[2]=d-h*c,e[6]=p+f*c,e[10]=o*s}else if("YXZ"===t.order){var m=s*u,v=s*l,g=c*u,y=c*l;e[0]=m+y*a,e[4]=g*a-v,e[8]=o*c,e[1]=o*l,e[5]=o*u,e[9]=-a,e[2]=v*a-g,e[6]=y+m*a,e[10]=o*s}else if("ZXY"===t.order){var m=s*u,v=s*l,g=c*u,y=c*l;e[0]=m-y*a,e[4]=-o*l,e[8]=g+v*a,e[1]=v+g*a,e[5]=o*u,e[9]=y-m*a,e[2]=-o*c,e[6]=a,e[10]=o*s}else if("ZYX"===t.order){var h=o*u,f=o*l,p=a*u,d=a*l;e[0]=s*u,e[4]=p*c-f,e[8]=h*c+d,e[1]=s*l,e[5]=d*c+h,e[9]=f*c-p,e[2]=-c,e[6]=a*s,e[10]=o*s}else if("YZX"===t.order){var x=o*s,_=o*c,w=a*s,b=a*c;e[0]=s*u,e[4]=b-x*l,e[8]=w*l+_,e[1]=l,e[5]=o*u,e[9]=-a*u,e[2]=-c*u,e[6]=_*l+w,e[10]=x-b*l}else if("XZY"===t.order){var x=o*s,_=o*c,w=a*s,b=a*c;e[0]=s*u,e[4]=-l,e[8]=c*u,e[1]=x*l+b,e[5]=o*u,e[9]=_*l-w,e[2]=w*l-_,e[6]=a*u,e[10]=b*l+x}return e[3]=0,e[7]=0,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,this},makeRotationFromQuaternion:function(t){var e=this.elements,n=t.x,r=t.y,i=t.z,o=t.w,a=n+n,s=r+r,c=i+i,u=n*a,l=n*s,h=n*c,f=r*s,p=r*c,d=i*c,m=o*a,v=o*s,g=o*c;return e[0]=1-(f+d),e[4]=l-g,e[8]=h+v,e[1]=l+g,e[5]=1-(u+d),e[9]=p-m,e[2]=h-v,e[6]=p+m,e[10]=1-(u+f),e[3]=0,e[7]=0,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,this},lookAt:function(){var t,e,n;return function(r,i,o){void 0===t&&(t=new u,e=new u,n=new u);var a=this.elements;return n.subVectors(r,i).normalize(),0===n.lengthSq()&&(n.z=1),t.crossVectors(o,n).normalize(),0===t.lengthSq()&&(n.z+=1e-4,t.crossVectors(o,n).normalize()),e.crossVectors(n,t),a[0]=t.x,a[4]=e.x,a[8]=n.x,a[1]=t.y,a[5]=e.y,a[9]=n.y,a[2]=t.z,a[6]=e.z,a[10]=n.z,this}}(),multiply:function(t,e){return void 0!==e?(console.warn("THREE.Matrix4: .multiply() now only accepts one argument. Use .multiplyMatrices( a, b ) instead."),this.multiplyMatrices(t,e)):this.multiplyMatrices(this,t)},premultiply:function(t){return this.multiplyMatrices(t,this)},multiplyMatrices:function(t,e){var n=t.elements,r=e.elements,i=this.elements,o=n[0],a=n[4],s=n[8],c=n[12],u=n[1],l=n[5],h=n[9],f=n[13],p=n[2],d=n[6],m=n[10],v=n[14],g=n[3],y=n[7],x=n[11],_=n[15],w=r[0],b=r[4],M=r[8],E=r[12],S=r[1],T=r[5],A=r[9],L=r[13],C=r[2],P=r[6],R=r[10],I=r[14],O=r[3],U=r[7],N=r[11],F=r[15];return i[0]=o*w+a*S+s*C+c*O,i[4]=o*b+a*T+s*P+c*U,i[8]=o*M+a*A+s*R+c*N,i[12]=o*E+a*L+s*I+c*F,i[1]=u*w+l*S+h*C+f*O,i[5]=u*b+l*T+h*P+f*U,i[9]=u*M+l*A+h*R+f*N,i[13]=u*E+l*L+h*I+f*F,i[2]=p*w+d*S+m*C+v*O,i[6]=p*b+d*T+m*P+v*U,i[10]=p*M+d*A+m*R+v*N,i[14]=p*E+d*L+m*I+v*F,i[3]=g*w+y*S+x*C+_*O,i[7]=g*b+y*T+x*P+_*U,i[11]=g*M+y*A+x*R+_*N,i[15]=g*E+y*L+x*I+_*F,this},multiplyToArray:function(t,e,n){var r=this.elements;return this.multiplyMatrices(t,e),n[0]=r[0],n[1]=r[1],n[2]=r[2],n[3]=r[3],n[4]=r[4],n[5]=r[5],n[6]=r[6],n[7]=r[7],n[8]=r[8],n[9]=r[9],n[10]=r[10],n[11]=r[11],n[12]=r[12],n[13]=r[13],n[14]=r[14],n[15]=r[15],this},multiplyScalar:function(t){var e=this.elements;return e[0]*=t,e[4]*=t,e[8]*=t,e[12]*=t,e[1]*=t,e[5]*=t,e[9]*=t,e[13]*=t,e[2]*=t,e[6]*=t,e[10]*=t,e[14]*=t,e[3]*=t,e[7]*=t,e[11]*=t,e[15]*=t,this},applyToVector3Array:function(){var t;return function(e,n,r){void 0===t&&(t=new u),void 0===n&&(n=0),void 0===r&&(r=e.length);for(var i=0,o=n;i<r;i+=3,o+=3)t.fromArray(e,o),t.applyMatrix4(this),t.toArray(e,o);return e}}(),applyToBuffer:function(){var t;return function(e,n,r){void 0===t&&(t=new u),void 0===n&&(n=0),void 0===r&&(r=e.length/e.itemSize);for(var i=0,o=n;i<r;i++,o++)t.x=e.getX(o),t.y=e.getY(o),t.z=e.getZ(o),t.applyMatrix4(this),e.setXYZ(t.x,t.y,t.z);return e}}(),determinant:function(){var t=this.elements,e=t[0],n=t[4],r=t[8],i=t[12],o=t[1],a=t[5],s=t[9],c=t[13],u=t[2],l=t[6],h=t[10],f=t[14],p=t[3],d=t[7],m=t[11],v=t[15];return p*(+i*s*l-r*c*l-i*a*h+n*c*h+r*a*f-n*s*f)+d*(+e*s*f-e*c*h+i*o*h-r*o*f+r*c*u-i*s*u)+m*(+e*c*l-e*a*f-i*o*l+n*o*f+i*a*u-n*c*u)+v*(-r*a*u-e*s*l+e*a*h+r*o*l-n*o*h+n*s*u)},transpose:function(){var t,e=this.elements;return t=e[1],e[1]=e[4],e[4]=t,t=e[2],e[2]=e[8],e[8]=t,t=e[6],e[6]=e[9],e[9]=t,t=e[3],e[3]=e[12],e[12]=t,t=e[7],e[7]=e[13],e[13]=t,t=e[11],e[11]=e[14],e[14]=t,this},flattenToArrayOffset:function(t,e){return console.warn("THREE.Matrix3: .flattenToArrayOffset is deprecated - just use .toArray instead."),this.toArray(t,e)},getPosition:function(){var t;return function(){return void 0===t&&(t=new u),console.warn("THREE.Matrix4: .getPosition() has been removed. Use Vector3.setFromMatrixPosition( matrix ) instead."),t.setFromMatrixColumn(this,3)}}(),setPosition:function(t){var e=this.elements;return e[12]=t.x,e[13]=t.y,e[14]=t.z,this},getInverse:function(t,e){var n=this.elements,r=t.elements,i=r[0],o=r[1],a=r[2],s=r[3],c=r[4],u=r[5],l=r[6],h=r[7],f=r[8],p=r[9],d=r[10],m=r[11],v=r[12],g=r[13],y=r[14],x=r[15],_=p*y*h-g*d*h+g*l*m-u*y*m-p*l*x+u*d*x,w=v*d*h-f*y*h-v*l*m+c*y*m+f*l*x-c*d*x,b=f*g*h-v*p*h+v*u*m-c*g*m-f*u*x+c*p*x,M=v*p*l-f*g*l-v*u*d+c*g*d+f*u*y-c*p*y,E=i*_+o*w+a*b+s*M;if(0===E){var S="THREE.Matrix4.getInverse(): can't invert matrix, determinant is 0";if(e===!0)throw new Error(S);return console.warn(S),this.identity()}var T=1/E;return n[0]=_*T,n[1]=(g*d*s-p*y*s-g*a*m+o*y*m+p*a*x-o*d*x)*T,n[2]=(u*y*s-g*l*s+g*a*h-o*y*h-u*a*x+o*l*x)*T,n[3]=(p*l*s-u*d*s-p*a*h+o*d*h+u*a*m-o*l*m)*T,n[4]=w*T,n[5]=(f*y*s-v*d*s+v*a*m-i*y*m-f*a*x+i*d*x)*T,n[6]=(v*l*s-c*y*s-v*a*h+i*y*h+c*a*x-i*l*x)*T,n[7]=(c*d*s-f*l*s+f*a*h-i*d*h-c*a*m+i*l*m)*T,n[8]=b*T,n[9]=(v*p*s-f*g*s-v*o*m+i*g*m+f*o*x-i*p*x)*T,n[10]=(c*g*s-v*u*s+v*o*h-i*g*h-c*o*x+i*u*x)*T,n[11]=(f*u*s-c*p*s-f*o*h+i*p*h+c*o*m-i*u*m)*T,n[12]=M*T,n[13]=(f*g*a-v*p*a+v*o*d-i*g*d-f*o*y+i*p*y)*T,n[14]=(v*u*a-c*g*a-v*o*l+i*g*l+c*o*y-i*u*y)*T,n[15]=(c*p*a-f*u*a+f*o*l-i*p*l-c*o*d+i*u*d)*T,this},scale:function(t){var e=this.elements,n=t.x,r=t.y,i=t.z;return e[0]*=n,e[4]*=r,e[8]*=i,e[1]*=n,e[5]*=r,e[9]*=i,e[2]*=n,e[6]*=r,e[10]*=i,e[3]*=n,e[7]*=r,e[11]*=i,this},getMaxScaleOnAxis:function(){var t=this.elements,e=t[0]*t[0]+t[1]*t[1]+t[2]*t[2],n=t[4]*t[4]+t[5]*t[5]+t[6]*t[6],r=t[8]*t[8]+t[9]*t[9]+t[10]*t[10];return Math.sqrt(Math.max(e,n,r))},makeTranslation:function(t,e,n){return this.set(1,0,0,t,0,1,0,e,0,0,1,n,0,0,0,1),this},makeRotationX:function(t){var e=Math.cos(t),n=Math.sin(t);return this.set(1,0,0,0,0,e,-n,0,0,n,e,0,0,0,0,1),this},makeRotationY:function(t){var e=Math.cos(t),n=Math.sin(t);return this.set(e,0,n,0,0,1,0,0,-n,0,e,0,0,0,0,1),this},makeRotationZ:function(t){var e=Math.cos(t),n=Math.sin(t);return this.set(e,-n,0,0,n,e,0,0,0,0,1,0,0,0,0,1),this},makeRotationAxis:function(t,e){var n=Math.cos(e),r=Math.sin(e),i=1-n,o=t.x,a=t.y,s=t.z,c=i*o,u=i*a;return this.set(c*o+n,c*a-r*s,c*s+r*a,0,c*a+r*s,u*a+n,u*s-r*o,0,c*s-r*a,u*s+r*o,i*s*s+n,0,0,0,0,1),this},makeScale:function(t,e,n){return this.set(t,0,0,0,0,e,0,0,0,0,n,0,0,0,0,1),this},compose:function(t,e,n){return this.makeRotationFromQuaternion(e),this.scale(n),this.setPosition(t),this},decompose:function(){var t,e;return function(n,r,i){void 0===t&&(t=new u,e=new l);var o=this.elements,a=t.set(o[0],o[1],o[2]).length(),s=t.set(o[4],o[5],o[6]).length(),c=t.set(o[8],o[9],o[10]).length(),h=this.determinant();h<0&&(a=-a),n.x=o[12],n.y=o[13],n.z=o[14],e.elements.set(this.elements);var f=1/a,p=1/s,d=1/c;return e.elements[0]*=f,e.elements[1]*=f,e.elements[2]*=f,e.elements[4]*=p,e.elements[5]*=p,e.elements[6]*=p,e.elements[8]*=d,e.elements[9]*=d,e.elements[10]*=d,r.setFromRotationMatrix(e),i.x=a,i.y=s,i.z=c,this}}(),makeFrustum:function(t,e,n,r,i,o){var a=this.elements,s=2*i/(e-t),c=2*i/(r-n),u=(e+t)/(e-t),l=(r+n)/(r-n),h=-(o+i)/(o-i),f=-2*o*i/(o-i);return a[0]=s,a[4]=0,a[8]=u,a[12]=0,a[1]=0,a[5]=c,a[9]=l,a[13]=0,a[2]=0,a[6]=0,a[10]=h,a[14]=f,a[3]=0,a[7]=0,a[11]=-1,a[15]=0,this},makePerspective:function(e,n,r,i){var o=r*Math.tan(t.Math.DEG2RAD*e*.5),a=-o,s=a*n,c=o*n;return this.makeFrustum(s,c,a,o,r,i)},makeOrthographic:function(t,e,n,r,i,o){var a=this.elements,s=1/(e-t),c=1/(n-r),u=1/(o-i),l=(e+t)*s,h=(n+r)*c,f=(o+i)*u;return a[0]=2*s,a[4]=0,a[8]=0,a[12]=-l,a[1]=0,a[5]=2*c,a[9]=0,a[13]=-h,a[2]=0,a[6]=0,a[10]=-2*u,a[14]=-f,a[3]=0,a[7]=0,a[11]=0,a[15]=1,this},equals:function(t){for(var e=this.elements,n=t.elements,r=0;r<16;r++)if(e[r]!==n[r])return!1;return!0},fromArray:function(t,e){void 0===e&&(e=0);for(var n=0;n<16;n++)this.elements[n]=t[n+e];return this},toArray:function(t,e){void 0===t&&(t=[]),void 0===e&&(e=0);var n=this.elements;return t[e]=n[0],t[e+1]=n[1],t[e+2]=n[2],t[e+3]=n[3],t[e+4]=n[4],t[e+5]=n[5],t[e+6]=n[6],t[e+7]=n[7],t[e+8]=n[8],t[e+9]=n[9],t[e+10]=n[10],t[e+11]=n[11],t[e+12]=n[12],t[e+13]=n[13],t[e+14]=n[14],t[e+15]=n[15],t}},h.prototype=Object.create(r.prototype),h.prototype.constructor=h,h.prototype.isCubeTexture=!0,Object.defineProperty(h.prototype,"images",{get:function(){return this.image},set:function(t){this.image=t}});var Ra=new r,Ia=new h,Oa=[],Ua=[];G.prototype.setValue=function(t,e){for(var n=this.seq,r=0,i=n.length;r!==i;++r){var o=n[r];o.setValue(t,e[o.id])}};var Na=/([\w\d_]+)(\])?(\[|\.)?/g;W.prototype.setValue=function(t,e,n){var r=this.map[e];void 0!==r&&r.setValue(t,n,this.renderer)},W.prototype.set=function(t,e,n){var r=this.map[n];void 0!==r&&r.setValue(t,e[n],this.renderer)},W.prototype.setOptional=function(t,e,n){var r=e[n];void 0!==r&&this.setValue(t,n,r)},W.upload=function(t,e,n,r){for(var i=0,o=e.length;i!==o;++i){var a=e[i],s=n[a.id];s.needsUpdate!==!1&&a.setValue(t,s.value,r)}},W.seqWithValue=function(t,e){for(var n=[],r=0,i=t.length;r!==i;++r){var o=t[r];o.id in e&&n.push(o)}return n},W.splitDynamic=function(t,e){for(var n=null,r=t.length,i=0,o=0;o!==r;++o){var a=t[o],s=e[a.id];s&&s.dynamic===!0?(null===n&&(n=[]),n.push(a)):(i<o&&(t[i]=a),++i)}return i<r&&(t.length=i),n},W.evalDynamic=function(t,e,n,r,i){for(var o=0,a=t.length;o!==a;++o){var s=e[t[o].id],c=s.onUpdateCallback;void 0!==c&&c.call(s,n,r,i)}},t.UniformsUtils={merge:function(t){for(var e={},n=0;n<t.length;n++){var r=this.clone(t[n]);for(var i in r)e[i]=r[i]}return e},clone:function(t){var e={};for(var n in t){e[n]={};for(var r in t[n]){var i=t[n][r];i&&i.isColor||i&&i.isVector2||i&&i.isVector3||i&&i.isVector4||i&&i.isMatrix3||i&&i.isMatrix4||i&&i.isTexture?e[n][r]=i.clone():Array.isArray(i)?e[n][r]=i.slice():e[n][r]=i}}return e}};var Fa="#ifdef USE_ALPHAMAP\n\tdiffuseColor.a *= texture2D( alphaMap, vUv ).g;\n#endif\n",Da="#ifdef USE_ALPHAMAP\n\tuniform sampler2D alphaMap;\n#endif\n",za="#ifdef ALPHATEST\n\tif ( diffuseColor.a < ALPHATEST ) discard;\n#endif\n",Ba="#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( geometry.normal, geometry.viewDir ) );\n\t\treflectedLight.indirectSpecular *= computeSpecularOcclusion( dotNV, ambientOcclusion, material.specularRoughness );\n\t#endif\n#endif\n",ka="#ifdef USE_AOMAP\n\tuniform sampler2D aoMap;\n\tuniform float aoMapIntensity;\n#endif",ja="\nvec3 transformed = vec3( position );\n",Ga="\nvec3 objectNormal = vec3( normal );\n",Va="bool testLightInRange( const in float lightDistance, const in float cutoffDistance ) {\n\treturn any( bvec2( cutoffDistance == 0.0, lightDistance < cutoffDistance ) );\n}\nfloat punctualLightIntensityToIrradianceFactor( const in float lightDistance, const in float cutoffDistance, const in float decayExponent ) {\n\t\tif( decayExponent > 0.0 ) {\n#if defined ( PHYSICALLY_CORRECT_LIGHTS )\n\t\t\tfloat distanceFalloff = 1.0 / max( pow( lightDistance, decayExponent ), 0.01 );\n\t\t\tfloat maxDistanceCutoffFactor = pow2( saturate( 1.0 - pow4( lightDistance / cutoffDistance ) ) );\n\t\t\treturn distanceFalloff * maxDistanceCutoffFactor;\n#else\n\t\t\treturn pow( saturate( -lightDistance / cutoffDistance + 1.0 ), decayExponent );\n#endif\n\t\t}\n\t\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 );\n\tfloat G = G_GGX_SmithCorrelated( alpha, dotNL, dotNV );\n\tfloat D = D_GGX( alpha, dotNH );\n\treturn F * ( G * D );\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",Ha="#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}\n\tvec3 perturbNormalArb( vec3 surf_pos, vec3 surf_norm, vec2 dHdxy ) {\n\t\tvec3 vSigmaX = dFdx( surf_pos );\n\t\tvec3 vSigmaY = dFdy( surf_pos );\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",Wa="#if NUM_CLIPPING_PLANES > 0\n\tfor ( int i = 0; i < NUM_CLIPPING_PLANES; ++ i ) {\n\t\tvec4 plane = clippingPlanes[ i ];\n\t\tif ( dot( vViewPosition, plane.xyz ) > plane.w ) discard;\n\t}\n#endif\n",Xa="#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",qa="#if NUM_CLIPPING_PLANES > 0 && ! defined( PHYSICAL ) && ! defined( PHONG )\n\tvarying vec3 vViewPosition;\n#endif\n",Ya="#if NUM_CLIPPING_PLANES > 0 && ! defined( PHYSICAL ) && ! defined( PHONG )\n\tvViewPosition = - mvPosition.xyz;\n#endif\n",Za="#ifdef USE_COLOR\n\tdiffuseColor.rgb *= vColor;\n#endif",Ja="#ifdef USE_COLOR\n\tvarying vec3 vColor;\n#endif\n",$a="#ifdef USE_COLOR\n\tvarying vec3 vColor;\n#endif",Ka="#ifdef USE_COLOR\n\tvColor.xyz = color.xyz;\n#endif",Qa="#define PI 3.14159265359\n#define PI2 6.28318530718\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}\n",ts="#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);\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",es="#ifdef FLIP_SIDED\n\tobjectNormal = -objectNormal;\n#endif\nvec3 transformedNormal = normalMatrix * objectNormal;\n",ns="#ifdef USE_DISPLACEMENTMAP\n\tuniform sampler2D displacementMap;\n\tuniform float displacementScale;\n\tuniform float displacementBias;\n#endif\n",rs="#ifdef USE_DISPLACEMENTMAP\n\ttransformed += normal * ( texture2D( displacementMap, uv ).x * displacementScale + displacementBias );\n#endif\n",is="#ifdef USE_EMISSIVEMAP\n\tvec4 emissiveColor = texture2D( emissiveMap, vUv );\n\temissiveColor.rgb = emissiveMapTexelToLinear( emissiveColor ).rgb;\n\ttotalEmissiveRadiance *= emissiveColor.rgb;\n#endif\n",os="#ifdef USE_EMISSIVEMAP\n\tuniform sampler2D emissiveMap;\n#endif\n",as="  gl_FragColor = linearToOutputTexel( gl_FragColor );\n",ss="\nvec4 LinearToLinear( in vec4 value ) {\n  return value;\n}\nvec4 GammaToLinear( in vec4 value, in float gammaFactor ) {\n  return vec4( pow( value.xyz, vec3( gammaFactor ) ), value.w );\n}\nvec4 LinearToGamma( in vec4 value, in float gammaFactor ) {\n  return vec4( pow( value.xyz, vec3( 1.0 / gammaFactor ) ), value.w );\n}\nvec4 sRGBToLinear( in vec4 value ) {\n  return 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  return 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  return vec4( value.rgb * exp2( value.a * 255.0 - 128.0 ), 1.0 );\n}\nvec4 LinearToRGBE( in vec4 value ) {\n  float maxComponent = max( max( value.r, value.g ), value.b );\n  float fExp = clamp( ceil( log2( maxComponent ) ), -128.0, 127.0 );\n  return vec4( value.rgb / exp2( fExp ), ( fExp + 128.0 ) / 255.0 );\n}\nvec4 RGBMToLinear( in vec4 value, in float maxRange ) {\n  return vec4( value.xyz * value.w * maxRange, 1.0 );\n}\nvec4 LinearToRGBM( in vec4 value, in float maxRange ) {\n  float maxRGB = max( value.x, max( value.g, value.b ) );\n  float M      = clamp( maxRGB / maxRange, 0.0, 1.0 );\n  M            = ceil( M * 255.0 ) / 255.0;\n  return vec4( value.rgb / ( M * maxRange ), M );\n}\nvec4 RGBDToLinear( in vec4 value, in float maxRange ) {\n    return vec4( value.rgb * ( ( maxRange / 255.0 ) / value.a ), 1.0 );\n}\nvec4 LinearToRGBD( in vec4 value, in float maxRange ) {\n    float maxRGB = max( value.x, max( value.g, value.b ) );\n    float D      = max( maxRange / maxRGB, 1.0 );\n    D            = min( floor( D ) / 255.0, 1.0 );\n    return 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  vec3 Xp_Y_XYZp = value.rgb * cLogLuvM;\n  Xp_Y_XYZp = max(Xp_Y_XYZp, vec3(1e-6, 1e-6, 1e-6));\n  vec4 vResult;\n  vResult.xy = Xp_Y_XYZp.xy / Xp_Y_XYZp.z;\n  float Le = 2.0 * log2(Xp_Y_XYZp.y) + 127.0;\n  vResult.w = fract(Le);\n  vResult.z = (Le - (floor(vResult.w*255.0))/255.0)/255.0;\n  return 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  float Le = value.z * 255.0 + value.w;\n  vec3 Xp_Y_XYZp;\n  Xp_Y_XYZp.y = exp2((Le - 127.0) / 2.0);\n  Xp_Y_XYZp.z = Xp_Y_XYZp.y / value.y;\n  Xp_Y_XYZp.x = value.x * Xp_Y_XYZp.z;\n  vec3 vRGB = Xp_Y_XYZp.rgb * cLogLuvInverseM;\n  return vec4( max(vRGB, 0.0), 1.0 );\n}\n",cs="#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, flipNormal * vec3( flipEnvMap * reflectVec.x, reflectVec.yz ) );\n\t#elif defined( ENVMAP_TYPE_EQUIREC )\n\t\tvec2 sampleUV;\n\t\tsampleUV.y = saturate( flipNormal * reflectVec.y * 0.5 + 0.5 );\n\t\tsampleUV.x = atan( flipNormal * reflectVec.z, flipNormal * reflectVec.x ) * RECIPROCAL_PI2 + 0.5;\n\t\tvec4 envColor = texture2D( envMap, sampleUV );\n\t#elif defined( ENVMAP_TYPE_SPHERE )\n\t\tvec3 reflectView = flipNormal * 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",us="#if defined( USE_ENVMAP ) || defined( PHYSICAL )\n\tuniform float reflectivity;\n\tuniform float envMapIntenstiy;\n#endif\n#ifdef USE_ENVMAP\n\t#if ! defined( PHYSICAL ) && ( defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) )\n\t\tvarying vec3 vWorldPosition;\n\t#endif\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tuniform samplerCube envMap;\n\t#else\n\t\tuniform sampler2D envMap;\n\t#endif\n\tuniform float flipEnvMap;\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( PHYSICAL )\n\t\tuniform float refractionRatio;\n\t#else\n\t\tvarying vec3 vReflect;\n\t#endif\n#endif\n",ls="#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",hs="#ifdef USE_ENVMAP\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG )\n\t\tvWorldPosition = worldPosition.xyz;\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",fs="#ifdef USE_FOG\n\t#ifdef USE_LOGDEPTHBUF_EXT\n\t\tfloat depth = gl_FragDepthEXT / gl_FragCoord.w;\n\t#else\n\t\tfloat depth = gl_FragCoord.z / gl_FragCoord.w;\n\t#endif\n\t#ifdef FOG_EXP2\n\t\tfloat fogFactor = whiteCompliment( exp2( - fogDensity * fogDensity * depth * depth * LOG2 ) );\n\t#else\n\t\tfloat fogFactor = smoothstep( fogNear, fogFar, depth );\n\t#endif\n\tgl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor );\n#endif\n",ps="#ifdef USE_FOG\n\tuniform vec3 fogColor;\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",ds="#ifdef USE_LIGHTMAP\n\treflectedLight.indirectDiffuse += PI * texture2D( lightMap, vUv2 ).xyz * lightMapIntensity;\n#endif\n",ms="#ifdef USE_LIGHTMAP\n\tuniform sampler2D lightMap;\n\tuniform float lightMapIntensity;\n#endif",vs="vec3 diffuse = vec3( 1.0 );\nGeometricContext geometry;\ngeometry.position = mvPosition.xyz;\ngeometry.normal = normalize( transformedNormal );\ngeometry.viewDir = normalize( -mvPosition.xyz );\nGeometricContext backGeometry;\nbackGeometry.position = geometry.position;\nbackGeometry.normal = -geometry.normal;\nbackGeometry.viewDir = geometry.viewDir;\nvLightFront = vec3( 0.0 );\n#ifdef DOUBLE_SIDED\n\tvLightBack = vec3( 0.0 );\n#endif\nIncidentLight directLight;\nfloat dotNL;\nvec3 directLightColor_Diffuse;\n#if NUM_POINT_LIGHTS > 0\n\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\n\t\tgetPointDirectLightIrradiance( pointLights[ i ], geometry, directLight );\n\t\tdotNL = dot( geometry.normal, directLight.direction );\n\t\tdirectLightColor_Diffuse = PI * directLight.color;\n\t\tvLightFront += saturate( dotNL ) * directLightColor_Diffuse;\n\t\t#ifdef DOUBLE_SIDED\n\t\t\tvLightBack += saturate( -dotNL ) * directLightColor_Diffuse;\n\t\t#endif\n\t}\n#endif\n#if NUM_SPOT_LIGHTS > 0\n\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\n\t\tgetSpotDirectLightIrradiance( spotLights[ i ], geometry, directLight );\n\t\tdotNL = dot( geometry.normal, directLight.direction );\n\t\tdirectLightColor_Diffuse = PI * directLight.color;\n\t\tvLightFront += saturate( dotNL ) * directLightColor_Diffuse;\n\t\t#ifdef DOUBLE_SIDED\n\t\t\tvLightBack += saturate( -dotNL ) * directLightColor_Diffuse;\n\t\t#endif\n\t}\n#endif\n#if NUM_DIR_LIGHTS > 0\n\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n\t\tgetDirectionalDirectLightIrradiance( directionalLights[ i ], geometry, directLight );\n\t\tdotNL = dot( geometry.normal, directLight.direction );\n\t\tdirectLightColor_Diffuse = PI * directLight.color;\n\t\tvLightFront += saturate( dotNL ) * directLightColor_Diffuse;\n\t\t#ifdef DOUBLE_SIDED\n\t\t\tvLightBack += saturate( -dotNL ) * directLightColor_Diffuse;\n\t\t#endif\n\t}\n#endif\n#if NUM_HEMI_LIGHTS > 0\n\tfor ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {\n\t\tvLightFront += getHemisphereLightIrradiance( hemisphereLights[ i ], geometry );\n\t\t#ifdef DOUBLE_SIDED\n\t\t\tvLightBack += getHemisphereLightIrradiance( hemisphereLights[ i ], backGeometry );\n\t\t#endif\n\t}\n#endif\n",gs="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};\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\tif ( testLightInRange( lightDistance, pointLight.distance ) ) {\n\t\t\tdirectLight.color = pointLight.color;\n\t\t\tdirectLight.color *= punctualLightIntensityToIrradianceFactor( lightDistance, pointLight.distance, pointLight.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_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 ( all( bvec2( angleCos > spotLight.coneCos, testLightInRange( lightDistance, spotLight.distance ) ) ) ) {\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_HEMI_LIGHTS > 0\n\tstruct HemisphereLight {\n\t\tvec3 direction;\n\t\tvec3 skyColor;\n\t\tvec3 groundColor;\n\t};\n\tuniform HemisphereLight hemisphereLights[ NUM_HEMI_LIGHTS ];\n\tvec3 getHemisphereLightIrradiance( const in HemisphereLight hemiLight, const in GeometricContext geometry ) {\n\t\tfloat dotNL = dot( geometry.normal, hemiLight.direction );\n\t\tfloat hemiDiffuseWeight = 0.5 * dotNL + 0.5;\n\t\tvec3 irradiance = mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight );\n\t\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\t\tirradiance *= PI;\n\t\t#endif\n\t\treturn irradiance;\n\t}\n#endif\n#if defined( USE_ENVMAP ) && defined( PHYSICAL )\n\tvec3 getLightProbeIndirectIrradiance( const in GeometricContext geometry, const in int maxMIPLevel ) {\n\t\t#include <normal_flip>\n\t\tvec3 worldNormal = inverseTransformDirection( geometry.normal, viewMatrix );\n\t\t#ifdef ENVMAP_TYPE_CUBE\n\t\t\tvec3 queryVec = flipNormal * 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 = flipNormal * 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\t#include <normal_flip>\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 = flipNormal * 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 = flipNormal * vec3( flipEnvMap * reflectVec.x, reflectVec.yz );\n\t\t\tvec4 envMapColor = textureCubeUV(queryReflectVec, BlinnExponentToGGXRoughness(blinnShininessExponent));\n\t\t#elif defined( ENVMAP_TYPE_EQUIREC )\n\t\t\tvec2 sampleUV;\n\t\t\tsampleUV.y = saturate( flipNormal * reflectVec.y * 0.5 + 0.5 );\n\t\t\tsampleUV.x = atan( flipNormal * reflectVec.z, flipNormal * 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 = flipNormal * 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",ys="BlinnPhongMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;\nmaterial.specularColor = specular;\nmaterial.specularShininess = shininess;\nmaterial.specularStrength = specularStrength;\n",xs="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\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\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",_s="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",ws="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}\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_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",bs="\nGeometricContext geometry;\ngeometry.position = - vViewPosition;\ngeometry.normal = normal;\ngeometry.viewDir = normalize( vViewPosition );\nIncidentLight directLight;\n#if ( NUM_POINT_LIGHTS > 0 ) && defined( RE_Direct )\n\tPointLight pointLight;\n\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\n\t\tpointLight = pointLights[ i ];\n\t\tgetPointDirectLightIrradiance( pointLight, geometry, directLight );\n\t\t#ifdef USE_SHADOWMAP\n\t\tdirectLight.color *= all( bvec2( pointLight.shadow, directLight.visible ) ) ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ] ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometry, material, reflectedLight );\n\t}\n#endif\n#if ( NUM_SPOT_LIGHTS > 0 ) && defined( RE_Direct )\n\tSpotLight spotLight;\n\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\n\t\tspotLight = spotLights[ i ];\n\t\tgetSpotDirectLightIrradiance( spotLight, geometry, directLight );\n\t\t#ifdef USE_SHADOWMAP\n\t\tdirectLight.color *= all( bvec2( spotLight.shadow, directLight.visible ) ) ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowBias, spotLight.shadowRadius, vSpotShadowCoord[ i ] ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometry, material, reflectedLight );\n\t}\n#endif\n#if ( NUM_DIR_LIGHTS > 0 ) && defined( RE_Direct )\n\tDirectionalLight directionalLight;\n\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n\t\tdirectionalLight = directionalLights[ i ];\n\t\tgetDirectionalDirectLightIrradiance( directionalLight, geometry, directLight );\n\t\t#ifdef USE_SHADOWMAP\n\t\tdirectLight.color *= all( bvec2( directionalLight.shadow, directLight.visible ) ) ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometry, material, reflectedLight );\n\t}\n#endif\n#if defined( RE_IndirectDiffuse )\n\tvec3 irradiance = getAmbientLightIrradiance( ambientLightColor );\n\t#ifdef USE_LIGHTMAP\n\t\tvec3 lightMapIrradiance = texture2D( lightMap, vUv2 ).xyz * lightMapIntensity;\n\t\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\t\tlightMapIrradiance *= PI;\n\t\t#endif\n\t\tirradiance += lightMapIrradiance;\n\t#endif\n\t#if ( NUM_HEMI_LIGHTS > 0 )\n\t\tfor ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {\n\t\t\tirradiance += getHemisphereLightIrradiance( hemisphereLights[ i ], geometry );\n\t\t}\n\t#endif\n\t#if defined( USE_ENVMAP ) && defined( PHYSICAL ) && defined( ENVMAP_TYPE_CUBE_UV )\n\t \tirradiance += getLightProbeIndirectIrradiance( geometry, 8 );\n\t#endif\n\tRE_IndirectDiffuse( irradiance, geometry, material, reflectedLight );\n#endif\n#if defined( USE_ENVMAP ) && defined( RE_IndirectSpecular )\n\tvec3 radiance = getLightProbeIndirectRadiance( geometry, Material_BlinnShininessExponent( material ), 8 );\n\t#ifndef STANDARD\n\t\tvec3 clearCoatRadiance = getLightProbeIndirectRadiance( geometry, Material_ClearCoat_BlinnShininessExponent( material ), 8 );\n\t#else\n\t\tvec3 clearCoatRadiance = vec3( 0.0 );\n\t#endif\n\t\t\n\tRE_IndirectSpecular( radiance, clearCoatRadiance, geometry, material, reflectedLight );\n#endif\n",Ms="#if defined(USE_LOGDEPTHBUF) && defined(USE_LOGDEPTHBUF_EXT)\n\tgl_FragDepthEXT = log2(vFragDepth) * logDepthBufFC * 0.5;\n#endif",Es="#ifdef USE_LOGDEPTHBUF\n\tuniform float logDepthBufFC;\n\t#ifdef USE_LOGDEPTHBUF_EXT\n\t\tvarying float vFragDepth;\n\t#endif\n#endif\n",Ss="#ifdef USE_LOGDEPTHBUF\n\t#ifdef USE_LOGDEPTHBUF_EXT\n\t\tvarying float vFragDepth;\n\t#endif\n\tuniform float logDepthBufFC;\n#endif",Ts="#ifdef USE_LOGDEPTHBUF\n\tgl_Position.z = log2(max( EPSILON, gl_Position.w + 1.0 )) * logDepthBufFC;\n\t#ifdef USE_LOGDEPTHBUF_EXT\n\t\tvFragDepth = 1.0 + gl_Position.w;\n\t#else\n\t\tgl_Position.z = (gl_Position.z - 1.0) * gl_Position.w;\n\t#endif\n#endif\n",As="#ifdef USE_MAP\n\tvec4 texelColor = texture2D( map, vUv );\n\ttexelColor = mapTexelToLinear( texelColor );\n\tdiffuseColor *= texelColor;\n#endif\n",Ls="#ifdef USE_MAP\n\tuniform sampler2D map;\n#endif\n",Cs="#ifdef USE_MAP\n\tvec4 mapTexel = texture2D( map, vec2( gl_PointCoord.x, 1.0 - gl_PointCoord.y ) * offsetRepeat.zw + offsetRepeat.xy );\n\tdiffuseColor *= mapTexelToLinear( mapTexel );\n#endif\n",Ps="#ifdef USE_MAP\n\tuniform vec4 offsetRepeat;\n\tuniform sampler2D map;\n#endif\n",Rs="float metalnessFactor = metalness;\n#ifdef USE_METALNESSMAP\n\tvec4 texelMetalness = texture2D( metalnessMap, vUv );\n\tmetalnessFactor *= texelMetalness.r;\n#endif\n",Is="#ifdef USE_METALNESSMAP\n\tuniform sampler2D metalnessMap;\n#endif",Os="#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",Us="#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",Ns="#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",Fs="#ifdef DOUBLE_SIDED\n\tfloat flipNormal = ( float( gl_FrontFacing ) * 2.0 - 1.0 );\n#else\n\tfloat flipNormal = 1.0;\n#endif\n",Ds="#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 ) * flipNormal;\n#endif\n#ifdef USE_NORMALMAP\n\tnormal = perturbNormal2Arb( -vViewPosition, normal );\n#elif defined( USE_BUMPMAP )\n\tnormal = perturbNormalArb( -vViewPosition, normal, dHdxy_fwd() );\n#endif\n",zs="#ifdef USE_NORMALMAP\n\tuniform sampler2D normalMap;\n\tuniform vec2 normalScale;\n\tvec3 perturbNormal2Arb( vec3 eye_pos, vec3 surf_norm ) {\n\t\tvec3 q0 = dFdx( eye_pos.xyz );\n\t\tvec3 q1 = dFdy( eye_pos.xyz );\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",Bs="vec3 packNormalToRGB( const in vec3 normal ) {\n  return normalize( normal ) * 0.5 + 0.5;\n}\nvec3 unpackRGBToNormal( const in vec3 rgb ) {\n  return 1.0 - 2.0 * rgb.xyz;\n}\nconst float PackUpscale = 256. / 255.;const float UnpackDownscale = 255. / 256.;\nconst vec3 PackFactors = vec3( 256. * 256. * 256., 256. * 256.,  256. );\nconst vec4 UnpackFactors = UnpackDownscale / vec4( PackFactors, 1. );\nconst float ShiftRight8 = 1. / 256.;\nvec4 packDepthToRGBA( const in float v ) {\n\tvec4 r = vec4( fract( v * PackFactors ), v );\n\tr.yzw -= r.xyz * ShiftRight8;\treturn r * PackUpscale;\n}\nfloat unpackRGBAToDepth( const in vec4 v ) {\n\treturn dot( v, UnpackFactors );\n}\nfloat viewZToOrthographicDepth( const in float viewZ, const in float near, const in float far ) {\n  return ( viewZ + near ) / ( near - far );\n}\nfloat orthographicDepthToViewZ( const in float linearClipZ, const in float near, const in float far ) {\n  return linearClipZ * ( near - far ) - near;\n}\nfloat viewZToPerspectiveDepth( const in float viewZ, const in float near, const in float far ) {\n  return (( near + viewZ ) * far ) / (( far - near ) * viewZ );\n}\nfloat perspectiveDepthToViewZ( const in float invClipZ, const in float near, const in float far ) {\n  return ( near * far ) / ( ( far - near ) * invClipZ - far );\n}\n",ks="#ifdef PREMULTIPLIED_ALPHA\n\tgl_FragColor.rgb *= gl_FragColor.a;\n#endif\n",js="#ifdef USE_SKINNING\n\tvec4 mvPosition = modelViewMatrix * skinned;\n#else\n\tvec4 mvPosition = modelViewMatrix * vec4( transformed, 1.0 );\n#endif\ngl_Position = projectionMatrix * mvPosition;\n",Gs="float roughnessFactor = roughness;\n#ifdef USE_ROUGHNESSMAP\n\tvec4 texelRoughness = texture2D( roughnessMap, vUv );\n\troughnessFactor *= texelRoughness.r;\n#endif\n",Vs="#ifdef USE_ROUGHNESSMAP\n\tuniform sampler2D roughnessMap;\n#endif",Hs="#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\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\treturn (\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\treturn (\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\treturn texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z );\n\t\t#endif\n\t\t}\n\t\treturn 1.0;\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 ) {\n\t\tvec2 texelSize = vec2( 1.0 ) / ( shadowMapSize * vec2( 4.0, 2.0 ) );\n\t\tvec3 lightToPosition = shadowCoord.xyz;\n\t\tvec3 bd3D = normalize( lightToPosition );\n\t\tfloat dp = ( length( lightToPosition ) - shadowBias ) / 1000.0;\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",Ws="#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",Xs="#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHTS > 0\n\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n\t\tvDirectionalShadowCoord[ i ] = directionalShadowMatrix[ i ] * worldPosition;\n\t}\n\t#endif\n\t#if NUM_SPOT_LIGHTS > 0\n\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\n\t\tvSpotShadowCoord[ i ] = spotShadowMatrix[ i ] * worldPosition;\n\t}\n\t#endif\n\t#if NUM_POINT_LIGHTS > 0\n\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\n\t\tvPointShadowCoord[ i ] = pointShadowMatrix[ i ] * worldPosition;\n\t}\n\t#endif\n#endif\n",qs="float getShadowMask() {\n\tfloat shadow = 1.0;\n\t#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHTS > 0\n\tDirectionalLight directionalLight;\n\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n\t\tdirectionalLight = directionalLights[ i ];\n\t\tshadow *= bool( directionalLight.shadow ) ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n\t}\n\t#endif\n\t#if NUM_SPOT_LIGHTS > 0\n\tSpotLight spotLight;\n\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\n\t\tspotLight = spotLights[ i ];\n\t\tshadow *= bool( spotLight.shadow ) ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowBias, spotLight.shadowRadius, vSpotShadowCoord[ i ] ) : 1.0;\n\t}\n\t#endif\n\t#if NUM_POINT_LIGHTS > 0\n\tPointLight pointLight;\n\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\n\t\tpointLight = pointLights[ i ];\n\t\tshadow *= bool( pointLight.shadow ) ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ] ) : 1.0;\n\t}\n\t#endif\n\t#endif\n\treturn shadow;\n}\n",Ys="#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",Zs="#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 boneTextureWidth;\n\t\tuniform int boneTextureHeight;\n\t\tmat4 getBoneMatrix( const in float i ) {\n\t\t\tfloat j = i * 4.0;\n\t\t\tfloat x = mod( j, float( boneTextureWidth ) );\n\t\t\tfloat y = floor( j / float( boneTextureWidth ) );\n\t\t\tfloat dx = 1.0 / float( boneTextureWidth );\n\t\t\tfloat dy = 1.0 / float( boneTextureHeight );\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",Js="#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\tskinned  = bindMatrixInverse * skinned;\n#endif\n",$s="#ifdef USE_SKINNING\n\tmat4 skinMatrix = mat4( 0.0 );\n\tskinMatrix += skinWeight.x * boneMatX;\n\tskinMatrix += skinWeight.y * boneMatY;\n\tskinMatrix += skinWeight.z * boneMatZ;\n\tskinMatrix += skinWeight.w * boneMatW;\n\tskinMatrix  = bindMatrixInverse * skinMatrix * bindMatrix;\n\tobjectNormal = vec4( skinMatrix * vec4( objectNormal, 0.0 ) ).xyz;\n#endif\n",Ks="float specularStrength;\n#ifdef USE_SPECULARMAP\n\tvec4 texelSpecular = texture2D( specularMap, vUv );\n\tspecularStrength = texelSpecular.r;\n#else\n\tspecularStrength = 1.0;\n#endif",Qs="#ifdef USE_SPECULARMAP\n\tuniform sampler2D specularMap;\n#endif",tc="#if defined( TONE_MAPPING )\n  gl_FragColor.rgb = toneMapping( gl_FragColor.rgb );\n#endif\n",ec="#define saturate(a) clamp( a, 0.0, 1.0 )\nuniform float toneMappingExposure;\nuniform float toneMappingWhitePoint;\nvec3 LinearToneMapping( vec3 color ) {\n  return toneMappingExposure * color;\n}\nvec3 ReinhardToneMapping( vec3 color ) {\n  color *= toneMappingExposure;\n  return 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  color *= toneMappingExposure;\n  return saturate( Uncharted2Helper( color ) / Uncharted2Helper( vec3( toneMappingWhitePoint ) ) );\n}\nvec3 OptimizedCineonToneMapping( vec3 color ) {\n  color *= toneMappingExposure;\n  color = max( vec3( 0.0 ), color - 0.004 );\n  return pow( ( color * ( 6.2 * color + 0.5 ) ) / ( color * ( 6.2 * color + 1.7 ) + 0.06 ), vec3( 2.2 ) );\n}\n",nc="#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",rc="#if defined( USE_MAP ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( USE_SPECULARMAP ) || defined( USE_ALPHAMAP ) || defined( USE_EMISSIVEMAP ) || defined( USE_ROUGHNESSMAP ) || defined( USE_METALNESSMAP )\n\tvarying vec2 vUv;\n\tuniform vec4 offsetRepeat;\n#endif\n",ic="#if defined( USE_MAP ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( USE_SPECULARMAP ) || defined( USE_ALPHAMAP ) || defined( USE_EMISSIVEMAP ) || defined( USE_ROUGHNESSMAP ) || defined( USE_METALNESSMAP )\n\tvUv = uv * offsetRepeat.zw + offsetRepeat.xy;\n#endif",oc="#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\n\tvarying vec2 vUv2;\n#endif",ac="#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\n\tattribute vec2 uv2;\n\tvarying vec2 vUv2;\n#endif",sc="#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\n\tvUv2 = uv2;\n#endif",cc="#if defined( USE_ENVMAP ) || defined( PHONG ) || defined( PHYSICAL ) || defined( LAMBERT ) || defined ( USE_SHADOWMAP )\n\t#ifdef USE_SKINNING\n\t\tvec4 worldPosition = modelMatrix * skinned;\n\t#else\n\t\tvec4 worldPosition = modelMatrix * vec4( transformed, 1.0 );\n\t#endif\n#endif\n",uc="uniform samplerCube tCube;\nuniform float tFlip;\nuniform float opacity;\nvarying vec3 vWorldPosition;\n#include <common>\nvoid main() {\n\tgl_FragColor = textureCube( tCube, vec3( tFlip * vWorldPosition.x, vWorldPosition.yz ) );\n\tgl_FragColor.a *= opacity;\n}\n",lc="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",hc="#if DEPTH_PACKING == 3200\n\tuniform float opacity;\n#endif\n#include <common>\n#include <packing>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( 1.0 );\n\t#if DEPTH_PACKING == 3200\n\t\tdiffuseColor.a = opacity;\n\t#endif\n\t#include <map_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <logdepthbuf_fragment>\n\t#if DEPTH_PACKING == 3200\n\t\tgl_FragColor = vec4( vec3( gl_FragCoord.z ), opacity );\n\t#elif DEPTH_PACKING == 3201\n\t\tgl_FragColor = packDepthToRGBA( gl_FragCoord.z );\n\t#endif\n}\n",fc="#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#include <begin_vertex>\n\t#include <displacementmap_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}\n",pc="uniform vec3 lightPos;\nvarying vec4 vWorldPosition;\n#include <common>\n#include <packing>\n#include <clipping_planes_pars_fragment>\nvoid main () {\n\t#include <clipping_planes_fragment>\n\tgl_FragColor = packDepthToRGBA( length( vWorldPosition.xyz - lightPos.xyz ) / 1000.0 );\n}\n",dc="varying vec4 vWorldPosition;\n#include <common>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <skinbase_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <project_vertex>\n\t#include <worldpos_vertex>\n\t#include <clipping_planes_vertex>\n\tvWorldPosition = worldPosition;\n}\n",mc="uniform sampler2D tEquirect;\nuniform float tFlip;\nvarying vec3 vWorldPosition;\n#include <common>\nvoid main() {\n\tvec3 direction = normalize( vWorldPosition );\n\tvec2 sampleUV;\n\tsampleUV.y = saturate( tFlip * direction.y * -0.5 + 0.5 );\n\tsampleUV.x = atan( direction.z, direction.x ) * RECIPROCAL_PI2 + 0.5;\n\tgl_FragColor = texture2D( tEquirect, sampleUV );\n}\n",vc="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",gc="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",yc="uniform float scale;\nattribute float lineDistance;\nvarying float vLineDistance;\n#include <common>\n#include <color_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}\n",xc="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 <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;\n\treflectedLight.directDiffuse = vec3( 0.0 );\n\treflectedLight.directSpecular = vec3( 0.0 );\n\treflectedLight.indirectDiffuse = diffuseColor.rgb;\n\treflectedLight.indirectSpecular = vec3( 0.0 );\n\t#include <aomap_fragment>\n\tvec3 outgoingLight = reflectedLight.indirectDiffuse;\n\t#include <normal_flip>\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",_c="#include <common>\n#include <uv_pars_vertex>\n#include <uv2_pars_vertex>\n#include <envmap_pars_vertex>\n#include <color_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}\n",wc="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 <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <uv2_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <envmap_pars_fragment>\n#include <bsdfs>\n#include <lights_pars>\n#include <fog_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <shadowmask_pars_fragment>\n#include <specularmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <specularmap_fragment>\n\t#include <emissivemap_fragment>\n\treflectedLight.indirectDiffuse = getAmbientLightIrradiance( ambientLightColor );\n\t#include <lightmap_fragment>\n\treflectedLight.indirectDiffuse *= BRDF_Diffuse_Lambert( diffuseColor.rgb );\n\t#ifdef DOUBLE_SIDED\n\t\treflectedLight.directDiffuse = ( gl_FrontFacing ) ? vLightFront : vLightBack;\n\t#else\n\t\treflectedLight.directDiffuse = vLightFront;\n\t#endif\n\treflectedLight.directDiffuse *= BRDF_Diffuse_Lambert( diffuseColor.rgb ) * getShadowMask();\n\t#include <aomap_fragment>\n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\n\t#include <normal_flip>\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",bc="#define LAMBERT\nvarying vec3 vLightFront;\n#ifdef DOUBLE_SIDED\n\tvarying vec3 vLightBack;\n#endif\n#include <common>\n#include <uv_pars_vertex>\n#include <uv2_pars_vertex>\n#include <envmap_pars_vertex>\n#include <bsdfs>\n#include <lights_pars>\n#include <color_pars_vertex>\n#include <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}\n",Mc="#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 <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 <lights_pars>\n#include <lights_phong_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <specularmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <specularmap_fragment>\n\t#include <normal_flip>\n\t#include <normal_fragment>\n\t#include <emissivemap_fragment>\n\t#include <lights_phong_fragment>\n\t#include <lights_template>\n\t#include <aomap_fragment>\n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;\n\t#include <envmap_fragment>\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <premultiplied_alpha_fragment>\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n}\n",Ec="#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 <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 <displacementmap_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\tvViewPosition = - mvPosition.xyz;\n\t#include <worldpos_vertex>\n\t#include <envmap_vertex>\n\t#include <shadowmap_vertex>\n}\n",Sc="#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\nuniform float envMapIntensity;\nvarying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include <common>\n#include <packing>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <uv2_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <envmap_pars_fragment>\n#include <fog_pars_fragment>\n#include <bsdfs>\n#include <cube_uv_reflection_fragment>\n#include <lights_pars>\n#include <lights_physical_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <roughnessmap_pars_fragment>\n#include <metalnessmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <specularmap_fragment>\n\t#include <roughnessmap_fragment>\n\t#include <metalnessmap_fragment>\n\t#include <normal_flip>\n\t#include <normal_fragment>\n\t#include <emissivemap_fragment>\n\t#include <lights_physical_fragment>\n\t#include <lights_template>\n\t#include <aomap_fragment>\n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <premultiplied_alpha_fragment>\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n}\n",Tc="#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 <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <specularmap_pars_fragment>\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 <displacementmap_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\tvViewPosition = - mvPosition.xyz;\n\t#include <worldpos_vertex>\n\t#include <shadowmap_vertex>\n}\n",Ac="uniform float opacity;\nvarying vec3 vNormal;\n#include <common>\n#include <packing>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tgl_FragColor = vec4( packNormalToRGB( vNormal ), opacity );\n\t#include <logdepthbuf_fragment>\n}\n",Lc="varying vec3 vNormal;\n#include <common>\n#include <morphtarget_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\tvNormal = normalize( normalMatrix * normal );\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n}\n",Cc="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",Pc="uniform float size;\nuniform float scale;\n#include <common>\n#include <color_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}\n",Rc="uniform float opacity;\n#include <common>\n#include <packing>\n#include <bsdfs>\n#include <lights_pars>\n#include <shadowmap_pars_fragment>\n#include <shadowmask_pars_fragment>\nvoid main() {\n\tgl_FragColor = vec4( 0.0, 0.0, 0.0, opacity * ( 1.0  - getShadowMask() ) );\n}\n",Ic="#include <shadowmap_pars_vertex>\nvoid main() {\n\t#include <begin_vertex>\n\t#include <project_vertex>\n\t#include <worldpos_vertex>\n\t#include <shadowmap_vertex>\n}\n",Oc={
  alphamap_fragment:Fa,alphamap_pars_fragment:Da,alphatest_fragment:za,aomap_fragment:Ba,aomap_pars_fragment:ka,begin_vertex:ja,beginnormal_vertex:Ga,bsdfs:Va,bumpmap_pars_fragment:Ha,clipping_planes_fragment:Wa,clipping_planes_pars_fragment:Xa,clipping_planes_pars_vertex:qa,clipping_planes_vertex:Ya,color_fragment:Za,color_pars_fragment:Ja,color_pars_vertex:$a,color_vertex:Ka,common:Qa,cube_uv_reflection_fragment:ts,defaultnormal_vertex:es,displacementmap_pars_vertex:ns,displacementmap_vertex:rs,emissivemap_fragment:is,emissivemap_pars_fragment:os,encodings_fragment:as,encodings_pars_fragment:ss,envmap_fragment:cs,envmap_pars_fragment:us,envmap_pars_vertex:ls,envmap_vertex:hs,fog_fragment:fs,fog_pars_fragment:ps,lightmap_fragment:ds,lightmap_pars_fragment:ms,lights_lambert_vertex:vs,lights_pars:gs,lights_phong_fragment:ys,lights_phong_pars_fragment:xs,lights_physical_fragment:_s,lights_physical_pars_fragment:ws,lights_template:bs,logdepthbuf_fragment:Ms,logdepthbuf_pars_fragment:Es,logdepthbuf_pars_vertex:Ss,logdepthbuf_vertex:Ts,map_fragment:As,map_pars_fragment:Ls,map_particle_fragment:Cs,map_particle_pars_fragment:Ps,metalnessmap_fragment:Rs,metalnessmap_pars_fragment:Is,morphnormal_vertex:Os,morphtarget_pars_vertex:Us,morphtarget_vertex:Ns,normal_flip:Fs,normal_fragment:Ds,normalmap_pars_fragment:zs,packing:Bs,premultiplied_alpha_fragment:ks,project_vertex:js,roughnessmap_fragment:Gs,roughnessmap_pars_fragment:Vs,shadowmap_pars_fragment:Hs,shadowmap_pars_vertex:Ws,shadowmap_vertex:Xs,shadowmask_pars_fragment:qs,skinbase_vertex:Ys,skinning_pars_vertex:Zs,skinning_vertex:Js,skinnormal_vertex:$s,specularmap_fragment:Ks,specularmap_pars_fragment:Qs,tonemapping_fragment:tc,tonemapping_pars_fragment:ec,uv_pars_fragment:nc,uv_pars_vertex:rc,uv_vertex:ic,uv2_pars_fragment:oc,uv2_pars_vertex:ac,uv2_vertex:sc,worldpos_vertex:cc,cube_frag:uc,cube_vert:lc,depth_frag:hc,depth_vert:fc,distanceRGBA_frag:pc,distanceRGBA_vert:dc,equirect_frag:mc,equirect_vert:vc,linedashed_frag:gc,linedashed_vert:yc,meshbasic_frag:xc,meshbasic_vert:_c,meshlambert_frag:wc,meshlambert_vert:bc,meshphong_frag:Mc,meshphong_vert:Ec,meshphysical_frag:Sc,meshphysical_vert:Tc,normal_frag:Ac,normal_vert:Lc,points_frag:Cc,points_vert:Pc,shadow_frag:Rc,shadow_vert:Ic};X.prototype={constructor:X,isColor:!0,r:1,g:1,b:1,set:function(t){return t&&t.isColor?this.copy(t):"number"==typeof t?this.setHex(t):"string"==typeof t&&this.setStyle(t),this},setScalar:function(t){this.r=t,this.g=t,this.b=t},setHex:function(t){return t=Math.floor(t),this.r=(t>>16&255)/255,this.g=(t>>8&255)/255,this.b=(255&t)/255,this},setRGB:function(t,e,n){return this.r=t,this.g=e,this.b=n,this},setHSL:function(){function e(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+6*(e-t)*(2/3-n):t}return function(n,r,i){if(n=t.Math.euclideanModulo(n,1),r=t.Math.clamp(r,0,1),i=t.Math.clamp(i,0,1),0===r)this.r=this.g=this.b=i;else{var o=i<=.5?i*(1+r):i+r-i*r,a=2*i-o;this.r=e(a,o,n+1/3),this.g=e(a,o,n),this.b=e(a,o,n-1/3)}return this}}(),setStyle:function(e){function n(t){void 0!==t&&parseFloat(t)<1&&console.warn("THREE.Color: Alpha component of "+e+" will be ignored.")}var r;if(r=/^((?:rgb|hsl)a?)\(\s*([^\)]*)\)/.exec(e)){var i,o=r[1],a=r[2];switch(o){case"rgb":case"rgba":if(i=/^(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(,\s*([0-9]*\.?[0-9]+)\s*)?$/.exec(a))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,n(i[5]),this;if(i=/^(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(,\s*([0-9]*\.?[0-9]+)\s*)?$/.exec(a))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,n(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(a)){var s=parseFloat(i[1])/360,c=parseInt(i[2],10)/100,u=parseInt(i[3],10)/100;return n(i[5]),this.setHSL(s,c,u)}}}else if(r=/^\#([A-Fa-f0-9]+)$/.exec(e)){var l=r[1],h=l.length;if(3===h)return this.r=parseInt(l.charAt(0)+l.charAt(0),16)/255,this.g=parseInt(l.charAt(1)+l.charAt(1),16)/255,this.b=parseInt(l.charAt(2)+l.charAt(2),16)/255,this;if(6===h)return this.r=parseInt(l.charAt(0)+l.charAt(1),16)/255,this.g=parseInt(l.charAt(2)+l.charAt(3),16)/255,this.b=parseInt(l.charAt(4)+l.charAt(5),16)/255,this}if(e&&e.length>0){var l=t.ColorKeywords[e];void 0!==l?this.setHex(l):console.warn("THREE.Color: Unknown color "+e)}return this},clone:function(){return new this.constructor(this.r,this.g,this.b)},copy:function(t){return this.r=t.r,this.g=t.g,this.b=t.b,this},copyGammaToLinear:function(t,e){return void 0===e&&(e=2),this.r=Math.pow(t.r,e),this.g=Math.pow(t.g,e),this.b=Math.pow(t.b,e),this},copyLinearToGamma:function(t,e){void 0===e&&(e=2);var n=e>0?1/e:1;return this.r=Math.pow(t.r,n),this.g=Math.pow(t.g,n),this.b=Math.pow(t.b,n),this},convertGammaToLinear:function(){var t=this.r,e=this.g,n=this.b;return this.r=t*t,this.g=e*e,this.b=n*n,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(t){var e,n,r=t||{h:0,s:0,l:0},i=this.r,o=this.g,a=this.b,s=Math.max(i,o,a),c=Math.min(i,o,a),u=(c+s)/2;if(c===s)e=0,n=0;else{var l=s-c;switch(n=u<=.5?l/(s+c):l/(2-s-c),s){case i:e=(o-a)/l+(o<a?6:0);break;case o:e=(a-i)/l+2;break;case a:e=(i-o)/l+4}e/=6}return r.h=e,r.s=n,r.l=u,r},getStyle:function(){return"rgb("+(255*this.r|0)+","+(255*this.g|0)+","+(255*this.b|0)+")"},offsetHSL:function(t,e,n){var r=this.getHSL();return r.h+=t,r.s+=e,r.l+=n,this.setHSL(r.h,r.s,r.l),this},add:function(t){return this.r+=t.r,this.g+=t.g,this.b+=t.b,this},addColors:function(t,e){return this.r=t.r+e.r,this.g=t.g+e.g,this.b=t.b+e.b,this},addScalar:function(t){return this.r+=t,this.g+=t,this.b+=t,this},sub:function(t){return this.r=Math.max(0,this.r-t.r),this.g=Math.max(0,this.g-t.g),this.b=Math.max(0,this.b-t.b),this},multiply:function(t){return this.r*=t.r,this.g*=t.g,this.b*=t.b,this},multiplyScalar:function(t){return this.r*=t,this.g*=t,this.b*=t,this},lerp:function(t,e){return this.r+=(t.r-this.r)*e,this.g+=(t.g-this.g)*e,this.b+=(t.b-this.b)*e,this},equals:function(t){return t.r===this.r&&t.g===this.g&&t.b===this.b},fromArray:function(t,e){return void 0===e&&(e=0),this.r=t[e],this.g=t[e+1],this.b=t[e+2],this},toArray:function(t,e){return void 0===t&&(t=[]),void 0===e&&(e=0),t[e]=this.r,t[e+1]=this.g,t[e+2]=this.b,t},toJSON:function(){return this.getHex()}},t.ColorKeywords={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,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};var Uc={common:{diffuse:{value:new X(15658734)},opacity:{value:1},map:{value:null},offsetRepeat:{value:new o(0,0,1,1)},specularMap:{value:null},alphaMap:{value:null},envMap:{value:null},flipEnvMap:{value:-1},reflectivity:{value:1},refractionRatio:{value:.98}},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 n(1,1)}},displacementmap:{displacementMap:{value:null},displacementScale:{value:1},displacementBias:{value:0}},roughnessmap:{roughnessMap:{value:null}},metalnessmap:{metalnessMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new X(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:{}}},pointShadowMap:{value:[]},pointShadowMatrix:{value:[]},hemisphereLights:{value:[],properties:{direction:{},skyColor:{},groundColor:{}}}},points:{diffuse:{value:new X(15658734)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},offsetRepeat:{value:new o(0,0,1,1)}}},Nc={basic:{uniforms:t.UniformsUtils.merge([Uc.common,Uc.aomap,Uc.fog]),vertexShader:Oc.meshbasic_vert,fragmentShader:Oc.meshbasic_frag},lambert:{uniforms:t.UniformsUtils.merge([Uc.common,Uc.aomap,Uc.lightmap,Uc.emissivemap,Uc.fog,Uc.lights,{emissive:{value:new X(0)}}]),vertexShader:Oc.meshlambert_vert,fragmentShader:Oc.meshlambert_frag},phong:{uniforms:t.UniformsUtils.merge([Uc.common,Uc.aomap,Uc.lightmap,Uc.emissivemap,Uc.bumpmap,Uc.normalmap,Uc.displacementmap,Uc.fog,Uc.lights,{emissive:{value:new X(0)},specular:{value:new X(1118481)},shininess:{value:30}}]),vertexShader:Oc.meshphong_vert,fragmentShader:Oc.meshphong_frag},standard:{uniforms:t.UniformsUtils.merge([Uc.common,Uc.aomap,Uc.lightmap,Uc.emissivemap,Uc.bumpmap,Uc.normalmap,Uc.displacementmap,Uc.roughnessmap,Uc.metalnessmap,Uc.fog,Uc.lights,{emissive:{value:new X(0)},roughness:{value:.5},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:Oc.meshphysical_vert,fragmentShader:Oc.meshphysical_frag},points:{uniforms:t.UniformsUtils.merge([Uc.points,Uc.fog]),vertexShader:Oc.points_vert,fragmentShader:Oc.points_frag},dashed:{uniforms:t.UniformsUtils.merge([Uc.common,Uc.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:Oc.linedashed_vert,fragmentShader:Oc.linedashed_frag},depth:{uniforms:t.UniformsUtils.merge([Uc.common,Uc.displacementmap]),vertexShader:Oc.depth_vert,fragmentShader:Oc.depth_frag},normal:{uniforms:{opacity:{value:1}},vertexShader:Oc.normal_vert,fragmentShader:Oc.normal_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:Oc.cube_vert,fragmentShader:Oc.cube_frag},equirect:{uniforms:{tEquirect:{value:null},tFlip:{value:-1}},vertexShader:Oc.equirect_vert,fragmentShader:Oc.equirect_frag},distanceRGBA:{uniforms:{lightPos:{value:new u}},vertexShader:Oc.distanceRGBA_vert,fragmentShader:Oc.distanceRGBA_frag}};Nc.physical={uniforms:t.UniformsUtils.merge([Nc.standard.uniforms,{clearCoat:{value:0},clearCoatRoughness:{value:0}}]),vertexShader:Oc.meshphysical_vert,fragmentShader:Oc.meshphysical_frag},q.prototype={constructor:q,set:function(t,e){return this.min.copy(t),this.max.copy(e),this},setFromPoints:function(t){this.makeEmpty();for(var e=0,n=t.length;e<n;e++)this.expandByPoint(t[e]);return this},setFromCenterAndSize:function(){var t=new n;return function(e,n){var r=t.copy(n).multiplyScalar(.5);return this.min.copy(e).sub(r),this.max.copy(e).add(r),this}}(),clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.min.copy(t.min),this.max.copy(t.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(t){var e=t||new n;return this.isEmpty()?e.set(0,0):e.addVectors(this.min,this.max).multiplyScalar(.5)},getSize:function(t){var e=t||new n;return this.isEmpty()?e.set(0,0):e.subVectors(this.max,this.min)},expandByPoint:function(t){return this.min.min(t),this.max.max(t),this},expandByVector:function(t){return this.min.sub(t),this.max.add(t),this},expandByScalar:function(t){return this.min.addScalar(-t),this.max.addScalar(t),this},containsPoint:function(t){return!(t.x<this.min.x||t.x>this.max.x||t.y<this.min.y||t.y>this.max.y)},containsBox:function(t){return this.min.x<=t.min.x&&t.max.x<=this.max.x&&this.min.y<=t.min.y&&t.max.y<=this.max.y},getParameter:function(t,e){var r=e||new n;return r.set((t.x-this.min.x)/(this.max.x-this.min.x),(t.y-this.min.y)/(this.max.y-this.min.y))},intersectsBox:function(t){return!(t.max.x<this.min.x||t.min.x>this.max.x||t.max.y<this.min.y||t.min.y>this.max.y)},clampPoint:function(t,e){var r=e||new n;return r.copy(t).clamp(this.min,this.max)},distanceToPoint:function(){var t=new n;return function(e){var n=t.copy(e).clamp(this.min,this.max);return n.sub(e).length()}}(),intersect:function(t){return this.min.max(t.min),this.max.min(t.max),this},union:function(t){return this.min.min(t.min),this.max.max(t.max),this},translate:function(t){return this.min.add(t),this.max.add(t),this},equals:function(t){return t.min.equals(this.min)&&t.max.equals(this.max)}},J.prototype={constructor:J,isMaterial:!0,get needsUpdate(){return this._needsUpdate},set needsUpdate(t){t===!0&&this.update(),this._needsUpdate=t},setValues:function(t){if(void 0!==t)for(var e in t){var n=t[e];if(void 0!==n){var r=this[e];void 0!==r?r&&r.isColor?r.set(n):r&&r.isVector3&&n&&n.isVector3?r.copy(n):"overdraw"===e?this[e]=Number(n):this[e]=n:console.warn("THREE."+this.type+": '"+e+"' is not a property of this material.")}else console.warn("THREE.Material: '"+e+"' parameter is undefined.")}},toJSON:function(t){function e(t){var e=[];for(var n in t){var r=t[n];delete r.metadata,e.push(r)}return e}var n=void 0===t;n&&(t={textures:{},images:{}});var r={metadata:{version:4.4,type:"Material",generator:"Material.toJSON"}};if(r.uuid=this.uuid,r.type=this.type,""!==this.name&&(r.name=this.name),this.color&&this.color.isColor&&(r.color=this.color.getHex()),void 0!==this.roughness&&(r.roughness=this.roughness),void 0!==this.metalness&&(r.metalness=this.metalness),this.emissive&&this.emissive.isColor&&(r.emissive=this.emissive.getHex()),this.specular&&this.specular.isColor&&(r.specular=this.specular.getHex()),void 0!==this.shininess&&(r.shininess=this.shininess),this.map&&this.map.isTexture&&(r.map=this.map.toJSON(t).uuid),this.alphaMap&&this.alphaMap.isTexture&&(r.alphaMap=this.alphaMap.toJSON(t).uuid),this.lightMap&&this.lightMap.isTexture&&(r.lightMap=this.lightMap.toJSON(t).uuid),this.bumpMap&&this.bumpMap.isTexture&&(r.bumpMap=this.bumpMap.toJSON(t).uuid,r.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(r.normalMap=this.normalMap.toJSON(t).uuid,r.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(r.displacementMap=this.displacementMap.toJSON(t).uuid,r.displacementScale=this.displacementScale,r.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(r.roughnessMap=this.roughnessMap.toJSON(t).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(r.metalnessMap=this.metalnessMap.toJSON(t).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(r.emissiveMap=this.emissiveMap.toJSON(t).uuid),this.specularMap&&this.specularMap.isTexture&&(r.specularMap=this.specularMap.toJSON(t).uuid),this.envMap&&this.envMap.isTexture&&(r.envMap=this.envMap.toJSON(t).uuid,r.reflectivity=this.reflectivity),void 0!==this.size&&(r.size=this.size),void 0!==this.sizeAttenuation&&(r.sizeAttenuation=this.sizeAttenuation),this.blending!==Li&&(r.blending=this.blending),this.shading!==Mi&&(r.shading=this.shading),this.side!==xi&&(r.side=this.side),this.vertexColors!==Ei&&(r.vertexColors=this.vertexColors),this.opacity<1&&(r.opacity=this.opacity),this.transparent===!0&&(r.transparent=this.transparent),r.depthFunc=this.depthFunc,r.depthTest=this.depthTest,r.depthWrite=this.depthWrite,this.alphaTest>0&&(r.alphaTest=this.alphaTest),this.premultipliedAlpha===!0&&(r.premultipliedAlpha=this.premultipliedAlpha),this.wireframe===!0&&(r.wireframe=this.wireframe),this.wireframeLinewidth>1&&(r.wireframeLinewidth=this.wireframeLinewidth),"round"!==this.wireframeLinecap&&(r.wireframeLinecap=this.wireframeLinecap),"round"!==this.wireframeLinejoin&&(r.wireframeLinejoin=this.wireframeLinejoin),r.skinning=this.skinning,r.morphTargets=this.morphTargets,n){var i=e(t.textures),o=e(t.images);i.length>0&&(r.textures=i),o.length>0&&(r.images=o)}return r},clone:function(){return(new this.constructor).copy(this)},copy:function(t){this.name=t.name,this.fog=t.fog,this.lights=t.lights,this.blending=t.blending,this.side=t.side,this.shading=t.shading,this.vertexColors=t.vertexColors,this.opacity=t.opacity,this.transparent=t.transparent,this.blendSrc=t.blendSrc,this.blendDst=t.blendDst,this.blendEquation=t.blendEquation,this.blendSrcAlpha=t.blendSrcAlpha,this.blendDstAlpha=t.blendDstAlpha,this.blendEquationAlpha=t.blendEquationAlpha,this.depthFunc=t.depthFunc,this.depthTest=t.depthTest,this.depthWrite=t.depthWrite,this.colorWrite=t.colorWrite,this.precision=t.precision,this.polygonOffset=t.polygonOffset,this.polygonOffsetFactor=t.polygonOffsetFactor,this.polygonOffsetUnits=t.polygonOffsetUnits,this.alphaTest=t.alphaTest,this.premultipliedAlpha=t.premultipliedAlpha,this.overdraw=t.overdraw,this.visible=t.visible,this.clipShadows=t.clipShadows;var e=t.clippingPlanes,n=null;if(null!==e){var r=e.length;n=new Array(r);for(var i=0;i!==r;++i)n[i]=e[i].clone()}return this.clippingPlanes=n,this},update:function(){this.dispatchEvent({type:"update"})},dispose:function(){this.dispatchEvent({type:"dispose"})}},Object.assign(J.prototype,e.prototype);var Fc=0;K.prototype=Object.create(J.prototype),K.prototype.constructor=K,K.prototype.isShaderMaterial=!0,K.prototype.copy=function(e){return J.prototype.copy.call(this,e),this.fragmentShader=e.fragmentShader,this.vertexShader=e.vertexShader,this.uniforms=t.UniformsUtils.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},K.prototype.toJSON=function(t){var e=J.prototype.toJSON.call(this,t);return e.uniforms=this.uniforms,e.vertexShader=this.vertexShader,e.fragmentShader=this.fragmentShader,e},Q.prototype=Object.create(J.prototype),Q.prototype.constructor=Q,Q.prototype.isMeshDepthMaterial=!0,Q.prototype.copy=function(t){return J.prototype.copy.call(this,t),this.depthPacking=t.depthPacking,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.map=t.map,this.alphaMap=t.alphaMap,this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this},tt.prototype={constructor:tt,isBox3:!0,set:function(t,e){return this.min.copy(t),this.max.copy(e),this},setFromArray:function(t){for(var e=+(1/0),n=+(1/0),r=+(1/0),i=-(1/0),o=-(1/0),a=-(1/0),s=0,c=t.length;s<c;s+=3){var u=t[s],l=t[s+1],h=t[s+2];u<e&&(e=u),l<n&&(n=l),h<r&&(r=h),u>i&&(i=u),l>o&&(o=l),h>a&&(a=h)}this.min.set(e,n,r),this.max.set(i,o,a)},setFromPoints:function(t){this.makeEmpty();for(var e=0,n=t.length;e<n;e++)this.expandByPoint(t[e]);return this},setFromCenterAndSize:function(){var t=new u;return function(e,n){var r=t.copy(n).multiplyScalar(.5);return this.min.copy(e).sub(r),this.max.copy(e).add(r),this}}(),setFromObject:function(){var t=new u;return function(e){var n=this;return e.updateMatrixWorld(!0),this.makeEmpty(),e.traverse(function(e){var r=e.geometry;if(void 0!==r)if(r&&r.isGeometry)for(var i=r.vertices,o=0,a=i.length;o<a;o++)t.copy(i[o]),t.applyMatrix4(e.matrixWorld),n.expandByPoint(t);else if(r&&r.isBufferGeometry){var s=r.attributes.position;if(void 0!==s){var c,u,l;s&&s.isInterleavedBufferAttribute?(c=s.data.array,u=s.offset,l=s.data.stride):(c=s.array,u=0,l=3);for(var o=u,a=c.length;o<a;o+=l)t.fromArray(c,o),t.applyMatrix4(e.matrixWorld),n.expandByPoint(t)}}}),this}}(),clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.min.copy(t.min),this.max.copy(t.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(t){var e=t||new u;return this.isEmpty()?e.set(0,0,0):e.addVectors(this.min,this.max).multiplyScalar(.5)},getSize:function(t){var e=t||new u;return this.isEmpty()?e.set(0,0,0):e.subVectors(this.max,this.min)},expandByPoint:function(t){return this.min.min(t),this.max.max(t),this},expandByVector:function(t){return this.min.sub(t),this.max.add(t),this},expandByScalar:function(t){return this.min.addScalar(-t),this.max.addScalar(t),this},containsPoint:function(t){return!(t.x<this.min.x||t.x>this.max.x||t.y<this.min.y||t.y>this.max.y||t.z<this.min.z||t.z>this.max.z)},containsBox:function(t){return this.min.x<=t.min.x&&t.max.x<=this.max.x&&this.min.y<=t.min.y&&t.max.y<=this.max.y&&this.min.z<=t.min.z&&t.max.z<=this.max.z},getParameter:function(t,e){var n=e||new u;return n.set((t.x-this.min.x)/(this.max.x-this.min.x),(t.y-this.min.y)/(this.max.y-this.min.y),(t.z-this.min.z)/(this.max.z-this.min.z))},intersectsBox:function(t){return!(t.max.x<this.min.x||t.min.x>this.max.x||t.max.y<this.min.y||t.min.y>this.max.y||t.max.z<this.min.z||t.min.z>this.max.z)},intersectsSphere:function(){var t;return function(e){return void 0===t&&(t=new u),this.clampPoint(e.center,t),t.distanceToSquared(e.center)<=e.radius*e.radius}}(),intersectsPlane:function(t){var e,n;return t.normal.x>0?(e=t.normal.x*this.min.x,n=t.normal.x*this.max.x):(e=t.normal.x*this.max.x,n=t.normal.x*this.min.x),t.normal.y>0?(e+=t.normal.y*this.min.y,n+=t.normal.y*this.max.y):(e+=t.normal.y*this.max.y,n+=t.normal.y*this.min.y),t.normal.z>0?(e+=t.normal.z*this.min.z,n+=t.normal.z*this.max.z):(e+=t.normal.z*this.max.z,n+=t.normal.z*this.min.z),e<=t.constant&&n>=t.constant},clampPoint:function(t,e){var n=e||new u;return n.copy(t).clamp(this.min,this.max)},distanceToPoint:function(){var t=new u;return function(e){var n=t.copy(e).clamp(this.min,this.max);return n.sub(e).length()}}(),getBoundingSphere:function(){var t=new u;return function(e){var n=e||new et;return this.getCenter(n.center),n.radius=.5*this.size(t).length(),n}}(),intersect:function(t){return this.min.max(t.min),this.max.min(t.max),this.isEmpty()&&this.makeEmpty(),this},union:function(t){return this.min.min(t.min),this.max.max(t.max),this},applyMatrix4:function(){var t=[new u,new u,new u,new u,new u,new u,new u,new u];return function(e){return this.isEmpty()?this:(t[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(e),t[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(e),t[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(e),t[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(e),t[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(e),t[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(e),t[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(e),t[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(e),this.setFromPoints(t),this)}}(),translate:function(t){return this.min.add(t),this.max.add(t),this},equals:function(t){return t.min.equals(this.min)&&t.max.equals(this.max)}},et.prototype={constructor:et,set:function(t,e){return this.center.copy(t),this.radius=e,this},setFromPoints:function(){var t=new tt;return function(e,n){var r=this.center;void 0!==n?r.copy(n):t.setFromPoints(e).getCenter(r);for(var i=0,o=0,a=e.length;o<a;o++)i=Math.max(i,r.distanceToSquared(e[o]));return this.radius=Math.sqrt(i),this}}(),clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.center.copy(t.center),this.radius=t.radius,this},empty:function(){return this.radius<=0},containsPoint:function(t){return t.distanceToSquared(this.center)<=this.radius*this.radius},distanceToPoint:function(t){return t.distanceTo(this.center)-this.radius},intersectsSphere:function(t){var e=this.radius+t.radius;return t.center.distanceToSquared(this.center)<=e*e},intersectsBox:function(t){return t.intersectsSphere(this)},intersectsPlane:function(t){return Math.abs(this.center.dot(t.normal)-t.constant)<=this.radius},clampPoint:function(t,e){var n=this.center.distanceToSquared(t),r=e||new u;return r.copy(t),n>this.radius*this.radius&&(r.sub(this.center).normalize(),r.multiplyScalar(this.radius).add(this.center)),r},getBoundingBox:function(t){var e=t||new tt;return e.set(this.center,this.center),e.expandByScalar(this.radius),e},applyMatrix4:function(t){return this.center.applyMatrix4(t),this.radius=this.radius*t.getMaxScaleOnAxis(),this},translate:function(t){return this.center.add(t),this},equals:function(t){return t.center.equals(this.center)&&t.radius===this.radius}},nt.prototype={constructor:nt,isMatrix3:!0,set:function(t,e,n,r,i,o,a,s,c){var u=this.elements;return u[0]=t,u[1]=r,u[2]=a,u[3]=e,u[4]=i,u[5]=s,u[6]=n,u[7]=o,u[8]=c,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(t){var e=t.elements;return this.set(e[0],e[3],e[6],e[1],e[4],e[7],e[2],e[5],e[8]),this},setFromMatrix4:function(t){var e=t.elements;return this.set(e[0],e[4],e[8],e[1],e[5],e[9],e[2],e[6],e[10]),this},applyToVector3Array:function(){var t;return function(e,n,r){void 0===t&&(t=new u),void 0===n&&(n=0),void 0===r&&(r=e.length);for(var i=0,o=n;i<r;i+=3,o+=3)t.fromArray(e,o),t.applyMatrix3(this),t.toArray(e,o);return e}}(),applyToBuffer:function(){var t;return function(e,n,r){void 0===t&&(t=new u),void 0===n&&(n=0),void 0===r&&(r=e.length/e.itemSize);for(var i=0,o=n;i<r;i++,o++)t.x=e.getX(o),t.y=e.getY(o),t.z=e.getZ(o),t.applyMatrix3(this),e.setXYZ(t.x,t.y,t.z);return e}}(),multiplyScalar:function(t){var e=this.elements;return e[0]*=t,e[3]*=t,e[6]*=t,e[1]*=t,e[4]*=t,e[7]*=t,e[2]*=t,e[5]*=t,e[8]*=t,this},determinant:function(){var t=this.elements,e=t[0],n=t[1],r=t[2],i=t[3],o=t[4],a=t[5],s=t[6],c=t[7],u=t[8];return e*o*u-e*a*c-n*i*u+n*a*s+r*i*c-r*o*s},getInverse:function(t,e){t&&t.isMatrix4&&console.error("THREE.Matrix3.getInverse no longer takes a Matrix4 argument.");var n=t.elements,r=this.elements,i=n[0],o=n[1],a=n[2],s=n[3],c=n[4],u=n[5],l=n[6],h=n[7],f=n[8],p=f*c-u*h,d=u*l-f*s,m=h*s-c*l,v=i*p+o*d+a*m;if(0===v){var g="THREE.Matrix3.getInverse(): can't invert matrix, determinant is 0";if(e===!0)throw new Error(g);return console.warn(g),this.identity()}var y=1/v;return r[0]=p*y,r[1]=(a*h-f*o)*y,r[2]=(u*o-a*c)*y,r[3]=d*y,r[4]=(f*i-a*l)*y,r[5]=(a*s-u*i)*y,r[6]=m*y,r[7]=(o*l-h*i)*y,r[8]=(c*i-o*s)*y,this},transpose:function(){var t,e=this.elements;return t=e[1],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},flattenToArrayOffset:function(t,e){return console.warn("THREE.Matrix3: .flattenToArrayOffset is deprecated - just use .toArray instead."),this.toArray(t,e)},getNormalMatrix:function(t){return this.setFromMatrix4(t).getInverse(this).transpose()},transposeIntoArray:function(t){var e=this.elements;return t[0]=e[0],t[1]=e[3],t[2]=e[6],t[3]=e[1],t[4]=e[4],t[5]=e[7],t[6]=e[2],t[7]=e[5],t[8]=e[8],this},fromArray:function(t,e){void 0===e&&(e=0);for(var n=0;n<9;n++)this.elements[n]=t[n+e];return this},toArray:function(t,e){void 0===t&&(t=[]),void 0===e&&(e=0);var n=this.elements;return t[e]=n[0],t[e+1]=n[1],t[e+2]=n[2],t[e+3]=n[3],t[e+4]=n[4],t[e+5]=n[5],t[e+6]=n[6],t[e+7]=n[7],t[e+8]=n[8],t}},rt.prototype={constructor:rt,set:function(t,e){return this.normal.copy(t),this.constant=e,this},setComponents:function(t,e,n,r){return this.normal.set(t,e,n),this.constant=r,this},setFromNormalAndCoplanarPoint:function(t,e){return this.normal.copy(t),this.constant=-e.dot(this.normal),this},setFromCoplanarPoints:function(){var t=new u,e=new u;return function(n,r,i){var o=t.subVectors(i,r).cross(e.subVectors(n,r)).normalize();return this.setFromNormalAndCoplanarPoint(o,n),this}}(),clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.normal.copy(t.normal),this.constant=t.constant,this},normalize:function(){var t=1/this.normal.length();return this.normal.multiplyScalar(t),this.constant*=t,this},negate:function(){return this.constant*=-1,this.normal.negate(),this},distanceToPoint:function(t){return this.normal.dot(t)+this.constant},distanceToSphere:function(t){return this.distanceToPoint(t.center)-t.radius},projectPoint:function(t,e){return this.orthoPoint(t,e).sub(t).negate()},orthoPoint:function(t,e){var n=this.distanceToPoint(t),r=e||new u;return r.copy(this.normal).multiplyScalar(n)},intersectLine:function(){var t=new u;return function(e,n){var r=n||new u,i=e.delta(t),o=this.normal.dot(i);if(0!==o){var a=-(e.start.dot(this.normal)+this.constant)/o;if(!(a<0||a>1))return r.copy(i).multiplyScalar(a).add(e.start)}else if(0===this.distanceToPoint(e.start))return r.copy(e.start)}}(),intersectsLine:function(t){var e=this.distanceToPoint(t.start),n=this.distanceToPoint(t.end);return e<0&&n>0||n<0&&e>0},intersectsBox:function(t){return t.intersectsPlane(this)},intersectsSphere:function(t){return t.intersectsPlane(this)},coplanarPoint:function(t){var e=t||new u;return e.copy(this.normal).multiplyScalar(-this.constant)},applyMatrix4:function(){var t=new u,e=new nt;return function(n,r){var i=this.coplanarPoint(t).applyMatrix4(n),o=r||e.getNormalMatrix(n),a=this.normal.applyMatrix3(o).normalize();return this.constant=-i.dot(a),this}}(),translate:function(t){return this.constant=this.constant-t.dot(this.normal),this},equals:function(t){return t.normal.equals(this.normal)&&t.constant===this.constant}},it.prototype={constructor:it,set:function(t,e,n,r,i,o){var a=this.planes;return a[0].copy(t),a[1].copy(e),a[2].copy(n),a[3].copy(r),a[4].copy(i),a[5].copy(o),this},clone:function(){return(new this.constructor).copy(this);
  },copy:function(t){for(var e=this.planes,n=0;n<6;n++)e[n].copy(t.planes[n]);return this},setFromMatrix:function(t){var e=this.planes,n=t.elements,r=n[0],i=n[1],o=n[2],a=n[3],s=n[4],c=n[5],u=n[6],l=n[7],h=n[8],f=n[9],p=n[10],d=n[11],m=n[12],v=n[13],g=n[14],y=n[15];return e[0].setComponents(a-r,l-s,d-h,y-m).normalize(),e[1].setComponents(a+r,l+s,d+h,y+m).normalize(),e[2].setComponents(a+i,l+c,d+f,y+v).normalize(),e[3].setComponents(a-i,l-c,d-f,y-v).normalize(),e[4].setComponents(a-o,l-u,d-p,y-g).normalize(),e[5].setComponents(a+o,l+u,d+p,y+g).normalize(),this},intersectsObject:function(){var t=new et;return function(e){var n=e.geometry;return null===n.boundingSphere&&n.computeBoundingSphere(),t.copy(n.boundingSphere).applyMatrix4(e.matrixWorld),this.intersectsSphere(t)}}(),intersectsSprite:function(){var t=new et;return function(e){return t.center.set(0,0,0),t.radius=.7071067811865476,t.applyMatrix4(e.matrixWorld),this.intersectsSphere(t)}}(),intersectsSphere:function(t){for(var e=this.planes,n=t.center,r=-t.radius,i=0;i<6;i++){var o=e[i].distanceToPoint(n);if(o<r)return!1}return!0},intersectsBox:function(){var t=new u,e=new u;return function(n){for(var r=this.planes,i=0;i<6;i++){var o=r[i];t.x=o.normal.x>0?n.min.x:n.max.x,e.x=o.normal.x>0?n.max.x:n.min.x,t.y=o.normal.y>0?n.min.y:n.max.y,e.y=o.normal.y>0?n.max.y:n.min.y,t.z=o.normal.z>0?n.min.z:n.max.z,e.z=o.normal.z>0?n.max.z:n.min.z;var a=o.distanceToPoint(t),s=o.distanceToPoint(e);if(a<0&&s<0)return!1}return!0}}(),containsPoint:function(t){for(var e=this.planes,n=0;n<6;n++)if(e[n].distanceToPoint(t)<0)return!1;return!0}},at.prototype={constructor:at,set:function(t,e){return this.origin.copy(t),this.direction.copy(e),this},clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.origin.copy(t.origin),this.direction.copy(t.direction),this},at:function(t,e){var n=e||new u;return n.copy(this.direction).multiplyScalar(t).add(this.origin)},lookAt:function(t){return this.direction.copy(t).sub(this.origin).normalize(),this},recast:function(){var t=new u;return function(e){return this.origin.copy(this.at(e,t)),this}}(),closestPointToPoint:function(t,e){var n=e||new u;n.subVectors(t,this.origin);var r=n.dot(this.direction);return r<0?n.copy(this.origin):n.copy(this.direction).multiplyScalar(r).add(this.origin)},distanceToPoint:function(t){return Math.sqrt(this.distanceSqToPoint(t))},distanceSqToPoint:function(){var t=new u;return function(e){var n=t.subVectors(e,this.origin).dot(this.direction);return n<0?this.origin.distanceToSquared(e):(t.copy(this.direction).multiplyScalar(n).add(this.origin),t.distanceToSquared(e))}}(),distanceSqToSegment:function(){var t=new u,e=new u,n=new u;return function(r,i,o,a){t.copy(r).add(i).multiplyScalar(.5),e.copy(i).sub(r).normalize(),n.copy(this.origin).sub(t);var s,c,u,l,h=.5*r.distanceTo(i),f=-this.direction.dot(e),p=n.dot(this.direction),d=-n.dot(e),m=n.lengthSq(),v=Math.abs(1-f*f);if(v>0)if(s=f*d-p,c=f*p-d,l=h*v,s>=0)if(c>=-l)if(c<=l){var g=1/v;s*=g,c*=g,u=s*(s+f*c+2*p)+c*(f*s+c+2*d)+m}else c=h,s=Math.max(0,-(f*c+p)),u=-s*s+c*(c+2*d)+m;else c=-h,s=Math.max(0,-(f*c+p)),u=-s*s+c*(c+2*d)+m;else c<=-l?(s=Math.max(0,-(-f*h+p)),c=s>0?-h:Math.min(Math.max(-h,-d),h),u=-s*s+c*(c+2*d)+m):c<=l?(s=0,c=Math.min(Math.max(-h,-d),h),u=c*(c+2*d)+m):(s=Math.max(0,-(f*h+p)),c=s>0?h:Math.min(Math.max(-h,-d),h),u=-s*s+c*(c+2*d)+m);else c=f>0?-h:h,s=Math.max(0,-(f*c+p)),u=-s*s+c*(c+2*d)+m;return o&&o.copy(this.direction).multiplyScalar(s).add(this.origin),a&&a.copy(e).multiplyScalar(c).add(t),u}}(),intersectSphere:function(){var t=new u;return function(e,n){t.subVectors(e.center,this.origin);var r=t.dot(this.direction),i=t.dot(t)-r*r,o=e.radius*e.radius;if(i>o)return null;var a=Math.sqrt(o-i),s=r-a,c=r+a;return s<0&&c<0?null:s<0?this.at(c,n):this.at(s,n)}}(),intersectsSphere:function(t){return this.distanceToPoint(t.center)<=t.radius},distanceToPlane:function(t){var e=t.normal.dot(this.direction);if(0===e)return 0===t.distanceToPoint(this.origin)?0:null;var n=-(this.origin.dot(t.normal)+t.constant)/e;return n>=0?n:null},intersectPlane:function(t,e){var n=this.distanceToPlane(t);return null===n?null:this.at(n,e)},intersectsPlane:function(t){var e=t.distanceToPoint(this.origin);if(0===e)return!0;var n=t.normal.dot(this.direction);return n*e<0},intersectBox:function(t,e){var n,r,i,o,a,s,c=1/this.direction.x,u=1/this.direction.y,l=1/this.direction.z,h=this.origin;return c>=0?(n=(t.min.x-h.x)*c,r=(t.max.x-h.x)*c):(n=(t.max.x-h.x)*c,r=(t.min.x-h.x)*c),u>=0?(i=(t.min.y-h.y)*u,o=(t.max.y-h.y)*u):(i=(t.max.y-h.y)*u,o=(t.min.y-h.y)*u),n>o||i>r?null:((i>n||n!==n)&&(n=i),(o<r||r!==r)&&(r=o),l>=0?(a=(t.min.z-h.z)*l,s=(t.max.z-h.z)*l):(a=(t.max.z-h.z)*l,s=(t.min.z-h.z)*l),n>s||a>r?null:((a>n||n!==n)&&(n=a),(s<r||r!==r)&&(r=s),r<0?null:this.at(n>=0?n:r,e)))},intersectsBox:function(){var t=new u;return function(e){return null!==this.intersectBox(e,t)}}(),intersectTriangle:function(){var t=new u,e=new u,n=new u,r=new u;return function(i,o,a,s,c){e.subVectors(o,i),n.subVectors(a,i),r.crossVectors(e,n);var u,l=this.direction.dot(r);if(l>0){if(s)return null;u=1}else{if(!(l<0))return null;u=-1,l=-l}t.subVectors(this.origin,i);var h=u*this.direction.dot(n.crossVectors(t,n));if(h<0)return null;var f=u*this.direction.dot(e.cross(t));if(f<0)return null;if(h+f>l)return null;var p=-u*t.dot(r);return p<0?null:this.at(p/l,c)}}(),applyMatrix4:function(t){return this.direction.add(this.origin).applyMatrix4(t),this.origin.applyMatrix4(t),this.direction.sub(this.origin),this.direction.normalize(),this},equals:function(t){return t.origin.equals(this.origin)&&t.direction.equals(this.direction)}},st.RotationOrders=["XYZ","YZX","ZXY","XZY","YXZ","ZYX"],st.DefaultOrder="XYZ",st.prototype={constructor:st,isEuler:!0,get x(){return this._x},set x(t){this._x=t,this.onChangeCallback()},get y(){return this._y},set y(t){this._y=t,this.onChangeCallback()},get z(){return this._z},set z(t){this._z=t,this.onChangeCallback()},get order(){return this._order},set order(t){this._order=t,this.onChangeCallback()},set:function(t,e,n,r){return this._x=t,this._y=e,this._z=n,this._order=r||this._order,this.onChangeCallback(),this},clone:function(){return new this.constructor(this._x,this._y,this._z,this._order)},copy:function(t){return this._x=t._x,this._y=t._y,this._z=t._z,this._order=t._order,this.onChangeCallback(),this},setFromRotationMatrix:function(e,n,r){var i=t.Math.clamp,o=e.elements,a=o[0],s=o[4],c=o[8],u=o[1],l=o[5],h=o[9],f=o[2],p=o[6],d=o[10];return n=n||this._order,"XYZ"===n?(this._y=Math.asin(i(c,-1,1)),Math.abs(c)<.99999?(this._x=Math.atan2(-h,d),this._z=Math.atan2(-s,a)):(this._x=Math.atan2(p,l),this._z=0)):"YXZ"===n?(this._x=Math.asin(-i(h,-1,1)),Math.abs(h)<.99999?(this._y=Math.atan2(c,d),this._z=Math.atan2(u,l)):(this._y=Math.atan2(-f,a),this._z=0)):"ZXY"===n?(this._x=Math.asin(i(p,-1,1)),Math.abs(p)<.99999?(this._y=Math.atan2(-f,d),this._z=Math.atan2(-s,l)):(this._y=0,this._z=Math.atan2(u,a))):"ZYX"===n?(this._y=Math.asin(-i(f,-1,1)),Math.abs(f)<.99999?(this._x=Math.atan2(p,d),this._z=Math.atan2(u,a)):(this._x=0,this._z=Math.atan2(-s,l))):"YZX"===n?(this._z=Math.asin(i(u,-1,1)),Math.abs(u)<.99999?(this._x=Math.atan2(-h,l),this._y=Math.atan2(-f,a)):(this._x=0,this._y=Math.atan2(c,d))):"XZY"===n?(this._z=Math.asin(-i(s,-1,1)),Math.abs(s)<.99999?(this._x=Math.atan2(p,l),this._y=Math.atan2(c,a)):(this._x=Math.atan2(-h,d),this._y=0)):console.warn("THREE.Euler: .setFromRotationMatrix() given unsupported order: "+n),this._order=n,r!==!1&&this.onChangeCallback(),this},setFromQuaternion:function(){var t;return function(e,n,r){return void 0===t&&(t=new l),t.makeRotationFromQuaternion(e),this.setFromRotationMatrix(t,n,r)}}(),setFromVector3:function(t,e){return this.set(t.x,t.y,t.z,e||this._order)},reorder:function(){var t=new c;return function(e){return t.setFromEuler(this),this.setFromQuaternion(t,e)}}(),equals:function(t){return t._x===this._x&&t._y===this._y&&t._z===this._z&&t._order===this._order},fromArray:function(t){return this._x=t[0],this._y=t[1],this._z=t[2],void 0!==t[3]&&(this._order=t[3]),this.onChangeCallback(),this},toArray:function(t,e){return void 0===t&&(t=[]),void 0===e&&(e=0),t[e]=this._x,t[e+1]=this._y,t[e+2]=this._z,t[e+3]=this._order,t},toVector3:function(t){return t?t.set(this._x,this._y,this._z):new u(this._x,this._y,this._z)},onChange:function(t){return this.onChangeCallback=t,this},onChangeCallback:function(){}},ct.prototype={constructor:ct,set:function(t){this.mask=1<<t},enable:function(t){this.mask|=1<<t},toggle:function(t){this.mask^=1<<t},disable:function(t){this.mask&=~(1<<t)},test:function(t){return 0!==(this.mask&t.mask)}},ut.DefaultUp=new u(0,1,0),ut.DefaultMatrixAutoUpdate=!0,Object.assign(ut.prototype,e.prototype,{isObject3D:!0,applyMatrix:function(t){this.matrix.multiplyMatrices(t,this.matrix),this.matrix.decompose(this.position,this.quaternion,this.scale)},setRotationFromAxisAngle:function(t,e){this.quaternion.setFromAxisAngle(t,e)},setRotationFromEuler:function(t){this.quaternion.setFromEuler(t,!0)},setRotationFromMatrix:function(t){this.quaternion.setFromRotationMatrix(t)},setRotationFromQuaternion:function(t){this.quaternion.copy(t)},rotateOnAxis:function(){var t=new c;return function(e,n){return t.setFromAxisAngle(e,n),this.quaternion.multiply(t),this}}(),rotateX:function(){var t=new u(1,0,0);return function(e){return this.rotateOnAxis(t,e)}}(),rotateY:function(){var t=new u(0,1,0);return function(e){return this.rotateOnAxis(t,e)}}(),rotateZ:function(){var t=new u(0,0,1);return function(e){return this.rotateOnAxis(t,e)}}(),translateOnAxis:function(){var t=new u;return function(e,n){return t.copy(e).applyQuaternion(this.quaternion),this.position.add(t.multiplyScalar(n)),this}}(),translateX:function(){var t=new u(1,0,0);return function(e){return this.translateOnAxis(t,e)}}(),translateY:function(){var t=new u(0,1,0);return function(e){return this.translateOnAxis(t,e)}}(),translateZ:function(){var t=new u(0,0,1);return function(e){return this.translateOnAxis(t,e)}}(),localToWorld:function(t){return t.applyMatrix4(this.matrixWorld)},worldToLocal:function(){var t=new l;return function(e){return e.applyMatrix4(t.getInverse(this.matrixWorld))}}(),lookAt:function(){var t=new l;return function(e){t.lookAt(e,this.position,this.up),this.quaternion.setFromRotationMatrix(t)}}(),add:function(t){if(arguments.length>1){for(var e=0;e<arguments.length;e++)this.add(arguments[e]);return this}return t===this?(console.error("THREE.Object3D.add: object can't be added as a child of itself.",t),this):(t&&t.isObject3D?(null!==t.parent&&t.parent.remove(t),t.parent=this,t.dispatchEvent({type:"added"}),this.children.push(t)):console.error("THREE.Object3D.add: object not an instance of THREE.Object3D.",t),this)},remove:function(t){if(arguments.length>1)for(var e=0;e<arguments.length;e++)this.remove(arguments[e]);var n=this.children.indexOf(t);n!==-1&&(t.parent=null,t.dispatchEvent({type:"removed"}),this.children.splice(n,1))},getObjectById:function(t){return this.getObjectByProperty("id",t)},getObjectByName:function(t){return this.getObjectByProperty("name",t)},getObjectByProperty:function(t,e){if(this[t]===e)return this;for(var n=0,r=this.children.length;n<r;n++){var i=this.children[n],o=i.getObjectByProperty(t,e);if(void 0!==o)return o}},getWorldPosition:function(t){var e=t||new u;return this.updateMatrixWorld(!0),e.setFromMatrixPosition(this.matrixWorld)},getWorldQuaternion:function(){var t=new u,e=new u;return function(n){var r=n||new c;return this.updateMatrixWorld(!0),this.matrixWorld.decompose(t,r,e),r}}(),getWorldRotation:function(){var t=new c;return function(e){var n=e||new st;return this.getWorldQuaternion(t),n.setFromQuaternion(t,this.rotation.order,!1)}}(),getWorldScale:function(){var t=new u,e=new c;return function(n){var r=n||new u;return this.updateMatrixWorld(!0),this.matrixWorld.decompose(t,e,r),r}}(),getWorldDirection:function(){var t=new c;return function(e){var n=e||new u;return this.getWorldQuaternion(t),n.set(0,0,1).applyQuaternion(t)}}(),raycast:function(){},traverse:function(t){t(this);for(var e=this.children,n=0,r=e.length;n<r;n++)e[n].traverse(t)},traverseVisible:function(t){if(this.visible!==!1){t(this);for(var e=this.children,n=0,r=e.length;n<r;n++)e[n].traverseVisible(t)}},traverseAncestors:function(t){var e=this.parent;null!==e&&(t(e),e.traverseAncestors(t))},updateMatrix:function(){this.matrix.compose(this.position,this.quaternion,this.scale),this.matrixWorldNeedsUpdate=!0},updateMatrixWorld:function(t){this.matrixAutoUpdate===!0&&this.updateMatrix(),this.matrixWorldNeedsUpdate!==!0&&t!==!0||(null===this.parent?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix),this.matrixWorldNeedsUpdate=!1,t=!0);for(var e=this.children,n=0,r=e.length;n<r;n++)e[n].updateMatrixWorld(t)},toJSON:function(t){function e(t){var e=[];for(var n in t){var r=t[n];delete r.metadata,e.push(r)}return e}var n=void 0===t||""===t,r={};n&&(t={geometries:{},materials:{},textures:{},images:{}},r.metadata={version:4.4,type:"Object",generator:"Object3D.toJSON"});var i={};if(i.uuid=this.uuid,i.type=this.type,""!==this.name&&(i.name=this.name),"{}"!==JSON.stringify(this.userData)&&(i.userData=this.userData),this.castShadow===!0&&(i.castShadow=!0),this.receiveShadow===!0&&(i.receiveShadow=!0),this.visible===!1&&(i.visible=!1),i.matrix=this.matrix.toArray(),void 0!==this.geometry&&(void 0===t.geometries[this.geometry.uuid]&&(t.geometries[this.geometry.uuid]=this.geometry.toJSON(t)),i.geometry=this.geometry.uuid),void 0!==this.material&&(void 0===t.materials[this.material.uuid]&&(t.materials[this.material.uuid]=this.material.toJSON(t)),i.material=this.material.uuid),this.children.length>0){i.children=[];for(var o=0;o<this.children.length;o++)i.children.push(this.children[o].toJSON(t).object)}if(n){var a=e(t.geometries),s=e(t.materials),c=e(t.textures),u=e(t.images);a.length>0&&(r.geometries=a),s.length>0&&(r.materials=s),c.length>0&&(r.textures=c),u.length>0&&(r.images=u)}return r.object=i,r},clone:function(t){return(new this.constructor).copy(this,t)},copy:function(t,e){if(void 0===e&&(e=!0),this.name=t.name,this.up.copy(t.up),this.position.copy(t.position),this.quaternion.copy(t.quaternion),this.scale.copy(t.scale),this.matrix.copy(t.matrix),this.matrixWorld.copy(t.matrixWorld),this.matrixAutoUpdate=t.matrixAutoUpdate,this.matrixWorldNeedsUpdate=t.matrixWorldNeedsUpdate,this.visible=t.visible,this.castShadow=t.castShadow,this.receiveShadow=t.receiveShadow,this.frustumCulled=t.frustumCulled,this.renderOrder=t.renderOrder,this.userData=JSON.parse(JSON.stringify(t.userData)),e===!0)for(var n=0;n<t.children.length;n++){var r=t.children[n];this.add(r.clone())}return this}});var Dc=0;ht.prototype={constructor:ht,set:function(t,e){return this.start.copy(t),this.end.copy(e),this},clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.start.copy(t.start),this.end.copy(t.end),this},getCenter:function(t){var e=t||new u;return e.addVectors(this.start,this.end).multiplyScalar(.5)},delta:function(t){var e=t||new u;return e.subVectors(this.end,this.start)},distanceSq:function(){return this.start.distanceToSquared(this.end)},distance:function(){return this.start.distanceTo(this.end)},at:function(t,e){var n=e||new u;return this.delta(n).multiplyScalar(t).add(this.start)},closestPointToPointParameter:function(){var e=new u,n=new u;return function(r,i){e.subVectors(r,this.start),n.subVectors(this.end,this.start);var o=n.dot(n),a=n.dot(e),s=a/o;return i&&(s=t.Math.clamp(s,0,1)),s}}(),closestPointToPoint:function(t,e,n){var r=this.closestPointToPointParameter(t,e),i=n||new u;return this.delta(i).multiplyScalar(r).add(this.start)},applyMatrix4:function(t){return this.start.applyMatrix4(t),this.end.applyMatrix4(t),this},equals:function(t){return t.start.equals(this.start)&&t.end.equals(this.end)}},ft.normal=function(){var t=new u;return function(e,n,r,i){var o=i||new u;o.subVectors(r,n),t.subVectors(e,n),o.cross(t);var a=o.lengthSq();return a>0?o.multiplyScalar(1/Math.sqrt(a)):o.set(0,0,0)}}(),ft.barycoordFromPoint=function(){var t=new u,e=new u,n=new u;return function(r,i,o,a,s){t.subVectors(a,i),e.subVectors(o,i),n.subVectors(r,i);var c=t.dot(t),l=t.dot(e),h=t.dot(n),f=e.dot(e),p=e.dot(n),d=c*f-l*l,m=s||new u;if(0===d)return m.set(-2,-1,-1);var v=1/d,g=(f*h-l*p)*v,y=(c*p-l*h)*v;return m.set(1-g-y,y,g)}}(),ft.containsPoint=function(){var t=new u;return function(e,n,r,i){var o=ft.barycoordFromPoint(e,n,r,i,t);return o.x>=0&&o.y>=0&&o.x+o.y<=1}}(),ft.prototype={constructor:ft,set:function(t,e,n){return this.a.copy(t),this.b.copy(e),this.c.copy(n),this},setFromPointsAndIndices:function(t,e,n,r){return this.a.copy(t[e]),this.b.copy(t[n]),this.c.copy(t[r]),this},clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.a.copy(t.a),this.b.copy(t.b),this.c.copy(t.c),this},area:function(){var t=new u,e=new u;return function(){return t.subVectors(this.c,this.b),e.subVectors(this.a,this.b),.5*t.cross(e).length()}}(),midpoint:function(t){var e=t||new u;return e.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)},normal:function(t){return ft.normal(this.a,this.b,this.c,t)},plane:function(t){var e=t||new rt;return e.setFromCoplanarPoints(this.a,this.b,this.c)},barycoordFromPoint:function(t,e){return ft.barycoordFromPoint(t,this.a,this.b,this.c,e)},containsPoint:function(t){return ft.containsPoint(t,this.a,this.b,this.c)},closestPointToPoint:function(){var t,e,n,r;return function(i,o){void 0===t&&(t=new rt,e=[new ht,new ht,new ht],n=new u,r=new u);var a=o||new u,s=1/0;if(t.setFromCoplanarPoints(this.a,this.b,this.c),t.projectPoint(i,n),this.containsPoint(n)===!0)a.copy(n);else{e[0].set(this.a,this.b),e[1].set(this.b,this.c),e[2].set(this.c,this.a);for(var c=0;c<e.length;c++){e[c].closestPointToPoint(n,!0,r);var l=n.distanceToSquared(r);l<s&&(s=l,a.copy(r))}}return a}}(),equals:function(t){return t.a.equals(this.a)&&t.b.equals(this.b)&&t.c.equals(this.c)}},pt.prototype={constructor:pt,clone:function(){return(new this.constructor).copy(this)},copy:function(t){this.a=t.a,this.b=t.b,this.c=t.c,this.normal.copy(t.normal),this.color.copy(t.color),this.materialIndex=t.materialIndex;for(var e=0,n=t.vertexNormals.length;e<n;e++)this.vertexNormals[e]=t.vertexNormals[e].clone();for(var e=0,n=t.vertexColors.length;e<n;e++)this.vertexColors[e]=t.vertexColors[e].clone();return this}},dt.prototype=Object.create(J.prototype),dt.prototype.constructor=dt,dt.prototype.isMeshBasicMaterial=!0,dt.prototype.copy=function(t){return J.prototype.copy.call(this,t),this.color.copy(t.color),this.map=t.map,this.aoMap=t.aoMap,this.aoMapIntensity=t.aoMapIntensity,this.specularMap=t.specularMap,this.alphaMap=t.alphaMap,this.envMap=t.envMap,this.combine=t.combine,this.reflectivity=t.reflectivity,this.refractionRatio=t.refractionRatio,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this},mt.prototype={constructor:mt,isBufferAttribute:!0,set needsUpdate(t){t===!0&&this.version++},setDynamic:function(t){return this.dynamic=t,this},copy:function(t){return this.array=new t.array.constructor(t.array),this.itemSize=t.itemSize,this.count=t.count,this.normalized=t.normalized,this.dynamic=t.dynamic,this},copyAt:function(t,e,n){t*=this.itemSize,n*=e.itemSize;for(var r=0,i=this.itemSize;r<i;r++)this.array[t+r]=e.array[n+r];return this},copyArray:function(t){return this.array.set(t),this},copyColorsArray:function(t){for(var e=this.array,n=0,r=0,i=t.length;r<i;r++){var o=t[r];void 0===o&&(console.warn("THREE.BufferAttribute.copyColorsArray(): color is undefined",r),o=new X),e[n++]=o.r,e[n++]=o.g,e[n++]=o.b}return this},copyIndicesArray:function(t){for(var e=this.array,n=0,r=0,i=t.length;r<i;r++){var o=t[r];e[n++]=o.a,e[n++]=o.b,e[n++]=o.c}return this},copyVector2sArray:function(t){for(var e=this.array,r=0,i=0,o=t.length;i<o;i++){var a=t[i];void 0===a&&(console.warn("THREE.BufferAttribute.copyVector2sArray(): vector is undefined",i),a=new n),e[r++]=a.x,e[r++]=a.y}return this},copyVector3sArray:function(t){for(var e=this.array,n=0,r=0,i=t.length;r<i;r++){var o=t[r];void 0===o&&(console.warn("THREE.BufferAttribute.copyVector3sArray(): vector is undefined",r),o=new u),e[n++]=o.x,e[n++]=o.y,e[n++]=o.z}return this},copyVector4sArray:function(t){for(var e=this.array,n=0,r=0,i=t.length;r<i;r++){var a=t[r];void 0===a&&(console.warn("THREE.BufferAttribute.copyVector4sArray(): vector is undefined",r),a=new o),e[n++]=a.x,e[n++]=a.y,e[n++]=a.z,e[n++]=a.w}return this},set:function(t,e){return void 0===e&&(e=0),this.array.set(t,e),this},getX:function(t){return this.array[t*this.itemSize]},setX:function(t,e){return this.array[t*this.itemSize]=e,this},getY:function(t){return this.array[t*this.itemSize+1]},setY:function(t,e){return this.array[t*this.itemSize+1]=e,this},getZ:function(t){return this.array[t*this.itemSize+2]},setZ:function(t,e){return this.array[t*this.itemSize+2]=e,this},getW:function(t){return this.array[t*this.itemSize+3]},setW:function(t,e){return this.array[t*this.itemSize+3]=e,this},setXY:function(t,e,n){return t*=this.itemSize,this.array[t+0]=e,this.array[t+1]=n,this},setXYZ:function(t,e,n,r){return t*=this.itemSize,this.array[t+0]=e,this.array[t+1]=n,this.array[t+2]=r,this},setXYZW:function(t,e,n,r,i){return t*=this.itemSize,this.array[t+0]=e,this.array[t+1]=n,this.array[t+2]=r,this.array[t+3]=i,this},clone:function(){return(new this.constructor).copy(this)}},Object.assign(Tt.prototype,e.prototype,{isGeometry:!0,applyMatrix:function(t){for(var e=(new nt).getNormalMatrix(t),n=0,r=this.vertices.length;n<r;n++){var i=this.vertices[n];i.applyMatrix4(t)}for(var n=0,r=this.faces.length;n<r;n++){var o=this.faces[n];o.normal.applyMatrix3(e).normalize();for(var a=0,s=o.vertexNormals.length;a<s;a++)o.vertexNormals[a].applyMatrix3(e).normalize()}return null!==this.boundingBox&&this.computeBoundingBox(),null!==this.boundingSphere&&this.computeBoundingSphere(),this.verticesNeedUpdate=!0,this.normalsNeedUpdate=!0,this},rotateX:function(){var t;return function(e){return void 0===t&&(t=new l),t.makeRotationX(e),this.applyMatrix(t),this}}(),rotateY:function(){var t;return function(e){return void 0===t&&(t=new l),t.makeRotationY(e),this.applyMatrix(t),this}}(),rotateZ:function(){var t;return function(e){return void 0===t&&(t=new l),t.makeRotationZ(e),this.applyMatrix(t),this}}(),translate:function(){var t;return function(e,n,r){return void 0===t&&(t=new l),t.makeTranslation(e,n,r),this.applyMatrix(t),this}}(),scale:function(){var t;return function(e,n,r){return void 0===t&&(t=new l),t.makeScale(e,n,r),this.applyMatrix(t),this}}(),lookAt:function(){var t;return function(e){void 0===t&&(t=new ut),t.lookAt(e),t.updateMatrix(),this.applyMatrix(t.matrix)}}(),fromBufferGeometry:function(t){function e(t,e,n,i){var o=void 0!==s?[f[t].clone(),f[e].clone(),f[n].clone()]:[],a=void 0!==c?[r.colors[t].clone(),r.colors[e].clone(),r.colors[n].clone()]:[],u=new pt(t,e,n,o,a,i);r.faces.push(u),void 0!==l&&r.faceVertexUvs[0].push([p[t].clone(),p[e].clone(),p[n].clone()]),void 0!==h&&r.faceVertexUvs[1].push([d[t].clone(),d[e].clone(),d[n].clone()])}var r=this,i=null!==t.index?t.index.array:void 0,o=t.attributes,a=o.position.array,s=void 0!==o.normal?o.normal.array:void 0,c=void 0!==o.color?o.color.array:void 0,l=void 0!==o.uv?o.uv.array:void 0,h=void 0!==o.uv2?o.uv2.array:void 0;void 0!==h&&(this.faceVertexUvs[1]=[]);for(var f=[],p=[],d=[],m=0,v=0;m<a.length;m+=3,v+=2)r.vertices.push(new u(a[m],a[m+1],a[m+2])),void 0!==s&&f.push(new u(s[m],s[m+1],s[m+2])),void 0!==c&&r.colors.push(new X(c[m],c[m+1],c[m+2])),void 0!==l&&p.push(new n(l[v],l[v+1])),void 0!==h&&d.push(new n(h[v],h[v+1]));if(void 0!==i){var g=t.groups;if(g.length>0)for(var m=0;m<g.length;m++)for(var y=g[m],x=y.start,_=y.count,v=x,w=x+_;v<w;v+=3)e(i[v],i[v+1],i[v+2],y.materialIndex);else for(var m=0;m<i.length;m+=3)e(i[m],i[m+1],i[m+2])}else for(var m=0;m<a.length/3;m+=3)e(m,m+1,m+2);return this.computeFaceNormals(),null!==t.boundingBox&&(this.boundingBox=t.boundingBox.clone()),null!==t.boundingSphere&&(this.boundingSphere=t.boundingSphere.clone()),this},center:function(){this.computeBoundingBox();var t=this.boundingBox.getCenter().negate();return this.translate(t.x,t.y,t.z),t},normalize:function(){this.computeBoundingSphere();var t=this.boundingSphere.center,e=this.boundingSphere.radius,n=0===e?1:1/e,r=new l;return r.set(n,0,0,-n*t.x,0,n,0,-n*t.y,0,0,n,-n*t.z,0,0,0,1),this.applyMatrix(r),this},computeFaceNormals:function(){for(var t=new u,e=new u,n=0,r=this.faces.length;n<r;n++){var i=this.faces[n],o=this.vertices[i.a],a=this.vertices[i.b],s=this.vertices[i.c];t.subVectors(s,a),e.subVectors(o,a),t.cross(e),t.normalize(),i.normal.copy(t)}},computeVertexNormals:function(t){void 0===t&&(t=!0);var e,n,r,i,o,a;for(a=new Array(this.vertices.length),e=0,n=this.vertices.length;e<n;e++)a[e]=new u;if(t){var s,c,l,h=new u,f=new u;for(r=0,i=this.faces.length;r<i;r++)o=this.faces[r],s=this.vertices[o.a],c=this.vertices[o.b],l=this.vertices[o.c],h.subVectors(l,c),f.subVectors(s,c),h.cross(f),a[o.a].add(h),a[o.b].add(h),a[o.c].add(h)}else for(r=0,i=this.faces.length;r<i;r++)o=this.faces[r],a[o.a].add(o.normal),a[o.b].add(o.normal),a[o.c].add(o.normal);for(e=0,n=this.vertices.length;e<n;e++)a[e].normalize();for(r=0,i=this.faces.length;r<i;r++){o=this.faces[r];var p=o.vertexNormals;3===p.length?(p[0].copy(a[o.a]),p[1].copy(a[o.b]),p[2].copy(a[o.c])):(p[0]=a[o.a].clone(),p[1]=a[o.b].clone(),p[2]=a[o.c].clone())}this.faces.length>0&&(this.normalsNeedUpdate=!0)},computeMorphNormals:function(){var t,e,n,r,i;for(n=0,r=this.faces.length;n<r;n++)for(i=this.faces[n],i.__originalFaceNormal?i.__originalFaceNormal.copy(i.normal):i.__originalFaceNormal=i.normal.clone(),i.__originalVertexNormals||(i.__originalVertexNormals=[]),t=0,e=i.vertexNormals.length;t<e;t++)i.__originalVertexNormals[t]?i.__originalVertexNormals[t].copy(i.vertexNormals[t]):i.__originalVertexNormals[t]=i.vertexNormals[t].clone();var o=new Tt;for(o.faces=this.faces,t=0,e=this.morphTargets.length;t<e;t++){if(!this.morphNormals[t]){this.morphNormals[t]={},this.morphNormals[t].faceNormals=[],this.morphNormals[t].vertexNormals=[];var a,s,c=this.morphNormals[t].faceNormals,l=this.morphNormals[t].vertexNormals;for(n=0,r=this.faces.length;n<r;n++)a=new u,s={a:new u,b:new u,c:new u},c.push(a),l.push(s)}var h=this.morphNormals[t];o.vertices=this.morphTargets[t].vertices,o.computeFaceNormals(),o.computeVertexNormals();var a,s;for(n=0,r=this.faces.length;n<r;n++)i=this.faces[n],a=h.faceNormals[n],s=h.vertexNormals[n],a.copy(i.normal),s.a.copy(i.vertexNormals[0]),s.b.copy(i.vertexNormals[1]),s.c.copy(i.vertexNormals[2])}for(n=0,r=this.faces.length;n<r;n++)i=this.faces[n],i.normal=i.__originalFaceNormal,i.vertexNormals=i.__originalVertexNormals},computeTangents:function(){console.warn("THREE.Geometry: .computeTangents() has been removed.")},computeLineDistances:function(){for(var t=0,e=this.vertices,n=0,r=e.length;n<r;n++)n>0&&(t+=e[n].distanceTo(e[n-1])),this.lineDistances[n]=t},computeBoundingBox:function(){null===this.boundingBox&&(this.boundingBox=new tt),this.boundingBox.setFromPoints(this.vertices)},computeBoundingSphere:function(){null===this.boundingSphere&&(this.boundingSphere=new et),this.boundingSphere.setFromPoints(this.vertices)},merge:function(t,e,n){if((t&&t.isGeometry)===!1)return void console.error("THREE.Geometry.merge(): geometry not an instance of THREE.Geometry.",t);var r,i=this.vertices.length,o=this.vertices,a=t.vertices,s=this.faces,c=t.faces,u=this.faceVertexUvs[0],l=t.faceVertexUvs[0],h=this.colors,f=t.colors;void 0===n&&(n=0),void 0!==e&&(r=(new nt).getNormalMatrix(e));for(var p=0,d=a.length;p<d;p++){var m=a[p],v=m.clone();void 0!==e&&v.applyMatrix4(e),o.push(v)}for(var p=0,d=f.length;p<d;p++)h.push(f[p].clone());for(p=0,d=c.length;p<d;p++){var g,y,x,_=c[p],w=_.vertexNormals,b=_.vertexColors;g=new pt(_.a+i,_.b+i,_.c+i),g.normal.copy(_.normal),void 0!==r&&g.normal.applyMatrix3(r).normalize();for(var M=0,E=w.length;M<E;M++)y=w[M].clone(),void 0!==r&&y.applyMatrix3(r).normalize(),g.vertexNormals.push(y);g.color.copy(_.color);for(var M=0,E=b.length;M<E;M++)x=b[M],g.vertexColors.push(x.clone());g.materialIndex=_.materialIndex+n,s.push(g)}for(p=0,d=l.length;p<d;p++){var S=l[p],T=[];if(void 0!==S){for(var M=0,E=S.length;M<E;M++)T.push(S[M].clone());u.push(T)}}},mergeMesh:function(t){return(t&&t.isMesh)===!1?void console.error("THREE.Geometry.mergeMesh(): mesh not an instance of THREE.Mesh.",t):(t.matrixAutoUpdate&&t.updateMatrix(),void this.merge(t.geometry,t.matrix))},mergeVertices:function(){var t,e,n,r,i,o,a,s,c={},u=[],l=[],h=4,f=Math.pow(10,h);for(n=0,r=this.vertices.length;n<r;n++)t=this.vertices[n],e=Math.round(t.x*f)+"_"+Math.round(t.y*f)+"_"+Math.round(t.z*f),void 0===c[e]?(c[e]=n,u.push(this.vertices[n]),l[n]=u.length-1):l[n]=l[c[e]];var p=[];for(n=0,r=this.faces.length;n<r;n++){i=this.faces[n],i.a=l[i.a],i.b=l[i.b],i.c=l[i.c],o=[i.a,i.b,i.c];for(var d=-1,m=0;m<3;m++)if(o[m]===o[(m+1)%3]){d=m,p.push(n);break}}for(n=p.length-1;n>=0;n--){var v=p[n];for(this.faces.splice(v,1),a=0,s=this.faceVertexUvs.length;a<s;a++)this.faceVertexUvs[a].splice(v,1)}var g=this.vertices.length-u.length;return this.vertices=u,g},sortFacesByMaterialIndex:function(){function t(t,e){return t.materialIndex-e.materialIndex}for(var e=this.faces,n=e.length,r=0;r<n;r++)e[r]._id=r;e.sort(t);var i,o,a=this.faceVertexUvs[0],s=this.faceVertexUvs[1];a&&a.length===n&&(i=[]),s&&s.length===n&&(o=[]);for(var r=0;r<n;r++){var c=e[r]._id;i&&i.push(a[c]),o&&o.push(s[c])}i&&(this.faceVertexUvs[0]=i),o&&(this.faceVertexUvs[1]=o)},toJSON:function(){function t(t,e,n){return n?t|1<<e:t&~(1<<e)}function e(t){var e=t.x.toString()+t.y.toString()+t.z.toString();return void 0!==f[e]?f[e]:(f[e]=h.length/3,h.push(t.x,t.y,t.z),f[e])}function n(t){var e=t.r.toString()+t.g.toString()+t.b.toString();return void 0!==d[e]?d[e]:(d[e]=p.length,p.push(t.getHex()),d[e])}function r(t){var e=t.x.toString()+t.y.toString();return void 0!==v[e]?v[e]:(v[e]=m.length/2,m.push(t.x,t.y),v[e])}var i={metadata:{version:4.4,type:"Geometry",generator:"Geometry.toJSON"}};if(i.uuid=this.uuid,i.type=this.type,""!==this.name&&(i.name=this.name),void 0!==this.parameters){var o=this.parameters;for(var a in o)void 0!==o[a]&&(i[a]=o[a]);return i}for(var s=[],c=0;c<this.vertices.length;c++){var u=this.vertices[c];s.push(u.x,u.y,u.z)}for(var l=[],h=[],f={},p=[],d={},m=[],v={},c=0;c<this.faces.length;c++){var g=this.faces[c],y=!0,x=!1,_=void 0!==this.faceVertexUvs[0][c],w=g.normal.length()>0,b=g.vertexNormals.length>0,M=1!==g.color.r||1!==g.color.g||1!==g.color.b,E=g.vertexColors.length>0,S=0;if(S=t(S,0,0),S=t(S,1,y),S=t(S,2,x),S=t(S,3,_),S=t(S,4,w),S=t(S,5,b),S=t(S,6,M),S=t(S,7,E),l.push(S),l.push(g.a,g.b,g.c),l.push(g.materialIndex),_){var T=this.faceVertexUvs[0][c];l.push(r(T[0]),r(T[1]),r(T[2]))}if(w&&l.push(e(g.normal)),b){var A=g.vertexNormals;l.push(e(A[0]),e(A[1]),e(A[2]))}if(M&&l.push(n(g.color)),E){var L=g.vertexColors;l.push(n(L[0]),n(L[1]),n(L[2]))}}return i.data={},i.data.vertices=s,i.data.normals=h,p.length>0&&(i.data.colors=p),m.length>0&&(i.data.uvs=[m]),i.data.faces=l,i},clone:function(){return(new Tt).copy(this)},copy:function(t){this.vertices=[],this.faces=[],this.faceVertexUvs=[[]],this.colors=[];for(var e=t.vertices,n=0,r=e.length;n<r;n++)this.vertices.push(e[n].clone());for(var i=t.colors,n=0,r=i.length;n<r;n++)this.colors.push(i[n].clone());for(var o=t.faces,n=0,r=o.length;n<r;n++)this.faces.push(o[n].clone());for(var n=0,r=t.faceVertexUvs.length;n<r;n++){var a=t.faceVertexUvs[n];void 0===this.faceVertexUvs[n]&&(this.faceVertexUvs[n]=[]);for(var s=0,c=a.length;s<c;s++){for(var u=a[s],l=[],h=0,f=u.length;h<f;h++){var p=u[h];l.push(p.clone())}this.faceVertexUvs[n].push(l)}}return this},dispose:function(){this.dispatchEvent({
  type:"dispose"})}});var zc=0;Object.assign(Lt.prototype,e.prototype,{computeBoundingBox:Tt.prototype.computeBoundingBox,computeBoundingSphere:Tt.prototype.computeBoundingSphere,computeFaceNormals:function(){console.warn("THREE.DirectGeometry: computeFaceNormals() is not a method of this type of geometry.")},computeVertexNormals:function(){console.warn("THREE.DirectGeometry: computeVertexNormals() is not a method of this type of geometry.")},computeGroups:function(t){for(var e,n,r=[],i=t.faces,o=0;o<i.length;o++){var a=i[o];a.materialIndex!==n&&(n=a.materialIndex,void 0!==e&&(e.count=3*o-e.start,r.push(e)),e={start:3*o,materialIndex:n})}void 0!==e&&(e.count=3*o-e.start,r.push(e)),this.groups=r},fromGeometry:function(t){var e,r=t.faces,i=t.vertices,o=t.faceVertexUvs,a=o[0]&&o[0].length>0,s=o[1]&&o[1].length>0,c=t.morphTargets,u=c.length;if(u>0){e=[];for(var l=0;l<u;l++)e[l]=[];this.morphTargets.position=e}var h,f=t.morphNormals,p=f.length;if(p>0){h=[];for(var l=0;l<p;l++)h[l]=[];this.morphTargets.normal=h}for(var d=t.skinIndices,m=t.skinWeights,v=d.length===i.length,g=m.length===i.length,l=0;l<r.length;l++){var y=r[l];this.vertices.push(i[y.a],i[y.b],i[y.c]);var x=y.vertexNormals;if(3===x.length)this.normals.push(x[0],x[1],x[2]);else{var _=y.normal;this.normals.push(_,_,_)}var w=y.vertexColors;if(3===w.length)this.colors.push(w[0],w[1],w[2]);else{var b=y.color;this.colors.push(b,b,b)}if(a===!0){var M=o[0][l];void 0!==M?this.uvs.push(M[0],M[1],M[2]):(console.warn("THREE.DirectGeometry.fromGeometry(): Undefined vertexUv ",l),this.uvs.push(new n,new n,new n))}if(s===!0){var M=o[1][l];void 0!==M?this.uvs2.push(M[0],M[1],M[2]):(console.warn("THREE.DirectGeometry.fromGeometry(): Undefined vertexUv2 ",l),this.uvs2.push(new n,new n,new n))}for(var E=0;E<u;E++){var S=c[E].vertices;e[E].push(S[y.a],S[y.b],S[y.c])}for(var E=0;E<p;E++){var T=f[E].vertexNormals[l];h[E].push(T.a,T.b,T.c)}v&&this.skinIndices.push(d[y.a],d[y.b],d[y.c]),g&&this.skinWeights.push(m[y.a],m[y.b],m[y.c])}return this.computeGroups(t),this.verticesNeedUpdate=t.verticesNeedUpdate,this.normalsNeedUpdate=t.normalsNeedUpdate,this.colorsNeedUpdate=t.colorsNeedUpdate,this.uvsNeedUpdate=t.uvsNeedUpdate,this.groupsNeedUpdate=t.groupsNeedUpdate,this},dispose:function(){this.dispatchEvent({type:"dispose"})}}),Object.assign(Ct.prototype,e.prototype,{isBufferGeometry:!0,getIndex:function(){return this.index},setIndex:function(t){this.index=t},addAttribute:function(t,e){return(e&&e.isBufferAttribute)===!1&&(e&&e.isInterleavedBufferAttribute)===!1?(console.warn("THREE.BufferGeometry: .addAttribute() now expects ( name, attribute )."),void this.addAttribute(t,new mt(arguments[1],arguments[2]))):"index"===t?(console.warn("THREE.BufferGeometry.addAttribute: Use .setIndex() for index attribute."),void this.setIndex(e)):(this.attributes[t]=e,this)},getAttribute:function(t){return this.attributes[t]},removeAttribute:function(t){return delete this.attributes[t],this},addGroup:function(t,e,n){this.groups.push({start:t,count:e,materialIndex:void 0!==n?n:0})},clearGroups:function(){this.groups=[]},setDrawRange:function(t,e){this.drawRange.start=t,this.drawRange.count=e},applyMatrix:function(t){var e=this.attributes.position;void 0!==e&&(t.applyToVector3Array(e.array),e.needsUpdate=!0);var n=this.attributes.normal;if(void 0!==n){var r=(new nt).getNormalMatrix(t);r.applyToVector3Array(n.array),n.needsUpdate=!0}return null!==this.boundingBox&&this.computeBoundingBox(),null!==this.boundingSphere&&this.computeBoundingSphere(),this},rotateX:function(){var t;return function(e){return void 0===t&&(t=new l),t.makeRotationX(e),this.applyMatrix(t),this}}(),rotateY:function(){var t;return function(e){return void 0===t&&(t=new l),t.makeRotationY(e),this.applyMatrix(t),this}}(),rotateZ:function(){var t;return function(e){return void 0===t&&(t=new l),t.makeRotationZ(e),this.applyMatrix(t),this}}(),translate:function(){var t;return function(e,n,r){return void 0===t&&(t=new l),t.makeTranslation(e,n,r),this.applyMatrix(t),this}}(),scale:function(){var t;return function(e,n,r){return void 0===t&&(t=new l),t.makeScale(e,n,r),this.applyMatrix(t),this}}(),lookAt:function(){var t;return function(e){void 0===t&&(t=new ut),t.lookAt(e),t.updateMatrix(),this.applyMatrix(t.matrix)}}(),center:function(){this.computeBoundingBox();var t=this.boundingBox.getCenter().negate();return this.translate(t.x,t.y,t.z),t},setFromObject:function(t){var e=t.geometry;if(t&&t.isPoints||t&&t.isLine){var n=new Mt(3*e.vertices.length,3),r=new Mt(3*e.colors.length,3);if(this.addAttribute("position",n.copyVector3sArray(e.vertices)),this.addAttribute("color",r.copyColorsArray(e.colors)),e.lineDistances&&e.lineDistances.length===e.vertices.length){var i=new Mt(e.lineDistances.length,1);this.addAttribute("lineDistance",i.copyArray(e.lineDistances))}null!==e.boundingSphere&&(this.boundingSphere=e.boundingSphere.clone()),null!==e.boundingBox&&(this.boundingBox=e.boundingBox.clone())}else t&&t.isMesh&&e&&e.isGeometry&&this.fromGeometry(e);return this},updateFromObject:function(t){var e=t.geometry;if(t&&t.isMesh){var n=e.__directGeometry;if(e.elementsNeedUpdate===!0&&(n=void 0,e.elementsNeedUpdate=!1),void 0===n)return this.fromGeometry(e);n.verticesNeedUpdate=e.verticesNeedUpdate,n.normalsNeedUpdate=e.normalsNeedUpdate,n.colorsNeedUpdate=e.colorsNeedUpdate,n.uvsNeedUpdate=e.uvsNeedUpdate,n.groupsNeedUpdate=e.groupsNeedUpdate,e.verticesNeedUpdate=!1,e.normalsNeedUpdate=!1,e.colorsNeedUpdate=!1,e.uvsNeedUpdate=!1,e.groupsNeedUpdate=!1,e=n}var r;return e.verticesNeedUpdate===!0&&(r=this.attributes.position,void 0!==r&&(r.copyVector3sArray(e.vertices),r.needsUpdate=!0),e.verticesNeedUpdate=!1),e.normalsNeedUpdate===!0&&(r=this.attributes.normal,void 0!==r&&(r.copyVector3sArray(e.normals),r.needsUpdate=!0),e.normalsNeedUpdate=!1),e.colorsNeedUpdate===!0&&(r=this.attributes.color,void 0!==r&&(r.copyColorsArray(e.colors),r.needsUpdate=!0),e.colorsNeedUpdate=!1),e.uvsNeedUpdate&&(r=this.attributes.uv,void 0!==r&&(r.copyVector2sArray(e.uvs),r.needsUpdate=!0),e.uvsNeedUpdate=!1),e.lineDistancesNeedUpdate&&(r=this.attributes.lineDistance,void 0!==r&&(r.copyArray(e.lineDistances),r.needsUpdate=!0),e.lineDistancesNeedUpdate=!1),e.groupsNeedUpdate&&(e.computeGroups(t.geometry),this.groups=e.groups,e.groupsNeedUpdate=!1),this},fromGeometry:function(t){return t.__directGeometry=(new Lt).fromGeometry(t),this.fromDirectGeometry(t.__directGeometry)},fromDirectGeometry:function(t){var e=new Float32Array(3*t.vertices.length);if(this.addAttribute("position",new mt(e,3).copyVector3sArray(t.vertices)),t.normals.length>0){var n=new Float32Array(3*t.normals.length);this.addAttribute("normal",new mt(n,3).copyVector3sArray(t.normals))}if(t.colors.length>0){var r=new Float32Array(3*t.colors.length);this.addAttribute("color",new mt(r,3).copyColorsArray(t.colors))}if(t.uvs.length>0){var i=new Float32Array(2*t.uvs.length);this.addAttribute("uv",new mt(i,2).copyVector2sArray(t.uvs))}if(t.uvs2.length>0){var o=new Float32Array(2*t.uvs2.length);this.addAttribute("uv2",new mt(o,2).copyVector2sArray(t.uvs2))}if(t.indices.length>0){var a=t.vertices.length>65535?Uint32Array:Uint16Array,s=new a(3*t.indices.length);this.setIndex(new mt(s,1).copyIndicesArray(t.indices))}this.groups=t.groups;for(var c in t.morphTargets){for(var u=[],l=t.morphTargets[c],h=0,f=l.length;h<f;h++){var p=l[h],d=new Mt(3*p.length,3);u.push(d.copyVector3sArray(p))}this.morphAttributes[c]=u}if(t.skinIndices.length>0){var m=new Mt(4*t.skinIndices.length,4);this.addAttribute("skinIndex",m.copyVector4sArray(t.skinIndices))}if(t.skinWeights.length>0){var v=new Mt(4*t.skinWeights.length,4);this.addAttribute("skinWeight",v.copyVector4sArray(t.skinWeights))}return null!==t.boundingSphere&&(this.boundingSphere=t.boundingSphere.clone()),null!==t.boundingBox&&(this.boundingBox=t.boundingBox.clone()),this},computeBoundingBox:function(){null===this.boundingBox&&(this.boundingBox=new tt);var t=this.attributes.position.array;void 0!==t?this.boundingBox.setFromArray(t):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:function(){var t=new tt,e=new u;return function(){null===this.boundingSphere&&(this.boundingSphere=new et);var n=this.attributes.position;if(n){var r=n.array,i=this.boundingSphere.center;t.setFromArray(r),t.getCenter(i);for(var o=0,a=0,s=r.length;a<s;a+=3)e.fromArray(r,a),o=Math.max(o,i.distanceToSquared(e));this.boundingSphere.radius=Math.sqrt(o),isNaN(this.boundingSphere.radius)&&console.error('THREE.BufferGeometry.computeBoundingSphere(): Computed radius is NaN. The "position" attribute is likely to have NaN values.',this)}}}(),computeFaceNormals:function(){},computeVertexNormals:function(){var t=this.index,e=this.attributes,n=this.groups;if(e.position){var r=e.position.array;if(void 0===e.normal)this.addAttribute("normal",new mt(new Float32Array(r.length),3));else for(var i=e.normal.array,o=0,a=i.length;o<a;o++)i[o]=0;var s,c,l,h=e.normal.array,f=new u,p=new u,d=new u,m=new u,v=new u;if(t){var g=t.array;0===n.length&&this.addGroup(0,g.length);for(var y=0,x=n.length;y<x;++y)for(var _=n[y],w=_.start,b=_.count,o=w,a=w+b;o<a;o+=3)s=3*g[o+0],c=3*g[o+1],l=3*g[o+2],f.fromArray(r,s),p.fromArray(r,c),d.fromArray(r,l),m.subVectors(d,p),v.subVectors(f,p),m.cross(v),h[s]+=m.x,h[s+1]+=m.y,h[s+2]+=m.z,h[c]+=m.x,h[c+1]+=m.y,h[c+2]+=m.z,h[l]+=m.x,h[l+1]+=m.y,h[l+2]+=m.z}else for(var o=0,a=r.length;o<a;o+=9)f.fromArray(r,o),p.fromArray(r,o+3),d.fromArray(r,o+6),m.subVectors(d,p),v.subVectors(f,p),m.cross(v),h[o]=m.x,h[o+1]=m.y,h[o+2]=m.z,h[o+3]=m.x,h[o+4]=m.y,h[o+5]=m.z,h[o+6]=m.x,h[o+7]=m.y,h[o+8]=m.z;this.normalizeNormals(),e.normal.needsUpdate=!0}},merge:function(t,e){if((t&&t.isBufferGeometry)===!1)return void console.error("THREE.BufferGeometry.merge(): geometry not an instance of THREE.BufferGeometry.",t);void 0===e&&(e=0);var n=this.attributes;for(var r in n)if(void 0!==t.attributes[r])for(var i=n[r],o=i.array,a=t.attributes[r],s=a.array,c=a.itemSize,u=0,l=c*e;u<s.length;u++,l++)o[l]=s[u];return this},normalizeNormals:function(){for(var t,e,n,r,i=this.attributes.normal.array,o=0,a=i.length;o<a;o+=3)t=i[o],e=i[o+1],n=i[o+2],r=1/Math.sqrt(t*t+e*e+n*n),i[o]*=r,i[o+1]*=r,i[o+2]*=r},toNonIndexed:function(){if(null===this.index)return console.warn("THREE.BufferGeometry.toNonIndexed(): Geometry is already non-indexed."),this;var t=new Ct,e=this.index.array,n=this.attributes;for(var r in n){for(var i=n[r],o=i.array,a=i.itemSize,s=new o.constructor(e.length*a),c=0,u=0,l=0,h=e.length;l<h;l++){c=e[l]*a;for(var f=0;f<a;f++)s[u++]=o[c++]}t.addAttribute(r,new mt(s,a))}return t},toJSON:function(){var t={metadata:{version:4.4,type:"BufferGeometry",generator:"BufferGeometry.toJSON"}};if(t.uuid=this.uuid,t.type=this.type,""!==this.name&&(t.name=this.name),void 0!==this.parameters){var e=this.parameters;for(var n in e)void 0!==e[n]&&(t[n]=e[n]);return t}t.data={attributes:{}};var r=this.index;if(null!==r){var i=Array.prototype.slice.call(r.array);t.data.index={type:r.array.constructor.name,array:i}}var o=this.attributes;for(var n in o){var a=o[n],i=Array.prototype.slice.call(a.array);t.data.attributes[n]={itemSize:a.itemSize,type:a.array.constructor.name,array:i,normalized:a.normalized}}var s=this.groups;s.length>0&&(t.data.groups=JSON.parse(JSON.stringify(s)));var c=this.boundingSphere;return null!==c&&(t.data.boundingSphere={center:c.center.toArray(),radius:c.radius}),t},clone:function(){return(new Ct).copy(this)},copy:function(t){var e=t.index;null!==e&&this.setIndex(e.clone());var n=t.attributes;for(var r in n){var i=n[r];this.addAttribute(r,i.clone())}for(var o=t.groups,a=0,s=o.length;a<s;a++){var c=o[a];this.addGroup(c.start,c.count,c.materialIndex)}return this},dispose:function(){this.dispatchEvent({type:"dispose"})}}),Ct.MaxIndex=65535,Pt.prototype=Object.assign(Object.create(ut.prototype),{constructor:Pt,isMesh:!0,setDrawMode:function(t){this.drawMode=t},copy:function(t){return ut.prototype.copy.call(this,t),this.drawMode=t.drawMode,this},updateMorphTargets:function(){var t=this.geometry.morphTargets;if(void 0!==t&&t.length>0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(var e=0,n=t.length;e<n;e++)this.morphTargetInfluences.push(0),this.morphTargetDictionary[t[e].name]=e}},raycast:function(){function t(t,e,n,r,i,o,a){return ft.barycoordFromPoint(t,e,n,r,y),i.multiplyScalar(y.x),o.multiplyScalar(y.y),a.multiplyScalar(y.z),i.add(o).add(a),i.clone()}function e(t,e,n,r,i,o,a){var s,c=t.material;if(s=c.side===_i?n.intersectTriangle(o,i,r,!0,a):n.intersectTriangle(r,i,o,c.side!==wi,a),null===s)return null;_.copy(a),_.applyMatrix4(t.matrixWorld);var u=e.ray.origin.distanceTo(_);return u<e.near||u>e.far?null:{distance:u,point:_.clone(),object:t}}function r(n,r,i,o,a,u,l,f){s.fromArray(o,3*u),c.fromArray(o,3*l),h.fromArray(o,3*f);var p=e(n,r,i,s,c,h,x);return p&&(a&&(m.fromArray(a,2*u),v.fromArray(a,2*l),g.fromArray(a,2*f),p.uv=t(x,s,c,h,m,v,g)),p.face=new pt(u,l,f,ft.normal(s,c,h)),p.faceIndex=u),p}var i=new l,o=new at,a=new et,s=new u,c=new u,h=new u,f=new u,p=new u,d=new u,m=new n,v=new n,g=new n,y=new u,x=new u,_=new u;return function(n,u){var l=this.geometry,y=this.material,_=this.matrixWorld;if(void 0!==y&&(null===l.boundingSphere&&l.computeBoundingSphere(),a.copy(l.boundingSphere),a.applyMatrix4(_),n.ray.intersectsSphere(a)!==!1&&(i.getInverse(_),o.copy(n.ray).applyMatrix4(i),null===l.boundingBox||o.intersectsBox(l.boundingBox)!==!1))){var w,b;if(l&&l.isBufferGeometry){var M,E,S,T=l.index,A=l.attributes,L=A.position.array;if(void 0!==A.uv&&(w=A.uv.array),null!==T)for(var C=T.array,P=0,R=C.length;P<R;P+=3)M=C[P],E=C[P+1],S=C[P+2],b=r(this,n,o,L,w,M,E,S),b&&(b.faceIndex=Math.floor(P/3),u.push(b));else for(var P=0,R=L.length;P<R;P+=9)M=P/3,E=M+1,S=M+2,b=r(this,n,o,L,w,M,E,S),b&&(b.index=M,u.push(b))}else if(l&&l.isGeometry){var I,O,U,N=y&&y.isMultiMaterial,F=N===!0?y.materials:null,D=l.vertices,z=l.faces,B=l.faceVertexUvs[0];B.length>0&&(w=B);for(var k=0,j=z.length;k<j;k++){var G=z[k],V=N===!0?F[G.materialIndex]:y;if(void 0!==V){if(I=D[G.a],O=D[G.b],U=D[G.c],V.morphTargets===!0){var H=l.morphTargets,W=this.morphTargetInfluences;s.set(0,0,0),c.set(0,0,0),h.set(0,0,0);for(var X=0,q=H.length;X<q;X++){var Y=W[X];if(0!==Y){var Z=H[X].vertices;s.addScaledVector(f.subVectors(Z[G.a],I),Y),c.addScaledVector(p.subVectors(Z[G.b],O),Y),h.addScaledVector(d.subVectors(Z[G.c],U),Y)}}s.add(I),c.add(O),h.add(U),I=s,O=c,U=h}if(b=e(this,n,o,I,O,U,x)){if(w){var J=w[k];m.copy(J[0]),v.copy(J[1]),g.copy(J[2]),b.uv=t(x,I,O,U,m,v,g)}b.face=G,b.faceIndex=k,u.push(b)}}}}}}}(),clone:function(){return new this.constructor(this.geometry,this.material).copy(this)}}),Rt.prototype=Object.create(Ct.prototype),Rt.prototype.constructor=Rt,It.prototype=Object.create(Ct.prototype),It.prototype.constructor=It,Ot.prototype=Object.create(ut.prototype),Ot.prototype.constructor=Ot,Ot.prototype.isCamera=!0,Ot.prototype.getWorldDirection=function(){var t=new c;return function(e){var n=e||new u;return this.getWorldQuaternion(t),n.set(0,0,-1).applyQuaternion(t)}}(),Ot.prototype.lookAt=function(){var t=new l;return function(e){t.lookAt(this.position,e,this.up),this.quaternion.setFromRotationMatrix(t)}}(),Ot.prototype.clone=function(){return(new this.constructor).copy(this)},Ot.prototype.copy=function(t){return ut.prototype.copy.call(this,t),this.matrixWorldInverse.copy(t.matrixWorldInverse),this.projectionMatrix.copy(t.projectionMatrix),this},Ut.prototype=Object.assign(Object.create(Ot.prototype),{constructor:Ut,isPerspectiveCamera:!0,copy:function(t){return Ot.prototype.copy.call(this,t),this.fov=t.fov,this.zoom=t.zoom,this.near=t.near,this.far=t.far,this.focus=t.focus,this.aspect=t.aspect,this.view=null===t.view?null:Object.assign({},t.view),this.filmGauge=t.filmGauge,this.filmOffset=t.filmOffset,this},setFocalLength:function(e){var n=.5*this.getFilmHeight()/e;this.fov=2*t.Math.RAD2DEG*Math.atan(n),this.updateProjectionMatrix()},getFocalLength:function(){var e=Math.tan(.5*t.Math.DEG2RAD*this.fov);return.5*this.getFilmHeight()/e},getEffectiveFOV:function(){return 2*t.Math.RAD2DEG*Math.atan(Math.tan(.5*t.Math.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(t,e,n,r,i,o){this.aspect=t/e,this.view={fullWidth:t,fullHeight:e,offsetX:n,offsetY:r,width:i,height:o},this.updateProjectionMatrix()},clearViewOffset:function(){this.view=null,this.updateProjectionMatrix()},updateProjectionMatrix:function(){var e=this.near,n=e*Math.tan(.5*t.Math.DEG2RAD*this.fov)/this.zoom,r=2*n,i=this.aspect*r,o=-.5*i,a=this.view;if(null!==a){var s=a.fullWidth,c=a.fullHeight;o+=a.offsetX*i/s,n-=a.offsetY*r/c,i*=a.width/s,r*=a.height/c}var u=this.filmOffset;0!==u&&(o+=e*u/this.getFilmWidth()),this.projectionMatrix.makeFrustum(o,o+i,n-r,n,e,this.far)},toJSON:function(t){var e=ut.prototype.toJSON.call(this,t);return 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}}),Nt.prototype=Object.assign(Object.create(Ot.prototype),{constructor:Nt,isOrthographicCamera:!0,copy:function(t){return Ot.prototype.copy.call(this,t),this.left=t.left,this.right=t.right,this.top=t.top,this.bottom=t.bottom,this.near=t.near,this.far=t.far,this.zoom=t.zoom,this.view=null===t.view?null:Object.assign({},t.view),this},setViewOffset:function(t,e,n,r,i,o){this.view={fullWidth:t,fullHeight:e,offsetX:n,offsetY:r,width:i,height:o},this.updateProjectionMatrix()},clearViewOffset:function(){this.view=null,this.updateProjectionMatrix()},updateProjectionMatrix:function(){var t=(this.right-this.left)/(2*this.zoom),e=(this.top-this.bottom)/(2*this.zoom),n=(this.right+this.left)/2,r=(this.top+this.bottom)/2,i=n-t,o=n+t,a=r+e,s=r-e;if(null!==this.view){var c=this.zoom/(this.view.width/this.view.fullWidth),u=this.zoom/(this.view.height/this.view.fullHeight),l=(this.right-this.left)/this.view.width,h=(this.top-this.bottom)/this.view.height;i+=l*(this.view.offsetX/c),o=i+l*(this.view.width/c),a-=h*(this.view.offsetY/u),s=a-h*(this.view.height/u)}this.projectionMatrix.makeOrthographic(i,o,a,s,this.near,this.far)},toJSON:function(t){var e=ut.prototype.toJSON.call(this,t);return 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}});var Bc=0;ue.prototype.isFogExp2=!0,ue.prototype.clone=function(){return new ue(this.color.getHex(),this.density)},ue.prototype.toJSON=function(t){return{type:"FogExp2",color:this.color.getHex(),density:this.density}},le.prototype.isFog=!0,le.prototype.clone=function(){return new le(this.color.getHex(),this.near,this.far)},le.prototype.toJSON=function(t){return{type:"Fog",color:this.color.getHex(),near:this.near,far:this.far}},he.prototype=Object.create(ut.prototype),he.prototype.constructor=he,he.prototype.copy=function(t,e){return ut.prototype.copy.call(this,t,e),null!==t.background&&(this.background=t.background.clone()),null!==t.fog&&(this.fog=t.fog.clone()),null!==t.overrideMaterial&&(this.overrideMaterial=t.overrideMaterial.clone()),this.autoUpdate=t.autoUpdate,this.matrixAutoUpdate=t.matrixAutoUpdate,this},he.prototype.toJSON=function(t){var e=ut.prototype.toJSON.call(this,t);return null!==this.background&&(e.object.background=this.background.toJSON(t)),null!==this.fog&&(e.object.fog=this.fog.toJSON()),e},fe.prototype=Object.assign(Object.create(ut.prototype),{constructor:fe,isLensFlare:!0,copy:function(t){ut.prototype.copy.call(this,t),this.positionScreen.copy(t.positionScreen),this.customUpdateCallback=t.customUpdateCallback;for(var e=0,n=t.lensFlares.length;e<n;e++)this.lensFlares.push(t.lensFlares[e]);return this},add:function(t,e,n,r,i,o){void 0===e&&(e=-1),void 0===n&&(n=0),void 0===o&&(o=1),void 0===i&&(i=new X(16777215)),void 0===r&&(r=Li),n=Math.min(n,Math.max(0,n)),this.lensFlares.push({texture:t,size:e,distance:n,x:0,y:0,z:0,scale:1,rotation:0,opacity:o,color:i,blending:r})},updateLensFlares:function(){var t,e,n=this.lensFlares.length,r=2*-this.positionScreen.x,i=2*-this.positionScreen.y;for(t=0;t<n;t++)e=this.lensFlares[t],e.x=this.positionScreen.x+r*e.distance,e.y=this.positionScreen.y+i*e.distance,e.wantedRotation=e.x*Math.PI*.25,e.rotation+=.25*(e.wantedRotation-e.rotation)}}),pe.prototype=Object.create(J.prototype),pe.prototype.constructor=pe,pe.prototype.copy=function(t){return J.prototype.copy.call(this,t),this.color.copy(t.color),this.map=t.map,this.rotation=t.rotation,this},de.prototype=Object.assign(Object.create(ut.prototype),{constructor:de,isSprite:!0,raycast:function(){var t=new u;return function(e,n){t.setFromMatrixPosition(this.matrixWorld);var r=e.ray.distanceSqToPoint(t),i=this.scale.x*this.scale.y/4;r>i||n.push({distance:Math.sqrt(r),point:this.position,face:null,object:this})}}(),clone:function(){return new this.constructor(this.material).copy(this)}}),me.prototype=Object.assign(Object.create(ut.prototype),{constructor:me,copy:function(t){ut.prototype.copy.call(this,t,!1);for(var e=t.levels,n=0,r=e.length;n<r;n++){var i=e[n];this.addLevel(i.object.clone(),i.distance)}return this},addLevel:function(t,e){void 0===e&&(e=0),e=Math.abs(e);for(var n=this.levels,r=0;r<n.length&&!(e<n[r].distance);r++);n.splice(r,0,{distance:e,object:t}),this.add(t)},getObjectForDistance:function(t){for(var e=this.levels,n=1,r=e.length;n<r&&!(t<e[n].distance);n++);return e[n-1].object},raycast:function(){var t=new u;return function(e,n){t.setFromMatrixPosition(this.matrixWorld);var r=e.ray.origin.distanceTo(t);this.getObjectForDistance(r).raycast(e,n)}}(),update:function(){var t=new u,e=new u;return function(n){var r=this.levels;if(r.length>1){t.setFromMatrixPosition(n.matrixWorld),e.setFromMatrixPosition(this.matrixWorld);var i=t.distanceTo(e);r[0].object.visible=!0;for(var o=1,a=r.length;o<a&&i>=r[o].distance;o++)r[o-1].object.visible=!1,r[o].object.visible=!0;for(;o<a;o++)r[o].object.visible=!1}}}(),toJSON:function(t){var e=ut.prototype.toJSON.call(this,t);e.object.levels=[];for(var n=this.levels,r=0,i=n.length;r<i;r++){var o=n[r];e.object.levels.push({object:o.object.uuid,distance:o.distance})}return e}}),ve.prototype=Object.create(r.prototype),ve.prototype.constructor=ve,ve.prototype.isDataTexture=!0,Object.assign(ge.prototype,{calculateInverses:function(){this.boneInverses=[];for(var t=0,e=this.bones.length;t<e;t++){var n=new l;this.bones[t]&&n.getInverse(this.bones[t].matrixWorld),this.boneInverses.push(n)}},pose:function(){for(var t,e=0,n=this.bones.length;e<n;e++)t=this.bones[e],t&&t.matrixWorld.getInverse(this.boneInverses[e]);for(var e=0,n=this.bones.length;e<n;e++)t=this.bones[e],t&&(t.parent&&t.parent.isBone?(t.matrix.getInverse(t.parent.matrixWorld),t.matrix.multiply(t.matrixWorld)):t.matrix.copy(t.matrixWorld),t.matrix.decompose(t.position,t.quaternion,t.scale))},update:function(){var t=new l;return function(){for(var e=0,n=this.bones.length;e<n;e++){var r=this.bones[e]?this.bones[e].matrixWorld:this.identityMatrix;t.multiplyMatrices(r,this.boneInverses[e]),t.toArray(this.boneMatrices,16*e)}this.useVertexTexture&&(this.boneTexture.needsUpdate=!0)}}(),clone:function(){return new ge(this.bones,this.boneInverses,this.useVertexTexture)}}),ye.prototype=Object.assign(Object.create(ut.prototype),{constructor:ye,isBone:!0,copy:function(t){return ut.prototype.copy.call(this,t),this.skin=t.skin,this}}),xe.prototype=Object.assign(Object.create(Pt.prototype),{constructor:xe,isSkinnedMesh:!0,bind:function(t,e){this.skeleton=t,void 0===e&&(this.updateMatrixWorld(!0),this.skeleton.calculateInverses(),e=this.matrixWorld),this.bindMatrix.copy(e),this.bindMatrixInverse.getInverse(e)},pose:function(){this.skeleton.pose()},normalizeSkinWeights:function(){if(this.geometry&&this.geometry.isGeometry)for(var t=0;t<this.geometry.skinWeights.length;t++){var e=this.geometry.skinWeights[t],n=1/e.lengthManhattan();n!==1/0?e.multiplyScalar(n):e.set(1,0,0,0)}else if(this.geometry&&this.geometry.isBufferGeometry)for(var r=new o,i=this.geometry.attributes.skinWeight,t=0;t<i.count;t++){r.x=i.getX(t),r.y=i.getY(t),r.z=i.getZ(t),r.w=i.getW(t);var n=1/r.lengthManhattan();n!==1/0?r.multiplyScalar(n):r.set(1,0,0,0),i.setXYZW(t,r.x,r.y,r.z,r.w)}},updateMatrixWorld:function(t){Pt.prototype.updateMatrixWorld.call(this,!0),"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,this.skeleton.useVertexTexture).copy(this)}}),_e.prototype=Object.create(J.prototype),_e.prototype.constructor=_e,_e.prototype.isLineBasicMaterial=!0,_e.prototype.copy=function(t){return J.prototype.copy.call(this,t),this.color.copy(t.color),this.linewidth=t.linewidth,this.linecap=t.linecap,this.linejoin=t.linejoin,this},we.prototype=Object.assign(Object.create(ut.prototype),{constructor:we,isLine:!0,raycast:function(){var t=new l,e=new at,n=new et;return function(r,i){var o=r.linePrecision,a=o*o,s=this.geometry,c=this.matrixWorld;if(null===s.boundingSphere&&s.computeBoundingSphere(),n.copy(s.boundingSphere),n.applyMatrix4(c),r.ray.intersectsSphere(n)!==!1){t.getInverse(c),e.copy(r.ray).applyMatrix4(t);var l=new u,h=new u,f=new u,p=new u,d=this&&this.isLineSegments?2:1;if(s&&s.isBufferGeometry){var m=s.index,v=s.attributes,g=v.position.array;if(null!==m)for(var y=m.array,x=0,_=y.length-1;x<_;x+=d){var w=y[x],b=y[x+1];l.fromArray(g,3*w),h.fromArray(g,3*b);var M=e.distanceSqToSegment(l,h,p,f);if(!(M>a)){p.applyMatrix4(this.matrixWorld);var E=r.ray.origin.distanceTo(p);E<r.near||E>r.far||i.push({distance:E,point:f.clone().applyMatrix4(this.matrixWorld),index:x,face:null,faceIndex:null,object:this})}}else for(var x=0,_=g.length/3-1;x<_;x+=d){l.fromArray(g,3*x),h.fromArray(g,3*x+3);var M=e.distanceSqToSegment(l,h,p,f);if(!(M>a)){p.applyMatrix4(this.matrixWorld);var E=r.ray.origin.distanceTo(p);E<r.near||E>r.far||i.push({distance:E,point:f.clone().applyMatrix4(this.matrixWorld),index:x,face:null,faceIndex:null,object:this})}}}else if(s&&s.isGeometry)for(var S=s.vertices,T=S.length,x=0;x<T-1;x+=d){var M=e.distanceSqToSegment(S[x],S[x+1],p,f);if(!(M>a)){p.applyMatrix4(this.matrixWorld);var E=r.ray.origin.distanceTo(p);E<r.near||E>r.far||i.push({distance:E,point:f.clone().applyMatrix4(this.matrixWorld),index:x,face:null,faceIndex:null,object:this})}}}}}(),clone:function(){return new this.constructor(this.geometry,this.material).copy(this)}}),be.prototype=Object.assign(Object.create(we.prototype),{constructor:be,isLineSegments:!0}),Me.prototype=Object.create(J.prototype),Me.prototype.constructor=Me,Me.prototype.isPointsMaterial=!0,Me.prototype.copy=function(t){return J.prototype.copy.call(this,t),this.color.copy(t.color),this.map=t.map,this.size=t.size,this.sizeAttenuation=t.sizeAttenuation,this},Ee.prototype=Object.assign(Object.create(ut.prototype),{constructor:Ee,isPoints:!0,raycast:function(){var t=new l,e=new at,n=new et;return function(r,i){function o(t,n){var o=e.distanceSqToPoint(t);if(o<f){var s=e.closestPointToPoint(t);s.applyMatrix4(c);var u=r.ray.origin.distanceTo(s);if(u<r.near||u>r.far)return;i.push({distance:u,distanceToRay:Math.sqrt(o),point:s.clone(),index:n,face:null,object:a})}}var a=this,s=this.geometry,c=this.matrixWorld,l=r.params.Points.threshold;if(null===s.boundingSphere&&s.computeBoundingSphere(),n.copy(s.boundingSphere),n.applyMatrix4(c),r.ray.intersectsSphere(n)!==!1){t.getInverse(c),e.copy(r.ray).applyMatrix4(t);var h=l/((this.scale.x+this.scale.y+this.scale.z)/3),f=h*h,p=new u;if(s&&s.isBufferGeometry){var d=s.index,m=s.attributes,v=m.position.array;if(null!==d)for(var g=d.array,y=0,x=g.length;y<x;y++){var _=g[y];p.fromArray(v,3*_),o(p,_)}else for(var y=0,w=v.length/3;y<w;y++)p.fromArray(v,3*y),o(p,y)}else for(var b=s.vertices,y=0,w=b.length;y<w;y++)o(b[y],y)}}}(),clone:function(){return new this.constructor(this.geometry,this.material).copy(this)}}),Se.prototype=Object.assign(Object.create(ut.prototype),{constructor:Se}),Te.prototype=Object.create(r.prototype),Te.prototype.constructor=Te,Ae.prototype=Object.create(r.prototype),Ae.prototype.constructor=Ae,Ae.prototype.isCompressedTexture=!0,Le.prototype=Object.create(r.prototype),Le.prototype.constructor=Le,Ce.prototype=Object.create(r.prototype),Ce.prototype.constructor=Ce,Ce.prototype.isDepthTexture=!0,Pe.prototype=Object.create(Ct.prototype),Pe.prototype.constructor=Pe,Re.prototype=Object.create(Tt.prototype),Re.prototype.constructor=Re,Ie.prototype=Object.create(Tt.prototype),Ie.prototype.constructor=Ie,Oe.prototype=Object.create(Ie.prototype),Oe.prototype.constructor=Oe,Ue.prototype=Object.create(Ie.prototype),Ue.prototype.constructor=Ue,Ne.prototype=Object.create(Ie.prototype),Ne.prototype.constructor=Ne,Fe.prototype=Object.create(Ie.prototype),Fe.prototype.constructor=Fe,De.prototype=Object.create(Tt.prototype),De.prototype.constructor=De,De.NoTaper=function(t){return 1},De.SinusoidalTaper=function(t){return Math.sin(Math.PI*t)},De.FrenetFrames=function(e,n,r){function i(){v[0]=new u,g[0]=new u,a=Number.MAX_VALUE,s=Math.abs(m[0].x),c=Math.abs(m[0].y),h=Math.abs(m[0].z),s<=a&&(a=s,d.set(1,0,0)),c<=a&&(a=c,d.set(0,1,0)),h<=a&&d.set(0,0,1),y.crossVectors(m[0],d).normalize(),v[0].crossVectors(m[0],y),g[0].crossVectors(m[0],v[0])}var o,a,s,c,h,f,p,d=new u,m=[],v=[],g=[],y=new u,x=new l,_=n+1;for(this.tangents=m,this.normals=v,this.binormals=g,f=0;f<_;f++)p=f/(_-1),m[f]=e.getTangentAt(p),m[f].normalize();for(i(),f=1;f<_;f++)v[f]=v[f-1].clone(),g[f]=g[f-1].clone(),y.crossVectors(m[f-1],m[f]),y.length()>Number.EPSILON&&(y.normalize(),o=Math.acos(t.Math.clamp(m[f-1].dot(m[f]),-1,1)),v[f].applyMatrix4(x.makeRotationAxis(y,o))),g[f].crossVectors(m[f],v[f]);if(r)for(o=Math.acos(t.Math.clamp(v[0].dot(v[_-1]),-1,1)),o/=_-1,m[0].dot(y.crossVectors(v[0],v[_-1]))>0&&(o=-o),f=1;f<_;f++)v[f].applyMatrix4(x.makeRotationAxis(m[f],o*f)),g[f].crossVectors(m[f],v[f])},ze.prototype=Object.create(Ct.prototype),ze.prototype.constructor=ze,Be.prototype=Object.create(Tt.prototype),Be.prototype.constructor=Be,ke.prototype=Object.create(Ct.prototype),ke.prototype.constructor=ke,je.prototype=Object.create(Tt.prototype),je.prototype.constructor=je,t.ShapeUtils={area:function(t){for(var e=t.length,n=0,r=e-1,i=0;i<e;r=i++)n+=t[r].x*t[i].y-t[i].x*t[r].y;return.5*n},triangulate:function(){function e(t,e,n,r,i,o){var a,s,c,u,l,h,f,p,d;if(s=t[o[e]].x,c=t[o[e]].y,u=t[o[n]].x,l=t[o[n]].y,h=t[o[r]].x,f=t[o[r]].y,Number.EPSILON>(u-s)*(f-c)-(l-c)*(h-s))return!1;var m,v,g,y,x,_,w,b,M,E,S,T,A,L,C;for(m=h-u,v=f-l,g=s-h,y=c-f,x=u-s,_=l-c,a=0;a<i;a++)if(p=t[o[a]].x,d=t[o[a]].y,!(p===s&&d===c||p===u&&d===l||p===h&&d===f)&&(w=p-s,b=d-c,M=p-u,E=d-l,S=p-h,T=d-f,C=m*E-v*M,A=x*b-_*w,L=g*T-y*S,C>=-Number.EPSILON&&L>=-Number.EPSILON&&A>=-Number.EPSILON))return!1;return!0}return function(n,r){var i=n.length;if(i<3)return null;var o,a,s,c=[],u=[],l=[];if(t.ShapeUtils.area(n)>0)for(a=0;a<i;a++)u[a]=a;else for(a=0;a<i;a++)u[a]=i-1-a;var h=i,f=2*h;for(a=h-1;h>2;){if(f--<=0)return console.warn("THREE.ShapeUtils: Unable to triangulate polygon! in triangulate()"),r?l:c;if(o=a,h<=o&&(o=0),a=o+1,h<=a&&(a=0),s=a+1,h<=s&&(s=0),e(n,o,a,s,h,u)){var p,d,m,v,g;for(p=u[o],d=u[a],m=u[s],c.push([n[p],n[d],n[m]]),l.push([u[o],u[a],u[s]]),v=a,g=a+1;g<h;v++,g++)u[v]=u[g];h--,f=2*h}}return r?l:c}}(),triangulateShape:function(e,n){function r(t){var e=t.length;e>2&&t[e-1].equals(t[0])&&t.pop();
  }function i(t,e,n){return t.x!==e.x?t.x<e.x?t.x<=n.x&&n.x<=e.x:e.x<=n.x&&n.x<=t.x:t.y<e.y?t.y<=n.y&&n.y<=e.y:e.y<=n.y&&n.y<=t.y}function o(t,e,n,r,o){var a=e.x-t.x,s=e.y-t.y,c=r.x-n.x,u=r.y-n.y,l=t.x-n.x,h=t.y-n.y,f=s*c-a*u,p=s*l-a*h;if(Math.abs(f)>Number.EPSILON){var d;if(f>0){if(p<0||p>f)return[];if(d=u*l-c*h,d<0||d>f)return[]}else{if(p>0||p<f)return[];if(d=u*l-c*h,d>0||d<f)return[]}if(0===d)return!o||0!==p&&p!==f?[t]:[];if(d===f)return!o||0!==p&&p!==f?[e]:[];if(0===p)return[n];if(p===f)return[r];var m=d/f;return[{x:t.x+m*a,y:t.y+m*s}]}if(0!==p||u*l!==c*h)return[];var v=0===a&&0===s,g=0===c&&0===u;if(v&&g)return t.x!==n.x||t.y!==n.y?[]:[t];if(v)return i(n,r,t)?[t]:[];if(g)return i(t,e,n)?[n]:[];var y,x,_,w,b,M,E,S;return 0!==a?(t.x<e.x?(y=t,_=t.x,x=e,w=e.x):(y=e,_=e.x,x=t,w=t.x),n.x<r.x?(b=n,E=n.x,M=r,S=r.x):(b=r,E=r.x,M=n,S=n.x)):(t.y<e.y?(y=t,_=t.y,x=e,w=e.y):(y=e,_=e.y,x=t,w=t.y),n.y<r.y?(b=n,E=n.y,M=r,S=r.y):(b=r,E=r.y,M=n,S=n.y)),_<=E?w<E?[]:w===E?o?[]:[b]:w<=S?[b,x]:[b,M]:_>S?[]:_===S?o?[]:[y]:w<=S?[y,x]:[y,M]}function a(t,e,n,r){var i=e.x-t.x,o=e.y-t.y,a=n.x-t.x,s=n.y-t.y,c=r.x-t.x,u=r.y-t.y,l=i*s-o*a,h=i*u-o*c;if(Math.abs(l)>Number.EPSILON){var f=c*s-u*a;return l>0?h>=0&&f>=0:h>=0||f>=0}return h>0}function s(t,e){function n(t,e){var n=y.length-1,r=t-1;r<0&&(r=n);var i=t+1;i>n&&(i=0);var o=a(y[t],y[r],y[i],s[e]);if(!o)return!1;var c=s.length-1,u=e-1;u<0&&(u=c);var l=e+1;return l>c&&(l=0),o=a(s[e],s[u],s[l],y[t]),!!o}function r(t,e){var n,r,i;for(n=0;n<y.length;n++)if(r=n+1,r%=y.length,i=o(t,e,y[n],y[r],!0),i.length>0)return!0;return!1}function i(t,n){var r,i,a,s,c;for(r=0;r<x.length;r++)for(i=e[x[r]],a=0;a<i.length;a++)if(s=a+1,s%=i.length,c=o(t,n,i[a],i[s],!0),c.length>0)return!0;return!1}for(var s,c,u,l,h,f,p,d,m,v,g,y=t.concat(),x=[],_=[],w=0,b=e.length;w<b;w++)x.push(w);for(var M=0,E=2*x.length;x.length>0;){if(E--,E<0){console.log("Infinite Loop! Holes left:"+x.length+", Probably Hole outside Shape!");break}for(u=M;u<y.length;u++){l=y[u],c=-1;for(var w=0;w<x.length;w++)if(f=x[w],p=l.x+":"+l.y+":"+f,void 0===_[p]){s=e[f];for(var S=0;S<s.length;S++)if(h=s[S],n(u,S)&&!r(l,h)&&!i(l,h)){c=S,x.splice(w,1),d=y.slice(0,u+1),m=y.slice(u),v=s.slice(c),g=s.slice(0,c+1),y=d.concat(v).concat(g).concat(m),M=u;break}if(c>=0)break;_[p]=!0}if(c>=0)break}}return y}r(e),n.forEach(r);for(var c,u,l,h,f,p,d={},m=e.concat(),v=0,g=n.length;v<g;v++)Array.prototype.push.apply(m,n[v]);for(c=0,u=m.length;c<u;c++)f=m[c].x+":"+m[c].y,void 0!==d[f]&&console.warn("THREE.ShapeUtils: Duplicate point",f,c),d[f]=c;var y=s(e,n),x=t.ShapeUtils.triangulate(y,!1);for(c=0,u=x.length;c<u;c++)for(h=x[c],l=0;l<3;l++)f=h[l].x+":"+h[l].y,p=d[f],void 0!==p&&(h[l]=p);return x.concat()},isClockWise:function(e){return t.ShapeUtils.area(e)<0},b2:function(){function t(t,e){var n=1-t;return n*n*e}function e(t,e){return 2*(1-t)*t*e}function n(t,e){return t*t*e}return function(r,i,o,a){return t(r,i)+e(r,o)+n(r,a)}}(),b3:function(){function t(t,e){var n=1-t;return n*n*n*e}function e(t,e){var n=1-t;return 3*n*n*t*e}function n(t,e){var n=1-t;return 3*n*t*t*e}function r(t,e){return t*t*t*e}return function(i,o,a,s,c){return t(i,o)+e(i,a)+n(i,s)+r(i,c)}}()},Ge.prototype=Object.create(Tt.prototype),Ge.prototype.constructor=Ge,Ge.prototype.addShapeList=function(t,e){for(var n=t.length,r=0;r<n;r++){var i=t[r];this.addShape(i,e)}},Ge.prototype.addShape=function(e,r){function i(t,e,n){return e||console.error("THREE.ExtrudeGeometry: vec does not exist"),e.clone().multiplyScalar(n).add(t)}function o(t,e,r){var i,o,a=1,s=t.x-e.x,c=t.y-e.y,u=r.x-t.x,l=r.y-t.y,h=s*s+c*c,f=s*l-c*u;if(Math.abs(f)>Number.EPSILON){var p=Math.sqrt(h),d=Math.sqrt(u*u+l*l),m=e.x-c/p,v=e.y+s/p,g=r.x-l/d,y=r.y+u/d,x=((g-m)*l-(y-v)*u)/(s*l-c*u);i=m+s*x-t.x,o=v+c*x-t.y;var _=i*i+o*o;if(_<=2)return new n(i,o);a=Math.sqrt(_/2)}else{var w=!1;s>Number.EPSILON?u>Number.EPSILON&&(w=!0):s<-Number.EPSILON?u<-Number.EPSILON&&(w=!0):Math.sign(c)===Math.sign(l)&&(w=!0),w?(i=-c,o=s,a=Math.sqrt(h)):(i=s,o=c,a=Math.sqrt(h/2))}return new n(i/a,o/a)}function a(){if(b){var t=0,e=W*t;for(Y=0;Y<X;Y++)H=D[Y],h(H[2]+e,H[1]+e,H[0]+e);for(t=E+2*w,e=W*t,Y=0;Y<X;Y++)H=D[Y],h(H[0]+e,H[1]+e,H[2]+e)}else{for(Y=0;Y<X;Y++)H=D[Y],h(H[2],H[1],H[0]);for(Y=0;Y<X;Y++)H=D[Y],h(H[0]+W*E,H[1]+W*E,H[2]+W*E)}}function s(){var t=0;for(c(z,t),t+=z.length,C=0,P=N.length;C<P;C++)L=N[C],c(L,t),t+=L.length}function c(t,e){var n,r;for(Y=t.length;--Y>=0;){n=Y,r=Y-1,r<0&&(r=t.length-1);var i=0,o=E+2*w;for(i=0;i<o;i++){var a=W*i,s=W*(i+1),c=e+n+a,u=e+r+a,l=e+r+s,h=e+n+s;f(c,u,l,h,t,i,o,n,r)}}}function l(t,e,n){R.vertices.push(new u(t,e,n))}function h(t,e,n){t+=I,e+=I,n+=I,R.faces.push(new pt(t,e,n,null,null,0));var r=A.generateTopUV(R,t,e,n);R.faceVertexUvs[0].push(r)}function f(t,e,n,r,i,o,a,s,c){t+=I,e+=I,n+=I,r+=I,R.faces.push(new pt(t,e,r,null,null,1)),R.faces.push(new pt(e,n,r,null,null,1));var u=A.generateSideWallUV(R,t,e,n,r);R.faceVertexUvs[0].push([u[0],u[1],u[3]]),R.faceVertexUvs[0].push([u[1],u[2],u[3]])}var p,d,m,v,g,y=void 0!==r.amount?r.amount:100,x=void 0!==r.bevelThickness?r.bevelThickness:6,_=void 0!==r.bevelSize?r.bevelSize:x-2,w=void 0!==r.bevelSegments?r.bevelSegments:3,b=void 0===r.bevelEnabled||r.bevelEnabled,M=void 0!==r.curveSegments?r.curveSegments:12,E=void 0!==r.steps?r.steps:1,S=r.extrudePath,T=!1,A=void 0!==r.UVGenerator?r.UVGenerator:Ge.WorldUVGenerator;S&&(p=S.getSpacedPoints(E),T=!0,b=!1,d=void 0!==r.frames?r.frames:new De.FrenetFrames(S,E,(!1)),m=new u,v=new u,g=new u),b||(w=0,x=0,_=0);var L,C,P,R=this,I=this.vertices.length,O=e.extractPoints(M),U=O.shape,N=O.holes,F=!t.ShapeUtils.isClockWise(U);if(F){for(U=U.reverse(),C=0,P=N.length;C<P;C++)L=N[C],t.ShapeUtils.isClockWise(L)&&(N[C]=L.reverse());F=!1}var D=t.ShapeUtils.triangulateShape(U,N),z=U;for(C=0,P=N.length;C<P;C++)L=N[C],U=U.concat(L);for(var B,k,j,G,V,H,W=U.length,X=D.length,q=[],Y=0,Z=z.length,J=Z-1,$=Y+1;Y<Z;Y++,J++,$++)J===Z&&(J=0),$===Z&&($=0),q[Y]=o(z[Y],z[J],z[$]);var K,Q=[],tt=q.concat();for(C=0,P=N.length;C<P;C++){for(L=N[C],K=[],Y=0,Z=L.length,J=Z-1,$=Y+1;Y<Z;Y++,J++,$++)J===Z&&(J=0),$===Z&&($=0),K[Y]=o(L[Y],L[J],L[$]);Q.push(K),tt=tt.concat(K)}for(B=0;B<w;B++){for(j=B/w,G=x*Math.cos(j*Math.PI/2),k=_*Math.sin(j*Math.PI/2),Y=0,Z=z.length;Y<Z;Y++)V=i(z[Y],q[Y],k),l(V.x,V.y,-G);for(C=0,P=N.length;C<P;C++)for(L=N[C],K=Q[C],Y=0,Z=L.length;Y<Z;Y++)V=i(L[Y],K[Y],k),l(V.x,V.y,-G)}for(k=_,Y=0;Y<W;Y++)V=b?i(U[Y],tt[Y],k):U[Y],T?(v.copy(d.normals[0]).multiplyScalar(V.x),m.copy(d.binormals[0]).multiplyScalar(V.y),g.copy(p[0]).add(v).add(m),l(g.x,g.y,g.z)):l(V.x,V.y,0);var et;for(et=1;et<=E;et++)for(Y=0;Y<W;Y++)V=b?i(U[Y],tt[Y],k):U[Y],T?(v.copy(d.normals[et]).multiplyScalar(V.x),m.copy(d.binormals[et]).multiplyScalar(V.y),g.copy(p[et]).add(v).add(m),l(g.x,g.y,g.z)):l(V.x,V.y,y/E*et);for(B=w-1;B>=0;B--){for(j=B/w,G=x*Math.cos(j*Math.PI/2),k=_*Math.sin(j*Math.PI/2),Y=0,Z=z.length;Y<Z;Y++)V=i(z[Y],q[Y],k),l(V.x,V.y,y+G);for(C=0,P=N.length;C<P;C++)for(L=N[C],K=Q[C],Y=0,Z=L.length;Y<Z;Y++)V=i(L[Y],K[Y],k),T?l(V.x,V.y+p[E-1].y,p[E-1].x+G):l(V.x,V.y,y+G)}a(),s()},Ge.WorldUVGenerator={generateTopUV:function(t,e,r,i){var o=t.vertices,a=o[e],s=o[r],c=o[i];return[new n(a.x,a.y),new n(s.x,s.y),new n(c.x,c.y)]},generateSideWallUV:function(t,e,r,i,o){var a=t.vertices,s=a[e],c=a[r],u=a[i],l=a[o];return Math.abs(s.y-c.y)<.01?[new n(s.x,1-s.z),new n(c.x,1-c.z),new n(u.x,1-u.z),new n(l.x,1-l.z)]:[new n(s.y,1-s.z),new n(c.y,1-c.z),new n(u.y,1-u.z),new n(l.y,1-l.z)]}},Ve.prototype=Object.create(Ge.prototype),Ve.prototype.constructor=Ve,He.prototype=Object.create(Ct.prototype),He.prototype.constructor=He,We.prototype=Object.create(Tt.prototype),We.prototype.constructor=We,Xe.prototype=Object.create(Ct.prototype),Xe.prototype.constructor=Xe,qe.prototype=Object.create(Tt.prototype),qe.prototype.constructor=qe,Ye.prototype=Object.create(Tt.prototype),Ye.prototype.constructor=Ye,Ze.prototype=Object.create(Ct.prototype),Ze.prototype.constructor=Ze,Je.prototype=Object.create(Tt.prototype),Je.prototype.constructor=Je,$e.prototype=Object.create(Tt.prototype),$e.prototype.constructor=$e,$e.prototype.addShapeList=function(t,e){for(var n=0,r=t.length;n<r;n++)this.addShape(t[n],e);return this},$e.prototype.addShape=function(e,n){void 0===n&&(n={});var r,i,o,a=void 0!==n.curveSegments?n.curveSegments:12,s=n.material,c=void 0===n.UVGenerator?Ge.WorldUVGenerator:n.UVGenerator,l=this.vertices.length,h=e.extractPoints(a),f=h.shape,p=h.holes,d=!t.ShapeUtils.isClockWise(f);if(d){for(f=f.reverse(),r=0,i=p.length;r<i;r++)o=p[r],t.ShapeUtils.isClockWise(o)&&(p[r]=o.reverse());d=!1}var m=t.ShapeUtils.triangulateShape(f,p);for(r=0,i=p.length;r<i;r++)o=p[r],f=f.concat(o);var v,g,y=f.length,x=m.length;for(r=0;r<y;r++)v=f[r],this.vertices.push(new u(v.x,v.y,0));for(r=0;r<x;r++){g=m[r];var _=g[0]+l,w=g[1]+l,b=g[2]+l;this.faces.push(new pt(_,w,b,null,null,s)),this.faceVertexUvs[0].push(c.generateTopUV(this,_,w,b))}},Ke.prototype=Object.create(Ct.prototype),Ke.prototype.constructor=Ke,Qe.prototype=Object.create(Ct.prototype),Qe.prototype.constructor=Qe,tn.prototype=Object.create(Tt.prototype),tn.prototype.constructor=tn,en.prototype=Object.create(tn.prototype),en.prototype.constructor=en,nn.prototype=Object.create(Ct.prototype),nn.prototype.constructor=nn,rn.prototype=Object.create(Ct.prototype),rn.prototype.constructor=rn,on.prototype=Object.create(Tt.prototype),on.prototype.constructor=on,an.prototype=Object.create(Tt.prototype),an.prototype.constructor=an;var kc=Object.freeze({WireframeGeometry:Pe,ParametricGeometry:Re,TetrahedronGeometry:Oe,OctahedronGeometry:Ue,IcosahedronGeometry:Ne,DodecahedronGeometry:Fe,PolyhedronGeometry:Ie,TubeGeometry:De,TorusKnotGeometry:Be,TorusKnotBufferGeometry:ze,TorusGeometry:je,TorusBufferGeometry:ke,TextGeometry:Ve,SphereBufferGeometry:He,SphereGeometry:We,RingGeometry:qe,RingBufferGeometry:Xe,PlaneBufferGeometry:It,PlaneGeometry:Ye,LatheGeometry:Je,LatheBufferGeometry:Ze,ShapeGeometry:$e,ExtrudeGeometry:Ge,EdgesGeometry:Ke,ConeGeometry:en,ConeBufferGeometry:nn,CylinderGeometry:tn,CylinderBufferGeometry:Qe,CircleBufferGeometry:rn,CircleGeometry:on,BoxBufferGeometry:Rt,BoxGeometry:an});sn.prototype=Object.create(K.prototype),sn.prototype.constructor=sn,sn.prototype.isShadowMaterial=!0,cn.prototype=Object.create(K.prototype),cn.prototype.constructor=cn,cn.prototype.isRawShaderMaterial=!0,un.prototype={constructor:un,isMultiMaterial:!0,toJSON:function(t){for(var e={metadata:{version:4.2,type:"material",generator:"MaterialExporter"},uuid:this.uuid,type:this.type,materials:[]},n=this.materials,r=0,i=n.length;r<i;r++){var o=n[r].toJSON(t);delete o.metadata,e.materials.push(o)}return e.visible=this.visible,e},clone:function(){for(var t=new this.constructor,e=0;e<this.materials.length;e++)t.materials.push(this.materials[e].clone());return t.visible=this.visible,t}},ln.prototype=Object.create(J.prototype),ln.prototype.constructor=ln,ln.prototype.isMeshStandardMaterial=!0,ln.prototype.copy=function(t){return J.prototype.copy.call(this,t),this.defines={STANDARD:""},this.color.copy(t.color),this.roughness=t.roughness,this.metalness=t.metalness,this.map=t.map,this.lightMap=t.lightMap,this.lightMapIntensity=t.lightMapIntensity,this.aoMap=t.aoMap,this.aoMapIntensity=t.aoMapIntensity,this.emissive.copy(t.emissive),this.emissiveMap=t.emissiveMap,this.emissiveIntensity=t.emissiveIntensity,this.bumpMap=t.bumpMap,this.bumpScale=t.bumpScale,this.normalMap=t.normalMap,this.normalScale.copy(t.normalScale),this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.roughnessMap=t.roughnessMap,this.metalnessMap=t.metalnessMap,this.alphaMap=t.alphaMap,this.envMap=t.envMap,this.envMapIntensity=t.envMapIntensity,this.refractionRatio=t.refractionRatio,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.morphNormals=t.morphNormals,this},hn.prototype=Object.create(ln.prototype),hn.prototype.constructor=hn,hn.prototype.isMeshPhysicalMaterial=!0,hn.prototype.copy=function(t){return ln.prototype.copy.call(this,t),this.defines={PHYSICAL:""},this.reflectivity=t.reflectivity,this.clearCoat=t.clearCoat,this.clearCoatRoughness=t.clearCoatRoughness,this},fn.prototype=Object.create(J.prototype),fn.prototype.constructor=fn,fn.prototype.isMeshPhongMaterial=!0,fn.prototype.copy=function(t){return J.prototype.copy.call(this,t),this.color.copy(t.color),this.specular.copy(t.specular),this.shininess=t.shininess,this.map=t.map,this.lightMap=t.lightMap,this.lightMapIntensity=t.lightMapIntensity,this.aoMap=t.aoMap,this.aoMapIntensity=t.aoMapIntensity,this.emissive.copy(t.emissive),this.emissiveMap=t.emissiveMap,this.emissiveIntensity=t.emissiveIntensity,this.bumpMap=t.bumpMap,this.bumpScale=t.bumpScale,this.normalMap=t.normalMap,this.normalScale.copy(t.normalScale),this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.specularMap=t.specularMap,this.alphaMap=t.alphaMap,this.envMap=t.envMap,this.combine=t.combine,this.reflectivity=t.reflectivity,this.refractionRatio=t.refractionRatio,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.morphNormals=t.morphNormals,this},pn.prototype=Object.create(J.prototype),pn.prototype.constructor=pn,pn.prototype.isMeshNormalMaterial=!0,pn.prototype.copy=function(t){return J.prototype.copy.call(this,t),this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this},dn.prototype=Object.create(J.prototype),dn.prototype.constructor=dn,dn.prototype.isMeshLambertMaterial=!0,dn.prototype.copy=function(t){return J.prototype.copy.call(this,t),this.color.copy(t.color),this.map=t.map,this.lightMap=t.lightMap,this.lightMapIntensity=t.lightMapIntensity,this.aoMap=t.aoMap,this.aoMapIntensity=t.aoMapIntensity,this.emissive.copy(t.emissive),this.emissiveMap=t.emissiveMap,this.emissiveIntensity=t.emissiveIntensity,this.specularMap=t.specularMap,this.alphaMap=t.alphaMap,this.envMap=t.envMap,this.combine=t.combine,this.reflectivity=t.reflectivity,this.refractionRatio=t.refractionRatio,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.morphNormals=t.morphNormals,this},mn.prototype=Object.create(J.prototype),mn.prototype.constructor=mn,mn.prototype.isLineDashedMaterial=!0,mn.prototype.copy=function(t){return J.prototype.copy.call(this,t),this.color.copy(t.color),this.linewidth=t.linewidth,this.scale=t.scale,this.dashSize=t.dashSize,this.gapSize=t.gapSize,this};var jc=Object.freeze({ShadowMaterial:sn,SpriteMaterial:pe,RawShaderMaterial:cn,ShaderMaterial:K,PointsMaterial:Me,MultiMaterial:un,MeshPhysicalMaterial:hn,MeshStandardMaterial:ln,MeshPhongMaterial:fn,MeshNormalMaterial:pn,MeshLambertMaterial:dn,MeshDepthMaterial:Q,MeshBasicMaterial:dt,LineDashedMaterial:mn,LineBasicMaterial:_e,Material:J});t.Cache={enabled:!1,files:{},add:function(t,e){this.enabled!==!1&&(this.files[t]=e)},get:function(t){if(this.enabled!==!1)return this.files[t]},remove:function(t){delete this.files[t]},clear:function(){this.files={}}},t.DefaultLoadingManager=new vn,Object.assign(gn.prototype,{load:function(e,n,r,i){void 0!==this.path&&(e=this.path+e);var o=this,a=t.Cache.get(e);if(void 0!==a)return o.manager.itemStart(e),setTimeout(function(){n&&n(a),o.manager.itemEnd(e)},0),a;var s=new XMLHttpRequest;return s.open("GET",e,!0),s.addEventListener("load",function(r){var a=r.target.response;t.Cache.add(e,a),200===this.status?(n&&n(a),o.manager.itemEnd(e)):0===this.status?(console.warn("THREE.XHRLoader: HTTP Status 0 received."),n&&n(a),o.manager.itemEnd(e)):(i&&i(r),o.manager.itemError(e))},!1),void 0!==r&&s.addEventListener("progress",function(t){r(t)},!1),s.addEventListener("error",function(t){i&&i(t),o.manager.itemError(e)},!1),void 0!==this.responseType&&(s.responseType=this.responseType),void 0!==this.withCredentials&&(s.withCredentials=this.withCredentials),s.overrideMimeType&&s.overrideMimeType("text/plain"),s.send(null),o.manager.itemStart(e),s},setPath:function(t){return this.path=t,this},setResponseType:function(t){return this.responseType=t,this},setWithCredentials:function(t){return this.withCredentials=t,this}}),Object.assign(yn.prototype,{load:function(t,e,n,r){function i(i){c.load(t[i],function(t){var n=o._parser(t,!0);a[i]={width:n.width,height:n.height,format:n.format,mipmaps:n.mipmaps},u+=1,6===u&&(1===n.mipmapCount&&(s.minFilter=Co),s.format=n.format,s.needsUpdate=!0,e&&e(s))},n,r)}var o=this,a=[],s=new Ae;s.image=a;var c=new gn(this.manager);if(c.setPath(this.path),c.setResponseType("arraybuffer"),Array.isArray(t))for(var u=0,l=0,h=t.length;l<h;++l)i(l);else c.load(t,function(t){var n=o._parser(t,!0);if(n.isCubemap)for(var r=n.mipmaps.length/n.mipmapCount,i=0;i<r;i++){a[i]={mipmaps:[]};for(var c=0;c<n.mipmapCount;c++)a[i].mipmaps.push(n.mipmaps[i*n.mipmapCount+c]),a[i].format=n.format,a[i].width=n.width,a[i].height=n.height}else s.image.width=n.width,s.image.height=n.height,s.mipmaps=n.mipmaps;1===n.mipmapCount&&(s.minFilter=Co),s.format=n.format,s.needsUpdate=!0,e&&e(s)},n,r);return s},setPath:function(t){return this.path=t,this}});var Gc=xn;Object.assign(xn.prototype,{load:function(t,e,n,r){var i=this,o=new ve,a=new gn(this.manager);return a.setResponseType("arraybuffer"),a.load(t,function(t){var n=i._parser(t);n&&(void 0!==n.image?o.image=n.image:void 0!==n.data&&(o.image.width=n.width,o.image.height=n.height,o.image.data=n.data),o.wrapS=void 0!==n.wrapS?n.wrapS:Mo,o.wrapT=void 0!==n.wrapT?n.wrapT:Mo,o.magFilter=void 0!==n.magFilter?n.magFilter:Co,o.minFilter=void 0!==n.minFilter?n.minFilter:Ro,o.anisotropy=void 0!==n.anisotropy?n.anisotropy:1,void 0!==n.format&&(o.format=n.format),void 0!==n.type&&(o.type=n.type),void 0!==n.mipmaps&&(o.mipmaps=n.mipmaps),1===n.mipmapCount&&(o.minFilter=Co),o.needsUpdate=!0,e&&e(o,n))},n,r),o}}),Object.assign(_n.prototype,{load:function(t,e,n,r){var i=this,o=document.createElementNS("http://www.w3.org/1999/xhtml","img");if(o.onload=function(){o.onload=null,URL.revokeObjectURL(o.src),e&&e(o),i.manager.itemEnd(t)},0===t.indexOf("data:"))o.src=t;else{var a=new gn;a.setPath(this.path),a.setResponseType("blob"),a.setWithCredentials(this.withCredentials),a.load(t,function(t){o.src=URL.createObjectURL(t)},n,r)}return i.manager.itemStart(t),o},setCrossOrigin:function(t){return this.crossOrigin=t,this},setWithCredentials:function(t){return this.withCredentials=t,this},setPath:function(t){return this.path=t,this}}),Object.assign(wn.prototype,{load:function(t,e,n,r){function i(n){a.load(t[n],function(t){o.images[n]=t,s++,6===s&&(o.needsUpdate=!0,e&&e(o))},void 0,r)}var o=new h,a=new _n(this.manager);a.setCrossOrigin(this.crossOrigin),a.setPath(this.path);for(var s=0,c=0;c<t.length;++c)i(c);return o},setCrossOrigin:function(t){return this.crossOrigin=t,this},setPath:function(t){return this.path=t,this}}),Object.assign(bn.prototype,{load:function(t,e,n,i){var o=new r,a=new _n(this.manager);return a.setCrossOrigin(this.crossOrigin),a.setWithCredentials(this.withCredentials),a.setPath(this.path),a.load(t,function(n){var r=t.search(/\.(jpg|jpeg)$/)>0||0===t.search(/^data\:image\/jpeg/);o.format=r?Xo:qo,o.image=n,o.needsUpdate=!0,void 0!==e&&e(o)},n,i),o},setCrossOrigin:function(t){return this.crossOrigin=t,this},setWithCredentials:function(t){return this.withCredentials=t,this},setPath:function(t){return this.path=t,this}}),Mn.prototype=Object.assign(Object.create(ut.prototype),{constructor:Mn,isLight:!0,copy:function(t){return ut.prototype.copy.call(this,t),this.color.copy(t.color),this.intensity=t.intensity,this},toJSON:function(t){var e=ut.prototype.toJSON.call(this,t);return 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}}),En.prototype=Object.assign(Object.create(Mn.prototype),{constructor:En,isHemisphereLight:!0,copy:function(t){return Mn.prototype.copy.call(this,t),this.groundColor.copy(t.groundColor),this}}),Object.assign(Sn.prototype,{copy:function(t){return this.camera=t.camera.clone(),this.bias=t.bias,this.radius=t.radius,this.mapSize.copy(t.mapSize),this},clone:function(){return(new this.constructor).copy(this)},toJSON:function(){var t={};return 0!==this.bias&&(t.bias=this.bias),1!==this.radius&&(t.radius=this.radius),512===this.mapSize.x&&512===this.mapSize.y||(t.mapSize=this.mapSize.toArray()),t.camera=this.camera.toJSON(!1).object,delete t.camera.matrix,t}}),Tn.prototype=Object.assign(Object.create(Sn.prototype),{constructor:Tn,isSpotLightShadow:!0,update:function(e){var n=2*t.Math.RAD2DEG*e.angle,r=this.mapSize.width/this.mapSize.height,i=e.distance||500,o=this.camera;n===o.fov&&r===o.aspect&&i===o.far||(o.fov=n,o.aspect=r,o.far=i,o.updateProjectionMatrix())}}),An.prototype=Object.assign(Object.create(Mn.prototype),{constructor:An,isSpotLight:!0,copy:function(t){return Mn.prototype.copy.call(this,t),this.distance=t.distance,this.angle=t.angle,this.penumbra=t.penumbra,this.decay=t.decay,this.target=t.target.clone(),this.shadow=t.shadow.clone(),this}}),Ln.prototype=Object.assign(Object.create(Mn.prototype),{constructor:Ln,isPointLight:!0,copy:function(t){return Mn.prototype.copy.call(this,t),this.distance=t.distance,this.decay=t.decay,this.shadow=t.shadow.clone(),this}}),Cn.prototype=Object.assign(Object.create(Sn.prototype),{constructor:Cn}),Pn.prototype=Object.assign(Object.create(Mn.prototype),{constructor:Pn,isDirectionalLight:!0,copy:function(t){return Mn.prototype.copy.call(this,t),this.target=t.target.clone(),this.shadow=t.shadow.clone(),this}}),Rn.prototype=Object.assign(Object.create(Mn.prototype),{constructor:Rn,isAmbientLight:!0}),t.AnimationUtils={arraySlice:function(e,n,r){return t.AnimationUtils.isTypedArray(e)?new e.constructor(e.subarray(n,r)):e.slice(n,r)},convertArray:function(t,e,n){return!t||!n&&t.constructor===e?t:"number"==typeof e.BYTES_PER_ELEMENT?new e(t):Array.prototype.slice.call(t)},isTypedArray:function(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)},getKeyframeOrder:function(t){function e(e,n){return t[e]-t[n]}for(var n=t.length,r=new Array(n),i=0;i!==n;++i)r[i]=i;return r.sort(e),r},sortedArray:function(t,e,n){for(var r=t.length,i=new t.constructor(r),o=0,a=0;a!==r;++o)for(var s=n[o]*e,c=0;c!==e;++c)i[a++]=t[s+c];return i},flattenJSON:function(t,e,n,r){for(var i=1,o=t[0];void 0!==o&&void 0===o[r];)o=t[i++];if(void 0!==o){var a=o[r];if(void 0!==a)if(Array.isArray(a)){do a=o[r],void 0!==a&&(e.push(o.time),n.push.apply(n,a)),o=t[i++];while(void 0!==o)}else if(void 0!==a.toArray){do a=o[r],void 0!==a&&(e.push(o.time),a.toArray(n,n.length)),o=t[i++];while(void 0!==o)}else do a=o[r],void 0!==a&&(e.push(o.time),n.push(a)),o=t[i++];while(void 0!==o)}}},In.prototype={constructor:In,evaluate:function(t){var e=this.parameterPositions,n=this._cachedIndex,r=e[n],i=e[n-1];t:{e:{var o;n:{r:if(!(t<r)){for(var a=n+2;;){if(void 0===r){if(t<i)break r;return n=e.length,this._cachedIndex=n,this.afterEnd_(n-1,t,i)}if(n===a)break;if(i=r,r=e[++n],t<r)break e}o=e.length;break n}{if(t>=i)break t;var s=e[1];t<s&&(n=2,i=s);for(var a=n-2;;){if(void 0===i)return this._cachedIndex=0,this.beforeStart_(0,t,r);if(n===a)break;if(r=i,i=e[--n-1],t>=i)break e}o=n,n=0}}for(;n<o;){var c=n+o>>>1;t<e[c]?o=c:n=c+1}if(r=e[n],i=e[n-1],void 0===i)return this._cachedIndex=0,this.beforeStart_(0,t,r);if(void 0===r)return n=e.length,this._cachedIndex=n,this.afterEnd_(n-1,i,t)}this._cachedIndex=n,this.intervalChanged_(n,i,r)}return this.interpolate_(n,i,t,r)},settings:null,DefaultSettings_:{},getSettings_:function(){return this.settings||this.DefaultSettings_},copySampleValue_:function(t){for(var e=this.resultBuffer,n=this.sampleValues,r=this.valueSize,i=t*r,o=0;o!==r;++o)e[o]=n[i+o];return e},interpolate_:function(t,e,n,r){throw new Error("call to abstract method")},intervalChanged_:function(t,e,n){}},Object.assign(In.prototype,{beforeStart_:In.prototype.copySampleValue_,afterEnd_:In.prototype.copySampleValue_}),On.prototype=Object.assign(Object.create(In.prototype),{constructor:On,DefaultSettings_:{endingStart:da,endingEnd:da},intervalChanged_:function(t,e,n){var r=this.parameterPositions,i=t-2,o=t+1,a=r[i],s=r[o];if(void 0===a)switch(this.getSettings_().endingStart){case ma:i=t,a=2*e-n;break;case va:i=r.length-2,a=e+r[i]-r[i+1];break;default:i=t,a=n}if(void 0===s)switch(this.getSettings_().endingEnd){case ma:o=t,s=2*n-e;break;case va:o=1,s=n+r[1]-r[0];break;default:o=t-1,s=e}var c=.5*(n-e),u=this.valueSize;this._weightPrev=c/(e-a),this._weightNext=c/(s-n),this._offsetPrev=i*u,this._offsetNext=o*u},interpolate_:function(t,e,n,r){for(var i=this.resultBuffer,o=this.sampleValues,a=this.valueSize,s=t*a,c=s-a,u=this._offsetPrev,l=this._offsetNext,h=this._weightPrev,f=this._weightNext,p=(n-e)/(r-e),d=p*p,m=d*p,v=-h*m+2*h*d-h*p,g=(1+h)*m+(-1.5-2*h)*d+(-.5+h)*p+1,y=(-1-f)*m+(1.5+f)*d+.5*p,x=f*m-f*d,_=0;_!==a;++_)i[_]=v*o[u+_]+g*o[c+_]+y*o[s+_]+x*o[l+_];return i}}),Un.prototype=Object.assign(Object.create(In.prototype),{constructor:Un,interpolate_:function(t,e,n,r){for(var i=this.resultBuffer,o=this.sampleValues,a=this.valueSize,s=t*a,c=s-a,u=(n-e)/(r-e),l=1-u,h=0;h!==a;++h)i[h]=o[c+h]*l+o[s+h]*u;return i}}),Nn.prototype=Object.assign(Object.create(In.prototype),{constructor:Nn,interpolate_:function(t,e,n,r){return this.copySampleValue_(t-1)}});var Vc;Vc={TimeBufferType:Float32Array,ValueBufferType:Float32Array,DefaultInterpolation:fa,InterpolantFactoryMethodDiscrete:function(t){return new Nn(this.times,this.values,this.getValueSize(),t)},InterpolantFactoryMethodLinear:function(t){return new Un(this.times,this.values,this.getValueSize(),t)},InterpolantFactoryMethodSmooth:function(t){return new On(this.times,this.values,this.getValueSize(),t)},setInterpolation:function(t){var e;switch(t){case ha:e=this.InterpolantFactoryMethodDiscrete;break;case fa:e=this.InterpolantFactoryMethodLinear;break;case pa:e=this.InterpolantFactoryMethodSmooth}if(void 0===e){var n="unsupported interpolation for "+this.ValueTypeName+" keyframe track named "+this.name;if(void 0===this.createInterpolant){if(t===this.DefaultInterpolation)throw new Error(n);this.setInterpolation(this.DefaultInterpolation)}return void console.warn(n)}this.createInterpolant=e},getInterpolation:function(){switch(this.createInterpolant){case this.InterpolantFactoryMethodDiscrete:return ha;case this.InterpolantFactoryMethodLinear:return fa;case this.InterpolantFactoryMethodSmooth:return pa}},getValueSize:function(){return this.values.length/this.times.length},shift:function(t){if(0!==t)for(var e=this.times,n=0,r=e.length;n!==r;++n)e[n]+=t;return this},scale:function(t){if(1!==t)for(var e=this.times,n=0,r=e.length;n!==r;++n)e[n]*=t;return this},trim:function(e,n){for(var r=this.times,i=r.length,o=0,a=i-1;o!==i&&r[o]<e;)++o;for(;a!==-1&&r[a]>n;)--a;if(++a,0!==o||a!==i){o>=a&&(a=Math.max(a,1),o=a-1);var s=this.getValueSize();this.times=t.AnimationUtils.arraySlice(r,o,a),this.values=t.AnimationUtils.arraySlice(this.values,o*s,a*s)}return this},validate:function(){var e=!0,n=this.getValueSize();n-Math.floor(n)!==0&&(console.error("invalid value size in track",this),e=!1);var r=this.times,i=this.values,o=r.length;0===o&&(console.error("track is empty",this),e=!1);for(var a=null,s=0;s!==o;s++){var c=r[s];if("number"==typeof c&&isNaN(c)){console.error("time is not a valid number",this,s,c),e=!1;break}if(null!==a&&a>c){console.error("out of order keys",this,s,c,a),e=!1;break}a=c}if(void 0!==i&&t.AnimationUtils.isTypedArray(i))for(var s=0,u=i.length;s!==u;++s){var l=i[s];if(isNaN(l)){console.error("value is not a valid number",this,s,l),e=!1;break}}return e},optimize:function(){for(var e=this.times,n=this.values,r=this.getValueSize(),i=this.getInterpolation()===pa,o=1,a=e.length-1,s=1;s<a;++s){var c=!1,u=e[s],l=e[s+1];if(u!==l&&(1!==s||u!==u[0]))if(i)c=!0;else for(var h=s*r,f=h-r,p=h+r,d=0;d!==r;++d){var m=n[h+d];if(m!==n[f+d]||m!==n[p+d]){c=!0;break}}if(c){if(s!==o){e[o]=e[s];for(var v=s*r,g=o*r,d=0;d!==r;++d)n[g+d]=n[v+d]}++o}}if(a>0){e[o]=e[a];for(var v=a*r,g=o*r,d=0;d!==r;++d)n[g+d]=n[v+d];++o}return o!==e.length&&(this.times=t.AnimationUtils.arraySlice(e,0,o),this.values=t.AnimationUtils.arraySlice(n,0,o*r)),this}},Dn.prototype=Object.assign(Object.create(Vc),{constructor:Dn,ValueTypeName:"vector"}),zn.prototype=Object.assign(Object.create(In.prototype),{constructor:zn,interpolate_:function(t,e,n,r){for(var i=this.resultBuffer,o=this.sampleValues,a=this.valueSize,s=t*a,u=(n-e)/(r-e),l=s+a;s!==l;s+=4)c.slerpFlat(i,0,o,s-a,o,s,u);return i}}),Bn.prototype=Object.assign(Object.create(Vc),{constructor:Bn,ValueTypeName:"quaternion",DefaultInterpolation:fa,InterpolantFactoryMethodLinear:function(t){return new zn(this.times,this.values,this.getValueSize(),t)},InterpolantFactoryMethodSmooth:void 0}),kn.prototype=Object.assign(Object.create(Vc),{constructor:kn,ValueTypeName:"number"}),jn.prototype=Object.assign(Object.create(Vc),{constructor:jn,ValueTypeName:"string",ValueBufferType:Array,DefaultInterpolation:ha,InterpolantFactoryMethodLinear:void 0,InterpolantFactoryMethodSmooth:void 0}),Gn.prototype=Object.assign(Object.create(Vc),{constructor:Gn,ValueTypeName:"bool",ValueBufferType:Array,DefaultInterpolation:ha,InterpolantFactoryMethodLinear:void 0,InterpolantFactoryMethodSmooth:void 0}),Vn.prototype=Object.assign(Object.create(Vc),{constructor:Vn,ValueTypeName:"color"}),Hn.prototype=Vc,Vc.constructor=Hn,Object.assign(Hn,{parse:function(e){if(void 0===e.type)throw new Error("track type undefined, can not parse");var n=Hn._getTrackTypeForValueTypeName(e.type);if(void 0===e.times){var r=[],i=[];t.AnimationUtils.flattenJSON(e.keys,r,i,"value"),e.times=r,e.values=i}return void 0!==n.parse?n.parse(e):new n(e.name,e.times,e.values,e.interpolation)},toJSON:function(e){var n,r=e.constructor;if(void 0!==r.toJSON)n=r.toJSON(e);else{n={name:e.name,times:t.AnimationUtils.convertArray(e.times,Array),values:t.AnimationUtils.convertArray(e.values,Array)};var i=e.getInterpolation();i!==e.DefaultInterpolation&&(n.interpolation=i)}return n.type=e.ValueTypeName,n},_getTrackTypeForValueTypeName:function(t){switch(t.toLowerCase()){case"scalar":case"double":case"float":case"number":case"integer":return kn;case"vector":case"vector2":case"vector3":case"vector4":return Dn;case"color":return Vn;case"quaternion":return Bn;case"bool":case"boolean":return Gn;case"string":return jn}throw new Error("Unsupported typeName: "+t)}}),Wn.prototype={constructor:Wn,resetDuration:function(){for(var t=this.tracks,e=0,n=0,r=t.length;n!==r;++n){var i=this.tracks[n];e=Math.max(e,i.times[i.times.length-1])}this.duration=e},trim:function(){for(var t=0;t<this.tracks.length;t++)this.tracks[t].trim(0,this.duration);return this},optimize:function(){for(var t=0;t<this.tracks.length;t++)this.tracks[t].optimize();return this}},Object.assign(Wn,{parse:function(t){for(var e=[],n=t.tracks,r=1/(t.fps||1),i=0,o=n.length;i!==o;++i)e.push(Hn.parse(n[i]).scale(r));return new Wn(t.name,t.duration,e)},toJSON:function(t){for(var e=[],n=t.tracks,r={name:t.name,duration:t.duration,tracks:e},i=0,o=n.length;i!==o;++i)e.push(Hn.toJSON(n[i]));return r},CreateFromMorphTargetSequence:function(e,n,r,i){for(var o=n.length,a=[],s=0;s<o;s++){var c=[],u=[];c.push((s+o-1)%o,s,(s+1)%o),u.push(0,1,0);var l=t.AnimationUtils.getKeyframeOrder(c);c=t.AnimationUtils.sortedArray(c,1,l),u=t.AnimationUtils.sortedArray(u,1,l),
  i||0!==c[0]||(c.push(o),u.push(u[0])),a.push(new kn(".morphTargetInfluences["+n[s].name+"]",c,u).scale(1/r))}return new Wn(e,(-1),a)},findByName:function(t,e){var n=t;if(!Array.isArray(t)){var r=t;n=r.geometry&&r.geometry.animations||r.animations}for(var i=0;i<n.length;i++)if(n[i].name===e)return n[i];return null},CreateClipsFromMorphTargetSequences:function(t,e,n){for(var r={},i=/^([\w-]*?)([\d]+)$/,o=0,a=t.length;o<a;o++){var s=t[o],c=s.name.match(i);if(c&&c.length>1){var u=c[1],l=r[u];l||(r[u]=l=[]),l.push(s)}}var h=[];for(var u in r)h.push(Wn.CreateFromMorphTargetSequence(u,r[u],e,n));return h},parseAnimation:function(e,n){if(!e)return console.error("  no animation in JSONLoader data"),null;for(var r=function(e,n,r,i,o){if(0!==r.length){var a=[],s=[];t.AnimationUtils.flattenJSON(r,a,s,i),0!==a.length&&o.push(new e(n,a,s))}},i=[],o=e.name||"default",a=e.length||-1,s=e.fps||30,c=e.hierarchy||[],u=0;u<c.length;u++){var l=c[u].keys;if(l&&0!==l.length)if(l[0].morphTargets){for(var h={},f=0;f<l.length;f++)if(l[f].morphTargets)for(var p=0;p<l[f].morphTargets.length;p++)h[l[f].morphTargets[p]]=-1;for(var d in h){for(var m=[],v=[],p=0;p!==l[f].morphTargets.length;++p){var g=l[f];m.push(g.time),v.push(g.morphTarget===d?1:0)}i.push(new kn(".morphTargetInfluence["+d+"]",m,v))}a=h.length*(s||1)}else{var y=".bones["+n[u].name+"]";r(Dn,y+".position",l,"pos",i),r(Bn,y+".quaternion",l,"rot",i),r(Dn,y+".scale",l,"scl",i)}}if(0===i.length)return null;var x=new Wn(o,a,i);return x}}),Object.assign(Xn.prototype,{load:function(t,e,n,r){var i=this,o=new gn(i.manager);o.load(t,function(t){e(i.parse(JSON.parse(t)))},n,r)},setTextures:function(t){this.textures=t},parse:function(t){function e(t){return void 0===r[t]&&console.warn("THREE.MaterialLoader: Undefined texture",t),r[t]}var r=this.textures,i=new jc[t.type];if(void 0!==t.uuid&&(i.uuid=t.uuid),void 0!==t.name&&(i.name=t.name),void 0!==t.color&&i.color.setHex(t.color),void 0!==t.roughness&&(i.roughness=t.roughness),void 0!==t.metalness&&(i.metalness=t.metalness),void 0!==t.emissive&&i.emissive.setHex(t.emissive),void 0!==t.specular&&i.specular.setHex(t.specular),void 0!==t.shininess&&(i.shininess=t.shininess),void 0!==t.uniforms&&(i.uniforms=t.uniforms),void 0!==t.vertexShader&&(i.vertexShader=t.vertexShader),void 0!==t.fragmentShader&&(i.fragmentShader=t.fragmentShader),void 0!==t.vertexColors&&(i.vertexColors=t.vertexColors),void 0!==t.fog&&(i.fog=t.fog),void 0!==t.shading&&(i.shading=t.shading),void 0!==t.blending&&(i.blending=t.blending),void 0!==t.side&&(i.side=t.side),void 0!==t.opacity&&(i.opacity=t.opacity),void 0!==t.transparent&&(i.transparent=t.transparent),void 0!==t.alphaTest&&(i.alphaTest=t.alphaTest),void 0!==t.depthTest&&(i.depthTest=t.depthTest),void 0!==t.depthWrite&&(i.depthWrite=t.depthWrite),void 0!==t.colorWrite&&(i.colorWrite=t.colorWrite),void 0!==t.wireframe&&(i.wireframe=t.wireframe),void 0!==t.wireframeLinewidth&&(i.wireframeLinewidth=t.wireframeLinewidth),void 0!==t.wireframeLinecap&&(i.wireframeLinecap=t.wireframeLinecap),void 0!==t.wireframeLinejoin&&(i.wireframeLinejoin=t.wireframeLinejoin),void 0!==t.skinning&&(i.skinning=t.skinning),void 0!==t.morphTargets&&(i.morphTargets=t.morphTargets),void 0!==t.size&&(i.size=t.size),void 0!==t.sizeAttenuation&&(i.sizeAttenuation=t.sizeAttenuation),void 0!==t.map&&(i.map=e(t.map)),void 0!==t.alphaMap&&(i.alphaMap=e(t.alphaMap),i.transparent=!0),void 0!==t.bumpMap&&(i.bumpMap=e(t.bumpMap)),void 0!==t.bumpScale&&(i.bumpScale=t.bumpScale),void 0!==t.normalMap&&(i.normalMap=e(t.normalMap)),void 0!==t.normalScale){var o=t.normalScale;Array.isArray(o)===!1&&(o=[o,o]),i.normalScale=(new n).fromArray(o)}if(void 0!==t.displacementMap&&(i.displacementMap=e(t.displacementMap)),void 0!==t.displacementScale&&(i.displacementScale=t.displacementScale),void 0!==t.displacementBias&&(i.displacementBias=t.displacementBias),void 0!==t.roughnessMap&&(i.roughnessMap=e(t.roughnessMap)),void 0!==t.metalnessMap&&(i.metalnessMap=e(t.metalnessMap)),void 0!==t.emissiveMap&&(i.emissiveMap=e(t.emissiveMap)),void 0!==t.emissiveIntensity&&(i.emissiveIntensity=t.emissiveIntensity),void 0!==t.specularMap&&(i.specularMap=e(t.specularMap)),void 0!==t.envMap&&(i.envMap=e(t.envMap)),void 0!==t.reflectivity&&(i.reflectivity=t.reflectivity),void 0!==t.lightMap&&(i.lightMap=e(t.lightMap)),void 0!==t.lightMapIntensity&&(i.lightMapIntensity=t.lightMapIntensity),void 0!==t.aoMap&&(i.aoMap=e(t.aoMap)),void 0!==t.aoMapIntensity&&(i.aoMapIntensity=t.aoMapIntensity),void 0!==t.materials)for(var a=0,s=t.materials.length;a<s;a++)i.materials.push(this.parse(t.materials[a]));return i}}),Object.assign(qn.prototype,{load:function(t,e,n,r){var i=this,o=new gn(i.manager);o.load(t,function(t){e(i.parse(JSON.parse(t)))},n,r)},parse:function(t){var e=new Ct,n=t.data.index,r={Int8Array:Int8Array,Uint8Array:Uint8Array,Uint8ClampedArray:Uint8ClampedArray,Int16Array:Int16Array,Uint16Array:Uint16Array,Int32Array:Int32Array,Uint32Array:Uint32Array,Float32Array:Float32Array,Float64Array:Float64Array};if(void 0!==n){var i=new r[n.type](n.array);e.setIndex(new mt(i,1))}var o=t.data.attributes;for(var a in o){var s=o[a],i=new r[s.type](s.array);e.addAttribute(a,new mt(i,s.itemSize,s.normalized))}var c=t.data.groups||t.data.drawcalls||t.data.offsets;if(void 0!==c)for(var l=0,h=c.length;l!==h;++l){var f=c[l];e.addGroup(f.start,f.count,f.materialIndex)}var p=t.data.boundingSphere;if(void 0!==p){var d=new u;void 0!==p.center&&d.fromArray(p.center),e.boundingSphere=new et(d,p.radius)}return e}}),Yn.prototype={constructor:Yn,crossOrigin:void 0,extractUrlBase:function(t){var e=t.split("/");return 1===e.length?"./":(e.pop(),e.join("/")+"/")},initMaterials:function(t,e,n){for(var r=[],i=0;i<t.length;++i)r[i]=this.createMaterial(t[i],e,n);return r},createMaterial:function(){var e,n,r;return function(i,o,a){function s(e,r,i,s,u){var l,h=o+e,f=Yn.Handlers.get(h);null!==f?l=f.load(h):(n.setCrossOrigin(a),l=n.load(h)),void 0!==r&&(l.repeat.fromArray(r),1!==r[0]&&(l.wrapS=bo),1!==r[1]&&(l.wrapT=bo)),void 0!==i&&l.offset.fromArray(i),void 0!==s&&("repeat"===s[0]&&(l.wrapS=bo),"mirror"===s[0]&&(l.wrapS=Eo),"repeat"===s[1]&&(l.wrapT=bo),"mirror"===s[1]&&(l.wrapT=Eo)),void 0!==u&&(l.anisotropy=u);var p=t.Math.generateUUID();return c[p]=l,p}void 0===e&&(e=new X),void 0===n&&(n=new bn),void 0===r&&(r=new Xn);var c={},u={uuid:t.Math.generateUUID(),type:"MeshLambertMaterial"};for(var l in i){var h=i[l];switch(l){case"DbgColor":case"DbgIndex":case"opticalDensity":case"illumination":break;case"DbgName":u.name=h;break;case"blending":u.blending=Oi[h];break;case"colorAmbient":case"mapAmbient":console.warn("THREE.Loader.createMaterial:",l,"is no longer supported.");break;case"colorDiffuse":u.color=e.fromArray(h).getHex();break;case"colorSpecular":u.specular=e.fromArray(h).getHex();break;case"colorEmissive":u.emissive=e.fromArray(h).getHex();break;case"specularCoef":u.shininess=h;break;case"shading":"basic"===h.toLowerCase()&&(u.type="MeshBasicMaterial"),"phong"===h.toLowerCase()&&(u.type="MeshPhongMaterial"),"standard"===h.toLowerCase()&&(u.type="MeshStandardMaterial");break;case"mapDiffuse":u.map=s(h,i.mapDiffuseRepeat,i.mapDiffuseOffset,i.mapDiffuseWrap,i.mapDiffuseAnisotropy);break;case"mapDiffuseRepeat":case"mapDiffuseOffset":case"mapDiffuseWrap":case"mapDiffuseAnisotropy":break;case"mapEmissive":u.emissiveMap=s(h,i.mapEmissiveRepeat,i.mapEmissiveOffset,i.mapEmissiveWrap,i.mapEmissiveAnisotropy);break;case"mapEmissiveRepeat":case"mapEmissiveOffset":case"mapEmissiveWrap":case"mapEmissiveAnisotropy":break;case"mapLight":u.lightMap=s(h,i.mapLightRepeat,i.mapLightOffset,i.mapLightWrap,i.mapLightAnisotropy);break;case"mapLightRepeat":case"mapLightOffset":case"mapLightWrap":case"mapLightAnisotropy":break;case"mapAO":u.aoMap=s(h,i.mapAORepeat,i.mapAOOffset,i.mapAOWrap,i.mapAOAnisotropy);break;case"mapAORepeat":case"mapAOOffset":case"mapAOWrap":case"mapAOAnisotropy":break;case"mapBump":u.bumpMap=s(h,i.mapBumpRepeat,i.mapBumpOffset,i.mapBumpWrap,i.mapBumpAnisotropy);break;case"mapBumpScale":u.bumpScale=h;break;case"mapBumpRepeat":case"mapBumpOffset":case"mapBumpWrap":case"mapBumpAnisotropy":break;case"mapNormal":u.normalMap=s(h,i.mapNormalRepeat,i.mapNormalOffset,i.mapNormalWrap,i.mapNormalAnisotropy);break;case"mapNormalFactor":u.normalScale=[h,h];break;case"mapNormalRepeat":case"mapNormalOffset":case"mapNormalWrap":case"mapNormalAnisotropy":break;case"mapSpecular":u.specularMap=s(h,i.mapSpecularRepeat,i.mapSpecularOffset,i.mapSpecularWrap,i.mapSpecularAnisotropy);break;case"mapSpecularRepeat":case"mapSpecularOffset":case"mapSpecularWrap":case"mapSpecularAnisotropy":break;case"mapMetalness":u.metalnessMap=s(h,i.mapMetalnessRepeat,i.mapMetalnessOffset,i.mapMetalnessWrap,i.mapMetalnessAnisotropy);break;case"mapMetalnessRepeat":case"mapMetalnessOffset":case"mapMetalnessWrap":case"mapMetalnessAnisotropy":break;case"mapRoughness":u.roughnessMap=s(h,i.mapRoughnessRepeat,i.mapRoughnessOffset,i.mapRoughnessWrap,i.mapRoughnessAnisotropy);break;case"mapRoughnessRepeat":case"mapRoughnessOffset":case"mapRoughnessWrap":case"mapRoughnessAnisotropy":break;case"mapAlpha":u.alphaMap=s(h,i.mapAlphaRepeat,i.mapAlphaOffset,i.mapAlphaWrap,i.mapAlphaAnisotropy);break;case"mapAlphaRepeat":case"mapAlphaOffset":case"mapAlphaWrap":case"mapAlphaAnisotropy":break;case"flipSided":u.side=_i;break;case"doubleSided":u.side=wi;break;case"transparency":console.warn("THREE.Loader.createMaterial: transparency has been renamed to opacity"),u.opacity=h;break;case"depthTest":case"depthWrite":case"colorWrite":case"opacity":case"reflectivity":case"transparent":case"visible":case"wireframe":u[l]=h;break;case"vertexColors":h===!0&&(u.vertexColors=Ti),"face"===h&&(u.vertexColors=Si);break;default:console.error("THREE.Loader.createMaterial: Unsupported",l,h)}}return"MeshBasicMaterial"===u.type&&delete u.emissive,"MeshPhongMaterial"!==u.type&&delete u.specular,u.opacity<1&&(u.transparent=!0),r.setTextures(c),r.parse(u)}}()},Yn.Handlers={handlers:[],add:function(t,e){this.handlers.push(t,e)},get:function(t){for(var e=this.handlers,n=0,r=e.length;n<r;n+=2){var i=e[n],o=e[n+1];if(i.test(t))return o}return null}},Object.assign(Zn.prototype,{load:function(t,e,n,r){var i=this,o=this.texturePath&&"string"==typeof this.texturePath?this.texturePath:Yn.prototype.extractUrlBase(t),a=new gn(this.manager);a.setWithCredentials(this.withCredentials),a.load(t,function(n){var r=JSON.parse(n),a=r.metadata;if(void 0!==a){var s=a.type;if(void 0!==s){if("object"===s.toLowerCase())return void console.error("THREE.JSONLoader: "+t+" should be loaded with THREE.ObjectLoader instead.");if("scene"===s.toLowerCase())return void console.error("THREE.JSONLoader: "+t+" should be loaded with THREE.SceneLoader instead.")}}var c=i.parse(r,o);e(c.geometry,c.materials)},n,r)},setTexturePath:function(t){this.texturePath=t},parse:function(t,e){function r(e){function r(t,e){return t&1<<e}var i,o,a,s,l,h,f,p,d,m,v,g,y,x,_,w,b,M,E,S,T,A,L,C,P,R,I,O=t.faces,U=t.vertices,N=t.normals,F=t.colors,D=0;if(void 0!==t.uvs){for(i=0;i<t.uvs.length;i++)t.uvs[i].length&&D++;for(i=0;i<D;i++)c.faceVertexUvs[i]=[]}for(s=0,l=U.length;s<l;)M=new u,M.x=U[s++]*e,M.y=U[s++]*e,M.z=U[s++]*e,c.vertices.push(M);for(s=0,l=O.length;s<l;)if(m=O[s++],v=r(m,0),g=r(m,1),y=r(m,3),x=r(m,4),_=r(m,5),w=r(m,6),b=r(m,7),v){if(S=new pt,S.a=O[s],S.b=O[s+1],S.c=O[s+3],T=new pt,T.a=O[s+1],T.b=O[s+2],T.c=O[s+3],s+=4,g&&(d=O[s++],S.materialIndex=d,T.materialIndex=d),a=c.faces.length,y)for(i=0;i<D;i++)for(C=t.uvs[i],c.faceVertexUvs[i][a]=[],c.faceVertexUvs[i][a+1]=[],o=0;o<4;o++)p=O[s++],R=C[2*p],I=C[2*p+1],P=new n(R,I),2!==o&&c.faceVertexUvs[i][a].push(P),0!==o&&c.faceVertexUvs[i][a+1].push(P);if(x&&(f=3*O[s++],S.normal.set(N[f++],N[f++],N[f]),T.normal.copy(S.normal)),_)for(i=0;i<4;i++)f=3*O[s++],L=new u(N[f++],N[f++],N[f]),2!==i&&S.vertexNormals.push(L),0!==i&&T.vertexNormals.push(L);if(w&&(h=O[s++],A=F[h],S.color.setHex(A),T.color.setHex(A)),b)for(i=0;i<4;i++)h=O[s++],A=F[h],2!==i&&S.vertexColors.push(new X(A)),0!==i&&T.vertexColors.push(new X(A));c.faces.push(S),c.faces.push(T)}else{if(E=new pt,E.a=O[s++],E.b=O[s++],E.c=O[s++],g&&(d=O[s++],E.materialIndex=d),a=c.faces.length,y)for(i=0;i<D;i++)for(C=t.uvs[i],c.faceVertexUvs[i][a]=[],o=0;o<3;o++)p=O[s++],R=C[2*p],I=C[2*p+1],P=new n(R,I),c.faceVertexUvs[i][a].push(P);if(x&&(f=3*O[s++],E.normal.set(N[f++],N[f++],N[f])),_)for(i=0;i<3;i++)f=3*O[s++],L=new u(N[f++],N[f++],N[f]),E.vertexNormals.push(L);if(w&&(h=O[s++],E.color.setHex(F[h])),b)for(i=0;i<3;i++)h=O[s++],E.vertexColors.push(new X(F[h]));c.faces.push(E)}}function i(){var e=void 0!==t.influencesPerVertex?t.influencesPerVertex:2;if(t.skinWeights)for(var n=0,r=t.skinWeights.length;n<r;n+=e){var i=t.skinWeights[n],a=e>1?t.skinWeights[n+1]:0,s=e>2?t.skinWeights[n+2]:0,u=e>3?t.skinWeights[n+3]:0;c.skinWeights.push(new o(i,a,s,u))}if(t.skinIndices)for(var n=0,r=t.skinIndices.length;n<r;n+=e){var l=t.skinIndices[n],h=e>1?t.skinIndices[n+1]:0,f=e>2?t.skinIndices[n+2]:0,p=e>3?t.skinIndices[n+3]:0;c.skinIndices.push(new o(l,h,f,p))}c.bones=t.bones,c.bones&&c.bones.length>0&&(c.skinWeights.length!==c.skinIndices.length||c.skinIndices.length!==c.vertices.length)&&console.warn("When skinning, number of vertices ("+c.vertices.length+"), skinIndices ("+c.skinIndices.length+"), and skinWeights ("+c.skinWeights.length+") should match.")}function a(e){if(void 0!==t.morphTargets)for(var n=0,r=t.morphTargets.length;n<r;n++){c.morphTargets[n]={},c.morphTargets[n].name=t.morphTargets[n].name,c.morphTargets[n].vertices=[];for(var i=c.morphTargets[n].vertices,o=t.morphTargets[n].vertices,a=0,s=o.length;a<s;a+=3){var l=new u;l.x=o[a]*e,l.y=o[a+1]*e,l.z=o[a+2]*e,i.push(l)}}if(void 0!==t.morphColors&&t.morphColors.length>0){console.warn('THREE.JSONLoader: "morphColors" no longer supported. Using them as face colors.');for(var h=c.faces,f=t.morphColors[0].colors,n=0,r=h.length;n<r;n++)h[n].color.fromArray(f,3*n)}}function s(){var e=[],n=[];void 0!==t.animation&&n.push(t.animation),void 0!==t.animations&&(t.animations.length?n=n.concat(t.animations):n.push(t.animations));for(var r=0;r<n.length;r++){var i=Wn.parseAnimation(n[r],c.bones);i&&e.push(i)}if(c.morphTargets){var o=Wn.CreateClipsFromMorphTargetSequences(c.morphTargets,10);e=e.concat(o)}e.length>0&&(c.animations=e)}var c=new Tt,l=void 0!==t.scale?1/t.scale:1;if(r(l),i(),a(l),s(),c.computeFaceNormals(),c.computeBoundingSphere(),void 0===t.materials||0===t.materials.length)return{geometry:c};var h=Yn.prototype.initMaterials(t.materials,e,this.crossOrigin);return{geometry:c,materials:h}}}),Object.assign(Jn.prototype,{load:function(t,e,n,r){""===this.texturePath&&(this.texturePath=t.substring(0,t.lastIndexOf("/")+1));var i=this,o=new gn(i.manager);o.load(t,function(t){i.parse(JSON.parse(t),e)},n,r)},setTexturePath:function(t){this.texturePath=t},setCrossOrigin:function(t){this.crossOrigin=t},parse:function(t,e){var n=this.parseGeometries(t.geometries),r=this.parseImages(t.images,function(){void 0!==e&&e(a)}),i=this.parseTextures(t.textures,r),o=this.parseMaterials(t.materials,i),a=this.parseObject(t.object,n,o);return t.animations&&(a.animations=this.parseAnimations(t.animations)),void 0!==t.images&&0!==t.images.length||void 0!==e&&e(a),a},parseGeometries:function(t){var e={};if(void 0!==t)for(var n=new Zn,r=new qn,i=0,o=t.length;i<o;i++){var a,s=t[i];switch(s.type){case"PlaneGeometry":case"PlaneBufferGeometry":a=new kc[s.type](s.width,s.height,s.widthSegments,s.heightSegments);break;case"BoxGeometry":case"BoxBufferGeometry":case"CubeGeometry":a=new kc[s.type](s.width,s.height,s.depth,s.widthSegments,s.heightSegments,s.depthSegments);break;case"CircleGeometry":case"CircleBufferGeometry":a=new kc[s.type](s.radius,s.segments,s.thetaStart,s.thetaLength);break;case"CylinderGeometry":case"CylinderBufferGeometry":a=new kc[s.type](s.radiusTop,s.radiusBottom,s.height,s.radialSegments,s.heightSegments,s.openEnded,s.thetaStart,s.thetaLength);break;case"ConeGeometry":case"ConeBufferGeometry":a=new kc[s.type](s.radius,s.height,s.radialSegments,s.heightSegments,s.openEnded,s.thetaStart,s.thetaLength);break;case"SphereGeometry":case"SphereBufferGeometry":a=new kc[s.type](s.radius,s.widthSegments,s.heightSegments,s.phiStart,s.phiLength,s.thetaStart,s.thetaLength);break;case"DodecahedronGeometry":case"IcosahedronGeometry":case"OctahedronGeometry":case"TetrahedronGeometry":a=new kc[s.type](s.radius,s.detail);break;case"RingGeometry":case"RingBufferGeometry":a=new kc[s.type](s.innerRadius,s.outerRadius,s.thetaSegments,s.phiSegments,s.thetaStart,s.thetaLength);break;case"TorusGeometry":case"TorusBufferGeometry":a=new kc[s.type](s.radius,s.tube,s.radialSegments,s.tubularSegments,s.arc);break;case"TorusKnotGeometry":case"TorusKnotBufferGeometry":a=new kc[s.type](s.radius,s.tube,s.tubularSegments,s.radialSegments,s.p,s.q);break;case"LatheGeometry":case"LatheBufferGeometry":a=new kc[s.type](s.points,s.segments,s.phiStart,s.phiLength);break;case"BufferGeometry":a=r.parse(s);break;case"Geometry":a=n.parse(s.data,this.texturePath).geometry;break;default:console.warn('THREE.ObjectLoader: Unsupported geometry type "'+s.type+'"');continue}a.uuid=s.uuid,void 0!==s.name&&(a.name=s.name),e[s.uuid]=a}return e},parseMaterials:function(t,e){var n={};if(void 0!==t){var r=new Xn;r.setTextures(e);for(var i=0,o=t.length;i<o;i++){var a=r.parse(t[i]);n[a.uuid]=a}}return n},parseAnimations:function(t){for(var e=[],n=0;n<t.length;n++){var r=Wn.parse(t[n]);e.push(r)}return e},parseImages:function(t,e){function n(t){return r.manager.itemStart(t),a.load(t,function(){r.manager.itemEnd(t)},void 0,function(){r.manager.itemError(t)})}var r=this,i={};if(void 0!==t&&t.length>0){var o=new vn(e),a=new _n(o);a.setCrossOrigin(this.crossOrigin);for(var s=0,c=t.length;s<c;s++){var u=t[s],l=/^(\/\/)|([a-z]+:(\/\/)?)/i.test(u.url)?u.url:r.texturePath+u.url;i[u.uuid]=n(l)}}return i},parseTextures:function(t,e){function n(t,e){return"number"==typeof t?t:(console.warn("THREE.ObjectLoader.parseTexture: Constant should be in numeric form.",t),e[t])}var i={};if(void 0!==t)for(var o=0,a=t.length;o<a;o++){var s=t[o];void 0===s.image&&console.warn('THREE.ObjectLoader: No "image" specified for',s.uuid),void 0===e[s.image]&&console.warn("THREE.ObjectLoader: Undefined image",s.image);var c=new r(e[s.image]);c.needsUpdate=!0,c.uuid=s.uuid,void 0!==s.name&&(c.name=s.name),void 0!==s.mapping&&(c.mapping=n(s.mapping,wo)),void 0!==s.offset&&c.offset.fromArray(s.offset),void 0!==s.repeat&&c.repeat.fromArray(s.repeat),void 0!==s.wrap&&(c.wrapS=n(s.wrap[0],So),c.wrapT=n(s.wrap[1],So)),void 0!==s.minFilter&&(c.minFilter=n(s.minFilter,Io)),void 0!==s.magFilter&&(c.magFilter=n(s.magFilter,Io)),void 0!==s.anisotropy&&(c.anisotropy=s.anisotropy),void 0!==s.flipY&&(c.flipY=s.flipY),i[s.uuid]=c}return i},parseObject:function(){var t=new l;return function(e,n,r){function i(t){return void 0===n[t]&&console.warn("THREE.ObjectLoader: Undefined geometry",t),n[t]}function o(t){if(void 0!==t)return void 0===r[t]&&console.warn("THREE.ObjectLoader: Undefined material",t),r[t]}var a;switch(e.type){case"Scene":a=new he,void 0!==e.background&&Number.isInteger(e.background)&&(a.background=new X(e.background)),void 0!==e.fog&&("Fog"===e.fog.type?a.fog=new le(e.fog.color,e.fog.near,e.fog.far):"FogExp2"===e.fog.type&&(a.fog=new ue(e.fog.color,e.fog.density)));break;case"PerspectiveCamera":a=new Ut(e.fov,e.aspect,e.near,e.far),void 0!==e.focus&&(a.focus=e.focus),void 0!==e.zoom&&(a.zoom=e.zoom),void 0!==e.filmGauge&&(a.filmGauge=e.filmGauge),void 0!==e.filmOffset&&(a.filmOffset=e.filmOffset),void 0!==e.view&&(a.view=Object.assign({},e.view));break;case"OrthographicCamera":a=new Nt(e.left,e.right,e.top,e.bottom,e.near,e.far);break;case"AmbientLight":a=new Rn(e.color,e.intensity);break;case"DirectionalLight":a=new Pn(e.color,e.intensity);break;case"PointLight":a=new Ln(e.color,e.intensity,e.distance,e.decay);break;case"SpotLight":a=new An(e.color,e.intensity,e.distance,e.angle,e.penumbra,e.decay);break;case"HemisphereLight":a=new En(e.color,e.groundColor,e.intensity);break;case"Mesh":var s=i(e.geometry),c=o(e.material);a=s.bones&&s.bones.length>0?new xe(s,c):new Pt(s,c);break;case"LOD":a=new me;break;case"Line":a=new we(i(e.geometry),o(e.material),e.mode);break;case"LineSegments":a=new be(i(e.geometry),o(e.material));break;case"PointCloud":case"Points":a=new Ee(i(e.geometry),o(e.material));break;case"Sprite":a=new de(o(e.material));break;case"Group":a=new Se;break;default:a=new ut}if(a.uuid=e.uuid,void 0!==e.name&&(a.name=e.name),void 0!==e.matrix?(t.fromArray(e.matrix),t.decompose(a.position,a.quaternion,a.scale)):(void 0!==e.position&&a.position.fromArray(e.position),void 0!==e.rotation&&a.rotation.fromArray(e.rotation),void 0!==e.quaternion&&a.quaternion.fromArray(e.quaternion),void 0!==e.scale&&a.scale.fromArray(e.scale)),void 0!==e.castShadow&&(a.castShadow=e.castShadow),void 0!==e.receiveShadow&&(a.receiveShadow=e.receiveShadow),e.shadow&&(void 0!==e.shadow.bias&&(a.shadow.bias=e.shadow.bias),void 0!==e.shadow.radius&&(a.shadow.radius=e.shadow.radius),void 0!==e.shadow.mapSize&&a.shadow.mapSize.fromArray(e.shadow.mapSize),void 0!==e.shadow.camera&&(a.shadow.camera=this.parseObject(e.shadow.camera))),void 0!==e.visible&&(a.visible=e.visible),void 0!==e.userData&&(a.userData=e.userData),void 0!==e.children)for(var u in e.children)a.add(this.parseObject(e.children[u],n,r));if("LOD"===e.type)for(var l=e.levels,h=0;h<l.length;h++){var f=l[h],u=a.getObjectByProperty("uuid",f.object);void 0!==u&&a.addLevel(u,f.distance)}return a}}()}),$n.prototype={constructor:$n,getPoint:function(t){return console.warn("THREE.Curve: Warning, getPoint() not implemented!"),null},getPointAt:function(t){var e=this.getUtoTmapping(t);return this.getPoint(e)},getPoints:function(t){t||(t=5);for(var e=[],n=0;n<=t;n++)e.push(this.getPoint(n/t));return e},getSpacedPoints:function(t){t||(t=5);for(var e=[],n=0;n<=t;n++)e.push(this.getPointAt(n/t));return e},getLength:function(){var t=this.getLengths();return t[t.length-1]},getLengths:function(t){if(t||(t=this.__arcLengthDivisions?this.__arcLengthDivisions:200),this.cacheArcLengths&&this.cacheArcLengths.length===t+1&&!this.needsUpdate)return this.cacheArcLengths;this.needsUpdate=!1;var e,n,r=[],i=this.getPoint(0),o=0;for(r.push(0),n=1;n<=t;n++)e=this.getPoint(n/t),o+=e.distanceTo(i),r.push(o),i=e;return this.cacheArcLengths=r,r},updateArcLengths:function(){this.needsUpdate=!0,this.getLengths()},getUtoTmapping:function(t,e){var n,r=this.getLengths(),i=0,o=r.length;n=e?e:t*r[o-1];for(var a,s=0,c=o-1;s<=c;)if(i=Math.floor(s+(c-s)/2),a=r[i]-n,a<0)s=i+1;else{if(!(a>0)){c=i;break}c=i-1}if(i=c,r[i]===n){var u=i/(o-1);return u}var l=r[i],h=r[i+1],f=h-l,p=(n-l)/f,u=(i+p)/(o-1);return u},getTangent:function(t){var e=1e-4,n=t-e,r=t+e;n<0&&(n=0),r>1&&(r=1);var i=this.getPoint(n),o=this.getPoint(r),a=o.clone().sub(i);return a.normalize()},getTangentAt:function(t){var e=this.getUtoTmapping(t);return this.getTangent(e)}},$n.create=function(t,e){return t.prototype=Object.create($n.prototype),t.prototype.constructor=t,t.prototype.getPoint=e,t},Kn.prototype=Object.create($n.prototype),Kn.prototype.constructor=Kn,Kn.prototype.isLineCurve=!0,Kn.prototype.getPoint=function(t){if(1===t)return this.v2.clone();var e=this.v2.clone().sub(this.v1);return e.multiplyScalar(t).add(this.v1),e},Kn.prototype.getPointAt=function(t){return this.getPoint(t)},Kn.prototype.getTangent=function(t){var e=this.v2.clone().sub(this.v1);return e.normalize()},Qn.prototype=Object.assign(Object.create($n.prototype),{constructor:Qn,add:function(t){this.curves.push(t)},closePath:function(){var t=this.curves[0].getPoint(0),e=this.curves[this.curves.length-1].getPoint(1);t.equals(e)||this.curves.push(new Kn(e,t))},getPoint:function(t){for(var e=t*this.getLength(),n=this.getCurveLengths(),r=0;r<n.length;){if(n[r]>=e){var i=n[r]-e,o=this.curves[r],a=o.getLength(),s=0===a?0:1-i/a;return o.getPointAt(s)}r++}return null},getLength:function(){var t=this.getCurveLengths();return t[t.length-1]},updateArcLengths:function(){this.needsUpdate=!0,this.cacheLengths=null,this.getLengths()},getCurveLengths:function(){if(this.cacheLengths&&this.cacheLengths.length===this.curves.length)return this.cacheLengths;for(var t=[],e=0,n=0,r=this.curves.length;n<r;n++)e+=this.curves[n].getLength(),t.push(e);return this.cacheLengths=t,t},getSpacedPoints:function(t){t||(t=40);for(var e=[],n=0;n<=t;n++)e.push(this.getPoint(n/t));return this.autoClose&&e.push(e[0]),e},getPoints:function(t){t=t||12;for(var e,n=[],r=0,i=this.curves;r<i.length;r++)for(var o=i[r],a=o&&o.isEllipseCurve?2*t:o&&o.isLineCurve?1:o&&o.isSplineCurve?t*o.points.length:t,s=o.getPoints(a),c=0;c<s.length;c++){var u=s[c];e&&e.equals(u)||(n.push(u),e=u)}return this.autoClose&&n.length>1&&!n[n.length-1].equals(n[0])&&n.push(n[0]),n},createPointsGeometry:function(t){var e=this.getPoints(t);return this.createGeometry(e)},createSpacedPointsGeometry:function(t){var e=this.getSpacedPoints(t);return this.createGeometry(e)},createGeometry:function(t){for(var e=new Tt,n=0,r=t.length;n<r;n++){var i=t[n];e.vertices.push(new u(i.x,i.y,i.z||0))}return e}}),tr.prototype=Object.create($n.prototype),tr.prototype.constructor=tr,tr.prototype.isEllipseCurve=!0,tr.prototype.getPoint=function(t){for(var e=2*Math.PI,r=this.aEndAngle-this.aStartAngle,i=Math.abs(r)<Number.EPSILON;r<0;)r+=e;for(;r>e;)r-=e;r<Number.EPSILON&&(r=i?0:e),this.aClockwise!==!0||i||(r===e?r=-e:r-=e);var o=this.aStartAngle+t*r,a=this.aX+this.xRadius*Math.cos(o),s=this.aY+this.yRadius*Math.sin(o);if(0!==this.aRotation){var c=Math.cos(this.aRotation),u=Math.sin(this.aRotation),l=a-this.aX,h=s-this.aY;a=l*c-h*u+this.aX,s=l*u+h*c+this.aY}return new n(a,s)},t.CurveUtils={tangentQuadraticBezier:function(t,e,n,r){return 2*(1-t)*(n-e)+2*t*(r-n)},tangentCubicBezier:function(t,e,n,r,i){return-3*e*(1-t)*(1-t)+3*n*(1-t)*(1-t)-6*t*n*(1-t)+6*t*r*(1-t)-3*t*t*r+3*t*t*i},tangentSpline:function(t,e,n,r,i){var o=6*t*t-6*t,a=3*t*t-4*t+1,s=-6*t*t+6*t,c=3*t*t-2*t;return o+a+s+c},interpolate:function(t,e,n,r,i){var o=.5*(n-t),a=.5*(r-e),s=i*i,c=i*s;return(2*e-2*n+o+a)*c+(-3*e+3*n-2*o-a)*s+o*i+e}},er.prototype=Object.create($n.prototype),er.prototype.constructor=er,er.prototype.isSplineCurve=!0,er.prototype.getPoint=function(e){var r=this.points,i=(r.length-1)*e,o=Math.floor(i),a=i-o,s=r[0===o?o:o-1],c=r[o],u=r[o>r.length-2?r.length-1:o+1],l=r[o>r.length-3?r.length-1:o+2],h=t.CurveUtils.interpolate;return new n(h(s.x,c.x,u.x,l.x,a),h(s.y,c.y,u.y,l.y,a))},nr.prototype=Object.create($n.prototype),nr.prototype.constructor=nr,nr.prototype.getPoint=function(e){var r=t.ShapeUtils.b3;return new n(r(e,this.v0.x,this.v1.x,this.v2.x,this.v3.x),r(e,this.v0.y,this.v1.y,this.v2.y,this.v3.y))},nr.prototype.getTangent=function(e){var r=t.CurveUtils.tangentCubicBezier;return new n(r(e,this.v0.x,this.v1.x,this.v2.x,this.v3.x),r(e,this.v0.y,this.v1.y,this.v2.y,this.v3.y)).normalize()},rr.prototype=Object.create($n.prototype),rr.prototype.constructor=rr,rr.prototype.getPoint=function(e){var r=t.ShapeUtils.b2;return new n(r(e,this.v0.x,this.v1.x,this.v2.x),r(e,this.v0.y,this.v1.y,this.v2.y))},rr.prototype.getTangent=function(e){var r=t.CurveUtils.tangentQuadraticBezier;return new n(r(e,this.v0.x,this.v1.x,this.v2.x),r(e,this.v0.y,this.v1.y,this.v2.y)).normalize()};var Hc=Object.assign(Object.create(Qn.prototype),{fromPoints:function(t){this.moveTo(t[0].x,t[0].y);for(var e=1,n=t.length;e<n;e++)this.lineTo(t[e].x,t[e].y)},moveTo:function(t,e){this.currentPoint.set(t,e)},lineTo:function(t,e){var r=new Kn(this.currentPoint.clone(),new n(t,e));this.curves.push(r),this.currentPoint.set(t,e)},quadraticCurveTo:function(t,e,r,i){var o=new rr(this.currentPoint.clone(),new n(t,e),new n(r,i));this.curves.push(o),this.currentPoint.set(r,i)},bezierCurveTo:function(t,e,r,i,o,a){var s=new nr(this.currentPoint.clone(),new n(t,e),new n(r,i),new n(o,a));this.curves.push(s),this.currentPoint.set(o,a)},splineThru:function(t){var e=[this.currentPoint.clone()].concat(t),n=new er(e);this.curves.push(n),this.currentPoint.copy(t[t.length-1])},arc:function(t,e,n,r,i,o){var a=this.currentPoint.x,s=this.currentPoint.y;this.absarc(t+a,e+s,n,r,i,o)},absarc:function(t,e,n,r,i,o){this.absellipse(t,e,n,n,r,i,o)},ellipse:function(t,e,n,r,i,o,a,s){var c=this.currentPoint.x,u=this.currentPoint.y;this.absellipse(t+c,e+u,n,r,i,o,a,s)},absellipse:function(t,e,n,r,i,o,a,s){var c=new tr(t,e,n,r,i,o,a,s);if(this.curves.length>0){var u=c.getPoint(0);u.equals(this.currentPoint)||this.lineTo(u.x,u.y)}this.curves.push(c);var l=c.getPoint(1);this.currentPoint.copy(l)}});ir.prototype=Object.assign(Object.create(Hc),{constructor:ir,getPointsHoles:function(t){for(var e=[],n=0,r=this.holes.length;n<r;n++)e[n]=this.holes[n].getPoints(t);return e},extractAllPoints:function(t){return{shape:this.getPoints(t),holes:this.getPointsHoles(t)}},extractPoints:function(t){return this.extractAllPoints(t)}}),or.prototype=Hc,Hc.constructor=or,ar.prototype={moveTo:function(t,e){this.currentPath=new or,this.subPaths.push(this.currentPath),this.currentPath.moveTo(t,e)},lineTo:function(t,e){this.currentPath.lineTo(t,e)},quadraticCurveTo:function(t,e,n,r){this.currentPath.quadraticCurveTo(t,e,n,r)},bezierCurveTo:function(t,e,n,r,i,o){this.currentPath.bezierCurveTo(t,e,n,r,i,o)},splineThru:function(t){this.currentPath.splineThru(t)},toShapes:function(e,n){function r(t){for(var e=[],n=0,r=t.length;n<r;n++){var i=t[n],o=new ir;o.curves=i.curves,e.push(o)}return e}function i(t,e){for(var n=e.length,r=!1,i=n-1,o=0;o<n;i=o++){var a=e[i],s=e[o],c=s.x-a.x,u=s.y-a.y;if(Math.abs(u)>Number.EPSILON){if(u<0&&(a=e[o],c=-c,s=e[i],u=-u),t.y<a.y||t.y>s.y)continue;if(t.y===a.y){if(t.x===a.x)return!0}else{var l=u*(t.x-a.x)-c*(t.y-a.y);if(0===l)return!0;if(l<0)continue;r=!r}}else{if(t.y!==a.y)continue;if(s.x<=t.x&&t.x<=a.x||a.x<=t.x&&t.x<=s.x)return!0}}return r}var o=t.ShapeUtils.isClockWise,a=this.subPaths;if(0===a.length)return[];if(n===!0)return r(a);var s,c,u,l=[];if(1===a.length)return c=a[0],u=new ir,u.curves=c.curves,l.push(u),l;var h=!o(a[0].getPoints());h=e?!h:h;var f,p=[],d=[],m=[],v=0;d[v]=void 0,m[v]=[];for(var g=0,y=a.length;g<y;g++)c=a[g],f=c.getPoints(),s=o(f),s=e?!s:s,s?(!h&&d[v]&&v++,d[v]={s:new ir,p:f},d[v].s.curves=c.curves,h&&v++,m[v]=[]):m[v].push({h:c,p:f[0]});if(!d[0])return r(a);if(d.length>1){for(var x=!1,_=[],w=0,b=d.length;w<b;w++)p[w]=[];for(var w=0,b=d.length;w<b;w++)for(var M=m[w],E=0;E<M.length;E++){for(var S=M[E],T=!0,A=0;A<d.length;A++)i(S.p,d[A].p)&&(w!==A&&_.push({froms:w,tos:A,hole:E}),T?(T=!1,p[A].push(S)):x=!0);T&&p[w].push(S)}_.length>0&&(x||(m=p))}for(var L,g=0,C=d.length;g<C;g++){u=d[g].s,l.push(u),L=m[g];for(var P=0,R=L.length;P<R;P++)u.holes.push(L[P].h)}return l}},Object.assign(sr.prototype,{isFont:!0,generateShapes:function(e,n,r){function i(t){for(var e=String(t).split(""),r=n/a.resolution,i=0,s=[],c=0;c<e.length;c++){var u=o(e[c],r,i);i+=u.offset,s.push(u.path)}return s}function o(e,n,i){var o=a.glyphs[e]||a.glyphs["?"];if(o){var s,c,u,l,h,f,p,d,m,v,g,y=new ar,x=[],_=t.ShapeUtils.b2,w=t.ShapeUtils.b3;if(o.o)for(var b=o._cachedOutline||(o._cachedOutline=o.o.split(" ")),M=0,E=b.length;M<E;){var S=b[M++];switch(S){case"m":s=b[M++]*n+i,c=b[M++]*n,y.moveTo(s,c);break;case"l":s=b[M++]*n+i,c=b[M++]*n,y.lineTo(s,c);break;case"q":if(u=b[M++]*n+i,l=b[M++]*n,p=b[M++]*n+i,d=b[M++]*n,y.quadraticCurveTo(p,d,u,l),g=x[x.length-1]){h=g.x,f=g.y;for(var T=1;T<=r;T++){var A=T/r;_(A,h,p,u),_(A,f,d,l)}}break;case"b":if(u=b[M++]*n+i,l=b[M++]*n,p=b[M++]*n+i,d=b[M++]*n,m=b[M++]*n+i,v=b[M++]*n,y.bezierCurveTo(p,d,m,v,u,l),g=x[x.length-1]){h=g.x,f=g.y;for(var T=1;T<=r;T++){var A=T/r;w(A,h,p,m,u),w(A,f,d,v,l)}}}}return{offset:o.ha*n,path:y}}}void 0===n&&(n=100),void 0===r&&(r=4);for(var a=this.data,s=i(e),c=[],u=0,l=s.length;u<l;u++)Array.prototype.push.apply(c,s[u].toShapes());return c}}),Object.assign(cr.prototype,{load:function(t,e,n,r){var i=this,o=new gn(this.manager);o.load(t,function(t){var n;try{n=JSON.parse(t)}catch(r){console.warn("THREE.FontLoader: typeface.js support is being deprecated. Use typeface.json instead."),
  n=JSON.parse(t.substring(65,t.length-2))}var o=i.parse(n);e&&e(o)},n,r)},parse:function(t){return new sr(t)}});var Wc;Object.assign(lr.prototype,{load:function(t,e,n,r){var i=new gn(this.manager);i.setResponseType("arraybuffer"),i.load(t,function(t){var n=ur();n.decodeAudioData(t,function(t){e(t)})},n,r)}}),Object.assign(hr.prototype,{update:function(){var e,n,r,i,o,a,s,c=new l,u=new l;return function(l){var h=e!==this||n!==l.focus||r!==l.fov||i!==l.aspect*this.aspect||o!==l.near||a!==l.far||s!==l.zoom;if(h){e=this,n=l.focus,r=l.fov,i=l.aspect*this.aspect,o=l.near,a=l.far,s=l.zoom;var f,p,d=l.projectionMatrix.clone(),m=this.eyeSep/2,v=m*o/n,g=o*Math.tan(t.Math.DEG2RAD*r*.5)/s;u.elements[12]=-m,c.elements[12]=m,f=-g*i+v,p=g*i+v,d.elements[0]=2*o/(p-f),d.elements[8]=(p+f)/(p-f),this.cameraL.projectionMatrix.copy(d),f=-g*i-v,p=g*i-v,d.elements[0]=2*o/(p-f),d.elements[8]=(p+f)/(p-f),this.cameraR.projectionMatrix.copy(d)}this.cameraL.matrixWorld.copy(l.matrixWorld).multiply(u),this.cameraR.matrixWorld.copy(l.matrixWorld).multiply(c)}}()}),fr.prototype=Object.create(ut.prototype),fr.prototype.constructor=fr,pr.prototype=Object.assign(Object.create(ut.prototype),{constructor:pr,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(t){null!==this.filter?(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination)):this.gain.disconnect(this.context.destination),this.filter=t,this.gain.connect(this.filter),this.filter.connect(this.context.destination)},getMasterVolume:function(){return this.gain.gain.value},setMasterVolume:function(t){this.gain.gain.value=t},updateMatrixWorld:function(){var t=new u,e=new c,n=new u,r=new u;return function(i){ut.prototype.updateMatrixWorld.call(this,i);var o=this.context.listener,a=this.up;this.matrixWorld.decompose(t,e,n),r.set(0,0,-1).applyQuaternion(e),o.setPosition(t.x,t.y,t.z),o.setOrientation(r.x,r.y,r.z,a.x,a.y,a.z)}}()}),dr.prototype=Object.assign(Object.create(ut.prototype),{constructor:dr,getOutput:function(){return this.gain},setNodeSource:function(t){return this.hasPlaybackControl=!1,this.sourceType="audioNode",this.source=t,this.connect(),this},setBuffer:function(t){return this.source.buffer=t,this.sourceType="buffer",this.autoplay&&this.play(),this},play:function(){if(this.isPlaying===!0)return void console.warn("THREE.Audio: Audio is already playing.");if(this.hasPlaybackControl===!1)return void console.warn("THREE.Audio: this Audio has no playback control.");var t=this.context.createBufferSource();return t.buffer=this.source.buffer,t.loop=this.source.loop,t.onended=this.source.onended,t.start(0,this.startTime),t.playbackRate.value=this.playbackRate,this.isPlaying=!0,this.source=t,this.connect()},pause:function(){return this.hasPlaybackControl===!1?void console.warn("THREE.Audio: this Audio has no playback control."):(this.source.stop(),this.startTime=this.context.currentTime,this.isPlaying=!1,this)},stop:function(){return this.hasPlaybackControl===!1?void console.warn("THREE.Audio: this Audio has no playback control."):(this.source.stop(),this.startTime=0,this.isPlaying=!1,this)},connect:function(){if(this.filters.length>0){this.source.connect(this.filters[0]);for(var t=1,e=this.filters.length;t<e;t++)this.filters[t-1].connect(this.filters[t]);this.filters[this.filters.length-1].connect(this.getOutput())}else this.source.connect(this.getOutput());return this},disconnect:function(){if(this.filters.length>0){this.source.disconnect(this.filters[0]);for(var t=1,e=this.filters.length;t<e;t++)this.filters[t-1].disconnect(this.filters[t]);this.filters[this.filters.length-1].disconnect(this.getOutput())}else this.source.disconnect(this.getOutput());return this},getFilters:function(){return this.filters},setFilters:function(t){return t||(t=[]),this.isPlaying===!0?(this.disconnect(),this.filters=t,this.connect()):this.filters=t,this},getFilter:function(){return this.getFilters()[0]},setFilter:function(t){return this.setFilters(t?[t]:[])},setPlaybackRate:function(t){return this.hasPlaybackControl===!1?void console.warn("THREE.Audio: this Audio has no playback control."):(this.playbackRate=t,this.isPlaying===!0&&(this.source.playbackRate.value=this.playbackRate),this)},getPlaybackRate:function(){return this.playbackRate},onEnded:function(){this.isPlaying=!1},getLoop:function(){return this.hasPlaybackControl===!1?(console.warn("THREE.Audio: this Audio has no playback control."),!1):this.source.loop},setLoop:function(t){return this.hasPlaybackControl===!1?void console.warn("THREE.Audio: this Audio has no playback control."):void(this.source.loop=t)},getVolume:function(){return this.gain.gain.value},setVolume:function(t){return this.gain.gain.value=t,this}}),mr.prototype=Object.assign(Object.create(dr.prototype),{constructor:mr,getOutput:function(){return this.panner},getRefDistance:function(){return this.panner.refDistance},setRefDistance:function(t){this.panner.refDistance=t},getRolloffFactor:function(){return this.panner.rolloffFactor},setRolloffFactor:function(t){this.panner.rolloffFactor=t},getDistanceModel:function(){return this.panner.distanceModel},setDistanceModel:function(t){this.panner.distanceModel=t},getMaxDistance:function(){return this.panner.maxDistance},setMaxDistance:function(t){this.panner.maxDistance=t},updateMatrixWorld:function(){var t=new u;return function(e){ut.prototype.updateMatrixWorld.call(this,e),t.setFromMatrixPosition(this.matrixWorld),this.panner.setPosition(t.x,t.y,t.z)}}()}),Object.assign(vr.prototype,{getFrequencyData:function(){return this.analyser.getByteFrequencyData(this.data),this.data},getAverageFrequency:function(){for(var t=0,e=this.getFrequencyData(),n=0;n<e.length;n++)t+=e[n];return t/e.length}}),gr.prototype={constructor:gr,accumulate:function(t,e){var n=this.buffer,r=this.valueSize,i=t*r+r,o=this.cumulativeWeight;if(0===o){for(var a=0;a!==r;++a)n[i+a]=n[a];o=e}else{o+=e;var s=e/o;this._mixBufferRegion(n,i,0,s,r)}this.cumulativeWeight=o},apply:function(t){var e=this.valueSize,n=this.buffer,r=t*e+e,i=this.cumulativeWeight,o=this.binding;if(this.cumulativeWeight=0,i<1){var a=3*e;this._mixBufferRegion(n,r,a,1-i,e)}for(var s=e,c=e+e;s!==c;++s)if(n[s]!==n[s+e]){o.setValue(n,r);break}},saveOriginalState:function(){var t=this.binding,e=this.buffer,n=this.valueSize,r=3*n;t.getValue(e,r);for(var i=n,o=r;i!==o;++i)e[i]=e[r+i%n];this.cumulativeWeight=0},restoreOriginalState:function(){var t=3*this.valueSize;this.binding.setValue(this.buffer,t)},_select:function(t,e,n,r,i){if(r>=.5)for(var o=0;o!==i;++o)t[e+o]=t[n+o]},_slerp:function(t,e,n,r,i){c.slerpFlat(t,e,t,e,t,n,r)},_lerp:function(t,e,n,r,i){for(var o=1-r,a=0;a!==i;++a){var s=e+a;t[s]=t[s]*o+t[n+a]*r}}},yr.prototype={constructor:yr,getValue:function(t,e){this.bind(),this.getValue(t,e)},setValue:function(t,e){this.bind(),this.setValue(t,e)},bind:function(){var t=this.node,e=this.parsedPath,n=e.objectName,r=e.propertyName,i=e.propertyIndex;if(t||(t=yr.findNode(this.rootNode,e.nodeName)||this.rootNode,this.node=t),this.getValue=this._getValue_unavailable,this.setValue=this._setValue_unavailable,!t)return void console.error("  trying to update node for track: "+this.path+" but it wasn't found.");if(n){var o=e.objectIndex;switch(n){case"materials":if(!t.material)return void console.error("  can not bind to material as node does not have a material",this);if(!t.material.materials)return void console.error("  can not bind to material.materials as node.material does not have a materials array",this);t=t.material.materials;break;case"bones":if(!t.skeleton)return void console.error("  can not bind to bones as node does not have a skeleton",this);t=t.skeleton.bones;for(var a=0;a<t.length;a++)if(t[a].name===o){o=a;break}break;default:if(void 0===t[n])return void console.error("  can not bind to objectName of node, undefined",this);t=t[n]}if(void 0!==o){if(void 0===t[o])return void console.error("  trying to bind to objectIndex of objectName, but is undefined:",this,t);t=t[o]}}var s=t[r];if(void 0===s){var c=e.nodeName;return void console.error("  trying to update property for track: "+c+"."+r+" but it wasn't found.",t)}var u=this.Versioning.None;void 0!==t.needsUpdate?(u=this.Versioning.NeedsUpdate,this.targetObject=t):void 0!==t.matrixWorldNeedsUpdate&&(u=this.Versioning.MatrixWorldNeedsUpdate,this.targetObject=t);var l=this.BindingType.Direct;if(void 0!==i){if("morphTargetInfluences"===r){if(!t.geometry)return void console.error("  can not bind to morphTargetInfluences becasuse node does not have a geometry",this);if(!t.geometry.morphTargets)return void console.error("  can not bind to morphTargetInfluences becasuse node does not have a geometry.morphTargets",this);for(var a=0;a<this.node.geometry.morphTargets.length;a++)if(t.geometry.morphTargets[a].name===i){i=a;break}}l=this.BindingType.ArrayElement,this.resolvedProperty=s,this.propertyIndex=i}else void 0!==s.fromArray&&void 0!==s.toArray?(l=this.BindingType.HasFromToArray,this.resolvedProperty=s):void 0!==s.length?(l=this.BindingType.EntireArray,this.resolvedProperty=s):this.propertyName=r;this.getValue=this.GetterByBindingType[l],this.setValue=this.SetterByBindingTypeAndVersioning[l][u]},unbind:function(){this.node=null,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}},Object.assign(yr.prototype,{_getValue_unavailable:function(){},_setValue_unavailable:function(){},_getValue_unbound:yr.prototype.getValue,_setValue_unbound:yr.prototype.setValue,BindingType:{Direct:0,EntireArray:1,ArrayElement:2,HasFromToArray:3},Versioning:{None:0,NeedsUpdate:1,MatrixWorldNeedsUpdate:2},GetterByBindingType:[function(t,e){t[e]=this.node[this.propertyName]},function(t,e){for(var n=this.resolvedProperty,r=0,i=n.length;r!==i;++r)t[e++]=n[r]},function(t,e){t[e]=this.resolvedProperty[this.propertyIndex]},function(t,e){this.resolvedProperty.toArray(t,e)}],SetterByBindingTypeAndVersioning:[[function(t,e){this.node[this.propertyName]=t[e]},function(t,e){this.node[this.propertyName]=t[e],this.targetObject.needsUpdate=!0},function(t,e){this.node[this.propertyName]=t[e],this.targetObject.matrixWorldNeedsUpdate=!0}],[function(t,e){for(var n=this.resolvedProperty,r=0,i=n.length;r!==i;++r)n[r]=t[e++]},function(t,e){for(var n=this.resolvedProperty,r=0,i=n.length;r!==i;++r)n[r]=t[e++];this.targetObject.needsUpdate=!0},function(t,e){for(var n=this.resolvedProperty,r=0,i=n.length;r!==i;++r)n[r]=t[e++];this.targetObject.matrixWorldNeedsUpdate=!0}],[function(t,e){this.resolvedProperty[this.propertyIndex]=t[e]},function(t,e){this.resolvedProperty[this.propertyIndex]=t[e],this.targetObject.needsUpdate=!0},function(t,e){this.resolvedProperty[this.propertyIndex]=t[e],this.targetObject.matrixWorldNeedsUpdate=!0}],[function(t,e){this.resolvedProperty.fromArray(t,e)},function(t,e){this.resolvedProperty.fromArray(t,e),this.targetObject.needsUpdate=!0},function(t,e){this.resolvedProperty.fromArray(t,e),this.targetObject.matrixWorldNeedsUpdate=!0}]]}),yr.Composite=function(t,e,n){var r=n||yr.parseTrackName(e);this._targetGroup=t,this._bindings=t.subscribe_(e,r)},yr.Composite.prototype={constructor:yr.Composite,getValue:function(t,e){this.bind();var n=this._targetGroup.nCachedObjects_,r=this._bindings[n];void 0!==r&&r.getValue(t,e)},setValue:function(t,e){for(var n=this._bindings,r=this._targetGroup.nCachedObjects_,i=n.length;r!==i;++r)n[r].setValue(t,e)},bind:function(){for(var t=this._bindings,e=this._targetGroup.nCachedObjects_,n=t.length;e!==n;++e)t[e].bind()},unbind:function(){for(var t=this._bindings,e=this._targetGroup.nCachedObjects_,n=t.length;e!==n;++e)t[e].unbind()}},yr.create=function(t,e,n){return t&&t.isAnimationObjectGroup?new yr.Composite(t,e,n):new yr(t,e,n)},yr.parseTrackName=function(t){var e=/^((?:\w+[\/:])*)(\w+)?(?:\.(\w+)(?:\[(.+)\])?)?\.(\w+)(?:\[(.+)\])?$/,n=e.exec(t);if(!n)throw new Error("cannot parse trackName at all: "+t);var r={nodeName:n[2],objectName:n[3],objectIndex:n[4],propertyName:n[5],propertyIndex:n[6]};if(null===r.propertyName||0===r.propertyName.length)throw new Error("can not parse propertyName from trackName: "+t);return r},yr.findNode=function(t,e){if(!e||""===e||"root"===e||"."===e||e===-1||e===t.name||e===t.uuid)return t;if(t.skeleton){var n=function(t){for(var n=0;n<t.bones.length;n++){var r=t.bones[n];if(r.name===e)return r}return null},r=n(t.skeleton);if(r)return r}if(t.children){var i=function(t){for(var n=0;n<t.length;n++){var r=t[n];if(r.name===e||r.uuid===e)return r;var o=i(r.children);if(o)return o}return null},o=i(t.children);if(o)return o}return null},xr.prototype={constructor:xr,isAnimationObjectGroup:!0,add:function(t){for(var e=this._objects,n=e.length,r=this.nCachedObjects_,i=this._indicesByUUID,o=this._paths,a=this._parsedPaths,s=this._bindings,c=s.length,u=0,l=arguments.length;u!==l;++u){var h=arguments[u],f=h.uuid,p=i[f];if(void 0===p){p=n++,i[f]=p,e.push(h);for(var d=0,m=c;d!==m;++d)s[d].push(new yr(h,o[d],a[d]))}else if(p<r){var v=e[p],g=--r,y=e[g];i[y.uuid]=p,e[p]=y,i[f]=g,e[g]=h;for(var d=0,m=c;d!==m;++d){var x=s[d],_=x[g],w=x[p];x[p]=_,void 0===w&&(w=new yr(h,o[d],a[d])),x[g]=w}}else e[p]!==v&&console.error("Different objects with the same UUID detected. Clean the caches or recreate your infrastructure when reloading scenes...")}this.nCachedObjects_=r},remove:function(t){for(var e=this._objects,n=this.nCachedObjects_,r=this._indicesByUUID,i=this._bindings,o=i.length,a=0,s=arguments.length;a!==s;++a){var c=arguments[a],u=c.uuid,l=r[u];if(void 0!==l&&l>=n){var h=n++,f=e[h];r[f.uuid]=l,e[l]=f,r[u]=h,e[h]=c;for(var p=0,d=o;p!==d;++p){var m=i[p],v=m[h],g=m[l];m[l]=v,m[h]=g}}}this.nCachedObjects_=n},uncache:function(t){for(var e=this._objects,n=e.length,r=this.nCachedObjects_,i=this._indicesByUUID,o=this._bindings,a=o.length,s=0,c=arguments.length;s!==c;++s){var u=arguments[s],l=u.uuid,h=i[l];if(void 0!==h)if(delete i[l],h<r){var f=--r,p=e[f],d=--n,m=e[d];i[p.uuid]=h,e[h]=p,i[m.uuid]=f,e[f]=m,e.pop();for(var v=0,g=a;v!==g;++v){var y=o[v],x=y[f],_=y[d];y[h]=x,y[f]=_,y.pop()}}else{var d=--n,m=e[d];i[m.uuid]=h,e[h]=m,e.pop();for(var v=0,g=a;v!==g;++v){var y=o[v];y[h]=y[d],y.pop()}}}this.nCachedObjects_=r},subscribe_:function(t,e){var n=this._bindingsIndicesByPath,r=n[t],i=this._bindings;if(void 0!==r)return i[r];var o=this._paths,a=this._parsedPaths,s=this._objects,c=s.length,u=this.nCachedObjects_,l=new Array(c);r=i.length,n[t]=r,o.push(t),a.push(e),i.push(l);for(var h=u,f=s.length;h!==f;++h){var p=s[h];l[h]=new yr(p,t,e)}return l},unsubscribe_:function(t){var e=this._bindingsIndicesByPath,n=e[t];if(void 0!==n){var r=this._paths,i=this._parsedPaths,o=this._bindings,a=o.length-1,s=o[a],c=t[a];e[c]=n,o[n]=s,o.pop(),i[n]=i[a],i.pop(),r[n]=r[a],r.pop()}}},_r.prototype={constructor:_r,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(t){return this._startTime=t,this},setLoop:function(t,e){return this.loop=t,this.repetitions=e,this},setEffectiveWeight:function(t){return this.weight=t,this._effectiveWeight=this.enabled?t:0,this.stopFading()},getEffectiveWeight:function(){return this._effectiveWeight},fadeIn:function(t){return this._scheduleFading(t,0,1)},fadeOut:function(t){return this._scheduleFading(t,1,0)},crossFadeFrom:function(t,e,n){if(t.fadeOut(e),this.fadeIn(e),n){var r=this._clip.duration,i=t._clip.duration,o=i/r,a=r/i;t.warp(1,o,e),this.warp(a,1,e)}return this},crossFadeTo:function(t,e,n){return t.crossFadeFrom(this,e,n)},stopFading:function(){var t=this._weightInterpolant;return null!==t&&(this._weightInterpolant=null,this._mixer._takeBackControlInterpolant(t)),this},setEffectiveTimeScale:function(t){return this.timeScale=t,this._effectiveTimeScale=this.paused?0:t,this.stopWarping()},getEffectiveTimeScale:function(){return this._effectiveTimeScale},setDuration:function(t){return this.timeScale=this._clip.duration/t,this.stopWarping()},syncWith:function(t){return this.time=t.time,this.timeScale=t.timeScale,this.stopWarping()},halt:function(t){return this.warp(this._effectiveTimeScale,0,t)},warp:function(t,e,n){var r=this._mixer,i=r.time,o=this._timeScaleInterpolant,a=this.timeScale;null===o&&(o=r._lendControlInterpolant(),this._timeScaleInterpolant=o);var s=o.parameterPositions,c=o.sampleValues;return s[0]=i,s[1]=i+n,c[0]=t/a,c[1]=e/a,this},stopWarping:function(){var t=this._timeScaleInterpolant;return null!==t&&(this._timeScaleInterpolant=null,this._mixer._takeBackControlInterpolant(t)),this},getMixer:function(){return this._mixer},getClip:function(){return this._clip},getRoot:function(){return this._localRoot||this._mixer._root},_update:function(t,e,n,r){var i=this._startTime;if(null!==i){var o=(t-i)*n;if(o<0||0===n)return;this._startTime=null,e=n*o}e*=this._updateTimeScale(t);var a=this._updateTime(e),s=this._updateWeight(t);if(s>0)for(var c=this._interpolants,u=this._propertyBindings,l=0,h=c.length;l!==h;++l)c[l].evaluate(a),u[l].accumulate(r,s)},_updateWeight:function(t){var e=0;if(this.enabled){e=this.weight;var n=this._weightInterpolant;if(null!==n){var r=n.evaluate(t)[0];e*=r,t>n.parameterPositions[1]&&(this.stopFading(),0===r&&(this.enabled=!1))}}return this._effectiveWeight=e,e},_updateTimeScale:function(t){var e=0;if(!this.paused){e=this.timeScale;var n=this._timeScaleInterpolant;if(null!==n){var r=n.evaluate(t)[0];e*=r,t>n.parameterPositions[1]&&(this.stopWarping(),0===e?this.paused=!0:this.timeScale=e)}}return this._effectiveTimeScale=e,e},_updateTime:function(t){var e=this.time+t;if(0===t)return e;var n=this._clip.duration,r=this.loop,i=this._loopCount;if(r===ca){i===-1&&(this.loopCount=0,this._setEndings(!0,!0,!1));t:{if(e>=n)e=n;else{if(!(e<0))break t;e=0}this.clampWhenFinished?this.paused=!0:this.enabled=!1,this._mixer.dispatchEvent({type:"finished",action:this,direction:t<0?-1:1})}}else{var o=r===la;if(i===-1&&(t>=0?(i=0,this._setEndings(!0,0===this.repetitions,o)):this._setEndings(0===this.repetitions,!0,o)),e>=n||e<0){var a=Math.floor(e/n);e-=n*a,i+=Math.abs(a);var s=this.repetitions-i;if(s<0)this.clampWhenFinished?this.paused=!0:this.enabled=!1,e=t>0?n:0,this._mixer.dispatchEvent({type:"finished",action:this,direction:t>0?1:-1});else{if(0===s){var c=t<0;this._setEndings(c,!c,o)}else this._setEndings(!1,!1,o);this._loopCount=i,this._mixer.dispatchEvent({type:"loop",action:this,loopDelta:a})}}if(o&&1===(1&i))return this.time=e,n-e}return this.time=e,e},_setEndings:function(t,e,n){var r=this._interpolantSettings;n?(r.endingStart=ma,r.endingEnd=ma):(t?r.endingStart=this.zeroSlopeAtStart?ma:da:r.endingStart=va,e?r.endingEnd=this.zeroSlopeAtEnd?ma:da:r.endingEnd=va)},_scheduleFading:function(t,e,n){var r=this._mixer,i=r.time,o=this._weightInterpolant;null===o&&(o=r._lendControlInterpolant(),this._weightInterpolant=o);var a=o.parameterPositions,s=o.sampleValues;return a[0]=i,s[0]=e,a[1]=i+t,s[1]=n,this}},Object.assign(wr.prototype,e.prototype,{clipAction:function(t,e){var n=e||this._root,r=n.uuid,i="string"==typeof t?Wn.findByName(n,t):t,o=null!==i?i.uuid:t,a=this._actionsByClip[o],s=null;if(void 0!==a){var c=a.actionByRoot[r];if(void 0!==c)return c;s=a.knownActions[0],null===i&&(i=s._clip)}if(null===i)return null;var u=new _r(this,i,e);return this._bindAction(u,s),this._addInactiveAction(u,o,r),u},existingAction:function(t,e){var n=e||this._root,r=n.uuid,i="string"==typeof t?Wn.findByName(n,t):t,o=i?i.uuid:t,a=this._actionsByClip[o];return void 0!==a?a.actionByRoot[r]||null:null},stopAllAction:function(){var t=this._actions,e=this._nActiveActions,n=this._bindings,r=this._nActiveBindings;this._nActiveActions=0,this._nActiveBindings=0;for(var i=0;i!==e;++i)t[i].reset();for(var i=0;i!==r;++i)n[i].useCount=0;return this},update:function(t){t*=this.timeScale;for(var e=this._actions,n=this._nActiveActions,r=this.time+=t,i=Math.sign(t),o=this._accuIndex^=1,a=0;a!==n;++a){var s=e[a];s.enabled&&s._update(r,t,i,o)}for(var c=this._bindings,u=this._nActiveBindings,a=0;a!==u;++a)c[a].apply(o);return this},getRoot:function(){return this._root},uncacheClip:function(t){var e=this._actions,n=t.uuid,r=this._actionsByClip,i=r[n];if(void 0!==i){for(var o=i.knownActions,a=0,s=o.length;a!==s;++a){var c=o[a];this._deactivateAction(c);var u=c._cacheIndex,l=e[e.length-1];c._cacheIndex=null,c._byClipCacheIndex=null,l._cacheIndex=u,e[u]=l,e.pop(),this._removeInactiveBindingsForAction(c)}delete r[n]}},uncacheRoot:function(t){var e=t.uuid,n=this._actionsByClip;for(var r in n){var i=n[r].actionByRoot,o=i[e];void 0!==o&&(this._deactivateAction(o),this._removeInactiveAction(o))}var a=this._bindingsByRootAndName,s=a[e];if(void 0!==s)for(var c in s){var u=s[c];u.restoreOriginalState(),this._removeInactiveBinding(u)}},uncacheAction:function(t,e){var n=this.existingAction(t,e);null!==n&&(this._deactivateAction(n),this._removeInactiveAction(n))}}),Object.assign(wr.prototype,{_bindAction:function(t,e){var n=t._localRoot||this._root,r=t._clip.tracks,i=r.length,o=t._propertyBindings,a=t._interpolants,s=n.uuid,c=this._bindingsByRootAndName,u=c[s];void 0===u&&(u={},c[s]=u);for(var l=0;l!==i;++l){var h=r[l],f=h.name,p=u[f];if(void 0!==p)o[l]=p;else{if(p=o[l],void 0!==p){null===p._cacheIndex&&(++p.referenceCount,this._addInactiveBinding(p,s,f));continue}var d=e&&e._propertyBindings[l].binding.parsedPath;p=new gr(yr.create(n,f,d),h.ValueTypeName,h.getValueSize()),++p.referenceCount,this._addInactiveBinding(p,s,f),o[l]=p}a[l].resultBuffer=p.buffer}},_activateAction:function(t){if(!this._isActiveAction(t)){if(null===t._cacheIndex){var e=(t._localRoot||this._root).uuid,n=t._clip.uuid,r=this._actionsByClip[n];this._bindAction(t,r&&r.knownActions[0]),this._addInactiveAction(t,n,e)}for(var i=t._propertyBindings,o=0,a=i.length;o!==a;++o){var s=i[o];0===s.useCount++&&(this._lendBinding(s),s.saveOriginalState())}this._lendAction(t)}},_deactivateAction:function(t){if(this._isActiveAction(t)){for(var e=t._propertyBindings,n=0,r=e.length;n!==r;++n){var i=e[n];0===--i.useCount&&(i.restoreOriginalState(),this._takeBackBinding(i))}this._takeBackAction(t)}},_initMemoryManager:function(){this._actions=[],this._nActiveActions=0,this._actionsByClip={},this._bindings=[],this._nActiveBindings=0,this._bindingsByRootAndName={},this._controlInterpolants=[],this._nActiveControlInterpolants=0;var t=this;this.stats={actions:{get total(){return t._actions.length},get inUse(){return t._nActiveActions}},bindings:{get total(){return t._bindings.length},get inUse(){return t._nActiveBindings}},controlInterpolants:{get total(){return t._controlInterpolants.length},get inUse(){return t._nActiveControlInterpolants}}}},_isActiveAction:function(t){var e=t._cacheIndex;return null!==e&&e<this._nActiveActions},_addInactiveAction:function(t,e,n){var r=this._actions,i=this._actionsByClip,o=i[e];if(void 0===o)o={knownActions:[t],actionByRoot:{}},t._byClipCacheIndex=0,i[e]=o;else{var a=o.knownActions;t._byClipCacheIndex=a.length,a.push(t)}t._cacheIndex=r.length,r.push(t),o.actionByRoot[n]=t},_removeInactiveAction:function(t){var e=this._actions,n=e[e.length-1],r=t._cacheIndex;n._cacheIndex=r,e[r]=n,e.pop(),t._cacheIndex=null;var i=t._clip.uuid,o=this._actionsByClip,a=o[i],s=a.knownActions,c=s[s.length-1],u=t._byClipCacheIndex;c._byClipCacheIndex=u,s[u]=c,s.pop(),t._byClipCacheIndex=null;var l=a.actionByRoot,h=(e._localRoot||this._root).uuid;delete l[h],0===s.length&&delete o[i],this._removeInactiveBindingsForAction(t)},_removeInactiveBindingsForAction:function(t){for(var e=t._propertyBindings,n=0,r=e.length;n!==r;++n){var i=e[n];0===--i.referenceCount&&this._removeInactiveBinding(i)}},_lendAction:function(t){var e=this._actions,n=t._cacheIndex,r=this._nActiveActions++,i=e[r];t._cacheIndex=r,e[r]=t,i._cacheIndex=n,e[n]=i},_takeBackAction:function(t){var e=this._actions,n=t._cacheIndex,r=--this._nActiveActions,i=e[r];t._cacheIndex=r,e[r]=t,i._cacheIndex=n,e[n]=i},_addInactiveBinding:function(t,e,n){var r=this._bindingsByRootAndName,i=r[e],o=this._bindings;void 0===i&&(i={},r[e]=i),i[n]=t,t._cacheIndex=o.length,o.push(t)},_removeInactiveBinding:function(t){var e=this._bindings,n=t.binding,r=n.rootNode.uuid,i=n.path,o=this._bindingsByRootAndName,a=o[r],s=e[e.length-1],c=t._cacheIndex;s._cacheIndex=c,e[c]=s,e.pop(),delete a[i];t:{for(var u in a)break t;delete o[r]}},_lendBinding:function(t){var e=this._bindings,n=t._cacheIndex,r=this._nActiveBindings++,i=e[r];t._cacheIndex=r,e[r]=t,i._cacheIndex=n,e[n]=i},_takeBackBinding:function(t){var e=this._bindings,n=t._cacheIndex,r=--this._nActiveBindings,i=e[r];t._cacheIndex=r,e[r]=t,i._cacheIndex=n,e[n]=i},_lendControlInterpolant:function(){var t=this._controlInterpolants,e=this._nActiveControlInterpolants++,n=t[e];return void 0===n&&(n=new Un(new Float32Array(2),new Float32Array(2),1,this._controlInterpolantsResultBuffer),n.__cacheIndex=e,t[e]=n),n},_takeBackControlInterpolant:function(t){var e=this._controlInterpolants,n=t.__cacheIndex,r=--this._nActiveControlInterpolants,i=e[r];t.__cacheIndex=r,e[r]=t,i.__cacheIndex=n,e[n]=i},_controlInterpolantsResultBuffer:new Float32Array(1)}),br.prototype={constructor:br,onUpdate:function(t){return this.dynamic=!0,this.onUpdateCallback=t,this}},Mr.prototype=Object.create(Ct.prototype),Mr.prototype.constructor=Mr,Mr.prototype.isInstancedBufferGeometry=!0,Mr.prototype.addGroup=function(t,e,n){this.groups.push({start:t,count:e,instances:n})},Mr.prototype.copy=function(t){var e=t.index;null!==e&&this.setIndex(e.clone());var n=t.attributes;for(var r in n){var i=n[r];this.addAttribute(r,i.clone())}for(var o=t.groups,a=0,s=o.length;a<s;a++){var c=o[a];this.addGroup(c.start,c.count,c.instances)}return this},Er.prototype={constructor:Er,isInterleavedBufferAttribute:!0,get count(){return this.data.count},get array(){return this.data.array},setX:function(t,e){return this.data.array[t*this.data.stride+this.offset]=e,this},setY:function(t,e){return this.data.array[t*this.data.stride+this.offset+1]=e,this},setZ:function(t,e){return this.data.array[t*this.data.stride+this.offset+2]=e,this},setW:function(t,e){return this.data.array[t*this.data.stride+this.offset+3]=e,this},getX:function(t){return this.data.array[t*this.data.stride+this.offset]},getY:function(t){return this.data.array[t*this.data.stride+this.offset+1]},getZ:function(t){return this.data.array[t*this.data.stride+this.offset+2]},getW:function(t){return this.data.array[t*this.data.stride+this.offset+3]},setXY:function(t,e,n){return t=t*this.data.stride+this.offset,this.data.array[t+0]=e,this.data.array[t+1]=n,this},setXYZ:function(t,e,n,r){return t=t*this.data.stride+this.offset,this.data.array[t+0]=e,this.data.array[t+1]=n,this.data.array[t+2]=r,this},setXYZW:function(t,e,n,r,i){return t=t*this.data.stride+this.offset,this.data.array[t+0]=e,this.data.array[t+1]=n,this.data.array[t+2]=r,this.data.array[t+3]=i,this}},Sr.prototype={constructor:Sr,isInterleavedBuffer:!0,set needsUpdate(t){t===!0&&this.version++},setDynamic:function(t){return this.dynamic=t,this},copy:function(t){return this.array=new t.array.constructor(t.array),this.count=t.count,this.stride=t.stride,this.dynamic=t.dynamic,this},copyAt:function(t,e,n){t*=this.stride,n*=e.stride;for(var r=0,i=this.stride;r<i;r++)this.array[t+r]=e.array[n+r];return this},set:function(t,e){return void 0===e&&(e=0),this.array.set(t,e),this},clone:function(){return(new this.constructor).copy(this)}},Tr.prototype=Object.create(Sr.prototype),Tr.prototype.constructor=Tr,Tr.prototype.isInstancedInterleavedBuffer=!0,Tr.prototype.copy=function(t){return Sr.prototype.copy.call(this,t),this.meshPerAttribute=t.meshPerAttribute,this},Ar.prototype=Object.create(mt.prototype),Ar.prototype.constructor=Ar,Ar.prototype.isInstancedBufferAttribute=!0,Ar.prototype.copy=function(t){return mt.prototype.copy.call(this,t),this.meshPerAttribute=t.meshPerAttribute,this},Lr.prototype={constructor:Lr,linePrecision:1,set:function(t,e){this.ray.set(t,e)},setFromCamera:function(t,e){e&&e.isPerspectiveCamera?(this.ray.origin.setFromMatrixPosition(e.matrixWorld),this.ray.direction.set(t.x,t.y,.5).unproject(e).sub(this.ray.origin).normalize()):e&&e.isOrthographicCamera?(this.ray.origin.set(t.x,t.y,(e.near+e.far)/(e.near-e.far)).unproject(e),this.ray.direction.set(0,0,-1).transformDirection(e.matrixWorld)):console.error("THREE.Raycaster: Unsupported camera type.")},intersectObject:function(t,e){var n=[];return Pr(t,this,n,e),n.sort(Cr),n},intersectObjects:function(t,e){var n=[];if(Array.isArray(t)===!1)return console.warn("THREE.Raycaster.intersectObjects: objects is not an Array."),n;for(var r=0,i=t.length;r<i;r++)Pr(t[r],this,n,e);return n.sort(Cr),n}},Rr.prototype={constructor:Rr,start:function(){this.startTime=(performance||Date).now(),this.oldTime=this.startTime,this.running=!0},stop:function(){this.getElapsedTime(),this.running=!1},getElapsedTime:function(){return this.getDelta(),this.elapsedTime},getDelta:function(){var t=0;if(this.autoStart&&!this.running&&this.start(),this.running){var e=(performance||Date).now();t=(e-this.oldTime)/1e3,this.oldTime=e,this.elapsedTime+=t}return t}},Or.prototype={constructor:Or,set:function(t,e,n){return this.radius=t,this.phi=e,this.theta=n,this},clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.radius.copy(t.radius),this.phi.copy(t.phi),this.theta.copy(t.theta),this},makeSafe:function(){var t=1e-6;return this.phi=Math.max(t,Math.min(Math.PI-t,this.phi)),this},setFromVector3:function(e){return this.radius=e.length(),0===this.radius?(this.theta=0,this.phi=0):(this.theta=Math.atan2(e.x,e.z),this.phi=Math.acos(t.Math.clamp(e.y/this.radius,-1,1))),this}},Ur.prototype=Object.create(Pt.prototype),Ur.prototype.constructor=Ur,Ur.prototype.createAnimation=function(t,e,n,r){var i={start:e,end:n,length:n-e+1,fps:r,duration:(n-e)/r,lastFrame:0,currentFrame:0,active:!1,time:0,direction:1,weight:1,directionBackwards:!1,mirroredLoop:!1};this.animationsMap[t]=i,this.animationsList.push(i)},Ur.prototype.autoCreateAnimations=function(t){for(var e,n=/([a-z]+)_?(\d+)/i,r={},i=this.geometry,o=0,a=i.morphTargets.length;o<a;o++){var s=i.morphTargets[o],c=s.name.match(n);if(c&&c.length>1){var u=c[1];r[u]||(r[u]={start:1/0,end:-(1/0)});var l=r[u];o<l.start&&(l.start=o),o>l.end&&(l.end=o),e||(e=u)}}for(var u in r){var l=r[u];this.createAnimation(u,l.start,l.end,t)}this.firstAnimation=e},Ur.prototype.setAnimationDirectionForward=function(t){var e=this.animationsMap[t];e&&(e.direction=1,e.directionBackwards=!1)},Ur.prototype.setAnimationDirectionBackward=function(t){var e=this.animationsMap[t];e&&(e.direction=-1,e.directionBackwards=!0)},Ur.prototype.setAnimationFPS=function(t,e){var n=this.animationsMap[t];n&&(n.fps=e,n.duration=(n.end-n.start)/n.fps)},Ur.prototype.setAnimationDuration=function(t,e){var n=this.animationsMap[t];n&&(n.duration=e,n.fps=(n.end-n.start)/n.duration)},Ur.prototype.setAnimationWeight=function(t,e){var n=this.animationsMap[t];n&&(n.weight=e)},Ur.prototype.setAnimationTime=function(t,e){var n=this.animationsMap[t];n&&(n.time=e)},Ur.prototype.getAnimationTime=function(t){var e=0,n=this.animationsMap[t];return n&&(e=n.time),e},Ur.prototype.getAnimationDuration=function(t){var e=-1,n=this.animationsMap[t];return n&&(e=n.duration),e},Ur.prototype.playAnimation=function(t){var e=this.animationsMap[t];e?(e.time=0,e.active=!0):console.warn("THREE.MorphBlendMesh: animation["+t+"] undefined in .playAnimation()")},Ur.prototype.stopAnimation=function(t){var e=this.animationsMap[t];e&&(e.active=!1)},Ur.prototype.update=function(e){for(var n=0,r=this.animationsList.length;n<r;n++){
  var i=this.animationsList[n];if(i.active){var o=i.duration/i.length;i.time+=i.direction*e,i.mirroredLoop?(i.time>i.duration||i.time<0)&&(i.direction*=-1,i.time>i.duration&&(i.time=i.duration,i.directionBackwards=!0),i.time<0&&(i.time=0,i.directionBackwards=!1)):(i.time=i.time%i.duration,i.time<0&&(i.time+=i.duration));var a=i.start+t.Math.clamp(Math.floor(i.time/o),0,i.length-1),s=i.weight;a!==i.currentFrame&&(this.morphTargetInfluences[i.lastFrame]=0,this.morphTargetInfluences[i.currentFrame]=1*s,this.morphTargetInfluences[a]=0,i.lastFrame=i.currentFrame,i.currentFrame=a);var c=i.time%o/o;i.directionBackwards&&(c=1-c),i.currentFrame!==i.lastFrame?(this.morphTargetInfluences[i.currentFrame]=c*s,this.morphTargetInfluences[i.lastFrame]=(1-c)*s):this.morphTargetInfluences[i.currentFrame]=s}}},Nr.prototype=Object.create(ut.prototype),Nr.prototype.constructor=Nr,Nr.prototype.isImmediateRenderObject=!0,Fr.prototype=Object.create(be.prototype),Fr.prototype.constructor=Fr,Fr.prototype.update=function(){var t=new u,e=new u,n=new nt;return function(){var r=["a","b","c"];this.object.updateMatrixWorld(!0),n.getNormalMatrix(this.object.matrixWorld);var i=this.object.matrixWorld,o=this.geometry.attributes.position,a=this.object.geometry;if(a&&a.isGeometry)for(var s=a.vertices,c=a.faces,u=0,l=0,h=c.length;l<h;l++)for(var f=c[l],p=0,d=f.vertexNormals.length;p<d;p++){var m=s[f[r[p]]],v=f.vertexNormals[p];t.copy(m).applyMatrix4(i),e.copy(v).applyMatrix3(n).normalize().multiplyScalar(this.size).add(t),o.setXYZ(u,t.x,t.y,t.z),u+=1,o.setXYZ(u,e.x,e.y,e.z),u+=1}else if(a&&a.isBufferGeometry)for(var g=a.attributes.position,y=a.attributes.normal,u=0,p=0,d=g.count;p<d;p++)t.set(g.getX(p),g.getY(p),g.getZ(p)).applyMatrix4(i),e.set(y.getX(p),y.getY(p),y.getZ(p)),e.applyMatrix3(n).normalize().multiplyScalar(this.size).add(t),o.setXYZ(u,t.x,t.y,t.z),u+=1,o.setXYZ(u,e.x,e.y,e.z),u+=1;return o.needsUpdate=!0,this}}(),Dr.prototype=Object.create(ut.prototype),Dr.prototype.constructor=Dr,Dr.prototype.dispose=function(){this.cone.geometry.dispose(),this.cone.material.dispose()},Dr.prototype.update=function(){var t=new u,e=new u;return function(){var n=this.light.distance?this.light.distance:1e3,r=n*Math.tan(this.light.angle);this.cone.scale.set(r,r,n),t.setFromMatrixPosition(this.light.matrixWorld),e.setFromMatrixPosition(this.light.target.matrixWorld),this.cone.lookAt(e.sub(t)),this.cone.material.color.copy(this.light.color).multiplyScalar(this.light.intensity)}}(),zr.prototype=Object.create(be.prototype),zr.prototype.constructor=zr,zr.prototype.getBoneList=function(t){var e=[];t&&t.isBone&&e.push(t);for(var n=0;n<t.children.length;n++)e.push.apply(e,this.getBoneList(t.children[n]));return e},zr.prototype.update=function(){for(var t=this.geometry,e=(new l).getInverse(this.root.matrixWorld),n=new l,r=0,i=0;i<this.bones.length;i++){var o=this.bones[i];o.parent&&o.parent.isBone&&(n.multiplyMatrices(e,o.matrixWorld),t.vertices[r].setFromMatrixPosition(n),n.multiplyMatrices(e,o.parent.matrixWorld),t.vertices[r+1].setFromMatrixPosition(n),r+=2)}t.verticesNeedUpdate=!0,t.computeBoundingSphere()},Br.prototype=Object.create(Pt.prototype),Br.prototype.constructor=Br,Br.prototype.dispose=function(){this.geometry.dispose(),this.material.dispose()},Br.prototype.update=function(){this.material.color.copy(this.light.color).multiplyScalar(this.light.intensity)},kr.prototype=Object.create(ut.prototype),kr.prototype.constructor=kr,kr.prototype.dispose=function(){this.lightSphere.geometry.dispose(),this.lightSphere.material.dispose()},kr.prototype.update=function(){var t=new u;return function(){this.colors[0].copy(this.light.color).multiplyScalar(this.light.intensity),this.colors[1].copy(this.light.groundColor).multiplyScalar(this.light.intensity),this.lightSphere.lookAt(t.setFromMatrixPosition(this.light.matrixWorld).negate()),this.lightSphere.geometry.colorsNeedUpdate=!0}}(),jr.prototype=Object.create(be.prototype),jr.prototype.constructor=jr,jr.prototype.setColors=function(){console.error("THREE.GridHelper: setColors() has been deprecated, pass them in the constructor instead.")},Gr.prototype=Object.create(be.prototype),Gr.prototype.constructor=Gr,Gr.prototype.update=function(){var t=new u,e=new u,n=new nt;return function(){this.object.updateMatrixWorld(!0),n.getNormalMatrix(this.object.matrixWorld);for(var r=this.object.matrixWorld,i=this.geometry.attributes.position,o=this.object.geometry,a=o.vertices,s=o.faces,c=0,u=0,l=s.length;u<l;u++){var h=s[u],f=h.normal;t.copy(a[h.a]).add(a[h.b]).add(a[h.c]).divideScalar(3).applyMatrix4(r),e.copy(f).applyMatrix3(n).normalize().multiplyScalar(this.size).add(t),i.setXYZ(c,t.x,t.y,t.z),c+=1,i.setXYZ(c,e.x,e.y,e.z),c+=1}return i.needsUpdate=!0,this}}(),Vr.prototype=Object.create(ut.prototype),Vr.prototype.constructor=Vr,Vr.prototype.dispose=function(){var t=this.children[0],e=this.children[1];t.geometry.dispose(),t.material.dispose(),e.geometry.dispose(),e.material.dispose()},Vr.prototype.update=function(){var t=new u,e=new u,n=new u;return function(){t.setFromMatrixPosition(this.light.matrixWorld),e.setFromMatrixPosition(this.light.target.matrixWorld),n.subVectors(e,t);var r=this.children[0],i=this.children[1];r.lookAt(n),r.material.color.copy(this.light.color).multiplyScalar(this.light.intensity),i.lookAt(n),i.scale.z=n.length()}}(),Hr.prototype=Object.create(be.prototype),Hr.prototype.constructor=Hr,Hr.prototype.update=function(){function t(t,o,a,s){r.set(o,a,s).unproject(i);var c=n[t];if(void 0!==c)for(var u=0,l=c.length;u<l;u++)e.vertices[c[u]].copy(r)}var e,n,r=new u,i=new Ot;return function(){e=this.geometry,n=this.pointMap;var r=1,o=1;i.projectionMatrix.copy(this.camera.projectionMatrix),t("c",0,0,-1),t("t",0,0,1),t("n1",-r,-o,-1),t("n2",r,-o,-1),t("n3",-r,o,-1),t("n4",r,o,-1),t("f1",-r,-o,1),t("f2",r,-o,1),t("f3",-r,o,1),t("f4",r,o,1),t("u1",.7*r,1.1*o,-1),t("u2",.7*-r,1.1*o,-1),t("u3",0,2*o,-1),t("cf1",-r,0,1),t("cf2",r,0,1),t("cf3",0,-o,1),t("cf4",0,o,1),t("cn1",-r,0,-1),t("cn2",r,0,-1),t("cn3",0,-o,-1),t("cn4",0,o,-1),e.verticesNeedUpdate=!0}}(),Wr.prototype=Object.create(Pt.prototype),Wr.prototype.constructor=Wr,Wr.prototype.update=function(){this.box.setFromObject(this.object),this.box.size(this.scale),this.box.getCenter(this.position)},Xr.prototype=Object.create(be.prototype),Xr.prototype.constructor=Xr,Xr.prototype.update=function(){var t=new tt;return function(e){if(e&&e.isBox3?t.copy(e):t.setFromObject(e),!t.isEmpty()){var n=t.min,r=t.max,i=this.geometry.attributes.position,o=i.array;o[0]=r.x,o[1]=r.y,o[2]=r.z,o[3]=n.x,o[4]=r.y,o[5]=r.z,o[6]=n.x,o[7]=n.y,o[8]=r.z,o[9]=r.x,o[10]=n.y,o[11]=r.z,o[12]=r.x,o[13]=r.y,o[14]=n.z,o[15]=n.x,o[16]=r.y,o[17]=n.z,o[18]=n.x,o[19]=n.y,o[20]=n.z,o[21]=r.x,o[22]=n.y,o[23]=n.z,i.needsUpdate=!0,this.geometry.computeBoundingSphere()}}}();var Xc=new Ct;Xc.addAttribute("position",new Mt([0,0,0,0,1,0],3));var qc=new Qe(0,.5,1,5,1);qc.translate(0,-.5,0),qr.prototype=Object.create(ut.prototype),qr.prototype.constructor=qr,qr.prototype.setDirection=function(){var t,e=new u;return function(n){n.y>.99999?this.quaternion.set(0,0,0,1):n.y<-.99999?this.quaternion.set(1,0,0,0):(e.set(n.z,0,-n.x).normalize(),t=Math.acos(n.y),this.quaternion.setFromAxisAngle(e,t))}}(),qr.prototype.setLength=function(t,e,n){void 0===e&&(e=.2*t),void 0===n&&(n=.2*e),this.line.scale.set(1,Math.max(0,t-e),1),this.line.updateMatrix(),this.cone.scale.set(n,e,n),this.cone.position.y=t,this.cone.updateMatrix()},qr.prototype.setColor=function(t){this.line.material.color.copy(t),this.cone.material.color.copy(t)},Yr.prototype=Object.create(be.prototype),Yr.prototype.constructor=Yr,t.CatmullRomCurve3=function(){function t(){}var e=new u,n=new t,r=new t,i=new t;return t.prototype.init=function(t,e,n,r){this.c0=t,this.c1=n,this.c2=-3*t+3*e-2*n-r,this.c3=2*t-2*e+n+r},t.prototype.initNonuniformCatmullRom=function(t,e,n,r,i,o,a){var s=(e-t)/i-(n-t)/(i+o)+(n-e)/o,c=(n-e)/o-(r-e)/(o+a)+(r-n)/a;s*=o,c*=o,this.init(e,n,s,c)},t.prototype.initCatmullRom=function(t,e,n,r,i){this.init(e,n,i*(n-t),i*(r-e))},t.prototype.calc=function(t){var e=t*t,n=e*t;return this.c0+this.c1*t+this.c2*e+this.c3*n},$n.create(function(t){this.points=t||[],this.closed=!1},function(t){var o,a,s,c,l=this.points;c=l.length,c<2&&console.log("duh, you need at least 2 points"),o=(c-(this.closed?0:1))*t,a=Math.floor(o),s=o-a,this.closed?a+=a>0?0:(Math.floor(Math.abs(a)/l.length)+1)*l.length:0===s&&a===c-1&&(a=c-2,s=1);var h,f,p,d;if(this.closed||a>0?h=l[(a-1)%c]:(e.subVectors(l[0],l[1]).add(l[0]),h=e),f=l[a%c],p=l[(a+1)%c],this.closed||a+2<c?d=l[(a+2)%c]:(e.subVectors(l[c-1],l[c-2]).add(l[c-1]),d=e),void 0===this.type||"centripetal"===this.type||"chordal"===this.type){var m="chordal"===this.type?.5:.25,v=Math.pow(h.distanceToSquared(f),m),g=Math.pow(f.distanceToSquared(p),m),y=Math.pow(p.distanceToSquared(d),m);g<1e-4&&(g=1),v<1e-4&&(v=g),y<1e-4&&(y=g),n.initNonuniformCatmullRom(h.x,f.x,p.x,d.x,v,g,y),r.initNonuniformCatmullRom(h.y,f.y,p.y,d.y,v,g,y),i.initNonuniformCatmullRom(h.z,f.z,p.z,d.z,v,g,y)}else if("catmullrom"===this.type){var x=void 0!==this.tension?this.tension:.5;n.initCatmullRom(h.x,f.x,p.x,d.x,x),r.initCatmullRom(h.y,f.y,p.y,d.y,x),i.initCatmullRom(h.z,f.z,p.z,d.z,x)}var _=new u(n.calc(s),r.calc(s),i.calc(s));return _})}(),Zr.prototype=Object.create(t.CatmullRomCurve3.prototype);var Yc=$n.create(function(t){console.warn("THREE.SplineCurve3 will be deprecated. Please use THREE.CatmullRomCurve3"),this.points=void 0===t?[]:t},function(e){var n=this.points,r=(n.length-1)*e,i=Math.floor(r),o=r-i,a=n[0==i?i:i-1],s=n[i],c=n[i>n.length-2?n.length-1:i+1],l=n[i>n.length-3?n.length-1:i+2],h=t.CurveUtils.interpolate;return new u(h(a.x,s.x,c.x,l.x,o),h(a.y,s.y,c.y,l.y,o),h(a.z,s.z,c.z,l.z,o))});t.CubicBezierCurve3=$n.create(function(t,e,n,r){this.v0=t,this.v1=e,this.v2=n,this.v3=r},function(e){var n=t.ShapeUtils.b3;return new u(n(e,this.v0.x,this.v1.x,this.v2.x,this.v3.x),n(e,this.v0.y,this.v1.y,this.v2.y,this.v3.y),n(e,this.v0.z,this.v1.z,this.v2.z,this.v3.z))}),t.QuadraticBezierCurve3=$n.create(function(t,e,n){this.v0=t,this.v1=e,this.v2=n},function(e){var n=t.ShapeUtils.b2;return new u(n(e,this.v0.x,this.v1.x,this.v2.x),n(e,this.v0.y,this.v1.y,this.v2.y),n(e,this.v0.z,this.v1.z,this.v2.z))}),t.LineCurve3=$n.create(function(t,e){this.v1=t,this.v2=e},function(t){if(1===t)return this.v2.clone();var e=new u;return e.subVectors(this.v2,this.v1),e.multiplyScalar(t),e.add(this.v1),e}),Jr.prototype=Object.create(tr.prototype),Jr.prototype.constructor=Jr,t.SceneUtils={createMultiMaterialObject:function(t,e){for(var n=new Se,r=0,i=e.length;r<i;r++)n.add(new Pt(t,e[r]));return n},detach:function(t,e,n){t.applyMatrix(e.matrixWorld),e.remove(t),n.add(t)},attach:function(t,e,n){var r=new l;r.getInverse(n.matrixWorld),t.applyMatrix(r),e.remove(t),n.add(t)}};var Zc=0,Jc=1;Object.assign(q.prototype,{center:function(t){return console.warn("THREE.Box2: .center() has been renamed to .getCenter()."),this.getCenter(t)},empty:function(){return console.warn("THREE.Box2: .empty() has been renamed to .isEmpty()."),this.isEmpty()},isIntersectionBox:function(t){return console.warn("THREE.Box2: .isIntersectionBox() has been renamed to .intersectsBox()."),this.intersectsBox(t)},size:function(t){return console.warn("THREE.Box2: .size() has been renamed to .getSize()."),this.getSize(t)}}),Object.assign(tt.prototype,{center:function(t){return console.warn("THREE.Box3: .center() has been renamed to .getCenter()."),this.getCenter(t)},empty:function(){return console.warn("THREE.Box3: .empty() has been renamed to .isEmpty()."),this.isEmpty()},isIntersectionBox:function(t){return console.warn("THREE.Box3: .isIntersectionBox() has been renamed to .intersectsBox()."),this.intersectsBox(t)},isIntersectionSphere:function(t){return console.warn("THREE.Box3: .isIntersectionSphere() has been renamed to .intersectsSphere()."),this.intersectsSphere(t)},size:function(t){return console.warn("THREE.Box3: .size() has been renamed to .getSize()."),this.getSize(t)}}),Object.assign(ht.prototype,{center:function(t){return console.warn("THREE.Line3: .center() has been renamed to .getCenter()."),this.getCenter(t)}}),Object.assign(nt.prototype,{multiplyVector3:function(t){return console.warn("THREE.Matrix3: .multiplyVector3() has been removed. Use vector.applyMatrix3( matrix ) instead."),t.applyMatrix3(this)},multiplyVector3Array:function(t){return console.warn("THREE.Matrix3: .multiplyVector3Array() has been renamed. Use matrix.applyToVector3Array( array ) instead."),this.applyToVector3Array(t)}}),Object.assign(l.prototype,{extractPosition:function(t){return console.warn("THREE.Matrix4: .extractPosition() has been renamed to .copyPosition()."),this.copyPosition(t)},setRotationFromQuaternion:function(t){return console.warn("THREE.Matrix4: .setRotationFromQuaternion() has been renamed to .makeRotationFromQuaternion()."),this.makeRotationFromQuaternion(t)},multiplyVector3:function(t){return console.warn("THREE.Matrix4: .multiplyVector3() has been removed. Use vector.applyMatrix4( matrix ) or vector.applyProjection( matrix ) instead."),t.applyProjection(this)},multiplyVector4:function(t){return console.warn("THREE.Matrix4: .multiplyVector4() has been removed. Use vector.applyMatrix4( matrix ) instead."),t.applyMatrix4(this)},multiplyVector3Array:function(t){return console.warn("THREE.Matrix4: .multiplyVector3Array() has been renamed. Use matrix.applyToVector3Array( array ) instead."),this.applyToVector3Array(t)},rotateAxis:function(t){console.warn("THREE.Matrix4: .rotateAxis() has been removed. Use Vector3.transformDirection( matrix ) instead."),t.transformDirection(this)},crossVector:function(t){return console.warn("THREE.Matrix4: .crossVector() has been removed. Use vector.applyMatrix4( matrix ) instead."),t.applyMatrix4(this)},translate:function(t){console.error("THREE.Matrix4: .translate() has been removed.")},rotateX:function(t){console.error("THREE.Matrix4: .rotateX() has been removed.")},rotateY:function(t){console.error("THREE.Matrix4: .rotateY() has been removed.")},rotateZ:function(t){console.error("THREE.Matrix4: .rotateZ() has been removed.")},rotateByAxis:function(t,e){console.error("THREE.Matrix4: .rotateByAxis() has been removed.")}}),Object.assign(rt.prototype,{isIntersectionLine:function(t){return console.warn("THREE.Plane: .isIntersectionLine() has been renamed to .intersectsLine()."),this.intersectsLine(t)}}),Object.assign(c.prototype,{multiplyVector3:function(t){return console.warn("THREE.Quaternion: .multiplyVector3() has been removed. Use is now vector.applyQuaternion( quaternion ) instead."),t.applyQuaternion(this)}}),Object.assign(at.prototype,{isIntersectionBox:function(t){return console.warn("THREE.Ray: .isIntersectionBox() has been renamed to .intersectsBox()."),this.intersectsBox(t)},isIntersectionPlane:function(t){return console.warn("THREE.Ray: .isIntersectionPlane() has been renamed to .intersectsPlane()."),this.intersectsPlane(t)},isIntersectionSphere:function(t){return console.warn("THREE.Ray: .isIntersectionSphere() has been renamed to .intersectsSphere()."),this.intersectsSphere(t)}}),Object.assign(ir.prototype,{extrude:function(t){return console.warn("THREE.Shape: .extrude() has been removed. Use ExtrudeGeometry() instead."),new Ge(this,t)},makeGeometry:function(t){return console.warn("THREE.Shape: .makeGeometry() has been removed. Use ShapeGeometry() instead."),new $e(this,t)}}),Object.assign(u.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(t){return console.warn("THREE.Vector3: .getPositionFromMatrix() has been renamed to .setFromMatrixPosition()."),this.setFromMatrixPosition(t)},getScaleFromMatrix:function(t){return console.warn("THREE.Vector3: .getScaleFromMatrix() has been renamed to .setFromMatrixScale()."),this.setFromMatrixScale(t)},getColumnFromMatrix:function(t,e){return console.warn("THREE.Vector3: .getColumnFromMatrix() has been renamed to .setFromMatrixColumn()."),this.setFromMatrixColumn(e,t)}}),Object.assign(ut.prototype,{getChildByName:function(t){return console.warn("THREE.Object3D: .getChildByName() has been renamed to .getObjectByName()."),this.getObjectByName(t)},renderDepth:function(t){console.warn("THREE.Object3D: .renderDepth has been removed. Use .renderOrder, instead.")},translate:function(t,e){return console.warn("THREE.Object3D: .translate() has been removed. Use .translateOnAxis( axis, distance ) instead."),this.translateOnAxis(e,t)}}),Object.defineProperties(ut.prototype,{eulerOrder:{get:function(){return console.warn("THREE.Object3D: .eulerOrder is now .rotation.order."),this.rotation.order},set:function(t){console.warn("THREE.Object3D: .eulerOrder is now .rotation.order."),this.rotation.order=t}},useQuaternion:{get:function(){console.warn("THREE.Object3D: .useQuaternion has been removed. The library now uses quaternions by default.")},set:function(t){console.warn("THREE.Object3D: .useQuaternion has been removed. The library now uses quaternions by default.")}}}),Object.defineProperties(me.prototype,{objects:{get:function(){return console.warn("THREE.LOD: .objects has been renamed to .levels."),this.levels}}}),Ut.prototype.setLens=function(t,e){console.warn("THREE.PerspectiveCamera.setLens is deprecated. Use .setFocalLength and .filmGauge for a photographic setup."),void 0!==e&&(this.filmGauge=e),this.setFocalLength(t)},Object.defineProperties(Mn.prototype,{onlyShadow:{set:function(t){console.warn("THREE.Light: .onlyShadow has been removed.")}},shadowCameraFov:{set:function(t){console.warn("THREE.Light: .shadowCameraFov is now .shadow.camera.fov."),this.shadow.camera.fov=t}},shadowCameraLeft:{set:function(t){console.warn("THREE.Light: .shadowCameraLeft is now .shadow.camera.left."),this.shadow.camera.left=t}},shadowCameraRight:{set:function(t){console.warn("THREE.Light: .shadowCameraRight is now .shadow.camera.right."),this.shadow.camera.right=t}},shadowCameraTop:{set:function(t){console.warn("THREE.Light: .shadowCameraTop is now .shadow.camera.top."),this.shadow.camera.top=t}},shadowCameraBottom:{set:function(t){console.warn("THREE.Light: .shadowCameraBottom is now .shadow.camera.bottom."),this.shadow.camera.bottom=t}},shadowCameraNear:{set:function(t){console.warn("THREE.Light: .shadowCameraNear is now .shadow.camera.near."),this.shadow.camera.near=t}},shadowCameraFar:{set:function(t){console.warn("THREE.Light: .shadowCameraFar is now .shadow.camera.far."),this.shadow.camera.far=t}},shadowCameraVisible:{set:function(t){console.warn("THREE.Light: .shadowCameraVisible has been removed. Use new THREE.CameraHelper( light.shadow.camera ) instead.")}},shadowBias:{set:function(t){console.warn("THREE.Light: .shadowBias is now .shadow.bias."),this.shadow.bias=t}},shadowDarkness:{set:function(t){console.warn("THREE.Light: .shadowDarkness has been removed.")}},shadowMapWidth:{set:function(t){console.warn("THREE.Light: .shadowMapWidth is now .shadow.mapSize.width."),this.shadow.mapSize.width=t}},shadowMapHeight:{set:function(t){console.warn("THREE.Light: .shadowMapHeight is now .shadow.mapSize.height."),this.shadow.mapSize.height=t}}}),Object.defineProperties(mt.prototype,{length:{get:function(){return console.warn("THREE.BufferAttribute: .length has been deprecated. Please use .count."),this.array.length}}}),Object.assign(Ct.prototype,{addIndex:function(t){console.warn("THREE.BufferGeometry: .addIndex() has been renamed to .setIndex()."),this.setIndex(t)},addDrawCall:function(t,e,n){void 0!==n&&console.warn("THREE.BufferGeometry: .addDrawCall() no longer supports indexOffset."),console.warn("THREE.BufferGeometry: .addDrawCall() is now .addGroup()."),this.addGroup(t,e)},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(Ct.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(J.prototype,{wrapAround:{get:function(){console.warn("THREE."+this.type+": .wrapAround has been removed.")},set:function(t){console.warn("THREE."+this.type+": .wrapAround has been removed.")}},wrapRGB:{get:function(){return console.warn("THREE."+this.type+": .wrapRGB has been removed."),new X}}}),Object.defineProperties(fn.prototype,{metal:{get:function(){return console.warn("THREE.MeshPhongMaterial: .metal has been removed. Use THREE.MeshStandardMaterial instead."),!1},set:function(t){console.warn("THREE.MeshPhongMaterial: .metal has been removed. Use THREE.MeshStandardMaterial instead")}}}),Object.defineProperties(K.prototype,{derivatives:{get:function(){return console.warn("THREE.ShaderMaterial: .derivatives has been moved to .extensions.derivatives."),this.extensions.derivatives},set:function(t){console.warn("THREE. ShaderMaterial: .derivatives has been moved to .extensions.derivatives."),this.extensions.derivatives=t}}}),e.prototype=Object.assign(Object.create({constructor:e,apply:function(t){console.warn("THREE.EventDispatcher: .apply is deprecated, just inherit or Object.assign the prototype to mix-in."),Object.assign(t,this)}}),e.prototype),Object.assign(ce.prototype,{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 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(t){console.warn("THREE.WebGLRenderer: .enableScissorTest() is now .setScissorTest()."),this.setScissorTest(t)},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.")}}),Object.defineProperties(ce.prototype,{shadowMapEnabled:{get:function(){return this.shadowMap.enabled},set:function(t){console.warn("THREE.WebGLRenderer: .shadowMapEnabled is now .shadowMap.enabled."),this.shadowMap.enabled=t}},shadowMapType:{get:function(){return this.shadowMap.type},set:function(t){console.warn("THREE.WebGLRenderer: .shadowMapType is now .shadowMap.type."),this.shadowMap.type=t}},shadowMapCullFace:{get:function(){return this.shadowMap.cullFace},set:function(t){console.warn("THREE.WebGLRenderer: .shadowMapCullFace is now .shadowMap.cullFace."),this.shadowMap.cullFace=t}}}),Object.defineProperties(ot.prototype,{cullFace:{get:function(){return this.renderReverseSided?fi:hi},set:function(t){var e=t!==hi;console.warn("WebGLRenderer: .shadowMap.cullFace is deprecated. Set .shadowMap.renderReverseSided to "+e+"."),this.renderReverseSided=e}}}),Object.defineProperties(a.prototype,{wrapS:{get:function(){return console.warn("THREE.WebGLRenderTarget: .wrapS is now .texture.wrapS."),this.texture.wrapS},set:function(t){console.warn("THREE.WebGLRenderTarget: .wrapS is now .texture.wrapS."),this.texture.wrapS=t}},wrapT:{get:function(){return console.warn("THREE.WebGLRenderTarget: .wrapT is now .texture.wrapT."),this.texture.wrapT},set:function(t){console.warn("THREE.WebGLRenderTarget: .wrapT is now .texture.wrapT."),this.texture.wrapT=t}},magFilter:{get:function(){return console.warn("THREE.WebGLRenderTarget: .magFilter is now .texture.magFilter."),this.texture.magFilter},set:function(t){console.warn("THREE.WebGLRenderTarget: .magFilter is now .texture.magFilter."),this.texture.magFilter=t}},minFilter:{get:function(){return console.warn("THREE.WebGLRenderTarget: .minFilter is now .texture.minFilter."),this.texture.minFilter},set:function(t){console.warn("THREE.WebGLRenderTarget: .minFilter is now .texture.minFilter."),this.texture.minFilter=t}},anisotropy:{get:function(){return console.warn("THREE.WebGLRenderTarget: .anisotropy is now .texture.anisotropy."),this.texture.anisotropy},set:function(t){console.warn("THREE.WebGLRenderTarget: .anisotropy is now .texture.anisotropy."),this.texture.anisotropy=t}},offset:{get:function(){return console.warn("THREE.WebGLRenderTarget: .offset is now .texture.offset."),this.texture.offset},set:function(t){console.warn("THREE.WebGLRenderTarget: .offset is now .texture.offset."),this.texture.offset=t}},repeat:{get:function(){return console.warn("THREE.WebGLRenderTarget: .repeat is now .texture.repeat."),this.texture.repeat},set:function(t){console.warn("THREE.WebGLRenderTarget: .repeat is now .texture.repeat."),this.texture.repeat=t}},format:{get:function(){return console.warn("THREE.WebGLRenderTarget: .format is now .texture.format."),this.texture.format},set:function(t){console.warn("THREE.WebGLRenderTarget: .format is now .texture.format."),this.texture.format=t}},type:{get:function(){return console.warn("THREE.WebGLRenderTarget: .type is now .texture.type."),this.texture.type},set:function(t){console.warn("THREE.WebGLRenderTarget: .type is now .texture.type."),this.texture.type=t}},generateMipmaps:{get:function(){return console.warn("THREE.WebGLRenderTarget: .generateMipmaps is now .texture.generateMipmaps."),this.texture.generateMipmaps},set:function(t){console.warn("THREE.WebGLRenderTarget: .generateMipmaps is now .texture.generateMipmaps."),this.texture.generateMipmaps=t}}}),Object.assign(dr.prototype,{load:function(t){console.warn("THREE.Audio: .load has been deprecated. Please use THREE.AudioLoader.");var e=this,n=new lr;return n.load(t,function(t){e.setBuffer(t)}),this}}),Object.assign(vr.prototype,{getData:function(t){return console.warn("THREE.AudioAnalyser: .getData() is now .getFrequencyData()."),this.getFrequencyData()}});var $c={merge:function(t,e,n){console.warn("THREE.GeometryUtils: .merge() has been moved to Geometry. Use geometry.merge( geometry2, matrix, materialIndexOffset ) instead.");var r;e.isMesh&&(e.matrixAutoUpdate&&e.updateMatrix(),r=e.matrix,e=e.geometry),t.merge(e,r,n)},center:function(t){return console.warn("THREE.GeometryUtils: .center() has been moved to Geometry. Use geometry.center() instead."),t.center()}},Kc={crossOrigin:void 0,loadTexture:function(t,e,n,r){console.warn("THREE.ImageUtils.loadTexture has been deprecated. Use THREE.TextureLoader() instead.");var i=new bn;i.setCrossOrigin(this.crossOrigin);var o=i.load(t,n,void 0,r);return e&&(o.mapping=e),o},loadTextureCube:function(t,e,n,r){console.warn("THREE.ImageUtils.loadTextureCube has been deprecated. Use THREE.CubeTextureLoader() instead.");var i=new wn;i.setCrossOrigin(this.crossOrigin);var o=i.load(t,n,void 0,r);return e&&(o.mapping=e),o},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.")}};Object.defineProperty(t,"AudioContext",{get:function(){return t.getAudioContext()}}),t.WebGLRenderTargetCube=s,t.WebGLRenderTarget=a,t.WebGLRenderer=ce,t.ShaderLib=Nc,t.UniformsLib=Uc,t.ShaderChunk=Oc,t.FogExp2=ue,t.Fog=le,t.Scene=he,t.LensFlare=fe,t.Sprite=de,t.LOD=me,t.SkinnedMesh=xe,t.Skeleton=ge,t.Bone=ye,t.Mesh=Pt,t.LineSegments=be,t.Line=we,t.Points=Ee,t.Group=Se,t.VideoTexture=Te,t.DataTexture=ve,t.CompressedTexture=Ae,t.CubeTexture=h,t.CanvasTexture=Le,t.DepthTexture=Ce,t.TextureIdCount=i,t.Texture=r,t.MaterialIdCount=$,t.CompressedTextureLoader=yn,t.BinaryTextureLoader=xn,t.DataTextureLoader=Gc,t.CubeTextureLoader=wn,t.TextureLoader=bn,t.ObjectLoader=Jn,t.MaterialLoader=Xn,t.BufferGeometryLoader=qn,t.LoadingManager=vn,t.JSONLoader=Zn,t.ImageLoader=_n,t.FontLoader=cr,t.XHRLoader=gn,t.Loader=Yn,t.AudioLoader=lr,t.SpotLightShadow=Tn,t.SpotLight=An,t.PointLight=Ln,t.HemisphereLight=En,t.DirectionalLightShadow=Cn,t.DirectionalLight=Pn,t.AmbientLight=Rn,t.LightShadow=Sn,t.Light=Mn,t.StereoCamera=hr,t.PerspectiveCamera=Ut,t.OrthographicCamera=Nt,t.CubeCamera=fr,t.Camera=Ot,t.AudioListener=pr,t.PositionalAudio=mr,t.getAudioContext=ur,t.AudioAnalyser=vr,t.Audio=dr,t.VectorKeyframeTrack=Dn,t.StringKeyframeTrack=jn,t.QuaternionKeyframeTrack=Bn,t.NumberKeyframeTrack=kn,t.ColorKeyframeTrack=Vn,t.BooleanKeyframeTrack=Gn,t.PropertyMixer=gr,t.PropertyBinding=yr,t.KeyframeTrack=Hn,t.AnimationObjectGroup=xr,t.AnimationMixer=wr,t.AnimationClip=Wn,t.Uniform=br,t.InstancedBufferGeometry=Mr,t.BufferGeometry=Ct,t.GeometryIdCount=At,t.Geometry=Tt,t.InterleavedBufferAttribute=Er,t.InstancedInterleavedBuffer=Tr,t.InterleavedBuffer=Sr,t.InstancedBufferAttribute=Ar,t.DynamicBufferAttribute=St,t.Float64Attribute=Et,t.Float32Attribute=Mt,t.Uint32Attribute=bt,t.Int32Attribute=wt,t.Uint16Attribute=_t,t.Int16Attribute=xt,t.Uint8ClampedAttribute=yt,t.Uint8Attribute=gt,t.Int8Attribute=vt,t.BufferAttribute=mt,t.Face3=pt,t.Object3DIdCount=lt,t.Object3D=ut,t.Raycaster=Lr,t.Layers=ct,t.EventDispatcher=e,t.Clock=Rr,t.QuaternionLinearInterpolant=zn,t.LinearInterpolant=Un,t.DiscreteInterpolant=Nn,t.CubicInterpolant=On,t.Interpolant=In,t.Triangle=ft,t.Spline=Ir,t.Spherical=Or,t.Plane=rt,t.Frustum=it,t.Sphere=et,t.Ray=at,t.Matrix4=l,t.Matrix3=nt,t.Box3=tt,t.Box2=q,t.Line3=ht,t.Euler=st,t.Vector4=o,t.Vector3=u,t.Vector2=n,t.Quaternion=c,t.Color=X,t.MorphBlendMesh=Ur,t.ImmediateRenderObject=Nr,t.VertexNormalsHelper=Fr,t.SpotLightHelper=Dr,t.SkeletonHelper=zr,t.PointLightHelper=Br,t.HemisphereLightHelper=kr,t.GridHelper=jr,t.FaceNormalsHelper=Gr,t.DirectionalLightHelper=Vr,t.CameraHelper=Hr,t.BoundingBoxHelper=Wr,t.BoxHelper=Xr,t.ArrowHelper=qr,t.AxisHelper=Yr,t.ClosedSplineCurve3=Zr,t.SplineCurve3=Yc,t.ArcCurve=Jr,t.EllipseCurve=tr,t.SplineCurve=er,t.CubicBezierCurve=nr,t.QuadraticBezierCurve=rr,t.LineCurve=Kn,t.Shape=ir,t.ShapePath=ar,t.Path=or,t.Font=sr,t.CurvePath=Qn,t.Curve=$n,t.WireframeGeometry=Pe,t.ParametricGeometry=Re,t.TetrahedronGeometry=Oe,t.OctahedronGeometry=Ue,t.IcosahedronGeometry=Ne,t.DodecahedronGeometry=Fe,t.PolyhedronGeometry=Ie,t.TubeGeometry=De,t.TorusKnotGeometry=Be,t.TorusKnotBufferGeometry=ze,t.TorusGeometry=je,t.TorusBufferGeometry=ke,t.TextGeometry=Ve,t.SphereBufferGeometry=He,t.SphereGeometry=We,
  t.RingGeometry=qe,t.RingBufferGeometry=Xe,t.PlaneBufferGeometry=It,t.PlaneGeometry=Ye,t.LatheGeometry=Je,t.LatheBufferGeometry=Ze,t.ShapeGeometry=$e,t.ExtrudeGeometry=Ge,t.EdgesGeometry=Ke,t.ConeGeometry=en,t.ConeBufferGeometry=nn,t.CylinderGeometry=tn,t.CylinderBufferGeometry=Qe,t.CircleBufferGeometry=rn,t.CircleGeometry=on,t.BoxBufferGeometry=Rt,t.BoxGeometry=an,t.ShadowMaterial=sn,t.SpriteMaterial=pe,t.RawShaderMaterial=cn,t.ShaderMaterial=K,t.PointsMaterial=Me,t.MultiMaterial=un,t.MeshPhysicalMaterial=hn,t.MeshStandardMaterial=ln,t.MeshPhongMaterial=fn,t.MeshNormalMaterial=pn,t.MeshLambertMaterial=dn,t.MeshDepthMaterial=Q,t.MeshBasicMaterial=dt,t.LineDashedMaterial=mn,t.LineBasicMaterial=_e,t.Material=J,t.REVISION=ci,t.MOUSE=ui,t.CullFaceNone=li,t.CullFaceBack=hi,t.CullFaceFront=fi,t.CullFaceFrontBack=pi,t.FrontFaceDirectionCW=di,t.FrontFaceDirectionCCW=mi,t.BasicShadowMap=vi,t.PCFShadowMap=gi,t.PCFSoftShadowMap=yi,t.FrontSide=xi,t.BackSide=_i,t.DoubleSide=wi,t.FlatShading=bi,t.SmoothShading=Mi,t.NoColors=Ei,t.FaceColors=Si,t.VertexColors=Ti,t.NoBlending=Ai,t.NormalBlending=Li,t.AdditiveBlending=Ci,t.SubtractiveBlending=Pi,t.MultiplyBlending=Ri,t.CustomBlending=Ii,t.BlendingMode=Oi,t.AddEquation=Ui,t.SubtractEquation=Ni,t.ReverseSubtractEquation=Fi,t.MinEquation=Di,t.MaxEquation=zi,t.ZeroFactor=Bi,t.OneFactor=ki,t.SrcColorFactor=ji,t.OneMinusSrcColorFactor=Gi,t.SrcAlphaFactor=Vi,t.OneMinusSrcAlphaFactor=Hi,t.DstAlphaFactor=Wi,t.OneMinusDstAlphaFactor=Xi,t.DstColorFactor=qi,t.OneMinusDstColorFactor=Yi,t.SrcAlphaSaturateFactor=Zi,t.NeverDepth=Ji,t.AlwaysDepth=$i,t.LessDepth=Ki,t.LessEqualDepth=Qi,t.EqualDepth=to,t.GreaterEqualDepth=eo,t.GreaterDepth=no,t.NotEqualDepth=ro,t.MultiplyOperation=io,t.MixOperation=oo,t.AddOperation=ao,t.NoToneMapping=so,t.LinearToneMapping=co,t.ReinhardToneMapping=uo,t.Uncharted2ToneMapping=lo,t.CineonToneMapping=ho,t.UVMapping=fo,t.CubeReflectionMapping=po,t.CubeRefractionMapping=mo,t.EquirectangularReflectionMapping=vo,t.EquirectangularRefractionMapping=go,t.SphericalReflectionMapping=yo,t.CubeUVReflectionMapping=xo,t.CubeUVRefractionMapping=_o,t.TextureMapping=wo,t.RepeatWrapping=bo,t.ClampToEdgeWrapping=Mo,t.MirroredRepeatWrapping=Eo,t.TextureWrapping=So,t.NearestFilter=To,t.NearestMipMapNearestFilter=Ao,t.NearestMipMapLinearFilter=Lo,t.LinearFilter=Co,t.LinearMipMapNearestFilter=Po,t.LinearMipMapLinearFilter=Ro,t.TextureFilter=Io,t.UnsignedByteType=Oo,t.ByteType=Uo,t.ShortType=No,t.UnsignedShortType=Fo,t.IntType=Do,t.UnsignedIntType=zo,t.FloatType=Bo,t.HalfFloatType=ko,t.UnsignedShort4444Type=jo,t.UnsignedShort5551Type=Go,t.UnsignedShort565Type=Vo,t.UnsignedInt248Type=Ho,t.AlphaFormat=Wo,t.RGBFormat=Xo,t.RGBAFormat=qo,t.LuminanceFormat=Yo,t.LuminanceAlphaFormat=Zo,t.RGBEFormat=Jo,t.DepthFormat=$o,t.DepthStencilFormat=Ko,t.RGB_S3TC_DXT1_Format=Qo,t.RGBA_S3TC_DXT1_Format=ta,t.RGBA_S3TC_DXT3_Format=ea,t.RGBA_S3TC_DXT5_Format=na,t.RGB_PVRTC_4BPPV1_Format=ra,t.RGB_PVRTC_2BPPV1_Format=ia,t.RGBA_PVRTC_4BPPV1_Format=oa,t.RGBA_PVRTC_2BPPV1_Format=aa,t.RGB_ETC1_Format=sa,t.LoopOnce=ca,t.LoopRepeat=ua,t.LoopPingPong=la,t.InterpolateDiscrete=ha,t.InterpolateLinear=fa,t.InterpolateSmooth=pa,t.ZeroCurvatureEnding=da,t.ZeroSlopeEnding=ma,t.WrapAroundEnding=va,t.TrianglesDrawMode=ga,t.TriangleStripDrawMode=ya,t.TriangleFanDrawMode=xa,t.LinearEncoding=_a,t.sRGBEncoding=wa,t.GammaEncoding=ba,t.RGBEEncoding=Ma,t.LogLuvEncoding=Ea,t.RGBM7Encoding=Sa,t.RGBM16Encoding=Ta,t.RGBDEncoding=Aa,t.BasicDepthPacking=La,t.RGBADepthPacking=Ca,t.CubeGeometry=an,t.Face4=$r,t.LineStrip=Zc,t.LinePieces=Jc,t.MeshFaceMaterial=un,t.PointCloud=Kr,t.Particle=de,t.ParticleSystem=Qr,t.PointCloudMaterial=ti,t.ParticleBasicMaterial=ei,t.ParticleSystemMaterial=ni,t.Vertex=ri,t.EdgesHelper=ii,t.WireframeHelper=oi,t.GeometryUtils=$c,t.ImageUtils=Kc,t.Projector=ai,t.CanvasRenderer=si,Object.defineProperty(t,"__esModule",{value:!0})})},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children=[],t.webpackPolyfill=1),t}}]);
  //# sourceMappingURL=bundle.js.map