!function(i){var n={};function r(e){if(n[e])return n[e].exports;var t=n[e]={i:e,l:!1,exports:{}};return i[e].call(t.exports,t,t.exports,r),t.l=!0,t.exports}r.m=i,r.c=n,r.d=function(e,t,i){r.o(e,t)||object.defineproperty(e,t,{enumerable:!0,get:i})},r.r=function(e){"undefined"!=typeof symbol&&symbol.tostringtag&&object.defineproperty(e,symbol.tostringtag,{value:"module"}),object.defineproperty(e,"__esmodule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esmodule)return t;var i=object.create(null);if(r.r(i),object.defineproperty(i,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var n in t)r.d(i,n,function(e){return t[e]}.bind(null,n));return i},r.n=function(e){var t=e&&e.__esmodule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return object.prototype.hasownproperty.call(e,t)},r.p="",r(r.s=59)}([function(e,h,u){"use strict";(function(e,t){u.d(h,"e",function(){return i}),u.d(h,"g",function(){return r}),u.d(h,"f",function(){return n}),u.d(h,"c",function(){return o}),u.d(h,"a",function(){return s}),u.d(h,"b",function(){return l}),u.d(h,"d",function(){return c}); /*! * version: 2.1.3 * date: 2019-05-17 * updates and docs at: http://greensock.com * */ var i="undefined"!=typeof window?window:e.exports&&void 0!==t?t:{},n=function(u){var d={},n=u.document,p=u.greensockglobals=u.greensockglobals||u;if(p.tweenlite)return p.tweenlite;var e,t,i,f,m,r,a,v=function(e){var t,i=e.split("."),n=p;for(t=0;t=i&&ethis._duration?this._duration:e,t)):this._time},i.totaltime=function(e,t,i){if(m||f.wake(),!arguments.length)return this._totaltime;if(this._timeline){if(e<0&&!i&&(e+=this.totalduration()),this._timeline.smoothchildtiming){this._dirty&&this.totalduration();var n=this._totalduration,r=this._timeline;if(na;)r=r._prev;return r?(e._next=r._next,r._next=e):(e._next=this._first,this._first=e),e._next?e._next._prev=e:this._last=e,e._prev=r,this._recent=e,this._timeline&&this._uncache(!0),this},i._remove=function(e,t){return e.timeline===this&&(t||e._enabled(!1,!0),e._prev?e._prev._next=e._next:this._first===e&&(this._first=e._next),e._next?e._next._prev=e._prev:this._last===e&&(this._last=e._prev),e._next=e._prev=e.timeline=null,e===this._recent&&(this._recent=this._last),this._timeline&&this._uncache(!0)),this},i.render=function(e,t,i){var n,r=this._first;for(this._totaltime=this._time=this._rawprevtime=e;r;)n=r._next,(r._active||e>=r._starttime&&!r._paused&&!r._gc)&&(r._reversed?r.render((r._dirty?r.totalduration():r._totalduration)-(e-r._starttime)*r._timescale,t,i):r.render((e-r._starttime)*r._timescale,t,i)),r=n},i.rawtime=function(){return m||f.wake(),this._totaltime};var i=t("tweenlite",function(e,t,i){if(h.call(this,t,i),this.render=i.prototype.render,null==e)throw"cannot tween a null target.";this.target=e="string"!=typeof e?e:i.selector(e)||e;var n,r,a,o=e.jquery||e.length&&e!==u&&e[0]&&(e[0]===u||e[0].nodetype&&e[0].style&&!e.nodetype),s=this.vars.overwrite;if(this._overwrite=s=null==s?y[i.defaultoverwrite]:"number"==typeof s?s>>0:y[s],(o||e instanceof array||e.push&&b(e))&&"number"!=typeof e[0])for(this._targets=a=l(e),this._proplookup=[],this._siblings=[],n=0;n=j){for(i in j=f.frame+(parseint(i.autosleep,10)||120),w){for(e=(t=w[i].tweens).length;-1<--e;)t[e]._gc&&t.splice(e,1);0===t.length&&delete w[i]}if((!(i=z._first)||i._paused)&&i.autosleep&&!$._first&&1===f._listeners.tick.length){for(;i&&i._paused;)i=i._next;i||f.sleep()}}},f.addeventlistener("tick",h._updateroot);var k=function(e,t,i){var n,r,a=e._gstweenid;if(w[a||(e._gstweenid=a="t"+q++)]||(w[a]={target:e,tweens:[]}),t&&((n=w[a].tweens)[r=n.length]=t,i))for(;-1<--r;)n[r]===t&&n.splice(r,1);return w[a].tweens},ee=function(e,t,i,n){var r,a,o=e.vars.onoverwrite;return o&&(r=o(e,t,i,n)),(o=i.onoverwrite)&&(a=o(e,t,i,n)),!1!==r&&!1!==a},te=function(e,t,i,n,r){var a,o,s,l;if(1===n||4<=n){for(l=r.length,a=0;ah&&((p||!s._initted)&&h-s._starttime<=2*y||(u[d++]=s)));for(a=d;-1<--a;)if(l=(s=u[a])._firstpt,2===n&&s._kill(i,e,t)&&(o=!0),2!==n||!s._firstpt&&s._initted&&l){if(2!==n&&!ee(s,t))continue;s._enabled(!1,!1)&&(o=!0)}return o},ie=function(e,t,i){for(var n=e._timeline,r=n._timescale,a=e._starttime;n._timeline;){if(a+=n._starttime,r*=n._timescale,n._paused)return-100;n=n._timeline}return t<(a/=r)?a-t:i&&a===t||!e._initted&&a-t<2*y?y:(a+=e.totalduration()/e._timescale/r)>t+y?0:a-t-y};i._init=function(){var e,t,i,n,r,a,o=this.vars,s=this._overwrittenprops,l=this._duration,c=!!o.immediaterender,h=o.ease,u=this._startat;if(o.startat){for(n in u&&(u.render(-1,!0),u.kill()),r={},o.startat)r[n]=o.startat[n];if(r.data="isstart",r.overwrite=!1,r.immediaterender=!0,r.lazy=c&&!1!==o.lazy,r.startat=r.delay=null,r.onupdate=o.onupdate,r.onupdateparams=o.onupdateparams,r.onupdatescope=o.onupdatescope||o.callbackscope||this,this._startat=i.to(this.target||{},0,r),c)if(0s.pr;)n=n._next;(s._prev=n?n._prev:a)?s._prev._next=s:r=s,(s._next=n)?n._prev=s:a=s,s=o}s=t._firstpt=r}for(;s;)s.pg&&"function"==typeof s.t[e]&&s.t[e]()&&(i=!0),s=s._next;return i},ne.activate=function(e){for(var t=e.length;-1<--t;)e[t].api===ne.api&&(j[(new e[t])._propname]=e[t]);return!0},o.plugin=function(e){if(!(e&&e.propname&&e.init&&e.api))throw"illegal plugin definition.";var t,i=e.propname,n=e.priority||0,r=e.overwriteprops,a={init:"_oninittween",set:"setratio",kill:"_kill",round:"_mod",mod:"_mod",initall:"_oninitallprops"},o=t("plugins."+i.charat(0).touppercase()+i.substr(1)+"plugin",function(){ne.call(this,i,n),this._overwriteprops=r||[]},!0===e.global),s=o.prototype=new ne(i);for(t in(s.constructor=o).api=e.api,a)"function"==typeof e[t]&&(s[a[t]]=e[t]);return o.version=e.version,ne.activate([o]),o},e=u._gsqueue){for(t=0;t")){var s="div";for(0===o.indexof(":~]/)?(t||m).queryselectorall(e.trim()):[m.getelementbyid(e.trim().split("#")[1])],n=0;ni.slides.length)break;n.push(i.slides.eq(a)[0])}else n.push(i.slides.eq(i.activeindex)[0]);for(t=0;t=t.size;u&&(t.visibleslides.push(s),t.visibleslidesindexes.push(o),n.eq(o).addclass(i.slidevisibleclass))}s.progress=r?-l:l}t.visibleslides=r(t.visibleslides)}},updateprogress:function(e){void 0===e&&(e=this&&this.translate||0);var t=this,i=t.params,n=t.maxtranslate()-t.mintranslate(),r=t.progress,a=t.isbeginning,o=t.isend,s=a,l=o;o=0===n?a=!(r=0):(r=(e-t.mintranslate())/n,a=r<=0,1<=r),ee.extend(t,{progress:r,isbeginning:a,isend:o}),(i.watchslidesprogress||i.watchslidesvisibility)&&t.updateslidesprogress(e),a&&!s&&t.emit("reachbeginning toedge"),o&&!l&&t.emit("reachend toedge"),(s&&!a||l&&!o)&&t.emit("fromedge"),t.emit("progress",r)},updateslidesclasses:function(){var e,t=this,i=t.slides,n=t.params,r=t.$wrapperel,a=t.activeindex,o=t.realindex,s=t.virtual&&n.virtual.enabled;i.removeclass(n.slideactiveclass+" "+n.slidenextclass+" "+n.slideprevclass+" "+n.slideduplicateactiveclass+" "+n.slideduplicatenextclass+" "+n.slideduplicateprevclass),(e=s?t.$wrapperel.find("."+n.slideclass+'[data-swiper-slide-index="'+a+'"]'):i.eq(a)).addclass(n.slideactiveclass),n.loop&&(e.hasclass(n.slideduplicateclass)?r.children("."+n.slideclass+":not(."+n.slideduplicateclass+')[data-swiper-slide-index="'+o+'"]').addclass(n.slideduplicateactiveclass):r.children("."+n.slideclass+"."+n.slideduplicateclass+'[data-swiper-slide-index="'+o+'"]').addclass(n.slideduplicateactiveclass));var l=e.nextall("."+n.slideclass).eq(0).addclass(n.slidenextclass);n.loop&&0===l.length&&(l=i.eq(0)).addclass(n.slidenextclass);var c=e.prevall("."+n.slideclass).eq(0).addclass(n.slideprevclass);n.loop&&0===c.length&&(c=i.eq(-1)).addclass(n.slideprevclass),n.loop&&(l.hasclass(n.slideduplicateclass)?r.children("."+n.slideclass+":not(."+n.slideduplicateclass+')[data-swiper-slide-index="'+l.attr("data-swiper-slide-index")+'"]').addclass(n.slideduplicatenextclass):r.children("."+n.slideclass+"."+n.slideduplicateclass+'[data-swiper-slide-index="'+l.attr("data-swiper-slide-index")+'"]').addclass(n.slideduplicatenextclass),c.hasclass(n.slideduplicateclass)?r.children("."+n.slideclass+":not(."+n.slideduplicateclass+')[data-swiper-slide-index="'+c.attr("data-swiper-slide-index")+'"]').addclass(n.slideduplicateprevclass):r.children("."+n.slideclass+"."+n.slideduplicateclass+'[data-swiper-slide-index="'+c.attr("data-swiper-slide-index")+'"]').addclass(n.slideduplicateprevclass))},updateactiveindex:function(e){var t,i=this,n=i.rtltranslate?i.translate:-i.translate,r=i.slidesgrid,a=i.snapgrid,o=i.params,s=i.activeindex,l=i.realindex,c=i.snapindex,h=e;if(void 0===h){for(var u=0;u=r[u]&&n=r[u]&&n=r[u]&&(h=u);o.normalizeslideindex&&(h<0||void 0===h)&&(h=0)}if((t=0<=a.indexof(n)?a.indexof(n):math.floor(h/o.slidespergroup))>=a.length&&(t=a.length-1),h!==s){var d=parseint(i.slides.eq(h).attr("data-swiper-slide-index")||h,10);ee.extend(i,{snapindex:t,realindex:d,previousindex:s,activeindex:h}),i.emit("activeindexchange"),i.emit("snapindexchange"),l!==d&&i.emit("realindexchange"),i.emit("slidechange")}else t!==c&&(i.snapindex=t,i.emit("snapindexchange"))},updateclickedslide:function(e){var t=this,i=t.params,n=r(e.target).closest("."+i.slideclass)[0],r=!1;if(n)for(var a=0;a=s.length&&(d=s.length-1),(h||o.initialslide||0)===(c||0)&&i&&r.emit("beforeslidechangestart");var p,f=-s[d];if(r.updateprogress(f),o.normalizeslideindex)for(var m=0;m=math.floor(100*l[m])&&(a=m);if(r.initialized&&a!==h){if(!r.allowslidenext&&fr.translate&&f>r.maxtranslate()&&(h||0)!==a)return!1}return p=ht.slides.length-t.loopedslides+r/2?(t.loopfix(),a=n.children("."+i.slideclass+'[data-swiper-slide-index="'+e+'"]:not(.'+i.slideduplicateclass+")").eq(0).index(),ee.nexttick(function(){t.slideto(a)})):t.slideto(a):a>t.slides.length-r?(t.loopfix(),a=n.children("."+i.slideclass+'[data-swiper-slide-index="'+e+'"]:not(.'+i.slideduplicateclass+")").eq(0).index(),ee.nexttick(function(){t.slideto(a)})):t.slideto(a)}else t.slideto(a)}},p={loopcreate:function(){var n=this,e=n.params,t=n.$wrapperel;t.children("."+e.slideclass+"."+e.slideduplicateclass).remove();var r=t.children("."+e.slideclass);if(e.loopfillgroupwithblank){var i=e.slidespergroup-r.length%e.slidespergroup;if(i!==e.slidespergroup){for(var a=0;ar.length&&(n.loopedslides=r.length);var s=[],l=[];r.each(function(e,t){var i=r(t);e=r.length-n.loopedslides&&s.push(t),i.attr("data-swiper-slide-index",e)});for(var c=0;c=r.length-a){e=-r.length+n+a,e+=a;var d=t.slideto(e,0,!1,!0);d&&0!==h&&t.settranslate((c?-t.translate:t.translate)-h)}t.allowslideprev=o,t.allowslidenext=s},loopdestroy:function(){var e=this.$wrapperel,t=this.params,i=this.slides;e.children("."+t.slideclass+"."+t.slideduplicateclass+",."+t.slideclass+"."+t.slideblankclass).remove(),i.removeattr("data-swiper-slide-index")}},f={setgrabcursor:function(e){if(!(te.touch||!this.params.simulatetouch||this.params.watchoverflow&&this.islocked)){var t=this.el;t.style.cursor="move",t.style.cursor=e?"-webkit-grabbing":"-webkit-grab",t.style.cursor=e?"-moz-grabbin":"-moz-grab",t.style.cursor=e?"grabbing":"grab"}},unsetgrabcursor:function(){te.touch||this.params.watchoverflow&&this.islocked||(this.el.style.cursor="")}},v={appendslide:function(e){var t=this,i=t.$wrapperel,n=t.params;if(n.loop&&t.loopdestroy(),"object"==typeof e&&"length"in e)for(var r=0;r=k.screen.width-c)){if(ee.extend(i,{istouched:!0,ismoved:!1,allowtouchcallbacks:!0,isscrolling:void 0,startmoving:void 0}),r.startx=o,r.starty=s,i.touchstarttime=ee.now(),t.allowclick=!0,t.updatesize(),t.swipedirection=void 0,0r.starty&&t.translate>=t.mintranslate())return i.istouched=!1,void(i.ismoved=!1)}else if(sr.startx&&t.translate>=t.mintranslate())return;if(i.istouchevent&&m.activeelement&&o.target===m.activeelement&&r(o.target).is(i.formelements))return i.ismoved=!0,void(t.allowclick=!1);if(i.allowtouchcallbacks&&t.emit("touchmove",o),!(o.targettouches&&1n.touchangle:90-c>n.touchangle)),i.isscrolling&&t.emit("touchmoveopposite",o),void 0===i.startmoving&&(r.currentx===r.startx&&r.currenty===r.starty||(i.startmoving=!0)),i.isscrolling)i.istouched=!1;else if(i.startmoving){t.allowclick=!1,o.preventdefault(),n.touchmovestoppropagation&&!n.nested&&o.stoppropagation(),i.ismoved||(n.loop&&t.loopfix(),i.starttranslate=t.gettranslate(),t.settransition(0),t.animating&&t.$wrapperel.trigger("webkittransitionend transitionend"),i.allowmomentumbounce=!1,!n.grabcursor||!0!==t.allowslidenext&&!0!==t.allowslideprev||t.setgrabcursor(!0),t.emit("sliderfirstmove",o)),t.emit("slidermove",o),i.ismoved=!0;var d=t.ishorizontal()?h:u;r.diff=d,d*=n.touchratio,a&&(d=-d),t.swipedirection=0t.mintranslate()?(p=!1,n.resistance&&(i.currenttranslate=t.mintranslate()-1+math.pow(-t.mintranslate()+i.starttranslate+d,f))):d<0&&i.currenttranslatei.starttranslate&&(i.currenttranslate=i.starttranslate),0n.threshold||i.allowthresholdmove))return void(i.currenttranslate=i.starttranslate);if(!i.allowthresholdmove)return i.allowthresholdmove=!0,r.startx=r.currentx,r.starty=r.currenty,i.currenttranslate=i.starttranslate,void(r.diff=t.ishorizontal()?r.currentx-r.startx:r.currenty-r.starty)}n.followfinger&&((n.freemode||n.watchslidesprogress||n.watchslidesvisibility)&&(t.updateactiveindex(),t.updateslidesclasses()),n.freemode&&(0===i.velocities.length&&i.velocities.push({position:r[t.ishorizontal()?"startx":"starty"],time:i.touchstarttime}),i.velocities.push({position:r[t.ishorizontal()?"currentx":"currenty"],time:ee.now()})),t.updateprogress(i.currenttranslate),t.settranslate(i.currenttranslate))}}}}else i.startmoving&&i.isscrolling&&t.emit("touchmoveopposite",o)}function b(e){var t=this,i=t.toucheventsdata,n=t.params,r=t.touches,a=t.rtltranslate,o=t.$wrapperel,s=t.slidesgrid,l=t.snapgrid,c=e;if(c.originalevent&&(c=c.originalevent),i.allowtouchcallbacks&&t.emit("touchend",c),i.allowtouchcallbacks=!1,!i.istouched)return i.ismoved&&n.grabcursor&&t.setgrabcursor(!1),i.ismoved=!1,void(i.startmoving=!1);n.grabcursor&&i.ismoved&&i.istouched&&(!0===t.allowslidenext||!0===t.allowslideprev)&&t.setgrabcursor(!1);var h,u=ee.now(),d=u-i.touchstarttime;if(t.allowclick&&(t.updateclickedslide(c),t.emit("tap",c),d<300&&300-t.maxtranslate())return void(t.slides.lengtht.mintranslate())n.freemodemomentumbounce?(x-t.mintranslate()>t&&(x=t.mintranslate()+t),b=t.mintranslate(),_=!0,i.allowmomentumbounce=!0):x=t.mintranslate(),n.loop&&n.centeredslides&&(w=!0);else if(n.freemodesticky){for(var m,s=0;s-x){m=s;break}x=-(x=math.abs(l[m]-x)=n.longswipesms)&&(t.updateprogress(),t.updateactiveindex(),t.updateslidesclasses())}else{for(var e=0,c=t.slidessizesgrid[0],p=0;p=s[p]&&h=s[p]&&(e=p,c=s[s.length-1]-s[s.length-2]);var a=(h-s[e])/c;if(d>n.longswipesms){if(!n.longswipes)return void t.slideto(t.activeindex);"next"===t.swipedirection&&(a>=n.longswipesratio?t.slideto(e+n.slidespergroup):t.slideto(e)),"prev"===t.swipedirection&&(a>1-n.longswipesratio?t.slideto(e+n.slidespergroup):t.slideto(e))}else{if(!n.shortswipes)return void t.slideto(t.activeindex);"next"===t.swipedirection&&t.slideto(e+n.slidespergroup),"prev"===t.swipedirection&&t.slideto(e)}}}function w(){var e=this,t=e.params,i=e.el;if(!i||0!==i.offsetwidth){t.breakpoints&&e.setbreakpoint();var n=e.allowslidenext,r=e.allowslideprev,a=e.snapgrid;if(e.allowslidenext=!0,e.allowslideprev=!0,e.updatesize(),e.updateslides(),t.freemode){var o=math.min(math.max(e.translate,e.maxtranslate()),e.mintranslate());e.settranslate(o),e.updateactiveindex(),e.updateslidesclasses(),t.autoheight&&e.updateautoheight()}else e.updateslidesclasses(),("auto"===t.slidesperview||1=k.innerwidth&&!t&&(t=r)}return t||"max"}}},checkoverflow:{checkoverflow:function(){var e=this,t=e.islocked;e.islocked=1===e.snapgrid.length,e.allowslidenext=!e.islocked,e.allowslideprev=!e.islocked,t!==e.islocked&&e.emit(e.islocked?"lock":"unlock"),t&&t!==e.islocked&&(e.isend=!1,e.navigation.update())}},classes:{addclasses:function(){var t=this.classnames,i=this.params,e=this.rtl,n=this.$el,r=[];r.push("initialized"),r.push(i.direction),i.freemode&&r.push("free-mode"),te.flexbox||r.push("no-flexbox"),i.autoheight&&r.push("autoheight"),e&&r.push("rtl"),1'+e+"");return r.attr("data-swiper-slide-index")||r.attr("data-swiper-slide-index",t),n.cache&&(i.virtual.cache[t]=r),r},appendslide:function(e){if("object"==typeof e&&"length"in e)for(var t=0;tmath.abs(o.pixely)))return!0;r=o.pixelx*a}else{if(!(math.abs(o.pixely)>math.abs(o.pixelx)))return!0;r=o.pixely}else r=math.abs(o.pixelx)>math.abs(o.pixely)?-o.pixelx*a:-o.pixely;if(0===r)return!0;if(n.invert&&(r=-r),i.params.freemode){i.params.loop&&i.loopfix();var s=i.gettranslate()+r*n.sensitivity,l=i.isbeginning,c=i.isend;if(s>=i.mintranslate()&&(s=i.mintranslate()),s<=i.maxtranslate()&&(s=i.maxtranslate()),i.settransition(0),i.settranslate(s),i.updateprogress(),i.updateactiveindex(),i.updateslidesclasses(),(!l&&i.isbeginning||!c&&i.isend)&&i.updateslidesclasses(),i.params.freemodesticky&&(cleartimeout(i.mousewheel.timeout),i.mousewheel.timeout=ee.nexttick(function(){i.slidetoclosest()},300)),i.emit("scroll",t),i.params.autoplay&&i.params.autoplaydisableoninteraction&&i.autoplay.stop(),s===i.mintranslate()||s===i.maxtranslate())return!0}else{if(60i-1-2*e.loopedslides&&(a-=i-2*e.loopedslides),o-1r.dynamicmainbullets-1?e.pagination.dynamicbulletindex=r.dynamicmainbullets-1:e.pagination.dynamicbulletindex<0&&(e.pagination.dynamicbulletindex=0)),s=a-e.pagination.dynamicbulletindex,l=s+(math.min(h.length,r.dynamicmainbullets)-1),c=(l+s)/2),h.removeclass(r.bulletactiveclass+" "+r.bulletactiveclass+"-next "+r.bulletactiveclass+"-next-next "+r.bulletactiveclass+"-prev "+r.bulletactiveclass+"-prev-prev "+r.bulletactiveclass+"-main"),1";n.html(r),e.pagination.bullets=n.find("."+t.bulletclass)}"fraction"===t.type&&(r=t.renderfraction?t.renderfraction.call(e,t.currentclass,t.totalclass):' / ',n.html(r)),"progressbar"===t.type&&(r=t.renderprogressbar?t.renderprogressbar.call(e,t.progressbarfillclass):'',n.html(r)),"custom"!==t.type&&e.emit("paginationrender",e.pagination.$el[0])}},init:function(){var i=this,e=i.params.pagination;if(e.el){var t=r(e.el);0!==t.length&&(i.params.uniquenavelements&&"string"==typeof e.el&&1'),r.append(a)),ee.extend(t,{$el:r,el:r[0],$dragel:a,dragel:a[0]}),n.draggable&&t.enabledraggable()}},destroy:function(){this.scrollbar.disabledraggable()}},v={settransform:function(e,t){var i=this.rtl,n=r(e),r=i?-1:1,a=n.attr("data-swiper-parallax")||"0",o=n.attr("data-swiper-parallax-x"),s=n.attr("data-swiper-parallax-y"),l=n.attr("data-swiper-parallax-scale"),c=n.attr("data-swiper-parallax-opacity");if(o||s?(o=o||"0",s=s||"0"):this.ishorizontal()?(o=a,s="0"):(s=a,o="0"),o=0<=o.indexof("%")?parseint(o,10)*t*r+"%":o*t*r+"px",s=0<=s.indexof("%")?parseint(s,10)*t+"%":s*t+"px",null!=c){var h=c-(c-1)*(1-math.abs(t));n[0].style.opacity=h}if(null==l)n.transform("translate3d("+o+", "+s+", 0px)");else{var u=l-(l-1)*(1-math.abs(t));n.transform("translate3d("+o+", "+s+", 0px) scale("+u+")")}},settranslate:function(){var n=this,e=n.$el,t=n.slides,r=n.progress,a=n.snapgrid;e.children("[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y]").each(function(e,t){n.parallax.settransform(t,r)}),t.each(function(e,t){var i=t.progress;1n.maxratio&&(i.scale=n.maxratio-1+math.pow(i.scale-n.maxratio+1,.5)),i.scaler.touchesstart.x))return void(r.istouched=!1);if(!t.ishorizontal()&&(math.floor(r.miny)===math.floor(r.starty)&&r.touchescurrent.yr.touchesstart.y))return void(r.istouched=!1)}e.preventdefault(),e.stoppropagation(),r.ismoved=!0,r.currentx=r.touchescurrent.x-r.touchesstart.x+r.startx,r.currenty=r.touchescurrent.y-r.touchesstart.y+r.starty,r.currentxr.maxx&&(r.currentx=r.maxx-1+math.pow(r.currentx-r.maxx+1,.8)),r.currentyr.maxy&&(r.currenty=r.maxy-1+math.pow(r.currenty-r.maxy+1,.8)),a.prevpositionx||(a.prevpositionx=r.touchescurrent.x),a.prevpositiony||(a.prevpositiony=r.touchescurrent.y),a.prevtime||(a.prevtime=date.now()),a.x=(r.touchescurrent.x-a.prevpositionx)/(date.now()-a.prevtime)/2,a.y=(r.touchescurrent.y-a.prevpositiony)/(date.now()-a.prevtime)/2,math.abs(r.touchescurrent.x-a.prevpositionx)<2&&(a.x=0),math.abs(r.touchescurrent.y-a.prevpositiony)<2&&(a.y=0),a.prevpositionx=r.touchescurrent.x,a.prevpositiony=r.touchescurrent.y,a.prevtime=date.now(),n.$imagewrapel.transform("translate3d("+r.currentx+"px, "+r.currenty+"px,0)")}}},ontouchend:function(){var e=this.zoom,t=e.gesture,i=e.image,n=e.velocity;if(t.$imageel&&0!==t.$imageel.length){if(!i.istouched||!i.ismoved)return i.istouched=!1,void(i.ismoved=!1);i.istouched=!1,i.ismoved=!1;var r=300,a=300,o=n.x*r,s=i.currentx+o,l=n.y*a,c=i.currenty+l;0!==n.x&&(r=math.abs((s-i.currentx)/n.x)),0!==n.y&&(a=math.abs((c-i.currenty)/n.y));var h=math.max(r,a);i.currentx=s,i.currenty=c;var u=i.width*e.scale,d=i.height*e.scale;i.minx=math.min(t.slidewidth/2-u/2,0),i.maxx=-i.minx,i.miny=math.min(t.slideheight/2-d/2,0),i.maxy=-i.miny,i.currentx=math.max(math.min(i.currentx,i.maxx),i.minx),i.currenty=math.max(math.min(i.currenty,i.maxy),i.miny),t.$imagewrapel.transition(h).transform("translate3d("+i.currentx+"px, "+i.currenty+"px,0)")}},ontransitionend:function(){var e=this.zoom,t=e.gesture;t.$slideel&&this.previousindex!==this.activeindex&&(t.$imageel.transform("translate3d(0,0,0) scale(1)"),t.$imagewrapel.transform("translate3d(0,0,0)"),e.scale=1,e.currentscale=1,t.$slideel=void 0,t.$imageel=void 0,t.$imagewrapel=void 0)},toggle:function(e){var t=this.zoom;t.scale&&1!==t.scale?t.out():t.in(e)},in:function(e){var t,i,n,r,a,o,s,l,c,h,u,d,p,f,m,v,g,y,x=this,b=x.zoom,w=x.params.zoom,_=b.gesture,t=b.image;_.$slideel||(_.$slideel=x.clickedslide?r(x.clickedslide):x.slides.eq(x.activeindex),_.$imageel=_.$slideel.find("img, svg, canvas"),_.$imagewrapel=_.$imageel.parent("."+w.containerclass)),_.$imageel&&0!==_.$imageel.length&&(_.$slideel.addclass(""+w.zoomedslideclass),i=void 0===t.touchesstart.x&&e?(t="touchend"===e.type?e.changedtouches[0].pagex:e.pagex,"touchend"===e.type?e.changedtouches[0].pagey:e.pagey):(t=t.touchesstart.x,t.touchesstart.y),b.scale=_.$imagewrapel.attr("data-swiper-zoom")||w.maxratio,b.currentscale=_.$imagewrapel.attr("data-swiper-zoom")||w.maxratio,e?(g=_.$slideel[0].offsetwidth,y=_.$slideel[0].offsetheight,n=_.$slideel.offset().left,r=_.$slideel.offset().top,a=n+g/2-t,o=r+y/2-i,c=_.$imageel[0].offsetwidth,h=_.$imageel[0].offsetheight,u=c*b.scale,d=h*b.scale,p=math.min(g/2-u/2,0),f=math.min(y/2-d/2,0),m=-p,v=-f,s=a*b.scale,l=o*b.scale,s>1]<=t?n=r:i=r;return i};return this.x=e,this.y=t,this.lastindex=e.length-1,this.interpolate=function(e){return e?(o=s(this.x,e),a=o-1,(e-this.x[a])*(this.y[o]-this.y[a])/(this.x[o]-this.x[a])+this.y[a]):0},this},getinterpolatefunction:function(e){var t=this;t.controller.spline||(t.controller.spline=t.params.loop?new q.linearspline(t.slidesgrid,e.slidesgrid):new q.linearspline(t.snapgrid,e.snapgrid))},settranslate:function(e,t){var i,n,r=this,a=r.controller.control;function o(e){var t=r.rtltranslate?-r.translate:r.translate;"slide"===r.params.controller.by&&(r.controller.getinterpolatefunction(e),n=-r.controller.spline.interpolate(-t)),n&&"container"!==r.params.controller.by||(i=(e.maxtranslate()-e.mintranslate())/(r.maxtranslate()-r.mintranslate()),n=(t-r.mintranslate())*i+e.mintranslate()),r.params.controller.inverse&&(n=e.maxtranslate()-n),e.updateprogress(n),e.settranslate(n,r),e.updateactiveindex(),e.updateslidesclasses()}if(array.isarray(a))for(var s=0;s'),n.append(e)),e.css({height:a+"px"})):0===(e=i.find(".swiper-cube-shadow")).length&&(e=r('
'),i.append(e)));for(var p=0;p'),f.append(t)),0===m.length&&(m=r('
'),f.append(m)),t.length&&(t[0].style.opacity=math.max(-y,0)),m.length&&(m[0].style.opacity=math.max(y,0))}}if(n.css({"-webkit-transform-origin":"50% 50% -"+l/2+"px","-moz-transform-origin":"50% 50% -"+l/2+"px","-ms-transform-origin":"50% 50% -"+l/2+"px","transform-origin":"50% 50% -"+l/2+"px"}),c.shadow)if(h)e.transform("translate3d(0px, "+(a/2+c.shadowoffset)+"px, "+-a/2+"px) rotatex(90deg) rotatez(0deg) scale("+c.shadowscale+")");else{var s=math.abs(d)-90*math.floor(math.abs(d)/90),e=1.5-(math.sin(2*s*math.pi/360)/2+math.cos(2*s*math.pi/360)/2),c=c.shadowscale,p=c.shadowscale/e,a=c.shadowoffset;e.transform("scale3d("+c+", 1, "+p+") translate3d(0px, "+(o/2+a)+"px, "+-o/2/p+"px) rotatex(-90deg)")}var l=o.issafari||o.isuiwebview?-l/2:0;n.transform("translate3d(0px,0,"+l+"px) rotatex("+(t.ishorizontal()?0:d)+"deg) rotatey("+(t.ishorizontal()?-d:0)+"deg)")},settransition:function(e){var t=this.$el,i=this.slides;i.transition(e).find(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").transition(e),this.params.cubeeffect.shadow&&!this.ishorizontal()&&t.find(".swiper-cube-shadow").transition(e)}},ne={settranslate:function(){for(var e=this,t=e.slides,i=e.rtltranslate,n=0;n'),r.append(d)),0===p.length&&(p=r('
'),r.append(p)),d.length&&(d[0].style.opacity=math.max(-a,0)),p.length&&(p[0].style.opacity=math.max(a,0))}r.transform("translate3d("+h+"px, "+u+"px, 0px) rotatex("+c+"deg) rotatey("+l+"deg)")}},settransition:function(e){var i=this,t=i.slides,n=i.activeindex,r=i.$wrapperel;if(t.transition(e).find(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").transition(e),i.params.virtualtranslate&&0!==e){var a=!1;t.eq(n).transitionend(function(){if(!a&&i&&!i.destroyed){a=!0,i.animating=!1;for(var e=["webkittransitionend","transitionend"],t=0;t'),f.append(m)),0===s.length&&(s=r('
'),f.append(s)),m.length&&(m[0].style.opacity=0')}}),object.keys(y).foreach(function(e){t.a11y[e]=y[e].bind(t)})},on:{init:function(){this.params.a11y.enabled&&(this.a11y.init(),this.a11y.updatenavigation())},toedge:function(){this.params.a11y.enabled&&this.a11y.updatenavigation()},fromedge:function(){this.params.a11y.enabled&&this.a11y.updatenavigation()},paginationupdate:function(){this.params.a11y.enabled&&this.a11y.updatepagination()},destroy:function(){this.params.a11y.enabled&&this.a11y.destroy()}}},{name:"history",params:{history:{enabled:!1,replacestate:!1,key:"slides"}},create:function(){var e=this;ee.extend(e,{history:{init:$.init.bind(e),sethistory:$.sethistory.bind(e),sethistorypopstate:$.sethistorypopstate.bind(e),scrolltoslide:$.scrolltoslide.bind(e),destroy:$.destroy.bind(e)}})},on:{init:function(){this.params.history.enabled&&this.history.init()},destroy:function(){this.params.history.enabled&&this.history.destroy()},transitionend:function(){this.history.initialized&&this.history.sethistory(this.params.history.key,this.activeindex)}}},{name:"hash-navigation",params:{hashnavigation:{enabled:!1,replacestate:!1,watchstate:!1}},create:function(){var e=this;ee.extend(e,{hashnavigation:{initialized:!1,init:z.init.bind(e),destroy:z.destroy.bind(e),sethash:z.sethash.bind(e),onhashcange:z.onhashcange.bind(e)}})},on:{init:function(){this.params.hashnavigation.enabled&&this.hashnavigation.init()},destroy:function(){this.params.hashnavigation.enabled&&this.hashnavigation.destroy()},transitionend:function(){this.hashnavigation.initialized&&this.hashnavigation.sethash()}}},{name:"autoplay",params:{autoplay:{enabled:!1,delay:3e3,waitfortransition:!0,disableoninteraction:!0,stoponlastslide:!1,reversedirection:!1}},create:function(){var t=this;ee.extend(t,{autoplay:{running:!1,paused:!1,run:j.run.bind(t),start:j.start.bind(t),stop:j.stop.bind(t),pause:j.pause.bind(t),ontransitionend:function(e){t&&!t.destroyed&&t.$wrapperel&&e.target===this&&(t.$wrapperel[0].removeeventlistener("transitionend",t.autoplay.ontransitionend),t.$wrapperel[0].removeeventlistener("webkittransitionend",t.autoplay.ontransitionend),t.autoplay.paused=!1,t.autoplay.running?t.autoplay.run():t.autoplay.stop())}}})},on:{init:function(){this.params.autoplay.enabled&&this.autoplay.start()},beforetransitionstart:function(e,t){this.autoplay.running&&(t||!this.params.autoplay.disableoninteraction?this.autoplay.pause(e):this.autoplay.stop())},sliderfirstmove:function(){this.autoplay.running&&(this.params.autoplay.disableoninteraction?this.autoplay.stop():this.autoplay.pause())},destroy:function(){this.autoplay.running&&this.autoplay.stop()}}},{name:"effect-fade",params:{fadeeffect:{crossfade:!1}},create:function(){ee.extend(this,{fadeeffect:{settranslate:q.settranslate.bind(this),settransition:q.settransition.bind(this)}})},on:{beforeinit:function(){var e=this;if("fade"===e.params.effect){e.classnames.push(e.params.containermodifierclass+"fade");var t={slidesperview:1,slidespercolumn:1,slidespergroup:1,watchslidesprogress:!0,spacebetween:0,virtualtranslate:!0};ee.extend(e.params,t),ee.extend(e.originalparams,t)}},settranslate:function(){"fade"===this.params.effect&&this.fadeeffect.settranslate()},settransition:function(e){"fade"===this.params.effect&&this.fadeeffect.settransition(e)}}},{name:"effect-cube",params:{cubeeffect:{slideshadows:!0,shadow:!0,shadowoffset:20,shadowscale:.94}},create:function(){ee.extend(this,{cubeeffect:{settranslate:ie.settranslate.bind(this),settransition:ie.settransition.bind(this)}})},on:{beforeinit:function(){var e=this;if("cube"===e.params.effect){e.classnames.push(e.params.containermodifierclass+"cube"),e.classnames.push(e.params.containermodifierclass+"3d");var t={slidesperview:1,slidespercolumn:1,slidespergroup:1,watchslidesprogress:!0,resistanceratio:0,spacebetween:0,centeredslides:!1,virtualtranslate:!0};ee.extend(e.params,t),ee.extend(e.originalparams,t)}},settranslate:function(){"cube"===this.params.effect&&this.cubeeffect.settranslate()},settransition:function(e){"cube"===this.params.effect&&this.cubeeffect.settransition(e)}}},{name:"effect-flip",params:{flipeffect:{slideshadows:!0,limitrotation:!0}},create:function(){ee.extend(this,{flipeffect:{settranslate:ne.settranslate.bind(this),settransition:ne.settransition.bind(this)}})},on:{beforeinit:function(){var e=this;if("flip"===e.params.effect){e.classnames.push(e.params.containermodifierclass+"flip"),e.classnames.push(e.params.containermodifierclass+"3d");var t={slidesperview:1,slidespercolumn:1,slidespergroup:1,watchslidesprogress:!0,spacebetween:0,virtualtranslate:!0};ee.extend(e.params,t),ee.extend(e.originalparams,t)}},settranslate:function(){"flip"===this.params.effect&&this.flipeffect.settranslate()},settransition:function(e){"flip"===this.params.effect&&this.flipeffect.settransition(e)}}},{name:"effect-coverflow",params:{coverfloweffect:{rotate:50,stretch:0,depth:100,modifier:1,slideshadows:!0}},create:function(){ee.extend(this,{coverfloweffect:{settranslate:re.settranslate.bind(this),settransition:re.settransition.bind(this)}})},on:{beforeinit:function(){var e=this;"coverflow"===e.params.effect&&(e.classnames.push(e.params.containermodifierclass+"coverflow"),e.classnames.push(e.params.containermodifierclass+"3d"),e.params.watchslidesprogress=!0,e.originalparams.watchslidesprogress=!0)},settranslate:function(){"coverflow"===this.params.effect&&this.coverfloweffect.settranslate()},settransition:function(e){"coverflow"===this.params.effect&&this.coverfloweffect.settransition(e)}}},{name:"thumbs",params:{thumbs:{swiper:null,slidethumbactiveclass:"swiper-slide-thumb-active",thumbscontainerclass:"swiper-container-thumbs"}},create:function(){ee.extend(this,{thumbs:{swiper:null,init:ae.init.bind(this),update:ae.update.bind(this),onthumbclick:ae.onthumbclick.bind(this)}})},on:{beforeinit:function(){var e=this.params,t=e.thumbs;t&&t.swiper&&(this.thumbs.init(),this.thumbs.update(!0))},slidechange:function(){this.thumbs.swiper&&this.thumbs.update()},update:function(){this.thumbs.swiper&&this.thumbs.update()},resize:function(){this.thumbs.swiper&&this.thumbs.update()},observerupdate:function(){this.thumbs.swiper&&this.thumbs.update()},settransition:function(e){var t=this.thumbs.swiper;t&&t.settransition(e)},beforedestroy:function(){var e=this.thumbs.swiper;e&&this.thumbs.swipercreated&&e&&e.destroy()}}}];return void 0===e.use&&(e.use=e.class.use,e.installmodule=e.class.installmodule),e.use(oe),e}()},function(i,n,e){var x,b,w;!function(e){var r=/iphone/i,a=/ipod/i,o=/ipad/i,s=/\bandroid(?:.+)mobile\b/i,l=/android/i,c=/\bandroid(?:.+)sd4930ur\b/i,h=/\bandroid(?:.+)(?:kf[a-z]{2,4})\b/i,u=/windows phone/i,d=/\bwindows(?:.+)arm\b/i,p=/blackberry/i,f=/bb10/i,m=/opera mini/i,v=/\b(crios|chrome)(?:.+)mobile/i,g=/mobile(?:.+)firefox\b/i;function y(e,t){return e.test(t)}function t(e){var t=e||("undefined"!=typeof navigator?navigator.useragent:""),i=t.split("[fban");void 0!==i[1]&&(t=i[0]),void 0!==(i=t.split("twitter"))[1]&&(t=i[0]);var n={apple:{phone:y(r,t)&&!y(u,t),ipod:y(a,t),tablet:!y(r,t)&&y(o,t)&&!y(u,t),device:(y(r,t)||y(a,t)||y(o,t))&&!y(u,t)},amazon:{phone:y(c,t),tablet:!y(c,t)&&y(h,t),device:y(c,t)||y(h,t)},android:{phone:!y(u,t)&&y(c,t)||!y(u,t)&&y(s,t),tablet:!y(u,t)&&!y(c,t)&&!y(s,t)&&(y(h,t)||y(l,t)),device:!y(u,t)&&(y(c,t)||y(h,t)||y(s,t)||y(l,t))||y(/\bokhttp\b/i,t)},windows:{phone:y(u,t),tablet:y(d,t),device:y(u,t)||y(d,t)},other:{blackberry:y(p,t),blackberry10:y(f,t),opera:y(m,t),firefox:y(g,t),chrome:y(v,t),device:y(p,t)||y(f,t)||y(m,t)||y(g,t)||y(v,t)}};return n.any=n.apple.device||n.android.device||n.windows.device||n.other.device,n.phone=n.apple.phone||n.android.phone||n.windows.phone,n.tablet=n.apple.tablet||n.android.tablet||n.windows.tablet,n}i.exports&&"undefined"==typeof window?i.exports=t:i.exports&&"undefined"!=typeof window?(i.exports=t(),i.exports.ismobile=t):(b=[],x=e.ismobile=t(),void 0===(w="function"==typeof x?x.apply(n,b):x)||(i.exports=w))}(this)},function(t,i,e){(function(){"use strict";function e(a){for(var e=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],o={speed:500,minduration:250,maxduration:1500,cancelonuseraction:!0,element:window,horizontal:!1,oncomplete:void 0,passive:!0,offset:0},t=object.keys(o),i=0;io.maxduration&&(d=o.maxduration);var p=date.now(),f=null,m=null,v={passive:o.passive};o.cancelonuseraction?(m=function(){g(),cancelanimationframe(f)},window.addeventlistener("keydown",m,v),window.addeventlistener("mousedown",m,v)):(m=function(e){e.preventdefault()},window.addeventlistener("scroll",m,v)),window.addeventlistener("wheel",m,v),window.addeventlistener("touchstart",m,v);var g=function(){window.removeeventlistener("wheel",m,v),window.removeeventlistener("touchstart",m,v),o.cancelonuseraction?(window.removeeventlistener("keydown",m,v),window.removeeventlistener("mousedown",m,v)):window.removeeventlistener("scroll",m,v)},y=function(){var e=date.now()-p,t=e/d-1,i=t*t*t+1,n=math.round(l+u*i),r=function(e){o.iswindow?o.horizontal?o.element.scrollto(e,c):o.element.scrollto(c,e):o.horizontal?o.element.scrollleft=e:o.element.scrolltop=e};e as of scrollmagic 2.0.0 you need to use 'new scrollmagic.controller()' to create a new controller instance. use 'new scrollmagic.scene()' to instance a scene.")};d.version="2.0.6",window.addeventlistener("mousewheel",function(){});var z="data-scrollmagic-pin-spacer";d.controller=function(e){var i,n,r="scrollmagic.controller",a="reverse",o=s.defaults,s=this,l=k.extend({},o,e),c=[],h=!1,u=0,d="paused",p=!0,f=0,m=!0,v=function(){0=e&&(array.prototype.splice.call(arguments,1,0,"("+r+") ->"),k.log.apply(window,arguments))};this._options=l;var m=function(e){if(e.length<=1)return e;var t=e.slice(0);return t.sort(function(e,t){return e.scrolloffset()>t.scrolloffset()?1:-1}),t};return this.addscene=function(e){if(k.type.array(e))e.foreach(function(e,t){s.addscene(e)});else if(e instanceof d.scene){if(e.controller()!==s)e.addto(s);else if(c.indexof(e)<0){for(var t in c.push(e),c=m(c),e.on("shift.controller_sort",function(){c=m(c)}),l.globalsceneoptions)e[t]&&e[t].call(e,l.globalsceneoptions[t]);t(3,"adding scene (now "+c.length+" total)")}}else t(1,"error: invalid argument supplied for '.addscene()'");return s},this.removescene=function(e){if(k.type.array(e))e.foreach(function(e,t){s.removescene(e)});else{var t=c.indexof(e);-1":"",i||""),a&&a.foreach(function(e,t){r&&r!==e.namespace||e.callback.call(d,new d.event(n,e.namespace,d,i))})}else y(1,"error: invalid event name supplied.");return d},d.on("change.internal",function(e){"loglevel"!==e.what&&"tweenchanges"!==e.what&&("triggerelement"===e.what?w():"reverse"===e.what&&d.update())}).on("shift.internal",function(e){t(),d.update()});var y=this._log=function(e,t){p.loglevel>=e&&(array.prototype.splice.call(arguments,1,0,"("+n+") ->"),k.log.apply(window,arguments))};this.addto=function(e){return e instanceof d.controller?l!=e&&(l&&l.removescene(d),l=e,m(),o(!0),w(!0),t(),l.info("container").addeventlistener("resize",_),e.addscene(d),d.trigger("add",{controller:l}),y(3,"added "+n+" to controller"),d.update()):y(1,"error: supplied argument of 'addto()' is not a valid scrollmagic controller"),d},this.enabled=function(e){return arguments.length?(a!=e&&(a=!!e,d.update(!0)),d):a},this.remove=function(){if(l){l.info("container").removeeventlistener("resize",_);var e=l;l=void 0,e.removescene(d),d.trigger("remove"),y(3,"removed "+n+" from controller")}return d},this.destroy=function(e){return d.trigger("destroy",{reset:e}),d.remove(),d.off("*.*"),y(3,"destroyed "+n+" (reset: "+(e?"true":"false")+")"),null},this.update=function(e){if(l)if(e)if(l.enabled()&&a){var t,i=l.info("scrollpos");t=0=s.start?1:0,d.trigger("update",{startpos:s.start,endpos:s.end,scrollpos:i}),d.progress(t)}else x&&f===h&&c(!0);else l.updatescene(d,!1);return d},this.refresh=function(){return o(),w(),d},this.progress=function(e){if(arguments.length){var t=!1,i=f,n=l?l.info("scrolldirection"):"paused",r=p.reverse||m<=e;if(0===p.duration?(t=m!=e,f=0==(m=e<1&&r?0:1)?c:h):e<0&&f!==c&&r?(f=c,t=!(m=0)):0<=e&&e<1&&r?(m=e,f=h,t=!0):1<=e&&f!==u?(m=1,f=u,t=!0):f!==h||r||c(),t){var a={progress:m,state:f,scrolldirection:n},o=f!=i,s=function(e){d.trigger(e,a)};o&&i!==h&&(s("enter"),s(i===c?"start":"end")),s("progress"),o&&f!==h&&(s(f===c?"start":"end"),s("leave"))}return d}return m};var x,b,t=function(){s={start:v+p.offset},l&&p.triggerelement&&(s.start-=l.info("size")*p.triggerhook),s.end=s.start+p.duration},o=function(e){if(i){var t="duration";s(t,i.call(d))&&!e&&(d.trigger("change",{what:t,newval:p[t]}),d.trigger("shift",{reason:t}))}},w=function(e){var t=0,i=p.triggerelement;if(l&&(i||0 cannot add scene option '"+e+"', because it already exists."):(n.defaults[e]=t,n.validate[e]=i,n&&n.shifts.push(e))},d.scene.extend=function(e){var t=this;d.scene=function(){return t.apply(this,arguments),this.$super=k.extend({},this),e.apply(this,arguments)||this},k.extend(d.scene,t),d.scene.prototype=t.prototype,d.scene.prototype.constructor=d.scene},d.event=function(e,t,i,n){for(var r in n=n||{})this[r]=n[r];return this.type=e,this.target=this.currenttarget=i,this.namespace=t||"",this.timestamp=this.timestamp=date.now(),this};var k=d._util=function(o){var i,e={},s=function(e){return parsefloat(e)||0},l=function(e){return e.currentstyle?e.currentstyle:o.getcomputedstyle(e)},n=function(e,t,i,n){if((t=t===document?o:t)===o)n=!1;else if(!f.domelement(t))return 0;e=e.charat(0).touppercase()+e.substr(1).tolowercase();var r=(i?t["offset"+e]||t["outer"+e]:t["client"+e]||t["inner"+e])||0;if(i&&n){var a=l(t);r+="height"===e?s(a.margintop)+s(a.marginbottom):s(a.marginleft)+s(a.marginright)}return r},c=function(e){return e.replace(/^[^a-z]+([a-z])/g,"$1").replace(/-([a-z])/g,function(e){return e[1].touppercase()})};e.extend=function(e){for(e=e||{},i=1;i error calling addindicators() due to missing plugin 'debug.addindicators'. please make sure to include plugins/debug.addindicators.js"),this},d.scene.prototype.removeindicators=function(){return d._util.log(1,"(scrollmagic.scene) -> error calling removeindicators() due to missing plugin 'debug.addindicators'. please make sure to include plugins/debug.addindicators.js"),this},d.scene.prototype.settween=function(){return d._util.log(1,"(scrollmagic.scene) -> error calling settween() due to missing plugin 'animation.gsap'. please make sure to include plugins/animation.gsap.js"),this},d.scene.prototype.removetween=function(){return d._util.log(1,"(scrollmagic.scene) -> error calling removetween() due to missing plugin 'animation.gsap'. please make sure to include plugins/animation.gsap.js"),this},d.scene.prototype.setvelocity=function(){return d._util.log(1,"(scrollmagic.scene) -> error calling setvelocity() due to missing plugin 'animation.velocity'. please make sure to include plugins/animation.velocity.js"),this},d.scene.prototype.removevelocity=function(){return d._util.log(1,"(scrollmagic.scene) -> error calling removevelocity() due to missing plugin 'animation.velocity'. please make sure to include plugins/animation.velocity.js"),this},d})?n.call(t,i,t,e):n)||(e.exports=r)},function(i,n,r){var a,o;!function(e,t){if(null===(typeof window!=="undefined"?window:null))throw new error("google-maps package can be used only in browser");void 0===(o="function"==typeof(a=function(){"use strict";var i=null,n=null,r=!1,a=[],o=[],s=null,l={url:"https://maps.googleapis.com/maps/api/js",key:null,libraries:[],client:null,channel:null,language:null,region:null};l.version="3.31",l.window_callback_name="__google_maps_api_provider_initializator__",l._googlemockapiobject={},l.load=function(e){null===n?!0===r?e&&a.push(e):(r=!0,window[l.window_callback_name]=function(){t(e)},l.createloader()):e&&e(n)},l.createloader=function(){(i=document.createelement("script")).type="text/javascript",i.src=l.createurl(),document.body.appendchild(i)},l.isloaded=function(){return null!==n},l.createurl=function(){var e=l.url;return e+="?callback="+l.window_callback_name,l.key&&(e+="&key="+l.key),0this.container.viewportbottom,this.isinviewport=this.topthis.container.viewporttop,this.isfullyinviewport=this.top>=this.container.viewporttop&&this.bottom<=this.container.viewportbottom||this.isaboveviewport&&this.isbelowviewport},destroy:function(){var e=this.container.watchers.indexof(this);this.container.watchers.splice(e,1);for(var t=0,i=b.length;tt.width||r.img.naturalheight>t.height?t.style.backgroundsize="contain":t.style.backgroundsize="auto"}):t.style.backgroundsize=e["object-fit"].replace("none","auto").replace("fill","100% 100%"),f(r.img,function(e){p(t,e.naturalwidth,e.naturalheight)})}function v(e,t){var i=!d&&!e;if(t=t||{},e=e||"img",r&&!t.skiptest||!l)return!1;"img"===e?e=document.getelementsbytagname("img"):"string"==typeof e?e=document.queryselectorall(e):"length"in e||(e=[e]);for(var n=0;n\n
'+n+'
\n
    \n ');var r=o[e].nextelementsibling.queryselector(".placeholder-select");if(!r.textcontent)for(var a=0;a"+s[c].textcontent+"")}document.addeventlistener("click",function(){for(var e=0;ee._starttime;l._timeline;)c&&l._timeline.smoothchildtiming?l.totaltime(l._totaltime,!0):l._gc&&l._enabled(!0,!1),l=l._timeline;return h},i.remove=function(e){if(e instanceof nt.a){this._remove(e,!1);var t=e._timeline=e.vars.useframes?nt.a._rootframestimeline:nt.a._roottimeline;return e._starttime=(e._paused?e._pausetime:t._time)-(e._reversed?e.totalduration()-e._totaltime:e._totaltime)/e._timescale,this}if(e instanceof array||e&&e.push&&u(e)){for(var i=e.length;-1<--i;)this.remove(e[i]);return this}return"string"==typeof e?this.removelabel(e):this.kill(null,e)},i._remove=function(e,t){return nt.c.prototype._remove.call(this,e,t),this._last?this._time>this.duration()&&(this._time=this._duration,this._totaltime=this._totalduration):this._time=this._totaltime=this._duration=this._totalduration=0,this},i.append=function(e,t){return this.add(e,this._parsetimeorlabel(null,t,!0,e))},i.insert=i.insertmultiple=function(e,t,i,n){return this.add(e,t||0,i,n)},i.appendmultiple=function(e,t,i,n){return this.add(e,this._parsetimeorlabel(null,t,!0,e),i,n)},i.addlabel=function(e,t){return this._labels[e]=this._parsetimeorlabel(t),this},i.addpause=function(e,t,i,n){var r=nt.f.delayedcall(0,a,i,n||this);return r.vars.oncomplete=r.vars.onreversecomplete=t,r.data="ispause",this._haspause=!0,this.add(r,e)},i.removelabel=function(e){return delete this._labels[e],this},i.getlabeltime=function(e){return null!=this._labels[e]?this._labels[e]:-1},i._parsetimeorlabel=function(e,t,i,n){var r,a;if(n instanceof nt.a&&n.timeline===this)this.remove(n);else if(n&&(n instanceof array||n.push&&u(n)))for(a=n.length;-1<--a;)n[a]instanceof nt.a&&n[a].timeline===this&&this.remove(n[a]);if(r="number"!=typeof e||t?99999999999=e&&!l;)n._duration||"ispause"===n.data&&0u._time;)l.render(l._reversed?l.totalduration()-(e-l._starttime)*l._timescale:(e-l._starttime)*l._timescale,t,i),l=l._prev;l=null,u.pause(),u._pausetime=h}n._reversed?n.render((n._dirty?n.totalduration():n._totalduration)-(e-n._starttime)*n._timescale,t,i):n.render((e-n._starttime)*n._timescale,t,i)}n=a}u._onupdate&&(t||(g.length&&y(),u._callback("onupdate"))),o&&(u._gc||f!==u._starttime&&m===u._timescale||(0===u._time||p>=u.totalduration())&&(r&&(g.length&&y(),u._timeline.autoremovechildren&&u._enabled(!1,!1),u._active=!1),!t&&u.vars[o]&&u._callback(o)))}},i._haspausedchild=function(){for(var e=this._first;e;){if(e._paused||e instanceof f&&e._haspausedchild())return!0;e=e._next}return!1},i.getchildren=function(e,t,i,n){n=n||-9999999999;for(var r=[],a=this._first,o=0;a;)a._starttime=i&&(r._starttime+=e),r=r._next;if(t)for(n in a)a[n]>=i&&(a[n]+=e);return this._uncache(!0)},i._kill=function(e,t){if(!e&&!t)return this._enabled(!1,!1);for(var i=t?this.gettweensof(t):this.getchildren(!0,!0,!1),n=i.length,r=!1;-1<--n;)i[n]._kill(e,t)&&(r=!0);return r},i.clear=function(e){var t=this.getchildren(!1,!0,!0),i=t.length;for(this._time=this._totaltime=0;-1<--i;)t[i]._enabled(!1,!1);return!1!==e&&(this._labels={}),this._uncache(!0)},i.invalidate=function(){for(var e=this._first;e;)e.invalidate(),e=e._next;return nt.a.prototype.invalidate.call(this)},i._enabled=function(e,t){if(e===this._gc)for(var i=this._first;i;)i._enabled(e,!0),i=i._next;return nt.c.prototype._enabled.call(this,e,t)},i.totaltime=function(e,t,i){this._forcingplayhead=!0;var n=nt.a.prototype.totaltime.apply(this,arguments);return this._forcingplayhead=!1,n},i.duration=function(e){return arguments.length?(0!==this.duration()&&0!==e&&this.timescale(this._duration/e),this):(this._dirty&&this.totalduration(),this._duration)},i.totalduration=function(e){if(arguments.length)return e&&this.totalduration()?this.timescale(this._totalduration/e):this;if(this._dirty){for(var t,i,n=0,r=this,a=r._last,o=999999999999;a;)t=a._prev,a._dirty&&a.totalduration(),a._starttime>o&&r._sortchildren&&!a._paused&&!r._calculatingduration?(r._calculatingduration=1,r.add(a,a._starttime-a._delay),r._calculatingduration=0):o=a._starttime,a._starttime<0&&!a._paused&&(n-=a._starttime,r._timeline.smoothchildtiming&&(r._starttime+=a._starttime/r._timescale,r._time-=a._starttime,r._totaltime-=a._starttime,r._rawprevtime-=a._starttime),r.shiftchildren(-a._starttime,!1,-9999999999),o=0),n<(i=a._starttime+a._totalduration/a._timescale)&&(n=i),a=t;r._duration=r._totalduration=n,r._dirty=!1}return this._totalduration},i.paused=function(e){if(!1===e&&this._paused)for(var t=this._first;t;)t._starttime===this._time&&"ispause"===t.data&&(t._rawprevtime=0),t=t._next;return nt.a.prototype.paused.apply(this,arguments)},i.usesframes=function(){for(var e=this._timeline;e._timeline;)e=e._timeline;return e===nt.a._rootframestimeline},i.rawtime=function(e){return e&&(this._paused||this._repeat&&0>0,d._cycle&&d._cycle===d._totaltime/l&&v<=e&&d._cycle--,d._time=d._totaltime-d._cycle*l,d._yoyo&&1&d._cycle&&(d._time=m-d._time),d._time>m?e=(d._time=m)+1e-4:d._time<0?d._time=e=0:e=d._time));if(d._haspause&&!d._forcingplayhead&&!t){if(p<(e=d._time)||d._repeat&&w!==d._cycle)for(n=d._first;n&&n._starttime<=e&&!c;)n._duration||"ispause"!==n.data||n.ratio||0===n._starttime&&0===d._rawprevtime||(c=n),n=n._next;else for(n=d._last;n&&n._starttime>=e&&!c;)n._duration||"ispause"===n.data&&0d._time;)c.render(c._reversed?c.totalduration()-(e-c._starttime)*c._timescale:(e-c._starttime)*c._timescale,t,i),c=c._prev;c=null,d.pause(),d._pausetime=u}n._reversed?n.render((n._dirty?n.totalduration():n._totalduration)-(e-n._starttime)*n._timescale,t,i):n.render((e-n._starttime)*n._timescale,t,i)}n=a}d._onupdate&&(t||(a.length&&l(),d._callback("onupdate"))),o&&(d._locked||d._gc||g!==d._starttime&&y===d._timescale||(0===d._time||f>=d.totalduration())&&(r&&(a.length&&l(),d._timeline.autoremovechildren&&d._enabled(!1,!1),d._active=!1),!t&&d.vars[o]&&d._callback(o)))}else v!==d._totaltime&&d._onupdate&&(t||d._callback("onupdate"))},i.getactive=function(e,t,i){var n,r,a=[],o=this.getchildren(e||null==e,t||null==e,!!i),s=0,l=o.length;for(n=0;ne)return i[t].name;return null},i.getlabelbefore=function(e){null==e&&(e=this._time);for(var t=this.getlabelsarray(),i=t.length;-1<--i;)if(t[i].time>0,0!==d._cycle&&d._cycle===d._totaltime/o&&m<=e&&d._cycle--,d._time=d._totaltime-d._cycle*o,d._yoyo&&0!=(1&d._cycle)&&(d._time=g-d._time,(u=d._yoyoease||d.vars.yoyoease)&&(d._yoyoease||(!0!==u||d._initted?d._yoyoease=u=!0===u?d._ease:u instanceof nt.b?u:nt.b.map[u]:(u=d.vars.ease,d._yoyoease=u=u?u instanceof nt.b?u:"function"==typeof u?new nt.b(u,d.vars.easeparams):nt.b.map[u]||nt.f.defaultease:nt.f.defaultease)),d.ratio=u?1-u.getratio((g-d._time)/g):0)),d._time>g?d._time=g:d._time<0&&(d._time=0)),d._easetype&&!u?(s=d._time/g,(1===(l=d._easetype)||3===l&&.5<=s)&&(s=1-s),3===l&&(s*=2),1===(c=d._easepower)?s*=s:2===c?s*=s*s:3===c?s*=s*s*s:4===c&&(s*=s*s*s*s),d.ratio=1===l?1-s:2===l?s:d._time/g<.5?s/2:1-s/2):u||(d.ratio=d._ease.getratio(d._time/g))),f!==d._time||i||v!==d._cycle){if(!d._initted){if(d._init(),!d._initted||d._gc)return;if(!i&&d._firstpt&&(!1!==d.vars.lazy&&d._duration||d.vars.lazy&&!d._duration))return d._time=f,d._totaltime=m,d._rawprevtime=y,d._cycle=v,b.lazytweens.push(d),void(d._lazy=[e,t]);!d._time||n||u?n&&this._ease._calcend&&!u&&(d.ratio=d._ease.getratio(0===d._time?0:1)):d.ratio=d._ease.getratio(d._time/g)}for(!1!==d._lazy&&(d._lazy=!1),d._active||!d._paused&&d._time!==f&&0<=e&&(d._active=!0),0===m&&(2===d._initted&&0>16,e>>8&255,255&e];else{if(","===e.charat(e.length-1)&&(e=e.substr(0,e.length-1)),pe[e])i=pe[e];else if("#"===e.charat(0))4===e.length&&(e="#"+(n=e.charat(1))+n+(r=e.charat(2))+r+(a=e.charat(3))+a),i=[(e=parseint(e.substr(1),16))>>16,e>>8&255,255&e];else if("hsl"===e.substr(0,3))if(i=d=e.match(l),t){if(-1!==e.indexof("="))return e.match(r)}else o=number(i[0])%360/360,s=number(i[1])/100,n=2*(l=number(i[2])/100)-(r=l<=.5?l*(s+1):l+s-l*s),3n--)for(;++nn--)for(;++n>0];return n.parse(e,o,r,a)}},be=(w._setpluginratio=function(e){this.plugin.setratio(e);for(var t,i,n,r,a,o=this.data,s=o.proxy,l=o.firstmpt;l;)t=s[l.v],l.r?t=l.r(t):t<1e-6&&-1e-6s.length?l.length:s.length,o=0;oa.pr;)o=o._next;(a._prev=o?o._prev:l)?a._prev._next=a:s=a,(a._next=o)?o._prev=a:l=a,a=c}this._firstpt=s}return!0},e.parse=function(e,t,i,n){var r,a,o,s,l,c,h,u,d,p,f=e.style;for(r in t){if(c=t[r],a=v[r],"function"!=typeof c||a&&a.allowfunc||(c=c(a,p)),a)i=a.parse(e,c,r,this,i,n,t);else{if("--"===r.substr(0,2)){this._tween._proplookup[r]=this._addtween.call(this._tween,e.style,"setproperty",ee(e).getpropertyvalue(r)+"",c+"",r,!1,r);continue}l=te(e,r,s)+"",d="string"==typeof c,"color"===r||"fill"===r||"stroke"===r||-1!==r.indexof("color")||d&&_.test(c)?(d||(c=(3<(c=me(c)).length?"rgba(":"rgb(")+c.join(",")+")"),i=te(f,r,l,c,!0,"transparent",i,0,n)):d&&n.test(c)?i=te(f,r,l,c,!0,null,i,0,n):(h=(o=parsefloat(l))||0===o?l.substr((o+"").length):"",""!==l&&"auto"!==l||(h="width"===r||"height"===r?(o=le(e,r,s),"px"):"left"===r||"top"===r?(o=ne(e,r,s),"px"):(o="opacity"!==r?0:1,"")),""===(u=(p=d&&"="===c.charat(1))?(s=parseint(c.charat(0)+"1",10),c=c.substr(2),s*=parsefloat(c),c.replace(o,"")):(s=parsefloat(c),d?c.replace(o,""):""))&&(u=r in m?m[r]:h),c=s||0===s?(p?s+o:s)+u:t[r],h!==u&&(""===u&&"lineheight"!==r||(s||0===s)&&o&&(o=ie(e,r,o,h),"%"===u?(o/=ie(e,r,100,"%")/100,!0!==t.strictunits&&(l=o+"%")):"em"===u||"rem"===u||"vw"===u||"vh"===u?o/=ie(e,r,1,u):"px"!==u&&(s=ie(e,r,s,u),u="px"),p&&(s||0===s)&&(c=s+o+u))),p&&(s+=o),!o&&0!==o||!s&&0!==s?void 0!==f[r]&&(c||c+""!="nan"&&null!=c)?(i=new we(f,r,s||o||0,0,i,-1,r,!1,0,l,c)).xs0="none"!==c||"display"!==r&&-1===r.indexof("style")?c:l:$("invalid "+r+" tween value: "+t[r]):(i=new we(f,r,o,s-o,i,0,r,!1!==c&&("px"===u||"zindex"===r),0,l,c)).xs0=u)}n&&i&&!i.plugin&&(i.plugin=n)}return i},e.setratio=function(e){var t,i,n,r=this._firstpt;if(1!==e||this._tween._time!==this._tween._duration&&0!==this._tween._time)if(e||this._tween._time!==this._tween._duration&&0!==this._tween._time||-1e-6===this._tween._rawprevtime)for(;r;){if(t=r.c*e+r.s,r.r?t=r.r(t):t<1e-6&&-1e-6>0||6)-1,u=[],d=[];for(i in e)p(e[i],o,t);for(r=o.length,n=0;n>0]=d,s[a]=c,l=0,d=[]);return{length:c,lengths:s,segments:u}}(this._beziers,this._timeres);this._length=d.length,this._lengths=d.lengths,this._segments=d.segments,this._l1=this._li=this._s1=this._si=0,this._l2=this._lengths[0],this._curseg=this._segments[0],this._s2=this._curseg[0],this._prec=1/this._curseg.length}if(u=this._autorotate)for(this._initialrotations=[],u[0]instanceof array||(this._autorotate=u=[u]),a=u.length;-1<--a;){for(o=0;o<3;o++)n=u[a][o],this._func[n]="function"==typeof e[n]&&e[n.indexof("set")||"function"!=typeof e["get"+n.substr(3)]?n:"get"+n.substr(3)];n=u[a][2],this._initialrotations[a]=(this._func[n]?this._func[n].call(this._target):this._target[n])||0,this._overwriteprops.push(n)}return this._startratio=i.vars.runbackwards?1:0,!0},set:function(e){var t,i,n,r,a,o,s,l,c,h,u,d=this._segcount,p=this._func,f=this._target,m=e!==this._startratio;if(this._timeres){if(c=this._lengths,h=this._curseg,u=e*this._length,n=this._li,u>this._l2&&n=u;);0===n&&uthis._s2&&n=u;);0===n&&u>0)*(1/d))*d;for(i=1-o,n=this._props.length;-1<--n;)r=this._props[n],s=(o*o*(a=this._beziers[r][t]).da+3*i*(o*a.ca+i*a.ba))*o+a.a,this._mod[r]&&(s=this._mod[r](s,f)),p[r]?f[r](s):f[r]=s;if(this._autorotate){var v,g,y,x,b,w,_,t=this._autorotate;for(n=t.length;-1<--n;)r=t[n][2],w=t[n][3]||0,_=!0===t[n][4]?1:m,a=this._beziers[t[n][0]],v=this._beziers[t[n][1]],a&&v&&(a=a[t],v=v[t],g=a.a+(a.b-a.a)*o,g+=((x=a.b+(a.c-a.b)*o)-g)*o,x+=(a.c+(a.d-a.c)*o-x)*o,y=v.a+(v.b-v.a)*o,y+=((b=v.b+(v.c-v.b)*o)-y)*o,b+=(v.c+(v.d-v.c)*o-b)*o,s=m?math.atan2(b-y,x-g)*_+w:this._initialrotations[n],this._mod[r]&&(s=this._mod[r](s,f)),p[r]?f[r](s):f[r]=s)}}}),l=a.prototype;a.bezierthrough=c,a.cubictoquadratic=s,a._autocss=!0,a.quadratictocubic=function(e,t,i){return new x(e,(2*t+e)/3,(2*t+i)/3,i)},a._cssregister=function(){var e=y.cssplugin;if(e){var t=e._internals,p=t._parsetoproxy,f=t._setpluginratio,m=t.cssproptween;t._registercomplexspecialprop("bezier",{parser:function(e,t,i,n,r,a){t instanceof array&&(t={values:t}),a=new a;var o,s,l,c=t.values,h=c.length-1,u=[],d={};if(h<0)return r;for(o=0;o<=h;o++)l=p(e,c[o],n,r,a,h!==o),u[o]=l.end;for(s in t)d[s]=t[s];return d.values=u,(r=new m(e,"bezier",0,0,l.pt,2)).data=l,r.plugin=a,r.setratio=f,0===d.autorotate&&(d.autorotate=!0),!d.autorotate||d.autorotate instanceof array||(o=!0===d.autorotate?0:number(d.autorotate),d.autorotate=null!=l.end.left?[["left","top","rotation",o,!1]]:null!=l.end.x&&[["x","y","rotation",o,!1]]),d.autorotate&&(n._transform||n._enabletransforms(!1),l.autorotate=n._target._gstransform,l.proxy.rotation=l.autorotate.rotation||0,n._overwriteprops.push("rotation")),a._oninittween(l.proxy,d,n._tween),r}})}},l._mod=function(e){for(var t,i=this._overwriteprops,n=i.length;-1<--n;)(t=e[i[n]])&&"function"==typeof t&&(this._mod[i[n]]=t)},l._kill=function(e){var t,i,n=this._props;for(t in this._beziers)if(t in e)for(delete this._beziers[t],delete this._func[t],i=n.length;-1<--i;)n[i]===t&&n.splice(i,1);if(n=this._autorotate)for(i=n.length;-1<--i;)e[n[i][2]]&&n.splice(i,1);return this._super._kill.call(this,e)}, /*! * version: 1.16.1 * date: 2018-08-27 * updates and docs at: http://greensock.com * **/ nt.e._gsdefine("easing.back",["easing.ease"],function(){var i,n,t,e,r=nt.e.greensockglobals||nt.e,a=r.com.greensock,o=2*math.pi,s=math.pi/2,l=a._class,c=function(e,t){var i=l("easing."+e,function(){},!0),n=i.prototype=new nt.b;return n.constructor=i,n.getratio=t,i},h=nt.b.register||function(){},u=function(e,t,i,n,r){var a=l("easing."+e,{easeout:new t,easein:new i,easeinout:new n},!0);return h(a,e),a},v=function(e,t,i){this.t=e,this.v=t,i&&(((this.next=i).prev=this).c=i.v-t,this.gap=i.t-e)},d=function(e,t){var i=l("easing."+e,function(e){this._p1=e||0===e?e:1.70158,this._p2=1.525*this._p1},!0),n=i.prototype=new nt.b;return n.constructor=i,n.getratio=t,n.config=function(e){return new i(e)},i},p=u("back",d("backout",function(e){return(e-=1)*e*((this._p1+1)*e+this._p1)+1}),d("backin",function(e){return e*e*((this._p1+1)*e-this._p1)}),d("backinout",function(e){return(e*=2)<1?.5*e*e*((this._p2+1)*e-this._p2):.5*((e-=2)*e*((this._p2+1)*e+this._p2)+2)})),f=l("easing.slowmo",function(e,t,i){t=t||0===t?t:.7,null==e?e=.7:1this._p3?this._calcend?1===e?0:1-(e=(e-this._p3)/this._p1)*e:t+(e-t)*(e=(e-this._p3)/this._p1)*e*e*e:this._calcend?1:t},f.ease=new f(.7,.7),m.config=f.config=function(e,t,i){return new f(e,t,i)},(m=(i=l("easing.steppedease",function(e,t){e=e||1,this._p1=1/e,this._p2=e+(t?0:1),this._p3=t?1:0},!0)).prototype=new nt.b).constructor=i,m.getratio=function(e){return e<0?e=0:1<=e&&(e=.999999999),((this._p2*e|0)+this._p3)*this._p1},m.config=i.config=function(e,t){return new i(e,t)},(m=(n=l("easing.exposcaleease",function(e,t,i){this._p1=math.log(t/e),this._p2=t-e,this._p3=e,this._ease=i},!0)).prototype=new nt.b).constructor=n,m.getratio=function(e){return this._ease&&(e=this._ease.getratio(e)),(this._p3*math.exp(this._p1*e)-this._p3)/this._p2},m.config=n.config=function(e,t,i){return new n(e,t,i)},(m=(t=l("easing.roughease",function(e){for(var t,i,n,r,a,o,s=(e=e||{}).taper||"none",l=[],c=0,h=0|(e.points||20),u=h,d=!1!==e.randomize,p=!0===e.clamp,f=e.template instanceof nt.b?e.template:null,m="number"==typeof e.strength?.4*e.strength:.4;-1<--u;)t=d?math.random():1/h*u,i=f?f.getratio(t):t,n="none"===s?m:"out"===s?(r=1-t)*r*m:"in"===s?t*t*m:t<.5?(r=2*t)*r*.5*m:(r=2*(1-t))*r*.5*m,d?i+=math.random()*n-.5*n:u%2?i+=.5*n:i-=.5*n,p&&(1t.t){for(;t.next&&e>=t.t;)t=t.next;t=t.prev}else for(;t.prev&&e<=t.t;)t=t.prev;return(this._prev=t).v+(e-t.t)/t.gap*t.c},m.config=function(e){return new t(e)},t.ease=new t,u("bounce",c("bounceout",function(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375}),c("bouncein",function(e){return(e=1-e)<1/2.75?1-7.5625*e*e:e<2/2.75?1-(7.5625*(e-=1.5/2.75)*e+.75):e<2.5/2.75?1-(7.5625*(e-=2.25/2.75)*e+.9375):1-(7.5625*(e-=2.625/2.75)*e+.984375)}),c("bounceinout",function(e){var t=e<.5;return(e=t?1-2*e:2*e-1)<1/2.75?e*=7.5625*e:e=e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375,t?.5*(1-e):.5*e+.5})),u("circ",c("circout",function(e){return math.sqrt(1-(e-=1)*e)}),c("circin",function(e){return-(math.sqrt(1-e*e)-1)}),c("circinout",function(e){return(e*=2)<1?-.5*(math.sqrt(1-e*e)-1):.5*(math.sqrt(1-(e-=2)*e)+1)})),u("elastic",(e=function(e,t,i){var n=l("easing."+e,function(e,t){this._p1=1<=e?e:1,this._p2=(t||i)/(e<1?e:1),this._p3=this._p2/o*(math.asin(1/this._p1)||0),this._p2=o/this._p2},!0),r=n.prototype=new nt.b;return r.constructor=n,r.getratio=t,r.config=function(e,t){return new n(e,t)},n})("elasticout",function(e){return this._p1*math.pow(2,-10*e)*math.sin((e-this._p3)*this._p2)+1},.3),e("elasticin",function(e){return-this._p1*math.pow(2,10*(e-=1))*math.sin((e-this._p3)*this._p2)},.3),e("elasticinout",function(e){return(e*=2)<1?this._p1*math.pow(2,10*(e-=1))*math.sin((e-this._p3)*this._p2)*-.5:this._p1*math.pow(2,-10*(e-=1))*math.sin((e-this._p3)*this._p2)*.5+1},.45)),u("expo",c("expoout",function(e){return 1-math.pow(2,-10*e)}),c("expoin",function(e){return math.pow(2,10*(e-1))-.001}),c("expoinout",function(e){return(e*=2)<1?.5*math.pow(2,10*(e-1)):.5*(2-math.pow(2,-10*(e-1)))})),u("sine",c("sineout",function(e){return math.sin(e*s)}),c("sinein",function(e){return 1-math.cos(e*s)}),c("sineinout",function(e){return-.5*(math.cos(math.pi*e)-1)})),l("easing.easelookup",{find:function(e){return nt.b.map[e]}},!0),h(r.slowmo,"slowmo","ease,"),h(t,"roughease","ease,"),h(i,"steppedease","ease,"),p},!0);var r=nt.g.back,o=nt.g.elastic,i=nt.g.bounce,d=nt.g.roughease,z=nt.g.slowmo,n=nt.g.steppedease,k=nt.g.circ,b=nt.g.expo,f=nt.g.sine,g=nt.g.exposcaleease,u=s;u._autoactivated=[o,v,l,c,a,h,m,r,o,i,d,z,n,k,b,f,g]; /*! * version: 2.1.3 * date: 2019-05-17 * updates and docs at: http://greensock.com **/ var h=i(1),v=i.n(h),j=document.documentelement;document.queryselector('[data-role="root"]'),document.body,symbol("lazy-images:update"),symbol("lazy-images:load-force"),symbol("lazy-images:image-loaded");document.addeventlistener("domcontentloaded",function(){document.queryselectorall("[data-slider-cover-wrapper]").foreach(function(e){var t=e.queryselector("[data-slider-container]"),i='[data-role="cover-slider-image"]',n=new v,r=new v.a(t,{spacebetween:0,speed:1200,grabcursor:!1,simulatetouch:!1,autoplay:{delay:5e3},effect:"fade",fadeeffect:{crossfade:!0},slidesperview:1,pagination:{el:".pagination",clickable:!0,renderbullet:function(e,t){return" 0").concat(e+1,"")}},on:{slidechangetransitionstart:function(){u.to(".swiper-slide-prev ".concat(i),1,{ease:expo.easeinout,startat:{x:"0%",scale:1},x:"-10%",scale:1.2}),u.to(".swiper-slide-active ".concat(i),1,{ease:expo.easeinout,startat:{x:"10%",scale:1.2},x:"0%",scale:1}),n.staggerfromto(".swiper-slide-active [data-animation-title]",1,{opacity:0,rotationy:90},{opacity:1,rotationy:0},.035),u.staggerfromto("[data-slider-animation-fade-up]",.5,{opacity:0,y:100},{opacity:1,y:0,delay:1})}}});j.addeventlistener("preloaderend",function(){r.update()})}),document.queryselectorall("[data-slider-service-wrapper]").foreach(function(e){var t=e.queryselector("[data-slider-container]");new v.a(t,{effect:"slide",speed:600,spacebetween:20,centeredslides:!0,slidetoclickedslide:!0,slidesperview:5,initialslide:2,autoplay:!1,navigation:{nextel:".swiper-button-next",prevel:".swiper-button-prev"},breakpoints:{1024:{slidesperview:3,spacebetween:24},640:{slidesperview:1.5,spacebetween:16}}})}),document.queryselectorall('[data-slider-wrapper="small"]').foreach(function(e){var t=e.queryselector("[data-slider-container]");new v.a(t,{effect:"slide",speed:1e3,spacebetween:20,centeredslides:!0,slidetoclickedslide:!0,slidesperview:3.9,initialslide:2,breakpoints:{1024:{slidesperview:2,spacebetween:24},640:{slidesperview:1.5,spacebetween:0}}})}),document.queryselectorall('[data-slider-wrapper="text"]').foreach(function(e){var t=e.queryselector("[data-slider-container]");new v.a(t,{effect:"slide",speed:800,spacebetween:20,centeredslides:!0,slidetoclickedslide:!0,slidesperview:5.5,initialslide:4,breakpoints:{1024:{slidesperview:3.9,spacebetween:24},640:{slidesperview:1.5,spacebetween:0}}})}),document.queryselectorall("[data-slider-big-wrapper]").foreach(function(e){var t=e.queryselector("[data-slider-container]"),i=e.queryselector("[data-slider-pagination]");new v.a(t,{effect:"slide",speed:1e3,spacebetween:20,centeredslides:!0,simulatetouch:!1,slidesperview:1.5,initialslide:2,pagination:{el:i},navigation:{nextel:".swiper-button-next",prevel:".swiper-button-prev"}})})});var w=i(15),q=i.n(w),x=i(16),y=i.n(x),$=i(7),z=i.n($),j=i(17);i(42);document.addeventlistener("domcontentloaded",function(){document.queryselectorall('[data-role*="google-maps-container"]').foreach(function(t){var e=t.dataset,i=e.key,a=e.options,n=e.coords,o=e.markerimage;z.a.key=i;var s=json.parse(n),l=y()(s,1)[0];z.a.load(function(n){var e=new n.maps.latlng(l.lat,l.lng),r=new n.maps.map(t,q()({center:e,styles:j},json.parse(a)));s.foreach(function(e){var t=new n.maps.latlng(e),i=new n.maps.marker({position:t,icon:o,optimized:!1,origin:new n.maps.point(16,16),draggable:!1,animation:n.maps.animation.drop});i.addlistener("click",function(){i.setanimation(n.maps.animation.bounce),settimeout(function(){i.setanimation(null)},750)}),i.setmap(r)})})})});var q=i(8);i(43);document.addeventlistener("domcontentloaded",function(){var n=document.createelement("div"),e=document.createelement("div"),r=document.createelement("button"),a=document.createelement("div");n.classlist.add("modal"),n.setattribute("aria-modal","true"),e.classlist.add("modal__wrapper"),r.classlist.add("modal__close"),a.classlist.add("modal__content"),r.innerhtml="✕",e.appendchild(a),n.appendchild(e),n.appendchild(r),document.body.appendchild(n),document.queryselectorall("[data-modal-wrapper]").foreach(function(e){var t=e.queryselector("[data-modal-toggle]"),i=e.queryselector("[data-modal-content]");t.addeventlistener("click",function(){a.innerhtml=i.innerhtml,n.classlist.add("modal_opened"),object(q.disablebodyscroll)(n)}),r.addeventlistener("click",function(){n.classlist.remove("modal_opened"),object(q.enablebodyscroll)(n),settimeout(function(){a.innerhtml=""},300)})})});i(44),i(45);var k=i(46);document.queryselectorall("[data-charming]").foreach(function(e){k(e,{splitregex:/(\s+)/,classprefix:"word"}),e.queryselectorall('[class*="word"]').foreach(function(e){k(e),e.queryselectorall("span").foreach(function(e){e.setattribute("data-animation-title","")," "===e.innerhtml&&(e.innerhtml=" ")})})});i(47);var ee={update:null,begin:null,loopbegin:null,changebegin:null,change:null,changecomplete:null,loopcomplete:null,complete:null,loop:1,direction:"normal",autoplay:!0,timelineoffset:0},te={duration:1e3,delay:0,enddelay:0,easing:"easeoutelastic(1, .5)",round:0},ie=["translatex","translatey","translatez","rotate","rotatex","rotatey","rotatez","scale","scalex","scaley","scalez","skew","skewx","skewy","perspective"],ne={css:{},springs:{}};function re(e,t,i){return math.min(math.max(e,t),i)}function ae(e,t){return-1>8&255]+r[e>>16&255]+r[e>>24&255]+"-"+r[255&t]+r[t>>8&255]+"-"+r[t>>16&15|64]+r[t>>24&255]+"-"+r[63&i|128]+r[i>>8&255]+"-"+r[i>>16&255]+r[i>>24&255]+r[255&n]+r[n>>8&255]+r[n>>16&255]+r[n>>24&255]).touppercase()}}(),clamp:function(e,t,i){return math.max(t,math.min(i,e))},euclideanmodulo:function(e,t){return(e%t+t)%t},maplinear:function(e,t,i,n,r){return n+(e-t)*(r-n)/(i-t)},lerp:function(e,t,i){return(1-i)*e+i*t},smoothstep:function(e,t,i){return e<=t?0:i<=e?1:(e=(e-t)/(i-t))*e*(3-2*e)},smootherstep:function(e,t,i){return e<=t?0:i<=e?1:(e=(e-t)/(i-t))*e*e*(e*(6*e-15)+10)},randint:function(e,t){return e+math.floor(math.random()*(t-e+1))},randfloat:function(e,t){return e+math.random()*(t-e)},randfloatspread:function(e){return e*(.5-math.random())},degtorad:function(e){return e*$n.deg2rad},radtodeg:function(e){return e*$n.rad2deg},ispoweroftwo:function(e){return 0==(e&e-1)&&0!==e},ceilpoweroftwo:function(e){return math.pow(2,math.ceil(math.log(e)/math.ln2))},floorpoweroftwo:function(e){return math.pow(2,math.floor(math.log(e)/math.ln2))}};function zn(e,t){this.x=e||0,this.y=t||0}function jn(e,t,i,n){this._x=e||0,this._y=t||0,this._z=i||0,this._w=void 0!==n?n:1}function qn(e,t,i){this.x=e||0,this.y=t||0,this.z=i||0}function kn(){this.elements=[1,0,0,0,1,0,0,0,1],0number.epsilon){var x=math.sqrt(y),b=math.atan2(x,v*g);m=math.sin(m*b)/x,o=math.sin(o*b)/x}var w=o*g;if(s=s*m+u*w,l=l*m+d*w,c=c*m+p*w,h=h*m+f*w,m===1-o){var _=1/math.sqrt(s*s+l*l+c*c+h*h);s*=_,l*=_,c*=_,h*=_}}e[t]=s,e[t+1]=l,e[t+2]=c,e[t+3]=h}}),object.defineproperties(jn.prototype,{x:{get:function(){return this._x},set:function(e){this._x=e,this._onchangecallback()}},y:{get:function(){return this._y},set:function(e){this._y=e,this._onchangecallback()}},z:{get:function(){return this._z},set:function(e){this._z=e,this._onchangecallback()}},w:{get:function(){return this._w},set:function(e){this._w=e,this._onchangecallback()}}}),object.assign(jn.prototype,{isquaternion:!0,set:function(e,t,i,n){return this._x=e,this._y=t,this._z=i,this._w=n,this._onchangecallback(),this},clone:function(){return new this.constructor(this._x,this._y,this._z,this._w)},copy:function(e){return this._x=e.x,this._y=e.y,this._z=e.z,this._w=e.w,this._onchangecallback(),this},setfromeuler:function(e,t){if(!e||!e.iseuler)throw new error("three.quaternion: .setfromeuler() now expects an euler rotation rather than a vector3 and order.");var i=e._x,n=e._y,r=e._z,a=e.order,o=math.cos,s=math.sin,l=o(i/2),c=o(n/2),h=o(r/2),u=s(i/2),d=s(n/2),p=s(r/2);return"xyz"===a?(this._x=u*c*h+l*d*p,this._y=l*d*h-u*c*p,this._z=l*c*p+u*d*h,this._w=l*c*h-u*d*p):"yxz"===a?(this._x=u*c*h+l*d*p,this._y=l*d*h-u*c*p,this._z=l*c*p-u*d*h,this._w=l*c*h+u*d*p):"zxy"===a?(this._x=u*c*h-l*d*p,this._y=l*d*h+u*c*p,this._z=l*c*p+u*d*h,this._w=l*c*h-u*d*p):"zyx"===a?(this._x=u*c*h-l*d*p,this._y=l*d*h+u*c*p,this._z=l*c*p-u*d*h,this._w=l*c*h+u*d*p):"yzx"===a?(this._x=u*c*h+l*d*p,this._y=l*d*h+u*c*p,this._z=l*c*p-u*d*h,this._w=l*c*h-u*d*p):"xzy"===a&&(this._x=u*c*h-l*d*p,this._y=l*d*h-u*c*p,this._z=l*c*p+u*d*h,this._w=l*c*h+u*d*p),!1!==t&&this._onchangecallback(),this},setfromaxisangle:function(e,t){var i=t/2,n=math.sin(i);return this._x=e.x*n,this._y=e.y*n,this._z=e.z*n,this._w=math.cos(i),this._onchangecallback(),this},setfromrotationmatrix:function(e){var t,i=e.elements,n=i[0],r=i[4],a=i[8],o=i[1],s=i[5],l=i[9],c=i[2],h=i[6],u=i[10],d=n+s+u;return this._z=0math.abs(e.z)?(this._x=-e.y,this._y=e.x,this._z=0):(this._x=0,this._y=-e.z,this._z=e.y)):(this._x=e.y*t.z-e.z*t.y,this._y=e.z*t.x-e.x*t.z,this._z=e.x*t.y-e.y*t.x),i),this.normalize()},angleto:function(e){return 2*math.acos(math.abs($n.clamp(this.dot(e),-1,1)))},rotatetowards:function(e,t){var i=this.angleto(e);if(0===i)return this;var n=math.min(1,t/i);return this.slerp(e,n),this},inverse:function(){return this.conjugate()},conjugate:function(){return this._x*=-1,this._y*=-1,this._z*=-1,this._onchangecallback(),this},dot:function(e){return this._x*e._x+this._y*e._y+this._z*e._z+this._w*e._w},lengthsq:function(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w},length:function(){return math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)},normalize:function(){var e=this.length();return this._w=0===e?(this._x=0,this._y=0,this._z=0,1):(e=1/e,this._x=this._x*e,this._y=this._y*e,this._z=this._z*e,this._w*e),this._onchangecallback(),this},multiply:function(e,t){return void 0!==t?(console.warn("three.quaternion: .multiply() now only accepts one argument. use .multiplyquaternions( a, b ) instead."),this.multiplyquaternions(e,t)):this.multiplyquaternions(this,e)},premultiply:function(e){return this.multiplyquaternions(e,this)},multiplyquaternions:function(e,t){var i=e._x,n=e._y,r=e._z,a=e._w,o=t._x,s=t._y,l=t._z,c=t._w;return this._x=i*c+a*o+n*l-r*s,this._y=n*c+a*s+r*o-i*l,this._z=r*c+a*l+i*s-n*o,this._w=a*c-i*o-n*s-r*l,this._onchangecallback(),this},slerp:function(e,t){if(0===t)return this;if(1===t)return this.copy(e);var i=this._x,n=this._y,r=this._z,a=this._w,o=a*e._w+i*e._x+n*e._y+r*e._z;if(o<0?(this._w=-e._w,this._x=-e._x,this._y=-e._y,this._z=-e._z,o=-o):this.copy(e),1<=o)return this._w=a,this._x=i,this._y=n,this._z=r,this;var s=1-o*o;if(s<=number.epsilon){var l=1-t;return this._w=l*a+t*this._w,this._x=l*i+t*this._x,this._y=l*n+t*this._y,this._z=l*r+t*this._z,this.normalize(),this._onchangecallback(),this}var c=math.sqrt(s),h=math.atan2(c,o),u=math.sin((1-t)*h)/c,d=math.sin(t*h)/c;return this._w=a*u+this._w*d,this._x=i*u+this._x*d,this._y=n*u+this._y*d,this._z=r*u+this._z*d,this._onchangecallback(),this},equals:function(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._w===this._w},fromarray:function(e,t){return void 0===t&&(t=0),this._x=e[t],this._y=e[t+1],this._z=e[t+2],this._w=e[t+3],this._onchangecallback(),this},toarray:function(e,t){return void 0===e&&(e=[]),void 0===t&&(t=0),e[t]=this._x,e[t+1]=this._y,e[t+2]=this._z,e[t+3]=this._w,e},_onchange:function(e){return this._onchangecallback=e,this},_onchangecallback:function(){}}),object.assign(qn.prototype,{isvector3:!0,set:function(e,t,i){return this.x=e,this.y=t,this.z=i,this},setscalar:function(e){return this.x=e,this.y=e,this.z=e,this},setx:function(e){return this.x=e,this},sety:function(e){return this.y=e,this},setz:function(e){return this.z=e,this},setcomponent:function(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;default:throw new error("index is out of range: "+e)}return this},getcomponent:function(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new error("index is out of range: "+e)}},clone:function(){return new this.constructor(this.x,this.y,this.z)},copy:function(e){return this.x=e.x,this.y=e.y,this.z=e.z,this},add:function(e,t){return void 0!==t?(console.warn("three.vector3: .add() now only accepts one argument. use .addvectors( a, b ) instead."),this.addvectors(e,t)):(this.x+=e.x,this.y+=e.y,this.z+=e.z,this)},addscalar:function(e){return this.x+=e,this.y+=e,this.z+=e,this},addvectors:function(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this},addscaledvector:function(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this},sub:function(e,t){return void 0!==t?(console.warn("three.vector3: .sub() now only accepts one argument. use .subvectors( a, b ) instead."),this.subvectors(e,t)):(this.x-=e.x,this.y-=e.y,this.z-=e.z,this)},subscalar:function(e){return this.x-=e,this.y-=e,this.z-=e,this},subvectors:function(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this},multiply:function(e,t){return void 0!==t?(console.warn("three.vector3: .multiply() now only accepts one argument. use .multiplyvectors( a, b ) instead."),this.multiplyvectors(e,t)):(this.x*=e.x,this.y*=e.y,this.z*=e.z,this)},multiplyscalar:function(e){return this.x*=e,this.y*=e,this.z*=e,this},multiplyvectors:function(e,t){return this.x=e.x*t.x,this.y=e.y*t.y,this.z=e.z*t.z,this},applyeuler:(lt=new jn,function(e){return e&&e.iseuler||console.error("three.vector3: .applyeuler() now expects an euler rotation rather than a vector3 and order."),this.applyquaternion(lt.setfromeuler(e))}),applyaxisangle:(at=new jn,function(e,t){return this.applyquaternion(at.setfromaxisangle(e,t))}),applymatrix3:function(e){var t=this.x,i=this.y,n=this.z,r=e.elements;return this.x=r[0]*t+r[3]*i+r[6]*n,this.y=r[1]*t+r[4]*i+r[7]*n,this.z=r[2]*t+r[5]*i+r[8]*n,this},applymatrix4:function(e){var t=this.x,i=this.y,n=this.z,r=e.elements,a=1/(r[3]*t+r[7]*i+r[11]*n+r[15]);return this.x=(r[0]*t+r[4]*i+r[8]*n+r[12])*a,this.y=(r[1]*t+r[5]*i+r[9]*n+r[13])*a,this.z=(r[2]*t+r[6]*i+r[10]*n+r[14])*a,this},applyquaternion:function(e){var t=this.x,i=this.y,n=this.z,r=e.x,a=e.y,o=e.z,s=e.w,l=s*t+a*n-o*i,c=s*i+o*t-r*n,h=s*n+r*i-a*t,u=-r*t-a*i-o*n;return this.x=l*s+u*-r+c*-o-h*-a,this.y=c*s+u*-a+h*-r-l*-o,this.z=h*s+u*-o+l*-a-c*-r,this},project:function(e){return this.applymatrix4(e.matrixworldinverse).applymatrix4(e.projectionmatrix)},unproject:function(e){return this.applymatrix4(e.projectionmatrixinverse).applymatrix4(e.matrixworld)},transformdirection:function(e){var t=this.x,i=this.y,n=this.z,r=e.elements;return this.x=r[0]*t+r[4]*i+r[8]*n,this.y=r[1]*t+r[5]*i+r[9]*n,this.z=r[2]*t+r[6]*i+r[10]*n,this.normalize()},divide:function(e){return this.x/=e.x,this.y/=e.y,this.z/=e.z,this},dividescalar:function(e){return this.multiplyscalar(1/e)},min:function(e){return this.x=math.min(this.x,e.x),this.y=math.min(this.y,e.y),this.z=math.min(this.z,e.z),this},max:function(e){return this.x=math.max(this.x,e.x),this.y=math.max(this.y,e.y),this.z=math.max(this.z,e.z),this},clamp:function(e,t){return this.x=math.max(e.x,math.min(t.x,this.x)),this.y=math.max(e.y,math.min(t.y,this.y)),this.z=math.max(e.z,math.min(t.z,this.z)),this},clampscalar:function(e,t){return this.x=math.max(e,math.min(t,this.x)),this.y=math.max(e,math.min(t,this.y)),this.z=math.max(e,math.min(t,this.z)),this},clamplength:function(e,t){var i=this.length();return this.dividescalar(i||1).multiplyscalar(math.max(e,math.min(t,i)))},floor:function(){return this.x=math.floor(this.x),this.y=math.floor(this.y),this.z=math.floor(this.z),this},ceil:function(){return this.x=math.ceil(this.x),this.y=math.ceil(this.y),this.z=math.ceil(this.z),this},round:function(){return this.x=math.round(this.x),this.y=math.round(this.y),this.z=math.round(this.z),this},roundtozero:function(){return this.x=this.x<0?math.ceil(this.x):math.floor(this.x),this.y=this.y<0?math.ceil(this.y):math.floor(this.y),this.z=this.z<0?math.ceil(this.z):math.floor(this.z),this},negate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this},dot:function(e){return this.x*e.x+this.y*e.y+this.z*e.z},lengthsq:function(){return this.x*this.x+this.y*this.y+this.z*this.z},length:function(){return math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)},manhattanlength:function(){return math.abs(this.x)+math.abs(this.y)+math.abs(this.z)},normalize:function(){return this.dividescalar(this.length()||1)},setlength:function(e){return this.normalize().multiplyscalar(e)},lerp:function(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this.z+=(e.z-this.z)*t,this},lerpvectors:function(e,t,i){return this.subvectors(t,e).multiplyscalar(i).add(e)},cross:function(e,t){return void 0!==t?(console.warn("three.vector3: .cross() now only accepts one argument. use .crossvectors( a, b ) instead."),this.crossvectors(e,t)):this.crossvectors(this,e)},crossvectors:function(e,t){var i=e.x,n=e.y,r=e.z,a=t.x,o=t.y,s=t.z;return this.x=n*s-r*o,this.y=r*a-i*s,this.z=i*o-n*a,this},projectonvector:function(e){var t=e.dot(this)/e.lengthsq();return this.copy(e).multiplyscalar(t)},projectonplane:(pt=new qn,function(e){return pt.copy(this).projectonvector(e),this.sub(pt)}),reflect:(ct=new qn,function(e){return this.sub(ct.copy(e).multiplyscalar(2*this.dot(e)))}),angleto:function(e){var t=this.dot(e)/math.sqrt(this.lengthsq()*e.lengthsq());return math.acos($n.clamp(t,-1,1))},distanceto:function(e){return math.sqrt(this.distancetosquared(e))},distancetosquared:function(e){var t=this.x-e.x,i=this.y-e.y,n=this.z-e.z;return t*t+i*i+n*n},manhattandistanceto:function(e){return math.abs(this.x-e.x)+math.abs(this.y-e.y)+math.abs(this.z-e.z)},setfromspherical:function(e){return this.setfromsphericalcoords(e.radius,e.phi,e.theta)},setfromsphericalcoords:function(e,t,i){var n=math.sin(t)*e;return this.x=n*math.sin(i),this.y=math.cos(t)*e,this.z=n*math.cos(i),this},setfromcylindrical:function(e){return this.setfromcylindricalcoords(e.radius,e.theta,e.y)},setfromcylindricalcoords:function(e,t,i){return this.x=e*math.sin(t),this.y=i,this.z=e*math.cos(t),this},setfrommatrixposition:function(e){var t=e.elements;return this.x=t[12],this.y=t[13],this.z=t[14],this},setfrommatrixscale:function(e){var t=this.setfrommatrixcolumn(e,0).length(),i=this.setfrommatrixcolumn(e,1).length(),n=this.setfrommatrixcolumn(e,2).length();return this.x=t,this.y=i,this.z=n,this},setfrommatrixcolumn:function(e,t){return this.fromarray(e.elements,4*t)},equals:function(e){return e.x===this.x&&e.y===this.y&&e.z===this.z},fromarray:function(e,t){return void 0===t&&(t=0),this.x=e[t],this.y=e[t+1],this.z=e[t+2],this},toarray:function(e,t){return void 0===e&&(e=[]),void 0===t&&(t=0),e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e},frombufferattribute:function(e,t,i){return void 0!==i&&console.warn("three.vector3: offset has been removed from .frombufferattribute()."),this.x=e.getx(t),this.y=e.gety(t),this.z=e.getz(t),this}}),object.assign(kn.prototype,{ismatrix3:!0,set:function(e,t,i,n,r,a,o,s,l){var c=this.elements;return c[0]=e,c[1]=n,c[2]=o,c[3]=t,c[4]=r,c[5]=s,c[6]=i,c[7]=a,c[8]=l,this},identity:function(){return this.set(1,0,0,0,1,0,0,0,1),this},clone:function(){return(new this.constructor).fromarray(this.elements)},copy:function(e){var t=this.elements,i=e.elements;return t[0]=i[0],t[1]=i[1],t[2]=i[2],t[3]=i[3],t[4]=i[4],t[5]=i[5],t[6]=i[6],t[7]=i[7],t[8]=i[8],this},setfrommatrix4:function(e){var t=e.elements;return this.set(t[0],t[4],t[8],t[1],t[5],t[9],t[2],t[6],t[10]),this},applytobufferattribute:(rt=new qn,function(e){for(var t=0,i=e.count;tthis.max.x||e.ythis.max.y||e.zthis.max.z)},containsbox:function(e){return this.min.x<=e.min.x&&e.max.x<=this.max.x&&this.min.y<=e.min.y&&e.max.y<=this.max.y&&this.min.z<=e.min.z&&e.max.z<=this.max.z},getparameter:function(e,t){return void 0===t&&(console.warn("three.box3: .getparameter() target is now required"),t=new qn),t.set((e.x-this.min.x)/(this.max.x-this.min.x),(e.y-this.min.y)/(this.max.y-this.min.y),(e.z-this.min.z)/(this.max.z-this.min.z))},intersectsbox:function(e){return!(e.max.xthis.max.x||e.max.ythis.max.y||e.max.zthis.max.z)},intersectssphere:(jr=new qn,function(e){return this.clamppoint(e.center,jr),jr.distancetosquared(e.center)<=e.radius*e.radius}),intersectsplane:function(e){var t,i;return i=0=-e.constant},intersectstriangle:function(){var s=new qn,l=new qn,c=new qn,i=new qn,n=new qn,r=new qn,h=new qn,a=new qn,u=new qn,o=new qn;function d(e){var t,i;for(t=0,i=e.length-3;t<=i;t+=3){h.fromarray(e,t);var n=u.x*math.abs(h.x)+u.y*math.abs(h.y)+u.z*math.abs(h.z),r=s.dot(h),a=l.dot(h),o=c.dot(h);if(math.max(-math.max(r,a,o),math.min(r,a,o))>n)return!1}return!0}return function(e){if(this.isempty())return!1;this.getcenter(a),u.subvectors(this.max,a),s.subvectors(e.a,a),l.subvectors(e.b,a),c.subvectors(e.c,a),i.subvectors(l,s),n.subvectors(c,l),r.subvectors(s,c);var t=[0,-i.z,i.y,0,-n.z,n.y,0,-r.z,r.y,i.z,0,-i.x,n.z,0,-n.x,r.z,0,-r.x,-i.y,i.x,0,-n.y,n.x,0,-r.y,r.x,0];return!!d(t)&&(!!d(t=[1,0,0,0,1,0,0,0,1])&&(o.crossvectors(i,n),d(t=[o.x,o.y,o.z])))}}(),clamppoint:function(e,t){return void 0===t&&(console.warn("three.box3: .clamppoint() target is now required"),t=new qn),t.copy(e).clamp(this.min,this.max)},distancetopoint:(vr=new qn,function(e){return vr.copy(e).clamp(this.min,this.max).sub(e).length()}),getboundingsphere:(hr=new qn,function(e){return void 0===e&&console.error("three.box3: .getboundingsphere() target is now required"),this.getcenter(e.center),e.radius=.5*this.getsize(hr).length(),e}),intersect:function(e){return this.min.max(e.min),this.max.min(e.max),this.isempty()&&this.makeempty(),this},union:function(e){return this.min.min(e.min),this.max.max(e.max),this},applymatrix4:(ur=[new qn,new qn,new qn,new qn,new qn,new qn,new qn,new qn],function(e){return this.isempty()||(ur[0].set(this.min.x,this.min.y,this.min.z).applymatrix4(e),ur[1].set(this.min.x,this.min.y,this.max.z).applymatrix4(e),ur[2].set(this.min.x,this.max.y,this.min.z).applymatrix4(e),ur[3].set(this.min.x,this.max.y,this.max.z).applymatrix4(e),ur[4].set(this.max.x,this.min.y,this.min.z).applymatrix4(e),ur[5].set(this.max.x,this.min.y,this.max.z).applymatrix4(e),ur[6].set(this.max.x,this.max.y,this.min.z).applymatrix4(e),ur[7].set(this.max.x,this.max.y,this.max.z).applymatrix4(e),this.setfrompoints(ur)),this}),translate:function(e){return this.min.add(e),this.max.add(e),this},equals:function(e){return e.min.equals(this.min)&&e.max.equals(this.max)}}),object.assign(ma.prototype,{set:function(e,t){return this.center.copy(e),this.radius=t,this},setfrompoints:(qr=new ta,function(e,t){var i=this.center;void 0!==t?i.copy(t):qr.setfrompoints(e).getcenter(i);for(var n=0,r=0,a=e.length;rthis.radius*this.radius&&(t.sub(this.center).normalize(),t.multiplyscalar(this.radius).add(this.center)),t},getboundingbox:function(e){return void 0===e&&(console.warn("three.sphere: .getboundingbox() target is now required"),e=new ta),e.set(this.center,this.center),e.expandbyscalar(this.radius),e},applymatrix4:function(e){return this.center.applymatrix4(e),this.radius=this.radius*e.getmaxscaleonaxis(),this},translate:function(e){return this.center.add(e),this},equals:function(e){return e.center.equals(this.center)&&e.radius===this.radius}}),object.assign(sa.prototype,{set:function(e,t){return this.origin.copy(e),this.direction.copy(t),this},clone:function(){return(new this.constructor).copy(this)},copy:function(e){return this.origin.copy(e.origin),this.direction.copy(e.direction),this},at:function(e,t){return void 0===t&&(console.warn("three.ray: .at() target is now required"),t=new qn),t.copy(this.direction).multiplyscalar(e).add(this.origin)},lookat:function(e){return this.direction.copy(e).sub(this.origin).normalize(),this},recast:(na=new qn,function(e){return this.origin.copy(this.at(e,na)),this}),closestpointtopoint:function(e,t){void 0===t&&(console.warn("three.ray: .closestpointtopoint() target is now required"),t=new qn),t.subvectors(e,this.origin);var i=t.dot(this.direction);return i<0?t.copy(this.origin):t.copy(this.direction).multiplyscalar(i).add(this.origin)},distancetopoint:function(e){return math.sqrt(this.distancesqtopoint(e))},distancesqtopoint:(ia=new qn,function(e){var t=ia.subvectors(e,this.origin).dot(this.direction);return t<0?this.origin.distancetosquared(e):(ia.copy(this.direction).multiplyscalar(t).add(this.origin),ia.distancetosquared(e))}),distancesqtosegment:(kr=new qn,ea=new qn,ta=new qn,function(e,t,i,n){kr.copy(e).add(t).multiplyscalar(.5),ea.copy(t).sub(e).normalize(),ta.copy(this.origin).sub(kr);var r,a,o,s,l=.5*e.distanceto(t),c=-this.direction.dot(ea),h=ta.dot(this.direction),u=-ta.dot(ea),d=ta.lengthsq(),p=math.abs(1-c*c);if(0>16&255)/255,this.g=(e>>8&255)/255,this.b=(255&e)/255,this},setrgb:function(e,t,i){return this.r=e,this.g=t,this.b=i,this},sethsl:function(e,t,i){if(e=$n.euclideanmodulo(e,1),t=$n.clamp(t,0,1),i=$n.clamp(i,0,1),0===t)this.r=this.g=this.b=i;else{var n=i<=.5?i*(1+t):i+t-i*t,r=2*i-n;this.r=oa(r,n,e+1/3),this.g=oa(r,n,e),this.b=oa(r,n,e-1/3)}return this},setstyle:function(t){function e(e){void 0!==e&&parsefloat(e)<1&&console.warn("three.color: alpha component of "+t+" will be ignored.")}var i;if(i=/^((?:rgb|hsl)a?)\(\s*([^\)]*)\)/.exec(t)){var n,r=i[1],a=i[2];switch(r){case"rgb":case"rgba":if(n=/^(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(,\s*([0-9]*\.?[0-9]+)\s*)?$/.exec(a))return this.r=math.min(255,parseint(n[1],10))/255,this.g=math.min(255,parseint(n[2],10))/255,this.b=math.min(255,parseint(n[3],10))/255,e(n[5]),this;if(n=/^(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(,\s*([0-9]*\.?[0-9]+)\s*)?$/.exec(a))return this.r=math.min(100,parseint(n[1],10))/100,this.g=math.min(100,parseint(n[2],10))/100,this.b=math.min(100,parseint(n[3],10))/100,e(n[5]),this;break;case"hsl":case"hsla":if(n=/^([0-9]*\.?[0-9]+)\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(,\s*([0-9]*\.?[0-9]+)\s*)?$/.exec(a)){var o=parsefloat(n[1])/360,s=parseint(n[2],10)/100,l=parseint(n[3],10)/100;return e(n[5]),this.sethsl(o,s,l)}}}else if(i=/^\#([a-fa-f0-9]+)$/.exec(t)){var c,h=(c=i[1]).length;if(3===h)return this.r=parseint(c.charat(0)+c.charat(0),16)/255,this.g=parseint(c.charat(1)+c.charat(1),16)/255,this.b=parseint(c.charat(2)+c.charat(2),16)/255,this;if(6===h)return this.r=parseint(c.charat(0)+c.charat(1),16)/255,this.g=parseint(c.charat(2)+c.charat(3),16)/255,this.b=parseint(c.charat(4)+c.charat(5),16)/255,this}t&&0t&&(t=e[i]);return t}ka.prototype=object.assign(object.create(et.prototype),{constructor:ka,ismaterial:!0,onbeforecompile:function(){},setvalues:function(e){if(void 0!==e)for(var t in e){var i=e[t];if(void 0!==i)if("shading"!==t){var n=this[t];void 0!==n?n&&n.iscolor?n.set(i):n&&n.isvector3&&i&&i.isvector3?n.copy(i):this[t]=i:console.warn("three."+this.type+": '"+t+"' is not a property of this material.")}else console.warn("three."+this.type+": .shading has been removed. use the boolean .flatshading instead."),this.flatshading=1===i;else console.warn("three.material: '"+t+"' parameter is undefined.")}},tojson:function(e){var t=void 0===e||"string"==typeof e;t&&(e={textures:{},images:{}});var i={metadata:{version:4.5,type:"material",generator:"material.tojson"}};function n(e){var t=[];for(var i in e){var n=e[i];delete n.metadata,t.push(n)}return t}if(i.uuid=this.uuid,i.type=this.type,""!==this.name&&(i.name=this.name),this.color&&this.color.iscolor&&(i.color=this.color.gethex()),void 0!==this.roughness&&(i.roughness=this.roughness),void 0!==this.metalness&&(i.metalness=this.metalness),this.emissive&&this.emissive.iscolor&&(i.emissive=this.emissive.gethex()),this.emissiveintensity&&1!==this.emissiveintensity&&(i.emissiveintensity=this.emissiveintensity),this.specular&&this.specular.iscolor&&(i.specular=this.specular.gethex()),void 0!==this.shininess&&(i.shininess=this.shininess),void 0!==this.clearcoat&&(i.clearcoat=this.clearcoat),void 0!==this.clearcoatroughness&&(i.clearcoatroughness=this.clearcoatroughness),this.map&&this.map.istexture&&(i.map=this.map.tojson(e).uuid),this.matcap&&this.matcap.istexture&&(i.matcap=this.matcap.tojson(e).uuid),this.alphamap&&this.alphamap.istexture&&(i.alphamap=this.alphamap.tojson(e).uuid),this.lightmap&&this.lightmap.istexture&&(i.lightmap=this.lightmap.tojson(e).uuid),this.aomap&&this.aomap.istexture&&(i.aomap=this.aomap.tojson(e).uuid,i.aomapintensity=this.aomapintensity),this.bumpmap&&this.bumpmap.istexture&&(i.bumpmap=this.bumpmap.tojson(e).uuid,i.bumpscale=this.bumpscale),this.normalmap&&this.normalmap.istexture&&(i.normalmap=this.normalmap.tojson(e).uuid,i.normalmaptype=this.normalmaptype,i.normalscale=this.normalscale.toarray()),this.displacementmap&&this.displacementmap.istexture&&(i.displacementmap=this.displacementmap.tojson(e).uuid,i.displacementscale=this.displacementscale,i.displacementbias=this.displacementbias),this.roughnessmap&&this.roughnessmap.istexture&&(i.roughnessmap=this.roughnessmap.tojson(e).uuid),this.metalnessmap&&this.metalnessmap.istexture&&(i.metalnessmap=this.metalnessmap.tojson(e).uuid),this.emissivemap&&this.emissivemap.istexture&&(i.emissivemap=this.emissivemap.tojson(e).uuid),this.specularmap&&this.specularmap.istexture&&(i.specularmap=this.specularmap.tojson(e).uuid),this.envmap&&this.envmap.istexture&&(i.envmap=this.envmap.tojson(e).uuid,i.reflectivity=this.reflectivity,i.refractionratio=this.refractionratio,void 0!==this.combine&&(i.combine=this.combine),void 0!==this.envmapintensity&&(i.envmapintensity=this.envmapintensity)),this.gradientmap&&this.gradientmap.istexture&&(i.gradientmap=this.gradientmap.tojson(e).uuid),void 0!==this.size&&(i.size=this.size),void 0!==this.sizeattenuation&&(i.sizeattenuation=this.sizeattenuation),this.blending!==wt&&(i.blending=this.blending),!0===this.flatshading&&(i.flatshading=this.flatshading),this.side!==ft&&(i.side=this.side),this.vertexcolors!==ht&&(i.vertexcolors=this.vertexcolors),this.opacity<1&&(i.opacity=this.opacity),!0===this.transparent&&(i.transparent=this.transparent),i.depthfunc=this.depthfunc,i.depthtest=this.depthtest,i.depthwrite=this.depthwrite,this.rotation&&0!==this.rotation&&(i.rotation=this.rotation),!0===this.polygonoffset&&(i.polygonoffset=!0),0!==this.polygonoffsetfactor&&(i.polygonoffsetfactor=this.polygonoffsetfactor),0!==this.polygonoffsetunits&&(i.polygonoffsetunits=this.polygonoffsetunits),this.linewidth&&1!==this.linewidth&&(i.linewidth=this.linewidth),void 0!==this.dashsize&&(i.dashsize=this.dashsize),void 0!==this.gapsize&&(i.gapsize=this.gapsize),void 0!==this.scale&&(i.scale=this.scale),!0===this.dithering&&(i.dithering=!0),0i.far?null:{distance:l,point:c.clone(),object:e}}function h(e,t,i,n,r,a,o,s,l,c){g.frombufferattribute(r,s),y.frombufferattribute(r,l),x.frombufferattribute(r,c);var h=e.morphtargetinfluences;if(t.morphtargets&&a&&h){t.set(0,0,0),m.set(0,0,0),s.set(0,0,0);for(var u=0,d=a.length;u","\t#include ","}"].join("\n"),fragmentshader:["uniform sampler2d tequirect;","varying vec3 vworlddirection;","#define reciprocal_pi 0.31830988618","#define reciprocal_pi2 0.15915494","void main() {","\tvec3 direction = normalize( vworlddirection );","\tvec2 sampleuv;","\tsampleuv.y = asin( clamp( direction.y, - 1.0, 1.0 ) ) * reciprocal_pi + 0.5;","\tsampleuv.x = atan( direction.z, direction.x ) * reciprocal_pi2 + 0.5;","\tgl_fragcolor = texture2d( tequirect, sampleuv );","}"].join("\n")},r=new po({type:"cubemapfromequirect",uniforms:mo(n.uniforms),vertexshader:n.vertexshader,fragmentshader:n.fragmentshader,side:gt,blending:jt});r.uniforms.tequirect.value=t;var a=new uo(new to(5,5,5),r);i.add(a);var o=new fo(1,10,1);return o.rendertarget=this,o.rendertarget.texture.name="cubecameratexture",o.update(e,i),a.geometry.dispose(),a.material.dispose(),this},((uo.prototype=object.create(mr.prototype)).constructor=uo).prototype.isdatatexture=!0,object.assign(ho.prototype,{isplane:!0,set:function(e,t){return this.normal.copy(e),this.constant=t,this},setcomponents:function(e,t,i,n){return this.normal.set(e,t,i),this.constant=n,this},setfromnormalandcoplanarpoint:function(e,t){return this.normal.copy(e),this.constant=-t.dot(this.normal),this},setfromcoplanarpoints:(do=new qn,zo=new qn,function(e,t,i){var n=do.subvectors(i,t).cross(zo.subvectors(e,t)).normalize();return this.setfromnormalandcoplanarpoint(n,e),this}),clone:function(){return(new this.constructor).copy(this)},copy:function(e){return this.normal.copy(e.normal),this.constant=e.constant,this},normalize:function(){var e=1/this.normal.length();return this.normal.multiplyscalar(e),this.constant*=e,this},negate:function(){return this.constant*=-1,this.normal.negate(),this},distancetopoint:function(e){return this.normal.dot(e)+this.constant},distancetosphere:function(e){return this.distancetopoint(e.center)-e.radius},projectpoint:function(e,t){return void 0===t&&(console.warn("three.plane: .projectpoint() target is now required"),t=new qn),t.copy(this.normal).multiplyscalar(-this.distancetopoint(e)).add(e)},intersectline:(io=new qn,function(e,t){void 0===t&&(console.warn("three.plane: .intersectline() target is now required"),t=new qn);var i=e.delta(io),n=this.normal.dot(i);if(0===n)return 0===this.distancetopoint(e.start)?t.copy(e.start):void 0;var r=-(e.start.dot(this.normal)+this.constant)/n;return r<0||1 0.0 ) {\n\t\tdistancefalloff *= pow2( saturate( 1.0 - pow4( lightdistance / cutoffdistance ) ) );\n\t}\n\treturn distancefalloff;\n#else\n\tif( cutoffdistance > 0.0 && decayexponent > 0.0 ) {\n\t\treturn pow( saturate( -lightdistance / cutoffdistance + 1.0 ), decayexponent );\n\t}\n\treturn 1.0;\n#endif\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}\nvec3 f_schlick_roughnessdependent( const in vec3 f0, const in float dotnv, const in float roughness ) {\n\tfloat fresnel = exp2( ( -5.55473 * dotnv - 6.98316 ) * dotnv );\n\tvec3 fr = max( vec3( 1.0 - roughness ), f0 ) - f0;\n\treturn fr * fresnel + f0;\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}\nvec2 ltc_uv( const in vec3 n, const in vec3 v, const in float roughness ) {\n\tconst float lut_size = 64.0;\n\tconst float lut_scale = ( lut_size - 1.0 ) / lut_size;\n\tconst float lut_bias = 0.5 / lut_size;\n\tfloat dotnv = saturate( dot( n, v ) );\n\tvec2 uv = vec2( roughness, sqrt( 1.0 - dotnv ) );\n\tuv = uv * lut_scale + lut_bias;\n\treturn uv;\n}\nfloat ltc_clippedsphereformfactor( const in vec3 f ) {\n\tfloat l = length( f );\n\treturn max( ( l * l + f.z ) / ( l + 1.0 ), 0.0 );\n}\nvec3 ltc_edgevectorformfactor( const in vec3 v1, const in vec3 v2 ) {\n\tfloat x = dot( v1, v2 );\n\tfloat y = abs( x );\n\tfloat a = 0.8543985 + ( 0.4965155 + 0.0145206 * y ) * y;\n\tfloat b = 3.4175940 + ( 4.1616724 + y ) * y;\n\tfloat v = a / b;\n\tfloat theta_sintheta = ( x > 0.0 ) ? v : 0.5 * inversesqrt( max( 1.0 - x * x, 1e-7 ) ) - v;\n\treturn cross( v1, v2 ) * theta_sintheta;\n}\nvec3 ltc_evaluate( const in vec3 n, const in vec3 v, const in vec3 p, const in mat3 minv, const in vec3 rectcoords[ 4 ] ) {\n\tvec3 v1 = rectcoords[ 1 ] - rectcoords[ 0 ];\n\tvec3 v2 = rectcoords[ 3 ] - rectcoords[ 0 ];\n\tvec3 lightnormal = cross( v1, v2 );\n\tif( dot( lightnormal, p - rectcoords[ 0 ] ) < 0.0 ) return vec3( 0.0 );\n\tvec3 t1, t2;\n\tt1 = normalize( v - n * dot( v, n ) );\n\tt2 = - cross( n, t1 );\n\tmat3 mat = minv * transposemat3( mat3( t1, t2, n ) );\n\tvec3 coords[ 4 ];\n\tcoords[ 0 ] = mat * ( rectcoords[ 0 ] - p );\n\tcoords[ 1 ] = mat * ( rectcoords[ 1 ] - p );\n\tcoords[ 2 ] = mat * ( rectcoords[ 2 ] - p );\n\tcoords[ 3 ] = mat * ( rectcoords[ 3 ] - p );\n\tcoords[ 0 ] = normalize( coords[ 0 ] );\n\tcoords[ 1 ] = normalize( coords[ 1 ] );\n\tcoords[ 2 ] = normalize( coords[ 2 ] );\n\tcoords[ 3 ] = normalize( coords[ 3 ] );\n\tvec3 vectorformfactor = vec3( 0.0 );\n\tvectorformfactor += ltc_edgevectorformfactor( coords[ 0 ], coords[ 1 ] );\n\tvectorformfactor += ltc_edgevectorformfactor( coords[ 1 ], coords[ 2 ] );\n\tvectorformfactor += ltc_edgevectorformfactor( coords[ 2 ], coords[ 3 ] );\n\tvectorformfactor += ltc_edgevectorformfactor( coords[ 3 ], coords[ 0 ] );\n\tfloat result = ltc_clippedsphereformfactor( vectorformfactor );\n\treturn vec3( result );\n}\nvec3 brdf_specular_ggx_environment( const in geometriccontext geometry, const in vec3 specularcolor, const in float roughness ) {\n\tfloat dotnv = saturate( dot( geometry.normal, geometry.viewdir ) );\n\tvec2 brdf = integratespecularbrdf( dotnv, roughness );\n\treturn specularcolor * brdf.x + brdf.y;\n}\nvoid brdf_specular_multiscattering_environment( const in geometriccontext geometry, const in vec3 specularcolor, const in float roughness, inout vec3 singlescatter, inout vec3 multiscatter ) {\n\tfloat dotnv = saturate( dot( geometry.normal, geometry.viewdir ) );\n\tvec3 f = f_schlick_roughnessdependent( specularcolor, dotnv, roughness );\n\tvec2 brdf = integratespecularbrdf( dotnv, roughness );\n\tvec3 fssess = f * brdf.x + brdf.y;\n\tfloat ess = brdf.x + brdf.y;\n\tfloat ems = 1.0 - ess;\n\tvec3 favg = specularcolor + ( 1.0 - specularcolor ) * 0.047619;\tvec3 fms = fssess * favg / ( 1.0 - ems * favg );\n\tsinglescatter += fssess;\n\tmultiscatter += fms * ems;\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}",bumpmap_pars_fragment:"#ifdef use_bumpmap\n\tuniform sampler2d bumpmap;\n\tuniform float bumpscale;\n\tvec2 dhdxy_fwd() {\n\t\tvec2 dstdx = dfdx( vuv );\n\t\tvec2 dstdy = dfdy( vuv );\n\t\tfloat hll = bumpscale * texture2d( bumpmap, vuv ).x;\n\t\tfloat dbx = bumpscale * texture2d( bumpmap, vuv + dstdx ).x - hll;\n\t\tfloat dby = bumpscale * texture2d( bumpmap, vuv + dstdy ).x - hll;\n\t\treturn vec2( dbx, dby );\n\t}\n\tvec3 perturbnormalarb( vec3 surf_pos, vec3 surf_norm, vec2 dhdxy ) {\n\t\tvec3 vsigmax = vec3( dfdx( surf_pos.x ), dfdx( surf_pos.y ), dfdx( surf_pos.z ) );\n\t\tvec3 vsigmay = vec3( dfdy( surf_pos.x ), dfdy( surf_pos.y ), dfdy( surf_pos.z ) );\n\t\tvec3 vn = surf_norm;\n\t\tvec3 r1 = cross( vsigmay, vn );\n\t\tvec3 r2 = cross( vn, vsigmax );\n\t\tfloat fdet = dot( vsigmax, r1 );\n\t\tfdet *= ( float( gl_frontfacing ) * 2.0 - 1.0 );\n\t\tvec3 vgrad = sign( fdet ) * ( dhdxy.x * r1 + dhdxy.y * r2 );\n\t\treturn normalize( abs( fdet ) * surf_norm - vgrad );\n\t}\n#endif",clipping_planes_fragment:"#if num_clipping_planes > 0\n\tvec4 plane;\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < union_clipping_planes; i ++ ) {\n\t\tplane = clippingplanes[ i ];\n\t\tif ( dot( vviewposition, plane.xyz ) > plane.w ) discard;\n\t}\n\t#if union_clipping_planes < num_clipping_planes\n\t\tbool clipped = true;\n\t\t#pragma unroll_loop\n\t\tfor ( int i = union_clipping_planes; i < num_clipping_planes; i ++ ) {\n\t\t\tplane = clippingplanes[ i ];\n\t\t\tclipped = ( dot( vviewposition, plane.xyz ) > plane.w ) && clipped;\n\t\t}\n\t\tif ( clipped ) discard;\n\t#endif\n#endif",clipping_planes_pars_fragment:"#if num_clipping_planes > 0\n\t#if ! defined( physical ) && ! defined( phong ) && ! defined( matcap )\n\t\tvarying vec3 vviewposition;\n\t#endif\n\tuniform vec4 clippingplanes[ num_clipping_planes ];\n#endif",clipping_planes_pars_vertex:"#if num_clipping_planes > 0 && ! defined( physical ) && ! defined( phong ) && ! defined( matcap )\n\tvarying vec3 vviewposition;\n#endif",clipping_planes_vertex:"#if num_clipping_planes > 0 && ! defined( physical ) && ! defined( phong ) && ! defined( matcap )\n\tvviewposition = - mvposition.xyz;\n#endif",color_fragment:"#ifdef use_color\n\tdiffusecolor.rgb *= vcolor;\n#endif",color_pars_fragment:"#ifdef use_color\n\tvarying vec3 vcolor;\n#endif",color_pars_vertex:"#ifdef use_color\n\tvarying vec3 vcolor;\n#endif",color_vertex:"#ifdef use_color\n\tvcolor.xyz = color.xyz;\n#endif",common:"#define pi 3.14159265359\n#define pi2 6.28318530718\n#define pi_half 1.5707963267949\n#define reciprocal_pi 0.31830988618\n#define reciprocal_pi2 0.15915494\n#define log2 1.442695\n#define epsilon 1e-6\n#define saturate(a) clamp( a, 0.0, 1.0 )\n#define whitecompliment(a) ( 1.0 - saturate( a ) )\nfloat pow2( const in float x ) { return x*x; }\nfloat pow3( const in float x ) { return x*x*x; }\nfloat pow4( const in float x ) { float x2 = x*x; return x2*x2; }\nfloat average( const in vec3 color ) { return dot( color, vec3( 0.3333 ) ); }\nhighp float rand( const in vec2 uv ) {\n\tconst highp float a = 12.9898, b = 78.233, c = 43758.5453;\n\thighp float dt = dot( uv.xy, vec2( a,b ) ), sn = mod( dt, pi );\n\treturn fract(sin(sn) * c);\n}\nstruct incidentlight {\n\tvec3 color;\n\tvec3 direction;\n\tbool visible;\n};\nstruct reflectedlight {\n\tvec3 directdiffuse;\n\tvec3 directspecular;\n\tvec3 indirectdiffuse;\n\tvec3 indirectspecular;\n};\nstruct geometriccontext {\n\tvec3 position;\n\tvec3 normal;\n\tvec3 viewdir;\n};\nvec3 transformdirection( in vec3 dir, in mat4 matrix ) {\n\treturn normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );\n}\nvec3 inversetransformdirection( in vec3 dir, in mat4 matrix ) {\n\treturn normalize( ( vec4( dir, 0.0 ) * matrix ).xyz );\n}\nvec3 projectonplane(in vec3 point, in vec3 pointonplane, in vec3 planenormal ) {\n\tfloat distance = dot( planenormal, point - pointonplane );\n\treturn - distance * planenormal + point;\n}\nfloat sideofplane( in vec3 point, in vec3 pointonplane, in vec3 planenormal ) {\n\treturn sign( dot( point - pointonplane, planenormal ) );\n}\nvec3 lineplaneintersect( in vec3 pointonline, in vec3 linedirection, in vec3 pointonplane, in vec3 planenormal ) {\n\treturn linedirection * ( dot( planenormal, pointonplane - pointonline ) / dot( planenormal, linedirection ) ) + pointonline;\n}\nmat3 transposemat3( const in mat3 m ) {\n\tmat3 tmp;\n\ttmp[ 0 ] = vec3( m[ 0 ].x, m[ 1 ].x, m[ 2 ].x );\n\ttmp[ 1 ] = vec3( m[ 0 ].y, m[ 1 ].y, m[ 2 ].y );\n\ttmp[ 2 ] = vec3( m[ 0 ].z, m[ 1 ].z, m[ 2 ].z );\n\treturn tmp;\n}\nfloat lineartorelativeluminance( const in vec3 color ) {\n\tvec3 weights = vec3( 0.2126, 0.7152, 0.0722 );\n\treturn dot( weights, color.rgb );\n}",cube_uv_reflection_fragment:"#ifdef envmap_type_cube_uv\n#define cubeuv_texturesize (1024.0)\nint getfacefromdirection(vec3 direction) {\n\tvec3 absdirection = abs(direction);\n\tint face = -1;\n\tif( absdirection.x > absdirection.z ) {\n\t\tif(absdirection.x > absdirection.y )\n\t\t\tface = direction.x > 0.0 ? 0 : 3;\n\t\telse\n\t\t\tface = direction.y > 0.0 ? 1 : 4;\n\t}\n\telse {\n\t\tif(absdirection.z > absdirection.y )\n\t\t\tface = direction.z > 0.0 ? 2 : 5;\n\t\telse\n\t\t\tface = direction.y > 0.0 ? 1 : 4;\n\t}\n\treturn face;\n}\n#define cubeuv_maxlods1 (log2(cubeuv_texturesize*0.25) - 1.0)\n#define cubeuv_rangeclamp (exp2((6.0 - 1.0) * 2.0))\nvec2 miplevelinfo( vec3 vec, float roughnesslevel, float roughness ) {\n\tfloat scale = exp2(cubeuv_maxlods1 - roughnesslevel);\n\tfloat dxroughness = dfdx(roughness);\n\tfloat dyroughness = dfdy(roughness);\n\tvec3 dx = dfdx( vec * scale * dxroughness );\n\tvec3 dy = dfdy( vec * scale * dyroughness );\n\tfloat d = max( dot( dx, dx ), dot( dy, dy ) );\n\td = clamp(d, 1.0, cubeuv_rangeclamp);\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( sampler2d envmap, 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",defaultnormal_vertex:"vec3 transformednormal = normalmatrix * objectnormal;\n#ifdef flip_sided\n\ttransformednormal = - transformednormal;\n#endif\n#ifdef use_tangent\n\tvec3 transformedtangent = normalmatrix * objecttangent;\n\t#ifdef flip_sided\n\t\ttransformedtangent = - transformedtangent;\n\t#endif\n#endif",displacementmap_pars_vertex:"#ifdef use_displacementmap\n\tuniform sampler2d displacementmap;\n\tuniform float displacementscale;\n\tuniform float displacementbias;\n#endif",displacementmap_vertex:"#ifdef use_displacementmap\n\ttransformed += normalize( objectnormal ) * ( texture2d( displacementmap, uv ).x * displacementscale + displacementbias );\n#endif",emissivemap_fragment:"#ifdef use_emissivemap\n\tvec4 emissivecolor = texture2d( emissivemap, vuv );\n\temissivecolor.rgb = emissivemaptexeltolinear( emissivecolor ).rgb;\n\ttotalemissiveradiance *= emissivecolor.rgb;\n#endif",emissivemap_pars_fragment:"#ifdef use_emissivemap\n\tuniform sampler2d emissivemap;\n#endif",encodings_fragment:"gl_fragcolor = lineartooutputtexel( gl_fragcolor );",encodings_pars_fragment:"\nvec4 lineartolinear( in vec4 value ) {\n\treturn value;\n}\nvec4 gammatolinear( in vec4 value, in float gammafactor ) {\n\treturn vec4( pow( value.rgb, vec3( gammafactor ) ), value.a );\n}\nvec4 lineartogamma( in vec4 value, in float gammafactor ) {\n\treturn vec4( pow( value.rgb, vec3( 1.0 / gammafactor ) ), value.a );\n}\nvec4 srgbtolinear( in vec4 value ) {\n\treturn vec4( mix( pow( value.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), value.rgb * 0.0773993808, vec3( lessthanequal( value.rgb, vec3( 0.04045 ) ) ) ), value.a );\n}\nvec4 lineartosrgb( in vec4 value ) {\n\treturn vec4( mix( pow( value.rgb, vec3( 0.41666 ) ) * 1.055 - vec3( 0.055 ), value.rgb * 12.92, vec3( lessthanequal( value.rgb, vec3( 0.0031308 ) ) ) ), value.a );\n}\nvec4 rgbetolinear( in vec4 value ) {\n\treturn vec4( value.rgb * exp2( value.a * 255.0 - 128.0 ), 1.0 );\n}\nvec4 lineartorgbe( in vec4 value ) {\n\tfloat maxcomponent = max( max( value.r, value.g ), value.b );\n\tfloat fexp = clamp( ceil( log2( maxcomponent ) ), -128.0, 127.0 );\n\treturn vec4( value.rgb / exp2( fexp ), ( fexp + 128.0 ) / 255.0 );\n}\nvec4 rgbmtolinear( in vec4 value, in float maxrange ) {\n\treturn vec4( value.rgb * value.a * maxrange, 1.0 );\n}\nvec4 lineartorgbm( in vec4 value, in float maxrange ) {\n\tfloat maxrgb = max( value.r, max( value.g, value.b ) );\n\tfloat m = clamp( maxrgb / maxrange, 0.0, 1.0 );\n\tm = ceil( m * 255.0 ) / 255.0;\n\treturn vec4( value.rgb / ( m * maxrange ), m );\n}\nvec4 rgbdtolinear( in vec4 value, in float maxrange ) {\n\treturn vec4( value.rgb * ( ( maxrange / 255.0 ) / value.a ), 1.0 );\n}\nvec4 lineartorgbd( in vec4 value, in float maxrange ) {\n\tfloat maxrgb = max( value.r, max( value.g, value.b ) );\n\tfloat d = max( maxrange / maxrgb, 1.0 );\n\td = min( floor( d ) / 255.0, 1.0 );\n\treturn vec4( value.rgb * ( d * ( 255.0 / maxrange ) ), d );\n}\nconst mat3 clogluvm = mat3( 0.2209, 0.3390, 0.4184, 0.1138, 0.6780, 0.7319, 0.0102, 0.1130, 0.2969 );\nvec4 lineartologluv( in vec4 value ) {\n\tvec3 xp_y_xyzp = clogluvm * value.rgb;\n\txp_y_xyzp = max( xp_y_xyzp, vec3( 1e-6, 1e-6, 1e-6 ) );\n\tvec4 vresult;\n\tvresult.xy = xp_y_xyzp.xy / xp_y_xyzp.z;\n\tfloat le = 2.0 * log2(xp_y_xyzp.y) + 127.0;\n\tvresult.w = fract( le );\n\tvresult.z = ( le - ( floor( vresult.w * 255.0 ) ) / 255.0 ) / 255.0;\n\treturn vresult;\n}\nconst mat3 clogluvinversem = mat3( 6.0014, -2.7008, -1.7996, -1.3320, 3.1029, -5.7721, 0.3008, -1.0882, 5.6268 );\nvec4 logluvtolinear( in vec4 value ) {\n\tfloat le = value.z * 255.0 + value.w;\n\tvec3 xp_y_xyzp;\n\txp_y_xyzp.y = exp2( ( le - 127.0 ) / 2.0 );\n\txp_y_xyzp.z = xp_y_xyzp.y / value.y;\n\txp_y_xyzp.x = value.x * xp_y_xyzp.z;\n\tvec3 vrgb = clogluvinversem * xp_y_xyzp.rgb;\n\treturn vec4( max( vrgb, 0.0 ), 1.0 );\n}",envmap_fragment:"#ifdef use_envmap\n\t#if defined( use_bumpmap ) || defined( use_normalmap ) || defined( phong )\n\t\tvec3 cameratovertex = normalize( vworldposition - cameraposition );\n\t\tvec3 worldnormal = inversetransformdirection( normal, viewmatrix );\n\t\t#ifdef envmap_mode_reflection\n\t\t\tvec3 reflectvec = reflect( cameratovertex, worldnormal );\n\t\t#else\n\t\t\tvec3 reflectvec = refract( cameratovertex, worldnormal, refractionratio );\n\t\t#endif\n\t#else\n\t\tvec3 reflectvec = vreflect;\n\t#endif\n\t#ifdef envmap_type_cube\n\t\tvec4 envcolor = texturecube( envmap, vec3( flipenvmap * reflectvec.x, reflectvec.yz ) );\n\t#elif defined( envmap_type_equirec )\n\t\tvec2 sampleuv;\n\t\treflectvec = normalize( reflectvec );\n\t\tsampleuv.y = asin( clamp( reflectvec.y, - 1.0, 1.0 ) ) * reciprocal_pi + 0.5;\n\t\tsampleuv.x = atan( reflectvec.z, reflectvec.x ) * reciprocal_pi2 + 0.5;\n\t\tvec4 envcolor = texture2d( envmap, sampleuv );\n\t#elif defined( envmap_type_sphere )\n\t\treflectvec = normalize( reflectvec );\n\t\tvec3 reflectview = normalize( ( viewmatrix * vec4( reflectvec, 0.0 ) ).xyz + vec3( 0.0, 0.0, 1.0 ) );\n\t\tvec4 envcolor = texture2d( envmap, reflectview.xy * 0.5 + 0.5 );\n\t#else\n\t\tvec4 envcolor = vec4( 0.0 );\n\t#endif\n\tenvcolor = envmaptexeltolinear( envcolor );\n\t#ifdef envmap_blending_multiply\n\t\toutgoinglight = mix( outgoinglight, outgoinglight * envcolor.xyz, specularstrength * reflectivity );\n\t#elif defined( envmap_blending_mix )\n\t\toutgoinglight = mix( outgoinglight, envcolor.xyz, specularstrength * reflectivity );\n\t#elif defined( envmap_blending_add )\n\t\toutgoinglight += envcolor.xyz * specularstrength * reflectivity;\n\t#endif\n#endif",envmap_pars_fragment:"#if defined( use_envmap ) || defined( physical )\n\tuniform float reflectivity;\n\tuniform float envmapintensity;\n#endif\n#ifdef use_envmap\n\t#if ! defined( physical ) && ( defined( use_bumpmap ) || defined( use_normalmap ) || defined( phong ) )\n\t\tvarying vec3 vworldposition;\n\t#endif\n\t#ifdef envmap_type_cube\n\t\tuniform samplercube envmap;\n\t#else\n\t\tuniform sampler2d envmap;\n\t#endif\n\tuniform float flipenvmap;\n\tuniform int maxmiplevel;\n\t#if defined( use_bumpmap ) || defined( use_normalmap ) || defined( phong ) || defined( physical )\n\t\tuniform float refractionratio;\n\t#else\n\t\tvarying vec3 vreflect;\n\t#endif\n#endif",envmap_pars_vertex:"#ifdef use_envmap\n\t#if defined( use_bumpmap ) || defined( use_normalmap ) || defined( phong )\n\t\tvarying vec3 vworldposition;\n\t#else\n\t\tvarying vec3 vreflect;\n\t\tuniform float refractionratio;\n\t#endif\n#endif",envmap_physical_pars_fragment:"#if defined( use_envmap ) && defined( physical )\n\tvec3 getlightprobeindirectirradiance( const in geometriccontext geometry, const in int maxmiplevel ) {\n\t\tvec3 worldnormal = inversetransformdirection( geometry.normal, viewmatrix );\n\t\t#ifdef envmap_type_cube\n\t\t\tvec3 queryvec = vec3( flipenvmap * worldnormal.x, worldnormal.yz );\n\t\t\t#ifdef texture_lod_ext\n\t\t\t\tvec4 envmapcolor = texturecubelodext( envmap, queryvec, float( maxmiplevel ) );\n\t\t\t#else\n\t\t\t\tvec4 envmapcolor = texturecube( envmap, queryvec, float( maxmiplevel ) );\n\t\t\t#endif\n\t\t\tenvmapcolor.rgb = envmaptexeltolinear( envmapcolor ).rgb;\n\t\t#elif defined( envmap_type_cube_uv )\n\t\t\tvec3 queryvec = vec3( flipenvmap * worldnormal.x, worldnormal.yz );\n\t\t\tvec4 envmapcolor = texturecubeuv( envmap, queryvec, 1.0 );\n\t\t#else\n\t\t\tvec4 envmapcolor = vec4( 0.0 );\n\t\t#endif\n\t\treturn pi * envmapcolor.rgb * envmapintensity;\n\t}\n\tfloat getspecularmiplevel( const in float blinnshininessexponent, const in int maxmiplevel ) {\n\t\tfloat maxmiplevelscalar = float( maxmiplevel );\n\t\tfloat desiredmiplevel = maxmiplevelscalar + 0.79248 - 0.5 * log2( pow2( blinnshininessexponent ) + 1.0 );\n\t\treturn clamp( desiredmiplevel, 0.0, maxmiplevelscalar );\n\t}\n\tvec3 getlightprobeindirectradiance( const in geometriccontext geometry, const in float blinnshininessexponent, const in int maxmiplevel ) {\n\t\t#ifdef envmap_mode_reflection\n\t\t\tvec3 reflectvec = reflect( -geometry.viewdir, geometry.normal );\n\t\t#else\n\t\t\tvec3 reflectvec = refract( -geometry.viewdir, geometry.normal, refractionratio );\n\t\t#endif\n\t\treflectvec = inversetransformdirection( reflectvec, viewmatrix );\n\t\tfloat specularmiplevel = getspecularmiplevel( blinnshininessexponent, maxmiplevel );\n\t\t#ifdef envmap_type_cube\n\t\t\tvec3 queryreflectvec = vec3( flipenvmap * reflectvec.x, reflectvec.yz );\n\t\t\t#ifdef texture_lod_ext\n\t\t\t\tvec4 envmapcolor = texturecubelodext( envmap, queryreflectvec, specularmiplevel );\n\t\t\t#else\n\t\t\t\tvec4 envmapcolor = texturecube( envmap, queryreflectvec, specularmiplevel );\n\t\t\t#endif\n\t\t\tenvmapcolor.rgb = envmaptexeltolinear( envmapcolor ).rgb;\n\t\t#elif defined( envmap_type_cube_uv )\n\t\t\tvec3 queryreflectvec = vec3( flipenvmap * reflectvec.x, reflectvec.yz );\n\t\t\tvec4 envmapcolor = texturecubeuv( envmap, queryreflectvec, blinnexponenttoggxroughness(blinnshininessexponent ));\n\t\t#elif defined( envmap_type_equirec )\n\t\t\tvec2 sampleuv;\n\t\t\tsampleuv.y = asin( clamp( reflectvec.y, - 1.0, 1.0 ) ) * reciprocal_pi + 0.5;\n\t\t\tsampleuv.x = atan( reflectvec.z, reflectvec.x ) * reciprocal_pi2 + 0.5;\n\t\t\t#ifdef texture_lod_ext\n\t\t\t\tvec4 envmapcolor = texture2dlodext( envmap, sampleuv, specularmiplevel );\n\t\t\t#else\n\t\t\t\tvec4 envmapcolor = texture2d( envmap, sampleuv, specularmiplevel );\n\t\t\t#endif\n\t\t\tenvmapcolor.rgb = envmaptexeltolinear( envmapcolor ).rgb;\n\t\t#elif defined( envmap_type_sphere )\n\t\t\tvec3 reflectview = normalize( ( viewmatrix * vec4( reflectvec, 0.0 ) ).xyz + vec3( 0.0,0.0,1.0 ) );\n\t\t\t#ifdef texture_lod_ext\n\t\t\t\tvec4 envmapcolor = texture2dlodext( envmap, reflectview.xy * 0.5 + 0.5, specularmiplevel );\n\t\t\t#else\n\t\t\t\tvec4 envmapcolor = texture2d( envmap, reflectview.xy * 0.5 + 0.5, specularmiplevel );\n\t\t\t#endif\n\t\t\tenvmapcolor.rgb = envmaptexeltolinear( envmapcolor ).rgb;\n\t\t#endif\n\t\treturn envmapcolor.rgb * envmapintensity;\n\t}\n#endif",envmap_vertex:"#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",fog_vertex:"#ifdef use_fog\n\tfogdepth = -mvposition.z;\n#endif",fog_pars_vertex:"#ifdef use_fog\n\tvarying float fogdepth;\n#endif",fog_fragment:"#ifdef use_fog\n\t#ifdef fog_exp2\n\t\tfloat fogfactor = whitecompliment( exp2( - fogdensity * fogdensity * fogdepth * fogdepth * log2 ) );\n\t#else\n\t\tfloat fogfactor = smoothstep( fognear, fogfar, fogdepth );\n\t#endif\n\tgl_fragcolor.rgb = mix( gl_fragcolor.rgb, fogcolor, fogfactor );\n#endif",fog_pars_fragment:"#ifdef use_fog\n\tuniform vec3 fogcolor;\n\tvarying float fogdepth;\n\t#ifdef fog_exp2\n\t\tuniform float fogdensity;\n\t#else\n\t\tuniform float fognear;\n\t\tuniform float fogfar;\n\t#endif\n#endif",gradientmap_pars_fragment:"#ifdef toon\n\tuniform sampler2d gradientmap;\n\tvec3 getgradientirradiance( vec3 normal, vec3 lightdirection ) {\n\t\tfloat dotnl = dot( normal, lightdirection );\n\t\tvec2 coord = vec2( dotnl * 0.5 + 0.5, 0.0 );\n\t\t#ifdef use_gradientmap\n\t\t\treturn texture2d( gradientmap, coord ).rgb;\n\t\t#else\n\t\t\treturn ( coord.x < 0.7 ) ? vec3( 0.7 ) : vec3( 1.0 );\n\t\t#endif\n\t}\n#endif",lightmap_fragment:"#ifdef use_lightmap\n\treflectedlight.indirectdiffuse += pi * texture2d( lightmap, vuv2 ).xyz * lightmapintensity;\n#endif",lightmap_pars_fragment:"#ifdef use_lightmap\n\tuniform sampler2d lightmap;\n\tuniform float lightmapintensity;\n#endif",lights_lambert_vertex:"vec3 diffuse = vec3( 1.0 );\ngeometriccontext geometry;\ngeometry.position = mvposition.xyz;\ngeometry.normal = normalize( transformednormal );\ngeometry.viewdir = normalize( -mvposition.xyz );\ngeometriccontext backgeometry;\nbackgeometry.position = geometry.position;\nbackgeometry.normal = -geometry.normal;\nbackgeometry.viewdir = geometry.viewdir;\nvlightfront = vec3( 0.0 );\nvindirectfront = vec3( 0.0 );\n#ifdef double_sided\n\tvlightback = vec3( 0.0 );\n\tvindirectback = vec3( 0.0 );\n#endif\nincidentlight directlight;\nfloat dotnl;\nvec3 directlightcolor_diffuse;\n#if num_point_lights > 0\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < num_point_lights; i ++ ) {\n\t\tgetpointdirectlightirradiance( pointlights[ i ], geometry, directlight );\n\t\tdotnl = dot( geometry.normal, directlight.direction );\n\t\tdirectlightcolor_diffuse = pi * directlight.color;\n\t\tvlightfront += saturate( dotnl ) * directlightcolor_diffuse;\n\t\t#ifdef double_sided\n\t\t\tvlightback += saturate( -dotnl ) * directlightcolor_diffuse;\n\t\t#endif\n\t}\n#endif\n#if num_spot_lights > 0\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < num_spot_lights; i ++ ) {\n\t\tgetspotdirectlightirradiance( spotlights[ i ], geometry, directlight );\n\t\tdotnl = dot( geometry.normal, directlight.direction );\n\t\tdirectlightcolor_diffuse = pi * directlight.color;\n\t\tvlightfront += saturate( dotnl ) * directlightcolor_diffuse;\n\t\t#ifdef double_sided\n\t\t\tvlightback += saturate( -dotnl ) * directlightcolor_diffuse;\n\t\t#endif\n\t}\n#endif\n#if num_dir_lights > 0\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < num_dir_lights; i ++ ) {\n\t\tgetdirectionaldirectlightirradiance( directionallights[ i ], geometry, directlight );\n\t\tdotnl = dot( geometry.normal, directlight.direction );\n\t\tdirectlightcolor_diffuse = pi * directlight.color;\n\t\tvlightfront += saturate( dotnl ) * directlightcolor_diffuse;\n\t\t#ifdef double_sided\n\t\t\tvlightback += saturate( -dotnl ) * directlightcolor_diffuse;\n\t\t#endif\n\t}\n#endif\n#if num_hemi_lights > 0\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < num_hemi_lights; i ++ ) {\n\t\tvindirectfront += gethemispherelightirradiance( hemispherelights[ i ], geometry );\n\t\t#ifdef double_sided\n\t\t\tvindirectback += gethemispherelightirradiance( hemispherelights[ i ], backgeometry );\n\t\t#endif\n\t}\n#endif",lights_pars_begin:"uniform vec3 ambientlightcolor;\nuniform vec3 lightprobe[ 9 ];\nvec3 shgetirradianceat( in vec3 normal, in vec3 shcoefficients[ 9 ] ) {\n\tfloat x = normal.x, y = normal.y, z = normal.z;\n\tvec3 result = shcoefficients[ 0 ] * 0.886227;\n\tresult += shcoefficients[ 1 ] * 2.0 * 0.511664 * y;\n\tresult += shcoefficients[ 2 ] * 2.0 * 0.511664 * z;\n\tresult += shcoefficients[ 3 ] * 2.0 * 0.511664 * x;\n\tresult += shcoefficients[ 4 ] * 2.0 * 0.429043 * x * y;\n\tresult += shcoefficients[ 5 ] * 2.0 * 0.429043 * y * z;\n\tresult += shcoefficients[ 6 ] * ( 0.743125 * z * z - 0.247708 );\n\tresult += shcoefficients[ 7 ] * 2.0 * 0.429043 * x * z;\n\tresult += shcoefficients[ 8 ] * 0.429043 * ( x * x - y * y );\n\treturn result;\n}\nvec3 getlightprobeirradiance( const in vec3 lightprobe[ 9 ], const in geometriccontext geometry ) {\n\tvec3 worldnormal = inversetransformdirection( geometry.normal, viewmatrix );\n\tvec3 irradiance = shgetirradianceat( worldnormal, lightprobe );\n\treturn irradiance;\n}\nvec3 getambientlightirradiance( const in vec3 ambientlightcolor ) {\n\tvec3 irradiance = ambientlightcolor;\n\t#ifndef physically_correct_lights\n\t\tirradiance *= pi;\n\t#endif\n\treturn irradiance;\n}\n#if num_dir_lights > 0\n\tstruct directionallight {\n\t\tvec3 direction;\n\t\tvec3 color;\n\t\tint shadow;\n\t\tfloat shadowbias;\n\t\tfloat shadowradius;\n\t\tvec2 shadowmapsize;\n\t};\n\tuniform directionallight directionallights[ num_dir_lights ];\n\tvoid getdirectionaldirectlightirradiance( const in directionallight directionallight, const in geometriccontext geometry, out incidentlight directlight ) {\n\t\tdirectlight.color = directionallight.color;\n\t\tdirectlight.direction = directionallight.direction;\n\t\tdirectlight.visible = true;\n\t}\n#endif\n#if num_point_lights > 0\n\tstruct pointlight {\n\t\tvec3 position;\n\t\tvec3 color;\n\t\tfloat distance;\n\t\tfloat decay;\n\t\tint shadow;\n\t\tfloat shadowbias;\n\t\tfloat shadowradius;\n\t\tvec2 shadowmapsize;\n\t\tfloat shadowcameranear;\n\t\tfloat shadowcamerafar;\n\t};\n\tuniform pointlight pointlights[ num_point_lights ];\n\tvoid getpointdirectlightirradiance( const in pointlight pointlight, const in geometriccontext geometry, out incidentlight directlight ) {\n\t\tvec3 lvector = pointlight.position - geometry.position;\n\t\tdirectlight.direction = normalize( lvector );\n\t\tfloat lightdistance = length( lvector );\n\t\tdirectlight.color = pointlight.color;\n\t\tdirectlight.color *= punctuallightintensitytoirradiancefactor( lightdistance, pointlight.distance, pointlight.decay );\n\t\tdirectlight.visible = ( directlight.color != vec3( 0.0 ) );\n\t}\n#endif\n#if num_spot_lights > 0\n\tstruct spotlight {\n\t\tvec3 position;\n\t\tvec3 direction;\n\t\tvec3 color;\n\t\tfloat distance;\n\t\tfloat decay;\n\t\tfloat conecos;\n\t\tfloat penumbracos;\n\t\tint shadow;\n\t\tfloat shadowbias;\n\t\tfloat shadowradius;\n\t\tvec2 shadowmapsize;\n\t};\n\tuniform spotlight spotlights[ num_spot_lights ];\n\tvoid getspotdirectlightirradiance( const in spotlight spotlight, const in geometriccontext geometry, out incidentlight directlight ) {\n\t\tvec3 lvector = spotlight.position - geometry.position;\n\t\tdirectlight.direction = normalize( lvector );\n\t\tfloat lightdistance = length( lvector );\n\t\tfloat anglecos = dot( directlight.direction, spotlight.direction );\n\t\tif ( anglecos > spotlight.conecos ) {\n\t\t\tfloat spoteffect = smoothstep( spotlight.conecos, spotlight.penumbracos, anglecos );\n\t\t\tdirectlight.color = spotlight.color;\n\t\t\tdirectlight.color *= spoteffect * punctuallightintensitytoirradiancefactor( lightdistance, spotlight.distance, spotlight.decay );\n\t\t\tdirectlight.visible = true;\n\t\t} else {\n\t\t\tdirectlight.color = vec3( 0.0 );\n\t\t\tdirectlight.visible = false;\n\t\t}\n\t}\n#endif\n#if num_rect_area_lights > 0\n\tstruct rectarealight {\n\t\tvec3 color;\n\t\tvec3 position;\n\t\tvec3 halfwidth;\n\t\tvec3 halfheight;\n\t};\n\tuniform sampler2d ltc_1;\tuniform sampler2d ltc_2;\n\tuniform rectarealight rectarealights[ num_rect_area_lights ];\n#endif\n#if num_hemi_lights > 0\n\tstruct hemispherelight {\n\t\tvec3 direction;\n\t\tvec3 skycolor;\n\t\tvec3 groundcolor;\n\t};\n\tuniform hemispherelight hemispherelights[ num_hemi_lights ];\n\tvec3 gethemispherelightirradiance( const in hemispherelight hemilight, const in geometriccontext geometry ) {\n\t\tfloat dotnl = dot( geometry.normal, hemilight.direction );\n\t\tfloat hemidiffuseweight = 0.5 * dotnl + 0.5;\n\t\tvec3 irradiance = mix( hemilight.groundcolor, hemilight.skycolor, hemidiffuseweight );\n\t\t#ifndef physically_correct_lights\n\t\t\tirradiance *= pi;\n\t\t#endif\n\t\treturn irradiance;\n\t}\n#endif",lights_phong_fragment:"blinnphongmaterial material;\nmaterial.diffusecolor = diffusecolor.rgb;\nmaterial.specularcolor = specular;\nmaterial.specularshininess = shininess;\nmaterial.specularstrength = specularstrength;",lights_phong_pars_fragment:"varying vec3 vviewposition;\n#ifndef flat_shaded\n\tvarying vec3 vnormal;\n#endif\nstruct blinnphongmaterial {\n\tvec3\tdiffusecolor;\n\tvec3\tspecularcolor;\n\tfloat\tspecularshininess;\n\tfloat\tspecularstrength;\n};\nvoid re_direct_blinnphong( const in incidentlight directlight, const in geometriccontext geometry, const in blinnphongmaterial material, inout reflectedlight reflectedlight ) {\n\t#ifdef toon\n\t\tvec3 irradiance = getgradientirradiance( geometry.normal, directlight.direction ) * directlight.color;\n\t#else\n\t\tfloat dotnl = saturate( dot( geometry.normal, directlight.direction ) );\n\t\tvec3 irradiance = dotnl * directlight.color;\n\t#endif\n\t#ifndef physically_correct_lights\n\t\tirradiance *= pi;\n\t#endif\n\treflectedlight.directdiffuse += irradiance * brdf_diffuse_lambert( material.diffusecolor );\n\treflectedlight.directspecular += irradiance * brdf_specular_blinnphong( directlight, geometry, material.specularcolor, material.specularshininess ) * material.specularstrength;\n}\nvoid re_indirectdiffuse_blinnphong( const in vec3 irradiance, const in geometriccontext geometry, const in blinnphongmaterial material, inout reflectedlight reflectedlight ) {\n\treflectedlight.indirectdiffuse += irradiance * brdf_diffuse_lambert( material.diffusecolor );\n}\n#define re_direct\t\t\t\tre_direct_blinnphong\n#define re_indirectdiffuse\t\tre_indirectdiffuse_blinnphong\n#define material_lightprobelod( material )\t(0)",lights_physical_fragment:"physicalmaterial material;\nmaterial.diffusecolor = diffusecolor.rgb * ( 1.0 - metalnessfactor );\nmaterial.specularroughness = clamp( roughnessfactor, 0.04, 1.0 );\n#ifdef standard\n\tmaterial.specularcolor = mix( vec3( default_specular_coefficient ), diffusecolor.rgb, metalnessfactor );\n#else\n\tmaterial.specularcolor = mix( vec3( maximum_specular_coefficient * pow2( reflectivity ) ), diffusecolor.rgb, metalnessfactor );\n\tmaterial.clearcoat = saturate( clearcoat );\tmaterial.clearcoatroughness = clamp( clearcoatroughness, 0.04, 1.0 );\n#endif",lights_physical_pars_fragment:"struct physicalmaterial {\n\tvec3\tdiffusecolor;\n\tfloat\tspecularroughness;\n\tvec3\tspecularcolor;\n\t#ifndef standard\n\t\tfloat clearcoat;\n\t\tfloat clearcoatroughness;\n\t#endif\n};\n#define maximum_specular_coefficient 0.16\n#define default_specular_coefficient 0.04\nfloat clearcoatdhrapprox( const in float roughness, const in float dotnl ) {\n\treturn default_specular_coefficient + ( 1.0 - default_specular_coefficient ) * ( pow( 1.0 - dotnl, 5.0 ) * pow( 1.0 - roughness, 2.0 ) );\n}\n#if num_rect_area_lights > 0\n\tvoid re_direct_rectarea_physical( const in rectarealight rectarealight, const in geometriccontext geometry, const in physicalmaterial material, inout reflectedlight reflectedlight ) {\n\t\tvec3 normal = geometry.normal;\n\t\tvec3 viewdir = geometry.viewdir;\n\t\tvec3 position = geometry.position;\n\t\tvec3 lightpos = rectarealight.position;\n\t\tvec3 halfwidth = rectarealight.halfwidth;\n\t\tvec3 halfheight = rectarealight.halfheight;\n\t\tvec3 lightcolor = rectarealight.color;\n\t\tfloat roughness = material.specularroughness;\n\t\tvec3 rectcoords[ 4 ];\n\t\trectcoords[ 0 ] = lightpos + halfwidth - halfheight;\t\trectcoords[ 1 ] = lightpos - halfwidth - halfheight;\n\t\trectcoords[ 2 ] = lightpos - halfwidth + halfheight;\n\t\trectcoords[ 3 ] = lightpos + halfwidth + halfheight;\n\t\tvec2 uv = ltc_uv( normal, viewdir, roughness );\n\t\tvec4 t1 = texture2d( ltc_1, uv );\n\t\tvec4 t2 = texture2d( ltc_2, uv );\n\t\tmat3 minv = mat3(\n\t\t\tvec3( t1.x, 0, t1.y ),\n\t\t\tvec3( 0, 1, 0 ),\n\t\t\tvec3( t1.z, 0, t1.w )\n\t\t);\n\t\tvec3 fresnel = ( material.specularcolor * t2.x + ( vec3( 1.0 ) - material.specularcolor ) * t2.y );\n\t\treflectedlight.directspecular += lightcolor * fresnel * ltc_evaluate( normal, viewdir, position, minv, rectcoords );\n\t\treflectedlight.directdiffuse += lightcolor * material.diffusecolor * ltc_evaluate( normal, viewdir, position, mat3( 1.0 ), rectcoords );\n\t}\n#endif\nvoid re_direct_physical( const in incidentlight directlight, const in geometriccontext geometry, const in physicalmaterial material, inout reflectedlight reflectedlight ) {\n\tfloat dotnl = saturate( dot( geometry.normal, directlight.direction ) );\n\tvec3 irradiance = dotnl * directlight.color;\n\t#ifndef physically_correct_lights\n\t\tirradiance *= pi;\n\t#endif\n\t#ifndef standard\n\t\tfloat clearcoatdhr = material.clearcoat * clearcoatdhrapprox( material.clearcoatroughness, dotnl );\n\t#else\n\t\tfloat clearcoatdhr = 0.0;\n\t#endif\n\treflectedlight.directspecular += ( 1.0 - clearcoatdhr ) * irradiance * brdf_specular_ggx( directlight, geometry, material.specularcolor, material.specularroughness );\n\treflectedlight.directdiffuse += ( 1.0 - clearcoatdhr ) * irradiance * brdf_diffuse_lambert( material.diffusecolor );\n\t#ifndef standard\n\t\treflectedlight.directspecular += irradiance * material.clearcoat * brdf_specular_ggx( directlight, geometry, vec3( default_specular_coefficient ), material.clearcoatroughness );\n\t#endif\n}\nvoid re_indirectdiffuse_physical( const in vec3 irradiance, const in geometriccontext geometry, const in physicalmaterial material, inout reflectedlight reflectedlight ) {\n\t#ifndef envmap_type_cube_uv\n\t\treflectedlight.indirectdiffuse += irradiance * brdf_diffuse_lambert( material.diffusecolor );\n\t#endif\n}\nvoid re_indirectspecular_physical( const in vec3 radiance, const in vec3 irradiance, 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\tfloat clearcoatinv = 1.0 - clearcoatdhr;\n\t#if defined( envmap_type_cube_uv )\n\t\tvec3 singlescattering = vec3( 0.0 );\n\t\tvec3 multiscattering = vec3( 0.0 );\n\t\tvec3 cosineweightedirradiance = irradiance * reciprocal_pi;\n\t\tbrdf_specular_multiscattering_environment( geometry, material.specularcolor, material.specularroughness, singlescattering, multiscattering );\n\t\tvec3 diffuse = material.diffusecolor * ( 1.0 - ( singlescattering + multiscattering ) );\n\t\treflectedlight.indirectspecular += clearcoatinv * radiance * singlescattering;\n\t\treflectedlight.indirectdiffuse += multiscattering * cosineweightedirradiance;\n\t\treflectedlight.indirectdiffuse += diffuse * cosineweightedirradiance;\n\t#else\n\t\treflectedlight.indirectspecular += clearcoatinv * radiance * brdf_specular_ggx_environment( geometry, material.specularcolor, material.specularroughness );\n\t#endif\n\t#ifndef standard\n\t\treflectedlight.indirectspecular += clearcoatradiance * material.clearcoat * brdf_specular_ggx_environment( geometry, vec3( default_specular_coefficient ), material.clearcoatroughness );\n\t#endif\n}\n#define re_direct\t\t\t\tre_direct_physical\n#define re_direct_rectarea\t\tre_direct_rectarea_physical\n#define re_indirectdiffuse\t\tre_indirectdiffuse_physical\n#define re_indirectspecular\t\tre_indirectspecular_physical\n#define material_blinnshininessexponent( material ) ggxroughnesstoblinnexponent( material.specularroughness )\n#define material_clearcoat_blinnshininessexponent( material ) ggxroughnesstoblinnexponent( material.clearcoatroughness )\nfloat computespecularocclusion( const in float dotnv, const in float ambientocclusion, const in float roughness ) {\n\treturn saturate( pow( dotnv + ambientocclusion, exp2( - 16.0 * roughness - 1.0 ) ) - 1.0 + ambientocclusion );\n}",lights_fragment_begin:"\ngeometriccontext geometry;\ngeometry.position = - vviewposition;\ngeometry.normal = normal;\ngeometry.viewdir = normalize( vviewposition );\nincidentlight directlight;\n#if ( num_point_lights > 0 ) && defined( re_direct )\n\tpointlight pointlight;\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < num_point_lights; i ++ ) {\n\t\tpointlight = pointlights[ i ];\n\t\tgetpointdirectlightirradiance( pointlight, geometry, directlight );\n\t\t#ifdef use_shadowmap\n\t\tdirectlight.color *= all( bvec2( pointlight.shadow, directlight.visible ) ) ? getpointshadow( pointshadowmap[ i ], pointlight.shadowmapsize, pointlight.shadowbias, pointlight.shadowradius, vpointshadowcoord[ i ], pointlight.shadowcameranear, pointlight.shadowcamerafar ) : 1.0;\n\t\t#endif\n\t\tre_direct( directlight, geometry, material, reflectedlight );\n\t}\n#endif\n#if ( num_spot_lights > 0 ) && defined( re_direct )\n\tspotlight spotlight;\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < num_spot_lights; i ++ ) {\n\t\tspotlight = spotlights[ i ];\n\t\tgetspotdirectlightirradiance( spotlight, geometry, directlight );\n\t\t#ifdef use_shadowmap\n\t\tdirectlight.color *= all( bvec2( spotlight.shadow, directlight.visible ) ) ? getshadow( spotshadowmap[ i ], spotlight.shadowmapsize, spotlight.shadowbias, spotlight.shadowradius, vspotshadowcoord[ i ] ) : 1.0;\n\t\t#endif\n\t\tre_direct( directlight, geometry, material, reflectedlight );\n\t}\n#endif\n#if ( num_dir_lights > 0 ) && defined( re_direct )\n\tdirectionallight directionallight;\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < num_dir_lights; i ++ ) {\n\t\tdirectionallight = directionallights[ i ];\n\t\tgetdirectionaldirectlightirradiance( directionallight, geometry, directlight );\n\t\t#ifdef use_shadowmap\n\t\tdirectlight.color *= all( bvec2( directionallight.shadow, directlight.visible ) ) ? getshadow( directionalshadowmap[ i ], directionallight.shadowmapsize, directionallight.shadowbias, directionallight.shadowradius, vdirectionalshadowcoord[ i ] ) : 1.0;\n\t\t#endif\n\t\tre_direct( directlight, geometry, material, reflectedlight );\n\t}\n#endif\n#if ( num_rect_area_lights > 0 ) && defined( re_direct_rectarea )\n\trectarealight rectarealight;\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < num_rect_area_lights; i ++ ) {\n\t\trectarealight = rectarealights[ i ];\n\t\tre_direct_rectarea( rectarealight, geometry, material, reflectedlight );\n\t}\n#endif\n#if defined( re_indirectdiffuse )\n\tvec3 irradiance = getambientlightirradiance( ambientlightcolor );\n\tirradiance += getlightprobeirradiance( lightprobe, geometry );\n\t#if ( num_hemi_lights > 0 )\n\t\t#pragma unroll_loop\n\t\tfor ( int i = 0; i < num_hemi_lights; i ++ ) {\n\t\t\tirradiance += gethemispherelightirradiance( hemispherelights[ i ], geometry );\n\t\t}\n\t#endif\n#endif\n#if defined( re_indirectspecular )\n\tvec3 radiance = vec3( 0.0 );\n\tvec3 clearcoatradiance = vec3( 0.0 );\n#endif",lights_fragment_maps:"#if defined( re_indirectdiffuse )\n\t#ifdef use_lightmap\n\t\tvec3 lightmapirradiance = texture2d( lightmap, vuv2 ).xyz * lightmapintensity;\n\t\t#ifndef physically_correct_lights\n\t\t\tlightmapirradiance *= pi;\n\t\t#endif\n\t\tirradiance += lightmapirradiance;\n\t#endif\n\t#if defined( use_envmap ) && defined( physical ) && defined( envmap_type_cube_uv )\n\t\tirradiance += getlightprobeindirectirradiance( geometry, maxmiplevel );\n\t#endif\n#endif\n#if defined( use_envmap ) && defined( re_indirectspecular )\n\tradiance += getlightprobeindirectradiance( geometry, material_blinnshininessexponent( material ), maxmiplevel );\n\t#ifndef standard\n\t\tclearcoatradiance += getlightprobeindirectradiance( geometry, material_clearcoat_blinnshininessexponent( material ), maxmiplevel );\n\t#endif\n#endif",lights_fragment_end:"#if defined( re_indirectdiffuse )\n\tre_indirectdiffuse( irradiance, geometry, material, reflectedlight );\n#endif\n#if defined( re_indirectspecular )\n\tre_indirectspecular( radiance, irradiance, clearcoatradiance, geometry, material, reflectedlight );\n#endif",logdepthbuf_fragment:"#if defined( use_logdepthbuf ) && defined( use_logdepthbuf_ext )\n\tgl_fragdepthext = log2( vfragdepth ) * logdepthbuffc * 0.5;\n#endif",logdepthbuf_pars_fragment:"#if defined( use_logdepthbuf ) && defined( use_logdepthbuf_ext )\n\tuniform float logdepthbuffc;\n\tvarying float vfragdepth;\n#endif",logdepthbuf_pars_vertex:"#ifdef use_logdepthbuf\n\t#ifdef use_logdepthbuf_ext\n\t\tvarying float vfragdepth;\n\t#else\n\t\tuniform float logdepthbuffc;\n\t#endif\n#endif",logdepthbuf_vertex:"#ifdef use_logdepthbuf\n\t#ifdef use_logdepthbuf_ext\n\t\tvfragdepth = 1.0 + gl_position.w;\n\t#else\n\t\tgl_position.z = log2( max( epsilon, gl_position.w + 1.0 ) ) * logdepthbuffc - 1.0;\n\t\tgl_position.z *= gl_position.w;\n\t#endif\n#endif",map_fragment:"#ifdef use_map\n\tvec4 texelcolor = texture2d( map, vuv );\n\ttexelcolor = maptexeltolinear( texelcolor );\n\tdiffusecolor *= texelcolor;\n#endif",map_pars_fragment:"#ifdef use_map\n\tuniform sampler2d map;\n#endif",map_particle_fragment:"#ifdef use_map\n\tvec2 uv = ( uvtransform * vec3( gl_pointcoord.x, 1.0 - gl_pointcoord.y, 1 ) ).xy;\n\tvec4 maptexel = texture2d( map, uv );\n\tdiffusecolor *= maptexeltolinear( maptexel );\n#endif",map_particle_pars_fragment:"#ifdef use_map\n\tuniform mat3 uvtransform;\n\tuniform sampler2d map;\n#endif",metalnessmap_fragment:"float metalnessfactor = metalness;\n#ifdef use_metalnessmap\n\tvec4 texelmetalness = texture2d( metalnessmap, vuv );\n\tmetalnessfactor *= texelmetalness.b;\n#endif",metalnessmap_pars_fragment:"#ifdef use_metalnessmap\n\tuniform sampler2d metalnessmap;\n#endif",morphnormal_vertex:"#ifdef use_morphnormals\n\tobjectnormal += ( morphnormal0 - normal ) * morphtargetinfluences[ 0 ];\n\tobjectnormal += ( morphnormal1 - normal ) * morphtargetinfluences[ 1 ];\n\tobjectnormal += ( morphnormal2 - normal ) * morphtargetinfluences[ 2 ];\n\tobjectnormal += ( morphnormal3 - normal ) * morphtargetinfluences[ 3 ];\n#endif",morphtarget_pars_vertex:"#ifdef use_morphtargets\n\t#ifndef use_morphnormals\n\tuniform float morphtargetinfluences[ 8 ];\n\t#else\n\tuniform float morphtargetinfluences[ 4 ];\n\t#endif\n#endif",morphtarget_vertex:"#ifdef use_morphtargets\n\ttransformed += ( morphtarget0 - position ) * morphtargetinfluences[ 0 ];\n\ttransformed += ( morphtarget1 - position ) * morphtargetinfluences[ 1 ];\n\ttransformed += ( morphtarget2 - position ) * morphtargetinfluences[ 2 ];\n\ttransformed += ( morphtarget3 - position ) * morphtargetinfluences[ 3 ];\n\t#ifndef use_morphnormals\n\ttransformed += ( morphtarget4 - position ) * morphtargetinfluences[ 4 ];\n\ttransformed += ( morphtarget5 - position ) * morphtargetinfluences[ 5 ];\n\ttransformed += ( morphtarget6 - position ) * morphtargetinfluences[ 6 ];\n\ttransformed += ( morphtarget7 - position ) * morphtargetinfluences[ 7 ];\n\t#endif\n#endif",normal_fragment_begin:"#ifdef flat_shaded\n\tvec3 fdx = vec3( dfdx( vviewposition.x ), dfdx( vviewposition.y ), dfdx( vviewposition.z ) );\n\tvec3 fdy = vec3( dfdy( vviewposition.x ), dfdy( vviewposition.y ), dfdy( vviewposition.z ) );\n\tvec3 normal = normalize( cross( fdx, fdy ) );\n#else\n\tvec3 normal = normalize( vnormal );\n\t#ifdef double_sided\n\t\tnormal = normal * ( float( gl_frontfacing ) * 2.0 - 1.0 );\n\t#endif\n\t#ifdef use_tangent\n\t\tvec3 tangent = normalize( vtangent );\n\t\tvec3 bitangent = normalize( vbitangent );\n\t\t#ifdef double_sided\n\t\t\ttangent = tangent * ( float( gl_frontfacing ) * 2.0 - 1.0 );\n\t\t\tbitangent = bitangent * ( float( gl_frontfacing ) * 2.0 - 1.0 );\n\t\t#endif\n\t#endif\n#endif",normal_fragment_maps:"#ifdef use_normalmap\n\t#ifdef objectspace_normalmap\n\t\tnormal = texture2d( normalmap, vuv ).xyz * 2.0 - 1.0;\n\t\t#ifdef flip_sided\n\t\t\tnormal = - normal;\n\t\t#endif\n\t\t#ifdef double_sided\n\t\t\tnormal = normal * ( float( gl_frontfacing ) * 2.0 - 1.0 );\n\t\t#endif\n\t\tnormal = normalize( normalmatrix * normal );\n\t#else\n\t\t#ifdef use_tangent\n\t\t\tmat3 vtbn = mat3( tangent, bitangent, normal );\n\t\t\tvec3 mapn = texture2d( normalmap, vuv ).xyz * 2.0 - 1.0;\n\t\t\tmapn.xy = normalscale * mapn.xy;\n\t\t\tnormal = normalize( vtbn * mapn );\n\t\t#else\n\t\t\tnormal = perturbnormal2arb( -vviewposition, normal );\n\t\t#endif\n\t#endif\n#elif defined( use_bumpmap )\n\tnormal = perturbnormalarb( -vviewposition, normal, dhdxy_fwd() );\n#endif",normalmap_pars_fragment:"#ifdef use_normalmap\n\tuniform sampler2d normalmap;\n\tuniform vec2 normalscale;\n\t#ifdef objectspace_normalmap\n\t\tuniform mat3 normalmatrix;\n\t#else\n\t\tvec3 perturbnormal2arb( vec3 eye_pos, vec3 surf_norm ) {\n\t\t\tvec3 q0 = vec3( dfdx( eye_pos.x ), dfdx( eye_pos.y ), dfdx( eye_pos.z ) );\n\t\t\tvec3 q1 = vec3( dfdy( eye_pos.x ), dfdy( eye_pos.y ), dfdy( eye_pos.z ) );\n\t\t\tvec2 st0 = dfdx( vuv.st );\n\t\t\tvec2 st1 = dfdy( vuv.st );\n\t\t\tfloat scale = sign( st1.t * st0.s - st0.t * st1.s );\n\t\t\tvec3 s = normalize( ( q0 * st1.t - q1 * st0.t ) * scale );\n\t\t\tvec3 t = normalize( ( - q0 * st1.s + q1 * st0.s ) * scale );\n\t\t\tvec3 n = normalize( surf_norm );\n\t\t\tmat3 tsn = mat3( s, t, n );\n\t\t\tvec3 mapn = texture2d( normalmap, vuv ).xyz * 2.0 - 1.0;\n\t\t\tmapn.xy *= normalscale;\n\t\t\tmapn.xy *= ( float( gl_frontfacing ) * 2.0 - 1.0 );\n\t\t\treturn normalize( tsn * mapn );\n\t\t}\n\t#endif\n#endif",packing:"vec3 packnormaltorgb( const in vec3 normal ) {\n\treturn normalize( normal ) * 0.5 + 0.5;\n}\nvec3 unpackrgbtonormal( const in vec3 rgb ) {\n\treturn 2.0 * rgb.xyz - 1.0;\n}\nconst float packupscale = 256. / 255.;const float unpackdownscale = 255. / 256.;\nconst vec3 packfactors = vec3( 256. * 256. * 256., 256. * 256., 256. );\nconst vec4 unpackfactors = unpackdownscale / vec4( packfactors, 1. );\nconst float shiftright8 = 1. / 256.;\nvec4 packdepthtorgba( const in float v ) {\n\tvec4 r = vec4( fract( v * packfactors ), v );\n\tr.yzw -= r.xyz * shiftright8;\treturn r * packupscale;\n}\nfloat unpackrgbatodepth( const in vec4 v ) {\n\treturn dot( v, unpackfactors );\n}\nfloat viewztoorthographicdepth( const in float viewz, const in float near, const in float far ) {\n\treturn ( viewz + near ) / ( near - far );\n}\nfloat orthographicdepthtoviewz( const in float linearclipz, const in float near, const in float far ) {\n\treturn linearclipz * ( near - far ) - near;\n}\nfloat viewztoperspectivedepth( const in float viewz, const in float near, const in float far ) {\n\treturn (( near + viewz ) * far ) / (( far - near ) * viewz );\n}\nfloat perspectivedepthtoviewz( const in float invclipz, const in float near, const in float far ) {\n\treturn ( near * far ) / ( ( far - near ) * invclipz - far );\n}",premultiplied_alpha_fragment:"#ifdef premultiplied_alpha\n\tgl_fragcolor.rgb *= gl_fragcolor.a;\n#endif",project_vertex:"vec4 mvposition = modelviewmatrix * vec4( transformed, 1.0 );\ngl_position = projectionmatrix * mvposition;",dithering_fragment:"#if defined( dithering )\n\tgl_fragcolor.rgb = dithering( gl_fragcolor.rgb );\n#endif",dithering_pars_fragment:"#if defined( dithering )\n\tvec3 dithering( vec3 color ) {\n\t\tfloat grid_position = rand( gl_fragcoord.xy );\n\t\tvec3 dither_shift_rgb = vec3( 0.25 / 255.0, -0.25 / 255.0, 0.25 / 255.0 );\n\t\tdither_shift_rgb = mix( 2.0 * dither_shift_rgb, -2.0 * dither_shift_rgb, grid_position );\n\t\treturn color + dither_shift_rgb;\n\t}\n#endif",roughnessmap_fragment:"float roughnessfactor = roughness;\n#ifdef use_roughnessmap\n\tvec4 texelroughness = texture2d( roughnessmap, vuv );\n\troughnessfactor *= texelroughness.g;\n#endif",roughnessmap_pars_fragment:"#ifdef use_roughnessmap\n\tuniform sampler2d roughnessmap;\n#endif",shadowmap_pars_fragment:"#ifdef use_shadowmap\n\t#if num_dir_lights > 0\n\t\tuniform sampler2d directionalshadowmap[ num_dir_lights ];\n\t\tvarying vec4 vdirectionalshadowcoord[ num_dir_lights ];\n\t#endif\n\t#if num_spot_lights > 0\n\t\tuniform sampler2d spotshadowmap[ num_spot_lights ];\n\t\tvarying vec4 vspotshadowcoord[ num_spot_lights ];\n\t#endif\n\t#if num_point_lights > 0\n\t\tuniform sampler2d pointshadowmap[ num_point_lights ];\n\t\tvarying vec4 vpointshadowcoord[ num_point_lights ];\n\t#endif\n\tfloat texture2dcompare( sampler2d depths, vec2 uv, float compare ) {\n\t\treturn step( compare, unpackrgbatodepth( texture2d( depths, uv ) ) );\n\t}\n\tfloat texture2dshadowlerp( sampler2d depths, vec2 size, vec2 uv, float compare ) {\n\t\tconst vec2 offset = vec2( 0.0, 1.0 );\n\t\tvec2 texelsize = vec2( 1.0 ) / size;\n\t\tvec2 centroiduv = floor( uv * size + 0.5 ) / size;\n\t\tfloat lb = texture2dcompare( depths, centroiduv + texelsize * offset.xx, compare );\n\t\tfloat lt = texture2dcompare( depths, centroiduv + texelsize * offset.xy, compare );\n\t\tfloat rb = texture2dcompare( depths, centroiduv + texelsize * offset.yx, compare );\n\t\tfloat rt = texture2dcompare( depths, centroiduv + texelsize * offset.yy, compare );\n\t\tvec2 f = fract( uv * size + 0.5 );\n\t\tfloat a = mix( lb, lt, f.y );\n\t\tfloat b = mix( rb, rt, f.y );\n\t\tfloat c = mix( a, b, f.x );\n\t\treturn c;\n\t}\n\tfloat getshadow( sampler2d shadowmap, vec2 shadowmapsize, float shadowbias, float shadowradius, vec4 shadowcoord ) {\n\t\tfloat shadow = 1.0;\n\t\tshadowcoord.xyz /= shadowcoord.w;\n\t\tshadowcoord.z += shadowbias;\n\t\tbvec4 infrustumvec = bvec4 ( shadowcoord.x >= 0.0, shadowcoord.x <= 1.0, shadowcoord.y >= 0.0, shadowcoord.y <= 1.0 );\n\t\tbool infrustum = all( infrustumvec );\n\t\tbvec2 frustumtestvec = bvec2( infrustum, shadowcoord.z <= 1.0 );\n\t\tbool frustumtest = all( frustumtestvec );\n\t\tif ( frustumtest ) {\n\t\t#if defined( shadowmap_type_pcf )\n\t\t\tvec2 texelsize = vec2( 1.0 ) / shadowmapsize;\n\t\t\tfloat dx0 = - texelsize.x * shadowradius;\n\t\t\tfloat dy0 = - texelsize.y * shadowradius;\n\t\t\tfloat dx1 = + texelsize.x * shadowradius;\n\t\t\tfloat dy1 = + texelsize.y * shadowradius;\n\t\t\tfloat dx2 = dx0 / 2.0;\n\t\t\tfloat dy2 = dy0 / 2.0;\n\t\t\tfloat dx3 = dx1 / 2.0;\n\t\t\tfloat dy3 = dy1 / 2.0;\n\t\t\tshadow = (\n\t\t\t\ttexture2dcompare( shadowmap, shadowcoord.xy + vec2( dx0, dy0 ), shadowcoord.z ) +\n\t\t\t\ttexture2dcompare( shadowmap, shadowcoord.xy + vec2( 0.0, dy0 ), shadowcoord.z ) +\n\t\t\t\ttexture2dcompare( shadowmap, shadowcoord.xy + vec2( dx1, dy0 ), shadowcoord.z ) +\n\t\t\t\ttexture2dcompare( shadowmap, shadowcoord.xy + vec2( dx2, dy2 ), shadowcoord.z ) +\n\t\t\t\ttexture2dcompare( shadowmap, shadowcoord.xy + vec2( 0.0, dy2 ), shadowcoord.z ) +\n\t\t\t\ttexture2dcompare( shadowmap, shadowcoord.xy + vec2( dx3, dy2 ), shadowcoord.z ) +\n\t\t\t\ttexture2dcompare( shadowmap, shadowcoord.xy + vec2( dx0, 0.0 ), shadowcoord.z ) +\n\t\t\t\ttexture2dcompare( shadowmap, shadowcoord.xy + vec2( dx2, 0.0 ), shadowcoord.z ) +\n\t\t\t\ttexture2dcompare( shadowmap, shadowcoord.xy, shadowcoord.z ) +\n\t\t\t\ttexture2dcompare( shadowmap, shadowcoord.xy + vec2( dx3, 0.0 ), shadowcoord.z ) +\n\t\t\t\ttexture2dcompare( shadowmap, shadowcoord.xy + vec2( dx1, 0.0 ), shadowcoord.z ) +\n\t\t\t\ttexture2dcompare( shadowmap, shadowcoord.xy + vec2( dx2, dy3 ), shadowcoord.z ) +\n\t\t\t\ttexture2dcompare( shadowmap, shadowcoord.xy + vec2( 0.0, dy3 ), shadowcoord.z ) +\n\t\t\t\ttexture2dcompare( shadowmap, shadowcoord.xy + vec2( dx3, dy3 ), shadowcoord.z ) +\n\t\t\t\ttexture2dcompare( shadowmap, shadowcoord.xy + vec2( dx0, dy1 ), shadowcoord.z ) +\n\t\t\t\ttexture2dcompare( shadowmap, shadowcoord.xy + vec2( 0.0, dy1 ), shadowcoord.z ) +\n\t\t\t\ttexture2dcompare( shadowmap, shadowcoord.xy + vec2( dx1, dy1 ), shadowcoord.z )\n\t\t\t) * ( 1.0 / 17.0 );\n\t\t#elif defined( shadowmap_type_pcf_soft )\n\t\t\tvec2 texelsize = vec2( 1.0 ) / shadowmapsize;\n\t\t\tfloat dx0 = - texelsize.x * shadowradius;\n\t\t\tfloat dy0 = - texelsize.y * shadowradius;\n\t\t\tfloat dx1 = + texelsize.x * shadowradius;\n\t\t\tfloat dy1 = + texelsize.y * shadowradius;\n\t\t\tshadow = (\n\t\t\t\ttexture2dshadowlerp( shadowmap, shadowmapsize, shadowcoord.xy + vec2( dx0, dy0 ), shadowcoord.z ) +\n\t\t\t\ttexture2dshadowlerp( shadowmap, shadowmapsize, shadowcoord.xy + vec2( 0.0, dy0 ), shadowcoord.z ) +\n\t\t\t\ttexture2dshadowlerp( shadowmap, shadowmapsize, shadowcoord.xy + vec2( dx1, dy0 ), shadowcoord.z ) +\n\t\t\t\ttexture2dshadowlerp( shadowmap, shadowmapsize, shadowcoord.xy + vec2( dx0, 0.0 ), shadowcoord.z ) +\n\t\t\t\ttexture2dshadowlerp( shadowmap, shadowmapsize, shadowcoord.xy, shadowcoord.z ) +\n\t\t\t\ttexture2dshadowlerp( shadowmap, shadowmapsize, shadowcoord.xy + vec2( dx1, 0.0 ), shadowcoord.z ) +\n\t\t\t\ttexture2dshadowlerp( shadowmap, shadowmapsize, shadowcoord.xy + vec2( dx0, dy1 ), shadowcoord.z ) +\n\t\t\t\ttexture2dshadowlerp( shadowmap, shadowmapsize, shadowcoord.xy + vec2( 0.0, dy1 ), shadowcoord.z ) +\n\t\t\t\ttexture2dshadowlerp( shadowmap, shadowmapsize, shadowcoord.xy + vec2( dx1, dy1 ), shadowcoord.z )\n\t\t\t) * ( 1.0 / 9.0 );\n\t\t#else\n\t\t\tshadow = texture2dcompare( shadowmap, shadowcoord.xy, shadowcoord.z );\n\t\t#endif\n\t\t}\n\t\treturn shadow;\n\t}\n\tvec2 cubetouv( vec3 v, float texelsizey ) {\n\t\tvec3 absv = abs( v );\n\t\tfloat scaletocube = 1.0 / max( absv.x, max( absv.y, absv.z ) );\n\t\tabsv *= scaletocube;\n\t\tv *= scaletocube * ( 1.0 - 2.0 * texelsizey );\n\t\tvec2 planar = v.xy;\n\t\tfloat almostatexel = 1.5 * texelsizey;\n\t\tfloat almostone = 1.0 - almostatexel;\n\t\tif ( absv.z >= almostone ) {\n\t\t\tif ( v.z > 0.0 )\n\t\t\t\tplanar.x = 4.0 - v.x;\n\t\t} else if ( absv.x >= almostone ) {\n\t\t\tfloat signx = sign( v.x );\n\t\t\tplanar.x = v.z * signx + 2.0 * signx;\n\t\t} else if ( absv.y >= almostone ) {\n\t\t\tfloat signy = sign( v.y );\n\t\t\tplanar.x = v.x + 2.0 * signy + 2.0;\n\t\t\tplanar.y = v.z * signy - 2.0;\n\t\t}\n\t\treturn vec2( 0.125, 0.25 ) * planar + vec2( 0.375, 0.75 );\n\t}\n\tfloat getpointshadow( sampler2d shadowmap, vec2 shadowmapsize, float shadowbias, float shadowradius, vec4 shadowcoord, float shadowcameranear, float shadowcamerafar ) {\n\t\tvec2 texelsize = vec2( 1.0 ) / ( shadowmapsize * vec2( 4.0, 2.0 ) );\n\t\tvec3 lighttoposition = shadowcoord.xyz;\n\t\tfloat dp = ( length( lighttoposition ) - shadowcameranear ) / ( shadowcamerafar - shadowcameranear );\t\tdp += shadowbias;\n\t\tvec3 bd3d = normalize( lighttoposition );\n\t\t#if defined( shadowmap_type_pcf ) || defined( shadowmap_type_pcf_soft )\n\t\t\tvec2 offset = vec2( - 1, 1 ) * shadowradius * texelsize.y;\n\t\t\treturn (\n\t\t\t\ttexture2dcompare( shadowmap, cubetouv( bd3d + offset.xyy, texelsize.y ), dp ) +\n\t\t\t\ttexture2dcompare( shadowmap, cubetouv( bd3d + offset.yyy, texelsize.y ), dp ) +\n\t\t\t\ttexture2dcompare( shadowmap, cubetouv( bd3d + offset.xyx, texelsize.y ), dp ) +\n\t\t\t\ttexture2dcompare( shadowmap, cubetouv( bd3d + offset.yyx, texelsize.y ), dp ) +\n\t\t\t\ttexture2dcompare( shadowmap, cubetouv( bd3d, texelsize.y ), dp ) +\n\t\t\t\ttexture2dcompare( shadowmap, cubetouv( bd3d + offset.xxy, texelsize.y ), dp ) +\n\t\t\t\ttexture2dcompare( shadowmap, cubetouv( bd3d + offset.yxy, texelsize.y ), dp ) +\n\t\t\t\ttexture2dcompare( shadowmap, cubetouv( bd3d + offset.xxx, texelsize.y ), dp ) +\n\t\t\t\ttexture2dcompare( shadowmap, cubetouv( bd3d + offset.yxx, texelsize.y ), dp )\n\t\t\t) * ( 1.0 / 9.0 );\n\t\t#else\n\t\t\treturn texture2dcompare( shadowmap, cubetouv( bd3d, texelsize.y ), dp );\n\t\t#endif\n\t}\n#endif",shadowmap_pars_vertex:"#ifdef use_shadowmap\n\t#if num_dir_lights > 0\n\t\tuniform mat4 directionalshadowmatrix[ num_dir_lights ];\n\t\tvarying vec4 vdirectionalshadowcoord[ num_dir_lights ];\n\t#endif\n\t#if num_spot_lights > 0\n\t\tuniform mat4 spotshadowmatrix[ num_spot_lights ];\n\t\tvarying vec4 vspotshadowcoord[ num_spot_lights ];\n\t#endif\n\t#if num_point_lights > 0\n\t\tuniform mat4 pointshadowmatrix[ num_point_lights ];\n\t\tvarying vec4 vpointshadowcoord[ num_point_lights ];\n\t#endif\n#endif",shadowmap_vertex:"#ifdef use_shadowmap\n\t#if num_dir_lights > 0\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < num_dir_lights; i ++ ) {\n\t\tvdirectionalshadowcoord[ i ] = directionalshadowmatrix[ i ] * worldposition;\n\t}\n\t#endif\n\t#if num_spot_lights > 0\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < num_spot_lights; i ++ ) {\n\t\tvspotshadowcoord[ i ] = spotshadowmatrix[ i ] * worldposition;\n\t}\n\t#endif\n\t#if num_point_lights > 0\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < num_point_lights; i ++ ) {\n\t\tvpointshadowcoord[ i ] = pointshadowmatrix[ i ] * worldposition;\n\t}\n\t#endif\n#endif",shadowmask_pars_fragment:"float getshadowmask() {\n\tfloat shadow = 1.0;\n\t#ifdef use_shadowmap\n\t#if num_dir_lights > 0\n\tdirectionallight directionallight;\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < num_dir_lights; i ++ ) {\n\t\tdirectionallight = directionallights[ i ];\n\t\tshadow *= bool( directionallight.shadow ) ? getshadow( directionalshadowmap[ i ], directionallight.shadowmapsize, directionallight.shadowbias, directionallight.shadowradius, vdirectionalshadowcoord[ i ] ) : 1.0;\n\t}\n\t#endif\n\t#if num_spot_lights > 0\n\tspotlight spotlight;\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < num_spot_lights; i ++ ) {\n\t\tspotlight = spotlights[ i ];\n\t\tshadow *= bool( spotlight.shadow ) ? getshadow( spotshadowmap[ i ], spotlight.shadowmapsize, spotlight.shadowbias, spotlight.shadowradius, vspotshadowcoord[ i ] ) : 1.0;\n\t}\n\t#endif\n\t#if num_point_lights > 0\n\tpointlight pointlight;\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < num_point_lights; i ++ ) {\n\t\tpointlight = pointlights[ i ];\n\t\tshadow *= bool( pointlight.shadow ) ? getpointshadow( pointshadowmap[ i ], pointlight.shadowmapsize, pointlight.shadowbias, pointlight.shadowradius, vpointshadowcoord[ i ], pointlight.shadowcameranear, pointlight.shadowcamerafar ) : 1.0;\n\t}\n\t#endif\n\t#endif\n\treturn shadow;\n}",skinbase_vertex:"#ifdef use_skinning\n\tmat4 bonematx = getbonematrix( skinindex.x );\n\tmat4 bonematy = getbonematrix( skinindex.y );\n\tmat4 bonematz = getbonematrix( skinindex.z );\n\tmat4 bonematw = getbonematrix( skinindex.w );\n#endif",skinning_pars_vertex:"#ifdef use_skinning\n\tuniform mat4 bindmatrix;\n\tuniform mat4 bindmatrixinverse;\n\t#ifdef bone_texture\n\t\tuniform highp sampler2d bonetexture;\n\t\tuniform int bonetexturesize;\n\t\tmat4 getbonematrix( const in float i ) {\n\t\t\tfloat j = i * 4.0;\n\t\t\tfloat x = mod( j, float( bonetexturesize ) );\n\t\t\tfloat y = floor( j / float( bonetexturesize ) );\n\t\t\tfloat dx = 1.0 / float( bonetexturesize );\n\t\t\tfloat dy = 1.0 / float( bonetexturesize );\n\t\t\ty = dy * ( y + 0.5 );\n\t\t\tvec4 v1 = texture2d( bonetexture, vec2( dx * ( x + 0.5 ), y ) );\n\t\t\tvec4 v2 = texture2d( bonetexture, vec2( dx * ( x + 1.5 ), y ) );\n\t\t\tvec4 v3 = texture2d( bonetexture, vec2( dx * ( x + 2.5 ), y ) );\n\t\t\tvec4 v4 = texture2d( bonetexture, vec2( dx * ( x + 3.5 ), y ) );\n\t\t\tmat4 bone = mat4( v1, v2, v3, v4 );\n\t\t\treturn bone;\n\t\t}\n\t#else\n\t\tuniform mat4 bonematrices[ max_bones ];\n\t\tmat4 getbonematrix( const in float i ) {\n\t\t\tmat4 bone = bonematrices[ int(i) ];\n\t\t\treturn bone;\n\t\t}\n\t#endif\n#endif",skinning_vertex:"#ifdef use_skinning\n\tvec4 skinvertex = bindmatrix * vec4( transformed, 1.0 );\n\tvec4 skinned = vec4( 0.0 );\n\tskinned += bonematx * skinvertex * skinweight.x;\n\tskinned += bonematy * skinvertex * skinweight.y;\n\tskinned += bonematz * skinvertex * skinweight.z;\n\tskinned += bonematw * skinvertex * skinweight.w;\n\ttransformed = ( bindmatrixinverse * skinned ).xyz;\n#endif",skinnormal_vertex:"#ifdef use_skinning\n\tmat4 skinmatrix = mat4( 0.0 );\n\tskinmatrix += skinweight.x * bonematx;\n\tskinmatrix += skinweight.y * bonematy;\n\tskinmatrix += skinweight.z * bonematz;\n\tskinmatrix += skinweight.w * bonematw;\n\tskinmatrix = bindmatrixinverse * skinmatrix * bindmatrix;\n\tobjectnormal = vec4( skinmatrix * vec4( objectnormal, 0.0 ) ).xyz;\n\t#ifdef use_tangent\n\t\tobjecttangent = vec4( skinmatrix * vec4( objecttangent, 0.0 ) ).xyz;\n\t#endif\n#endif",specularmap_fragment:"float specularstrength;\n#ifdef use_specularmap\n\tvec4 texelspecular = texture2d( specularmap, vuv );\n\tspecularstrength = texelspecular.r;\n#else\n\tspecularstrength = 1.0;\n#endif",specularmap_pars_fragment:"#ifdef use_specularmap\n\tuniform sampler2d specularmap;\n#endif",tonemapping_fragment:"#if defined( tone_mapping )\n\tgl_fragcolor.rgb = tonemapping( gl_fragcolor.rgb );\n#endif",tonemapping_pars_fragment:"#ifndef saturate\n\t#define saturate(a) clamp( a, 0.0, 1.0 )\n#endif\nuniform float tonemappingexposure;\nuniform float tonemappingwhitepoint;\nvec3 lineartonemapping( vec3 color ) {\n\treturn tonemappingexposure * color;\n}\nvec3 reinhardtonemapping( vec3 color ) {\n\tcolor *= tonemappingexposure;\n\treturn saturate( color / ( vec3( 1.0 ) + color ) );\n}\n#define uncharted2helper( x ) max( ( ( x * ( 0.15 * x + 0.10 * 0.50 ) + 0.20 * 0.02 ) / ( x * ( 0.15 * x + 0.50 ) + 0.20 * 0.30 ) ) - 0.02 / 0.30, vec3( 0.0 ) )\nvec3 uncharted2tonemapping( vec3 color ) {\n\tcolor *= tonemappingexposure;\n\treturn saturate( uncharted2helper( color ) / uncharted2helper( vec3( tonemappingwhitepoint ) ) );\n}\nvec3 optimizedcineontonemapping( vec3 color ) {\n\tcolor *= tonemappingexposure;\n\tcolor = max( vec3( 0.0 ), color - 0.004 );\n\treturn pow( ( color * ( 6.2 * color + 0.5 ) ) / ( color * ( 6.2 * color + 1.7 ) + 0.06 ), vec3( 2.2 ) );\n}\nvec3 acesfilmictonemapping( vec3 color ) {\n\tcolor *= tonemappingexposure;\n\treturn saturate( ( color * ( 2.51 * color + 0.03 ) ) / ( color * ( 2.43 * color + 0.59 ) + 0.14 ) );\n}",uv_pars_fragment:"#if defined( use_map ) || defined( use_bumpmap ) || defined( use_normalmap ) || defined( use_specularmap ) || defined( use_alphamap ) || defined( use_emissivemap ) || defined( use_roughnessmap ) || defined( use_metalnessmap )\n\tvarying vec2 vuv;\n#endif",uv_pars_vertex:"#if defined( use_map ) || defined( use_bumpmap ) || defined( use_normalmap ) || defined( use_specularmap ) || defined( use_alphamap ) || defined( use_emissivemap ) || defined( use_roughnessmap ) || defined( use_metalnessmap )\n\tvarying vec2 vuv;\n\tuniform mat3 uvtransform;\n#endif",uv_vertex:"#if defined( use_map ) || defined( use_bumpmap ) || defined( use_normalmap ) || defined( use_specularmap ) || defined( use_alphamap ) || defined( use_emissivemap ) || defined( use_roughnessmap ) || defined( use_metalnessmap )\n\tvuv = ( uvtransform * vec3( uv, 1 ) ).xy;\n#endif",uv2_pars_fragment:"#if defined( use_lightmap ) || defined( use_aomap )\n\tvarying vec2 vuv2;\n#endif",uv2_pars_vertex:"#if defined( use_lightmap ) || defined( use_aomap )\n\tattribute vec2 uv2;\n\tvarying vec2 vuv2;\n#endif",uv2_vertex:"#if defined( use_lightmap ) || defined( use_aomap )\n\tvuv2 = uv2;\n#endif",worldpos_vertex:"#if defined( use_envmap ) || defined( distance ) || defined ( use_shadowmap )\n\tvec4 worldposition = modelmatrix * vec4( transformed, 1.0 );\n#endif",background_frag:"uniform sampler2d t2d;\nvarying vec2 vuv;\nvoid main() {\n\tvec4 texcolor = texture2d( t2d, vuv );\n\tgl_fragcolor = maptexeltolinear( texcolor );\n\t#include \n\t#include \n}",background_vert:"varying vec2 vuv;\nuniform mat3 uvtransform;\nvoid main() {\n\tvuv = ( uvtransform * vec3( uv, 1 ) ).xy;\n\tgl_position = vec4( position.xy, 1.0, 1.0 );\n}",cube_frag:"uniform samplercube tcube;\nuniform float tflip;\nuniform float opacity;\nvarying vec3 vworlddirection;\nvoid main() {\n\tvec4 texcolor = texturecube( tcube, vec3( tflip * vworlddirection.x, vworlddirection.yz ) );\n\tgl_fragcolor = maptexeltolinear( texcolor );\n\tgl_fragcolor.a *= opacity;\n\t#include \n\t#include \n}",cube_vert:"varying vec3 vworlddirection;\n#include \nvoid main() {\n\tvworlddirection = transformdirection( position, modelmatrix );\n\t#include \n\t#include \n\tgl_position.z = gl_position.w;\n}",depth_frag:"#if depth_packing == 3200\n\tuniform float opacity;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec4 diffusecolor = vec4( 1.0 );\n\t#if depth_packing == 3200\n\t\tdiffusecolor.a = opacity;\n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#if depth_packing == 3200\n\t\tgl_fragcolor = vec4( vec3( 1.0 - gl_fragcoord.z ), opacity );\n\t#elif depth_packing == 3201\n\t\tgl_fragcolor = packdepthtorgba( gl_fragcoord.z );\n\t#endif\n}",depth_vert:"#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#ifdef use_displacementmap\n\t\t#include \n\t\t#include \n\t\t#include \n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",distancergba_frag:"#define distance\nuniform vec3 referenceposition;\nuniform float neardistance;\nuniform float fardistance;\nvarying vec3 vworldposition;\n#include \n#include \n#include \n#include \n#include \n#include \nvoid main () {\n\t#include \n\tvec4 diffusecolor = vec4( 1.0 );\n\t#include \n\t#include \n\t#include \n\tfloat dist = length( vworldposition - referenceposition );\n\tdist = ( dist - neardistance ) / ( fardistance - neardistance );\n\tdist = saturate( dist );\n\tgl_fragcolor = packdepthtorgba( dist );\n}",distancergba_vert:"#define distance\nvarying vec3 vworldposition;\n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#ifdef use_displacementmap\n\t\t#include \n\t\t#include \n\t\t#include \n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvworldposition = worldposition.xyz;\n}",equirect_frag:"uniform sampler2d tequirect;\nvarying vec3 vworlddirection;\n#include \nvoid main() {\n\tvec3 direction = normalize( vworlddirection );\n\tvec2 sampleuv;\n\tsampleuv.y = asin( clamp( direction.y, - 1.0, 1.0 ) ) * reciprocal_pi + 0.5;\n\tsampleuv.x = atan( direction.z, direction.x ) * reciprocal_pi2 + 0.5;\n\tvec4 texcolor = texture2d( tequirect, sampleuv );\n\tgl_fragcolor = maptexeltolinear( texcolor );\n\t#include \n\t#include \n}",equirect_vert:"varying vec3 vworlddirection;\n#include \nvoid main() {\n\tvworlddirection = transformdirection( position, modelmatrix );\n\t#include \n\t#include \n}",linedashed_frag:"uniform vec3 diffuse;\nuniform float opacity;\nuniform float dashsize;\nuniform float totalsize;\nvarying float vlinedistance;\n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tif ( mod( vlinedistance, totalsize ) > dashsize ) {\n\t\tdiscard;\n\t}\n\tvec3 outgoinglight = vec3( 0.0 );\n\tvec4 diffusecolor = vec4( diffuse, opacity );\n\t#include \n\t#include \n\toutgoinglight = diffusecolor.rgb;\n\tgl_fragcolor = vec4( outgoinglight, diffusecolor.a );\n\t#include \n\t#include \n\t#include \n\t#include \n}",linedashed_vert:"uniform float scale;\nattribute float linedistance;\nvarying float vlinedistance;\n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvlinedistance = scale * linedistance;\n\tvec4 mvposition = modelviewmatrix * vec4( position, 1.0 );\n\tgl_position = projectionmatrix * mvposition;\n\t#include \n\t#include \n\t#include \n}",meshbasic_frag:"uniform vec3 diffuse;\nuniform float opacity;\n#ifndef flat_shaded\n\tvarying vec3 vnormal;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec4 diffusecolor = vec4( diffuse, opacity );\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\treflectedlight reflectedlight = reflectedlight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\t#ifdef use_lightmap\n\t\treflectedlight.indirectdiffuse += texture2d( lightmap, vuv2 ).xyz * lightmapintensity;\n\t#else\n\t\treflectedlight.indirectdiffuse += vec3( 1.0 );\n\t#endif\n\t#include \n\treflectedlight.indirectdiffuse *= diffusecolor.rgb;\n\tvec3 outgoinglight = reflectedlight.indirectdiffuse;\n\t#include \n\tgl_fragcolor = vec4( outgoinglight, diffusecolor.a );\n\t#include \n\t#include \n\t#include \n\t#include \n}",meshbasic_vert:"#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#ifdef use_envmap\n\t#include \n\t#include \n\t#include \n\t#include \n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",meshlambert_frag:"uniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float opacity;\nvarying vec3 vlightfront;\nvarying vec3 vindirectfront;\n#ifdef double_sided\n\tvarying vec3 vlightback;\n\tvarying vec3 vindirectback;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec4 diffusecolor = vec4( diffuse, opacity );\n\treflectedlight reflectedlight = reflectedlight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalemissiveradiance = emissive;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\treflectedlight.indirectdiffuse = getambientlightirradiance( ambientlightcolor );\n\t#ifdef double_sided\n\t\treflectedlight.indirectdiffuse += ( gl_frontfacing ) ? vindirectfront : vindirectback;\n\t#else\n\t\treflectedlight.indirectdiffuse += vindirectfront;\n\t#endif\n\t#include \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 \n\tvec3 outgoinglight = reflectedlight.directdiffuse + reflectedlight.indirectdiffuse + totalemissiveradiance;\n\t#include \n\tgl_fragcolor = vec4( outgoinglight, diffusecolor.a );\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",meshlambert_vert:"#define lambert\nvarying vec3 vlightfront;\nvarying vec3 vindirectfront;\n#ifdef double_sided\n\tvarying vec3 vlightback;\n\tvarying vec3 vindirectback;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",meshmatcap_frag:"#define matcap\nuniform vec3 diffuse;\nuniform float opacity;\nuniform sampler2d matcap;\nvarying vec3 vviewposition;\n#ifndef flat_shaded\n\tvarying vec3 vnormal;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec4 diffusecolor = vec4( diffuse, opacity );\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvec3 viewdir = normalize( vviewposition );\n\tvec3 x = normalize( vec3( viewdir.z, 0.0, - viewdir.x ) );\n\tvec3 y = cross( viewdir, x );\n\tvec2 uv = vec2( dot( x, normal ), dot( y, normal ) ) * 0.495 + 0.5;\n\t#ifdef use_matcap\n\t\tvec4 matcapcolor = texture2d( matcap, uv );\n\t\tmatcapcolor = matcaptexeltolinear( matcapcolor );\n\t#else\n\t\tvec4 matcapcolor = vec4( 1.0 );\n\t#endif\n\tvec3 outgoinglight = diffusecolor.rgb * matcapcolor.rgb;\n\tgl_fragcolor = vec4( outgoinglight, diffusecolor.a );\n\t#include \n\t#include \n\t#include \n\t#include \n}",meshmatcap_vert:"#define matcap\nvarying vec3 vviewposition;\n#ifndef flat_shaded\n\tvarying vec3 vnormal;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#ifndef flat_shaded\n\t\tvnormal = normalize( transformednormal );\n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvviewposition = - mvposition.xyz;\n}",meshphong_frag:"#define phong\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform vec3 specular;\nuniform float shininess;\nuniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec4 diffusecolor = vec4( diffuse, opacity );\n\treflectedlight reflectedlight = reflectedlight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalemissiveradiance = emissive;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvec3 outgoinglight = reflectedlight.directdiffuse + reflectedlight.indirectdiffuse + reflectedlight.directspecular + reflectedlight.indirectspecular + totalemissiveradiance;\n\t#include \n\tgl_fragcolor = vec4( outgoinglight, diffusecolor.a );\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",meshphong_vert:"#define phong\nvarying vec3 vviewposition;\n#ifndef flat_shaded\n\tvarying vec3 vnormal;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n#ifndef flat_shaded\n\tvnormal = normalize( transformednormal );\n#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvviewposition = - mvposition.xyz;\n\t#include \n\t#include \n\t#include \n\t#include \n}",meshphysical_frag:"#define physical\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float roughness;\nuniform float metalness;\nuniform float opacity;\n#ifndef standard\n\tuniform float clearcoat;\n\tuniform float clearcoatroughness;\n#endif\nvarying vec3 vviewposition;\n#ifndef flat_shaded\n\tvarying vec3 vnormal;\n\t#ifdef use_tangent\n\t\tvarying vec3 vtangent;\n\t\tvarying vec3 vbitangent;\n\t#endif\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec4 diffusecolor = vec4( diffuse, opacity );\n\treflectedlight reflectedlight = reflectedlight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalemissiveradiance = emissive;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvec3 outgoinglight = reflectedlight.directdiffuse + reflectedlight.indirectdiffuse + reflectedlight.directspecular + reflectedlight.indirectspecular + totalemissiveradiance;\n\tgl_fragcolor = vec4( outgoinglight, diffusecolor.a );\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",meshphysical_vert:"#define physical\nvarying vec3 vviewposition;\n#ifndef flat_shaded\n\tvarying vec3 vnormal;\n\t#ifdef use_tangent\n\t\tvarying vec3 vtangent;\n\t\tvarying vec3 vbitangent;\n\t#endif\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n#ifndef flat_shaded\n\tvnormal = normalize( transformednormal );\n\t#ifdef use_tangent\n\t\tvtangent = normalize( transformedtangent );\n\t\tvbitangent = normalize( cross( vnormal, vtangent ) * tangent.w );\n\t#endif\n#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvviewposition = - mvposition.xyz;\n\t#include \n\t#include \n\t#include \n}",normal_frag:"#define normal\nuniform float opacity;\n#if defined( flat_shaded ) || defined( use_bumpmap ) || ( defined( use_normalmap ) && ! defined( objectspace_normalmap ) )\n\tvarying vec3 vviewposition;\n#endif\n#ifndef flat_shaded\n\tvarying vec3 vnormal;\n\t#ifdef use_tangent\n\t\tvarying vec3 vtangent;\n\t\tvarying vec3 vbitangent;\n\t#endif\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\tgl_fragcolor = vec4( packnormaltorgb( normal ), opacity );\n}",normal_vert:"#define normal\n#if defined( flat_shaded ) || defined( use_bumpmap ) || ( defined( use_normalmap ) && ! defined( objectspace_normalmap ) )\n\tvarying vec3 vviewposition;\n#endif\n#ifndef flat_shaded\n\tvarying vec3 vnormal;\n\t#ifdef use_tangent\n\t\tvarying vec3 vtangent;\n\t\tvarying vec3 vbitangent;\n\t#endif\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n#ifndef flat_shaded\n\tvnormal = normalize( transformednormal );\n\t#ifdef use_tangent\n\t\tvtangent = normalize( transformedtangent );\n\t\tvbitangent = normalize( cross( vnormal, vtangent ) * tangent.w );\n\t#endif\n#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n#if defined( flat_shaded ) || defined( use_bumpmap ) || ( defined( use_normalmap ) && ! defined( objectspace_normalmap ) )\n\tvviewposition = - mvposition.xyz;\n#endif\n}",points_frag:"uniform vec3 diffuse;\nuniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec3 outgoinglight = vec3( 0.0 );\n\tvec4 diffusecolor = vec4( diffuse, opacity );\n\t#include \n\t#include \n\t#include \n\t#include \n\toutgoinglight = diffusecolor.rgb;\n\tgl_fragcolor = vec4( outgoinglight, diffusecolor.a );\n\t#include \n\t#include \n\t#include \n\t#include \n}",points_vert:"uniform float size;\nuniform float scale;\n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\tgl_pointsize = size;\n\t#ifdef use_sizeattenuation\n\t\tbool isperspective = ( projectionmatrix[ 2 ][ 3 ] == - 1.0 );\n\t\tif ( isperspective ) gl_pointsize *= ( scale / - mvposition.z );\n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n}",shadow_frag:"uniform vec3 color;\nuniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\tgl_fragcolor = vec4( color, opacity * ( 1.0 - getshadowmask() ) );\n\t#include \n}",shadow_vert:"#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",sprite_frag:"uniform vec3 diffuse;\nuniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec3 outgoinglight = vec3( 0.0 );\n\tvec4 diffusecolor = vec4( diffuse, opacity );\n\t#include \n\t#include \n\t#include \n\toutgoinglight = diffusecolor.rgb;\n\tgl_fragcolor = vec4( outgoinglight, diffusecolor.a );\n\t#include \n\t#include \n\t#include \n}",sprite_vert:"uniform float rotation;\nuniform vec2 center;\n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec4 mvposition = modelviewmatrix * vec4( 0.0, 0.0, 0.0, 1.0 );\n\tvec2 scale;\n\tscale.x = length( vec3( modelmatrix[ 0 ].x, modelmatrix[ 0 ].y, modelmatrix[ 0 ].z ) );\n\tscale.y = length( vec3( modelmatrix[ 1 ].x, modelmatrix[ 1 ].y, modelmatrix[ 1 ].z ) );\n\t#ifndef use_sizeattenuation\n\t\tbool isperspective = ( projectionmatrix[ 2 ][ 3 ] == - 1.0 );\n\t\tif ( isperspective ) scale *= - mvposition.z;\n\t#endif\n\tvec2 alignedposition = ( position.xy - ( center - vec2( 0.5 ) ) ) * scale;\n\tvec2 rotatedposition;\n\trotatedposition.x = cos( rotation ) * alignedposition.x - sin( rotation ) * alignedposition.y;\n\trotatedposition.y = sin( rotation ) * alignedposition.x + cos( rotation ) * alignedposition.y;\n\tmvposition.xy += rotatedposition;\n\tgl_position = projectionmatrix * mvposition;\n\t#include \n\t#include \n\t#include \n}"},wo={common:{diffuse:{value:new ra(15658734)},opacity:{value:1},map:{value:null},uvtransform:{value:new kn},alphamap:{value:null}},specularmap:{specularmap:{value:null}},envmap:{envmap:{value:null},flipenvmap:{value:-1},reflectivity:{value:1},refractionratio:{value:.98},maxmiplevel:{value:0}},aomap:{aomap:{value:null},aomapintensity:{value:1}},lightmap:{lightmap:{value:null},lightmapintensity:{value:1}},emissivemap:{emissivemap:{value:null}},bumpmap:{bumpmap:{value:null},bumpscale:{value:1}},normalmap:{normalmap:{value:null},normalscale:{value:new zn(1,1)}},displacementmap:{displacementmap:{value:null},displacementscale:{value:1},displacementbias:{value:0}},roughnessmap:{roughnessmap:{value:null}},metalnessmap:{metalnessmap:{value:null}},gradientmap:{gradientmap:{value:null}},fog:{fogdensity:{value:25e-5},fognear:{value:1},fogfar:{value:2e3},fogcolor:{value:new ra(16777215)}},lights:{ambientlightcolor:{value:[]},lightprobe:{value:[]},directionallights:{value:[],properties:{direction:{},color:{},shadow:{},shadowbias:{},shadowradius:{},shadowmapsize:{}}},directionalshadowmap:{value:[]},directionalshadowmatrix:{value:[]},spotlights:{value:[],properties:{color:{},position:{},direction:{},distance:{},conecos:{},penumbracos:{},decay:{},shadow:{},shadowbias:{},shadowradius:{},shadowmapsize:{}}},spotshadowmap:{value:[]},spotshadowmatrix:{value:[]},pointlights:{value:[],properties:{color:{},position:{},decay:{},distance:{},shadow:{},shadowbias:{},shadowradius:{},shadowmapsize:{},shadowcameranear:{},shadowcamerafar:{}}},pointshadowmap:{value:[]},pointshadowmatrix:{value:[]},hemispherelights:{value:[],properties:{direction:{},skycolor:{},groundcolor:{}}},rectarealights:{value:[],properties:{color:{},position:{},width:{},height:{}}}},points:{diffuse:{value:new ra(15658734)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},uvtransform:{value:new kn}},sprite:{diffuse:{value:new ra(15658734)},opacity:{value:1},center:{value:new zn(.5,.5)},rotation:{value:0},map:{value:null},uvtransform:{value:new kn}}},qo={basic:{uniforms:so([wo.common,wo.specularmap,wo.envmap,wo.aomap,wo.lightmap,wo.fog]),vertexshader:jo.meshbasic_vert,fragmentshader:jo.meshbasic_frag},lambert:{uniforms:so([wo.common,wo.specularmap,wo.envmap,wo.aomap,wo.lightmap,wo.emissivemap,wo.fog,wo.lights,{emissive:{value:new ra(0)}}]),vertexshader:jo.meshlambert_vert,fragmentshader:jo.meshlambert_frag},phong:{uniforms:so([wo.common,wo.specularmap,wo.envmap,wo.aomap,wo.lightmap,wo.emissivemap,wo.bumpmap,wo.normalmap,wo.displacementmap,wo.gradientmap,wo.fog,wo.lights,{emissive:{value:new ra(0)},specular:{value:new ra(1118481)},shininess:{value:30}}]),vertexshader:jo.meshphong_vert,fragmentshader:jo.meshphong_frag},standard:{uniforms:so([wo.common,wo.envmap,wo.aomap,wo.lightmap,wo.emissivemap,wo.bumpmap,wo.normalmap,wo.displacementmap,wo.roughnessmap,wo.metalnessmap,wo.fog,wo.lights,{emissive:{value:new ra(0)},roughness:{value:.5},metalness:{value:.5},envmapintensity:{value:1}}]),vertexshader:jo.meshphysical_vert,fragmentshader:jo.meshphysical_frag},matcap:{uniforms:so([wo.common,wo.bumpmap,wo.normalmap,wo.displacementmap,wo.fog,{matcap:{value:null}}]),vertexshader:jo.meshmatcap_vert,fragmentshader:jo.meshmatcap_frag},points:{uniforms:so([wo.points,wo.fog]),vertexshader:jo.points_vert,fragmentshader:jo.points_frag},dashed:{uniforms:so([wo.common,wo.fog,{scale:{value:1},dashsize:{value:1},totalsize:{value:2}}]),vertexshader:jo.linedashed_vert,fragmentshader:jo.linedashed_frag},depth:{uniforms:so([wo.common,wo.displacementmap]),vertexshader:jo.depth_vert,fragmentshader:jo.depth_frag},normal:{uniforms:so([wo.common,wo.bumpmap,wo.normalmap,wo.displacementmap,{opacity:{value:1}}]),vertexshader:jo.normal_vert,fragmentshader:jo.normal_frag},sprite:{uniforms:so([wo.sprite,wo.fog]),vertexshader:jo.sprite_vert,fragmentshader:jo.sprite_frag},background:{uniforms:{uvtransform:{value:new kn},t2d:{value:null}},vertexshader:jo.background_vert,fragmentshader:jo.background_frag},cube:{uniforms:{tcube:{value:null},tflip:{value:-1},opacity:{value:1}},vertexshader:jo.cube_vert,fragmentshader:jo.cube_frag},equirect:{uniforms:{tequirect:{value:null}},vertexshader:jo.equirect_vert,fragmentshader:jo.equirect_frag},distancergba:{uniforms:so([wo.common,wo.displacementmap,{referenceposition:{value:new qn},neardistance:{value:1},fardistance:{value:1e3}}]),vertexshader:jo.distancergba_vert,fragmentshader:jo.distancergba_frag},shadow:{uniforms:so([wo.lights,wo.fog,{color:{value:new ra(0)},opacity:{value:1}}]),vertexshader:jo.shadow_vert,fragmentshader:jo.shadow_frag}};function xo(){var i=null,n=!1,r=null;function a(e,t){!1!==n&&(r(e,t),i.requestanimationframe(a))}return{start:function(){!0!==n&&null!==r&&(i.requestanimationframe(a),n=!0)},stop:function(){n=!1},setanimationloop:function(e){r=e},setcontext:function(e){i=e}}}function yo(l){var c=new weakmap;return{get:function(e){return e.isinterleavedbufferattribute&&(e=e.data),c.get(e)},remove:function(e){e.isinterleavedbufferattribute&&(e=e.data);var t=c.get(e);t&&(l.deletebuffer(t.buffer),c.delete(e))},update:function(e,t){e.isinterleavedbufferattribute&&(e=e.data);var i,n,r,a,o,s=c.get(e);void 0===s?c.set(e,function(e,t){var i=e.array,n=e.dynamic?35048:35044,r=l.createbuffer();l.bindbuffer(t,r),l.bufferdata(t,i,n),e.onuploadcallback();var a=5126;return i instanceof float32array?a=5126:i instanceof float64array?console.warn("three.webglattributes: unsupported data buffer format: float64array."):i instanceof uint16array?a=5123:i instanceof int16array?a=5122:i instanceof uint32array?a=5125:i instanceof int32array?a=5124:i instanceof int8array?a=5120:i instanceof uint8array&&(a=5121),{buffer:r,type:a,bytesperelement:i.bytes_per_element,version:e.version}}(e,t)):s.version/gm,function(e,t){var i=jo[t];if(void 0===i)throw new error("can not resolve #include <"+t+">");return pl(i)})}function fl(e){return e.replace(/#pragma unroll_loop[\s]+?for \( int i \= (\d+)\; i < (\d+)\; i \+\+ \) \{([\s\s]+?)(?=\})\}/g,function(e,t,i,n){for(var r="",a=parseint(t);an||e.height>n)&&(r=n/math.max(e.width,e.height)),r<1||!0===t){if("undefined"!=typeof htmlimageelement&&e instanceof htmlimageelement||"undefined"!=typeof htmlcanvaselement&&e instanceof htmlcanvaselement||"undefined"!=typeof imagebitmap&&e instanceof imagebitmap){var a=t?$n.floorpoweroftwo:math.floor,o=a(r*e.width),s=a(r*e.height);void 0===h&&(h=u(o,s));var l=i?u(o,s):h;return l.width=o,l.height=s,l.getcontext("2d").drawimage(e,0,0,o,s),console.warn("three.webglrenderer: texture has been resized from ("+e.width+"x"+e.height+") to ("+o+"x"+s+")."),l}return"data"in e&&console.warn("three.webglrenderer: image in datatexture is too big ("+e.width+"x"+e.height+")."),e}return e}function _(e){return $n.ispoweroftwo(e.width)&&$n.ispoweroftwo(e.height)}function t(e,t){return e.generatemipmaps&&t&&e.minfilter!==fi&&e.minfilter!==hi}function m(e,t,i,n){v.generatemipmap(e),y.get(t).__maxmiplevel=math.log(math.max(i,n))*math.log2e}function s(e,t){if(!x.iswebgl2)return e;var i=e;return 6403===e&&(5126===t&&(i=33326),5131===t&&(i=33325),5121===t&&(i=33321)),6407===e&&(5126===t&&(i=34837),5131===t&&(i=34843),5121===t&&(i=32849)),6408===e&&(5126===t&&(i=34836),5131===t&&(i=34842),5121===t&&(i=32856)),33325===i||33326===i||34842===i||34836===i?r.get("ext_color_buffer_float"):34843!==i&&34837!==i||console.warn("three.webglrenderer: floating point textures with rgb format not supported. please use rgba instead."),i}function a(e){return e===fi||e===gi||e===ui?9728:9729}function n(e){var t=e.target;t.removeeventlistener("dispose",n),function(e){var t=y.get(e);if(void 0===t.__webglinit)return;v.deletetexture(t.__webgltexture),y.remove(e)}(t),t.isvideotexture&&delete s[t.id],c.memory.textures--}function d(e){var t=e.target;t.removeeventlistener("dispose",d),function(e){var t=y.get(e),i=y.get(e.texture);if(!e)return;void 0!==i.__webgltexture&&v.deletetexture(i.__webgltexture);e.depthtexture&&e.depthtexture.dispose();if(e.iswebglrendertargetcube)for(var n=0;n<6;n++)v.deleteframebuffer(t.__webglframebuffer[n]),t.__webgldepthbuffer&&v.deleterenderbuffer(t.__webgldepthbuffer[n]);else v.deleteframebuffer(t.__webglframebuffer),t.__webgldepthbuffer&&v.deleterenderbuffer(t.__webgldepthbuffer);y.remove(e.texture),y.remove(e)}(t),c.memory.textures--}var t=0;function o(e,t){var i,n,r,a=y.get(e);if(e.isvideotexture&&(n=(i=e).id,r=c.render.frame,s[n]!==r&&(s[n]=r,i.update())),0=x.maxtextures&&console.warn("three.webgltextures: trying to use "+e+" texture units while this gpu supports only "+x.maxtextures),t+=1,e},this.resettextureunits=function(){t=0},this.settexture2d=o,this.settexture2darray=function(e,t){var i=y.get(e);0e.far||t.push({distance:s,point:l.clone(),uv:ea.getuv(l,d,p,f,m,v,g,new zn),face:null,object:this})}}}(),clone:function(){return new this.constructor(this.material).copy(this)},copy:function(e){return wa.prototype.copy.call(this,e),void 0!==e.center&&this.center.copy(e.center),this}}),cc.prototype=object.assign(object.create(wa.prototype),{constructor:cc,islod:!0,copy:function(e){wa.prototype.copy.call(this,e,!1);for(var t=e.levels,i=0,n=t.length;i=t[n].distance;n++)t[n-1].object.visible=!1,t[n].object.visible=!0;for(;ne.far||t.push({distance:w,point:c.clone().applymatrix4(this.matrixworld),index:m,face:null,faceindex:null,object:this}))}else for(m=0,v=p.length/3-1;me.far||t.push({distance:w,point:c.clone().applymatrix4(this.matrixworld),index:m,face:null,faceindex:null,object:this}))}else if(n.isgeometry){var x=n.vertices,b=x.length;for(m=0;me.far||t.push({distance:w,point:c.clone().applymatrix4(this.matrixworld),index:m,face:null,faceindex:null,object:this}))}}}}),clone:function(){return new this.constructor(this.geometry,this.material).copy(this)}}),mc.prototype=object.assign(object.create(fc.prototype),{constructor:mc,islinesegments:!0,computelinedistances:(ql=new qn,xl=new qn,function(){var e=this.geometry;if(e.isbuffergeometry)if(null===e.index){for(var t=e.attributes.position,i=[],n=0,r=t.count;nr.far)return;a.push({distance:n,distancetoray:math.sqrt(i),point:c.clone(),index:t,face:null,object:o})}}}),updatemorphtargets:function(){var e,t,i,n=this.geometry.morphattributes,r=object.keys(n);if(0=e.have_current_data&&(this.needsupdate=!0)}}),((bc.prototype=object.create(mr.prototype)).constructor=bc).prototype.iscompressedtexture=!0,((wc.prototype=object.create(mr.prototype)).constructor=wc).prototype.iscanvastexture=!0,((_c.prototype=object.create(mr.prototype)).constructor=_c).prototype.isdepthtexture=!0,(tc.prototype=object.create(ho.prototype)).constructor=tc,(mc.prototype=object.create(wo.prototype)).constructor=mc,(sc.prototype=object.create(ho.prototype)).constructor=sc,(ec.prototype=object.create(wo.prototype)).constructor=ec,(cc.prototype=object.create(ho.prototype)).constructor=cc,(pc.prototype=object.create(wo.prototype)).constructor=pc,(ac.prototype=object.create(cc.prototype)).constructor=ac,(lc.prototype=object.create(wo.prototype)).constructor=lc,(rc.prototype=object.create(cc.prototype)).constructor=rc,(oc.prototype=object.create(wo.prototype)).constructor=oc,(ic.prototype=object.create(cc.prototype)).constructor=ic,(dc.prototype=object.create(wo.prototype)).constructor=dc,(zc.prototype=object.create(cc.prototype)).constructor=zc,(nc.prototype=object.create(wo.prototype)).constructor=nc,((kc.prototype=object.create(ho.prototype)).constructor=kc).prototype.tojson=function(){var e=ho.prototype.tojson.call(this);return e.path=this.parameters.path.tojson(),e},(bc.prototype=object.create(wo.prototype)).constructor=bc,(fc.prototype=object.create(ho.prototype)).constructor=fc,(gc.prototype=object.create(wo.prototype)).constructor=gc,(uc.prototype=object.create(ho.prototype)).constructor=uc;var hc=function(e,t,i){i=i||2;var n,r,a,o,s,l,c,h=t&&t.length,u=h?t[0]*i:e.length,d=vc(e,0,u,i,!0),p=[];if(!d||d.next===d.prev)return p;if(h&&(d=function(e,t,i,n){var r,a,o,s,l,c=[];for(r=0,a=t.length;r80*i){n=a=e[0],r=o=e[1];for(var f=i;fa.x?r.x>o.x?r.x:o.x:a.x>o.x?a.x:o.x,h=r.y>a.y?r.y>o.y?r.y:o.y:a.y>o.y?a.y:o.y,u=qc(s,l,t,i,n),d=qc(c,h,t,i,n),p=e.prevz,f=e.nextz;p&&p.z>=u&&f&&f.z<=d;){if(p!==e.prev&&p!==e.next&&eh(r.x,r.y,a.x,a.y,o.x,o.y,p.x,p.y)&&0<=th(p.prev,p,p.next))return!1;if(p=p.prevz,f!==e.prev&&f!==e.next&&eh(r.x,r.y,a.x,a.y,o.x,o.y,f.x,f.y)&&0<=th(f.prev,f,f.next))return!1;f=f.nextz}for(;p&&p.z>=u;){if(p!==e.prev&&p!==e.next&&eh(r.x,r.y,a.x,a.y,o.x,o.y,p.x,p.y)&&0<=th(p.prev,p,p.next))return!1;p=p.prevz}for(;f&&f.z<=d;){if(f!==e.prev&&f!==e.next&&eh(r.x,r.y,a.x,a.y,o.x,o.y,f.x,f.y)&&0<=th(f.prev,f,f.next))return!1;f=f.nextz}return!0}function yc(e,t,i){var n=e;do{var r=n.prev,a=n.next.next;!ih(r,a)&&nh(r,n,n.next,a)&&rh(r,a)&&rh(a,r)&&(t.push(r.i/i),t.push(n.i/i),t.push(a.i/i),sh(n),sh(n.next),n=e=a),n=n.next}while(n!==e);return n}function $c(e,t,i,n,r,a){var o,s,l=e;do{for(var c=l.next.next;c!==l.prev;){if(l.i!==c.i&&(s=c,(o=l).next.i!==s.i&&o.prev.i!==s.i&&!function(e,t){var i=e;do{if(i.i!==e.i&&i.next.i!==e.i&&i.i!==t.i&&i.next.i!==t.i&&nh(i,i.next,e,t))return!0;i=i.next}while(i!==e);return!1}(o,s)&&rh(o,s)&&rh(s,o)&&function(e,t){var i=e,n=!1,r=(e.x+t.x)/2,a=(e.y+t.y)/2;for(;i.y>a!=i.next.y>a&&i.next.y!==i.y&&r<(i.next.x-i.x)*(a-i.y)/(i.next.y-i.y)+i.x&&(n=!n),i=i.next,i!==e;);return n}(o,s))){var h=ah(l,c);return l=jc(l,l.next),h=jc(h,h.next),wc(l,t,i,n,r,a),void wc(h,t,i,n,r,a)}c=c.next}l=l.next}while(l!==e)}function zc(e,t){return e.x-t.x}function jc(e,t){if(t=function(e,t){var i,n=t,r=e.x,a=e.y,o=-1/0;do{if(a<=n.y&&a>=n.next.y&&n.next.y!==n.y){var s=n.x+(a-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(s<=r&&o=n.x&&n.x>=h&&r!==n.x&&eh(ai.x)&&rh(n,e)&&(i=n,d=l),n=n.next;return i}(e,t)){var i=ah(t,e);jc(i,i.next)}}function qc(e,t,i,n,r){return(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-i)*r)|e<<8))|e<<4))|e<<2))|e<<1))|(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-n)*r)|t<<8))|t<<4))|t<<2))|t<<1))<<1}function kc(e){for(var t=e,i=e;(t.xnumber.epsilon){var d=math.sqrt(h),p=math.sqrt(l*l+c*c),f=t.x-s/d,m=t.y+o/d,v=((i.x-c/p-f)*c-(i.y+l/p-m)*l)/(o*c-s*l),g=(n=f+o*v-e.x)*n+(r=m+s*v-e.y)*r;if(g<=2)return new zn(n,r);a=math.sqrt(g/2)}else{var y=!1;o>number.epsilon?l>number.epsilon&&(y=!0):o<-number.epsilon?l<-number.epsilon&&(y=!0):math.sign(s)===math.sign(c)&&(y=!0),a=y?(n=-s,r=o,math.sqrt(h)):(n=o,r=s,math.sqrt(h/2))}return new zn(n/a,r/a)}for(var n=[],k=0,b=s.length,f=b-1,g=k+1;k>>1;et;)--a;if(++a,0!==r||a!==n){a<=r&&(r=(a=math.max(a,1))-1);var o=this.getvaluesize();this.times=qh.arrayslice(i,r,a),this.values=qh.arrayslice(this.values,r*o,a*o)}return this},validate:function(){var e=!0,t=this.getvaluesize();t-math.floor(t)!=0&&(console.error("three.keyframetrack: invalid value size in track.",this),e=!1);var i=this.times,n=this.values,r=i.length;0===r&&(console.error("three.keyframetrack: track is empty.",this),e=!1);for(var a=null,o=0;o!==r;o++){var s=i[o];if("number"==typeof s&&isnan(s)){console.error("three.keyframetrack: time is not a valid number.",this,o,s),e=!1;break}if(null!==a&&snumber.epsilon&&(c.normalize(),r=math.acos($n.clamp(o[i-1].dot(o[i]),-1,1)),s[i].applymatrix4(h.makerotationaxis(c,r))),l[i].crossvectors(o[i],s[i]);if(!0===t)for(r=math.acos($n.clamp(s[0].dot(s[e]),-1,1)),r/=e,0n.length-2?n.length-1:a+1],h=n[a>n.length-3?n.length-1:a+2];return i.set(su(o,s.x,l.x,c.x,h.x),su(o,s.y,l.y,c.y,h.y)),i},du.prototype.copy=function(e){vu.prototype.copy.call(this,e),this.points=[];for(var t=0,i=e.points.length;t=t){var r=i[n]-t,a=this.curves[n],o=a.getlength(),s=0===o?0:1-r/o;return a.getpointat(s)}n++}return null},getlength:function(){var e=this.getcurvelengths();return e[e.length-1]},updatearclengths:function(){this.needsupdate=!0,this.cachelengths=null,this.getcurvelengths()},getcurvelengths:function(){if(this.cachelengths&&this.cachelengths.length===this.curves.length)return this.cachelengths;for(var e=[],t=0,i=0,n=this.curves.length;inumber.epsilon){if(c<0&&(o=t[a],l=-l,s=t[r],c=-c),e.ys.y)continue;if(e.y===o.y){if(e.x===o.x)return!0}else{var h=c*(e.x-o.x)-l*(e.y-o.y);if(0===h)return!0;if(h<0)continue;n=!n}}else{if(e.y!==o.y)continue;if(s.x<=e.x&&e.x<=o.x||o.x<=e.x&&e.x<=s.x)return!0}}return n}var r=ch.isclockwise,a=this.subpaths;if(0===a.length)return[];if(!0===t)return i(a);var o,s,l,c=[];if(1===a.length)return s=a[0],(l=new bu).curves=s.curves,c.push(l),c;var h=!r(a[0].getpoints());h=e?!h:h;var u,d,p=[],f=[],m=[],v=0;f[v]=void 0,m[v]=[];for(var g=0,y=a.length;gi.parameterpositions[1]&&(this.stopfading(),0===n&&(this.enabled=!1))}}return this._effectiveweight=t},_updatetimescale:function(e){var t=0;if(!this.paused){t=this.timescale;var i=this._timescaleinterpolant;if(null!==i)t*=i.evaluate(e)[0],e>i.parameterpositions[1]&&(this.stopwarping(),0===t?this.paused=!0:this.timescale=t)}return this._effectivetimescale=t},_updatetime:function(e){var t=this.time+e,i=this._clip.duration,n=this.loop,r=this._loopcount,a=2202===n;if(0===e)return-1===r?t:a&&1==(1&r)?i-t:t;if(2200===n){-1===r&&(this._loopcount=0,this._setendings(!0,!0,!1));e:{if(i<=t)t=i;else{if(!(t<0)){this.time=t;break e}t=0}this.clampwhenfinished?this.paused=!0:this.enabled=!1,this.time=t,this._mixer.dispatchevent({type:"finished",action:this,direction:e<0?-1:1})}}else{if(-1===r&&(0<=e?(r=0,this._setendings(!0,0===this.repetitions,a)):this._setendings(0===this.repetitions,!0,a)),i<=t||t<0){var o=math.floor(t/i);t-=i*o,r+=math.abs(o);var s=this.repetitions-r;if(s<=0)this.clampwhenfinished?this.paused=!0:this.enabled=!1,t=0this.max.x||e.ythis.max.y)},containsbox:function(e){return this.min.x<=e.min.x&&e.max.x<=this.max.x&&this.min.y<=e.min.y&&e.max.y<=this.max.y},getparameter:function(e,t){return void 0===t&&(console.warn("three.box2: .getparameter() target is now required"),t=new zn),t.set((e.x-this.min.x)/(this.max.x-this.min.x),(e.y-this.min.y)/(this.max.y-this.min.y))},intersectsbox:function(e){return!(e.max.xthis.max.x||e.max.ythis.max.y)},clamppoint:function(e,t){return void 0===t&&(console.warn("three.box2: .clamppoint() target is now required"),t=new zn),t.copy(e).clamp(this.min,this.max)},distancetopoint:(ip=new zn,function(e){return ip.copy(e).clamp(this.min,this.max).sub(e).length()}),intersect:function(e){return this.min.max(e.min),this.max.min(e.max),this},union:function(e){return this.min.min(e.min),this.max.max(e.max),this},translate:function(e){return this.min.add(e),this.max.add(e),this},equals:function(e){return e.min.equals(this.min)&&e.max.equals(this.max)}}),object.assign(kp.prototype,{set:function(e,t){return this.start.copy(e),this.end.copy(t),this},clone:function(){return(new this.constructor).copy(this)},copy:function(e){return this.start.copy(e.start),this.end.copy(e.end),this},getcenter:function(e){return void 0===e&&(console.warn("three.line3: .getcenter() target is now required"),e=new qn),e.addvectors(this.start,this.end).multiplyscalar(.5)},delta:function(e){return void 0===e&&(console.warn("three.line3: .delta() target is now required"),e=new qn),e.subvectors(this.end,this.start)},distancesq:function(){return this.start.distancetosquared(this.end)},distance:function(){return this.start.distanceto(this.end)},at:function(e,t){return void 0===t&&(console.warn("three.line3: .at() target is now required"),t=new qn),this.delta(t).multiplyscalar(e).add(this.start)},closestpointtopointparameter:(rp=new qn,ap=new qn,function(e,t){rp.subvectors(e,this.start),ap.subvectors(this.end,this.start);var i=ap.dot(ap),n=ap.dot(rp)/i;return t&&(n=$n.clamp(n,0,1)),n}),closestpointtopoint:function(e,t,i){var n=this.closestpointtopointparameter(e,t);return void 0===i&&(console.warn("three.line3: .closestpointtopoint() target is now required"),i=new qn),this.delta(i).multiplyscalar(n).add(this.start)},applymatrix4:function(e){return this.start.applymatrix4(e),this.end.applymatrix4(e),this},equals:function(e){return e.start.equals(this.start)&&e.end.equals(this.end)}}),((bp.prototype=object.create(wa.prototype)).constructor=bp).prototype.isimmediaterenderobject=!0,((fp.prototype=object.create(mc.prototype)).constructor=fp).prototype.update=(op=new qn,sp=new qn,lp=new kn,function(){var e=["a","b","c"];this.object.updatematrixworld(!0),lp.getnormalmatrix(this.object.matrixworld);var t=this.object.matrixworld,i=this.geometry.attributes.position,n=this.object.geometry;if(n&&n.isgeometry)for(var r=n.vertices,a=n.faces,o=0,s=0,l=a.length;s