PageSourceSearch

http://minimakergame.com/js/app_site_combined0b6d.js

js minimakergame.com collected 2026-09-26 07:58:14 UTC 1,497,226 bytes, 2,823 lines download raw bytes

1/*
2 angular-recaptcha build:2017-11-22
3 https://github.com/vividcortex/angular-recaptcha
4 Copyright (c) 2017 VividCortex
5*/
6!function(a){var b=null;a.modal=function(c,d){a.modal.close();var f,e;if(this.$body=a("body"),this.options=a.extend({},a.modal.defaults,d),this.options.doFade=!isNaN(parseInt(this.options.fadeDuration,10)),c.is("a"))if(e=c.attr("href"),/^#/.test(e)){if(this.$elm=a(e),1!==this.$elm.length)return null;this.open()}else this.$elm=a("<div>"),this.$body.append(this.$elm),f=function(a,c){c.elm.remove()},this.showSpinner(),c.trigger(a.modal.AJAX_SEND),a.get(e).done(function(d){b&&(c.trigger(a.modal.AJAX_SUCCESS),
7b.$elm.empty().append(d).on(a.modal.CLOSE,f),b.hideSpinner(),b.open(),c.trigger(a.modal.AJAX_COMPLETE))}).fail(function(){c.trigger(a.modal.AJAX_FAIL);b.hideSpinner();c.trigger(a.modal.AJAX_COMPLETE)});else this.$elm=c,this.open()};a.modal.prototype={constructor:a.modal,open:function(){var c=this;this.options.doFade?(this.block(),setTimeout(function(){c.show()},this.options.fadeDuration*this.options.fadeDelay)):(this.block(),this.show());this.options.escapeClose&&a(document).on("keydown.modal",function(c){27==
8c.which&&a.modal.close()});this.options.clickClose&&this.blocker.click(a.modal.close)},close:function(){this.unblock();this.hide();a(document).off("keydown.modal")},block:function(){var c=this.options.doFade?0:this.options.opacity;this.$elm.trigger(a.modal.BEFORE_BLOCK,[this._ctx()]);this.blocker=a('<div class="jquery-modal blocker"></div>').css({top:0,right:0,bottom:0,left:0,width:"100%",height:"100%",position:"fixed",zIndex:this.options.zIndex,background:this.options.overlay,opacity:c});this.$body.append(this.blocker);
9this.options.doFade&&this.blocker.animate({opacity:this.options.opacity},this.options.fadeDuration);this.$elm.trigger(a.modal.BLOCK,[this._ctx()])},unblock:function(){this.options.doFade?this.blocker.fadeOut(this.options.fadeDuration,function(){a(this).remove()}):this.blocker.remove()},show:function(){this.$elm.trigger(a.modal.BEFORE_OPEN,[this._ctx()]);this.options.showClose&&(this.closeButton=a('<a href="#close-modal" rel="modal:close" class="close-modal '+this.options.closeClass+'">'+this.options.closeText+
10"</a>"),this.$elm.append(this.closeButton));this.$elm.addClass(this.options.modalClass+" current");this.center();this.options.doFade?this.$elm.fadeIn(this.options.fadeDuration):this.$elm.show();this.$elm.trigger(a.modal.OPEN,[this._ctx()])},hide:function(){this.$elm.trigger(a.modal.BEFORE_CLOSE,[this._ctx()]);this.closeButton&&this.closeButton.remove();this.$elm.removeClass("current");this.options.doFade?this.$elm.fadeOut(this.options.fadeDuration):this.$elm.hide();this.$elm.trigger(a.modal.CLOSE,
11[this._ctx()])},showSpinner:function(){this.options.showSpinner&&(this.spinner=this.spinner||a('<div class="'+this.options.modalClass+'-spinner"></div>').append(this.options.spinnerHtml),this.$body.append(this.spinner),this.spinner.show())},hideSpinner:function(){this.spinner&&this.spinner.remove()},center:function(){this.$elm.css({position:"fixed",top:"50%",left:"50%",marginTop:-(this.$elm.outerHeight()/2),marginLeft:-(this.$elm.outerWidth()/2),zIndex:this.options.zIndex+1})},_ctx:function(){return{elm:this.$elm,
12blocker:this.blocker,options:this.options}}};a.modal.prototype.resize=a.modal.prototype.center;a.modal.close=function(a){if(b)return a&&a.preventDefault(),b.close(),a=b.$elm,b=null,a};a.modal.resize=function(){b&&b.resize()};a.modal.isActive=function(){return b?!0:!1};a.modal.defaults={overlay:"#000",opacity:0.75,zIndex:1E3,escapeClose:!0,clickClose:!0,closeText:"",closeClass:"",modalClass:"modal",spinnerHtml:null,showSpinner:!0,showClose:!0,fadeDuration:null,fadeDelay:1};a.modal.BEFORE_BLOCK="modal:before-block";
13a.modal.BLOCK="modal:block";a.modal.BEFORE_OPEN="modal:before-open";a.modal.OPEN="modal:open";a.modal.BEFORE_CLOSE="modal:before-close";a.modal.CLOSE="modal:close";a.modal.AJAX_SEND="modal:ajax:send";a.modal.AJAX_SUCCESS="modal:ajax:success";a.modal.AJAX_FAIL="modal:ajax:fail";a.modal.AJAX_COMPLETE="modal:ajax:complete";a.fn.modal=function(c){return 1===this.length&&(b=new a.modal(this,c)),this};a(document).on("click.modal",'a[rel="modal:close"]',a.modal.close);a(document).on("click.modal",'a[rel="modal:open"]',
14function(c){c.preventDefault();a(this).modal()})}(jQuery);
15(function(a){function b(a,c){var b=a.data("ddslick"),e=a.find(".dd-selected"),f=e.siblings(".dd-selected-value");a.find(".dd-options");e.siblings(".dd-pointer");var g=a.find(".dd-option").eq(c),p=g.closest("li"),o=b.settings,q=b.settings.data[c];a.find(".dd-option").removeClass("dd-option-selected");g.addClass("dd-option-selected");b.selectedIndex=c;b.selectedItem=p;b.selectedData=q;o.showSelectedHTML?e.html((q.imageSrc?'<img class="dd-selected-image'+("right"==o.imagePosition?" dd-image-right":"")+
16'" src="'+q.imageSrc+'" />':"")+(q.text?'<label class="dd-selected-text">'+q.text+"</label>":"")+(q.description?'<small class="dd-selected-description dd-desc'+(o.truncateDescription?" dd-selected-description-truncated":"")+'" >'+q.description+"</small>":"")):e.html(q.text);f.val(q.value);b.original.val(q.value);a.data("ddslick",b);d(a);e=a.find(".dd-select").css("height");f=a.find(".dd-selected-description");g=a.find(".dd-selected-image");0>=f.length&&0<g.length&&a.find(".dd-selected-text").css("lineHeight",
17e);"function"==typeof o.onSelected&&o.onSelected.call(this,b)}function c(c){var b=c.find(".dd-select"),d=b.siblings(".dd-options"),e=b.find(".dd-pointer"),g=d.is(":visible");a(".dd-click-off-close").not(d).slideUp(50);a(".dd-pointer").removeClass("dd-pointer-up");b.removeClass("dd-open");g?(d.slideUp("fast"),e.removeClass("dd-pointer-up"),b.removeClass("dd-open")):(b.addClass("dd-open"),d.slideDown("fast",function(){d.css({"max-height":300,overflow:"auto"})}),e.addClass("dd-pointer-up"));f(c)}function d(a){a.find(".dd-select").removeClass("dd-open");
18a.find(".dd-options").slideUp(50);a.find(".dd-pointer").removeClass("dd-pointer-up").removeClass("dd-pointer-up")}function f(c){c.find(".dd-option").each(function(){var b=a(this),d=b.css("height"),e=b.find(".dd-option-description"),f=c.find(".dd-option-image");0>=e.length&&0<f.length&&b.find(".dd-option-text").css("lineHeight",d)})}a.fn.ddslick=function(c){if(e[c])return e[c].apply(this,Array.prototype.slice.call(arguments,1));if("object"===typeof c||!c)return e.init.apply(this,arguments);a.error("Method "+
19c+" does not exists.")};var e={},g={data:[],keepJSONItemsOnTop:!1,width:260,height:null,background:"#eee",selectText:"",defaultSelectedIndex:null,truncateDescription:!0,imagePosition:"left",showSelectedHTML:!0,clickOffToClose:!0,embedCSS:!0,onSelected:function(){}};e.init=function(d){var e=a.extend({},g,d);0>=a("#css-ddslick").length&&e.embedCSS&&a('<style id="css-ddslick" type="text/css">.dd-select{ border-radius:2px; border:solid 1px #ccc; position:relative; cursor:pointer;}.dd-desc { color:#aaa; display:block; overflow: hidden; font-weight:normal; line-height: 1.4em; }.dd-selected{ overflow:hidden; display:block; padding:10px; font-weight:bold;}.dd-pointer{ width:0; height:0; position:absolute; right:10px; top:50%; margin-top:-3px;}.dd-pointer-down{ border:solid 5px transparent; border-top:solid 5px #000; }.dd-pointer-up{border:solid 5px transparent !important; border-bottom:solid 5px #000 !important; margin-top:-8px;}.dd-options{ border:solid 1px #ccc; border-top:none; list-style:none; box-shadow:0px 1px 5px #ddd; display:none; position:absolute; z-index:2000; margin:0; padding:0;background:#fff; overflow:auto;}.dd-option{ padding:10px; display:block; border-bottom:solid 1px #ddd; overflow:hidden; text-decoration:none; color:#333; cursor:pointer;-webkit-transition: all 0.25s ease-in-out; -moz-transition: all 0.25s ease-in-out;-o-transition: all 0.25s ease-in-out;-ms-transition: all 0.25s ease-in-out; }.dd-options > li:last-child > .dd-option{ border-bottom:none;}.dd-option:hover{ background:#f3f3f3; color:#000;}.dd-selected-description-truncated { text-overflow: ellipsis; white-space:nowrap; }.dd-option-selected { background:#f6f6f6; }.dd-option-image, .dd-selected-image { vertical-align:middle; float:left; margin-right:5px; max-width:64px;}.dd-image-right { float:right; margin-right:15px; margin-left:5px;}.dd-container{ position:relative;}\u200b .dd-selected-text { font-weight:bold}\u200b</style>').appendTo("head");
20return this.each(function(){var e=a.extend({},g,d),f=a(this);if(!f.data("ddslick")){var i=[];f.find("option").each(function(){var c=a(this),b=c.data();i.push({text:a.trim(c.text()),value:c.val(),selected:c.is(":selected"),description:b.description,imageSrc:b.imagesrc})});e.keepJSONItemsOnTop?a.merge(e.data,i):e.data=a.merge(i,e.data);var n=f,p=a("<div></div>").attr("id",f.attr("id")+"-dd-placeholder");f.replaceWith(p);f=p;f.addClass("dd-container").append('<div class="dd-select"><input class="dd-selected-value" type="hidden" /><a class="dd-selected"></a><span class="dd-pointer dd-pointer-down"></span></div>').append('<ul class="dd-options"></ul>');
21f.find("input.dd-selected-value").attr("id",a(n).attr("id")).attr("name",a(n).attr("name"));var i=f.find(".dd-select"),o=f.find(".dd-options");o.css({width:e.width});i.css({width:e.width,background:e.background});f.css({width:e.width});null!=e.height&&o.css({height:e.height,overflow:"auto"});a.each(e.data,function(a,c){c.selected&&(e.defaultSelectedIndex=a);o.append('<li><a class="dd-option">'+(c.value?' <input class="dd-option-value" type="hidden" value="'+c.value+'" />':"")+(c.imageSrc?' <img class="dd-option-image'+
22("right"==e.imagePosition?" dd-image-right":"")+'" src="'+c.imageSrc+'" />':"")+(c.text?' <label class="dd-option-text">'+c.text+"</label>":"")+(c.description?' <small class="dd-option-description dd-desc">'+c.description+"</small>":"")+"</a></li>")});f.data("ddslick",{settings:e,original:n,selectedIndex:-1,selectedItem:null,selectedData:null});0<e.selectText.length&&null==e.defaultSelectedIndex?f.find(".dd-selected").html(e.selectText):b(f,null!=e.defaultSelectedIndex&&0<=e.defaultSelectedIndex&&
23e.defaultSelectedIndex<e.data.length?e.defaultSelectedIndex:0);f.find(".dd-select").on("click.ddslick",function(){c(f)});f.find(".dd-option").on("click.ddslick",function(){b(f,a(this).closest("li").index())});e.clickOffToClose&&(o.addClass("dd-click-off-close"),f.on("click.ddslick",function(a){a.stopPropagation()}),a("body").on("click",function(){a(".dd-open").removeClass("dd-open");a(".dd-click-off-close").slideUp(50).siblings(".dd-select").find(".dd-pointer").removeClass("dd-pointer-up")}))}})};
24e.select=function(c){return this.each(function(){void 0!==c.index&&b(a(this),c.index);if(c.id){var d=a(this),e=d.find(".dd-option-value[value= '"+c.id+"']").parents("li").prevAll().length;b(d,e)}})};e.open=function(){return this.each(function(){var b=a(this);b.data("ddslick")&&c(b)})};e.close=function(){return this.each(function(){var c=a(this);c.data("ddslick")&&d(c)})};e.destroy=function(){return this.each(function(){var c=a(this),b=c.data("ddslick");b&&(b=b.original,c.removeData("ddslick").unbind(".ddslick").replaceWith(b))})}})(jQuery);
25(function(a){function b(c,b){this.$element=a(c);this.options=b;this.enabled=!0;this.fixTitle()}b.prototype={show:function(){var c=this.getTitle();if(c&&this.enabled){var b=this.tip();b.find(".tipsy-inner")[this.options.html?"html":"text"](c);b[0].className="tipsy";b.remove().css({top:0,left:0,visibility:"hidden",display:"block"}).prependTo(document.body);var c=a.extend({},this.$element.offset(),{width:this.$element[0].offsetWidth,height:this.$element[0].offsetHeight}),f=b[0].offsetWidth,e=b[0].offsetHeight,
26g="function"==typeof this.options.gravity?this.options.gravity.call(this.$element[0]):this.options.gravity,h;switch(g.charAt(0)){case "n":h={top:c.top+c.height+this.options.offset,left:c.left+c.width/2-f/2};break;case "s":h={top:c.top-e-this.options.offset,left:c.left+c.width/2-f/2};break;case "e":h={top:c.top+c.height/2-e/2,left:c.left-f-this.options.offset};break;case "w":h={top:c.top+c.height/2-e/2,left:c.left+c.width+this.options.offset}}2==g.length&&(h.left="w"==g.charAt(1)?c.left+c.width/2-
2715:c.left+c.width/2-f+15);b.css(h).addClass("tipsy-"+g);b.find(".tipsy-arrow")[0].className="tipsy-arrow tipsy-arrow-"+g.charAt(0);this.options.className&&b.addClass("function"==typeof this.options.className?this.options.className.call(this.$element[0]):this.options.className);this.options.fade?b.stop().css({opacity:0,display:"block",visibility:"visible"}).animate({opacity:this.options.opacity}):b.css({visibility:"visible",opacity:this.options.opacity})}},hide:function(){this.options.fade?this.tip().stop().fadeOut(function(){a(this).remove()}):
28this.tip().remove()},fixTitle:function(){var a=this.$element;if(a.attr("title")||"string"!=typeof a.attr("original-title"))a.attr("original-title",a.attr("title")||"").removeAttr("title")},getTitle:function(){var a,b=this.$element,f=this.options;this.fixTitle();f=this.options;"string"==typeof f.title?a=b.attr("title"==f.title?"original-title":f.title):"function"==typeof f.title&&(a=f.title.call(b[0]));return(a=(""+a).replace(/(^\s*|\s*$)/,""))||f.fallback},tip:function(){this.$tip||(this.$tip=a('<div class="tipsy"></div>').html('<div class="tipsy-arrow"></div><div class="tipsy-inner"></div>'),
29this.$tip.data("tipsy-pointee",this.$element[0]));return this.$tip},validate:function(){this.$element[0].parentNode||(this.hide(),this.options=this.$element=null)},enable:function(){this.enabled=!0},disable:function(){this.enabled=!1},toggleEnabled:function(){this.enabled=!this.enabled}};a.fn.tipsy=function(c){function d(d){var e=a.data(d,"tipsy");e||(e=new b(d,a.fn.tipsy.elementOptions(d,c)),a.data(d,"tipsy",e));return e}function f(){var a=d(this);a.hoverState="in";0==c.delayIn?a.show():(a.fixTitle(),
30setTimeout(function(){"in"==a.hoverState&&a.show()},c.delayIn))}function e(){var a=d(this);a.hoverState="out";0==c.delayOut?a.hide():setTimeout(function(){"out"==a.hoverState&&a.hide()},c.delayOut)}if(!0===c)return this.data("tipsy");if("string"==typeof c){var g=this.data("tipsy");if(g)g[c]();return this}c=a.extend({},a.fn.tipsy.defaults,c);c.live||this.each(function(){d(this)});if("manual"!=c.trigger){var g=c.live?"live":"bind",h="hover"==c.trigger?"mouseleave":"blur";this[g]("hover"==c.trigger?
31"mouseenter":"focus",f)[g](h,e)}return this};a.fn.tipsy.defaults={className:null,delayIn:0,delayOut:0,fade:!1,fallback:"",gravity:"n",html:!1,live:!1,offset:0,opacity:0.8,title:"title",trigger:"hover"};a.fn.tipsy.revalidate=function(){a(".tipsy").each(function(){var c=a.data(this,"tipsy-pointee"),b;if(!(b=!c)){a:{for(;c=c.parentNode;)if(c==document){c=!0;break a}c=!1}
31b=!c}b&&a(this).remove()})};a.fn.tipsy.elementOptions=function(c,b){return a.metadata?a.extend({},b,a(c).metadata()):b};a.fn.tipsy.autoNS=
32function(){return a(this).offset().top>a(document).scrollTop()+a(window).height()/2?"s":"n"};a.fn.tipsy.autoWE=function(){return a(this).offset().left>a(document).scrollLeft()+a(window).width()/2?"e":"w"};a.fn.tipsy.autoBounds=function(c,b){return function(){var f=b[0],e=1<b.length?b[1]:!1,g=a(document).scrollTop()+c,h=a(document).scrollLeft()+c,i=a(this);i.offset().top<g&&(f="n");i.offset().left<h&&(e="w");a(window).width()+a(document).scrollLeft()-i.offset().left<c&&(e="e");a(window).height()+a(document).scrollTop()-
33i.offset().top<c&&(f="s");return f+(e?e:"")}}})(jQuery);
34(function(a,b,c){function d(a){return a}function f(a){return decodeURIComponent(a.replace(e," "))}var e=/\+/g,g=a.cookie=function(e,i,j){if(i!==c){j=a.extend({},g.defaults,j);null===i&&(j.expires=-1);if("number"===typeof j.expires){var k=j.expires,l=j.expires=new Date;l.setDate(l.getDate()+k)}i=g.json?JSON.stringify(i):""+i;return b.cookie=[encodeURIComponent(e),"=",g.raw?i:encodeURIComponent(i),j.expires?"; expires="+j.expires.toUTCString():"",j.path?"; path="+j.path:"",j.domain?"; domain="+j.domain:
35"",j.secure?"; secure":""].join("")}i=g.raw?d:f;j=b.cookie.split("; ");for(k=0;l=j[k]&&j[k].split("=");k++)if(i(l.shift())===e)return e=i(l.join("=")),g.json?JSON.parse(e):e;return null};g.defaults={};a.removeCookie=function(c,b){return null!==a.cookie(c)?(a.cookie(c,null,b),!0):!1}})(jQuery,document);jQuery.easing.jswing=jQuery.easing.swing;
36jQuery.extend(jQuery.easing,{def:"easeOutQuad",swing:function(a,b,c,d,f){return jQuery.easing[jQuery.easing.def](a,b,c,d,f)},easeInQuad:function(a,b,c,d,f){return d*(b/=f)*b+c},easeOutQuad:function(a,b,c,d,f){return-d*(b/=f)*(b-2)+c},easeInOutQuad:function(a,b,c,d,f){return 1>(b/=f/2)?d/2*b*b+c:-d/2*(--b*(b-2)-1)+c},easeInCubic:function(a,b,c,d,f){return d*(b/=f)*b*b+c},easeOutCubic:function(a,b,c,d,f){return d*((b=b/f-1)*b*b+1)+c},easeInOutCubic:function(a,b,c,d,f){return 1>(b/=f/2)?d/2*b*b*b+c:
37d/2*((b-=2)*b*b+2)+c},easeInQuart:function(a,b,c,d,f){return d*(b/=f)*b*b*b+c},easeOutQuart:function(a,b,c,d,f){return-d*((b=b/f-1)*b*b*b-1)+c},easeInOutQuart:function(a,b,c,d,f){return 1>(b/=f/2)?d/2*b*b*b*b+c:-d/2*((b-=2)*b*b*b-2)+c},easeInQuint:function(a,b,c,d,f){return d*(b/=f)*b*b*b*b+c},easeOutQuint:function(a,b,c,d,f){return d*((b=b/f-1)*b*b*b*b+1)+c},easeInOutQuint:function(a,b,c,d,f){return 1>(b/=f/2)?d/2*b*b*b*b*b+c:d/2*((b-=2)*b*b*b*b+2)+c},easeInSine:function(a,b,c,d,f){return-d*Math.cos(b/
38f*(Math.PI/2))+d+c},easeOutSine:function(a,b,c,d,f){return d*Math.sin(b/f*(Math.PI/2))+c},easeInOutSine:function(a,b,c,d,f){return-d/2*(Math.cos(Math.PI*b/f)-1)+c},easeInExpo:function(a,b,c,d,f){return 0==b?c:d*Math.pow(2,10*(b/f-1))+c},easeOutExpo:function(a,b,c,d,f){return b==f?c+d:d*(-Math.pow(2,-10*b/f)+1)+c},easeInOutExpo:function(a,b,c,d,f){return 0==b?c:b==f?c+d:1>(b/=f/2)?d/2*Math.pow(2,10*(b-1))+c:d/2*(-Math.pow(2,-10*--b)+2)+c},easeInCirc:function(a,b,c,d,f){return-d*(Math.sqrt(1-(b/=f)*
39b)-1)+c},easeOutCirc:function(a,b,c,d,f){return d*Math.sqrt(1-(b=b/f-1)*b)+c},easeInOutCirc:function(a,b,c,d,f){return 1>(b/=f/2)?-d/2*(Math.sqrt(1-b*b)-1)+c:d/2*(Math.sqrt(1-(b-=2)*b)+1)+c},easeInElastic:function(a,b,c,d,f){var a=1.70158,e=0,g=d;if(0==b)return c;if(1==(b/=f))return c+d;e||(e=0.3*f);g<Math.abs(d)?(g=d,a=e/4):a=e/(2*Math.PI)*Math.asin(d/g);return-(g*Math.pow(2,10*(b-=1))*Math.sin((b*f-a)*2*Math.PI/e))+c},easeOutElastic:function(a,b,c,d,f){var a=1.70158,e=0,g=d;if(0==b)return c;if(1==
40(b/=f))return c+d;e||(e=0.3*f);g<Math.abs(d)?(g=d,a=e/4):a=e/(2*Math.PI)*Math.asin(d/g);return g*Math.pow(2,-10*b)*Math.sin((b*f-a)*2*Math.PI/e)+d+c},easeInOutElastic:function(a,b,c,d,f){var a=1.70158,e=0,g=d;if(0==b)return c;if(2==(b/=f/2))return c+d;e||(e=f*0.3*1.5);g<Math.abs(d)?(g=d,a=e/4):a=e/(2*Math.PI)*Math.asin(d/g);return 1>b?-0.5*g*Math.pow(2,10*(b-=1))*Math.sin((b*f-a)*2*Math.PI/e)+c:0.5*g*Math.pow(2,-10*(b-=1))*Math.sin((b*f-a)*2*Math.PI/e)+d+c},easeInBack:function(a,b,c,d,f,e){void 0==
41e&&(e=1.70158);return d*(b/=f)*b*((e+1)*b-e)+c},easeOutBack:function(a,b,c,d,f,e){void 0==e&&(e=1.70158);return d*((b=b/f-1)*b*((e+1)*b+e)+1)+c},easeInOutBack:function(a,b,c,d,f,e){void 0==e&&(e=1.70158);return 1>(b/=f/2)?d/2*b*b*(((e*=1.525)+1)*b-e)+c:d/2*((b-=2)*b*(((e*=1.525)+1)*b+e)+2)+c},easeInBounce:function(a,b,c,d,f){return d-jQuery.easing.easeOutBounce(a,f-b,0,d,f)+c},easeOutBounce:function(a,b,c,d,f){return(b/=f)<1/2.75?d*7.5625*b*b+c:b<2/2.75?d*(7.5625*(b-=1.5/2.75)*b+0.75)+c:b<2.5/2.75?
42d*(7.5625*(b-=2.25/2.75)*b+0.9375)+c:d*(7.5625*(b-=2.625/2.75)*b+0.984375)+c},easeInOutBounce:function(a,b,c,d,f){return b<f/2?0.5*jQuery.easing.easeInBounce(a,2*b,0,d,f)+c:0.5*jQuery.easing.easeOutBounce(a,2*b-f,0,d,f)+0.5*d+c}});
43(function(a){function b(c){var b=c||window.event,e=[].slice.call(arguments,1
43),g=0,h=0,i=0,c=a.event.fix(b);c.type="mousewheel";c.wheelDelta&&(g=c.wheelDelta/120);c.detail&&(g=-c.detail/3);i=g;void 0!==b.axis&&b.axis===b.HORIZONTAL_AXIS&&(i=0,h=-1*g);void 0!==b.wheelDeltaY&&(i=b.wheelDeltaY/120);void 0!==b.wheelDeltaX&&(h=-1*b.wheelDeltaX/120);e.unshift(c,g,h,i);return a.event.handle.apply(this,e)}var c=["DOMMouseScroll","mousewheel"];a.event.special.mousewheel={setup:function(){if(this.addEventListener)for(var a=
44c.length;a;)this.addEventListener(c[--a],b,!1);else this.onmousewheel=b},teardown:function(){if(this.removeEventListener)for(var a=c.length;a;)this.removeEventListener(c[--a],b,!1);else this.onmousewheel=null}};a.fn.extend({mousewheel:function(a){return a?this.bind("mousewheel",a):this.trigger("mousewheel")},unmousewheel:function(a){return this.unbind("mousewheel",a)}})})(jQuery);
45(function(a,b,c){a.anythingSlider=function(d,f){var e=this,g,h;e.el=d;e.$el=a(d).addClass("anythingBase").wrap('<div class="anythingSlider"><div class="anythingWindow" /></div>');e.$el.data("AnythingSlider",e);e.init=function(){e.options=g=a.extend({},a.anythingSlider.defaults,f);e.initialized=!1;a.isFunction(g.onBeforeInitialize)&&e.$el.bind("before_initialize",g.onBeforeInitialize);e.$el.trigger("before_initialize",e);a('<\!--[if lte IE 8]><script>jQuery("body").addClass("as-oldie");<\/script><![endif]--\>').appendTo("body").remove();
46e.$wrapper=e.$el.parent().closest("div.anythingSlider").addClass("anythingSlider-"+g.theme);e.$outer=e.$wrapper.parent();e.$window=e.$el.closest("div.anythingWindow");e.$win=a(b);e.$controls=a('<div class="anythingControls"></div>');e.$nav=a('<ul class="thumbNav"><li><a><span></span></a></li></ul>');e.$startStop=a('<a href="#" class="start-stop"></a>');(g.buildStartStop||g.buildNavigation)&&e.$controls.appendTo(g.appendControlsTo&&a(g.appendControlsTo).length?a(g.appendControlsTo):e.$wrapper);g.buildNavigation&&
47e.$nav.appendTo(g.appendNavigationTo&&a(g.appendNavigationTo).length?a(g.appendNavigationTo):e.$controls);g.buildStartStop&&e.$startStop.appendTo(g.appendStartStopTo&&a(g.appendStartStopTo).length?a(g.appendStartStopTo):e.$controls);e.runTimes=a(".anythingBase").length;e.regex=g.hashTags?RegExp("panel"+e.runTimes+"-(\\d+)","i"):null;1===e.runTimes&&e.makeActive();e.flag=!1;g.autoPlayLocked&&(g.autoPlay=!0);e.playing=g.autoPlay;e.slideshow=!1;e.hovered=!1;e.panelSize=[];e.currentPage=e.targetPage=
48g.startPanel=parseInt(g.startPanel,10)||1;g.changeBy=parseInt(g.changeBy,10)||1;h=(g.mode||"h").toLowerCase().match(/(h|v|f)/);h=g.vertical?"v":(h||["h"])[0];g.mode="v"===h?"vertical":"f"===h?"fade":"horizontal";"f"===h&&(g.showMultiple=1,g.infiniteSlides=!1);e.adj=g.infiniteSlides?0:1;e.adjustMultiple=0;g.playRtl&&e.$wrapper.addClass("rtl");g.buildStartStop&&e.buildAutoPlay();g.buildArrows&&e.buildNextBackButtons();e.$lastPage=e.$targetPage=e.$currentPage;if(g.expand){if(!0===g.aspectRatio)g.aspectRatio=
49e.$el.width()/e.$el.height();else if("string"===typeof g.aspectRatio&&-1!==g.aspectRatio.indexOf(":")){var d=g.aspectRatio.split(":");g.aspectRatio=d[0]/d[1]}0<g.aspectRatio&&1<g.showMultiple&&(g.aspectRatio*=g.showMultiple)}e.updateSlider();g.expand&&(e.$window.css({width:"100%",height:"100%"}),e.checkResize());a.isFunction(a.easing[g.easing])||(g.easing="swing");g.pauseOnHover&&e.$wrapper.hover(function(){e.playing&&(e.$el.trigger("slideshow_paused",e),e.clearTimer(!0))},function(){e.playing&&(e.$el.trigger("slideshow_unpaused",
50e),e.startStop(e.playing,!0))});e.slideControls(!1);e.$wrapper.bind("mouseenter mouseleave",function(c){a(this)["mouseenter"===c.type?"addClass":"removeClass"]("anythingSlider-hovered");e.hovered="mouseenter"===c.type?!0:!1;e.slideControls(e.hovered)});a(c).keyup(function(a){if(g.enableKeyboard&&e.$wrapper.hasClass("activeSlider")&&!a.target.tagName.match("TEXTAREA|INPUT|SELECT")&&("vertical"===g.mode||38!==a.which&&40!==a.which))switch(a.which){case 39:case 40:e.goForward();break;case 37:case 38:e.goBack()}});
51e.currentPage=(g.hashTags?e.gotoHash():"")||g.startPanel||1;e.gotoPage(e.currentPage,!1,null,-1);var j="slideshow_resized slideshow_paused slideshow_unpaused slide_init slide_begin slideshow_stop slideshow_start initialized swf_completed".split(" ");a.each("onSliderResize onShowPause onShowUnpause onSlideInit onSlideBegin onShowStop onShowStart onInitialized onSWFComplete".split(" "),function(c,b){a.isFunction(g[b])&&e.$el.bind(j[c],g[b])});a.isFunction(g.onSlideComplete)&&e.$el.bind("slide_complete",
52function(){setTimeout(function(){g.onSlideComplete(e)},0);return!1});e.initialized=!0;e.$el.trigger("initialized",e);e.startStop(g.autoPlay)};e.updateSlider=function(){e.$el.children(".cloned").remove();e.navTextVisible="hidden"!==e.$nav.find("span:first").css("visibility");e.$nav.empty();e.currentPage=e.currentPage||1;e.$items=e.$el.children();e.pages=e.$items.length;e.dir="vertical"===g.mode?"top":"left";g.showMultiple=parseInt(g.showMultiple,10)||1;g.navigationSize=!1===g.navigationSize?0:parseInt(g.navigationSize,
5310)||0;e.$items.find("a").unbind("focus.AnythingSlider").bind("focus.AnythingSlider",function(c){var b=a(this).closest(".panel"),b=e.$items.index(b)+e.adj;e.$items.find(".focusedLink").removeClass("focusedLink");a(this).addClass("focusedLink");e.$window.scrollLeft(0).scrollTop(0);-1!==b&&(b>=e.currentPage+g.showMultiple||b<e.currentPage)&&(e.gotoPage(b),c.preventDefault())});1<g.showMultiple&&(g.showMultiple>e.pages&&(g.showMultiple=e.pages),e.adjustMultiple=g.infiniteSlides&&1<e.pages?0:g.showMultiple-
541);e.$controls.add(e.$nav).add(e.$startStop).add(e.$forward).add(e.$back)[1>=e.pages?"hide":"show"]();1<e.pages&&e.buildNavigation();"fade"!==g.mode&&g.infiniteSlides&&1<e.pages&&(e.$el.prepend(e.$items.filter(":last").clone().addClass("cloned")),1<g.showMultiple?e.$el.append(e.$items.filter(":lt("+g.showMultiple+")").clone().addClass("cloned multiple")):e.$el.append(e.$items.filter(":first").clone().addClass("cloned")),e.$el.find(".cloned").each(function(){a(this).find("a,input,textarea,select,button,area,form").attr({disabled:"disabled",
55name:""});a(this).find("[id]")[a.fn.addBack?"addBack":"andSelf"]().removeAttr("id")}));e.$items=e.$el.addClass(g.mode).children().addClass("panel");e.setDimensions();g.resizeContents?(e.$items.css("width",e.width),e.$wrapper.css("width",e.getDim(e.currentPage)[0]).add(e.$items).css("height",e.height)):e.$win.load(function(){e.setDimensions();h=e.getDim(e.currentPage);e.$wrapper.css({width:h[0],height:h[1]});e.setCurrentPage(e.currentPage,!1)});e.currentPage>e.pages&&(e.currentPage=e.pages);e.setCurrentPage(e.currentPage,
56!1);e.$nav.find("a").eq(e.currentPage-1).addClass("cur");"fade"===g.mode&&(h=e.$items.eq(e.currentPage-1),g.resumeOnVisible?h.css({opacity:1,visibility:"visible"}).siblings().css({opacity:0,visibility:"hidden"}):(e.$items.css("opacity",1),h.fadeIn(0).siblings().fadeOut(0)))};e.buildNavigation=function(){if(g.buildNavigation&&1<e.pages){var c,b,d,f,h;e.$items.filter(":not(.cloned)").each(function(p){h=a("<li/>");d=p+1;b=(1===d?" first":"")+(d===e.pages?" last":"");c='<a class="panel'+d+(e.navTextVisible?
57'"':" "+g.tooltipClass+'" title="@"')+' href="#"><span>@</span></a>';a.isFunction(g.navigationFormatter)?(f=g.navigationFormatter(d,a(this)),"string"===typeof f?h.html(c.replace(/@/g,f)):h=a("<li/>",f)):h.html(c.replace(/@/g,d));h.appendTo(e.$nav).addClass(b).data("index",d)});e.$nav.children("li").bind(g.clickControls,function(c){!e.flag&&g.enableNavigation&&(e.flag=!0,setTimeout(function(){e.flag=!1},100),e.gotoPage(a(this).data("index")));c.preventDefault()});
57g.navigationSize&&g.navigationSize<
58e.pages&&(e.$controls.find(".anythingNavWindow").length||e.$nav.before('<ul><li class="prev"><a href="#"><span>'+g.backText+"</span></a></li></ul>").after('<ul><li class="next"><a href="#"><span>'+g.forwardText+"</span></a></li></ul>").wrap('<div class="anythingNavWindow"></div>'),e.navWidths=e.$nav.find("li").map(function(){return a(this).outerWidth(!0)+Math.ceil(parseInt(a(this).find("span").css("left"),10)/2||0)}).get(),e.navLeft=e.currentPage,e.$nav.width(e.navWidth(1,e.pages+1)+25),e.$controls.find(".anythingNavWindow").width(e.navWidth(1,
59g.navigationSize+1)).end().find(".prev,.next").bind(g.clickControls,function(c){e.flag||(e.flag=!0,setTimeout(function(){e.flag=!1},200),e.navWindow(e.navLeft+g.navigationSize*(a(this).is(".prev")?-1:1)));c.preventDefault()}))}};e.navWidth=function(a,c){var b;b=Math.min(a,c);for(var d=Math.max(a,c),f=0;b<d;b++)f+=e.navWidths[b-1]||0;return f};e.navWindow=function(a){if(g.navigationSize&&g.navigationSize<e.pages&&e.navWidths){var c=e.pages-g.navigationSize+1,a=1>=a?1:1<a&&a<c?a:c;a!==e.navLeft&&(e.$controls.find(".anythingNavWindow").animate({scrollLeft:e.navWidth(1,
60a),width:e.navWidth(a,a+g.navigationSize)},{queue:!1,duration:g.animationTime}),e.navLeft=a)}};e.buildNextBackButtons=function(){e.$forward=a('<span class="arrow forward"><a href="#"><span>'+g.forwardText+"</span></a></span>");e.$back=a('<span class="arrow back"><a href="#"><span>'+g.backText+"</span></a></span>");e.$back.bind(g.clickBackArrow,function(a){g.enableArrows&&!e.flag&&(e.flag=!0,setTimeout(function(){e.flag=!1},100),e.goBack());a.preventDefault()});e.$forward.bind(g.clickForwardArrow,
61function(a){g.enableArrows&&!e.flag&&(e.flag=!0,setTimeout(function(){e.flag=!1},100),e.goForward());a.preventDefault()});e.$back.add(e.$forward).find("a").bind("focusin focusout",function(){a(this).toggleClass("hover")});e.$back.appendTo(g.appendBackTo&&a(g.appendBackTo).length?a(g.appendBackTo):e.$wrapper);e.$forward.appendTo(g.appendForwardTo&&a(g.appendForwardTo).length?a(g.appendForwardTo):e.$wrapper);e.arrowWidth=e.$forward.width();e.arrowRight=parseInt(e.$forward.css("right"),10);e.arrowLeft=
62parseInt(e.$back.css("left"),10)};e.buildAutoPlay=function(){e.$startStop.html("<span>"+(e.playing?g.stopText:g.startText)+"</span>").bind(g.clickSlideshow,function(a){g.enableStartStop&&(e.startStop(!e.playing),e.makeActive(),e.playing&&!g.autoPlayDelayed&&e.goForward(!0,g.playRtl));a.preventDefault()}).bind("focusin focusout",function(){a(this).toggleClass("hover")})};e.checkResize=function(a){var b=!(!c.hidden&&!c.webkitHidden&&!c.mozHidden&&!c.msHidden);clearTimeout(e.resizeTimer);e.resizeTimer=
63setTimeout(function(){var c=e.$outer.width(),d="BODY"===e.$outer[0].tagName?e.$win.height():e.$outer.height();b||e.lastDim[0]===c&&e.lastDim[1]===d||(e.setDimensions(),e.$el.trigger("slideshow_resized",e),e.gotoPage(e.currentPage,e.playing,null,-1));"undefined"===typeof a&&e.checkResize()},b?2E3:500)};e.setDimensions=function(){e.$wrapper.find(".anythingWindow, .anythingBase, .panel")[a.fn.addBack?"addBack":"andSelf"]().css({width:"",height:""});e.width=e.$el.width();e.height=e.$el.height();e.outerPad=
64[e.$wrapper.innerWidth()-e.$wrapper.width(),e.$wrapper.innerHeight()-e.$wrapper.height()];var c,b,d,f,h=0,p={width:"100%",height:"100%"},o=1<g.showMultiple&&"horizontal"===g.mode?e.width||e.$window.width()/g.showMultiple:e.$window.width(),q=1<g.showMultiple&&"vertical"===g.mode?e.height/g.showMultiple||e.$window.height()/g.showMultiple:e.$window.height();if(g.expand){e.lastDim=[e.$outer.width(),e.$outer.height()];c=e.lastDim[0]-e.outerPad[0];b=e.lastDim[1]-e.outerPad[1];if(g.aspectRatio&&g.aspectRatio<
65e.width){var s=b*g.aspectRatio;s<c?c=s:(s=c/g.aspectRatio,s<b&&(b=s))}e.$wrapper.add(e.$window).css({width:c,height:b});e.height=b=1<g.showMultiple&&"vertical"===g.mode?q:b;e.width=o=1<g.showMultiple&&"horizontal"===g.mode?c/g.showMultiple:c;e.$items.css({width:o,height:q})}e.$items.each(function(r){f=a(this);d=f.children();g.resizeContents?(c=e.width,b=e.height,f.css({width:c,height:b}),d.length&&("EMBED"===d[0].tagName&&d.attr(p),"OBJECT"===d[0].tagName&&d.find("embed").attr(p),1===d.length&&d.css(p))):
66("vertical"===g.mode?(c=f.css("display","inline-block").width(),f.css("display","")):c=f.width()||e.width,1===d.length&&c>=o&&(c=d.width()>=o?o:d.width(),d.css("max-width",c)),f.css({width:c,height:""}),b=1===d.length?d.outerHeight(!0):f.height(),b<=e.outerPad[1]&&(b=e.height),f.css("height",b));e.panelSize[r]=[c,b,h];h+="vertical"===g.mode?b:c});e.$el.css("vertical"===g.mode?"height":"width","fade"===g.mode?e.width:h)};e.getDim=function(a){var c,b,d=e.width,f=e.height;if(1>e.pages||isNaN(a))return[d,
67f];a=g.infiniteSlides&&1<e.pages?a:a-1;if(b=e.panelSize[a])d=b[0]||d,f=b[1]||f;if(1<g.showMultiple)for(b=1;b<g.showMultiple;b++)c=a+b,"vertical"===g.mode?(d=Math.max(d,e.panelSize[c][0]),f+=e.panelSize[c][1]):(d+=e.panelSize[c][0],f=Math.max(f,e.panelSize[c][1]));return[d,f]};e.goForward=function(a,c){e.gotoPage(e[g.allowRapidChange?"targetPage":"currentPage"]+g.changeBy*(c?-1:1),a)};e.goBack=function(a){e.gotoPage(e[g.allowRapidChange?"targetPage":"currentPage"]-g.changeBy,a)};e.gotoPage=function(c,
68b,d,f){!0!==b&&(b=!1,e.startStop(!1),e.makeActive());/^[#|.]/.test(c)&&a(c).length&&(c=a(c).closest(".panel").index()+e.adj);if(1!==g.changeBy){var h=e.pages-e.adjustMultiple;1>c&&(c=g.stopAtEnd?1:g.infiniteSlides?e.pages+c:g.showMultiple>1-c?1:h);c>e.pages?c=g.stopAtEnd?e.pages:g.showMultiple>1-c?1:c-=h:c>=h&&(c=h)}1>=e.pages||(e.$lastPage=e.$currentPage,"number"!==typeof c&&(c=parseInt(c,10)||g.startPanel,e.setCurrentPage(c)),b&&g.isVideoPlaying(e)||(g.stopAtEnd&&!g.infiniteSlides&&c>e.pages-g.showMultiple&&
69(c=e.pages-g.showMultiple+1),e.exactPage=c,c>e.pages+1-e.adj&&(c=g.infiniteSlides||g.stopAtEnd?e.pages:1),c<e.adj&&(c=g.infiniteSlides||g.stopAtEnd?1:e.pages),g.infiniteSlides||(e.exactPage=c),e.currentPage=c>e.pages?e.pages:1>c?1:e.currentPage,e.$currentPage=e.$items.eq(e.currentPage-e.adj),e.targetPage=0===c?e.pages:c>e.pages?1:c,e.$targetPage=e.$items.eq(e.targetPage-e.adj),f="undefined"!==typeof f?f:g.animationTime,0<=f&&e.$el.trigger("slide_init",e),0<f&&!0===g.toggleControls&&e.slideControls(!0),
70g.buildNavigation&&e.setNavigation(e.targetPage),!0!==b&&(b=!1),(!b||g.stopAtEnd&&c===e.pages)&&e.startStop(!1),0<=f&&e.$el.trigger("slide_begin",e),setTimeout(function(a){var b,h=!0;g.allowRapidChange&&e.$wrapper.add(e.$el).add(e.$items).stop(!0,!0);g.resizeContents||(b=e.getDim(c),a={},e.$wrapper.width()!==b[0]&&(a.width=b[0]||e.width,h=!1),e.$wrapper.height()!==b[1]&&(a.height=b[1]||e.height,h=!1),h||e.$wrapper.filter(":not(:animated)").animate(a,{queue:!1,duration:0>f?0:f,easing:g.easing}));"fade"===
71g.mode?e.$lastPage[0]!==e.$targetPage[0]?(e.fadeIt(e.$lastPage,0,f),e.fadeIt(e.$targetPage,1,f,function(){e.endAnimation(c,d,f)})):e.endAnimation(c,d,f):(a={},a[e.dir]=-e.panelSize[g.infiniteSlides&&1<e.pages?c:c-1][2],"vertical"!==g.mode||g.resizeContents||(a.width=b[0]),e.$el.filter(":not(:animated)").animate(a,{queue:!1,duration:0>f?0:f,easing:g.easing,complete:function(){e.endAnimation(c,d,f)}}))},parseInt(g.delayBeforeAnimate,10)||0)))};e.endAnimation=function(a,c,b){0===a?(e.$el.css(e.dir,"fade"===
72g.mode?0:-e.panelSize[e.pages][2]),a=e.pages):a>e.pages&&(e.$el.css(e.dir,"fade"===g.mode?0:-e.panelSize[1][2]),a=1);e.exactPage=a;e.setCurrentPage(a,!1);"fade"===g.mode&&e.fadeIt(e.$items.not(":eq("+(a-e.adj)+")"),0,0);e.hovered||e.slideControls(!1);g.hashTags&&e.setHash(a);0<=b&&e.$el.trigger("slide_complete",e);"function"===typeof c&&c(e);g.autoPlayLocked&&!e.playing&&setTimeout(function(){e.startStop(!0)},g.resumeDelay-(g.autoPlayDelayed?g.delay:0))};e.fadeIt=function(c,b,d,e){var f=c.filter(":not(:animated)"),
73c=0>d?0:d;if(g.resumeOnVisible)1===b&&f.css("visibility","visible"),f.fadeTo(c,b,function(){0===b&&f.css("visibility","hidden");a.isFunction(e)&&e()});else f[0===b?"fadeOut":"fadeIn"](c,e)};e.setCurrentPage=function(a,c){a=parseInt(a,10);if(!(1>e.pages||0===a||isNaN(a))){a>e.pages+1-e.adj&&(a=e.pages-e.adj);a<e.adj&&(a=1);g.buildArrows&&!g.infiniteSlides&&g.stopAtEnd&&(e.$forward[a===e.pages-e.adjustMultiple?"addClass":"removeClass"]("disabled"),e.$back[1===a?"addClass":"removeClass"]("disabled"),
74a===e.pages&&e.playing&&e.startStop());if(!c){var b=e.getDim(a);e.$wrapper.css({width:b[0],height:b[1]}).add(e.$window).scrollLeft(0).scrollTop(0);e.$el.css(e.dir,"fade"===g.mode?0:-e.panelSize[g.infiniteSlides&&1<e.pages?a:a-1][2])}e.currentPage=a;e.$currentPage=e.$items.removeClass("activePage").eq(a-e.adj).addClass("activePage");g.buildNavigation&&e.setNavigation(a)}};e.setNavigation=function(a){e.$nav.find(".cur").removeClass("cur").end().find("a").eq(a-1).addClass("cur")};e.makeActive=function(){e.$wrapper.hasClass("activeSlider")||
75(a(".activeSlider").removeClass("activeSlider"),e.$wrapper.addClass("activeSlider"))};e.gotoHash=function(){var c=b.location.hash,d=c.indexOf("&"),f=c.match(e.regex);null!==f||/^#&/.test(c)||/#!?\//.test(c)||/\=/.test(c)?null!==f&&(f=g.hashTags?parseInt(f[1],10):null):(c=c.substring(0,0<=d?d:c.length),f=a(c).length&&a(c).closest(".anythingBase")[0]===e.el?e.$items.index(a(c).closest(".panel"))+e.adj:null);return f};e.setHash=function(a){var c="panel"+e.runTimes+"-",d=b.location.hash;"undefined"!==
76typeof d&&(b.location.hash=0<d.indexOf(c)?d.replace(e.regex,c+a):d+"&"+c+a)};e.slideControls=function(a){var c=a?"slideDown":"slideUp",b=a?0:g.animationTime,d=a?g.animationTime:0,f=a?1:0,a=a?0:1;g.toggleControls&&e.$controls.stop(!0,!0).delay(b)[c](g.animationTime/2).delay(d);g.buildArrows&&g.toggleArrows&&(!e.hovered&&e.playing&&(a=1,f=0),e.$forward.stop(!0,!0).delay(b).animate({right:e.arrowRight+a*e.arrowWidth,opacity:f},g.animationTime/2),e.$back.stop(!0,!0).delay(b).animate({left:e.arrowLeft+
77a*e.arrowWidth,opacity:f},g.animationTime/2))};e.clearTimer=function(a){e.timer&&(b.clearInterval(e.timer),!a&&e.slideshow&&(e.$el.trigger("slideshow_stop",e),e.slideshow=!1))};e.startStop=function(a,d){!0!==a&&(a=!1);(e.playing=a)&&!d&&(e.$el.trigger("slideshow_start",e),e.slideshow=!0);g.buildStartStop&&(e.$startStop.toggleClass("playing",a).find("span").html(a?g.stopText:g.startText),"hidden"===e.$startStop.find("span").css("visibility")&&e.$startStop.addClass(g.tooltipClass).attr("title",a?g.stopText:
78g.startText));a?(e.clearTimer(!0),e.timer=b.setInterval(function(){c.hidden||c.webkitHidden||c.mozHidden||c.msHidden?g.autoPlayLocked||e.startStop():g.isVideoPlaying(e)?g.resumeOnVideoEnd||e.startStop():e.goForward(!0,g.playRtl)},g.delay)):e.clearTimer()};e.init()};a.anythingSlider.defaults={theme:"default",mode:"horiz",expand:!1,resizeContents:!0,showMultiple:!1,easing:"swing",buildArrows:!0,buildNavigation:!0,buildStartStop:!0,toggleArrows:!1,toggleControls:!1,startText:"Start",stopText:"Stop",
79forwardText:"&raquo;",backText:"&laquo;",tooltipClass:"tooltip",enableArrows:!0,enableNavigation:!0,enableStartStop:!0,enableKeyboard:!0,startPanel:1,changeBy:1,hashTags:!0,infiniteSlides:!0,navigationFormatter:null,navigationSize:!1,autoPlay:!1,autoPlayLocked:!1,autoPlayDelayed:!1,pauseOnHover:!0,stopAtEnd:!1,playRtl:!1,delay:3E3,resumeDelay:15E3,animationTime:600,delayBeforeAnimate:0,clickForwardArrow:"click",clickBackArrow:"click",clickControls:"click focusin",clickSlideshow:"click",allowRapidChange:!1,
80resumeOnVideoEnd:!0,resumeOnVisible:!0,isVideoPlaying:function(){return!1}};a.fn.anythingSlider=function(c,b){return this.each(function(){var e,g=a(this).data("AnythingSlider");(typeof c).match("object|undefined")?g?g.updateSlider():new a.anythingSlider(this,c):/\d/.test(c)&&!isNaN(c)&&g?(e="number"===typeof c?c:parseInt(a.trim(c),10),1<=e&&e<=g.pages&&g.gotoPage(e,!1,b)):/^[#|.]/.test(c)&&a(c).length&&g.gotoPage(c,!1,b)})}})(jQuery,window,document);
81!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):"undefined"!=typeof exports?module.exports=a(require("jquery")):a(jQuery)}(function(a){var b=window.Slick||{},b=function(){var c=0;return function(b,f){var e;this.defaults={accessibility:!0,adaptiveHeight:!1,appendArrows:a(b),appendDots:a(b),arrows:!0,asNavFor:null,prevArrow:'<button type="button" data-role="none" class="slick-prev" aria-label="Previous" tabindex="0" role="button">Previous</button>',nextArrow:'<button type="button" data-role="none" class="slick-next" aria-label="Next" tabindex="0" role="button">Next</button>',
82autoplay:!1,autoplaySpeed:3E3,centerMode:!1,centerPadding:"50px",cssEase:"ease",customPaging:function(c,b){return a('<button type="button" data-role="none" role="button" tabindex="0" />').text(b+1)},dots:!1,dotsClass:"slick-dots",draggable:!0,easing:"linear",edgeFriction:0.35,fade:!1,focusOnSelect:!1,infinite:!0,initialSlide:0,lazyLoad:"ondemand",mobileFirst:!1,pauseOnHover:!0,pauseOnFocus:!0,pauseOnDotsHover:!1,respondTo:"window",responsive:null,rows:1,rtl:!1,slide:"",slidesPerRow:1,slidesToShow:1,
83slidesToScroll:1,speed:500,swipe:!0,swipeToSlide:!1,touchMove:!0,touchThreshold:5,useCSS:!0,useTransform:!0,variableWidth:!1,vertical:!1,verticalSwiping:!1,waitForAnimate:!0,zIndex:1E3};this.initials={animating:!1,dragging:!1,autoPlayTimer:null,currentDirection:0,currentLeft:null,currentSlide:0,direction:1,$dots:null,listWidth:null,listHeight:null,loadIndex:0,$nextArrow:null,$prevArrow:null,slideCount:null,slideWidth:null,$slideTrack:null,$slides:null,
83sliding:!1,slideOffset:0,swipeLeft:null,$list:null,
84touchObject:{},transformsEnabled:!1,unslicked:!1};a.extend(this,this.initials);this.animProp=this.animType=this.activeBreakpoint=null;this.breakpoints=[];this.breakpointSettings=[];this.interrupted=this.focussed=this.cssTransitions=!1;this.hidden="hidden";this.paused=!0;this.respondTo=this.positionProp=null;this.rowCount=1;this.shouldClick=!0;this.$slider=a(b);this.transitionType=this.transformType=this.$slidesCache=null;this.visibilityChange="visibilitychange";this.windowWidth=0;this.windowTimer=
85null;e=a(b).data("slick")||{};this.options=a.extend({},this.defaults,f,e);this.currentSlide=this.options.initialSlide;this.originalSettings=this.options;"undefined"!=typeof document.mozHidden?(this.hidden="mozHidden",this.visibilityChange="mozvisibilitychange"):"undefined"!=typeof document.webkitHidden&&(this.hidden="webkitHidden",this.visibilityChange="webkitvisibilitychange");this.autoPlay=a.proxy(this.autoPlay,this);this.autoPlayClear=a.proxy(this.autoPlayClear,this);this.autoPlayIterator=a.proxy(this.autoPlayIterator,
86this);this.changeSlide=a.proxy(this.changeSlide,this);this.clickHandler=a.proxy(this.clickHandler,this);this.selectHandler=a.proxy(this.selectHandler,this);this.setPosition=a.proxy(this.setPosition,this);this.swipeHandler=a.proxy(this.swipeHandler,this);this.dragHandler=a.proxy(this.dragHandler,this);this.keyHandler=a.proxy(this.keyHandler,this);this.instanceUid=c++;this.htmlExpr=/^(?:\s*(<[\w\W]+>)[^>]*)$/;this.registerBreakpoints();this.init(!0)}}();b.prototype.activateADA=function(){this.$slideTrack.find(".slick-active").attr({"aria-hidden":"false"}).find("a, input, button, select").attr({tabindex:"0"})};
87b.prototype.addSlide=b.prototype.slickAdd=function(c,b,f){if("boolean"==typeof b)f=b,b=null;else if(0>b||b>=this.slideCount)return!1;this.unload();"number"==typeof b?0===b&&0===this.$slides.length?a(c).appendTo(this.$slideTrack):f?a(c).insertBefore(this.$slides.eq(b)):a(c).insertAfter(this.$slides.eq(b)):!0===f?a(c).prependTo(this.$slideTrack):a(c).appendTo(this.$slideTrack);this.$slides=this.$slideTrack.children(this.options.slide);this.$slideTrack.children(this.options.slide).detach();this.$slideTrack.append(this.$slides);
88this.$slides.each(function(c,b){a(b).attr("data-slick-index",c)});this.$slidesCache=this.$slides;this.reinit()};b.prototype.animateHeight=function(){1===this.options.slidesToShow&&(!0===this.options.adaptiveHeight&&!1===this.options.vertical)&&this.$list.animate({height:this.$slides.eq(this.currentSlide).outerHeight(!0)},this.options.speed)};b.prototype.animateSlide=function(c,b){var f={},e=this;e.animateHeight();!0===e.options.rtl&&!1===e.options.vertical&&(c=-c);!1===e.transformsEnabled?!1===e.options.vertical?
89e.$slideTrack.animate({left:c},e.options.speed,e.options.easing,b):e.$slideTrack.animate({top:c},e.options.speed,e.options.easing,b):!1===e.cssTransitions?(!0===e.options.rtl&&(e.currentLeft=-e.currentLeft),a({animStart:e.currentLeft}).animate({animStart:c},{duration:e.options.speed,easing:e.options.easing,step:function(a){a=Math.ceil(a);!1===e.options.vertical?(f[e.animType]="translate("+a+"px, 0px)",e.$slideTrack.css(f)):(f[e.animType]="translate(0px,"+a+"px)",e.$slideTrack.css(f))},complete:function(){b&&
90b.call()}})):(e.applyTransition(),c=Math.ceil(c),!1===e.options.vertical?f[e.animType]="translate3d("+c+"px, 0px, 0px)":f[e.animType]="translate3d(0px,"+c+"px, 0px)",e.$slideTrack.css(f),b&&setTimeout(function(){e.disableTransition();b.call()},e.options.speed))};b.prototype.getNavTarget=function(){var c=this.options.asNavFor;return c&&null!==c&&(c=a(c).not(this.$slider)),c};b.prototype.asNavFor=function(c){var b=this.getNavTarget();null!==b&&"object"==typeof b&&b.each(function(){var b=a(this).slick("getSlick");
91b.unslicked||b.slideHandler(c,!0)})};b.prototype.applyTransition=function(a){var b={};!1===this.options.fade?b[this.transitionType]=this.transformType+" "+this.options.speed+"ms "+this.options.cssEase:b[this.transitionType]="opacity "+this.options.speed+"ms "+this.options.cssEase;!1===this.options.fade?this.$slideTrack.css(b):this.$slides.eq(a).css(b)};b.prototype.autoPlay=function(){this.autoPlayClear();this.slideCount>this.options.slidesToShow&&(this.autoPlayTimer=setInterval(this.autoPlayIterator,
92this.options.autoplaySpeed))};b.prototype.autoPlayClear=function(){this.autoPlayTimer&&clearInterval(this.autoPlayTimer)};b.prototype.autoPlayIterator=function(){var a=this.currentSlide+this.options.slidesToScroll;this.paused||this.interrupted||this.focussed||(!1===this.options.infinite&&(1===this.direction&&this.currentSlide+1===this.slideCount-1?this.direction=0:0===this.direction&&(a=this.currentSlide-this.options.slidesToScroll,0===this.currentSlide-1&&(this.direction=1))),this.slideHandler(a))};
93b.prototype.buildArrows=function(){!0===this.options.arrows&&(this.$prevArrow=a(this.options.prevArrow).addClass("slick-arrow"),this.$nextArrow=a(this.options.nextArrow).addClass("slick-arrow"),this.slideCount>this.options.slidesToShow?(this.$prevArrow.removeClass("slick-hidden").removeAttr("aria-hidden tabindex"),this.$nextArrow.removeClass("slick-hidden").removeAttr("aria-hidden tabindex"),this.htmlExpr.test(this.options.prevArrow)&&this.$prevArrow.prependTo(this.options.appendArrows),this.htmlExpr.test(this.options.nextArrow)&&
94this.$nextArrow.appendTo(this.options.appendArrows),!0!==this.options.infinite&&this.$prevArrow.addClass("slick-disabled").attr("aria-disabled","true")):this.$prevArrow.add(this.$nextArrow).addClass("slick-hidden").attr({"aria-disabled":"true",tabindex:"-1"}))};b.prototype.buildDots=function(){var c,b;if(!0===this.options.dots&&this.slideCount>this.options.slidesToShow){this.$slider.addClass("slick-dotted");b=a("<ul />").addClass(this.options.dotsClass);for(c=0;c<=this.getDotCount();c+=1)b.append(a("<li />").append(this.options.customPaging.call(this,
95this,c)));this.$dots=b.appendTo(this.options.appendDots);this.$dots.find("li").first().addClass("slick-active").attr("aria-hidden","false")}};b.prototype.buildOut=function(){this.$slides=this.$slider.children(this.options.slide+":not(.slick-cloned)").addClass("slick-slide");this.slideCount=this.$slides.length;this.$slides.each(function(c,b){a(b).attr("data-slick-index",c).data("originalStyling",a(b).attr("style")||"")});this.$slider.addClass("slick-slider");this.$slideTrack=0===this.slideCount?a('<div class="slick-track"/>').appendTo(this.$slider):
96this.$slides.wrapAll('<div class="slick-track"/>').parent();this.$list=this.$slideTrack.wrap('<div aria-live="polite" class="slick-list"/>').parent();this.$slideTrack.css("opacity",0);(!0===this.options.centerMode||!0===this.options.swipeToSlide)&&(this.options.slidesToScroll=1);a("img[data-lazy]",this.$slider).not("[src]").addClass("slick-loading");this.setupInfinite();this.buildArrows();this.buildDots();this.updateDots();this.setSlideClasses("number"==typeof this.currentSlide?this.currentSlide:
970);!0===this.options.draggable&&this.$list.addClass("draggable")};b.prototype.buildRows=function(){var a,b,f,e,g,h,i;if(e=document.createDocumentFragment(),h=this.$slider.children(),1<this.options.rows){i=this.options.slidesPerRow*this.options.rows;g=Math.ceil(h.length/i);for(a=0;g>a;a++){var j=document.createElement("div");for(b=0;b<this.options.rows;b++){var k=document.createElement("div");for(f=0;f<this.options.slidesPerRow;f++){var l=a*i+(b*this.options.slidesPerRow+f);h.get(l)&&k.appendChild(h.get(l))}j.appendChild(k)}e.appendChild(j)}this.$slider.empty().append(e);
98this.$slider.children().children().children().css({width:100/this.options.slidesPerRow+"%",display:"inline-block"})}};b.prototype.checkResponsive=function(c,b){var f,e,g,h=!1;e=this.$slider.width();var i=window.innerWidth||a(window).width();if("window"===this.respondTo?g=i:"slider"===this.respondTo?g=e:"min"===this.respondTo&&(g=Math.min(i,e)),this.options.responsive&&this.options.responsive.length&&null!==this.options.responsive){e=null;for(f in this.breakpoints)this.breakpoints.hasOwnProperty(f)&&
99(!1===this.originalSettings.mobileFirst?g<this.breakpoints[f]&&(e=this.breakpoints[f]):g>this.breakpoints[f]&&(e=this.breakpoints[f]));null!==e?null!==this.activeBreakpoint?(e!==this.activeBreakpoint||b)&&(this.activeBreakpoint=e,"unslick"===this.breakpointSettings[e]?this.unslick(e):(this.options=a.extend({},this.originalSettings,this.breakpointSettings[e]),!0===c&&(this.currentSlide=this.options.initialSlide),this.refresh(c)),h=e):(this.activeBreakpoint=e,"unslick"===this.breakpointSettings[e]?
100this.unslick(e):(this.options=a.extend({},this.originalSettings,this.breakpointSettings[e]),!0===c&&(this.currentSlide=this.options.initialSlide),this.refresh(c)),h=e):null!==this.activeBreakpoint&&(this.activeBreakpoint=null,this.options=this.originalSettings,!0===c&&(this.currentSlide=this.options.initialSlide),this.refresh(c),h=e);c||!1===h||this.$slider.trigger("breakpoint",[this,h])}};b.prototype.changeSlide=function(c,b){var f,e,g=a(c.currentTarget);switch(g.is("a")&&c.preventDefault(),g.is("li")||
101(g=g.closest("li")),e=0!==this.slideCount%this.options.slidesToScroll,f=e?0:(this.slideCount-this.currentSlide)%this.options.slidesToScroll,c.data.message){case "previous":f=0===f?this.options.slidesToScroll:this.options.slidesToShow-f;this.slideCount>this.options.slidesToShow&&this.slideHandler(this.currentSlide-f,!1,b);break;case "next":f=0===f?this.options.slidesToScroll:f;this.slideCount>this.options.slidesToShow&&this.slideHandler(this.currentSlide+f,!1,b);break;case "index":this.slideHandler(this.checkNavigable(0===
102c.data.index?0:c.data.index||g.index()*this.options.slidesToScroll),!1,b),g.children().trigger("focus")}};b.prototype.checkNavigable=function(a){var b,f;if(b=this.getNavigableIndexes(),f=0,a>b[b.length-1])a=b[b.length-1];else for(var e in b){if(a<b[e]){a=f;break}f=b[e]}return a};b.prototype.cleanUpEvents=function(){this.options.dots&&null!==this.$dots&&a("li",this.$dots).off("click.slick",this.changeSlide).off("mouseenter.slick",a.proxy(this.interrupt,this,!0)).off("mouseleave.slick",a.proxy(this.interrupt,
103this,!1));this.$slider.off("focus.slick blur.slick");!0===this.options.arrows&&this.slideCount>this.options.slidesToShow&&(this.$prevArrow&&this.$prevArrow.off("click.slick",this.changeSlide),this.$nextArrow&&this.$nextArrow.off("click.slick",this.changeSlide));this.$list.off("touchstart.slick mousedown.slick",this.swipeHandler);this.$list.off("touchmove.slick mousemove.slick",this.swipeHandler);this.$list.off("touchend.slick mouseup.slick",this.swipeHandler);
103this.$list.off("touchcancel.slick mouseleave.slick",
104this.swipeHandler);this.$list.off("click.slick",this.clickHandler);a(document).off(this.visibilityChange,this.visibility);this.cleanUpSlideEvents();!0===this.options.accessibility&&this.$list.off("keydown.slick",this.keyHandler);!0===this.options.focusOnSelect&&a(this.$slideTrack).children().off("click.slick",this.selectHandler);a(window).off("orientationchange.slick.slick-"+this.instanceUid,this.orientationChange);a(window).off("resize.slick.slick-"+this.instanceUid,this.resize);a("[draggable!=true]",
105this.$slideTrack).off("dragstart",this.preventDefault);a(window).off("load.slick.slick-"+this.instanceUid,this.setPosition);a(document).off("ready.slick.slick-"+this.instanceUid,this.setPosition)};b.prototype.cleanUpSlideEvents=function(){this.$list.off("mouseenter.slick",a.proxy(this.interrupt,this,!0));this.$list.off("mouseleave.slick",a.proxy(this.interrupt,this,!1))};b.prototype.cleanUpRows=function(){var a;1<this.options.rows&&(a=this.$slides.children().children(),a.removeAttr("style"),this.$slider.empty().append(a))};
106b.prototype.clickHandler=function(a){!1===this.shouldClick&&(a.stopImmediatePropagation(),a.stopPropagation(),a.preventDefault())};b.prototype.destroy=function(c){this.autoPlayClear();this.touchObject={};this.cleanUpEvents();a(".slick-cloned",this.$slider).detach();this.$dots&&this.$dots.remove();this.$prevArrow&&this.$prevArrow.length&&(this.$prevArrow.removeClass("slick-disabled slick-arrow slick-hidden").removeAttr("aria-hidden aria-disabled tabindex").css("display",""),this.htmlExpr.test(this.options.prevArrow)&&
107this.$prevArrow.remove());this.$nextArrow&&this.$nextArrow.length&&(this.$nextArrow.removeClass("slick-disabled slick-arrow slick-hidden").removeAttr("aria-hidden aria-disabled tabindex").css("display",""),this.htmlExpr.test(this.options.nextArrow)&&this.$nextArrow.remove());this.$slides&&(this.$slides.removeClass("slick-slide slick-active slick-center slick-visible slick-current").removeAttr("aria-hidden").removeAttr("data-slick-index").each(function(){a(this).attr("style",a(this).data("originalStyling"))}),
108this.$slideTrack.children(this.options.slide).detach(),this.$slideTrack.detach(),this.$list.detach(),this.$slider.append(this.$slides));this.cleanUpRows();this.$slider.removeClass("slick-slider");this.$slider.removeClass("slick-initialized");this.$slider.removeClass("slick-dotted");this.unslicked=!0;c||this.$slider.trigger("destroy",[this])};b.prototype.disableTransition=function(a){var b={};b[this.transitionType]="";!1===this.options.fade?this.$slideTrack.css(b):this.$slides.eq(a).css(b)};b.prototype.fadeSlide=
109function(a,b){var f=this;!1===f.cssTransitions?(f.$slides.eq(a).css({zIndex:f.options.zIndex}),f.$slides.eq(a).animate({opacity:1},f.options.speed,f.options.easing,b)):(f.applyTransition(a),f.$slides.eq(a).css({opacity:1,zIndex:f.options.zIndex}),b&&setTimeout(function(){f.disableTransition(a);b.call()},f.options.speed))};b.prototype.fadeSlideOut=function(a){!1===this.cssTransitions?this.$slides.eq(a).animate({opacity:0,zIndex:this.options.zIndex-2},this.options.speed,this.options.easing):(this.applyTransition(a),
110this.$slides.eq(a).css({opacity:0,zIndex:this.options.zIndex-2}))};b.prototype.filterSlides=b.prototype.slickFilter=function(a){null!==a&&(this.$slidesCache=this.$slides,this.unload(),this.$slideTrack.children(this.options.slide).detach(),this.$slidesCache.filter(a).appendTo(this.$slideTrack),this.reinit())};b.prototype.focusHandler=function(){var c=this;c.$slider.off("focus.slick blur.slick").on("focus.slick blur.slick","*:not(.slick-arrow)",function(b){b.stopImmediatePropagation();var f=a(this);
111setTimeout(function(){c.options.pauseOnFocus&&(c.focussed=f.is(":focus"),c.autoPlay())},0)})};b.prototype.getCurrent=b.prototype.slickCurrentSlide=function(){return this.currentSlide};b.prototype.getDotCount=function(){var a=0,b=0,f=0;if(!0===this.options.infinite)for(;a<this.slideCount;)++f,a=b+this.options.slidesToScroll,b+=this.options.slidesToScroll<=this.options.slidesToShow?this.options.slidesToScroll:this.options.slidesToShow;else if(!0===this.options.centerMode)f=this.slideCount;else if(this.options.asNavFor)for(;a<
112this.slideCount;
112)++f,a=b+this.options.slidesToScroll,b+=this.options.slidesToScroll<=this.options.slidesToShow?this.options.slidesToScroll:this.options.slidesToShow;else f=1+Math.ceil((this.slideCount-this.options.slidesToShow)/this.options.slidesToScroll);return f-1};b.prototype.getLeft=function(a){var b,f,e,g=0;return this.slideOffset=0,f=this.$slides.first().outerHeight(!0),!0===this.options.infinite?(this.slideCount>this.options.slidesToShow&&(this.slideOffset=-1*this.slideWidth*this.options.slidesToShow,
113g=-1*f*this.options.slidesToShow),0!==this.slideCount%this.options.slidesToScroll&&a+this.options.slidesToScroll>this.slideCount&&this.slideCount>this.options.slidesToShow&&(a>this.slideCount?(this.slideOffset=-1*(this.options.slidesToShow-(a-this.slideCount))*this.slideWidth,g=-1*(this.options.slidesToShow-(a-this.slideCount))*f):(this.slideOffset=-1*this.slideCount%this.options.slidesToScroll*this.slideWidth,g=-1*this.slideCount%this.options.slidesToScroll*f))):a+this.options.slidesToShow>this.slideCount&&
114(this.slideOffset=(a+this.options.slidesToShow-this.slideCount)*this.slideWidth,g=(a+this.options.slidesToShow-this.slideCount)*f),this.slideCount<=this.options.slidesToShow&&(this.slideOffset=0,g=0),!0===this.options.centerMode&&!0===this.options.infinite?this.slideOffset+=this.slideWidth*Math.floor(this.options.slidesToShow/2)-this.slideWidth:!0===this.options.centerMode&&(this.slideOffset=0,this.slideOffset+=this.slideWidth*Math.floor(this.options.slidesToShow/2)),b=!1===this.options.vertical?
115-1*a*this.slideWidth+this.slideOffset:-1*a*f+g,!0===this.options.variableWidth&&(e=this.slideCount<=this.options.slidesToShow||!1===this.options.infinite?this.$slideTrack.children(".slick-slide").eq(a):this.$slideTrack.children(".slick-slide").eq(a+this.options.slidesToShow),b=!0===this.options.rtl?e[0]?-1*(this.$slideTrack.width()-e[0].offsetLeft-e.width()):0:e[0]?-1*e[0].offsetLeft:0,!0===this.options.centerMode&&(e=this.slideCount<=this.options.slidesToShow||!1===this.options.infinite?this.$slideTrack.children(".slick-slide").eq(a):
116this.$slideTrack.children(".slick-slide").eq(a+this.options.slidesToShow+1),b=!0===this.options.rtl?e[0]?-1*(this.$slideTrack.width()-e[0].offsetLeft-e.width()):0:e[0]?-1*e[0].offsetLeft:0,b+=(this.$list.width()-e.outerWidth())/2)),b};b.prototype.getOption=b.prototype.slickGetOption=function(a){return this.options[a]};b.prototype.getNavigableIndexes=function(){var a,b=0,f=0,e=[];for(!1===this.options.infinite?a=this.slideCount:(b=-1*this.options.slidesToScroll,f=-1*this.options.slidesToScroll,a=2*
117this.slideCount);a>b;)e.push(b),b=f+this.options.slidesToScroll,f+=this.options.slidesToScroll<=this.options.slidesToShow?this.options.slidesToScroll:this.options.slidesToShow;return e};b.prototype.getSlick=function(){return this};b.prototype.getSlideCount=function(){var b,d,f=this;return d=!0===f.options.centerMode?f.slideWidth*Math.floor(f.options.slidesToShow/2):0,!0===f.options.swipeToSlide?(f.$slideTrack.find(".slick-slide").each(function(e,g){return g.offsetLeft-d+a(g).outerWidth()/2>-1*f.swipeLeft?
118(b=g,!1):void 0}),Math.abs(a(b).attr("data-slick-index")-f.currentSlide)||1):f.options.slidesToScroll};b.prototype.goTo=b.prototype.slickGoTo=function(a,b){this.changeSlide({data:{message:"index",index:parseInt(a)}},b)};b.prototype.init=function(b){a(this.$slider).hasClass("slick-initialized")||(a(this.$slider).addClass("slick-initialized"),this.buildRows(),this.buildOut(),this.setProps(),this.startLoad(),this.loadSlider(),this.initializeEvents(),this.updateArrows(),this.updateDots(),this.checkResponsive(!0),
119this.focusHandler());b&&this.$slider.trigger("init",[this]);!0===this.options.accessibility&&this.initADA();this.options.autoplay&&(this.paused=!1,this.autoPlay())};b.prototype.initADA=function(){var b=this;b.$slides.add(b.$slideTrack.find(".slick-cloned")).attr({"aria-hidden":"true",tabindex:"-1"}).find("a, input, button, select").attr({tabindex:"-1"});b.$slideTrack.attr("role","listbox");b.$slides.not(b.$slideTrack.find(".slick-cloned")).each(function(d){a(this).attr({role:"option","aria-describedby":"slick-slide"+
120b.instanceUid+d})});null!==b.$dots&&b.$dots.attr("role","tablist").find("li").each(function(d){a(this).attr({role:"presentation","aria-selected":"false","aria-controls":"navigation"+b.instanceUid+d,id:"slick-slide"+b.instanceUid+d})}).first().attr("aria-selected","true").end().find("button").attr("role","button").end().closest("div").attr("role","toolbar");b.activateADA()};b.prototype.initArrowEvents=function(){!0===this.options.arrows&&this.slideCount>this.options.slidesToShow&&(this.$prevArrow.off("click.slick").on("click.slick",
121{message:"previous"},this.changeSlide),this.$nextArrow.off("click.slick").on("click.slick",{message:"next"},this.changeSlide))};b.prototype.initDotEvents=function(){!0===this.options.dots&&this.slideCount>this.options.slidesToShow&&a("li",this.$dots).on("click.slick",{message:"index"},this.changeSlide);!0===this.options.dots&&!0===this.options.pauseOnDotsHover&&a("li",this.$dots).on("mouseenter.slick",a.proxy(this.interrupt,this,
121!0)).on("mouseleave.slick",a.proxy(this.interrupt,this,!1))};b.prototype.initSlideEvents=
122function(){this.options.pauseOnHover&&(this.$list.on("mouseenter.slick",a.proxy(this.interrupt,this,!0)),this.$list.on("mouseleave.slick",a.proxy(this.interrupt,this,!1)))};b.prototype.initializeEvents=function(){this.initArrowEvents();this.initDotEvents();this.initSlideEvents();this.$list.on("touchstart.slick mousedown.slick",{action:"start"},this.swipeHandler);this.$list.on("touchmove.slick mousemove.slick",{action:"move"},this.swipeHandler);this.$list.on("touchend.slick mouseup.slick",{action:"end"},
123this.swipeHandler);this.$list.on("touchcancel.slick mouseleave.slick",{action:"end"},this.swipeHandler);this.$list.on("click.slick",this.clickHandler);a(document).on(this.visibilityChange,a.proxy(this.visibility,this));!0===this.options.accessibility&&this.$list.on("keydown.slick",this.keyHandler);!0===this.options.focusOnSelect&&a(this.$slideTrack).children().on("click.slick",this.selectHandler);a(window).on("orientationchange.slick.slick-"+this.instanceUid,a.proxy(this.orientationChange,this));
124a(window).on("resize.slick.slick-"+this.instanceUid,a.proxy(this.resize,this));a("[draggable!=true]",this.$slideTrack).on("dragstart",this.preventDefault);a(window).on("load.slick.slick-"+this.instanceUid,this.setPosition);a(document).on("ready.slick.slick-"+this.instanceUid,this.setPosition)};b.prototype.initUI=function(){!0===this.options.arrows&&this.slideCount>this.options.slidesToShow&&(this.$prevArrow.show(),this.$nextArrow.show());!0===this.options.dots&&this.slideCount>this.options.slidesToShow&&
125this.$dots.show()};b.prototype.keyHandler=function(a){a.target.tagName.match("TEXTAREA|INPUT|SELECT")||(37===a.keyCode&&!0===this.options.accessibility?this.changeSlide({data:{message:!0===this.options.rtl?"next":"previous"}}):39===a.keyCode&&!0===this.options.accessibility&&this.changeSlide({data:{message:!0===this.options.rtl?"previous":"next"}}))};b.prototype.lazyLoad=function(){function b(c){a("img[data-lazy]",c).each(function(){var b=a(this),c=a(this).attr("data-lazy"),e=document.createElement("img");
126e.onload=function(){b.animate({opacity:0}
126,100,function(){b.attr("src",c).animate({opacity:1},200,function(){b.removeAttr("data-lazy").removeClass("slick-loading")});g.$slider.trigger("lazyLoaded",[g,b,c])})};e.onerror=function(){b.removeAttr("data-lazy").removeClass("slick-loading").addClass("slick-lazyload-error");g.$slider.trigger("lazyLoadError",[g,b,c])};e.src=c})}var d,f,e,g=this;!0===g.options.centerMode?!0===g.options.infinite?(d=g.currentSlide+(g.options.slidesToShow/2+1),e=d+g.options.slidesToShow+
1272):(d=Math.max(0,g.currentSlide-(g.options.slidesToShow/2+1)),e=2+(g.options.slidesToShow/2+1)+g.currentSlide):(d=g.options.infinite?g.options.slidesToShow+g.currentSlide:g.currentSlide,e=Math.ceil(d+g.options.slidesToShow),!0===g.options.fade&&(0<d&&d--,e<=g.slideCount&&e++));d=g.$slider.find(".slick-slide").slice(d,e);b(d);g.slideCount<=g.options.slidesToShow?(f=g.$slider.find(".slick-slide"),b(f)):g.currentSlide>=g.slideCount-g.options.slidesToShow?(f=g.$slider.find(".slick-cloned").slice(0,g.options.slidesToShow),
128b(f)):0===g.currentSlide&&(f=g.$slider.find(".slick-cloned").slice(-1*g.options.slidesToShow),b(f))};b.prototype.loadSlider=function(){this.setPosition();this.$slideTrack.css({opacity:1});this.$slider.removeClass("slick-loading");this.initUI();"progressive"===this.options.lazyLoad&&this.progressiveLazyLoad()};b.prototype.next=b.prototype.slickNext=function(){this.changeSlide({data:{message:"next"}})};b.prototype.orientationChange=function(){this.checkResponsive();this.setPosition()};b.prototype.pause=
129b.prototype.slickPause=function(){this.autoPlayClear();this.paused=!0};b.prototype.play=b.prototype.slickPlay=function(){this.autoPlay();this.options.autoplay=!0;this.interrupted=this.focussed=this.paused=!1};b.prototype.postSlide=function(a){this.unslicked||(this.$slider.trigger("afterChange",[this,a]),this.animating=!1,this.setPosition(),this.swipeLeft=null,this.options.autoplay&&this.autoPlay(),!0===this.options.accessibility&&this.initADA())};b.prototype.prev=b.prototype.slickPrev=function(){this.changeSlide({data:{message:"previous"}})};
130b.prototype.preventDefault=function(a){a.preventDefault()};b.prototype.progressiveLazyLoad=function(b){var b=b||1,d,f,e,g=this,h=a("img[data-lazy]",g.$slider);h.length?(d=h.first(),f=d.attr("data-lazy"),e=document.createElement("img"),e.onload=function(){d.attr("src",f).removeAttr("data-lazy").removeClass("slick-loading");!0===g.options.adaptiveHeight&&g.setPosition();g.$slider.trigger("lazyLoaded",[g,d,f]);g.progressiveLazyLoad()},e.onerror=function(){3>b?setTimeout(function(){g.progressiveLazyLoad(b+
1311)},500):(d.removeAttr("data-lazy").removeClass("slick-loading").addClass("slick-lazyload-error"),g.$slider.trigger("lazyLoadError",[g,d,f]),g.progressiveLazyLoad())},e.src=f):g.$slider.trigger("allImagesLoaded",[g])};b.prototype.refresh=function(b){var d;d=this.slideCount-this.options.slidesToShow;!this.options.infinite&&this.currentSlide>d&&(this.currentSlide=d);this.slideCount<=this.options.slidesToShow&&(this.currentSlide=0);d=this.currentSlide;this.destroy(!0);a.extend(this,this.initials,{currentSlide:d});
132this.init();b||this.changeSlide({data:{message:"index",index:d}},!1)};b.prototype.registerBreakpoints=function(){var b,d,f,e=this,g=e.options.responsive||null;if("array"===a.type(g)&&g.length){e.respondTo=e.options.respondTo||"window";for(b in g)if(f=e.breakpoints.length-1,d=g[b].breakpoint,g.hasOwnProperty(b)){for(;0<=f;)e.breakpoints[f]&&e.breakpoints[f]===d&&e.breakpoints.splice(f,1),f--;e.breakpoints.push(d);e.breakpointSettings[d]=g[b].settings}e.breakpoints.sort(function(a,b){return e.options.mobileFirst?
133a-b:b-a})}};b.prototype.reinit=function(){this.$slides=this.$slideTrack.children(this.options.slide).addClass("slick-slide");this.slideCount=this.$slides.length;this.currentSlide>=this.slideCount&&0!==this.currentSlide&&(this.currentSlide-=this.options.slidesToScroll);this.slideCount<=this.options.slidesToShow&&(this.currentSlide=0);this.registerBreakpoints();this.setProps();this.setupInfinite();this.buildArrows();this.updateArrows();this.initArrowEvents();this.buildDots();this.updateDots();this.initDotEvents();
134this.cleanUpSlideEvents();this.initSlideEvents();this.checkResponsive(!1,!0);!0===this.options.focusOnSelect&&a(this.$slideTrack).children().on("click.slick",this.selectHandler);this.setSlideClasses("number"==typeof this.currentSlide?this.currentSlide:0);this.setPosition();this.focusHandler();this.paused=!this.options.autoplay;this.autoPlay();this.$slider.trigger("reInit",[this])};b.prototype.resize=function(){var b=this;a(window).width()!==b.windowWidth&&(clearTimeout(b.windowDelay),b.windowDelay=
135window.setTimeout(function(){b.windowWidth=a(window).width();b.checkResponsive();b.unslicked||b.setPosition()},50))};b.prototype.removeSlide=b.prototype.slickRemove=function(a,b,f){return"boolean"==typeof a?(b=a,a=!0===b?0:this.slideCount-1):a=!0===b?--a:a,1>this.slideCount||0>a||a>this.slideCount-1?!1:(this.unload(),!0===f?this.$slideTrack.children().remove():this.$slideTrack.children(this.options.slide).eq(a).remove(),this.$slides=this.$slideTrack.children(this.options.slide),this.$slideTrack.children(this.options.slide).detach(),
136this.$slideTrack.append(this.$slides),this.$slidesCache=this.$slides,void this.reinit())};b.prototype.setCSS=function(a){var b,f,e={};!0===this.options.rtl&&(a=-a);b="left"==this.positionProp?Math.ceil(a)+"px":"0px";f="top"==this.positionProp?Math.ceil(a)+"px":"0px";e[this.positionProp]=a;!1===this.transformsEnabled?this.$slideTrack.css(e):(e={},!1===this.cssTransitions?(e[this.animType]="translate("+b+", "+f+")",this.$slideTrack.css(e)):(e[this.animType]="translate3d("+b+", "+f+", 0px)",this.$slideTrack.css(e)))};
137b.prototype.setDimensions=function(){!1===this.options.vertical?!0===this.options.centerMode&&this.$list.css({padding:"0px "+this.options.centerPadding}):(this.$list.height(this.$slides.first().outerHeight(!0)*this.options.slidesToShow),!0===this.options.centerMode&&this.$list.css({padding:this.options.centerPadding+" 0px"}));this.listWidth=this.$list.width();this.listHeight=this.$list.height();!1===this.options.vertical&&!1===this.options.variableWidth?(this.slideWidth=Math.ceil(this.listWidth/this.options.slidesToShow),
138this.$slideTrack.width(Math.ceil(this.slideWidth*this.$slideTrack.children(".slick-slide").length))):!0===this.options.variableWidth?this.$slideTrack.width(5E3*this.slideCount):(this.slideWidth=Math.ceil(this.listWidth),this.$slideTrack.height(Math.ceil(this.$slides.first().outerHeight(!0)*this.$slideTrack.children(".slick-slide").length)));var a=this.$slides.first().outerWidth(!0)-this.$slides.first().width();!1===this.options.variableWidth&&this.$slideTrack.children(".slick-slide").width(this.slideWidth-
139a)};b.prototype.setFade=function(){var b,d=this;d.$slides.each(function(f,e){b=-1*d.slideWidth*f;!0===d.options.rtl?a(e).css({position:"relative",right:b,top:0,zIndex:d.options.zIndex-2,opacity:0}
139):a(e).css({position:"relative",left:b,top:0,zIndex:d.options.zIndex-2,opacity:0})});d.$slides.eq(d.currentSlide).css({zIndex:d.options.zIndex-1,opacity:1})};b.prototype.setHeight=function(){1===this.options.slidesToShow&&(!0===this.options.adaptiveHeight&&!1===this.options.vertical)&&this.$list.css("height",
140this.$slides.eq(this.currentSlide).outerHeight(!0))};b.prototype.setOption=b.prototype.slickSetOption=function(b,d,f){var e,g,h,i,j=this,k=!1;if("object"===a.type(b)?(g=b,k=d,i="multiple"):"string"===a.type(b)&&(g=b,h=d,k=f,"responsive"===b&&"array"===a.type(d)?i="responsive":"undefined"!=typeof d&&(i="single")),"single"===i)j.options[g]=h;else if("multiple"===i)a.each(g,function(a,b){j.options[a]=b});else if("responsive"===i)for(e in h)if("array"!==a.type(j.options.responsive))j.options.responsive=
141[h[e]];else{for(b=j.options.responsive.length-1;0<=b;)j.options.responsive[b].breakpoint===h[e].breakpoint&&j.options.responsive.splice(b,1),b--;j.options.responsive.push(h[e])}k&&(j.unload(),j.reinit())};b.prototype.setPosition=function(){this.setDimensions();this.setHeight();!1===this.options.fade?this.setCSS(this.getLeft(this.currentSlide)):this.setFade();this.$slider.trigger("setPosition",[this])};b.prototype.setProps=function(){var a=document.body.style;this.positionProp=!0===this.options.vertical?
142"top":"left";"top"===this.positionProp?this.$slider.addClass("slick-vertical"):this.$slider.removeClass("slick-vertical");(void 0!==a.WebkitTransition||void 0!==a.MozTransition||void 0!==a.msTransition)&&!0===this.options.useCSS&&(this.cssTransitions=!0);this.options.fade&&("number"==typeof this.options.zIndex?3>this.options.zIndex&&(this.options.zIndex=3):this.options.zIndex=this.defaults.zIndex);void 0!==a.OTransform&&(this.animType="OTransform",this.transformType="-o-transform",this.transitionType=
143"OTransition",void 0===a.perspectiveProperty&&void 0===a.webkitPerspective&&(this.animType=!1));void 0!==a.MozTransform&&(this.animType="MozTransform",this.transformType="-moz-transform",this.transitionType="MozTransition",void 0===a.perspectiveProperty&&void 0===a.MozPerspective&&(this.animType=!1));void 0!==a.webkitTransform&&(this.animType="webkitTransform",this.transformType="-webkit-transform",this.transitionType="webkitTransition",void 0===a.perspectiveProperty&&void 0===a.webkitPerspective&&
144(this.animType=!1));void 0!==a.msTransform&&(this.animType="msTransform",this.transformType="-ms-transform",this.transitionType="msTransition",void 0===a.msTransform&&(this.animType=!1));void 0!==a.transform&&!1!==this.animType&&(this.animType="transform",this.transformType="transform",this.transitionType="transition");this.transformsEnabled=this.options.useTransform&&null!==this.animType&&!1!==this.animType};b.prototype.setSlideClasses=function(a){var b,f,e,g;f=this.$slider.find(".slick-slide").removeClass("slick-active slick-center slick-current").attr("aria-hidden",
145"true");this.$slides.eq(a).addClass("slick-current");!0===this.options.centerMode?(b=Math.floor(this.options.slidesToShow/2),!0===this.options.infinite&&(a>=b&&a<=this.slideCount-1-b?this.$slides.slice(a-b,a+b+1).addClass("slick-active").attr("aria-hidden","false"):(e=this.options.slidesToShow+a,f.slice(e-b+1,e+b+2).addClass("slick-active").attr("aria-hidden","false")),0===a?f.eq(f.length-1-this.options.slidesToShow).addClass("slick-center"):a===this.slideCount-1&&f.eq(this.options.slidesToShow).addClass("slick-center")),
146this.$slides.eq(a).addClass("slick-center")):0<=a&&a<=this.slideCount-this.options.slidesToShow?this.$slides.slice(a,a+this.options.slidesToShow).addClass("slick-active").attr("aria-hidden","false"):f.length<=this.options.slidesToShow?f.addClass("slick-active").attr("aria-hidden","false"):(g=this.slideCount%this.options.slidesToShow,e=!0===this.options.infinite?this.options.slidesToShow+a:a,this.options.slidesToShow==this.options.slidesToScroll&&this.slideCount-a<this.options.slidesToShow?f.slice(e-
147(this.options.slidesToShow-g),e+g).addClass("slick-active").attr("aria-hidden","false"):f.slice(e,e+this.options.slidesToShow).addClass("slick-active").attr("aria-hidden","false"));"ondemand"===this.options.lazyLoad&&this.lazyLoad()};b.prototype.setupInfinite=function(){var b,d,f;if(!0===this.options.fade&&(this.options.centerMode=!1),!0===this.options.infinite&&!1===this.options.fade&&(d=null,this.slideCount>this.options.slidesToShow)){f=!0===this.options.centerMode?this.options.slidesToShow+1:this.options.slidesToShow;
148for(b=this.slideCount;b>this.slideCount-f;b-=1)d=b-1,a(this.$slides[d]).clone(!0).attr("id","").attr("data-slick-index",d-this.slideCount).prependTo(this.$slideTrack).addClass("slick-cloned");for(b=0;f>b;b+=1)d=b,a(this.$slides[d]).clone(!0).attr("id","").attr("data-slick-index",d+this.slideCount).appendTo(this.$slideTrack).addClass("slick-cloned");this.$slideTrack.find(".slick-cloned").find("[id]").each(function(){a(this).attr("id","")})}};b.prototype.interrupt=function(a){a||this.autoPlay();this.interrupted=
149a};b.prototype.selectHandler=function(b){b=a(b.target).is(".slick-slide")?a(b.target):a(b.target).parents(".slick-slide");b=parseInt(b.attr("data-slick-index"));return b||(b=0),this.slideCount<=this.options.slidesToShow?(this.setSlideClasses(b),void this.asNavFor(b)):void this.slideHandler(b)};b.prototype.slideHandler=function(a,b,f){var e,g,h,i,j,k=null,l=this;return b=b||!1,!0===l.animating&&!0===l.options.waitForAnimate||!0===l.options.fade&&l.currentSlide===a||l.slideCount<=l.options.slidesToShow?
150void 0:(!1===b&&l.asNavFor(a),e=a,k=l.getLeft(e),i=l.getLeft(l.currentSlide),l.currentLeft=null===l.swipeLeft?i:l.swipeLeft,!1===l.options.infinite&&!1===l.options.centerMode&&(0>a||a>l.getDotCount()*l.options.slidesToScroll)?void(!1===l.options.fade&&(e=l.currentSlide,!0!==f?l.animateSlide(i,function(){l.postSlide(e)}):l.postSlide(e))):!1===l.options.infinite&&!0===l.options.centerMode&&(0>a||a>l.slideCount-l.options.slidesToScroll)?void(!1===l.options.fade&&(e=l.currentSlide,!0!==f?l.animateSlide(i,
151function(){l.postSlide(e)}):l.postSlide(e))):(l.options.autoplay&&clearInterval(l.autoPlayTimer),g=0>e?0!==l.slideCount%l.options.slidesToScroll?l.slideCount-l.slideCount%l.options.slidesToScroll:l.slideCount+e:e>=l.slideCount?0!==l.slideCount%l.options.slidesToScroll?0:e-l.slideCount:e,l.animating=!0,l.$slider.trigger("beforeChange",[l,l.currentSlide,g]),h=l.currentSlide,l.currentSlide=g,l.setSlideClasses(l.currentSlide),l.options.asNavFor&&(j=l.getNavTarget(),j=j.slick("getSlick"),j.slideCount<=
152j.options.slidesToShow&&j.setSlideClasses(l.currentSlide)),l.updateDots(),l.updateArrows(),!0===l.options.fade?(!0!==f?(l.fadeSlideOut(h),l.fadeSlide(g,function(){l.postSlide(g)})):l.postSlide(g),void l.animateHeight()):void(!0!==f?l.animateSlide(k,function(){l.postSlide(g)}):l.postSlide(g))))};b.prototype.startLoad=function(){!0===this.options.arrows&&this.slideCount>this.options.slidesToShow&&(this.$prevArrow.hide(),this.$nextArrow.hide());!0===this.options.dots&&this.slideCount>this.options.slidesToShow&&
153this.$dots.hide();this.$slider.addClass("slick-loading")};b.prototype.swipeDirection=function(){var a,b,f,e;return a=this.touchObject.startX-this.touchObject.curX,b=this.touchObject.startY-this.touchObject.curY,f=Math.atan2(b,a),e=Math.round(180*f/Math.PI),0>e&&(e=360-Math.abs(e)),45>=e&&0<=e?!1===this.options.rtl?"left":"right":360>=e&&315<=e?!1===this.options.rtl?"left":"right":135<=e&&225>=e?!1===this.options.rtl?"right":"left":!0===this.options.verticalSwiping?35<=e&&135>=e?"down":"up":"vertical"};
154b.prototype.swipeEnd=function(){var a,b;if(this.dragging=!1,this.interrupted=!1,this.shouldClick=10<this.touchObject.swipeLength?!1:!0,void 0===this.touchObject.curX)return!1;if(!0===this.touchObject.edgeHit&&this.$slider.trigger("edge",[this,this.swipeDirection()]),this.touchObject.swipeLength>=this.touchObject.minSwipe){switch(b=this.swipeDirection()){case "left"
154:case "down":a=this.options.swipeToSlide?this.checkNavigable(this.currentSlide+this.getSlideCount()):this.currentSlide+this.getSlideCount();
155this.currentDirection=0;break;case "right":case "up":a=this.options.swipeToSlide?this.checkNavigable(this.currentSlide-this.getSlideCount()):this.currentSlide-this.getSlideCount(),this.currentDirection=1}"vertical"!=b&&(this.slideHandler(a),this.touchObject={},this.$slider.trigger("swipe",[this,b]))}else this.touchObject.startX!==this.touchObject.curX&&(this.slideHandler(this.currentSlide),this.touchObject={})};b.prototype.swipeHandler=function(a){if(!(!1===this.options.swipe||"ontouchend"in document&&
156!1===this.options.swipe||!1===this.options.draggable&&-1!==a.type.indexOf("mouse")))switch(this.touchObject.fingerCount=a.originalEvent&&void 0!==a.originalEvent.touches?a.originalEvent.touches.length:1,this.touchObject.minSwipe=this.listWidth/this.options.touchThreshold,!0===this.options.verticalSwiping&&(this.touchObject.minSwipe=this.listHeight/this.options.touchThreshold),a.data.action){case "start":this.swipeStart(a);break;case "move":this.swipeMove(a);break;case "end":this.swipeEnd(a)}};b.prototype.swipeMove=
157function(a){var b,f,e,g,h;return h=void 0!==a.originalEvent?a.originalEvent.touches:null,!this.dragging||h&&1!==h.length?!1:(b=this.getLeft(this.currentSlide),this.touchObject.curX=void 0!==h?h[0].pageX:a.clientX,this.touchObject.curY=void 0!==h?h[0].pageY:a.clientY,this.touchObject.swipeLength=Math.round(Math.sqrt(Math.pow(this.touchObject.curX-this.touchObject.startX,2))),!0===this.options.verticalSwiping&&(this.touchObject.swipeLength=Math.round(Math.sqrt(Math.pow(this.touchObject.curY-this.touchObject.startY,
1582)))),f=this.swipeDirection(),"vertical"!==f?(void 0!==a.originalEvent&&4<this.touchObject.swipeLength&&a.preventDefault(),g=(!1===this.options.rtl?1:-1)*(this.touchObject.curX>this.touchObject.startX?1:-1),!0===this.options.verticalSwiping&&(g=this.touchObject.curY>this.touchObject.startY?1:-1),e=this.touchObject.swipeLength,this.touchObject.edgeHit=!1,!1===this.options.infinite&&(0===this.currentSlide&&"right"===f||this.currentSlide>=this.getDotCount()&&"left"===f)&&(e=this.touchObject.swipeLength*
159this.options.edgeFriction,this.touchObject.edgeHit=!0),!1===this.options.vertical?this.swipeLeft=b+e*g:this.swipeLeft=b+e*(this.$list.height()/this.listWidth)*g,!0===this.options.verticalSwiping&&(this.swipeLeft=b+e*g),!0===this.options.fade||!1===this.options.touchMove?!1:!0===this.animating?(this.swipeLeft=null,!1):void this.setCSS(this.swipeLeft)):void 0)};b.prototype.swipeStart=function(a){var b;return this.interrupted=!0,1!==this.touchObject.fingerCount||this.slideCount<=this.options.slidesToShow?
160(this.touchObject={},!1):(void 0!==a.originalEvent&&void 0!==a.originalEvent.touches&&(b=a.originalEvent.touches[0]),this.touchObject.startX=this.touchObject.curX=void 0!==b?b.pageX:a.clientX,this.touchObject.startY=this.touchObject.curY=void 0!==b?b.pageY:a.clientY,void(this.dragging=!0))};b.prototype.unfilterSlides=b.prototype.slickUnfilter=function(){null!==this.$slidesCache&&(this.unload(),this.$slideTrack.children(this.options.slide).detach(),this.$slidesCache.appendTo(this.$slideTrack),this.reinit())};
161b.prototype.unload=function(){a(".slick-cloned",this.$slider).remove();this.$dots&&this.$dots.remove();this.$prevArrow&&this.htmlExpr.test(this.options.prevArrow)&&this.$prevArrow.remove();this.$nextArrow&&this.htmlExpr.test(this.options.nextArrow)&&this.$nextArrow.remove();this.$slides.removeClass("slick-slide slick-active slick-visible slick-current").attr("aria-hidden","true").css("width","")};b.prototype.unslick=function(a){this.$slider.trigger("unslick",[this,a]);this.destroy()};b.prototype.updateArrows=
162function(){!0===this.options.arrows&&this.slideCount>this.options.slidesToShow&&!this.options.infinite&&(this.$prevArrow.removeClass("slick-disabled").attr("aria-disabled","false"),this.$nextArrow.removeClass("slick-disabled").attr("aria-disabled","false"),0===this.currentSlide?(this.$prevArrow.addClass("slick-disabled").attr("aria-disabled","true"),this.$nextArrow.removeClass("slick-disabled").attr("aria-disabled","false")):this.currentSlide>=this.slideCount-this.options.slidesToShow&&!1===this.options.centerMode?
163(this.$nextArrow.addClass("slick-disabled").attr("aria-disabled","true"),this.$prevArrow.removeClass("slick-disabled").attr("aria-disabled","false")):this.currentSlide>=this.slideCount-1&&!0===this.options.centerMode&&(this.$nextArrow.addClass("slick-disabled").attr("aria-disabled","true"),this.$prevArrow.removeClass("slick-disabled").attr("aria-disabled","false")))};b.prototype.updateDots=function(){null!==this.$dots&&(this.$dots.find("li").removeClass("slick-active").attr("aria-hidden","true"),
164this.$dots.find("li").eq(Math.floor(this.currentSlide/this.options.slidesToScroll)).addClass("slick-active").attr("aria-hidden","false"))};b.prototype.visibility=function(){this.options.autoplay&&(document[this.hidden]?this.interrupted=!0:this.interrupted=!1)};a.fn.slick=function(){var a,d,f=arguments[0],e=Array.prototype.slice.call(arguments,1
164),g=this.length;for(a=0;g>a;a++)if("object"==typeof f||"undefined"==typeof f?this[a].slick=new b(this[a],f):d=this[a].slick[f].apply(this[a].slick,e),"undefined"!=
165typeof d)return d;return this}});
166!function(a){function b(){g=!0;h.$wndw=a(window);h.$html=a("html");h.$body=a("body");a.each([d,f,e],function(a,b){b.add=function(a){var a=a.split(" "),c;for(c in a)b[a[c]]=b.mm(a[c])}});d.mm=function(a){return"mm-"+a};d.add("wrapper menu inline panel nopanel list nolist subtitle selected label spacer current highest hidden opened subopened subopen fullsubopen subclose");d.umm=function(a){return"mm-"==a.slice(0,3)&&(a=a.slice(3)),a};f.mm=function(a){return"mm-"+a};f.add("parent");e.mm=function(a){return a+
167".mm"};e.add("toggle open close setSelected transitionend webkitTransitionEnd mousedown mouseup touchstart touchmove touchend scroll resize click keydown keyup");a[c]._c=d;a[c]._d=f;a[c]._e=e;a[c].glbl=h}var c="mmenu";if(!a[c]){var d={},f={},e={},g=!1,h={$wndw:null,$html:null,$body:null};a[c]=function(b,e,d){this.$menu=b;this.opts=e;this.conf=d;this.vars={};"function"==typeof this.___deprecated&&this.___deprecated();this._initMenu();this._initAnchors();this._initEvents();var b=this.$menu.children(this.conf.panelNodetype),
168f;for(f in a[c].addons)a[c].addons[f]._add.call(this),a[c].addons[f]._add=function(){},a[c].addons[f]._setup.call(this);return this._init(b),"function"==typeof this.___debug&&this.___debug(),this};a[c].version="4.7.5";a[c].addons={};a[c].uniqueId=0;a[c].defaults={classes:"",slidingSubmenus:!0,onClick:{setSelected:!0}};a[c].configuration={panelNodetype:"ul, ol, div",transitionDuration:400,openingInterval:25,classNames:{panel:"Panel",selected:"Selected",label:"Label",spacer:"Spacer"}};a[c].prototype=
169{_init:function(b){var b=b.not("."+d.nopanel),b=this._initPanels(b),e;for(e in a[c].addons)a[c].addons[e]._init.call(this,b);this._update()},_initMenu:function(){this.opts.offCanvas&&this.conf.clone&&(this.$menu=this.$menu.clone(!0),this.$menu.add(this.$menu.find("*")).filter("[id]").each(function(){a(this).attr("id",d.mm(a(this).attr("id")))}));this.$menu.contents().each(function(){3==a(this)[0].nodeType&&a(this).remove()});this.$menu.parent().addClass(d.wrapper);var b=[d.menu];b.push(d.mm(this.opts.slidingSubmenus?
170"horizontal":"vertical"));this.opts.classes&&b.push(this.opts.classes);this.$menu.addClass(b.join(" "))},_initPanels:function(b){var c=this;this.__findAddBack(b,"ul, ol").not("."+d.nolist).addClass(d.list);var g=this.__findAddBack(b,"."+d.list).find("> li");this.__refactorClass(g,this.conf.classNames.selected,"selected");this.__refactorClass(g,this.conf.classNames.label,"label");this.__refactorClass(g,this.conf.classNames.spacer,"spacer");g.off(e.setSelected).on(e.setSelected,function(b,c){b.stopPropagation();
171g.removeClass(d.selected);"boolean"!=typeof c&&(c=!0);c&&a(this).addClass(d.selected)});this.__refactorClass(this.__findAddBack(b,"."+this.conf.classNames.panel),this.conf.classNames.panel,"panel");b.add(this.__findAddBack(b,"."+d.list).children().children().filter(this.conf.panelNodetype).not("."+d.nopanel)).addClass(d.panel);var h=this.__findAddBack(b,"."+d.panel),n=a("."+d.panel,this.$menu);(h.each(function(){var b=a(this),e=b.attr("id")||c.__getUniqueId();b.attr("id",e)}),h.each(function(){var b=
172a(this),e=b.is("ul, ol")?b:b.find("ul ,ol").first(),g=b.parent(),h=g.children("a, span"),i=g.closest("."+d.panel);g.parent().is("."+d.list)&&!b.data(f.parent)&&(b.data(f.parent,g),b=a('<a class="'+d.subopen+'" href="#'+b.attr("id")+'" />').insertBefore(h),h.is("a")||b.addClass(d.fullsubopen),c.opts.slidingSubmenus&&e.prepend('<li class="'+d.subtitle+'"><a class="'+d.subclose+'" href="#'+i.attr("id")+'">'+h.text()+"</a></li>"))}),this.opts.slidingSubmenus)?(b=this.__findAddBack(b,"."+d.list).find("> li."+
173d.selected),b.parents("li").removeClass(d.selected).end().add(b.parents("li")).each(function(){var b=a(this),c=b.find("> ."+d.panel);c.length&&(b.parents("."+d.panel).addClass(d.subopened),c.addClass(d.opened))}).closest("."+d.panel).addClass(d.opened).parents("."+d.panel).addClass(d.subopened)):(b=a("li."+d.selected,n),b.parents("li").removeClass(d.selected).end().add(b.parents("li")).addClass(d.opened));n=n.filter("."+d.opened);
173return n.length||(n=h.first()),n.addClass(d.opened).last().addClass(d.current),
174this.opts.slidingSubmenus&&h.not(n.last()).addClass(d.hidden).end().appendTo(this.$menu),h},_initAnchors:function(){var b=this;h.$body.on(e.click,"a",function(f){var g=a(this),l=!1,n=b.$menu.find(g).length,p;for(p in a[c].addons)if(a[c].addons[p]._clickAnchor&&(l=a[c].addons[p]._clickAnchor.call(b,g,n)))break;if(!l&&n){var o=g.attr("href")||"";if("#"==o.slice(0,1))try{a(o,b.$menu).is("."+d.panel)&&(l=!0,a(o).trigger(b.opts.slidingSubmenus?e.open:e.toggle))}catch(q){}}if(l&&f.preventDefault(),!l&&
175n&&g.is("."+d.list+" > li > a")&&!g.is('[rel="external"]')&&!g.is('[target="_blank"]'))b.__valueOrFn(b.opts.onClick.setSelected,g)&&g.parent().trigger(e.setSelected),(l=b.__valueOrFn(b.opts.onClick.preventDefault,g,"#"==o.slice(0,1)))&&f.preventDefault(),b.__valueOrFn(b.opts.onClick.blockUI,g,!l)&&h.$html.addClass(d.blocking),b.__valueOrFn(b.opts.onClick.close,g,l)&&b.$menu.trigger(e.close)})},_initEvents:function(){var b=this;this.$menu.on(e.toggle+" "+e.open+" "+e.close,"."+d.panel,function(a){a.stopPropagation()});
176this.opts.slidingSubmenus?this.$menu.on(e.open,"."+d.panel,function(){return b._openSubmenuHorizontal(a(this))}):this.$menu.on(e.toggle,"."+d.panel,function(){var b=a(this);b.trigger(b.parent().hasClass(d.opened)?e.close:e.open)}).on(e.open,"."+d.panel,function(){a(this).parent().addClass(d.opened)}).on(e.close,"."+d.panel,function(){a(this).parent().removeClass(d.opened)})},_openSubmenuHorizontal:function(b){if(b.hasClass(d.current))return!1;var c=a("."+d.panel,this.$menu),e=c.filter("."+d.current);
177return c.removeClass(d.highest).removeClass(d.current).not(b).not(e).addClass(d.hidden),b.hasClass(d.opened)?e.addClass(d.highest).removeClass(d.opened).removeClass(d.subopened):(b.addClass(d.highest),e.addClass(d.subopened)),b.removeClass(d.hidden).addClass(d.current),setTimeout(function(){b.removeClass(d.subopened).addClass(d.opened)},this.conf.openingInterval),"open"},_update:function(a){if(this.updates||(this.updates=[]),"function"==typeof a)this.updates.push(a);else for(var b=0,c=this.updates.length;c>
178b;b++)this.updates[b].call(this,a)},__valueOrFn:function(a,b,c){return"function"==typeof a?a.call(b[0]):"undefined"==typeof a&&"undefined"!=typeof c?c:a},__refactorClass:function(a,b,c){return a.filter("."+b).removeClass(b).addClass(d[c])},__findAddBack:function(a,b){return a.find(b).add(a.filter(b))},__transitionend:function(a,b,c){var d=!1,f=function(){d||b.call(a[0]);d=!0};a.one(e.transitionend,f);a.one(e.webkitTransitionEnd,f);setTimeout(f,1.1*c)},__getUniqueId:function(){return d.mm(a[c].uniqueId++)}};
179a.fn[c]=function(e,d){return g||b(),e=a.extend(!0,{},a[c].defaults,e),d=a.extend(!0,{},a[c].configuration,d),this.each(function(){var b=a(this);b.data(c)||b.data(c,new a[c](b,e,d))})};a[c].support={touch:"ontouchstart"in window||navigator.msMaxTouchPoints}}}(jQuery);
180!function(a){a.mmenu.addons.offCanvas={_init:function(){},_setup:function(){if(this.opts.offCanvas){var c=this,g=this.opts.offCanvas,h=this.conf.offCanvas;"string"!=typeof h.pageSelector&&(h.pageSelector="> "+h.pageNodetype);f.$allMenus=(f.$allMenus||a()).add(this.$menu);this.vars.opened=!1;var i=[b.offcanvas];"left"!=g.position&&i.push(b.mm(g.position));"back"!=g.zposition&&i.push(b.mm(g.zposition));this.$menu.addClass(i.join(" ")).parent().removeClass(b.wrapper);this.setPage(f.$page);this.offCanvas_initBlocker();
181this.offCanvas_initWindow();this.$menu.on(d.open+" "+d.opening+" "+d.opened+" "+d.close+" "+d.closing+" "+d.closed+" "+d.setPage,function(a){a.stopPropagation()}).on(d.open+" "+d.close+" "+d.setPage,function(a){c[a.type]()});this.$menu[h.menuInjectMethod+"To"](h.menuWrapperSelector)}},_add:function(){b=a.mmenu._c;c=a.mmenu._d;d=a.mmenu._e;b.add("offcanvas slideout modal background opening blocker page");c.add("style");d.add("opening opened closing closed setPage");f=a.mmenu.glbl},_clickAnchor:function(a){if(!this.opts.offCanvas)return!1;
182var c=this.$menu.attr("id");if(c&&c.length&&(this.conf.clone&&(c=b.umm(c)),a.is('[href="#'+c+'"]')))return this.open(),!0;if(f.$page)return(c=f.$page.attr("id"))&&c.length&&a.is('[href="#'+c+'"]')?(this.close(),!0):!1}};a.mmenu.defaults.offCanvas={position:"left",zposition:"back",modal:!1,moveBackgroun
182d:!0};a.mmenu.configuration.offCanvas={pageNodetype:"div",pageSelector:null,menuWrapperSelector:"body",menuInjectMethod:"prepend"};a.mmenu.prototype.open=function(){if(this.vars.opened)return!1;var a=
183this;return this._openSetup(),setTimeout(function(){a._openFinish()},this.conf.openingInterval),"open"};a.mmenu.prototype._openSetup=function(){var a=this;f.$allMenus.not(this.$menu).trigger(d.close);f.$page.data(c.style,f.$page.attr("style")||"");f.$wndw.trigger(d.resize,[!0]);var g=[b.opened];this.opts.offCanvas.modal&&g.push(b.modal);this.opts.offCanvas.moveBackground&&g.push(b.background);"left"!=this.opts.offCanvas.position&&g.push(b.mm(this.opts.offCanvas.position));"back"!=this.opts.offCanvas.zposition&&
184g.push(b.mm(this.opts.offCanvas.zposition));this.opts.classes&&g.push(this.opts.classes);f.$html.addClass(g.join(" "));setTimeout(function(){a.vars.opened=!0},this.conf.openingInterval);this.$menu.addClass(b.current+" "+b.opened)};a.mmenu.prototype._openFinish=function(){var a=this;this.__transitionend(f.$page,function(){a.$menu.trigger(d.opened)},this.conf.transitionDuration);f.$html.addClass(b.opening);this.$menu.trigger(d.opening)};a.mmenu.prototype.close=function(){if(!this.vars.opened)return!1;
185var a=this;return this.__transitionend(f.$page,function(){a.$menu.removeClass(b.current).removeClass(b.opened);f.$html.removeClass(b.opened).removeClass(b.modal).removeClass(b.background).removeClass(b.mm(a.opts.offCanvas.position)).removeClass(b.mm(a.opts.offCanvas.zposition));a.opts.classes&&f.$html.removeClass(a.opts.classes);f.$page.attr("style",f.$page.data(c.style));a.vars.opened=!1;a.$menu.trigger(d.closed)},this.conf.transitionDuration),f.$html.removeClass(b.opening),this.$menu.trigger(d.closing),
186"close"};a.mmenu.prototype.setPage=function(c){c||(c=a(this.conf.offCanvas.pageSelector,f.$body),1<c.length&&(c=c.wrapAll("<"+this.conf.offCanvas.pageNodetype+" />").parent()));c.addClass(b.page+" "+b.slideout);f.$page=c};a.mmenu.prototype.offCanvas_initWindow=function(){f.$wndw.on(d.keydown,function(a){return f.$html.hasClass(b.opened)&&9==a.keyCode?(a.preventDefault(),!1):void 0});var c=0;f.$wndw.on(d.resize,function(a,d){if(d||f.$html.hasClass(b.opened)){var i=f.$wndw.height();(d||i!=c)&&(c=i,
187f.$page.css("minHeight",i))}});a.mmenu.prototype.offCanvas_initWindow=function(){}};a.mmenu.prototype.offCanvas_initBlocker=function(){var c=a('<div id="'+b.blocker+'" class="'+b.slideout+'" />').appendTo(f.$body);c.on(d.touchstart,function(a){a.preventDefault();a.stopPropagation();c.trigger(d.mousedown)}).on(d.mousedown,function(a){a.preventDefault();f.$html.hasClass(b.modal)||f.$allMenus.trigger(d.close)});a.mmenu.prototype.offCanvas_initBlocker=function(){}};var b,c,d,f}(jQuery);
188!function(a){a.mmenu.addons.buttonbars={_init:function(c){this.opts.buttonbars;this.conf.buttonbars;this.__refactorClass(a("div",c),this.conf.classNames.buttonbars.buttonbar,"buttonbar");a("."+b.buttonbar,c).each(function(){var c=a(this),f=c.children().not("input"),e=c.children().filter("input");c.addClass(b.buttonbar+"-"+f.length);e.each(function(){var b=a(this),c=f.filter('label[for="'+b.attr("id")+'"]');c.length&&b.insertBefore(c)})})},_setup:function(){},_add:function(){b=a.mmenu._c;b.add("buttonbar")}};
189a.mmenu.defaults.buttonbars={};a.mmenu.configuration.classNames.buttonbars={buttonbar:"Buttonbar"};var b}(jQuery);
190!function(a){a.mmenu.addons.counters={_init:function(d){var f=this,e=this.opts.counters;this.conf.counters;this.__refactorClass(a("em",d),this.conf.classNames.counters.counter,"counter");e.add&&d.each(function(){var e=a(this).data(c.parent);e&&(e.find("> em."+b.counter).length||e.prepend(a('<em class="'+b.counter+'" />')))});e.update&&d.each(function(){var e=a(this),d=e.data(c.parent);if(d){var i=d.find("> em."+b.counter);i.length&&(e.is("."+b.list)||(e=e.find("> ."+b.list)),e.length&&!e.data(c.updatecounter)&&
191(e.data(c.updatecounter,!0),f._update(function(){var a=e.children().not("."+b.label).not("."+b.subtitle).not("."+b.hidden).not("."+b.search).not("."+b.noresultsmsg);i.html(a.length)})))}})},_setup:function(){var b=this.opts.counters;"boolean"==typeof b&&(b={add:b,update:b});"object"!=typeof b&&(b={});b=a.extend(!0,{},a.mmenu.defaults.counters,b);this.opts.counters=b},_add:function(){b=a.mmenu._c;c=a.mmenu._d;b.add("counter search noresultsmsg");c.add("updatecounter")}};a.mmenu.defaults.counters={add:!1,
192update:!1};
192a.mmenu.configuration.classNames.counters={counter:"Counter"};var b,c}(jQuery);
193!function(a){function b(a,b,c){return b>a&&(a=b),a>c&&(a=c),a}a.mmenu.addons.dragOpen={_init:function(){},_setup:function(){if(this.opts.offCanvas){var e=this,g=this.opts.dragOpen,h=this.conf.dragOpen;if(("boolean"==typeof g&&(g={open:g}),"object"!=typeof g&&(g={}),g=a.extend(!0,{},a.mmenu.defaults.dragOpen,g),g.open)&&!(2>Hammer.VERSION)){var i,j,k,l,n,p,o,q,s,r,t=0,v=!1,u=!1,w=0,z=0;switch(this.opts.offCanvas.position){case "left":case "right":n="panleft panright";p="x";o="X";u="width";break;case "top":case "bottom":n=
194"panup pandown",p="y",o="Y",u="height"}switch(this.opts.offCanvas.position){case "left":case "top":q=!1;break;case "right":case "bottom":q=!0}switch(this.opts.offCanvas.position){case "left":s="right";r="left";break;case "right":s="left";r="right";break;case "top":s="down";r="up";break;case "bottom":s="up",r="down"}var A=this.__valueOrFn(g.pageNode,this.$menu,f.$page);"string"==typeof A&&(A=a(A));var D=f.$page;switch(this.opts.offCanvas.zposition){case "front":D=this.$menu;break;case "next":D=D.add(this.$menu)}(new Hammer(A[0],
195g.vendors.hammer)).on("panstart",function(a){switch(l=a.center[p],e.opts.offCanvas.position){case "right":case "bottom":l>=f.$wndw[u]()-g.maxStartPos&&(t=1);break;default:l<=g.maxStartPos&&(t=1)}v=s}).on(n+" panend",function(a){0<t&&a.preventDefault()}).on(n,function(a){if(i=a["delta"+o],q&&(i=-i),i!=w&&(v=i>=w?s:r),w=i,w>g.threshold&&1==t){if(f.$html.hasClass(c.opened))return;t=2;e._openSetup();e.$menu.trigger(d.opening);f.$html.addClass(c.dragging);z=b(f.$wndw[u]()*h[u].perc,h[u].min,h[u].max)}2==
196t&&(j=b(w,10,z)-("front"==e.opts.offCanvas.zposition?z:0),q&&(j=-j),k="translate"+o+"("+j+"px )",D.css({"-webkit-transform":"-webkit-"+k,transform:k}))}).on("panend",function(){2==t&&(f.$html.removeClass(c.dragging),D.css("transform",""),e[v==s?"_openFinish":"close"]());t=0})}}},_add:function(){return"function"!=typeof Hammer?(a.mmenu.addons.dragOpen._init=function(){},a.mmenu.addons.dragOpen._setup=function(){},void 0):(c=a.mmenu._c,d=a.mmenu._e,c.add("dragging"),f=a.mmenu.glbl,void 0)}};a.mmenu.defaults.dragOpen=
197{open:!1,maxStartPos:100,threshold:50,vendors:{hammer:{}}};a.mmenu.configuration.dragOpen={width:{perc:0.8,min:140,max:440},height:{perc:0.8,min:140,max:880}};var c,d,f}(jQuery);
198!function(a){a.mmenu.addons.fixedElements={_init:function(){if(this.opts.offCanvas){var a=this.conf.classNames.fixedElements.fixedTop,f=this.conf.classNames.fixedElements.fixedBottom,a=this.__refactorClass(c.$page.find("."+a),a,"fixed-top"),f=this.__refactorClass(c.$page.find("."+f),f,"fixed-bottom");a.add(f).appendTo(c.$body).addClass(b.slideout)}},_setup:function(){},_add:function(){b=a.mmenu._c;b.add("fixed-top fixed-bottom");c=a.mmenu.glbl}};a.mmenu.defaults.fixedElements={};a.mmenu.configuration.classNames.fixedElements=
199{fixedTop:"FixedTop",fixedBottom:"FixedBottom"};var b,c}(jQuery);
200!function(a){a.mmenu.addons.footer={_init:function(d){var f=this,e=this.opts.footer,g=a("div."+b.footer,this.$menu);g.length&&(e.update&&d.each(function(){var d=a(this),i=a("."+f.conf.classNames.footer.panelFooter,d).html();i||(i=e.title);var j=function(){g[i?"show":"hide"]();g.html(i)};d.on(c.open,j);d.hasClass(b.current)&&j()}),a.mmenu.addons.buttonbars&&a.mmenu.addons.buttonbars._init.call(this,g))},_setup:function(){var c=this.opts.footer;if("boolean"==typeof c&&(c={add:c,update:c}),"object"!=
201typeof c&&(c={}),c=a.extend(!0,{},a.mmenu.defaults.footer,c),this.opts.footer=c,c.add)c=c.content?c.content:c.title,a('<div class="'+b.footer+'" />').appendTo(this.$menu).append(c),this.$menu.addClass(b.hasfooter)},_add:function(){b=a.mmenu._c;c=a.mmenu._e;b.add("footer hasfooter")}};a.mmenu.defaults.footer={add:!1,content:!1,title:"",update:!1};a.mmenu.configuration.classNames.footer={panelFooter:"Footer"};var b,c}(jQuery);
202!function(a){a.mmenu.addons.header={_init:function(f){var e=this,g=this.opts.header,h=(this.conf.header,a("."+b.header,this.$menu));if(h.length){if(g.update){var i=h.find("."+b.title),j=h.find("."+b.prev),k=h.find("."+b.next),l=h.find("."+b.close),n=!1;d.$page&&(n="#"+d.$page.attr("id"),l.attr("href",n));f.each(function(){var d=a(this),f=d.find("."+e.conf.classNames.header.panelHeader),h=d.find("."+e.conf.classNames.header.panelPrev),l=d.find("."+e.conf.classNames.header.panelNext),n=f.html(),t=h.attr("href"),
203v=l.attr("href"),u=h.html(),w=l.html();n||(n=d.find("."+b.subclose).html());n||(n=g.title);t||(t=d.find("."+b.subclose).attr("href"));f=function(){i[n?"show":"hide"]();i.html(n);j[t?"attr":"removeAttr"]("href",t);j[t||u?"show":"hide"]();j.html(u);k[v?"attr":"removeAttr"]("href",v);k[v||w?"show":"hide"]();k.html(w)};d.on(c.open,f);d.hasClass(b.current)&&f()})}a.mmenu.addons.buttonbars&&a.mmenu.addons.buttonbars._init.call(this,h)}},_setup:function(){var c=this.opts.header;if(this.conf.header,"boolean"==
204typeof c&&(c={add:c,update:c}),"object"!=typeof c&&(c={}),"undefined"==typeof c.content&&(c.content=["prev","title","next"]),c=a.extend(!0,{},a.mmenu.defaults.header,c),this.opts.header=c,c.add){if(c.content instanceof Array){for(var e=a("<div />"),d=0,h=c.content.length;h>d;d++)switch(c.content[d]){case "prev":case "next":case "close":e.append('<a class="'+b[c.content[d]]+'" href="#"></a>');break;case "title":e.append('<span class="'+b.title+'"></span>');break;default:e.append(c.content[d])}e=e.html()}else e=
205c.content;a('<div class="'+b.header+'" />').prependTo(this.$menu).append(e);this.$menu.addClass(b.hasheader)}},_add:function(){b=a.mmenu._c;c=a.mmenu._e;b.add("header hasheader prev next close title");d=a.mmenu.glbl}};a.mmenu.defaults.header={add:!1,title:"Menu",update:!1};a.mmenu.configuration.classNames.header={panelHeader:"Header",panelNext:"Next",panelPrev:"Prev"};var b,c,d}(jQuery);
206!function(a){a.mmenu.addons.labels={_init:function(c){var d=this.opts.labels;this.__refactorClass(a("li",this.$menu),this.conf.classNames.labels.collapsed,"collapsed");d.collapse&&a("."+b.label,c).each(function(){var c=a(this);c.nextUntil("."+b.label,"."+b.collapsed).length&&(c.children("."+b.subopen).length||(c.wrapInner("<span />"),c.prepend('<a href="#" class="'+b.subopen+" "+b.fullsubopen+'" />')))})},_setup:function(){var b=this.opts.labels;"boolean"==typeof b&&(b={collapse:b});"object"!=typeof b&&
207(b={});b=a.extend(!0,{},a.mmenu.defaults.labels,b);this.opts.labels=b},_add:function(){b=a.mmenu._c;b.add("collapsed uncollapsed")},_clickAnchor:function(a,d){if(d){var f=a.parent();if(f.is("."+b.label)){var e=f.nextUntil("."+b.label,"."+b.collapsed);return f.toggleClass(b.opened),e[f.hasClass(b.opened)?"addClass":"removeClass"](b.uncollapsed),!0}}return!1}};a.mmenu.defaults.labels={collapse:!1};a.mmenu.configuration.classNames.labels={collapsed:"Collapsed"};var b}(jQuery);
208!function(a){a.mmenu.addons.searchfield={_init:function(f){var e=this,g=this.opts.searchfield,h=this.conf.searchfield;if(g.add){switch(g.addTo){case "menu":f=this.$menu;break;case "panels":break;default:f=a(g.addTo,this.$menu).filter("."+b.panel)}f.length&&f.each(function(){var c=a(this),d=c.is("."+b.menu)?h.form?"form":"div":"li";if(!c.children(d+"."+b.search).length){if(c.is("."+b.menu))var f=e.$menu,l="prependTo";else f=c.children().first(),l=f.is("."+b.subtitle)?"insertAfter":"insertBefore";var n=
209a("<"+d+' class="'+b.search+'" />');if("form"==d&&"object"==typeof h.form)for(var p in h.form)n.attr(p,h.form[p]);n.append('<input placeholder="'+g.placeholder+'" type="text" autocomplete="off" />');n[l](f)}g.noResults&&(c.is("."+b.menu)&&(c=c.children("."+b.panel).first()),d=c.is("."+b.list)?"li":"div",c.children(d+"."+b.noresultsmsg).length||a("<"+d+' class="'+b.noresultsmsg+'" />').html(g.noResults).appendTo(c))})}if(this.$menu.children("."+b.search).length&&this.$menu.addClass(b.hassearch),g.search)f=
210a("."+b.search,this.$menu),f.length&&f.each(function(){var f=a(this);if("menu"==g.addTo)var h=a("."+b.panel,e.$menu),k=e.$menu;else k=h=f.closest("."+b.panel);var l=f.children("input"),n=e.__findAddBack(h,"."+b.list).children("li"),p=n.filter("."+b.label),o=n.not("."+b.subtitle).not("."+b.label).not("."+b.search).not("."+b.noresultsmsg),q="> a";g.showLinksOnly||(q+=", > span");l.off(d.keyup+" "+d.change).on(d.keyup,function(a){a:{switch(a.keyCode){case 9:case 16:case 17:case 18:case 37:case 38:case 39:case 40:a=
211!0;break a}a=!1}a||f.trigger(d.search)}).on(d.change,function(){f.trigger(d.search)});f.off(d.reset+" "+d.search).on(d.reset+" "+d.search,function(a){a.stopPropagation()}).on(d.reset,function(){f.trigger(d.search,[""])}
211).on(d.search,function(f,i){"string"==typeof i?l.val(i):i=l.val();i=i.toLowerCase();h.scrollTop(0);o.add(p).addClass(b.hidden);o.each(function(){var c=a(this);-1<a(q,c).text().toLowerCase().indexOf(i)&&c.add(c.prevAll("."+b.label).first()).removeClass(b.hidden)});a(h.get().reverse()).each(function(f){var h=
212a(this),i=h.data(c.parent);i&&(h.add(h.find("> ."+b.list)).find("> li").not("."+b.subtitle).not("."+b.search).not("."+b.noresultsmsg).not("."+b.label).not("."+b.hidden).length?i.removeClass(b.hidden).removeClass(b.nosubresults).prevAll("."+b.label).first().removeClass(b.hidden):"menu"==g.addTo&&(h.hasClass(b.opened)&&setTimeout(function(){i.trigger(d.open)},1.5*(f+1)*e.conf.openingInterval),i.addClass(b.nosubresults)))});k[o.not("."+b.hidden).length?"removeClass":"addClass"](b.noresults);e._update()})})},
213_setup:function(){var b=this.opts.searchfield;this.conf.searchfield;"boolean"==typeof b&&(b={add:b,search:b});"object"!=typeof b&&(b={});b=a.extend(!0,{},a.mmenu.defaults.searchfield,b);"boolean"!=typeof b.showLinksOnly&&(b.showLinksOnly="menu"==b.addTo);this.opts.searchfield=b},_add:function(){b=a.mmenu._c;c=a.mmenu._d;d=a.mmenu._e;b.add("search hassearch noresultsmsg noresults nosubresults");d.add("search reset change")}};a.mmenu.defaults.searchfield={add:!1,addTo:"menu",search:!1,placeholder:"Search",
214noResults:"No results found."};a.mmenu.configuration.searchfield={form:!1};var b,c,d}(jQuery);
215!function(a){a.mmenu.addons.toggles={_init:function(c){var d=this;this.opts.toggles;this.conf.toggles;this.__refactorClass(a("input",c),this.conf.classNames.toggles.toggle,"toggle");this.__refactorClass(a("input",c),this.conf.classNames.toggles.check,"check");a("input."+b.toggle+", input."+b.check,c).each(function(){var c=a(this),e=c.closest("li"),g=c.hasClass(b.toggle)?"toggle":"check",h=c.attr("id")||d.__getUniqueId();e.children('label[for="'+h+'"]').length||(c.attr("id",h),e.prepend(c),a('<label for="'+
216h+'" class="'+b[g]+'"></label>').insertBefore(e.children("a, span").last()))})},_setup:function(){},_add:function(){b=a.mmenu._c;b.add("toggle check")}};a.mmenu.defaults.toggles={};a.mmenu.configuration.classNames.toggles={toggle:"Toggle",check:"Check"};var b}(jQuery);
217(function(a){a.fn.fitVids=function(b){var c={customSelector:null,ignore:null};if(!document.getElementById("fit-vids-style")){var d=document.head||document.getElementsByTagName("head")[0],f=document.createElement("div");f.innerHTML='<p>x</p><style id="fit-vids-style">.fluid-width-video-wrapper{width:100%;position:relative;padding:0;}.fluid-width-video-wrapper iframe,.fluid-width-video-wrapper object,.fluid-width-video-wrapper embed {position:absolute;top:0;left:0;width:100%;height:100%;}</style>';d.appendChild(f.childNodes[1])}b&&
218a.extend(c,b);return this.each(function(){var b="iframe[src*='player.vimeo.com'] iframe[src*='youtube.com'] iframe[src*='youtube-nocookie.com'] iframe[src*='kickstarter.com'][src*='video.html'] object embed".split(" ");c.customSelector&&b.push(c.customSelector);var d=".fitvidsignore";c.ignore&&(d=d+", "+c.ignore);b=a(this).find(b.join(","));b=b.not("object object");b=b.not(d);b.each(function(){var b=a(this);if(!(0<b.parents(d).length)&&!("embed"===this.tagName.toLowerCase()&&b.parent("object").length||
219b.parent(".fluid-width-video-wrapper").length)){if(!b.css("height")&&!b.css("width")&&(isNaN(b.attr("height"))||isNaN(b.attr("width"))))b.attr("height",9),b.attr("width",16);var c="object"===this.tagName.toLowerCase()||b.attr("height")&&!isNaN(parseInt(b.attr("height"),10))?parseInt(b.attr("height"),10):b.height(),e=!isNaN(parseInt(b.attr("width"),10))?parseInt(b.attr("width"),10):b.width(),c=c/e;b.attr("id")||(e="fitvid"+Math.floor(999999*Math.random()),b.attr("id",e));b.wrap('<div class="fluid-width-video-wrapper"></div>').parent(".fluid-width-video-wrapper").css("padding-top",
220100*c+"%");b.removeAttr("height").removeAttr("width")}})})}})(window.jQuery||window.Zepto);
221(function(a,b){"object"===typeof exports&&"undefined"!==typeof module?module.exports=b():"function"===typeof define&&define.amd?define(b):a.moment=b()})(this,function(){function a(){return pb.apply(null,arguments)}function b(a){return a instanceof Array||"[object Array]"===Object.prototype.toString.call(a)}function c(a){return null!=a&&"[object Object]"===Object.prototype.toString.call(a)}function d(a){return"number"===typeof value||"[object Number]"===Object.prototype.toString.call(a)}function f(a){return a instanceof
222Date||"[object Date]"===Object.prototype.toString.call(a)}function e(a,b){var c=[],e;for(e=0;e<a.length;++e)c.push(b(a[e],e));return c}function g(a,b){return Object.prototype.hasOwnProperty.call(a,b)}function h(a,b){for(var c in b)g(b,c)&&(a[c]=b[c]);g(b,"toString")&&(a.toString=b.toString);g(b,"valueOf")&&(a.valueOf=b.valueOf);return a}function i(a,b,c,e){return qb(a,b,c,e,!0).utc()}function j(a){null==a._pf&&(a._pf={empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,
223invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],meridiem:null});return a._pf}function k(a){if(null==a._isValid){var b=j(a),c=Sb.call(b.parsedDateParts,function(a){return null!=a}),c=!isNaN(a._d.getTime())&&0>b.overflow&&!b.empty&&!b.invalidMonth&&!b.invalidWeekday&&!b.nullInput&&!b.invalidFormat&&!b.userInvalidated&&(!b.meridiem||b.meridiem&&c);a._strict&&(c=c&&0===b.charsLeftOver&&0===b.unusedTokens.length&&void 0===b.bigHour);if(null==Object.isFrozen||!Object.isFrozen(a))a._isValid=
224c;else return c}return a._isValid}function l(a){var b=i(NaN);null!=a?h(j(b),a):j(b).userInvalidated=!0;return b}function n(a){return void 0===a}function p(a,b){var c,e,d;n(b._isAMomentObject)||(a._isAMomentObject=b._isAMomentObject);n(b._i)||(a._i=b._i);n(b._f)||(a._f=b._f);n(b._l)||(a._l=b._l);n(b._strict)||(a._strict=b._strict);n(b._tzm)||(a._tzm=b._tzm);n(b._isUTC)||(a._isUTC=b._isUTC);n(b._offset)||(a._offset=b._offset);n(b._pf)||(a._pf=j(b));n(b._locale)||(a._locale=b._locale);if(0<Xa.length)for(c in Xa)e=
225Xa[c],d=b[e],n(d)||(a[e]=d);return a}function o(b){p(this,b);this._d=new Date(null!=b._d?b._d.getTime():NaN);!1===Ya&&(Ya=!0,a.updateOffset(this),Ya=!1)}function q(a){return a instanceof o||null!=a&&null!=a._isAMomentObject}function s(a){return 0>a?Math.ceil(a)||0:Math.floor(a)}function r(a){var a=+a,b=0;0!==a&&isFinite(a)&&(b=s(a));return b}function t(a,b,c){var e=Math.min(a.length,b.length),d=Math.abs(a.length-b.length),f=0,g;for(g=0;g<e;g++)(c&&a[g]!==b[g]||!c&&r(a[g])!==r(b[g]))&&f++;return f+
226d}function v(b){!1===a.suppressDeprecationWarnings&&("undefined"!==typeof console&&console.warn)&&console.warn("Deprecation warning: "+b)}function u(b,c){var e=!0;return h(function(){null!=a.deprecationHandler&&a.deprecationHandler(null,b);if(e){for(var d=[],f,g=0;g<arguments.length;g++){f="";if("object"===typeof arguments[g]){f+="\n["+g+"] ";for(var h in arguments[0])f+=h+": "+arguments[0][h]+", ";f=f.slice(0,-2)}else f=arguments[g];d.push(f)}v(b+"\nArguments: "+Array.prototype.slice.call(d).join("")+
227"\n"+Error().stack);e=!1}return c.apply(this,arguments)},c)}function w(b,c){null!=a.deprecationHandler&&a.deprecationHandler(b,c);rb[b]||(v(c),rb[b]=!0)}function z(a){return a instanceof Function||"[object Function]"===Object.prototype.toString.call(a)}function A(a,b){var e=h({},a),d;for(d in b)g(b,d)&&(c(a[d])&&c(b[d])?(e[d]={},h(e[d],a[d]),h(e[d],b[d])):null!=b[d]?e[d]=b[d]:delete e[d]);for(d in a)g(a,d)&&(!g(b,d)&&c(a[d]))&&(e[d]=h({},e[d]));return e}function D(a){null!=a&&this.set(a)}function C(a,
228b){var c=a.toLowerCase();Ga[c]=Ga[c+"s"]=Ga[b]=a}function I(a){return"string"===typeof a?Ga[a]||Ga[a.toLowerCase()]:void 0}function S(a){var b={},c,e;for(e in a)g(a,e)&&(c=I(e))&&(b[c]=a[e]);return b}function da(a){var b=[],c;for(c in a)b.push({unit:c,priority:T[c]});b.sort(function(a,b){return a.priority-b.priority});return b}function P(b,c){return function(e){if(null!=e){if(this.isValid())this._d["set"+(this._isUTC?"UTC":"")+b](e);a.updateOffset(this,c);return this}return W(this,b)}}function W(a,
229b){return a.isValid()?a._d["get"+(a._isUTC?"UTC":"")+b]():NaN}function N(a,b,c){var e=""+Math.abs(a);return(0<=a?c?"+":"":"-")+Math.pow(10,Math.max(0,b-e.length)).toString().substr(1)+e}function B(a,b,c,e){var d=e;"string"===typeof e&&(d=function(){return this[e]()});a&&(Ca[a]=d);b&&(Ca[b[0]]=function(){return N(d.apply(this,arguments),b[1],b[2])});c&&(Ca[c]=function(){return this.localeData().ordinal(d.apply(this,arguments),a)})}function U(a){var b=a.match(sb),c,e;c=0;for(e=b.length;c<e;c++)b[c]=
230Ca[b[c]]?Ca[b[c]]:b[c].match(/\[[\s\S]/)?b[c].replace(/^\[|\]$/g,""):b[c].replace(/\\/g,"");return function(c){var d="",f;for(f=0;f<e;f++)d+=b[f]instanceof Function?b[f].call(c,a):b[f];return d}}function Y(a,b){if(!a.isValid())return a.localeData().invalidDate();b=E(b,a.localeData());Za[b]=Za[b]||U(b);return Za[b](a)}function E(a,b){function c(a){return b.longDateFormat(a)||a}var e=5;for(Ka.lastIndex=0;0<=e&&Ka.test(a);)a=a.replace(Ka,c),Ka.lastIndex=0,e-=1;return a}function x(a,b,c){$a[a]=z(b)?b:
231function(a){return a&&c?c:b}}function V(a){return F(a.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(a,b,c,e,d){return b||c||e||d}))}function F(a){return a.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function H(a,b){var c,e=b;
231"string"===typeof a&&(a=[a]);d(b)&&(e=function(a,c){c[b]=r(a)});for(c=0;c<a.length;c++)ab[a[c]]=e}function aa(a,b){H(a,function(a,c,e,d){e._w=e._w||{};b(a,e._w,e,d)})}function ea(a,b){return(new Date(Date.UTC(a,b+1,0))).getUTCDate()}function ba(a,b){var c;
232if(!a.isValid())return a;if("string"===typeof b)if(/^\d+$/.test(b))b=r(b);else if(b=a.localeData().monthsParse(b),!d(b))return a;c=Math.min(a.date(),ea(a.year(),b));a._d["set"+(a._isUTC?"UTC":"")+"Month"](b,c);return a}function fa(b){return null!=b?(ba(this,b),a.updateOffset(this,!0),this):W(this,"Month")}function qa(){function a(b,c){return c.length-b.length}var b=[],c=[],e=[],d,f;for(d=0;12>d;d++)f=i([2E3,d]),b.push(this.monthsShort(f,"")),c.push(this.months(f,"")),e.push(this.months(f,"")),e.push(this.monthsShort(f,
233""));b.sort(a);c.sort(a);e.sort(a);for(d=0;12>d;d++)b[d]=F(b[d]),c[d]=F(c[d]);for(d=0;24>d;d++)e[d]=F(e[d]);this._monthsShortRegex=this._monthsRegex=RegExp("^("+e.join("|")+")","i");this._monthsStrictRegex=RegExp("^("+c.join("|")+")","i");this._monthsShortStrictRegex=RegExp("^("+b.join("|")+")","i")}function ma(a){return m(a)?366:365}function m(a){return 0===a%4&&0!==a%100||0===a%400}function Z(a,b,c,e,d,f,g){b=new Date(a,b,c,e,d,f,g);100>a&&(0<=a&&isFinite(b.getFullYear()))&&b.setFullYear(a);return b}
234function X(a){var b=new Date(Date.UTC.apply(null,arguments));100>a&&(0<=a&&isFinite(b.getUTCFullYear()))&&b.setUTCFullYear(a);return b}function ya(a,b,c){c=7+b-c;return-((7+X(a,0,c).getUTCDay()-b)%7)+c-1}function Ha(a,b,c,e,d){c=(7+c-e)%7;e=ya(a,e,d);e=1+7*(b-1)+c+e;0>=e?(b=a-1,a=ma(b)+e):e>ma(a)?(b=a+1,a=e-ma(a)):(b=a,a=e);return{year:b,dayOfYear:a}}function ra(a,b,c){var e=ya(a.year(),b,c),e=Math.floor((a.dayOfYear()-e-1)/7)+1;1>e?(a=a.year()-1,b=e+ja(a,b,c)):e>ja(a.year(),b,c)?(b=e-ja(a.year(),
235b,c),a=a.year()+1):(a=a.year(),b=e);return{week:b,year:a}}function ja(a,b,c){var e=ya(a,b,c),b=ya(a+1,b,c);return(ma(a)-e+b)/7}function La(a,b,c){var e,d,a=a.toLocaleLowerCase();if(!this._weekdaysParse){this._weekdaysParse=[];this._shortWeekdaysParse=[];this._minWeekdaysParse=[];for(e=0;7>e;++e)d=i([2E3,1]).day(e),this._minWeekdaysParse[e]=this.weekdaysMin(d,"").toLocaleLowerCase(),this._shortWeekdaysParse[e]=this.weekdaysShort(d,"").toLocaleLowerCase(),this._weekdaysParse[e]=this.weekdays(d,"").toLocaleLowerCase()}if(c)b=
236"dddd"===b?Q.call(this._weekdaysParse,a):"ddd"===b?Q.call(this._shortWeekdaysParse,a):Q.call(this._minWeekdaysParse,a);else if("dddd"===b){b=Q.call(this._weekdaysParse,a);if(-1!==b)return b;b=Q.call(this._shortWeekdaysParse,a);if(-1!==b)return b;b=Q.call(this._minWeekdaysParse,a)}else if("ddd"===b){b=Q.call(this._shortWeekdaysParse,a);if(-1!==b)return b;b=Q.call(this._weekdaysParse,a);if(-1!==b)return b;b=Q.call(this._minWeekdaysParse,a)}else{b=Q.call(this._minWeekdaysParse,a);if(-1!==b)return b;
237b=Q.call(this._weekdaysParse,a);if(-1!==b)return b;b=Q.call(this._shortWeekdaysParse,a)}return-1!==b?b:null}function sa(){function a(b,c){return c.length-b.length}var b=[],c=[],e=[],d=[],f,g,h,K;for(f=0;7>f;f++)g=i([2E3,1]).day(f),h=this.weekdaysMin(g,""),K=this.weekdaysShort(g,""),g=this.weekdays(g,""),b.push(h),c.push(K),e.push(g),d.push(h),d.push(K),d.push(g);b.sort(a);c.sort(a);e.sort(a);d.sort(a);for(f=0;7>f;f++)c[f]=F(c[f]),e[f]=F(e[f]),d[f]=F(d[f]);this._weekdaysMinRegex=this._weekdaysShortRegex=
238this._weekdaysRegex=RegExp("^("+d.join("|")+")","i");this._weekdaysStrictRegex=RegExp("^("+e.join("|")+")","i");this._weekdaysShortStrictRegex=RegExp("^("+c.join("|")+")","i");this._weekdaysMinStrictRegex=RegExp("^("+b.join("|")+")","i")}function Da(){return this.hours()%12||12}function K(a,b){B(a,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),b)})}function tb(a,b){return b._meridiemParse}function ub(a){var b=null;if(!O[a]&&"undefined"!==typeof module&&module&&module.exports)try{b=
239Ma._abbr,require("./locale/"+a),Ea(b)}catch(c){}return O[a]}function Ea(a,b){var c;a&&(c=n(b)?ta(a):bb(a,b))&&(Ma=c);return Ma._abbr}function bb(a,b){if(null!==b){var c=vb;b.abbr=a;if(null!=O[a])w("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),c=O[a]._config;else if(null!=b.parentLocale)if(null!=
240O[b.parentLocale])c=O[b.parentLocale]._config;else return Ia[b.parentLocale]||(Ia[b.parentLocale]=[]),Ia[b.parentLocale].push({name:a,config:b}),null;O[a]=new D(A(c,b));
240Ia[a]&&Ia[a].forEach(function(a){bb(a.name,a.config)});Ea(a);return O[a]}delete O[a];return null}function ta(a){var c;a&&(a._locale&&a._locale._abbr)&&(a=a._locale._abbr);if(!a)return Ma;if(!b(a)){if(c=ub(a))return c;a=[a]}a:{c=0;for(var e,d,f,g;c<a.length;){g=(a[c]?a[c].toLowerCase().replace("_","-"):a[c]).split("-");e=g.length;for(d=
241(d=a[c+1]?a[c+1].toLowerCase().replace("_","-"):a[c+1])?d.split("-"):null;0<e;){if(f=ub(g.slice(0,e).join("-"))){a=f;break a}if(d&&d.length>=e&&t(g,d,!0)>=e-1)break;e--}c++}a=null}return a}function cb(a){var b;if((b=a._a)&&-2===j(a).overflow){b=0>b[na]||11<b[na]?na:1>b[ka]||b[ka]>ea(b[ha],b[na])?ka:0>b[R]||24<b[R]||24===b[R]&&(0!==b[ia]||0!==b[oa]||0!==b[za])?R:0>b[ia]||59<b[ia]?ia:0>b[oa]||59<b[oa]?oa:0>b[za]||999<b[za]?za:-1;if(j(a)._overflowDayOfYear&&(b<ha||b>ka))b=ka;j(a)._overflowWeeks&&-1===
242b&&(b=Tb);j(a)._overflowWeekday&&-1===b&&(b=Ub);j(a).overflow=b}return a}function wb(a){var b,c;b=a._i;var e=Vb.exec(b)||Wb.exec(b),d,f,g,h;if(e){j(a).iso=!0;b=0;for(c=Na.length;b<c;b++)if(Na[b][1].exec(e[1])){f=Na[b][0];d=!1!==Na[b][2];break}if(null==f)a._isValid=!1;else{if(e[3]){b=0;for(c=db.length;b<c;b++)if(db[b][1].exec(e[3])){g=(e[2]||" ")+db[b][0];break}if(null==g){a._isValid=!1;return}}if(!d&&null!=g)a._isValid=!1;else{if(e[4])if(Xb.exec(e[4]))h="Z";else{a._isValid=!1;return}a._f=f+(g||"")+
243(h||"");eb(a)}}}else a._isValid=!1}function Yb(b){var c=Zb.exec(b._i);null!==c?b._d=new Date(+c[1]):(wb(b),!1===b._isValid&&(delete b._isValid,a.createFromInputFallback(b)))}function Fa(a,b,c){return null!=a?a:null!=b?b:c}function fb(b){var c,e=[],d;if(!b._d){d=new Date(a.now());d=b._useUTC?[d.getUTCFullYear(),d.getUTCMonth(),d.getUTCDate()]:[d.getFullYear(),d.getMonth(),d.getDate()];if(b._w&&null==b._a[ka]&&null==b._a[na]){var f,g,h,i,K,k;f=b._w;if(null!=f.GG||null!=f.W||null!=f.E){if(K=1,k=4,g=
244Fa(f.GG,b._a[ha],ra(L(),1,4).year),h=Fa(f.W,1),i=Fa(f.E,1),1>i||7<i)c=!0}else if(K=b._locale._week.dow,k=b._locale._week.doy,h=ra(L(),K,k),g=Fa(f.gg,b._a[ha],h.year),h=Fa(f.w,h.week),null!=f.d){if(i=f.d,0>i||6<i)c=!0}else if(null!=f.e){if(i=f.e+K,0>f.e||6<f.e)c=!0}else i=K;1>h||h>ja(g,K,k)?j(b)._overflowWeeks=!0:null!=c?j(b)._overflowWeekday=!0:(c=Ha(g,h,i,K,k),b._a[ha]=c.year,b._dayOfYear=c.dayOfYear)}b._dayOfYear&&(c=Fa(b._a[ha],d[ha]),b._dayOfYear>ma(c)&&(j(b)._overflowDayOfYear=!0),c=X(c,0,b._dayOfYear),
245b._a[na]=c.getUTCMonth(),b._a[ka]=c.getUTCDate());for(c=0;3>c&&null==b._a[c];++c)b._a[c]=e[c]=d[c];for(;7>c;c++)b._a[c]=e[c]=null==b._a[c]?2===c?1:0:b._a[c];24===b._a[R]&&(0===b._a[ia]&&0===b._a[oa]&&0===b._a[za])&&(b._nextDay=!0,b._a[R]=0);b._d=(b._useUTC?X:Z).apply(null,e);null!=b._tzm&&b._d.setUTCMinutes(b._d.getUTCMinutes()-b._tzm);b._nextDay&&(b._a[R]=24)}}function eb(b){if(b._f===a.ISO_8601)wb(b);else{b._a=[];j(b).empty=!0;var c=""+b._i,e,d,f,h,i,K=c.length,k=0;f=E(b._f,b._locale).match(sb)||
246[];for(e=0;e<f.length;e++){h=f[e];if(d=(c.match(!g($a,h)?RegExp(V(h)):$a[h](b._strict,b._locale))||[])[0])i=c.substr(0,c.indexOf(d)),0<i.length&&j(b).unusedInput.push(i),c=c.slice(c.indexOf(d)+d.length),k+=d.length;if(Ca[h]){if(d?j(b).empty=!1:j(b).unusedTokens.push(h),i=b,null!=d&&g(ab,h))ab[h](d,i._a,i,h)}else b._strict&&!d&&j(b).unusedTokens.push(h)}j(b).charsLeftOver=K-k;0<c.length&&j(b).unusedInput.push(c);12>=b._a[R]&&(!0===j(b).bigHour&&0<b._a[R])&&(j(b).bigHour=void 0);j(b).parsedDateParts=
247b._a.slice(0);j(b).meridiem=b._meridiem;c=b._a;e=R;K=b._locale;f=b._a[R];k=b._meridiem;null!=k&&(null!=K.meridiemHour?f=K.meridiemHour(f,k):null!=K.isPM&&((K=K.isPM(k))&&12>f&&(f+=12),!K&&12===f&&(f=0)));c[e]=f;fb(b);cb(b)}}function $b(a){if(!a._d){var b=S(a._i);a._a=e([b.year,b.month,b.day||b.date,b.hour,b.minute,b.second,b.millisecond],function(a){return a&&parseInt(a,10)});fb(a)}}function xb(a){var c=a._i,e=a._f;a._locale=a._locale||ta(a._l);if(null===c||void 0===e&&""===c)return l({nullInput:!0});
248"string"===typeof c&&(a._i=c=a._locale.preparse(c));if(q(c))return new o(cb(c));if(f(c))a._d=c;else if(b(e)){var d,g,i;if(0===a._f.length)j(a).invalidFormat=!0,a._d=new Date(NaN);else{for(c=0;c<a._f.length;c++)if(e=0,d=p({},a),null!=a._useUTC&&(d._useUTC=a._useUTC),d._f=a._f[c],eb(d),k(d))if(e+=j(d).charsLeftOver,e+=10*j(d).unusedTokens.length,j(d).score=e,null==i||e<i)i=e,g=
248d;h(a,g||d)}}else e?eb(a):ac(a);k(a)||(a._d=null);return a}function ac(c){var g=c._i;void 0===g?c._d=new Date(a.now()):f(g)?
249c._d=new Date(g.valueOf()):"string"===typeof g?Yb(c):b(g)?(c._a=e(g.slice(0),function(a){return parseInt(a,10)}),fb(c)):"object"===typeof g?$b(c):d(g)?c._d=new Date(g):a.createFromInputFallback(c)}function qb(a,e,d,f,g){var h={};if(!0===d||!1===d)f=d,d=void 0;var i;if(i=c(a))a:{for(var K in a){i=!1;break a}i=!0}if(i||b(a)&&0===a.length)a=void 0;h._isAMomentObject=!0;h._useUTC=h._isUTC=g;h._l=d;h._i=a;h._f=e;h._strict=f;a=new o(cb(xb(h)));a._nextDay&&(a.add(1,"d"),a._nextDay=void 0);return a}function L(a,
250b,c,e){return qb(a,b,c,e,!1)}function yb(a,c){var e,d;1===c.length&&b(c[0])&&(c=c[0]);if(!c.length)return L();e=c[0];for(d=1;d<c.length;++d)if(!c[d].isValid()||c[d][a](e))e=c[d];return e}function Oa(a){var a=S(a),b=a.year||0,c=a.quarter||0,e=a.month||0,d=a.week||0,f=a.day||0;this._milliseconds=+(a.millisecond||0)+1E3*(a.second||0)+6E4*(a.minute||0)+36E5*(a.hour||0);this._days=+f+7*d;this._months=+e+3*c+12*b;this._data={};this._locale=ta();this._bubble()}function gb(a){return a instanceof Oa}function hb(a){return 0>
251a?-1*Math.round(-1*a):Math.round(a)}function zb(a,b){B(a,0,0,function(){var a=this.utcOffset(),c="+";0>a&&(a=-a,c="-");return c+N(~~(a/60),2)+b+N(~~a%60,2)})}function ib(a,b){var c=(b||"").match(a);if(null===c)return null;var c=((c[c.length-1]||[])+"").match(bc)||["-",0,0],e=+(60*c[1])+r(c[2]);return 0===e?0:"+"===c[0]?e:-e}function jb(b,c){var e,d;return c._isUTC?(e=c.clone(),d=(q(b)||f(b)?b.valueOf():L(b).valueOf())-e.valueOf(),e._d.setTime(e._d.valueOf()+d),a.updateOffset(e,!1),e):L(b).local()}
252function kb(a){return 15*-Math.round(a._d.getTimezoneOffset()/15)}function Ab(){return this.isValid()?this._isUTC&&0===this._offset:!1}function ua(a,b){var c=a,e=null;if(gb(a))c={ms:a._milliseconds,d:a._days,M:a._months};else if(d(a))c={},b?c[b]=a:c.milliseconds=a;else if(e=cc.exec(a))c="-"===e[1]?-1:1,c={y:0,d:r(e[ka])*c,h:r(e[R])*c,m:r(e[ia])*c,s:r(e[oa])*c,ms:r(hb(1E3*e[za]))*c};else if(e=dc.exec(a))c="-"===e[1]?-1:1,c={y:Aa(e[2],c),M:Aa(e[3],c),w:Aa(e[4],c),d:Aa(e[5],c),h:Aa(e[6],c),m:Aa(e[7],
253c),s:Aa(e[8],c)};else if(null==c)c={};else if("object"===typeof c&&("from"in c||"to"in c))e=L(c.from),c=L(c.to),!e.isValid()||!c.isValid()?e={milliseconds:0,months:0}:(c=jb(c,e),e.isBefore(c)?c=Bb(e,c):(c=Bb(c,e),c.milliseconds=-c.milliseconds,c.months=-c.months),e=c),c={},c.ms=e.milliseconds,c.M=e.months;c=new Oa(c);
253gb(a)&&g(a,"_locale")&&(c._locale=a._locale);return c}function Aa(a,b){var c=a&&parseFloat(a.replace(",","."));return(isNaN(c)?0:c)*b}function Bb(a,b){var c={milliseconds:0,months:0};
254c.months=b.month()-a.month()+12*(b.year()-a.year());a.clone().add(c.months,"M").isAfter(b)&&--c.months;c.milliseconds=+b-+a.clone().add(c.months,"M");return c}function Cb(a,b){return function(c,e){var d;null!==e&&!isNaN(+e)&&(w(b,"moment()."+b+"(period, number) is deprecated. Please use moment()."+b+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),d=c,c=e,e=d);d=ua("string"===typeof c?+c:c,e);Db(this,d,a);return this}}function Db(b,c,e,d){var f=c._milliseconds,
255g=hb(c._days),c=hb(c._months);if(b.isValid()){d=null==d?!0:d;f&&b._d.setTime(b._d.valueOf()+f*e);if(g&&(f=W(b,"Date")+g*e,b.isValid()))b._d["set"+(b._isUTC?"UTC":"")+"Date"](f);c&&ba(b,W(b,"Month")+c*e);d&&a.updateOffset(b,g||c)}}function Eb(a){if(void 0===a)return this._locale._abbr;a=ta(a);null!=a&&(this._locale=a);return this}function Fb(){return this._locale}function Pa(a,b){B(0,[a,a.length],0,b)}function Gb(a,b,c,e,d){var f;if(null==a)return ra(this,e,d).year;f=ja(a,e,d);b>f&&(b=f);a=Ha(a,b,
256c,e,d);a=X(a.year,0,a.dayOfYear);this.year(a.getUTCFullYear());this.month(a.getUTCMonth());this.date(a.getUTCDate());return this}function ec(a,b){b[za]=r(1E3*("0."+a))}function Hb(a){return a}function Qa(a,b,c,e){var d=ta(),b=i().set(e,b);return d[c](b,a)}function Ib(a,b,c){d(a)&&(b=a,a=void 0);a=a||"";if(null!=b)return Qa(a,b,c,"month");for(var e=[],b=0;12>b;b++)e[b]=Qa(a,b,c,"month");return e}function lb(a,b,c,e){"boolean"!==typeof a&&(c=b=a,a=!1);d(b)&&(c=b,b=void 0);var b=b||"",f=ta(),a=a?f._week.dow:
2570;if(null!=c)return Qa(b,(c+a)%7,e,"day");f=[];for(c=0;7>c;c++)f[c]=Qa(b,(c+a)%7,e,"day");return f}function Jb(a,b,c,e){b=ua(b,c);a._milliseconds+=e*b._milliseconds;a._days+=e*b._days;a._months+=e*b._months;return a._bubble()}function va(a){return function(){return this.as(a)}}function Ba(a){return function(){return this._data[a]}}function fc(a,b,c,e,d){return d.relativeTime(b||1,!!c,a,e)}function Ra(){var a=mb(this._milliseconds)/1E3,b=mb(this._days),c=mb(this._months),e,d,f;e=s(a/60);d=s(e/60);
258a%=60;e%=60;f=s(c/12);var c=c%12,g=this.asSeconds();return!g?"P0D":(0>g?"-":"")+"P"+(f?f+"Y":"")+(c?c+"M":"")+(b?b+"D":"")+(d||e||a?"T":"")+(d?d+"H":"")+(e?e+"M":"")+(a?a+"S":"")}var pb,Sb=Array.prototype.some?Array.prototype.some:function(a){for(var b=Object(this),c=b.length>>>0,e=0;e<c;e++)if(e in b&&a.call(this,b[e],e,b))return!0;return!1},Xa=a.momentProperties=[],Ya=!1,rb={};a.suppressDeprecationWarnings=!1;a.deprecationHandler=null;var gc=Object.keys?Object.keys:function(a){var b,c=[];for(b in a)g(a,
259b)&&c.push(b);return c},Ga={},T={},sb=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,Ka=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,Za={},Ca={},Kb=/\d/,ca=/\d\d/,Lb=/\d{3}/,nb=/\d{4}/,Sa=/[+-]?\d{6}/,M=/\d\d?/,Mb=/\d\d\d\d?/,Nb=/\d\d\d\d\d\d?/,Ta=/\d{1,3}/,ob=/\d{1,4}/,Ua=/[+-]?\d{1,6}/,hc=/\d+/,Va=/[+-]?\d+/,ic=/Z|[+-]\d\d:?\d\d/gi,Wa=/Z|[+-]\d\d(?::?\d\d)?/gi,
260Ja=/[0-9]*['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF\/]+(\s*?[\u0600-\u06FF]+){1,2}/i,$a={},ab={},ha=0,na=1,ka=2,R=3,ia=4,oa=5,za=6,Tb=7,Ub=8,Q=Array.prototype.indexOf?Array.prototype.indexOf:function(a){var b;for(b=0;b<this.length;++b)if(this[b]===a)return b;return-1};B("M",["MM",2],"Mo",function(){return this.month()+1});B("MMM",0,0,function(a){return this.localeData().monthsShort(this,a)});B("MMMM",0,0,function(a){return this.localeData().months(this,a)});C("month",
261"M");T.month=8;x("M",M);x("MM",M,ca);x("MMM",function(a,b){return b.monthsShortRegex(a)});x("MMMM",function(a,b){return b.monthsRegex(a)});H(["M","MM"],function(a,b){b[na]=r(a)-1});H(["MMM","MMMM"],function(a,b,c,e){e=c._locale.monthsParse(a,e,c._strict);null!=e?b[na]=e:j(c).invalidMonth=a});var Ob=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/;B("Y",0,0,function(){var a=this.year();return 9999>=a?""+a:"+"+a});B(0,["YY",2],0,function(){return this.year()%100});B(0,["YYYY",4],0,"year");B(0,["YYYYY",5],0,"year");
262B(0,["YYYYYY",6,!0],0,"year");C("year","y");T.year=1;x("Y",Va);x("YY",M,ca);x("YYYY",ob,nb);x("YYYYY",Ua,Sa);x("YYYYYY",Ua,Sa);H(["YYYYY","YYYYYY"],ha);H("YYYY",function(b,c){c[ha]=2===b.length?a.parseTwoDigitYear(b):r(b)});H("YY",function(b,c){c[ha]=a.parseTwoDigitYear(b)});H("Y",function(a,b){b[ha]=parseInt(a,10)});a.parseTwoDigitYear=function(a){return r(a)+(68<r(a)?1900:2E3)};var Pb=P("FullYear",!0);B("w",["ww",2],"wo","week");B("W",["WW",2],"Wo","isoWeek");C("week","w");C("isoWeek","W");T.week=
2635;T.isoWeek=5;x("w",M);x("ww",M,ca);x("W",M);x("WW",M,ca);aa(["w","ww","W","WW"],function(a,b,c,e){b[e.substr(0,1)]=r(a)});B("d",0,"do","day");B("dd",0,0,function(a){return this.localeData().weekdaysMin(this,a)});B("ddd",0,0,function(a){return this.localeData().weekdaysShort(this,a)});B("dddd",0,0,function(a){return this.localeData().weekdays(this,a)});B("e",0,0,"weekday");B("E",0,0,"isoWeekday");C("day","d");C("weekday","e");C("isoWeekday","E");T.day=11;T.weekday=11;T.isoWeekday=11;x("d",M);x("e",
264M);x("E",M);x("dd",function(a,b){return b.weekdaysMinRegex(a)});x("ddd",function(a,b){return b.weekdaysShortRegex(a)});x("dddd",function(a,b){return b.weekdaysRegex(a)});aa(["dd","ddd","dddd"],function(a,b,c,e){e=c._locale.weekdaysParse(a,e,c._strict);null!=e?b.d=e:j(c).invalidWeekday=a});aa(["d","e","E"],function(a,b,c,e){b[e]=r(a)});B("H",["HH",2],0,"hour");B("h",["hh",2],0,Da);B("k",["kk",2],0,function(){return this.hours()||24});B("hmm",0,0,function(){return""+Da.apply(this)+N(this.minutes(),
2652)});B("hmmss",0,0,function(){return""+Da.apply(this)+N(this.minutes(),2)+N(this.seconds(),2)});B("Hmm",0,0,function(){return""+this.hours()+N(this.minutes(),2)}
265);B("Hmmss",0,0,function(){return""+this.hours()+N(this.minutes(),2)+N(this.seconds(),2)});K("a",!0);K("A",!1);C("hour","h");T.hour=13;x("a",tb);x("A",tb);x("H",M);x("h",M);x("HH",M,ca);x("hh",M,ca);x("hmm",Mb);x("hmmss",Nb);x("Hmm",Mb);x("Hmmss",Nb);H(["H","HH"],R);H(["a","A"],function(a,b,c){c._isPm=c._locale.isPM(a);c._meridiem=a});H(["h",
266"hh"],function(a,b,c){b[R]=r(a);j(c).bigHour=!0});H("hmm",function(a,b,c){var e=a.length-2;b[R]=r(a.substr(0,e));b[ia]=r(a.substr(e));j(c).bigHour=!0});H("hmmss",function(a,b,c){var e=a.length-4,d=a.length-2;b[R]=r(a.substr(0,e));b[ia]=r(a.substr(e,2));b[oa]=r(a.substr(d));j(c).bigHour=!0});H("Hmm",function(a,b){var c=a.length-2;b[R]=r(a.substr(0,c));b[ia]=r(a.substr(c))});H("Hmmss",function(a,b){var c=a.length-4,e=a.length-2;b[R]=r(a.substr(0,c));b[ia]=r(a.substr(c,2));b[oa]=r(a.substr(e))});var jc=
267P("Hours",!0),vb={calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},longDateFormat:{LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},invalidDate:"Invalid date",ordinal:"%d",ordinalParse:/\d{1,2}/,relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",
268dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},months:"January February March April May June July August September October November December".split(" "),monthsShort:"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),week:{dow:0,doy:6},weekdays:"Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),weekdaysMin:"Su Mo Tu We Th Fr Sa".split(" "),weekdaysShort:"Sun Mon Tue Wed Thu Fri Sat".split(" "),meridiemParse:/[ap]\.?m?\.?/i},O={},Ia={},Ma,Vb=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,
269Wb=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Xb=/Z|[+-]\d\d(?::?\d\d)?/,Na=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/]],db=
270[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],Zb=/^\/?Date\((\-?\d+)/i;a.createFromInputFallback=u("value provided is not in a recognized ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non ISO date formats are discouraged and will be removed in an upcoming major release. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",
271function(a){a._d=new Date(a._i+(a._useUTC?" UTC":""))});a.ISO_8601=function(){};var kc=u("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var a=L.apply(null,arguments);return this.isValid()&&a.isValid()?a<this?this:a:l()}),lc=u("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var a=L.apply(null,arguments);return this.isValid()&&a.isValid()?a>this?this:a:l()});zb("Z",":");zb("ZZ",
272"");x("Z",Wa);x("ZZ",Wa);H(["Z","ZZ"],function(a,b,c){c._useUTC=!0;c._tzm=ib(Wa,a)});var bc=/([\+\-]|\d\d)/gi;a.updateOffset=function(){};var cc=/^(\-)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)(\.\d*)?)?$/,dc=/^(-)?P(?:(-?[0-9,.]*)Y)?(?:(-?[0-9,.]*)M)?(?:(-?[0-9,.]*)W)?(?:(-?[0-9,.]*)D)?(?:T(?:(-?[0-9,.]*)H)?(?:(-?[0-9,.]*)M)?(?:(-?[0-9,.]*)S)?)?$/;ua.fn=Oa.prototype;var mc=Cb(1,"add"),nc=Cb(-1,"subtract");a.defaultFormat="YYYY-MM-DDTHH:mm:ssZ";a.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var Qb=u("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",
273function(a){return void 0===a?this.localeData():this.locale(a)});B(0,["gg",2],0,function(){return this.weekYear()%100});B(0,["GG",2],0,function(){return this.isoWeekYear()%100});Pa("gggg","weekYear");Pa("ggggg","weekYear");Pa("GGGG","isoWeekYear");Pa("GGGGG","isoWeekYear");C("weekYear","gg");C("isoWeekYear","GG");T.weekYear=1;T.isoWeekYear=1;x("G",Va);x("g",Va);x("GG",M,ca);x("gg",M,ca);x("GGGG",ob,nb);x("gggg",ob,nb);x("GGGGG",Ua,Sa);x("ggggg",Ua,Sa);aa(["gggg","ggggg","GGGG","GGGGG"],function(a,
274b,c,e){b[e.substr(0,2)]=r(a)});aa(["gg","GG"],function(b,c,e,d){c[d]=a.parseTwoDigitYear(b)});B("Q",0,"Qo","quarter");C("quarter","Q");T.quarter=7;x("Q",Kb);H("Q",function(a,b){b[na]=3*(r(a)-1)});B("D",["DD",2],"Do","date");C("date","D");T.date=9;x("D",M);x("DD",M,ca);x("Do",function(a,b){return a?b._ordinalParse:b._ordinalParseLenient});H(["D","DD"],ka);H("Do",function(a,b){b[ka]=r(a.match(M)[0],10)});var Rb=P("Date",!0);B("DDD",["DDDD",3],"DDDo","dayOfYear");C("dayOfYear","DDD");T.dayOfYear=4;x("DDD",
275Ta);x("DDDD",Lb);H(["DDD","DDDD"],function(a,b,c){c._dayOfYear=r(a)});B("m",["mm",2],0,"minute");C("minute","m");T.minute=14;x("m",M);x("mm",M,ca);H(["m","mm"],ia);var oc=P("Minutes",!1);B("s",["ss",2],0,"second");C("second","s");T.second=15;x("s",M);x("ss",M,ca);H(["s","ss"],oa);var pc=P("Seconds",!1);B("S",0,0,function(){return~~(this.millisecond()/100)});B(0,["SS",2],0,function(){return~~(this.millisecond()/10)});B(0,["SSS",3],0,"millisecond");B(0,["SSSS",4],0,function(){return 10*this.millisecond()});
276B(0,["SSSSS",5],0,function(){return 100*this.millisecond()});B(0,["SSSSSS",6],0,function(){return 1E3*this.millisecond()});B(0,["SSSSSSS",7],0,function(){return 1E4*this.millisecond()});B(0,["SSSSSSSS",8],0,function(){return 1E5*this.millisecond()});B(0,["SSSSSSSSS",9],0,function(){return 1E6*this.millisecond()});C("millisecond","ms");T.millisecond=16;x("S",Ta,Kb);x("SS",Ta,ca);x("SSS",Ta,Lb);var la;for(la="SSSS";9>=la.length;la+="S")x(la,hc);for(la="S";9>=la.length;la+="S")H(la,ec);var qc=P("Milliseconds",
277!1);B("z",0,0,"zoneAbbr");B("zz",0,0,"zoneName");var y=o.prototype;y.add=mc;y.calendar=function(b,c){var e=b||L(),d=jb(e,this).startOf("day"),d=a.calendarFormat(this,d)||"sameElse";return this.format(c&&(z(c[d])?c[d].call(this,e):c[d])||this.localeData().calendar(d,this,L(e)))};y.clone=function(){return new o(this)};y.diff=function(a,b,c){var e;if(!this.isValid())return NaN;a=jb(a,this);if(!a.isValid())return NaN;e=6E4*(a.utcOffset()-this.utcOffset());b=I(b);if("year"===b||"month"===b||"quarter"===
278b){e=12*(a.year()-this.year())+(a.month()-this.month());var d=this.clone().add(e,"months"),f;0>a-d?(f=this.clone().add(e-1,"months"),a=(a-d)/(d-f)):(f=this.clone().add(e+1,"months"),a=(a-d)/(f-d));a=-(e+a)||0;"quarter"===b?a/=3:"year"===b&&(a/=12)}else a=this-a,a="second"===b?a/1E3:"minute"===b?a/6E4:"hour"===b?a/36E5:"day"===b?(a-e)/864E5:"week"===b?(a-e)/6048E5:a;return c?a:s(a)};y.endOf=function(a){a=I(a);if(void 0===a||"millisecond"===a)return this;"date"===a&&(a="day");return this.startOf(a).add(1,
279"isoWeek"===a?"week":a).subtract(1,"ms")};y.format=function(b){b||(b=this.isUtc()?a.defaultFormatUtc:a.defaultFormat);b=Y(this,b);return this.localeData().postformat(b)};y.from=function(a,b){return this.isValid()&&(q(a)&&a.isValid()||L(a).isValid())?ua({to:this,from:a}).locale(this.locale()).humanize(!b):this.localeData().invalidDate()};y.fromNow=function(a){return this.from(L(),a)};y.to=function(a,b){return this.isValid()&&(q(a)&&a.isValid()||L(a).isValid())?ua({from:this,to:a}).locale(this.locale()).humanize(!b):
280this.localeData().invalidDate()};y.toNow=function(a){return this.to(L(),a)};y.get=function(a){a=I(a);return z(this[a])?this[a]():this};y.invalidAt=function(){return j(this).overflow};y.isAfter=function(a,b){var c=q(a)?a:L(a);if(!this.isValid()||!c.isValid())return!1;b=I(!n(b)?b:"millisecond");return"millisecond"===b?this.valueOf()>c.valueOf():c.valueOf()<this.clone().startOf(b).valueOf()};y.isBefore=function(a,b){var c=q(a)?a:L(a);if(!this.isValid()||!c.isValid())return!1;b=I(!n(b)?b:"millisecond");
281return"millisecond"===b?this.valueOf()<c.valueOf():this.clone().endOf(b).valueOf()<c.valueOf()};y.isBetween=function(a,b,c,e){e=e||"()";return("("===e[0]?this.isAfter(a,c):!this.isBefore(a,c))&&(")"===e[1]?this.isBefore(b,c):!this.isAfter(b,c))};y.isSame=function(a,b){var c=q(a)?a:L(a);if(!this.isValid()||!c.isValid())return!1;b=I(b||"millisecond");if("millisecond"===b)return this.valueOf()===c.valueOf();c=c.valueOf();return this.clone().startOf(b).valueOf()<=c&&c<=this.clone().endOf(b).valueOf()};
282y.isSameOrAfter=function(a,b){return this.isSame(a,b)||this.isAfter(a,b)};y.isSameOrBefore=function(a,b){return this.isSame(a,b)||this.isBefore(a,b)};y.isValid=function(){return k(this)};y.lang=Qb;y.locale=Eb;y.localeData=Fb;y.max=lc;y.min=kc;y.parsingFlags=function(){return h({},j(this))};
282y.set=function(a,b){if("object"===typeof a)for(var a=S(a),c=da(a),e=0;e<c.length;e++)this[c[e].unit](a[c[e].unit]);else if(a=I(a),z(this[a]))return this[a](b);return this};y.startOf=function(a){a=I(a);switch(a){case "year":this.month(0);
283case "quarter":case "month":this.date(1);case "week":case "isoWeek":case "day":case "date":this.hours(0);case "hour":this.minutes(0);case "minute":this.seconds(0);case "second":this.milliseconds(0)}"week"===a&&this.weekday(0);"isoWeek"===a&&this.isoWeekday(1);"quarter"===a&&this.month(3*Math.floor(this.month()/3));return this};y.subtract=nc;y.toArray=function(){return[this.year(),this.month(),this.date(),this.hour(),this.minute(),this.second(),this.millisecond()]};y.toObject=function(){return{years:this.year(),
284months:this.month(),date:this.date(),hours:this.hours(),minutes:this.minutes(),seconds:this.seconds(),milliseconds:this.milliseconds()}};y.toDate=function(){return new Date(this.valueOf())};y.toISOString=function(){var a=this.clone().utc();return 0<a.year()&&9999>=a.year()?z(Date.prototype.toISOString)?this.toDate().toISOString():Y(a,"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]"):Y(a,"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]")};y.inspect=function(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var a="moment",
285b="";this.isLocal()||(a=0===this.utcOffset()?"moment.utc":"moment.parseZone",b="Z");var a="["+a+'("]',c=0<this.year()&&9999>=this.year()?"YYYY":"YYYYYY";return this.format(a+c+"-MM-DD[T]HH:mm:ss.SSS"+(b+'[")]'))};y.toJSON=function(){return this.isValid()?this.toISOString():null};y.toString=function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")};y.unix=function(){return Math.floor(this.valueOf()/1E3)};y.valueOf=function(){return this._d.valueOf()-6E4*(this._offset||
2860)};y.creationData=function(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}};y.year=Pb;y.isLeapYear=function(){return m(this.year())};y.weekYear=function(a){return Gb.call(this,a,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)};y.isoWeekYear=function(a){return Gb.call(this,a,this.isoWeek(),this.isoWeekday(),1,4)};y.quarter=y.quarters=function(a){return null==a?Math.ceil((this.month()+1)/3):this.month(3*(a-1)+this.month()%
2873)};y.month=fa;y.daysInMonth=function(){return ea(this.year(),this.month())};y.week=y.weeks=function(a){var b=this.localeData().week(this);return null==a?b:this.add(7*(a-b),"d")};y.isoWeek=y.isoWeeks=function(a){var b=ra(this,1,4).week;return null==a?b:this.add(7*(a-b),"d")};y.weeksInYear=function(){var a=this.localeData()._week;return ja(this.year(),a.dow,a.doy)};y.isoWeeksInYear=function(){return ja(this.year(),1,4)};y.date=Rb;y.day=y.days=function(a){if(!this.isValid())return null!=a?this:NaN;
288var b=this._isUTC?this._d.getUTCDay():this._d.getDay();if(null!=a){var c=this.localeData();"string"===typeof a&&(isNaN(a)?(a=c.weekdaysParse(a),a="number"===typeof a?a:null):a=parseInt(a,10));return this.add(a-b,"d")}return b};y.weekday=function(a){if(!this.isValid())return null!=a?this:NaN;var b=(this.day()+7-this.localeData()._week.dow)%7;return null==a?b:this.add(a-b,"d")};y.isoWeekday=function(a){if(!this.isValid())return null!=a?this:NaN;if(null!=a){var b=this.localeData(),a="string"===typeof a?
289b.weekdaysParse(a)%7||7:isNaN(a)?null:a;return this.day(this.day()%7?a:a-7)}return this.day()||7};y.dayOfYear=function(a){var b=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864E5)+1;return null==a?b:this.add(a-b,"d")};y.hour=y.hours=jc;y.minute=y.minutes=oc;y.second=y.seconds=pc;y.millisecond=y.milliseconds=qc;y.utcOffset=function(b,c){var e=this._offset||0,d;if(!this.isValid())return null!=b?this:NaN;if(null!=b){if("string"===typeof b){if(b=ib(Wa,b),null===b)return this}else 16>
290Math.abs(b)&&(b*=60);!this._isUTC&&c&&(d=kb(this));this._offset=b;this._isUTC=!0;null!=d&&this.add(d,"m");e!==b&&(!c||this._changeInProgress?Db(this,ua(b-e,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,a.updateOffset(this,!0),this._changeInProgress=null));return this}return this._isUTC?e:kb(this)};y.utc=function(a){return this.utcOffset(0,a)};y.local=function(a){this._isUTC&&(this.utcOffset(0,a),this._isUTC=!1,a&&this.subtract(kb(this),"m"));return this};y.parseZone=function(){if(null!=
291this._tzm)this.utcOffset(this._tzm);else if("string"===typeof this._i){var a=ib(ic,this._i);
291null!=a?this.utcOffset(a):this.utcOffset(0,!0)}return this};y.hasAlignedHourOffset=function(a){if(!this.isValid())return!1;a=a?L(a).utcOffset():0;return 0===(this.utcOffset()-a)%60};y.isDST=function(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()};y.isLocal=function(){return this.isValid()?!this._isUTC:!1};y.isUtcOffset=function(){return this.isValid()?
292this._isUTC:!1};y.isUtc=Ab;y.isUTC=Ab;y.zoneAbbr=function(){return this._isUTC?"UTC":""};y.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""};y.dates=u("dates accessor is deprecated. Use date instead.",Rb);y.months=u("months accessor is deprecated. Use month instead",fa);y.years=u("years accessor is deprecated. Use year instead",Pb);y.zone=u("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",function(a,b){return null!=a?
293("string"!==typeof a&&(a=-a),this.utcOffset(a,b),this):-this.utcOffset()});y.isDSTShifted=u("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",function(){if(!n(this._isDSTShifted))return this._isDSTShifted;var a={};p(a,this);a=xb(a);if(a._a){var b=a._isUTC?i(a._a):L(a._a);this._isDSTShifted=this.isValid()&&0<t(a._a,b.toArray())}else this._isDSTShifted=!1;return this._isDSTShifted});var J=D.prototype;J.calendar=function(a,b,c){a=this._calendar[a]||
294this._calendar.sameElse;return z(a)?a.call(b,c):a};J.longDateFormat=function(a){var b=this._longDateFormat[a],c=this._longDateFormat[a.toUpperCase()];if(b||!c)return b;this._longDateFormat[a]=c.replace(/MMMM|MM|DD|dddd/g,function(a){return a.slice(1)});return this._longDateFormat[a]};J.invalidDate=function(){return this._invalidDate};J.ordinal=function(a){return this._ordinal.replace("%d",a)};J.preparse=Hb;J.postformat=Hb;J.relativeTime=function(a,b,c,e){var d=this._relativeTime[c];return z(d)?d(a,
295b,c,e):d.replace(/%d/i,a)};J.pastFuture=function(a,b){var c=this._relativeTime[0<a?"future":"past"];return z(c)?c(b):c.replace(/%s/i,b)};J.set=function(a){var b,c;for(c in a)b=a[c],z(b)?this[c]=b:this["_"+c]=b;this._config=a;this._ordinalParseLenient=RegExp(this._ordinalParse.source+"|"+/\d{1,2}/.source)};J.months=function(a,c){return!a?this._months:b(this._months)?this._months[a.month()]:this._months[(this._months.isFormat||Ob).test(c)?"format":"standalone"][a.month()]};J.monthsShort=function(a,
296c){return!a?this._monthsShort:b(this._monthsShort)?this._monthsShort[a.month()]:this._monthsShort[Ob.test(c)?"format":"standalone"][a.month()]};J.monthsParse=function(a,b,c){var e,d;if(this._monthsParseExact){a:{a=a.toLocaleLowerCase();if(!this._monthsParse){this._monthsParse=[];this._longMonthsParse=[];this._shortMonthsParse=[];for(e=0;12>e;++e)d=i([2E3,e]),this._shortMonthsParse[e]=this.monthsShort(d,"").toLocaleLowerCase(),this._longMonthsParse[e]=this.months(d,"").toLocaleLowerCase()}if(c)b="MMM"===
297b?Q.call(this._shortMonthsParse,a):Q.call(this._longMonthsParse,a);else if("MMM"===b){b=Q.call(this._shortMonthsParse,a);if(-1!==b)break a;b=Q.call(this._longMonthsParse,a)}else{b=Q.call(this._longMonthsParse,a);if(-1!==b)break a;b=Q.call(this._shortMonthsParse,a)}b=-1!==b?b:null}return b}this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]);for(e=0;12>e;e++)if(d=i([2E3,e]),c&&!this._longMonthsParse[e]&&(this._longMonthsParse[e]=RegExp("^"+this.months(d,"").replace(".",
298"")+"$","i"),this._shortMonthsParse[e]=RegExp("^"+this.monthsShort(d,"").replace(".","")+"$","i")),!c&&!this._monthsParse[e]&&(d="^"+this.months(d,"")+"|^"+this.monthsShort(d,""),this._monthsParse[e]=RegExp(d.replace(".",""),"i")),c&&"MMMM"===b&&this._longMonthsParse[e].test(a)||c&&"MMM"===b&&this._shortMonthsParse[e].test(a)||!c&&this._monthsParse[e].test(a))return e};J.monthsRegex=function(a){if(this._monthsParseExact)return g(this,"_monthsRegex")||qa.call(this),a?this._monthsStrictRegex:this._monthsRegex;
299g(this,"_monthsRegex")||(this._monthsRegex=Ja);return this._monthsStrictRegex&&a?this._monthsStrictRegex:this._monthsRegex};
299J.monthsShortRegex=function(a){if(this._monthsParseExact)return g(this,"_monthsRegex")||qa.call(this),a?this._monthsShortStrictRegex:this._monthsShortRegex;g(this,"_monthsShortRegex")||(this._monthsShortRegex=Ja);return this._monthsShortStrictRegex&&a?this._monthsShortStrictRegex:this._monthsShortRegex};J.week=function(a){return ra(a,this._week.dow,this._week.doy).week};J.firstDayOfYear=
300function(){return this._week.doy};J.firstDayOfWeek=function(){return this._week.dow};J.weekdays=function(a,c){return!a?this._weekdays:b(this._weekdays)?this._weekdays[a.day()]:this._weekdays[this._weekdays.isFormat.test(c)?"format":"standalone"][a.day()]};J.weekdaysMin=function(a){return a?this._weekdaysMin[a.day()]:this._weekdaysMin};J.weekdaysShort=function(a){return a?this._weekdaysShort[a.day()]:this._weekdaysShort};J.weekdaysParse=function(a,b,c){var e,d;if(this._weekdaysParseExact)return La.call(this,
301a,b,c);this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]);for(e=0;7>e;e++)if(d=i([2E3,1]).day(e),c&&!this._fullWeekdaysParse[e]&&(this._fullWeekdaysParse[e]=RegExp("^"+this.weekdays(d,"").replace(".",".?")+"$","i"),this._shortWeekdaysParse[e]=RegExp("^"+this.weekdaysShort(d,"").replace(".",".?")+"$","i"),this._minWeekdaysParse[e]=RegExp("^"+this.weekdaysMin(d,"").replace(".",".?")+"$","i")),this._weekdaysParse[e]||(d="^"+
302this.weekdays(d,"")+"|^"+this.weekdaysShort(d,"")+"|^"+this.weekdaysMin(d,""),this._weekdaysParse[e]=RegExp(d.replace(".",""),"i")),c&&"dddd"===b&&this._fullWeekdaysParse[e].test(a)||c&&"ddd"===b&&this._shortWeekdaysParse[e].test(a)||c&&"dd"===b&&this._minWeekdaysParse[e].test(a)||!c&&this._weekdaysParse[e].test(a))return e};J.weekdaysRegex=function(a){if(this._weekdaysParseExact)return g(this,"_weekdaysRegex")||sa.call(this),a?this._weekdaysStrictRegex:this._weekdaysRegex;g(this,"_weekdaysRegex")||
303(this._weekdaysRegex=Ja);return this._weekdaysStrictRegex&&a?this._weekdaysStrictRegex:this._weekdaysRegex};J.weekdaysShortRegex=function(a){if(this._weekdaysParseExact)return g(this,"_weekdaysRegex")||sa.call(this),a?this._weekdaysShortStrictRegex:this._weekdaysShortRegex;g(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=Ja);return this._weekdaysShortStrictRegex&&a?this._weekdaysShortStrictRegex:this._weekdaysShortRegex};J.weekdaysMinRegex=function(a){if(this._weekdaysParseExact)return g(this,
304"_weekdaysRegex")||sa.call(this),a?this._weekdaysMinStrictRegex:this._weekdaysMinRegex;g(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=Ja);return this._weekdaysMinStrictRegex&&a?this._weekdaysMinStrictRegex:this._weekdaysMinRegex};J.isPM=function(a){return"p"===(a+"").toLowerCase().charAt(0)};J.meridiem=function(a,b,c){return 11<a?c?"pm":"PM":c?"am":"AM"};Ea("en",{ordinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(a){var b=a%10,b=1===r(a%100/10)?"th":1===b?"st":2===b?"nd":3===b?"rd":"th";return a+
305b}});a.lang=u("moment.lang is deprecated. Use moment.locale instead.",Ea);a.langData=u("moment.langData is deprecated. Use moment.localeData instead.",ta);var pa=Math.abs,rc=va("ms"),sc=va("s"),tc=va("m"),uc=va("h"),vc=va("d"),wc=va("w"),xc=va("M"),yc=va("y"),zc=Ba("milliseconds"),Ac=Ba("seconds"),Bc=Ba("minutes"),Cc=Ba("hours"),Dc=Ba("days"),Ec=Ba("months"),Fc=Ba("years"),wa=Math.round,xa={s:45,m:45,h:22,d:26,M:11},mb=Math.abs,G=Oa.prototype;G.abs=function(){var a=this._data;this._milliseconds=pa(this._milliseconds);
306this._days=pa(this._days);this._months=pa(this._months);a.milliseconds=pa(a.milliseconds);a.seconds=pa(a.seconds);a.minutes=pa(a.minutes);a.hours=pa(a.hours);a.months=pa(a.months);a.years=pa(a.years);return this};G.add=function(a,b){return Jb(this,a,b,1)};G.subtract=function(a,b){return Jb(this,a,b,-1)};G.as=function(a){var b,c=this._milliseconds,a=I(a);if("month"===a||"year"===a)return b=this._days+c/864E5,b=this._months+4800*b/146097,"month"===a?b:b/12;b=this._days+Math.round(146097*this._months/
3074800);switch(a){case "week":return b/7+c/6048E5;case "day":return b+c/864E5;case "hour":return 24*b+c/36E5;case "minute":return 1440*b+c/6E4;case "second":return 86400*b+c/1E3;case "millisecond":return Math.floor(864E5*b)+c;default:throw Error("Unknown unit "+a);}};G.asMilliseconds=rc;G.asSeconds=sc;G.asMinutes=tc;G.asHours=uc;G.asDays=vc;G.asWeeks=wc;G.asMonths=xc;G.asYears=yc;G.valueOf=function(){return this._milliseconds+864E5*this._days+2592E6*(this._months%12)+31536E6*r(this._months/12)};G._bubble=
308function(){var a=this._milliseconds,b=this._days,c=this._months,e=this._data;0<=a&&0<=b&&0<=c||0>=a&&0>=b&&0>=c||(a+=864E5*(0>146097*c/4800+b?Math.floor(146097*c/4800+b):Math.ceil(146097*c/4800+b)),c=b=0);e.milliseconds=a%1E3;a=s(a/1E3);e.seconds=a%60;a=s(a/60);e.minutes=a%60;a=s(a/60);e.hours=a%24;b+=s(a/24);
308a=s(4800*b/146097);c+=a;b-=0>146097*a/4800?Math.floor(146097*a/4800):Math.ceil(146097*a/4800);a=s(c/12);e.days=b;e.months=c%12;e.years=a;return this};G.get=function(a){a=I(a);return this[a+"s"]()};
309G.milliseconds=zc;G.seconds=Ac;G.minutes=Bc;G.hours=Cc;G.days=Dc;G.weeks=function(){return s(this.days()/7)};G.months=Ec;G.years=Fc;G.humanize=function(a){var b=this.localeData(),c;c=!a;var e=ua(this).abs(),d=wa(e.as("s")),f=wa(e.as("m")),g=wa(e.as("h")),h=wa(e.as("d")),i=wa(e.as("M")),e=wa(e.as("y")),d=d<xa.s&&["s",d]||1>=f&&["m"]||f<xa.m&&["mm",f]||1>=g&&["h"]||g<xa.h&&["hh",g]||1>=h&&["d"]||h<xa.d&&["dd",h]||1>=i&&["M"]||i<xa.M&&["MM",i]||1>=e&&["y"]||["yy",e];d[2]=c;d[3]=0<+this;d[4]=b;c=fc.apply(null,
310d);a&&(c=b.pastFuture(+this,c));return b.postformat(c)};G.toISOString=Ra;G.toString=Ra;G.toJSON=Ra;G.locale=Eb;G.localeData=Fb;G.toIsoString=u("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Ra);G.lang=Qb;B("X",0,0,"unix");B("x",0,0,"valueOf");x("x",Va);x("X",/[+-]?\d+(\.\d{1,3})?/);H("X",function(a,b,c){c._d=new Date(1E3*parseFloat(a,10))});H("x",function(a,b,c){c._d=new Date(r(a))});a.version="2.16.0";pb=L;a.fn=y;a.min=function(){var a=[].slice.call(arguments,
3110);return yb("isBefore",a)};a.max=function(){var a=[].slice.call(arguments,0);return yb("isAfter",a)};a.now=function(){return Date.now?Date.now():+new Date};a.utc=i;a.unix=function(a){return L(1E3*a)};a.months=function(a,b){return Ib(a,b,"months")};a.isDate=f;a.locale=Ea;a.invalid=l;a.duration=ua;a.isMoment=q;a.weekdays=function(a,b,c){return lb(a,b,c,"weekdays")};a.parseZone=function(){return L.apply(null,arguments).parseZone()};a.localeData=ta;a.isDuration=gb;a.monthsShort=function(a,b){return Ib(a,
312b,"monthsShort")};a.weekdaysMin=function(a,b,c){return lb(a,b,c,"weekdaysMin")};a.defineLocale=bb;a.updateLocale=function(a,b){if(null!=b){var c;c=vb;null!=O[a]&&(c=O[a]._config);b=A(c,b);c=new D(b);c.parentLocale=O[a];O[a]=c;Ea(a)}else null!=O[a]&&(null!=O[a].parentLocale?O[a]=O[a].parentLocale:null!=O[a]&&delete O[a]);return O[a]};a.locales=function(){return gc(O)};a.weekdaysShort=function(a,b,c){return lb(a,b,c,"weekdaysShort")};a.normalizeUnits=I;a.relativeTimeRounding=function(a){return void 0===
313a?wa:"function"===typeof a?(wa=a,!0):!1};a.relativeTimeThreshold=function(a,b){if(void 0===xa[a])return!1;if(void 0===b)return xa[a];xa[a]=b;return!0};a.calendarFormat=function(a,b){var c=a.diff(b,"days",!0);return-6>c?"sameElse":-1>c?"lastWeek":0>c?"lastDay":1>c?"sameDay":2>c?"nextDay":7>c?"nextWeek":"sameElse"};a.prototype=y;return a});
314(function(a,b){function c(a,c,e){var g=e.baseHref(),h=a[0];return function(a,e,d){var l,n,d=d||{};n=d.expires;l=b.isDefined(d.path)?d.path:g;b.isUndefined(e)&&(n="Thu, 01 Jan 1970 00:00:00 GMT",e="");b.isString(n)&&(n=new Date(n));e=encodeURIComponent(a)+"="+encodeURIComponent(e);e=e+(l?";path="+l:"")+(d.domain?";domain="+d.domain:"");e+=n?";expires="+n.toUTCString():"";e+=d.secure?";secure":"";d=e.length+1;4096<d&&c.warn("Cookie '"+a+"' possibly not set or overflowed because it was too large ("+
315d+" > 4096 bytes)!");h.cookie=e}}b.module("ngCookies",["ng"]).provider("$cookies",[function(){var a=this.defaults={};this.$get=["$$cookieReader","$$cookieWriter",function(c,e){return{get:function(a){return c()[a]},getObject:function(a){return(a=this.get(a))?b.fromJson(a):a},getAll:function(){return c()},put:function(c,f,i){e(c,f,i?b.extend({},a,i):a)},putObject:function(a,c,e){this.put(a,b.toJson(c),e)},remove:function(c,f){e(c,void 0,f?b.extend({},a,f):a)}}}]}]);b.module("ngCookies").factory("$cookieStore",
316["$cookies",function(a){return{get:function(b){return a.getObject(b)},put:function(b,c){a.putObject(b,c)},remove:function(b){a.remove(b)}}}]);c.$inject=["$document","$log","$browser"];b.module("ngCookies").provider("$$cookieWriter",function(){this.$get=c})})(window,window.angular);!function(a){a.module("vcRecaptcha",[])}(angular);
317(function(a){a.module("vcRecaptcha").provider("vcRecaptchaService",function(){var b=this,c={};b.onLoadFunctionName="vcRecaptchaApiLoaded";b.setDefaults=function(b){a.copy(b,c)};b.setSiteKey=function(a){c.key=a};b.setTheme=function(a){c.theme=a};b.setStoken=function(a){c.stoken=a};b.setSize=function(a){c.size=a};b.setType=function(a){c.type=a};b.setLang=function(a){c.lang=a};b.setBadge=function(a){c.badge=a};b.setOnLoadFunctionName=function(a){b.onLoadFunctionName=a};
317b.$get=["$rootScope","$window",
318"$q","$document","$interval",function(d,f,e,g,h){function i(){if(!j)throw Error("reCaptcha has not been loaded yet.");}var j,k=e.defer(),l=k.promise,n={};f.vcRecaptchaApiLoadedCallback=f.vcRecaptchaApiLoadedCallback||[];var p=function(){j=f.grecaptcha;k.resolve(j)};if(f.vcRecaptchaApiLoadedCallback.push(p),f[b.onLoadFunctionName]=function(){f.vcRecaptchaApiLoadedCallback.forEach(function(a){a()})},a.isDefined(f.grecaptcha))p();else if(f.document.querySelector('script[src^="https://www.google.com/recaptcha/api.js"]'))var o=
319h(function(){a.isDefined(f.grecaptcha)&&(h.cancel(o),p())},25);else{var q=f.document.createElement("script");q.async=!0;q.defer=!0;q.src="https://www.google.com/recaptcha/api.js?onload="+b.onLoadFunctionName+"&render=explicit";g.find("body")[0].appendChild(q)}return{create:function(a,b){b.sitekey=b.key||c.key;b.theme=b.theme||c.theme;b.stoken=b.stoken||c.stoken;b.size=b.size||c.size;b.type=b.type||c.type;b.hl=b.lang||c.lang;b.badge=b.badge||c.badge;if(!(b.sitekey&&40===b.sitekey.length))throw Error('You need to set the "key" attribute to your public reCaptcha key. If you don\'t have a key, please get one from https://www.google.com/recaptcha/admin/create');
320return(j?e.when(j):l).then(function(c){c=c.render(a,b);return n[c]=a,c})},reload:function(a){i();j.reset(a);d.$broadcast("reCaptchaReset",a)},execute:function(a){i();j.execute(a)},useLang:function(a,b){var c=n[a];if(!c)throw Error("reCaptcha Widget ID not exists",a);c=c.querySelector("iframe");if(!b)return c&&c.src&&/[?&]hl=\w+/.test(c.src)?c.src.replace(/.+[?&]hl=(\w+)([^\w].+)?/,"$1"):null;if(c&&c.src){var e=c.src;/[?&]hl=/.test(e)?e=e.replace(/([?&]hl=)\w+/,"$1"+b):e+=(-1===e.indexOf("?")?"?":
321"&")+"hl="+b;c.src=e}}
321,getResponse:function(a){return i(),j.getResponse(a)},getInstance:function(a){return n[a]},destroy:function(a){delete n[a]}}}]})})(angular);
322(function(a){a.module("vcRecaptcha").directive("vcRecaptcha",["$document","$timeout","vcRecaptchaService",function(b,c,d){return{restrict:"A",require:"?^^form",scope:{response:"=?ngModel",key:"=?",stoken:"=?",theme:"=?",size:"=?",type:"=?",lang:"=?",badge:"=?",tabindex:"=?",required:"=?",onCreate:"&",onSuccess:"&",onExpire:"&"},link:function(f,e,g,h){function i(){h&&h.$setValidity("recaptcha",null);d.destroy(f.widgetId);a.element(b[0].querySelectorAll(".pls-container")).parent().remove()}function j(){c(function(){f.response=
323"";k();f.onExpire({widgetId:f.widgetId})})}function k(){h&&h.$setValidity("recaptcha",!1===f.required?null:Boolean(f.response))}f.widgetId=null;h&&a.isDefined(g.required)&&f.$watch("required",k);var l=f.$watch("key",function(b){d.create(e[0],{callback:function(a){c(function(){f.response=a;k();f.onSuccess({response:a,widgetId:f.widgetId})})},key:b,stoken:f.stoken||g.stoken||null,theme:f.theme||g.theme||null,type:f.type||g.type||null,lang:f.lang||g.lang||null,tabindex:f.tabindex||g.tabindex||null,size:f.size||
324g.size||null,badge:f.badge||g.badge||null,"expired-callback":j}).then(function(b){k();f.widgetId=b;f.onCreate({widgetId:b});f.$on("$destroy",i);f.$on("reCaptchaReset",function(c,e){(a.isUndefined(e)||b===e)&&(f.response="",k())})});l()})}}}])})(angular);"format amd";
325(function(){function a(a){return angular.isUndefined(a)||null===a}function b(b,d){if("undefined"===typeof d)if("function"===typeof require)try{d=require("moment")}catch(f){throw Error("Please install moment via npm. Please reference to: https://github.com/urish/angular-moment");}else throw Error("Moment cannot be found by angular-moment! Please reference to: https://github.com/urish/angular-moment");b.module("angularMoment",[]).constant("angularMomentConfig",{preprocess:null,timezone:null,format:null,
326statefulFilters:!0}).constant("moment",d).constant("amTimeAgoConfig",{withoutSuffix:!1,serverTime:null,titleFormat:null,fullDateThreshold:null,fullDateFormat:null,fullDateThresholdUnit:"day"}).directive("amTimeAgo",["$window","moment","amMoment","amTimeAgoConfig",function(e,d,f,i){return function(j,k,l){function n(){var a;C?a=C:i.serverTime?(a=(new Date).getTime()-A+i.serverTime,a=d(a)):a=d();return a}function p(){s&&(e.clearTimeout(s),s=null)}function o(a){var b=n().diff(a,z);(b=u&&b>=u)?k.text(a.format(w)):
327k.text(a.from(n(),t));v&&S&&k.attr("title",a.format(v));if(!b){var b=Math.abs(n().diff(a,"minute")),c=3600;1>b?c=1:60>b?c=30:180>b&&(c=300);s=e.setTimeout(function(){o(a)},1E3*c)}}function q(){p();if(r){var a=f.preprocessDate(r);o(a);a=a.toISOString();I&&k.attr("datetime",a)}}var s=null,r,t=i.withoutSuffix,v=i.titleFormat,u=i.fullDateThreshold,w=i.fullDateFormat,z=i.fullDateThresholdUnit,A=(new Date).getTime(),D=l.amTimeAgo,C,I="TIME"===k[0].nodeName.toUpperCase(),S=!k.attr("title");j.$watch(D,function(b){a(b)||
328""===b?(p(),r&&(k.text(""),I&&k.attr("datetime",""),r=null)):(r=b,q())});b.isDefined(l.amFrom)&&j.$watch(l.amFrom,function(b){C=a(b)||""===b?null:d(b);q()});b.isDefined(l.amWithoutSuffix)&&j.$watch(l.amWithoutSuffix,function(a){"boolean"===typeof a?(t=a,q()):t=i.withoutSuffix});l.$observe("amFullDateThreshold",function(a){u=a;q()});l.$observe("amFullDateFormat",function(a){w=a;q()});l.$observe("amFullDateThresholdUnit",function(a){z=a;q()});j.$on("$destroy",function(){p()});j.$on("amMoment:localeChanged",
329function(){q()})}}]).service("amMoment",["moment","$rootScope","$log","angularMomentConfig",function(a,d,f,i){var j=null;this.changeLocale=function(f,h){var i=a.locale(f,h);b.isDefined(f)&&d.$broadcast("amMoment:localeChanged");return i};this.changeTimezone=function(b){a.tz&&a.tz.setDefault?(a.tz.setDefault(b),d.$broadcast("amMoment:timezoneChanged")):f.warn("angular-moment: changeTimezone() works only with moment-timezone.js v0.3.0 or greater.");j=i.timezone=b};this.preprocessDate=function(b){j!==
330i.timezone&&this.changeTimezone(i.timezone);return i.preprocess?i.preprocess(b):!isNaN(parseFloat(b))&&isFinite(b)?a(parseInt(b,10)):a(b)}}]).filter("amParse",["moment",function(a){return function(b,c){return a(b,c)}}]).filter("amFromUnix",["moment",function(a){return function(b){return a.unix(b)}}]).filter("amUtc",["moment",function(a){return function(b){return a.utc(b)}}]).filter("amUtcOffset",["amMoment",function(a){return function(b,c){return a.preprocessDate(b).utcOffset(c)}}]).filter("amLocal",
331["moment",function(a){return function(b){return a.isMoment(b)?b.local():null}}]).filter("amTimezone",["amMoment","angularMomentConfig","$log",function(a,b,c){return function(b,d){var f=a.preprocessDate(b);if(!d)return f;if(f.tz)return f.tz(d);c.warn("angular-moment: named timezone specified but moment.tz() is undefined. Did you forget to include moment-timezone.js ?");return f}}]).filter("amCalendar",["moment","amMoment","angularMomentConfig",function(b,c,d){function f(b,e,d){if(a(b))return"";b=c.preprocessDate(b);
332return b.isValid()?b.calendar(e,d):""}f.$stateful=d.statefulFilters;return f}]).filter("amDifference",["moment","amMoment","angularMomentConfig",function(b,c,d){function f(d,h,i,n){if(a(d))return"";d=c.preprocessDate(d);h=!a(h)?c.preprocessDate(h):b();return!d.isValid()||!h.isValid()?"":d.diff(h,i,n)}f.$stateful=d.statefulFilters;return f}]).filter("amDateFormat",["moment","amMoment","angularMomentConfig",function(b,c,d){function f(b,e){if(a(b))return"";var d=c.preprocessDate(b);return!d.isValid()?
333"":d.format(e)}f.$stateful=d.statefulFilters;return f}]).filter("amDurationFormat",["moment","angularMomentConfig",function(b,c){function d(c,f,g){return a(c)?"":b.duration(c,f).humanize(g)}d.$stateful=c.statefulFilters;return d}]).filter("amTimeAgo",["moment","amMoment","angularMomentConfig",function(b,c,d){function f(d,h,i){var n;if(a(d))return"";d=c.preprocessDate(d);d=b(d);if(!d.isValid())return"";n=b(i);return!a(i)&&n.isValid()?d.from(n,h):d.fromNow(h)}f.$stateful=d.statefulFilters;return f}]).filter("amSubtract",
334["moment","angularMomentConfig",function(b,c){function d(c,f,g){return a(c)?"":b(c).subtract(parseInt(f,10),g)}d.$stateful=c.statefulFilters;return d}]).filter("amAdd",["moment","angularMomentConfig",function(b,c){function d(c,f,g){return a(c)?"":b(c).add(parseInt(f,10),g)}d.$stateful=c.statefulFilters;return d}]).filter("amStartOf",["moment","angularMomentConfig",function(b,c){function d(c,f){return a(c)?"":b(c).startOf(f)}
334d.$stateful=c.statefulFilters;return d}]).filter("amEndOf",["moment","angularMomentConfig",
335function(b,c){function d(c,f){return a(c)?"":b(c).endOf(f)}d.$stateful=c.statefulFilters;return d}]);return"angularMoment"}"function"===typeof define&&define.amd?define(["angular","moment"],b):"undefined"!==typeof module&&module&&module.exports&&"function"===typeof require?module.exports=b(require("angular"),require("moment")):b(angular,("undefined"!==typeof global?global:window).moment)})();
336(function(a){var b=function(b){a("a.nav-link").removeClass("active");b&&a('a.nav-link[href="'+b+'"]').addClass("active")},c=function(c){a(this);"up"==c?a(".sub-navigation").data("active_index",a(".sub-navigation").data("active_index")-1):"down"==c&&a(".sub-navigation").data("active_index",a(".sub-navigation").data("active_index")+1);-1==a(".sub-navigation").data("active_index")?b(null):-1<a(".sub-navigation").data("active_index")&&a(".sub-navigation").data("active_index")<a(".sub-navigation").data("targets").length&&
337(c=a(".sub-navigation").data("targets")[a(".sub-navigation").data("active_index")],b(c))};jQuery.fn.highlightCurrentNavLink=function(b){b=b||{};b.offset=b.offset?b.offset:a(".sub-navigation").height();var f=[];a(this).each(function(b,c){var e=a(c).attr("href");-1!=e.indexOf("#")&&f.push(e)});var e=f.join(",");a(".sub-navigation").data("active_index",-1);a(".sub-navigation").data("targets",f);a(e).waypoint(function(a){c.apply(this,[a])},b)}})(jQuery);
338(function(a){jQuery.fn.print=function(b){var c=a(this),b=void 0!==b?b:{},b=void 0!==b.printAreaClass?b.printAreaClass:null;a("#print-area").addClass(b);a("#print-area .print-body").html(c.html());window.print()};(function(){var b=a('<div id="print-area"><div class="print-logo"><img src="/image/tynker-logo.png" alt="Tynker" /></div><div class="print-body"></div></div>');a("body").append(b)})()})(jQuery);
339(function(a){jQuery.fn.ajaxForm=function(b){var b=b||{},c=b.success;a(this).submit(function(b){b.preventDefault();var b=a(this),f=b.attr("action");a.ajax({type:b.attr("method")||"post",url:f,data:b.serialize(),success:function(b){b.error?(a(".js-message",this).addClass("hidden"),a(".js-error",this).removeClass("hidden"),0<a(".js-error .js-error-text",this).length?a(".js-error .js-error-text",this).html(b.error):a(".js-error",this).html(b.error)):(a(".js-error",this).addClass("hidden"),a(".js-message",
340this).removeClass("hidden"),0<a(".js-message .js-message-text",this).length?a(".js-message .js-message-text",this).html(b.message):a(".js-message",this).html(b.message),a(".js-hidden-on-success",this).hide(),setTimeout(function(){a.modal.close()},750),c&&c.apply(this,arguments))}.bind(this),error:function(b){a(".js-message",this).addClass("hidden");a(".js-error",this).removeClass("hidden");0<a(".js-error .js-error-text",this).length?a(".js-error .js-error-text",this).html(b.error):a(".js-error",this).html(b.error)}.bind(this)});
341return!1});return this}})(jQuery);
342(function(a){jQuery.fn.avatar=function(b){b=b||{};b.previewType=void 0!==b.previewType?b.previewType:"head";a(this).each(function(c,d){var f=a(d),e=f.attr("user-id"),g=f.find("img");a.ajax({url:"/api/getuseravatar",data:{id:e},success:function(a){a.user_avatar&&a.user_avatar.type&&a.user_avatar.parts&&("head"==b.previewType?AvatarChooser.showAvatar(a.user_avatar.type,a.user_avatar.parts,null,g,null):"body"==b.previewType&&AvatarChooser.showAvatar(a.user_avatar.type,a.user_avatar.parts,null,null,g))}})})}})(jQuery);
343(function(a){jQuery.fn.playModalVideo=function(b){b=b||{};b.modalSelector=void 0!==b.modalSelector?b.modalSelector:"#heroVideo";a(this).click(function(){var c=a(this),d=c.attr("data-video"),f=c.attr("data-ga-category")||"Site",e=c.attr("data-ga-action")||"Link Click",c=c.attr("data-ga-label")||"Modal: Video Play",d=d.replace("youtube.com","youtube-nocookie.com"),d=d.replace("http://","//"),d=d+(-1<d.indexOf("?")?"&":"?")+"autoplay=1&modestbranding=1&rel=0&showinfo=0";ga("send","event",f,e,c);var e=
344a(b.modalSelector),g=e.find("iframe");g.attr("src",d);e.hasClass("reveal")?(e.one("closed.zf.reveal",function(){g.attr("src","/ide/imgs/blank.png");ga("send","event",f,"Link Click","Close Video Modal")}),(new Foundation.Reveal(e)).open()):e.hasClass("modal")&&e.modal().unbind().bind("modal:close",function(){g.attr("src","/ide/imgs/blank.png");ga("send","event",f,"Link Click","Close Video Modal")})})}})(jQuery);
345(function(a){jQuery.fn.playProject=function(b){b=b||{};b.facebookAppId=b.facebookAppId||null;a(this).click(function(){var c=a(this),d=c.attr("data-project-id"),f=c.attr("data-project-title")||"Tynker Project",e=c.attr("data-ga-category")||"Site",g=c.attr("data-ga-action")||"Link Click",c=c.attr("data-ga-label")||"Modal: Project Play";ga("send","event",e,g,c);Project.play(f,d,{embeddedShowViewCode:!1,enableOpen:!1,enableSharing:!0,facebookAppId:b.facebookAppId,showProjectInformation:!1})})}})(jQuery);
346(function(a){jQuery.fn.scrollingLink=function(b){b=b||{};b.offset=void 0!==b.offset?b.offset:0;a(this).click(function(){var c=a(this).attr("href"),d=b.offset,c=a(c).offset().top-d;a("html,body").animate({scrollTop:c},"slow")})}})(jQuery);(function(a){jQuery.fn.videoCover=function(b){b=b||{};a(this).click(function(){var c=a(this).attr("data-video");a("img",this).addClass("hidden");a("iframe",this).removeClass("hidden").attr("src",c+"?autoplay=1");if(b.onVideoPlay)b.onVideoPlay()})}})(jQuery);
347(function(a){jQuery.fn.stickyCta=function(b){b=b||{};b.ctaSelector=b.ctaSelector||".stickyCta,.sticky-cta";var c=a(b.ctaSelector);a(this).waypoint(function(){c.hasClass("hidden")?c.removeClass("hidden"):c.addClass("hidden")},{offset:function(){var b=parseInt(c.css("padding-top"));return a("#globalHead").height()+b}})}})(jQuery);
348(function(a){jQuery.fn.editInPlace=function(){a(this).click(function(){var b=a(this);if(b.hasClass("js-edit-in-place-editing"))return!0;b.addClass("js-edit-in-place-editing");var c=b.find(".js-edit-in-place-label"),d=b.find(".js-edit-in-place-input");b.append('<span class="actions js-edit-in-place-actions"><a class="js-edit-in-place-cancel">Cancel</a>&nbsp;|&nbsp;<a class="js-edit-in-place-save">Save</a></span>');b.append('<span class="actions hidden js-edit-in-place-saving">Saving...</span>');c.addClass("hidden");
349d.removeClass("hidden");b.find(".js-edit-in-place-save").click(function(){b.trigger("save")});b.find(".js-edit-in-place-cancel").click(function(){b.find(".js-edit-in-place-actions, .js-edit-in-place-saving").remove();c.removeClass("hidden");d.addClass("hidden");b.removeClass("js-edit-in-place-editing");return!1})});a(".js-edit-in-place-input",this).keypress(function(b){13==b.which&&a(this).parents(".js-edit-in-place").trigger("save")});a(this).on("save",function(){var b=a(this),c=b.find(".js-edit-in-place-actions"),
350b=b.find(".js-edit-in-place-saving");c.addClass("hidden");b.removeClass("hidden")});a(this).on("save_success",function(){var b=a(this),c=b.find(".js-edit-in-place-label"),d=b.find(".js-edit-in-place-input");b.find(".js-edit-in-place-actions, .js-edit-in-place-saving").remove();d.addClass("hidden");c.removeClass("hidden");c.hide();c.addClass("success");c.fadeIn(400);b.removeClass("js-edit-in-place-editing")});a(this).on("save_error",function(){var b=a(this),c=b.find(".js-edit-in-place-input");b.find(".js-edit-in-place-saving").addClass("hidden");
351b.find(".js-edit-in-place-actions").removeClass("hidden");c.addClass("error")})}})(jQuery);
352$(document).ready(function(){function a(){var b=$(".dropdown-pane.dashboard-account");if(b.hasClass("is-open"))$("body").one("click",function(){b.removeClass("is-open");a()});else setTimeout(a,500)}$(".user-settings .user-name").click(function(){var a=$(".user-settings");a.toggleClass("active");a.hasClass("active")&&("false"!==window.includeAvatarChooser&&window.AvatarChooser&&AvatarChooser.init($(".js-avatar img")),$("body").one("click",function(){a.removeClass("active")}));return!1});0<$(".dropdown-pane.dashboard-account").length&&
353a();"false"!==window.includeAvatarChooser&&window.AvatarChooser&&AvatarChooser.init($(".js-avatar img"));$(".js-avatar-head-shot").avatar({previewType:"head"})});function shareFacebook(a,b){var b=b?b:{},c="https://www.facebook.com/dialog/share?"+$.param({app_id:b.appId,display:"popup",href:a,redirect_uri:"http://"+(b.serverName?b.serverName:"www.tynker.com")+"/api/closewindow"});window.open(c,"Share","toolbar=0,status=0,width=626,height=436")}
354function shareTwitter(a,b,c){c=c?c:{};c=void 0!==c.hashTags?c.hashTags:"stem,hourofcode";a={url:a,text:b};c&&(a.hashtags=c);a="https://twitter.com/intent/tweet?"+$.param(a);window.open(a,"Tweet","toolbar=0,status=0,width=626,height=436")}function shareGooglePlus(a){a="https://plus.google.com/share?"+$.param({url:a});window.open(a,"Share on Google+","toolbar=0,status=0,width=626,height=436")}
355function shareEmail(a,b){window.open("mailto:?subject="+encodeURIComponent(a)+"&body="+encodeURIComponent(b),"Share using e-mail","toolbar=0,status=0,width=626,height=436")}function shareProjectFacebook(a,b){$.ajax({url:"/api/genshareurl",data:{id:a}}).then(function(c){var d=b.serverName?b.serverName:"www.tynker.com";shareFacebook(b.shareUrl?b.shareUrl:"https://"+d+"/play/"+a+"-"+c.data.hash,b)})}
356function shareProjectTwitter(a,b,c,d){$.ajax({url:"/api/genshareurl",data:{id:a}}).then(function(c){d=d?d:{};var e=d.serverName?d.serverName:"www.tynker.com";d.hashTags=d.hashTags?d.hashTags:"tynker";shareTwitter(d.shareUrl?d.shareUrl:"https://"+e+"/play/"+a+"-"+c.data.hash,"Check out "+b+" a coding project created with Tynker",d)})}
357function shareProjectGooglePlus(a,b){$.ajax({url:"/api/genshareurl",data:{id:a}}).then(function(c){b=b?b:{};var d=b.serverName?b.serverName:"www.tynker.com";shareGooglePlus(b.shareUrl?b.shareUrl:"https://"+d+"/play/"+a+"-"+c.data.hash)})}
358function shareProjectEmail(a,b,c,d){$.ajax({url:"/api/genshareurl",data:{id:a}}).then(function(f){d=d?d:{};var e=d.serverName?d.serverName:"www.tynker.com";shareEmail(b,"\n\nTynker project made by "+c+"\n"+(d.shareUrl?d.shareUrl:"https://"+e+"/play/"+a+"-"+f.data.hash)+"\n")})}
359function shareMyHocProjectTwitter(a,b,c,d){$.ajax({url:"/api/genshareurl",data:{id:a}}).then(function(c){d=d?d:{};d.hashTags=d.hashTags?d.hashTags:"hourofcode,tynker";d.serverName?d.serverName:"www.tynker.com";var e=d.serverName;shareTwitter(d.shareUrl?d.shareUrl:"https://"+e+"/play/"+a+"-"+c.data.hash,"I made "+b+" using code. Try it at",d)})}
360function shareMyHocProjectEmail(a,b,c,d){$.ajax({url:"/api/genshareurl",data:{id:a}}).then(function(c){d=d?d:{};d.serverName=d.serverName?d.serverName:"www.tynker.com";var e=d.serverName;shareEmail(b,"\n\nI made "+b+" using code. Try it at "+(d.shareUrl?d.shareUrl:"https://"+e+"/play/"+a+"-"+c.data.hash))})}
361$(document).ready(function(){$(".js-share-facebook").click(function(){var a=$(this),b=a.attr("data-url"),a=a.attr("data-options"),a=$.parseJSON(a);shareFacebook(b,a)});$(".js-share-twitter").click(function(){var a=$(this),b=a.attr("data-url"),c=a.attr("data-text"),a=a.attr("data-options"),a=$.parseJSON(a);shareTwitter(b,c,a)});$(".js-share-google-plus").click(function(){var a=$(this),b=a.attr("data-url"),a=a.attr("data-options"),a=$.parseJSON(a);shareGooglePlus(b,a)});$(".js-share-email").click(function(){var a=
362$(this),b=a.attr("data-subject"),a=a.attr("data-body");shareEmail(b,a)})});var spine={radDeg:180/Math.PI,degRad:Math.PI/180,temp:[],Float32Array:"undefined"===typeof Float32Array?Array:Float32Array,Uint16Array:"undefined"===typeof Uint16Array?Array:Uint16Array,BoneData:function(a,b){this.name=a;this.parent=b}};spine.BoneData.prototype={length:0,x:0,y:0,rotation:0,scaleX:1,scaleY:1,inheritScale:!0,inheritRotation:!0,flipX:!1,flipY:!1};
362spine.BlendMode={normal:0,additive:1,multiply:2,screen:3};
363spine.SlotData=function(a,b){this.name=a;this.boneData=b};spine.SlotData.prototype={r:1,g:1,b:1,a:1,attachmentName:null,blendMode:spine.BlendMode.normal};spine.IkConstraintData=function(a){this.name=a;this.bones=[]};spine.IkConstraintData.prototype={target:null,bendDirection:1,mix:1};spine.Bone=function(a,b,c){this.data=a;this.skeleton=b;this.parent=c;this.setToSetupPose()};spine.Bone.yDown=!1;
364spine.Bone.prototype={x:0,y:0,rotation:0,rotationIK:0,scaleX:1,scaleY:1,flipX:!1,flipY:!1,m00:0,m01:0,worldX:0,m10:0,m11:0,worldY:0,worldRotation:0,worldScaleX:1,worldScaleY:1,worldFlipX:!1,worldFlipY:!1,updateWorldTransform:function(){var a=this.parent;if(a)this.worldX=this.x*a.m00+this.y*a.m01+a.worldX,this.worldY=this.x*a.m10+this.y*a.m11+a.worldY,this.data.inheritScale?(this.worldScaleX=a.worldScaleX*this.scaleX,this.worldScaleY=a.worldScaleY*this.scaleY):(this.worldScaleX=this.scaleX,this.worldScaleY=
365this.scaleY),this.worldRotation=this.data.inheritRotation?a.worldRotation+this.rotationIK:this.rotationIK,this.worldFlipX=a.worldFlipX!=this.flipX,this.worldFlipY=a.worldFlipY!=this.flipY;else{var a=this.skeleton.flipX,b=this.skeleton.flipY;this.worldX=a?-this.x:this.x;this.worldY=b!=spine.Bone.yDown?-this.y:this.y;this.worldScaleX=this.scaleX;this.worldScaleY=this.scaleY;this.worldRotation=this.rotationIK;this.worldFlipX=a!=this.flipX;this.worldFlipY=b!=this.flipY}b=this.worldRotation*spine.degRad;
366a=Math.cos(b);b=Math.sin(b);this.worldFlipX?(this.m00=-a*this.worldScaleX,this.m01=b*this.worldScaleY):(this.m00=a*this.worldScaleX,this.m01=-b*this.worldScaleY);this.worldFlipY!=spine.Bone.yDown?(this.m10=-b*this.worldScaleX,this.m11=-a*this.worldScaleY):(this.m10=b*this.worldScaleX,this.m11=a*this.worldScaleY)},setToSetupPose:function(){var a=this.data;this.x=a.x;this.y=a.y;this.rotationIK=this.rotation=a.rotation;this.scaleX=a.scaleX;this.scaleY=a.scaleY;this.flipX=a.flipX;this.flipY=a.flipY},
367worldToLocal:function(a){var b=a[0]-this.worldX,c=a[1]-this.worldY,d=this.m00,f=this.m10,e=this.m01,g=this.m11;this.worldFlipX!=(this.worldFlipY!=spine.Bone.yDown)&&(d=-d,g=-g);var h=1/(d*g-e*f);a[0]=b*d*h-c*e*h;a[1]=c*g*h-b*f*h},localToWorld:function(a){var b=a[0],c=a[1];a[0]=b*this.m00+c*this.m01+this.worldX;a[1]=b*this.m10+c*this.m11+this.worldY}};spine.Slot=function(a,b){this.data=a;this.bone=b;this.setToSetupPose()};
368spine.Slot.prototype={r:1,g:1,b:1,a:1,_attachmentTime:0,attachment:null,attachmentVertices:[],setAttachment:function(a){this.attachment=a;this._attachmentTime=this.bone.skeleton.time;this.attachmentVertices.length=0},setAttachmentTime:function(a){this._attachmentTime=this.bone.skeleton.time-a},getAttachmentTime:function(){return this.bone.skeleton.time-this._attachmentTime},setToSetupPose:function(){var a=this.data;this.r=a.r;this.g=a.g;this.b=a.b;this.a=a.a;for(var b=this.bone.skeleton.data.slots,
369c=0,d=b.length;c<d;c++)if(b[c]==a){this.setAttachment(!a.attachmentName?null:this.bone.skeleton.getAttachmentBySlotIndex(c,a.attachmentName));break}}};spine.IkConstraint=function(a,b){this.data=a;this.mix=a.mix;this.bendDirection=a.bendDirection;this.bones=[];for(var c=0,d=a.bones.length;c<d;c++)this.bones.push(b.findBone(a.bones[c].name));this.target=b.findBone(a.target.name)}
369;
370spine.IkConstraint.prototype={apply:function(){var a=this.target,b=this.bones;switch(b.length){case 1:spine.IkConstraint.apply1(b[0],a.worldX,a.worldY,this.mix);break;case 2:spine.IkConstraint.apply2(b[0],b[1],a.worldX,a.worldY,this.bendDirection,this.mix)}}};
371spine.IkConstraint.apply1=function(a,b,c,d){var f=!a.data.inheritRotation||!a.parent?0:a.parent.worldRotation,e=a.rotation,b=Math.atan2(c-a.worldY,b-a.worldX)*spine.radDeg;a.worldFlipX!=(a.worldFlipY!=spine.Bone.yDown)&&(b=-b);a.rotationIK=e+(b-f-e)*d};
372spine.IkConstraint.apply2=function(a,b,c,d,f,e){var g=b.rotation,h=a.rotation;if(e){var i,j,k=spine.temp;(i=a.parent)?(k[0]=c,k[1]=d,i.worldToLocal(k),c=(k[0]-a.x)*i.worldScaleX,d=(k[1]-a.y)*i.worldScaleY):(c-=a.x,d-=a.y);b.parent==a?(i=b.x,j=b.y):(k[0]=b.x,k[1]=b.y,b.parent.localToWorld(k),a.worldToLocal(k),i=k[0],j=k[1]);k=i*a.worldScaleX;j*=a.worldScaleY;i=Math.atan2(j,k);j=Math.sqrt(k*k+j*j);var k=b.data.length*b.worldScaleX,l=2*j*k;1.0E-4>l?b.rotationIK=g+(Math.atan2(d,c)*spine.radDeg-h-g)*e:
373(l=(c*c+d*d-j*j-k*k)/l,-1>l?l=-1:1<l&&(l=1),f*=Math.acos(l),j+=k*l,k*=Math.sin(f),c=(Math.atan2(d*j-c*k,c*j+d*k)-i)*spine.radDeg-h,180<c?c-=360:-180>c&&(c+=360),a.rotationIK=h+c*e,c=(f+i)*spine.radDeg-g,180<c?c-=360:-180>c&&(c+=360),b.rotationIK=g+(c+a.worldRotation-b.parent.worldRotation)*e)}else b.rotationIK=g,a.rotationIK=h};spine.Skin=function(a){this.name=a;this.attachments={}};
374spine.Skin.prototype={addAttachment:function(a,b,c){this.attachments[a+":"+b]=c},getAttachment:function(a,b){return this.attachments[a+":"+b]},_attachAll:function(a,b){for(var c in b.attachments){var d=c.indexOf(":"),f=parseInt(c.substring(0,d)),e=c.substring(d+1),d=a.slots[f];d.attachment&&d.attachment.name==e&&(f=this.getAttachment(f,e))&&d.setAttachment(f)}}};spine.Animation=function(a,b,c){this.name=a;this.timelines=b;this.duration=c};
375spine.Animation.prototype={apply:function(a,b,c,d,f){d&&0!=this.duration&&(c%=this.duration,b%=this.duration);for(var d=this.timelines,e=0,g=d.length;e<g;e++)d[e].apply(a,b,c,f,1)},mix:function(a,b,c,d,f,e){d&&0!=this.duration&&(c%=this.duration,b%=this.duration);for(var d=this.timelines,g=0,h=d.length;g<h;g++)d[g].apply(a,b,c,f,e)}};
376spine.Animation.binarySearch=function(a,b,c){var d=0,f=Math.floor(a.length/c)-2;if(!f)return c;for(var e=f>>>1;;){a[(e+1)*c]<=b?d=e+1:f=e;if(d==f)return(d+1)*c;e=d+f>>>1}};spine.Animation.binarySearch1=function(a,b){var c=0,d=a.length-2;if(!d)return 1;for(var f=d>>>1;;){a[f+1]<=b?c=f+1:d=f;if(c==d)return c+1;f=c+d>>>1}};spine.Animation.linearSearch=function(a,b,c){for(var d=0,f=a.length-c;d<=f;d+=c)if(a[d]>b)return d;return-1};spine.Curves=function(){this.curves=[]};
377spine.Curves.prototype={setLinear:function(a){this.curves[19*a]=0},setStepped:function(a){this.curves[19*a]=1},setCurve:function(a,b,c,d,f){var e=0.1*0.1,g=0.1*e,h=3*0.1,i=3*e,j=6*e,e=6*g,k=2*-b+d,l=2*-c+f,d=3*(b-d)+1,f=3*(c-f)+1,b=b*h+k*i+d*g,c=c*h+l*i+f*g,g=k*j+d*e,j=l*j+f*e,l=d*e,e=f*e,a=19*a,d=this.curves;d[a++]=2;f=b;h=c;for(i=a+19-1;a<i;a+=2)d[a]=f,d[a+1]=h,b+=g,c+=j,g+=l,j+=e,f+=b,h+=c},getCurvePercent:function(a,b){var b=0>b?0:1<b?1:b,c=this.curves,d=19*a,f=c[d];if(0===f)return b;if(1==f)return 0;
378d++;for(var f=0,e=d,g=d+19-1;d<g;d+=2)if(f=c[d],f>=b)return d==e?g=e=0:(e=c[d-2],g=c[d-1]),g+(c[d+1]-g)*(b-e)/(f-e);c=c[d-1];return c+(1-c)*(b-f)/(1-f)}};spine.RotateTimeline=function(a){this.curves=new spine.Curves(a);this.frames=[];this.frames.length=2*a};
379spine.RotateTimeline.prototype={boneIndex:0,getFrameCount:function(){return this.frames.length/2},setFrame:function(a,b,c){a*=2;this.frames[a]=b;this.frames[a+1]=c},apply:function(a,b,c,d,f){b=this.frames;if(!(c<b[0])){a=a.bones[this.boneIndex];if(c>=b[b.length-2])b=a.data.rotation+b[b.length-1]-a.rotation;else{for(var e=spine.Animation.binarySearch(b,c,2),d=b[e-1],g=b[e],c=1-(c-g)/(b[e-2]-g),c=this.curves.getCurvePercent(e/2-1,c),b=b[e+1]-d;180<b;)b-=360;for(;-180>b;)b+=360;b=a.data.rotation+(d+
380b*c)-a.rotation}for(;180<b;)b-=360;for(;-180>b;)b+=360;a.rotation+=b*f}}};spine.TranslateTimeline=function(a){this.curves=new spine.Curves(a);this.frames=[];this.frames.length=3*a};
381spine.TranslateTimeline.prototype={boneIndex:0,getFrameCount:function(){return this.frames.length/3},setFrame:function(a,b,c,d){a*=3;this.frames[a]=b;this.frames[a+1]=c;this.frames[a+2]=d},apply:function(a,b,c,d,f){b=this.frames;if(!(c<b[0]))if(a=a.bones[this.boneIndex],c>=b[b.length-3])a.x+=(a.data.x+b[b.length-2]-a.x)*f,a.y+=(a.data.y+b[b.length-1]-a.y)*f;else{var d=spine.Animation.binarySearch(b,c,3),e=b[d-2],g=b[d-1],h=b[d],c=1-(c-h)/(b[d+-3]-h),c=this.curves.getCurvePercent(d/3-1,c);a.x+=(a.data.x+
382e+(b[d+1]-e)*c-a.x)*f;a.y+=(a.data.y+g+(b[d+2]-g)*c-a.y)*f}}};spine.ScaleTimeline=function(a){this.curves=new spine.Curves(a);this.frames=[];this.frames.length=3*a};
383spine.ScaleTimeline.prototype={boneIndex:0,getFrameCount:function(){return this.frames.length/3},setFrame:function(a,b,c,d){a*=3;this.frames[a]=b;this.frames[a+1]=c;this.frames[a+2]=d},apply:function(a,b,c,d,f){b=this.frames;if(!(c<b[0]))if(a=a.bones[this.boneIndex],c>=b[b.length-3])a.scaleX+=(a.data.scaleX*b[b.length-2]-a.scaleX)*f,a.scaleY+=(a.data.scaleY*b[b.length-1]-a.scaleY)*f;else{var d=spine.Animation.binarySearch(b,c,3),e=b[d-2],g=b[d-1],h=b[d],c=1-(c-h)/(b[d+-3]-h),c=this.curves.getCurvePercent(d/
3843-1,c);a.scaleX+=(a.data.scaleX*(e+(b[d+1]-e)*c)-a.scaleX)*f;a.scaleY+=(a.data.scaleY*(g+(b[d+2]-g)*c)-a.scaleY)*f}}};spine.ColorTimeline=function(a){this.curves=new spine.Curves(a);this.frames=[];this.frames.length=5*a};
385spine.ColorTimeline.prototype={slotIndex:0,getFrameCount:function(){return this.frames.length/5},setFrame:function(a,b,c,d,f,e){a*=5;this.frames[a]=b;this.frames[a+1]=c;this.frames[a+2]=d;this.frames[a+3]=f;this.frames[a+4]=e},apply:function(a,b,c,d,f){b=this.frames;if(!(c<b[0])){var e,g;if(c>=b[b.length-5])d=b.length-1,c=b[d-3],e=b[d-2],g=b[d-1],b=b[d];else{var d=spine.Animation.binarySearch(b,c,5),h=b[d-4];e=b[d-3];g=b[d-2];var i=b[d-1],j=b[d],j=1-(c-j)/(b[d-5]-j),j=this.curves.getCurvePercent(d/
3865-1,j),c=h+(b[d+1]-h)*j;e+=(b[d+2]-e)*j;g+=(b[d+3]-g)*j;b=i+(b[d+4]-i)*j}a=a.slots[this.slotIndex];1>f?(a.r+=(c-a.r)*f,a.g+=(e-a.g)*f,a.b+=(g-a.b)*f,a.a+=(b-a.a)*f):(a.r
386=c,a.g=e,a.b=g,a.a=b)}}};spine.AttachmentTimeline=function(a){this.curves=new spine.Curves(a);this.frames=[];this.frames.length=a;this.attachmentNames=[];this.attachmentNames.length=a};
387spine.AttachmentTimeline.prototype={slotIndex:0,getFrameCount:function(){return this.frames.length},setFrame:function(a,b,c){this.frames[a]=b;this.attachmentNames[a]=c},apply:function(a,b,c){var d=this.frames;c<d[0]?b>c&&this.apply(a,b,Number.MAX_VALUE,null,0):(b>c&&(b=-1),c=c>=d[d.length-1]?d.length-1:spine.Animation.binarySearch1(d,c)-1,d[c]<b||(b=this.attachmentNames[c],a.slots[this.slotIndex].setAttachment(!b?null:a.getAttachmentBySlotIndex(this.slotIndex,b))))}};
388spine.EventTimeline=function(a){this.frames=[];this.frames.length=a;this.events=[];this.events.length=a};
389spine.EventTimeline.prototype={getFrameCount:function(){return this.frames.length},setFrame:function(a,b,c){this.frames[a]=b;this.events[a]=c},apply:function(a,b,c,d,f){if(d){var e=this.frames,g=e.length;if(b>c)this.apply(a,b,Number.MAX_VALUE,d,f),b=-1;else if(b>=e[g-1])return;if(!(c<e[0])){if(b<e[0])a=0;else{a=spine.Animation.binarySearch1(e,b);for(b=e[a];0<a&&e[a-1]==b;)a--}for(b=this.events;a<g&&c>=e[a];a++)d.push(b[a])}}}};
390spine.DrawOrderTimeline=function(a){this.frames=[];this.frames.length=a;this.drawOrders=[];this.drawOrders.length=a};
391spine.DrawOrderTimeline.prototype={getFrameCount:function(){return this.frames.length},setFrame:function(a,b,c){this.frames[a]=b;this.drawOrders[a]=c},apply:function(a,b,c){b=this.frames;if(!(c<b[0])){var d;d=c>=b[b.length-1]?b.length-1:spine.Animation.binarySearch1(b,c)-1;c=a.drawOrder;b=a.slots;if(d=this.drawOrders[d]){f=0;for(e=d.length;f<e;f++)c[f]=a.slots[d[f]]}else for(var f=0,e=b.length;f<e;f++)c[f]=b[f]}}};
392spine.FfdTimeline=function(a){this.curves=new spine.Curves(a);this.frames=[];this.frames.length=a;this.frameVertices=[];this.frameVertices.length=a};
393spine.FfdTimeline.prototype={slotIndex:0,attachment:0,getFrameCount:function(){return this.frames.length},setFrame:function(a,b,c){this.frames[a]=b;this.frameVertices[a]=c},apply:function(a,b,c,d,f){b=a.slots[this.slotIndex];if(b.attachment==this.attachment){var e=this.frames;if(!(c<e[0]))if(d=this.frameVertices,a=d[0].length,b=b.attachmentVertices,b.length!=a&&(f=1),b.length=a,c>=e[e.length-1])if(c=d[e.length-1],1>f)for(d=0;d<a;d++)b[d]+=(c[d]-b[d])*f;else for(d=0;d<a;d++)b[d]=c[d];else{var g=spine.Animation.binarySearch1(e,
394c),h=e[g],c=1-(c-h)/(e[g-1]-h),c=this.curves.getCurvePercent(g-1,0>c?0:1<c?1:c),e=d[g-1],g=d[g];if(1>f)for(d=0;d<a;d++)h=e[d],b[d]+=(h+(g[d]-h)*c-b[d])*f;else for(d=0;d<a;d++)h=e[d],b[d]=h+(g[d]-h)*c}}}};spine.IkConstraintTimeline=function(a){this.curves=new spine.Curves(a);this.frames=[];this.frames.length=3*a};
395spine.IkConstraintTimeline.prototype={ikConstraintIndex:0,getFrameCount:function(){return this.frames.length/3},setFrame:function(a,b,c,d){a*=3;this.frames[a]=b;this.frames[a+1]=c;this.frames[a+2]=d},apply:function(a,b,c,d,f){b=this.frames;if(!(c<b[0]))if(a=a.ikConstraints[this.ikConstraintIndex],c>=b[b.length-3])a.mix+=(b[b.length-2]-a.mix)*f,a.bendDirection=b[b.length-1];else{var d=spine.Animation.binarySearch(b,c,3),e=b[d+-2],g=b[d],c=1-(c-g)/(b[d+-3]-g),c=this.curves.getCurvePercent(d/3-1,c);
396a.mix+=(e+(b[d+1]-e)*c-a.mix)*f;a.bendDirection=b[d+-1]}}};spine.FlipXTimeline=function(a){this.curves=new spine.Curves(a);this.frames=[];this.frames.length=2*a};
397spine.FlipXTimeline.prototype={boneIndex:0,getFrameCount:function(){return this.frames.length/2},setFrame:function(a,b,c){a*=2;this.frames[a]=b;this.frames[a+1]=c?1:0},apply:function(a,b,c){var d=this.frames;c<d[0]?b>c&&this.apply(a,b,Number.MAX_VALUE,null,0):(b>c&&(b=-1),c=(c>=d[d.length-2]?d.length:spine.Animation.binarySearch(d,c,2))-2,d[c]<b||(a.bones[this.boneIndex].flipX=0!=d[c+1]))}};spine.FlipYTimeline=function(a){this.curves=new spine.Curves(a);this.frames=[];this.frames.length=2*a};
398spine.FlipYTimeline.prototype={boneIndex:0,getFrameCount:function(){return this.frames.length/2},setFrame:function(a,b,c){a*=2;this.frames[a]=b;this.frames[a+1]=c?1:0},apply:function(a,b,c){var d=this.frames;c<d[0]?b>c&&this.apply(a,b,Number.MAX_VALUE,null,0):(b>c&&(b=-1),c=(c>=d[d.length-2]?d.length:spine.Animation.binarySearch(d,c,2))-2,d[c]<b||(a.bones[this.boneIndex].flipY=0!=d[c+1]))}};
399spine.SkeletonData=function(){this.bones=[];this.slots=[];this.skins=[];this.events=[];this.animations=[];this.ikConstraints=[]};
400spine.SkeletonData.prototype={name:null,defaultSkin:null,width:0,height:0,version:null,hash:null,findBone:function(a){for(var b=this.bones,c=0,d=b.length;c<d;c++)if(b[c].name==a)return b[c];return null},findBoneIndex:function(a){for(var b=this.bones,c=0,d=b.length;c<d;c++)if(b[c].name==a)return c;return-1},findSlot:function(a){for(var b=this.slots,c=0,d=b.length;c<d;c++)if(b[c].name==a)return slot[c];return null},findSlotIndex:function(a){for(var b=this.slots,c=0,d=b.length;c<d;c++)if(b[c].name==
401a)return c;return-1},findSkin:function(a){for(var b=this.skins,c=0,d=b.length;c<d;c++)if(b[c].name==a)return b[c];return null},findEvent:function(a){for(var b=this.events,c=0,d=b.length;c<d;c++)if(b[c].name==a)return b[c];return null},findAnimation:function(a){for(var b=this.animations,c=0,d=b.length;c<d;c++)if(b[c].name==a)return b[c];return null},findIkConstraint:function(a){for(var b=this.ikConstraints,c=0,d=b.length;c<d;c++)if(b[c].name==a)return b[c];return null}};
402spine.Skeleton=function(a){this.data=a;this.bones=[];for(var b=0,c=a.bones.length;b<c;b++){var d=a.bones[b],f=!d.parent?null:this.bones[a.bones.indexOf(d.parent)];this.bones.push(new spine.Bone(d,this,f))}this.slots=[];this.drawOrder=[];
402b=0;for(c=a.slots.length;b<c;b++)d=a.slots[b],f=this.bones[a.bones.indexOf(d.boneData)],d=new spine.Slot(d,f),this.slots.push(d),this.drawOrder.push(d);this.ikConstraints=[];b=0;for(c=a.ikConstraints.length;b<c;b++)this.ikConstraints.push(new spine.IkConstraint(a.ikConstraints[b],
403this));this.boneCache=[];this.updateCache()};
404spine.Skeleton.prototype={x:0,y:0,skin:null,r:1,g:1,b:1,a:1,time:0,flipX:!1,flipY:!1,updateCache:function(){var a=this.ikConstraints,b=a.length,c=b+1,d=this.boneCache;d.length>c&&(d.length=c);for(var f=0,e=d.length;f<e;f++)d[f].length=0;for(;d.length<c;)d[d.length]=[];var c=d[0],g=this.bones,f=0,e=g.length;a:for(;f<e;f++){var h=g[f],i=h;do{for(var j=0;j<b;j++)for(var k=a[j],l=k.bones[0],k=k.bones[k.bones.length-1];;){if(i==k){d[j].push(h);d[j+1].push(h);continue a}if(k==l)break;k=k.parent}i=i.parent}while(i);
405c[c.length]=h}},updateWorldTransform:function(){for(var a=this.bones,b=0,c=a.length;b<c;b++){var d=a[b];d.rotationIK=d.rotation}b=0;for(a=this.boneCache.length-1;;){for(var c=this.boneCache[b],d=0,f=c.length;d<f;d++)c[d].updateWorldTransform();if(b==a)break;this.ikConstraints[b].apply();b++}},setToSetupPose:function(){this.setBonesToSetupPose();this.setSlotsToSetupPose()},setBonesToSetupPose:function(){for(var a=this.bones,b=0,c=a.length;b<c;b++)a[b].setToSetupPose();a=this.ikConstraints;b=0;for(c=
406a.length;b<c;b++){var d=a[b];d.bendDirection=d.data.bendDirection;d.mix=d.data.mix}},setSlotsToSetupPose:function(){for(var a=this.slots,b=this.drawOrder,c=0,d=a.length;c<d;c++)b[c]=a[c],a[c].setToSetupPose(c)},getRootBone:function(){return this.bones.length?this.bones[0]:null},findBone:function(a){for(var b=this.bones,c=0,d=b.length;c<d;c++)if(b[c].data.name==a)return b[c];return null},findBoneIndex:function(a){for(var b=this.bones,c=0,d=b.length;c<d;c++)if(b[c].data.name==a)return c;return-1},findSlot:function(a){for(var b=
407this.slots,c=0,d=b.length;c<d;c++)if(b[c].data.name==a)return b[c];return null},findSlotIndex:function(a){for(var b=this.slots,c=0,d=b.length;c<d;c++)if(b[c].data.name==a)return c;return-1},setSkinByName:function(a){var b=this.data.findSkin(a);if(!b)throw"Skin not found: "+a;this.setSkin(b)},setSkin:function(a){if(a)if(this.skin)a._attachAll(this,this.skin);else for(var b=this.slots,c=0,d=b.length;c<d;c++){var f=b[c],e=f.data.attachmentName;e&&(e=a.getAttachment(c,e))&&f.setAttachment(e)}this.skin=
408a},getAttachmentBySlotName:function(a,b){return this.getAttachmentBySlotIndex(this.data.findSlotIndex(a),b)},getAttachmentBySlotIndex:function(a,b){if(this.skin){var c=this.skin.getAttachment(a,b);if(c)return c}return this.data.defaultSkin?this.data.defaultSkin.getAttachment(a,b):null},setAttachment:function(a,b){for(var c=this.slots,d=0,f=c.length;d<f;d++){var e=c[d];if(e.data.name==a){c=null;if(b&&(c=this.getAttachmentBySlotIndex(d,b),!c))throw"Attachment not found: "+b+", for slot: "+a;e.setAttachment(c);
409return}}throw"Slot not found: "+a;},findIkConstraint:function(a){for(var b=this.ikConstraints,c=0,d=b.length;c<d;c++)if(b[c].data.name==a)return b[c];return null},update:function(a){this.time+=a}};spine.EventData=function(a){this.name=a};spine.EventData.prototype={intValue:0,floatValue:0,stringValue:null};spine.Event=function(a){this.data=a};spine.Event.prototype={intValue:0,floatValue:0,stringValue:null};spine.AttachmentType={region:0,boundingbox:1,mesh:2,skinnedmesh:3};
410spine.RegionAttachment=function(a){this.name=a;this.offset=[];this.offset.length=8;this.uvs=[];this.uvs.length=8};
411spine.RegionAttachment.prototype={type:spine.AttachmentType.region,x:0,y:0,rotation:0,scaleX:1,scaleY:1,width:0,height:0,r:1,g:1,b:1,a:1,path:null,rendererObject:null,regionOffsetX:0,regionOffsetY:0,regionWidth:0,regionHeight:0,regionOriginalWidth:0,regionOriginalHeight:0,setUVs:function(a,b,c,d,f){var e=this.uvs;f?(e[2]=a,e[3]=d,e[4]=a,e[5]=b,e[6]=c,e[7]=b,e[0]=c,e[1]=d):(e[0]=a,e[1]=d,e[2]=a,e[3]=b,e[4]=c,e[5]=b,e[6]=c,e[7]=d)},updateOffset:function(){var a=this.width/this.regionOriginalWidth*this.scaleX,
412b=this.height/this.regionOriginalHeight*this.scaleY,c=-this.width/2*this.scaleX+this.regionOffsetX*a,d=-this.height/2*this.scaleY+this.regionOffsetY*b,f=c+this.regionWidth*a,a=d+this.regionHeight*b,a=f=d=c=0,b=this.rotation*spine.degRad,e=Math.cos(b),g=Math.sin(b),b=c*e+this.x,c=c*g,h=d*e+this.y,d=d*g,
412i=f*e+this.x,f=f*g,e=a*e+this.y,a=a*g,g=this.offset;g[0]=b-d;g[1]=h+c;g[2]=b-a;g[3]=e+c;g[4]=i-a;g[5]=e+f;g[6]=i-d;g[7]=h+f},computeVertices:function(a,b,c,d){var a=a+c.worldX,b=b+c.worldY,f=c.m00,e=
413c.m01,g=c.m10,c=c.m11,h=this.offset;d[0]=h[0]*f+h[1]*e+a;d[1]=h[0]*g+h[1]*c+b;d[2]=h[2]*f+h[3]*e+a;d[3]=h[2]*g+h[3]*c+b;d[4]=h[4]*f+h[5]*e+a;d[5]=h[4]*g+h[5]*c+b;d[6]=h[6]*f+h[7]*e+a;d[7]=h[6]*g+h[7]*c+b}};spine.MeshAttachment=function(a){this.name=a};
414spine.MeshAttachment.prototype={type:spine.AttachmentType.mesh,vertices:null,uvs:null,regionUVs:null,triangles:null,hullLength:0,r:1,g:1,b:1,a:1,path:null,rendererObject:null,regionU:0,regionV:0,regionU2:0,regionV2:0,regionRotate:!1,regionOffsetX:0,regionOffsetY:0,regionWidth:0,regionHeight:0,regionOriginalWidth:0,regionOriginalHeight:0,edges:null,width:0,height:0,updateUVs:function(){var a=this.regionU2-this.regionU,b=this.regionV2-this.regionV,c=this.regionUVs.length;if(!this.uvs||this.uvs.length!=
415c)this.uvs=new spine.Float32Array(c);if(this.regionRotate)for(var d=0;d<c;d+=2)this.uvs[d]=this.regionU+this.regionUVs[d+1]*a,this.uvs[d+1]=this.regionV+b-this.regionUVs[d]*b;else for(d=0;d<c;d+=2)this.uvs[d]=this.regionU+this.regionUVs[d]*a,this.uvs[d+1]=this.regionV+this.regionUVs[d+1]*b},computeWorldVertices:function(a,b,c,d){var f=c.bone,a=a+f.worldX,b=b+f.worldY,e=f.m00,g=f.m01,h=f.m10,f=f.m11,i=this.vertices,j=i.length;c.attachmentVertices.length==j&&(i=c.attachmentVertices);for(c=0;c<j;c+=
4162){var k=i[c],l=i[c+1];d[c]=k*e+l*g+a;d[c+1]=k*h+l*f+b}}};spine.SkinnedMeshAttachment=function(a){this.name=a};
417spine.SkinnedMeshAttachment.prototype={type:spine.AttachmentType.skinnedmesh,bones:null,weights:null,uvs:null,regionUVs:null,triangles:null,hullLength:0,r:1,g:1,b:1,a:1,path:null,rendererObject:null,regionU:0,regionV:0,regionU2:0,regionV2:0,regionRotate:!1,regionOffsetX:0,regionOffsetY:0,regionWidth:0,regionHeight:0,regionOriginalWidth:0,regionOriginalHeight:0,edges:null,width:0,height:0,updateUVs:function(){var a=this.regionU2-this.regionU,b=this.regionV2-this.regionV,c=this.regionUVs.length;if(!this.uvs||
418this.uvs.length!=c)this.uvs=new spine.Float32Array(c);if(this.regionRotate)for(var d=0;d<c;d+=2)this.uvs[d]=this.regionU+this.regionUVs[d+1]*a,this.uvs[d+1]=this.regionV+b-this.regionUVs[d]*b;else for(d=0;d<c;d+=2)this.uvs[d]=this.regionU+this.regionUVs[d]*a,this.uvs[d+1]=this.regionV+this.regionUVs[d+1]*b},computeWorldVertices:function(a,b,c,d){var f=c.bone.skeleton.bones,e=this.weights,g=this.bones,h=0,i=0,j=0,k=0,l=g.length,n,p,o,q,s,r;if(c.attachmentVertices.length)for(var t=c.attachmentVertices;i<
419l;h+=2){p=n=0;for(c=g[i++]+i;i<c;i++,j+=3,k+=2)o=f[g[i]],q=e[j]+t[k],s=e[j+1]+t[k+1],r=e[j+2],n+=(q*o.m00+s*o.m01+o.worldX)*r,p+=(q*o.m10+s*o.m11+o.worldY)*r;d[h]=n+a;d[h+1]=p+b}else for(;i<l;h+=2){p=n=0;for(c=g[i++]+i;i<c;i++,j+=3)o=f[g[i]],q=e[j],s=e[j+1],r=e[j+2],n+=(q*o.m00+s*o.m01+o.worldX)*r,p+=(q*o.m10+s*o.m11+o.worldY)*r;d[h]=n+a;d[h+1]=p+b}}};spine.BoundingBoxAttachment=function(a){this.name=a;this.vertices=[]};
420spine.BoundingBoxAttachment.prototype={type:spine.AttachmentType.boundingbox,computeWorldVertices:function(a,b,c,d){for(var a=a+c.worldX,b=b+c.worldY,f=c.m00,e=c.m01,g=c.m10,c=c.m11,h=this.vertices,i=0,j=h.length;i<j;i+=2){var k=h[i],l=h[i+1];d[i]=k*f+l*e+a;d[i+1]=k*g+l*c+b}}};spine.AnimationStateData=function(a){this.skeletonData=a;this.animationToMixTime={}};
421spine.AnimationStateData.prototype={defaultMix:0,setMixByName:function(a,b,c){var d=this.skeletonData.findAnimation(a);if(!d)throw"Animation not found: "+a;a=this.skeletonData.findAnimation(b);if(!a)throw"Animation not found: "+b;this.setMix(d,a,c)},setMix:function(a,b,c){this.animationToMixTime[a.name+":"+b.name]=c},getMix:function(a,b){var c=a.name+":"+b.name;return this.animationToMixTime.hasOwnProperty(c)?this.animationToMixTime[c]:this.defaultMix}};spine.TrackEntry=function(){};
422spine.TrackEntry.prototype={next:null,previous:null,animation:null,loop:!1,delay:0,time:0,lastTime:-1,endTime:0,timeScale:1,mixTime:0,mixDuration:0,mix:1,onStart:null,onEnd:null,onComplete:null,onEvent:null};spine.AnimationState=function(a){this.data=a;this.tracks=[];this.events=[]};
423spine.AnimationState.prototype={onStart:null,onEnd:null,onComplete:null,onEvent:null,timeScale:1,update:function(a){for(var a=a*this.timeScale,b=0;b<this.tracks.length;b++){var c=this.tracks[b];if(c){c.time+=a*c.timeScale;if(c.previous){var d=a*c.previous.timeScale;c.previous.time+=d;c.mixTime+=d}(d=c.next)?(d.time=c.lastTime-d.delay,0<=d.time&&this.setCurrent(b,d)):!c.loop&&c.lastTime>=c.endTime&&this.clearTrack(b)}}},apply:function(a){for(var b=0;b<this.tracks.length;b++){var c=this.tracks[b];if(c){this.events.length=
4240;var d=c.time,f=c.lastTime,e=c.endTime,g=c.loop;!g&&d>e&&(d=e);var h=c.previous;if(h){var i=h.time;!h.loop&&i>h.endTime&&(i=h.endTime);h.animation.apply(a,i,i,h.loop,null);h=c.mixTime/c.mixDuration*c.mix;1<=h&&(h=1,c.previous=null);c.animation.mix(a,c.lastTime,d,g,this.events,h)}else 1==c.mix?c.animation.apply(a,c.lastTime,d,g,this.events):c.animation.mix(a,c.lastTime,d,g,this.events,c.mix);h=0;for(i=this.events.length;h<i;h++){var j=this.events[h];if(c.onEvent)c.onEvent(b,j);if(this.onEvent)this.onEvent(b,
425j)}if(g?f%e>d%e:f<e&&d>=e){d=Math.floor(d/e);
425if(c.onComplete)c.onComplete(b,d);if(this.onComplete)this.onComplete(b,d)}c.lastTime=c.time}}},clearTracks:function(){for(var a=0,b=this.tracks.length;a<b;a++)this.clearTrack(a);this.tracks.length=0},clearTrack:function(a){if(!(a>=this.tracks.length)){var b=this.tracks[a];if(b){if(b.onEnd)b.onEnd(a);if(this.onEnd)this.onEnd(a);this.tracks[a]=null}}},_expandToIndex:function(a){if(a<this.tracks.length)return this.tracks[a];for(;a>=this.tracks.length;)this.tracks.push(null);
426return null},setCurrent:function(a,b){var c=this._expandToIndex(a);if(c){var d=c.previous;c.previous=null;if(c.onEnd)c.onEnd(a);if(this.onEnd)this.onEnd(a);b.mixDuration=this.data.getMix(c.animation,b.animation);0<b.mixDuration&&(b.mixTime=0,b.previous=d&&0.5>c.mixTime/c.mixDuration?d:c)}this.tracks[a]=b;if(b.onStart)b.onStart(a);if(this.onStart)this.onStart(a)},setAnimationByName:function(a,b,c){var d=this.data.skeletonData.findAnimation(b);if(!d)throw"Animation not found: "+b;return this.setAnimation(a,
427d,c)},setAnimation:function(a,b,c){var d=new spine.TrackEntry;d.animation=b;d.loop=c;d.endTime=b.duration;this.setCurrent(a,d);return d},addAnimationByName:function(a,b,c,d){var f=this.data.skeletonData.findAnimation(b);if(!f)throw"Animation not found: "+b;return this.addAnimation(a,f,c,d)},addAnimation:function(a,b,c,d){var f=new spine.TrackEntry;f.animation=b;f.loop=c;f.endTime=b.duration;if(c=this._expandToIndex(a)){for(;c.next;)c=c.next;c.next=f}else this.tracks[a]=f;0>=d&&(d=c?d+(c.endTime-this.data.getMix(c.animation,
428b)):0);f.delay=d;return f},getCurrent:function(a){return a>=this.tracks.length?null:this.tracks[a]}};spine.SkeletonJson=function(a){this.attachmentLoader=a};
429spine.SkeletonJson.prototype={scale:1,readSkeletonData:function(a,b){var c=new spine.SkeletonData;c.name=b;var d=a.skeleton;d&&(c.hash=d.hash,c.version=d.spine,c.width=d.width||0,c.height=d.height||0);for(var f=a.bones,d=0,e=f.length;d<e;d++){var g=f[d],h=null;if(g.parent&&(h=c.findBone(g.parent),!h))throw"Parent bone not found: "+g.parent;h=new spine.BoneData(g.name,h);h.length=(g.length||0)*this.scale;h.x=(g.x||0)*this.scale;h.y=(g.y||0)*this.scale;h.rotation=g.rotation||0;h.scaleX=g.hasOwnProperty("scaleX")?
430g.scaleX:1;h.scaleY=g.hasOwnProperty("scaleY")?g.scaleY:1;h.inheritScale=g.hasOwnProperty("inheritScale")?g.inheritScale:!0;h.inheritRotation=g.hasOwnProperty("inheritRotation")?g.inheritRotation:!0;c.bones.push(h)}if(h=a.ik){d=0;for(e=h.length;d<e;d++){for(var g=h[d],i=new spine.IkConstraintData(g.name),f=g.bones,j=0,k=f.length;j<k;j++){var l=c.findBone(f[j]);if(!l)throw"IK bone not found: "+f[j];i.bones.push(l)}i.target=c.findBone(g.target);if(!i.target)throw"Target bone not found: "+g.target;i.bendDirection=
431!g.hasOwnProperty("bendPositive")||g.bendPositive?1:-1;i.mix=g.hasOwnProperty("mix")?g.mix:1;c.ikConstraints.push(i)}}f=a.slots;d=0;for(e=f.length;d<e;d++){g=f[d];h=c.findBone(g.bone);if(!h)throw"Slot bone not found: "+g.bone;h=new spine.SlotData(g.name,h);if(i=g.color)h.r=this.toColor(i,0),h.g=this.toColor(i,1),h.b=this.toColor(i,2),h.a=this.toColor(i,3);h.attachmentName=g.attachment;h.blendMode=spine.BlendMode[g.blend||"normal"];c.slots.push(h)}var d=a.skins,n;for(n in d)if(d.hasOwnProperty(n)){var e=
432d[n],f=new spine.Skin(n),p;for(p in e)if(e.hasOwnProperty(p)){var h=c.findSlotIndex(p),g=e[p],o;for(o in g)g.hasOwnProperty(o)&&(i=this.readAttachment(f,o,g[o]))&&f.addAttachment(h,o,i)}c.skins.push(f);"default"==f.name&&(c.defaultSkin=f)}n=a.events;for(var q in n)n.hasOwnProperty(q)&&(p=n[q],o=new spine.EventData(q),o.intValue=p["int"]||0,o.floatValue=p["float"]||0,o.stringValue=p.string||null,c.events.push(o));q=a.animations;for(var s in q)q.hasOwnProperty(s)&&this.readAnimation(s,q[s],c);return c},
433readAttachment:function(a,b,c){var b=c.name||b,d=spine.AttachmentType[c.type||"region"],f=c.path||b,e=this.scale;if(d==spine.AttachmentType.region){a=this.attachmentLoader.newRegionAttachment(a,b,f);if(!a)return null;a.path=f;a.x=(c.x||0)*e;a.y=(c.y||0)*e;a.scaleX=c.hasOwnProperty("scaleX")?c.scaleX:1;a.scaleY=c.hasOwnProperty("scaleY")?c.scaleY:1;a.rotation=c.rotation||0;a.width=(c.width||0)*e;a.height=(c.height||0)*e;if(f=c.color)a.r=this.toColor(f,0),a.g=this.toColor(f,1),a.b=this.toColor(f,2),
434a.a=this.toColor(f,3);a.updateOffset();return a}if(d==spine.AttachmentType.mesh){a=this.attachmentLoader.newMeshAttachment(a,b,f);if(!a)return null;a.path=f;a.vertices=this.getFloatArray(c,"vertices",e);a.triangles=this.getIntArray(c,"triangles");a.regionUVs=this.getFloatArray(c,"uvs",1);a.updateUVs();if(f=c.color)a.r=this.toColor(f,0),a.g=this.toColor(f,1),a.b=this.toColor(f,2),a.a=this.toColor(f,3);a.hullLength=2*(c.hull||0);c.edges&&(a.edges=this.getIntArray(c,"edges"));a.width=(c.width||0)*e;
435a.height=(c.height||0)*e;return a}if(d==spine.AttachmentType.skinnedmesh){a=this.attachmentLoader.newSkinnedMeshAttachment(a,b,f);if(!a)return null;a.path=f;for(var g=this.getFloatArray(c,"uvs",1),f=this.getFloatArray(c,"vertices",1),h=[],i=[],b=0,d=f.length;b<d;){var j=f[b++]|0;i[i.length]=j;for(j=b+4*j;b<j;)i[i.length]=f[b],h[h.length]=f[b+1]*e,h[h.length]=f[b+2]*e,h[h.length]=f[b+3],b+=4}a.bones=i;a.weights=h;a.triangles=this.getIntArray(c,"triangles");a.regionUVs=g;a.updateUVs();if(f=c.color)a.r=
436this.toColor(f,0),a.g=this.toColor(f,1),a.b=this.toColor(f,2),a.a=this.toColor(f,3);a.hullLength=2*(c.hull||0);c.edges&&(a.edges=this.getIntArray(c,"edges"));a.width=(c.width||0)*e;a.height=(c.height||0)*e;return a}if(d==spine.AttachmentType.boundingbox){a=this.attachmentLoader.newBoundingBoxAttachment(a,b);f=c.vertices;b=0;for(d=f.length;b<d;b++)a.vertices.push(f[b]*e);return a}throw"Unknown attachment type: "+d;},readAnimation:function(a,b,c){var d=[],f=0,e=b.slots,g;for(g in e)if(e.hasOwnProperty(g)){var h=
437e[g],i=c.findSlotIndex(g),j;for(j in h)if(h.hasOwnProperty(j)){var k=h[j];if("color"==j){var l=new spine.ColorTimeline(k.length);l.slotIndex=i;for(var n=0,p=0,o=k.length;p<o;p++){var q=k[p],s=q.color,r=this.toColor(s,0),t=this.toColor(s,1),v=this.toColor(s,2),s=this.toColor(s,3);
437l.setFrame(n,q.time,r,t,v,s);this.readCurve(l,n,q);n++}d.push(l);f=Math.max(f,l.frames[5*l.getFrameCount()-5])}else if("attachment"==j){l=new spine.AttachmentTimeline(k.length);l.slotIndex=i;p=n=0;for(o=k.length;p<o;p++)q=
438k[p],l.setFrame(n++,q.time,q.name);d.push(l);f=Math.max(f,l.frames[l.getFrameCount()-1])}else throw"Invalid timeline type for a slot: "+j+" ("+g+")";}}var i=b.bones,u;for(u in i)if(i.hasOwnProperty(u)){h=c.findBoneIndex(u);if(-1==h)throw"Bone not found: "+u;e=i[u];for(j in e)if(e.hasOwnProperty(j))if(k=e[j],"rotate"==j){l=new spine.RotateTimeline(k.length);l.boneIndex=h;p=n=0;for(o=k.length;p<o;p++)q=k[p],l.setFrame(n,q.time,q.angle),this.readCurve(l,n,q),n++;d.push(l);f=Math.max(f,l.frames[2*l.getFrameCount()-
4392])}else if("translate"==j||"scale"==j){r=1;"scale"==j?l=new spine.ScaleTimeline(k.length):(l=new spine.TranslateTimeline(k.length),r=this.scale);l.boneIndex=h;p=n=0;for(o=k.length;p<o;p++)q=k[p],t=(q.x||0)*r,l.setFrame(n,q.time,t,(q.y||0)*r),this.readCurve(l,n,q),n++;d.push(l);f=Math.max(f,l.frames[3*l.getFrameCount()-3])}else if("flipX"==j||"flipY"==j){l=(t="flipX"==j)?new spine.FlipXTimeline(k.length):new spine.FlipYTimeline(k.length);l.boneIndex=h;r=t?"x":"y";p=n=0;for(o=k.length;p<o;p++)q=k[p],
440l.setFrame(n,q.time,q[r]||!1),n++;d.push(l);f=Math.max(f,l.frames[2*l.getFrameCount()-2])}else throw"Invalid timeline type for a bone: "+j+" ("+u+")";}var i=b.ik,w;for(w in i)if(i.hasOwnProperty(w)){n=c.findIkConstraint(w);k=i[w];l=new spine.IkConstraintTimeline(k.length);l.ikConstraintIndex=c.ikConstraints.indexOf(n);p=n=0;for(o=k.length;p<o;p++)q=k[p],h=q.hasOwnProperty("mix")?q.mix:1,j=!q.hasOwnProperty("bendPositive")||q.bendPositive?1:-1,l.setFrame(n,q.time,h,j),this.readCurve(l,n,q),n++;d.push(l);
441f=Math.max(f,l.frames[3*l.frameCount-3])}u=b.ffd;for(var z in u)for(g in e=c.findSkin(z),h=u[z],h){var i=c.findSlotIndex(g),r=h[g],A;for(A in r){k=r[A];l=new spine.FfdTimeline(k.length);t=e.getAttachment(i,A);if(!t)throw"FFD attachment not found: "+A;l.slotIndex=i;l.attachment=t;s=(v=t.type==spine.AttachmentType.mesh)?t.vertices.length:2*(t.weights.length/3);p=n=0;for(o=k.length;p<o;p++){var q=k[p],D;if(q.vertices){var C=q.vertices;D=[];D.length=s;var I=q.offset||0;w=C.length;if(1==this.scale)for(j=
4420;j<w;j++)D[j+I]=C[j];else for(j=0;j<w;j++)D[j+I]=C[j]*this.scale;if(v){C=t.vertices;j=0;for(w=D.length;j<w;j++)D[j]+=C[j]}}else v?D=t.vertices:(D=[],D.length=s);l.setFrame(n,q.time,D);this.readCurve(l,n,q);n++}d[d.length]=l;f=Math.max(f,l.frames[l.frameCount-1])}}(g=b.drawOrder)||(g=b.draworder);if(g){l=new spine.DrawOrderTimeline(g.length);k=c.slots.length;p=n=0;for(o=g.length;p<o;p++){z=g[p];A=null;if(z.offsets){A=[];A.length=k;for(j=k-1;0<=j;j--)A[j]=-1;q=z.offsets;h=[];h.length=k-q.length;j=
443e=u=0;for(w=q.length;j<w;j++){r=q[j];i=c.findSlotIndex(r.slot);if(-1==i)throw"Slot not found: "+r.slot;for(;u!=i;)h[e++]=u++;A[u+r.offset]=u++}for(;u<k;)h[e++]=u++;for(j=k-1;0<=j;j--)-1==A[j]&&(A[j]=h[--e])}l.setFrame(n++,z.time,A)}d.push(l);f=Math.max(f,l.frames[l.getFrameCount()-1])}if(b=b.events){l=new spine.EventTimeline(b.length);p=n=0;for(o=b.length;p<o;p++){g=b[p];k=c.findEvent(g.name);if(!k)throw"Event not found: "+g.name;z=new spine.Event(k);z.intValue=g.hasOwnProperty("int")?g["int"]:k.intValue;
444z.floatValue=g.hasOwnProperty("float")?g["float"]:k.floatValue;z.stringValue=g.hasOwnProperty("string")?g.string:k.stringValue;l.setFrame(n++,g.time,z)}d.push(l);f=Math.max(f,l.frames[l.getFrameCount()-1])}c.animations.push(new spine.Animation(a,d,f))},readCurve:function(a,b,c){(c=c.curve)?"stepped"==c?a.curves.setStepped(b):c instanceof Array&&a.curves.setCurve(b,c[0],c[1],c[2],c[3]):a.curves.setLinear(b)},toColor:function(a,b){if(8!=a.length)throw"Color hexidecimal length must be 8, recieved: "+
445a;return parseInt(a.substring(2*b,2*b+2),16)/255},getFloatArray:function(a,b,c){var a=a[b],b=new spine.Float32Array(a.length),d=0,f=a.length;if(1==c)for(;d<f;d++)b[d]=a[d];else for(;d<f;d++)b[d]=a[d]*c;return b},getIntArray:function(a,b){for(var c=a[b],d=new spine.Uint16Array(c.length),f=0,e=c.length;f<e;f++)d[f]=c[f]|0;return d}};
446spine.Atlas=function(a,b){this.textureLoader=b;this.pages=[];this.regions=[];var c=new spine.AtlasReader(a),d=[];d.length=4;for(var f=null;;){var e=c.readLine();if(null===e)break;e=c.trim(e);if(e.length)if(f){var g=new spine.AtlasRegion;g.name=e;g.page=f;g.rotate="true"==c.readValue();c.readTuple(d);var e=parseInt(d[0]),h=parseInt(d[1]);c.readTuple(d);var i=parseInt(d[0]),j=parseInt(d[1]);g.u=e/f.width;g.v=h/f.height;g.rotate?(g.u2=(e+j)/f.width,g.v2=(h+i)/f.height):(g.u2=(e+i)/f.width,g.v2=(h+j)/
447f.height);g.x=e;g.y=h;g.width=Math.abs(i);g.height=Math.abs(j);4==c.readTuple(d)&&(g.splits=[parseInt(d[0]),parseInt(d[1]),parseInt(d[2]),parseInt(d[3])],4==c.readTuple(d)&&(g.pads=[parseInt(d[0]),parseInt(d[1]),parseInt(d[2]),parseInt(d[3])],c.readTuple(d)));g.originalWidth=parseInt(d[0]);g.originalHeight=parseInt(d[1]);c.readTuple(d);g.offsetX=parseInt(d[0]);g.offsetY=parseInt(d[1]);g.index=parseInt(c.readValue());this.regions.push(g)}else f=new spine.AtlasPage,f.name=e,2==c.readTuple(d)&&(f.width=
448parseInt(d[0]),f.height=parseInt(d[1]),c.readTuple(d)),f.format=spine.Atlas.Format[d[0]],c.readTuple(d),f.minFilter=spine.Atlas.TextureFilter[d[0]],f.magFilter=spine.Atlas.TextureFilter[d[1]],g=c.readValue(),f.uWrap=spine.Atlas.TextureWrap.clampToEdge,f.vWrap=spine.Atlas.TextureWrap.clampToEdge,"x"==g?f.uWrap=spine.Atlas.TextureWrap.repeat:"y"==g?f.vWrap=spine.Atlas.TextureWrap.repeat:"xy"==g&&(f.uWrap=f.vWrap=spine.Atlas.TextureWrap.repeat),b.load(f,e,this),this.pages.push(f);else f=null}};
449spine.Atlas.prototype={findRegion:function(a){for(var b=this.regions,c=0,d=b.length;c<d;c++)if(b[c].name==a)return b[c];return null},dispose:function(){for(var a=this.pages,b=0,c=a.length;b<c;b++)this.textureLoader.unload(a[b].rendererObject)},updateUVs:function(a){for(var b=this.regions,c=0,d=b.length;c<d;c++){var f=b[c];f.page==a&&(f.u=f.x/a.width,f.v=f.y/a.height,f.rotate?(f.u2=(f.x+f.height)/a.width,f.v2=(f.y+f.width)/a.height):(f.u2=(f.x+f.width)/a.width,f.v2=(f.y+f.height)/a.height))}}};
450spine.Atlas.Format={alpha:0,intensity:1,luminanceAlpha:2,rgb565:3,rgba4444:4,rgb888:5,rgba8888:6};spine.Atlas.TextureFilter={nearest:0,linear:1,mipMap:2,mipMapNearestNearest:3,mipMapLinearNearest:4,mipMapNearestLinear:5,mipMapLinearLinear:6};spine.Atlas.TextureWrap={mirroredRepeat:0,clampToEdge:1,repeat:2};spine.AtlasPage=function(){};spine.AtlasPage.prototype={name:null,format:null,minFilter:null,magFilter:null,uWrap:null,vWrap:null,rendererObject:null,width:0,height:0};spine.AtlasRegion=function(){};
451spine.AtlasRegion.prototype={page:null,name:null,x:0,y:0,width:0,height:0,u:0,v:0,u2:0,v2:0,offsetX:0,offsetY:0,originalWidth:0,originalHeight:0,index:0,rotate:!1,splits:null,pads:null};spine.AtlasReader=function(a){this.lines=a.split(/\r\n|\r|\n/)};
452spine.AtlasReader.prototype={index:0,trim:function(a){return a.replace(/^\s+|\s+$/g,"")},readLine:function(){return this.index>=this.lines.length?null:this.lines[this.index++]},readValue:function(){var a=this.readLine(),b=a.indexOf(":");if(-1==b)throw"Invalid line: "+a;return this.trim(a.substring(b+1))},readTuple:function(a){var b=this.readLine(),c=b.indexOf(":");if(-1==c)throw"Invalid line: "+b;for(var d=0,c=c+1;3>d;d++){var f=b.indexOf(",",c);if(-1==f)break;a[d]=this.trim(b.substr(c,f-c));c=f+
4531}a[d]=this.trim(b.substring(c));return d+1}};spine.AtlasAttachmentLoader=function(a){this.atlas=a};
454spine.AtlasAttachmentLoader.prototype={newRegionAttachment:function(a,b,c){a=this.atlas.findRegion(c);if(!a)throw"Region not found in atlas: "+c+" (region attachment: "+b+")";b=new spine.RegionAttachment(b);b.rendererObject=a;b.setUVs(a.u,a.v,a.u2,a.v2,a.rotate);b.regionOffsetX=a.offsetX;b.regionOffsetY=a.offsetY;b.regionWidth=a.width;b.regionHeight=a.height;b.regionOriginalWidth=a.originalWidth;b.regionOriginalHeight=a.originalHeight;return b},newMeshAttachment:function(a,b,c){a=this.atlas.findRegion(c);
455if(!a)throw"Region not found in atlas: "+c+" (mesh attachment: "+b+")";b=new spine.MeshAttachment(b);b.rendererObject=a;b.regionU=a.u;b.regionV=a.v;b.regionU2=a.u2;b.regionV2=a.v2;b.regionRotate=a.rotate;b.regionOffsetX=a.offsetX;b.regionOffsetY=a.offsetY;b.regionWidth=a.width;b.regionHeight=a.height;b.regionOriginalWidth=a.originalWidth;b.regionOriginalHeight=a.originalHeight;return b},newSkinnedMeshAttachment:function(a,b,c){a=this.atlas.findRegion(c);if(!a)throw"Region not found in atlas: "+c+
456" (skinned mesh attachment: "+b+")";b=new spine.SkinnedMeshAttachment(b);b.rendererObject=a;b.regionU=a.u;b.regionV=a.v;b.regionU2=a.u2;b.regionV2=a.v2;b.regionRotate=a.rotate;b.regionOffsetX=a.offsetX;b.regionOffsetY=a.offsetY;b.regionWidth=a.width;b.regionHeight=a.height;b.regionOriginalWidth=a.originalWidth;b.regionOriginalHeight=a.originalHeight;return b},newBoundingBoxAttachment:function(a,b){return new spine.BoundingBoxAttachment(b)}};
457spine.SkeletonBounds=function(){this.polygonPool=[];this.polygons=[];this.boundingBoxes=[]};
458spine.SkeletonBounds.prototype={minX:0,minY:0,maxX:0,maxY:0,update:function(a,b){for(var c=a.slots,d=c.length,f=a.x,e=a.y,g=this.boundingBoxes,h=this.polygonPool,i=this.polygons,j=g.length=0,k=i.length;j<k;j++)h.push(i[j]);for(j=i.length=0;j<d;j++){var k=c[j],l=k.attachment;if(l&&l.type==spine.AttachmentType.boundingbox){g.push(l);var n=h.length,p;0<n?(p=h[n-1],h.splice(n-1,1)):p=[];i.push(p);p.length=l.vertices.length;l.computeWorldVertices(f,e,k.bone,p)}}b&&this.aabbCompute()},aabbCompute:function(){for(var a=
459this.polygons,b=Number.MAX_VALUE,c=Number.MAX_VALUE,d=Number.MIN_VALUE,f=Number.MIN_VALUE,e=0,g=a.length;e<g;e++)for(var h=a[e],i=0,j=h.length;i<j;i+=2)var k=h[i],l=h[i+1],b=Math.min(b,k),c=Math.min(c,l),d=Math.max(d,k),f=Math.max(f,l);this.minX=b;this.minY=c;this.maxX=d;this.maxY=f},aabbContainsPoint:function(a,b){return a>=this.minX&&a<=this.maxX&&b>=this.minY&&b<=this.maxY},aabbIntersectsSegment:function(a,b,c,d){var f=this.minX,e=this.minY,g=this.maxX,h=this.maxY;if(a<=f&&c<=f||b<=e&&d<=e||a>=
460g&&c>=g||b>=h&&d>=h)return!1;c=(d-b)/(c-a);d=c*(f-a)+b;if(d>e&&d<h)return!0;d=c*(g-a)+b;if(d>e&&d<h)return!0;e=(e-b)/c+a;if(e>f&&e<g)return!0;e=(h-b)/c+a;return e>f&&e<g?!0:!1}
460,aabbIntersectsSkeleton:function(a){return this.minX<a.maxX&&this.maxX>a.minX&&this.minY<a.maxY&&this.maxY>a.minY},containsPoint:function(a,b){for(var c=this.polygons,d=0,f=c.length;d<f;d++)if(this.polygonContainsPoint(c[d],a,b))return this.boundingBoxes[d];return null},intersectsSegment:function(a,b,c,d){for(var f=this.polygons,
461e=0,g=f.length;e<g;e++)if(f[e].intersectsSegment(a,b,c,d))return this.boundingBoxes[e];return null},polygonContainsPoint:function(a,b,c){for(var d=a.length,f=d-2,e=!1,g=0;g<d;g+=2){var h=a[g+1],i=a[f+1];if(h<c&&i>=c||i<c&&h>=c){var j=a[g];j+(c-h)/(i-h)*(a[f]-j)<b&&(e=!e)}f=g}return e},polygonIntersectsSegment:function(a,b,c,d,f){for(var e=a.length,g=b-d,h=c-f,i=b*f-c*d,j=a[e-2],k=a[e-1],l=0;l<e;l+=2){var n=a[l],p=a[l+1],o=j*p-k*n,q=j-n,s=k-p,r=g*s-h*q,q=(i*q-g*o)/r;if((q>=j&&q<=n||q>=n&&q<=j)&&(q>=
462b&&q<=d||q>=d&&q<=b))if(j=(i*s-h*o)/r,(j>=k&&j<=p||j>=p&&j<=k)&&(j>=c&&j<=f||j>=f&&j<=c))return!0;j=n;k=p}return!1},getPolygon:function(a){a=this.boundingBoxes.indexOf(a);return-1==a?null:this.polygons[a]},getWidth:function(){return this.maxX-this.minX},getHeight:function(){return this.maxY-this.minY}};spine.SkeletonImageBounds=function(){this.polygonPool=[];this.polygons=[]};
463spine.SkeletonImageBounds.prototype={minX:0,minY:0,maxX:0,maxY:0,update:function(a,b){for(var c=a.slots,d=c.length,f=a.x,e=a.y,g=this.polygonPool,h=this.polygons,i=0,j=h.length;i<j;i++)g.push(h[i]);for(i=h.length=0;i<d;i++){var j=c[i],k=j.attachment;if(k&&k.type==spine.AttachmentType.region){var l=g.length,n;0<l?(n=g[l-1],g.splice(l-1,1)):n=[];h.push(n);n.length=8;k.computeVertices(f,e,j.bone,n)}}b&&this.aabbCompute()},aabbCompute:function(){for(var a=this.polygons,b=Number.MAX_VALUE,c=Number.MAX_VALUE,
464d=Number.MIN_VALUE,f=Number.MIN_VALUE,e=0,g=a.length;e<g;e++)for(var h=a[e],i=0,j=h.length;i<j;i+=2)var k=h[i],l=h[i+1],b=Math.min(b,k),c=Math.min(c,l),d=Math.max(d,k),f=Math.max(f,l);this.minX=b;this.minY=c;this.maxX=d;this.maxY=f},aabbContainsPoint:function(a,b){return a>=this.minX&&a<=this.maxX&&b>=this.minY&&b<=this.maxY},aabbIntersectsSegment:function(a,b,c,d){var f=this.minX,e=this.minY,g=this.maxX,h=this.maxY;if(a<=f&&c<=f||b<=e&&d<=e||a>=g&&c>=g||b>=h&&d>=h)return!1;c=(d-b)/(c-a);d=c*(f-a)+
465b;if(d>e&&d<h)return!0;d=c*(g-a)+b;if(d>e&&d<h)return!0;e=(e-b)/c+a;if(e>f&&e<g)return!0;e=(h-b)/c+a;return e>f&&e<g?!0:!1},aabbIntersectsSkeleton:function(a){return this.minX<a.maxX&&this.maxX>a.minX&&this.minY<a.maxY&&this.maxY>a.minY},containsPoint:function(a,b){for(var c=this.polygons,d=0,f=c.length;d<f;d++)if(this.polygonContainsPoint(c[d],a,b))return this.boundingBoxes[d];return null},intersectsSegment:function(a,b,c,d){for(var f=this.polygons,e=0,g=f.length;e<g;e++)if(f[e].intersectsSegment(a,
466b,c,d))return this.boundingBoxes[e];return null},polygonContainsPoint:function(a,b,c){for(var d=a.length,f=d-2,e=!1,g=0;g<d;g+=2){var h=a[g+1],i=a[f+1];if(h<c&&i>=c||i<c&&h>=c){var j=a[g];j+(c-h)/(i-h)*(a[f]-j)<b&&(e=!e)}f=g}return e},polygonIntersectsSegment:function(a,b,c,d,f){for(var e=a.length,g=b-d,h=c-f,i=b*f-c*d,j=a[e-2],k=a[e-1],l=0;l<e;l+=2){var n=a[l],p=a[l+1],o=j*p-k*n,q=j-n,s=k-p,r=g*s-h*q,q=(i*q-g*o)/r;if((q>=j&&q<=n||q>=n&&q<=j)&&(q>=b&&q<=d||q>=d&&q<=b))if(j=(i*s-h*o)/r,(j>=k&&j<=p||
467j>=p&&j<=k)&&(j>=c&&j<=f||j>=f&&j<=c))return!0;j=n;k=p}return!1},getPolygon:function(a){a=this.boundingBoxes.indexOf(a);return-1==a?null:this.polygons[a]},getWidth:function(){return this.maxX-this.minX},getHeight:function(){return this.maxY-this.minY}};
468(function(a,b){function c(a,b,e,d){c._super_.call(this);this.reset(a,b,e,d)}function d(a,b,c,e){d._super_.call(this);this.x=a;this.y=b;this.width=c;this.height=e}function f(a,b){f._super_.call(this);this.x=a;this.y=b}function e(a,b,c){e._super_.call(this);this.x=a;this.y=b;this.radius=c;this.angle=0;this.center={x:this.x,y:this.y}}function g(a,b,c,e,d){g._super_.call(this);0<=c-a?(this.x1=a,this.y1=b,this.x2=c,this.y2=e):(this.x1=c,this.y1=e,this.x2=a,this.y2=b);this.dx=this.x2-this.x1;this.dy=this.y2-
469this.y1;this.minx=Math.min(this.x1,this.x2);this.miny=Math.min(this.y1,this.y2);this.maxx=Math.max(this.x1,this.x2);this.maxy=Math.max(this.y1,this.y2);this.dot=this.x2*this.y1-this.x1*this.y2;this.xxyy=this.dx*this.dx+this.dy*this.dy;this.gradient=this.getGradient();this.length=this.getLength();this.direction=m.Util.initValue(d,">")}function h(){this.vector=new m.Vector2D(0,0);this.random=0;this.crossType="dead";this.alert=!0}function i(a,b){i._super_.call(this,a,b);(this.gl=this.element.getContext("experimental-webgl",
470{antialias:!0,stencil:!1,depth:!1}
470))||alert("Sorry your browser do not suppest WebGL!");this.initVar();this.setMaxRadius();this.initShaders();this.initBuffers();this.gl.blendEquation(this.gl.FUNC_ADD);this.gl.blendFunc(this.gl.SRC_ALPHA,this.gl.ONE_MINUS_SRC_ALPHA);this.gl.enable(this.gl.BLEND)}function j(a,b,c){j._super_.call(this,a,b);this.context=this.element.getContext("2d");this.rectangle=this.imageData=null;this.rectangle=c;this.createImageData(c)}function k(a,b){k._super_.call(this,a,b);this.stroke=
471null;this.context=this.element.getContext("2d");this.bufferCache={}}function l(a,b,c){l._super_.call(this,a,b);this.stroke=c}function n(a,b){n._super_.call(this,a,b);this.stroke=null}function p(a,b,c){this.proton=a;this.element=b;this.stroke=c}function o(a,b,c){this.element=c;this.type=m.Util.initValue(a,"canvas");this.proton=b;this.renderer=this.getRenderer()}function q(b,c,e){this.mouseTarget=m.Util.initValue(b,a);this.ease=m.Util.initValue(c,0.7);this._allowEmitting=!1;this.initEventHandler();
472q._super_.call(this,e)}function s(a){this.selfBehaviours=[];s._super_.call(this,a)}function r(a){this.initializes=[];this.particles=[];this.behaviours=[];this.emitTime=0;this.emitTotalTimes=-1;this.damping=0.006;this.bindEmitter=!0;this.rate=new m.Rate(1,0.1);r._super_.call(this,a);this.id="emitter_"+r.ID++}function t(a,b,c,e){t._super_.call(this,c,e);this.distanceVec=new m.Vector2D;this.centerPoint=m.Util.initValue(a,new m.Vector2D);this.force=m.Util.initValue(this.normalizeValue(b),100);this.name=
473"GravityWell"}function v(a,b,c,e){v._super_.call(this,c,e);this.reset(a,b);this.name="Color"}function u(a,b,c,e,d){u._super_.call(this,e,d);this.reset(a,b,c);this.name="Rotate"}function w(a,b,c,e){w._super_.call(this,c,e);this.reset(a,b);this.name="Scale"}function z(a,b,c,e){z._super_.call(this,c,e);this.reset(a,b);this.name="Alpha"}function A(a,b,c,e){A._super_.call(this,c,e);this.reset(a,b);this.name="CrossZone"}function D(a,b,c,e,d){D._super_.call(this,e,d);this.reset(a,b,c);this.name="Collision"}
474function C(a,b,c){C._super_.call(this,0,a,b,c);this.name="Gravity"}function I(a,b,c,e,d){I._super_.call(this,a,b,c,e,d);this.force*=-1;this.name="Repulsion"}function S(a,b,c,e,d){S._super_.call(this,e,d);this.reset(a,b,c);this.time=0;this.name="RandomDrift"}function da(a,b,c,e,d){da._super_.call(this,e,d);this.targetPosition=m.Util.initValue(a,new m.Vector2D);this.radius=m.Util.initValue(c,1E3);this.force=m.Util.initValue(this.normalizeValue(b),100);this.radiusSq=this.radius*this.radius;this.attractionForce=
475new m.Vector2D;this.lengthSq=0;this.name="Attraction"}function P(a,b,c,e){P._super_.call(this,c,e);this.force=this.normalizeForce(new m.Vector2D(a,b));this.name="Force"}function W(a,b,c){W._super_.call(this);this.image=this.setSpanValue(a);this.w=m.Util.initValue(b,20);this.h=m.Util.initValue(c,this.w)}function N(a,b,c){N._super_.call(this);this.radius=m.Util.setSpanValue(a,b,c)}function B(a,b,c){B._super_.call(this);this.massPan=m.Util.setSpanValue(a,b,c)}function U(a,b,c){U._super_.call(this);this.rPan=
476m.Util.setSpanValue(a);this.thaPan=m.Util.setSpanValue(b);this.type=m.Util.initValue(c,"vector")}function Y(a){Y._super_.call(this);this.zone=m.Util.initValue(a,new m.PointZone)}function E(a,b,c){E._super_.call(this);this.lifePan=m.Util.setSpanValue(a,b,c)}function x(){}function V(a,b){this.numPan=m.Util.initValue(a,1);this.timePan=m.Util.initValue(b,1);this.numPan=m.Util.setSpanValue(this.numPan);this.timePan=m.Util.setSpanValue(this.timePan);this.nextTime=this.startTime=0;this.init()}function F(a,
477b){this.id="Behaviour_"+F.id++;this.life=m.Util.initValue(a,Infinity);this.easing=m.ease.setEasingByName(b);this.age=0;this.energy=1;this.dead=!1;this.parents=[];this.name="Behaviour"}function H(a,b,c,e){this.x=a;this.y=b;this.width=c;this.height=e;this.bottom=this.y+this.height;this.right=this.x+this.width}function aa(a){m.Util.isArray(a)?this.colorArr=a:this.colorArr=[a]}function ea(a,b,c){this.isArray=!1;m.Util.isArray(a)?(this.isArray=!0,this.a=a):(this.a=m.Util.initValue(a,1),this.b=m.Util.initValue(b,
478this.a),this.center=m.Util.initValue(c,!1))}function ba(a,b){this.proParticleCount=m.Util.initValue(a,0);this.releaseTime=m.Util.initValue(b,-1);this.poolList=[];for(var c=this.timeoutID=0;c<this.proParticleCount;c++)this.add();0<this.releaseTime&&(this.timeoutID=setTimeout(this.release,this.releaseTime/1E3))}function fa(a){this.id="particle_"+fa.ID++;this.reset(!0);m.Util.setPrototypeByObject(this,a)}function qa(){this.mats=[];for(var a=this.size=0;20>a;a++)this.mats.push(m.Mat3.create([0,0,0,0,
4790,0,0,0,0]))}function ma(){this.initialize()}function m(a,b){this.proParticleCount=m.Util.initValue(a,m.POOL_MAX);this.integrationType=m.Util.initValue(b,m.EULER);this.emitters=[];this.renderers=[];this.oldTime=this.time=0;m.pool=new m.ParticlePool(this.proParticleCount);m.integrator=new m.NumericalIntegration(this.integrationType)}m.POOL_MAX=1E3;m.TIME_STEP=60;m.MEASURE=100;m.EULER="euler";m.RK2="runge-kutta2";m.RK4="runge-kutta4";m.VERLET="verlet";m.PARTICLE_CREATED="partilcleCreated";m.PARTICLE_UPDATE=
480"partilcleUpdate";m.PARTICLE_SLEEP="particleSleep";m.PARTICLE_DEAD="partilcleDead";m.PROTON_UPDATE="protonUpdate";m.PROTON_UPDATE_AFTER="protonUpdateAfter";m.EMITTER_ADDED="emitterAdded";m.EMITTER_REMOVED="emitterRemoved";m.amendChangeTabsBug=!0;m.TextureBuffer={};m.TextureCanvasBuffer={};m.prototype={addRender:function(a){a.proton=this;this.renderers.push(a.proton)},addEmitter:function(a){this.emitters.push(a);a.parent=this;this.dispatchEvent(new m.Event({type:m.EMITTER_ADDED,emitter:a}))},removeEmitter:function(a){this.emitters.splice(this.emitters.indexOf(a),
4811);a.parent=null;this.dispatchEvent(new m.Event({type:m.EMITTER_REMOVED,emitter:a}))},update:function(){this.dispatchEvent(new m.Event({type:m.PROTON_UPDATE}));this.oldTime||(this.oldTime=(new Date).getTime());var a=(new Date).getTime();this.elapsed=(a-this.oldTime)/1E3;m.amendChangeTabsBug&&this.amendChangeTabsBug();this.oldTime=a;if(0<this.elapsed)for(a=0;a<this.emitters.length;a++)this.emitters[a].update(this.elapsed);this.dispatchEvent(new m.Event({type:m.PROTON_UPDATE_AFTER}))},amendChangeTabsBug:function(){0.5<
482this.elapsed&&(this.oldTime=(new Date).getTime(),this.elapsed=0)},getCount:function(){for(var a=0,b=this.emitters.length,c=0;c<b;c++)a+=this.emitters[c].particles.length;return a},destory:function(){for(var a=this.emitters.length,b=0;b<a;b++)this.emitters[b].destory(),delete this.emitters[b];this.emitters=[];this.oldTime=this.time=0;m.pool.release()}};a.Proton=m;var Z=ma.prototype;ma.initialize=function(a){a.addEventListener=Z.addEventListener;a.removeEventListener=Z.removeEventListener;a.removeAllEventListeners=
483Z.removeAllEventListeners;a.hasEventListener=Z.hasEventListener;a.dispatchEvent=Z.dispatchEvent};Z._listeners=null;Z.initialize=function(){};Z.addEventListener=function(a,b){var c=this._listeners;c?this.removeEventListener(a,b):c=this._listeners={};var e=c[a];e||(e=c[a]=[]);e.push(b);return b};Z.removeEventListener=function(a,b){var c=this._listeners;if(c){var e=c[a];if(e)for(var d=0,f=e.length;d<f;d++)if(e[d]==b){1==f?delete c[a]:e.splice(d,1);break}}};Z.removeAllEventListeners=function(a){a?this._listeners&&
484delete this._listeners[a]:this._listeners=null};Z.dispatchEvent=function(a){var b=!1,c=this._listeners;if(a&&c){c=c[a.type];if(!c)return b;for(var c=c.slice(),e=0,d=c.length;e<d;e++)var f=c[e],b=b||f(a)}return!!b};Z.hasEventListener=function(a){var b=this._listeners;return!!b&&!!b[a]};m.EventDispatcher=ma;m.EventDispatcher.initialize(m.prototype);m.Event=function(a){this.type=a.type;this.particle=a.particle;this.emitter=a.emitter};var X=X||{initValue:function(a,c){return a=null!=a&&a!=b?a:c},isArray:function(a){return"object"==
485typeof a&&a.hasOwnProperty("length")},destroyArray:function(a){a.length=0},destroyObject:function(a){for(var b in a)delete a[b]},getVector2D:function(a,b){return"object"==typeof a?a:new m.Vector2D(a,b)},judgeVector2D:function(a){var b="";if(a.hasOwnProperty("x")||a.hasOwnProperty("y")||a.hasOwnProperty("p")||a.hasOwnProperty("position"))b+="p";if(a.hasOwnProperty("vx")||a.hasOwnProperty("vx")||a.hasOwnProperty("v")||a.hasOwnProperty("velocity"))b+="v";if(a.hasOwnProperty("ax")||a.hasOwnProperty("ax")||
486a.hasOwnProperty("a")||a.hasOwnProperty("accelerate"))b+="a";return b},setVector2DByObject:function(a,b){b.hasOwnProperty("x")&&(a.p.x=b.x);b.hasOwnProperty("y")&&(a.p.y=b.y);b.hasOwnProperty("vx")&&(a.v.x=b.vx);b.hasOwnProperty("vy")&&(a.v.y=b.vy);b.hasOwnProperty("ax")&&(a.a.x=b.ax);b.hasOwnProperty("ay")&&(a.a.y=b.ay);b.hasOwnProperty("p")&&particle.p.copy(b.p);b.hasOwnProperty("v")&&particle.v.copy(b.v);b.hasOwnProperty("a")&&particle.a.copy(b.a);b.hasOwnProperty("position")&&particle.p.copy(b.position);
487b.hasOwnProperty("velocity")&&particle.v.copy(b.velocity);b.hasOwnProperty("accelerate")&&particle.a.copy(b.accelerate)},addPrototypeByObject:function(a,b,c){for(var e in b)c?0>c.indexOf(e)&&(a[e]=m.Util.getSpanValue(b[e])):a[e]=m.Util.getSpanValue(b[e]);return a},setPrototypeByObject:function(a,b,c){for(var e in b)a.hasOwnProperty(e)&&(c?0>c.indexOf(e)&&(a[e]=m.Util.getSpanValue(b[e])):a[e]=m.Util.getSpanValue(b[e]));return a},setSpanValue:function(a,b,c){return a instanceof m.Span?a:b?c?new m.Span(a,
488b,c):new m.Span(a,b):new m.Span(a)},getSpanValue:function(a){return a instanceof m.Span?a.getValue():a},inherits:function(a,b){a._super_=b;if(Object.create)a.prototype=Object.create(b.prototype,{constructor:{value:b}});else{var c=function(){};c.prototype=b.prototype;a.prototype=new c;a.prototype.constructor=a}},getImageData:function(a,b,c){a.drawImage(b,c.x,c.y);b=a.getImageData(c.x,c.y,c.width,c.height);a.clearRect(c.x,c.y,c.width,c.height);return b},getImage:function(a,b,c,e){"string"==typeof a?
489this.loadAndSetImage(a,b,c,e):"object"==typeof a?this.loadAndSetImage(a.src,b,c,e):a instanceof Image&&this.loadedImage(a.src,b,c,e,a)},loadedImage:function(a,b,c,e,d){b.target=d;b.transform.src=a;m.TextureBuffer[a]||(m.TextureBuffer[a]=b.target);c&&(m.TextureCanvasBuffer[a]?b.transform.canvas=m.TextureCanvasBuffer[a]:(c=m.WebGLUtil.nhpot(b.target.width),d=m.WebGLUtil.nhpot(b.target.height),b.transform.canvas=m.DomUtil.createCanvas("canvas"+a,c,d),b.transform.canvas.getContext("2d").drawImage(b.target,
4900,0,b.target.width,b.target.height),m.TextureCanvasBuffer[a]=b.transform.canvas));e&&e(b)},loadAndSetImage:function(a,b,c,e){if(m.TextureBuffer[a])this.loadedImage(a,b,c,e,m.TextureBuffer[a]);else{var d=this,f=new Image;f.onload=function(f){d.loadedImage(a,b,c,e,f.target)};f.src=a}},hexToRGB:function(a){var b="#"==a.charAt(0)?a.substring(1,7):a,a=parseInt(b.substring(0,2),16),c=parseInt(b.substring(2,4),16),b=parseInt(b.substring(4,6),16);return{r:a,g:c,b:b}},rgbToHex:function(a){return"rgb("+a.r+
491", "+a.g+", "+a.b+")"}};m.Util=X;var ya=ya||{ipot:function(a){return 0==(a&a-1)},nhpot:function(a){--a;for(var b=1;32>b;b<<=1)a|=a>>b;return a+1},makeTranslation:function(a,b){return[1,0,0,0,1,0,a,b,1]},makeRotation:function(a){var b=Math.cos(a),a=Math.sin(a);return[b,-a,0,a,b,0,0,0,1]},makeScale:function(a,b){return[a,0,0,0,b,0,0,0,1]},matrixMultiply:function(a,b){var c=a[0],e=a[1],d=a[2],f=a[3],g=a[4],h=a[5],i=a[6],j=a[7],k=a[8],l=b[0],m=b[1],o=b[2],n=b[3],q=b[4],r=b[5],p=b[6],s=b[7],t=b[8];return[c*
492l+e*n+d*p,c*m+e*q+d*s,c*o+e*r+d*t,f*l+g*n+h*p,f*m+g*q+h*s,f*o+g*r+h*t,i*l+j*n+k*p,i*m+j*q+k*s,i*o+j*r+k*t]}};m.WebGLUtil=ya;var Ha=Ha||{createCanvas:function(a,b,c,e){var d=document.createElement("canvas");d.id=a;d.width=b;d.height=c;d.style.position=e?e:"absolute";d.style.opacity=0;this.transformDom(d,-500,-500,0,0);return d},transformDom:function(a,b,c,e,d){a.style.WebkitTransform="translate("+b+"px, "+c+"px) scale("+e+") rotate("+d+"deg)";a.style.MozTransform="translate("+b+"px, "+c+"px) scale("+
493e+") rotate("+d+"deg)";a.style.OTransform="translate("+b+"px, "+c+"px) scale("+e+") rotate("+d+"deg)";a.style.msTransform="translate("+b+"px, "+c+"px) scale("+e+") rotate("+d+"deg)";a.style.transform="translate("+b+"px, "+c+"px) scale("+e+") rotate("+d+"deg)"}};m.DomUtil=Ha;qa.prototype.set=function(a,b){0==b?m.Mat3.set(a,this.mats[0]):m.Mat3.multiply(this.mats[b-1],a,this.mats[b]);this.size=Math.max(this.size,b+1)};qa.prototype.push=function(a){0==this.size?m.Mat3.set(a,this.mats[0]):m.Mat3.multiply(this.mats[this.size-
4941],a,this.mats[this.size]);this.size++};qa.prototype.pop=function(){0<this.size&&this.size--};qa.prototype.top=function(){return this.mats[this.size-1]};m.MStack=qa;fa.ID=0;fa.prototype={getDirection:function(){return Math.atan2(this.v.x,-this.v.y)*(180/Math.PI)},reset:function(a){this.life=Infinity;this.age=0;this.energy=1;this.sleep=this.dead=!1;this.parent=this.sprite=this.target=null;this.mass=1;this.radius=10;this.scale=this.alpha=1;this.rotation=0;this.color=null;this.easing=m.ease.setEasingByName(m.easeLinear);
495a?(this.transform={},this.p=new m.Vector2D,this.v=new m.Vector2D,this.a=new m.Vector2D,this.old={p:new m.Vector2D,v:new m.Vector2D,a:new m.Vector2D},this.behaviours=[]):(m.Util.destroyObject(this.transform),this.p.set(0,0),this.v.set(0,0),this.a.set(0,0),this.old.p.set(0,0),this.old.v.set(0,0),this.old.a.set(0,0),this.removeAllBehaviours());this.transform.rgb={r:255,g:255,b:255};return this},update:function(a,b){if(!this.sleep){this.age+=a;var c=this.behaviours.length,e;for(e=0;e<c;e++)this.behaviours[e]&&
496this.behaviours[e].applyBehaviour(this,a,b)}this.age>=this.life?this.destory():(c=this.easing(this.age/this.life),this.energy=Math.max(1-c,0))},addBehaviour:function(a){this.behaviours.push(a);a.hasOwnProperty("parents")&&a.parents.push(this);a.initialize(this)},addBehaviours:function(a){var b=a.length,c;for(c=0;c<b;c++)this.addBehaviour(a[c])},removeBehaviour:function(a){a=this.behaviours.indexOf(a);-1<a&&(a=this.behaviours.splice(a,1),a.parents=null)},removeAllBehaviours:function(){m.Util.destroyArray(this.behaviours)},
497destory:function(){this.removeAllBehaviours();this.energy=0;this.dead=!0;this.parent=null}};m.Particle=fa;ba.prototype={create:function(a){return a?new newTypeParticle:new m.Particle},getCount:function(){return this.poolList.length},add:function(){return this.poolList.push(this.create())},get:function(){return 0===this.poolList.length?this.create():this.poolList.pop().reset()}
497,set:function(a){if(this.poolList.length<m.POOL_MAX)return this.poolList.push(a)},release:function(){for(var a=0;a<this.poolList.length;a++)this.poolList[a].destory&&
498this.poolList[a].destory(),delete this.poolList[a];this.poolList=[]}};m.ParticlePool=ba;var ra={randomAToB:function(a,b,c){return c?Math.floor(Math.random()*(b-a))+a:a+Math.random()*(b-a)},randomFloating:function(a,b,c){return ra.randomAToB(a-b,a+b,c)},randomZone:function(){},degreeTransform:function(a){return a*Math.PI/180},toColor16:function(a){return"#"+a.toString(16)},randomColor:function(){return"#"+("00000"+(16777216*Math.random()<<0).toString(16)).slice(-6)}};m.MathUtils=ra;X=function(a){this.type=
499m.Util.initValue(a,m.EULER)};X.prototype={integrate:function(a,b,c){this.eulerIntegrate(a,b,c)},eulerIntegrate:function(a,b,c){a.sleep||(a.old.p.copy(a.p),a.old.v.copy(a.v),a.a.multiplyScalar(1/a.mass),a.v.add(a.a.multiplyScalar(b)),a.p.add(a.old.v.multiplyScalar(b)),c&&a.v.multiplyScalar(c),a.a.clear())}};m.NumericalIntegration=X;X=function(a,b){this.x=a||0;this.y=b||0};X.prototype={set:function(a,b){this.x=a;this.y=b;return this},setX:function(a){this.x=a;return this},setY:function(a){this.y=a;
500return this},setComponent:function(a,b){switch(a){case 0:this.x=b;break;case 1:this.y=b;break;default:throw Error("index is out of range: "+a);}},getGradient:function(){if(0!=this.x)return Math.atan2(this.y,this.x);if(0<this.y)return Math.PI/2;if(0>this.y)return-Math.PI/2},getComponent:function(a){switch(a){case 0:return this.x;case 1:return this.y;default:throw Error("index is out of range: "+a);}},copy:function(a){this.x=a.x;this.y=a.y;return this},add:function(a,c){if(c!==b)return this.addVectors(a,
501c);this.x+=a.x;this.y+=a.y;return this},addXY:function(a,b){this.x+=a;this.y+=b;return this},addVectors:function(a,b){this.x=a.x+b.x;this.y=a.y+b.y;return this},addScalar:function(a){this.x+=a;this.y+=a;return this},sub:function(a,c){if(c!==b)return this.subVectors(a,c);this.x-=a.x;this.y-=a.y;return this},subVectors:function(a,b){this.x=a.x-b.x;this.y=a.y-b.y;return this},multiplyScalar:function(a){this.x*=a;this.y*=a;return this},divideScalar:function(a){0!==a?(this.x/=a,this.y/=a):this.set(0,0);
502return this},min:function(a){this.x>a.x&&(this.x=a.x);this.y>a.y&&(this.y=a.y);return this},max:function(a){this.x<a.x&&(this.x=a.x);this.y<a.y&&(this.y=a.y);return this},clamp:function(a,b){this.x<a.x?this.x=a.x:this.x>b.x&&(this.x=b.x);this.y<a.y?this.y=a.y:this.y>b.y&&(this.y=b.y);return this},negate:function(){return this.multiplyScalar(-1)},dot:function(a){return this.x*a.x+this.y*a.y},lengthSq:function(){return this.x*this.x+this.y*this.y},length:function(){return Math.sqrt(this.x*this.x+this.y*
503this.y)},normalize:function(){return this.divideScalar(this.length())},distanceTo:function(a){return Math.sqrt(this.distanceToSquared(a))},rotate:function(a){var b=this.x,c=this.y;this.x=b*Math.cos(a)+c*Math.sin(a);this.y=-b*Math.sin(a)+c*Math.cos(a);return this},distanceToSquared:function(a){var b=this.x-a.x,a=this.y-a.y;return b*b+a*a},setLength:function(a){var b=this.length();0!==b&&a!==b&&this.multiplyScalar(a/b);return this},lerp:function(a,b){this.x+=(a.x-this.x)*b;this.y+=(a.y-this.y)*b;return this},
504equals:function(a){return a.x===this.x&&a.y===this.y},toArray:function(){return[this.x,this.y]},clear:function(){this.y=this.x=0;return this},clone:function(){return new m.Vector2D(this.x,this.y)}};m.Vector2D=X;X=function(a,b){this.r=Math.abs(a)||0;this.tha=b||0};X.prototype={set:function(a,b){this.r=a;this.tha=b;return this},setR:function(a){this.r=a;return this},setTha:function(a){this.tha=a;return this},copy:function(a){this.r=a.r;this.tha=a.tha;return this},toVector:function(){return new m.Vector2D(this.getX(),
505this.getY())},getX:function(){return this.r*Math.sin(this.tha)},getY:function(){return-this.r*Math.cos(this.tha)},normalize:function(){this.r=1;return this},equals:function(a){return a.r===this.r&&a.tha===this.tha},toArray:function(){return[this.r,this.tha]},clear:function(){this.tha=this.r=0;return this},clone:function(){return new m.Polar2D(this.r,this.tha)}};m.Polar2D=X;ea.prototype={getValue:function(a){return this.isArray?this.a[Math.floor(this.a.length*Math.random())]:this.center?m.MathUtils.randomFloating(this.a,
506this.b,a):m.MathUtils.randomAToB(this.a,this.b,a)}};m.Span=ea;m.getSpan=function(a,b,c){return new m.Span(a,b,c)};m.Util.inherits(aa,m.Span);aa.prototype.getValue=function(){var a=this.colorArr[Math.floor(this.colorArr.length*Math.random())];return"random"==a||"Random"==a?m.MathUtils.randomColor():a};m.ColorSpan=aa;H.prototype={contains:function(a,b){return a<=this.right&&a>=this.x&&b<=this.bottom&&b>=this.y?!0:!1}};m.Rectangle=H;var ja=ja||{create:function(a){var b=new Float32Array(9);a&&this.set(a,
507b);return b},set:function(a,b){for(var c=0;9>c;c++)b[c]=a[c];return b},multiply:function(a,b,c){var e=a[0],d=a[1],f=a[2],g=a[3],h=a[4],i=a[6],a=a[7],j=b[0],k=b[1],l=b[2],m=b[3],o=b[4],n=b[6],b=b[7];c[0]=j*e+k*g;c[1]=j*d+k*h;c[2]=f*l;c[3]=m*e+o*g;c[4]=m*d+o*h;c[6]=n*e+b*g+i;c[7]=n*d+b*h+a;return c},inverse:function(a,b){var c=a[0],e=a[1],d=a[3],f=a[4],g=a[6],h=a[7],i=-d,j;j=1/(c*f+e*i);b[0]=f*j;b[1]=-e*j;b[3]=i*j;b[4]=c*j;b[6]=(h*d-f*g)*j;b[7]=(-h*c+e*g)*j;return b},multiplyVec2:function(a,b,c){var e=
508b[0],b=b[1];c[0]=e*a[0]+b*a[3]+a[6];c[1]=e*a[1]+b*a[4]+a[7];return c}};m.Mat3=ja;F.id=0;F.prototype={reset:function(a,b){this.life=m.Util.initValue(a,Infinity);this.easing=m.Util.initValue(b,m.ease.setEasingByName(m.easeLinear))},normalizeForce:function(a){return a.multiplyScalar(m.MEASURE)},normalizeValue:function(a){return a*m.MEASURE},initialize:function(){},applyBehaviour:function(a,b){this.age+=b;if(this.age>=this.life||this.dead)this.energy=0,this.dead=!0,this.destory();else{var c=this.easing(a.age/
509a.life);this.energy=Math.max(1-c,0)}},destory:function(){var a=this.parents.length,b;for(b=0;b<a;b++)this.parents[b].removeBehaviour(this);this.parents=[]}};m.Behaviour=F;V.prototype={init:function(){this.startTime=0;this.nextTime=this.timePan.getValue()},getValue:function(a){this.startTime+=a;return this.startTime>=this.nextTime?(this.startTime=0,this.nextTime=this.timePan.getValue(),1==this.numPan.b?0.5<this.numPan.getValue(!1)?1:0:this.numPan.getValue(!0)):0}};m.Rate=V;x.prototype.reset=function(){};
510x.prototype.init=function(a,b){b?this.initialize(b):this.initialize(a)};x.prototype.initialize=function(){};m.Initialize=x;m.InitializeUtil={initialize:function(a,b,c){var e=c.length,d;for(d=0;d<e;d++)c[d]instanceof m.Initialize?c[d].init(a,b):m.InitializeUtil.init(a,b,c[d]);m.InitializeUtil.bindEmitter(a,b)},init:function(a,b,c){m.Util.setPrototypeByObject(b,c);m.Util.setVector2DByObject(b,c)},bindEmitter:function(a,b){a.bindEmitter&&(b.p.add(a.p),b.v.add(a.v),b.a.add(a.a),b.v.rotate(m.MathUtils.degreeTransform(a.rotation)))}};
511m.Util.inherits(E,m.Initialize);E.prototype.initialize=function(a){Infinity==this.lifePan.a?a.life=Infinity:a.life=this.lifePan.getValue()};m.Life=E;m.Util.inherits(Y,m.Initialize);Y.prototype.reset=function(a){this.zone=m.Util.initValue(a,new m.PointZone)};Y.prototype.initialize=function(a){this.zone.getPosition();a.p.x=this.zone.vector.x;a.p.y=this.zone.vector.y};m.Position=Y;m.P=Y;m.Util.inherits(U,m.Initialize);U.prototype.reset=function(a,b,c){this.rPan=m.Util.setSpanValue(a);this.thaPan=m.Util.setSpanValue(b);
512this.type=m.Util.initValue(c,"vector")};U.prototype.normalizeVelocity=function(a){return a*m.MEASURE};
512U.prototype.initialize=function(a){if("p"==this.type||"P"==this.type||"polar"==this.type){var b=new m.Polar2D(this.normalizeVelocity(this.rPan.getValue()),this.thaPan.getValue()*Math.PI/180);a.v.x=b.getX();a.v.y=b.getY()}else a.v.x=this.normalizeVelocity(this.rPan.getValue()),a.v.y=this.normalizeVelocity(this.thaPan.getValue())};m.Velocity=U;m.V=U;m.Util.inherits(B,m.Initialize);B.prototype.initialize=
513function(a){a.mass=this.massPan.getValue()};m.Mass=B;m.Util.inherits(N,m.Initialize);N.prototype.reset=function(a,b,c){this.radius=m.Util.setSpanValue(a,b,c)};N.prototype.initialize=function(a){a.radius=this.radius.getValue();a.transform.oldRadius=a.radius};m.Radius=N;m.Util.inherits(W,m.Initialize);W.prototype.initialize=function(a){var b=this.image.getValue();"string"==typeof b?a.target={width:this.w,height:this.h,src:b}:a.target=b};W.prototype.setSpanValue=function(a){return a instanceof m.ColorSpan?
514a:new m.ColorSpan(a)};m.ImageTarget=W;m.Util.inherits(P,m.Behaviour);P.prototype.reset=function(a,b,c,e){this.force=this.normalizeForce(new m.Vector2D(a,b));c&&P._super_.prototype.reset.call(this,c,e)};P.prototype.applyBehaviour=function(a,b,c){P._super_.prototype.applyBehaviour.call(this,a,b,c);a.a.add(this.force)};m.Force=P;m.F=P;m.Util.inherits(da,m.Behaviour);da.prototype.reset=function(a,b,c,e,d){this.targetPosition=m.Util.initValue(a,new m.Vector2D);this.radius=m.Util.initValue(c,1E3);this.force=
515m.Util.initValue(this.normalizeValue(b),100);this.radiusSq=this.radius*this.radius;this.attractionForce=new m.Vector2D;this.lengthSq=0;e&&da._super_.prototype.reset.call(this,e,d)};da.prototype.applyBehaviour=function(a,b,c){da._super_.prototype.applyBehaviour.call(this,a,b,c);this.attractionForce.copy(this.targetPosition);this.attractionForce.sub(a.p);this.lengthSq=this.attractionForce.lengthSq();4.0E-6<this.lengthSq&&this.lengthSq<this.radiusSq&&(this.attractionForce.normalize(),this.attractionForce.multiplyScalar(1-
516this.lengthSq/this.radiusSq),this.attractionForce.multiplyScalar(this.force),a.a.add(this.attractionForce))};m.Attraction=da;m.Util.inherits(S,m.Behaviour);S.prototype.reset=function(a,b,c,e,d){this.panFoce=new m.Vector2D(a,b);this.panFoce=this.normalizeForce(this.panFoce);this.delay=c;e&&S._super_.prototype.reset.call(this,e,d)};S.prototype.applyBehaviour=function(a,b,c){S._super_.prototype.applyBehaviour.call(this,a,b,c);this.time+=b;this.time>=this.delay&&(a.a.addXY(m.MathUtils.randomAToB(-this.panFoce.x,
517this.panFoce.x),m.MathUtils.randomAToB(-this.panFoce.y,this.panFoce.y)),this.time=0)};m.RandomDrift=S;m.Util.inherits(I,m.Attraction);I.prototype.reset=function(a,b,c,e,d){I._super_.prototype.reset.call(this,a,b,c,e,d);this.force*=-1};m.Repulsion=I;m.Util.inherits(C,m.Force);C.prototype.reset=function(a,b,c){C._super_.prototype.reset.call(this,0,a,b,c)};m.Gravity=C;m.G=C;m.Util.inherits(D,m.Behaviour);D.prototype.reset=function(a,b,c,e,d){this.emitter=m.Util.initValue(a,null);this.mass=m.Util.initValue(b,
518!0);this.callback=m.Util.initValue(c,null);this.collisionPool=[];this.delta=new m.Vector2D;e&&D._super_.prototype.reset.call(this,e,d)};D.prototype.applyBehaviour=function(a,b,c){for(var b=this.emitter?this.emitter.particles.slice(c):this.pool.slice(c),e,d,f,g,h=b.length,i=0;i<h;i++)c=b[i],c!==a&&(this.delta.copy(c.p),this.delta.sub(a.p),e=this.delta.lengthSq(),distance=a.radius+c.radius,e<=distance*distance&&(d=distance-Math.sqrt(e),d+=0.5,totalMass=a.mass+c.mass,f=this.mass?c.mass/totalMass:0.5,
519g=this.mass?a.mass/totalMass:0.5,a.p.add(this.delta.clone().normalize().multiplyScalar(d*-f)),c.p.add(this.delta.normalize().multiplyScalar(d*g)),this.callback&&this.callback(a,c)))};m.Collision=D;m.Util.inherits(A,m.Behaviour);A.prototype.reset=function(a,b,c,e){this.zone=a;this.zone.crossType=m.Util.initValue(b,"dead");c&&A._super_.prototype.reset.call(this,c,e)};A.prototype.applyBehaviour=function(a,b,c){A._super_.prototype.applyBehaviour.call(this,a,b,c);this.zone.crossing(a)};m.CrossZone=A;m.Util.inherits(z,
520m.Behaviour);z.prototype.reset=function(a,c,e,d){null==c||c==b?this.same=!0:this.same=!1;this.a=m.Util.setSpanValue(m.Util.initValue(a,1));this.b=m.Util.setSpanValue(c);e&&z._super_.prototype.reset.call(this,e,d)};z.prototype.initialize=function(a){a.transform.alphaA=this.a.getValue();this.same?a.transform.alphaB=a.transform.alphaA:a.transform.alphaB=this.b.getValue()};z.prototype.applyBehaviour=function(a,b,c){z._super_.prototype.applyBehaviour.call(this,a,b,c);a.alpha=a.transform.alphaB+(a.transform.alphaA-
521a.transform.alphaB)*this.energy;0.001>a.alpha&&(a.alpha=0)};m.Alpha=z;m.Util.inherits(w,m.Behaviour);w.prototype.reset=function(a,c,e,d){null==c||c==b?this.same=!0:this.same=!1;this.a=m.Util.setSpanValue(m.Util.initValue(a,1));this.b=m.Util.setSpanValue(c);e&&w._super_.prototype.reset.call(this,e,d)};w.prototype.initialize=function(a){a.transform.scaleA=this.a.getValue();a.transform.oldRadius=a.radius;this.same?a.transform.scaleB=a.transform.scaleA:a.transform.scaleB=this.b.getValue()};w.prototype.applyBehaviour=
522function(a,b,c){w._super_.prototype.applyBehaviour.call(this,a,b,c);a.scale=a.transform.scaleB+(a.transform.scaleA-a.transform.scaleB)*this.energy;1.0E-4>a.scale&&(a.scale=0);a.radius=a.transform.oldRadius*a.scale};m.Scale=w;m.Util.inherits(u,m.Behaviour);u.prototype.reset=function(a,c,e,d,f){null==c||c==b?this.same=!0:this.same=!1;this.a=m.Util.setSpanValue(m.Util.initValue(a,"Velocity"));this.b=m.Util.setSpanValue(m.Util.initValue(c,0));this.style=m.Util.initValue(e,"to");d&&u._super_.prototype.reset.call(this,
523d,f)};u.prototype.initialize=function(a){a.rotation=this.a.getValue();a.transform.rotationA=this.a.getValue();this.same||(a.transform.rotationB=this.b.getValue())};u.prototype.applyBehaviour=function(a,b,c){u._super_.prototype.applyBehaviour.call(this,a,b,c);if(this.same){if("V"==this.a.a||"Velocity"==this.a.a||"v"==this.a.a)a.rotation=a.getDirection()}else"to"==this.style||"TO"==this.style||"_"==this.style?a.rotation+=a.transform.rotationB+(a.transform.rotationA-a.transform.rotationB)*this.energy:
524a.rotation+=a.transform.rotationB};m.Rotate=u;m.Util.inherits(v,m.Behaviour);v.prototype.reset=function(a,b,c,e){this.color1=this.setSpanValue(a);this.color2=this.setSpanValue(b);c&&v._super_.prototype.reset.call(this,c,e)};v.prototype.initialize=function(a){a.color=this.color1.getValue();
524a.transform.beginRGB=m.Util.hexToRGB(a.color);this.color2&&(a.transform.endRGB=m.Util.hexToRGB(this.color2.getValue()))};v.prototype.applyBehaviour=function(a,b,c){this.color2?(v._super_.prototype.applyBehaviour.call(this,
525a,b,c),a.transform.rgb.r=a.transform.endRGB.r+(a.transform.beginRGB.r-a.transform.endRGB.r)*this.energy,a.transform.rgb.g=a.transform.endRGB.g+(a.transform.beginRGB.g-a.transform.endRGB.g)*this.energy,a.transform.rgb.b=a.transform.endRGB.b+(a.transform.beginRGB.b-a.transform.endRGB.b)*this.energy,a.transform.rgb.r=parseInt(a.transform.rgb.r,10),a.transform.rgb.g=parseInt(a.transform.rgb.g,10),a.transform.rgb.b=parseInt(a.transform.rgb.b,10)):(a.transform.rgb.r=a.transform.beginRGB.r,a.transform.rgb.g=
526a.transform.beginRGB.g,a.transform.rgb.b=a.transform.beginRGB.b)};v.prototype.setSpanValue=function(a){return a?a instanceof m.ColorSpan?a:new m.ColorSpan(a):null};m.Color=v;m.Util.inherits(t,m.Behaviour);t.prototype.reset=function(a,b,c,e){this.distanceVec=new m.Vector2D;this.centerPoint=m.Util.initValue(a,new m.Vector2D);this.force=m.Util.initValue(this.normalizeValue(b),100);c&&t._super_.prototype.reset.call(this,c,e)};t.prototype.initialize=function(){};t.prototype.applyBehaviour=function(a,b){this.distanceVec.set(this.centerPoint.x-
527a.p.x,this.centerPoint.y-a.p.y);var c=this.distanceVec.lengthSq();if(0!=c){var e=this.distanceVec.length(),c=this.force*b/(c*e);a.v.x+=c*this.distanceVec.x;a.v.y+=c*this.distanceVec.y}};m.GravityWell=t;r.ID=0;m.Util.inherits(r,m.Particle);m.EventDispatcher.initialize(r.prototype);r.prototype.emit=function(a,b){this.emitTime=0;this.emitTotalTimes=m.Util.initValue(a,Infinity);!0==b||"life"==b||"destroy"==b?"once"==a?this.life=1:this.life=this.emitTotalTimes:isNaN(b)||(this.life=b);this.rate.init()};
528r.prototype.stopEmit=function(){this.emitTotalTimes=-1;this.emitTime=0};r.prototype.removeAllParticles=function(){for(var a=0;a<this.particles.length;a++)this.particles[a].dead=!0};r.prototype.createParticle=function(a,b){var c=m.pool.get();this.setupParticle(c,a,b);this.dispatchEvent(new m.Event({type:m.PARTICLE_CREATED,particle:c}));return c};r.prototype.addSelfInitialize=function(a){a.init?a.init(this):this.initAll()};r.prototype.addInitialize=function(){var a=arguments.length,b;for(b=0;b<a;b++)this.initializes.push(arguments[b])};
529r.prototype.removeInitialize=function(a){a=this.initializes.indexOf(a);-1<a&&this.initializes.splice(a,1)};r.prototype.removeInitializers=function(){m.Util.destroyArray(this.initializes)};r.prototype.addBehaviour=function(){var a=arguments.length,b;for(b=0;b<a;b++)this.behaviours.push(arguments[b]),arguments[b].hasOwnProperty("parents")&&arguments[b].parents.push(this)};r.prototype.removeBehaviour=function(a){a=this.behaviours.indexOf(a);-1<a&&this.behaviours.splice(a,1)};r.prototype.removeAllBehaviours=
530function(){m.Util.destroyArray(this.behaviours)};r.prototype.integrate=function(a){var b=1-this.damping;m.integrator.integrate(this,a,b);var c=this.particles.length,e;for(e=0;e<c;e++){var d=this.particles[e];d.update(a,e);m.integrator.integrate(d,a,b);this.dispatchEvent(new m.Event({type:m.PARTICLE_UPDATE,particle:d}))}};r.prototype.emitting=function(a){if("once"==this.emitTotalTimes){var a=this.rate.getValue(99999),b;for(b=0;b<a;b++)this.createParticle();this.emitTotalTimes="none"}else if(!isNaN(this.emitTotalTimes)&&
531(this.emitTime+=a,this.emitTime<this.emitTotalTimes)){a=this.rate.getValue(a);for(b=0;b<a;b++)this.createParticle()}};r.prototype.update=function(a){this.age+=a;(this.age>=this.life||this.dead)&&this.destroy();this.emitting(a);this.integrate(a);var b;for(b=this.particles.length-1;0<=b;b--)a=this.particles[b],a.dead&&(m.pool.set(a),this.particles.splice(b,1),this.dispatchEvent(new m.Event({type:m.PARTICLE_DEAD,particle:a})))};r.prototype.setupParticle=function(a,b,c){var e=this.initializes,d=this.behaviours;
532b&&(b instanceof Array?e=b:e=[b]);c&&(c instanceof Array?d=c:d=[c]);m.InitializeUtil.initialize(this,a,e);a.addBehaviours(d);a.parent=this;this.particles.push(a)};r.prototype.destroy=function(){this.dead=!0;this.emitTotalTimes=-1;
5320==this.particles.length&&(this.removeInitializers(),this.removeAllBehaviours(),this.parent&&this.parent.removeEmitter(this))};m.Emitter=r;m.Util.inherits(s,m.Emitter);s.prototype.addSelfBehaviour=function(){var a=arguments.length,b;for(b=0;b<a;b++)this.selfBehaviours.push(arguments[b])};
533s.prototype.removeSelfBehaviour=function(a){a=this.selfBehaviours.indexOf(a);-1<a&&this.selfBehaviours.splice(a,1)};s.prototype.update=function(a){s._super_.prototype.update.call(this,a);if(!this.sleep){var b=this.selfBehaviours.length,c;for(c=0;c<b;c++)this.selfBehaviours[c].applyBehaviour(this,a,c)}};m.BehaviourEmitter=s;m.Util.inherits(q,m.Emitter);q.prototype.initEventHandler=function(){var a=this;this.mousemoveHandler=function(b){a.mousemove.call(a,b)};this.mousedownHandler=function(b){a.mousedown.call(a,
534b)};this.mouseupHandler=function(b){a.mouseup.call(a,b)};this.mouseTarget.addEventListener("mousemove",this.mousemoveHandler,!1)};q.prototype.emit=function(){this._allowEmitting=!0};q.prototype.stopEmit=function(){this._allowEmitting=!1};q.prototype.mousemove=function(a){if(a.layerX||0==a.layerX)this.p.x+=(a.layerX-this.p.x)*this.ease,this.p.y+=(a.layerY-this.p.y)*this.ease;else if(a.offsetX||0==a.offsetX)this.p.x+=(a.offsetX-this.p.x)*this.ease,this.p.y+=(a.offsetY-this.p.y)*this.ease;this._allowEmitting&&
535q._super_.prototype.emit.call(this,"once")};q.prototype.destroy=function(){q._super_.prototype.destroy.call(this);this.mouseTarget.removeEventListener("mousemove",this.mousemoveHandler,!1)};m.FollowEmitter=q;var La=La||{easeLinear:function(a){return a},easeInQuad:function(a){return Math.pow(a,2)},easeOutQuad:function(a){return-(Math.pow(a-1,2)-1)},easeInOutQuad:function(a){return 1>(a/=0.5)?0.5*Math.pow(a,2):-0.5*((a-=2)*a-2)},easeInCubic:function(a){return Math.pow(a,3)},easeOutCubic:function(a){return Math.pow(a-
5361,3)+1},easeInOutCubic:function(a){return 1>(a/=0.5)?0.5*Math.pow(a,3):0.5*(Math.pow(a-2,3)+2)},easeInQuart:function(a){return Math.pow(a,4)},easeOutQuart:function(a){return-(Math.pow(a-1,4)-1)},easeInOutQuart:function(a){return 1>(a/=0.5)?0.5*Math.pow(a,4):-0.5*((a-=2)*Math.pow(a,3)-2)},easeInSine:function(a){return-Math.cos(a*(Math.PI/2))+1},easeOutSine:function(a){return Math.sin(a*(Math.PI/2))},easeInOutSine:function(a){return-0.5*(Math.cos(Math.PI*a)-1)},easeInExpo:function(a){return 0===a?0:
537Math.pow(2,10*(a-1))},easeOutExpo:function(a){return 1===a?1:-Math.pow(2,-10*a)+1},easeInOutExpo:function(a){return 0===a?0:1===a?1:1>(a/=0.5)?0.5*Math.pow(2,10*(a-1)):0.5*(-Math.pow(2,-10*--a)+2)},easeInCirc:function(a){return-(Math.sqrt(1-a*a)-1)},easeOutCirc:function(a){return Math.sqrt(1-Math.pow(a-1,2))},easeInOutCirc:function(a){return 1>(a/=0.5)?-0.5*(Math.sqrt(1-a*a)-1):0.5*(Math.sqrt(1-(a-=2)*a)+1)},easeInBack:function(a){return a*a*(2.70158*a-1.70158)},easeOutBack:function(a){return(a-=
5381)*a*(2.70158*a+1.70158)+1},easeInOutBack:function(a){var b=1.70158;return 1>(a/=0.5)?0.5*a*a*(((b*=1.525)+1)*a-b):0.5*((a-=2)*a*(((b*=1.525)+1)*a+b)+2)},setEasingByName:function(a){switch(a){case "easeLinear":return m.ease.easeLinear;case "easeInQuad":return m.ease.easeInQuad;case "easeOutQuad":return m.ease.easeOutQuad;case "easeInOutQuad":return m.ease.easeInOutQuad;case "easeInCubic":return m.ease.easeInCubic;case "easeOutCubic":return m.ease.easeOutCubic;case "easeInOutCubic":return m.ease.easeInOutCubic;
539case "easeInQuart":return m.ease.easeInQuart;case "easeOutQuart":return m.ease.easeOutQuart;case "easeInOutQuart":return m.ease.easeInOutQuart;case "easeInSine":return m.ease.easeInSine;case "easeOutSine":return m.ease.easeOutSine;case "easeInOutSine":return m.ease.easeInOutSine;case "easeInExpo":return m.ease.easeInExpo;case "easeOutExpo":return m.ease.easeOutExpo;case "easeInOutExpo":return m.ease.easeInOutExpo;case "easeInCirc":return m.ease.easeInCirc;case "easeOutCirc":return m.ease.easeOutCirc;
540case "easeInOutCirc":return m.ease.easeInOutCirc;case "easeInBack":return m.ease.easeInBack;case "easeOutBack":return m.ease.easeOutBack;case "easeInOutBack":return m.ease.easeInOutBack;default:return m.ease.easeLinear}}};m.ease=La;m.easeLinear="easeLinear";m.easeInQuad="easeInQuad";m.easeOutQuad="easeOutQuad";m.easeInOutQuad="easeInOutQuad";m.easeInCubic="easeInCubic";m.easeOutCubic="easeOutCubic";m.easeInOutCubic="easeInOutCubic";m.easeInQuart="easeInQuart";m.easeOutQuart="easeOutQuart";m.easeInOutQuart=
541"easeInOutQuart";m.easeInSine="easeInSine";m.easeOutSine="easeOutSine";m.easeInOutSine="easeInOutSine";m.easeInExpo="easeInExpo";m.easeOutExpo="easeOutExpo";m.easeInOutExpo="easeInOutExpo";m.easeInCirc="easeInCirc";m.easeOutCirc="easeOutCirc";m.easeInOutCirc="easeInOutCirc";m.easeInBack="easeInBack";m.easeOutBack="easeOutBack";m.easeInOutBack="easeInOutBack";o.prototype={start:function(){this.addEventHandler();this.renderer.start()},stop:function(){this.renderer.stop()},resize:function(a,b){this.renderer.resize(a,
542b)},setStroke:function(a,b){this.renderer.hasOwnProperty("stroke")?this.renderer.setStroke(a,b):alert("Sorry this renderer do not suppest stroke method!")},createImageData:function(a){this.renderer instanceof m.PixelRender&&this.renderer.createImageData(a)}
542,setMaxRadius:function(a){this.renderer instanceof m.WebGLRender&&this.renderer.setMaxRadius(a)},blendEquation:function(a){this.renderer instanceof m.WebGLRender&&this.renderer.blendEquation(a)},blendFunc:function(a,b){this.renderer instanceof m.WebGLRender&&
543this.renderer.blendFunc(a,b)},setType:function(a){this.type=a;this.renderer=this.getRenderer()},getRenderer:function(){switch(this.type){case "dom":return new m.DomRender(this.proton,this.element);case "canvas":return new m.CanvasRender(this.proton,this.element);case "webgl":return new m.WebGLRender(this.proton,this.element);case "easel":return new m.EaselRender(this.proton,this.element);case "easeljs":return new m.EaselRender(this.proton,this.element);case "pixel":return new m.PixelRender(this.proton,
544this.element);default:return new m.BaseRender(this.proton,this.element)}},render:function(a){this.renderer.render(a)},addEventHandler:function(){this.onProtonUpdate&&(this.renderer.onProtonUpdate=this.onProtonUpdate);this.onParticleCreated&&(this.renderer.onParticleCreated=this.onParticleCreated);this.onParticleUpdate&&(this.renderer.onParticleUpdate=this.onParticleUpdate);this.onParticleDead&&(this.renderer.onParticleDead=this.onParticleDead)}};m.Renderer=o;p.prototype={start:function(){var a=this;
545this.proton.addEventListener(m.PROTON_UPDATE,function(){a.onProtonUpdate.call(a)});this.proton.addEventListener(m.PROTON_UPDATE_AFTER,function(){a.onProtonUpdateAfter.call(a)});this.proton.addEventListener(m.EMITTER_ADDED,function(b){a.onEmitterAdded.call(a,b.emitter)});this.proton.addEventListener(m.EMITTER_REMOVED,function(b){a.onEmitterRemoved.call(a,b.emitter)});var b=this.proton.emitters.length,c;for(c=0;c<b;c++)this.addEmitterListener(this.proton.emitters[c])},resize:function(){},addEmitterListener:function(a){var b=
546this;a.addEventListener(m.PARTICLE_CREATED,function(a){b.onParticleCreated.call(b,a.particle)});a.addEventListener(m.PARTICLE_UPDATE,function(a){b.onParticleUpdate.call(b,a.particle)});a.addEventListener(m.PARTICLE_DEAD,function(a){b.onParticleDead.call(b,a.particle)})},stop:function(){var a=this.proton.emitters.length,b;this.proton.removeAllEventListeners();for(b=0;b<a;b++)this.proton.emitters[b].removeAllEventListeners()},onEmitterAdded:function(a){this.addEmitterListener(a)},onEmitterRemoved:function(a){a.removeAllEventListeners()},
547onProtonUpdate:function(){},onProtonUpdateAfter:function(){},onParticleCreated:function(){},onParticleUpdate:function(){},onParticleDead:function(){}};m.BaseRender=p;m.Util.inherits(n,m.BaseRender);n.prototype.start=function(){n._super_.prototype.start.call(this)};n.prototype.setStroke=function(a,b){a=m.Util.initValue(a,"#000000");b=m.Util.initValue(b,1);this.stroke={color:a,thinkness:b}};n.prototype.onProtonUpdate=function(){};n.prototype.onParticleCreated=function(a){if(a.target){var b=this;m.Util.getImage(a.target,
548a,!1,function(a){b.setImgInDIV.call(b,a)})}else a.transform.canvas=m.DomUtil.createCanvas(a.id+"_canvas",a.radius+1,a.radius+1,"absolute"),a.transform.bakOldRadius=a.radius,this.stroke?(a.transform.canvas.width=2*a.radius+2*this.stroke.thinkness,a.transform.canvas.height=2*a.radius+2*this.stroke.thinkness):(a.transform.canvas.width=2*a.radius+1,a.transform.canvas.height=2*a.radius+1),a.transform.context=a.transform.canvas.getContext("2d"),a.transform.context.fillStyle=a.color,a.transform.context.beginPath(),
549a.transform.context.arc(a.radius,a.radius,a.radius,0,2*Math.PI,!0),this.stroke&&(a.transform.context.strokeStyle=this.stroke.color,a.transform.context.lineWidth=this.stroke.thinkness,a.transform.context.stroke()),a.transform.context.closePath(),a.transform.context.fill(),this.element.appendChild(a.transform.canvas)};n.prototype.onParticleUpdate=function(a){a.target?a.target instanceof Image&&(a.transform.canvas.style.opacity=a.alpha,m.DomUtil.transformDom(a.transform.canvas,a.p.x-a.target.width/2,
550a.p.y-a.target.height/2,a.scale,a.rotation)):(a.transform.canvas.style.opacity=a.alpha,a.transform.oldRadius?m.DomUtil.transformDom(a.transform.canvas,a.p.x-a.transform.oldRadius,a.p.y-a.transform.oldRadius,a.scale,a.rotation):m.DomUtil.transformDom(a.transform.canvas,a.p.x-a.transform.bakOldRadius,a.p.y-a.transform.bakOldRadius,a.scale,a.rotation))};n.prototype.onParticleDead=function(a){a.transform.canvas&&this.element.removeChild(a.transform.canvas)};n.prototype.setImgInDIV=function(a){a.transform.canvas=
551m.DomUtil.createCanvas(a.id+"_canvas",a.target.width+1,a.target.height+1,"absolute",a.p.x-a.radius,a.p.y-a.radius);a.transform.context=a.transform.canvas.getContext("2d");a.transform.context.drawImage(a.target,0,0,a.target.width,a.target.height);this.element.appendChild(a.transform.canvas)};m.DomRender=n;m.Util.inherits(l,m.BaseRender);l.prototype.resize=function(){};l.prototype.start=function(){l._super_.prototype.start.call(this)};
551l.prototype.onProtonUpdate=function(){};l.prototype.onParticleCreated=
552function(a){if(a.target)a.target=a.target.clone(),a.target.parent||(!a.target.image||(a.target.regX=a.target.image.width/2,a.target.regY=a.target.image.height/2),this.element.addChild(a.target));else{var b=new createjs.Graphics;this.stroke&&(!0==this.stroke?b.beginStroke("#000000"):this.stroke instanceof String&&b.beginStroke(this.stroke));b.beginFill(a.color).drawCircle(0,0,a.radius);b=new createjs.Shape(b);a.target=b;this.element.addChild(a.target)}};l.prototype.onParticleUpdate=function(a){a.target&&
553(a.target.x=a.p.x,a.target.y=a.p.y,a.target.alpha=a.alpha,a.target.scaleX=a.target.scaleY=a.scale,a.target.rotation=a.rotation)};l.prototype.onParticleDead=function(a){a.target&&a.target.parent&&a.target.parent.removeChild(a.target)};m.EaselRender=l;m.Util.inherits(k,m.BaseRender);k.prototype.resize=function(a,b){this.element.width=a;this.element.height=b};k.prototype.start=function(){k._super_.prototype.start.call(this)};k.prototype.setStroke=function(a,b){a=m.Util.initValue(a,"#000000");b=m.Util.initValue(b,
5541);this.stroke={color:a,thinkness:b}};k.prototype.onProtonUpdate=function(){this.context.clearRect(0,0,this.element.width,this.element.height)};k.prototype.onParticleCreated=function(a){a.target?m.Util.getImage(a.target,a,!1):a.color=a.color?a.color:"#ff0000"};k.prototype.onParticleUpdate=function(a){if(a.target){if(a.target instanceof Image){var b=a.target.width*a.scale|0,c=a.target.height*a.scale|0,e=a.p.x-b/2,d=a.p.y-c/2;if(a.color){a.transform.buffer||(a.transform.buffer=this.getBuffer(a.target));
555var f=a.transform.buffer.getContext("2d");f.clearRect(0,0,a.transform.buffer.width,a.transform.buffer.height);f.globalAlpha=a.alpha;f.drawImage(a.target,0,0);f.globalCompositeOperation="source-atop";f.fillStyle=m.Util.rgbToHex(a.transform.rgb);f.fillRect(0,0,a.transform.buffer.width,a.transform.buffer.height);f.globalCompositeOperation="source-over";f.globalAlpha=1;this.context.drawImage(a.transform.buffer,0,0,a.transform.buffer.width,a.transform.buffer.height,e,d,b,c)}else this.context.save(),this.context.globalAlpha=
556a.alpha,this.context.translate(a.p.x,a.p.y),this.context.rotate(m.MathUtils.degreeTransform(a.rotation)),this.context.translate(-a.p.x,-a.p.y),this.context.drawImage(a.target,0,0,a.target.width,a.target.height,e,d,b,c),this.context.globalAlpha=1,this.context.restore()}}else a.transform.rgb?this.context.fillStyle="rgba("+a.transform.rgb.r+","+a.transform.rgb.g+","+a.transform.rgb.b+","+a.alph
556a+")":this.context.fillStyle=a.color,this.context.beginPath(),this.context.arc(a.p.x,a.p.y,a.radius,0,2*Math.PI,
557!0),this.stroke&&(this.context.strokeStyle=this.stroke.color,this.context.lineWidth=this.stroke.thinkness,this.context.stroke()),this.context.closePath(),this.context.fill()};k.prototype.onParticleDead=function(){};k.prototype.getBuffer=function(a){if(a instanceof Image){var b=a.width+"_"+a.height,c=this.bufferCache[b];c||(c=document.createElement("canvas"),c.width=a.width,c.height=a.height,this.bufferCache[b]=c);return c}};m.CanvasRender=k;m.Util.inherits(j,m.BaseRender);j.prototype.resize=function(a,
558b){this.element.width=a;this.element.height=b};j.prototype.createImageData=function(a){a?this.rectangle=a:this.rectangle=new m.Rectangle(0,0,this.element.width,this.element.height);this.imageData=this.context.createImageData(this.rectangle.width,this.rectangle.height);this.context.putImageData(this.imageData,this.rectangle.x,this.rectangle.y)};j.prototype.start=function(){j._super_.prototype.start.call(this)};j.prototype.onProtonUpdate=function(){this.context.clearRect(this.rectangle.x,this.rectangle.y,
559this.rectangle.width,this.rectangle.height);this.imageData=this.context.getImageData(this.rectangle.x,this.rectangle.y,this.rectangle.width,this.rectangle.height)};j.prototype.onProtonUpdateAfter=function(){this.context.putImageData(this.imageData,this.rectangle.x,this.rectangle.y)};j.prototype.onParticleCreated=function(){};j.prototype.onParticleUpdate=function(a){this.imageData&&this.setPixel(this.imageData,Math.floor(a.p.x-this.rectangle.x),Math.floor(a.p.y-this.rectangle.y),a)};j.prototype.setPixel=
560function(a,b,c,e){var d=e.transform.rgb;0>b||(b>this.element.width||0>c||c>this.elementwidth)||(b=4*((c>>0)*a.width+(b>>0)),a.data[b]=d.r,a.data[b+1]=d.g,a.data[b+2]=d.b,a.data[b+3]=255*e.alpha)};j.prototype.onParticleDead=function(){};m.PixelRender=j;m.Util.inherits(i,m.BaseRender);i.prototype.resize=function(a,b){this.umat[4]=-2;this.umat[7]=1;this.smat[0]=1/a;this.smat[4]=1/b;this.mstack.set(this.umat,0);this.mstack.set(this.smat,1);this.gl.viewport(0,0,a,b);this.element.width=a;this.element.height=
561b};i.prototype.setMaxRadius=function(a){this.circleCanvasURL=this.createCircle(a)};i.prototype.getVertexShader=function(){return"uniform vec2 viewport;\nattribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\nuniform mat3 tMat;\nvarying vec2 vTextureCoord;\nvarying float alpha;
561\nvoid main() {\nvec3 v = tMat * vec3(aVertexPosition, 1.0);\ngl_Position = vec4(v.x, v.y, 0, 1);\nvTextureCoord = aTextureCoord;\nalpha = tMat[0][2];\n}"};i.prototype.getFragmentShader=function(){return"precision mediump float;\nvarying vec2 vTextureCoord;\nvarying float alpha;\nuniform sampler2D uSampler;\nuniform vec4 color;\nuniform bool useTexture;\nuniform vec3 uColor;\nvoid main() {\nvec4 textureColor = texture2D(uSampler, vTextureCoord);\ngl_FragColor = textureColor * vec4(uColor, 1.0);\ngl_FragColor.w *= alpha;\n}"};
562i.prototype.initVar=function(){this.mstack=new m.MStack;this.umat=m.Mat3.create([2,0,1,0,-2,0,-1,1,1]);this.smat=m.Mat3.create([0.01,0,1,0,0.01,0,0,0,1]);this.texturebuffers={}};i.prototype.start=function(){i._super_.prototype.start.call(this);this.resize(this.element.width,this.element.height)};i.prototype.blendEquation=function(a){this.gl.blendEquation(this.gl[a])};i.prototype.blendFunc=function(a,b){this.gl.blendFunc(this.gl[a],this.gl[b])};i.prototype.getShader=function(a,b,c){var e;c?e=a.createShader(a.FRAGMENT_SHADER):
563e=a.createShader(a.VERTEX_SHADER);a.shaderSource(e,b);a.compileShader(e);return!a.getShaderParameter(e,a.COMPILE_STATUS)?(alert(a.getShaderInfoLog(e)),null):e};i.prototype.initShaders=function(){var a=this.getShader(this.gl,this.getFragmentShader(),!0),b=this.getShader(this.gl,this.getVertexShader(),!1);this.sprogram=this.gl.createProgram();this.gl.attachShader(this.sprogram,b);this.gl.attachShader(this.sprogram,a);this.gl.linkProgram(this.sprogram);this.gl.getProgramParameter(this.sprogram,this.gl.LINK_STATUS)||
564alert("Could not initialise shaders");this.gl.useProgram(this.sprogram);this.sprogram.vpa=this.gl.getAttribLocation(this.sprogram,"aVertexPosition");this.sprogram.tca=this.gl.getAttribLocation(this.sprogram,"aTextureCoord");this.gl.enableVertexAttribArray(this.sprogram.tca);this.gl.enableVertexAttribArray(this.sprogram.vpa);this.sprogram.tMatUniform=this.gl.getUniformLocation(this.sprogram,"tMat");this.sprogram.samplerUniform=this.gl.getUniformLocation(this.sprogram,"uSampler");this.sprogram.useTex=
565this.gl.getUniformLocation(this.sprogram,"useTexture");this.sprogram.color=this.gl.getUniformLocation(this.sprogram,"uColor");this.gl.uniform1i(this.sprogram.useTex,1)};i.prototype.initBuffers=function(){this.unitIBuffer=this.gl.createBuffer();this.gl.bindBuffer(this.gl.ELEMENT_ARRAY_BUFFER,this.unitIBuffer);this.gl.bufferData(this.gl.ELEMENT_ARRAY_BUFFER,new Uint16Array([0,3,1,0,2,3]),this.gl.STATIC_DRAW);for(var a=[],b=0;100>b;b++)a.push(b);idx=new Uint16Array(a);this.unitI33=this.gl.createBuffer();
566this.gl.bindBuffer(this.gl.ELEMENT_ARRAY_BUFFER,this.unitI33);this.gl.bufferData(this.gl.ELEMENT_ARRAY_BUFFER,idx,this.gl.STATIC_DRAW);a=[];for(b=0;100>b;b++)a.push(b,b+1,b+2);idx=new Uint16Array(a);this.stripBuffer=this.gl.createBuffer();this.gl.bindBuffer(this.gl.ELEMENT_ARRAY_BUFFER,this.stripBuffer);this.gl.bufferData(this.gl.ELEMENT_ARRAY_BUFFER,idx,this.gl.STATIC_DRAW)};i.prototype.createCircle=function(a){this.circleCanvasRadius=m.WebGLUtil.nhpot(m.Util.initValue(a,32));var a=m.DomUtil.createCanvas("circle_canvas",
5672*this.circleCanvasRadius,2*this.circleCanvasRadius),b=a.getContext("2d");b.beginPath();b.arc(this.circleCanvasRadius,this.circleCanvasRadius,this.circleCanvasRadius,0,2*Math.PI,!0);b.closePath();b.fillStyle="#FFF";b.fill();return a.toDataURL()};i.prototype.setImgInCanvas=function(a){var b=a.target.width,c=a.target.height,e=m.WebGLUtil.nhpot(a.target.width),d=m.WebGLUtil.nhpot(a.target.height),f=a.target.width/e,g=a.target.height/d;this.texturebuffers[a.transform.src]||(this.texturebuffers[a.transform.src]=
568[this.gl.createTexture(),this.gl.createBuffer(),this.gl.createBuffer()]);a.transform.texture=this.texturebuffers[a.transform.src][0];a.transform.vcBuffer=this.texturebuffers[a.transform.src][1];a.transform.tcBuffer=this.texturebuffers[a.transform.src][2];this.gl.bindBuffer(this.gl.ARRAY_BUFFER,a.transform.tcBuffer);this.gl.bufferData(this.gl.ARRAY_BUFFER,new Float32Array([0,0,f,0,0,g,g,g]),this.gl.STATIC_DRAW);this.gl.bindBuffer(this.gl.ARRAY_BUFFER,a.transform.vcBuffer);this.gl.bufferData(this.gl.ARRAY_BUFFER,
569new Float32Array([0,0,b,0,0,c,b,c]),this.gl.STATIC_DRAW);e=a.transform.canvas.getContext("2d").getImageData(0,0,e,d);this.gl.bindTexture(this.gl.TEXTURE_2D,a.transform.texture);this.gl.texImage2D(this.gl.TEXTURE_2D,0,this.gl.RGBA,this.gl.RGBA,this.gl.UNSIGNED_BYTE,e);this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_MAG_FILTER,this.gl.LINEAR);this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_MIN_FILTER,this.gl.LINEAR_MIPMAP_NEAREST);this.gl.generateMipmap(this.gl.TEXTURE_2D);a.transform.textureLoaded=
570!0;a.transform.textureWidth=b;a.transform.textureHeight=c};i.prototype.setStroke=function(){};
570i.prototype.onProtonUpdate=function(){};i.prototype.onParticleCreated=function(a){var b=this;a.transform.textureLoaded=!1;a.transform.tmat=m.Mat3.create();a.transform.tmat[8]=1;a.transform.imat=m.Mat3.create();a.transform.imat[8]=1;a.target?m.Util.getImage(a.target,a,!0,function(a){b.setImgInCanvas.call(b,a);a.transform.oldScale=1}):m.Util.getImage(this.circleCanvasURL,a,!0,function(a){b.setImgInCanvas.call(b,
571a);a.transform.oldScale=a.radius/b.circleCanvasRadius})};i.prototype.onParticleUpdate=function(a){a.transform.textureLoaded&&(this.updateMatrix(a),this.gl.uniform3f(this.sprogram.color,a.transform.rgb.r/255,a.transform.rgb.g/255,a.transform.rgb.b/255),this.gl.uniformMatrix3fv(this.sprogram.tMatUniform,!1,this.mstack.top()),this.gl.bindBuffer(this.gl.ARRAY_BUFFER,a.transform.vcBuffer),this.gl.vertexAttribPointer(this.sprogram.vpa,2,this.gl.FLOAT,!1,0,0),this.gl.bindBuffer(this.gl.ARRAY_BUFFER,a.transform.tcBuffer),
572this.gl.vertexAttribPointer(this.sprogram.tca,2,this.gl.FLOAT,!1,0,0),this.gl.bindTexture(this.gl.TEXTURE_2D,a.transform.texture),this.gl.uniform1i(this.sprogram.samplerUniform,0),this.gl.bindBuffer(this.gl.ELEMENT_ARRAY_BUFFER,this.unitIBuffer),this.gl.drawElements(this.gl.TRIANGLES,6,this.gl.UNSIGNED_SHORT,0),this.mstack.pop())};i.prototype.onParticleDead=function(){};i.prototype.updateMatrix=function(a){var b=m.WebGLUtil.makeTranslation(-a.transform.textureWidth/2,-a.transform.textureHeight/2),
573c=m.WebGLUtil.makeTranslation(a.p.x,a.p.y),e=m.WebGLUtil.makeRotation(a.rotation*(Math.PI/180)),d=a.scale*a.transform.oldScale,d=m.WebGLUtil.makeScale(d,d),b=m.WebGLUtil.matrixMultiply(b,d),b=m.WebGLUtil.matrixMultiply(b,e),b=m.WebGLUtil.matrixMultiply(b,c);m.Mat3.inverse(b,a.transform.imat);b[2]=a.alpha;this.mstack.push(b)};m.WebGLRender=i;h.prototype={getPosition:function(){},crossing:function(){}};m.Zone=h;m.Util.inherits(g,m.Zone);g.prototype.getPosition=function(){this.random=Math.random();this.vector.x=
574this.x1+this.random*this.length*Math.cos(this.gradient);this.vector.y=this.y1+this.random*this.length*Math.sin(this.gradient);return this.vector};g.prototype.getDirection=function(a,b){var c=-this.dx;return 0<(this.dy*a+c*b+this.dot)*(0==c?1:c)?!0:!1};g.prototype.getDistance=function(a,b){return(this.dy*a+-this.dx*b+this.dot)/Math.sqrt(this.xxyy)};g.prototype.getSymmetric=function(a){var b=a.getGradient(),b=2*(this.getGradient()-b),c=a.x,e=a.y;a.x=c*Math.cos(b)-e*Math.sin(b);a.y=c*Math.sin(b)+e*Math.cos(b);
575return a};g.prototype.getGradient=function(){return Math.atan2(this.dy,this.dx)};g.prototype.getRange=function(a,b){Math.abs(this.getGradient())<=Math.PI/4?a.p.x<this.maxx&&a.p.x>this.minx&&b():a.p.y<this.maxy&&a.p.y>this.miny&&b()};g.prototype.getLength=function(){return Math.sqrt(this.dx*this.dx+this.dy*this.dy)};g.prototype.crossing=function(a){var b=this;"dead"==this.crossType?">"==this.direction||"R"==this.direction||"right"==this.direction||"down"==this.direction?this.getRange(a,function(){b.getDirection(a.p.x,
576a.p.y)&&(a.dead=!0)}):this.getRange(a,function(){b.getDirection(a.p.x,a.p.y)||(a.dead=!0)}):"bound"==this.crossType?this.getRange(a,function(){b.getDistance(a.p.x,a.p.y)<=a.radius&&(0==b.dx?a.v.x*=-1:0==b.dy?a.v.y*=-1:b.getSymmetric(a.v))}):"cross"==this.crossType&&this.alert&&(alert("Sorry lineZone does not support cross method"),this.alert=!1)};m.LineZone=g;m.Util.inherits(e,m.Zone);e.prototype.getPosition=function(){this.random=Math.random();this.angle=2*Math.PI*Math.random();this.vector.x=this.x+
577this.random*this.radius*Math.cos(this.angle);this.vector.y=this.y+this.random*this.radius*Math.sin(this.angle);return this.vector};e.prototype.setCenter=function(a,b){this.center.x=a;this.center.y=b};e.prototype.crossing=function(a){var b=a.p.distanceTo(this.center);"dead"==this.crossType?b-a.radius>this.radius&&(a.dead=!0):"bound"==this.crossType?b+a.radius>=this.radius&&this.getSymmetric(a):"cross"==this.crossType&&this.alert&&(alert("Sorry CircleZone does not support cross method"),this.alert=
578!1)};e.prototype.getSymmetric=function(a){var b=a.v.getGradient(),b=2*(this.getGradient(a)-b),c=a.v.x,e=a.v.y;a.v.x=c*Math.cos(b)-e*Math.sin(b);a.v.y=c*Math.sin(b)+e*Math.cos(b)};e.prototype.getGradient=function(a){return-Math.PI/2+Math.atan2(a.p.y-this.center.y,a.p.x-this.center.x)};m.CircleZone=e;m.Util.inherits(f,m.Zone);f.prototype.getPosition=function(){this.vector.x=this.x;this.vector.y=this.y;return this.vector};f.prototype.crossing=function(){this.alert&&(alert("Sorry PointZone does not support crossing method"),
579this.alert=!1)};m.PointZone=f;m.Util.inherits(d,m.Zone);d.prototype.getPosition=function(){this.vector.x=this.x+Math.random()*this.width;this.vector.y=this.y+Math.random()*this.height;return this.vector};d.prototype.crossing=function(a){"dead"==this.crossType?(a.p.x+a.radius<this.x?a.dead=!0:a.p.x-a.radius>this.x+this.width&&(a.dead=!0),a.p.y+a.radius<this.y?a.dead=!0:a.p.y-a.radius>this.y+this.height&&(a.dead=!0)):"bound"==this.crossType?(a.p.x-a.radius<this.x?(a.p.x=this.x+a.radius,a.v.x*=-1):a.p.x+
580a.radius>this.x+this.width&&(a.p.x=this.x+this.width-a.radius,a.v.x*=-1),a.p.y-a.radius<this.y?(a.p.y=this.y+a.radius,a.v.y*=-1):a.p.y+a.radius>this.y+this.height&&(a.p.y=this.y+this.height-a.radius,a.v.y*=-1)):"cross"==this.crossType&&(a.p.x+a.radius<this.x&&0>=a.v.x?a.p.x=this.x+this.width+a.radius:a.p.x-a.radius>this.x+this.width&&0<=a.v.x&&(a.p.x=this.x-a.radius),a.p.y+a.radius<this.y&&0>=a.v.y?a.p.y=this.y+this.height+a.radius:a.p.y-a.radius>this.y+this.height&&0<=a.v.y&&(a.p.y=this.y-a.radius))};
581m.RectZone=d;m.Util.inherits(c,m.Zone);c.prototype.reset=function(a,b,c,e){this.imageData=a;this.x=m.Util.initValue(b,0);this.y=m.Util.initValue(c,0);this.d=m.Util.initValue(e,2);this.vectors=[];this.setVectors()};c.prototype.setVectors=function(){var a,b,c=this.imageData.width,e=this.imageData.height;for(a=0;a<c;a+=this.d)for(b=0;b<e;b+=this.d)0<this.imageData.data[4*((b>>0)*c+(a>>0))+3]&&this.vectors.push({x:a+this.x,y:b+this.y});return this.vector};c.prototype.getBound=function(a,b){return 0<this.imageData.data[4*
582((b>>0)*this.imageData.width+(a>>0))+3]?!0:!1};c.prototype.getPosition=function(){return this.vector.copy(this.vectors[Math.floor(Math.random()*this.vectors.length)])};c.prototype.getColor=function(a,b){var a=a-this.x,b=b-this.y,c=4*((b>>0)*this.imageData.width+(a>>0));return{r:this.imageData.data[c],g:this.imageData.data[c+1],b:this.imageData.data[c+2],a:this.imageData.data[c+3]}};c.prototype.crossing=function(a){"dead"==this.crossType?this.getBound(a.p.x-this.x,a.p.y-this.y)?a.dead=!0:a.dead=!1:
583"bound"==this.crossType&&(this.getBound(a.p.x-this.x,a.p.y-this.y)||a.v.negate())};m.ImageZone=c;var sa=function(){if(a.console&&a.console.log){var b=arguments;if("string"==typeof arguments[0])if(0==arguments[0].indexOf("+")){var c=parseInt(arguments[0]);sa.once<c&&(delete b[0],console.log(b),sa.once++)}else console.log(b);else console.log(b)}};sa.once=0;m.log=sa;var Da=Da||{addEventListener:function(a,b){a.addEventListener(m.PROTON_UPDATE,function(){b()})},setStyle:function(a){a=m.Util.hexToRGB(a||
584"#ff0000");return"rgba("+a.r+","+a.g+","+a.b+",0.5)"},drawZone:function(a,b,c,e){var d=b.getContext("2d"),f=this.setStyle();this.addEventListener(a,function(){e&&d.clearRect(0,0,b.width,b.height);c instanceof m.PointZone?(d.beginPath(),d.fillStyle=f,d.arc(c.x,c.y,10,0,2*Math.PI,!0),d.fill(),d.closePath()):c instanceof m.LineZone?(d.beginPath(),d.strokeStyle=f,d.moveTo(c.x1,c.y1),d.lineTo(c.x2,c.y2),d.stroke(),d.closePath()):c instanceof m.RectZone?(d.beginPath(),d.strokeStyle=f,d.drawRect(c.x,c.y,
585c.width,c.height),d.stroke(),d.closePath()):c instanceof m.CircleZone&&(d.beginPath(),d.strokeStyle=f,d.arc(c.x,c.y,c.radius,0,2*Math.PI,!0),d.stroke(),d.closePath())})},drawEmitter:function(a,b,c,e){var d=b.getContext("2d"),f=this.setStyle();this.addEventListener(a,function(){e&&d.clearRect(0,0,b.width,b.height);d.beginPath();d.fillStyle=f;d.arc(c.p.x,c.p.y,10,0,2*Math.PI,!0);d.fill();d.closePath()})},test:{},setTest:function(a,b){this.test[a]=b},getTest:function(a){return this.test.hasOwnProperty(a)?
586this.test[a]:!1}};m.Debug=Da})(window);
587(function(){for(var a=0,b=["ms","moz","webkit","o"],c=0;c<b.length&&!window.requestAnimationFrame;++c)window.requestAnimationFrame=window[b[c]+"RequestAnimationFrame"],window.cancelAnimationFrame=window[b[c]+"CancelAnimationFrame"]||window[b[c]+"CancelRequestAnimationFrame"];window.requestAnimationFrame||(window.requestAnimationFrame=function(b){var c=(new Date).getTime(),e=Math.max(0,16-(c-a)),g=window.setTimeout(function(){b(c+e)},e);a=c+e;return g});window.cancelAnimationFrame||(window.cancelAnimationFrame=
588function(a){clearTimeout(a)})})();
589AvatarChooser={currentType:null,currentParts:null,notify:!1,rewards:null,rewardTypes:null,init:function(){var a=$('<div id="win-spine" class="winpanel avatar-select modal"><div class="winspine-header presetchooser"><h2>Choose Your Avatar</h2><a class="partschooser presetsBtn" href="#">View All Characters</a><a href="#" class="partschooser button primary small saveBtn" style="margin-top: 1rem;">Save</a></div><div class="winspine-content presetchooser chartypes hidden"><div class="character-class"><ul></ul></div><div class="presets"><ul></ul></div></div><div class="winspine-content partschooser hidden"><div class="chooser"><div class="groups"><ul class="top"></ul></div><div class="parts"><ul></ul></div></div><canvas width="1000" height="1000"></canvas><div class="animations"><ul></ul></div></div></div>');$("body").append(a);
590$.ajax({url:"/api/userrewards",data:{t:"notify",src:window.location.pathname},success:function(a){a&&(a=JSON.parse(a),a.notify&&(a.rewards&&a.types)&&(AvatarChooser.notify=a.notify,AvatarChooser.rewards=a.rewards,AvatarChooser.rewardTypes=a.types))}});$.ajax({url:"/api/userpref",data:{n:"user-avatar"},success:function(a){a&&(a=JSON.parse(a),a.type&&a.parts&&AvatarChooser.showAvatar(a.type,a.parts))}});$("#win-spine").on($.modal.OPEN,function(){AvatarChooser.updateId&&(window.clearInterval(AvatarChooser.updateId),
591AvatarChooser.updateId=0);AvatarChooser.poseId&&(window.clearInterval(AvatarChooser.poseId),AvatarChooser.poseId=0);WinSpine.init();WinSpine.showCreator(function(a,c){$.modal.close();AvatarChooser.currentType=a;AvatarChooser.currentParts=c;$.ajax({url:"/api/userpref",type:"POST",data:{n:"user-avatar",v:JSON.stringify({type:a,parts:c})}});AvatarChooser.generateHeadShotImage(a,c,function(a){$.ajax({url:"/api/userpref",type:"POST",data:{n:"avatar",v:a}})});var d=$(".js-avatar-head-shot.js-reload-on-save > img"),
592f=$(".js-avatar-body-shot.js-reload-on-save > img");AvatarChooser.showAvatar(a,c,null,d,f);AvatarChooser.updateNgApp({type:a,parts:c})},AvatarChooser.currentType,AvatarChooser.currentParts);WinSpine.adjustWindow()}).on($.modal.CLOSE,function(){AvatarChooser.clearNotification();AvatarChooser.showAvatar(AvatarChooser.currentType,AvatarChooser.currentParts)})},clearNotification:function(){if(AvatarChooser.notify){$.ajax({url:"/api/userrewards",type:"POST",data:{t:"clear"}});var a=$("a[href='#win-spine']");
593a.hasClass("new-item-tag")&&a.removeClass("new-item-tag");$("#win-spine").find(".new-item-tag-small").removeClass("new-item-tag-small");$("#win-spine").find(".new-item-preset-tag").removeClass("new-item-preset-tag");AvatarChooser.notify=!1}},showAvatar:function(a,b,c,d,f){a&&b&&(c=null!==c&&(c&&0<c.length?c:$(".avatar-image a")),c=null!==c&&(c&&0<c.length?c:$("a.avatar-image")),c=null!==c&&(c&&0<c.length?c:$(".avatar-selector-current")),d=void 0!==d?d:null,f=void 0!==f?f:null,AvatarChooser.updateId&&
594(window.clearInterval(AvatarChooser.updateId),AvatarChooser.updateId=0),AvatarChooser.poseId&&(window.clearInterval(AvatarChooser.poseId),AvatarChooser.poseId=0),AvatarChooser.currentType=WinSpine.currentType=a,AvatarChooser.currentParts=WinSpine.currentParts=b,WinSpine.loadCharacter(function(){var e=a=="Troll"?$('<canvas width="600" height="600"></canvas>'):a=="Tiny"?$('<canvas width="1000" height="550"></canvas>'):$('<canvas width="1000" height="1000"></canvas>'),g=e[0].getContext("2d");f&&f.length>
5950&&WinSpine.generatePreview(a,b,false,function(a){a&&f.attr("src",a)});d&&d.length>0&&WinSpine.generatePreview(a,b,true,function(a){a&&d.attr("src",a)});if(c&&c.length>0){c.empty().append(e);AvatarChooser.updateId=window.setInterval(function(){WinSpine.updateSkeleton(g)},1E3/60);AvatarChooser.poseId=window.setInterval(function(){for(;;){var a=WinSpine.skeletonData.animations[Math.floor(Math.random()*WinSpine.skeletonData.animations.length)].name;if(a.indexOf("Fall")<0&&a.indexOf("Back 3/4")<0){WinSpine.state.setAnimationByName(1,
596a,false);WinSpine.state.addAnimationByName(0,WinSpine.defaultAnimation,true,0);break}}},3E3)}}))},generateHeadShotImage:function(a,b,c){a&&b&&(AvatarChooser.updateId&&(window.clearInterval(AvatarChooser.updateId),AvatarChooser.updateId=0),AvatarChooser.poseId&&(window.clearInterval(AvatarChooser.poseId),AvatarChooser.poseId=0),AvatarChooser.currentType=WinSpine.currentType=a,AvatarChooser.currentParts=WinSpine.currentParts=b,WinSpine.loadCharacter(function(){WinSpine.generatePreview(a,b,true,function(a){a&&
597c&&c(a)})}))},updateNgApp:function(){try{var a=angular.element(document.body).scope().$root;a.$apply(function(){a.state.reloadUser()})}catch(b){console.log(b)}}};
598var WinSpine={_callback:null,_defaultType:null,updateId:0,animationTimeScale:1,totalTime:0,lastTime:0,currentType:null,currentPreset:null,currentParts:{},skeletonData:null,skeleton:null,skeletonBounds:null,stateData:null,state:null,defaultAnimation:"",init:function(){var a=$("#win-spine");a.on($.modal.CLOSE,function(){window.clearInterval(WinSpine.updateId);WinSpine.updateId=0;$("#win-spine .presetchooser").removeClass("hidden");$("#win-spine .partschooser").addClass("hidden");WinSpine.editingSprite=
599null;return!1});a.find(".saveBtn").click(function(){window.clearInterval(WinSpine.updateId);WinSpine.updateId=0;$("#win-spine .presetchooser").removeClass("hidden");$("#win-spine .partschooser").addClass("hidden");WinSpine._callback&&WinSpine._callback(WinSpine.currentType,WinSpine.currentParts);WinSpine.editingSprite=null;return!1});a.find(".presetsBtn").click(function(){window.clearInterval(WinSpine.updateId);WinSpine.updateId=0;$(".winspine-header").addClass("presetchooser");$(".winspine-footer").addClass("presetchooser");
600$("#win-spine .presetchooser").removeClass("hidden");$("#win-spine .partschooser").addClass("hidden");return!1});a.find(".resetBtn").click(function(){WinSpine.currentPreset&&WinSpine.selectPreset();return!1});WinSpine.totalTime=0;WinSpine.lastTime=Date.now();window.clearInterval(WinSpine.updateId);WinSpine.updateSkeleton();$(window).resize(WinSpine.adjustWindow);WinSpine.adjustWindow()},_handleCategoryClick:function(){$(this).attr("data-group")?WinSpine.selectGroup($(this).attr("data-group")):(WinSpine.currentType=
601$(this).attr("data-type"),WinSpine.selectCategory());return!1},selectCategory:function(a){var b=$("#win-spine");b.find(".presetchooser .character-class li").each(function(a,b){$(b).attr("data-type")==WinSpine.currentType?$(b).addClass("selected"):$(b).removeClass("selected")});b=b.find(".presetchooser .presets ul");b.empty().scrollTop(0);if(a)for(var c=0;c<a.length;c++)for(var d=a[c],f=0;f<g_parts[d].presets.length;f++){var e=g_parts[d].presets[f];0<=g_parts[d].allowed.indexOf(e)&&(e=AvatarChooser.notify&&
6020<=AvatarChooser.rewards[d].indexOf(e)?$('<li class="tab" data-type="'+d+'" data-preset="'+e+'"><div class="new-item-preset-tag"></div><img src="/ide/avatar/previews/'+d+"/"+e+'/index.png"/></li>'):$('<li class="tab" data-type="'+d+'" data-preset="'+e+'"><img src="/ide/avatar/previews/'+d+"/"+e+'/index.png"/></li>'),b.append(e),e.click(WinSpine._handlePresetClick))}else if(g_parts[WinSpine.currentType])for(f=0;f<g_parts[WinSpine.currentType].presets.length;f++)e=g_parts[WinSpine.currentType].presets[f],
6030<=g_parts[WinSpine.currentType].allowed.indexOf(e)&&(e=AvatarChooser.notify&&0<=AvatarChooser.rewards[WinSpine.currentType].indexOf(e)?$('<li class="tab" data-type="'+WinSpine.currentType+'" data-preset="'+e+'"><div class="new-item-preset-tag"></div><img src="/ide/avatar/previews/'+WinSpine.currentType+"/"+e+'/index.png"/></li>'):$('<li class="tab" data-type="'+WinSpine.currentType+'" data-preset="'+e+'"></div><img src="/ide/avatar/previews/'+WinSpine.currentType+"/"+e+'/index.png"/></li>'),b.append(e),
604e.click(WinSpine._handlePresetClick))},selectGroup:function(a){var b=$("#win-spine");b.find(".presetchooser .character-class li").each(function(b,c){$(c).attr("data-group")==a?$(c).addClass("selected"):$(c).removeClass("selected")});b=b.find(".presetchooser .presets ul");b.empty().scrollTop(0);var c=[],d=[],f=0,e;for(e in g_parts)if(g_parts[e].group==a){for(var g=0,h=0;h<g_parts[e].presets.length;h++){var i=g_parts[e].presets[h];0<=g_parts[e].allowed.indexOf(i)&&(i=WinSpine.notify&&WinSpine.rewards[e]&&
6050<=WinSpine.rewards[e].indexOf(i)?$('<li class="tab" data-type="'+e+'" data-preset="'+i+'"><div class="new-item-preset-tag"></div><img src="/ide/avatar/previews/'+e+"/"+i+'/index.png"/></li>'):$('<li class="tab" data-type="'+e+'" data-preset="'+i+'"><img src="/ide/avatar/previews/'+e+"/"+i+'/index.png"/></li>'),f+2*g>c.length?c.push(i):c.splice(f+2*g,0,i),g++,i.click(WinSpine._handlePresetClick))}f++}for(h=0;h<c.length;h++)b.append(c[h]);for(h=0;h<d.length;h++)b.append(d[h])},_handlePresetClick:function(){$(this).hasClass("locked")||
606(WinSpine.currentType=$(this).attr("data-type"),WinSpine.currentPreset=$(this).attr("data-preset"),WinSpine.selectPreset(),WinSpine.updateId=window.setInterval(function(){WinSpine.updateSkeleton()},1E3/60));return!1},_handlePresetMouseEnter:function(){if($(this).hasClass("locked")){var a=$(this).attr("data-type"),b=$(this).attr("data-preset"),c=$(this).find("span.locked-message");$.ajax({url:"/api/userrewards",data:{t:"unlock",c:a,p:b},success:function(a){a&&(a=JSON.parse(a),a.message&&"-1"!=a.message&&
607(c.parent().parent().find("span.locked-message").css("display","none"),c.html("Unlocked in "+a.message).css("display","block")))}})}},_handlePresetMouseLeave:function(){$(this).hasClass("locked")&&$(this).find("span.locked-message").html("").css("display","none")},selectPreset:function(a){var b=$("#win-spine"),c=b.find(".groups ul");c.empty();var d=!1;a?WinSpine.currentParts=a:WinSpine.currentPreset&&g_parts[WinSpine.currentType].prebuilts&&g_parts[WinSpine.currentType].prebuilts[WinSpine.currentPreset]?
608(a=WinSpine.currentParts=JSON.parse(JSON.stringify(g_parts[WinSpine.currentType].prebuilts[WinSpine.currentPreset])),d=!0):WinS
608pine.currentParts={};var f="",e;for(e in g_parts[WinSpine.currentType].groupings){var g=$('<li class="category"><a href="#" data-partgrouping="'+e+'"><img class="off" src="/ide/avatar/previews/'+WinSpine.currentType+"/parts/top-"+e+'.png"/><img class="on" src="/ide/avatar/previews/'+WinSpine.currentType+"/parts/top-"+e+'-active.png"/><img class="subcat-active" src="/ide/avatar/previews/'+
609WinSpine.currentType+"/parts/top-"+e+'-selected.png"/></a><ul class="subcat"></ul></li>');f||(f=e,g.addClass("selected"));g.find("a").click(WinSpine._handleGroupingClick);var h=g.find("ul.subcat"),i=g_parts[WinSpine.currentType].groupings[e];if(1<i.length)for(var j=0;j<i.length;j++){var k=i[j];if(!g_parts[WinSpine.currentType].macros[k]||0<j)k=$('<li class="subcategory"><a href="#" data-subcat="'+k+'"><img class="off" src="/ide/avatar/previews/'+WinSpine.currentType+"/parts/"+k+'.png"/><img class="on" src="/ide/avatar/previews/'+
610WinSpine.currentType+"/parts/"+k+'-active.png"/></a></li>'),h.append(k),k.find("a").click(WinSpine._handleSubcategoryClick)}c.append(g)}for(e in g_parts[WinSpine.currentType].options)!d&&(WinSpine.currentPreset&&0>g_parts[WinSpine.currentType].options[e].indexOf(WinSpine.currentPreset)||!WinSpine.currentPreset&&0>g_parts[WinSpine.currentType].options[e].indexOf(WinSpine.currentParts[e]))?WinSpine.currentParts[e]="blank":!a&&g_parts[WinSpine.currentType].parts[e]&&(WinSpine.currentParts[e]=g_parts[WinSpine.currentType].presetexceptions&&
611g_parts[WinSpine.currentType].presetexceptions[WinSpine.currentPreset]&&g_parts[WinSpine.currentType].presetexceptions[WinSpine.currentPreset][e]?g_parts[WinSpine.currentType].presetexceptions[WinSpine.currentPreset][e]:WinSpine.currentPreset);b.find(".winspine-header").removeClass("presetchooser");b.find(".winspine-footer").removeClass("presetchooser");b.find(".presetchooser").addClass("hidden");b.find(".partschooser").removeClass("hidden");WinSpine.showGrouping(f);WinSpine.adjustWindow();
611WinSpine.loadCharacter()},
612_handleGroupingClick:function(){var a=$(this).attr("data-partgrouping");WinSpine.showGrouping(a);return!1},showGrouping:function(a){var b=$("#win-spine");b.find(".groups ul.top > li a").each(function(b,c){var e=$(c);e.attr("data-partgrouping")==a?e.parent().addClass("selected").removeClass("active"):e.parent().removeClass("selected").removeClass("active")});if(g_parts[WinSpine.currentType].showoverride){var c=g_parts[WinSpine.currentType].macros[a];if(c){for(var d=!1,f=0;f<c.length;f++){var e=c[f],
613g=WinSpine.currentParts[e];if(!g){d=!0;break}if(g_parts[WinSpine.currentType].showoverride[e]&&0<=g_parts[WinSpine.currentType].showoverride[e].indexOf(g)){d=!0;break}}d||b.find(".groups ul.top > li a").each(function(b,c){var e=$(c);e.attr("data-partgrouping")==a&&e.parent().find("ul.subcat").addClass("hidden")})}}WinSpine.showSubcategory(g_parts[WinSpine.currentType].groupings[a][0])},_handleSubcategoryClick:function(){var a=$(this).attr("data-subcat");WinSpine.showSubcategory(a);return!1},showSubcategory:function(a){var b=
614$("#win-spine"),c=b.find(".parts ul");c.empty();b.find(".top ul li a").each(function(b,c){var e=$(c);e.attr("data-subcat")==a?(e.parent().addClass("selected"),e.parents("li.category").addClass("active")):e.parent().removeClass("selected")});for(var b=g_parts[WinSpine.currentType].options[a],d=0;d<b.length;d++){var f=g_parts[WinSpine.currentType];
614if(0<=f.allowed.indexOf(b[d])&&(!f.showoverride||!f.showoverride[a]||0<=f.showoverride[a].indexOf(b[d]))){var e;"blank"!=b[d]&&(e=$('<li data-partgroup="'+
615a+'" data-part="'+b[d]+'"><img src="/ide/avatar/previews/'+WinSpine.currentType+"/"+b[d]+"/"+a+'.png"/></li>'));WinSpine.currentParts[a]==b[d]&&e.addClass("selected");g_parts[WinSpine.currentType].macros[a]?e.click(WinSpine._handleMacroPartClick):e.click(WinSpine._handlePartClick);c.append(e)}}e=$('<li data-partgroup="'+a+'" data-part="blank"><img src="/ide/avatar/noFeature.png"/></li>');g_parts[WinSpine.currentType].macros[a]?e.click(WinSpine._handleMacroPartClick):e.click(WinSpine._handlePartClick);
616c.append(e)},_handleMacroPartClick:function(){if(!$(this).hasClass("locked")){$(this).parents("ul").find("li").removeClass("selected");$(this).parents("li").addClass("selected");var a=$(this).attr("data-partgroup"),b=$(this).attr("data-part"),c=g_parts[WinSpine.currentType].skinoptions,d=g_parts[WinSpine.currentType].skins,f=!1,e="",g;for(g in c)0<=c[g].indexOf(b)&&(f=!0,e=g);for(var h=!1,i=[],j=g_parts[WinSpine.currentType].macros[a],k=0;k<j.length;k++){var l=j[k],n;n=0>g_parts[WinSpine.currentType].options[l].indexOf(b)?
617WinSpine.currentParts[l]="blank":WinSpine.currentParts[l]=b;var p=g_parts[WinSpine.currentType].parts[l];p||(p=g_parts[WinSpine.currentType].macros[l]);if("blank"==n)for(var o=0;o<p.length;o++){var q=new Image;q.onload=function(){WinSpine.updateSkeleton()};q.src="/ide/imgs/blank.png";WinSpine.textures[p[o]]=q}else for(o=0;o<p.length;o++)q=new Image,q.onload=function(){WinSpine.updateSkeleton()},q.src="/ide/avatar/skins/"+WinSpine.currentType+"/"+n+"/"+p[o]+".png",WinSpine.textures[p[o]]=q;""!==e&&
6180<=d[e].indexOf(l)&&(h=!0,i.push(l))}var s=WinSpine.currentParts,r=WinSpine.currentType;if(g_parts[WinSpine.currentType].skinbind&&h){var t=!1;n=g_parts[WinSpine.currentType].skinbind;for(var v=0;v<i.length;v++){l=i[v];if(0<=g_parts[WinSpine.currentType].skinbindshow.indexOf(l)||0<=g_parts[WinSpine.currentType].skinbindnoshow.indexOf(l))break;for(var u in n){o=p=!1;for(k=0;k<n[u].length;k++)var w=n[u][k],p=p?p:0<=g_parts[WinSpine.currentType].skinbindshow.indexOf(w)&&w===l,o=o?o:0<=g_parts[WinSpine.currentType].skinbindnoshow.indexOf(w)&&
6190<=g_parts[WinSpine.currentType].skinbindoptions.indexOf(WinSpine.currentParts[w]);if(p&&o)for(k=0;k<n[u].length;k++){w=n[u][k];p=g_parts[WinSpine.currentType].parts[w];for(o=0;o<p.length;o++)q=new Image,q.onload=function(){WinSpine.updateSkeleton()},q.src="/ide/avatar/skins/"+WinSpine.currentType+"/"+b+"/"+p[o]+".png",WinSpine.textures[p[o]]=q;WinSpine.currentParts[w]=b;0<=g_parts[WinSpine.currentType].skinbindnoshow.indexOf(w)&&Object.entries(g_parts[WinSpine.currentType].skinoptions).forEach(function(a){0<=
620a[1].indexOf(b)&&0<=g_parts[r].skins[a[0]].indexOf(w)&&(updateOther=t=!0)});0<=g_parts[WinSpine.currentType].skinbindshow.indexOf(w)&&0<=g_parts[WinSpine.currentType].skinbindshowoptions.indexOf(b)&&(updateOther=!0)}}for(u in n){if(""!==e&&0>d[e].indexOf(l)&&!(0<=g_parts[WinSpine.currentType].skinbindshow.indexOf(l)||0<=g_parts[WinSpine.currentType].skinbindnoshow.indexOf(l)))break;for(var z=q=o=p=!1,A=!1,D=!1,C=!1,k=0;k<n[u].length;k++)w=n[u][k],o=o?o:0<=g_parts[WinSpine.currentType].skinbindshow.indexOf(w)&&
621!(0<=g_parts[WinSpine.currentType].skinbindoptions.indexOf(WinSpine.currentParts[w])&&0>g_parts[WinSpine.currentType].skinbindshowoptions.indexOf(WinSpine.currentParts[w])),q=q?q:0<=g_parts[WinSpine.currentType].skinbindshow.indexOf(l)&&!(0<=g_parts[WinSpine.currentType].skinbindoptions.indexOf(b)&&0>g_parts[WinSpine.currentType].skinbindshowoptions.indexOf(b)),A=A?A:l===w,z=z?z:0<=g_parts[WinSpine.currentType].skinbindoptions.indexOf(b)&&0<=g_parts[WinSpine.currentType].skinbindnoshow.indexOf(l),
622p=p?p:0<=g_parts[WinSpine.currentType].skinbindnoshow.indexOf(w)&&0<=g_parts[WinSpine.currentType].skinbindoptions.indexOf(WinSpine.currentParts[w]),Object.entries(g_parts[WinSpine.currentType].skinoptions).forEach(function(a){0<=g_parts[r].skinbindnoshow.indexOf(w)&&(0<=a[1].indexOf(s[w])&&0<=g_parts[r].skins[a[0]].indexOf(w))&&(D=!0);0<=g_parts[r].skinbindshow.indexOf(w)&&(0<=a[1].indexOf(s[w])&&0<=g_parts[r].skins[a[0]].indexOf(w))&&(C=!0)});if((z||t)&&(o&&q||A)||(q||z)&&D&&!C&&0<=g_parts[WinSpine.currentType].skinbindshowoptions.indexOf(b)||
623p&&o&&f&&0<=d[e].indexOf(l))for(k=0;k<n[u].length;k++){w=n[u][k];p=g_parts[WinSpine.currentType].parts[w];for(o=0;o<p.length&&WinSpine.currentParts[w]!==b;o++)q=new Image,q.onload=function(){WinSpine.updateSkeleton()},q.src="/ide/avatar/skins/"+WinSpine.currentType+"/"+b+"/"+p[o]+".png",WinSpine.textures[p[o]]=q;WinSpine.currentParts[w]=b;0<=g_parts[WinSpine.currentType].skinbindshow.indexOf(w)&&0<=g_parts[WinSpine.currentType].skinbindshowoptions.indexOf(b)&&(updateOther=!0)}}}}e=null;if(d&&"All"in
624d){e=d.All;for(k=0;h&&f&&k<e.length;k++)for(g in i=WinSpine.currentParts[e[k]],c)if(!(0>c[g].indexOf(i)||0>d[g].indexOf(e[k])||WinSpine.currentParts[e[k]]===b||0>g_parts[WinSpine.currentType].options[e[k]].indexOf(i))){(p=g_parts[WinSpine.currentType].parts[e[k]])||(p=g_parts[WinSpine.currentType].macros[e[k]]);for(o=0;o<p.length;o++)q=new Image,q.onload=function(){WinSpine.updateSkeleton()},q.src="/ide/avatar/skins/"+WinSpine.currentType+"/"+b+"/"+p[o]+".png",WinSpine.textures[p[o]]=q;WinSpine.currentParts[e[k]]=
625b;break}}c=$("#win-spine");c.find(".groups ul.top >
625 li a").each(function(b,c){var e=$(c);e.attr("data-partgrouping")==a&&e.parent().find("ul.subcat").removeClass("hidden")});if(g_parts[WinSpine.currentType].showoverride){d=!1;for(k=0;k<j.length;k++)if(g_parts[WinSpine.currentType].showoverride[j[k]]&&0<=g_parts[WinSpine.currentType].showoverride[j[k]].indexOf(b)){d=!0;break}d||c.find(".groups ul.top > li a").each(function(b,c){var e=$(c);e.attr("data-partgrouping")==a&&e.parent().find("ul.subcat").addClass("hidden")})}}return!1},
626_handlePartClick:function(){if(!$(this).hasClass("locked")){$(this).parents("ul").find("li").removeClass("selected");$(this).parents("li").addClass("selected");var a=$(this).attr("data-partgroup"),b=$(this).attr("data-part");WinSpine.currentParts[a]=b;var c=g_parts[WinSpine.currentType].skinoptions,d=g_parts[WinSpine.currentType].skins,f=!1;if(d&&"Head Reset"in d){var e=d["Head Reset"],g=!0,h=null;0<=e.indexOf("Head")&&(h=WinSpine.currentParts.Head);for(var i=0;i<e.length;i++)if(h){if("Head"!==e[i]&&
627h&&0<=g_parts[WinSpine.currentType].options[e[i]].indexOf(h)){g=!1;break}}else break;!0===g&&(f=!0)}var j=g_parts[WinSpine.currentType].parts[a];j||(j=g_parts[WinSpine.currentType].macros[a]);if("blank"==b)for(i=0;i<j.length;i++){var k=new Image;k.onload=function(){WinSpine.updateSkeleton()};k.src="/ide/imgs/blank.png";WinSpine.textures[j[i]]=k}else for(i=0;i<j.length;i++)k=new Image,k.onload=function(){WinSpine.updateSkeleton()},k.src="/ide/avatar/skins/"+WinSpine.currentType+"/"+b+"/"+j[i]+".png",
628WinSpine.textures[j[i]]=k;var l=g=!1,h="",n;for(n in c)0<=c[n].indexOf(b)&&(g=!0,h=n);var p=WinSpine.currentParts,o=WinSpine.currentType;if(g_parts[WinSpine.currentType].skinbind){var q=!1,s=g_parts[WinSpine.currentType].skinbind,r;for(r in s){k=j=!1;for(i=0;i<s[r].length;i++)var t=s[r][i],j=j?j:0<=g_parts[WinSpine.currentType].skinbindshow.indexOf(t)&&t===a,k=k?k:0<=g_parts[WinSpine.currentType].skinbindnoshow.indexOf(t)&&0<=g_parts[WinSpine.currentType].skinbindoptions.indexOf(WinSpine.currentParts[t]);
629if(j&&k)for(i=0;i<s[r].length;i++){for(var t=s[r][i],j=g_parts[WinSpine.currentType].parts[t],v=0;v<j.length;v++)k=new Image,k.onload=function(){WinSpine.updateSkeleton()},k.src="/ide/avatar/skins/"+WinSpine.currentType+"/"+b+"/"+j[v]+".png",WinSpine.textures[j[v]]=k;WinSpine.currentParts[t]=b;0<=g_parts[WinSpine.currentType].skinbindnoshow.indexOf(t)&&Object.entries(g_parts[WinSpine.currentType].skinoptions).forEach(function(a){0<=a[1].indexOf(b)&&0<=g_parts[o].skins[a[0]].indexOf(t)&&(l=q=!0)});
6300<=g_parts[WinSpine.currentType].skinbindshow.indexOf(t)&&0<=g_parts[WinSpine.currentType].skinbindshowoptions.indexOf(b)&&(l=!0)}}for(r in s){if(""!==h&&0>d[h].indexOf(a)&&!(0<=g_parts[WinSpine.currentType].skinbindshow.indexOf(a)||0<=g_parts[WinSpine.currentType].skinbindnoshow.indexOf(a)))break;for(var v=k=j=!1,u,w=!1,z=!1,A=!1,i=0;i<s[r].length;i++)t=s[r][i],k=k?k:0<=g_parts[WinSpine.currentType].skinbindshow.indexOf(t)&&!(0<=g_parts[WinSpine.currentType].skinbindoptions.indexOf(WinSpine.currentParts[t])&&
6310>g_parts[WinSpine.currentType].skinbindshowoptions.indexOf(WinSpine.currentParts[t])),v=v?v:0<=g_parts[WinSpine.currentType].skinbindshow.indexOf(a)&&!(0<=g_parts[WinSpine.currentType].skinbindoptions.indexOf(b)&&0>g_parts[WinSpine.currentType].skinbindshowoptions.indexOf(b)),w=w?w:a===t,u=u?u:0<=g_parts[WinSpine.currentType].skinbindoptions.indexOf(b)&&0<=g_parts[WinSpine.currentType].skinbindnoshow.indexOf(a),j=j?j:0<=g_parts[WinSpine.currentType].skinbindnoshow.indexOf(t)&&0<=g_parts[WinSpine.currentType].skinbindoptions.indexOf(WinSpine.currentParts[t]),
632Object.entries(g_parts[WinSpine.currentType].skinoptions).forEach(function(a){0<=g_parts[o].skinbindnoshow.indexOf(t)&&(0<=a[1].indexOf(p[t])&&0<=g_parts[o].skins[a[0]].indexOf(t))&&(z=!0);0<=g_parts[o].skinbindshow.indexOf(t)&&(0<=a[1].indexOf(p[t])&&0<=g_parts[o].skins[a[0]].indexOf(t))&&(A=!0)});if((u||q)&&(k&&v||w)||(v||u)&&z&&!A&&0<=g_parts[WinSpine.currentType].skinbindshowoptions.indexOf(b)||j&&k&&g&&0<=d[h].indexOf(a))for(i=0;i<s[r].length;i++){t=s[r][i];j=g_parts[WinSpine.currentType].parts[t];
633for(v=0;v<j.length&&WinSpine.currentParts[t]!==b;
633v++)k=new Image,k.onload=function(){WinSpine.updateSkeleton()},k.src="/ide/avatar/skins/"+WinSpine.currentType+"/"+b+"/"+j[v]+".png",WinSpine.textures[j[v]]=k;WinSpine.currentParts[t]=b;0<=g_parts[WinSpine.currentType].skinbindshow.indexOf(t)&&0<=g_parts[WinSpine.currentType].skinbindshowoptions.indexOf(b)&&(l=!0)}}}r=null;if(d&&"All"in d){r=d.All;if(0>r.indexOf(a))return;for(i=0;g&&r&&i<r.length;i++){u=WinSpine.currentParts[r[i]];if(!g||""!==h&&0>
634d[h].indexOf(a)&&!l)break;for(n in c)if(!(0>c[n].indexOf(u)||0>d[n].indexOf(r[i])||WinSpine.currentParts[r[i]]===b||0>g_parts[WinSpine.currentType].options[r[i]].indexOf(u))){(j=g_parts[WinSpine.currentType].parts[r[i]])||(j=g_parts[WinSpine.currentType].macros[r[i]]);for(v=0;v<j.length;v++)k=new Image,k.onload=function(){WinSpine.updateSkeleton()},k.src="/ide/avatar/skins/"+WinSpine.currentType+"/"+b+"/"+j[v]+".png",WinSpine.textures[j[v]]=k;WinSpine.currentParts[r[i]]=b;break}}}for(i=0;f&&i<e.length;i++)if("Head"!==
635e[i]){j=g_parts[WinSpine.currentType].parts[e[i]];for(v=0;v<j.length;v++)k=new Image,k.onload=function(){WinSpine.updateSkeleton()},k.src="/ide/avatar/skins/"+WinSpine.currentType+"/"+b+"/"+j[v]+".png",WinSpine.textures[j[v]]=k;WinSpine.currentParts[e[i]]=b}a=null;if("Head Group"in g_parts[WinSpine.currentType].macros){a=g_parts[WinSpine.currentType].macros["Head Group"];d=null;c=!1;for(i=0;i<a.length;i++)if("Head"===a[i])d=WinSpine.currentParts[a[i]];else if(d&&0<=g_parts[WinSpine.currentType].options[a[i]].indexOf(d)){c=
636!0;break}for(i=0;!c&&i<a.length;i++)if("Head"!==a[i]){j=g_parts[WinSpine.currentType].parts[a[i]];for(v=0;v<j.length;v++)k=new Image,k.onload=function(){WinSpine.updateSkeleton()},k.src="/ide/imgs/blank.png",WinSpine.textures[j[v]]=k;WinSpine.currentParts[a[i]]="blank"}}}return!1},loadCharacter:function(a){WinSpine.textures={};for(var b in g_parts[WinSpine.currentType].parts){var c=g_parts[WinSpine.currentType].parts[b];if(!WinSpine.currentParts[b]||"blank"==WinSpine.currentParts[b])for(var d=0;d<
637c.length;d++){var f=new Image;f.onload=function(){WinSpine.updateSkeleton()};f.src="/ide/imgs/blank.png";WinSpine.textures[c[d]]=f}else for(d=0;d<c.length;d++)f=new Image,f.onload=function(){WinSpine.updateSkeleton()},f.src="/ide/avatar/skins/"+WinSpine.currentType+"/"+WinSpine.currentParts[b]+"/"+c[d]+".png",WinSpine.textures[c[d]]=f}$.ajax({url:"/ide/avatar/rigs/"+WinSpine.currentType+".json",dataType:"json",success:function(b){var c=new spine.SkeletonJson({newRegionAttachment:function(a,b){var c=
638new spine.RegionAttachment(b);c.rendererObject=null;c.setUVs(0,0,1,1,!1);c.regionOffsetX=0;c.regionOffsetY=0;c.width=c.regionOriginalWidth=c.regionWidth=1;c.height=c.regionOriginalHeight=c.regionHeight=1;return c},newBoundingBoxAttachment:function(a,b){return new spine.BoundingBoxAttachment(b)},newMeshAttachment:function(a,b){return new spine.MeshAttachment(b)},newSkinnedMeshAttachment:function(a,b){return new spine.SkinnedMeshAttachment(b)}});WinSpine.skeletonData=c.readSkeletonData(b);WinSpine.skeleton=
639new spine.Skeleton(WinSpine.skeletonData);WinSpine.skeletonBounds=new spine.SkeletonImageBounds;WinSpine.stateData=new spine.AnimationStateData(WinSpine.skeletonData);WinSpine.defaultAnimation=WinSpine.skeletonData.animations[0].name;for(b=0;b<WinSpine.skeletonData.animations.length;b++){var d=WinSpine.skeletonData.animations[b].name;if("idle"==d.toLowerCase()){WinSpine.defaultAnimation=d;break}}for(b=0;b<WinSpine.skeletonData.animations.length;b++)d=WinSpine.skeletonData.animations[b].name,d!=WinSpine.defaultAnimation&&
640(WinSpine.stateData.setMixByName(WinSpine.defaultAnimation,d,0),WinSpine.stateData.setMixByName(d,WinSpine.defaultAnimation,0));WinSpine.state=new spine.AnimationState(WinSpine.stateData);WinSpine.state.setAnimationByName(0,WinSpine.defaultAnimation,!0,0);WinSpine.skeleton.setSkinByName("default");WinSpine.skeleton.setSlotsToSetupPose();c=$("#win-spine").find(".animations ul");c.empty();for(b=0;b<WinSpine.skeletonData.animations.length;b++)d=WinSpine.skeletonData.animations[b].name,"idle"!=d.toLowerCase()&&
6410>d.indexOf("Back 3/4")&&(d=$('<li><a href="#" data-animation="'+d+'">'+d+"</a></li>"),d.find("a").click(WinSpine._handleAnimationClick),c.append(d));WinSpine.totalTime=0;WinSpine.lastTime=Date.now();WinSpine.updateSkeleton();a&&a()}});return!1},_handleAnimationClick:function(){var a=$(this).attr("data-animation");$("#win-spine .animations li a").removeClass("selected");$(this).addClass("selected");WinSpine.state.setAnimationByName(0,a,!1);WinSpine.state.addAnimationByName(0,WinSpine.defaultAnimation,
642!0,0);WinSpine.state.onEnd=function(a){1==a&&$("#win-spine .animations li a").removeClass("selected")};return!1},_applySkelBoneTransform:function(a,b){b.parent&&WinSpine._applySkelBoneTransform(a,b.parent);a.translate(b.x,b.y);a.rotate(b.rotation*Math.PI/180);a.scale(b.scaleX,b.scaleY)}
642,updateSkeleton:function(a){if(WinSpine.state){var b=Date.now();WinSpine.state.update((b-WinSpine.lastTime)/1E3*WinSpine.animationTimeScale);WinSpine.lastTime=b;WinSpine.state.apply(WinSpine.skeleton);WinSpine.skeleton.updateWorldTransform();
643WinSpine.skeletonBounds.update(WinSpine.skeleton,!0);if(!a){a=$("#win-spine canvas")[0];if(!a)return;a=a.getContext("2d")}a.mozImageSmoothingEnabled=!1;b="Tiny"==WinSpine.currentType||"Small"==WinSpine.currentType?2:1;a.save();a.clearRect(0,0,a.canvas.width,a.canvas.height);a.translate(a.canvas.width/2,a.canvas.height-100);a.scale(b,-b);for(var b=WinSpine.skeleton.drawOrder,c=0;c<b.length;c++){var d=b[c],f=d.attachment;f&&(a.save(),WinSpine._applySkelBoneTransform(a,d.bone),a.translate(f.x,f.y),a.rotate(f.rotation*
644Math.PI/180),a.scale(f.scaleX,f.scaleY),a.scale(1,-1),(d=WinSpine.textures[f.name])&&a.drawImage(d,-f.width/2,-f.height/2,f.width,f.height),a.restore())}a.restore()}},adjustWindow:function(){var a=$("#win-spine"),b=a.height()-a.find(".winspine-header").outerHeight()-a.find(".winspine-footer").outerHeight(),c=a.find(".winspine-content.partschooser").width()-a.find(".winspine-content .animations").width()-a.find(".partschooser .chooser").outerWidth()-10,d=b;c<d?d=c:c=d;a.find("canvas").width(c).height(d).css("margin-top",
645(b-d)/2);a.find(".winspine-content").css("height",b);a.find(".animations").css("height",b);a.find(".groups").css("height",b-20);a.find(".parts").css("height",b-20)},showCreator:function(a,b,c){WinSpine._callback=a;var d={},f=$("#win-spine").find(".presetchooser .character-class ul");f.empty();for(var e in g_parts)if(!g_parts[e].alias&&(WinSpine._defaultType||(WinSpine._defaultType=e),g_parts[e].allowed&&0<g_parts[e].allowed.length)){var g=null;if(WinSpine.notify&&0<=WinSpine.rewardTypes.indexOf(e)){var h=
646g_parts[e].group;h?d[h]||(g=$('<li class="tab" data-group="'+h+'">'+h+' <div class="new-item-tag-small"></div></li>'),d[h]=g):g=$('<li class="tab" data-type="'+e+'">'+g_parts[e].name+' <div class="new-item-tag-small"></div></li>')}else(h=g_parts[e].group)?d[h]||(g=$('<li class="tab" data-group="'+h+'">'+h+"</li>"),d[h]=g):g=$('<li class="tab" data-type="'+e+'">'+g_parts[e].name+"</li>");g&&(f.append(g),g.click(WinSpine._handleCategoryClick))}b?(g_parts[b].alias&&(b=g_parts[b].alias),g_parts[b].group)?
647(WinSpine.selectGroup(g_parts[b].group),WinSpine.currentType=b):(WinSpine.currentType=b,WinSpine.selectCategory()):(WinSpine.currentType=WinSpine._defaultType,WinSpine.selectCategory());WinSpine.adjustWindow();d=$(".toolbar-top");f=4;!d.hasClass("hidden")&&d.hasClass("big")&&(f+=d.offset().top+d.outerHeight());$("#win-spine .presetchooser").removeClass("hidden");$("#win-spine .partschooser").addClass("hidden");WinSpine.adjustWindow();
647WinSpine.saveCallback=a;b&&c&&(WinSpine.currentType=b,WinSpine.currentParts=
648c,AvatarChooser.notify||(WinSpine.selectPreset(c),WinSpine.updateId=window.setInterval(function(){WinSpine.updateSkeleton()},1E3/60)))},hideCreator:function(){WinSpine.resetCreator()},resetCreator:function(){},_generatePreview:function(a,b){var c=document.createElement("canvas");ctx=c.getContext("2d");ctx.mozImageSmoothingEnabled=!1;c.width=128;c.height=128;ctx.save();b?"Quadruped"==a.type?(ctx.translate(6.4,51.2),ctx.scale(0.3,0.3)):"Troll"==a.type?(ctx.translate(69,-27.8),ctx.scale(0.4,0.4)):"Tiny"==
649a.type?(ctx.translate(64,-284.4),ctx.scale(0.86,0.86)):("Teen"==a.type?ctx.translate(66,85.2):"Male"==a.type?ctx.translate(69,110.2):"Female"==a.type?ctx.translate(69,95.2):ctx.translate(64,115.2),ctx.scale(0.3,0.3)):"Tiny"==a.type?(ctx.translate(64,-32),ctx.scale(0.25,0.25)):(ctx.translate(64,64),ctx.scale(0.125,0.125));this._drawSkeleton(a,ctx);ctx.restore();return c},_drawSkeleton:function(a,b){if(a.state){b.save();b.translate(0,500);b.scale(1,-1);for(var c=a.skeleton.drawOrder,d=0;d<c.length;d++){var f=
650c[d],e=f.attachment;e&&(b.save(),WinSpine._applySkelBoneTransform(b,f.bone),b.translate(e.x,e.y),b.rotate(e.rotation*Math.PI/180),b.scale(e.scaleX,e.scaleY),b.scale(1,-1),(f=a.textures[e.name])&&b.drawImage(f,-e.width/2,-e.height/2,e.width,e.height),b.restore())}b.restore()}},generatePreview:function(a,b,c,d){var f=a;g_parts[f].alias&&(f=g_parts[f].alias);var e=this,g={textures:{},type:a,parts:b},h=0,i;for(i in g_parts[g.type].parts){a=g_parts[g.type].parts[i];for(b=0;b<a.length;b++)h++}for(i in g_parts[g.type].parts)if(a=
651g_parts[g.type].parts[i],!g.parts[i]||"blank"==g.parts[i])for(b=0;b<a.length;b++){var j=new Image;j.onload=function(){--h<=0&&d&&d(e._generatePreview(g,c).toDataURL("image/png"))};j.src="/ide/imgs/blank.png";g.textures[a[b]]=j}else for(b=0;b<a.length;b++)j=new Image,j.onload=function(){e.updateSkeleton();--h<=0&&d&&d(e._generatePreview(g,c).toDataURL("image/png"))},j.src="blank"==g.parts[i]?"/ide/imgs/blank.png":g.parts[i]?"/ide/avatar/skins/"+f+"/"+g.parts[i]+"/"+a[b]+".png":"/ide/imgs/blank.png",
652g.textures[a[b]]=j;$.ajax({url:"/ide/avatar/rigs/"+g.type+".json",dataType:"json",success:function(a){var b=new spine.SkeletonJson({newRegionAttachment:function(a,b){var c=new spine.RegionAttachment(b);c.rendererObject=null;c.setUVs(0,0,1,1,false);c.regionOffsetX=0;c.regionOffsetY=0;c.regionOriginalWidth=c.regionWidth=1;c.regionOriginalHeight=c.regionHeight=1;return c},newBoundingBoxAttachment:function(a,b){return new spine.BoundingBoxAttachment(b)},newMeshAttachment:function(a,b){return new spine.MeshAttachment(b)},
653newSkinnedMeshAttachment:function(a,b){return new spine.SkinnedMeshAttachment(b)}});g.skeletonData=b.readSkeletonData(a);g.skeleton=new spine.Skeleton(g.skeletonData);g.stateData=new spine.AnimationStateData(g.skeletonData);g.state=new spine.AnimationState(g.stateData);g.animationName=g.skeletonData.animations[0].name;for(a=0;a<g.skeletonData.animations.length;a++){b=g.skeletonData.animations[a].name;if(b.toLowerCase()=="idle"){g.animationName=b;break}}g.state.setAnimationByName(0,g.animationName,
654true);g.skeleton.setSkinByName("default");g.skeleton.setSlotsToSetupPose();g.skeletonBounds=new spine.SkeletonImageBounds;g.state.update(0);g.state.apply(g.skeleton);g.skeleton.updateWorldTransform();g.skeletonBounds.update(g.skeleton,true);d&&d(e._generatePreview(g,c).toDataURL("image/png"))}})}};
655(function(a,b){var c=b.event,d;c.special.smartresize={setup:function(){b(this).bind("resize",c.special.smartresize.handler)},teardown:function(){b(this).unbind("resize",c.special.smartresize.handler)},handler:function(a,c){var g=this,h=arguments;a.type="smartresize";d&&clearTimeout(d);d=setTimeout(function(){b.event.handle.apply(g,h)},"execAsap"===c?0:100)}};b.fn.smartresize=function(a){return a?this.bind("smartresize",a):this.trigger("smartresize",["execAsap"])};b.Mason=function(a,c){this.element=
656b(c);this._create(a);this._init()};b.Mason.settings={isResizable:!0,isAnimated:!1,animationOptions:{queue:!1,duration:500},gutterWidth:0,isRTL:!1,isFitWidth:!1,containerStyle:{position:"relative"}}
656;b.Mason.prototype={_filterFindBricks:function(a){var b=this.options.itemSelector;return!b?a:a.filter(b).add(a.find(b))},_getBricks:function(a){return this._filterFindBricks(a).css({position:"absolute"}).addClass("masonry-brick")},_create:function(c){this.options=b.extend(!0,{},b.Mason.settings,c);this.styleQueue=
657[];c=this.element[0].style;this.originalStyle={height:c.height||""};var e=this.options.containerStyle,d;for(d in e)this.originalStyle[d]=c[d]||"";this.element.css(e);this.horizontalDirection=this.options.isRTL?"right":"left";this.offset={x:parseInt(this.element.css("padding-"+this.horizontalDirection),10),y:parseInt(this.element.css("padding-top"),10)};this.isFluid=this.options.columnWidth&&"function"===typeof this.options.columnWidth;var h=this;setTimeout(function(){h.element.addClass("masonry")},
6580);this.options.isResizable&&b(a).bind("smartresize.masonry",function(){h.resize()});this.reloadItems()},_init:function(a){this._getColumns();this._reLayout(a)},option:function(a){b.isPlainObject(a)&&(this.options=b.extend(!0,this.options,a))},layout:function(a,b){for(var c=0,d=a.length;c<d;c++)this._placeBrick(a[c]);d={};d.height=Math.max.apply(Math,this.colYs);if(this.options.isFitWidth){for(var i=0,c=this.cols;--c&&0===this.colYs[c];)i++;d.width=(this.cols-i)*this.columnWidth-this.options.gutterWidth}this.styleQueue.push({$el:this.element,
659style:d});for(var i=!this.isLaidOut?"css":this.options.isAnimated?"animate":"css",j=this.options.animationOptions,k,c=0,d=this.styleQueue.length;c<d;c++)k=this.styleQueue[c],k.$el[i](k.style,j);this.styleQueue=[];b&&b.call(a);this.isLaidOut=!0},_getColumns:function(){var a=(this.options.isFitWidth?this.element.parent():this.element).width();this.columnWidth=this.isFluid?this.options.columnWidth(a):this.options.columnWidth||this.$bricks.outerWidth(!0)||a;this.columnWidth+=this.options.gutterWidth;
660this.cols=Math.floor((a+this.options.gutterWidth)/this.columnWidth);this.cols=Math.max(this.cols,1)},_placeBrick:function(a){var a=b(a),c,d,h,i,j;c=Math.ceil(a.outerWidth(!0)/this.columnWidth);c=Math.min(c,this.cols);if(1===c)h=this.colYs;else{d=this.cols+1-c;h=[];for(j=0;j<d;j++)i=this.colYs.slice(j,j+c),h[j]=Math.max.apply(Math,i)}j=Math.min.apply(Math,h);d=c=0;for(i=h.length;d<i;d++)if(h[d]===j){c=d;break}h={top:j+this.offset.y};h[this.horizontalDirection]=this.columnWidth*c+this.offset.x;this.styleQueue.push({$el:a,
661style:h});a=j+a.outerHeight(!0);h=this.cols+1-i;for(d=0;d<h;d++)this.colYs[c+d]=a},resize:function(){var a=this.cols;this._getColumns();(this.isFluid||this.cols!==a)&&this._reLayout()},_reLayout:function(a){var b=this.cols;for(this.colYs=[];b--;)this.colYs.push(0);this.layout(this.$bricks,a)},reloadItems:function(){this.$bricks=this._getBricks(this.element.children())},reload:function(a){this.reloadItems();this._init(a)},appended:function(a,b,c){if(b){this._filterFindBricks(a).css({top:this.element.height()});
662var d=this;setTimeout(function(){d._appended(a,c)},1)}else this._appended(a,c)},_appended:function(a,b){var c=this._getBricks(a);this.$bricks=this.$bricks.add(c);this.layout(c,b)},remove:function(a){this.$bricks=this.$bricks.not(a);a.remove()},destroy:function(){this.$bricks.removeClass("masonry-brick").each(function(){this.style.position="";this.style.top="";this.style.left=""});var c=this.element[0].style,e;for(e in this.originalStyle)c[e]=this.originalStyle[e];this.element.unbind(".masonry").removeClass("masonry").removeData("masonry");
663b(a).unbind(".masonry")}};b.fn.imagesLoaded=function(a){function c(){a.call(h,i)}function d(a){a=a.target;a.src!==k&&-1===b.inArray(a,l)&&(l.push(a),0>=--j&&(setTimeout(c),i.unbind(".imagesLoaded",d)))}var h=this,i=h.find("img").add(h.filter("img")),j=i.length,k="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///ywAAAAAAQABAAACAUwAOw==",l=[];j||c();i.bind("load.imagesLoaded error.imagesLoaded",d).each(function(){var a=this.src;this.src=k;this.src=a});return h};b.fn.masonry=function(c){if("string"===
664typeof c){var e=Array.prototype.slice.call(arguments,1);this.each(function(){var d=b.data(this,"masonry");d?!b.isFunction(d[c])||"_"===c.charAt(0)?a.console&&a.console.error("no such method '"+c+"' for masonry instance"):d[c].apply(d,e):a.console&&a.console.error("cannot call methods on masonry prior to initialization; attempted to call method '"+c+"'")})}else this.each(function(){var a=b.data(this,"masonry");a?(a.option(c||{}),a._init()):b.data(this,"masonry",new b.Mason(c,this))});return this}})(window,
665jQuery);
666(function(a){var b,c=a();a.fn.sortable=function(d){var f=""+d,d=a.extend({connectWith:!1},d);return this.each(function(){if(/^enable|disable|destroy$/.test(f)){var e=a(this).children(a(this).data("items")).attr("draggable","enable"==f);
666"destroy"==f&&e.add(this).removeData("connectWith items").off("dragstart.h5s dragend.h5s selectstart.h5s dragover.h5s dragenter.h5s drop.h5s")}else{var g,h,e=a(this).children(d.items),i=a("<"+(/^ul|ol$/i.test(this.tagName)?"li":"div")+' class="sortable-placeholder">');e.find(d.handle).mousedown(function(){g=
667!0}).mouseup(function(){g=!1});a(this).data("items",d.items);c=c.add(i);d.connectWith&&a(d.connectWith).add(this).data("connectWith",d.connectWith);e.attr("draggable","true").on("dragstart.h5s",function(c){if(d.handle&&!g)return!1;g=!1;c=c.originalEvent.dataTransfer;c.effectAllowed="move";c.setData("Text","dummy");h=(b=a(this)).addClass("sortable-dragging").index()}).on("dragend.h5s",function(){b.removeClass("sortable-dragging").show();c.detach();h!=b.index()&&e.parent().trigger("sortupdate",{item:b});
668b=null}).not("a[href], img").on("selectstart.h5s",function(){this.dragDrop&&this.dragDrop();return!1}).end().add([this,i]).on("dragover.h5s dragenter.h5s drop.h5s",function(f){if(!e.is(b)&&d.connectWith!==a(b).parent().data("connectWith"))return!0;if("drop"==f.type)return f.stopPropagation(),c.filter(":visible").after(b),!1;f.preventDefault();f.originalEvent.dataTransfer.dropEffect="move";e.is(this)?(d.forcePlaceholderSize&&i.height(b.outerHeight()),b.hide(),a(this)[i.index()<a(this).index()?"after":
669"before"](i),c.not(i).detach()):!c.is(this)&&!a(this).children(d.items).length&&(c.detach(),a(this).append(i));return!1})}})}})(jQuery);window.Tynker||(window.Tynker={});
670Tynker.feedback={updateCountLinks:function(){$.ajax({url:"/api/feedbackcounts",success:function(a){a=JSON.parse(a);$(".listfeedback a").detach();$(".listfeedback").length>0&&$(".listfeedback").remove();var b="(";a.numsent>0&&(b=b+(a.numsent+" Sent"));if(a.numnew>0){a.numsent>0&&(b=b+", ");b=b+(a.numnew+" Response")}b=b+")";(a.numsent||a.numnew)&&$(".sidebar a.sendfeedback").append(' <span class="listfeedback">'+b+"</span>");$(".listfeedback a").click(Feedback.showList)}})},setCookie:function(a,b,
671c){var d=new Date,f=new Date;if(c==null||c==0)c=1;f.setTime(d.getTime()+864E5*c);document.cookie=a+"="+escape(b)+";expires="+f.toGMTString()},getCookie:function(a){var b=" "+document.cookie,c=b.indexOf(" "+a+"=");c==-1&&(c=b.indexOf(";"+a+"="));if(c==-1||a=="")return"";var d=b.indexOf(";",c+1);if(d==-1)d=b.length;return unescape(b.substring(c+a.length+2,d))},timeDifference:function(a){a=Date.now()-a;return a<6E4?Math.round(a/1E3)+" seconds ago":a<36E5?Math.round(a/6E4)+" minutes ago":a<864E5?Math.round(a/
67236E5)+" hours ago":a<2592E6?"approximately "+Math.round(a/864E5)+" days ago":a<31536E6?"approximately "+Math.round(a/2592E6)+" months ago":"approximately "+Math.round(a/31536E6)+" years ago"},showForm:function(a,b){var c=$('<div id="feedback" class="modal"><h3>'+(b?b:"Feedback")+'</h3><div class="modalBody"><div class="stack large"><textarea rows="8"></textarea></div></div><div class="modalFooter"><a class="btnDefaultOrange medium add" href="#">Submit Feedback</a></div><div class="scroll"><ul></ul></div></div>');
673$("#feedback").detach();$("#feedback").length||$("body").append(c);$("#feedback a.add").click(function(){_log("feedback","add");$.ajax({url:"/api/feedbackadd",type:"POST",data:"c="+encodeURIComponent(a)+"&t="+encodeURIComponent($("#feedback textarea").val()),success:function(){if(Feedback.getCookie("fbch")=="y")$.modal.close();else{$("#feedback").empty().append("<h2>"+(b?b:"")+" has been received!</h2>").append("<p>Thank you for providing valuable feedback to help us improve our product. We will work to make improvements and keep you posted via email.</p>").append('<input type="checkbox" name="confirm"/> <span>Don\'t show these confirmation windows again.</span>').append('<div class="buttons">').append('<a class="close-reveal-modal">&#215;</a>');
674$("#feedback .close-reveal-modal").unbind().click(function(){_log("feedback","close confirm");$("#feedback input[name=confirm]")[0].checked&&Feedback.setCookie("fbch","y",365);$.modal.close();return false})}Feedback.updateCountLinks()}});return false});$.ajax({url:"/api/feedbacklist",type:"POST",data:"c="+a,success:function(a){for(var a=JSON.parse(a),b=$("#feedback .scroll ul").empty(),c=0;c<a.length;c++)a[c].fromid&&!a[c].toid?b.append('<li><div class="type"><em>Your Feedback:</em><span>'+Feedback.timeDifference(a[c].timestamp.sec*
6751E3)+"</span></div><p>"+a[c].message+"</p></li>"):b.append('<li><div class="type"><em>Response from Tynker:</em><span>'+Feedback.timeDifference(a[c].timestamp.sec*1E3)+"</span></div><p>"+a[c].message+"</p></li>");$("#feedback").modal({})}})},showList:function(){$.ajax({url:"/api/feedbacklist",type:"POST",success:function(a){$("#feedbacklist").length||$("body").append('<div id="feedbacklist" class="modal"><h1>My Feedback</h2><div class="content"></div></div>');var b=$("#feedbacklist .content");Feedback.updateCountLinks();
676for(var a=JSON.parse(a),c=0;c<a.length;
676c++){var d=$("<div></div>");a[c].name?d.append('<div class="project"><img src="/assets/screenshot/'+a[c].screenshotid+'.png"/><h2>'+a[c].name+"</h2><p>"+a[c].description+"</p></div>"):d.append("<h2>Feedback for "+a[c].context+"</h2>");var f=$("<ul></ul>");d.append(f);for(var e=a[c].items,g=0;g<e.length;g++)e[g].fromid&&!e[g].toid?f.append('<li><div class="type"><em>Your Feedback:</em><span>'+Feedback.timeDifference(e[g].timestamp*1E3)+"</span></div><p>"+e[g].message+
677"</p></li>"):f.append('<li><div class="type"><em>Response from Tynker:</em><span>'+Feedback.timeDifference(e[g].timestamp*1E3)+"</span></div><p>"+e[g].message+"</p></li>");f.append('<li context="'+a[c].context+'"><div class="type"><em>&nbsp;</em><span><a href="#" class="addcomment">Add Comment</a></span></div><p class="hidden"><textarea></textarea><span class="buttons"><a class="button1 right sendcomment" href="#">Send</a></div></span></li>');b.html(d)}b.find("a.addcomment").click(function(){_log("feedback",
678"reply comment");$(this).addClass("hidden").parents("li").find("p").removeClass("hidden").find("textarea").val("");return false});b.find("a.sendcomment").click(function(){_log("feedback","send comment");var a=$(this).parents("li"),b=a.attr("context"),c=a.find("textarea").val();$.ajax({url:"/api/feedbackadd",type:"POST",data:"c="+encodeURIComponent(b)+"&t="+encodeURIComponent(c),success:function(){a.find("a.addcomment").removeClass("hidden");a.find("p").addClass("hidden");a.before('<li><div class="type"><em>Your Feedback:</em><span>0 seconds ago</span></div><p>'+
679c+"</p></li>");Feedback.updateCountLinks()}});return false});$("#feedbacklist").modal({})}});return false},remove:function(){var a=$(this).parent(),b=a.attr("id");$.ajax({url:"/api/feedbackremove",type:"POST",data:"i="+encodeURIComponent(b),success:function(){a.detach()}});return false}};
680(function(a,b){function c(b,c){var e,f,k,l=b.nodeName.toLowerCase();return"area"===l?(e=b.parentNode,f=e.name,!b.href||!f||e.nodeName.toLowerCase()!=="map"?false:(k=a("img[usemap=#"+f+"]")[0],!!k&&d(k))):(/input|select|textarea|button|object/.test(l)?!b.disabled:"a"===l?b.href||c:c)&&d(b)}function d(b){return a.expr.filters.visible(b)&&!a(b).parents().andSelf().filter(function(){return a.css(this,"visibility")==="hidden"}).length}var f=0,e=/^ui-id-\d+$/;a.ui=a.ui||{};if(!a.ui.version){a.extend(a.ui,
681{version:"1.9.1",keyCode:{BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38}});a.fn.extend({_focus:a.fn.focus,focus:function(b,c){return typeof b=="number"?this.each(function(){var e=this;setTimeout(function(){a(e).focus();c&&c.call(e)},b)}):this._focus.apply(this,arguments)},scrollParent:function(){var b;
682return a.ui.ie&&/(static|relative)/.test(this.css("position"))||/absolute/.test(this.css("position"))?b=this.parents().filter(function(){return/(relative|absolute|fixed)/.test(a.css(this,"position"))&&/(auto|scroll)/.test(a.css(this,"overflow")+a.css(this,"overflow-y")+a.css(this,"overflow-x"))}).eq(0):b=this.parents().filter(function(){return/(auto|scroll)/.test(a.css(this,"overflow")+a.css(this,"overflow-y")+a.css(this,"overflow-x"))}).eq(0),/fixed/.test(this.css("position"))||!b.length?a(document):
683b},zIndex:function(c){if(c!==b)return this.css("zIndex",c);if(this.length)for(var c=a(this[0]),e;c.length&&c[0]!==document;){e=c.css("position");if(e==="absolute"||e==="relative"||e==="fixed"){e=parseInt(c.css("zIndex"),10);if(!isNaN(e)&&e!==0)return e}c=c.parent()}return 0},uniqueId:function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++f)})},removeUniqueId:function(){return this.each(function(){e.test(this.id)&&a(this).removeAttr("id")})}});a("<a>").outerWidth(1).jquery||a.each(["Width",
684"Height"],function(c,e){function d(b,c,e,g){return a.each(f,function(){c=c-(parseFloat(a.css(b,"padding"+this))||0);e&&(c=c-(parseFloat(a.css(b,"border"+this+"Width"))||0));g&&(c=c-(parseFloat(a.css(b,"margin"+this))||0))}),c}var f=e==="Width"?["Left","Right"]:["Top","Bottom"],k=e.toLowerCase(),l={innerWidth:a.fn.innerWidth,innerHeight:a.fn.innerHeight,outerWidth:a.fn.outerWidth,outerHeight:a.fn.outerHeight};a.fn["inner"+e]=function(c){return c===b?l["inner"+e].call(this):this.each(function(){a(this).css(k,
685d(this,c)+"px")})};a.fn["outer"+e]=function(b,c){return typeof b!="number"?l["outer"+e].call(this,b):this.each(function(){a(this).css(k,d(this,b,true,c)+"px")})}});a.extend(a.expr[":"],{data:a.expr.createPseudo?a.expr.createPseudo(function(b){return function(c){return!!a.data(c,b)}}):function(b,c,e){return!!a.data(b,e[3])},focusable:function(b){return c(b,!isNaN(a.attr(b,"tabindex")))},tabbable:function(b){var e=a.attr(b,"tabindex"),d=isNaN(e);return(d||e>=0)&&c(b,!d)}});a(function(){var b=document.body,
686c=b.appendChild(c=document.createElement("div"));c.offsetHeight;a.extend(c.style,{minHeight:"100px",height:"auto",padding:0,borderWidth:0});a.support.minHeight=c.offsetHeight===100;a.support.selectstart="onselectstart"in c;b.removeChild(c).style.display="none"});(function(){var b=/msie ([\w.]+)/.exec(navigator.userAgent.toLowerCase())||[];a.ui.ie=b.length?true:false;a.ui.ie6=parseFloat(b[1],10)===6})();a.fn.extend({disableSelection:function(){return this.bind((a.support.selectstart?"selectstart":
687"mousedown")+".ui-disableSelection",function(a){a.preventDefault()})},enableSelection:function(){return this.unbind(".ui-disableSelection")}});a.extend(a.ui,{plugin:{add:function(b,c,e){var d,b=a.ui[b].prototype;for(d in e){b.plugins[d]=b.plugins[d]||[];b.plugins[d].push([c,e[d]])}},call:function(a,b,c){var e=a.plugins[b];if(e&&a.element[0].parentNode&&a.element[0].parentNode.nodeType!==11)for(b=0;b<e.length;b++)a.options[e[b][0]]&&e[b][1].apply(a.element,c)}},contains:a.contains,hasScroll:function(b,
688c){if(a(b).css("overflow")==="hidden")return false;var e=c&&c==="left"?"scrollLeft":"scrollTop";return b[e]>0?true:(b[e]=1,b[e]=0,false)},isOverAxis:function(a,b,c){return a>b&&a<b+c},isOver:function(b,c,e,d,f,l){return a.ui.isOverAxis(b,e,f)&&a.ui.isOverAxis(c,d,l)}})}})(jQuery);
689(function(a,b){var c=0,d=Array.prototype.slice,f=a.cleanData;a.cleanData=function(b){for(var c=0,d;(d=b[c])!=null;c++)try{a(d).triggerHandler("remove")}catch(i){}f(b)};a.widget=function(b,c,d){var f,j,k,l,n=b.split(".")[0],b=b.split(".")[1];f=n+"-"+b;d||(d=c,c=a.Widget);a.expr[":"][f.toLowerCase()]=function(b){return!!a.data(b,f)};a[n]=a[n]||{};j=a[n][b];k=a[n][b]=function(a,b){if(!this._createWidget)return new k(a,b);arguments.length&&this._createWidget(a,b)};a.extend(k,j,{version:d.version,_proto:a.extend({},
690d),_childConstructors:[]});l=new c;l.options=a.widget.extend({},l.options);a.each(d,function(b,e){a.isFunction(e)&&(d[b]=function(){var a=function(){return c.prototype[b].apply(this,arguments)},d=function(a){return c.prototype[b].apply(this,a)};return function(){var b=this._super,c=this._superApply,f;return this._super=a,this._superApply=d,f=e.apply(this,arguments),this._super=b,this._superApply=c,f}}())});k.prototype=a.widget.extend(l,{widgetEventPrefix:l.widgetEventPrefix||b},d,{constructor:k,namespace:n,
691widgetName:b,widgetBaseClass:f,widgetFullName:f});j?(a.each(j._childConstructors,function(b,c){var e=c.prototype;a.widget(e.namespace+"."+e.widgetName,k,c._proto)}),delete j._childConstructors):c._childConstructors.push(k);a.widget.bridge(b,k)};
691a.widget.extend=function(c){for(var f=d.call(arguments,1),h=0,i=f.length,j,k;h<i;h++)for(j in f[h]){k=f[h][j];f[h].hasOwnProperty(j)&&k!==b&&(a.isPlainObject(k)?c[j]=a.isPlainObject(c[j])?a.widget.extend({},c[j],k):a.widget.extend({},k):c[j]=k)}return c};a.widget.bridge=
692function(c,f){var h=f.prototype.widgetFullName;a.fn[c]=function(i){var j=typeof i=="string",k=d.call(arguments,1),l=this;return i=!j&&k.length?a.widget.extend.apply(null,[i].concat(k)):i,j?this.each(function(){var d,f=a.data(this,h);if(!f)return a.error("cannot call methods on "+c+" prior to initialization; attempted to call method '"+i+"'");if(!a.isFunction(f[i])||i.charAt(0)==="_")return a.error("no such method '"+i+"' for "+c+" widget instance");d=f[i].apply(f,k);if(d!==f&&d!==b)return l=d&&d.jquery?
693l.pushStack(d.get()):d,false}):this.each(function(){var b=a.data(this,h);b?b.option(i||{})._init():new f(i,this)}),l}};a.Widget=function(){};a.Widget._childConstructors=[];a.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{disabled:false,create:null},_createWidget:function(b,d){d=a(d||this.defaultElement||this)[0];this.element=a(d);this.uuid=c++;this.eventNamespace="."+this.widgetName+this.uuid;this.options=a.widget.extend({},this.options,this._getCreateOptions(),
694b);this.bindings=a();this.hoverable=a();this.focusable=a();d!==this&&(a.data(d,this.widgetName,this),a.data(d,this.widgetFullName,this),this._on(this.element,{remove:function(a){a.target===d&&this.destroy()}}),this.document=a(d.style?d.ownerDocument:d.document||d),this.window=a(this.document[0].defaultView||this.document[0].parentWindow));this._create();this._trigger("create",null,this._getCreateEventData());this._init()},_getCreateOptions:a.noop,_getCreateEventData:a.noop,_create:a.noop,_init:a.noop,
695destroy:function(){this._destroy();this.element.unbind(this.eventNamespace).removeData(this.widgetName).removeData(this.widgetFullName).removeData(a.camelCase(this.widgetFullName));this.widget().unbind(this.eventNamespace).removeAttr("aria-disabled").removeClass(this.widgetFullName+"-disabled ui-state-disabled");this.bindings.unbind(this.eventNamespace);this.hoverable.removeClass("ui-state-hover");this.focusable.removeClass("ui-state-focus")},_destroy:a.noop,widget:function(){return this.element},
696option:function(c,d){var f=c,i,j,k;if(arguments.length===0)return a.widget.extend({},this.options);if(typeof c=="string"){f={};i=c.split(".");c=i.shift();if(i.length){j=f[c]=a.widget.extend({},this.options[c]);for(k=0;k<i.length-1;k++){j[i[k]]=j[i[k]]||{};j=j[i[k]]}c=i.pop();if(d===b)return j[c]===b?null:j[c];j[c]=d}else{if(d===b)return this.options[c]===b?null:this.options[c];f[c]=d}}return this._setOptions(f),this},_setOptions:function(a){for(var b in a)this._setOption(b,a[b]);return this},_setOption:function(a,
697b){return this.options[a]=b,a==="disabled"&&(this.widget().toggleClass(this.widgetFullName+"-disabled ui-state-disabled",!!b).attr("aria-disabled",b),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus")),this},enable:function(){return this._setOption("disabled",false)},disable:function(){return this._setOption("disabled",true)},_on:function(b,c){var d,f=this;c?(b=d=a(b),this.bindings=this.bindings.add(b)):(c=b,b=this.element,d=this.widget());a.each(c,function(c,
698g){function l(){if(!(f.options.disabled===true||a(this).hasClass("ui-state-disabled")))return(typeof g=="string"?f[g]:g).apply(f,arguments)}typeof g!="string"&&(l.guid=g.guid=g.guid||l.guid||a.guid++);var n=c.match(/^(\w+)\s*(.*)$/),p=n[1]+f.eventNamespace;(n=n[2])?d.delegate(n,p,l):b.bind(p,l)})},_off:function(a,b){b=(b||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace;a.unbind(b).undelegate(b)},_delay:function(a,b){var c=this;return setTimeout(function(){return(typeof a=="string"?
699c[a]:a).apply(c,arguments)},b||0)},_hoverable:function(b){this.hoverable=this.hoverable.add(b);this._on(b,{mouseenter:function(b){a(b.currentTarget).addClass("ui-state-hover")},mouseleave:function(b){a(b.currentTarget).removeClass("ui-state-hover")}})},_focusable:function(b){this.focusable=this.focusable.add(b);this._on(b,{focusin:function(b){a(b.currentTarget).addClass("ui-state-focus")},focusout:function(b){a(b.currentTarget).removeClass("ui-state-focus")}})},_trigger:function(b,c,d){var f,j=this.options[b],
700d=d||{},c=a.Event(c);c.type=(b===this.widgetEventPrefix?b:this.widgetEventPrefix+b).toLowerCase();c.target=this.element[0];if(b=c.originalEvent)for(f in b)f in c||(c[f]=b[f]);return this.element.trigger(c,d),!(a.isFunction(j)&&j.apply(this.element[0],[c].concat(d))===false||c.isDefaultPrevented())}};a.each({show:"fadeIn",hide:"fadeOut"},function(b,c){a.Widget.prototype["_"+b]=function(d,f,j){typeof f=="string"&&(f={effect:f});var k,l=f?f===true||typeof f=="number"?c:f.effect||c:b,f=f||{};typeof f==
701"number"&&(f={duration:f});k=!a.isEmptyObject(f);f.complete=j;f.delay&&d.delay(f.delay);
701k&&a.effects&&(a.effects.effect[l]||a.uiBackCompat!==false&&a.effects[l])?d[b](f):l!==b&&d[l]?d[l](f.duration,f.easing,j):d.queue(function(c){a(this)[b]();j&&j.call(d[0]);c()})}});a.uiBackCompat!==false&&(a.Widget.prototype._getCreateOptions=function(){return a.metadata&&a.metadata.get(this.element[0])[this.widgetName]})})(jQuery);
702(function(a){var b=false;a(document).mouseup(function(){b=false});a.widget("ui.mouse",{version:"1.9.1",options:{cancel:"input,textarea,button,select,option",distance:1,delay:0},_mouseInit:function(){var b=this;this.element.bind("mousedown."+this.widgetName,function(a){return b._mouseDown(a)}).bind("click."+this.widgetName,function(d){if(true===a.data(d.target,b.widgetName+".preventClickEvent"))return a.removeData(d.target,b.widgetName+".preventClickEvent"),d.stopImmediatePropagation(),false});this.started=
703false},_mouseDestroy:function(){this.element.unbind("."+this.widgetName);this._mouseMoveDelegate&&a(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(c){if(!b){this._mouseStarted&&this._mouseUp(c);this._mouseDownEvent=c;var d=this,f=c.which===1,e=typeof this.options.cancel=="string"&&c.target.nodeName?a(c.target).closest(this.options.cancel).length:false;if(!f||e||!this._mouseCapture(c))return true;
704(this.mouseDelayMet=!this.options.delay)||(this._mouseDelayTimer=setTimeout(function(){d.mouseDelayMet=true},this.options.delay));if(this._mouseDistanceMet(c)&&this._mouseDelayMet(c)){this._mouseStarted=this._mouseStart(c)!==false;if(!this._mouseStarted)return c.preventDefault(),true}return true===a.data(c.target,this.widgetName+".preventClickEvent")&&a.removeData(c.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(a){return d._mouseMove(a)},this._mouseUpDelegate=function(a){return d._mouseUp(a)},
705a(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate),c.preventDefault(),b=true,true}},_mouseMove:function(b){return!a.ui.ie||document.documentMode>=9||b.button?this._mouseStarted?(this._mouseDrag(b),b.preventDefault()):(this._mouseDistanceMet(b)&&this._mouseDelayMet(b)&&(this._mouseStarted=this._mouseStart(this._mouseDownEvent,b)!==false,this._mouseStarted?this._mouseDrag(b):this._mouseUp(b)),!this._mouseStarted):this._mouseUp(b)},
706_mouseUp:function(b){return a(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=false,b.target===this._mouseDownEvent.target&&a.data(b.target,this.widgetName+".preventClickEvent",true),this._mouseStop(b)),false},_mouseDistanceMet:function(a){return Math.max(Math.abs(this._mouseDownEvent.pageX-a.pageX),Math.abs(this._mouseDownEvent.pageY-a.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},
707_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return true}})})(jQuery);
708(function(a){a.widget("ui.draggable",a.ui.mouse,{version:"1.9.1",widgetEventPrefix:"drag",options:{addClasses:true,appendTo:"parent",axis:false,connectToSortable:false,containment:false,cursor:"auto",cursorAt:false,grid:false,handle:false,helper:"original",iframeFix:false,opacity:false,refreshPositions:false,revert:false,revertDuration:500,scope:"default",scroll:true,scrollSensitivity:20,scrollSpeed:20,snap:false,snapMode:"both",snapTolerance:20,stack:false,zIndex:false},_create:function(){this.options.helper==
709"original"&&!/^(?:r|a|f)/.test(this.element.css("position"))&&(this.element[0].style.position="relative");this.options.addClasses&&this.element.addClass("ui-draggable");this.options.disabled&&this.element.addClass("ui-draggable-disabled");this._mouseInit()},_destroy:function(){this.element.removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled");this._mouseDestroy()},_mouseCapture:function(b){var c=this.options;return this.helper||c.disabled||a(b.target).is(".ui-resizable-handle")?
710false:(this.handle=this._getHandle(b),this.handle?(a(c.iframeFix===true?"iframe":c.iframeFix).each(function(){a('<div class="ui-draggable-iframeFix" style="background: #fff;"></div>').css({width:this.offsetWidth+"px",height:this.offsetHeight+"px",position:"absolute",opacity:"0.001",zIndex:1E3}).css(a(this).offset()).appendTo("body")}),true):false)},_mouseStart:function(b){var c=this.options;return this.helper=this._createHelper(b),this.helper.addClass("ui-draggable-dragging"),this._cacheHelperProportions(),
711a.ui.ddmanager&&(a.ui.ddmanager.current=this),this._cacheMargins(),this.cssPosition=this.helper.css("position"),this.scrollParent=this.helper.scrollParent(),this.offset=this.positionAbs=this.element.offset(),this.offset={top:this.offset.top-this.margins.top,left
711:this.offset.left-this.margins.left},a.extend(this.offset,{click:{left:b.pageX-this.offset.left,top:b.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()}),this.originalPosition=this.position=this._generatePosition(b),
712this.originalPageX=b.pageX,this.originalPageY=b.pageY,c.cursorAt&&this._adjustOffsetFromHelper(c.cursorAt),c.containment&&this._setContainment(),this._trigger("start",b)===false?(this._clear(),false):(this._cacheHelperProportions(),a.ui.ddmanager&&!c.dropBehaviour&&a.ui.ddmanager.prepareOffsets(this,b),this._mouseDrag(b,true),a.ui.ddmanager&&a.ui.ddmanager.dragStart(this,b),true)},_mouseDrag:function(b,c){this.position=this._generatePosition(b);this.positionAbs=this._convertPositionTo("absolute");
713if(!c){var d=this._uiHash();if(this._trigger("drag",b,d)===false)return this._mouseUp({}),false;this.position=d.position}if(!this.options.axis||this.options.axis!="y")this.helper[0].style.left=this.position.left+"px";if(!this.options.axis||this.options.axis!="x")this.helper[0].style.top=this.position.top+"px";return a.ui.ddmanager&&a.ui.ddmanager.drag(this,b),false},_mouseStop:function(b){var c=false;a.ui.ddmanager&&!this.options.dropBehaviour&&(c=a.ui.ddmanager.drop(this,b));this.dropped&&(c=this.dropped,
714this.dropped=false);for(var d=this.element[0],f=false;d&&(d=d.parentNode);)d==document&&(f=true);if(!f&&this.options.helper==="original")return false;if(this.options.revert=="invalid"&&!c||this.options.revert=="valid"&&c||this.options.revert===true||a.isFunction(this.options.revert)&&this.options.revert.call(this.element,c)){var e=this;a(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){e._trigger("stop",b)!==false&&e._clear()})}else this._trigger("stop",
715b)!==false&&this._clear();return false},_mouseUp:function(b){return a("div.ui-draggable-iframeFix").each(function(){this.parentNode.removeChild(this)}),a.ui.ddmanager&&a.ui.ddmanager.dragStop(this,b),a.ui.mouse.prototype._mouseUp.call(this,b)},cancel:function(){return this.helper.is(".ui-draggable-dragging")?this._mouseUp({}):this._clear(),this},_getHandle:function(b){var c=!this.options.handle||!a(this.options.handle,this.element).length?true:false;return a(this.options.handle,this.element).find("*").andSelf().each(function(){this==
716b.target&&(c=true)}),c},_createHelper:function(b){var c=this.options,b=a.isFunction(c.helper)?a(c.helper.apply(this.element[0],[b])):c.helper=="clone"?this.element.clone().removeAttr("id"):this.element;return b.parents("body").length||b.appendTo(c.appendTo=="parent"?this.element[0].parentNode:c.appendTo),b[0]!=this.element[0]&&!/(fixed|absolute)/.test(b.css("position"))&&b.css("position","absolute"),b},_adjustOffsetFromHelper:function(b){typeof b=="string"&&(b=b.split(" "));a.isArray(b)&&(b={left:+b[0],
717top:+b[1]||0});"left"in b&&(this.offset.click.left=b.left+this.margins.left);"right"in b&&(this.offset.click.left=this.helperProportions.width-b.right+this.margins.left);"top"in b&&(this.offset.click.top=b.top+this.margins.top);"bottom"in b&&(this.offset.click.top=this.helperProportions.height-b.bottom+this.margins.top)},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var b=this.offsetParent.offset();this.cssPosition=="absolute"&&this.scrollParent[0]!=document&&a.contains(this.scrollParent[0],
718this.offsetParent[0])&&(b.left=b.left+this.scrollParent.scrollLeft(),b.top=b.top+this.scrollParent.scrollTop());if(this.offsetParent[0]==document.body||this.offsetParent[0].tagName&&this.offsetParent[0].tagName.toLowerCase()=="html"&&a.ui.ie)b={top:0,left:0};return{top:b.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:b.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if(this.cssPosition=="relative"){var a=this.element.position();return{top:a.top-
719(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:a.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}return{top:0,left:0}},_cacheMargins:function(){this.margins={left:parseInt(this.element.css("marginLeft"),10)||0,top:parseInt(this.element.css("marginTop"),10)||0,right:parseInt(this.element.css("marginRight"),10)||0,bottom:parseInt(this.element.css("marginBottom"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),
720height:this.helper.outerHeight()}},_setContainment:function(){var b=this.options;b.containment=="parent"&&(b.containment=this.helper[0].parentNode);
720if(b.containment=="document"||b.containment=="window")this.containment=[b.containment=="document"?0:a(window).scrollLeft()-this.offset.relative.left-this.offset.parent.left,b.containment=="document"?0:a(window).scrollTop()-this.offset.relative.top-this.offset.parent.top,(b.containment=="document"?0:a(window).scrollLeft())+a(b.containment=="document"?document:
721window).width()-this.helperProportions.width-this.margins.left,(b.containment=="document"?0:a(window).scrollTop())+(a(b.containment=="document"?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top];if(!/^(document|window|parent)$/.test(b.containment)&&b.containment.constructor!=Array){var b=a(b.containment),c=b[0];if(c){b.offset();var d=a(c).css("overflow")!="hidden";this.containment=[(parseInt(a(c).css("borderLeftWidth"),10)||0)+(parseInt(a(c).css("paddingLeft"),
72210)||0),(parseInt(a(c).css("borderTopWidth"),10)||0)+(parseInt(a(c).css("paddingTop"),10)||0),(d?Math.max(c.scrollWidth,c.offsetWidth):c.offsetWidth)-(parseInt(a(c).css("borderLeftWidth"),10)||0)-(parseInt(a(c).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left-this.margins.right,(d?Math.max(c.scrollHeight,c.offsetHeight):c.offsetHeight)-(parseInt(a(c).css("borderTopWidth"),10)||0)-(parseInt(a(c).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top-this.margins.bottom];
723this.relative_container=b}}else b.containment.constructor==Array&&(this.containment=b.containment)},_convertPositionTo:function(b,c){c||(c=this.position);var d=b=="absolute"?1:-1,f=this.cssPosition!="absolute"||this.scrollParent[0]!=document&&a.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,e=/(html|body)/i.test(f[0].tagName);return{top:c.top+this.offset.relative.top*d+this.offset.parent.top*d-(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():e?0:f.scrollTop())*
724d,left:c.left+this.offset.relative.left*d+this.offset.parent.left*d-(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():e?0:f.scrollLeft())*d}},_generatePosition:function(b){var c=this.options,d=this.cssPosition!="absolute"||this.scrollParent[0]!=document&&a.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,f=/(html|body)/i.test(d[0].tagName),e=b.pageX,g=b.pageY;if(this.originalPosition){var h;if(this.containment){if(this.relative_container){h=this.relative_container.offset();
725h=[this.containment[0]+h.left,this.containment[1]+h.top,this.containment[2]+h.left,this.containment[3]+h.top]}else h=this.containment;b.pageX-this.offset.click.left<h[0]&&(e=h[0]+this.offset.click.left);b.pageY-this.offset.click.top<h[1]&&(g=h[1]+this.offset.click.top);b.pageX-this.offset.click.left>h[2]&&(e=h[2]+this.offset.click.left);b.pageY-this.offset.click.top>h[3]&&(g=h[3]+this.offset.click.top)}if(c.grid){g=c.grid[1]?this.originalPageY+Math.round((g-this.originalPageY)/c.grid[1])*c.grid[1]:
726this.originalPageY;g=h?g-this.offset.click.top<h[1]||g-this.offset.click.top>h[3]?g-this.offset.click.top<h[1]?g+c.grid[1]:g-c.grid[1]:g:g;e=c.grid[0]?this.originalPageX+Math.round((e-this.originalPageX)/c.grid[0])*c.grid[0]:this.originalPageX;e=h?e-this.offset.click.left<h[0]||e-this.offset.click.left>h[2]?e-this.offset.click.left<h[0]?e+c.grid[0]:e-c.grid[0]:e:e}}return{top:g-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():
727f?0:d.scrollTop()),left:e-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():f?0:d.scrollLeft())}},_clear:function(){this.helper.removeClass("ui-draggable-dragging");this.helper[0]!=this.element[0]&&!this.cancelHelperRemoval&&this.helper.remove();this.helper=null;this.cancelHelperRemoval=false},_trigger:function(b,c,d){return d=d||this._uiHash(),a.ui.plugin.call(this,b,[c,d]),b=="drag"&&(this.positionAbs=this._convertPositionTo("absolute")),
728a.Widget.prototype._trigger.call(this,b,c,d)},plugins:{},_uiHash:function(){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs}}});a.ui.plugin.add("draggable","connectToSortable",{start:function(b,c){var d=a(this).data("draggable"),f=d.options,e=a.extend({},c,{item:d.element});d.sortables=[];a(f.connectToSortable).each(function(){var c=a.data(this,"sortable");c&&!c.options.disabled&&(d.sortables.push({instance:c,shouldRevert:c.options.revert}),
729c.refreshPositions(),c._trigger("activate",b,e))})},stop:function(b,c){var d=a(this).data("draggable"),f=a.extend({},c,{item:d.element});a.each(d.sortables,function(){this.instance.isOver?(this.instance.isOver=0,d.cancelHelperRemoval=true,this.instance.cancelHelperRemoval=false,this.shouldRevert&&(this.instance.options.revert=true),this.instance._mouseStop(b),this.instance.options.helper=this.instance.options._helper,d.options.helper=="original"&&this.instance.currentItem.css({top:"auto",left:"auto"})):
730(this.instance.cancelHelperRemoval=false,this.instance._trigger("deactivate",b,f))})},drag:function(b,c){var d=a(this).data("draggable"),f=this;a.each(d.sortables,function(){var e=false,g=this;this.instance.positionAbs=d.positionAbs;this.instance.helperProportions=d.helperProportions;this.instance.offset.click=d.offset.click;this.instance._intersectsWith(this.instance.containerCache)&&(e=true,a.each(d.sortables,function(){return this.instance.positionAbs=d.positionAbs,this.instance.helperProportions=
731d.helperProportions,this.instance.offset.click=d.offset.click,this!=g&&this.instance._intersectsWith(this.instance.containerCache)&&a.ui.contains(g.instance.element[0],this.instance.element[0])&&(e=false),e}));e?(this.instance.isOver||(this.instance.isOver=1,this.instance.currentItem=a(f).clone().removeAttr("id").appendTo(this.instance.element).data("sortable-item",true),this.instance.options._helper=this.instance.options.helper,this.instance.options.helper=function(){return c.helper[0]},b.target=
732this.instance.currentItem[0],this.instance._mouseCapture(b,true),this.instance._mouseStart(b,true,true),this.instance.offset.click.top=d.offset.click.top,this.instance.offset.click.left
732=d.offset.click.left,this.instance.offset.parent.left=this.instance.offset.parent.left-(d.offset.parent.left-this.instance.offset.parent.left),this.instance.offset.parent.top=this.instance.offset.parent.top-(d.offset.parent.top-this.instance.offset.parent.top),d._trigger("toSortable",b),d.dropped=this.instance.element,
733d.currentItem=d.element,this.instance.fromOutside=d),this.instance.currentItem&&this.instance._mouseDrag(b)):this.instance.isOver&&(this.instance.isOver=0,this.instance.cancelHelperRemoval=true,this.instance.options.revert=false,this.instance._trigger("out",b,this.instance._uiHash(this.instance)),this.instance._mouseStop(b,true),this.instance.options.helper=this.instance.options._helper,this.instance.currentItem.remove(),this.instance.placeholder&&this.instance.placeholder.remove(),d._trigger("fromSortable",
734b),d.dropped=false)})}});a.ui.plugin.add("draggable","cursor",{start:function(){var b=a("body"),c=a(this).data("draggable").options;b.css("cursor")&&(c._cursor=b.css("cursor"));b.css("cursor",c.cursor)},stop:function(){var b=a(this).data("draggable").options;b._cursor&&a("body").css("cursor",b._cursor)}});a.ui.plugin.add("draggable","opacity",{start:function(b,c){var d=a(c.helper),f=a(this).data("draggable").options;d.css("opacity")&&(f._opacity=d.css("opacity"));d.css("opacity",f.opacity)},stop:function(b,
735c){var d=a(this).data("draggable").options;d._opacity&&a(c.helper).css("opacity",d._opacity)}});a.ui.plugin.add("draggable","scroll",{start:function(){var b=a(this).data("draggable");b.scrollParent[0]!=document&&b.scrollParent[0].tagName!="HTML"&&(b.overflowOffset=b.scrollParent.offset())},drag:function(b){var c=a(this).data("draggable"),d=c.options,f=false;if(c.scrollParent[0]!=document&&c.scrollParent[0].tagName!="HTML"){if(!d.axis||d.axis!="x")c.overflowOffset.top+c.scrollParent[0].offsetHeight-
736b.pageY<d.scrollSensitivity?c.scrollParent[0].scrollTop=f=c.scrollParent[0].scrollTop+d.scrollSpeed:b.pageY-c.overflowOffset.top<d.scrollSensitivity&&(c.scrollParent[0].scrollTop=f=c.scrollParent[0].scrollTop-d.scrollSpeed);if(!d.axis||d.axis!="y")c.overflowOffset.left+c.scrollParent[0].offsetWidth-b.pageX<d.scrollSensitivity?c.scrollParent[0].scrollLeft=f=c.scrollParent[0].scrollLeft+d.scrollSpeed:b.pageX-c.overflowOffset.left<d.scrollSensitivity&&(c.scrollParent[0].scrollLeft=f=c.scrollParent[0].scrollLeft-
737d.scrollSpeed)}else{if(!d.axis||d.axis!="x")b.pageY-a(document).scrollTop()<d.scrollSensitivity?f=a(document).scrollTop(a(document).scrollTop()-d.scrollSpeed):a(window).height()-(b.pageY-a(document).scrollTop())<d.scrollSensitivity&&(f=a(document).scrollTop(a(document).scrollTop()+d.scrollSpeed));if(!d.axis||d.axis!="y")b.pageX-a(document).scrollLeft()<d.scrollSensitivity?f=a(document).scrollLeft(a(document).scrollLeft()-d.scrollSpeed):a(window).width()-(b.pageX-a(document).scrollLeft())<d.scrollSensitivity&&
738(f=a(document).scrollLeft(a(document).scrollLeft()+d.scrollSpeed))}f!==false&&a.ui.ddmanager&&!d.dropBehaviour&&a.ui.ddmanager.prepareOffsets(c,b)}});a.ui.plugin.add("draggable","snap",{start:function(){var b=a(this).data("draggable"),c=b.options;b.snapElements=[];a(c.snap.constructor!=String?c.snap.items||":data(draggable)":c.snap).each(function(){var c=a(this),f=c.offset();this!=b.element[0]&&b.snapElements.push({item:this,width:c.outerWidth(),height:c.outerHeight(),top:f.top,left:f.left})})},drag:function(b,
739c){for(var d=a(this).data("draggable"),f=d.options,e=f.snapTolerance,g=c.offset.left,h=g+d.helperProportions.width,i=c.offset.top,j=i+d.helperProportions.height,k=d.snapElements.length-1;k>=0;k--){var l=d.snapElements[k].left,n=l+d.snapElements[k].width,p=d.snapElements[k].top,o=p+d.snapElements[k].height;if(l-e<g&&g<n+e&&p-e<i&&i<o+e||l-e<g&&g<n+e&&p-e<j&&j<o+e||l-e<h&&h<n+e&&p-e<i&&i<o+e||l-e<h&&h<n+e&&p-e<j&&j<o+e){if(f.snapMode!="inner"){var q=Math.abs(p-j)<=e,s=Math.abs(o-i)<=e,r=Math.abs(l-
740h)<=e,t=Math.abs(n-g)<=e;q&&(c.position.top=d._convertPositionTo("relative",{top:p-d.helperProportions.height,left:0}).top-d.margins.top);s&&(c.position.top=d._convertPositionTo("relative",{top:o,left:0}).top-d.margins.top);
740r&&(c.position.left=d._convertPositionTo("relative",{top:0,left:l-d.helperProportions.width}).left-d.margins.left);t&&(c.position.left=d._convertPositionTo("relative",{top:0,left:n}).left-d.margins.left)}var v=q||s||r||t;if(f.snapMode!="outer"){q=Math.abs(p-i)<=e;s=Math.abs(o-
741j)<=e;r=Math.abs(l-g)<=e;t=Math.abs(n-h)<=e;q&&(c.position.top=d._convertPositionTo("relative",{top:p,left:0}).top-d.margins.top);s&&(c.position.top=d._convertPositionTo("relative",{top:o-d.helperProportions.height,left:0}).top-d.margins.top);r&&(c.position.left=d._convertPositionTo("relative",{top:0,left:l}).left-d.margins.left);t&&(c.position.left=d._convertPositionTo("relative",{top:0,left:n-d.helperProportions.width}).left-d.margins.left)}!d.snapElements[k].snapping&&(q||s||r||t||v)&&d.options.snap.snap&&
742d.options.snap.snap.call(d.element,b,a.extend(d._uiHash(),{snapItem:d.snapElements[k].item}));d.snapElements[k].snapping=q||s||r||t||v}else{d.snapElements[k].snapping&&d.options.snap.release&&d.options.snap.release.call(d.element,b,a.extend(d._uiHash(),{snapItem:d.snapElements[k].item}));d.snapElements[k].snapping=false}}}});a.ui.plugin.add("draggable","stack",{start:function(){var b=a(this).data("draggable").options,b=a.makeArray(a(b.stack)).sort(function(b,c){return(parseInt(a(b).css("zIndex"),
74310)||0)-(parseInt(a(c).css("zIndex"),10)||0)});if(b.length){var c=parseInt(b[0].style.zIndex)||0;a(b).each(function(a){this.style.zIndex=c+a});this[0].style.zIndex=c+b.length}}});a.ui.plugin.add("draggable","zIndex",{start:function(b,c){var d=a(c.helper),f=a(this).data("draggable").options;d.css("zIndex")&&(f._zIndex=d.css("zIndex"));d.css("zIndex",f.zIndex)},stop:function(b,c){var d=a(this).data("draggable").options;d._zIndex&&a(c.helper).css("zIndex",d._zIndex)}})})(jQuery);
744(function(a){a.widget("ui.droppable",{version:"1.9.1",widgetEventPrefix:"drop",options:{accept:"*",activeClass:false,addClasses:true,greedy:false,hoverClass:false,scope:"default",tolerance:"intersect"},_create:function(){var b=this.options,c=b.accept;this.isover=0;this.isout=1;this.accept=a.isFunction(c)?c:function(a){return a.is(c)};this.proportions={width:this.element[0].offsetWidth,height:this.element[0].offsetHeight};a.ui.ddmanager.droppables[b.scope]=a.ui.ddmanager.droppables[b.scope]||[];a.ui.ddmanager.droppables[b.scope].push(this);
745b.addClasses&&this.element.addClass("ui-droppable")},_destroy:function(){for(var b=a.ui.ddmanager.droppables[this.options.scope],c=0;c<b.length;c++)b[c]==this&&b.splice(c,1);this.element.removeClass("ui-droppable ui-droppable-disabled")},_setOption:function(b,c){b=="accept"&&(this.accept=a.isFunction(c)?c:function(a){return a.is(c)});a.Widget.prototype._setOption.apply(this,arguments)},_activate:function(b){var c=a.ui.ddmanager.current;this.options.activeClass&&this.element.addClass(this.options.activeClass);
746c&&this._trigger("activate",b,this.ui(c))},_deactivate:function(b){var c=a.ui.ddmanager.current;this.options.activeClass&&this.element.removeClass(this.options.activeClass);c&&this._trigger("deactivate",b,this.ui(c))},_over:function(b){var c=a.ui.ddmanager.current;if(c&&(c.currentItem||c.element)[0]!=this.element[0])this.accept.call(this.element[0],c.currentItem||c.element)&&(this.options.hoverClass&&this.element.addClass(this.options.hoverClass),this._trigger("over",b,this.ui(c)))},_out:function(b){var c=
747a.ui.ddmanager.current;if(c&&(c.currentItem||c.element)[0]!=this.element[0])this.accept.call(this.element[0],c.currentItem||c.element)&&(this.options.hoverClass&&this.element.removeClass(this.options.hoverClass),this._trigger("out",b,this.ui(c)))},_drop:function(b,c){var d=c||a.ui.ddmanager.current;if(!d||(d.currentItem||d.element)[0]==this.element[0])return false;var f=false;return this.element.find(":data(droppable)").not(".ui-draggable-dragging").each(function(){var b=a.data(this,"droppable");
748if(b.options.greedy&&!b.options.disabled&&b.options.scope==d.options.scope&&b.accept.call(b.element[0],d.currentItem||d.element)&&a.ui.intersect(d,a.extend(b,{offset:b.element.offset()}),b.options.tolerance))return f=true,false}),f?false:this.accept.call(this.element[0],d.currentItem||d.element)?(this.options.activeClass&&this.element.removeClass(this.options.activeClass),this.options.hoverClass&&this.element.removeClass(this.options.hoverClass),this._trigger("drop",b,this.ui(d)),this.element):false},
749ui:function(a){return{draggable:a.currentItem||a.element,helper:
749a.helper,position:a.position,offset:a.positionAbs}}});a.ui.intersect=function(b,c,d){if(!c.offset)return false;var f=(b.positionAbs||b.position.absolute).left,e=f+b.helperProportions.width,g=(b.positionAbs||b.position.absolute).top,h=g+b.helperProportions.height,i=c.offset.left,j=i+c.proportions.width,k=c.offset.top,l=k+c.proportions.height;switch(d){case "fit":return i<=f&&e<=j&&k<=g&&h<=l;case "intersect":return i<f+b.helperProportions.width/
7502&&e-b.helperProportions.width/2<j&&k<g+b.helperProportions.height/2&&h-b.helperProportions.height/2<l;case "pointer":return a.ui.isOver((b.positionAbs||b.position.absolute).top+(b.clickOffset||b.offset.click).top,(b.positionAbs||b.position.absolute).left+(b.clickOffset||b.offset.click).left,k,i,c.proportions.height,c.proportions.width);case "touch":return(g>=k&&g<=l||h>=k&&h<=l||g<k&&h>l)&&(f>=i&&f<=j||e>=i&&e<=j||f<i&&e>j);default:return false}};a.ui.ddmanager={current:null,droppables:{"default":[]},
751prepareOffsets:function(b,c){var d=a.ui.ddmanager.droppables[b.options.scope]||[],f=c?c.type:null,e=(b.currentItem||b.element).find(":data(droppable)").andSelf(),g=0;a:for(;g<d.length;g++)if(!(d[g].options.disabled||b&&!d[g].accept.call(d[g].element[0],b.currentItem||b.element))){for(var h=0;h<e.length;h++)if(e[h]==d[g].element[0]){d[g].proportions.height=0;continue a}d[g].visible=d[g].element.css("display")!="none";if(d[g].visible){f=="mousedown"&&d[g]._activate.call(d[g],c);d[g].offset=d[g].element.offset();
752d[g].proportions={width:d[g].element[0].offsetWidth,height:d[g].element[0].offsetHeight}}}},drop:function(b,c){var d=false;return a.each(a.ui.ddmanager.droppables[b.options.scope]||[],function(){if(this.options){!this.options.disabled&&this.visible&&a.ui.intersect(b,this,this.options.tolerance)&&(d=this._drop.call(this,c)||d);!this.options.disabled&&this.visible&&this.accept.call(this.element[0],b.currentItem||b.element)&&(this.isout=1,this.isover=0,this._deactivate.call(this,c))}}),d},dragStart:function(b,
753c){b.element.parentsUntil("body").bind("scroll.droppable",function(){b.options.refreshPositions||a.ui.ddmanager.prepareOffsets(b,c)})},drag:function(b,c){b.options.refreshPositions&&a.ui.ddmanager.prepareOffsets(b,c);a.each(a.ui.ddmanager.droppables[b.options.scope]||[],function(){if(!this.options.disabled&&!this.greedyChild&&this.visible){var d=a.ui.intersect(b,this,this.options.tolerance);if(d=!d&&this.isover==1?"isout":d&&this.isover==0?"isover":null){var f;if(this.options.greedy){var e=this.options.scope,
754g=this.element.parents(":data(droppable)").filter(function(){return a.data(this,"droppable").options.scope===e});g.length&&(f=a.data(g[0],"droppable"),f.greedyChild=d=="isover"?1:0)}f&&d=="isover"&&(f.isover=0,f.isout=1,f._out.call(f,c));this[d]=1;this[d=="isout"?"isover":"isout"]=0;this[d=="isover"?"_over":"_out"].call(this,c);f&&d=="isout"&&(f.isout=0,f.isover=1,f._over.call(f,c))}}})},dragStop:function(b,c){b.element.parentsUntil("body").unbind("scroll.droppable");b.options.refreshPositions||a.ui.ddmanager.prepareOffsets(b,
755c)}}})(jQuery);
756(function(a){a.widget("ui.resizable",a.ui.mouse,{version:"1.9.1",widgetEventPrefix:"resize",options:{alsoResize:false,animate:false,animateDuration:"slow",animateEasing:"swing",aspectRatio:false,autoHide:false,containment:false,ghost:false,grid:false,handles:"e,s,se",helper:false,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:1E3},_create:function(){var b=this,c=this.options;this.element.addClass("ui-resizable");a.extend(this,{_aspectRatio:!!c.aspectRatio,aspectRatio:c.aspectRatio,originalElement:this.element,
757_proportionallyResizeElements:[],_helper:c.helper||c.ghost||c.animate?c.helper||"ui-resizable-helper":null});this.element[0].nodeName.match(/canvas|textarea|input|select|button|img/i)&&(this.element.wrap(a('<div class="ui-wrapper" style="overflow: hidden;"></div>').css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")})),this.element=this.element.parent().data("resizable",this.element.data("resizable")),
758this.elementIsWrapper=true,this.element.css({marginLeft:this.originalElement.css("marginLeft"),marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom")}),this.originalElement.css({marginLeft:0,marginTop:0,marginRight:0,marginBottom:0}),this.originalResizeStyle=this.originalElement.css("resize"),this.originalElement.css("resize","none"),this._proportionallyResizeElements.push(this.originalElement.css({position:"static",
759zoom:1,display:"block"})),this.originalElement.css({margin:this.originalElement.css("margin")}),this._proportionallyResize());this.handles=c.handles||(a(".ui-resizable-handle",this.element).length?{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"}:"e,s,se");if(this.handles.constructor==String){this.handles=="all"&&(this.handles="n,e,s,w,se,sw,ne,nw");var e=this.handles.split(",");
760this.handles={};for(var g=0;g<e.length;g++){var h=a.trim(e[g]),i=a('<div class="ui-resizable-handle ui-resizable-'+h+'"></div>');i.css({zIndex:c.zIndex});"se"==h&&i.addClass("ui-icon ui-icon-gripsmall-diagonal-se");this.handles[h]=".ui-resizable-"+h;this.element.append(i)}}this._renderAxis=function(b){var b=b||this.element,c;for(c in this.handles){this.handles[c].constructor==String&&(this.handles[c]=a(this.handles[c],this.element).show());if(this.elementIsWrapper&&this.originalElement[0].nodeName.match(/textarea|input|select|button/i)){var e=
761a(this.handles[c],this.element),d=0,d=/sw|ne|nw|se|n|s/.test(c)?e.outerHeight():e.outerWidth(),e=["padding",/ne|nw|n
761/.test(c)?"Top":/se|sw|s/.test(c)?"Bottom":/^e$/.test(c)?"Right":"Left"].join("");b.css(e,d);this._proportionallyResize()}a(this.handles[c])}};this._renderAxis(this.element);this._handles=a(".ui-resizable-handle",this.element).disableSelection();this._handles.mouseover(function(){if(!b.resizing){if(this.className)var a=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i);b.axis=
762a&&a[1]?a[1]:"se"}});c.autoHide&&(this._handles.hide(),a(this.element).addClass("ui-resizable-autohide").mouseenter(function(){if(!c.disabled){a(this).removeClass("ui-resizable-autohide");b._handles.show()}}).mouseleave(function(){c.disabled||b.resizing||(a(this).addClass("ui-resizable-autohide"),b._handles.hide())}));this._mouseInit()},_destroy:function(){this._mouseDestroy();var b=function(b){a(b).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing").removeData("resizable").removeData("ui-resizable").unbind(".resizable").find(".ui-resizable-handle").remove()};
763if(this.elementIsWrapper){b(this.element);var c=this.element;this.originalElement.css({position:c.css("position"),width:c.outerWidth(),height:c.outerHeight(),top:c.css("top"),left:c.css("left")}).insertAfter(c);c.remove()}return this.originalElement.css("resize",this.originalResizeStyle),b(this.originalElement),this},_mouseCapture:function(b){var c=false,e;for(e in this.handles)a(this.handles[e])[0]==b.target&&(c=true);return!this.options.disabled&&c},_mouseStart:function(c){var f=this.options,e=
764this.element.position(),g=this.element;this.resizing=true;this.documentScroll={top:a(document).scrollTop(),left:a(document).scrollLeft()};(g.is(".ui-draggable")||/absolute/.test(g.css("position")))&&g.css({position:"absolute",top:e.top,left:e.left});this._renderProxy();var e=b(this.helper.css("left")),h=b(this.helper.css("top"));f.containment&&(e=e+(a(f.containment).scrollLeft()||0),h=h+(a(f.containment).scrollTop()||0));this.offset=this.helper.offset();this.position={left:e,top:h};this.size=this._helper?
765{width:g.outerWidth(),height:g.outerHeight()}:{width:g.width(),height:g.height()};this.originalSize=this._helper?{width:g.outerWidth(),height:g.outerHeight()}:{width:g.width(),height:g.height()};this.originalPosition={left:e,top:h};this.sizeDiff={width:g.outerWidth()-g.width(),height:g.outerHeight()-g.height()};this.originalMousePosition={left:c.pageX,top:c.pageY};this.aspectRatio=typeof f.aspectRatio=="number"?f.aspectRatio:this.originalSize.width/this.originalSize.height||1;f=a(".ui-resizable-"+
766this.axis).css("cursor");return a("body").css("cursor",f=="auto"?this.axis+"-resize":f),g.addClass("ui-resizable-resizing"),this._propagate("start",c),true},_mouseDrag:function(a){var b=this.helper,c=this.originalMousePosition,g=this._change[this.axis];if(!g)return false;c=g.apply(this,[a,a.pageX-c.left||0,a.pageY-c.top||0]);this._updateVirtualBoundaries(a.shiftKey);if(this._aspectRatio||a.shiftKey)c=this._updateRatio(c,a);return c=this._respectSize(c,a),this._propagate("resize",a),b.css({top:this.position.top+
767"px",left:this.position.left+"px",width:this.size.width+"px",height:this.size.height+"px"}),!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize(),this._updateCache(c),this._trigger("resize",a,this.ui()),false},_mouseStop:function(b){this.resizing=false;var c=this.options;if(this._helper){var e=this._proportionallyResizeElements,g=e.length&&/textarea/i.test(e[0].nodeName),e=g&&a.ui.hasScroll(e[0],"left")?0:this.sizeDiff.height,g=g?0:this.sizeDiff.width,g={width:this.helper.width()-
768g,height:this.helper.height()-e},e=parseInt(this.element.css("left"),10)+(this.position.left-this.originalPosition.left)||null,h=parseInt(this.element.css("top"),10)+(this.position.top-this.originalPosition.top)||null;c.animate||this.element.css(a.extend(g,{top:h,left:e}));this.helper.height(this.size.height);this.helper.width(this.size.width);this._helper&&!c.animate&&this._proportionallyResize()}return a("body").css("cursor","auto"),this.element.removeClass("ui-resizable-resizing"),this._propagate("stop",
769b),this._helper&&this.helper.remove(),false},_updateVirtualBoundaries:function(a){var b=this.options,e,g,h,b={minWidth:c(b.minWidth)?b.minWidth:0,maxWidth:c(b.maxWidth)?b.maxWidth:Infinity,minHeight:c(b.minHeight)?b.minHeight:0,maxHeight:c(b.maxHeight)?b.maxHeight:Infinity};if(this._aspectRatio||a){a=b.minHeight*this.aspectRatio;g=b.minWidth/this.aspectRatio;e=b.maxHeight*this.aspectRatio;h=b.maxWidth/this.aspectRatio;a>b.minWidth&&(b.minWidth=a);g>b.minHeight&&(b.minHeight=g);e<b.maxWidth&&(b.maxWidth=
770e);h<b.maxHeight&&(b.maxHeight=h)}this._vBoundaries=b},_updateCache:function(a){this.offset=this.helper.offset();
vendor: 4,069 bytes, lines 770-778
770c(a.left)&&(this.position.left=a.left);c(a.top)&&(this.position.top=a.top);c(a.height)&&(this.size.height=a.height);c(a.width)&&(this.size.width=a.width)},_updateRatio:function(a){var b=this.position,e=this.size,g=this.axis;return c(a.height)?a.width=a.height*this.aspectRatio:c(a.width)&&(a.height=a.width/this.aspectRatio),g=="sw"&&(a.left=b.left+(e.width-a.width),a.top=null),g=="nw"&&
771(a.top=b.top+(e.height-a.height),a.left=b.left+(e.width-a.width)),a},_respectSize:function(a){var b=this._vBoundaries,e=this.axis,g=c(a.width)&&b.maxWidth&&b.maxWidth<a.width,h=c(a.height)&&b.maxHeight&&b.maxHeight<a.height,i=c(a.width)&&b.minWidth&&b.minWidth>a.width,j=c(a.height)&&b.minHeight&&b.minHeight>a.height;i&&(a.width=b.minWidth);j&&(a.height=b.minHeight);g&&(a.width=b.maxWidth);h&&(a.height=b.maxHeight);var k=this.originalPosition.left+this.originalSize.width,l=this.position.top+this.size.height,
772n=/sw|nw|w/.test(e),e=/nw|ne|n/.test(e);i&&n&&(a.left=k-b.minWidth);g&&n&&(a.left=k-b.maxWidth);j&&e&&(a.top=l-b.minHeight);h&&e&&(a.top=l-b.maxHeight);b=!a.width&&!a.height;return b&&!a.left&&a.top?a.top=null:b&&!a.top&&a.left&&(a.left=null),a},_proportionallyResize:function(){if(this._proportionallyResizeElements.length)for(var b=this.helper||this.element,c=0;c<this._proportionallyResizeElements.length;c++){var e=this._proportionallyResizeElements[c];if(!this.borderDif){var g=[e.css("borderTopWidth"),
773e.css("borderRightWidth"),e.css("borderBottomWidth"),e.css("borderLeftWidth")],h=[e.css("paddingTop"),e.css("paddingRight"),e.css("paddingBottom"),e.css("paddingLeft")];this.borderDif=a.map(g,function(a,b){var c=parseInt(a,10)||0,e=parseInt(h[b],10)||0;return c+e})}e.css({height:b.height()-this.borderDif[0]-this.borderDif[2]||0,width:b.width()-this.borderDif[1]-this.borderDif[3]||0})}},_renderProxy:function(){var b=this.options;this.elementOffset=this.element.offset();if(this._helper){this.helper=
774this.helper||a('<div style="overflow:hidden;"></div>');var c=a.ui.ie6?1:0,e=a.ui.ie6?2:-1;this.helper.addClass(this._helper).css({width:this.element.outerWidth()+e,height:this.element.outerHeight()+e,position:"absolute",left:this.elementOffset.left-c+"px",top:this.elementOffset.top-c+"px",zIndex:++b.zIndex});this.helper.appendTo("body").disableSelection()}else this.helper=this.element},_change:{e:function(a,b){return{width:this.originalSize.width+b}},w:function(a,b){return{left:this.originalPosition.left+
775b,width:this.originalSize.width-b}},n:function(a,b,c){return{top:this.originalPosition.top+c,height:this.originalSize.height-c}},s:function(a,b,c){return{height:this.originalSize.height+c}},se:function(b,c,e){return a.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[b,c,e]))},sw:function(b,c,e){return a.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[b,c,e]))},ne:function(b,c,e){return a.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,
776[b,c,e]))},nw:function(b,c,e){return a.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[b,c,e]))}},_propagate:function(b,c){a.ui.plugin.call(this,b,[c,this.ui()]);b!="resize"&&this._trigger(b,c,this.ui())},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}});a.ui.plugin.add("resizable","alsoResize",{start:function(){var b=
777a(this).data("resizable").options,c=function(b){a(b).each(function(){var b=a(this);b.data("resizable-alsoresize",{width:parseInt(b.width(),10),height:parseInt(b.height(),10),left:parseInt(b.css("left"),10),top:parseInt(b.css("top"),10)})})};typeof b.alsoResize=="object"&&!b.alsoResize.parentNode?b.alsoResize.length?(b.alsoResize=b.alsoResize[0],c(b.alsoResize)):a.each(b.alsoResize,function(a){c(a)}):c(b.alsoResize)},resize:function(b,c){var e=a(this).data("resizable"),g=e.options,h=e.originalSize,
778i=e.originalPosition,j={height:e.size.height-h.height||0,width:e.size.width-h.width||0,top:e.position.top-i.top||0,left
778:e.position.left-i.left||0},k=function(b,e){a(b).each(function(){var b=a(this),d=a(this).data("resizable-alsoresize"),g={},h=e&&e.length?e:b.parents(c.originalElement[0]).length?["width","height"]:["width","height","top","left"];a.each(h,function(a,b){var c=(d[b]||0)+(j[b]||0);c&&c>=0&&(g[b]=c||null)});b.css(g)})};typeof g.alsoResize=="object"&&!g.alsoResize.nodeType?a.each(g.alsoResize,
779function(a,b){k(a,b)}):k(g.alsoResize)},stop:function(){a(this).removeData("resizable-alsoresize")}});a.ui.plugin.add("resizable","animate",{stop:function(b){var c=a(this).data("resizable"),e=c.options,g=c._proportionallyResizeElements,h=g.length&&/textarea/i.test(g[0].nodeName),i=h&&a.ui.hasScroll(g[0],"left")?0:c.sizeDiff.height,h={width:c.size.width-(h?0:c.sizeDiff.width),height:c.size.height-i},i=parseInt(c.element.css("left"),10)+(c.position.left-c.originalPosition.left)||null,j=parseInt(c.element.css("top"),
78010)+(c.position.top-c.originalPosition.top)||null;c.element.animate(a.extend(h,j&&i?{top:j,left:i}:{}),{duration:e.animateDuration,easing:e.animateEasing,step:function(){var e={width:parseInt(c.element.css("width"),10),height:parseInt(c.element.css("height"),10),top:parseInt(c.element.css("top"),10),left:parseInt(c.element.css("left"),10)};g&&g.length&&a(g[0]).css({width:e.width,height:e.height});c._updateCache(e);c._propagate("resize",b)}})}});a.ui.plugin.add("resizable","containment",{start:function(){var c=
781a(this).data("resizable"),f=c.element,e=c.options.containment;if(f=e instanceof a?e.get(0):/parent/.test(e)?f.parent().get(0):e){c.containerElement=a(f);if(/document/.test(e)||e==document){c.containerOffset={left:0,top:0};c.containerPosition={left:0,top:0};c.parentData={element:a(document),left:0,top:0,width:a(document).width(),height:a(document).height()||document.body.parentNode.scrollHeight}}else{var g=a(f),h=[];a(["Top","Right","Left","Bottom"]).each(function(a,c){h[a]=b(g.css("padding"+c))});
782c.containerOffset=g.offset();c.containerPosition=g.position();c.containerSize={height:g.innerHeight()-h[3],width:g.innerWidth()-h[1]};var e=c.containerOffset,i=c.containerSize.height,j=c.containerSize.width,j=a.ui.hasScroll(f,"left")?f.scrollWidth:j,i=a.ui.hasScroll(f)?f.scrollHeight:i;c.parentData={element:f,left:e.left,top:e.top,width:j,height:i}}}},resize:function(b){var c=a(this).data("resizable"),e=c.options,g=c.containerOffset,h=c.position,b=c._aspectRatio||b.shiftKey,i={top:0,left:0},j=c.containerElement;
783j[0]!=document&&/static/.test(j.css("position"))&&(i=g);h.left<(c._helper?g.left:0)&&(c.size.width=c.size.width+(c._helper?c.position.left-g.left:c.position.left-i.left),b&&(c.size.height=c.size.width/c.aspectRatio),c.position.left=e.helper?g.left:0);h.top<(c._helper?g.top:0)&&(c.size.height=c.size.height+(c._helper?c.position.top-g.top:c.position.top),b&&(c.size.width=c.size.height*c.aspectRatio),c.position.top=c._helper?g.top:0);c.offset.left=c.parentData.left+c.position.left;c.offset.top=c.parentData.top+
784c.position.top;e=Math.abs(c.offset.left-i.left+c.sizeDiff.width);g=Math.abs((c._helper?c.offset.top-i.top:c.offset.top-g.top)+c.sizeDiff.height);h=c.containerElement.get(0)==c.element.parent().get(0);i=/relative|absolute/.test(c.containerElement.css("position"));h&&i&&(e=e-c.parentData.left);e+c.size.width>=c.parentData.width&&(c.size.width=c.parentData.width-e,b&&(c.size.height=c.size.width/c.aspectRatio));g+c.size.height>=c.parentData.height&&(c.size.height=c.parentData.height-g,b&&(c.size.width=
785c.size.height*c.aspectRatio))},stop:function(){var b=a(this).data("resizable"),c=b.options,e=b.containerOffset,g=b.containerPosition,h=b.containerElement,i=a(b.helper),j=i.offset(),k=i.outerWidth()-b.sizeDiff.width,i=i.outerHeight()-b.sizeDiff.height;b._helper&&!c.animate&&/relative/.test(h.css("position"))&&a(this).css({left:j.left-g.left-e.left,width:k,height:i});b._helper&&!c.animate&&/static/.test(h.css("position"))&&a(this).css({left:j.left-g.left-e.left,width:k,height:i})}});a.ui.plugin.add("resizable",
786"ghost",{start:function(){var b=a(this).data("resizable"),c=b.options,e=b.size;b.ghost=b.originalElement.clone();b.ghost.css({opacity:0.25,display:"block",position:"relative",height:e.height,width:e.width,margin:0,left:0,top:0}).addClass("ui-resizable-ghost").addClass(typeof c.ghost=="string"?c.ghost:"");b.ghost.appendTo(b.helper)},resize:function(){var b=a(this).data("resizable");b.ghost&&b.ghost.css({position:"relative",height:b.size.height,width:b.size.width})},stop:function(){var b=a(this).data("resizable");
787b.ghost&&b.helper&&b.helper.get(0).removeChild(b.ghost.get(0))}});a.ui.plugin.add("resizable","grid",{resize:function(){var b=a(this).data("resizable"),c=b.options,e=b.size,g=b.originalSize,h=b.originalPosition,i=b.axis;c.grid=typeof c.grid=="number"?[c.grid,c.grid]:c.grid;var j=Math.round((e.width-g.width)/(c.grid[0]||1))*(c.grid[0]||1),c=Math.round((e.height-g.height)/(c.grid[1]||1))*(c.grid[1]||1);/^(se|s|e)$/.test(i)?(b.size.width=g.width+j,b.size.height=g.height+c):/^(ne)$/.test(i)?(b.size.width=
788g.width+j,b.size.height=g.height+c,b.position.top=h.top-c):/^(sw)$/.test(i)?(b.size.width=g.width+j,b.size.height=g.height+c,b.position.left
788=h.left-j):(b.size.width=g.width+j,b.size.height=g.height+c,b.position.top=h.top-c,b.position.left=h.left-j)}});var b=function(a){return parseInt(a,10)||0},c=function(a){return!isNaN(parseInt(a,10))}})(jQuery);
789(function(a){a.widget("ui.selectable",a.ui.mouse,{version:"1.9.1",options:{appendTo:"body",autoRefresh:true,distance:0,filter:"*",tolerance:"touch"},_create:function(){var b=this;this.element.addClass("ui-selectable");this.dragged=false;var c;this.refresh=function(){c=a(b.options.filter,b.element[0]);c.addClass("ui-selectee");c.each(function(){var b=a(this),c=b.offset();a.data(this,"selectable-item",{element:this,$element:b,left:c.left,top:c.top,right:c.left+b.outerWidth(),bottom:c.top+b.outerHeight(),
790startselected:false,selected:b.hasClass("ui-selected"),selecting:b.hasClass("ui-selecting"),unselecting:b.hasClass("ui-unselecting")})})};this.refresh();this.selectees=c.addClass("ui-selectee");this._mouseInit();this.helper=a("<div class='ui-selectable-helper'></div>")},_destroy:function(){this.selectees.removeClass("ui-selectee").removeData("selectable-item");this.element.removeClass("ui-selectable ui-selectable-disabled");this._mouseDestroy()},_mouseStart:function(b){var c=this;this.opos=[b.pageX,
791b.pageY];if(!this.options.disabled){var d=this.options;this.selectees=a(d.filter,this.element[0]);this._trigger("start",b);a(d.appendTo).append(this.helper);this.helper.css({left:b.clientX,top:b.clientY,width:0,height:0});d.autoRefresh&&this.refresh();this.selectees.filter(".ui-selected").each(function(){var d=a.data(this,"selectable-item");d.startselected=true;!b.metaKey&&!b.ctrlKey&&(d.$element.removeClass("ui-selected"),d.selected=false,d.$element.addClass("ui-unselecting"),d.unselecting=true,
792c._trigger("unselecting",b,{unselecting:d.element}))});a(b.target).parents().andSelf().each(function(){var d=a.data(this,"selectable-item");if(d){var e=!b.metaKey&&!b.ctrlKey||!d.$element.hasClass("ui-selected");return d.$element.removeClass(e?"ui-unselecting":"ui-selected").addClass(e?"ui-selecting":"ui-unselecting"),d.unselecting=!e,d.selecting=e,d.selected=e,e?c._trigger("selecting",b,{selecting:d.element}):c._trigger("unselecting",b,{unselecting:d.element}),false}})}},_mouseDrag:function(b){var c=
793this;this.dragged=true;if(!this.options.disabled){var d=this.options,f=this.opos[0],e=this.opos[1],g=b.pageX,h=b.pageY;if(f>g)var i=g,g=f,f=i;if(e>h){i=h;h=e;e=i}return this.helper.css({left:f,top:e,width:g-f,height:h-e}),this.selectees.each(function(){var i=a.data(this,"selectable-item");if(i&&i.element!=c.element[0]){var k=false;d.tolerance=="touch"?k=!(i.left>g||i.right<f||i.top>h||i.bottom<e):d.tolerance=="fit"&&(k=i.left>f&&i.right<g&&i.top>e&&i.bottom<h);k?(i.selected&&(i.$element.removeClass("ui-selected"),
794i.selected=false),i.unselecting&&(i.$element.removeClass("ui-unselecting"),i.unselecting=false),i.selecting||(i.$element.addClass("ui-selecting"),i.selecting=true,c._trigger("selecting",b,{selecting:i.element}))):(i.selecting&&((b.metaKey||b.ctrlKey)&&i.startselected?(i.$element.removeClass("ui-selecting"),i.selecting=false,i.$element.addClass("ui-selected"),i.selected=true):(i.$element.removeClass("ui-selecting"),i.selecting=false,i.startselected&&(i.$element.addClass("ui-unselecting"),i.unselecting=
795true),c._trigger("unselecting",b,{unselecting:i.element}))),i.selected&&!b.metaKey&&!b.ctrlKey&&!i.startselected&&(i.$element.removeClass("ui-selected"),i.selected=false,i.$element.addClass("ui-unselecting"),i.unselecting=true,c._trigger("unselecting",b,{unselecting:i.element})))}}),false}},_mouseStop:function(b){var c=this;this.dragged=false;return a(".ui-unselecting",this.element[0]).each(function(){var d=a.data(this,"selectable-item");d.$element.removeClass("ui-unselecting");d.unselecting=false;
796d.startselected=false;c._trigger("unselected",b,{unselected:d.element})}),a(".ui-selecting",this.element[0]).each(function(){var d=a.data(this,"selectable-item");d.$element.removeClass("ui-selecting").addClass("ui-selected");d.selecting=false;d.selected=true;d.startselected=true;c._trigger("selected",b,{selected:d.element})}),this._trigger("stop",b),this.helper.remove(),false}})})(jQuery);
797(function(a){a.widget("ui.sortable",a.ui.mouse,{version:"1.9.1",widgetEventPrefix:"sort",ready:false,options:{appendTo:"parent",axis:false,connectWith:false,containment:false,curs
797or:"auto",cursorAt:false,dropOnEmpty:true,forcePlaceholderSize:false,forceHelperSize:false,grid:false,handle:false,helper:"original",items:"> *",opacity:false,placeholder:false,revert:false,scroll:true,scrollSensitivity:20,scrollSpeed:20,scope:"default",tolerance:"intersect",zIndex:1E3},_create:function(){var a=this.options;
798this.containerCache={};this.element.addClass("ui-sortable");this.refresh();this.floating=this.items.length?a.axis==="x"||/left|right/.test(this.items[0].item.css("float"))||/inline|table-cell/.test(this.items[0].item.css("display")):false;this.offset=this.element.offset();this._mouseInit();this.ready=true},_destroy:function(){this.element.removeClass("ui-sortable ui-sortable-disabled");this._mouseDestroy();for(var a=this.items.length-1;a>=0;a--)this.items[a].item.removeData(this.widgetName+"-item");
799return this},_setOption:function(b,c){b==="disabled"?(this.options[b]=c,this.widget().toggleClass("ui-sortable-disabled",!!c)):a.Widget.prototype._setOption.apply(this,arguments)},_mouseCapture:function(b,c){var d=this;if(this.reverting||this.options.disabled||this.options.type=="static")return false;this._refreshItems(b);var f=null;a(b.target).parents().each(function(){if(a.data(this,d.widgetName+"-item")==d)return f=a(this),false});a.data(b.target,d.widgetName+"-item")==d&&(f=a(b.target));if(!f)return false;
800if(this.options.handle&&!c){var e=false;a(this.options.handle,f).find("*").andSelf().each(function(){this==b.target&&(e=true)});if(!e)return false}return this.currentItem=f,this._removeCurrentsFromItems(),true},_mouseStart:function(b,c,d){c=this.options;this.currentContainer=this;this.refreshPositions();this.helper=this._createHelper(b);this._cacheHelperProportions();this._cacheMargins();this.scrollParent=this.helper.scrollParent();this.offset=this.currentItem.offset();this.offset={top:this.offset.top-
801this.margins.top,left:this.offset.left-this.margins.left};a.extend(this.offset,{click:{left:b.pageX-this.offset.left,top:b.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()});this.helper.css("position","absolute");this.cssPosition=this.helper.css("position");this.originalPosition=this._generatePosition(b);this.originalPageX=b.pageX;this.originalPageY=b.pageY;c.cursorAt&&this._adjustOffsetFromHelper(c.cursorAt);this.domPosition={prev:this.currentItem.prev()[0],
802parent:this.currentItem.parent()[0]};this.helper[0]!=this.currentItem[0]&&this.currentItem.hide();this._createPlaceholder();c.containment&&this._setContainment();c.cursor&&(a("body").css("cursor")&&(this._storedCursor=a("body").css("cursor")),a("body").css("cursor",c.cursor));c.opacity&&(this.helper.css("opacity")&&(this._storedOpacity=this.helper.css("opacity")),this.helper.css("opacity",c.opacity));c.zIndex&&(this.helper.css("zIndex")&&(this._storedZIndex=this.helper.css("zIndex")),this.helper.css("zIndex",
803c.zIndex));this.scrollParent[0]!=document&&this.scrollParent[0].tagName!="HTML"&&(this.overflowOffset=this.scrollParent.offset());this._trigger("start",b,this._uiHash());this._preserveHelperProportions||this._cacheHelperProportions();if(!d)for(d=this.containers.length-1;d>=0;d--)this.containers[d]._trigger("activate",b,this._uiHash(this));return a.ui.ddmanager&&(a.ui.ddmanager.current=this),a.ui.ddmanager&&!c.dropBehaviour&&a.ui.ddmanager.prepareOffsets(this,b),this.dragging=true,this.helper.addClass("ui-sortable-helper"),
804this._mouseDrag(b),true},_mouseDrag:function(b){this.position=this._generatePosition(b);this.positionAbs=this._convertPositionTo("absolute");this.lastPositionAbs||(this.lastPositionAbs=this.positionAbs);if(this.options.scroll){var c=this.options,d=false;this.scrollParent[0]!=document&&this.scrollParent[0].tagName!="HTML"?(this.overflowOffset.top+this.scrollParent[0].offsetHeight-b.pageY<c.scrollSensitivity?this.scrollParent[0].scrollTop=d=this.scrollParent[0].scrollTop+c.scrollSpeed:b.pageY-this.overflowOffset.top<
805c.scrollSensitivity&&(this.scrollParent[0].scrollTop=d=this.scrollParent[0].scrollTop-c.scrollSpeed),this.overflowOffset.left+this.scrollParent[0].offsetWidth-b.pageX<c.scrollSensitivity?this.scrollParent[0].scrollLeft=d=this.scrollParent[0].scrollLeft+c.scrollSpeed:b.pageX-this.overflowOffset.left<c.scrollSensitivity&&(this.scrollParent[0].scrollLeft=d=this.scrollParent[0].scrollLeft-c.scrollSpeed)):(b.pageY-a(document).scrollTop()<c.scrollSensitivity?d=a(document).scrollTop(a(document).scrollTop()-
806c.scrollSpeed):a(window).height()-(b.pageY-a(document).scrollTop())<c.scrollSensitivity&&(d=a(document).scrollTop(a(document).scrollTop()+c.scrollSpeed)),b.pageX-a(document).scrollLeft()<c.scrollSensitivity?d=a(document).scrollLeft(a(document).scrollLeft()-c.scrollSpeed):a(window).width()-(b.pageX-a(document).scrollLeft())<c.scrollSensitivity&&(d=a(document).scrollLeft(a(document).scrollLeft()+c.scrollSpeed)));d!==false&&a.ui.ddmanager&&!c.dropBehaviour&&a.ui.ddmanager.prepareOffsets(this,b)}this.positionAbs=
807this._convertPositionTo("absolute");if(!this.options.axis||this.options.axis!="y")this.helper[0].style.left=this.position.left+"px";if(!this.options.axis||this.options.axis!="x")this.helper[0].style.top=this.position.top+"px";for(c=this.items.length-1;c>=0;c--){var d=this.items[c],f=d.item[0],e=this._intersectsWithPointer(d);if(e&&d.instance===this.currentContainer&&f!=this.currentItem[0]&&this.placeholder[e==1?"next":"prev"]()[0]!=f&&!a.contains(this.placeholder[0],f)&&(this.options.type=="semi-dynamic"?
808!a.contains(this.element[0],f):1)){this.direction=e==1?"down":"up";if(this.options.tolerance!="pointer"&&!this._intersectsWithSides(d))break;this._rearrange(b,d);this._trigger("change",b,this._uiHash());break}}return this._contactContainers(b),a.ui.ddmanager&&a.ui.ddmanager.drag(this,b),this._trigger("sort",b,this._uiHash()),this.lastPositionAbs=this.positionAbs,false},_mouseStop:function(b,c){if(b){a.ui.ddmanager&&!this.options.dropBehaviour&&a.ui.ddmanager.drop(this,b);
808if(this.options.revert){var d=
809this,f=this.placeholder.offset();this.reverting=true;a(this.helper).animate({left:f.left-this.offset.parent.left-this.margins.left+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollLeft),top:f.top-this.offset.parent.top-this.margins.top+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollTop)},parseInt(this.options.revert,10)||500,function(){d._clear(b)})}else this._clear(b,c);return false}},cancel:function(){if(this.dragging){this._mouseUp({target:null});this.options.helper==
810"original"?this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper"):this.currentItem.show();for(var b=this.containers.length-1;b>=0;b--){this.containers[b]._trigger("deactivate",null,this._uiHash(this));this.containers[b].containerCache.over&&(this.containers[b]._trigger("out",null,this._uiHash(this)),this.containers[b].containerCache.over=0)}}return this.placeholder&&(this.placeholder[0].parentNode&&this.placeholder[0].parentNode.removeChild(this.placeholder[0]),this.options.helper!=
811"original"&&this.helper&&this.helper[0].parentNode&&this.helper.remove(),a.extend(this,{helper:null,dragging:false,reverting:false,_noFinalSort:null}),this.domPosition.prev?a(this.domPosition.prev).after(this.currentItem):a(this.domPosition.parent).prepend(this.currentItem)),this},serialize:function(b){var c=this._getItemsAsjQuery(b&&b.connected),d=[];return b=b||{},a(c).each(function(){var c=(a(b.item||this).attr(b.attribute||"id")||"").match(b.expression||/(.+)[-=_](.+)/);c&&d.push((b.key||c[1]+
812"[]")+"="+(b.key&&b.expression?c[1]:c[2]))}),!d.length&&b.key&&d.push(b.key+"="),d.join("&")},toArray:function(b){var c=this._getItemsAsjQuery(b&&b.connected),d=[];return b=b||{},c.each(function(){d.push(a(b.item||this).attr(b.attribute||"id")||"")}),d},_intersectsWith:function(a){var c=this.positionAbs.left,d=c+this.helperProportions.width,f=this.positionAbs.top,e=f+this.helperProportions.height,g=a.left,h=g+a.width,i=a.top,j=i+a.height,k=this.offset.click.top,l=this.offset.click.left;return this.options.tolerance==
813"pointer"||this.options.forcePointerForContainers||this.options.tolerance!="pointer"&&this.helperProportions[this.floating?"width":"height"]>a[this.floating?"width":"height"]?f+k>i&&f+k<j&&c+l>g&&c+l<h:g<c+this.helperProportions.width/2&&d-this.helperProportions.width/2<h&&i<f+this.helperProportions.height/2&&e-this.helperProportions.height/2<j},_intersectsWithPointer:function(b){var c=this.options.axis==="x"||a.ui.isOverAxis(this.positionAbs.top+this.offset.click.top,b.top,b.height),b=this.options.axis===
814"y"||a.ui.isOverAxis(this.positionAbs.left+this.offset.click.left,b.left,b.width),c=c&&b,b=this._getDragVerticalDirection(),d=this._getDragHorizontalDirection();return c?this.floating?d&&d=="right"||b=="down"?2:1:b&&(b=="down"?2:1):false},_intersectsWithSides:function(b){var c=a.ui.isOverAxis(this.positionAbs.top+this.offset.click.top,b.top+b.height/2,b.height),b=a.ui.isOverAxis(this.positionAbs.left+this.offset.click.left,b.left+b.width/2,b.width),d=this._getDragVerticalDirection(),f=this._getDragHorizontalDirection();
815return this.floating&&f?f=="right"&&b||f=="left"&&!b:d&&(d=="down"&&c||d=="up"&&!c)},_getDragVerticalDirection:function(){var a=this.positionAbs.top-this.lastPositionAbs.top;return a!=0&&(a>0?"down":"up")},_getDragHorizontalDirection:function(){var a=this.positionAbs.left-this.lastPositionAbs.left;return a!=0&&(a>0?"right":"left")},refresh:function(a){return this._refreshItems(a),this.refreshPositions(),this},_connectWith:function(){var a=this.options;return a.connectWith.constructor==String?[a.connectWith]:
816a.connectWith},_getItemsAsjQuery:function(b){var c=[],d=[],f=this._connectWith();if(f&&b)for(b=f.length-1;b>=0;b--)for(var e=a(f[b]),g=e.length-1;g>=0;g--){var h=a.data(e[g],this.widgetName);h&&h!=this&&!h.options.disabled&&d.push([a.isFunction(h.options.items)?h.options.items.call(h.element):a(h.options.items,h.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),h])}d.push([a.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):
817a(this.options.items,this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),this]);for(b=d.length-1;b>=0;b--)d[b][0].each(function(){c.push(this)});return a(c)},_removeCurrentsFromItems:function(){var b=this.currentItem.find(":data("+this.widgetName+"-item)");this.items=a.grep(this.items,function(a){for(var d=0;d<b.length;d++)if(b[d]==a.item[0])return false;return true})},_refreshItems:function(b){this.items=[];this.containers=[this];var c=this.items,d=[[a.isFunction(this.options.items)?
818this.options.items.call(this.element[0],b,{item:this.currentItem}):a(this.options.items,this.element),this]],f=this._connectWith();if(f&&this.ready)for(var e=f.length-1;e>=0;e--)for(var g=a(f[e]),h=g.length-1;h>=0;h--){var i=a.data(g[h],this.widgetName);i&&i!=this&&!i.options.disabled&&(d.push([a.isFunction(i.options.items)?i.options.items.call(i.element[0],b,{item:this.currentItem}):a(i.options.items,i.element),i]),this.containers.push(i))}for(e=d.length-1;e>=0;e--){b=d[e][1];f=d[e][0];h=0;for(g=
819f.length;h<g;h++){i=a(f[h]);i.data(this.widgetName+"-item",b);c.push({item:i,instance:b,width:0,height:0,left:0,top:0})}}},refreshPositions:function(b){this.offsetParent&&this.helper&&(this.offset.parent=this._getParentOffset());for(var c=this.items.length-1;c>=0;c--){var d=this.items[c];if(!(d.instance!=this.currentContainer&&this.currentContainer&&d.item[0]!=this.currentItem[0])){var f=this.options.toleranceElement?a(this.options.toleranceElement,d.item):d.item;b||(d.width=f.outerWidth(),d.height=
820f.outerHeight());f=f.offset();d.left=f.left;d.top=f.top}}
820if(this.options.custom&&this.options.custom.refreshContainers)this.options.custom.refreshContainers.call(this);else for(c=this.containers.length-1;c>=0;c--){f=this.containers[c].element.offset();this.containers[c].containerCache.left=f.left;this.containers[c].containerCache.top=f.top;this.containers[c].containerCache.width=this.containers[c].element.outerWidth();this.containers[c].containerCache.height=this.containers[c].element.outerHeight()}return this},
821_createPlaceholder:function(b){var b=b||this,c=b.options;if(!c.placeholder||c.placeholder.constructor==String){var d=c.placeholder;c.placeholder={element:function(){var c=a(document.createElement(b.currentItem[0].nodeName)).addClass(d||b.currentItem[0].className+" ui-sortable-placeholder").removeClass("ui-sortable-helper")[0];return d||(c.style.visibility="hidden"),c},update:function(a,e){if(!d||c.forcePlaceholderSize){e.height()||e.height(b.currentItem.innerHeight()-parseInt(b.currentItem.css("paddingTop")||
8220,10)-parseInt(b.currentItem.css("paddingBottom")||0,10));e.width()||e.width(b.currentItem.innerWidth()-parseInt(b.currentItem.css("paddingLeft")||0,10)-parseInt(b.currentItem.css("paddingRight")||0,10))}}}}b.placeholder=a(c.placeholder.element.call(b.element,b.currentItem));b.currentItem.after(b.placeholder);c.placeholder.update(b,b.placeholder)},_contactContainers:function(b){for(var c=null,d=null,f=this.containers.length-1;f>=0;f--)if(!a.contains(this.currentItem[0],this.containers[f].element[0]))if(this._intersectsWith(this.containers[f].containerCache)){if(!c||
823!a.contains(this.containers[f].element[0],c.element[0])){c=this.containers[f];d=f}}else this.containers[f].containerCache.over&&(this.containers[f]._trigger("out",b,this._uiHash(this)),this.containers[f].containerCache.over=0);if(c)if(this.containers.length===1){this.containers[d]._trigger("over",b,this._uiHash(this));this.containers[d].containerCache.over=1}else{for(var c=1E4,f=null,e=this.containers[d].floating?"left":"top",g=this.containers[d].floating?"width":"height",h=this.positionAbs[e]+this.offset.click[e],
824i=this.items.length-1;i>=0;i--)if(a.contains(this.containers[d].element[0],this.items[i].item[0])&&this.items[i].item[0]!=this.currentItem[0]){var j=this.items[i].item.offset()[e],k=false;Math.abs(j-h)>Math.abs(j+this.items[i][g]-h)&&(k=true,j=j+this.items[i][g]);Math.abs(j-h)<c&&(c=Math.abs(j-h),f=this.items[i],this.direction=k?"up":"down")}if(f||this.options.dropOnEmpty){this.currentContainer=this.containers[d];f?this._rearrange(b,f,null,true):this._rearrange(b,null,this.containers[d].element,true);
825this._trigger("change",b,this._uiHash());this.containers[d]._trigger("change",b,this._uiHash(this));this.options.placeholder.update(this.currentContainer,this.placeholder);this.containers[d]._trigger("over",b,this._uiHash(this));this.containers[d].containerCache.over=1}}},_createHelper:function(b){var c=this.options,b=a.isFunction(c.helper)?a(c.helper.apply(this.element[0],[b,this.currentItem])):c.helper=="clone"?this.currentItem.clone():this.currentItem;return b.parents("body").length||a(c.appendTo!=
826"parent"?c.appendTo:this.currentItem[0].parentNode)[0].appendChild(b[0]),b[0]==this.currentItem[0]&&(this._storedCSS={width:this.currentItem[0].style.width,height:this.currentItem[0].style.height,position:this.currentItem.css("position"),top:this.currentItem.css("top"),left:this.currentItem.css("left")}),(b[0].style.width==""||c.forceHelperSize)&&b.width(this.currentItem.width()),(b[0].style.height==""||c.forceHelperSize)&&b.height(this.currentItem.height()),b},_adjustOffsetFromHelper:function(b){typeof b==
827"string"&&(b=b.split(" "));a.isArray(b)&&(b={left:+b[0],top:+b[1]||0});"left"in b&&(this.offset.click.left=b.left+this.margins.left);"right"in b&&(this.offset.click.left=this.helperProportions.width-b.right+this.margins.left);"top"in b&&(this.offset.click.top=b.top+this.margins.top);"bottom"in b&&(this.offset.click.top=this.helperProportions.height-b.bottom+this.margins.top)},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var b=this.offsetParent.offset();this.cssPosition==
828"absolute"&&this.scrollParent[0]!=document&&a.contains(this.scrollParent[0],this.offsetParent[0])&&(b.left=b.left+this.scrollParent.scrollLeft(),b.top=b.top+this.scrollParent.scrollTop());if(this.offsetParent[0]==document.body||this.offsetParent[0].tagName&&this.offsetParent[0].tagName.toLowerCase()=="html"&&a.ui.ie)b={top:0,left:0};return{top:b.top+(parseInt(this.offsetParent.css("borderTopWidth"),
vendor: 7,306 bytes, lines 828-843
82810)||0),left:b.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if(this.cssPosition==
829"relative"){var a=this.currentItem.position();return{top:a.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:a.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}return{top:0,left:0}},_cacheMargins:function(){this.margins={left:parseInt(this.currentItem.css("marginLeft"),10)||0,top:parseInt(this.currentItem.css("marginTop"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},
830_setContainment:function(){var b=this.options;b.containment=="parent"&&(b.containment=this.helper[0].parentNode);if(b.containment=="document"||b.containment=="window")this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,a(b.containment=="document"?document:window).width()-this.helperProportions.width-this.margins.left,(a(b.containment=="document"?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-
831this.margins.top];if(!/^(document|window|parent)$/.test(b.containment)){var c=a(b.containment)[0],b=a(b.containment).offset(),d=a(c).css("overflow")!="hidden";this.containment=[b.left+(parseInt(a(c).css("borderLeftWidth"),10)||0)+(parseInt(a(c).css("paddingLeft"),10)||0)-this.margins.left,b.top+(parseInt(a(c).css("borderTopWidth"),10)||0)+(parseInt(a(c).css("paddingTop"),10)||0)-this.margins.top,b.left+(d?Math.max(c.scrollWidth,c.offsetWidth):c.offsetWidth)-(parseInt(a(c).css("borderLeftWidth"),10)||
8320)-(parseInt(a(c).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,b.top+(d?Math.max(c.scrollHeight,c.offsetHeight):c.offsetHeight)-(parseInt(a(c).css("borderTopWidth"),10)||0)-(parseInt(a(c).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top]}},_convertPositionTo:function(b,c){c||(c=this.position);var d=b=="absolute"?1:-1,f=this.cssPosition!="absolute"||this.scrollParent[0]!=document&&a.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:
833this.offsetParent,e=/(html|body)/i.test(f[0].tagName);return{top:c.top+this.offset.relative.top*d+this.offset.parent.top*d-(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():e?0:f.scrollTop())*d,left:c.left+this.offset.relative.left*d+this.offset.parent.left*d-(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():e?0:f.scrollLeft())*d}},_generatePosition:function(b){var c=this.options,d=this.cssPosition!="absolute"||this.scrollParent[0]!=document&&a.contains(this.scrollParent[0],this.offsetParent[0])?
834this.scrollParent:this.offsetParent,f=/(html|body)/i.test(d[0].tagName);this.cssPosition=="relative"&&(this.scrollParent[0]==document||this.scrollParent[0]==this.offsetParent[0])&&(this.offset.relative=this._getRelativeOffset());var e=b.pageX,g=b.pageY;if(this.originalPosition){this.containment&&(b.pageX-this.offset.click.left<this.containment[0]&&(e=this.containment[0]+this.offset.click.left),b.pageY-this.offset.click.top<this.containment[1]&&(g=this.containment[1]+this.offset.click.top),b.pageX-
835this.offset.click.left>this.containment[2]&&(e=this.containment[2]+this.offset.click.left),b.pageY-this.offset.click.top>this.containment[3]&&(g=this.containment[3]+this.offset.click.top));if(c.grid){g=this.originalPageY+Math.round((g-this.originalPageY)/c.grid[1])*c.grid[1];g=this.containment?g-this.offset.click.top<this.containment[1]||g-this.offset.click.top>this.containment[3]?g-this.offset.click.top<this.containment[1]?g+c.grid[1]:g-c.grid[1]:g:g;e=this.originalPageX+Math.round((e-this.originalPageX)/
836c.grid[0])*c.grid[0];e=this.containment?e-this.offset.click.left<this.containment[0]||e-this.offset.click.left>this.containment[2]?e-this.offset.click.left<this.containment[0]?e+c.grid[0]:e-c.grid[0]:e:e}}return{top:g-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():f?0:d.scrollTop()),left:e-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():
837f?0:d.scrollLeft())}},_rearrange:function(a,c,d,f){d?d[0].appendChild(this.placeholder[0]):c.item[0].parentNode.insertBefore(this.placeholder[0],this.direction=="down"?c.item[0]:c.item[0].nextSibling);var e=this.counter=this.counter?++this.counter:1;this._delay(function(){e==this.counter&&this.refreshPositions(!f)})},_clear:function(b,c){this.reverting=false;var d=[];!this._noFinalSort&&this.currentItem.parent().length&&this.placeholder.before(this.currentItem);this._noFinalSort=null;if(this.helper[0]==
838this.currentItem[0]){for(var f in this._storedCSS)if(this._storedCSS[f]=="auto"||this._storedCSS[f]=="static")this._storedCSS[f]="";this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper")}else this.currentItem.show();this.fromOutside&&!c&&d.push(function(a){this._trigger("receive",a,this._uiHash(this.fromOutside))});(this.fromOutside||this.domPosition.prev!=this.currentItem.prev().not(".ui-sortable-helper")[0]||this.domPosition.parent!=this.currentItem.parent()[0])&&!c&&d.push(function(a){this._trigger("update",
839a,this._uiHash())});this!==this.currentContainer&&(c||(d.push(function(a){this._trigger("remove",a,this._uiHash())}),d.push(function(a){return function(b){a._trigger("receive",b,this._uiHash(this))}}.call(this,this.currentContainer)),d.push(function(a){return function(b){a._trigger("update",b,this._uiHash(this))}}.call(this,this.currentContainer))));for(f=this.containers.length-1;f>=0;f--){c||d.push(function(a){return function(b){a._trigger("deactivate",b,this._uiHash(this))}}.call(this,this.containers[f]));
840this.containers[f].containerCache.over&&(d.push(function(a){return function(b){a._trigger("out",b,this._uiHash(this))}}.call(this,this.containers[f])),this.containers[f].containerCache.over=0)}this._storedCursor&&a("body").css("cursor",this._storedCursor);this._storedOpacity&&this.helper.css("opacity",this._storedOpacity);this._storedZIndex&&this.helper.css("zIndex",this._storedZIndex=="auto"?"":this._storedZIndex);this.dragging=false;if(this.cancelHelperRemoval){if(!c){this._trigger("beforeStop",
841b,this._uiHash());for(f=0;f<d.length;f++)d[f].call(this,b);this._trigger("stop",b,this._uiHash())}return this.fromOutside=false,false}c||this._trigger("beforeStop",b,this._uiHash());this.placeholder[0].parentNode.removeChild(this.placeholder[0]);this.helper[0]!=this.currentItem[0]&&this.helper.remove();this.helper=null;if(!c){for(f=0;f<d.length;f++)d[f].call(this,b);this._trigger("stop",b,this._uiHash())}return this.fromOutside=false,true},_trigger:function(){a.Widget.prototype._trigger.apply(this,
842arguments)===false&&this.cancel()},_uiHash:function(b){var c=b||this;return{helper:c.helper,placeholder:c.placeholder||a([]),position:c.position,originalPosition:c.originalPosition,offset:c.positionAbs,item:c.currentItem,sender:b?b.element:null}}})})(jQuery);
843jQuery.effects||function(a,b){var c=a.uiBackCompat!==false;a.effects={effect:{}};(function(b,c){function e(a,b,c){var e=n[b.type]||{};return a==null?c||!b.def?null:b.def:(a=e.floor?~~a:parseFloat(a),isNaN(a)?b.def:e.mod?(a+e.mod)%e.mod:0>a?0:e.max<a?e.max:a)}
vendor: 4,206 bytes, lines 843-851
843function g(a){var c=k(),e=c._rgba=[];return a=a.toLowerCase(),s(j,function(b,d){var f,g=d.re.exec(a),g=g&&d.parse(g),h=d.space||"rgba";if(g)return f=c[h](g),c[l[h].cache]=f[l[h].cache],e=c._rgba=f._rgba,false}),e.length?(e.join()==="0,0,0,0"&&
844b.extend(e,q.transparent),c):q[a]}function h(a,b,c){return c=(c+1)%1,c*6<1?a+(b-a)*c*6:c*2<1?b:c*3<2?a+(b-a)*(2/3-c)*6:a}var i=/^([\-+])=\s*(\d+\.?\d*)/,j=[{re:/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d+(?:\.\d+)?)\s*)?\)/,parse:function(a){return[a[1],a[2],a[3],a[4]]}},{re:/rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d+(?:\.\d+)?)\s*)?\)/,parse:function(a){return[a[1]*2.55,a[2]*2.55,a[3]*2.55,a[4]]}},{re:/#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/,
845parse:function(a){return[parseInt(a[1],16),parseInt(a[2],16),parseInt(a[3],16)]}},{re:/#([a-f0-9])([a-f0-9])([a-f0-9])/,parse:function(a){return[parseInt(a[1]+a[1],16),parseInt(a[2]+a[2],16),parseInt(a[3]+a[3],16)]}},{re:/hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d+(?:\.\d+)?)\s*)?\)/,space:"hsla",parse:function(a){return[a[1],a[2]/100,a[3]/100,a[4]]}}],k=b.Color=function(a,c,e,f){return new b.Color.fn.parse(a,c,e,f)},l={rgba:{props:{red:{idx:0,type:"byte"},
846green:{idx:1,type:"byte"},blue:{idx:2,type:"byte"}}},hsla:{props:{hue:{idx:0,type:"degrees"},saturation:{idx:1,type:"percent"},lightness:{idx:2,type:"percent"}}}},n={"byte":{floor:true,max:255},percent:{max:1},degrees:{mod:360,floor:true}},p=k.support={},o=b("<p>")[0],q,s=b.each;o.style.cssText="background-color:rgba(1,1,1,.5)";p.rgba=o.style.backgroundColor.indexOf("rgba")>-1;s(l,function(a,b){b.cache="_"+a;b.props.alpha={idx:3,type:"percent",def:1}});k.fn=b.extend(k.prototype,{parse:function(h,
847i,j,o){if(h===c)return this._rgba=[null,null,null,null],this;if(h.jquery||h.nodeType){h=b(h).css(i);i=c}var n=this,p=b.type(h),A=this._rgba=[];i!==c&&(h=[h,i,j,o],p="array");if(p==="string")return this.parse(g(h)||q._default);if(p==="array")return s(l.rgba.props,function(a,b){A[b.idx]=e(h[b.idx],b)}),this;if(p==="object")return h instanceof k?s(l,function(a,b){h[b.cache]&&(n[b.cache]=h[b.cache].slice())}):s(l,function(b,c){var d=c.cache;s(c.props,function(a,b){if(!n[d]&&c.to){if(a==="alpha"||h[a]==
848null)return;n[d]=c.to(n._rgba)}n[d][b.idx]=e(h[a],b,true)});n[d]&&a.inArray(null,n[d].slice(0,3))<0&&(n[d][3]=1,c.from&&(n._rgba=c.from(n[d])))}),this},is:function(a){var b=k(a),c=true,e=this;return s(l,function(a,d){var f,g=b[d.cache];return g&&(f=e[d.cache]||d.to&&d.to(e._rgba)||[],s(d.props,function(a,b){if(g[b.idx]!=null)return c=g[b.idx]===f[b.idx],c})),c}),c},_space:function(){var a=[],b=this;return s(l,function(c,e){b[e.cache]&&a.push(c)}),a.pop()},transition:function(a,b){var c=k(a),d=c._space(),
849f=l[d],g=this.alpha()===0?k("transparent"):this,h=g[f.cache]||f.to(g._rgba),i=h.slice();return c=c[f.cache],s(f.props,function(a,d){var f=d.idx,g=h[f],j=c[f],k=n[d.type]||{};j!==null&&(g===null?i[f]=j:(k.mod&&(j-g>k.mod/2?g=g+k.mod:g-j>k.mod/2&&(g=g-k.mod)),i[f]=e((j-g)*b+g,d)))}),this[d](i)},blend:function(a){if(this._rgba[3]===1)return this;var c=this._rgba.slice(),e=c.pop(),f=k(a)._rgba;return k(b.map(c,function(a,b){return(1-e)*f[b]+e*a}))},toRgbaString:function(){var a="rgba(",c=b.map(this._rgba,
850function(a,b){return a==null?b>2?1:0:a});return c[3]===1&&(c.pop(),a="rgb("),a+c.join()+")"},toHslaString:function(){var a="hsla(",c=b.map(this.hsla(),function(a,b){return a==null&&(a=b>2?1:0),b&&b<3&&(a=Math.round(a*100)+"%"),a});return c[3]===1&&(c.pop(),a="hsl("),a+c.join()+")"},toHexString:function(a){var c=this._rgba.slice(),e=c.pop();return a&&c.push(~~(e*255)),"#"+b.map(c,function(a){return a=(a||0).toString(16),a.length===1?"0"+a:a}).join("")},toString:function(){return this._rgba[3]===0?
851"transparent":this.toRgbaString()}});k.fn.parse.prototype=k.fn;l.hsla.to=function(a){if(a[0]==null||a[1]==null||a[2]==null)return[null,null,null,a[3]];var b=a[0]/255,c=a[1]/255,e=a[2]/255,a=a[3],d=Math.max(b,c,e),f=Math.min(b,c,e),g=d-f,h=d+f,i=h*0.5,j,k;return f===d?j=0:b===d?j=60*(c-e)/g+360:c===d?j=60*(e-b)/g+120:j=60*(b-c)/g+240,i===0||i===1?k=i:i<=0.5?k=g/h:k=g/(2-h),[Math.round(j)%360,k,i,a==null?1:a]};
851l.hsla.from=function(a){if(a[0]==null||a[1]==null||a[2]==null)return[null,null,null,a[3]];
852var b=a[0]/360,c=a[1],e=a[2],a=a[3],c=e<=0.5?e*(1+c):e+c-e*c,e=2*e-c;return[Math.round(h(e,c,b+1/3)*255),Math.round(h(e,c,b)*255),Math.round(h(e,c,b-1/3)*255),a]};s(l,function(a,g){var h=g.props,j=g.cache,l=g.to,o=g.from;k.fn[a]=function(a){l&&!this[j]&&(this[j]=l(this._rgba));if(a===c)return this[j].slice();var g,i=b.type(a),n=i==="array"||i==="object"?a:arguments,q=this[j].slice();return s(h,function(a,b){var c=n[i==="object"?a:b.idx];c==null&&(c=q[b.idx]);q[b.idx]=e(c,b)}),o?(g=k(o(q)),g[j]=q,
853g):k(q)};s(h,function(c,e){k.fn[c]||(k.fn[c]=function(f){var g=b.type(f),h=c==="alpha"?this._hsla?"hsla":"rgba":a,j=this[h](),k=j[e.idx],l;return g==="undefined"?k:(g==="function"&&(f=f.call(this,k),g=b.type(f)),f==null&&e.empty?this:(g==="string"&&(l=i.exec(f),l&&(f=k+parseFloat(l[2])*(l[1]==="+"?1:-1))),j[e.idx]=f,this[h](j)))})})});s(["backgroundColor","borderBottomColor","borderLeftColor","borderRightColor","borderTopColor","color","columnRuleColor","outlineColor","textDecorationColor","textEmphasisColor"],
854function(a,c){b.cssHooks[c]={set:function(a,e){var f,h="";if(b.type(e)!=="string"||(f=g(e))){e=k(f||e);if(!p.rgba&&e._rgba[3]!==1){for(f=c==="backgroundColor"?a.parentNode:a;(h===""||h==="transparent")&&f&&f.style;)try{h=b.css(f,"backgroundColor");f=f.parentNode}catch(i){}e=e.blend(h&&h!=="transparent"?h:"_default")}e=e.toRgbaString()}try{a.style[c]=e}catch(j){}}};b.fx.step[c]=function(a){a.colorInit||(a.start=k(a.elem,c),a.end=k(a.end),a.colorInit=true);b.cssHooks[c].set(a.elem,a.start.transition(a.end,
855a.pos))}});b.cssHooks.borderColor={expand:function(a){var b={};return s(["Top","Right","Bottom","Left"],function(c,e){b["border"+e+"Color"]=a}),b}};q=b.Color.names={aqua:"#00ffff",black:"#000000",blue:"#0000ff",fuchsia:"#ff00ff",gray:"#808080",green:"#008000",lime:"#00ff00",maroon:"#800000",navy:"#000080",olive:"#808000",purple:"#800080",red:"#ff0000",silver:"#c0c0c0",teal:"#008080",white:"#ffffff",yellow:"#ffff00",transparent:[null,null,null,0],_default:"#ffffff"}})(jQuery);(function(){function c(){var b=
856this.ownerDocument.defaultView?this.ownerDocument.defaultView.getComputedStyle(this,null):this.currentStyle,e={},d,f;if(b&&b.length&&b[0]&&b[b[0]])for(f=b.length;f--;){d=b[f];typeof b[d]=="string"&&(e[a.camelCase(d)]=b[d])}else for(d in b)typeof b[d]=="string"&&(e[d]=b[d]);return e}var f=["add","remove","toggle"],e={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1};a.each(["borderLeftStyle","borderRightStyle","borderBottomStyle","borderTopStyle"],
857function(b,c){a.fx.step[c]=function(a){if(a.end!=="none"&&!a.setAttr||a.pos===1&&!a.setAttr){jQuery.style(a.elem,c,a.end);a.setAttr=true}}});a.effects.animateClass=function(b,h,i,j){var k=a.speed(h,i,j);return this.queue(function(){var h=a(this),i=h.attr("class")||"",j,o=k.children?h.find("*").andSelf():h,o=o.map(function(){return{el:a(this),start:c.call(this)}});j=function(){a.each(f,function(a,c){b[c]&&h[c+"Class"](b[c])})};j();o=o.map(function(){this.end=c.call(this.el[0]);var b=this.start,f=this.end,
858g={},h,i;for(h in f){i=f[h];b[h]!==i&&!e[h]&&(a.fx.step[h]||!isNaN(parseFloat(i)))&&(g[h]=i)}return this.diff=g,this});h.attr("class",i);o=o.map(function(){var b=this,c=a.Deferred();return this.el.animate(this.diff,jQuery.extend({},k,{queue:false,complete:function(){c.resolve(b)}})),c.promise()});a.when.apply(a,o.get()).done(function(){j();a.each(arguments,function(){var b=this.el;a.each(this.diff,function(a){b.css(a,"")})});k.complete.call(h[0])})})};a.fn.extend({_addClass:a.fn.addClass,addClass:function(b,
859c,e,d){return c?a.effects.animateClass.call(this,{add:b},c,e,d):this._addClass(b)},_removeClass:a.fn.removeClass,removeClass:function(b,c,e,d){return c?a.effects.animateClass.call(this,{remove:b},c,e,d):this._removeClass(b)},_toggleClass:a.fn.toggleClass,toggleClass:function(c,e,d,f,k){return typeof e=="boolean"||e===b?d?a.effects.animateClass.call(this,e?{add:c}:{remove:c},d,f,k):this._toggleClass(c,e):a.effects.animateClass.call(this,{toggle:c},e,d,f)},switchClass:function(b,c,e,d,f){return a.effects.animateClass.call(this,
860{add:c,remove:b},e,d,f)}})})();(function(){function d(b,c,d,f){a.isPlainObject(b)&&(c=b,b=b.effect);b={effect:b};c==null&&(c={});a.isFunction(c)&&(f=c,d=null,c={});if(typeof c=="number"||a.fx.speeds[c]){f=d;d=c;c={}}return a.isFunction(d)&&(f=d,d=null),c&&a.extend(b,c),d=d||c.duration,b.duration=a.fx.off?0:typeof d=="number"?d:d in a.fx.speeds?a.fx.speeds[d]:a.fx.speeds._default,b.complete=f||c.complete,b}function f(b){return!b||typeof b=="number"||a.fx.speeds[b]?true:typeof b=="string"&&!a.effects.effect[b]?
861c&&a.effects[b]?false:true:false}a.extend(a.effects,{version:"1.9.1",save:function(a,b){for(var c=0;c<b.length;c++)b[c]!==null&&a.data("ui-effects-"+b[c],a[0].style[b[c]])},restore:function(a,c){var d,f;for(f=0;f<c.length;f++)c[f]!==null&&(d=a.data("ui-effects-"+c[f]),d===b&&(d=""),a.css(c[f],d))},setMode:function(a,b){return b==="toggle"&&(b=a.is(":hidden")?"show":"hide"),b},getBaseline:function(a,b){var c,d;switch(a[0]){case "top":c=0;break;case "middle":c=0.5;break;case "bottom":c=1;break;default:c=
862a[0]/b.height}
vendor: 6,154 bytes, lines 862-874
862switch(a[1]){case "left":d=0;break;case "center":d=0.5;break;case "right":d=1;break;default:d=a[1]/b.width}return{x:d,y:c}},createWrapper:function(b){if(b.parent().is(".ui-effects-wrapper"))return b.parent();var c={width:b.outerWidth(true),height:b.outerHeight(true),"float":b.css("float")},d=a("<div></div>").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0}),f={width:b.width(),height:b.height()},j=document.activeElement;try{j.id}catch(k){j=
863document.body}return b.wrap(d),(b[0]===j||a.contains(b[0],j))&&a(j).focus(),d=b.parent(),b.css("position")==="static"?(d.css({position:"relative"}),b.css({position:"relative"})):(a.extend(c,{position:b.css("position"),zIndex:b.css("z-index")}),a.each(["top","left","bottom","right"],function(a,d){c[d]=b.css(d);isNaN(parseInt(c[d],10))&&(c[d]="auto")}),b.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"})),b.css(f),d.css(c).show()},removeWrapper:function(b){var c=document.activeElement;
864return b.parent().is(".ui-effects-wrapper")&&(b.parent().replaceWith(b),(b[0]===c||a.contains(b[0],c))&&a(c).focus()),b},setTransition:function(b,c,d,f){return f=f||{},a.each(c,function(a,c){var g=b.cssUnit(c);g[0]>0&&(f[c]=g[0]*d+g[1])}),f}});a.fn.extend({effect:function(){function b(c){function e(){a.isFunction(h)&&h.call(d[0]);a.isFunction(c)&&c()}var d=a(this),h=f.complete,i=f.mode;(d.is(":hidden")?i==="hide":i==="show")?e():j.call(d[0],f,e)}var f=d.apply(this,arguments),h=f.mode,i=f.queue,j=
865a.effects.effect[f.effect],k=!j&&c&&a.effects[f.effect];return a.fx.off||!j&&!k?h?this[h](f.duration,f.complete):this.each(function(){f.complete&&f.complete.call(this)}):j?i===false?this.each(b):this.queue(i||"fx",b):k.call(this,{options:f,duration:f.duration,callback:f.complete,mode:f.mode})},_show:a.fn.show,show:function(a){if(f(a))return this._show.apply(this,arguments);var b=d.apply(this,arguments);return b.mode="show",this.effect.call(this,b)},_hide:a.fn.hide,hide:function(a){if(f(a))return this._hide.apply(this,
866arguments);var b=d.apply(this,arguments);return b.mode="hide",this.effect.call(this,b)},__toggle:a.fn.toggle,toggle:function(b){if(f(b)||typeof b=="boolean"||a.isFunction(b))return this.__toggle.apply(this,arguments);var c=d.apply(this,arguments);return c.mode="toggle",this.effect.call(this,c)},cssUnit:function(b){var c=this.css(b),d=[];return a.each(["em","px","%","pt"],function(a,b){c.indexOf(b)>0&&(d=[parseFloat(c),b])}),d}})})();(function(){var b={};a.each(["Quad","Cubic","Quart","Quint","Expo"],
867function(a,c){b[c]=function(b){return Math.pow(b,a+2)}});a.extend(b,{Sine:function(a){return 1-Math.cos(a*Math.PI/2)},Circ:function(a){return 1-Math.sqrt(1-a*a)},Elastic:function(a){return a===0||a===1?a:-Math.pow(2,8*(a-1))*Math.sin(((a-1)*80-7.5)*Math.PI/15)},Back:function(a){return a*a*(3*a-2)},Bounce:function(a){for(var b,c=4;a<((b=Math.pow(2,--c))-1)/11;);return 1/Math.pow(4,3-c)-7.5625*Math.pow((b*3-2)/22-a,2)}});a.each(b,function(b,c){a.easing["easeIn"+b]=c;a.easing["easeOut"+b]=function(a){return 1-
868c(1-a)};a.easing["easeInOut"+b]=function(a){return a<0.5?c(a*2)/2:1-c(a*-2+2)/2}})})()}(jQuery);
869(function(a){var b=0,c={},d={};c.height=c.paddingTop=c.paddingBottom=c.borderTopWidth=c.borderBottomWidth="hide";d.height=d.paddingTop=d.paddingBottom=d.borderTopWidth=d.borderBottomWidth="show";a.widget("ui.accordion",{version:"1.9.1",options:{active:0,animate:{},collapsible:false,event:"click",header:"> li > :first-child,> :not(li):even",heightStyle:"auto",icons:{activeHeader:"ui-icon-triangle-1-s",header:"ui-icon-triangle-1-e"},activate:null,beforeActivate:null},_create:function(){var c=this.accordionId=
870"ui-accordion-"+(this.element.attr("id")||++b),e=this.options;this.prevShow=this.prevHide=a();this.element.addClass("ui-accordion ui-widget ui-helper-reset");this.headers=this.element.find(e.header).addClass("ui-accordion-header ui-helper-reset ui-state-default ui-corner-all");this._hoverable(this.headers);this._focusable(this.headers);this.headers.next().addClass("ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom").hide();!e.collapsible&&(e.active===false||e.active==null)&&
871(e.active=0);e.active<0&&(e.active=e.active+this.headers.length);this.active=this._findActive(e.active).addClass("ui-accordion-header-active ui-state-active").toggleClass("ui-corner-all ui-corner-top");this.active.next().addClass("ui-accordion-content-active").show();this._createIcons();this.refresh();this.element.attr("role","tablist");this.headers.attr("role","tab").each(function(b){var e=a(this),d=e.attr("id"),j=e.next(),k=j.attr("id");d||(d=c+"-header-"+b,e.attr("id",d));k||(k=c+"-panel-"+b,j.attr("id",
872k));e.attr("aria-controls",k);j.attr("aria-labelledby",d)}).next().attr("role","tabpanel");this.headers.not(this.active).attr({"aria-selected":"false",tabIndex:-1}).next().attr({"aria-expanded":"false","aria-hidden":"true"}).hide();this.active.length?this.active.attr({"aria-selected":"true",tabIndex:0}).next().attr({"aria-expanded":"true","aria-hidden":"false"}):this.headers.eq(0).attr("tabIndex",0);this._on(this.headers,{keydown:"_keydown"});this._on(this.headers.next(),{keydown:"_panelKeyDown"});
873this._setupEvents(e.event)},_getCreateEventData:function(){return{header:this.active,content:this.active.length?this.active.next():a()}},_createIcons:function(){var b=this.options.icons;b&&(a("<span>").addClass("ui-accordion-header-icon ui-icon "+b.header).prependTo(this.headers),this.active.children(".ui-accordion-header-icon").removeClass(b.header).addClass(b.activeHeader),this.headers.addClass("ui-accordion-icons"))},_destroyIcons:function(){this.headers.removeClass("ui-accordion-icons").children(".ui-accordion-header-icon").remove()},
874_destroy:function(){var a;this.element.removeClass("ui-accordion ui-widget ui-helper-reset").removeAttr("role");this.headers.removeClass("ui-accordion-header ui-accordion-header-active ui-helper-reset ui-state-default ui-corner-all ui-state-active ui-state-disabled ui-corner-top").removeAttr("role").removeAttr("aria-selected").removeAttr("aria-controls").removeAttr("tabIndex").each(function(){/^ui-accordion/.test(this.id
874)&&this.removeAttribute("id")});this._destroyIcons();a=this.headers.next().css("display",
875"").removeAttr("role").removeAttr("aria-expanded").removeAttr("aria-hidden").removeAttr("aria-labelledby").removeClass("ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content ui-accordion-content-active ui-state-disabled").each(function(){/^ui-accordion/.test(this.id)&&this.removeAttribute("id")});this.options.heightStyle!=="content"&&a.css("height","")},_setOption:function(a,b){if(a==="active")this._activate(b);else{a==="event"&&(this.options.event&&this._off(this.headers,this.options.event),
876this._setupEvents(b));this._super(a,b);a==="collapsible"&&!b&&this.options.active===false&&this._activate(0);a==="icons"&&(this._destroyIcons(),b&&this._createIcons());a==="disabled"&&this.headers.add(this.headers.next()).toggleClass("ui-state-disabled",!!b)}},_keydown:function(b){if(!b.altKey&&!b.ctrlKey){var c=a.ui.keyCode,d=this.headers.length,h=this.headers.index(b.target),i=false;switch(b.keyCode){case c.RIGHT:case c.DOWN:i=this.headers[(h+1)%d];break;case c.LEFT:case c.UP:i=this.headers[(h-
8771+d)%d];break;case c.SPACE:case c.ENTER:this._eventHandler(b);break;case c.HOME:i=this.headers[0];break;case c.END:i=this.headers[d-1]}i&&(a(b.target).attr("tabIndex",-1),a(i).attr("tabIndex",0),i.focus(),b.preventDefault())}},_panelKeyDown:function(b){b.keyCode===a.ui.keyCode.UP&&b.ctrlKey&&a(b.currentTarget).prev().focus()},refresh:function(){var b,c,d=this.options.heightStyle,h=this.element.parent();d==="fill"?(a.support.minHeight||(c=h.css("overflow"),h.css("overflow","hidden")),b=h.height(),
878this.element.siblings(":visible").each(function(){var c=a(this),e=c.css("position");e==="absolute"||e==="fixed"||(b=b-c.outerHeight(true))}),c&&h.css("overflow",c),this.headers.each(function(){b=b-a(this).outerHeight(true)}),this.headers.next().each(function(){a(this).height(Math.max(0,b-a(this).innerHeight()+a(this).height()))}).css("overflow","auto")):d==="auto"&&(b=0,this.headers.next().each(function(){b=Math.max(b,a(this).height("").height())}).height(b))},_activate:function(b){b=this._findActive(b)[0];
879if(b!==this.active[0]){b=b||this.active[0];this._eventHandler({target:b,currentTarget:b,preventDefault:a.noop})}},_findActive:function(b){return typeof b=="number"?this.headers.eq(b):a()},_setupEvents:function(b){var c={};if(b){a.each(b.split(" "),function(a,b){c[b]="_eventHandler"});this._on(this.headers,c)}},_eventHandler:function(b){var c=this.options,d=this.active,h=a(b.currentTarget),i=h[0]===d[0],j=i&&c.collapsible,k=j?a():h.next(),l=d.next(),k={oldHeader:d,oldPanel:l,newHeader:j?a():h,newPanel:k};
880b.preventDefault();if(!(i&&!c.collapsible||this._trigger("beforeActivate",b,k)===false)){c.active=j?false:this.headers.index(h);this.active=i?a():h;this._toggle(k);d.removeClass("ui-accordion-header-active ui-state-active");c.icons&&d.children(".ui-accordion-header-icon").removeClass(c.icons.activeHeader).addClass(c.icons.header);i||(h.removeClass("ui-corner-all").addClass("ui-accordion-header-active ui-state-active ui-corner-top"),c.icons&&h.children(".ui-accordion-header-icon").removeClass(c.icons.header).addClass(c.icons.activeHeader),
881h.next().addClass("ui-accordion-content-active"))}},_toggle:function(b){var c=b.newPanel,d=this.prevShow.length?this.prevShow:b.oldPanel;this.prevShow.add(this.prevHide).stop(true,true);this.prevShow=c;this.prevHide=d;this.options.animate?this._animate(c,d,b):(d.hide(),c.show(),this._toggleComplete(b));d.attr({"aria-expanded":"false","aria-hidden":"true"});d.prev().attr("aria-selected","false");c.length&&d.length?d.prev().attr("tabIndex",-1):c.length&&this.headers.filter(function(){return a(this).attr("tabIndex")===
8820}).attr("tabIndex",-1);c.attr({"aria-expanded":"true","aria-hidden":"false"}).prev().attr({"aria-selected":"true",tabIndex:0})},_animate:function(a,b,g){var h,i,j,k=this,l=0,n=this.options.animate||{},p=a.length&&(!b.length||a.index()<b.index())&&n.down||n,o=function(){k._toggleComplete(g)};typeof p=="number"&&(j=p);typeof p=="string"&&(i=p);i=i||p.easing||n.easing;j=j||p.duration||n.duration;if(!b.length)return a.animate(d,j,i,o);if(!a.length)return b.animate(c,j,i,o);h=a.show().outerHeight();b.animate(c,
883{duration:j,easing:i,step:function(a,b){b.now=Math.round(a)}});a.hide().animate(d,{duration:j,easing:i,complete:o,step:function(a,c){c.now=Math.round(a);c.prop!=="height"?l=l+c.now:k.options.heightStyle!=="content"&&(c.now=Math.round(h-b.outerHeight()-l),l=0)}})},_toggleComplete:function(a){var b=a.oldPanel;b.removeClass("ui-accordion-content-active").prev().removeClass("ui-corner-top").addClass("ui-corner-all");b.length&&(b.parent()[0].className=b.parent()[0].className);this._trigger("activate",
884null,a)}});
884a.uiBackCompat!==false&&(function(a,b){a.extend(b.options,{navigation:false,navigationFilter:function(){return this.href.toLowerCase()===location.href.toLowerCase()}});var c=b._create;b._create=function(){if(this.options.navigation){var b=this,e=this.element.find(this.options.header),d=e.next(),k=e.add(d).find("a").filter(this.options.navigationFilter)[0];k&&e.add(d).each(function(c){if(a.contains(this,k))return b.options.active=Math.floor(c/2),false})}c.call(this)}}(jQuery,jQuery.ui.accordion.prototype),
885function(a,b){a.extend(b.options,{heightStyle:null,autoHeight:true,clearStyle:false,fillSpace:false});var c=b._create,d=b._setOption;a.extend(b,{_create:function(){this.options.heightStyle=this.options.heightStyle||this._mergeHeightStyle();c.call(this)},_setOption:function(a){if(a==="autoHeight"||a==="clearStyle"||a==="fillSpace")this.options.heightStyle=this._mergeHeightStyle();d.apply(this,arguments)},_mergeHeightStyle:function(){var a=this.options;if(a.fillSpace)return"fill";if(a.clearStyle)return"content";
886if(a.autoHeight)return"auto"}})}(jQuery,jQuery.ui.accordion.prototype),function(a,b){a.extend(b.options.icons,{activeHeader:null,headerSelected:"ui-icon-triangle-1-s"});var c=b._createIcons;b._createIcons=function(){this.options.icons&&(this.options.icons.activeHeader=this.options.icons.activeHeader||this.options.icons.headerSelected);c.call(this)}}(jQuery,jQuery.ui.accordion.prototype),function(a,b){b.activate=b._activate;var c=b._findActive;b._findActive=function(a){return a===-1&&(a=false),a&&
887typeof a!="number"&&(a=this.headers.index(this.headers.filter(a)),a===-1&&(a=false)),c.call(this,a)}}(jQuery,jQuery.ui.accordion.prototype),jQuery.ui.accordion.prototype.resize=jQuery.ui.accordion.prototype.refresh,function(a,b){a.extend(b.options,{change:null,changestart:null});var c=b._trigger;b._trigger=function(a,b,e){var d=c.apply(this,arguments);return d?(a==="beforeActivate"?d=c.call(this,"changestart",b,{oldHeader:e.oldHeader,oldContent:e.oldPanel,newHeader:e.newHeader,newContent:e.newPanel}):
888a==="activate"&&(d=c.call(this,"change",b,{oldHeader:e.oldHeader,oldContent:e.oldPanel,newHeader:e.newHeader,newContent:e.newPanel})),d):false}}(jQuery,jQuery.ui.accordion.prototype),function(a,b){a.extend(b.options,{animate:null,animated:"slide"});var c=b._create;b._create=function(){var a=this.options;a.animate===null&&(a.animated?a.animated==="slide"?a.animate=300:a.animated==="bounceslide"?a.animate={duration:200,down:{easing:"easeOutBounce",duration:1E3}}:a.animate=a.animated:a.animate=false);
889c.call(this)}}(jQuery,jQuery.ui.accordion.prototype))})(jQuery);
890(function(a){var b=0;a.widget("ui.autocomplete",{version:"1.9.1",defaultElement:"<input>",options:{appendTo:"body",autoFocus:false,delay:300,minLength:1,position:{my:"left top",at:"left bottom",collision:"none"},source:null,change:null,close:null,focus:null,open:null,response:null,search:null,select:null},pending:0,_create:function(){var b,d,f;this.isMultiLine=this._isMultiLine();this.valueMethod=this.element[this.element.is("input,textarea")?"val":"text"];this.isNewMenu=true;this.element.addClass("ui-autocomplete-input").attr("autocomplete",
891"off");this._on(this.element,{keydown:function(e){if(this.element.prop("readOnly"))d=f=b=true;else{d=f=b=false;var g=a.ui.keyCode;switch(e.keyCode){case g.PAGE_UP:b=true;this._move("previousPage",e);break;case g.PAGE_DOWN:b=true;this._move("nextPage",e);break;case g.UP:b=true;this._keyEvent("previous",e);break;case g.DOWN:b=true;this._keyEvent("next",e);break;case g.ENTER:case g.NUMPAD_ENTER:this.menu.active&&(b=true,e.preventDefault(),this.menu.select(e));break;case g.TAB:this.menu.active&&this.menu.select(e);
892break;case g.ESCAPE:this.menu.element.is(":visible")&&(this._value(this.term),this.close(e),e.preventDefault());break;default:d=true;this._searchTimeout(e)}}},keypress:function(e){if(b){b=false;e.preventDefault()}else if(!d){var f=a.ui.keyCode;switch(e.keyCode){case f.PAGE_UP:this._move("previousPage",e);break;case f.PAGE_DOWN:this._move("nextPage",e);break;case f.UP:this._keyEvent("previous",e);break;case f.DOWN:this._keyEvent("next",e)}}}
892,input:function(a){if(f){f=false;a.preventDefault()}else this._searchTimeout(a)},
893focus:function(){this.selectedItem=null;this.previous=this._value()},blur:function(a){if(this.cancelBlur)delete this.cancelBlur;else{clearTimeout(this.searching);this.close(a);this._change(a)}}});this._initSource();this.menu=a("<ul>").addClass("ui-autocomplete").appendTo(this.document.find(this.options.appendTo||"body")[0]).menu({input:a(),role:null}).zIndex(this.element.zIndex()+1).hide().data("menu");this._on(this.menu.element,{mousedown:function(b){b.preventDefault();this.cancelBlur=true;this._delay(function(){delete this.cancelBlur});
894var c=this.menu.element[0];a(b.target).closest(".ui-menu-item").length||this._delay(function(){var b=this;this.document.one("mousedown",function(e){e.target!==b.element[0]&&e.target!==c&&!a.contains(c,e.target)&&b.close()})})},menufocus:function(b,c){if(this.isNewMenu){this.isNewMenu=false;if(b.originalEvent&&/^mouse/.test(b.originalEvent.type)){this.menu.blur();this.document.one("mousemove",function(){a(b.target).trigger(b.originalEvent)});return}}var d=c.item.data("ui-autocomplete-item")||c.item.data("item.autocomplete");
895false!==this._trigger("focus",b,{item:d})?b.originalEvent&&/^key/.test(b.originalEvent.type)&&this._value(d.value):this.liveRegion.text(d.value)},menuselect:function(a,b){var c=b.item.data("ui-autocomplete-item")||b.item.data("item.autocomplete"),d=this.previous;this.element[0]!==this.document[0].activeElement&&(this.element.focus(),this.previous=d,this._delay(function(){this.previous=d;this.selectedItem=c}));false!==this._trigger("select",a,{item:c})&&this._value(c.value);this.term=this._value();
896this.close(a);this.selectedItem=c}});this.liveRegion=a("<span>",{role:"status","aria-live":"polite"}).addClass("ui-helper-hidden-accessible").insertAfter(this.element);a.fn.bgiframe&&this.menu.element.bgiframe();this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_destroy:function(){clearTimeout(this.searching);this.element.removeClass("ui-autocomplete-input").removeAttr("autocomplete");this.menu.element.remove();this.liveRegion.remove()},_setOption:function(a,
897b){this._super(a,b);a==="source"&&this._initSource();a==="appendTo"&&this.menu.element.appendTo(this.document.find(b||"body")[0]);a==="disabled"&&b&&this.xhr&&this.xhr.abort()},_isMultiLine:function(){return this.element.is("textarea")?true:this.element.is("input")?false:this.element.prop("isContentEditable")},_initSource:function(){var b,d,f=this;a.isArray(this.options.source)?(b=this.options.source,this.source=function(e,d){d(a.ui.autocomplete.filter(b,e.term))}):typeof this.options.source=="string"?
898(d=this.options.source,this.source=function(b,c){f.xhr&&f.xhr.abort();f.xhr=a.ajax({url:d,data:b,dataType:"json",success:function(a){c(a)},error:function(){c([])}})}):this.source=this.options.source},_searchTimeout:function(a){clearTimeout(this.searching);this.searching=this._delay(function(){this.term!==this._value()&&(this.selectedItem=null,this.search(null,a))},this.options.delay)},search:function(a,b){a=a!=null?a:this._value();this.term=this._value();if(a.length<this.options.minLength)return this.close(b);
899if(this._trigger("search",b)!==false)return this._search(a)},_search:function(a){this.pending++;this.element.addClass("ui-autocomplete-loading");this.cancelSearch=false;this.source({term:a},this._response())},_response:function(){var a=this,d=++b;return function(f){d===b&&a.__response(f);a.pending--;a.pending||a.element.removeClass("ui-autocomplete-loading")}},__response:function(a){a&&(a=this._normalize(a));this._trigger("response",null,{content:a});!this.options.disabled&&a&&a.length&&!this.cancelSearch?
900(this._suggest(a),this._trigger("open")):this._close()},close:function(a){this.cancelSearch=true;this._close(a)},_close:function(a){this.menu.element.is(":visible")&&(this.menu.element.hide(),this.menu.blur(),this.isNewMenu=true,this._trigger("close",a))},_change:function(a){this.previous!==this._value()&&this._trigger("change",a,{item:this.selectedItem})},_normalize:function(b){return b.length&&b[0].label&&b[0].value?b:a.map(b,function(b){return typeof b=="string"?{label:b,value:b}:a.extend({label:b.label||
901b.value,value:b.value||b.label},b)})},_suggest:function(b){var d=this.menu.element.empty().zIndex(this.element.zIndex()+1);this._renderMenu(d,b);this.menu.refresh();d.show();this._resizeMenu();d.position(a.extend({of:this.element},this.options.position));this.options.autoFocus&&this.menu.next()},_resizeMenu:function(){var a=this.menu.element;a.outerWidth(Math.max(a.width("").outerWidth()+1,this.element.outerWidth()))},_renderMenu:function(b,d){var f=this;a.each(d,function(a,d){f._renderItemData(b,
902d)})},_renderItemData:function(a,b){return this._renderItem(a,b).data("ui-autocomplete-item",b)},_renderItem:function(b,d){return a("<li>").append(a("<a>").text(d.label)).appendTo(b)},_move:function(a,b){if(this.menu.element.is(":visible"))if(this.menu.isFirstItem()&&/^previous/.test(a)||this.menu.isLastItem()&&/^next/.test(a)){this._value(this.term);this.menu.blur()}else this.menu[a](b);else this.search(null,b)},widget:function(){return this.menu.element},_value:function(){return this.valueMethod.apply(this.element,
903arguments)},_keyEvent:function(a,b){if(!this.isMultiLine||this.menu.element.is(":visible")){this._move(a,b);b.preventDefault()}}});a.extend(a.ui.autocomplete,{escapeRegex:function(a){return a.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")},filter:function(b,d){var f=RegExp(a.ui.autocomplete.escapeRegex(d),"i");return a.grep(b,function(a){return f.test(a.label||a.value||a)})}});a.widget("ui.autocomplete",a.ui.autocomplete,{options:{messages:{noResults:"No search results.",results:function(a){return a+
904(a>1?" results are":" result is")+" available, use up and down arrow keys to navigate."}}},__response:function(a){var b;this._superApply(arguments);if(!this.options.disabled&&!this.cancelSearch){a&&a.length?b=this.options.messages.results(a.length):b=this.options.messages.noResults;this.liveRegion.text(b)}}})})(jQuery);
905(function(a){var b,c,d,f,e=function(){var b=a(this).find(":ui-button");setTimeout(function(){b.button("refresh")},1)},g=function(b){var c=b.name,e=b.form,d=a([]);return c&&(e?d=a(e).find("[name='"+c+"']"):d=a("[name='"+c+"']",b.ownerDocument).filter(function(){return!this.form})),d};a.widget("ui.button",{version:"1.9.1",defaultElement:"<button>",options:{disabled:null,text:true,label:null,icons:{primary:null,secondary:null}},_create:function(){this.element.closest("form").unbind("reset"+this.eventNamespace).bind("reset"+
906this.eventNamespace,e);typeof this.options.disabled!="boolean"?this.options.disabled=!!this.element.prop("disabled"):this.element.prop("disabled",this.options.disabled);this._determineButtonType();this.hasTitle=!!this.buttonElement.attr("title");var h=this,i=this.options,j=this.type==="checkbox"||this.type==="radio",k="ui-state-hover"+(j?"":" ui-state-active");i.label===null&&(i.label=this.type==="input"?this.buttonElement.val():this.buttonElement.html());this.buttonElement.addClass("ui-button ui-widget ui-state-default ui-corner-all").attr("role",
907"button").bind("mouseenter"+this.eventNamespace,function(){if(!i.disabled){a(this).addClass("ui-state-hover");this===b&&a(this).addClass("ui-state-active")}}).bind("mouseleave"+this.eventNamespace,function(){i.disabled||a(this).removeClass(k)}).bind("click"+this.eventNamespace,function(a){i.disabled&&(a.preventDefault(),a.stopImmediatePropagation())});this.element.bind("focus"+this.eventNamespace,function(){h.buttonElement.addClass("ui-state-focus")}).bind("blur"+this.eventNamespace,function(){h.buttonElement.removeClass("ui-state-focus")});
908j&&(this.element.bind("change"+this.eventNamespace,function(){f||h.refresh()}),this.buttonElement.bind("mousedown"+this.eventNamespace,function(a){if
908(!i.disabled){f=false;c=a.pageX;d=a.pageY}}).bind("mouseup"+this.eventNamespace,function(a){if(!i.disabled&&(c!==a.pageX||d!==a.pageY))f=true}));this.type==="checkbox"?this.buttonElement.bind("click"+this.eventNamespace,function(){if(i.disabled||f)return false;a(this).toggleClass("ui-state-active");h.buttonElement.attr("aria-pressed",h.element[0].checked)}):
909this.type==="radio"?this.buttonElement.bind("click"+this.eventNamespace,function(){if(i.disabled||f)return false;a(this).addClass("ui-state-active");h.buttonElement.attr("aria-pressed","true");var b=h.element[0];g(b).not(b).map(function(){return a(this).button("widget")[0]}).removeClass("ui-state-active").attr("aria-pressed","false")}):(this.buttonElement.bind("mousedown"+this.eventNamespace,function(){if(i.disabled)return false;a(this).addClass("ui-state-active");b=this;h.document.one("mouseup",
910function(){b=null})}).bind("mouseup"+this.eventNamespace,function(){if(i.disabled)return false;a(this).removeClass("ui-state-active")}).bind("keydown"+this.eventNamespace,function(b){if(i.disabled)return false;(b.keyCode===a.ui.keyCode.SPACE||b.keyCode===a.ui.keyCode.ENTER)&&a(this).addClass("ui-state-active")}).bind("keyup"+this.eventNamespace,function(){a(this).removeClass("ui-state-active")}),this.buttonElement.is("a")&&this.buttonElement.keyup(function(b){b.keyCode===a.ui.keyCode.SPACE&&a(this).click()}));
911this._setOption("disabled",i.disabled);this._resetButton()},_determineButtonType:function(){var a,b,c;this.element.is("[type=checkbox]")?this.type="checkbox":this.element.is("[type=radio]")?this.type="radio":this.element.is("input")?this.type="input":this.type="button";this.type==="checkbox"||this.type==="radio"?(a=this.element.parents().last(),b="label[for='"+this.element.attr("id")+"']",this.buttonElement=a.find(b),this.buttonElement.length||(a=a.length?a.siblings():this.element.siblings(),this.buttonElement=
912a.filter(b),this.buttonElement.length||(this.buttonElement=a.find(b))),this.element.addClass("ui-helper-hidden-accessible"),c=this.element.is(":checked"),c&&this.buttonElement.addClass("ui-state-active"),this.buttonElement.prop("aria-pressed",c)):this.buttonElement=this.element},widget:function(){return this.buttonElement},_destroy:function(){this.element.removeClass("ui-helper-hidden-accessible");this.buttonElement.removeClass("ui-button ui-widget ui-state-default ui-corner-all ui-state-hover ui-state-active  ui-button-icons-only ui-button-icon-only ui-button-text-icons ui-button-text-icon-primary ui-button-text-icon-secondary ui-button-text-only").removeAttr("role").removeAttr("aria-pressed").html(this.buttonElement.find(".ui-button-text").html());
913this.hasTitle||this.buttonElement.removeAttr("title")},_setOption:function(a,b){this._super(a,b);a==="disabled"?b?this.element.prop("disabled",true):this.element.prop("disabled",false):this._resetButton()},refresh:function(){var b=this.element.is(":disabled")||this.element.hasClass("ui-button-disabled");b!==this.options.disabled&&this._setOption("disabled",b);this.type==="radio"?g(this.element[0]).each(function(){a(this).is(":checked")?a(this).button("widget").addClass("ui-state-active").attr("aria-pressed",
914"true"):a(this).button("widget").removeClass("ui-state-active").attr("aria-pressed","false")}):this.type==="checkbox"&&(this.element.is(":checked")?this.buttonElement.addClass("ui-state-active").attr("aria-pressed","true"):this.buttonElement.removeClass("ui-state-active").attr("aria-pressed","false"))},_resetButton:function(){if(this.type==="input")this.options.label&&this.element.val(this.options.label);else{var b=this.buttonElement.removeClass("ui-button-icons-only ui-button-icon-only ui-button-text-icons ui-button-text-icon-primary ui-button-text-icon-secondary ui-button-text-only"),
915c=a("<span></span>",this.document[0]).addClass("ui-button-text").html(this.options.label).appendTo(b.empty()).text(),e=this.options.icons,d=e.primary&&e.secondary,f=[];e.primary||e.secondary?(this.options.text&&f.push("ui-button-text-icon"+(d?"s":e.primary?"-primary":"-secondary")),e.primary&&b.prepend("<span class='ui-button-icon-primary ui-icon "+e.primary+"'></span>"),e.secondary&&b.append("<span class='ui-button-icon-secondary ui-icon "+e.secondary+"'></span>"),this.options.text||(f.push(d?"ui-button-icons-only":
916"ui-button-icon-only"),this.hasTitle||b.attr("title",a.trim(c)))):f.push("ui-button-text-only");b.addClass(f.join(" "))}}});a.widget("ui.buttonset",{version:"1.9.1",options:{items:"button, input[type=button], input[type=submit], input[type=reset], input[type=checkbox], input[type=radio], a, :data(button)"},_create:function(){this.element.addClass("ui-buttonset")},_init:function(){this.refresh()},_setOption:function(a,b){a==="disabled"&&this.buttons.button("option",a,b);this._super(a,b)},refresh:function(){var b=
917this.element.css("direction")==="rtl";this.buttons=this.element.find(this.options.items).filter(":ui-button").button("refresh").end().not(":ui-button").button().end().map(function(){return a(this).button("widget")[0]}).removeClass("ui-corner-all ui-corner-left ui-corner-right").filter(":first").addClass(b?"ui-corner-right":"ui-corner-left").end().filter(":last").addClass(b?"ui-corner-left":"ui-corner-right").end().end()},_destroy:function(){this.element.removeClass("ui-buttonset");this.buttons.map(function(){return a(this).button("widget")[0]}).removeClass("ui-corner-left ui-corner-right").end().button("destroy")}})})(jQuery);
918(function(a,b){function c(){this.debug=false;this._curInst=null;this._keyEvent=false;this._disabledInputs=[];this._inDialog=this._datepickerShowing=false;this._mainDivId="ui-datepicker-div";this._inlineClass="ui-datepicker-inline";this._appendClass="ui-datepicker-append";this._triggerClass="ui-datepicker-trigger";this._dialogClass="ui-datepicker-dialog";this._disableClass="ui-datepicker-disabled";this._unselectableClass="ui-datepicker-unselectable";this._currentClass="ui-datepicker-current-day";this._dayOverClass=
919"ui-datepicker-days-cell-over";this.regional=[];this.regional[""]={closeText:"Done",prevText:"Prev",nextText:"Next",currentText:"Today",monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su",
920"Mo","Tu","We","Th","Fr","Sa"],weekHeader:"Wk",dateFormat:"mm/dd/yy",firstDay:0,isRTL:false,showMonthAfterYear:false,yearSuffix:""};this._defaults={showOn:"focus",showAnim:"fadeIn",showOptions:{},defaultDate:null,appendText:"",buttonText:"...",buttonImage:"",buttonImageOnly:false,hideIfNoPrevNext:false,navigationAsDateFormat:false,gotoCurrent:false,changeMonth:false,changeYear:false,yearRange:"c-10:c+10",showOtherMonths:false,selectOtherMonths:false,showWeek:false,calculateWeek:this.iso8601Week,shortYearCutoff:"+10",
921minDate:null,maxDate:null,duration:"fast",beforeShowDay:null,beforeShow:null,onSelect:null,onChangeMonthYear:null,onClose:null,numberOfMonths:1,showCurrentAtPos:0,stepMonths:1,stepBigMonths:12,altField:"",altFormat:"",constrainInput:true,showButtonPanel:false,autoSize:false,disabled:false};a.extend(this._defaults,this.regional[""]);this.dpDiv=d(a('<div id="'+this._mainDivId+'" class="ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all"></div>'))}function d(b){return b.delegate("button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a",
922"mouseout",function(){a(this).removeClass("ui-state-hover");this.className.indexOf("ui-datepicker-prev")!=-1&&a(this).removeClass("ui-datepicker-prev-hover");this.className.indexOf("ui-datepicker-next")!=-1&&a(this).removeClass("ui-datepicker-next-hover")}).delegate("button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a","mouseover",function(){a.datepicker._isDisabledDatepicker(g.inline?b.parent()[0]:g.input[0])||(a(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover"),
923a(this).addClass("ui-state-hover"),this.className.indexOf("ui-datepicker-prev")!=-1&&a(this).addClass("ui-datepicker-prev-hover"),this.className.indexOf("ui-datepicker-next")!=-1&&a(this).addClass("ui-datepicker-next-hover"))})}function f(c,e){a.extend(c,e);for(var d in e)if(e[d]==null||e[d]==b)c[d]=e[d];return c}a.extend(a.ui,{datepicker:{version:"1.9.1"}});var e=(new Date).getTime(),g;a.extend(c.prototype,{markerClassName:"hasDatepicker",maxRows:4,log:function(){this.debug&&console.log.apply("",
924arguments)},_widgetDatepicker:function(){return this.dpDiv},setDefaults:function(a){return f(this._defaults,a||{}),this},_attachDatepicker:function(b,c){var e=null,d;for(d in this._defaults){var f=b.getAttribute("date:"+d);if(f){e=e||{};try{e[d]=eval(f)}catch(g){e[d]=f}}}d=b.nodeName.toLowerCase();f=d=="div"||d=="span";b.id||(this.uuid=this.uuid+1,b.id="dp"+this.uuid);var p=this._newInst(a(b),f);p.settings=a.extend({},c||{},e||{});d=="input"?this._connectDatepicker(b,p):f&&this._inlineDatepicker(b,
925p)},_newInst:function(b,c){return{id:b[0].id.replace(/([^A-Za-z0-9_-])/g,"\\\\$1"),input:b,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:c,dpDiv:c?d(a('<div class="'+this._inlineClass+' ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all"></div>')):this.dpDiv}},_connectDatepicker:function(b,c){var e=a(b);c.append=a([]);c.trigger=a([]);if(!e.hasClass(this.markerClassName)){this._attachments(e,c);e.addClass(this.markerClassName).keydown(this._doKeyDown).keypress(this._doKeyPress).keyup(this._doKeyUp).bind("setData.datepicker",
926function(a,b,e){c.settings[b]=e}).bind("getData.datepicker",function(a,b){return this._get(c,b)});this._autoSize(c);a.data(b,"datepicker",c);c.settings.disabled&&this._disableDatepicker(b)}},_attachments:function(b,c){var e=this._get(c,"appendText"),d=this._get(c,"isRTL");c.append&&c.append.remove();e&&(c.append=a('<span class="'+this._appendClass+'">'+e+"</span>"),b[d?"before":"after"](c.append));b.unbind("focus",this._showDatepicker);c.trigger&&c.trigger.remove();e=this._get(c,"showOn");(e=="focus"||
927e=="both")&&b.focus(this._showDatepicker);
927if(e=="button"||e=="both"){var e=this._get(c,"buttonText"),f=this._get(c,"buttonImage");c.trigger=a(this._get(c,"buttonImageOnly")?a("<img/>").addClass(this._triggerClass).attr({src:f,alt:e,title:e}):a('<button type="button"></button>').addClass(this._triggerClass).html(f==""?e:a("<img/>").attr({src:f,alt:e,title:e})));b[d?"before":"after"](c.trigger);c.trigger.click(function(){return a.datepicker._datepickerShowing&&a.datepicker._lastInput==b[0]?a.datepicker._hideDatepicker():
928a.datepicker._datepickerShowing&&a.datepicker._lastInput!=b[0]?(a.datepicker._hideDatepicker(),a.datepicker._showDatepicker(b[0])):a.datepicker._showDatepicker(b[0]),false})}},_autoSize:function(a){if(this._get(a,"autoSize")&&!a.inline){var b=new Date(2009,11,20),c=this._get(a,"dateFormat");if(c.match(/[DM]/)){var e=function(a){for(var b=0,c=0,e=0;e<a.length;e++)a[e].length>b&&(b=a[e].length,c=e);return c};b.setMonth(e(this._get(a,c.match(/MM/)?"monthNames":"monthNamesShort")));b.setDate(e(this._get(a,
929c.match(/DD/)?"dayNames":"dayNamesShort"))+20-b.getDay())}a.input.attr("size",this._formatDate(a,b).length)}},_inlineDatepicker:function(b,c){var e=a(b);if(!e.hasClass(this.markerClassName)){e.addClass(this.markerClassName).append(c.dpDiv).bind("setData.datepicker",function(a,b,e){c.settings[b]=e}).bind("getData.datepicker",function(a,b){return this._get(c,b)});a.data(b,"datepicker",c);this._setDate(c,this._getDefaultDate(c),true);this._updateDatepicker(c);this._updateAlternate(c);c.settings.disabled&&
930this._disableDatepicker(b);c.dpDiv.css("display","block")}},_dialogDatepicker:function(b,c,e,d,g){b=this._dialogInst;if(!b){this.uuid=this.uuid+1;this._dialogInput=a('<input type="text" id="dp'+this.uuid+'" style="position: absolute; top: -100px; width: 0px;"/>');this._dialogInput.keydown(this._doKeyDown);a("body").append(this._dialogInput);b=this._dialogInst=this._newInst(this._dialogInput,false);b.settings={};a.data(this._dialogInput[0],"datepicker",b)}f(b.settings,d||{});c=c&&c.constructor==Date?
931this._formatDate(b,c):c;this._dialogInput.val(c);this._pos=g?g.length?g:[g.pageX,g.pageY]:null;if(!this._pos)this._pos=[document.documentElement.clientWidth/2-100+(document.documentElement.scrollLeft||document.body.scrollLeft),document.documentElement.clientHeight/2-150+(document.documentElement.scrollTop||document.body.scrollTop)];return this._dialogInput.css("left",this._pos[0]+20+"px").css("top",this._pos[1]+"px"),b.settings.onSelect=e,this._inDialog=true,this.dpDiv.addClass(this._dialogClass),
932this._showDatepicker(this._dialogInput[0]),a.blockUI&&a.blockUI(this.dpDiv),a.data(this._dialogInput[0],"datepicker",b),this},_destroyDatepicker:function(b){var c=a(b),e=a.data(b,"datepicker");if(c.hasClass(this.markerClassName)){var d=b.nodeName.toLowerCase();a.removeData(b,"datepicker");
932d=="input"?(e.append.remove(),e.trigger.remove(),c.removeClass(this.markerClassName).unbind("focus",this._showDatepicker).unbind("keydown",this._doKeyDown).unbind("keypress",this._doKeyPress).unbind("keyup",this._doKeyUp)):
933(d=="div"||d=="span")&&c.removeClass(this.markerClassName).empty()}},_enableDatepicker:function(b){var c=a(b),e=a.data(b,"datepicker");if(c.hasClass(this.markerClassName)){var d=b.nodeName.toLowerCase();if(d=="input"){b.disabled=false;e.trigger.filter("button").each(function(){this.disabled=false}).end().filter("img").css({opacity:"1.0",cursor:""})}else if(d=="div"||d=="span"){c=c.children("."+this._inlineClass);c.children().removeClass("ui-state-disabled");c.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",
934false)}this._disabledInputs=a.map(this._disabledInputs,function(a){return a==b?null:a})}},_disableDatepicker:function(b){var c=a(b),e=a.data(b,"datepicker");if(c.hasClass(this.markerClassName)){var d=b.nodeName.toLowerCase();if(d=="input"){b.disabled=true;e.trigger.filter("button").each(function(){this.disabled=true}).end().filter("img").css({opacity:"0.5",cursor:"default"})}else if(d=="div"||d=="span"){c=c.children("."+this._inlineClass);c.children().addClass("ui-state-disabled");c.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",
935true)}this._disabledInputs=a.map(this._disabledInputs,function(a){return a==b?null:a});this._disabledInputs[this._disabledInputs.length]=b}},_isDisabledDatepicker:function(a){if(!a)return false;for(var b=0;b<this._disabledInputs.length;b++)if(this._disabledInputs[b]==a)return true;return false},_getInst:function(b){try{return a.data(b,"datepicker")}catch(c){throw"Missing instance data for this datepicker";}},_optionDatepicker:function(c,e,d){var g=this._getInst(c);if(arguments.length==2&&typeof e==
936"string")return e=="defaults"?a.extend({},a.datepicker._defaults):g?e=="all"?a.extend({},g.settings):this._get(g,e):null;var l=e||{};typeof e=="string"&&(l={},l[e]=d);if(g){this._curInst==g&&this._hideDatepicker();var n=this._getDateDatepicker(c,true),p=this._getMinMaxDate(g,"min"),o=this._getMinMaxDate(g,"max");f(g.settings,l);p!==null&&l.dateFormat!==b&&l.minDate===b&&(g.settings.minDate=this._formatDate(g,p));o!==null&&l.dateFormat!==b&&l.maxDate===b&&(g.settings.maxDate=this._formatDate(g,o));
937this._attachments(a(c),g);this._autoSize(g);this._setDate(g,n);this._updateAlternate(g);this._updateDatepicker(g)}},_changeDatepicker:function(a,b,c){this._optionDatepicker(a,b,c)},_refreshDatepicker:function(a){(a=this._getInst(a))&&this._updateDatepicker(a)},_setDateDatepicker:function(a,b){var c=this._getInst(a);c&&(this._setDate(c,b),this._updateDatepicker(c),this._updateAlternate(c))},_getDateDatepicker:function(a,b){var c=this._getInst(a);return c&&!c.inline&&this._setDateFromField(c,b),c?this._getDate(c):
938null},_doKeyDown:function(b){var c=a.datepicker._getInst(b.target),e=true,d=c.dpDiv.is(".ui-datepicker-rtl");c._keyEvent=true;if(a.datepicker._datepickerShowing)switch(b.keyCode){case 9:a.datepicker._hideDatepicker();e=false;break;case 13:e=a("td."+a.datepicker._dayOverClass+":not(."+a.datepicker._currentClass+")",c.dpDiv);e[0]&&a.datepicker._selectDay(b.target,c.selectedMonth,c.selectedYear,e[0]);if(b=a.datepicker._get(c,"onSelect")){e=a.datepicker._formatDate(c);b.apply(c.input?c.input[0]:null,
939[e,c])}else a.datepicker._hideDatepicker();return false;case 27:a.datepicker._hideDatepicker();break;case 33:a.datepicker._adjustDate(b.target,b.ctrlKey?-a.datepicker._get(c,"stepBigMonths"):-a.datepicker._get(c,"stepMonths"),"M");break;case 34:a.datepicker._adjustDate(b.target,b.ctrlKey?+a.datepicker._get(c,"stepBigMonths"):+a.datepicker._get(c,"stepMonths"),"M");break;case 35:(b.ctrlKey||b.metaKey)&&a.datepicker._clearDate(b.target);e=b.ctrlKey||b.metaKey;break;case 36:(b.ctrlKey||b.metaKey)&&a.datepicker._gotoToday(b.target);
940e=b.ctrlKey||b.metaKey;break;case 37:(b.ctrlKey||b.metaKey)&&a.datepicker._adjustDate(b.target,d?1:-1,"D");e=b.ctrlKey||b.metaKey;b.originalEvent.altKey&&a.datepicker._adjustDate(b.target,b.ctrlKey?-a.datepicker._get(c,"stepBigMonths"):-a.datepicker._get(c,"stepMonths"),"M");break;case 38:(b.ctrlKey||b.metaKey)&&a.datepicker._adjustDate(b.target,-7,"D");e=b.ctrlKey||b.metaKey;break;case 39:(b.ctrlKey||b.metaKey)&&a.datepicker._adjustDate(b.target,d?-1:1,"D");e=b.ctrlKey||b.metaKey;b.originalEvent.altKey&&
941a.datepicker._adjustDate(b.target,b.ctrlKey?+a.datepicker._get(c,"stepBigMonths"):+a.datepicker._get(c,"stepMonths"),"M");break;case 40:(b.ctrlKey||b.metaKey)&&a.datepicker._adjustDate(b.target,7,"D");e=b.ctrlKey||b.metaKey;break;default:e=false}else b.keyCode==36&&b.ctrlKey?a.datepicker._showDatepicker(this):e=false;e&&(b.preventDefault(),b.stopPropagation())},_doKeyPress:function(c){var e=a.datepicker._getInst(c.target);if(a.datepicker._get(e,"constrainInput")){var e=a.datepicker._possibleChars(a.datepicker._get(e,
942"dateFormat")),d=String.fromCharCode(c.charCode==b?c.keyCode:c.charCode);return c.ctrlKey||c.metaKey||d<" "||!e||e.indexOf(d)>-1}},_doKeyUp:function(b){b=a.datepicker._getInst(b.target);if(b.input.val()!=b.lastVal)try{a.datepicker.parseDate(a.datepicker._get(b,"dateFormat"),b.input?b.input.val():null,a.datepicker._getFormatConfig(b))&&(a.datepicker._setDateFromField(b),a.datepicker._updateAlternate(b),a.datepicker._updateDatepicker(b))}catch(c){a.datepicker.log(c)}return true},_showDatepicker:function(b){b=
943b.target||b;b.nodeName.toLowerCase()!="input"&&(b=a("input",b.parentNode)[0]);if(!(a.datepicker._isDisabledDatepicker(b)||a.datepicker._lastInput==b)){var c=a.datepicker._getInst(b);a.datepicker._curInst&&a.datepicker._curInst!=c&&(a.datepicker._curInst.dpDiv.stop(true,true),c&&a.datepicker._datepickerShowing&&a.datepicker._hideDatepicker(a.datepicker._curInst.input[0]));
943var e=a.datepicker._get(c,"beforeShow"),e=e?e.apply(b,[b,c]):{};if(e!==false){f(c.settings,e);c.lastVal=null;a.datepicker._lastInput=
944b;a.datepicker._setDateFromField(c);a.datepicker._inDialog&&(b.value="");a.datepicker._pos||(a.datepicker._pos=a.datepicker._findPos(b),a.datepicker._pos[1]=a.datepicker._pos[1]+b.offsetHeight);var d=false;a(b).parents().each(function(){return d=d|a(this).css("position")=="fixed",!d});e={left:a.datepicker._pos[0],top:a.datepicker._pos[1]};a.datepicker._pos=null;c.dpDiv.empty();c.dpDiv.css({position:"absolute",display:"block",top:"-1000px"});a.datepicker._updateDatepicker(c);e=a.datepicker._checkOffset(c,
945e,d);c.dpDiv.css({position:a.datepicker._inDialog&&a.blockUI?"static":d?"fixed":"absolute",display:"none",left:e.left+"px",top:e.top+"px"});if(!c.inline){var e=a.datepicker._get(c,"showAnim"),g=a.datepicker._get(c,"duration"),n=function(){var b=c.dpDiv.find("iframe.ui-datepicker-cover");if(b.length){var e=a.datepicker._getBorders(c.dpDiv);b.css({left:-e[0],top:-e[1],width:c.dpDiv.outerWidth(),height:c.dpDiv.outerHeight()})}};c.dpDiv.zIndex(a(b).zIndex()+1);a.datepicker._datepickerShowing=true;a.effects&&
946(a.effects.effect[e]||a.effects[e])?c.dpDiv.show(e,a.datepicker._get(c,"showOptions"),g,n):c.dpDiv[e||"show"](e?g:null,n);(!e||!g)&&n();c.input.is(":visible")&&!c.input.is(":disabled")&&c.input.focus();a.datepicker._curInst=c}}}},_updateDatepicker:function(b){this.maxRows=4;var c=a.datepicker._getBorders(b.dpDiv);g=b;b.dpDiv.empty().append(this._generateHTML(b));this._attachHandlers(b);var e=b.dpDiv.find("iframe.ui-datepicker-cover");!e.length||e.css({left:-c[0],top:-c[1],width:b.dpDiv.outerWidth(),
947height:b.dpDiv.outerHeight()});
947b.dpDiv.find("."+this._dayOverClass+" a").mouseover();c=this._getNumberOfMonths(b);e=c[1];b.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width("");e>1&&b.dpDiv.addClass("ui-datepicker-multi-"+e).css("width",17*e+"em");b.dpDiv[(c[0]!=1||c[1]!=1?"add":"remove")+"Class"]("ui-datepicker-multi");b.dpDiv[(this._get(b,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl");b==a.datepicker._curInst&&a.datepicker._datepickerShowing&&b.input&&
948b.input.is(":visible")&&!b.input.is(":disabled")&&b.input[0]!=document.activeElement&&b.input.focus();if(b.yearshtml){var d=b.yearshtml;setTimeout(function(){d===b.yearshtml&&b.yearshtml&&b.dpDiv.find("select.ui-datepicker-year:first").replaceWith(b.yearshtml);d=b.yearshtml=null},0)}},_getBorders:function(a){var b=function(a){return{thin:1,medium:2,thick:3}[a]||a};return[parseFloat(b(a.css("border-left-width"))),parseFloat(b(a.css("border-top-width")))]},_checkOffset:function(b,c,e){var d=b.dpDiv.outerWidth(),
949f=b.dpDiv.outerHeight(),g=b.input?b.input.outerWidth():0,p=b.input?b.input.outerHeight():0,o=document.documentElement.clientWidth+(e?0:a(document).scrollLeft()),q=document.documentElement.clientHeight+(e?0:a(document).scrollTop());return c.left=c.left-(this._get(b,"isRTL")?d-g:0),c.left=c.left-(e&&c.left==b.input.offset().left?a(document).scrollLeft():0),c.top=c.top-(e&&c.top==b.input.offset().top+p?a(document).scrollTop():0),c.left=c.left-Math.min(c.left,c.left+d>o&&o>d?Math.abs(c.left+d-o):0),c.top=
950c.top-Math.min(c.top,c.top+f>q&&q>f?Math.abs(f+p):0),c},_findPos:function(b){for(var c=this._get(this._getInst(b),"isRTL");b&&(b.type=="hidden"||b.nodeType!=1||a.expr.filters.hidden(b));)b=b[c?"previousSibling":"nextSibling"];b=a(b).offset();return[b.left,b.top]},_hideDatepicker:function(b){var c=this._curInst;if(c&&!(b&&c!=a.data(b,"datepicker"))&&this._datepickerShowing){var b=this._get(c,"showAnim"),e=this._get(c,"duration"),d=function(){a.datepicker._tidyDialog(c)};a.effects&&(a.effects.effect[b]||
951a.effects[b])?c.dpDiv.hide(b,a.datepicker._get(c,"showOptions"),e,d):c.dpDiv[b=="slideDown"?"slideUp":b=="fadeIn"?"fadeOut":"hide"](b?e:null,d);b||d();this._datepickerShowing=false;(b=this._get(c,"onClose"))&&b.apply(c.input?c.input[0]:null,[c.input?c.input.val():"",c]);this._lastInput=null;this._inDialog&&(this._dialogInput.css({position:"absolute",left:"0",top:"-100px"}),a.blockUI&&(a.unblockUI(),a("body").append(this.dpDiv)));this._inDialog=false}},_tidyDialog:function(a){a.dpDiv.removeClass(this._dialogClass).unbind(".ui-datepicker-calendar")},
952_checkExternalClick:function(b){if(a.datepicker._curInst){var b=a(b.target),c=a.datepicker._getInst(b[0]);(b[0].id!=a.datepicker._mainDivId&&b.parents("#"+a.datepicker._mainDivId).length==0&&!b.hasClass(a.datepicker.markerClassName)&&!b.closest("."+a.datepicker._triggerClass).length&&a.datepicker._datepickerShowing&&(!a.datepicker._inDialog||!a.blockUI)||b.hasClass(a.datepicker.markerClassName)&&a.datepicker._curInst!=c)&&a.datepicker._hideDatepicker()}},_adjustDate:function(b,c,e){var b=a(b),d=this._getInst(b[0]);
953if(!this._isDisabledDatepicker(b[0])){this._adjustInstDate(d,c+(e=="M"?this._get(d,"showCurrentAtPos"):0),e);this._updateDatepicker(d)}},_gotoToday:function(b){var b=a(b),c=this._getInst(b[0]);if(this._get(c,"gotoCurrent")&&c.currentDay){c.selectedDay=c.currentDay;c.drawMonth=c.selectedMonth=c.currentMonth;c.drawYear=c.selectedYear=c.currentYear}else{var e=new Date;c.selectedDay=e.getDate();c.drawMonth=c.selectedMonth=e.getMonth();c.drawYear=c.selectedYear=e.getFullYear()}this._notifyChange(c);this._adjustDate(b)},
954_selectMonthYear:function(b,c,e){var b=a(b),d=this._getInst(b[0]);d["selected"+(e=="M"?"Month":"Year")]=d["draw"+(e=="M"?"Month":"Year")]=parseInt(c.options[c.selectedIndex].value,10);this._notifyChange(d);this._adjustDate(b)},_selectDay:function(b,c,e,d){var f=a(b);if(!a(d).hasClass(this._unselectableClass)&&!this._isDisabledDatepicker(f[0])){f=this._getInst(f[0]);f.selectedDay=f.currentDay=a("a",d).html();f.selectedMonth=f.currentMonth=c;f.selectedYear=f.currentYear=e;this._selectDate(b,this._formatDate(f,
955f.currentDay,f.currentMonth,f.currentYear))}},_clearDate:function(b){b=a(b);this._getInst(b[0]);this._selectDate(b,"")},_selectDate:function(b,c){var e=this._getInst(a(b)[0]),c=c!=null?c:this._formatDate(e);e.input&&e.input.val(c);this._updateAlternate(e);var d=this._get(e,"onSelect");d?d.apply(e.input?e.input[0]:null,[c,e]):e.input&&e.input.trigger("change");e.inline?this._updateDatepicker(e):(this._hideDatepicker(),this._lastInput=e.input[0],typeof e.input[0]!="object"&&e.input.focus(),this._lastInput=
956null)},_updateAlternate:function(b){var c=this._get(b,"altField");if(c){var e=this._get(b,"altFormat")||this._get(b,"dateFormat"),d=this._getDate(b),f=this.formatDate(e,d,this._getFormatConfig(b));a(c).each(function(){a(this).val(f)})}}
956,noWeekends:function(a){a=a.getDay();return[a>0&&a<6,""]},iso8601Week:function(a){a=new Date(a.getTime());a.setDate(a.getDate()+4-(a.getDay()||7));var b=a.getTime();return a.setMonth(0),a.setDate(1),Math.floor(Math.round((b-a)/864E5)/7)+1},parseDate:function(b,c,e){if(b==
957null||c==null)throw"Invalid arguments";c=typeof c=="object"?c.toString():c+"";if(c=="")return null;for(var d=(e?e.shortYearCutoff:null)||this._defaults.shortYearCutoff,d=typeof d!="string"?d:(new Date).getFullYear()%100+parseInt(d,10),f=(e?e.dayNamesShort:null)||this._defaults.dayNamesShort,g=(e?e.dayNames:null)||this._defaults.dayNames,p=(e?e.monthNamesShort:null)||this._defaults.monthNamesShort,o=(e?e.monthNames:null)||this._defaults.monthNames,q=e=-1,s=-1,r=-1,t=false,v=function(a){a=D+1<b.length&&
958b.charAt(D+1)==a;return a&&D++,a},u=function(a){var b=v(a),a=RegExp("^\\d{1,"+(a=="@"?14:a=="!"?20:a=="y"&&b?4:a=="o"?3:2)+"}"),a=c.substring(A).match(a);if(!a)throw"Missing number at position "+A;return A=A+a[0].length,parseInt(a[0],10)},w=function(b,e,d){var b=a.map(v(b)?d:e,function(a,b){return[[b,a]]}).sort(function(a,b){return-(a[1].length-b[1].length)}),f=-1;a.each(b,function(a,b){var e=b[1];if(c.substr(A,e.length).toLowerCase()==e.toLowerCase())return f=b[0],A=A+e.length,false});if(f!=-1)return f+
9591;throw"Unknown name at position "+A;},z=function(){if(c.charAt(A)!=b.charAt(D))throw"Unexpected literal at position "+A;A++},A=0,D=0;D<b.length;D++)if(t)b.charAt(D)=="'"&&!v("'")?t=false:z();else switch(b.charAt(D)){case "d":s=u("d");break;case "D":w("D",f,g);break;case "o":r=u("o");break;case "m":q=u("m");break;case "M":q=w("M",p,o);break;case "y":e=u("y");break;case "@":var C=new Date(u("@")),e=C.getFullYear(),q=C.getMonth()+1,s=C.getDate();break;case "!":C=new Date((u("!")-this._ticksTo1970)/
9601E4);e=C.getFullYear();q=C.getMonth()+1;s=C.getDate();break;
960case "'":v("'")?z():t=true;break;default:z()}if(A<c.length){f=c.substr(A);if(!/^\s+/.test(f))throw"Extra/unparsed characters found in date: "+f;}e==-1?e=(new Date).getFullYear():e<100&&(e=e+((new Date).getFullYear()-(new Date).getFullYear()%100+(e<=d?0:-100)));if(r>-1){q=1;s=r;do{d=this._getDaysInMonth(e,q-1);if(s<=d)break;q++;s=s-d}while(1)}C=this._daylightSavingAdjust(new Date(e,q-1,s));if(C.getFullYear()!=e||C.getMonth()+1!=q||C.getDate()!=
961s)throw"Invalid date";return C},ATOM:"yy-mm-dd",COOKIE:"D, dd M yy",ISO_8601:"yy-mm-dd",RFC_822:"D, d M y",RFC_850:"DD, dd-M-y",RFC_1036:"D, d M y",RFC_1123:"D, d M yy",RFC_2822:"D, d M yy",RSS:"D, d M y",TICKS:"!",TIMESTAMP:"@",W3C:"yy-mm-dd",_ticksTo1970:(718685+Math.floor(492.5)-Math.floor(19.7)+Math.floor(4.925))*864E9,formatDate:function(a,b,c){if(!b)return"";var e=(c?c.dayNamesShort:null)||this._defaults.dayNamesShort,d=(c?c.dayNames:null)||this._defaults.dayNames,f=(c?c.monthNamesShort:null)||
962this._defaults.monthNamesShort,c=(c?c.monthNames:null)||this._defaults.monthNames,g=function(b){b=t+1<a.length&&a.charAt(t+1)==b;return b&&t++,b},o=function(a,b,c){b=""+b;if(g(a))for(;b.length<c;)b="0"+b;return b},q=function(a,b,c,e){return g(a)?e[b]:c[b]},s="",r=false;if(b)for(var t=0;t<a.length;t++)if(r)a.charAt(t)=="'"&&!g("'")?r=false:s=s+a.charAt(t);else switch(a.charAt(t)){case "d":s=s+o("d",b.getDate(),2);break;case "D":s=s+q("D",b.getDay(),e,d);break;case "o":s=s+o("o",Math.round(((new Date(b.getFullYear(),
963b.getMonth(),b.getDate())).getTime()-(new Date(b.getFullYear(),0,0)).getTime())/864E5),3);break;case "m":s=s+o("m",b.getMonth()+1,2);break;case "M":s=s+q("M",b.getMonth(),f,c);break;case "y":s=s+(g("y")?b.getFullYear():(b.getYear()%100<10?"0":"")+b.getYear()%100);break;case "@":s=s+b.getTime();break;case "!":s=s+(b.getTime()*1E4+this._ticksTo1970);break;
963case "'":g("'")?s=s+"'":r=true;break;default:s=s+a.charAt(t)}return s},_possibleChars:function(a){for(var b="",c=false,e=function(b){b=d+1<a.length&&
964a.charAt(d+1)==b;return b&&d++,b},d=0;d<a.length;d++)if(c)a.charAt(d)=="'"&&!e("'")?c=false:b=b+a.charAt(d);else switch(a.charAt(d)){case "d":case "m":case "y":case "@":b=b+"0123456789";break;case "D":case "M":return null;case "'":e("'")?b=b+"'":c=true;break;default:b=b+a.charAt(d)}return b},_get:function(a,c){return a.settings[c]!==b?a.settings[c]:this._defaults[c]},_setDateFromField:function(a,b){if(a.input.val()!=a.lastVal){var c=this._get(a,"dateFormat"),e=a.lastVal=a.input?a.input.val():null,
965d,f;d=f=this._getDefaultDate(a);var g=this._getFormatConfig(a);try{d=this.parseDate(c,e,g)||f}catch(o){this.log(o);e=b?"":e}a.selectedDay=d.getDate();a.drawMonth=a.selectedMonth=d.getMonth();a.drawYear=a.selectedYear=d.getFullYear();a.currentDay=e?d.getDate():0;a.currentMonth=e?d.getMonth():0;a.currentYear=e?d.getFullYear():0;this._adjustInstDate(a)}},_getDefaultDate:function(a){return this._restrictMinMax(a,this._determineDate(a,this._get(a,"defaultDate"),new Date))},_determineDate:function(b,c,
966e){var d=function(a){var b=new Date;return b.setDate(b.getDate()+a),b},f=function(c){try{return a.datepicker.parseDate(a.datepicker._get(b,"dateFormat"),c,a.datepicker._getFormatConfig(b))}catch(e){}for(var d=(c.toLowerCase().match(/^c/)?a.datepicker._getDate(b):null)||new Date,f=d.getFullYear(),g=d.getMonth(),d=d.getDate(),i=/([+-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g,j=i.exec(c);j;){switch(j[2]||"d"){case "d":case "D":d=d+parseInt(j[1],10);break;case "w":case "W":d=d+parseInt(j[1],10)*7;break;case "m":case "M":g=
967g+parseInt(j[1],10);d=Math.min(d,a.datepicker._getDaysInMonth(f,g));break;case "y":case "Y":f=f+parseInt(j[1],10);d=Math.min(d,a.datepicker._getDaysInMonth(f,g))}j=i.exec(c)}return new Date(f,g,d)},c=c==null||c===""?e:typeof c=="string"?f(c):typeof c=="number"?isNaN(c)?e:d(c):new Date(c.getTime());return c=c&&c.toString()=="Invalid Date"?e:c,c&&(c.setHours(0),c.setMinutes(0),c.setSeconds(0),c.setMilliseconds(0)),this._daylightSavingAdjust(c)},_daylightSavingAdjust:function(a){return a?(a.setHours(a.getHours()>
96812?a.getHours()+2:0),a):null},_setDate:function(a,b,c){var e=!b,d=a.selectedMonth,f=a.selectedYear,b=this._restrictMinMax(a,this._determineDate(a,b,new Date));a.selectedDay=a.currentDay=b.getDate();a.drawMonth=a.selectedMonth=a.currentMonth=b.getMonth();a.drawYear=a.selectedYear=a.currentYear=b.getFullYear();(d!=a.selectedMonth||f!=a.selectedYear)&&!c&&this._notifyChange(a);this._adjustInstDate(a);a.input&&a.input.val(e?"":this._formatDate(a))},_getDate:function(a){return!a.currentYear||a.input&&
969a.input.val()==""?null:this._daylightSavingAdjust(new Date(a.currentYear,a.currentMonth,a.currentDay))},_attachHandlers:function(b){var c=this._get(b,"stepMonths"),d="#"+b.id.replace(/\\\\/g,"\\");b.dpDiv.find("[data-handler]").map(function(){a(this).bind(this.getAttribute("data-event"),{prev:function(){window["DP_jQuery_"+e].datepicker._adjustDate(d,-c,"M")},next:function(){window["DP_jQuery_"+e].datepicker._adjustDate(d,+c,"M")},hide:function(){window["DP_jQuery_"+e].datepicker._hideDatepicker()},
970today:function(){window["DP_jQuery_"+e].datepicker._gotoToday(d)},selectDay:function(){return window["DP_jQuery_"+e].datepicker._selectDay(d,+this.getAttribute("data-month"),+this.getAttribute("data-year"),this),false},selectMonth:function(){return window["DP_jQuery_"+e].datepicker._selectMonthYear(d,this,"M"),false},selectYear:function(){return window["DP_jQuery_"+e].datepicker._selectMonthYear(d,this,"Y"),false}}[this.getAttribute("data-handler")])})},_generateHTML:function(b){var c=new Date,c=
971this._daylightSavingAdjust(new Date(c.getFullYear(),c.getMonth(),c.getDate())),e=this._get(b,"isRTL"),d=this._get(b,"showButtonPanel"),f=this._get(b,"hideIfNoPrevNext"),g=this._get(b,"navigationAsDateFormat"),p=this._getNumberOfMonths(b),o=this._get(b,"showCurrentAtPos"),q=this._get(b,"stepMonths"),s=p[0]!=1||p[1]!=1,r=this._daylightSavingAdjust(b.currentDay?new Date(b.currentYear,b.currentMonth,b.currentDay):new Date(9999,9,9)),t=this._getMinMaxDate(b,"min"),v=this._getMinMaxDate(b,"max"),o=b.drawMonth-
972o,u=b.drawYear;o<0&&(o=o+12,u--);if(v)for(var w=this._daylightSavingAdjust(new Date(v.getFullYear(),v.getMonth()-p[0]*p[1]+1,v.getDate())),w=t&&w<t?t:w;this._daylightSavingAdjust(new Date(u,o,1))>w;){o--;o<0&&(o=11,u--)}b.drawMonth=o;b.drawYear=u;var w=this._get(b,"prevText"),w=g?this.formatDate(w,this._daylightSavingAdjust(new Date(u,o-q,1)),this._getFormatConfig(b)):w,w=this._canAdjustMonth(b,-1,u,o)?'<a class="ui-datepicker-prev ui-corner-all" data-handler="prev" data-event="click" title="'+w+
973'"><span class="ui-icon ui-icon-circle-triangle-'+(e?"e":"w")+'">'+w+"</span></a>":f?"":'<a class="ui-datepicker-prev ui-corner-all ui-state-disabled" title="'+w+'"><span class="ui-icon ui-icon-circle-triangle-'+(e?"e":"w")+'">'+w+"</span></a>",z=this._get(b,"nextText"),z=g?this.formatDate(z,this._daylightSavingAdjust(new Date(u,o+q,1)),this._getFormatConfig(b)):z,f=this._canAdjustMonth(b,1,u,o)?'<a class="ui-datepicker-next ui-corner-all" data-handler="next" data-event="click" title="'+z+'"><span class="ui-icon ui-icon-circle-triangle-'+
974(e?"w":"e")+'">'+z+"</span></a>":f?"":'<a class="ui-datepicker-next ui-corner-all ui-state-disabled" title="'+z+'"><span class="ui-icon ui-icon-circle-triangle-'+(e?"w":"e")+'">'+z+"</span></a>",q=this._get(b,"currentText"),z=this._get(b,"gotoCurrent")&&b.currentDay?r:c,q=g?this.formatDate(q,z,this._getFormatConfig(b)):q,g=b.inline?"":'<button type="button" class="ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all" data-handler="hide" data-event="click">'+this._get(b,"closeText")+
975"</button>",d=d?'<div class="ui-datepicker-buttonpane ui-widget-content">'+(e?g:"")+(this._isInRange(b,z)?'<button type="button" class="ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all" data-handler="today" data-event="click">'+q+"</button>":"")+(e?"":g)+"</div>":"",g=parseInt(this._get(b,"firstDay"),10),g=isNaN(g)?0:g,q=this._get(b,"showWeek"),z=this._get(b,"dayNames");this._get(b,"dayNamesShort");var A=this._get(b,"dayNamesMin"),D=this._get(b,"monthNames"),C=this._get(b,
976"monthNamesShort"),I=this._get(b,"beforeShowDay"),S=this._get(b,"showOtherMonths"),da=this._get(b,"selectOtherMonths");this._get(b,"calculateWeek");for(var P=this._getDefaultDate(b),W="",N=0;N<p[0];N++){var B="";this.maxRows=4;for(var U=0;U<p[1];U++){var Y=this._daylightSavingAdjust(new Date(u,o,b.selectedDay)),E=" ui-corner-all",x="";if(s){x=x+'<div class="ui-datepicker-group';if(p[1]>1)switch(U){case 0:x=x+" ui-datepicker-group-first";E=" ui-corner-"+(e?"right":"left");break;case p[1]-1:x=x+" ui-datepicker-group-last";
977E=" ui-corner-"+(e?"left":"right");break;default:x=x+" ui-datepicker-group-middle";E=""}x=x+'">'}for(var x=x+('<div class="ui-datepicker-header ui-widget-header ui-helper-clearfix'+E+'">'+(/all|left/.test(E)&&N==0?e?f:w:"")+(/all|right/.test(E)&&N==0?e?w:f:"")+this._generateMonthYearHeader(b,o,u,t,v,N>0||U>0,D,C)+'</div><table class="ui-datepicker-calendar"><thead><tr>'),V=q?'<th class="ui-datepicker-week-col">'+this._get(b,"weekHeader")+"</th>":"",E=0;E<7;E++)var F=(E+g)%7,V=V+("<th"+((E+g+6)%7>=
9785?' class="ui-datepicker-week-end"':"")+'><span title="'+z[F]+'">'+A[F]+"</span></th>");x=x+(V+"</tr></thead><tbody>");V=this._getDaysInMonth(u,o);u==b.selectedYear&&o==b.selectedMonth&&(b.selectedDay=Math.min(b.selectedDay,V));E=(this._getFirstDayOfMonth(u,o)-g+7)%7;V=Math.ceil((E+V)/7);this.maxRows=V=s?this.maxRows>V?this.maxRows:V:V;for(var F=this._daylightSavingAdjust(new Date(u,o,1-E)),H=0;H<V;H++){for(var x=x+"<tr>",aa=q?'<td class="ui-datepicker-week-col">'+this._get(b,"calculateWeek")(F)+
979"</td>":"",E=0;E<7;E++){var ea=I?I.apply(b.input?b.input[0]:null,[F]):[true,""],ba=F.getMonth()!=o,fa=ba&&!da||!ea[0]||t&&F<t||v&&F>v,aa=aa+('<td class="'+((E+g+6)%7>=5?" ui-datepicker-week-end":"")+(ba?" ui-datepicker-other-month":"")+(F.getTime()==Y.getTime()&&o==b.selectedMonth&&b._keyEvent||P.getTime()==F.getTime()&&P.getTime()==Y.getTime()?" "+this._dayOverClass:"")+(fa?" "+this._unselectableClass+" ui-state-disabled":"")+(ba&&!S?"":" "+ea[1]+(F.getTime()==r.getTime()?" "+this._currentClass:
980"")+(F.getTime()==c.getTime()?" ui-datepicker-today":""))+'"'+((!ba||S)&&ea[2]?' title="'+ea[2]+'"':"")+(fa?"":' data-handler="selectDay" data-event="click" data-month="'+F.getMonth()+'" data-year="'+F.getFullYear()+'"')+">"+(ba&&!S?"&#xa0;":fa?'<span class="ui-state-default">'+F.getDate()+"</span>":'<a class="ui-state-default'+(F.getTime()==c.getTime()?" ui-state-highlight":"")+(F.getTime()==r.getTime()?" ui-state-active":"")+(ba?" ui-priority-secondary":"")+'" href="#">'+F.getDate()+"</a>")+"</td>");
981F.setDate(F.getDate()+1);F=this._daylightSavingAdjust(F)}x=x+(aa+"</tr>")}o++;o>11&&(o=0,u++);x=x+("</tbody></table>"+(s?"</div>"+(p[0]>0&&U==p[1]-1?'<div class="ui-datepicker-row-break"></div>':""):""));B=B+x}W=W+B}return W=W+(d+(a.ui.ie6&&!b.inline?'<iframe src="javascript:false;" class="ui-datepicker-cover" frameborder="0"></iframe>':"")),b._keyEvent=false,W},_generateMonthYearHeader:function(a,b,c,e,d,f,g,o){var q=this._get(a,"changeMonth"),s=this._get(a,"changeYear"),r=this._get(a,"showMonthAfterYear"),
982t='<div class="ui-datepicker-title">',v="";if(f||!q)v=v+('<span class="ui-datepicker-month">'+g[b]+"</span>");else{for(var g=e&&e.getFullYear()==c,u=d&&d.getFullYear()==c,v=v+'<select class="ui-datepicker-month" data-handler="selectMonth" data-event="change">',w=0;w<12;w++)(!g||w>=e.getMonth())&&(!u||w<=d.getMonth())&&(v=v+('<option value="'+w+'"'+(w==b?' selected="selected"':"")+">"+o[w]+"</option>"));v=v+"</select>"}r||(t=t+(v+(f||!q||!s?"&#xa0;":"")));if(!a.yearshtml){a.yearshtml="";if(f||!s)t=
983t+('<span class="ui-datepicker-year">'+c+"</span>");else{var o=this._get(a,"yearRange").split(":"),z=(new Date).getFullYear(),g=function(a){a=a.match(/c[+-].*/)?c+parseInt(a.substring(1),10):a.match(/[+-].*/)?z+parseInt(a,10):parseInt(a,10);return isNaN(a)?z:a},b=g(o[0]),o=Math.max(b,g(o[1]||"")),b=e?Math.max(b,e.getFullYear()):b,o=d?Math.min(o,d.getFullYear()):o;for(a.yearshtml=a.yearshtml+'<select class="ui-datepicker-year" data-handler="selectYear" data-event="change">';b<=o;b++)a.yearshtml=a.yearshtml+
984('<option value="'+b+'"'+(b==c?' selected="selected"':"")+">"+b+"</option>");a.yearshtml=a.yearshtml+"</select>";t=t+a.yearshtml;a.yearshtml=null}}return t=t+this._get(a,"yearSuffix"),r&&(t=t+((f||!q||!s?"&#xa0;":"")+v)),t=t+"</div>",t},_adjustInstDate:function(a,b,c){var e=a.drawYear+(c=="Y"?b:0),d=a.drawMonth+(c=="M"?b:0),b=Math.min(a.selectedDay,this._getDaysInMonth(e,d))+(c=="D"?b:0),e=this._restrictMinMax(a,this._daylightSavingAdjust(new Date(e,d,b)));a.selectedDay=e.getDate();a.drawMonth=a.selectedMonth=
985e.getMonth();a.drawYear=a.selectedYear=e.getFullYear();(c=="M"||c=="Y")&&this._notifyChange(a)},_restrictMinMax:function(a,b){var c=this._getMinMaxDate(a,"min"),e=this._getMinMaxDate(a,"max"),c=c&&b<c?c:b;return c=e&&c>e?e:c,c}
985,_notifyChange:function(a){var b=this._get(a,"onChangeMonthYear");b&&b.apply(a.input?a.input[0]:null,[a.selectedYear,a.selectedMonth+1,a])},_getNumberOfMonths:function(a){a=this._get(a,"numberOfMonths");return a==null?[1,1]:typeof a=="number"?[1,a]:a},_getMinMaxDate:function(a,
986b){return this._determineDate(a,this._get(a,b+"Date"),null)},_getDaysInMonth:function(a,b){return 32-this._daylightSavingAdjust(new Date(a,b,32)).getDate()},_getFirstDayOfMonth:function(a,b){return(new Date(a,b,1)).getDay()},_canAdjustMonth:function(a,b,c,e){var d=this._getNumberOfMonths(a),c=this._daylightSavingAdjust(new Date(c,e+(b<0?b:d[0]*d[1]),1));return b<0&&c.setDate(this._getDaysInMonth(c.getFullYear(),c.getMonth())),this._isInRange(a,c)},_isInRange:function(a,b){var c=this._getMinMaxDate(a,
987"min"),e=this._getMinMaxDate(a,"max");return(!c||b.getTime()>=c.getTime())&&(!e||b.getTime()<=e.getTime())},_getFormatConfig:function(a){var b=this._get(a,"shortYearCutoff");return b=typeof b!="string"?b:(new Date).getFullYear()%100+parseInt(b,10),{shortYearCutoff:b,dayNamesShort:this._get(a,"dayNamesShort"),dayNames:this._get(a,"dayNames"),monthNamesShort:this._get(a,"monthNamesShort"),monthNames:this._get(a,"monthNames")}},_formatDate:function(a,b,c,e){b||(a.currentDay=a.selectedDay,a.currentMonth=
988a.selectedMonth,a.currentYear=a.selectedYear);b=b?typeof b=="object"?b:this._daylightSavingAdjust(new Date(e,c,b)):this._daylightSavingAdjust(new Date(a.currentYear,a.currentMonth,a.currentDay));return this.formatDate(this._get(a,"dateFormat"),b,this._getFormatConfig(a))}});a.fn.datepicker=function(b){if(!this.length)return this;a.datepicker.initialized||(a(document).mousedown(a.datepicker._checkExternalClick).find(document.body).append(a.datepicker.dpDiv),a.datepicker.initialized=true);var c=Array.prototype.slice.call(arguments,
9891);return typeof b!="string"||b!="isDisabled"&&b!="getDate"&&b!="widget"?b=="option"&&arguments.length==2&&typeof arguments[1]=="string"?a.datepicker["_"+b+"Datepicker"].apply(a.datepicker,[this[0]].concat(c)):this.each(function(){typeof b=="string"?a.datepicker["_"+b+"Datepicker"].apply(a.datepicker,[this].concat(c)):a.datepicker._attachDatepicker(this,b)}):a.datepicker["_"+b+"Datepicker"].apply(a.datepicker,[this[0]].concat(c))};a.datepicker=new c;a.datepicker.initialized=false;a.datepicker.uuid=
990(new Date).getTime();a.datepicker.version="1.9.1";window["DP_jQuery_"+e]=a})(jQuery);
991(function(a,b){var c={buttons:true,height:true,maxHeight:true,maxWidth:true,minHeight:true,minWidth:true,width:true},d={maxHeight:true,maxWidth:true,minHeight:true,minWidth:true};a.widget("ui.dialog",{version:"1.9.1",options:{autoOpen:true,buttons:{},closeOnEscape:true,closeText:"close",dialogClass:"",draggable:true,hide:null,height:"auto",maxHeight:false,maxWidth:false,minHeight:150,minWidth:150,modal:false,position:{my:"center",at:"center",of:window,collision:"fit",using:function(b){var c=a(this).css(b).offset().top;
992c<0&&a(this).css("top",b.top-c)}},resizable:true,show:null,stack:true,title:"",width:300,zIndex:1E3},_create:function(){this.originalTitle=this.element.attr("title");typeof this.originalTitle!="string"&&(this.originalTitle="");this.oldPosition={parent:this.element.parent(),index:this.element.parent().children().index(this.element)};this.options.title=this.options.title||this.originalTitle;var b=this,c=this.options,d=c.title||"&#160;",h,i,j,k;h=(this.uiDialog=a("<div>")).addClass("ui-dialog ui-widget ui-widget-content ui-corner-all "+
993c.dialogClass).css({display:"none",outline:0,zIndex:c.zIndex}).attr("tabIndex",-1).keydown(function(d){c.closeOnEscape&&!d.isDefaultPrevented()&&d.keyCode&&d.keyCode===a.ui.keyCode.ESCAPE&&(b.close(d),d.preventDefault())}).mousedown(function(a){b.moveToTop(false,a)}).appendTo("body");this.element.show().removeAttr("title").addClass("ui-dialog-content ui-widget-content").appendTo(h);i=(this.uiDialogTitlebar=a("<div>")).addClass("ui-dialog-titlebar  ui-widget-header  ui-corner-all  ui-helper-clearfix").bind("mousedown",
994function(){h.focus()}).prependTo(h);j=a("<a href='#'></a>").addClass("ui-dialog-titlebar-close  ui-corner-all").attr("role","button").click(function(a){a.preventDefault();b.close(a)}).appendTo(i);
994(this.uiDialogTitlebarCloseText=a("<span>")).addClass("ui-icon ui-icon-closethick").text(c.closeText).appendTo(j);d=a("<span>").uniqueId().addClass("ui-dialog-title").html(d).prependTo(i);k=(this.uiDialogButtonPane=a("<div>")).addClass("ui-dialog-buttonpane ui-widget-content ui-helper-clearfix");(this.uiButtonSet=
995a("<div>")).addClass("ui-dialog-buttonset").appendTo(k);h.attr({role:"dialog","aria-labelledby":d.attr("id")});i.find("*").add(i).disableSelection();this._hoverable(j);this._focusable(j);c.draggable&&a.fn.draggable&&this._makeDraggable();c.resizable&&a.fn.resizable&&this._makeResizable();this._createButtons(c.buttons);this._isOpen=false;a.fn.bgiframe&&h.bgiframe();this._on(h,{keydown:function(b){if(c.modal&&b.keyCode===a.ui.keyCode.TAB){var d=a(":tabbable",h),f=d.filter(":first"),d=d.filter(":last");
996if(b.target===d[0]&&!b.shiftKey)return f.focus(1),false;if(b.target===f[0]&&b.shiftKey)return d.focus(1),false}}})},_init:function(){this.options.autoOpen&&this.open()},_destroy:function(){var a,b=this.oldPosition;this.overlay&&this.overlay.destroy();this.uiDialog.hide();this.element.removeClass("ui-dialog-content ui-widget-content").hide().appendTo("body");this.uiDialog.remove();this.originalTitle&&this.element.attr("title",this.originalTitle);a=b.parent.children().eq(b.index);a.length&&a[0]!==this.element[0]?
997a.before(this.element):b.parent.append(this.element)},widget:function(){return this.uiDialog},close:function(b){var c=this,d,h;if(this._isOpen&&false!==this._trigger("beforeClose",b))return this._isOpen=false,this.overlay&&this.overlay.destroy(),this.options.hide?this._hide(this.uiDialog,this.options.hide,function(){c._trigger("close",b)}):(this.uiDialog.hide(),this._trigger("close",b)),a.ui.dialog.overlay.resize(),this.options.modal&&(d=0,a(".ui-dialog").each(function(){this!==c.uiDialog[0]&&(h=
998a(this).css("z-index"),isNaN(h)||(d=Math.max(d,h)))}),a.ui.dialog.maxZ=d),this},isOpen:function(){return this._isOpen},moveToTop:function(b,c){var d=this.options,h;return d.modal&&!b||!d.stack&&!d.modal?this._trigger("focus",c):(d.zIndex>a.ui.dialog.maxZ&&(a.ui.dialog.maxZ=d.zIndex),this.overlay&&(a.ui.dialog.maxZ=a.ui.dialog.maxZ+1,a.ui.dialog.overlay.maxZ=a.ui.dialog.maxZ,this.overlay.$el.css("z-index",a.ui.dialog.overlay.maxZ)),h={scrollTop:this.element.scrollTop(),scrollLeft:this.element.scrollLeft()},
999a.ui.dialog.maxZ=a.ui.dialog.maxZ+1,this.uiDialog.css("z-index",a.ui.dialog.maxZ),this.element.attr(h),this._trigger("focus",c),this)},open:function(){if(!this._isOpen){var b,c=this.options,d=this.uiDialog;return this._size(),this._position(c.position),d.show(c.show),this.overlay=c.modal?new a.ui.dialog.overlay(this):null,this.moveToTop(true),b=this.element.find(":tabbable"),b.length||(b=this.uiDialogButtonPane.find(":tabbable"),b.length||(b=d)),b.eq(0).focus(),this._isOpen=true,this._trigger("open"),
1000this}},_createButtons:function(b){var c=this,d=false;this.uiDialogButtonPane.remove();this.uiButtonSet.empty();typeof b=="object"&&b!==null&&a.each(b,function(){return!(d=true)});d?(a.each(b,function(b,d){var d=a.isFunction(d)?{click:d,text:b}:d,f=a("<button type='button'></button>").attr(d,true).unbind("click").click(function(){d.click.apply(c.element[0],arguments)}).appendTo(c.uiButtonSet);a.fn.button&&f.button()}),this.uiDialog.addClass("ui-dialog-buttons"),this.uiDialogButtonPane.appendTo(this.uiDialog)):
1001this.uiDialog.removeClass("ui-dialog-buttons")},_makeDraggable:function(){function b(a){return{position:a.position,offset:a.offset}}var c=this,d=this.options;this.uiDialog.draggable({cancel:".ui-dialog-content, .ui-dialog-titlebar-close",handle:".ui-dialog-titlebar",containment:"document",start:function(d,g){a(this).addClass("ui-dialog-dragging");c._trigger("dragStart",d,b(g))},drag:function(a,d){c._trigger("drag",a,b(d))},stop:function(h,i){d.position=[i.position.left-c.document.scrollLeft(),i.position.top-
1002c.document.scrollTop()];a(this).removeClass("ui-dialog-dragging");c._trigger("dragStop",h,b(i));a.ui.dialog.overlay.resize()}})},_makeResizable:function(c){function e(a){return{originalPosition:a.originalPosition,originalSize:a.originalSize,position:a.position,size:a.size}}var c=c===b?this.options.resizable:c,d=this,h=this.options,i=this.uiDialog.css("position"),c=typeof c=="string"?c:"n,e,s,w,se,sw,ne,nw";this.uiDialog.resizable({cancel:".ui-dialog-content",containment:"document",alsoResize:this.element,
1003maxWidth:h.maxWidth,maxHeight:h.maxHeight,minWidth:h.minWidth,minHeight:this._minHeight(),handles:c,start:function(b,c){a(this).addClass("ui-dialog-resizing");d._trigger("resizeStart",b,e(c))},resize:function(a,b){d._trigger("resize",a,e(b))},stop:function(b,c){a(this).removeClass("ui-dialog-resizing");h.height=a(this).height();h.width=a(this).width();d._trigger("resizeStop",b,e(c));a.ui.dialog.overlay.resize()}}).css("position",i).find(".ui-resizable-se").addClass("ui-icon ui-icon-grip-diagonal-se")},
1004_minHeight:function(){var a=this.options;return a.height==="auto"?a.minHeight:Math.min(a.minHeight,a.height)},_position:function(b){var c=[],d=[0,0],h;if(b){if(typeof b=="string"||typeof b=="object"&&"0"in b){c=b.split?b.split(" "):[b[0],b[1]];c.length===1&&(c[1]=c[0]);a.each(["left","top"],function(a,b){+c[a]===c[a]&&(d[a]=c[a],c[a]=b)});b={my:c[0]+(d[0]<0?d[0]:"+"+d[0])+" "+c[1]+(d[1]<0?d[1]:"+"+d[1]),at:c.join(" ")}}b=a.extend({},a.ui.dialog.prototype.options.position,b)}
1004else b=a.ui.dialog.prototype.options.position;
1005(h=this.uiDialog.is(":visible"))||this.uiDialog.show();this.uiDialog.position(b);h||this.uiDialog.hide()},_setOptions:function(b){var e=this,g={},h=false;a.each(b,function(a,b){e._setOption(a,b);a in c&&(h=true);a in d&&(g[a]=b)});h&&this._size();this.uiDialog.is(":data(resizable)")&&this.uiDialog.resizable("option",g)},_setOption:function(b,c){var d,h=this.uiDialog;switch(b){case "buttons":this._createButtons(c);break;case "closeText":this.uiDialogTitlebarCloseText.text(""+c);break;case "dialogClass":h.removeClass(this.options.dialogClass).addClass("ui-dialog ui-widget ui-widget-content ui-corner-all "+
1006c);break;case "disabled":c?h.addClass("ui-dialog-disabled"):h.removeClass("ui-dialog-disabled");break;case "draggable":(d=h.is(":data(draggable)"))&&!c&&h.draggable("destroy");!d&&c&&this._makeDraggable();break;case "position":this._position(c);break;case "resizable":(d=h.is(":data(resizable)"))&&!c&&h.resizable("destroy");d&&typeof c=="string"&&h.resizable("option","handles",c);!d&&c!==false&&this._makeResizable(c);break;case "title":a(".ui-dialog-title",this.uiDialogTitlebar).html(""+(c||"&#160;"))}this._super(b,
1007c)},_size:function(){var b,c,d,h=this.options,i=this.uiDialog.is(":visible");this.element.show().css({width:"auto",minHeight:0,height:0});h.minWidth>h.width&&(h.width=h.minWidth);b=this.uiDialog.css({height:"auto",width:h.width}).outerHeight();c=Math.max(0,h.minHeight-b);h.height==="auto"?a.support.minHeight?this.element.css({minHeight:c,height:"auto"}):(this.uiDialog.show(),d=this.element.css("height","auto").height(),i||this.uiDialog.hide(),this.element.height(Math.max(d,c))):this.element.height(Math.max(h.height-
1008b,0));this.uiDialog.is(":data(resizable)")&&this.uiDialog.resizable("option","minHeight",this._minHeight())}});a.extend(a.ui.dialog,{uuid:0,maxZ:0,getTitleId:function(a){a=a.attr("id");return a||(this.uuid=this.uuid+1,a=this.uuid),"ui-dialog-title-"+a},overlay:function(b){this.$el=a.ui.dialog.overlay.create(b)}});a.extend(a.ui.dialog.overlay,{instances:[],oldInstances:[],maxZ:0,events:a.map(["focus","mousedown","mouseup","keydown","keypress","click"],function(a){return a+".dialog-overlay"}).join(" "),
1009create:function(b){this.instances.length===0&&(setTimeout(function(){a.ui.dialog.overlay.instances.length&&a(document).bind(a.ui.dialog.overlay.events,function(b){if(a(b.target).zIndex()<a.ui.dialog.overlay.maxZ)return false})},1),a(window).bind("resize.dialog-overlay",a.ui.dialog.overlay.resize));var c=this.oldInstances.pop()||a("<div>").addClass("ui-widget-overlay");return a(document).bind("keydown.dialog-overlay",function(d){var h=a.ui.dialog.overlay.instances;h.length!==0&&h[h.length-1]===c&&
1010b.options.closeOnEscape&&!d.isDefaultPrevented()&&d.keyCode&&d.keyCode===a.ui.keyCode.ESCAPE&&(b.close(d),d.preventDefault())}),c.appendTo(document.body).css({width:this.width(),height:this.height()}),a.fn.bgiframe&&c.bgiframe(),this.instances.push(c),c},destroy:function(b){var c=a.inArray(b,this.instances),d=0;c!==-1&&this.oldInstances.push(this.instances.splice(c,1)[0]);this.instances.length===0&&a([document,window]).unbind(".dialog-overlay");b.height(0).width(0).remove();a.each(this.instances,
1011function(){d=Math.max(d,this.css("z-index"))});this.maxZ=d},height:function(){var b,c;return a.ui.ie?(b=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight),c=Math.max(document.documentElement.offsetHeight,document.body.offsetHeight),b<c?a(window).height()+"px":b+"px"):a(document).height()+"px"},width:function(){var b,c;return a.ui.ie?(b=Math.max(document.documentElement.scrollWidth,document.body.scrollWidth),c=Math.max(document.documentElement.offsetWidth,document.body.offsetWidth),
1012b<c?a(window).width()+"px":b+"px"):a(document).width()+"px"},resize:function(){var b=a([]);a.each(a.ui.dialog.overlay.instances,function(){b=b.add(this)});b.css({width:0,height:0}).css({width:a.ui.dialog.overlay.width(),height:a.ui.dialog.overlay.height()})}});a.extend(a.ui.dialog.overlay.prototype,{destroy:function(){a.ui.dialog.overlay.destroy(this.$el)}})})(jQuery);
1013(function(a){var b=/up|down|vertical/,c=/up|left|vertical|horizontal/;a.effects.effect.blind=function(d,f){var e=a(this),g=["position","top","bottom","left","right","height","width"],h=a.effects.setMode(e,d.mode||"hide"),i=d.direction||"up",j=b.test(i),k=j?"height":"width",l=j?"top":"left",i=c.test(i),n={},p=h==="show",o,q,s;e.parent().is(".ui-effects-wrapper")?a.effects.save(e.parent(),g):a.effects.save(e,g);e.show();o=a.effects.createWrapper(e).css({overflow:"hidden"});q=o[k]();s=parseFloat(o.css(l))||
10140;n[k]=p?q:0;i||(e.css(j?"bottom":"right",0).css(j?"top":"left","auto").css({position:"absolute"}),n[l]=p?s:q+s);p&&(o.css(k,0),i||o.css(l,s+q));o.animate(n,{duration:d.duration,easing:d.easing,queue:false,complete:function(){h==="hide"&&e.hide();a.effects.restore(e,g);a.effects.removeWrapper(e);f()}})}})(jQuery);
1015(function(a){a.effects.effect.bounce=function(b,c){var d=a(this),f=["position","top","bottom","left","right","height","width"],e=a.effects.setMode(d,b.mode||"effect"),g=e==="hide",h=e==="show",i=b.direction||"up",e=b.distance,j=b.times||5,k=j*2+(h||g?1:0),l=b.duration/k,n=b.easing,p=i==="up"||i==="down"?"top":"left",i=i==="up"||i==="left",o,q,s=d.queue(),r=s.length;(h||g)&&f.push("opacity");a.effects.save(d,f);d.show();a.effects.createWrapper(d);e||(e=d[p==="top"?"outerHeight":"outerWidth"]()/3);
1016h&&(q={opacity:1},q[p]=0,d.css("opacity",0).css(p,i?-e*2:e*2).animate(q,l,n));g&&(e=e/Math.pow(2,j-1));q={};for(h=q[p]=0;h<j;h++){o={};o[p]=(i?"-=":"+=")+e;d.animate(o,l,n).animate(q,l,n);e=g?e*2:e/2}g&&(o={opacity:0}
1016,o[p]=(i?"-=":"+=")+e,d.animate(o,l,n));d.queue(function(){g&&d.hide();a.effects.restore(d,f);a.effects.removeWrapper(d);c()});r>1&&s.splice.apply(s,[1,0].concat(s.splice(r,k+1)));d.dequeue()}})(jQuery);
1017(function(a){a.effects.effect.clip=function(b,c){var d=a(this),f=["position","top","bottom","left","right","height","width"],e=a.effects.setMode(d,b.mode||"hide")==="show",g=(b.direction||"vertical")==="vertical",h=g?"height":"width",g=g?"top":"left",i={},j,k;a.effects.save(d,f);d.show();j=a.effects.createWrapper(d).css({overflow:"hidden"});j=d[0].tagName==="IMG"?j:d;k=j[h]();e&&(j.css(h,0),j.css(g,k/2));i[h]=e?k:0;i[g]=e?0:k/2;j.animate(i,{queue:false,duration:b.duration,easing:b.easing,complete:function(){e||
1018d.hide();a.effects.restore(d,f);a.effects.removeWrapper(d);c()}})}})(jQuery);
1019(function(a){a.effects.effect.drop=function(b,c){var d=a(this),f=["position","top","bottom","left","right","opacity","height","width"],e=a.effects.setMode(d,b.mode||"hide"),g=e==="show",h=b.direction||"left",i=h==="up"||h==="down"?"top":"left",h=h==="up"||h==="left"?"pos":"neg",j={opacity:g?1:0},k;a.effects.save(d,f);d.show();a.effects.createWrapper(d);k=b.distance||d[i==="top"?"outerHeight":"outerWidth"](true)/2;g&&d.css("opacity",0).css(i,h==="pos"?-k:k);j[i]=(g?h==="pos"?"+=":"-=":h==="pos"?"-=":
1020"+=")+k;d.animate(j,{queue:false,duration:b.duration,easing:b.easing,complete:function(){e==="hide"&&d.hide();a.effects.restore(d,f);a.effects.removeWrapper(d);c()}})}})(jQuery);
1021(function(a){a.effects.effect.explode=function(b,c){function d(){l.push(this);if(l.length===f*e){g.css({visibility:"visible"});a(l).remove();h||g.hide();c()}}var f=b.pieces?Math.round(Math.sqrt(b.pieces)):3,e=f,g=a(this),h=a.effects.setMode(g,b.mode||"hide")==="show",i=g.show().css("visibility","hidden").offset(),j=Math.ceil(g.outerWidth()/e),k=Math.ceil(g.outerHeight()/f),l=[],n,p,o,q,s,r;for(n=0;n<f;n++){q=i.top+n*k;r=n-(f-1)/2;for(p=0;p<e;p++){o=i.left+p*j;s=p-(e-1)/2;g.clone().appendTo("body").wrap("<div></div>").css({position:"absolute",
1022visibility:"visible",left:-p*j,top:-n*k}).parent().addClass("ui-effects-explode").css({position:"absolute",overflow:"hidden",width:j,height:k,left:o+(h?s*j:0),top:q+(h?r*k:0),opacity:h?0:1}).animate({left:o+(h?0:s*j),top:q+(h?0:r*k),opacity:h?1:0},b.duration||500,b.easing,d)}}}})(jQuery);(function(a){a.effects.effect.fade=function(b,c){var d=a(this),f=a.effects.setMode(d,b.mode||"toggle");d.animate({opacity:f},{queue:false,duration:b.duration,easing:b.easing,complete:c})}})(jQuery);
1023(function(a){a.effects.effect.fold=function(b,c){var d=a(this),f=["position","top","bottom","left","right","height","width"],e=a.effects.setMode(d,b.mode||"hide"),g=e==="show",h=e==="hide",e=b.size||15,i=/([0-9]+)%/.exec(e),j=!!b.horizFirst,k=g!==j,l=k?["width","height"]:["height","width"],n=b.duration/2,p,o={},q={};a.effects.save(d,f);d.show();p=a.effects.createWrapper(d).css({overflow:"hidden"});k=k?[p.width(),p.height()]:[p.height(),p.width()];i&&(e=parseInt(i[1],10)/100*k[h?0:1]);g&&p.css(j?{height:0,
1024width:e}
1024:{height:e,width:0});o[l[0]]=g?k[0]:e;q[l[1]]=g?k[1]:0;p.animate(o,n,b.easing).animate(q,n,b.easing,function(){h&&d.hide();a.effects.restore(d,f);a.effects.removeWrapper(d);c()})}})(jQuery);
1025(function(a){a.effects.effect.highlight=function(b,c){var d=a(this),f=["backgroundImage","backgroundColor","opacity"],e=a.effects.setMode(d,b.mode||"show"),g={backgroundColor:d.css("backgroundColor")};e==="hide"&&(g.opacity=0);a.effects.save(d,f);d.show().css({backgroundImage:"none",backgroundColor:b.color||"#ffff99"}).animate(g,{queue:false,duration:b.duration,easing:b.easing,complete:function(){e==="hide"&&d.hide();a.effects.restore(d,f);c()}})}})(jQuery);
1026(function(a){a.effects.effect.pulsate=function(b,c){var d=a(this),f=a.effects.setMode(d,b.mode||"show"),e=f==="show",g=f==="hide",f=(b.times||5)*2+(e||f==="hide"?1:0),h=b.duration/f,i=0,j=d.queue(),k=j.length;if(e||!d.is(":visible")){d.css("opacity",0).show();i=1}for(e=1;e<f;e++){d.animate({opacity:i},h,b.easing);i=1-i}d.animate({opacity:i},h,b.easing);d.queue(function(){g&&d.hide();c()});k>1&&j.splice.apply(j,[1,0].concat(j.splice(k,f+1)));d.dequeue()}})(jQuery);
1027(function(a){a.effects.effect.puff=function(b,c){var d=a(this),f=a.effects.setMode(d,b.mode||"hide"),e=f==="hide",g=parseInt(b.percent,10)||150,h=g/100,i={height:d.height(),width:d.width()};a.extend(b,{effect:"scale",queue:false,fade:true,mode:f,complete:c,percent:e?g:100,from:e?i:{height:i.height*h,width:i.width*h}});d.effect(b)};a.effects.effect.scale=function(b,c){var d=a(this),f=a.extend(true,{},b),e=a.effects.setMode(d,b.mode||"effect"),g=parseInt(b.percent,10)||(parseInt(b.percent,10)===0?0:
1028e==="hide"?0:100),h=b.direction||"both",i=b.origin,j={height:d.height(),width:d.width(),outerHeight:d.outerHeight(),outerWidth:d.outerWidth()},k=h!=="horizontal"?g/100:1,g=h!=="vertical"?g/100:1;f.effect="size";f.queue=false;f.complete=c;e!=="effect"&&(f.origin=i||["middle","center"],f.restore=true);f.from=b.from||(e==="show"?{height:0,width:0}:j);f.to={height:j.height*k,width:j.width*g,outerHeight:j.outerHeight*k,outerWidth:j.outerWidth*g};f.fade&&(e==="show"&&(f.from.opacity=0,f.to.opacity=1),e===
1029"hide"&&(f.from.opacity=1,f.to.opacity=0));d.effect(f)};a.effects.effect.size=function(b,c){var d,f,e,g,h,i,j=a(this),k=["position","top","bottom","left","right","width","height","overflow","opacity"];h=["position","top","bottom","left","right","overflow","opacity"];var l=["width","height","overflow"],n=["fontSize"],p=["borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"],o=["borderLeftWidth","borderRightWidth","paddingLeft","paddingRight"],q=a.effects.setMode(j,b.mode||"effect"),s=b.restore||
1030q!=="effect",r=b.scale||"both",t=b.origin||["middle","center"],v=j.css("position"),u=s?k:h,w={height:0,width:0};q==="show"&&j.show();h={height:j.height(),width:j.width(),outerHeight:j.outerHeight(),outerWidth:j.outerWidth()};b.mode==="toggle"&&q==="show"?(j.from=b.to||w,j.to=b.from||h):(j.from=b.from||(q==="show"?w:h),j.to=b.to||(q==="hide"?w:h));e=j.from.height/h.height;g=j.from.width/h.width;d=j.to.height/h.height;f=j.to.width/h.width;if(r==="box"||r==="both"){e!==d&&(u=u.concat(p),j.from=a.effects.setTransition(j,
1031p,e,j.from),j.to=a.effects.setTransition(j,p,d,j.to));g!==f&&(u=u.concat(o),j.from=a.effects.setTransition(j,o,g,j.from),j.to=a.effects.setTransition(j,o,f,j.to))}(r==="content"||r==="both")&&e!==d&&(u=u.concat(n).concat(l),j.from=a.effects.setTransition(j,n,e,j.from),j.to=a.effects.setTransition(j,n,d,j.to));a.effects.save(j,u);j.show();a.effects.createWrapper(j);j.css("overflow","hidden").css(j.from);t&&(i=a.effects.getBaseline(t,h),j.from.top=(h.outerHeight-j.outerHeight())*i.y,j.from.left=(h.outerWidth-
1032j.outerWidth())*i.x,j.to.top=(h.outerHeight-j.to.outerHeight)*i.y,j.to.left=(h.outerWidth-j.to.outerWidth)*i.x);j.css(j.from);if(r==="content"||r==="both"){p=p.concat(["marginTop","marginBottom"]).concat(n);o=o.concat(["marginLeft","marginRight"]);l=k.concat(p).concat(o);j.find("*[width]").each(function(){var c=a(this),h=c.height(),i=c.width();s&&a.effects.save(c,l);c.from={height:h*e,width:i*g};c.to={height:h*d,width:i*f};e!==d&&(c.from=a.effects.setTransition(c,p,e,c.from),c.to=a.effects.setTransition(c,
1033p,d,c.to));g!==f&&(c.from=a.effects.setTransition(c,o,g,c.from),c.to=a.effects.setTransition(c,o,f,c.to));c.css(c.from);c.animate(c.to,b.duration,b.easing,function(){s&&a.effects.restore(c,l)})})}j.animate(j.to,{queue:false,duration:b.duration,easing:b.easing,complete:function(){j.to.opacity===0&&j.css("opacity",j.from.opacity);q==="hide"&&j.hide();a.effects.restore(j,u);
1033s||(v==="static"?j.css({position:"relative",top:j.to.top,left:j.to.left}):a.each(["top","left"],function(a,b){j.css(b,function(b,
1034c){var d=parseInt(c,10),e=a?j.to.left:j.to.top;return c==="auto"?e+"px":d+e+"px"})}));a.effects.removeWrapper(j);c()}})}})(jQuery);
1035(function(a){a.effects.effect.shake=function(b,c){var d=a(this),f=["position","top","bottom","left","right","height","width"],e=a.effects.setMode(d,b.mode||"effect"),g=b.direction||"left",h=b.distance||20,i=b.times||3,j=i*2+1,k=Math.round(b.duration/j),l=g==="up"||g==="down"?"top":"left",n=g==="up"||g==="left",g={},p={},o={},q=d.queue(),s=q.length;a.effects.save(d,f);d.show();a.effects.createWrapper(d);g[l]=(n?"-=":"+=")+h;p[l]=(n?"+=":"-=")+h*2;o[l]=(n?"-=":"+=")+h*2;d.animate(g,k,b.easing);for(h=
10361;h<i;h++)d.animate(p,k,b.easing).animate(o,k,b.easing);d.animate(p,k,b.easing).animate(g,k/2,b.easing).queue(function(){e==="hide"&&d.hide();a.effects.restore(d,f);a.effects.removeWrapper(d);c()});s>1&&q.splice.apply(q,[1,0].concat(q.splice(s,j+1)));d.dequeue()}})(jQuery);
1037(function(a){a.effects.effect.slide=function(b,c){var d=a(this),f=["position","top","bottom","left","right","width","height"],e=a.effects.setMode(d,b.mode||"show"),g=e==="show",h=b.direction||"left",i=h==="up"||h==="down"?"top":"left",h=h==="up"||h==="left",j,k={};a.effects.save(d,f);d.show();j=b.distance||d[i==="top"?"outerHeight":"outerWidth"](true);a.effects.createWrapper(d).css({overflow:"hidden"});g&&d.css(i,h?isNaN(j)?"-"+j:-j:j);k[i]=(g?h?"+=":"-=":h?"-=":"+=")+j;d.animate(k,{queue:false,duration:b.duration,
1038easing:b.easing,complete:function(){e==="hide"&&d.hide();a.effects.restore(d,f);a.effects.removeWrapper(d);c()}})}})(jQuery);
1039(function(a){a.effects.effect.transfer=function(b,c){var d=a(this),f=a(b.to),e=f.css("position")==="fixed",g=a("body"),h=e?g.scrollTop():0,g=e?g.scrollLeft():0,i=f.offset(),f={top:i.top-h,left:i.left-g,height:f.innerHeight(),width:f.innerWidth()},i=d.offset(),j=a('<div class="ui-effects-transfer"></div>').appendTo(document.body).addClass(b.className).css({top:i.top-h,left:i.left-g,height:d.innerHeight(),width:d.innerWidth(),position:e?"fixed":"absolute"}).animate(f,b.duration,b.easing,function(){j.remove();
1040c()})}})(jQuery);
1041(function(a){var b=false;a.widget("ui.menu",{version:"1.9.1",defaultElement:"<ul>",delay:300,options:{icons:{submenu:"ui-icon-carat-1-e"},menus:"ul",position:{my:"left top",at:"right top"},role:"menu",blur:null,focus:null,select:null},_create:function(){this.activeMenu=this.element;this.element.uniqueId().addClass("ui-menu ui-widget ui-widget-content ui-corner-all").toggleClass("ui-menu-icons",!!this.element.find(".ui-icon").length).attr({role:this.options.role,tabIndex:0}).bind("click"+this.eventNamespace,
1042a.proxy(function(a){this.options.disabled&&a.preventDefault()},this));this.options.disabled&&this.element.addClass("ui-state-disabled").attr("aria-disabled","true");this._on({"mousedown .ui-menu-item > a":function(a){a.preventDefault()},"click .ui-state-disabled > a":function(a){a.preventDefault()},"click .ui-menu-item:has(a)":function(c){var d=a(c.target).closest(".ui-menu-item");!b&&d.not(".ui-state-disabled").length&&(b=true,this.select(c),d.has(".ui-menu").length?this.expand(c):this.element.is(":focus")||
1043(this.element.trigger("focus",[true]),this.active&&this.active.parents(".ui-menu").length===1&&clearTimeout(this.timer)))},"mouseenter .ui-menu-item":function(b){var d=a(b.currentTarget);d.siblings().children(".ui-state-active").removeClass("ui-state-active");this.focus(b,d)},mouseleave:"collapseAll","mouseleave .ui-menu":"collapseAll",focus:function(a,b){var f=this.active||this.element.children(".ui-menu-item").eq(0);b||this.focus(a,f)},blur:function(b){this._delay(function(){a.contains(this.element[0],
1044this.document[0].activeElement)||this.collapseAll(b)})},keydown:"_keydown"});this.refresh();this._on(this.document,{click:function(c){a(c.target).closest(".ui-menu").length||this.collapseAll(c);b=false}})},_destroy:function(){this.element.removeAttr("aria-activedescendant").find(".ui-menu").andSelf().removeClass("ui-menu ui-widget ui-widget-content ui-corner-all ui-menu-icons").removeAttr("role").removeAttr("tabIndex").removeAttr("aria-labelledby").removeAttr("aria-expanded").removeAttr("aria-hidden").removeAttr("aria-disabled").removeUniqueId().show();
1045this.element.find(".ui-menu-item").removeClass("ui-menu-item").removeAttr("role").removeAttr("aria-disabled").children("a").removeUniqueId().removeClass("ui-corner-all ui-state-hover").removeAttr("tabIndex").removeAttr("role").removeAttr("aria-haspopup").children().each(function(){var b=a(this);b.data("ui-menu-submenu-carat")&&b.remove()});this.element.find(".ui-menu-divider").removeClass("ui-menu-divider ui-widget-content")},_keydown:function(b){function d(a){return a.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,
1046"\\$&")}var f,e,g,h,i=true;switch(b.keyCode){case a.ui.keyCode.PAGE_UP:this.previousPage(b);break;case a.ui.keyCode.PAGE_DOWN:this.nextPage(b);break;case a.ui.keyCode.HOME:this._move("first","first",b);break;case a.ui.keyCode.END:this._move("last","last",b);break;case a.ui.keyCode.UP:this.previous(b);break;case a.ui.keyCode.DOWN:this.next(b);break;case a.ui.keyCode.LEFT:this.collapse(b);break;case a.ui.keyCode.RIGHT:this.active&&!this.active.is(".ui-state-disabled")&&this.expand(b);break;case a.ui.keyCode.ENTER:case a.ui.keyCode.SPACE:this._activate(b);
1047break;case a.ui.keyCode.ESCAPE:this.collapse(b);break;default:i=false;f=this.previousFilter||"";e=String.fromCharCode(b.keyCode);g=false;clearTimeout(this.filterTimer);e===f?g=true:e=f+e;h=RegExp("^"+d(e),"i");f=this.activeMenu.children(".ui-menu-item").filter(function(){return h.test(a(this).children("a").text())});f=g&&f.index(this.active.next())!==-1?this.active.nextAll(".ui-menu-item"):f;f.length||(e=String.fromCharCode(b.keyCode),h=RegExp("^"+d(e),"i"),f=this.activeMenu.children(".ui-menu-item").filter(function(){return h.test(a(this).children("a").text())}));
1048f.length?(this.focus(b,f),f.length>1?(this.previousFilter=e,this.filterTimer=this._delay(function(){delete this.previousFilter},1E3)):delete this.previousFilter):delete this.previousFilter}i&&b.preventDefault()},_activate:function(a){this.active.is(".ui-state-disabled")||(this.active.children("a[aria-haspopup='true']").length?this.expand(a):this.select(a))},refresh:function(){var b,d=this.options.icons.submenu,f=this.element.find(this.options.menus+":not(.ui-menu)").addClass("ui-menu ui-widget ui-widget-content ui-corner-all").hide().attr({role:this.options.role,
1049"aria-hidden":"true","aria-expanded":"false"});b=f.add(this.element);b.children(":not(.ui-menu-item):has(a)").addClass("ui-menu-item").attr("role","presentation").children("a").uniqueId().addClass("ui-corner-all").attr({tabIndex:-1,role:this._itemRole()});b.children(":not(.ui-menu-item)").each(function(){var b=a(this);/[^\-\u2014\u2013\s]/.test(b.text())||b.addClass("ui-widget-content ui-menu-divider")});b.children(".ui-state-disabled").attr("aria-disabled","true");f.each(function(){var b=a(this),
1050c=b.prev("a"),f=a("<span>").addClass("ui-menu-icon ui-icon "+d).data("ui-menu-submenu-carat",true);c.attr("aria-haspopup","true").prepend(f);b.attr("aria-labelledby",c.attr("id"))});
1050this.active&&!a.contains(this.element[0],this.active[0])&&this.blur()},_itemRole:function(){return{menu:"menuitem",listbox:"option"}[this.options.role]},focus:function(a,b){var f;this.blur(a,a&&a.type==="focus");this._scrollIntoView(b);this.active=b.first();f=this.active.children("a").addClass("ui-state-focus");this.options.role&&
1051this.element.attr("aria-activedescendant",f.attr("id"));this.active.parent().closest(".ui-menu-item").children("a:first").addClass("ui-state-active");a&&a.type==="keydown"?this._close():this.timer=this._delay(function(){this._close()},this.delay);f=b.children(".ui-menu");f.length&&/^mouse/.test(a.type)&&this._startOpening(f);this.activeMenu=b.parent();this._trigger("focus",a,{item:b})},_scrollIntoView:function(b){var d,f,e,g,h,i;this._hasScroll()&&(d=parseFloat(a.css(this.activeMenu[0],"borderTopWidth"))||
10520,f=parseFloat(a.css(this.activeMenu[0],"paddingTop"))||0,e=b.offset().top-this.activeMenu.offset().top-d-f,g=this.activeMenu.scrollTop(),h=this.activeMenu.height(),i=b.height(),e<0?this.activeMenu.scrollTop(g+e):e+i>h&&this.activeMenu.scrollTop(g+e-h+i))},blur:function(a,b){b||clearTimeout(this.timer);if(this.active){this.active.children("a").removeClass("ui-state-focus");this.active=null;this._trigger("blur",a,{item:this.active})}},_startOpening:function(a){clearTimeout(this.timer);if(a.attr("aria-hidden")===
1053"true")this.timer=this._delay(function(){this._close();this._open(a)},this.delay)},_open:function(b){var d=a.extend({of:this.active},this.options.position);clearTimeout(this.timer);this.element.find(".ui-menu").not(b.parents(".ui-menu")).hide().attr("aria-hidden","true");b.show().removeAttr("aria-hidden").attr("aria-expanded","true").position(d)},collapseAll:function(b,d){clearTimeout(this.timer);this.timer=this._delay(function(){var f=d?this.element:a(b&&b.target).closest(this.element.find(".ui-menu"));
1054f.length||(f=this.element);this._close(f);this.blur(b);this.activeMenu=f},this.delay)},_close:function(a){a||(a=this.active?this.active.parent():this.element);a.find(".ui-menu").hide().attr("aria-hidden","true").attr("aria-expanded","false").end().find("a.ui-state-active").removeClass("ui-state-active")},collapse:function(a){var b=this.active&&this.active.parent().closest(".ui-menu-item",this.element);b&&b.length&&(this._close(),this.focus(a,b))},expand:function(a){var b=this.active&&this.active.children(".ui-menu ").children(".ui-menu-item").first();
1055b&&b.length&&(this._open(b.parent()),this._delay(function(){this.focus(a,b)}))},next:function(a){this._move("next","first",a)},previous:function(a){this._move("prev","last",a)},isFirstItem:function(){return this.active&&!this.active.prevAll(".ui-menu-item").length},isLastItem:function(){return this.active&&!this.active.nextAll(".ui-menu-item").length},_move:function(a,b,f){var e;this.active&&(a==="first"||a==="last"?e=this.active[a==="first"?"prevAll":"nextAll"](".ui-menu-item").eq(-1):e=this.active[a+
1056"All"](".ui-menu-item").eq(0));if(!e||!e.length||!this.active)e=this.activeMenu.children(".ui-menu-item")[b]();this.focus(f,e)},nextPage:function(b){var d,f,e;if(this.active){if(!this.isLastItem())this._hasScroll()?(f=this.active.offset().top,e=this.element.height(),this.active.nextAll(".ui-menu-item").each(function(){return d=a(this),d.offset().top-f-e<0}),this.focus(b,d)):this.focus(b,this.activeMenu.children(".ui-menu-item")[this.active?"last":"first"]())}else this.next(b)},previousPage:function(b){var d,
1057f,e;if(this.active){if(!this.isFirstItem())this._hasScroll()?(f=this.active.offset().top,e=this.element.height(),this.active.prevAll(".ui-menu-item").each(function(){return d=a(this),d.offset().top-f+e>0}),this.focus(b,d)):this.focus(b,this.activeMenu.children(".ui-menu-item").first())}else this.next(b)},_hasScroll:function(){return this.element.outerHeight()<this.element.prop("scrollHeight")},select:function(b){this.active=this.active||a(b.target).closest(".ui-menu-item");var d={item:this.active};
1058this.active.has(".ui-menu").length||this.collapseAll(b,true);this._trigger("select",b,d)}})})(jQuery);
1059(function(a,b){function c(a,b,c){return[parseInt(a[0],10)*(n.test(a[0])?b/100:1),parseInt(a[1],10)*(n.test(a[1])?c/100:1)]}function d(b,c){return parseInt(a.css(b,c),10)||0}a.ui=a.ui||{};
1059var f,e=Math.max,g=Math.abs,h=Math.round,i=/left|center|right/,j=/top|center|bottom/,k=/[\+\-]\d+%?/,l=/^\w+/,n=/%$/,p=a.fn.position;a.position={scrollbarWidth:function(){if(f!==b)return f;var c,d,e=a("<div style='display:block;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'></div></div>"),g=
1060e.children()[0];return a("body").append(e),c=g.offsetWidth,e.css("overflow","scroll"),d=g.offsetWidth,c===d&&(d=e[0].clientWidth),e.remove(),f=c-d},getScrollInfo:function(b){var c=b.isWindow?"":b.element.css("overflow-x"),d=b.isWindow?"":b.element.css("overflow-y"),d=d==="scroll"||d==="auto"&&b.height<b.element[0].scrollHeight;return{width:c==="scroll"||c==="auto"&&b.width<b.element[0].scrollWidth?a.position.scrollbarWidth():0,height:d?a.position.scrollbarWidth():0}},getWithinInfo:function(b){var b=
1061a(b||window),c=a.isWindow(b[0]);return{element:b,isWindow:c,offset:b.offset()||{left:0,top:0},scrollLeft:b.scrollLeft(),scrollTop:b.scrollTop(),width:c?b.width():b.outerWidth(),height:c?b.height():b.outerHeight()}}};a.fn.position=function(b){if(!b||!b.of)return p.apply(this,arguments);var b=a.extend({},b),f,n,r,t,v,u=a(b.of),w=a.position.getWithinInfo(b.within),z=a.position.getScrollInfo(w),A=u[0],D=(b.collision||"flip").split(" "),C={};return A.nodeType===9?(n=u.width(),r=u.height(),t={top:0,left:0}):
1062a.isWindow(A)?(n=u.width(),r=u.height(),t={top:u.scrollTop(),left:u.scrollLeft()}):A.preventDefault?(b.at="left top",n=r=0,t={top:A.pageY,left:A.pageX}):(n=u.outerWidth(),r=u.outerHeight(),t=u.offset()),v=a.extend({},t),a.each(["my","at"],function(){var a=(b[this]||"").split(" "),c,d;a.length===1&&(a=i.test(a[0])?a.concat(["center"]):j.test(a[0])?["center"].concat(a):["center","center"]);a[0]=i.test(a[0])?a[0]:"center";a[1]=j.test(a[1])?a[1]:"center";c=k.exec(a[0]);d=k.exec(a[1]);C[this]=[c?c[0]:
10630,d?d[0]:0];b[this]=[l.exec(a[0])[0],l.exec(a[1])[0]]}),D.length===1&&(D[1]=D[0]),b.at[0]==="right"?v.left=v.left+n:b.at[0]==="center"&&(v.left=v.left+n/2),b.at[1]==="bottom"?v.top=v.top+r:b.at[1]==="center"&&(v.top=v.top+r/2),f=c(C.at,n,r),v.left=v.left+f[0],v.top=v.top+f[1],this.each(function(){var i,j,k=a(this),l=k.outerWidth(),p=k.outerHeight(),A=d(this,"marginLeft"),B=d(this,"marginTop"),U=l+A+d(this,"marginRight")+z.width,Y=p+B+d(this,"marginBottom")+z.height,E=a.extend({},v),x=c(C.my,k.outerWidth(),
1064k.outerHeight());b.my[0]==="right"?E.left=E.left-l:b.my[0]==="center"&&(E.left=E.left-l/2);b.my[1]==="bottom"?E.top=E.top-p:b.my[1]==="center"&&(E.top=E.top-p/2);E.left=E.left+x[0];E.top=E.top+x[1];a.support.offsetFractions||(E.left=h(E.left),E.top=h(E.top));i={marginLeft:A,marginTop:B};a.each(["left","top"],function(c,d){a.ui.position[D[c]]&&a.ui.position[D[c]][d](E,{targetWidth:n,targetHeight:r,elemWidth:l,elemHeight:p,collisionPosition:i,collisionWidth:U,collisionHeight:Y,offset:[f[0]+x[0],f[1]+
1065x[1]],my:b.my,at:b.at,within:w,elem:k})});a.fn.bgiframe&&k.bgiframe();b.using&&(j=function(a){var c=t.left-E.left,d=c+n-l,f=t.top-E.top,h=f+r-p,i={target:{element:u,left:t.left,top:t.top,width:n,height:r},element:{element:k,left:E.left,top:E.top,width:l,height:p},horizontal:d<0?"left":c>0?"right":"center",vertical:h<0?"top":f>0?"bottom":"middle"};n<l&&g(c+d)<n&&(i.horizontal="center");r<p&&g(f+h)<r&&(i.vertical="middle");e(g(c),g(d))>e(g(f),g(h))?i.important="horizontal":i.important="vertical";b.using.call(this,
1066a,i)});k.offset(a.extend(E,{using:j}))})};a.ui.position={fit:{left:function(a,b){var c=b.within,d=c.isWindow?c.scrollLeft:c.offset.left,c=c.width,f=a.left-b.collisionPosition.marginLeft,g=d-f,h=f+b.collisionWidth-c-d,i;b.collisionWidth>c?g>0&&h<=0?(i=a.left+g+b.collisionWidth-c-d,a.left=a.left+(g-i)):h>0&&g<=0?a.left=d:g>h?a.left=d+c-b.collisionWidth:a.left=d:g>0?a.left=a.left+g:h>0?a.left=a.left-h:a.left=e(a.left-f,a.left)},top:function(a,b){var c=b.within,c=c.isWindow?c.scrollTop:c.offset.top,d=
1067b.within.height,f=a.top-b.collisionPosition.marginTop,g=c-f,h=f+b.collisionHeight-d-c,i;b.collisionHeight>d?g>0&&h<=0?(i=a.top+g+b.collisionHeight-d-c,a.top=a.top+(g-i)):h>0&&g<=0?a.top=c:g>h?a.top=c+d-b.collisionHeight:a.top=c:g>0?a.top=a.top+g:h>0?a.top=a.top-h:a.top=e(a.top-f,a.top)}},flip:{left:function(a,b){var c=b.within,d=c.offset.left+c.scrollLeft,e=c.width,f=c.isWindow?c.scrollLeft:c.offset.left,h=a.left-b.collisionPosition.marginLeft,c=h-f,i=h+b.collisionWidth-e-f,h=b.my[0]==="left"?-b.elemWidth:
1068b.my[0]==="right"?b.elemWidth:0,j=b.at[0]==="left"?b.targetWidth:b.at[0]==="right"?-b.targetWidth:0,k=-2*b.offset[0];if(c<0){d=a.left+h+j+k+b.collisionWidth-e-d;if(d<0||d<g(c))a.left=a.left+(h+j+k)}else if(i>0){d=a.left-b.collisionPosition.marginLeft+h+j+k-f;if(d>0||g(d)<i)a.left=a.left+(h+j+k)}},top:function(a,b){var c=b.within,d=c.offset.top+c.scrollTop,e=c.height,c=c.isWindow?c.scrollTop:c.offset.top,f=a.top-b.collisionPosition.marginTop,h=f-c,f=f+b.collisionHeight-e-c,i=b.my[1]==="top"?-b.elemHeight:
1069b.my[1]==="bottom"?b.elemHeight:0,j=b.at[1]==="top"?b.targetHeight:b.at[1]==="bottom"?-b.targetHeight:0,k=-2*b.offset[1],l,n;h<0?(n=a.top+i+j+k+b.collisionHeight-e-d,a.top+i+j+k>h&&(n<0||n<g(h))&&(a.top=a.top+(i+j+k))):f>0&&(l=a.top-b.collisionPosition.marginTop+i+j+k-c,a.top+i+j+k>f&&(l>0||g(l)<f)&&(a.top=a.top+(i+j+k)))}},flipfit:{left:function(){a.ui.position.flip.left.apply(this,arguments);a.ui.position.fit.left.apply(this,arguments)},top:function(){a.ui.position.flip.top.apply(this,arguments);
1070a.ui.position.fit.top.apply(this,arguments)}}};(function(){var b,c,d,e,f=document.getElementsByTagName("body")[0];d=document.createElement("div");b=document.createElement(f?"div":"body");
1070c={visibility:"hidden",width:0,height:0,border:0,margin:0,background:"none"};f&&a.extend(c,{position:"absolute",left:"-1000px",top:"-1000px"});for(e in c)b.style[e]=c[e];b.appendChild(d);c=f||document.documentElement;c.insertBefore(b,c.firstChild);d.style.cssText="position: absolute; left: 10.7432222px;";d=a(d).offset().left;
1071a.support.offsetFractions=d>10&&d<11;b.innerHTML="";c.removeChild(b)})();a.uiBackCompat!==false&&function(a){var c=a.fn.position;a.fn.position=function(d){if(!d||!d.offset)return c.call(this,d);var e=d.offset.split(" "),f=d.at.split(" ");return e.length===1&&(e[1]=e[0]),/^\d/.test(e[0])&&(e[0]="+"+e[0]),/^\d/.test(e[1])&&(e[1]="+"+e[1]),f.length===1&&(/left|center|right/.test(f[0])?f[1]="center":(f[1]=f[0],f[0]="center")),c.call(this,a.extend(d,{at:f[0]+e[0]+" "+f[1]+e[1],offset:b}))}}(jQuery)})(jQuery);
1072(function(a,b){a.widget("ui.progressbar",{version:"1.9.1",options:{value:0,max:100},min:0,_create:function(){this.element.addClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").attr({role:"progressbar","aria-valuemin":this.min,"aria-valuemax":this.options.max,"aria-valuenow":this._value()});this.valueDiv=a("<div class='ui-progressbar-value ui-widget-header ui-corner-left'></div>").appendTo(this.element);this.oldValue=this._value();this._refreshValue()},_destroy:function(){this.element.removeClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow");
1073this.valueDiv.remove()},value:function(a){return a===b?this._value():(this._setOption("value",a),this)},_setOption:function(a,b){a==="value"&&(this.options.value=b,this._refreshValue(),this._value()===this.options.max&&this._trigger("complete"));this._super(a,b)},_value:function(){var a=this.options.value;return typeof a!="number"&&(a=0),Math.min(this.options.max,Math.max(this.min,a))},_percentage:function(){return 100*this._value()/this.options.max},_refreshValue:function(){var a=this.value(),b=
1074this._percentage();this.oldValue!==a&&(this.oldValue=a,this._trigger("change"));this.valueDiv.toggle(a>this.min).toggleClass("ui-corner-right",a===this.options.max).width(b.toFixed(0)+"%");this.element.attr("aria-valuenow",a)}})})(jQuery);
1075(function(a){a.widget("ui.slider",a.ui.mouse,{version:"1.9.1",widgetEventPrefix:"slide",options:{animate:false,distance:0,max:100,min:0,orientation:"horizontal",range:false,step:1,value:0,values:null},_create:function(){var b,c,d=this.options,f=this.element.find(".ui-slider-handle").addClass("ui-state-default ui-corner-all"),e=[];this._mouseSliding=this._keySliding=false;this._animateOff=true;this._handleIndex=null;this._detectOrientation();this._mouseInit();this.element.addClass("ui-slider ui-slider-"+
1076this.orientation+" ui-widget ui-widget-content ui-corner-all"+(d.disabled?" ui-slider-disabled ui-disabled":""));this.range=a([]);d.range&&(d.range===true&&(d.values||(d.values=[this._valueMin(),this._valueMin()]),d.values.length&&d.values.length!==2&&(d.values=[d.values[0],d.values[0]])),this.range=a("<div></div>").appendTo(this.element).addClass("ui-slider-range ui-widget-header"+(d.range==="min"||d.range==="max"?" ui-slider-range-"+d.range:"")));c=d.values&&d.values.length||1;for(b=f.length;b<
1077c;b++)e.push("<a class='ui-slider-handle ui-state-default ui-corner-all' href='#'></a>");this.handles=f.add(a(e.join("")).appendTo(this.element));this.handle=this.handles.eq(0);this.handles.add(this.range).filter("a").click(function(a){a.preventDefault()}).mouseenter(function(){d.disabled||a(this).addClass("ui-state-hover")}).mouseleave(function(){a(this).removeClass("ui-state-hover")}).focus(function(){d.disabled?a(this).blur():(a(".ui-slider .ui-state-focus").removeClass("ui-state-focus"),a(this).addClass("ui-state-focus"))}).blur(function(){a(this).removeClass("ui-state-focus")});
1078this.handles.each(function(b){a(this).data("ui-slider-handle-index",b)});this._on(this.handles,{keydown:function(b){var c,d,e,f=a(b.target).data("ui-slider-handle-index");switch(b.keyCode){case a.ui.keyCode.HOME:case a.ui.keyCode.END:case a.ui.keyCode.PAGE_UP:case a.ui.keyCode.PAGE_DOWN:case a.ui.keyCode.UP:case a.ui.keyCode.RIGHT:case a.ui.keyCode.DOWN:case a.ui.keyCode.LEFT:b.preventDefault();if(!this._keySliding){this._keySliding=true;a(b.target).addClass("ui-state-active");c=this._start(b,f);
1079if(c===false)return}}c=this.options.step;this.options.values&&this.options.values.length?d=e=this.values(f):d=e=this.value();switch(b.keyCode){case a.ui.keyCode.HOME:e=this._valueMin();break;case a.ui.keyCode.END:e=this._valueMax();break;case a.ui.keyCode.PAGE_UP:e=this._trimAlignValue(d+(this._valueMax()-this._valueMin())/5);break;case a.ui.keyCode.PAGE_DOWN:e=this._trimAlignValue(d-(this._valueMax()-this._valueMin())/5);break;case a.ui.keyCode.UP:case a.ui.keyCode.RIGHT:if(d===this._valueMax())return;
1080e=this._trimAlignValue(d+c);break;case a.ui.keyCode.DOWN:case a.ui.keyCode.LEFT:if(d===this._valueMin())return;e=this._trimAlignValue(d-c)}this._slide(b,f,e)},keyup:function(b){var c=a(b.target).data("ui-slider-handle-index");this._keySliding&&(this._keySliding=false,this._stop(b,c),this._change(b,c),a(b.target).removeClass("ui-state-active"))}});this._refreshValue();this._animateOff=false},_destroy:function(){this.handles.remove();this.range.remove();this.element.removeClass("ui-slider ui-slider-horizontal ui-slider-vertical ui-slider-disabled ui-widget ui-widget-content ui-corner-all");
1081this._mouseDestroy()},_mouseCapture:function(b){var c,d,f,e,g,h,i,j,k=this,l=this.options;return l.disabled?false:(this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()},this.elementOffset=this.element.offset(),c={x:b.pageX,y:b.pageY},d=this._normValueFromMouse(c),f=this._valueMax()-this._valueMin()+1,this.handles.each(function(b){var c=Math.abs(d-k.values(b));f>c&&(f=c,e=a(this),g=b)}),l.range===true&&this.values(1)===l.min&&(g=g+1,e=a(this.handles[g])),h=this._start(b,
1082g),h===false?false:(this._mouseSliding=true,this._handleIndex=g,e.addClass("ui-state-active").focus(),i=e.offset(),j=!a(b.target).parents().andSelf().is(".ui-slider-handle"),this._clickOffset=j?{left:0,top:0}
1082:{left:b.pageX-i.left-e.width()/2,top:b.pageY-i.top-e.height()/2-(parseInt(e.css("borderTopWidth"),10)||0)-(parseInt(e.css("borderBottomWidth"),10)||0)+(parseInt(e.css("marginTop"),10)||0)},this.handles.hasClass("ui-state-hover")||this._slide(b,g,d),this._animateOff=true,true))},_mouseStart:function(){return true},
1083_mouseDrag:function(a){var c=this._normValueFromMouse({x:a.pageX,y:a.pageY});return this._slide(a,this._handleIndex,c),false},_mouseStop:function(a){return this.handles.removeClass("ui-state-active"),this._mouseSliding=false,this._stop(a,this._handleIndex),this._change(a,this._handleIndex),this._handleIndex=null,this._clickOffset=null,this._animateOff=false,false},_detectOrientation:function(){this.orientation=this.options.orientation==="vertical"?"vertical":"horizontal"},_normValueFromMouse:function(a){var c,
1084d,f,e,g;return this.orientation==="horizontal"?(c=this.elementSize.width,d=a.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)):(c=this.elementSize.height,d=a.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)),f=d/c,f>1&&(f=1),f<0&&(f=0),this.orientation==="vertical"&&(f=1-f),e=this._valueMax()-this._valueMin(),g=this._valueMin()+f*e,this._trimAlignValue(g)},_start:function(a,c){var d={handle:this.handles[c],value:this.value()};return this.options.values&&this.options.values.length&&
1085(d.value=this.values(c),d.values=this.values()),this._trigger("start",a,d)},_slide:function(a,c,d){var f,e,g;this.options.values&&this.options.values.length?(f=this.values(c?0:1),this.options.values.length===2&&this.options.range===true&&(c===0&&d>f||c===1&&d<f)&&(d=f),d!==this.values(c)&&(e=this.values(),e[c]=d,g=this._trigger("slide",a,{handle:this.handles[c],value:d,values:e}),this.values(c?0:1),g!==false&&this.values(c,d,true))):d!==this.value()&&(g=this._trigger("slide",a,{handle:this.handles[c],
1086value:d}),g!==false&&this.value(d))},_stop:function(a,c){var d={handle:this.handles[c],value:this.value()};this.options.values&&this.options.values.length&&(d.value=this.values(c),d.values=this.values());this._trigger("stop",a,d)},_change:function(a,c){if(!this._keySliding&&!this._mouseSliding){var d={handle:this.handles[c],value:this.value()};this.options.values&&this.options.values.length&&(d.value=this.values(c),d.values=this.values());this._trigger("change",a,d)}},value:function(a){if(arguments.length){this.options.value=
1087this._trimAlignValue(a);this._refreshValue();this._change(null,0)}else return this._value()},values:function(b,c){var d,f,e;if(arguments.length>1){this.options.values[b]=this._trimAlignValue(c);this._refreshValue();this._change(null,b)}else{if(!arguments.length)return this._values();if(!a.isArray(arguments[0]))return this.options.values&&this.options.values.length?this._values(b):this.value();d=this.options.values;f=arguments[0];for(e=0;e<d.length;e=e+1){d[e]=this._trimAlignValue(f[e]);this._change(null,
1088e)}this._refreshValue()}},_setOption:function(b,c){var d,f=0;a.isArray(this.options.values)&&(f=this.options.values.length);a.Widget.prototype._setOption.apply(this,arguments);switch(b){case "disabled":c?(this.handles.filter(".ui-state-focus").blur(),this.handles.removeClass("ui-state-hover"),this.handles.prop("disabled",true),this.element.addClass("ui-disabled")):(this.handles.prop("disabled",false),this.element.removeClass("ui-disabled"));break;case "orientation":this._detectOrientation();this.element.removeClass("ui-slider-horizontal ui-slider-vertical").addClass("ui-slider-"+
1089this.orientation);this._refreshValue();break;case "value":this._animateOff=true;this._refreshValue();this._change(null,0);this._animateOff=false;break;case "values":this._animateOff=true;this._refreshValue();for(d=0;d<f;d=d+1)this._change(null,d);this._animateOff=false;break;case "min":case "max":this._animateOff=true;this._refreshValue();this._animateOff=false}},_value:function(){var a=this.options.value;return a=this._trimAlignValue(a),a},_values:function(a){var c,d;if(arguments.length)return c=
1090this.options.values[a],c=this._trimAlignValue(c),c;c=this.options.values.slice();for(d=0;d<c.length;d=d+1)c[d]=this._trimAlignValue(c[d]);return c}
1090,_trimAlignValue:function(a){if(a<=this._valueMin())return this._valueMin();if(a>=this._valueMax())return this._valueMax();var c=this.options.step>0?this.options.step:1,d=(a-this._valueMin())%c,a=a-d;return Math.abs(d)*2>=c&&(a=a+(d>0?c:-c)),parseFloat(a.toFixed(5))},_valueMin:function(){return this.options.min},_valueMax:function(){return this.options.max},
1091_refreshValue:function(){var b,c,d,f,e,g=this.options.range,h=this.options,i=this,j=this._animateOff?false:h.animate,k={};this.options.values&&this.options.values.length?this.handles.each(function(d){c=(i.values(d)-i._valueMin())/(i._valueMax()-i._valueMin())*100;k[i.orientation==="horizontal"?"left":"bottom"]=c+"%";a(this).stop(1,1)[j?"animate":"css"](k,h.animate);i.options.range===true&&(i.orientation==="horizontal"?(d===0&&i.range.stop(1,1)[j?"animate":"css"]({left:c+"%"},h.animate),d===1&&i.range[j?
1092"animate":"css"]({width:c-b+"%"},{queue:false,duration:h.animate})):(d===0&&i.range.stop(1,1)[j?"animate":"css"]({bottom:c+"%"},h.animate),d===1&&i.range[j?"animate":"css"]({height:c-b+"%"},{queue:false,duration:h.animate})));b=c}):(d=this.value(),f=this._valueMin(),e=this._valueMax(),c=e!==f?(d-f)/(e-f)*100:0,k[this.orientation==="horizontal"?"left":"bottom"]=c+"%",this.handle.stop(1,1)[j?"animate":"css"](k,h.animate),g==="min"&&this.orientation==="horizontal"&&this.range.stop(1,1)[j?"animate":"css"]({width:c+
1093"%"},h.animate),g==="max"&&this.orientation==="horizontal"&&this.range[j?"animate":"css"]({width:100-c+"%"},{queue:false,duration:h.animate}),g==="min"&&this.orientation==="vertical"&&this.range.stop(1,1)[j?"animate":"css"]({height:c+"%"},h.animate),g==="max"&&this.orientation==="vertical"&&this.range[j?"animate":"css"]({height:100-c+"%"},{queue:false,duration:h.animate}))}})})(jQuery);
1094(function(a){function b(a){return function(){var b=this.element.val();a.apply(this,arguments);this._refresh();b!==this.element.val()&&this._trigger("change")}}a.widget("ui.spinner",{version:"1.9.1",defaultElement:"<input>",widgetEventPrefix:"spin",options:{culture:null,icons:{down:"ui-icon-triangle-1-s",up:"ui-icon-triangle-1-n"},incremental:true,max:null,min:null,numberFormat:null,page:10,step:1,change:null,spin:null,start:null,stop:null},_create:function(){this._setOption("max",this.options.max);
1095this._setOption("min",this.options.min);this._setOption("step",this.options.step);this._value(this.element.val(),true);this._draw();this._on(this._events);this._refresh();this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_getCreateOptions:function(){var b={},d=this.element;return a.each(["min","max","step"],function(a,e){var g=d.attr(e);g!==void 0&&g.length&&(b[e]=g)}),b},_events:{keydown:function(a){this._start(a)&&this._keydown(a)&&a.preventDefault()},keyup:"_stop",
1096focus:function(){this.previous=this.element.val()},blur:function(a){if(this.cancelBlur)delete this.cancelBlur;else{this._refresh();this.previous!==this.element.val()&&this._trigger("change",a)}},mousewheel:function(a,b){if(b){if(!this.spinning&&!this._start(a))return false;this._spin((b>0?1:-1)*this.options.step,a);clearTimeout(this.mousewheelTimer);this.mousewheelTimer=this._delay(function(){this.spinning&&this._stop(a)},100);a.preventDefault()}},"mousedown .ui-spinner-button":function(b){function d(){this.element[0]===
1097this.document[0].activeElement||(this.element.focus(),this.previous=f,this._delay(function(){this.previous=f}))}var f;f=this.element[0]===this.document[0].activeElement?this.previous:this.element.val();b.preventDefault();d.call(this);this.cancelBlur=true;this._delay(function(){delete this.cancelBlur;d.call(this)});this._start(b)!==false&&this._repeat(null,a(b.currentTarget).hasClass("ui-spinner-up")?1:-1,b)},"mouseup .ui-spinner-button":"_stop","mouseenter .ui-spinner-button":function(b){if(a(b.currentTarget).hasClass("ui-state-active")){if(this._start(b)===
1098false)return false;this._repeat(null,a(b.currentTarget).hasClass("ui-spinner-up")?1:-1,b)}},"mouseleave .ui-spinner-button":"_stop"},_draw:function(){var a=this.uiSpinner=this.element.addClass("ui-spinner-input").attr("autocomplete","off").wrap(this._uiSpinnerHtml()).parent().append(this._buttonHtml());this.element.attr("role","spinbutton");this.buttons=a.find(".ui-spinner-button").attr("tabIndex",-1).button().removeClass("ui-corner-all");this.buttons.height()>Math.ceil(a.height()*0.5)&&a.height()>
10990&&a.height(a.height());this.options.disabled&&this.disable()},_keydown:function(b){var d=this.options,f=a.ui.keyCode;switch(b.keyCode){case f.UP:return this._repeat(null,1,b),true;case f.DOWN:return this._repeat(null,-1,b),true;case f.PAGE_UP:return this._repeat(null,d.page,b),true;case f.PAGE_DOWN:return this._repeat(null,-d.page,b),true}return false},_uiSpinnerHtml:function(){return"<span class='ui-spinner ui-widget ui-widget-content ui-corner-all'></span>"},_buttonHtml:function(){return"<a class='ui-spinner-button ui-spinner-up ui-corner-tr'><span class='ui-icon "+
1100this.options.icons.up+"'>&#9650;</span></a><a class='ui-spinner-button ui-spinner-down ui-corner-br'><span class='ui-icon "+this.options.icons.down+"'>&#9660;</span></a>"},_start:function(a){return!this.spinning&&this._trigger("start",a)===false?false:(this.counter||(this.counter=1),this.spinning=true,true)},_repeat:function(a,b,f){a=a||500;clearTimeout(this.timer);this.timer=this._delay(function(){this._repeat(40,b,f)},a);this._spin(b*this.options.step,f)},_spin:function(a,b){var f=this.value()||
11010;this.counter||(this.counter=1);f=this._adjustValue(f+a*this._increment(this.counter));if(!this.spinning||this._trigger("spin",b,{value:f})!==false){this._value(f);this.counter++}},_increment:function(b){var d=this.options.incremental;return d?a.isFunction(d)?d(b):Math.floor(b*b*b/5E4-b*b/500+17*b/200+1):1},_precision:function(){var a=this._precisionOf(this.options.step);return this.options.min!==null&&(a=Math.max(a,this._precisionOf(this.options.min))),a},_precisionOf:function(a){var a=a.toString(),
1102b=a.indexOf(".");return b===-1?0:a.length-b-1},_adjustValue:function(a){var b,f,e=this.options;return b=e.min!==null?e.min:0,f=a-b,f=Math.round(f/e.step)*e.step,a=b+f,a=parseFloat(a.toFixed(this._precision())),e.max!==null&&a>e.max?e.max:e.min!==null&&a<e.min?e.min:a}
1102,_stop:function(a){if(this.spinning){clearTimeout(this.timer);clearTimeout(this.mousewheelTimer);this.counter=0;this.spinning=false;this._trigger("stop",a)}},_setOption:function(a,b){if(a==="culture"||a==="numberFormat"){var f=this._parse(this.element.val());
1103this.options[a]=b;this.element.val(this._format(f))}else{(a==="max"||a==="min"||a==="step")&&typeof b=="string"&&(b=this._parse(b));this._super(a,b);a==="disabled"&&(b?(this.element.prop("disabled",true),this.buttons.button("disable")):(this.element.prop("disabled",false),this.buttons.button("enable")))}},_setOptions:b(function(a){this._super(a);this._value(this.element.val())}),_parse:function(a){return typeof a=="string"&&a!==""&&(a=window.Globalize&&this.options.numberFormat?Globalize.parseFloat(a,
110410,this.options.culture):+a),a===""||isNaN(a)?null:a},_format:function(a){return a===""?"":window.Globalize&&this.options.numberFormat?Globalize.format(a,this.options.numberFormat,this.options.culture):a},_refresh:function(){this.element.attr({"aria-valuemin":this.options.min,"aria-valuemax":this.options.max,"aria-valuenow":this._parse(this.element.val())})},_value:function(a,b){var f;a!==""&&(f=this._parse(a),f!==null&&(b||(f=this._adjustValue(f)),a=this._format(f)));this.element.val(a);this._refresh()},
1105_destroy:function(){this.element.removeClass("ui-spinner-input").prop("disabled",false).removeAttr("autocomplete").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow");this.uiSpinner.replaceWith(this.element)},stepUp:b(function(a){this._stepUp(a)}),_stepUp:function(a){this._spin((a||1)*this.options.step)},stepDown:b(function(a){this._stepDown(a)}),_stepDown:function(a){this._spin((a||1)*-this.options.step)},pageUp:b(function(a){this._stepUp((a||1)*
1106this.options.page)}),pageDown:b(function(a){this._stepDown((a||1)*this.options.page)}),value:function(a){if(!arguments.length)return this._parse(this.element.val());b(this._value).call(this,a)},widget:function(){return this.uiSpinner}})})(jQuery);
1107(function(a,b){function c(a){return a.hash.length>1&&a.href.replace(f,"")===location.href.replace(f,"")}var d=0,f=/#.*$/;a.widget("ui.tabs",{version:"1.9.1",delay:300,options:{active:null,collapsible:false,event:"click",heightStyle:"content",hide:null,show:null,activate:null,beforeActivate:null,beforeLoad:null,load:null},_create:function(){var b=this,c=this.options,d=c.active,f=location.hash.substring(1);this.running=false;this.element.addClass("ui-tabs ui-widget ui-widget-content ui-corner-all").toggleClass("ui-tabs-collapsible",
1108c.collapsible).delegate(".ui-tabs-nav > li","mousedown"+this.eventNamespace,function(b){a(this).is(".ui-state-disabled")&&b.preventDefault()}).delegate(".ui-tabs-anchor","focus"+this.eventNamespace,function(){a(this).closest("li").is(".ui-state-disabled")&&this.blur()});this._processTabs();if(d===null){f&&this.tabs.each(function(b,c){if(a(c).attr("aria-controls")===f)return d=b,false});d===null&&(d=this.tabs.index(this.tabs.filter(".ui-tabs-active")));if(d===null||d===-1)d=this.tabs.length?0:false}d!==
1109false&&(d=this.tabs.index(this.tabs.eq(d)),d===-1&&(d=c.collapsible?false:0));c.active=d;!c.collapsible&&c.active===false&&this.anchors.length&&(c.active=0);a.isArray(c.disabled)&&(c.disabled=a.unique(c.disabled.concat(a.map(this.tabs.filter(".ui-state-disabled"),function(a){return b.tabs.index(a)}))).sort());this.options.active!==false&&this.anchors.length?this.active=this._findActive(this.options.active):this.active=a();this._refresh();this.active.length&&this.load(c.active)},_getCreateEventData:function(){return{tab:this.active,
1110panel:this.active.length?this._getPanelForTab(this.active):a()}},_tabKeydown:function(b){var c=a(this.document[0].activeElement).closest("li"),d=this.tabs.index(c),f=true;if(!this._handlePageNav(b)){switch(b.keyCode){case a.ui.keyCode.RIGHT:case a.ui.keyCode.DOWN:d++;break;case a.ui.keyCode.UP:case a.ui.keyCode.LEFT:f=false;d--;break;case a.ui.keyCode.END:d=this.anchors.length-1;break;case a.ui.keyCode.HOME:d=0;break;case a.ui.keyCode.SPACE:b.preventDefault();clearTimeout(this.activating);this._activate(d);
1111return;case a.ui.keyCode.ENTER:b.preventDefault();clearTimeout(this.activating);this._activate(d===this.options.active?false:d);return;default:return}b.preventDefault();clearTimeout(this.activating);d=this._focusNextTab(d,f);b.ctrlKey||(c.attr("aria-selected","false"),this.tabs.eq(d).attr("aria-selected","true"),this.activating=this._delay(function(){this.option("active",d)},this.delay))}},_panelKeydown:function(b){this._handlePageNav(b)||b.ctrlKey&&b.keyCode===a.ui.keyCode.UP&&(b.preventDefault(),
1112this.active.focus())},_handlePageNav:function(b){if(b.altKey&&b.keyCode===a.ui.keyCode.PAGE_UP)return this._activate(this._focusNextTab(this.options.active-1,false)),true;if(b.altKey&&b.keyCode===a.ui.keyCode.PAGE_DOWN)return this._activate(this._focusNextTab(this.options.active+1,true)),true},_findNextTab:function(b,c){for(var d=this.tabs.length-1;a.inArray((b>d&&(b=0),b<0&&(b=d),b),this.options.disabled)!==-1;)b=c?b+1:b-1;return b},_focusNextTab:function(a,b){return a=this._findNextTab(a,b),this.tabs.eq(a).focus(),
1113a},_setOption:function(a,b){if(a==="active")this._activate(b);else if(a==="disabled")this._setupDisabled(b);else{this._super(a,b);a==="collapsible"&&(this.element.toggleClass("ui-tabs-collapsible",b),!b&&this.options.active===false&&this._activate(0));a==="event"&&this._setupEvents(b);a==="heightStyle"&&this._setupHeightStyle(b)}},_tabId:function(a){return a.attr("aria-controls")||"ui-tabs-"+ ++d},_sanitizeSelector:function(a){return a?a.replace(/[!"$%&'()*+,.\/:;<=>?@\[\]\^`{|}~]/g,"\\$&"):""},refresh:function(){var b=
1114this.options,c=this.tablist.children(":has(a[href])");b.disabled=a.map(c.filter(".ui-state-disabled"),function(a){return c.index(a)});this._processTabs();b.active===false||!this.anchors.length?(b.active=false,this.active=a()):this.active.length&&!a.contains(this.tablist[0],this.active[0])?this.tabs.length===b.disabled.length?(b.active=false,this.active=a()):this._activate(this._findNextTab(Math.max(0,b.active-1),false)):b.active=this.tabs.index(this.active);this._refresh()},_refresh:function(){this._setupDisabled(this.options.disabled);
1115this._setupEvents(this.options.event);this._setupHeightStyle(this.options.heightStyle);this.tabs.not(this.active).attr({"aria-selected":"false",tabIndex:-1});this.panels.not(this._getPanelForTab(this.active)).hide().attr({"aria-expanded":"false","aria-hidden":"true"});this.active.length?(this.active.addClass("ui-tabs-active ui-state-active").attr({"aria-selected":"true",tabIndex:0}),this._getPanelForTab(this.active).show().attr({"aria-expanded":"true","aria-hidden":"false"})):this.tabs.eq(0).attr("tabIndex",
11160)},_processTabs:function(){var b=this;this.tablist=this._getList().addClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all").attr("role","tablist");this.tabs=this.tablist.find("> li:has(a[href])").addClass("ui-state-default ui-corner-top").attr({role:"tab",tabIndex:-1});this.anchors=this.tabs.map(function(){return a("a",this)[0]}).addClass("ui-tabs-anchor").attr({role:"presentation",tabIndex:-1});this.panels=a();this.anchors.each(function(d,f){var i,j,k,l=a(f).uniqueId().attr("id"),
1117n=a(f).closest("li"),p=n.attr("aria-controls");c(f)?(i=f.hash,j=b.element.find(b._sanitizeSelector(i))):(k=b._tabId(n),i="#"+k,j=b.element.find(i),j.length||(j=b._createPanel(k),j.insertAfter(b.panels[d-1]||b.tablist)),j.attr("aria-live","polite"));j.length&&(b.panels=b.panels.add(j));p&&n.data("ui-tabs-aria-controls",p);n.attr({"aria-controls":i.substring(1),"aria-labelledby":l});j.attr("aria-labelledby",l)});this.panels.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").attr("role","tabpanel")},
1118_getList:function(){return this.element.find("ol,ul").eq(0)},_createPanel:function(b){return a("<div>").attr("id",b).addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").data("ui-tabs-destroy",true)},_setupDisabled:function(b){a.isArray(b)&&(b.length?b.length===this.anchors.length&&(b=true):b=false);for(var c=0,d;d=this.tabs[c];c++)b===true||a.inArray(c,b)!==-1?a(d).addClass("ui-state-disabled").attr("aria-disabled","true"):a(d).removeClass("ui-state-disabled").removeAttr("aria-disabled");
1119this.options.disabled=b},_setupEvents:function(b){var c={click:function(a){a.preventDefault()}};b&&a.each(b.split(" "),function(a,b){c[b]="_eventHandler"});this._off(this.anchors.add(this.tabs).add(this.panels));this._on(this.anchors,c);this._on(this.tabs,{keydown:"_tabKeydown"});this._on(this.panels,{keydown:"_panelKeydown"});this._focusable(this.tabs);this._hoverable(this.tabs)},_setupHeightStyle:function(b){var c,d,f=this.element.parent();b==="fill"?(a.support.minHeight||(d=f.css("overflow"),f.css("overflow",
1120"hidden")),c=f.height(),this.element.siblings(":visible").each(function(){var b=a(this),d=b.css("position");d==="absolute"||d==="fixed"||(c=c-b.outerHeight(true))}),d&&f.css("overflow",d),this.element.children().not(this.panels).each(function(){c=c-a(this).outerHeight(true)}),this.panels.each(function(){a(this).height(Math.max(0,c-a(this).innerHeight()+a(this).height()))}).css("overflow","auto")):b==="auto"&&(c=0,this.panels.each(function(){c=Math.max(c,a(this).height("").height())}).height(c))},
1121_eventHandler:function(b){var c=this.options,d=this.active,f=a(b.currentTarget).closest("li"),j=f[0]===d[0],k=j&&c.collapsible,l=k?a():this._getPanelForTab(f),n=d.length?this._getPanelForTab(d):a(),d={oldTab:d,oldPanel:n,newTab:k?a():f,newPanel:l};b.preventDefault();if(!f.hasClass("ui-state-disabled")&&!f.hasClass("ui-tabs-loading")&&!this.running&&!(j&&!c.collapsible||this._trigger("beforeActivate",b,d)===false)){c.active=k?fal
1121se:this.tabs.index(f);this.active=j?a():f;this.xhr&&this.xhr.abort();
1122!n.length&&!l.length&&a.error("jQuery UI Tabs: Mismatching fragment identifier.");l.length&&this.load(this.tabs.index(f),b);this._toggle(b,d)}},_toggle:function(b,c){function d(){j.running=false;j._trigger("activate",b,c)}function f(){c.newTab.closest("li").addClass("ui-tabs-active ui-state-active");k.length&&j.options.show?j._show(k,j.options.show,d):(k.show(),d())}var j=this,k=c.newPanel,l=c.oldPanel;this.running=true;l.length&&this.options.hide?this._hide(l,this.options.hide,function(){c.oldTab.closest("li").removeClass("ui-tabs-active ui-state-active");
1123f()}):(c.oldTab.closest("li").removeClass("ui-tabs-active ui-state-active"),l.hide(),f());l.attr({"aria-expanded":"false","aria-hidden":"true"});c.oldTab.attr("aria-selected","false");k.length&&l.length?c.oldTab.attr("tabIndex",-1):k.length&&this.tabs.filter(function(){return a(this).attr("tabIndex")===0}).attr("tabIndex",-1);k.attr({"aria-expanded":"true","aria-hidden":"false"});c.newTab.attr({"aria-selected":"true",tabIndex:0})},_activate:function(b){b=this._findActive(b);if(b[0]!==this.active[0]){b.length||
1124(b=this.active);b=b.find(".ui-tabs-anchor")[0];this._eventHandler({target:b,currentTarget:b,preventDefault:a.noop})}},_findActive:function(b){return b===false?a():this.tabs.eq(b)},_getIndex:function(a){return typeof a=="string"&&(a=this.anchors.index(this.anchors.filter("[href$='"+a+"']"))),a},_destroy:function(){this.xhr&&this.xhr.abort();this.element.removeClass("ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible");this.tablist.removeClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all").removeAttr("role");
1125this.anchors.removeClass("ui-tabs-anchor").removeAttr("role").removeAttr("tabIndex").removeData("href.tabs").removeData("load.tabs").removeUniqueId();this.tabs.add(this.panels).each(function(){a.data(this,"ui-tabs-destroy")?a(this).remove():a(this).removeClass("ui-state-default ui-state-active ui-state-disabled ui-corner-top ui-corner-bottom ui-widget-content ui-tabs-active ui-tabs-panel").removeAttr("tabIndex").removeAttr("aria-live").removeAttr("aria-busy").removeAttr("aria-selected").removeAttr("aria-labelledby").removeAttr("aria-hidden").removeAttr("aria-expanded").removeAttr("role")});
1126this.tabs.each(function(){var b=a(this),c=b.data("ui-tabs-aria-controls");c?b.attr("aria-controls",c):b.removeAttr("aria-controls")});this.options.heightStyle!=="content"&&this.panels.css("height","")},enable:function(c){var d=this.options.disabled;if(d!==false){c===b?d=false:(c=this._getIndex(c),a.isArray(d)?d=a.map(d,function(a){return a!==c?a:null}):d=a.map(this.tabs,function(a,b){return b!==c?b:null}));this._setupDisabled(d)}},disable:function(c){var d=this.options.disabled;if(d!==true){if(c===
1127b)d=true;else{c=this._getIndex(c);if(a.inArray(c,d)!==-1)return;a.isArray(d)?d=a.merge([c],d).sort():d=[c]}this._setupDisabled(d)}},load:function(b,d){var b=this._getIndex(b),f=this,i=this.tabs.eq(b),j=i.find(".ui-tabs-anchor"),k=this._getPanelForTab(i),l={tab:i,panel:k};if(!c(j[0]))(this.xhr=a.ajax(this._ajaxSettings(j,d,l)))&&this.xhr.statusText!=="canceled"&&(i.addClass("ui-tabs-loading"),k.attr("aria-busy","true"),this.xhr.success(function(a){setTimeout(function(){k.html(a);f._trigger("load",
1128d,l)},1)}).complete(function(a,b){setTimeout(function(){b==="abort"&&f.panels.stop(false,true);i.removeClass("ui-tabs-loading");k.removeAttr("aria-busy");a===f.xhr&&delete f.xhr},1)}))},_ajaxSettings:function(b,c,d){var f=this;return{url:b.attr("href"),beforeSend:function(b,e){return f._trigger("beforeLoad",c,a.extend({jqXHR:b,ajaxSettings:e},d))}}},_getPanelForTab:function(b){return this.element.find(this._sanitizeSelector("#"+a(b).attr("aria-controls")))}});a.uiBackCompat!==false&&(a.ui.tabs.prototype._ui=
1129function(a,b){return{tab:a,panel:b,index:this.anchors.index(a)}},a.widget("ui.tabs",a.ui.tabs,{url:function(a,b){this.anchors.eq(a).attr("href",b)}}),a.widget("ui.tabs",a.ui.tabs,{options:{ajaxOptions:null,cache:false},_create:function(){this._super();var b=this;this._on({tabsbeforeload:function(c,d){a.data(d.tab[0],"cache.tabs")?c.preventDefault():d.jqXHR.success(function(){b.options.cache&&a.data(d.tab[0],"cache.tabs",true)})}})},_ajaxSettings:function(b,c,d){var f=this.options.ajaxOptions;return a.extend({},
1130f,{error:function(a,b){try{f.error(a,b,d.tab.closest("li").index(),d.tab[0])}catch(c){}}},this._superApply(arguments))},_setOption:function(a,b){a==="cache"&&b===false&&this.anchors.removeData("cache.tabs");this._super(a,b)},_destroy:function(){this.anchors.removeData("cache.tabs");this._super()},url:function(a){this.anchors.eq(a).removeData("cache.tabs");this._superApply(arguments)}}),a.widget("ui.tabs",a.ui.tabs,{abort:function(){this.xhr&&this.xhr.abort()}}),a.widget("ui.tabs",a.ui.tabs,{options:{spinner:"<em>Loading&#8230;</em>"},
1131_create:function(){this._super();this._on({tabsbeforeload:function(a,b){if(a.target===this.element[0]&&this.options.spinner){var c=b.tab.find("span"),d=c.html();c.html(this.options.spinner);b.jqXHR.complete(function(){c.html(d)})}}})}}),a.widget("ui.tabs",a.ui.tabs,{options:{enable:null,disable:null},enable:function(b){var c=this.options,d;if(b&&c.disabled===true||a.isArray(c.disabled)&&a.inArray(b,c.disabled)!==-1)d=true;this._superApply(arguments);d&&this._trigger("enable",null,this._ui(this.anchors[b],
1132this.panels[b]))},disable:function(b){var c=this.options,d;if(b&&c.disabled===false||a.isArray(c.disabled)&&a.inArray(b,c.disabled)===-1)d=true;this._superApply(arguments);d&&this._trigger("disable",null,this._ui(this.anchors[b],this.panels[b]))}}),a.widget("ui.tabs",a.ui.tabs,{options:{add:null,remove:null,tabTemplate:"<li><a href='#{href}'><span>#{label}</span></a></li>"},add:function(c,d,f){f===b&&(f=this.anchors.length);var i,j,k=this.options,d=a(k.tabTemplate.replace(/#\{href\}/g,c).replace(/#\{label\}/g,
1133d)),c=c.indexOf("#")?this._tabId(d):c.replace("#","");return d.addClass("ui-state-default ui-corner-top").data("ui-tabs-destroy",true),d.attr("aria-controls",c),i=f>=this.tabs.length,j=this.element.find("#"+c),j.length||(j=this._createPanel(c),i?f>0?j.insertAfter(this.panels.eq(-1)):j.appendTo(this.element):j.insertBefore(this.panels[f])),j.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").hide(),i?d.appendTo(this.tablist):d.insertBefore(this.tabs[f]),k.disabled=a.map(k.disabled,function(a){return a>=
1134f?++a:a}),this.refresh(),this.tabs.length===1&&k.active===false&&this.option("active",0),this._trigger("add",null,this._ui(this.anchors[f],this.panels[f])),this},remove:function(b){var b=this._getIndex(b),c=this.options,d=this.tabs.eq(b).remove(),f=this._getPanelForTab(d).remove();return d.hasClass("ui-tabs-active")&&this.anchors.length>2&&this._activate(b+(b+1<this.anchors.length?1:-1)),c.disabled=a.map(a.grep(c.disabled,function(a){return a!==b}),function(a){return a>=b?--a:a}),this.refresh(),this._trigger("remove",
1135null,this._ui(d.find("a")[0],f[0])),this}}),a.widget("ui.tabs",a.ui.tabs,{length:function(){return this.anchors.length}}),a.widget("ui.tabs",a.ui.tabs,{options:{idPrefix:"ui-tabs-"},_tabId:function(b){b=b.is("li")?b.find("a[href]"):b;return b=b[0],a(b).closest("li").attr("aria-controls")||b.title&&b.title.replace(/\s/g,"_").replace(/[^\w\u00c0-\uFFFF\-]/g,"")||this.options.idPrefix+ ++d}}),a.widget("ui.tabs",a.ui.tabs,{options:{panelTemplate:"<div></div>"},_createPanel:function(b){return a(this.options.panelTemplate).attr("id",
1136b).addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").data("ui-tabs-destroy",true)}}),a.widget("ui.tabs",a.ui.tabs,{_create:function(){var a=this.options;a.active===null&&a.selected!==b&&(a.active=a.selected===-1?false:a.selected);this._super();a.selected=a.active;a.selected===false&&(a.selected=-1)},_setOption:function(a,b){if(a!=="selected")return this._super(a,b);var c=this.options;this._super("active",b===-1?false:b);c.selected=c.active;c.selected===false&&(c.selected=-1)},_eventHandler:function(){this._superApply(arguments);
1137this.options.selected=this.options.active;this.options.selected===false&&(this.options.selected=-1)}}),a.widget("ui.tabs",a.ui.tabs,{options:{show:null,select:null},_create:function(){this._super();this.options.active!==false&&this._trigger("show",null,this._ui(this.active.find(".ui-tabs-anchor")[0],this._getPanelForTab(this.active)[0]))},_trigger:function(a,b,c){var d=this._superApply(arguments);return d?(a==="beforeActivate"&&c.newTab.length?d=this._super("select",b,{tab:c.newTab.find(".ui-tabs-anchor")[0],
1138panel:c.newPanel[0],index:c.newTab.closest("li").index()}):a==="activate"&&c.newTab.length&&(d=this._super("show",b,{tab:c.newTab.find(".ui-tabs-anchor")[0],panel:c.newPanel[0],index:c.newTab.closest("li").index()})),d):false}}),a.widget("ui.tabs",a.ui.tabs,{select:function(a){a=this._getIndex(a);if(a===-1){if(!this.options.collapsible||this.options.selected===-1)return;a=this.options.selected}this.anchors.eq(a).trigger(this.options.event+this.eventNamespace)}}),function(){var b=0;a.widget("ui.tabs",
1139a.ui.tabs,{options:{cookie:null},_create:function(){var a=this.options,b;a.active==null&&a.cookie&&(b=parseInt(this._cookie(),10),b===-1&&(b=false),a.active=b);this._super()},_cookie:function(c){var d=[this.cookie||(this.cookie=this.options.cookie.name||"ui-tabs-"+ ++b)];return arguments.length&&(d.push(c===false?-1:c),d.push(this.options.cookie)),a.cookie.apply(null,d)},_refresh:function(){this._super();this.options.cookie&&this._cookie(this.options.active,this.options.cookie)},_eventHandler:function(){this._superApply(arguments);
1140this.options.cookie&&this._cookie(this.options.active,this.options.cookie)},_destroy:function(){this._super();this.options.cookie&&this._cookie(null,this.options.cookie)}})}(),a.widget("ui.tabs",a.ui.tabs,{_trigger:function(b,c,d){d=a.extend({},d);return b==="load"&&(d.panel=d.panel[0],d.tab=d.tab.find(".ui-tabs-anchor")[0]),this._super(b,c,d)}}),a.widget("ui.tabs",a.ui.tabs,{options:{fx:null},_getFx:function(){var b,c,d=this.options.fx;return d&&(a.isArray(d)?(b=d[0],c=d[1]):b=c=d),d?{show:c,hide:b}:
1141null},_toggle:function(a,b){function c(){f.running=false;f._trigger("activate",a,b)}function d(){b.newTab.closest("li").addClass("ui-tabs-active ui-state-active");k.length&&n.show?k.animate(n.show,n.show.duration,function(){c()}):(k.show(),c())}var f=this,k=b.newPanel,l=b.oldPanel,n=this._getFx();if(!n)return this._super(a,b);f.running=true;l.length&&n.hide?l.animate(n.hide,n.hide.duration,function(){b.oldTab.closest("li").removeClass("ui-tabs-active ui-state-active");d()}):(b.oldTab.closest("li").removeClass("ui-tabs-active ui-state-active"),
1142l.hide(),d())}}))})(jQuery);
1143(function(a){function b(b,c){var d=(b.attr("aria-describedby")||"").split(/\s+/);d.push(c);b.data("ui-tooltip-id",c).attr("aria-describedby",a.trim(d.join(" ")))}function c(b){var c=b.data("ui-tooltip-id"),d=(b.attr("aria-describedby")||"").split(/\s+/),c=a.inArray(c,d);c!==-1&&d.splice(c,1);b.removeData("ui-tooltip-id");(d=a.trim(d.join(" ")))?b.attr("aria-describedby",d):b.removeAttr("aria-describedby")}var d=0;a.widget("ui.tooltip",{version:"1.9.1",options:{content:function(){return a(this).attr("title")},hide:true,
1144items:"[title]:not([disabled])",position:{my:"left top+15",at:"left bottom",collision:"flipfit flipfit"},show:true,tooltipClass:null,track:false,close:null,open:null},_create:function(){this._on({mouseover:"open",focusin:"open"});this.tooltips={};this.parents={};this.options.disabled&&this._disable()},_setOption:function(b,c){var d=this;if(b==="disabled"){this[c?"_disable":"_enable"]();this.options[b]=c}else{this._super(b,c);b==="content"&&a.each(this.tooltips,function(a,b){d._updateContent(b)})}},
1145_disable:function(){var b=this;a.each(this.tooltips,function(c,d){var h=a.Event("blur");h.target=h.currentTarget=d[0];b.close(h,true)});this.element.find(this.options.items).andSelf().each(function(){var b=a(this);b.is("[title]")&&b.data("ui-tooltip-title",b.attr("title")).attr("title","")})},_enable:function(){this.element.find(this.options.items).andSelf().each(function(){var b=a(this);b.data("ui-tooltip-title")&&b.attr("title",b.data("ui-tooltip-title"))})},open:function(b){var c=this,d=a(b?b.target:
1146this.element).closest(this.options.items);if(d.length)if(this.options.track&&d.data("ui-tooltip-id")){this._find(d).position(a.extend({of:d},this.options.position));this._off(this.document,"mousemove")}else{d.attr("title")&&d.data("ui-tooltip-title",d.attr("title"));d.data("tooltip-open",true);b&&b.type==="mouseover"&&d.parents().each(function(){var b;a(this).data("tooltip-open")&&(b=a.Event("blur"),b.target=b.currentTarget=this,c.close(b,true));this.title&&(a(this).uniqueId(),c.parents[this.id]=
1147{element:this,title:this.title},this.title="")});this._updateContent(d,b)}},_updateContent:function(a,b){var c;c=this.options.content;var d=this;if(typeof c=="string")return this._open(b,a,c);(c=c.call(a[0],function(c){a.data("tooltip-open")&&d._delay(function(){this._open(b,a,c)})}))&&this._open(b,a,c)},_open:function(c,d,g){function h(a){k.of=a;i.is(":hidden")||i.position(k)}var i,j,k=a.extend({},this.options.position);if(g){i=this._find(d);if(i.length)i.find(".ui-tooltip-content").html(g);else{d.is("[title]")&&
1148(c&&c.type==="mouseover"?d.attr("title",""):d.removeAttr("title"));i=this._tooltip(d);b(d,i.attr("id"));i.find(".ui-tooltip-content").html(g);this.options.track&&c&&/^mouse/.test(c.originalEvent.type)?(this._on(this.document,{mousemove:h}),h(c)):i.position(a.extend({of:d},this.options.position));i.hide();this._show(i,this.options.show);this.options.show&&this.options.show.delay&&(j=setInterval(function(){i.is(":visible")&&(h(k.of),clearInterval(j))},a.fx.interval));this._trigger("open",c,{tooltip:i});
1149g={keyup:function(b){if(b.keyCode===a.ui.keyCode.ESCAPE){b=a.Event(b);b.currentTarget=d[0];this.close(b,true)}},remove:function(){this._removeTooltip(i)}};if(!c||c.type==="mouseover")g.mouseleave="close";if(!c||c.type==="focusin")g.focusout="close";this._on(d,g)}}},close:function(b){var d=this,g=a(b?b.currentTarget:this.element),h=this._find(g);
1149if(!this.closing){g.data("ui-tooltip-title")&&g.attr("title",g.data("ui-tooltip-title"));c(g);h.stop(true);this._hide(h,this.options.hide,function(){d._removeTooltip(a(this))});
1150g.removeData("tooltip-open");this._off(g,"mouseleave focusout keyup");g[0]!==this.element[0]&&this._off(g,"remove");this._off(this.document,"mousemove");b&&b.type==="mouseleave"&&a.each(this.parents,function(a,b){b.element.title=b.title;delete d.parents[a]});this.closing=true;this._trigger("close",b,{tooltip:h});this.closing=false}},_tooltip:function(b){var c="ui-tooltip-"+d++,g=a("<div>").attr({id:c,role:"tooltip"}).addClass("ui-tooltip ui-widget ui-corner-all ui-widget-content "+(this.options.tooltipClass||
1151""));return a("<div>").addClass("ui-tooltip-content").appendTo(g),g.appendTo(this.document[0].body),a.fn.bgiframe&&g.bgiframe(),this.tooltips[c]=b,g},_find:function(b){return(b=b.data("ui-tooltip-id"))?a("#"+b):a()},_removeTooltip:function(a){a.remove();delete this.tooltips[a.attr("id")]},_destroy:function(){var b=this;a.each(this.tooltips,function(c,d){var h=a.Event("blur");h.target=h.currentTarget=d[0];b.close(h,true);a("#"+c).remove();d.data("ui-tooltip-title")&&(d.attr("title",d.data("ui-tooltip-title")),
1152d.removeData("ui-tooltip-title"))})}})})(jQuery);
1153Blocks={showMarked:!1,images:{"/ide/imgs/play.png":null,"/ide/imgs/button-cw.png":null,"/ide/imgs/button-ccw.png":null,"/ide/imgs/button-add.png":null,"/ide/imgs/button-remove.png":null,"/ide/imgs/button-edit.png":null,"/ide/imgs/button-grass.png":null,"/ide/imgs/button-js.png":null,"/ide/imgs/button-drone.png":null,"/ide/imgs/button-ollie.png":null,"/ide/imgs/button-jumpingsumo.png":null,"/ide/imgs/button-hue.png":null,"/ide/imgs/button-sphero.png":null,"/ide/imgs/button-wedo2.png":null,"/ide/imgs/button-microbit.png":null,
1154"/ide/imgs/button-hifive.png":null},encoded:{"/ide/imgs/play.png":"data:image/png;base64,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RYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iWE1QIENvcmUgNS4xLjIiPgogICA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPgogICAgICA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIgogICAgICAgICAgICB4bWxuczp0aWZmPSJodHRwOi8vbnMuYWRvYmUuY29tL3RpZmYvMS4wLyI+CiAgICAgICAgIDx0aWZmOlJlc29sdXRpb25Vbml0PjE8L3RpZmY6UmVzb2x1dGlvblVuaXQ+CiAgICAgICAgIDx0aWZmOkNvbXByZXNzaW9uPjU8L3RpZmY6Q29tcHJlc3Npb24+CiAgICAgICAgIDx0aWZmOlhSZXNvbHV0aW9uPjcyPC90aWZmOlhSZXNvbHV0aW9uPgogICAgICAgICA8dGlmZjpPcmllbnRhdGlvbj4xPC90aWZmOk9yaWVudGF0aW9uPgogICAgICAgICA8dGlmZjpZUmVzb2x1dGlvbj43MjwvdGlmZjpZUmVzb2x1dGlvbj4KICAgICAgPC9yZGY6RGVzY3JpcHRpb24+CiAgICAgIDxyZGY6RGVzY3JpcHRpb24gcmRmOmFib3V0PSIiCiAgICAgICAgICAgIHhtbG5zOmV4aWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20vZXhpZi8xLjAvIj4KICAgICAgICAgPGV4aWY6UGl4ZWxYRGltZW5zaW9uPjIwPC9leGlmOlBpeGVsWERpbWVuc2lvbj4KICAgICAgICAgPGV4aWY6Q29sb3JTcGFjZT4xPC9leGlmOkNvbG9yU3BhY2U+CiAgICAgICAgIDxleGlmOlBpeGVsWURpbWVuc2lvbj4xODwvZXhpZjpQaXhlbFlEaW1lbnNpb24+CiAgICAgIDwvcmRmOkRlc2NyaXB0aW9uPgogICAgICA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIgogICAgICAgICAgICB4bWxuczpkYz0iaHR0cDovL3B1cmwub3JnL2RjL2VsZW1lbnRzLzEuMS8iPgogICAgICAgICA8ZGM6c3ViamVjdD4KICAgICAgICAgICAgPHJkZjpCYWcvPgogICAgICAgICA8L2RjOnN1YmplY3Q+CiAgICAgIDwvcmRmOkRlc2NyaXB0aW9uPgogICAgICA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIgogICAgICAgICAgICB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iPgogICAgICAgICA8eG1wOk1vZGlmeURhdGU+MjAxMy0wNC0wOFQxMTowNDo4MTwveG1wOk1vZGlmeURhdGU+CiAgICAgICAgIDx4bXA6Q3JlYXRvclRvb2w+UGl4ZWxtYXRvciAyLjEuNDwveG1wOkNyZWF0b3JUb29sPgogICAgICA8L3JkZjpEZXNjcmlwdGlvbj4KICAgPC9yZGY6UkRGPgo8L3g6eG1wbWV0YT4KREUfkgAAAStJREFUOBFj/P//PwM1ARM1DQOZxYJu4Myz6VcZGf5zA13e/GLrnPn19f//oavBx2dE9/Kss+nIYXAZqLkkzXjmLnyGIMsR8rIuUPHOmWfSdk0/maqHrBEXm5CBYH2MjIyuzCyMF2adSZs75WiyFC7DQOKEvIxN77f/DP97/n7+0J3lsOoLugKiXIimiYuRgbGOmUfw9qwzqWmNBxxRIpYcA8HmMzIySDAwMs2U5FXbj2wh2QbCDfn//y+cDWRQYuDz////pTzfOtsJ2UAU/yNL4Gb//8rw/3/3p3c/e0rcFn1lMJmNopRoA4Gp/R/QoPnAJFSbZjLrOYopSByiDAQmk53AmC0FGgTKOXgBIQPBWS/deBbRWQ/DQKDXrlG1cMDrHyIkKUk2WI0HABo8bWocTSMAAAAAAElFTkSuQmCC",
1155"/ide/imgs/button-cw.png":"data:image/png;base64,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",
1156"/ide/imgs/button-ccw.png":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAD4AAAA+CAYAAABzwahEAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAALEwAACxMBAJqcGAAABCRpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IlhNUCBDb3JlIDUuNC4wIj4KICAgPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4KICAgICAgPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIKICAgICAgICAgICAgeG1sbnM6dGlmZj0iaHR0cDovL25zLmFkb2JlLmNvbS90aWZmLzEuMC8iCiAgICAgICAgICAgI
1156HhtbG5zOmV4aWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20vZXhpZi8xLjAvIgogICAgICAgICAgICB4bWxuczpkYz0iaHR0cDovL3B1cmwub3JnL2RjL2VsZW1lbnRzLzEuMS8iCiAgICAgICAgICAgIHhtbG5zOnhtcD0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wLyI+CiAgICAgICAgIDx0aWZmOlJlc29sdXRpb25Vbml0PjI8L3RpZmY6UmVzb2x1dGlvblVuaXQ+CiAgICAgICAgIDx0aWZmOkNvbXByZXNzaW9uPjU8L3RpZmY6Q29tcHJlc3Npb24+CiAgICAgICAgIDx0aWZmOlhSZXNvbHV0aW9uPjcyPC90aWZmOlhSZXNvbHV0aW9uPgogICAgICAgICA8dGlmZjpPcmllbnRhdGlvbj4xPC90aWZmOk9yaWVudGF0aW9uPgogICAgICAgICA8dGlmZjpZUmVzb2x1dGlvbj43MjwvdGlmZjpZUmVzb2x1dGlvbj4KICAgICAgICAgPGV4aWY6UGl4ZWxYRGltZW5zaW9uPjYyPC9leGlmOlBpeGVsWERpbWVuc2lvbj4KICAgICAgICAgPGV4aWY6Q29sb3JTcGFjZT4xPC9leGlmOkNvbG9yU3BhY2U+CiAgICAgICAgIDxleGlmOlBpeGVsWURpbWVuc2lvbj42MjwvZXhpZjpQaXhlbFlEaW1lbnNpb24+CiAgICAgICAgIDxkYzpzdWJqZWN0PgogICAgICAgICAgICA8cmRmOkJhZy8+CiAgICAgICAgIDwvZGM6c3ViamVjdD4KICAgICAgICAgPHhtcDpNb2RpZnlEYXRlPjIwMTctMDEtMThUMTM6MDE6ODk8L3htcDpNb2RpZnlEYXRlPgogICAgICAgICA8eG1wOkNyZWF0b3JUb29sPlBpeGVsbWF0b3IgMy40LjI8L3htcDpDcmVhdG9yVG9vbD4KICAgICAgPC9yZGY6RGVzY3JpcHRpb24+CiAgIDwvcmRmOlJERj4KPC94OnhtcG1ldGE+CuGXQ7wAAA0ASURBVGgFtVprjFVXGb13mDG8GYZHeQyFMAQob5BQXpoSEkSqbSAmNoIKrdRIJSkVaEoiqYClUAiBmGJRaoSABFP8IZEfxqEBoSUIRMow0mSSgkB5z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",
1157"/ide/imgs/button-add.png":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEUAAAAuCAYAAAB+vtSwAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAALEwAACxMBAJqcGAAABCRpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IlhNUCBDb3JlIDUuNC4wIj4KICAgPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4KICAgICAgPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIKICAgICAgICAgICAgeG1sbnM6dGlmZj0iaHR0cDovL25zLmFkb2JlLmNvbS90aWZmLzEuMC8iCiAgICAgICAgICAgIHhtbG5zOmV4aWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20vZXhpZi8xLjAvIgogICAgICAgICAgICB4bWxuczpkYz0iaHR0cDovL3B1cmwub3JnL2RjL2VsZW1lbnRzLzEuMS8iCiAgICAgICAgICAgIHhtbG5zOnhtcD0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wLyI+CiAgICAgICAgIDx0aWZmOlJlc29sdXRpb25Vbml0PjI8L3RpZmY6UmVzb2x1dGlvblVuaXQ+CiAgICAgICAgIDx0aWZmOkNvbXByZXNzaW9uPjU8L3RpZmY6Q29tcHJlc3Npb24+CiAgICAgICAgIDx0aWZmOlhSZXNvbHV0aW9uPjcyPC90aWZmOlhSZXNvbHV0aW9uPgogICAgICAgICA8dGlmZjpPcmllbnRhdGlvbj4xPC90aWZmOk9yaWVudGF0aW9uPgogICAgICAgICA8dGlmZjpZUmVzb2x1dGlvbj43MjwvdGlmZjpZUmVzb2x1dGlvbj4KICAgICAgICAgPGV4aWY6UGl4ZWxYRGltZW5zaW9uPjY5PC9leGlmOlBpeGVsWERpbWVuc2lvbj4KICAgICAgICAgPGV4aWY6Q29sb3JTcGFjZT4xPC9leGlmOkNvbG9yU3BhY2U+CiAgICAgICAgIDxleGlmOlBpeGVsWURpbWVuc2lvbj40NjwvZXhpZjpQaXhlbFlEaW1lbnNpb24+CiAgICAg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",
1158"/ide/imgs/button-remove.png":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEUAAAAuCAYAAAB+vtSwAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAALEwAACxMBAJqcGAAABCRpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IlhNUCBDb3JlIDUuNC4wIj4KICAgPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4KICAgICAgPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIKICAgICAgICAgICAgeG1sbnM6dGlmZj0iaHR0cDovL25zLmFkb2JlLmNvbS90aWZmLzEuMC8iCiAgICAgICAgICAgIHhtbG5zOmV4aWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20vZXhpZi8xLjAvIgogICAgICAgICAgICB4bWxuczpkYz0iaHR0cDovL3B1cmwub3JnL2RjL2VsZW1lbnRzLzEuMS8iCiAgICAgICAgICAgIHhtbG5zOnhtcD0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wLyI+CiAgICAgICAgIDx0aWZmOlJlc29sdXRpb25Vbml0PjI8L3RpZmY6UmVzb2x1dGlvblVuaXQ+CiAgICAgICAgIDx0aWZmOkNvbXByZXNzaW9uPjU8L3RpZmY6Q29tcHJlc3Npb24+CiAgICAgICAgIDx0aWZmOlhSZXNvbHV0aW9uPjcyPC90aWZmOlhSZXNvbHV0aW9uPgogICAgICAgICA8dGlmZjpPcmllbnRhdGlvbj4xPC90aWZmOk9yaWVudGF0aW9uPgogICAgICAgICA8dGlmZjpZUmVzb2x1dGlvbj43MjwvdGlmZjpZUmVzb2x1dGlvbj4KICAgICAgICAgPGV4aWY6UGl4ZWxYRGltZW5zaW9uPjY5PC9leGlmOlBpeGVsWERpbWVuc2lvbj4KICAgICAgICAgPGV4aWY6Q29sb3JTcGFjZT4xPC9leGlmOkNvbG9yU3BhY2U+CiAgICAgICAgIDxleGlmOlBpeGVsWURpbWVuc2lvbj40NjwvZXhpZjpQaXhlbFlEaW1lbnNpb24+CiAgICAg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",
1159"/ide/imgs/button-edit.png":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFgAAAA4CAYAAAB5YT9uAAAFJklEQVR42u3cX0wURxwHcIyPJvpgaHzwiQZLGxRiqyJWAYM0YotWSY2isdRE0NQmjTGm+IeYNtEoPrRBi39q9cFHta1KtKg1bU0ghdR/sdE0VlI9/tfzBwgNAZwv2SXDsHu3d92Znb0uyfflOJjffA5md2dnNinJ5a/h4eFJLPksO1lOsdxkecTSxkKapM2o6aZR406j5klJOn6xwqawlLLUsnRpBBlruow+oC9TdIBNYalm6fQxql06jb6leAE7jeU4SzhaoS0tbdTYdIvq6m7Q+e9q6ey5i54GNaAW1ITaHECHjb5OUwE7gaWcJWRX0J2796n68De0Zl05pWfkUErqHK2DGlErakbtEaBDRt8nyMJNZjlv1ThRN31dc4ryC4q1B40W9AF9QZ9soGGQ7DZuBstDsbHe3l6qOnSEMmbn+R5WDPqEvqGPFsiwyHALN5flqdjI5SvXaf7bhQkHKwZ9RF8tkGGS6wbumNOu/v5/6bOKLxIeVgz6jL5bnNblxoubKR7M2ts76d2ikv8drhn0HQYWB7/MeA5oY8bc5ua/KWfxCu0RsrKX0pysAmm/HwawsBiTk53iTmS5wP+CtvYO7XHfmldA9fWNozVf/+lXaQdfWMBEQIbZRCfAW/kffPGij5a9t1Z73AcP/hx3ILp1+540ZJjARmhzazTc6Swt/A9t37HXl7g88ptzl0hpGzZCe7CbHgn4JP8Dl2qvao2bvXBZRFwzeA8+CBk1wEho76QdbhrLc/ONPT29NH+B3ue5P9bdcDx5IwsZRrDi2oJhmhXwCb6gg1WHtYV97Y1sR8ODKmRYCW2dEHGnsvxjviEcJm0najAsPPqrmT7dtnv0khbjrFPkpqbb9OqMua5PGMGMaweWU3ngTXwRR2q+1RbXPAcdHByMG/mdwtWu1wYzoZ0yHvga/83FS1ZqjWsmXuSi99e7Xh/MhHaumbiT+YlzFOkH3NbW9riQMbykpmVJqVNoG6aTAVzIF/DlV8e0x605epo+3PhJzH/J+FDy8uX9d8JOaLMQwJX8i2tKyrTGxVi3sriUurt7YhouZOMisBOAKwF8hn9xZmaOtrgHqqotcXnkXXv2jUNWgYvATqjpDIAb+E/Zr7h8dlfuH0XGZLkKXDPmscFIA4Afmy/81vi757jACIVax+Gu+uAjR7gisurAkKvjMYA7+Ck+r3GFv4AR3JL1m6mvrz+mdQ24Je/FxRIMuTo6kviiLly8khC4qsZcq8CQr0UL4ETBtQP2dIhIJFy7IcKzg5ybuE+ehDzHtTvIeXKa5iYuTulwaqfDKabVaZryC41ExbW70FB6qWyF+/Mv9bSh9GNf40a6VFY22SPiDg0Nxb1+VzfcSJM9SqYrce+Kx8VVWfHqjfT9D5cTAtd2ulLVhDvW4PI3VDGvgNdT0+bFhKwrru2EuwFcJvuWEQ9c39A05ntOkXXFdXLLSPpNz0jATpB1xo1601PFbXse+Nmz8Mg+CWTv51VRkXXGdXTbXsXCEx6YDzam8O8r37LdV7hYzelo4YnspVNOgDeVb6OBgQHf4Ma0dEr24j87YIxd9/94OBIeF6twdN+iEPPiP5nLV+2AVS/W83T5qswF2E6B/YD7nxZgR9xCkLc87qJeT19Ai3KLoiZ91iK9cZmBzRaCV4JNMLpsggm2cVlv47KY7etya69csBFRxkbEYCutgq20wWZwBZvBg8cZKHicQfBADgUP5AgeKRM8FCmxHooU5bFeFT56rFeFrMd6vQQLILSL7WCBZAAAAABJRU5ErkJggg==",
1160"/ide/imgs/button-grass.png":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAC4AAAAyCAYAAAAjrenXAAAAAXNSR0IArs4c6QAAAAlwSFlzAAAOxAAADsQBlSsOGwAABCRpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IlhNUCBDb3JlIDUuNC4wIj4KICAgPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4KICAgICAgPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIKICAgICAgICAgICAgeG1sbnM6dGlmZj0iaHR0cDovL25zLmFkb2JlLmNvbS90aWZmLzEuMC8iCiAgICAgICAgICAgI
1160HhtbG5zOmV4aWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20vZXhpZi8xLjAvIgogICAgICAgICAgICB4bWxuczpkYz0iaHR0cDovL3B1cmwub3JnL2RjL2VsZW1lbnRzLzEuMS8iCiAgICAgICAgICAgIHhtbG5zOnhtcD0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wLyI+CiAgICAgICAgIDx0aWZmOlJlc29sdXRpb25Vbml0PjI8L3RpZmY6UmVzb2x1dGlvblVuaXQ+CiAgICAgICAgIDx0aWZmOkNvbXByZXNzaW9uPjU8L3RpZmY6Q29tcHJlc3Npb24+CiAgICAgICAgIDx0aWZmOlhSZXNvbHV0aW9uPjk2PC90aWZmOlhSZXNvbHV0aW9uPgogICAgICAgICA8dGlmZjpPcmllbnRhdGlvbj4xPC90aWZmOk9yaWVudGF0aW9uPgogICAgICAgICA8dGlmZjpZUmVzb2x1dGlvbj45NjwvdGlmZjpZUmVzb2x1dGlvbj4KICAgICAgICAgPGV4aWY6UGl4ZWxYRGltZW5zaW9uPjQ2PC9leGlmOlBpeGVsWERpbWVuc2lvbj4KICAgICAgICAgPGV4aWY6Q29sb3JTcGFjZT4xPC9leGlmOkNvbG9yU3BhY2U+CiAgICAgICAgIDxleGlmOlBpeGVsWURpbWVuc2lvbj41MDwvZXhpZjpQaXhlbFlEaW1lbnNpb24+CiAgICAgICAgIDxkYzpzdWJqZWN0PgogICAgICAgICAgICA8cmRmOlNlcS8+CiAgICAgICAgIDwvZGM6c3ViamVjdD4KICAgICAgICAgPHhtcDpNb2RpZnlEYXRlPjIwMTc6MDE6MjAgMTE6MDE6MTg8L3htcDpNb2RpZnlEYXRlPgogICAgICAgICA8eG1wOkNyZWF0b3JUb29sPlBpeGVsbWF0b3IgMy40LjI8L3htcDpDcmVhdG9yVG9vbD4KICAgICAgPC9yZGY6RGVzY3JpcHRpb24+CiAgIDwvcmRmOlJERj4KPC94OnhtcG1ldGE+ClcGAAcAABUmSURBVGgFtZlpsGRnWcef0+ec7j693+67zL1zZ4bMCBNmhBDWKlbRUoiVEKosIpZ8oFBCFWJZ6CertJwPflDL0g9YClEoWQVSorJIsVXQsGmQSUIygcwwmbkzd+29+/TZF3/PuQwVFWWLnZrce3t53+d9nv////yftw35f3i86S9fcnp5ZfmtJaMUhrP5O//8TZ+//FRvYzxVC77lPT93xrDi23Ijuz2T/IVm2ahlWS4105mdWN78/NX9rU8s5tFX/vruLz3+VOz5Ywd+7ty5knvzA2dmoXubZZm3l0ryAqtiOlmWSpLmEoaBxHEs1XJFWu2muN5CSlJa1GuNrxmG9fFyVv7MH95577d/3EP8SIHfd9856373obNOuXb7OJiT2fTWbqdVKWWmSG5IyTIlTVLpT4ciJUPqVUfSOJFrB7v8LdJutKTWqkmaJhIF8WKl0ftqx2n8/UOPX/7X9Te97Fvn5Fz2wx7kBwb+rnfdbV/sXX/u0B3dbpvmqyvVyi22bdp+GBKLKUvNtqRRKnESSZQlEqcpwUay2umJbdkymy8kSmMxrZK06k1p1OoS+oH0ZyOJJRGDAwVeHNhm+UHbrHxy2Vn+1Jn4td+866670v/rEN838Dee+5mqfTx8rmHadzjVyqsr5fKzp+GkFEWxlK2K2OWy5FkmEQFqhuuVuqy0l2QR+nIwGYjjOMAllSbPr3VXJE8zGVCFRRJwmLJkfKZklqTp1MUpV2Xqu+KGcw5hSJ4YcZbkD0lmfDoOk0+++wP3f0O+yAn/2+N7gb/9o69zqmXv+akhd7LRq7M0O9No1gwzK4kfBDLxpsJrUiboMpmMo0SCwJc6QR5dOypWZsjeeCB9d0RwlohhyGqzJz0OtD8akHk+X8qkVqtJ3awWBwvyRCq2VmUuC38hGcmo2FUOkAuckbazlB7vrf2bU7U/7Lv5l8+WNh5+5SvPFYcwfu8f7nhtJMkrcst4VZplz7QrprTMujSrjWLzrb1tmYULqVTLYhmWdOttaTi1YuPpwpV56EqWoyNkNYtzoJJIzn+tek1WOivSabYkjEIZTicyDeaS5yIrTltiSDyYjySIIXHCAYyKrPdWpFlvyIx1J4u5HDuyQZ5TWUBsQ6yk6TgPJ77xmUfvv36f8fv/fEceloBTkoudl8WxKwI0irJP3JlEZHZlqVuUdr/fl7V2t8h8fzYUm8PkSJ7HRiEKstrqARl9r6kJF9f3ZDifFIdZafekBlm397eBmiW1Ro3PJEW24yiSOpluNZpAxyHbJbHtMoTPqYQn88QT3/VlMQKaMzjRL4kVJWgDJUIUihIN2MidTaXeqBcZzwyIR3ZCTp3zXpJZlNGpVslWyAa2rIJjKy/J1JvJwXQgmysbUuX1lM+JJ0XACZlzA0+cZl2mA1dG10fS3ajJendNUBYpV8oymo6pwriQ0Tok1ipOJjOZ9yMZXPfEm4dUxBEnbyg0Kex3kR5nccH0EhlRrFmK1cSnbFPpOi3prDYkSiCoUZZujXJT4gYHLJOdAJVJwGbITw1gudQT07QKMuppvdCj5B5BRWIGqFGtK71aC76Y8GcuwYwk8P6lVlv2+gdy/dqeuAeJTA8CifyEZCG3piEesDOBlWXnZoHJzDKkaThSQeKGYSQHyFUdnKp6uK4rFuWXUCTmNYVEk4Ab9Tqwqoi7WMjQHUvdcpA9Q2YB0BmB+ZxKRUFBaAPsaH5M1ultdGVjeRUo+bI97gPHQCq1itQVJoEt00to/xZkppGp0lSrBAp8fILOkF6D6lptcOUOPOk/0pfOsxwyAfkqNZkBjYAFSQlQyw8JyM+chbwsktGAheHF0e7q4cFBxTSaSwN504PN/DkQSwrIaBU8zy9K32t3pFapyi5Kk3Cw7lKbah6X3etD+ebDW+IOQ5nPXZqZxYFNeBCRHLuIQUBq+kgkpa4p1vzqXEpI3uyzI9k8sS5Gq0QDycFtV7bv25bBYCzGrUYReIdDOWaZAKlAxSYoq9DyRqMhR5V4/R3ZHR+QV30/rV+5w2ETINVtLsmpoycKvPvYgT6KEvmxXP7WrjyyvyX+LOK9BjBA36mmVkbtQzQNCuXJKrpsDsxy+JSKdemDl6Xahoj1LiCxJUNrr412pRM3JXSh1BWy9oJ6sbnKWqvmEFYJrIayiBYyQdyPgtMl2nmVhlJBp1m/0O4UfpglskP23GAhV/auSZvumUcl2bs2ka3vHCAEEVaA9WlYRC6VCmA1gKXiys8lPR9LfpoFOzyxk1OdKohgzR6yNHVp091NufSpbamd5M2bsUyMKdg7bNWYKElZdLxAcSjjysoKZPQL9tOqwSKLs8/G8hpHMoogWijFHJkcozRhGklGYLt7ffnWzo4Ek7SQvYjs6SlVNhP0X6X4ew9i1+htVswJOL4Ug38q0qlgg1D1s8dWEXxKxibezBfvPvDVtaXzyz06HQcC0/V2QyZfG0payyRZA5c0oU61XmR1AhG3h/u0+lGRdeUHPrzgR6ydEQiFw0Qm13zpI2kBfaECDPwr9AgH0PZISpwW3VglUTOtNE4msYSXfem1qjKe+lScF+immiAlurWg5GXbkC7KfmKtIX63KgeuJzYYTvm3WJDZq7D5KpKEUWqeXSLDYEylq9GRFMXUzqYZO5gMZSfek0KD2WfW92kWOVJHN6VRlYBAs4HXidH8iwMxbrbFJKDowVAqt9YKWEXIn92zxb/qSXQlkKWVuvS6NYieSx/9V1m0UbLSPn/s9F1UICk8xtnNntz2nJOSfn0h8YQS+6mMP9aXZBsnZ0IMshWh90o6lamKafM8GQDHNeRT7aw2mwrSNoMf/jguqq+yVsPXVOnKmreMz+A0ddCgxWb0hFDcq1OZPjCRNMSzsM/yMnJMb6g76o+ofM2SzbWWtBCF0pFus1ho4oU0lxQGqxKgmec96YxNecZNa1IlKBooChLLuD+Q4cNImZeh83UWWhd7i3L3E7pfpZA/LXUMPwrtJkAtvz60UornGY1Ig89ZI9oO9Df2xjEBGd1n9u9TcaamdDrV4n0B6pOj6Z16FeKqYolYtzxtTVaaDs4Od0YWfbR5MXJxcWWp0c67zSoa7EhQTsQFs4GXyM5nIdgglI2f3RDOL3IJIzSeS7ZEw+DQCEkhYSx3aL4I0GxSfvpCBKRsOJBRAf+iD2kzuiDg3UU+J/oBDjhNxGtFaLgvDk40Rf709NRJRm6ApMZIIlrLYMALQqv2eJmSVtFoFnNoPhFZ8jBDDuXJpyjU5yKxQuQQbd4fDOXSRy5KNTWl3CwVLlDbsrHFJgHB
1160IK3ehbmki1zaL16SfETQrN8AtyMDqSR7ivmqY8l4LxKDilfZu+7YMvc4JAbWWQImyJ/BYUOUTA+msLP4bPG/BjjibxiMqfcsuelIl6wx0WCsJvNAXCTRpO2WgsPpKrjgSeohU1S9USEwryrDf6Hsz0S+9gj80VCM58BckmXT0OZfG4u3G0j9JDpfT2WtU+MQJIyyxCQPgBYNTSvMClLtOEWzWgBh9Tw51llnAQ1ag7c8jpXQsZqc8syJtcLR7Q7ncnylI1cORrI7nGG4LMqc0MkSyAmpaMExkAkeo9stHwOXQzHAv3GFFa9DTEhkALWD78ylbdhiO4Zc25lijx2xqcTwgbGcXO+J72MdsKthcJigKusqHY50G1SiSgXViwdkGg2HpLValUSmxIFI9NHwOR9WPJo0gxNHOnJkqUGzUY+NjoPBTr0iP33TKo0qkKsHU4YMWE2FFvBhAv4Am5BA6XWW5fL2UCoUpQzMpt90xem1xKwYsnm0IydZe08tbabkREy8SGZuXEDyaesdRkAgwlSlUuwT9BQSK3F1MtJg9+EhNZRKBxSqA1NS6uPCtYFc2BoWHsMLaApkYA3V0Q8vtxx5xbNOyKued1KcikX5SlKl0qXhNeTGLxSkxwSvNvVwNZFl9Ldk0LTYVKEYhFQN7HRZS7kEbGW5U5fn37whp493qaRagxhP7suYJIURGSCZqk4eVRkSuEGsKKVYKlE2m3XZdDRb0ERcUl8C6wsm8moRvHbCx7fHkAXz1a5hMS3GsjokgryXdqWUx3REA1gx8NJklP0GG64u4TIx/yqjGdPSjAxrkmzcoY89riIKDhKqfWBM1Q+wExN8+RLeCdku5lqWYl7gM+WSdIBPg39qnTXzZMWQDoFvs3FEI2g3YvQWww8R6pgaJfACW/rEbiYhajIBd922I0+nvEepyPlL+zKh2wYBI5hD4+i0pQyR90fbJANrTNa7eKIYsmcMJOXOmoRbjxdZ10Nd2xujHJbGKG1avE3iInCdkCgm+CK2HH7tDxfUCxpnQFU7oD6Kn5zM9UMypyae5oCi6CCspXJpAgsCiyjfhMztjD08NVjldRvyKoHXeu3CZLWdijz9aI+MKUdQGJTF5zMeCpFyG2Dg5ysEql1YsauQ8Am0yt8by00OdIhrCyuyudKSNkQXOnSJ4SPUBon8FhkvIuftbaaQFurSoBVPKN3OaC47HKJKULHOfzzn2LNCyqpkZUQwUyqj/lqvFA6xb0K6EHL70gVOUw7senHhLps0uopJYxnvigE8MxKThCnTFvBAz626CeQYH3lOCVkMEqiIDsq+hWXurON9mJjw6QqlIqg5G2UQdblZk2efWpMBJX7o8q5sHcxkxiTa1YWBjg7Ox1fx7gSu+qs3VyS9IN6+Sif2QJ+fLgKcXUXgO1wpYw0YQii7C8xcSGpre9UHFS9RacWttvyU7FusbWHotOqTRVisD0gl3L8qA/ZoHeE9MzZQxzXjDXrKgCwsKLE2iOMrbVxfVnTNBWy3IKkiawyeW0zb+thjIX1O4aTZ2lhdKjCqpFdH2KR6JXRcq+ZRnSkJCqmA3cBGgG+f0q+wl04+qjJdjFoXAo5435RKzBc6ukF4YgvnHmiwGUa4/Hvh6Y1zE+RHMVyB5XrSDKQq5hRPwl8vPXuCjFSQJMpMI1JPrZmLIY9OLnrggiqUL6OZOegwMRR8mbGx3s3MIXdIUrRCCrvBzJPxJEAqIWS9XARYZv+T60uaBdwqExaf3VPfBGf04F0U7cSRJWl1uJ7QdprlNAIuIjdXGb/Qbp8AU4z2CrK0Qut9oj8DJgx2fHjUn8gtpzZoHOryDvV7c7UDESPpTzy5vNNHSh0uPesFiYtLUAJVhVBDq1ctGYT1GAsbdfrEcqPIdn/CbRm3vrPvQikE56pmNUisN74GyejCkYB94pRbNVUNVYRTG8uFnqvODnB6G7R8vShSs/XYE/tyjOCwcZJwaXlslVvXYz251p/KY1sDSsv9YW+Zy6BAFheuokZp0RNUoVSDcyIYMF21Mr0pg/wIQMrvx/BDrZpNR/RoVg3i4GoCGKnCFW0dAi8RbPEAjiOQ4QUh+wFbdWLYIU7eRCfnRZtXwuppZ2Tep7GcWCNofXD1kCxtgL8Iu2nJMhUxS8OiebTojFrybpO5Ue89aCpDup+DMcoYPJQrLQh+hEt+k4C0EiGcGABJfTRRNBUHnXNV7wvo8bz+XNVDsY76Gn0orUsdpvY2Lbg/Yqhlio+5qdJvFC5eP5AhXVRPfvbEamG+5rN5YUunPjcBHHIfaGjrVk+zy+/b4LFN9tVztLlqy2lC+tBDrHLIDRpTldcimtg6iUqojPIrZQ/lj+p8hDDozUBMxGNe04d29oSBXJOpIqC/sLISUA1PyDBBIDy5iseYUbLrQGGPA6l5VyKmzJar0aCY9H0kTUmqi2yjLH0u8JV8Z46uFVgcAjf1Ffoo+EHwLtk9wErMKLdyqYY8aqf0tTERsFZlgRXYoOlUgCUiVMRzQEIGY5cU0cH1gCSqVKV8hRQRgF7wqCLccmpdjvQayKSqS8JXIx7MrnJlrHcmDBZcne1ykzVQXwOGlaQ7g0lR1z0CVgusidA6q+IkVFGN2kLvFwlOdX9In6jhU1pUSJuX1t+HeHPcKgXA3xySU8+ugzh/UZFA9ugrIYczf/Hlz/Jox13fDzdedPMmSsLFJh8aMzzM2Fz1W6cfdYoWBkplcM5zWj4NSrOgA4a6wg5+5Al8xy4uLmCNhF0DNkmQVTVdSjoNRFu9NjKFWazZKzCPj6GqfF1TPDdxuR1m7TaJ1caltwoKSS/L7ue65I/MT95/4SsvPnnr3wbG4jwk7LDoTZCgpNKnGdDSESH+xS20XZvVEIW4CT09udEr4KTdsrhLAQo9ZHCBFVAFOKwY8sWGLQ6leg59CAAeqeFiXUwr+yghGUAIzkbF9HAgi1uDQ4OFCQxzo/TxxCz91ktuf8Mf/MU9739AE/ZfHu//3de/bOa6b6Hr3jmde40pHXWtV5fHrg7IXlxo+5xmdRPO8KcI/ONf/TYeR/GKPWWlF5zeoALq7Udy/uI2g4N+t1OSY1wrqNFymZwmC+Rvie9/uJ5WdVE7rBrdwOCbKrlaBaCLrI+cuvMRTvQ3H/jEf3zjyYH+j8BvvPjO37nzzO7B9M0k4Fdeevb42qXdmWz1Dy/dE0jIukidLU/sTzBmZfxLu3CEPpt2KK922L/7wkN8IxEURKxqRwbbHhX0yTaCQqAMwmBbvYv6eyWrtn0G5Sfy3HovM+Z7P/zFB6/ciOnJP//XwG+86c/efvvRZ6z2Xr8/mr2Zb9hOq/GZ42/UKSr+h7RuHe30fkZJvT1aQMpD7H/u6xcLbKohm+MzlmjZ2pCGSOeAa7Xeak9a3SWphLOiWpzrPC3gHozAR+/9zKOjGzF8v58/MPAbHzr3m7e1ekb5l7A7CqMXTQhkD4lSc1bn+qAMzpVEK8yrqlKa2a8+cqUgm5qp/aEnz3/mUYjPlwaTwwvT5rFTYjq11BxsfSE25K+WT69/+h3v+DRy9IMfP3TgN5a6++677efUBr8wGk9/Y7ZY/DyKYjUwQcU3Fwjv2nK7mB09+PCNizt8g4zDQ51U809t8p0nzNPv5RbzYGF31z9WWV69533vu/dLN9b/YX/+yIE/eeHffv3LX2xlyVvXOo3X0DGb6iPUZSpW9fHg5R1mTr34MSFnmwNEKpO7fI/wITdL3vNPX3j0wpPX+1F+/4kCv7HRn77tjpux3L+OSv/qwXB2ZEpDUg2eu8gpuq9XFZi2b48W4bvdOP3ghz93fufGZ3/cn09J4Dc2/+O3vWZjMh6/YTINfm3hh89Q6aGLfgXI3/O0k52P/cl7vjy/8d6f9OdTGviNYF73uue11/LaWzwv+s78jcf/8d677kX8ntrHfwL3Ht5X0jKYmgAAAABJRU5ErkJggg==",
1161"/ide/imgs/button-js.png":"data:image/png;base64,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",
1162"/ide/imgs/button-drone.png":"data:image/png;base64,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",
1163"/ide/imgs/button-ollie.png":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEcAAAAyCAYAAAAOX8ZtAAAb3klEQVRo3rWbe6xl91XfP7/Hfpznfc2d8diejF/xIEMeVWySEJPiVAlUdhEtCFoIEZQKKigUEaVQFZCKRCpAFagKLY9IhYYWWpqERoEAKjQU0iSEIEgc23FjO/HY877P89iP3++3Vv/Y+54740dIaDjSvvfMvmf2Xnv91vqu7/qu3zF8ga8feP9nXjWr01eMjNwGFMm7pR2uP/6mm4Z/9NG99H2LZnl3lDZinBg/0lODwbt+9LXlHxhQ/gZf//KDh6+90DTfXs/2KJzDWm/WR6Onv2pz651/cOnya4Za3bLuzSTFsEzZ+Mp6aT/9ttef+sQXcm3zV33gHf/zibv/YuZ+7Jli65suzOvSOQvOUtWJmzPLdn31yaez9TsOEhijGOfwajkdD66NTfjo7a56309/8yt/6UvtlB/6rx9/87My+qaG4isvlZunYwyUuUdFKUS4g/lnnrHTuy4ngycyHZc0bWJidHnfOP363zrh/s3ff9n6E39t53zqU1fGP/tZ+ePH0+iV+3XNvA3kWYZxjqZuyVPLxnjKTqhpU8Q5S4jCRpZjU8CVA+5bPHn1ZbNPn/ve7/22vS+VY37t135n+ofN9JFHNu65hbYh+ZzdpiLzDmcNIrCdDwhNxU4yJAOjMieERGng9s0pdxXtX7zt/tHrt42Zvdh9/Ocz4t07/qFL2eCVs2rGTgiIgWVokFaZWEc0lgtVTRMNuS8YjIakquVC3YAKN+eJC7Nqg9GZM8DebDbbttZmxgwdg/4mFQwGq7fHp7vzet0ipvl8HieTyZWPsH726d2DU9W45loUECEEy6QosXnG4WHNvFkycYIxhqUq9TJgjGEO+IND3NbmK9/zqfQPgF/9aznnsuYPXagE53NS1RCtxWcOn5Q2GJaiWG1JzjIXw95ei0dpVQgK2ygP3Db1rz5lfv1Hzl+4tqzbu52z+cf+9E/Y2bmGtXYVusYYMGblCaX7oSiT8YT7Xv1qnPXhs+efeezyzsH2n20U/pfmsJcUlyqctVxeLmEJmVFKo1xulY18SIxL8A6swYiwDMKThxVPjgffoPCfXgwXX9Q5+tRT5Zufsvc+s5yTQsRHw6gsGJYFiypwLS3JraLWciBC9xjgMGx7x6U2Yg2cHSkn1if3FGXJcDjgwoVn+MF//gPMZjOcc51TeuccvQdQ7ey11tI0Db/57vfw8le8gibGU+ujhrOjOWUFVRJOecueCgHFAEsFrMNYeLatGapnrSwoBznVouHZZQ0xcc+6e9Xerk7ZNAdflHPecWXj9H7izGHboCJk1jBrK2gqIkJA2HAF4gwSI4piMGQWcjUgikexGkiiLKsl3lvW1zf4obe+lZ1r1yiKAmuPHKRoHy5HTkoitE3LcDjkJWfOENqWtmnAGDKE0giqytjnLFNDmxQRBWNIRhjh2JOW1loWy4StKgxKMEIKict1vPm3rxa3AX/5RTlna1q+6fCQoUmJkXfMJSHaGV5iMAJ7bcumzThtLflkwCD3yCJxcbFEUDKE3HZRkJIAUBQF3/Ed34k15jh/XqgsXHdeFeq6JsQIxmCMJfeWge0+c7lp2MCwURa4UY4XQ33Yci3UeAMF0BAJCs4YRs5SJ+Facq41vP7FnGNfMKVmV15/ej37yauLmhNFxlIiSQWDoipEFcbG0WjiampZBGjmif39lmeXS+bE3vMJbxTvHN45rDFkPkNUSZKQJIh2q390iAgxRtrQ0tQNdV1T1/VqYVDFGMi9pTAJAyw0ckUSiyrRzoTDw5bd0FCRmFiHtWBQHAqqLFNiM/NcOZxz05gf08tPvvwLihxV3Sa179rdt1vzqmbkHGUArwoKxhqmeUZbJXLAGCEaOIgVqHYRYwwJJdOEs2CsxVhDVVX8+cc/jjEG7yzSO2QFyECeZaxvbLC9vc1oOMJaS4ydE9Duc9ZavDWURsn7FTYkFios6hbbh2ShSqZdpHhNxKSdk5wlV+WwqtmJbLN10y+o6tea55T15zknivywd/lLPrvXEFNi0QYm1mCKnGKQU+Q51WGk1UNGBkrvAUEUMBZVQ0iJAHgVbJ8W1jpSSly8cIEPfehDeO944xvfiLWWqqpo2xYRwTnH+No16qrGOct0bY3Tp2+mbdsb0s8AuUmMjCPrr48F1ztaFdoERlq0ztgaD/ClxxqQVpnPlgB8+koNZwavFfhx4G0v6pyF6s1W9R+jypU64VCsEUgGTYKiVPOKmFqG3mCzHO9WhReDISlItDQqZBpx
1163/ZJLSkwnY771zd/G3efO8Ru//l/Y3t5mMplSFDnj8YS8yFFVFvM5+/v7PPXZp/j93/t9HnjDG3jwwYeQ0HEVxWBtB8pDXzAwYHoCeP2rCQlixBhIdcSoQw2kECgyiypcWkREwFr+aV3rL5elefwFnZOLvM1au9G0kd1GKDJPWebds0tPBXJPgUdFEAyDUXkdgBpEhOWsYpJ7PPtYaxDpsMRayxNPPMnP/ezPIj3AnzlzhqIounQxhpgSo+GIrRMnMNayXC75mZ/6KVThwYce6m4lqUtNTYyGA3wSXOEoysExBTDA4QKb5+S5BwwxCQawZQbW4ENkt44s2sik9OMsk38B/JPnAbKq3mEx3w1QBeGwFcrBgMF4gssL7GgAwwHJecrRmPH6OjEqSYTh2oTh+pTR+hiAwWjIYG1KZjtscc5hraXIc97z7v/OE098hgcfeoiveu1rKcsS5xzXrl3l0cceQyRhraUsSl7+spfxQ299K9O1dX7rve9hb2+PLMu6apX5juyNRwymY5bzCl94RusDRusD8mGBiGGysUY5ntBgkCLDjHLIM8rRiPHahMMgLNqukhprv1FVT79QtXq9tWYIsAzCIipFkYMK480hm9sTtk9O2DgxZlE35IOczVMbHOzOuHbhCsvDQw6u7GAwrJ+aUgxznFEG5YCiKCjKktlsxs61azzwwAN8/d/7+i4Q85yLFy/y9re/nZ/5mZ/mXe/6NYoi55FHH+Ud7/h5tra2+JZv+RYGgwFPfOYzlIOSPM8piwKPkpWWte2SycaYK+cvcbhzwHzvkN1Lu6yfGDFayzicz5lu5tx865iTN43YODUgSUtROBo1zNp0hGPrwBuel1YppW92znEUOY2A1UQxcJSj4+wbFxnVwtGGhulmyWhyC4tZ3ZGxtTWKUQYGJIA34J3FWoN3joO9XUSEu+8+x9raFFHFGvjYn32Mtm05ceIEDz/8SS5evMRvvfe9PPbYo4gI9953Lw8//El2dq51rNoarHM4Is5DNoBTt01Z3x5SL1oMho2TI7KBYzmLWAub22WHDApZYdGU0cxb1MC8j5zeD9+vqr9pjGl91+RVZ40xr9OeQ1Qx0SqoJkTBZ/TsFayDzFucA5eDyywmKxGBvLBY18GTA5wBZy3OdgHqvCPPc4qiuKF8D8qSyWRCWZYMh0Ocs6ytTTl16ibGkzFlUTIYDMjzAmsMzlq8czjT2ePzzjaXeVxpe7Jpsba3PSWcPy521oDPDLUkxBgWbeqKhoAx5j7gVcCHLUCWZfdba6cxJTQl6qi0IhSjnIOrBzRVwHlwGTSLwPKwZryek6Jw7dKcw8OK+aLmyoU59SLgs85oZxRjTYfnklhf32AynbK7t0vbhpWxL3/FK5hOpwDcc889nDx5koceeoh7730VDz74IJcvX8J7z8lTp1DpuJExFodirOJyaJvEs5+dcXBQs5g3XL2wpK4io3VPjJHL5w/x/tiRuxcPGaxliO2dkxKigrXWAm9apZWIvMk5h4ggBpooxKSMJznTNOb8I88wnAxwztE2kZNnN/GZ5eL5GRsnS4aTLpViK1z53BxfWIx3mL68d+wX1qZj7rzzLh751MN8+tOf5mUv+woAbr3lFr7ru76LS5cur87deeed3HnnnSwWCx555BHW1te58847ST1gJ0PHeA1ogqvnF2yfGTJe8ygQGuHy5yrywnLbl2/y1Ccus9xdMhhnVPOWyeaQ6XbBwU5NlZSUEmrdUbvy1QB+f39/Q1X/jqoiCqJCK5BUUQPrp6eM1odUsxrrLMO1AVlhWOy3eG8YTDMkdWjmC8tkq2Rx0DI8OcCiWGtWTZIqvPo1r+GxRx/hA7/7AU7ffJoTW1sAnDlzhjNnztzAU1IS/sf73sd8Pud1r7ufrY11dg9maOcTrOlgYDkL5IVltO4R6e6TlZbJRsZsr2XrlpJzr76FxV5NbBNbZ6aUk6xjZ9bQ9FVX+/pkDF+mqut2OByeBW6KMaIipJQISUgiPacAl3vKtSHFdID1ndKWonTdeG+MSncgiqYE0skzIoKqICKEmDh75lb+9td8DYv5nPe8+908+dRTL9j4Hhwc8Lu/+wEuX7rEbbffzuvufx0hyar/AjCqqCiShNC0nf4j3PA7hYQKGAvltGCwMcAPsg5D++a2Sd01OlsVVT0FvMRba2+11rq2bfsbK23qPIkYqlnkYK8CazpwtoYTp4bkZcalz11jujWknHSJHBpl78I+W7duIKk3Xo8IoEFVaINy//33Y4CPfOQj/Oqv/Arnzp3j3LlzTKdrVFXFM888wyc/+QmapuXuu1/K133d3yXLcmJKfYffYaNRJUWhXC+Y7845vDpkvFV2Tmlh99kZJ85MSBEunV/QNEJeOjTBZC1jupX1bUbfAPfB4b33KaWX+JTSlx/hjWpH89sYUVXCMrKc1axvDsnKLh/nhy1XLyw5efOIze01nn74PNOtMT7PWOzOGW1MKIY5VejCTpL216Z7KGNQEV53//2cOHGCD3/4w3zu6c/x+OOPH/c03rO2tsa9997Ha177GvI8J4SAKn3UaN+0CikqzltOnd3k/CeeZe3kFJ975jtLhpsjhpOci0/NEYUzt08wFlKEvUvVqoo2IRJDxOZuFZXOuXMeuC/G2IGxKCKpWyExVIdLikGBsY7Y933DUU49b1keRiYbE/KiYL4/IzWwectJymlJDJ0BRzpOTAljZOUcMYYkiZe+9G7uuONOrly5wuUrl1kuFmRZxubWFjf1ZTyEQNuGbuH6qIkxIX0USVRCA6PNMS/5ioLZzoIUlK0zWwzXS+qFsjyoueWlW71NXbqP1wsWOzWqEHsbvQgiHSEUkVd5ETktfeiLHClMnfGhrvFFTgydHgIGK0CKhCbhvMcVOWsnt+iVSWLbXSKlTjtJKZFiwjlLSh2vsMZ0zWDqeqQT2yc4deoUphdzRQRJQlVVKyA/0ntSSv01I6qCJukeWsBlGWun1jtbTGdLbIUUIpqgN6m7ZjLEJiDSFR5jbO8Dc0QGT/sYo7HWrpxjrjNCvWOxv8c0y3puYYhNYnkwpxwMCE1iPq8ISbDe4a1lNCqwzpIEVDrsOlqNlBLWGLR3jumrmBghmniDCqjdD7SXT693jkjnIJUurWIDkuBgf0lIgnMGi2EyKfHeEdvA4bUFo81xVygszHfnvdjWYaGqoJJIqWueU0rGq+oFjlZLujGHSvdBX+Qsd3bYDy3lZIKKstzdJx8MUYnsXpvhM8t0PMBaQ0zK7GDBaJCT+mumlDqs6FNMDavyfuSgNrQ0TYM1FlCc8xRlcYOjjq7RXbOzVVRJQYi1sr8zwzrDxsYIa6BtE3vXFqxNB2xsrrHz1DOk6iTZoKRdLqkOZ2zeciuLvX04UiKTIHZVsZ71McaPO+e+cVUipVPLJAkpBAbTKfVsxuHlqzgM+XBAPsipZnM0RMrhiNg0/aTA4K1hOZtjipymbdnb26dNgs8ynFGctZ1TjOkix8ByscA5j/ceRWnmcwbNAGPNDWklqswXS5qmoV3OaVtIpqU6mBPqivWtKWFZd8BgDZlV5nuHDMcl69snqPb2We4qLsuYbG4iKZLa0FW9JGCPpx4i8nGfUvrUESCrKCqCRUEToW3xzpENh+TXCd6haQhNQFFi41Yzpo7XQFs1OB2AMeRFTpYXOOe6w9p+DMMqeqbTKUdNr2rXa0mvH12fVkYV7z0xJjLvMTaR2pY6RiQGYt2l/xF/kZholw3eChgYrq11kWg7wUtSJIYWZ7RPLbPSsIFHfNM0T6tqBLz0TM7SpVZsW9Q6Ejnqs64jDjVWGiRE2hjJ3LH6ZowhNC2apOs6VXHWrRzTjWE4Hub1/7VzmjsG5CRA6sY9alDTr6gq1trucA7RzjliIVQ1beZW44pOfm2wSYgVBHFEX+BzD23ExhZnBAkBKx3mam9QXddRRJ71qvp0Sumq9/60pA6YnApGFQkRigJjExkJ73IoxlT7CSsNpm1pZoIv8j5sErGqyYqCGFqi6Uil6nXAR7c6XVr1unWMROILDxf7sJTrQBl6ZqwQY8BkFpsCzeEhvseqNkZi1VD2Q0gtMiZ5wtCieU4tGVLPkRRxJusgpR8squplY8x5f+utt+5dvHjxMWvtaVFBUsJKxKIkBSctGlpahXYxJy8LrC9JDWRFRmpbQgyrwZzLc8SaDixV+jloD6yqL7ofxTxnZHVD5VqNblhVVVUl9fiQFLKyJDYNaXZsS150haGNwihfUh8cL4ArBoTugnhNvXMs3ntSSv9rY2Nj3xtj9Pz58x80xjxwhDu+73hjiqTQab+m6/SIIXQzJxFc7vDDYddPoZiecR7NvJOyehDt+yA9FmZRPcKeFxlWP6eUix697+h+Eo7v5yzZcIBKjzm2i8wUEqQWTdnKLoDY1KQQMSil6xeg7xKstb+zkklTSu9fLBaBvisvvSEz2pEHSZh+snhUBSS02N4ZkY
1163yQjWG8heYTsH6VMkmPMSRJp5ccN6K6aki7QnDj0ZXq/m/ale2j9zFGUhJCP/q1zmKMo6VABhuYySbiBmAs1hlIAWPNah5vrEVTxEjCogy87SLcQF3XB1mW/cnKOWfPnv0LEfmg9w5VJbfdsMx4i00JQrcpwBgDIeBSS547mmgICqVPDHxkNCkhH3dGWUMS7R7kem4iRw45dszqfB8RN5xXWU0vurQX6DWipB3uGwxNclhvGeSJMktkZUErHu8chTNIVbEST2LAxIDPPR6ltF1ke+cRkT8ZDofnV2KXMUaefPLJd2HsG0WEzCiFVYxafJGjIaBN6kaxQD4oux4pBoYDgRhpQ4O1C6zNCFFxvouc2DvF9hGk1vTpZG6oWC+IOX3krUbFqsSUutYmBKK4jnxGQVOgwBGXPecyBkmJBJSjIampkbpa0QhflgiQWyjdEfuOGNx/fp7ALiK/Vy/mV/Ms285MYmgVEhjrsIVbidPGduGWkmBJOJt1w1dztCoN2gasLxCFECMxBqzzXS+lR+3DMd6Y5+0k0BV3OtqOItc1nil2mBek06w1tGQWrMlWBcAYg9UAyWKyDFcOMD1GHUFjSomBUQa2K/2hDZc3Tq7//vNGM3fdddcVVN/ns4zcwtgdUVOoJaOxQ+x0C8p1olicUbzEDpe0Y9XGgImRnK79TQohpi6lUuoAPh43jil2DxpTfM5xdD4d/zulruT3hLUNgaidZpSRcDF0dvR8CEm4FMgstEGYBw+jddzaJsEOEekoxchC6SDLC4w1759OpzsvMivPf65umn+UezNcy0DnQnQWJVBIg61qbF6ywKOhIfcWWS6xWQbWIilCiLiiIEkiKbQhklICY4gxYq3F6XFvdZxS5vmR00eP9BTgiL0mEUKMBOk0I+sdWjXE+SE264S3FFpy50giHDbCeAi+2YcWrFiqVrCSWBsog8zSNM3cWftvX3QLyj333PVwbMO/G+Q5WzmQBEJNIQ0mRVJTE2Z7OFlQ122/HcSgbYNUFRoCxju001ERVdoYO0fFSIxppcespIeUVpHxQke8TqKIfTqpJEJIBO3kE0kRm2UYUVJVddjSM8i6ahm6SK4tqa5JVY1pl9i0JLYtmzmsjQeIyC/cdtttj37eXRaj0fBfh7b+ylunxRvMs/MuXE222ioA3bDPS4tETzSeYEfk5bDTUOoZNrWdoKV0enSIiOsqjkG/AMzhRvJIx7STKCGEldOiGjRGBCHiETcmnwzRlAjLQ7w02BjxLkPijUwqiy0xKS+ZTgl1/edZXrz9r9yfc/vtt9fNxf/7/Wu2/t+Fd1vStFiVbmxxtKEitHggRsfCegqbyG2LKwoqxjSH+2SmJZmOncYY+2qVUD0Wu4668usTS6+vV9dVK+n17RC7NG1WaRVpsTQuY+gSnhqcYWk8oa0oSGgdkCxHe2JoUheBmS/Y8nr17Gbx7Wbr7N4XtO2tOP3SR37q/X/+wxNv3nkQDJpSv0Kd/utMV8VEhJGvsTERDuYEwPisp/mJ5I5mYJ1zQoxY220+stdNPK8v5/pcwauvCyJCkk7jlpRo2kQQUAkoGQO7wCwTzbzf+WUdTUrguqukpkGNwZquzKu1jHPPxWX6cbN19pEvak/ghcP2/T6ZPWvsRrSe2hRkRUlRFrSzQ2xzSKYNJnrkOlpuQssgJSIg1lJHIcWE0gGyd64Tl1bba198q+9R03nsnA6IVRJ1TAQ1GEnkEtBV6nf/z6XIgEhKhsqU5JMpg/Gw697n++QayKVtl6H84Ivd377YH37udLVTqjyZGYfNB+QmUKQZWXtIlhmq5EEEG1pcDJgUMTFg2xpS6FJRlEYMqOCd78lcz4C5rt/SFzjk+PfxPKmTO1SVOnTtg1XBINi2xsQAMeBiiwsNRhKteryHMs2w86u4MEOcxxnPiHT+O2478fQXvUnbPPBAfPA//PFHC+NeZdpDkiQ0KKle4AyMncUGQa1lES34nKwoILbYUJGpgMC11tFEfSZHr6nqbapaGmP6TvWGFFKew4x5jn6sqsFaPhOSbl5p/R0pCQ5DVENFjvMlPssI1ZIsVWQSGfoWJwGtFOl71DVryV3OxMjH7r335uVfawf7pgm/vRfS9x5tN0vGriSEIgWsKnM7wWQZZWYoSkcbCyqBoj3EOuHRg6Cbw+Gbf+KmwYf+T57f4r0vVFWzLNPrNk5pnufaNA15nitAffTHuvvRWmsK1fDG+65d+Ff/cfqKj128+lHdit6poSmmeGMYZJB5YZl5mpgx1AYflgTJVopBhuCjMijhpDPv/XzP/3md84Zz5g8v/+nBR5KfvmZhChZJGJQl1jkODw4Yt3PWzBzFoq2gc6U0hoHpFENDwSizi009eNw88PUR+NyX4oshv/iL/+2Jvyzza0vlJkKNp5NBTd1h2cQYPFCFyJ4bYnzBeDwmpURVVdzkAhvt4ce+es3/9i9/nvvYz2fEdz7wQP1l5fwt2+HgNzZd2DmhS8bzKwxnl5maQG4d0/nVq00jLMQTswGpnDITTyFhd7vZ+aPMpLf/4Hd/+6Uv5deJvud7vvmg8PzoyWbnA0MN5xe2ZGkKdDAl5iOqaFmb7zyTGcOJXDklM6aHl9isd7k5ixdv1sU77xnU//Atb/naxf/X962OXj/y799/x24+/Ok6ypeJaLLOGOvyRyax/YmlMf8sNPPXW6PBGCuuGNVFUfzkO95y/+8ZSH9TX0RTMD/wro++fHd+8FZtFrlDVY2zrhg8tpkPfvVyK9+aEc6ZFIw1NmXeffZEmL/zJ7/vG85/Idf/fzwZCbwLcQfvAAAAAElFTkSuQmCC",
1164"/ide/imgs/button-jumpingsumo.png":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFcAAAAyCAYAAAAp8UeFAAAAAXNSR0IArs4c6QAAAAlwSFlzAAALEwAACxMBAJqcGAAAA6hpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IlhNUCBDb3JlIDUuNC4wIj4KICAgPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4KICAgICAgPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIKICAgICAgICAgICAgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIgogICAgICAgICAgICB4bWxuczp0aWZmPSJodHRwOi8vbnMuYWRvYmUuY29tL3RpZmYvMS4wLyIKICAgICAgICAgICAgeG1sbnM6ZXhpZj0iaHR0cDovL25zLmFkb2JlLmNvbS9leGlmLzEuMC8iPgogICAgICAgICA8eG1wOk1vZGlmeURhdGU+MjAxNi0wOS0wMVQxNTowOTo4MTwveG1wOk1vZGlmeURhdGU+CiAgICAgICAgIDx4bXA6Q3JlYXRvclRvb2w+UGl4ZWxtYXRvciAzLjQuMjwveG1wOkNyZWF0b3JUb29sPgogICAgICAgICA8dGlmZjpPcmllbnRhdGlvbj4xPC90aWZmOk9yaWVudGF0aW9uPgogICAgICAgICA8dGlmZjpDb21wcmVzc2lvbj41PC90aWZmOkNvbXByZXNzaW9uPgogICAgICAgICA8dGlmZjpSZXNvbHV0aW9uVW5pdD4yPC90aWZmOlJlc29sdXRpb25Vbml0PgogICAgICAgICA8dGlmZjpZUmVzb2x1dGlvbj43MjwvdGlmZjpZUmVzb2x1dGlvbj4KICAgICAgICAgPHRpZmY6WFJlc29sdXRpb24+NzI8L3RpZmY6WFJlc29sdXRpb24+CiAgICAgICAgIDxleGlmOlBpeGVsWERpbWVuc2lvbj44NzwvZXhpZjpQaXhlbFhEaW1lbnNpb24+CiAgICAgICAgIDxleGlmOkNvbG9yU3BhY2U+MTwvZXhpZjpDb2xvclNwYWNl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",
1165"/ide/imgs/button-hue.png":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAAAXNSR0IArs4c6QAAAAlwSFlzAAALEwAACxMBAJqcGAAABCJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IlhNUCBDb3JlIDUuNC4wIj4KICAgPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4KICAgICAgPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIKICAgICAgICAgICAgeG1sbnM6dGlmZj0iaHR0cDovL25zLmFkb2JlLmNvbS90aWZmLzEuMC8iCiAgICAgICAgICAgIHhtbG5zOmV4aWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20vZXhpZi8xLjAvIgogICAgICAgICAgICB4bWxuczpkYz0iaHR0cDovL3B1cmwub3JnL2RjL2VsZW1lbnRzLzEuMS8iCiAgICAgICAgICAgIHhtbG5zOnhtcD0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wLyI+CiAgICAgICAgIDx0aWZmOlJlc29sdXRpb25Vbml0PjI8L3RpZmY6UmVzb2x1dGlvblVuaXQ+CiAgICAgICAgIDx0aWZmOkNvbXByZXNzaW9uPjU8L3RpZmY6Q29tcHJlc3Npb24+CiAgICAgICAgIDx0aWZmOlhSZXNvbHV0aW9uPjcyPC90aWZmOlhSZXNvbHV0aW9uPgogICAgICAgICA8dGlmZjpPcmllbnRhdGlvbj4xPC90aWZmOk9yaWVudGF0aW9uPgogICAgICAgICA8dGlmZjpZUmVzb2x1dGlvbj43MjwvdGlmZjpZUmVzb2x1dGlvbj4KICAgICAgICAgPGV4aWY6UGl4ZWxYRGltZW5zaW9uPjUwPC9leGlmOlBpeGVsWERpbWVuc2lvbj4KICAgICAgICAgPGV4aWY6Q29sb3JTcGFjZT4xPC9leGlmOkNvbG9yU3BhY2U+CiAgICAgICAgIDxleGlmOlBpeGVsWURpbWVuc2lvbj41MDwvZXhpZjpQaXhlbFlEaW1lbnNpb24+CiAgICAgICAg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",
1166"/ide/imgs/button-sphero.png":"data:image/png;base64,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",
1167"/ide/imgs/button-wedo2.png":"data:image/png;base64,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",
1168"/ide/imgs/button-microbit.png":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGEAAAA4CAYAAADth5acAAAAAXNSR0IArs4c6QAAAAlwSFlzAAALEwAACxMBAJqcGAAAA6ZpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IlhNUCBDb3JlIDUuNC4wIj4KICAgPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4KICAgICAgPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIKICAgICAgICAgICAgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIgogICAgICAgICAgICB4bWxuczp0aWZmPSJodHRwOi8vbnMuYWRvYmUuY29tL3RpZmYvMS4wLyIKICAgICAgICAgICAgeG1sbnM6ZXhpZj0iaHR0cDovL25zLmFkb2JlLmNvbS9leGlmLzEuMC8iPgogICAgICAgICA8eG1wOk1vZGlmeURhdGU+MjAxOS0wMy0xNFQxNjowMzo4NjwveG1wOk1vZGlmeURhdGU+CiAgICAgICAgIDx4bXA6Q3JlYXRvclRvb2w+UGl4ZWxtYXRvciAzLjQ8L3htcDpDcmVhdG9yVG9vbD4KICAgICAgICAgPHRpZmY6T3JpZW50YXRpb24+
1168MTwvdGlmZjpPcmllbnRhdGlvbj4KICAgICAgICAgPHRpZmY6Q29tcHJlc3Npb24+NTwvdGlmZjpDb21wcmVzc2lvbj4KICAgICAgICAgPHRpZmY6UmVzb2x1dGlvblVuaXQ+MjwvdGlmZjpSZXNvbHV0aW9uVW5pdD4KICAgICAgICAgPHRpZmY6WVJlc29sdXRpb24+NzI8L3RpZmY6WVJlc29sdXRpb24+CiAgICAgICAgIDx0aWZmOlhSZXNvbHV0aW9uPjcyPC90aWZmOlhSZXNvbHV0aW9uPgogICAgICAgICA8ZXhpZjpQaXhlbFhEaW1lbnNpb24+OTc8L2V4aWY6UGl4ZWxYRGltZW5zaW9uPgogICAgICAgICA8ZXhpZjpDb2xvclNwYWNlPjE8L2V4aWY6Q29sb3JTcGFjZT4KICAgICAgICAgPGV4aWY6UGl4ZWxZRGltZW5zaW9uPjU2PC9leGlmOlBpeGVsWURpbWVuc2lvbj4KICAgICAgPC9yZGY6RGVzY3JpcHRpb24+CiAgIDwvcmRmOlJERj4KPC94OnhtcG1ldGE+Cuz//+wAAAg4SURBVHgB7ZsNaJVVGMe3XKlzGnNL10wDNfuQIFuFJTYTM8PQoiIlKTXow4xJVkQoFEhIfpQWfWBRZH5EhpRUhjURkyRtEoo005X5senmaB9uU+fW73+5d9vdfd/7nvPeu7nt3gf+e9/3nOd5znOe557znvO8Z6kpHUzNzc0jaGII6AfqwSlwIjU1tZprlyPsHYBRuWAw6A3+AyXYW8G1Qyg13lrpRBY67wJ3gHHgRjAIXAaaQR2oBQrIBdAEVH4pSX6QfZeDvkA/GEHlsvMo2AN+BHsJSDHXuFHcgoDzR2HVbDAd3AR6Kp2hY3+AraCQgPwea0djDgLO16/9BTAJaBQkEmlKLQTrwWYC0uin876DgPPzaXAhmAg0dBOdvsIBywnEb7aOsA4Czr+bRhaAKUDzZ5JaPXCM29cIxBetRd53xkHA+Xpx6Zf/KhjorTphOc7T8xVgEcHQosOTjIJAAPSLXwae99SYZAh54DNuXiEQ5aECt6tnEAhABsKrwRw3JclyVw9soWYhgfjLlYOKqEEIjoAP4HsympJkXVQPbKe2gEDsd+PyCsKHCD7jJpwsN/bADjjnE4gDThJ62ToSo2AJFckAOHrH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",
1169"/ide/imgs/button-hifive.png":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABsAAAAiCAMAAACZf1ICAAAAMFBMVEVHcEz///////////////////////////////////////////////////////////9EPuwCAAAAD3RSTlMAQHAwgJ+/3+9gIBDPUI/26UBlAAAACXBIWXMAAAsSAAALEgHS3X78AAAAmklEQVQokd3TQRLDIAgFUBBFTdNy/9t2qgWTiF10mT/D6i1+QghYiEUywRxCyiIiBePzgkkO2R9HqnJKGoLIZ8sqW5YpajyTmUO3MAxFmHxr+yjkWs/+w6RbwNSmYhxU4LtAtLHEbgTBRpP952ypsOxjfXenD9XmvnZPi7bNbOqLY9fXvtLP1+0L62+kx+tZb/vfXo59fkEAeAOh5iTfoBBF1wAAAABJRU5ErkJggg=="},_scale:1,_pattern:/^[0-9a-fA-F]+\.(png|jpg)$/,
1170reLabel:RegExp(/(?:\{(?:[-0-9A-Za-z\u00C0-\u0FFF:#_./!?, ]+|\{[0-9]+\})+\})/g),revLabel:RegExp(/\{(choice:)?([a-zA-Z0-9 ]+):?(([-0-9A-Za-z\u00C0-\u0FFF#_./!?, ]+|\{[0-9]+\})+)?}/g),reHexColor:RegExp(/^[0-9A-Fa-f]{6}
1170$/),allowAddInOptions:!0,getImage:function(a){if(Blocks.images[a])b=Blocks.images[a];else if(Blocks.images["/ide/imgs/"+a])b=Blocks.images["/ide/imgs/"+a];else{var b=new Image;b.onload=function(){b.ready=true;window.IDE&&window.IDE.computeAll&&IDE.computeAll();window.IDE&&window.IDE.draw&&
1171IDE.draw()};if(a.indexOf("/")>=0||a.indexOf("data:")===0)b.src=Blocks.encoded[a]?Blocks.encoded[a]:a;else if(Blocks.images["/ide/imgs/"+a]===null){a="/ide/imgs/"+a;b.src=a}else b.src=Blocks._pattern.test(a)?"/assets2/assets/"+a:"/ide/imgs/puzzler/"+a;Blocks.images[a]=b}return b},findBlockWithId:function(a,b){if(a instanceof Block){if(a.id==b)return a;var c=Blocks.findBlockWithId(a.label,b);if(c!=null)return c;for(var d=0;d<a._containers.length;d++){c=Blocks.findBlockWithId(a._containers[d],b);if(c!=
1172null)return c}if(a.next!=null){c=Blocks.findBlockWithId(a.next,b);if(c!=null)return c}}else if(a instanceof Label){if(a.id==b)return a;for(d=0;d<a._children.length;d++){c=Blocks.findBlockWithId(a._children[d],b);if(c!=null)return c}}else if(a instanceof LabelInput&&a._child!=null){c=Blocks.findBlockWithId(a._child,b);if(c!=null)return c}return null},measureText:function(a,b){if(!Blocks.fontCtx)Blocks.fontCtx={};b||(b=defaultLabelFont);if(!Blocks.fontCtx[b]){Blocks.fontCtx[b]=$("<canvas></canvas>")[0].getContext("2d");
1173Blocks.fontCtx[b].font=defaultLabelFontWeight+" "+defaultLabelFontSize+"px "+b}return Blocks.fontCtx[b].measureText(a)}};$(document).ready(function(){for(var a in Blocks.images)Blocks.images[a]=Blocks.getImage(a);Blocks.measureText("monospace",defaultCodeLabelFont)});
1174function Block(a){this.cat=a.cat!==void 0?a.cat:"flow";this.func=a.func!==void 0?a.func:"nop";this.id=a.id!==void 0?a.id:0;if(a.name)this.name=a.name;this.hasFlap=a.hasFlap!==void 0?a.hasFlap:true;this.hasSlot=a.hasSlot!==void 0?a.hasSlot:true;this.color=g_catColor[a.cat]!==void 0?g_catColor[a.cat]:g_defaultStepColor;if(Blocks._enableCustomColors&&a.color)this.color=a.color;this.marked=a.marked!==void 0?a.marked:false;this.hilight=false;if(a.note)this.note=a.note;this.totalHeight=this.height=this.width=
1175this.y=this.x=0;this._containers=[];if(a.containers!==void 0){this._containerLabels=[];for(var b=0;b<a.containers;b++){this._containers.push(null);if(b>0){var c;if(b<a.containers-1){c=window.RenderCode?RenderCode.getElseIfLabel(this):"else if {boolean} then";c=new Label({label:c,cat:this.cat})}else if(b<a.containers){c=window.RenderCode?RenderCode.getElseLabel(this):"else";c=new Label({label:c,cat:this.cat})}c.parent=this;c.draggable=false;this._containerLabels.push(c)}}}this.parent=this.next=null;
1176this.labelText=a.label?a.label:a.name?a.name:"";if(!this.hasFlap&&!this.hasSlot){this.labelText="Code Notes";this.width=100;this.totalHeight=this.height=24}b=this.labelText;window.RenderCode&&(b=RenderCode.getCodeStartLabel(this));this.locked=a.locked?true:false;this.hidden=a.hidden?true:false;this.func=="registerFunction"&&!this.locked&&(b=b+" {button:editfn}");this.label=new Label({label:b,cat:this.cat,varargs:a.varargs});this.label.parent=this;this.label.draggable=false}
1177Block.prototype.reRender=function(){var a=ObjectIO.genScriptObj(this),a=ObjectIO.deserializeScriptStep(a);this.cat=a.cat;this.func=a.func;if(a.name)this.name=a.name;this.hasFlap=a.hasFlap;this.hasSlot=a.hasSlot;this.color=a.color;this.marked=a.marked;this.hilight=a.hilight;if(a.note)this.note=a.note;if(this._containers=a._containers)for(var b=0;b<this._containers.length;b++)if(this._containers[b])this._containers[b].parent=this;if(this._containerLabels=a._containerLabels)for(b=0;b<this._containerLabels.length;b++)if(this._containerLabels[b])this._containerLabels[b].parent=
1178this;if(this.next=a.next)this.next.parent=this;this.labelText=a.labelText;this.label=a.label;this.label.parent=this;this._computeBlockBounds()};Block.prototype.convertToLabel=function(){var a=this.label.copy();a.name=this.name;a.cat=this.cat;a.parent=null;a.draggable=true;a.label=a.labelText;return a};
1179Block.prototype.setDisabled=function(a){this.disabled=a;this.label.setDisabled(a);for(var b=0;b<this._containers.length;b++)this._containers[b]!=null&&this._containers[b].setDisabled(a);this.next!=null&&this.next.setDisabled(a)};
1180Block.prototype.selectInBounds=function(a,b,c,d){this.showSelected=!(a>this.x+this.width||a+c<this.x||b>this.y+this.height||b+d<this.y);this.label.selectInBounds(a,b,c,d);if(this.showSelected)for(var f=0;f<this._containers.length;f++)this._containers[f]!=null&&this._containers[f].setSelected(true,true);else for(f=0;f<this._containers.length;f++)this._containers[f]!=null&&this._containers[f].selectInBounds(a,b,c,d);this.next!=null&&this.next.selectInBounds(a,b,c,d)};
1181Block.prototype.setSelected=function(a,b){this.showSelected=a;this.label.setSelected(a,b);for(var c=false,d=0;d<this._containers.length;d++)this._containers[d]!=null&&(b===false||b===true?this._containers[d].setSelected(a,true):this._containers[d].setSelected(a,-b)&&(c=true));if(this._containerLabels)for(d=0;d<this._containerLabels.length;d++)this._containerLabels[d].setSelected(a,true);if(b)if(!c&&this.id!=b&&this.id!=-b){if(this.next!=null)return this.next.setSelected(a,b)}else{this.next!=null&&
1182this.next.setSelected(b<0,true);return true}return c};Block.prototype.setCurrent=function(){this.getRoot()._setCurrent(this)};Block.prototype._setCurrent=function(a){this.isCurrent=this==a?true:false;for(var b=0;b<this._containers.length;b++)this._containers[b]!=null&&this._containers[b]._setCurrent(a);this.next!=null&&this.next._setCurrent(a)};
1183Block.prototype.setOutline=function(a){this.showOutline=a;this.label.setOutline(a);for(var b=0;b<this._containers.length;b++)this._containers[b]!=null&&this._containers[b].setOutline(a);this.next!=null&&this.next.setOutline(a)};
1184Block.prototype.copy=function(){var a=new Block({cat:this.cat,func:this.func,label:this.labelText,name:this.name,containers:this._containers.length,containerLabels:this._containers.length,hasFlap:this.hasFlap,hasSlot:this.hasSlot,color:this.color,locked:this.locked,hidden:this.hidden});a.label=this.label.copy();a.label.parent=a;a.labelText=this.labelText;if(this.marked)a.marked=true;if(this.locked)a.locked=true;if(this.tags&&this.tags.length>0){a.tags=[];for(var b=0;b<this.tags.length;b++)a.tags.push(this.tags[b])}a.x=
1185this.x;a.y=this.y;a.width=this.width;a.height=this.height;if(this._containers.length>1)a._containerLabels=[];for(b=0;b<this._containers.length;b++){if(this._containers[b]!=null){a._containers[b]=this._containers[b].copy();a._containers[b].parent=a}if(b>0){var c=this._containerLabels[b-1].copy();c.labelText=this._containerLabels[b-1].labelText;c.parent=a;a._containerLabels[b-1]=c}}if(this.next!=null){a.next=this.next.copy();a.next.parent=a}return a};
1186Block.prototype.copySelection=function(){var a=null;if(this.showSelected){a=new Block({cat:this.cat,func:this.func,label:this.labelText,name:this.name,containers:this._containers.length,hasFlap:this.hasFlap,hasSlot:this.hasSlot,color:this.color});a.label=this.label.copy();a.label.parent=a;a.labelText=this.labelText;a.x=this.x;a.y=this.y;a.width=this.width;a.height=this.height;for(var b=0;b<this._containers.length;b++){if(this._containers[b]!=null){a._containers[b]=this._containers[b].copy();a._containers[b].parent=
1187a}if(b>0){var c=this._containerLabels[b-1].copy();c.labelText=this._containerLabels[b-1].labelText;c.parent=a;a._containerLabels[b-1]=c}}if(this.next!=null){a.next=this.next.copySelection();if(a.next!=null)a.next.parent=a}}return a};
1188Block.prototype.copyUntil=function(a){var b=new Block({cat:this.cat,func:this.func,label:this.labelText,name:this.name,containers:this._containers.length,hasFlap:this.hasFlap,hasSlot:this.hasSlot,color:this.color});b.label=this.label.copy();b.label.parent=b;b.x=this.x;
1188b.y=this.y;b.width=this.width;b.height=this.height;for(var c=0;c<this._containers.length;c++){if(this._containers[c]!=null){b._containers[c]=this._containers[c].copyUntil(a);b._containers[c].parent=b}if(c>0){var d=this._containerLabels[c-
11891].copy();d.labelText=this._containerLabels[c-1].labelText;d.parent=b;b._containerLabels[c-1]=d}}if(this.next!=null){b.next=this.next.copyUntil(a);b.next.parent=b}return b};Block.prototype.getMaxWidth=function(){var a=this.width;if(this.next){var b=this.next.getMaxWidth();b>a&&(a=b)}for(var c=0;c<this._containers.length;c++){b=this._containers[c];if(b!=null){b=b.getMaxWidth();b+containerLeft>a&&(a=b+containerLeft)}}return a};
1190Block.prototype.getImage=function(a,b,c){var d=null;b||(b=1);c!==void 0&&(d=c/b);if(this.hasFlap)this.y=this.y+slotHeight;this._computeBounds();var c=this.getMaxWidth(),c=$('<canvas width="'+(c+1)*b+'" height="'+(this.totalHeight+slotHeight+1)*b+'"></canvas>'),f=c[0].getContext("2d");f.translateX=0;f.translateY=0;f.offsetX=0;f.offsetY=0;f.translate(0.5,0.5);f.scale(b,b);this.draw(f);var b=c[0].toDataURL(),e=new Image;e.onload=function(){if(d!==null){e.width=e.width*d;e.height=e.height*d}a&&a(e)};
1191e.src=b;if(this.hasFlap)this.y=this.y-slotHeight;return e};Block.prototype.addToContainer=function(a,b){if(a>=0&&a<this._containers.length){var c=this._containers[a];if(c!=null){for(var d=b;d.next!=null;)d=d.next;d.next=c;c.parent=d}this._containers[a]=b;if(b!=null)b.parent=this;this._computeBounds()}};
1192Block.prototype.appendToContainer=function(a,b){if(b&&a>=0&&a<this._containers.length){var c=this._containers[a];if(c!=null){for(;c.next!=null;)c=c.next;c.next=b;b.parent=c}else{b.parent=this;this._containers[a]=b}this._computeBounds()}};Block.prototype.getNumContainers=function(){return this._containers.length};Block.prototype.getBlockAtContainer=function(a){return a>=0&&a<this._containers.length?this._containers[a]:null};
1193Block.prototype.getLabelAtContainer=function(a){return a==0?this.label:this._containerLabels[a-1]};Block.prototype.indexForBlockInContainer=function(a){for(var b=0;b<this._containers.length;b++)if(this._containers[b]==a)return b;return-1};Block.prototype.add=function(a){if(a){if(this.next!=null){for(var b=a;b.next!=null;)b=b.next;b.next=this.next;this.next.parent=b}this.next=a;a.parent=this;this._computeBounds()}};Block.prototype.getLastBlock=function(){for(var a=this;a.next!=null;)a=a.next;return a};
1194Block.prototype.append=function(a){if(a){for(var b=this;b.next!=null;)b=b.next;b.next=a;a.parent=b;this._computeBounds()}};Block.prototype.detach=function(){var a=this.parent;if(a!=null){for(var b=false,c=0;c<a._containers.length;c++)if(a._containers[c]==this){a._containers[c]=null;b=true;break}if(!b)a.next=null;this.parent=null;a._computeBounds()}};
1195Block.prototype.detachSelected=function(){var a=null;if(this.showSelected){this.showSelected=false;for(a=this.next;a&&a.showSelected;)a=a.next;if(a&&a.parent){a.parent.next=null;a.parent=null}else a=null;var b=this.parent;if(b!=null){for(var c=false,d=0;d<b._containers.length;d++)if(b._containers[d]==this){if(b._containers[d]=a)a.parent=b;c=true;break}if(!c){if(a)a.parent=b;b.next=a}this.parent=null;b._computeBounds();a=null}this.setSelected(false,true)}a&&a._computeBounds();return a};
1196Block.prototype.getInputAtPoint=function(a,b){var c=this.label.getInputAtPoint(a,b);if(!c&&this._containerLabels&&this._containerLabels.length>0)for(var d=0;d<this._containerLabels.length;d++)if(c=this._containerLabels[d].getInputAtPoint(a,b))break;return c};
1197Block.prototype.getChildAtPoint=function(a,b){if(a>=this.x){var c;if(this.hasFlap){if(a<=this.x+this.label.width+labelHorzPadding&&b>=this.y&&b<=this.y+this.label.height+labelVertPadding*2){c=this.label.getChildAtPoint(a,b);return c!=null&&c!=this.label?c:this.locked?null:this}c=this.label.height+labelVertPadding*2}else if(this.hasSlot){if(a<=this.x+this.label.width+labelHorzPadding+this.label.height&&b>=this.y&&b<=this.y+this.label.height+labelVertPadding*2+containerSeparator/2){c=this.label.getChildAtPoint(a,
1198b);return c!=null&&c!=this.label?c:this.locked?null:this}c=this.label.height+labelVertPadding*2+containerSeparator/2}else return a<=this.x+this.width&&b>=this.y&&b<=this.y+this.height?this.locked?null:this:null;for(var d=0;d<this._containers.length;d++){if(this._containers[d]!=null){var f=this._containers[d].getChildAtPoint(a,b);if(f!=null)return f;c=c+this._containers[d].totalHeight}else c=c+emptyContainerHeight;var f=this.label.width,e=containerSeparator;if(d<this._containers.length-1){f=this._containerLabels[d].width;
1199e=this._containerLabels[d].height+labelVertPadding*2;if(a<=this.x+f+labelHorzPadding&&b>=this.y+c&&b<=this.y+c+e){c=this._containerLabels[d].getChildAtPoint(a,b);return c!=null&&c!=this._containerLabels[d]?c:this.locked?null:this}}c=c+e}if(a>=this.x&&a<=this.x+containerLeft&&b>=this.y&&b<=this.y+c)return this.locked?null:this;if(this.next!=null)if(f=this.next.getChildAtPoint(a,b))return f}return null};
1200Block.prototype.nearValue=function(a,b){for(var c=this;c;){var d=c.label.nearValue(a,b);if(d!=null)return d;if(c._containers!=null)for(var f=0;f<c._containers.length;f++){d=c._containers[f];if(d!=null){d=d.nearValue(a,b);if(d!=null)return d}if(f>0){d=c._containerLabels[f-1].nearValue(a,b);if(d!=null)return d}}c=c.next}return null};
1201Block.prototype.objNearValue=function(a){for(var b=this;b;){var c=b.label.objNearValue(a);if(c!=null)return c;if(b._containers!=null)for(var d=0;d<b._containers.length;d++){c=b._containers[d];if(c!=null){c=c.objNearValue(a);if(c!=null)return c}if(d>0){c=b._containerLabels[d-1].objNearValue(a);if(c!=null)return c}}b=b.next}return null};Block.prototype.blockNearSlot=function(a){return a instanceof Block&&a.hasFlap?this.nearSlot(a.x+slotBegin+slotWidth/2,a.y-slotHeight/2):false};
1202Block.prototype.blockNearFlap=function(a){return a instanceof Block&&a.hasSlot?this.nearFlap(a.x+slotBegin+slotWidth/2,a.y+a.totalHeight-slotHeight/2):false};
1202Block.prototype.blockNearContainer=function(a){if(a instanceof Block&&a._containers.length>0)for(var b=0;b<a._containers.length;b++);return false};
1203Block.prototype.nearSlot=function(a,b){var c=this;if(c.locked&&c.hasFlap&&c.next&&c.next.locked)return null;for(;c;){if(c._containers.length>0)for(var d=c.y+c.label.height+labelVertPadding*2,f=0;f<c._containers.length;f++){var e=c._containers[f];if(a>=c.x+containerLeft+slotBegin-slotSelectionBounds&&a<=c.x+c.width&&b>=d-slotHeight-slotSelectionBounds&&b<=d+slotSelectionBounds)return c.locked&&c.next&&c.next.locked?null:[f,c,c.x+containerLeft,d];if(e!=null){var g=e.nearSlot(a,b);if(g)return g;d=d+
1204e.totalHeight}else d=d+emptyContainerHeight;d=f<c._containers.length-1?d+c._containerLabels[f].height:d+containerSeparator}if(c.hasSlot&&a>=c.x+slotBegin-slotSelectionBounds&&a<=c.x+c.width&&b>=c.y+c.height-slotHeight-slotSelectionBounds&&b<=c.y+c.height+slotSelectionBounds){if(c.locked&&c.next&&c.next.locked)break;return[-1,c,c.x,c.y+c.height]}c=c.next}return null};
1205Block.prototype.nearFlap=function(a,b){for(var c=this;c;){if(c._containers.length>0)for(var d=0;d<c._containers.length;d++){var f=c._containers[d];if(f!=null)if(f=f.nearFlap(a,b))return f}if(c.hasFlap&&a>=c.x+slotBegin-slotSelectionBounds&&a<=c.x+c.width&&b>=c.y-slotHeight-slotSelectionBounds&&b<=c.y+slotSelectionBounds)return[-1,c,c.x,c.y];c=c.next}return null};
1206Block.prototype.getContainerPos=function(a){if(this._containers.length>0)for(var b=this.y+this.label.height+labelVertPadding*2,c=0;c<this._containers.length;c++){var d=this._containers[c];if(c==a)return[this.x+containerLeft,b];b=d!=null?b+d.totalHeight:b+emptyContainerHeight;b=c<this._containers.length-1?b+this._containerLabels[c].height:b+containerSeparator}return[obj.x,obj.y+obj.height]};Block.prototype.getRoot=function(){for(var a=this;a.parent!=null;)a=a.parent;return a};
1207Block.prototype._computeBounds=function(){this.getRoot()._computeBlockBounds()};
1208Block.prototype._computeBlockBounds=function(){if(this.func=="blockComment"&&!this.hasFlap&&!this.hasSlot)this.totalHeight=this.height;else{this.label.x=this.x;this.label.y=this.y+labelVertPadding;if(!this.hasFlap)this.label.y=this.label.y+containerSeparator/2;this.label._computeBlockBounds();this.width=this.label.width+labelHorzPadding;var a=this.label.height+labelVertPadding*2;this.hasFlap||(a=a+startBlockTopHeight);for(var b=0;b<this._containers.length;b++){var c=this._containers[b];if(c!=null){c.x=
1209this.x+containerLeft;c.y=this.y+a;a=a+c._computeBlockBounds()}else a=a+emptyContainerHeight;if(b<this._containers.length-1){c=this._containerLabels[b];c.x=this.x;c.y=this.y+a;c._computeBlockBounds();a=a+(c.height+labelVertPadding*2);if(c.width+labelHorzPadding>this.width)this.width=c.width+labelHorzPadding}
1209else a=window.RenderCode&&RenderCode.isCode()&&RenderCode.getCodeEndLabel(this)?a+(defaultLabelFontSize+6+labelVertPadding*2):a+containerSeparator}this.height=a;if(!this.hasFlap)this.width=this.width+
1210(this.label.height+labelVertPadding*2);if(this.next){this.next.x=window.RenderCode&&RenderCode.startRequiresClosingBracket(this)?this.x+containerLeft:this.x;this.next.y=this.y+a;a=a+this.next._computeBlockBounds()}if(window.RenderCode&&RenderCode.startRequiresClosingBracket(this)){a=RenderCode.getCodeEndLabel(this)?a+(defaultLabelFontSize+6+labelVertPadding*2):a+containerSeparator;this.next||(a=a+emptyContainerHeight)}return this.totalHeight=a}};
1211Block.prototype.draw=function(a){window.WinCode&&(!window.WinCode._hilightStep&&this.showOutline)&&this._drawOutline(a);this._draw(a);window.WinCode&&(window.WinCode._hilightStep&&this.showOutline)&&this._drawOutline(a,4)};
1212Block.prototype._draw=function(a){if(a.translateX+a.offsetX+this.x<a.canvas.width/Blocks._scale&&a.translateY+a.offsetY+this.y<a.canvas.height/Blocks._scale&&a.translateY+a.offsetY+this.y+this.totalHeight>0){if(!this.hasFlap&&!this.hasSlot){a.save();a.translate(this.x,this.y);if(this.showSelected){a.fillStyle=selectionBgColor;a.strokeStyle=selectionStrokeColor}else if(window.RenderCode&&RenderCode.isCode()){a.fillStyle=g_blockCodeColor[0];a.strokeStyle=g_blockCodeColor[2]}else{a.fillStyle=this.color[0];
1213a.strokeStyle=this.color[2]}a.beginPath();a.moveTo(0,0);a.lineTo(this.width,0);a.lineTo(this.width,this.height);a.lineTo(0,this.height);a.lineTo(0,this.height);a.closePath();a.fill();a.stroke();a.save();a.beginPath();a.moveTo(notePadding,notePadding);a.lineTo(this.width-notePadding,notePadding);a.lineTo(this.width-notePadding,this.height-notePadding);a.lineTo(notePadding,this.height-notePadding);a.clip();a.strokeStyle="#000";a.fillStyle="#000";a.font=noteFontHeight+"px "+noteFont;for(var b=breakLines(this.labelText,
1214a,this.width-notePadding*2).lines,c=0;c<b.length;c++)a.fillText(b[c],notePadding,notePadding+noteFontHeight+noteFontHeight*c);
1214a.restore();if(this.showDragHandle){a.strokeStyle="#555";a.globalAlpha=0.3;a.lineWidth=1;for(c=4;c<=16;c=c+3){a.beginPath();a.moveTo(this.width-2.5-c,this.height-2.5);a.lineTo(this.width-2.5,this.height-2.5-c);a.closePath();a.stroke()}}a.restore();return}a.save();if(this.showSelected){a.fillStyle=selectionBgColor;a.strokeStyle=selectionStrokeColor}else{if(window.RenderCode&&
1215RenderCode.isCode()){a.fillStyle=g_blockCodeColor[0];a.strokeStyle=g_blockCodeColor[2]}else{a.fillStyle=this.color[0];a.strokeStyle=this.color[2]}a.lineWidth=labelStrokeWidth}if(this.hilight){a.shadowColor=hilightShadowColor;a.shadowBlur=10;a.fillStyle=hilightFillColor}else if(this.disabled){a.globalAlpha=disabledBlockAlpha;if(disabledFillColor)a.fillStyle=disabledFillColor;if(disabledStrokeColor)a.strokeStyle=disabledStrokeColor}else if(this.marked&&Blocks.showMarked)a.globalAlpha=0.5;a.translate(this.x,
1216this.y);a.beginPath();b=0;if(this.hasFlap){a.moveTo(0,0);a.lineTo(slotBegin,0);a.lineTo(slotBegin,-slotHeight+cornerRadius);a.lineTo(slotBegin+cornerRadius,-slotHeight);a.lineTo(slotBegin+slotWidth-cornerRadius,-slotHeight);a.lineTo(slotBegin+slotWidth,-slotHeight+cornerRadius);a.lineTo(slotBegin+slotWidth,0);a.lineTo(this.label.width+labelHorzPadding-cornerRadius,0);a.lineTo(this.label.width+labelHorzPadding,cornerRadius);b=b+(this.label.height+labelVertPadding*2);a.lineTo(this.label.width+labelHorzPadding,
1217b-cornerRadius);a.lineTo(this.label.width+labelHorzPadding-cornerRadius,b)}else{a.moveTo(cornerRadius,0);a.lineTo(startBlockTopWidth-cornerRadius,0);a.lineTo(startBlockTopWidth,cornerRadius);a.lineTo(startBlockTopWidth,startBlockTopHeight);a.lineTo(this.label.width,startBlockTopHeight);a.arcTo(this.label.width+startBlockRadius,startBlockTopHeight,this.label.width+startBlockRadius,this.label.height+labelVertPadding*2,startBlockRadius);b=b+(this.label.height+labelVertPadding*2+startBlockTopHeight);
1218a.lineTo(this.label.width+startBlockRadius,b-cornerRadius);a.lineTo(this.label.width+startBlockRadius-cornerRadius,b)}for(c=0;c<this._containers.length;c++){a.lineTo(containerLeft+slotBegin+slotWidth,b);a.lineTo(containerLeft+slotBegin+slotWidth,b-slotHeight+cornerRadius);a.lineTo(containerLeft+slotBegin+slotWidth-cornerRadius,b-slotHeight);a.lineTo(containerLeft+slotBegin+cornerRadius,b-slotHeight);a.lineTo(containerLeft+slotBegin,b-slotHeight+cornerRadius);a.lineTo(containerLeft+slotBegin,b);a.lineTo(containerLeft,
1219b);var d=this._containers[c],b=d!=null?b+d.totalHeight:b+emptyContainerHeight;a.lineTo(containerLeft,b);if(this._containers[c]!=null){a.lineTo(containerLeft+slotBegin,b);a.lineTo(containerLeft+slotBegin,b-slotHeight);a.lineTo(containerLeft+slotBegin+slotWidth,b-slotHeight);a.lineTo(containerLeft+slotBegin+slotWidth,b)}if(c<this._containers.length-1){if(cornerRadius>0&&c<this._containers.length-1){a.lineTo(this._containerLabels[c].width+labelHorzPadding-cornerRadius,b);a.lineTo(this._containerLabels[c].width+
1220labelHorzPadding,b+cornerRadius)}else a.lineTo(this._containerLabels[c].width+labelHorzPadding,b);b=b+(this._containerLabels[c].height+labelVertPadding*2);if(cornerRadius>0){a.lineTo(this._containerLabels[c].width+labelHorzPadding,b-cornerRadius);a.lineTo(this._containerLabels[c].width+labelHorzPadding-4,b)}else a.lineTo(this._containerLabels[c].width+labelHorzPadding,b)}else{d=this.label.width;d=60;if(cornerRadius>0&&c<this._containers.length-1){a.lineTo(d+labelHorzPadding-cornerRadius,b);a.lineTo(d+
1221labelHorzPadding,b+cornerRadius)}else a.lineTo(d+labelHorzPadding,b);
1221b=window.RenderCode&&RenderCode.isCode()&&RenderCode.getCodeEndLabel(this)?b+(defaultLabelFontSize+6+labelVertPadding*2):b+containerSeparator}}if(this._containers.length>0){d=60;a.lineTo(d+labelHorzPadding,b-cornerRadius);a.lineTo(d+labelHorzPadding-cornerRadius,b)}if(this.hasSlot)if(window.RenderCode&&RenderCode.startRequiresClosingBracket(this)){a.lineTo(containerLeft+slotBegin+slotWidth,b);a.lineTo(containerLeft+slotBegin+slotWidth,
1222b-slotHeight+cornerRadius);a.lineTo(containerLeft+slotBegin+slotWidth-cornerRadius,b-slotHeight);a.lineTo(containerLeft+slotBegin+cornerRadius,b-slotHeight);a.lineTo(containerLeft+slotBegin,b-slotHeight+cornerRadius);a.lineTo(containerLeft+slotBegin,b)}else{a.lineTo(slotBegin+slotWidth,b);a.lineTo(slotBegin+slotWidth,b-slotHeight+cornerRadius);a.lineTo(slotBegin+slotWidth-cornerRadius,b-slotHeight);a.lineTo(slotBegin+cornerRadius,b-slotHeight);a.lineTo(slotBegin,b-slotHeight+cornerRadius);a.lineTo(slotBegin,
1223b)}if(window.RenderCode&&RenderCode.startRequiresClosingBracket(this)){d=60;c=containerSeparator;RenderCode.getCodeEndLabel(this)&&(c=defaultLabelFontSize+6+labelVertPadding*2);a.lineTo(containerLeft,b);a.lineTo(containerLeft,this.totalHeight-c);if(this.next){a.lineTo(containerLeft+slotBegin,this.totalHeight-c);a.lineTo(containerLeft+slotBegin,this.totalHeight-c-slotHeight);a.lineTo(containerLeft+slotBegin+slotWidth,this.totalHeight-c-slotHeight);a.lineTo(containerLeft+slotBegin+slotWidth,this.totalHeight-
1224c)}a.lineTo(d+labelHorzPadding,this.totalHeight-c);a.lineTo(d+labelHorzPadding,this.totalHeight);a.lineTo(0,this.totalHeight)}else a.lineTo(0,b);a.lineTo(0,cornerRadius);a.closePath();a.fill();a.stroke();
1224a.restore();this.label.draw(a);for(c=0;c<this._containers.length;c++){d=this._containers[c];if(c>0){a.save();this._containerLabels[c-1].draw(a);a.restore()}d!=null&&d._draw(a)}if(window.RenderCode&&RenderCode.isCode())if(this._containers.length>0){c=RenderCode.getCodeEndLabel(this);a.save();a.translate(this.x,
1225this.y);a.beginPath();a.textAlign="left";a.textBaseline="middle";a.strokeStyle=g_defaultStepColor[3];a.fillStyle=g_defaultStepColor[3];a.font=defaultLabelFontWeight+" "+defaultLabelFontSize+"px "+defaultCodeLabelFont;a.fillText(c,labelHorzPadding+labelRadius,b-labelVertPadding-(defaultLabelFontSize+6)/2);a.restore()}else if(RenderCode.startRequiresClosingBracket(this)){c=RenderCode.getCodeEndLabel(this);a.save();a.translate(this.x,this.y);a.beginPath();a.textAlign="left";a.textBaseline="middle";a.strokeStyle=
1226g_defaultStepColor[3];a.fillStyle=g_defaultStepColor[3];a.font=defaultLabelFontWeight+" "+defaultLabelFontSize+"px "+defaultCodeLabelFont;a.fillText(c,labelHorzPadding+labelRadius,this.totalHeight-labelVertPadding-(defaultLabelFontSize+6)/2);a.restore()}}this.next!=null&&this.next._draw(a)};
1227Block.prototype._drawOutline=function(a,b){if(a.translateX+a.offsetX+this.x<a.canvas.width/Blocks._scale&&a.translateY+a.offsetY+this.y<a.canvas.height/Blocks._scale&&a.translateY+a.offsetY+this.y+this.totalHeight>0){if(window.WinCode&&(!window.WinCode._hilightStep||this.isCurrent)){a.save();a.fillStyle=outlineColor;a.strokeStyle=outlineColor;a.lineWidth=b?b:outlineWidth;a.lineCap="round";a.translate(this.x,this.y);a.beginPath();var c=0;if(this.hasFlap){a.moveTo(0,0);a.lineTo(slotBegin,0);a.lineTo(slotBegin,
1228-slotHeight+cornerRadius);a.lineTo(slotBegin+cornerRadius,-slotHeight);a.lineTo(slotBegin+slotWidth-cornerRadius,-slotHeight);a.lineTo(slotBegin+slotWidth,-slotHeight+cornerRadius);a.lineTo(slotBegin+slotWidth,0);a.lineTo(this.label.width+labelHorzPadding-cornerRadius,0);a.lineTo(this.label.width+labelHorzPadding,cornerRadius);c=c+(this.label.height+labelVertPadding*2);a.lineTo(this.label.width+labelHorzPadding,c-cornerRadius);a.lineTo(this.label.width+labelHorzPadding-cornerRadius,c)}else{a.moveTo(cornerRadius,
12290);a.lineTo(startBlockTopWidth-cornerRadius,0);a.lineTo(startBlockTopWidth,cornerRadius);a.lineTo(startBlockTopWidth,startBlockTopHeight);a.lineTo(this.label.width,startBlockTopHeight);a.arcTo(this.label.width+startBlockRadius,startBlockTopHeight,this.label.width+startBlockRadius,this.label.height+labelVertPadding*2,startBlockRadius);c=c+(this.label.height+labelVertPadding*2+startBlockTopHeight);a.lineTo(this.label.width+startBlockRadius,c-cornerRadius);a.lineTo(this.label.width+startBlockRadius-
1230cornerRadius,c)}for(var d=0;d<this._containers.length;d++){a.lineTo(containerLeft+slotBegin+slotWidth,c);a.lineTo(containerLeft+slotBegin+slotWidth,c-slotHeight+cornerRadius);a.lineTo(containerLeft+slotBegin+slotWidth-cornerRadius,c-slotHeight);a.lineTo(containerLeft+slotBegin+cornerRadius,c-slotHeight);a.lineTo(containerLeft+slotBegin,c-slotHeight+cornerRadius);a.lineTo(containerLeft+slotBegin,c);a.lineTo(containerLeft,c);var f=this._containers[d],c=f!=null?c+f.totalHeight:c+emptyContainerHeight;
1231a.lineTo(containerLeft,c);if(this._containers[d]!=null){a.lineTo(containerLeft+slotBegin,c);a.lineTo(containerLeft+slotBegin,c-slotHeight);a.lineTo(containerLeft+slotBegin+slotWidth,c-slotHeight);a.lineTo(containerLeft+slotBegin+slotWidth,c)}if(d<this._containers.length-1){if(cornerRadius>0&&d<this._containers.length-1){a.lineTo(this._containerLabels[d].width+labelHorzPadding-cornerRadius,c);a.lineTo(this._containerLabels[d].width+labelHorzPadding,c+cornerRadius)}else a.lineTo(this._containerLabels[d].width+
1232labelHorzPadding,c);c=c+this._containerLabels[d].height;if(cornerRadius>0){a.lineTo(this._containerLabels[d].width+labelHorzPadding,c-cornerRadius);a.lineTo(this._containerLabels[d].width+labelHorzPadding-4,c)}else a.lineTo(this._containerLabels[d].width+labelHorzPadding,c)}else{f=this.label.width;f=60;if(cornerRadius>0&&d<this._containers.length-1){a.lineTo(f+labelHorzPadding-cornerRadius,c);a.lineTo(f+labelHorzPadding,c+cornerRadius)}else a.lineTo(f+labelHorzPadding,c);
1232c=window.RenderCode&&RenderCode.isCode()&&
1233RenderCode.getCodeEndLabel(this)?c+(defaultLabelFontSize+6+labelVertPadding*2):c+containerSeparator}}if(this._containers.length>0){f=60;a.lineTo(f+labelHorzPadding,c-cornerRadius);a.lineTo(f+labelHorzPadding-cornerRadius,c)}if(this.hasSlot)if(window.RenderCode&&RenderCode.startRequiresClosingBracket(this)){a.lineTo(containerLeft+slotBegin+slotWidth,c);a.lineTo(containerLeft+slotBegin+slotWidth,c-slotHeight+cornerRadius);a.lineTo(containerLeft+slotBegin+slotWidth-cornerRadius,c-slotHeight);a.lineTo(containerLeft+
1234slotBegin+cornerRadius,c-slotHeight);a.lineTo(containerLeft+slotBegin,c-slotHeight+cornerRadius);a.lineTo(containerLeft+slotBegin,c)}else{a.lineTo(slotBegin+slotWidth,c);a.lineTo(slotBegin+slotWidth,c-slotHeight+cornerRadius);a.lineTo(slotBegin+slotWidth-cornerRadius,c-slotHeight);a.lineTo(slotBegin+cornerRadius,c-slotHeight);a.lineTo(slotBegin,c-slotHeight+cornerRadius);a.lineTo(slotBegin,c)}if(window.RenderCode&&RenderCode.startRequiresClosingBracket(this)){f=60;d=containerSeparator;RenderCode.getCodeEndLabel(this)&&
1235(d=defaultLabelFontSize+6+labelVertPadding*2);a.lineTo(containerLeft,c);a.lineTo(containerLeft,this.totalHeight-d);a.lineTo(f+labelHorzPadding,this.totalHeight-d);if(this.next){a.lineTo(containerLeft+slotBegin,this.totalHeight-d);a.lineTo(containerLeft+slotBegin,this.totalHeight-d-slotHeight);a.lineTo(containerLeft+slotBegin+slotWidth,this.totalHeight-d-slotHeight);a.lineTo(containerLeft+slotBegin+slotWidth,this.totalHeight-d)}a.lineTo(f+labelHorzPadding,this.totalHeight-d);a.lineTo(f+labelHorzPadding,
1236this.totalHeight);a.lineTo(0,this.totalHeight)}else a.lineTo(0,c);a.lineTo(0,cornerRadius);a.closePath();a.stroke();
1236a.restore()}for(d=0;d<this._containers.length;d++){f=this._containers[d];f!=null&&f._drawOutline(a,b)}}this.next!=null&&this.next._drawOutline(a,b)};
1237var cornerRadius=2,labelRadius=6,labelAnyRadius=3,labelStrokeWidth=1,minLabelHeight=11,minLabelWidth=80,labelHorzPadding=3,labelVertPadding=2,labelBottomPadding=4,slotHeight=6,slotWidth=20,slotTaper=2,slotBegin=20,startBlockTopHeight=7,startBlockTopWidth=40,startBlockRadius=18,emptyContainerHeight=15,containerSeparator=10,containerLeft=15,defaultStepOutlineColor="#fff",defaultStepColor="#ccc",defaultStepFontColor="#000",defaultFontCommentColor="#020",defaultFontColor="#fff",defaultInputFontColor=
1238"#333333",defaultInputFontColorFocus="#fff",defaultInputBgColor="rgba(255,255,255,.7)",defaultInputBgColorFocus="rgba(255,255,255,.9)",defaultInputLineColor="rgba(255,255,255,.7)",defaultInputCodeFontColor="#404040",defaultInputCodeFontColorFocus="#fff",defaultInputCodeBgColor="#fff",defaultInputCodeBgColorFocus="#fff",defaultInputCodeLineColor="rgba(0,0,0,.7)",defaultLabelFontWeight="normal",defaultLabelFont="Open Sans",defaultCodeLabelFont="Droid Sans Mono",defaultLabelFontSize=13,defaultLabelInputFontWeight=
1239"normal",defaultLabelInputFont="Open Sans",defaultCodeLabelInputFont="Droid Sans Mono",defaultLabelInputFontSize=13,defaultLabelColor="#999",defaultLabelOutlineColor="#666",defaultLabelLeftPadding=4,slotSelectionBounds=10,valueSelectionBounds=10,selectionBgColor="#E6E6FA",selectionStrokeColor="#000",selectionTextColor="#000",selectionWidth=4,outlineColor="#0f0",outlineWidth=10,dropdownColor="#fff",buttonStrokeColor="#dc8425",buttonFillColor="#fac206",buttonAddLabel=" + ",buttonRemoveLabel=" - ",buttonEditLabel=
1240"edit",noteFontHeight=12,noteFont="Arial",notePadding=4,checkboxWidth=14,checkboxHeight=14,checkboxPadRight=6,checkboxOffset=4,bubblePadding=10,bubbleFontLinePadding=4,buttonOffsetX=0,buttonOffsetY=14,buttonPadding=4,buttonSidePadding=10,buttonSkew=4,windowPadding=0,windowBorder=4,resMargin=4,resPadding=4,resBorder=1,disabledBlockAlpha=0.2,disabledLabelAlpha=0.1,disabledFillColor="#555",disabledStrokeColor="#ccc",hilightFillColor="#0f0",hilightStrokeColor="#0f0",hilightShadowColor="#0f0",blockLabelColor=
1241"#ffffff",blockStrokeColor="rgba(0,0,0,.1)",g_defaultStepColor=["#e85c41","#e85c41","rgba(0,0,0,.1)","#fff",!1],g_catColor={common:["#db5800","#db5800","rgba(0,0,0,.1)","#fff",!1],events:["#f7990f","#f7990f","rgba(0,0,0,.1)","#fff",!1],flow:["#db5800","#db5800","rgba(0,0,0,.1)","#fff",!1],library:["#0f59ae","#0f59ae","rgba(0,0,0,.1)","#fff",!1],motion:["#3067e2","#3067e2","rgba(0,0,0,.1)","#fff",!1],animation:["#04a8a8","#04a8a8","rgba(0,0,0,.1)","#fff",!1],looks:["#6050a5","#6050a5","rgba(0,0,0,.1)",
1242"#fff",!1],looksbg:["#6050a5","#6050a5","rgba(0,0,0,.1)","#fff",!1],particles:["#9d2ed3","#9d2ed3","rgba(0,0,0,.1)","#fff",!1],sensing:["#4e8cc4","#4e8cc4","rgba(0,0,0,.1)","#fff",!1],sound:["#9e49b2","#9e49b2","rgba(0,0,0,.1)","#fff",!1],operator:["#5fad3e","#5fad3e","rgba(0,0,0,.1)","#fff",!1],pen:["#2b995d","#2b995d","rgba(0,0,0,.1)","#fff",!1],physics:["#cc4848","#cc4848","rgba(0,0,0,.1)","#fff",!1],"var":["#b56684","#b56684","rgba(0,0,0,.1)","#fff",!1],variables:["#b56684","#b56684","rgba(0,0,0,.1)",
1243"#fff",!1],localvar:["#b56684","#b56684","rgba(0,0,0,.1)","#fff",!1],properties:["#b56684","#b56684","rgba(0,0,0,.1)","#fff",!1],comment:["#ffffeb","#ffffeb","rgba(0,0,0,.1)","#fff",!1],list:["#cc5a5a","#cc5a5a","rgba(0,0,0,.1)","#fff",!1],obj:["#cc5a5a","#cc5a5a","rgba(0,0,0,.1)","#fff",!1],functions:["#857bc6","#857bc6","rgba(0,0,0,.1)","#fff",!1],network:["#db5800","#db5800","rgba(0,0,0,.1)","#fff",!1],system:["#db5800","#db5800","rgba(0,0,0,.1)","#fff",!1],hardware:["#4f8738","#4f8738","rgba(0,0,0,.1)",
1244"#fff",!1],tynkervm:["#4f8738","#4f8738","rgba(0,0,0,.1)","#fff",!1],mcpe:["#af7c4f","#af7c4f","rgba(0,0,0,.1)","#fff",!1],nop:["#333333","#333333","rgba(0,0,0,.1)","#fff",!1],cloud:["#db5800","#db5800","rgba(0,0,0,.1)","#fff",!1],ar:["#9d2ed3","#9d2ed3","rgba(0,0,0,.1)","#fff",!1],player:["#3bb5af","#3bb5af","rgba(0,0,0,.1)","#fff",!1],world:["#9d2ed3","#9d2ed3","rgba(0,0,0,.1)","#fff",!1],block:["#907eff","#907eff","rgba(0,0,0,.1)","#fff",!1],drone:["#0f59ae","#0f59ae","rgba(0,0,0,.1)","#fff",!1],
1245inventory:["#ee4a4b","#ee4a4b","rgba(0,0,0,.1)","#fff",!1],utilities:["#0f59ae","#0f59ae","rgba(0,0,0,.1)","#fff",!1]},g_blockCodeColor=["#404969","#404969","rgba(0,0,0,.1)","#fff",!1];embedUrl="/ide/embedded?p=";shareUrl="/play?p=";var g_ord=" 1st 2nd 3rd 4th 5th 6th 7th 8th 9th 10th".split(" ");helpHoverTimeout=2E3;undoLimit=videoUpdateInterval=50;
1246function Label(a){this.cat=a.cat!==void 0?a.cat:"flow";this.func=a.func!==void 0?a.func:"nop";this.id=a.id!==void 0?a.id:0;this.watchable=a.watchable!==void 0?a.watchable:false;this.watching=a.watching!==void 0?a.watching:false;if(a.value)this.value=a.value;this.draggable=a.draggable!==void 0?a.draggable:true;this.hidden=a.hidden!==void 0?a.hidden:false;this.parent=null;this._children=[];this.hilight=false;this.marked=a.marked!==void 0?a.marked:false;this.color=g_catColor[a.cat]!==void 0?g_catColor[a.cat]:
1247g_defaultStepColor;if(Blocks._enableCustomColors&&a.color)this.color=a.color;if(a.note)this.note=a.note;this.height=this.width=this.y=this.x=0;var b;if(a.name){this.name=a.name;this.func=="valueControlCall"||this.func=="valueControlCallLibrary"?this.label=b=a.label?a.label:a.name?a.name:"":b=a.name}else b=a.label!==void 0?a.label:"";this.labelText=b;
1247window.RenderCode&&this.func&&(b=RenderCode.getCodeStartLabel(this));var c,a=[];do{c=Blocks.revLabel.exec(b);c!=null&&(c[1]=="choice:"?c[3]?a.push(["choice",
1248c[2],c[3]]):a.push(["choice",c[2],null]):c[3]?a.push([c[2],c[3]]):c[2]=="boolean"?a.push([c[2],"false"]):c[2]=="number"?a.push([c[2],"0"]):c[2]=="color"?c[3]?a.push([c[2],c[3]]):a.push([c[2],""]):a.push([c[2],""]))}while(c!=null);c=g_defaultStepColor[3];b=b.split(Blocks.reLabel);for(var d=0;d<b.length;d++){if(b[d].length>0){var f=b[d],e=f.indexOf("\n");if(e===0)if(f.length>1){this.add(new LabelBreak);this.add(new LabelText({label:f.substring(1),color:c}))}else this.add(new LabelBreak);else if(e>0){this.add(new LabelText({label:f.substring(0,
1249e),color:c}));this.add(new LabelBreak);this.add(new LabelText({label:f.substring(e+1),color:c}))}else this.add(new LabelText({label:f,color:c}));c=g_defaultStepColor[3]}if(d<b.length-1){f=a[d];if(f[0]=="varargs"){this.add(new LabelButton({label:buttonRemoveLabel,func:f[1],callback:"removeInput"}));this.add(new LabelButton({label:buttonAddLabel,func:f[1],callback:"addInput"}))}else if(f[0]=="button")this.add(new LabelButton({label:f[1],callback:"callback_"+f[1]}));else if(f[0]=="image")this.add(new LabelImg({label:f[1]}));
1250else if(f[0]=="choice"){var g=f[1],e=g_choice_lists[f[1]];f[2]?g=f[2]:e&&(g=e[0]);this.add(new LabelInput({type:"choice",choices:e,label:g}))}else if(f[0]=="where")this.add(new LabelInput({type:"where",choices:["mouse-pointer","edge","left edge","right edge","top edge","bottom edge","any","self"],label:f[1]?f[1]:"mouse-pointer"}));else if(f[0]=="actor")this.add(new LabelInput({type:"actor",choices:["self","any","stage"],label:f[1]?f[1]:"any"}));else if(f[0]=="actortiles")this.add(new LabelInput({type:"actortiles",
1251choices:["self","any","stage"],label:f[1]?f[1]:"self"}));else if(f[0]=="tiles")this.add(new LabelInput({type:"tiles",choices:["empty"],label:f[1]?f[1]:"empty"}));else if(f[0]=="whereall")this.add(new LabelInput({type:"whereall",choices:["mouse-pointer","edge","left edge","right edge","top edge","bottom edge","any","self"],label:f[1]?f[1]:"mouse-pointer"}));else if(f[0]=="stageproperty")this.add(new LabelInput({type:"stageproperty",choices:g_choice_lists.stageproperty,label:f[1]?f[1]:"width"}));else if(f[0]==
1252"method")this.add(new LabelInput({type:"method",choices:[],label:f[1]}));else if(f[0]=="level")this.add(new LabelInput({type:"level",choices:[],label:f[1]}));else if(f[0]=="scenes")this.add(new LabelInput({type:"scenes",choices:[],label:f[1]}));else if(f[0]=="costumes")this.add(new LabelInput({type:"costumes",choices:[],label:f[1]}));else if(f[0]=="sounds")this.add(new LabelInput({type:"sounds",choices:[],label:f[1]}));else if(f[0]=="properties")this.add(new LabelInput({type:"properties",choices:[],
1253label:f[1]}));else if(f[0]=="variables")this.add(new LabelInput({type:"variables",choices:[],label:f[1]}));else if(f[0]=="lists")this.add(new LabelInput({type:"lists",choices:[],label:f[1]}));else if(f[0]=="events")this.add(new LabelInput({type:"events",choices:[],label:f[1]}));else if(f[0]=="charparts")this.add(new LabelInput({type:"charparts",choices:[],label:f[1]}));else if(f[0]=="charskins")this.add(new LabelInput({type:"charskins",choices:[],label:f[1]}));else if(f[0]=="animations")this.add(new LabelInput({type:"animations",
1254choices:[],label:f[1]}));else if(f[0]=="param"){e=new LabelInput({type:"string",label:f[1]});e._child=new Label({cat:"functions",name:f[1],value:"string",func:"valueParam"});e._child.parent=e;this.add(e)}else if(f[0]=="scriptvar"){e=new LabelInput({type:"string",label:f[1]});e._child=new Label({cat:"localvar",name:f[1],value:"string",func:"valueScriptVar"});e._child.parent=e;this.add(e)}else if(f[0]=="color")f[1]=="reset"?c=g_defaultStepColor[3]:Blocks.reHexColor.test(f[1])?c="#"+f[1]:g_choice_lists.color?
1255this.add(new LabelInput({type:"choice",choices:g_choice_lists.color,label:g})):f[1]?this.add(new LabelInput({type:f[0],label:f[1]})):this.add(new LabelInput({type:f[0],label:"#ffffff"}));else if(g_choice_lists[f[0]]&&!Array.isArray(g_choice_lists[f[0]][0])){e=g_choice_lists[f[0]];this.add(new LabelInput({type:"custom",choices:e,label:f[1]}))}else if(f[0]=="choice"){g=f[1];e=g_choice_lists[g];f[2]?g=f[2]:e&&(g=e[0]);this.add(new LabelInput({type:"choice",choices:e,label:g}))}else this.add(new LabelInput({type:f[0],
1256label:f[1]}))}}}Label.prototype.reRender=function(){var a=ObjectIO.genValueObj(this),a=ObjectIO.de
1256serializeScriptStep(a);this.cat=a.cat;this.func=a.func;this.watchable=a.watchable;this.watching=a.watching;if(a.value)this.value=a.value;this.draggable=a.draggable;this.hidden=a.hidden;this._children=a._children;for(var b=0;b<this._children.length;b++)this._children[b].parent=this;this.hilight=a.hilight;this.marked=a.marked;this.color=a.color;if(a.note)this.note=a.note;this.labelText=a.labelText;this._computeBlockBounds()};
1257Label.prototype.convertToBlock=function(){var a=new Block({cat:this.cat,func:this.func,id:this.id,name:this.name,hasFlap:true,hasSlot:true,marked:this.marked});a.label=this.copy();a.labelText=this.labelText;a.label.parent=a;a.label.draggable=false;return a};Label.prototype.setHeight=function(a){this.height=a};
1258Label.prototype.addArg=function(){for(var a=0;a<this._children.length;a++)if(this._children[a]instanceof LabelButton&&this._children[a].label==buttonAddLabel){this.addInput(this._children[a]);break}};Label.prototype.removeArg=function(){for(var a=0;a<this._children.length;a++)if(this._children[a]instanceof LabelButton&&this._children[a].label==buttonRemoveLabel){this.removeInput(this._children[a]);break}};
1259Label.prototype.removeInput=function(a){for(var b=-1,c=this._children.length-1;c>=0;c--)if(this._children[c]==a){b=c;break}if(b>0){b--;if(this._children[b]instanceof LabelInput){this.remove(b);this.getRoot()._computeBlockBounds();window.WinCode&&WinCode.draw()}}};
1260Label.prototype.addInput=function(a){for(var b=-1,c=this._children.length-1;c>=0;c--)if(this._children[c]==a){b=c;break}if(b>=0){b--;b<0&&(b=0);c=null;if(a.func)if(a.func=="valueScriptVar"){c=new LabelInput({type:"string"});c._child=new Label({cat:"localvar",name:"var",value:"var",func:"valueScriptVar"});c._child.parent=c}else c=a.func=="actor"?new LabelInput({type:"actor",choices:["self","all"],label:"actor"}):new LabelInput({type:"string"});else c=new LabelInput({type:"string"});this.add(c,b);this.getRoot()._computeBlockBounds();
1261window.WinCode&&WinCode.draw()}};Label.prototype.callback_edit=function(){var a=this.getSocketAtChild(0);WinExpressions.show(a.label,function(b,c){if(a._child)a._child.parent=null;a._child=c;a.label=b;c.hidden=true;c.parent=a})};Label.prototype.callback_editfn=function(){window.WinTools&&WinTools.cmdEditFunction(this.parent)};
1262Label.prototype.callback_add=function(){var a=this.parent;a._containers.splice(a._containers.length-1,0,null);var b=window.RenderCode?RenderCode.getElseIfLabel(this):"else if {boolean} then {button:remove}",b=new Label({label:b,cat:this.cat});b.parent=a;b.draggable=false;a._containerLabels.splice(a._containerLabels.length-1,0,b);this.getRoot()._computeBounds()};
1263Label.prototype.callback_remove=function(){for(var a=this.parent,b=-1,c=0;c<a._containerLabels.length;c++)if(a._containerLabels[c]==this){b=c;break}if(b>=0){a._containers.splice(b+1,1);a._containerLabels.splice(b,1)}this.getRoot()._computeBounds()};Label.prototype.setDisabled=function(a){this.disabled=a;for(var b=0;b<this._children.length;b++)this._children[b].setDisabled(a)};
1264Label.prototype.selectInBounds=function(a,b,c,d){this.showSelected=!(a>this.x+this.width||a+c<this.x||b>this.y+this.height||b+d<this.y)};Label.prototype.setSelected=function(a,b){this.showSelected=a;for(var c=0;c<this._children.length;c++)this._children[c].setSelected(a,b)};Label.prototype.setCurrent=function(){};Label.prototype.setOutline=function(a){this.showOutline=a;for(var b=0;b<this._children.length;b++)this._children[b].setOutline(a)};
1265Label.prototype.copy=function(){var a=new Label({cat:this.cat,watchable:this.watchable,watching:this.watching,func:this.func,name:this.name,label:this.label,value:this.value,draggable:this.draggable,color:this.color});a.x=this.x;a.y=this.y;a.width=this.width;a.height=this.height;a.labelText=this.labelText;if(this.marked)a.marked=true;if(this.locked)a.locked=true;if(this.tags&&this.tags.length>0){a.tags=[];for(var b=0;b<this.tags.length;b++)a.tags.push(this.tags[b])}for(b=0;b<this._children.length;b++){a._children[b]=
1266this._children[b].copy();a._children[b].parent=a}return a};
1267Label.prototype.getImage=function(a,b,c){var d=null;b||(b=1);c!==void 0&&(d=c/b);this._computeBounds();var c=$('<canvas width="'+(this.width+1)*b+'" height="'+(this.height+1)*b+'"></canvas>'),f=c[0].getContext("2d");f.translateX=0;f.translateY=0;f.offsetX=0;f.offsetY=0;f.translate(0.5,0.5);f.scale(b,b);this.draw(f);var b=c[0].toDataURL(),e=new Image;e.onload=function(){if(d!==null){e.width=e.width*d;e.height=e.height*d}a&&a(e)};e.src=b;c.detach();return e};
1268Label.prototype.add=function(a,b){b===void 0||this._children.length==0?this._children.push(a):b<=this._children.length?this._children.splice(b,0,a):this._children.push(a);a.parent=this;this.getRoot()._computeBlockBounds()};Label.prototype.remove=function(a){a===void 0?this._children.pop():a>=0&&a<this._children.length&&this._children.splice(a,1)};
1269Label.prototype.setValue=function(a,b){for(var c=0,d=0;d<this._children.length;d++)if(this._children[d]instanceof LabelInput){if(a==c){if(b instanceof Label){this._children[d]._child=b;b.parent=this._children[d];if(b.hidden&&b.text)this._children[d].label=b.text}else if(this._children[d].type!="object")this._children[d].label=b;this.getRoot()._computeBounds();break}c++}};
1270Label.prototype.ensureSockets=function(a){for(var b=-1,c=0,d=0;d<this._children.length;d++)this._children[d]instanceof LabelInput?c++:this._children[d]instanceof LabelButton&&b<0&&(b=d);if(a>c&&b>=0)for(d=0;d<a-c;d++){var f=new LabelInput({});f.parent=this;this._children.splice(b,0,f)}return c};Label.prototype.getSockets=function(){for(var a=[],b=0;b<this._children.length;b++)this._children[b]instanceof LabelInput&&a.push(this._children[b]);return a};
1271Label.prototype.getNumSockets=function(){for(var a=0,b=0;b<this._children.length;b++)this._children[b]instanceof LabelInput&&a++;return a};Label.prototype.getSocketAtChild=function(a){for(var b=0,c=0;c<this._children.length;c++)if(this._children[c]instanceof LabelInput){if(a==b)return this._children[c];b++}return null};
1272Label.prototype.indexForBlockInChildren=function(a){for(var b=0,c=0;c<this._children.length;c++)if(this._children[c]instanceof LabelInput){if(this._children[c]==a||this._children[c]._child==a)return b;b++}return-1};Label.prototype.detach=function(){if(this.parent!=null){if(this.parent._child==this)this.parent._child=null;else for(var a=this.parent._children,b=0;b<a.length;b++)if(a[b]==this){a.splice(b,1);break}a=this.parent;this.parent=null;a._computeBounds()}};
1273Label.prototype.detachSelected=function(){if(this.showSelected){this.showSelected=false;var a=this.parent;if(a!=null&&a instanceof LabelInput){for(var a=a.parent,b=0;b<a._children.length;b++)if(a._children[b]instanceof LabelInput&&a._children[b]._child==this){a._children[b].child=null;break}this.parent=null;a._computeBounds()}this.setSelected(false,true)}};Label.prototype.getRoot=function(){for(var a=this;a.parent!=null;)a=a.parent;return a};Label.prototype._computeBounds=function(){this.getRoot()._computeBlockBounds()};
1274Label.prototype._computeBlockBounds=function(){for(var a=0,b=labelHorzPadding,c=b,d=labelVertPadding,f=0,e=0;e<this._children.length;e++){var g=this._children[e];g.x=this.x+labelRadius+b;g.y=this.y+d;g._computeBlockBounds();if(g.width<0){b=labelHorzPadding;
1274for(d=d+(a+labelVertPadding);f<e;f++){g=this._children[f];g.setHeight(a)}a=0;f=e+1}else{b=b+g.width;if(g.height>a)a=g.height}b>c&&(c=b)}if(f>=0&&f<this._children.length)for(;f<e;f++){g=this._children[f];g.setHeight(a)}a=d+a+labelBottomPadding;this.width=
1275c+labelRadius*2;this.setHeight(a);if(this.parent instanceof Block){if(this.width<minLabelWidth)this.width=minLabelWidth;this.height<minLabelHeight&&this.setHeight(minLabelHeight)}};Label.prototype.getMaxWidth=function(){return this.width};Label.prototype.getChildAtPoint=function(a,b){if(a>=this.x&&a<=this.x+this.width&&b>=this.y&b<=this.y+this.height){for(var c=0;c<this._children.length;c++){var d=this._children[c].getChildAtPoint(a,b);if(d!=null)return d}return this.locked?null:this}return null};
1276Label.prototype.getInputAtPoint=function(a,b){if(a>=this.x&&a<=this.x+this.width&&b>=this.y&b<=this.y+this.height)for(var c=0;c<this._children.length;c++){var d=this._children[c].getInputAtPoint(a,b);if(d!=null)return d}return null};Label.prototype.nearValue=function(a,b){if(this._children.length>0)for(var c=0;c<this._children.length;c++){var d=this._children[c].nearValue(a,b);if(d)return d}return null};
1277Label.prototype.objNearValue=function(a){if(this._children.length>0)for(var b=0;b<this._children.length;b++){var c=this._children[b].objNearValue(a);if(c)return c}return null};Label.prototype.getContainerPos=function(a){for(var b=0,c=0;c<this._children.length;c++)if(this._children[c]instanceof LabelInput){if(a==b){a=this._children[c];return[a.x+a.width/2,a.y+a.height/2]}b++}return null};Label.prototype.draw=function(a){this.showOutline&&this._drawOutline(a);this._draw(a)};
1278Label.prototype._draw=function(a){if(this.draggable){a.save();a.lineWidth=labelStrokeWidth;if(this.showSelected){a.fillStyle=selectionBgColor;a.strokeStyle=selectionStrokeColor}else if(window.RenderCode&&RenderCode.isCode()){a.fillStyle=g_blockCodeColor[0];a.strokeStyle=g_blockCodeColor[2]}else{a.fillStyle=this.color[0];a.strokeStyle=this.color[2]}if(this.hilight){a.shadowColor=hilightShadowColor;a.shadowBlur=20;a.fillStyle=hilightFillColor}else if(this.disabled){a.globalAlpha=disabledLabelAlpha;
1279if(disabledFillColor)a.fillStyle=disabledFillColor;if(disabledStrokeColor)a.strokeStyle=disabledStrokeColor}else if(this.marked&&Blocks.showMarked)a.globalAlpha=0.5;a.translate(this.x,this.y);if(this.value=="boolean"){a.beginPath();a.moveTo(0,this.height/2);a.lineTo(this.height/4,this.height);a.lineTo(this.height/4,this.height);a.lineTo(this.width-this.height/4,this.height);a.lineTo(this.width,this.height/2);a.lineTo(this.width-this.height/4,0);a.lineTo(this.height/4,0)}else if(this.type=="object"){a.fillStyle=
1280"rgba(255, 255, 255, 0.6)";a.beginPath();a.moveTo(0,labelAnyRadius);a.arcTo(0,0,labelAnyRadius,0,labelAnyRadius);a.lineTo(width-labelAnyRadius,0);a.arcTo(width,0,width,labelAnyRadius,labelAnyRadius);a.lineTo(width,height-labelAnyRadius);a.arcTo(width,height,width-labelAnyRadius,height,labelAnyRadius);a.lineTo(labelAnyRadius,height);a.arcTo(0,height,0,height-labelAnyRadius,labelAnyRadius)}else if(this.value=="number"){var b=this.height/2;a.beginPath();a.moveTo(0,b);a.arcTo(0,0,b,0,b);a.lineTo(this.width-
1281b,0);a.arcTo(this.width,0,this.width,b,b);a.lineTo(this.width,this.height-b);a.arcTo(this.width,this.height,this.width-b,this.height,b);a.lineTo(b,this.height);a.arcTo(0,this.height,0,this.height-b,b)}else{a.beginPath();a.moveTo(0,labelRadius);a.arcTo(0,0,labelRadius,0,labelRadius);a.lineTo(this.width-labelRadius,0);a.arcTo(this.width,0,this.width,labelRadius,labelRadius);a.lineTo(this.width,this.height-labelRadius);a.arcTo(this.width,this.height,this.width-labelRadius,this.height,labelRadius);a.lineTo(labelRadius,
1282this.height);a.arcTo(0,this.height,0,this.height-labelRadius,labelRadius)}a.closePath();a.fill();a.stroke();
1282a.restore()}for(b=0;b<this._children.length;b++)this._children[b]._draw(a);if(this.showDragHandle||this.parent&&this.parent.showDragHandle){a.save();a.translate(this.x,this.y);a.strokeStyle="#555";a.globalAlpha=0.3;a.lineWidth=1;for(b=7.5;b<slotBegin+slotWidth;b=b+3){a.beginPath();a.moveTo(b,1);a.lineTo(b,this.height-slotHeight-2);a.closePath();a.stroke()}a.restore()}};
1283Label.prototype._drawOutline=function(a){if(this.draggable){a.save();a.fillStyle=outlineColor;a.strokeStyle=outlineColor;a.lineWidth=outlineWidth;a.lineCap="round";a.translate(this.x,this.y);a.beginPath();a.moveTo(0,labelRadius);a.arcTo(0,0,labelRadius,0,labelRadius);a.lineTo(this.width-labelRadius,0);a.arcTo(this.width,0,this.width,labelRadius,labelRadius);a.lineTo(this.width,this.height-labelRadius);a.arcTo(this.width,this.height,this.width-labelRadius,this.height,labelRadius);a.lineTo(labelRadius,
1284this.height);a.arcTo(0,this.height,0,this.height-labelRadius,labelRadius);a.closePath();a.stroke();a.restore()}};function LabelText(a){this.parent=null;this.label=a.label!==void 0?a.label:null;this.fontSize=a.fontSize!==void 0?a.fontSize:defaultLabelFontSize;this.color=a.color!==void 0?a.color:g_defaultStepColor[3];this.height=this.width=this.y=this.x=0}LabelText.prototype.setHeight=function(a){this.height=a};LabelText.prototype.getMaxWidth=function(){return this.width};
1285LabelText.prototype.setDisabled=function(a){this.disabled=a};LabelText.prototype.setSelected=function(a){this.showSelected=a};LabelText.prototype.setOutline=function(a){this.showOutline=a};LabelText.prototype.copy=function(){return new LabelText({label:this.label,fontSize:this.fontSize,color:this.color})};LabelText.prototype.setText=function(a){this.label=a;this._computeBlockBounds()};LabelText.prototype.getText=function(){return this.label};
1286LabelText.prototype.detach=function(){if(label.parent!=null){for(var a=label.parent._children,b=0;b<a.length;b++)if(a[b]==this){a.splice(b,1);break}label.parent=null}};LabelText.prototype.getRoot=function(){for(var a=this;a.parent!=null;)a=a.parent;return a};LabelText.prototype._computeBounds=function(){this.getRoot()._computeBlockBounds()};
1287LabelText.prototype._computeBlockBounds=function(){this.width=(window.RenderCode&&RenderCode.isCode()?Blocks.measureText(this.label,defaultCodeLabelFont):Blocks.measureText(this.label)).width;this.height=this.fontSize+6};LabelText.prototype.getChildAtPoint=function(){return null};LabelText.prototype.getInputAtPoint=function(){return null};LabelText.prototype.nearValue=function(){return null};LabelText.prototype.objNearValue=function(){return null};LabelText.prototype.draw=function(a){this._draw(a)};
1288LabelText.prototype._draw=function(a){a.save();a.textAlign="left";a.textBaseline="middle";
1288a.font=window.RenderCode&&RenderCode.isCode()?defaultLabelFontWeight+" "+this.fontSize+"px "+defaultCodeLabelFont:defaultLabelFontWeight+" "+this.fontSize+"px "+defaultLabelFont;if(this.disabled){a.globalAlpha=disabledBlockAlpha;if(disabledStrokeColor)a.fillStyle=a.strokeStyle=disabledStrokeColor}else if(this.showSelected){a.fillStyle=selectionTextColor;a.strokeStyle=selectionTextColor}else{a.strokeStyle=this.color;
1289a.fillStyle=this.color}a.fillText(this.label,this.x,this.y+this.height/2);a.restore()};function LabelBreak(){this.parent=null;this.y=this.x=0;this.height=this.width=-1}LabelBreak.prototype.setHeight=function(a){this.height=a};LabelBreak.prototype.getMaxWidth=function(){return this.width};LabelBreak.prototype.setDisabled=function(a){this.disabled=a};LabelBreak.prototype.setSelected=function(a){this.showSelected=a};LabelBreak.prototype.setOutline=function(a){this.showOutline=a};
1290LabelBreak.prototype.copy=function(){return new LabelBreak};LabelBreak.prototype.setText=function(a){this.label=a;this._computeBlockBounds()};LabelBreak.prototype.getText=function(){return this.label};LabelBreak.prototype.detach=function(){if(label.parent!=null){for(var a=label.parent._children,b=0;b<a.length;b++)if(a[b]==this){a.splice(b,1);break}label.parent=null}};LabelBreak.prototype.getRoot=function(){for(var a=this;a.parent!=null;)a=a.parent;return a};LabelBreak.prototype._computeBounds=function(){this.getRoot()._computeBlockBounds()};
1291LabelBreak.prototype._computeBlockBounds=function(){};LabelBreak.prototype.getChildAtPoint=function(){return null};LabelBreak.prototype.getInputAtPoint=function(){return null};LabelBreak.prototype.nearValue=function(){return null};LabelBreak.prototype.objNearValue=function(){return null};LabelBreak.prototype.draw=function(a){this._draw(a)};LabelBreak.prototype._draw=function(){};
1292function LabelImg(a){this.parent=null;this.label=a.label!==void 0?a.label:null;this.img=Blocks.getImage(this.label);this.height=this.width=this.y=this.x=0}LabelImg.prototype.setHeight=function(a){this.height=a};LabelImg.prototype.getMaxWidth=function(){return this.width};LabelImg.prototype.setDisabled=function(a){this.disabled=a};LabelImg.prototype.setSelected=function(a){this.showSelected=a};LabelImg.prototype.setOutline=function(a){this.showOutline=a};LabelImg.prototype.copy=function(){return new LabelImg({label:this.label})};
1293LabelImg.prototype.detach=function(){if(label.parent!=null){for(var a=label.parent._children,b=0;b<a.length;b++)if(a[b]==this){a.splice(b,1);break}label.parent=null}};LabelImg.prototype.getRoot=function(){for(var a=this;a.parent!=null;)a=a.parent;return a};LabelImg.prototype._computeBounds=function(){this.getRoot()._computeBlockBounds()};LabelImg.prototype._computeBlockBounds=function(){this.imgWidth=this.width=this.img.width*16/this.img.height;this.imgHeight=this.height=16};
1294LabelImg.prototype.getChildAtPoint=function(){return null};LabelImg.prototype.getInputAtPoint=function(){return null};LabelImg.prototype.nearValue=function(){return null};LabelImg.prototype.objNearValue=function(){return null};LabelImg.prototype.draw=function(a){this._draw(a)};LabelImg.prototype._draw=function(a){this.img&&this.img.ready&&a.drawImage(this.img,this.x+(this.width-this.imgWidth)/2,this.y+(this.height-this.imgHeight)/2,this.imgWidth,this.imgHeight)};
1295function LabelButton(a){this.parent=null;this.img=a.img!==void 0?a.img:null;this.label=a.label!==void 0?a.label:null;if(this.label=="add"||this.label==buttonAddLabel){this.label=buttonAddLabel;this.img=Blocks.getImage("/ide/imgs/button-add.png")}else if(this.label=="remove"||this.label==buttonRemoveLabel){this.label=buttonRemoveLabel;this.img=Blocks.getImage("/ide/imgs/button-remove.png")}else if(this.label=="edit"||this.label=="editfn"){this.label=buttonEditLabel;this.img=Blocks.getImage("/ide/imgs/button-edit.png")}this.color=
1296a.color!==void 0?a.color:g_defaultStepColor;this.fontSize=a.fontSize!==void 0?a.fontSize:defaultLabelFontSize;this.color=a.color!==void 0?a.color:g_defaultStepColor;this.func=a.func!==void 0?a.func:null;this.callback=a.callback!==void 0?a.callback:null;this.height=this.width=this.y=this.x=0}LabelButton.prototype.setHeight=function(a){this.height=a};LabelButton.prototype.getMaxWidth=function(){return this.width};LabelButton.prototype.setDisabled=function(a){this.disabled=a};
1297LabelButton.prototype.setSelected=function(a){this.showSelected=a};LabelButton.prototype.setOutline=function(a){this.showOutline=a};
1297LabelButton.prototype.copy=function(){return new LabelButton({label:this.label,img:this.img,fontSize:this.fontSize,color:this.color,func:this.func,callback:this.callback})};LabelButton.prototype.setText=function(a){this.label=a;this._computeBlockBounds()};LabelButton.prototype.getText=function(){return this.label};
1298LabelButton.prototype.detach=function(){if(label.parent!=null){for(var a=label.parent._children,b=0;b<a.length;b++)if(a[b]==this){a.splice(b,1);break}label.parent=null}};LabelButton.prototype.getRoot=function(){for(var a=this;a.parent!=null;)a=a.parent;return a};LabelButton.prototype._computeBounds=function(){this.getRoot()._computeBlockBounds()};
1299LabelButton.prototype._computeBlockBounds=function(){if(this.img){this.imgWidth=this.width=this.img.width*16/this.img.height;this.imgHeight=this.height=16}else if(this.label==buttonAddLabel||this.label==buttonRemoveLabel)this.width=24;else{this.width=Blocks.measureText(this.label).width+labelRadius*2;if(this.width<10)this.width=10}this.height=this.fontSize+6};LabelButton.prototype.getChildAtPoint=function(){return null};
1300LabelButton.prototype.getInputAtPoint=function(a,b){return a>=this.x&&a<=this.x+this.width&&b>=this.y&&b<=this.y+this.height?this:null};LabelButton.prototype.nearValue=function(){return null};LabelButton.prototype.objNearValue=function(){return null};LabelButton.prototype.draw=function(a){this._draw(a)};
1301LabelButton.prototype._draw=function(a){if(this.img)this.img.ready&&a.drawImage(this.img,this.x+(this.width-this.imgWidth)/2,this.y+(this.height-this.imgHeight)/2,this.imgWidth,this.imgHeight);else{a.save();if(this.disabled){a.globalAlpha=disabledLabelAlpha;if(disabledStrokeColor)a.fillStyle=a.strokeStyle=disabledStrokeColor}else{a.strokeStyle=buttonStrokeColor;a.fillStyle=buttonFillColor}a.textAlign="center";a.textBaseline="middle";var b=this.fontSize+4,c=this.width-4;a.translate(this.x+2,this.y+
1302(this.height-b)/2);a.beginPath();a.moveTo(0,labelRadius);a.arcTo(0,0,labelRadius,0,labelRadius);a.lineTo(c-labelRadius,0);a.arcTo(c,0,c,labelRadius,labelRadius);a.lineTo(c,b-labelRadius);a.arcTo(c,b,c-labelRadius,b,labelRadius);a.lineTo(labelRadius,b);a.arcTo(0,b,0,b-labelRadius,labelRadius);a.closePath();a.fill();a.stroke();a.strokeStyle="#555555";a.fillStyle="#555555";a.beginPath();a.moveTo(c,labelRadius);a.lineTo(c,b-labelRadius);a.arcTo(c,b,c-labelRadius,b,labelRadius);a.lineTo(labelRadius,b);
1303a.stroke();a.strokeStyle="#000000";a.fillStyle="#000000";a.fillText(this.label,c/2,b/2);a.restore()}};LabelButton.prototype.setFocus=function(){if(window.WinCode){dismissChoosers();if(this.callback&&this.parent)this.parent[this.callback](this)}return false};
1304function LabelInput(a){this.droppable=a.droppable!==void 0?a.droppable:true;this._child=this.parent=null;this.type=a.type;this.label=a.label!==void 0?a.label:"";this.choices=a.choices;this.defaultLabel=a.label;
1304this.fontName=window.RenderCode&&RenderCode.isCode()?defaultCodeLabelInputFont:defaultLabelInputFont;this.fontSize=a.fontSize!==void 0?a.fontSize:defaultLabelInputFontSize;this.fontColor=a.fontColor!==void 0?a.fontColor:window.RenderCode&&RenderCode.isCode()?defaultInputCodeFontColor:defaultInputFontColor;
1305this.hasFocus=this.hilight=false;this.height=this.width=this.y=this.x=0}LabelInput.prototype.setHeight=function(a){this.height=a;if(this._child!=null){this._child.y=this._child.y+(this.height-this._child.height)/2;this._child._computeBlockBounds()}};LabelInput.prototype.getMaxWidth=function(){return this.width};LabelInput.prototype.setDisabled=function(a){this.disabled=a;this._child!=null&&this._child.setDisabled(a)};
1306LabelInput.prototype.setSelected=function(a,b){this.showSelected=a;this._child!=null&&this._child.setSelected(a,b)};LabelInput.prototype.setOutline=function(a){this.showOutline=a;this._child!=null&&this._child.setOutline(a)};
1307LabelInput.prototype.copy=function(){var a=new LabelInput({droppable:this.droppable,label:this.label,type:this.type,choices:this.choices,fontSize:this.fontSize,fontColor:this.fontColor});a.defaultLabel=this.defaultLabel;a.x=this.x;a.y=this.y;a.width=this.width;a.height=this.height;if(this.locked)a.locked=true;if(this._child!=null){a._child=this._child.copy();a._child.parent=a}return a};LabelInput.prototype.getRoot=function(){for(var a=this;a.parent!=null;)a=a.parent;return a};
1308LabelInput.prototype._computeBounds=function(){this.getRoot()._computeBlockBounds()};
1309LabelInput.prototype._computeBlockBounds=function(){if(this._child!=null&&!this._child.hidden){this._child.x=this.x;this._child.y=this.y;this._child._computeBlockBounds();this.width=this._child.width;this.height=this._child.height}else{var a=this.type=="string"&&this.label?Blocks.measureText((""+this.label).substring(0,80)+((""+this.label).length>80?"...":""),this.fontName):Blocks.measureText(this.label,this.fontName);if(this.type=="bitImages"){this.height=30+labelRadius*2;this.width=30+labelRadius*
13102}else{this.width=this.type=="bit"||this.type=="bitcolor"?14+labelRadius*2:a.width+6+labelRadius*2;if(this.type=="variables"||this.type=="lists")this.width=this.width+10;this.height=this.fontSize+6}}};LabelInput.prototype.detach=function(){if(this.parent!=null){for(var a=this.parent._children,b=0;b<a.length;b++)if(a[b]==this){a.splice(b,1);break}a=this.parent;this.parent=null;a._computeBounds()}};
1311LabelInput.prototype.getChildAtPoint=function(a,b){if(a>=this.x&&a<=this.x+this.width&&b>=this.y&&b<=this.y+this.height&&this._child!=null&&!this._child.hidden){var c=this._child.getChildAtPoint(a,b);if(c!=null)return c}return null};LabelInput.prototype.getInputAtPoint=function(a,b){if(a>=this.x&&a<=this.x+this.width&&b>=this.y&&b<=this.y+this.height){if(this._child!=null&&!this._child.hidden){var c=this._child.getChildAtPoint(a,b);if(c!=null)return c}return this}return null};
1312LabelInput.prototype.nearValue=function(a,b){if(this.type!="bit"&&this.type!="bitcolor"&&a>=this.x&&a<=this.x+this.width&&b>=this.y&&b<=this.y+this.height){if(this._child!=null&&!this._child.hidden){var c=this._child.nearValue(a,b);if(c!=null)return c}return this}return null};
1313LabelInput.prototype.objNearValue=function(a){var b=this.x,c=this.y,d=this.y+this.height,f=a.y,e=a.x+a.width,g=a.y+a.height;if(a.x<this.x+this.width&&e>b&&f<d&&g>c){if(this._child!=null){if(this._child.locked)return null;if(!this._child.hidden){a=this._child.objNearValue(a);if(a!=null)return a}}if(this.type!="bit"&&this.type!="bitcolor")return this}return null};LabelInput.prototype.getPopup=function(){return this.hasFocus?this.type=="color"?ColorPicker.colors:$(".choice-chooser"):null};
1314function dismissChoosers(){$(".choice-chooser").detach();window.AnglePicker&&AnglePicker.hide();window.ColorPicker&&ColorPicker.hide();window.BlockPicker&&BlockPicker.hide();if(window.WinCode)window.WinCode._inputField=null;window.WinMediaAssets&&!window.WinMediaAssets._mock&&WinMediaAssets.hide();window.WinPaint&&WinPaint.hide()}
1315function findScriptVars(a,b){if(a.func=="blockControlScriptVar")for(var c=a.label.getNumSockets(),d=0;d<c;d++){var f=a.label.getSocketAtChild(d);f._child&&b.indexOf(f._child.name)<0&&b.push(f._child.name)}
1315if(a._containers)for(d=0;d<a._containers.length;d++)a._containers[d]!=null&&findScriptVars(a._containers[d],b);a.next&&findScriptVars(a.next,b)}
1316LabelInput.prototype.addInputField=function(a,b){var c=this,d=$('<li class="nohover"><textarea/> <a href="#" class="more"></a></li>');d.find("a.more").click(function(){$(this).parents("li").toggleClass("expand");return false});d.find("textarea").val(this.label).keydown(function(a){if(a.keyCode==9){$(this).blur();c.label=$(this).val();if(b){c.label=parseFloat(c.label);if(typeof c.label=="number"&&(!isFinite(c.label)||isNaN(c.label)))c.label=0}FocusManager.clearFocus()}else if(a.keyCode==13&&!$(this).parents("li").hasClass("expand")){$(this).blur();
1317FocusManager.clearFocus();return false}}).keyup(function(a){c.label=$(this).val();if(b){c.label=parseFloat(c.label);if(typeof c.label=="number"&&(!isFinite(c.label)||isNaN(c.label)))c.label=0}c._computeBounds();IDE.draw();if(a.keyCode==13){if(!$(this).parents("li").hasClass("expand")){$(this).blur();FocusManager.clearFocus();return false}}else if(a.keyCode==27){$(this).blur();FocusManager.clearFocus()}});a.append(d);d.find("textarea").focus().select()};
1318LabelInput.prototype.setFocus=function(a,b,c,d){if(!this.locked){if(window.WinCode){dismissChoosers();if(this.parent&&this.parent.parent&&(this.parent.parent.func=="blockControlPostMessage"||this.parent.parent.func=="blockControlPostMessageAndWait")){var f=this.parent.parent;f.label.getSocketAtChild(2).type="string";var e=f.label.getSocketAtChild(0);if(e&&e!=this&&e.label=="loadProject")if((e=f.label.getSocketAtChild(1))&&e!=this&&e.label=="TynkerRuntime")this.type="projects"}if(this.type=="boolean"||
1319this.type=="bit"){this._makeBooleanControl(a,b,c,d);return false}
1319if(this.type=="string")this._makeStringControl(a,b,c,d);else if(this.type=="number")this._makeNumberControl(a,b,c,d);else if(this.type=="color")this._makeColorControl(a,b,c,d);else if(this.type=="bitcolor")this._makeColorControl(a,b,c,d);else if(this.type=="angle")this._makeAngleControl(a,b,c,d);else if(this.type=="mathangle")this._makeMathAngleControl(a,b,c,d);else if(window.BlockPicker&&BlockPicker.types[this.type])this._makeBlockControl(this.type,
1320a,b,c,d);else if(this.type=="projects")this._makeProjectsControl(a,b,c,d);else if(this.choices!=null&&this.choices!==void 0){this._makeChoicesControl(a,b,c,d);if(this.type=="custom")return false}this.hasFocus=a;this.cursorPos=this.label.length;if(d){c="";d=d.x-this.x-labelRadius;b.textAlign="left";b.textBaseline="middle";for(b=0;b<this.label.length;b++){c=c+this.label[b];f=Blocks.measureText(c);if(d<f.width){this.cursorPos=b;break}}}a||WinCode._broadcastChange("valueChange",this)}return true}};
1321LabelInput.prototype._makeBooleanControl=function(){this.label=this.label=="true"?"false":"true";this.hasFocus=false;WinCode._broadcastChange("valueChange",this)};LabelInput.prototype._makeStringControl=function(a,b,c){if(a){a=$('<div class="choice-chooser"><ul></ul></div>');a.css("left",c.left+(b.offsetX+this.x)*Blocks._scale);a.css("top",c.top+(b.offsetY+this.y)*Blocks._scale);$("body").append(a);a=a.find("ul");this.addInputField(a)}};
1322LabelInput.prototype._makeNumberControl=function(a,b,c){if(a){a=$('<div class="choice-chooser"><ul></ul></div>');a.css("left",c.left+(b.offsetX+this.x)*Blocks._scale);a.css("top",c.top+(b.offsetY+this.y)*Blocks._scale);$("body").append(a);a=a.find("ul");this.addInputField(a,true)}};
1323LabelInput.prototype._makeColorControl=function(a,b,c){if(a){var d=this;ColorPicker.show((b.offsetX+this.x+labelRadius)*Blocks._scale+c.left,(b.offsetY+this.y+this.height+4)*Blocks._scale+c.top,(b.offsetY+this.y)*Blocks._scale+c.top,function(a){d.label=a;d._computeBounds();WinCode.draw()},function(a){d.label=a;d._computeBounds();FocusManager.clearFocus();WinCode.draw();WinCode._broadcastChange("valueChange",d)})}else ColorPicker.hide()};
1324LabelInput.prototype._makeAngleControl=function(a,b,c){if(a){var d=this;AnglePicker.show(this.label,(b.offsetX+this.x+labelRadius+this.width/2)*Blocks._scale+c.left,(b.offsetY+this.y+this.height+4)*Blocks._scale+c.top,(b.offsetY+this.y)*Blocks._scale+c.top,function(a){d.label=a;d._computeBounds();WinCode.draw();WinCode._broadcastChange("valueChange",d)},function(){FocusManager.clearFocus()})}};
1325LabelInput.prototype._makeMathAngleControl=function(a,b,c){if(a){var d=this;AnglePicker.show(this.label,(b.offsetX+this.x+labelRadius+this.width/2)*Blocks._scale+c.left,(b.offsetY+this.y+this.height+4)*Blocks._scale+c.top,(b.offsetY+this.y)*Blocks._scale+c.top,function(a){d.label=a;d._computeBounds();d.hasFocus=false;WinCode.draw();WinCode._broadcastChange("valueChange",d)},function(){FocusManager.clearFocus()},true)}};
1326LabelInput.prototype._makeBlockControl=function(a,b,c,d){if(b){var f=this;BlockPicker.show(a,this.label,(c.offsetX+this.x+labelRadius+this.width/2)*Blocks._scale+d.left,(c.offsetY+this.y+this.height+4)*Blocks._scale+d.top,(c.offsetY+this.y)*Blocks._scale+d.top,function(a){f.label=a;f._computeBounds();WinCode.draw();WinCode._broadcastChange("valueChange",f);FocusManager.clearFocus()})}};
1327LabelInput.prototype._makeProjectsControl=function(a,b,c){if(a){var d=$('<div class="choice-chooser"><ul></ul></div>');d.css("left",(b.offsetX+this.x+labelRadius)*Blocks._scale+c.left);d.css("top",(b.offsetY+this.y+this.height+4)*Blocks._scale+c.top);$("body").append(d);var d=d.find("ul"),f=this;$.ajax({url:"/api/projectids",success:function(a){for(var a=JSON.parse(a),b=0;b<a.length;b++){var c=$("<li>"+a[b].name+" - "+a[b].id+"</li>");d.append(c);c.click(function(){FocusManager.clearFocus();f.label=
1328$(this).text();f._computeBounds();IDE.draw();dismissChoosers();WinCode._broadcastChange("valueChange",f)})}}})}};
1329LabelInput.prototype._makeChoicesControl=function(a,b,c){if(a){a=$('<div class="choice-chooser"><ul></ul></div>');$("body").append(a);a=a.find("ul");if(this.choices)for(var d=0;d<this.choices.length;d++){var f=$("<li>"+this.choices[d]+"</li>");a.append(f);var e=this;f.click(function(){FocusManager.clearFocus();e.label=$(this).text();e._computeBounds();IDE.draw();dismissChoosers();WinCode._broadcastChange("valueChange",e)})}
1329if(this.type=="where"){f=false;for(d=0;d<Runtime.sprites.length;d++)if(Runtime.sprites[d]!=
1330IDE.editingActor){f=$("<li>"+Runtime.sprites[d].label+"</li>");a.append(f);e=this;f.click(function(){FocusManager.clearFocus();e.label=$(this).text();e._computeBounds();IDE.draw();dismissChoosers();WinCode._broadcastChange("valueChange",e)});f=true}f||a.append('<li class="disabled">No other actors</li>')}else if(this.type=="actortiles"){for(d=0;d<Runtime.sprites.length;d++){f=$("<li>"+Runtime.sprites[d].label+"</li>");a.append(f);e=this;f.click(function(){FocusManager.clearFocus();e.label=$(this).text();
1331e._computeBounds();IDE.draw();dismissChoosers();WinCode._broadcastChange("valueChange",e)})}for(var g in Runtime.stage.tileLayer._tileSetMapping){f=$("<li>"+g+" tiles</li>");a.append(f);e=this;f.click(function(){FocusManager.clearFocus();e.label=$(this).text();e._computeBounds();IDE.draw();dismissChoosers();WinCode._broadcastChange("valueChange",e)})}}else if(this.type=="tiles")for(g in Runtime.stage.tileLayer._tileSetMapping){f=$("<li>"+g+"</li>");a.append(f);e=this;f.click(function(){FocusManager.clearFocus();
1332e.label=$(this).text();e._computeBounds();IDE.draw();dismissChoosers();WinCode._broadcastChange("valueChange",e)})}else if(this.type=="whereall"||this.type=="actor")for(d=0;d<Runtime.sprites.length;d++){f=$("<li>"+Runtime.sprites[d].label+"</li>");a.append(f);e=this;f.click(function(){FocusManager.clearFocus();e.label=$(this).text();e._computeBounds();IDE.draw();dismissChoosers();WinCode._broadcastChange("valueChange",e)})}else if(this.type=="stageproperty")for(d=0;d<Runtime.sprites.length;d++){g=
1333[];var h=Runtime.sprites[d].tag;if(h)for(var i=0;i<h.length;i++){var j=h[i];if(j&&g.indexOf(j)<0){f=$("<li>closest "+j+"</li>");a.append(f);e=this;f.click(function(){FocusManager.clearFocus();e.label=$(this).text();e._computeBounds();IDE.draw();dismissChoosers();WinCode._broadcastChange("valueChange",e)});f=$("<li>furthest "+j+"</li>");a.append(f);e=this;f.click(function(){FocusManager.clearFocus();e.label=$(this).text();e._computeBounds();IDE.draw();dismissChoosers();WinCode._broadcastChange("valueChange",
1334e)})}}}else if(this.type=="method"){f="";if(this.parent&&this.parent.func=="valueControlCallMember")f=this.parent.getSocketAtChild(0).label;if(this.parent&&this.parent.parent&&this.parent.parent.func=="blockControlCallMember")f=this.parent.parent.label.getSocketAtChild(0).label;g=Sprites.getSpriteByName(f);if(!g)g=Runtime.background;f=false;g=g.scripts;for(d=0;d<g.length;d++)if(g[d].func=="registerFunction"){f=$("<li>"+g[d].name+"</li>");a.append(f);e=this;f.click(function(){FocusManager.clearFocus();
1335e.label=$(this).text();e._computeBounds();IDE.draw();dismissChoosers();WinCode._broadcastChange("valueChange",e)});f=true}f||a.append('<li class="disabled">No methods</li>')}else if(this.type=="level"){for(d=0;d<Runtime.levels.length;d++){f=$("<li>"+Runtime.levels[d].name+"</li>");a.append(f);e=this;f.click(function(){FocusManager.clearFocus();e.label=$(this).text();e._computeBounds();IDE.draw();dismissChoosers();WinCode._broadcastChange("valueChange",e)})}Runtime.levels.length<=0&&a.append('<li class="disabled">No levels</li>')}else if(this.type==
1336"scenes"){g=Runtime.background;f=$("<li>any</li>");a.append(f);e=this;f.click(function(){FocusManager.clearFocus();e.label=$(this).text();e._computeBounds();IDE.draw();dismissChoosers();WinCode._broadcastChange("valueChange",e)});f=true;for(d=0;d<g.costumes.length;d++){f=g.costumes[d].imgPreview?$('<li><img src="'+g.costumes[d].imgPreview+'"/>'+g.costumes[d].name+"</li>"):$('<li><img src="'+g.costumes[d].img+'"/>'+g.costumes[d].name+"</li>");a.append(f);e=this;f.click(function(){FocusManager.clearFocus();
1337e.label=$(this).text();e._computeBounds();IDE.draw();dismissChoosers();WinCode._broadcastChange("valueChange",e)});f=true}if(Blocks.allowAddInOptions){e=this;f=$('<li style="border-top:1px solid #ccc">Add Background</li>');a.append(f);f.click(function(){dismissChoosers();WinMediaAssets.showPicker("Add Background",function(a){WinProperties._addAssetAsCostume(a);FocusManager.clearFocus();e.label=a[0].name;e._computeBounds();IDE.draw();WinCode._broadcastChange("valueChange",e)},{backgrounds:true,actors:false,
1338images:false,sounds:false,charStudio:false})})}else f||a.append('<li class="disabled">No backgrounds</li>')}
1338else if(this.type=="costumes"){g=IDE.editingActor;if(IDE.editingActor==null)g=Runtime.background;if(g.skeleton.skeletonData)for(d=0;d<g.skeleton.skeletonData.animations.length;d++)if(g.skeleton.skeletonData.animations[d].name.indexOf("Back 3/4")!==0){f=$("<li>"+g.skeleton.skeletonData.animations[d].name+"</li>");a.append(f);e=this;f.click(function(){FocusManager.clearFocus();e.label=$(this).text();
1339e._computeBounds();IDE.draw();dismissChoosers();WinCode._broadcastChange("valueChange",e)})}for(d=0;d<g.costumes.length;d++){f=g.costumes[d].imgPreview?$('<li><img src="'+g.costumes[d].imgPreview+'"/>'+g.costumes[d].name+"</li>"):$('<li><img src="'+g.costumes[d].img+'"/>'+g.costumes[d].name+"</li>");a.append(f);e=this;f.click(function(){FocusManager.clearFocus();e.label=$(this).text();e._computeBounds();IDE.draw();dismissChoosers();WinCode._broadcastChange("valueChange",e)})}if(Blocks.allowAddInOptions){e=
1340this;if(window.IDE&&MediaCapture.supportsCapture){f=$('<li style="border-top:1px solid #ccc">Live Video</li>');a.append(f);f.click(function(){FocusManager.clearFocus();e.label="live video";e._computeBounds();IDE.draw();dismissChoosers();WinCode._broadcastChange("valueChange",e)});f=$("<li>Video Frame</li>");a.append(f);f.click(function(){FocusManager.clearFocus();e.label="video frame";e._computeBounds();IDE.draw();dismissChoosers();WinCode._broadcastChange("valueChange",e)})}f=$('<li style="border-top:1px solid #ccc">Add Costume</li>');
1341a.append(f);f.click(function(){dismissChoosers();WinMediaAssets.showPicker("Add Costume",function(a){WinProperties._addAssetAsCostume(a);FocusManager.clearFocus();e.label=a[0].name;e._computeBounds();IDE.draw();WinCode._broadcastChange("valueChange",e)},{backgrounds:false,actors:false,images:true,sounds:false,charStudio:false})})}}else if(this.type=="sounds"){g=IDE.editingActor;if(IDE.editingActor==null)g=Runtime.background;h=[];for(d=0;d<g.sounds.length;d++)if(h.indexOf(g.sounds[d].name)<0){f=$("<li>"+
1342g.sounds[d].name+"</li>");a.append(f);e=this;f.click(function(){FocusManager.clearFocus();e.label=$(this).text();e._computeBounds();IDE.draw();dismissChoosers();WinCode._broadcastChange("valueChange",e)});h.push(g.sounds[d].name)}for(d=0;d<Runtime.background.sounds.length;d++)if(h.indexOf(Runtime.background.sounds[d].name)<0){f=$("<li>"+Runtime.background.sounds[d].name+"</li>");a.append(f);e=this;f.click(function(){FocusManager.clearFocus();e.label=$(this).text();e._computeBounds();IDE.draw();dismissChoosers();
1343WinCode._broadcastChange("valueChange",e)});h.push(Runtime.background.sounds[d].name)}if(Blocks.allowAddInOptions){e=this;f=$('<li style="border-top:1px solid #ccc">Add Sound</li>');a.append(f);f.click(function(){dismissChoosers();WinMediaAssets.showPicker("Add Sound",function(a){WinProperties._addAssetAsCostume(a);WinProperties.hide();FocusManager.clearFocus();e.label=a[0].name;e._computeBounds();IDE.draw();WinCode._broadcastChange("valueChange",e)},{backgrounds:false,actors:false,images:false,sounds:true,
1344charStudio:false})})}else h.length<=0&&a.append('<li class="disabled">No other sounds</li>')}else if(this.type=="properties"){f=this.parent;if(f._children&&f._children.length>=4&&f._children[3]instanceof LabelInput)d=(d=Sprites.getSpriteByName(f._children[3].label))?d.variables:Runtime.background.variables;else d=Runtime.background.variables;f=false;if(d)for(g in d){f=$("<li>"+g+"</li>");a.append(f);e=this;f.click(function(){FocusManager.clearFocus();e.label=$(this).text();e._computeBounds();IDE.draw();
1345dismissChoosers();WinCode._broadcastChange("valueChange",e)});f=true}if(d!=Runtime.background.variables&&IDE.editingActor)for(g in IDE.editingActor.variables){f=$("<li>"+g+"</li>");a.append(f);e=this;f.click(function(){FocusManager.clearFocus();e.label=$(this).text();e._computeBounds();IDE.draw();dismissChoosers();WinCode._broadcastChange("valueChange",e)});f=true}f||a.append('<li class="disabled">No properties</li>')}else if(this.type=="variables"){f=false;for(g in Runtime.background.variables){f=
1346$("<li>"+g+"</li>");a.append(f);e=this;f.click(function(){FocusManager.clearFocus();e.label=$(this).text();e._computeBounds();IDE.draw();dismissChoosers();WinCode._broadcastChange("valueChange",e)});f=true}if(IDE.editingActor)for(g in IDE.editingActor.variables){f=$("<li>"+g+"</li>");a.append(f);e=this;f.click(function(){FocusManager.clearFocus();e.label=$(this).text();e._computeBounds();IDE.draw();dismissChoosers();WinCode._broadcastChange("valueChange",e)});f=true}d=this.getRoot();if(d.func=="registerFunction"){g=
1347d.label._children;for(d=0;d<g.length;d++)if(g[d]instanceof LabelInput&&g[d]._child&&g[d]._child.func=="valueParam"){f=$("<li>"+g[d]._child.name+"</li>");a.append(f);e=this;f.click(function(){FocusManager.clearFocus();e.label=$(this).text();e._computeBounds();IDE.draw();dismissChoosers();WinCode._broadcastChange("valueChange",e)});f=true}}d=this.getRoot();g=[];findScriptVars(d,g);for(d=0;d<g.length;d++){f=$("<li>"+g[d]+"</li>");a.append(f);e=this;f.click(function(){FocusManager.clearFocus();e.label=
1348$(this).text();e._computeBounds();IDE.draw();dismissChoosers();WinCode._broadcastChange("valueChange",e)});f=true}f||a.append('<li class="disabled">No variables</li>')}
1348else if(this.type=="lists"){f=false;for(g in Runtime.background.lists){f=$("<li>"+g+"</li>");a.append(f);e=this;f.click(function(){FocusManager.clearFocus();e.label=$(this).text();e._computeBounds();IDE.draw();dismissChoosers();WinCode._broadcastChange("valueChange",e)});f=true}if(IDE.editingActor)for(g in IDE.editingActor.lists){f=
1349$("<li>"+g+"</li>");a.append(f);e=this;f.click(function(){FocusManager.clearFocus();e.label=$(this).text();e._computeBounds();IDE.draw();dismissChoosers();WinCode._broadcastChange("valueChange",e)});f=true}f||a.append('<li class="disabled">No lists</li>')}else if(this.type=="events"){f=this.parent;g=f._children&&f._children.length==4&&f._children[3]instanceof LabelInput?Runtime.findEventsOf(f._children[3].label):Runtime.findEventsOf("any");if(g.length>0)for(d=0;d<g.length;d++){if(g[d].indexOf("runtime")!=
13500&&g[d].indexOf("tynker")!=0){f=$("<li>"+g[d]+"</li>");a.append(f);e=this;f.click(function(){FocusManager.clearFocus();e.label=$(this).text();e._computeBounds();IDE.draw();dismissChoosers();WinCode._broadcastChange("valueChange",e)})}}else a.append('<li class="disabled">No events</li>')}else if(this.type=="charparts")if(IDE.editingActor&&IDE.editingActor.skeleton.skeletonData){d=g_parts[IDE.editingActor.skeleton.type].options;e=this;for(h in d){f=$("<li>"+h+"</li>");a.append(f);f.click(function(){FocusManager.clearFocus();
1351e.label=$(this).text();var a=e.parent;if(a._children&&a._children.length==4&&a._children[3]instanceof LabelInput){var b=g_parts[IDE.editingActor.skeleton.type].options[e.label];if(b.indexOf(a._children[3].label)<0)a._children[3].label=b[0]}e._computeBounds();IDE.draw();dismissChoosers();WinCode._broadcastChange("valueChange",e)})}f=$("<li>type</li>");a.append(f);f.click(function(){FocusManager.clearFocus();e.label=$(this).text();e._computeBounds();IDE.draw();dismissChoosers();WinCode._broadcastChange("valueChange",
1352e)});f=$("<li>All</li>");a.append(f);f.click(function(){FocusManager.clearFocus();e.label=$(this).text();e._computeBounds();IDE.draw();dismissChoosers();WinCode._broadcastChange("valueChange",e)})}else a.append('<li class="disabled">No character</li>');else if(this.type=="charskins")if(IDE.editingActor&&IDE.editingActor.skeleton.skeletonData){f=this.parent;if(f._children&&f._children.length==4&&f._children[1]instanceof LabelInput)h=f._children[1].label;else{h=g_parts[IDE.editingActor.skeleton.type].options;
1353for(g in h){h=g_parts[IDE.editingActor.skeleton.type].options[g];break}}g=g_parts[IDE.editingActor.skeleton.type].options[h];e=this;if(g)for(d=0;d<g.length;d++){f=$("<li>"+g[d]+"</li>");a.append(f);f.click(function(){FocusManager.clearFocus();e.label=$(this).text();e._computeBounds();IDE.draw();dismissChoosers();WinCode._broadcastChange("valueChange",e)})}f=$("<li>reset</li>");a.append(f);f.click(function(){FocusManager.clearFocus();e.label=$(this).text();e._computeBounds();IDE.draw();dismissChoosers();
1354WinCode._broadcastChange("valueChange",e)})}else a.append('<li class="disabled">No character</li>');else if(this.type=="animations"){f=this.parent;g=f._children&&f._children.length==4&&f._children[3]instanceof LabelInput?Runtime.findAnimationsFor(f._children[3].label):Runtime.findAnimationsFor("any");e=this;if(g.length>0)for(d=0;d<g.length;d++)if(g[d].indexOf("runtime")!=0&&g[d].indexOf("tynker")!=0){f=$("<li>"+g[d]+"</li>");a.append(f);f.click(function(){FocusManager.clearFocus();e.label=$(this).text();
1355e._computeBounds();IDE.draw();dismissChoosers();WinCode._broadcastChange("valueChange",e)})}f=$("<li>all</li>");a.append(f);f.click(function(){FocusManager.clearFocus();e.label=$(this).text();e._computeBounds();IDE.draw();dismissChoosers();WinCode._broadcastChange("valueChange",e)})}a=a.parent();a.css("left",c.left+(b.offsetX+this.x+labelRadius)*Blocks._scale);b=c.top+(b.offsetY+this.y+this.height+4)*Blocks._scale;if(b+a.outerHeight()>window.innerHeight)if(b-this.height-4-4-a.outerHeight()>0)a.css("top",
1356b-(this.height+4+4)*Blocks._scale-a.outerHeight());else{c=$(".toolbar-top").outerHeight()+windowPadding;if(b-(this.height+4+4)*Blocks._scale-c>window.innerHeight-b){a.css("top",c);a.css("height",b-(this.height+4+4)*Blocks._scale-c-10)}else{a.css("top",b);a.css("height",window.innerHeight-b-14*Blocks._scale)}
1356}else a.css("top",b)}};
1357LabelInput.prototype.keyPressed=function(a,b){if(this.hasFocus){this.label=""+this.label;if(b==0){if(a==8){if(this.label.length>0){if(this.cursorPos>0){this.label=this.label.substring(0,this.cursorPos-1)+this.label.substring(this.cursorPos);this.cursorPos--}if(this.parent&&this.parent.func=="valueOpExpression"){var c=WinExpressions.buildObject(this.label);if(c!=null&&c instanceof Label){c.hidden=true;this._child=null;this._child=c;c.parent=this;this.fontColor="#007700"}else this.fontColor="#ff0000"}}return true}if(a==
135837){this.cursorPos>0&&this.cursorPos--;return true}if(a==39){this.cursorPos<this.label.length&&this.cursorPos++;return true}if(a==32){if(this.type=="number"||this.type=="angle"||this.type=="mathangle"){if(c>="0"&&c<="9"||c=="."||c=="-"){this.label=this.label.substring(0,this.cursorPos)+" "+this.label.substring(this.cursorPos);this.cursorPos++}}else{this.label=this.label.substring(0,this.cursorPos)+" "+this.label.substring(this.cursorPos);this.cursorPos++}if(this.parent&&this.parent.func=="valueOpExpression"){c=
1359WinExpressions.buildObject(this.label);if(c!=null&&c instanceof Label){c.hidden=true;this._child=null;this._child=c;c.parent=this;this.fontColor="#007700"}else this.fontColor="#ff0000"}return true}}else if(b>=32){c=String.fromCharCode(b);if(this.type=="number"||this.type=="angle"||this.type=="mathangle"){if(c>="0"&&c<="9"||c=="."||c=="-"){this.label=this.label.substring(0,this.cursorPos)+c+this.label.substring(this.cursorPos);this.cursorPos++}}else{this.label=this.label.substring(0,this.cursorPos)+
1360c+this.label.substring(this.cursorPos);this.cursorPos++}if(this.parent&&this.parent.func=="valueOpExpression"){c=WinExpressions.buildObject(this.label);if(c!=null&&c instanceof Label){c.hidden=true;this._child=null;this._child=c;c.parent=this;this.fontColor="#007700"}else this.fontColor="#ff0000"}return true}}return false};LabelInput.prototype.draw=function(a){this._draw(a)};
1361LabelInput.prototype._draw=function(a){if(this._child!=null&&!this._child.hidden)this._child._draw(a);else{a.save();if(this.type=="color"){a.strokeStyle=this.label;a.fillStyle=this.label}else if(window.RenderCode&&RenderCode.isCode()){a.strokeStyle=defaultInputCodeLineColor;a.fillStyle=defaultInputCodeBgColor}else{a.strokeStyle=defaultInputLineColor;a.fillStyle=defaultInputBgColor}if(this.hilight&&!this.hasFocus){a.shadowColor="#0f0";a.shadowBlur=20;a.fillStyle="#0f0"}if(this.disabled){a.globalAlpha=
1362disabledLabelAlpha;if(disabledFillColor)a.fillStyle=disabledFillColor;if(disabledStrokeColor)a.strokeStyle=disabledStrokeColor}a.textAlign="left";a.textBaseline="middle";
1362a.font=window.RenderCode&&RenderCode.isCode()?defaultLabelInputFontWeight+" "+this.fontSize+"px "+defaultCodeLabelInputFont:defaultLabelInputFontWeight+" "+this.fontSize+"px "+defaultLabelInputFont;var b=this.fontSize+6,c=this.width;a.translate(this.x,this.y+(this.height-b)/2);if(this.type=="boolean"){a.beginPath();a.moveTo(0,b/2);
1363a.lineTo(b/4,b);a.lineTo(c-b/4,b);a.lineTo(c,b/2);a.lineTo(c-b/4,0);a.lineTo(b/4,0);a.closePath();a.fill();a.strokeStyle="rgba(0,0,0,.3)";a.beginPath();a.moveTo(b/4,0);a.lineTo(c-b/4,0);a.lineTo(c,b/2);a.stroke();a.strokeStyle="rgba(0,0,0,.2)";a.beginPath();a.moveTo(b/4,0);a.lineTo(0,b/2);a.stroke()}else if(this.type=="bit"||this.type=="bitcolor"){var d=b/2;if(this.type=="bitcolor"){if(!this.label)this.label="#000000";a.strokeStyle=this.label;a.fillStyle=this.label}else if(this.label=="true"){a.strokeStyle=
1364"#ff0000";a.fillStyle="#ff0000"}else{a.strokeStyle="#000000";a.fillStyle="#000000"}a.beginPath();a.moveTo(0,d);a.arcTo(0,0,d,0,d);a.lineTo(c-d,0);a.arcTo(c,0,c,d,d);a.lineTo(c,b-d);a.arcTo(c,b,c-d,b,d);a.lineTo(d,b);a.arcTo(0,b,0,b-d,d);a.closePath();a.fill();a.strokeStyle="rgba(0,0,0,.3)";a.beginPath();a.moveTo(d,0);a.lineTo(c-d,0);a.arcTo(c,0,c,d,d);a.stroke();a.strokeStyle="rgba(0,0,0,.2)";a.beginPath();a.moveTo(d,0);a.arcTo(0,0,0,d,d);a.stroke()}else if(this.type=="bitImages"){a.save();a.translate(0,
1365(b-this.height)/2);d=b/2;b=this.height;a.beginPath();a.moveTo(0,d);a.arcTo(0,0,d,0,d);a.lineTo(c-d,0);a.arcTo(c,0,c,d,d);a.lineTo(c,b-d);a.arcTo(c,b,c-d,b,d);a.lineTo(d,b);a.arcTo(0,b,0,b-d,d);a.closePath();a.fill();a.strokeStyle="rgba(0,0,0,.3)";a.beginPath();a.moveTo(d,0);a.lineTo(c-d,0);a.arcTo(c,0,c,d,d);a.stroke();a.strokeStyle="rgba(0,0,0,.2)";a.beginPath();a.moveTo(d,0);a.arcTo(0,0,0,d,d);a.stroke();
1365a.restore()}else{if(this.type=="number"){d=b/2;a.beginPath();a.moveTo(0,d);a.arcTo(0,0,d,0,
1366d);a.lineTo(c-d,0);a.arcTo(c,0,c,d,d);a.lineTo(c,b-d);a.arcTo(c,b,c-d,b,d);a.lineTo(d,b);a.arcTo(0,b,0,b-d,d);a.closePath();a.fill();a.strokeStyle="rgba(0,0,0,.3)";a.beginPath();a.moveTo(d,0);a.lineTo(c-d,0);a.arcTo(c,0,c,d,d);a.stroke();a.strokeStyle="rgba(0,0,0,.2)";a.beginPath();a.moveTo(d,0);a.arcTo(0,0,0,d,d)}else{a.beginPath();a.moveTo(0,labelAnyRadius);a.arcTo(0,0,labelAnyRadius,0,labelAnyRadius);a.lineTo(c-labelAnyRadius,0);a.arcTo(c,0,c,labelAnyRadius,labelAnyRadius);a.lineTo(c,b-labelAnyRadius);
1367a.arcTo(c,b,c-labelAnyRadius,b,labelAnyRadius);a.lineTo(labelAnyRadius,b);a.arcTo(0,b,0,b-labelAnyRadius,labelAnyRadius);a.closePath();a.fill();a.strokeStyle="rgba(0,0,0,.3)";a.beginPath();a.moveTo(labelAnyRadius,0);a.lineTo(c-labelAnyRadius,0);a.arcTo(c,0,c,labelAnyRadius,labelAnyRadius);a.lineTo(c,b-labelAnyRadius);a.stroke();a.strokeStyle="rgba(0,0,0,.2)";a.beginPath();a.moveTo(labelAnyRadius,0);a.arcTo(0,0,0,labelAnyRadius,labelAnyRadius);a.lineTo(0,b-labelAnyRadius)}a.stroke()}a.strokeStyle=
1368this.fontColor;a.fillStyle=this.fontColor;if(this.parent&&this.parent.parent&&this.parent.parent.func=="blockInlineComment"){a.strokeStyle=defaultFontCommentColor;a.fillStyle=defaultFontCommentColor}if(this.type=="string"&&this.label)a.fillText((""+this.label).substring(0,80)+((""+this.label).length>80?"...":""),3+labelRadius,b/2);else if(this.type=="bitImages"){b=parseInt(this.label);a.save();a.fillStyle="#f00";a.translate(labelRadius,-labelRadius);for(d=4;d>=0;d--)for(var f=4;f>=0;f--){var e=b&
13691,b=b>>1;e&&a.fillRect(f*6+1,d*6+1,4,4)}a.restore()}
1369else this.type!="bit"&&(this.type!="bitcolor"&&this.type!="bitImages")&&a.fillText(this.label,3+labelRadius,b/2);if(this.hasFocus){c=a.measureText((""+this.label).substring(0,this.cursorPos)).width+3+labelRadius+0.5;a.lineWidth=1;a.beginPath();a.moveTo(c,2);a.lineTo(c,this.height-3);a.closePath();a.stroke()}else if(this.type=="variables"||this.type=="lists"){a.strokeStyle=dropdownColor;a.fillStyle=dropdownColor;a.beginPath();a.moveTo(c-labelRadius-
13701,5);a.lineTo(c-labelRadius-1-4,10);a.lineTo(c-labelRadius-1-8,5);a.closePath();a.stroke();a.fill()}a.restore()}};
1371var RenderCode={_supported:["tynker","javascript","python","swift"],codeType:"tynker",mappings:{},COLOR_KEYWORD:"{color:fcafff}",COLOR_NUMBER_CONSTANT:"{color:ffe875}",COLOR_STRING_CONSTANT:"{color:ffe875}",COLOR_IDENTIFIER:"{color:37daff}",COLOR_RESET:"{color:reset}",reIdent:RegExp(/[^a-zA-Z0-9_]/g),reClean:RegExp(/_+/g),reClean2:RegExp(/_*$/g),reParams:RegExp(/{((choice:)?([a-zA-Z0-9 ]+):?([-a-zA-Z0-9#_./!? ]+)?)}/g),setCodeType:function(a){if(this._supported.indexOf(a)>=0){var b=this.codeType;
1372this.codeType=a;if(b!=a){$(".code-selector li").removeClass("selected");$(".code-selector li."+this.codeType).addClass("selected");window.WinCode&&WinCode.reRender();window.WinTools&&WinTools.reRender()}}},getCodeType:function(){return this.codeType},startRequiresClosingBracket:function(a){return this.codeType!="tynker"&&!a.hasFlap},ensureIdentifier:function(a){a=a.replace(this.reParams,"");a=a.replace(this.reIdent,"_");a[0]>="0"&&a[0]<="9"&&(a="_"+a);a=a.replace(this.reClean,"_");return a=a.replace(this.reClean2,
1373"")},getNamedParameters:function(a){var b=[],c;do{c=this.reParams.exec(a);c!=null&&(c[2]=="choice:"?c[4]?b.push([c[3],"choice:"+c[3]+":"+c[4],c[1]]):b.push([c[3],"choice:"+c[3],c[1]]):c[4]?c[3]!="image"&&b.push([c[4],c[3]+":"+c[4],c[1]]):c[3]=="boolean"?b.push([c[3],c[3]+":false",c[1]]):c[3]=="number"?b.push([c[3],c[3]+":0",c[1]]):c[3]=="color"?c[4]?b.push([c[3],c[3]+":"+c[4],c[1]]):b.push([c[3],c[3],c[1]]):b.push([c[3],c[3],c[1]]))}while(c!=null);return b},getCodeStartLabel:function(a){var b=a.labelText;
1374if(this.isCode()){if(a.func){var c=this.mappings[this.codeType];if(c){var d=c[a.func];if(d){b=d[0];if(a.name){b=a.labelText?b.replace("%s",this.ensureIdentifier(a.labelText)):b.replace("%s",this.ensureIdentifier(a.name));c="";a=this.getNamedParameters(a.labelText);for(d=0;d<a.length;d++){var f=a[d],e=this.ensureIdentifier(f[0]),c=this.codeType=="swift"?c+(RenderCode.COLOR_IDENTIFIER+e+RenderCode.COLOR_RESET+":{"+f[1]+"}"):c+("{"+f[1]+"}");d<a.length-1&&(c=c+", ")}b=b.replace("%s",c)}}else if(a.func&&
1375a.func!="nop"){d=a.value?c.valueControlCall:c.blockControlCall;b=d[0];b=b.replace("%s",this.ensureIdentifier(a.labelText));c="";a=this.getNamedParameters(a.labelText);for(d=0;d<a.length;d++){f=a[d];e=this.ensureIdentifier(f[0]);c=this.codeType=="swift"?c+(RenderCode.COLOR_IDENTIFIER+e+RenderCode.COLOR_RESET+":{"+f[2]+"}"):c+("{"+f[2]+"}");d<a.length-1&&(c=c+", ")}b=b.replace("%s",c)}}}}else b=a.labelText;return b},getCodeEndLabel:function(a){var b;switch(this.codeType){case "javascript":case "swift":b=
1376"}";break;default:b=""}if(this.isCode()&&a.func){var c=RenderCode.mappings[RenderCode.codeType];if(c)(a=c[a.func])&&(b=a[1])}return b},getElseIfLabel:function(){var a="";switch(this.codeType){case "python":a=RenderCode.COLOR_KEYWORD+"elif "+RenderCode.COLOR_RESET+"({boolean}) {button:remove}:";break;case "javascript":a="} "+RenderCode.COLOR_KEYWORD+"else if "+RenderCode.COLOR_RESET+"({boolean}) {button:remove} {";break;case "swift":a="} "+RenderCode.COLOR_KEYWORD+"else if "+RenderCode.COLOR_RESET+
1377"{boolean} {button:remove} {";break;default:a="else if {boolean} then {button:remove}"}return a},getElseLabel:function(){var a="";switch(this.codeType){case "python":a=RenderCode.COLOR_KEYWORD+"else "+RenderCode.COLOR_RESET+"{button:add}:";break;case "javascript":case "swift":a="} "+RenderCode.COLOR_KEYWORD+"else "+RenderCode.COLOR_RESET+"{button:add} {";break;default:a="else {button:add}"}return a},isCode:function(){return this.codeType!="tynker"}};
1378RenderCode.mappings.javascript={registerFlagTrigger:[RenderCode.COLOR_KEYWORD+"function "+RenderCode.COLOR_IDENTIFIER+"main"+RenderCode.COLOR_RESET+"() {","}"],registerSpriteTrigger:[RenderCode.COLOR_KEYWORD+"function "+RenderCode.COLOR_IDENTIFIER+"when_clicked"
1378+RenderCode.COLOR_RESET+"() {","}"],registerBroadcastTrigger:[RenderCode.COLOR_IDENTIFIER+"when_receive"+RenderCode.COLOR_RESET+'("'+RenderCode.COLOR_STRING_CONSTANT+"{events}"+RenderCode.COLOR_RESET+'", '+RenderCode.COLOR_KEYWORD+"function"+
1379RenderCode.COLOR_RESET+"() {","});"],registerKeyTrigger:[RenderCode.COLOR_IDENTIFIER+"when_key_pressed"+RenderCode.COLOR_RESET+'("'+RenderCode.COLOR_STRING_CONSTANT+"{choice:keys}"+RenderCode.COLOR_RESET+'", '+RenderCode.COLOR_KEYWORD+"function"+RenderCode.COLOR_RESET+"() {","});"],registerFunction:[RenderCode.COLOR_KEYWORD+"function "+RenderCode.COLOR_IDENTIFIER+"%s"+RenderCode.COLOR_RESET+"(%s) {","}"],blockControlIf:[RenderCode.COLOR_KEYWORD+"if "+RenderCode.COLOR_RESET+"({boolean}) {","}"],blockControlIfElse:[RenderCode.COLOR_KEYWORD+
1380"if "+RenderCode.COLOR_RESET+"({boolean}) {","}"],blockControlWhile:[RenderCode.COLOR_KEYWORD+"while "+RenderCode.COLOR_RESET+"({boolean}) {","}"],blockControlRepeatUntil:[RenderCode.COLOR_KEYWORD+"while "+RenderCode.COLOR_RESET+"(!{boolean}) {","}"],blockControlRepeat:[RenderCode.COLOR_KEYWORD+"for "+RenderCode.COLOR_RESET+"("+RenderCode.COLOR_KEYWORD+"var "+RenderCode.COLOR_IDENTIFIER+"i"+RenderCode.COLOR_RESET+" = "+RenderCode.COLOR_NUMBER_CONSTANT+"0"+RenderCode.COLOR_RESET+"; "+RenderCode.COLOR_IDENTIFIER+
1381"i "+RenderCode.COLOR_RESET+"< "+RenderCode.COLOR_NUMBER_CONSTANT+"{number:9}"+RenderCode.COLOR_RESET+"; "+RenderCode.COLOR_IDENTIFIER+"i"+RenderCode.COLOR_RESET+"++) {","}"],blockControlForever:[RenderCode.COLOR_KEYWORD+"while "+RenderCode.COLOR_RESET+"("+RenderCode.COLOR_KEYWORD+"true"+RenderCode.COLOR_RESET+") {","}"],blockControlCall:[RenderCode.COLOR_IDENTIFIER+"%s"+RenderCode.COLOR_RESET+"(%s);",""],valueControlCall:[RenderCode.COLOR_IDENTIFIER+"%s"+RenderCode.COLOR_RESET+"(%s)",""],blockControlCallLibrary:[RenderCode.COLOR_IDENTIFIER+
1382"%s"+RenderCode.COLOR_RESET+"(%s);",""],valueControlCallLibrary:[RenderCode.COLOR_IDENTIFIER+"%s"+RenderCode.COLOR_RESET+"(%s)",""],valueOpAdd:["{number} + {number}",""],valueOpSubtract:["{number} - {number}",""],valueOpMultiply:["{number} * {number}",""],valueOpDivide:["{number} / {number}",""],valueOpRandom:["Math.randomNumber({number}, {number})",""],valueOpLess:["{string} < {string}",""],valueOpEqual:["{string} == {string}",""],valueOpGreater:["{string} > {string}",""],valueOpAnd:["{boolean} && {boolean}",
1383""],valueOpOr:["{boolean} || {boolean}",""],valueOpNot:["!{boolean}",""],valueOpJoin:["{string} + {string}",""],valueOpLetter:["{string}[{number}]",""],valueOpLength:["{string}.length",""],valueOpMod:["{number} % {number}",""],valueOpRound:["Math.round({number})",""],valueOpMath:["Math.{string}({number})",""],valueOpMath2:["Math.{string}({number}, {number})",""],valueOpConstants:["Math.{string}",""],valueOpBinary:["{string} {choice:operator} {string}",""],valueOpBitNot:["~{number}",""],blockControlWait:[RenderCode.COLOR_IDENTIFIER+
1384"wait"+RenderCode.COLOR_RESET+"({number});",""],blockControlBroadcast:[RenderCode.COLOR_IDENTIFIER+"broadcastMessage"+RenderCode.COLOR_RESET+"({string});",""],blockControlBroadcastWait:[RenderCode.COLOR_IDENTIFIER+"broadcastMessageAndWait"+RenderCode.COLOR_RESET+"({string});",""],blockControlPostMessage:[RenderCode.COLOR_IDENTIFIER+"postMessage"+RenderCode.COLOR_RESET+"({string}, {string}, {string});",""],blockControlPostMessageAndWait:[RenderCode.COLOR_IDENTIFIER+"postMessageAndWait"+RenderCode.COLOR_RESET+
1385"({string}, {string}, {string});",""]};
1386RenderCode.mappings.python={registerFlagTrigger:[RenderCode.COLOR_KEYWORD+"def "+RenderCode.COLOR_IDENTIFIER+"main"+RenderCode.COLOR_RESET+"():",""],registerSpriteTrigger:[RenderCode.COLOR_KEYWORD+"def "+RenderCode.COLOR_IDENTIFIER+"clicked"+RenderCode.COLOR_RESET+"():",""],registerBroadcastTrigger:[RenderCode.COLOR_KEYWORD+"if "+RenderCode.COLOR_IDENTIFIER+"msg_received "+RenderCode.COLOR_RESET+'== "'+RenderCode.COLOR_STRING_CONSTANT+"{events}"+RenderCode.COLOR_RESET+'":',""],registerKeyTrigger:[RenderCode.COLOR_KEYWORD+
1387"if "+RenderCode.COLOR_IDENTIFIER+"key_pressed "+RenderCode.COLOR_RESET+'== "'+RenderCode.COLOR_STRING_CONSTANT+"{choice:keys}"+RenderCode.COLOR_RESET+'":',""],registerFunction:[RenderCode.COLOR_KEYWORD+"def "+RenderCode.COLOR_IDENTIFIER+"%s"+RenderCode.COLOR_RESET+"(%s):",""],blockControlIf:[RenderCode.COLOR_KEYWORD+"if "+RenderCode.COLOR_RESET+"({boolean}):",""],blockControlIfElse:[RenderCode.COLOR_KEYWORD+"if "+RenderCode.COLOR_RESET+"({boolean}):",""],blockControlWhile:[RenderCode.COLOR_KEYWORD+
1388"while "+RenderCode.COLOR_RESET+"({boolean}):",""],blockControlRepeatUntil:[RenderCode.COLOR_KEYWORD+"while "+RenderCode.COLOR_RESET+"("+RenderCode.COLOR_KEYWORD+"not "+RenderCode.COLOR_RESET+"{boolean}):",""],blockControlRepeat:[RenderCode.COLOR_KEYWORD+"for "+RenderCode.COLOR_IDENTIFIER+"i"+RenderCode.COLOR_RESET+" in "+RenderCode.COLOR_KEYWORD+"range"+RenderCode.COLOR_RESET+"("+RenderCode.COLOR_NUMBER_CONSTANT+"0"+RenderCode.COLOR_RESET+", "+RenderCode.COLOR_NUMBER_CONSTANT+"{number:9}"+RenderCode.COLOR_RESET+
1389"):",""],blockControlForever:[RenderCode.COLOR_KEYWORD+"while "+RenderCode.COLOR_KEYWORD+"true"+RenderCode.COLOR_RESET+":",""],blockControlCall:[Ren
1389derCode.COLOR_IDENTIFIER+"%s"+RenderCode.COLOR_RESET+"(%s)",""],valueControlCall:[RenderCode.COLOR_IDENTIFIER+"%s"+RenderCode.COLOR_RESET+"(%s)",""],blockControlCallLibrary:[RenderCode.COLOR_IDENTIFIER+"%s"+RenderCode.COLOR_RESET+"(%s)",""],valueControlCallLibrary:[RenderCode.COLOR_IDENTIFIER+"%s"+RenderCode.COLOR_RESET+"(%s)",""],valueOpAdd:["{number} + {number}",
1390""],valueOpSubtract:["{number} - {number}",""],valueOpMultiply:["{number} * {number}",""],valueOpDivide:["{number} / {number}",""],valueOpRandom:["random({number}, {number})",""],valueOpLess:["{string} < {string}",""],valueOpEqual:["{string} == {string}",""],valueOpGreater:["{string} > {string}",""],valueOpAnd:["{boolean} and {boolean}",""],valueOpOr:["{boolean} or {boolean}",""],valueOpNot:["not {boolean}",""],valueOpJoin:["{string} + {string}",""],valueOpLetter:["{string}[{number}]",""],valueOpLength:["len({string})",
1391""],valueOpMod:["{number} % {number}",""],valueOpRound:["round({number})",""],valueOpMath:["{string}({number})",""],valueOpMath2:["{string}({number}, {number})",""],valueOpConstants:["{string}",""],valueOpBinary:["{string} {choice:operator} {string}",""],valueOpBitNot:["~{number}",""],blockControlWait:[RenderCode.COLOR_IDENTIFIER+"sleep"+RenderCode.COLOR_RESET+"({number});",""],blockControlBroadcast:[RenderCode.COLOR_IDENTIFIER+"broadcastMessage"+RenderCode.COLOR_RESET+"({string});",""],blockControlBroadcastWait:[RenderCode.COLOR_IDENTIFIER+
1392"broadcastMessageAndWait"+RenderCode.COLOR_RESET+"({string});",""],blockControlPostMessage:[RenderCode.COLOR_IDENTIFIER+"postMessage"+RenderCode.COLOR_RESET+"({string}, {string}, {string});",""],blockControlPostMessageAndWait:[RenderCode.COLOR_IDENTIFIER+"postMessageAndWait"+RenderCode.COLOR_RESET+"({string}, {string}, {string});",""]};
1393RenderCode.mappings.swift={registerFlagTrigger:[RenderCode.COLOR_KEYWORD+"func "+RenderCode.COLOR_IDENTIFIER+"main"+RenderCode.COLOR_RESET+"() {","}"],registerSpriteTrigger:[RenderCode.COLOR_KEYWORD+"func "+RenderCode.COLOR_IDENTIFIER+"when_touched"+RenderCode.COLOR_RESET+"() {","}"],registerBroadcastTrigger:[RenderCode.COLOR_IDENTIFIER+"when_receive"+RenderCode.COLOR_RESET+'(event:"'+RenderCode.COLOR_STRING_CONSTANT+"{events}"+RenderCode.COLOR_RESET+'", '+RenderCode.COLOR_IDENTIFIER+"closure"+RenderCode.COLOR_RESET+
1394": {{ () -> "+RenderCode.COLOR_STRING_CONSTANT+"Void "+RenderCode.COLOR_KEYWORD+"in"+RenderCode.COLOR_RESET,"});"],registerKeyTrigger:[RenderCode.COLOR_IDENTIFIER+"when_key_pressed"+RenderCode.COLOR_RESET+'(keyName:"'+RenderCode.COLOR_STRING_CONSTANT+"{choice:keys}"+RenderCode.COLOR_RESET+'", '+RenderCode.COLOR_IDENTIFIER+"closure"+RenderCode.COLOR_RESET+": {{ () -> "+RenderCode.COLOR_STRING_CONSTANT+"Void "+RenderCode.COLOR_KEYWORD+"in"+RenderCode.COLOR_RESET,"});"],registerFunction:[RenderCode.COLOR_KEYWORD+
1395"func "+RenderCode.COLOR_IDENTIFIER+"%s"+RenderCode.COLOR_RESET+"(%s) {","}"],blockControlIf:[RenderCode.COLOR_KEYWORD+"if"+RenderCode.COLOR_RESET+" {boolean} {","}"],blockControlIfElse:[RenderCode.COLOR_KEYWORD+"if"+RenderCode.COLOR_RESET+" {boolean} {","}"],blockControlWhile:[RenderCode.COLOR_KEYWORD+"while"+RenderCode.COLOR_RESET+" {boolean} {","}"],blockControlRepeatUntil:[RenderCode.COLOR_KEYWORD+"while "+RenderCode.COLOR_RESET+"(!{boolean}) {","}"],blockControlRepeat:[RenderCode.COLOR_KEYWORD+
1396"for"+RenderCode.COLOR_RESET+" _ "+RenderCode.COLOR_KEYWORD+"in "+RenderCode.COLOR_NUMBER_CONSTANT+"1"+RenderCode.COLOR_RESET+"..."+RenderCode.COLOR_NUMBER_CONSTANT+"{number:9} "+RenderCode.COLOR_RESET+"{","}"],blockControlForever:[RenderCode.COLOR_KEYWORD+"while "+RenderCode.COLOR_RESET+"("+RenderCode.COLOR_KEYWORD+"true"+RenderCode.COLOR_RESET+") {","}"],blockControlCall:[RenderCode.COLOR_IDENTIFIER+"%s"+RenderCode.COLOR_RESET+"(%s)",""],valueControlCall:[RenderCode.COLOR_IDENTIFIER+"%s"+RenderCode.COLOR_RESET+
1397"(%s)",""],blockControlCallLibrary:[RenderCode.COLOR_IDENTIFIER+"%s"+RenderCode.COLOR_RESET+"(%s)",""],valueControlCallLibrary:[RenderCode.COLOR_IDENTIFIER+"%s"+RenderCode.COLOR_RESET+"(%s)",""],valueOpAdd:["{number} + {number}",""],valueOpSubtract:["{number} - {number}",""],valueOpMultiply:["{number} * {number}",""],valueOpDivide:["{number} / {number}",""],valueOpRandom:["Math.randomNumber({number}, {number})",""],valueOpLess:["{string} < {string}",""],valueOpEqual:["{string} == {string}",""],valueOpGreater:["{string} > {string}",
1398""],valueOpAnd:["{boolean} && {boolean}",""],valueOpOr:["{boolean} || {boolean}",""],valueOpNot:["!{boolean}",""],valueOpJoin:["{string} + {string}",""],valueOpLetter:["{string}[{number}]",""],valueOpLength:["{string}.length",""],valueOpMod:["{number} % {number}",""],valueOpRound:["Math.round({number})",""],valueOpMath:["Math.{string}({number})",""],valueOpMath2:["Math.{string}({number}, {number})",""],valueOpConstants:["Math.{string}",""],valueOpBinary:["{string} {choice:operator}
1398 {string}",""],
1399valueOpBitNot:["~{number}",""],blockControlWait:[RenderCode.COLOR_IDENTIFIER+"delay"+RenderCode.COLOR_RESET+"(seconds:{number});",""],blockControlBroadcast:[RenderCode.COLOR_IDENTIFIER+"broadcastMessage"+RenderCode.COLOR_RESET+"(message:{string});",""],blockControlBroadcastWait:[RenderCode.COLOR_IDENTIFIER+"broadcastMessageAndWait"+RenderCode.COLOR_RESET+"(message:{string});",""],blockControlPostMessage:[RenderCode.COLOR_IDENTIFIER+"postMessage"+RenderCode.COLOR_RESET+"(message:{string}, actor:{string}, withValue:{string});",
1400""],blockControlPostMessageAndWait:[RenderCode.COLOR_IDENTIFIER+"postMessageAndWait"+RenderCode.COLOR_RESET+"(message:{string}, actor:{string}, withValue:{string});",""]};
1401var ObjectIO={forceFullScreen:!1,serialize:function(){var a={description:window.IDE?window.IDE.currentProjectDescription:"",puzzleTitle:window.WinPuzzle?window.WinPuzzle.puzzleTitle:"",puzzleInstructions:window.WinPuzzle?window.WinPuzzle.puzzleInstructions:"",background:{},sprites:[],libs:[],variables:{},cloudVariables:{},varDefaults:{},lists:{},cloudLists:{},physics:{}};a.name=Runtime.levels&&Runtime.levels.length>0?Runtime.levels[Runtime.currentLevelIndex].name:window.IDE?window.IDE.currentProjectName:
1402"";if(window.IDE&&IDE.currentLessonOwnerId)a.lessonownerid=IDE.currentLessonOwnerId;for(var b in Runtime.background.variables)a.variables[b]=Runtime.background.variables[b];if(Runtime.background.cloudVariables)for(b in Runtime.background.cloudVariables)a.cloudVariables[b]=Runtime.background.cloudVariables[b];if(Runtime.background.varDefaults)for(b in Runtime.background.varDefaults)a.varDefaults[b]=Runtime.background.varDefaults[b];else for(b in Runtime.background.variables)a.varDefaults[b]=Runtime.background.variables[b];
1403for(b in Runtime.background.lists)a.lists[b]=Runtime.background.lists[b];if(Runtime.background.cloudLists)for(b in Runtime.background.cloudLists)a.cloudLists[b]=Runtime.background.cloudLists[b];a.background.scaleType=Runtime.stage.bgtype;a.background.width=Runtime.stage.width;a.background.height=Runtime.stage.height;a.background.canvasWidth=$(Runtime.stage.container).innerWidth();a.background.canvasHeight=$(Runtime.stage.container).innerHeight();a.background.canvasExpand=Runtime.stage.expand?true:
1404false;a.background.img=Runtime.background.imgSrc;a.background.currentBackground=Runtime.background.currentCostume;a.background.scripts=ObjectIO.serializeScripts(Runtime.background);var c=[];for(b=0;b<Runtime.background.costumes.length;b++)c.push({name:Runtime.background.costumes[b].name,img:Runtime.background.costumes[b].img,cx:Runtime.background.costumes[b].cx,cy:Runtime.background.costumes[b].cy});a.background.backgrounds=c;c=[];for(b=0;b<Runtime.background.sounds.length;b++)c.push({name:Runtime.background.sounds[b].name,
1405sound:Runtime.background.sounds[b].sound});a.background.sounds=c;if(Runtime.background.documentation)a.background.documentation=Runtime.background.documentation;for(c=0;c<Runtime.libs.length;c++)a.libs.push(Runtime.libs[c].classname);for(c=0;c<Runtime.sprites.length;c++){b=Runtime.sprites[c];if(!b.instantiated){b=ObjectIO.serializeSprite(b);a.sprites.push(b)}}a.physics.enabled=Physics.isSimulationRunning();a.physics.gravity={x:Physics.getWorld().GetGravity().x,y:Physics.getWorld().GetGravity().y};
1406if(Runtime.stage.tileLayer.enabled&&Runtime.stage.tileLayer.map&&Runtime.stage.tileLayer.map.length>0){a.scrollBgOffset=Runtime.stage.tileLayer.scrollBgOffset;a.tilesEnabled=Runtime.stage.tileLayer.enabled;for(var d=Runtime.stage.tileLayer.map,f=d[0].length,e=[],c=0;c<d.length;c++){var g=d[c],h=[];for(b=0;b<f;b++)g[b]?h.push(g[b]>>3|31):h.push(0);e.push(h)}a.tiles=e}return JSON.stringify(a)},serializeScripts:function(a,b){for(var c=[],d=0;d<a.scripts.length;d++){var f=a.scripts[d],e;if(f instanceof
1407Block){if(e=ObjectIO.genScriptObj(f,b)){e.x=f.x;e.y=f.y;c.push(e)}}else if(f instanceof Label)if(e=ObjectIO.genValueObj(f,b)){e.x=f.x;e.y=f.y;c.push(e)}}return c},deserializeScripts:function(a,b){for(var c=0;c<b.length;c++){var d=b[c],f=ObjectIO.deserializeScriptStep(d,a);if(f){f.x=d.x;f.y=d.y;if(f.func.substring(0,8)=="register"){if(f.func=="registerFunction")for(d=0;d<a.scripts.length;d++)if(a.scripts[d].func=="registerFunction"&&a.scripts[d].name==f.name){a.scripts.splice(d,1);break}Scripts.create({sprite:a,
1408scriptBlock:f})}a.scripts.push(f)}}},serializeSprite:function(a,b){var c=Physics.getSpriteProperties(a.spriteObj),c={label:a.label,scripts:[],costumes:[],currentCostume:a.currentCostume,sounds:[],scale:a.spriteObj.scale.x,x:a.spriteObj.x-Runtime.stage.getWidth()/2,y:-(a.spriteObj.y-Runtime.stage.getHeight()/2),rotation:a.spriteObj.rotation,rotateLock:a.spriteObj.rotateLock,draggable:a.spriteObj.draggable,hidden:a.hidden?true:false,isHidden:!a.spriteObj.visible,volume:a.volume,locked:a.locked?true:
1409false,hiddenInSandbox:a.hiddenInSandbox?true:false,lockedInSandbox:a.lockedInSandbox?true:false,zIndex:a.spriteObj.zIndex,penColor:a.spriteObj.penColor,fillColor:a.spriteObj.fillColor,font:a.spriteObj.font,fontColor:a.spriteObj.fontColor,penWidth:a.spriteObj.penWidth,bubble:a.spriteObj.bubble,physics:{isStatic:c.isStatic,isActive:c.isActive,geometry:c.geometry,density:c.density,friction:c.friction,restitution:c.restitution},variables:{},varDefaults:{},lists:{}};if(a.classname)c.classname=a.classname;
1410if(a.id)c.id=a.id;if(a.hidden)c.hidden=true;if(a.spriteObj.isStatic)c.isStatic=true;if(a.avatarid)c.avatarid=a.avatarid;if(a.skeleton.type&&a.skeleton.parts){c.skeletonType=a.skeleton.type;c.skeletonParts=a.skeleton.parts}if(a.documentation){c.documentation=a.documentation;if(c.documentation.inboundEvents)for(var d=0;d<c.documentation.inboundEvents.length;d++)c.documentation.inboundEvents[d]&&delete c.documentation.inboundEvents[d].blockImg;if(c.documentation.outboundEvents)for(d=0;d<c.documentation.outboundEvents.length;d++)c.documentation.outboundEvents[d]&&
1411delete c.documentation.outboundEvents[d].blockImg}for(var f in a.variables)c.variables[f]=a.variables[f];if(a.varDefaults)for(f in a.varDefaults)c.varDefaults[f]=a.varDefaults[f];else for(f in a.variables)c.varDefaults[f]=a.variables[f];for(f in a.lists)c.lists[f]=a.lists[f];c.scripts=ObjectIO.serializeScripts(a,b);for(d=0;d<a.costumes.length;d++){f={name:a.costumes[d].name,img:a.costumes[d].img,cx:a.costumes[d].cx,cy:a.costumes[d].cy};if(a.locked&&a.costumes[d].hidden)f.hidden=true;c.costumes.push(f)}for(d=
14120;d<a.sounds.length;d++){f={hidden:a.sounds[d].hidden?true:false,name:a.sounds[d].name,sound:a.sounds[d].sound};if(a.locked&&a.sounds[d].hidden)f.hidden=true;c.sounds.push(f)}return c},genScriptObj:function(a,b){var c={func:a.func};if(a.hidden)c.hidden=true;if(a.locked)c.locked=true;if(a.hiddenInSandbox)c.hiddenInSandbox=true;if(a.lockedInSandbox)c.lockedInSandbox=true;if(!b&&a.id)c.id=a.id;if(a.marked){if(ObjectIO.omitMarked)return null;c.marked=true}if(a.tags)c.tags=a.tags;if(a.func=="registerFunction"){c.cat=
1413a.cat?a.cat:"functions";c.name=a.name;c.label=a.labelText;c.hasFlap=false}else if(a.func=="blockControlCall"||a.func=="blockControlCallLibrary"){c.cat=a.cat?a.cat:"functions";c.name=a.name;c.label=a.labelText}else if(a.func=="blockControlScriptVar"){c.cat="var";c.name=a.name;c.label=a.labelText}else if(a.func=="blockComment"){c.width=a.width;c.height=a.height;c.label=a.labelText}for(var d=[],f=a.label.getNumSockets(),e=0;e<f;e++)d.push(ObjectIO.genValueObj(a.label.getSocketAtChild(e),b));c.values=
1414d;
1414for(var d=[],g=[],f=a.getNumContainers(),e=0;e<f;e++){var h=a.getBlockAtContainer(e);h?d.push(ObjectIO.genScriptObj(h,b)):d.push(null);if(e>0){h=ObjectIO.genValueObj(a._containerLabels[e-1],b);h.labelText=a._containerLabels[e-1].labelText;g.push(h)}}if(d.length>0)c.containers=d;if(g.length>0)c.containerLabels=g;if(a.next)c.next=ObjectIO.genScriptObj(a.next,b);return c},genValueObj:function(a,b){var c={};if(a instanceof Label){c.type="wrapper";c.func=a.func;if(!b&&a.id)c.id=a.id;if(a.hidden)c.hidden=
1415true;if(a.locked)c.locked=true;if(a.marked){if(ObjectIO.omitMarked)return null;c.marked=a.marked}if(a.tags)c.tags=a.tags;if(a.func=="valueControlCall"||a.func=="valueControlCallLibrary"){c.name=a.name;c.label=a.label}if(a.func=="valueVar"||a.func=="valueList"||a.func=="valueParam"||a.func=="valueScriptVar")c.name=a.name;else{for(var d=[],f=a.getNumSockets(),e=0;e<f;e++)d.push(ObjectIO.genValueObj(a.getSocketAtChild(e),b));c.values=d}}else{c.type=a.type=="number"?"number":a.type=="boolean"?"boolean":
1416a.type=="string"?"string":a.type=="any"?"any":a.type=="color"?"color":a.type=="choice"?"choice":"string";c.value=a.label;if(a.marked){if(ObjectIO.omitMarked)return null;c.marked=a.marked}if(a.locked)c.locked=true;if(a._child!=null){c=ObjectIO.genValueObj(a._child,b);if(a._child.hidden)c.text=a.label}}return c},deserialize:function(a,b){ObjectIO.loaded=1;var c=a;if(typeof a=="string"||a instanceof String)c=JSON.parse(a);if(window.IDE){IDE.reset();IDE._ignoreUpdates=true}Runtime.reset();Runtime.stage.enableDragging(true);
1417if(window.IDE){IDE.setTitle(c.projectName?c.projectName:"");IDE.currentProjectDescription=c.description?c.description:g_loc.getText("dialog.defaultprojdesc");if(window.WinPuzzle){WinPuzzle.puzzleTitle=c.puzzleTitle;WinPuzzle.puzzleInstructions=c.puzzleInstructions}}if(c.background){Runtime.background.label=c.background.label?c.background.label:"Stage";Runtime.background.variables=c.background.variables?c.background.variables:{};Runtime.background.cloudVariables=c.background.cloudVariables?c.background.cloudVariables:
1418{};Runtime.background.varDefaults=c.background.varDefaults?c.background.varDefaults:{};Runtime.background.lists=c.background.lists?c.background.lists:{};Runtime.background.cloudLists=c.background.cloudLists?c.background.cloudLists:{};Runtime.stage.setBackgroundType(c.background.scaleType);if(!c.background.width)c.background.width=480;if(!c.background.height)c.background.height=360;if(!c.background.canvasWidth)c.background.canvasWidth=c.background.width;if(!c.background.canvasHeight)c.background.canvasHeight=
1419c.background.height;Runtime.stage.expand=c.background.canvasExpand;if(!window.IDE){var d=$("#stage-canvas");d.length>0&&d.css("width",Math.abs(c.background.width)).css("height",Math.abs(c.background.height))}Runtime.stage.setSize(Math.abs(c.background.width),Math.abs(c.background.height));for(var f=c.background.backgrounds,d=0;d<f.length;d++){var e=f[d];Runtime.background.addCostume({name:e.name,img:e.img},function(){c.background.currentBackground!=void 0&&Runtime.background.setCostumeByName(c.background.currentBackground)})}if(f=
1420c.background.sounds)for(d=0;d<f.length;d++){e=f[d];Runtime.background.addSound({name:e.name,sound:e.sound})}ObjectIO.deserializeScripts(Runtime.background,c.background.scripts);if(c.variables)for(var g in c.variables)Runtime.background.variables[g]=c.variables[g];if(c.varDefaults)for(g in c.varDefaults)Runtime.background.varDefaults[g]=c.varDefaults[g];if(c.cloudVariables)for(g in c.cloudVariables)Runtime.background.cloudVariables[g]=c.cloudVariables[g];if(c.lists)for(g in c.lists)Runtime.background.lists[g]=
1421c.lists[g];if(c.cloudLists)for(g in c.cloudLists)Runtime.background.cloudLists[g]=c.cloudLists[g];if(c.background.documentation)Runtime.background.documentation=c.background.documentation}if(c.libs)for(d=0;d<c.libs.length;d++){ObjectIO.loaded++;Runtime.requireLibrary(c.libs[d],function(){ObjectIO.doCallback(b,c);window.WinTools&&window.WinTools.reset()})}g=c.sprites;for(d=0;d<g.length;d++){f=g[d];if(f.zIndex===void 0)f.zIndex=d;ObjectIO.deserializeSprite(f,function(){ObjectIO.doCallback(b,c)},false,
1422b,c)}if(c.physics){Physics.getWorld().SetGravity(new b2Vec2(c.physics.gravity.x,c.physics.gravity.y));Runtime.isScratch=false}else Runtime.isScratch=true;if(c.watchers)for(d=0;d<c.watchers.length;d++){g=c.watchers[d];if(g.visible){(f=g.target)||(f="Stage");if(g.func){Runtime.addWatcher(f,g_steps[g.func],g.x-Runtime.stage.getWidth()/2,Runtime.stage.getHeight()/2-g.y,0.5);ObjectIO.doCallback(b,c)}else if(g.name){Runtime.addWatcher(f,g.name,g.x-Runtime.stage.getWidth()/2,Runtime.stage.getHeight()/2-
1423g.y,0.5);ObjectIO.doCallback(b,c)}}}if(c.tiles){Runtime.stage.tileLayer.setup();Runtime.stage.tileLayer.scrollBgOffset=c.scrollBgOffset?true:false;Runtime.stage.tileLayer.enableTiles(c.tilesEnabled);g=c.tiles;f=g[0].length;e=[];for(d=0;d<g.length;d++){for(var h=g[d],i=[],j=0;j<f;j++)h[j]&31?i.push((h[j]<<3|255)&4294967295):i.push(0);e.push(i)}c.tiles=e;Runtime.stage.tileLayer.loadMap(c.tiles)}else Runtime.stage.tileLayer.setup();if(c.levels){Runtime.levels=c.levels;Runtime.currentLevelIndex=parseInt(c.currentLevel)}else{Runtime.levels=
1424[{name:c.name,screenshotid:""}];Runtime.currentLevelIndex=0}Runtime.cleanup();ObjectIO.doCallback(b,c)},doCallback:function(a,b){ObjectIO.loaded--;if(ObjectIO.loaded<=0){if(window.IDE)IDE._ignoreUpdates=false;a&&a(b)}},loadSprite:function(a,b){$.ajax({url:a,dataType:"json",success:function(a){ObjectIO.de
1424serializeSprite(a,function(a){b&&b(a)},false)}})},serializeLibrary:function(a){var b={label:a.label,scripts:[],variables:{},varDefaults:{},lists:{}},c;for(c in a.variables)b.variables[c]=a.variables[c];
1425if(a.varDefaults)for(c in a.varDefaults)b.varDefaults[c]=a.varDefaults[c];else for(c in a.variables)b.varDefaults[c]=a.variables[c];for(c in a.lists)b.lists[c]=a.lists[c];b.scripts=ObjectIO.serializeScripts(a);return b},deserializeLibrary:function(a,b){var c=new Sprite({label:a.label,classname:a.label,isHidden:true});if(a.classname)c.classname=a.classname;if(a.description)c.description=a.description;if(a.dbid)c.dbid=a.dbid;if(a.ownerid)c.ownerid=a.ownerid;if(a.variables)for(var d in a.variables)if(d!=
1426"_empty_"){c.variables[d]=a.variables[d];a.varDefaults&&a.varDefaults[d]!==void 0&&(c.varDefaults[d]=a.varDefaults[d])}if(a.lists)for(d in a.lists)d!="_empty_"&&(c.lists[d]=c.lists[d]);ObjectIO.deserializeScripts(c,a.scripts,true);for(d=0;d<c.scripts.length;d++)c.scripts[d].library=c;b&&b(c);return c},deserializeSprite:function(a,b,c,d,f){ObjectIO.loaded++;var e={};if(a.varDefaults)e=a.varDefaults;else if(a.variables)for(var g in a.variables)e[g]=a.variables[g];e=a.costumes[0].img;e.indexOf("http:")===
14270&&window.location.protocol!="http:"?e=window.location.protocol+e.substring(5):e.indexOf("https:")===0&&window.location.protocol!="https:"&&(e=window.location.protocol+e.substring(6));c=Sprites.addSprite({label:a.label,scale:a.scale,x:a.x,y:a.y,rotation:a.rotation,rotateLock:a.rotateLock,draggable:a.draggable,hidden:a.hidden?true:false,isHidden:a.isHidden?true:false,costumeName:a.costumes[0].name,cx:a.costumes[0].cx,cy:a.costumes[0].cy,img:e,volume:a.volume,variables:a.variables,varDefaults:a.varDefaults,
1428lists:a.lists,forceNumber:c?true:false,locked:a.locked?true:false,hiddenInSandbox:a.hiddenInSandbox?true:false,lockedInSandbox:a.lockedInSandbox?true:false,id:a.id,classname:a.classname,zIndex:a.zIndex,penColor:a.penColor,fillColor:a.fillColor,font:a.font,fontColor:a.fontColor,penWidth:a.penWidth,bubble:a.bubble,avatarid:a.avatarid,skeletonType:a.skeletonType,skeletonParts:a.skeletonParts},function(c){if(a.isStatic)c.spriteObj.isStatic=true;c.spriteObj.physicsBody&&a.physics&&Physics.updateBody(c.spriteObj,
1429{isStatic:a.physics.isStatic!==void 0?a.physics.isStatic:false,isActive:a.physics.isActive!==void 0?a.physics.isActive:true,geometry:a.physics.geometry,density:a.physics.density,friction:a.physics.friction,restitution:a.physics.restitution});if(a.variables)for(var e in a.variables)if(e!="_empty_"){c.variables[e]=a.variables[e];a.varDefaults&&a.varDefaults[e]!==void 0&&(c.varDefaults[e]=a.varDefaults[e])}if(a.lists)for(e in a.lists)e!="_empty_"&&(c.lists[e]=a.lists[e]);e=a.costumes;for(var g=1;g<e.length;g++){var h=
1430e[g],n=h.img;n.indexOf("http:")===0&&window.location.protocol!="http:"?n=window.location.protocol+n.substring(5):n.indexOf("https:")===0&&window.location.protocol!="https:"&&(n=window.location.protocol+n.substring(6));d&&ObjectIO.loaded++;c.addCostume({hidden:h.hidden?true:false,name:h.name,img:n,cx:h.cx,cy:h.cy},function(){d&&ObjectIO.doCallback(d,f)})}a.currentCostume&&c.setCostumeByName(a.currentCostume);a.zIndex&&c.spriteObj.setZIndex(a.zIndex);b&&b(c)});if(a.avatarid)c.avatarid=a.avatarid;if(a.hidden)c.hidden=
1431true;e=a.sounds;for(g=0;g<e.length;g++){var h=e[g];c.addSound({hidden:h.hidden?true:false,name:h.name,sound:h.sound})}if(a.documentation)c.documentation=a.documentation;g=false;if(c.id&&c.classname&&!c.locked)for(e=0;e<Runtime.sprites.length;e++){h=Runtime.sprites[e];if(h!=c&&h.id==c.id&&h.classname==c.classname){c.scripts=h.scripts;g=true;break}}if(g)for(e=0;e<c.scripts.length;e++){g=c.scripts[e];g.func.substring(0,8)=="register"&&Scripts.create({sprite:c,scriptBlock:g})}else ObjectIO.deserializeScripts(c,
1432a.scripts,a.locked);return c},deserializeScriptSocket:function(a){var b=null;if(a.type=="wrapper"){var c;if(c=a.func=="valueControlCall"?new Label({cat:a.cat?a.cat:"functions",name:a.name,label:a.label,marked:a.marked,value:"string",func:a.func}):a.func=="valueControlCallLibrary"?new Label({cat:"library",name:a.name,label:a.label,marked:a.marked,value:"string",func:a.func}):findStepByFunc(a.func)){if(a.label)c.label=a.label;b=new Label(c);if(a.hidden){b.hidden=true;b.text=a.text}b.marked=a.marked;
1433if(a.tags)b.tags=a.tags;if(a.id)b.id=a.id;if(a.values){b.ensureSockets(a.values.length);for(c=0;c<a.values.length;
1433c++){var d=ObjectIO.deserializeScriptSocket(a.values[c]);b.setValue(c,d)}}}else if(a.name){b=void 0;a.cat||(a.func=="valueVar"?b="var":a.func=="valueList"?b="list":a.func=="valueParam"?b="functions":a.func=="valueScriptVar"&&(b="localvar"));b=new Label({cat:b,name:a.name,marked:a.marked,value:"number",func:a.func});if(a.id)b.id=a.id}if(a.hidden)b.hidden=true;if(a.locked)b.locked=true;
1434if(a.note)b.note=a.note}else b=a.value===null||a.value===void 0?"":a.value;return b},deserializeScriptStep:function(a){var b=null,c=null;if(a.func=="registerFunction"||a.func=="blockControlCall"){c=a;if(!c.cat)c.cat="functions"}else if(a.func=="blockControlCallLibrary"){c=a;c.cat="library"}else if(a.func=="blockControlScriptVar"){c=a;c.cat="obj";if(!c.label){var d=findStepByFunc(c.func);if(d)c.label=d.label}}else{if(a.func=="valueControlCall"||a.func=="valueControlCallLibrary"||a.func=="valueVar"||
1435a.func=="valueList"||a.func=="valueParam"||a.func=="valueScriptVar"){b=ObjectIO.deserializeScriptSocket(a);b.hiddenInSandbox=a.hiddenInSandbox;b.lockedInSandbox=a.lockedInSandbox;return b}c=a?findStepByFunc(a.func):null;if(!c){c=g_steps.nop;a.label=null;c.label="deprecated "+a.func}if(a.label)c.label=a.label}if(c){if(c.value){b=new Label(c);delete b.hidden;b.marked=a.marked;if(a.tags)b.tags=a.tags;if(a.id)b.id=a.id;if(a.values){b.ensureSockets(a.values.length);for(c=0;c<a.values.length;c++){d=ObjectIO.deserializeScriptSocket(a.values[c]);
1436b.setValue(c,d);if(a.values[c].locked)b.getSocketAtChild(c).locked=true}}}else{b=new Block(c);delete b.hidden;b.marked=a.marked;if(a.tags)b.tags=a.tags;if(a.id)b.id=a.id;if(c.func=="blockComment"){b.width=a.width;b.height=a.height;b.labelText=a.label}if(a.values){b.label.ensureSockets(a.values.length);for(c=0;c<a.values.length;c++){d=ObjectIO.deserializeScriptSocket(a.values[c]);b.label.setValue(c,d);if(a.values[c].locked)b.label.getSocketAtChild(c).locked=true}}if(a.containers)for(c=0;c<a.containers.length;c++){if(c>
14370&&a.containerLabels){for(var d=[],f=0;f<a.containerLabels[c-1].values.length;f++)d.push(ObjectIO.deserializeScriptSocket(a.containerLabels[c-1].values[f]));
1437c<a.containers.length-1?textLabel=window.RenderCode?RenderCode.getElseIfLabel():"else if {boolean} then {button:remove}":c<a.containers.length&&(textLabel=window.RenderCode?RenderCode.getElseLabel():"else {button:add}");var e=new Label({label:textLabel});e.parent=b;e.draggable=false;for(f=0;f<d.length;f++)e.setValue(f,d[f]);c-1>=b._containerLabels.length&&
1438b._containerLabels.push(null);b._containerLabels[c-1]=e}c>=b._containers.length&&b._containers.push(null);if(a.containers[c]){d=ObjectIO.deserializeScriptStep(a.containers[c]);if(d!=null){b.addToContainer(c,d);d.parent=b}}}if(a.next){b.next=ObjectIO.deserializeScriptStep(a.next);if(b.next)b.next.parent=b}}b.hiddenInSandbox=a.hiddenInSandbox;b.lockedInSandbox=a.lockedInSandbox;if(a.hidden)b.hidden=true;if(a.locked)b.locked=true;if(a.note)b.note=a.note}return b},serializeLesson:function(){var a={width:Runtime.stage.width,
1439height:Runtime.stage.height,bgtype:Runtime.stage.bgtype,canvasWidth:$(Runtime.stage.container).innerWidth(),canvasHeight:$(Runtime.stage.container).innerHeight()};if(window.WinLessons){var b=WinLessons.getDetails();a.name=b.name;a.description=b.description;a.showPlayer=b.showPlayer;a.instructions=b.instructions;b=WinLessons.getNotes();a.resources=b.resources;a.globalVars=b.globalVars;a.blocks=b.blocks;a.initialState=b.initialState;a.notes=b.notes}return a},deserializeLesson:function(a){$("#wincmd-runlesson").addClass("disabled");
1440if(window.WinLessons&&a&&a.notes){window.IDE&&WinLessons.reset();IDE.currentProjectDetails=a.details?a.details:"";IDE.currentProjectConcepts=a.concepts?a.concepts:"";WinLessons.setDetails({ownerid:a.ownerid,name:a.name,description:a.description,showPlayer:a.showPlayer,instructions:a.instructions});WinLessons.setNotes(a);if(window.IDE){if(!a.canvasWidth)a.canvasWidth=600;if(!a.canvasHeight)a.canvasHeight=400;a.bgtype&&Runtime.stage.setBackgroundType(a.bgtype);a.width&&a.height&&Runtime.stage.setSize(Math.abs(a.width),
1441Math.abs(a.height));IDE.adjustPanels()}}}},g_choice_lists={keys:"up arrow;down arrow;left arrow;right arrow;space;return;mouse;mouse-right;any".split(";").concat("abcdefghijklmnopqrstuvwxyz0123456789".split("")),videosensetype:["motion","direction","distance"],videoviewtype:["on","off","on-flipped"],videomask:["none","oval","rectangle"],events:["loudness","timer","video motion"],geometry:["circular","rectangular"],rotatestyle:["all around","left-right","don't rotate"],tiltdirection:["left","right",
1442"forward","backward"],screenaction:["clicked"],stageproperty:"width;height;left;right;top;bottom;viewport offset x;viewport offset y;world width;world height;design width;design height;closest actor;furthest actor;number of actors;last key pressed".split(";"),stop:["all","this script","other scripts in actor","function call chain"],lastany:["1","last","any"],lastall:["1","last","all"],operator:"+ - * / % mod == < <= > >= != & | && and || or ^ xor << >> >>>".split(" "),texttransform:["lowercase","uppercase",
1443"trim","parse"],bubblestyle:"rectangular;rounded;oval;thought;excited;top message box;bottom message box;center message box;top plain message box;bottom plain message box".split(";"),bubbledock:["default","top","dialog"],effect:"color fisheye whirl pixelate mosaic brightness ghost blur brightness bump circlesmear contrast crosssmear diffusion dither edge emboss exposure gain gamma grayscale hue invert kaleidoscope lensdistortion linesmear maximum median minimum noise oil opacity pinch pixelate posterize rgbadjust saturation sawtoothripple sepia sharpen sineripple solarize sparkle squaresmear threshold triangleripple twirl vignette waterripple".split(" "),
1444drums:"35 Acoustic Bass Drum;36 Bass Drum 1;37 Side Stick;38 Acoustic Snare;39 Hand Clap;40 Electric Snare;41 Low Floor Tom;42 Closed Hi Hat;43 High Floor Tom;44 Pedal Hi-Hat;45 Low Tom;46 Open Hi-Hat;47 Low-Mid Tom;48 Hi-Mid Tom;49 Crash Cymbal 1;50 High Tom;51 Ride Cymbal 1;52 Chinese Cymbal;53 Ride Bell;54 Tambourine;55 Splash Cymbal;56 Cowbell;57 Crash Cymbal 2;58 Vibraslap;59 Ride Cymbal 2;60 Hi Bongo;61 Low Bongo;62 Mute Hi Conga;63 Open Hi Conga;64 Low Conga;65 High Timbale;66 Low Timbale;67 High Agogo;68 Low Agogo;69 Cabasa;70 Maracas;71 Short Whistle;72 Long Whistle;73 Short Guiro;74 Long Guiro;75 Claves;76 Hi Wood Block;77 Low Wood Block;78 Mute Cuica;79 Open Cuica;80 Mute Triangle;81 Open Triangle".split(";"),
1445instruments:"1 Acoustic Grand Piano;2 Bright Acoustic Piano;4 Honky-tonk Piano;5 Electric Piano 1;6 Electric Piano 2;17 Drawbar Organ;18 Percussive Organ;19 Rock Organ;20 Church Organ;21 Reed Organ;25 Acoustic Guitar (nylon);27 Electric Guitar (jazz);43 Cello;74 Flute;90 Pad 1 (new age);91 Pad 3 (polysynth);92 Pad 4 (choir);93 Pad 5 (bowed);94 Pad 6 (metallic);113 Tinkle Bell;115 Steel Drums;116 Woodblock;119 Synth Drum".split(";"),permissions:["local","user","project"],spriteprop:"x position;y position;angle;direction;layer;rotation style;label;say;costume #;costume name;size;volume;width;height;density;friction;restitution;angular velocity;angular damping;linear damping;x linear velocity;y linear velocity".split(";"),
1446datetime:"year;month;day;hours;minutes;seconds;milliseconds;unix time;text".split(";"),math:"abs floor ceiling round int sqrt sin sinrad cos cosrad tan tanrad asin asinrad acos acosrad atan atanrad ln log e^ 10^ sign".split(" "),math2:["atan2","atan2rad","max","min","pow"],mathunary:["!","~","+","-"],mathbinary:"* / % + - << >> >>> < <= > >= == != & | ^ && ||".split(" "),constants:"pi e ln2 ln10 log2e log10e sqrt1/2 sqrt2".split(" "),fontstyle:["normal","bold","italic"],fontsize:"8 9 10 11 12 14 16 18 20 22 24 26 28 36 48 72 96 120".split(" "),
1447font:"Arial,Helvetica,sans-serif;Arial Black,Gadget,sans-serif;Comic Sans MS,cursive;Courier New,Courier New,monospace;Impact,Charcoal,sans-serif;Lucida Console,Monaco,monospace;Lucida Sans Unice,Lucida Grande,sans-serif;Tahoma,Geneva,sans-serif;Times New Roman,Times,serif;Trebuchet MS,sans-serif;Verdana,Geneva,sans-serif".split(";"),getphysics:"density;friction;restitution;angular velocity;angular damping;inertia;is active;is awake;linear damping;x linear velocity;y linear velocity;x gravity;y gravity;last collided with;last collision x;last collision y;last actor collided with;last actor collision x;last actor collision y".split(";"),
1448setphysics:"force;impulse;torque;density;friction;restitution;angular damping;angular velocity;linear damping;linear velocity".split(";"),setphysicsxy:["force","impulse","linear velocity","gravity"],easing:"easeLinear easeInQuad easeOutQuad easeInOutQuad easeInCubic easeOutCubic easeInOutCubic easeInQuart easeOutQuart easeInOutQuart easeInQuint easeOutQuint easeInOutQuint easeInSine easeOutSine easeInOutSine easeInExponential easeOutExponential easeInOutExponential easeInCirc easeOutCirc easeInOutCirc easeInElastic easeOutElastic easeInOutElastic easeBackIn easeBackOut easeBackInOut easeBounceIn easeBounceOut easeBounceInOut".split(" "),
1449particleimg:"none;fire;line;smoke;snow;snowflake;starburst;circle;hexagon;rectangle;star;filled circle;filled hexagon;filled rectangle;filled star".split(";"),mcpefill:["filled","hollow"],mcpeorientation:["horizontal","vertical"],mcpehalf:["top","bottom"],mcpebotdir:"forward back left right up down".split(" "),mcpedir:["left","right"],mcpeweather:["clear","rain","thunder"],mcpegamemode:["creative","survival","adventure"],mcpetraveltype:"walk;swim water;fall;climb;swim lava;fly;riding;sneak;sprint;bounce".split(";"),
1450mcpeplayer:["nearest player","random player","all players","all entities"],mcpeenchantment:"aqua_affinity bane_of_arthropods blast_protection depth_strider durability efficie
1450ncy feather_falling fire_aspect fire_protection flame fortune infinity knockback looting luck_of_the_sea lure power projectile_protection protection punch respiration sharpness silk_touch smite thorns".split(" "),droneanimations:["flip forward","flip backward","flip left","flip right"],jumpingsumojumps:["long","high"],jumpingsumoanimations:"stop;spin;tap;slow shake;metronome;wave;spin jump;spin to posture;spiral;slalom".split(";"),
1451jumpingsumopositions:["balancing","ready to jump","ready to kick"],jumpingsumoaudiothemes:["default","robot","insect","monster"],spheroprop:"accelerometer x;accelerometer y;accelerometer z;pitch;roll;yaw;location x;location y;velocity x;velocity y;quaternion 0;quaternion 1;quaternion 2;quaternion 3;gyro x;gyro y;gyro z".split(";"),spherosetnumericprop:["collision threshold - x","collision threshold - x speed","collision threshold - y","collision threshold - y speed","collision interval"],grabbercmd:["open",
1452"close"],flyingmode:["quadcopter","plane forward","plane backward"],planespeed:["low","medium","high"],wedo2tiltsensormode:["angle","direction","bump"],wedo2tiltsensorangle:["x","y"],wedo2tiltbumpdirection:["x","y","z"],wedo2resettablesensor:["tilt sensor","motion sensor"],wedo2motionsensormode:["distance","count"],wedo2motordirection:["clockwise","counter clockwise"],wedo2sensorormotor:["tilt sensor","motion sensor","motor"],platformproperty:["type"],compassproperty:["magnetic north","true north",
1453"accuracy"],gesture:"shake;tilt up;tilt down;face up;face down;tilt left;tilt right;tilt forward;tilt backward".split(";"),calibration:["start","stop","reset"],axis:["x","y","z"],boardbuttons:["A","B","A+B"],mousebuttons:["left","right","middle"],keyboardkeys:"Arrow Right;Arrow Left;Arrow Down;Arrow Up;Enter;Space;Home;End;Page Up;Page Down;Insert;Delete;Backspace;Escape;Tab;A;B;C;D;E;F;G;H;I;J;K;L;M;N;O;P;Q;R;S;T;U;V;W;X;Y;Z;0;1;2;3;4;5;6;7;8;9;,;.;-;=;\\;[;];/;F1;F2;F3;F4;F5;F6;F7;F8;F9;F10;F11;F12;Left Control;Left Shift;Left Alt;Left GUI;Right Control;Right Shift;Right Alt;Right GUI".split(";"),
1454configs:["board name","board passcode"],bitSpriteProperties:["x","y","direction","image"]},g_steps={registerFlagTrigger:{cat:"events",label:"on start",hasFlap:!1,func:"registerFlagTrigger",readName:"On Start",concept:"simple events",tags:"hat block;event;start;begin;program;play".split(";")},registerKeyTrigger:{cat:"events",label:"when {choice:keys} pressed",hasFlap:!1,func:"registerKeyTrigger",readName:"When Key Pressed",concept:"simple events",tags:"hat block;keyboard;key press;arrow keys;keypress;when key pressed".split(";")},
1455registerTrigger:{cat:"events",label:"when {boolean} occurs",hasFlap:!1,func:"registerTrigger",readName:"When Condition Occurs",concept:"advanced events",tags:"hat block;event;start;begin;program;trigger".split(";")},registerTiltTrigger:{cat:"events",label:"when tilting {choice:tiltdirection}",hasFlap:!1,func:"registerTiltTrigger",readName:"When tilting",concept:"simple events",tags:["click actor","touch actor","press actor","mouse click"]},registerScreenTrigger:{cat:"events",label:"when screen {choice:screenaction}",
1456hasFlap:!1,func:"registerScreenTrigger",readName:"When screen",concept:"simple events",tags:["click actor","touch actor","press actor","mouse click"]},registerSpriteTrigger:{cat:"events",label:"when actor clicked",hasFlap:!1,func:"registerSpriteTrigger",readName:"When Actor Clicked",concept:"simple events",tags:["click actor","touch actor","press actor","mouse click"]},registerBackgroundChange:{cat:"events",label:"when background switches to {scenes}",hasFlap:!1,func:"registerBackgroundChange",readName:"When Scene Switches",
1457concept:"simple events",tags:["background","backdrop","scene","change","scene 
1457change"]},registerExternalTrigger:{cat:"events",hidden:!0,label:"when {choice:events} >{number}",hasFlap:!1,func:"registerExternalTrigger",readName:"When Condition",concept:"external events",tags:"change sound audio video event trigger".split(" ")},blockControlBroadcast:{cat:"events",label:"broadcast {events}",func:"blockControlBroadcast",readName:"Broadcast",concept:"simple messaging",tags:["send event","send messages",
1458"tell","signal"]},blockControlBroadcastWait:{cat:"events",label:"broadcast {events} and wait",func:"blockControlBroadcastWait",readName:"Broadcast And Wait",concept:"advanced messaging",tags:["send","messages","event","signal","wait till done"]},blockControlPostMessage:{cat:"events",label:"send message {events} to {actor} with {string}",func:"blockControlPostMessage",readName:"Send Message To Actor",concept:"advanced messaging",tags:"send;messages;event;signal;wait;pass value;value;parameter".split(";")},
1459blockControlPostMessageAndWait:{cat:"events",label:"send message {events} to {actor} with {string} and wait",func:"blockControlPostMessageAndWait",readName:"Send Message To Actor And Wait",concept:"advanced messaging",tags:"send;messages;event;signal;wait;pass value;value;parameter".split(";")},valueControlMessageValue:{cat:"events",label:"received value",value:"string",func:"valueControlMessageValue",readName:"Received Value",concept:"advanced messaging",tags:["value","messages"]},valueControlMessageSource:{cat:"events",
1460label:"received source",value:"string",func:"valueControlMessageSource",readName:"Received Source",concept:"advanced messaging",tags:["value","messages"]},registerBroadcastTrigger:{cat:"events",label:"when I receive {events}",hasFlap:!1,func:"registerBroadcastTrigger",readName:"When I Receive",concept:"simple messaging",tags:["hat block","messaging","message","receive"]},registerCloned:{cat:"events",omitbg:!0,label:"clone startup",hasFlap:!1,func:"registerCloned",readName:"Clone Startup",concept:"cloning",
1461tags:["hat block","cloning","copy actor","duplicate"]},valueControlIsClone:{cat:"flow",label:"is clone?",value:"boolean",func:"valueControlIsClone",readName:"Is Clone?",concept:"cloning",tags:["cloning","value"]},registerFunction:{cat:"functions",label:"",func:"registerFunction",hasFlap:!1,readName:"Function Definition",concept:"functions",tags:["functions","objects"]},blockControlCall:{cat:"functions",label:"",func:"blockControlCall",readName:"Function Call",concept:"functions",tags:["functions",
1462"objects"]},valueControlCall:{cat:"functions",label:"",func:"valueControlCall",readName:"Function Value",value:"string",concept:"functions",tags:["functions","objects"]},blockControlCallLibrary:{cat:"library",label:"",func:"blockControlCallLibrary",readName:"Library Function Call",concept:"functions",tags:["functions","objects","library"]},valueControlCallLibrary:{cat:"library",label:"",value:"string",func:"valueControlCallLibrary",readName:"Library Function Value",concept:"functions",tags:["functions",
1463"objects","library"]},blockControlCallMember:{cat:"functions",label:"{actor} . {method}({varargs})",func:"blockControlCallMember",readName:"Member Function Call",concept:"functions",tags:["functions","objects"]},valueControlCallMember:{cat:"functions",label:"{actor} . {method}({varargs})",value:"string",func:"valueControlCallMember",readName:"Member Function Value",concept:"functions",tags:["functions","objects"]},blockControlWait:{cat:"flow",label:"wait {number:1} secs",func:"blockControlWait",readName:"Wait",
1464concept:"delays",tags:["wait","delay","blocked"]},blockControlForever:{cat:"flow",label:"forever",containers:1,hasSlot:!1,func:"blockControlForever",readName:"Forever",concept:"simple loops",tags:["loop","endless","repetition","again"]},blockControlRepeat:{cat:"flow",label:"repeat {number:10}",containers:1,func:"blockControlRepeat",readName:"Repeat",concept:"simple loops",tags:["loop","finite loop","repitition"]},blockControlCloneActor:{cat:"flow",label:"create clone of {actor}",func:"blockControlCloneActor",
1465readName:"Create Clone Of",concept:"cloning",tags:["make copy","cloning","duplicate"]}
1465,valueControlLastClonedActor:{cat:"flow",label:"name of last created actor",value:"string",func:"valueControlLastClonedActor",readName:"Name Of Last Cloned Actor",concept:"cloning",tags:["cloning","value"]},valueControlCloneName:{cat:"flow",label:"clone name of actor {string}",value:"string",func:"valueControlCloneName",readName:"Clone Name Of Actor",concept:"cloning",tags:["cloning","value"]},blockControlDeleteActor:{cat:"flow",
1466omitbg:!0,label:"delete this clone",hasSlot:!1,func:"blockControlDeleteActor",readName:"Delete This Clone",concept:"cloning",tags:["cloning","delete"]},blockControlForeverIf:{cat:"flow",label:"forever if {boolean}",containers:1,hasSlot:!1,func:"blockControlForeverIf",readName:"Forever If",concept:"conditional loops",tags:["loop","conditional","if"]},blockControlIf:{cat:"flow",label:"if {boolean} then",containers:1,func:"blockControlIf",readName:"If Then",concept:"simple conditionals",tags:["contition",
1467"if","logic"]},blockControlIfElse:{cat:"flow",label:"if {boolean} then",containers:2,containerLabels:["else {button:add}"],func:"blockControlIfElse",readName:"If Then Else",concept:"simple conditionals",tags:["if else","else","logic","conditional"]},valueControlIfElse:{cat:"flow",label:"if {boolean} then {string} else {string}",value:"string",func:"valueControlIfElse",readName:"If Then Else",concept:"conditionals",tags:["if else","else","logic","conditional"]},blockControlWaitUntil:{cat:"flow",label:"wait until {boolean}",
1468func:"blockControlWaitUntil",readName:"Wait Until",concept:"conditional wait",tags:["loop","repetition","if condition"]},blockControlWhile:{cat:"flow",label:"repeat while {boolean}",containers:1,func:"blockControlWhile",readName:"Repeat While",concept:"conditional loops",tags:["loop","repetition","while condition"]},blockControlRepeatUntil:{cat:"flow",label:"repeat until {boolean}",containers:1,func:"blockControlRepeatUntil",readName:"Repeat Until",concept:"conditional loops",tags:["loop","repetition",
1469"until condition"]},blockControlReturn:{cat:"functions",label:"return {string}",hasSlot:!1,func:"blockControlReturn",readName:"Return",concept:"functions",tags:["stop","end","finish","done","return"]},blockControlStop:{cat:"flow",label:"stop {choice:stop}",hasSlot:!1,func:"blockControlStop",readName:"Stop",concept:"program control",tags:["stop","end","finish","done"]},blockControlStopScript:{cat:"flow",hidden:!0,label:"stop script",hasSlot:!1,func:"blockControlStopScript",readName:"Stop Script",concept:"program control",
1470tags:["stop","end","finish","done"]},blockControlStopAll:{cat:"flow",hidden:!0,label:"stop all",hasSlot:!1,func:"blockControlStopAll",readName:"Stop All",concept:"program control",tags:["stop all","finish","done"]},blockControlScriptVar:{cat:"localvar",label:"script variables {varargs:valueScriptVar}",func:"blockControlScriptVar",readName:"Script Variables",concept:"simple variables",tags:["variable","variables"]},blockControlFor:{cat:"flow",label:"for {variables} from {number:0} to {number:10} step by {number:1}",
1471func:"blockControlFor",containers:1,readName:"For",concept:"advanced loops",tags:["loop"]},blockControlForEach:{cat:"flow",label:"for each {string} as {variables}",func:"blockControlForEach",readName:"For In",containers:1,concept:"advanced loops",tags:["loop"]},blockControlBreak:{cat:"flow",label:"break",func:"blockControlBreak",hasSlot:!1,readName:"Break",concept:"advanced loops",tags:["loop","break"]},blockControlContinue:{cat:"flow",label:"continue",func:"blockControlContinue",hasSlot:!1,readName:"Continue",
1472concept:"advanced loops",tags:["loop","continue"]},blockControlRequestBlocking:{cat:"flow",hidden:!1,label:"do until done",containers:1,func:"blockControlRequestBlocking",readName:"Block",concept:"advanced control",tags:["control"]},blockControlPrint:{cat:"flow",label:"print {string} {varargs}",func:"blockControlPrint",readName:"Print",concept:"advanced control",tags:["control"]},blockControlJS:{cat:"flow",hidden:!0,label:"JS: {string}",func:"blockControlJS",readName:"JS",concept:"advanced control",
1473tags:["control"]},valueControlJS:{cat:"flow",hidden:!0,label:"JS: {string}",func:"valueControlJS",value:"string",readName:"JS",concept:"advanced control",tags:["control"]}
1473,valueControlLanguage:{cat:"flow",label:"text ID {string} with {varargs}",func:"valueControlLanguage",value:"string",readName:"Language Format",concept:"advanced control",tags:["control"]},valueControlLanguageWithDefault:{cat:"flow",label:"text ID {string} ({string}) with {varargs}",func:"valueControlLanguageWithDefault",value:"string",
1474readName:"Language Format",concept:"advanced control",tags:["control"]},valueControlSerializeActor:{cat:"control",hidden:!0,label:"get data from actor {actor}",func:"valueControlSerializeActor",value:"string",readName:"serialize actor",concept:"actor serialization",tags:["advanced","serialization"]},blockControlDeserializeActor:{cat:"control",hidden:!0,label:"create actor with {string} named {string}",func:"blockControlDeserializeActor",readName:"deserialize actor",concept:"actor serialization",tags:["advanced",
1475"serialization"]},blockControlRemoveActor:{cat:"control",hidden:!0,label:"remove actor {actor}",func:"blockControlRemoveActor",readName:"remove actor",concept:"actor serialization",tags:["advanced","serialization"]},valueControlSerializeScripts:{cat:"control",hidden:!0,label:"get scripts from actor {actor} tagged with {string}",func:"valueControlSerializeScripts",value:"string",readName:"serialize scripts",concept:"script serialization",tags:["advanced","serialization"]},blockControlDeserializeScripts:{cat:"control",
1476hidden:!0,label:"add scripts with {string} into actor {actor}",func:"blockControlDeserializeScripts",readName:"serialize scripts",concept:"actor serialization",tags:["advanced","serialization"]},blockControlRemoveScriptsWithTag:{cat:"control",hidden:!0,label:"remove scripts tagged {string} on actor {actor}",func:"blockControlRemoveScriptsWithTag",readName:"remove scripts",concept:"actor serialization",tags:["advanced","serialization"]},blockComment:{cat:"comment",hidden:!1,hasFlap:!1,hasSlot:!1,label:"{string:message}",
1477func:"blockComment",readName:"Comment",concept:"miscellaneous"},blockInlineComment:{cat:"comment",label:"//{string:comment}",func:"blockInlineComment",readName:"Inline Comment",concept:"miscellaneous"},blockSystem:{cat:"system",label:"IDE {choice:systemEvents} with {string}",func:"blockSystem",readName:"System",concept:"miscellaneous",tags:[]},blockControlDebugBreak:{cat:"flow",label:"breakpoint",func:"blockControlDebugBreak",readName:"Break",concept:"debugging",tags:["break","debugging"]},blockControlDebugBreakOn:{cat:"flow",
1478label:"breakpoint when {boolean}",func:"blockControlDebugBreakOn",readName:"Break When",concept:"debugging",tags:["break","debugging"]},nop:{cat:"flow",hidden:!0,label:"nop",func:"nop",readName:"No Operation",concept:"miscellaneous"},blockMotionMove:{cat:"motion",omitbg:!0,label:"move {number:10} pixels",func:"blockMotionMove",readName:"Move Steps",concept:"simple motion",tags:["movement","push","nudge","walk","run"]},blockMotionTurnCW:{cat:"motion",omitbg:!0,label:"turn {image:/ide/imgs/button-cw.png} {angle:15} degrees",
1479func:"blockMotionTurnCW",readName:"Turn Clockwise",concept:"direction and turning",tags:["rotation","rotate","turning","clockwise"]},blockMotionTurnCCW:{cat:"motion",omitbg:!0,label:"turn {image:/ide/imgs/button-ccw.png} {angle:15} degrees",func:"blockMotionTurnCCW",readName:"Turn Counter-Clockwise",concept:"direction and turning",tags:["rotation","rotate","turning","counter clockwise"]},blockMotionPointDirection:{cat:"motion",omitbg:!0,label:"point in direction {angle:90} degrees",func:"blockMotionPointDirection",
1480readName:"Point In Direction",concept:"direction and turning",tags:["see","angle","direction"]},blockMotionPointAngle:{cat:"motion",omitbg:!0,label:"set angle to {mathangle:0} degrees",func:"blockMotionPointAngle",readName:"Point In Direction",concept:"direction and turning",tags:["see","angle","direction"]},blockMotionPointTowards:{cat:"motion",omitbg:!0,label:"point towards {where}",func:"blockMotionPointTowards",readName:"Point Towards",concept:"direction and turning",tags:["see","point","direction"]},
1481blockMotionGoTo:{cat:"motion",omitbg:!0,label:"go to x:{number:0} y:{number:0}",func:"blockMotionGoTo",readName:"Go To X-Y",concept:"simple motion",tags:["movement","motion","goto","move"]},blockMotionGoTowards:{cat:"motion",omitbg:!0,label:"go to {where}",func:"blockMotionGoTowards",readName:"Go To",concept:"advanced motion",tags:["move","goto","reach"]},blockMotionGlide:{cat:"motion",omitbg:!0,label:"glide {number:1} secs to x:{number:0} y:{number:0}",func:"blockMotionGlide",readName:"Glide To X-Y",
1482concept:"advanced motion",tags:["glide","movement","motion"]},blockMotionChangeXBy:{cat:"motion",omitbg:!0,label:"change x by {number:10} pixels",func:"blockMotionChangeXBy",readName:"Change X By",concept:"advanced motion",tags:["move","horizontal","motion"]},blockMotionSetX:{cat:"motion",omitbg:!0,label:"set x to {number:0}",func:"blockMotionSetX",readName:"Set X To",concept:"advanced motion",tags:["go to","horizontal"]},blockMotionChangeYBy:{cat:"motion",omitbg:!0,label:"change y by {number:10} pixels",
1483func:"blockMotionChangeYBy",readName:"Change Y By",concept:"advanced motion",tags:["vertical","y","move","go to"]},blockMotionSetY:{cat:"motion",omitbg:!0,label:"set y to {number:0}",func:"blockMotionSetY",readName:"Set Y To",concept:"advanced motion",tags:["vertical","y","go to","move"]},blockMotionBounceOnEdge:{cat:"motion",omitbg:!0,label:"if on edge, bounce",func:"blockMotionBounceOnEdge",readName:"If On Edge, Bounce",concept:"screen bounds",tags:["screen bound","bounce","inside"]},blockMotionRotationStyle:{cat:"motion",
1484omitbg:!0,label:"set rotation style {choice:rotatestyle}",func:"blockMotionRotationStyle",readName:"Set Rotation Style",concept:"direction and turning",tags:["rotation","rotate","turning"]}
1484,valueMotionXPosition:{cat:"motion",watchable:!0,omitbg:!0,label:"x position",value:"number",func:"valueMotionXPosition",readName:"X Position",concept:"advanced motion",tags:["value","x","horizontal"]},valueMotionYPosition:{cat:"motion",watchable:!0,omitbg:!0,label:"y position",value:"number",func:"valueMotionYPosition",
1485readName:"Y Position",concept:"advanced motion",tags:["value","y","vertical"]},valueMotionDirection:{cat:"motion",watchable:!0,omitbg:!0,label:"direction",value:"number",func:"valueMotionDirection",readName:"Direction",concept:"advanced motion",tags:["angle","direction","value"]},valueMotionAngle:{cat:"motion",watchable:!0,omitbg:!0,label:"angle",value:"number",func:"valueMotionAngle",readName:"Direction",concept:"advanced motion",tags:["angle","direction","value"]},blockMotionSetAnchor:{cat:"motion",
1486label:"set anchor to x:{number:0.5} y:{number:0.5}",func:"blockMotionSetAnchor",readName:"Set anchor",concept:"Positioning",tags:["actor"]},blockMotionFollowActor:{cat:"motion",label:"follow actor {actor}",func:"blockMotionFollowActor",readName:"Follow actor",concept:"Positioning",tags:["actor"]},blockHardwareMotor:{cat:"hardware",label:"motor power A:{number:0} B:{number:0}",func:"blockHardwareMotor",readName:"Power Motor",concept:"sensor control"},valueHardwareDistance:{cat:"hardware",label:"distance",
1487func:"valueHardwareDistance",value:"string",readName:"Distance",concept:"sensor control"},valueHardwareTilt:{cat:"hardware",label:"tilt",func:"valueHardwareTilt",value:"string",readName:"Tilt",concept:"sensor control"},blockMotionMotorOnFor:{cat:"motion",omitbg:!0,hidden:!0,label:"motor on for {number:1} secs",func:"blockMotionMotorOnFor",readName:"Motor On For",concept:"sensor control"},blockMotionMotorOn:{cat:"motion",omitbg:!0,hidden:!0,label:"motor on",func:"blockMotionMotorOn",readName:"Motor On",
1488concept:"sensor control"},blockMotionMotorOff:{cat:"motion",omitbg:!0,hidden:!0,label:"motor off",func:"blockMotionMotorOff",readName:"Motor Off",concept:"sensor control"},blockMotionMotorPower:{cat:"motion",omitbg:!0,hidden:!0,label:"motor power {number:100}",func:"blockMotionMotorPower",readName:"Set Motor Power To",concept:"sensor control"},blockMotionMotorDirection:{cat:"motion",omitbg:!0,hidden:!0,label:"motor direction {string:this way}",func:"blockMotionMotorDirection",readName:"Direction",
1489concept:"sensor control"},blockAnimationSetSpeed:{cat:"animation",omitbg:!0,label:"set animation speed to {number:100}%",func:"blockAnimationSetSpeed",readName:"Set Animation Speed",concept:"advanced animation",tags:["animation"]},blockLooksSetCharacterPart:{cat:"animation",omitbg:!0,label:"set part {charparts} to {charskins}",func:"blockLooksSetCharacterPart",readName:"Set Character Part",concept:"advanced animation",tags:["animation"]},valueLooksGetCharacterPart:{cat:"animation",omitbg:!0,label:"get part {charparts}",
1490func:"valueLooksGetCharacterPart",value:"string",readName:"Get Character Part",concept:"advanced animation",tags:["animation"]},blockAnimationWaitFor:{cat:"animation",omitbg:!0,label:"wait for animation named {animations}",func:"blockAnimationWaitFor",readName:"Wait For Animation",concept:"advanced animation",tags:["animation"]},blockAnimationStop:{cat:"animation",omitbg:!0,label:"stop animation named {animations}",func:"blockAnimationStop",readName:"Stop Animation",concept:"advanced animation",tags:["animation"]},
1491valueAnimationIsRunning:{cat:"animation",omitbg:!0,label:"is animation {animations} running?",value:"boolean",func:"valueAnimationIsRunning",readName:"Is Animation Running",concept:"advanced animation",tags:["animation"]},valueAnimationTime:{cat:"animation",omitbg:!0,label:"time for animation {costumes}",value:"number",func:"valueAnimationTime",readName:"Animation Time",concept:"advanced animation",tags:["animation"]},registerAnimationDone:{cat:"animation",omitbg:!0,label:"when animation named {animations} is done",
1492hasFlap:!1,func:"registerAnimationDone",readName:"When Animation is Done",concept:"advanced animation",tags:["animation"]},blockAnimationMoveBy:{cat:"animation",hidden:!0,omitbg:!0,label:"move {number:1} secs by x:{number:0},y:{number:0} using {choice:easing}
1492 with name {animations}",func:"blockAnimationMoveBy",readName:"Animate Move By",concept:"advanced animation",tags:["animation"]},blockAnimationMoveTo:{cat:"animation",hidden:!0,omitbg:!0,label:"move {number:1} secs to x:{number:0},y:{number:0} using {choice:easing} with name {animations}",
1493func:"blockAnimationMoveTo",readName:"Animate Move To",concept:"advanced animation",tags:["animation"]},blockAnimationScaleBy:{cat:"animation",hidden:!0,omitbg:!0,label:"scale {number:1} secs by {number:10}% using {choice:easing} with name {animations}",func:"blockAnimationScaleBy",readName:"Animate Scale By",concept:"advanced animation",tags:["animation"]},blockAnimationScaleTo:{cat:"animation",hidden:!0,omitbg:!0,label:"scale {number:1} secs to {number:100}% using {choice:easing} with name {animations}",
1494func:"blockAnimationScaleTo",readName:"Animate Scale To",concept:"advanced animation",tags:["animation"]},blockAnimationRotateBy:{cat:"animation",hidden:!0,omitbg:!0,label:"rotate {number:1} secs by {number:15} degrees using {choice:easing} with name {animations}",func:"blockAnimationRotateBy",readName:"Animate Rotate By",concept:"advanced animation",tags:["animation"]},blockAnimationRotateTo:{cat:"animation",hidden:!0,omitbg:!0,label:"rotate {number:1} secs to {number:0} degrees using {choice:easing} with name {animations}",
1495func:"blockAnimationRotateTo",readName:"Animate Rotate To",concept:"advanced animation",tags:["animation"]},blockAnimationBezierBy:{cat:"animation",hidden:!0,omitbg:!0,label:"bezier {number:1} secs by x:{number:0},y:{number:0} with cx1:{number:0},cy1:{number:0} and cx2:{number:0},cy2:{number:0} using {choice:easing} with name {animations}",func:"blockAnimationBezierBy",readName:"Animate Bezier By",concept:"advanced animation",tags:["animation"]},blockAnimationBezierTo:{cat:"animation",hidden:!0,omitbg:!0,
1496label:"bezier {number:1} secs to x:{number:0},y:{number:0} with cx1:{number:0},cy1:{number:0} and cx2:{number:0},cy2:{number:0} using {choice:easing} with name {animations}",func:"blockAnimationBezierTo",readName:"Animate Bezier To",concept:"advanced animation",tags:["animation"]},blockAnimationEffectBy:{cat:"animation",hidden:!0,omitbg:!0,label:"change {number:1} secs for {choice:effect} by {number:100} using {choice:easing} with name {animations}",func:"blockAnimationEffectBy",readName:"Animate Effect By",
1497concept:"advanced animation",tags:["animation"]},blockAnimationEffectTo:{cat:"animation",hidden:!0,omitbg:!0,label:"change {number:1} secs for {choice:effect} to {number:100} using {choice:easing} with name {animations}",func:"blockAnimationEffectTo",readName:"Animate EffectTo",concept:"advanced animation",tags:["animation"]},blockAnimationSwitchCostume:{cat:"animation",hidden:!0,omitbg:!0,label:"switch costumes for {number:1} secs with {number:30} fps and prefixed {costumes} using {choice:easing} with name {animations}",
1498func:"blockAnimationSwitchCostume",readName:"Animate Costumes",concept:"advanced animation",tags:["animation"]},blockAnimationAnimate:{cat:"animation",omitbg:!0,label:"animate {costumes} at {number:30} fps\nfor {number:1} secs\nand name it {animations}",func:"blockAnimationAnimate",readName:"Animate",concept:"advanced animation",tags:["animation"]},blockAnimationEasing:{cat:"animation",omitbg:!0,label:"set easing to {choice:easing}",func:"blockAnimationEasing",readName:"Set animation easing",concept:"advanced animation",
1499tags:["animation"]},blockAnimationSimpleMoveTo:{cat:"animation",omitbg:!0,label:"move to x:{number:0},y:{number:0}\nin {number:1} secs\nand name it {animations}",func:"blockAnimationSimpleMoveTo",readName:"Animate Move To",concept:"advanced animation",tags:["animation"]},blockAnimationSimpleMoveBy:{cat:"animation",omitbg:!0,label:"move by x:{number:0},y:{number:0}\nin {number:1} secs\nand name it {animations}",func:"blockAnimationSimpleMoveBy",readName:"Animate Move By",concept:"advanced animation",
1500tags:["animation"]},blockAnimationSimpleRotateTo:{cat:"animation",omitbg:!0,label:"rotate to {number:0} degrees\nin {number:1} secs\nand name it {animations}",func:"blockAnimationSimpleRotateTo",readName:"Animate Rotate To",concept:"advanced animation",tags:["animation"]},blockAnimationSimpleRotateBy:{cat:"animation",omitbg:!0,label:"rotate by {number:0} degrees\nin {number:1} secs\nand name it {animations}",func:"blockAnimationSimpleRotateBy",readName:"Animate Rotate By",concept:"advanced animation",
1501tags:["animation"]},blockAnimationSimpleScaleTo:{cat:"animation",omitbg:!0,label:"scale to {number:0}%\nin {number:1} secs\nand name it {animations}",func:"blockAnimationSimpleScaleTo",readName:"Animate Scale To",concept:"advanced animation",tags:["animation"]},blockAnimationSimpleScaleBy:{cat:"animation",omitbg:!0,label:"scale by {number:0}%\nin {number:1} secs\nand name it {animations}",func:"blockAnimationSimpleScaleBy",readName:"Animate Scale By",concept:"advanced animation",tags:["animation"]},
1502blockAnimationSimpleBezierTo:{cat:"animation",omitbg:!0,label:"bezier to x:{number:0},y:{number:0}\nwith cx1:{number:0},cy1:{number:0}\nand cx2:{number:0},cy2:{number:0}\nfor {number:1} secs\nand name it {animations}",func:"blockAnimationSimpleBezierTo",readName:"Animate Bezier To",concept:"advanced animation",tags:["animation"]},blockAnimationSimpleBezierBy:{cat:"animation",omitbg:!0,label:"bezier by x:{number:0},y:{number:0}\nwith cx1:{number:0},cy1:{number:0}\nand cx2:{number:0},cy2:{number:0}\nfor {number:1} secs\nand name it {animations}",
1503func:"blockAnimationSimpleBezierBy",readName:"Animate Bezier By",concept:"advanced animation",tags:["animation"]},blockAnimationSimpleEffectTo:{cat:"animation",label:"change {choice:effect} to {number:0}\nin {number:1} secs\nand name it {animations}
1503",func:"blockAnimationSimpleEffectTo",readName:"Animate Effect To",concept:"advanced animation",tags:["animation"]},blockAnimationSimpleEffectBy:{cat:"animation",label:"change {choice:effect} by {number:25}\nin {number:1} secs\nand name it {animations}",
1504func:"blockAnimationSimpleEffectBy",readName:"Animate Effect By",concept:"advanced animation",tags:["animation"]},blockAnimationSimpleSwitchCostume:{cat:"animation",omitbg:!0,label:"animate {costumes}",func:"blockAnimationSimpleSwitchCostume",readName:"Animate",concept:"advanced animation",tags:["animation"]},blockAnimationSimpleSwitchCostumeAndWait:{cat:"animation",omitbg:!0,label:"animate {costumes} and wait",func:"blockAnimationSimpleSwitchCostumeAndWait",readName:"Animate and Wait",concept:"advanced animation",
1505tags:["animation"]},blockLooksSwitchCostume:{cat:"looks",omitbg:!0,label:"switch to costume {costumes}",func:"blockLooksSwitchCostume",readName:"Switch To Costume",concept:"advanced costume handling",tags:["change look","switch costume"]},blockLooksNextCostume:{cat:"looks",omitbg:!0,label:"next costume",func:"blockLooksNextCostume",readName:"Next Costume",concept:"simple costume handling",tags:["change look","change costume"]},blockLooksFirstCostumeInGroup:{cat:"looks",omitbg:!0,label:"first costume starting with {costumes}",
1506func:"blockLooksFirstCostumeInGroup",readName:"First Costume Starting With",concept:"advanced costume handling",tags:["change look","change costume"]},blockLooksNextCostumeInGroup:{cat:"looks",omitbg:!0,label:"next costume starting with {costumes}",func:"blockLooksNextCostumeInGroup",readName:"Next Costume Starting With",concept:"advanced costume handling",tags:["change look","change costume"]},valueLooksCostumeNum:{cat:"looks",watchable:!0,omitbg:!0,label:"costume #",value:"number",func:"valueLooksCostumeNum",
1507readName:"Costume #",concept:"advanced costume handling",tags:["value"]},valueLooksCostumeName:{cat:"looks",watchable:!0,omitbg:!0,label:"costume name",value:"string",func:"valueLooksCostumeName",readName:"Costume Name",concept:"advanced costume handling",tags:["value"]},blockLooksBackgroundColor:{cat:"looks",label:"set background color {color}",func:"blockLooksBackgroundColor",readName:"Background Color",concept:"advanced costume handling",tags:["change background"]},blockLooksSwitchBackground:{cat:"looks",
1508label:"switch to background {scenes}",func:"blockLooksSwitchBackground",readName:"Switch To Scene",concept:"advanced costume handling",tags:["change background"]},blockLooksSwitchBackgroundAndWait:{cat:"looks",label:"switch to background {scenes} and wait",func:"blockLooksSwitchBackgroundAndWait",readName:"Switch To Scene And Wait",concept:"advanced costume handling",tags:["change background"]}
1508,blockLooksNextBackground:{cat:"looks",label:"next background",func:"blockLooksNextBackground",readName:"Next Scene",
1509concept:"simple costume handling"},blockLooksFirstBackgroundInGroup:{cat:"looks",label:"first background starting with {costumes}",func:"blockLooksFirstBackgroundInGroup",readName:"First Scene Starting With",concept:"advanced costume handling",tags:["change look","change background"]},blockLooksNextBackgroundInGroup:{cat:"looks",label:"next background starting with {costumes}",func:"blockLooksNextBackgroundInGroup",readName:"Next Scene Starting With",concept:"advanced costume handling",tags:["change look",
1510"change background"]},valueLooksBackground:{cat:"looks",watchable:!0,omitactor:!0,label:"background #",value:"number",func:"valueLooksBackground",readName:"Scene #",concept:"advanced costume handling"},valueLooksBackgroundName:{cat:"looks",watchable:!0,label:"background name",value:"number",func:"valueLooksBackgroundName",readName:"Scene Name",concept:"advanced costume handling"},blockLooksSetLabel:{cat:"looks",omitbg:!0,label:"set label to {string:Hello} {varargs}",func:"blockLooksSetLabel",readName:"Set Label To",
1511concept:"input/output",tags:["bubble","talk","say","output"]},blockLooksSetBubble:{cat:"looks",label:"set bubble to {choice:bubblestyle}",func:"blockLooksSetBubble",readName:"Set Bubble To",concept:"input/output",tags:["talk"]},blockLooksSetBubbleDock:{cat:"looks",label:"set bubble dock to {choice:bubbledock}",func:"blockLooksSetBubbleDock",readName:"Set Bubble Dock To",concept:"input/output",tags:["talk"]},blockLooksSetBubbleWidth:{cat:"looks",label:"set bubble width to {number:50}%",func:"blockLooksSetBubbleWidth",
1512readName:"Set Bubble Width To",concept:"input/output",tags:["talk"]},blockLooksSayStyled:{cat:"looks",label:"say {string:Hello} {varargs}\nwith style {choice:bubblestyle:bottom message box}\ncolors for text:{color:#eeeeee} border:{color:#ffffff} background:{color:#000000}\nfont style {choice:fontstyle} {choice:fontsize:18} {choice:font}",func:"blockLooksSayStyled",readName:"Say",concept:"input/output",tags:["talk"]},blockLooksSayStyledFor:{cat:"looks",label:"say {string:Hello} {varargs} for {number:2} secs\nwith style {choice:bubblestyle:bottom message box}\ncolor for text:{color:#eeeeee} border:{color:#ffffff} background:{color:#000000}\nfont style {choice:fontstyle} {choice:fontsize:18} {choice:font}",
1513func:"blockLooksSayStyledFor",readName:"Say",concept:"input/output",tags:["talk"]},blockLooksSayFor:{cat:"looks",label:"say {string:Hello} {varargs} for {number:2} secs",func:"blockLooksSayFor",readName:"Say For",concept:"input/output",tags:["bubble","talk","output","time"]},blockLooksSay:{cat:"looks",label:"say {string:Hello} {varargs}",func:"blockLooksSay",readName:"Say",concept:"input/output",tags:["talk"]},blockLooksThinkFor:{cat:"looks",label:"think {string:Hmm} {varargs} for {number:2} secs",
1514func:"blockLooksThinkFor",readName:"Think For",concept:"input/output",tags:["bubble","output"]},blockLooksThink:{cat:"looks",label:"think {string:Hmm} {varargs}",func:"blockLooksThink",readName:"Think",concept:"input/output"},blockLooksChangeEffect:{cat:"looks",label:"change {choice:effect} effect by {number:25}",func:"blockLooksChangeEffect",readName:"Change Effect By",concept:"graphic effects",tags:["transparent","visual","special effect","alpha","opacity"]},blockLooksSetEffect:{cat:"looks",label:"set {choice:effect} effect to {number:0}",
1515func:"blockLooksSetEffect",readName:"Set Effect To",concept:"graphic effects",tags:["transparent","visual","special effect","alpha","opacity"]},blockLooksClearEffects:{cat:"looks",label:"clear graphic effects",func:"blockLooksClearEffects",readName:"Clear Graphic Effects",concept:"graphic effects",tags:["special effect"]},blockLooksChangeSizeBy:{cat:"looks",omitbg:!0,label:"change size by {number:10}%",func:"blockLooksChangeSizeBy",readName:"Change Size By",concept:"resize actor",tags:["size","resize",
1516"bigger","smaller"]},blockLooksSetSize:{cat:"looks",omitbg:!0,label:"set size to {number:100}%",func:"blockLooksSetSize",readName:"Set Size To",concept:"resize actor",tags:"resize;bigger;smaller;make bigger;make smaller;shrink;enlarge".split(";")},valueLooksSize:{cat:"looks",watchable:!0,omitbg:!0,label:"size",value:"number",func:"valueLooksSize",readName:"Size",concept:"resize actor",tags:["resize","bigger","smaller","make bigger","make smaller"]},blockLooksShow:{cat:"looks",omitbg:!0,label:"show",
1517func:"blockLooksShow",readName:"Show",concept:"visibility",tags:["visibility"]},blockLooksHide:{cat:"looks",omitbg:!0,label:"hide",func:"blockLooksHide",readName:"Hide",concept:"visibility",tags:["visibility"]},valueLooksIsHidden:{cat:"looks",watchable:!0,omitbg:!0,label:"is hidden?",value:"boolean",func:"valueLooksIsHidden",readName:"Is Hidden?",concept:"visibility",tags:["visibility"]},blockLooksLayer:{cat:"looks",omitbg:!0,label:"set layer to {number}",func:"blockLooksLayer",readName:"Set Layer",
1518concept:"layers",tags:["layers"]},valueLooksLayer:{cat:"looks",omitbg:!0,label:"get layer",func:"valueLooksLayer",value:"number",readName:"Get Layer",concept:"layers",tags:["layers"]},blockLooksGoFront:{cat:"looks",omitbg:!0,label:"go to front",func:"blockLooksGoFront",readName:"Go To Front",concept:"layers",tags:["layers"]},blockLooksGoBack:{cat:"looks",omitbg:!0,label:"go to back",func:"blockLooksGoBack",readName:"Go To Back",concept:"layers",tags:["layers"]},blockLooksMoveBack:{cat:"looks",omitbg:!0,
1519label:"go back {number:1} layers",func:"blockLooksMoveBack",readName:"Go Back Layers",concept:"layers"},blockLooksMoveFront:{cat:"looks",omitbg:!0,label:"go forward {number:1} layers",func:"blockLooksMoveFront",readName:"Go Forward Layers",concept:"layers"},blockLooksDialog:{cat:"looks",hidden:!0,label:"show dialog with {str
1519ing}",func:"blockLooksDialog",readName:"System Dialog",concept:"input/output",tags:[]},blockLooksViewportCamera:{cat:"looks",hidden:!0,label:"set viewport camera to {actor}",func:"blockLooksViewportCamera",
1520readName:"Viewport Camera",concept:"level design",tags:["level"]},blockLooksPromptChoices:{cat:"looks",hidden:!0,label:"show dialog with {string} and choices {string:OK} {varargs}",func:"blockLooksPromptChoices",readName:"System Dialog",concept:"input/output",tags:[]},blockLooksSetLevel:{cat:"looks",label:"set level to {level}",hasSlot:!1,func:"blockLooksSetLevel",readName:"Set level to",concept:"level design",tags:["level"]},blockLooksSetLevelWithActors:{cat:"looks",label:"set level to {level} with actors {varargs:actor}",
1521hasSlot:!1,func:"blockLooksSetLevelWithActors",readName:"Set level to",concept:"level design",tags:["level"]},valueLooksGetLevel:{cat:"looks",label:"get current level",func:"valueLooksGetLevel",value:"string",readName:"Get current level",concept:"level design",tags:["level"]},valueLooksGetLevelNum:{cat:"looks",label:"get current level number",func:"valueLooksGetLevelNum",value:"number",readName:"Get current level",concept:"level design",tags:["level"]},valueLooksNumLevels:{cat:"looks",label:"get number of levels",
1522func:"valueLooksNumLevels",value:"number",readName:"Get number of levels",concept:"level design",tags:["level"]},blockLooksSetZoom:{cat:"looks",hidden:!1,label:"set stage zoom to {number:100} %",func:"blockLooksSetZoom",readName:"Set canvas zoom",concept:"level design",tags:["level"]},valueLooksGetZoom:{cat:"looks",hidden:!1,label:"get stage zoom",func:"valueLooksGetZoom",value:"number",readName:"Get canvas zoom",concept:"level design",tags:["level"]},valueLooksGetTileAt:{cat:"looks",hidden:!1,label:"get tile at column:{number} row:{number}",
1523func:"valueLooksGetTileAt",value:"string",readName:"Get tile at",concept:"level design",tags:["level"]},valueLooksGetTileAtPoint:{cat:"looks",hidden:!1,label:"get tile at point x:{number} y:{number}",func:"valueLooksGetTileAtPoint",value:"string",readName:"Get tile at point",concept:"level design",tags:["level"]},blockLooksSetTileAt:{cat:"looks",hidden:!1,label:"set tile at column:{number} row:{number} to {tiles}",func:"blockLooksSetTileAt",readName:"Set tile at",concept:"level design",tags:["level"]},
1524blockLooksSetTileAtPoint:{cat:"looks",hidden:!1,label:"set tile at point x:{number} y:{number} to {tiles}",func:"blockLooksSetTileAtPoint",readName:"Set tile at point",concept:"level design",tags:["level"]},blockLooksVideo:{cat:"ar",hidden:!0,omitactor:!0,label:"turn video {choice:videoviewtype}",func:"blockLooksVideo",readName:"Turn Video",concept:"video control",tags:["video"]},blockLooksVideoTransparency:{cat:"ar",hidden:!0,omitactor:!0,label:"set video transparency to {number:50}%",func:"blockLooksVideoTransparency",
1525readName:"Set Video Transparency To",concept:"video control",tags:["video"]},blockLooksVideoMask:{cat:"ar",hidden:!0,omitactor:!0,label:"mask video using {choice:videomask:oval}\nwith width:{number:250} and height:{number:300}",func:"blockLooksVideoMask",readName:"Freeze video",concept:"video control",tags:["video"]},blockLooksTakeScreenshot:{cat:"ar",hidden:!1,omitactor:!0,label:"take screenshot",func:"blockLooksTakeScreenshot",readName:"take screenshot",concept:"video control",tags:["video"]},blockLooksVideoGetColor:{cat:"ar",
1526hidden:!0,label:"get color from video into {variables}",func:"blockLooksVideoGetColor",readName:"Get color from video",concept:"video control",tags:["video"]},valueSensingVideo:{cat:"ar",hidden:!0,label:"video {choice:videosensetype} on{where}?",value:"number",func:"valueSensingVideo",readName:"Video On?",concept:"video control",tags:["video","detect"]},blockSensingVideoFindColor:{cat:"ar",hidden:!0,label:"find color {color} on video with tolerance {number}%",func:"blockSensingVideoFindColor",readName:"find color",
1527concept:"video control",tags:["video","detect"]},valueSensingVideoLastColorCenterX:{cat:"ar",hidden:!0,label:"found color position x",value:"number",func:"valueSensingVideoLastColorCenterX",readName:"last x",concept:"video control",tags:["video","detect"]},valueSensingVideoLastColorCenterY:{cat:"ar",hidden:!0,label:"found color position y",value:"number",func:"valueSensingVideoLastColorCenterY",readName:"last y",concept:"video control",tags:["video","detect"]},valueSensingVideoGetColor:{cat:"ar",
1528hidden:!0,omitbg:!0,label:"get color under actor",value:"string",func:"valueSensingVideoGetColor",readName:"Get Color",concept:"video control"},valueSensingTouchingSprite:{cat:"sensing",omitbg:!0,label:"touching {where}?",value:"boolean",func:"valueSensingTouchingSprite",readName:"Touching?",concept:"detect conditions"},valueSensingTouchingCloneOf:{cat:"sensing",omitbg:!0,label:"touching clone of {where}?",value:"boolean",func:"valueSensingTouchingCloneOf",readName:"Touching Clone Of?",concept:"detect conditions"},
1529valueSensingTouchingColor:{cat:"sensing",omitbg:!0,label:"touching color {color}?",value:"boolean",func:"valueSensingTouchingColor",readName:"Touching Color?",concept:"color detection"},valueSensingSeeColor:{cat:"sensing",omitbg:!0,label:"color {color} is touching {color}?",value:"boolean",func:"valueSensingSeeColor",readName:"Color Is Touching?",concept:"color detection"},blockSensingAskAndWait:{cat:"sensing",label:"ask {string:What is your name} {varargs} and wait",func:"blockSensingAskAndWait",
1530readName:"Ask And Wait",concept:"input/output"},blockSensingAskChoices:{cat:"sensing",label:"ask {string:Yes or no} with choices {string:ok} {varargs}",func:"blockSensingAskChoices",readName:"Ask With Choices",concept:"input/output"},valueSensingAnswer:{cat:"sensing",watchable:!0,label:"answer",value:"string",func:"valueSensingAnswer",readName:"Answer",concept:"input/output"},valueSensingTiltAngle:{cat:"sensing",watchable:!0,label:"tilt angle",value:"number",func:"valueSensingTiltAngle",readName:"Tilt Angle",
1531concept:"advanced motion"},valueSensingTiltAmount:{cat:"sensing",watchable:!0,label:"tilt amount",value:"number",func:"valueSensingTiltAmount",readName:"Tilt Amount",concept:"advanced motion"},valueSensingAccelerometerX:{cat:"sensing",watchable:!0,label:"x tilt",value:"number",func:"valueSensingAccelerometerX",readName:"Accelerometer X",concept:"advanced motion"},valueSensingAccelerometerY:{cat:"sensing",watchable:!0,label:"y tilt",value:"number",func:"valueSensingAccelerometerY",readName:"Accelerometer Y",
1532concept:"advanced motion"},valueSensingMouseX:{cat:"sensing",watchable:!0,label:"mouse x",value:"number",func:"valueSensingMouseX",readName:"Mouse X",concept:"advanced motion"},valueSensingMouseY:{cat:"sensing",watchable:!0,label:"mouse y",value:"number",func:"valueSensingMouseY",readName:"Mouse Y",concept:"advanced motion"},valueSensingMouseDown:{cat:"sensing",watchable:!0,label:"mouse down?",value:"boolean",func:"valueSensingMouseDown",readName:"Mouse Down?",concept:"detect conditions"},valueSensingKeyPressed:{cat:"sensing",
1533label:"key {choice:keys} pressed?",value:"boolean",func:"valueSensingKeyPressed",readName:"Key Pressed?",concept:"detect conditions"},valueSensingDistanceToSprite:{cat:"sensing",omitbg:!0,label:"distance to {whereall}?",value:"number",func:"valueSensingDistanceToSprite",readName:"Distance To",concept:"advanced motion",tags:["value"]},blockSensingResetTimer:{cat:"sensing",label:"reset timer",func:"blockSensingResetTimer",readName:"Reset Timer",concept:"timer"},valueSensingTimer:{cat:"sensing",watchable:!0,
1534label:"timer",value:"number",func:"valueSensingTimer",readName:"Timer",concept:"timer"},blockSensingSpriteProperty:{cat:"sensing",label:"set {choice:spriteprop} of {whereall}
1534 to {string:0}",func:"blockSensingSpriteProperty",readName:"Property Of",concept:"resize actor",tags:"value;variable;variables;property;properties;x position;y position;angle;direction;layer;rotation style;label;say;costume #;costume name;size;volume;width;height;density;friction;restitution;angular velocity;angular damping;linear damping;x linear velocity;y linear velocity".split(";")},
1535valueSensingSpriteProperty:{cat:"sensing",label:"{choice:spriteprop} of {whereall}",value:"number",func:"valueSensingSpriteProperty",readName:"Property Of",concept:"resize actor",tags:"value;variable;variables;property;properties;x position;y position;angle;direction;layer;rotation style;label;say;costume #;costume name;size;volume;width;height;density;friction;restitution;angular velocity;angular damping;linear damping;x linear velocity;y linear velocity".split(";")},valueSensingActorName:{cat:"sensing",
1536label:"my actor name",value:"string",func:"valueSensingActorName",readName:"Name Of Actor",concept:"resize actor",tags:["value"]},valueSensingActorNameAt:{cat:"sensing",label:"name of actor at {number}",value:"string",func:"valueSensingActorNameAt",readName:"Name Of Actor",concept:"resize actor",tags:["value"]},valueSensingNumActors:{cat:"sensing",label:"# of actors",value:"number",func:"valueSensingNumActors",readName:"# Of Actors",concept:"resize actor",tags:["value"]},valueSensingTouchedActorName:{cat:"sensing",
1537label:"name of actor touched",value:"string",func:"valueSensingTouchedActorName",readName:"Name Of Actor Touched",concept:"touching actor",tags:["value"]},valueSensingSoundLevel:{cat:"sensing",hidden:!0,watchable:!0,label:"loudness",value:"number",func:"valueSensingSoundLevel",readName:"Loudness",concept:"sensor control",tags:["value"]},valueSensingIsLoud:{cat:"sensing",hidden:!0,label:"loud?",value:"boolean",func:"valueSensingIsLoud",readName:"Loud?",concept:"sensor control",tags:["value"]},valueSensingSensor:{cat:"sensing",
1538hidden:!0,label:"{string:slider} sensor value",value:"number",func:"valueSensingSensor",readName:"Sensor Value",concept:"sensor control",tags:["value"]},valueSensingSensorPressed:{cat:"sensing",hidden:!0,label:"sensor {string:button pressed}?",value:"boolean",func:"valueSensingSensorPressed",readName:"Sensor?",concept:"sensor control",tags:["value"]},valueSensingDateTime:{cat:"sensing",label:"{choice:datetime} of date/time",value:"number",func:"valueSensingDateTime",readName:"Of Date/Time",concept:"system date",
1539tags:"value system time date year month day hours minutes seconds milliseconds time".split(" ")},valueSensingScreenLeft:{cat:"sensing",hidden:!1,label:"screen left",value:"number",func:"valueSensingScreenLeft",readName:"Screen Left",concept:"screen bounds",tags:["border","edge","value"]},valueSensingScreenRight:{cat:"sensing",hidden:!1,label:"screen right",value:"number",func:"valueSensingScreenRight",readName:"Screen Right",concept:"screen bounds",tags:["border","edge","value"]},valueSensingScreenTop:{cat:"sensing",
1540hidden:!1,label:"screen top",value:"number",func:"valueSensingScreenTop",readName:"Screen Top",concept:"screen bounds",tags:["border","edge","value"]},valueSensingScreenBottom:{cat:"sensing",hidden:!1,label:"screen bottom",value:"number",func:"valueSensingScreenBottom",readName:"Screen Bottom",concept:"screen bounds",tags:["border","edge","value"]},valueSensingStageProperty:{cat:"sensing",label:"stage property {stageproperty}",value:"number",func:"valueSensingStageProperty",readName:"Stage Property",
1541concept:"stage property",tags:["stage","property","properties","value"]},blockSensingSetTag:{cat:"sensing",label:"set tag to {string}",func:"blockSensingSetTag",readName:"Set Tag",concept:"actor properties",tags:["actor","property","properties","value"]},valueSensingGetTag:{cat:"sensing",label:"get tag of {actor}",func:"valueSensingGetTag",value:"string",readName:"Get Tag",concept:"actor properties",tags:["actor","property","properties","value","tag"]},valueSensingUserId:{cat:"sensing",label:"user ID",
1542value:"string",func:"valueSensingUserId",readName:"User ID",concept:"identification",tags:["value","cloud","user"]},valueSensingUserFirstName:{cat:"sensing",label:"user first name",value:"string",func:"valueSensingUserFirstName",readName:"User First Name",concept:"identification",tags:["value","cloud","user","name"]},valueSensingPlatformProperty:{cat:"sensing",hidden:!0,label:"platform {choice:platformproperty}",value:"string",func:"valueSensingPlatformProperty",readName:"Platform Property",concept:"identification",
1543tags:["value","platform","property","mobile","web"]},valueSensingMagnetometer:{cat:"sensing",hidden:!1,label:"compass {choice:compassproperty}",value:"string",func:"valueSensingMagnetometer",readName:"Compass",concept:"identification",tags:["value","compass","magnetometer","property","mobile"]},blockSoundPlay:{cat:"sound",label:"play sound {sounds}",func:"blockSoundPlay",readName:"Play Sound",concept:"simple sound playing",tags:["music","media"]},blockSoundPlayUntilDone:{cat:"sound",label:"play sound {sounds} until done",
1544func:"blockSoundPlayUntilDone",readName:"Play Sound Until Done",concept:"simple sound playing",tags:["music","media"]},blockSoundStopAll:{cat:"sound",label:"stop all sounds",func:"blockSoundStopAll",readName:"Stop All Sounds",concept:"music and instruments"},blockSoundStopActor:{cat:"sound",label:"stop actor sounds",func:"blockSoundStopActor",readName:"Stop Current Actor Sounds",concept:"music and instruments"},blockSoundPlayDrum:{cat:"sound",label:"play drum {choice:drums} for {number:0.2} beats until done",
1545func:"blockSoundPlayDrum",readName:"Play Drum For Beats",concept:"music and instruments",tags:["music"]},blockSoundPlayDrumNonBlocking:{cat:"sound",label:"play drum {choice:drums} for {number:0.2} beats",func:"blockSoundPlayDrumNonBlocking",readName:"Play Drum For Beats",concept:"music and instruments",tags:["music"]},blockSoundRest:{cat:"sound",label:"rest for {number:0.2} beats",func:"blockSoundRest",readName:"Rest For Beats",concept:"music and instruments",tags:["music"]},blockSoundPlayNote:{cat:"sound",
1546label:"play note {number:60} for {number:0.5} beats until done",func:"blockSoundPlayNote",readName:"Play Note For Beats",concept:"music and instruments",tags:["music"]},blockSoundPlayNoteNonBlocking:{cat:"sound",label:"play note {number:60} for {number:0.5} beats",func:"blockSoundPlayNoteNonBlocking",readName:"Play Note For Beats",concept:"music and instruments",tags:["music"]},blockSoundSetInstrument:{cat:"sound",label:"set instrument to {choice:instruments}",func:"blockSoundSetInstrument",readName:"Set Instrument To",
1547concept:"music and instruments",tags:["music"]},blockSoundChangeVolume:{cat:"sound",label:"change volume by {number:-10}
1547",func:"blockSoundChangeVolume",readName:"Change Volume By",concept:"music and instruments",tags:["music"]},blockSoundSetVolume:{cat:"sound",label:"set volume to {number:100}%",func:"blockSoundSetVolume",readName:"Set Volume To",concept:"music and instruments",tags:["music"]},valueSoundVolume:{cat:"sound",watchable:!0,label:"volume",value:"number",value:"number",func:"valueSoundVolume",
1548readName:"Volume",concept:"music and instruments",tags:["value"]},blockSoundChangeTempo:{cat:"sound",label:"change tempo by {number:20}",func:"blockSoundChangeTempo",readName:"Change Tempo By",concept:"music and instruments",tags:["music"]},blockSoundSetTempo:{cat:"sound",label:"set tempo to {number:60} bpm",func:"blockSoundSetTempo",readName:"Set Tempo To",concept:"music and instruments",tags:["music"]},valueSoundTempo:{cat:"sound",watchable:!0,label:"tempo",value:"number",func:"valueSoundTempo",
1549readName:"Tempo",concept:"music and instruments",tags:["music"]},valueSoundInstrumentId:{cat:"sound",watchable:!0,label:"instrument id",value:"number",concept:"music and instruments",tags:["music"]},valueSoundInstrumentName:{cat:"sound",watchable:!0,label:"instrument name",value:"string",concept:"music and instruments",tags:["music"]},blockSetEffectTo:{cat:"sound",label:"set sound effect {choice:effects} to {number:100}%",concept:"music and instruments",tags:["music"]},blockChangeEffectBy:{cat:"sound",
1550label:"change sound effect {choice:effects} by {number:10}%",concept:"music and instruments",tags:["music"]},blockClearEffects:{cat:"sound",label:"clear sound effects",concept:"music and instruments",tags:["music"]},blockSetEchoDelayTo:{cat:"sound",label:"set echo delay to {number:0.5} beats",concept:"music and instruments",tags:["music"]},blockSynthOnFor:{cat:"sound",func:"blockSynthOnFor",label:"synth on for {number:0.5} beats",concept:"music and instruments",tags:["music"]},blockSynthOnForAndWait:{cat:"sound",
1551func:"blockSynthOnForAndWait",label:"synth on for {number:0.5} beats and wait",concept:"music and instruments",tags:["music"]},blockSynthOn:{cat:"sound",func:"blockSynthOn",label:"synth on",concept:"music and instruments",tags:["music"]},blockSynthOff:{cat:"sound",func:"blockSynthOff",label:"synth off",concept:"music and instruments",tags:["music"]},blockSynthSet:{cat:"sound",func:"blockSynthSet",label:"synth set {choice:synthFreqControls} to {string:60}",concept:"music and instruments",tags:["music"]},
1552blockSynthChangeBy:{cat:"sound",func:"blockSynthChangeBy",label:"synth change {choice:synthFreqControls} by {number:1}",concept:"music and instruments",tags:["music"]},valueSynthFreqControl:{cat:"sound",func:"valueSynthFreqControl",watchable:!0,label:"synth {choice:synthFreqControls}",value:"number",concept:"music and instruments",tags:["music"]},blockCreateSynth:{cat:"sound",func:"blockCreateSynth",label:"create synth {button:editsynth}\n and name it {string:my synth}",concept:"music and instruments",
1553tags:["music"]},blockLoadSynth:{cat:"sound",func:"blockLoadSynth",label:"load synth {synths}",concept:"music and instruments",tags:["music"]},valueOpAdd:{cat:"operator",label:"{number} + {number}",value:"number",func:"valueOpAdd",readName:"Add (+)",concept:"basic math",tags:["plus","addition"]},valueOpSubtract:{cat:"operator",label:"{number} - {number}",value:"number",func:"valueOpSubtract",readName:"Subtract (-)",concept:"basic math",tags:["minus","subtraction"]},valueOpMultiply:{cat:"operator",
1554label:"{number} * {number}",value:"number",func:"valueOpMultiply",readName:"Multiple (*)",concept:"basic math",tags:["into","multiply","multiplication","times"]},valueOpDivide:{cat:"operator",label:"{number} / {number}",value:"number",func:"valueOpDivide",readName:"Divide (/)",concept:"basic math",tags:["divide by","division"]},valueOpRandom:{cat:"operator",label:"pick random {number:1} to {number:10}",value:"number",func:"valueOpRandom",readName:"Pick Random",concept:"basic math",tags:["gamble",
1555"any","chance","choice"]},valueOpLess:{cat:"operator",label:"{string} < {string}",value:"boolean",func:"valueOpLess",readName:"Less Than (<)",concept:"basic math",tags:["logical","less than","compare"]},valueOpEqual:{cat:"operator",label:"{string} = {string}",value:"boolean",func:"valueOpEqual",readName:"Equal To (=)",concept:"basic math",tags:["logical","equals","compare"]},valueOpGreater:{cat:"operator",label:"{string} > {string}",value:"boolean",func:"valueOpGreater",readName:"Greater Than (>)",
1556concept:"basic math",tags:["logical","greater than","compare"]},valueOpAnd:{cat:"operator",label:"{boolean} and {boolean}",value:"boolean",func:"valueOpAnd",readName:"And",concept:"advanced math",tags:["logical"]},valueOpOr:{cat:"operator",label:"{boolean} or {boolean}",value:"boolean",func:"valueOpOr",readName:"Or",concept:"advanced math",tags:["logical"]},valueOpNot:{cat:"operator",label:"not {boolean}",value:"boolean",func:"valueOpNot",readName:"Not",concept:"advanced math",tags:["logical"]},valueOpJoin:{cat:"operator",
1557label:"join {string:hello} {string:world} {varargs}",value:"string",func:"valueOpJoin",readName:"Join",concept:"string handling",tags:["strings","add","string","strings","text"]},valueOpLetter:{cat:"operator",label:"letter {number:1} of {any:world}",value:"string",func:"valueOpLetter",readName:"Letter Of",concept:"advanced string handling",tags:["value","string","strings","text"]},valueOpLength:{cat:"operator",label:"length of {string:world}",value:"number",func:"valueOpLength",readName:"Length Of",
1558concept:"advanced string handling",tags:["value","string","strings","text"]},valueOpMod:{cat:"operator",label:" {number} mod {number}",value:"number",func:"valueOpMod",readName:"Mod",concept:"advanced math",tags:["mod","modulo","remainder"]},valueOpRound:{cat:"operator",label:"round {number}",value:"number",func:"valueOpRound",readName:"Round",concept:"advanced math",tags:["round","round up","integer"]},valueOpMath:{cat:"operator",label:"{choice:math} of {number:10}",value:"number",func:"valueOpMath",
1559readName:"Math Function Of",concept:"expert math",tags:"abs;floor;ceiling;int;sqrt;sin;cos;tan;asin;acos;atan;ln;log;e^;10^;trigonometry;math operator".split(";")},valueOpMath2:{cat:"operator",label:"{choice:math2} of {number:10} and {number:10}",value:"number",func:"valueOpMath2",readName:"Math Function Of",concept:"expert math",tags:"atan2;atan2rad;max;min;pow;math operator".split(";")},valueOpConstants:{cat:"operator",label:" {choice:constants}",value:"number",func:"valueOpConstants",readName:"Math Constants",
1560concept:"expert math",tags:"value pi e ln ln2 ln10 log2e log10e".split(" ")},valueOpBinary:{cat:"operator",label:" {string} {choice:operator}
1560 {string}",value:"number",func:"valueOpBinary",readName:"Binary Operators",concept:"advanced math",tags:"logical binary math + - * / = == < <= > >= != & && and || or ^ xor << >> >>>".split(" ")},valueOpBitNot:{cat:"operator",label:"bitwise not {number}",value:"number",func:"valueOpBitNot",readName:"Bitwise Not",concept:"advanced math",tags:["logical","bit"]},
1561valueOpExpression:{cat:"operator",label:"expression {string} {button:edit}",value:"number",func:"valueOpExpression",readName:"Expression",concept:"advanced math",tags:["math","expression"]},valueOpTextSplit:{cat:"operator",label:"split {string:hello world} by {string: }",value:"list",func:"valueOpTextSplit",readName:"split",concept:"advanced text",tags:["text","string","strings"]},valueOpTextReplace:{cat:"operator",label:"replace {string:hello} in {string:hello world} with {string:hi}",value:"string",
1562func:"valueOpTextReplace",readName:"split",concept:"advanced text",tags:["text","string","strings"]},valueOpTextIndex:{cat:"operator",label:"index of {string:world} in {string:hello world}",value:"number",func:"valueOpTextIndex",readName:"split",concept:"advanced text",tags:["text","string","strings"]},valueOpTextLastIndex:{cat:"operator",label:"last index of {string:l} in {string:hello}",value:"number",func:"valueOpTextLastIndex",readName:"split",concept:"advanced text",tags:["text","string","strings"]},
1563valueOpTextSubstring:{cat:"operator",label:"substring of {string:hello} from {number:2} to {number:5}",value:"string",func:"valueOpTextSubstring",readName:"split",concept:"advanced text",tags:["text","string","strings"]},valueOpTextTransform:{cat:"operator",label:"perform {choice:texttransform} on {string:Hello World}",value:"string",func:"valueOpTextTransform",readName:"split",concept:"advanced text",tags:["text","string","strings"]},valueOpTextFormat:{cat:"operator",label:"format {string:hello {0}} with {varargs}",
1564value:"string",func:"valueOpTextFormat",readName:"split",concept:"advanced text",tags:["text","string","strings"]},blockPenClear:{cat:"pen",label:"clear",func:"blockPenClear",readName:"Clear",concept:"simple drawing",tags:["draw"]},blockPenDown:{cat:"pen",omitbg:!0,label:"pen down",func:"blockPenDown",readName:"Pen Down",concept:"simple drawing",tags:["draw"]},blockPenUp:{cat:"pen",omitbg:!0,label:"pen up",func:"blockPenUp",readName:"Pen Up",concept:"simple drawing",tags:["draw"]},blockPenSetColor:{cat:"pen",
1565label:"set pen color to {color}",func:"blockPenSetColor",readName:"Set Pen Color To",concept:"pen color",tags:["draw"]},blockPenChangeHue:{cat:"pen",label:"change pen color by {number:10}",func:"blockPenChangeHue",readName:"Change Pen Color By",concept:"pen color",tags:["draw"]},blockPenSetHue:{cat:"pen",label:"set pen color to {number:0}",func:"blockPenSetHue",readName:"Set Pen Color To",concept:"pen color",tags:["color","rgb","hue","draw"]},blockPenChangeShade:{cat:"pen",label:"change pen shade by {number:10}",
1566func:"blockPenChangeShade",readName:"Change Pen Shade By",concept:"pen shade",tags:["draw"]},blockPenSetShade:{cat:"pen",label:"set pen shade to {number:50}",func:"blockPenSetShade",readName:"Set Pen Shade To",concept:"pen shade"},blockPenChangeSize:{cat:"pen",label:"change pen size by {number:1}",func:"blockPenChangeSize",readName:"Change Pen Size By",concept:"pen size",tags:["draw"]},blockPenSetSize:{cat:"pen",label:"set pen size to {number:1}",func:"blockPenSetSize",readName:"Set Pen Size To",
1567concept:"pen size",tags:["draw"]},blockPenStamp:{cat:"pen",omitbg:!0,label:"stamp",func:"blockPenStamp",readName:"Stamp",concept:"simple drawing",tags:["draw"]},blockPenSetFont:{cat:"pen",label:"set font to {choice:fontstyle} {choice:fontsize:18} {choice:font}",func:"blockPenSetFont",readName:"Set Font To",concept:"text handling",tags:["text"]},blockPenSetFontColor:{cat:"pen",label:"set font color to {color}",func:"blockPenSetFontColor",readName:"Set Font Color To",concept:"text handling",tags:["text"]},
1568blockPenDrawText:{cat:"pen",omitbg:!0,label:"draw text {string}",func:"blockPenDrawText",readName:"Draw Text",concept:"text handling",tags:["write"]},registerDraw:{cat:"pen",hidden:!0,omitbg:!0,hasFlap:!1,label:"when drawing actor",func:"registerDraw",readName:"When Drawing Actor",concept:"drawing actors",tags:["hat block","callback","paint"]},blockPenRedraw:{cat:"pen",hidden:!0,omitbg:!0,label:"redraw actor",func:"blockPenRedraw",readName:"Redraw Actor",concept:"drawing actors",tags:["draw"]},blockPenSetFillColor:{cat:"pen",
1569label:"set fill color to {color}",func:"blockPenSetFillColor",readName:"Set Fill Color To",concept:"fill color",tags:["draw"]},blockPenSetNoFill:{cat:"pen",label:"no fill",func:"blockPenSetNoFill",readName:"No Fill",concept:"fill color",tags:["draw","paint"]},blockPenDrawBezier:{cat:"pen",label:"draw bezier at x1:{number:0} y1:{number:0}\nto x2:{number:0} y2:{number:0}\nwith control points cx1:{number:0} cy1:{number:0}\nand cx2:{number:0} cy2:{number:0}",func:"blockPenDrawBezier",readName:"Draw Bezier At",
1570concept:"shape drawing",tags:["geometry","curve"]},blockPenDrawPoint:{cat:"pen",label:"draw point at x:{number:0} y:{number:0}",func:"blockPenDrawPoint",readName:"Draw Point",concept:"shape drawing",tags:["geometry","shapes","geometric"]},blockPenDrawLine:{cat:"pen",label:"draw line from x1:{number:0} y1:{number:0}\nto x2:{number:0} y2:{number:0}",func:"blockPenDrawLine",readName:"Draw Line",concept:"shape drawing",tags:["shapes","geometry","geometric"]}
1570,blockPenDrawRectangle:{cat:"pen",label:"draw rectangle at x:{number:0} y:{number:0}\nwith width:{number:0} height:{number:0}",
1571func:"blockPenDrawRectangle",readName:"Draw Rectangle",concept:"shape drawing",tags:["geometry","geometric shape"]},blockPenDrawTriangle:{cat:"pen",label:"draw triangle with points x1:{number:0} y1:{number:0}\nx2:{number:0} y2:{number:0}\nx3:{number:0} y3:{number:0}",func:"blockPenDrawTriangle",readName:"Draw Triangle",concept:"shape drawing",tags:["geometry","geometric shape"]},blockPenDrawEllipse:{cat:"pen",label:"draw ellipse at x:{number:0} y:{number:0}\nwith width:{number:0} height:{number:0}",
1572func:"blockPenDrawEllipse",readName:"Draw Ellipse",concept:"shape drawing",tags:["geometry","geometric shape","circle","oval"]},blockPenDrawTextAt:{cat:"pen",label:"draw text {string} at x:{number:0} y:{number:0}",func:"blockPenDrawTextAt",readName:"Draw Text At",concept:"text handling"},blockPenDrawRectangleLocal:{cat:"pen",omitbg:!0,label:"draw rectangle with width:{number:0} height:{number:0}",func:"blockPenDrawRectangleLocal",readName:"Draw Rectangle",concept:"shape drawing",tags:["geometry",
1573"geometric shape"]},blockPenDrawEllipseLocal:{cat:"pen",omitbg:!0,label:"draw ellipse with width:{number:0} height:{number:0}",func:"blockPenDrawEllipseLocal",readName:"Draw Ellipse",concept:"shape drawing",tags:["circle","oval","geometry","geometric shape"]},blockPenClearRect:{cat:"pen",label:"clear rectangle at x:{number:0} y:{number:0}\nwith width:{number:0} height:{number:0}",func:"blockPenClearRect",readName:"Clear",concept:"simple drawing",tags:["draw"]},blockPenClearTriangle:{cat:"pen",label:"clear triangle with points x1:{number:0} y1:{number:0}\nx2:{number:0} y2:{number:0}\nx3:{number:0} y3:{number:0}",
1574func:"blockPenClearTriangle",readName:"Clear Triangle",concept:"shape drawing",tags:["geometry","geometric shape"]},blockPenClearEllipse:{cat:"pen",label:"clear ellipse at x:{number:0} y:{number:0}\nwith width:{number:0} height:{number:0}",func:"blockPenClearEllipse",readName:"Clear Ellipse",concept:"shape drawing",tags:["geometry","geometric shape","circle","oval"]},registerSpriteCollision:{cat:"physics",omitbg:!0,hidden:!1,label:"when actor collides",hasFlap:!1,func:"registerSpriteCollision",readName:"When Actor Collides",
1575concept:"advanced physics",tags:["hat block","collision"]},valuePhysicsGetProperty:{cat:"physics",omitbg:!1,hidden:!1,label:"get property {choice:getphysics} of {actortiles}",value:"string",func:"valuePhysicsGetProperty",readName:"Physics properties",concept:"advanced physics",tags:"value;property;properties;density;friction;restitution;angular velocity;angular damping;inertia;is active;is awake;linear damping;x linear velocity;y linear velocity;x gravity;y gravity;last collided with;last collision x;last collision y;last actor collided with;last actor collision x;last actor collision y".split(";")},
1576blockPhysicsApply:{cat:"physics",omitbg:!1,hidden:!1,label:"apply {choice:setphysics} to {actortiles} with {number:0}",func:"blockPhysicsApply",readName:"Physics properties",concept:"expert physics",tags:"value;force;impulse;torque;density;friction;restitution;angular damping;angular velocity;linear damping;linear velocity".split(";")},blockPhysicsApplyXY:{cat:"physics",omitbg:!1,hidden:!1,label:"apply {choice:setphysicsxy} to {actortiles} with x:{number:0} y:{number:0}",func:"blockPhysicsApplyXY",
1577readName:"Physics properties",concept:"expert physics",tags:["value","force","impulse","linear velocity","gravity"]},blockPhysicsSetActorActive:{cat:"physics",label:"set active on {actortiles} to {boolean}",func:"blockPhysicsSetActorActive",readName:"Set Active",concept:"expert physics"},blockPhysicsSetActorStatic:{cat:"physics",omitbg:!0,label:"set static on {actortiles} to {boolean}",func:"blockPhysicsSetActorStatic",readName:"Set Static",concept:"expert physics"},blockPhysicsSetActorGeometry:{cat:"physics",
1578omitbg:!0,hidden:!1,label:"set shape on {actor} to {choice:geometry}",func:"blockPhysicsSetActorGeometry",readName:"Set Shape To",concept:"expert physics"},valuePhysicsCollidedWithSprite:{cat:"physics",omitbg:!0,hidden:!1,label:"collided with {where}?",value:"boolean",func:"valuePhysicsCollidedWithSprite",readName:"Collided With?",concept:"advanced physics",tags:["value"]},valuePhysicsCollidedWithName:{cat:"physics",omitbg:!0,hidden:!1,label:"collided with actor name",value:"string",func:"valuePhysicsCollidedWithName",
1579readName:"Collided With Actor Name",concept:"advanced physics",tags:["value"]},valuePhysicsTouchingActor:{cat:"physics",omitbg:!0,hidden:!1,label:"is touching {where}?",value:"string",func:"valuePhysicsTouchingActor",readName:"Touching With Actor Name",concept:"advanced physics",tags:["value"]},blockPhysicsApplyForce:{cat:"physics",omitbg:!0,hidden:!1,label:"apply force {number:0}",func:"blockPhysicsApplyForce",readName:"Apply Force",concept:"expert physics"},blockPhysicsApplyImpulse:{cat:"physics",
1580omitbg:!0,hidden:!1,label:"apply impulse {number:0}",func:"blockPhysicsApplyImpulse",readName:"Apply Impulse",concept:"expert physics"},blockPhysicsApplyForceAngle:{cat:"physics",omitbg:!0,hidden:!1,label:"apply force {number:0} at{number:0} degrees",func:"blockPhysicsApplyForceAngle",readName:"Apply Force At Degrees",concept:"expert physics"},blockPhysicsApplyImpulseAngle:{cat:"physics",omitbg:!0,hidden:!1,label:"apply impulse {number:0} at {number:0} degrees",func:"blockPhysicsApplyImpulseAngle",
1581readName:"Apply Impulse At Degrees",concept:"expert physics"},blockPhysicsApplyForceXY:{cat:"physics",omitbg:!0,hidden:!1,label:"apply force x:{number:0} y:{number:0}",func:"blockPhysicsApplyForceXY",readName:"Apply Horizontal and Vertical Force",concept:"expert physics"},blockPhysicsApplyImpulseXY:{cat:"physics",omitbg:!0,hidden:!1,label:"apply impulse x:{number:0} y:{number:0}",func:"blockPhysicsApplyImpulseXY",readName:"Apply Horizontal And Vertical Impulse",concept:"expert physics"},blockPhysicsApplyTorque:{cat:"physics",
1582omitbg:!0,hidden:!1,label:"apply torque {number:0}",func:"blockPhysicsApplyTorque",readName:"Apply Torque",concept:"expert physics"},blockPhysicsSetActive:{cat:"physics",hidden:!1,label:"set active {boolean}",func:"blockPhysicsSetActive",readName:"Set Active",concept:"expert physics"},blockPhysicsSetStatic:{cat:"physics",omitbg:!1,hidden:!1,label:"set static {boolean}",func:"blockPhysicsSetStatic",readName:"Set Static",concept:"expert physics"},blockPhysicsSetGeometry:{cat:"physics",omitbg:!1,hidden:!1,
1583label:"set shape to {choice:geometry}",func:"blockPhysicsSetGeometry",readName:"Set Shape To",concept:"expert physics"},blockPhysicsSetDensity:{cat:"physics",hidden:!1,label:"set density to {number:10}",func:"blockPhysicsSetDensity",readName:"Set Density To",concept:"expert physics"},blockPhysicsSetFriction:{cat:"physics",hidden:!1,label:"set friction to {number:0.5}",func:"blockPhysicsSetFriction",readName:"Set Friction To",concept:"expert physics"},blockPhysicsSetRestitution:{cat:"physics",hidden:!1,
1584label:"set restitution to {number:0.2}",func:"blockPhysicsSetRestitution",readName:"Set Restitution To",concept:"expert physics"},blockPhysicsSetAngularDamping:{cat:"physics",omitbg:!1,hidden:!1,label:"set angular damping to {number:0}",func:"blockPhysicsSetAngularDamping",readName:"Set Angular Damping To",concept:"expert physics"},blockPhysicsSetAngularVelocity:{cat:"physics",omitbg:!1,hidden:!1,label:"set angular velocity to {number:0}",func:"blockPhysicsSetAngularVelocity",readName:"Set Angular Velocity To",
1585concept:"expert physics"},blockPhysicsSetLinearDamping:{cat:"physics",omitbg:!1,hidden:!1,label:"set linear damping to {number:0}",func:"blockPhysicsSetLinearDamping",readName:"Set Linear Damping To",concept:"expert physics"},blockPhysicsSetLinearVelocity:{cat:"physics",omitbg:!1,hidden:!1,label:"set linear velocity to {number:0}",func:"blockPhysicsSetLinearVelocity",readName:"Set Linear Velocity To",concept:"expert physics"},blockPhysicsSetLinearVelocityXY:{cat:"physics",omitbg:!1,hidden:!1,label:"set linear velocity to x:{number:0} y:{number:0}",
1586func:"blockPhysicsSetLinearVelocityXY",readName:"Set Linear Velocity To",concept:"expert physics"},valuePhysicsDensity:{cat:"physics",watchable:!0,omitbg:!1,hidden:!1,label:"density",value:"number",func:"valuePhysicsDensity",readName:"Density",concept:"expert physics",tags:["value"]},valuePhysicsFriction:{cat:"physics",watchable:!0,omitbg:!1,hidden:!1,label:"friction",value:"number",func:"valuePhysicsFriction",readName:"Friction",concept:"expert physics",tags:["value"]},valuePhysicsRestitution:{cat:"physics",
1587watchable:!0,omitbg:!1,hidden:!1,label:"restitution",value:"number",func:"valuePhysicsRestitution",readName:"Restitution",concept:"expert physics",tags:["value"]},valuePhysicsAngularVelocity:{cat:"physics",watchable:!0,omitbg:!0,hidden:!1,label:"angular velocity",value:"number",func:"valuePhysicsAngularVelocity",readName:"Angular Velocity",concept:"expert physics",tags:["value"]},valuePhysicsInertia:{cat:"physics",watchable:!0,omitbg:!0,hidden:!1,label:"inertia",value:"number",func:"valuePhysicsInertia",
1588readName:"Inertia",concept:"expert physics",tags:["value"]},valuePhysicsIsAwake:{cat:"physics",watchable:!0,omitbg:!0,hidden:!1,label:"is awake?",value:"boolean",func:"valuePhysicsIsAwake",readName:"Is Awake?",concept:"expert physics",tags:["value"]},valuePhysicsIsActive:{cat:"physics",watchable:!0,omitbg:!1,hidden:!1,label:"is active?",value:"boolean",func:"valuePhysicsIsActive",readName:"Is Active?",concept:"expert physics",tags:["value"]},valuePhysicsXVelocity:{cat:"physics",watchable:!0,omitbg:!0,
1589hidden:!1,label:"x linear velocity",value:"number",func:"valuePhysicsXVelocity",readName:"X Linear Velocity",concept:"expert physics",tags:["value"]},valuePhysicsYVelocity:{cat:"physics",watchable:!0,omitbg:!0,hidden:!1,label:"y linear velocity",value:"number",func:"valuePhysicsYVelocity",readName:"Y Linear Velocity",concept:"expert physics",tags:["value"]},valuePhysicsAngularDamping:{cat:"physics",watchable:!0,omitbg:!0,hidden:!1,label:"angular damping",value:"number",func:"valuePhysicsAngularDamping",
1590readName:"Angular Damping",concept:"expert physics",tags:["value"]},valuePhysicsLinearDamping:{cat:"physics",watchable:!0,omitbg:!0,hidden:!1,label:"linear damping",value:"number",func:"valuePhysicsLinearDamping",readName:"Linear Damping",concept:"expert physics",tags:["value"]},blockPhysicsSetGravity:{cat:"physics",label:"set gravity to {number:0} by {number:10}",hidden:!1,func:"blockPhysicsSetGravity",readName:"Set Gravity To",concept:"advanced physics"},valuePhysicsXGravity:{cat:"physics",watchable:!0,
1591hidden:!1,label:"X Gravity",value:"number",func:"valuePhysicsXGravity",readName:"X Gravity",concept:"expert physics",tags:["value"]},valuePhysicsYGravity:{cat:"physics",watchable:!0,hidden:!1,label:"Y Gravity",value:"number",func:"valuePhysicsYGravity",readName:"Y Gravity",concept:"expert physics",tags:["value"]},blockPhysicsStart:{cat:"physics",label:"start physics",func:"blockPhysicsStart",readName:"Start Physics",concept:"basic physics"},blockPhysicsStop:{cat:"physics",label:"stop physics",func:"blockPhysicsStop",
1592readName:"Stop Physics",concept:"basic physics"},blockVarPropSet:{cat:"var",label:"set {properties} of {actor}
1592 to {string:0}",func:"blockVarPropSet",readName:"Set Property To",concept:"actor properties",tags:["value","property","properties"]},valueVarPropGet:{cat:"var",label:"property {properties} of {actor}",value:"string",func:"valueVarPropGet",readName:"Property Of",concept:"actor properties",tags:["value","property","properties"]},blockVarSet:{cat:"var",label:"set {variables} to {string:0}",func:"blockVarSet",
1593readName:"Set Variable To",concept:"simple variables",tags:["variable","variables"]},blockVarChangeBy:{cat:"var",label:"change {variables} by {number:1}",func:"blockVarChangeBy",readName:"Change Variable By",concept:"simple variables",tags:["variable","variables"]},blockVarShow:{cat:"var",hidden:!0,label:"show variable {variables}",func:"blockVarShow",readName:"Show Variable",concept:"variable watchers",tags:["variable","variables"]},blockVarHide:{cat:"var",hidden:!0,label:"hide variable {variables}",
1594func:"blockVarHide",readName:"Hide Variable",concept:"variable watchers",tags:["variable","variables"]},blockListAdd:{cat:"list",label:"add {string:thing} {varargs} to {lists}",func:"blockListAdd",readName:"Add To List",concept:"lists",tags:["value","variable","variables"]},blockListDel:{cat:"list",label:"delete {choice:lastall} of {lists}",func:"blockListDel",readName:"Delete from List",concept:"lists",tags:["value","variable","variables"]},blockListInsert:{cat:"list",label:"insert {string:thing} {varargs} at {choice:lastany} of {lists}",
1595func:"blockListInsert",readName:"Insert At Of List",concept:"lists",tags:["value","variable","variables"]},blockListReplace:{cat:"list",label:"replace item {choice:lastany} of {lists} with {string:thing}",func:"blockListReplace",readName:"Replace Item Of List With",concept:"lists",tags:["value","variable","variables"]},valueListItem:{cat:"list",label:"item {choice:lastany} of {lists}",value:"string",func:"valueListItem",readName:"Item Of List",concept:"lists",tags:["value","variable","variables"]},
1596valueListLength:{cat:"list",label:"length of {lists}",value:"number",func:"valueListLength",readName:"Length Of List",concept:"lists",tags:["value","variable","variables"]},valueListContains:{cat:"list",label:"{lists} contains {string:thing}",value:"boolean",func:"valueListContains",readName:"List Contains",concept:"lists",tags:["value","variable","variables"]},blockObjDel:{cat:"obj",label:"delete {string}[{string:0}]",func:"blockObjDel",readName:"Delete Key",concept:"objects",tags:["value","variable",
1597"variables"]},blockObjSet:{cat:"obj",label:"set {string}[{string:0}] = {string}",func:"blockObjSet",readName:"Set To Item",concept:"objects",tags:["value","variable","variables"]},valueObjGet:{cat:"obj",label:"get {string}[{string:0}]",value:"object",func:"valueObjGet",readName:"Get Item",concept:"objects",tags:["value","variable","variables"]},valueObjLength:{cat:"obj",label:"length of {string}",value:"number",func:"valueObjLength",readName:"Length Of List",concept:"objects",tags:["value","variable",
1598"variables"]},valueObjKeys:{cat:"obj",label:"keys of {string}",value:"object",func:"valueObjKeys",readName:"Keys Of",concept:"objects",tags:["value","variable","variables"]},valueObjValues:{cat:"obj",label:"values of {string}",value:"object",func:"valueObjValues",readName:"Values Of",concept:"objects",tags:["value","variable","variables"]},valueListNew:{cat:"obj",label:"new list",value:"object",func:"valueListNew",readName:"New List",concept:"lists",tags:["value","variable","variables"]},valueObjNew:{cat:"obj",
1599label:"new object",value:"object",func:"valueObjNew",readName:"New Object",concept:"lists",tags:["value","variable","variables"]},blockNetworkSaveValue:{cat:"network",hidden:!0,label:"save {string:value} as {string:name} for {choice:permissions}",func:"blockNetworkSaveValue",readName:"Network",concept:"networking",tags:["network","networking"]},blockNetworkLoadValue:{cat:"network",hidden:!0,label:"read {string:name} into {variables}",func:"blockNetworkLoadValue",readName:"Network",concept:"networking",
1600tags:["network","networking"]},blockNetworkAPI:{cat:"network",hidden:!0,label:"network {string} {varargs}",func:"blockNetworkAPI",readName:"Network",concept:"networking",tags:["network","networking"]},valueNetworkParse:{cat:"network",hidden:!0,label:"parse data {string}",value:"object",func:"valueNetworkParse",readName:"Parse Network Object",concept:"networking",tags:["network","networking"]},valueNetworkResult:{cat:"network",hidden:!0,label:"network result",value:"object",func:"valueNetworkResult",
1601readName:"Network Result",concept:"networking",tags:["network","networking"]},blockParticleEmitStart:{cat:"particles",hidden:!0,label:"start emit particles",func:"blockParticleEmitStart",readName:"emit particles",concept:"particles",tags:["particle"]},blockParticleEmitStop:{cat:"particles",hidden:!0,label:"stop emit particles",func:"blockParticleEmitStop",readName:"stop particles",concept:"particles",tags:["particle"]},blockParticleSetRate:{cat:"particles",hidden:!0,label:"set emit rate to {number} particles per seconds",
1602func:"blockParticleSetRate",readName:"set emit rate",concept:"particles",tags:["particle"]},blockParticleSetVectorVelocity:{cat:"particles",hidden:!0,label:"set emit vector velocity X from {number} to {number}, Y from {number} to {number} ",func:"blockParticleSetVectorVelocity",readName:"set particle velocity",concept:"particles",tags:["particle"]},blockParticleSetRadialVelocity:{cat:"particles",hidden:!0,label:"set emit radial velocity from {number} to {number}, from {number} degrees to {number} degrees ",
1603func:"blockParticleSetRadialVelocity",readName:"set particle velocity",concept:"particles",tags:["particle"]},blockParticleSetLifetime:{cat:"particles",hidden:!0,label:"set particle lifetime to {number}",func:"blockParticleSetLifetime",readName:"set particle lifetime",concept:"particles",tags:["particle"]},blockParticleSetMass:{cat:"particles",hidden:!0,label:"set particle mass to {number}",func:"blockParticleSetMass",readName:"set particle mass",concept:"particles",tags:["particle"]},blockParticleSetGravity:{cat:"particles",
1604hidden:!0,label:"set particle gravity to {number}",func:"blockParticleSetGravity",readName:"set particle gravity",concept:"particles",tags:["particle"]},blockParticleSetAttraction:{cat:"particles",hidden:!0,label:"set particle attraction to force {number} with radius {number}",func:"blockParticleSetAttraction",readName:"set particle attraction",concept:"particles",tags:["particle"]},blockParticleSetRadius:{cat:"particles",hidden:!0,label:"set particle radius to {number}",func:"blockParticleSetRadius",
1605readName:"set particle radius",concept:"particles",tags:["particle"]},blockParticleSetColor:{cat:"particles",hidden:!0,label:"set particle color from {color:#ff0000} to {color:#ffff00}",func:"blockParticleSetColor",readName:"set particle color",concept:"particles",tags:["particle"]},blockParticleSetScale:{cat:"particles",hidden:!0,label:"set particle scaling from {number:1} to {number:.1}",func:"blockParticleSetScale",readName:"set particle scaling",concept:"particles",tags:["particle"]},blockParticleSetAlpha:{cat:"particles",
1606hidden:!0,label:"set particle alpha from {number:1} to {number:.1}",func:"blockParticleSetAlpha",readName:"set particle alpha",concept:"particles",tags:["particle"]},blockParticleSetImage:{cat:"particles",hidden:!0,label:"set particle image to {choice:particleimg}",func:"blockParticleSetImage",readName:"set particle image",concept:"particles",tags:["particle"]},registerMCPECommand:{cat:"mcpe",hasFlap:!1,label:"{image:/ide/imgs/button-grass.png} /wsserver command {string}",func:"registerMCPECommand",
1607readName:"command",concept:"Minecraft PE"},registerMCPEEventChat:{cat:"mcpe",hasFlap:!1,label:"{image:/ide/imgs/button-grass.png} when receive chat {string:message}",func:"registerMCPEEventChat",readName:"command",concept:"Minecraft PE"},registerMCPEEventChatAny:{cat:"mcpe",hasFlap:!1,label:"{image:/ide/imgs/button-grass.png} when receive chat {param:message}",func:"registerMCPEEventChatAny",readName:"command",concept:"Minecraft PE"},registerMCPEEventTell:{cat:"mcpe",hasFlap:!1,label:"{image:/ide/imgs/button-grass.png} when receive tell {string:message}",
1608func:"registerMCPEEventTell",readName:"command",concept:"Minecraft PE"},registerMCPEEventTellAny:{cat:"mcpe",hasFlap:!1,label:"{image:/ide/imgs/button-grass.png} when receive tell {param:message}",func:"registerMCPEEventTellAny",readName:"command",concept:"Minecraft PE"},registerMCPEEventDied:{cat:"mcpe",hasFlap:!1,label:"{image:/ide/imgs/button-grass.png} when player dies",func:"registerMCPEEventDied",readName:"command",concept:"Minecraft PE"},registerMCPEEventPlayer:{cat:"mcpe",hasFlap:!1,label:"{image:/ide/imgs/button-grass.png} when player travels {param:traveltype}",
1609func:"registerMCPEEventPlayer",readName:"command",concept:"Minecraft PE"},registerMCPEEventTeleported:{cat:"mcpe",hasFlap:!1,label:"{image:/ide/imgs/button-grass.png} when player teleported",func:"registerMCPEEventTeleported",readName:"command",concept:"Minecraft PE"},registerMCPEEventBounced:{cat:"mcpe",hasFlap:!1,label:"{image:/ide/imgs/button-grass.png} when player bounced",func:"registerMCPEEventBounced",readName:"command",concept:"Minecraft PE"},registerMCPEEventBlockPlaced:{cat:"mcpe",hasFlap:!1,
1610label:"{image:/ide/imgs/button-grass.png} when block {block:stone} placed",func:"registerMCPEEventBlockPlaced",readName:"command",concept:"Minecraft PE"},registerMCPEEventBlockPlacedAny:{cat:"mcpe",hasFlap:!1,label:"{image:/ide/imgs/button-grass.png} when {param:block} placed",func:"registerMCPEEventBlockPlacedAny",readName:"command",concept:"Minecraft PE"},registerMCPEEventBlockBroken:{cat:"mcpe",hasFlap:!1,label:"{image:/ide/imgs/button-grass.png} when block {block:stone} broken",func:"registerMCPEEventBlockBroken",
1611readName:"command",concept:"Minecraft PE"},registerMCPEEventBlockBrokenAny:{cat:"mcpe",hasFlap:!1,label:"{image:/ide/imgs/button-grass.png} when {param:block} broken",func:"registerMCPEEventBlockBrokenAny",readName:"command",concept:"Minecraft PE"},registerMCPEEventMobKilled:{cat:"mcpe",hasFlap:!1,label:"{image:/ide/imgs/button-grass.png} when mob {entityType:chicken} killed",func:"registerMCPEEventMobKilled",readName:"command",concept:"Minecraft PE"},registerMCPEEventMobKilledAny:{cat:"mcpe",hasFlap:!1,
1612label:"{image:/ide/imgs/button-grass.png} when {param:mob} killed",func:"registerMCPEEventMobKilled",readName:"command",concept:"Minecraft PE"},registerMCPEEventEntitySpawned:{cat:"mcpe",hasFlap:!1,label:"{image:/ide/imgs/button-grass.png} when mob {entityType:chicken} spawned",func:"registerMCPEEventEntitySpawned",readName:"command",concept:"Minecraft PE"},registerMCPEEventEntitySpawnedAny:{cat:"mcpe",hasFlap:!1,label:"{image:/ide/imgs/button-grass.png} when {param:mob} spawned",func:"registerMCPEEventEntitySpawned",
1613readName:"command",concept:"Minecraft PE"},registerMCPEEventItemAcquired:{cat:"mcpe",hasFlap:!1,label:"{image:/ide/imgs/button-grass.png} when item {inventory:apple} is acquired",func:"registerMCPEEventItemAcquired",readName:"command",concept:"Minecraft PE"},registerMCPEEventItemAcquiredAny:{cat:"mcpe",hasFlap:!1,label:"{image:/ide/imgs/button-grass.png} when {param:item} is acquired",func:"registerMCPEEventItemAcquiredAny",readName:"command",concept:"Minecraft PE"},registerMCPEEventItemDropped:{cat:"mcpe",
1614hasFlap:!1,label:"{image:/ide/imgs/button-grass.png} when item {inventory:apple} is dropped",func:"registerMCPEEventItemDropped",readName:"command",concept:"Minecraft PE"},registerMCPEEventItemDroppedAny:{cat:"mcpe",hasFlap:!1,label:"{image:/ide/imgs/button-grass.png} when {param:item} is dropped",func:"registerMCPEEventItemDroppedAny",readName:"command",concept:"Minecraft PE"},registerMCPEEventItemUsed:{cat:"mcpe",hasFlap:!1,label:"{image:/ide/imgs/button-grass.png} when item {inventory:bow} is used",
1615func:"registerMCPEEventItemUsed",readName:"command",concept:"Minecraft PE"},registerMCPEEventItemUsedAny:{cat:"mcpe",hasFlap:!1,label:"{image:/ide/imgs/button-grass.png} when item {param:item} is used",func:"registerMCPEEventItemUsedAny",readName:"command",concept:"Minecraft PE"},blockMCPEBotStart:{cat:"mcpe",label:"{image:/ide/imgs/button-grass.png} start TynkerBot buffer",func:"blockMCPEBotStart"},blockMCPEBotFlush:{cat:"mcpe",label:"{image:/ide/imgs/button-grass.png} run TynkerBot buffer",func:"blockMCPEBotFlush"},
1616blockMCPEBotClear:{cat:"mcpe",label:"{image:/ide/imgs/button-grass.png} clear TynkerBot buffer",func:"blockMCPEBotClear"},blockMCPEBotMoveBy:{cat:"mcpe",label:"{image:/ide/imgs/button-grass.png} move TynkerBot by x:{number:0} y:{number:0} z:{number:0}",func:"blockMCPEBotMoveBy"},blockMCPEBotMoveTo:{cat:"mcpe",label:"{image:/ide/imgs/button-grass.png} move TynkerBot to x:{number:0} y:{number:0} z:{number:0}",func:"blockMCPEBotMoveTo"},blockMCPEBotMoveToPlayer:{cat:"mcpe",label:"{image:/ide/imgs/button-grass.png} move TynkerBot to player",
1617func:"blockMCPEBotMoveToPlayer"},blockMCPEBotTestForBlock:{cat:"mcpe",label:"{image:/ide/imgs/button-grass.png} test for block {block:stone} at TynkerBot",func:"blockMCPEBotTestForBlock"},valueMCPEResult:{cat:"mcpe",label:"{image:/ide/imgs/button-grass.png} query result",value:"object",func:"valueMCPEResult",readName:"Result",concept:"Minecraft PE"},blockMCPEBotMove:{cat:"mcpe",label:"{image:/ide/imgs/button-grass.png} move TynkerBot {choice:mcpebotdir} by {number:1} blocks",func:"blockMCPEBotMove"},
1618blockMCPEBotTurnLeft:{cat:"mcpe",label:"{image:/ide/imgs/button-grass.png} turn TynkerBot left",func:"blockMCPEBotTurnLeft"},blockMCPEBotTurnRight:{cat:"mcpe",label:"{image:/ide/imgs/button-grass.png} turn TynkerBot right",func:"blockMCPEBotTurnRight"},blockMCPEBotPointDirection:{cat:"mcpe",label:"{image:/ide/imgs/button-grass.png} point TynkerBot towards {cardinaldirection:south}",func:"blockMCPEBotPointDirection"},blockMCPEBotSaveCheckpoint:{cat:"mcpe",label:"{image:/ide/imgs/button-grass.png} save TynkerBot checkpoint as {string}",
1619func:"blockMCPEBotSaveCheckpoint"},blockMCPEBotRestoreCheckpoint:{cat:"mcpe",label:"{image:/ide/imgs/button-grass.png} go to TynkerBot checkpoint named {string}",func:"blockMCPEBotRestoreCheckpoint"},blockMCPEBotPlaceBlock:{cat:"mcpe",label:"{image:/ide/imgs/button-grass.png} place block {block:stone} at TynkerBot",func:"blockMCPEBotPlaceBlock"},blockMCPEBotBox:{cat:"mcpe",label:"{image:/ide/imgs/button-grass.png} build {choice:mcpefill} box using {block:stone}\nwith width:{number:1} height:{number:1} depth:{number:1}",
1620func:"blockMCPEBotBox"},blockMCPEBotSummon:{cat:"mcpe",label:"{image:/ide/imgs/button-grass.png} summon {entityType:chicken} at TynkerBot",func:"blockMCPEBotSummon"},blockMCPEBotTeleport:{cat:"mcpe",label:"{image:/ide/imgs/button-grass.png} teleport {choice:mcpeplayer:nearest player} to TynkerBot",func:"blockMCPEBotTeleport"},blockMCPEBotLine:{cat:"mcpe",label:"{image:/ide/imgs/button-grass.png} build line using {block:stone}\nby x:{number:0}, y:{number:0}, z:{number:0}",func:"blockMCPEBotLine"},
1621blockMCPEBotCylinder:{cat:"mcpe",label:"{image:/ide/imgs/button-grass.png} build {choice:mcpefill} cylinder using {block:stone}\nwith radius {number:10} and height {number:1}\nfacing {choice:mcpeorientation}",func:"blockMCPEBotCylinder"},blockMCPEBotSphere:{cat:"mcpe",label:"{image:/ide/imgs/button-grass.png} build {choice:mcpefill} sphere using {block:stone}\nwith radius:{number:6}",func:"blockMCPEBotSphere"},blockMCPEBotHemisphere:{cat:"mcpe",label:"{image:/ide/imgs/button-grass.png} build {choice:mcpefill} {choice:mcpehalf} hemisphere using {block:stone}\nwith radius {number:10}",
1622func:"blockMCPEBotHemisphere"},blockMCPEBotPrism:{cat:"mcpe",label:"{image:/ide/imgs/button-grass.png} build prism of {block:stone}\nwith width:{number:1} depth:{number:1}",func:"blockMCPEBotPrism"},blockMCPEBotStairs:{cat:"mcpe",label:"{image:/ide/imgs/button-grass.png} build stairs using {block:oak_stairs}\n with width:{number:1} height:{number:1}",func:"blockMCPEBotStairs"},blockMCPEEnchant:{cat:"mcpe",label:"{image:/ide/imgs/button-grass.png} enchant {choice:mcpeplayer:nearest player} with {choice:mcpeenchantment}",
1623func:"blockMCPEEnchant",readName:"enchant",concept:"Minecraft PE"},blockMCPEGive:{cat:"mcpe",label:"{image:/ide/imgs/button-grass.png} give {inventory:apple} to {choice:mcpeplayer:nearest player}",func:"blockMCPEGive",readName:"give item",concept:"Minecraft PE"},blo
1623ckMCPETeleport:{cat:"mcpe",label:"{image:/ide/imgs/button-grass.png} teleport {choice:mcpeplayer:nearest player} to {number:x},{number:y},{number:z}",func:"blockMCPETeleport",readName:"teleport",concept:"Minecraft PE"},blockMCPESetTime:{cat:"mcpe",
1624label:"{image:/ide/imgs/button-grass.png} set time to {number:0}",func:"blockMCPESetTime",readName:"set time",concept:"Minecraft PE"},blockMCPEKill:{cat:"mcpe",label:"{image:/ide/imgs/button-grass.png} kill {choice:mcpeplayer:nearest player}",func:"blockMCPEKill",readName:"kill player",concept:"Minecraft PE"},blockMCPEGameMode:{cat:"mcpe",label:"{image:/ide/imgs/button-grass.png} set game mode to {choice:mcpegamemode:creative}",func:"blockMCPEGameMode",readName:"set game mode",concept:"Minecraft PE"},
1625blockMCPESay:{cat:"mcpe",label:"{image:/ide/imgs/button-grass.png} say {string:message} {varargs}",func:"blockMCPESay",readName:"say",concept:"Minecraft PE"},blockMCPETell:{cat:"mcpe",label:"{image:/ide/imgs/button-grass.png} tell {string:message}  {varargs} to {choice:mcpeplayer:nearest player}",func:"blockMCPETell",readName:"tell player",concept:"Minecraft PE"},blockMCPESetWeather:{cat:"mcpe",label:"{image:/ide/imgs/button-grass.png} set weather to {choice:mcpeweather:clear}",func:"blockMCPESetWeather",
1626readName:"set weather",concept:"Minecraft PE"},blockMCPESummon:{cat:"mcpe",label:"{image:/ide/imgs/button-grass.png} summon {entityType:chicken} at {number:x},{number:y},{number:z}",func:"blockMCPESummon",readName:"summon",concept:"Minecraft PE"},blockMCPEExecute:{cat:"mcpe",label:"{image:/ide/imgs/button-grass.png} execute {string}",func:"blockMCPEExecute",readName:"execute",concept:"Minecraft PE"},blockMCPEFillBlock:{cat:"mcpe",label:"{image:/ide/imgs/button-grass.png} fill {number:x},{number:y},{number:z} to {number:x},{number:y},{number:z} with {block:stone}",
1627func:"blockMCPEFillBlock",readName:"fill blocks",concept:"Minecraft PE"},blockMCPESetBlock:{cat:"mcpe",label:"{image:/ide/imgs/button-grass.png} set block {block:stone} at {number:x},{number:y},{number:z}",func:"blockMCPESetBlock",readName:"set block",concept:"Minecraft PE"},blockMCPEAgentMove:{cat:"mcpe",label:"{image:/ide/imgs/button-grass.png} agent move {choice:mcpebotdir}",func:"blockMCPEAgentMove",readName:"move",concept:"Minecraft PE"},blockMCPEAgentTurn:{cat:"mcpe",label:"{image:/ide/imgs/button-grass.png} agent turn {choice:mcpedir}",
1628func:"blockMCPEAgentTurn",readName:"turn",concept:"Minecraft PE"},blockMCPEAgentPlace:{cat:"mcpe",label:"{image:/ide/imgs/button-grass.png} agent place {choice:mcpebotdir} from slot {number:1}",func:"blockMCPEAgentPlace",readName:"turn",concept:"Minecraft PE"},blockMCPEAgentDetect:{cat:"mcpe",label:"{image:/ide/imgs/button-grass.png} agent detect {choice:mcpebotdir}",func:"blockMCPEAgentDetect",readName:"detect",concept:"Minecraft PE"},blockMCPEAgentAttack:{cat:"mcpe",label:"{image:/ide/imgs/button-grass.png} agent attack {choice:mcpebotdir}",
1629func:"blockMCPEAgentAttack",readName:"attack",concept:"Minecraft PE"},blockMCPEAgentDestroy:{cat:"mcpe",label:"{image:/ide/imgs/button-grass.png} agent destroy {choice:mcpebotdir}",func:"blockMCPEAgentDestroy",readName:"destroy",concept:"Minecraft PE"},blockMCPEAgentCollect:{cat:"mcpe",label:"{image:/ide/imgs/button-grass.png} agent collect {inventory:apple}",func:"blockMCPEAgentCollect",readName:"attack",concept:"Minecraft PE"},blockMCPEAgentTill:{cat:"mcpe",label:"{image:/ide/imgs/button-grass.png} agent till {choice:mcpebotdir}",
1630func:"blockMCPEAgentTill",readName:"attack",concept:"Minecraft PE"},blockMCPEAgentDropall:{cat:"mcpe",label:"{image:/ide/imgs/button-grass.png} agent drop {choice:mcpebotdir}",func:"blockMCPEAgentDropall",readName:"attack",concept:"Minecraft PE"},blockMCPEAgentTeleport:{cat:"mcpe",label:"{image:/ide/imgs/button-grass.png} agent teleport to player",func:"blockMCPEAgentTeleport",readName:"teleport",concept:"Minecraft PE"},blockMCPESetBlocks:{cat:"nop",label:"deprecated: set blocks {object:list of blocks}",
1631func:"blockMCPESetBlocks",readName:"Set Block List",concept:"Minecraft PE"},valueMCPEBlockExists:{value:"string",cat:"nop",label:"deprecated: does block {block:stone} exist at {number:x},{number:y},{number:z}",func:"valueMCPEBlockExists",readName:"test block exists",concept:"Minecraft PE"},valueMCPEBlockExistsWithin:{value:"string",cat:"nop",label:"deprecated: does block {block:stone} exist within {number:x},{number:y},{number:z} to {number:x},{number:y},{number:z}",func:"valueMCPEBlockExistsWithin"},
1632valueMCPEItemType:{cat:"mcpe",value:"string",label:"{image:/ide/imgs/button-grass.png} item {inventory:apple}",func:"valueMCPEItemType",readName:"item",concept:"Minecraft PE"},valueMCPEBlockType:{cat:"mcpe",value:"string",label:"{image:/ide/imgs/button-grass.png} block {block:stone}",func:"valueMCPEBlockType",readName:"block",concept:"Minecraft PE"},valueMCPEMobType:{cat:"mcpe",value:"string",label:"{image:/ide/imgs/button-grass.png} mob {entityType:chicken}",func:"valueMCPEMobType",readName:"mob",
1633concept:"Minecraft PE"},blockSpheroSetSpeed:{cat:"hardware",subcat:"hardware:sphero",omitbg:!0,label:"{image:/ide/imgs/button-sphero.png} set speed to {number:50}%",func:"blockSpheroSetSpeed",readName:"Set Speed To",concept:"ground control"},blockSpheroRoll:{cat:"hardware",subcat:"hardware:sphero",omitbg:!0,label:"{image:/ide/imgs/button-sphero.png} roll for {number:1} seconds",func:"blockSpheroRoll",readName:"Roll For",concept:"ground control"},blockSpheroStop:{cat:"hardware",subcat:"hardware:sphero",
1634omitbg:!0,label:"{image:/ide/imgs/button-sphero.png} stop moving",func:"blockSpheroStop",readName:"Stop Moving",concept:"ground control"},blockSpheroTurnCW:{cat:"hardware",subcat:"hardware:sphero",omitbg:!0,label:"{image:/ide/imgs/button-sphero.png} turn right by {angle:90} degrees",func:"blockSpheroTurnCW",readName:"Turn Clockwise",concept:"ground control"},blockSpheroTurnCCW:{cat:"hardware",subcat:"hardware:sphero",omitbg:!0,label:"{image:/ide/imgs/button-sphero.png} turn left by {angle:90} degrees",
1635func:"blockSpheroTurnCCW",readName:"Turn Counter-Clockwise",concept:"ground control"},blockSpheroHeading:{cat:"hardware",subcat:"hardware:sphero",omitbg:!0,label:"{image:/ide/imgs/button-sphero.png} set heading to {angle:0} degrees",func:"blockSpheroHeading",readName:"Set Heading To",concept:"ground control"},blockSpheroColor:{cat:"hardware",subcat:"hardware:sphero",omitbg:!0,label:"{image:/ide/imgs/button-sphero.png} set color to {color}",func:"blockSpheroColor",readName:"Set Color To",concept:"ground control"},
1636valueSpheroConnected:{cat:"hardware",subcat:"hardware:sphero",omitbg:!0,value:"boolean",label:"{image:/ide/imgs/button-sphero.png} is connected?",func:"valueSpheroConnected",readName:"Connected?",concept:"ground control"},valueSpheroHeading:{cat:"hardware",subcat:"hardware:sphero",omitbg:!0,value:"number",label:"{image:/ide/imgs/button-sphero.png} heading",func:"valueSpheroHeading",readName:"Heading",concept:"ground control"},valueSpheroSpeed:{cat:"hardware",subcat:"hardware:sphero",omitbg:!0,value:"number",
1637label:"{image:/ide/imgs/button-sphero.png} speed",func:"valueSpheroSpeed",readName:"Speed",concept:"ground control"},valueSpheroProperty:{cat:"hardware",subcat:"hardware:sphero",omitbg:!0,value:"number",label:"{image:/ide/imgs/button-sphero.png} get property {spheroprop}",func:"valueSpheroProperty",readName:"Get Property",concept:"ground control"},valueSpheroOdometer:{cat:"hardware",subcat:"hardware:sphero",omitbg:!0,value:"number",label:"{image:/ide/imgs/button-sphero.png} odometer",func:"valueSpheroOdometer",
1638readName:"Odometer",concept:"ground control"},valueSpheroCollidedSinceLastCheck:{cat:"hardware",subcat:"hardware:sphero",omitbg:!0,value:"boolean",label:"{image:/ide/imgs/button-sphero.png} collided since last check?",func:"valueSpheroCollidedSinceLastCheck",readName:"Collided Since Last Check",concept:"ground control"},registerHardwareTrigger:{cat:"hardware",subcat:"hardware:sphero",omitbg:!0,label:"{image:/ide/imgs/button-sphero.png} when I collide",hasFlap:!1,func:"registerHardwareTrigger",readName:"When I Collide",
1639concept:"ground control",tags:["hat block","collision"]},blockSpheroSetStabilization:{cat:"hardware",subcat:"hardware:sphero",omitbg:!0,label:"{image:/ide/imgs/button-sphero.png} set stabilization {boolean}",func:"blockSpheroSetStabilization",readName:"Set Stabilization",concept:"ground control"},blockSpheroSet:{cat:"hardware",subcat:"hardware:sphero",omitbg:!0,label:"{image:/ide/imgs/button-sphero.png} set {spherosetnumericprop} to {number}",func:"blockSpheroSet",readName:"Set",concept:"ground control"},
1640blockDroneTakeOff:{cat:"hardware",subcat:"hardware:drone",omitbg:!0,label:"{image:/ide/imgs/button-drone.png} take off",func:"blockDroneTakeOff",readName:"Take Off",concept:"flight control"},blockDroneLand:{cat:"hardware",subcat:"hardware:drone",omitbg:!0,label:"{image:/ide/imgs/button-drone.png} land",func:"blockDroneLand",readName:"Land",concept:"flight control"},blockDroneStop:{cat:"hardware",subcat:"hardware:drone",omitbg:!0,label:"{image:/ide/imgs/button-drone.png} stop",func:"blockDroneStop",
1641readName:"Stop",concept:"flight control"},blockDroneEmergency:{cat:"hardware",subcat:"hardware:drone",omitbg:!0,label:"{image:/ide/imgs/button-drone.png} emergency",func:"blockDroneEmergency",readName:"Emergency",concept:"flight control"},blockDroneSetSpeed:{cat:"hardware",subcat:"hardware:drone",omitbg:!0,label:"{image:/ide/imgs/button-drone.png} set speed to {number:50}%",func:"blockDroneSetSpeed",readName:"Set Speed To",concept:"flight control"},blockDroneForward:{cat:"hardware",subcat:"hardware:drone",
1642omitbg:!0,label:"{image:/ide/imgs/button-drone.png} forward for {number:1} seconds",func:"blockDroneForward",readName:"Go Forward For",concept:"flight control"},blockDroneBackward:{cat:"hardware",subcat:"hardware:drone",omitbg:!0,label:"{image:/ide/imgs/button-drone.png} backward for {number:1} seconds",func:"blockDroneBackward",readName:"Go Backward For",concept:"flight control"},blockDroneLeft:{cat:"hardware",subcat:"hardware:drone",omitbg:!0,label:"{image:/ide/imgs/button-drone.png} left for {number:1} seconds",
1643func:"blockDroneLeft",readName:"Go Left For",concept:"flight control"},blockDroneRight:{cat:"hardware",subcat:"hardware:drone",omitbg:!0,label:"{image:/ide/imgs/button-drone.png} right for {number:1} seconds",func:"blockDroneRight",readName:"Go Right For",concept:"flight control"},blockDroneTurnCW:{cat:"hardware",subcat:"hardware:drone",omitbg:!0,label:"{image:/ide/imgs/button-drone.png} turn right by {angle:90} degrees",func:"blockDroneTurnCW",readName:"Turn Right",concept:"flight control"},blockDroneTurnCCW:{cat:"hardware",
1644subcat:"hardware:drone",omitbg:!0,label:"{image:/ide/imgs/button-drone.png} turn left by {angle:90} degrees",func:"blockDroneTurnCCW",readName:"Turn Left",concept:"flight control"},blockDroneAnimation:{cat:"hardware",subcat:"hardware:drone",omitbg:!0,label:"{image:/ide/imgs/button-drone.png} flip {droneanimations:flip forward}",func:"blockDroneAnimation",readName:"Flip",concept:"flight control"},blockDroneUp:{cat:"hardware",subcat:"hardware:drone",omitbg:!0,label:"{image:/ide/imgs/button-drone.png} up for {number:1} seconds",
1645func:"blockDroneUp",readName:"Go Up For",concept:"flight control"},blockDroneDown:{cat:"hardware",subcat:"hardware:drone",omitbg:!0,label:"{image:/ide/imgs/button-drone.png} down for {number:1} seconds",func:"blockDroneDown",readName:"Go Down For",concept:"flight control"},valueDroneConnected:{cat:"hardware",subcat:"hardware:drone",omitbg:!0,value:"boolean",label:"{image:/ide/imgs/button-drone.png} is connected?",func:"valueDroneConnected",readName:"Connected?",concept:"flight control"},blockDroneStartUp:{cat:"hardware",
1646subcat:"hardware:drone",omitbg:!0,label:"{image:/ide/imgs/button-drone.png} start moving up",func:"blockDroneStartUp",readName:"Start Moving Up",concept:"flight control"},blockDroneStartDown:{cat:"hardware",subcat:"hardware:drone",omitbg:!0,label:"{image:/ide/imgs/button-drone.png} start moving down",func:"blockDroneStartDown",readName:"Start Moving Down",concept:"flight control"},blockDroneStartRotateLeft:{cat:"hardware",subcat:"hardware:drone",omitbg:!0,label:"{image:/ide/imgs/button-drone.png} start rotating left",
1647func:"blockDroneStartRotateLeft",readName:"Start Rotating Left",concept:"flight control"},blockDroneStartRotateRight:{cat:"hardware",subcat:"hardware:drone",omitbg:!0,label:"{image:/ide/imgs/button-drone.png} start rotating right",func:"blockDroneStartRotateRight",readName:"Start Rotating Right",concept:"flight control"},blockDroneTakePicture:{cat:"hardware",subcat:"hardware:drone",omitbg:!0,label:"{image:/ide/imgs/button-drone.png} take picture",func:"blockDroneTakePicture",readName:"Take Picture",
1648concept:"flight control"},blockDroneFetchPicture:{cat:"hardware",subcat:"hardware:drone",omitbg:!0,label:"{image:/ide/imgs/button-drone.png} fetch picture from drone",func:"blockDroneFetchPicture",readName:"Fetch Picture From Drone",concept:"flight control"},blockDroneDeletePicture:{cat:"hardware",subcat:"hardware:drone",omitbg:!0,label:"{image:/ide/imgs/button-drone.png} delete picture on drone",func:"blockDroneDeletePicture",readName:"Delete Picture On Drone",concept:"flight control"},blockDroneDeleteAllPictures:{cat:"hardware",
1649subcat:"hardware:drone",omitbg:!0,label:"{image:/ide/imgs/button-drone.png} delete all pictures",func:"blockDroneDeleteAllPictures",readName:"Delete All Pictures",concept:"flight control"},blockDroneVarSetNumPictures:{cat:"hardware",subcat:"hardware:drone",omitbg:!0,label:"{image:/ide/imgs/button-drone.png} set {variables} to number of pictures on drone",func:"blockDroneVarSetNumPictures",readName:"Set Variable to Number of Pictures on Drone",concept:"flight control"},blockDroneSetProductName:{cat:"hardware",
1650subcat:"hardware:drone",omitbg:!0,label:"{image:/ide/imgs/button-drone.png} set drone name to {string:My Drone}",func:"blockDroneSetProductName",readName:"Set Drone Name",concept:"flight control"},valueDroneHasGrabber:{cat:"hardware",subcat:"hardware:drone",omitbg:!0,value:"boolean",label:"{image:/ide/imgs/button-drone.png} has grabber?",func:"valueDroneHasGrabber",readName:"Has Grabber?",concept:"flight control"},blockDroneControlGrabber:{cat:"hardware",subcat:"hardware:drone",omitbg:!0,label:"{image:/ide/imgs/button-drone.png} {grabbercmd:close} grabber",
1651func:"blockDroneControlGrabber",readName:"Control Grabber",concept:"flight control"},valueDroneHasCannon:{cat:"hardware",subcat:"hardware:drone",omitbg:!0,value:"boolean",label:"{image:/ide/imgs/button-drone.png} has cannon?",func:"valueDroneHasCannon",readName:"Has Cannon?",concept:"flight control"},blockDroneControlCannon:{cat:"hardware",subcat:"hardware:drone",omitbg:!0,label:"{image:/ide/imgs/button-drone.png} fire cannon",func:"blockDroneControlCannon",readName:"Control Cannon",concept:"flight control"},
1652blockDroneSetFlyingMode:{cat:"hardware",subcat:"hardware:drone",omitbg:!0,label:"{image:/ide/imgs/button-drone.png} set flying mode {flyingmode:quadcopter}",func:"blockDroneSetFlyingMode",readName:"Set Flying Mode",concept:"flight control"},blockDroneSetPlaneSpeed:{cat:"hardware",subcat:"hardware:drone",omitbg:!0,label:"{image:/ide/imgs/button-drone.png} set plane speed {planespeed:low}",func:"blockDroneSetPlaneSpeed",readName:"Set Plane Speed",concept:"flight control"},blockJumpingSumoStop:{cat:"hardware",
1653subcat:"hardware:jumping-sumo",omitbg:!0,label:"{image:/ide/imgs/button-jumpingsumo.png} stop",func:"blockJumpingSumoStop",readName:"Stop",concept:"ground control"},blockJumpingSumoEmergency:{cat:"hardware",subcat:"hardware:jumping-sumo",omitbg:!0,label:"{image:/ide/imgs/button-jumpingsumo.png} emergency",func:"blockJumpingSumoEmergency",readName:"Emergency",concept:"ground control"},blockJumpingSumoJump:{cat:"hardware",subcat:"hardware:jumping-sumo",omitbg:!0,label:"{image:/ide/imgs/button-jumpingsumo.png} jump {jumpingsumojumps:long}",
1654func:"blockJumpingSumoJump",readName:"Jump",concept:"ground control"},blockJumpingSumoAnimation:{cat:"hardware",subcat:"hardware:jumping-sumo",omitbg:!0,label:"{image:/ide/imgs/button-jumpingsumo.png} perform {jumpingsumoanimations:spin}",func:"blockJumpingSumoAnimation",readName:"Perform",concept:"ground control"},blockJumpingSumoForward:{cat:"hardware",subcat:"hardware:jumping-sumo",omitbg:!0,label:"{image:/ide/imgs/button-jumpingsumo.png} forward for {number:1} seconds",func:"blockJumpingSumoForward",
1655readName:"Go Forward For",concept:"ground control"},blockJumpingSumoBackward:{cat:"hardware",subcat:"hardware:jumping-sumo",omitbg:!0,label:"{image:/ide/imgs/button-jumpingsumo.png} backward for {number:1} seconds",func:"blockJumpingSumoBackward",readName:"Go Backward For",concept:"ground control"},blockJumpingSumoTurnCW:{cat:"hardware",subcat:"hardware:jumping-sumo",omitbg:!0,label:"{image:/ide/imgs/button-jumpingsumo.png} turn right by {number:90} degrees",func:"blockJumpingSumoTurnCW",readName:"Turn Right",
1656concept:"ground control"},blockJumpingSumoTurnCCW:{cat:"hardware",subcat:"hardware:jumping-sumo",omitbg:!0,label:"{image:/ide/imgs/button-jumpingsumo.png} turn left by {number:90} degrees",func:"blockJumpingSumoTurnCCW",readName:"Turn Left",concept:"ground control"},blockJumpingSumoSetSpeed:{cat:"hardware",subcat:"hardware:jumping-sumo",omitbg:!0,label:"{image:/ide/imgs/button-jumpingsumo.png} set drive speed to {number:50}",func:"blockJumpingSumoSetSpeed",readName:"Set Speed To",concept:"ground control"},
1657blockJumpingSumoSetTurn:{cat:"hardware",subcat:"hardware:jumping-sumo",omitbg:!0,label:"{image:/ide/imgs/button-jumpingsumo.png} set turn rate to {number:50}",func:"blockJumpingSumoSetTurn",readName:"Set Turn To",concept:"ground control"},blockJumpingSumoMove:{cat:"hardware",subcat:"hardware:jumping-sumo",omitbg:!0,label:"{image:/ide/imgs/button-jumpingsumo.png} drive and turn for {number:1} seconds",func:"blockJumpingSumoMove",readName:"Move",concept:"ground control"},blockJumpingSumoStart:{cat:"hardware",
1658subcat:"hardware:jumping-sumo",omitbg:!0,label:"{image:/ide/imgs/button-jumpingsumo.png} start",func:"blockJumpingSumoStart",readName:"Start",concept:"ground control"},blockJumpingSumoPose:{cat:"hardware",subcat:"hardware:jumping-sumo",omitbg:!0,label:"{image:/ide/imgs/button-jumpingsumo.png} pose {jumpingsumopositions:balancing}",func:"blockJumpingSumoPose",readName:"Pose",concept:"ground control"},blockJumpingSumoSetVolume:{cat:"hardware",subcat:"hardware:jumping-sumo",omitbg:!0,label:"{image:/ide/imgs/button-jumpingsumo.png} set volume to {number:50}",
1659func:"blockJumpingSumoSetVolume",readName:"Set Volume To",concept:"ground control"},blockJumpingSumoSetAudioTheme:{cat:"hardware",subcat:"hardware:jumping-sumo",omitbg:!0,label:"{image:/ide/imgs/button-jumpingsumo.png} set audio theme to {jumpingsumoaudiotheme:default}",func:"blockJumpingSumoSetAudioTheme",readName:"Set Audio Theme To",concept:"ground control"},blockWedo2RunMotorFor:{cat:"hardware",subcat:"hardware:we-do-2",omitbg:!0,label:"{image:/ide/imgs/button-wedo2.png}run motor for {number:1} seconds",
1660func:"blockWedo2RunMotorFor",readName:"Run Motor For",concept:"lego control"},blockWedo2SetMotorPower:{cat:"hardware",subcat:"hardware:we-do-2",omitbg:!0,label:"{image:/ide/imgs/button-wedo2.png}set motor power {number:50}",func:"blockWedo2SetMotorPower",readName:"Set Motor Power",concept:"lego control"},blockWedo2SetMotorDirection:{cat:"hardware",subcat:"hardware:we-do-2",omitbg:!0,label:"{image:/ide/imgs/button-wedo2.png}set motor direction {wedo2motordirection:clockwise}",func:"blockWedo2SetMotorDirection",
1661readName:"Set Motor Direction",concept:"lego control"},blockWedo2MotorOn:{cat:"hardware",subcat:"hardware:we-do-2",omitbg:!0,label:"{image:/ide/imgs/button-wedo2.png}start motor",func:"blockWedo2MotorOn",readName:"Start Motor",concept:"lego control"},blockWedo2MotorOff:{cat:"hardware",subcat:"hardware:we-do-2",omitbg:!0,label:"{image:/ide/imgs/button-wedo2.png}stop motor",func:"blockWedo2MotorOff",readName:"Stop Motor",concept:"lego control"},blockWedo2MotorDrift:{cat:"hardware",subcat:"hardware:we-do-2",
1662omitbg:!0,label:"{image:/ide/imgs/button-wedo2.png}drift motor",func:"blockWedo2MotorDrift",readName:"Drift Motor",concept:"lego control"},valueWedo2MotorPower:{cat:"hardware",subcat:"hardware:we-do-2",omitbg:!0,value:"boolean",label:"{image:/ide/imgs/button-wedo2.png}motor power",func:"valueWedo2MotorPower",readName:"Motor Power",concept:"lego control"},valueWedo2MotorDirection:{cat:"hardware",subcat:"hardware:we-do-2",omitbg:!0,value:"boolean",label:"{image:/ide/imgs/button-wedo2.png}motor direction",
1663func:"valueWedo2MotorDirection",readName:"Motor Direction",concept:"lego control"},valueWedo2ConnectedTo:{cat:"hardware",subcat:"hardware:we-do-2",omitbg:!0,value:"boolean",label:"{image:/ide/imgs/button-wedo2.png}connected to {wedo2sensorormotor:motor}?",func:"valueWedo2ConnectedTo",readName:"Connected To",concept:"lego control"},blockWedo2SetLightColor:{cat:"hardware",subcat:"hardware:we-do-2",omitbg:!0,label:"{image:/ide/imgs/button-wedo2.png}set light color {number:1}",func:"blockWedo2SetLightColor",
1664readName:"Set Light Color",concept:"lego control"},valueWedo2TiltSensorDirection:{cat:"hardware",subcat:"hardware:we-do-2",omitbg:!0,value:"boolean",label:"{image:/ide/imgs/button-wedo2.png}tilt direction",func:"valueWedo2TiltSensorDirection",readName:"Tilt Direction",concept:"lego control"},blockWedo2SetTiltSensorMode:{cat:"hardware",subcat:"hardware:we-do-2",omitbg:!0,label:"{image:/ide/imgs/button-wedo2.png}set tilt sensor mode {wedo2tiltsensormode:direction}",func:"blockWedo2SetTiltSensorMode",
1665readName:"Set Tilt Sensor Mode",concept:"lego control"},valueWedo2TiltSensorMode:{cat:"hardware",subcat:"hardware:we-do-2",omitbg:!0,value:"boolean",label:"{image:/ide/imgs/button-wedo2.png}tilt sensor mode",func:"valueWedo2TiltSensorMode",readName:"Tile Sensor Mode",concept:"lego control"},valueWedo2TiltSensorAngle:{cat:"hardware",subcat:"hardware:we-do-2",omitbg:!0,value:"boolean",label:"{image:/ide/imgs/button-wedo2.png}tilt angle {wedo2tiltsensorangle:x}",func:"valueWedo2TiltSensorAngle",readName:"Tilt Angle",
1666concept:"lego control"},valueWedo2TiltSensorBumpCount:{cat:"hardware",subcat:"hardware:we-do-2",omitbg:!0,value:"boolean",label:"{image:/ide/imgs/button-wedo2.png}tilt bump count {wedo2tiltbumpdirection:x}",func:"valueWedo2TiltSensorBumpCount",readName:"Tilt Bump Count",concept:"lego control"},blockWedo2SensorReset:{cat:"hardware",subcat:"hardware:we-do-2",omitbg:!0,label:"{image:/ide/imgs/button-wedo2.png}reset {wedo2resettablesensor:tilt sensor}",func:"blockWedo2SensorReset",readName:"Reset Sensor",
1667concept:"lego control"},valueWedo2MotionSensorDistance:{cat:"hardware",subcat:"hardware:we-do-2",omitbg:!0,value:"boolean",label:"{image:/ide/imgs/button-wedo2.png}distance",func:"valueWedo2MotionSensorDistance",readName:"Distance",concept:"lego control"},blockWedo2SetMotionSensorMode:{cat:"hardware",subcat:"hardware:we-do-2",omitbg:!0,label:"{image:/ide/imgs/button-wedo2.png}set motion sensor mode {wedo2motionsensormode:distance}",func:"blockWedo2SetMotionSensorMode",readName:"Set Motion Sensor Mode",
1668concept:"lego control"},valueWedo2MotionSensorMode:{cat:"hardware",subcat:"hardware:we-do-2",omitbg:!0,value:"boolean",label:"{image:/ide/imgs/button-wedo2.png}motion sensor mode",func:"valueWedo2MotionSensorMode",readName:"Motion Sensor Mode",concept:"lego control"},valueWedo2MotionSensorCount:{cat:"hardware",subcat:"hardware:we-do-2",omitbg:!0,value:"boolean",label:"{image:/ide/imgs/button-wedo2.png}motion sensor count",func:"valueWedo2MotionSensorCount",readName:"Motion Sensor Count",concept:"lego control"},
1669blockWedo2PlayToneFor:{cat:"hardware",subcat:"hardware:we-do-2",omitbg:!0,label:"{image:/ide/imgs/button-wedo2.png}play tone with frequency {number:500} Hz for {number:1} secs",func:"blockWedo2PlayToneFor",readName:"Play Tone For",concept:"lego control"},blockWedo2StopTone:{cat:"hardware",subcat:"hardware:we-do-2",omitbg:!0,label:"{image:/ide/imgs/button-wedo2.png}stop playing tone",func:"blockWedo2StopTone",readName:"Stop Playing Tone",concept:"lego control"},blockHueState:{cat:"hardware",subcat:"hardware:phillips-hue",
1670omitbg:!0,label:"{image:/ide/imgs/button-hue.png} turn on light {boolean}",func:"blockHueState",readName:"Turn On Light",concept:"home control"},valueHueState:{cat:"hardware",subcat:"hardware:phillips-hue",omitbg:!0,value:"number",label:"{image:/ide/imgs/button-hue.png} is on?",func:"valueHueState",readName:"On?",concept:"home control"},blockHueColor:{cat:"hardware",subcat:"hardware:phillips-hue",omitbg:!0,label:"{image:/ide/imgs/button-hue.png} set color to {color}",func:"blockHueColor",readName:"Set Color To",
1671concept:"home control"},blockHueSetHue:{cat:"hardware",subcat:"hardware:phillips-hue",omitbg:!0,label:"{image:/ide/imgs/button-hue.png} set hue to {number:50}",func:"blockHueSetHue",readName:"Set Hue To",concept:"home control"},blockHueChangeHue:{cat:"hardware",subcat:"hardware:phillips-hue",omitbg:!0,label:"{image:/ide/imgs/button-hue.png} change hue by {number:10}",func:"blockHueChangeHue",readName:"Change Hue By",concept:"home control"},blockHueBrightness:{cat:"hardware",subcat:"hardware:phillips-hue",
1672omitbg:!0,label:"{image:/ide/imgs/button-hue.png} set brightness to {number:100}",func:"blockHueBrightness",readName:"Set Brightness To",concept:"home control"},valueHueBrightness:{cat:"hardware",subcat:"hardware:phillips-hue",omitbg:!0,value:"number",label:"{image:/ide/imgs/button-hue.png} brightness",func:"valueHueBrightness",readName:"Brightness",concept:"home control"},registerTynkerVMButton:{cat:"tynkervm",label:"{image:/ide/imgs/button-microbit.png} button {choice:boardbuttons} is pressed",
1673hasFlap:!1,func:"registerTynkerVMButton"},blockTynkerVMSerialPrint:{cat:"tynkervm",label:"{image:/ide/imgs/button-microbit.png} serial print {string:message} {varargs}",func:"blockTynkerVMSerialPrint"},valueTynkerVMSerialRead:{cat:"tynkervm",label:"{image:/ide/imgs/button-microbit.png} serial read",value:"string",func:"valueTynkerVMSerialRead"},blockTynkerVMWait:{cat:"tynkervm",label:"{image:/ide/imgs/button-microbit.png} wait {number:1000} ms",func:"blockTynkerVMWait"},blockTynkerVMSetLED:{cat:"tynkervm",
1674label:"{image:/ide/imgs/button-microbit.png} set LED x:{number:0} y:{number:0} {boolean}",func:"blockTynkerVMSetLED"},valueTynkerVMLEDAt:{cat:"tynkervm",value:"boolean",label:"{image:/ide/imgs/button-microbit.png} get LED at x:{number:0} y:{number:0}",func:"valueTynkerVMLEDAt"},blockTynkerVMSetLEDs:{cat:"tynkervm",label:"{image:/ide/imgs/button-microbit.png} set display\n{bit:false} {bit:false} {bit:false} {bit:false} {bit:false}\n{bit:false} {bit:false} {bit:false} {bit:false} {bit:false}\n{bit:false} {bit:false} {bit:false} {bit:false} {bit:false}\n{bit:false} {bit:false} {bit:false} {bit:false} {bit:false}\n{bit:false} {bit:false} {bit:false} {bit:false} {bit:false}",
1675func:"blockTynkerVMSetLEDs"},blockTynkerVMClearLEDs:{cat:"tynkervm",label:"{image:/ide/imgs/button-microbit.png} clear display",func:"blockTynkerVMClearLEDs"},blockTynkerVMSetLEDData:{cat:"tynkervm",label:"{image:/ide/imgs/button-microbit.png} set LEDs to {number}",func:"blockTynkerVMSetLEDData"},valueTynkerVMLEDData:{cat:"tynkervm",value:"string",label:"{image:/ide/imgs/button-microbit.png} display\n{bit:false} {bit:false} {bit:false} {bit:false} {bit:false}\n{bit:false} {bit:false} {bit:false} {bit:false} {bit:false}\n{bit:false} {bit:false} {bit:false} {bit:false} {bit:false}\n{bit:false} {bit:false} {bit:false} {bit:false} {bit:false}\n{bit:false} {bit:false} {bit:false} {bit:false} {bit:false}",
1676func:"valueTynkerVMLEDData"},valueTynkerVMLEDImage:{cat:"tynkervm",value:"string",label:"{image:/ide/imgs/button-microbit.png} image {bitImages}",func:"valueTynkerVMLEDImage"},valueTynkerVMButtonPressed:{cat:"tynkervm",value:"boolean",label:"{image:/ide/imgs/button-microbit.png} is button {choice:boardbuttons} pressed?",func:"valueTynkerVMButtonPressed"},valueTynkerVMButtonWasPressed:{cat:"tynkervm",value:"boolean",label:"{image:/ide/imgs/button-microbit.png} was button {choice:boardbuttons} pressed?",
1677func:"valueTynkerVMButtonWasPressed"},registerTynkerVMAccelGesture:{cat:"tynkervm",label:"{image:/ide/imgs/button-microbit.png} when {choice:gesture}",hasFlap:!1,func:"registerTynkerVMAccelGesture"},valueTynkerVMAccelGesture:{cat:"tynkervm",value:"number",label:"{image:/ide/imgs/button-microbit.png} get accelerometer gesture",func:"valueTynkerVMAccelGesture"},valueTynkerVMAccel:{cat:"tynkervm",value:"number",label:"{image:/ide/imgs/button-microbit.png} get accelerometer {choice:axis}",func:"valueTynkerVMAccel"},
1678blockTynkerVMMagnetometerCalibrate:{cat:"tynkervm",label:"{image:/ide/imgs/button-microbit.png} calibrate compass {choice:calibration}",func:"blockTynkerVMMagnetometerCalibrate"},valueTynkerVMMagnetometerHeading:{cat:"tynkervm",value:"number",label:"{image:/ide/imgs/button-microbit.png} get compass heading",func:"valueTynkerVMMagnetometerHeading"},valueTynkerVMMagnetometer:{cat:"tynkervm",value:"number",label:"{image:/ide/imgs/button-microbit.png} get compass {choice:axis}",func:"valueTynkerVMMagnetometer"},
1679valueTynkerVMTemperature:{cat:"tynkervm",value:"number",label:"{image:/ide/imgs/button-microbit.png} get temperature",func:"valueTynkerVMTemperature"},valueTynkerVMLightVisible:{cat:"tynkervm",value:"number",label:"{image:/ide/imgs/button-microbit.png} get visible light",func:"valueTynkerVMLightVisible"},valueTynkerVMLightIR:{cat:"tynkervm",value:"number",label:"{image:/ide/imgs/button-microbit.png} get infrared light",func:"valueTynkerVMLightIR"},blockTynkerVMType:{cat:"tynkervm",label:"{image:/ide/imgs/button-microbit.png} type {string} {varargs}",
1680func:"blockTynkerVMType"},blockTynkerVMTypeLine:{cat:"tynkervm",label:"{image:/ide/imgs/button-microbit.png} type line {string} {varargs}",func:"blockTynkerVMTypeLine"},blockTynkerVMPressKey:{cat:"tynkervm",label:"{image:/ide/imgs/button-microbit.png} press key {choice:keyboardkeys}",func:"blockTynkerVMPressKey"},blockTynkerVMHoldKey:{cat:"tynkervm",label:"{image:/ide/imgs/button-microbit.png} hold key {choice:keyboardkeys}",func:"blockTynkerVMHoldKey"},blockTynkerVMReleaseKey:{cat:"tynkervm",label:"{image:/ide/imgs/button-microbit.png} release key {choice:keyboardkeys}",
1681func:"blockTynkerVMReleaseKey"},blockTynkerVMMouseMove:{cat:"tynkervm",label:"{image:/ide/imgs/button-microbit.png} move mouse x:{number:0} y:{number:0}",func:"blockTynkerVMMouseMove"},blockTynkerVMMousePress:{cat:"tynkervm",label:"{image:/ide/imgs/button-microbit.png} press mouse button {choice:mousebuttons}",func:"blockTynkerVMMousePress"},blockTynkerVMMouseHold:{cat:"tynkervm",label:"{image:/ide/imgs/button-microbit.png} hold mouse button {choice:mousebuttons}",func:"blockTynkerVMMouseHold"},blockTynkerVMMouseRelease:{cat:"tynkervm",
1682label:"{image:/ide/imgs/button-microbit.png} release mouse button {choice:mousebuttons}",func:"blockTynkerVMMouseRelease"},valueTynkerVMSystemTime:{cat:"tynkervm",value:"number",label:"{image:/ide/imgs/button-microbit.png} get system time",func:"valueTynkerVMSystemTime"},blockTynkerVMSay:{cat:"tynkervm",label:"{image:/ide/imgs/button-microbit.png} say {string} {varargs}",func:"blockTynkerVMSay"},blockTynkerVMSayAndWait:{cat:"tynkervm",label:"{image:/ide/imgs/button-microbit.png} say {string} {varargs} and wait",
1683func:"blockTynkerVMSayAndWait"},registerTynkerVMRadio:{cat:"tynkervm",label:"{image:/ide/imgs/button-microbit.png} when I receive radio messages",hasFlap:!1,func:"registerTynkerVMRadio"},blockTynkerVMRadioSend:{cat:"tynkervm",label:"{image:/ide/imgs/button-microbit.png} broadcast radio message {string} {varargs}",func:"blockTynkerVMRadioSend"},valueTynkerVMRadioReceive:{cat:"tynkervm",value:"number",label:"{ima
1683ge:/ide/imgs/button-microbit.png} receive radio message",func:"valueTynkerVMRadioReceive"},
1684valueTynkerVMRadioSignalStrength:{cat:"tynkervm",value:"number",label:"{image:/ide/imgs/button-microbit.png} radio signal strength",func:"valueTynkerVMRadioSignalStrength"},blockTynkerVMRadioSetGroup:{cat:"tynkervm",label:"{image:/ide/imgs/button-microbit.png} set radio group {number:0} (0-255)",func:"blockTynkerVMRadioSetGroup"},valueTynkerVMRadioGroup:{cat:"tynkervm",value:"number",label:"{image:/ide/imgs/button-microbit.png} radio group",func:"valueTynkerVMRadioGroup"},blockTynkerVMRadioSetPower:{cat:"tynkervm",
1685label:"{image:/ide/imgs/button-microbit.png} set radio power {number:0} (0-7)",func:"blockTynkerVMRadioSetPower"},blockTynkerVMRadioSetChannel:{cat:"tynkervm",label:"{image:/ide/imgs/button-microbit.png} set radio channel {number:0} (0-83)",func:"blockTynkerVMRadioSetChannel"},blockTynkerVMIOSet:{cat:"tynkervm",label:"{image:/ide/imgs/button-microbit.png} set pin {number:0} to {boolean}",func:"blockTynkerVMIOSet"},valueTynkerVMIOGet:{cat:"tynkervm",value:"boolean",label:"{image:/ide/imgs/button-microbit.png} is pin {number:0} on?",
1686func:"valueTynkerVMIOGet"},blockTynkerVMAnalogSet:{cat:"tynkervm",label:"{image:/ide/imgs/button-microbit.png} set value on pin {number:0} to {number}",func:"blockTynkerVMAnalogSet"},valueTynkerVMAnalogGet:{cat:"tynkervm",value:"number",label:"{image:/ide/imgs/button-microbit.png} get value on pin {number:0}",func:"valueTynkerVMAnalogGet"},blockTynkerVMI2CSet:{cat:"tynkervm",label:"{image:/ide/imgs/button-microbit.png} set device {number:0}, register {number:0} to value {number:0}",func:"blockTynkerVMI2CSet"},
1687valueTynkerVMI2CGet:{cat:"tynkervm",value:"number",label:"{image:/ide/imgs/button-microbit.png} get value of device {number:0}, register {number:0}",func:"valueTynkerVMIOGet"},blockTynkerVMSPISend:{cat:"tynkervm",label:"{image:/ide/imgs/button-microbit.png} SPI send value {number:0}",func:"blockTynkerVMSPISend"},valueTynkerVMSPIRecv:{cat:"tynkervm",value:"boolean",label:"{image:/ide/imgs/button-microbit.png} SPI receive value",func:"valueTynkerVMSPIRecv"},valueTynkerVMInputNumber:{cat:"tynkervm",
1688value:"number",label:"{image:/ide/imgs/button-microbit.png} ask for number",func:"valueTynkerVMInputNumber"},valueTynkerVMMapValue:{cat:"tynkervm",value:"string",label:"{image:/ide/imgs/button-microbit.png} map value {number:0}\nfrom low {number:0}\nhigh {number:1023}\nto low {number:0}\nhigh {number:4}",func:"valueTynkerVMMapValue"},blockTynkerVMSetTempo:{cat:"tynkervm",label:"{image:/ide/imgs/button-microbit.png} set tempo to {number:120} beats per minute",func:"blockTynkerVMSetTempo"},blockTynkerVMRest:{cat:"tynkervm",
1689label:"{image:/ide/imgs/button-microbit.png} play a rest for {number:4} beats",func:"blockTynkerVMRest"},blockTynkerVMPlayNote:{cat:"tynkervm",label:"{image:/ide/imgs/button-microbit.png} play note {number:40} on pin {number:0} for {number:4} beats",func:"blockTynkerVMPlayNote"},blockTynkerVMPlaySong:{cat:"tynkervm",label:"{image:/ide/imgs/button-microbit.png} play song {string} on pin {number:0}",func:"blockTynkerVMPlaySong"},blockTynkerVMPlayFrequency:{cat:"tynkervm",label:"{image:/ide/imgs/button-microbit.png} play frequency {number:261.6}Hz on pin {number:0} for {number:100}ms",
1690func:"blockTynkerVMPlayFrequency"},valueTynkerVMSpriteCreate:{cat:"tynkervm",value:"object",label:"{image:/ide/imgs/button-microbit.png} create sprite at x:{number:2} y:{number:2}",func:"valueTynkerVMSpriteCreate"},blockTynkerVMSpriteDelete:{cat:"tynkervm",label:"{image:/ide/imgs/button-microbit.png} delete sprite {variable}",func:"blockTynkerVMSpriteDelete"},blockTynkerVMSpriteSetImage:{cat:"tynkervm",label:"{image:/ide/imgs/button-microbit.png} set sprite {variable} to image {number}",func:"blockTynkerVMSpriteSetImage"},
1691blockTynkerVMSpriteSetProperty:{cat:"tynkervm",label:"{image:/ide/imgs/button-microbit.png} set sprite {variable} property {choice:bitSpriteProperties} to {number:0}",func:"blockTynkerVMSpriteSetProperty"},blockTynkerVMSpriteChangeProperty:{cat:"tynkervm",label:"{image:/ide/imgs/button-microbit.png} change sprite {variable} property {choice:bitSpriteProperties} by {number:0}",func:"blockTynkerVMSpriteChangeProperty"},valueTynkerVMSpriteProperty:{cat:"tynkervm",value:"number",label:"{image:/ide/imgs/button-microbit.png} get sprite {variable} property {choice:bitSpriteProperties}",
1692func:"valueTynkerVMSpriteProperty"},blockTynkerVMSpriteMoveBy:{cat:"tynkervm",label:"{image:/ide/imgs/button-microbit.png} move sprite {variable} by {number:0}",func:"blockTynkerVMSpriteMoveBy"},blockTynkerVMSpriteTurnCW:{cat:"tynkervm",label:"{image:/ide/imgs/button-microbit.png} turn sprite {variable} {image:/ide/imgs/button-cw.png} by {angle:45} degrees",func:"blockTynkerVMSpriteTurnCW"},blockTynkerVMSpriteTurnCCW:{cat:"tynkervm",label:"{image:/ide/imgs/button-microbit.png} turn sprite {variable} {image:/ide/imgs/button-ccw.png} by {angle:45} degrees",
1693func:"blockTynkerVMSpriteTurnCCW"},valueTynkerVMSpriteIsTouching:{cat:"tynkervm",value:"boolean",label:"{image:/ide/imgs/button-microbit.png} sprite {variable} touching {variable}?",func:"valueTynkerVMSpriteIsTouching"},valueTynkerVMSpriteIsTouchingEdge:{cat:"tynkervm",value:"boolean",label:"{image:/ide/imgs/button-microbit.png} sprite {variable} touching edge?",func:"valueTynkerVMSpriteIsTouchingEdge"},registerTynkerVMConfigure:{cat:"tynkervm",label:"{image:/ide/imgs/button-microbit.png} configure",
1694hasFlap:!1,func:"registerTynkerVMConfigure"},blockTynkerVMConfigure:{cat:"tynkervm",label:"{image:/ide/imgs/button-microbit.png} configure {choice:configs}
1694 to {string}",func:"blockTynkerVMConfigure"},registerStart:{cat:"events",label:"on start",hasFlap:!1,func:"registerStart",concept:"simple events",readName:"On Start",tags:"hat block;event;start;begin;program;play".split(";")},registerCommand:{cat:"events",label:"when {param:player} calls {string:command} with {param:params}",hasFlap:!1,func:"registerCommand",
1695concept:"simple events",readName:"Command",tags:"hat block;event;command;player command;call command;new command;ty;when;when player calls command with params".split(";")},blockControlSetTimeout:{cat:"flow",label:"do after {number:2} seconds",containers:"1",func:"blockControlSetTimeout",concept:"delays",readName:"Do After",tags:"do after wait delay slow time parallel thread".split(" ")},blockControlSetInterval:{cat:"flow",label:"do every {number:2} seconds",containers:"1",func:"blockControlSetInterval",
1696concept:"interval loops",readName:"Do Every",tags:"do wait interval forever always loops timed repeat".split(" ")},registerBlockDamage:{cat:"events",label:"when {param:player} damages {param:block}",hasFlap:!1,func:"registerBlockDamage",concept:"simple events",readName:"When Player Damages Block",tags:"hat block;event;damage;damages;hurt;hurts;interact;interacts;block;blocks;when".split(";")},registerBlockBreak:{cat:"events",label:"when {param:player} breaks {param:block}",hasFlap:!1,func:"registerBlockBreak",
1697concept:"simple events",readName:"When Player Breaks Block",tags:"hat block;event;break;breaks;destroy;destroys;block;blocks;when".split(";")},registerBlockPlace:{cat:"events",label:"when {param:player} places {param:block}",hasFlap:!1,func:"registerBlockPlace",concept:"simple events",readName:"When Player Places Block",tags:"hat block;event;place;put;places;puts;block;blocks;set;sets;when".split(";")},registerPlayerLeftClicked:{cat:"events",label:"when {param:player} left clicks {param:block}",hasFlap:!1,
1698func:"registerPlayerLeftClicked",concept:"simple events",readName:"When Player Left Clicks Block",tags:"hat block;event;left;clicks;interact;interacts;click;when;block;blocks;touch;touches".split(";")},registerPlayerRightClicked:{cat:"events",label:"when {param:player} right clicks {param:block}",hasFlap:!1,func:"registerPlayerRightClicked",concept:"simple events",readName:"When Player Right Clicks Block",tags:"hat block;event;right;click;clicks;interact;interacts;when;block;blocks;touch;touches".split(";")},
1699registerEntityInteract:{cat:"events",label:"when {param:player} touches {param:entity} at {param:location}",hasFlap:!1,func:"registerEntityInteract",concept:"simple events",readName:"When Player Touches Entity",tags:"hat block;event;right;click;clicks;interact;interacts;when;entity;entities;touch;touches".split(";")},registerEntityChangeBlock:{cat:"events",label:"when {param:entity} changes {param:block}",hasFlap:!1,func:"registerEntityChangeBlock",concept:"simple events",readName:"When Entity Changes Block",
1700tags:"hat block;event;entity;entities;change;changes;block;blocks;enderman;snowman;when".split(";")},registerPlayerMove:{cat:"events",label:"when {param:player} moves to {param:location}",hasFlap:!1,func:"registerPlayerMove",concept:"simple events",readName:"When Player Moves to Location",tags:"hat block;event;when;player;move;moves;location".split(";")},registerPlayerBlockMove:{cat:"events",label:"when {param:player} moves to another block {param:location}",hasFlap:!1,func:"registerPlayerBlockMove",
1701concept:"simple events",readName:"When Player Moves to Block Location",tags:"hat block;event;when;player;move;moves;location;block".split(";")},registerPlayerRespawn:{cat:"events",label:"when {param:player} respawns at {param:location}",hasFlap:!1,func:"registerPlayerRespawn",concept:"simple events",readName:"When Player Respawns",tags:"hat block;event;when;player;spawn;spawns;respawn;respawns;when player respawns at location".split(";")},registerEntityProjectileHit:{cat:"events",label:"when {param:projectile} from {param:entity} lands at {param:location}",
1702hasFlap:!1,func:"registerEntityProjectileHit",concept:"simple events",readName:"When Projectile Lands",tags:"hat block;event;when;projectile;lands;arrow;snowball;egg;spectral arrow;hit;hits;land;entity;entities;when projectile lands;when projectile from entity lands at location".split(";")},registerProjectileHit:{cat:"events",label:"when {param:projectile} from {param:player} lands at {param:location}",hasFlap:!1,func:"registerProjectileHit",concept:"simple events",readName:"When Projectile Lands",
1703tags:"hat block;event;when;projectile;lands;arrow;snowball;egg;spectral arrow;hit;hits;land;player;players;when projectile lands;when projectile from player lands at location".split(";")},registerPlayerDeath:{cat:"events",label:"when {param:player} dies at {param:location}",hasFlap:!1,func:"registerPlayerDeath",concept:"simple events",readName:"When Player Dies",tags:"hat block;event;when;player;players;die;death;dies;dead;corpse;murdered;killed".split(";")},registerEntityDamageByEntity:{cat:"events",
1704label:"when {param:entity} is hurt by {param:damager}",hasFlap:!1,func:"registerEntityDamageByEntity",concept:"simple events",readName:"When Entity Damaged",tags:"hat block;event;when;entities;entity;hurt;damaged;damager;receives;takes;injure;injured;health;when entity is hurt by damagers;when entities are hurt by damagers".split(";")},registerEntityDeath:{cat:"events",label:"when {param:entity} dies at {param:location}",hasFlap:!1,func:"registerEntityDeath",concept:"simple events",readName:"When Entity Dies",
1705tags:"hat block;event;when;entity;entities;dies;death;dead;corpse;murdered;killed;when entity dies at location".split(";")},blockUnregisterEvent:{cat:"events",label:"unregister event",func:"blockUnregisterEvent",concept:"simple events",readName:"Unregister Event",tags:"event unregister cancel remove undo stop prevent".split(" ")},registerPlayerPortal:{cat:"events",label:"when {param:player}
1705 enters portal at {param:location}",hasFlap:!1,func:"registerPlayerPortal",concept:"simple events",readName:"When Player Enters Portal",
1706tags:"hat block;event;when;player;players;enters;portal;teleport;warp;gate;transport;world;dimension".split(";")},registerToggleFlyMode:{cat:"events",label:"when {param:player} enters flight mode at {param:location}",hasFlap:!1,func:"registerToggleFlyMode",concept:"simple events",readName:"When Player Starts Flying",tags:"hat block;event;when;player;players;enters;starts;flying;take off;takes off;mode;fly;flies;flight".split(";")},valueTypeBlock:{cat:"type",label:"type of block {string}",value:"string",
1707func:"valueTypeBlock",concept:"block types",readName:"Blocktype",tags:"type blocktype block blocks of get".split(" ")},valueTypeProjectile:{cat:"type",label:"type of projectile {string}",value:"string",func:"valueTypeProjectile",concept:"entities",readName:"Projectile Type",tags:"type projectile entity entities of get".split(" ")},blockDisplayEcho:{cat:"display",label:"echo {string} {varargs}",func:"blockDisplayEcho",concept:"input/output",readName:"Echo",tags:["echo","log","say","message","report"]},
1708blockDisplayLog:{cat:"display",label:"log {string} {varargs}",func:"blockDisplayLog",concept:"input/output",readName:"Log",tags:["echo","log","say","message","report"]},valuePlayerByName:{cat:"player",label:"get player named {string:self}",value:"string",func:"valuePlayerByName",concept:"entities",readName:"Player",tags:["get","players","named","entity","entities"]},blockPlayerAddEffect:{cat:"player",label:"add potion effect {potioneffect:glowing} to {object:add player block here} for {number} seconds with {number} power",
1709func:"blockPlayerAddEffect",concept:"entities",readName:"Add Effect",tags:"add potion effect duration absorption blindness confusion damage resistance fast digging fire glowing harm heal health boost hunger increase invisibility buff jump levitation luck night vision poison regeneration saturation slow speed unluck water breathing weakness wither entity entities".split(" ")},blockPlayerSetFire:{cat:"player",label:"set {object:add player block here} on fire for {number} seconds",func:"blockPlayerSetFire",
1710concept:"entities",readName:"Set Player on Fire",tags:"set players on fire entity entities effect duration burning ignite light".split(" ")},valuePlayerName:{cat:"player",label:"get name of {object:add player block here}",value:"string",func:"valuePlayerName",concept:"entities",readName:"Name of Player",tags:"get name of players entity entities".split(" ")},blockPlayerCustomNameSet:{cat:"player",label:"set custom name of {object:add player block here} to {string}",func:"blockPlayerCustomNameSet",
1711concept:"entities",readName:"Set Custom Name",tags:"set custom name of players entity entities".split(" ")},valuePlayerCustomNameGet:{cat:"player",label:"custom name of {object:add player block here}",value:"string",func:"valuePlayerCustomNameGet",concept:"entities",readName:"Custom Name",tags:"get custom name entity entities players".split(" ")},valueEntityTargetBlockGet:{cat:"block",label:"block targeted by {object:add entity block here} within {number:5} distance",value:"string",func:"valueEntityTargetBlockGet",
1712concept:"entities",readName:"Targeted Block",tags:"get targeted blocks selected looking at pointing".split(" ")},blockPlayerTeleport:{cat:"player",label:"teleport {object:add player block here} to {object:add location block here}",func:"blockPlayerTeleport",concept:"advanced motion",readName:"Teleport",tags:"teleport;players;entity;entities;go to;location;position;motion".split(";")},valuePlayerNearbyEntitiesByType:{cat:"player",label:"get all nearby {entity:entity} within distance {number:0} of {object:add entity block here}",
1713value:"string",func:"valuePlayerNearbyEntitiesByType",concept:"entities",readName:"Nearby Entities",tags:"get nearby entity entities distance range".split(" ")},valuePlayerClosestEntityByType:{cat:"player",label:"get closest {entity:entity} within distance {number:0} of {object:add entity block here}",value:"string",func:"valuePlayerClosestEntityByType",concept:"entities",readName:"Closest Entity",tags:"get;closest;entity;entities;distance;range;get closest entity;get closest entities;get closet entities;get closet entity".split(";")},
1714blockPlayerSetEquipment:{cat:"player",label:"set equipment {equipslot:helmet} of {object:add player block here} to {inventory:iron_sword}",func:"blockPlayerSetEquipment",concept:"inventory manipulation",readName:"Set Equipment",tags:"slot;set;equipment;on;players;inventory;armor;weapons;pieces;helment;gauntlets;boots;pants;leggings;shield;item;entity;entities;gear;set equipment of player;set equipment on player;set players equipment;
1714set player's equipment".split(";")},blockPlayerClearInventory:{cat:"player",
1715label:"clear inventory of {object:add player block here}",func:"blockPlayerClearInventory",concept:"inventory manipulation",readName:"Clear Inventory",tags:"clear remove empty inventory items stuff backpack reset".split(" ")},blockPlayerSetCompassTarget:{cat:"player",label:"set compass target of {object:add player block here} to {object:add location block here}",func:"blockPlayerSetCompassTarget",concept:"entities",readName:"Set Compass Target",tags:["set","compass","target","location","find"]},blockPlayerGiveItem:{cat:"player",
1716label:"give {number:1} of {inventory:iron_sword} to {object:add player block here}",func:"blockPlayerGiveItem",concept:"inventory manipulation",readName:"Give Item",tags:"give;items;players;inventory;backpack;stuff;gear;give item;give inventory item;give me;give player".split(";")},blockPlayerLaunchesProjectile:{cat:"player",label:"launch a {projectile:snowball} from {object:add player block here}",func:"blockPlayerLaunchesProjectile",concept:"entities",readName:"Launch Projectile",tags:"launch;projectile;fire;shoot;players;entity;entities;arrow;dragon;fireball;egg;enter pearl;large;small;snowball;spectral".split(";")},
1717blockPlayerGetEquipment:{cat:"player",label:"get equipment {equipslot:helmet} of {object:player}",value:"object",func:"blockPlayerGetEquipment",concept:"inventory manipulation",readName:"Get Equipment",tags:"slot get equipment on players inventory armor weapons pieces helment gauntlets boots pants leggings shield item entity entities gear".split(" ")},blockPlayerBroadcastMessage:{cat:"player",label:"say {string:message} {varargs}",func:"blockPlayerBroadcastMessage",concept:"input/output",readName:"Say",
1718tags:"say message echo log report broadcast talk speak".split(" ")},blockPlayerSendMessage:{cat:"player",label:"say {string:message} {varargs} to {object:add player block here}",func:"blockPlayerSendMessage",concept:"input/output",readName:"Send Message",tags:"say send message echo log report broadcast talk speak private".split(" ")},blockPlayerRideEntity:{cat:"player",label:"{object:add entity block here} start riding {object:add entity block here}",func:"blockPlayerRideEntity",concept:"entities",
1719readName:"Start Riding",tags:"start riding entity entities mounted on top tower totem".split(" ")},blockPlayerStopRideEntity:{cat:"player",label:"{object:add entity block here} stop riding",func:"blockPlayerStopRideEntity",concept:"entities",readName:"Stop Riding",tags:"stop riding dismounted entity entities of tower totem".split(" ")},blockPlayerSetGameMode:{cat:"player",label:"set game mode of {object:add player block here} to {gamemode:survival}",func:"blockPlayerSetGameMode",note:"Use this code block to set the Game Mode of the specified player to one of [creative,survival,spectator,adventure].",
1720concept:"entities",readName:"Set Game Mode",tags:"set game mode casual creative survival adventure spectater entity entities".split(" ")},blockPlayerFlightMode:{cat:"player",label:"set {object:add entity block here} flight mode to {boolean}",func:"blockPlayerFlightMode",concept:"entities",readName:"Set Flight Mode",tags:"set flight mode flying entity entities".split(" ")},blockSetAI:{cat:"player",label:"set AI on {object:add entity block here} to {boolean}",func:"blockSetAI",readName:"Set AI",concept:"entities",
1721tags:"set;ai;artificial;intelligence;set ai;set artificial intelligence".split(";")},valueLocationFromXYZ:{cat:"entity",label:"location at x:{number:0} y:{number:0} z:{number:0}",value:"location",func:"valueLocationFromXYZ",concept:"advanced math",readName:"Get Location",tags:"get location at x y z vector 3d".split(" ")},valueLocationFromEntityOrBlock:{cat:"entity",label:"get location of {object:add entity or block here}",value:"location",func:"valueLocationFromEntityOrBlock",concept:"location",readName:"Location of",
1722tags:"get location entity entities blocks players".split(" ")},valueLocationGet:{cat:"location",label:"get {string:x} from {object:add location block here}",value:"number",func:"valueLocationGet",concept:"advanced math"},valueLocationAdd:{cat:"location",label:"get location x:{number:0} y:{number:0} z:{number:0} away from {object:add location block here}",value:"location",func:"valueLocationAdd",concept:"advanced math",readName:"Get Relative Location",tags:"get;location;x;y;z;away;from;vector;add;relative;3d;get relative locations".split(";")},
1723blockLocationSet:{cat:"location",label:"set {string:x} of {object:add location block here} to {number:0}",func:"blockLocationSet",concept:"advanced math",readName:"Set (x,y,z) of Location",tags:"element set x y z 3d elements location vectors".split(" ")},valueWorldTime:{cat:"world",label:"get world time",value:"number",func:"valueWorldTime",concept:"world manipulation",readName:"Get World Time",tags:"get world server time ticks morning noon afternoon day night evening".split(" ")},blockWorldSetTime:{cat:"world",
1724label:"set world time H:{number:0} M:{number:0} S:{number:0}",func:"blockWorldSetTime",note:"This block allows you to set the in-game time to a specific time. You can put real world times in, like 5:35, or 13:45 for 1:45pm. The actual time is calculated by adding hours, minutes and seconds after being converted to time-ticks.",concept:"world manipulation",readName:"Set World Time",tags:"set world server time hours minutes seconds morning day noon afternoon evening night am pm".split(" ")},valueWorldHighestBlockAt:{cat:"world",
1725label:"get highest block at {object:add location block here}",value:"number",func:"valueWorldHighestBlockAt",concept:"advanced math",readName:"Get Highest Block",tags:"get highest blocks top above surface".split(" ")},blockWorldSpawn:{cat:"world",label:"spawn {entityType:pig} at {object:add location block here}",func:"blockWorldSpawn",concept:"entities",readName:"Spawn Entity",tags:["spawn","entity","entities","create"]},valueWorldSpawn:{cat:"world",label:"spawn {entityType:pig} at {object:add location block here}",
1726value:"string",func:"valueWorldSpawn",concept:"entities",readName:"Spawn Entity",tags:["spawn","entity","entities","create"]},blockEntitySetTarget:{cat:"world",label:"set target of {object:add creature block here} to {object:add living_entity block here}",func:"blockEntitySetTarget",concept:"entities",readName:"Set Target",tags:"set;target;of;entity;entities;ai;artificial;intelligence;attacks;follows;
1726watch;lookat;set target of entity to entity".split(";")},blockWorldLightning:{cat:"world",label:"cast lightning at {object:add location block here}",
1727func:"blockWorldLightning",concept:"world manipulation",readName:"Cast Lightning",tags:"cast spawn lightning electricity spawn electrocute zap".split(" ")},blockWorldExplosion:{cat:"world",label:"create explosion at {object:add location block here} with power {number:2.5}",func:"blockWorldExplosion",concept:"world manipulation",readName:"Create Explosion",tags:"create explosion spawn cast boom bang explode eruption".split(" ")},blockWorldSpawnParticleAt:{cat:"world",label:"spawn {number} particles of type {particle:flame} at {object:add location block here}",
1728func:"blockWorldSpawnParticleAt",concept:"entities",readName:"Spawn Particles",tags:"spawn create particles system block crack cloud crit magic damage indicator indication dragon breath end rod huge explosion large fireworks spark item lava mob appear appearance smoke snow spell instant mob witch".split(" ")},valueWorldGetEntitiesByType:{cat:"world",label:"get all {entity:player}",value:"string",func:"valueWorldGetEntitiesByType",concept:"entities",readName:"Get All Entities",tags:"get;all;entity;entities;list;players;objects;items;get all players".split(";")},
1729valueWorldSpawnLocation:{cat:"world",label:"get spawn location",value:"string",func:"valueWorldSpawnLocation",concept:"location",readName:"Get Spawn Location",tags:["get","world","server","spawn","location"]},blockWorldSetSpawnLocation:{cat:"world",label:"set spawn location to {object:add location block here}",func:"blockWorldSetSpawnLocation",concept:"location",readName:"Set Spawn Location",tags:"set world server spawn respawn location".split(" ")},blockWorldSetPVP:{cat:"world",label:"set PVP to {boolean:false}",
1730func:"blockWorldSetPVP",concept:"world manipulation",readName:"Set PVP",tags:"set pvp player vs fighting damage friendly attacking".split(" ")},blockWorldLaunchFireworks:{cat:"world",label:"launch fireworks with colors {mccolor:red}{mccolor:white}{mccolor:blue}\nfading into colors {mccolor:red}{mccolor:white}{mccolor:blue}\nwith pattern {fireworks:ball}\nwith trailing {boolean}\nwith flickering {boolean}\nat height {fireworkHeight:low}\nat location {object:add location block here}",func:"blockWorldLaunchFireworks",
1731concept:"world manipulation",readName:"Launch Fireworks",tags:"launch;spawn;create;fireworks;colors;location;particles;effects;launch fireeworks with effects".split(";")},blockDroneMoveTo:{cat:"drone",label:"move drone to {object:add location block here}",func:"blockDroneMoveTo",concept:"location",readName:"Move Drone to Location",tags:["move","drone","to","location"]},blockDroneMoveBy:{cat:"drone",label:"move drone {choice:dronedir} by {number:1} blocks",func:"blockDroneMoveBy",concept:"drone tool",
1732readName:"Move Drone",tags:"move drone forward backward left right fwd bkwd bkwrd lft rgt".split(" ")},blockDroneTurnLeft:{cat:"drone",label:"turn drone left",func:"blockDroneTurnLeft",concept:"drone tool",readName:"Turn Drone Left",tags:["turn","drone","left","lft","turn drone left"]},blockDroneTurnRight:{cat:"drone",label:"turn drone right",func:"blockDroneTurnRight",concept:"drone tool",readName:"Turn Drone Right",tags:["turn","drone","right","rgt","turn drone right"]},blockDronePointCardinalDirection:{cat:"drone",
1733label:"point drone towards {cardinaldirection:south}",func:"blockDronePointCardinalDirection",concept:"drone tool",readName:"Set Drone Direction",tags:"point drone in cardinal direction north south east west orientation".split(" ")},blockDroneSetCheckpoint:{cat:"drone",label:"set drone checkpoint named {string}",func:"blockDroneSetCheckpoint",concept:"drone tool",readName:"Set Drone Checkpoint",tags:"set;drone;checkpoint;save;return;check points".split(";")},blockDroneGoCheckpoint:{cat:"drone",label:"go to drone checkpoint named {string}",
1734func:"blockDroneGoCheckpoint",concept:"drone tool",readName:"Go To Drone Checkpoint",tags:"go;to;drone;checkpoint;return;save;check points".split(";")},blockDronePutBlock:{cat:"drone",label:"place block {block:grass} at drone",func:"blockDronePutBlock",concept:"drone tool",readName:"Place Block at Drone",tags:"place blocks at drone location tool".split(" ")},valueDroneDir:{cat:"drone",label:"drone direction",value:"number",func:"valueDroneDir",concept:"drone tool",readName:"Drone Direction",tags:["get",
1735"drone","direction","angle","pointing"]},valueDronePosition:{cat:"drone",label:"drone location",value:"location",func:"valueDronePosition",concept:"location",readName:"Drone Location",tags:["get","drone","location"]},blockDroneCreateTree:{cat:"drone",label:"plant {tree:acacia} at drone",func:"blockDroneCreateTree",concept:"drone tool",readName:"Plant Tree at Drone",tags:"plant create place trees at drone location".split(" ")},blockDroneLineTo:{cat:"drone",label:"place {block:grass} blocks in a line from drone to {object:add location block here}",
1736func:"blockDroneLineTo",concept:"drone tool",readName:"Place Blocks in a Line from Drone",tags:"place blocks in a line from drone connected".split(" ")},blockDroneRect:{cat:"drone",label:"build {choice:filled} box at drone using {block:grass} with\nwidth:{number:1} height:{number:1} depth:{number:1}",func:"blockDroneRect",concept:"drone tool",readName:"Build Box at Drone",tags:"build;create;place;box;at;drone;square;cube;rectangle;walls;filled;hollow;shapes;build box at drone location;build rectangle at drone location;build square at drone location;build filled box at drone location;build hollow box at drone location;build filled square at drone location;build hollow square at drone location;build filled rectangle at drone location;
1736build hollow rectangle at drone location".split(";")},
1737blockDroneCylinder:{cat:"drone",label:"build {choice:filled} cylinder using {block:grass} at drone with\nradius:{number:1} length:{number:1}\nwall thickness:{number:2}\nfacing\n{choice:orientation}",func:"blockDroneCylinder",concept:"drone tool",readName:"Build Cylinder at Drone",tags:"build create place cylinder at drone tube round tunnel filled hollow circle radius shapes".split(" ")},blockDroneSphere:{cat:"drone",label:"build {choice:filled} sphere using {block:grass}\nat drone with radius:{number:6}",
1738func:"blockDroneSphere",concept:"drone tool",readName:"Build Sphere at Drone",tags:"build create place sphere at drone ball round sphereical shapes radius filled hollow".split(" ")},blockDroneHemisphere:{cat:"drone",label:"build {choice:filled} {choice:topbottom} hemisphere at drone\nusing {block:grass} with radius:{number:6}",func:"blockDroneHemisphere",concept:"drone tool",readName:"Build Hemisphere at Drone",tags:"build create place hemisphere at drone round semi filled hollow shapes".split(" ")},
1739blockDroneBuildWalls:{cat:"drone",label:"build walls with {block:grass} at drone with width:{number:1} height:{number:1} depth:{number:1}",func:"blockDroneBuildWalls",concept:"drone tool",readName:"Build Walls at Drone",tags:"build create place walls at drone rectangle hollow fence contain shapes cube".split(" ")},blockDronePrism:{cat:"drone",label:"build prism of {block:wood} at drone\nwith width:{number:1} depth:{number:1}",func:"blockDronePrism",concept:"drone tool",readName:"Build Prism at Drone",
1740tags:"build create place prism at drone shapes triangle pyriamid slope".split(" ")},blockDroneBlocktype:{cat:"drone",label:"write text at drone with {block:glowstone} blocks\n{string:message}{varargs}",func:"blockDroneBlocktype",concept:"drone tool",readName:"Write Text at Drone",tags:"build create place write text blocktype at drone message say quote".split(" ")},blockDroneSign:{cat:"drone",label:"build {sign:signpost} at drone with\nline 1: {string}\nline 2: {string}\nline 3: {string}\nline 4: {string}",
1741func:"blockDroneSign",concept:"drone tool",readName:"Build Sign at Drone",tags:"build create place write message say quote at drone".split(" ")},blockDroneDoor:{cat:"drone",label:"place {singledouble:single} {doortype:wooden_door} at drone",func:"blockDroneDoor",concept:"drone tool",readName:"Place Door at Drone",tags:"build place craft doors at drone".split(" ")},blockDroneBed:{cat:"drone",label:"place bed at drone",func:"blockDroneBed",concept:"drone tool",readName:"Place Bed at Drone",tags:["build",
1742"place","craft","beds","drone"]},blockDroneLadder:{cat:"drone",label:"place ladder at drone with height:{number:1}",func:"blockDroneLadder",concept:"drone tool",readName:"Place Ladder at Drone",tags:["build","place","craft","ladder","drone"]},blockDroneStairs:{cat:"drone",label:"place {stairtype:acacia_stairs} at drone\nwith width:{number:1} height:{number:1}",func:"blockDroneStairs",concept:"drone tool",readName:"Build Stairs at Drone",tags:["build","place","craft","Staircases","drone"]},blockDroneCottage:{cat:"drone",
1743label:"build cottage at drone",func:"blockDroneCottage",concept:"drone tool",readName:"Build Cottage at Drone",tags:"build place craft cottage house building drone village".split(" ")},blockDroneCottageRoad:{cat:"drone",label:"build a road at drone with {number:2} cottages",func:"blockDroneCottageRoad",concept:"drone tool",readName:"Build Cottage Road",tags:"build place craft cottage house building village drone lane city".split(" ")},mcjava_blockSoundPlay:{cat:"sound",label:"play sound {object:add location block here} {soundType:soundType} {note:note}",
1744func:"mcjava_blockSoundPlay",concept:"simple sound playing",readName:"Play Sound",tags:["play","sound","music","noise","twinkle"]},valueBlockIsBlockType:{cat:"block",label:"{object:add block here} is {block:grass}?",value:"boolean",func:"valueBlockIsBlockType",concept:"block types",readName:"Block Is",tags:["blocks","is","blocktype","block is"]},valueBlockGetBlockAt:{cat:"block",label:"get block at {object:add location block here}",value:"string",func:"valueBlockGetBlockAt",concept:"blocks",readName:"Get Block",
1745tags:["get","blocks","location"]},blockBlockSetFacingDirection:{cat:"block",label:"set {object:add block here} to face {botdir:east}",func:"blockBlockSetFacingDirection",concept:"blocks",readName:"Set Block Direction",tags:"set blocks facing direction pointing orientation rotation".split(" ")},valueBlockGetRelative:{cat:"block",label:"get block x:{number:0} y:{number:0} z:{number:0} away from {object:add block here}",value:"string",func:"valueBlockGetRelative",concept:"advanced math",readName:"Get Relative Block",
1746tags:"get blocks relative near x y z add".split(" ")},valueBlockGetGetBlockAt:{cat:"block",label:"get block at {object:add location block here}",value:"string",func:"valueBlockGetBlockAt",concept:"blocks",readName:"Get Block",tags:["get","blocks","location"]},valueBlockGetType:{cat:"block",label:"get type of {object:add block here}",value:"string",func:"valueBlockGetType",concept:"block types",readName:"Get Type",tags:"get type blocktype blocks objects entity entities is".split(" ")},blockBlockSetType:{cat:"block",
1747label:"set type of {object:add block here} to {block:stone}",func:"blockBlockSetType",concept:"block types",readName:"Set Blocktype",tags:["set","type","blocks","blocktype"]},blockBlockSetColor:{cat:"block",label:"set color of {object:add block here} to {dyecolor:white}",func:"blockBlockSetColor",concept:"blocks",readName:"Set Block Color",tags:["set","color","blocks","blockcolor"]},blockBlockSetFallingBlock:{cat:"block",label:"place falling block of {block:stone} at {object:add location block here}",
1748func:"blockBlockSetFallingBlock",concept:"entities",readName:"Place Falling Block",tags:"place put build craft set falling blocks entity entities".
1748split(" ")},valueBlockGetColor:{cat:"block",label:"get color of {object:add block here}",value:"string",func:"valueBlockGetColor",concept:"blocks",readName:"Block Color",tags:["get","blocks","colors"]},valueBlockIsEntityType:{cat:"player",label:"{object:add entity block here} is {entity:snowball}?",value:"boolean",func:"valueBlockIsEntityType",concept:"entities",
1749readName:"Entity Is",tags:["entity","entities","is","type","entity is"]},valueBlockGetEntityType:{cat:"player",label:"get type of {object:add entity block here}",value:"boolean",func:"valueBlockGetEntityType",concept:"entities",readName:"Entity Type",tags:["get","retrieve","entity","entities","type"]},blockEntitySetSheepColor:{cat:"player",label:"set color of sheep {object:add entity block here} to {dyecolor:blue}",func:"blockEntitySetSheepColor",concept:"entities",readName:"Set Sheep Color",tags:["set",
1750"sheep","colors"]},valueInventoryCreateItem:{cat:"inventory",label:"create {inventory:iron_sword}",value:"string",func:"valueInventoryCreateItem",concept:"inventory manipulation",readName:"Create Item",tags:"create craft build spawn inventory inventories items objects".split(" ")},valueInventoryGetInventory:{cat:"inventory",label:"get item at position {number:0} of inventory of {object:add player block here}",value:"string",func:"valueInventoryGetInventory",concept:"inventory manipulation",readName:"Get Inventory Item",
1751tags:"get inventory inventories items objects index".split(" ")},blockInventorySetInventory:{cat:"inventory",label:"set item at position {number:0} of inventory of {object:add player block here} to {object:add item block here}",func:"blockInventorySetInventory",concept:"inventory manipulation",readName:"Set Inventory Item",tags:"set inventory inventories items objects index".split(" ")},blockInventorySetDisplayName:{cat:"inventory",label:"set display name of {object:add item block here} to {string}",
1752func:"blockInventorySetDisplayName",concept:"inventory manipulation",readName:"Set Item Display Name",tags:"set items display name nickname custom".split(" ")},valueInventoryGetDisplayName:{cat:"inventory",label:"get display name of {object:add item block here}",value:"string",func:"valueInventoryGetDisplayName",concept:"inventory manipulation",readName:"Get Item Display Name",tags:"get items display name nickname custom".split(" ")},blockInventorySetLore:{cat:"inventory",label:"set lore of {object:add item block here} to {string}{varargs}",
1753func:"blockInventorySetLore",concept:"inventory manipulation",readName:"Set Item Lore",tags:["set","items","lore","custom"]},blockRemoveAllEntities:{cat:"player",label:"remove all {entity:animals}",func:"blockRemoveAllEntities",concept:"entities",readName:"Remove all Entities",tags:"remove delete destroy empty rid entity entities".split(" ")},blockRemoveEntity:{cat:"player",label:"remove {object:add entity block here}",func:"blockRemoveEntity",concept:"entities",readName:"Remove Entity",tags:"remove;delete;empty;rid;entity;entities;remove entities;delete entities".split(";")},
1754valueGetHealthOfEntity:{cat:"player",label:"get health of {object:add entity block here}",value:"number",func:"valueGetHealthOfEntity",concept:"entities",readName:"Get Health",tags:["get","retrieve","entity","entities","health"]},blockSetHealthOfEntity:{cat:"player",label:"set health of {object:add entity block here} to {number}%",func:"blockSetHealthOfEntity",concept:"entities",readName:"Set Health",tags:["set","entity","entities","health"]},valueGetKillerOfEntity:{cat:"player",label:"get killer of {object:add entity block here}",
1755value:"string",func:"valueGetKillerOfEntity",concept:"entities",readName:"Get Killer",tags:"get retreive killer of entity entities".split(" ")},valueIsEntityAlive:{cat:"player",label:"{object: add entity block here} is alive?",value:"boolean",func:"valueIsEntityAlive",concept:"entities",readName:"Is Alive?",tags:"get;retreive;is;alive;living;ok;health;is alive;entity is alive".split(";")},valueInventoryIsItem:{cat:"inventory",label:"{object:add item block here} is {inventory:coal}?",value:"boolean",
1756func:"valueInventoryIsItem",concept:"inventory manipulation",readName:"Item Is",tags:"items is entity entities type itemtype".split(" ")},registerTynkerVMHifiveButton:{hasFlap:!1,label:"{image:/ide/imgs/button-hifive.png} button {choice:boardbuttons} is pressed",cat:"hifive",func:"registerTynkerVMHifiveButton"},blockTynkerVMHifiveSerialPrint:{label:"{image:/ide/imgs/button-hifive.png} serial print {string:message} {varargs}",cat:"hifive",func:"blockTynkerVMHifiveSerialPrint"},valueTynkerVMHifiveSerialRead:{value:"string",
1757label:"{image:/ide/imgs/button-hifive.png} serial read",cat:"hifive",func:"valueTynkerVMHifiveSerialRead"},blockTynkerVMHifiveWait:{label:"{image:/ide/imgs/button-hifive.png} wait {number:1000} ms",cat:"hifive",func:"blockTynkerVMHifiveWait"},blockTynkerVMHifiveSetLED:{label:"{image:/ide/imgs/button-hifive.png} set LED x:{number:0} y:{number:0} {boolean}",cat:"hifive",func:"blockTynkerVMHifiveSetLED"},blockTynkerVMHifiveSetLEDRGB:{label:"{image:/ide/imgs/button-hifive.png} set LED x:{number:0} y:{number:0} to {color}",
1758cat:"hifive",func:"blockTynkerVMHifiveSetLEDRGB"},valueTynkerVMHifiveLEDAt:{value:"number",label:"{image:/ide/imgs/button-hifive.png} get LED at x:{number:0} y:{number:0}",cat:"hifive",func:"valueTynkerVMHifiveLEDAt"},blockTynkerVMHifiveSetLEDs:{label:"{image:/ide/imgs/button-hifive.png} set display\n{bit:false} {bit:false} {bit:false} {bit:false} {bit:false}\n{bit:false} {bit:false} {bit:false} {bit:false} {bit:false}\n{bit:false} {bit:false} {bit:false} {bit:false} {bit:false}\n{bit:false} {bit:false} {bit:false} {bit:false} {bit:false}\n{bit:false} {bit:false} {bit:false} {bit:false} {bit:false}",
1759cat:"hifive",func:"blockTynkerVMHifiveSetLEDs"},blockTynkerVMHifiveSet6x8LEDs:{label:"{image:/ide/imgs/button-hifive.png} set display\n{bit:false} {bit:false} {bit:false} {bit:false} {bit:false} {bit:false} {bit:false} {bit:false}\n{bit:false} {bit:false} {bit:false} {bit:false} {bit:false} {bit:false} {bit:false} {bit:false}\n{bit:false} {bit:false} {bit:false} {bit:false} {bit:false} {bit:false} {bit:false} {bit:false}\n{bit:false} {bit:false} {bit:false} {bit:false} {bit:false} {bit:false} {bit:false} {bit:false}\n{bit:false} {bit:false} {bit:false} {bit:false} {bit:false} {bit:false} {bit:false} {bit:false}\n{bit:false} {bit:false} {bit:false} {bit:false} {bit:false} {bit:false} {bit:false} {bit:false}",
1760cat:"hifive",func:"blockTynkerVMHifiveSet6x8LEDs"},blockTynkerVMHifiveSet6x8LEDsRGB:{label:"{image:/ide/imgs/button-hifive.png} set display colors {button:pickcolor}\n{bitcolor} {bitcolor} {bitcolor} {bitcolor} {bitcolor} {bitcolor} {bitcolor} {bitcolor}\n{bitcolor} {bitcolor} {bitcolor} {bitcolor} {bitcolor} {bitcolor} {bitcolor} {bitcolor}\n{bitcolor} {bitcolor} {bitcolor} {bitcolor} {bitcolor} {bitcolor} {bitcolor} {bitcolor}\n{bitcolor} {bitcolor} {bitcolor} {bitcolor} {bitcolor} {bitcolor} {bitcolor} {bitcolor}\n{bitcolor} {bitcolor} {bitcolor} {bitcolor} {bitcolor} {bitcolor} {bitcolor} {bitcolor}\n{bitcolor} {bitcolor} {bitcolor} {bitcolor} {bitcolor} {bitcolor} {bitcolor} {bitcolor}",
1761cat:"hifive",func:"blockTynkerVMHifiveSet6x8LEDsRGB"},blockTynkerVMHifiveClearLEDs:{label:"{image:/ide/imgs/button-hifive.png} clear display",cat:"hifive",func:"blockTynkerVMHifiveClearLEDs"},blockTynkerVMHifiveSetLEDData:{label:"{image:/ide/imgs/button-hifive.png} set LEDs to {number}",cat:"hifive",func:"blockTynkerVMHifiveSetLEDData"},valueTynkerVMHifiveLEDData:{value:"string",label:"{image:/ide/imgs/button-hifive.png} display\n{bit:false} {bit:false} {bit:false} {bit:false} {bit:false}\n{bit:false} {bit:false} {bit:false} {bit:false} {bit:false}\n{bit:false} {bit:false} {bit:false} {bit:false} {bit:false}\n{bit:false} {bit:false} {bit:false} {bit:false} {bit:false}\n{bit:false} {bit:false} {bit:false} {bit:false} {bit:false}",
1762cat:"hifive",func:"valueTynkerVMHifiveLEDData"},valueTynkerVMHifiveLEDRGBData:{value:"string",label:"{image:/ide/imgs/button-hifive.png} display colors {button:pickcolor}\n{bitcolor} {bitcolor} {bitcolor} {bitcolor} {bitcolor} {bitcolor} {bitcolor} {bitcolor}\n{bitcolor} {bitcolor} {bitcolor} {bitcolor} {bitcolor} {bitcolor} {bitcolor} {bitcolor}\n{bitcolor} {bitcolor} {bitcolor} {bitcolor} {bitcolor} {bitcolor} {bitcolor} {bitcolor}\n{bitcolor} {bitcolor} {bitcolor} {bitcolor} {bitcolor} {bitcolor} {bitcolor} {bitcolor}\n{bitcolor} {bitcolor} {bitcolor} {bitcolor} {bitcolor} {bitcolor} {bitcolor} {bitcolor}\n{bitcolor} {bitcolor} {bitcolor} {bitcolor} {bitcolor} {bitcolor} {bitcolor} {bitcolor}",
1763cat:"hifive",func:"valueTynkerVMHifiveLEDRGBData"},valueTynkerVMHifiveLEDImage:{value:"string",label:"{image:/ide/imgs/button-hifive.png} image {bitImages}",cat:"hifive",func:"valueTynkerVMHifiveLEDImage"},valueTynkerVMHifiveButtonPressed:{value:"boolean",label:"{image:/ide/imgs/button-hifive.png} is button {choice:boardbuttons} pressed?",cat:"hifive",func:"valueTynkerVMHifiveButtonPressed"},valueTynkerVMHifiveButtonWasPressed:{value:"boolean",label:"{image:/ide/imgs/button-hifive.png} was button {choice:boardbuttons} pressed?",
1764cat:"hifive",func:"valueTynkerVMHifiveButtonWasPressed"},registerTynkerVMHifiveTouchingPin:{hasFlap:!1,label:"{image:/ide/imgs/button-hifive.png} when touching pin {number}",cat:"hifive",func:"registerTynkerVMHifiveTouchingPin"},registerTynkerVMHifiveAccelGesture:{hasFlap:!1,label:"{image:/ide/imgs/button-hifive.png} when {choice:gesture}",cat:"hifive",func:"registerTynkerVMHifiveAccelGesture"},valueTynkerVMHifiveAccel:{value:"number",label:"{image:/ide/imgs/button-hifive.png} get accelerometer {choice:axis}",
1765cat:"hifive",func:"valueTynkerVMHifiveAccel"},blockTynkerVMHifiveMagnetometerCalibrate:{label:"{image:/ide/imgs/button-hifive.png} compass calibration {choice:calibration}",cat:"hifive",func:"blockTynkerVMHifiveMagnetometerCalibrate"},valueTynkerVMHifiveMagnetometerHeading:{value:"number",label:"{image:/ide/imgs/button-hifive.png} get compass heading in degrees",cat:"hifive",func:"valueTynkerVMHifiveMagnetometerHeading"},valueTynkerVMHifiveMagnetometerHeadingCardinal:{value:"number",label:"{image:/ide/imgs/button-hifive.png} get compass heading",
1766cat:"hifive",func:"valueTynkerVMHifiveMagnetometerHeadingCardinal"},valueTynkerVMHifiveMagnetometer:{value:"number",label:"{image:/ide/imgs/button-hifive.png} get compass {choice:axis}",cat:"hifive",func:"valueTynkerVMHifiveMagnetometer"},valueTynkerVMHifiveTemperature:{value:"number",label:"{image:/ide/imgs/button-hifive.png} get temperature",cat:"hifive",func:"valueTynkerVMHifiveTemperature"},valueTynkerVMHifiveLightVisible:{value:"number",label:"{image:/ide/imgs/button-hifive.png} get visible light",
1767cat:"hifive",func:"valueTynkerVMHifiveLightVisible"},valueTynkerVMHifiveLightIR:{value:"number",label:"{image:/ide/imgs/button-hifive.png} get infrared light",cat:"hifive",func:"valueTynkerVMHifiveLightIR"},blockTynkerVMHifiveType:{label:"{image:/ide/imgs/button-hifive.png} type {string} {varargs}",cat:"hifive",func:"blockTynkerVMHifiveType"},blockTynkerVMHifiveTypeLine:{label:"{image:/ide/imgs/button-hifive.png} type line {string} {varargs}",cat:"hifive",func:"blockTynkerVMHifiveTypeLine"},blockTynkerVMHifivePressKey:{label:"{image:/ide/imgs/button-hifive.png} press key {choice:keyboardkeys}",
1768cat:"hifive",func:"blockTynkerVMHifivePressKey"},blockTynkerVMHifiveHoldKey:{label:"{image:/ide/imgs/button-hifive.png} hold key {choice:keyboardkeys}",cat:"hifive",func:"blockTynkerVMHifiveHoldKey"},blockTynkerVMHifiveReleaseKey:{label:"{image:/ide/imgs/button-hifive.png} release key {choice:keyboardkeys}",cat:"hifive",func:"blockTynkerVMHifiveReleaseKey"},blockTynkerVMHifiveMouseMove:{label:"{image:/ide/imgs/button-hifive.png} move mouse x:{number} y:{number}",cat:"hifive",func:"blockTynkerVMHifiveMouseMove"},
1769blockTynkerVMHifiveMousePress:{label:"{image:/ide/imgs/button-hifive.png} press mouse button {choice:mousebuttons}",cat:"hifive",func:"blockTynkerVMHifiveMousePress"},blockTynkerVMHifiveMouseHold:{label:"{image:/ide/imgs/button-hifive.png} hold mouse button {choice:mousebuttons}",cat:"hifive",func:"blockTynkerVMHifiveMouseHold"},blockTynkerVMHifiveMouseRelease:{label:"{image:/ide/imgs/button-hifive.png} release mouse button {choice:mousebuttons}",cat:"hifive",func:"blockTynkerVMHifiveMouseRelease"},
1770blockTynkerVMHifivePersistSet:{label:"{image:/ide/imgs/button-hifive.png} write {string} to {choice:fileslot}",cat:"hifive",func:"blockTynkerVMHifivePersistSet"},valueTynkerVMHifivePersistGet:{value:"string",label:"{image:/ide/imgs/button-hifive.png} read from {choice:fileslot}",cat:"hifive",func:"valueTynkerVMHifivePersistGet"},blockTynkerVMHifiveRegWrite:{label:"{image:/ide/imgs/button-hifive.png} write {string} to register {number:0}",cat:"hifive",func:"blockTynkerVMHifiveRegWrite"},valueTynkerVMHifiveRegRead:{value:"string",
1771label:"{image:/ide/imgs/button-hifive.png} read from register {number:0}",cat:"hifive",func:"valueTynkerVMHifiveRegRead"},valueTynkerVMHifiveSystemTime:{value:"number",label:"{image:/ide/imgs/button-hifive.png} get system time",cat:"hifive",func:"valueTynkerVMHifiveSystemTime"},blockTynkerVMHifiveSay:{label:"{image:/ide/imgs/button-hifive.png} say {string} {varargs}",cat:"hifive",func:"blockTynkerVMHifiveSay"},blockTynkerVMHifiveSayAndWait:{label:"{image:/ide/imgs/button-hifive.png} say {string} {varargs} and wait",
1772cat:"hifive",func:"blockTynkerVMHifiveSayAndWait"},registerTynkerVMHifiveRadio:{hasFlap:!1,label:"{image:/ide/imgs/button-hifive.png} when I receive radio messages",cat:"hifive",func:"registerTynkerVMHifiveRadio"},blockTynkerVMHifiveRadioSend:{label:"{image:/ide/imgs/button-hifive.png} broadcast radio message {string} {varargs}",cat:"hifive",func:"blockTynkerVMHifiveRadioSend"},valueTynkerVMHifiveRadioReceive:{value:"string",label:"{image:/ide/imgs/button-hifive.png}
1772 receive radio message",cat:"hifive",
1773func:"valueTynkerVMHifiveRadioReceive"},valueTynkerVMHifiveRadioSignalStrength:{value:"number",label:"{image:/ide/imgs/button-hifive.png} radio signal strength",cat:"hifive",func:"valueTynkerVMHifiveRadioSignalStrength"},blockTynkerVMHifiveRadioSetGroup:{label:"{image:/ide/imgs/button-hifive.png} set radio group {number:0} (0-255)",cat:"hifive",func:"blockTynkerVMHifiveRadioSetGroup"},valueTynkerVMHifiveRadioGroup:{value:"number",label:"{image:/ide/imgs/button-hifive.png} radio group",cat:"hifive",
1774func:"valueTynkerVMHifiveRadioGroup"},blockTynkerVMHifiveRadioSetPower:{label:"{image:/ide/imgs/button-hifive.png} set radio power {number:0} (0-7)",cat:"hifive",func:"blockTynkerVMHifiveRadioSetPower"},blockTynkerVMHifiveRadioSetChannel:{label:"{image:/ide/imgs/button-hifive.png} set radio channel {number:0} (0-83)",cat:"hifive",func:"blockTynkerVMHifiveRadioSetChannel"},blockTynkerVMHifiveIOSet:{label:"{image:/ide/imgs/button-hifive.png} set pin {number:0} to {boolean}",cat:"hifive",func:"blockTynkerVMHifiveIOSet"},
1775valueTynkerVMHifiveIOGet:{value:"boolean",label:"{image:/ide/imgs/button-hifive.png} is pin {number:0} on?",cat:"hifive",func:"valueTynkerVMHifiveIOGet"},blockTynkerVMHifiveAnalogSet:{label:"{image:/ide/imgs/button-hifive.png} set value on pin {number:0} to {number}",cat:"hifive",func:"blockTynkerVMHifiveAnalogSet"},valueTynkerVMHifiveAnalogGet:{value:"number",label:"{image:/ide/imgs/button-hifive.png} get value on pin {number:0}",cat:"hifive",func:"valueTynkerVMHifiveAnalogGet"},blockTynkerVMHifiveI2CSet:{label:"{image:/ide/imgs/button-hifive.png} set device {number:0}, register {number:0} to value {number:0}",
1776cat:"hifive",func:"blockTynkerVMHifiveI2CSet"},valueTynkerVMHifiveI2CGet:{value:"number",label:"{image:/ide/imgs/button-hifive.png} get value of device {number:0}, register {number:0}",cat:"hifive",func:"valueTynkerVMHifiveI2CGet"},blockTynkerVMHifiveSPISend:{label:"{image:/ide/imgs/button-hifive.png} SPI send value {number:0}",cat:"hifive",func:"blockTynkerVMHifiveSPISend"},valueTynkerVMHifiveSPIRecv:{value:"number",label:"{image:/ide/imgs/button-hifive.png} SPI receive value",cat:"hifive",func:"valueTynkerVMHifiveSPIRecv"},
1777valueTynkerVMHifiveInputNumber:{value:"number",label:"{image:/ide/imgs/button-hifive.png} ask for number",cat:"hifive",func:"valueTynkerVMHifiveInputNumber"},valueTynkerVMHifiveMapValue:{value:"string",label:"{image:/ide/imgs/button-hifive.png} map value {number:0}\nfrom low {number:0}\nhigh {number:1023}\nto low {number:0}\nhigh {number:4}",cat:"hifive",func:"valueTynkerVMHifiveMapValue"},blockTynkerVMHifiveSetTempo:{label:"{image:/ide/imgs/button-hifive.png} set tempo to {number:120} beats per minute",
1778cat:"hifive",func:"blockTynkerVMHifiveSetTempo"},blockTynkerVMHifiveRest:{label:"{image:/ide/imgs/button-hifive.png} play rest for {number:4} beats",cat:"hifive",func:"blockTynkerVMHifiveRest"},blockTynkerVMHifivePlayNote:{label:"{image:/ide/imgs/button-hifive.png} play note {number:40} on pin:{number:0} for {number:1} beats",cat:"hifive",func:"blockTynkerVMHifivePlayNote"},blockTynkerVMHifivePlaySong:{label:"{image:/ide/imgs/button-hifive.png} play song {string} on pin:{number:0}",cat:"hifive",func:"blockTynkerVMHifivePlaySong"},
1779blockTynkerVMHifivePlayFrequency:{label:"{image:/ide/imgs/button-hifive.png} play {number:261.6}Hz on pin:{number:0} for {number:1000}ms",cat:"hifive",func:"blockTynkerVMHifivePlayFrequency"},valueTynkerVMHifiveSpriteCreate:{value:"object",label:"{image:/ide/imgs/button-hifive.png} create sprite at x:{number:2} y:{number:2}",cat:"hifive",func:"valueTynkerVMHifiveSpriteCreate"},valueTynkerVMHifiveSpriteClone:{value:"object",label:"{image:/ide/imgs/button-hifive.png} clone sprite {variable}",cat:"hifive",
1780func:"valueTynkerVMHifiveSpriteClone"},blockTynkerVMHifiveSpriteDelete:{label:"{image:/ide/imgs/button-hifive.png} delete sprite {variable}",cat:"hifive",func:"blockTynkerVMHifiveSpriteDelete"},blockTynkerVMHifiveSpriteSetImage:{label:"{image:/ide/imgs/button-hifive.png} set sprite {variable} image to {number}",cat:"hifive",func:"blockTynkerVMHifiveSpriteSetImage"},blockTynkerVMHifiveSpriteSetProperty:{label:"{image:/ide/imgs/button-hifive.png} set sprite {variable} property {choice:bitSpriteProperties} to {number:0}",
1781cat:"hifive",func:"blockTynkerVMHifiveSpriteSetProperty"},blockTynkerVMHifiveSpriteChangeProperty:{label:"{image:/ide/imgs/button-hifive.png} change sprite {variable} property {choice:bitSpriteProperties} by {number:0}",cat:"hifive",func:"blockTynkerVMHifiveSpriteChangeProperty"},valueTynkerVMHifiveSpriteProperty:{value:"number",label:"{image:/ide/imgs/button-hifive.png} get sprite {variable} property {choice:bitSpriteProperties}",cat:"hifive",func:"valueTynkerVMHifiveSpriteProperty"},blockTynkerVMHifiveSpriteMoveBy:{label:"{image:/ide/imgs/button-hifive.png} move sprite {variable} by {number:1}",
1782cat:"hifive",func:"blockTynkerVMHifiveSpriteMoveBy"},blockTynkerVMHifiveSpriteMoveTo:{label:"{image:/ide/imgs/button-hifive.png} move sprite {variable} to X:{number:2} Y:{number:2}",cat:"hifive",func:"blockTynkerVMHifiveSpriteMoveTo"},blockTynkerVMHifiveSpriteTurnCW:{label:"{image:/ide/imgs/button-hifive.png} turn sprite {variable} {image:/ide/imgs/button-cw.png} by {angle:90} degrees",cat:"hifive",func:"blockTynkerVMHifiveSpriteTurnCW"},blockTynkerVMHifiveSpriteTurnCCW:{label:"{image:/ide/imgs/button-hifive.png} turn sprite {variable} {image:/ide/imgs/button-ccw.png} by {angle:90} degrees",
1783cat:"hifive",func:"blockTynkerVMHifiveSpriteTurnCCW"},blockTynkerVMHifiveSpritePointInDirection:{label:"{image:/ide/imgs/button-hifive.png} point sprite {variable} in direction {angle:90} degrees",cat:"hifive",func:"blockTynkerVMHifiveSpritePointInDirection"},valueTynkerVMHifiveSpriteIsTouching:{value:"boolean",label:"{image:/ide/imgs/button-hifive.png} sprite {variable} touching {variable}?",cat:"hifive",func:"valueTynkerVMHifiveSpriteIsTouching"},valueTynkerVMHifiveSpriteIsTouchingEdge:{value:"boolean",
1784label:"{image:/ide/imgs/button-hifive.png} sprite {variable} touching edge?",cat:"hifive",func:"valueTynkerVMHifiveSpriteIsTouchingEdge"},blockTynkerVMHifiveSpritePenUp:{label:"{image:/ide/imgs/button-hifive.png} sprite {variable} pen up",cat:"hifive",func:"blockTynkerVMHifiveSpritePenUp"},blockTynkerVMHifiveSpritePenDown:{label:"{image:/ide/imgs/button-hifive.png} sprite {variable} pen down",cat:"hifive",func:"blockTynkerVMHifiveSpritePenDown"},blockTynkerVMHifivePenClear:{label:"{image:/ide/imgs/button-hifive.png} clear drawing",
1785cat:"hifive",func:"blockTynkerVMHifivePenClear"}
1785,blockTynkerVMHifiveSetBackgroundColor:{label:"{image:/ide/imgs/button-hifive.png} set background color to {color}?",cat:"hifive",func:"blockTynkerVMHifiveSetBackgroundColor"},valueTynkerVMHifiveBackgroundColor:{value:"number",label:"{image:/ide/imgs/button-hifive.png} get background color",cat:"hifive",func:"valueTynkerVMHifiveBackgroundColor"},blockTynkerVMHifiveSetPenColor:{label:"{image:/ide/imgs/button-hifive.png} set sprite {variable} pen color to {color}?",
1786cat:"hifive",func:"blockTynkerVMHifiveSetPenColor"},valueTynkerVMHifivePenColor:{value:"number",label:"{image:/ide/imgs/button-hifive.png} get sprite {variable} pen color",cat:"hifive",func:"valueTynkerVMHifivePenColor"},blockTynkerVMHifiveSetFontColor:{label:"{image:/ide/imgs/button-hifive.png} set font color to {color}?",cat:"hifive",func:"blockTynkerVMHifiveSetFontColor"},valueTynkerVMHifiveFontColor:{value:"number",label:"{image:/ide/imgs/button-hifive.png} get font color",cat:"hifive",func:"valueTynkerVMHifiveFontColor"},
1787valueTynkerVMHifiveValueColor:{value:"number",label:"{image:/ide/imgs/button-hifive.png}  {color}",cat:"hifive",func:"valueTynkerVMHifiveValueColor"},valueTynkerVMHifiveSetHue:{value:"number",label:"{image:/ide/imgs/button-hifive.png} set hue of {color} to {number}",cat:"hifive",func:"valueTynkerVMHifiveSetHue"},valueTynkerVMHifiveChangeHue:{value:"number",label:"{image:/ide/imgs/button-hifive.png} change hue of {color} by {number}",cat:"hifive",func:"valueTynkerVMHifiveChangeHue"},valueTynkerVMHifiveSetShade:{value:"number",
1788label:"{image:/ide/imgs/button-hifive.png} set shade of {color} to {number}",cat:"hifive",func:"valueTynkerVMHifiveSetShade"},valueTynkerVMHifiveChangeShade:{value:"number",label:"{image:/ide/imgs/button-hifive.png} change shade of {color} by {number}",cat:"hifive",func:"valueTynkerVMHifiveChangeShade"},blockTynkerVMHifiveNetConnect:{label:"{image:/ide/imgs/button-hifive.png} connect to WiFi\nnamed {string}\nwith password {string}",cat:"hifive",func:"blockTynkerVMHifiveNetConnect"},blockTynkerVMHifiveNetDisconnect:{label:"{image:/ide/imgs/button-hifive.png} disconnect from WiFi",
1789cat:"hifive",func:"blockTynkerVMHifiveNetDisconnect"},valueTynkerVMHifiveNetConnected:{value:"number",label:"{image:/ide/imgs/button-hifive.png} is WiFi connected?",cat:"hifive",func:"valueTynkerVMHifiveNetConnected"},registerTynkerVMHifiveHttpServer:{hasFlap:!1,label:"{image:/ide/imgs/button-hifive.png} HTTP receive {param:request} with {param:data}",cat:"hifive",func:"registerTynkerVMHifiveHttpServer"},blockTynkerVMHifiveHttpSend:{label:"{image:/ide/imgs/button-hifive.png} HTTP send {string}",cat:"hifive",
1790func:"blockTynkerVMHifiveHttpSend"},valueTynkerVMHifiveDataParse:{value:"string",label:"{image:/ide/imgs/button-hifive.png} with data {string} get value at path {string}",cat:"hifive",func:"valueTynkerVMHifiveDataParse"},valueTynkerVMHifiveUrlParse:{value:"string",label:"{image:/ide/imgs/button-hifive.png} with URL {string} get {choice:urlpart}",cat:"hifive",func:"valueTynkerVMHifiveUrlParse"},valueTynkerVMHifiveUrlParseQuery:{value:"string",label:"{image:/ide/imgs/button-hifive.png} with URL query {string} get value for {string}",
1791cat:"hifive",func:"valueTynkerVMHifiveUrlParseQuery"},valueTynkerVMHifiveFetchUrl:{value:"string",label:"{image:/ide/imgs/button-hifive.png} fetch data from URL {string}",cat:"hifive",func:"valueTynkerVMHifiveFetchUrl"},registerTynkerVMHifiveUdpListener:{hasFlap:!1,label:"{image:/ide/imgs/button-hifive.png} UDP receive broadcasts {param:message}",cat:"hifive",func:"registerTynkerVMHifiveUdpListener"},blockTynkerVMHifiveUdpBroadcast:{label:"{image:/ide/imgs/button-hifive.png} UDP broadcast message {string}",
1792cat:"hifive",func:"blockTynkerVMHifiveUdpBroadcast"},registerTynkerVMHifiveConfigure:{hasFlap:!1,label:"{image:/ide/imgs/button-hifive.png} configure",cat:"hifive",func:"registerTynkerVMHifiveConfigure"},blockTynkerVMHifiveConfigure:{label:"{image:/ide/imgs/button-hifive.png} configure {choice:configs} to {string}",cat:"hifive",func:"blockTynkerVMHifiveConfigure"}}
1792,g_varBlocks=[g_steps.blockVarPropSet,g_steps.valueVarPropGet,g_steps.blockVarSet,g_steps.blockVarChangeBy],g_listBlocks=[g_steps.blockListAdd,
1793g_steps.blockListDel,g_steps.blockListInsert,g_steps.blockListReplace,g_steps.valueListItem,g_steps.valueListLength,g_steps.valueListContains],g_objBlocks=[g_steps.blockObjSet,g_steps.blockObjDel,g_steps.valueObjGet,g_steps.valueObjLength,g_steps.valueObjKeys,g_steps.valueObjValues,g_steps.valueListNew,g_steps.valueObjNew],g_palette=[{label:"Common",cat:"common",items:[g_steps.registerFlagTrigger,g_steps.registerKeyTrigger,g_steps.registerSpriteTrigger,g_steps.registerTiltTrigger,g_steps.registerScreenTrigger,
1794g_steps.blockMotionMove,g_steps.blockMotionPointTowards,g_steps.blockMotionPointAngle,g_steps.blockMotionBounceOnEdge,g_steps.blockMotionGoTowards,g_steps.blockMotionTurnCW,g_steps.blockMotionTurnCCW,g_steps.registerTrigger,g_steps.valueSensingTouchingSprite,g_steps.blockControlWait,g_steps.blockControlRepeat,g_steps.blockControlForever,g_steps.blockLooksNextCostume,g_steps.blockLooksSwitchCostume,g_steps.blockLooksShow,g_steps.blockLooksHide,g_steps.blockSoundPlayUntilDone,g_steps.blockLooksSayFor,
1795g_steps.blockMotionRotationStyle,g_steps.valueSensingKeyPressed,g_steps.blockControlIf,g_steps.valueControlIfElse,g_steps.valueSensingMouseDown,g_steps.valueOpNot,g_steps.blockLooksChangeSizeBy,g_steps.blockLooksSetSize,g_steps.blockMotionGlide,g_steps.blockMotionGoTo,g_steps.blockMotionChangeXBy,g_steps.blockMotionChangeYBy,g_steps.valueOpRandom,g_steps.blockAnimationSimpleSwitchCostume,g_steps.blockAnimationSimpleSwitchCostumeAndWait,g_steps.blockLooksChangeEffect,g_steps.blockLooksClearEffects,
1796g_steps.blockPenDown,g_steps.blockPenUp,g_steps.blockPenSetColor,g_steps.blockPenSetSize,g_steps.blockPenClear,g_steps.blockPenStamp,g_steps.valueSensingTouchingColor,g_steps.blockInlineComment]},{label:"Events",cat:"events",items:[{label:"Event Handlers",items:[g_steps.registerFlagTrigger,g_steps.registerSpriteTrigger,g_steps.registerKeyTrigger,g_steps.registerBroadcastTrigger,g_steps.registerTrigger,g_steps.registerCloned,g_steps.registerBackgroundChange]},{label:"Mobile Event Handlers",items:[g_steps.registerTiltTrigger,
1797g_steps.registerScreenTrigger]},{label:"Events",items:[g_steps.blockControlBroadcast,g_steps.blockControlBroadcastWait,g_steps.blockControlPostMessage,g_steps.blockControlPostMessageAndWait,g_steps.valueControlMessageValue,g_steps.valueControlMessageSource]},{label:"Documentation",items:[g_steps.blockComment,g_steps.blockInlineComment]}]},{label:"Control",cat:"flow",items:[{label:"Conditionals",items:[g_steps.blockControlIf,g_steps.valueControlIfElse,g_steps.blockControlIfElse]},{label:"Loops",items:[g_steps.blockControlForever,
1798g_steps.blockControlRepeat,g_steps.blockControlForeverIf,g_steps.blockControlWaitUntil,g_steps.blockControlWhile,g_steps.blockControlRepeatUntil,g_steps.blockControlFor,g_steps.blockControlForEach,g_steps.blockControlBreak,g_steps.blockControlContinue]},{label:"Cloning",items:[g_steps.blockControlCloneActor,g_steps.valueControlLastClonedActor,g_steps.valueControlCloneName,g_steps.valueControlIsClone,g_steps.blockControlDeleteActor]},{label:"Delay",items:[g_steps.blockControlWait]},{label:"Debugging",
1799items:[g_steps.blockControlDebugBreak,g_steps.blockControlDebugBreakOn]},{label:"Advanced",items:[g_steps.blockControlStop]}]},{label:"Motion",cat:"motion",items:[{label:"Movement",items:[g_steps.blockMotionMove,g_steps.blockMotionGoTo,g_steps.blockMotionGoTowards,g_steps.blockMotionGlide,g_steps.blockMotionBounceOnEdge]},{label:"Position",items:[g_steps.blockMotionChangeXBy,g_steps.blockMotionSetX,g_steps.blockMotionChangeYBy,g_steps.blockMotionSetY,g_steps.valueMotionXPosition,g_steps.valueMotionYPosition]},
1800{label:"Rotation",items:[g_steps.blockMotionRotationStyle,g_steps.blockMotionTurnCW,g_steps.blockMotionTurnCCW,g_steps.blockMotionPointDirection,g_steps.blockMotionPointAngle,g_steps.blockMotionPointTowards,g_steps.valueMotionDirection,g_steps.valueMotionAngle]},{label:"Advanced",items:[g_steps.blockMotionSetAnchor,g_steps.blockMotionFollowActor]},g_steps.blockMotionMotorOnFor,g_steps.blockMotionMotorOn,g_steps.blockMotionMotorOff,g_steps.blockMotionMotorPower,g_steps.blockMotionMotorDirection]},
1801{label:"Animation",cat:"animation",items:[{label:"Basic Animation",items:[g_steps.blockAnimationSimpleSwitchCostume,g_steps.blockAnimationSimpleSwitchCostumeAndWait,g_steps.blockAnimationSetSpeed,g_steps.blockAnimationAnimate]},{label:"Character Parts",items:[g_steps.blockLooksSetCharacterPart,g_steps.valueLooksGetCharacterPart]},{label:"Animation Control",items:[g_steps.blockAnimationWaitFor,g_steps.blockAnimationStop,g_steps.valueAnimationTime,g_steps.valueAnimationIsRunning,g_steps.registerAnimationDone]},
1802{label:"Advanced Animation",items:[g_steps.blockAnimationSimpleMoveBy,g_steps.blockAnimationSimpleMoveTo,g_steps.blockAnimationSimpleScaleBy,g_steps.blockAnimationSimpleScaleTo,g_steps.blockAnimationSimpleRotateBy,g_steps.blockAnimationSimpleRotateTo,g_steps.blockAnimationSimpleBezierBy,g_steps.blockAnimationSimpleBezierTo,g_steps.blockAnimationSimpleEffectBy,g_steps.blockAnimationSimpleEffectTo,g_steps.blockAnimationEasing]}]},{label:"Looks",cat:"looks",items:[{label:"Costumes",items:[g_steps.blockLooksSwitchCostume,
1803g_steps.blockLooksNextCostume,g_steps.blockLooksFirstCostumeInGroup,g_steps.blockLooksNextCostumeInGroup,g_steps.valueLooksCostumeNum,g_steps.valueLooksCostumeName,g_steps.blockLooksBackgroun
1803dColor,g_steps.blockLooksSwitchBackground,g_steps.blockLooksSwitchBackgroundAndWait,g_steps.blockLooksNextBackground,g_steps.blockLooksFirstBackgroundInGroup,g_steps.blockLooksNextBackgroundInGroup,g_steps.valueLooksBackground,g_steps.valueLooksBackgroundName]},{label:"Speech Bubbles",items:[g_steps.blockLooksSayStyledFor,
1804g_steps.blockLooksSayStyled,g_steps.blockLooksSetBubble,g_steps.blockLooksSayFor,g_steps.blockLooksSay,g_steps.blockLooksThinkFor,g_steps.blockLooksThink,g_steps.blockLooksSetLabel]},{label:"Levels",items:[g_steps.blockLooksViewportCamera,g_steps.blockLooksSetLevel,g_steps.blockLooksSetLevelWithActors,g_steps.valueLooksGetLevel,g_steps.valueLooksGetLevelNum,g_steps.valueLooksNumLevels,g_steps.valueLooksGetTileAt,g_steps.valueLooksGetTileAtPoint,g_steps.blockLooksSetTileAt,g_steps.blockLooksSetTileAtPoint]},
1805{label:"Layers",items:[g_steps.blockLooksLayer,g_steps.valueLooksLayer,g_steps.blockLooksGoFront,g_steps.blockLooksGoBack,g_steps.blockLooksMoveBack,g_steps.blockLooksMoveFront]},{label:"Visibility",items:[g_steps.blockLooksShow,g_steps.blockLooksHide,g_steps.valueLooksIsHidden,g_steps.blockLooksSetSize,g_steps.blockLooksChangeSizeBy,g_steps.valueLooksSize]},{label:"Special Effects",items:[g_steps.blockLooksChangeEffect,g_steps.blockLooksSetEffect,g_steps.blockLooksClearEffects]},{label:"Advanced",
1806items:[g_steps.blockLooksTakeScreenshot]}]},{label:"Sensing",cat:"sensing",items:[{label:"Detection",items:[g_steps.valueSensingTouchingSprite,g_steps.valueSensingTouchingCloneOf,g_steps.valueSensingTouchedActorName,g_steps.valueSensingTouchingColor,g_steps.valueSensingSeeColor,g_steps.valueSensingDistanceToSprite]},{label:"User Input",items:[g_steps.blockSensingAskAndWait,g_steps.blockSensingAskChoices,g_steps.valueSensingAnswer,g_steps.valueSensingMouseX,g_steps.valueSensingMouseY,g_steps.valueSensingMouseDown,
1807g_steps.valueSensingKeyPressed]},{label:"Accelerometer",items:[g_steps.valueSensingTiltAngle,g_steps.valueSensingTiltAmount,g_steps.valueSensingAccelerometerX,g_steps.valueSensingAccelerometerY]},{label:"Time",items:[g_steps.blockSensingResetTimer,g_steps.valueSensingTimer,g_steps.valueSensingDateTime]},{label:"Actor Properties",items:[g_steps.blockSensingSpriteProperty,g_steps.valueSensingSpriteProperty,g_steps.valueSensingActorName,g_steps.valueSensingActorNameAt,g_steps.valueSensingNumActors]},
1808{label:"User Properties",items:[g_steps.valueSensingUserId,g_steps.valueSensingUserFirstName]},{label:"Screen Size",items:[g_steps.valueSensingScreenLeft,g_steps.valueSensingScreenRight,g_steps.valueSensingScreenTop,g_steps.valueSensingScreenBottom,g_steps.valueSensingStageProperty]}]},{label:"Sound",cat:"sound",items:[{label:"Musical Notes",items:[g_steps.blockSoundPlayDrum,g_steps.blockSoundRest,g_steps.blockSoundPlayNote,g_steps.blockSoundSetInstrument,g_steps.blockSoundChangeTempo,g_steps.blockSoundSetTempo,
1809g_steps.valueSoundTempo]},{label:"Sounds",items:[g_steps.blockSoundPlayUntilDone,g_steps.blockSoundPlay,g_steps.blockSoundStopActor,g_steps.blockSoundStopAll,g_steps.blockSoundChangeVolume,g_steps.blockSoundSetVolume,g_steps.valueSoundVolume]}]},{label:"Operators",cat:"operator",items:[{label:"Basic Operators",items:[g_steps.valueOpAdd,g_steps.valueOpSubtract,g_steps.valueOpMultiply,g_steps.valueOpDivide,g_steps.valueOpMod,g_steps.valueOpBinary,g_steps.valueOpExpression]},{label:"Math Functions",
1810items:[g_steps.valueOpRound,g_steps.valueOpRandom,g_steps.valueOpMath,g_steps.valueOpMath2,g_steps.valueOpConstants]},{label:"Boolean",items:[g_steps.valueOpLess,g_steps.valueOpEqual,g_steps.valueOpGreater,g_steps.valueOpAnd,g_steps.valueOpOr,g_steps.valueOpNot,g_steps.valueOpBitNot]},{label:"Strings",items:[g_steps.valueOpJoin,g_steps.valueOpLetter,g_steps.valueOpLength,g_steps.valueOpTextSplit,g_steps.valueOpTextReplace,g_steps.valueOpTextIndex,g_steps.valueOpTextLastIndex,g_steps.valueOpTextSubstring,
1811g_steps.valueOpTextTransform,g_steps.valueOpTextFormat]}]},{label:"Pen",cat:"pen",items:[{label:"Pen Drawing",items:[g_steps.blockPenClear,g_steps.blockPenDown,g_steps.blockPenUp,g_steps.blockPenChangeSize,g_steps.blockPenSetSize,g_steps.blockPenStamp]},{label:"Color",items:[g_steps.blockPenSetColor,g_steps.blockPenChangeHue,g_steps.blockPenSetHue,g_steps.blockPenChangeShade,g_steps.blockPenSetShade,g_steps.blockPenSetFillColor,g_steps.blockPenSetNoFill]},{label:"Text",items:[g_steps.blockPenSetFont,
1812g_steps.blockPenSetFontColor,g_steps.blockPenDrawText,g_steps.blockPenDrawTextAt]},{label:"Shapes",items:[g_steps.blockPenDrawPoint,g_steps.blockPenDrawLine,g_steps.blockPenDrawRectangle,g_steps.blockPenDrawRectangleLocal,g_steps.blockPenDrawTriangle,g_steps.blockPenDrawEllipse,g_steps.blockPenDrawEllipseLocal,g_steps.blockPenDrawBezier]},{label:"Erasing",items:[g_steps.blockPenClearRect,g_steps.blockPenClearTriangle,g_steps.blockPenClearEllipse]}]},{label:"Physics",cat:"physics",items:[{label:"Basic Physics",
1813items:[g_steps.blockPhysicsStart,g_steps.blockPhysicsStop,g_steps.blockPhysicsSetGravity,g_steps.blockPhysicsSetActorActive,g_steps.blockPhysicsSetActorStatic,g_steps.blockPhysicsSetActorGeometry]},{label:"Collisions",items:[g_steps.registerSpriteCollision,g_steps.valuePhysicsCollidedWithSprite,g_steps.valuePhysicsCollidedWithName,g_steps.valuePhysicsTouchingActor]},{label:"Physical Properties",items:[g_steps.blockPhysicsSetDensity,g_steps.blockPhysicsSetFriction,g_steps.blockPhysicsSetRestitution,
1814g_steps.valuePhysicsDensity,g_steps.valuePhysicsFriction,g_steps.valuePhysicsRestitution]},{label:"Force",items:[g_steps.blockPhysicsApplyForce,g_steps.blockPhysicsApplyImpulse,g_steps.blockPhysicsApplyTorque,g_steps.blockPhysicsApplyForceAngle,g_steps.blockPhysicsApplyImpulseAngle,g_steps.blockPhysicsApplyForceXY,g_steps.blockPhysicsApplyImpulseXY,g_steps.blockPhysicsSetAngularDamping,g_steps.blockPhysicsSetLinearDamping,g_steps.valuePhysicsXGravity,g_steps.valuePhysicsYGravity,g_steps.valuePhysicsAngularDamping,
1815g_steps.valuePhysicsLinearDamping,g_steps.valuePhysicsInertia]},{label:"Velocity",items:[g_steps.blockPhysicsSetLinearVelocity,g_steps.blockPhysicsSetLinearVelocityXY,g_steps.blockPhysicsSetAngularVelocity,g_steps.valuePhysicsAngularVelocity,g_steps.valuePhysicsXVelocity,g_steps.valuePhysicsYVelocity,g_steps.valuePhysicsIsAwake]},{label:"Advanced",items:[g_steps.valuePhysicsGetProperty,g_steps.blockPhysicsApply,g_steps.blockPhysicsApplyXY]}]},{label:"AR",cat:"ar",items:[{label:"Video",items:[g_steps.blockLooksVideo,
1816g_steps.blockLooksVideoTransparency,g_steps.blockLooksTakeScreenshot,g_steps.blockLooksVideoMask,{cat:"looks",omitbg:!0,label:"switch to costume {costumes:Live Video}",func:"blockLooksSwitchCostume",readName:"Switch To Costume",concept:"advanced costume handling",tags:["change look","switch costume"]}]},{label:"Sensing",items:[g_steps.valueSensingVideo,g_steps.valueSensingVideoGetColor,g_steps.blockSensingVideoFindColor,g_steps.valueSensingVideoLastColorCenterX,g_steps.valueSensingVideoLastColorCenterY]},
1817{label:"Calibration",items:[g_steps.blockLooksVideoGetColor]}]},{label:"Hardware",cat:"hardware",items:[{label:"Sphero",items:[g_steps.blockSpheroSetSpeed,g_steps.blockSpheroRoll,g_steps.blockSpheroStop,g_steps.blockSpheroTurnCW,g_steps.blockSpheroTurnCCW,g_steps.blockSpheroHeading,g_steps.blockSpheroColor,g_steps.valueSpheroSpeed,g_steps.valueSpheroHeading,g_steps.valueSpheroConnected,g_steps.valueSpheroProperty,g_steps.valueSpheroOdometer,g_steps.valueSpheroCollidedSinceLastCheck,g_steps.registerHardwareTrigger,
1818g_steps.blockSpheroSetStabilization,g_steps.blockSpheroSet]},{label:"Drone",items:[g_steps.blockDroneTakeOff,g_steps.blockDroneLand,g_steps.blockDroneStop,g_steps.blockDroneEmergency,g_steps.blockDroneSetSpeed,g_steps.blockDroneForward,g_steps.blockDroneBackward,g_steps.blockDroneLeft,g_steps.blockDroneRight,g_steps.blockDroneTurnCW,g_steps.blockDroneTurnCCW,g_steps.blockDroneAnimation,g_steps.blockDroneUp,g_steps.blockDroneDown,g_steps.valueDroneConnected,g_steps.blockDroneStartUp,g_steps.blockDroneStartDown,
1819g_steps.blockDroneStartRotateLeft,g_steps.blockDroneStartRotateRight,g_steps.blockDroneTakePicture,g_steps.blockDroneFetchPicture,g_steps.blockDroneDeletePicture,g_steps.blockDroneVarSetNumPictures,g_steps.blockDroneSetProductName,g_steps.valueDroneHasGrabber,g_steps.blockDroneControlGrabber,g_steps.valueDroneHasCannon,g_steps.blockDroneControlCannon,g_steps.blockDroneSetFlyingMode]},{label:"WeDo 2.0",items:[g_steps.blockWedo2RunMotorFor,g_steps.blockWedo2SetMotorPower,g_steps.blockWedo2SetMotorDirection,
1820g_steps.blockWedo2MotorOn,g_steps.blockWedo2MotorOff,g_steps.blockWedo2MotorDrift,g_steps.valueWedo2MotorPower,g_steps.valueWedo2MotorDirection,g_steps.valueWedo2ConnectedTo,g_steps.blockWedo2SetLightColor,g_steps.valueWedo2TiltSensorDirection,g_steps.blockWedo2SetTiltSensorMode,g_steps.valueWedo2TiltSensorMode,g_steps.valueWedo2TiltSensorAngle,g_steps.valueWedo2TiltSensorBumpCount,g_steps.blockWedo2SensorReset,g_steps.valueWedo2MotionSensorDistance,g_steps.blockWedo2SetMotionSensorMode,g_steps.valueWedo2MotionSensorMode,
1821g_steps.valueWedo2MotionSensorCount,g_steps.blockWedo2PlayToneFor,g_steps.blockWedo2StopTone]},{label:"Hue",items:[g_steps.blockHueState,g_steps.valueHueState,g_steps.blockHueColor,g_steps.blockHueSetHue,g_steps.blockHueChangeHue,g_steps.blockHueBrightness,g_steps.valueHueBrightness]},{label:"Jumping Sumo",items:[g_steps.blockJumpingSumoStop,g_steps.blockJumpingSumoEmergency,g_steps.blockJumpingSumoJump,g_steps.blockJumpingSumoAnimation,g_steps.blockJumpingSumoForward,g_steps.blockJumpingSumoBackward,
1822g_steps.blockJumpingSumoTurnCW,g_steps.blockJumpingSumoTurnCCW,g_steps.blockJumpingSumoSetSpeed,g_steps.blockJumpingSumoSetTurn,g_steps.blockJumpingSumoMove,g_steps.blockJumpingSumoStart,g_steps.blockJumpingSumoPose,g_steps.blockJumpingSumoSetVolume,g_steps.blockJumpingSumoSetAudioTheme]}]},{label:"Variables",cat:"variables",items:[]},{label:"Functions",cat:"functions",items:[]}];function _log(){}
1823function setPreference(a,b){prefs[a]=b;$.ajax({url:"/api/userpref",type:"POST",data:"n="+escape(a)+"&v="+escape(b)})}function getPreference(a,b){$.ajax({url:"/api/userpref",type:"POST",data:"n="+escape(a),success:function(a){b&&typeof b=="function"&&b(a)}})}function getFileExt(a){var b=a.lastIndexOf(".");return b>0&&b+1<a.length?a.substring(b):""}
1824function getFilename(a){var b=a.lastIndexOf("/");b>=0&&b+1<a.length&&(a=a.substring(b+1));b=a.lastIndexOf(".");return b>0&&b+1<a.length?a.substring(0,b):a}function measureText(a,b){var c=$("canvas")[0].getContext();c.save();c.font=a;var d=c.measureText(b);
1824c.restore();return d}
1825function mergeLists(a,b,c){if(typeof b=="object"&&b.indexOf)if(c)for(var d=0;d<b.length;d++){for(var f=b[d],e=false,g=0;g<a.length;g++)if(c(a[g],f)){if(a[g].count!==void 0)a[g].count=a[g].count+b[d].count;e=true;break}e||a.push(f)}else for(d=0;d<b.length;d++)a.indexOf(b[d])<0&&a.push(b[d]);else if(c){e=false;for(g=0;g<a.length;g++)if(c(a[g],b)){if(a[g].count!==void 0)a[g].count=a[g].count+b.count;e=true;break}e||a.push(b)}else a.indexOf(b)<0&&a.push(b);return a}
1826function findStepByFunc(a){if(g_steps[a])return g_steps[a];for(var b=0;b<g_varBlocks.length;b++)if(g_varBlocks[b].func&&g_varBlocks[b].func==a)return g_varBlocks[b];for(b=0;b<g_listBlocks.length;b++)if(g_listBlocks[b].func&&g_listBlocks[b].func==a)return g_listBlocks[b];return null}function makeBlockByName(a){var b=null;(a=findStepByFunc(a))&&(b=a.value?new Label(a):new Block(a));return b}function ifArrayMakeString(a){return a instanceof Array?a.join(" "):a instanceof Object?JSON.stringify(a):a}
1827function coerceToNumber(a){(a=parseFloat(a))||(a=a.length==1?a.charCodeAt(0):0);return a}
1828function valueToNative(a){if(a=="true"||a===true)return true;if(a=="false"||a===false)return false;if(a instanceof Array||a instanceof Object)return a;var b=""+a,c=b;if(c.indexOf(".")>=0){if(c.indexOf("e")<0)for(;c.charAt(c.length-1)=="0";)c=c.substring(0,c.length-1);else{for(var d=true,f=0;f<c.length;f++){var e=c.charAt(f);if(e!="."&&e!="e"&&e!="-"&&e!="+"&&(e<"0"||e>"9")){d=false;break}}if(d)return parseFloat(c)}c.charAt(c.length-1)=="."&&(c=c.substring(0,c.length-1))}a=parseFloat(a);return""+a==
1829c||""+a=="0"+c?a:b}function animate(a,b,c){var d=Date.now(),f=0,f=window.setInterval(function(){var e=Date.now();if(e<d+a)b(e-d,a);else{b(a,a);window.clearInterval(f);c&&c()}},1E3/30)}
1830function getScrollVectors(a){var b=0,c=0;a.originalEvent.wheelDelta&&(c=a.originalEvent.wheelDelta/120*120);a.originalEvent.axis!==void 0&&(a.originalEvent.axis===a.originalEvent.HORIZONTAL_AXIS?b=-1*a.originalEvent.detail/3*120:a.originalEvent.axis===a.originalEvent.VERTICAL_AXIS&&(c=-1*a.originalEvent.detail/3*120));a.originalEvent.wheelDeltaY!==void 0&&(c=a.originalEvent.wheelDeltaY/120*120);a.originalEvent.wheelDeltaX!==void 0&&(b=a.originalEvent.wheelDeltaX/120*120);return{x:b,y:c}}
1831function findPos(a){return $(a).offset()}function makeColor(a){if(a.a===void 0)a.a=1;return"rgba("+a.r+","+a.g+","+a.b+","+a.a+")"}function makeHexColor(a,b,c){a=("0"+a.toString(16)).slice(-2);b=("0"+b.toString(16)).slice(-2);c=("0"+c.toString(16)).slice(-2);return"#"+a+b+c}
1832function parseColor(a){var b=0,c=0,d=0,f=1;if(typeof a=="string"&&a.substring(0,5)=="rgba("&&a.charAt(a.length-1)==")"){c=a.indexOf(",");b=parseInt($.trim(a.substr(5,c-5)));d=a.indexOf(",",c+1);c=parseInt($.trim(a.substr(c+1,d-c)));f=a.indexOf(",",d+1);d=parseInt($.trim(a.substr(d+1,f-d)));f=parseFloat($.trim(a.substr(f+1,a.length-f)))}else if(typeof a=="string"&&a.substring(0,4)=="rgb("&&a.charAt(a.length-1)==")"){c=a.indexOf(",");b=parseInt($.trim(a.substr(4,c-4)));d=a.indexOf(",",c+1);c=parseInt($.trim(a.substr(c+
18331,d-c)));d=parseInt($.trim(a.substr(d+1,a.length-d)))}else{typeof a=="string"&&a.charAt(0)!="#"?a="#"+parseInt(a).toString(16):typeof a=="number"&&(a="#"+a.toString(16));b=parseInt(a.substring(1,3),16);c=parseInt(a.substring(3,5),16);d=parseInt(a.substring(5),16)}return{r:b,g:c,b:d,a:f}}function getColorComponents(a){var a=parseColor(a),b=rgbToHsv(a.r,a.g,a.b),c=200*b[0],d=b[1],b=b[2],a="rgba("+a.r+","+a.g+","+a.b+","+a.a+")";return[a,c,b==1?50+50*(1-d):50*b]}
1834function rgbToHsl(a,b,c){var a=a/255,b=b/255,c=c/255,d=Math.max(a,b,c),f=Math.min(a,b,c),e,g=(d+f)/2;if(d==f)e=f=0;else{var h=d-f,f=g>0.5?h/(2-d-f):h/(d+f);switch(d){case a:e=(b-c)/h+(b<c?6:0);break;case b:e=(c-a)/h+2;break;case c:e=(a-b)/h+4}e=e/6}return[e,f,g]}
1835function hslToRgb(a,b,c){if(b==0)c=b=a=c;else var d=function(a,b,c){c<0&&(c=c+1);c>1&&(c=c-1);return c<1/6?a+(b-a)*6*c:c<0.5?b:c<2/3?a+(b-a)*(2/3-c)*6:a},f=c<0.5?c*(1+b):c+b-c*b,e=2*c-f,c=d(e,f,a+1/3),b=d(e,f,a),a=d(e,f,a-1/3);return[c*255,b*255,a*255]}function rgbToHsv(a,b,c){var a=a/255,b=b/255,c=c/255,d=Math.max(a,b,c),f=Math.min(a,b,c),e,g=d-f;if(d==f)e=0;else{switch(d){case a:e=(b-c)/g+(b<c?6:0);break;case b:e=(c-a)/g+2;break;case c:e=(a-b)/g+4}e=e/6}return[e,d==0?0:g/d,d]}
1836function hsvToRgb(a,b,c){var d,f,e,g=Math.floor(a*6),h=a*6-g,a=c*(1-b),i=c*(1-h*b),b=c*(1-(1-h)*b);switch(g%6){case 0:d=c;f=b;e=a;break;case 1:d=i;f=c;e=a;break;case 2:d=a;f=c;e=b;break;case 3:d=a;f=i;e=c;break;case 4:d=b;f=a;e=c;break;case 5:d=c;f=a;e=i}return[d*255,f*255,e*255]}
1837CanvasRenderingContext2D.prototype.dashedLine=function(a,b,c,d,f){f||(f=2);this.save();var e=a,g=b;this.beginPath();this.moveTo(a,b);var h=c-a,i=d-b,f=Math.floor(Math.sqrt(h*h+i*i)/f),h=h/f,i=i/f;this.strokeStyle="#000";for(var j=0;j++<f;){a=a+h;b=b+i;this[j%2==0?"moveTo":"lineTo"](a,b);this.lineTo(a,b)}this[j%2==0?"moveTo":"lineTo"](c,d);this.stroke();this.closePath();this.beginPath();this.moveTo(e,g);a=e;b=g;this.strokeStyle="#fff";for(j=1;j++<f;){a=a+h;b=b+i;this[j%2==0?"moveTo":"lineTo"](a,b);
1838this.lineTo(a,b)}this[j%2==0?"moveTo":"lineTo"](c,d);this.stroke();this.closePath();
1838this.restore()};
1839function breakLines(a,b,c){for(var d=0,f=[],e=a.split("\\n"),g=0;g<e.length;g++){var a=e[g],h=b.measureText(a);if(h.width>c){for(var i="",a=a.split(/ +/),j=0;j<a.length;){h=b.measureText(i+a[j]+" ");if(h.width>c)if(i==""){for(var k=a[j]&&a[j].length>1?a[j][0]:"",l=false,n=1;n<a[j].length;n++){h=a[j][n];if(b.measureText(k+h).width>c){l=true;f.push(k);h=b.measureText(k);if(h.width>d)d=h.width;a[j]=a[j].substring(n);break}else k=k+h}if(!l){f.push(k);j++}}else{f.push(i);h=b.measureText(i);if(h.width>
1840d)d=h.width;i=""}else{i!=""&&(i=i+" ");i=i+a[j];j++}}if(i!=""||g<e.length-1){f.push(i);h=b.measureText(i);if(h.width>d)d=h.width}}else{f.push(a);h=b.measureText(a);if(h.width>d)d=h.width}}return{lines:f,textWidth:d}}function firstLetterToUpper(a){return a.charAt(0).toUpperCase()+a.slice(1)}function firstLetterToLower(a){return a.charAt(0).toLowerCase()+a.slice(1)}function toUCWord(a){return a.replace(/\w\S*/g,function(a){return a.charAt(0).toUpperCase()+a.substr(1)})}
1841function formatText(){var a=arguments[0];if(a){var b=Array.prototype.slice.call(arguments,1);return a.replace(/{(\d+)}/g,function(a,d){return typeof b[d]!="undefined"?b[d]:a})}return""}
1842function generateImageFromUrl(a,b,c){var c=c!==void 0?c:{},d=c.cache?c.cache:null,c=c.cacheBuster?c.cacheBuster:null,f=RegExp(/avatar:\/\/([0-9a-zA-Z]+)\/([0-9a-zA-Z ]+)\/([0-9]+)/).exec(a);if(f&&f.length==4)Avatar.queueFrame(f[1],f[2],f[3],Avatar.totalFrames,b);else if(a=="avatar://spine"){var e=new Image;e.onload=function(){b(e)};e.src=Sprites._blankImg}else if(a.indexOf("spine://")==0){a=a.substring(8);d=JSON.parse(a);WinSpine.generatePreview(d.skeletonType,d.skeletonParts,function(a){var c=new Image;
1843c.src=a;b(c)})}else if(a.indexOf("block://")==0){a=a.substring(8);c=a.lastIndexOf("/");d=1;if(c>0){d=parseFloat(a.substring(c+1))*0.7;a=a.substring(0,c)}c=JSON.parse(a);c=ObjectIO.deserializeScriptStep(c);c.getImage(b,d)}else{if(a.indexOf(".svg")>0){e=new Image;e.onload=function(){var c=document.createElement("canvas");c.width=e.width;c.height=e.height;try{canvg(c,a,{renderCallback:function(){var d=new Image;if(b){d.onload=function(){b(d)};d.onerror=function(){d.onload=function(){b&&b(d)};d.src=Sprites._blankImg}}d.src=
1844c.toDataURL("image/png");d.origSrc=a}})}catch(d){var f=new Image;if(b){f.onload=function(){b(f)};f.onerror=function(){f.onload=function(){b&&b(f)};f.src=Sprites._blankImg}}f.src=c.toDataURL("image/png");f.origSrc=a}};e.onerror=function(){e.onload=function(){b&&b(e)};e.src=Sprites._blankImg}}else{e=new Image;if(b){e.onload=function(){b(e)};e.onerror=function(){e.src="/ide/imgs/blank.png"}}if(d&&c&&a.indexOf("data:")<0){a=a+(a.indexOf("?")==-1?"?":"&");a=a+("cache="+d+"&v="+c)}}e.src=a}}
1845function loadJs(a){var b=document.createElement("script");b.setAttribute("type","text/javascript");b.setAttribute("src",a);document.getElementsByTagName("head")[0].appendChild(b)}
1846function timeDifference(a){var a=a*1E3,b=Date.now()-a;if(b<0){a=Date.now();b=0}a=new Date(a);if(b<36E5){b=Math.round(b/6E4);return b==1?"1 min ago":b+" mins ago"}if(b<864E5){b=Math.round(b/36E5);return b==1?"1 hour ago":b+" hours ago"}return b<2592E6&&Math.round(b/864E5)==1?"yesterday":a.getMonth()+1+"/"+a.getDate()+"/"+a.getFullYear()}function cloneObj(a){if(a==null||typeof a!="object")return a;var b=new a.constructor,c;for(c in a)b[c]=cloneObj(a[c]);return b}window.g_loc||(g_loc={loctext:{}});
1847g_loc.loadLocale=function(a,b,c,d,f){$.ajax({url:a,success:function(a){var a=JSON.parse(a),g=a["default"];if(a[b])for(var h in a[b])g[h]=a[b][h];if(a[b+"-"+c])for(h in a[b+"-"+c])g[h]=a[b+"-"+c][h];if(!f)for(h in g)g_loc.loctext[h]=g[h];d&&d(g)}})};g_loc.formatText=function(){var a=arguments[0],b=Array.prototype.slice.call(arguments,1),c=g_loc.loctext[a];return a&&c?c.replace(/{(\d+)}/g,function(a,c){c=parseInt(c);return typeof b[c-1]!="undefined"?""+b[c-1]:a}):""};
1848g_loc.formatTextDefault=function(){var a=arguments[0],b=arguments[1],c=Array.prototype.slice.call(arguments,2),d=g_loc.loctext[a];return a&&d?d.replace(/{(\d+)}/g,function(a,b){b=parseInt(b);return typeof c[b-1]!="undefined"?""+c[b-1]:a}):b?b.replace(/{(\d+)}/g,function(a,b){b=parseInt(b);return typeof c[b-1]!="undefined"?""+c[b-1]:a}):a};g_loc.formatDate=function(){};g_loc.formatNumber=function(){};g_loc.formatCurrency=function(){};g_loc.getText=function(a,b){return!g_loc.loctext[a]?b:g_loc.loctext[a]};
1849function ff_matchTolerance(a,b,c){var d=b.data[c],f=b.data[c+1],e=b.data[c+2],b=b.data[c+3];return d>=a[0]&&(d<=a[4]&&f>=a[1]&&f<=a[5]&&e>=a[2]&&e<=a[6]&&b>=a[3]&&b<=a[7])&&!(d==a[8]&&f==a[9]&&e==a[10]&&b==255)}
1850function ff_floodFill(a,b,c,d,f){var a=Math.floor(a),b=Math.floor(b),e=[[a,b]],g=c.canvas.width,h=c.canvas.height,i=(b*g+a)*4,j=c.getImageData(0,0,g,h);if(d.charAt(0)=="#"){d=d.substring(1,7);d=[parseInt(d.substring(0,2),16),parseInt(d.substring(2,4),16),parseInt(d.substring(4,6),16)]}else if(d.substring(0,4)=="rgb("){d=d.substring(4,d.length-1).split(",");d=[parseInt(d[0].trim()),parseInt(d[1].trim()),parseInt(d[2].trim())]}else return;for(f=[j.data[i]-f,j.data[i+1]-f,j.data[i+2]-f,j.data[i+3]-f,
1851j.data[i]+f,j.data[i+1]+f,j.data[i+2]+f,j.data[i+3]+f,d[0],d[1],d[2]];e.length;){b=e.pop();a=b[0];b=b[1];for(i=(b*g+a)*4;b-- >=0&&ff_matchTolerance(f,j,i);)i=i-g*4;i=i+g*4;++b;
1851for(var k=false,l=false;b++<h-1&&ff_matchTolerance(f,j,i);){j.data[i]=d[0];j.data[i+1]=d[1];j.data[i+2]=d[2];j.data[i+3]=255;if(a>0)if(ff_matchTolerance(f,j,i-4)){if(!k){e.push([a-1,b]);k=true}}else k&&(k=false);if(a<g-1)if(ff_matchTolerance(f,j,i+4)){if(!l){e.push([a+1,b]);l=true}}else if(ff_matchTolerance(f,j,i+4-g*4)){if(!k){e.push([a+
18521,b-1]);k=true}}else l&&(l=false);i=i+g*4}}c.putImageData(j,0,0)}
1853function browserDownload(a,b,c){function d(a){var b=a.split(/[:;,]/),a=b[1],b=(b[2]=="base64"?atob:decodeURIComponent)(b.pop()),c=b.length,d=0,e=new Uint8Array(c);for(d;d<c;++d)e[d]=b.charCodeAt(d);return new k([e],{type:a})}function f(a,b){if("download"in j){j.href=a;j.setAttribute("download",l);j.className="download-js-link";j.innerHTML="downloading...";j.style.display="none";document.body.appendChild(j);setTimeout(function(){j.click();document.body.removeChild(j);b===true&&setTimeout(function(){e.URL.revokeObjectURL(j.href)},
1854250)},66);return true}if(/(Version)\/(\d+)\.(\d+)(?:\.(\d+))?.*Safari\//.test(navigator.userAgent)){a=a.replace(/^data:([\w\/\-\+]+)/,g);if(!window.open(a)&&confirm("Displaying New Document\n\nUse Save As... to download, then click back to return to this page."))location.href=a;return true}var c=document.createElement("iframe");document.body.appendChild(c);b||(a="data:"+a.replace(/^data:([\w\/\-\+]+)/,g));c.src=a;setTimeout(function(){document.body.removeChild(c)},333)}var e=window,g="application/octet-stream",
1855h=c||g,i=!b&&!c&&a,j=document.createElement("a"),c=function(a){return""+a},k=e.Blob||e.MozBlob||e.WebKitBlob||c,l=b||"download",k=k.call?k.bind(e):Blob;if(""+this==="true"){a=[a,h];h=a[0];a=a[1]}if(i&&i.length<2048){l=i.split("/").pop().split("?")[0];j.href=i;if(j.href.indexOf(i)!==-1){var n=new XMLHttpRequest;n.open("GET",i,true);n.responseType="blob";n.onload=function(a){download(a.target.response,l,g)};setTimeout(function(){n.send()},0);return n}}if(/^data\:[\w+\-]+\/[\w+\-]+[,;]/.test(a))if(a.length>
18562096103.424&&k!==c){a=d(a);h=a.type||g}else return navigator.msSaveBlob?navigator.msSaveBlob(d(a),l):f(a);b=a instanceof k?a:new k([a],{type:h});if(navigator.msSaveBlob)return navigator.msSaveBlob(b,l);if(e.URL)f(e.URL.createObjectURL(b),true);else{if(typeof b==="string"||b.constructor===c)try{return f("data:"+h+";base64,"+e.btoa(b))}catch(p){return f("data:"+h+","+encodeURIComponent(b))}h=new FileReader;h.onload=function(){f(this.result)};h.readAsDataURL(b)}return true};
1857// threejs.org/license
1858'use strict';var THREE={REVISION:"75"};"function"===typeof define&&define.amd?define("three",THREE):"undefined"!==typeof exports&&"undefined"!==typeof module&&(module.exports=THREE);void 0===Number.EPSILON&&(Number.EPSILON=Math.pow(2,-52));void 0===Math.sign&&(Math.sign=function(a){return 0>a?-1:0<a?1:+a});void 0===Function.prototype.name&&void 0!==Object.defineProperty&&Object.defineProperty(Function.prototype,"name",{get:function(){return this.toString().match(/^\s*function\s*(\S*)\s*\(/)[1]}});
1859void 0===Object.assign&&Object.defineProperty(Object,"assign",{writable:!0,configurable:!0,value:function(a){if(void 0===a||null===a)throw new TypeError("Cannot convert first argument to object");for(var b=Object(a),c=1,d=arguments.length;c!==d;++c){var e=arguments[c];if(void 0!==e&&null!==e)for(var e=Object(e),f=Object.keys(e),g=0,h=f.length;g!==h;++g){var k=f[g],l=Object.getOwnPropertyDescriptor(e,k);void 0!==l&&l.enumerable&&(b[k]=e[k])}}return b}});THREE.MOUSE={LEFT:0,MIDDLE:1,RIGHT:2};
1860THREE.CullFaceNone=0;THREE.CullFaceBack=1;THREE.CullFaceFront=2;THREE.CullFaceFrontBack=3;THREE.FrontFaceDirectionCW=0;THREE.FrontFaceDirectionCCW=1;THREE.BasicShadowMap=0;THREE.PCFShadowMap=1;THREE.PCFSoftShadowMap=2;THREE.FrontSide=0;THREE.BackSide=1;THREE.DoubleSide=2;THREE.FlatShading=1;THREE.SmoothShading=2;THREE.NoColors=0;THREE.FaceColors=1;THREE.VertexColors=2;THREE.NoBlending=0;THREE.NormalBlending=1;THREE.AdditiveBlending=2;THREE.SubtractiveBlending=3;THREE.MultiplyBlending=4;
1861THREE.CustomBlending=5;THREE.AddEquation=100;THREE.SubtractEquation=101;THREE.ReverseSubtractEquation=102;THREE.MinEquation=103;THREE.MaxEquation=104;
vendor: 36,565 bytes, lines 1861-1936
1861THREE.ZeroFactor=200;THREE.OneFactor=201;THREE.SrcColorFactor=202;THREE.OneMinusSrcColorFactor=203;THREE.SrcAlphaFactor=204;THREE.OneMinusSrcAlphaFactor=205;THREE.DstAlphaFactor=206;THREE.OneMinusDstAlphaFactor=207;THREE.DstColorFactor=208;THREE.OneMinusDstColorFactor=209;THREE.SrcAlphaSaturateFactor=210;THREE.NeverDepth=0;THREE.AlwaysDepth=1;
1862THREE.LessDepth=2;THREE.LessEqualDepth=3;THREE.EqualDepth=4;THREE.GreaterEqualDepth=5;THREE.GreaterDepth=6;THREE.NotEqualDepth=7;THREE.MultiplyOperation=0;THREE.MixOperation=1;THREE.AddOperation=2;THREE.NoToneMapping=0;THREE.LinearToneMapping=1;THREE.ReinhardToneMapping=2;THREE.Uncharted2ToneMapping=3;THREE.CineonToneMapping=4;THREE.UVMapping=300;THREE.CubeReflectionMapping=301;THREE.CubeRefractionMapping=302;THREE.EquirectangularReflectionMapping=303;THREE.EquirectangularRefractionMapping=304;
1863THREE.SphericalReflectionMapping=305;THREE.CubeUVReflectionMapping=306;THREE.CubeUVRefractionMapping=307;THREE.RepeatWrapping=1E3;THREE.ClampToEdgeWrapping=1001;THREE.MirroredRepeatWrapping=1002;THREE.NearestFilter=1003;THREE.NearestMipMapNearestFilter=1004;THREE.NearestMipMapLinearFilter=1005;THREE.LinearFilter=1006;THREE.LinearMipMapNearestFilter=1007;THREE.LinearMipMapLinearFilter=1008;THREE.UnsignedByteType=1009;THREE.ByteType=1010;THREE.ShortType=1011;THREE.UnsignedShortType=1012;
1864THREE.IntType=1013;THREE.UnsignedIntType=1014;THREE.FloatType=1015;THREE.HalfFloatType=1025;THREE.UnsignedShort4444Type=1016;THREE.UnsignedShort5551Type=1017;THREE.UnsignedShort565Type=1018;THREE.AlphaFormat=1019;THREE.RGBFormat=1020;THREE.RGBAFormat=1021;THREE.LuminanceFormat=1022;THREE.LuminanceAlphaFormat=1023;THREE.RGBEFormat=THREE.RGBAFormat;THREE.RGB_S3TC_DXT1_Format=2001;THREE.RGBA_S3TC_DXT1_Format=2002;THREE.RGBA_S3TC_DXT3_Format=2003;THREE.RGBA_S3TC_DXT5_Format=2004;
1865THREE.RGB_PVRTC_4BPPV1_Format=2100;THREE.RGB_PVRTC_2BPPV1_Format=2101;THREE.RGBA_PVRTC_4BPPV1_Format=2102;THREE.RGBA_PVRTC_2BPPV1_Format=2103;THREE.RGB_ETC1_Format=2151;THREE.LoopOnce=2200;THREE.LoopRepeat=2201;THREE.LoopPingPong=2202;THREE.InterpolateDiscrete=2300;THREE.InterpolateLinear=2301;THREE.InterpolateSmooth=2302;THREE.ZeroCurvatureEnding=2400;THREE.ZeroSlopeEnding=2401;THREE.WrapAroundEnding=2402;THREE.TrianglesDrawMode=0;THREE.TriangleStripDrawMode=1;THREE.TriangleFanDrawMode=2;
1866THREE.LinearEncoding=3E3;THREE.sRGBEncoding=3001;THREE.GammaEncoding=3007;THREE.RGBEEncoding=3002;THREE.LogLuvEncoding=3003;THREE.RGBM7Encoding=3004;THREE.RGBM16Encoding=3005;THREE.RGBDEncoding=3006;THREE.Color=function(a){return 3===arguments.length?this.fromArray(arguments):this.set(a)};
1867THREE.Color.prototype={constructor:THREE.Color,r:1,g:1,b:1,set:function(a){a instanceof THREE.Color?this.copy(a):"number"===typeof a?this.setHex(a):"string"===typeof a&&this.setStyle(a);return this},setScalar:function(a){this.b=this.g=this.r=a},setHex:function(a){a=Math.floor(a);this.r=(a>>16&255)/255;this.g=(a>>8&255)/255;this.b=(a&255)/255;return this},setRGB:function(a,b,c){this.r=a;this.g=b;this.b=c;return this},setHSL:function(){function a(a,c,d){0>d&&(d+=1);1<d&&(d-=1);return d<1/6?a+6*(c-a)*
1868d:.5>d?c:d<2/3?a+6*(c-a)*(2/3-d):a}return function(b,c,d){b=THREE.Math.euclideanModulo(b,1);c=THREE.Math.clamp(c,0,1);d=THREE.Math.clamp(d,0,1);0===c?this.r=this.g=this.b=d:(c=.5>=d?d*(1+c):d+c-d*c,d=2*d-c,this.r=a(d,c,b+1/3),this.g=a(d,c,b),this.b=a(d,c,b-1/3));return this}}(),setStyle:function(a){function b(b){void 0!==b&&1>parseFloat(b)&&console.warn("THREE.Color: Alpha component of "+a+" will be ignored.")}var c;if(c=/^((?:rgb|hsl)a?)\(\s*([^\)]*)\)/.exec(a)){var d=c[2];switch(c[1]){case "rgb":case "rgba":if(c=
1869/^(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(,\s*([0-9]*\.?[0-9]+)\s*)?$/.exec(d))return this.r=Math.min(255,parseInt(c[1],10))/255,this.g=Math.min(255,parseInt(c[2],10))/255,this.b=Math.min(255,parseInt(c[3],10))/255,b(c[5]),this;if(c=/^(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(,\s*([0-9]*\.?[0-9]+)\s*)?$/.exec(d))return this.r=Math.min(100,parseInt(c[1],10))/100,this.g=Math.min(100,parseInt(c[2],10))/100,this.b=Math.min(100,parseInt(c[3],10))/100,b(c[5]),this;break;case "hsl":case "hsla":if(c=/^([0-9]*\.?[0-9]+)\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(,\s*([0-9]*\.?[0-9]+)\s*)?$/.exec(d)){var d=
1870parseFloat(c[1])/360,e=parseInt(c[2],10)/100,f=parseInt(c[3],10)/100;b(c[5]);return this.setHSL(d,e,f)}}}else if(c=/^\#([A-Fa-f0-9]+)$/.exec(a)){c=c[1];d=c.length;if(3===d)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===d)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}a&&0<a.length&&
1871(c=THREE.ColorKeywords[a],void 0!==c?this.setHex(c):console.warn("THREE.Color: Unknown color "+a));return this},clone:function(){return new this.constructor(this.r,this.g,this.b)},copy:function(a){this.r=a.r;this.g=a.g;this.b=a.b;return this},copyGammaToLinear:function(a,b){void 0===b&&(b=2);this.r=Math.pow(a.r,b);this.g=Math.pow(a.g,b);this.b=Math.pow(a.b,b);return this},copyLinearToGamma:function(a,b){void 0===b&&(b=2);var c=0<b?1/b:1;this.r=Math.pow(a.r,c);this.g=Math.pow(a.g,c);this.b=Math.pow(a.b,
1872c);return this},convertGammaToLinear:function(){var a=this.r,b=this.g,c=this.b;this.r=a*a;this.g=b*b;this.b=c*c;return this},convertLinearToGamma:function(){this.r=Math.sqrt(this.r);this.g=Math.sqrt(this.g);this.b=Math.sqrt(this.b);return this},getHex:function(){return 255*this.r<<16^255*this.g<<8^255*this.b<<0},getHexString:function(){return("000000"+this.getHex().toString(16)).slice(-6)},getHSL:function(a){a=a||{h:0,s:0,l:0};var b=this.r,c=this.g,d=this.b,e=Math.max(b,c,d),f=Math.min(b,c,d),g,h=
1873(f+e)/2;if(f===e)f=g=0;else{var k=e-f,f=.5>=h?k/(e+f):k/(2-e-f);switch(e){case b:g=(c-d)/k+(c<d?6:0);break;case c:g=(d-b)/k+2;break;case d:g=(b-c)/k+4}g/=6}a.h=g;a.s=f;a.l=h;return a},getStyle:function(){return"rgb("+(255*this.r|0)+","+(255*this.g|0)+","+(255*this.b|0)+")"},offsetHSL:function(a,b,c){var d=this.getHSL();d.h+=a;d.s+=b;d.l+=c;this.setHSL(d.h,d.s,d.l);return this},add:function(a){this.r+=a.r;this.g+=a.g;this.b+=a.b;return this},addColors:function(a,b){this.r=a.r+b.r;this.g=a.g+b.g;this.b=
1874a.b+b.b;return this},addScalar:function(a){this.r+=a;this.g+=a;this.b+=a;return this},multiply:function(a){this.r*=a.r;this.g*=a.g;this.b*=a.b;return this},multiplyScalar:function(a){this.r*=a;this.g*=a;this.b*=a;return this},lerp:function(a,b){this.r+=(a.r-this.r)*b;this.g+=(a.g-this.g)*b;this.b+=(a.b-this.b)*b;return this},equals:function(a){return a.r===this.r&&a.g===this.g&&a.b===this.b},fromArray:function(a,b){void 0===b&&(b=0);this.r=a[b];this.g=a[b+1];this.b=a[b+2];return this},toArray:function(a,
1875b){void 0===a&&(a=[]);void 0===b&&(b=0);a[b]=this.r;a[b+1]=this.g;a[b+2]=this.b;return a}};
1876THREE.ColorKeywords={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,
1877darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,
1878grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,
1879lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,
1880palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,
1881tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};THREE.Quaternion=function(a,b,c,d){this._x=a||0;this._y=b||0;this._z=c||0;this._w=void 0!==d?d:1};
1882THREE.Quaternion.prototype={constructor:THREE.Quaternion,get x(){return this._x},set x(a){this._x=a;this.onChangeCallback()},get y(){return this._y},set y(a){this._y=a;this.onChangeCallback()},get z(){return this._z},set z(a){this._z=a;this.onChangeCallback()},get w(){return this._w},set w(a){this._w=a;this.onChangeCallback()},set:function(a,b,c,d){this._x=a;this._y=b;this._z=c;this._w=d;this.onChangeCallback();return this},clone:function(){return new this.constructor(this._x,this._y,this._z,this._w)},
1883copy:function(a){this._x=a.x;this._y=a.y;this._z=a.z;this._w=a.w;this.onChangeCallback();return this},setFromEuler:function(a,b){if(!1===a instanceof THREE.Euler)throw Error("THREE.Quaternion: .setFromEuler() now expects a Euler rotation rather than a Vector3 and order.");var c=Math.cos(a._x/2),d=Math.cos(a._y/2),e=Math.cos(a._z/2),f=Math.sin(a._x/2),g=Math.sin(a._y/2),h=Math.sin(a._z/2),k=a.order;"XYZ"===k?(this._x=f*d*e+c*g*h,this._y=c*g*e-f*d*h,this._z=c*d*h+f*g*e,this._w=c*d*e-f*g*h):"YXZ"===
1884k?(this._x=f*d*e+c*g*h,this._y=c*g*e-f*d*h,this._z=c*d*h-f*g*e,this._w=c*d*e+f*g*h):"ZXY"===k?(this._x=f*d*e-c*g*h,this._y=c*g*e+f*d*h,this._z=c*d*h+f*g*e,this._w=c*d*e-f*g*h):"ZYX"===k?(this._x=f*d*e-c*g*h,this._y=c*g*e+f*d*h,this._z=c*d*h-f*g*e,this._w=c*d*e+f*g*h):"YZX"===k?(this._x=f*d*e+c*g*h,this._y=c*g*e+f*d*h,this._z=c*d*h-f*g*e,this._w=c*d*e-f*g*h):"XZY"===k&&(this._x=f*d*e-c*g*h,this._y=c*g*e-f*d*h,this._z=c*d*h+f*g*e,this._w=c*d*e+f*g*h);if(!1!==b)this.onChangeCallback();return this},setFromAxisAngle:function(a,
1885b){var c=b/2,d=Math.sin(c);this._x=a.x*d;this._y=a.y*d;this._z=a.z*d;this._w=Math.cos(c);this.onChangeCallback();return this},setFromRotationMatrix:function(a){var b=a.elements,c=b[0];a=b[4];var d=b[8],e=b[1],f=b[5],g=b[9],h=b[2],k=b[6],b=b[10],l=c+f+b;0<l?(c=.5/Math.sqrt(l+1),this._w=.25/c,this._x=(k-g)*c,this._y=(d-h)*c,this._z=(e-a)*c):c>f&&c>b?(c=2*Math.sqrt(1+c-f-b),this._w=(k-g)/c,this._x=.25*c,this._y=(a+e)/c,this._z=(d+h)/c):f>b?(c=2*Math.sqrt(1+f-c-b),this._w=(d-h)/c,this._x=(a+e)/c,this._y=
1886.25*c,this._z=(g+k)/c):(c=2*Math.sqrt(1+b-c-f),this._w=(e-a)/c,this._x=(d+h)/c,this._y=(g+k)/c,this._z=.25*c);this.onChangeCallback();return this},setFromUnitVectors:function(){var a,b;return function(c,d){void 0===a&&(a=new THREE.Vector3);b=c.dot(d)+1;1E-6>b?(b=0,Math.abs(c.x)>Math.abs(c.z)?a.set(-c.y,c.x,0):a.set(0,-c.z,c.y)):a.crossVectors(c,d);this._x=a.x;this._y=a.y;this._z=a.z;this._w=b;this.normalize();return this}}(),inverse:function(){this.conjugate().normalize();return this},conjugate:function(){this._x*=
1887-1;this._y*=-1;this._z*=-1;this.onChangeCallback();return this},dot:function(a){return this._x*a._x+this._y*a._y+this._z*a._z+this._w*a._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 a=this.length();0===a?(this._z=this._y=this._x=0,this._w=1):(a=1/a,this._x*=a,this._y*=a,this._z*=a,this._w*=a);this.onChangeCallback();return this},
1888multiply:function(a,b){return void 0!==b?(console.warn("THREE.Quaternion: .multiply() now only accepts one argument. Use .multiplyQuaternions( a, b ) instead."),this.multiplyQuaternions(a,b)):this.multiplyQuaternions(this,a)},multiplyQuaternions:function(a,b){var c=a._x,d=a._y,e=a._z,f=a._w,g=b._x,h=b._y,k=b._z,l=b._w;this._x=c*l+f*g+d*k-e*h;this._y=d*l+f*h+e*g-c*k;this._z=e*l+f*k+c*h-d*g;this._w=f*l-c*g-d*h-e*k;this.onChangeCallback();return this},slerp:function(a,b){if(0===b)return this;if(1===
1889b)return this.copy(a);var c=this._x,d=this._y,e=this._z,f=this._w,g=f*a._w+c*a._x+d*a._y+e*a._z;0>g?(this._w=-a._w,this._x=-a._x,this._y=-a._y,this._z=-a._z,g=-g):this.copy(a);if(1<=g)return this._w=f,this._x=c,this._y=d,this._z=e,this;var h=Math.sqrt(1-g*g);if(.001>Math.abs(h))return this._w=.5*(f+this._w),this._x=.5*(c+this._x),this._y=.5*(d+this._y),this._z=.5*(e+this._z),this;var k=Math.atan2(h,g),g=Math.sin((1-b)*k)/h,h=Math.sin(b*k)/h;this._w=f*g+this._w*h;this._x=c*g+this._x*h;this._y=d*g+
1890this._y*h;this._z=e*g+this._z*h;this.onChangeCallback();return this},equals:function(a){return a._x===this._x&&a._y===this._y&&a._z===this._z&&a._w===this._w},fromArray:function(a,b){void 0===b&&(b=0);this._x=a[b];this._y=a[b+1];this._z=a[b+2];this._w=a[b+3];this.onChangeCallback();return this},toArray:function(a,b){void 0===a&&(a=[]);void 0===b&&(b=0);a[b]=this._x;a[b+1]=this._y;a[b+2]=this._z;a[b+3]=this._w;return a},onChange:function(a){this.onChangeCallback=a;return this},onChangeCallback:function(){}};
1891Object.assign(THREE.Quaternion,{slerp:function(a,b,c,d){return c.copy(a).slerp(b,d)},slerpFlat:function(a,b,c,d,e,f,g){var h=c[d+0],k=c[d+1],l=c[d+2];c=c[d+3];d=e[f+0];var p=e[f+1],n=e[f+2];e=e[f+3];if(c!==e||h!==d||k!==p||l!==n){f=1-g;var m=h*d+k*p+l*n+c*e,q=0<=m?1:-1,u=1-m*m;u>Number.EPSILON&&(u=Math.sqrt(u),m=Math.atan2(u,m*q),f=Math.sin(f*m)/u,g=Math.sin(g*m)/u);q*=g;h=h*f+d*q;k=k*f+p*q;l=l*f+n*q;c=c*f+e*q;f===1-g&&(g=1/Math.sqrt(h*h+k*k+l*l+c*c),h*=g,k*=g,l*=g,c*=g)}a[b]=h;a[b+1]=k;a[b+2]=l;
1892a[b+3]=c}});THREE.Vector2=function(a,b){this.x=a||0;this.y=b||0};
1893THREE.Vector2.prototype={constructor:THREE.Vector2,get width(){return this.x},set width(a){this.x=a},get height(){return this.y},set height(a){this.y=a},set:function(a,b){this.x=a;this.y=b;return this},setScalar:function(a){this.y=this.x=a;return this},setX:function(a){this.x=a;return this},setY:function(a){this.y=a;return this},setComponent:function(a,b){switch(a){case 0:this.x=b;break;case 1:this.y=b;break;default:throw Error("index is out of range: "+a);}},getComponent:function(a){switch(a){case 0:return this.x;
1894case 1:return this.y;default:throw Error("index is out of range: "+a);}},clone:function(){return new this.constructor(this.x,this.y)},copy:function(a){this.x=a.x;this.y=a.y;return this},add:function(a,b){if(void 0!==b)return console.warn("THREE.Vector2: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(a,b);this.x+=a.x;this.y+=a.y;return this},addScalar:function(a){this.x+=a;this.y+=a;return this},addVectors:function(a,b){this.x=a.x+b.x;this.y=a.y+b.y;return this},
1895addScaledVector:function(a,b){this.x+=a.x*b;this.y+=a.y*b;return this},sub:function(a,b){if(void 0!==b)return console.warn("THREE.Vector2: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(a,b);this.x-=a.x;this.y-=a.y;return this},subScalar:function(a){this.x-=a;this.y-=a;return this},subVectors:function(a,b){this.x=a.x-b.x;this.y=a.y-b.y;return this},multiply:function(a){this.x*=a.x;this.y*=a.y;return this},multiplyScalar:function(a){isFinite(a)?(this.x*=a,
1896this.y*=a):this.y=this.x=0;return this},divide:function(a){this.x/=a.x;this.y/=a.y;return this},divideScalar:function(a){return this.multiplyScalar(1/a)},min:function(a){this.x=Math.min(this.x,a.x);this.y=Math.min(this.y,a.y);return this},max:function(a){this.x=Math.max(this.x,a.x);this.y=Math.max(this.y,a.y);return this},clamp:function(a,b){this.x=Math.max(a.x,Math.min(b.x,this.x));this.y=Math.max(a.y,Math.min(b.y,this.y));return this},clampScalar:function(){var a,b;return function(c,d){void 0===
1897a&&(a=new THREE.Vector2,b=new THREE.Vector2);a.set(c,c);b.set(d,d);return this.clamp(a,b)}}(),clampLength:function(a,b){var c=this.length();this.multiplyScalar(Math.max(a,Math.min(b,c))/c);return this},floor:function(){this.x=Math.floor(this.x);this.y=Math.floor(this.y);return this},ceil:function(){this.x=Math.ceil(this.x);this.y=Math.ceil(this.y);return this},round:function(){this.x=Math.round(this.x);this.y=Math.round(this.y);return this},roundToZero:function(){this.x=0>this.x?Math.ceil(this.x):
1898Math.floor(this.x);this.y=0>this.y?Math.ceil(this.y):Math.floor(this.y);return this},negate:function(){this.x=-this.x;this.y=-this.y;return this},dot:function(a){return this.x*a.x+this.y*a.y},lengthSq:function(){return this.x*this.x+this.y*this.y},length:function(){return Math.sqrt(this.x*this.x+this.y*this.y)},lengthManhattan:function(){return Math.abs(this.x)+Math.abs(this.y)},normalize:function(){return this.divideScalar(this.length())},angle:function(){var a=Math.atan2(this.y,this.x);0>a&&(a+=
18992*Math.PI);return a},distanceTo:function(a){return Math.sqrt(this.distanceToSquared(a))},distanceToSquared:function(a){var b=this.x-a.x;a=this.y-a.y;return b*b+a*a},setLength:function(a){return this.multiplyScalar(a/this.length())},lerp:function(a,b){this.x+=(a.x-this.x)*b;this.y+=(a.y-this.y)*b;return this},lerpVectors:function(a,b,c){this.subVectors(b,a).multiplyScalar(c).add(a);return this},equals:function(a){return a.x===this.x&&a.y===this.y},fromArray:function(a,b){void 0===b&&(b=0);this.x=a[b];
1900this.y=a[b+1];return this},toArray:function(a,b){void 0===a&&(a=[]);void 0===b&&(b=0);a[b]=this.x;a[b+1]=this.y;return a},fromAttribute:function(a,b,c){void 0===c&&(c=0);b=b*a.itemSize+c;this.x=a.array[b];this.y=a.array[b+1];return this},rotateAround:function(a,b){var c=Math.cos(b),d=Math.sin(b),e=this.x-a.x,f=this.y-a.y;this.x=e*c-f*d+a.x;this.y=e*d+f*c+a.y;return this}};THREE.Vector3=function(a,b,c){this.x=a||0;this.y=b||0;this.z=c||0};
1901THREE.Vector3.prototype={constructor:THREE.Vector3,set:function(a,b,c){this.x=a;this.y=b;this.z=c;return this},setScalar:function(a){this.z=this.y=this.x=a;return this},setX:function(a){this.x=a;return this},setY:function(a){this.y=a;return this},setZ:function(a){this.z=a;return this},setComponent:function(a,b){switch(a){case 0:this.x=b;break;case 1:this.y=b;break;case 2:this.z=b;break;default:throw Error("index is out of range: "+a);}},getComponent:function(a){switch(a){case 0:return this.x;case 1:return this.y;
1902case 2:return this.z;default:throw Error("index is out of range: "+a);}},clone:function(){return new this.constructor(this.x,this.y,this.z)},copy:function(a){this.x=a.x;this.y=a.y;this.z=a.z;return this},add:function(a,b){if(void 0!==b)return console.warn("THREE.Vector3: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(a,b);this.x+=a.x;this.y+=a.y;this.z+=a.z;return this},addScalar:function(a){this.x+=a;this.y+=a;this.z+=a;return this},addVectors:function(a,
1903b){this.x=a.x+b.x;this.y=a.y+b.y;this.z=a.z+b.z;return this},addScaledVector:function(a,b){this.x+=a.x*b;this.y+=a.y*b;this.z+=a.z*b;return this},sub:function(a,b){if(void 0!==b)return console.warn("THREE.Vector3: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(a,b);this.x-=a.x;this.y-=a.y;this.z-=a.z;return this},subScalar:function(a){this.x-=a;this.y-=a;this.z-=a;return this},subVectors:function(a,b){this.x=a.x-b.x;this.y=a.y-b.y;this.z=a.z-b.z;return this},
1904multiply:function(a,b){if(void 0!==b)return console.warn("THREE.Vector3: .multiply() now only accepts one argument. Use .multiplyVectors( a, b ) instead."),this.multiplyVectors(a,b);this.x*=a.x;this.y*=a.y;this.z*=a.z;return this},multiplyScalar:function(a){isFinite(a)?(this.x*=a,this.y*=a,this.z*=a):this.z=this.y=this.x=0;return this},multiplyVectors:function(a,b){this.x=a.x*b.x;this.y=a.y*b.y;this.z=a.z*b.z;return this},applyEuler:function(){var a;return function(b){!1===b instanceof THREE.Euler&&
1905console.error("THREE.Vector3: .applyEuler() now expects an Euler rotation rather than a Vector3 and order.");void 0===a&&(a=new THREE.Quaternion);this.applyQuaternion(a.setFromEuler(b));return this}}(),applyAxisAngle:function(){var a;return function(b,c){void 0===a&&(a=new THREE.Quaternion);this.applyQuaternion(a.setFromAxisAngle(b,c));return this}}(),applyMatrix3:function(a){var b=this.x,c=this.y,d=this.z;a=a.elements;this.x=a[0]*b+a[3]*c+a[6]*d;this.y=a[1]*b+a[4]*c+a[7]*d;this.z=a[2]*b+a[5]*c+a[8]*
1906d;return this},applyMatrix4:function(a){var b=this.x,c=this.y,d=this.z;a=a.elements;this.x=a[0]*b+a[4]*c+a[8]*d+a[12];this.y=a[1]*b+a[5]*c+a[9]*d+a[13];this.z=a[2]*b+a[6]*c+a[10]*d+a[14];return this},applyProjection:function(a){var b=this.x,c=this.y,d=this.z;a=a.elements;var e=1/(a[3]*b+a[7]*c+a[11]*d+a[15]);this.x=(a[0]*b+a[4]*c+a[8]*d+a[12])*e;this.y=(a[1]*b+a[5]*c+a[9]*d+a[13])*e;this.z=(a[2]*b+a[6]*c+a[10]*d+a[14])*e;return this},applyQuaternion:function(a){var b=this.x,c=this.y,d=this.z,e=a.x,
1907f=a.y,g=a.z;a=a.w;var h=a*b+f*d-g*c,k=a*c+g*b-e*d,l=a*d+e*c-f*b,b=-e*b-f*c-g*d;this.x=h*a+b*-e+k*-g-l*-f;this.y=k*a+b*-f+l*-e-h*-g;this.z=l*a+b*-g+h*-f-k*-e;return this},project:function(){var a;return function(b){void 0===a&&(a=new THREE.Matrix4);a.multiplyMatrices(b.projectionMatrix,a.getInverse(b.matrixWorld));return this.applyProjection(a)}}(),unproject:function(){var a;return function(b){void 0===a&&(a=new THREE.Matrix4);a.multiplyMatrices(b.matrixWorld,a.getInverse(b.projectionMatrix));return this.applyProjection(a)}}(),
1908transformDirection:function(a){var b=this.x,c=this.y,d=this.z;a=a.elements;this.x=a[0]*b+a[4]*c+a[8]*d;this.y=a[1]*b+a[5]*c+a[9]*d;this.z=a[2]*b+a[6]*c+a[10]*d;this.normalize();return this},divide:function(a){this.x/=a.x;this.y/=a.y;this.z/=a.z;return this},divideScalar:function(a){return this.multiplyScalar(1/a)},min:function(a){this.x=Math.min(this.x,a.x);this.y=Math.min(this.y,a.y);this.z=Math.min(this.z,a.z);return this},max:function(a){this.x=Math.max(this.x,a.x);this.y=Math.max(this.y,a.y);
1909this.z=Math.max(this.z,a.z);return this},clamp:function(a,b){this.x=Math.max(a.x,Math.min(b.x,this.x));this.y=Math.max(a.y,Math.min(b.y,this.y));this.z=Math.max(a.z,Math.min(b.z,this.z));return this},clampScalar:function(){var a,b;return function(c,d){void 0===a&&(a=new THREE.Vector3,b=new THREE.Vector3);a.set(c,c,c);b.set(d,d,d);return this.clamp(a,b)}}(),clampLength:function(a,b){var c=this.length();this.multiplyScalar(Math.max(a,Math.min(b,c))/c);return this},floor:function(){this.x=Math.floor(this.x);
1910this.y=Math.floor(this.y);this.z=Math.floor(this.z);return this},ceil:function(){this.x=Math.ceil(this.x);this.y=Math.ceil(this.y);this.z=Math.ceil(this.z);return this},round:function(){this.x=Math.round(this.x);this.y=Math.round(this.y);this.z=Math.round(this.z);return this},roundToZero:function(){this.x=0>this.x?Math.ceil(this.x):Math.floor(this.x);this.y=0>this.y?Math.ceil(this.y):Math.floor(this.y);this.z=0>this.z?Math.ceil(this.z):Math.floor(this.z);return this},negate:function(){this.x=-this.x;
1911this.y=-this.y;this.z=-this.z;return this},dot:function(a){return this.x*a.x+this.y*a.y+this.z*a.z},lengthSq:function(){return this.x*this.x+this.y*this.y+this.z*this.z},length:function(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)},lengthManhattan:function(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)},normalize:function(){return this.divideScalar(this.length())},setLength:function(a){return this.multiplyScalar(a/this.length())},lerp:function(a,b){this.x+=(a.x-this.x)*
1912b;this.y+=(a.y-this.y)*b;this.z+=(a.z-this.z)*b;return this},lerpVectors:function(a,b,c){this.subVectors(b,a).multiplyScalar(c).add(a);return this},cross:function(a,b){if(void 0!==b)return console.warn("THREE.Vector3: .cross() now only accepts one argument. Use .crossVectors( a, b ) instead."),this.crossVectors(a,b);var c=this.x,d=this.y,e=this.z;this.x=d*a.z-e*a.y;this.y=e*a.x-c*a.z;this.z=c*a.y-d*a.x;return this},crossVectors:function(a,b){var c=a.x,d=a.y,e=a.z,f=b.x,g=b.y,h=b.z;this.x=d*h-e*g;
1913this.y=e*f-c*h;this.z=c*g-d*f;return this},projectOnVector:function(){var a,b;return function(c){void 0===a&&(a=new THREE.Vector3);a.copy(c).normalize();b=this.dot(a);return this.copy(a).multiplyScalar(b)}}(),projectOnPlane:function(){var a;return function(b){void 0===a&&(a=new THREE.Vector3);a.copy(this).projectOnVector(b);return this.sub(a)}}(),reflect:function(){var a;return function(b){void 0===a&&(a=new THREE.Vector3);return this.sub(a.copy(b).multiplyScalar(2*this.dot(b)))}}(),angleTo:function(a){a=
1914this.dot(a)/Math.sqrt(this.lengthSq()*a.lengthSq());return Math.acos(THREE.Math.clamp(a,-1,1))},distanceTo:function(a){return Math.sqrt(this.distanceToSquared(a))},distanceToSquared:function(a){var b=this.x-a.x,c=this.y-a.y;a=this.z-a.z;return b*b+c*c+a*a},setFromSpherical:function(a){var b=Math.sin(a.phi)*a.radius;this.x=b*Math.sin(a.theta);this.y=Math.cos(a.phi)*a.radius;this.z=b*Math.cos(a.theta);return this},setFromMatrixPosition:function(a){return this.setFromMatrixColumn(a,3)},setFromMatrixScale:function(a){var b=
1915this.setFromMatrixColumn(a,0).length(),c=this.setFromMatrixColumn(a,1).length();a=this.setFromMatrixColumn(a,2).length();this.x=b;this.y=c;this.z=a;return this},setFromMatrixColumn:function(a,b){"number"===typeof a&&(console.warn("THREE.Vector3: setFromMatrixColumn now expects ( matrix, index )."),b=a=b);return this.fromArray(a.elements,4*b)},equals:function(a){return a.x===this.x&&a.y===this.y&&a.z===this.z},fromArray:function(a,b){void 0===b&&(b=0);this.x=a[b];this.y=a[b+1];this.z=a[b+2];return this},
1916toArray:function(a,b){void 0===a&&(a=[]);void 0===b&&(b=0);a[b]=this.x;a[b+1]=this.y;a[b+2]=this.z;return a},fromAttribute:function(a,b,c){void 0===c&&(c=0);b=b*a.itemSize+c;this.x=a.array[b];this.y=a.array[b+1];this.z=a.array[b+2];return this}};THREE.Vector4=function(a,b,c,d){this.x=a||0;this.y=b||0;this.z=c||0;this.w=void 0!==d?d:1};
1917THREE.Vector4.prototype={constructor:THREE.Vector4,set:function(a,b,c,d){this.x=a;this.y=b;this.z=c;this.w=d;return this},setScalar:function(a){this.w=this.z=this.y=this.x=a;return this},setX:function(a){this.x=a;return this},setY:function(a){this.y=a;return this},setZ:function(a){this.z=a;return this},setW:function(a){this.w=a;return this},setComponent:function(a,b){switch(a){case 0:this.x=b;break;case 1:this.y=b;break;case 2:this.z=b;break;case 3:this.w=b;break;default:throw Error("index is out of range: "+
1918a);}},getComponent:function(a){switch(a){case 0:return this.x;case 1:return this.y;case 2:return this.z;case 3:return this.w;default:throw Error("index is out of range: "+a);}},clone:function(){return new this.constructor(this.x,this.y,this.z,this.w)},copy:function(a){this.x=a.x;this.y=a.y;this.z=a.z;this.w=void 0!==a.w?a.w:1;return this},add:function(a,b){if(void 0!==b)return console.warn("THREE.Vector4: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(a,b);
1919this.x+=a.x;this.y+=a.y;this.z+=a.z;this.w+=a.w;return this},addScalar:function(a){this.x+=a;this.y+=a;this.z+=a;this.w+=a;return this},addVectors:function(a,b){this.x=a.x+b.x;this.y=a.y+b.y;this.z=a.z+b.z;this.w=a.w+b.w;return this},addScaledVector:function(a,b){this.x+=a.x*b;this.y+=a.y*b;this.z+=a.z*b;this.w+=a.w*b;return this},sub:function(a,b){if(void 0!==b)return console.warn("THREE.Vector4: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(a,b);this.x-=
1920a.x;this.y-=a.y;this.z-=a.z;this.w-=a.w;return this},subScalar:function(a){this.x-=a;this.y-=a;this.z-=a;this.w-=a;return this},subVectors:function(a,b){this.x=a.x-b.x;this.y=a.y-b.y;this.z=a.z-b.z;this.w=a.w-b.w;return this},multiplyScalar:function(a){isFinite(a)?(this.x*=a,this.y*=a,this.z*=a,this.w*=a):this.w=this.z=this.y=this.x=0;return this},applyMatrix4:function(a){var b=this.x,c=this.y,d=this.z,e=this.w;a=a.elements;this.x=a[0]*b+a[4]*c+a[8]*d+a[12]*e;this.y=a[1]*b+a[5]*c+a[9]*d+a[13]*e;this.z=
1921a[2]*b+a[6]*c+a[10]*d+a[14]*e;this.w=a[3]*b+a[7]*c+a[11]*d+a[15]*e;return this},divideScalar:function(a){return this.multiplyScalar(1/a)},setAxisAngleFromQuaternion:function(a){this.w=2*Math.acos(a.w);var b=Math.sqrt(1-a.w*a.w);1E-4>b?(this.x=1,this.z=this.y=0):(this.x=a.x/b,this.y=a.y/b,this.z=a.z/b);return this},setAxisAngleFromRotationMatrix:function(a){var b,c,d;a=a.elements;var e=a[0];d=a[4];var f=a[8],g=a[1],h=a[5],k=a[9];c=a[2];b=a[6];var l=a[10];if(.01>Math.abs(d-g)&&.01>Math.abs(f-c)&&.01>
1922Math.abs(k-b)){if(.1>Math.abs(d+g)&&.1>Math.abs(f+c)&&.1>Math.abs(k+b)&&.1>Math.abs(e+h+l-3))return this.set(1,0,0,0),this;a=Math.PI;e=(e+1)/2;h=(h+1)/2;l=(l+1)/2;d=(d+g)/4;f=(f+c)/4;k=(k+b)/4;e>h&&e>l?.01>e?(b=0,d=c=.707106781):(b=Math.sqrt(e),c=d/b,d=f/b):h>l?.01>h?(b=.707106781,c=0,d=.707106781):(c=Math.sqrt(h),b=d/c,d=k/c):.01>l?(c=b=.707106781,d=0):(d=Math.sqrt(l),b=f/d,c=k/d);this.set(b,c,d,a);return this}a=Math.sqrt((b-k)*(b-k)+(f-c)*(f-c)+(g-d)*(g-d));.001>Math.abs(a)&&(a=1);this.x=(b-k)/
1923a;this.y=(f-c)/a;this.z=(g-d)/a;this.w=Math.acos((e+h+l-1)/2);return this},min:function(a){this.x=Math.min(this.x,a.x);this.y=Math.min(this.y,a.y);this.z=Math.min(this.z,a.z);this.w=Math.min(this.w,a.w);return this},max:function(a){this.x=Math.max(this.x,a.x);this.y=Math.max(this.y,a.y);this.z=Math.max(this.z,a.z);this.w=Math.max(this.w,a.w);return this},clamp:function(a,b){this.x=Math.max(a.x,Math.min(b.x,this.x));this.y=Math.max(a.y,Math.min(b.y,this.y));this.z=Math.max(a.z,Math.min(b.z,this.z));
1924this.w=Math.max(a.w,Math.min(b.w,this.w));return this},clampScalar:function(){var a,b;return function(c,d){void 0===a&&(a=new THREE.Vector4,b=new THREE.Vector4);a.set(c,c,c,c);b.set(d,d,d,d);return this.clamp(a,b)}}(),floor:function(){this.x=Math.floor(this.x);this.y=Math.floor(this.y);this.z=Math.floor(this.z);this.w=Math.floor(this.w);return this},ceil:function(){this.x=Math.ceil(this.x);this.y=Math.ceil(this.y);this.z=Math.ceil(this.z);this.w=Math.ceil(this.w);return this},round:function(){this.x=
1925Math.round(this.x);this.y=Math.round(this.y);this.z=Math.round(this.z);this.w=Math.round(this.w);return this},roundToZero:function(){this.x=0>this.x?Math.ceil(this.x):Math.floor(this.x);this.y=0>this.y?Math.ceil(this.y):Math.floor(this.y);this.z=0>this.z?Math.ceil(this.z):Math.floor(this.z);this.w=0>this.w?Math.ceil(this.w):Math.floor(this.w);return this},negate:function(){this.x=-this.x;this.y=-this.y;this.z=-this.z;this.w=-this.w;return this},dot:function(a){return this.x*a.x+this.y*a.y+this.z*
1926a.z+this.w*a.w},lengthSq:function(){return this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w},length:function(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)},lengthManhattan:function(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)+Math.abs(this.w)},normalize:function(){return this.divideScalar(this.length())},setLength:function(a){return this.multiplyScalar(a/this.length())},lerp:function(a,b){this.x+=(a.x-this.x)*b;this.y+=(a.y-this.y)*b;this.z+=(a.z-
1927this.z)*b;this.w+=(a.w-this.w)*b;return this},lerpVectors:function(a,b,c){this.subVectors(b,a).multiplyScalar(c).add(a);return this},equals:function(a){return a.x===this.x&&a.y===this.y&&a.z===this.z&&a.w===this.w},fromArray:function(a,b){void 0===b&&(b=0);this.x=a[b];this.y=a[b+1];this.z=a[b+2];this.w=a[b+3];return this},toArray:function(a,b){void 0===a&&(a=[]);void 0===b&&(b=0);a[b]=this.x;a[b+1]=this.y;a[b+2]=this.z;a[b+3]=this.w;return a},fromAttribute:function(a,b,c){void 0===c&&(c=0);b=b*a.itemSize+
1928c;this.x=a.array[b];this.y=a.array[b+1];this.z=a.array[b+2];this.w=a.array[b+3];return this}};THREE.Euler=function(a,b,c,d){this._x=a||0;this._y=b||0;this._z=c||0;this._order=d||THREE.Euler.DefaultOrder};THREE.Euler.RotationOrders="XYZ YZX ZXY XZY YXZ ZYX".split(" ");THREE.Euler.DefaultOrder="XYZ";
1929THREE.Euler.prototype={constructor:THREE.Euler,get x(){return this._x},set x(a){this._x=a;this.onChangeCallback()},get y(){return this._y},set y(a){this._y=a;this.onChangeCallback()},get z(){return this._z},set z(a){this._z=a;this.onChangeCallback()},get order(){return this._order},set order(a){this._order=a;this.onChangeCallback()},set:function(a,b,c,d){this._x=a;this._y=b;this._z=c;this._order=d||this._order;this.onChangeCallback();return this},clone:function(){return new this.constructor(this._x,
1930this._y,this._z,this._order)},copy:function(a){this._x=a._x;this._y=a._y;this._z=a._z;this._order=a._order;this.onChangeCallback();return this},setFromRotationMatrix:function(a,b,c){var d=THREE.Math.clamp,e=a.elements;a=e[0];var f=e[4],g=e[8],h=e[1],k=e[5],l=e[9],p=e[2],n=e[6],e=e[10];b=b||this._order;"XYZ"===b?(this._y=Math.asin(d(g,-1,1)),.99999>Math.abs(g)?(this._x=Math.atan2(-l,e),this._z=Math.atan2(-f,a)):(this._x=Math.atan2(n,k),this._z=0)):"YXZ"===b?(this._x=Math.asin(-d(l,-1,1)),.99999>Math.abs(l)?
1931(this._y=Math.atan2(g,e),this._z=Math.atan2(h,k)):(this._y=Math.atan2(-p,a),this._z=0)):"ZXY"===b?(this._x=Math.asin(d(n,-1,1)),.99999>Math.abs(n)?(this._y=Math.atan2(-p,e),this._z=Math.atan2(-f,k)):(this._y=0,this._z=Math.atan2(h,a))):"ZYX"===b?(this._y=Math.asin(-d(p,-1,1)),.99999>Math.abs(p)?(this._x=Math.atan2(n,e),this._z=Math.atan2(h,a)):(this._x=0,this._z=Math.atan2(-f,k))):"YZX"===b?(this._z=Math.asin(d(h,-1,1)),.99999>Math.abs(h)?(this._x=Math.atan2(-l,k),this._y=Math.atan2(-p,a)):(this._x=
19320,this._y=Math.atan2(g,e))):"XZY"===b?(this._z=Math.asin(-d(f,-1,1)),.99999>Math.abs(f)?(this._x=Math.atan2(n,k),this._y=Math.atan2(g,a)):(this._x=Math.atan2(-l,e),this._y=0)):console.warn("THREE.Euler: .setFromRotationMatrix() given unsupported order: "+b);this._order=b;if(!1!==c)this.onChangeCallback();return this},setFromQuaternion:function(){var a;return function(b,c,d){void 0===a&&(a=new THREE.Matrix4);a.makeRotationFromQuaternion(b);this.setFromRotationMatrix(a,c,d);return this}}(),setFromVector3:function(a,
1933b){return this.set(a.x,a.y,a.z,b||this._order)},reorder:function(){var a=new THREE.Quaternion;return function(b){a.setFromEuler(this);this.setFromQuaternion(a,b)}}(),equals:function(a){return a._x===this._x&&a._y===this._y&&a._z===this._z&&a._order===this._order},fromArray:function(a){this._x=a[0];this._y=a[1];this._z=a[2];void 0!==a[3]&&(this._order=a[3]);this.onChangeCallback();return this},toArray:function(a,b){void 0===a&&(a=[]);void 0===b&&(b=0);a[b]=this._x;a[b+1]=this._y;a[b+2]=this._z;a[b+
19343]=this._order;return a},toVector3:function(a){return a?a.set(this._x,this._y,this._z):new THREE.Vector3(this._x,this._y,this._z)},onChange:function(a){this.onChangeCallback=a;return this},onChangeCallback:function(){}};THREE.Line3=function(a,b){this.start=void 0!==a?a:new THREE.Vector3;this.end=void 0!==b?b:new THREE.Vector3};
1935THREE.Line3.prototype={constructor:THREE.Line3,set:function(a,b){this.start.copy(a);this.end.copy(b);return this},clone:function(){return(new this.constructor).copy(this)},copy:function(a){this.start.copy(a.start);this.end.copy(a.end);return this},center:function(a){return(a||new THREE.Vector3).addVectors(this.start,this.end).multiplyScalar(.5)},delta:function(a){return(a||new THREE.Vector3).subVectors(this.end,this.start)},distanceSq:function(){return this.start.distanceToSquared(this.end)},distance:function(){return this.start.distanceTo(this.end)},
1936at:function(a,b){var c=b||new THREE.Vector3;return this.delta(c).multiplyScalar(a).add(this.start)},closestPointToPointParameter:function(){var a=new THREE.Vector3,b=new THREE.Vector3;return function(c,d){a.subVectors(c,this.start);b.subVectors(this.end,this.start);var e=b.dot(b),e=b.dot(a)/e;d&&(e=THREE.Math.clamp(e,0,1));return e}}(),closestPointToPoint:function(a,b,c){a=this.closestPointToPointParameter(a,b);c=c||new THREE.Vector3;return this.delta(c).multiplyScalar(a).add(this.start)}
1936,applyMatrix4:function(a){this.start.applyMatrix4(a);
1937this.end.applyMatrix4(a);return this},equals:function(a){return a.start.equals(this.start)&&a.end.equals(this.end)}};THREE.Box2=function(a,b){this.min=void 0!==a?a:new THREE.Vector2(Infinity,Infinity);this.max=void 0!==b?b:new THREE.Vector2(-Infinity,-Infinity)};
1938THREE.Box2.prototype={constructor:THREE.Box2,set:function(a,b){this.min.copy(a);this.max.copy(b);return this},setFromPoints:function(a){this.makeEmpty();for(var b=0,c=a.length;b<c;b++)this.expandByPoint(a[b]);return this},setFromCenterAndSize:function(){var a=new THREE.Vector2;return function(b,c){var d=a.copy(c).multiplyScalar(.5);this.min.copy(b).sub(d);this.max.copy(b).add(d);return this}}(),clone:function(){return(new this.constructor).copy(this)},copy:function(a){this.min.copy(a.min);this.max.copy(a.max);
1939return this},makeEmpty:function(){this.min.x=this.min.y=Infinity;this.max.x=this.max.y=-Infinity;return this},isEmpty:function(){return this.max.x<this.min.x||this.max.y<this.min.y},center:function(a){return(a||new THREE.Vector2).addVectors(this.min,this.max).multiplyScalar(.5)},size:function(a){return(a||new THREE.Vector2).subVectors(this.max,this.min)},expandByPoint:function(a){this.min.min(a);this.max.max(a);return this},expandByVector:function(a){this.min.sub(a);this.max.add(a);return this},expandByScalar:function(a){this.min.addScalar(-a);
1940this.max.addScalar(a);return this},containsPoint:function(a){return a.x<this.min.x||a.x>this.max.x||a.y<this.min.y||a.y>this.max.y?!1:!0},containsBox:function(a){return this.min.x<=a.min.x&&a.max.x<=this.max.x&&this.min.y<=a.min.y&&a.max.y<=this.max.y?!0:!1},getParameter:function(a,b){return(b||new THREE.Vector2).set((a.x-this.min.x)/(this.max.x-this.min.x),(a.y-this.min.y)/(this.max.y-this.min.y))},intersectsBox:function(a){return a.max.x<this.min.x||a.min.x>this.max.x||a.max.y<this.min.y||a.min.y>
1941this.max.y?!1:!0},clampPoint:function(a,b){return(b||new THREE.Vector2).copy(a).clamp(this.min,this.max)},distanceToPoint:function(){var a=new THREE.Vector2;return function(b){return a.copy(b).clamp(this.min,this.max).sub(b).length()}}(),intersect:function(a){this.min.max(a.min);this.max.min(a.max);return this},union:function(a){this.min.min(a.min);this.max.max(a.max);return this},translate:function(a){this.min.add(a);this.max.add(a);return this},equals:function(a){return a.min.equals(this.min)&&
1942a.max.equals(this.max)}};THREE.Box3=function(a,b){this.min=void 0!==a?a:new THREE.Vector3(Infinity,Infinity,Infinity);this.max=void 0!==b?b:new THREE.Vector3(-Infinity,-Infinity,-Infinity)};
1943THREE.Box3.prototype={constructor:THREE.Box3,set:function(a,b){this.min.copy(a);this.max.copy(b);return this},setFromArray:function(a){this.makeEmpty();for(var b=Infinity,c=Infinity,d=Infinity,e=-Infinity,f=-Infinity,g=-Infinity,h=0,k=a.length;h<k;h+=3){var l=a[h],p=a[h+1],n=a[h+2];l<b&&(b=l);p<c&&(c=p);n<d&&(d=n);l>e&&(e=l);p>f&&(f=p);n>g&&(g=n)}this.min.set(b,c,d);this.max.set(e,f,g)},setFromPoints:function(a){this.makeEmpty();for(var b=0,c=a.length;b<c;b++)this.expandByPoint(a[b]);return this},
1944setFromCenterAndSize:function(){var a=new THREE.Vector3;return function(b,c){var d=a.copy(c).multiplyScalar(.5);this.min.copy(b).sub(d);this.max.copy(b).add(d);return this}}(),setFromObject:function(){var a;return function(b){void 0===a&&(a=new THREE.Box3);var c=this;this.makeEmpty();b.updateMatrixWorld(!0);b.traverse(function(b){var e=b.geometry;void 0!==e&&(null===e.boundingBox&&e.computeBoundingBox(),!1===e.boundingBox.isEmpty()&&(a.copy(e.boundingBox),a.applyMatrix4(b.matrixWorld),c.union(a)))});
1945return this}}(),clone:function(){return(new this.constructor).copy(this)},copy:function(a){this.min.copy(a.min);this.max.copy(a.max);return this},makeEmpty:function(){this.min.x=this.min.y=this.min.z=Infinity;this.max.x=this.max.y=this.max.z=-Infinity;return this},isEmpty:function(){return this.max.x<this.min.x||this.max.y<this.min.y||this.max.z<this.min.z},center:function(a){return(a||new THREE.Vector3).addVectors(this.min,this.max).multiplyScalar(.5)},size:function(a){return(a||new THREE.Vector3).subVectors(this.max,
1946this.min)},expandByPoint:function(a){this.min.min(a);this.max.max(a);return this},expandByVector:function(a){this.min.sub(a);this.max.add(a);return this},expandByScalar:function(a){this.min.addScalar(-a);this.max.addScalar(a);return this},containsPoint:function(a){return a.x<this.min.x||a.x>this.max.x||a.y<this.min.y||a.y>this.max.y||a.z<this.min.z||a.z>this.max.z?!1:!0},containsBox:function(a){return this.min.x<=a.min.x&&a.max.x<=this.max.x&&this.min.y<=a.min.y&&a.max.y<=this.max.y&&this.min.z<=
1947a.min.z&&a.max.z<=this.max.z?!0:!1},getParameter:function(a,b){return(b||new THREE.Vector3).set((a.x-this.min.x)/(this.max.x-this.min.x),(a.y-this.min.y)/(this.max.y-this.min.y),(a.z-this.min.z)/(this.max.z-this.min.z))},intersectsBox:function(a){return a.max.x<this.min.x||a.min.x>this.max.x||a.max.y<this.min.y||a.min.y>this.max.y||a.max.z<this.min.z||a.min.z>this.max.z?!1:!0},intersectsSphere:function(){var a;return function(b){void 0===a&&(a=new THREE.Vector3);this.clampPoint(b.center,a);return a.distanceToSquared(b.center)<=
1948b.radius*b.radius}}(),intersectsPlane:function(a){var b,c;0<a.normal.x?(b=a.normal.x*this.min.x,c=a.normal.x*this.max.x):(b=a.normal.x*this.max.x,c=a.normal.x*this.min.x);0<a.normal.y?(b+=a.normal.y*this.min.y,c+=a.normal.y*this.max.y):(b+=a.normal.y*this.max.y,c+=a.normal.y*this.min.y);0<a.normal.z?(b+=a.normal.z*this.min.z,c+=a.normal.z*this.max.z):(b+=a.normal.z*this.max.z,c+=a.normal.z*this.min.z);return b<=a.constant&&c>=a.constant},clampPoint:function(a,b){return(b||new THREE.Vector3).copy(a).clamp(this.min,
1949this.max)},distanceToPoint:function(){var a=new THREE.Vector3;return function(b){return a.copy(b).clamp(this.min,this.max).sub(b).length()}}(),getBoundingSphere:function(){var a=new THREE.Vector3;return function(b){b=b||new THREE.Sphere;b.center=this.center();b.radius=.5*this.size(a).length();return b}}(),intersect:function(a){this.min.max(a.min);this.max.min(a.max);return this},union:function(a){this.min.min(a.min);this.max.max(a.max);return this},applyMatrix4:function(){var a=[new THREE.Vector3,
vendor: 30,284 bytes, lines 1950-2015
1950new THREE.Vector3,new THREE.Vector3,new THREE.Vector3,new THREE.Vector3,new THREE.Vector3,new THREE.Vector3,new THREE.Vector3];return function(b){a[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(b);a[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(b);a[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(b);a[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(b);a[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(b);a[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(b);a[6].set(this.max.x,
1951this.max.y,this.min.z).applyMatrix4(b);a[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(b);this.makeEmpty();this.setFromPoints(a);return this}}(),translate:function(a){this.min.add(a);this.max.add(a);return this},equals:function(a){return a.min.equals(this.min)&&a.max.equals(this.max)}};THREE.Matrix3=function(){this.elements=new Float32Array([1,0,0,0,1,0,0,0,1]);0<arguments.length&&console.error("THREE.Matrix3: the constructor no longer reads arguments. use .set() instead.")};
1952THREE.Matrix3.prototype={constructor:THREE.Matrix3,set:function(a,b,c,d,e,f,g,h,k){var l=this.elements;l[0]=a;l[1]=d;l[2]=g;l[3]=b;l[4]=e;l[5]=h;l[6]=c;l[7]=f;l[8]=k;return this},identity:function(){this.set(1,0,0,0,1,0,0,0,1);return this},clone:function(){return(new this.constructor).fromArray(this.elements)},copy:function(a){a=a.elements;this.set(a[0],a[3],a[6],a[1],a[4],a[7],a[2],a[5],a[8]);return this},setFromMatrix4:function(a){a=a.elements;this.set(a[0],a[4],a[8],a[1],a[5],a[9],a[2],a[6],a[10]);
1953return this},applyToVector3Array:function(){var a;return function(b,c,d){void 0===a&&(a=new THREE.Vector3);void 0===c&&(c=0);void 0===d&&(d=b.length);for(var e=0;e<d;e+=3,c+=3)a.fromArray(b,c),a.applyMatrix3(this),a.toArray(b,c);return b}}(),applyToBuffer:function(){var a;return function(b,c,d){void 0===a&&(a=new THREE.Vector3);void 0===c&&(c=0);void 0===d&&(d=b.length/b.itemSize);for(var e=0;e<d;e++,c++)a.x=b.getX(c),a.y=b.getY(c),a.z=b.getZ(c),a.applyMatrix3(this),b.setXYZ(a.x,a.y,a.z);return b}}(),
1954multiplyScalar:function(a){var b=this.elements;b[0]*=a;b[3]*=a;b[6]*=a;b[1]*=a;b[4]*=a;b[7]*=a;b[2]*=a;b[5]*=a;b[8]*=a;return this},determinant:function(){var a=this.elements,b=a[0],c=a[1],d=a[2],e=a[3],f=a[4],g=a[5],h=a[6],k=a[7],a=a[8];return b*f*a-b*g*k-c*e*a+c*g*h+d*e*k-d*f*h},getInverse:function(a,b){a instanceof THREE.Matrix4&&console.warn("THREE.Matrix3.getInverse no longer takes a Matrix4 argument.");var c=a.elements,d=this.elements,e=c[0],f=c[1],g=c[2],h=c[3],k=c[4],l=c[5],p=c[6],n=c[7],
1955c=c[8],m=c*k-l*n,q=l*p-c*h,u=n*h-k*p,v=e*m+f*q+g*u;if(0===v){if(b)throw Error("THREE.Matrix3.getInverse(): can't invert matrix, determinant is 0");console.warn("THREE.Matrix3.getInverse(): can't invert matrix, determinant is 0");return this.identity()}d[0]=m;d[1]=g*n-c*f;d[2]=l*f-g*k;d[3]=q;d[4]=c*e-g*p;d[5]=g*h-l*e;d[6]=u;d[7]=f*p-n*e;d[8]=k*e-f*h;return this.multiplyScalar(1/v)},transpose:function(){var a,b=this.elements;a=b[1];b[1]=b[3];b[3]=a;a=b[2];b[2]=b[6];b[6]=a;a=b[5];b[5]=b[7];b[7]=a;return this},
1956flattenToArrayOffset:function(a,b){var c=this.elements;a[b]=c[0];a[b+1]=c[1];a[b+2]=c[2];a[b+3]=c[3];a[b+4]=c[4];a[b+5]=c[5];a[b+6]=c[6];a[b+7]=c[7];a[b+8]=c[8];return a},getNormalMatrix:function(a){return this.setFromMatrix4(a).getInverse(this).transpose()},transposeIntoArray:function(a){var b=this.elements;a[0]=b[0];a[1]=b[3];a[2]=b[6];a[3]=b[1];a[4]=b[4];a[5]=b[7];a[6]=b[2];a[7]=b[5];a[8]=b[8];return this},fromArray:function(a){this.elements.set(a);return this},toArray:function(){var a=this.elements;
1957return[a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]]}};THREE.Matrix4=function(){this.elements=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]);0<arguments.length&&console.error("THREE.Matrix4: the constructor no longer reads arguments. use .set() instead.")};
1958THREE.Matrix4.prototype={constructor:THREE.Matrix4,set:function(a,b,c,d,e,f,g,h,k,l,p,n,m,q,u,v){var t=this.elements;t[0]=a;t[4]=b;t[8]=c;t[12]=d;t[1]=e;t[5]=f;t[9]=g;t[13]=h;t[2]=k;t[6]=l;t[10]=p;t[14]=n;t[3]=m;t[7]=q;t[11]=u;t[15]=v;return this},identity:function(){this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1);return this},clone:function(){return(new THREE.Matrix4).fromArray(this.elements)},copy:function(a){this.elements.set(a.elements);return this},copyPosition:function(a){var b=this.elements;a=a.elements;
1959b[12]=a[12];b[13]=a[13];b[14]=a[14];return this},extractBasis:function(a,b,c){a.setFromMatrixColumn(this,0);b.setFromMatrixColumn(this,1);c.setFromMatrixColumn(this,2);return this},makeBasis:function(a,b,c){this.set(a.x,b.x,c.x,0,a.y,b.y,c.y,0,a.z,b.z,c.z,0,0,0,0,1);return this},extractRotation:function(){var a;return function(b){void 0===a&&(a=new THREE.Vector3);var c=this.elements,d=b.elements,e=1/a.setFromMatrixColumn(b,0).length(),f=1/a.setFromMatrixColumn(b,1).length();b=1/a.setFromMatrixColumn(b,
19602).length();c[0]=d[0]*e;c[1]=d[1]*e;c[2]=d[2]*e;c[4]=d[4]*f;c[5]=d[5]*f;c[6]=d[6]*f;c[8]=d[8]*b;c[9]=d[9]*b;c[10]=d[10]*b;return this}}(),makeRotationFromEuler:function(a){!1===a instanceof THREE.Euler&&console.error("THREE.Matrix: .makeRotationFromEuler() now expects a Euler rotation rather than a Vector3 and order.");var b=this.elements,c=a.x,d=a.y,e=a.z,f=Math.cos(c),c=Math.sin(c),g=Math.cos(d),d=Math.sin(d),h=Math.cos(e),e=Math.sin(e);if("XYZ"===a.order){a=f*h;var k=f*e,l=c*h,p=c*e;b[0]=g*h;b[4]=
1961-g*e;b[8]=d;b[1]=k+l*d;b[5]=a-p*d;b[9]=-c*g;b[2]=p-a*d;b[6]=l+k*d;b[10]=f*g}else"YXZ"===a.order?(a=g*h,k=g*e,l=d*h,p=d*e,b[0]=a+p*c,b[4]=l*c-k,b[8]=f*d,b[1]=f*e,b[5]=f*h,b[9]=-c,b[2]=k*c-l,b[6]=p+a*c,b[10]=f*g):"ZXY"===a.order?(a=g*h,k=g*e,l=d*h,p=d*e,b[0]=a-p*c,b[4]=-f*e,b[8]=l+k*c,b[1]=k+l*c,b[5]=f*h,b[9]=p-a*c,b[2]=-f*d,b[6]=c,b[10]=f*g):"ZYX"===a.order?(a=f*h,k=f*e,l=c*h,p=c*e,b[0]=g*h,b[4]=l*d-k,b[8]=a*d+p,b[1]=g*e,b[5]=p*d+a,b[9]=k*d-l,b[2]=-d,b[6]=c*g,b[10]=f*g):"YZX"===a.order?(a=f*g,k=f*
1962d,l=c*g,p=c*d,b[0]=g*h,b[4]=p-a*e,b[8]=l*e+k,b[1]=e,b[5]=f*h,b[9]=-c*h,b[2]=-d*h,b[6]=k*e+l,b[10]=a-p*e):"XZY"===a.order&&(a=f*g,k=f*d,l=c*g,p=c*d,b[0]=g*h,b[4]=-e,b[8]=d*h,b[1]=a*e+p,b[5]=f*h,b[9]=k*e-l,b[2]=l*e-k,b[6]=c*h,b[10]=p*e+a);b[3]=0;b[7]=0;b[11]=0;b[12]=0;b[13]=0;b[14]=0;b[15]=1;return this},makeRotationFromQuaternion:function(a){var b=this.elements,c=a.x,d=a.y,e=a.z,f=a.w,g=c+c,h=d+d,k=e+e;a=c*g;var l=c*h,c=c*k,p=d*h,d=d*k,e=e*k,g=f*g,h=f*h,f=f*k;b[0]=1-(p+e);b[4]=l-f;b[8]=c+h;b[1]=l+
1963f;b[5]=1-(a+e);b[9]=d-g;b[2]=c-h;b[6]=d+g;b[10]=1-(a+p);b[3]=0;b[7]=0;b[11]=0;b[12]=0;b[13]=0;b[14]=0;b[15]=1;return this},lookAt:function(){var a,b,c;return function(d,e,f){void 0===a&&(a=new THREE.Vector3);void 0===b&&(b=new THREE.Vector3);void 0===c&&(c=new THREE.Vector3);var g=this.elements;c.subVectors(d,e).normalize();0===c.lengthSq()&&(c.z=1);a.crossVectors(f,c).normalize();0===a.lengthSq()&&(c.x+=1E-4,a.crossVectors(f,c).normalize());b.crossVectors(c,a);g[0]=a.x;g[4]=b.x;g[8]=c.x;g[1]=a.y;
1964g[5]=b.y;g[9]=c.y;g[2]=a.z;g[6]=b.z;g[10]=c.z;return this}}(),multiply:function(a,b){return void 0!==b?(console.warn("THREE.Matrix4: .multiply() now only accepts one argument. Use .multiplyMatrices( a, b ) instead."),this.multiplyMatrices(a,b)):this.multiplyMatrices(this,a)},multiplyMatrices:function(a,b){var c=a.elements,d=b.elements,e=this.elements,f=c[0],g=c[4],h=c[8],k=c[12],l=c[1],p=c[5],n=c[9],m=c[13],q=c[2],u=c[6],v=c[10],t=c[14],s=c[3],w=c[7],E=c[11],c=c[15],x=d[0],D=d[4],z=d[8],y=d[12],B=
1965d[1],G=d[5],F=d[9],H=d[13],L=d[2],A=d[6],N=d[10],M=d[14],I=d[3],O=d[7],Q=d[11],d=d[15];e[0]=f*x+g*B+h*L+k*I;e[4]=f*D+g*G+h*A+k*O;e[8]=f*z+g*F+h*N+k*Q;e[12]=f*y+g*H+h*M+k*d;e[1]=l*x+p*B+n*L+m*I;e[5]=l*D+p*G+n*A+m*O;e[9]=l*z+p*F+n*N+m*Q;e[13]=l*y+p*H+n*M+m*d;e[2]=q*x+u*B+v*L+t*I;e[6]=q*D+u*G+v*A+t*O;e[10]=q*z+u*F+v*N+t*Q;e[14]=q*y+u*H+v*M+t*d;e[3]=s*x+w*B+E*L+c*I;e[7]=s*D+w*G+E*A+c*O;e[11]=s*z+w*F+E*N+c*Q;e[15]=s*y+w*H+E*M+c*d;return this},multiplyToArray:function(a,b,c){var d=this.elements;this.multiplyMatrices(a,
1966b);c[0]=d[0];c[1]=d[1];c[2]=d[2];c[3]=d[3];c[4]=d[4];c[5]=d[5];c[6]=d[6];c[7]=d[7];c[8]=d[8];c[9]=d[9];c[10]=d[10];c[11]=d[11];c[12]=d[12];c[13]=d[13];c[14]=d[14];c[15]=d[15];return this},multiplyScalar:function(a){var b=this.elements;b[0]*=a;b[4]*=a;b[8]*=a;b[12]*=a;b[1]*=a;b[5]*=a;b[9]*=a;b[13]*=a;b[2]*=a;b[6]*=a;b[10]*=a;b[14]*=a;b[3]*=a;b[7]*=a;b[11]*=a;b[15]*=a;return this},applyToVector3Array:function(){var a;return function(b,c,d){void 0===a&&(a=new THREE.Vector3);void 0===c&&(c=0);void 0===
1967d&&(d=b.length);for(var e=0;e<d;e+=3,c+=3)a.fromArray(b,c),a.applyMatrix4(this),a.toArray(b,c);return b}}(),applyToBuffer:function(){var a;return function(b,c,d){void 0===a&&(a=new THREE.Vector3);void 0===c&&(c=0);void 0===d&&(d=b.length/b.itemSize);for(var e=0;e<d;e++,c++)a.x=b.getX(c),a.y=b.getY(c),a.z=b.getZ(c),a.applyMatrix4(this),b.setXYZ(a.x,a.y,a.z);return b}}(),determinant:function(){var a=this.elements,b=a[0],c=a[4],d=a[8],e=a[12],f=a[1],g=a[5],h=a[9],k=a[13],l=a[2],p=a[6],n=a[10],m=a[14];
1968return a[3]*(+e*h*p-d*k*p-e*g*n+c*k*n+d*g*m-c*h*m)+a[7]*(+b*h*m-b*k*n+e*f*n-d*f*m+d*k*l-e*h*l)+a[11]*(+b*k*p-b*g*m-e*f*p+c*f*m+e*g*l-c*k*l)+a[15]*(-d*g*l-b*h*p+b*g*n+d*f*p-c*f*n+c*h*l)},transpose:function(){var a=this.elements,b;b=a[1];a[1]=a[4];a[4]=b;b=a[2];a[2]=a[8];a[8]=b;b=a[6];a[6]=a[9];a[9]=b;b=a[3];a[3]=a[12];a[12]=b;b=a[7];a[7]=a[13];a[13]=b;b=a[11];a[11]=a[14];a[14]=b;return this},flattenToArrayOffset:function(a,b){var c=this.elements;a[b]=c[0];a[b+1]=c[1];a[b+2]=c[2];a[b+3]=c[3];a[b+4]=
1969c[4];a[b+5]=c[5];a[b+6]=c[6];a[b+7]=c[7];a[b+8]=c[8];a[b+9]=c[9];a[b+10]=c[10];a[b+11]=c[11];a[b+12]=c[12];a[b+13]=c[13];a[b+14]=c[14];a[b+15]=c[15];return a},getPosition:function(){var a;return function(){void 0===a&&(a=new THREE.Vector3);console.warn("THREE.Matrix4: .getPosition() has been removed. Use Vector3.setFromMatrixPosition( matrix ) instead.");return a.setFromMatrixColumn(this,3)}}(),setPosition:function(a){var b=this.elements;b[12]=a.x;b[13]=a.y;b[14]=a.z;return this},getInverse:function(a,
1970b){var c=this.elements,d=a.elements,e=d[0],f=d[1],g=d[2],h=d[3],k=d[4],l=d[5],p=d[6],n=d[7],m=d[8],q=d[9],u=d[10],v=d[11],t=d[12],s=d[13],w=d[14],d=d[15],E=q*w*n-s*u*n+s*p*v-l*w*v-q*p*d+l*u*d,x=t*u*n-m*w*n-t*p*v+k*w*v+m*p*d-k*u*d,D=m*s*n-t*q*n+t*l*v-k*s*v-m*l*d+k*q*d,z=t*q*p-m*s*p-t*l*u+k*s*u+m*l*w-k*q*w,y=e*E+f*x+g*D+h*z;if(0===y){if(b)throw Error("THREE.Matrix4.getInverse(): can't invert matrix, determinant is 0");console.warn("THREE.Matrix4.getInverse(): can't invert matrix, determinant is 0");
1971return this.identity()}c[0]=E;c[1]=s*u*h-q*w*h-s*g*v+f*w*v+q*g*d-f*u*d;c[2]=l*w*h-s*p*h+s*g*n-f*w*n-l*g*d+f*p*d;c[3]=q*p*h-l*u*h-q*g*n+f*u*n+l*g*v-f*p*v;c[4]=x;c[5]=m*w*h-t*u*h+t*g*v-e*w*v-m*g*d+e*u*d;c[6]=t*p*h-k*w*h-t*g*n+e*w*n+k*g*d-e*p*d;c[7]=k*u*h-m*p*h+m*g*n-e*u*n-k*g*v+e*p*v;c[8]=D;c[9]=t*q*h-m*s*h-t*f*v+e*s*v+m*f*d-e*q*d;c[10]=k*s*h-t*l*h+t*f*n-e*s*n-k*f*d+e*l*d;c[11]=m*l*h-k*q*h-m*f*n+e*q*n+k*f*v-e*l*v;c[12]=z;c[13]=m*s*g-t*q*g+t*f*u-e*s*u-m*f*w+e*q*w;c[14]=t*l*g-k*s*g-t*f*p+e*s*p+k*f*w-
1972e*l*w;c[15]=k*q*g-m*l*g+m*f*p-e*q*p-k*f*u+e*l*u;return this.multiplyScalar(1/y)},scale:function(a){var b=this.elements,c=a.x,d=a.y;a=a.z;b[0]*=c;b[4]*=d;b[8]*=a;b[1]*=c;b[5]*=d;b[9]*=a;b[2]*=c;b[6]*=d;b[10]*=a;b[3]*=c;b[7]*=d;b[11]*=a;return this},getMaxScaleOnAxis:function(){var a=this.elements;return Math.sqrt(Math.max(a[0]*a[0]+a[1]*a[1]+a[2]*a[2],a[4]*a[4]+a[5]*a[5]+a[6]*a[6],a[8]*a[8]+a[9]*a[9]+a[10]*a[10]))},makeTranslation:function(a,b,c){this.set(1,0,0,a,0,1,0,b,0,0,1,c,0,0,0,1);return this},
1973makeRotationX:function(a){var b=Math.cos(a);a=Math.sin(a);this.set(1,0,0,0,0,b,-a,0,0,a,b,0,0,0,0,1);return this},makeRotationY:function(a){var b=Math.cos(a);a=Math.sin(a);this.set(b,0,a,0,0,1,0,0,-a,0,b,0,0,0,0,1);return this},makeRotationZ:function(a){var b=Math.cos(a);a=Math.sin(a);this.set(b,-a,0,0,a,b,0,0,0,0,1,0,0,0,0,1);return this},makeRotationAxis:function(a,b){var c=Math.cos(b),d=Math.sin(b),e=1-c,f=a.x,g=a.y,h=a.z,k=e*f,l=e*g;this.set(k*f+c,k*g-d*h,k*h+d*g,0,k*g+d*h,l*g+c,l*h-d*f,0,k*h-
1974d*g,l*h+d*f,e*h*h+c,0,0,0,0,1);return this},makeScale:function(a,b,c){this.set(a,0,0,0,0,b,0,0,0,0,c,0,0,0,0,1);return this},compose:function(a,b,c){this.makeRotationFromQuaternion(b);this.scale(c);this.setPosition(a);return this},decompose:function(){var a,b;return function(c,d,e){void 0===a&&(a=new THREE.Vector3);void 0===b&&(b=new THREE.Matrix4);var f=this.elements,g=a.set(f[0],f[1],f[2]).length(),h=a.set(f[4],f[5],f[6]).length(),k=a.set(f[8],f[9],f[10]).length();0>this.determinant()&&(g=-g);c.x=
1975f[12];c.y=f[13];c.z=f[14];b.elements.set(this.elements);c=1/g;var f=1/h,l=1/k;b.elements[0]*=c;b.elements[1]*=c;b.elements[2]*=c;b.elements[4]*=f;b.elements[5]*=f;b.elements[6]*=f;b.elements[8]*=l;b.elements[9]*=l;b.elements[10]*=l;d.setFromRotationMatrix(b);e.x=g;e.y=h;e.z=k;return this}}(),makeFrustum:function(a,b,c,d,e,f){var g=this.elements;g[0]=2*e/(b-a);g[4]=0;g[8]=(b+a)/(b-a);g[12]=0;g[1]=0;g[5]=2*e/(d-c);g[9]=(d+c)/(d-c);g[13]=0;g[2]=0;g[6]=0;g[10]=-(f+e)/(f-e);g[14]=-2*f*e/(f-e);g[3]=0;g[7]=
19760;g[11]=-1;g[15]=0;return this},makePerspective:function(a,b,c,d){a=c*Math.tan(THREE.Math.degToRad(.5*a));var e=-a;return this.makeFrustum(e*b,a*b,e,a,c,d)},makeOrthographic:function(a,b,c,d,e,f){var g=this.elements,h=1/(b-a),k=1/(c-d),l=1/(f-e);g[0]=2*h;g[4]=0;g[8]=0;g[12]=-((b+a)*h);g[1]=0;g[5]=2*k;g[9]=0;g[13]=-((c+d)*k);g[2]=0;g[6]=0;g[10]=-2*l;g[14]=-((f+e)*l);g[3]=0;g[7]=0;g[11]=0;g[15]=1;return this},equals:function(a){var b=this.elements;a=a.elements;for(var c=0;16>c;c++)if(b[c]!==a[c])return!1;
1977return!0},fromArray:function(a){this.elements.set(a);return this},toArray:function(){var a=this.elements;return[a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9],a[10],a[11],a[12],a[13],a[14],a[15]]}};THREE.Ray=function(a,b){this.origin=void 0!==a?a:new THREE.Vector3;this.direction=void 0!==b?b:new THREE.Vector3};
1978THREE.Ray.prototype={constructor:THREE.Ray,set:function(a,b){this.origin.copy(a);this.direction.copy(b);return this},clone:function(){return(new this.constructor).copy(this)},copy:function(a){this.origin.copy(a.origin);this.direction.copy(a.direction);return this},at:function(a,b){return(b||new THREE.Vector3).copy(this.direction).multiplyScalar(a).add(this.origin)},lookAt:function(a){this.direction.copy(a).sub(this.origin).normalize()},recast:function(){var a=new THREE.Vector3;return function(b){this.origin.copy(this.at(b,
1979a));return this}}(),closestPointToPoint:function(a,b){var c=b||new THREE.Vector3;c.subVectors(a,this.origin);var d=c.dot(this.direction);return 0>d?c.copy(this.origin):c.copy(this.direction).multiplyScalar(d).add(this.origin)},distanceToPoint:function(a){return Math.sqrt(this.distanceSqToPoint(a))},distanceSqToPoint:function(){var a=new THREE.Vector3;return function(b){var c=a.subVectors(b,this.origin).dot(this.direction);if(0>c)return this.origin.distanceToSquared(b);a.copy(this.direction).multiplyScalar(c).add(this.origin);
1980return a.distanceToSquared(b)}}(),distanceSqToSegment:function(){var a=new THREE.Vector3,b=new THREE.Vector3,c=new THREE.Vector3;return function(d,e,f,g){a.copy(d).add(e).multiplyScalar(.5);b.copy(e).sub(d).normalize();c.copy(this.origin).sub(a);var h=.5*d.distanceTo(e),k=-this.direction.dot(b),l=c.dot(this.direction),p=-c.dot(b),n=c.lengthSq(),m=Math.abs(1-k*k),q;0<m?(d=k*p-l,e=k*l-p,q=h*m,0<=d?e>=-q?e<=q?(h=1/m,d*=h,e*=h,k=d*(d+k*e+2*l)+e*(k*d+e+2*p)+n):(e=h,d=Math.max(0,-(k*e+l)),k=-d*d+e*(e+2*
1981p)+n):(e=-h,d=Math.max(0,-(k*e+l)),k=-d*d+e*(e+2*p)+n):e<=-q?(d=Math.max(0,-(-k*h+l)),e=0<d?-h:Math.min(Math.max(-h,-p),h),k=-d*d+e*(e+2*p)+n):e<=q?(d=0,e=Math.min(Math.max(-h,-p),h),k=e*(e+2*p)+n):(d=Math.max(0,-(k*h+l)),e=0<d?h:Math.min(Math.max(-h,-p),h),k=-d*d+e*(e+2*p)+n)):(e=0<k?-h:h,d=Math.max(0,-(k*e+l)),k=-d*d+e*(e+2*p)+n);f&&f.copy(this.direction).multiplyScalar(d).add(this.origin);g&&g.copy(b).multiplyScalar(e).add(a);return k}}(),intersectSphere:function(){var a=new THREE.Vector3;return function(b,
1982c){a.subVectors(b.center,this.origin);var d=a.dot(this.direction),e=a.dot(a)-d*d,f=b.radius*b.radius;if(e>f)return null;f=Math.sqrt(f-e);e=d-f;d+=f;return 0>e&&0>d?null:0>e?this.at(d,c):this.at(e,c)}}(),intersectsSphere:function(a){return this.distanceToPoint(a.center)<=a.radius},distanceToPlane:function(a){var b=a.normal.dot(this.direction);if(0===b)return 0===a.distanceToPoint(this.origin)?0:null;a=-(this.origin.dot(a.normal)+a.constant)/b;return 0<=a?a:null},intersectPlane:function(a,b){var c=
1983this.distanceToPlane(a);return null===c?null:this.at(c,b)},intersectsPlane:function(a){var b=a.distanceToPoint(this.origin);return 0===b||0>a.normal.dot(this.direction)*b?!0:!1},intersectBox:function(a,b){var c,d,e,f,g;d=1/this.direction.x;f=1/this.direction.y;g=1/this.direction.z;var h=this.origin;0<=d?(c=(a.min.x-h.x)*d,d*=a.max.x-h.x):(c=(a.max.x-h.x)*d,d*=a.min.x-h.x);0<=f?(e=(a.min.y-h.y)*f,f*=a.max.y-h.y):(e=(a.max.y-h.y)*f,f*=a.min.y-h.y);if(c>f||e>d)return null;if(e>c||c!==c)c=e;if(f<d||d!==
1984d)d=f;0<=g?(e=(a.min.z-h.z)*g,g*=a.max.z-h.z):(e=(a.max.z-h.z)*g,g*=a.min.z-h.z);if(c>g||e>d)return null;if(e>c||c!==c)c=e;if(g<d||d!==d)d=g;return 0>d?null:this.at(0<=c?c:d,b)},intersectsBox:function(){var a=new THREE.Vector3;return function(b){return null!==this.intersectBox(b,a)}}(),intersectTriangle:function(){var a=new THREE.Vector3,b=new THREE.Vector3,c=new THREE.Vector3,d=new THREE.Vector3;return function(e,f,g,h,k){b.subVectors(f,e);c.subVectors(g,e);d.crossVectors(b,c);f=this.direction.dot(d);
1985if(0<f){if(h)return null;h=1}else if(0>f)h=-1,f=-f;else return null;a.subVectors(this.origin,e);e=h*this.direction.dot(c.crossVectors(a,c));if(0>e)return null;g=h*this.direction.dot(b.cross(a));if(0>g||e+g>f)return null;e=-h*a.dot(d);return 0>e?null:this.at(e/f,k)}}(),applyMatrix4:function(a){this.direction.add(this.origin).applyMatrix4(a);this.origin.applyMatrix4(a);this.direction.sub(this.origin);this.direction.normalize();return this},equals:function(a){return a.origin.equals(this.origin)&&a.direction.equals(this.direction)}};
1986THREE.Sphere=function(a,b){this.center=void 0!==a?a:new THREE.Vector3;this.radius=void 0!==b?b:0};
1987THREE.Sphere.prototype={constructor:THREE.Sphere,set:function(a,b){this.center.copy(a);this.radius=b;return this},setFromPoints:function(){var a=new THREE.Box3;return function(b,c){var d=this.center;void 0!==c?d.copy(c):a.setFromPoints(b).center(d);for(var e=0,f=0,g=b.length;f<g;f++)e=Math.max(e,d.distanceToSquared(b[f]));this.radius=Math.sqrt(e);return this}}(),clone:function(){return(new this.constructor).copy(this)},copy:function(a){this.center.copy(a.center);this.radius=a.radius;return this},
1988empty:function(){return 0>=this.radius},containsPoint:function(a){return a.distanceToSquared(this.center)<=this.radius*this.radius},distanceToPoint:function(a){return a.distanceTo(this.center)-this.radius},intersectsSphere:function(a){var b=this.radius+a.radius;return a.center.distanceToSquared(this.center)<=b*b},intersectsBox:function(a){return a.intersectsSphere(this)},intersectsPlane:function(a){return Math.abs(this.center.dot(a.normal)-a.constant)<=this.radius},clampPoint:function(a,b){var c=
1989this.center.distanceToSquared(a),d=b||new THREE.Vector3;d.copy(a);c>this.radius*this.radius&&(d.sub(this.center).normalize(),d.multiplyScalar(this.radius).add(this.center));return d},getBoundingBox:function(a){a=a||new THREE.Box3;a.set(this.center,this.center);a.expandByScalar(this.radius);return a},applyMatrix4:function(a){this.center.applyMatrix4(a);this.radius*=a.getMaxScaleOnAxis();return this},translate:function(a){this.center.add(a);return this},equals:function(a){return a.center.equals(this.center)&&
1990a.radius===this.radius}};THREE.Frustum=function(a,b,c,d,e,f){this.planes=[void 0!==a?a:new THREE.Plane,void 0!==b?b:new THREE.Plane,void 0!==c?c:new THREE.Plane,void 0!==d?d:new THREE.Plane,void 0!==e?e:new THREE.Plane,void 0!==f?f:new THREE.Plane]};
1991THREE.Frustum.prototype={constructor:THREE.Frustum,set:function(a,b,c,d,e,f){var g=this.planes;g[0].copy(a);g[1].copy(b);g[2].copy(c);g[3].copy(d);g[4].copy(e);g[5].copy(f);return this},clone:function(){return(new this.constructor).copy(this)},copy:function(a){for(var b=this.planes,c=0;6>c;c++)b[c].copy(a.planes[c]);return this},setFromMatrix:function(a){var b=this.planes,c=a.elements;a=c[0];var d=c[1],e=c[2],f=c[3],g=c[4],h=c[5],k=c[6],l=c[7],p=c[8],n=c[9],m=c[10],q=c[11],u=c[12],v=c[13],t=c[14],
1992c=c[15];b[0].setComponents(f-a,l-g,q-p,c-u).normalize();b[1].setComponents(f+a,l+g,q+p,c+u).normalize();b[2].setComponents(f+d,l+h,q+n,c+v).normalize();b[3].setComponents(f-d,l-h,q-n,c-v).normalize();b[4].setComponents(f-e,l-k,q-m,c-t).normalize();b[5].setComponents(f+e,l+k,q+m,c+t).normalize();return this},intersectsObject:function(){var a=new THREE.Sphere;return function(b){var c=b.geometry;null===c.boundingSphere&&c.computeBoundingSphere();a.copy(c.boundingSphere);a.applyMatrix4(b.matrixWorld);
1993return this.intersectsSphere(a)}}(),intersectsSphere:function(a){var b=this.planes,c=a.center;a=-a.radius;for(var d=0;6>d;d++)if(b[d].distanceToPoint(c)<a)return!1;return!0},intersectsBox:function(){var a=new THREE.Vector3,b=new THREE.Vector3;return function(c){for(var d=this.planes,e=0;6>e;e++){var f=d[e];a.x=0<f.normal.x?c.min.x:c.max.x;b.x=0<f.normal.x?c.max.x:c.min.x;a.y=0<f.normal.y?c.min.y:c.max.y;b.y=0<f.normal.y?c.max.y:c.min.y;a.z=0<f.normal.z?c.min.z:c.max.z;b.z=0<f.normal.z?c.max.z:c.min.z;
1994var g=f.distanceToPoint(a),f=f.distanceToPoint(b);if(0>g&&0>f)return!1}return!0}}(),containsPoint:function(a){for(var b=this.planes,c=0;6>c;c++)if(0>b[c].distanceToPoint(a))return!1;return!0}};THREE.Plane=function(a,b){this.normal=void 0!==a?a:new THREE.Vector3(1,0,0);this.constant=void 0!==b?b:0};
1995THREE.Plane.prototype={constructor:THREE.Plane,set:function(a,b){this.normal.copy(a);this.constant=b;return this},setComponents:function(a,b,c,d){this.normal.set(a,b,c);this.constant=d;return this},setFromNormalAndCoplanarPoint:function(a,b){this.normal.copy(a);this.constant=-b.dot(this.normal);return this},setFromCoplanarPoints:function(){var a=new THREE.Vector3,b=new THREE.Vector3;return function(c,d,e){d=a.subVectors(e,d).cross(b.subVectors(c,d)).normalize();this.setFromNormalAndCoplanarPoint(d,
1996c);return this}}(),clone:function(){return(new this.constructor).copy(this)},copy:function(a){this.normal.copy(a.normal);this.constant=a.constant;return this},normalize:function(){var a=1/this.normal.length();this.normal.multiplyScalar(a);this.constant*=a;return this},negate:function(){this.constant*=-1;this.normal.negate();return this},distanceToPoint:function(a){return this.normal.dot(a)+this.constant},distanceToSphere:function(a){return this.distanceToPoint(a.center)-a.radius},projectPoint:function(a,
1997b){return this.orthoPoint(a,b).sub(a).negate()},orthoPoint:function(a,b){var c=this.distanceToPoint(a);return(b||new THREE.Vector3).copy(this.normal).multiplyScalar(c)},intersectLine:function(){var a=new THREE.Vector3;return function(b,c){var d=c||new THREE.Vector3,e=b.delta(a),f=this.normal.dot(e);if(0===f){if(0===this.distanceToPoint(b.start))return d.copy(b.start)}else return f=-(b.start.dot(this.normal)+this.constant)/f,0>f||1<f?void 0:d.copy(e).multiplyScalar(f).add(b.start)}}(),intersectsLine:function(a){var b=
1998this.distanceToPoint(a.start);a=this.distanceToPoint(a.end);return 0>b&&0<a||0>a&&0<b},intersectsBox:function(a){return a.intersectsPlane(this)},intersectsSphere:function(a){return a.intersectsPlane(this)},coplanarPoint:function(a){return(a||new THREE.Vector3).copy(this.normal).multiplyScalar(-this.constant)},applyMatrix4:function(){var a=new THREE.Vector3,b=new THREE.Vector3,c=new THREE.Matrix3;return function(d,e){var f=e||c.getNormalMatrix(d),f=a.copy(this.normal).applyMatrix3(f),g=this.coplanarPoint(b);
1999g.applyMatrix4(d);this.setFromNormalAndCoplanarPoint(f,g);return this}}(),translate:function(a){this.constant-=a.dot(this.normal);return this},equals:function(a){return a.normal.equals(this.normal)&&a.constant===this.constant}};THREE.Spherical=function(a,b,c){this.radius=void 0!==a?a:1;this.phi=void 0!==b?b:0;this.theta=void 0!==c?c:0;return this};
2000THREE.Spherical.prototype={constructor:THREE.Spherical,set:function(a,b,c){this.radius=a;this.phi=b;this.theta=c},clone:function(){return(new this.constructor).copy(this)},copy:function(a){this.radius.copy(a.radius);this.phi.copy(a.phi);this.theta.copy(a.theta);return this},makeSafe:function(){this.phi=Math.max(1E-6,Math.min(Math.PI-1E-6,this.phi))},setFromVector3:function(a){this.radius=a.length();0===this.radius?this.phi=this.theta=0:(this.theta=Math.atan2(a.x,a.z),this.phi=Math.acos(THREE.Math.clamp(a.y/
2001this.radius,-1,1)));return this}};
2002THREE.Math={generateUUID:function(){var a="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split(""),b=Array(36),c=0,d;return function(){for(var e=0;36>e;e++)8===e||13===e||18===e||23===e?b[e]="-":14===e?b[e]="4":(2>=c&&(c=33554432+16777216*Math.random()|0),d=c&15,c>>=4,b[e]=a[19===e?d&3|8:d]);return b.join("")}}(),clamp:function(a,b,c){return Math.max(b,Math.min(c,a))},euclideanModulo:function(a,b){return(a%b+b)%b},mapLinear:function(a,b,c,d,e){return d+(a-b)*(e-d)/(c-b)},smoothstep:function(a,
2003b,c){if(a<=b)return 0;if(a>=c)return 1;a=(a-b)/(c-b);return a*a*(3-2*a)},smootherstep:function(a,b,c){if(a<=b)return 0;if(a>=c)return 1;a=(a-b)/(c-b);return a*a*a*(a*(6*a-15)+10)},random16:function(){console.warn("THREE.Math.random16() has been deprecated. Use Math.random() instead.");return Math.random()},randInt:function(a,b){return a+Math.floor(Math.random()*(b-a+1))},randFloat:function(a,b){return a+Math.random()*(b-a)},randFloatSpread:function(a){return a*(.5-Math.random())},degToRad:function(){var a=
2004Math.PI/180;return function(b){return b*a}}(),radToDeg:function(){var a=180/Math.PI;return function(b){return b*a}}(),isPowerOfTwo:function(a){return 0===(a&a-1)&&0!==a},nearestPowerOfTwo:function(a){return Math.pow(2,Math.round(Math.log(a)/Math.LN2))},nextPowerOfTwo:function(a){a--;a|=a>>1;a|=a>>2;a|=a>>4;a|=a>>8;a|=a>>16;a++;return a}};
2005THREE.Spline=function(a){function b(a,b,c,d,e,f,g){a=.5*(c-a);d=.5*(d-b);return(2*(b-c)+a+d)*g+(-3*(b-c)-2*a-d)*f+a*e+b}this.points=a;var c=[],d={x:0,y:0,z:0},e,f,g,h,k,l,p,n,m;this.initFromArray=function(a){this.points=[];for(var b=0;b<a.length;b++)this.points[b]={x:a[b][0],y:a[b][1],z:a[b][2]}};this.getPoint=function(a){e=(this.points.length-1)*a;f=Math.floor(e);g=e-f;c[0]=0===f?f:f-1;c[1]=f;c[2]=f>this.points.length-2?this.points.length-1:f+1;c[3]=f>this.points.length-3?this.points.length-1:f+
20062;l=this.points[c[0]];p=this.points[c[1]];n=this.points[c[2]];m=this.points[c[3]];h=g*g;k=g*h;d.x=b(l.x,p.x,n.x,m.x,g,h,k);d.y=b(l.y,p.y,n.y,m.y,g,h,k);d.z=b(l.z,p.z,n.z,m.z,g,h,k);return d};this.getControlPointsArray=function(){var a,b,c=this.points.length,d=[];for(a=0;a<c;a++)b=this.points[a],d[a]=[b.x,b.y,b.z];return d};this.getLength=function(a){var b,c,d,e=b=b=0,f=new THREE.Vector3,g=new THREE.Vector3,h=[],k=0;h[0]=0;a||(a=100);c=this.points.length*a;f.copy(this.points[0]);for(a=1;a<c;a++)b=
2007a/c,d=this.getPoint(b),g.copy(d),k+=g.distanceTo(f),f.copy(d),b*=this.points.length-1,b=Math.floor(b),b!==e&&(h[b]=k,e=b);h[h.length]=k;return{chunks:h,total:k}};this.reparametrizeByArcLength=function(a){var b,c,d,e,f,g,h=[],k=new THREE.Vector3,l=this.getLength();h.push(k.copy(this.points[0]).clone());for(b=1;b<this.points.length;b++){c=l.chunks[b]-l.chunks[b-1];g=Math.ceil(a*c/l.total);e=(b-1)/(this.points.length-1);f=b/(this.points.length-1);for(c=1;c<g-1;c++)d=e+1/g*c*(f-e),d=this.getPoint(d),
2008h.push(k.copy(d).clone());h.push(k.copy(this.points[b]).clone())}this.points=h}};THREE.Triangle=function(a,b,c){this.a=void 0!==a?a:new THREE.Vector3;this.b=void 0!==b?b:new THREE.Vector3;this.c=void 0!==c?c:new THREE.Vector3};THREE.Triangle.normal=function(){var a=new THREE.Vector3;return function(b,c,d,e){e=e||new THREE.Vector3;e.subVectors(d,c);a.subVectors(b,c);e.cross(a);b=e.lengthSq();return 0<b?e.multiplyScalar(1/Math.sqrt(b)):e.set(0,0,0)}}();
2009THREE.Triangle.barycoordFromPoint=function(){var a=new THREE.Vector3,b=new THREE.Vector3,c=new THREE.Vector3;return function(d,e,f,g,h){a.subVectors(g,e);b.subVectors(f,e);c.subVectors(d,e);d=a.dot(a);e=a.dot(b);f=a.dot(c);var k=b.dot(b);g=b.dot(c);var l=d*k-e*e;h=h||new THREE.Vector3;if(0===l)return h.set(-2,-1,-1);l=1/l;k=(k*f-e*g)*l;d=(d*g-e*f)*l;return h.set(1-k-d,d,k)}}();
2010THREE.Triangle.containsPoint=function(){var a=new THREE.Vector3;return function(b,c,d,e){b=THREE.Triangle.barycoordFromPoint(b,c,d,e,a);return 0<=b.x&&0<=b.y&&1>=b.x+b.y}}();
2011THREE.Triangle.prototype={constructor:THREE.Triangle,set:function(a,b,c){this.a.copy(a);this.b.copy(b);this.c.copy(c);return this},setFromPointsAndIndices:function(a,b,c,d){this.a.copy(a[b]);this.b.copy(a[c]);this.c.copy(a[d]);return this},clone:function(){return(new this.constructor).copy(this)},copy:function(a){this.a.copy(a.a);this.b.copy(a.b);this.c.copy(a.c);return this},area:function(){var a=new THREE.Vector3,b=new THREE.Vector3;return function(){a.subVectors(this.c,this.b);b.subVectors(this.a,
2012this.b);return.5*a.cross(b).length()}}(),midpoint:function(a){return(a||new THREE.Vector3).addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)},normal:function(a){return THREE.Triangle.normal(this.a,this.b,this.c,a)},plane:function(a){return(a||new THREE.Plane).setFromCoplanarPoints(this.a,this.b,this.c)},barycoordFromPoint:function(a,b){return THREE.Triangle.barycoordFromPoint(a,this.a,this.b,this.c,b)},containsPoint:function(a){return THREE.Triangle.containsPoint(a,this.a,this.b,this.c)},
2013equals:function(a){return a.a.equals(this.a)&&a.b.equals(this.b)&&a.c.equals(this.c)}};THREE.Interpolant=function(a,b,c,d){this.parameterPositions=a;this._cachedIndex=0;this.resultBuffer=void 0!==d?d:new b.constructor(c);this.sampleValues=b;this.valueSize=c};
2014THREE.Interpolant.prototype={constructor:THREE.Interpolant,evaluate:function(a){var b=this.parameterPositions,c=this._cachedIndex,d=b[c],e=b[c-1];a:{b:{c:{d:if(!(a<d)){for(var f=c+2;;){if(void 0===d){if(a<e)break d;this._cachedIndex=c=b.length;return this.afterEnd_(c-1,a,e)}if(c===f)break;e=d;d=b[++c];if(a<d)break b}d=b.length;break c}if(a>=e)break a;else{f=b[1];a<f&&(c=2,e=f);for(f=c-2;;){if(void 0===e)return this._cachedIndex=0,this.beforeStart_(0,a,d);if(c===f)break;d=e;e=b[--c-1];if(a>=e)break b}d=
2015c;c=0}}for(;c<d;)e=c+d>>>1,a<b[e]?d=e:c=e+1;d=b[c];e=b[c-1];if(void 0===e)return this._cachedIndex=0,this.beforeStart_(0,a,d);
2015if(void 0===d)return this._cachedIndex=c=b.length,this.afterEnd_(c-1,e,a)}this._cachedIndex=c;this.intervalChanged_(c,e,d)}return this.interpolate_(c,e,a,d)},settings:null,DefaultSettings_:{},getSettings_:function(){return this.settings||this.DefaultSettings_},copySampleValue_:function(a){var b=this.resultBuffer,c=this.sampleValues,d=this.valueSize;a*=d;for(var e=0;e!==d;++e)b[e]=
2016c[a+e];return b},interpolate_:function(a,b,c,d){throw Error("call to abstract method");},intervalChanged_:function(a,b,c){}};Object.assign(THREE.Interpolant.prototype,{beforeStart_:THREE.Interpolant.prototype.copySampleValue_,afterEnd_:THREE.Interpolant.prototype.copySampleValue_});THREE.CubicInterpolant=function(a,b,c,d){THREE.Interpolant.call(this,a,b,c,d);this._offsetNext=this._weightNext=this._offsetPrev=this._weightPrev=-0};
2017THREE.CubicInterpolant.prototype=Object.assign(Object.create(THREE.Interpolant.prototype),{constructor:THREE.CubicInterpolant,DefaultSettings_:{endingStart:THREE.ZeroCurvatureEnding,endingEnd:THREE.ZeroCurvatureEnding},intervalChanged_:function(a,b,c){var d=this.parameterPositions,e=a-2,f=a+1,g=d[e],h=d[f];if(void 0===g)switch(this.getSettings_().endingStart){case THREE.ZeroSlopeEnding:e=a;g=2*b-c;break;case THREE.WrapAroundEnding:e=d.length-2;g=b+d[e]-d[e+1];break;default:e=a,g=c}if(void 0===h)switch(this.getSettings_().endingEnd){case THREE.ZeroSlopeEnding:f=
2018a;h=2*c-b;break;case THREE.WrapAroundEnding:f=1;h=c+d[1]-d[0];break;default:f=a-1,h=b}a=.5*(c-b);d=this.valueSize;this._weightPrev=a/(b-g);this._weightNext=a/(h-c);this._offsetPrev=e*d;this._offsetNext=f*d},interpolate_:function(a,b,c,d){var e=this.resultBuffer,f=this.sampleValues,g=this.valueSize;a*=g;var h=a-g,k=this._offsetPrev,l=this._offsetNext,p=this._weightPrev,n=this._weightNext,m=(c-b)/(d-b);c=m*m;d=c*m;b=-p*d+2*p*c-p*m;p=(1+p)*d+(-1.5-2*p)*c+(-.5+p)*m+1;m=(-1-n)*d+(1.5+n)*c+.5*m;n=n*d-n*
2019c;for(c=0;c!==g;++c)e[c]=b*f[k+c]+p*f[h+c]+m*f[a+c]+n*f[l+c];return e}});THREE.DiscreteInterpolant=function(a,b,c,d){THREE.Interpolant.call(this,a,b,c,d)};THREE.DiscreteInterpolant.prototype=Object.assign(Object.create(THREE.Interpolant.prototype),{constructor:THREE.DiscreteInterpolant,interpolate_:function(a,b,c,d){return this.copySampleValue_(a-1)}});THREE.LinearInterpolant=function(a,b,c,d){THREE.Interpolant.call(this,a,b,c,d)};
2020THREE.LinearInterpolant.prototype=Object.assign(Object.create(THREE.Interpolant.prototype),{constructor:THREE.LinearInterpolant,interpolate_:function(a,b,c,d){var e=this.resultBuffer,f=this.sampleValues,g=this.valueSize;a*=g;var h=a-g;b=(c-b)/(d-b);c=1-b;for(d=0;d!==g;++d)e[d]=f[h+d]*c+f[a+d]*b;return e}});THREE.QuaternionLinearInterpolant=function(a,b,c,d){THREE.Interpolant.call(this,a,b,c,d)};
2021THREE.QuaternionLinearInterpolant.prototype=Object.assign(Object.create(THREE.Interpolant.prototype),{constructor:THREE.QuaternionLinearInterpolant,interpolate_:function(a,b,c,d){var e=this.resultBuffer,f=this.sampleValues,g=this.valueSize;a*=g;b=(c-b)/(d-b);for(c=a+g;a!==c;a+=4)THREE.Quaternion.slerpFlat(e,0,f,a-g,f,a,b);return e}});THREE.Clock=function(a){this.autoStart=void 0!==a?a:!0;this.elapsedTime=this.oldTime=this.startTime=0;this.running=!1};
2022THREE.Clock.prototype={constructor:THREE.Clock,start:function(){this.oldTime=this.startTime=performance.now();this.running=!0},stop:function(){this.getElapsedTime();this.running=!1},getElapsedTime:function(){this.getDelta();return this.elapsedTime},getDelta:function(){var a=0;this.autoStart&&!this.running&&this.start();if(this.running){var b=performance.now(),a=.001*(b-this.oldTime);this.oldTime=b;this.elapsedTime+=a}return a}};THREE.EventDispatcher=function(){};
2023THREE.EventDispatcher.prototype={constructor:THREE.EventDispatcher,apply:function(a){a.addEventListener=THREE.EventDispatcher.prototype.addEventListener;a.hasEventListener=THREE.EventDispatcher.prototype.hasEventListener;a.removeEventListener=THREE.EventDispatcher.prototype.removeEventListener;a.dispatchEvent=THREE.EventDispatcher.prototype.dispatchEvent},addEventListener:function(a,b){void 0===this._listeners&&(this._listeners={});var c=this._listeners;void 0===c[a]&&(c[a]=[]);-1===c[a].indexOf(b)&&
2024c[a].push(b)},hasEventListener:function(a,b){if(void 0===this._listeners)return!1;var c=this._listeners;return void 0!==c[a]&&-1!==c[a].indexOf(b)?!0:!1},removeEventListener:function(a,b){if(void 0!==this._listeners){var c=this._listeners[a];if(void 0!==c){var d=c.indexOf(b);-1!==d&&c.splice(d,1)}}}
2024,dispatchEvent:function(a){if(void 0!==this._listeners){var b=this._listeners[a.type];if(void 0!==b){a.target=this;for(var c=[],d=b.length,e=0;e<d;e++)c[e]=b[e];for(e=0;e<d;e++)c[e].call(this,a)}}}};
2025THREE.Layers=function(){this.mask=1};THREE.Layers.prototype={constructor:THREE.Layers,set:function(a){this.mask=1<<a},enable:function(a){this.mask|=1<<a},toggle:function(a){this.mask^=1<<a},disable:function(a){this.mask&=~(1<<a)},test:function(a){return 0!==(this.mask&a.mask)}};
2026(function(a){function b(a,b){return a.distance-b.distance}function c(a,b,f,g){if(!1!==a.visible&&(a.raycast(b,f),!0===g)){a=a.children;g=0;for(var h=a.length;g<h;g++)c(a[g],b,f,!0)}}a.Raycaster=function(b,c,f,g){this.ray=new a.Ray(b,c);this.near=f||0;this.far=g||Infinity;this.params={Mesh:{},Line:{},LOD:{},Points:{threshold:1},Sprite:{}};Object.defineProperties(this.params,{PointCloud:{get:function(){console.warn("THREE.Raycaster: params.PointCloud has been renamed to params.Points.");return this.Points}}})};
2027a.Raycaster.prototype={constructor:a.Raycaster,linePrecision:1,set:function(a,b){this.ray.set(a,b)},setFromCamera:function(b,c){c instanceof a.PerspectiveCamera?(this.ray.origin.setFromMatrixPosition(c.matrixWorld),this.ray.direction.set(b.x,b.y,.5).unproject(c).sub(this.ray.origin).normalize()):c instanceof a.OrthographicCamera?(this.ray.origin.set(b.x,b.y,-1).unproject(c),this.ray.direction.set(0,0,-1).transformDirection(c.matrixWorld)):console.error("THREE.Raycaster: Unsupported camera type.")},
2028intersectObject:function(a,e){var f=[];c(a,this,f,e);f.sort(b);return f},intersectObjects:function(a,e){var f=[];if(!1===Array.isArray(a))return console.warn("THREE.Raycaster.intersectObjects: objects is not an Array."),f;for(var g=0,h=a.length;g<h;g++)c(a[g],this,f,e);f.sort(b);return f}}})(THREE);
2029THREE.Object3D=function(){Object.defineProperty(this,"id",{value:THREE.Object3DIdCount++});this.uuid=THREE.Math.generateUUID();this.name="";this.type="Object3D";this.parent=null;this.children=[];this.up=THREE.Object3D.DefaultUp.clone();var a=new THREE.Vector3,b=new THREE.Euler,c=new THREE.Quaternion,d=new THREE.Vector3(1,1,1);b.onChange(function(){c.setFromEuler(b,!1)});c.onChange(function(){b.setFromQuaternion(c,void 0,!1)});Object.defineProperties(this,{position:{enumerable:!0,value:a},rotation:{enumerable:!0,
2030value:b},quaternion:{enumerable:!0,value:c},scale:{enumerable:!0,value:d},modelViewMatrix:{value:new THREE.Matrix4},normalMatrix:{value:new THREE.Matrix3}});this.rotationAutoUpdate=!0;this.matrix=new THREE.Matrix4;this.matrixWorld=new THREE.Matrix4;this.matrixAutoUpdate=THREE.Object3D.DefaultMatrixAutoUpdate;this.matrixWorldNeedsUpdate=!1;this.layers=new THREE.Layers;this.visible=!0;this.receiveShadow=this.castShadow=!1;this.frustumCulled=!0;this.renderOrder=0;this.userData={}};
2031THREE.Object3D.DefaultUp=new THREE.Vector3(0,1,0);THREE.Object3D.DefaultMatrixAutoUpdate=!0;
2032THREE.Object3D.prototype={constructor:THREE.Object3D,applyMatrix:function(a){this.matrix.multiplyMatrices(a,this.matrix);this.matrix.decompose(this.position,this.quaternion,this.scale)},setRotationFromAxisAngle:function(a,b){this.quaternion.setFromAxisAngle(a,b)},setRotationFromEuler:function(a){this.quaternion.setFromEuler(a,!0)},setRotationFromMatrix:function(a){this.quaternion.setFromRotationMatrix(a)},setRotationFromQuaternion:function(a){this.quaternion.copy(a)},rotateOnAxis:function(){var a=
2033new THREE.Quaternion;return function(b,c){a.setFromAxisAngle(b,c);this.quaternion.multiply(a);return this}}(),rotateX:function(){var a=new THREE.Vector3(1,0,0);return function(b){return this.rotateOnAxis(a,b)}}(),rotateY:function(){var a=new THREE.Vector3(0,1,0);return function(b){return this.rotateOnAxis(a,b)}}(),rotateZ:function(){var a=new THREE.Vector3(0,0,1);return function(b){return this.rotateOnAxis(a,b)}}(),translateOnAxis:function(){var a=new THREE.Vector3;return function(b,c){a.copy(b).applyQuaternion(this.quaternion);
2034this.position.add(a.multiplyScalar(c));return this}}(),translateX:function(){var a=new THREE.Vector3(1,0,0);return function(b){return this.translateOnAxis(a,b)}}(),translateY:function(){var a=new THREE.Vector3(0,1,0);return function(b){return this.translateOnAxis(a,b)}}(),translateZ:function(){var a=new THREE.Vector3(0,0,1);return function(b){return this.translateOnAxis(a,b)}}(),localToWorld:function(a){return a.applyMatrix4(this.matrixWorld)},worldToLocal:function(){var a=new THREE.Matrix4;
vendor: 5,310 bytes, lines 2034-2045
2034return function(b){return b.applyMatrix4(a.getInverse(this.matrixWorld))}}(),
2035lookAt:function(){var a=new THREE.Matrix4;return function(b){a.lookAt(b,this.position,this.up);this.quaternion.setFromRotationMatrix(a)}}(),add:function(a){if(1<arguments.length){for(var b=0;b<arguments.length;b++)this.add(arguments[b]);return this}if(a===this)return console.error("THREE.Object3D.add: object can't be added as a child of itself.",a),this;a instanceof THREE.Object3D?(null!==a.parent&&a.parent.remove(a),a.parent=this,a.dispatchEvent({type:"added"}),this.children.push(a)):console.error("THREE.Object3D.add: object not an instance of THREE.Object3D.",
2036a);return this},remove:function(a){if(1<arguments.length)for(var b=0;b<arguments.length;b++)this.remove(arguments[b]);b=this.children.indexOf(a);-1!==b&&(a.parent=null,a.dispatchEvent({type:"removed"}),this.children.splice(b,1))},getObjectById:function(a){return this.getObjectByProperty("id",a)},getObjectByName:function(a){return this.getObjectByProperty("name",a)},getObjectByProperty:function(a,b){if(this[a]===b)return this;for(var c=0,d=this.children.length;c<d;c++){var e=this.children[c].getObjectByProperty(a,
2037b);if(void 0!==e)return e}},getWorldPosition:function(a){a=a||new THREE.Vector3;this.updateMatrixWorld(!0);return a.setFromMatrixPosition(this.matrixWorld)},getWorldQuaternion:function(){var a=new THREE.Vector3,b=new THREE.Vector3;return function(c){c=c||new THREE.Quaternion;this.updateMatrixWorld(!0);this.matrixWorld.decompose(a,c,b);return c}}(),getWorldRotation:function(){var a=new THREE.Quaternion;return function(b){b=b||new THREE.Euler;this.getWorldQuaternion(a);return b.setFromQuaternion(a,
2038this.rotation.order,!1)}}(),getWorldScale:function(){var a=new THREE.Vector3,b=new THREE.Quaternion;return function(c){c=c||new THREE.Vector3;this.updateMatrixWorld(!0);this.matrixWorld.decompose(a,b,c);return c}}(),getWorldDirection:function(){var a=new THREE.Quaternion;return function(b){b=b||new THREE.Vector3;this.getWorldQuaternion(a);return b.set(0,0,1).applyQuaternion(a)}}(),raycast:function(){},traverse:function(a){a(this);for(var b=this.children,c=0,d=b.length;c<d;c++)b[c].traverse(a)},traverseVisible:function(a){if(!1!==
2039this.visible){a(this);for(var b=this.children,c=0,d=b.length;c<d;c++)b[c].traverseVisible(a)}},traverseAncestors:function(a){var b=this.parent;null!==b&&(a(b),b.traverseAncestors(a))},updateMatrix:function(){this.matrix.compose(this.position,this.quaternion,this.scale);this.matrixWorldNeedsUpdate=!0},updateMatrixWorld:function(a){!0===this.matrixAutoUpdate&&this.updateMatrix();if(!0===this.matrixWorldNeedsUpdate||!0===a)null===this.parent?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,
2040this.matrix),this.matrixWorldNeedsUpdate=!1,a=!0;for(var b=0,c=this.children.length;b<c;b++)this.children[b].updateMatrixWorld(a)},toJSON:function(a){function b(a){var b=[],c;for(c in a){var d=a[c];delete d.metadata;b.push(d)}return b}var c=void 0===a,d={};c&&(a={geometries:{},materials:{},textures:{},images:{}},d.metadata={version:4.4,type:"Object",generator:"Object3D.toJSON"});var e={};e.uuid=this.uuid;e.type=this.type;""!==this.name&&(e.name=this.name);"{}"!==JSON.stringify(this.userData)&&(e.userData=
2041this.userData);!0===this.castShadow&&(e.castShadow=!0);!0===this.receiveShadow&&(e.receiveShadow=!0);!1===this.visible&&(e.visible=!1);e.matrix=this.matrix.toArray();void 0!==this.geometry&&(void 0===a.geometries[this.geometry.uuid]&&(a.geometries[this.geometry.uuid]=this.geometry.toJSON(a)),e.geometry=this.geometry.uuid);void 0!==this.material&&(void 0===a.materials[this.material.uuid]&&(a.materials[this.material.uuid]=this.material.toJSON(a)),e.material=this.material.uuid);if(0<this.children.length){e.children=
2042[];for(var f=0;f<this.children.length;f++)e.children.push(this.children[f].toJSON(a).object)}if(c){var c=b(a.geometries),f=b(a.materials),g=b(a.textures);a=b(a.images);0<c.length&&(d.geometries=c);0<f.length&&(d.materials=f);0<g.length&&(d.textures=g);0<a.length&&(d.images=a)}d.object=e;return d},clone:function(a){return(new this.constructor).copy(this,a)},copy:function(a,b){void 0===b&&(b=!0);this.name=a.name;this.up.copy(a.up);this.position.copy(a.position);this.quaternion.copy(a.quaternion);this.scale.copy(a.scale);
2043this.rotationAutoUpdate=a.rotationAutoUpdate;this.matrix.copy(a.matrix);this.matrixWorld.copy(a.matrixWorld);this.matrixAutoUpdate=a.matrixAutoUpdate;this.matrixWorldNeedsUpdate=a.matrixWorldNeedsUpdate;this.visible=a.visible;this.castShadow=a.castShadow;this.receiveShadow=a.receiveShadow;this.frustumCulled=a.frustumCulled;this.renderOrder=a.renderOrder;this.userData=JSON.parse(JSON.stringify(a.userData));if(!0===b)for(var c=0;c<a.children.length;c++)this.add(a.children[c].clone());return this}};
2044THREE.EventDispatcher.prototype.apply(THREE.Object3D.prototype);THREE.Object3DIdCount=0;THREE.Face3=function(a,b,c,d,e,f){this.a=a;this.b=b;this.c=c;this.normal=d instanceof THREE.Vector3?d:new THREE.Vector3;this.vertexNormals=Array.isArray(d)?d:[];this.color=e instanceof THREE.Color?e:new THREE.Color;this.vertexColors=Array.isArray(e)?e:[];this.materialIndex=void 0!==f?f:0};
2045THREE.Face3.prototype={constructor:THREE.Face3,clone:function(){return(new this.constructor).copy(this)},copy:function(a){this.a=a.a;
2045this.b=a.b;this.c=a.c;this.normal.copy(a.normal);this.color.copy(a.color);this.materialIndex=a.materialIndex;for(var b=0,c=a.vertexNormals.length;b<c;b++)this.vertexNormals[b]=a.vertexNormals[b].clone();b=0;for(c=a.vertexColors.length;b<c;b++)this.vertexColors[b]=a.vertexColors[b].clone();return this}};
2046THREE.BufferAttribute=function(a,b){this.uuid=THREE.Math.generateUUID();this.array=a;this.itemSize=b;this.dynamic=!1;this.updateRange={offset:0,count:-1};this.version=0};
2047THREE.BufferAttribute.prototype={constructor:THREE.BufferAttribute,get count(){return this.array.length/this.itemSize},set needsUpdate(a){!0===a&&this.version++},setDynamic:function(a){this.dynamic=a;return this},copy:function(a){this.array=new a.array.constructor(a.array);this.itemSize=a.itemSize;this.dynamic=a.dynamic;return this},copyAt:function(a,b,c){a*=this.itemSize;c*=b.itemSize;for(var d=0,e=this.itemSize;d<e;d++)this.array[a+d]=b.array[c+d];return this},copyArray:function(a){this.array.set(a);
2048return this},copyColorsArray:function(a){for(var b=this.array,c=0,d=0,e=a.length;d<e;d++){var f=a[d];void 0===f&&(console.warn("THREE.BufferAttribute.copyColorsArray(): color is undefined",d),f=new THREE.Color);b[c++]=f.r;b[c++]=f.g;b[c++]=f.b}return this},copyIndicesArray:function(a){for(var b=this.array,c=0,d=0,e=a.length;d<e;d++){var f=a[d];b[c++]=f.a;b[c++]=f.b;b[c++]=f.c}return this},copyVector2sArray:function(a){for(var b=this.array,c=0,d=0,e=a.length;d<e;d++){var f=a[d];void 0===f&&(console.warn("THREE.BufferAttribute.copyVector2sArray(): vector is undefined",
2049d),f=new THREE.Vector2);b[c++]=f.x;b[c++]=f.y}return this},copyVector3sArray:function(a){for(var b=this.array,c=0,d=0,e=a.length;d<e;d++){var f=a[d];void 0===f&&(console.warn("THREE.BufferAttribute.copyVector3sArray(): vector is undefined",d),f=new THREE.Vector3);b[c++]=f.x;b[c++]=f.y;b[c++]=f.z}return this},copyVector4sArray:function(a){for(var b=this.array,c=0,d=0,e=a.length;d<e;d++){var f=a[d];void 0===f&&(console.warn("THREE.BufferAttribute.copyVector4sArray(): vector is undefined",d),f=new THREE.Vector4);
2050b[c++]=f.x;b[c++]=f.y;b[c++]=f.z;b[c++]=f.w}return this},set:function(a,b){void 0===b&&(b=0);this.array.set(a,b);return this},getX:function(a){return this.array[a*this.itemSize]},setX:function(a,b){this.array[a*this.itemSize]=b;return this},getY:function(a){return this.array[a*this.itemSize+1]},setY:function(a,b){this.array[a*this.itemSize+1]=b;return this},getZ:function(a){return this.array[a*this.itemSize+2]},setZ:function(a,b){this.array[a*this.itemSize+2]=b;return this},getW:function(a){return this.array[a*
2051this.itemSize+3]},setW:function(a,b){this.array[a*this.itemSize+3]=b;return this},setXY:function(a,b,c){a*=this.itemSize;this.array[a+0]=b;this.array[a+1]=c;return this},setXYZ:function(a,b,c,d){a*=this.itemSize;this.array[a+0]=b;this.array[a+1]=c;this.array[a+2]=d;return this},setXYZW:function(a,b,c,d,e){a*=this.itemSize;this.array[a+0]=b;this.array[a+1]=c;this.array[a+2]=d;this.array[a+3]=e;return this},clone:function(){return(new this.constructor).copy(this)}};
2052THREE.Int8Attribute=function(a,b){return new THREE.BufferAttribute(new Int8Array(a),b)};THREE.Uint8Attribute=function(a,b){return new THREE.BufferAttribute(new Uint8Array(a),b)};THREE.Uint8ClampedAttribute=function(a,b){return new THREE.BufferAttribute(new Uint8ClampedArray(a),b)};THREE.Int16Attribute=function(a,b){return new THREE.BufferAttribute(new Int16Array(a),b)};THREE.Uint16Attribute=function(a,b){return new THREE.BufferAttribute(new Uint16Array(a),b)};
2053THREE.Int32Attribute=function(a,b){return new THREE.BufferAttribute(new Int32Array(a),b)};THREE.Uint32Attribute=function(a,b){return new THREE.BufferAttribute(new Uint32Array(a),b)};THREE.Float32Attribute=function(a,b){return new THREE.BufferAttribute(new Float32Array(a),b)};THREE.Float64Attribute=function(a,b){return new THREE.BufferAttribute(new Float64Array(a),b)};
2054THREE.DynamicBufferAttribute=function(a,b){console.warn("THREE.DynamicBufferAttribute has been removed. Use new THREE.BufferAttribute().setDynamic( true ) instead.");return(new THREE.BufferAttribute(a,b)).setDynamic(!0)};THREE.InstancedBufferAttribute=function(a,b,c){THREE.BufferAttribute.call(this,a,b);this.meshPerAttribute=c||1};THREE.InstancedBufferAttribute.prototype=Object.create(THREE.BufferAttribute.prototype);THREE.InstancedBufferAttribute.prototype.constructor=THREE.InstancedBufferAttribute;
2055THREE.InstancedBufferAttribute.prototype.copy=function(a){THREE.BufferAttribute.prototype.copy.call(this,a);this.meshPerAttribute=a.meshPerAttribute;return this};THREE.InterleavedBuffer=function(a,b){this.uuid=THREE.Math.generateUUID();this.array=a;this.stride=b;this.dynamic=!1;this.updateRange={offset:0,count:-1};this.version=0};
2056THREE.InterleavedBuffer.prototype={constructor:THREE.InterleavedBuffer,get length(){return this.array.length},get count(){return this.array.length/this.stride},set needsUpdate(a){!0===a&&this.version++},setDynamic:function(a){this.dynamic=a;return this},copy:function(a){this.array=new a.array.constructor(a.array);
2056this.stride=a.stride;this.dynamic=a.dynamic;return this},copyAt:function(a,b,c){a*=this.stride;c*=b.stride;for(var d=0,e=this.stride;d<e;d++)this.array[a+d]=b.array[c+d];return this},set:function(a,
2057b){void 0===b&&(b=0);this.array.set(a,b);return this},clone:function(){return(new this.constructor).copy(this)}};THREE.InstancedInterleavedBuffer=function(a,b,c){THREE.InterleavedBuffer.call(this,a,b);this.meshPerAttribute=c||1};THREE.InstancedInterleavedBuffer.prototype=Object.create(THREE.InterleavedBuffer.prototype);THREE.InstancedInterleavedBuffer.prototype.constructor=THREE.InstancedInterleavedBuffer;
2058THREE.InstancedInterleavedBuffer.prototype.copy=function(a){THREE.InterleavedBuffer.prototype.copy.call(this,a);this.meshPerAttribute=a.meshPerAttribute;return this};THREE.InterleavedBufferAttribute=function(a,b,c){this.uuid=THREE.Math.generateUUID();this.data=a;this.itemSize=b;this.offset=c};
2059THREE.InterleavedBufferAttribute.prototype={constructor:THREE.InterleavedBufferAttribute,get length(){console.warn("THREE.BufferAttribute: .length has been deprecated. Please use .count.");return this.array.length},get count(){return this.data.count},setX:function(a,b){this.data.array[a*this.data.stride+this.offset]=b;return this},setY:function(a,b){this.data.array[a*this.data.stride+this.offset+1]=b;return this},setZ:function(a,b){this.data.array[a*this.data.stride+this.offset+2]=b;return this},
2060setW:function(a,b){this.data.array[a*this.data.stride+this.offset+3]=b;return this},getX:function(a){return this.data.array[a*this.data.stride+this.offset]},getY:function(a){return this.data.array[a*this.data.stride+this.offset+1]},getZ:function(a){return this.data.array[a*this.data.stride+this.offset+2]},getW:function(a){return this.data.array[a*this.data.stride+this.offset+3]},setXY:function(a,b,c){a=a*this.data.stride+this.offset;this.data.array[a+0]=b;this.data.array[a+1]=c;return this},setXYZ:function(a,
2061b,c,d){a=a*this.data.stride+this.offset;this.data.array[a+0]=b;this.data.array[a+1]=c;this.data.array[a+2]=d;return this},setXYZW:function(a,b,c,d,e){a=a*this.data.stride+this.offset;this.data.array[a+0]=b;this.data.array[a+1]=c;this.data.array[a+2]=d;this.data.array[a+3]=e;return this}};
2062THREE.Geometry=function(){Object.defineProperty(this,"id",{value:THREE.GeometryIdCount++});this.uuid=THREE.Math.generateUUID();this.name="";this.type="Geometry";this.vertices=[];this.colors=[];this.faces=[];this.faceVertexUvs=[[]];this.morphTargets=[];this.morphNormals=[];this.skinWeights=[];this.skinIndices=[];this.lineDistances=[];this.boundingSphere=this.boundingBox=null;this.groupsNeedUpdate=this.lineDistancesNeedUpdate=this.colorsNeedUpdate=this.normalsNeedUpdate=this.uvsNeedUpdate=this.elementsNeedUpdate=
2063this.verticesNeedUpdate=!1};
2064THREE.Geometry.prototype={constructor:THREE.Geometry,applyMatrix:function(a){for(var b=(new THREE.Matrix3).getNormalMatrix(a),c=0,d=this.vertices.length;c<d;c++)this.vertices[c].applyMatrix4(a);c=0;for(d=this.faces.length;c<d;c++){a=this.faces[c];a.normal.applyMatrix3(b).normalize();for(var e=0,f=a.vertexNormals.length;e<f;e++)a.vertexNormals[e].applyMatrix3(b).normalize()}null!==this.boundingBox&&this.computeBoundingBox();null!==this.boundingSphere&&this.computeBoundingSphere();this.normalsNeedUpdate=
2065this.verticesNeedUpdate=!0;return this},rotateX:function(){var a;return function(b){void 0===a&&(a=new THREE.Matrix4);a.makeRotationX(b);this.applyMatrix(a);return this}}(),rotateY:function(){var a;return function(b){void 0===a&&(a=new THREE.Matrix4);a.makeRotationY(b);this.applyMatrix(a);return this}}(),rotateZ:function(){var a;return function(b){void 0===a&&(a=new THREE.Matrix4);a.makeRotationZ(b);this.applyMatrix(a);return this}}(),translate:function(){var a;return function(b,c,d){void 0===a&&
2066(a=new THREE.Matrix4);a.makeTranslation(b,c,d);this.applyMatrix(a);return this}}(),scale:function(){var a;return function(b,c,d){void 0===a&&(a=new THREE.Matrix4);a.makeScale(b,c,d);this.applyMatrix(a);return this}}(),lookAt:function(){var a;return function(b){void 0===a&&(a=new THREE.Object3D);a.lookAt(b);a.updateMatrix();this.applyMatrix(a.matrix)}}(),fromBufferGeometry:function(a){function b(a,b,d,e){var f=void 0!==g?[p[a].clone(),p[b].clone(),p[d].clone()]:[],q=void 0!==h?[c.colors[a].clone(),
2067c.colors[b].clone(),c.colors[d].clone()]:[];e=new THREE.Face3(a,b,d,f,q,e);c.faces.push(e);void 0!==k&&c.faceVertexUvs[0].push([n[a].clone(),n[b].clone(),n[d].clone()]);
vendor: 2,652 bytes, lines 2067-2072
2067void 0!==l&&c.faceVertexUvs[1].push([m[a].clone(),m[b].clone(),m[d].clone()])}var c=this,d=null!==a.index?a.index.array:void 0,e=a.attributes,f=e.position.array,g=void 0!==e.normal?e.normal.array:void 0,h=void 0!==e.color?e.color.array:void 0,k=void 0!==e.uv?e.uv.array:void 0,l=void 0!==e.uv2?e.uv2.array:void 0;void 0!==l&&(this.faceVertexUvs[1]=
2068[]);for(var p=[],n=[],m=[],q=e=0;e<f.length;e+=3,q+=2)c.vertices.push(new THREE.Vector3(f[e],f[e+1],f[e+2])),void 0!==g&&p.push(new THREE.Vector3(g[e],g[e+1],g[e+2])),void 0!==h&&c.colors.push(new THREE.Color(h[e],h[e+1],h[e+2])),void 0!==k&&n.push(new THREE.Vector2(k[q],k[q+1])),void 0!==l&&m.push(new THREE.Vector2(l[q],l[q+1]));if(void 0!==d)if(f=a.groups,0<f.length)for(e=0;e<f.length;e++)for(var u=f[e],v=u.start,t=u.count,q=v,v=v+t;q<v;q+=3)b(d[q],d[q+1],d[q+2],u.materialIndex);else for(e=0;e<
2069d.length;e+=3)b(d[e],d[e+1],d[e+2]);else for(e=0;e<f.length/3;e+=3)b(e,e+1,e+2);this.computeFaceNormals();null!==a.boundingBox&&(this.boundingBox=a.boundingBox.clone());null!==a.boundingSphere&&(this.boundingSphere=a.boundingSphere.clone());return this},center:function(){this.computeBoundingBox();var a=this.boundingBox.center().negate();this.translate(a.x,a.y,a.z);return a},normalize:function(){this.computeBoundingSphere();var a=this.boundingSphere.center,b=this.boundingSphere.radius,b=0===b?1:1/
2070b,c=new THREE.Matrix4;c.set(b,0,0,-b*a.x,0,b,0,-b*a.y,0,0,b,-b*a.z,0,0,0,1);this.applyMatrix(c);return this},computeFaceNormals:function(){for(var a=new THREE.Vector3,b=new THREE.Vector3,c=0,d=this.faces.length;c<d;c++){var e=this.faces[c],f=this.vertices[e.a],g=this.vertices[e.b];a.subVectors(this.vertices[e.c],g);b.subVectors(f,g);a.cross(b);a.normalize();e.normal.copy(a)}},computeVertexNormals:function(a){void 0===a&&(a=!0);var b,c,d;d=Array(this.vertices.length);b=0;for(c=this.vertices.length;b<
2071c;b++)d[b]=new THREE.Vector3;if(a){var e,f,g,h=new THREE.Vector3,k=new THREE.Vector3;a=0;for(b=this.faces.length;a<b;a++)c=this.faces[a],e=this.vertices[c.a],f=this.vertices[c.b],g=this.vertices[c.c],h.subVectors(g,f),k.subVectors(e,f),h.cross(k),d[c.a].add(h),d[c.b].add(h),d[c.c].add(h)}else for(a=0,b=this.faces.length;a<b;a++)c=this.faces[a],d[c.a].add(c.normal),d[c.b].add(c.normal),d[c.c].add(c.normal);b=0;for(c=this.vertices.length;b<c;b++)d[b].normalize();a=0;for(b=this.faces.length;a<b;a++)c=
2072this.faces[a],e=c.vertexNormals,3===e.length?(e[0].copy(d[c.a]),e[1].copy(d[c.b]),e[2].copy(d[c.c])):(e[0]=d[c.a].clone(),e[1]=d[c.b].clone(),e[2]=d[c.c].clone());0<this.faces.length&&(this.normalsNeedUpdate=!0)},computeMorphNormals:function(){var a,b,c,d,e;c=0;for(d=this.faces.length;c<d;
2072c++)for(e=this.faces[c],e.__originalFaceNormal?e.__originalFaceNormal.copy(e.normal):e.__originalFaceNormal=e.normal.clone(),e.__originalVertexNormals||(e.__originalVertexNormals=[]),a=0,b=e.vertexNormals.length;a<
2073b;a++)e.__originalVertexNormals[a]?e.__originalVertexNormals[a].copy(e.vertexNormals[a]):e.__originalVertexNormals[a]=e.vertexNormals[a].clone();var f=new THREE.Geometry;f.faces=this.faces;a=0;for(b=this.morphTargets.length;a<b;a++){if(!this.morphNormals[a]){this.morphNormals[a]={};this.morphNormals[a].faceNormals=[];this.morphNormals[a].vertexNormals=[];e=this.morphNormals[a].faceNormals;var g=this.morphNormals[a].vertexNormals,h,k;c=0;for(d=this.faces.length;c<d;c++)h=new THREE.Vector3,k={a:new THREE.Vector3,
2074b:new THREE.Vector3,c:new THREE.Vector3},e.push(h),g.push(k)}g=this.morphNormals[a];f.vertices=this.morphTargets[a].vertices;f.computeFaceNormals();f.computeVertexNormals();c=0;for(d=this.faces.length;c<d;c++)e=this.faces[c],h=g.faceNormals[c],k=g.vertexNormals[c],h.copy(e.normal),k.a.copy(e.vertexNormals[0]),k.b.copy(e.vertexNormals[1]),k.c.copy(e.vertexNormals[2])}c=0;for(d=this.faces.length;c<d;
vendor: 10,974 bytes, lines 2074-2097
2074c++)e=this.faces[c],e.normal=e.__originalFaceNormal,e.vertexNormals=e.__originalVertexNormals},computeTangents:function(){console.warn("THREE.Geometry: .computeTangents() has been removed.")},
2075computeLineDistances:function(){for(var a=0,b=this.vertices,c=0,d=b.length;c<d;c++)0<c&&(a+=b[c].distanceTo(b[c-1])),this.lineDistances[c]=a},computeBoundingBox:function(){null===this.boundingBox&&(this.boundingBox=new THREE.Box3);this.boundingBox.setFromPoints(this.vertices)},computeBoundingSphere:function(){null===this.boundingSphere&&(this.boundingSphere=new THREE.Sphere);this.boundingSphere.setFromPoints(this.vertices)},merge:function(a,b,c){if(!1===a instanceof THREE.Geometry)console.error("THREE.Geometry.merge(): geometry not an instance of THREE.Geometry.",
2076a);else{var d,e=this.vertices.length,f=this.vertices,g=a.vertices,h=this.faces,k=a.faces,l=this.faceVertexUvs[0];a=a.faceVertexUvs[0];void 0===c&&(c=0);void 0!==b&&(d=(new THREE.Matrix3).getNormalMatrix(b));for(var p=0,n=g.length;p<n;p++){var m=g[p].clone();void 0!==b&&m.applyMatrix4(b);f.push(m)}p=0;for(n=k.length;p<n;p++){var g=k[p],q,u=g.vertexNormals,v=g.vertexColors,m=new THREE.Face3(g.a+e,g.b+e,g.c+e);m.normal.copy(g.normal);void 0!==d&&m.normal.applyMatrix3(d).normalize();b=0;for(f=u.length;b<
2077f;b++)q=u[b].clone(),void 0!==d&&q.applyMatrix3(d).normalize(),m.vertexNormals.push(q);m.color.copy(g.color);b=0;for(f=v.length;b<f;b++)q=v[b],m.vertexColors.push(q.clone());m.materialIndex=g.materialIndex+c;h.push(m)}p=0;for(n=a.length;p<n;p++)if(c=a[p],d=[],void 0!==c){b=0;for(f=c.length;b<f;b++)d.push(c[b].clone());l.push(d)}}},mergeMesh:function(a){!1===a instanceof THREE.Mesh?console.error("THREE.Geometry.mergeMesh(): mesh not an instance of THREE.Mesh.",a):(a.matrixAutoUpdate&&a.updateMatrix(),
2078this.merge(a.geometry,a.matrix))},mergeVertices:function(){var a={},b=[],c=[],d,e=Math.pow(10,4),f,g;f=0;for(g=this.vertices.length;f<g;f++)d=this.vertices[f],d=Math.round(d.x*e)+"_"+Math.round(d.y*e)+"_"+Math.round(d.z*e),void 0===a[d]?(a[d]=f,b.push(this.vertices[f]),c[f]=b.length-1):c[f]=c[a[d]];a=[];f=0;for(g=this.faces.length;f<g;f++)for(e=this.faces[f],e.a=c[e.a],e.b=c[e.b],e.c=c[e.c],e=[e.a,e.b,e.c],d=0;3>d;d++)if(e[d]===e[(d+1)%3]){a.push(f);break}for(f=a.length-1;0<=f;f--)for(e=a[f],this.faces.splice(e,
20791),c=0,g=this.faceVertexUvs.length;c<g;c++)this.faceVertexUvs[c].splice(e,1);f=this.vertices.length-b.length;this.vertices=b;return f},sortFacesByMaterialIndex:function(){for(var a=this.faces,b=a.length,c=0;c<b;c++)a[c]._id=c;a.sort(function(a,b){return a.materialIndex-b.materialIndex});var d=this.faceVertexUvs[0],e=this.faceVertexUvs[1],f,g;d&&d.length===b&&(f=[]);e&&e.length===b&&(g=[]);for(c=0;c<b;c++){var h=a[c]._id;f&&f.push(d[h]);g&&g.push(e[h])}f&&(this.faceVertexUvs[0]=f);g&&(this.faceVertexUvs[1]=
2080g)},toJSON:function(){function a(a,b,c){return c?a|1<<b:a&~(1<<b)}function b(a){var b=a.x.toString()+a.y.toString()+a.z.toString();if(void 0!==l[b])return l[b];l[b]=k.length/3;k.push(a.x,a.y,a.z);return l[b]}function c(a){var b=a.r.toString()+a.g.toString()+a.b.toString();if(void 0!==n[b])return n[b];n[b]=p.length;p.push(a.getHex());return n[b]}function d(a){var b=a.x.toString()+a.y.toString();if(void 0!==q[b])return q[b];q[b]=m.length/2;m.push(a.x,a.y);return q[b]}var e={metadata:{version:4.4,type:"Geometry",
2081generator:"Geometry.toJSON"}};e.uuid=this.uuid;e.type=this.type;""!==this.name&&(e.name=this.name);if(void 0!==this.parameters){var f=this.parameters,g;for(g in f)void 0!==f[g]&&(e[g]=f[g]);return e}f=[];for(g=0;g<this.vertices.length;g++){var h=this.vertices[g];f.push(h.x,h.y,h.z)}var h=[],k=[],l={},p=[],n={},m=[],q={};for(g=0;g<this.faces.length;g++){var u=this.faces[g],v=void 0!==this.faceVertexUvs[0][g],t=0<u.normal.length(),s=0<u.vertexNormals.length,w=1!==u.color.r||1!==u.color.g||1!==u.color.b,
2082E=0<u.vertexColors.length,x=0,x=a(x,0,0),x=a(x,1,!0),x=a(x,2,!1),x=a(x,3,v),x=a(x,4,t),x=a(x,5,s),x=a(x,6,w),x=a(x,7,E);h.push(x);h.push(u.a,u.b,u.c);h.push(u.materialIndex);v&&(v=this.faceVertexUvs[0][g],h.push(d(v[0]),d(v[1]),d(v[2])));t&&h.push(b(u.normal));s&&(t=u.vertexNormals,h.push(b(t[0]),b(t[1]),b(t[2])));w&&h.push(c(u.color));E&&(u=u.vertexColors,h.push(c(u[0]),c(u[1]),c(u[2])))}e.data={};e.data.vertices=f;e.data.normals=k;0<p.length&&(e.data.colors=p);0<m.length&&(e.data.uvs=[m]);e.data.faces=
2083h;return e},clone:function(){return(new THREE.Geometry).copy(this)},copy:function(a){this.vertices=[];this.faces=[];this.faceVertexUvs=[[]];for(var b=a.vertices,c=0,d=b.length;c<d;c++)this.vertices.push(b[c].clone());b=a.faces;c=0;for(d=b.length;c<d;c++)this.faces.push(b[c].clone());c=0;for(d=a.faceVertexUvs.length;c<d;c++){b=a.faceVertexUvs[c];void 0===this.faceVertexUvs[c]&&(this.faceVertexUvs[c]=[]);for(var e=0,f=b.length;e<f;e++){for(var g=b[e],h=[],k=0,l=g.length;k<l;k++)h.push(g[k].clone());
2084this.faceVertexUvs[c].push(h)}}return this},dispose:function(){this.dispatchEvent({type:"dispose"})}};THREE.EventDispatcher.prototype.apply(THREE.Geometry.prototype);THREE.GeometryIdCount=0;
2085THREE.DirectGeometry=function(){Object.defineProperty(this,"id",{value:THREE.GeometryIdCount++});this.uuid=THREE.Math.generateUUID();this.name="";this.type="DirectGeometry";this.indices=[];this.vertices=[];this.normals=[];this.colors=[];this.uvs=[];this.uvs2=[];this.groups=[];this.morphTargets={};this.skinWeights=[];this.skinIndices=[];this.boundingSphere=this.boundingBox=null;this.groupsNeedUpdate=this.uvsNeedUpdate=this.colorsNeedUpdate=this.normalsNeedUpdate=this.verticesNeedUpdate=!1};
2086THREE.DirectGeometry.prototype={constructor:THREE.DirectGeometry,computeBoundingBox:THREE.Geometry.prototype.computeBoundingBox,computeBoundingSphere:THREE.Geometry.prototype.computeBoundingSphere,computeFaceNormals:function(){console.warn("THREE.DirectGeometry: computeFaceNormals() is not a method of this type of geometry.")},computeVertexNormals:function(){console.warn("THREE.DirectGeometry: computeVertexNormals() is not a method of this type of geometry.")},computeGroups:function(a){var b,c=[],
2087d;a=a.faces;for(var e=0;e<a.length;e++){var f=a[e];f.materialIndex!==d&&(d=f.materialIndex,void 0!==b&&(b.count=3*e-b.start,c.push(b)),b={start:3*e,materialIndex:d})}void 0!==b&&(b.count=3*e-b.start,c.push(b));this.groups=c},fromGeometry:function(a){var b=a.faces,c=a.vertices,d=a.faceVertexUvs,e=d[0]&&0<d[0].length,f=d[1]&&0<d[1].length,g=a.morphTargets,h=g.length,k;if(0<h){k=[];for(var l=0;l<h;l++)k[l]=[];this.morphTargets.position=k}var p=a.morphNormals,n=p.length,m;if(0<n){m=[];for(l=0;l<n;l++)m[l]=
2088[];this.morphTargets.normal=m}for(var q=a.skinIndices,u=a.skinWeights,v=q.length===c.length,t=u.length===c.length,l=0;l<b.length;l++){var s=b[l];this.vertices.push(c[s.a],c[s.b],c[s.c]);var w=s.vertexNormals;3===w.length?this.normals.push(w[0],w[1],w[2]):(w=s.normal,this.normals.push(w,w,w));w=s.vertexColors;3===w.length?this.colors.push(w[0],w[1],w[2]):(w=s.color,this.colors.push(w,w,w));!0===e&&(w=d[0][l],void 0!==w?this.uvs.push(w[0],w[1],w[2]):(console.warn("THREE.DirectGeometry.fromGeometry(): Undefined vertexUv ",
2089l),this.uvs.push(new THREE.Vector2,new THREE.Vector2,new THREE.Vector2)));!0===f&&(w=d[1][l],void 0!==w?this.uvs2.push(w[0],w[1],w[2]):(console.warn("THREE.DirectGeometry.fromGeometry(): Undefined vertexUv2 ",l),this.uvs2.push(new THREE.Vector2,new THREE.Vector2,new THREE.Vector2)));for(w=0;w<h;w++){var E=g[w].vertices;k[w].push(E[s.a],E[s.b],E[s.c])}for(w=0;w<n;w++)E=p[w].vertexNormals[l],m[w].push(E.a,E.b,E.c);v&&this.skinIndices.push(q[s.a],q[s.b],q[s.c]);t&&this.skinWeights.push(u[s.a],u[s.b],
2090u[s.c])}this.computeGroups(a);this.verticesNeedUpdate=a.verticesNeedUpdate;this.normalsNeedUpdate=a.normalsNeedUpdate;this.colorsNeedUpdate=a.colorsNeedUpdate;this.uvsNeedUpdate=a.uvsNeedUpdate;this.groupsNeedUpdate=a.groupsNeedUpdate;return this},dispose:function(){this.dispatchEvent({type:"dispose"})}};THREE.EventDispatcher.prototype.apply(THREE.DirectGeometry.prototype);
2091THREE.BufferGeometry=function(){Object.defineProperty(this,"id",{value:THREE.GeometryIdCount++});this.uuid=THREE.Math.generateUUID();this.name="";this.type="BufferGeometry";this.index=null;this.attributes={};this.morphAttributes={};this.groups=[];this.boundingSphere=this.boundingBox=null;this.drawRange={start:0,count:Infinity}};
2092THREE.BufferGeometry.prototype={constructor:THREE.BufferGeometry,getIndex:function(){return this.index},setIndex:function(a){this.index=a},addAttribute:function(a,b,c){if(!1===b instanceof THREE.BufferAttribute&&!1===b instanceof THREE.InterleavedBufferAttribute)console.warn("THREE.BufferGeometry: .addAttribute() now expects ( name, attribute )."),this.addAttribute(a,new THREE.BufferAttribute(b,c));else if("index"===a)console.warn("THREE.BufferGeometry.addAttribute: Use .setIndex() for index attribute."),
2093this.setIndex(b);else return this.attributes[a]=b,this},getAttribute:function(a){return this.attributes[a]},removeAttribute:function(a){delete this.attributes[a];return this},addGroup:function(a,b,c){this.groups.push({start:a,count:b,materialIndex:void 0!==c?c:0})},clearGroups:function(){this.groups=[]},setDrawRange:function(a,b){this.drawRange.start=a;this.drawRange.count=b},applyMatrix:function(a){var b=this.attributes.position;void 0!==b&&(a.applyToVector3Array(b.array),b.needsUpdate=!0);b=this.attributes.normal;
2094void 0!==b&&((new THREE.Matrix3).getNormalMatrix(a).applyToVector3Array(b.array),b.needsUpdate=!0);null!==this.boundingBox&&this.computeBoundingBox();null!==this.boundingSphere&&this.computeBoundingSphere();return this},rotateX:function(){var a;return function(b){void 0===a&&(a=new THREE.Matrix4);a.makeRotationX(b);this.applyMatrix(a);return this}}(),rotateY:function(){var a;return function(b){void 0===a&&(a=new THREE.Matrix4);a.makeRotationY(b);this.applyMatrix(a);return this}}(),rotateZ:function(){var a;
2095return function(b){void 0===a&&(a=new THREE.Matrix4);a.makeRotationZ(b);this.applyMatrix(a);return this}}(),translate:function(){var a;return function(b,c,d){void 0===a&&(a=new THREE.Matrix4);a.makeTranslation(b,c,d);this.applyMatrix(a);return this}}(),scale:function(){var a;return function(b,c,d){void 0===a&&(a=new THREE.Matrix4);a.makeScale(b,c,d);this.applyMatrix(a);return this}}(),lookAt:function(){var a;return function(b){void 0===a&&(a=new THREE.Object3D);a.lookAt(b);a.updateMatrix();this.applyMatrix(a.matrix)}}(),
2096center:function(){this.computeBoundingBox();var a=this.boundingBox.center().negate();this.translate(a.x,a.y,a.z);return a},setFromObject:function(a){var b=a.geometry;if(a instanceof THREE.Points||a instanceof THREE.Line){a=new THREE.Float32Attribute(3*b.vertices.length,3);var c=new THREE.Float32Attribute(3*b.colors.length,3);this.addAttribute("position",a.copyVector3sArray(b.vertices));this.addAttribute("color",c.copyColorsArray(b.colors));b.lineDistances&&b.lineDistances.length===b.vertices.length&&
2097(a=new THREE.Float32Attribute(b.lineDistances.length,1),this.addAttribute("lineDistance",a.copyArray(b.lineDistances)));
2097null!==b.boundingSphere&&(this.boundingSphere=b.boundingSphere.clone());null!==b.boundingBox&&(this.boundingBox=b.boundingBox.clone())}else a instanceof THREE.Mesh&&b instanceof THREE.Geometry&&this.fromGeometry(b);return this},updateFromObject:function(a){var b=a.geometry;if(a instanceof THREE.Mesh){var c=b.__directGeometry;if(void 0===c)return this.fromGeometry(b);c.verticesNeedUpdate=
2098b.verticesNeedUpdate;c.normalsNeedUpdate=b.normalsNeedUpdate;c.colorsNeedUpdate=b.colorsNeedUpdate;c.uvsNeedUpdate=b.uvsNeedUpdate;c.groupsNeedUpdate=b.groupsNeedUpdate;b.verticesNeedUpdate=!1;b.normalsNeedUpdate=!1;b.colorsNeedUpdate=!1;b.uvsNeedUpdate=!1;b.groupsNeedUpdate=!1;b=c}!0===b.verticesNeedUpdate&&(c=this.attributes.position,void 0!==c&&(c.copyVector3sArray(b.vertices),c.needsUpdate=!0),b.verticesNeedUpdate=!1);!0===b.normalsNeedUpdate&&(c=this.attributes.normal,void 0!==c&&(c.copyVector3sArray(b.normals),
2099c.needsUpdate=!0),b.normalsNeedUpdate=!1);!0===b.colorsNeedUpdate&&(c=this.attributes.color,void 0!==c&&(c.copyColorsArray(b.colors),c.needsUpdate=!0),b.colorsNeedUpdate=!1);b.uvsNeedUpdate&&(c=this.attributes.uv,void 0!==c&&(c.copyVector2sArray(b.uvs),c.needsUpdate=!0),b.uvsNeedUpdate=!1);b.lineDistancesNeedUpdate&&(c=this.attributes.lineDistance,void 0!==c&&(c.copyArray(b.lineDistances),c.needsUpdate=!0),b.lineDistancesNeedUpdate=!1);b.groupsNeedUpdate&&(b.computeGroups(a.geometry),this.groups=
2100b.groups,b.groupsNeedUpdate=!1);return this},fromGeometry:function(a){a.__directGeometry=(new THREE.DirectGeometry).fromGeometry(a);return this.fromDirectGeometry(a.__directGeometry)},fromDirectGeometry:function(a){var b=new Float32Array(3*a.vertices.length);this.addAttribute("position",(new THREE.BufferAttribute(b,3)).copyVector3sArray(a.vertices));0<a.normals.length&&(b=new Float32Array(3*a.normals.length),this.addAttribute("normal",(new THREE.BufferAttribute(b,3)).copyVector3sArray(a.normals)));
21010<a.colors.length&&(b=new Float32Array(3*a.colors.length),this.addAttribute("color",(new THREE.BufferAttribute(b,3)).copyColorsArray(a.colors)));0<a.uvs.length&&(b=new Float32Array(2*a.uvs.length),this.addAttribute("uv",(new THREE.BufferAttribute(b,2)).copyVector2sArray(a.uvs)));0<a.uvs2.length&&(b=new Float32Array(2*a.uvs2.length),this.addAttribute("uv2",(new THREE.BufferAttribute(b,2)).copyVector2sArray(a.uvs2)));0<a.indices.length&&(b=new (65535<a.vertices.length?Uint32Array:Uint16Array)(3*a.indices.length),
2102this.setIndex((new THREE.BufferAttribute(b,1)).copyIndicesArray(a.indices)));this.groups=a.groups;for(var c in a.morphTargets){for(var b=[],d=a.morphTargets[c],e=0,f=d.length;e<f;e++){var g=d[e],h=new THREE.Float32Attribute(3*g.length,3);b.push(h.copyVector3sArray(g))}this.morphAttributes[c]=b}0<a.skinIndices.length&&(c=new THREE.Float32Attribute(4*a.skinIndices.length,4),this.addAttribute("skinIndex",c.copyVector4sArray(a.skinIndices)));0<a.skinWeights.length&&(c=new THREE.Float32Attribute(4*a.skinWeights.length,
21034),this.addAttribute("skinWeight",c.copyVector4sArray(a.skinWeights)));null!==a.boundingSphere&&(this.boundingSphere=a.boundingSphere.clone());null!==a.boundingBox&&(this.boundingBox=a.boundingBox.clone());return this},computeBoundingBox:function(){new THREE.Vector3;return function(){null===this.boundingBox&&(this.boundingBox=new THREE.Box3);var a=this.attributes.position.array;a&&this.boundingBox.setFromArray(a);if(void 0===a||0===a.length)this.boundingBox.min.set(0,0,0),this.boundingBox.max.set(0,
21040,0);(isNaN(this.boundingBox.min.x)||isNaN(this.boundingBox.min.y)||isNaN(this.boundingBox.min.z))&&console.error('THREE.BufferGeometry.computeBoundingBox: Computed min/max have NaN values. The "position" attribute is likely to have NaN values.',this)}}(),computeBoundingSphere:function(){var a=new THREE.Box3,b=new THREE.Vector3;return function(){null===this.boundingSphere&&(this.boundingSphere=new THREE.Sphere);var c=this.attributes.position.array;if(c){var d=this.boundingSphere.center;a.setFromArray(c);
2105a.center(d);for(var e=0,f=0,g=c.length;f<g;f+=3)b.fromArray(c,f),e=Math.max(e,d.distanceToSquared(b));this.boundingSphere.radius=Math.sqrt(e);isNaN(this.boundingSphere.radius)&&console.error('THREE.BufferGeometry.computeBoundingSphere(): Computed radius is NaN. The "position" attribute is likely to have NaN values.',this)}}}(),computeFaceNormals:function(){},computeVertexNormals:function(){var a=this.index,b=this.attributes,c=this.groups;if(b.position){var d=b.position.array;if(void 0===b.normal)this.addAttribute("normal",
2106new THREE.BufferAttribute(new Float32Array(d.length),3));else for(var e=b.normal.array,f=0,g=e.length;f<g;f++)e[f]=0;
vendor: 1,867 bytes, lines 2106-2109
2106var e=b.normal.array,h,k,l,p=new THREE.Vector3,n=new THREE.Vector3,m=new THREE.Vector3,q=new THREE.Vector3,u=new THREE.Vector3;if(a){a=a.array;0===c.length&&this.addGroup(0,a.length);for(var v=0,t=c.length;v<t;++v)for(f=c[v],g=f.start,h=f.count,f=g,g+=h;f<g;f+=3)h=3*a[f+0],k=3*a[f+1],l=3*a[f+2],p.fromArray(d,h),n.fromArray(d,k),m.fromArray(d,l),q.subVectors(m,n),u.subVectors(p,n),q.cross(u),
2107e[h]+=q.x,e[h+1]+=q.y,e[h+2]+=q.z,e[k]+=q.x,e[k+1]+=q.y,e[k+2]+=q.z,e[l]+=q.x,e[l+1]+=q.y,e[l+2]+=q.z}else for(f=0,g=d.length;f<g;f+=9)p.fromArray(d,f),n.fromArray(d,f+3),m.fromArray(d,f+6),q.subVectors(m,n),u.subVectors(p,n),q.cross(u),e[f]=q.x,e[f+1]=q.y,e[f+2]=q.z,e[f+3]=q.x,e[f+4]=q.y,e[f+5]=q.z,e[f+6]=q.x,e[f+7]=q.y,e[f+8]=q.z;this.normalizeNormals();b.normal.needsUpdate=!0}},merge:function(a,b){if(!1===a instanceof THREE.BufferGeometry)console.error("THREE.BufferGeometry.merge(): geometry not an instance of THREE.BufferGeometry.",
2108a);else{void 0===b&&(b=0);var c=this.attributes,d;for(d in c)if(void 0!==a.attributes[d])for(var e=c[d].array,f=a.attributes[d],g=f.array,h=0,f=f.itemSize*b;h<g.length;h++,f++)e[f]=g[h];return this}},normalizeNormals:function(){for(var a=this.attributes.normal.array,b,c,d,e=0,f=a.length;e<f;e+=3)b=a[e],c=a[e+1],d=a[e+2],b=1/Math.sqrt(b*b+c*c+d*d),a[e]*=b,a[e+1]*=b,a[e+2]*=b},toNonIndexed:function(){if(null===this.index)return console.warn("THREE.BufferGeometry.toNonIndexed(): Geometry is already non-indexed."),
2109this;var a=new THREE.BufferGeometry,b=this.index.array,c=this.attributes,d;for(d in c){for(var e=c[d],f=e.array,e=e.itemSize,g=new f.constructor(b.length*e),h=0,k=0,l=0,p=b.length;l<p;l++)for(var h=b[l]*e,n=0;n<e;n++)g[k++]=f[h++];a.addAttribute(d,new THREE.BufferAttribute(g,e))}return a},toJSON:function(){var a={metadata:{version:4.4,type:"BufferGeometry",generator:"BufferGeometry.toJSON"}};a.uuid=this.uuid;
2109a.type=this.type;""!==this.name&&(a.name=this.name);if(void 0!==this.parameters){var b=this.parameters,
2110c;for(c in b)void 0!==b[c]&&(a[c]=b[c]);return a}a.data={attributes:{}};var d=this.index;null!==d&&(b=Array.prototype.slice.call(d.array),a.data.index={type:d.array.constructor.name,array:b});d=this.attributes;for(c in d){var e=d[c],b=Array.prototype.slice.call(e.array);a.data.attributes[c]={itemSize:e.itemSize,type:e.array.constructor.name,array:b}}c=this.groups;0<c.length&&(a.data.groups=JSON.parse(JSON.stringify(c)));c=this.boundingSphere;null!==c&&(a.data.boundingSphere={center:c.center.toArray(),
2111radius:c.radius});return a},clone:function(){return(new THREE.BufferGeometry).copy(this)},copy:function(a){var b=a.index;null!==b&&this.setIndex(b.clone());var b=a.attributes,c;for(c in b)this.addAttribute(c,b[c].clone());a=a.groups;c=0;for(b=a.length;c<b;c++){var d=a[c];this.addGroup(d.start,d.count)}return this},dispose:function(){this.dispatchEvent({type:"dispose"})}};THREE.EventDispatcher.prototype.apply(THREE.BufferGeometry.prototype);THREE.BufferGeometry.MaxIndex=65535;
2112THREE.InstancedBufferGeometry=function(){THREE.BufferGeometry.call(this);this.type="InstancedBufferGeometry";this.maxInstancedCount=void 0};THREE.InstancedBufferGeometry.prototype=Object.create(THREE.BufferGeometry.prototype);THREE.InstancedBufferGeometry.prototype.constructor=THREE.InstancedBufferGeometry;THREE.InstancedBufferGeometry.prototype.addGroup=function(a,b,c){this.groups.push({start:a,count:b,instances:c})};
2113THREE.InstancedBufferGeometry.prototype.copy=function(a){var b=a.index;null!==b&&this.setIndex(b.clone());var b=a.attributes,c;for(c in b)this.addAttribute(c,b[c].clone());a=a.groups;c=0;for(b=a.length;c<b;c++){var d=a[c];this.addGroup(d.start,d.count,d.instances)}return this};THREE.EventDispatcher.prototype.apply(THREE.InstancedBufferGeometry.prototype);THREE.Uniform=function(a,b){this.type=a;this.value=b;this.dynamic=!1};
2114THREE.Uniform.prototype={constructor:THREE.Uniform,onUpdate:function(a){this.dynamic=!0;this.onUpdateCallback=a;return this}};THREE.AnimationClip=function(a,b,c){this.name=a||THREE.Math.generateUUID();this.tracks=c;this.duration=void 0!==b?b:-1;0>this.duration&&this.resetDuration();this.trim();this.optimize()};
2115THREE.AnimationClip.prototype={constructor:THREE.AnimationClip,resetDuration:function(){for(var a=0,b=0,c=this.tracks.length;b!==c;++b)var d=this.tracks[b],a=Math.max(a,d.times[d.times.length-1]);this.duration=a},trim:function(){for(var a=0;a<this.tracks.length;a++)this.tracks[a].trim(0,this.duration);return this},optimize:function(){for(var a=0;a<this.tracks.length;a++)this.tracks[a].optimize();return this}};
2116Object.assign(THREE.AnimationClip,{parse:function(a){for(var b=[],c=a.tracks,d=1/(a.fps||1),e=0,f=c.length;e!==f;++e)b.push(THREE.KeyframeTrack.parse(c[e]).scale(d));return new THREE.AnimationClip(a.name,a.duration,b)},toJSON:function(a){var b=[],c=a.tracks;a={name:a.name,duration:a.duration,tracks:b};for(var d=0,e=c.length;d!==e;++d)b.push(THREE.KeyframeTrack.toJSON(c[d]));return a},CreateFromMorphTargetSequence:function(a,b,c){for(var d=b.length,e=[],f=0;f<d;f++){var g=[],h=[];g.push((f+d-1)%d,
2117f,(f+1)%d);h.push(0,1,0);var k=THREE.AnimationUtils.getKeyframeOrder(g),g=THREE.AnimationUtils.sortedArray(g,1,k),h=THREE.AnimationUtils.sortedArray(h,1,k);0===g[0]&&(g.push(d),h.push(h[0]));e.push((new THREE.NumberKeyframeTrack(".morphTargetInfluences["+b[f].name+"]",g,h)).scale(1/c))}return new THREE.AnimationClip(a,-1,e)},findByName:function(a,b){for(var c=0;c<a.length;c++)if(a[c].name===b)return a[c];return null},CreateClipsFromMorphTargetSequences:function(a,b){for(var c={},d=/^([\w-]*?)([\d]+)$/,
2118e=0,f=a.length;e<f;e++){var g=a[e],h=g.name.match(d);if(h&&1<h.length){var k=h[1];(h=c[k])||(c[k]=h=[]);h.push(g)}}d=[];for(k in c)d.push(THREE.AnimationClip.CreateFromMorphTargetSequence(k,c[k],b));return d},parseAnimation:function(a,b,c){if(!a)return console.error("  no animation in JSONLoader data"),null;c=function(a,b,c,d,e){if(0!==c.length){var f=[],g=[];THREE.AnimationUtils.flattenJSON(c,f,g,d);0!==f.length&&e.push(new a(b,f,g))}};var d=[],e=a.name||"default",f=a.length||-1,g=a.fps||30;a=a.hierarchy||
2119[];for(var h=0;h<a.length;h++){var k=a[h].keys;if(k&&0!=k.length)if(k[0].morphTargets){for(var f={},l=0;l<k.length;l++)if(k[l].morphTargets)for(var p=0;p<k[l].morphTargets.length;p++)f[k[l].morphTargets[p]]=-1;for(var n in f){for(var m=[],q=[],p=0;p!==k[l].morphTargets.length;++p){var u=k[l];m.push(u.time);q.push(u.morphTarget===n?1:0)}d.push(new THREE.NumberKeyframeTrack(".morphTargetInfluence["+n+"]",m,q))}f=f.length*(g||1)}else l=".bones["+b[h].name+"]",c(THREE.VectorKeyframeTrack,l+".position",
2120k,"pos",d),c(THREE.QuaternionKeyframeTrack,l+".quaternion",k,"rot",d),c(THREE.VectorKeyframeTrack,l+".scale",k,"scl",d)}return 0===d.length?null:new THREE.AnimationClip(e,f,d)}});THREE.AnimationMixer=function(a){this._root=a;this._initMemoryManager();this.time=this._accuIndex=0;this.timeScale=1};
2121THREE.AnimationMixer.prototype={constructor:THREE.AnimationMixer,clipAction:function(a,b){var c=(b||this._root).uuid,d="string"===typeof a?a:a.name,e=a!==d?a:null,f=this._actionsByClip[d],g;if(void 0!==f){g=f.actionByRoot[c];if(void 0!==g)return g;g=f.knownActions[0];e=g._clip;if(a!==d&&a!==e)throw Error("Different clips with the same name detected!");}if(null===e)return null;f=new THREE.AnimationMixer._Action(this,e,b);this._bindAction(f,g);this._addInactiveAction(f,d,c);return f},existingAction:function(a,
2122b){var c=(b||this._root).uuid,d=this._actionsByClip["string"===typeof a?a:a.name];return void 0!==d?d.actionByRoot[c]||null:null},stopAllAction:function(){for(var a=this._actions,b=this._nActiveActions,c=this._bindings,d=this._nActiveBindings,e=this._nActiveBindings=this._nActiveActions=0;e!==b;++e)a[e].reset();for(e=0;e!==d;++e)c[e].useCount=0;return this},update:function(a){a*=this.timeScale;for(var b=this._actions,c=this._nActiveActions,d=this.time+=a,e=Math.sign(a),f=this._accuIndex^=1,g=0;g!==
2123c;++g){var h=b[g];h.enabled&&h._update(d,a,e,f)}a=this._bindings;b=this._nActiveBindings;for(g=0;g!==b;++g)a[g].apply(f);return this},getRoot:function(){return this._root},uncacheClip:function(a){var b=this._actions;a=a.name;var c=this._actionsByClip,d=c[a];if(void 0!==d){for(var d=d.knownActions,e=0,f=d.length;e!==f;++e){var g=d[e];this._deactivateAction(g);var h=g._cacheIndex,k=b[b.length-1];g._cacheIndex=null;g._byClipCacheIndex=null;k._cacheIndex=h;b[h]=k;b.pop();this._removeInactiveBindingsForAction(g)}delete c[a]}},
2124uncacheRoot:function(a){a=a.uuid;var b=this._actionsByClip,c;for(c in b){var d=b[c].actionByRoot[a];void 0!==d&&(this._deactivateAction(d),this._removeInactiveAction(d))}c=this._bindingsByRootAndName[a];if(void 0!==c)for(var e in c)a=c[e],a.restoreOriginalState(),this._removeInactiveBinding(a)},uncacheAction:function(a,b){var c=this.existingAction(a,b);null!==c&&(this._deactivateAction(c),this._removeInactiveAction(c))}};THREE.EventDispatcher.prototype.apply(THREE.AnimationMixer.prototype);
2125THREE.AnimationMixer._Action=function(a,b,c){this._mixer=a;this._clip=b;this._localRoot=c||null;a=b.tracks;b=a.length;c=Array(b);for(var d={endingStart:THREE.ZeroCurvatureEnding,endingEnd:THREE.ZeroCurvatureEnding},e=0;e!==b;++e){var f=a[e].createInterpolant(null);c[e]=f;f.settings=d}this._interpolantSettings=d;this._interpolants=c;this._propertyBindings=Array(b);this._weightInterpolant=this._timeScaleInterpolant=this._byClipCacheIndex=this._cacheIndex=null;
vendor: 23,135 bytes, lines 2125-2175
2125this.loop=THREE.LoopRepeat;this._loopCount=
2126-1;this._startTime=null;this.time=0;this._effectiveWeight=this.weight=this._effectiveTimeScale=this.timeScale=1;this.repetitions=Infinity;this.paused=!1;this.enabled=!0;this.clampWhenFinished=!1;this.zeroSlopeAtEnd=this.zeroSlopeAtStart=!0};
2127THREE.AnimationMixer._Action.prototype={constructor:THREE.AnimationMixer._Action,play:function(){this._mixer._activateAction(this);return this},stop:function(){this._mixer._deactivateAction(this);return this.reset()},reset:function(){this.paused=!1;this.enabled=!0;this.time=0;this._loopCount=-1;this._startTime=null;return this.stopFading().stopWarping()},isRunning:function(){return this.enabled&&!this.paused&&0!==this.timeScale&&null===this._startTime&&this._mixer._isActiveAction(this)},isScheduled:function(){return this._mixer._isActiveAction(this)},
2128startAt:function(a){this._startTime=a;return this},setLoop:function(a,b){this.loop=a;this.repetitions=b;return this},setEffectiveWeight:function(a){this.weight=a;this._effectiveWeight=this.enabled?a:0;return this.stopFading()},getEffectiveWeight:function(){return this._effectiveWeight},fadeIn:function(a){return this._scheduleFading(a,0,1)},fadeOut:function(a){return this._scheduleFading(a,1,0)},crossFadeFrom:function(a,b,c){a.fadeOut(b);this.fadeIn(b);if(c){c=this._clip.duration;var d=a._clip.duration,
2129e=c/d;a.warp(1,d/c,b);this.warp(e,1,b)}return this},crossFadeTo:function(a,b,c){return a.crossFadeFrom(this,b,c)},stopFading:function(){var a=this._weightInterpolant;null!==a&&(this._weightInterpolant=null,this._mixer._takeBackControlInterpolant(a));return this},setEffectiveTimeScale:function(a){this.timeScale=a;this._effectiveTimeScale=this.paused?0:a;return this.stopWarping()},getEffectiveTimeScale:function(){return this._effectiveTimeScale},setDuration:function(a){this.timeScale=this._clip.duration/
2130a;return this.stopWarping()},syncWith:function(a){this.time=a.time;this.timeScale=a.timeScale;return this.stopWarping()},halt:function(a){return this.warp(this._currentTimeScale,0,a)},warp:function(a,b,c){var d=this._mixer,e=d.time,f=this._timeScaleInterpolant,g=this.timeScale;null===f&&(this._timeScaleInterpolant=f=d._lendControlInterpolant());d=f.parameterPositions;f=f.sampleValues;d[0]=e;d[1]=e+c;f[0]=a/g;f[1]=b/g;return this},stopWarping:function(){var a=this._timeScaleInterpolant;null!==a&&(this._timeScaleInterpolant=
2131null,this._mixer._takeBackControlInterpolant(a));return this},getMixer:function(){return this._mixer},getClip:function(){return this._clip},getRoot:function(){return this._localRoot||this._mixer._root},_update:function(a,b,c,d){var e=this._startTime;if(null!==e){b=(a-e)*c;if(0>b||0===c)return;this._startTime=null;b*=c}b*=this._updateTimeScale(a);c=this._updateTime(b);a=this._updateWeight(a);if(0<a){b=this._interpolants;for(var e=this._propertyBindings,f=0,g=b.length;f!==g;++f)b[f].evaluate(c),e[f].accumulate(d,
2132a)}},_updateWeight:function(a){var b=0;if(this.enabled){var b=this.weight,c=this._weightInterpolant;if(null!==c){var d=c.evaluate(a)[0],b=b*d;a>c.parameterPositions[1]&&(this.stopFading(),0===d&&(this.enabled=!1))}}return this._effectiveWeight=b},_updateTimeScale:function(a){var b=0;if(!this.paused){var b=this.timeScale,c=this._timeScaleInterpolant;if(null!==c){var d=c.evaluate(a)[0],b=b*d;a>c.parameterPositions[1]&&(this.stopWarping(),0===b?this.pause=!0:this.timeScale=b)}}return this._effectiveTimeScale=
2133b},_updateTime:function(a){var b=this.time+a;if(0===a)return b;var c=this._clip.duration,d=this.loop,e=this._loopCount,f=!1;switch(d){case THREE.LoopOnce:-1===e&&(this.loopCount=0,this._setEndings(!0,!0,!1));if(b>=c)b=c;else if(0>b)b=0;else break;this.clampWhenFinished?this.pause=!0:this.enabled=!1;this._mixer.dispatchEvent({type:"finished",action:this,direction:0>a?-1:1});break;case THREE.LoopPingPong:f=!0;case THREE.LoopRepeat:-1===e&&(0<a?(e=0,this._setEndings(!0,0===this.repetitions,f)):this._setEndings(0===
2134this.repetitions,!0,f));if(b>=c||0>b){var g=Math.floor(b/c),b=b-c*g,e=e+Math.abs(g),h=this.repetitions-e;if(0>h){this.clampWhenFinished?this.paused=!0:this.enabled=!1;b=0<a?c:0;this._mixer.dispatchEvent({type:"finished",action:this,direction:0<a?1:-1});break}else 0===h?(a=0>a,this._setEndings(a,!a,f)):this._setEndings(!1,!1,f);this._loopCount=e;this._mixer.dispatchEvent({type:"loop",action:this,loopDelta:g})}if(d===THREE.LoopPingPong&&1===(e&1))return this.time=b,c-b}return this.time=b},_setEndings:function(a,
2135b,c){var d=this._interpolantSettings;c?(d.endingStart=THREE.ZeroSlopeEnding,d.endingEnd=THREE.ZeroSlopeEnding):(d.endingStart=a?this.zeroSlopeAtStart?THREE.ZeroSlopeEnding:THREE.ZeroCurvatureEnding:THREE.WrapAroundEnding,d.endingEnd=b?this.zeroSlopeAtEnd?THREE.ZeroSlopeEnding:THREE.ZeroCurvatureEnding:THREE.WrapAroundEnding)},_scheduleFading:function(a,b,c){var d=this._mixer,e=d.time,f=this._weightInterpolant;null===f&&(this._weightInterpolant=f=d._lendControlInterpolant());d=f.parameterPositions;
2136f=f.sampleValues;d[0]=e;f[0]=b;d[1]=e+a;f[1]=c;return this}};
2137Object.assign(THREE.AnimationMixer.prototype,{_bindAction:function(a,b){var c=a._localRoot||this._root,d=a._clip.tracks,e=d.length,f=a._propertyBindings,g=a._interpolants,h=c.uuid,k=this._bindingsByRootAndName,l=k[h];void 0===l&&(l={},k[h]=l);for(k=0;k!==e;++k){var p=d[k],n=p.name,m=l[n];if(void 0===m){m=f[k];if(void 0!==m){null===m._cacheIndex&&(++m.referenceCount,this._addInactiveBinding(m,h,n));continue}m=new THREE.PropertyMixer(THREE.PropertyBinding.create(c,n,b&&b._propertyBindings[k].binding.parsedPath),
2138p.ValueTypeName,p.getValueSize());++m.referenceCount;this._addInactiveBinding(m,h,n)}f[k]=m;g[k].resultBuffer=m.buffer}},_activateAction:function(a){if(!this._isActiveAction(a)){if(null===a._cacheIndex){var b=(a._localRoot||this._root).uuid,c=a._clip.name,d=this._actionsByClip[c];this._bindAction(a,d&&d.knownActions[0]);this._addInactiveAction(a,c,b)}b=a._propertyBindings;c=0;for(d=b.length;c!==d;++c){var e=b[c];0===e.useCount++&&(this._lendBinding(e),e.saveOriginalState())}this._lendAction(a)}},
2139_deactivateAction:function(a){if(this._isActiveAction(a)){for(var b=a._propertyBindings,c=0,d=b.length;c!==d;++c){var e=b[c];0===--e.useCount&&(e.restoreOriginalState(),this._takeBackBinding(e))}this._takeBackAction(a)}},_initMemoryManager:function(){this._actions=[];this._nActiveActions=0;this._actionsByClip={};this._bindings=[];this._nActiveBindings=0;this._bindingsByRootAndName={};this._controlInterpolants=[];this._nActiveControlInterpolants=0;var a=this;this.stats={actions:{get total(){return a._actions.length},
2140get inUse(){return a._nActiveActions}},bindings:{get total(){return a._bindings.length},get inUse(){return a._nActiveBindings}},controlInterpolants:{get total(){return a._controlInterpolants.length},get inUse(){return a._nActiveControlInterpolants}}}},_isActiveAction:function(a){a=a._cacheIndex;return null!==a&&a<this._nActiveActions},_addInactiveAction:function(a,b,c){var d=this._actions,e=this._actionsByClip,f=e[b];void 0===f?(f={knownActions:[a],actionByRoot:{}},a._byClipCacheIndex=0,e[b]=f):(b=
2141f.knownActions,a._byClipCacheIndex=b.length,b.push(a));a._cacheIndex=d.length;d.push(a);f.actionByRoot[c]=a},_removeInactiveAction:function(a){var b=this._actions,c=b[b.length-1],d=a._cacheIndex;c._cacheIndex=d;b[d]=c;b.pop();a._cacheIndex=null;var c=a._clip.name,d=this._actionsByClip,e=d[c],f=e.knownActions,g=f[f.length-1],h=a._byClipCacheIndex;g._byClipCacheIndex=h;f[h]=g;f.pop();a._byClipCacheIndex=null;delete e.actionByRoot[(b._localRoot||this._root).uuid];0===f.length&&delete d[c];this._removeInactiveBindingsForAction(a)},
2142_removeInactiveBindingsForAction:function(a){a=a._propertyBindings;for(var b=0,c=a.length;b!==c;++b){var d=a[b];0===--d.referenceCount&&this._removeInactiveBinding(d)}},_lendAction:function(a){var b=this._actions,c=a._cacheIndex,d=this._nActiveActions++,e=b[d];a._cacheIndex=d;b[d]=a;e._cacheIndex=c;b[c]=e},_takeBackAction:function(a){var b=this._actions,c=a._cacheIndex,d=--this._nActiveActions,e=b[d];a._cacheIndex=d;b[d]=a;e._cacheIndex=c;b[c]=e},_addInactiveBinding:function(a,b,c){var d=this._bindingsByRootAndName,
2143e=d[b],f=this._bindings;void 0===e&&(e={},d[b]=e);e[c]=a;a._cacheIndex=f.length;f.push(a)},_removeInactiveBinding:function(a){var b=this._bindings,c=a.binding,d=c.rootNode.uuid,c=c.path,e=this._bindingsByRootAndName,f=e[d],g=b[b.length-1];a=a._cacheIndex;g._cacheIndex=a;b[a]=g;b.pop();delete f[c];a:{for(var h in f)break a;delete e[d]}},_lendBinding:function(a){var b=this._bindings,c=a._cacheIndex,d=this._nActiveBindings++,e=b[d];a._cacheIndex=d;b[d]=a;e._cacheIndex=c;b[c]=e},_takeBackBinding:function(a){var b=
2144this._bindings,c=a._cacheIndex,d=--this._nActiveBindings,e=b[d];a._cacheIndex=d;b[d]=a;e._cacheIndex=c;b[c]=e},_lendControlInterpolant:function(){var a=this._controlInterpolants,b=this._nActiveControlInterpolants++,c=a[b];void 0===c&&(c=new THREE.LinearInterpolant(new Float32Array(2),new Float32Array(2),1,this._controlInterpolantsResultBuffer),c.__cacheIndex=b,a[b]=c);return c},_takeBackControlInterpolant:function(a){var b=this._controlInterpolants,c=a.__cacheIndex,d=--this._nActiveControlInterpolants,
2145e=b[d];a.__cacheIndex=d;b[d]=a;e.__cacheIndex=c;b[c]=e},_controlInterpolantsResultBuffer:new Float32Array(1)});
2146THREE.AnimationObjectGroup=function(a){this.uuid=THREE.Math.generateUUID();this._objects=Array.prototype.slice.call(arguments);this.nCachedObjects_=0;var b={};this._indicesByUUID=b;for(var c=0,d=arguments.length;c!==d;++c)b[arguments[c].uuid]=c;this._paths=[];this._parsedPaths=[];this._bindings=[];this._bindingsIndicesByPath={};var e=this;this.stats={objects:{get total(){return e._objects.length},get inUse(){return this.total-e.nCachedObjects_}},get bindingsPerObject(){return e._bindings.length}}};
2147THREE.AnimationObjectGroup.prototype={constructor:THREE.AnimationObjectGroup,add:function(a){for(var b=this._objects,c=b.length,d=this.nCachedObjects_,e=this._indicesByUUID,f=this._paths,g=this._parsedPaths,h=this._bindings,k=h.length,l=0,p=arguments.length;l!==p;++l){var n=arguments[l],m=n.uuid,q=e[m];if(void 0===q){q=c++;e[m]=q;b.push(n);for(var m=0,u=k;m!==u;++m)h[m].push(new THREE.PropertyBinding(n,f[m],g[m]))}else if(q<d){var v=b[q],t=--d,u=b[t];e[u.uuid]=q;b[q]=u;e[m]=t;b[t]=n;m=0;for(u=k;m!==
2148u;++m){var s=h[m],w=s[q];s[q]=s[t];void 0===w&&(w=new THREE.PropertyBinding(n,f[m],g[m]));s[t]=w}}else b[q]!==v&&console.error("Different objects with the same UUID detected. Clean the caches or recreate your infrastructure when reloading scenes...")}this.nCachedObjects_=d},remove:function(a){for(var b=this._objects,c=this.nCachedObjects_,d=this._indicesByUUID,e=this._bindings,f=e.length,g=0,h=arguments.length;g!==h;++g){var k=arguments[g],l=k.uuid,p=d[l];if(void 0!==p&&p>=c){var n=c++,m=b[n];d[m.uuid]=
2149p;b[p]=m;d[l]=n;b[n]=k;k=0;for(l=f;k!==l;++k){var m=e[k],q=m[p];m[p]=m[n];m[n]=q}}}this.nCachedObjects_=c},uncache:function(a){for(var b=this._objects,c=b.length,d=this.nCachedObjects_,e=this._indicesByUUID,f=this._bindings,g=f.length,h=0,k=arguments.length;h!==k;++h){var l=arguments[h].uuid,p=e[l];if(void 0!==p)if(delete e[l],p<d){var l=--d,n=b[l],m=--c,q=b[m];e[n.uuid]=p;b[p]=n;e[q.uuid]=l;b[l]=q;b.pop();n=0;for(q=g;n!==q;++n){var u=f[n],v=u[m];u[p]=u[l];u[l]=v;u.pop()}}else for(m=--c,q=b[m],e[q.uuid]=
2150p,b[p]=q,b.pop(),n=0,q=g;n!==q;++n)u=f[n],u[p]=u[m],u.pop()}this.nCachedObjects_=d},subscribe_:function(a,b){var c=this._bindingsIndicesByPath,d=c[a],e=this._bindings;if(void 0!==d)return e[d];var f=this._paths,g=this._parsedPaths,h=this._objects,k=this.nCachedObjects_,l=Array(h.length),d=e.length;c[a]=d;f.push(a);g.push(b);e.push(l);c=k;for(d=h.length;c!==d;++c)l[c]=new THREE.PropertyBinding(h[c],a,b);return l},unsubscribe_:function(a){var b=this._bindingsIndicesByPath,c=b[a];if(void 0!==c){var d=
2151this._paths,e=this._parsedPaths,f=this._bindings,g=f.length-1,h=f[g];b[a[g]]=c;f[c]=h;f.pop();e[c]=e[g];e.pop();d[c]=d[g];d.pop()}}};
2152THREE.AnimationUtils={arraySlice:function(a,b,c){return THREE.AnimationUtils.isTypedArray(a)?new a.constructor(a.subarray(b,c)):a.slice(b,c)},convertArray:function(a,b,c){return!a||!c&&a.constructor===b?a:"number"===typeof b.BYTES_PER_ELEMENT?new b(a):Array.prototype.slice.call(a)},isTypedArray:function(a){return ArrayBuffer.isView(a)&&!(a instanceof DataView)},getKeyframeOrder:function(a){for(var b=a.length,c=Array(b),d=0;d!==b;++d)c[d]=d;c.sort(function(b,c){return a[b]-a[c]});return c},sortedArray:function(a,
2153b,c){for(var d=a.length,e=new a.constructor(d),f=0,g=0;g!==d;++f)for(var h=c[f]*b,k=0;k!==b;++k)e[g++]=a[h+k];return e},flattenJSON:function(a,b,c,d){for(var e=1,f=a[0];void 0!==f&&void 0===f[d];)f=a[e++];if(void 0!==f){var g=f[d];if(void 0!==g)if(Array.isArray(g)){do g=f[d],void 0!==g&&(b.push(f.time),c.push.apply(c,g)),f=a[e++];while(void 0!==f)}else if(void 0!==g.toArray){do g=f[d],void 0!==g&&(b.push(f.time),g.toArray(c,c.length)),f=a[e++];while(void 0!==f)}else{do g=f[d],void 0!==g&&(b.push(f.time),
2154c.push(g)),f=a[e++];while(void 0!==f)}}}};THREE.KeyframeTrack=function(a,b,c,d){if(void 0===a)throw Error("track name is undefined");if(void 0===b||0===b.length)throw Error("no keyframes in track named "+a);this.name=a;this.times=THREE.AnimationUtils.convertArray(b,this.TimeBufferType);this.values=THREE.AnimationUtils.convertArray(c,this.ValueBufferType);this.setInterpolation(d||this.DefaultInterpolation);this.validate();this.optimize()};
2155THREE.KeyframeTrack.prototype={constructor:THREE.KeyframeTrack,TimeBufferType:Float32Array,ValueBufferType:Float32Array,DefaultInterpolation:THREE.InterpolateLinear,InterpolantFactoryMethodDiscrete:function(a){return new THREE.DiscreteInterpolant(this.times,this.values,this.getValueSize(),a)},InterpolantFactoryMethodLinear:function(a){return new THREE.LinearInterpolant(this.times,this.values,this.getValueSize(),a)},InterpolantFactoryMethodSmooth:function(a){return new THREE.CubicInterpolant(this.times,
2156this.values,this.getValueSize(),a)},setInterpolation:function(a){var b=void 0;switch(a){case THREE.InterpolateDiscrete:b=this.InterpolantFactoryMethodDiscrete;break;case THREE.InterpolateLinear:b=this.InterpolantFactoryMethodLinear;break;case THREE.InterpolateSmooth:b=this.InterpolantFactoryMethodSmooth}if(void 0===b){b="unsupported interpolation for "+this.ValueTypeName+" keyframe track named "+this.name;if(void 0===this.createInterpolant)if(a!==this.DefaultInterpolation)this.setInterpolation(this.DefaultInterpolation);
2157else throw Error(b);console.warn(b)}else this.createInterpolant=b},getInterpolation:function(){switch(this.createInterpolant){case this.InterpolantFactoryMethodDiscrete:return THREE.InterpolateDiscrete;case this.InterpolantFactoryMethodLinear:return THREE.InterpolateLinear;case this.InterpolantFactoryMethodSmooth:return THREE.InterpolateSmooth}},getValueSize:function(){return this.values.length/this.times.length},shift:function(a){if(0!==a)for(var b=this.times,c=0,d=b.length;c!==d;++c)b[c]+=a;return this},
2158scale:function(a){if(1!==a)for(var b=this.times,c=0,d=b.length;c!==d;++c)b[c]*=a;return this},trim:function(a,b){for(var c=this.times,d=c.length,e=0,f=d-1;e!==d&&c[e]<a;)++e;for(;-1!==f&&c[f]>b;)--f;++f;if(0!==e||f!==d)e>=f&&(f=Math.max(f,1),e=f-1),d=this.getValueSize(),this.times=THREE.AnimationUtils.arraySlice(c,e,f),this.values=THREE.AnimationUtils.arraySlice(this.values,e*d,f*d);return this},validate:function(){var a=!0,b=this.getValueSize();0!==b-Math.floor(b)&&(console.error("invalid value size in track",
2159this),a=!1);var c=this.times,b=this.values,d=c.length;0===d&&(console.error("track is empty",this),a=!1);for(var e=null,f=0;f!==d;f++){var g=c[f];if("number"===typeof g&&isNaN(g)){console.error("time is not a valid number",this,f,g);a=!1;break}if(null!==e&&e>g){console.error("out of order keys",this,f,g,e);a=!1;break}e=g}if(void 0!==b&&THREE.AnimationUtils.isTypedArray(b))for(f=0,c=b.length;f!==c;++f)if(d=b[f],isNaN(d)){console.error("value is not a valid number",this,f,d);a=!1;break}return a},optimize:function(){for(var a=
2160this.times,b=this.values,c=this.getValueSize(),d=1,e=1,f=a.length-1;e<=f;++e){var g=!1,h=a[e];if(h!==a[e+1]&&(1!==e||h!==h[0]))for(var k=e*c,l=k-c,p=k+c,h=0;h!==c;++h){var n=b[k+h];if(n!==b[l+h]||n!==b[p+h]){g=!0;break}}if(g){if(e!==d)for(a[d]=a[e],g=e*c,k=d*c,h=0;h!==c;++h)b[k+h]=b[g+h];++d}}d!==a.length&&(this.times=THREE.AnimationUtils.arraySlice(a,0,d),this.values=THREE.AnimationUtils.arraySlice(b,0,d*c));return this}};
2161Object.assign(THREE.KeyframeTrack,{parse:function(a){if(void 0===a.type)throw Error("track type undefined, can not parse");var b=THREE.KeyframeTrack._getTrackTypeForValueTypeName(a.type);if(void 0===a.times){console.warn("legacy JSON format detected, converting");var c=[],d=[];THREE.AnimationUtils.flattenJSON(a.keys,c,d,"value");a.times=c;a.values=d}return void 0!==b.parse?b.parse(a):new b(a.name,a.times,a.values,a.interpolation)},toJSON:function(a){var b=a.constructor;if(void 0!==b.toJSON)b=b.toJSON(a);
2162else{var b={name:a.name,times:THREE.AnimationUtils.convertArray(a.times,Array),values:THREE.AnimationUtils.convertArray(a.values,Array)},c=a.getInterpolation();c!==a.DefaultInterpolation&&(b.interpolation=c)}b.type=a.ValueTypeName;return b},_getTrackTypeForValueTypeName:function(a){switch(a.toLowerCase()){case "scalar":case "double":case "float":case "number":case "integer":return THREE.NumberKeyframeTrack;case "vector":case "vector2":case "vector3":case "vector4":return THREE.VectorKeyframeTrack;
2163case "color":return THREE.ColorKeyframeTrack;case "quaternion":return THREE.QuaternionKeyframeTrack;case "bool":case "boolean":return THREE.BooleanKeyframeTrack;case "string":return THREE.StringKeyframeTrack}throw Error("Unsupported typeName: "+a);}});THREE.PropertyBinding=function(a,b,c){this.path=b;this.parsedPath=c||THREE.PropertyBinding.parseTrackName(b);this.node=THREE.PropertyBinding.findNode(a,this.parsedPath.nodeName)||a;this.rootNode=a};
2164THREE.PropertyBinding.prototype={constructor:THREE.PropertyBinding,getValue:function(a,b){this.bind();this.getValue(a,b)},setValue:function(a,b){this.bind();this.setValue(a,b)},bind:function(){var a=this.node,b=this.parsedPath,c=b.objectName,d=b.propertyName,e=b.propertyIndex;a||(this.node=a=THREE.PropertyBinding.findNode(this.rootNode,b.nodeName)||this.rootNode);this.getValue=this._getValue_unavailable;this.setValue=this._setValue_unavailable;if(a){if(c){var f=b.objectIndex;switch(c){case "materials":if(!a.material){console.error("  can not bind to material as node does not have a material",
2165this);return}if(!a.material.materials){console.error("  can not bind to material.materials as node.material does not have a materials array",this);return}a=a.material.materials;break;case "bones":if(!a.skeleton){console.error("  can not bind to bones as node does not have a skeleton",this);return}a=a.skeleton.bones;for(c=0;c<a.length;c++)if(a[c].name===f){f=c;break}break;default:if(void 0===a[c]){console.error("  can not bind to objectName of node, undefined",this);return}a=a[c]}if(void 0!==f){if(void 0===
2166a[f]){console.error("  trying to bind to objectIndex of objectName, but is undefined:",this,a);return}a=a[f]}}if(f=a[d]){b=this.Versioning.None;void 0!==a.needsUpdate?(b=this.Versioning.NeedsUpdate,this.targetObject=a):void 0!==a.matrixWorldNeedsUpdate&&(b=this.Versioning.MatrixWorldNeedsUpdate,this.targetObject=a);c=this.BindingType.Direct;if(void 0!==e){if("morphTargetInfluences"===d){if(!a.geometry){console.error("  can not bind to morphTargetInfluences becasuse node does not have a geometry",
2167this);return}if(!a.geometry.morphTargets){console.error("  can not bind to morphTargetInfluences becasuse node does not have a geometry.morphTargets",this);return}for(c=0;c<this.node.geometry.morphTargets.length;c++)if(a.geometry.morphTargets[c].name===e){e=c;break}}c=this.BindingType.ArrayElement;this.resolvedProperty=f;this.propertyIndex=e}else void 0!==f.fromArray&&void 0!==f.toArray?(c=this.BindingType.HasFromToArray,this.resolvedProperty=f):void 0!==f.length?(c=this.BindingType.EntireArray,this.resolvedProperty=
2168f):this.propertyName=d;this.getValue=this.GetterByBindingType[c];this.setValue=this.SetterByBindingTypeAndVersioning[c][b]}else console.error("  trying to update property for track: "+b.nodeName+"."+d+" but it wasn't found.",a)}else console.error("  trying to update node for track: "+this.path+" but it wasn't found.")},unbind:function(){this.node=null;this.getValue=this._getValue_unbound;this.setValue=this._setValue_unbound}};
2169Object.assign(THREE.PropertyBinding.prototype,{_getValue_unavailable:function(){},_setValue_unavailable:function(){},_getValue_unbound:THREE.PropertyBinding.prototype.getValue,_setValue_unbound:THREE.PropertyBinding.prototype.setValue,BindingType:{Direct:0,EntireArray:1,ArrayElement:2,HasFromToArray:3},Versioning:{None:0,NeedsUpdate:1,MatrixWorldNeedsUpdate:2},GetterByBindingType:[function(a,b){a[b]=this.node[this.propertyName]},function(a,b){for(var c=this.resolvedProperty,d=0,e=c.length;d!==e;++d)a[b++]=
2170c[d]},function(a,b){a[b]=this.resolvedProperty[this.propertyIndex]},function(a,b){this.resolvedProperty.toArray(a,b)}],SetterByBindingTypeAndVersioning:[[function(a,b){this.node[this.propertyName]=a[b]},function(a,b){this.node[this.propertyName]=a[b];this.targetObject.needsUpdate=!0},function(a,b){this.node[this.propertyName]=a[b];this.targetObject.matrixWorldNeedsUpdate=!0}],[function(a,b){for(var c=this.resolvedProperty,d=0,e=c.length;d!==e;++d)c[d]=a[b++]},function(a,b){for(var c=this.resolvedProperty,
2171d=0,e=c.length;d!==e;++d)c[d]=a[b++];this.targetObject.needsUpdate=!0},function(a,b){for(var c=this.resolvedProperty,d=0,e=c.length;d!==e;++d)c[d]=a[b++];this.targetObject.matrixWorldNeedsUpdate=!0}],[function(a,b){this.resolvedProperty[this.propertyIndex]=a[b]},function(a,b){this.resolvedProperty[this.propertyIndex]=a[b];this.targetObject.needsUpdate=!0},function(a,b){this.resolvedProperty[this.propertyIndex]=a[b];this.targetObject.matrixWorldNeedsUpdate=!0}],[function(a,b){this.resolvedProperty.fromArray(a,
2172b)},function(a,b){this.resolvedProperty.fromArray(a,b);this.targetObject.needsUpdate=!0},function(a,b){this.resolvedProperty.fromArray(a,b);this.targetObject.matrixWorldNeedsUpdate=!0}]]});THREE.PropertyBinding.Composite=function(a,b,c){c=c||THREE.PropertyBinding.parseTrackName(b);this._targetGroup=a;this._bindings=a.subscribe_(b,c)};
2173THREE.PropertyBinding.Composite.prototype={constructor:THREE.PropertyBinding.Composite,getValue:function(a,b){this.bind();var c=this._bindings[this._targetGroup.nCachedObjects_];void 0!==c&&c.getValue(a,b)},setValue:function(a,b){for(var c=this._bindings,d=this._targetGroup.nCachedObjects_,e=c.length;d!==e;++d)c[d].setValue(a,b)},bind:function(){for(var a=this._bindings,b=this._targetGroup.nCachedObjects_,c=a.length;b!==c;++b)a[b].bind()},unbind:function(){for(var a=this._bindings,b=this._targetGroup.nCachedObjects_,
2174c=a.length;b!==c;++b)a[b].unbind()}};THREE.PropertyBinding.create=function(a,b,c){return a instanceof THREE.AnimationObjectGroup?new THREE.PropertyBinding.Composite(a,b,c):new THREE.PropertyBinding(a,b,c)};
2175THREE.PropertyBinding.parseTrackName=function(a){var b=/^(([\w]+\/)*)([\w-\d]+)?(\.([\
2175w]+)(\[([\w\d\[\]\_.:\- ]+)\])?)?(\.([\w.]+)(\[([\w\d\[\]\_. ]+)\])?)$/,c=b.exec(a);if(!c)throw Error("cannot parse trackName at all: "+a);c.index===b.lastIndex&&b.lastIndex++;b={nodeName:c[3],objectName:c[5],objectIndex:c[7],propertyName:c[9],propertyIndex:c[11]};if(null===b.propertyName||0===b.propertyName.length)throw Error("can not parse propertyName from trackName: "+a);return b};
2176THREE.PropertyBinding.findNode=function(a,b){if(!b||""===b||"root"===b||"."===b||-1===b||b===a.name||b===a.uuid)return a;if(a.skeleton){var c=function(a){for(var c=0;c<a.bones.length;c++){var d=a.bones[c];if(d.name===b)return d}return null}(a.skeleton);if(c)return c}if(a.children){var d=function(a){for(var c=0;c<a.length;c++){var g=a[c];if(g.name===b||g.uuid===b||(g=d(g.children)))return g}return null};if(c=d(a.children))return c}return null};
2177THREE.PropertyMixer=function(a,b,c){this.binding=a;this.valueSize=c;a=Float64Array;switch(b){case "quaternion":b=this._slerp;break;case "string":case "bool":a=Array;b=this._select;break;default:b=this._lerp}this.buffer=new a(4*c);this._mixBufferRegion=b;this.referenceCount=this.useCount=this.cumulativeWeight=0};
2178THREE.PropertyMixer.prototype={constructor:THREE.PropertyMixer,accumulate:function(a,b){var c=this.buffer,d=this.valueSize,e=a*d+d,f=this.cumulativeWeight;if(0===f){for(f=0;f!==d;++f)c[e+f]=c[f];f=b}else f+=b,this._mixBufferRegion(c,e,0,b/f,d);this.cumulativeWeight=f},apply:function(a){var b=this.valueSize,c=this.buffer;a=a*b+b;var d=this.cumulativeWeight,e=this.binding;this.cumulativeWeight=0;1>d&&this._mixBufferRegion(c,a,3*b,1-d,b);for(var d=b,f=b+b;d!==f;++d)if(c[d]!==c[d+b]){e.setValue(c,a);
2179break}},saveOriginalState:function(){var a=this.buffer,b=this.valueSize,c=3*b;this.binding.getValue(a,c);for(var d=b;d!==c;++d)a[d]=a[c+d%b];this.cumulativeWeight=0},restoreOriginalState:function(){this.binding.setValue(this.buffer,3*this.valueSize)},_select:function(a,b,c,d,e){if(.5<=d)for(d=0;d!==e;++d)a[b+d]=a[c+d]},_slerp:function(a,b,c,d,e){THREE.Quaternion.slerpFlat(a,b,a,b,a,c,d)},_lerp:function(a,b,c,d,e){for(var f=1-d,g=0;g!==e;++g){var h=b+g;a[h]=a[h]*f+a[c+g]*d}}};
2180THREE.BooleanKeyframeTrack=function(a,b,c){THREE.KeyframeTrack.call(this,a,b,c)};THREE.BooleanKeyframeTrack.prototype=Object.assign(Object.create(THREE.KeyframeTrack.prototype),{constructor:THREE.BooleanKeyframeTrack,ValueTypeName:"bool",ValueBufferType:Array,DefaultInterpolation:THREE.IntepolateDiscrete,InterpolantFactoryMethodLinear:void 0,InterpolantFactoryMethodSmooth:void 0});THREE.NumberKeyframeTrack=function(a,b,c,d){THREE.KeyframeTrack.call(this,a,b,c,d)};
2181THREE.NumberKeyframeTrack.prototype=Object.assign(Object.create(THREE.KeyframeTrack.prototype),{constructor:THREE.NumberKeyframeTrack,ValueTypeName:"number"});THREE.QuaternionKeyframeTrack=function(a,b,c,d){THREE.KeyframeTrack.call(this,a,b,c,d)};
2182THREE.QuaternionKeyframeTrack.prototype=Object.assign(Object.create(THREE.KeyframeTrack.prototype),{constructor:THREE.QuaternionKeyframeTrack,ValueTypeName:"quaternion",DefaultInterpolation:THREE.InterpolateLinear,InterpolantFactoryMethodLinear:function(a){return new THREE.QuaternionLinearInterpolant(this.times,this.values,this.getValueSize(),a)},InterpolantFactoryMethodSmooth:void 0});THREE.StringKeyframeTrack=function(a,b,c,d){THREE.KeyframeTrack.call(this,a,b,c,d)};
2183THREE.StringKeyframeTrack.prototype=Object.assign(Object.create(THREE.KeyframeTrack.prototype),{constructor:THREE.StringKeyframeTrack,ValueTypeName:"string",ValueBufferType:Array,DefaultInterpolation:THREE.IntepolateDiscrete,InterpolantFactoryMethodLinear:void 0,InterpolantFactoryMethodSmooth:void 0});THREE.VectorKeyframeTrack=function(a,b,c,d){THREE.KeyframeTrack.call(this,a,b,c,d)};
2184THREE.VectorKeyframeTrack.prototype=Object.assign(Object.create(THREE.KeyframeTrack.prototype),{constructor:THREE.VectorKeyframeTrack,ValueTypeName:"vector"});
2185THREE.Audio=function(a){THREE.Object3D.call(this);this.type="Audio";this.context=a.context;this.source=this.context.createBufferSource();this.source.onended=this.onEnded.bind(this);this.gain=this.context.createGain();this.gain.connect(a.getInput());this.autoplay=!1;this.startTime=0;this.playbackRate=1;this.isPlaying=!1;
2185this.hasPlaybackControl=!0;this.sourceType="empty";this.filter=null};THREE.Audio.prototype=Object.create(THREE.Object3D.prototype);THREE.Audio.prototype.constructor=THREE.Audio;
2186THREE.Audio.prototype.getOutput=function(){return this.gain};THREE.Audio.prototype.load=function(a){var b=new THREE.AudioBuffer(this.context);b.load(a);this.setBuffer(b);return this};THREE.Audio.prototype.setNodeSource=function(a){this.hasPlaybackControl=!1;this.sourceType="audioNode";this.source=a;this.connect();return this};THREE.Audio.prototype.setBuffer=function(a){var b=this;a.onReady(function(a){b.source.buffer=a;b.sourceType="buffer";b.autoplay&&b.play()});return this};
2187THREE.Audio.prototype.play=function(){if(!0===this.isPlaying)console.warn("THREE.Audio: Audio is already playing.");else if(!1===this.hasPlaybackControl)console.warn("THREE.Audio: this Audio has no playback control.");else{var a=this.context.createBufferSource();a.buffer=this.source.buffer;a.loop=this.source.loop;a.onended=this.source.onended;a.start(0,this.startTime);a.playbackRate.value=this.playbackRate;this.isPlaying=!0;this.source=a;this.connect()}};
2188THREE.Audio.prototype.pause=function(){!1===this.hasPlaybackControl?console.warn("THREE.Audio: this Audio has no playback control."):(this.source.stop(),this.startTime=this.context.currentTime)};THREE.Audio.prototype.stop=function(){!1===this.hasPlaybackControl?console.warn("THREE.Audio: this Audio has no playback control."):(this.source.stop(),this.startTime=0)};THREE.Audio.prototype.connect=function(){null!==this.filter?(this.source.connect(this.filter),this.filter.connect(this.getOutput())):this.source.connect(this.getOutput())};
2189THREE.Audio.prototype.disconnect=function(){null!==this.filter?(this.source.disconnect(this.filter),this.filter.disconnect(this.getOutput())):this.source.disconnect(this.getOutput())};THREE.Audio.prototype.getFilter=function(){return this.filter};THREE.Audio.prototype.setFilter=function(a){void 0===a&&(a=null);!0===this.isPlaying?(this.disconnect(),this.filter=a,this.connect()):this.filter=a};
2190THREE.Audio.prototype.setPlaybackRate=function(a){!1===this.hasPlaybackControl?console.warn("THREE.Audio: this Audio has no playback control."):(this.playbackRate=a,!0===this.isPlaying&&(this.source.playbackRate.value=this.playbackRate))};THREE.Audio.prototype.getPlaybackRate=function(){return this.playbackRate};THREE.Audio.prototype.onEnded=function(){this.isPlaying=!1};
2191THREE.Audio.prototype.setLoop=function(a){!1===this.hasPlaybackControl?console.warn("THREE.Audio: this Audio has no playback control."):this.source.loop=a};THREE.Audio.prototype.getLoop=function(){return!1===this.hasPlaybackControl?(console.warn("THREE.Audio: this Audio has no playback control."),!1):this.source.loop};THREE.Audio.prototype.setVolume=function(a){this.gain.gain.value=a};THREE.Audio.prototype.getVolume=function(){return this.gain.gain.value};
2192THREE.AudioAnalyser=function(a,b){this.analyser=a.context.createAnalyser();this.analyser.fftSize=void 0!==b?b:2048;this.data=new Uint8Array(this.analyser.frequencyBinCount);a.getOutput().connect(this.analyser)};THREE.AudioAnalyser.prototype={constructor:THREE.AudioAnalyser,getData:function(){this.analyser.getByteFrequencyData(this.data);return this.data}};THREE.AudioBuffer=function(a){this.context=a;this.ready=!1;this.readyCallbacks=[]};
2193THREE.AudioBuffer.prototype.load=function(a){var b=this,c=new XMLHttpRequest;c.open("GET",a,!0);c.responseType="arraybuffer";c.onload=function(a){b.context.decodeAudioData(this.response,function(a){b.buffer=a;b.ready=!0;for(a=0;a<b.readyCallbacks.length;a++)b.readyCallbacks[a](b.buffer);b.readyCallbacks=[]})};c.send();return this};THREE.AudioBuffer.prototype.onReady=function(a){this.ready?a(this.buffer):this.readyCallbacks.push(a)};
2194THREE.PositionalAudio=function(a){THREE.Audio.call(this,a);this.panner=this.context.createPanner();this.panner.connect(this.gain)};THREE.PositionalAudio.prototype=Object.create(THREE.Audio.prototype);THREE.PositionalAudio.prototype.constructor=THREE.PositionalAudio;THREE.PositionalAudio.prototype.getOutput=function(){return this.panner};THREE.PositionalAudio.prototype.setRefDistance=function(a){this.panner.refDistance=a};THREE.PositionalAudio.prototype.getRefDistance=function(){return this.panner.refDistance};
2195THREE.PositionalAudio.prototype.setRolloffFactor=function(a){this.panner.rolloffFactor=a};THREE.PositionalAudio.prototype.getRolloffFactor=function(){return this.panner.rolloffFactor};THREE.PositionalAudio.prototype.setDistanceModel=function(a){this.panner.distanceModel=a};THREE.PositionalAudio.prototype.getDistanceModel=function(){return this.panner.distanceModel};THREE.PositionalAudio.prototype.setMaxDistance=function(a){this.panner.maxDistance=a};
2196THREE.PositionalAudio.prototype.getMaxDistance=function(){return this.panner.maxDistance};THREE.PositionalAudio.prototype.updateMatrixWorld=function(){var a=new THREE.Vector3;return function(b){THREE.Object3D.prototype.updateMatrixWorld.call(this,b);a.setFromMatrixPosition(this.matrixWorld);this.panner.setPosition(a.x,a.y,a.z)}}();
2197THREE.AudioListener=function(){THREE.Object3D.call(this);this.type="AudioListener";this.context=new (window.AudioContext||window.webkitAudioContext);this.gain=this.context.createGain();this.gain.connect(this.context.destination);this.filter=null};THREE.AudioListener.prototype=Object.create(THREE.Object3D.prototype);THREE.AudioListener.prototype.constructor=THREE.AudioListener;THREE.AudioListener.prototype.getInput=function(){return this.gain};
2198THREE.AudioListener.prototype.removeFilter=function(){null!==this.filter&&(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination),this.gain.connect(this.context.destination),this.filter=null)};THREE.AudioListener.prototype.setFilter=function(a){null!==this.filter?(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination)):this.gain.disconnect(this.context.destination);this.filter=a;this.gain.connect(this.filter);this.filter.connect(this.context.destination)};
2199THREE.AudioListener.prototype.getFilter=function(){return this.filter};THREE.AudioListener.prototype.setMasterVolume=function(a){this.gain.gain.value=a};THREE.AudioListener.prototype.getMasterVolume=function(){return this.gain.gain.value};
2200THREE.AudioListener.prototype.updateMatrixWorld=function(){var a=new THREE.Vector3,b=new THREE.Quaternion,c=new THREE.Vector3,d=new THREE.Vector3;return function(e){THREE.Object3D.prototype.updateMatrixWorld.call(this,e);e=this.context.listener;var f=this.up;this.matrixWorld.decompose(a,b,c);d.set(0,0,-1).applyQuaternion(b);e.setPosition(a.x,a.y,a.z);e.setOrientation(d.x,d.y,d.z,f.x,f.y,f.z)}}();
2201THREE.Camera=function(){THREE.Object3D.call(this);this.type="Camera";this.matrixWorldInverse=new THREE.Matrix4;this.projectionMatrix=new THREE.Matrix4};
2201THREE.Camera.prototype=Object.create(THREE.Object3D.prototype);THREE.Camera.prototype.constructor=THREE.Camera;THREE.Camera.prototype.getWorldDirection=function(){var a=new THREE.Quaternion;return function(b){b=b||new THREE.Vector3;this.getWorldQuaternion(a);return b.set(0,0,-1).applyQuaternion(a)}}();
2202THREE.Camera.prototype.lookAt=function(){var a=new THREE.Matrix4;return function(b){a.lookAt(this.position,b,this.up);this.quaternion.setFromRotationMatrix(a)}}();THREE.Camera.prototype.clone=function(){return(new this.constructor).copy(this)};THREE.Camera.prototype.copy=function(a){THREE.Object3D.prototype.copy.call(this,a);this.matrixWorldInverse.copy(a.matrixWorldInverse);this.projectionMatrix.copy(a.projectionMatrix);return this};
2203THREE.CubeCamera=function(a,b,c){THREE.Object3D.call(this);this.type="CubeCamera";var d=new THREE.PerspectiveCamera(90,1,a,b);d.up.set(0,-1,0);d.lookAt(new THREE.Vector3(1,0,0));this.add(d);var e=new THREE.PerspectiveCamera(90,1,a,b);e.up.set(0,-1,0);e.lookAt(new THREE.Vector3(-1,0,0));this.add(e);var f=new THREE.PerspectiveCamera(90,1,a,b);f.up.set(0,0,1);f.lookAt(new THREE.Vector3(0,1,0));this.add(f);var g=new THREE.PerspectiveCamera(90,1,a,b);g.up.set(0,0,-1);g.lookAt(new THREE.Vector3(0,-1,0));
2204this.add(g);var h=new THREE.PerspectiveCamera(90,1,a,b);h.up.set(0,-1,0);h.lookAt(new THREE.Vector3(0,0,1));this.add(h);var k=new THREE.PerspectiveCamera(90,1,a,b);k.up.set(0,-1,0);k.lookAt(new THREE.Vector3(0,0,-1));this.add(k);this.renderTarget=new THREE.WebGLRenderTargetCube(c,c,{format:THREE.RGBFormat,magFilter:THREE.LinearFilter,minFilter:THREE.LinearFilter});this.updateCubeMap=function(a,b){null===this.parent&&this.updateMatrixWorld();var c=this.renderTarget,m=c.texture.generateMipmaps;c.texture.generateMipmaps=
2205!1;c.activeCubeFace=0;a.render(b,d,c);c.activeCubeFace=1;a.render(b,e,c);c.activeCubeFace=2;a.render(b,f,c);c.activeCubeFace=3;a.render(b,g,c);c.activeCubeFace=4;a.render(b,h,c);c.texture.generateMipmaps=m;c.activeCubeFace=5;a.render(b,k,c);a.setRenderTarget(null)}};THREE.CubeCamera.prototype=Object.create(THREE.Object3D.prototype);THREE.CubeCamera.prototype.constructor=THREE.CubeCamera;
2206THREE.OrthographicCamera=function(a,b,c,d,e,f){THREE.Camera.call(this);this.type="OrthographicCamera";this.zoom=1;this.left=a;this.right=b;this.top=c;this.bottom=d;this.near=void 0!==e?e:.1;this.far=void 0!==f?f:2E3;this.updateProjectionMatrix()};THREE.OrthographicCamera.prototype=Object.create(THREE.Camera.prototype);THREE.OrthographicCamera.prototype.constructor=THREE.OrthographicCamera;
2207THREE.OrthographicCamera.prototype.updateProjectionMatrix=function(){var a=(this.right-this.left)/(2*this.zoom),b=(this.top-this.bottom)/(2*this.zoom),c=(this.right+this.left)/2,d=(this.top+this.bottom)/2;this.projectionMatrix.makeOrthographic(c-a,c+a,d+b,d-b,this.near,this.far)};THREE.OrthographicCamera.prototype.copy=function(a){THREE.Camera.prototype.copy.call(this,a);this.left=a.left;this.right=a.right;this.top=a.top;this.bottom=a.bottom;this.near=a.near;this.far=a.far;this.zoom=a.zoom;return this};
2208THREE.OrthographicCamera.prototype.toJSON=function(a){a=THREE.Object3D.prototype.toJSON.call(this,a);a.object.zoom=this.zoom;a.object.left=this.left;a.object.right=this.right;a.object.top=this.top;a.object.bottom=this.bottom;a.object.near=this.near;a.object.far=this.far;return a};
2209THREE.PerspectiveCamera=function(a,b,c,d){THREE.Camera.call(this);this.type="PerspectiveCamera";this.focalLength=10;this.zoom=1;this.fov=void 0!==a?a:50;this.aspect=void 0!==b?b:1;this.near=void 0!==c?c:.1;this.far=void 0!==d?d:2E3;this.updateProjectionMatrix()};THREE.PerspectiveCamera.prototype=Object.create(THREE.Camera.prototype);THREE.PerspectiveCamera.prototype.constructor=THREE.PerspectiveCamera;
2210THREE.PerspectiveCamera.prototype.setLens=function(a,b){void 0===b&&(b=24);this.fov=2*THREE.Math.radToDeg(Math.atan(b/(2*a)));this.updateProjectionMatrix()};THREE.PerspectiveCamera.prototype.setViewOffset=function(a,b,c,d,e,f){this.fullWidth=a;this.fullHeight=b;this.x=c;this.y=d;this.width=e;this.height=f;this.updateProjectionMatrix()};
2211THREE.PerspectiveCamera.prototype.updateProjectionMatrix=function(){var a=THREE.Math.radToDeg(2*Math.atan(Math.tan(.5*THREE.Math.degToRad(this.fov))/this.zoom));if(this.fullWidth){var b=this.fullWidth/this.fullHeight,a=Math.tan(THREE.Math.degToRad(.5*a))*this.near,c=-a,d=b*c,b=Math.abs(b*a-d),c=Math.abs(a-c);this.projectionMatrix.makeFrustum(d+this.x*b/this.fullWidth,d+(this.x+this.width)*b/this.fullWidth,a-(this.y+this.height)*c/this.fullHeight,a-this.y*c/this.fullHeight,this.near,this.far)}else this.projectionMatrix.makePerspective(a,
2212this.aspect,this.near,this.far)};
2212THREE.PerspectiveCamera.prototype.copy=function(a){THREE.Camera.prototype.copy.call(this,a);this.focalLength=a.focalLength;this.zoom=a.zoom;this.fov=a.fov;this.aspect=a.aspect;this.near=a.near;this.far=a.far;return this};
2213THREE.PerspectiveCamera.prototype.toJSON=function(a){a=THREE.Object3D.prototype.toJSON.call(this,a);a.object.focalLength=this.focalLength;a.object.zoom=this.zoom;a.object.fov=this.fov;a.object.aspect=this.aspect;a.object.near=this.near;a.object.far=this.far;return a};
2214THREE.StereoCamera=function(){this.type="StereoCamera";this.aspect=1;this.cameraL=new THREE.PerspectiveCamera;this.cameraL.layers.enable(1);this.cameraL.matrixAutoUpdate=!1;this.cameraR=new THREE.PerspectiveCamera;this.cameraR.layers.enable(2);this.cameraR.matrixAutoUpdate=!1};
2215THREE.StereoCamera.prototype={constructor:THREE.StereoCamera,update:function(){var a,b,c,d,e,f=new THREE.Matrix4,g=new THREE.Matrix4;return function(h){if(a!==h.focalLength||b!==h.fov||c!==h.aspect*this.aspect||d!==h.near||e!==h.far){a=h.focalLength;b=h.fov;c=h.aspect*this.aspect;d=h.near;e=h.far;var k=h.projectionMatrix.clone(),l=.032*d/a,p=d*Math.tan(THREE.Math.degToRad(.5*b)),n,m;g.elements[12]=-.032;f.elements[12]=.032;n=-p*c+l;m=p*c+l;k.elements[0]=2*d/(m-n);k.elements[8]=(m+n)/(m-n);this.cameraL.projectionMatrix.copy(k);
2216n=-p*c-l;m=p*c-l;k.elements[0]=2*d/(m-n);k.elements[8]=(m+n)/(m-n);this.cameraR.projectionMatrix.copy(k)}this.cameraL.matrixWorld.copy(h.matrixWorld).multiply(g);this.cameraR.matrixWorld.copy(h.matrixWorld).multiply(f)}}()};THREE.Light=function(a,b){THREE.Object3D.call(this);this.type="Light";this.color=new THREE.Color(a);this.intensity=void 0!==b?b:1;this.receiveShadow=void 0};THREE.Light.prototype=Object.create(THREE.Object3D.prototype);THREE.Light.prototype.constructor=THREE.Light;
2217THREE.Light.prototype.copy=function(a){THREE.Object3D.prototype.copy.call(this,a);this.color.copy(a.color);this.intensity=a.intensity;return this};
2218THREE.Light.prototype.toJSON=function(a){a=THREE.Object3D.prototype.toJSON.call(this,a);a.object.color=this.color.getHex();a.object.intensity=this.intensity;void 0!==this.groundColor&&(a.object.groundColor=this.groundColor.getHex());void 0!==this.distance&&(a.object.distance=this.distance);void 0!==this.angle&&(a.object.angle=this.angle);void 0!==this.decay&&(a.object.decay=this.decay);void 0!==this.penumbra&&(a.object.penumbra=this.penumbra);return a};
2219THREE.LightShadow=function(a){this.camera=a;this.bias=0;this.radius=1;this.mapSize=new THREE.Vector2(512,512);this.map=null;this.matrix=new THREE.Matrix4};THREE.LightShadow.prototype={constructor:THREE.LightShadow,copy:function(a){this.camera=a.camera.clone();this.bias=a.bias;this.radius=a.radius;this.mapSize.copy(a.mapSize);return this},clone:function(){return(new this.constructor).copy(this)}};THREE.AmbientLight=function(a,b){THREE.Light.call(this,a,b);this.type="AmbientLight";this.castShadow=void 0};
2220THREE.AmbientLight.prototype=Object.create(THREE.Light.prototype);THREE.AmbientLight.prototype.constructor=THREE.AmbientLight;THREE.DirectionalLight=function(a,b){THREE.Light.call(this,a,b);this.type="DirectionalLight";this.position.set(0,1,0);this.updateMatrix();this.target=new THREE.Object3D;this.shadow=new THREE.LightShadow(new THREE.OrthographicCamera(-5,5,5,-5,.5,500))};THREE.DirectionalLight.prototype=Object.create(THREE.Light.prototype);THREE.DirectionalLight.prototype.constructor=THREE.DirectionalLight;
2221THREE.DirectionalLight.prototype.copy=function(a){THREE.Light.prototype.copy.call(this,a);this.target=a.target.clone();this.shadow=a.shadow.clone();return this};THREE.HemisphereLight=function(a,b,c){THREE.Light.call(this,a,c);this.type="HemisphereLight";this.castShadow=void 0;this.position.set(0,1,0);this.updateMatrix();this.groundColor=new THREE.Color(b)};THREE.HemisphereLight.prototype=Object.create(THREE.Light.prototype);THREE.HemisphereLight.prototype.constructor=THREE.HemisphereLight;
2222THREE.HemisphereLight.prototype.copy=function(a){THREE.Light.prototype.copy.call(this,a);this.groundColor.copy(a.groundColor);return this};THREE.PointLight=function(a,b,c,d){THREE.Light.call(this,a,b);this.type="PointLight";this.distance=void 0!==c?c:0;this.decay=void 0!==d?d:1;this.shadow=new THREE.LightShadow(new THREE.PerspectiveCamera(90,1,.5,500))};THREE.PointLight.prototype=Object.create(THREE.Light.prototype);THREE.PointLight.prototype.constructor=THREE.PointLight;
2223Object.defineProperty(THREE.PointLight.prototype,"power",{get:function(){return 4*this.intensity*Math.PI},set:function(a){this.intensity=a/(4*Math.PI)}});THREE.PointLight.prototype.copy=function(a){THREE.Light.prototype.copy.call(this,a);this.distance=a.distance;this.decay=a.decay;this.shadow=a.shadow.clone();return this};
2224THREE.SpotLight=function(a,b,c,d,e,f){THREE.Light.call(this,a,b);this.type="SpotLight";this.position.set(0,1,0);this.updateMatrix();this.target=new THREE.Object3D;this.distance=void 0!==c?c:0;this.angle=void 0!==d?d:Math.PI/3;this.penumbra=void 0!==e?e:0;this.decay=void 0!==f?f:1;this.shadow=new THREE.LightShadow(new THREE.PerspectiveCamera(50,1,.5,500))};THREE.SpotLight.prototype=Object.create(THREE.Light.prototype);THREE.SpotLight.prototype.constructor=THREE.SpotLight;
2225Object.defineProperty(THREE.SpotLight.prototype,"power",{get:function(){return this.intensity*Math.PI},set:function(a){this.intensity=a/Math.PI}});THREE.SpotLight.prototype.copy=function(a){THREE.Light.prototype.copy.call(this,a);this.distance=a.distance;this.angle=a.angle;this.penumbra=a.penumbra;this.decay=a.decay;this.target=a.target.clone();this.shadow=a.shadow.clone();return this};
2226THREE.Cache={enabled:!1,files:{},add:function(a,b){!1!==this.enabled&&(this.files[a]=b)}
2226,get:function(a){if(!1!==this.enabled)return this.files[a]},remove:function(a){delete this.files[a]},clear:function(){this.files={}}};THREE.Loader=function(){this.onLoadStart=function(){};this.onLoadProgress=function(){};this.onLoadComplete=function(){}};
2227THREE.Loader.prototype={constructor:THREE.Loader,crossOrigin:void 0,extractUrlBase:function(a){a=a.split("/");if(1===a.length)return"./";a.pop();return a.join("/")+"/"},initMaterials:function(a,b,c){for(var d=[],e=0;e<a.length;++e)d[e]=this.createMaterial(a[e],b,c);return d},createMaterial:function(){var a,b,c;return function(d,e,f){function g(a,c,d,g,k){a=e+a;var l=THREE.Loader.Handlers.get(a);null!==l?a=l.load(a):(b.setCrossOrigin(f),a=b.load(a));void 0!==c&&(a.repeat.fromArray(c),1!==c[0]&&(a.wrapS=
2228THREE.RepeatWrapping),1!==c[1]&&(a.wrapT=THREE.RepeatWrapping));void 0!==d&&a.offset.fromArray(d);void 0!==g&&("repeat"===g[0]&&(a.wrapS=THREE.RepeatWrapping),"mirror"===g[0]&&(a.wrapS=THREE.MirroredRepeatWrapping),"repeat"===g[1]&&(a.wrapT=THREE.RepeatWrapping),"mirror"===g[1]&&(a.wrapT=THREE.MirroredRepeatWrapping));void 0!==k&&(a.anisotropy=k);c=THREE.Math.generateUUID();h[c]=a;return c}void 0===a&&(a=new THREE.Color);void 0===b&&(b=new THREE.TextureLoader);void 0===c&&(c=new THREE.MaterialLoader);
2229var h={},k={uuid:THREE.Math.generateUUID(),type:"MeshLambertMaterial"},l;for(l in d){var p=d[l];switch(l){case "DbgColor":case "DbgIndex":case "opticalDensity":case "illumination":break;case "DbgName":k.name=p;break;case "blending":k.blending=THREE[p];break;case "colorAmbient":case "mapAmbient":console.warn("THREE.Loader.createMaterial:",l,"is no longer supported.");break;case "colorDiffuse":k.color=a.fromArray(p).getHex();break;case "colorSpecular":k.specular=a.fromArray(p).getHex();break;case "colorEmissive":k.emissive=
2230a.fromArray(p).getHex();break;case "specularCoef":k.shininess=p;break;case "shading":"basic"===p.toLowerCase()&&(k.type="MeshBasicMaterial");"phong"===p.toLowerCase()&&(k.type="MeshPhongMaterial");break;case "mapDiffuse":k.map=g(p,d.mapDiffuseRepeat,d.mapDiffuseOffset,d.mapDiffuseWrap,d.mapDiffuseAnisotropy);break;case "mapDiffuseRepeat":case "mapDiffuseOffset":case "mapDiffuseWrap":case "mapDiffuseAnisotropy":break;case "mapLight":k.lightMap=g(p,d.mapLightRepeat,d.mapLightOffset,d.mapLightWrap,d.mapLightAnisotropy);
2231break;case "mapLightRepeat":case "mapLightOffset":case "mapLightWrap":case "mapLightAnisotropy":break;case "mapAO":k.aoMap=g(p,d.mapAORepeat,d.mapAOOffset,d.mapAOWrap,d.mapAOAnisotropy);break;case "mapAORepeat":case "mapAOOffset":case "mapAOWrap":case "mapAOAnisotropy":break;case "mapBump":k.bumpMap=g(p,d.mapBumpRepeat,d.mapBumpOffset,d.mapBumpWrap,d.mapBumpAnisotropy);break;case "mapBumpScale":k.bumpScale=p;break;case "mapBumpRepeat":case "mapBumpOffset":case "mapBumpWrap":case "mapBumpAnisotropy":break;
2232case "mapNormal":k.normalMap=g(p,d.mapNormalRepeat,d.mapNormalOffset,d.mapNormalWrap,d.mapNormalAnisotropy);break;case "mapNormalFactor":k.normalScale=[p,p];break;case "mapNormalRepeat":case "mapNormalOffset":case "mapNormalWrap":case "mapNormalAnisotropy":break;case "mapSpecular":k.specularMap=g(p,d.mapSpecularRepeat,d.mapSpecularOffset,d.mapSpecularWrap,d.mapSpecularAnisotropy);break;case "mapSpecularRepeat":case "mapSpecularOffset":case "mapSpecularWrap":case "mapSpecularAnisotropy":break;case "mapAlpha":k.alphaMap=
2233g(p,d.mapAlphaRepeat,d.mapAlphaOffset,d.mapAlphaWrap,d.mapAlphaAnisotropy);break;case "mapAlphaRepeat":case "mapAlphaOffset":case "mapAlphaWrap":case "mapAlphaAnisotropy":break;case "flipSided":k.side=THREE.BackSide;break;case "doubleSided":k.side=THREE.DoubleSide;break;case "transparency":console.warn("THREE.Loader.createMaterial: transparency has been renamed to opacity");k.opacity=p;break;case "depthTest":case "depthWrite":case "colorWrite":case "opacity":case "reflectivity":case "transparent":case "visible":case "wireframe":k[l]=
2234p;break;case "vertexColors":!0===p&&(k.vertexColors=THREE.VertexColors);"face"===p&&(k.vertexColors=THREE.FaceColors);break;default:console.error("THREE.Loader.createMaterial: Unsupported",l,p)}}"MeshBasicMaterial"===k.type&&delete k.emissive;
2234"MeshPhongMaterial"!==k.type&&delete k.specular;1>k.opacity&&(k.transparent=!0);c.setTextures(h);return c.parse(k)}}()};
2235THREE.Loader.Handlers={handlers:[],add:function(a,b){this.handlers.push(a,b)},get:function(a){for(var b=this.handlers,c=0,d=b.length;c<d;c+=2){var e=b[c+1];if(b[c].test(a))return e}return null}};THREE.XHRLoader=function(a){this.manager=void 0!==a?a:THREE.DefaultLoadingManager};
2236THREE.XHRLoader.prototype={constructor:THREE.XHRLoader,load:function(a,b,c,d){void 0!==this.path&&(a=this.path+a);var e=this,f=THREE.Cache.get(a);if(void 0!==f)return b&&setTimeout(function(){b(f)},0),f;var g=new XMLHttpRequest;g.overrideMimeType("text/plain");g.open("GET",a,!0);g.addEventListener("load",function(c){var f=c.target.response;THREE.Cache.add(a,f);200===this.status?(b&&b(f),e.manager.itemEnd(a)):0===this.status?(console.warn("THREE.XHRLoader: HTTP Status 0 received."),b&&b(f),e.manager.itemEnd(a)):
2237(d&&d(c),e.manager.itemError(a))},!1);void 0!==c&&g.addEventListener("progress",function(a){c(a)},!1);g.addEventListener("error",function(b){d&&d(b);e.manager.itemError(a)},!1);void 0!==this.responseType&&(g.responseType=this.responseType);void 0!==this.withCredentials&&(g.withCredentials=this.withCredentials);g.send(null);e.manager.itemStart(a);return g},setPath:function(a){this.path=a},setResponseType:function(a){this.responseType=a},setWithCredentials:function(a){this.withCredentials=a}};
2238THREE.FontLoader=function(a){this.manager=void 0!==a?a:THREE.DefaultLoadingManager};THREE.FontLoader.prototype={constructor:THREE.FontLoader,load:function(a,b,c,d){(new THREE.XHRLoader(this.manager)).load(a,function(a){b(new THREE.Font(JSON.parse(a.substring(65,a.length-2))))},c,d)}};THREE.ImageLoader=function(a){this.manager=void 0!==a?a:THREE.DefaultLoadingManager};
2239THREE.ImageLoader.prototype={constructor:THREE.ImageLoader,load:function(a,b,c,d){void 0!==this.path&&(a=this.path+a);var e=this,f=THREE.Cache.get(a);if(void 0!==f)return e.manager.itemStart(a),b?setTimeout(function(){b(f);e.manager.itemEnd(a)},0):e.manager.itemEnd(a),f;var g=document.createElement("img");g.addEventListener("load",function(c){THREE.Cache.add(a,this);b&&b(this);e.manager.itemEnd(a)},!1);void 0!==c&&g.addEventListener("progress",function(a){c(a)},!1);g.addEventListener("error",function(b){d&&
2240d(b);e.manager.itemError(a)},!1);void 0!==this.crossOrigin&&(g.crossOrigin=this.crossOrigin);e.manager.itemStart(a);g.src=a;return g},setCrossOrigin:function(a){this.crossOrigin=a},setPath:function(a){this.path=a}};THREE.JSONLoader=function(a){"boolean"===typeof a&&(console.warn("THREE.JSONLoader: showStatus parameter has been removed from constructor."),a=void 0);this.manager=void 0!==a?a:THREE.DefaultLoadingManager;this.withCredentials=!1};
2241THREE.JSONLoader.prototype={constructor:THREE.JSONLoader,get statusDomElement(){void 0===this._statusDomElement&&(this._statusDomElement=document.createElement("div"));console.warn("THREE.JSONLoader: .statusDomElement has been removed.");return this._statusDomElement},load:function(a,b,c,d){var e=this,f=this.texturePath&&"string"===typeof this.texturePath?this.texturePath:THREE.Loader.prototype.extractUrlBase(a),g=new THREE.XHRLoader(this.manager);g.setWithCredentials(this.withCredentials);g.load(a,
2242function(c){c=JSON.parse(c);var d=c.metadata;if(void 0!==d&&(d=d.type,void 0!==d)){if("object"===d.toLowerCase()){console.error("THREE.JSONLoader: "+a+" should be loaded with THREE.ObjectLoader instead.");return}if("scene"===d.toLowerCase()){console.error("THREE.JSONLoader: "+a+" should be loaded with THREE.SceneLoader instead.");return}}c=e.parse(c,f);b(c.geometry,c.materials)},c,d)},setTexturePath:function(a){this.texturePath=a},parse:function(a,b){var c=new THREE.Geometry,d=void 0!==a.scale?1/
2243a.scale:1;(function(b){var d,g,h,k,l,p,n,m,q,u,v,t,s,w=a.faces;p=a.vertices;var E=a.normals,x=a.colors,D=0;if(void 0!==a.uvs){for(d=0;d<a.uvs.length;d++)a.uvs[d].length&&D++;for(d=0;d<D;d++)c.faceVertexUvs[d]=[]}k=0;for(l=p.length;k<l;)d=new THREE.Vector3,d.x=p[k++]*b,d.y=p[k++]*b,d.z=p[k++]*b,c.vertices.push(d);k=0;for(l=w.length;k<l;)if(b=w[k++],q=b&1,h=b&2,d=b&8,n=b&16,u=b&32,p=b&64,b&=128,q){q=new THREE.Face3;q.a=w[k];q.b=w[k+1];q.c=w[k+3];
vendor: 6,134 bytes, lines 2243-2258
2243v=new THREE.Face3;v.a=w[k+1];v.b=w[k+2];v.c=w[k+3];k+=
22444;h&&(h=w[k++],q.materialIndex=h,v.materialIndex=h);h=c.faces.length;if(d)for(d=0;d<D;d++)for(t=a.uvs[d],c.faceVertexUvs[d][h]=[],c.faceVertexUvs[d][h+1]=[],g=0;4>g;g++)m=w[k++],s=t[2*m],m=t[2*m+1],s=new THREE.Vector2(s,m),2!==g&&c.faceVertexUvs[d][h].push(s),0!==g&&c.faceVertexUvs[d][h+1].push(s);n&&(n=3*w[k++],q.normal.set(E[n++],E[n++],E[n]),v.normal.copy(q.normal));if(u)for(d=0;4>d;d++)n=3*w[k++],u=new THREE.Vector3(E[n++],E[n++],E[n]),2!==d&&q.vertexNormals.push(u),0!==d&&v.vertexNormals.push(u);
2245p&&(p=w[k++],p=x[p],q.color.setHex(p),v.color.setHex(p));if(b)for(d=0;4>d;d++)p=w[k++],p=x[p],2!==d&&q.vertexColors.push(new THREE.Color(p)),0!==d&&v.vertexColors.push(new THREE.Color(p));c.faces.push(q);c.faces.push(v)}else{q=new THREE.Face3;q.a=w[k++];q.b=w[k++];q.c=w[k++];h&&(h=w[k++],q.materialIndex=h);h=c.faces.length;if(d)for(d=0;d<D;d++)for(t=a.uvs[d],c.faceVertexUvs[d][h]=[],g=0;3>g;g++)m=w[k++],s=t[2*m],m=t[2*m+1],s=new THREE.Vector2(s,m),c.faceVertexUvs[d][h].push(s);n&&(n=3*w[k++],q.normal.set(E[n++],
2246E[n++],E[n]));if(u)for(d=0;3>d;d++)n=3*w[k++],u=new THREE.Vector3(E[n++],E[n++],E[n]),q.vertexNormals.push(u);p&&(p=w[k++],q.color.setHex(x[p]));if(b)for(d=0;3>d;d++)p=w[k++],q.vertexColors.push(new THREE.Color(x[p]));c.faces.push(q)}})(d);(function(){var b=void 0!==a.influencesPerVertex?a.influencesPerVertex:2;if(a.skinWeights)for(var d=0,g=a.skinWeights.length;d<g;d+=b)c.skinWeights.push(new THREE.Vector4(a.skinWeights[d],1<b?a.skinWeights[d+1]:0,2<b?a.skinWeights[d+2]:0,3<b?a.skinWeights[d+3]:
22470));if(a.skinIndices)for(d=0,g=a.skinIndices.length;d<g;d+=b)c.skinIndices.push(new THREE.Vector4(a.skinIndices[d],1<b?a.skinIndices[d+1]:0,2<b?a.skinIndices[d+2]:0,3<b?a.skinIndices[d+3]:0));c.bones=a.bones;c.bones&&0<c.bones.length&&(c.skinWeights.length!==c.skinIndices.length||c.skinIndices.length!==c.vertices.length)&&console.warn("When skinning, number of vertices ("+c.vertices.length+"), skinIndices ("+c.skinIndices.length+"), and skinWeights ("+c.skinWeights.length+") should match.")})();(function(b){if(void 0!==
2248a.morphTargets)for(var d=0,g=a.morphTargets.length;d<g;d++){c.morphTargets[d]={};c.morphTargets[d].name=a.morphTargets[d].name;c.morphTargets[d].vertices=[];for(var h=c.morphTargets[d].vertices,k=a.morphTargets[d].vertices,l=0,p=k.length;l<p;l+=3){var n=new THREE.Vector3;n.x=k[l]*b;n.y=k[l+1]*b;n.z=k[l+2]*b;h.push(n)}}if(void 0!==a.morphColors&&0<a.morphColors.length)for(console.warn('THREE.JSONLoader: "morphColors" no longer supported. Using them as face colors.'),b=c.faces,h=a.morphColors[0].colors,
2249d=0,g=b.length;d<g;d++)b[d].color.fromArray(h,3*d)})(d);(function(){var b=[],d=[];void 0!==a.animation&&d.push(a.animation);void 0!==a.animations&&(a.animations.length?d=d.concat(a.animations):d.push(a.animations));for(var g=0;g<d.length;g++){var h=THREE.AnimationClip.parseAnimation(d[g],c.bones);h&&b.push(h)}c.morphTargets&&(d=THREE.AnimationClip.CreateClipsFromMorphTargetSequences(c.morphTargets,10),b=b.concat(d));0<b.length&&(c.animations=b)})();c.computeFaceNormals();c.computeBoundingSphere();
2250if(void 0===a.materials||0===a.materials.length)return{geometry:c};d=THREE.Loader.prototype.initMaterials(a.materials,b,this.crossOrigin);return{geometry:c,materials:d}}};
2251THREE.LoadingManager=function(a,b,c){var d=this,e=!1,f=0,g=0;this.onStart=void 0;this.onLoad=a;this.onProgress=b;this.onError=c;this.itemStart=function(a){g++;if(!1===e&&void 0!==d.onStart)d.onStart(a,f,g);e=!0};this.itemEnd=function(a){f++;if(void 0!==d.onProgress)d.onProgress(a,f,g);if(f===g&&(e=!1,void 0!==d.onLoad))d.onLoad()};this.itemError=function(a){if(void 0!==d.onError)d.onError(a)}};THREE.DefaultLoadingManager=new THREE.LoadingManager;
2252THREE.BufferGeometryLoader=function(a){this.manager=void 0!==a?a:THREE.DefaultLoadingManager};
2253THREE.BufferGeometryLoader.prototype={constructor:THREE.BufferGeometryLoader,load:function(a,b,c,d){var e=this;(new THREE.XHRLoader(e.manager)).load(a,function(a){b(e.parse(JSON.parse(a)))},c,d)},parse:function(a){var b=new THREE.BufferGeometry,c=a.data.index,d={Int8Array:Int8Array,Uint8Array:Uint8Array,Uint8ClampedArray:Uint8ClampedArray,Int16Array:Int16Array,Uint16Array:Uint16Array,Int32Array:Int32Array,Uint32Array:Uint32Array,Float32Array:Float32Array,Float64Array:Float64Array};void 0!==c&&(c=
2254new d[c.type](c.array),b.setIndex(new THREE.BufferAttribute(c,1)));var e=a.data.attributes,f;for(f in e){var g=e[f],c=new d[g.type](g.array);b.addAttribute(f,new THREE.BufferAttribute(c,g.itemSize))}d=a.data.groups||a.data.drawcalls||a.data.offsets;if(void 0!==d)for(f=0,c=d.length;f!==c;++f)e=d[f],b.addGroup(e.start,e.count,e.materialIndex);a=a.data.boundingSphere;void 0!==a&&(d=new THREE.Vector3,void 0!==a.center&&d.fromArray(a.center),b.boundingSphere=new THREE.Sphere(d,a.radius));return b}};
2255THREE.MaterialLoader=function(a){this.manager=void 0!==a?a:THREE.DefaultLoadingManager;this.textures={}};
2256THREE.MaterialLoader.prototype={constructor:THREE.MaterialLoader,load:function(a,b,c,d){var e=this;(new THREE.XHRLoader(e.manager)).load(a,function(a){b(e.parse(JSON.parse(a)))},c,d)},setTextures:function(a){this.textures=a},getTexture:function(a){var b=this.textures;void 0===b[a]&&console.warn("THREE.MaterialLoader: Undefined texture",a);return b[a]},parse:function(a){var b=new THREE[a.type];void 0!==a.uuid&&(b.uuid=a.uuid);void 0!==a.name&&(b.name=a.name);void 0!==a.color&&b.color.setHex(a.color);
2257void 0!==a.roughness&&(b.roughness=a.roughness);void 0!==a.metalness&&(b.metalness=a.metalness);void 0!==a.emissive&&b.emissive.setHex(a.emissive);void 0!==a.specular&&b.specular.setHex(a.specular);void 0!==a.shininess&&(b.shininess=a.shininess);void 0!==a.uniforms&&(b.uniforms=a.uniforms);void 0!==a.vertexShader&&(b.vertexShader=a.vertexShader);void 0!==a.fragmentShader&&(b.fragmentShader=a.fragmentShader);void 0!==a.vertexColors&&(b.vertexColors=a.vertexColors);void 0!==a.shading&&(b.shading=a.shading);
2258void 0!==a.blending&&(b.blending=a.blending);void 0!==a.side&&(b.side=a.side);void 0!==a.opacity&&(b.opacity=a.opacity);void 0!==a.transparent&&(b.transparent=a.transparent);
2258void 0!==a.alphaTest&&(b.alphaTest=a.alphaTest);void 0!==a.depthTest&&(b.depthTest=a.depthTest);void 0!==a.depthWrite&&(b.depthWrite=a.depthWrite);void 0!==a.colorWrite&&(b.colorWrite=a.colorWrite);void 0!==a.wireframe&&(b.wireframe=a.wireframe);void 0!==a.wireframeLinewidth&&(b.wireframeLinewidth=a.wireframeLinewidth);void 0!==
2259a.size&&(b.size=a.size);void 0!==a.sizeAttenuation&&(b.sizeAttenuation=a.sizeAttenuation);void 0!==a.map&&(b.map=this.getTexture(a.map));void 0!==a.alphaMap&&(b.alphaMap=this.getTexture(a.alphaMap),b.transparent=!0);void 0!==a.bumpMap&&(b.bumpMap=this.getTexture(a.bumpMap));void 0!==a.bumpScale&&(b.bumpScale=a.bumpScale);void 0!==a.normalMap&&(b.normalMap=this.getTexture(a.normalMap));if(void 0!==a.normalScale){var c=a.normalScale;!1===Array.isArray(c)&&(c=[c,c]);b.normalScale=(new THREE.Vector2).fromArray(c)}void 0!==
2260a.displacementMap&&(b.displacementMap=this.getTexture(a.displacementMap));void 0!==a.displacementScale&&(b.displacementScale=a.displacementScale);void 0!==a.displacementBias&&(b.displacementBias=a.displacementBias);void 0!==a.roughnessMap&&(b.roughnessMap=this.getTexture(a.roughnessMap));void 0!==a.metalnessMap&&(b.metalnessMap=this.getTexture(a.metalnessMap));void 0!==a.emissiveMap&&(b.emissiveMap=this.getTexture(a.emissiveMap));void 0!==a.emissiveIntensity&&(b.emissiveIntensity=a.emissiveIntensity);
2261void 0!==a.specularMap&&(b.specularMap=this.getTexture(a.specularMap));void 0!==a.envMap&&(b.envMap=this.getTexture(a.envMap),b.combine=THREE.MultiplyOperation);a.reflectivity&&(b.reflectivity=a.reflectivity);void 0!==a.lightMap&&(b.lightMap=this.getTexture(a.lightMap));void 0!==a.lightMapIntensity&&(b.lightMapIntensity=a.lightMapIntensity);void 0!==a.aoMap&&(b.aoMap=this.getTexture(a.aoMap));void 0!==a.aoMapIntensity&&(b.aoMapIntensity=a.aoMapIntensity);if(void 0!==a.materials)for(var c=0,d=a.materials.length;c<
2262d;c++)b.materials.push(this.parse(a.materials[c]));return b}};THREE.ObjectLoader=function(a){this.manager=void 0!==a?a:THREE.DefaultLoadingManager;this.texturePath=""};
2263THREE.ObjectLoader.prototype={constructor:THREE.ObjectLoader,load:function(a,b,c,d){""===this.texturePath&&(this.texturePath=a.substring(0,a.lastIndexOf("/")+1));var e=this;(new THREE.XHRLoader(e.manager)).load(a,function(a){e.parse(JSON.parse(a),b)},c,d)},setTexturePath:function(a){this.texturePath=a},setCrossOrigin:function(a){this.crossOrigin=a},parse:function(a,b){var c=this.parseGeometries(a.geometries),d=this.parseImages(a.images,function(){void 0!==b&&b(e)}),d=this.parseTextures(a.textures,
2264d),d=this.parseMaterials(a.materials,d),e=this.parseObject(a.object,c,d);a.animations&&(e.animations=this.parseAnimations(a.animations));void 0!==a.images&&0!==a.images.length||void 0===b||b(e);return e},parseGeometries:function(a){var b={};if(void 0!==a)for(var c=new THREE.JSONLoader,d=new THREE.BufferGeometryLoader,e=0,f=a.length;e<f;e++){var g,h=a[e];switch(h.type){case "PlaneGeometry":case "PlaneBufferGeometry":g=new THREE[h.type](h.width,h.height,h.widthSegments,h.heightSegments);break;case "BoxGeometry":case "BoxBufferGeometry":case "CubeGeometry":g=
2265new THREE[h.type](h.width,h.height,h.depth,h.widthSegments,h.heightSegments,h.depthSegments);break;case "CircleGeometry":case "CircleBufferGeometry":g=new THREE[h.type](h.radius,h.segments,h.thetaStart,h.thetaLength);break;case "CylinderGeometry":case "CylinderBufferGeometry":g=new THREE[h.type](h.radiusTop,h.radiusBottom,h.height,h.radialSegments,h.heightSegments,h.openEnded,h.thetaStart,h.thetaLength);break;case "SphereGeometry":case "SphereBufferGeometry":g=new THREE[h.type](h.radius,h.widthSegments,
2266h.heightSegments,h.phiStart,h.phiLength,h.thetaStart,h.thetaLength);break;case "DodecahedronGeometry":g=new THREE.DodecahedronGeometry(h.radius,h.detail);break;case "IcosahedronGeometry":g=new THREE.IcosahedronGeometry(h.radius,h.detail);break;case "OctahedronGeometry":g=new THREE.OctahedronGeometry(h.radius,h.detail);break;case "TetrahedronGeometry":g=new THREE.TetrahedronGeometry(h.radius,h.detail);break;case "RingGeometry":case "RingBufferGeometry":g=new THREE[h.type](h.innerRadius,h.outerRadius,
2267h.thetaSegments,h.phiSegments,h.thetaStart,h.thetaLength);break;case "TorusGeometry":case "TorusBufferGeometry":g=new THREE[h.type](h.radius,h.tube,h.radialSegments,h.tubularSegments,h.arc);break;case "TorusKnotGeometry":case "TorusKnotBufferGeometry":g=new THREE[h.type](h.radius,h.tube,h.tubularSegments,h.radialSegments,h.p,h.q);break;case "LatheGeometry":g=new THREE.LatheGeometry(h.points,h.segments,h.phiStart,h.phiLength);break;case "BufferGeometry":g=d.parse(h);break;case "Geometry":g=c.parse(h.data,
2268this.texturePath).geometry;break;default:console.warn('THREE.ObjectLoader: Unsupported geometry type "'+h.type+'"');continue}g.uuid=h.uuid;void 0!==h.name&&(g.name=h.name);b[h.uuid]=g}return b},parseMaterials:function(a,b){var c={};if(void 0!==a){var d=new THREE.MaterialLoader;d.setTextures(b);for(var e=0,f=a.length;e<f;e++){var g=d.parse(a[e]);c[g.uuid]=g}}return c},parseAnimations:function(a){for(var b=[],c=0;c<a.length;c++){var d=THREE.AnimationClip.parse(a[c]);b.push(d)}return b},parseImages:function(a,
2269b){function c(a){d.manager.itemStart(a);return g.load(a,function(){d.manager.itemEnd(a)})}var d=this,e={};if(void 0!==a&&0<a.length){var f=new THREE.LoadingManager(b),g=new THREE.ImageLoader(f);g.setCrossOrigin(this.crossOrigin);for(var f=0,h=a.length;f<h;f++){var k=a[f],l=/^(\/\/)|([a-z]+:(\/\/)?)/i.test(k.url)?k.url:d.texturePath+k.url;e[k.uuid]=c(l)}}return e},parseTextures:function(a,b){function c(a){if("number"===typeof a)return a;console.warn("THREE.ObjectLoader.parseTexture: Constant should be in numeric form.",
2270a);return THREE[a]}var d={};if(void 0!==a)for(var e=0,f=a.length;e<f;e++){var g=a[e];void 0===g.image&&console.warn('THREE.ObjectLoader: No "image" specified for',g.uuid);void 0===b[g.image]&&console.warn("THREE.ObjectLoader: Undefined image",g.image);var h=new THREE.Texture(b[g.image]);h.needsUpdate=!0;h.uuid=g.uuid;void 0!==g.name&&(h.name=g.name);void 0!==g.mapping&&(h.mapping=c(g.mapping));void 0!==g.offset&&(h.offset=new THREE.Vector2(g.offset[0],g.offset[1]));void 0!==g.repeat&&(h.repeat=new THREE.Vector2(g.repeat[0],
2271g.repeat[1]));void 0!==g.minFilter&&(h.minFilter=c(g.minFilter));void 0!==g.magFilter&&(h.magFilter=c(g.magFilter));void 0!==g.anisotropy&&(h.anisotropy=g.anisotropy);Array.isArray(g.wrap)&&(h.wrapS=c(g.wrap[0]),h.wrapT=c(g.wrap[1]));d[g.uuid]=h}return d},parseObject:function(){var a=new THREE.Matrix4;return function(b,c,d){function e(a){void 0===c[a]&&console.warn("THREE.ObjectLoader: Undefined geometry",a);return c[a]}function f(a){if(void 0!==a)return void 0===d[a]&&console.warn("THREE.ObjectLoader: Undefined material",
2272a),d[a]}var g;switch(b.type){case "Scene":g=new THREE.Scene;break;case "PerspectiveCamera":g=new THREE.PerspectiveCamera(b.fov,b.aspect,b.near,b.far);break;
2272case "OrthographicCamera":g=new THREE.OrthographicCamera(b.left,b.right,b.top,b.bottom,b.near,b.far);break;case "AmbientLight":g=new THREE.AmbientLight(b.color,b.intensity);break;case "DirectionalLight":g=new THREE.DirectionalLight(b.color,b.intensity);break;case "PointLight":g=new THREE.PointLight(b.color,b.intensity,b.distance,b.decay);break;
2273case "SpotLight":g=new THREE.SpotLight(b.color,b.intensity,b.distance,b.angle,b.penumbra,b.decay);break;case "HemisphereLight":g=new THREE.HemisphereLight(b.color,b.groundColor,b.intensity);break;case "Mesh":g=e(b.geometry);var h=f(b.material);g=g.bones&&0<g.bones.length?new THREE.SkinnedMesh(g,h):new THREE.Mesh(g,h);break;case "LOD":g=new THREE.LOD;break;case "Line":g=new THREE.Line(e(b.geometry),f(b.material),b.mode);break;case "PointCloud":case "Points":g=new THREE.Points(e(b.geometry),f(b.material));
2274break;case "Sprite":g=new THREE.Sprite(f(b.material));break;case "Group":g=new THREE.Group;break;default:g=new THREE.Object3D}g.uuid=b.uuid;void 0!==b.name&&(g.name=b.name);void 0!==b.matrix?(a.fromArray(b.matrix),a.decompose(g.position,g.quaternion,g.scale)):(void 0!==b.position&&g.position.fromArray(b.position),void 0!==b.rotation&&g.rotation.fromArray(b.rotation),void 0!==b.scale&&g.scale.fromArray(b.scale));void 0!==b.castShadow&&(g.castShadow=b.castShadow);void 0!==b.receiveShadow&&(g.receiveShadow=
2275b.receiveShadow);void 0!==b.visible&&(g.visible=b.visible);void 0!==b.userData&&(g.userData=b.userData);if(void 0!==b.children)for(var k in b.children)g.add(this.parseObject(b.children[k],c,d));if("LOD"===b.type)for(b=b.levels,h=0;h<b.length;h++){var l=b[h];k=g.getObjectByProperty("uuid",l.object);void 0!==k&&g.addLevel(k,l.distance)}return g}}()};THREE.TextureLoader=function(a){this.manager=void 0!==a?a:THREE.DefaultLoadingManager};
2276THREE.TextureLoader.prototype={constructor:THREE.TextureLoader,load:function(a,b,c,d){var e=new THREE.Texture,f=new THREE.ImageLoader(this.manager);f.setCrossOrigin(this.crossOrigin);f.setPath(this.path);f.load(a,function(a){e.image=a;e.needsUpdate=!0;void 0!==b&&b(e)},c,d);return e},setCrossOrigin:function(a){this.crossOrigin=a},setPath:function(a){this.path=a}};THREE.CubeTextureLoader=function(a){this.manager=void 0!==a?a:THREE.DefaultLoadingManager};
2277THREE.CubeTextureLoader.prototype={constructor:THREE.CubeTextureLoader,load:function(a,b,c,d){function e(c){g.load(a[c],function(a){f.images[c]=a;h++;6===h&&(f.needsUpdate=!0,b&&b(f))},void 0,d)}var f=new THREE.CubeTexture,g=new THREE.ImageLoader(this.manager);g.setCrossOrigin(this.crossOrigin);g.setPath(this.path);var h=0;for(c=0;c<a.length;++c)e(c);return f},setCrossOrigin:function(a){this.crossOrigin=a},setPath:function(a){this.path=a}};
2278THREE.DataTextureLoader=THREE.BinaryTextureLoader=function(a){this.manager=void 0!==a?a:THREE.DefaultLoadingManager;this._parser=null};
2279THREE.BinaryTextureLoader.prototype={constructor:THREE.BinaryTextureLoader,load:function(a,b,c,d){var e=this,f=new THREE.DataTexture,g=new THREE.XHRLoader(this.manager);g.setResponseType("arraybuffer");g.load(a,function(a){if(a=e._parser(a))void 0!==a.image?f.image=a.image:void 0!==a.data&&(f.image.width=a.width,f.image.height=a.height,f.image.data=a.data),f.wrapS=void 0!==a.wrapS?a.wrapS:THREE.ClampToEdgeWrapping,f.wrapT=void 0!==a.wrapT?a.wrapT:THREE.ClampToEdgeWrapping,f.magFilter=void 0!==a.magFilter?
2280a.magFilter:THREE.LinearFilter,f.minFilter=void 0!==a.minFilter?a.minFilter:THREE.LinearMipMapLinearFilter,f.anisotropy=void 0!==a.anisotropy?a.anisotropy:1,void 0!==a.format&&(f.format=a.format),void 0!==a.type&&(f.type=a.type),void 0!==a.mipmaps&&(f.mipmaps=a.mipmaps),1===a.mipmapCount&&(f.minFilter=THREE.LinearFilter),f.needsUpdate=!0,b&&b(f,a)},c,d);return f}};THREE.CompressedTextureLoader=function(a){this.manager=void 0!==a?a:THREE.DefaultLoadingManager;this._parser=null};
2281THREE.CompressedTextureLoader.prototype={constructor:THREE.CompressedTextureLoader,load:function(a,b,c,d){function e(e){k.load(a[e],function(a){a=f._parser(a,!0);g[e]={width:a.width,height:a.height,format:a.format,mipmaps:a.mipmaps};l+=1;6===l&&(1===a.mipmapCount&&(h.minFilter=THREE.LinearFilter),h.format=a.format,h.needsUpdate=!0,b&&b(h))},c,d)}var f=this,g=[],h=new THREE.CompressedTexture;h.image=g;var k=new THREE.XHRLoader(this.manager);k.setPath(this.path);k.setResponseType("arraybuffer");if(Array.isArray(a))for(var l=
22820,p=0,n=a.length;p<n;++p)e(p);else k.load(a,function(a){a=f._parser(a,!0);if(a.isCubemap)for(var c=a.mipmaps.length/a.mipmapCount,d=0;d<c;d++){g[d]={mipmaps:[]};for(var e=0;e<a.mipmapCount;e++)g[d].mipmaps.push(a.mipmaps[d*a.mipmapCount+e]),g[d].format=a.format,g[d].width=a.width,g[d].height=a.height}else h.image.width=a.width,h.image.height=a.height,h.mipmaps=a.mipmaps;1===a.mipmapCount&&(h.minFilter=THREE.LinearFilter);h.format=a.format;h.needsUpdate=!0;b&&b(h)},c,d);return h},setPath:function(a){this.path=
2283a}};
2284THREE.Material=function(){Object.defineProperty(this,"id",{value:THREE.MaterialIdCount++});this.uuid=THREE.Math.generateUUID();this.name="";this.type="Material";this.side=THREE.FrontSide;this.opacity=1;this.transparent=!1;this.blending=THREE.NormalBlending;this.blendSrc=THREE.SrcAlphaFactor;this.blendDst=THREE.OneMinusSrcAlphaFactor;this.blendEquation=THREE.AddEquation;this.blendEquationAlpha=this.blendDstAlpha=this.blendSrcAlpha=null;this.depthFunc=THREE.LessEqualDepth;this.colorWrite=this.depthWrite=this.depthTest=
2285!0;this.precision=null;this.polygonOffset=!1;this.alphaTest=this.polygonOffsetUnits=this.polygonOffsetFactor=0;this.premultipliedAlpha=!1;this.overdraw=0;this._needsUpdate=this.visible=!0};
2286THREE.Material.prototype={constructor:THREE.Material,get needsUpdate(){return this._needsUpdate},set needsUpdate(a){!0===a&&this.update();this._needsUpdate=a}
vendor: 3,608 bytes, lines 2286-2293
2286,setValues:function(a){if(void 0!==a)for(var b in a){var c=a[b];if(void 0===c)console.warn("THREE.Material: '"+b+"' parameter is undefined.");else{var d=this[b];void 0===d?console.warn("THREE."+this.type+": '"+b+"' is not a property of this material."):d instanceof THREE.Color?d.set(c):d instanceof THREE.Vector3&&c instanceof THREE.Vector3?d.copy(c):
2287this[b]="overdraw"===b?Number(c):c}}},toJSON:function(a){function b(a){var b=[],c;for(c in a){var d=a[c];delete d.metadata;b.push(d)}return b}var c=void 0===a;c&&(a={textures:{},images:{}});var d={metadata:{version:4.4,type:"Material",generator:"Material.toJSON"}};d.uuid=this.uuid;d.type=this.type;""!==this.name&&(d.name=this.name);this.color instanceof THREE.Color&&(d.color=this.color.getHex());.5!==this.roughness&&(d.roughness=this.roughness);.5!==this.metalness&&(d.metalness=this.metalness);this.emissive instanceof
2288THREE.Color&&(d.emissive=this.emissive.getHex());this.specular instanceof THREE.Color&&(d.specular=this.specular.getHex());void 0!==this.shininess&&(d.shininess=this.shininess);this.map instanceof THREE.Texture&&(d.map=this.map.toJSON(a).uuid);this.alphaMap instanceof THREE.Texture&&(d.alphaMap=this.alphaMap.toJSON(a).uuid);this.lightMap instanceof THREE.Texture&&(d.lightMap=this.lightMap.toJSON(a).uuid);this.bumpMap instanceof THREE.Texture&&(d.bumpMap=this.bumpMap.toJSON(a).uuid,d.bumpScale=this.bumpScale);
2289this.normalMap instanceof THREE.Texture&&(d.normalMap=this.normalMap.toJSON(a).uuid,d.normalScale=this.normalScale.toArray());this.displacementMap instanceof THREE.Texture&&(d.displacementMap=this.displacementMap.toJSON(a).uuid,d.displacementScale=this.displacementScale,d.displacementBias=this.displacementBias);this.roughnessMap instanceof THREE.Texture&&(d.roughnessMap=this.roughnessMap.toJSON(a).uuid);this.metalnessMap instanceof THREE.Texture&&(d.metalnessMap=this.metalnessMap.toJSON(a).uuid);
2290this.emissiveMap instanceof THREE.Texture&&(d.emissiveMap=this.emissiveMap.toJSON(a).uuid);this.specularMap instanceof THREE.Texture&&(d.specularMap=this.specularMap.toJSON(a).uuid);this.envMap instanceof THREE.Texture&&(d.envMap=this.envMap.toJSON(a).uuid,d.reflectivity=this.reflectivity);void 0!==this.size&&(d.size=this.size);void 0!==this.sizeAttenuation&&(d.sizeAttenuation=this.sizeAttenuation);void 0!==this.vertexColors&&this.vertexColors!==THREE.NoColors&&(d.vertexColors=this.vertexColors);
2291void 0!==this.shading&&this.shading!==THREE.SmoothShading&&(d.shading=this.shading);void 0!==this.blending&&this.blending!==THREE.NormalBlending&&(d.blending=this.blending);void 0!==this.side&&this.side!==THREE.FrontSide&&(d.side=this.side);1>this.opacity&&(d.opacity=this.opacity);!0===this.transparent&&(d.transparent=this.transparent);0<this.alphaTest&&(d.alphaTest=this.alphaTest);!0===this.premultipliedAlpha&&(d.premultipliedAlpha=this.premultipliedAlpha);!0===this.wireframe&&(d.wireframe=this.wireframe);
22921<this.wireframeLinewidth&&(d.wireframeLinewidth=this.wireframeLinewidth);c&&(c=b(a.textures),a=b(a.images),0<c.length&&(d.textures=c),0<a.length&&(d.images=a));return d},clone:function(){return(new this.constructor).copy(this)},copy:function(a){this.name=a.name;this.side=a.side;this.opacity=a.opacity;this.transparent=a.transparent;this.blending=a.blending;this.blendSrc=a.blendSrc;this.blendDst=a.blendDst;this.blendEquation=a.blendEquation;this.blendSrcAlpha=a.blendSrcAlpha;this.blendDstAlpha=a.blendDstAlpha;
2293this.blendEquationAlpha=a.blendEquationAlpha;this.depthFunc=a.depthFunc;this.depthTest=a.depthTest;this.depthWrite=a.depthWrite;this.colorWrite=a.colorWrite;this.precision=a.precision;
2293this.polygonOffset=a.polygonOffset;this.polygonOffsetFactor=a.polygonOffsetFactor;this.polygonOffsetUnits=a.polygonOffsetUnits;this.alphaTest=a.alphaTest;this.premultipliedAlpha=a.premultipliedAlpha;this.overdraw=a.overdraw;this.visible=a.visible;return this},update:function(){this.dispatchEvent({type:"update"})},dispose:function(){this.dispatchEvent({type:"dispose"})}};
2294THREE.EventDispatcher.prototype.apply(THREE.Material.prototype);THREE.MaterialIdCount=0;THREE.LineBasicMaterial=function(a){THREE.Material.call(this);this.type="LineBasicMaterial";this.color=new THREE.Color(16777215);this.linewidth=1;this.linejoin=this.linecap="round";this.blending=THREE.NormalBlending;this.vertexColors=THREE.NoColors;this.fog=!0;this.setValues(a)};THREE.LineBasicMaterial.prototype=Object.create(THREE.Material.prototype);THREE.LineBasicMaterial.prototype.constructor=THREE.LineBasicMaterial;
2295THREE.LineBasicMaterial.prototype.copy=function(a){THREE.Material.prototype.copy.call(this,a);this.color.copy(a.color);this.linewidth=a.linewidth;this.linecap=a.linecap;this.linejoin=a.linejoin;this.vertexColors=a.vertexColors;this.fog=a.fog;return this};
2296THREE.LineDashedMaterial=function(a){THREE.Material.call(this);this.type="LineDashedMaterial";this.color=new THREE.Color(16777215);this.scale=this.linewidth=1;this.dashSize=3;this.gapSize=1;this.blending=THREE.NormalBlending;this.vertexColors=THREE.NoColors;this.fog=!0;this.setValues(a)};THREE.LineDashedMaterial.prototype=Object.create(THREE.Material.prototype);THREE.LineDashedMaterial.prototype.constructor=THREE.LineDashedMaterial;
2297THREE.LineDashedMaterial.prototype.copy=function(a){THREE.Material.prototype.copy.call(this,a);this.color.copy(a.color);this.linewidth=a.linewidth;this.scale=a.scale;this.dashSize=a.dashSize;this.gapSize=a.gapSize;this.vertexColors=a.vertexColors;this.fog=a.fog;return this};
2298THREE.MeshBasicMaterial=function(a){THREE.Material.call(this);this.type="MeshBasicMaterial";this.color=new THREE.Color(16777215);this.aoMap=this.map=null;this.aoMapIntensity=1;this.envMap=this.alphaMap=this.specularMap=null;this.combine=THREE.MultiplyOperation;this.reflectivity=1;this.refractionRatio=.98;this.fog=!0;this.shading=THREE.SmoothShading;this.blending=THREE.NormalBlending;this.wireframe=!1;this.wireframeLinewidth=1;this.wireframeLinejoin=this.wireframeLinecap="round";this.vertexColors=
2299THREE.NoColors;this.morphTargets=this.skinning=!1;this.setValues(a)};THREE.MeshBasicMaterial.prototype=Object.create(THREE.Material.prototype);THREE.MeshBasicMaterial.prototype.constructor=THREE.MeshBasicMaterial;
2300THREE.MeshBasicMaterial.prototype.copy=function(a){THREE.Material.prototype.copy.call(this,a);this.color.copy(a.color);this.map=a.map;this.aoMap=a.aoMap;this.aoMapIntensity=a.aoMapIntensity;this.specularMap=a.specularMap;this.alphaMap=a.alphaMap;this.envMap=a.envMap;this.combine=a.combine;this.reflectivity=a.reflectivity;this.refractionRatio=a.refractionRatio;this.fog=a.fog;this.shading=a.shading;this.wireframe=a.wireframe;this.wireframeLinewidth=a.wireframeLinewidth;this.wireframeLinecap=a.wireframeLinecap;
2301this.wireframeLinejoin=a.wireframeLinejoin;this.vertexColors=a.vertexColors;this.skinning=a.skinning;this.morphTargets=a.morphTargets;return this};
2302THREE.MeshLambertMaterial=function(a){THREE.Material.call(this);this.type="MeshLambertMaterial";this.color=new THREE.Color(16777215);this.lightMap=this.map=null;this.lightMapIntensity=1;this.aoMap=null;this.aoMapIntensity=1;this.emissive=new THREE.Color(0);this.emissiveIntensity=1;this.envMap=this.alphaMap=this.specularMap=this.emissiveMap=null;this.combine=THREE.MultiplyOperation;this.reflectivity=1;this.refractionRatio=.98;this.fog=!0;this.blending=THREE.NormalBlending;this.wireframe=!1;this.wireframeLinewidth=
23031;this.wireframeLinejoin=this.wireframeLinecap="round";this.vertexColors=THREE.NoColors;this.morphNormals=this.morphTargets=this.skinning=!1;this.setValues(a)};THREE.MeshLambertMaterial.prototype=Object.create(THREE.Material.prototype);THREE.MeshLambertMaterial.prototype.constructor=THREE.MeshLambertMaterial;
2304THREE.MeshLambertMaterial.prototype.copy=function(a){THREE.Material.prototype.copy.call(this,a);this.color.copy(a.color);this.map=a.map;this.lightMap=a.lightMap;this.lightMapIntensity=a.lightMapIntensity;this.aoMap=a.aoMap;this.aoMapIntensity=a.aoMapIntensity;this.emissive.copy(a.emissive);this.emissiveMap=a.emissiveMap;this.emissiveIntensity=a.emissiveIntensity;this.specularMap=a.specularMap;this.alphaMap=a.alphaMap;this.envMap=a.envMap;this.combine=a.combine;this.reflectivity=a.reflectivity;this.refractionRatio=
2305a.refractionRatio;this.fog=a.fog;this.wireframe=a.wireframe;this.wireframeLinewidth=a.wireframeLinewidth;this.wireframeLinecap=a.wireframeLinecap;this.wireframeLinejoin=a.wireframeLinejoin;this.vertexColors=a.vertexColors;this.skinning=a.skinning;this.morphTargets=a.morphTargets;this.morphNormals=a.morphNormals;return this};
2306THREE.MeshPhongMaterial=function(a){THREE.Material.call(this);this.type="MeshPhongMaterial";this.color=new THREE.Color(16777215);this.specular=new THREE.Color(1118481);this.shininess=30;this.lightMap=this.map=null;this.lightMapIntensity=1;this.aoMap=null;this.aoMapIntensity=1;this.emissive=new THREE.Color(0);this.emissiveIntensity=1;this.bumpMap=this.emissiveMap=null;this.bumpScale=1;this.normalMap=null;this.normalScale=new THREE.Vector2(1,1);this.displacementMap=null;this.displacementScale=1;this.displacementBias=
23070;this.envMap=this.alphaMap=this.specularMap=null;this.combine=THREE.MultiplyOperation;this.reflectivity=1;this.refractionRatio=.98;this.fog=!0;this.shading=THREE.SmoothShading;this.blending=THREE.NormalBlending;this.wireframe=!1;this.wireframeLinewidth=1;this.wireframeLinejoin=this.wireframeLinecap="round";this.vertexColors=THREE.NoColors;this.morphNormals=this.morphTargets=this.skinning=!1;this.setValues(a)};THREE.MeshPhongMaterial.prototype=Object.create(THREE.Material.prototype);
2308THREE.MeshPhongMaterial.prototype.constructor=THREE.MeshPhongMaterial;
2309THREE.MeshPhongMaterial.prototype.copy=function(a){THREE.Material.prototype.copy.call(this,a);this.color.copy(a.color);this.specular.copy(a.specular);this.shininess=a.shininess;this.map=a.map;this.lightMap=a.lightMap;this.lightMapIntensity=a.lightMapIntensity;this.aoMap=a.aoMap;this.aoMapIntensity=a.aoMapIntensity;this.emissive.copy(a.emissive);this.emissiveMap=a.emissiveMap;this.emissiveIntensity=a.emissiveIntensity;this.bumpMap=a.bumpMap;this.bumpScale=a.bumpScale;this.normalMap=a.normalMap;this.normalScale.copy(a.normalScale);
2310this.displacementMap=a.displacementMap;this.displacementScale=a.displacementScale;this.displacementBias=a.displacementBias;this.specularMap=a.specularMap;this.alphaMap=a.alphaMap;this.envMap=a.envMap;this.combine=a.combine;this.reflectivity=a.reflectivity;this.refractionRatio=a.refractionRatio;this.fog=a.fog;this.shading=a.shading;this.wireframe=a.wireframe;this.wireframeLinewidth=a.wireframeLinewidth;this.wireframeLinecap=a.wireframeLinecap;this.wireframeLinejoin=a.wireframeLinejoin;this.vertexColors=
2311a.vertexColors;this.skinning=a.skinning;this.morphTargets=a.morphTargets;this.morphNormals=a.morphNormals;return this};
2312THREE.MeshStandardMaterial=function(a){THREE.Material.call(this);this.type="MeshStandardMaterial";this.color=new THREE.Color(16777215);this.metalness=this.roughness=.5;this.lightMap=this.map=null;this.lightMapIntensity=1;this.aoMap=null;this.aoMapIntensity=1;this.emissive=new THREE.Color(0);this.emissiveIntensity=1;this.bumpMap=this.emissiveMap=null;this.bumpScale=1;this.normalMap=null;this.normalScale=new THREE.Vector2(1,1);this.displacementMap=null;this.displacementScale=1;this.displacementBias=
23130;this.envMap=this.alphaMap=this.metalnessMap=this.roughnessMap=null;this.envMapIntensity=1;this.refractionRatio=.98;this.fog=!0;this.shading=THREE.SmoothShading;this.blending=THREE.NormalBlending;this.wireframe=!1;this.wireframeLinewidth=1;this.wireframeLinejoin=this.wireframeLinecap="round";this.vertexColors=THREE.NoColors;this.morphNormals=this.morphTargets=this.skinning=!1;this.setValues(a)};THREE.MeshStandardMaterial.prototype=Object.create(THREE.Material.prototype);
2314THREE.MeshStandardMaterial.prototype.constructor=THREE.MeshStandardMaterial;
2315THREE.MeshStandardMaterial.prototype.copy=function(a){THREE.Material.prototype.copy.call(this,a);this.color.copy(a.color);this.roughness=a.roughness;this.metalness=a.metalness;this.map=a.map;this.lightMap=a.lightMap;this.lightMapIntensity=a.lightMapIntensity;this.aoMap=a.aoMap;this.aoMapIntensity=a.aoMapIntensity;this.emissive.copy(a.emissive);this.emissiveMap=a.emissiveMap;this.emissiveIntensity=a.emissiveIntensity;this.bumpMap=a.bumpMap;this.bumpScale=a.bumpScale;this.normalMap=a.normalMap;this.normalScale.copy(a.normalScale);
2316this.displacementMap=a.displacementMap;this.displacementScale=a.displacementScale;this.displacementBias=a.displacementBias;this.roughnessMap=a.roughnessMap;this.metalnessMap=a.metalnessMap;this.alphaMap=a.alphaMap;this.envMap=a.envMap;this.envMapIntensity=a.envMapIntensity;this.refractionRatio=a.refractionRatio;this.fog=a.fog;this.shading=a.shading;this.wireframe=a.wireframe;this.wireframeLinewidth=a.wireframeLinewidth;this.wireframeLinecap=a.wireframeLinecap;this.wireframeLinejoin=a.wireframeLinejoin;
2317this.vertexColors=a.vertexColors;this.skinning=a.skinning;this.morphTargets=a.morphTargets;this.morphNormals=a.morphNormals;return this};THREE.MeshDepthMaterial=function(a){THREE.Material.call(this);this.type="MeshDepthMaterial";this.wireframe=this.morphTargets=!1;this.wireframeLinewidth=1;this.setValues(a)};THREE.MeshDepthMaterial.prototype=Object.create(THREE.Material.prototype);THREE.MeshDepthMaterial.prototype.constructor=THREE.MeshDepthMaterial;
2318THREE.MeshDepthMaterial.prototype.copy=function(a){THREE.Material.prototype.copy.call(this,a);this.wireframe=a.wireframe;this.wireframeLinewidth=a.wireframeLinewidth;return this};THREE.MeshNormalMaterial=function(a){THREE.Material.call(this,a);this.type="MeshNormalMaterial";this.wireframe=!1;this.wireframeLinewidth=1;this.morphTargets=!1;this.setValues(a)};THREE.MeshNormalMaterial.prototype=Object.create(THREE.Material.prototype);THREE.MeshNormalMaterial.prototype.constructor=THREE.MeshNormalMaterial;
2319THREE.MeshNormalMaterial.prototype.copy=function(a){THREE.Material.prototype.copy.call(this,a);this.wireframe=a.wireframe;this.wireframeLinewidth=a.wireframeLinewidth;return this};THREE.MultiMaterial=function(a){this.uuid=THREE.Math.generateUUID();this.type="MultiMaterial";this.materials=a instanceof Array?a:[];this.visible=!0};
2320THREE.MultiMaterial.prototype={constructor:THREE.MultiMaterial,toJSON:function(a){for(var b={metadata:{version:4.2,type:"material",generator:"MaterialExporter"}
2320,uuid:this.uuid,type:this.type,materials:[]},c=this.materials,d=0,e=c.length;d<e;d++){var f=c[d].toJSON(a);delete f.metadata;b.materials.push(f)}b.visible=this.visible;return b},clone:function(){for(var a=new this.constructor,b=0;b<this.materials.length;b++)a.materials.push(this.materials[b].clone());a.visible=this.visible;return a}};
2321THREE.PointsMaterial=function(a){THREE.Material.call(this);this.type="PointsMaterial";this.color=new THREE.Color(16777215);this.map=null;this.size=1;this.sizeAttenuation=!0;this.blending=THREE.NormalBlending;this.vertexColors=THREE.NoColors;this.fog=!0;this.setValues(a)};THREE.PointsMaterial.prototype=Object.create(THREE.Material.prototype);THREE.PointsMaterial.prototype.constructor=THREE.PointsMaterial;
2322THREE.PointsMaterial.prototype.copy=function(a){THREE.Material.prototype.copy.call(this,a);this.color.copy(a.color);this.map=a.map;this.size=a.size;this.sizeAttenuation=a.sizeAttenuation;this.vertexColors=a.vertexColors;this.fog=a.fog;return this};
2323THREE.ShaderMaterial=function(a){THREE.Material.call(this);this.type="ShaderMaterial";this.defines={};this.uniforms={};this.vertexShader="void main() {\n\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n}";this.fragmentShader="void main() {\n\tgl_FragColor = vec4( 1.0, 0.0, 0.0, 1.0 );\n}";this.shading=THREE.SmoothShading;this.linewidth=1;this.wireframe=!1;this.wireframeLinewidth=1;this.lights=this.fog=!1;this.vertexColors=THREE.NoColors;this.morphNormals=this.morphTargets=
2324this.skinning=!1;this.extensions={derivatives:!1,fragDepth:!1,drawBuffers:!1,shaderTextureLOD:!1};this.defaultAttributeValues={color:[1,1,1],uv:[0,0],uv2:[0,0]};this.index0AttributeName=void 0;void 0!==a&&(void 0!==a.attributes&&console.error("THREE.ShaderMaterial: attributes should now be defined in THREE.BufferGeometry instead."),this.setValues(a))};THREE.ShaderMaterial.prototype=Object.create(THREE.Material.prototype);THREE.ShaderMaterial.prototype.constructor=THREE.ShaderMaterial;
2325THREE.ShaderMaterial.prototype.copy=function(a){THREE.Material.prototype.copy.call(this,a);this.fragmentShader=a.fragmentShader;this.vertexShader=a.vertexShader;this.uniforms=THREE.UniformsUtils.clone(a.uniforms);this.defines=a.defines;this.shading=a.shading;this.wireframe=a.wireframe;this.wireframeLinewidth=a.wireframeLinewidth;this.fog=a.fog;this.lights=a.lights;this.vertexColors=a.vertexColors;this.skinning=a.skinning;this.morphTargets=a.morphTargets;this.morphNormals=a.morphNormals;this.extensions=
2326a.extensions;return this};THREE.ShaderMaterial.prototype.toJSON=function(a){a=THREE.Material.prototype.toJSON.call(this,a);a.uniforms=this.uniforms;a.vertexShader=this.vertexShader;a.fragmentShader=this.fragmentShader;return a};THREE.RawShaderMaterial=function(a){THREE.ShaderMaterial.call(this,a);this.type="RawShaderMaterial"};THREE.RawShaderMaterial.prototype=Object.create(THREE.ShaderMaterial.prototype);THREE.RawShaderMaterial.prototype.constructor=THREE.RawShaderMaterial;
2327THREE.SpriteMaterial=function(a){THREE.Material.call(this);this.type="SpriteMaterial";this.color=new THREE.Color(16777215);this.map=null;this.rotation=0;this.fog=!1;this.setValues(a)};THREE.SpriteMaterial.prototype=Object.create(THREE.Material.prototype);THREE.SpriteMaterial.prototype.constructor=THREE.SpriteMaterial;THREE.SpriteMaterial.prototype.copy=function(a){THREE.Material.prototype.copy.call(this,a);this.color.copy(a.color);this.map=a.map;this.rotation=a.rotation;this.fog=a.fog;return this};
2328THREE.Texture=function(a,b,c,d,e,f,g,h,k){Object.defineProperty(this,"id",{value:THREE.TextureIdCount++});this.uuid=THREE.Math.generateUUID();this.sourceFile=this.name="";this.image=void 0!==a?a:THREE.Texture.DEFAULT_IMAGE;this.mipmaps=[];this.mapping=void 0!==b?b:THREE.Texture.DEFAULT_MAPPING;this.wrapS=void 0!==c?c:THREE.ClampToEdgeWrapping;this.wrapT=void 0!==d?d:THREE.ClampToEdgeWrapping;this.magFilter=void 0!==e?e:THREE.LinearFilter;this.minFilter=void 0!==f?f:THREE.LinearMipMapLinearFilter;
2329this.anisotropy=void 0!==k?k:1;this.format=void 0!==g?g:THREE.RGBAFormat;this.type=void 0!==h?h:THREE.UnsignedByteType;this.offset=new THREE.Vector2(0,0);this.repeat=new THREE.Vector2(1,1);this.generateMipmaps=!0;this.premultiplyAlpha=!1;this.flipY=!0;this.unpackAlignment=4;this.encoding=THREE.LinearEncoding;this.version=0;this.onUpdate=null};THREE.Texture.DEFAULT_IMAGE=void 0;THREE.Texture.DEFAULT_MAPPING=THREE.UVMapping;
2330THREE.Texture.prototype={constructor:THREE.Texture,set needsUpdate(a){!0===a&&this.version++},clone:function(){return(new this.constructor).copy(this)},copy:function(a){this.image=a.image;this.mipmaps=a.mipmaps.slice(0);this.mapping=a.mapping;this.wrapS=a.wrapS;this.wrapT=a.wrapT;this.magFilter=a.magFilter;this.minFilter=a.minFilter;this.anisotropy=a.anisotropy;this.format=a.format;this.type=a.type;this.offset.copy(a.offset);this.repeat.copy(a.repeat);this.generateMipmaps=a.generateMipmaps;this.premultiplyAlpha=
2331a.premultiplyAlpha;this.flipY=a.flipY;this.unpackAlignment=a.unpackAlignment;this.encoding=a.encoding;return this}
2331,toJSON:function(a){if(void 0!==a.textures[this.uuid])return a.textures[this.uuid];var b={metadata:{version:4.4,type:"Texture",generator:"Texture.toJSON"},uuid:this.uuid,name:this.name,mapping:this.mapping,repeat:[this.repeat.x,this.repeat.y],offset:[this.offset.x,this.offset.y],wrap:[this.wrapS,this.wrapT],minFilter:this.minFilter,magFilter:this.magFilter,anisotropy:this.anisotropy};
2332if(void 0!==this.image){var c=this.image;void 0===c.uuid&&(c.uuid=THREE.Math.generateUUID());if(void 0===a.images[c.uuid]){var d=a.images,e=c.uuid,f=c.uuid,g;void 0!==c.toDataURL?g=c:(g=document.createElement("canvas"),g.width=c.width,g.height=c.height,g.getContext("2d").drawImage(c,0,0,c.width,c.height));g=2048<g.width||2048<g.height?g.toDataURL("image/jpeg",.6):g.toDataURL("image/png");d[e]={uuid:f,url:g}}b.image=c.uuid}return a.textures[this.uuid]=b},dispose:function(){this.dispatchEvent({type:"dispose"})},
2333transformUv:function(a){if(this.mapping===THREE.UVMapping){a.multiply(this.repeat);a.add(this.offset);if(0>a.x||1<a.x)switch(this.wrapS){case THREE.RepeatWrapping:a.x-=Math.floor(a.x);break;case THREE.ClampToEdgeWrapping:a.x=0>a.x?0:1;break;case THREE.MirroredRepeatWrapping:1===Math.abs(Math.floor(a.x)%2)?a.x=Math.ceil(a.x)-a.x:a.x-=Math.floor(a.x)}if(0>a.y||1<a.y)switch(this.wrapT){case THREE.RepeatWrapping:a.y-=Math.floor(a.y);break;case THREE.ClampToEdgeWrapping:a.y=0>a.y?0:1;break;case THREE.MirroredRepeatWrapping:1===
2334Math.abs(Math.floor(a.y)%2)?a.y=Math.ceil(a.y)-a.y:a.y-=Math.floor(a.y)}this.flipY&&(a.y=1-a.y)}}};THREE.EventDispatcher.prototype.apply(THREE.Texture.prototype);THREE.TextureIdCount=0;THREE.CanvasTexture=function(a,b,c,d,e,f,g,h,k){THREE.Texture.call(this,a,b,c,d,e,f,g,h,k);this.needsUpdate=!0};THREE.CanvasTexture.prototype=Object.create(THREE.Texture.prototype);THREE.CanvasTexture.prototype.constructor=THREE.CanvasTexture;
2335THREE.CubeTexture=function(a,b,c,d,e,f,g,h,k){a=void 0!==a?a:[];b=void 0!==b?b:THREE.CubeReflectionMapping;THREE.Texture.call(this,a,b,c,d,e,f,g,h,k);this.flipY=!1};THREE.CubeTexture.prototype=Object.create(THREE.Texture.prototype);THREE.CubeTexture.prototype.constructor=THREE.CubeTexture;Object.defineProperty(THREE.CubeTexture.prototype,"images",{get:function(){return this.image},set:function(a){this.image=a}});
2336THREE.CompressedTexture=function(a,b,c,d,e,f,g,h,k,l,p){THREE.Texture.call(this,null,f,g,h,k,l,d,e,p);this.image={width:b,height:c};this.mipmaps=a;this.generateMipmaps=this.flipY=!1};THREE.CompressedTexture.prototype=Object.create(THREE.Texture.prototype);THREE.CompressedTexture.prototype.constructor=THREE.CompressedTexture;
2337THREE.DataTexture=function(a,b,c,d,e,f,g,h,k,l,p){THREE.Texture.call(this,null,f,g,h,k,l,d,e,p);this.image={data:a,width:b,height:c};this.magFilter=void 0!==k?k:THREE.NearestFilter;this.minFilter=void 0!==l?l:THREE.NearestFilter;this.generateMipmaps=this.flipY=!1};THREE.DataTexture.prototype=Object.create(THREE.Texture.prototype);THREE.DataTexture.prototype.constructor=THREE.DataTexture;
2338THREE.VideoTexture=function(a,b,c,d,e,f,g,h,k){function l(){requestAnimationFrame(l);a.readyState===a.HAVE_ENOUGH_DATA&&(p.needsUpdate=!0)}THREE.Texture.call(this,a,b,c,d,e,f,g,h,k);this.generateMipmaps=!1;var p=this;l()};THREE.VideoTexture.prototype=Object.create(THREE.Texture.prototype);THREE.VideoTexture.prototype.constructor=THREE.VideoTexture;THREE.Group=function(){THREE.Object3D.call(this);this.type="Group"};THREE.Group.prototype=Object.create(THREE.Object3D.prototype);
2339THREE.Group.prototype.constructor=THREE.Group;THREE.Points=function(a,b){THREE.Object3D.call(this);this.type="Points";this.geometry=void 0!==a?a:new THREE.Geometry;this.material=void 0!==b?b:new THREE.PointsMaterial({color:16777215*Math.random()})};THREE.Points.prototype=Object.create(THREE.Object3D.prototype);THREE.Points.prototype.constructor=THREE.Points;
2340THREE.Points.prototype.raycast=function(){var a=new THREE.Matrix4,b=new THREE.Ray,c=new THREE.Sphere;return function(d,e){function f(a,c){var f=b.distanceSqToPoint(a);if(f<p){var h=b.closestPointToPoint(a);h.applyMatrix4(k);var l=d.ray.origin.distanceTo(h);l<d.near||l>d.far||e.push({distance:l,distanceToRay:Math.sqrt(f),point:h.clone(),index:c,face:null,object:g})}}var g=this,h=this.geometry,k=this.matrixWorld,l=d.params.Points.threshold;null===h.boundingSphere&&h.computeBoundingSphere();c.copy(h.boundingSphere);
2341c.applyMatrix4(k);if(!1!==d.ray.intersectsSphere(c)){a.getInverse(k);b.copy(d.ray).applyMatrix4(a);var l=l/((this.scale.x+this.scale.y+this.scale.z)/3),p=l*l,l=new THREE.Vector3;if(h instanceof THREE.BufferGeometry){var n=h.index,h=h.attributes.position.array;if(null!==n)for(var m=n.array,n=0,q=m.length;n<q;n++){var u=m[n];l.fromArray(h,3*u);f(l,u)}else for(n=0,m=h.length/3;n<m;n++)l.fromArray(h,3*n),f(l,n)}else for(l=h.vertices,n=0,m=l.length;n<m;n++)f(l[n],n)}}}();
2342THREE.Points.prototype.clone=function(){return(new this.constructor(this.geometry,this.material)).copy(this)};THREE.Line=function(a,b,c){if(1===c)return console.warn("THREE.Line: parameter THREE.LinePieces no longer supported. Created THREE.LineSegments instead."),new THREE.LineSegments(a,b);THREE.Object3D.call(this);this.type="Line";this.geometry=void 0!==a?a:new THREE.Geometry;this.material=void 0!==b?b:new THREE.LineBasicMaterial({color:16777215*Math.random()})};THREE.Line.prototype=Object.create(THREE.Object3D.prototype);
2343THREE.Line.prototype.constructor=THREE.Line;
2344THREE.Line.prototype.raycast=function(){var a=new THREE.Matrix4,b=new THREE.Ray,c=new THREE.Sphere;
2344return function(d,e){var f=d.linePrecision,f=f*f,g=this.geometry,h=this.matrixWorld;null===g.boundingSphere&&g.computeBoundingSphere();c.copy(g.boundingSphere);c.applyMatrix4(h);if(!1!==d.ray.intersectsSphere(c)){a.getInverse(h);b.copy(d.ray).applyMatrix4(a);var k=new THREE.Vector3,l=new THREE.Vector3,h=new THREE.Vector3,p=new THREE.Vector3,n=this instanceof THREE.LineSegments?2:1;if(g instanceof THREE.BufferGeometry){var m=
2345g.index,q=g.attributes.position.array;if(null!==m)for(var m=m.array,g=0,u=m.length-1;g<u;g+=n){var v=m[g+1];k.fromArray(q,3*m[g]);l.fromArray(q,3*v);v=b.distanceSqToSegment(k,l,p,h);v>f||(p.applyMatrix4(this.matrixWorld),v=d.ray.origin.distanceTo(p),v<d.near||v>d.far||e.push({distance:v,point:h.clone().applyMatrix4(this.matrixWorld),index:g,face:null,faceIndex:null,object:this}))}else for(g=0,u=q.length/3-1;g<u;g+=n)k.fromArray(q,3*g),l.fromArray(q,3*g+3),v=b.distanceSqToSegment(k,l,p,h),v>f||(p.applyMatrix4(this.matrixWorld),
2346v=d.ray.origin.distanceTo(p),v<d.near||v>d.far||e.push({distance:v,point:h.clone().applyMatrix4(this.matrixWorld),index:g,face:null,faceIndex:null,object:this}))}else if(g instanceof THREE.Geometry)for(k=g.vertices,l=k.length,g=0;g<l-1;g+=n)v=b.distanceSqToSegment(k[g],k[g+1],p,h),v>f||(p.applyMatrix4(this.matrixWorld),v=d.ray.origin.distanceTo(p),v<d.near||v>d.far||e.push({distance:v,point:h.clone().applyMatrix4(this.matrixWorld),index:g,face:null,faceIndex:null,object:this}))}}}();
2347THREE.Line.prototype.clone=function(){return(new this.constructor(this.geometry,this.material)).copy(this)};THREE.LineStrip=0;THREE.LinePieces=1;THREE.LineSegments=function(a,b){THREE.Line.call(this,a,b);this.type="LineSegments"};THREE.LineSegments.prototype=Object.create(THREE.Line.prototype);THREE.LineSegments.prototype.constructor=THREE.LineSegments;
2348THREE.Mesh=function(a,b){THREE.Object3D.call(this);this.type="Mesh";this.geometry=void 0!==a?a:new THREE.Geometry;this.material=void 0!==b?b:new THREE.MeshBasicMaterial({color:16777215*Math.random()});this.drawMode=THREE.TrianglesDrawMode;this.updateMorphTargets()};THREE.Mesh.prototype=Object.create(THREE.Object3D.prototype);THREE.Mesh.prototype.constructor=THREE.Mesh;THREE.Mesh.prototype.setDrawMode=function(a){this.drawMode=a};
2349THREE.Mesh.prototype.updateMorphTargets=function(){if(void 0!==this.geometry.morphTargets&&0<this.geometry.morphTargets.length){this.morphTargetBase=-1;this.morphTargetInfluences=[];this.morphTargetDictionary={};for(var a=0,b=this.geometry.morphTargets.length;a<b;a++)this.morphTargetInfluences.push(0),this.morphTargetDictionary[this.geometry.morphTargets[a].name]=a}};
2350THREE.Mesh.prototype.getMorphTargetIndexByName=function(a){if(void 0!==this.morphTargetDictionary[a])return this.morphTargetDictionary[a];console.warn("THREE.Mesh.getMorphTargetIndexByName: morph target "+a+" does not exist. Returning 0.");return 0};
2351THREE.Mesh.prototype.raycast=function(){function a(a,b,c,d,e,f,g){THREE.Triangle.barycoordFromPoint(a,b,c,d,v);e.multiplyScalar(v.x);f.multiplyScalar(v.y);g.multiplyScalar(v.z);e.add(f).add(g);return e.clone()}function b(a,b,c,d,e,f,g){var h=a.material;if(null===(h.side===THREE.BackSide?c.intersectTriangle(f,e,d,!0,g):c.intersectTriangle(d,e,f,h.side!==THREE.DoubleSide,g)))return null;s.copy(g);s.applyMatrix4(a.matrixWorld);c=b.ray.origin.distanceTo(s);return c<b.near||c>b.far?null:{distance:c,point:s.clone(),
2352object:a}}function c(c,d,e,f,l,p,n,s){g.fromArray(f,3*p);h.fromArray(f,3*n);k.fromArray(f,3*s);if(c=b(c,d,e,g,h,k,t))l&&(m.fromArray(l,2*p),q.fromArray(l,2*n),u.fromArray(l,2*s),c.uv=a(t,g,h,k,m,q,u)),c.face=new THREE.Face3(p,n,s,THREE.Triangle.normal(g,h,k)),c.faceIndex=p;return c}var d=new THREE.Matrix4,e=new THREE.Ray,f=new THREE.Sphere,g=new THREE.Vector3,h=new THREE.Vector3,k=new THREE.Vector3,l=new THREE.Vector3,p=new THREE.Vector3,n=new THREE.Vector3,m=new THREE.Vector2,q=new THREE.Vector2,
2353u=new THREE.Vector2,v=new THREE.Vector3,t=new THREE.Vector3,s=new THREE.Vector3;return function(s,v){var x=this.geometry,D=this.material,z=this.matrixWorld;if(void 0!==D&&(null===x.boundingSphere&&x.computeBoundingSphere(),f.copy(x.boundingSphere),f.applyM
2353atrix4(z),!1!==s.ray.intersectsSphere(f)&&(d.getInverse(z),e.copy(s.ray).applyMatrix4(d),null===x.boundingBox||!1!==e.intersectsBox(x.boundingBox)))){var y,B;if(x instanceof THREE.BufferGeometry){var G,F,D=x.index,z=x.attributes,x=z.position.array;
2354void 0!==z.uv&&(y=z.uv.array);if(null!==D)for(var z=D.array,H=0,L=z.length;H<L;H+=3){if(D=z[H],G=z[H+1],F=z[H+2],B=c(this,s,e,x,y,D,G,F))B.faceIndex=Math.floor(H/3),v.push(B)}else for(H=0,L=x.length;H<L;H+=9)if(D=H/3,G=D+1,F=D+2,B=c(this,s,e,x,y,D,G,F))B.index=D,v.push(B)}else if(x instanceof THREE.Geometry){var A,N,z=D instanceof THREE.MultiMaterial,H=!0===z?D.materials:null,L=x.vertices;G=x.faces;F=x.faceVertexUvs[0];0<F.length&&(y=F);for(var M=0,I=G.length;M<I;M++){var O=G[M];B=!0===z?H[O.materialIndex]:
2355D;if(void 0!==B){F=L[O.a];A=L[O.b];N=L[O.c];if(!0===B.morphTargets){B=x.morphTargets;var Q=this.morphTargetInfluences;g.set(0,0,0);h.set(0,0,0);k.set(0,0,0);for(var P=0,T=B.length;P<T;P++){var J=Q[P];if(0!==J){var C=B[P].vertices;g.addScaledVector(l.subVectors(C[O.a],F),J);h.addScaledVector(p.subVectors(C[O.b],A),J);k.addScaledVector(n.subVectors(C[O.c],N),J)}}g.add(F);h.add(A);k.add(N);F=g;A=h;N=k}if(B=b(this,s,e,F,A,N,t))y&&(Q=y[M],m.copy(Q[0]),q.copy(Q[1]),u.copy(Q[2]),B.uv=a(t,F,A,N,m,q,u)),B.face=
2356O,B.faceIndex=M,v.push(B)}}}}}}();THREE.Mesh.prototype.clone=function(){return(new this.constructor(this.geometry,this.material)).copy(this)};THREE.Bone=function(a){THREE.Object3D.call(this);this.type="Bone";this.skin=a};THREE.Bone.prototype=Object.create(THREE.Object3D.prototype);THREE.Bone.prototype.constructor=THREE.Bone;THREE.Bone.prototype.copy=function(a){THREE.Object3D.prototype.copy.call(this,a);this.skin=a.skin;return this};
2357THREE.Skeleton=function(a,b,c){this.useVertexTexture=void 0!==c?c:!0;this.identityMatrix=new THREE.Matrix4;a=a||[];this.bones=a.slice(0);this.useVertexTexture?(a=Math.sqrt(4*this.bones.length),a=THREE.Math.nextPowerOfTwo(Math.ceil(a)),this.boneTextureHeight=this.boneTextureWidth=a=Math.max(a,4),this.boneMatrices=new Float32Array(this.boneTextureWidth*this.boneTextureHeight*4),this.boneTexture=new THREE.DataTexture(this.boneMatrices,this.boneTextureWidth,this.boneTextureHeight,THREE.RGBAFormat,THREE.FloatType)):
2358this.boneMatrices=new Float32Array(16*this.bones.length);if(void 0===b)this.calculateInverses();else if(this.bones.length===b.length)this.boneInverses=b.slice(0);else for(console.warn("THREE.Skeleton bonInverses is the wrong length."),this.boneInverses=[],b=0,a=this.bones.length;b<a;b++)this.boneInverses.push(new THREE.Matrix4)};
2359THREE.Skeleton.prototype.calculateInverses=function(){this.boneInverses=[];for(var a=0,b=this.bones.length;a<b;a++){var c=new THREE.Matrix4;this.bones[a]&&c.getInverse(this.bones[a].matrixWorld);this.boneInverses.push(c)}};
2360THREE.Skeleton.prototype.pose=function(){for(var a,b=0,c=this.bones.length;b<c;b++)(a=this.bones[b])&&a.matrixWorld.getInverse(this.boneInverses[b]);b=0;for(c=this.bones.length;b<c;b++)if(a=this.bones[b])a.parent?(a.matrix.getInverse(a.parent.matrixWorld),a.matrix.multiply(a.matrixWorld)):a.matrix.copy(a.matrixWorld),a.matrix.decompose(a.position,a.quaternion,a.scale)};
2361THREE.Skeleton.prototype.update=function(){var a=new THREE.Matrix4;return function(){for(var b=0,c=this.bones.length;b<c;b++)a.multiplyMatrices(this.bones[b]?this.bones[b].matrixWorld:this.identityMatrix,this.boneInverses[b]),a.flattenToArrayOffset(this.boneMatrices,16*b);this.useVertexTexture&&(this.boneTexture.needsUpdate=!0)}}();THREE.Skeleton.prototype.clone=function(){return new THREE.Skeleton(this.bones,this.boneInverses,this.useVertexTexture)};
2362THREE.SkinnedMesh=function(a,b,c){THREE.Mesh.call(this,a,b);this.type="SkinnedMesh";this.bindMode="attached";this.bindMatrix=new THREE.Matrix4;this.bindMatrixInverse=new THREE.Matrix4;a=[];if(this.geometry&&void 0!==this.geometry.bones){for(var d,e=0,f=this.geometry.bones.length;e<f;++e)d=this.geometry.bones[e],b=new THREE.Bone(this),a.push(b),b.name=d.name,b.position.fromArray(d.pos),b.quaternion.fromArray(d.rotq),void 0!==d.scl&&b.scale.fromArray(d.scl);e=0;for(f=this.geometry.bones.length;e<f;++e)d=
2363this.geometry.bones[e],-1!==d.parent&&null!==d.parent?a[d.parent].add(a[e]):this.add(a[e])}this.normalizeSkinWeights();this.updateMatrixWorld(!0);this.bind(new THREE.Skeleton(a,void 0,c),this.matrixWorld)};THREE.SkinnedMesh.prototype=Object.create(THREE.Mesh.prototype);THREE.SkinnedMesh.prototype.constructor=THREE.SkinnedMesh;
2364THREE.SkinnedMesh.prototype.bind=function(a,b){this.skeleton=a;void 0===b&&(this.updateMatrixWorld(!0),this.skeleton.calculateInverses(),b=this.matrixWorld);this.bindMatrix.copy(b);this.bindMatrixInverse.getInverse(b)};THREE.SkinnedMesh.prototype.pose=function(){this.skeleton.pose()};
2365THREE.SkinnedMesh.prototype.normalizeSkinWeights=function(){if(this.geometry instanceof THREE.Geometry)for(var a=0;a<this.geometry.skinWeights.length;a++){var b=this.geometry.skinWeights[a],c=1/b.lengthManhattan();Infinity!==c?b.multiplyScalar(c):b.set(1,0,0,0)}else if(this.geometry instanceof THREE.BufferGeometry)for(var b=new THREE.Vector4,d=this.geometry.attributes.skinWeight,a=0;a<d.count;a++)b.x=d.getX(a),b.y=d.getY(a),b.z=d.getZ(a),b.w=d.getW(a),c=1/b.lengthManhattan(),Infinity!==c?b.multiplyScalar(c):
2366b.set(1,0,0,0),d.setXYZW(a,b.x,b.y,b.z,b.w)};THREE.SkinnedMesh.prototype.updateMatrixWorld=function(a){THREE.Mesh.prototype.updateMatrixWorld.call(this,!0);"attached"===this.bindMode?this.bindMatrixInverse.getInverse(this.matrixWorld):"detached"===this.bindMode?this.bindMatrixInverse.getInverse(this.bindMatrix):console.warn("THREE.SkinnedMesh unrecognized bindMode: "+this.bindMode)};THREE.SkinnedMesh.prototype.clone=function(){return(new this.constructor(this.geometry,this.material,this.useVertexTexture)).copy(this)};
2367THREE.LOD=function(){THREE.Object3D.call(this);this.type="LOD";Object.defineProperties(this,{levels:{enumerable:!0,value:[]},objects:{get:function(){console.warn("THREE.LOD: .objects has been renamed to .levels.");return this.levels}}})};THREE.LOD.prototype=Object.create(THREE.Object3D.prototype);THREE.LOD.prototype.constructor=THREE.LOD;
2368THREE.LOD.prototype.addLevel=function(a,b){void 0===b&&(b=0);b=Math.abs(b);for(var c=this.levels,d=0;d<c.length&&!(b<c[d].distance);d++);c.splice(d,0,{distance:b,object:a});this.add(a)};THREE.LOD.prototype.getObjectForDistance=function(a){for(var b=this.levels,c=1,d=b.length;c<d&&!(a<b[c].distance);c++);return b[c-1].object};
2369THREE.LOD.prototype.raycast=function(){var a=new THREE.Vector3;return function(b,c){a.setFromMatrixPosition(this.matrixWorld);var d=b.ray.origin.distanceTo(a);this.getObjectForDistance(d).raycast(b,c)}}();
2370THREE.LOD.prototype.update=function(){var a=new THREE.Vector3,b=new THREE.Vector3;return function(c){var d=this.levels;if(1<d.length){a.setFromMatrixPosition(c.matrixWorld);b.setFromMatrixPosition(this.matrixWorld);c=a.distanceTo(b);d[0].object.visible=!0;for(var e=1,f=d.length;e<f;e++)if(c>=d[e].distance)d[e-1].object.visible=!1,d[e].object.visible=!0;else break;for(;e<f;e++)d[e].object.visible=!1}}}();
2371THREE.LOD.prototype.copy=function(a){THREE.Object3D.prototype.copy.call(this,a,!1);a=a.levels;for(var b=0,c=a.length;b<c;b++){var d=a[b];this.addLevel(d.object.clone(),d.distance)}return this};THREE.LOD.prototype.toJSON=function(a){a=THREE.Object3D.prototype.toJSON.call(this,a);a.object.levels=[];for(var b=this.levels,c=0,d=b.length;c<d;c++){var e=b[c];a.object.levels.push({object:e.object.uuid,distance:e.distance})}return a};
2372THREE.Sprite=function(){var a=new Uint16Array([0,1,2,0,2,3]),b=new Float32Array([-.5,-.5,0,.5,-.5,0,.5,.5,0,-.5,.5,0]),c=new Float32Array([0,0,1,0,1,1,0,1]),d=new THREE.BufferGeometry;d.setIndex(new THREE.BufferAttribute(a,1));d.addAttribute("position",new THREE.BufferAttribute(b,3));d.addAttribute("uv",new THREE.BufferAttribute(c,2));return function(a){THREE.Object3D.call(this);this.type="Sprite";this.geometry=d;this.material=void 0!==a?a:new THREE.SpriteMaterial}}();THREE.Sprite.prototype=Object.create(THREE.Object3D.prototype);
2373THREE.Sprite.prototype.constructor=THREE.Sprite;THREE.Sprite.prototype.raycast=function(){var a=new THREE.Vector3;return function(b,c){a.setFromMatrixPosition(this.matrixWorld);var d=b.ray.distanceSqToPoint(a);d>this.scale.x*this.scale.y||c.push({distance:Math.sqrt(d),point:this.position,face:null,object:this})}}();THREE.Sprite.prototype.clone=function(){return(new this.constructor(this.material)).copy(this)};THREE.Particle=THREE.Sprite;
2374THREE.LensFlare=function(a,b,c,d,e){THREE.Object3D.call(this);this.lensFlares=[];this.positionScreen=new THREE.Vector3;this.customUpdateCallback=void 0;void 0!==a&&this.add(a,b,c,d,e)};THREE.LensFlare.prototype=Object.create(THREE.Object3D.prototype);THREE.LensFlare.prototype.constructor=THREE.LensFlare;
2375THREE.LensFlare.prototype.add=function(a,b,c,d,e,f){void 0===b&&(b=-1);void 0===c&&(c=0);void 0===f&&(f=1);void 0===e&&(e=new THREE.Color(16777215));void 0===d&&(d=THREE.NormalBlending);c=Math.min(c,Math.max(0,c));this.lensFlares.push({texture:a,size:b,distance:c,x:0,y:0,z:0,scale:1,rotation:0,opacity:f,color:e,blending:d})};
2376THREE.LensFlare.prototype.updateLensFlares=function(){var a,b=this.lensFlares.length,c,d=2*-this.positionScreen.x,e=2*-this.positionScreen.y;for(a=0;a<b;a++)c=this.lensFlares[a],c.x=this.positionScreen.x+d*c.distance,c.y=this.positionScreen.y+e*c.distance,c.wantedRotation=c.x*Math.PI*.25,c.rotation+=.25*(c.wantedRotation-c.rotation)};
2377THREE.LensFlare.prototype.copy=function(a){THREE.Object3D.prototype.copy.call(this,a);this.positionScreen.copy(a.positionScreen);this.customUpdateCallback=a.customUpdateCallback;for(var b=0,c=a.lensFlares.length;b<c;b++)this.lensFlares.push(a.lensFlares[b]);return this};THREE.Scene=function(){THREE.Object3D.call(this);this.type="Scene";this.overrideMaterial=this.fog=null;this.autoUpdate=!0};THREE.Scene.prototype=Object.create(THREE.Object3D.prototype);THREE.Scene.prototype.constructor=THREE.Scene;
2378THREE.Scene.prototype.copy=function(a,b){THREE.Object3D.prototype.copy.call(this,a,b);null!==a.fog&&(this.fog=a.fog.clone());null!==a.overrideMaterial&&(this.overrideMaterial=a.overrideMaterial.clone());this.autoUpdate=a.autoUpdate;this.matrixAutoUpdate=a.matrixAutoUpdate;return this};THREE.Fog=function(a,b,c){this.name="";this.color=new THREE.Color(a);this.near=void 0!==b?b:1;this.far=void 0!==c?c:1E3};THREE.Fog.prototype.clone=function(){return new THREE.Fog(this.color.getHex(),this.near,this.far)};
2379THREE.FogExp2=function(a,b){this.name="";this.color=new THREE.Color(a);this.density=void 0!==b?b:2.5E-4};THREE.FogExp2.prototype.clone=function(){return new THREE.FogExp2(this.color.getHex(),this.density)};THREE.ShaderChunk={};THREE.ShaderChunk.alphamap_fragment="#ifdef USE_ALPHAMAP\n\tdiffuseColor.a *= texture2D( alphaMap, vUv ).g;\n#endif\n";THREE.ShaderChunk.alphamap_pars_fragment="#ifdef USE_ALPHAMAP\n\tuniform sampler2D alphaMap;\n#endif\n";THREE.ShaderChunk.alphatest_fragment="#ifdef ALPHATEST\n\tif ( diffuseColor.a < ALPHATEST ) discard;\n#endif\n";
2380THREE.ShaderChunk.aomap_fragment="#ifdef USE_AOMAP\n\tfloat ambientOcclusion = ( texture2D( aoMap, vUv2 ).r - 1.0 ) * aoMapIntensity + 1.0;\n\treflectedLight.indirectDiffuse *= ambientOcclusion;\n\t#if defined( USE_ENVMAP ) && defined( STANDARD )\n\t\tfloat dotNV = saturate( dot
2380( geometry.normal, geometry.viewDir ) );\n\t\treflectedLight.indirectSpecular *= computeSpecularOcclusion( dotNV, ambientOcclusion, material.specularRoughness );\n\t#endif\n#endif\n";THREE.ShaderChunk.aomap_pars_fragment="#ifdef USE_AOMAP\n\tuniform sampler2D aoMap;\n\tuniform float aoMapIntensity;\n#endif";
2381THREE.ShaderChunk.begin_vertex="\nvec3 transformed = vec3( position );\n";THREE.ShaderChunk.beginnormal_vertex="\nvec3 objectNormal = vec3( normal );\n";THREE.ShaderChunk.bsdfs="bool testLightInRange( const in float lightDistance, const in float cutoffDistance ) {\n\treturn any( bvec2( cutoffDistance == 0.0, lightDistance < cutoffDistance ) );\n}\nfloat punctualLightIntensityToIrradianceFactor( const in float lightDistance, const in float cutoffDistance, const in float decayExponent ) {\n\t\tif( decayExponent > 0.0 ) {\n#if defined ( PHYSICALLY_CORRECT_LIGHTS )\n\t\t\tfloat distanceFalloff = 1.0 / max( pow( lightDistance, decayExponent ), 0.01 );\n\t\t\tfloat maxDistanceCutoffFactor = pow2( saturate( 1.0 - pow4( lightDistance / cutoffDistance ) ) );\n\t\t\treturn distanceFalloff * maxDistanceCutoffFactor;
2381\n#else\n\t\t\treturn pow( saturate( -lightDistance / cutoffDistance + 1.0 ), decayExponent );\n#endif\n\t\t}\n\t\treturn 1.0;\n}\nvec3 BRDF_Diffuse_Lambert( const in vec3 diffuseColor ) {\n\treturn RECIPROCAL_PI * diffuseColor;\n}\nvec3 F_Schlick( const in vec3 specularColor, const in float dotLH ) {\n\tfloat fresnel = exp2( ( -5.55473 * dotLH - 6.98316 ) * dotLH );\n\treturn ( 1.0 - specularColor ) * fresnel + specularColor;\n}\nfloat G_GGX_Smith( const in float alpha, const in float dotNL, const in float dotNV ) {\n\tfloat a2 = pow2( alpha );\n\tfloat gl = dotNL + sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) );\n\tfloat gv = dotNV + sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) );\n\treturn 1.0 / ( gl * gv );\n}\nfloat 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 );
2381\n\tfloat G = G_GGX_Smith( alpha, dotNL, dotNV );\n\tfloat D = D_GGX( alpha, dotNH );\n\treturn F * ( G * D );\n}\nvec3 BRDF_Specular_GGX_Environment( const in GeometricContext geometry, const in vec3 specularColor, const in float roughness ) {\n\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\n\tconst vec4 c0 = vec4( - 1, - 0.0275, - 0.572, 0.022 );\n\tconst vec4 c1 = vec4( 1, 0.0425, 1.04, - 0.04 );\n\tvec4 r = roughness * c0 + c1;\n\tfloat a004 = min( r.x * r.x, exp2( - 9.28 * dotNV ) ) * r.x + r.y;\n\tvec2 AB = vec2( -1.04, 1.04 ) * a004 + r.zw;\n\treturn specularColor * AB.x + AB.y;\n}\nfloat G_BlinnPhong_Implicit( ) {\n\treturn 0.25;\n}\nfloat D_BlinnPhong( const in float shininess, const in float dotNH ) {\n\treturn RECIPROCAL_PI * ( shininess * 0.5 + 1.0 ) * pow( dotNH, shininess );\n}\nvec3 BRDF_Specular_BlinnPhong( const in IncidentLight incidentLight, const in GeometricContext geometry, const in vec3 specularColor, const in float shininess ) {\n\tvec3 halfDir = normalize( incidentLight.direction + geometry.viewDir );\n\tfloat dotNH = saturate( dot( geometry.normal, halfDir ) );\n\tfloat dotLH = saturate( dot( incidentLight.direction, halfDir ) );\n\tvec3 F = F_Schlick( specularColor, dotLH );\n\tfloat G = G_BlinnPhong_Implicit( );\n\tfloat D = D_BlinnPhong( shininess, dotNH );\n\treturn F * ( G * D );\n}\nfloat GGXRoughnessToBlinnExponent( const in float ggxRoughness ) {\n\treturn ( 2.0 / pow2( ggxRoughness + 0.0001 ) - 2.0 );\n}\nfloat BlinnExponentToGGXRoughness( const in float blinnExponent ) {\n\treturn sqrt( 2.0 / ( blinnExponent + 2.0 ) );\n}\n";
2382THREE.ShaderChunk.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 = dFdx( surf_pos );\n\t\tvec3 vSigmaY = dFdy( surf_pos );\n\t\tvec3 vN = surf_norm;\n\t\tvec3 R1 = cross( vSigmaY, vN );\n\t\tvec3 R2 = cross( vN, vSigmaX );\n\t\tfloat fDet = dot( vSigmaX, R1 );\n\t\tvec3 vGrad = sign( fDet ) * ( dHdxy.x * R1 + dHdxy.y * R2 );\n\t\treturn normalize( abs( fDet ) * surf_norm - vGrad );\n\t}\n#endif\n";
2383THREE.ShaderChunk.color_fragment="#ifdef USE_COLOR\n\tdiffuseColor.rgb *= vColor;\n#endif";THREE.ShaderChunk.color_pars_fragment="#ifdef USE_COLOR\n\tvarying vec3 vColor;\n#endif\n";THREE.ShaderChunk.color_pars_vertex="#ifdef USE_COLOR\n\tvarying vec3 vColor;\n#endif";THREE.ShaderChunk.color_vertex="#ifdef USE_COLOR\n\tvColor.xyz = color.xyz;\n#endif";THREE.ShaderChunk.common="#define PI 3.14159\n#define PI2 6.28318\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 ) ); }\nstruct IncidentLight {\n\tvec3 color;\n\tvec3 direction;\n\tbool visible;\n};\nstruct ReflectedLight {\n\tvec3 directDiffuse;\n\tvec3 directSpecular;\n\tvec3 indirectDiffuse;\n\tvec3 indirectSpecular;\n};\nstruct GeometricContext {\n\tvec3 position;\n\tvec3 normal;\n\tvec3 viewDir;\n};\nvec3 transformDirection( in vec3 dir, in mat4 matrix ) {\n\treturn normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );\n}\nvec3 inverseTransformDirection( in vec3 dir, in mat4 matrix ) {\n\treturn normalize( ( vec4( dir, 0.0 ) * matrix ).xyz );\n}\nvec3 projectOnPlane(in vec3 point, in vec3 pointOnPlane, in vec3 planeNormal ) {\n\tfloat distance = dot( planeNormal, point - pointOnPlane );\n\treturn - distance * planeNormal + point;\n}\nfloat sideOfPlane( in vec3 point, in vec3 pointOnPlane, in vec3 planeNormal ) {\n\treturn sign( dot( point - pointOnPlane, planeNormal ) );\n}\nvec3 linePlaneIntersect( in vec3 pointOnLine, in vec3 lineDirection, in vec3 pointOnPlane, in vec3 planeNormal ) {\n\treturn lineDirection * ( dot( planeNormal, pointOnPlane - pointOnLine ) / dot( planeNormal, lineDirection ) ) + pointOnLine;\n}\n";
2384THREE.ShaderChunk.cube_uv_reflection_fragment="#ifdef ENVMAP_TYPE_CUBE_UV\nconst float cubeUV_textureSize = 1024.0;\nint getFaceFromDirection(vec3 direction) {\n    vec3 absDirection = abs(direction);\n    int face = -1;\n    if( absDirection.x > absDirection.z ) {\n        if(absDirection.x > absDirection.y )\n            face = direction.x > 0.0 ? 0 : 3;\n        else\n            face = direction.y > 0.0 ? 1 : 4;\n    }\n    else {\n        if(absDirection.z > absDirection.y )\n            face = direction.z > 0.0 ? 2 : 5;\n        else\n            face = direction.y > 0.0 ? 1 : 4;\n    }\n    return face;\n}\nconst float cubeUV_maxLods1 = log2(cubeUV_textureSize*0.25) - 1.0;\nconst float cubeUV_rangeClamp = exp2((6.0 - 1.0) * 2.0);\nvec2 MipLevelInfo( vec3 vec, float roughnessLevel, float roughness ) {\n    float scale = exp2(cubeUV_maxLods1 - roughnessLevel);\n    float dxRoughness = dFdx(roughness);\n    float dyRoughness = dFdy(roughness);\n    vec3 dx = dFdx( vec * scale * dxRoughness );\n    vec3 dy = dFdy( vec * scale * dyRoughness );\n    float d = max( dot( dx, dx ), dot( dy, dy ) );\n    d = clamp(d, 1.0, cubeUV_rangeClamp);
2384\n    float mipLevel = 0.5 * log2(d);\n    return vec2(floor(mipLevel), fract(mipLevel));\n}\nconst float cubeUV_maxLods2 = log2(cubeUV_textureSize*0.25) - 2.0;\nconst float cubeUV_rcpTextureSize = 1.0 / cubeUV_textureSize;\nvec2 getCubeUV(vec3 direction, float roughnessLevel, float mipLevel) {\n    mipLevel = roughnessLevel > cubeUV_maxLods2 - 3.0 ? 0.0 : mipLevel;\n    float a = 16.0 * cubeUV_rcpTextureSize;\n    vec2 exp2_packed = exp2( vec2( roughnessLevel, mipLevel ) );\n    vec2 rcp_exp2_packed = vec2( 1.0 ) / exp2_packed;\n    float powScale = exp2_packed.x * exp2_packed.y;\n    float scale = rcp_exp2_packed.x * rcp_exp2_packed.y * 0.25;\n    float mipOffset = 0.75*(1.0 - rcp_exp2_packed.y) * rcp_exp2_packed.x;\n    bool bRes = mipLevel == 0.0;\n    scale =  bRes && (scale < a) ? a : scale;\n    vec3 r;\n    vec2 offset;\n    int face = getFaceFromDirection(direction);\n    float rcpPowScale = 1.0 / powScale;\n    if( face == 0) {\n        r = vec3(direction.x, -direction.z, direction.y);\n        offset = vec2(0.0+mipOffset,0.75 * rcpPowScale);\n        offset.y = bRes && (offset.y < 2.0*a) ?  a : offset.y;\n    }\n    else if( face == 1) {\n        r = vec3(direction.y, direction.x, direction.z);\n        offset = vec2(scale+mipOffset, 0.75 * rcpPowScale);\n        offset.y = bRes && (offset.y < 2.0*a) ?  a : offset.y;\n    }\n    else if( face == 2) {\n        r = vec3(direction.z, direction.x, direction.y);\n        offset = vec2(2.0*scale+mipOffset, 0.75 * rcpPowScale);\n        offset.y = bRes && (offset.y < 2.0*a) ?  a : offset.y;\n    }\n    else if( face == 3) {\n        r = vec3(direction.x, direction.z, direction.y);\n        offset = vec2(0.0+mipOffset,0.5 * rcpPowScale);\n        offset.y = bRes && (offset.y < 2.0*a) ?  0.0 : offset.y;\n    }\n    else if( face == 4) {\n        r = vec3(direction.y, direction.x, -direction.z);\n        offset = vec2(scale+mipOffset, 0.5 * rcpPowScale);\n        offset.y = bRes && (offset.y < 2.0*a) ?  0.0 : offset.y;\n    }\n    else {\n        r = vec3(direction.z, -direction.x, direction.y);\n        offset = vec2(2.0*scale+mipOffset, 0.5 * rcpPowScale);\n        offset.y = bRes && (offset.y < 2.0*a) ?  0.0 : offset.y;\n    }\n    r = normalize(r);\n    float texelOffset = 0.5 * cubeUV_rcpTextureSize;\n    vec2 s = ( r.yz / abs( r.x ) + vec2( 1.0 ) ) * 0.5;\n    vec2 base = offset + vec2( texelOffset );\n    return base + s * ( scale - 2.0 * texelOffset );\n}\nconst float cubeUV_maxLods3 = log2(cubeUV_textureSize*0.25) - 3.0;\nvec4 textureCubeUV(vec3 reflectedDirection, float roughness ) {\n    float roughnessVal = roughness* cubeUV_maxLods3;\n    float r1 = floor(roughnessVal);\n    float r2 = r1 + 1.0;\n    float t = fract(roughnessVal);\n    vec2 mipInfo = MipLevelInfo(reflectedDirection, r1, roughness);\n    float s = mipInfo.y;\n    float level0 = mipInfo.x;\n    float level1 = level0 + 1.0;\n    level1 = level1 > 5.0 ? 5.0 : level1;\n    level0 += min( floor( s + 0.5 ), 5.0 );\n    vec2 uv_10 = getCubeUV(reflectedDirection, r1, level0);\n    vec4 color10 = envMapTexelToLinear(texture2D(envMap, uv_10));\n    vec2 uv_20 = getCubeUV(reflectedDirection, r2, level0);\n    vec4 color20 = envMapTexelToLinear(texture2D(envMap, uv_20));\n    vec4 result = mix(color10, color20, t);\n    return vec4(result.rgb, 1.0);\n}\n#endif\n";
2385THREE.ShaderChunk.defaultnormal_vertex="#ifdef FLIP_SIDED\n\tobjectNormal = -objectNormal;\n#endif\nvec3 transformedNormal = normalMatrix * objectNormal;\n";THREE.ShaderChunk.displacementmap_vertex="#ifdef USE_DISPLACEMENTMAP\n\ttransformed += normal * ( texture2D( displacementMap, uv ).x * displacementScale + displacementBias );\n#endif\n";THREE.ShaderChunk.displacementmap_pars_vertex="#ifdef USE_DISPLACEMENTMAP\n\tuniform sampler2D displacementMap;\n\tuniform float displacementScale;\n\tuniform float displacementBias;\n#endif\n";
2386THREE.ShaderChunk.emissivemap_fragment="#ifdef USE_EMISSIVEMAP\n\tvec4 emissiveColor = texture2D( emissiveMap, vUv );\n\temissiveColor.rgb = emissiveMapTexelToLinear( emissiveColor ).rgb;\n\ttotalEmissiveRadiance *= emissiveColor.rgb;\n#endif\n";THREE.ShaderChunk.emissivemap_pars_fragment="#ifdef USE_EMISSIVEMAP\n\tuniform sampler2D emissiveMap;\n#endif\n";THREE.ShaderChunk.encodings_pars_fragment="\nvec4 LinearToLinear( in vec4 value ) {\n  return value;\n}\nvec4 GammaToLinear( in vec4 value, in float gammaFactor ) {\n  return vec4( pow( value.xyz, vec3( gammaFactor ) ), value.w );\n}\nvec4 LinearToGamma( in vec4 value, in float gammaFactor ) {\n  return vec4( pow( value.xyz, vec3( 1.0 / gammaFactor ) ), value.w );\n}\nvec4 sRGBToLinear( in vec4 value ) {\n  return vec4( mix( pow( value.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), value.rgb * 0.0773993808, vec3( lessThanEqual( value.rgb, vec3( 0.04045 ) ) ) ), value.w );\n}\nvec4 LinearTosRGB( in vec4 value ) {\n  return vec4( mix( pow( value.rgb, vec3( 0.41666 ) ) * 1.055 - vec3( 0.055 ), value.rgb * 12.92, vec3( lessThanEqual( value.rgb, vec3( 0.0031308 ) ) ) ), value.w );\n}\nvec4 RGBEToLinear( in vec4 value ) {\n  return vec4( value.rgb * exp2( value.a * 255.0 - 128.0 ), 1.0 );\n}
2386\nvec4 LinearToRGBE( in vec4 value ) {\n  float maxComponent = max( max( value.r, value.g ), value.b );\n  float fExp = clamp( ceil( log2( maxComponent ) ), -128.0, 127.0 );\n  return vec4( value.rgb / exp2( fExp ), ( fExp + 128.0 ) / 255.0 );\n}\nvec4 RGBMToLinear( in vec4 value, in float maxRange ) {\n  return vec4( value.xyz * value.w * maxRange, 1.0 );\n}\nvec4 LinearToRGBM( in vec4 value, in float maxRange ) {\n  float maxRGB = max( value.x, max( value.g, value.b ) );\n  float M      = clamp( maxRGB / maxRange, 0.0, 1.0 );\n  M            = ceil( M * 255.0 ) / 255.0;\n  return vec4( value.rgb / ( M * maxRange ), M );\n}\nvec4 RGBDToLinear( in vec4 value, in float maxRange ) {\n    return vec4( value.rgb * ( ( maxRange / 255.0 ) / value.a ), 1.0 );\n}\nvec4 LinearToRGBD( in vec4 value, in float maxRange ) {\n    float maxRGB = max( value.x, max( value.g, value.b ) );\n    float D      = max( maxRange / maxRGB, 1.0 );\n    D            = min( floor( D ) / 255.0, 1.0 );\n    return vec4( value.rgb * ( D * ( 255.0 / maxRange ) ), D );\n}\nconst mat3 cLogLuvM = mat3( 0.2209, 0.3390, 0.4184, 0.1138, 0.6780, 0.7319, 0.0102, 0.1130, 0.2969 );\nvec4 LinearToLogLuv( in vec4 value )  {\n  vec3 Xp_Y_XYZp = value.rgb * cLogLuvM;\n  Xp_Y_XYZp = max(Xp_Y_XYZp, vec3(1e-6, 1e-6, 1e-6));\n  vec4 vResult;\n  vResult.xy = Xp_Y_XYZp.xy / Xp_Y_XYZp.z;\n  float Le = 2.0 * log2(Xp_Y_XYZp.y) + 127.0;\n  vResult.w = fract(Le);\n  vResult.z = (Le - (floor(vResult.w*255.0))/255.0)/255.0;\n  return vResult;\n}\nconst mat3 cLogLuvInverseM = mat3( 6.0014, -2.7008, -1.7996, -1.3320, 3.1029, -5.7721, 0.3008, -1.0882, 5.6268 );\nvec4 LogLuvToLinear( in vec4 value ) {\n  float Le = value.z * 255.0 + value.w;\n  vec3 Xp_Y_XYZp;\n  Xp_Y_XYZp.y = exp2((Le - 127.0) / 2.0);\n  Xp_Y_XYZp.z = Xp_Y_XYZp.y / value.y;\n  Xp_Y_XYZp.x = value.x * Xp_Y_XYZp.z;\n  vec3 vRGB = Xp_Y_XYZp.rgb * cLogLuvInverseM;\n  return vec4( max(vRGB, 0.0), 1.0 );\n}\n";
2387THREE.ShaderChunk.encodings_fragment="  gl_FragColor = linearToOutputTexel( gl_FragColor );\n";THREE.ShaderChunk.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 DOUBLE_SIDED\n\t\tfloat flipNormal = ( float( gl_FrontFacing ) * 2.0 - 1.0 );\n\t#else\n\t\tfloat flipNormal = 1.0;\n\t#endif\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tvec4 envColor = textureCube( envMap, flipNormal * vec3( flipEnvMap * reflectVec.x, reflectVec.yz ) );\n\t#elif defined( ENVMAP_TYPE_EQUIREC )\n\t\tvec2 sampleUV;\n\t\tsampleUV.y = saturate( flipNormal * reflectVec.y * 0.5 + 0.5 );\n\t\tsampleUV.x = atan( flipNormal * reflectVec.z, flipNormal * reflectVec.x ) * RECIPROCAL_PI2 + 0.5;\n\t\tvec4 envColor = texture2D( envMap, sampleUV );\n\t#elif defined( ENVMAP_TYPE_SPHERE )\n\t\tvec3 reflectView = flipNormal * normalize((viewMatrix * vec4( reflectVec, 0.0 )).xyz + vec3(0.0,0.0,1.0));\n\t\tvec4 envColor = texture2D( envMap, reflectView.xy * 0.5 + 0.5 );\n\t#endif\n\tenvColor = envMapTexelToLinear( envColor );\n\t#ifdef ENVMAP_BLENDING_MULTIPLY\n\t\toutgoingLight = mix( outgoingLight, outgoingLight * envColor.xyz, specularStrength * reflectivity );\n\t#elif defined( ENVMAP_BLENDING_MIX )\n\t\toutgoingLight = mix( outgoingLight, envColor.xyz, specularStrength * reflectivity );\n\t#elif defined( ENVMAP_BLENDING_ADD )\n\t\toutgoingLight += envColor.xyz * specularStrength * reflectivity;\n\t#endif\n#endif\n";
2388THREE.ShaderChunk.envmap_pars_fragment="#if defined( USE_ENVMAP ) || defined( STANDARD )\n\tuniform float reflectivity;\n\tuniform float envMapIntenstiy;\n#endif\n#ifdef USE_ENVMAP\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tuniform samplerCube envMap;\n\t#else\n\t\tuniform sampler2D envMap;\n\t#endif\n\tuniform float flipEnvMap;\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( STANDARD )\n\t\tuniform float refractionRatio;\n\t#else\n\t\tvarying vec3 vReflect;\n\t#endif\n#endif\n";
2389THREE.ShaderChunk.envmap_pars_vertex="#if defined( USE_ENVMAP ) && ! defined( USE_BUMPMAP ) && ! defined( USE_NORMALMAP ) && ! defined( PHONG ) && ! defined( STANDARD )\n\tvarying vec3 vReflect;\n\tuniform float refractionRatio;\n#endif\n";THREE.ShaderChunk.envmap_vertex="#if defined( USE_ENVMAP ) && ! defined( USE_BUMPMAP ) && ! defined( USE_NORMALMAP ) && ! defined( PHONG ) && ! defined( STANDARD )\n\tvec3 cameraToVertex = normalize( w
2389orldPosition.xyz - cameraPosition );\n\tvec3 worldNormal = inverseTransformDirection( transformedNormal, viewMatrix );\n\t#ifdef ENVMAP_MODE_REFLECTION\n\t\tvReflect = reflect( cameraToVertex, worldNormal );\n\t#else\n\t\tvReflect = refract( cameraToVertex, worldNormal, refractionRatio );\n\t#endif\n#endif\n";
2390THREE.ShaderChunk.fog_fragment="#ifdef USE_FOG\n\t#ifdef USE_LOGDEPTHBUF_EXT\n\t\tfloat depth = gl_FragDepthEXT / gl_FragCoord.w;\n\t#else\n\t\tfloat depth = gl_FragCoord.z / gl_FragCoord.w;\n\t#endif\n\t#ifdef FOG_EXP2\n\t\tfloat fogFactor = whiteCompliment( exp2( - fogDensity * fogDensity * depth * depth * LOG2 ) );\n\t#else\n\t\tfloat fogFactor = smoothstep( fogNear, fogFar, depth );\n\t#endif\n\tgl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor );\n#endif\n";
2391THREE.ShaderChunk.fog_pars_fragment="#ifdef USE_FOG\n\tuniform vec3 fogColor;\n\t#ifdef FOG_EXP2\n\t\tuniform float fogDensity;\n\t#else\n\t\tuniform float fogNear;\n\t\tuniform float fogFar;\n\t#endif\n#endif";THREE.ShaderChunk.lightmap_fragment="#ifdef USE_LIGHTMAP\n\treflectedLight.indirectDiffuse += PI * texture2D( lightMap, vUv2 ).xyz * lightMapIntensity;\n#endif\n";THREE.ShaderChunk.lightmap_pars_fragment="#ifdef USE_LIGHTMAP\n\tuniform sampler2D lightMap;\n\tuniform float lightMapIntensity;\n#endif";
2392THREE.ShaderChunk.lights_lambert_vertex="vec3 diffuse = vec3( 1.0 );\nGeometricContext geometry;\ngeometry.position = mvPosition.xyz;\ngeometry.normal = normalize( transformedNormal );\ngeometry.viewDir = normalize( -mvPosition.xyz );\nGeometricContext backGeometry;\nbackGeometry.position = geometry.position;\nbackGeometry.normal = -geometry.normal;\nbackGeometry.viewDir = geometry.viewDir;\nvLightFront = vec3( 0.0 );\n#ifdef DOUBLE_SIDED\n\tvLightBack = vec3( 0.0 );\n#endif\nIncidentLight directLight;\nfloat dotNL;\nvec3 directLightColor_Diffuse;\n#if NUM_POINT_LIGHTS > 0\n\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\n\t\tdirectLight = getPointDirectLightIrradiance( pointLights[ i ], geometry );\n\t\tdotNL = dot( geometry.normal, directLight.direction );\n\t\tdirectLightColor_Diffuse = PI * directLight.color;\n\t\tvLightFront += saturate( dotNL ) * directLightColor_Diffuse;\n\t\t#ifdef DOUBLE_SIDED\n\t\t\tvLightBack += saturate( -dotNL ) * directLightColor_Diffuse;\n\t\t#endif\n\t}\n#endif\n#if NUM_SPOT_LIGHTS > 0\n\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\n\t\tdirectLight = getSpotDirectLightIrradiance( spotLights[ i ], geometry );\n\t\tdotNL = dot( geometry.normal, directLight.direction );\n\t\tdirectLightColor_Diffuse = PI * directLight.color;\n\t\tvLightFront += saturate( dotNL ) * directLightColor_Diffuse;\n\t\t#ifdef DOUBLE_SIDED\n\t\t\tvLightBack += saturate( -dotNL ) * directLightColor_Diffuse;\n\t\t#endif\n\t}\n#endif\n#if NUM_DIR_LIGHTS > 0\n\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n\t\tdirectLight = getDirectionalDirectLightIrradiance( directionalLights[ i ], geometry );\n\t\tdotNL = dot( geometry.normal, directLight.direction );\n\t\tdirectLightColor_Diffuse = PI * directLight.color;\n\t\tvLightFront += saturate( dotNL ) * directLightColor_Diffuse;\n\t\t#ifdef DOUBLE_SIDED\n\t\t\tvLightBack += saturate( -dotNL ) * directLightColor_Diffuse;\n\t\t#endif\n\t}\n#endif\n#if NUM_HEMI_LIGHTS > 0\n\tfor ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {\n\t\tvLightFront += getHemisphereLightIrradiance( hemisphereLights[ i ], geometry );\n\t\t#ifdef DOUBLE_SIDED\n\t\t\tvLightBack += getHemisphereLightIrradiance( hemisphereLights[ i ], backGeometry );\n\t\t#endif\n\t}\n#endif\n";
2393THREE.ShaderChunk.lights_pars="uniform vec3 ambientLightColor;\nvec3 getAmbientLightIrradiance( const in vec3 ambientLightColor ) {\n\tvec3 irradiance = ambientLightColor;\n\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\tirradiance *= PI;\n\t#endif\n\treturn irradiance;\n}\n#if NUM_DIR_LIGHTS > 0\n\tstruct DirectionalLight {\n\t\tvec3 direction;\n\t\tvec3 color;\n\t\tint shadow;\n\t\tfloat shadowBias;\n\t\tfloat shadowRadius;\n\t\tvec2 shadowMapSize;\n\t};\n\tuniform DirectionalLight directionalLights[ NUM_DIR_LIGHTS ];\n\tIncidentLight getDirectionalDirectLightIrradiance( const in DirectionalLight directionalLight, const in GeometricContext geometry ) {\n\t\tIncidentLight directLight;\n\t\tdirectLight.color = directionalLight.color;\n\t\tdirectLight.direction = directionalLight.direction;\n\t\tdirectLight.visible = true;\n\t\treturn directLight;\n\t}\n#endif\n#if NUM_POINT_LIGHTS > 0\n\tstruct PointLight {\n\t\tvec3 position;\n\t\tvec3 color;\n\t\tfloat distance;\n\t\tfloat decay;\n\t\tint shadow;\n\t\tfloat shadowBias;\n\t\tfloat shadowRadius;\n\t\tvec2 shadowMapSize;\n\t};\n\tuniform PointLight pointLights[ NUM_POINT_LIGHTS ];\n\tIncidentLight getPointDirectLightIrradiance( const in PointLight pointLight, const in GeometricContext geometry ) {\n\t\tIncidentLight directLight;\n\t\tvec3 lVector = pointLight.position - geometry.position;\n\t\tdirectLight.direction = normalize( lVector );\n\t\tfloat lightDistance = length( lVector );\n\t\tif ( testLightInRange( lightDistance, pointLight.distance ) ) {\n\t\t\tdirectLight.color = pointLight.color;\n\t\t\tdirectLight.color *= punctualLightIntensityToIrradianceFactor( lightDistance, pointLight.distance, pointLight.decay );\n\t\t\tdirectLight.visible = true;\n\t\t} else {\n\t\t\tdirectLight.color = vec3( 0.0 );\n\t\t\tdirectLight.visible = false;\n\t\t}\n\t\treturn directLight;\n\t}
2393\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\tIncidentLight getSpotDirectLightIrradiance( const in SpotLight spotLight, const in GeometricContext geometry ) {\n\t\tIncidentLight directLight;\n\t\tvec3 lVector = spotLight.position - geometry.position;\n\t\tdirectLight.direction = normalize( lVector );\n\t\tfloat lightDistance = length( lVector );\n\t\tfloat angleCos = dot( directLight.direction, spotLight.direction );\n\t\tif ( all( bvec2( angleCos > spotLight.coneCos, testLightInRange( lightDistance, spotLight.distance ) ) ) ) {\n\t\t\tfloat spotEffect = smoothstep( spotLight.coneCos, spotLight.penumbraCos, angleCos );\n\t\t\tdirectLight.color = spotLight.color;\n\t\t\tdirectLight.color *= spotEffect * punctualLightIntensityToIrradianceFactor( lightDistance, spotLight.distance, spotLight.decay );\n\t\t\tdirectLight.visible = true;\n\t\t} else {\n\t\t\tdirectLight.color = vec3( 0.0 );\n\t\t\tdirectLight.visible = false;\n\t\t}\n\t\treturn directLight;\n\t}\n#endif\n#if NUM_HEMI_LIGHTS > 0\n\tstruct HemisphereLight {\n\t\tvec3 direction;\n\t\tvec3 skyColor;\n\t\tvec3 groundColor;\n\t};\n\tuniform HemisphereLight hemisphereLights[ NUM_HEMI_LIGHTS ];\n\tvec3 getHemisphereLightIrradiance( const in HemisphereLight hemiLight, const in GeometricContext geometry ) {\n\t\tfloat dotNL = dot( geometry.normal, hemiLight.direction );\n\t\tfloat hemiDiffuseWeight = 0.5 * dotNL + 0.5;\n\t\tvec3 irradiance = mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight );\n\t\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\t\tirradiance *= PI;\n\t\t#endif\n\t\treturn irradiance;\n\t}\n#endif\n#if defined( USE_ENVMAP ) && defined( STANDARD )\n\tvec3 getLightProbeIndirectIrradiance( const in GeometricContext geometry, const in int maxMIPLevel ) {\n\t\t#ifdef DOUBLE_SIDED\n\t\t\tfloat flipNormal = ( float( gl_FrontFacing ) * 2.0 - 1.0 );\n\t\t#else\n\t\t\tfloat flipNormal = 1.0;\n\t\t#endif\n\t\tvec3 worldNormal = inverseTransformDirection( geometry.normal, viewMatrix );\n\t\t#ifdef ENVMAP_TYPE_CUBE\n\t\t\tvec3 queryVec = flipNormal * vec3( flipEnvMap * worldNormal.x, worldNormal.yz );\n\t\t\t#ifdef TEXTURE_LOD_EXT\n\t\t\t\tvec4 envMapColor = textureCubeLodEXT( envMap, queryVec, float( maxMIPLevel ) );\n\t\t\t#else\n\t\t\t\tvec4 envMapColor = textureCube( envMap, queryVec, float( maxMIPLevel ) );\n\t\t\t#endif\n\t\t#elif defined( ENVMAP_TYPE_CUBE_UV )\n\t\t\tvec3 queryVec = flipNormal * vec3( flipEnvMap * worldNormal.x, worldNormal.yz );\n\t\t\tvec4 envMapColor = textureCubeUV( queryVec, 1.0 );\n\t\t#else\n\t\t\tvec4 envMapColor = vec4( 0.0 );\n\t\t#endif\n\t\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\n\t\treturn PI * envMapColor.rgb * envMapIntensity;\n\t}\n\tfloat getSpecularMIPLevel( const in float blinnShininessExponent, const in int maxMIPLevel ) {\n\t\tfloat maxMIPLevelScalar = float( maxMIPLevel );\n\t\tfloat desiredMIPLevel = maxMIPLevelScalar - 0.79248 - 0.5 * log2( pow2( blinnShininessExponent ) + 1.0 );\n\t\treturn clamp( desiredMIPLevel, 0.0, maxMIPLevelScalar );\n\t}\n\tvec3 getLightProbeIndirectRadiance( const in GeometricContext geometry, const in float blinnShininessExponent, const in int maxMIPLevel ) {\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t\tvec3 reflectVec = reflect( -geometry.viewDir, geometry.normal );\n\t\t#else\n\t\t\tvec3 reflectVec = refract( -geometry.viewDir, geometry.normal, refractionRatio );\n\t\t#endif\n\t\t#ifdef DOUBLE_SIDED\n\t\t\tfloat flipNormal = ( float( gl_FrontFacing ) * 2.0 - 1.0 );\n\t\t#else\n\t\t\tfloat flipNormal = 1.0;\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 = flipNormal * vec3( flipEnvMap * reflectVec.x, reflectVec.yz );\n\t\t\t#ifdef TEXTURE_LOD_EXT\n\t\t\t\tvec4 envMapColor = textureCubeLodEXT( envMap, queryReflectVec, specularMIPLevel );\n\t\t\t#else\n\t\t\t\tvec4 envMapColor = textureCube( envMap, queryReflectVec, specularMIPLevel );\n\t\t\t#endif\n\t\t#elif defined( ENVMAP_TYPE_CUBE_UV )\n\t\t\tvec3 queryReflectVec = flipNormal * vec3( flipEnvMap * reflectVec.x, reflectVec.yz );\n\t\t\tvec4 envMapColor = textureCubeUV(queryReflectVec, BlinnExponentToGGXRoughness(blinnShinine
2393ssExponent));\n\t\t#elif defined( ENVMAP_TYPE_EQUIREC )\n\t\t\tvec2 sampleUV;\n\t\t\tsampleUV.y = saturate( flipNormal * reflectVec.y * 0.5 + 0.5 );\n\t\t\tsampleUV.x = atan( flipNormal * reflectVec.z, flipNormal * reflectVec.x ) * RECIPROCAL_PI2 + 0.5;\n\t\t\t#ifdef TEXTURE_LOD_EXT\n\t\t\t\tvec4 envMapColor = texture2DLodEXT( envMap, sampleUV, specularMIPLevel );\n\t\t\t#else\n\t\t\t\tvec4 envMapColor = texture2D( envMap, sampleUV, specularMIPLevel );\n\t\t\t#endif\n\t\t#elif defined( ENVMAP_TYPE_SPHERE )\n\t\t\tvec3 reflectView = flipNormal * normalize((viewMatrix * vec4( reflectVec, 0.0 )).xyz + vec3(0.0,0.0,1.0));\n\t\t\t#ifdef TEXTURE_LOD_EXT\n\t\t\t\tvec4 envMapColor = texture2DLodEXT( envMap, reflectView.xy * 0.5 + 0.5, specularMIPLevel );\n\t\t\t#else\n\t\t\t\tvec4 envMapColor = texture2D( envMap, reflectView.xy * 0.5 + 0.5, specularMIPLevel );\n\t\t\t#endif\n\t\t#endif\n\t\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\n\t\treturn envMapColor.rgb * envMapIntensity;\n\t}\n#endif\n";
2394THREE.ShaderChunk.lights_phong_fragment="BlinnPhongMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;\nmaterial.specularColor = specular;\nmaterial.specularShininess = shininess;\nmaterial.specularStrength = specularStrength;\n";THREE.ShaderChunk.lights_phong_pars_fragment="#ifdef USE_ENVMAP\n\tvarying vec3 vWorldPosition;\n#endif\nvarying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\nstruct BlinnPhongMaterial {\n\tvec3\tdiffuseColor;\n\tvec3\tspecularColor;\n\tfloat\tspecularShininess;\n\tfloat\tspecularStrength;\n};\nvoid RE_Direct_BlinnPhong( const in IncidentLight directLight, const in GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\n\tfloat dotNL = saturate( dot( geometry.normal, directLight.direction ) );\n\tvec3 irradiance = dotNL * directLight.color;\n\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\tirradiance *= PI;\n\t#endif\n\treflectedLight.directDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n\treflectedLight.directSpecular += irradiance * BRDF_Specular_BlinnPhong( directLight, geometry, material.specularColor, material.specularShininess ) * material.specularStrength;\n}\nvoid RE_IndirectDiffuse_BlinnPhong( const in vec3 irradiance, const in GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n}\n#define RE_Direct\t\t\t\tRE_Direct_BlinnPhong\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_BlinnPhong\n#define Material_LightProbeLOD( material )\t(0)\n";
2395THREE.ShaderChunk.lights_phong_pars_vertex="#ifdef USE_ENVMAP\n\tvarying vec3 vWorldPosition;\n#endif\n";THREE.ShaderChunk.lights_phong_vertex="#ifdef USE_ENVMAP\n\tvWorldPosition = worldPosition.xyz;\n#endif\n";THREE.ShaderChunk.lights_standard_fragment="StandardMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb * ( 1.0 - metalnessFactor );\nmaterial.specularRoughness = clamp( roughnessFactor, 0.04, 1.0 );\nmaterial.specularColor = mix( vec3( 0.04 ), diffuseColor.rgb, metalnessFactor );\n";
2396THREE.ShaderChunk.lights_standard_pars_fragment="struct StandardMaterial {\n\tvec3\tdiffuseColor;\n\tfloat\tspecularRoughness;\n\tvec3\tspecularColor;\n};\nvoid RE_Direct_Standard( const in IncidentLight directLight, const in GeometricContext geometry, const in StandardMaterial material, inout ReflectedLight reflectedLight ) {\n\tfloat dotNL = saturate( dot( geometry.normal, directLight.direction ) );\n\tvec3 irradiance = dotNL * directLight.color;\n\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\tirradiance *= PI;\n\t#endif\n\treflectedLight.directDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n\treflectedLight.directSpecular += irradiance * BRDF_Specular_GGX( directLight, geometry, material.specularColor, material.specularRoughness );\n}\nvoid RE_IndirectDiffuse_Standard( const in vec3 irradiance, const in GeometricContext geometry, const in StandardMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectSpecular_Standard( const in vec3 radiance, const in GeometricContext geometry, const in StandardMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectSpecular += radiance * BRDF_Specular_GGX_Environment( geometry, material.specularColor, material.specularRoughness );\n}\n#define RE_Direct\t\t\t\tRE_Direct_Standard\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_Standard\n#define RE_IndirectSpecular\t\tRE_IndirectSpecular_Standard\n#define Material_BlinnShinine
2396ssExponent( material )   GGXRoughnessToBlinnExponent( material.specularRoughness )\nfloat computeSpecularOcclusion( const in float dotNV, const in float ambientOcclusion, const in float roughness ) {\n\treturn saturate( pow( dotNV + ambientOcclusion, exp2( - 16.0 * roughness - 1.0 ) ) - 1.0 + ambientOcclusion );\n}\n";
2397THREE.ShaderChunk.lights_template="\nGeometricContext geometry;\ngeometry.position = - vViewPosition;\ngeometry.normal = normal;\ngeometry.viewDir = normalize( vViewPosition );\nIncidentLight directLight;\n#if ( NUM_POINT_LIGHTS > 0 ) && defined( RE_Direct )\n\tPointLight pointLight;\n\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\n\t\tpointLight = pointLights[ i ];\n\t\tdirectLight = getPointDirectLightIrradiance( pointLight, geometry );\n\t\t#ifdef USE_SHADOWMAP\n\t\tdirectLight.color *= all( bvec2( pointLight.shadow, directLight.visible ) ) ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ] ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometry, material, reflectedLight );\n\t}\n#endif\n#if ( NUM_SPOT_LIGHTS > 0 ) && defined( RE_Direct )\n\tSpotLight spotLight;\n\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\n\t\tspotLight = spotLights[ i ];\n\t\tdirectLight = getSpotDirectLightIrradiance( spotLight, geometry );\n\t\t#ifdef USE_SHADOWMAP\n\t\tdirectLight.color *= all( bvec2( spotLight.shadow, directLight.visible ) ) ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowBias, spotLight.shadowRadius, vSpotShadowCoord[ i ] ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometry, material, reflectedLight );\n\t}\n#endif\n#if ( NUM_DIR_LIGHTS > 0 ) && defined( RE_Direct )\n\tDirectionalLight directionalLight;\n\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n\t\tdirectionalLight = directionalLights[ i ];\n\t\tdirectLight = getDirectionalDirectLightIrradiance( directionalLight, geometry );\n\t\t#ifdef USE_SHADOWMAP\n\t\tdirectLight.color *= all( bvec2( directionalLight.shadow, directLight.visible ) ) ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometry, material, reflectedLight );\n\t}\n#endif\n#if defined( RE_IndirectDiffuse )\n\tvec3 irradiance = getAmbientLightIrradiance( ambientLightColor );\n\t#ifdef USE_LIGHTMAP\n\t\tvec3 lightMapIrradiance = texture2D( lightMap, vUv2 ).xyz * lightMapIntensity;\n\t\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\t\tlightMapIrradiance *= PI;\n\t\t#endif\n\t\tirradiance += lightMapIrradiance;\n\t#endif\n\t#if ( NUM_HEMI_LIGHTS > 0 )\n\t\tfor ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {\n\t\t\tirradiance += getHemisphereLightIrradiance( hemisphereLights[ i ], geometry );\n\t\t}\n\t#endif\n\t#if defined( USE_ENVMAP ) && defined( STANDARD ) && defined( ENVMAP_TYPE_CUBE_UV )\n\t \tirradiance += getLightProbeIndirectIrradiance( geometry, 8 );\n\t#endif\n\tRE_IndirectDiffuse( irradiance, geometry, material, reflectedLight );\n#endif\n#if defined( USE_ENVMAP ) && defined( RE_IndirectSpecular )\n\tvec3 radiance = getLightProbeIndirectRadiance( geometry, Material_BlinnShininessExponent( material ), 8 );\n\tRE_IndirectSpecular( radiance, geometry, material, reflectedLight );\n#endif\n";
2398THREE.ShaderChunk.logdepthbuf_fragment="#if defined(USE_LOGDEPTHBUF) && defined(USE_LOGDEPTHBUF_EXT)\n\tgl_FragDepthEXT = log2(vFragDepth) * logDepthBufFC * 0.5;\n#endif";THREE.ShaderChunk.logdepthbuf_pars_fragment="#ifdef USE_LOGDEPTHBUF\n\tuniform float logDepthBufFC;\n\t#ifdef USE_LOGDEPTHBUF_EXT\n\t\tvarying float vFragDepth;\n\t#endif\n#endif\n";THREE.ShaderChunk.logdepthbuf_pars_vertex="#ifdef USE_LOGDEPTHBUF\n\t#ifdef USE_LOGDEPTHBUF_EXT\n\t\tvarying float vFragDepth;\n\t#endif\n\tuniform float logDepthBufFC;\n#endif";
2399THREE.ShaderChunk.logdepthbuf_vertex="#ifdef USE_LOGDEPTHBUF\n\tgl_Position.z = log2(max( EPSILON, gl_Position.w + 1.0 )) * logDepthBufFC;\n\t#ifdef USE_LOGDEPTHBUF_EXT\n\t\tvFragDepth = 1.0 + gl_Position.w;\n\t#else\n\t\tgl_Position.z = (gl_Position.z - 1.0) * gl_Position.w;\n\t#endif\n#endif\n";THREE.ShaderChunk.map_fragment="#ifdef USE_MAP\n\tvec4 texelColor = texture2D( map, vUv );\n\ttexelColor = mapTexelToLinear( texelColor );\n\tdiffuseColor *= texelColor;\n#endif\n";
2400THREE.ShaderChunk.map_pars_fragment="#ifdef USE_MAP\n\tuniform sampler2D map;\n#endif\n";THREE.ShaderChunk.map_particle_fragment="#ifdef USE_MAP\n\tvec4 mapTexel = texture2D( map, vec2( gl_PointCoord.x, 1.0 - gl_PointCoord.y ) * offsetRepeat.zw + offsetRepeat.xy );\n\tdiffuseColor *= mapTexelToLinear( mapTexel );\n#endif\n";THREE.ShaderChunk.map_particle_pars_fragment="#ifdef USE_MAP\n\tuniform vec4 offsetRepeat;\n\tuniform sampler2D map;\n#endif\n";THREE.ShaderChunk.metalnessmap_fragment="float metalnessFactor = metalness;\n#ifdef USE_METALNESSMAP\n\tvec4 texelMetalness = texture2D( metalnessMap, vUv );\n\tmetalnessFactor *= texelMetalness.r;\n#endif\n";
2401THREE.ShaderChunk.metalnessmap_pars_fragment="#ifdef USE_METALNESSMAP\n\tuniform sampler2D metalnessMap;\n#endif";THREE.ShaderChunk.morphnormal_vertex="#ifdef USE_MORPHNORMALS\n\tobjectNormal += ( morphNormal0 - normal ) * morphTargetInfluences[ 0 ];\n\tobjectNormal += ( morphNormal1 - normal ) * morphTargetInfluences[ 1 ];\n\tobjectNormal += ( morphNormal2 - normal ) * morphTargetInfluences[ 2 ];\n\tobjectNormal += ( morphNormal3 - normal ) * morphTargetInfluences[ 3 ];\n#endif\n";
2402THREE.ShaderChunk.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";THREE.ShaderChunk.morphtarget_vertex="#ifdef USE_MORPHTARGETS\n\ttransformed += ( morphTarget0 - position ) * morphTargetInfluences[ 0 ];\n\ttransformed += ( morphTarget1 - position ) * morphTargetInfluences[ 1 ];\n\ttransformed += ( morphTarget2 - position ) * morphTargetInfluences[ 2 ];\n\ttransformed += ( morphTarget3 - position ) * morphTargetInfluences[ 3 ];\n\t#ifndef USE_MORPHNORMALS\n\ttransformed += ( morphTarget4 - position ) * morphTargetInfluences[ 4 ];\n\ttransformed += ( morphTarget5 - position ) * morphTargetInfluences[ 5 ];\n\ttransformed += ( morphTarget6 - position ) * morphTargetInfluences[ 6 ];\n\ttransformed += ( morphTarget7 - position ) * morphTargetInfluences[ 7 ];\n\t#endif\n#endif\n";
2403THREE.ShaderChunk.normal_fragment="#ifdef FLAT_SHADED\n\tvec3 fdx = vec3( dFdx( vViewPosition.x ), dFdx( vViewPosition.y ), dFdx( vViewPosition.z ) );\n\tvec3 fdy = vec3( dFdy( vViewPosition.x ), dFdy( vViewPosition.y ), dFdy( vViewPosition.z ) );\n\tvec3 normal = normalize( cross( fdx, fdy ) );\n#else\n\tvec3 normal = normalize( vNormal );\n\t#ifdef DOUBLE_SIDED\n\t\tnormal = normal * ( -1.0 + 2.0 * float( gl_FrontFacing ) );
2403\n\t#endif\n#endif\n#ifdef USE_NORMALMAP\n\tnormal = perturbNormal2Arb( -vViewPosition, normal );\n#elif defined( USE_BUMPMAP )\n\tnormal = perturbNormalArb( -vViewPosition, normal, dHdxy_fwd() );\n#endif\n";
2404THREE.ShaderChunk.normalmap_pars_fragment="#ifdef USE_NORMALMAP\n\tuniform sampler2D normalMap;\n\tuniform vec2 normalScale;\n\tvec3 perturbNormal2Arb( vec3 eye_pos, vec3 surf_norm ) {\n\t\tvec3 q0 = dFdx( eye_pos.xyz );\n\t\tvec3 q1 = dFdy( eye_pos.xyz );\n\t\tvec2 st0 = dFdx( vUv.st );\n\t\tvec2 st1 = dFdy( vUv.st );\n\t\tvec3 S = normalize( q0 * st1.t - q1 * st0.t );\n\t\tvec3 T = normalize( -q0 * st1.s + q1 * st0.s );\n\t\tvec3 N = normalize( surf_norm );\n\t\tvec3 mapN = texture2D( normalMap, vUv ).xyz * 2.0 - 1.0;\n\t\tmapN.xy = normalScale * mapN.xy;\n\t\tmat3 tsn = mat3( S, T, N );\n\t\treturn normalize( tsn * mapN );\n\t}\n#endif\n";
2405THREE.ShaderChunk.premultiplied_alpha_fragment="#ifdef PREMULTIPLIED_ALPHA\n\tgl_FragColor.rgb *= gl_FragColor.a;\n#endif\n";THREE.ShaderChunk.project_vertex="#ifdef USE_SKINNING\n\tvec4 mvPosition = modelViewMatrix * skinned;\n#else\n\tvec4 mvPosition = modelViewMatrix * vec4( transformed, 1.0 );\n#endif\ngl_Position = projectionMatrix * mvPosition;\n";THREE.ShaderChunk.roughnessmap_fragment="float roughnessFactor = roughness;\n#ifdef USE_ROUGHNESSMAP\n\tvec4 texelRoughness = texture2D( roughnessMap, vUv );\n\troughnessFactor *= texelRoughness.r;\n#endif\n";
2406THREE.ShaderChunk.roughnessmap_pars_fragment="#ifdef USE_ROUGHNESSMAP\n\tuniform sampler2D roughnessMap;\n#endif";THREE.ShaderChunk.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 unpackDepth( const in vec4 rgba_depth ) {\n\t\tconst vec4 bit_shift = vec4( 1.0 / ( 256.0 * 256.0 * 256.0 ), 1.0 / ( 256.0 * 256.0 ), 1.0 / 256.0, 1.0 );\n\t\treturn dot( rgba_depth, bit_shift );\n\t}\n\tfloat texture2DCompare( sampler2D depths, vec2 uv, float compare ) {\n\t\treturn step( compare, unpackDepth( texture2D( depths, uv ) ) );\n\t}\n\tfloat texture2DShadowLerp( sampler2D depths, vec2 size, vec2 uv, float compare ) {\n\t\tconst vec2 offset = vec2( 0.0, 1.0 );\n\t\tvec2 texelSize = vec2( 1.0 ) / size;\n\t\tvec2 centroidUV = floor( uv * size + 0.5 ) / size;\n\t\tfloat lb = texture2DCompare( depths, centroidUV + texelSize * offset.xx, compare );\n\t\tfloat lt = texture2DCompare( depths, centroidUV + texelSize * offset.xy, compare );\n\t\tfloat rb = texture2DCompare( depths, centroidUV + texelSize * offset.yx, compare );\n\t\tfloat rt = texture2DCompare( depths, centroidUV + texelSize * offset.yy, compare );\n\t\tvec2 f = fract( uv * size + 0.5 );\n\t\tfloat a = mix( lb, lt, f.y );\n\t\tfloat b = mix( rb, rt, f.y );\n\t\tfloat c = mix( a, b, f.x );\n\t\treturn c;\n\t}\n\tfloat getShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord ) {\n\t\tshadowCoord.xyz /= shadowCoord.w;\n\t\tshadowCoord.z += shadowBias;\n\t\tbvec4 inFrustumVec = bvec4 ( shadowCoord.x >= 0.0, shadowCoord.x <= 1.0, shadowCoord.y >= 0.0, shadowCoord.y <= 1.0 );\n\t\tbool inFrustum = all( inFrustumVec );\n\t\tbvec2 frustumTestVec = bvec2( inFrustum, shadowCoord.z <= 1.0 );\n\t\tbool frustumTest = all( frustumTestVec );\n\t\tif ( frustumTest ) {\n\t\t#if defined( SHADOWMAP_TYPE_PCF )\n\t\t\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\n\t\t\tfloat dx0 = - texelSize.x * shadowRadius;\n\t\t\tfloat dy0 = - texelSize.y * shadowRadius;\n\t\t\tfloat dx1 = + texelSize.x * shadowRadius;\n\t\t\tfloat dy1 = + texelSize.y * shadowRadius;\n\t\t\treturn (\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy1 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy1 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy1 ), shadowCoord.z )\n\t\t\t) * ( 1.0 / 9.0 );\n\t\t#elif defined( SHADOWMAP_TYPE_PCF_SOFT )\n\t\t\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\n\t\t\tfloat dx0 = - texelSize.x * shadowRadius;\n\t\t\tfloat dy0 = - texelSize.y * shadowRadius;\n\t\t\tfloat dx1 = + texelSize.x * shadowRadius;\n\t\t\tfloat dy1 = + texelSize.y * shadowRadius;\n\t\t\treturn (\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx0, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( 0.0, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx1, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx0, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy, shadowCoord.z ) +\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx1, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx0, dy1 ), shadowCoord.z ) +\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( 0.0, dy1 ), shadowCoord.z ) +\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx1, dy1 ), shadowCoord.z )\n\t\t\t) * ( 1.0 / 9.0 );\n\t\t#else\n\t\t\treturn texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z );\n\t\t#endif\n\t\t}\n\t\treturn 1.0;\n\t}\n\tvec2 cubeToUV( vec3 v, float texelSizeY ) {\n\t\tvec3 absV = abs( v );\n\t\tfloat scaleToCube = 1.0 / max( absV.x, max( absV.y, absV.z ) );\n\t\tabsV *= scaleToCube;\n\t\tv *= scaleToCube * ( 1.0 - 2.0 * texelSizeY );\n\t\tvec2 planar = v.xy;\n\t\tfloat almostATexel = 1.5 * texelSizeY;\n\t\tfloat almostOne = 1.0 - almostATexel;\n\t\tif ( absV.z >= almostOne ) {\n\t\t\tif ( v.z > 0.0 )\n\t\t\t\tplanar.x = 4.0 - v.x;\n\t\t} else if ( absV.x >= almostOne ) {\n\t\t\tfloat signX = sign( v.x );\n\t\t\tplanar.x = v.z * signX + 2.0 * signX;\n\t\t} else if ( absV.y >= almostOne ) {\n\t\t\tfloat signY = sign( v.y );\n\t\t\tplanar.x = v.x + 2.0 * signY + 2.0;\n\t\t\tplanar.y = v.z * signY - 2.0;\n\t\t}\n\t\treturn vec2( 0.125, 0.25 ) * planar + vec2( 0.375, 0.75 );\n\t}\n\tfloat getPointShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord ) {\n\t\tvec2 texelSize = vec2( 1.0 ) / ( shadowMapSize * vec2( 4.0, 2.0 ) );\n\t\tvec3 lightToPosition = shadowCoord.xyz;\n\t\tvec3 bd3D = normalize( lightToPosition );\n\t\tfloat dp = ( length( lightToPosition ) - shadowBias ) / 1000.0;\n\t\t#if defined( SHADOWMAP_TYPE_PCF ) || defined( SHADOWMAP_TYPE_PCF_SOFT )\n\t\t\tvec2 offset = vec2( - 1, 1 ) * shadowRadius * texelSize.y;\n\t\t\treturn (\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyx, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyx, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxx, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxx, texelSize.y ), dp )\n\t\t\t) * ( 1.0 / 9.0 );\n\t\t#else\n\t\t\treturn texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp );\n\t\t#endif\n\t}\n#endif\n";
2407THREE.ShaderChunk.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 ];
2407\n\t#endif\n\t#if NUM_SPOT_LIGHTS > 0\n\t\tuniform mat4 spotShadowMatrix[ NUM_SPOT_LIGHTS ];\n\t\tvarying vec4 vSpotShadowCoord[ NUM_SPOT_LIGHTS ];\n\t#endif\n\t#if NUM_POINT_LIGHTS > 0\n\t\tuniform mat4 pointShadowMatrix[ NUM_POINT_LIGHTS ];\n\t\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHTS ];\n\t#endif\n#endif\n";
2408THREE.ShaderChunk.shadowmap_vertex="#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHTS > 0\n\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n\t\tvDirectionalShadowCoord[ i ] = directionalShadowMatrix[ i ] * worldPosition;\n\t}\n\t#endif\n\t#if NUM_SPOT_LIGHTS > 0\n\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\n\t\tvSpotShadowCoord[ i ] = spotShadowMatrix[ i ] * worldPosition;\n\t}\n\t#endif\n\t#if NUM_POINT_LIGHTS > 0\n\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\n\t\tvPointShadowCoord[ i ] = pointShadowMatrix[ i ] * worldPosition;\n\t}\n\t#endif\n#endif\n";
2409THREE.ShaderChunk.shadowmask_pars_fragment="float getShadowMask() {\n\tfloat shadow = 1.0;\n\t#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHTS > 0\n\tDirectionalLight directionalLight;\n\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n\t\tdirectionalLight = directionalLights[ i ];\n\t\tshadow *= bool( directionalLight.shadow ) ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n\t}\n\t#endif\n\t#if NUM_SPOT_LIGHTS > 0\n\tSpotLight spotLight;\n\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\n\t\tspotLight = spotLights[ i ];\n\t\tshadow *= bool( spotLight.shadow ) ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowBias, spotLight.shadowRadius, vSpotShadowCoord[ i ] ) : 1.0;\n\t}\n\t#endif\n\t#if NUM_POINT_LIGHTS > 0\n\tPointLight pointLight;\n\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\n\t\tpointLight = pointLights[ i ];\n\t\tshadow *= bool( pointLight.shadow ) ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ] ) : 1.0;\n\t}\n\t#endif\n\t#endif\n\treturn shadow;\n}\n";
2410THREE.ShaderChunk.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";THREE.ShaderChunk.skinning_pars_vertex="#ifdef USE_SKINNING\n\tuniform mat4 bindMatrix;\n\tuniform mat4 bindMatrixInverse;\n\t#ifdef BONE_TEXTURE\n\t\tuniform sampler2D boneTexture;\n\t\tuniform int boneTextureWidth;\n\t\tuniform int boneTextureHeight;\n\t\tmat4 getBoneMatrix( const in float i ) {\n\t\t\tfloat j = i * 4.0;\n\t\t\tfloat x = mod( j, float( boneTextureWidth ) );\n\t\t\tfloat y = floor( j / float( boneTextureWidth ) );\n\t\t\tfloat dx = 1.0 / float( boneTextureWidth );\n\t\t\tfloat dy = 1.0 / float( boneTextureHeight );\n\t\t\ty = dy * ( y + 0.5 );\n\t\t\tvec4 v1 = texture2D( boneTexture, vec2( dx * ( x + 0.5 ), y ) );\n\t\t\tvec4 v2 = texture2D( boneTexture, vec2( dx * ( x + 1.5 ), y ) );\n\t\t\tvec4 v3 = texture2D( boneTexture, vec2( dx * ( x + 2.5 ), y ) );\n\t\t\tvec4 v4 = texture2D( boneTexture, vec2( dx * ( x + 3.5 ), y ) );\n\t\t\tmat4 bone = mat4( v1, v2, v3, v4 );\n\t\t\treturn bone;\n\t\t}\n\t#else\n\t\tuniform mat4 boneGlobalMatrices[ MAX_BONES ];\n\t\tmat4 getBoneMatrix( const in float i ) {\n\t\t\tmat4 bone = boneGlobalMatrices[ int(i) ];\n\t\t\treturn bone;\n\t\t}\n\t#endif\n#endif\n";
2411THREE.ShaderChunk.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\tskinned  = bindMatrixInverse * skinned;\n#endif\n";THREE.ShaderChunk.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;
2411\n\tskinMatrix  = bindMatrixInverse * skinMatrix * bindMatrix;\n\tobjectNormal = vec4( skinMatrix * vec4( objectNormal, 0.0 ) ).xyz;\n#endif\n";
2412THREE.ShaderChunk.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";THREE.ShaderChunk.specularmap_pars_fragment="#ifdef USE_SPECULARMAP\n\tuniform sampler2D specularMap;\n#endif";THREE.ShaderChunk.tonemapping_fragment="#if defined( TONE_MAPPING )\n  gl_FragColor.rgb = toneMapping( gl_FragColor.rgb );\n#endif\n";
2413THREE.ShaderChunk.tonemapping_pars_fragment="#define saturate(a) clamp( a, 0.0, 1.0 )\nuniform float toneMappingExposure;\nuniform float toneMappingWhitePoint;\nvec3 LinearToneMapping( vec3 color ) {\n  return toneMappingExposure * color;\n}\nvec3 ReinhardToneMapping( vec3 color ) {\n  color *= toneMappingExposure;\n  return saturate( color / ( vec3( 1.0 ) + color ) );\n}\n#define Uncharted2Helper( x ) max( ( ( x * ( 0.15 * x + 0.10 * 0.50 ) + 0.20 * 0.02 ) / ( x * ( 0.15 * x + 0.50 ) + 0.20 * 0.30 ) ) - 0.02 / 0.30, vec3( 0.0 ) )\nvec3 Uncharted2ToneMapping( vec3 color ) {\n  color *= toneMappingExposure;\n  return saturate( Uncharted2Helper( color ) / Uncharted2Helper( vec3( toneMappingWhitePoint ) ) );\n}\nvec3 OptimizedCineonToneMapping( vec3 color ) {\n  color *= toneMappingExposure;\n  color = max( vec3( 0.0 ), color - 0.004 );\n  return pow( ( color * ( 6.2 * color + 0.5 ) ) / ( color * ( 6.2 * color + 1.7 ) + 0.06 ), vec3( 2.2 ) );\n}\n";
2414THREE.ShaderChunk.uv2_pars_fragment="#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\n\tvarying vec2 vUv2;\n#endif";THREE.ShaderChunk.uv2_pars_vertex="#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\n\tattribute vec2 uv2;\n\tvarying vec2 vUv2;\n#endif";THREE.ShaderChunk.uv2_vertex="#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\n\tvUv2 = uv2;\n#endif";THREE.ShaderChunk.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";
2415THREE.ShaderChunk.uv_pars_vertex="#if defined( USE_MAP ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( USE_SPECULARMAP ) || defined( USE_ALPHAMAP ) || defined( USE_EMISSIVEMAP ) || defined( USE_ROUGHNESSMAP ) || defined( USE_METALNESSMAP )\n\tvarying vec2 vUv;\n\tuniform vec4 offsetRepeat;\n#endif\n";THREE.ShaderChunk.uv_vertex="#if defined( USE_MAP ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( USE_SPECULARMAP ) || defined( USE_ALPHAMAP ) || defined( USE_EMISSIVEMAP ) || defined( USE_ROUGHNESSMAP ) || defined( USE_METALNESSMAP )\n\tvUv = uv * offsetRepeat.zw + offsetRepeat.xy;\n#endif";
2416THREE.ShaderChunk.worldpos_vertex="#if defined( USE_ENVMAP ) || defined( PHONG ) || defined( STANDARD ) || defined( LAMBERT ) || defined ( USE_SHADOWMAP )\n\t#ifdef USE_SKINNING\n\t\tvec4 worldPosition = modelMatrix * skinned;\n\t#else\n\t\tvec4 worldPosition = modelMatrix * vec4( transformed, 1.0 );\n\t#endif\n#endif\n";
2417THREE.UniformsUtils={merge:function(a){for(var b={},c=0;c<a.length;c++){var d=this.clone(a[c]),e;for(e in d)b[e]=d[e]}return b},clone:function(a){var b={},c;for(c in a){b[c]={};for(var d in a[c]){var e=a[c][d];e instanceof THREE.Color||e instanceof THREE.Vector2||e instanceof THREE.Vector3||e instanceof THREE.Vector4||e instanceof THREE.Matrix3||e instanceof THREE.Matrix4||e instanceof THREE.Texture?b[c][d]=e.clone():Array.isArray(e)?b[c][d]=e.slice():b[c][d]=e}}return b}};
2418THREE.UniformsLib={common:{diffuse:{type:"c",value:new THREE.Color(15658734)},opacity:{type:"f",value:1},map:{type:"t",value:null},offsetRepeat:{type:"v4",value:new THREE.Vector4(0,0,1,1)},specularMap:{type:"t",value:null},alphaMap:{type:"t",value:null},envMap:{type:"t",value:null},flipEnvMap:{type:"f",value:-1},reflectivity:{type:"f",value:1},refractionRatio:{type:"f",value:.98}},aomap:{aoMap:{type:"t",value:null},aoMapIntensity:{type:"f",value:1}},lightmap:{lightMap:{type:"t",value:null},lightMapIntensity:{type:"f",
2419value:1}},emissivemap:{emissiveMap:{type:"t",value:null}},bumpmap:{bumpMap:{type:"t",value:null},bumpScale:{type:"f",value:1}},normalmap:{normalMap:{type:"t",value:null},normalScale:{type:"v2",value:new THREE.Vector2(1,1)}}
2419,displacementmap:{displacementMap:{type:"t",value:null},displacementScale:{type:"f",value:1},displacementBias:{type:"f",value:0}},roughnessmap:{roughnessMap:{type:"t",value:null}},metalnessmap:{metalnessMap:{type:"t",value:null}},fog:{fogDensity:{type:"f",value:2.5E-4},fogNear:{type:"f",
2420value:1},fogFar:{type:"f",value:2E3},fogColor:{type:"c",value:new THREE.Color(16777215)}},lights:{ambientLightColor:{type:"fv",value:[]},directionalLights:{type:"sa",value:[],properties:{direction:{type:"v3"},color:{type:"c"},shadow:{type:"i"},shadowBias:{type:"f"},shadowRadius:{type:"f"},shadowMapSize:{type:"v2"}}},directionalShadowMap:{type:"tv",value:[]},directionalShadowMatrix:{type:"m4v",value:[]},spotLights:{type:"sa",value:[],properties:{color:{type:"c"},position:{type:"v3"},direction:{type:"v3"},
2421distance:{type:"f"},coneCos:{type:"f"},penumbraCos:{type:"f"},decay:{type:"f"},shadow:{type:"i"},shadowBias:{type:"f"},shadowRadius:{type:"f"},shadowMapSize:{type:"v2"}}},spotShadowMap:{type:"tv",value:[]},spotShadowMatrix:{type:"m4v",value:[]},pointLights:{type:"sa",value:[],properties:{color:{type:"c"},position:{type:"v3"},decay:{type:"f"},distance:{type:"f"},shadow:{type:"i"},shadowBias:{type:"f"},shadowRadius:{type:"f"},shadowMapSize:{type:"v2"}}},pointShadowMap:{type:"tv",value:[]},pointShadowMatrix:{type:"m4v",
2422value:[]},hemisphereLights:{type:"sa",value:[],properties:{direction:{type:"v3"},skyColor:{type:"c"},groundColor:{type:"c"}}}},points:{diffuse:{type:"c",value:new THREE.Color(15658734)},opacity:{type:"f",value:1},size:{type:"f",value:1},scale:{type:"f",value:1},map:{type:"t",value:null},offsetRepeat:{type:"v4",value:new THREE.Vector4(0,0,1,1)}}};THREE.ShaderChunk.cube_frag="uniform samplerCube tCube;\nuniform float tFlip;\nvarying vec3 vWorldPosition;\n#include <common>\n#include <logdepthbuf_pars_fragment>\nvoid main() {\n\tgl_FragColor = textureCube( tCube, vec3( tFlip * vWorldPosition.x, vWorldPosition.yz ) );\n\t#include <logdepthbuf_fragment>\n}\n";
2423THREE.ShaderChunk.cube_vert="varying vec3 vWorldPosition;\n#include <common>\n#include <logdepthbuf_pars_vertex>\nvoid main() {\n\tvWorldPosition = transformDirection( position, modelMatrix );\n\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n\t#include <logdepthbuf_vertex>\n}\n";THREE.ShaderChunk.depth_frag="uniform float mNear;\nuniform float mFar;\nuniform float opacity;\n#include <common>\n#include <logdepthbuf_pars_fragment>\nvoid main() {\n\t#include <logdepthbuf_fragment>\n\t#ifdef USE_LOGDEPTHBUF_EXT\n\t\tfloat depth = gl_FragDepthEXT / gl_FragCoord.w;\n\t#else\n\t\tfloat depth = gl_FragCoord.z / gl_FragCoord.w;\n\t#endif\n\tfloat color = 1.0 - smoothstep( mNear, mFar, depth );\n\tgl_FragColor = vec4( vec3( color ), opacity );\n}\n";
2424THREE.ShaderChunk.depth_vert="#include <common>\n#include <morphtarget_pars_vertex>\n#include <logdepthbuf_pars_vertex>\nvoid main() {\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n}\n";THREE.ShaderChunk.depthRGBA_frag="#include <common>\n#include <logdepthbuf_pars_fragment>\nvec4 pack_depth( const in float depth ) {\n\tconst vec4 bit_shift = vec4( 256.0 * 256.0 * 256.0, 256.0 * 256.0, 256.0, 1.0 );\n\tconst vec4 bit_mask = vec4( 0.0, 1.0 / 256.0, 1.0 / 256.0, 1.0 / 256.0 );\n\tvec4 res = mod( depth * bit_shift * vec4( 255 ), vec4( 256 ) ) / vec4( 255 );\n\tres -= res.xxyz * bit_mask;\n\treturn res;\n}\nvoid main() {\n\t#include <logdepthbuf_fragment>\n\t#ifdef USE_LOGDEPTHBUF_EXT\n\t\tgl_FragData[ 0 ] = pack_depth( gl_FragDepthEXT );\n\t#else\n\t\tgl_FragData[ 0 ] = pack_depth( gl_FragCoord.z );\n\t#endif\n}\n";
2425THREE.ShaderChunk.depthRGBA_vert="#include <common>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\nvoid main() {\n\t#include <skinbase_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n}\n";THREE.ShaderChunk.distanceRGBA_frag="uniform vec3 lightPos;\nvarying vec4 vWorldPosition;\n#include <common>\nvec4 pack1K ( float depth ) {\n\tdepth /= 1000.0;\n\tconst vec4 bitSh = vec4( 256.0 * 256.0 * 256.0, 256.0 * 256.0, 256.0, 1.0 );\n\tconst vec4 bitMsk = vec4( 0.0, 1.0 / 256.0, 1.0 / 256.0, 1.0 / 256.0 );\n\tvec4 res = mod( depth * bitSh * vec4( 255 ), vec4( 256 ) ) / vec4( 255 );\n\tres -= res.xxyz * bitMsk;\n\treturn res;\n}\nfloat unpack1K ( vec4 color ) {\n\tconst vec4 bitSh = vec4( 1.0 / ( 256.0 * 256.0 * 256.0 ), 1.0 / ( 256.0 * 256.0 ), 1.0 / 256.0, 1.0 );\n\treturn dot( color, bitSh ) * 1000.0;\n}\nvoid main () {\n\tgl_FragColor = pack1K( length( vWorldPosition.xyz - lightPos.xyz ) );\n}\n";
2426THREE.ShaderChunk.distanceRGBA_vert="varying vec4 vWorldPosition;\n#include <common>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\nvoid main() {\n\t#include <skinbase_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <project_vertex>\n\t#include <worldpos_vertex>\n\tvWorldPosition = worldPosition;\n}\n";THREE.ShaderChunk.equirect_frag="uniform sampler2D tEquirect;\nuniform float tFlip;\nvarying vec3 vWorldPosition;\n#include <common>\n#include <logdepthbuf_pars_fragment>\nvoid main() {\n\tvec3 direction = normalize( vWorldPosition );\n\tvec2 sampleUV;
2426\n\tsampleUV.y = saturate( tFlip * direction.y * -0.5 + 0.5 );\n\tsampleUV.x = atan( direction.z, direction.x ) * RECIPROCAL_PI2 + 0.5;\n\tgl_FragColor = texture2D( tEquirect, sampleUV );\n\t#include <logdepthbuf_fragment>\n}\n";
2427THREE.ShaderChunk.equirect_vert="varying vec3 vWorldPosition;\n#include <common>\n#include <logdepthbuf_pars_vertex>\nvoid main() {\n\tvWorldPosition = transformDirection( position, modelMatrix );\n\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n\t#include <logdepthbuf_vertex>\n}\n";THREE.ShaderChunk.linedashed_frag="uniform vec3 diffuse;\nuniform float opacity;\nuniform float dashSize;\nuniform float totalSize;\nvarying float vLineDistance;\n#include <common>\n#include <color_pars_fragment>\n#include <fog_pars_fragment>\n#include <logdepthbuf_pars_fragment>\nvoid main() {\n\tif ( mod( vLineDistance, totalSize ) > dashSize ) {\n\t\tdiscard;\n\t}\n\tvec3 outgoingLight = vec3( 0.0 );\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <logdepthbuf_fragment>\n\t#include <color_fragment>\n\toutgoingLight = diffuseColor.rgb;\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <premultiplied_alpha_fragment>\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n}\n";
2428THREE.ShaderChunk.linedashed_vert="uniform float scale;\nattribute float lineDistance;\nvarying float vLineDistance;\n#include <common>\n#include <color_pars_vertex>\n#include <logdepthbuf_pars_vertex>\nvoid main() {\n\t#include <color_vertex>\n\tvLineDistance = scale * lineDistance;\n\tvec4 mvPosition = modelViewMatrix * vec4( position, 1.0 );\n\tgl_Position = projectionMatrix * mvPosition;\n\t#include <logdepthbuf_vertex>\n}\n";THREE.ShaderChunk.meshbasic_frag="uniform vec3 diffuse;\nuniform float opacity;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include <common>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <uv2_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <aomap_pars_fragment>\n#include <envmap_pars_fragment>\n#include <fog_pars_fragment>\n#include <specularmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\nvoid main() {\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <specularmap_fragment>\n\tReflectedLight reflectedLight;\n\treflectedLight.directDiffuse = vec3( 0.0 );\n\treflectedLight.directSpecular = vec3( 0.0 );\n\treflectedLight.indirectDiffuse = diffuseColor.rgb;\n\treflectedLight.indirectSpecular = vec3( 0.0 );\n\t#include <aomap_fragment>\n\tvec3 outgoingLight = reflectedLight.indirectDiffuse;\n\t#include <envmap_fragment>\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <premultiplied_alpha_fragment>\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n}\n";
2429THREE.ShaderChunk.meshbasic_vert="#include <common>\n#include <uv_pars_vertex>\n#include <uv2_pars_vertex>\n#include <envmap_pars_vertex>\n#include <color_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <uv2_vertex>\n\t#include <color_vertex>\n\t#include <skinbase_vertex>\n\t#ifdef USE_ENVMAP\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <worldpos_vertex>\n\t#include <envmap_vertex>\n}\n";
2430THREE.ShaderChunk.meshlambert_frag="uniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float opacity;\nvarying vec3 vLightFront;\n#ifdef DOUBLE_SIDED\n\tvarying vec3 vLightBack;\n#endif\n#include <common>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <uv2_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <envmap_pars_fragment>\n#include <bsdfs>\n#include <lights_pars>\n#include <fog_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <shadowmask_pars_fragment>\n#include <specularmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\nvoid main() {\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <specularmap_fragment>\n\t#include <emissivemap_fragment>\n\treflectedLight.indirectDiffuse = getAmbientLightIrradiance( ambientLightColor );\n\t#include <lightmap_fragment>\n\treflectedLight.indirectDiffuse *= BRDF_Diffuse_Lambert( diffuseColor.rgb );\n\t#ifdef DOUBLE_SIDED\n\t\treflectedLight.directDiffuse = ( gl_FrontFacing ) ? vLightFront : vLightBack;\n\t#else\n\t\treflectedLight.directDiffuse = vLightFront;\n\t#endif\n\treflectedLight.directDiffuse *= BRDF_Diffuse_Lambert( diffuseColor.rgb ) * getShadowMask();\n\t#include <aomap_fragment>\n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\n\t#include <envmap_fragment>\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <premultiplied_alpha_fragment>\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n}\n";
2431THREE.ShaderChunk.meshlambert_vert="#define LAMBERT\nvarying vec3 vLightFront;\n#ifdef DOUBLE_SIDED\n\tvarying vec3 vLightBack;\n#endif\n#include <common>\n#include <uv_pars_vertex>\n#include <uv2_pars_vertex>\n#include <envmap_pars_vertex>\n#include <bsdfs>\n#include <lights_pars>\n#include <color_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <uv2_vertex>\n\t#include <color_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <worldpos_vertex>\n\t#include <envmap_vertex>\n\t#include <lights_lambert_vertex>\n\t#include <shadowmap_vertex>\n}\n";
2432THREE.ShaderChunk.meshphong_frag="#define PHONG\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform vec3 specular;\nuniform float shininess;\nuniform float opacity;\n#include <common>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <uv2_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <envmap_pars_fragment>\n#include <fog_pars_fragment>\n#include <bsdfs>\n#include <lights_pars>\n#include <lights_phong_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <specularmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\nvoid main() {\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <specularmap_fragment>\n\t#include <normal_fragment>\n\t#include <emissivemap_fragment>\n\t#include <lights_phong_fragment>\n\t#include <lights_template>\n\t#include <aomap_fragment>\n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;\n\t#include <envmap_fragment>\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <premultiplied_alpha_fragment>\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n}\n";
2433THREE.ShaderChunk.meshphong_vert="#define PHONG\nvarying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include <common>\n#include <uv_pars_vertex>\n#include <uv2_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <envmap_pars_vertex>\n#include <lights_phong_pars_vertex>\n#include <color_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <uv2_vertex>\n\t#include <color_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n#ifndef FLAT_SHADED\n\tvNormal = normalize( transformedNormal );\n#endif\n\t#include <begin_vertex>\n\t#include <displacementmap_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\tvViewPosition = - mvPosition.xyz;\n\t#include <worldpos_vertex>\n\t#include <envmap_vertex>\n\t#include <lights_phong_vertex>\n\t#include <shadowmap_vertex>\n}\n";
2434THREE.ShaderChunk.meshstandard_frag="#define STANDARD\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float roughness;\nuniform float metalness;\nuniform float opacity;\nuniform float envMapIntensity;\nvarying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include <common>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <uv2_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <envmap_pars_fragment>\n#include <fog_pars_fragment>\n#include <bsdfs>\n#include <cube_uv_reflection_fragment>\n#include <lights_pars>\n#include <lights_standard_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <roughnessmap_pars_fragment>\n#include <metalnessmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\nvoid main() {\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <specularmap_fragment>\n\t#include <roughnessmap_fragment>\n\t#include <metalnessmap_fragment>\n\t#include <normal_fragment>\n\t#include <emissivemap_fragment>\n\t#include <lights_standard_fragment>\n\t#include <lights_template>\n\t#include <aomap_fragment>\n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <premultiplied_alpha_fragment>\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n}\n";
2435THREE.ShaderChunk.meshstandard_vert="#define STANDARD\nvarying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include <common>\n#include <uv_pars_vertex>\n#include <uv2_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <envmap_pars_vertex>\n#include <color_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <specularmap_pars_fragment>\n#include <logdepthbuf_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <uv2_vertex>\n\t#include <color_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n#ifndef FLAT_SHADED\n\tvNormal = normalize( transformedNormal );\n#endif\n\t#include <begin_vertex>\n\t#include <displacementmap_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\tvViewPosition = - mvPosition.xyz;\n\t#include <worldpos_vertex>\n\t#include <envmap_vertex>\n\t#include <shadowmap_vertex>\n}\n";
2436THREE.ShaderChunk.normal_frag="uniform float opacity;\nvarying vec3 vNormal;\n#include <common>\n#include <logdepthbuf_pars_fragment>\nvoid main() {\n\tgl_FragColor = vec4( 0.5 * normalize( vNormal ) + 0.5, opacity );\n\t#include <logdepthbuf_fragment>\n}\n";THREE.ShaderChunk.normal_vert="varying vec3 vNormal;\n#include <common>\n#include <morphtarget_pars_vertex>\n#include <logdepthbuf_pars_vertex>\nvoid main() {\n\tvNormal = normalize( normalMatrix * normal );\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n}\n";
2437THREE.ShaderChunk.points_frag="uniform vec3 diffuse;\nuniform float opacity;\n#include <common>\n#include <color_pars_fragment>\n#include <map_particle_pars_fragment>\n#include <fog_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\nvoid main() {\n\tvec3 outgoingLight = vec3( 0.0 );\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <logdepthbuf_fragment>\n\t#include <map_particle_fragment>\n\t#include <color_fragment>\n\t#include <alphatest_fragment>\n\toutgoingLight = diffuseColor.rgb;\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <premultiplied_alpha_fragment>\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n}\n";
2438THREE.ShaderChunk.points_vert="uniform float size;\nuniform float scale;\n#include <common>\n#include <color_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\nvoid main() {\n\t#include <color_vertex>\n\t#include <begin_vertex>\n\t#include <project_vertex>\n\t#ifdef USE_SIZEATTENUATION\n\t\tgl_PointSize = size * ( scale / - mvPosition.z );\n\t#else\n\t\tgl_PointSize = size;\n\t#endif\n\t#include <logdepthbuf_vertex>\n\t#include <worldpos_vertex>\n\t#include <shadowmap_vertex>\n}\n";
2439THREE.ShaderLib={basic:{uniforms:THREE.UniformsUtils.merge([THREE.UniformsLib.common,THREE.UniformsLib.aomap,THREE.UniformsLib.fog]),vertexShader:THREE.ShaderChunk.meshbasic_vert,fragmentShader:THREE.ShaderChunk.meshbasic_frag},lambert:{uniforms:THREE.UniformsUtils.merge([THREE.UniformsLib.common,THREE.UniformsLib.aomap,THREE.UniformsLib.lightmap,THREE.UniformsLib.emissivemap,THREE.UniformsLib.fog,THREE.UniformsLib.lights,{emissive:{type:"c",value:new THREE.Color(0)}}]),vertexShader:THREE.ShaderChunk.meshlambert_vert,
2440fragmentShader:THREE.ShaderChunk.meshlambert_frag},phong:{uniforms:THREE.UniformsUtils.merge([THREE.UniformsLib.common,THREE.UniformsLib.aomap,THREE.UniformsLib.lightmap,THREE.UniformsLib.emissivemap,THREE.UniformsLib.bumpmap,THREE.UniformsLib.normalmap,THREE.UniformsLib.displacementmap,THREE.UniformsLib.fog,THREE.UniformsLib.lights,{emissive:{type:"c",value:new THREE.Color(0)},specular:{type:"c",value:new THREE.Color(1118481)},shininess:{type:"f",value:30}}]),vertexShader:THREE.ShaderChunk.meshphong_vert,
2441fragmentShader:THREE.ShaderChunk.meshphong_frag},standard:{uniforms:THREE.UniformsUtils.merge([THREE.UniformsLib.common,THREE.UniformsLib.aomap,THREE.UniformsLib.lightmap,THREE.UniformsLib.emissivemap,THREE.UniformsLib.bumpmap,THREE.UniformsLib.normalmap,THREE.UniformsLib.displacementmap,THREE.UniformsLib.roughnessmap,THREE.UniformsLib.metalnessmap,THREE.UniformsLib.fog,THREE.UniformsLib.lights,{emissive:{type:"c",value:new THREE.Color(0)},roughness:{type:"f",value:.5},metalness:{type:"f",value:0},
2442envMapIntensity:{type:"f",value:1}}]),vertexShader:THREE.ShaderChunk.meshstandard_vert,fragmentShader:THREE.ShaderChunk.meshstandard_frag},points:{unifo
2442rms:THREE.UniformsUtils.merge([THREE.UniformsLib.points,THREE.UniformsLib.fog]),vertexShader:THREE.ShaderChunk.points_vert,fragmentShader:THREE.ShaderChunk.points_frag},dashed:{uniforms:THREE.UniformsUtils.merge([THREE.UniformsLib.common,THREE.UniformsLib.fog,{scale:{type:"f",value:1},dashSize:{type:"f",value:1},totalSize:{type:"f",value:2}}]),vertexShader:THREE.ShaderChunk.linedashed_vert,
2443fragmentShader:THREE.ShaderChunk.linedashed_frag},depth:{uniforms:{mNear:{type:"f",value:1},mFar:{type:"f",value:2E3},opacity:{type:"f",value:1}},vertexShader:THREE.ShaderChunk.depth_vert,fragmentShader:THREE.ShaderChunk.depth_frag},normal:{uniforms:{opacity:{type:"f",value:1}},vertexShader:THREE.ShaderChunk.normal_vert,fragmentShader:THREE.ShaderChunk.normal_frag},cube:{uniforms:{tCube:{type:"t",value:null},tFlip:{type:"f",value:-1}},vertexShader:THREE.ShaderChunk.cube_vert,fragmentShader:THREE.ShaderChunk.cube_frag},
2444equirect:{uniforms:{tEquirect:{type:"t",value:null},tFlip:{type:"f",value:-1}},vertexShader:THREE.ShaderChunk.equirect_vert,fragmentShader:THREE.ShaderChunk.equirect_frag},depthRGBA:{uniforms:{},vertexShader:THREE.ShaderChunk.depthRGBA_vert,fragmentShader:THREE.ShaderChunk.depthRGBA_frag},distanceRGBA:{uniforms:{lightPos:{type:"v3",value:new THREE.Vector3(0,0,0)}},vertexShader:THREE.ShaderChunk.distanceRGBA_vert,fragmentShader:THREE.ShaderChunk.distanceRGBA_frag}};
2445THREE.WebGLRenderer=function(a){function b(a,b,c,d){!0===P&&(a*=d,b*=d,c*=d);K.clearColor(a,b,c,d)}function c(){K.init();K.scissor(qa.copy(ya).multiplyScalar(aa));K.viewport(ka.copy(la).multiplyScalar(aa));b(ba.r,ba.g,ba.b,ga)}function d(){ma=ha=null;na="";ra=-1;K.reset()}function e(a){a.preventDefault();d();c();U.clear()}function f(a){a=a.target;a.removeEventListener("dispose",f);a:{var b=U.get(a);if(a.image&&b.__image__webglTextureCube)r.deleteTexture(b.__image__webglTextureCube);else{if(void 0===
2446b.__webglInit)break a;r.deleteTexture(b.__webglTexture)}U.delete(a)}ia.textures--}function g(a){a=a.target;a.removeEventListener("dispose",g);var b=U.get(a),c=U.get(a.texture);if(a&&void 0!==c.__webglTexture){r.deleteTexture(c.__webglTexture);if(a instanceof THREE.WebGLRenderTargetCube)for(c=0;6>c;c++)r.deleteFramebuffer(b.__webglFramebuffer[c]),r.deleteRenderbuffer(b.__webglDepthbuffer[c]);else r.deleteFramebuffer(b.__webglFramebuffer),r.deleteRenderbuffer(b.__webglDepthbuffer);U.delete(a.texture);
2447U.delete(a)}ia.textures--}function h(a){a=a.target;a.removeEventListener("dispose",h);k(a);U.delete(a)}function k(a){var b=U.get(a).program;a.program=void 0;void 0!==b&&oa.releaseProgram(b)}function l(a,b){return Math.abs(b[0])-Math.abs(a[0])}function p(a,b){return a.object.renderOrder!==b.object.renderOrder?a.object.renderOrder-b.object.renderOrder:a.material.id!==b.material.id?a.material.id-b.material.id:a.z!==b.z?a.z-b.z:a.id-b.id}function n(a,b){return a.object.renderOrder!==b.object.renderOrder?
2448a.object.renderOrder-b.object.renderOrder:a.z!==b.z?b.z-a.z:a.id-b.id}function m(a,b,c,d,e){var f;c.transparent?(d=S,f=++Y):(d=C,f=++Z);f=d[f];void 0!==f?(f.id=a.id,f.object=a,f.geometry=b,f.material=c,f.z=W.z,f.group=e):(f={id:a.id,object:a,geometry:b,material:c,z:W.z,group:e},d.push(f))}function q(a,b){if(!1!==a.visible){if(a.layers.test(b.layers))if(a instanceof THREE.Light)J.push(a);else if(a instanceof THREE.Sprite)!1!==a.frustumCulled&&!0!==za.intersectsObject(a)||ja.push(a);else if(a instanceof
2449THREE.LensFlare)ea.push(a);else if(a instanceof THREE.ImmediateRenderObject)!0===X.sortObjects&&(W.setFromMatrixPosition(a.matrixWorld),W.applyProjection(sa)),m(a,null,a.material,W.z,null);else if(a instanceof THREE.Mesh||a instanceof THREE.Line||a instanceof THREE.Points)if(a instanceof THREE.SkinnedMesh&&a.skeleton.update(),!1===a.frustumCulled||!0===za.intersectsObject(a)){var c=a.material;if(!0===c.visible){!0===X.sortObjects&&(W.setFromMatrixPosition(a.matrixWorld),W.applyProjection(sa));var d=
2450pa.update(a);if(c instanceof THREE.MultiMaterial)for(var e=d.groups,f=c.materials,c=0,g=e.length;c<g;c++){var h=e[c],k=f[h.materialIndex];!0===k.visible&&m(a,d,k,W.z,h)}else m(a,d,c,W.z,null)}}d=a.children;c=0;for(g=d.length;c<g;c++)q(d[c],b)}}function u(a,b,c,d){for(var e=0,f=a.length;e<f;e++){var g=a[e],h=g.object,k=g.geometry,l=void 0===d?g.material:d,g=g.group;h.modelViewMatrix.multiplyMatrices(b.matrixWorldInverse,h.matrixWorld);h.normalMatrix.getNormalMatrix(h.modelViewMatrix);if(h instanceof
2451THREE.ImmediateRenderObject){v(l);var m=t(b,c,l,h);na="";h.render(function(a){X.renderBufferImmediate(a,m,l)})}else X.renderBufferDirect(b,c,k,l,h,g)}}function v(a){a.side!==THREE.DoubleSide?K.enable(r.CULL_FACE):K.disable(r.CULL_FACE);K.setFlipSided(a.side===THREE.BackSide);!0===a.transparent?K.setBlending(a.blending,a.blendEquation,a.blendSrc,a.blendDst,a.blendEquationAlpha,a.blendSrcAlpha,a.blendDstAlpha,a.premultipliedAlpha):K.setBlending(THREE.NoBlending);K.setDepthFunc(a.depthFunc);K.setDepthTest(a.depthTest);
2452K.setDepthWrite(a.depthWrite);K.setColorWrite(a.colorWrite);K.setPolygonOffset(a.polygonOffset,a.polygonOffsetFactor,a.polygonOffsetUnits)}function t(a,b,c,d){ta=0;var e=U.get(c);void 0===e.program&&(c.needsUpdate=!0);void 0!==e.lightsHash&&e.lightsHash!==R.hash&&(c.needsUpdate=!0);if(c.needsUpdate){a:{var f=U.get(c),g=oa.getParameters(c,R,b,d),l=oa.getProgramCode(c,g),m=f.program,p=!0;if(void 0===m)c.addEventListener("dispose",h);else if(m.code!==l)k(c);else if(void 0!==g.shaderID)break a;else p=
2453!1;p&&(g.shaderID?(m=THREE.ShaderLib[g.shaderID],f.__webglShader={name:c.type,uniforms:THREE.UniformsUtils.clone(m.uniforms),vertexShader:m.vertexShader,fragmentShader:m.fragmentShader}):f.__webglShader={name:c.type,uniforms:c.uniforms,vertexShader:c.vertexShader,fragmentShader:c.fragmentShader},c.__webglShader=f.__webglShader,m=oa.acquireProgram(c,g,l),f.program=m,c.program=m);g=m.getAttributes();if(c.morphTargets)for(l=c.numSupportedMorphTargets=0;l<X.maxMorphTargets;l++)0<=g["morphTarget"+l]&&
2454c.numSupportedMorphTargets++;if(c.morphNormals)for(l=c.numSupportedMorphNormals=0;l<X.maxMorphNormals;l++)0<=g["morphNormal"+l]&&c.numSupportedMorphNormals++;f.uniformsList=[];var g=f.__webglShader.uniforms,l=f.program.getUniforms(),n;for(n in g)(m=l[n])&&f.uniformsList.push([f.__webglShader.uniforms[n],m]);if(c instanceof THREE.MeshPhongMaterial||c instanceof THREE.MeshLambertMaterial||c instanceof THREE.MeshStandardMaterial||c.lights)f.lightsHash=R.hash,g.ambientLightColor.value=R.ambient,g.directionalLights.value=
2455R.directional,g.spotLights.value=R.spot,g.pointLights.value=R.point,g.hemisphereLights.value=R.hemi,g.directionalShadowMap.value=R.directionalShadowMap,g.directionalShadowMatrix.value=R.directionalShadowMatrix,g.spotShadowMap.value=R.spotShadowMap,g.spotShadowMatrix.value=R.spotShadowMatrix,g.pointShadowMap.value=R.pointShadowMap,g.pointShadowMatrix.value=R.pointShadowMatrix;f.hasDynamicUniforms=!1;n=0;for(g=f.uniformsList.length;n<g;n++)if(!0===f.uniformsList[n][0].dynamic){f.hasDynamicUniforms=
2456!0;break}}c.needsUpdate=!1}m=l=p=!1;f=e.program;n=f.getUniforms();g=e.__webglShader.uniforms;f.id!==ha&&(r.useProgram(f.program),ha=f.id,m=l=p=!0);c.id!==ra&&(ra=c.id,l=!0);if(p||a!==ma)r.uniformMatrix4fv(n.projectionMatrix,!1,a.projectionMatrix.elements),da.logarithmicDepthBuffer&&r.uniform1f(n.logDepthBufFC,2/(Math.log(a.far+1)/Math.LN2)),a!==ma&&(ma=a,m=l=!0),(c instanceof THREE.ShaderMaterial||c instanceof THREE.MeshPhongMaterial||c instanceof THREE.MeshStandardMaterial||c.envMap)&&void 0!==n.cameraPosition&&
2457(W.setFromMatrixPosition(a.matrixWorld),r.uniform3f(n.cameraPosition,W.x,W.y,W.z)),(c instanceof THREE.MeshPhongMaterial||c instanceof THREE.MeshLambertMaterial||c instanceof THREE.MeshBasicMaterial||c instanceof THREE.MeshStandardMaterial||c instanceof THREE.ShaderMaterial||c.skinning)&&void 0!==n.viewMatrix&&r.uniformMatrix4fv(n.viewMatrix,!1,a.matrixWorldInverse.elements),void 0!==n.toneMappingExposure&&r.uniform1f(n.toneMappingExposure,X.toneMappingExposure),void 0!==n.toneMappingWhitePoint&&
2458r.uniform1f(n.toneMappingWhitePoint,X.toneMappingWhitePoint);c.skinning&&(d.bindMatrix&&void 0!==n.bindMatrix&&r.uniformMatrix4fv(n.bindMatrix,!1,d.bindMatrix.elements),d.bindMatrixInverse&&void 0!==n.bindMatrixInverse&&r.uniformMatrix4fv(n.bindMatrixInverse,!1,d.bindMatrixInverse.elements),da.floatVertexTextures&&d.skeleton&&d.skeleton.useVertexTexture?(void 0!==n.boneTexture&&(p=s(),r.uniform1i(n.boneTexture,p),X.setTexture(d.skeleton.boneTexture,p)),void 0!==n.boneTextureWidth&&r.uniform1i(n.boneTextureWidth,
2459d.skeleton.boneTextureWidth),void 0!==n.boneTextureHeight&&r.uniform1i(n.boneTextureHeight,d.skeleton.boneTextureHeight)):d.skeleton&&d.skeleton.boneMatrices&&void 0!==n.boneGlobalMatrices&&r.uniformMatrix4fv(n.boneGlobalMatrices,!1,d.skeleton.boneMatrices));if(l){if(c instanceof THREE.MeshPhongMaterial||c instanceof THREE.MeshLambertMaterial||c instanceof THREE.MeshStandardMaterial||c.lights)l=m,g.ambientLightColor.needsUpdate=l,g.directionalLights.needsUpdate=l,g.pointLights.needsUpdate=l,g.spotLights.needsUpdate=
2460l,g.hemisphereLights.needsUpdate=l;b&&c.fog&&(g.fogColor.value=b.color,b instanceof THREE.Fog?(g.fogNear.value=b.near,g.fogFar.value=b.far):b instanceof THREE.FogExp2&&(g.fogDensity.value=b.density));if(c instanceof THREE.MeshBasicMaterial||c instanceof THREE.MeshLambertMaterial||c instanceof THREE.MeshPhongMaterial||c instanceof THREE.MeshStandardMaterial){g.opacity.value=c.opacity;g.diffuse.value=c.color;c.emissive&&g.emissive.value.copy(c.emissive).multiplyScalar(c.emissiveIntensity);g.map.value=
2461c.map;g.specularMap.value=c.specularMap;g.alphaMap.value=c.alphaMap;c.aoMap&&(g.aoMap.value=c.aoMap,g.aoMapIntensity.value=c.aoMapIntensity);var q;c.map?q=c.map:c.specularMap?q=c.specularMap:c.displacementMap?q=c.displacementMap:c.normalMap?q=c.normalMap:c.bumpMap?q=c.bumpMap:c.roughnessMap?q=c.roughnessMap:c.metalnessMap?q=c.metalnessMap:c.alphaMap?q=c.alphaMap:c.emissiveMap&&(q=c.emissiveMap);void 0!==q&&(q instanceof THREE.WebGLRenderTarget&&(q=q.texture),b=q.offset,q=q.repeat,g.offsetRepeat.value.set(b.x,
2462b.y,q.x,q.y));g.envMap.value=c.envMap;g.flipEnvMap.value=c.envMap instanceof THREE.WebGLRenderTargetCube?1:-1;g.reflectivity.value=c.reflectivity;g.refractionRatio.value=c.refractionRatio}c instanceof THREE.LineBasicMaterial?(g.diffuse.value=c.color,g.opacity.value=c.opacity):c instanceof THREE.LineDashedMaterial?(g.diffuse.value=c.color,g.opacity.value=c.opacity,g.dashSize.value=c.dashSize,g.totalSize.value=c.dashSize
2462+c.gapSize,g.scale.value=c.scale):c instanceof THREE.PointsMaterial?(g.diffuse.value=
2463c.color,g.opacity.value=c.opacity,g.size.value=c.size*aa,g.scale.value=A.clientHeight/2,g.map.value=c.map,null!==c.map&&(q=c.map.offset,c=c.map.repeat,g.offsetRepeat.value.set(q.x,q.y,c.x,c.y))):c instanceof THREE.MeshLambertMaterial?(c.lightMap&&(g.lightMap.value=c.lightMap,g.lightMapIntensity.value=c.lightMapIntensity),c.emissiveMap&&(g.emissiveMap.value=c.emissiveMap)):c instanceof THREE.MeshPhongMaterial?(g.specular.value=c.specular,g.shininess.value=Math.max(c.shininess,1E-4),c.lightMap&&(g.lightMap.value=
2464c.lightMap,g.lightMapIntensity.value=c.lightMapIntensity),c.emissiveMap&&(g.emissiveMap.value=c.emissiveMap),c.bumpMap&&(g.bumpMap.value=c.bumpMap,g.bumpScale.value=c.bumpScale),c.normalMap&&(g.normalMap.value=c.normalMap,g.normalScale.value.copy(c.normalScale)),c.displacementMap&&(g.displacementMap.value=c.displacementMap,g.displacementScale.value=c.displacementScale,g.displacementBias.value=c.displacementBias)):c instanceof THREE.MeshStandardMaterial?(g.roughness.value=c.roughness,g.metalness.value=
2465c.metalness,c.roughnessMap&&(g.roughnessMap.value=c.roughnessMap),c.metalnessMap&&(g.metalnessMap.value=c.metalnessMap),c.lightMap&&(g.lightMap.value=c.lightMap,g.lightMapIntensity.value=c.lightMapIntensity),c.emissiveMap&&(g.emissiveMap.value=c.emissiveMap),c.bumpMap&&(g.bumpMap.value=c.bumpMap,g.bumpScale.value=c.bumpScale),c.normalMap&&(g.normalMap.value=c.normalMap,g.normalScale.value.copy(c.normalScale)),c.displacementMap&&(g.displacementMap.value=c.displacementMap,g.displacementScale.value=
2466c.displacementScale,g.displacementBias.value=c.displacementBias),c.envMap&&(g.envMapIntensity.value=c.envMapIntensity)):c instanceof THREE.MeshDepthMaterial?(g.mNear.value=a.near,g.mFar.value=a.far,g.opacity.value=c.opacity):c instanceof THREE.MeshNormalMaterial&&(g.opacity.value=c.opacity);E(e.uniformsList)}r.uniformMatrix4fv(n.modelViewMatrix,!1,d.modelViewMatrix.elements);n.normalMatrix&&r.uniformMatrix3fv(n.normalMatrix,!1,d.normalMatrix.elements);void 0!==n.modelMatrix&&r.uniformMatrix4fv(n.modelMatrix,
2467!1,d.matrixWorld.elements);if(!0===e.hasDynamicUniforms){e=e.uniformsList;c=[];q=0;for(b=e.length;q<b;q++)n=e[q][0],g=n.onUpdateCallback,void 0!==g&&(g.bind(n)(d,a),c.push(e[q]));E(c)}return f}function s(){var a=ta;a>=da.maxTextures&&console.warn("WebGLRenderer: trying to use "+a+" texture units while this GPU supports only "+da.maxTextures);ta+=1;return a}function w(a,b,c,d){var e;if("1i"===b)r.uniform1i(c,d);else if("1f"===b)r.uniform1f(c,d);else if("2f"===b)r.uniform2f(c,d[0],d[1]);else if("3f"===
2468b)r.uniform3f(c,d[0],d[1],d[2]);else if("4f"===b)r.uniform4f(c,d[0],d[1],d[2],d[3]);else if("1iv"===b)r.uniform1iv(c,d);else if("3iv"===b)r.uniform3iv(c,d);else if("1fv"===b)r.uniform1fv(c,d);else if("2fv"===b)r.uniform2fv(c,d);else if("3fv"===b)r.uniform3fv(c,d);else if("4fv"===b)r.uniform4fv(c,d);else if("Matrix2fv"===b)r.uniformMatrix2fv(c,!1,d);else if("Matrix3fv"===b)r.uniformMatrix3fv(c,!1,d);else if("Matrix4fv"===b)r.uniformMatrix4fv(c,!1,d);else if("i"===b)r.uniform1i(c,d);else if("f"===b)r.uniform1f(c,
2469d);else if("v2"===b)r.uniform2f(c,d.x,d.y);else if("v3"===b)r.uniform3f(c,d.x,d.y,d.z);else if("v4"===b)r.uniform4f(c,d.x,d.y,d.z,d.w);else if("c"===b)r.uniform3f(c,d.r,d.g,d.b);else if("s"===b){a=a.properties;for(var g in a){e=a[g];var f=c[g],h=d[g];w(e,e.type,f,h)}}else if("sa"===b){a=a.properties;b=0;for(var k=d.length;b<k;b++)for(g in a)e=a[g],f=c[b][g],h=d[b][g],w(e,e.type,f,h)}else if("iv1"===b)r.uniform1iv(c,d);else if("iv"===b)r.uniform3iv(c,d);else if("fv1"===b)r.uniform1fv(c,d);else if("fv"===
2470b)r.uniform3fv(c,d);else if("v2v"===b){void 0===a._array&&(a._array=new Float32Array(2*d.length));e=b=0;for(g=d.length;b<g;b++,e+=2)a._array[e+0]=d[b].x,a._array[e+1]=d[b].y;r.uniform2fv(c,a._array)}else if("v3v"===b){void 0===a._array&&(a._array=new Float32Array(3*d.length));e=b=0;for(g=d.length;b<g;b++,e+=3)a._array[e+0]=d[b].x,a._array[e+1]=d[b].y,a._array[e+2]=d[b].z;r.uniform3fv(c,a._array)}else if("v4v"===b){void 0===a._array&&(a._array=new Float32Array(4*d.length));e=b=0;for(g=d.length;b<g;b++,
2471e+=4)a._array[e+0]=d[b].x,a._array[e+1]=d[b].y,a._array[e+2]=d[b].z,a._array[e+3]=d[b].w;r.uniform4fv(c,a._array)}else if("m2"===b)r.uniformMatrix2fv(c,!1,d.elements);
2471else if("m3"===b)r.uniformMatrix3fv(c,!1,d.elements);else if("m3v"===b){void 0===a._array&&(a._array=new Float32Array(9*d.length));b=0;for(g=d.length;b<g;b++)d[b].flattenToArrayOffset(a._array,9*b);r.uniformMatrix3fv(c,!1,a._array)}else if("m4"===b)r.uniformMatrix4fv(c,!1,d.elements);else if("m4v"===b){void 0===a._array&&(a._array=new Float32Array(16*
2472d.length));b=0;for(g=d.length;b<g;b++)d[b].flattenToArrayOffset(a._array,16*b);r.uniformMatrix4fv(c,!1,a._array)}else if("t"===b)e=s(),r.uniform1i(c,e),d&&(d instanceof THREE.CubeTexture||Array.isArray(d.image)&&6===d.image.length?y(d,e):d instanceof THREE.WebGLRenderTargetCube?B(d.texture,e):d instanceof THREE.WebGLRenderTarget?X.setTexture(d.texture,e):X.setTexture(d,e));else if("tv"===b){void 0===a._array&&(a._array=[]);b=0;for(g=a.value.length;b<g;b++)a._array[b]=s();r.uniform1iv(c,a._array);
2473b=0;for(g=a.value.length;b<g;b++)d=a.value[b],e=a._array[b],d&&(d instanceof THREE.CubeTexture||d.image instanceof Array&&6===d.image.length?y(d,e):d instanceof THREE.WebGLRenderTarget?X.setTexture(d.texture,e):d instanceof THREE.WebGLRenderTargetCube?B(d.texture,e):X.setTexture(d,e))}else console.warn("THREE.WebGLRenderer: Unknown uniform type: "+b)}function E(a){for(var b=0,c=a.length;b<c;b++){var d=a[b][0];!1!==d.needsUpdate&&w(d,d.type,a[b][1],d.value)}}function x(a,b,c){c?(r.texParameteri(a,
2474r.TEXTURE_WRAP_S,L(b.wrapS)),r.texParameteri(a,r.TEXTURE_WRAP_T,L(b.wrapT)),r.texParameteri(a,r.TEXTURE_MAG_FILTER,L(b.magFilter)),r.texParameteri(a,r.TEXTURE_MIN_FILTER,L(b.minFilter))):(r.texParameteri(a,r.TEXTURE_WRAP_S,r.CLAMP_TO_EDGE),r.texParameteri(a,r.TEXTURE_WRAP_T,r.CLAMP_TO_EDGE),b.wrapS===THREE.ClampToEdgeWrapping&&b.wrapT===THREE.ClampToEdgeWrapping||console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.wrapS and Texture.wrapT should be set to THREE.ClampToEdgeWrapping.",
2475b),r.texParameteri(a,r.TEXTURE_MAG_FILTER,H(b.magFilter)),r.texParameteri(a,r.TEXTURE_MIN_FILTER,H(b.minFilter)),b.minFilter!==THREE.NearestFilter&&b.minFilter!==THREE.LinearFilter&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.minFilter should be set to THREE.NearestFilter or THREE.LinearFilter.",b));!(c=V.get("EXT_texture_filter_anisotropic"))||b.type===THREE.FloatType&&null===V.get("OES_texture_float_linear")||b.type===THREE.HalfFloatType&&null===V.get("OES_texture_half_float_linear")||
2476!(1<b.anisotropy||U.get(b).__currentAnisotropy)||(r.texParameterf(a,c.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(b.anisotropy,X.getMaxAnisotropy())),U.get(b).__currentAnisotropy=b.anisotropy)}function D(a,b){if(a.width>b||a.height>b){var c=b/Math.max(a.width,a.height),d=document.createElement("canvas");d.width=Math.floor(a.width*c);d.height=Math.floor(a.height*c);d.getContext("2d").drawImage(a,0,0,a.width,a.height,0,0,d.width,d.height);console.warn("THREE.WebGLRenderer: image is too big ("+a.width+"x"+a.height+
2477"). Resized to "+d.width+"x"+d.height,a);return d}return a}function z(a){return THREE.Math.isPowerOfTwo(a.width)&&THREE.Math.isPowerOfTwo(a.height)}function y(a,b){var c=U.get(a);if(6===a.image.length)if(0<a.version&&c.__version!==a.version){c.__image__webglTextureCube||(a.addEventListener("dispose",f),c.__image__webglTextureCube=r.createTexture(),ia.textures++);K.activeTexture(r.TEXTURE0+b);K.bindTexture(r.TEXTURE_CUBE_MAP,c.__image__webglTextureCube);r.pixelStorei(r.UNPACK_FLIP_Y_WEBGL,a.flipY);
2478for(var d=a instanceof THREE.CompressedTexture,e=a.image[0]instanceof THREE.DataTexture,g=[],h=0;6>h;h++)g[h]=!X.autoScaleCubemaps||d||e?e?a.image[h].image:a.image[h]:D(a.image[h],da.maxCubemapSize);var k=z(g[0]),l=L(a.format),m=L(a.type);x(r.TEXTURE_CUBE_MAP,a,k);for(h=0;6>h;h++)if(d)for(var n,p=g[h].mipmaps,q=0,s=p.length;q<s;q++)n=p[q],a.format!==THREE.RGBAFormat&&a.format!==THREE.RGBFormat?-1<K.getCompressedTextureFormats().indexOf(l)?K.compressedTexImage2D(r.TEXTURE_CUBE_MAP_POSITIVE_X+h,q,l,
2479n.width,n.height,0,n.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .setCubeTexture()"):K.texImage2D(r.TEXTURE_CUBE_MAP_POSITIVE_X+h,q,l,n.width,n.height,0,l,m,n.data);else e?K.texImage2D(r.TEXTURE_CUBE_MAP_POSITIVE_X+h,0,l,g[h].width,g[h].height,0,l,m,g[h].data):K.texImage2D(r.TEXTURE_CUBE_MAP_POSITIVE_X+h,0,l,l,m,g[h]);a.generateMipmaps&&k&&r.generateMipmap(r.TEXTURE_CUBE_MAP);c.__version=a.version;
2479if(a.onUpdate)a.onUpdate(a)}else K.activeTexture(r.TEXTURE0+
2480b),K.bindTexture(r.TEXTURE_CUBE_MAP,c.__image__webglTextureCube)}function B(a,b){K.activeTexture(r.TEXTURE0+b);K.bindTexture(r.TEXTURE_CUBE_MAP,U.get(a).__webglTexture)}function G(a,b,c,d){var e=L(b.texture.format),g=L(b.texture.type);K.texImage2D(d,0,e,b.width,b.height,0,e,g,null);r.bindFramebuffer(r.FRAMEBUFFER,a);r.framebufferTexture2D(r.FRAMEBUFFER,c,d,U.get(b.texture).__webglTexture,0);r.bindFramebuffer(r.FRAMEBUFFER,null)}function F(a,b){r.bindRenderbuffer(r.RENDERBUFFER,a);b.depthBuffer&&!b.stencilBuffer?
2481(r.renderbufferStorage(r.RENDERBUFFER,r.DEPTH_COMPONENT16,b.width,b.height),r.framebufferRenderbuffer(r.FRAMEBUFFER,r.DEPTH_ATTACHMENT,r.RENDERBUFFER,a)):b.depthBuffer&&b.stencilBuffer?(r.renderbufferStorage(r.RENDERBUFFER,r.DEPTH_STENCIL,b.width,b.height),r.framebufferRenderbuffer(r.FRAMEBUFFER,r.DEPTH_STENCIL_ATTACHMENT,r.RENDERBUFFER,a)):r.renderbufferStorage(r.RENDERBUFFER,r.RGBA4,b.width,b.height);r.bindRenderbuffer(r.RENDERBUFFER,null)}function H(a){return a===THREE.NearestFilter||a===THREE.NearestMipMapNearestFilter||
2482a===THREE.NearestMipMapLinearFilter?r.NEAREST:r.LINEAR}function L(a){var b;if(a===THREE.RepeatWrapping)return r.REPEAT;if(a===THREE.ClampToEdgeWrapping)return r.CLAMP_TO_EDGE;if(a===THREE.MirroredRepeatWrapping)return r.MIRRORED_REPEAT;if(a===THREE.NearestFilter)return r.NEAREST;if(a===THREE.NearestMipMapNearestFilter)return r.NEAREST_MIPMAP_NEAREST;if(a===THREE.NearestMipMapLinearFilter)return r.NEAREST_MIPMAP_LINEAR;if(a===THREE.LinearFilter)return r.LINEAR;if(a===THREE.LinearMipMapNearestFilter)return r.LINEAR_MIPMAP_NEAREST;
2483if(a===THREE.LinearMipMapLinearFilter)return r.LINEAR_MIPMAP_LINEAR;if(a===THREE.UnsignedByteType)return r.UNSIGNED_BYTE;if(a===THREE.UnsignedShort4444Type)return r.UNSIGNED_SHORT_4_4_4_4;if(a===THREE.UnsignedShort5551Type)return r.UNSIGNED_SHORT_5_5_5_1;if(a===THREE.UnsignedShort565Type)return r.UNSIGNED_SHORT_5_6_5;if(a===THREE.ByteType)return r.BYTE;if(a===THREE.ShortType)return r.SHORT;if(a===THREE.UnsignedShortType)return r.UNSIGNED_SHORT;if(a===THREE.IntType)return r.INT;if(a===THREE.UnsignedIntType)return r.UNSIGNED_INT;
2484if(a===THREE.FloatType)return r.FLOAT;b=V.get("OES_texture_half_float");if(null!==b&&a===THREE.HalfFloatType)return b.HALF_FLOAT_OES;if(a===THREE.AlphaFormat)return r.ALPHA;if(a===THREE.RGBFormat)return r.RGB;if(a===THREE.RGBAFormat)return r.RGBA;if(a===THREE.LuminanceFormat)return r.LUMINANCE;if(a===THREE.LuminanceAlphaFormat)return r.LUMINANCE_ALPHA;if(a===THREE.AddEquation)return r.FUNC_ADD;if(a===THREE.SubtractEquation)return r.FUNC_SUBTRACT;if(a===THREE.ReverseSubtractEquation)return r.FUNC_REVERSE_SUBTRACT;
2485if(a===THREE.ZeroFactor)return r.ZERO;if(a===THREE.OneFactor)return r.ONE;if(a===THREE.SrcColorFactor)return r.SRC_COLOR;if(a===THREE.OneMinusSrcColorFactor)return r.ONE_MINUS_SRC_COLOR;if(a===THREE.SrcAlphaFactor)return r.SRC_ALPHA;if(a===THREE.OneMinusSrcAlphaFactor)return r.ONE_MINUS_SRC_ALPHA;if(a===THREE.DstAlphaFactor)return r.DST_ALPHA;if(a===THREE.OneMinusDstAlphaFactor)return r.ONE_MINUS_DST_ALPHA;if(a===THREE.DstColorFactor)return r.DST_COLOR;if(a===THREE.OneMinusDstColorFactor)return r.ONE_MINUS_DST_COLOR;
2486if(a===THREE.SrcAlphaSaturateFactor)return r.SRC_ALPHA_SATURATE;b=V.get("WEBGL_compressed_texture_s3tc");if(null!==b){if(a===THREE.RGB_S3TC_DXT1_Format)return b.COMPRESSED_RGB_S3TC_DXT1_EXT;if(a===THREE.RGBA_S3TC_DXT1_Format)return b.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(a===THREE.RGBA_S3TC_DXT3_Format)return b.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(a===THREE.RGBA_S3TC_DXT5_Format)return b.COMPRESSED_RGBA_S3TC_DXT5_EXT}b=V.get("WEBGL_compressed_texture_pvrtc");if(null!==b){if(a===THREE.RGB_PVRTC_4BPPV1_Format)return b.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;
2487if(a===THREE.RGB_PVRTC_2BPPV1_Format)return b.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(a===THREE.RGBA_PVRTC_4BPPV1_Format)return b.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(a===THREE.RGBA_PVRTC_2BPPV1_Format)return b.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}b=V.get("WEBGL_compressed_texture_etc1");if(null!==b&&a===THREE.RGB_ETC1_Format)return b.COMPRESSED_RGB_ETC1_WEBGL;b=V.get("EXT_blend_minmax");if(null!==b){if(a===THREE.MinEquation)return b.MIN_EXT;if(a===THREE.MaxEquation)return b.MAX_EXT}return 0}console.log("THREE.WebGLRenderer",
2488THREE.REVISION);a=a||{};var A=void 0!==a.canvas?a.canvas:document.createElement("canvas"),N=void 0!==a.context?a.context:null,M=void 0!==a.alpha?a.alpha:!1,I=void 0!==a.depth?a.depth:!0,O=void 0!==a.stencil?a.stencil:!0,Q=void 0!==a.antialias?a.antialias:!1,P=void 0!==a.premultipliedAlpha?a.premultipliedAlpha:!0,T=void 0!==a.preserveDrawingBuffer?a.preserveDrawingBuffer:!1,J=[],C=[],Z=-1,S=[],Y=-1,$=new Float32Array(8),ja=[],ea=[];this.domElement=A;this.context=null;this.sortObjects=this.autoClearStencil=
2489this.autoClearDepth=this.autoClearColor=this.autoClear=!0;this.gammaFactor=2;this.physicallyCorrectLights=this.gammaOutput=this.gammaInput=!1;this.toneMapping=THREE.LinearToneMapping;this.toneMappingWhitePoint=this.toneMappingExposure=1;this.maxMorphTargets=8;this.maxMorphNormals=4;this.autoScaleCubemaps=!0;var X=this,ha=null,ca=null,ua=null,ra=-1,na="",ma=null,qa=new THREE.Vector4,Aa=null,ka=new THREE.Vector4,ta=0,ba=new THREE.Color(0),ga=0,va=A.width,wa=A.height,aa=1,ya=new THREE.Vector4(0,0,va,
2490wa),Ba=!1,la=new THREE.Vector4(0,0,va,wa),za=new THREE.Frustum,sa=new THREE.Matrix4,W=new THREE.Vector3,R={hash:"",ambient:[0,0,0],directional:[],directionalShadowMap:[],directionalShadowMatrix:[],spot:[],spotShadowMap:[],spotShadowMatrix:[],point:[],pointShadowMap:[],pointShadowMatrix:[],hemi:[],shadows:[],shadowsPointLight:0},ia={geometries:0,textures:0},fa={calls:0,vertices:0,faces:0,points:0};this.info={render:fa,memory:ia,programs:null};var r;try{M={alpha:M,depth:I,stencil:O,antialias:Q,premultipliedAlpha:P,
2491preserveDrawingBuffer:T};r=N||A.getContext("webgl",M)||A.getContext("experimental-webgl",M);if(null===r){if(null!==A.getContext("webgl"))throw"Error creating WebGL context with your selected attributes.";throw"Error creating WebGL context.";}void 0===r.getShaderPrecisionFormat&&(r.getShaderPrecisionFormat=function(){return{rangeMin:1,rangeMax:1,precision:1}});A.addEventListener("webglcontextlost",e,!1)}catch(Da){console.error("THREE.WebGLRenderer: "+Da)}var V=new THREE.WebGLExtensions(r);V.get("OES_texture_float");
2492V.get("OES_texture_float_linear");V.get("OES_texture_half_float");V.get("OES_texture_half_float_linear");V.get("OES_standard_derivatives");V.get("ANGLE_instanced_arrays");V.get("OES_element_index_uint")&&(THREE.BufferGeometry.MaxIndex=4294967296);var da=new THREE.WebGLCapabilities(r,V,a),K=new THREE.WebGLState(r,V,L),U=new THREE.WebGLProperties,pa=new THREE.WebGLObjects(r,U,this.info),oa=new THREE.WebGLPrograms(this,da),xa=new THREE.WebGLLights;this.info.programs=oa.programs;var Ea=new THREE.WebGLBufferRenderer(r,
2493V,fa),Fa=new THREE.WebGLIndexedBufferRenderer(r,V,fa);c();this.context=r;this.capabilities=da;this.extensions=V;this.properties=U;this.state=K;var Ca=new THREE.WebGLShadowMap(this,R,pa);this.shadowMap=Ca;var Ga=new THREE.SpritePlugin(this,ja),Ha=new THREE.LensFlarePlugin(this,ea);this.getContext=function(){return r};this.getContextAttributes=function(){return r.getContextAttributes()};this.forceContextLoss=function(){V.get("WEBGL_lose_context").loseContext()};this.getMaxAnisotropy=function(){var a;
2494return function(){if(void 0!==a)return a;var b=V.get("EXT_texture_filter_anisotropic");return a=null!==b?r.getParameter(b.MAX_TEXTURE_MAX_ANISOTROPY_EXT):0}}();
2494this.getPrecision=function(){return da.precision};this.getPixelRatio=function(){return aa};this.setPixelRatio=function(a){void 0!==a&&(aa=a,this.setSize(la.z,la.w,!1))};this.getSize=function(){return{width:va,height:wa}};this.setSize=function(a,b,c){va=a;wa=b;A.width=a*aa;A.height=b*aa;!1!==c&&(A.style.width=a+"px",A.style.height=b+"px");this.setViewport(0,
24950,a,b)};this.setViewport=function(a,b,c,d){K.viewport(la.set(a,b,c,d))};this.setScissor=function(a,b,c,d){K.scissor(ya.set(a,b,c,d))};this.setScissorTest=function(a){K.setScissorTest(Ba=a)};this.getClearColor=function(){return ba};this.setClearColor=function(a,c){ba.set(a);ga=void 0!==c?c:1;b(ba.r,ba.g,ba.b,ga)};this.getClearAlpha=function(){return ga};this.setClearAlpha=function(a){ga=a;b(ba.r,ba.g,ba.b,ga)};this.clear=function(a,b,c){var d=0;if(void 0===a||a)d|=r.COLOR_BUFFER_BIT;if(void 0===b||
2496b)d|=r.DEPTH_BUFFER_BIT;if(void 0===c||c)d|=r.STENCIL_BUFFER_BIT;r.clear(d)};this.clearColor=function(){this.clear(!0,!1,!1)};this.clearDepth=function(){this.clear(!1,!0,!1)};this.clearStencil=function(){this.clear(!1,!1,!0)};this.clearTarget=function(a,b,c,d){this.setRenderTarget(a);this.clear(b,c,d)};this.resetGLState=d;this.dispose=function(){A.removeEventListener("webglcontextlost",e,!1)};this.renderBufferImmediate=function(a,b,c){K.initAttributes();var d=U.get(a);a.hasPositions&&!d.position&&
2497(d.position=r.createBuffer());a.hasNormals&&!d.normal&&(d.normal=r.createBuffer());a.hasUvs&&!d.uv&&(d.uv=r.createBuffer());a.hasColors&&!d.color&&(d.color=r.createBuffer());b=b.getAttributes();a.hasPositions&&(r.bindBuffer(r.ARRAY_BUFFER,d.position),r.bufferData(r.ARRAY_BUFFER,a.positionArray,r.DYNAMIC_DRAW),K.enableAttribute(b.position),r.vertexAttribPointer(b.position,3,r.FLOAT,!1,0,0));if(a.hasNormals){r.bindBuffer(r.ARRAY_BUFFER,d.normal);if("MeshPhongMaterial"!==c.type&&"MeshStandardMaterial"!==
2498c.type&&c.shading===THREE.FlatShading)for(var e=0,g=3*a.count;e<g;e+=9){var f=a.normalArray,h=(f[e+0]+f[e+3]+f[e+6])/3,k=(f[e+1]+f[e+4]+f[e+7])/3,l=(f[e+2]+f[e+5]+f[e+8])/3;f[e+0]=h;f[e+1]=k;f[e+2]=l;f[e+3]=h;f[e+4]=k;f[e+5]=l;f[e+6]=h;f[e+7]=k;f[e+8]=l}r.bufferData(r.ARRAY_BUFFER,a.normalArray,r.DYNAMIC_DRAW);K.enableAttribute(b.normal);r.vertexAttribPointer(b.normal,3,r.FLOAT,!1,0,0)}a.hasUvs&&c.map&&(r.bindBuffer(r.ARRAY_BUFFER,d.uv),r.bufferData(r.ARRAY_BUFFER,a.uvArray,r.DYNAMIC_DRAW),K.enableAttribute(b.uv),
2499r.vertexAttribPointer(b.uv,2,r.FLOAT,!1,0,0));a.hasColors&&c.vertexColors!==THREE.NoColors&&(r.bindBuffer(r.ARRAY_BUFFER,d.color),r.bufferData(r.ARRAY_BUFFER,a.colorArray,r.DYNAMIC_DRAW),K.enableAttribute(b.color),r.vertexAttribPointer(b.color,3,r.FLOAT,!1,0,0));K.disableUnusedAttributes();r.drawArrays(r.TRIANGLES,0,a.count);a.count=0};this.renderBufferDirect=function(a,b,c,d,e,g){v(d);var f=t(a,b,d,e),h=!1;a=c.id+"_"+f.id+"_"+d.wireframe;a!==na&&(na=a,h=!0);b=e.morphTargetInfluences;if(void 0!==
2500b){a=[];for(var k=0,h=b.length;k<h;k++){var m=b[k];a.push([m,k])}a.sort(l);8<a.length&&(a.length=8);for(var n=c.morphAttributes,k=0,h=a.length;k<h;k++)m=a[k],$[k]=m[0],0!==m[0]?(b=m[1],!0===d.morphTargets&&n.position&&c.addAttribute("morphTarget"+k,n.position[b]),!0===d.morphNormals&&n.normal&&c.addAttribute("morphNormal"+k,n.normal[b])):(!0===d.morphTargets&&c.removeAttribute("morphTarget"+k),!0===d.morphNormals&&c.removeAttribute("morphNormal"+k));a=f.getUniforms();null!==a.morphTargetInfluences&&
2501r.uniform1fv(a.morphTargetInfluences,$);h=!0}b=c.index;k=c.attributes.position;!0===d.wireframe&&(b=pa.getWireframeAttribute(c));null!==b?(a=Fa,a.setIndex(b)):a=Ea;if(h){a:{var h=void 0,p;if(c instanceof THREE.InstancedBufferGeometry&&(p=V.get("ANGLE_instanced_arrays"),null===p)){console.error("THREE.WebGLRenderer.setupVertexAttributes: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.");break a}void 0===h&&(h=0);K.initAttributes();var m=c.attributes,
2502f=f.getAttributes(),n=d.defaultAttributeValues,q;for(q in f){var s=f[q];if(0<=s){var u=m[q];if(void 0!==u){var x=u.itemSize,w=pa.getAttributeBuffer(u);if(u instanceof THREE.InterleavedBufferAttribute){var E=u.data,z=E.stride,u=u.offset;E instanceof THREE.InstancedInterleavedBuffer?(K.enableAttributeAndDivisor(s,E.meshPerAttribute,p),void 0===c.maxInstancedCount&&(c.maxInstancedCount=E.meshPerAttribute*E.count)):K.enableAttribute(s);r.bindBuffer(r.ARRAY_BUFFER,w);r.vertexAttribPointer(s,x,r.FLOAT,
2503!1,z*E.array.BYTES_PER_ELEMENT,(h*z+u)*E.array.BYTES_PER_ELEMENT)}else u instanceof THREE.InstancedBufferAttribute?(K.enableAttributeAndDivisor(s,u.meshPerAttribute,p),void 0===c.maxInstancedCount&&(c.maxInstancedCount=u.meshPerAttribute*u.count)):K.enableAttribute(s),r.bindBuffer(r.ARRAY_BUFFER,w),r.vertexAttribPointer(s,x,r.FLOAT,!1,0,h*x*4)}else if(void 0!==n&&(x=n[q],void 0!==x))switch(x.length){case 2:r.vertexAttrib2fv(s,x);break;case 3:r.vertexAttrib3fv(s,x);break;case 4:r.vertexAttrib4fv(s,
2504x);break;default:r.vertexAttrib1fv(s,x)}}}K.disableUnusedAttributes()}null!==b&&r.bindBuffer(r.ELEMENT_ARRAY_BUFFER,pa.getAttributeBuffer(b))}p=Infinity;null!==b?p=b.count:void 0!==k&&(p=k.count);q=c.drawRange.start;b=c.drawRange.count;k=null!==g?g.start:0;h=null!==g?g.count:Infinity;g=Math.max(0,q,k);p=Math.min(0+p,q+b,k+h)-1;p=Math.max(0,p-g+1);if(e instanceof THREE.Mesh)if(!0===d.wireframe)K.setLineWidth(d.wireframeLinewidth*(null===ca?aa:1)),a.setMode(r.LINES);else switch(e.drawMode){case THREE.TrianglesDrawMode:a.setMode(r.TRIANGLES);
2505break;case THREE.TriangleStripDrawMode:a.setMode(r.TRIANGLE_STRIP);break;case THREE.TriangleFanDrawMode:a.setMode(r.TRIANGLE_FAN)}else e instanceof THREE.Line?(d=d.linewidth,void 0===d&&(d=1),K.setLineWidth(d*(null===ca?aa:1)),e instanceof THREE.LineSegments?a.setMode(r.LINES):a.setMode(r.LINE_STRIP)):e instanceof THREE.Points&&a.setMode(r.POINTS);c instanceof THREE.InstancedBufferGeometry?0<c.maxInstancedCount&&a.renderInstances(c,g,p):a.render(g,p)};this.render=function(a,b,c,d){if(!1===b instanceof
2506THREE.Camera)console.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.");else{var e=a.fog;na="";ra=-1;ma=null;!0===a.autoUpdate&&a.updateMatrixWorld();null===b.parent&&b.updateMatrixWorld();b.matrixWorldInverse.getInverse(b.matrixWorld);sa.multiplyMatrices(b.projectionMatrix,b.matrixWorldInverse);za.setFromMatrix(sa);J.length=0;Y=Z=-1;ja.length=0;ea.length=0;q(a,b);C.length=Z+1;S.length=Y+1;!0===X.sortObjects&&(C.sort(p),S.sort(n));var g=J,f,h,k,l=0,m=0,s=0,t,v,x,w=b.matrixWorldInverse,
2507$=0,E=0,y=0,D=0,B=0;f=R.shadowsPointLight=0;for(h=g.length;f<h;f++)if(k=g[f],t=k.color,v=k.intensity,x=k.distance,k instanceof THREE.AmbientLight)l+=t.r*v,m+=t.g*v,s+=t.b*v;else if(k instanceof THREE.DirectionalLight){var A=xa.get(k);A.color.copy(k.color).multiplyScalar(k.intensity);A.direction.setFromMatrixPosition(k.matrixWorld);W.setFromMatrixPosition(k.target.matrixWorld);A.direction.sub(W);A.direction.transformDirection(w);if(A.shadow=k.castShadow)A.shadowBias=k.shadow.bias,A.shadowRadius=k.shadow.radius,
2508A.shadowMapSize=k.shadow.mapSize,R.shadows[B++]=k;R.directionalShadowMap[$]=k.shadow.map;R.directionalShadowMatrix[$]=k.shadow.matrix;R.directional[$++]=A}else if(k instanceof THREE.SpotLight){A=xa.get(k);A.position.setFromMatrixPosition(k.matrixWorld);A.position.applyMatrix4(w);A.color.copy(t).multiplyScalar(v);A.distance=x;A.direction.setFromMatrixPosition(k.matrixWorld);W.setFromMatrixPosition(k.target.matrixWorld);A.direction.sub(W);A.direction.transformDirection(w);A.coneCos=Math.cos(k.angle);
2509A.penumbraCos=Math.cos(k.angle*(1-k.penumbra));A.decay=0===k.distance?0:k.decay;if(A.shadow=k.castShadow)A.shadowBias=k.shadow.bias,A.shadowRadius=k.shadow.radius,A.shadowMapSize=k.shadow.mapSize,R.shadows[B++]=k;R.spotShadowMap[y]=k.shadow.map;R.spotShadowMatrix[y]=k.shadow.matrix;R.spot[y++]=A}else if(k instanceof THREE.PointLight){A=xa.get(k);A.position.setFromMatrixPosition(k.matrixWorld);A.position.applyMatrix4(w);A.color.copy(k.color).multiplyScalar(k.intensity);A.distance=k.distance;A.decay=
25100===k.distance?0:k.decay;if(A.shadow=k.castShadow)A.shadowBias=k.shadow.bias,A.shadowRadius=k.shadow.radius,A.shadowMapSize=k.shadow.mapSize,R.shadows[B++]=k;R.pointShadowMap[E]=k.shadow.map;void 0===R.pointShadowMatrix[E]&&(R.pointShadowMatrix[E]=new THREE.Matrix4);W.setFromMatrixPosition(k.matrixWorld).negate();R.pointShadowMatrix[E].identity().setPosition(W);R.point[E++]=A}else k instanceof THREE.HemisphereLight&&(A=xa.get(k),A.direction.setFromMatrixPosition(k.matrixWorld),A.direction.transformDirection(w),
2511A.direction.normalize(),A.skyColor.copy(k.color).multiplyScalar(v),A.groundColor.copy(k.groundColor).multiplyScalar(v),R.hemi[D++]=A);R.ambient[0]=l;R.ambient[1]=m;R.ambient[2]=s;R.directional.length=$;R.spot.length=y;R.point.length=E;R.hemi.length=D;R.shadows.length=B;R.hash=$+","+E+","+y+","+D+","+B;Ca.render(a,b);fa.calls=0;fa.vertices=0;fa.faces=0;fa.points=0;void 0===c&&(c=null);this.setRenderTarget(c);(this.autoClear||d)&&this.clear(this.autoClearColor,this.autoClearDepth,this.autoClearStencil);
2512a.overrideMaterial?(d=a.overrideMaterial,u(C,b,e,d),u(S,b,e,d)):(K.setBlending(THREE.NoBlending),u(C,b,e),u(S,b,e));Ga.render(a,b);Ha.render(a,b,ka);c&&(a=c.texture,a.generateMipmaps&&z(c)&&a.minFilter!==THREE.NearestFilter&&a.minFilter!==THREE.LinearFilter&&(a=c instanceof THREE.WebGLRenderTargetCube?r.TEXTURE_CUBE_MAP:r.TEXTURE_2D,c=U.get(c.texture).__webglTexture,K.bindTexture(a,c),r.generateMipmap(a),K.bindTexture(a,null)));K.setDepthTest(!0);K.setDepthWrite(!0);K.setColorWrite(!0)}};this.setFaceCulling=
2513function(a,b){a===THREE.CullFaceNone?K.disable(r.CULL_FACE):(b===THREE.FrontFaceDirectionCW?r.frontFace(r.CW):r.frontFace(r.CCW),a===THREE.CullFaceBack?r.cullFace(r.BACK):a===THREE.CullFaceFront?r.cullFace(r.FRONT):r.cullFace(r.FRONT_AND_BACK),K.enable(r.CULL_FACE))};this.setTexture=function(a,b){var c=U.get(a);if(0<a.version&&c.__version!==a.version){var d=a.image;if(void 0===d)console.warn("THREE.WebGLRenderer: Texture marked for update but image is undefined",a);else if(!1===d.complete)console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete",
2514a);else{void 0===c.__webglInit&&(c.__webglInit=!0,a.addEventListener("dispose",f),c.__webglTexture=r.createTexture(),ia.textures++);K.activeTexture(r.TEXTURE0+b);K.bindTexture(r.TEXTURE_2D,c.__webglTexture);r.pixelStorei(r.UNPACK_FLIP_Y_WEBGL,a.flipY);r.pixelStorei(r.UNPACK_PREMULTIPLY_ALPHA_WEBGL,a.premultiplyAlpha);r.pixelStorei(r.UNPACK_ALIGNMENT,a.unpackAlignment);var e=D(a.image,da.maxTextureSize);if((a.wrapS!==THREE.ClampToEdgeWrapping||a.wrapT!==THREE.ClampToEdgeWrapping||a.minFilter!==THREE.NearestFilter&&
2515a.minFilter!==THREE.LinearFilter)&&!1===z(e))if(d=e,d instanceof HTMLImageElement||d instanceof HTMLCanvasElement){var g=document.createElement("canvas");g.width=THREE.Math.nearestPowerOfTwo(d.width);g.height=THREE.Math.nearestPowerOfTwo(d.height);g.getContext("2d").drawImage(d,0,0,g.width,g.height);console.warn("THREE.WebGLRenderer: image is not power of two ("+d.width+"x"+d.height+"). Resized to "+g.width+"x"+g.height,d);e=g}else e=d;var d=z(e),g=L(a.format),h=L(a.type);x(r.TEXTURE_2D,a,d);var k=
2516a.mipmaps;if(a instanceof THREE.DataTexture)if(0<k.length&&d){for(var l=0,m=k.length;l<m;l++)e=k[l],K.texImage2D(r.TEXTURE_2D,l,g,e.width,e.height,0,g,h,e.data);a.generateMipmaps=!1}else K.texImage2D(r.TEXTURE_2D,0,g,e.width,e.height,0,g,h,e.data);else if(a instanceof THREE.CompressedTexture)for(l=0,m=k.length;l<m;l++)e=k[l],a.format!==THREE.RGBAFormat&&a.format!==THREE.RGBFormat?-1<K.getCompressedTextureFormats().indexOf(g)?K.compressedTexImage2D(r.TEXTURE_2D,l,g,e.width,e.height,0,e.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()"):
2517K.texImage2D(r.TEXTURE_2D,l,g,e.width,e.height,0,g,h,e.data);else if(0<k.length&&d){l=0;for(m=k.length;l<m;l++)e=k[l],K.texImage2D(r.TEXTURE_2D,l,g,g,h,e);a.generateMipmaps=!1}else K.texImage2D(r.TEXTURE_2D,0,g,g,h,e);a.generateMipmaps&&d&&r.generateMipmap(r.TEXTURE_2D);c.__version=a.version;
2517if(a.onUpdate)a.onUpdate(a)}}else K.activeTexture(r.TEXTURE0+b),K.bindTexture(r.TEXTURE_2D,c.__webglTexture)};this.getCurrentRenderTarget=function(){return ca};this.setRenderTarget=function(a){if((ca=a)&&void 0===
2518U.get(a).__webglFramebuffer){var b=U.get(a),c=U.get(a.texture);a.addEventListener("dispose",g);c.__webglTexture=r.createTexture();ia.textures++;var d=a instanceof THREE.WebGLRenderTargetCube,e=THREE.Math.isPowerOfTwo(a.width)&&THREE.Math.isPowerOfTwo(a.height);if(d){b.__webglFramebuffer=[];for(var f=0;6>f;f++)b.__webglFramebuffer[f]=r.createFramebuffer()}else b.__webglFramebuffer=r.createFramebuffer();if(d){K.bindTexture(r.TEXTURE_CUBE_MAP,c.__webglTexture);x(r.TEXTURE_CUBE_MAP,a.texture,e);for(f=
25190;6>f;f++)G(b.__webglFramebuffer[f],a,r.COLOR_ATTACHMENT0,r.TEXTURE_CUBE_MAP_POSITIVE_X+f);a.texture.generateMipmaps&&e&&r.generateMipmap(r.TEXTURE_CUBE_MAP);K.bindTexture(r.TEXTURE_CUBE_MAP,null)}else K.bindTexture(r.TEXTURE_2D,c.__webglTexture),x(r.TEXTURE_2D,a.texture,e),G(b.__webglFramebuffer,a,r.COLOR_ATTACHMENT0,r.TEXTURE_2D),a.texture.generateMipmaps&&e&&r.generateMipmap(r.TEXTURE_2D),K.bindTexture(r.TEXTURE_2D,null);if(a.depthBuffer){b=U.get(a);if(a instanceof THREE.WebGLRenderTargetCube)for(b.__webglDepthbuffer=
2520[],c=0;6>c;c++)r.bindFramebuffer(r.FRAMEBUFFER,b.__webglFramebuffer[c]),b.__webglDepthbuffer[c]=r.createRenderbuffer(),F(b.__webglDepthbuffer[c],a);else r.bindFramebuffer(r.FRAMEBUFFER,b.__webglFramebuffer),b.__webglDepthbuffer=r.createRenderbuffer(),F(b.__webglDepthbuffer,a);r.bindFramebuffer(r.FRAMEBUFFER,null)}}b=a instanceof THREE.WebGLRenderTargetCube;a?(c=U.get(a),c=b?c.__webglFramebuffer[a.activeCubeFace]:c.__webglFramebuffer,qa.copy(a.scissor),Aa=a.scissorTest,ka.copy(a.viewport)):(c=null,
2521qa.copy(ya).multiplyScalar(aa),Aa=Ba,ka.copy(la).multiplyScalar(aa));ua!==c&&(r.bindFramebuffer(r.FRAMEBUFFER,c),ua=c);K.scissor(qa);K.setScissorTest(Aa);K.viewport(ka);b&&(b=U.get(a.texture),r.framebufferTexture2D(r.FRAMEBUFFER,r.COLOR_ATTACHMENT0,r.TEXTURE_CUBE_MAP_POSITIVE_X+a.activeCubeFace,b.__webglTexture,a.activeMipMapLevel))};this.readRenderTargetPixels=function(a,b,c,d,e,g){if(!1===a instanceof THREE.WebGLRenderTarget)console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");
2522else{var f=U.get(a).__webglFramebuffer;if(f){var h=!1;f!==ua&&(r.bindFramebuffer(r.FRAMEBUFFER,f),h=!0);try{var k=a.texture;k.format!==THREE.RGBAFormat&&L(k.format)!==r.getParameter(r.IMPLEMENTATION_COLOR_READ_FORMAT)?console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format."):k.type===THREE.UnsignedByteType||L(k.type)===r.getParameter(r.IMPLEMENTATION_COLOR_READ_TYPE)||k.type===THREE.FloatType&&V.get("WEBGL_color_buffer_float")||k.type===
2523THREE.HalfFloatType&&V.get("EXT_color_buffer_half_float")?r.checkFramebufferStatus(r.FRAMEBUFFER)===r.FRAMEBUFFER_COMPLETE?r.readPixels(b,c,d,e,L(k.format),L(k.type),g):console.error("THREE.WebGLRenderer.readRenderTargetPixels: readPixels from renderTarget failed. Framebuffer not complete."):console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.")}finally{h&&r.bindFramebuffer(r.FRAMEBUFFER,ua)}}}}};
2524THREE.WebGLRenderTarget=function(a,b,c){this.uuid=THREE.Math.generateUUID();this.width=a;this.height=b;this.scissor=new THREE.Vector4(0,0,a,b);this.scissorTest=!1;this.viewport=new THREE.Vector4(0,0,a,b);c=c||{};void 0===c.minFilter&&(c.minFilter=THREE.LinearFilter);this.texture=new THREE.Texture(void 0,void 0,c.wrapS,c.wrapT,c.magFilter,c.minFilter,c.format,c.type,c.anisotropy);this.depthBuffer=void 0!==c.depthBuffer?c.depthBuffer:!0;this.stencilBuffer=void 0!==c.stencilBuffer?c.stencilBuffer:!0};
2525THREE.WebGLRenderTarget.prototype={constructor:THREE.WebGLRenderTarget,setSize:function(a,b){if(this.width!==a||this.height!==b)this.width=a,this.height=b,this.dispose();this.viewport.set(0,0,a,b);this.scissor.set(0,0,a,b)},clone:function(){return(new this.constructor).copy(this)},copy:function(a){this.width=a.width;this.height=a.height;this.viewport.copy(a.viewport);this.texture=a.texture.clone();this.depthBuffer=a.depthBuffer;this.stencilBuffer=a.stencilBuffer;return this},dispose:function(){this.dispatchEvent({type:"dispose"})}};
2526THREE.EventDispatcher.prototype.apply(THREE.WebGLRenderTarget.prototype);THREE.WebGLRenderTargetCube=function(a,b,c){THREE.WebGLRenderTarget.call(this,a,b,c);this.activeMipMapLevel=this.activeCubeFace=0};THREE.WebGLRenderTargetCube.prototype=Object.create(THREE.WebGLRenderTarget.prototype);THREE.WebGLRenderTargetCube.prototype.constructor=THREE.WebGLRenderTargetCube;
2527THREE.WebGLBufferRenderer=function(a,b,c){var d;this.setMode=function(a){d=a};this.render=function(b,f){a.drawArrays(d,b,f);c.calls++;c.vertices+=f;d===a.TRIANGLES&&(c.faces+=f/3)};this.renderInstances=function(e){var f=b.get("ANGLE_instanced_arrays");if(null===f)console.error("THREE.WebGLBufferRenderer: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_
2527instanced_arrays.");else{var g=e.attributes.position,h=0,h=g instanceof THREE.InterleavedBufferAttribute?g.data.count:
2528g.count;f.drawArraysInstancedANGLE(d,0,h,e.maxInstancedCount);c.calls++;c.vertices+=h*e.maxInstancedCount;d===a.TRIANGLES&&(c.faces+=e.maxInstancedCount*h/3)}}};
2529THREE.WebGLIndexedBufferRenderer=function(a,b,c){var d,e,f;this.setMode=function(a){d=a};this.setIndex=function(c){c.array instanceof Uint32Array&&b.get("OES_element_index_uint")?(e=a.UNSIGNED_INT,f=4):(e=a.UNSIGNED_SHORT,f=2)};this.render=function(b,h){a.drawElements(d,h,e,b*f);c.calls++;c.vertices+=h;d===a.TRIANGLES&&(c.faces+=h/3)};this.renderInstances=function(g,h,k){var l=b.get("ANGLE_instanced_arrays");null===l?console.error("THREE.WebGLBufferRenderer: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays."):
2530(l.drawElementsInstancedANGLE(d,k,e,h*f,g.maxInstancedCount),c.calls++,c.vertices+=k*g.maxInstancedCount,d===a.TRIANGLES&&(c.faces+=g.maxInstancedCount*k/3))}};
2531THREE.WebGLExtensions=function(a){var b={};this.get=function(c){if(void 0!==b[c])return b[c];var d;switch(c){case "EXT_texture_filter_anisotropic":d=a.getExtension("EXT_texture_filter_anisotropic")||a.getExtension("MOZ_EXT_texture_filter_anisotropic")||a.getExtension("WEBKIT_EXT_texture_filter_anisotropic");break;case "WEBGL_compressed_texture_s3tc":d=a.getExtension("WEBGL_compressed_texture_s3tc")||a.getExtension("MOZ_WEBGL_compressed_texture_s3tc")||a.getExtension("WEBKIT_WEBGL_compressed_texture_s3tc");
2532break;case "WEBGL_compressed_texture_pvrtc":d=a.getExtension("WEBGL_compressed_texture_pvrtc")||a.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc");break;case "WEBGL_compressed_texture_etc1":d=a.getExtension("WEBGL_compressed_texture_etc1");break;default:d=a.getExtension(c)}null===d&&console.warn("THREE.WebGLRenderer: "+c+" extension not supported.");return b[c]=d}};
2533THREE.WebGLCapabilities=function(a,b,c){function d(b){if("highp"===b){if(0<a.getShaderPrecisionFormat(a.VERTEX_SHADER,a.HIGH_FLOAT).precision&&0<a.getShaderPrecisionFormat(a.FRAGMENT_SHADER,a.HIGH_FLOAT).precision)return"highp";b="mediump"}return"mediump"===b&&0<a.getShaderPrecisionFormat(a.VERTEX_SHADER,a.MEDIUM_FLOAT).precision&&0<a.getShaderPrecisionFormat(a.FRAGMENT_SHADER,a.MEDIUM_FLOAT).precision?"mediump":"lowp"}this.getMaxPrecision=d;this.precision=void 0!==c.precision?c.precision:"highp";
2534this.logarithmicDepthBuffer=void 0!==c.logarithmicDepthBuffer?c.logarithmicDepthBuffer:!1;this.maxTextures=a.getParameter(a.MAX_TEXTURE_IMAGE_UNITS);this.maxVertexTextures=a.getParameter(a.MAX_VERTEX_TEXTURE_IMAGE_UNITS);this.maxTextureSize=a.getParameter(a.MAX_TEXTURE_SIZE);this.maxCubemapSize=a.getParameter(a.MAX_CUBE_MAP_TEXTURE_SIZE);this.maxAttributes=a.getParameter(a.MAX_VERTEX_ATTRIBS);this.maxVertexUniforms=a.getParameter(a.MAX_VERTEX_UNIFORM_VECTORS);this.maxVaryings=a.getParameter(a.MAX_VARYING_VECTORS);
2535this.maxFragmentUniforms=a.getParameter(a.MAX_FRAGMENT_UNIFORM_VECTORS);this.vertexTextures=0<this.maxVertexTextures;this.floatFragmentTextures=!!b.get("OES_texture_float");this.floatVertexTextures=this.vertexTextures&&this.floatFragmentTextures;c=d(this.precision);c!==this.precision&&(console.warn("THREE.WebGLRenderer:",this.precision,"not supported, using",c,"instead."),this.precision=c);this.logarithmicDepthBuffer&&(this.logarithmicDepthBuffer=!!b.get("EXT_frag_depth"))};
2536THREE.WebGLGeometries=function(a,b,c){function d(a){var h=a.target;a=f[h.id];null!==a.index&&e(a.index);var k=a.attributes,l;for(l in k)e(k[l]);h.removeEventListener("dispose",d);delete f[h.id];l=b.get(h);l.wireframe&&e(l.wireframe);b.delete(h);h=b.get(a);h.wireframe&&e(h.wireframe);b.delete(a);c.memory.geometries--}function e(c){var d;d=c instanceof THREE.InterleavedBufferAttribute?b.get(c.data).__webglBuffer:b.get(c).__webglBuffer;void 0!==d&&(a.deleteBuffer(d),c instanceof THREE.InterleavedBufferAttribute?
2537b.delete(c.data):b.delete(c))}var f={};this.get=function(a){var b=a.geometry;if(void 0!==f[b.id])return f[b.id];b.addEventListener("dispose",d);var e;b instanceof THREE.BufferGeometry?e=b:b instanceof THREE.Geometry&&(void 0===b._bufferGeometry&&(b._bufferGeometry=(new THREE.BufferGeometry).setFromObject(a)),e=b._bufferGeometry);f[b.id]=e;c.memory.geometries++;return e}};
2538THREE.WebGLLights=function(){var a={};this.get=function(b){if(void 0!==a[b.id])return a[b.id];var c;switch(b.type){case "DirectionalLight":c={direction:new THREE.Vector3,color:new THREE.Color,shadow:!1,shadowBias:0,shadowRadius:1,shadowMapSize:new THREE.Vector2};break;case "SpotLight":c={position:new THREE.Vector3,direction:new THREE.Vector3,color:new THREE.Color,distance:0,coneCos:0,penumbraCos:0,decay:0,shadow:!1,shadowBias:0,shadowRadius:1,shadowMapSize:new THREE.Vector2};break;case "PointLight":c=
2539{position:new THREE.Vector3,color:new THREE.Color,distance:0,decay:0,shadow:!1,shadowBias:0,shadowRadius:1,shadowMapSize:new THREE.Vector2};break;case "HemisphereLight":c={direction:new THREE.Vector3,skyColor:new THREE.Color,groundColor:new THREE.Color}}return a[b.id]=c}};
2540THREE.WebGLObjects=function(a,b,c){function d(c,d){var e=c instanceof THREE.InterleavedBufferAttribute?c.data:c,f=b.get(e);void 0===f.__webglBuffer?(f.__webglBuffer=a.createBuffer(),a.bindBuffer(d,f.__webglBuffer),a.bufferData(d,e.array,e.dynamic?a.DYNAMIC_DRAW:a.STATIC_DRAW),f.version=e.version):f.version!==e.version&&(a.bindBuffer(d,f.__webglBuffer),!1===e.dynamic||-1===e.updateRange.count?a.bufferSubData(d,0,e.array):0===e.updateRange.count?console.error("THREE.WebGLObjects.updateBuffer: dynamic THREE.BufferAttribute marked as 
2540needsUpdate but updateRange.count is 0, ensure you are using set methods or updating manually."):
2541(a.bufferSubData(d,e.updateRange.offset*e.array.BYTES_PER_ELEMENT,e.array.subarray(e.updateRange.offset,e.updateRange.offset+e.updateRange.count)),e.updateRange.count=0),f.version=e.version)}function e(a,b,c){if(b>c){var d=b;b=c;c=d}d=a[b];return void 0===d?(a[b]=[c],!0):-1===d.indexOf(c)?(d.push(c),!0):!1}var f=new THREE.WebGLGeometries(a,b,c);this.getAttributeBuffer=function(a){return a instanceof THREE.InterleavedBufferAttribute?b.get(a.data).__webglBuffer:b.get(a).__webglBuffer};this.getWireframeAttribute=
2542function(c){var f=b.get(c);if(void 0!==f.wireframe)return f.wireframe;var k=[],l=c.index,p=c.attributes;c=p.position;if(null!==l)for(var p={},l=l.array,n=0,m=l.length;n<m;n+=3){var q=l[n+0],u=l[n+1],v=l[n+2];e(p,q,u)&&k.push(q,u);e(p,u,v)&&k.push(u,v);e(p,v,q)&&k.push(v,q)}else for(l=p.position.array,n=0,m=l.length/3-1;n<m;n+=3)q=n+0,u=n+1,v=n+2,k.push(q,u,u,v,v,q);k=new THREE.BufferAttribute(new (65535<c.count?Uint32Array:Uint16Array)(k),1);d(k,a.ELEMENT_ARRAY_BUFFER);return f.wireframe=k};this.update=
2543function(b){var c=f.get(b);b.geometry instanceof THREE.Geometry&&c.updateFromObject(b);b=c.index;var e=c.attributes;null!==b&&d(b,a.ELEMENT_ARRAY_BUFFER);for(var l in e)d(e[l],a.ARRAY_BUFFER);b=c.morphAttributes;for(l in b)for(var e=b[l],p=0,n=e.length;p<n;p++)d(e[p],a.ARRAY_BUFFER);return c}};
2544THREE.WebGLProgram=function(){function a(a){switch(a){case THREE.LinearEncoding:return["Linear","( value )"];case THREE.sRGBEncoding:return["sRGB","( value )"];case THREE.RGBEEncoding:return["RGBE","( value )"];case THREE.RGBM7Encoding:return["RGBM","( value, 7.0 )"];case THREE.RGBM16Encoding:return["RGBM","( value, 16.0 )"];case THREE.RGBDEncoding:return["RGBD","( value, 256.0 )"];case THREE.GammaEncoding:return["Gamma","( value, float( GAMMA_FACTOR ) )"];default:throw Error("unsupported encoding: "+
2545a);}}function b(b,c){var d=a(c);return"vec4 "+b+"( vec4 value ) { return "+d[0]+"ToLinear"+d[1]+"; }"}function c(b,c){var d=a(c);return"vec4 "+b+"( vec4 value ) { return LinearTo"+d[0]+d[1]+"; }"}function d(a,b){var c;switch(b){case THREE.LinearToneMapping:c="Linear";break;case THREE.ReinhardToneMapping:c="Reinhard";break;case THREE.Uncharted2ToneMapping:c="Uncharted2";break;case THREE.CineonToneMapping:c="OptimizedCineon";break;default:throw Error("unsupported toneMapping: "+b);}return"vec3 "+a+
2546"( vec3 color ) { return "+c+"ToneMapping( color ); }"}function e(a,b,c){a=a||{};return[a.derivatives||b.envMapCubeUV||b.bumpMap||b.normalMap||b.flatShading?"#extension GL_OES_standard_derivatives : enable":"",(a.fragDepth||b.logarithmicDepthBuffer)&&c.get("EXT_frag_depth")?"#extension GL_EXT_frag_depth : enable":"",a.drawBuffers&&c.get("WEBGL_draw_buffers")?"#extension GL_EXT_draw_buffers : require":"",(a.shaderTextureLOD||b.envMap)&&c.get("EXT_shader_texture_lod")?"#extension GL_EXT_shader_texture_lod : enable":
2547""].filter(g).join("\n")}function f(a){var b=[],c;for(c in a){var d=a[c];!1!==d&&b.push("#define "+c+" "+d)}return b.join("\n")}function g(a){return""!==a}function h(a,b){return a.replace(/NUM_DIR_LIGHTS/g,b.numDirLights).replace(/NUM_SPOT_LIGHTS/g,b.numSpotLights).replace(/NUM_POINT_LIGHTS/g,b.numPointLights).replace(/NUM_HEMI_LIGHTS/g,b.numHemiLights)}function k(a){return a.replace(/#include +<([\w\d.]+)>/g,function(a,b){var c=THREE.ShaderChunk[b];if(void 0===c)throw Error("Can not resolve #include <"+
2548b+">");return k(c)})}function l(a){return a.replace(/for \( int i \= (\d+)\; i < (\d+)\; i \+\+ \) \{([\s\S]+?)(?=\})\}/g,function(a,b,c,d){a="";for(b=parseInt(b);b<parseInt(c);b++)a+=d.replace(/\[ i \]/g,"[ "+b+" ]");return a})}
2548var p=0,n=/^([\w\d_]+)\.([\w\d_]+)$/,m=/^([\w\d_]+)\[(\d+)\]\.([\w\d_]+)$/,q=/^([\w\d_]+)\[0\]$/;return function(a,v,t,s){var w=a.context,E=t.extensions,x=t.defines,D=t.__webglShader.vertexShader,z=t.__webglShader.fragmentShader,y="SHADOWMAP_TYPE_BASIC";s.shadowMapType===
2549THREE.PCFShadowMap?y="SHADOWMAP_TYPE_PCF":s.shadowMapType===THREE.PCFSoftShadowMap&&(y="SHADOWMAP_TYPE_PCF_SOFT");var B="ENVMAP_TYPE_CUBE",G="ENVMAP_MODE_REFLECTION",F="ENVMAP_BLENDING_MULTIPLY";if(s.envMap){switch(t.envMap.mapping){case THREE.CubeReflectionMapping:case THREE.CubeRefractionMapping:B="ENVMAP_TYPE_CUBE";break;case THREE.CubeUVReflectionMapping:case THREE.CubeUVRefractionMapping:B="ENVMAP_TYPE_CUBE_UV";break;case THREE.EquirectangularReflectionMapping:case THREE.EquirectangularRefractionMapping:B=
2550"ENVMAP_TYPE_EQUIREC";break;case THREE.SphericalReflectionMapping:B="ENVMAP_TYPE_SPHERE"}switch(t.envMap.mapping){case THREE.CubeRefractionMapping:case THREE.EquirectangularRefractionMapping:G="ENVMAP_MODE_REFRACTION"}switch(t.combine){case THREE.MultiplyOperation:F="ENVMAP_BLENDING_MULTIPLY";break;case THREE.MixOperation:F="ENVMAP_BLENDING_MIX";break;case THREE.AddOperation:F="ENVMAP_BLENDING_ADD"}}var H=0<a.gammaFactor?a.gammaFactor:1,E=e(E,s,a.extensions),L=f(x),A=w.createProgram();t instanceof
2551THREE.RawShaderMaterial?a=x="":(x=["precision "+s.precision+" float;","precision "+s.precision+" int;","#define SHADER_NAME "+t.__webglShader.name,L,s.supportsVertexTextures?"#define VERTEX_TEXTURES":"","#define GAMMA_FACTOR "+H,"#define MAX_BONES "+s.maxBones,s.map?"#define USE_MAP":"",s.envMap?"#define USE_ENVMAP":"",s.envMap?"#define "+G:"",s.lightMap?"#define USE_LIGHTMAP":"",s.aoMap?"#define USE_AOMAP":"",s.emissiveMap?"#define USE_EMISSIVEMAP":"",s.bumpMap?"#define USE_BUMPMAP":"",s.normalMap?
2552"#define USE_NORMALMAP":"",s.displacementMap&&s.supportsVertexTextures?"#define USE_DISPLACEMENTMAP":"",s.specularMap?"#define USE_SPECULARMAP":"",s.roughnessMap?"#define USE_ROUGHNESSMAP":"",s.metalnessMap?"#define USE_METALNESSMAP":"",s.alphaMap?"#define USE_ALPHAMAP":"",s.vertexColors?"#define USE_COLOR":"",s.flatShading?"#define FLAT_SHADED":"",s.skinning?"#define USE_SKINNING":"",s.useVertexTexture?"#define BONE_TEXTURE":"",s.morphTargets?"#define USE_MORPHTARGETS":"",s.morphNormals&&!1===s.flatShading?
2553"#define USE_MORPHNORMALS":"",s.doubleSided?"#define DOUBLE_SIDED":"",s.flipSided?"#define FLIP_SIDED":"",s.shadowMapEnabled?"#define USE_SHADOWMAP":"",s.shadowMapEnabled?"#define "+y:"",0<s.pointLightShadows?"#define POINT_LIGHT_SHADOWS":"",s.sizeAttenuation?"#define USE_SIZEATTENUATION":"",s.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",s.logarithmicDepthBuffer&&a.extensions.get("EXT_frag_depth")?"#define USE_LOGDEPTHBUF_EXT":"","uniform mat4 modelMatrix;","uniform mat4 modelViewMatrix;",
2554"uniform mat4 projectionMatrix;","uniform mat4 viewMatrix;","uniform mat3 normalMatrix;","uniform vec3 cameraPosition;","attribute vec3 position;","attribute vec3 normal;","attribute vec2 uv;","#ifdef USE_COLOR","\tattribute vec3 color;","#endif","#ifdef USE_MORPHTARGETS","\tattribute vec3 morphTarget0;","\tattribute vec3 morphTarget1;","\tattribute vec3 morphTarget2;","\tattribute vec3 morphTarget3;","\t#ifdef USE_MORPHNORMALS","\t\tattribute vec3 morphNormal0;","\t\tattribute vec3 morphNormal1;",
2555"\t\tattribute vec3 morphNormal2;","\t\tattribute vec3 morphNormal3;","\t#else","\t\tattribute vec3 morphTarget4;","\t\tattribute vec3 morphTarget5;","\t\tattribute vec3 morphTarget6;","\t\tattribute vec3 morphTarget7;","\t#endif","#endif","#ifdef USE_SKINNING","\tattribute vec4 skinIndex;","\tattribute vec4 skinWeight;","#endif","\n"].filter(g).join("\n"),a=[E,"precision "+s.precision+" float;","precision "+s.precision+" int;","#define SHADER_NAME "+t.__webglShader.name,L,s.alphaTest?"#define ALPHATEST "+
2556s.alphaTest:"","#define GAMMA_FACTOR "+H,s.useFog&&s.fog?"#define USE_FOG":"",s.useFog&&s.fogExp?"#define FOG_EXP2":"",s.map?"#define USE_MAP":"",s.envMap?"#define USE_ENVMAP":"",s.envMap?"#define "+B:"",s.envMap?"#define "+G:"",s.envMap?"#define "+F:"",s.lightMap?"#define USE_LIGHTMAP":"",s.aoMap?"#define USE_AOMAP":"",s.emissiveMap?"#define USE_EMISSIVEMAP":"",s.bumpMap?"#define USE_BUMPMAP":"",s.normalMap?"#define USE_NORMALMAP":"",s.specularMap?"#define USE_SPECULARMAP":"",s.roughnessMap?"#define USE_ROUGHNESSMAP":
2557"",s.metalnessMap?"#define USE_METALNESSMAP":"",s.alphaMap?"#define USE_ALPHAMAP":"",s.vertexColors?"#define USE_COLOR":"",s.flatShading?"#define FLAT_SHADED":"",s.doubleSided?"#define DOUBLE_SIDED":"",s.flipSided?"#define FLIP_SIDED":"",s.shadowMapEnabled?"#define USE_SHADOWMAP":"",s.shadowMapEnabled?"#define "+y:"",0<s.pointLightShadows?"#define POINT_LIGHT_SHADOWS":"",s.premultipliedAlpha?"#define PREMULTIPLIED_ALPHA":"",s.physicallyCorrectLights?"#define PHYSICALLY_CORRECT_LIGHTS":"",s.logarithmicDepthBuffer?
2558"#define USE_LOGDEPTHBUF":"",s.logarithmicDepthBuffer&&a.extensions.get("EXT_frag_depth")?"#define USE_LOGDEPTHBUF_EXT":"",s.envMap&&a.extensions.get("EXT_shader_texture_lod")?"#define TEXTURE_LOD_EXT":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;",s.toneMapping!==THREE.NoToneMapping?"#define TONE_MAPPING":"",s.toneMapping!==THREE.NoToneMapping?THREE.ShaderChunk.tonemapping_pars_fragment:"",s.toneMapping!==THREE.NoToneMapping?d("toneMapping",s.toneMapping):"",s.outputEncoding||s.mapEncoding||
2559s.envMapEncoding||s.emissiveMapEncoding?THREE.ShaderChunk.encodings_pars_fragment:"",s.mapEncoding?b("mapTexelToLinear",s.mapEncoding):"",s.envMapEncoding?b("envMapTexelToLinear",s.envMapEncoding):"",s.emissiveMapEncoding?b("emissiveMapTexelToLinear",s.emissiveMapEncoding):"",s.outputEncoding?c("linearToOutputTexel",s.outputEncoding):"","\n"].filter(g).join("\n"));D=k(D,s);D=h(D,s);z=k(z,s);z=h(z,s);!1===t instanceof THREE.ShaderMaterial&&(D=l(D),z=l(z));z=a+z;D=THREE.WebGLShader(w,w.VERTEX_SHADER,
2560x+D);z=THREE.WebGLShader(w,w.FRAGMENT_SHADER,z);w.attachShader(A,D);w.attachShader(A,z);void 0!==t.index0AttributeName?w.bindAttribLocation(A,0,t.index0AttributeName):!0===s.morphTargets&&w.bindAttribLocation(A,0,"position");w.linkProgram(A);s=w.getProgramInfoLog(A);y=w.getShaderInfoLog(D);B=w.getShaderInfoLog(z);F=G=!0;if(!1===w.getProgramParameter(A,w.LINK_STATUS))G=!1,console.error("THREE.WebGLProgram: shader error: ",w.getError(),"gl.VALIDATE_STATUS",w.getProgramParameter(A,w.VALIDATE_STATUS),
2561"gl.getProgramInfoLog",s,y,B);else if(""!==s)console.warn("THREE.WebGLProgram: gl.getProgramInfoLog()",s);else if(""===y||""===B)F=!1;F&&(this.diagnostics={runnable:G,material:t,programLog:s,vertexShader:{log:y,prefix:x},fragmentShader:{log:B,prefix:a}});w.deleteShader(D);w.deleteShader(z);var N;this.getUniforms=function(){if(void 0===N){for(var a={},b=w.getProgramParameter(A,w.ACTIVE_UNIFORMS),c=0;c<b;c++){var d=w.getActiveUniform(A,c).name,e=w.getUniformLocation(A,d),g=n.exec(d);if(g){var d=g[1],
2562g=g[2],f=a[d];f||(f=a[d]={});f[g]=e}else if(g=m.exec(d)){var f=g[1],d=g[2],g=g[3],h=a[f];h||(h=a[f]=[]);(f=h[d])||(f=h[d]={});f[g]=e}else(g=q.exec(d))?(f=g[1],a[f]=e):a[d]=e}N=a}return N};var M;this.getAttributes=function(){if(void 0===M){for(var a={},b=w.getProgramParameter(A,w.ACTIVE_ATTRIBUTES),c=0;c<b;c++){var d=w.getActiveAttrib(A,c).name;a[d]=w.getAttribLocation(A,d)}M=a}return M};this.destroy=function(){w.deleteProgram(A);this.program=void 0};Object.defineProperties(this,{uniforms:{get:function(){console.warn("THREE.WebGLProgram: .uniforms is now .getUniforms().");
2563return this.getUniforms()}},attributes:{get:function(){console.warn("THREE.WebGLProgram: .attributes is now .getAttributes().");return this.getAttributes()}}});this.id=p++;this.code=v;this.usedTimes=1;this.program=A;this.vertexShader=D;this.fragmentShader=z;return this}}();
2564THREE.WebGLPrograms=function(a,b){function c(a,b){var c;a?a instanceof THREE.Texture?c=a.encoding:a instanceof THREE.WebGLRenderTarget&&(c=a.texture.encoding):c=THREE.LinearEncoding;c===THREE.LinearEncoding&&b&&(c=THREE.GammaEncoding);return c}var d=[],e={MeshDepthMaterial:"depth",MeshNormalMaterial:"normal",MeshBasicMaterial:"basic",MeshLambertMaterial:"lambert",MeshPhongMaterial:"phong",MeshStandardMaterial:"standard",LineBasicMaterial:"basic",LineDashedMaterial:"dashed",PointsMaterial:"points"},
2565f="precision supportsVertexTextures map mapEncoding envMap envMapMode envMapEncoding lightMap aoMap emissiveMap emissiveMapEncoding bumpMap normalMap displacementMap specularMap roughnessMap metalnessMap alphaMap comb
2565ine vertexColors fog useFog fogExp flatShading sizeAttenuation logarithmicDepthBuffer skinning maxBones useVertexTexture morphTargets morphNormals maxMorphTargets maxMorphNormals premultipliedAlpha numDirLights numPointLights numSpotLights numHemiLights shadowMapEnabled pointLightShadows toneMapping physicallyCorrectLights shadowMapType alphaTest doubleSided flipSided".split(" ");
2566this.getParameters=function(d,f,k,l){var p=e[d.type],n;b.floatVertexTextures&&l&&l.skeleton&&l.skeleton.useVertexTexture?n=1024:(n=Math.floor((b.maxVertexUniforms-20)/4),void 0!==l&&l instanceof THREE.SkinnedMesh&&(n=Math.min(l.skeleton.bones.length,n),n<l.skeleton.bones.length&&console.warn("WebGLRenderer: too many bones - "+l.skeleton.bones.length+", this GPU supports just "+n+" (try OpenGL instead of ANGLE)")));var m=a.getPrecision();null!==d.precision&&(m=b.getMaxPrecision(d.precision),m!==d.precision&&
2567console.warn("THREE.WebGLProgram.getParameters:",d.precision,"not supported, using",m,"instead."));return{shaderID:p,precision:m,supportsVertexTextures:b.vertexTextures,outputEncoding:c(a.getCurrentRenderTarget(),a.gammaOutput),map:!!d.map,mapEncoding:c(d.map,a.gammaInput),envMap:!!d.envMap,envMapMode:d.envMap&&d.envMap.mapping,envMapEncoding:c(d.envMap,a.gammaInput),envMapCubeUV:!!d.envMap&&(d.envMap.mapping===THREE.CubeUVReflectionMapping||d.envMap.mapping===THREE.CubeUVRefractionMapping),lightMap:!!d.lightMap,
2568aoMap:!!d.aoMap,emissiveMap:!!d.emissiveMap,emissiveMapEncoding:c(d.emissiveMap,a.gammaInput),bumpMap:!!d.bumpMap,normalMap:!!d.normalMap,displacementMap:!!d.displacementMap,roughnessMap:!!d.roughnessMap,metalnessMap:!!d.metalnessMap,specularMap:!!d.specularMap,alphaMap:!!d.alphaMap,combine:d.combine,vertexColors:d.vertexColors,fog:k,useFog:d.fog,fogExp:k instanceof THREE.FogExp2,flatShading:d.shading===THREE.FlatShading,sizeAttenuation:d.sizeAttenuation,logarithmicDepthBuffer:b.logarithmicDepthBuffer,
2569skinning:d.skinning,maxBones:n,useVertexTexture:b.floatVertexTextures&&l&&l.skeleton&&l.skeleton.useVertexTexture,morphTargets:d.morphTargets,morphNormals:d.morphNormals,maxMorphTargets:a.maxMorphTargets,maxMorphNormals:a.maxMorphNormals,numDirLights:f.directional.length,numPointLights:f.point.length,numSpotLights:f.spot.length,numHemiLights:f.hemi.length,pointLightShadows:f.shadowsPointLight,shadowMapEnabled:a.shadowMap.enabled&&l.receiveShadow&&0<f.shadows.length,shadowMapType:a.shadowMap.type,
2570toneMapping:a.toneMapping,physicallyCorrectLights:a.physicallyCorrectLights,premultipliedAlpha:d.premultipliedAlpha,alphaTest:d.alphaTest,doubleSided:d.side===THREE.DoubleSide,flipSided:d.side===THREE.BackSide}};this.getProgramCode=function(a,b){var c=[];b.shaderID?c.push(b.shaderID):(c.push(a.fragmentShader),c.push(a.vertexShader));if(void 0!==a.defines)for(var d in a.defines)c.push(d),c.push(a.defines[d]);for(d=0;d<f.length;d++){var e=f[d];c.push(e);c.push(b[e])}return c.join()};this.acquireProgram=
2571function(b,c,e){for(var f,p=0,n=d.length;p<n;p++){var m=d[p];if(m.code===e){f=m;++f.usedTimes;break}}void 0===f&&(f=new THREE.WebGLProgram(a,e,b,c),d.push(f));return f};this.releaseProgram=function(a){if(0===--a.usedTimes){var b=d.indexOf(a);d[b]=d[d.length-1];d.pop();a.destroy()}};this.programs=d};THREE.WebGLProperties=function(){var a={};this.get=function(b){b=b.uuid;var c=a[b];void 0===c&&(c={},a[b]=c);return c};this.delete=function(b){delete a[b.uuid]};this.clear=function(){a={}}};
2572THREE.WebGLShader=function(){function a(a){a=a.split("\n");for(var c=0;c<a.length;c++)a[c]=c+1+": "+a[c];return a.join("\n")}return function(b,c,d){var e=b.createShader(c);b.shaderSource(e,d);b.compileShader(e);!1===b.getShaderParameter(e,b.COMPILE_STATUS)&&console.error("THREE.WebGLShader: Shader couldn't compile.");""!==b.getShaderInfoLog(e)&&console.warn("THREE.WebGLShader: gl.getShaderInfoLog()",c===b.VERTEX_SHADER?"vertex":"fragment",b.getShaderInfoLog(e),a(d));return e}}();
2573THREE.WebGLShadowMap=function(a,b,c){function d(a,b,c,d){var e=a.geometry,f=null,f=q,g=a.customDepthMaterial;c&&(f=u,g=a.customDistanceMaterial);g?f=g:(a=a instanceof THREE.SkinnedMesh&&b.skinning,g=0,void 0!==e.morphTargets&&0<e.morphTargets.length&&b.morphTargets&&(g|=1),a&&(g|=2),f=f[g]);f.visible=b.visible;f.wireframe=b.wireframe;
2573f.wireframeLinewidth=b.wireframeLinewidth;c&&void 0!==f.uniforms.lightPos&&f.uniforms.lightPos.value.copy(d);return f}function e(a,b,c){if(!1!==a.visible){a.layers.test(b.layers)&&
2574(a instanceof THREE.Mesh||a instanceof THREE.Line||a instanceof THREE.Points)&&a.castShadow&&(!1===a.frustumCulled||!0===h.intersectsObject(a))&&!0===a.material.visible&&(a.modelViewMatrix.multiplyMatrices(c.matrixWorldInverse,a.matrixWorld),m.push(a));a=a.children;for(var d=0,f=a.length;d<f;d++)e(a[d],b,c)}}for(var f=a.context,g=a.state,h=new THREE.Frustum,k=new THREE.Matrix4,l=new THREE.Vector2,p=new THREE.Vector3,n=new THREE.Vector3,m=[],q=Array(4),u=Array(4),v=[new THREE.Vector3(1,0,0),new THREE.Vector3(-1,
25750,0),new THREE.Vector3(0,0,1),new THREE.Vector3(0,0,-1),new THREE.Vector3(0,1,0),new THREE.Vector3(0,-1,0)],t=[new THREE.Vector3(0,1,0),new THREE.Vector3(0,1,0),new THREE.Vector3(0,1,0),new THREE.Vector3(0,1,0),new THREE.Vector3(0,0,1),new THREE.Vector3(0,0,-1)],s=[new THREE.Vector4,new THREE.Vector4,new THREE.Vector4,new THREE.Vector4,new THREE.Vector4,new THREE.Vector4],w=THREE.ShaderLib.depthRGBA,E=THREE.UniformsUtils.clone(w.uniforms),x=THREE.ShaderLib.distanceRGBA,D=THREE.UniformsUtils.clone(x.uniforms),
2576z=0;4!==z;++z){var y=0!==(z&1),B=0!==(z&2),G=new THREE.ShaderMaterial({uniforms:E,vertexShader:w.vertexShader,fragmentShader:w.fragmentShader,morphTargets:y,skinning:B});q[z]=G;y=new THREE.ShaderMaterial({defines:{USE_SHADOWMAP:""},uniforms:D,vertexShader:x.vertexShader,fragmentShader:x.fragmentShader,morphTargets:y,skinning:B});u[z]=y}var F=this;this.enabled=!1;this.autoUpdate=!0;this.needsUpdate=!1;this.type=THREE.PCFShadowMap;this.cullFace=THREE.CullFaceFront;this.render=function(q,u){var x,w,
2577E=b.shadows;if(0!==E.length&&!1!==F.enabled&&(!1!==F.autoUpdate||!1!==F.needsUpdate)){g.clearColor(1,1,1,1);g.disable(f.BLEND);g.enable(f.CULL_FACE);f.frontFace(f.CCW);f.cullFace(F.cullFace===THREE.CullFaceFront?f.FRONT:f.BACK);g.setDepthTest(!0);g.setScissorTest(!1);for(var z=0,y=E.length;z<y;z++){var D=E[z],B=D.shadow,G=B.camera;l.copy(B.mapSize);if(D instanceof THREE.PointLight){x=6;w=!0;var J=l.x,C=l.y;s[0].set(2*J,C,J,C);s[1].set(0,C,J,C);s[2].set(3*J,C,J,C);s[3].set(J,C,J,C);s[4].set(3*J,0,
2578J,C);s[5].set(J,0,J,C);l.x*=4;l.y*=2}else x=1,w=!1;null===B.map&&(B.map=new THREE.WebGLRenderTarget(l.x,l.y,{minFilter:THREE.NearestFilter,magFilter:THREE.NearestFilter,format:THREE.RGBAFormat}),D instanceof THREE.SpotLight&&(G.aspect=l.x/l.y),G.updateProjectionMatrix());J=B.map;B=B.matrix;n.setFromMatrixPosition(D.matrixWorld);G.position.copy(n);a.setRenderTarget(J);a.clear();for(J=0;J<x;J++){w?(p.copy(G.position),p.add(v[J]),G.up.copy(t[J]),G.lookAt(p),g.viewport(s[J])):(p.setFromMatrixPosition(D.target.matrixWorld),
2579G.lookAt(p));G.updateMatrixWorld();G.matrixWorldInverse.getInverse(G.matrixWorld);B.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1);B.multiply(G.projectionMatrix);B.multiply(G.matrixWorldInverse);k.multiplyMatrices(G.projectionMatrix,G.matrixWorldInverse);h.setFromMatrix(k);m.length=0;e(q,u,G);for(var C=0,Z=m.length;C<Z;C++){var S=m[C],Y=c.update(S),$=S.material;if($ instanceof THREE.MultiMaterial)for(var ja=Y.groups,$=$.materials,ea=0,X=ja.length;ea<X;ea++){var ha=ja[ea],ca=$[ha.materialIndex];!0===ca.visible&&
2580(ca=d(S,ca,w,n),a.renderBufferDirect(G,null,Y,ca,S,ha))}else ca=d(S,$,w,n),a.renderBufferDirect(G,null,Y,ca,S,null)}}}x=a.getClearColor();w=a.getClearAlpha();a.setClearColor(x,w);g.enable(f.BLEND);F.cullFace===THREE.CullFaceFront&&f.cullFace(f.BACK);F.needsUpdate=!1}}};
2581THREE.WebGLState=function(a,b,c){var d=this,e=new THREE.Vector4,f=new Uint8Array(16),g=new Uint8Array(16),h=new Uint8Array(16),k={},l=null,p=null,n=null,m=null,q=null,u=null,v=null,t=null,s=!1,w=null,E=null,x=null,D=null,z=null,y=null,B=null,G=null,F=null,H=null,L=null,A=null,N=null,M=null,I=null,O=a.getParameter(a.MAX_TEXTURE_IMAGE_UNITS),Q=void 0,P={},T=new THREE.Vector4,J=null,C=null,Z=new THREE.Vector4,S=new THREE.Vector4,Y=a.createTexture();a.bindTexture(a.TEXTURE_2D,Y);a.texParameteri(a.TEXTURE_2D,
2582a.TEXTURE_MIN_FILTER,a.LINEAR);a.texImage2D(a.TEXTURE_2D,0,a.RGB,1,1,0,a.RGB,a.UNSIGNED_BYTE,new Uint8Array(3));this.init=function(){this.clearColor(0,0,0,1);this.clearDepth(1);this.clearStencil(0);this.enable(a.DEPTH_TEST);a.depthFunc(a.LEQUAL);a.frontFace(a.CCW);a.cullFace(a.BACK);this.enable(a.CULL_FACE);this.enable(a.BLEND);a.blendEquation(a.FUNC_ADD);a.blendFunc(a.SRC_ALPHA,a.ONE_MINUS_SRC_ALPHA)};this.initAttributes=function(){for(var a=0,b=f.length;a<b;a++)f[a]=0};this.enableAttribute=function(c){f[c]=
25831;0===g[c]&&(a.enableVertexAttribArray(c),g[c]=1);0!==h[c]&&(b.get("ANGLE_instanced_arrays").vertexAttribDivisorANGLE(c,0),h[c]=0)};this.enableAttributeAndDivisor=function(b,c,d){f[b]=1;0===g[b]&&(a.enableVertexAttribArray(b),g[b]=1);
2583h[b]!==c&&(d.vertexAttribDivisorANGLE(b,c),h[b]=c)};this.disableUnusedAttributes=function(){for(var b=0,c=g.length;b<c;b++)g[b]!==f[b]&&(a.disableVertexAttribArray(b),g[b]=0)};this.enable=function(b){!0!==k[b]&&(a.enable(b),k[b]=!0)};this.disable=function(b){!1!==k[b]&&
2584(a.disable(b),k[b]=!1)};this.getCompressedTextureFormats=function(){if(null===l&&(l=[],b.get("WEBGL_compressed_texture_pvrtc")||b.get("WEBGL_compressed_texture_s3tc")||b.get("WEBGL_compressed_texture_etc1")))for(var c=a.getParameter(a.COMPRESSED_TEXTURE_FORMATS),d=0;d<c.length;d++)l.push(c[d]);return l};this.setBlending=function(b,d,e,f,g,h,k,l){b===THREE.NoBlending?this.disable(a.BLEND):this.enable(a.BLEND);if(b!==p||l!==s)b===THREE.AdditiveBlending?l?(a.blendEquationSeparate(a.FUNC_ADD,a.FUNC_ADD),
2585a.blendFuncSeparate(a.ONE,a.ONE,a.ONE,a.ONE)):(a.blendEquation(a.FUNC_ADD),a.blendFunc(a.SRC_ALPHA,a.ONE)):b===THREE.SubtractiveBlending?l?(a.blendEquationSeparate(a.FUNC_ADD,a.FUNC_ADD),a.blendFuncSeparate(a.ZERO,a.ZERO,a.ONE_MINUS_SRC_COLOR,a.ONE_MINUS_SRC_ALPHA)):(a.blendEquation(a.FUNC_ADD),a.blendFunc(a.ZERO,a.ONE_MINUS_SRC_COLOR)):b===THREE.MultiplyBlending?l?(a.blendEquationSeparate(a.FUNC_ADD,a.FUNC_ADD),a.blendFuncSeparate(a.ZERO,a.ZERO,a.SRC_COLOR,a.SRC_ALPHA)):(a.blendEquation(a.FUNC_ADD),
2586a.blendFunc(a.ZERO,a.SRC_COLOR)):l?(a.blendEquationSeparate(a.FUNC_ADD,a.FUNC_ADD),a.blendFuncSeparate(a.ONE,a.ONE_MINUS_SRC_ALPHA,a.ONE,a.ONE_MINUS_SRC_ALPHA)):(a.blendEquationSeparate(a.FUNC_ADD,a.FUNC_ADD),a.blendFuncSeparate(a.SRC_ALPHA,a.ONE_MINUS_SRC_ALPHA,a.ONE,a.ONE_MINUS_SRC_ALPHA)),p=b,s=l;if(b===THREE.CustomBlending){g=g||d;h=h||e;k=k||f;if(d!==n||g!==u)a.blendEquationSeparate(c(d),c(g)),n=d,u=g;if(e!==m||f!==q||h!==v||k!==t)a.blendFuncSeparate(c(e),c(f),c(h),c(k)),m=e,q=f,v=h,t=k}else t=
2587v=u=q=m=n=null};this.setDepthFunc=function(b){if(w!==b){if(b)switch(b){case THREE.NeverDepth:a.depthFunc(a.NEVER);break;case THREE.AlwaysDepth:a.depthFunc(a.ALWAYS);break;case THREE.LessDepth:a.depthFunc(a.LESS);break;case THREE.LessEqualDepth:a.depthFunc(a.LEQUAL);break;case THREE.EqualDepth:a.depthFunc(a.EQUAL);break;case THREE.GreaterEqualDepth:a.depthFunc(a.GEQUAL);break;case THREE.GreaterDepth:a.depthFunc(a.GREATER);break;case THREE.NotEqualDepth:a.depthFunc(a.NOTEQUAL);break;default:a.depthFunc(a.LEQUAL)}else a.depthFunc(a.LEQUAL);
2588w=b}};this.setDepthTest=function(b){b?this.enable(a.DEPTH_TEST):this.disable(a.DEPTH_TEST)};this.setDepthWrite=function(b){E!==b&&(a.depthMask(b),E=b)};this.setColorWrite=function(b){x!==b&&(a.colorMask(b,b,b,b),x=b)};this.setStencilFunc=function(b,c,d){if(z!==b||y!==c||B!==d)a.stencilFunc(b,c,d),z=b,y=c,B=d};this.setStencilOp=function(b,c,d){if(G!==b||F!==c||H!==d)a.stencilOp(b,c,d),G=b,F=c,H=d};this.setStencilTest=function(b){b?this.enable(a.STENCIL_TEST):this.disable(a.STENCIL_TEST)};this.setStencilWrite=
2589function(b){D!==b&&(a.stencilMask(b),D=b)};this.setFlipSided=function(b){L!==b&&(b?a.frontFace(a.CW):a.frontFace(a.CCW),L=b)};this.setLineWidth=function(b){b!==A&&(a.lineWidth(b),A=b)};this.setPolygonOffset=function(b,c,d){b?this.enable(a.POLYGON_OFFSET_FILL):this.disable(a.POLYGON_OFFSET_FILL);!b||N===c&&M===d||(a.polygonOffset(c,d),N=c,M=d)};this.getScissorTest=function(){return I};this.setScissorTest=function(b){(I=b)?this.enable(a.SCISSOR_TEST):this.disable(a.SCISSOR_TEST)};this.activeTexture=
2590function(b){void 0===b&&(b=a.TEXTURE0+O-1);Q!==b&&(a.activeTexture(b),Q=b)};this.bindTexture=function(b,c){void 0===Q&&d.activeTexture();var e=P[Q];void 0===e&&(e={type:void 0,texture:void 0},P[Q]=e);if(e.type!==b||e.texture!==c)a.bindTexture(b,c||Y),e.type=b,e.texture=c};this.compressedTexImage2D=function(){try{a.compressedTexImage2D.apply(a,arguments)}catch(b){console.error(b)}};this.texImage2D=function(){try{a.texImage2D.apply(a,arguments)}catch(b){console.error(b)}};this.clearColor=function(b,
2591c,d,f){e.set(b,c,d,f);!1===T.equals(e)&&(a.clearColor(b,c,d,f),T.copy(e))};this.clearDepth=function(b){J!==b&&(a.clearDepth(b),J=b)};this.clearStencil=function(b){C!==b&&(a.clearStencil(b),C=b)};this.scissor=function(b){!1===Z.equals(b)&&(a.scissor(b.x,b.y,b.z,b.w),Z.copy(b))};this.viewport=function(b){!1===S.equals(b)&&(a.viewport(b.x,b.y,b.z,b.w),S.copy(b))};this.reset=function(){for(var b=0;b<g.length;b++)1===g[b]&&(a.disableVertexAttribArray(b),g[b]=0);k={};l=null;Q=void 0;P={};L=D=E=x=p=null}};
2592THREE.LensFlarePlugin=function(a,b){var c,d,e,f,g,h,k,l,p,n,m=a.context,q=a.state,u,v,t,s,w,E;this.render=function(x,D,z){if(0!==b.length){x=new THREE.Vector3;var y=z.w/z.z,B=.5*z.z,G=.5*z.w,F=16/z.w,H=new THREE.Vector2(F*y,F),L=new THREE.Vector3(1,1,0),A=new THREE.Vector2(1,1);if(void 0===t){var F=new Float32Array([-1,-1,0,0,1,-1,1,0,1,1,1,1,-1,1,0,1]),N=new Uint16Array([0,1,2,0,2,3]);u=m.createBuffer();v=m.createBuffer();m.bindBuffer(m.ARRAY_BUFFER,u);m.bufferData(m.ARRAY_BUFFER,F,m.STATIC_DRAW);
2593m.bindBuffer(m.ELEMENT_ARRAY_BUFFER,v);m.bufferData(m.ELEMENT_ARRAY_BUFFER,N,m.STATIC_DRAW);w=m.createTexture();E=m.createTexture();q.bindTexture(m.TEXTURE_2D,w);m.texImage2D(m.TEXTURE_2D,0,m.RGB,16,16,0,m.RGB,m.UNSIGNED_BYTE,null);m.texParameteri(m.TEXTURE_2D,m.TEXTURE_WRAP_S,m.CLAMP_TO_EDGE);m.texParameteri(m.TEXTURE_2D,m.TEXTURE_WRAP_T,m.CLAMP_TO_EDGE);m.texParameteri(m.TEXTURE_2D,m.TEXTURE_MAG_FILTER,m.NEAREST);m.texParameteri(m.TEXTURE_2D,m.TEXTURE_MIN_FILTER,m.NEAREST);q.bindTexture(m.TEXTURE_2D,
2594E);m.texImage2D(m.TEXTURE_2D,0,m.RGBA,16,16,0,m.RGBA,m.UNSIGNED_BYTE,null);m.texParameteri(m.TEXTURE_2D,m.TEXTURE_WRAP_S,m.CLAMP_TO_EDGE);m.texParameteri(m.TEXTURE_2D,m.TEXTURE_WRAP_T,m.CLAMP_TO_EDGE);m.texParameteri(m.TEXTURE_2D,m.TEXTURE_MAG_FILTER,m.NEAREST);m.texParameteri(m.TEXTURE_2D,m.TEXTURE_MIN_FILTER,m.NEAREST);var F=(s=0<m.getParameter(m.MAX_VERTEX_TEXTURE_IMAGE_UNITS))?{vertexShader:"uniform lowp int renderType;\nuniform vec3 screenPosition;\nuniform vec2 scale;\nuniform float rotation;\nuniform sampler2D occlusionMap;\nattribute vec2 position;\nattribute vec2 uv;\nvarying vec2 vUV;\nvarying float vVisibility;\nvoid main() {\nvUV = uv;\nvec2 pos = position;\nif ( renderType == 2 ) {\nvec4 visibility = texture2D( occlusionMap, vec2( 0.1, 0.1 ) );\nvisibility += texture2D( occlusionMap, vec2( 0.5, 0.1 ) );\nvisibility += texture2D( occlusionMap, vec2( 0.9, 0.1 ) );\nvisibility += texture2D( occlusionMap, vec2( 0.9, 0.5 ) );\nvisibility += texture2D( occlusionMap, vec2( 0.9, 0.9 ) );\nvisibility += texture2D( occlusionMap, vec2( 0.5, 0.9 ) );\nvisibility += texture2D( occlusionMap, vec2( 0.1, 0.9 ) );\nvisibility += texture2D( occlusionMap, vec2( 0.1, 0.5 ) );\nvisibility += texture2D( occlusionMap, vec2( 0.5, 0.5 ) );\nvVisibility =        visibility.r / 9.0;\nvVisibility *= 1.0 - visibility.g / 9.0;\nvVisibility *=       visibility.b / 9.0;\nvVisibility *= 1.0 - visibility.a / 9.0;\npos.x = cos( rotation ) * position.x - sin( rotation ) * position.y;\npos.y = sin( rotation ) * position.x + cos( rotation ) * position.y;\n}\ngl_Position = vec4( ( pos * scale + screenPosition.xy ).xy, screenPosition.z, 1.0 );\n}",
2595fragmentShader:"uniform lowp int renderType;\nuniform sampler2D map;\nuniform float opacity;\nuniform vec3 color;\nvarying vec2 vUV;\nvarying float vVisibility;\nvoid main() {\nif ( renderType == 0 ) {\ngl_FragColor = vec4( 1.0, 0.0, 1.0, 0.0 );\n} else if ( renderType == 1 ) {\ngl_FragColor = texture2D( map, vUV );\n} else {\nvec4 texture = texture2D( map, vUV );
2595\ntexture.a *= opacity * vVisibility;\ngl_FragColor = texture;\ngl_FragColor.rgb *= color;\n}\n}"}:{vertexShader:"uniform lowp int renderType;\nuniform vec3 screenPosition;\nuniform vec2 scale;\nuniform float rotation;\nattribute vec2 position;\nattribute vec2 uv;\nvarying vec2 vUV;\nvoid main() {\nvUV = uv;\nvec2 pos = position;\nif ( renderType == 2 ) {\npos.x = cos( rotation ) * position.x - sin( rotation ) * position.y;\npos.y = sin( rotation ) * position.x + cos( rotation ) * position.y;\n}\ngl_Position = vec4( ( pos * scale + screenPosition.xy ).xy, screenPosition.z, 1.0 );\n}",
2596fragmentShader:"precision mediump float;\nuniform lowp int renderType;\nuniform sampler2D map;\nuniform sampler2D occlusionMap;\nuniform float opacity;\nuniform vec3 color;\nvarying vec2 vUV;\nvoid main() {\nif ( renderType == 0 ) {\ngl_FragColor = vec4( texture2D( map, vUV ).rgb, 0.0 );\n} else if ( renderType == 1 ) {\ngl_FragColor = texture2D( map, vUV );\n} else {\nfloat visibility = texture2D( occlusionMap, vec2( 0.5, 0.1 ) ).a;\nvisibility += texture2D( occlusionMap, vec2( 0.9, 0.5 ) ).a;\nvisibility += texture2D( occlusionMap, vec2( 0.5, 0.9 ) ).a;\nvisibility += texture2D( occlusionMap, vec2( 0.1, 0.5 ) ).a;\nvisibility = ( 1.0 - visibility / 4.0 );\nvec4 texture = texture2D( map, vUV );\ntexture.a *= opacity * visibility;\ngl_FragColor = texture;\ngl_FragColor.rgb *= color;\n}\n}"},
2597N=m.createProgram(),M=m.createShader(m.FRAGMENT_SHADER),I=m.createShader(m.VERTEX_SHADER),O="precision "+a.getPrecision()+" float;\n";m.shaderSource(M,O+F.fragmentShader);m.shaderSource(I,O+F.vertexShader);m.compileShader(M);m.compileShader(I);m.attachShader(N,M);m.attachShader(N,I);m.linkProgram(N);t=N;p=m.getAttribLocation(t,"position");n=m.getAttribLocation(t,"uv");c=m.getUniformLocation(t,"renderType");d=m.getUniformLocation(t,"map");e=m.getUniformLocation(t,"occlusionMap");f=m.getUniformLocation(t,
2598"opacity");g=m.getUniformLocation(t,"color");h=m.getUniformLocation(t,"scale");k=m.getUniformLocation(t,"rotation");l=m.getUniformLocation(t,"screenPosition")}m.useProgram(t);q.initAttributes();q.enableAttribute(p);q.enableAttribute(n);q.disableUnusedAttributes();m.uniform1i(e,0);m.uniform1i(d,1);m.bindBuffer(m.ARRAY_BUFFER,u);m.vertexAttribPointer(p,2,m.FLOAT,!1,16,0);m.vertexAttribPointer(n,2,m.FLOAT,!1,16,8);m.bindBuffer(m.ELEMENT_ARRAY_BUFFER,v);q.disable(m.CULL_FACE);q.setDepthWrite(!1);N=0;
2599for(M=b.length;N<M;N++)if(F=16/z.w,H.set(F*y,F),I=b[N],x.set(I.matrixWorld.elements[12],I.matrixWorld.elements[13],I.matrixWorld.elements[14]),x.applyMatrix4(D.matrixWorldInverse),x.applyProjection(D.projectionMatrix),L.copy(x),A.x=L.x*B+B,A.y=L.y*G+G,s||0<A.x&&A.x<z.z&&0<A.y&&A.y<z.w){q.activeTexture(m.TEXTURE0);q.bindTexture(m.TEXTURE_2D,null);q.activeTexture(m.TEXTURE1);q.bindTexture(m.TEXTURE_2D,w);m.copyTexImage2D(m.TEXTURE_2D,0,m.RGB,z.x+A.x-8,z.y+A.y-8,16,16,0);m.uniform1i(c,0);m.uniform2f(h,
2600H.x,H.y);m.uniform3f(l,L.x,L.y,L.z);q.disable(m.BLEND);q.enable(m.DEPTH_TEST);m.drawElements(m.TRIANGLES,6,m.UNSIGNED_SHORT,0);q.activeTexture(m.TEXTURE0);q.bindTexture(m.TEXTURE_2D,E);m.copyTexImage2D(m.TEXTURE_2D,0,m.RGBA,z.x+A.x-8,z.y+A.y-8,16,16,0);m.uniform1i(c,1);q.disable(m.DEPTH_TEST);q.activeTexture(m.TEXTURE1);q.bindTexture(m.TEXTURE_2D,w);m.drawElements(m.TRIANGLES,6,m.UNSIGNED_SHORT,0);I.positionScreen.copy(L);I.customUpdateCallback?I.customUpdateCallback(I):I.updateLensFlares();m.uniform1i(c,
26012);q.enable(m.BLEND);for(var O=0,Q=I.lensFlares.length;O<Q;O++){var P=I.lensFlares[O];.001<P.opacity&&.001<P.scale&&(L.x=P.x,L.y=P.y,L.z=P.z,F=P.size*P.scale/z.w,H.x=F*y,H.y=F,m.uniform3f(l,L.x,L.y,L.z),m.uniform2f(h,H.x,H.y),m.uniform1f(k,P.rotation),m.uniform1f(f,P.opacity),m.uniform3f(g,P.color.r,P.color.g,P.color.b),q.setBlending(P.blending,P.blendEquation,P.blendSrc,P.blendDst),a.setTexture(P.texture,1),m.drawElements(m.TRIANGLES,6,m.UNSIGNED_SHORT,0))}}q.enable(m.CULL_FACE);q.enable(m.DEPTH_TEST);
2602q.setDepthWrite(!0);a.resetGLState()}}};
2603THREE.SpritePlugin=function(a,b){var c,d,e,f,g,h,k,l,p,n,m,q,u,v,t,s,w;function E(a,b){return a.renderOrder!==b.renderOrder?a.renderOrder-b.renderOrder:a.z!==b.z?b.z-a.z:b.id-a.id}var x=a.context,D=a.state,z,y,B,G,F=new THREE.Vector3,H=new THREE.Quaternion,L=new THREE.Vector3;this.render=function(A,N){if(0!==b.length){if(void 0===B){var M=new Float32Array([-.5,-.5,0,0,.5,-.5,1,0,.5,.5,1,1,-.5,.5,0,1]),I=new Uint16Array([0,1,2,0,2,3]);z=x.createBuffer();y=x.createBuffer();x.bindBuffer(x.ARRAY_BUFFER,
2604z);x.bufferData(x.ARRAY_BUFFER,M,x.STATIC_DRAW);x.bindBuffer(x.ELEMENT_ARRAY_BUFFER,y);x.bufferData(x.ELEMENT_ARRAY_BUFFER,I,x.STATIC_DRAW);var M=x.createProgram(),I=x.createShader(x.VERTEX_SHADER),O=x.createShader(x.FRAGMENT_SHADER);x.shaderSource(I,["precision "+a.getPrecision()+" float;","uniform mat4 modelViewMatrix;\nuniform mat4 projectionMatrix;\nuniform float rotation;\nuniform vec2 scale;\nuniform vec2 uvOffset;\nuniform vec2 uvScale;\nattribute vec2 position;\nattribute vec2 uv;\nvarying vec2 vUV;\nvoid main() {\nvUV = uvOffset + uv * uvScale;\nvec2 alignedPosition = position * scale;\nvec2 rotatedPosition;\nrotatedPosition.x = cos( rotation ) * alignedPosition.x - sin( rotation ) * alignedPosition.y;\nrotatedPosition.y = sin( rotation ) * alignedPosition.x + cos( rotation ) * alignedPosition.y;\nvec4 finalPosition;\nfinalPosition = modelViewMatrix * vec4( 0.0, 0.0, 0.0, 1.0 );\nfinalPosition.xy += rotatedPosition;\nfinalPosition = projectionMatrix * finalPosition;\ngl_Position = finalPosition;\n}"].join("\n"));
2605x.shaderSource(O,["precision "+a.getPrecision()+" float;","uniform vec3 color;\nuniform sampler2D map;\nuniform float opacity;\nuniform int fogType;\nuniform vec3 fogColor;\nuniform float fogDensity;\nuniform float fogNear;\nuniform float fogFar;\nuniform float alphaTest;\nvarying vec2 vUV;\nvoid main() {\nvec4 texture = texture2D( map, vUV );\nif ( texture.a < alphaTest ) discard;\ngl_FragColor = vec4( color * texture.xyz, texture.a * opacity );\nif ( fogType > 0 ) {\nfloat depth = gl_FragCoord.z / gl_FragCoord.w;\nfloat fogFactor = 0.0;\nif ( fogType == 1 ) {\nfogFactor = smoothstep( fogNear, fogFar, depth );\n} else {\nconst float LOG2 = 1.442695;\nfogFactor = exp2( - fogDensity * fogDensity * depth * depth * LOG2 );\nfogFactor = 1.0 - clamp( fogFactor, 0.0, 1.0 );\n}\ngl_FragColor = mix( gl_FragColor, vec4( fogColor, gl_FragColor.w ), fogFactor );\n}\n}"].join("\n"));
2606x.compileShader(I);x.compileShader(O);x.attachShader(M,I);x.attachShader(M,O);x.linkProgram(M);B=M;s=x.getAttribLocation(B,"position");w=x.getAttribLocation(B,"uv");c=x.getUniformLocation(B,"uvOffset");d=x.getUniformLocation(B,"uvScale");e=x.getUniformLocation(B,"rotation");f=x.getUniformLocation(B,"scale");g=x.getUniformLocation(B,"color");h=x.getUniformLocation(B,"map");k=x.getUniformLocation(B,"opacity");l=x.getUniformLocation(B,"modelViewMatrix");p=x.getUniformLocation(B,"projectionMatrix");n=
2607x.getUniformLocation(B,"fogType");m=x.getUniformLocation(B,"fogDensity");q=x.getUniformLocation(B,"fogNear");u=x.getUniformLocation(B,"fogFar");v=x.getUniformLocation(B,"fogColor");t=x.getUniformLocation(B,"alphaTest");M=document.createElement("canvas");M.width=8;M.height=8;I=M.getContext("2d");I.fillStyle="white";I.fillRect(0,0,8,8);G=new THREE.Texture(M);G.needsUpdate=!0}x.useProgram(B);D.initAttributes();D.enableAttribute(s);D.enableAttribute(w);D.disableUnusedAttributes();D.disable(x.CULL_FACE);
2608D.enable(x.BLEND);x.bindBuffer(x.ARRAY_BUFFER,z);x.vertexAttribPointer(s,2,x.FLOAT,!1,16,0);x.vertexAttribPointer(w,2,x.FLOAT,!1,16,8);x.bindBuffer(x.ELEMENT_ARRAY_BUFFER,y);x.uniformMatrix4fv(p,!1,N.projectionMatrix.elements);D.activeTexture(x.TEXTURE0);x.uniform1i(h,0);I=M=0;(O=A.fog)?(x.uniform3f(v,O.color.r,O.color.g,O.color.b),O instanceof THREE.Fog?(x.uniform1f(q,O.near),x.uniform1f(u,O.far),x.uniform1i(n,1),I=M=1):O instanceof THREE.FogExp2&&(x.uniform1f(m,O.density),x.uniform1i(n,2),I=M=2)):
2609(x.uniform1i(n,0),I=M=0);for(var O=0,Q=b.length;O<Q;O++){var P=b[O];P.modelViewMatrix.multiplyMatrices(N.matrixWorldInverse,P.matrixWorld);P.z=-P.modelViewMatrix.elements[14]}b.sort(E);for(var T=[],O=0,Q=b.length;O<Q;O++){var P=b[O],J=P.material;x.uniform1f(t,J.alphaTest);x.uniformMatrix4fv(l,!1,P.modelViewMatrix.elements);P.matrixWorld.decompose(F,H,L);T[0]=L.x;T[1]=L.y;P=0;A.fog&&J.fog&&(P=I);M!==P&&(x.uniform1i(n,P),M=P);null!==J.map?(x.uniform2f(c,J.map.offset.x,J.map.offset.y),x.uniform2f(d,
2610J.map.repeat.x,J.map.repeat.y)):(x.uniform2f(c,0,0),x.uniform2f(d,1,1));x.uniform1f(k,J.opacity);x.uniform3f(g,J.color.r,J.color.g,J.color.b);x.uniform1f(e,J.rotation);x.uniform2fv(f,T);D.setBlending(J.blending,J.blendEquation,J.blendSrc,J.blendDst);D.setDepthTest(J.depthTest);D.setDepthWrite(J.depthWrite);J.map&&J.map.image&&J.map.image.width?a.setTexture(J.map,0):a.setTexture(G,0);x.drawElements(x.TRIANGLES,6,x.UNSIGNED_SHORT,0)}D.enable(x.CULL_FACE);a.resetGLState()}}};
2611Object.defineProperties(THREE.Box2.prototype,{empty:{value:function(){console.warn("THREE.Box2: .empty() has been renamed to .isEmpty().");return this.isEmpty()}},isIntersectionBox:{value:function(a){console.warn("THREE.Box2: .isIntersectionBox() has been renamed to .intersectsBox().");return this.intersectsBox(a)}}});
2612Object.defineProperties(THREE.Box3.prototype,{empty:{value:function(){console.warn("THREE.Box3: .empty() has been renamed to .isEmpty().");return this.isEmpty()}},isIntersectionBox:{value:function(a){console.warn("THREE.Box3: .isIntersectionBox() has been renamed to .intersectsBox().");return this.intersectsBox(a)}},isIntersectionSphere:{value:function(a){console.warn("THREE.Box3: .isIntersectionSphere() has been renamed to .intersectsSphere().");return this.intersectsSphere(a)}}});
2613Object.defineProperties(THREE.Matrix3.prototype,{multiplyVector3:{value:function(a){console.warn("THREE.Matrix3: .multiplyVector3(
2613) has been removed. Use vector.applyMatrix3( matrix ) instead.");return a.applyMatrix3(this)}},multiplyVector3Array:{value:function(a){console.warn("THREE.Matrix3: .multiplyVector3Array() has been renamed. Use matrix.applyToVector3Array( array ) instead.");return this.applyToVector3Array(a)}}});
2614Object.defineProperties(THREE.Matrix4.prototype,{extractPosition:{value:function(a){console.warn("THREE.Matrix4: .extractPosition() has been renamed to .copyPosition().");return this.copyPosition(a)}},setRotationFromQuaternion:{value:function(a){console.warn("THREE.Matrix4: .setRotationFromQuaternion() has been renamed to .makeRotationFromQuaternion().");return this.makeRotationFromQuaternion(a)}},multiplyVector3:{value:function(a){console.warn("THREE.Matrix4: .multiplyVector3() has been removed. Use vector.applyMatrix4( matrix ) or vector.applyProjection( matrix ) instead.");
2615return a.applyProjection(this)}},multiplyVector4:{value:function(a){console.warn("THREE.Matrix4: .multiplyVector4() has been removed. Use vector.applyMatrix4( matrix ) instead.");return a.applyMatrix4(this)}},multiplyVector3Array:{value:function(a){console.warn("THREE.Matrix4: .multiplyVector3Array() has been renamed. Use matrix.applyToVector3Array( array ) instead.");return this.applyToVector3Array(a)}},rotateAxis:{value:function(a){console.warn("THREE.Matrix4: .rotateAxis() has been removed. Use Vector3.transformDirection( matrix ) instead.");
2616a.transformDirection(this)}},crossVector:{value:function(a){console.warn("THREE.Matrix4: .crossVector() has been removed. Use vector.applyMatrix4( matrix ) instead.");return a.applyMatrix4(this)}},translate:{value:function(a){console.error("THREE.Matrix4: .translate() has been removed.")}},rotateX:{value:function(a){console.error("THREE.Matrix4: .rotateX() has been removed.")}},rotateY:{value:function(a){console.error("THREE.Matrix4: .rotateY() has been removed.")}},rotateZ:{value:function(a){console.error("THREE.Matrix4: .rotateZ() has been removed.")}},
2617rotateByAxis:{value:function(a,b){console.error("THREE.Matrix4: .rotateByAxis() has been removed.")}}});Object.defineProperties(THREE.Plane.prototype,{isIntersectionLine:{value:function(a){console.warn("THREE.Plane: .isIntersectionLine() has been renamed to .intersectsLine().");return this.intersectsLine(a)}}});
2618Object.defineProperties(THREE.Quaternion.prototype,{multiplyVector3:{value:function(a){console.warn("THREE.Quaternion: .multiplyVector3(
2618) has been removed. Use is now vector.applyQuaternion( quaternion ) instead.");return a.applyQuaternion(this)}}});
2619Object.defineProperties(THREE.Ray.prototype,{isIntersectionBox:{value:function(a){console.warn("THREE.Ray: .isIntersectionBox() has been renamed to .intersectsBox().");return this.intersectsBox(a)}},isIntersectionPlane:{value:function(a){console.warn("THREE.Ray: .isIntersectionPlane() has been renamed to .intersectsPlane().");return this.intersectsPlane(a)}},isIntersectionSphere:{value:function(a){console.warn("THREE.Ray: .isIntersectionSphere() has been renamed to .intersectsSphere().");return this.intersectsSphere(a)}}});
2620Object.defineProperties(THREE.Vector3.prototype,{setEulerFromRotationMatrix:{value:function(){console.error("THREE.Vector3: .setEulerFromRotationMatrix() has been removed. Use Euler.setFromRotationMatrix() instead.")}},setEulerFromQuaternion:{value:function(){console.error("THREE.Vector3: .setEulerFromQuaternion() has been removed. Use Euler.setFromQuaternion() instead.")}},getPositionFromMatrix:{value:function(a){console.warn("THREE.Vector3: .getPositionFromMatrix() has been renamed to .setFromMatrixPosition().");
2621return this.setFromMatrixPosition(a)}},getScaleFromMatrix:{value:function(a){console.warn("THREE.Vector3: .getScaleFromMatrix() has been renamed to .setFromMatrixScale().");return this.setFromMatrixScale(a)}},getColumnFromMatrix:{value:function(a,b){console.warn("THREE.Vector3: .getColumnFromMatrix() has been renamed to .setFromMatrixColumn().");return this.setFromMatrixColumn(a,b)}}});
2622THREE.Face4=function(a,b,c,d,e,f,g){console.warn("THREE.Face4 has been removed. A THREE.Face3 will be created instead.");return new THREE.Face3(a,b,c,e,f,g)};THREE.Vertex=function(a,b,c){console.warn("THREE.Vertex has been removed. Use THREE.Vector3 instead.");return new THREE.Vector3(a,b,c)};
2623Object.defineProperties(THREE.Object3D.prototype,{eulerOrder:{get:function(){console.warn("THREE.Object3D: .eulerOrder is now .rotation.order.");return this.rotation.order},set:function(a){console.warn("THREE.Object3D: .eulerOrder is now .rotation.order.");this.rotation.order=a}},getChildByName:{value:function(a){console.warn("THREE.Object3D: .getChildByName() has been renamed to .getObjectByName().");return this.getObjectByName(a)}},renderDepth:{set:function(a){console.warn("THREE.Object3D: .renderDepth has been removed. Use .renderOrder, instead.")}},
2624translate:{value:function(a,b){console.warn("THREE.Object3D: .translate() has been removed. Use .translateOnAxis( axis, distance ) instead.");return this.translateOnAxis(b,a)}},useQuaternion:{get:function(){console.warn("THREE.Object3D: .useQuaternion has been removed. The library now uses quaternions by default.")},set:function(a){console.warn("THREE.Object3D: .useQuaternion has been removed. The library now uses quaternions by default.")}}});
2625Object.defineProperties(THREE,{PointCloud:{value:function(a,b){console.warn("THREE.PointCloud has been renamed to THREE.Points.");return new THREE.Points(a,b)}},ParticleSystem:{value:function(a,b){console.warn("THREE.ParticleSystem has been renamed to THREE.Points.");return new THREE.Points(a,b)}}});
2626Object.defineProperties(THREE.Light.prototype,{onlyShadow:{set:function(a){console.warn("THREE.Light: .onlyShadow has been removed.")}},shadowCameraFov:{set:function(a){console.warn("THREE.Light: .shadowCameraFov is now .shadow.camera.fov.");this.shadow.camera.fov=a}},shadowCameraLeft:{set:function(a){console.warn("THREE.Light: .shadowCameraLeft is now .shadow.camera.left.");this.shadow.camera.left=a}},shadowCameraRight:{set:function(a){console.warn("THREE.Light: .shadowCameraRight is now .shadow.camera.right.");
2627this.shadow.camera.right=a}},shadowCameraTop:{set:function(a){console.warn("THREE.Light: .shadowCameraTop is now .shadow.camera.top.");this.shadow.camera.top=a}},shadowCameraBottom:{set:function(a){console.warn("THREE.Light: .shadowCameraBottom is now .shadow.camera.bottom.");this.shadow.camera.bottom=a}},shadowCameraNear:{set:function(a){console.warn("THREE.Light: .shadowCameraNear is now .shadow.camera.near.");this.shadow.camera.near=a}},shadowCameraFar:{set:function(a){console.warn("THREE.Light: .shadowCameraFar is now .shadow.camera.far.");
2628this.shadow.camera.far=a}},shadowCameraVisible:{set:function(a){console.warn("THREE.Light: .shadowCameraVisible has been removed. Use new THREE.C
2628ameraHelper( light.shadow.camera ) instead.")}},shadowBias:{set:function(a){console.warn("THREE.Light: .shadowBias is now .shadow.bias.");this.shadow.bias=a}},shadowDarkness:{set:function(a){console.warn("THREE.Light: .shadowDarkness has been removed.")}},shadowMapWidth:{set:function(a){console.warn("THREE.Light: .shadowMapWidth is now .shadow.mapSize.width.");
2629this.shadow.mapSize.width=a}},shadowMapHeight:{set:function(a){console.warn("THREE.Light: .shadowMapHeight is now .shadow.mapSize.height.");this.shadow.mapSize.height=a}}});Object.defineProperties(THREE.BufferAttribute.prototype,{length:{get:function(){console.warn("THREE.BufferAttribute: .length has been deprecated. Please use .count.");return this.array.length}}});
2630Object.defineProperties(THREE.BufferGeometry.prototype,{drawcalls:{get:function(){console.error("THREE.BufferGeometry: .drawcalls has been renamed to .groups.");return this.groups}},offsets:{get:function(){console.warn("THREE.BufferGeometry: .offsets has been renamed to .groups.");return this.groups}},addIndex:{value:function(a){console.warn("THREE.BufferGeometry: .addIndex() has been renamed to .setIndex().");this.setIndex(a)}},addDrawCall:{value:function(a,b,c){void 0!==c&&console.warn("THREE.BufferGeometry: .addDrawCall() no longer supports indexOffset.");
2631console.warn("THREE.BufferGeometry: .addDrawCall() is now .addGroup().");this.addGroup(a,b)}},clearDrawCalls:{value:function(){console.warn("THREE.BufferGeometry: .clearDrawCalls() is now .clearGroups().");this.clearGroups()}},computeTangents:{value:function(){console.warn("THREE.BufferGeometry: .computeTangents() has been removed.")}},computeOffsets:{value:function(){console.warn("THREE.BufferGeometry: .computeOffsets() has been removed.")}}});
2632Object.defineProperties(THREE.Material.prototype,{wrapAround:{get:function(){console.warn("THREE."+this.type+": .wrapAround has been removed.")}
2632,set:function(a){console.warn("THREE."+this.type+": .wrapAround has been removed.")}},wrapRGB:{get:function(){console.warn("THREE."+this.type+": .wrapRGB has been removed.");return new THREE.Color}}});
2633Object.defineProperties(THREE,{PointCloudMaterial:{value:function(a){console.warn("THREE.PointCloudMaterial has been renamed to THREE.PointsMaterial.");return new THREE.PointsMaterial(a)}},ParticleBasicMaterial:{value:function(a){console.warn("THREE.ParticleBasicMaterial has been renamed to THREE.PointsMaterial.");return new THREE.PointsMaterial(a)}},ParticleSystemMaterial:{value:function(a){console.warn("THREE.ParticleSystemMaterial has been renamed to THREE.PointsMaterial.");return new THREE.PointsMaterial(a)}}});
2634Object.defineProperties(THREE.MeshPhongMaterial.prototype,{metal:{get:function(){console.warn("THREE.MeshPhongMaterial: .metal has been removed. Use THREE.MeshStandardMaterial instead.");return!1},set:function(a){console.warn("THREE.MeshPhongMaterial: .metal has been removed. Use THREE.MeshStandardMaterial instead")}}});
2635Object.defineProperties(THREE.ShaderMaterial.prototype,{derivatives:{get:function(){console.warn("THREE.ShaderMaterial: .derivatives has been moved to .extensions.derivatives.");return this.extensions.derivatives},set:function(a){console.warn("THREE. ShaderMaterial: .derivatives has been moved to .extensions.derivatives.");this.extensions.derivatives=a}}});
2636Object.defineProperties(THREE.WebGLRenderer.prototype,{supportsFloatTextures:{value:function(){console.warn("THREE.WebGLRenderer: .supportsFloatTextures() is now .extensions.get( 'OES_texture_float' ).");return this.extensions.get("OES_texture_float")}},supportsHalfFloatTextures:{value:function(){console.warn("THREE.WebGLRenderer: .supportsHalfFloatTextures() is now .extensions.get( 'OES_texture_half_float' ).");return this.extensions.get("OES_texture_half_float")}},supportsStandardDerivatives:{value:function(){console.warn("THREE.WebGLRenderer: .supportsStandardDerivatives() is now .extensions.get( 'OES_standard_derivatives' ).");
2637return this.extensions.get("OES_standard_derivatives")}},supportsCompressedTextureS3TC:{value:function(){console.warn("THREE.WebGLRenderer: .supportsCompressedTextureS3TC() is now .extensions.get( 'WEBGL_compressed_texture_s3tc' ).");return this.extensions.get("WEBGL_compressed_texture_s3tc")}},supportsCompressedTexturePVRTC:{value:function(){console.warn("THREE.WebGLRenderer: .supportsCompressedTexturePVRTC() is now .extensions.get( 'WEBGL_compressed_texture_pvrtc' ).");return this.extensions.get("WEBGL_compressed_texture_pvrtc")}},
2638supportsBlendMinMax:{value:function(){console.warn("THREE.WebGLRenderer: .supportsBlendMinMax() is now .extensions.get( 'EXT_blend_minmax' ).");return this.extensions.get("EXT_blend_minmax")}},supportsVertexTextures:{value:function(){return this.capabilities.vertexTextures}},supportsInstancedArrays:{value:function(){console.warn("THREE.WebGLRenderer: .supportsInstancedArrays() is now .extensions.get( 'ANGLE_instanced_arrays' ).");return this.extensions.get("ANGLE_instanced_arrays")}},enableScissorTest:{value:function(a){console.warn("THREE.WebGLRenderer: .enableScissorTest() is now .setScissorTest().");
2639this.setScissorTest(a)}},initMaterial:{value:function(){console.warn("THREE.WebGLRenderer: .initMaterial() has been removed.")}},addPrePlugin:{value:function(){console.warn("THREE.WebGLRenderer: .addPrePlugin() has been removed.")}},addPostPlugin:{value:function(){console.warn("THREE.WebGLRenderer: .addPostPlugin() has been removed.")}},updateShadowMap:{value:function(){console.warn("THREE.WebGLRenderer: .updateShadowMap() has been removed.")}},shadowMapEnabled:{get:function(){return this.shadowMap.enabled},
2640set:function(a){console.warn("THREE.WebGLRenderer: .shadowMapEnabled is now .shadowMap.enabled.");this.shadowMap.enabled=a}},shadowMapType:{get:function(){return this.shadowMap.type},set:function(a){console.warn("THREE.WebGLRenderer: .shadowMapType is now .shadowMap.type.");this.shadowMap.type=a}},shadowMapCullFace:{get:function(){return this.shadowMap.cullFace},set:function(a){console.warn("THREE.WebGLRenderer: .shadowMapCullFace is now .shadowMap.cullFace.");this.shadowMap.cullFace=a}}});
2641Object.defineProperties(THREE.WebGLRenderTarget.prototype,{wrapS:{get:function(){console.warn("THREE.WebGLRenderTarget: .wrapS is now .texture.wrapS.");return this.texture.wrapS},set:function(a){console.warn("THREE.WebGLRenderTarget: .wrapS is now .texture.wrapS.");this.texture.wrapS=a}},wrapT:{get:function(){console.warn("THREE.WebGLRenderTarget: .wrapT is now .texture.wrapT.");return this.texture.wrapT},set:function(a){console.warn("THREE.WebGLRenderTarget: .wrapT is now .texture.wrapT.");this.texture.wrapT=
2642a}},magFilter:{get:function(){console.warn("THREE.WebGLRenderTarget: .magFilter is now .texture.magFilter.");return this.texture.magFilter},set:function(a){console.warn("THREE.WebGLRenderTarget: .magFilter is now .texture.magFilter.");this.texture.magFilter=a}},minFilter:{get:function(){console.warn("THREE.WebGLRenderTarget: .minFilter is now .texture.minFilter.");return this.texture.minFilter},set:function(a){console.warn("THREE.WebGLRenderTarget: .minFilter is now .texture.minFilter.");this.texture.minFilter=
2643a}},anisotropy:{get:function(){console.warn("THREE.WebGLRenderTarget: .anisotropy 
vendor: 7,137 bytes, lines 2643-2658
2643is now .texture.anisotropy.");return this.texture.anisotropy},set:function(a){console.warn("THREE.WebGLRenderTarget: .anisotropy is now .texture.anisotropy.");this.texture.anisotropy=a}},offset:{get:function(){console.warn("THREE.WebGLRenderTarget: .offset is now .texture.offset.");return this.texture.offset},set:function(a){console.warn("THREE.WebGLRenderTarget: .offset is now .texture.offset.");this.texture.offset=
2644a}},repeat:{get:function(){console.warn("THREE.WebGLRenderTarget: .repeat is now .texture.repeat.");return this.texture.repeat},set:function(a){console.warn("THREE.WebGLRenderTarget: .repeat is now .texture.repeat.");this.texture.repeat=a}},format:{get:function(){console.warn("THREE.WebGLRenderTarget: .format is now .texture.format.");return this.texture.format},set:function(a){console.warn("THREE.WebGLRenderTarget: .format is now .texture.format.");this.texture.format=a}},type:{get:function(){console.warn("THREE.WebGLRenderTarget: .type is now .texture.type.");
2645return this.texture.type},set:function(a){console.warn("THREE.WebGLRenderTarget: .type is now .texture.type.");this.texture.type=a}},generateMipmaps:{get:function(){console.warn("THREE.WebGLRenderTarget: .generateMipmaps is now .texture.generateMipmaps.");return this.texture.generateMipmaps},set:function(a){console.warn("THREE.WebGLRenderTarget: .generateMipmaps is now .texture.generateMipmaps.");this.texture.generateMipmaps=a}}});
2646THREE.GeometryUtils={merge:function(a,b,c){console.warn("THREE.GeometryUtils: .merge() has been moved to Geometry. Use geometry.merge( geometry2, matrix, materialIndexOffset ) instead.");var d;b instanceof THREE.Mesh&&(b.matrixAutoUpdate&&b.updateMatrix(),d=b.matrix,b=b.geometry);a.merge(b,d,c)},center:function(a){console.warn("THREE.GeometryUtils: .center() has been moved to Geometry. Use geometry.center() instead.");return a.center()}};
2647THREE.ImageUtils={crossOrigin:void 0,loadTexture:function(a,b,c,d){console.warn("THREE.ImageUtils.loadTexture has been deprecated. Use THREE.TextureLoader() instead.");var e=new THREE.TextureLoader;e.setCrossOrigin(this.crossOrigin);a=e.load(a,c,void 0,d);b&&(a.mapping=b);return a},loadTextureCube:function(a,b,c,d){console.warn("THREE.ImageUtils.loadTextureCube has been deprecated. Use THREE.CubeTextureLoader() instead.");var e=new THREE.CubeTextureLoader;e.setCrossOrigin(this.crossOrigin);a=e.load(a,
2648c,void 0,d);b&&(a.mapping=b);return a},loadCompressedTexture:function(){console.error("THREE.ImageUtils.loadCompressedTexture has been removed. Use THREE.DDSLoader instead.")},loadCompressedTextureCube:function(){console.error("THREE.ImageUtils.loadCompressedTextureCube has been removed. Use THREE.DDSLoader instead.")}};
2649THREE.Projector=function(){console.error("THREE.Projector has been moved to /examples/js/renderers/Projector.js.");this.projectVector=function(a,b){console.warn("THREE.Projector: .projectVector() is now vector.project().");a.project(b)};this.unprojectVector=function(a,b){console.warn("THREE.Projector: .unprojectVector() is now vector.unproject().");a.unproject(b)};this.pickingRay=function(a,b){console.error("THREE.Projector: .pickingRay() is now raycaster.setFromCamera().")}};
2650THREE.CanvasRenderer=function(){console.error("THREE.CanvasRenderer has been moved to /examples/js/renderers/CanvasRenderer.js");this.domElement=document.createElement("canvas");this.clear=function(){};this.render=function(){};this.setClearColor=function(){};this.setSize=function(){}};THREE.MeshFaceMaterial=THREE.MultiMaterial;
2651THREE.CurveUtils={tangentQuadraticBezier:function(a,b,c,d){return 2*(1-a)*(c-b)+2*a*(d-c)},tangentCubicBezier:function(a,b,c,d,e){return-3*b*(1-a)*(1-a)+3*c*(1-a)*(1-a)-6*a*c*(1-a)+6*a*d*(1-a)-3*a*a*d+3*a*a*e},tangentSpline:function(a,b,c,d,e){return 6*a*a-6*a+(3*a*a-4*a+1)+(-6*a*a+6*a)+(3*a*a-2*a)},interpolate:function(a,b,c,d,e){a=.5*(c-a);d=.5*(d-b);var f=e*e;return(2*b-2*c+a+d)*e*f+(-3*b+3*c-2*a-d)*f+a*e+b}};
2652THREE.SceneUtils={createMultiMaterialObject:function(a,b){for(var c=new THREE.Group,d=0,e=b.length;d<e;d++)c.add(new THREE.Mesh(a,b[d]));return c},detach:function(a,b,c){a.applyMatrix(b.matrixWorld);b.remove(a);c.add(a)},attach:function(a,b,c){var d=new THREE.Matrix4;d.getInverse(c.matrixWorld);a.applyMatrix(d);b.remove(a);c.add(a)}};
2653THREE.ShapeUtils={area:function(a){for(var b=a.length,c=0,d=b-1,e=0;e<b;d=e++)c+=a[d].x*a[e].y-a[e].x*a[d].y;return.5*c},triangulate:function(){return function(a,b){var c=a.length;if(3>c)return null;var d=[],e=[],f=[],g,h,k;if(0<THREE.ShapeUtils.area(a))for(h=0;h<c;h++)e[h]=h;else for(h=0;h<c;h++)e[h]=c-1-h;var l=2*c;for(h=c-1;2<c;){if(0>=l--){console.warn("THREE.ShapeUtils: Unable to triangulate polygon! in triangulate()");break}g=h;c<=g&&(g=0);h=g+1;c<=h&&(h=0);k=h+1;c<=k&&(k=0);var p;a:{var n=
2654p=void 0,m=void 0,q=void 0,u=void 0,v=void 0,t=void 0,s=void 0,w=void 0,n=a[e[g]].x,m=a[e[g]].y,q=a[e[h]].x,u=a[e[h]].y,v=a[e[k]].x,t=a[e[k]].y;if(Number.EPSILON>(q-n)*(t-m)-(u-m)*(v-n))p=!1;else{var E=void 0,x=void 0,D=void 0,z=void 0,y=void 0,B=void 0,G=void 0,F=void 0,H=void 0,L=void 0,H=F=G=w=s=void 0,E=v-q,x=t-u,D=n-v,z=m-t,y=q-n,B=u-m;for(p=0;p<c;p++)if(s=a[e[p]].x,w=a[e[p]].y,!(s===n&&w===m||s===q&&w===u||s===v&&w===t)&&(G=s-n,F=w-m,H=s-q,L=w-u,s-=v,w-=t,H=E*L-x*H,G=y*F-B*G,F=D*w-z*s,H>=-Number.EPSILON&&
2655F>=-Number.EPSILON&&G>=-Number.EPSILON)){p=!1;break a}p=!0}}if(p){d.push([a[e[g]],a[e[h]],a[e[k]]]);f.push([e[g],e[h],e[k]]);g=h;for(k=h+1;k<c;g++,k++)e[g]=e[k];c--;l=2*c}}return b?f:d}}(),triangulateShape:function(a,b){function c(a,b,c){return a.x!==b.x?a.x<b.x?a.x<=c.x&&c.x<=b.x:b.x<=c.x&&c.x<=a.x:a.y<b.y?a.y<=c.y&&c.y<=b.y:b.y<=c.y&&c.y<=a.y}function d(a,b,d,e,f){var g=b.x-a.x,h=b.y-a.y,k=e.x-d.x,l=e.y-d.y,n=a.x-d.x,p=a.y-d.y,y=h*k-g*l,B=h*n-g*p;if(Math.abs(y)>Number.EPSILON){if(0<y){if(0>B||B>
2656y)return[];k=l*n-k*p;if(0>k||k>y)return[]}else{if(0<B||B<y)return[];k=l*n-k*p;if(0<k||k<y)return[]}if(0===k)return!f||0!==B&&B!==y?[a]:[];if(k===y)return!f||0!==B&&B!==y?[b]:[];if(0===B)return[d];if(B===y)return[e];f=k/y;return[{x:a.x+f*g,y:a.y+f*h}]}if(0!==B||l*n!==k*p)return[];h=0===g&&0===h;k=0===k&&0===l;if(h&&k)return a.x!==d.x||a.y!==d.y?[]:[a];if(h)return c(d,e,a)?[a]:[];if(k)return c(a,b,d)?[d]:[];0!==g?(a.x<b.x?(g=a,k=a.x,h=b,a=b.x):(g=b,k=b.x,h=a,a=a.x),d.x<e.x?(b=d,y=d.x,l=e,d=e.x):(b=
2657e,y=e.x,l=d,d=d.x)):(a.y<b.y?(g=a,k=a.y,h=b,a=b.y):(g=b,k=b.y,h=a,a=a.y),d.y<e.y?(b=d,y=d.y,l=e,d=e.y):(b=e,y=e.y,l=d,d=d.y));return k<=y?a<y?[]:a===y?f?[]:[b]:a<=d?[b,h]:[b,l]:k>d?[]:k===d?f?[]:[g]:a<=d?[g,h]:[g,l]}function e(a,b,c,d){var e=b.x-a.x,f=b.y-a.y;b=c.x-a.x;c=c.y-a.y;var g=d.x-a.x;d=d.y-a.y;a=e*c-f*b;e=e*d-f*g;return Math.abs(a)>Number.EPSILON?(b=g*c-d*b,0<a?0<=e&&0<=b:0<=e||0<=b):0<e}var f,g,h,k,l,p={};h=a.concat();f=0;for(g=b.length;f<g;f++)Array.prototype.push.apply(h,b[f]);f=0;for(g=
2658h.length;f<g;f++)l=h[f].x+":"+h[f].y,void 0!==p[l]&&console.warn("THREE.Shape: Duplicate point",l),p[l]=f;f=function(a,b){function c(a,b){var d=h.length-1,f=a-1;0>f&&(f=d);var g=a+1;g>d&&(g=0);d=e(h[a],h[f],h[g],k[b]);if(!d)return!1;d=k.length-1;f=b-1;0>f&&(f=d);g=b+1;g>d&&(g=0);return(d=e(k[b],k[f],k[g],h[a]))?!0:!1}function f(a,b){var c,e;
2658for(c=0;c<h.length;c++)if(e=c+1,e%=h.length,e=d(a,b,h[c],h[e],!0),0<e.length)return!0;return!1}function g(a,c){var e,f,h,k;for(e=0;e<l.length;e++)for(f=b[l[e]],
2659h=0;h<f.length;h++)if(k=h+1,k%=f.length,k=d(a,c,f[h],f[k],!0),0<k.length)return!0;return!1}var h=a.concat(),k,l=[],n,p,z,y,B,G=[],F,H,L,A=0;for(n=b.length;A<n;A++)l.push(A);F=0;for(var N=2*l.length;0<l.length;){N--;if(0>N){console.log("Infinite Loop! Holes left:"+l.length+", Probably Hole outside Shape!");break}for(p=F;p<h.length;p++){z=h[p];n=-1;for(A=0;A<l.length;A++)if(y=l[A],B=z.x+":"+z.y+":"+y,void 0===G[B]){k=b[y];for(H=0;H<k.length;H++)if(y=k[H],c(p,H)&&!f(z,y)&&!g(z,y)){n=H;l.splice(A,1);
2660F=h.slice(0,p+1);y=h.slice(p);H=k.slice(n);L=k.slice(0,n+1);h=F.concat(H).concat(L).concat(y);F=p;break}if(0<=n)break;G[B]=!0}if(0<=n)break}}return h}(a,b);var n=THREE.ShapeUtils.triangulate(f,!1);f=0;for(g=n.length;f<g;f++)for(k=n[f],h=0;3>h;h++)l=k[h].x+":"+k[h].y,l=p[l],void 0!==l&&(k[h]=l);return n.concat()},isClockWise:function(a){return 0>THREE.ShapeUtils.area(a)},b2:function(){return function(a,b,c,d){var e=1-a;return e*e*b+2*(1-a)*a*c+a*a*d}}(),b3:function(){return function(a,b,c,d,e){var f=
26611-a,g=1-a;return f*f*f*b+3*g*g*a*c+3*(1-a)*a*a*d+a*a*a*e}}()};THREE.Curve=function(){};
2662THREE.Curve.prototype={constructor:THREE.Curve,getPoint:function(a){console.warn("THREE.Curve: Warning, getPoint() not implemented!");return null},getPointAt:function(a){a=this.getUtoTmapping(a);return this.getPoint(a)},getPoints:function(a){a||(a=5);var b,c=[];for(b=0;b<=a;b++)c.push(this.getPoint(b/a));return c},getSpacedPoints:function(a){a||(a=5);var b,c=[];for(b=0;b<=a;b++)c.push(this.getPointAt(b/a));return c},getLength:function(){var a=this.getLengths();return a[a.length-1]},getLengths:function(a){a||
2663(a=this.__arcLengthDivisions?this.__arcLengthDivisions:200);if(this.cacheArcLengths&&this.cacheArcLengths.length===a+1&&!this.needsUpdate)return this.cacheArcLengths;this.needsUpdate=!1;var b=[],c,d=this.getPoint(0),e,f=0;b.push(0);for(e=1;e<=a;e++)c=this.getPoint(e/a),f+=c.distanceTo(d),b.push(f),d=c;return this.cacheArcLengths=b},updateArcLengths:function(){this.needsUpdate=!0;this.getLengths()},getUtoTmapping:function(a,b){var c=this.getLengths(),d=0,e=c.length,f;f=b?b:a*c[e-1];for(var g=0,h=e-
26641,k;g<=h;)if(d=Math.floor(g+(h-g)/2),k=c[d]-f,0>k)g=d+1;else if(0<k)h=d-1;else{h=d;break}d=h;if(c[d]===f)return d/(e-1);g=c[d];return c=(d+(f-g)/(c[d+1]-g))/(e-1)},getTangent:function(a){var b=a-1E-4;a+=1E-4;0>b&&(b=0);1<a&&(a=1);b=this.getPoint(b);return this.getPoint(a).clone().sub(b).normalize()},getTangentAt:function(a){a=this.getUtoTmapping(a);return this.getTangent(a)}};
2665THREE.Curve.create=function(a,b){a.prototype=Object.create(THREE.Curve.prototype);a.prototype.constructor=a;a.prototype.getPoint=b;return a};THREE.CurvePath=function(){this.curves=[];this.autoClose=!1};THREE.CurvePath.prototype=Object.create(THREE.Curve.prototype);THREE.CurvePath.prototype.constructor=THREE.CurvePath;THREE.CurvePath.prototype.add=function(a){this.curves.push(a)};
2666THREE.CurvePath.prototype.closePath=function(){var a=this.curves[0].getPoint(0),b=this.curves[this.curves.length-1].getPoint(1);a.equals(b)||this.curves.push(new THREE.LineCurve(b,a))};THREE.CurvePath.prototype.getPoint=function(a){for(var b=a*this.getLength(),c=this.getCurveLengths(),d=0;d<c.length;){if(c[d]>=b)return a=this.curves[d],b=1-(c[d]-b)/a.getLength(),a.getPointAt(b);d++}return null};THREE.CurvePath.prototype.getLength=function(){var a=this.getCurveLengths();return a[a.length-1]};
2667THREE.CurvePath.prototype.getCurveLengths=function(){if(this.cacheLengths&&this.cacheLengths.length===this.curves.length)return this.cacheLengths;for(var a=[],b=0,c=0,d=this.curves.length;c<d;c++)b+=this.curves[c].getLength(),a.push(b);return this.cacheLengths=a};THREE.CurvePath.prototype.createPointsGeometry=function(a){a=this.getPoints(a);return this.createGeometry(a)};THREE.CurvePath.prototype.createSpacedPointsGeometry=function(a){a=this.getSpacedPoints(a);return this.createGeometry(a)};
2668THREE.CurvePath.prototype.createGeometry=function(a){for(var b=new THREE.Geometry,c=0,d=a.length;c<d;c++){var e=a[c];b.vertices.push(new THREE.Vector3(e.x,e.y,e.z||0))}return b};THREE.Font=function(a){this.data=a};
2669THREE.Font.prototype={constructor:THREE.Font,generateShapes:function(a,b,c){void 0===b&&(b=100);void 0===c&&(c=4);var d=this.data;a=String(a).split("");var e=b/d.resolution,f=0;b=[];for(var g=0;g<a.length;g++){var h;h=e;var k=f,l=d.glyphs[a[g]]||d.glyphs["?"];if(l){var p=new THREE.Path,n=[],m=THREE.ShapeUtils.b2,q=THREE.ShapeUtils.b3,u=void 0,v=void 0,t=v=u=void 0,s=void 0,w=void 0,E=void 0,x=void 0,D=void 0,s=void 0;if(l.o)for(var z=l._cachedOutline||(l._cachedOutline=l.o.split(" ")),y=0,B=z.length;y<
2670B;)switch(z[y++]){case "m":u=z[y++]*h+k;v=z[y++]*h;p.moveTo(u,v);break;case "l":u=z[y++]*h+k;v=z[y++]*h;p.lineTo(u,v);break;case "q":u=z[y++]*h+k;v=z[y++]*h;w=z[y++]*h+k;E=z[y++]*h;p.quadraticCurveTo(w,E,u,v);if(s=n[n.length-1])for(var t=s.x,s=s.y,G=1;G<=c;G++){var F=G/c;m(F,t,w,u);m(F,s,E,v)}break;case "b":if(u=z[y++]*h+k,v=z[y++]*h,w=z[y++]*h+k,E=z[y++]*h,x=z[y++]*h+k,D=z[y++]*h,p.bezierCurveTo(w,E,x,D,u,v),s=n[n.length-1])for(t=s.x,s=s.y,G=1;G<=c;G++)F=G/c,q(F,t,w,x,u),q(F,s,E,D,v)}h={offset:l.ha*
2671h,path:p}}else h=void 0;f+=h.offset;b.push(h.path)}c=[];d=0;for(a=b.length;d<a;d++)Array.prototype.push.apply(c,b[d].toShapes());return c}};THREE.Path=function(a){THREE.CurvePath.call(this);this.actions=[];a&&this.fromPoints(a)};THREE.Path.prototype=Object.create(THREE.CurvePath.prototype);THREE.Path.prototype.constructor=THREE.Path;THREE.Path.prototype.fromPoints=function(a){this.moveTo(a[0].x,a[0].y);for(var b=1,c=a.length;b<c;b++)this.lineTo(a[b].x,a[b].y)};
2672THREE.Path.prototype.moveTo=function(a,b){this.actions.push({action:"moveTo",args:[a,b]})};THREE.Path.prototype.lineTo=function(a,b){var c=this.actions[this.actions.length-1].args,c=new THREE.LineCurve(new THREE.Vector2(c[c.length-2],c[c.length-1]),new THREE.Vector2(a,b));this.curves.push(c);this.actions.push({action:"lineTo",args:[a,b]})};
2673THREE.Path.prototype.quadraticCurveTo=function(a,b,c,d){var e=this.actions[this.actions.length-1].args,e=new THREE.QuadraticBezierCurve(new THREE.Vector2(e[e.length-2],e[e.length-1]),new THREE.Vector2(a,b),new THREE.Vector2(c,d));this.curves.push(e);this.actions.push({action:"quadraticCurveTo",args:[a,b,c,d]})};
2674THREE.Path.prototype.bezierCurveTo=function(a,b,c,d,e,f){var g=this.actions[this.actions.length-1].args,g=new THREE.CubicBezierCurve(new THREE.Vector2(g[g.length-2],g[g.length-1]),new THREE.Vector2(a,b),new THREE.Vector2(c,d),new THREE.Vector2(e,f));this.curves.push(g);this.actions.push({action:"bezierCurveTo",args:[a,b,c,d,e,f]})};
2675THREE.Path.prototype.splineThru=function(a){var b=Array.prototype.slice.call(arguments),c=this.actions[this.actions.length-1].args,c=[new THREE.Vector2(c[c.length-2],c[c.length-1])];Array.prototype.push.apply(c,a);c=new THREE.SplineCurve(c);this.curves.push(c);this.actions.push({action:"splineThru",args:b})};THREE.Path.prototype.arc=function(a,b,c,d,e,f){var g=this.actions[this.actions.length-1].args;this.absarc(a+g[g.length-2],b+g[g.length-1],c,d,e,f)};
2676THREE.Path.prototype.absarc=function(a,b,c,d,e,f){this.absellipse(a,b,c,c,d,e,f)};THREE.Path.prototype.ellipse=function(a,b,c,d,e,f,g,h){var k=this.actions[this.actions.length-1].args;this.absellipse(a+k[k.length-2],b+k[k.length-1],c,d,e,f,g,h)};THREE.Path.prototype.absellipse=function(a,b,c,d,e,f,g,h){var k=[a,b,c,d,e,f,g,h||0];a=new THREE.EllipseCurve(a,b,c,d,e,f,g,h);this.curves.push(a);a=a.getPoint(1);k.push(a.x);k.push(a.y);this.actions.push({action:"ellipse",args:k})};
2677THREE.Path.prototype.getSpacedPoints=function(a){a||(a=40);for(var b=[],c=0;c<a;c++)b.push(this.getPoint(c/a));this.autoClose&&b.push(b[0]);return b};
2678THREE.Path.prototype.getPoints=function(a){a=a||12;for(var b=THREE.ShapeUtils.b2,c=THREE.ShapeUtils.b3,d=[],e,f,g,h,k,l,p,n,m,q,u=0,v=this.actions.length;u<v;u++){m=this.actions[u];var t=m.args;switch(m.action){case "moveTo":d.push(new THREE.Vector2(t[0],t[1]));break;case "lineTo":d.push(new THREE.Vector2(t[0],t[1]));break;case "quadraticCurveTo":e=t[2];f=t[3];k=t[0];l=t[1];0<d.length?(m=d[d.length-1],p=m.x,n=m.y):(m=this.actions[u-1].args,p=m[m.length-2],n=m[m.length-1]);for(t=1;t<=a;t++)q=t/a,m=
2679b(q,p,k,e),q=b(q,n,l,f),d.push(new THREE.Vector2(m,q));break;case "bezierCurveTo":e=t[4];f=t[5];k=t[0];l=t[1];g=t[2];h=t[3];0<d.length?(m=d[d.length-1],p=m.x,n=m.y):(m=this.actions[u-1].args,p=m[m.length-2],n=m[m.length-1]);for(t=1;t<=a;t++)q=t/a,m=c(q,p,k,g,e),q=c(q,n,l,h,f),d.push(new THREE.Vector2(m,q));break;case "splineThru":m=this.actions[u-1].args;q=[new THREE.Vector2(m[m.length-2],m[m.length-1])];m=a*t[0].length;q=q.concat(t[0]);q=new THREE.SplineCurve(q);for(t=1;t<=m;t++)d.push(q.getPointAt(t/
2680m));break;case "arc":e=t[0];f=t[1];l=t[2];g=t[3];m=t[4];k=!!t[5];p=m-g;n=2*a;for(t=1;t<=n;
2680t++)q=t/n,k||(q=1-q),q=g+q*p,m=e+l*Math.cos(q),q=f+l*Math.sin(q),d.push(new THREE.Vector2(m,q));break;case "ellipse":e=t[0];f=t[1];l=t[2];h=t[3];g=t[4];m=t[5];k=!!t[6];var s=t[7];p=m-g;n=2*a;var w,E;0!==s&&(w=Math.cos(s),E=Math.sin(s));for(t=1;t<=n;t++){q=t/n;k||(q=1-q);q=g+q*p;m=e+l*Math.cos(q);q=f+h*Math.sin(q);if(0!==s){var x=m;m=(x-e)*w-(q-f)*E+e;q=(x-e)*E+(q-f)*w+f}d.push(new THREE.Vector2(m,q))}}}a=d[d.length-
26811];Math.abs(a.x-d[0].x)<Number.EPSILON&&Math.abs(a.y-d[0].y)<Number.EPSILON&&d.splice(d.length-1,1);this.autoClose&&d.push(d[0]);return d};
2682THREE.Path.prototype.toShapes=function(a,b){function c(a){for(var b=[],c=0,d=a.length;c<d;c++){var e=a[c],f=new THREE.Shape;f.actions=e.actions;f.curves=e.curves;b.push(f)}return b}function d(a,b){for(var c=b.length,d=!1,e=c-1,f=0;f<c;e=f++){var g=b[e],h=b[f],k=h.x-g.x,l=h.y-g.y;if(Math.abs(l)>Number.EPSILON){if(0>l&&(g=b[f],k=-k,h=b[e],l=-l),!(a.y<g.y||a.y>h.y))if(a.y===g.y){if(a.x===g.x)return!0}else{e=l*(a.x-g.x)-k*(a.y-g.y);if(0===e)return!0;0>e||(d=!d)}}else if(a.y===g.y&&(h.x<=a.x&&a.x<=g.x||
2683g.x<=a.x&&a.x<=h.x))return!0}return d}var e=THREE.ShapeUtils.isClockWise,f=function(a){for(var b=[],c=new THREE.Path,d=0,e=a.length;d<e;d++){var f=a[d],g=f.args,f=f.action;"moveTo"===f&&0!==c.actions.length&&(b.push(c),c=new THREE.Path);c[f].apply(c,g)}0!==c.actions.length&&b.push(c);return b}(this.actions);if(0===f.length)return[];if(!0===b)return c(f);var g,h,k,l=[];if(1===f.length)return h=f[0],k=new THREE.Shape,k.actions=h.actions,k.curves=h.curves,l.push(k),l;var p=!e(f[0].getPoints()),p=a?!p:
2684p;k=[];var n=[],m=[],q=0,u;n[q]=void 0;m[q]=[];for(var v=0,t=f.length;v<t;v++)h=f[v],u=h.getPoints(),g=e(u),(g=a?!g:g)?(!p&&n[q]&&q++,n[q]={s:new THREE.Shape,p:u},n[q].s.actions=h.actions,n[q].s.curves=h.curves,p&&q++,m[q]=[]):m[q].push({h:h,p:u[0]});if(!n[0])return c(f);if(1<n.length){v=!1;h=[];e=0;for(f=n.length;e<f;e++)k[e]=[];e=0;for(f=n.length;e<f;e++)for(g=m[e],p=0;p<g.length;p++){q=g[p];u=!0;for(t=0;t<n.length;t++)d(q.p,n[t].p)&&(e!==t&&h.push({froms:e,tos:t,hole:p}),u?(u=!1,k[t].push(q)):
2685v=!0);u&&k[e].push(q)}0<h.length&&(v||(m=k))}v=0;for(e=n.length;v<e;v++)for(k=n[v].s,l.push(k),h=m[v],f=0,g=h.length;f<g;f++)k.holes.push(h[f].h);return l};THREE.Shape=function(){THREE.Path.apply(this,arguments);this.holes=[]};THREE.Shape.prototype=Object.create(THREE.Path.prototype);THREE.Shape.prototype.constructor=THREE.Shape;THREE.Shape.prototype.extrude=function(a){return new THREE.ExtrudeGeometry(this,a)};THREE.Shape.prototype.makeGeometry=function(a){return new THREE.ShapeGeometry(this,a)};
2686THREE.Shape.prototype.getPointsHoles=function(a){for(var b=[],c=0,d=this.holes.length;c<d;c++)b[c]=this.holes[c].getPoints(a);return b};THREE.Shape.prototype.extractAllPoints=function(a){return{shape:this.getPoints(a),holes:this.getPointsHoles(a)}};THREE.Shape.prototype.extractPoints=function(a){return this.extractAllPoints(a)};THREE.LineCurve=function(a,b){this.v1=a;this.v2=b};THREE.LineCurve.prototype=Object.create(THREE.Curve.prototype);THREE.LineCurve.prototype.constructor=THREE.LineCurve;
2687THREE.LineCurve.prototype.getPoint=function(a){var b=this.v2.clone().sub(this.v1);b.multiplyScalar(a).add(this.v1);return b};THREE.LineCurve.prototype.getPointAt=function(a){return this.getPoint(a)};THREE.LineCurve.prototype.getTangent=function(a){return this.v2.clone().sub(this.v1).normalize()};THREE.QuadraticBezierCurve=function(a,b,c){this.v0=a;this.v1=b;this.v2=c};THREE.QuadraticBezierCurve.prototype=Object.create(THREE.Curve.prototype);THREE.QuadraticBezierCurve.prototype.constructor=THREE.QuadraticBezierCurve;
2688THREE.QuadraticBezierCurve.prototype.getPoint=function(a){var b=THREE.ShapeUtils.b2;return new THREE.Vector2(b(a,this.v0.x,this.v1.x,this.v2.x),b(a,this.v0.y,this.v1.y,this.v2.y))};THREE.QuadraticBezierCurve.prototype.getTangent=function(a){var b=THREE.CurveUtils.tangentQuadraticBezier;return(new THREE.Vector2(b(a,this.v0.x,this.v1.x,this.v2.x),b(a,this.v0.y,this.v1.y,this.v2.y))).normalize()};THREE.CubicBezierCurve=function(a,b,c,d){this.v0=a;this.v1=b;this.v2=c;this.v3=d};
2689THREE.CubicBezierCurve.prototype=Object.create(THREE.Curve.prototype);THREE.CubicBezierCurve.prototype.constructor=THREE.CubicBezierCurve;THREE.CubicBezierCurve.prototype.getPoint=function(a){var b=THREE.ShapeUtils.b3;return new THREE.Vector2(b(a,this.v0.x,this.v1.x,this.v2.x,this.v3.x),b(a,this.v0.y,this.v1.y,this.v2.y,this.v3.y))};
2690THREE.CubicBezierCurve.prototype.getTangent=function(a){var b=THREE.CurveUtils.tangentCubicBezier;return(new THREE.Vector2(b(a,this.v0.x,this.v1.x,this.v2.x,this.v3.x),b(a,this.v0.y,this.v1.y,this.v2.y,this.v3.y))).normalize()};THREE.SplineCurve=function(a){this.points=void 0==a?[]:a};THREE.SplineCurve.prototype=Object.create(THREE.Curve.prototype);THREE.SplineCurve.prototype.constructor=THREE.SplineCurve;
2691THREE.SplineCurve.prototype.getPoint=function(a){var b=this.points;a*=b.length-1;var c=Math.floor(a);a-=c;var d=b[0===c?c:c-1],e=b[c],f=b[c>b.length-2?b.length-1:c+1],b=b[c>b.length-3?b.length-1:c+2],c=THREE.CurveUtils.interpolate;return new THREE.Vector2(c(d.x,e.x,f.x,b.x,a),c(d.y,e.y,f.y,b.y,a))};THREE.EllipseCurve=function(a,b,c,d,e,f,g,h){this.aX=a;this.aY=b;this.xRadius=c;this.yRadius=d;this.aStartAngle=e;this.aEndAngle=f;this.aClockwise=g;this.aRotation=h||0};THREE.EllipseCurve.prototype=Object.create(THREE.Curve.prototype);
2692THREE.EllipseCurve.prototype.constructor=THREE.EllipseCurve;
2693THREE.EllipseCurve.prototype.getPoint=function(a){var b=this.aEndAngle-this.aStartAngle;0>b&&(b+=2*Math.PI);b>2*Math.PI&&(b-=2*Math.PI);b=!0===this.aClockwise?this.aEndAngle+(1-a)*(2*Math.PI-b):this.aStartAngle+a*b;a=this.aX+this.xRadius*Math.cos(b);var c=this.aY+this.yRadius*Math.sin(b);if(0!==this.aRotation){var b=Math.cos(this.aRotation),d=Math.sin(this.aRotation),e=a;a=(e-this.aX)*b-(c-this.aY)*d+this.aX;c=(e-this.aX)*d+(c-this.aY)*b+this.aY}return new THREE.Vector2(a,c)};
2694THREE.ArcCurve=function(a,b,c,d,e,f){THREE.EllipseCurve.call(this,a,b,c,c,d,e,f)};THREE.ArcCurve.prototype=Object.create(THREE.EllipseCurve.prototype);THREE.ArcCurve.prototype.constructor=THREE.ArcCurve;THREE.LineCurve3=THREE.Curve.create(function(a,b){this.v1=a;this.v2=b},function(a){var b=new THREE.Vector3;b.subVectors(this.v2,this.v1);b.multiplyScalar(a);b.add(this.v1);return b});
2695THREE.QuadraticBezierCurve3=THREE.Curve.create(function(a,b,c){this.v0=a;this.v1=b;this.v2=c},function(a){var b=THREE.ShapeUtils.b2;return new THREE.Vector3(b(a,this.v0.x,this.v1.x,this.v2.x),b(a,this.v0.y,this.v1.y,this.v2.y),b(a,this.v0.z,this.v1.z,this.v2.z))});
2696THREE.CubicBezierCurve3=THREE.Curve.create(function(a,b,c,d){this.v0=a;this.v1=b;this.v2=c;this.v3=d},function(a){var b=THREE.ShapeUtils.b3;return new THREE.Vector3(b(a,this.v0.x,this.v1.x,this.v2.x,this.v3.x),b(a,this.v0.y,this.v1.y,this.v2.y,this.v3.y),b(a,this.v0.z,this.v1.z,this.v2.z,this.v3.z))});
2697THREE.SplineCurve3=THREE.Curve.create(function(a){console.warn("THREE.SplineCurve3 will be deprecated. Please use THREE.CatmullRomCurve3");this.points=void 0==a?[]:a},function(a){var b=this.points;a*=b.length-1;var c=Math.floor(a);a-=c;var d=b[0==c?c:c-1],e=b[c],f=b[c>b.length-2?b.length-1:c+1],b=b[c>b.length-3?b.length-1:c+2],c=THREE.CurveUtils.interpolate;return new THREE.Vector3(c(d.x,e.x,f.x,b.x,a),c(d.y,e.y,f.y,b.y,a),c(d.z,e.z,f.z,b.z,a))});
2698THREE.CatmullRomCurve3=function(){function a(){}var b=new THREE.Vector3,c=new a,d=new a,e=new a;a.prototype.init=function(a,b,c,d){this.c0=a;this.c1=c;this.c2=-3*a+3*b-2*c-d;this.c3=2*a-2*b+c+d};a.prototype.initNonuniformCatmullRom=function(a,b,c,d,e,p,n){a=((b-a)/e-(c-a)/(e+p)+(c-b)/p)*p;d=((c-b)/p-(d-b)/(p+n)+(d-c)/n)*p;this.init(b,c,a,d)};a.prototype.initCatmullRom=function(a,b,c,d,e){this.init(b,c,e*(c-a),e*(d-b))};a.prototype.calc=function(a){var b=a*a;return this.c0+this.c1*a+this.c2*b+this.c3*
2699b*a};return THREE.Curve.create(function(a){this.points=a||[];this.closed=!1}
vendor: 4,104 bytes, lines 2699-2707
2699,function(a){var g=this.points,h,k;k=g.length;2>k&&console.log("duh, you need at least 2 points");a*=k-(this.closed?0:1);h=Math.floor(a);a-=h;this.closed?h+=0<h?0:(Math.floor(Math.abs(h)/g.length)+1)*g.length:0===a&&h===k-1&&(h=k-2,a=1);var l,p,n;this.closed||0<h?l=g[(h-1)%k]:(b.subVectors(g[0],g[1]).add(g[0]),l=b);p=g[h%k];n=g[(h+1)%k];this.closed||h+2<k?g=g[(h+2)%k]:(b.subVectors(g[k-1],g[k-2]).add(g[k-1]),g=b);if(void 0===
2700this.type||"centripetal"===this.type||"chordal"===this.type){var m="chordal"===this.type?.5:.25;k=Math.pow(l.distanceToSquared(p),m);h=Math.pow(p.distanceToSquared(n),m);m=Math.pow(n.distanceToSquared(g),m);1E-4>h&&(h=1);1E-4>k&&(k=h);1E-4>m&&(m=h);c.initNonuniformCatmullRom(l.x,p.x,n.x,g.x,k,h,m);d.initNonuniformCatmullRom(l.y,p.y,n.y,g.y,k,h,m);e.initNonuniformCatmullRom(l.z,p.z,n.z,g.z,k,h,m)}else"catmullrom"===this.type&&(k=void 0!==this.tension?this.tension:.5,c.initCatmullRom(l.x,p.x,n.x,g.x,
2701k),d.initCatmullRom(l.y,p.y,n.y,g.y,k),e.initCatmullRom(l.z,p.z,n.z,g.z,k));return new THREE.Vector3(c.calc(a),d.calc(a),e.calc(a))})}();THREE.ClosedSplineCurve3=function(a){console.warn("THREE.ClosedSplineCurve3 has been deprecated. Please use THREE.CatmullRomCurve3.");THREE.CatmullRomCurve3.call(this,a);this.type="catmullrom";this.closed=!0};THREE.ClosedSplineCurve3.prototype=Object.create(THREE.CatmullRomCurve3.prototype);
2702THREE.BoxGeometry=function(a,b,c,d,e,f){THREE.Geometry.call(this);this.type="BoxGeometry";this.parameters={width:a,height:b,depth:c,widthSegments:d,heightSegments:e,depthSegments:f};this.fromBufferGeometry(new THREE.BoxBufferGeometry(a,b,c,d,e,f));this.mergeVertices()};THREE.BoxGeometry.prototype=Object.create(THREE.Geometry.prototype);THREE.BoxGeometry.prototype.constructor=THREE.BoxGeometry;THREE.CubeGeometry=THREE.BoxGeometry;
2703THREE.BoxBufferGeometry=function(a,b,c,d,e,f){function g(a,b,c,d,e,f,g,k,l,L,A){var N=f/l,M=g/L,I=f/2,O=g/2,Q=k/2;g=l+1;for(var P=L+1,T=f=0,J=new THREE.Vector3,C=0;C<P;C++)for(var Z=C*M-O,S=0;S<g;S++)J[a]=(S*N-I)*d,J[b]=Z*e,J[c]=Q,n[u]=J.x,n[u+1]=J.y,n[u+2]=J.z,J[a]=0,J[b]=0,J[c]=0<k?1:-1,m[u]=J.x,m[u+1]=J.y,m[u+2]=J.z,q[v]=S/l,q[v+1]=1-C/L,u+=3,v+=2,f+=1;for(C=0;C<L;C++)for(S=0;S<l;S++)a=s+S+g*(C+1),b=s+(S+1)+g*(C+1),c=s+(S+1)+g*C,p[t]=s+S+g*C,p[t+1]=a,p[t+2]=c,p[t+3]=a,p[t+4]=b,p[t+5]=c,t+=6,T+=
27046;h.addGroup(w,T,A);w+=T;s+=f}THREE.BufferGeometry.call(this);this.type="BoxBufferGeometry";this.parameters={width:a,height:b,depth:c,widthSegments:d,heightSegments:e,depthSegments:f};var h=this;d=Math.floor(d)||1;e=Math.floor(e)||1;f=Math.floor(f)||1;var k=function(a,b,c){a=0+a*b*2+a*c*2;a+=c*b*2;return 4*a}(d,e,f),l=k/4*6,p=new (65535<l?Uint32Array:Uint16Array)(l),n=new Float32Array(3*k),m=new Float32Array(3*k),q=new Float32Array(2*k),u=0,v=0,t=0,s=0,w=0;g("z","y","x",-1,-1,c,b,a,f,e,0);g("z","y",
2705"x",1,-1,c,b,-a,f,e,1);g("x","z","y",1,1,a,c,b,d,f,2);g("x","z","y",1,-1,a,c,-b,d,f,3);g("x","y","z",1,-1,a,b,c,d,e,4);g("x","y","z",-1,-1,a,b,-c,d,e,5);this.setIndex(new THREE.BufferAttribute(p,1));this.addAttribute("position",new THREE.BufferAttribute(n,3));this.addAttribute("normal",new THREE.BufferAttribute(m,3));this.addAttribute("uv",new THREE.BufferAttribute(q,2))};THREE.BoxBufferGeometry.prototype=Object.create(THREE.BufferGeometry.prototype);
2706THREE.BoxBufferGeometry.prototype.constructor=THREE.BoxBufferGeometry;THREE.CircleGeometry=function(a,b,c,d){THREE.Geometry.call(this);this.type="CircleGeometry";this.parameters={radius:a,segments:b,thetaStart:c,thetaLength:d};this.fromBufferGeometry(new THREE.CircleBufferGeometry(a,b,c,d))};THREE.CircleGeometry.prototype=Object.create(THREE.Geometry.prototype);THREE.CircleGeometry.prototype.constructor=THREE.CircleGeometry;
2707THREE.CircleBufferGeometry=function(a,b,c,d){THREE.BufferGeometry.call(this);this.type="CircleBufferGeometry";this.parameters={radius:a,segments:b,thetaStart:c,thetaLength:d};a=a||50;b=void 0!==b?Math.max(3,b):8;c=void 0!==c?c:0;d=void 0!==d?d:2*Math.PI;var e=b+2,f=new Float32Array(3*e),g=new Float32Array(3*e),e=new Float32Array(2*e);g[2]=1;e[0]=.5;e[1]=.5;for(var h=0,k=3,l=2;h<=b;h++,k+=3,l+=2){var p=c+h/b*d;
2707f[k]=a*Math.cos(p);f[k+1]=a*Math.sin(p);g[k+2]=1;e[l]=(f[k]/a+1)/2;e[l+1]=(f[k+1]/a+1)/2}c=
2708[];for(k=1;k<=b;k++)c.push(k,k+1,0);this.setIndex(new THREE.BufferAttribute(new Uint16Array(c),1));this.addAttribute("position",new THREE.BufferAttribute(f,3));this.addAttribute("normal",new THREE.BufferAttribute(g,3));this.addAttribute("uv",new THREE.BufferAttribute(e,2));this.boundingSphere=new THREE.Sphere(new THREE.Vector3,a)};THREE.CircleBufferGeometry.prototype=Object.create(THREE.BufferGeometry.prototype);THREE.CircleBufferGeometry.prototype.constructor=THREE.CircleBufferGeometry;
2709THREE.CylinderBufferGeometry=function(a,b,c,d,e,f,g,h){function k(c){var e,f,k;k=new THREE.Vector2;var l=new THREE.Vector3,p=!0===c?a:b,s=!0===c?1:-1;f=v;for(e=1;e<=d;e++)m.setXYZ(v,0,w*s,0),q.setXYZ(v,0,s,0),!0===c?(k.x=e/d,k.y=0):(k.x=(e-1)/d,k.y=1),u.setXY(v,k.x,k.y),v++;k=v;for(e=0;e<=d;e++){var F=e/d;l.x=p*Math.sin(F*h+g);l.y=w*s;l.z=p*Math.cos(F*h+g);m.setXYZ(v,l.x,l.y,l.z);q.setXYZ(v,0,s,0);u.setXY(v,F,!0===c?1:0);v++}for(e=0;e<d;e++)l=f+e,p=k+e,!0===c?(n.setX(t,p),t++,n.setX(t,p+1)):(n.setX(t,
2710p+1),t++,n.setX(t,p)),t++,n.setX(t,l),t++}THREE.BufferGeometry.call(this);this.type="CylinderBufferGeometry";this.parameters={radiusTop:a,radiusBottom:b,height:c,radialSegments:d,heightSegments:e,openEnded:f,thetaStart:g,thetaLength:h};a=void 0!==a?a:20;b=void 0!==b?b:20;c=void 0!==c?c:100;d=Math.floor(d)||8;e=Math.floor(e)||1;f=void 0!==f?f:!1;g=void 0!==g?g:0;h=void 0!==h?h:2*Math.PI;var l=function(){var a=(d+1)*(e+1);!1===f&&(a+=2*(d+1)+2*d);return a}(),p=function(){var a=d*e*6;!1===f&&(a+=6*d);
2711return a}(),n=new THREE.BufferAttribute(new (65535<p?Uint32Array:Uint16Array)(p),1),m=new THREE.BufferAttribute(new Float32Array(3*l),3),q=new THREE.BufferAttribute(new Float32Array(3*l),3),u=new THREE.BufferAttribute(new Float32Array(2*l),2),v=0,t=0,s=[],w=c/2;(function(){var f,k,l=new THREE.Vector3,p=new THREE.Vector3,y=(b-a)/c;for(k=0;k<=e;k++){var B=[],G=k/e,F=G*(b-a)+a;for(f=0;f<=d;f++){var H=f/d;p.x=F*Math.sin(H*h+g);p.y=-G*c+w;p.z=F*Math.cos(H*h+g);m.setXYZ(v,p.x,p.y,p.z);l.copy(p);if(0===
2712a&&0===k||0===b&&k===e)l.x=Math.sin(H*h+g),l.z=Math.cos(H*h+g);l.setY(Math.sqrt(l.x*l.x+l.z*l.z)*y).normalize();q.setXYZ(v,l.x,l.y,l.z);u.setXY(v,H,1-G);B.push(v);v++}s.push(B)}for(f=0;f<d;f++)for(k=0;k<e;k++)l=s[k+1][f],p=s[k+1][f+1],y=s[k][f+1],n.setX(t,s[k][f]),t++,n.setX(t,l),t++,n.setX(t,y),t++,n.setX(t,l),t++,n.setX(t,p),t++,n.setX(t,y),t++})();!1===f&&(0<a&&k(!0),0<b&&k(!1));this.setIndex(n);this.addAttribute("position",m);this.addAttribute("normal",q);this.addAttribute("uv",u)};
2713THREE.CylinderBufferGeometry.prototype=Object.create(THREE.BufferGeometry.prototype);THREE.CylinderBufferGeometry.prototype.constructor=THREE.CylinderBufferGeometry;THREE.CylinderGeometry=function(a,b,c,d,e,f,g,h){THREE.Geometry.call(this);this.type="CylinderGeometry";this.parameters={radiusTop:a,radiusBottom:b,height:c,radialSegments:d,heightSegments:e,openEnded:f,thetaStart:g,thetaLength:h};this.fromBufferGeometry(new THREE.CylinderBufferGeometry(a,b,c,d,e,f,g,h));this.mergeVertices()};
2714THREE.CylinderGeometry.prototype=Object.create(THREE.Geometry.prototype);THREE.CylinderGeometry.prototype.constructor=THREE.CylinderGeometry;
2715THREE.EdgesGeometry=function(a,b){function c(a,b){return a-b}THREE.BufferGeometry.call(this);var d=Math.cos(THREE.Math.degToRad(void 0!==b?b:1)),e=[0,0],f={},g=["a","b","c"],h;a instanceof THREE.BufferGeometry?(h=new THREE.Geometry,h.fromBufferGeometry(a)):h=a.clone();h.mergeVertices();h.computeFaceNormals();var k=h.vertices;h=h.faces;for(var l=0,p=h.length;l<p;l++)for(var n=h[l],m=0;3>m;m++){e[0]=n[g[m]];e[1]=n[g[(m+1)%3]];e.sort(c);var q=e.toString();void 0===f[q]?f[q]={vert1:e[0],vert2:e[1],face1:l,
2716face2:void 0}:f[q].face2=l}e=[];for(q in f)if(g=f[q],void 0===g.face2||h[g.face1].normal.dot(h[g.face2].normal)<=d)l=k[g.vert1],e.push(l.x),e.push(l.y),e.push(l.z),l=k[g.vert2],e.push(l.x),e.push(l.y),e.push(l.z);this.addAttribute("position",new THREE.BufferAttribute(new Float32Array(e),3))};THREE.EdgesGeometry.prototype=Object.create(THREE.BufferGeometry.prototype);THREE.EdgesGeometry.prototype.constructor=THREE.EdgesGeometry;
2717THREE.ExtrudeGeometry=function(a,b){"undefined"!==typeof a&&(THREE.Geometry.call(this),this.type="ExtrudeGeometry",a=Array.isArray(a)?a:[a],this.addShapeList(a,b),this.computeFaceNormals())};THREE.ExtrudeGeometry.prototype=Object.create(THREE.Geometry.prototype);THREE.ExtrudeGeometry.prototype.constructor=THREE.ExtrudeGeometry;THREE.ExtrudeGeometry.prototype.addShapeList=function(a,b){for(var c=a.length,d=0;d<c;d++)this.addShape(a[d],b)};
2718THREE.ExtrudeGeometry.prototype.addShape=function(a,b){function c(a,b,c){b||console.error("THREE.ExtrudeGeometry: vec does not exist");return b.clone().multiplyScalar(c).add(a)}function d(a,b,c){var d=1,d=a.x-b.x,e=a.y-b.y,f=c.x-a.x,g=c.y-a.y,h=d*
2718d+e*e;if(Math.abs(d*g-e*f)>Number.EPSILON){var k=Math.sqrt(h),l=Math.sqrt(f*f+g*g),h=b.x-e/k;b=b.y+d/k;f=((c.x-g/l-h)*g-(c.y+f/l-b)*f)/(d*g-e*f);c=h+d*f-a.x;a=b+e*f-a.y;d=c*c+a*a;if(2>=d)return new THREE.Vector2(c,a);d=Math.sqrt(d/2)}else a=!1,d>Number.EPSILON?
2719f>Number.EPSILON&&(a=!0):d<-Number.EPSILON?f<-Number.EPSILON&&(a=!0):Math.sign(e)===Math.sign(g)&&(a=!0),a?(c=-e,a=d,d=Math.sqrt(h)):(c=d,a=e,d=Math.sqrt(h/2));return new THREE.Vector2(c/d,a/d)}function e(a,b){var c,d;for(C=a.length;0<=--C;){c=C;d=C-1;0>d&&(d=a.length-1);for(var e=0,f=q+2*p,e=0;e<f;e++){var g=P*e,h=P*(e+1),k=b+c+g,g=b+d+g,l=b+d+h,h=b+c+h,k=k+F,g=g+F,l=l+F,h=h+F;G.faces.push(new THREE.Face3(k,g,h,null,null,1));G.faces.push(new THREE.Face3(g,l,h,null,null,1));k=s.generateSideWallUV(G,
2720k,g,l,h);G.faceVertexUvs[0].push([k[0],k[1],k[3]]);G.faceVertexUvs[0].push([k[1],k[2],k[3]])}}}function f(a,b,c){G.vertices.push(new THREE.Vector3(a,b,c))}function g(a,b,c){a+=F;b+=F;c+=F;G.faces.push(new THREE.Face3(a,b,c,null,null,0));a=s.generateTopUV(G,a,b,c);G.faceVertexUvs[0].push(a)}var h=void 0!==b.amount?b.amount:100,k=void 0!==b.bevelThickness?b.bevelThickness:6,l=void 0!==b.bevelSize?b.bevelSize:k-2,p=void 0!==b.bevelSegments?b.bevelSegments:3,n=void 0!==b.bevelEnabled?b.bevelEnabled:!0,
2721m=void 0!==b.curveSegments?b.curveSegments:12,q=void 0!==b.steps?b.steps:1,u=b.extrudePath,v,t=!1,s=void 0!==b.UVGenerator?b.UVGenerator:THREE.ExtrudeGeometry.WorldUVGenerator,w,E,x,D;u&&(v=u.getSpacedPoints(q),t=!0,n=!1,w=void 0!==b.frames?b.frames:new THREE.TubeGeometry.FrenetFrames(u,q,!1),E=new THREE.Vector3,x=new THREE.Vector3,D=new THREE.Vector3);n||(l=k=p=0);var z,y,B,G=this,F=this.vertices.length,u=a.extractPoints(m),m=u.shape,H=u.holes;if(u=!THREE.ShapeUtils.isClockWise(m)){m=m.reverse();
2722y=0;for(B=H.length;y<B;y++)z=H[y],THREE.ShapeUtils.isClockWise(z)&&(H[y]=z.reverse());u=!1}var L=THREE.ShapeUtils.triangulateShape(m,H),A=m;y=0;for(B=H.length;y<B;y++)z=H[y],m=m.concat(z);var N,M,I,O,Q,P=m.length,T,J=L.length,u=[],C=0;I=A.length;N=I-1;for(M=C+1;C<I;C++,N++,M++)N===I&&(N=0),M===I&&(M=0),u[C]=d(A[C],A[N],A[M]);var Z=[],S,Y=u.concat();y=0;for(B=H.length;y<B;y++){z=H[y];S=[];C=0;I=z.length;N=I-1;for(M=C+1;C<I;C++,N++,M++)N===I&&(N=0),M===I&&(M=0),S[C]=d(z[C],z[N],z[M]);Z.push(S);Y=Y.concat(S)}for(N=
27230;N<p;N++){I=N/p;O=k*(1-I);M=l*Math.sin(I*Math.PI/2);C=0;for(I=A.length;C<I;C++)Q=c(A[C],u[C],M),f(Q.x,Q.y,-O);y=0;for(B=H.length;y<B;y++)for(z=H[y],S=Z[y],C=0,I=z.length;C<I;C++)Q=c(z[C],S[C],M),f(Q.x,Q.y,-O)}M=l;for(C=0;C<P;C++)Q=n?c(m[C],Y[C],M):m[C],t?(x.copy(w.normals[0]).multiplyScalar(Q.x),E.copy(w.binormals[0]).multiplyScalar(Q.y),D.copy(v[0]).add(x).add(E),f(D.x,D.y,D.z)):f(Q.x,Q.y,0);for(I=1;I<=q;I++)for(C=0;C<P;C++)Q=n?c(m[C],Y[C],M):m[C],t?(x.copy(w.normals[I]).multiplyScalar(Q.x),E.copy(w.binormals[I]).multiplyScalar(Q.y),
2724D.copy(v[I]).add(x).add(E),f(D.x,D.y,D.z)):f(Q.x,Q.y,h/q*I);for(N=p-1;0<=N;N--){I=N/p;O=k*(1-I);M=l*Math.sin(I*Math.PI/2);C=0;for(I=A.length;C<I;C++)Q=c(A[C],u[C],M),f(Q.x,Q.y,h+O);y=0;for(B=H.length;y<B;y++)for(z=H[y],S=Z[y],C=0,I=z.length;C<I;C++)Q=c(z[C],S[C],M),t?f(Q.x,Q.y+v[q-1].y,v[q-1].x+O):f(Q.x,Q.y,h+O)}(function(){if(n){var a;a=0*P;for(C=0;C<J;C++)T=L[C],g(T[2]+a,T[1]+a,T[0]+a);a=q+2*p;a*=P;for(C=0;C<J;C++)T=L[C],g(T[0]+a,T[1]+a,T[2]+a)}else{for(C=0;C<J;C++)T=L[C],g(T[2],T[1],T[0]);for(C=
27250;C<J;C++)T=L[C],g(T[0]+P*q,T[1]+P*q,T[2]+P*q)}})();(function(){var a=0;e(A,a);a+=A.length;y=0;for(B=H.length;y<B;y++)z=H[y],e(z,a),a+=z.length})()};
2726THREE.ExtrudeGeometry.WorldUVGenerator={generateTopUV:function(a,b,c,d){a=a.vertices;b=a[b];c=a[c];d=a[d];return[new THREE.Vector2(b.x,b.y),new THREE.Vector2(c.x,c.y),new THREE.Vector2(d.x,d.y)]},generateSideWallUV:function(a,b,c,d,e){a=a.vertices;b=a[b];c=a[c];d=a[d];e=a[e];return.01>Math.abs(b.y-c.y)?[new THREE.Vector2(b.x,1-b.z),new THREE.Vector2(c.x,1-c.z),new THREE.Vector2(d.x,1-d.z),new THREE.Vector2(e.x,1-e.z)]:[new THREE.Vector2(b.y,1-b.z),new THREE.Vector2(c.y,1-c.z),new THREE.Vector2(d.y,
27271-d.z),new THREE.Vector2(e.y,1-e.z)]}};THREE.ShapeGeometry=function(a,b){THREE.Geometry.call(this);this.type="ShapeGeometry";
vendor: 6,080 bytes, lines 2727-2740
2727!1===Array.isArray(a)&&(a=[a]);this.addShapeList(a,b);this.computeFaceNormals()};THREE.ShapeGeometry.prototype=Object.create(THREE.Geometry.prototype);THREE.ShapeGeometry.prototype.constructor=THREE.ShapeGeometry;THREE.ShapeGeometry.prototype.addShapeList=function(a,b){for(var c=0,d=a.length;c<d;c++)this.addShape(a[c],b);return this};
2728THREE.ShapeGeometry.prototype.addShape=function(a,b){void 0===b&&(b={});var c=b.material,d=void 0===b.UVGenerator?THREE.ExtrudeGeometry.WorldUVGenerator:b.UVGenerator,e,f,g,h=this.vertices.length;e=a.extractPoints(void 0!==b.curveSegments?b.curveSegments:12);var k=e.shape,l=e.holes;if(!THREE.ShapeUtils.isClockWise(k))for(k=k.reverse(),e=0,f=l.length;e<f;e++)g=l[e],THREE.ShapeUtils.isClockWise(g)&&(l[e]=g.reverse());var p=THREE.ShapeUtils.triangulateShape(k,l);e=0;for(f=l.length;e<f;e++)g=l[e],k=k.concat(g);
2729l=k.length;f=p.length;for(e=0;e<l;e++)g=k[e],this.vertices.push(new THREE.Vector3(g.x,g.y,0));for(e=0;e<f;e++)l=p[e],k=l[0]+h,g=l[1]+h,l=l[2]+h,this.faces.push(new THREE.Face3(k,g,l,null,null,c)),this.faceVertexUvs[0].push(d.generateTopUV(this,k,g,l))};
2730THREE.LatheBufferGeometry=function(a,b,c,d){THREE.BufferGeometry.call(this);this.type="LatheBufferGeometry";this.parameters={points:a,segments:b,phiStart:c,phiLength:d};b=Math.floor(b)||12;c=c||0;d=d||2*Math.PI;d=THREE.Math.clamp(d,0,2*Math.PI);for(var e=(b+1)*a.length,f=b*a.length*6,g=new THREE.BufferAttribute(new (65535<f?Uint32Array:Uint16Array)(f),1),h=new THREE.BufferAttribute(new Float32Array(3*e),3),k=new THREE.BufferAttribute(new Float32Array(2*e),2),l=0,p=0,n=1/b,m=new THREE.Vector3,q=new THREE.Vector2,
2731e=0;e<=b;e++)for(var f=c+e*n*d,u=Math.sin(f),v=Math.cos(f),f=0;f<=a.length-1;f++)m.x=a[f].x*u,m.y=a[f].y,m.z=a[f].x*v,h.setXYZ(l,m.x,m.y,m.z),q.x=e/b,q.y=f/(a.length-1),k.setXY(l,q.x,q.y),l++;for(e=0;e<b;e++)for(f=0;f<a.length-1;f++)c=f+e*a.length,l=c+a.length,n=c+a.length+1,m=c+1,g.setX(p,c),p++,g.setX(p,l),p++,g.setX(p,m),p++,g.setX(p,l),p++,g.setX(p,n),p++,g.setX(p,m),p++;this.setIndex(g);this.addAttribute("position",h);this.addAttribute("uv",k);this.computeVertexNormals();if(d===2*Math.PI)for(d=
2732this.attributes.normal.array,g=new THREE.Vector3,h=new THREE.Vector3,k=new THREE.Vector3,c=b*a.length*3,f=e=0;e<a.length;e++,f+=3)g.x=d[f+0],g.y=d[f+1],g.z=d[f+2],h.x=d[c+f+0],h.y=d[c+f+1],h.z=d[c+f+2],k.addVectors(g,h).normalize(),d[f+0]=d[c+f+0]=k.x,d[f+1]=d[c+f+1]=k.y,d[f+2]=d[c+f+2]=k.z};THREE.LatheBufferGeometry.prototype=Object.create(THREE.BufferGeometry.prototype);THREE.LatheBufferGeometry.prototype.constructor=THREE.LatheBufferGeometry;
2733THREE.LatheGeometry=function(a,b,c,d){THREE.Geometry.call(this);this.type="LatheGeometry";this.parameters={points:a,segments:b,phiStart:c,phiLength:d};this.fromBufferGeometry(new THREE.LatheBufferGeometry(a,b,c,d));this.mergeVertices()};THREE.LatheGeometry.prototype=Object.create(THREE.Geometry.prototype);THREE.LatheGeometry.prototype.constructor=THREE.LatheGeometry;
2734THREE.PlaneGeometry=function(a,b,c,d){THREE.Geometry.call(this);this.type="PlaneGeometry";this.parameters={width:a,height:b,widthSegments:c,heightSegments:d};this.fromBufferGeometry(new THREE.PlaneBufferGeometry(a,b,c,d))};THREE.PlaneGeometry.prototype=Object.create(THREE.Geometry.prototype);THREE.PlaneGeometry.prototype.constructor=THREE.PlaneGeometry;
2735THREE.PlaneBufferGeometry=function(a,b,c,d){THREE.BufferGeometry.call(this);this.type="PlaneBufferGeometry";this.parameters={width:a,height:b,widthSegments:c,heightSegments:d};var e=a/2,f=b/2;c=Math.floor(c)||1;d=Math.floor(d)||1;var g=c+1,h=d+1,k=a/c,l=b/d;b=new Float32Array(g*h*3);a=new Float32Array(g*h*3);for(var p=new Float32Array(g*h*2),n=0,m=0,q=0;q<h;q++)for(var u=q*l-f,v=0;v<g;v++)b[n]=v*k-e,b[n+1]=-u,a[n+2]=1,p[m]=v/c,p[m+1]=1-q/d,n+=3,m+=2;n=0;e=new (65535<b.length/3?Uint32Array:Uint16Array)(c*
2736d*6);for(q=0;q<d;q++)for(v=0;v<c;v++)f=v+g*(q+1),h=v+1+g*(q+1),k=v+1+g*q,e[n]=v+g*q,e[n+1]=f,e[n+2]=k,e[n+3]=f,e[n+4]=h,e[n+5]=k,n+=6;this.setIndex(new THREE.BufferAttribute(e,1));this.addAttribute("position",new THREE.BufferAttribute(b,3));this.addAttribute("normal",new THREE.BufferAttribute(a,3));this.addAttribute("uv",new THREE.BufferAttribute(p,2))};THREE.PlaneBufferGeometry.prototype=Object.create(THREE.BufferGeometry.prototype);THREE.PlaneBufferGeometry.prototype.constructor=THREE.PlaneBufferGeometry;
2737THREE.RingBufferGeometry=function(a,b,c,d,e,f){THREE.BufferGeometry.call(this);this.type="RingBufferGeometry";this.parameters={innerRadius:a,outerRadius:b,thetaSegments:c,phiSegments:d,thetaStart:e,thetaLength:f};a=a||20;b=b||50;e=void 0!==e?e:0;f=void 0!==f?f:2*Math.PI;c=void 0!==c?Math.max(3,c):8;d=void 0!==d?Math.max(1,d):1;var g=(c+1)*(d+1),h=c*d*6,h=new THREE.BufferAttribute(new (65535<h?Uint32Array:Uint16Array)(h),1),k=new THREE.BufferAttribute(new Float32Array(3*g),3),l=new THREE.BufferAttribute(new Float32Array(3*
2738g),3),g=new THREE.BufferAttribute(new Float32Array(2*g),2),p=0,n=0,m,q=a,u=(b-a)/d,v=new THREE.Vector3,t=new THREE.Vector2,s;for(a=0;a<=d;a++){for(s=0;s<=c;s++)m=e+s/c*f,v.x=q*Math.cos(m),v.y=q*Math.sin(m),k.setXYZ(p,v.x,v.y,v.z),l.setXYZ(p,0,0,1),t.x=(v.x/b+1)/2,t.y=(v.y/b+1)/2,g.setXY(p,t.x,t.y),p++;q+=u}for(a=0;a<d;a++)for(b=a*(c+1),s=0;s<c;s++)e=m=s+b,f=m+c+1,p=m+c+2,m+=1,h.setX(n,e),n++,h.setX(n,f),n++,h.setX(n,p),n++,h.setX(n,e),n++,h.setX(n,p),n++,h.setX(n,m),n++;this.setIndex(h);this.addAttribute("position",
2739k);this.addAttribute("normal",l);this.addAttribute("uv",g)};THREE.RingBufferGeometry.prototype=Object.create(THREE.BufferGeometry.prototype);THREE.RingBufferGeometry.prototype.constructor=THREE.RingBufferGeometry;THREE.RingGeometry=function(a,b,c,d,e,f){THREE.Geometry.call(this);this.type="RingGeometry";this.parameters={innerRadius:a,outerRadius:b,thetaSegments:c,phiSegments:d,thetaStart:e,thetaLength:f};this.fromBufferGeometry(new THREE.RingBufferGeometry(a,b,c,d,e,f))};
2740THREE.RingGeometry.prototype=Object.create(THREE.Geometry.prototype);THREE.RingGeometry.prototype.constructor=THREE.RingGeometry;THREE.SphereGeometry=function(a,b,c,d,e,f,g){THREE.Geometry.call(this);this.type="SphereGeometry";
2740this.parameters={radius:a,widthSegments:b,heightSegments:c,phiStart:d,phiLength:e,thetaStart:f,thetaLength:g};this.fromBufferGeometry(new THREE.SphereBufferGeometry(a,b,c,d,e,f,g))};THREE.SphereGeometry.prototype=Object.create(THREE.Geometry.prototype);
2741THREE.SphereGeometry.prototype.constructor=THREE.SphereGeometry;
2742THREE.SphereBufferGeometry=function(a,b,c,d,e,f,g){THREE.BufferGeometry.call(this);this.type="SphereBufferGeometry";this.parameters={radius:a,widthSegments:b,heightSegments:c,phiStart:d,phiLength:e,thetaStart:f,thetaLength:g};a=a||50;b=Math.max(3,Math.floor(b)||8);c=Math.max(2,Math.floor(c)||6);d=void 0!==d?d:0;e=void 0!==e?e:2*Math.PI;f=void 0!==f?f:0;g=void 0!==g?g:Math.PI;for(var h=f+g,k=(b+1)*(c+1),l=new THREE.BufferAttribute(new Float32Array(3*k),3),p=new THREE.BufferAttribute(new Float32Array(3*
2743k),3),k=new THREE.BufferAttribute(new Float32Array(2*k),2),n=0,m=[],q=new THREE.Vector3,u=0;u<=c;u++){for(var v=[],t=u/c,s=0;s<=b;s++){var w=s/b,E=-a*Math.cos(d+w*e)*Math.sin(f+t*g),x=a*Math.cos(f+t*g),D=a*Math.sin(d+w*e)*Math.sin(f+t*g);q.set(E,x,D).normalize();l.setXYZ(n,E,x,D);p.setXYZ(n,q.x,q.y,q.z);k.setXY(n,w,1-t);v.push(n);n++}m.push(v)}d=[];for(u=0;u<c;u++)for(s=0;s<b;s++)e=m[u][s+1],g=m[u][s],n=m[u+1][s],q=m[u+1][s+1],(0!==u||0<f)&&d.push(e,g,q),(u!==c-1||h<Math.PI)&&d.push(g,n,q);this.setIndex(new (65535<
2744l.count?THREE.Uint32Attribute:THREE.Uint16Attribute)(d,1));this.addAttribute("position",l);this.addAttribute("normal",p);this.addAttribute("uv",k);this.boundingSphere=new THREE.Sphere(new THREE.Vector3,a)};THREE.SphereBufferGeometry.prototype=Object.create(THREE.BufferGeometry.prototype);THREE.SphereBufferGeometry.prototype.constructor=THREE.SphereBufferGeometry;
2745THREE.TextGeometry=function(a,b){b=b||{};var c=b.font;if(!1===c instanceof THREE.Font)return console.error("THREE.TextGeometry: font parameter is not an instance of THREE.Font."),new THREE.Geometry;c=c.generateShapes(a,b.size,b.curveSegments);b.amount=void 0!==b.height?b.height:50;void 0===b.bevelThickness&&(b.bevelThickness=10);void 0===b.bevelSize&&(b.bevelSize=8);void 0===b.bevelEnabled&&(b.bevelEnabled=!1);THREE.ExtrudeGeometry.call(this,c,b);this.type="TextGeometry"};
2746THREE.TextGeometry.prototype=Object.create(THREE.ExtrudeGeometry.prototype);THREE.TextGeometry.prototype.constructor=THREE.TextGeometry;
2747THREE.TorusBufferGeometry=function(a,b,c,d,e){THREE.BufferGeometry.call(this);this.type="TorusBufferGeometry";this.parameters={radius:a,tube:b,radialSegments:c,tubularSegments:d,arc:e};a=a||100;b=b||40;c=Math.floor(c)||8;d=Math.floor(d)||6;e=e||2*Math.PI;var f=(c+1)*(d+1),g=c*d*6,g=new (65535<g?Uint32Array:Uint16Array)(g),h=new Float32Array(3*f),k=new Float32Array(3*f),f=new Float32Array(2*f),l=0,p=0,n=0,m=new THREE.Vector3,q=new THREE.Vector3,u=new THREE.Vector3,v,t;for(v=0;v<=c;v++)for(t=0;t<=d;t++){var s=
2748t/d*e,w=v/c*Math.PI*2;q.x=(a+b*Math.cos(w))*Math.cos(s);q.y=(a+b*Math.cos(w))*Math.sin(s);q.z=b*Math.sin(w);h[l]=q.x;h[l+1]=q.y;h[l+2]=q.z;m.x=a*Math.cos(s);m.y=a*Math.sin(s);u.subVectors(q,m).normalize();k[l]=u.x;k[l+1]=u.y;k[l+2]=u.z;f[p]=t/d;f[p+1]=v/c;l+=3;p+=2}for(v=1;v<=c;v++)for(t=1;t<=d;t++)a=(d+1)*(v-1)+t-1,b=(d+1)*(v-1)+t,e=(d+1)*v+t,g[n]=(d+1)*v+t-1,g[n+1]=a,g[n+2]=e,g[n+3]=a,g[n+4]=b,g[n+5]=e,n+=6;this.setIndex(new THREE.BufferAttribute(g,1));this.addAttribute("position",new THREE.BufferAttribute(h,
27493));this.addAttribute("normal",new THREE.BufferAttribute(k,3));this.addAttribute("uv",new THREE.BufferAttribute(f,2))};THREE.TorusBufferGeometry.prototype=Object.create(THREE.BufferGeometry.prototype);THREE.TorusBufferGeometry.prototype.constructor=THREE.TorusBufferGeometry;
2750THREE.TorusGeometry=function(a,b,c,d,e){THREE.Geometry.call(this);this.type="TorusGeometry";this.parameters={radius:a,tube:b,radialSegments:c,tubularSegments:d,arc:e};this.fromBufferGeometry(new THREE.TorusBufferGeometry(a,b,c,d,e))};THREE.TorusGeometry.prototype=Object.create(THREE.Geometry.prototype);THREE.TorusGeometry.prototype.constructor=THREE.TorusGeometry;
2751THREE.TorusKnotBufferGeometry=function(a,b,c,d,e,f){function g(a,b,c,d,e){var f=Math.cos(a),g=Math.sin(a);a*=c/b;b=Math.cos(a);e.x=d*(2+b)*.5*f;e.y=d*(2+b)*g*.5;e.z=d*Math.sin(a)*.5}THREE.BufferGeometry.call(this);this.type="TorusKnotBufferGeometry";
vendor: 5,188 bytes, lines 2751-2763
2751this.parameters={radius:a,tube:b,tubularSegments:c,radialSegments:d,p:e,q:f};a=a||100;b=b||40;c=Math.floor(c)||64;d=Math.floor(d)||8;e=e||2;f=f||3;var h=(d+1)*(c+1),k=d*c*6,k=new THREE.BufferAttribute(new (65535<k?Uint32Array:Uint16Array)(k),1),l=new THREE.BufferAttribute(new Float32Array(3*
2752h),3),p=new THREE.BufferAttribute(new Float32Array(3*h),3),h=new THREE.BufferAttribute(new Float32Array(2*h),2),n,m,q=0,u=0,v=new THREE.Vector3,t=new THREE.Vector3,s=new THREE.Vector2,w=new THREE.Vector3,E=new THREE.Vector3,x=new THREE.Vector3,D=new THREE.Vector3,z=new THREE.Vector3;for(n=0;n<=c;++n)for(m=n/c*e*Math.PI*2,g(m,e,f,a,w),g(m+.01,e,f,a,E),D.subVectors(E,w),z.addVectors(E,w),x.crossVectors(D,z),z.crossVectors(x,D),x.normalize(),z.normalize(),m=0;m<=d;++m){var y=m/d*Math.PI*2,B=-b*Math.cos(y),
2753y=b*Math.sin(y);v.x=w.x+(B*z.x+y*x.x);v.y=w.y+(B*z.y+y*x.y);v.z=w.z+(B*z.z+y*x.z);l.setXYZ(q,v.x,v.y,v.z);t.subVectors(v,w).normalize();p.setXYZ(q,t.x,t.y,t.z);s.x=n/c;s.y=m/d;h.setXY(q,s.x,s.y);q++}for(m=1;m<=c;m++)for(n=1;n<=d;n++)a=(d+1)*m+(n-1),b=(d+1)*m+n,e=(d+1)*(m-1)+n,k.setX(u,(d+1)*(m-1)+(n-1)),u++,k.setX(u,a),u++,k.setX(u,e),u++,k.setX(u,a),u++,k.setX(u,b),u++,k.setX(u,e),u++;this.setIndex(k);this.addAttribute("position",l);this.addAttribute("normal",p);this.addAttribute("uv",h)};
2754THREE.TorusKnotBufferGeometry.prototype=Object.create(THREE.BufferGeometry.prototype);THREE.TorusKnotBufferGeometry.prototype.constructor=THREE.TorusKnotBufferGeometry;
2755THREE.TorusKnotGeometry=function(a,b,c,d,e,f,g){THREE.Geometry.call(this);this.type="TorusKnotGeometry";this.parameters={radius:a,tube:b,tubularSegments:c,radialSegments:d,p:e,q:f};void 0!==g&&console.warn("THREE.TorusKnotGeometry: heightScale has been deprecated. Use .scale( x, y, z ) instead.");this.fromBufferGeometry(new THREE.TorusKnotBufferGeometry(a,b,c,d,e,f));this.mergeVertices()};THREE.TorusKnotGeometry.prototype=Object.create(THREE.Geometry.prototype);
2756THREE.TorusKnotGeometry.prototype.constructor=THREE.TorusKnotGeometry;
2757THREE.TubeGeometry=function(a,b,c,d,e,f){THREE.Geometry.call(this);this.type="TubeGeometry";this.parameters={path:a,segments:b,radius:c,radialSegments:d,closed:e,taper:f};b=b||64;c=c||1;d=d||8;e=e||!1;f=f||THREE.TubeGeometry.NoTaper;var g=[],h,k,l=b+1,p,n,m,q,u,v=new THREE.Vector3,t,s,w;t=new THREE.TubeGeometry.FrenetFrames(a,b,e);s=t.normals;w=t.binormals;this.tangents=t.tangents;this.normals=s;this.binormals=w;for(t=0;t<l;t++)for(g[t]=[],p=t/(l-1),u=a.getPointAt(p),h=s[t],k=w[t],m=c*f(p),p=0;p<
2758d;p++)n=p/d*2*Math.PI,q=-m*Math.cos(n),n=m*Math.sin(n),v.copy(u),v.x+=q*h.x+n*k.x,v.y+=q*h.y+n*k.y,v.z+=q*h.z+n*k.z,g[t][p]=this.vertices.push(new THREE.Vector3(v.x,v.y,v.z))-1;for(t=0;t<b;t++)for(p=0;p<d;p++)f=e?(t+1)%b:t+1,l=(p+1)%d,a=g[t][p],c=g[f][p],f=g[f][l],l=g[t][l],v=new THREE.Vector2(t/b,p/d),s=new THREE.Vector2((t+1)/b,p/d),w=new THREE.Vector2((t+1)/b,(p+1)/d),h=new THREE.Vector2(t/b,(p+1)/d),this.faces.push(new THREE.Face3(a,c,l)),this.faceVertexUvs[0].push([v,s,h]),this.faces.push(new THREE.Face3(c,
2759f,l)),this.faceVertexUvs[0].push([s.clone(),w,h.clone()]);this.computeFaceNormals();this.computeVertexNormals()};THREE.TubeGeometry.prototype=Object.create(THREE.Geometry.prototype);THREE.TubeGeometry.prototype.constructor=THREE.TubeGeometry;THREE.TubeGeometry.NoTaper=function(a){return 1};THREE.TubeGeometry.SinusoidalTaper=function(a){return Math.sin(Math.PI*a)};
2760THREE.TubeGeometry.FrenetFrames=function(a,b,c){var d=new THREE.Vector3,e=[],f=[],g=[],h=new THREE.Vector3,k=new THREE.Matrix4;b+=1;var l,p,n;this.tangents=e;this.normals=f;this.binormals=g;for(l=0;l<b;l++)p=l/(b-1),e[l]=a.getTangentAt(p),e[l].normalize();f[0]=new THREE.Vector3;g[0]=new THREE.Vector3;a=Number.MAX_VALUE;l=Math.abs(e[0].x);p=Math.abs(e[0].y);n=Math.abs(e[0].z);l<=a&&(a=l,d.set(1,0,0));p<=a&&(a=p,d.set(0,1,0));n<=a&&d.set(0,0,1);h.crossVectors(e[0],d).normalize();f[0].crossVectors(e[0],
2761h);g[0].crossVectors(e[0],f[0]);for(l=1;l<b;l++)f[l]=f[l-1].clone(),g[l]=g[l-1].clone(),h.crossVectors(e[l-1],e[l]),h.length()>Number.EPSILON&&(h.normalize(),d=Math.acos(THREE.Math.clamp(e[l-1].dot(e[l]),-1,1)),f[l].applyMatrix4(k.makeRotationAxis(h,d))),g[l].crossVectors(e[l],f[l]);if(c)for(d=Math.acos(THREE.Math.clamp(f[0].dot(f[b-1]),-1,1)),d/=b-1,0<e[0].dot(h.crossVectors(f[0],f[b-1]))&&(d=-d),l=1;l<b;l++)f[l].applyMatrix4(k.makeRotationAxis(e[l],d*l)),g[l].crossVectors(e[l],f[l])};
2762THREE.PolyhedronGeometry=function(a,b,c,d){function e(a){var b=a.normalize().clone();b.index=k.vertices.push(b)-1;var c=Math.atan2(a.z,-a.x)/2/Math.PI+.5;a=Math.atan2(-a.y,Math.sqrt(a.x*a.x+a.z*a.z))/Math.PI+.5;b.uv=new THREE.Vector2(c,1-a);return b}function f(a,b,c,d){d=new THREE.Face3(a.index,b.index,c.index,[a.clone(),b.clone(),c.clone()],void 0,d);k.faces.push(d);t.copy(a).add(b).add(c).divideScalar(3);d=Math.atan2(t.z,-t.x);k.faceVertexUvs[0].push([h(a.uv,a,d),h(b.uv,b,d),h(c.uv,c,d)])}function g(a,
2763b){for(var c=Math.pow(2,b),d=e(k.vertices[a.a]),g=e(k.vertices[a.b]),h=e(k.vertices[a.c]),l=[],m=a.materialIndex,n=0;n<=c;n++){l[n]=[];for(var p=e(d.clone().lerp(h,n/c)),q=e(g.clone().lerp(h,n/c)),t=c-n,u=0;u<=t;u++)l[n][u]=0===u&&n===c?p:e(p.clone().lerp(q,u/t))}for(n=0;n<c;n++)for(u=0;
2763u<2*(c-n)-1;u++)d=Math.floor(u/2),0===u%2?f(l[n][d+1],l[n+1][d],l[n][d],m):f(l[n][d+1],l[n+1][d+1],l[n+1][d],m)}function h(a,b,c){0>c&&1===a.x&&(a=new THREE.Vector2(a.x-1,a.y));0===b.x&&0===b.z&&(a=new THREE.Vector2(c/
27642/Math.PI+.5,a.y));return a.clone()}THREE.Geometry.call(this);this.type="PolyhedronGeometry";this.parameters={vertices:a,indices:b,radius:c,detail:d};c=c||1;d=d||0;for(var k=this,l=0,p=a.length;l<p;l+=3)e(new THREE.Vector3(a[l],a[l+1],a[l+2]));a=this.vertices;for(var n=[],m=l=0,p=b.length;l<p;l+=3,m++){var q=a[b[l]],u=a[b[l+1]],v=a[b[l+2]];n[m]=new THREE.Face3(q.index,u.index,v.index,[q.clone(),u.clone(),v.clone()],void 0,m)}for(var t=new THREE.Vector3,l=0,p=n.length;l<p;l++)g(n[l],d);l=0;for(p=this.faceVertexUvs[0].length;l<
2765p;l++)b=this.faceVertexUvs[0][l],d=b[0].x,a=b[1].x,n=b[2].x,m=Math.max(d,a,n),q=Math.min(d,a,n),.9<m&&.1>q&&(.2>d&&(b[0].x+=1),.2>a&&(b[1].x+=1),.2>n&&(b[2].x+=1));l=0;for(p=this.vertices.length;l<p;l++)this.vertices[l].multiplyScalar(c);this.mergeVertices();this.computeFaceNormals();this.boundingSphere=new THREE.Sphere(new THREE.Vector3,c)};THREE.PolyhedronGeometry.prototype=Object.create(THREE.Geometry.prototype);THREE.PolyhedronGeometry.prototype.constructor=THREE.PolyhedronGeometry;
2766THREE.DodecahedronGeometry=function(a,b){var c=(1+Math.sqrt(5))/2,d=1/c;THREE.PolyhedronGeometry.call(this,[-1,-1,-1,-1,-1,1,-1,1,-1,-1,1,1,1,-1,-1,1,-1,1,1,1,-1,1,1,1,0,-d,-c,0,-d,c,0,d,-c,0,d,c,-d,-c,0,-d,c,0,d,-c,0,d,c,0,-c,0,-d,c,0,-d,-c,0,d,c,0,d],[3,11,7,3,7,15,3,15,13,7,19,17,7,17,6,7,6,15,17,4,8,17,8,10,17,10,6,8,0,16,8,16,2,8,2,10,0,12,1,0,1,18,0,18,16,6,10,2,6,2,13,6,13,15,2,16,18,2,18,3,2,3,13,18,1,9,18,9,11,18,11,3,4,14,12,4,12,0,4,0,8,11,9,5,11,5,19,11,19,7,
276619,5,14,19,14,4,19,4,17,1,
276712,14,1,14,5,1,5,9],a,b);this.type="DodecahedronGeometry";this.parameters={radius:a,detail:b}};THREE.DodecahedronGeometry.prototype=Object.create(THREE.PolyhedronGeometry.prototype);THREE.DodecahedronGeometry.prototype.constructor=THREE.DodecahedronGeometry;
2768THREE.IcosahedronGeometry=function(a,b){var c=(1+Math.sqrt(5))/2;THREE.PolyhedronGeometry.call(this,[-1,c,0,1,c,0,-1,-c,0,1,-c,0,0,-1,c,0,1,c,0,-1,-c,0,1,-c,c,0,-1,c,0,1,-c,0,-1,-c,0,1],[0,11,5,0,5,1,0,1,7,0,7,10,0,10,11,1,5,9,5,11,4,11,10,2,10,7,6,7,1,8,3,9,4,3,4,2,3,2,6,3,6,8,3,8,9,4,9,5,2,4,11,6,2,10,8,6,7,9,8,1],a,b);this.type="IcosahedronGeometry";this.parameters={radius:a,detail:b}};THREE.IcosahedronGeometry.prototype=Object.create(THREE.PolyhedronGeometry.prototype);
2769THREE.IcosahedronGeometry.prototype.constructor=THREE.IcosahedronGeometry;THREE.OctahedronGeometry=function(a,b){THREE.PolyhedronGeometry.call(this,[1,0,0,-1,0,0,0,1,0,0,-1,0,0,0,1,0,0,-1],[0,2,4,0,4,3,0,3,5,0,5,2,1,2,5,1,5,3,1,3,4,1,4,2],a,b);this.type="OctahedronGeometry";this.parameters={radius:a,detail:b}};THREE.OctahedronGeometry.prototype=Object.create(THREE.PolyhedronGeometry.prototype);THREE.OctahedronGeometry.prototype.constructor=THREE.OctahedronGeometry;
2770THREE.TetrahedronGeometry=function(a,b){THREE.PolyhedronGeometry.call(this,[1,1,1,-1,-1,1,-1,1,-1,1,-1,-1],[2,1,0,0,3,2,1,3,0,2,3,1],a,b);this.type="TetrahedronGeometry";this.parameters={radius:a,detail:b}};THREE.TetrahedronGeometry.prototype=Object.create(THREE.PolyhedronGeometry.prototype);THREE.TetrahedronGeometry.prototype.constructor=THREE.TetrahedronGeometry;
2771THREE.ParametricGeometry=function(a,b,c){THREE.Geometry.call(this);this.type="ParametricGeometry";this.parameters={func:a,slices:b,stacks:c};var d=this.vertices,e=this.faces,f=this.faceVertexUvs[0],g,h,k,l,p=b+1;for(g=0;g<=c;g++)for(l=g/c,h=0;h<=b;h++)k=h/b,k=a(k,l),d.push(k);var n,m,q,u;for(g=0;g<c;g++)for(h=0;h<b;h++)a=g*p+h,d=g*p+h+1,l=(g+1)*p+h+1,k=(g+1)*p+h,n=new THREE.Vector2(h/b,g/c),m=new THREE.Vector2((h+1)/b,g/c),q=new THREE.Vector2((h+1)/b,(g+1)/c),u=new THREE.Vector2(h/b,(g+1)/c),e.push(new THREE.Face3(a,
2772d,k)),f.push([n,m,u]),e.push(new THREE.Face3(d,l,k)),f.push([m.clone(),q,u.clone()]);this.computeFaceNormals();this.computeVertexNormals()};THREE.ParametricGeometry.prototype=Object.create(THREE.Geometry.prototype);THREE.ParametricGeometry.prototype.constructor=THREE.ParametricGeometry;
2773THREE.WireframeGeometry=function(a){function b(a,b){return a-b}THREE.BufferGeometry.call(this);var c=[0,0],d={},e=["a","b","c"];if(a instanceof THREE.Geometry){var f=a.vertices,g=a.faces,h=0,k=new Uint32Array(6*g.length);a=0;for(var l=g.length;a<l;a++)for(var p=g[a],n=0;3>n;n++){c[0]=p[e[n]];c[1]=p[e[(n+1)%3]];c.sort(b);var m=c.toString();void 0===d[m]&&(k[2*h]=c[0],k[2*h+1]=c[1],d[m]=!0,h++)}c=new Float32Array(6*h);a=0;for(l=h;a<l;a++)for(n=0;2>n;n++)d=f[k[2*a+n]],h=6*a+3*n,c[h+0]=d.x,c[h+1]=d.y,
2774c[h+2]=d.z;this.addAttribute("position",new THREE.BufferAttribute(c,3))}else if(a instanceof THREE.BufferGeometry){if(null!==a.index){l=a.index.array;f=a.attributes.position;e=a.groups;h=0;0===e.length&&a.addGroup(0,l.length);k=new Uint32Array(2*l.length);g=0;for(p=e.length;g<p;++g){a=e[g];n=a.start;m=a.count;a=n;for(var q=n+m;a<q;a+=3)for(n=0;3>n;n++)c[0]=l[a+n],c[1]=l[a+(n+1)%3],c.sort(b),m=c.toString(),void 0===d[m]&&(k[2*h]=c[0],k[2*h+1]=c[1],d[m]=!0,h++)}c=new Float32Array(6*h);a=0;for(l=h;a<
2775l;a++)for(n=0;2>n;n++)h=6*a+3*n,d=k[2*a+n],c[h+0]=f.getX(d),c[h+1]=f.getY(d),c[h+2]=f.getZ(d)}else for(f=a.attributes.position.array,h=f.length/3,k=h/3,c=new Float32Array(6*h),a=0,l=k;a<l;a++)for(n=0;3>n;n++)h=18*a+6*n,k=9*a+3*n,c[h+0]=f[k],c[h+1]=f[k+1],c[h+2]=f[k+2],d=9*a+(n+1)%3*3,c[h+3]=f[d],c[h+4]=f[d+1],c[h+5]=f[d+2];this.addAttribute("position",new THREE.BufferAttribute(c,3))}};THREE.WireframeGeometry.prototype=Object.create(THREE.BufferGeometry.prototype);
2776THREE.WireframeGeometry.prototype.constructor=THREE.WireframeGeometry;THREE.AxisHelper=function(a){a=a||1;var b=new Float32Array([0,0,0,a,0,0,0,0,0,0,a,0,0,0,0,0,0,a]),c=new Float32Array([1,0,0,1,.6,0,0,1,0,.6,1,0,0,0,1,0,.6,1]);a=new THREE.BufferGeometry;a.addAttribute("position",new THREE.BufferAttribute(b,3));a.addAttribute("color",new THREE.BufferAttribute(c,3));b=new THREE.LineBasicMaterial({vertexColors:THREE.VertexColors});THREE.LineSegments.call(this,a,b)};THREE.AxisHelper.prototype=Object.create(THREE.LineSegments.prototype);
2777THREE.AxisHelper.prototype.constructor=THREE.AxisHelper;
2778THREE.ArrowHelper=function(){var a=new THREE.Geometry;a.vertices.push(new THREE.Vector3(0,0,0),new THREE.Vector3(0,1,0));var b=new THREE.CylinderGeometry(0,.5,1,5,1);b.translate(0,-.5,0);return function(c,d,e,f,g,h){THREE.Object3D.call(this);void 0===f&&(f=16776960);void 0===e&&(e=1);void 0===g&&(g=.2*e);void 0===h&&(h=.2*g);this.position.copy(d);this.line=new THREE.Line(a,new THREE.LineBasicMaterial({color:f}));this.line.matrixAutoUpdate=!1;this.add(this.line);this.cone=new THREE.Mesh(b,new THREE.MeshBasicMaterial({color:f}));
2779this.cone.matrixAutoUpdate=!1;this.add(this.cone);this.setDirection(c);this.setLength(e,g,h)}}();THREE.ArrowHelper.prototype=Object.create(THREE.Object3D.prototype);THREE.ArrowHelper.prototype.constructor=THREE.ArrowHelper;THREE.ArrowHelper.prototype.setDirection=function(){var a=new THREE.Vector3,b;return function(c){.99999<c.y?this.quaternion.set(0,0,0,1):-.99999>c.y?this.quaternion.set(1,0,0,0):(a.set(c.z,0,-c.x).normalize(),b=Math.acos(c.y),this.quaternion.setFromAxisAngle(a,b))}}();
2780THREE.ArrowHelper.prototype.setLength=function(a,b,c){void 0===b&&(b=.2*a);void 0===c&&(c=.2*b);this.line.scale.set(1,Math.max(0,a-b),1);this.line.updateMatrix();this.cone.scale.set(c,b,c);this.cone.position.y=a;this.cone.updateMatrix()};THREE.ArrowHelper.prototype.setColor=function(a){this.line.material.color.set(a);this.cone.material.color.set(a)};
2781THREE.BoxHelper=function(a){var b=new Uint16Array([0,1,1,2,2,3,3,0,4,5,5,6,6,7,7,4,0,4,1,5,2,6,3,7]),c=new Float32Array(24),d=new THREE.BufferGeometry;
2781d.setIndex(new THREE.BufferAttribute(b,1));d.addAttribute("position",new THREE.BufferAttribute(c,3));THREE.LineSegments.call(this,d,new THREE.LineBasicMaterial({color:16776960}));void 0!==a&&this.update(a)};THREE.BoxHelper.prototype=Object.create(THREE.LineSegments.prototype);THREE.BoxHelper.prototype.constructor=THREE.BoxHelper;
2782THREE.BoxHelper.prototype.update=function(){var a=new THREE.Box3;return function(b){a.setFromObject(b);if(!a.isEmpty()){b=a.min;var c=a.max,d=this.geometry.attributes.position,e=d.array;e[0]=c.x;e[1]=c.y;e[2]=c.z;e[3]=b.x;e[4]=c.y;e[5]=c.z;e[6]=b.x;e[7]=b.y;e[8]=c.z;e[9]=c.x;e[10]=b.y;e[11]=c.z;e[12]=c.x;e[13]=c.y;e[14]=b.z;e[15]=b.x;e[16]=c.y;e[17]=b.z;e[18]=b.x;e[19]=b.y;e[20]=b.z;e[21]=c.x;e[22]=b.y;e[23]=b.z;d.needsUpdate=!0;this.geometry.computeBoundingSphere()}}}();
2783THREE.BoundingBoxHelper=function(a,b){var c=void 0!==b?b:8947848;this.object=a;this.box=new THREE.Box3;THREE.Mesh.call(this,new THREE.BoxGeometry(1,1,1),new THREE.MeshBasicMaterial({color:c,wireframe:!0}))};THREE.BoundingBoxHelper.prototype=Object.create(THREE.Mesh.prototype);THREE.BoundingBoxHelper.prototype.constructor=THREE.BoundingBoxHelper;THREE.BoundingBoxHelper.prototype.update=function(){this.box.setFromObject(this.object);this.box.size(this.scale);this.box.center(this.position)};
2784THREE.CameraHelper=function(a){function b(a,b,d){c(a,d);c(b,d)}function c(a,b){d.vertices.push(new THREE.Vector3);d.colors.push(new THREE.Color(b));void 0===f[a]&&(f[a]=[]);f[a].push(d.vertices.length-1)}var d=new THREE.Geometry,e=new THREE.LineBasicMaterial({color:16777215,vertexColors:THREE.FaceColors}),f={};b("n1","n2",16755200);b("n2","n4",16755200);b("n4","n3",16755200);b("n3","n1",16755200);b("f1","f2",16755200);b("f2","f4",16755200);b("f4","f3",16755200);b("f3","f1",16755200);b("n1","f1",16755200);
2785b("n2","f2",16755200);b("n3","f3",16755200);b("n4","f4",16755200);b("p","n1",16711680);b("p","n2",16711680);b("p","n3",16711680);b("p","n4",16711680);b("u1","u2",43775);b("u2","u3",43775);b("u3","u1",43775);b("c","t",16777215);b("p","c",3355443);b("cn1","cn2",3355443);b("cn3","cn4",3355443);b("cf1","cf2",3355443);b("cf3","cf4",3355443);THREE.LineSegments.call(this,d,e);this.camera=a;this.camera.updateProjectionMatrix();this.matrix=a.matrixWorld;this.matrixAutoUpdate=!1;this.pointMap=f;this.update()};
2786THREE.CameraHelper.prototype=Object.create(THREE.LineSegments.prototype);THREE.CameraHelper.prototype.constructor=THREE.CameraHelper;
2787THREE.CameraHelper.prototype.update=function(){function a(a,g,h,k){d.set(g,h,k).unproject(e);a=c[a];if(void 0!==a)for(g=0,h=a.length;g<h;g++)b.vertices[a[g]].copy(d)}var b,c,d=new THREE.Vector3,e=new THREE.Camera;return function(){b=this.geometry;c=this.pointMap;e.projectionMatrix.copy(this.camera.projectionMatrix);a("c",0,0,-1);a("t",0,0,1);a("n1",-1,-1,-1);a("n2",1,-1,-1);a("n3",-1,1,-1);a("n4",1,1,-1);a("f1",-1,-1,1);a("f2",1,-1,1);a("f3",-1,1,1);a("f4",1,1,1);a("u1",.7,1.1,-1);a("u2",-.7,1.1,
2788-1);a("u3",0,2,-1);a("cf1",-1,0,1);a("cf2",1,0,1);a("cf3",0,-1,1);a("cf4",0,1,1);a("cn1",-1,0,-1);a("cn2",1,0,-1);a("cn3",0,-1,-1);a("cn4",0,1,-1);b.verticesNeedUpdate=!0}}();
2789THREE.DirectionalLightHelper=function(a,b){THREE.Object3D.call(this);this.light=a;this.light.updateMatrixWorld();this.matrix=a.matrixWorld;this.matrixAutoUpdate=!1;b=b||1;var c=new THREE.Geometry;c.vertices.push(new THREE.Vector3(-b,b,0),new THREE.Vector3(b,b,0),new THREE.Vector3(b,-b,0),new THREE.Vector3(-b,-b,0),new THREE.Vector3(-b,b,0));var d=new THREE.LineBasicMaterial({fog:!1});d.color.copy(this.light.color).multiplyScalar(this.light.intensity);this.lightPlane=new THREE.Line(c,d);this.add(this.lightPlane);
2790c=new THREE.Geometry;c.vertices.push(new THREE.Vector3,new THREE.Vector3);d=new THREE.LineBasicMaterial({fog:!1});d.color.copy(this.light.color).multiplyScalar(this.light.intensity);this.targetLine=new THREE.Line(c,d);this.add(this.targetLine);this.update()};THREE.DirectionalLightHelper.prototype=Object.create(THREE.Object3D.prototype);THREE.DirectionalLightHelper.prototype.constructor=THREE.DirectionalLightHelper;
2791THREE.DirectionalLightHelper.prototype.dispose=function(){this.lightPlane.geometry.dispose();this.lightPlane.material.dispose();this.targetLine.geometry.dispose();this.targetLine.material.dispose()};
2792THREE.DirectionalLightHelper.prototype.update=function(){var a=new THREE.Vector3,b=new THREE.Vector3,c=new THREE.Vector3;return function(){a.setFromMatrixPosition(this.light.matrixWorld);b.setFromMatrixPosition(this.light.target.matrixWorld);c.subVectors(b,a);this.lightPlane.lookAt(c);this.lightPlane.material.color.copy(this.light.color).multiplyScalar(this.light.intensity);
2792this.targetLine.geometry.vertices[1].copy(c);this.targetLine.geometry.verticesNeedUpdate=!0;this.targetLine.material.color.copy(this.lightPlane.material.color)}}();
2793THREE.EdgesHelper=function(a,b,c){b=void 0!==b?b:16777215;THREE.LineSegments.call(this,new THREE.EdgesGeometry(a.geometry,c),new THREE.LineBasicMaterial({color:b}));this.matrix=a.matrixWorld;this.matrixAutoUpdate=!1};THREE.EdgesHelper.prototype=Object.create(THREE.LineSegments.prototype);THREE.EdgesHelper.prototype.constructor=THREE.EdgesHelper;
2794THREE.FaceNormalsHelper=function(a,b,c,d){this.object=a;this.size=void 0!==b?b:1;a=void 0!==c?c:16776960;d=void 0!==d?d:1;b=0;c=this.object.geometry;c instanceof THREE.Geometry?b=c.faces.length:console.warn("THREE.FaceNormalsHelper: only THREE.Geometry is supported. Use THREE.VertexNormalsHelper, instead.");c=new THREE.BufferGeometry;b=new THREE.Float32Attribute(6*b,3);c.addAttribute("position",b);THREE.LineSegments.call(this,c,new THREE.LineBasicMaterial({color:a,linewidth:d}));this.matrixAutoUpdate=
2795!1;this.update()};THREE.FaceNormalsHelper.prototype=Object.create(THREE.LineSegments.prototype);THREE.FaceNormalsHelper.prototype.constructor=THREE.FaceNormalsHelper;
2796THREE.FaceNormalsHelper.prototype.update=function(){var a=new THREE.Vector3,b=new THREE.Vector3,c=new THREE.Matrix3;return function(){this.object.updateMatrixWorld(!0);c.getNormalMatrix(this.object.matrixWorld);for(var d=this.object.matrixWorld,e=this.geometry.attributes.position,f=this.object.geometry,g=f.vertices,f=f.faces,h=0,k=0,l=f.length;k<l;k++){var p=f[k],n=p.normal;a.copy(g[p.a]).add(g[p.b]).add(g[p.c]).divideScalar(3).applyMatrix4(d);b.copy(n).applyMatrix3(c).normalize().multiplyScalar(this.size).add(a);
2797e.setXYZ(h,a.x,a.y,a.z);h+=1;e.setXYZ(h,b.x,b.y,b.z);h+=1}e.needsUpdate=!0;return this}}();
2798THREE.GridHelper=function(a,b){var c=new THREE.Geometry,d=new THREE.LineBasicMaterial({vertexColors:THREE.VertexColors});this.color1=new THREE.Color(4473924);this.color2=new THREE.Color(8947848);for(var e=-a;e<=a;e+=b){c.vertices.push(new THREE.Vector3(-a,0,e),new THREE.Vector3(a,0,e),new THREE.Vector3(e,0,-a),new THREE.Vector3(e,0,a));var f=0===e?this.color1:this.color2;c.colors.push(f,f,f,f)}THREE.LineSegments.call(this,c,d)};THREE.GridHelper.prototype=Object.create(THREE.LineSegments.prototype);
2799THREE.GridHelper.prototype.constructor=THREE.GridHelper;THREE.GridHelper.prototype.setColors=function(a,b){this.color1.set(a);this.color2.set(b);this.geometry.colorsNeedUpdate=!0};
2800THREE.HemisphereLightHelper=function(a,b){THREE.Object3D.call(this);this.light=a;this.light.updateMatrixWorld();this.matrix=a.matrixWorld;this.matrixAutoUpdate=!1;this.colors=[new THREE.Color,new THREE.Color];var c=new THREE.SphereGeometry(b,4,2);c.rotateX(-Math.PI/2);for(var d=0;8>d;d++)c.faces[d].color=this.colors[4>d?0:1];d=new THREE.MeshBasicMaterial({vertexColors:THREE.FaceColors,wireframe:!0});this.lightSphere=new THREE.Mesh(c,d);this.add(this.lightSphere);this.update()};
2801THREE.HemisphereLightHelper.prototype=Object.create(THREE.Object3D.prototype);THREE.HemisphereLightHelper.prototype.constructor=THREE.HemisphereLightHelper;THREE.HemisphereLightHelper.prototype.dispose=function(){this.lightSphere.geometry.dispose();this.lightSphere.material.dispose()};
2802THREE.HemisphereLightHelper.prototype.update=function(){var a=new THREE.Vector3;return function(){this.colors[0].copy(this.light.color).multiplyScalar(this.light.intensity);this.colors[1].copy(this.light.groundColor).multiplyScalar(this.light.intensity);this.lightSphere.lookAt(a.setFromMatrixPosition(this.light.matrixWorld).negate());this.lightSphere.geometry.colorsNeedUpdate=!0}}();
2803THREE.PointLightHelper=function(a,b){this.light=a;this.light.updateMatrixWorld();var c=new THREE.SphereGeometry(b,4,2),d=new THREE.MeshBasicMaterial({wireframe:!0,fog:!1});d.color.copy(this.light.color).multiplyScalar(this.light.intensity);THREE.Mesh.call(this,c,d);this.matrix=this.light.matrixWorld;this.matrixAutoUpdate=!1};THREE.PointLightHelper.prototype=Object.create(THREE.Mesh.prototype);THREE.PointLightHelper.prototype.constructor=THREE.PointLightHelper;
2804THREE.PointLightHelper.prototype.dispose=function(){this.geometry.dispose();this.material.dispose()};THREE.PointLightHelper.prototype.update=function(){this.material.color.copy(this.light.color).multiplyScalar(this.light.intensity)};
2805THREE.SkeletonHelper=function(a){this.bones=this.getBoneList(a);for(var b=new THREE.Geometry,c=0;c<this.bones.length;c++)this.bones[c].parent instanceof THREE.Bone&&(b.vertices.push(new THREE.Vector3),b.vertices.push(new THREE.Vector3),b.colors.push(new THREE.Color(0,0,1)),b.colors.push(new THREE.Color(0,1,0)));b.dynamic=!0;c=new THREE.LineBasicMaterial({vertexColors:THREE.VertexColors,depthTest:!1,depthWrite:!1,transparent:!0});THREE.LineSegments.call(this,b,c);this.root=a;this.matrix=a.matrixWorld;
2806this.matrixAutoUpdate=!1;this.update()};THREE.SkeletonHelper.prototype=Object.create(THREE.LineSegments.prototype);THREE.SkeletonHelper.prototype.constructor=THREE.SkeletonHelper;THREE.SkeletonHelper.prototype.getBoneList=function(a){var b=[];a instanceof THREE.Bone&&b.push(a);for(var c=0;c<a.children.length;c++)b.push.apply(b,this.getBoneList(a.children[c]));return b};
2807THREE.SkeletonHelper.prototype.update=function(){for(var a=this.geometry,b=(new THREE.Matrix4).getInverse(this.root.matrixWorld),c=new THREE.Matrix4,d=0,e=0;e<this.bones.length;e++){var f=this.bones[e];f.parent instanceof THREE.Bone&&(c.multiplyMatrices(b,f.matrixWorld),a.vertices[d].setFromMatrixPosition(c),c.multiplyMatrices(b,f.parent.matrixWorld),a.vertices[d+1].setFromMatrixPosition(c),d+=2)}a.verticesNeedUpdate=!0;a.computeBoundingSphere()};
2808THREE.SpotLightHelper=function(a){THREE.Object3D.call(this);this.light=a;this.light.updateMatrixWorld();this.matrix=a.matrixWorld;this.matrixAutoUpdate=!1;a=new THREE.CylinderGeometry(0,1,1,8,1,!0);a.translate(0,-.5,0);a.rotateX(-Math.PI/2);var b=new THREE.MeshBasicMaterial({wireframe:!0,fog:!1});this.cone=new THREE.Mesh(a,b);this.add(this.cone);this.update()};THREE.SpotLightHelper.prototype=Object.create(THREE.Object3D.prototype);THREE.SpotLightHelper.prototype.constructor=THREE.SpotLightHelper;
2809THREE.SpotLightHelper.prototype.dispose=function(){this.cone.geometry.dispose();this.cone.material.dispose()};THREE.SpotLightHelper.prototype.update=function(){var a=new THREE.Vector3,b=new THREE.Vector3;return function(){var c=this.light.distance?this.light.distance:1E4,d=c*Math.tan(this.light.angle);this.cone.scale.set(d,d,c);a.setFromMatrixPosition(this.light.matrixWorld);b.setFromMatrixPosition(this.light.target.matrixWorld);this.cone.lookAt(b.sub(a));this.cone.material.color.copy(this.light.color).multiplyScalar(this.light.intensity)}}();
2810THREE.VertexNormalsHelper=function(a,b,c,d){this.object=a;this.size=void 0!==b?b:1;a=void 0!==c?c:16711680;d=void 0!==d?d:1;b=0;c=this.object.geometry;c instanceof THREE.Geometry?b=3*c.faces.length:c instanceof THREE.BufferGeometry&&(b=c.attributes.normal.count);c=new THREE.BufferGeometry;b=new THREE.Float32Attribute(6*b,3);c.addAttribute("position",b);THREE.LineSegments.call(this,c,new THREE.LineBasicMaterial({color:a,linewidth:d}));this.matrixAutoUpdate=!1;this.update()};
2811THREE.VertexNormalsHelper.prototype=Object.create(THREE.LineSegments.prototype);THREE.VertexNormalsHelper.prototype.constructor=THREE.VertexNormalsHelper;
2812THREE.VertexNormalsHelper.prototype.update=function(){var a=new THREE.Vector3,b=new THREE.Vector3,c=new THREE.Matrix3;return function(){var d=["a","b","c"];this.object.updateMatrixWorld(!0);c.getNormalMatrix(this.object.matrixWorld);var e=this.object.matrixWorld,f=this.geometry.attributes.position,g=this.object.geometry;if(g instanceof THREE.Geometry)for(var h=g.vertices,k=g.faces,l=g=0,p=k.length;l<p;l++)for(var n=k[l],m=0,q=n.vertexNormals.length;m<q;m++){var u=n.vertexNormals[m];a.copy(h[n[d[m]]]).applyMatrix4(e);
2813b.copy(u).applyMatrix3(c).normalize().multiplyScalar(this.size).add(a);f.setXYZ(g,a.x,a.y,a.z);g+=1;f.setXYZ(g,b.x,b.y,b.z);g+=1}else if(g instanceof THREE.BufferGeometry)for(d=g.attributes.position,h=g.attributes.normal,m=g=0,q=d.count;m<q;m++)a.set(d.getX(m),d.getY(m),d.getZ(m)).applyMatrix4(e),b.set(h.getX(m),h.getY(m),h.getZ(m)),b.applyM
2813atrix3(c).normalize().multiplyScalar(this.size).add(a),f.setXYZ(g,a.x,a.y,a.z),g+=1,f.setXYZ(g,b.x,b.y,b.z),g+=1;f.needsUpdate=!0;return this}}();
2814THREE.WireframeHelper=function(a,b){var c=void 0!==b?b:16777215;THREE.LineSegments.call(this,new THREE.WireframeGeometry(a.geometry),new THREE.LineBasicMaterial({color:c}));this.matrix=a.matrixWorld;this.matrixAutoUpdate=!1};THREE.WireframeHelper.prototype=Object.create(THREE.LineSegments.prototype);THREE.WireframeHelper.prototype.constructor=THREE.WireframeHelper;THREE.ImmediateRenderObject=function(a){THREE.Object3D.call(this);this.material=a;this.render=function(a){}};
2815THREE.ImmediateRenderObject.prototype=Object.create(THREE.Object3D.prototype);THREE.ImmediateRenderObject.prototype.constructor=THREE.ImmediateRenderObject;THREE.MorphBlendMesh=function(a,b){THREE.Mesh.call(this,a,b);this.animationsMap={};this.animationsList=[];var c=this.geometry.morphTargets.length;this.createAnimation("__default",0,c-1,c/1);this.setAnimationWeight("__default",1)};THREE.MorphBlendMesh.prototype=Object.create(THREE.Mesh.prototype);THREE.MorphBlendMesh.prototype.constructor=THREE.MorphBlendMesh;
2816THREE.MorphBlendMesh.prototype.createAnimation=function(a,b,c,d){b={start:b,end:c,length:c-b+1,fps:d,duration:(c-b)/d,lastFrame:0,currentFrame:0,active:!1,time:0,direction:1,weight:1,directionBackwards:!1,mirroredLoop:!1};this.animationsMap[a]=b;this.animationsList.push(b)};
2817THREE.MorphBlendMesh.prototype.autoCreateAnimations=function(a){for(var b=/([a-z]+)_?(\d+)/i,c,d={},e=this.geometry,f=0,g=e.morphTargets.length;f<g;f++){var h=e.morphTargets[f].name.match(b);if(h&&1<h.length){var k=h[1];d[k]||(d[k]={start:Infinity,end:-Infinity});h=d[k];f<h.start&&(h.start=f);f>h.end&&(h.end=f);c||(c=k)}}for(k in d)h=d[k],this.createAnimation(k,h.start,h.end,a);this.firstAnimation=c};
2818THREE.MorphBlendMesh.prototype.setAnimationDirectionForward=function(a){if(a=this.animationsMap[a])a.direction=1,a.directionBackwards=!1};THREE.MorphBlendMesh.prototype.setAnimationDirectionBackward=function(a){if(a=this.animationsMap[a])a.direction=-1,a.directionBackwards=!0};THREE.MorphBlendMesh.prototype.setAnimationFPS=function(a,b){var c=this.animationsMap[a];c&&(c.fps=b,c.duration=(c.end-c.start)/c.fps)};
2819THREE.MorphBlendMesh.prototype.setAnimationDuration=function(a,b){var c=this.animationsMap[a];c&&(c.duration=b,c.fps=(c.end-c.start)/c.duration)};THREE.MorphBlendMesh.prototype.setAnimationWeight=function(a,b){var c=this.animationsMap[a];c&&(c.weight=b)};THREE.MorphBlendMesh.prototype.setAnimationTime=function(a,b){var c=this.animationsMap[a];c&&(c.time=b)};THREE.MorphBlendMesh.prototype.getAnimationTime=function(a){var b=0;if(a=this.animationsMap[a])b=a.time;return b};
2820THREE.MorphBlendMesh.prototype.getAnimationDuration=function(a){var b=-1;if(a=this.animationsMap[a])b=a.duration;return b};THREE.MorphBlendMesh.prototype.playAnimation=function(a){var b=this.animationsMap[a];b?(b.time=0,b.active=!0):console.warn("THREE.MorphBlendMesh: animation["+a+"] undefined in .playAnimation()")};THREE.MorphBlendMesh.prototype.stopAnimation=function(a){if(a=this.animationsMap[a])a.active=!1};
2821THREE.MorphBlendMesh.prototype.update=function(a){for(var b=0,c=this.animationsList.length;b<c;b++){var d=this.animationsList[b];if(d.active){var e=d.duration/d.length;d.time+=d.direction*a;if(d.mirroredLoop){if(d.time>d.duration||0>d.time)d.direction*=-1,d.time>d.duration&&(d.time=d.duration,d.directionBackwards=!0),0>d.time&&(d.time=0,d.directionBackwards=!1)}else d.time%=d.duration,0>d.time&&(d.time+=d.duration);var f=d.start+THREE.Math.clamp(Math.floor(d.time/e),0,d.length-1),g=d.weight;f!==d.currentFrame&&
2822(this.morphTargetInfluences[d.lastFrame]=0,this.morphTargetInfluences[d.currentFrame]=1*g,this.morphTargetInfluences[f]=0,d.lastFrame=d.currentFrame,d.currentFrame=f);e=d.time%e/e;d.directionBackwards&&(e=1-e);d.currentFrame!==d.lastFrame?(this.morphTargetInfluences[d.currentFrame]=e*g,this.morphTargetInfluences[d.lastFrame]=(1-e)*g):this.morphTargetInfluences[d.currentFrame]=g}}};
2823var THREEx=THREEx||{};THREEx.DynamicTexture=function(t,e){var i=document.createElement("canvas");i.width=t,i.height=e,this.canvas=i;var n=i.getContext("2d");this.context=n;var a=new THREE.Texture(i);this.texture=a},THREEx.DynamicTexture.prototype.clear=function(t){return void 0!==t?(this.context.fillStyle=t,this.context.fillRect(0,0,this.canvas.width,this.canvas.height)):this.context.clearRect(0,0,this.canvas.width,this.canvas.height),this.texture.needsUpdate=!0,this}
2823,THREEx.DynamicTexture.prototype.drawText=function(t,e,i,n,a){if(void 0!==a&&(this.context.font=a),void 0===e||null===e){var r=this.context.measureText(t);e=(this.canvas.width-r.width)/2}return this.context.fillStyle=n,this.context.fillText(t,e,i),this.texture.needsUpdate=!0,this},THREEx.DynamicTexture.prototype.drawTextCooked=function(t){var e=this.context,i=this.canvas,n=(t=t||{}).text,a={margin:void 0!==t.margin?t.margin:.1,lineHeight:void 0!==t.lineHeight?t.lineHeight:.1,align:void 0!==t.align?t.align:"left",fillStyle:void 0!==t.fillStyle?t.fillStyle:"black",font:void 0!==t.font?t.font:"bold 102.4px Arial"};console.assert("string"==typeof n),e.save(),e.fillStyle=a.fillStyle,e.font=a.font;for(var r=(a.lineHeight+a.margin)*i.height;n.length>0;){var h=function(t){for(var n="",r=(1-2*a.margin)*i.width;n.length!==t.length&&!(e.measureText(n).width>r);)n+=t.substr(n.length,1);return n}(n);n=n.substr(h.length);var s=e.measureText(h);if("left"===a.align)l=a.margin*i.width;else if("right"===a.align)l=(1-a.margin)*i.width-s.width;else if("center"===a.align)var l=(i.width-s.width)/2;else console.assert(!1);this.context.fillText(h,l,r),r+=a.lineHeight*i.height}return e.restore(),this.texture.needsUpdate=!0,this},THREEx.DynamicTexture.prototype.drawPoint=function(t,e,i){return this.context.strokeStyle=t,this.context.fillStyle=t,this.context.fillRect(e,i,1,1),this.texture.needsUpdate=!0,this},THREEx.DynamicTexture.prototype.drawImage=function(){return this.context.clearRect(0,0,this.context.canvas.width,this.context.canvas.height),this.context.drawImage.apply(this.context,arguments),this.texture.needsUpdate=!0,this};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.