User:ThePokegeek5000/AppJS/9

v0.1.76 "],col:[2," "],tr:[2," "],td:[3," "],_default:[0,"",""]};Jt.optgroup=Jt.option,Jt.tbody=Jt.tfoot=Jt.colgroup=Jt.caption=Jt.thead,Jt.th=Jt.td;var Zt=/<|&#?\w+;/;!function{var t=at.createDocumentFragment,e=t.appendChild(at.createElement("div")),n=at.createElement("input");n.setAttribute("type","radio"),n.setAttribute("checked","checked"),n.setAttribute("name","t"),e.appendChild(n),vt.checkClone=e.cloneNode(!0).cloneNode(!0).lastChild.checked,e.innerHTML=" x ",vt.noCloneChecked=!!e.cloneNode(!0).lastChild.defaultValue};var Qt=at.documentElement,te=/^key/,ee=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,ne=/^([^.]*)(?:\.(.+)|)/;yt.event={global:{},add:function(t,e,n,r,i){var o,a,s,u,l,c,h,d,p,f,g,m=Nt.get(t);if(m)for(n.handler&&(o=n,n=o.handler,i=o.selector),i&&yt.find.matchesSelector(Qt,i),n.guid||(n.guid=yt.guid++),(u=m.events)||(u=m.events={}),(a=m.handle)||(a=m.handle=function(e){return void 0!==yt&&yt.event.triggered!==e.type?yt.event.dispatch.apply(t,arguments):void 0}),e=(e||"").match(Rt)||[""],l=e.length;l--;)s=ne.exec(e[l])||[],p=g=s[1],f=(s[2]||"").split(".").sort,p&&(h=yt.event.special[p]||{},p=(i?h.delegateType:h.bindType)||p,h=yt.event.special[p]||{},c=yt.extend({type:p,origType:g,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&yt.expr.match.needsContext.test(i),namespace:f.join(".")},o),(d=u[p])||(d=u[p]=[],d.delegateCount=0,h.setup&&!1!==h.setup.call(t,r,f,a)||t.addEventListener&&t.addEventListener(p,a)),h.add&&(h.add.call(t,c),c.handler.guid||(c.handler.guid=n.guid)),i?d.splice(d.delegateCount++,0,c):d.push(c),yt.event.global[p]=!0)},remove:function(t,e,n,r,i){var o,a,s,u,l,c,h,d,p,f,g,m=Nt.hasData(t)&&Nt.get(t);if(m&&(u=m.events)){for(e=(e||"").match(Rt)||[""],l=e.length;l--;)if(s=ne.exec(e[l])||[],p=g=s[1],f=(s[2]||"").split(".").sort,p){for(h=yt.event.special[p]||{},p=(r?h.delegateType:h.bindType)||p,d=u[p]||[],s=s[2]&&new RegExp("(^|\\.)"+f.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=o=d.length;o--;)c=d[o],!i&&g!==c.origType||n&&n.guid!==c.guid||s&&!s.test(c.namespace)||r&&r!==c.selector&&("**"!==r||!c.selector)||(d.splice(o,1),c.selector&&d.delegateCount--,h.remove&&h.remove.call(t,c));a&&!d.length&&(h.teardown&&!1!==h.teardown.call(t,f,m.handle)||yt.removeEvent(t,p,m.handle),delete u[p])}else for(p in u)yt.event.remove(t,p+e[l],n,r,!0);yt.isEmptyObject(u)&&Nt.remove(t,"handle events")}},dispatch:function(t){var e,n,r,i,o,a,s=yt.event.fix(t),u=new Array(arguments.length),l=(Nt.get(this,"events")||{})[s.type]||[],c=yt.event.special[s.type]||{};for(u[0]=s,e=1;e<arguments.length;e++)u[e]=arguments[e];if(s.delegateTarget=this,!c.preDispatch||!1!==c.preDispatch.call(this,s)){for(a=yt.event.handlers.call(this,s,l),e=0;(i=a[e++])&&!s.isPropagationStopped;)for(s.currentTarget=i.elem,n=0;(o=i.handlers[n++])&&!s.isImmediatePropagationStopped;)s.rnamespace&&!s.rnamespace.test(o.namespace)||(s.handleObj=o,s.data=o.data,void 0!==(r=((yt.event.special[o.origType]||{}).handle||o.handler).apply(i.elem,u))&&!1===(s.result=r)&&(s.preventDefault,s.stopPropagation));return c.postDispatch&&c.postDispatch.call(this,s),s.result}},handlers:function(t,e){var n,r,i,o,a,s=[],u=e.delegateCount,l=t.target;if(u&&l.nodeType&&!("click"===t.type&&t.button>=1))for(l!==this;l=l.parentNode||this)if(1===l.nodeType&&("click"!==t.type||!0!==l.disabled)){for(o=[],a={},n=0;n-1:yt.find(i,this,null,[l]).length),a[i]&&o.push(r);o.length&&s.push({elem:l,handlers:o})}return l=this,u<e.length&&s.push({elem:l,handlers:e.slice(u)}),s},addProp:function(t,e){Object.defineProperty(yt.Event.prototype,t,{enumerable:!0,configurable:!0,get:yt.isFunction(e)?function{if(this.originalEvent)return e(this.originalEvent)}:function{if(this.originalEvent)return this.originalEvent[t]},set:function(e){Object.defineProperty(this,t,{enumerable:!0,configurable:!0,writable:!0,value:e})}})},fix:function(t){return t[yt.expando]?t:new yt.Event(t)},special:{load:{noBubble:!0},focus:{trigger:function{if(this!==M&&this.focus)return this.focus,!1},delegateType:"focusin"},blur:{trigger:function{if(this===M&&this.blur)return this.blur,!1},delegateType:"focusout"},click:{trigger:function{if("checkbox"===this.type&&this.click&&u(this,"input"))return this.click,!1},_default:function(t){return u(t.target,"a")}},beforeunload:{postDispatch:function(t){void 0!==t.result&&t.originalEvent&&(t.originalEvent.returnValue=t.result)}}}},yt.removeEvent=function(t,e,n){t.removeEventListener&&t.removeEventListener(e,n)},yt.Event=function(t,e){if(!(this instanceof yt.Event))return new yt.Event(t,e);t&&t.type?(this.originalEvent=t,this.type=t.type,this.isDefaultPrevented=t.defaultPrevented||void 0===t.defaultPrevented&&!1===t.returnValue?E:P,this.target=t.target&&3===t.target.nodeType?t.target.parentNode:t.target,this.currentTarget=t.currentTarget,this.relatedTarget=t.relatedTarget):this.type=t,e&&yt.extend(this,e),this.timeStamp=t&&t.timeStamp||yt.now,this[yt.expando]=!0},yt.Event.prototype={constructor:yt.Event,isDefaultPrevented:P,isPropagationStopped:P,isImmediatePropagationStopped:P,isSimulated:!1,preventDefault:function{var t=this.originalEvent;this.isDefaultPrevented=E,t&&!this.isSimulated&&t.preventDefault},stopPropagation:function{var t=this.originalEvent;this.isPropagationStopped=E,t&&!this.isSimulated&&t.stopPropagation},stopImmediatePropagation:function{var t=this.originalEvent;this.isImmediatePropagationStopped=E,t&&!this.isSimulated&&t.stopImmediatePropagation,this.stopPropagation}},yt.each({altKey:!0,bubbles:!0,cancelable:!0,changedTouches:!0,ctrlKey:!0,detail:!0,eventPhase:!0,metaKey:!0,pageX:!0,pageY:!0,shiftKey:!0,view:!0,char:!0,charCode:!0,key:!0,keyCode:!0,button:!0,buttons:!0,clientX:!0,clientY:!0,offsetX:!0,offsetY:!0,pointerId:!0,pointerType:!0,screenX:!0,screenY:!0,targetTouches:!0,toElement:!0,touches:!0,which:function(t){var e=t.button;return null==t.which&&te.test(t.type)?null!=t.charCode?t.charCode:t.keyCode:!t.which&&void 0!==e&&ee.test(t.type)?1&e?1:2&e?3:4&e?2:0:t.which}},yt.event.addProp),yt.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(t,e){yt.event.special[t]={delegateType:e,bindType:e,handle:function(t){var n,r=this,i=t.relatedTarget,o=t.handleObj;return i&&(i===r||yt.contains(r,i))||(t.type=o.origType,n=o.handler.apply(this,arguments),t.type=e),n}}}),yt.fn.extend({on:function(t,e,n,r){return C(this,t,e,n,r)},one:function(t,e,n,r){return C(this,t,e,n,r,1)},off:function(t,e,n){var r,i;if(t&&t.preventDefault&&t.handleObj)return r=t.handleObj,yt(t.delegateTarget).off(r.namespace?r.origType+"."+r.namespace:r.origType,r.selector,r.handler),this;if("object"==typeof t){for(i in t)this.off(i,e,t[i]);return this}return!1!==e&&"function"!=typeof e||(n=e,e=void 0),!1===n&&(n=P),this.each(function{yt.event.remove(this,t,n,e)})}});var re=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([a-z][^\/\0>\x20\t\r\n\f]*)[^>]*)\/>/gi,ie=/\s*$/g;yt.extend({htmlPrefilter:function(t){return t.replace(re,"<$1>")},clone:function(t,e,n){var r,i,o,a,s=t.cloneNode(!0),u=yt.contains(t.ownerDocument,t);if(!(vt.noCloneChecked||1!==t.nodeType&&11!==t.nodeType||yt.isXMLDoc(t)))for(a=w(s),o=w(t),r=0,i=o.length;r0&&T(a,!u&&w(t,"script")),s},cleanData:function(t){for(var e,n,r,i=yt.event.special,o=0;void 0!==(n=t[o]);o++)if(Bt(n)){if(e=n[Nt.expando]){if(e.events)for(r in e.events)i[r]?yt.event.remove(n,r):yt.removeEvent(n,r,e.handle);n[Nt.expando]=void 0}n[Ft.expando]&&(n[Ft.expando]=void 0)}}}),yt.fn.extend({detach:function(t){return L(this,t,!0)},remove:function(t){return L(this,t)},text:function(t){return jt(this,function(t){return void 0===t?yt.text(this):this.empty.each(function{1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=t)})},null,t,arguments.length)},append:function{return D(this,arguments,function(t){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){A(this,t).appendChild(t)}})},prepend:function{return D(this,arguments,function(t){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var e=A(this,t);e.insertBefore(t,e.firstChild)}})},before:function{return D(this,arguments,function(t){this.parentNode&&this.parentNode.insertBefore(t,this)})},after:function{return D(this,arguments,function(t){this.parentNode&&this.parentNode.insertBefore(t,this.nextSibling)})},empty:function{for(var t,e=0;null!=(t=this[e]);e++)1===t.nodeType&&(yt.cleanData(w(t,!1)),t.textContent="");return this},clone:function(t,e){return t=null!=t&&t,e=null==e?t:e,this.map(function{return yt.clone(this,t,e)})},html:function(t){return jt(this,function(t){var e=this[0]||{},n=0,r=this.length;if(void 0===t&&1===e.nodeType)return e.innerHTML;if("string"==typeof t&&!ie.test(t)&&!Jt[(Kt.exec(t)||["",""])[1].toLowerCase]){t=yt.htmlPrefilter(t);try{for(n<r;n++)e=this[n]||{},1===e.nodeType&&(yt.cleanData(w(e,!1)),e.innerHTML=t);e=0}catch(t){}}e&&this.empty.append(t)},null,t,arguments.length)},replaceWith:function{var t=[];return D(this,arguments,function(e){var n=this.parentNode;yt.inArray(this,t)<0&&(yt.cleanData(w(this)),n&&n.replaceChild(e,this))},t)}}),yt.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(t,e){yt.fn[t]=function(t){for(var n,r=[],i=yt(t),o=i.length-1,a=0;a<=o;a++)n=a===o?this:this.clone(!0),yt(i[a])[e](n),ct.apply(r,n.get);return this.pushStack(r)}});var ue=/^margin/,le=new RegExp("^("+Ht+")(?!px)[a-z%]+$","i"),ce=function(t){var e=t.ownerDocument.defaultView;return e&&e.opener||(e=n),e.getComputedStyle(t)};!function{function t{if(s){s.style.cssText="box-sizing:border-box;position:relative;display:block;margin:auto;border:1px;padding:1px;top:1%;width:50%",s.innerHTML="",Qt.appendChild(a);var t=n.getComputedStyle(s);e="1%"!==t.top,o="2px"===t.marginLeft,r="4px"===t.width,s.style.marginRight="50%",i="4px"===t.marginRight,Qt.removeChild(a),s=null}}var e,r,i,o,a=at.createElement("div"),s=at.createElement("div");s.style&&(s.style.backgroundClip="content-box",s.cloneNode(!0).style.backgroundClip="",vt.clearCloneStyle="content-box"===s.style.backgroundClip,a.style.cssText="border:0;width:8px;height:0;top:0;left:-9999px;padding:0;margin-top:1px;position:absolute",a.appendChild(s),yt.extend(vt,{pixelPosition:function{return t,e},boxSizingReliable:function{return t,r},pixelMarginRight:function{return t,i},reliableMarginLeft:function{return t,o}}))};var he=/^(none|table(?!-c[ea]).+)/,de=/^--/,pe={position:"absolute",visibility:"hidden",display:"block"},fe={letterSpacing:"0",fontWeight:"400"},ge=["Webkit","Moz","ms"],me=at.createElement("div").style;yt.extend({cssHooks:{opacity:{get:function(t,e){if(e){var n=j(t,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{float:"cssFloat"},style:function(t,e,n,r){if(t&&3!==t.nodeType&&8!==t.nodeType&&t.style){var i,o,a,s=yt.camelCase(e),u=de.test(e),l=t.style;if(u||(e=F(s)),a=yt.cssHooks[e]||yt.cssHooks[s],void 0===n)return a&&"get"in a&&void 0!==(i=a.get(t,!1,r))?i:l[e];o=typeof n,"string"===o&&(i=zt.exec(n))&&i[1]&&(n=_(t,e,i),o="number"),null!=n&&n===n&&("number"===o&&(n+=i&&i[3]||(yt.cssNumber[s]?"":"px")),vt.clearCloneStyle||""!==n||0!==e.indexOf("background")||(l[e]="inherit"),a&&"set"in a&&void 0===(n=a.set(t,n,r))||(u?l.setProperty(e,n):l[e]=n))}},css:function(t,e,n,r){var i,o,a,s=yt.camelCase(e);return de.test(e)||(e=F(s)),a=yt.cssHooks[e]||yt.cssHooks[s],a&&"get"in a&&(i=a.get(t,!0,n)),void 0===i&&(i=j(t,e,r)),"normal"===i&&e in fe&&(i=fe[e]),""===n||n?(o=parseFloat(i),!0===n||isFinite(o)?o||0:i):i}}),yt.each(["height","width"],function(t,e){yt.cssHooks[e]={get:function(t,n,r){if(n)return!he.test(yt.css(t,"display"))||t.getClientRects.length&&t.getBoundingClientRect.width?H(t,e,r):qt(t,pe,function{return H(t,e,r)})},set:function(t,n,r){var i,o=r&&ce(t),a=r&&W(t,e,r,"border-box"===yt.css(t,"boxSizing",!1,o),o);return a&&(i=zt.exec(n))&&"px"!==(i[3]||"px")&&(t.style[e]=n,n=yt.css(t,e)),U(t,n,a)}}}),yt.cssHooks.marginLeft=B(vt.reliableMarginLeft,function(t,e){if(e)return(parseFloat(j(t,"marginLeft"))||t.getBoundingClientRect.left-qt(t,{marginLeft:0},function{return t.getBoundingClientRect.left}))+"px"}),yt.each({margin:"",padding:"",border:"Width"},function(t,e){yt.cssHooks[t+e]={expand:function(n){for(var r=0,i={},o="string"==typeof n?n.split(" "):[n];r<4;r++)i[t+Xt[r]+e]=o[r]||o[r-2]||o[0];return i}},ue.test(t)||(yt.cssHooks[t+e].set=U)}),yt.fn.extend({css:function(t,e){return jt(this,function(t,e,n){var r,i,o={},a=0;if(Array.isArray(e)){for(r=ce(t),i=e.length;a1)}}),yt.Tween=z,z.prototype={constructor:z,init:function(t,e,n,r,i,o){this.elem=t,this.prop=n,this.easing=i||yt.easing._default,this.options=e,this.start=this.now=this.cur,this.end=r,this.unit=o||(yt.cssNumber[n]?"":"px")},cur:function{var t=z.propHooks[this.prop];return t&&t.get?t.get(this):z.propHooks._default.get(this)},run:function(t){var e,n=z.propHooks[this.prop];return this.options.duration?this.pos=e=yt.easing[this.easing](t,this.options.duration*t,0,1,this.options.duration):this.pos=e=t,this.now=(this.end-this.start)*e+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):z.propHooks._default.set(this),this}},z.prototype.init.prototype=z.prototype,z.propHooks={_default:{get:function(t){var e;return 1!==t.elem.nodeType||null!=t.elem[t.prop]&&null==t.elem.style[t.prop]?t.elem[t.prop]:(e=yt.css(t.elem,t.prop,""),e&&"auto"!==e?e:0)},set:function(t){yt.fx.step[t.prop]?yt.fx.step[t.prop](t):1!==t.elem.nodeType||null==t.elem.style[yt.cssProps[t.prop]]&&!yt.cssHooks[t.prop]?t.elem[t.prop]=t.now:yt.style(t.elem,t.prop,t.now+t.unit)}}},z.propHooks.scrollTop=z.propHooks.scrollLeft={set:function(t){t.elem.nodeType&&t.elem.parentNode&&(t.elem[t.prop]=t.now)}},yt.easing={linear:function(t){return t},swing:function(t){return.5-Math.cos(t*Math.PI)/2},_default:"swing"},yt.fx=z.prototype.init,yt.fx.step={};var ve,ye,_e=/^(?:toggle|show|hide)$/,be=/queueHooks$/;yt.Animation=yt.extend($,{tweeners:{"*":[function(t,e){var n=this.createTween(t,e);return _(n.elem,t,zt.exec(e),n),n}]},tweener:function(t,e){yt.isFunction(t)?(e=t,t=["*"]):t=t.match(Rt);for(var n,r=0,i=t.length;r<i;r++)n=t[r],$.tweeners[n]=$.tweeners[n]||[],$.tweeners[n].unshift(e)},prefilters:[Y],prefilter:function(t,e){e?$.prefilters.unshift(t):$.prefilters.push(t)}}),yt.speed=function(t,e,n){var r=t&&"object"==typeof t?yt.extend({},t):{complete:n||!n&&e||yt.isFunction(t)&&t,duration:t,easing:n&&e||e&&!yt.isFunction(e)&&e};return yt.fx.off?r.duration=0:"number"!=typeof r.duration&&(r.duration in yt.fx.speeds?r.duration=yt.fx.speeds[r.duration]:r.duration=yt.fx.speeds._default),null!=r.queue&&!0!==r.queue||(r.queue="fx"),r.old=r.complete,r.complete=function{yt.isFunction(r.old)&&r.old.call(this),r.queue&&yt.dequeue(this,r.queue)},r},yt.fn.extend({fadeTo:function(t,e,n,r){return this.filter(Gt).css("opacity",0).show.end.animate({opacity:e},t,n,r)},animate:function(t,e,n,r){var i=yt.isEmptyObject(t),o=yt.speed(e,n,r),a=function{var e=$(this,yt.extend({},t),o);(i||Nt.get(this,"finish"))&&e.stop(!0)};return a.finish=a,i||!1===o.queue?this.each(a):this.queue(o.queue,a)},stop:function(t,e,n){var r=function(t){var e=t.stop;delete t.stop,e(n)};return"string"!=typeof t&&(n=e,e=t,t=void 0),e&&!1!==t&&this.queue(t||"fx",[]),this.each(function{var e=!0,i=null!=t&&t+"queueHooks",o=yt.timers,a=Nt.get(this);if(i)a[i]&&a[i].stop&&r(a[i]);else for(i in a)a[i]&&a[i].stop&&be.test(i)&&r(a[i]);for(i=o.length;i--;)o[i].elem!==this||null!=t&&o[i].queue!==t||(o[i].anim.stop(n),e=!1,o.splice(i,1));!e&&n||yt.dequeue(this,t)})},finish:function(t){return!1!==t&&(t=t||"fx"),this.each(function{var e,n=Nt.get(this),r=n[t+"queue"],i=n[t+"queueHooks"],o=yt.timers,a=r?r.length:0;for(n.finish=!0,yt.queue(this,t,[]),i&&i.stop&&i.stop.call(this,!0),e=o.length;e--;)o[e].elem===this&&o[e].queue===t&&(o[e].anim.stop(!0),o.splice(e,1));for(e=0;e<a;e++)r[e]&&r[e].finish&&r[e].finish.call(this);delete n.finish})}}),yt.each(["toggle","show","hide"],function(t,e){var n=yt.fn[e];yt.fn[e]=function(t,r,i){return null==t||"boolean"==typeof t?n.apply(this,arguments):this.animate(q(e,!0),t,r,i)}}),yt.each({slideDown:q("show"),slideUp:q("hide"),slideToggle:q("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(t,e){yt.fn[t]=function(t,n,r){return this.animate(e,t,n,r)}}),yt.timers=[],yt.fx.tick=function{var t,e=0,n=yt.timers;for(ve=yt.now;e<n.length;e++)(t=n[e])||n[e]!==t||n.splice(e--,1);n.length||yt.fx.stop,ve=void 0},yt.fx.timer=function(t){yt.timers.push(t),yt.fx.start},yt.fx.interval=13,yt.fx.start=function{ye||(ye=!0,X)},yt.fx.stop=function{ye=null},yt.fx.speeds={slow:600,fast:200,_default:400},yt.fn.delay=function(t,e){return t=yt.fx?yt.fx.speeds[t]||t:t,e=e||"fx",this.queue(e,function(e,r){var i=n.setTimeout(e,t);r.stop=function{n.clearTimeout(i)}})},function{var t=at.createElement("input"),e=at.createElement("select"),n=e.appendChild(at.createElement("option"));t.type="checkbox",vt.checkOn=""!==t.value,vt.optSelected=n.selected,t=at.createElement("input"),t.value="t",t.type="radio",vt.radioValue="t"===t.value};var xe,we=yt.expr.attrHandle;yt.fn.extend({attr:function(t,e){return jt(this,yt.attr,t,e,arguments.length>1)},removeAttr:function(t){return this.each(function{yt.removeAttr(this,t)})}}),yt.extend({attr:function(t,e,n){var r,i,o=t.nodeType;if(3!==o&&8!==o&&2!==o)return void 0===t.getAttribute?yt.prop(t,e,n):(1===o&&yt.isXMLDoc(t)||(i=yt.attrHooks[e.toLowerCase]||(yt.expr.match.bool.test(e)?xe:void 0)),void 0!==n?null===n?void yt.removeAttr(t,e):i&&"set"in i&&void 0!==(r=i.set(t,n,e))?r:(t.setAttribute(e,n+""),n):i&&"get"in i&&null!==(r=i.get(t,e))?r:(r=yt.find.attr(t,e),null==r?void 0:r))},attrHooks:{type:{set:function(t,e){if(!vt.radioValue&&"radio"===e&&u(t,"input")){var n=t.value;return t.setAttribute("type",e),n&&(t.value=n),e}}}},removeAttr:function(t,e){var n,r=0,i=e&&e.match(Rt);if(i&&1===t.nodeType)for(n=i[r++];)t.removeAttribute(n)}}),xe={set:function(t,e,n){return!1===e?yt.removeAttr(t,n):t.setAttribute(n,n),n}},yt.each(yt.expr.match.bool.source.match(/\w+/g),function(t,e){var n=we[e]||yt.find.attr;we[e]=function(t,e,r){var i,o,a=e.toLowerCase;return r||(o=we[a],we[a]=i,i=null!=n(t,e,r)?a:null,we[a]=o),i}});var Te=/^(?:input|select|textarea|button)$/i,Se=/^(?:a|area)$/i;yt.fn.extend({prop:function(t,e){return jt(this,yt.prop,t,e,arguments.length>1)},removeProp:function(t){return this.each(function{delete this[yt.propFix[t]||t]})}}),yt.extend({prop:function(t,e,n){var r,i,o=t.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&yt.isXMLDoc(t)||(e=yt.propFix[e]||e,i=yt.propHooks[e]),void 0!==n?i&&"set"in i&&void 0!==(r=i.set(t,n,e))?r:t[e]=n:i&&"get"in i&&null!==(r=i.get(t,e))?r:t[e]},propHooks:{tabIndex:{get:function(t){var e=yt.find.attr(t,"tabindex");return e?parseInt(e,10):Te.test(t.nodeName)||Se.test(t.nodeName)&&t.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),vt.optSelected||(yt.propHooks.selected={get:function(t){var e=t.parentNode;return e&&e.parentNode&&e.parentNode.selectedIndex,null},set:function(t){var e=t.parentNode;e&&(e.selectedIndex,e.parentNode&&e.parentNode.selectedIndex)}}),yt.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function{yt.propFix[this.toLowerCase]=this}),yt.fn.extend({addClass:function(t){var e,n,r,i,o,a,s,u=0;if(yt.isFunction(t))return this.each(function(e){yt(this).addClass(t.call(this,e,Z(this)))});if("string"==typeof t&&t)for(e=t.match(Rt)||[];n=this[u++];)if(i=Z(n),r=1===n.nodeType&&" "+J(i)+" "){for(a=0;o=e[a++];)r.indexOf(" "+o+" ")<0&&(r+=o+" ");s=J(r),i!==s&&n.setAttribute("class",s)}return this},removeClass:function(t){var e,n,r,i,o,a,s,u=0;if(yt.isFunction(t))return this.each(function(e){yt(this).removeClass(t.call(this,e,Z(this)))});if(!arguments.length)return this.attr("class","");if("string"==typeof t&&t)for(e=t.match(Rt)||[];n=this[u++];)if(i=Z(n),r=1===n.nodeType&&" "+J(i)+" "){for(a=0;o=e[a++];)for(r.indexOf(" "+o+" ")>-1;)r=r.replace(" "+o+" "," ");s=J(r),i!==s&&n.setAttribute("class",s)}return this},toggleClass:function(t,e){var n=typeof t;return"boolean"==typeof e&&"string"===n?e?this.addClass(t):this.removeClass(t):yt.isFunction(t)?this.each(function(n){yt(this).toggleClass(t.call(this,n,Z(this),e),e)}):this.each(function{var e,r,i,o;if("string"===n)for(r=0,i=yt(this),o=t.match(Rt)||[];e=o[r++];)i.hasClass(e)?i.removeClass(e):i.addClass(e);else void 0!==t&&"boolean"!==n||(e=Z(this),e&&Nt.set(this,"__className__",e),this.setAttribute&&this.setAttribute("class",e||!1===t?"":Nt.get(this,"__className__")||""))})},hasClass:function(t){var e,n,r=0;for(e=" "+t+" ";n=this[r++];)if(1===n.nodeType&&(" "+J(Z(n))+" ").indexOf(e)>-1)return!0;return!1}});var Ee=/\r/g;yt.fn.extend({val:function(t){var e,n,r,i=this[0];{if(arguments.length)return r=yt.isFunction(t),this.each(function(n){var i;1===this.nodeType&&(i=r?t.call(this,n,yt(this).val):t,null==i?i="":"number"==typeof i?i+="":Array.isArray(i)&&(i=yt.map(i,function(t){return null==t?"":t+""})),(e=yt.valHooks[this.type]||yt.valHooks[this.nodeName.toLowerCase])&&"set"in e&&void 0!==e.set(this,i,"value")||(this.value=i))});if(i)return(e=yt.valHooks[i.type]||yt.valHooks[i.nodeName.toLowerCase])&&"get"in e&&void 0!==(n=e.get(i,"value"))?n:(n=i.value,"string"==typeof n?n.replace(Ee,""):null==n?"":n)}}}),yt.extend({valHooks:{option:{get:function(t){var e=yt.find.attr(t,"value");return null!=e?e:J(yt.text(t))}},select:{get:function(t){var e,n,r,i=t.options,o=t.selectedIndex,a="select-one"===t.type,s=a?null:[],l=a?o+1:i.length;for(r=o<0?l:a?o:0;r-1)&&(n=!0);return n||(t.selectedIndex=-1),o}}}}),yt.each(["radio","checkbox"],function{yt.valHooks[this]={set:function(t,e){if(Array.isArray(e))return t.checked=yt.inArray(yt(t).val,e)>-1}},vt.checkOn||(yt.valHooks[this].get=function(t){return null===t.getAttribute("value")?"on":t.value})});var Pe=/^(?:focusinfocus|focusoutblur)$/;yt.extend(yt.event,{trigger:function(t,e,r,i){var o,a,s,u,l,c,h,d=[r||at],p=ft.call(t,"type")?t.type:t,f=ft.call(t,"namespace")?t.namespace.split("."):[];if(a=s=r=r||at,3!==r.nodeType&&8!==r.nodeType&&!Pe.test(p+yt.event.triggered)&&(p.indexOf(".")>-1&&(f=p.split("."),p=f.shift,f.sort),l=p.indexOf(":")<0&&"on"+p,t=t[yt.expando]?t:new yt.Event(p,"object"==typeof t&&t),t.isTrigger=i?2:3,t.namespace=f.join("."),t.rnamespace=t.namespace?new RegExp("(^|\\.)"+f.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=void 0,t.target||(t.target=r),e=null==e?[t]:yt.makeArray(e,[t]),h=yt.event.special[p]||{},i||!h.trigger||!1!==h.trigger.apply(r,e))){if(!i&&!h.noBubble&&!yt.isWindow(r)){for(u=h.delegateType||p,Pe.test(u+p)||(a=a.parentNode);a;a=a.parentNode)d.push(a),s=a;s===(r.ownerDocument||at)&&d.push(s.defaultView||s.parentWindow||n)}for(o=0;(a=d[o++])&&!t.isPropagationStopped;)t.type=o>1?u:h.bindType||p,c=(Nt.get(a,"events")||{})[t.type]&&Nt.get(a,"handle"),c&&c.apply(a,e),(c=l&&a[l])&&c.apply&&Bt(a)&&(t.result=c.apply(a,e),!1===t.result&&t.preventDefault);return t.type=p,i||t.isDefaultPrevented||h._default&&!1!==h._default.apply(d.pop,e)||!Bt(r)||l&&yt.isFunction(r[p])&&!yt.isWindow(r)&&(s=r[l],s&&(r[l]=null),yt.event.triggered=p,r[p],yt.event.triggered=void 0,s&&(r[l]=s)),t.result}},simulate:function(t,e,n){var r=yt.extend(new yt.Event,n,{type:t,isSimulated:!0});yt.event.trigger(r,null,e)}}),yt.fn.extend({trigger:function(t,e){return this.each(function{yt.event.trigger(t,e,this)})},triggerHandler:function(t,e){var n=this[0];if(n)return yt.event.trigger(t,e,n,!0)}}),yt.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(t,e){yt.fn[e]=function(t,n){return arguments.length>0?this.on(e,null,t,n):this.trigger(e)}}),yt.fn.extend({hover:function(t,e){return this.mouseenter(t).mouseleave(e||t)}}),vt.focusin="onfocusin"in n,vt.focusin||yt.each({focus:"focusin",blur:"focusout"},function(t,e){var n=function(t){yt.event.simulate(e,t.target,yt.event.fix(t))};yt.event.special[e]={setup:function{var r=this.ownerDocument||this,i=Nt.access(r,e);i||r.addEventListener(t,n,!0),Nt.access(r,e,(i||0)+1)},teardown:function{var r=this.ownerDocument||this,i=Nt.access(r,e)-1;i?Nt.access(r,e,i):(r.removeEventListener(t,n,!0),Nt.remove(r,e))}}});var Me=n.location,Ce=yt.now,Ae=/\?/;yt.parseXML=function(t){var e;if(!t||"string"!=typeof t)return null;try{e=(new n.DOMParser).parseFromString(t,"text/xml")}catch(t){e=void 0}return e&&!e.getElementsByTagName("parsererror").length||yt.error("Invalid XML: "+t),e};var Oe=/\[\]$/,Ie=/\r?\n/g,ke=/^(?:submit|button|image|reset|file)$/i,Re=/^(?:input|select|textarea|keygen)/i;yt.param=function(t,e){var n,r=[],i=function(t,e){var n=yt.isFunction(e)?e:e;r[r.length]=encodeURIComponent(t)+"="+encodeURIComponent(null==n?"":n)};if(Array.isArray(t)||t.jquery&&!yt.isPlainObject(t))yt.each(t,function{i(this.name,this.value)});else for(n in t)Q(n,t[n],e,i);return r.join("&")},yt.fn.extend({serialize:function{return yt.param(this.serializeArray)},serializeArray:function{return this.map(function{var t=yt.prop(this,"elements");return t?yt.makeArray(t):this}).filter(function{var t=this.type;return this.name&&!yt(this).is(":disabled")&&Re.test(this.nodeName)&&!ke.test(t)&&(this.checked||!Yt.test(t))}).map(function(t,e){var n=yt(this).val;return null==n?null:Array.isArray(n)?yt.map(n,function(t){return{name:e.name,value:t.replace(Ie,"\r\n")}}):{name:e.name,value:n.replace(Ie,"\r\n")}}).get}});var De=/%20/g,Le=/#.*$/,je=/([?&])_=[^&]*/,Be=/^(.*?):[ \t]*([^\r\n]*)$/gm,Ne=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Fe=/^(?:GET|HEAD)$/,Ue=/^\/\//,We={},He={},ze="*/".concat("*"),Xe=at.createElement("a");Xe.href=Me.href,yt.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Me.href,type:"GET",isLocal:Ne.test(Me.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":ze,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":yt.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(t,e){return e?nt(nt(t,yt.ajaxSettings),e):nt(yt.ajaxSettings,t)},ajaxPrefilter:tt(We),ajaxTransport:tt(He),ajax:function(t,e){function r(t,e,r,s){var l,d,p,b,x,w=e;c||(c=!0,u&&n.clearTimeout(u),i=void 0,a=s||"",T.readyState=t>0?4:0,l=t>=200&&t<300||304===t,r&&(b=rt(f,T,r)),b=it(f,b,T,l),l?(f.ifModified&&(x=T.getResponseHeader("Last-Modified"),x&&(yt.lastModified[o]=x),(x=T.getResponseHeader("etag"))&&(yt.etag[o]=x)),204===t||"HEAD"===f.type?w="nocontent":304===t?w="notmodified":(w=b.state,d=b.data,p=b.error,l=!p)):(p=w,!t&&w||(w="error",t<0&&(t=0))),T.status=t,T.statusText=(e||w)+"",l?v.resolveWith(g,[d,w,T]):v.rejectWith(g,[T,w,p]),T.statusCode(_),_=void 0,h&&m.trigger(l?"ajaxSuccess":"ajaxError",[T,f,l?d:p]),y.fireWith(g,[T,w]),h&&(m.trigger("ajaxComplete",[T,f]),--yt.active||yt.event.trigger("ajaxStop")))}"object"==typeof t&&(e=t,t=void 0),e=e||{};var i,o,a,s,u,l,c,h,d,p,f=yt.ajaxSetup({},e),g=f.context||f,m=f.context&&(g.nodeType||g.jquery)?yt(g):yt.event,v=yt.Deferred,y=yt.Callbacks("once memory"),_=f.statusCode||{},b={},x={},w="canceled",T={readyState:0,getResponseHeader:function(t){var e;if(c){if(!s)for(s={};e=Be.exec(a);)s[e[1].toLowerCase]=e[2];e=s[t.toLowerCase]}return null==e?null:e},getAllResponseHeaders:function{return c?a:null},setRequestHeader:function(t,e){return null==c&&(t=x[t.toLowerCase]=x[t.toLowerCase]||t,b[t]=e),this},overrideMimeType:function(t){return null==c&&(f.mimeType=t),this},statusCode:function(t){var e;if(t)if(c)T.always(t[T.status]);else for(e in t)_[e]=[_[e],t[e]];return this},abort:function(t){var e=t||w;return i&&i.abort(e),r(0,e),this}};if(v.promise(T),f.url=((t||f.url||Me.href)+"").replace(Ue,Me.protocol+"//"),f.type=e.method||e.type||f.method||f.type,f.dataTypes=(f.dataType||"*").toLowerCase.match(Rt)||[""],null==f.crossDomain){l=at.createElement("a");try{l.href=f.url,l.href=l.href,f.crossDomain=Xe.protocol+"//"+Xe.host!=l.protocol+"//"+l.host}catch(t){f.crossDomain=!0}}if(f.data&&f.processData&&"string"!=typeof f.data&&(f.data=yt.param(f.data,f.traditional)),et(We,f,e,T),c)return T;h=yt.event&&f.global,h&&0==yt.active++&&yt.event.trigger("ajaxStart"),f.type=f.type.toUpperCase,f.hasContent=!Fe.test(f.type),o=f.url.replace(Le,""),f.hasContent?f.data&&f.processData&&0===(f.contentType||"").indexOf("application/x-www-form-urlencoded")&&(f.data=f.data.replace(De,"+")):(p=f.url.slice(o.length),f.data&&(o+=(Ae.test(o)?"&":"?")+f.data,delete f.data),!1===f.cache&&(o=o.replace(je,"$1"),p=(Ae.test(o)?"&":"?")+"_="+Ce+++p),f.url=o+p),f.ifModified&&(yt.lastModified[o]&&T.setRequestHeader("If-Modified-Since",yt.lastModified[o]),yt.etag[o]&&T.setRequestHeader("If-None-Match",yt.etag[o])),(f.data&&f.hasContent&&!1!==f.contentType||e.contentType)&&T.setRequestHeader("Content-Type",f.contentType),T.setRequestHeader("Accept",f.dataTypes[0]&&f.accepts[f.dataTypes[0]]?f.accepts[f.dataTypes[0]]+("*"!==f.dataTypes[0]?", "+ze+"; q=0.01":""):f.accepts["*"]);for(d in f.headers)T.setRequestHeader(d,f.headers[d]);if(f.beforeSend&&(!1===f.beforeSend.call(g,T,f)||c))return T.abort;if(w="abort",y.add(f.complete),T.done(f.success),T.fail(f.error),i=et(He,f,e,T)){if(T.readyState=1,h&&m.trigger("ajaxSend",[T,f]),c)return T;f.async&&f.timeout>0&&(u=n.setTimeout(function{T.abort("timeout")},f.timeout));try{c=!1,i.send(b,r)}catch(t){if(c)throw t;r(-1,t)}}else r(-1,"No Transport");return T},getJSON:function(t,e,n){return yt.get(t,e,n,"json")},getScript:function(t,e){return yt.get(t,void 0,e,"script")}}),yt.each(["get","post"],function(t,e){yt[e]=function(t,n,r,i){return yt.isFunction(n)&&(i=i||r,r=n,n=void 0),yt.ajax(yt.extend({url:t,type:e,dataType:i,data:n,success:r},yt.isPlainObject(t)&&t))}}),yt._evalUrl=function(t){return yt.ajax({url:t,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,throws:!0})},yt.fn.extend({wrapAll:function(t){var e;return this[0]&&(yt.isFunction(t)&&(t=t.call(this[0])),e=yt(t,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&e.insertBefore(this[0]),e.map(function{for(var t=this;t.firstElementChild;)t=t.firstElementChild;return t}).append(this)),this},wrapInner:function(t){return yt.isFunction(t)?this.each(function(e){yt(this).wrapInner(t.call(this,e))}):this.each(function{var e=yt(this),n=e.contents;n.length?n.wrapAll(t):e.append(t)})},wrap:function(t){var e=yt.isFunction(t);return this.each(function(n){yt(this).wrapAll(e?t.call(this,n):t)})},unwrap:function(t){return this.parent(t).not("body").each(function{yt(this).replaceWith(this.childNodes)}),this}}),yt.expr.pseudos.hidden=function(t){return!yt.expr.pseudos.visible(t)},yt.expr.pseudos.visible=function(t){return!!(t.offsetWidth||t.offsetHeight||t.getClientRects.length)},yt.ajaxSettings.xhr=function{try{return new n.XMLHttpRequest}catch(t){}};var Ge={0:200,1223:204},qe=yt.ajaxSettings.xhr;vt.cors=!!qe&&"withCredentials"in qe,vt.ajax=qe=!!qe,yt.ajaxTransport(function(t){var e,r;if(vt.cors||qe&&!t.crossDomain)return{send:function(i,o){var a,s=t.xhr;if(s.open(t.type,t.url,t.async,t.username,t.password),t.xhrFields)for(a in t.xhrFields)s[a]=t.xhrFields[a];t.mimeType&&s.overrideMimeType&&s.overrideMimeType(t.mimeType),t.crossDomain||i["X-Requested-With"]||(i["X-Requested-With"]="XMLHttpRequest");for(a in i)s.setRequestHeader(a,i[a]);e=function(t){return function{e&&(e=r=s.onload=s.onerror=s.onabort=s.onreadystatechange=null,"abort"===t?s.abort:"error"===t?"number"!=typeof s.status?o(0,"error"):o(s.status,s.statusText):o(Ge[s.status]||s.status,s.statusText,"text"!==(s.responseType||"text")||"string"!=typeof s.responseText?{binary:s.response}:{text:s.responseText},s.getAllResponseHeaders))}},s.onload=e,r=s.onerror=e("error"),void 0!==s.onabort?s.onabort=r:s.onreadystatechange=function{4===s.readyState&&n.setTimeout(function{e&&r})},e=e("abort");try{s.send(t.hasContent&&t.data||null)}catch(t){if(e)throw t}},abort:function{e&&e}}}),yt.ajaxPrefilter(function(t){t.crossDomain&&(t.contents.script=!1)}),yt.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(t){return yt.globalEval(t),t}}}),yt.ajaxPrefilter("script",function(t){void 0===t.cache&&(t.cache=!1),t.crossDomain&&(t.type="GET")}),yt.ajaxTransport("script",function(t){if(t.crossDomain){var e,n;return{send:function(r,i){e=yt(" ").prop({charset:t.scriptCharset,src:t.url}).on("load error",n=function(t){e.remove,n=null,t&&i("error"===t.type?404:200,t.type)}),at.head.appendChild(e[0])},abort:function{n&&n}}}});var Ve=[],Ye=/(=)\?(?=&|$)|\?\?/;yt.ajaxSetup({jsonp:"callback",jsonpCallback:function{var t=Ve.pop||yt.expando+"_"+Ce++;return this[t]=!0,t}}),yt.ajaxPrefilter("json jsonp",function(t,e,r){var i,o,a,s=!1!==t.jsonp&&(Ye.test(t.url)?"url":"string"==typeof t.data&&0===(t.contentType||"").indexOf("application/x-www-form-urlencoded")&&Ye.test(t.data)&&"data");if(s||"jsonp"===t.dataTypes[0])return i=t.jsonpCallback=yt.isFunction(t.jsonpCallback)?t.jsonpCallback:t.jsonpCallback,s?t[s]=t[s].replace(Ye,"$1"+i):!1!==t.jsonp&&(t.url+=(Ae.test(t.url)?"&":"?")+t.jsonp+"="+i),t.converters["script json"]=function{return a||yt.error(i+" was not called"),a[0]},t.dataTypes[0]="json",o=n[i],n[i]=function{a=arguments},r.always(function{void 0===o?yt(n).removeProp(i):n[i]=o,t[i]&&(t.jsonpCallback=e.jsonpCallback,Ve.push(i)),a&&yt.isFunction(o)&&o(a[0]),a=o=void 0}),"script"}),vt.createHTMLDocument=function{var t=at.implementation.createHTMLDocument("").body;return t.innerHTML="   ",2===t.childNodes.length},yt.parseHTML=function(t,e,n){if("string"!=typeof t)return[];"boolean"==typeof e&&(n=e,e=!1);var r,i,o;return e||(vt.createHTMLDocument?(e=at.implementation.createHTMLDocument(""),r=e.createElement("base"),r.href=at.location.href,e.head.appendChild(r)):e=at),i=Mt.exec(t),o=!n&&[],i?[e.createElement(i[1])]:(i=S([t],e,o),o&&o.length&&yt(o).remove,yt.merge([],i.childNodes))},yt.fn.load=function(t,e,n){var r,i,o,a=this,s=t.indexOf(" ");return s>-1&&(r=J(t.slice(s)),t=t.slice(0,s)),yt.isFunction(e)?(n=e,e=void 0):e&&"object"==typeof e&&(i="POST"),a.length>0&&yt.ajax({url:t,type:i||"GET",dataType:"html",data:e}).done(function(t){o=arguments,a.html(r?yt(" ").append(yt.parseHTML(t)).find(r):t)}).always(n&&function(t,e){a.each(function{n.apply(this,o||[t.responseText,e,t])})}),this},yt.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(t,e){yt.fn[e]=function(t){return this.on(e,t)}}),yt.expr.pseudos.animated=function(t){return yt.grep(yt.timers,function(e){return t===e.elem}).length},yt.offset={setOffset:function(t,e,n){var r,i,o,a,s,u,l,c=yt.css(t,"position"),h=yt(t),d={};"static"===c&&(t.style.position="relative"),s=h.offset,o=yt.css(t,"top"),u=yt.css(t,"left"),l=("absolute"===c||"fixed"===c)&&(o+u).indexOf("auto")>-1,l?(r=h.position,a=r.top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),yt.isFunction(e)&&(e=e.call(t,n,yt.extend({},s))),null!=e.top&&(d.top=e.top-s.top+a),null!=e.left&&(d.left=e.left-s.left+i),"using"in e?e.using.call(t,d):h.css(d)}},yt.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){yt.offset.setOffset(this,t,e)});var e,n,r,i,o=this[0];if(o)return o.getClientRects.length?(r=o.getBoundingClientRect,e=o.ownerDocument,n=e.documentElement,i=e.defaultView,{top:r.top+i.pageYOffset-n.clientTop,left:r.left+i.pageXOffset-n.clientLeft}):{top:0,left:0}},position:function{if(this[0]){var t,e,n=this[0],r={top:0,left:0};return"fixed"===yt.css(n,"position")?e=n.getBoundingClientRect:(t=this.offsetParent,e=this.offset,u(t[0],"html")||(r=t.offset),r={top:r.top+yt.css(t[0],"borderTopWidth",!0),left:r.left+yt.css(t[0],"borderLeftWidth",!0)}),{top:e.top-r.top-yt.css(n,"marginTop",!0),left:e.left-r.left-yt.css(n,"marginLeft",!0)}}},offsetParent:function{return this.map(function{for(var t=this.offsetParent;t&&"static"===yt.css(t,"position");)t=t.offsetParent;return t||Qt})}}),yt.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,e){var n="pageYOffset"===e;yt.fn[t]=function(r){return jt(this,function(t,r,i){var o;if(yt.isWindow(t)?o=t:9===t.nodeType&&(o=t.defaultView),void 0===i)return o?o[e]:t[r];o?o.scrollTo(n?o.pageXOffset:i,n?i:o.pageYOffset):t[r]=i},t,r,arguments.length)}}),yt.each(["top","left"],function(t,e){yt.cssHooks[e]=B(vt.pixelPosition,function(t,n){if(n)return n=j(t,e),le.test(n)?yt(t).position[e]+"px":n})}),yt.each({Height:"height",Width:"width"},function(t,e){yt.each({padding:"inner"+t,content:e,"":"outer"+t},function(n,r){yt.fn[r]=function(i,o){var a=arguments.length&&(n||"boolean"!=typeof i),s=n||(!0===i||!0===o?"margin":"border");return jt(this,function(e,n,i){var o;return yt.isWindow(e)?0===r.indexOf("outer")?e["inner"+t]:e.document.documentElement["client"+t]:9===e.nodeType?(o=e.documentElement,Math.max(e.body["scroll"+t],o["scroll"+t],e.body["offset"+t],o["offset"+t],o["client"+t])):void 0===i?yt.css(e,n,s):yt.style(e,n,i,s)},e,a?i:void 0,a)}})}),yt.fn.extend({bind:function(t,e,n){return this.on(t,null,e,n)},unbind:function(t,e){return this.off(t,null,e)},delegate:function(t,e,n,r){return this.on(e,t,n,r)},undelegate:function(t,e,n){return 1===arguments.length?this.off(t,"**"):this.off(e,t||"**",n)}}),yt.holdReady=function(t){t?yt.readyWait++:yt.ready(!0)},yt.isArray=Array.isArray,yt.parseJSON=JSON.parse,yt.nodeName=u,r=[],void 0!==(i=function{return yt}.apply(e,r))&&(t.exports=i);var Ke=n.jQuery,$e=n.$;return yt.noConflict=function(t){return n.$===yt&&(n.$=$e),t&&n.jQuery===yt&&(n.jQuery=Ke),yt},o||(n.jQuery=n.$=yt),yt})},function(t,e,n){"use strict";function r(t,e){this.min=t,this.max=e}function i(t){return t instanceof r?t.getRandom:t}function o(t){return t instanceof Function?t:t}function a(t){this.active=!1,this.ticker=0,this.def={},this.parent=null,this.sprite=new c.Sprite,this.sprite.anchor=new c.Point(.5,.5),this.sprite.scale=new c.Point(1,1),this.sprite.visible=!1,this.container=t,this.container.addChild(this.sprite)}function s{this.active=!1}function u{this.display=new c.Container,this.particles=[];for(var t=0;t<m;t++)this.particles[t]=new a(this.display);this.emitters=[]}var l=n(5),c=n(2),h=n(1),d=n(4),p=n(0);r.prototype={getRandom:function{return d.random(this.min,this.max)}};var f={bloodSplat:{image:["img/particles/part-splat-01.svg","img/particles/part-splat-02.svg","img/particles/part-splat-03.svg"],life:.5,drag:1,rotVel:0,scale:{start:.04,end:new r(.15,.2),lerp:new r(0,1)},alpha:{start:1,end:0,lerp:new r(.75,1)},color:function{return d.rgb2hex(d.hsv2rgb(16711680,1,d.random(.45,.8)))}},rockChip:{image:["img/map/map-stone-01.svg"],life:.5,drag:new r(1,10),rotVel:0,scale:{start:new r(.04,.08),end:new r(.01,.02),lerp:new r(0,1)},alpha:{start:1,end:0,lerp:new r(.95,1)},color:function{return d.rgb2hex(d.hsv2rgb(0,0,d.random(.5,.75)))}},rockFrag:{image:["img/map/map-stone-01.svg"],life:new r(.8,1),drag:new r(1,5),rotVel:0,scale:{start:new r(.07,.12),end:new r(.05,.1),lerp:new r(0,1)},alpha:{start:1,end:0,lerp:new r(.9,1)},color:function{return d.rgb2hex(d.hsv2rgb(0,0,d.random(.5,.75)))}},woodChip:{image:["img/particles/part-woodchip-01.svg"],life:new r(.5,1),drag:new r(1,5),rotVel:new r(3*Math.PI,3*Math.PI),scale:{start:new r(.04,.08),end:new r(.01,.02),lerp:new r(0,1)},alpha:{start:1,end:0,lerp:new r(.9,1)},color:function{return d.rgb2hex(d.hsv2rgb(.05,1,d.random(.35,.45)))}},woodLog:{image:["img/particles/part-log-01.svg"],life:new r(1,1.5),drag:new r(1,5),rotVel:new r(3*Math.PI,3*Math.PI),scale:{start:new r(.1,.2),end:new r(.08,.18),lerp:new r(0,1)},alpha:{start:1,end:0,lerp:new r(.9,1)},color:function{return d.rgb2hex(d.hsv2rgb(.05,1,d.random(.35,.45)))}},woodPlank:{image:["img/particles/part-plank-01.svg"],life:new r(1,1.5),drag:new r(1,5),rotVel:new r(3*Math.PI,3*Math.PI),scale:{start:new r(.1,.2),end:new r(.08,.18),lerp:new r(0,1)},alpha:{start:1,end:0,lerp:new r(.9,1)},color:function{return d.rgb2hex(d.hsv2rgb(.05,1,d.random(.25,.35)))}},shackFrag:{image:["img/particles/part-panel-01.svg"],life:new r(.5,1.5),drag:new r(1,5),rotVel:new r(0*Math.PI,3*Math.PI),scale:{start:new r(.25,.55),end:new r(.08,.18),lerp:new r(0,1)},alpha:{start:1,end:0,lerp:new r(.9,1)},color:function{return d.rgb2hex(d.hsv2rgb(.1,.24,d.random(.38,.41)))}},outhouseFrag:{image:["img/particles/part-panel-01.svg"],life:new r(.5,1.5),drag:new r(1,5),rotVel:new r(0*Math.PI,3*Math.PI),scale:{start:new r(.25,.55),end:new r(.08,.18),lerp:new r(0,1)},alpha:{start:1,end:0,lerp:new r(.9,1)},color:function{return d.rgb2hex(d.hsv2rgb(.08,.79,d.random(.52,.54)))}},outhouseChip:{image:["img/particles/part-woodchip-01.svg"],life:new r(.5,1),drag:new r(1,5),rotVel:new r(3*Math.PI,3*Math.PI),scale:{start:new r(.04,.08),end:new r(.01,.02),lerp:new r(0,1)},alpha:{start:1,end:0,lerp:new r(.9,1)},color:function{return d.rgb2hex(d.hsv2rgb(.08,.57,d.random(.4,.46)))}},outhousePlank:{image:["img/particles/part-plank-01.svg"],life:new r(1,1.5),drag:new r(1,5),rotVel:new r(3*Math.PI,3*Math.PI),scale:{start:new r(.1,.2),end:new r(.08,.18),lerp:new r(0,1)},alpha:{start:1,end:0,lerp:new r(.9,1)},color:function{return d.rgb2hex(d.hsv2rgb(.08,.57,d.random(.4,.46)))}},barrelChip:{image:["img/particles/part-spark-02.svg"],life:.5,drag:new r(1,10),rotVel:0,scale:{start:new r(.04,.08),end:new r(.01,.02),lerp:new r(0,1)},alpha:{start:1,end:0,lerp:new r(.95,1)},color:function{return d.rgb2hex(d.hsv2rgb(.01,.02,d.random(.38,.41)))}},barrelFrag:{image:["img/particles/part-spark-02.svg"],life:new r(.8,1),drag:new r(1,5),rotVel:0,scale:{start:new r(.07,.12),end:new r(.05,.1),lerp:new r(0,1)},alpha:{start:1,end:0,lerp:new r(.9,1)},color:function{return d.rgb2hex(d.hsv2rgb(.01,.02,d.random(.38,.41)))}},greenChip:{image:["img/particles/part-spark-02.svg"],life:.5,drag:new r(1,10),rotVel:0,scale:{start:new r(.04,.08),end:new r(.01,.02),lerp:new r(0,1)},alpha:{start:1,end:0,lerp:new r(.95,1)},color:function{return d.rgb2hex(d.hsv2rgb(.4,.18,d.random(.5,.62)))}},whiteChip:{image:["img/particles/part-spark-02.svg"],life:.5,drag:new r(1,10),rotVel:0,scale:{start:new r(.04,.08),end:new r(.01,.02),lerp:new r(0,1)},alpha:{start:1,end:0,lerp:new r(.95,1)},color:function{return d.rgb2hex(d.hsv2rgb(.97,0,d.random(.95,.97)))}},toiletFrag:{image:["img/particles/part-spark-02.svg"],life:new r(.8,1),drag:new r(1,5),rotVel:0,scale:{start:new r(.07,.12),end:new r(.05,.1),lerp:new r(0,1)},alpha:{start:1,end:0,lerp:new r(.9,1)},color:function{return d.rgb2hex(d.hsv2rgb(.97,0,d.random(.95,.97)))}},leaf:{image:["img/particles/part-leaf-01.svg"],life:new r(.5,1),drag:new r(1,5),rotVel:new r(3*Math.PI,3*Math.PI),scale:{start:new r(.04,.08),end:new r(.01,.02),lerp:new r(0,1)},alpha:{start:1,end:0,lerp:new r(.9,1)},color:function{return d.rgb2hex(d.hsv2rgb(0,0,d.random(.5,.75)))}},"9mm":{image:["img/particles/part-shell-01.svg"],life:new r(.5,.75),drag:new r(3,4),rotVel:new r(3*Math.PI,3*Math.PI),scale:{start:.0625,end:.0325,lerp:new r(0,1)},alpha:{start:1,end:0,lerp:new r(.95,1)},color:function{return d.rgb2hex(d.hsv2rgb(0,0,d.random(.9,.95)))}},"762mm":{image:["img/particles/part-shell-02.svg"],life:new r(.75,1),drag:new r(1.5,2.5),rotVel:new r(2.5*Math.PI,2.5*Math.PI),scale:{start:.075,end:.045,lerp:new r(0,1)},alpha:{start:1,end:0,lerp:new r(.925,1)},color:function{return d.rgb2hex(d.hsv2rgb(0,0,d.random(.9,.95)))}},"12gauge":{image:["img/particles/part-shell-03.svg"],life:new r(.5,.75),drag:new r(1,2),rotVel:new r(3*Math.PI,3*Math.PI),scale:{start:.1,end:.05,lerp:new r(0,1)},alpha:{start:1,end:0,lerp:new r(.95,1)},color:function{return d.rgb2hex(d.hsv2rgb(0,0,d.random(.9,.95)))}},fragPin:{image:["img/particles/part-pin-01.svg"],life:new r(.35,.4),drag:new r(.9,1),rotVel:0,scale:{start:.18,end:.14,lerp:new r(0,1)},alpha:{start:1,end:0,lerp:new r(.5,1)},color:function{return d.rgb2hex(d.hsv2rgb(0,0,d.random(.9,.95)))}},explosionBurst:{image:["img/particles/part-frag-burst-01.svg"],life:.5,drag:new r(0,0),rotVel:0,scale:{start:1,end:4,lerp:new r(0,1)},alpha:{start:1,end:0,lerp:new r(.75,1)},color:8487297},explosionSmoke:{image:["img/particles/part-smoke-01.svg"],life:new r(2,3),drag:new r(0,0),rotVel:new r(.25*Math.PI,.5*Math.PI),scale:{start:new r(.07,.12),end:new r(.05,.1),lerp:new r(0,1)},alpha:{start:1,end:0,lerp:new r(.9,1)},color:function{return d.rgb2hex(d.hsv2rgb(0,0,d.random(.9,.95)))}}},g={smoke:{particle:"explosionSmoke",rate:new r(.2,.3),radius:0,speed:new r(2,3),angle:.1*Math.PI}};a.prototype={init:function(t,e,n,r,a,s){this.active=!0,this.ticker=0;var u=s||this.container;this.sprite.parent!=u&&(this.sprite.parent.removeChild(this.sprite),u.addChild(this.sprite)),this.parent=s,this.pos=p.copy(e),this.vel=p.copy(n),this.rot=a,this.def=t,this.life=i(t.life),this.drag=i(t.drag),this.rotVel=i(t.rotVel)*(Math.random<.5?-1:1),this.rotDrag=i(t.drag)/2,this.scaleStart=i(t.scale.start)*r,this.scaleEnd=i(t.scale.end)*r,this.alphaStart=i(t.alpha.start),this.alphaEnd=i(t.alpha.end);var l=Array.isArray(t.image)?t.image[Math.floor(Math.random*t.image.length)]:t.image;this.sprite.texture=c.Texture.fromImage(l),this.sprite.tint=o(t.color),this.sprite.visible=!0},free:function{this.active=!1,this.sprite.visible=!1}},s.prototype={init:function(t,e,n,r,i){this.active=!0,this.enabled=!0,this.type=t,this.pos=p.copy(e),this.dir=p.copy(n),this.scale=r,this.duration=i,this.ticker=0,this.nextSpawn=0},free:function{this.active=!1},stop:function{this.duration=this.ticker}};var m=512;u.prototype={addParticle:function(t,e,n,r,i,o){l(void 0!==t);for(var a=null,s=0;s<this.particles.length;s++)if(!this.particles[s].active){a=this.particles[s];break}if(!a)return void console.log("Ran out of particles!");r=r||1,i=i||Math.random*Math.PI*2,a.init(t,e,n,r,i,o)},addEmitter:function(t,e,n,r,i){for(var o=null,a=0;ar.nextSpawn;){var a=r.scale*o.radius,s=p.add(r.pos,p.mul(p.randomUnit,Math.random*a)),u=p.rotate(r.dir,(Math.random-.5)*o.angle),l=p.mul(u,i(o.speed)),c=Math.random*Math.PI*2;this.addParticle(f[o.particle],s,l,r.scale,c,null),r.nextSpawn+=i(o.rate)}r.ticker>=r.duration&&r.free}}for(var d=0;d<this.particles.length;d++){var m=this.particles[d];if(m.active){m.vel=p.mul(m.vel,1/(1+t*m.drag)),m.pos=p.add(m.pos,p.mul(m.vel,t)),m.rotVel*=1/(1+t*m.rotDrag),m.rot+=m.rotVel*t,m.ticker+=t;var v=Math.min(m.ticker/m.life,1),y=m.parent?m.pos:e.pointToScreen(m.pos),_=h.remap(v,m.def.scale.lerp.min,m.def.scale.lerp.max,m.scaleStart,m.scaleEnd),b=h.remap(v,m.def.alpha.lerp.min,m.def.alpha.lerp.max,m.alphaStart,m.alphaEnd);null==m.parent&&(_=e.pixels(_)),m.sprite.x=y.x,m.sprite.y=y.y,m.sprite.scale.x=_,m.sprite.scale.y=_,m.sprite.rotation=m.rot,m.sprite.alpha=b,v>=1&&m.free}}}},t.exports={Defs:f,ParticleBarn:u}},function(t,e,n){"use strict";var r=(n(5),n(1)),i=n(0),o={circleToAabb:function(t,e){var n=i.create(e);return{min:i.sub(t,n),max:i.add(t,n)}},aabbToCircle:function(t,e){var n=i.mul(i.sub(e,t),.5);return{pos:i.add(t,n),rad:i.length(n)}},boundingAabb:function(t){for(var e=i.create(Number.MAX_VALUE,Number.MAX_VALUE),n=i.create(-Number.MAX_VALUE,-Number.MAX_VALUE),r=0;r0&&u>0)return null;var c=u*u-l;if(c<0)return null;var h=Math.sqrt(c),d=-u-h;if(d<0&&(d=-u+h),d<=a){var p=i.add(t,i.mul(o,d));return{point:p,normal:i.normalize(i.sub(p,n))}}return null},intersectSegmentAabb:function(t,e,n,r){var o=0,a=Number.MAX_VALUE,s=t,u=i.sub(e,t),l=i.length(u);if(u=l>1e-5?i.div(u,l):i.create(1,0),Math.abs(u.x)<1e-5&&(u.x=2e-5),Math.abs(u.y)<1e-5&&(u.y=2e-5),Math.abs(u.x)>1e-5){var c=(n.x-s.x)/u.x,h=(r.x-s.x)/u.x;if(o=Math.max(o,Math.min(c,h)),a=Math.min(a,Math.max(c,h)),o>a)return null}if(Math.abs(u.y)>1e-5){var d=(n.y-s.y)/u.y,p=(r.y-s.y)/u.y;if(o=Math.max(o,Math.min(d,p)),a=Math.min(a,Math.max(d,p)),o>a)return null}if(o>l)return null;var f=i.add(t,i.mul(u,o)),g=i.add(n,i.mul(i.sub(r,n),.5)),m=i.sub(f,g),v=i.mul(i.sub(n,r),.5);return{point:f,normal:i.normalizeSafe(i.create(parseInt(m.x/Math.abs(v.x)*1.001),parseInt(m.y/Math.abs(v.y)*1.001)),i.create(1,0))}},intersectCircleCircle:function(t,e,n,r){var o=e+r,a=i.sub(n,t),s=i.lengthSqr(a);if(s1e-5?i.div(a,u):i.create(1,0),{dir:a,pen:o-u}}return null},intersectAabbCircle:function(t,e,n,o){if(n.x>=t.x&&n.x<=e.x&&n.y>=t.y&&n.y<=e.y){var a=i.mul(i.sub(e,t),.5),s=i.add(t,a),u=i.sub(n,s),l=Math.abs(u.x)-a.x-o,c=Math.abs(u.y)-a.y-o;return l>c?{dir:i.create(u.x>0?1:-1,0),pen:-l}:{dir:i.create(0,u.y>0?1:-1),pen:-c}}var h=i.create(r.clamp(n.x,t.x,e.x),r.clamp(n.y,t.y,e.y)),d=i.sub(n,h),p=i.lengthSqr(d);if(p1e-4?i.div(d,f):i.create(1,0),pen:o-f}}return null},intersectAabbAabb:function(t,e,n,r){var o=i.mul(i.sub(e,t),.5),a=i.add(t,o),s=i.mul(i.sub(r,n),.5),u=i.add(n,s),l=i.sub(u,a),c=o.x+s.x-Math.abs(l.x);if(c>0){var h=o.y+s.y-Math.abs(l.y);if(h>0)return c>h?{dir:l.x<0?i.create(-1,0):i.create(1,0),pen:c}:{dir:l.y<0?i.create(0,-1):i.create(0,1),pen:h}}return null}};t.exports=o},function(t,e){var n;n=function{return this};try{n=n||Function("return this")||(0,eval)("this")}catch(t){"object"==typeof window&&(n=window)}t.exports=n},function(t,e,n){"use strict";(function(e){function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i{var t=this;this._typeToId={},this._idToType={};var e=function(e,n){f(void 0===t._typeToId[e],"Type "+e+" has already been defined!"),f(n<=255),t._typeToId[e]=n,t._idToType[n]=e},n=0;e("",n++);for(var r in m.items)e(r,n++);for(var i in m.explosions)e(i,n++);for(var o in m.bullets)e(o,n++);for(var a in _.Defs)e(a,n++)}function o(t,e,n){E[t]={serialize:e,deserialize:n}}function a(t,e){if(t.writeUint16(e.__id),t.writeFloat(e.health,0,100,8),t.writeFloat(e.boost,0,100,8),t.writeBits(e.curWeapIdx,3),t.writeType(e.curScope),t.writeBoolean(e.scopedBuilding),t.writeBits(e.action.type,2),e.action.type!=y.None&&(t.writeType(e.action.item),t.writeFloat(e.action.time,0,10,12),t.writeFloat(e.action.duration,0,10,12)),t.writeBoolean(e.inventoryDirty),e.inventoryDirty)for(var n in m.bagSizes)t.writeUint16(e.inventory[n]);if(t.writeBoolean(e.weapsDirty),e.weapsDirty)for(var r=0;r<m.WeaponSlot.Count;r++)t.writeType(e.weapons[r].name),t.writeUint16(e.weapons[r].ammo)}function s(t,e){if(e.playerId=t.readUint16,e.health=t.readFloat(0,100,8),e.boost=t.readFloat(0,100,8),e.curWeapIdx=t.readBits(3),e.curScope=t.readType,e.scopedBuilding=t.readBoolean,e.action={},e.action.type=t.readBits(2),e.action.type!=y.None&&(e.action.item=t.readType,e.action.time=t.readFloat(0,10,12),e.action.duration=t.readFloat(0,10,12)),e.inventory={},e.inventoryDirty=t.readBoolean,e.inventoryDirty)for(var n in m.bagSizes)e.inventory[n]=t.readUint16;if(e.weapsDirty=t.readBoolean,e.weapsDirty){e.weapons=[];for(var r=0;r<m.WeaponSlot.Count;r++){var i={};i.name=t.readType,i.ammo=t.readUint16,e.weapons.push(i)}}}function u(t,e){t.writeFloat32(e.timeLeftWait),t.writeFloat32(e.timeLeftGas)}function l(t,e){e.timeLeftWait=t.readFloat32,e.timeLeftGas=t.readFloat32}function c(t,e){t.writeType(e.type),t.writeVec(e.pos,0,0,1024,1024,16),t.writeBits(e.ori,2),t.writeFloat(e.scale,_.MinScale,_.MaxScale,6)}function h(t,e){e.type=t.readType,e.pos=t.readVec(0,0,1024,1024,16),e.ori=t.readBits(2),e.scale=t.readFloat(_.MinScale,_.MaxScale,6)}var d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},p=function{function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}},f=(n(19),n(5)),g=n(8),m=n(3),v=n(17),y=m.actions,_=n(14),b=n(1),x=n(0);i.prototype={typeToId:function(t){var e=this._typeToId[t];return f(void 0!==e),e},idToType:function(t){return this._idToType[t]}};var w=new i,T=n(46);T.BitStream.prototype.writeBytes=function(t,e,n){f(this._index%8==0),t._view._view.copy(this._view._view,this._index/8,e,e+n),this._index+=8*n},T.BitStream.prototype.writeString=T.BitStream.prototype.writeASCIIString,T.BitStream.prototype.readString=T.BitStream.prototype.readASCIIString,T.BitStream.prototype.writeFloat=function(t,e,n,r){f(r>0&&r<31),f(t>=e&&t<=n,"f out of range: "+t+", "+e+" - "+n);var i=(1<0&&n<31);var r=(1<<n)-1;return t+this.readBits(n)/r*(e-t)},T.BitStream.prototype.writeVec=function(t,e,n,r,i,o){this.writeFloat(t.x,e,r,o),this.writeFloat(t.y,n,i,o)},T.BitStream.prototype.readVec=function(t,e,n,r,i){return x.create(this.readFloat(t,n,i),this.readFloat(e,r,i))};T.BitStream.prototype.writeUnitVec=function(t,e){this.writeVec(t,-1.0001,-1.0001,1.0001,1.0001,e)},T.BitStream.prototype.readUnitVec=function(t){return this.readVec(-1.0001,-1.0001,1.0001,1.0001,t)},T.BitStream.prototype.writeVec32=function(t){this.writeFloat32(t.x),this.writeFloat32(t.y)},T.BitStream.prototype.readVec32=function{return{x:this.readFloat32,y:this.readFloat32}},T.BitStream.prototype.writeType=function(t){this.writeUint8(w.typeToId(t))},T.BitStream.prototype.readType=function{return w.idToType(this.readUint8)};var S=function{function t(n){r(this,t);var i=null;if(n instanceof ArrayBuffer)i=n;else if(n instanceof e){i=new ArrayBuffer(n.length);for(var o=new Uint8Array(i),a=0;a<n.length;a++)o[a]=n[a]}this.valid=null!=i,this.valid?(this.arrayBuf=i,this.stream=new T.BitStream(i)):console.log("Invalid buf type",void 0===n?"undefined":d(n))}return p(t,[{key:"getBuffer",value:function{return this.stream._view._view instanceof e?this.stream._view._view.slice(0,this.stream.byteIndex):new e(this.arrayBuf,0,this.stream.byteIndex)}},{key:"getStream",value:function{return this.stream}},{key:"serializeMsg",value:function(t,e){f(this.stream.index%8==0),this.stream.writeUint8(t),e.serialize(this.stream)}},{key:"serializeMsgStream",value:function(t,e){f(this.stream.index%8==0),f(e.index%8==0),this.stream.writeUint8(t),this.stream.writeBytes(e,0,e.index/8)}},{key:"deserializeMsgType",value:function{return this.stream.length-8*this.stream.byteIndex>=1?this.stream.readUint8:M.None}}]),t},E={};o(v.Type.Player,function(t,e){t.writeVec(e.pos,0,0,1024,1024,16),t.writeUnitVec(e.dir,9),t.writeBoolean(e.dead),t.writeBits(e.anim.type,3),t.writeBits(e.anim.seq,2),t.writeType(e.skin),t.writeType(e.backpack),t.writeType(e.helmet),t.writeType(e.chest),t.writeType(e.weapons[e.curWeapIdx].name)},function(t,e){e.pos=t.readVec(0,0,1024,1024,16),e.dir=t.readUnitVec(9),e.dead=t.readBoolean,e.animType=t.readBits(3),e.animSeq=t.readBits(2),e.skin=t.readType,e.backpack=t.readType,e.helmet=t.readType,e.chest=t.readType,e.curWeapType=t.readType}),o(v.Type.Obstacle,function(t,e){t.writeType(e.type),t.writeVec(e.pos,0,0,1024,1024,16),t.writeBits(e.ori,2),t.writeFloat(e.scale,_.MinScale,_.MaxScale,8),t.writeFloat(e.healthT,0,1,5),t.writeBoolean(e.dead)},function(t,e){e.type=t.readType,e.pos=t.readVec(0,0,1024,1024,16),e.ori=t.readBits(2),e.scale=t.readFloat(_.MinScale,_.MaxScale,8),e.healthT=t.readFloat(0,1,5),e.dead=t.readBoolean}),o(v.Type.Building,function(t,e){t.writeType(e.type),t.writeVec(e.pos,0,0,1024,1024,16),t.writeBits(e.ori,2),t.writeFloat(e.scale,_.MinScale,_.MaxScale,8),t.writeBoolean(e.ceilingDead);t.writeBits(0,5)},function(t,e){e.type=t.readType,e.pos=t.readVec(0,0,1024,1024,16),e.ori=t.readBits(2),e.scale=t.readFloat(_.MinScale,_.MaxScale,8),e.ceilingDead=t.readBoolean;t.readBits(5)}),o(v.Type.LootSpawner,function(t,e){t.writeType(e.type),t.writeVec(e.pos,0,0,1024,1024,16),t.writeFloat(e.scale,0,3,8)},function(t,e){e.type=t.readType,e.pos=t.readVec(0,0,1024,1024,16),e.scale=t.readFloat(0,3,8)}),o(v.Type.Loot,function(t,e){t.writeVec(e.pos,0,0,1024,1024,16),t.writeType(e.name),t.writeUint16(e.count)},function(t,e){e.pos=t.readVec(0,0,1024,1024,16),e.name=t.readType,e.count=t.readUint16}),o(v.Type.DeadBody,function(t,e){t.writeUint16(e.id),t.writeVec(e.pos,0,0,1024,1024,16),t.writeUnitVec(e.hitDir,8)},function(t,e){e.id=t.readUint16,e.pos=t.readVec(0,0,1024,1024,16),e.hitDir=t.readUnitVec(8)}),o(v.Type.Decal,function(t,e){t.writeUint8(e.type),t.writeVec(e.pos,0,0,1024,1024,16),t.writeUint32(e.userData)},function(t,e){e.type=t.readUint8,e.pos=t.readVec(0,0,1024,1024,16),e.userData=e.readUint32});var P=function{function t{r(this,t),this.buf=e.alloc(1048576),this.bsw=new T.BitStream(this.buf),this.offsets=new Uint32Array(v.MAX_ID+1),this.lengths=new Uint32Array(v.MAX_ID+1),this.idMap=new Uint32Array(v.MAX_ID),this.head=0,this.idCount=0,this.gasOffset=0,this.gasLength=0,this.frameCount=0}return p(t,[{key:"getOffset",value:function(t){var e=this.idMap[t];return f(e),this.offsets[e]}},{key:"getLength",value:function(t){var e=this.idMap[t];return f(e),this.lengths[e]}},{key:"update",value:function(t,e){this.bsw.byteIndex=0,u(this.bsw,e.getData),0===this.head&&(this.head=this.bsw.byteIndex,this.gasLength=this.head);for(var n=0;n<t.objects.length;n++){var r=t.objects[n];if(r.__dirty){var i=r.__id,o=r.__type,a=0==this.idMap[i];a&&(++this.idCount,this.idMap[i]=this.idCount,this.offsets[this.idCount]=this.head);var s=this.idMap[i];this.bsw.byteIndex=this.offsets[s],this.bsw.writeUint8(o),this.bsw.writeUint16(i),E[o].serialize(this.bsw,r);var l=this.bsw.byteIndex-this.offsets[s];a?(f(this.bsw.index%8==0,"Object of type "+o+" used partial bytes"),this.head=this.bsw.byteIndex,this.lengths[s]=l):f(l===this.lengths[s],"Cache does not support objects changing length. Object type: "+o)}}++this.frameCount,this.head>this.buf.length/2&&this.frameCount%64==0&&console.warn("SerializedObjectCache used "+Math.floor(this.head/1024)+"k out of "+Math.floor(this.buf.length/1024)+"k. Increase size of this.buf to prevent out of memory errors.")}}]),t},M={None:0,Join:1,Disconnect:2,Move:3,Edit:4,Joined:5,PlayerInfo:6,Update:7,Alive:8,Kill:9,Victory:10,Gas:11,Pickup:12,Map:13,Spectate:14,KeepAlive:15,DropItem:16,Profiler:17},C=function{function t{r(this,t),this.protocol=0,this.name="",this.bot=!1}return p(t,[{key:"serialize",value:function(t){t.writeUint32(this.protocol),t.writeString(this.name,16),t.writeUint8(this.bot)}},{key:"deserialize",value:function(t){this.protocol=t.readUint32,this.name=t.readString(16),this.bot=t.readUint8}}]),t},A=function{function t{r(this,t),this.reason=""}return p(t,[{key:"serialize",value:function(t){t.writeString(this.reason)}},{key:"deserialize",value:function(t){this.reason=t.readString}}]),t},O=function{function t{r(this,t),this.seq=0,this.ack=0,this.moveLeft=!1,this.moveRight=!1,this.moveUp=!1,this.moveDown=!1,this.shootStart=!1,this.shootHold=!1,this.reload=!1,this.interaction=!1,this.equipPrimary=!1,this.equipSecondary=!1,this.equipMelee=!1,this.cancelAction=!1,this.scrollDown=!1,this.scrollUp=!1,this.useItem="",this.useScope="",this.dir=x.create(1,0),this.editMode=!1}return p(t,[{key:"serialize",value:function(t){t.writeUint8(this.seq),t.writeUint8(this.ack),t.writeBoolean(this.moveLeft),t.writeBoolean(this.moveRight),t.writeBoolean(this.moveUp),t.writeBoolean(this.moveDown),t.writeBoolean(this.shootStart),t.writeBoolean(this.shootHold),t.writeBoolean(this.reload),t.writeBoolean(this.interaction),t.writeBoolean(this.equipPrimary),t.writeBoolean(this.equipSecondary),t.writeBoolean(this.equipMelee),t.writeBoolean(this.cancelAction),t.writeBoolean(this.editMode),t.writeBoolean(this.scrollDown),t.writeBoolean(this.scrollUp),t.writeUnitVec(this.dir,9),t.writeType(this.useItem),t.writeType(this.useScope)}},{key:"deserialize",value:function(t){this.seq=t.readUint8,this.ack=t.readUint8,this.moveLeft=t.readBoolean,this.moveRight=t.readBoolean,this.moveUp=t.readBoolean,this.moveDown=t.readBoolean,this.shootStart=t.readBoolean,this.shootHold=t.readBoolean,this.reload=t.readBoolean,this.interaction=t.readBoolean,this.equipPrimary=t.readBoolean,this.equipSecondary=t.readBoolean,this.equipMelee=t.readBoolean,this.cancelAction=t.readBoolean,this.editMode=t.readBoolean,this.scrollDown=t.readBoolean,this.scrollUp=t.readBoolean,this.dir=t.readUnitVec(9),this.useItem=t.readType,this.useScope=t.readType}}]),t},I=function{function t{r(this,t),this.zoom=1,this.cull=!1}return p(t,[{key:"serialize",value:function(t){t.writeBoolean(this.cull),t.writeFloat32(this.zoom)}},{key:"deserialize",value:function(t){this.cull=t.readBoolean,this.zoom=t.readFloat32}}]),t},k=function{function t{r(this,t)}return p(t,[{key:"serialize",value:function(t){}},{key:"deserialize",value:function(t){}}]),t},R=function{function t{r(this,t),this.item="",this.weapIdx=0}return p(t,[{key:"serialize",value:function(t){t.writeType(this.item),t.writeUint8(this.weapIdx)}},{key:"deserialize",value:function(t){this.item=t.readType,this.weapIdx=t.readUint8}}]),t},D=function{function t{r(this,t),this.gameId=0,this.playerId=0,this.time=0,this.map={width:0,height:0},this.started=!1,this.players=[]}return p(t,[{key:"serialize",value:function(t){t.writeUint32(this.gameId),t.writeUint16(this.playerId),t.writeFloat32(this.time),t.writeUint16(this.map.width),t.writeUint16(this.map.height),t.writeUint8(this.started),t.writeUint16(this.players.length);for(var e=0;e<this.players.length;e++){var n=this.players[e];t.writeUint16(n.id),t.writeString(n.name)}}},{key:"deserialize",value:function(t){this.gameId=t.readUint32,this.playerId=t.readUint16,this.time=t.readFloat32,this.map.width=t.readUint16,this.map.height=t.readUint16,this.started=t.readUint8;for(var e=t.readUint16,n=0;n<e;n++){var r={id:t.readUint16,name:t.readString};this.players.push(r)}}}]),t},L=function{function t{r(this,t),this.id=0,this.name=""}return p(t,[{key:"serialize",value:function(t){t.writeUint16(this.id),t.writeString(this.name)}},{key:"deserialize",value:function(t){this.id=t.readUint16,this.name=t.readString}}]),t},j=function{function t{r(this,t),this.mapObjects=[]}return p(t,[{key:"serialize",value:function(t){t.writeUint16(this.mapObjects.length);for(var e=0;e<this.mapObjects.length;e++){c(t,this.mapObjects[e])}}},{key:"deserialize",value:function(t){for(var e=t.readUint16,n=0;n<e;n++){var r={};h(t,r),this.mapObjects.push(r)}}}]),t},B=function{function t{r(this,t),this.delObjIds=[],this.objects={},this.gasData={},this.activePlayerData={},this.bullets=[],this.shots=[],this.explosions=[],this.seq=0,this.ack=0}return p(t,[{key:"setSerializeState",value:function(t,e,n,r,i,o,a){this.serializedObjectCache=t,this.clientPlayer=e,this.activePlayer=n,this.grid=r,this.newBullets=i,this.newShots=o,this.newExplosions=a}},{key:"serialize",value:function(t){for(var e=this.activePlayer.getCameraZoom,n=(e+.5)*m.visualGridScale,r=g.circleToAabb(this.activePlayer.pos,n),i=this.clientPlayer.seenObjHistory,o=this.grid.intersectAabb(r),s=new Uint32Array(o.length),u=0;u>1,y=s[p]>>1,_=1&s[p];v>1);for(p>1);this.clientPlayer.seenObjHistory=s,t.writeUint16(c.length);for(var b=0;b<c.length;b++)t.writeUint16(c[b]);t.writeUint16(h.length);for(var w=this.serializedObjectCache.bsw,T=0;T255&&(console.error("Too many new bullets created!",A.length),A=A.slice(0,255)),t.writeUint8(A.length);for(var k=0;k255&&(console.error("Too many new shots created!",D.length),D=D.slice(0,255)),t.writeUint8(D.length);for(var B=0;B<D.length;B++){var N=D[B];t.writeUint16(N.playerId),t.writeType(N.weapon)}for(var F=[],U=0;U<this.newExplosions.length;U++){var W=this.newExplosions[U],H=W.rad+M;x.lengthSqr(x.sub(W.pos,P))<H*H&&F.length<255&&F.push(W)}F.length>255&&(console.error("Too many new explosions created!",F.length),F=F.slice(0,255)),t.writeUint8(F.length);for(var z=0;z<F.length;z++){var X=F[z];t.writeVec(X.pos,0,0,1024,1024,16),t.writeType(X.type)}t.writeUint8(this.clientPlayer.seq),t.writeUint8(this.clientPlayer.ack),f(t.index%8==0,"Used partial bytes")}},{key:"deserialize",value:function(t){for(var e=t.readUint16,n=0;n<e;n++)this.delObjIds.push(t.readUint16);for(var r=t.readUint16,i=0;i<r;i++){var o=t.readUint8,a={};a.__type=o,a.__id=t.readUint16,E[o].deserialize(t,a),this.objects[o]=this.objects[o]||[],this.objects[o].push(a)}var u={};s(t,u),this.activePlayerData=u;var c={};l(t,c),this.gasData=c;for(var h=t.readUint8,d=0;d<h;d++){var p={};p.playerId=t.readUint16,p.bulletType=t.readType,p.pos=t.readVec(0,0,1024,1024,16),p.dir=t.readUnitVec(10),p.varianceT=t.readFloat(0,1,8),p.reflectCount=t.readBits(4),p.reflectObjId=t.readUint16,this.bullets.push(p)}for(var f=t.readUint8,g=0;g<f;g++){var m={};m.playerId=t.readUint16,m.weapon=t.readType,this.shots.push(m)}for(var v=t.readUint8,y=0;y<v;y++){var _={};_.pos=t.readVec(0,0,1024,1024,16),_.type=t.readType,this.explosions.push(_)}this.seq=t.readUint8,this.ack=t.readUint8}}]),t},N=function{function t{r(this,t),this.playersAlive=0}return p(t,[{key:"serialize",value:function(t){t.writeUint8(this.playersAlive)}},{key:"deserialize",value:function(t){this.playersAlive=t.readUint8}}]),t},F={Player:0,Gas:1},U=function{function t{r(this,t),this.type=0,this.killerId=0,this.targetId=0,this.sourceType="",this.killerKills=0,this.targetTimeAlive=0,this.targetKills=0,this.targetRank=0,this.gameOver=!1}return p(t,[{key:"serialize",value:function(t){t.writeUint8(this.type),t.writeUint16(this.killerId),t.writeUint16(this.targetId),t.writeType(this.sourceType),t.writeUint8(this.killerKills),t.writeUint16(this.targetTimeAlive),t.writeUint8(this.targetKills),t.writeUint8(this.targetRank),t.writeUint8(this.gameOver)}},{key:"deserialize",value:function(t){this.type=t.readUint8,this.killerId=t.readUint16,this.targetId=t.readUint16,this.sourceType=t.readType,this.killerKills=t.readUint8,this.targetTimeAlive=t.readUint16,this.targetKills=t.readUint8,this.targetRank=t.readUint8,this.gameOver=t.readUint8}}]),t},W=function{function t{r(this,t),this.timeAlive=0,this.kills=0}return p(t,[{key:"serialize",value:function(t){t.writeUint16(this.timeAlive),t.writeUint8(this.kills)}},{key:"deserialize",value:function(t){this.timeAlive=t.readUint16,this.kills=t.readUint8}}]),t},H={Warning:0,Moving:1},z=function{function t(e){r(this,t),this.type=e||0,this.active=!1,this.timeLeftWait=0,this.startingCenter=0,this.targetCenter=0,this.startingWidth=0,this.targetWidth=0,this.timeThisWait=0,this.timeThisGas=0,this.timeLeftGas=0}return p(t,[{key:"serialize",value:function(t){t.writeUint8(this.type),t.writeUint8(this.active),t.writeVec32(this.startingCenter),t.writeVec32(this.targetCenter),t.writeFloat32(this.startingWidth),t.writeFloat32(this.targetWidth),t.writeFloat32(this.timeThisWait),t.writeFloat32(this.timeLeftWait),t.writeFloat32(this.timeThisGas),t.writeFloat32(this.timeLeftGas)}},{key:"deserialize",value:function(t){this.type=t.readUint8,this.active=t.readUint8,this.startingCenter=t.readVec32,this.targetCenter=t.readVec32,this.startingWidth=t.readFloat32,this.targetWidth=t.readFloat32,this.timeThisWait=t.readFloat32,this.timeLeftWait=t.readFloat32,this.timeThisGas=t.readFloat32,this.timeLeftGas=t.readFloat32}}]),t},X={Full:0,AlreadyOwned:1,AlreadyEquipped:2,BetterItemEquipped:3,Success:4},G=function{function t{r(this,t),this.type=0,this.item=""}return p(t,[{key:"serialize",value:function(t){t.writeUint8(this.type),t.writeType(this.item)}},{key:"deserialize",value:function(t){this.type=t.readUint8,this.item=t.readType}}]),t},q=function{function t{r(this,t)}return p(t,[{key:"serialize",value:function(t){}},{key:"deserialize",value:function(t){}}]),t};t.exports={kNameMaxLen:16,MsgStream:S,SerializedObjectCache:P,Msg:M,JoinMsg:C,PlayerInfoMsg:L,DisconnectMsg:A,MoveMsg:O,EditMsg:I,ProfilerMsg:k,DropItemMsg:R,JoinedMsg:D,UpdateMsg:B,MapMsg:j,AliveMsg:N,KillMsgType:F,KillMsg:U,VictoryMsg:W,GasMsgType:H,GasMsg:z,PickupMsgType:X,PickupMsg:G,SpectateMsg:q}}).call(e,n(18).Buffer)},function(t,e,n){"use strict";function r(t,e){o(void 0!==t),this.creator={type:t},this.ctorCtx=e,this.pool=[],this.activeCount=0}function i(t){this.idToObj={},this.types={}}var o=n(5);r.prototype={alloc:function{for(var t=null,e=0;e<this.pool.length;e++)if(!this.pool[e].active){t=this.pool[e];break}return t||(t=new this.creator.type(this.ctorCtx),this.pool.push(t)),t.active=!0,t.init,this.activeCount++,t},free:function(t){if(t.free,t.active=!1,this.activeCount--,this.pool.length>128&&this.activeCount<this.pool.length/2){for(var e=[],n=0;n<this.pool.length;n++)this.pool[n].active&&e.push(this.pool[n]);this.pool=e}},getPool:function{return this.pool}},i.prototype={registerType:function(t,e){this.types[t]=e},getObjById:function(t){return this.idToObj[t]},updateObj:function(t,e,n){var r=this.getObjById(e),i=!1;void 0===r&&(r=this.types[t].alloc,r.__id=e,r.__type=t,this.idToObj[e]=r,i=!0),r.updateData(n,i)},deleteObj:function(t){var e=this.getObjById(t);void 0===e?console.log("Delete missing obj",t):(this.types[e.__type].free(e),delete this.idToObj[t])}},t.exports={Pool:r,Creator:i}},function(t,e,n){"use strict";function r(t,e){e||(e=window.location.href),t=t.replace(/[\[\]]/g,"\\$&");var n=new RegExp("[?&]"+t+"(=([^&#]*)|&|#|$)"),r=n.exec(e);if(r)return r[2]?decodeURIComponent(r[2].replace(/\+/g," ")):""}function i{var t=window.navigator.userAgent,e=t.indexOf("MSIE "),n=t.indexOf("Trident/");return e>0||n>0}function o(t){var e=document.documentElement;document.fullscreenElement||document.mozFullScreenElement||document.webkitFullscreenElement||document.msFullscreenElement||t?document.exitFullscreen?document.exitFullscreen:document.msExitFullscreen?document.msExitFullscreen:document.mozCancelFullScreen?document.mozCancelFullScreen:document.webkitExitFullscreen&&document.webkitExitFullscreen:e.requestFullscreen?e.requestFullscreen:e.msRequestFullscreen?(e=document.body,e.msRequestFullscreen):e.mozRequestFullScreen?e.mozRequestFullScreen:e.webkitRequestFullscreen&&e.webkitRequestFullscreen}t.exports={getParameterByName:r,detectIE:i,toggleFullScreen:o}},function(t,e,n){"use strict";var r=(n(5),n(8)),i=(n(1),n(0)),o={Type:{Circle:0,Aabb:1},Height:{Low:0,Height:1},createCircle:function(t,e){return{type:o.Type.Circle,pos:i.copy(t),rad:e}},createAabb:function(t,e){return{type:o.Type.Aabb,min:i.copy(t),max:i.copy(e)}},createAabbExtents:function(t,e){var n=i.sub(t,e),r=i.add(t,e);return o.createAabb(n,r)},toAabb:function(t){if(t.type==o.Type.Aabb)return o.createAabb(t.min,t.max);var e=r.circleToAabb(t.pos,t.rad);return o.createAabb(e.min,e.max)},toCircle:function(t){if(t.type==o.Type.Aabb){var e=r.aabbToCircle(t.min,t.max);return o.createCircle(e.pos,e.rad)}return o.createCircle(t.pos,t.rad)},copy:function(t){return t.type==o.Type.Circle?o.createCircle(t.pos,t.rad):o.createAabb(t.min,t.max)},transform:function(t,e,n,r){if(t.type==o.Type.Aabb){for(var a=i.mul(i.sub(t.max,t.min),.5),s=i.add(t.min,a),u=[i.create(s.x-a.x,s.y-a.y),i.create(s.x-a.x,s.y+a.y),i.create(s.x+a.x,s.y-a.y),i.create(s.x+a.x,s.y+a.y)],l=i.create(Number.MAX_VALUE,Number.MAX_VALUE),c=i.create(-Number.MAX_VALUE,-Number.MAX_VALUE),h=0;h<u.length;h++){var d=i.add(i.rotate(i.mul(u[h],r),n),e);l.x=Math.min(l.x,d.x),l.y=Math.min(l.y,d.y),c.x=Math.max(c.x,d.x),c.y=Math.max(c.y,d.y)}return o.createAabb(l,c)}return o.createCircle(i.add(i.rotate(i.mul(t.pos,r),n),e),t.rad*r)},intersectCircle:function(t,e,n){return t.type==o.Type.Aabb?r.intersectAabbCircle(t.min,t.max,e,n):r.intersectCircleCircle(t.pos,t.rad,e,n)},intersectAabb:function(t,e,n){return t.type==o.Type.Aabb?r.intersectAabbAabb(t.min,t.max,e,n):r.intersectAabbCircle(e,n,t.pos,t.rad)},intersectSegment:function(t,e,n){return t.type==o.Type.Aabb?r.intersectSegmentAabb(e,n,t.min,t.max):r.intersectSegmentCircle(e,n,t.pos,t.rad)},intersect:function(t,e){return e.type==o.Type.Aabb?o.intersectAabb(t,e.min,e.max):o.intersectCircle(t,e.pos,e.rad)}};t.exports=o},function(t,e,n){"use strict";function r(t){return t%4*.5*Math.PI}function i(t,e){for(var n=m[t],r=0;r<n.components.length;r++){var i=n.components[r];if(i.type==e)return i}return null}function o(t){var e=m[t];if("building"==e.type){for(var n=[],i=0;i<e.components.length;i++){var a=e.components[i];n.push(p.toAabb(p.transform(a.collision,a.pos,r(a.ori),a.scale)))}for(var s=0;s<e.mapObjects.length;s++){var u=e.mapObjects[s].type;"function"==typeof u&&(u=u),""!=u&&n.push(p.toAabb(o(u)))}var l=d.boundingAabb(n);return p.createAabb(l.min,l.max)}return e.collision}function a(t){var e=[];for(var n in t)t.hasOwnProperty(n)&&e.push({type:n,weight:t[n]});h(e.length>0);for(var r=0,i=0;i<e.length;i++)r+=e[i].weight;return function{for(var t=f.random(0,r),n=0;t>e[n].weight;)t-=e[n].weight,n++;return e[n].type}}function s(t){return{type:"obstacle",scale:{createMin:1,createMax:1,destroy:1},collision:p.createAabbExtents(g.create(0,0),g.copy(t.extents)),exteriorWall:!0,collidable:!0,destructible:!1,health:300,hitParticle:"barrelChip",explodeParticle:"barrelFrag",reflectBullets:t.reflectBullets,loot:{spawn:!1},map:{display:!1},img:t.img||{},sound:{bullet:"wall_bullet",punch:"wall_bullet",explode:"barrel_break_01",enter:"none"}}}function u(t){return{type:"obstacle",scale:{createMin:1,createMax:1,destroy:1},collision:p.createAabbExtents(g.create(0,0),g.copy(t.extents)),exteriorWall:!0,collidable:!0,destructible:t.destructible||!0,health:t.health||150,hitParticle:t.hitParticle||"woodChip",explodeParticle:t.explodeParticle||"woodPlank",reflectBullets:!1,loot:{spawn:!1},map:{display:!1},img:{sprite:t.imgSprite,scale:.5,alpha:1,tint:16777215,zIdx:10},sound:{bullet:"wall_wood_bullet",punch:"wall_wood_bullet",explode:"wall_break_01",enter:"none"}}}function l(t){return{type:"obstacle",scale:{createMin:1,createMax:1,destroy:.8},collision:p.createCircle(g.create(0,.25),1.18),collidable:!0,destructible:!0,health:150,reflectBullets:!1,hitParticle:"whiteChip",explodeParticle:"toiletFrag",loot:{spawn:!0,chance:1,min:t.lootMin,max:t.lootMax,tier:t.lootTier},map:{display:!1,color:11776947,scale:1},img:{sprite:t.imgSprite,residue:"img/map/map-toilet-res.svg",scale:.5,alpha:1,tint:16777215,zIdx:10},sound:{bullet:"toilet_bullet",punch:"toilet_bullet",explode:"toilet_break_01",enter:"none"}}}function c(t,e,n){return{type:"building",scale:{createMin:1,createMax:1},map:{display:!0,color:e,scale:1},components:[{type:"floor",pos:g.create(0,0),scale:1,ori:0,collision:p.createAabbExtents(g.create(0,2),g.create(3,6)),img:{sprite:"img/map/map-building-container-floor.svg",scale:.5,alpha:1,tint:t,zIdx:0},surface:"container"},{type:"ceiling",pos:g.create(0,0),scale:1,ori:0,collision:p.createAabbExtents(g.create(0,-.5),g.create(3,8.75)),scopeCollision:p.createAabbExtents(g.create(0,2.75),g.create(3,5.75)),img:{sprite:"img/map/"+n,scale:.5,alpha:1,tint:t,zIdx:110},surface:"container"}],mapObjects:[{type:"container_wall_top",pos:g.create(0,7.95),scale:1,ori:0},{type:"container_wall_side",pos:g.create(2.35,2.1),scale:1,ori:0},{type:"container_wall_side",pos:g.create(-2.35,2.1),scale:1,ori:0},{type:a({loot_tier_2:1}),pos:g.create(0,4.05),scale:1,ori:0},{type:a({loot_tier_1:1,"":1}),pos:g.create(0,3.95),scale:1,ori:0}]}}var h=n(5),d=n(8),p=n(13),f=n(4),g=n(0),m={stone_01:{type:"obstacle",scale:{createMin:1,createMax:1.2,destroy:.5},collision:p.createCircle(g.create(0,0),1.6),collidable:!0,destructible:!0,health:250,reflectBullets:!1,hitParticle:"rockChip",explodeParticle:"rockFrag",loot:{spawn:!1},map:{display:!0,color:11776947,scale:1},img:{sprite:"img/map/map-stone-01.svg",residue:"img/map/map-stone-res.svg",scale:.4,alpha:1,tint:16777215,zIdx:10},sound:{bullet:"stone_bullet",punch:"stone_bullet",explode:"stone_break_01",enter:"none"}},barrel_01:{type:"obstacle",name:"a barrel",scale:{createMin:1,createMax:1,destroy:.6},collision:p.createCircle(g.create(0,0),1.75),collidable:!0,destructible:!0,explosion:"explosion_barrel",health:150,hitParticle:"barrelChip",explodeParticle:"barrelFrag",reflectBullets:!0,loot:{spawn:!1},map:{display:!0,color:6447714,scale:1},img:{sprite:"img/map/map-barrel-01.svg",residue:"img/map/map-barrel-res.svg",scale:.4,alpha:1,tint:16777215,zIdx:10},sound:{bullet:"barrel_bullet",punch:"barrel_bullet",explode:"barrel_break_01",enter:"none"}},silo_01:{type:"obstacle",scale:{createMin:1,createMax:1,destroy:1},collision:p.createCircle(g.create(0,0),7.75),collidable:!0,destructible:!1,health:300,hitParticle:"barrelChip",explodeParticle:"barrelFrag",reflectBullets:!0,loot:{spawn:!1},map:{display:!0,color:4079166,scale:1},img:{sprite:"img/map/map-silo-01.svg",scale:.5,alpha:1,tint:16777215,zIdx:50},sound:{bullet:"silo_bullet",punch:"silo_bullet",explode:"barrel_break_01",enter:"none"}},crate_01:{type:"obstacle",scale:{createMin:1,createMax:1,destroy:.5},collision:p.createAabbExtents(g.create(0,0),g.create(2.25,2.25)),collidable:!0,destructible:!0,health:75,hitParticle:"woodChip",explodeParticle:"woodPlank",reflectBullets:!1,loot:{spawn:!0,chance:1,min:1,max:1,tier:"tier_world"},map:{display:!0,color:6697728,scale:.875},img:{sprite:"img/map/map-crate-01.svg",residue:"img/map/map-crate-res.svg",scale:.5,alpha:1,tint:16777215,zIdx:10},sound:{bullet:"wood_crate_bullet",punch:"wood_crate_bullet",explode:"crate_break_02",enter:"none"}},crate_02:{type:"obstacle",scale:{createMin:1,createMax:1,destroy:.5},collision:p.createAabbExtents(g.create(0,0),g.create(2.25,2.25)),collidable:!0,destructible:!0,health:150,hitParticle:"woodChip",explodeParticle:"woodPlank",reflectBullets:!1,loot:{spawn:!0,chance:1,min:3,max:5,tier:"tier_soviet"},map:{display:!1,color:16777215,scale:.875},img:{sprite:"img/map/map-crate-02.svg",residue:"img/map/map-crate-res.svg",scale:.5,alpha:1,tint:16777215,zIdx:10},sound:{bullet:"wood_crate_bullet",punch:"wood_crate_bullet",explode:"crate_break_01",enter:"none"}},crate_04:{type:"obstacle",scale:{createMin:1,createMax:1,destroy:.5},collision:p.createAabbExtents(g.create(0,0),g.create(2.25,2.25)),collidable:!0,destructible:!1,health:150,hitParticle:"greenChip",explodeParticle:"barrelFrag",reflectBullets:!1,loot:{spawn:!1},map:{display:!1,color:16777215,scale:1.75},img:{sprite:"img/map/map-crate-04.svg",scale:.5,alpha:1,tint:16777215,zIdx:10},sound:{bullet:"ammo_crate_bullet",punch:"ammo_crate_bullet",explode:"crate_break_02",enter:"none"}},bush_01:{type:"obstacle",scale:{createMin:1.05,createMax:1.2,destroy:1},collision:p.createCircle(g.create(0,0),1.4),collidable:!1,destructible:!0,health:100,hitParticle:"leaf",explodeParticle:"leaf",reflectBullets:!1,loot:{spawn:!1},map:{display:!0,color:24320,scale:1.5},img:{sprite:"img/map/map-bush-01.svg",residue:"img/map/map-bush-res.svg",scale:.5,alpha:.97,tint:16777215,zIdx:105},sound:{bullet:"bush_bullet",punch:"bush_bullet",explode:"bush_break_01",enter:"bush_enter_01"}},tree_01:{type:"obstacle",scale:{createMin:.8,createMax:1,destroy:.5},collision:p.createCircle(g.create(0,0),1.55),collidable:!0,destructible:!0,health:175,hitParticle:"woodChip",explodeParticle:"woodLog",reflectBullets:!1,loot:{spawn:!1},map:{display:!0,color:4083758,scale:2.5},img:{sprite:"img/map/map-tree-01.svg",residue:"img/map/map-tree-res.svg",scale:.7,alpha:.9,tint:16777215,zIdx:125},sound:{bullet:"tree_bullet",punch:"tree_bullet",explode:"tree_break_01",enter:"none"}},tree_02:{type:"obstacle",scale:{createMin:.8,createMax:1,destroy:.5},collision:p.createCircle(g.create(0,0),4.4),collidable:!0,destructible:!1,health:100,hitParticle:"woodChip",explodeParticle:"woodLog",reflectBullets:!1,loot:{spawn:!1},map:{display:!0,color:4083758,scale:2.25},img:{sprite:"img/map/map-tree-02.svg",residue:"img/map/map-tree-res.svg",scale:1,alpha:.9,tint:16777215,zIdx:130},sound:{bullet:"tree_bullet",punch:"tree_bullet",explode:"tree_break_01",enter:"none"}},toilet_01:l({imgSprite:"img/map/map-toilet-01.svg",lootTier:"tier_toilet",lootMin:2,lootMax:3}),toilet_02:l({imgSprite:"img/map/map-toilet-02.svg",lootTier:"tier_soviet",lootMin:3,lootMax:4}),warehouse_wall_side:s({extents:g.create(25,.6),reflectBullets:!0}),warehouse_wall_edge:s({extents:g.create(.6,3.2),reflectBullets:!0}),warehouse_01:{type:"building",scale:{createMin:1,createMax:1},map:{display:!0,color:5915450,scale:1},components:[{type:"floor",pos:g.create(0,0),scale:1,ori:0,collision:p.createAabbExtents(g.create(0,0),g.create(32,12.5)),img:{sprite:"img/map/map-building-warehouse-floor.svg",scale:.5,alpha:1,tint:16777215,zIdx:0},surface:"warehouse"},{type:"ceiling",pos:g.create(0,0),scale:1,ori:0,collision:p.createAabbExtents(g.create(0,0),g.create(32,12.5)),scopeCollision:p.createAabbExtents(g.create(0,0),g.create(25,12.5)),img:{sprite:"img/map/map-building-warehouse-ceiling.svg",scale:.5,alpha:1,tint:16777215,zIdx:110},surface:"warehouse"}],mapObjects:[{type:"warehouse_wall_side",pos:g.create(0,11.9),scale:1,ori:0},{type:"warehouse_wall_edge",pos:g.create(-24.4,8.2),scale:1,ori:0},{type:"warehouse_wall_edge",pos:g.create(24.4,8.2),scale:1,ori:0},{type:"warehouse_wall_side",pos:g.create(0,-11.9),scale:1,ori:0},{type:"warehouse_wall_edge",pos:g.create(-24.4,-8.2),scale:1,ori:0},{type:"warehouse_wall_edge",pos:g.create(24.4,-8.2),scale:1,ori:0},{type:"crate_01",pos:g.create(-21.25,8.75),scale:1,ori:0,inheritOri:!1},{type:"crate_04",pos:g.create(-16.25,8.75),scale:1,ori:1},{type:"crate_01",pos:g.create(-21.25,-8.75),scale:1,ori:0,inheritOri:!1},{type:"barrel_01",pos:g.create(-16.5,-8.75),scale:.9,ori:0},{type:"crate_01",pos:g.create(21.25,8.75),scale:1,ori:0,inheritOri:!1},{type:"barrel_01",pos:g.create(16.5,8.75),scale:.9,ori:0},{type:"crate_04",pos:g.create(16.25,-8.75),scale:1,ori:1},{type:"crate_01",pos:g.create(21.25,-8.75),scale:1,ori:0,inheritOri:!1},{type:a({crate_02:1,crate_01:2}),pos:g.create(0,0),scale:1,ori:0,inheritOri:!1},{type:"crate_01",pos:g.create(5,0),scale:1,ori:0,inheritOri:!1},{type:"crate_01",pos:g.create(-5,0),scale:1,ori:0,inheritOri:!1},{type:"crate_04",pos:g.create(0,5),scale:1,ori:0},{type:"crate_04",pos:g.create(0,-5),scale:1,ori:0}]},shack_wall_top:u({extents:g.create(5.6,.35),imgSprite:"img/map/map-wall-shack-top.svg"}),shack_wall_side_left:u({extents:g.create(.35,3.43),imgSprite:"img/map/map-wall-shack-left.svg"}),shack_wall_side_right:u({extents:g.create(.35,3.8),imgSprite:"img/map/map-wall-shack-right.svg"}),shack_wall_bot:u({extents:g.create(3.7,.35),imgSprite:"img/map/map-wall-shack-bot.svg"}),shack_01:{type:"building",scale:{createMin:1,createMax:1},map:{display:!0,color:6707790,scale:1},components:[{type:"floor",pos:g.create(0,0),scale:1,ori:0,collision:p.createAabbExtents(g.create(2,-.8),g.create(7.95,5.5)),img:{sprite:"img/map/map-building-shack-floor.svg",residue:"img/map/map-shack-res.svg",scale:.5,alpha:1,tint:16777215,zIdx:0},surface:"grass"},{type:"ceiling",pos:g.create(0,0),scale:1,ori:0,collision:p.createAabbExtents(g.create(0,-.8),g.create(5.95,5.5)),scopeCollision:p.createAabbExtents(g.create(0,.9),g.create(5.95,3.7)),img:{sprite:"img/map/map-building-shack-ceiling.svg",scale:.5,alpha:1,tint:16777215,zIdx:110},explodeParticle:"shackFrag",numParticles:25,surface:"shack"}],mapObjects:[{type:"shack_wall_bot",pos:g.create(-1.48,-2.4),scale:1,ori:0},{type:"shack_wall_side_left",pos:g.create(-5.55,.69),scale:1,ori:0},{type:"shack_wall_top",pos:g.create(-.3,4.33),scale:1,ori:0},{type:"shack_wall_side_right",pos:g.create(5.55,.95),scale:1,ori:0},{type:"crate_01",pos:g.create(7.9,2.85),scale:.8,ori:0,inheritOri:!1},{type:"barrel_01",pos:g.create(7.45,-.9),scale:.85,ori:0},{type:a({loot_tier_2:1}),pos:g.create(-2,.8),scale:1,ori:0},{type:a({loot_tier_1:1,"":1}),pos:g.create(2,.8),scale:1,ori:0}]},outhouse_wall_top:u({extents:g.create(3.2,.35),imgSprite:"img/map/map-wall-outhouse-top.svg",hitParticle:"outhouseChip",explodeParticle:"outhousePlank",health:100}),outhouse_wall_side:u({extents:g.create(.35,3.1),imgSprite:"img/map/map-wall-outhouse-side.svg",hitParticle:"outhouseChip",explodeParticle:"outhousePlank",health:100}),outhouse_wall_bot:u({extents:g.create(1.15,.35),imgSprite:"img/map/map-wall-outhouse-bot.svg",hitParticle:"outhouseChip",explodeParticle:"outhousePlank",health:100}),outhouse_01:{type:"building",scale:{createMin:1,createMax:1},map:{display:!0,color:8145976,scale:1},components:[{type:"floor",pos:g.create(0,0),scale:1,ori:0,collision:p.createAabbExtents(g.create(0,0),g.create(3.8,5)),img:{sprite:"img/map/map-building-outhouse-floor.svg",residue:"img/map/map-outhouse-res.svg",scale:.5,alpha:1,tint:16777215,zIdx:0},surface:"grass"},{type:"ceiling",pos:g.create(0,0),scale:1,ori:0,collision:p.createAabbExtents(g.create(0,0),g.create(3.8,5)),scopeCollision:p.createAabbExtents(g.create(0,1.4),g.create(3.8,3.4)),img:{sprite:"img/map/map-building-outhouse-ceiling.svg",scale:.5,alpha:1,tint:16777215,zIdx:110},explodeParticle:"outhouseFrag",numParticles:15,surface:"shack"}],mapObjects:[{type:"outhouse_wall_top",pos:g.create(0,4.5),scale:1,ori:0},{type:"outhouse_wall_side",pos:g.create(3.4,1.78),scale:1,ori:0},{type:"outhouse_wall_side",pos:g.create(-3.4,1.78),scale:1,ori:0},{type:"outhouse_wall_bot",pos:g.create(-2.65,-1.5),scale:1,ori:0},{type:"outhouse_wall_bot",pos:g.create(2.65,-1.5),scale:1,ori:0},{type:a({toilet_01:4,toilet_02:1}),pos:g.create(0,2),scale:1,ori:0,inheritOri:!0}]},house_small_01:{type:"building",scale:{createMin:1,createMax:1},map:{display:!0,color:15181056,scale:1},components:[{type:"floor",pos:g.create(0,0),scale:1,ori:0,collision:p.createAabbExtents(g.create(0,0),g.create(15,10)),img:{sprite:"img/map/map-building-house-small-floor.svg",scale:.5,alpha:1,tint:16777215,zIdx:0},surface:"house"},{type:"ceiling",pos:g.create(0,0),scale:1,ori:0,collision:p.createAabbExtents(g.create(0,0),g.create(15,10)),scopeCollision:p.createAabbExtents(g.create(0,0),g.create(15,10)),img:{sprite:"img/map/map-building-house-small-ceiling.svg",scale:.5,alpha:1,tint:16777215,zIdx:110},surface:"house"}],mapObjects:[]},container_wall_top:s({extents:g.create(2.75,.4),reflectBullets:!0}),container_wall_side:s({extents:g.create(.4,5.5),reflectBullets:!0}),container_wall_side_open:s({extents:g.create(.4,6),reflectBullets:!0}),container_01:c(3560807,3560807,"map-building-container-ceiling-01.svg"),container_02:c(3560807,3560807,"map-building-container-ceiling-02.svg"),container_03:c(3560807,3560807,"map-building-container-ceiling-03.svg"),container_04:function(t,e,n){return{type:"building",scale:{createMin:1,createMax:1},map:{display:!0,color:e,scale:1},components:[{type:"floor",pos:g.create(0,0),scale:1,ori:0,collision:p.createAabbExtents(g.create(0,0),g.create(3,11)),img:{sprite:"img/map/map-building-container-open-floor.svg",scale:.5,alpha:1,tint:t,zIdx:0},surface:"container"},{type:"ceiling",pos:g.create(0,0),scale:1,ori:0,collision:p.createAabbExtents(g.create(0,0),g.create(3,11)),scopeCollision:p.createAabbExtents(g.create(0,0),g.create(3,5.75)),img:{sprite:"img/map/"+n,scale:.5,alpha:1,tint:t,zIdx:110},surface:"container"}],mapObjects:[{type:"container_wall_side_open",pos:g.create(2.35,0),scale:1,ori:0},{type:"container_wall_side_open",pos:g.create(-2.35,0),scale:1,ori:0},{type:a({loot_tier_2:1}),pos:g.create(0,-.05),scale:1,ori:0},{type:a({loot_tier_1:1,"":1}),pos:g.create(0,.05),scale:1,ori:0}]}}(3560807,3560807,"map-building-container-open-ceiling-01.svg"),loot_tier_1:{type:"loot_spawner",collision:p.createCircle(g.create(0,0),3),tier:"tier_world",img:{alpha:.25,tint:16776960,zIdx:0}},loot_tier_2:{type:"loot_spawner",collision:p.createCircle(g.create(0,0),3),tier:"tier_container",img:{alpha:.25,tint:16776960,zIdx:0}}},v={stone_01:354,barrel_01:75,silo_01:10,crate_01:80,crate_02:4,bush_01:88,tree_01:312,tree_02:0,container_01:6,container_02:6,container_03:6,container_04:6,warehouse_01:4,shack_01:10,outhouse_01:5,loot_tier_1:41};t.exports={Defs:m,Spawns:v,MinScale:.125,MaxScale:2.5,oriToRad:r,getComponentByType:i,getBoundingCollider:o}},function(t,e,n){"use strict";function r(t){var e=this;this.keys={},this.keysOld={},this.shiftKey=!1,this.mousePos={x:0,y:0},this.mousePosOld={x:0,y:0},this.mouseButton=!1,this.mouseButtonOld=!1,this.mouseClicks=0,this.rightMouseButton=!1,this.rightMouseButtonOld=!1,this.mouseWheelState=0,this.elem=t,this.bOnWindowFocus=function(t){e.onWindowFocus(t)},this.bOnKeyDown=function(t){e.onKeyDown(t)},this.bOnKeyUp=function(t){e.onKeyUp(t)},this.bOnMouseMove=function(t){e.onMouseMove(t)},this.bOnMouseDown=function(t){e.onMouseDown(t)},this.bOnMouseUp=function(t){e.onMouseUp(t)},this.bOnMouseWheel=function(t){e.onMouseWheel(t)},window.addEventListener("focus",this.bOnWindowFocus,!1),window.addEventListener("keydown",this.bOnKeyDown,!1),window.addEventListener("keyup",this.bOnKeyUp,!1),window.addEventListener("mousemove",this.bOnMouseMove,!1),this.elem.addEventListener("mousedown",this.bOnMouseDown,!1),this.elem.addEventListener("mouseup",this.bOnMouseUp,!1),this.elem.addEventListener("mousewheel",this.bOnMouseWheel,!1)}var i=Object.freeze({Enter:13,Escape:27,Space:32,Left:37,Up:38,Right:39,Down:40,A:65,D:68,S:83,W:87,R:82,F:70,X:88,M:77,G:71,E:69,P:80,V:86,One:49,Two:50,Three:51,Four:52,Zero:48,Plus:187,Minus:189,Tilde:192});r.prototype={free:function{window.removeEventListener("focus",this.bOnWindowFocus),window.removeEventListener("keydown",this.bOnKeyDown),window.removeEventListener("keyup",this.bOnKeyUp),window.removeEventListener("mousemove",this.bOnMouseMove),this.elem.removeEventListener("mousedown",this.bOnMouseDown),this.elem.removeEventListener("mouseup",this.bOnMouseUp),this.elem.removeEventListener("mousewheel",this.bOnMouseWheel)},onWindowFocus:function{this.keys={},this.keysOld={},this.mouseButton=!1,this.shiftKey=!1},flush:function{this.keysOld=Object.assign({},this.keys),this.mouseButtonOld=this.mouseButton,this.rightMouseButtonOld=this.rightMouseButton,this.mouseClicks=0,this.mouseWheelState=0},onKeyDown:function(t){this.keys[t.keyCode]=!0,this.shiftKey=t.shiftKey},onKeyUp:function(t){delete this.keys[t.keyCode],this.shiftKey=t.shiftKey},keyDown:function(t){return void 0!==this.keys[t]},keyPressed:function(t){return void 0===this.keysOld[t]&&this.keyDown(t)},keyReleased:function(t){return this.keysOld[t]&&!this.keyDown(t)},onMouseMove:function(t){this.mousePosOld=Object.assign({},this.mousePos),this.mousePos.x=t.clientX,this.mousePos.y=t.clientY},onMouseDown:function(t){this.mouseButton=0===t.button,this.rightMouseButton=2===t.button,this.mouseClicks+=1},onMouseUp:function(t){this.mouseButton=0!==t.button&&this.mouseButton,this.rightMouseButton=2!==t.button&&this.rightMouseButton},onMouseWheel:function(t){var e=window.event||e,n=Math.max(-1,Math.min(1,e.wheelDelta||-e.detail));this.mouseWheelState=n},flushMouse:function{this.mouseButton=!1},mouseDown:function{return this.mouseButton},mousePressed:function{return!this.mouseButtonOld&&this.mouseButton},mouseReleased:function{return this.mouseButtonOld&&!this.mouseButton},rightMousePressed:function{return!this.rightMouseButtonOld&&this.rightMouseButton},mouseWheel:function{return this.mouseWheelState},resetMouseWheel:function{this.mouseWheelState=0}},t.exports={InputHandler:r,Key:i}},function(t,e,n){"use strict";function r(t,e,n,r,i){var u=o.items[t],l=a.rotate(r,e),c=a.mul(l,9.5);c=a.rotate(c,(Math.random-.5)*Math.PI/3);var h=a.add(n,a.mul(r,o.player.radius+.5*u.lengthMult));i.addParticle(s.Defs[u.ammo],h,c,u.particle.shellScale,Math.atan2(-l.y,l.x))}function i(t,e,n){this.audioManager=e,this.uiManager=n,this.particleBarn=t,this.shots=[]}var o=(n(2),n(3)),a=(n(1),n(0)),s=n(7);i.prototype={free:function{},addShot:function(t,e,n){for(var r=null,i=0;i<this.shots.length;i++)if(this.shots[i].finished){this.shots[i]=t,r=this.shots[i];break}r||(r=t,this.shots.push(r));var a=o.items[r.weapon];if(r.finished=!1,r.delay=a.pullDelay?.45*a.pullDelay:0,this.audioManager.playSound(a.sound.shoot,{channel:e.__id==n.__id?"activePlayer":"otherPlayers",soundPos:e.pos}),e.__id==n.__id&&"single"==a.fireMode&&"single"==a.reloadMode){var s=n.localData.weapons[n.localData.curWeapIdx].ammo,u=s>0?a.sound.cycle:a.sound.pull;this.audioManager.localActionSoundInstance=this.audioManager.playSound(u)}},update:function(t,e){for(var n=0;n<this.shots.length;n++){var i=this.shots[n];if(!i.finished&&(i.delay-=t,i.delay<=0)){i.finished=!0;var a=e.getPlayerById(i.playerId);if(!a||a.netData.dead)continue;if(a.netData.curWeapType!=i.weapon)continue;"shoot"==o.items[i.weapon].caseTiming&&r(i.weapon,Math.PI/2*-1,a.pos,a.dir,this.particleBarn)}}}},t.exports={createCasingParticle:r,ShotBarn:i}},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var i=function{function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}},o=n(5),a={Player:0,Obstacle:1,Loot:2,LootSpawner:3,DeadBody:4,Building:5,Decal:6},s=function{function t{r(this,t),this.idNext=1,this.freeLists={}}return i(t,[{key:"allocId",value:function(t){var e=1;if(this.idNext<65535)e=this.idNext++;else{var n=this.freeLists[t]||[];n.length>0?e=n.pop:o(!1)}return e}},{key:"freeId",value:function(t,e){(this.freeLists[t]||[]).push(e)}},{key:"register",value:function(t,e){t.__id=this.allocId(e),t.__type=e,t.__dirty=!0}},{key:"unregister",value:function(t){o(void 0!==t.__id),this.freeId(t.__type,t.__id),delete t.__id,delete t.__type,delete t.__dirty}}]),t};t.exports={MAX_ID:65535,Type:a,Registrar:s}},function(t,e,n){"use strict";(function(t){function r{return o.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function i(t,e){if(r<e)throw new RangeError("Invalid typed array length");return o.TYPED_ARRAY_SUPPORT?(t=new Uint8Array(e),t.__proto__=o.prototype):(null===t&&(t=new o(e)),t.length=e),t}function o(t,e,n){if(!(o.TYPED_ARRAY_SUPPORT||this instanceof o))return new o(t,e,n);if("number"==typeof t){if("string"==typeof e)throw new Error("If encoding is specified then the first argument must be a string");return l(this,t)}return a(this,t,e,n)}function a(t,e,n,r){if("number"==typeof e)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&e instanceof ArrayBuffer?d(t,e,n,r):"string"==typeof e?c(t,e,n):p(t,e)}function s(t){if("number"!=typeof t)throw new TypeError('"size" argument must be a number');if(t<0)throw new RangeError('"size" argument must not be negative')}function u(t,e,n,r){return s(e),e<=0?i(t,e):void 0!==n?"string"==typeof r?i(t,e).fill(n,r):i(t,e).fill(n):i(t,e)}function l(t,e){if(s(e),t=i(t,e<0?0:0|f(e)),!o.TYPED_ARRAY_SUPPORT)for(var n=0;n<e;++n)t[n]=0;return t}function c(t,e,n){if("string"==typeof n&&""!==n||(n="utf8"),!o.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');var r=0|m(e,n);t=i(t,r);var a=t.write(e,n);return a!==r&&(t=t.slice(0,a)),t}function h(t,e){var n=e.length<0?0:0|f(e.length);t=i(t,n);for(var r=0;r<n;r+=1)t[r]=255&e[r];return t}function d(t,e,n,r){if(e.byteLength,n<0||e.byteLength<n)throw new RangeError("'offset' is out of bounds");if(e.byteLength<n+(r||0))throw new RangeError("'length' is out of bounds");return e=void 0===n&&void 0===r?new Uint8Array(e):void 0===r?new Uint8Array(e,n):new Uint8Array(e,n,r),o.TYPED_ARRAY_SUPPORT?(t=e,t.__proto__=o.prototype):t=h(t,e),t}function p(t,e){if(o.isBuffer(e)){var n=0|f(e.length);return t=i(t,n),0===t.length?t:(e.copy(t,0,0,n),t)}if(e){if("undefined"!=typeof ArrayBuffer&&e.buffer instanceof ArrayBuffer||"length"in e)return"number"!=typeof e.length||K(e.length)?i(t,0):h(t,e);if("Buffer"===e.type&&Z(e.data))return h(t,e.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function f(t){if(t>=r)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+r.toString(16)+" bytes");return 0|t}function g(t){return+t!=t&&(t=0),o.alloc(+t)}function m(t,e){if(o.isBuffer(t))return t.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!=typeof t&&(t=""+t);var n=t.length;if(0===n)return 0;for(var r=!1;;)switch(e){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return X(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return V(t).length;default:if(r)return X(t).length;e=(""+e).toLowerCase,r=!0}}function v(t,e,n){var r=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if(n>>>=0,e>>>=0,n<=e)return"";for(t||(t="utf8");;)switch(t){case"hex":return k(this,e,n);case"utf8":case"utf-8":return C(this,e,n);case"ascii":return O(this,e,n);case"latin1":case"binary":return I(this,e,n);case"base64":return M(this,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return R(this,e,n);default:if(r)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase,r=!0}}function y(t,e,n){var r=t[e];t[e]=t[n],t[n]=r}function _(t,e,n,r,i){if(0===t.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=i?0:t.length-1),n<0&&(n=t.length+n),n>=t.length){if(i)return-1;n=t.length-1}else if(n<0){if(!i)return-1;n=0}if("string"==typeof e&&(e=o.from(e,r)),o.isBuffer(e))return 0===e.length?-1:b(t,e,n,r,i);if("number"==typeof e)return e&=255,o.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,e,n):Uint8Array.prototype.lastIndexOf.call(t,e,n):b(t,[e],n,r,i);throw new TypeError("val must be string, number or Buffer")}function b(t,e,n,r,i){function o(t,e){return 1===a?t[e]:t.readUInt16BE(e*a)}var a=1,s=t.length,u=e.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase)||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(t.length<2||e.length<2)return-1;a=2,s/=2,u/=2,n/=2}var l;if(i){var c=-1;for(l=n;l<s;l++)if(o(t,l)===o(e,-1===c?0:l-c)){if(-1===c&&(c=l),l-c+1===u)return c*a}else-1!==c&&(l-=l-c),c=-1}else for(n+u>s&&(n=s-u),l=n;l>=0;l--){for(var h=!0,d=0;d<u;d++)if(o(t,l+d)!==o(e,d)){h=!1;break}if(h)return l}return-1}function x(t,e,n,r){n=Number(n)||0;var i=t.length-n;r?(r=Number(r))>i&&(r=i):r=i;var o=e.length;if(o%2!=0)throw new TypeError("Invalid hex string");r>o/2&&(r=o/2);for(var a=0;a<r;++a){var s=parseInt(e.substr(2*a,2),16);if(isNaN(s))return a;t[n+a]=s}return a}function w(t,e,n,r){return Y(X(e,t.length-n),t,n,r)}function T(t,e,n,r){return Y(G(e),t,n,r)}function S(t,e,n,r){return T(t,e,n,r)}function E(t,e,n,r){return Y(V(e),t,n,r)}function P(t,e,n,r){return Y(q(e,t.length-n),t,n,r)}function M(t,e,n){return 0===e&&n===t.length?$.fromByteArray(t):$.fromByteArray(t.slice(e,n))}function C(t,e,n){n=Math.min(t.length,n);for(var r=[],i=e;i<n;){var o=t[i],a=null,s=o>239?4:o>223?3:o>191?2:1;if(i+s<=n){var u,l,c,h;switch(s){case 1:o<128&&(a=o);break;case 2:u=t[i+1],128==(192&u)&&(h=(31&o)<<6|63&u)>127&&(a=h);break;case 3:u=t[i+1],l=t[i+2],128==(192&u)&&128==(192&l)&&(h=(15&o)<<12|(63&u)<<6|63&l)>2047&&(h<55296||h>57343)&&(a=h);break;case 4:u=t[i+1],l=t[i+2],c=t[i+3],128==(192&u)&&128==(192&l)&&128==(192&c)&&(h=(15&o)<<18|(63&u)<<12|(63&l)<<6|63&c)>65535&&h<1114112&&(a=h)}}null===a?(a=65533,s=1):a>65535&&(a-=65536,r.push(a>>>10&1023|55296),a=56320|1023&a),r.push(a),i+=s}return A(r)}function A(t){var e=t.length;if(e<=Q)return String.fromCharCode.apply(String,t);for(var n="",r=0;r<e;)n+=String.fromCharCode.apply(String,t.slice(r,r+=Q));return n}function O(t,e,n){var r="";n=Math.min(t.length,n);for(var i=e;i<n;++i)r+=String.fromCharCode(127&t[i]);return r}function I(t,e,n){var r="";n=Math.min(t.length,n);for(var i=e;i<n;++i)r+=String.fromCharCode(t[i]);return r}function k(t,e,n){var r=t.length;(!e||e<0)&&(e=0),(!n||n<0||n>r)&&(n=r);for(var i="",o=e;o<n;++o)i+=z(t[o]);return i}function R(t,e,n){for(var r=t.slice(e,n),i="",o=0;o<r.length;o+=2)i+=String.fromCharCode(r[o]+256*r[o+1]);return i}function D(t,e,n){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(t+e>n)throw new RangeError("Trying to access beyond buffer length")}function L(t,e,n,r,i,a){if(!o.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>i||e<a)throw new RangeError('"value" argument is out of bounds');if(n+r>t.length)throw new RangeError("Index out of range")}function j(t,e,n,r){e<0&&(e=65535+e+1);for(var i=0,o=Math.min(t.length-n,2);i<o;++i)t[n+i]=(e&255<<8*(r?i:1-i))>>>8*(r?i:1-i)}function B(t,e,n,r){e<0&&(e=4294967295+e+1);for(var i=0,o=Math.min(t.length-n,4);i<o;++i)t[n+i]=e>>>8*(r?i:3-i)&255}function N(t,e,n,r,i,o){if(n+r>t.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function F(t,e,n,r,i){return i||N(t,e,n,4,3.4028234663852886e38,-3.4028234663852886e38),J.write(t,e,n,r,23,4),n+4}function U(t,e,n,r,i){return i||N(t,e,n,8,1.7976931348623157e308,-1.7976931348623157e308),J.write(t,e,n,r,52,8),n+8}function W(t){if(t=H(t).replace(tt,""),t.length<2)return"";for(t.length%4!=0;)t+="=";return t}function H(t){return t.trim?t.trim:t.replace(/^\s+|\s+$/g,"")}function z(t){return t<16?"0"+t.toString(16):t.toString(16)}function X(t,e){e=e||1/0;for(var n,r=t.length,i=null,o=[],a=0;a<r;++a){if((n=t.charCodeAt(a))>55295&&n<57344){if(!i){if(n>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(a+1===r){(e-=3)>-1&&o.push(239,191,189);continue}i=n;continue}if(n<56320){(e-=3)>-1&&o.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(e-=3)>-1&&o.push(239,191,189);if(i=null,n<128){if((e-=1)<0)break;o.push(n)}else if(n<2048){if((e-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(n<65536){if((e-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function G(t){for(var e=[],n=0;n<t.length;++n)e.push(255&t.charCodeAt(n));return e}function q(t,e){for(var n,r,i,o=[],a=0;a<t.length&&!((e-=2)<0);++a)n=t.charCodeAt(a),r=n>>8,i=n%256,o.push(i),o.push(r);return o}function V(t){return $.toByteArray(W(t))}function Y(t,e,n,r){for(var i=0;i<r&&!(i+n>=e.length||i>=t.length);++i)e[i+n]=t[i];return i}function K(t){return t!==t}/*! var $=n(49),J=n(51),Z=n(54);e.Buffer=o,e.SlowBuffer=g,e.INSPECT_MAX_BYTES=50,o.TYPED_ARRAY_SUPPORT=void 0!==t.TYPED_ARRAY_SUPPORT?t.TYPED_ARRAY_SUPPORT:function{try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function{return 42}},42===t.foo&&"function"==typeof t.subarray&&0===t.subarray(1,1).byteLength}catch(t){return!1}},e.kMaxLength=r,o.poolSize=8192,o._augment=function(t){return t.__proto__=o.prototype,t},o.from=function(t,e,n){return a(null,t,e,n)},o.TYPED_ARRAY_SUPPORT&&(o.prototype.__proto__=Uint8Array.prototype,o.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&o[Symbol.species]===o&&Object.defineProperty(o,Symbol.species,{value:null,configurable:!0})),o.alloc=function(t,e,n){return u(null,t,e,n)},o.allocUnsafe=function(t){return l(null,t)},o.allocUnsafeSlow=function(t){return l(null,t)},o.isBuffer=function(t){return!(null==t||!t._isBuffer)},o.compare=function(t,e){if(!o.isBuffer(t)||!o.isBuffer(e))throw new TypeError("Arguments must be Buffers");if(t===e)return 0;for(var n=t.length,r=e.length,i=0,a=Math.min(n,r);i<a;++i)if(t[i]!==e[i]){n=t[i],r=e[i];break}return n<r?-1:r<n?1:0},o.isEncoding=function(t){switch(String(t).toLowerCase){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},o.concat=function(t,e){if(!Z(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return o.alloc(0);var n;if(void 0===e)for(e=0,n=0;n<t.length;++n)e+=t[n].length;var r=o.allocUnsafe(e),i=0;for(n=0;n<t.length;++n){var a=t[n];if(!o.isBuffer(a))throw new TypeError('"list" argument must be an Array of Buffers');a.copy(r,i),i+=a.length}return r},o.byteLength=m,o.prototype._isBuffer=!0,o.prototype.swap16=function{var t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e<t;e+=2)y(this,e,e+1);return this},o.prototype.swap32=function{var t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;e<t;e+=4)y(this,e,e+3),y(this,e+1,e+2);return this},o.prototype.swap64=function{var t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;e<t;e+=8)y(this,e,e+7),y(this,e+1,e+6),y(this,e+2,e+5),y(this,e+3,e+4);return this},o.prototype.toString=function{var t=0|this.length;return 0===t?"":0===arguments.length?C(this,0,t):v.apply(this,arguments)},o.prototype.equals=function(t){if(!o.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===o.compare(this,t)},o.prototype.inspect=function{var t="",n=e.INSPECT_MAX_BYTES;return this.length>0&&(t=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(t+=" ... ")),"<Buffer "+t+">"},o.prototype.compare=function(t,e,n,r,i){if(!o.isBuffer(t))throw new TypeError("Argument must be a Buffer");if(void 0===e&&(e=0),void 0===n&&(n=t?t.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),e<0||n>t.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&e>=n)return 0;if(r>=i)return-1;if(e>=n)return 1;if(e>>>=0,n>>>=0,r>>>=0,i>>>=0,this===t)return 0;for(var a=i-r,s=n-e,u=Math.min(a,s),l=this.slice(r,i),c=t.slice(e,n),h=0;h<u;++h)if(l[h]!==c[h]){a=l[h],s=c[h];break}return a<s?-1:s<a?1:0},o.prototype.includes=function(t,e,n){return-1!==this.indexOf(t,e,n)},o.prototype.indexOf=function(t,e,n){return _(this,t,e,n,!0)},o.prototype.lastIndexOf=function(t,e,n){return _(this,t,e,n,!1)},o.prototype.write=function(t,e,n,r){if(void 0===e)r="utf8",n=this.length,e=0;else if(void 0===n&&"string"==typeof e)r=e,n=this.length,e=0;else{if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e|=0,isFinite(n)?(n|=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}var i=this.length-e;if((void 0===n||n>i)&&(n=i),t.length>0&&(n<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var o=!1;;)switch(r){case"hex":return x(this,t,e,n);case"utf8":case"utf-8":return w(this,t,e,n);case"ascii":return T(this,t,e,n);case"latin1":case"binary":return S(this,t,e,n);case"base64":return E(this,t,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return P(this,t,e,n);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase,o=!0}},o.prototype.toJSON=function{return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var Q=4096;o.prototype.slice=function(t,e){var n=this.length;t=t,e=void 0===e?n:e,t<0?(t+=n)<0&&(t=0):t>n&&(t=n),e<0?(e+=n)<0&&(e=0):e>n&&(e=n),e<t&&(e=t);var r;if(o.TYPED_ARRAY_SUPPORT)r=this.subarray(t,e),r.__proto__=o.prototype;else{var i=e-t;r=new o(i,void 0);for(var a=0;a<i;++a)r[a]=this[a+t]}return r},o.prototype.readUIntLE=function(t,e,n){t|=0,e|=0,n||D(t,e,this.length);for(var r=this[t],i=1,o=0;++o<e&&(i*=256);)r+=this[t+o]*i;return r},o.prototype.readUIntBE=function(t,e,n){t|=0,e|=0,n||D(t,e,this.length);for(var r=this[t+--e],i=1;e>0&&(i*=256);)r+=this[t+--e]*i;return r},o.prototype.readUInt8=function(t,e){return e||D(t,1,this.length),this[t]},o.prototype.readUInt16LE=function(t,e){return e||D(t,2,this.length),this[t]|this[t+1]<<8},o.prototype.readUInt16BE=function(t,e){return e||D(t,2,this.length),this[t]<<8|this[t+1]},o.prototype.readUInt32LE=function(t,e){return e||D(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},o.prototype.readUInt32BE=function(t,e){return e||D(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},o.prototype.readIntLE=function(t,e,n){t|=0,e|=0,n||D(t,e,this.length);for(var r=this[t],i=1,o=0;++o<e&&(i*=256);)r+=this[t+o]*i;return i*=128,r>=i&&(r-=Math.pow(2,8*e)),r},o.prototype.readIntBE=function(t,e,n){t|=0,e|=0,n||D(t,e,this.length);for(var r=e,i=1,o=this[t+--r];r>0&&(i*=256);)o+=this[t+--r]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*e)),o},o.prototype.readInt8=function(t,e){return e||D(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},o.prototype.readInt16LE=function(t,e){e||D(t,2,this.length);var n=this[t]|this[t+1]<<8;return 32768&n?4294901760|n:n},o.prototype.readInt16BE=function(t,e){e||D(t,2,this.length);var n=this[t+1]|this[t]<<8;return 32768&n?4294901760|n:n},o.prototype.readInt32LE=function(t,e){return e||D(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},o.prototype.readInt32BE=function(t,e){return e||D(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},o.prototype.readFloatLE=function(t,e){return e||D(t,4,this.length),J.read(this,t,!0,23,4)},o.prototype.readFloatBE=function(t,e){return e||D(t,4,this.length),J.read(this,t,!1,23,4)},o.prototype.readDoubleLE=function(t,e){return e||D(t,8,this.length),J.read(this,t,!0,52,8)},o.prototype.readDoubleBE=function(t,e){return e||D(t,8,this.length),J.read(this,t,!1,52,8)},o.prototype.writeUIntLE=function(t,e,n,r){if(t=+t,e|=0,n|=0,!r){L(this,t,e,n,Math.pow(2,8*n)-1,0)}var i=1,o=0;for(this[e]=255&t;++o<n&&(i*=256);)this[e+o]=t/i&255;return e+n},o.prototype.writeUIntBE=function(t,e,n,r){if(t=+t,e|=0,n|=0,!r){L(this,t,e,n,Math.pow(2,8*n)-1,0)}var i=n-1,o=1;for(this[e+i]=255&t;--i>=0&&(o*=256);)this[e+i]=t/o&255;return e+n},o.prototype.writeUInt8=function(t,e,n){return t=+t,e|=0,n||L(this,t,e,1,255,0),o.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=255&t,e+1},o.prototype.writeUInt16LE=function(t,e,n){return t=+t,e|=0,n||L(this,t,e,2,65535,0),o.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):j(this,t,e,!0),e+2},o.prototype.writeUInt16BE=function(t,e,n){return t=+t,e|=0,n||L(this,t,e,2,65535,0),o.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):j(this,t,e,!1),e+2},o.prototype.writeUInt32LE=function(t,e,n){return t=+t,e|=0,n||L(this,t,e,4,4294967295,0),o.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t):B(this,t,e,!0),e+4},o.prototype.writeUInt32BE=function(t,e,n){return t=+t,e|=0,n||L(this,t,e,4,4294967295,0),o.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):B(this,t,e,!1),e+4},o.prototype.writeIntLE=function(t,e,n,r){if(t=+t,e|=0,!r){var i=Math.pow(2,8*n-1);L(this,t,e,n,i-1,-i)}var o=0,a=1,s=0;for(this[e]=255&t;++o<n&&(a*=256);)t<0&&0===s&&0!==this[e+o-1]&&(s=1),this[e+o]=(t/a>>0)-s&255;return e+n},o.prototype.writeIntBE=function(t,e,n,r){if(t=+t,e|=0,!r){var i=Math.pow(2,8*n-1);L(this,t,e,n,i-1,-i)}var o=n-1,a=1,s=0;for(this[e+o]=255&t;--o>=0&&(a*=256);)t<0&&0===s&&0!==this[e+o+1]&&(s=1),this[e+o]=(t/a>>0)-s&255;return e+n},o.prototype.writeInt8=function(t,e,n){return t=+t,e|=0,n||L(this,t,e,1,127,-128),o.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=255&t,e+1},o.prototype.writeInt16LE=function(t,e,n){return t=+t,e|=0,n||L(this,t,e,2,32767,-32768),o.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):j(this,t,e,!0),e+2},o.prototype.writeInt16BE=function(t,e,n){return t=+t,e|=0,n||L(this,t,e,2,32767,-32768),o.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):j(this,t,e,!1),e+2},o.prototype.writeInt32LE=function(t,e,n){return t=+t,e|=0,n||L(this,t,e,4,2147483647,-2147483648),o.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):B(this,t,e,!0),e+4},o.prototype.writeInt32BE=function(t,e,n){return t=+t,e|=0,n||L(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),o.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):B(this,t,e,!1),e+4},o.prototype.writeFloatLE=function(t,e,n){return F(this,t,e,!0,n)},o.prototype.writeFloatBE=function(t,e,n){return F(this,t,e,!1,n)},o.prototype.writeDoubleLE=function(t,e,n){return U(this,t,e,!0,n)},o.prototype.writeDoubleBE=function(t,e,n){return U(this,t,e,!1,n)},o.prototype.copy=function(t,e,n,r){if(n||(n=0),r||0===r||(r=this.length),e>=t.length&&(e=t.length),e||(e=0),r>0&&r<n&&(r=n),r===n)return 0;if(0===t.length||0===this.length)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),t.length-e<r-n&&(r=t.length-e+n);var i,a=r-n;if(this===t&&n<e&&e<r)for(i=a-1;i>=0;--i)t[i+e]=this[i+n];else if(a<1e3||!o.TYPED_ARRAY_SUPPORT)for(i=0;i<a;++i)t[i+e]=this[i+n];else Uint8Array.prototype.set.call(t,this.subarray(n,n+a),e);return a},o.prototype.fill=function(t,e,n,r){if("string"==typeof t){if("string"==typeof e?(r=e,e=0,n=this.length):"string"==typeof n&&(r=n,n=this.length),1===t.length){var i=t.charCodeAt(0);i<256&&(t=i)}if(void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!o.isEncoding(r))throw new TypeError("Unknown encoding: "+r)}else"number"==typeof t&&(t&=255);if(e<0||this.length<e||this.length<n)throw new RangeError("Out of range index");if(n<=e)return this;e>>>=0,n=void 0===n?this.length:n>>>0,t||(t=0);var a;if("number"==typeof t)for(a=e;a<n;++a)this[a]=t;else{var s=o.isBuffer(t)?t:X(new o(t,r).toString),u=s.length;for(a=0;a<n-e;++a)this[a+e]=s[a%u]}return this};var tt=/[^+\/0-9A-Za-z-_]/g}).call(e,n(9))},function(t,e,n){(function(t,r){var i;(function{function o(t,e){return t.set(e[0],e[1]),t}function a(t,e){return t.add(e),t}function s(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}function u(t,e,n,r){for(var i=-1,o=null==t?0:t.length;++i<o;){var a=t[i];e(r,a,n(a),t)}return r}function l(t,e){for(var n=-1,r=null==t?0:t.length;++n<r&&!1!==e(t[n],n,t););return t}function c(t,e){for(var n=null==t?0:t.length;n--&&!1!==e(t[n],n,t););return t}function h(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(!e(t[n],n,t))return!1;return!0}function d(t,e){for(var n=-1,r=null==t?0:t.length,i=0,o=[];++n<r;){var a=t[n];e(a,n,t)&&(o[i++]=a)}return o}function p(t,e){return!!(null==t?0:t.length)&&S(t,e,0)>-1}function f(t,e,n){for(var r=-1,i=null==t?0:t.length;++r<i;)if(n(e,t[r]))return!0;return!1}function g(t,e){for(var n=-1,r=null==t?0:t.length,i=Array(r);++n<r;)i[n]=e(t[n],n,t);return i}function m(t,e){for(var n=-1,r=e.length,i=t.length;++n<r;)t[i+n]=e[n];return t}function v(t,e,n,r){var i=-1,o=null==t?0:t.length;for(r&&o&&(n=t[++i]);++i<o;)n=e(n,t[i],i,t);return n}function y(t,e,n,r){var i=null==t?0:t.length;for(r&&i&&(n=t[--i]);i--;)n=e(n,t[i],i,t);return n}function _(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1}function b(t){return t.split("")}function x(t){return t.match(Ue)||[]}function w(t,e,n){var r;return n(t,function(t,n,i){if(e(t,n,i))return r=n,!1}),r}function T(t,e,n,r){for(var i=t.length,o=n+(r?1:-1);r?o--:++o<i;)if(e(t[o],o,t))return o;return-1}function S(t,e,n){return e===e?J(t,e,n):T(t,P,n)}function E(t,e,n,r){for(var i=n-1,o=t.length;++i<o;)if(r(t[i],e))return i;return-1}function P(t){return t!==t}function M(t,e){var n=null==t?0:t.length;return n?k(t,e)/n:Lt}function C(t){return function(e){return null==e?it:e[t]}}function A(t){return function(e){return null==t?it:t[e]}}function O(t,e,n,r,i){return i(t,function(t,i,o){n=r?(r=!1,t):e(n,t,i,o)}),n}function I(t,e){var n=t.length;for(t.sort(e);n--;)t[n]=t[n].value;return t}function k(t,e){for(var n,r=-1,i=t.length;++r<i;){var o=e(t[r]);o!==it&&(n=n===it?o:n+o)}return n}function R(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}function D(t,e){return g(e,function(e){return[e,t[e]]})}function L(t){return function(e){return t(e)}}function j(t,e){return g(e,function(e){return t[e]})}function B(t,e){return t.has(e)}function N(t,e){for(var n=-1,r=t.length;++n<r&&S(e,t[n],0)>-1;);return n}function F(t,e){for(var n=t.length;n--&&S(e,t[n],0)>-1;);return n}function U(t,e){for(var n=t.length,r=0;n--;)t[n]===e&&++r;return r}function W(t){return"\\"+Cn[t]}function H(t,e){return null==t?it:t[e]}function z(t){return _n.test(t)}function X(t){return bn.test(t)}function G(t){for(var e,n=[];!(e=t.next).done;)n.push(e.value);return n}function q(t){var e=-1,n=Array(t.size);return t.forEach(function(t,r){n[++e]=[r,t]}),n}function V(t,e){return function(n){return t(e(n))}}function Y(t,e){for(var n=-1,r=t.length,i=0,o=[];++n<r;){var a=t[n];a!==e&&a!==ct||(t[n]=ct,o[i++]=n)}return o}function K(t){var e=-1,n=Array(t.size);return t.forEach(function(t){n[++e]=t}),n}function $(t){var e=-1,n=Array(t.size);return t.forEach(function(t){n[++e]=[t,t]}),n}function J(t,e,n){for(var r=n-1,i=t.length;++r<i;)if(t[r]===e)return r;return-1}function Z(t,e,n){for(var r=n+1;r--;)if(t[r]===e)return r;return r}function Q(t){return z(t)?et(t):Gn(t)}function tt(t){return z(t)?nt(t):b(t)}function et(t){for(var e=vn.lastIndex=0;vn.test(t);)++e;return e}function nt(t){return t.match(vn)||[]}function rt(t){return t.match(yn)||[]}var it,ot=200,at="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",st="Expected a function",ut="__lodash_hash_undefined__",lt=500,ct="__lodash_placeholder__",ht=1,dt=2,pt=4,ft=1,gt=2,mt=1,vt=2,yt=4,_t=8,bt=16,xt=32,wt=64,Tt=128,St=256,Et=512,Pt=30,Mt="...",Ct=800,At=16,Ot=1,It=2,kt=1/0,Rt=9007199254740991,Dt=1.7976931348623157e308,Lt=NaN,jt=4294967295,Bt=jt-1,Nt=jt>>>1,Ft="ary",Tt],["bind",mt],["bindKey",vt],["curry",_t],["curryRight",bt],["flip",Et],["partial",xt],["partialRight",wt],["rearg",St,Ut="[object Arguments]",Wt="[object Array]",Ht="[object AsyncFunction]",zt="[object Boolean]",Xt="[object Date]",Gt="[object DOMException]",qt="[object Error]",Vt="[object Function]",Yt="[object GeneratorFunction]",Kt="[object Map]",$t="[object Number]",Jt="[object Null]",Zt="[object Object]",Qt="[object Proxy]",te="[object RegExp]",ee="[object Set]",ne="[object String]",re="[object Symbol]",ie="[object Undefined]",oe="[object WeakMap]",ae="[object WeakSet]",se="[object ArrayBuffer]",ue="[object DataView]",le="[object Float32Array]",ce="[object Float64Array]",he="[object Int8Array]",de="[object Int16Array]",pe="[object Int32Array]",fe="[object Uint8Array]",ge="[object Uint8ClampedArray]",me="[object Uint16Array]",ve="[object Uint32Array]",ye=/\b__p \+= ;/g,_e=/\b(__p \+=)  \+/g,be=/(__e\(.*?\)|\b__t\)) \+\n'';/g,xe=/&(?:amp|lt|gt|quot|#39);/g,we=/[&<>"']/g,Te=RegExp(xe.source),Se=RegExp(we.source),Ee=/<%-([\s\S]+?)%>/g,Pe=/<%([\s\S]+?)%>/g,Me=/<%=([\s\S]+?)%>/g,Ce=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Ae=/^\w*$/,Oe=/^\./,Ie=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ke=/[\\^$.*+?[\]{}|]/g,Re=RegExp(ke.source),De=/^\s+|\s+$/g,Le=/^\s+/,je=/\s+$/,Be=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Ne=/\{\n\/\* \[wrapped with (.+)\] \*/,Fe=/,? & /,Ue=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,We=/\\(\\)?/g,He=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,ze=/\w*$/,Xe=/^[-+]0x[0-9a-f]+$/i,Ge=/^0b[01]+$/i,qe=/^\[object .+?Constructor\]$/,Ve=/^0o[0-7]+$/i,Ye=/^(?:0|[1-9]\d*)$/,Ke=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,$e=/($^)/,Je=/['\n\r\u2028\u2029\\]/g,Ze="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",Qe="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",tn="["+Qe+"]",en="["+Ze+"]",nn="[a-z\\xdf-\\xf6\\xf8-\\xff]",rn="[^\\ud800-\\udfff"+Qe+"\\d+\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde]",on="\\ud83c[\\udffb-\\udfff]",an="(?:\\ud83c[\\udde6-\\uddff]){2}",sn="[\\ud800-\\udbff][\\udc00-\\udfff]",un="[A-Z\\xc0-\\xd6\\xd8-\\xde]",ln="(?:"+nn+"|"+rn+")",cn="(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?",hn="(?:\\u200d(?:"+["[^\\ud800-\\udfff]",an,sn].join("|")+")[\\ufe0e\\ufe0f]?"+cn+")*",dn="[\\ufe0e\\ufe0f]?"+cn+hn,pn="(?:"+["[\\u2700-\\u27bf]",an,sn].join("|")+")"+dn,fn="(?:"+["[^\\ud800-\\udfff]"+en+"?",en,an,sn,"[\\ud800-\\udfff]"].join("|")+")",gn=RegExp("['’]","g"),mn=RegExp(en,"g"),vn=RegExp(on+"(?="+on+")|"+fn+dn,"g"),yn=RegExp([un+"?"+nn+"+(?:['’](?:d|ll|m|re|s|t|ve))?(?="+[tn,un,"$"].join("|")+")","(?:[A-Z\\xc0-\\xd6\\xd8-\\xde]|[^\\ud800-\\udfff\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000\\d+\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde])+(?:['’](?:D|LL|M|RE|S|T|VE))?(?="+[tn,un+ln,"$"].join("|")+")",un+"?"+ln+"+(?:['’](?:d|ll|m|re|s|t|ve))?",un+"+(?:['’](?:D|LL|M|RE|S|T|VE))?","\\d*(?:(?:1ST|2ND|3RD|(?![123])\\dTH)\\b)","\\d*(?:(?:1st|2nd|3rd|(?![123])\\dth)\\b)","\\d+",pn].join("|"),"g"),_n=RegExp("[\\u200d\\ud800-\\udfff"+Ze+"\\ufe0e\\ufe0f]"),bn=/[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,xn=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],wn=-1,Tn={};Tn[le]=Tn[ce]=Tn[he]=Tn[de]=Tn[pe]=Tn[fe]=Tn[ge]=Tn[me]=Tn[ve]=!0,Tn[Ut]=Tn[Wt]=Tn[se]=Tn[zt]=Tn[ue]=Tn[Xt]=Tn[qt]=Tn[Vt]=Tn[Kt]=Tn[$t]=Tn[Zt]=Tn[te]=Tn[ee]=Tn[ne]=Tn[oe]=!1;var Sn={};Sn[Ut]=Sn[Wt]=Sn[se]=Sn[ue]=Sn[zt]=Sn[Xt]=Sn[le]=Sn[ce]=Sn[he]=Sn[de]=Sn[pe]=Sn[Kt]=Sn[$t]=Sn[Zt]=Sn[te]=Sn[ee]=Sn[ne]=Sn[re]=Sn[fe]=Sn[ge]=Sn[me]=Sn[ve]=!0,Sn[qt]=Sn[Vt]=Sn[oe]=!1;var En={"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","Ĳ":"IJ","ĳ":"ij","Œ":"Oe","œ":"oe","ŉ":"'n","ſ":"s"},Pn={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Mn={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"},Cn={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},An=parseFloat,On=parseInt,In="object"==typeof t&&t&&t.Object===Object&&t,kn="object"==typeof self&&self&&self.Object===Object&&self,Rn=In||kn||Function("return this"),Dn="object"==typeof e&&e&&!e.nodeType&&e,Ln=Dn&&"object"==typeof r&&r&&!r.nodeType&&r,jn=Ln&&Ln.exports===Dn,Bn=jn&&In.process,Nn=function{try{return Bn&&Bn.binding&&Bn.binding("util")}catch(t){}},Fn=Nn&&Nn.isArrayBuffer,Un=Nn&&Nn.isDate,Wn=Nn&&Nn.isMap,Hn=Nn&&Nn.isRegExp,zn=Nn&&Nn.isSet,Xn=Nn&&Nn.isTypedArray,Gn=C("length"),qn=A(En),Vn=A(Pn),Yn=A(Mn),Kn=function t(e){function n(t){if(ou(t)&&!md(t)&&!(t instanceof b)){if(t instanceof i)return t;if(mc.call(t,"__wrapped__"))return na(t)}return new i(t)}function r{}function i(t,e){this.__wrapped__=t,this.__actions__=[],this.__chain__=!!e,this.__index__=0,this.__values__=it}function b(t){this.__wrapped__=t,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=jt,this.__views__=[]}function A{var t=new b(this.__wrapped__);return t.__actions__=Bi(this.__actions__),t.__dir__=this.__dir__,t.__filtered__=this.__filtered__,t.__iteratees__=Bi(this.__iteratees__),t.__takeCount__=this.__takeCount__,t.__views__=Bi(this.__views__),t}function J{if(this.__filtered__){var t=new b(this);t.__dir__=-1,t.__filtered__=!0}else t=this.clone,t.__dir__*=-1;return t}function et{var t=this.__wrapped__.value,e=this.__dir__,n=md(t),r=e<0,i=n?t.length:0,o=Mo(0,i,this.__views__),a=o.start,s=o.end,u=s-a,l=r?s:a-1,c=this.__iteratees__,h=c.length,d=0,p=qc(u,this.__takeCount__);if(!n||!r&&i==u&&p==u)return yi(t,this.__actions__);var f=[];t:for(u--&&d<p;){l+=e;for(var g=-1,m=t[l];++g<h;){var v=c[g],y=v.iteratee,_=v.type,b=y(m);if(_==It)m=b;else if(!b){if(_==Ot)continue t;break t}}f[d++]=m}return f}function nt(t){var e=-1,n=null==t?0:t.length;for(this.clear;++e<n;){var r=t[e];this.set(r[0],r[1])}}function Ue{this.__data__=nh?nh(null):{},this.size=0}function Ze(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}function Qe(t){var e=this.__data__;if(nh){var n=e[t];return n===ut?it:n}return mc.call(e,t)?e[t]:it}function tn(t){var e=this.__data__;return nh?e[t]!==it:mc.call(e,t)}function en(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=nh&&e===it?ut:e,this}function nn(t){var e=-1,n=null==t?0:t.length;for(this.clear;++e<n;){var r=t[e];this.set(r[0],r[1])}}function rn{this.__data__=[],this.size=0}function on(t){var e=this.__data__,n=$n(e,t);return!(n<0)&&(n==e.length-1?e.pop:Oc.call(e,n,1),--this.size,!0)}function an(t){var e=this.__data__,n=$n(e,t);return n<0?it:e[n][1]}function sn(t){return $n(this.__data__,t)>-1}function un(t,e){var n=this.__data__,r=$n(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this}function ln(t){var e=-1,n=null==t?0:t.length;for(this.clear;++e<n;){var r=t[e];this.set(r[0],r[1])}}function cn{this.size=0,this.__data__={hash:new nt,map:new(Zc||nn),string:new nt}}function hn(t){var e=To(this,t).delete(t);return this.size-=e?1:0,e}function dn(t){return To(this,t).get(t)}function pn(t){return To(this,t).has(t)}function fn(t,e){var n=To(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this}function vn(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new ln;++e<n;)this.add(t[e])}function yn(t){return this.__data__.set(t,ut),this}function _n(t){return this.__data__.has(t)}function bn(t){var e=this.__data__=new nn(t);this.size=e.size}function En{this.__data__=new nn,this.size=0}function Pn(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n}function Mn(t){return this.__data__.get(t)}function Cn(t){return this.__data__.has(t)}function In(t,e){var n=this.__data__;if(n instanceof nn){var r=n.__data__;if(!Zc||r.length<ot-1)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new ln(r)}return n.set(t,e),this.size=n.size,this}function kn(t,e){var n=md(t),r=!n&&gd(t),i=!n&&!r&&yd(t),o=!n&&!r&&!i&&Td(t),a=n||r||i||o,s=a?R(t.length,lc):[],u=s.length;for(var l in t)!e&&!mc.call(t,l)||a&&("length"==l||i&&("offset"==l||"parent"==l)||o&&("buffer"==l||"byteLength"==l||"byteOffset"==l)||Lo(l,u))||s.push(l);return s}function Dn(t){var e=t.length;return e?t[Qr(0,e-1)]:it}function Ln(t,e){return Zo(Bi(t),nr(e,0,t.length))}function Bn(t){return Zo(Bi(t))}function Nn(t,e,n){(n===it||Gs(t[e],n))&&(n!==it||e in t)||tr(t,e,n)}function Gn(t,e,n){var r=t[e];mc.call(t,e)&&Gs(r,n)&&(n!==it||e in t)||tr(t,e,n)}function $n(t,e){for(var n=t.length;n--;)if(Gs(t[n][0],e))return n;return-1}function Jn(t,e,n,r){return fh(t,function(t,i,o){e(r,t,n(t),o)}),r}function Zn(t,e){return t&&Ni(e,Uu(e),t)}function Qn(t,e){return t&&Ni(e,Wu(e),t)}function tr(t,e,n){"__proto__"==e&&Dc?Dc(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}function er(t,e){for(var n=-1,r=e.length,i=nc(r),o=null==t;++n<r;)i[n]=o?it:Bu(t,e[n]);return i}function nr(t,e,n){return t===t&&(n!==it&&(t=t<=n?t:n),e!==it&&(t=t>=e?t:e)),t}function rr(t,e,n,r,i,o){var a,s=e&ht,u=e&dt,c=e&pt;if(n&&(a=i?n(t,r,i,o):n(t)),a!==it)return a;if(!iu(t))return t;var h=md(t);if(h){if(a=Oo(t),!s)return Bi(t,a)}else{var d=Ph(t),p=d==Vt||d==Yt;if(yd(t))return Ei(t,s);if(d==Zt||d==Ut||p&&!i){if(a=u||p?{}:Io(t),!s)return u?Ui(t,Qn(a,t)):Fi(t,Zn(a,t))}else{if(!Sn[d])return i?t:{};a=ko(t,d,rr,s)}}o||(o=new bn);var f=o.get(t);if(f)return f;o.set(t,a);var g=c?u?_o:yo:u?Wu:Uu,m=h?it:g(t);return l(m||t,function(r,i){m&&(i=r,r=t[i]),Gn(a,i,rr(r,e,n,i,t,o))}),a}function ir(t){var e=Uu(t);return function(n){return or(n,t,e)}}function or(t,e,n){var r=n.length;if(null==t)return!r;for(t=sc(t);r--;){var i=n[r],o=e[i],a=t[i];if(a===it&&!(i in t)||!o(a))return!1}return!0}function ar(t,e,n){if("function"!=typeof t)throw new cc(st);return Ah(function{t.apply(it,n)},e)}function sr(t,e,n,r){var i=-1,o=p,a=!0,s=t.length,u=[],l=e.length;if(!s)return u;n&&(e=g(e,L(n))),r?(o=f,a=!1):e.length>=ot&&(o=B,a=!1,e=new vn(e));t:for(++i<s;){var c=t[i],h=null==n?c:n(c);if(c=r||0!==c?c:0,a&&h===h){for(var d=l;d--;)if(e[d]===h)continue t;u.push(c)}else o(e,h,r)||u.push(c)}return u}function ur(t,e){var n=!0;return fh(t,function(t,r,i){return n=!!e(t,r,i)}),n}function lr(t,e,n){for(var r=-1,i=t.length;++r<i;){var o=t[r],a=e(o);if(null!=a&&(s===it?a===a&&!mu(a):n(a,s)))var s=a,u=o}return u}function cr(t,e,n,r){var i=t.length;for(n=wu(n),n<0&&(n=-n>i?0:i+n),r=r===it||r>i?i:wu(r),r<0&&(r+=i),r=n>r?0:Tu(r);n<r;)t[n++]=e;return t}function hr(t,e){var n=[];return fh(t,function(t,r,i){e(t,r,i)&&n.push(t)}),n}function dr(t,e,n,r,i){var o=-1,a=t.length;for(n||(n=Do),i||(i=[]);++o<a;){var s=t[o];e>0&&n(s)?e>1?dr(s,e-1,n,r,i):m(i,s):r||(i[i.length]=s)}return i}function pr(t,e){return t&&mh(t,e,Uu)}function fr(t,e){return t&&vh(t,e,Uu)}function gr(t,e){return d(e,function(e){return eu(t[e])})}function mr(t,e){e=Ti(e,t);for(var n=0,r=e.length;null!=t&&n<r;)t=t[Qo(e[n++])];return n&&n==r?t:it}function vr(t,e,n){var r=e(t);return md(t)?r:m(r,n(t))}function yr(t){return null==t?t===it?ie:Jt:Rc&&Rc in sc(t)?Po(t):qo(t)}function _r(t,e){return t>e}function br(t,e){return null!=t&&mc.call(t,e)}function xr(t,e){return null!=t&&e in sc(t)}function wr(t,e,n){return t>=qc(e,n)&&t<Gc(e,n)}function Tr(t,e,n){for(var r=n?f:p,i=t[0].length,o=t.length,a=o,s=nc(o),u=1/0,l=[];a--;){var c=t[a];a&&e&&(c=g(c,L(e))),u=qc(c.length,u),s[a]=!n&&(e||i>=120&&c.length>=120)?new vn(a&&c):it}c=t[0];var h=-1,d=s[0];t:for(++h<i&&l.length<u;){var m=c[h],v=e?e(m):m;if(m=n||0!==m?m:0,!(d?B(d,v):r(l,v,n))){for(a=o;--a;){var y=s[a];if(!(y?B(y,v):r(t[a],v,n)))continue t}d&&d.push(v),l.push(m)}}return l}function Sr(t,e,n,r){return pr(t,function(t,i,o){e(r,n(t),i,o)}),r}function Er(t,e,n){e=Ti(e,t),t=Yo(t,e);var r=null==t?t:t[Qo(xa(e))];return null==r?it:s(r,t,n)}function Pr(t){return ou(t)&&yr(t)==Ut}function Mr(t){return ou(t)&&yr(t)==se}function Cr(t){return ou(t)&&yr(t)==Xt}function Ar(t,e,n,r,i){return t===e||(null==t||null==e||!ou(t)&&!ou(e)?t!==t&&e!==e:Or(t,e,n,r,Ar,i))}function Or(t,e,n,r,i,o){var a=md(t),s=md(e),u=a?Wt:Ph(t),l=s?Wt:Ph(e);u=u==Ut?Zt:u,l=l==Ut?Zt:l;var c=u==Zt,h=l==Zt,d=u==l;if(d&&yd(t)){if(!yd(e))return!1;a=!0,c=!1}if(d&&!c)return o||(o=new bn),a||Td(t)?fo(t,e,n,r,i,o):go(t,e,u,n,r,i,o);if(!(n&ft)){var p=c&&mc.call(t,"__wrapped__"),f=h&&mc.call(e,"__wrapped__");if(p||f){var g=p?t.value:t,m=f?e.value:e;return o||(o=new bn),i(g,m,n,r,o)}}return!!d&&(o||(o=new bn),mo(t,e,n,r,i,o))}function Ir(t){return ou(t)&&Ph(t)==Kt}function kr(t,e,n,r){var i=n.length,o=i,a=!r;if(null==t)return!o;for(t=sc(t);i--;){var s=n[i];if(a&&s[2]?s[1]!==t[s[0]]:!(s[0]in t))return!1}for(++i<o;){s=n[i];var u=s[0],l=t[u],c=s[1];if(a&&s[2]){if(l===it&&!(u in t))return!1}else{var h=new bn;if(r)var d=r(l,c,u,t,e,h);if(!(d===it?Ar(c,l,ft|gt,r,h):d))return!1}}return!0}function Rr(t){return!(!iu(t)||Uo(t))&&(eu(t)?wc:qe).test(ta(t))}function Dr(t){return ou(t)&&yr(t)==te}function Lr(t){return ou(t)&&Ph(t)==ee}function jr(t){return ou(t)&&ru(t.length)&&!!Tn[yr(t)]}function Br(t){return"function"==typeof t?t:null==t?Ol:"object"==typeof t?md(t)?zr(t[0],t[1]):Hr(t):Nl(t)}function Nr(t){if(!Wo(t))return Xc(t);var e=[];for(var n in sc(t))mc.call(t,n)&&"constructor"!=n&&e.push(n);return e}function Fr(t){if(!iu(t))return Go(t);var e=Wo(t),n=[];for(var r in t)("constructor"!=r||!e&&mc.call(t,r))&&n.push(r);return n}function Ur(t,e){return t<e}function Wr(t,e){var n=-1,r=qs(t)?nc(t.length):[];return fh(t,function(t,i,o){r[++n]=e(t,i,o)}),r}function Hr(t){var e=So(t);return 1==e.length&&e[0][2]?zo(e[0][0],e[0][1]):function(n){return n===t||kr(n,t,e)}}function zr(t,e){return Bo(t)&&Ho(e)?zo(Qo(t),e):function(n){var r=Bu(n,t);return r===it&&r===e?Fu(n,t):Ar(e,r,ft|gt)}}function Xr(t,e,n,r,i){t!==e&&mh(e,function(o,a){if(iu(o))i||(i=new bn),Gr(t,e,a,n,Xr,r,i);else{var s=r?r(t[a],o,a+"",t,e,i):it;s===it&&(s=o),Nn(t,a,s)}},Wu)}function Gr(t,e,n,r,i,o,a){var s=t[n],u=e[n],l=a.get(u);if(l)return void Nn(t,n,l);var c=o?o(s,u,n+"",t,e,a):it,h=c===it;if(h){var d=md(u),p=!d&&yd(u),f=!d&&!p&&Td(u);c=u,d||p||f?md(s)?c=s:Vs(s)?c=Bi(s):p?(h=!1,c=Ei(u,!0)):f?(h=!1,c=ki(u,!0)):c=[]:pu(u)||gd(u)?(c=s,gd(s)?c=Eu(s):(!iu(s)||r&&eu(s))&&(c=Io(u))):h=!1}h&&(a.set(u,c),i(c,u,r,o,a),a.delete(u)),Nn(t,n,c)}function qr(t,e){var n=t.length;if(n)return e+=e<0?n:0,Lo(e,n)?t[e]:it}function Vr(t,e,n){var r=-1;return e=g(e.length?e:[Ol],L(wo)),I(Wr(t,function(t,n,i){return{criteria:g(e,function(e){return e(t)}),index:++r,value:t}}),function(t,e){return Di(t,e,n)})}function Yr(t,e){return Kr(t,e,function(e,n){return Fu(t,n)})}function Kr(t,e,n){for(var r=-1,i=e.length,o={};++r<i;){var a=e[r],s=mr(t,a);n(s,a)&&oi(o,Ti(a,t),s)}return o}function $r(t){return function(e){return mr(e,t)}}function Jr(t,e,n,r){var i=r?E:S,o=-1,a=e.length,s=t;for(t===e&&(e=Bi(e)),n&&(s=g(t,L(n)));++o<a;)for(var u=0,l=e[o],c=n?n(l):l;(u=i(s,c,u,r))>-1;)s!==t&&Oc.call(s,u,1),Oc.call(t,u,1);return t}function Zr(t,e){for(var n=t?e.length:0,r=n-1;n--;){var i=e[n];if(n==r||i!==o){var o=i;Lo(i)?Oc.call(t,i,1):gi(t,i)}}return t}function Qr(t,e){return t+Fc(Kc*(e-t+1))}function ti(t,e,n,r){for(var i=-1,o=Gc(Nc((e-t)/(n||1)),0),a=nc(o);o--;)a[r?o:++i]=t,t+=n;return a}function ei(t,e){var n="";if(!t||e<1||e>Rt)return n;do{e%2&&(n+=t),(e=Fc(e/2))&&(t+=t)}while(e);return n}function ni(t,e){return Oh(Vo(t,e,Ol),t+"")}function ri(t){return Dn(Qu(t))}function ii(t,e){var n=Qu(t);return Zo(n,nr(e,0,n.length))}function oi(t,e,n,r){if(!iu(t))return t;e=Ti(e,t);for(var i=-1,o=e.length,a=o-1,s=t;null!=s&&++i<o;){var u=Qo(e[i]),l=n;if(i!=a){var c=s[u];l=r?r(c,u,s):it,l===it&&(l=iu(c)?c:Lo(e[i+1])?[]:{})}Gn(s,u,l),s=s[u]}return t}function ai(t){return Zo(Qu(t))}function si(t,e,n){var r=-1,i=t.length;e<0&&(e=-e>i?0:i+e),n=n>i?i:n,n<0&&(n+=i),i=e>n?0:n-e>>>0,e>>>=0;for(var o=nc(i);++r<i;)o[r]=t[r+e];return o}function ui(t,e){var n;return fh(t,function(t,r,i){return!(n=e(t,r,i))}),!!n}function li(t,e,n){var r=0,i=null==t?r:t.length;if("number"==typeof e&&e===e&&i<=Nt){for(r<i;){var o=r+i>>>1,a=t[o];null!==a&&!mu(a)&&(n?a<=e:a<e)?r=o+1:i=o}return i}return ci(t,e,Ol,n)}function ci(t,e,n,r){e=n(e);for(var i=0,o=null==t?0:t.length,a=e!==e,s=null===e,u=mu(e),l=e===it;i<o;){var c=Fc((i+o)/2),h=n(t[c]),d=h!==it,p=null===h,f=h===h,g=mu(h);if(a)var m=r||f;else m=l?f&&(r||d):s?f&&d&&(r||!p):u?f&&d&&!p&&(r||!g):!p&&!g&&(r?h<=e:h<e);m?i=c+1:o=c}return qc(o,Bt)}function hi(t,e){for(var n=-1,r=t.length,i=0,o=[];++n<r;){var a=t[n],s=e?e(a):a;if(!n||!Gs(s,u)){var u=s;o[i++]=0===a?0:a}}return o}function di(t){return"number"==typeof t?t:mu(t)?Lt:+t}function pi(t){if("string"==typeof t)return t;if(md(t))return g(t,pi)+"";if(mu(t))return dh?dh.call(t):"";var e=t+"";return"0"==e&&1/t==-kt?"-0":e}function fi(t,e,n){var r=-1,i=p,o=t.length,a=!0,s=[],u=s;if(n)a=!1,i=f;else if(o>=ot){var l=e?null:wh(t);if(l)return K(l);a=!1,i=B,u=new vn}else u=e?[]:s;t:for(++r<o;){var c=t[r],h=e?e(c):c;if(c=n||0!==c?c:0,a&&h===h){for(var d=u.length;d--;)if(u[d]===h)continue t;e&&u.push(h),s.push(c)}else i(u,h,n)||(u!==s&&u.push(h),s.push(c))}return s}function gi(t,e){return e=Ti(e,t),null==(t=Yo(t,e))||delete t[Qo(xa(e))]}function mi(t,e,n,r){return oi(t,e,n(mr(t,e)),r)}function vi(t,e,n,r){for(var i=t.length,o=r?i:-1;(r?o--:++o<i)&&e(t[o],o,t););return n?si(t,r?0:o,r?o+1:i):si(t,r?o+1:0,r?i:o)}function yi(t,e){var n=t;return n instanceof b&&(n=n.value),v(e,function(t,e){return e.func.apply(e.thisArg,m([t],e.args))},n)}function _i(t,e,n){var r=t.length;if(r<2)return r?fi(t[0]):[];for(var i=-1,o=nc(r);++i<r;)for(var a=t[i],s=-1;++s<r;)s!=i&&(o[i]=sr(o[i]||a,t[s],e,n));return fi(dr(o,1),e,n)}function bi(t,e,n){for(var r=-1,i=t.length,o=e.length,a={};++r<i;){var s=r<o?e[r]:it;n(a,t[r],s)}return a}function xi(t){return Vs(t)?t:[]}function wi(t){return"function"==typeof t?t:Ol}function Ti(t,e){return md(t)?t:Bo(t,e)?[t]:Ih(Mu(t))}function Si(t,e,n){var r=t.length;return n=n===it?r:n,!e&&n>=r?t:si(t,e,n)}function Ei(t,e){if(e)return t.slice;var n=t.length,r=Pc?Pc(n):new t.constructor(n);return t.copy(r),r}function Pi(t){var e=new t.constructor(t.byteLength);return new Ec(e).set(new Ec(t)),e}function Mi(t,e){var n=e?Pi(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)}function Ci(t,e,n){return v(e?n(q(t),ht):q(t),o,new t.constructor)}function Ai(t){var e=new t.constructor(t.source,ze.exec(t));return e.lastIndex=t.lastIndex,e}function Oi(t,e,n){return v(e?n(K(t),ht):K(t),a,new t.constructor)}function Ii(t){return hh?sc(hh.call(t)):{}}function ki(t,e){var n=e?Pi(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}function Ri(t,e){if(t!==e){var n=t!==it,r=null===t,i=t===t,o=mu(t),a=e!==it,s=null===e,u=e===e,l=mu(e);if(!s&&!l&&!o&&t>e||o&&a&&u&&!s&&!l||r&&a&&u||!n&&u||!i)return 1;if(!r&&!o&&!l&&t<e||l&&n&&i&&!r&&!o||s&&n&&i||!a&&i||!u)return-1}return 0}function Di(t,e,n){for(var r=-1,i=t.criteria,o=e.criteria,a=i.length,s=n.length;++r<a;){var u=Ri(i[r],o[r]);if(u){if(r>=s)return u;return u*("desc"==n[r]?-1:1)}}return t.index-e.index}function Li(t,e,n,r){for(var i=-1,o=t.length,a=n.length,s=-1,u=e.length,l=Gc(o-a,0),c=nc(u+l),h=!r;++s<u;)c[s]=e[s];for(++i<a;)(h||i<o)&&(c[n[i]]=t[i]);for(l--;)c[s++]=t[i++];return c}function ji(t,e,n,r){for(var i=-1,o=t.length,a=-1,s=n.length,u=-1,l=e.length,c=Gc(o-s,0),h=nc(c+l),d=!r;++i<c;)h[i]=t[i];for(var p=i;++u<l;)h[p+u]=e[u];for(++a<s;)(d||i<o)&&(h[p+n[a]]=t[i++]);return h}function Bi(t,e){var n=-1,r=t.length;for(e||(e=nc(r));++n<r;)e[n]=t[n];return e}function Ni(t,e,n,r){var i=!n;n||(n={});for(var o=-1,a=e.length;++o<a;){var s=e[o],u=r?r(n[s],t[s],s,n,t):it;u===it&&(u=t[s]),i?tr(n,s,u):Gn(n,s,u)}return n}function Fi(t,e){return Ni(t,Sh(t),e)}function Ui(t,e){return Ni(t,Eh(t),e)}function Wi(t,e){return function(n,r){var i=md(n)?u:Jn,o=e?e:{};return i(n,t,wo(r,2),o)}}function Hi(t){return ni(function(e,n){var r=-1,i=n.length,o=i>1?n[i-1]:it,a=i>2?n[2]:it;for(o=t.length>3&&"function"==typeof o?(i--,o):it,a&&jo(n[0],n[1],a)&&(o=i<3?it:o,i=1),e=sc(e);++r<i;){var s=n[r];s&&t(e,s,r,o)}return e})}function zi(t,e){return function(n,r){if(null==n)return n;if(!qs(n))return t(n,r);for(var i=n.length,o=e?i:-1,a=sc(n);(e?o--:++o<i)&&!1!==r(a[o],o,a););return n}}function Xi(t){return function(e,n,r){for(var i=-1,o=sc(e),a=r(e),s=a.length;s--;){var u=a[t?s:++i];if(!1===n(o[u],u,o))break}return e}}function Gi(t,e,n){function r{return(this&&this!==Rn&&this instanceof r?o:t).apply(i?n:this,arguments)}var i=e&mt,o=Yi(t);return r}function qi(t){return function(e){e=Mu(e);var n=z(e)?tt(e):it,r=n?n[0]:e.charAt(0),i=n?Si(n,1).join(""):e.slice(1);return r[t]+i}}function Vi(t){return function(e){return v(El(ol(e).replace(gn,"")),t,"")}}function Yi(t){return function{var e=arguments;switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3]);case 5:return new t(e[0],e[1],e[2],e[3],e[4]);case 6:return new t(e[0],e[1],e[2],e[3],e[4],e[5]);case 7:return new t(e[0],e[1],e[2],e[3],e[4],e[5],e[6])}var n=ph(t.prototype),r=t.apply(n,e);return iu(r)?r:n}}function Ki(t,e,n){function r{for(var o=arguments.length,a=nc(o),u=o,l=xo(r);u--;)a[u]=arguments[u];var c=o<3&&a[0]!==l&&a[o-1]!==l?[]:Y(a,l);return(o-=c.length)<n?ao(t,e,Zi,r.placeholder,it,a,c,it,it,n-o):s(this&&this!==Rn&&this instanceof r?i:t,this,a)}var i=Yi(t);return r}function $i(t){return function(e,n,r){var i=sc(e);if(!qs(e)){var o=wo(n,3);e=Uu(e),n=function(t){return o(i[t],t,i)}}var a=t(e,n,r);return a>-1?i[o?e[a]:a]:it}}function Ji(t){return vo(function(e){var n=e.length,r=n,o=i.prototype.thru;for(t&&e.reverse;r--;){var a=e[r];if("function"!=typeof a)throw new cc(st);if(o&&!s&&"wrapper"==bo(a))var s=new i([],!0)}for(r=s?r:n;++r<n;){a=e[r];var u=bo(a),l="wrapper"==u?Th(a):it;s=l&&Fo(l[0])&&l[1]==(Tt|_t|xt|St)&&!l[4].length&&1==l[9]?s[bo(l[0])].apply(s,l[3]):1==a.length&&Fo(a)?s[u]:s.thru(a)}return function{var t=arguments,r=t[0];if(s&&1==t.length&&md(r))return s.plant(r).value;for(var i=0,o=n?e[i].apply(this,t):r;++i<n;)o=e[i].call(this,o);return o}})}function Zi(t,e,n,r,i,o,a,s,u,l){function c{for(var v=arguments.length,y=nc(v),_=v;_--;)y[_]=arguments[_];if(f)var b=xo(c),x=U(y,b);if(r&&(y=Li(y,r,i,f)),o&&(y=ji(y,o,a,f)),v-=x,f&&v<l){var w=Y(y,b);return ao(t,e,Zi,c.placeholder,n,y,w,s,u,l-v)}var T=d?n:this,S=p?T[t]:t;return v=y.length,s?y=Ko(y,s):g&&v>1&&y.reverse,h&&u<v&&(y.length=u),this&&this!==Rn&&this instanceof c&&(S=m||Yi(S)),S.apply(T,y)}var h=e&Tt,d=e&mt,p=e&vt,f=e&(_t|bt),g=e&Et,m=p?it:Yi(t);return c}function Qi(t,e){return function(n,r){return Sr(n,t,e(r),{})}}function to(t,e){return function(n,r){var i;if(n===it&&r===it)return e;if(n!==it&&(i=n),r!==it){if(i===it)return r;"string"==typeof n||"string"==typeof r?(n=pi(n),r=pi(r)):(n=di(n),r=di(r)),i=t(n,r)}return i}}function eo(t){return vo(function(e){return e=g(e,L(wo)),ni(function(n){var r=this;return t(e,function(t){return s(t,r,n)})})})}function no(t,e){e=e===it?" ":pi(e);var n=e.length;if(n<2)return n?ei(e,t):e;var r=ei(e,Nc(t/Q(e)));return z(e)?Si(tt(r),0,t).join(""):r.slice(0,t)}function ro(t,e,n,r){function i{for(var e=-1,u=arguments.length,l=-1,c=r.length,h=nc(c+u),d=this&&this!==Rn&&this instanceof i?a:t;++l<c;)h[l]=r[l];for(u--;)h[l++]=arguments[++e];return s(d,o?n:this,h)}var o=e&mt,a=Yi(t);return i}function io(t){return function(e,n,r){return r&&"number"!=typeof r&&jo(e,n,r)&&(n=r=it),e=xu(e),n===it?(n=e,e=0):n=xu(n),r=r===it?e<n?1:-1:xu(r),ti(e,n,r,t)}}function oo(t){return function(e,n){return"string"==typeof e&&"string"==typeof n||(e=Su(e),n=Su(n)),t(e,n)}}function ao(t,e,n,r,i,o,a,s,u,l){var c=e&_t,h=c?a:it,d=c?it:a,p=c?o:it,f=c?it:o;e|=c?xt:wt,(e&=~(c?wt:xt))&yt||(e&=~(mt|vt));var g=[t,e,i,p,h,f,d,s,u,l],m=n.apply(it,g);return Fo(t)&&Ch(m,g),m.placeholder=r,$o(m,t,e)}function so(t){var e=ac[t];return function(t,n){if(t=Su(t),n=null==n?0:qc(wu(n),292)){var r=(Mu(t)+"e").split("e");return r=(Mu(e(r[0]+"e"+(+r[1]+n)))+"e").split("e"),+(r[0]+"e"+(+r[1]-n))}return e(t)}}function uo(t){return function(e){var n=Ph(e);return n==Kt?q(e):n==ee?$(e):D(e,t(e))}}function lo(t,e,n,r,i,o,a,s){var u=e&vt;if(!u&&"function"!=typeof t)throw new cc(st);var l=r?r.length:0;if(l||(e&=~(xt|wt),r=i=it),a=a===it?a:Gc(wu(a),0),s=s===it?s:wu(s),l-=i?i.length:0,e&wt){var c=r,h=i;r=i=it}var d=u?it:Th(t),p=[t,e,n,r,i,c,h,o,a,s];if(d&&Xo(p,d),t=p[0],e=p[1],n=p[2],r=p[3],i=p[4],s=p[9]=p[9]===it?u?0:t.length:Gc(p[9]-l,0),!s&&e&(_t|bt)&&(e&=~(_t|bt)),e&&e!=mt)f=e==_t||e==bt?Ki(t,e,s):e!=xt&&e!=(mt|xt)||i.length?Zi.apply(it,p):ro(t,e,n,r);else var f=Gi(t,e,n);return $o((d?yh:Ch)(f,p),t,e)}function co(t,e,n,r){return t===it||Gs(t,pc[n])&&!mc.call(r,n)?e:t}function ho(t,e,n,r,i,o){return iu(t)&&iu(e)&&(o.set(e,t),Xr(t,e,it,ho,o),o.delete(e)),t}function po(t){return pu(t)?it:t}function fo(t,e,n,r,i,o){var a=n&ft,s=t.length,u=e.length;if(s!=u&&!(a&&u>s))return!1;var l=o.get(t);if(l&&o.get(e))return l==e;var c=-1,h=!0,d=n&gt?new vn:it;for(o.set(t,e),o.set(e,t);++c<s;){var p=t[c],f=e[c];if(r)var g=a?r(f,p,c,e,t,o):r(p,f,c,t,e,o);if(g!==it){if(g)continue;h=!1;break}if(d){if(!_(e,function(t,e){if(!B(d,e)&&(p===t||i(p,t,n,r,o)))return d.push(e)})){h=!1;break}}else if(p!==f&&!i(p,f,n,r,o)){h=!1;break}}return o.delete(t),o.delete(e),h}function go(t,e,n,r,i,o,a){switch(n){case ue:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case se:return!(t.byteLength!=e.byteLength||!o(new Ec(t),new Ec(e)));case zt:case Xt:case $t:return Gs(+t,+e);case qt:return t.name==e.name&&t.message==e.message;case te:case ne:return t==e+"";case Kt:var s=q;case ee:var u=r&ft;if(s||(s=K),t.size!=e.size&&!u)return!1;var l=a.get(t);if(l)return l==e;r|=gt,a.set(t,e);var c=fo(s(t),s(e),r,i,o,a);return a.delete(t),c;case re:if(hh)return hh.call(t)==hh.call(e)}return!1}function mo(t,e,n,r,i,o){var a=n&ft,s=yo(t),u=s.length;if(u!=yo(e).length&&!a)return!1;for(var l=u;l--;){var c=s[l];if(!(a?c in e:mc.call(e,c)))return!1}var h=o.get(t);if(h&&o.get(e))return h==e;var d=!0;o.set(t,e),o.set(e,t);for(var p=a;++l<u;){c=s[l];var f=t[c],g=e[c];if(r)var m=a?r(g,f,c,e,t,o):r(f,g,c,t,e,o);if(!(m===it?f===g||i(f,g,n,r,o):m)){d=!1;break}p||(p="constructor"==c)}if(d&&!p){var v=t.constructor,y=e.constructor;v!=y&&"constructor"in t&&"constructor"in e&&!("function"==typeof v&&v instanceof v&&"function"==typeof y&&y instanceof y)&&(d=!1)}return o.delete(t),o.delete(e),d}function vo(t){return Oh(Vo(t,it,pa),t+"")}function yo(t){return vr(t,Uu,Sh)}function _o(t){return vr(t,Wu,Eh)}function bo(t){for(var e=t.name+"",n=ih[e],r=mc.call(ih,e)?n.length:0;r--;){var i=n[r],o=i.func;if(null==o||o==t)return i.name}return e}function xo(t){return(mc.call(n,"placeholder")?n:t).placeholder}function wo{var t=n.iteratee||Il;return t=t===Il?Br:t,arguments.length?t(arguments[0],arguments[1]):t}function To(t,e){var n=t.__data__;return No(e)?n["string"==typeof e?"string":"hash"]:n.map}function So(t){for(var e=Uu(t),n=e.length;n--;){var r=e[n],i=t[r];e[n]=[r,i,Ho(i)]}return e}function Eo(t,e){var n=H(t,e);return Rr(n)?n:it}function Po(t){var e=mc.call(t,Rc),n=t[Rc];try{t[Rc]=it;var r=!0}catch(t){}var i=_c.call(t);return r&&(e?t[Rc]=n:delete t[Rc]),i}function Mo(t,e,n){for(var r=-1,i=n.length;++r<i;){var o=n[r],a=o.size;switch(o.type){case"drop":t+=a;break;case"dropRight":e-=a;break;case"take":e=qc(e,t+a);break;case"takeRight":t=Gc(t,e-a)}}return{start:t,end:e}}function Co(t){var e=t.match(Ne);return e?e[1].split(Fe):[]}function Ao(t,e,n){e=Ti(e,t);for(var r=-1,i=e.length,o=!1;++r<i;){var a=Qo(e[r]);if(!(o=null!=t&&n(t,a)))break;t=t[a]}return o||++r!=i?o:!!(i=null==t?0:t.length)&&ru(i)&&Lo(a,i)&&(md(t)||gd(t))}function Oo(t){var e=t.length,n=t.constructor(e);return e&&"string"==typeof t[0]&&mc.call(t,"index")&&(n.index=t.index,n.input=t.input),n}function Io(t){return"function"!=typeof t.constructor||Wo(t)?{}:ph(Mc(t))}function ko(t,e,n,r){var i=t.constructor;switch(e){case se:return Pi(t);case zt:case Xt:return new i(+t);case ue:return Mi(t,r);case le:case ce:case he:case de:case pe:case fe:case ge:case me:case ve:return ki(t,r);case Kt:return Ci(t,r,n);case $t:case ne:return new i(t);case te:return Ai(t);case ee:return Oi(t,r,n);case re:return Ii(t)}}function Ro(t,e){var n=e.length;if(!n)return t;var r=n-1;return e[r]=(n>1?"& ":"")+e[r],e=e.join(n>2?", ":" "),t.replace(Be,"{\n/* [wrapped with "+e+"] */\n")}function Do(t){return md(t)||gd(t)||!!(Ic&&t&&t[Ic])}function Lo(t,e){return!!(e=null==e?Rt:e)&&("number"==typeof t||Ye.test(t))&&t>-1&&t%1==0&&t<e}function jo(t,e,n){if(!iu(n))return!1;var r=typeof e;return!!("number"==r?qs(n)&&Lo(e,n.length):"string"==r&&e in n)&&Gs(n[e],t)}function Bo(t,e){if(md(t))return!1;var n=typeof t;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!mu(t))||(Ae.test(t)||!Ce.test(t)||null!=e&&t in sc(e))}function No(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}function Fo(t){var e=bo(t),r=n[e];if("function"!=typeof r||!(e in b.prototype))return!1;if(t===r)return!0;var i=Th(r);return!!i&&t===i[0]}function Uo(t){return!!yc&&yc in t}function Wo(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||pc)}function Ho(t){return t===t&&!iu(t)}function zo(t,e){return function(n){return null!=n&&(n[t]===e&&(e!==it||t in sc(n)))}}function Xo(t,e){var n=t[1],r=e[1],i=n|r,o=i<(mt|vt|Tt),a=r==Tt&&n==_t||r==Tt&&n==St&&t[7].length<=e[8]||r==(Tt|St)&&e[7].length<=e[8]&&n==_t;if(!o&&!a)return t;r&mt&&(t[2]=e[2],i|=n&mt?0:yt);var s=e[3];if(s){var u=t[3];t[3]=u?Li(u,s,e[4]):s,t[4]=u?Y(t[3],ct):e[4]}return s=e[5],s&&(u=t[5],t[5]=u?ji(u,s,e[6]):s,t[6]=u?Y(t[5],ct):e[6]),s=e[7],s&&(t[7]=s),r&Tt&&(t[8]=null==t[8]?e[8]:qc(t[8],e[8])),null==t[9]&&(t[9]=e[9]),t[0]=e[0],t[1]=i,t}function Go(t){var e=[];if(null!=t)for(var n in sc(t))e.push(n);return e}function qo(t){return _c.call(t)}function Vo(t,e,n){return e=Gc(e===it?t.length-1:e,0),function{for(var r=arguments,i=-1,o=Gc(r.length-e,0),a=nc(o);++i<o;)a[i]=r[e+i];i=-1;for(var u=nc(e+1);++i<e;)u[i]=r[i];return u[e]=n(a),s(t,this,u)}}function Yo(t,e){return e.length<2?t:mr(t,si(e,0,-1))}function Ko(t,e){for(var n=t.length,r=qc(e.length,n),i=Bi(t);r--;){var o=e[r];t[r]=Lo(o,n)?i[o]:it}return t}function $o(t,e,n){var r=e+"";return Oh(t,Ro(r,ea(Co(r),n)))}function Jo(t){var e=0,n=0;return function{var r=Vc,i=At-(r-n);if(n=r,i>0){if(++e>=Ct)return arguments[0]}else e=0;return t.apply(it,arguments)}}function Zo(t,e){var n=-1,r=t.length,i=r-1;for(e=e===it?r:e;++n<e;){var o=Qr(n,i),a=t[o];t[o]=t[n],t[n]=a}return t.length=e,t}function Qo(t){if("string"==typeof t||mu(t))return t;var e=t+"";return"0"==e&&1/t==-kt?"-0":e}function ta(t){if(null!=t){try{return gc.call(t)}catch(t){}try{return t+""}catch(t){}}return""}function ea(t,e){return l(Ft,function(n){var r="_."+n[0];e&n[1]&&!p(t,r)&&t.push(r)}),t.sort}function na(t){if(t instanceof b)return t.clone;var e=new i(t.__wrapped__,t.__chain__);return e.__actions__=Bi(t.__actions__),e.__index__=t.__index__,e.__values__=t.__values__,e}function ra(t,e,n){e=(n?jo(t,e,n):e===it)?1:Gc(wu(e),0);var r=null==t?0:t.length;if(!r||e<1)return[];for(var i=0,o=0,a=nc(Nc(r/e));i<r;)a[o++]=si(t,i,i+=e);return a}function ia(t){for(var e=-1,n=null==t?0:t.length,r=0,i=[];++e<n;){var o=t[e];o&&(i[r++]=o)}return i}function oa{var t=arguments.length;if(!t)return[];for(var e=nc(t-1),n=arguments[0],r=t;r--;)e[r-1]=arguments[r];return m(md(n)?Bi(n):[n],dr(e,1))}function aa(t,e,n){var r=null==t?0:t.length;return r?(e=n||e===it?1:wu(e),si(t,e<0?0:e,r)):[]}function sa(t,e,n){var r=null==t?0:t.length;return r?(e=n||e===it?1:wu(e),e=r-e,si(t,0,e<0?0:e)):[]}function ua(t,e){return t&&t.length?vi(t,wo(e,3),!0,!0):[]}function la(t,e){return t&&t.length?vi(t,wo(e,3),!0):[]}function ca(t,e,n,r){var i=null==t?0:t.length;return i?(n&&"number"!=typeof n&&jo(t,e,n)&&(n=0,r=i),cr(t,e,n,r)):[]}function ha(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=null==n?0:wu(n);return i<0&&(i=Gc(r+i,0)),T(t,wo(e,3),i)}function da(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=r-1;return n!==it&&(i=wu(n),i=n<0?Gc(r+i,0):qc(i,r-1)),T(t,wo(e,3),i,!0)}function pa(t){return(null==t?0:t.length)?dr(t,1):[]}function fa(t){return(null==t?0:t.length)?dr(t,kt):[]}function ga(t,e){return(null==t?0:t.length)?(e=e===it?1:wu(e),dr(t,e)):[]}function ma(t){for(var e=-1,n=null==t?0:t.length,r={};++e<n;){var i=t[e];r[i[0]]=i[1]}return r}function va(t){return t&&t.length?t[0]:it}function ya(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=null==n?0:wu(n);return i<0&&(i=Gc(r+i,0)),S(t,e,i)}function _a(t){return(null==t?0:t.length)?si(t,0,-1):[]}function ba(t,e){return null==t?"":zc.call(t,e)}function xa(t){var e=null==t?0:t.length;return e?t[e-1]:it}function wa(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=r;return n!==it&&(i=wu(n),i=i<0?Gc(r+i,0):qc(i,r-1)),e===e?Z(t,e,i):T(t,P,i,!0)}function Ta(t,e){return t&&t.length?qr(t,wu(e)):it}function Sa(t,e){return t&&t.length&&e&&e.length?Jr(t,e):t}function Ea(t,e,n){return t&&t.length&&e&&e.length?Jr(t,e,wo(n,2)):t}function Pa(t,e,n){return t&&t.length&&e&&e.length?Jr(t,e,it,n):t}function Ma(t,e){var n=[];if(!t||!t.length)return n;var r=-1,i=[],o=t.length;for(e=wo(e,3);++r<o;){var a=t[r];e(a,r,t)&&(n.push(a),i.push(r))}return Zr(t,i),n}function Ca(t){return null==t?t:$c.call(t)}function Aa(t,e,n){var r=null==t?0:t.length;return r?(n&&"number"!=typeof n&&jo(t,e,n)?(e=0,n=r):(e=null==e?0:wu(e),n=n===it?r:wu(n)),si(t,e,n)):[]}function Oa(t,e){return li(t,e)}function Ia(t,e,n){return ci(t,e,wo(n,2))}function ka(t,e){var n=null==t?0:t.length;if(n){var r=li(t,e);if(r<n&&Gs(t[r],e))return r}return-1}function Ra(t,e){return li(t,e,!0)}function Da(t,e,n){return ci(t,e,wo(n,2),!0)}function La(t,e){if(null==t?0:t.length){var n=li(t,e,!0)-1;if(Gs(t[n],e))return n}return-1}function ja(t){return t&&t.length?hi(t):[]}function Ba(t,e){return t&&t.length?hi(t,wo(e,2)):[]}function Na(t){var e=null==t?0:t.length;return e?si(t,1,e):[]}function Fa(t,e,n){return t&&t.length?(e=n||e===it?1:wu(e),si(t,0,e<0?0:e)):[]}function Ua(t,e,n){var r=null==t?0:t.length;return r?(e=n||e===it?1:wu(e),e=r-e,si(t,e<0?0:e,r)):[]}function Wa(t,e){return t&&t.length?vi(t,wo(e,3),!1,!0):[]}function Ha(t,e){return t&&t.length?vi(t,wo(e,3)):[]}function za(t){return t&&t.length?fi(t):[]}function Xa(t,e){return t&&t.length?fi(t,wo(e,2)):[]}function Ga(t,e){return e="function"==typeof e?e:it,t&&t.length?fi(t,it,e):[]}function qa(t){if(!t||!t.length)return[];var e=0;return t=d(t,function(t){if(Vs(t))return e=Gc(t.length,e),!0}),R(e,function(e){return g(t,C(e))})}function Va(t,e){if(!t||!t.length)return[];var n=qa(t);return null==e?n:g(n,function(t){return s(e,it,t)})}function Ya(t,e){return bi(t||[],e||[],Gn)}function Ka(t,e){return bi(t||[],e||[],oi)}function $a(t){var e=n(t);return e.__chain__=!0,e}function Ja(t,e){return e(t),t}function Za(t,e){return e(t)}function Qa{return $a(this)}function ts{return new i(this.value,this.__chain__)}function es{this.__values__===it&&(this.__values__=bu(this.value));var t=this.__index__>=this.__values__.length;return{done:t,value:t?it:this.__values__[this.__index__++]}}function ns{return this}function rs(t){for(var e,n=this;n instanceof r;){var i=na(n);i.__index__=0,i.__values__=it,e?o.__wrapped__=i:e=i;var o=i;n=n.__wrapped__}return o.__wrapped__=t,e}function is{var t=this.__wrapped__;if(t instanceof b){var e=t;return this.__actions__.length&&(e=new b(this)),e=e.reverse,e.__actions__.push({func:Za,args:[Ca],thisArg:it}),new i(e,this.__chain__)}return this.thru(Ca)}function os{return yi(this.__wrapped__,this.__actions__)}function as(t,e,n){var r=md(t)?h:ur;return n&&jo(t,e,n)&&(e=it),r(t,wo(e,3))}function ss(t,e){return(md(t)?d:hr)(t,wo(e,3))}function us(t,e){return dr(fs(t,e),1)}function ls(t,e){return dr(fs(t,e),kt)}function cs(t,e,n){return n=n===it?1:wu(n),dr(fs(t,e),n)}function hs(t,e){return(md(t)?l:fh)(t,wo(e,3))}function ds(t,e){return(md(t)?c:gh)(t,wo(e,3))}function ps(t,e,n,r){t=qs(t)?t:Qu(t),n=n&&!r?wu(n):0;var i=t.length;return n<0&&(n=Gc(i+n,0)),gu(t)?n<=i&&t.indexOf(e,n)>-1:!!i&&S(t,e,n)>-1}function fs(t,e){return(md(t)?g:Wr)(t,wo(e,3))}function gs(t,e,n,r){return null==t?[]:(md(e)||(e=null==e?[]:[e]),n=r?it:n,md(n)||(n=null==n?[]:[n]),Vr(t,e,n))}function ms(t,e,n){var r=md(t)?v:O,i=arguments.length<3;return r(t,wo(e,4),n,i,fh)}function vs(t,e,n){var r=md(t)?y:O,i=arguments.length<3;return r(t,wo(e,4),n,i,gh)}function ys(t,e){return(md(t)?d:hr)(t,ks(wo(e,3)))}function _s(t){return(md(t)?Dn:ri)(t)}function bs(t,e,n){return e=(n?jo(t,e,n):e===it)?1:wu(e),(md(t)?Ln:ii)(t,e)}function xs(t){return(md(t)?Bn:ai)(t)}function ws(t){if(null==t)return 0;if(qs(t))return gu(t)?Q(t):t.length;var e=Ph(t);return e==Kt||e==ee?t.size:Nr(t).length}function Ts(t,e,n){var r=md(t)?_:ui;return n&&jo(t,e,n)&&(e=it),r(t,wo(e,3))}function Ss(t,e){if("function"!=typeof e)throw new cc(st);return t=wu(t),function{if(--t<1)return e.apply(this,arguments)}}function Es(t,e,n){return e=n?it:e,e=t&&null==e?t.length:e,lo(t,Tt,it,it,it,it,e)}function Ps(t,e){var n;if("function"!=typeof e)throw new cc(st);return t=wu(t),function{return--t>0&&(n=e.apply(this,arguments)),t<=1&&(e=it),n}}function Ms(t,e,n){e=n?it:e;var r=lo(t,_t,it,it,it,it,it,e);return r.placeholder=Ms.placeholder,r}function Cs(t,e,n){e=n?it:e;var r=lo(t,bt,it,it,it,it,it,e);return r.placeholder=Cs.placeholder,r}function As(t,e,n){function r(e){var n=d,r=p;return d=p=it,y=e,g=t.apply(r,n)}function i(t){return y=t,m=Ah(s,e),_?r(t):g}function o(t){var n=t-v,r=t-y,i=e-n;return b?qc(i,f-r):i}function a(t){var n=t-v,r=t-y;return v===it||n>=e||n<0||b&&r>=f}function s{var t=id;if(a(t))return u(t);m=Ah(s,o(t))}function u(t){return m=it,x&&d?r(t):(d=p=it,g)}function l{m!==it&&xh(m),y=0,d=v=p=m=it}function c{return m===it?g:u(id)}function h{var t=id,n=a(t);if(d=arguments,p=this,v=t,n){if(m===it)return i(v);if(b)return m=Ah(s,e),r(v)}return m===it&&(m=Ah(s,e)),g}var d,p,f,g,m,v,y=0,_=!1,b=!1,x=!0;if("function"!=typeof t)throw new cc(st);return e=Su(e)||0,iu(n)&&(_=!!n.leading,b="maxWait"in n,f=b?Gc(Su(n.maxWait)||0,e):f,x="trailing"in n?!!n.trailing:x),h.cancel=l,h.flush=c,h}function Os(t){return lo(t,Et)}function Is(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new cc(st);var n=function{var r=arguments,i=e?e.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=t.apply(this,r);return n.cache=o.set(i,a)||o,a};return n.cache=new(Is.Cache||ln),n}function ks(t){if("function"!=typeof t)throw new cc(st);return function{var e=arguments;switch(e.length){case 0:return!t.call(this);case 1:return!t.call(this,e[0]);case 2:return!t.call(this,e[0],e[1]);case 3:return!t.call(this,e[0],e[1],e[2])}return!t.apply(this,e)}}function Rs(t){return Ps(2,t)}function Ds(t,e){if("function"!=typeof t)throw new cc(st);return e=e===it?e:wu(e),ni(t,e)}function Ls(t,e){if("function"!=typeof t)throw new cc(st);return e=null==e?0:Gc(wu(e),0),ni(function(n){var r=n[e],i=Si(n,0,e);return r&&m(i,r),s(t,this,i)})}function js(t,e,n){var r=!0,i=!0;if("function"!=typeof t)throw new cc(st);return iu(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),As(t,e,{leading:r,maxWait:e,trailing:i})}function Bs(t){return Es(t,1)}function Ns(t,e){return cd(wi(e),t)}function Fs{if(!arguments.length)return[];var t=arguments[0];return md(t)?t:[t]}function Us(t){return rr(t,pt)}function Ws(t,e){return e="function"==typeof e?e:it,rr(t,pt,e)}function Hs(t){return rr(t,ht|pt)}function zs(t,e){return e="function"==typeof e?e:it,rr(t,ht|pt,e)}function Xs(t,e){return null==e||or(t,e,Uu(e))}function Gs(t,e){return t===e||t!==t&&e!==e}function qs(t){return null!=t&&ru(t.length)&&!eu(t)}function Vs(t){return ou(t)&&qs(t)}function Ys(t){return!0===t||!1===t||ou(t)&&yr(t)==zt}function Ks(t){return ou(t)&&1===t.nodeType&&!pu(t)}function $s(t){if(null==t)return!0;if(qs(t)&&(md(t)||"string"==typeof t||"function"==typeof t.splice||yd(t)||Td(t)||gd(t)))return!t.length;var e=Ph(t);if(e==Kt||e==ee)return!t.size;if(Wo(t))return!Nr(t).length;for(var n in t)if(mc.call(t,n))return!1;return!0}function Js(t,e){return Ar(t,e)}function Zs(t,e,n){n="function"==typeof n?n:it;var r=n?n(t,e):it;return r===it?Ar(t,e,it,n):!!r}function Qs(t){if(!ou(t))return!1;var e=yr(t);return e==qt||e==Gt||"string"==typeof t.message&&"string"==typeof t.name&&!pu(t)}function tu(t){return"number"==typeof t&&Hc(t)}function eu(t){if(!iu(t))return!1;var e=yr(t);return e==Vt||e==Yt||e==Ht||e==Qt}function nu(t){return"number"==typeof t&&t==wu(t)}function ru(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=Rt}function iu(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function ou(t){return null!=t&&"object"==typeof t}function au(t,e){return t===e||kr(t,e,So(e))}function su(t,e,n){return n="function"==typeof n?n:it,kr(t,e,So(e),n)}function uu(t){return du(t)&&t!=+t}function lu(t){if(Mh(t))throw new ic(at);return Rr(t)}function cu(t){return null===t}function hu(t){return null==t}function du(t){return"number"==typeof t||ou(t)&&yr(t)==$t}function pu(t){if(!ou(t)||yr(t)!=Zt)return!1;var e=Mc(t);if(null===e)return!0;var n=mc.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&gc.call(n)==bc}function fu(t){return nu(t)&&t>=-Rt&&t<=Rt}function gu(t){return"string"==typeof t||!md(t)&&ou(t)&&yr(t)==ne}function mu(t){return"symbol"==typeof t||ou(t)&&yr(t)==re}function vu(t){return t===it}function yu(t){return ou(t)&&Ph(t)==oe}function _u(t){return ou(t)&&yr(t)==ae}function bu(t){if(!t)return[];if(qs(t))return gu(t)?tt(t):Bi(t);if(kc&&t[kc])return G(t[kc]);var e=Ph(t);return(e==Kt?q:e==ee?K:Qu)(t)}function xu(t){if(!t)return 0===t?t:0;if((t=Su(t))===kt||t===-kt){return(t<0?-1:1)*Dt}return t===t?t:0}function wu(t){var e=xu(t),n=e%1;return e===e?n?e-n:e:0}function Tu(t){return t?nr(wu(t),0,jt):0}function Su(t){if("number"==typeof t)return t;if(mu(t))return Lt;if(iu(t)){var e="function"==typeof t.valueOf?t.valueOf:t;t=iu(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(De,"");var n=Ge.test(t);return n||Ve.test(t)?On(t.slice(2),n?2:8):Xe.test(t)?Lt:+t}function Eu(t){return Ni(t,Wu(t))}function Pu(t){return t?nr(wu(t),-Rt,Rt):0===t?t:0}function Mu(t){return null==t?"":pi(t)}function Cu(t,e){var n=ph(t);return null==e?n:Zn(n,e)}function Au(t,e){return w(t,wo(e,3),pr)}function Ou(t,e){return w(t,wo(e,3),fr)}function Iu(t,e){return null==t?t:mh(t,wo(e,3),Wu)}function ku(t,e){return null==t?t:vh(t,wo(e,3),Wu)}function Ru(t,e){return t&&pr(t,wo(e,3))}function Du(t,e){return t&&fr(t,wo(e,3))}function Lu(t){return null==t?[]:gr(t,Uu(t))}function ju(t){return null==t?[]:gr(t,Wu(t))}function Bu(t,e,n){var r=null==t?it:mr(t,e);return r===it?n:r}function Nu(t,e){return null!=t&&Ao(t,e,br)}function Fu(t,e){return null!=t&&Ao(t,e,xr)}function Uu(t){return qs(t)?kn(t):Nr(t)}function Wu(t){return qs(t)?kn(t,!0):Fr(t)}function Hu(t,e){var n={};return e=wo(e,3),pr(t,function(t,r,i){tr(n,e(t,r,i),t)}),n}function zu(t,e){var n={};return e=wo(e,3),pr(t,function(t,r,i){tr(n,r,e(t,r,i))}),n}function Xu(t,e){return Gu(t,ks(wo(e)))}function Gu(t,e){if(null==t)return{};var n=g(_o(t),function(t){return[t]});return e=wo(e),Kr(t,n,function(t,n){return e(t,n[0])})}function qu(t,e,n){e=Ti(e,t);var r=-1,i=e.length;for(i||(i=1,t=it);++r<i;){var o=null==t?it:t[Qo(e[r])];o===it&&(r=i,o=n),t=eu(o)?o.call(t):o}return t}function Vu(t,e,n){return null==t?t:oi(t,e,n)}function Yu(t,e,n,r){return r="function"==typeof r?r:it,null==t?t:oi(t,e,n,r)}function Ku(t,e,n){var r=md(t),i=r||yd(t)||Td(t);if(e=wo(e,4),null==n){var o=t&&t.constructor;n=i?r?new o:[]:iu(t)&&eu(o)?ph(Mc(t)):{}}return(i?l:pr)(t,function(t,r,i){return e(n,t,r,i)}),n}function $u(t,e){return null==t||gi(t,e)}function Ju(t,e,n){return null==t?t:mi(t,e,wi(n))}function Zu(t,e,n,r){return r="function"==typeof r?r:it,null==t?t:mi(t,e,wi(n),r)}function Qu(t){return null==t?[]:j(t,Uu(t))}function tl(t){return null==t?[]:j(t,Wu(t))}function el(t,e,n){return n===it&&(n=e,e=it),n!==it&&(n=Su(n),n=n===n?n:0),e!==it&&(e=Su(e),e=e===e?e:0),nr(Su(t),e,n)}function nl(t,e,n){return e=xu(e),n===it?(n=e,e=0):n=xu(n),t=Su(t),wr(t,e,n)}function rl(t,e,n){if(n&&"boolean"!=typeof n&&jo(t,e,n)&&(e=n=it),n===it&&("boolean"==typeof e?(n=e,e=it):"boolean"==typeof t&&(n=t,t=it)),t===it&&e===it?(t=0,e=1):(t=xu(t),e===it?(e=t,t=0):e=xu(e)),t>e){var r=t;t=e,e=r}if(n||t%1||e%1){var i=Kc;return qc(t+i*(e-t+An("1e-"+((i+"").length-1))),e)}return Qr(t,e)}function il(t){return Kd(Mu(t).toLowerCase)}function ol(t){return(t=Mu(t))&&t.replace(Ke,qn).replace(mn,"")}function al(t,e,n){t=Mu(t),e=pi(e);var r=t.length;n=n===it?r:nr(wu(n),0,r);var i=n;return(n-=e.length)>=0&&t.slice(n,i)==e}function sl(t){return t=Mu(t),t&&Se.test(t)?t.replace(we,Vn):t}function ul(t){return t=Mu(t),t&&Re.test(t)?t.replace(ke,"\\$&"):t}function ll(t,e,n){t=Mu(t),e=wu(e);var r=e?Q(t):0;if(!e||r>=e)return t;var i=(e-r)/2;return no(Fc(i),n)+t+no(Nc(i),n)}function cl(t,e,n){t=Mu(t),e=wu(e);var r=e?Q(t):0;return e&&r<e?t+no(e-r,n):t}function hl(t,e,n){t=Mu(t),e=wu(e);var r=e?Q(t):0;return e&&r<e?no(e-r,n)+t:t}function dl(t,e,n){return n||null==e?e=0:e&&(e=+e),Yc(Mu(t).replace(Le,""),e||0)}function pl(t,e,n){return e=(n?jo(t,e,n):e===it)?1:wu(e),ei(Mu(t),e)}function fl{var t=arguments,e=Mu(t[0]);return t.length<3?e:e.replace(t[1],t[2])}function gl(t,e,n){return n&&"number"!=typeof n&&jo(t,e,n)&&(e=n=it),(n=n===it?jt:n>>>0)?(t=Mu(t),t&&("string"==typeof e||null!=e&&!xd(e))&&!(e=pi(e))&&z(t)?Si(tt(t),0,n):t.split(e,n)):[]}function ml(t,e,n){return t=Mu(t),n=null==n?0:nr(wu(n),0,t.length),e=pi(e),t.slice(n,n+e.length)==e}function vl(t,e,r){var i=n.templateSettings;r&&jo(t,e,r)&&(e=it),t=Mu(t),e=Cd({},e,i,co);var o,a,s=Cd({},e.imports,i.imports,co),u=Uu(s),l=j(s,u),c=0,h=e.interpolate||$e,d="__p += '",p=uc((e.escape||$e).source+"|"+h.source+"|"+(h===Me?He:$e).source+"|"+(e.evaluate||$e).source+"|$","g"),f="//# sourceURL="+("sourceURL"in e?e.sourceURL:"lodash.templateSources["+ ++wn+"]")+"\n";t.replace(p,function(e,n,r,i,s,u){return r||(r=i),d+=t.slice(c,u).replace(Je,W),n&&(o=!0,d+="' +\n__e("+n+") +\n'"),s&&(a=!0,d+="';\n"+s+";\n__p += '"),r&&(d+="' +\n((__t = ("+r+")) == null ?  : __t) +\n'"),c=u+e.length,e}),d+="';\n";var g=e.variable;g||(d="with (obj) {\n"+d+"\n}\n"),d=(a?d.replace(ye,""):d).replace(_e,"$1").replace(be,"$1;"),d="function("+(g||"obj")+") {\n"+(g?"":"obj || (obj = {});\n")+"var __t, __p = "+(o?", __e = _.escape":"")+(a?", __j = Array.prototype.join;\nfunction print { __p += __j.call(arguments, '') }\n":";\n")+d+"return __p\n}";var m=$d(function{return oc(u,f+"return "+d).apply(it,l)});if(m.source=d,Qs(m))throw m;return m}function yl(t){return Mu(t).toLowerCase}function _l(t){return Mu(t).toUpperCase}function bl(t,e,n){if((t=Mu(t))&&(n||e===it))return t.replace(De,"");if(!t||!(e=pi(e)))return t;var r=tt(t),i=tt(e);return Si(r,N(r,i),F(r,i)+1).join("")}function xl(t,e,n){if((t=Mu(t))&&(n||e===it))return t.replace(je,"");if(!t||!(e=pi(e)))return t;var r=tt(t);return Si(r,0,F(r,tt(e))+1).join("")}function wl(t,e,n){if((t=Mu(t))&&(n||e===it))return t.replace(Le,"");if(!t||!(e=pi(e)))return t;var r=tt(t);return Si(r,N(r,tt(e))).join("")}function Tl(t,e){var n=Pt,r=Mt;if(iu(e)){var i="separator"in e?e.separator:i;n="length"in e?wu(e.length):n,r="omission"in e?pi(e.omission):r}t=Mu(t);var o=t.length;if(z(t)){var a=tt(t);o=a.length}if(n>=o)return t;var s=n-Q(r);if(s<1)return r;var u=a?Si(a,0,s).join(""):t.slice(0,s);if(i===it)return u+r;if(a&&(s+=u.length-s),xd(i)){if(t.slice(s).search(i)){var l,c=u;for(i.global||(i=uc(i.source,Mu(ze.exec(i))+"g")),i.lastIndex=0;l=i.exec(c);)var h=l.index;u=u.slice(0,h===it?s:h)}}else if(t.indexOf(pi(i),s)!=s){var d=u.lastIndexOf(i);d>-1&&(u=u.slice(0,d))}return u+r}function Sl(t){return t=Mu(t),t&&Te.test(t)?t.replace(xe,Yn):t}function El(t,e,n){return t=Mu(t),e=n?it:e,e===it?X(t)?rt(t):x(t):t.match(e)||[]}function Pl(t){var e=null==t?0:t.length,n=wo;return t=e?g(t,function(t){if("function"!=typeof t[1])throw new cc(st);return[n(t[0]),t[1]]}):[],ni(function(n){for(var r=-1;++r<e;){var i=t[r];if(s(i[0],this,n))return s(i[1],this,n)}})}function Ml(t){return ir(rr(t,ht))}function Cl(t){return function{return t}}function Al(t,e){return null==t||t!==t?e:t}function Ol(t){return t}function Il(t){return Br("function"==typeof t?t:rr(t,ht))}function kl(t){return Hr(rr(t,ht))}function Rl(t,e){return zr(t,rr(e,ht))}function Dl(t,e,n){var r=Uu(e),i=gr(e,r);null!=n||iu(e)&&(i.length||!r.length)||(n=e,e=t,t=this,i=gr(e,Uu(e)));var o=!(iu(n)&&"chain"in n&&!n.chain),a=eu(t);return l(i,function(n){var r=e[n];t[n]=r,a&&(t.prototype[n]=function{var e=this.__chain__;if(o||e){var n=t(this.__wrapped__);return(n.__actions__=Bi(this.__actions__)).push({func:r,args:arguments,thisArg:t}),n.__chain__=e,n}return r.apply(t,m([this.value],arguments))})}),t}function Ll{return Rn._===this&&(Rn._=xc),this}function jl{}function Bl(t){return t=wu(t),ni(function(e){return qr(e,t)})}function Nl(t){return Bo(t)?C(Qo(t)):$r(t)}function Fl(t){return function(e){return null==t?it:mr(t,e)}}function Ul{return[]}function Wl{return!1}function Hl{return{}}function zl{return""}function Xl{return!0}function Gl(t,e){if((t=wu(t))<1||t>Rt)return[];var n=jt,r=qc(t,jt);e=wo(e),t-=jt;for(var i=R(r,e);++n<t;)e(n);return i}function ql(t){return md(t)?g(t,Qo):mu(t)?[t]:Bi(Ih(Mu(t)))}function Vl(t){var e=++vc;return Mu(t)+e}function Yl(t){return t&&t.length?lr(t,Ol,_r):it}function Kl(t,e){return t&&t.length?lr(t,wo(e,2),_r):it}function $l(t){return M(t,Ol)}function Jl(t,e){return M(t,wo(e,2))}function Zl(t){return t&&t.length?lr(t,Ol,Ur):it}function Ql(t,e){return t&&t.length?lr(t,wo(e,2),Ur):it}function tc(t){return t&&t.length?k(t,Ol):0}function ec(t,e){return t&&t.length?k(t,wo(e,2)):0}e=null==e?Rn:Kn.defaults(Rn.Object,e,Kn.pick(Rn,xn));var nc=e.Array,rc=e.Date,ic=e.Error,oc=e.Function,ac=e.Math,sc=e.Object,uc=e.RegExp,lc=e.String,cc=e.TypeError,hc=nc.prototype,dc=oc.prototype,pc=sc.prototype,fc=e["__core-js_shared__"],gc=dc.toString,mc=pc.hasOwnProperty,vc=0,yc=function{var t=/[^.]+$/.exec(fc&&fc.keys&&fc.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""},_c=pc.toString,bc=gc.call(sc),xc=Rn._,wc=uc("^"+gc.call(mc).replace(ke,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\| for .+?(?=\\\])/g,"$1.*?")+"$"),Tc=jn?e.Buffer:it,Sc=e.Symbol,Ec=e.Uint8Array,Pc=Tc?Tc.allocUnsafe:it,Mc=V(sc.getPrototypeOf,sc),Cc=sc.create,Ac=pc.propertyIsEnumerable,Oc=hc.splice,Ic=Sc?Sc.isConcatSpreadable:it,kc=Sc?Sc.iterator:it,Rc=Sc?Sc.toStringTag:it,Dc=function{try{var t=Eo(sc,"defineProperty");return t({},"",{}),t}catch(t){}},Lc=e.clearTimeout!==Rn.clearTimeout&&e.clearTimeout,jc=rc&&rc.now!==Rn.Date.now&&rc.now,Bc=e.setTimeout!==Rn.setTimeout&&e.setTimeout,Nc=ac.ceil,Fc=ac.floor,Uc=sc.getOwnPropertySymbols,Wc=Tc?Tc.isBuffer:it,Hc=e.isFinite,zc=hc.join,Xc=V(sc.keys,sc),Gc=ac.max,qc=ac.min,Vc=rc.now,Yc=e.parseInt,Kc=ac.random,$c=hc.reverse,Jc=Eo(e,"DataView"),Zc=Eo(e,"Map"),Qc=Eo(e,"Promise"),th=Eo(e,"Set"),eh=Eo(e,"WeakMap"),nh=Eo(sc,"create"),rh=eh&&new eh,ih={},oh=ta(Jc),ah=ta(Zc),sh=ta(Qc),uh=ta(th),lh=ta(eh),ch=Sc?Sc.prototype:it,hh=ch?ch.valueOf:it,dh=ch?ch.toString:it,ph=function{function t{}return function(e){if(!iu(e))return{};if(Cc)return Cc(e);t.prototype=e;var n=new t;return t.prototype=it,n}};n.templateSettings={escape:Ee,evaluate:Pe,interpolate:Me,variable:"",imports:{_:n}},n.prototype=r.prototype,n.prototype.constructor=n,i.prototype=ph(r.prototype),i.prototype.constructor=i,b.prototype=ph(r.prototype),b.prototype.constructor=b,nt.prototype.clear=Ue,nt.prototype.delete=Ze,nt.prototype.get=Qe,nt.prototype.has=tn,nt.prototype.set=en,nn.prototype.clear=rn,nn.prototype.delete=on,nn.prototype.get=an,nn.prototype.has=sn,nn.prototype.set=un,ln.prototype.clear=cn,ln.prototype.delete=hn,ln.prototype.get=dn,ln.prototype.has=pn,ln.prototype.set=fn,vn.prototype.add=vn.prototype.push=yn,vn.prototype.has=_n,bn.prototype.clear=En,bn.prototype.delete=Pn,bn.prototype.get=Mn,bn.prototype.has=Cn,bn.prototype.set=In;var fh=zi(pr),gh=zi(fr,!0),mh=Xi,vh=Xi(!0),yh=rh?function(t,e){return rh.set(t,e),t}:Ol,_h=Dc?function(t,e){return Dc(t,"toString",{configurable:!0,enumerable:!1,value:Cl(e),writable:!0})}:Ol,bh=ni,xh=Lc||function(t){return Rn.clearTimeout(t)},wh=th&&1/K(new th([,-0]))[1]==kt?function(t){return new th(t)}:jl,Th=rh?function(t){return rh.get(t)}:jl,Sh=Uc?function(t){return null==t?[]:(t=sc(t),d(Uc(t),function(e){return Ac.call(t,e)}))}:Ul,Eh=Uc?function(t){for(var e=[];t;)m(e,Sh(t)),t=Mc(t);return e}:Ul,Ph=yr;(Jc&&Ph(new Jc(new ArrayBuffer(1)))!=ue||Zc&&Ph(new Zc)!=Kt||Qc&&"[object Promise]"!=Ph(Qc.resolve)||th&&Ph(new th)!=ee||eh&&Ph(new eh)!=oe)&&(Ph=function(t){var e=yr(t),n=e==Zt?t.constructor:it,r=n?ta(n):"";if(r)switch(r){case oh:return ue;case ah:return Kt;case sh:return"[object Promise]";case uh:return ee;case lh:return oe}return e});var Mh=fc?eu:Wl,Ch=Jo(yh),Ah=Bc||function(t,e){return Rn.setTimeout(t,e)},Oh=Jo(_h),Ih=function(t){var e=Is(t,function(t){return n.size===lt&&n.clear,t}),n=e.cache;return e}(function(t){var e=[];return Oe.test(t)&&e.push(""),t.replace(Ie,function(t,n,r,i){e.push(r?i.replace(We,"$1"):n||t)}),e}),kh=ni(function(t,e){return Vs(t)?sr(t,dr(e,1,Vs,!0)):[]}),Rh=ni(function(t,e){var n=xa(e);return Vs(n)&&(n=it),Vs(t)?sr(t,dr(e,1,Vs,!0),wo(n,2)):[]}),Dh=ni(function(t,e){var n=xa(e);return Vs(n)&&(n=it),Vs(t)?sr(t,dr(e,1,Vs,!0),it,n):[]}),Lh=ni(function(t){var e=g(t,xi);return e.length&&e[0]===t[0]?Tr(e):[]}),jh=ni(function(t){var e=xa(t),n=g(t,xi);return e===xa(n)?e=it:n.pop,n.length&&n[0]===t[0]?Tr(n,wo(e,2)):[]}),Bh=ni(function(t){var e=xa(t),n=g(t,xi);return e="function"==typeof e?e:it,e&&n.pop,n.length&&n[0]===t[0]?Tr(n,it,e):[]}),Nh=ni(Sa),Fh=vo(function(t,e){var n=null==t?0:t.length,r=er(t,e);return Zr(t,g(e,function(t){return Lo(t,n)?+t:t}).sort(Ri)),r}),Uh=ni(function(t){return fi(dr(t,1,Vs,!0))}),Wh=ni(function(t){var e=xa(t);return Vs(e)&&(e=it),fi(dr(t,1,Vs,!0),wo(e,2))}),Hh=ni(function(t){var e=xa(t);return e="function"==typeof e?e:it,fi(dr(t,1,Vs,!0),it,e)}),zh=ni(function(t,e){return Vs(t)?sr(t,e):[]}),Xh=ni(function(t){return _i(d(t,Vs))}),Gh=ni(function(t){var e=xa(t);return Vs(e)&&(e=it),_i(d(t,Vs),wo(e,2))}),qh=ni(function(t){var e=xa(t);return e="function"==typeof e?e:it,_i(d(t,Vs),it,e)}),Vh=ni(qa),Yh=ni(function(t){var e=t.length,n=e>1?t[e-1]:it;return n="function"==typeof n?(t.pop,n):it,Va(t,n)}),Kh=vo(function(t){var e=t.length,n=e?t[0]:0,r=this.__wrapped__,o=function(e){return er(e,t)};return!(e>1||this.__actions__.length)&&r instanceof b&&Lo(n)?(r=r.slice(n,+n+(e?1:0)),r.__actions__.push({func:Za,args:[o],thisArg:it}),new i(r,this.__chain__).thru(function(t){return e&&!t.length&&t.push(it),t})):this.thru(o)}),$h=Wi(function(t,e,n){mc.call(t,n)?++t[n]:tr(t,n,1)}),Jh=$i(ha),Zh=$i(da),Qh=Wi(function(t,e,n){mc.call(t,n)?t[n].push(e):tr(t,n,[e])}),td=ni(function(t,e,n){var r=-1,i="function"==typeof e,o=qs(t)?nc(t.length):[];return fh(t,function(t){o[++r]=i?s(e,t,n):Er(t,e,n)}),o}),ed=Wi(function(t,e,n){tr(t,n,e)}),nd=Wi(function(t,e,n){t[n?0:1].push(e)},function{return],[}),rd=ni(function(t,e){if(null==t)return[];var n=e.length;return n>1&&jo(t,e[0],e[1])?e=[]:n>2&&jo(e[0],e[1],e[2])&&(e=[e[0]]),Vr(t,dr(e,1),[])}),id=jc||function{return Rn.Date.now},od=ni(function(t,e,n){var r=mt;if(n.length){var i=Y(n,xo(od));r|=xt}return lo(t,r,e,n,i)}),ad=ni(function(t,e,n){var r=mt|vt;if(n.length){var i=Y(n,xo(ad));r|=xt}return lo(e,r,t,n,i)}),sd=ni(function(t,e){return ar(t,1,e)}),ud=ni(function(t,e,n){return ar(t,Su(e)||0,n)});Is.Cache=ln;var ld=bh(function(t,e){e=1==e.length&&md(e[0])?g(e[0],L(wo)):g(dr(e,1),L(wo));var n=e.length;return ni(function(r){for(var i=-1,o=qc(r.length,n);++i<o;)r[i]=e[i].call(this,r[i]);return s(t,this,r)})}),cd=ni(function(t,e){var n=Y(e,xo(cd));return lo(t,xt,it,e,n)}),hd=ni(function(t,e){var n=Y(e,xo(hd));return lo(t,wt,it,e,n)}),dd=vo(function(t,e){return lo(t,St,it,it,it,e)}),pd=oo(_r),fd=oo(function(t,e){return t>=e}),gd=Pr(function{return arguments})?Pr:function(t){return ou(t)&&mc.call(t,"callee")&&!Ac.call(t,"callee")},md=nc.isArray,vd=Fn?L(Fn):Mr,yd=Wc||Wl,_d=Un?L(Un):Cr,bd=Wn?L(Wn):Ir,xd=Hn?L(Hn):Dr,wd=zn?L(zn):Lr,Td=Xn?L(Xn):jr,Sd=oo(Ur),Ed=oo(function(t,e){return t<=e}),Pd=Hi(function(t,e){if(Wo(e)||qs(e))return void Ni(e,Uu(e),t);for(var n in e)mc.call(e,n)&&Gn(t,n,e[n])}),Md=Hi(function(t,e){Ni(e,Wu(e),t)}),Cd=Hi(function(t,e,n,r){Ni(e,Wu(e),t,r)}),Ad=Hi(function(t,e,n,r){Ni(e,Uu(e),t,r)}),Od=vo(er),Id=ni(function(t){return t.push(it,co),s(Cd,it,t)}),kd=ni(function(t){return t.push(it,ho),s(Bd,it,t)}),Rd=Qi(function(t,e,n){t[e]=n},Cl(Ol)),Dd=Qi(function(t,e,n){mc.call(t,e)?t[e].push(n):t[e]=[n]},wo),Ld=ni(Er),jd=Hi(function(t,e,n){Xr(t,e,n)}),Bd=Hi(function(t,e,n,r){Xr(t,e,n,r)}),Nd=vo(function(t,e){var n={};if(null==t)return n;var r=!1;e=g(e,function(e){return e=Ti(e,t),r||(r=e.length>1),e}),Ni(t,_o(t),n),r&&(n=rr(n,ht|dt|pt,po));for(var i=e.length;i--;)gi(n,e[i]);return n}),Fd=vo(function(t,e){return null==t?{}:Yr(t,e)}),Ud=uo(Uu),Wd=uo(Wu),Hd=Vi(function(t,e,n){return e=e.toLowerCase,t+(n?il(e):e)}),zd=Vi(function(t,e,n){return t+(n?"-":"")+e.toLowerCase}),Xd=Vi(function(t,e,n){return t+(n?" ":"")+e.toLowerCase}),Gd=qi("toLowerCase"),qd=Vi(function(t,e,n){return t+(n?"_":"")+e.toLowerCase}),Vd=Vi(function(t,e,n){return t+(n?" ":"")+Kd(e)}),Yd=Vi(function(t,e,n){return t+(n?" ":"")+e.toUpperCase}),Kd=qi("toUpperCase"),$d=ni(function(t,e){try{return s(t,it,e)}catch(t){return Qs(t)?t:new ic(t)}}),Jd=vo(function(t,e){return l(e,function(e){e=Qo(e),tr(t,e,od(t[e],t))}),t}),Zd=Ji,Qd=Ji(!0),tp=ni(function(t,e){return function(n){return Er(n,t,e)}}),ep=ni(function(t,e){return function(n){return Er(t,n,e)}}),np=eo(g),rp=eo(h),ip=eo(_),op=io,ap=io(!0),sp=to(function(t,e){return t+e},0),up=so("ceil"),lp=to(function(t,e){return t/e},1),cp=so("floor"),hp=to(function(t,e){return t*e},1),dp=so("round"),pp=to(function(t,e){return t-e},0);return n.after=Ss,n.ary=Es,n.assign=Pd,n.assignIn=Md,n.assignInWith=Cd,n.assignWith=Ad,n.at=Od,n.before=Ps,n.bind=od,n.bindAll=Jd,n.bindKey=ad,n.castArray=Fs,n.chain=$a,n.chunk=ra,n.compact=ia,n.concat=oa,n.cond=Pl,n.conforms=Ml,n.constant=Cl,n.countBy=$h,n.create=Cu,n.curry=Ms,n.curryRight=Cs,n.debounce=As,n.defaults=Id,n.defaultsDeep=kd,n.defer=sd,n.delay=ud,n.difference=kh,n.differenceBy=Rh,n.differenceWith=Dh,n.drop=aa,n.dropRight=sa,n.dropRightWhile=ua,n.dropWhile=la,n.fill=ca,n.filter=ss,n.flatMap=us,n.flatMapDeep=ls,n.flatMapDepth=cs,n.flatten=pa,n.flattenDeep=fa,n.flattenDepth=ga,n.flip=Os,n.flow=Zd,n.flowRight=Qd,n.fromPairs=ma,n.functions=Lu,n.functionsIn=ju,n.groupBy=Qh,n.initial=_a,n.intersection=Lh,n.intersectionBy=jh,n.intersectionWith=Bh,n.invert=Rd,n.invertBy=Dd,n.invokeMap=td,n.iteratee=Il,n.keyBy=ed,n.keys=Uu,n.keysIn=Wu,n.map=fs,n.mapKeys=Hu,n.mapValues=zu,n.matches=kl,n.matchesProperty=Rl,n.memoize=Is,n.merge=jd,n.mergeWith=Bd,n.method=tp,n.methodOf=ep,n.mixin=Dl,n.negate=ks,n.nthArg=Bl,n.omit=Nd,n.omitBy=Xu,n.once=Rs,n.orderBy=gs,n.over=np,n.overArgs=ld,n.overEvery=rp,n.overSome=ip,n.partial=cd,n.partialRight=hd,n.partition=nd,n.pick=Fd,n.pickBy=Gu,n.property=Nl,n.propertyOf=Fl,n.pull=Nh,n.pullAll=Sa,n.pullAllBy=Ea,n.pullAllWith=Pa,n.pullAt=Fh,n.range=op,n.rangeRight=ap,n.rearg=dd,n.reject=ys,n.remove=Ma,n.rest=Ds,n.reverse=Ca,n.sampleSize=bs,n.set=Vu,n.setWith=Yu,n.shuffle=xs,n.slice=Aa,n.sortBy=rd,n.sortedUniq=ja,n.sortedUniqBy=Ba,n.split=gl,n.spread=Ls,n.tail=Na,n.take=Fa,n.takeRight=Ua,n.takeRightWhile=Wa,n.takeWhile=Ha,n.tap=Ja,n.throttle=js,n.thru=Za,n.toArray=bu,n.toPairs=Ud,n.toPairsIn=Wd,n.toPath=ql,n.toPlainObject=Eu,n.transform=Ku,n.unary=Bs,n.union=Uh,n.unionBy=Wh,n.unionWith=Hh,n.uniq=za,n.uniqBy=Xa,n.uniqWith=Ga,n.unset=$u,n.unzip=qa,n.unzipWith=Va,n.update=Ju,n.updateWith=Zu,n.values=Qu,n.valuesIn=tl,n.without=zh,n.words=El,n.wrap=Ns,n.xor=Xh,n.xorBy=Gh,n.xorWith=qh,n.zip=Vh,n.zipObject=Ya,n.zipObjectDeep=Ka,n.zipWith=Yh,n.entries=Ud,n.entriesIn=Wd,n.extend=Md,n.extendWith=Cd,Dl(n,n),n.add=sp,n.attempt=$d,n.camelCase=Hd,n.capitalize=il,n.ceil=up,n.clamp=el,n.clone=Us,n.cloneDeep=Hs,n.cloneDeepWith=zs,n.cloneWith=Ws,n.conformsTo=Xs,n.deburr=ol,n.defaultTo=Al,n.divide=lp,n.endsWith=al,n.eq=Gs,n.escape=sl,n.escapeRegExp=ul,n.every=as,n.find=Jh,n.findIndex=ha,n.findKey=Au,n.findLast=Zh,n.findLastIndex=da,n.findLastKey=Ou,n.floor=cp,n.forEach=hs,n.forEachRight=ds,n.forIn=Iu,n.forInRight=ku,n.forOwn=Ru,n.forOwnRight=Du,n.get=Bu,n.gt=pd,n.gte=fd,n.has=Nu,n.hasIn=Fu,n.head=va,n.identity=Ol,n.includes=ps,n.indexOf=ya,n.inRange=nl,n.invoke=Ld,n.isArguments=gd,n.isArray=md,n.isArrayBuffer=vd,n.isArrayLike=qs,n.isArrayLikeObject=Vs,n.isBoolean=Ys,n.isBuffer=yd,n.isDate=_d,n.isElement=Ks,n.isEmpty=$s,n.isEqual=Js,n.isEqualWith=Zs,n.isError=Qs,n.isFinite=tu,n.isFunction=eu,n.isInteger=nu,n.isLength=ru,n.isMap=bd,n.isMatch=au,n.isMatchWith=su,n.isNaN=uu,n.isNative=lu,n.isNil=hu,n.isNull=cu,n.isNumber=du,n.isObject=iu,n.isObjectLike=ou,n.isPlainObject=pu,n.isRegExp=xd,n.isSafeInteger=fu,n.isSet=wd,n.isString=gu,n.isSymbol=mu,n.isTypedArray=Td,n.isUndefined=vu,n.isWeakMap=yu,n.isWeakSet=_u,n.join=ba,n.kebabCase=zd,n.last=xa,n.lastIndexOf=wa,n.lowerCase=Xd,n.lowerFirst=Gd,n.lt=Sd,n.lte=Ed,n.max=Yl,n.maxBy=Kl,n.mean=$l,n.meanBy=Jl,n.min=Zl,n.minBy=Ql,n.stubArray=Ul,n.stubFalse=Wl,n.stubObject=Hl,n.stubString=zl,n.stubTrue=Xl,n.multiply=hp,n.nth=Ta,n.noConflict=Ll,n.noop=jl,n.now=id,n.pad=ll,n.padEnd=cl,n.padStart=hl,n.parseInt=dl,n.random=rl,n.reduce=ms,n.reduceRight=vs,n.repeat=pl,n.replace=fl,n.result=qu,n.round=dp,n.runInContext=t,n.sample=_s,n.size=ws,n.snakeCase=qd,n.some=Ts,n.sortedIndex=Oa,n.sortedIndexBy=Ia,n.sortedIndexOf=ka,n.sortedLastIndex=Ra,n.sortedLastIndexBy=Da,n.sortedLastIndexOf=La,n.startCase=Vd,n.startsWith=ml,n.subtract=pp,n.sum=tc,n.sumBy=ec,n.template=vl,n.times=Gl,n.toFinite=xu,n.toInteger=wu,n.toLength=Tu,n.toLower=yl,n.toNumber=Su,n.toSafeInteger=Pu,n.toString=Mu,n.toUpper=_l,n.trim=bl,n.trimEnd=xl,n.trimStart=wl,n.truncate=Tl,n.unescape=Sl,n.uniqueId=Vl,n.upperCase=Yd,n.upperFirst=Kd,n.each=hs,n.eachRight=ds,n.first=va,Dl(n,function{var t={};return pr(n,function(e,r){mc.call(n.prototype,r)||(t[r]=e)}),t},{chain:!1}),n.VERSION="4.17.4",l(["bind","bindKey","curry","curryRight","partial","partialRight"],function(t){n[t].placeholder=n}),l(["drop","take"],function(t,e){b.prototype[t]=function(n){n=n===it?1:Gc(wu(n),0);var r=this.__filtered__&&!e?new b(this):this.clone;return r.__filtered__?r.__takeCount__=qc(n,r.__takeCount__):r.__views__.push({size:qc(n,jt),type:t+(r.__dir__<0?"Right":"")}),r},b.prototype[t+"Right"]=function(e){return this.reverse[t](e).reverse}}),l(["filter","map","takeWhile"],function(t,e){var n=e+1,r=n==Ot||3==n;b.prototype[t]=function(t){var e=this.clone;return e.__iteratees__.push({iteratee:wo(t,3),type:n}),e.__filtered__=e.__filtered__||r,e}}),l(["head","last"],function(t,e){var n="take"+(e?"Right":"");b.prototype[t]=function{return this[n](1).value[0]}}),l(["initial","tail"],function(t,e){var n="drop"+(e?"":"Right");b.prototype[t]=function{return this.__filtered__?new b(this):this[n](1)}}),b.prototype.compact=function{return this.filter(Ol)},b.prototype.find=function(t){return this.filter(t).head},b.prototype.findLast=function(t){return this.reverse.find(t)},b.prototype.invokeMap=ni(function(t,e){return"function"==typeof t?new b(this):this.map(function(n){return Er(n,t,e)})}),b.prototype.reject=function(t){return this.filter(ks(wo(t)))},b.prototype.slice=function(t,e){t=wu(t);var n=this;return n.__filtered__&&(t>0||e<0)?new b(n):(t<0?n=n.takeRight(-t):t&&(n=n.drop(t)),e!==it&&(e=wu(e),n=e<0?n.dropRight(-e):n.take(e-t)),n)},b.prototype.takeRightWhile=function(t){return this.reverse.takeWhile(t).reverse},b.prototype.toArray=function{return this.take(jt)},pr(b.prototype,function(t,e){var r=/^(?:filter|find|map|reject)|While$/.test(e),o=/^(?:head|last)$/.test(e),a=n[o?"take"+("last"==e?"Right":""):e],s=o||/^find/.test(e);a&&(n.prototype[e]=function{var e=this.__wrapped__,u=o?[1]:arguments,l=e instanceof b,c=u[0],h=l||md(e),d=function(t){var e=a.apply(n,m([t],u));return o&&p?e[0]:e};h&&r&&"function"==typeof c&&1!=c.length&&(l=h=!1);var p=this.__chain__,f=!!this.__actions__.length,g=s&&!p,v=l&&!f;if(!s&&h){e=v?e:new b(this);var y=t.apply(e,u);return y.__actions__.push({func:Za,args:[d],thisArg:it}),new i(y,p)}return g&&v?t.apply(this,u):(y=this.thru(d),g?o?y.value[0]:y.value:y)})}),l(["pop","push","shift","sort","splice","unshift"],function(t){var e=hc[t],r=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",i=/^(?:pop|shift)$/.test(t);n.prototype[t]=function{var t=arguments;if(i&&!this.__chain__){var n=this.value;return e.apply(md(n)?n:[],t)}return this[r](function(n){return e.apply(md(n)?n:[],t)})}}),pr(b.prototype,function(t,e){var r=n[e];if(r){var i=r.name+"";(ih[i]||(ih[i]=[])).push({name:e,func:r})}}),ih[Zi(it,vt).name]=[{name:"wrapper",func:it}],b.prototype.clone=A,b.prototype.reverse=J,b.prototype.value=et,n.prototype.at=Kh,n.prototype.chain=Qa,n.prototype.commit=ts,n.prototype.next=es,n.prototype.plant=rs,n.prototype.reverse=is,n.prototype.toJSON=n.prototype.valueOf=n.prototype.value=os,n.prototype.first=n.prototype.head,kc&&(n.prototype[kc]=ns),n};Rn._=Kn,(i=function{return Kn}.call(e,n,e,r))!==it&&(r.exports=i)}).call(this)}).call(e,n(9),n(58)(t))},function(t,e){function n{throw new Error("setTimeout has not been defined")}function r{throw new Error("clearTimeout has not been defined")}function i(t){if(c===setTimeout)return setTimeout(t,0);if((c===n||!c)&&setTimeout)return c=setTimeout,setTimeout(t,0);try{return c(t,0)}catch(e){try{return c.call(null,t,0)}catch(e){return c.call(this,t,0)}}}function o(t){if(h===clearTimeout)return clearTimeout(t);if((h===r||!h)&&clearTimeout)return h=clearTimeout,clearTimeout(t);try{return h(t)}catch(e){try{return h.call(null,t)}catch(e){return h.call(this,t)}}}function a{g&&p&&(g=!1,p.length?f=p.concat(f):m=-1,f.length&&s)}function s{if(!g){var t=i(a);g=!0;for(var e=f.length;e;){for(p=f,f=[];++m<e;)p&&p[m].run;m=-1,e=f.length}p=null,g=!1,o(t)}}function u(t,e){this.fun=t,this.array=e}function l{}var c,h,d=t.exports={};!function{try{c="function"==typeof setTimeout?setTimeout:n}catch(t){c=n}try{h="function"==typeof clearTimeout?clearTimeout:r}catch(t){h=r}};var p,f=[],g=!1,m=-1;d.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];f.push(new u(t,e)),1!==f.length||g||i(s)},u.prototype.run=function{this.fun.apply(null,this.array)},d.title="browser",d.browser=!0,d.env={},d.argv=[],d.version="",d.versions={},d.on=l,d.addListener=l,d.once=l,d.off=l,d.removeListener=l,d.removeAllListeners=l,d.emit=l,d.prependListener=l,d.prependOnceListener=l,d.listeners=function(t){return[]},d.binding=function(t){throw new Error("process.binding is not supported")},d.cwd=function{return"/"},d.chdir=function(t){throw new Error("process.chdir is not supported")},d.umask=function{return 0}},function(t,e,n){"use strict";function r{this.mute=!1,this.audioChannels=s.Channels,this.totalSounds=0,this.totalSoundsLoaded=0,this.loadComplete=!1,this.cameraPos=o.create(0,0),this.fadeInSounds=[],this.queuedSounds=[],this.queuedInstances=[],this.localActionSoundInstance=null,i.Sound.initializeDefaultPlugins,i.Sound.defaultInterruptBehavior=i.Sound.INTERRUPT_LATE,i.Sound.volume=.5,i.Sound.on("fileload",this.loadHandler,this),this.preloadSounds}var i=n(52),o=n(0),a=n(1),s=n(43),u=n(4);r.prototype={preloadSounds:function{for(var t in this.audioChannels){var e=this.audioChannels[t],n=this.loadSounds(e.list);for(var r in n)n[r]&&(this.totalSounds+=1)}for(var o in this.audioChannels){var a=this.audioChannels[o],s=this.loadSounds(a.list);for(var u in s)if(s[u]){var l=s[u];l.maxInstances?i.Sound.registerSound(l.name,u+o,l.maxInstances):i.Sound.registerSound(l.name,u+o)}}},loadHandler:function(t){this.totalSoundsLoaded+=1,this.totalSoundsLoaded==this.totalSounds&&(this.loadComplete=!0)},update:function(t){if(this.loadComplete){for(var e=0;e<this.queuedSounds.length;e++){var n=this.queuedSounds[e],r=this.playSound(n.sound,n.options);this.queuedInstances.push(r)}this.queuedSounds=[]}for(var i=0;i<this.fadeInSounds.length;i++){var o=this.fadeInSounds[i];o&&(o.volume=Math.min(1,o.volume+t),this.fadeInSounds[i]=1==o.volume?null:o)}},queueSound:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.queuedSounds.push({sound:t,options:e}),this.queuedSounds.length-1},getQueuedInstance:function(t){return this.queuedInstances[t]},playSound:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if("none"==t)return!1;e.channel=e.channel||"activePlayer",e.fadeIn=e.fadeIn||!1,e.loop=e.loop||!1,e.soundPos=e.soundPos||!1,e.fallOff=e.fallOff||0,e.delay=e.delay||0,e.ignoreMinAllowable=e.ignoreMinAllowable||!1;var n=this.audioChannels[e.channel];if(n&&(!this.mute||"ambient"==e.channel)){var r=!1;if("activePlayer"!=e.channel&&e.soundPos){var s=o.sub(this.cameraPos,e.soundPos),u=o.length(s),l=a.clamp(Math.abs(u/n.maxRange),0,1),c=Math.pow(1-l,1+2*e.fallOff),h=n.volume*c;if(h>.003||e.ignoreMinAllowable){var d=a.clamp(s.x/n.maxRange*-1,-1,1);r=i.Sound.play(t+e.channel,{loop:e.loop?-1:0,volume:e.fadeIn?0:h,pan:d,delay:e.delay,interrupt:i.Sound.INTERRUPT_LATE})}}else{var p=n.volume;r=i.Sound.play(t+e.channel,{loop:e.loop?-1:0,volume:e.fadeIn?0:p,delay:e.delay})}if(r)return e.fadeIn&&this.fadeInSounds.push(r),r}return!1},playGroup:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=s.Groups[t];if(n){var r=n.sounds,i=Math.floor(u.random(0,r.length));e.channel=n.channel;return this.playSound(r[i],e)}},updateSound:function(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,i=this.audioChannels[e];if(t&&i){var s=o.sub(this.cameraPos,n),u=o.length(s),l=a.clamp(Math.abs(u/i.maxRange),0,1),c=Math.pow(1-l,2+2*r),h=this.channelVolume*c*1;if(h>.003){var d=a.clamp(s.x/i.maxRange*-1,-1,1);return t.volume=h,t.pan=d,t}return!1}},setVolume:function(t,e){if(!t)return!1;if(e<=.003)this.stopSound(t);else{var n=n*t.volume;t.volume=n}},setMute:function(t){return this.mute=t,i.Sound._setMute(this.mute),this.mute},setDelay:function(t,e){if(!t)return!1;t.delay=e},muteToggle:function{return this.mute=!this.mute,i.Sound._setMute(this.mute),this.mute},stopSound:function(t){return!!t&&t.stop},stopLocalActionSound:function{return!!this.localActionSoundInstance&&(this.localActionSoundInstance.playState==i.Sound.PLAY_SUCCEEDED?this.localActionSoundInstance.stop:void 0)},stopAll:function{i.Sound.stop},removeSound:function(t){for(var e=0;e<this.fadeInSounds.length;e++){var n=this.fadeInSounds[e];if(n&&n.src==t){this.fadeInSounds.splice(e,1);break}}i.Sound.removeSound(t)},registerSound:function(t){for(var e in this.audioChannels){var n=this.audioChannels[e],r=this.loadSounds(n.list);for(var o in r)if(o==t){var a=r[o];i.Sound.registerSound(a.name,o+e)}}},loadSounds:function(t){return s.Sounds[t]},isSoundPlaying:function(t){return!!t&&t.playState==i.Sound.PLAY_SUCCEEDED}},t.exports=r},function(t,e,n){"use strict";function r{this.timeout=3e3,this.sent=0,this.throttleTimeout=0}var i=n(6),o="AIzaSyCrPuZeAQ2-aXZdTwZNwQJdv4rvsTE-2i8";r.prototype={update:function(t){this.throttleTimeout>0&&(this.throttleTimeout-=t,this.throttleTimeout<=0&&(this.sent=0))},throttle:function{return this.throttleTimeout>0||(this.sent++,this.sent>=5&&(this.throttleTimeout=60),!1)},storeRendererType:function(t){this.throttle||i.ajax({type:"POST",dataType:"html",url:"https://web.archive.org/web/20180104035806/https://us-central1-surviv-fa40f.cloudfunctions.net/storeRendererType",data:{renderer:t,key:o},timeout:this.timeout})},storeGeneric:function(t,e){this.throttle||i.ajax({type:"POST",dataType:"html",url:"https://web.archive.org/web/20180104035806/https://us-central1-surviv-fa40f.cloudfunctions.net/storeGeneric",data:{parent:t,child:e,key:o},timeout:this.timeout})},logWindowOnerror:function(t,e){this.throttle||i.ajax({type:"POST",dataType:"html",url:"https://web.archive.org/web/20180104035806/https://us-central1-surviv-fa40f.cloudfunctions.net/windowOnerror",data:{error:t,browser:e,key:o},timeout:this.timeout})}},t.exports=r},function(t,e,n){"use strict";function r(t,e,n,r,i){this.initialized=!1,this.gameId=0,this.onJoin=n,this.onQuit=r,this.onError=i,this.pixi=t,this.audioManager=e,this.ws=null,this.connecting=!1,this.connected=!1}var i=n(2),o=n(3),a=n(14),s=n(17),u=n(1),l=n(10),c=n(48),h=n(0),d=n(11),p=n(32),f=n(16),g=n(34),m=n(33),v=(n(35),n(36)),y=n(15),_=n(38),b=n(39),x=n(37),w=n(7),T=n(40),S=n(41),E=(n(42),n(44),n(45)),P=n(12),M=void 0!==P.getParameterByName("debug");r.prototype={tryJoinGame:function(t,e,n){var r=this;this.connecting=!0,this.connected=!1;try{this.ws=new WebSocket(e),this.ws.binaryType="arraybuffer",this.ws.onerror=function(t){console.log("Connection error",t),r.ws.close},this.ws.onopen=function{r.connecting=!1,r.connected=!0,r.init;var e=new l.JoinMsg;e.protocol=o.protocolVersion,e.name=t,r.sendMessage(l.Msg.Join,e)},this.ws.onmessage=function(t){for(var e=new l.MsgStream(t.data);;){var n=e.deserializeMsgType;if(n==l.Msg.None)break;r.onMessage(n,e.getStream)}},this.ws.onclose=function{if(r.connecting)n;else if(r.connected&&!r.gameOver){var t="";t=r.disconnectMsg&&""!=r.disconnectMsg?r.disconnectMsg:"Host closed the connection.",r.onError(t)}}}catch(t){n}},init:function{this.usingCanvas=!1,this.contexts={gas:null,map:null},this.bufferSprites={gas:null,map:null},2==this.pixi.renderer.type&&(this.usingCanvas=!0,this.drawCanvas(!0)),this.profiler=new c,this.input=new y.InputHandler(this.pixi.view),this.camera=new m,this.particleBarn=new w.ParticleBarn,this.playerBarn=new S.PlayerBarn(this.audioManager),this.bulletBarn=new p.BulletBarn(this.particleBarn,this.audioManager),this.explosionBarn=new v.ExplosionBarn(this.particleBarn,this.audioManager),this.deadBodyBarn=new g.DeadBodyBarn,this.lootBarn=new _.LootBarn,this.map=new b(this.particleBarn,this.audioManager),this.gas=new x(this.contexts.gas),this.pieTimer=new T.PieTimer,this.uiManager=new E.UiManager(this,this.profiler,this.contexts.map,this.audioManager,this.pieTimer,this.particleBarn),this.shotBarn=new f.ShotBarn(this.particleBarn,this.audioManager,this.uiManager),this.objectCreator=new d.Creator,this.objectCreator.registerType(s.Type.Player,this.playerBarn.playerPool),this.objectCreator.registerType(s.Type.Obstacle,this.map.obstaclePool),this.objectCreator.registerType(s.Type.LootSpawner,this.map.lootSpawnerPool),this.objectCreator.registerType(s.Type.Building,this.map.buildingPool),this.objectCreator.registerType(s.Type.Loot,this.lootBarn.lootPool),this.objectCreator.registerType(s.Type.DeadBody,this.deadBodyBarn.deadBodyPool);var t=[this.map.display.background,this.map.display.botObstacle,this.deadBodyBarn.display,this.lootBarn.display,this.playerBarn.display,this.bulletBarn.container,this.bulletBarn.debug,this.explosionBarn.debug,this.particleBarn.display,this.map.display.topObstacle,this.map.display.debug,this.gas.display.gas,this.bufferSprites.gas,this.pieTimer.container,this.uiManager.container,this.bufferSprites.map];this.rootDisplay=new i.Container;for(var e=0;e<t.length;e++){var n=t[e];n&&(this.rootDisplay.addChild(n),n.interactiveChildren=!1)}this.pixi.stage.addChild(this.rootDisplay),this.disconnectMsg="",this.playing=!1,this.gameOver=!1,this.spectating=!1,this.moveMsgTimeout=0,this.prevMoveMsg=new l.MoveMsg,this.localId=0,this.activeId=0,this.activePlayer=null,this.resize,this.targetZoom=1,this.debugZoom=1,this.useDebugZoom=!1,this.profilerSamples=[],this.profilerUpdateTicker=0,this.seq=0,this.ack=0,this.seqInFlight=!1,this.seqSendTime=0,this.pings=[],this.updateIntervals=[],this.lastUpdateTime=0,this.debugPingTime=0,this.initialized=!0},free:function{if(this.initialized){this.initialized=!1,this.input.free,this.map.free,this.gas.free,this.uiManager.free,this.pieTimer.destroy,this.shotBarn.free;for(var t=0;t<this.pixi.stage.children.length;t++){this.pixi.stage.children[t].destroy({children:!0,texture:!0})}this.ws.onmessage=function{},this.ws.close,this.ws=null}},loadConfig:function(t){this.camera.setShakeEnabled(t.getConfig("screenShake"))},update:function(t){this.profiler.beginSample("update"),this.profiler.beginSample("player"),this.playerBarn.update(t,this.activeId,this.particleBarn,this.camera,this.map,this.input),this.profiler.endSample,this.camera.pos=h.copy(this.activePlayer.pos),this.camera.applyShake;var e=this.activePlayer.getScopeZoom;this.editor&&this.editor.enabled&&(e=this.editor.zoom);var n=o.visualGridScale*e,r=Math.max(this.camera.screenWidth,this.camera.screenHeight*(16/9));this.camera.targetZoom=.5*r/(n*this.camera.ppu);var i=this.activePlayer.zoomFast?3:2,a=this.activePlayer.zoomFast?3:1.4,s=this.camera.targetZoom>this.camera.zoom?i:a;this.editor&&this.editor.enabled&&(s=9),this.camera.zoom=u.lerp(t*s,this.camera.zoom,this.camera.targetZoom),this.audioManager.cameraPos=h.copy(this.camera.pos),(this.input.keyPressed(y.Key.M)||this.input.keyPressed(y.Key.G))&&this.uiManager.displayMapLarge(!1),this.input.keyPressed(y.Key.Escape)&&this.uiManager.toggleEscMenu,this.input.keyPressed(y.Key.V)&&this.uiManager.toggleMiniMap;var c=this.activePlayer.pos,d=this.camera.screenToPoint(this.input.mousePos),p=h.sub(d,c);p=h.normalizeSafe(p,h.create(1,0)),this.activePlayer.dir=h.copy(p);var f=new l.MoveMsg;f.seq=this.seq,f.ack=this.ack,this.spectating||(f.moveLeft=this.input.keyDown(y.Key.Left)||this.input.keyDown(y.Key.A),f.moveRight=this.input.keyDown(y.Key.Right)||this.input.keyDown(y.Key.D),f.moveUp=this.input.keyDown(y.Key.Up)||this.input.keyDown(y.Key.W),f.moveDown=this.input.keyDown(y.Key.Down)||this.input.keyDown(y.Key.S),f.dir=h.copy(p),f.editMode=this.editor&&this.editor.enabled,this.uiManager.mouseUp&&this.input.flushMouse,f.editMode||(f.shootStart=this.input.mousePressed,f.shootHold=this.input.mouseDown&&!this.uiManager.mouseUp,f.reload=this.input.keyPressed(y.Key.R),f.interaction=this.input.keyPressed(y.Key.F),f.equipPrimary=this.input.keyPressed(y.Key.One)||this.uiManager.switchWeaponOne,f.equipSecondary=this.input.keyPressed(y.Key.Two)||this.uiManager.switchWeaponTwo,f.equipMelee=this.input.keyPressed(y.Key.Three)||this.input.keyPressed(y.Key.E),f.cancelAction=this.input.keyPressed(y.Key.X),f.useItem=this.uiManager.useItem,f.useScope=this.uiManager.useScope,f.scrollDown=this.input.mouseWheel<0,f.scrollUp=this.input.mouseWheel>0));var g=!1;for(var m in f)if(f.hasOwnProperty(m)){if("dir"==m){var v=u.clamp(h.dot(f[m],this.prevMoveMsg[m]),-1,1),_=u.rad2deg(Math.acos(v));g=_>.2}else this.prevMoveMsg[m]!=f[m]&&(g=!0);if(g)break}if(this.moveMsgTimeout-=t,(g||this.moveMsgTimeout<0)&&(this.seqInFlight||(this.seq=(this.seq+1)%256,this.seqSendTime=(new Date).getTime,this.seqInFlight=!0,f.seq=this.seq),this.sendMessage(l.Msg.Move,f),this.moveMsgTimeout=1,this.prevMoveMsg=f),this.uiManager.clearInputs,this.editor&&this.editor.enabled){var b=new l.EditMsg;b.zoom=this.editor.zoom,b.cull=this.editor.cull,this.sendMessage(l.Msg.Edit,b)}this.profiler.beginSample("map"),this.map.update(t,this.activePlayer.pos),this.gas.update,this.profiler.endSample,this.profiler.beginSample("loot"),this.lootBarn.update(t,this.activePlayer.pos),this.profiler.endSample,this.profiler.beginSample("bullets"),this.bulletBarn.update(t,this.playerBarn,this.map,this.camera,this.activeId,!this.activePlayer.netData.dead),this.profiler.endSample,this.explosionBarn.update(t,this.playerBarn,this.camera),this.shotBarn.update(t,this.playerBarn),this.profiler.beginSample("particles"),this.particleBarn.update(t,this.camera),this.profiler.endSample,this.deadBodyBarn.update(t,this.playerBarn,this.camera),this.profiler.beginSample("ui"),this.pieTimer.update(t,this.activePlayer,this.camera),this.uiManager.update(t,this.activePlayer,this.map,this.lootBarn),this.profiler.endSample,this.profiler.beginSample("render"),this.render(t),this.profiler.endSample,this.input.flush,this.profiler.endSample;var x=(this.profiler.flush,M||!1),w=(new Date).getTime;if(w>this.debugPingTime){this.debugPingTime=w+15e3;var T=function(t,e){return(" ".repeat(e)+t).slice(-e)},S=this.pings.sort(function(t,e){return t-e}),E=S.length;if(x&&E>0){var P=S[Math.floor(.5*E)],C=S[Math.floor(.95*E)],A=S[E-1];console.log("Ping    min: "+T(S[0].toFixed(2),7)+" med: "+T(P.toFixed(2),7)+" p95: "+T(C.toFixed(2),7)+" max: "+T(A.toFixed(2),7))}this.pings=[];var O=this.updateIntervals.sort(function(t,e){return t-e}),I=O.length;if(x&&I>0){var k=O[Math.floor(.5*I)],R=O[Math.floor(.95*I)],D=O[I-1];console.log("Interval min: "+T(O[0].toFixed(2),7)+" med: "+T(k.toFixed(2),7)+" p95: "+T(R.toFixed(2),7)+" max: "+T(D.toFixed(2),7))}this.updateIntervals=[]}},render:function(t){if(this.pixi.renderer.backgroundColor=7378501,this.usingCanvas)for(var e in this.contexts)this.contexts[e]&&this.contexts[e].clearRect(0,0,this.camera.screenWidth,this.camera.screenHeight);this.playerBarn.render(this.camera),this.bulletBarn.render(this.camera,!1),this.explosionBarn.render(this.camera,!1),this.map.render(this.camera,!1),this.gas.render(this.camera),this.uiManager.render(this.camera),this.lootBarn.render(this.camera),this.pieTimer.render(this.camera)},resize:function{this.camera.screenWidth=window.innerWidth,this.camera.screenHeight=window.innerHeight,this.uiManager.resize(this.camera.screenWidth,this.camera.screenHeight),this.usingCanvas&&this.drawCanvas},drawCanvas:function{var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(this.initialized||t){for(var e in this.contexts){var n=document.createElement("canvas");if(n.width=window.innerWidth,n.height=window.innerHeight,this.contexts[e]=n.getContext("2d"),this.initialized){var r=this.bufferSprites[e],o=this.rootDisplay.getChildIndex(r);this.rootDisplay.removeChildAt(o),this.bufferSprites[e]=new i.Sprite(i.Texture.fromCanvas(n)),this.rootDisplay.addChildAt(this.bufferSprites[e],o)}else this.bufferSprites[e]=new i.Sprite(i.Texture.fromCanvas(n))}this.initialized&&(this.gas.context=this.contexts.gas,this.uiManager.context=this.contexts.map)}},beginSpectating:function{this.uiManager.displaySpectateElements,this.uiManager.hideStats,this.gameOver=!1;var t=new l.SpectateMsg;this.sendMessage(l.Msg.Spectate,t)},processGameUpdate:function(t){for(var e=0;e<t.delObjIds.length;e++){t.delObjIds[e];this.objectCreator.deleteObj(t.delObjIds[e])}for(var n in t.objects)for(var r=t.objects[n],i=0;i<r.length;i++){var o=r[i];this.objectCreator.updateObj(n,o.__id,o)}this.activeId=t.activePlayerData.playerId,this.spectating=this.activeId!=this.localId,this.activePlayer=this.playerBarn.getPlayerById(this.activeId),this.activePlayer.setLocalData(t.activePlayerData),this.spectating&&this.uiManager.setSpectatedPlayerName(this.playerBarn.getPlayerName(this.activeId)),this.gas.updateTimeLeft(t.gasData),this.uiManager.updateTimeLeft(t.gasData),this.uiManager.updateGasCircles(this.gas,this.map);for(var a=0;a<t.bullets.length;a++){var s=t.bullets[a];this.bulletBarn.addBullet(s)}for(var u=0;u<t.shots.length;u++){var l=t.shots[u],c=this.playerBarn.getPlayerById(l.playerId);c&&this.shotBarn.addShot(l,c,this.activePlayer)}for(var h=0;h<t.explosions.length;h++){var d=t.explosions[h];this.explosionBarn.addExplosion(d.type,d.pos)}var p=(new Date).getTime;if(t.ack==this.seq&&this.seqInFlight){this.seqInFlight=!1;var f=p-this.seqSendTime;this.pings.push(f)}if(this.ack=t.seq,this.lastUpdateTime>0){var g=p-this.lastUpdateTime;this.updateIntervals.push(g)}this.lastUpdateTime=p},onMessage:function(t,e){switch(t){case l.Msg.Joined:var n=new l.JoinedMsg;n.deserialize(e),this.onJoin,this.gameId=n.gameId,this.localId=n.playerId,this.map.setDims(n.map.width,n.map.height),n.started||this.uiManager.setWaitingForPlayers(!0);for(var r=0;r<n.players.length;r++){var i=n.players[r];this.playerBarn.setPlayerName(i.id,i.name)}break;case l.Msg.PlayerInfo:var s=new l.PlayerInfoMsg;s.deserialize(e),this.playerBarn.setPlayerName(s.id,s.name);break;case l.Msg.Map:var u=new l.MapMsg;u.deserialize(e),this.map.renderMap(u.mapObjects,this.pixi.renderer);break;case l.Msg.Update:var c=new l.UpdateMsg;c.deserialize(e),this.playing=!0,this.processGameUpdate(c);break;case l.Msg.Kill:var h=new l.KillMsg;h.deserialize(e);var d=(this.playerBarn.getPlayerById(h.targetId),this.playerBarn.getPlayerName(h.targetId)),p=h.type==l.KillMsgType.Gas?"gas":this.playerBarn.getPlayerName(h.killerId),f="";if(""!=h.sourceType){var g=o.items[h.sourceType];if(void 0!==g)f=g.name;else{var m=a.Defs[h.sourceType];void 0!==m&&(f=m.name)}}h.targetId==this.activeId?this.spectating&&!h.gameOver||(this.gameOver=!0,this.uiManager.showStats({type:h.type==l.KillMsgType.Gas?"gas":"player",targetName:d,killerName:p,damageName:f,spectating:this.spectating,suicide:h.killerId==this.activeId,gameOver:h.gameOver,stats:{timeAlive:h.targetTimeAlive,kills:h.targetKills,rank:h.targetRank}})):h.killerId==this.activeId&&this.uiManager.showKill(d,p,f,h.killerKills,this.spectating);var v=h.type==l.KillMsgType.Gas?"gas":"player";this.uiManager.updateKillFeed(v,p,d,f),h.type==l.KillMsgType.Player&&this.bulletBarn.createBulletHit(this.playerBarn,h.targetId);break;case l.Msg.Victory:var y=new l.VictoryMsg;y.deserialize(e);var _=this.playerBarn.getPlayerName(this.activeId);this.gameOver=!0,this.uiManager.showStats({type:"victory",targetName:_,spectating:this.spectating,gameOver:!0,stats:{timeAlive:y.timeAlive,kills:y.kills,rank:1}}),this.audioManager.playSound("menu_music",{channel:"ambient",delay:1300});break;case l.Msg.Alive:var b=new l.AliveMsg;b.deserialize(e),this.uiManager.updatePlayersAlive(b.playersAlive,!0);break;case l.Msg.Gas:var x=new l.GasMsg;x.deserialize(e),this.gas.updateGasData(x),this.uiManager.setWaitingForPlayers(!1),this.uiManager.displayAnnouncement(x.type,x.timeLeftWait);break;case l.Msg.Pickup:var w=new l.PickupMsg;if(w.deserialize(e),w.type==l.PickupMsgType.Success&&w.item){var T=o.items[w.item];this.audioManager.playSound(T.sound.pickup,{channel:"ui"})}else this.uiManager.displayPickupMessage(w.type);break;case l.Msg.Disconnect:var S=new l.DisconnectMsg;S.deserialize(e),this.disconnectMsg=S.reason;break;default:console.log("Unknown message",t)}},sendMessage:function(t,e){if(this.ws.readyState==this.ws.OPEN){var n=new l.MsgStream(new ArrayBuffer(4096));n.serializeMsg(t,e),this.ws.send(n.getBuffer)}}},r.preloadImages=function{var t=["img/player/circle-base.svg","img/player/player-base.svg","img/player/armor-base.svg","img/player/player-hands.svg","img/player/bullet-trail-02.svg","img/gui/skull.svg","img/gui/map_large.png","img/gui/player-map-outer.svg","img/loot/loot-circle-outer.svg","img/guns/gun-short.svg","img/guns/gun-med.svg","img/guns/gun-long.svg","img/guns/gun-dp28-top.svg"],e=function(e){-1==t.indexOf(e)&&t.push(e)};for(var n in a.Defs){var r=a.Defs[n].img;void 0!==r&&(void 0!==r.sprite&&e(r.sprite),void 0!==r.residue&&e(r.residue));var s=a.Defs[n].components;if(void 0!==s)for(var u=0;u<s.length;u++){var l=s[u];l.img&&void 0!==l.img.sprite&&e(l.img.sprite),l.img&&void 0!==l.img.residue&&e(l.img.residue)}}for(var c in o.items)void 0!==o.items[c].lootImg&&e(o.items[c].lootImg.sprite);for(var h in w.Defs)if(void 0!==w.Defs[h].image)for(var d=w.Defs[h].image,p=0;p<d.length;p++)e(d[p]);for(var f=0;f<t.length;f++){i.Sprite.fromImage(t[f])}},t.exports=r},function(t,e,n){"use strict";function r{this.timeout=1e4,this.leaderboardActive=0,this.leaderboardFront=i("#leaderboard-front"),this.leaderboardMain=i("#leaderboard-main"),this.leaderboardSpinners=i(".leaderboard-spinner"),this.leaderboardPlayers=i(".leaderboard-players"),this.leaderboardButtons=i(".btn-leaderboards"),this.leaderboardStats=i(".leaderboard-stat"),this.leaderboardIntervals=i(".leaderboard-interval"),this.frontStat=this.leaderboardFront.find(".leaderboard-stat"),this.frontInterval=this.leaderboardFront.find(".leaderboard-interval"),this.mainStat=this.leaderboardMain.find(".leaderboard-stat"),this.mainInterval=this.leaderboardMain.find(".leaderboard-interval"),i("#min-games").html("5 games"),this.statOptions={most_kills:"Most kills",total_kills:"Total kills",total_wins:"Total wins",top5_pct:"Top 5 percent",kdr:"Kill-death ratio"};var t="";i.each(this.statOptions,function(e,n){t+='<option value="'+e+'">'+n+" "}),this.leaderboardStats.html(t),this.intervalOptions={daily:"Today",weekly:"This week",all:"All Time"},t="",i.each(this.intervalOptions,function(e,n){t+='<option value="'+e+'">'+n+" "}),this.leaderboardIntervals.html(t),this.leaderboardFront.find(".leaderboard-headers").html(t);var e=this.leaderboardMain.find(".leaderboard-headers");t="<th class='leaderboard-header-zero'>RANK ",t+="<th class='leaderboard-header-one'>PLAYER ",t+="<th class='leaderboard-header-two'> ",t+=" <th class='leaderboard-header-three'>TOTAL GAMES ",e.html(t);var n=this,r=function(t){i("html, body").css("overflow-y",t?"scroll":"hidden")};i(".leaderboard-stat, .leaderboard-interval").change(function{n.getLeaderboardData}),i("#btn-leaderboard-to-main").on("click",function{i("#start-main").fadeOut(100,function{n.setActiveBoard(1),r(!0),i("#start-menu-wrapper").css("height","0%"),i(".leaderboard").fadeIn(100),n.getLeaderboardData})}),i("#btn-leaderboard-to-front").on("click",function{i(".leaderboard").fadeOut(100,function{n.setActiveBoard(0),r(!1),i("#start-menu-wrapper").css("height","100%"),i("#start-main").fadeIn(100)})})}var i=n(6);r.prototype={setActiveBoard:function(t){this.leaderboardActive=t,1==this.leaderboardActive&&(this.mainStat.val(this.frontStat.val),this.mainInterval.val(this.frontInterval.val))},leaderboardLoading:function(t){this.leaderboardSpinners.css("display",t?"block":"none"),this.leaderboardButtons.css("display",t?"none":"block"),t?this.leaderboardPlayers.css("display","none"):this.leaderboardPlayers.fadeIn(100)},getLeaderboardData:function{this.leaderboardLoading(!0);var t=0==this.leaderboardActive?this.leaderboardFront:this.leaderboardMain,e={stat:t.find(".leaderboard-stat").val,interval:t.find(".leaderboard-interval").val},n=this.populate.bind(this),r={},o=e.stat;r.stat=this.statOptions[o];var a=e.interval;r.interval=this.intervalOptions[a];var s=0==this.leaderboardActive?5:100,u=window.location.protocol+"//web.archive.org/web/20180104035806/https://surviv.io/leaderboard?type=";u+=o+"&interval="+a+"&maxCount="+s;var l=this;i.ajax({type:"GET",url:u,timeout:this.timeout}).done(function(r){l.leaderboardLoading(!1),r&&n(t,JSON.parse(r),e)}).fail(function(t){l.leaderboardLoading(!1)})},populate:function(t,e,n){var r={stat:this.statOptions[n.stat],interval:this.intervalOptions[n.interval]},o=this.leaderboardActive;1==o&&t.find(".leaderboard-header-two").html(r.stat?r.stat.toUpperCase:"");var a=t.find(".leaderboard-players-values");a.html("");for(var s=1==o?"main":"",u=0;u<e.length;u++){var l=e[u],c="";if(1==o){c='<tr class="'+s+'"> #'+(u+1)+"  "+l.name+"  "+l.val+"  "+l.games+"  "}else c=' '+l.name+' '+l.val+"  ";a.append(c)}var h=1;if("top5_pct"==n.stat||"kdr"==n.stat)switch(n.interval){case"daily":h=15;break;case"weekly":h=50;break;case"all":h=100}i(".leaderboard-header-three").html("TOTAL GAMES (>"+h+")")}},t.exports=r},function(t,e,n){"use strict";var r=n(6);r(document).ready(function{r("#btn-help").click(function{var t=r("#start-menu"),e=r("#start-help");t.addClass("display-help"),e.css("display","block");var n=(e.position.top,t.css("height"));return t.animate({scrollTop:n},1e3),!1});var t=r(".modal"),e=r(".modal-content"),n=r("#start-bottom-right"),i=r("#modal-settings");r("#btn-settings").click(function{return i.finish,i.css("display","block"),n.fadeOut(200),!1}),t.find(".close").click(function{o}),e.click(function(t){t.stopPropagation}),r(document).click(function(t){r(".modal").each(function{"block"==r(this).css("display")&&o})});var o=function(e){t.fadeOut(200),n.fadeIn(200)};r(".modal-settings-text").click(function{var t=r(this).siblings("input:checkbox");t.prop("checked",!t.is(":checked")),t.trigger("change")})})},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var i=function{function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}},o=n(12),a=void 0!==o.getParameterByName("debug"),s=[{region:"na",zone:"sfo",url:"na-sfo-p1.surviv.io"},{region:"na",zone:"nyc",url:"na-nyc-p1.surviv.io"},{region:"eu",zone:"fra",url:"eu-fra-p1.surviv.io"},{region:"as",zone:"sgp",url:"as-sgp-p1.surviv.io"}],u=function{function t{r(this,t);var e=s;this.tests=e.map(function(t){return{region:t.region,zone:t.zone,url:t.url,ping:9999}})}return i(t,[{key:"start",value:function{for(var t=this,e=function(t){var e=(new Date).getTime,n="https:"==window.location.protocol?"wss://":"ws://",r=new WebSocket(n+t.url+"/ptc");a&&console.log("Pinging",t.url),r.onerror=function(e){t.ping=9999,r.close},r.onopen=function{var n=(new Date).getTime-e;t.ping=Math.min(t.ping,n/1e3),a&&console.log("Ping test complete",t.url,t.ping),r.close},r.onclose=function{}},n=0;n<2;n++)for(var r=0;r<this.tests.length;r++)!function(r){setTimeout(function{e(t.tests[r])},250*n)}(r)}},{key:"getZones",value:function(t){for(var e=this.tests.sort(function(t,e){return t.ping-e.ping}),n=[],r=0;r<e.length;r++){var i=e[r];i.region==t&&n.push(i.zone)}return n}}]),t};t.exports=u},function(t,e,n){"use strict";var r={Slith:{name:"Slith",link:"https://web.archive.org/web/20180104035806/https://www.youtube.com/watch?v=EkRbJl552pg",weight:10},TheWillyrex:{name:"TheWillyrex",link:"https://web.archive.org/web/20180104035806/https://www.youtube.com/watch?v=yKFA4o2TL6g",weight:25},dedpoio:{name:"dedpoio",link:"https://web.archive.org/web/20180104035806/https://www.youtube.com/watch?v=KxE1PnIfSzo",weight:25},iamSanna:{name:"iamSanna",link:"https://web.archive.org/web/20180104035806/https://www.youtube.com/watch?v=U8s-fnlLSyQ",weight:10},Vikkstar123:{name:"Vikkstar123",link:"https://web.archive.org/web/20180104035806/https://www.youtube.com/watch?v=2aJx6_nXF04",weight:25},CrankGameplays:{name:"CrankGameplays",link:"https://web.archive.org/web/20180104035806/https://www.youtube.com/watch?v=hcdLHtZzzoY",weight:25},Nay2D2:{name:"Nay2D2",link:"https://web.archive.org/web/20180104035806/https://www.youtube.com/watch?v=rM6lqe1RNZk",weight:25},Dawgun:{name:"Dawgun",link:"https://web.archive.org/web/20180104035806/https://www.youtube.com/watch?v=imyfvEBhWg0",weight:25},GoldMindNugget:{name:"GoldMindNugget",link:"https://web.archive.org/web/20180104035806/https://www.youtube.com/watch?v=hmWElF3phs4",weight:75}};t.exports=r},function(t,e,n){e=t.exports=n(50)(void 0),e.push},function(t,e,n){(function(e){var n,n;/*! * pixi.js - v4.5.2 * Compiled Sun, 28 May 2017 21:13:33 UTC * * pixi.js is licensed under the MIT License. * http://www.opensource.org/licenses/mit-license */ !function(e){t.exports=e}(function{var t;return function t(e,r,i){function o(s,u){if(!r[s]){if(!e[s]){var l="function"==typeof n&&n;if(!u&&l)return n(s,!0);if(a)return a(s,!0);var c=new Error("Cannot find module '"+s+"'");throw c.code="MODULE_NOT_FOUND",c}var h=r[s]={exports:{}};e[s][0].call(h.exports,function(t){var n=e[s][1][t];return o(n||t)},h,h.exports,t,e,r,i)}return r[s].exports}for(var a="function"==typeof n&&n,s=0;s<i.length;s++)o(i[s]);return o}({1:[function(t,e,n){"use strict";"use restrict";function r(t){var e=32;return t&=-t,t&&e--,65535&t&&(e-=16),16711935&t&&(e-=8),252645135&t&&(e-=4),858993459&t&&(e-=2),1431655765&t&&(e-=1),e}n.INT_BITS=32,n.INT_MAX=2147483647,n.INT_MIN=-1<<31,n.sign=function(t){return(t>0)-(t<0)},n.abs=function(t){var e=t>>31;return(t^e)-e},n.min=function(t,e){return e^(t^e)&-(t<e)},n.max=function(t,e){return t^(t^e)&-(t<e)},n.isPow2=function(t){return!(t&t-1||!t)},n.log2=function(t){var e,n;return e=(t>65535)<<4,t>>>=e,n=(t>255)<<3,t>>>=n,e|=n,n=(t>15)<<2,t>>>=n,e|=n,n=(t>3)<<1,t>>>=n,(e|=n)|t>>1},n.log10=function(t){return t>=1e9?9:t>=1e8?8:t>=1e7?7:t>=1e6?6:t>=1e5?5:t>=1e4?4:t>=1e3?3:t>=100?2:t>=10?1:0},n.popCount=function(t){return t-=t>>>1&1431655765,16843009*((t=(858993459&t)+(t>>>2&858993459))+(t>>>4)&252645135)>>>24},n.countTrailingZeros=r,n.nextPow2=function(t){return t+=0===t,--t,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,(t|=t>>>16)+1},n.prevPow2=function(t){return t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,(t|=t>>>16)-(t>>>1)},n.parity=function(t){return t^=t>>>16,t^=t>>>8,t^=t>>>4,27030>>>(t&=15)&1};var i=new Array(256);!function(t){for(var e=0;e<256;++e){var n=e,r=e,i=7;for(n>>>=1;n;n>>>=1)r<<=1,r|=1&n,--i;t[e]=r<<i&255}}(i),n.reverse=function(t){return i[255&t]<<24|i[t>>>8&255]<<16|i[t>>>16&255]<<8|i[t>>>24&255]},n.interleave2=function(t,e){return t&=65535,t=16711935&(t|t<<8),t=252645135&(t|t<<4),t=858993459&(t|t<<2),t=1431655765&(t|t<<1),e&=65535,e=16711935&(e|e<<8),e=252645135&(e|e<<4),e=858993459&(e|e<<2),e=1431655765&(e|e<<1),t|e<<1},n.deinterleave2=function(t,e){return t=t>>>e&1431655765,t=858993459&(t|t>>>1),t=252645135&(t|t>>>2),t=16711935&(t|t>>>4),(t=65535&(t|t>>>16))<<16>>16},n.interleave3=function(t,e,n){return t&=1023,t=4278190335&(t|t<<16),t=251719695&(t|t<<8),t=3272356035&(t|t<<4),t=1227133513&(t|t<<2),e&=1023,e=4278190335&(e|e<<16),e=251719695&(e|e<<8),e=3272356035&(e|e<<4),e=1227133513&(e|e<<2),t|=e<<1,n&=1023,n=4278190335&(n|n<<16),n=251719695&(n|n<<8),n=3272356035&(n|n<<4),n=1227133513&(n|n<<2),t|n<<2},n.deinterleave3=function(t,e){return t=t>>>e&1227133513,t=3272356035&(t|t>>>2),t=251719695&(t|t>>>4),t=4278190335&(t|t>>>8),(t=1023&(t|t>>>16))<<22>>22},n.nextCombination=function(t){var e=t|t-1;return e+1|(~e&-~e)-1>>>r(t)+1}},{}],2:[function(t,e,n){"use strict";function r(t,e,n){n=n||2;var r=e&&e.length,o=r?e[0]*n:t.length,s=i(t,0,o,n,!0),u=[];if(!s)return u;var l,c,d,p,f,g,m;if(r&&(s=h(t,e,s,n)),t.length>80*n){l=d=t[0],c=p=t[1];for(var v=n;v<o;v+=n)f=t[v],g=t[v+1],f<l&&(l=f),g<c&&(c=g),f>d&&(d=f),g>p&&(p=g);m=Math.max(d-l,p-c)}return a(s,u,n,l,c,m),u}function i(t,e,n,r,i){var o,a;if(i===I(t,e,n,r)>0)for(o=e;o<n;o+=r)a=C(o,t[o],t[o+1],a);else for(o=n-r;o>=e;o-=r)a=C(o,t[o],t[o+1],a);return a&&w(a,a.next)&&(A(a),a=a.next),a}function o(t,e){if(!t)return t;e||(e=t);var n,r=t;do{if(n=!1,r.steiner||!w(r,r.next)&&0!==x(r.prev,r,r.next))r=r.next;else{if(A(r),(r=e=r.prev)===r.next)return null;n=!0}}while(n||r!==e);return e}function a(t,e,n,r,i,h,d){if(t){!d&&h&&g(t,r,i,h);for(var p,f,m=t;t.prev!==t.next;)if(p=t.prev,f=t.next,h?u(t,r,i,h):s(t))e.push(p.i/n),e.push(t.i/n),e.push(f.i/n),A(t),t=f.next,m=f.next;else if((t=f)===m){d?1===d?(t=l(t,e,n),a(t,e,n,r,i,h,2)):2===d&&c(t,e,n,r,i,h):a(o(t),e,n,r,i,h,1);break}}}function s(t){var e=t.prev,n=t,r=t.next;if(x(e,n,r)>=0)return!1;for(var i=t.next.next;i!==t.prev;){if(_(e.x,e.y,n.x,n.y,r.x,r.y,i.x,i.y)&&x(i.prev,i,i.next)>=0)return!1;i=i.next}return!0}function u(t,e,n,r){var i=t.prev,o=t,a=t.next;if(x(i,o,a)>=0)return!1;for(var s=i.x<o.x?i.x<a.x?i.x:a.x:o.x<a.x?o.x:a.x,u=i.y<o.y?i.y<a.y?i.y:a.y:o.y<a.y?o.y:a.y,l=i.x>o.x?i.x>a.x?i.x:a.x:o.x>a.x?o.x:a.x,c=i.y>o.y?i.y>a.y?i.y:a.y:o.y>a.y?o.y:a.y,h=v(s,u,e,n,r),d=v(l,c,e,n,r),p=t.nextZ;p&&p.z<=d;){if(p!==t.prev&&p!==t.next&&_(i.x,i.y,o.x,o.y,a.x,a.y,p.x,p.y)&&x(p.prev,p,p.next)>=0)return!1;p=p.nextZ}for(p=t.prevZ;p&&p.z>=h;){if(p!==t.prev&&p!==t.next&&_(i.x,i.y,o.x,o.y,a.x,a.y,p.x,p.y)&&x(p.prev,p,p.next)>=0)return!1;p=p.prevZ}return!0}function l(t,e,n){var r=t;do{var i=r.prev,o=r.next.next;!w(i,o)&&T(i,r,r.next,o)&&E(i,o)&&E(o,i)&&(e.push(i.i/n),e.push(r.i/n),e.push(o.i/n),A(r),A(r.next),r=t=o),r=r.next}while(r!==t);return r}function c(t,e,n,r,i,s){var u=t;do{for(var l=u.next.next;l!==u.prev;){if(u.i!==l.i&&b(u,l)){var c=M(u,l);return u=o(u,u.next),c=o(c,c.next),a(u,e,n,r,i,s),void a(c,e,n,r,i,s)}l=l.next}u=u.next}while(u!==t)}function h(t,e,n,r){var a,s,u,l,c,h=[];for(a=0,s=e.length;a<s;a++)u=e[a]*r,l=a<s-1?e[a+1]*r:t.length,c=i(t,u,l,r,!1),c===c.next&&(c.steiner=!0),h.push(y(c));for(h.sort(d),a=0;a<h.length;a++)p(h[a],n),n=o(n,n.next);return n}function d(t,e){return t.x-e.x}function p(t,e){if(e=f(t,e)){var n=M(e,t);o(n,n.next)}}function f(t,e){var n,r=e,i=t.x,o=t.y,a=-1/0;do{if(o<=r.y&&o>=r.next.y){var s=r.x+(o-r.y)*(r.next.x-r.x)/(r.next.y-r.y);if(s<=i&&s>a){if(a=s,s===i){if(o===r.y)return r;if(o===r.next.y)return r.next}n=r.x<r.next.x?r:r.next}}r=r.next}while(r!==e);if(!n)return null;if(i===a)return n.prev;var u,l=n,c=n.x,h=n.y,d=1/0;for(r=n.next;r!==l;)i>=r.x&&r.x>=c&&_(o<h?i:a,o,c,h,o<h?a:i,o,r.x,r.y)&&((u=Math.abs(o-r.y)/(i-r.x))<d||u===d&&r.x>n.x)&&E(r,t)&&(n=r,d=u),r=r.next;return n}function g(t,e,n,r){var i=t;do{null===i.z&&(i.z=v(i.x,i.y,e,n,r)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next}while(i!==t);i.prevZ.nextZ=null,i.prevZ=null,m(i)}function m(t){var e,n,r,i,o,a,s,u,l=1;do{for(n=t,t=null,o=null,a=0;n;){for(a++,r=n,s=0,e=0;e<l&&(s++,r=r.nextZ);e++);for(u=l;s>0||u>0&&r;)0===s?(i=r,r=r.nextZ,u--):0!==u&&r?n.z<=r.z?(i=n,n=n.nextZ,s--):(i=r,r=r.nextZ,u--):(i=n,n=n.nextZ,s--),o?o.nextZ=i:t=i,i.prevZ=o,o=i;n=r}o.nextZ=null,l*=2}while(a>1);return t}function v(t,e,n,r,i){return t=32767*(t-n)/i,e=32767*(e-r)/i,t=16711935&(t|t<<8),t=252645135&(t|t<<4),t=858993459&(t|t<<2),t=1431655765&(t|t<<1),e=16711935&(e|e<<8),e=252645135&(e|e<<4),e=858993459&(e|e<<2),e=1431655765&(e|e<<1),t|e<<1}function y(t){var e=t,n=t;do{e.x<n.x&&(n=e),e=e.next}while(e!==t);return n}function _(t,e,n,r,i,o,a,s){return(i-a)*(e-s)-(t-a)*(o-s)>=0&&(t-a)*(r-s)-(n-a)*(e-s)>=0&&(n-a)*(o-s)-(i-a)*(r-s)>=0}function b(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!S(t,e)&&E(t,e)&&E(e,t)&&P(t,e)}function x(t,e,n){return(e.y-t.y)*(n.x-e.x)-(e.x-t.x)*(n.y-e.y)}function w(t,e){return t.x===e.x&&t.y===e.y}function T(t,e,n,r){return!!(w(t,e)&&w(n,r)||w(t,r)&&w(n,e))||x(t,e,n)>0!=x(t,e,r)>0&&x(n,r,t)>0!=x(n,r,e)>0}function S(t,e){var n=t;do{if(n.i!==t.i&&n.next.i!==t.i&&n.i!==e.i&&n.next.i!==e.i&&T(n,n.next,t,e))return!0;n=n.next}while(n!==t);return!1}function E(t,e){return x(t.prev,t,t.next)<0?x(t,e,t.next)>=0&&x(t,t.prev,e)>=0:x(t,e,t.prev)<0||x(t,t.next,e)<0}function P(t,e){var n=t,r=!1,i=(t.x+e.x)/2,o=(t.y+e.y)/2;do{n.y>o!=n.next.y>o&&i<(n.next.x-n.x)*(o-n.y)/(n.next.y-n.y)+n.x&&(r=!r),n=n.next}while(n!==t);return r}function M(t,e){var n=new O(t.i,t.x,t.y),r=new O(e.i,e.x,e.y),i=t.next,o=e.prev;return t.next=e,e.prev=t,n.next=i,i.prev=n,r.next=n,n.prev=r,o.next=r,r.prev=o,r}function C(t,e,n,r){var i=new O(t,e,n);return r?(i.next=r.next,i.prev=r,r.next.prev=i,r.next=i):(i.prev=i,i.next=i),i}function A(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function O(t,e,n){this.i=t,this.x=e,this.y=n,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function I(t,e,n,r){for(var i=0,o=e,a=n-r;o<n;o+=r)i+=(t[a]-t[o])*(t[o+1]+t[a+1]),a=o;return i}e.exports=r,r.deviation=function(t,e,n,r){var i=e&&e.length,o=i?e[0]*n:t.length,a=Math.abs(I(t,0,o,n));if(i)for(var s=0,u=e.length;s<u;s++){var l=e[s]*n,c=s<u-1?e[s+1]*n:t.length;a-=Math.abs(I(t,l,c,n))}var h=0;for(s=0;s<r.length;s+=3){var d=r[s]*n,p=r[s+1]*n,f=r[s+2]*n;h+=Math.abs((t[d]-t[f])*(t[p+1]-t[d+1])-(t[d]-t[p])*(t[f+1]-t[d+1]))}return 0===a&&0===h?0:Math.abs((h-a)/a)},r.flatten=function(t){for(var e=t[0][0].length,n={vertices:[],holes:[],dimensions:e},r=0,i=0;i<t.length;i++){for(var o=0;o<t[i].length;o++)for(var a=0;a<e;a++)n.vertices.push(t[i][o][a]);i>0&&(r+=t[i-1].length,n.holes.push(r))}return n}},{}],3:[function(t,e,n){"use strict";function r{}function i(t,e,n){this.fn=t,this.context=e,this.once=n||!1}function o{this._events=new r,this._eventsCount=0}var a=Object.prototype.hasOwnProperty,s="~";Object.create&&(r.prototype=Object.create(null),(new r).__proto__||(s=!1)),o.prototype.eventNames=function{var t,e,n=[];if(0===this._eventsCount)return n;for(e in t=this._events)a.call(t,e)&&n.push(s?e.slice(1):e);return Object.getOwnPropertySymbols?n.concat(Object.getOwnPropertySymbols(t)):n},o.prototype.listeners=function(t,e){var n=s?s+t:t,r=this._events[n];if(e)return!!r;if(!r)return[];if(r.fn)return[r.fn];for(var i=0,o=r.length,a=new Array(o);i<o;i++)a[i]=r[i].fn;return a},o.prototype.emit=function(t,e,n,r,i,o){var a=s?s+t:t;if(!this._events[a])return!1;var u,l,c=this._events[a],h=arguments.length;if(c.fn){switch(c.once&&this.removeListener(t,c.fn,void 0,!0),h){case 1:return c.fn.call(c.context),!0;case 2:return c.fn.call(c.context,e),!0;case 3:return c.fn.call(c.context,e,n),!0;case 4:return c.fn.call(c.context,e,n,r),!0;case 5:return c.fn.call(c.context,e,n,r,i),!0;case 6:return c.fn.call(c.context,e,n,r,i,o),!0}for(l=1,u=new Array(h-1);l<h;l++)u[l-1]=arguments[l];c.fn.apply(c.context,u)}else{var d,p=c.length;for(l=0;l<p;l++)switch(c[l].once&&this.removeListener(t,c[l].fn,void 0,!0),h){case 1:c[l].fn.call(c[l].context);break;case 2:c[l].fn.call(c[l].context,e);break;case 3:c[l].fn.call(c[l].context,e,n);break;case 4:c[l].fn.call(c[l].context,e,n,r);break;default:if(!u)for(d=1,u=new Array(h-1);d<h;d++)u[d-1]=arguments[d];c[l].fn.apply(c[l].context,u)}}return!0},o.prototype.on=function(t,e,n){var r=new i(e,n||this),o=s?s+t:t;return this._events[o]?this._events[o].fn?this._events[o]=[this._events[o],r]:this._events[o].push(r):(this._events[o]=r,this._eventsCount++),this},o.prototype.once=function(t,e,n){var r=new i(e,n||this,!0),o=s?s+t:t;return this._events[o]?this._events[o].fn?this._events[o]=[this._events[o],r]:this._events[o].push(r):(this._events[o]=r,this._eventsCount++),this},o.prototype.removeListener=function(t,e,n,i){var o=s?s+t:t;if(!this._events[o])return this;if(!e)return 0==--this._eventsCount?this._events=new r:delete this._events[o],this;var a=this._events[o];if(a.fn)a.fn!==e||i&&!a.once||n&&a.context!==n||(0==--this._eventsCount?this._events=new r:delete this._events[o]);else{for(var u=0,l=[],c=a.length;u<c;u++)(a[u].fn!==e||i&&!a[u].once||n&&a[u].context!==n)&&l.push(a[u]);l.length?this._events[o]=1===l.length?l[0]:l:0==--this._eventsCount?this._events=new r:delete this._events[o]}return this},o.prototype.removeAllListeners=function(t){var e;return t?(e=s?s+t:t,this._events[e]&&(0==--this._eventsCount?this._events=new r:delete this._events[e])):(this._events=new r,this._eventsCount=0),this},o.prototype.off=o.prototype.removeListener,o.prototype.addListener=o.prototype.on,o.prototype.setMaxListeners=function{return this},o.prefixed=s,o.EventEmitter=o,void 0!==e&&(e.exports=o)},{}],4:[function(e,n,r){/** * isMobile.js v0.4.1 * * A simple library to detect Apple phones and tablets, * Android phones and tablets, other mobile devices (like blackberry, mini-opera and windows phone), * and any kind of seven inch device, via user agent sniffing. * * @author: Kai Mallea (kmallea@gmail.com) * * @license: http://creativecommons.org/publicdomain/zero/1.0/ */ !function(e){var r=/iPhone/i,i=/iPod/i,o=/iPad/i,a=/(?=.*\bAndroid\b)(?=.*\bMobile\b)/i,s=/Android/i,u=/(?=.*\bAndroid\b)(?=.*\bSD4930UR\b)/i,l=/(?=.*\bAndroid\b)(?=.*\b(?:KFOT|KFTT|KFJWI|KFJWA|KFSOWI|KFTHWI|KFTHWA|KFAPWI|KFAPWA|KFARWI|KFASWI|KFSAWI|KFSAWA)\b)/i,c=/Windows Phone/i,h=/(?=.*\bWindows\b)(?=.*\bARM\b)/i,d=/BlackBerry/i,p=/BB10/i,f=/Opera Mini/i,g=/(CriOS|Chrome)(?=.*\bMobile\b)/i,m=/(?=.*\bFirefox\b)(?=.*\bMobile\b)/i,v=new RegExp("(?:Nexus 7|BNTV250|Kindle Fire|Silk|GT-P1000)","i"),y=function(t,e){return t.test(e)},_=function(t){var e=t||navigator.userAgent,n=e.split("[FBAN");if(void 0!==n[1]&&(e=n[0]),n=e.split("Twitter"),void 0!==n[1]&&(e=n[0]),this.apple={phone:y(r,e),ipod:y(i,e),tablet:!y(r,e)&&y(o,e),device:y(r,e)||y(i,e)||y(o,e)},this.amazon={phone:y(u,e),tablet:!y(u,e)&&y(l,e),device:y(u,e)||y(l,e)},this.android={phone:y(u,e)||y(a,e),tablet:!y(u,e)&&!y(a,e)&&(y(l,e)||y(s,e)),device:y(u,e)||y(l,e)||y(a,e)||y(s,e)},this.windows={phone:y(c,e),tablet:y(h,e),device:y(c,e)||y(h,e)},this.other={blackberry:y(d,e),blackberry10:y(p,e),opera:y(f,e),firefox:y(m,e),chrome:y(g,e),device:y(d,e)||y(p,e)||y(f,e)||y(m,e)||y(g,e)},this.seven_inch=y(v,e),this.any=this.apple.device||this.android.device||this.windows.device||this.other.device||this.seven_inch,this.phone=this.apple.phone||this.android.phone||this.windows.phone,this.tablet=this.apple.tablet||this.android.tablet||this.windows.tablet,"undefined"==typeof window)return this},b=function{var t=new _;return t.Class=_,t};void 0!==n&&n.exports&&"undefined"==typeof window?n.exports=_:void 0!==n&&n.exports&&"undefined"!=typeof window?n.exports=b:"function"==typeof t&&t.amd?t("isMobile",[],e.isMobile=b):e.isMobile=b}(this)},{}],5:[function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){return t._head?(t._tail._next=e,e._prev=t._tail,t._tail=e):(t._head=e,t._tail=e),e._owner=t,e}Object.defineProperty(n,"__esModule",{value:!0});var o=function{function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}},a=function{function t(e,n,i){void 0===n&&(n=!1),r(this,t),this._fn=e,this._once=n,this._thisArg=i,this._next=this._prev=this._owner=null}return o(t,[{key:"detach",value:function{return null!==this._owner&&(this._owner.detach(this),!0)}}]),t},s=function{function t{r(this,t),this._head=this._tail=void 0}return o(t,[{key:"handlers",value:function{var t=!(arguments.length<=0||void 0===arguments[0])&&arguments[0],e=this._head;if(t)return!!e;for(var n=[];e;)n.push(e),e=e._next;return n}},{key:"has",value:function(t){if(!(t instanceof a))throw new Error("MiniSignal#has: First arg must be a MiniSignalBinding object.");return t._owner===this}},{key:"dispatch",value:function{var t=this._head;if(!t)return!1;for(t;)t._once&&this.detach(t),t._fn.apply(t._thisArg,arguments),t=t._next;return!0}},{key:"add",value:function(t){var e=arguments.length<=1||void 0===arguments[1]?null:arguments[1];if("function"!=typeof t)throw new Error("MiniSignal#add: First arg must be a Function.");return i(this,new a(t,!1,e))}},{key:"once",value:function(t){var e=arguments.length<=1||void 0===arguments[1]?null:arguments[1];if("function"!=typeof t)throw new Error("MiniSignal#once: First arg must be a Function.");return i(this,new a(t,!0,e))}},{key:"detach",value:function(t){if(!(t instanceof a))throw new Error("MiniSignal#detach: First arg must be a MiniSignalBinding object.");return t._owner!==this?this:(t._prev&&(t._prev._next=t._next),t._next&&(t._next._prev=t._prev),t===this._head?(this._head=t._next,null===t._next&&(this._tail=null)):t===this._tail&&(this._tail=t._prev,this._tail._next=null),t._owner=null,this)}},{key:"detachAll",value:function{var t=this._head;if(!t)return this;for(this._head=this._tail=null;t;)t._owner=null,t=t._next;return this}}]),t};s.MiniSignalBinding=a,n.default=s,e.exports=n.default},{}],6:[function(t,e,n){/* object-assign (c) Sindre Sorhus @license MIT "use strict";function r(t){if(null===t||void 0===t)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}var i=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,a=Object.prototype.propertyIsEnumerable;e.exports=function{try{if(!Object.assign)return!1;var t=new String("abc");if(t[5]="de","5"===Object.getOwnPropertyNames(t)[0])return!1;for(var e={},n=0;n<10;n++)e["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(e).map(function(t){return e[t]}).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach(function(t){r[t]=t}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(t){return!1}}?Object.assign:function(t,e){for(var n,s,u=r(t),l=1;l<arguments.length;l++){n=Object(arguments[l]);for(var c in n)o.call(n,c)&&(u[c]=n[c]);if(i){s=i(n);for(var h=0;h<s.length;h++)a.call(n,s[h])&&(u[s[h]]=n[s[h]])}}return u}},{}],7:[function(t,e,n){"use strict";e.exports=function(t,e){e=e||{};for(var n={key:["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"],q:{name:"queryKey",parser:/(?:^|&)([^&=]*)=?([^&]*)/g},parser:{strict:/^(?:([^:\/?#]+):)?(?:\/\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?))?((((?:[^?#\/]*\/)*)([^?#]*))(?:\?([^#]*))?(?:#(.*))?)/,loose:/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/}},r=n.parser[e.strictMode?"strict":"loose"].exec(t),i={},o=14;o--;)i[n.key[o]]=r[o]||"";return i[n.q.name]={},i[n.key[12]].replace(n.q.parser,function(t,e,r){e&&(i[n.q.name][e]=r)}),i}},{}],8:[function(t,e,n){(function(t){function e(t,e){for(var n=0,r=t.length-1;r>=0;r--){var i=t[r];"."===i?t.splice(r,1):".."===i?(t.splice(r,1),n++):n&&(t.splice(r,1),n--)}if(e)for(n--;n)t.unshift("..");return t}function r(t,e){if(t.filter)return t.filter(e);for(var n=[],r=0;r<t.length;r++)e(t[r],r,t)&&n.push(t[r]);return n}var i=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/,o=function(t){return i.exec(t).slice(1)};n.resolve=function{for(var n="",i=!1,o=arguments.length-1;o>=-1&&!i;o--){var a=o>=0?arguments[o]:t.cwd;if("string"!=typeof a)throw new TypeError("Arguments to path.resolve must be strings");a&&(n=a+"/"+n,i="/"===a.charAt(0))}return n=e(r(n.split("/"),function(t){return!!t}),!i).join("/"),(i?"/":"")+n||"."},n.normalize=function(t){var i=n.isAbsolute(t),o="/"===a(t,-1);return t=e(r(t.split("/"),function(t){return!!t}),!i).join("/"),t||i||(t="."),t&&o&&(t+="/"),(i?"/":"")+t},n.isAbsolute=function(t){return"/"===t.charAt(0)},n.join=function{var t=Array.prototype.slice.call(arguments,0);return n.normalize(r(t,function(t,e){if("string"!=typeof t)throw new TypeError("Arguments to path.join must be strings");return t}).join("/"))},n.relative=function(t,e){function r(t){for(var e=0;e<t.length&&""===t[e];e++);for(var n=t.length-1;n>=0&&""===t[n];n--);return e>n?[]:t.slice(e,n-e+1)}t=n.resolve(t).substr(1),e=n.resolve(e).substr(1);for(var i=r(t.split("/")),o=r(e.split("/")),a=Math.min(i.length,o.length),s=a,u=0;u<a;u++)if(i[u]!==o[u]){s=u;break}for(var l=[],u=s;u<i.length;u++)l.push("..");return l=l.concat(o.slice(s)),l.join("/")},n.sep="/",n.delimiter=":",n.dirname=function(t){var e=o(t),n=e[0],r=e[1];return n||r?(r&&(r=r.substr(0,r.length-1)),n+r):"."},n.basename=function(t,e){var n=o(t)[2];return e&&n.substr(-1*e.length)===e&&(n=n.substr(0,n.length-e.length)),n},n.extname=function(t){return o(t)[3]};var a="b"==="ab".substr(-1)?function(t,e,n){return t.substr(e,n)}:function(t,e,n){return e<0&&(e=t.length+e),t.substr(e,n)}}).call(this,t("_process"))},{_process:26}],9:[function(t,e,n){var r=new ArrayBuffer(0),i=function(t,e,n,i){this.gl=t,this.buffer=t.createBuffer,this.type=e||t.ARRAY_BUFFER,this.drawType=i||t.STATIC_DRAW,this.data=r,n&&this.upload(n),this._updateID=0};i.prototype.upload=function(t,e,n){n||this.bind;var r=this.gl;t=t||this.data,e=e||0,this.data.byteLength>=t.byteLength?r.bufferSubData(this.type,e,t):r.bufferData(this.type,t,this.drawType),this.data=t},i.prototype.bind=function{this.gl.bindBuffer(this.type,this.buffer)},i.createVertexBuffer=function(t,e,n){return new i(t,t.ARRAY_BUFFER,e,n)},i.createIndexBuffer=function(t,e,n){return new i(t,t.ELEMENT_ARRAY_BUFFER,e,n)},i.create=function(t,e,n,r){return new i(t,e,n,r)},i.prototype.destroy=function{this.gl.deleteBuffer(this.buffer)},e.exports=i},{}],10:[function(t,e,n){var r=t("./GLTexture"),i=function(t,e,n){this.gl=t,this.framebuffer=t.createFramebuffer,this.stencil=null,this.texture=null,this.width=e||100,this.height=n||100};i.prototype.enableTexture=function(t){var e=this.gl;this.texture=t||new r(e),this.texture.bind,this.bind,e.framebufferTexture2D(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,this.texture.texture,0)},i.prototype.enableStencil=function{if(!this.stencil){var t=this.gl;this.stencil=t.createRenderbuffer,t.bindRenderbuffer(t.RENDERBUFFER,this.stencil),t.framebufferRenderbuffer(t.FRAMEBUFFER,t.DEPTH_STENCIL_ATTACHMENT,t.RENDERBUFFER,this.stencil),t.renderbufferStorage(t.RENDERBUFFER,t.DEPTH_STENCIL,this.width,this.height)}},i.prototype.clear=function(t,e,n,r){this.bind;var i=this.gl;i.clearColor(t,e,n,r),i.clear(i.COLOR_BUFFER_BIT|i.DEPTH_BUFFER_BIT)},i.prototype.bind=function{var t=this.gl;t.bindFramebuffer(t.FRAMEBUFFER,this.framebuffer)},i.prototype.unbind=function{var t=this.gl;t.bindFramebuffer(t.FRAMEBUFFER,null)},i.prototype.resize=function(t,e){var n=this.gl;this.width=t,this.height=e,this.texture&&this.texture.uploadData(null,t,e),this.stencil&&(n.bindRenderbuffer(n.RENDERBUFFER,this.stencil),n.renderbufferStorage(n.RENDERBUFFER,n.DEPTH_STENCIL,t,e))},i.prototype.destroy=function{var t=this.gl;this.texture&&this.texture.destroy,t.deleteFramebuffer(this.framebuffer),this.gl=null,this.stencil=null,this.texture=null},i.createRGBA=function(t,e,n,o){var a=r.fromData(t,null,e,n);a.enableNearestScaling,a.enableWrapClamp;var s=new i(t,e,n);return s.enableTexture(a),s.unbind,s},i.createFloat32=function(t,e,n,o){var a=new r.fromData(t,o,e,n);a.enableNearestScaling,a.enableWrapClamp;var s=new i(t,e,n);return s.enableTexture(a),s.unbind,s},e.exports=i},{"./GLTexture":12}],11:[function(t,e,n){var r=t("./shader/compileProgram"),i=t("./shader/extractAttributes"),o=t("./shader/extractUniforms"),a=t("./shader/setPrecision"),s=t("./shader/generateUniformAccessObject"),u=function(t,e,n,u,l){this.gl=t,u&&(e=a(e,u),n=a(n,u)),this.program=r(t,e,n,l),this.attributes=i(t,this.program),this.uniformData=o(t,this.program),this.uniforms=s(t,this.uniformData)};u.prototype.bind=function{this.gl.useProgram(this.program)},u.prototype.destroy=function{this.attributes=null,this.uniformData=null,this.uniforms=null,this.gl.deleteProgram(this.program)},e.exports=u},{"./shader/compileProgram":17,"./shader/extractAttributes":19,"./shader/extractUniforms":20,"./shader/generateUniformAccessObject":21,"./shader/setPrecision":25}],12:[function(t,e,n){var r=function(t,e,n,r,i){this.gl=t,this.texture=t.createTexture,this.mipmap=!1,this.premultiplyAlpha=!1,this.width=e||-1,this.height=n||-1,this.format=r||t.RGBA,this.type=i||t.UNSIGNED_BYTE};r.prototype.upload=function(t){this.bind;var e=this.gl;e.pixelStorei(e.UNPACK_PREMULTIPLY_ALPHA_WEBGL,this.premultiplyAlpha);var n=t.videoWidth||t.width,r=t.videoHeight||t.height;r!==this.height||n!==this.width?e.texImage2D(e.TEXTURE_2D,0,this.format,this.format,this.type,t):e.texSubImage2D(e.TEXTURE_2D,0,0,0,this.format,this.type,t),this.width=n,this.height=r};var i=!1;r.prototype.uploadData=function(t,e,n){this.bind;var r=this.gl;if(t instanceof Float32Array){if(!i){if(!r.getExtension("OES_texture_float"))throw new Error("floating point textures not available");i=!0}this.type=r.FLOAT}else this.type=this.type||r.UNSIGNED_BYTE;r.pixelStorei(r.UNPACK_PREMULTIPLY_ALPHA_WEBGL,this.premultiplyAlpha),e!==this.width||n!==this.height?r.texImage2D(r.TEXTURE_2D,0,this.format,e,n,0,this.format,this.type,t||null):r.texSubImage2D(r.TEXTURE_2D,0,0,0,e,n,this.format,this.type,t||null),this.width=e,this.height=n},r.prototype.bind=function(t){var e=this.gl;void 0!==t&&e.activeTexture(e.TEXTURE0+t),e.bindTexture(e.TEXTURE_2D,this.texture)},r.prototype.unbind=function{var t=this.gl;t.bindTexture(t.TEXTURE_2D,null)},r.prototype.minFilter=function(t){var e=this.gl;this.bind,this.mipmap?e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,t?e.LINEAR_MIPMAP_LINEAR:e.NEAREST_MIPMAP_NEAREST):e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,t?e.LINEAR:e.NEAREST)},r.prototype.magFilter=function(t){var e=this.gl;this.bind,e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,t?e.LINEAR:e.NEAREST)},r.prototype.enableMipmap=function{var t=this.gl;this.bind,this.mipmap=!0,t.generateMipmap(t.TEXTURE_2D)},r.prototype.enableLinearScaling=function{this.minFilter(!0),this.magFilter(!0)},r.prototype.enableNearestScaling=function{this.minFilter(!1),this.magFilter(!1)},r.prototype.enableWrapClamp=function{var t=this.gl;this.bind,t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE)},r.prototype.enableWrapRepeat=function{var t=this.gl;this.bind,t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.REPEAT),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.REPEAT)},r.prototype.enableWrapMirrorRepeat=function{var t=this.gl;this.bind,t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.MIRRORED_REPEAT),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.MIRRORED_REPEAT)},r.prototype.destroy=function{this.gl.deleteTexture(this.texture)},r.fromSource=function(t,e,n){var i=new r(t);return i.premultiplyAlpha=n||!1,i.upload(e),i},r.fromData=function(t,e,n,i){var o=new r(t);return o.uploadData(e,n,i),o},e.exports=r},{}],13:[function(t,e,n){function r(t,e){if(this.nativeVaoExtension=null,r.FORCE_NATIVE||(this.nativeVaoExtension=t.getExtension("OES_vertex_array_object")||t.getExtension("MOZ_OES_vertex_array_object")||t.getExtension("WEBKIT_OES_vertex_array_object")),this.nativeState=e,this.nativeVaoExtension){this.nativeVao=this.nativeVaoExtension.createVertexArrayOES;var n=t.getParameter(t.MAX_VERTEX_ATTRIBS);this.nativeState={tempAttribState:new Array(n),attribState:new Array(n)}}this.gl=t,this.attributes=[],this.indexBuffer=null,this.dirty=!1}var i=t("./setVertexAttribArrays");r.prototype.constructor=r,e.exports=r,r.FORCE_NATIVE=!1,r.prototype.bind=function{return this.nativeVao?(this.nativeVaoExtension.bindVertexArrayOES(this.nativeVao),this.dirty&&(this.dirty=!1,this.activate)):this.activate,this},r.prototype.unbind=function{return this.nativeVao&&this.nativeVaoExtension.bindVertexArrayOES(null),this},r.prototype.activate=function{for(var t=this.gl,e=null,n=0;n<this.attributes.length;n++){var r=this.attributes[n];e!==r.buffer&&(r.buffer.bind,e=r.buffer),t.vertexAttribPointer(r.attribute.location,r.attribute.size,r.type||t.FLOAT,r.normalized||!1,r.stride||0,r.start||0)}return i(t,this.attributes,this.nativeState),this.indexBuffer&&this.indexBuffer.bind,this},r.prototype.addAttribute=function(t,e,n,r,i,o){return this.attributes.push({buffer:t,attribute:e,location:e.location,type:n||this.gl.FLOAT,normalized:r||!1,stride:i||0,start:o||0}),this.dirty=!0,this},r.prototype.addIndex=function(t){return this.indexBuffer=t,this.dirty=!0,this},r.prototype.clear=function{return this.nativeVao&&this.nativeVaoExtension.bindVertexArrayOES(this.nativeVao),this.attributes.length=0,this.indexBuffer=null,this},r.prototype.draw=function(t,e,n){var r=this.gl;return this.indexBuffer?r.drawElements(t,e||this.indexBuffer.data.length,r.UNSIGNED_SHORT,2*(n||0)):r.drawArrays(t,n,e||this.getSize),this},r.prototype.destroy=function{this.gl=null,this.indexBuffer=null,this.attributes=null,this.nativeState=null,this.nativeVao&&this.nativeVaoExtension.deleteVertexArrayOES(this.nativeVao),this.nativeVaoExtension=null,this.nativeVao=null},r.prototype.getSize=function{var t=this.attributes[0];return t.buffer.data.length/(t.stride/4||t.attribute.size)}},{"./setVertexAttribArrays":16}],14:[function(t,e,n){var r=function(t,e){var n=t.getContext("webgl",e)||t.getContext("experimental-webgl",e);if(!n)throw new Error("This browser does not support webGL. Try using the canvas renderer");return n};e.exports=r},{}],15:[function(t,e,n){var r={createContext:t("./createContext"),setVertexAttribArrays:t("./setVertexAttribArrays"),GLBuffer:t("./GLBuffer"),GLFramebuffer:t("./GLFramebuffer"),GLShader:t("./GLShader"),GLTexture:t("./GLTexture"),VertexArrayObject:t("./VertexArrayObject"),shader:t("./shader")};void 0!==e&&e.exports&&(e.exports=r),"undefined"!=typeof window&&(window.PIXI=window.PIXI||{},window.PIXI.glCore=r)},{"./GLBuffer":9,"./GLFramebuffer":10,"./GLShader":11,"./GLTexture":12,"./VertexArrayObject":13,"./createContext":14,"./setVertexAttribArrays":16,"./shader":22}],16:[function(t,e,n){var r=function(t,e,n){var r;if(n){var i=n.tempAttribState,o=n.attribState;for(r=0;r<i.length;r++)i[r]=!1;for(r=0;r<e.length;r++)i[e[r].attribute.location]=!0;for(r=0;r<o.length;r++)o[r]!==i[r]&&(o[r]=i[r],n.attribState[r]?t.enableVertexAttribArray(r):t.disableVertexAttribArray(r))}else for(r=0;r<e.length;r++){var a=e[r];t.enableVertexAttribArray(a.attribute.location)}};e.exports=r},{}],17:[function(t,e,n){var r=function(t,e,n,r){var o=i(t,t.VERTEX_SHADER,e),a=i(t,t.FRAGMENT_SHADER,n),s=t.createProgram;if(t.attachShader(s,o),t.attachShader(s,a),r)for(var u in r)t.bindAttribLocation(s,r[u],u);return t.linkProgram(s),t.getProgramParameter(s,t.LINK_STATUS)||(console.error("Pixi.js Error: Could not initialize shader."),console.error("gl.VALIDATE_STATUS",t.getProgramParameter(s,t.VALIDATE_STATUS)),console.error("gl.getError",t.getError),""!==t.getProgramInfoLog(s)&&console.warn("Pixi.js Warning: gl.getProgramInfoLog",t.getProgramInfoLog(s)),t.deleteProgram(s),s=null),t.deleteShader(o),t.deleteShader(a),s},i=function(t,e,n){var r=t.createShader(e);return t.shaderSource(r,n),t.compileShader(r),t.getShaderParameter(r,t.COMPILE_STATUS)?r:(console.log(t.getShaderInfoLog(r)),null)};e.exports=r},{}],18:[function(t,e,n){var r=function(t,e){switch(t){case"float":return 0;case"vec2":return new Float32Array(2*e);case"vec3":return new Float32Array(3*e);case"vec4":return new Float32Array(4*e);case"int":case"sampler2D":return 0;case"ivec2":return new Int32Array(2*e);case"ivec3":return new Int32Array(3*e);case"ivec4":return new Int32Array(4*e);case"bool":return!1;case"bvec2":return i(2*e);case"bvec3":return i(3*e);case"bvec4":return i(4*e);case"mat2":return new Float32Array([1,0,0,1]);case"mat3":return new Float32Array([1,0,0,0,1,0,0,0,1]);case"mat4":return new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1])}},i=function(t){for(var e=new Array(t),n=0;n<e.length;n++)e[n]=!1;return e};e.exports=r},{}],19:[function(t,e,n){var r=t("./mapType"),i=t("./mapSize"),o=function(t,e){for(var n={},o=t.getProgramParameter(e,t.ACTIVE_ATTRIBUTES),s=0;s<o;s++){var u=t.getActiveAttrib(e,s),l=r(t,u.type);n[u.name]={type:l,size:i(l),location:t.getAttribLocation(e,u.name),pointer:a}}return n},a=function(t,e,n,r){gl.vertexAttribPointer(this.location,this.size,t||gl.FLOAT,e||!1,n||0,r||0)};e.exports=o},{"./mapSize":23,"./mapType":24}],20:[function(t,e,n){var r=t("./mapType"),i=t("./defaultValue"),o=function(t,e){for(var n={},o=t.getProgramParameter(e,t.ACTIVE_UNIFORMS),a=0;a<o;a++){var s=t.getActiveUniform(e,a),u=s.name.replace(/\[.*?\]/,""),l=r(t,s.type);n[u]={type:l,size:s.size,location:t.getUniformLocation(e,u),value:i(l,s.size)}}return n};e.exports=o},{"./defaultValue":18,"./mapType":24}],21:[function(t,e,n){var r=function(t,e){var n={data:{}};n.gl=t;for(var r=Object.keys(e),s=0;s<r.length;s++){var u=r[s],l=u.split("."),c=l[l.length-1],h=a(l,n),d=e[u];h.data[c]=d,h.gl=t,Object.defineProperty(h,c,{get:i(c),set:o(c,d)})}return n},i=function(t){var e=s.replace("%%",t);return new Function(e)},o=function(t,e){var n,r=u.replace(/%%/g,t);return n=1===e.size?l[e.type]:c[e.type],n&&(r+="\nthis.gl."+n+";"),new Function("value",r)},a=function(t,e){for(var n=e,r=0;r<t.length-1;r++){var i=n[t[r]]||{data:{}};n[t[r]]=i,n=i}return n},s=["return this.data.%%.value;"].join("\n"),u=["this.data.%%.value = value;","var location = this.data.%%.location;"].join("\n"),l={float:"uniform1f(location, value)",vec2:"uniform2f(location, value[0], value[1])",vec3:"uniform3f(location, value[0], value[1], value[2])",vec4:"uniform4f(location, value[0], value[1], value[2], value[3])",int:"uniform1i(location, value)",ivec2:"uniform2i(location, value[0], value[1])",ivec3:"uniform3i(location, value[0], value[1], value[2])",ivec4:"uniform4i(location, value[0], value[1], value[2], value[3])",bool:"uniform1i(location, value)",bvec2:"uniform2i(location, value[0], value[1])",bvec3:"uniform3i(location, value[0], value[1], value[2])",bvec4:"uniform4i(location, value[0], value[1], value[2], value[3])",mat2:"uniformMatrix2fv(location, false, value)",mat3:"uniformMatrix3fv(location, false, value)",mat4:"uniformMatrix4fv(location, false, value)",sampler2D:"uniform1i(location, value)"},c={float:"uniform1fv(location, value)",vec2:"uniform2fv(location, value)",vec3:"uniform3fv(location, value)",vec4:"uniform4fv(location, value)",int:"uniform1iv(location, value)",ivec2:"uniform2iv(location, value)",ivec3:"uniform3iv(location, value)",ivec4:"uniform4iv(location, value)",bool:"uniform1iv(location, value)",bvec2:"uniform2iv(location, value)",bvec3:"uniform3iv(location, value)",bvec4:"uniform4iv(location, value)",sampler2D:"uniform1iv(location, value)"};e.exports=r},{}],22:[function(t,e,n){e.exports={compileProgram:t("./compileProgram"),defaultValue:t("./defaultValue"),extractAttributes:t("./extractAttributes"),extractUniforms:t("./extractUniforms"),generateUniformAccessObject:t("./generateUniformAccessObject"),setPrecision:t("./setPrecision"),mapSize:t("./mapSize"),mapType:t("./mapType")}},{"./compileProgram":17,"./defaultValue":18,"./extractAttributes":19,"./extractUniforms":20,"./generateUniformAccessObject":21,"./mapSize":23,"./mapType":24,"./setPrecision":25}],23:[function(t,e,n){var r=function(t){return i[t]},i={float:1,vec2:2,vec3:3,vec4:4,int:1,ivec2:2,ivec3:3,ivec4:4,bool:1,bvec2:2,bvec3:3,bvec4:4,mat2:4,mat3:9,mat4:16,sampler2D:1};e.exports=r},{}],24:[function(t,e,n){var r=function(t,e){if(!i){var n=Object.keys(o);i={};for(var r=0;r<n.length;++r){var a=n[r];i[t[a]]=o[a]}}return i[e]},i=null,o={FLOAT:"float",FLOAT_VEC2:"vec2",FLOAT_VEC3:"vec3",FLOAT_VEC4:"vec4",INT:"int",INT_VEC2:"ivec2",INT_VEC3:"ivec3",INT_VEC4:"ivec4",BOOL:"bool",BOOL_VEC2:"bvec2",BOOL_VEC3:"bvec3",BOOL_VEC4:"bvec4",FLOAT_MAT2:"mat2",FLOAT_MAT3:"mat3",FLOAT_MAT4:"mat4",SAMPLER_2D:"sampler2D"};e.exports=r},{}],25:[function(t,e,n){var r=function(t,e){return"precision"!==t.substring(0,9)?"precision "+e+" float;\n"+t:t};e.exports=r},{}],26:[function(t,e,n){function r{throw new Error("setTimeout has not been defined")}function i{throw new Error("clearTimeout has not been defined")}function o(t){if(h===setTimeout)return setTimeout(t,0);if((h===r||!h)&&setTimeout)return h=setTimeout,setTimeout(t,0);try{return h(t,0)}catch(e){try{return h.call(null,t,0)}catch(e){return h.call(this,t,0)}}}function a(t){if(d===clearTimeout)return clearTimeout(t);if((d===i||!d)&&clearTimeout)return d=clearTimeout,clearTimeout(t);try{return d(t)}catch(e){try{return d.call(null,t)}catch(e){return d.call(this,t)}}}function s{m&&f&&(m=!1,f.length?g=f.concat(g):v=-1,g.length&&u)}function u{if(!m){var t=o(s);m=!0;for(var e=g.length;e;){for(f=g,g=[];++v<e;)f&&f[v].run;v=-1,e=g.length}f=null,m=!1,a(t)}}function l(t,e){this.fun=t,this.array=e}function c{}var h,d,p=e.exports={};!function{try{h="function"==typeof setTimeout?setTimeout:r}catch(t){h=r}try{d="function"==typeof clearTimeout?clearTimeout:i}catch(t){d=i}};var f,g=[],m=!1,v=-1;p.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];g.push(new l(t,e)),1!==g.length||m||o(u)},l.prototype.run=function{this.fun.apply(null,this.array)},p.title="browser",p.browser=!0,p.env={},p.argv=[],p.version="",p.versions={},p.on=c,p.addListener=c,p.once=c,p.off=c,p.removeListener=c,p.removeAllListeners=c,p.emit=c,p.prependListener=c,p.prependOnceListener=c,p.listeners=function(t){return[]},p.binding=function(t){throw new Error("process.binding is not supported")},p.cwd=function{return"/"},p.chdir=function(t){throw new Error("process.chdir is not supported")},p.umask=function{return 0}},{}],27:[function(n,r,i){(function(e){!function(n){function o(t){throw new RangeError(D[t])}function a(t,e){for(var n=t.length,r=[];n--;)r[n]=e(t[n]);return r}function s(t,e){var n=t.split("@"),r="";return n.length>1&&(r=n[0]+"@",t=n[1]),t=t.replace(R,"."),r+a(t.split("."),e).join(".")}function u(t){for(var e,n,r=[],i=0,o=t.length;i<o;)e=t.charCodeAt(i++),e>=55296&&e<=56319&&i<o?(n=t.charCodeAt(i++),56320==(64512&n)?r.push(((1023&e)<<10)+(1023&n)+65536):(r.push(e),i--)):r.push(e);return r}function l(t){return a(t,function(t){var e="";return t>65535&&(t-=65536,e+=B(t>>>10&1023|55296),t=56320|1023&t),e+=B(t)}).join("")}function c(t){return t-48<10?t-22:t-65<26?t-65:t-97<26?t-97:T}function h(t,e){return t+22+75*(t<26)-((0!=e)<<5)}function d(t,e,n){var r=0;for(t=n?j(t/M):t>>1,t+=j(t/e);t>L*E>>1;r+=T)t=j(t/L);return j(r+(L+1)*t/(t+P))}function p(t){var e,n,r,i,a,s,u,h,p,f,g=[],m=t.length,v=0,y=A,_=C;for(n=t.lastIndexOf(O),n<0&&(n=0),r=0;r<n;++r)t.charCodeAt(r)>=128&&o("not-basic"),g.push(t.charCodeAt(r));for(i=n>0?n+1:0;i<m;){for(a=v,s=1,u=T;i>=m&&o("invalid-input"),h=c(t.charCodeAt(i++)),(h>=T||h>j((w-v)/s))&&o("overflow"),v+=h*s,p=u<=_?S:u>=_+E?E:u-_,!(h<p);u+=T)f=T-p,s>j(w/f)&&o("overflow"),s*=f;e=g.length+1,_=d(v-a,e,0==a),j(v/e)>w-y&&o("overflow"),y+=j(v/e),v%=e,g.splice(v++,0,y)}return l(g)}function f(t){var e,n,r,i,a,s,l,c,p,f,g,m,v,y,_,b=[];for(t=u(t),m=t.length,e=A,n=0,a=C,s=0;s<m;++s)(g=t[s])<128&&b.push(B(g));for(r=i=b.length,i&&b.push(O);r<m;){for(l=w,s=0;s<m;++s)(g=t[s])>=e&&g<l&&(l=g);for(v=r+1,l-e>j((w-n)/v)&&o("overflow"),n+=(l-e)*v,e=l,s=0;s<m;++s)if(g=t[s],g<e&&++n>w&&o("overflow"),g==e){for(c=n,p=T;f=p<=a?S:p>=a+E?E:p-a,!(c<f);p+=T)_=c-f,y=T-f,b.push(B(h(f+_%y,0))),c=j(_/y);b.push(B(h(c,0))),a=d(n,v,r==i),n=0,++r}++n,++e}return b.join("")}function g(t){return s(t,function(t){return I.test(t)?p(t.slice(4).toLowerCase):t})}function m(t){return s(t,function(t){return k.test(t)?"xn--"+f(t):t})}var v="object"==typeof i&&i&&!i.nodeType&&i,y="object"==typeof r&&r&&!r.nodeType&&r,_="object"==typeof e&&e;_.global!==_&&_.window!==_&&_.self!==_||(n=_);var b,x,w=2147483647,T=36,S=1,E=26,P=38,M=700,C=72,A=128,O="-",I=/^xn--/,k=/[^\x20-\x7E]/,R=/[\x2E\u3002\uFF0E\uFF61]/g,D={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},L=T-S,j=Math.floor,B=String.fromCharCode;if(b={version:"1.4.1",ucs2:{decode:u,encode:l},decode:p,encode:f,toASCII:m,toUnicode:g},"function"==typeof t&&"object"==typeof t.amd&&t.amd)t("punycode",function{return b});else if(v&&y)if(r.exports==v)y.exports=b;else for(x in b)b.hasOwnProperty(x)&&(v[x]=b[x]);else n.punycode=b}(this)}).call(this,void 0!==e?e:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],28:[function(t,e,n){"use strict";function r(t,e){return Object.prototype.hasOwnProperty.call(t,e)}e.exports=function(t,e,n,o){e=e||"&",n=n||"=";var a={};if("string"!=typeof t||0===t.length)return a;var s=/\+/g;t=t.split(e);var u=1e3;o&&"number"==typeof o.maxKeys&&(u=o.maxKeys);var l=t.length;u>0&&l>u&&(l=u);for(var c=0;c<l;++c){var h,d,p,f,g=t[c].replace(s,"%20"),m=g.indexOf(n);m>=0?(h=g.substr(0,m),d=g.substr(m+1)):(h=g,d=""),p=decodeURIComponent(h),f=decodeURIComponent(d),r(a,p)?i(a[p])?a[p].push(f):a[p]=[a[p],f]:a[p]=f}return a};var i=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)}},{}],29:[function(t,e,n){"use strict";function r(t,e){if(t.map)return t.map(e);for(var n=[],r=0;r<t.length;r++)n.push(e(t[r],r));return n}var i=function(t){switch(typeof t){case"string":return t;case"boolean":return t?"true":"false";case"number":return isFinite(t)?t:"";default:return""}};e.exports=function(t,e,n,s){return e=e||"&",n=n||"=",null===t&&(t=void 0),"object"==typeof t?r(a(t),function(a){var s=encodeURIComponent(i(a))+n;return o(t[a])?r(t[a],function(t){return s+encodeURIComponent(i(t))}).join(e):s+encodeURIComponent(i(t[a]))}).join(e):s?encodeURIComponent(i(s))+n+encodeURIComponent(i(t)):""};var o=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)},a=Object.keys||function(t){var e=[];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.push(n);return e}},{}],30:[function(t,e,n){"use strict";n.decode=n.parse=t("./decode"),n.encode=n.stringify=t("./encode")},{"./decode":28,"./encode":29}],31:[function(t,e,n){"use strict";e.exports=function(t,e,n){var r,i=t.length;if(!(e>=i||0===n)){n=e+n>i?i-e:n;var o=i-n;for(r=e;r<o;++r)t[r]=t[r+n];t.length=o}}},{}],32:[function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}n.__esModule=!0;var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},a=t("mini-signals"),s=r(a),u=t("parse-uri"),l=r(u),c=t("./async"),h=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(c),d=t("./Resource"),p=r(d),f=/(#[\w-]+)?$/,g=function{function t{var e=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10;i(this,t),this.baseUrl=n,this.progress=0,this.loading=!1,this.defaultQueryString="",this._beforeMiddleware=[],this._afterMiddleware=[],this._resourcesParsing=[],this._boundLoadResource=function(t,n){return e._loadResource(t,n)},this._queue=h.queue(this._boundLoadResource,r),this._queue.pause,this.resources={},this.onProgress=new s.default,this.onError=new s.default,this.onLoad=new s.default,this.onStart=new s.default,this.onComplete=new s.default}return t.prototype.add=function(t,e,n,r){if(Array.isArray(t)){for(var i=0;i<t.length;++i)this.add(t[i]);return this}if("object"===(void 0===t?"undefined":o(t))&&(r=e||t.callback||t.onComplete,n=t,e=t.url,t=t.name||t.key||t.url),"string"!=typeof e&&(r=n,n=e,e=t),"string"!=typeof e)throw new Error("No url passed to add resource to loader.");if("function"==typeof n&&(r=n,n=null),this.loading&&(!n||!n.parentResource))throw new Error("Cannot add resources while the loader is running.");if(this.resources[t])throw new Error('Resource named "'+t+'" already exists.');if(e=this._prepareUrl(e),this.resources[t]=new p.default(t,e,n),"function"==typeof r&&this.resources[t].onAfterMiddleware.once(r),this.loading){for(var a=n.parentResource,s=[],u=0;u<a.children.length;++u)a.children[u].isComplete||s.push(a.children[u]);var l=a.progressChunk*(s.length+1),c=l/(s.length+2);a.children.push(this.resources[t]),a.progressChunk=c;for(var h=0;h<s.length;++h)s[h].progressChunk=c;this.resources[t].progressChunk=c}return this._queue.push(this.resources[t]),this},t.prototype.pre=function(t){return this._beforeMiddleware.push(t),this},t.prototype.use=function(t){return this._afterMiddleware.push(t),this},t.prototype.reset=function{this.progress=0,this.loading=!1,this._queue.kill,this._queue.pause;for(var t in this.resources){var e=this.resources[t];e._onLoadBinding&&e._onLoadBinding.detach,e.isLoading&&e.abort}return this.resources={},this},t.prototype.load=function(t){if("function"==typeof t&&this.onComplete.once(t),this.loading)return this;for(var e=100/this._queue._tasks.length,n=0;n<this._queue._tasks.length;++n)this._queue._tasks[n].data.progressChunk=e;return this.loading=!0,this.onStart.dispatch(this),this._queue.resume,this},t.prototype._prepareUrl=function(t){var e=(0,l.default)(t,{strictMode:!0}),n=void 0;if(n=e.protocol||!e.path||0===t.indexOf("//")?t:this.baseUrl.length&&this.baseUrl.lastIndexOf("/")!==this.baseUrl.length-1&&"/"!==t.charAt(0)?this.baseUrl+"/"+t:this.baseUrl+t,this.defaultQueryString){var r=f.exec(n)[0];n=n.substr(0,n.length-r.length),-1!==n.indexOf("?")?n+="&"+this.defaultQueryString:n+="?"+this.defaultQueryString,n+=r}return n},t.prototype._loadResource=function(t,e){var n=this;t._dequeue=e,h.eachSeries(this._beforeMiddleware,function(e,r){e.call(n,t,function{r(t.isComplete?{}:null)})},function{t.isComplete?n._onLoad(t):(t._onLoadBinding=t.onComplete.once(n._onLoad,n),t.load)},!0)},t.prototype._onComplete=function{this.loading=!1,this.onComplete.dispatch(this,this.resources)},t.prototype._onLoad=function(t){var e=this;t._onLoadBinding=null,this._resourcesParsing.push(t),t._dequeue,h.eachSeries(this._afterMiddleware,function(n,r){n.call(e,t,r)},function{t.onAfterMiddleware.dispatch(t),e.progress+=t.progressChunk,e.onProgress.dispatch(e,t),t.error?e.onError.dispatch(t.error,e,t):e.onLoad.dispatch(e,t),e._resourcesParsing.splice(e._resourcesParsing.indexOf(t),1),e._queue.idle&&0===e._resourcesParsing.length&&(e.progress=100,e._onComplete)},!0)},t};n.default=g},{"./Resource":33,"./async":34,"mini-signals":5,"parse-uri":7}],33:[function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o{}function a(t,e,n){e&&0===e.indexOf(".")&&(e=e.substring(1)),e&&(t[e]=n)}function s(t){return t.toString.replace("object ","")}n.__esModule=!0;var u=function{function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}},l=t("parse-uri"),c=r(l),h=t("mini-signals"),d=r(h),p=!(!window.XDomainRequest||"withCredentials"in new XMLHttpRequest),f=null,g=function{function t(e,n,r){if(i(this,t),"string"!=typeof e||"string"!=typeof n)throw new Error("Both name and url are required for constructing a resource.");r=r||{},this._flags=0,this._setFlag(t.STATUS_FLAGS.DATA_URL,0===n.indexOf("data:")),this.name=e,this.url=n,this.extension=this._getExtension,this.data=null,this.crossOrigin=!0===r.crossOrigin?"anonymous":r.crossOrigin,this.loadType=r.loadType||this._determineLoadType,this.xhrType=r.xhrType,this.metadata=r.metadata||{},this.error=null,this.xhr=null,this.children=[],this.type=t.TYPE.UNKNOWN,this.progressChunk=0,this._dequeue=o,this._onLoadBinding=null,this._boundComplete=this.complete.bind(this),this._boundOnError=this._onError.bind(this),this._boundOnProgress=this._onProgress.bind(this),this._boundXhrOnError=this._xhrOnError.bind(this),this._boundXhrOnAbort=this._xhrOnAbort.bind(this),this._boundXhrOnLoad=this._xhrOnLoad.bind(this),this._boundXdrOnTimeout=this._xdrOnTimeout.bind(this),this.onStart=new d.default,this.onProgress=new d.default,this.onComplete=new d.default,this.onAfterMiddleware=new d.default}return t.setExtensionLoadType=function(e,n){a(t._loadTypeMap,e,n)},t.setExtensionXhrType=function(e,n){a(t._xhrTypeMap,e,n)},t.prototype.complete=function{if(this.data&&this.data.removeEventListener&&(this.data.removeEventListener("error",this._boundOnError,!1),this.data.removeEventListener("load",this._boundComplete,!1),this.data.removeEventListener("progress",this._boundOnProgress,!1),this.data.removeEventListener("canplaythrough",this._boundComplete,!1)),this.xhr&&(this.xhr.removeEventListener?(this.xhr.removeEventListener("error",this._boundXhrOnError,!1),this.xhr.removeEventListener("abort",this._boundXhrOnAbort,!1),this.xhr.removeEventListener("progress",this._boundOnProgress,!1),this.xhr.removeEventListener("load",this._boundXhrOnLoad,!1)):(this.xhr.onerror=null,this.xhr.ontimeout=null,this.xhr.onprogress=null,this.xhr.onload=null)),this.isComplete)throw new Error("Complete called again for an already completed resource.");this._setFlag(t.STATUS_FLAGS.COMPLETE,!0),this._setFlag(t.STATUS_FLAGS.LOADING,!1),this.onComplete.dispatch(this)},t.prototype.abort=function(e){if(!this.error){if(this.error=new Error(e),this.xhr)this.xhr.abort;else if(this.xdr)this.xdr.abort;else if(this.data)if(this.data.src)this.data.src=t.EMPTY_GIF;else for(this.data.firstChild;)this.data.removeChild(this.data.firstChild);this.complete}},t.prototype.load=function(e){var n=this;if(!this.isLoading){if(this.isComplete)return void(e&&setTimeout(function{return e(n)},1));switch(e&&this.onComplete.once(e),this._setFlag(t.STATUS_FLAGS.LOADING,!0),this.onStart.dispatch(this),!1!==this.crossOrigin&&"string"==typeof this.crossOrigin||(this.crossOrigin=this._determineCrossOrigin(this.url)),this.loadType){case t.LOAD_TYPE.IMAGE:this.type=t.TYPE.IMAGE,this._loadElement("image");break;case t.LOAD_TYPE.AUDIO:this.type=t.TYPE.AUDIO,this._loadSourceElement("audio");break;case t.LOAD_TYPE.VIDEO:this.type=t.TYPE.VIDEO,this._loadSourceElement("video");break;case t.LOAD_TYPE.XHR:default:p&&this.crossOrigin?this._loadXdr:this._loadXhr}}},t.prototype._hasFlag=function(t){return!!(this._flags&t)},t.prototype._setFlag=function(t,e){this._flags=e?this._flags|t:this._flags&~t},t.prototype._loadElement=function(t){this.metadata.loadElement?this.data=this.metadata.loadElement:"image"===t&&void 0!==window.Image?this.data=new Image:this.data=document.createElement(t),this.crossOrigin&&(this.data.crossOrigin=this.crossOrigin),this.metadata.skipSource||(this.data.src=this.url),this.data.addEventListener("error",this._boundOnError,!1),this.data.addEventListener("load",this._boundComplete,!1),this.data.addEventListener("progress",this._boundOnProgress,!1)},t.prototype._loadSourceElement=function(t){if(this.metadata.loadElement?this.data=this.metadata.loadElement:"audio"===t&&void 0!==window.Audio?this.data=new Audio:this.data=document.createElement(t),null===this.data)return void this.abort("Unsupported element: "+t);if(!this.metadata.skipSource)if(navigator.isCocoonJS)this.data.src=Array.isArray(this.url)?this.url[0]:this.url;else if(Array.isArray(this.url))for(var e=0;e<this.url.length;++e)this.data.appendChild(this._createSource(t,this.url[e]));else this.data.appendChild(this._createSource(t,this.url));this.data.addEventListener("error",this._boundOnError,!1),this.data.addEventListener("load",this._boundComplete,!1),this.data.addEventListener("progress",this._boundOnProgress,!1),this.data.addEventListener("canplaythrough",this._boundComplete,!1),this.data.load},t.prototype._loadXhr=function{"string"!=typeof this.xhrType&&(this.xhrType=this._determineXhrType);var e=this.xhr=new XMLHttpRequest;e.open("GET",this.url,!0),this.xhrType===t.XHR_RESPONSE_TYPE.JSON||this.xhrType===t.XHR_RESPONSE_TYPE.DOCUMENT?e.responseType=t.XHR_RESPONSE_TYPE.TEXT:e.responseType=this.xhrType,e.addEventListener("error",this._boundXhrOnError,!1),e.addEventListener("abort",this._boundXhrOnAbort,!1),e.addEventListener("progress",this._boundOnProgress,!1),e.addEventListener("load",this._boundXhrOnLoad,!1),e.send},t.prototype._loadXdr=function{"string"!=typeof this.xhrType&&(this.xhrType=this._determineXhrType);var t=this.xhr=new XDomainRequest;t.timeout=5e3,t.onerror=this._boundXhrOnError,t.ontimeout=this._boundXdrOnTimeout,t.onprogress=this._boundOnProgress,t.onload=this._boundXhrOnLoad,t.open("GET",this.url,!0),setTimeout(function{return t.send},1)},t.prototype._createSource=function(t,e,n){n||(n=t+"/"+e.substr(e.lastIndexOf(".")+1));var r=document.createElement("source");return r.src=e,r.type=n,r},t.prototype._onError=function(t){this.abort("Failed to load element using: "+t.target.nodeName)},t.prototype._onProgress=function(t){t&&t.lengthComputable&&this.onProgress.dispatch(this,t.loaded/t.total)},t.prototype._xhrOnError=function{var t=this.xhr;this.abort(s(t)+" Request failed. Status: "+t.status+', text: "'+t.statusText+'"')},t.prototype._xhrOnAbort=function{this.abort(s(this.xhr)+" Request was aborted by the user.")},t.prototype._xdrOnTimeout=function{this.abort(s(this.xhr)+" Request timed out.")},t.prototype._xhrOnLoad=function{var e=this.xhr,n="",r=void 0===e.status?200:e.status;if(""!==e.responseType&&"text"!==e.responseType&&void 0!==e.responseType||(n=e.responseText),0===r&&n.length>0?r=200:1223===r&&(r=204),2!=(r/100|0))return void this.abort("["+e.status+"] "+e.statusText+": "+e.responseURL);if(this.xhrType===t.XHR_RESPONSE_TYPE.TEXT)this.data=n,this.type=t.TYPE.TEXT;else if(this.xhrType===t.XHR_RESPONSE_TYPE.JSON)try{this.data=JSON.parse(n),this.type=t.TYPE.JSON}catch(t){return void this.abort("Error trying to parse loaded json: "+t)}else if(this.xhrType===t.XHR_RESPONSE_TYPE.DOCUMENT)try{if(window.DOMParser){var i=new DOMParser;this.data=i.parseFromString(n,"text/xml")}else{var o=document.createElement("div");o.innerHTML=n,this.data=o}this.type=t.TYPE.XML}catch(t){return void this.abort("Error trying to parse loaded xml: "+t)}else this.data=e.response||n;this.complete},t.prototype._determineCrossOrigin=function(t,e){if(0===t.indexOf("data:"))return"";e=e||window.location,f||(f=document.createElement("a")),f.href=t,t=(0,c.default)(f.href,{strictMode:!0});var n=!t.port&&""===e.port||t.port===e.port,r=t.protocol?t.protocol+":":"";return t.host===e.hostname&&n&&r===e.protocol?"":"anonymous"},t.prototype._determineXhrType=function{return t._xhrTypeMap[this.extension]||t.XHR_RESPONSE_TYPE.TEXT},t.prototype._determineLoadType=function{return t._loadTypeMap[this.extension]||t.LOAD_TYPE.XHR},t.prototype._getExtension=function{var t=this.url,e="";if(this.isDataUrl){var n=t.indexOf("/");e=t.substring(n+1,t.indexOf(";",n))}else{var r=t.indexOf("?");-1!==r&&(t=t.substring(0,r)),e=t.substring(t.lastIndexOf(".")+1)}return e.toLowerCase},t.prototype._getMimeFromXhrType=function(e){switch(e){case t.XHR_RESPONSE_TYPE.BUFFER:return"application/octet-binary";case t.XHR_RESPONSE_TYPE.BLOB:return"application/blob";case t.XHR_RESPONSE_TYPE.DOCUMENT:return"application/xml";case t.XHR_RESPONSE_TYPE.JSON:return"application/json";case t.XHR_RESPONSE_TYPE.DEFAULT:case t.XHR_RESPONSE_TYPE.TEXT:default:return"text/plain"}},u(t,[{key:"isDataUrl",get:function{return this._hasFlag(t.STATUS_FLAGS.DATA_URL)}},{key:"isComplete",get:function{return this._hasFlag(t.STATUS_FLAGS.COMPLETE)}},{key:"isLoading",get:function{return this._hasFlag(t.STATUS_FLAGS.LOADING)}}]),t};n.default=g,g.STATUS_FLAGS={NONE:0,DATA_URL:1,COMPLETE:2,LOADING:4},g.TYPE={UNKNOWN:0,JSON:1,XML:2,IMAGE:3,AUDIO:4,VIDEO:5,TEXT:6},g.LOAD_TYPE={XHR:1,IMAGE:2,AUDIO:3,VIDEO:4},g.XHR_RESPONSE_TYPE={DEFAULT:"text",BUFFER:"arraybuffer",BLOB:"blob",DOCUMENT:"document",JSON:"json",TEXT:"text"},g._loadTypeMap={gif:g.LOAD_TYPE.IMAGE,png:g.LOAD_TYPE.IMAGE,bmp:g.LOAD_TYPE.IMAGE,jpg:g.LOAD_TYPE.IMAGE,jpeg:g.LOAD_TYPE.IMAGE,tif:g.LOAD_TYPE.IMAGE,tiff:g.LOAD_TYPE.IMAGE,webp:g.LOAD_TYPE.IMAGE,tga:g.LOAD_TYPE.IMAGE,svg:g.LOAD_TYPE.IMAGE,"svg+xml":g.LOAD_TYPE.IMAGE,mp3:g.LOAD_TYPE.AUDIO,ogg:g.LOAD_TYPE.AUDIO,wav:g.LOAD_TYPE.AUDIO,mp4:g.LOAD_TYPE.VIDEO,webm:g.LOAD_TYPE.VIDEO},g._xhrTypeMap={xhtml:g.XHR_RESPONSE_TYPE.DOCUMENT,html:g.XHR_RESPONSE_TYPE.DOCUMENT,htm:g.XHR_RESPONSE_TYPE.DOCUMENT,xml:g.XHR_RESPONSE_TYPE.DOCUMENT,tmx:g.XHR_RESPONSE_TYPE.DOCUMENT,svg:g.XHR_RESPONSE_TYPE.DOCUMENT,tsx:g.XHR_RESPONSE_TYPE.DOCUMENT,gif:g.XHR_RESPONSE_TYPE.BLOB,png:g.XHR_RESPONSE_TYPE.BLOB,bmp:g.XHR_RESPONSE_TYPE.BLOB,jpg:g.XHR_RESPONSE_TYPE.BLOB,jpeg:g.XHR_RESPONSE_TYPE.BLOB,tif:g.XHR_RESPONSE_TYPE.BLOB,tiff:g.XHR_RESPONSE_TYPE.BLOB,webp:g.XHR_RESPONSE_TYPE.BLOB,tga:g.XHR_RESPONSE_TYPE.BLOB,json:g.XHR_RESPONSE_TYPE.JSON,text:g.XHR_RESPONSE_TYPE.TEXT,txt:g.XHR_RESPONSE_TYPE.TEXT,ttf:g.XHR_RESPONSE_TYPE.BUFFER,otf:g.XHR_RESPONSE_TYPE.BUFFER},g.EMPTY_GIF="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw=="},{"mini-signals":5,"parse-uri":7}],34:[function(t,e,n){"use strict";function r{}function i(t,e,n,r){var i=0,o=t.length;!function a(s){if(s||i===o)return void(n&&n(s));r?setTimeout(function{e(t[i++],a)},1):e(t[i++],a)}}function o(t){return function{if(null===t)throw new Error("Callback was already called.");var e=t;t=null,e.apply(this,arguments)}}function a(t,e){function n(t,e,n){if(null!=n&&"function"!=typeof n)throw new Error("task callback must be a function");if(s.started=!0,null==t&&s.idle)return void setTimeout(function{return s.drain},1);var i={data:t,callback:"function"==typeof n?n:r};e?s._tasks.unshift(i):s._tasks.push(i),setTimeout(function{return s.process},1)}function i(t){return function{a-=1,t.callback.apply(t,arguments),null!=arguments[0]&&s.error(arguments[0],t.data),a<=s.concurrency-s.buffer&&s.unsaturated,s.idle&&s.drain,s.process}}if(null==e)e=1;else if(0===e)throw new Error("Concurrency must not be zero");var a=0,s={_tasks:[],concurrency:e,saturated:r,unsaturated:r,buffer:e/4,empty:r,drain:r,error:r,started:!1,paused:!1,push:function(t,e){n(t,!1,e)},kill:function{a=0,s.drain=r,s.started=!1,s._tasks=[]},unshift:function(t,e){n(t,!0,e)},process:function{for(!s.paused&&a<s.concurrency&&s._tasks.length;){var e=s._tasks.shift;0===s._tasks.length&&s.empty,a+=1,a===s.concurrency&&s.saturated,t(e.data,o(i(e)))}},length:function{return s._tasks.length},running:function{return a},idle:function{return s._tasks.length+a===0},pause:function{!0!==s.paused&&(s.paused=!0)},resume:function{if(!1!==s.paused){s.paused=!1;for(var t=1;t<=s.concurrency;t++)s.process}}};return s}n.__esModule=!0,n.eachSeries=i,n.queue=a},{}],35:[function(t,e,n){"use strict";function r(t){for(var e="",n=0;n<t.length;){for(var r=[0,0,0],o=[0,0,0,0],a=0;a<r.length;++a)n<t.length?r[a]=255&t.charCodeAt(n++):r[a]=0;o[0]=r[0]>>2,o[1]=(3&r[0])<<4|r[1]>>4,o[2]=(15&r[1])<<2|r[2]>>6,o[3]=63&r[2];switch(n-(t.length-1)){case 2:o[3]=64,o[2]=64;break;case 1:o[3]=64}for(var s=0;s<o.length;++s)e+=i.charAt(o[s])}return e}n.__esModule=!0,n.encodeBinary=r;var i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="},{}],36:[function(t,e,n){"use strict";var r=t("./Loader").default,i=t("./Resource").default,o=t("./async"),a=t("./b64");r.Resource=i,r.async=o,r.base64=a,e.exports=r,e.exports.default=r},{"./Loader":32,"./Resource":33,"./async":34,"./b64":35}],37:[function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i{return function(t,e){if(!t.data)return void e;if(t.xhr&&t.xhrType===s.default.XHR_RESPONSE_TYPE.BLOB)if(window.Blob&&"string"!=typeof t.data){if(0===t.data.type.indexOf("image")){var n=function{var n=c.createObjectURL(t.data);return t.blob=t.data,t.data=new Image,t.data.src=n,t.type=s.default.TYPE.IMAGE,t.data.onload=function{c.revokeObjectURL(n),t.data.onload=null,e},{v:void 0}};if("object"===(void 0===n?"undefined":o(n)))return n.v}}else{var r=t.xhr.getResponseHeader("content-type");if(r&&0===r.indexOf("image"))return t.data=new Image,t.data.src="data:"+r+";base64,"+l.default.encodeBinary(t.xhr.responseText),t.type=s.default.TYPE.IMAGE,void(t.data.onload=function{t.data.onload=null,e})}e}}n.__esModule=!0;var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};n.blobMiddlewareFactory=i;var a=t("../../Resource"),s=r(a),u=t("../../b64"),l=r(u),c=window.URL||window.webkitURL},{"../../Resource":33,"../../b64":35}],38:[function(t,e,n){"use strict";function r{this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}function i(t,e,n){if(t&&l.isObject(t)&&t instanceof r)return t;var i=new r;return i.parse(t,e,n),i}function o(t){return l.isString(t)&&(t=i(t)),t instanceof r?t.format:r.prototype.format.call(t)}function a(t,e){return i(t,!1,!0).resolve(e)}function s(t,e){return t?i(t,!1,!0).resolveObject(e):e}var u=t("punycode"),l=t("./util");n.parse=i,n.resolve=a,n.resolveObject=s,n.format=o,n.Url=r;var c=/^([a-z0-9.+-]+:)/i,h=/:[0-9]*$/,d=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,p=["<",">",'"',"`"," ","\r","\n","\t"],f=["{","}","|","\\","^","`"].concat(p),g=["'"].concat(f),m=["%","/","?",";","#"].concat(g),v=["/","?","#"],y=/^[+a-z0-9A-Z_-]{0,63}$/,_=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,b={javascript:!0,"javascript:":!0},x={javascript:!0,"javascript:":!0},w={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},T=t("querystring");r.prototype.parse=function(t,e,n){if(!l.isString(t))throw new TypeError("Parameter 'url' must be a string, not "+typeof t);var r=t.indexOf("?"),i=-1!==r&&r<t.indexOf("#")?"?":"#",o=t.split(i),a=/\\/g;o[0]=o[0].replace(a,"/"),t=o.join(i);var s=t;if(s=s.trim,!n&&1===t.split("#").length){var h=d.exec(s);if(h)return this.path=s,this.href=s,this.pathname=h[1],h[2]?(this.search=h[2],this.query=e?T.parse(this.search.substr(1)):this.search.substr(1)):e&&(this.search="",this.query={}),this}var p=c.exec(s);if(p){p=p[0];var f=p.toLowerCase;this.protocol=f,s=s.substr(p.length)}if(n||p||s.match(/^\/\/[^@\/]+@[^@\/]+/)){var S="//"===s.substr(0,2);!S||p&&x[p]||(s=s.substr(2),this.slashes=!0)}if(!x[p]&&(S||p&&!w[p])){for(var E=-1,P=0;P<v.length;P++){var M=s.indexOf(v[P]);-1!==M&&(-1===E||M<E)&&(E=M)}var C,A;A=-1===E?s.lastIndexOf("@"):s.lastIndexOf("@",E),-1!==A&&(C=s.slice(0,A),s=s.slice(A+1),this.auth=decodeURIComponent(C)),E=-1;for(var P=0;P<m.length;P++){var M=s.indexOf(m[P]);-1!==M&&(-1===E||M<E)&&(E=M)}-1===E&&(E=s.length),this.host=s.slice(0,E),s=s.slice(E),this.parseHost,this.hostname=this.hostname||"";var O="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!O)for(var I=this.hostname.split(/\./),P=0,k=I.length;P<k;P++){var R=I[P];if(R&&!R.match(y)){for(var D="",L=0,j=R.length;L<j;L++)R.charCodeAt(L)>127?D+="x":D+=R[L];if(!D.match(y)){var B=I.slice(0,P),N=I.slice(P+1),F=R.match(_);F&&(B.push(F[1]),N.unshift(F[2])),N.length&&(s="/"+N.join(".")+s),this.hostname=B.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase,O||(this.hostname=u.toASCII(this.hostname));var U=this.port?":"+this.port:"",W=this.hostname||"";this.host=W+U,this.href+=this.host,O&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==s[0]&&(s="/"+s))}if(!b[f])for(var P=0,k=g.length;P<k;P++){var H=g[P];if(-1!==s.indexOf(H)){var z=encodeURIComponent(H);z===H&&(z=escape(H)),s=s.split(H).join(z)}}var X=s.indexOf("#");-1!==X&&(this.hash=s.substr(X),s=s.slice(0,X));var G=s.indexOf("?");if(-1!==G?(this.search=s.substr(G),this.query=s.substr(G+1),e&&(this.query=T.parse(this.query)),s=s.slice(0,G)):e&&(this.search="",this.query={}),s&&(this.pathname=s),w[f]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var U=this.pathname||"",q=this.search||"";this.path=U+q}return this.href=this.format,this},r.prototype.format=function{var t=this.auth||"";t&&(t=encodeURIComponent(t),t=t.replace(/%3A/i,":"),t+="@");var e=this.protocol||"",n=this.pathname||"",r=this.hash||"",i=!1,o="";this.host?i=t+this.host:this.hostname&&(i=t+(-1===this.hostname.indexOf(":")?this.hostname:"["+this.hostname+"]"),this.port&&(i+=":"+this.port)),this.query&&l.isObject(this.query)&&Object.keys(this.query).length&&(o=T.stringify(this.query));var a=this.search||o&&"?"+o||"";return e&&":"!==e.substr(-1)&&(e+=":"),this.slashes||(!e||w[e])&&!1!==i?(i="//"+(i||""),n&&"/"!==n.charAt(0)&&(n="/"+n)):i||(i=""),r&&"#"!==r.charAt(0)&&(r="#"+r),a&&"?"!==a.charAt(0)&&(a="?"+a),n=n.replace(/[?#]/g,function(t){return encodeURIComponent(t)}),a=a.replace("#","%23"),e+i+n+a+r},r.prototype.resolve=function(t){return this.resolveObject(i(t,!1,!0)).format},r.prototype.resolveObject=function(t){if(l.isString(t)){var e=new r;e.parse(t,!1,!0),t=e}for(var n=new r,i=Object.keys(this),o=0;o<i.length;o++){var a=i[o];n[a]=this[a]}if(n.hash=t.hash,""===t.href)return n.href=n.format,n;if(t.slashes&&!t.protocol){for(var s=Object.keys(t),u=0;u<s.length;u++){var c=s[u];"protocol"!==c&&(n[c]=t[c])}return w[n.protocol]&&n.hostname&&!n.pathname&&(n.path=n.pathname="/"),n.href=n.format,n}if(t.protocol&&t.protocol!==n.protocol){if(!w[t.protocol]){for(var h=Object.keys(t),d=0;d<h.length;d++){var p=h[d];n[p]=t[p]}return n.href=n.format,n}if(n.protocol=t.protocol,t.host||x[t.protocol])n.pathname=t.pathname;else{for(var f=(t.pathname||"").split("/");f.length&&!(t.host=f.shift););t.host||(t.host=""),t.hostname||(t.hostname=""),""!==f[0]&&f.unshift(""),f.length<2&&f.unshift(""),n.pathname=f.join("/")}if(n.search=t.search,n.query=t.query,n.host=t.host||"",n.auth=t.auth,n.hostname=t.hostname||t.host,n.port=t.port,n.pathname||n.search){var g=n.pathname||"",m=n.search||"";n.path=g+m}return n.slashes=n.slashes||t.slashes,n.href=n.format,n}var v=n.pathname&&"/"===n.pathname.charAt(0),y=t.host||t.pathname&&"/"===t.pathname.charAt(0),_=y||v||n.host&&t.pathname,b=_,T=n.pathname&&n.pathname.split("/")||[],f=t.pathname&&t.pathname.split("/")||[],S=n.protocol&&!w[n.protocol];if(S&&(n.hostname="",n.port=null,n.host&&(""===T[0]?T[0]=n.host:T.unshift(n.host)),n.host="",t.protocol&&(t.hostname=null,t.port=null,t.host&&(""===f[0]?f[0]=t.host:f.unshift(t.host)),t.host=null),_=_&&(""===f[0]||""===T[0])),y)n.host=t.host||""===t.host?t.host:n.host,n.hostname=t.hostname||""===t.hostname?t.hostname:n.hostname,n.search=t.search,n.query=t.query,T=f;else if(f.length)T||(T=[]),T.pop,T=T.concat(f),n.search=t.search,n.query=t.query;else if(!l.isNullOrUndefined(t.search)){if(S){n.hostname=n.host=T.shift;var E=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@");E&&(n.auth=E.shift,n.host=n.hostname=E.shift)}return n.search=t.search,n.query=t.query,l.isNull(n.pathname)&&l.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.href=n.format,n}if(!T.length)return n.pathname=null,n.search?n.path="/"+n.search:n.path=null,n.href=n.format,n;for(var P=T.slice(-1)[0],M=(n.host||t.host||T.length>1)&&("."===P||".."===P)||""===P,C=0,A=T.length;A>=0;A--)P=T[A],"."===P?T.splice(A,1):".."===P?(T.splice(A,1),C++):C&&(T.splice(A,1),C--);if(!_&&!b)for(C--;C)T.unshift("..");!_||""===T[0]||T[0]&&"/"===T[0].charAt(0)||T.unshift(""),M&&"/"!==T.join("/").substr(-1)&&T.push("");var O=""===T[0]||T[0]&&"/"===T[0].charAt(0);if(S){n.hostname=n.host=O?"":T.length?T.shift:"";var E=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@");E&&(n.auth=E.shift,n.host=n.hostname=E.shift)}return _=_||n.host&&T.length,_&&!O&&T.unshift(""),T.length?n.pathname=T.join("/"):(n.pathname=null,n.path=null),l.isNull(n.pathname)&&l.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.auth=t.auth||n.auth,n.slashes=n.slashes||t.slashes,n.href=n.format,n},r.prototype.parseHost=function{var t=this.host,e=h.exec(t);e&&(e=e[0],":"!==e&&(this.port=e.substr(1)),t=t.substr(0,t.length-e.length)),t&&(this.hostname=t)}},{"./util":39,punycode:27,querystring:30}],39:[function(t,e,n){"use strict";e.exports={isString:function(t){return"string"==typeof t},isObject:function(t){return"object"==typeof t&&null!==t},isNull:function(t){return null===t},isNullOrUndefined:function(t){return null==t}}},{}],40:[function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}n.__esModule=!0;var o=t("../core"),a=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(o),s=t("ismobilejs"),u=r(s),l=t("./accessibleTarget"),c=r(l);a.utils.mixins.delayMixin(a.DisplayObject.prototype,c.default);var h=100,d=0,p=0,f=2,g=function{function t(e){i(this,t),!u.default.tablet&&!u.default.phone||navigator.isCocoonJS||this.createTouchHook;var n=document.createElement("div");n.style.width=h+"px",n.style.height=h+"px",n.style.position="absolute",n.style.top=d+"px",n.style.left=p+"px",n.style.zIndex=f,this.div=n,this.pool=[],this.renderId=0,this.debug=!1,this.renderer=e,this.children=[],this._onKeyDown=this._onKeyDown.bind(this),this._onMouseMove=this._onMouseMove.bind(this),this.isActive=!1,this.isMobileAccessabillity=!1,window.addEventListener("keydown",this._onKeyDown,!1)}return t.prototype.createTouchHook=function{var t=this,e=document.createElement("button");e.style.width="1px",e.style.height="1px",e.style.position="absolute",e.style.top="-1000px",e.style.left="-1000px",e.style.zIndex=2,e.style.backgroundColor="#FF0000",e.title="HOOK DIV",e.addEventListener("focus",function{t.isMobileAccessabillity=!0,t.activate,document.body.removeChild(e)}),document.body.appendChild(e)},t.prototype.activate=function{this.isActive||(this.isActive=!0,window.document.addEventListener("mousemove",this._onMouseMove,!0),window.removeEventListener("keydown",this._onKeyDown,!1),this.renderer.on("postrender",this.update,this),this.renderer.view.parentNode&&this.renderer.view.parentNode.appendChild(this.div))},t.prototype.deactivate=function{this.isActive&&!this.isMobileAccessabillity&&(this.isActive=!1,window.document.removeEventListener("mousemove",this._onMouseMove),window.addEventListener("keydown",this._onKeyDown,!1),this.renderer.off("postrender",this.update),this.div.parentNode&&this.div.parentNode.removeChild(this.div))},t.prototype.updateAccessibleObjects=function(t){if(t.visible){t.accessible&&t.interactive&&(t._accessibleActive||this.addChild(t),t.renderId=this.renderId);for(var e=t.children,n=e.length-1;n>=0;n--)this.updateAccessibleObjects(e[n])}},t.prototype.update=function{if(this.renderer.renderingToScreen){this.updateAccessibleObjects(this.renderer._lastObjectRendered);var t=this.renderer.view.getBoundingClientRect,e=t.width/this.renderer.width,n=t.height/this.renderer.height,r=this.div;r.style.left=t.left+"px",r.style.top=t.top+"px",r.style.width=this.renderer.width+"px",r.style.height=this.renderer.height+"px";for(var i=0;i<this.children.length;i++){var o=this.children[i];if(o.renderId!==this.renderId)o._accessibleActive=!1,a.utils.removeItems(this.children,i,1),this.div.removeChild(o._accessibleDiv),this.pool.push(o._accessibleDiv),o._accessibleDiv=null,i--,0===this.children.length&&this.deactivate;else{r=o._accessibleDiv;var s=o.hitArea,u=o.worldTransform;o.hitArea?(r.style.left=(u.tx+s.x*u.a)*e+"px",r.style.top=(u.ty+s.y*u.d)*n+"px",r.style.width=s.width*u.a*e+"px",r.style.height=s.height*u.d*n+"px"):(s=o.getBounds,this.capHitArea(s),r.style.left=s.x*e+"px",r.style.top=s.y*n+"px",r.style.width=s.width*e+"px",r.style.height=s.height*n+"px")}}this.renderId++}},t.prototype.capHitArea=function(t){t.x<0&&(t.width+=t.x,t.x=0),t.y<0&&(t.height+=t.y,t.y=0),t.x+t.width>this.renderer.width&&(t.width=this.renderer.width-t.x),t.y+t.height>this.renderer.height&&(t.height=this.renderer.height-t.y)},t.prototype.addChild=function(t){var e=this.pool.pop;e||(e=document.createElement("button"),e.style.width=h+"px",e.style.height=h+"px",e.style.backgroundColor=this.debug?"rgba(255,0,0,0.5)":"transparent",e.style.position="absolute",e.style.zIndex=f,e.style.borderStyle="none",e.addEventListener("click",this._onClick.bind(this)),e.addEventListener("focus",this._onFocus.bind(this)),e.addEventListener("focusout",this._onFocusOut.bind(this))),t.accessibleTitle?e.title=t.accessibleTitle:t.accessibleTitle||t.accessibleHint||(e.title="displayObject "+this.tabIndex),t.accessibleHint&&e.setAttribute("aria-label",t.accessibleHint),t._accessibleActive=!0,t._accessibleDiv=e,e.displayObject=t,this.children.push(t),this.div.appendChild(t._accessibleDiv),t._accessibleDiv.tabIndex=t.tabIndex},t.prototype._onClick=function(t){var e=this.renderer.plugins.interaction;e.dispatchEvent(t.target.displayObject,"click",e.eventData)},t.prototype._onFocus=function(t){var e=this.renderer.plugins.interaction;e.dispatchEvent(t.target.displayObject,"mouseover",e.eventData)},t.prototype._onFocusOut=function(t){var e=this.renderer.plugins.interaction;e.dispatchEvent(t.target.displayObject,"mouseout",e.eventData)},t.prototype._onKeyDown=function(t){9===t.keyCode&&this.activate},t.prototype._onMouseMove=function{this.deactivate},t.prototype.destroy=function{this.div=null;for(var t=0;t<this.children.length;t++)this.children[t].div=null;window.document.removeEventListener("mousemove",this._onMouseMove),window.removeEventListener("keydown",this._onKeyDown),this.pool=null,this.children=null,this.renderer=null},t};n.default=g,a.WebGLRenderer.registerPlugin("accessibility",g),a.CanvasRenderer.registerPlugin("accessibility",g)},{"../core":65,"./accessibleTarget":41,ismobilejs:4}],41:[function(t,e,n){"use strict";n.__esModule=!0,n.default={accessible:!1,accessibleTitle:null,accessibleHint:null,tabIndex:0,_accessibleActive:!1,_accessibleDiv:!1}},{}],42:[function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}n.__esModule=!0;var i=t("./accessibleTarget");Object.defineProperty(n,"accessibleTarget",{enumerable:!0,get:function{return r(i).default}});var o=t("./AccessibilityManager");Object.defineProperty(n,"AccessibilityManager",{enumerable:!0,get:function{return r(o).default}})},{"./AccessibilityManager":40,"./accessibleTarget":41}],43:[function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}n.__esModule=!0;var o=function{function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}},a=t("./autoDetectRenderer"),s=t("./display/Container"),u=r(s),l=t("./ticker"),c=t("./settings"),h=r(c),d=t("./const"),p=function{function t(e,n,r,o,s){i(this,t),"number"==typeof e&&(e=Object.assign({width:e,height:n||h.default.RENDER_OPTIONS.height,forceCanvas:!!o,sharedTicker:!!s},r)),this._options=e=Object.assign({sharedTicker:!1,forceCanvas:!1,sharedLoader:!1},e),this.renderer=(0,a.autoDetectRenderer)(e),this.stage=new u.default,this._ticker=null,this.ticker=e.sharedTicker?l.shared:new l.Ticker,this.start}return t.prototype.render=function{this.renderer.render(this.stage)},t.prototype.stop=function{this._ticker.stop},t.prototype.start=function{this._ticker.start},t.prototype.destroy=function(t){var e=this._ticker;this.ticker=null,e.destroy,this.stage.destroy,this.stage=null,this.renderer.destroy(t),this.renderer=null,this._options=null},o(t,[{key:"ticker",set:function(t){this._ticker&&this._ticker.remove(this.render,this),this._ticker=t,t&&t.add(this.render,this,d.UPDATE_PRIORITY.LOW)},get:function{return this._ticker}},{key:"view",get:function{return this.renderer.view}},{key:"screen",get:function{return this.renderer.screen}}]),t};n.default=p},{"./autoDetectRenderer":45,"./const":46,"./display/Container":48,"./settings":101,"./ticker":120}],44:[function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function a(t,e){if(t instanceof Array){if("precision"!==t[0].substring(0,9)){var n=t.slice(0);return n.unshift("precision "+e+" float;"),n}}else if("precision"!==t.substring(0,9))return"precision "+e+" float;\n"+t;return t}n.__esModule=!0;var s=t("pixi-gl-core"),u=t("./settings"),l=function(t){return t&&t.__esModule?t:{default:t}}(u),c=function(t){function e(n,o,s){return r(this,e),i(this,t.call(this,n,a(o,l.default.PRECISION_VERTEX),a(s,l.default.PRECISION_FRAGMENT)))}return o(e,t),e}(s.GLShader);n.default=c},{"./settings":101,"pixi-gl-core":15}],45:[function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e,n,r){var i=t&&t.forceCanvas;return void 0!==r&&(i=r),!i&&a.isWebGLSupported?new c.default(t,e,n):new u.default(t,e,n)}n.__esModule=!0,n.autoDetectRenderer=i;var o=t("./utils"),a=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(o),s=t("./renderers/canvas/CanvasRenderer"),u=r(s),l=t("./renderers/webgl/WebGLRenderer"),c=r(l)},{"./renderers/canvas/CanvasRenderer":77,"./renderers/webgl/WebGLRenderer":84,"./utils":124}],46:[function(t,e,n){"use strict";n.__esModule=!0;n.VERSION="4.5.2",n.PI_2=2*Math.PI,n.RAD_TO_DEG=180/Math.PI,n.DEG_TO_RAD=Math.PI/180,n.RENDERER_TYPE={UNKNOWN:0,WEBGL:1,CANVAS:2},n.BLEND_MODES={NORMAL:0,ADD:1,MULTIPLY:2,SCREEN:3,OVERLAY:4,DARKEN:5,LIGHTEN:6,COLOR_DODGE:7,COLOR_BURN:8,HARD_LIGHT:9,SOFT_LIGHT:10,DIFFERENCE:11,EXCLUSION:12,HUE:13,SATURATION:14,COLOR:15,LUMINOSITY:16,NORMAL_NPM:17,ADD_NPM:18,SCREEN_NPM:19},n.DRAW_MODES={POINTS:0,LINES:1,LINE_LOOP:2,LINE_STRIP:3,TRIANGLES:4,TRIANGLE_STRIP:5,TRIANGLE_FAN:6},n.SCALE_MODES={LINEAR:0,NEAREST:1},n.WRAP_MODES={CLAMP:0,REPEAT:1,MIRRORED_REPEAT:2},n.GC_MODES={AUTO:0,MANUAL:1},n.URL_FILE_EXTENSION=/\.(\w{3,4})(?:$|\?|#)/i,n.DATA_URI=/^\s*data:(?:([\w-]+)\/([\w+.-]+))?(?:;(charset=[\w-]+|base64))?,(.*)/i,n.SVG_SIZE=/<svg[^>]*(?:\s(width|height)=('|")(\d*(?:\.\d+)?)(?:px)?('|"))[^>]*(?:\s(width|height)=('|")(\d*(?:\.\d+)?)(?:px)?('|"))[^>]*>/i,n.SHAPES={POLY:0,RECT:1,CIRC:2,ELIP:3,RREC:4},n.PRECISION={LOW:"lowp",MEDIUM:"mediump",HIGH:"highp"},n.TRANSFORM_MODE={STATIC:0,DYNAMIC:1},n.TEXT_GRADIENT={LINEAR_VERTICAL:0,LINEAR_HORIZONTAL:1},n.UPDATE_PRIORITY={INTERACTION:50,HIGH:25,NORMAL:0,LOW:-25,UTILITY:-50}},{}],47:[function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}n.__esModule=!0;var i=t("../math"),o=function{function t{r(this,t),this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0,this.rect=null}return t.prototype.isEmpty=function{return this.minX>this.maxX||this.minY>this.maxY},t.prototype.clear=function{this.updateID++,this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0},t.prototype.getRectangle=function(t){return this.minX>this.maxX||this.minY>this.maxY?i.Rectangle.EMPTY:(t=t||new i.Rectangle(0,0,1,1),t.x=this.minX,t.y=this.minY,t.width=this.maxX-this.minX,t.height=this.maxY-this.minY,t)},t.prototype.addPoint=function(t){this.minX=Math.min(this.minX,t.x),this.maxX=Math.max(this.maxX,t.x),this.minY=Math.min(this.minY,t.y),this.maxY=Math.max(this.maxY,t.y)},t.prototype.addQuad=function(t){var e=this.minX,n=this.minY,r=this.maxX,i=this.maxY,o=t[0],a=t[1];e=o<e?o:e,n=a<n?a:n,r=o>r?o:r,i=a>i?a:i,o=t[2],a=t[3],e=o<e?o:e,n=a<n?a:n,r=o>r?o:r,i=a>i?a:i,o=t[4],a=t[5],e=o<e?o:e,n=a<n?a:n,r=o>r?o:r,i=a>i?a:i,o=t[6],a=t[7],e=o<e?o:e,n=a<n?a:n,r=o>r?o:r,i=a>i?a:i,this.minX=e,this.minY=n,this.maxX=r,this.maxY=i},t.prototype.addFrame=function(t,e,n,r,i){var o=t.worldTransform,a=o.a,s=o.b,u=o.c,l=o.d,c=o.tx,h=o.ty,d=this.minX,p=this.minY,f=this.maxX,g=this.maxY,m=a*e+u*n+c,v=s*e+l*n+h;d=m<d?m:d,p=v<p?v:p,f=m>f?m:f,g=v>g?v:g,m=a*r+u*n+c,v=s*r+l*n+h,d=m<d?m:d,p=v<p?v:p,f=m>f?m:f,g=v>g?v:g,m=a*e+u*i+c,v=s*e+l*i+h,d=m<d?m:d,p=v<p?v:p,f=m>f?m:f,g=v>g?v:g,m=a*r+u*i+c,v=s*r+l*i+h,d=m<d?m:d,p=v<p?v:p,f=m>f?m:f,g=v>g?v:g,this.minX=d,this.minY=p,this.maxX=f,this.maxY=g},t.prototype.addVertices=function(t,e,n,r){for(var i=t.worldTransform,o=i.a,a=i.b,s=i.c,u=i.d,l=i.tx,c=i.ty,h=this.minX,d=this.minY,p=this.maxX,f=this.maxY,g=n;g<r;g+=2){var m=e[g],v=e[g+1],y=o*m+s*v+l,_=u*v+a*m+c;h=y<h?y:h,d=_<d?_:d,p=y>p?y:p,f=_>f?_:f}this.minX=h,this.minY=d,this.maxX=p,this.maxY=f},t.prototype.addBounds=function(t){var e=this.minX,n=this.minY,r=this.maxX,i=this.maxY;this.minX=t.minX<e?t.minX:e,this.minY=t.minY<n?t.minY:n,this.maxX=t.maxX>r?t.maxX:r,this.maxY=t.maxY>i?t.maxY:i},t.prototype.addBoundsMask=function(t,e){var n=t.minX>e.minX?t.minX:e.minX,r=t.minY>e.minY?t.minY:e.minY,i=t.maxX<e.maxX?t.maxX:e.maxX,o=t.maxY<e.maxY?t.maxY:e.maxY;if(n<=i&&r<=o){var a=this.minX,s=this.minY,u=this.maxX,l=this.maxY;this.minX=n<a?n:a,this.minY=r<s?r:s,this.maxX=i>u?i:u,this.maxY=o>l?o:l}},t.prototype.addBoundsArea=function(t,e){var n=t.minX>e.x?t.minX:e.x,r=t.minY>e.y?t.minY:e.y,i=t.maxX<e.x+e.width?t.maxX:e.x+e.width,o=t.maxY<e.y+e.height?t.maxY:e.y+e.height;if(n<=i&&r<=o){var a=this.minX,s=this.minY,u=this.maxX,l=this.maxY;this.minX=n<a?n:a,this.minY=r<s?r:s,this.maxX=i>u?i:u,this.maxY=o>l?o:l}},t};n.default=o},{"../math":70}],48:[function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}n.__esModule=!0;var a=function{function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}},s=t("../utils"),u=t("./DisplayObject"),l=function(t){return t&&t.__esModule?t:{default:t}}(u),c=function(t){function e{r(this,e);var n=i(this,t.call(this));return n.children=[],n}return o(e,t),e.prototype.onChildrenChange=function{},e.prototype.addChild=function(t){var e=arguments.length;if(e>1)for(var n=0;n<e;n++)this.addChild(arguments[n]);else t.parent&&t.parent.removeChild(t),t.parent=this,t.transform._parentID=-1,this.children.push(t),this._boundsID++,this.onChildrenChange(this.children.length-1),t.emit("added",this);return t},e.prototype.addChildAt=function(t,e){if(e<0||e>this.children.length)throw new Error(t+"addChildAt: The index "+e+" supplied is out of bounds "+this.children.length);return t.parent&&t.parent.removeChild(t),t.parent=this,t.transform._parentID=-1,this.children.splice(e,0,t),this._boundsID++,this.onChildrenChange(e),t.emit("added",this),t},e.prototype.swapChildren=function(t,e){if(t!==e){var n=this.getChildIndex(t),r=this.getChildIndex(e);this.children[n]=e,this.children[r]=t,this.onChildrenChange(n<r?n:r)}},e.prototype.getChildIndex=function(t){var e=this.children.indexOf(t);if(-1===e)throw new Error("The supplied DisplayObject must be a child of the caller");return e},e.prototype.setChildIndex=function(t,e){if(e<0||e>=this.children.length)throw new Error("The supplied index is out of bounds");var n=this.getChildIndex(t);(0,s.removeItems)(this.children,n,1),this.children.splice(e,0,t),this.onChildrenChange(e)},e.prototype.getChildAt=function(t){if(t<0||t>=this.children.length)throw new Error("getChildAt: Index ("+t+") does not exist.");return this.children[t]},e.prototype.removeChild=function(t){var e=arguments.length;if(e>1)for(var n=0;n<e;n++)this.removeChild(arguments[n]);else{var r=this.children.indexOf(t);if(-1===r)return null;t.parent=null,t.transform._parentID=-1,(0,s.removeItems)(this.children,r,1),this._boundsID++,this.onChildrenChange(r),t.emit("removed",this)}return t},e.prototype.removeChildAt=function(t){var e=this.getChildAt(t);return e.parent=null,e.transform._parentID=-1,(0,s.removeItems)(this.children,t,1),this._boundsID++,this.onChildrenChange(t),e.emit("removed",this),e},e.prototype.removeChildren=function{var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments[1],n=t,r="number"==typeof e?e:this.children.length,i=r-n,o=void 0;if(i>0&&i<=r){o=this.children.splice(n,i);for(var a=0;a<o.length;++a)o[a].parent=null,o[a].transform&&(o[a].transform._parentID=-1);this._boundsID++,this.onChildrenChange(t);for(var s=0;s<o.length;++s)o[s].emit("removed",this);return o}if(0===i&&0===this.children.length)return[];throw new RangeError("removeChildren: numeric values are outside the acceptable range.")},e.prototype.updateTransform=function{this._boundsID++,this.transform.updateTransform(this.parent.transform),this.worldAlpha=this.alpha*this.parent.worldAlpha;for(var t=0,e=this.children.length;t<e;++t){var n=this.children[t];n.visible&&n.updateTransform}},e.prototype.calculateBounds=function{this._bounds.clear,this._calculateBounds;for(var t=0;t<this.children.length;t++){var e=this.children[t];e.visible&&e.renderable&&(e.calculateBounds,e._mask?(e._mask.calculateBounds,this._bounds.addBoundsMask(e._bounds,e._mask._bounds)):e.filterArea?this._bounds.addBoundsArea(e._bounds,e.filterArea):this._bounds.addBounds(e._bounds))}this._lastBoundsID=this._boundsID},e.prototype._calculateBounds=function{},e.prototype.renderWebGL=function(t){if(this.visible&&!(this.worldAlpha<=0)&&this.renderable)if(this._mask||this._filters)this.renderAdvancedWebGL(t);else{this._renderWebGL(t);for(var e=0,n=this.children.length;e<n;++e)this.children[e].renderWebGL(t)}},e.prototype.renderAdvancedWebGL=function(t){t.flush;var e=this._filters,n=this._mask;if(e){this._enabledFilters||(this._enabledFilters=[]),this._enabledFilters.length=0;for(var r=0;r<e.length;r++)e[r].enabled&&this._enabledFilters.push(e[r]);this._enabledFilters.length&&t.filterManager.pushFilter(this,this._enabledFilters)}n&&t.maskManager.pushMask(this,this._mask),this._renderWebGL(t);for(var i=0,o=this.children.length;i<o;i++)this.children[i].renderWebGL(t);t.flush,n&&t.maskManager.popMask(this,this._mask),e&&this._enabledFilters&&this._enabledFilters.length&&t.filterManager.popFilter},e.prototype._renderWebGL=function(t){},e.prototype._renderCanvas=function(t){},e.prototype.renderCanvas=function(t){if(this.visible&&!(this.worldAlpha<=0)&&this.renderable){this._mask&&t.maskManager.pushMask(this._mask),this._renderCanvas(t);for(var e=0,n=this.children.length;e<n;++e)this.children[e].renderCanvas(t);this._mask&&t.maskManager.popMask(t)}},e.prototype.destroy=function(e){t.prototype.destroy.call(this);var n="boolean"==typeof e?e:e&&e.children,r=this.removeChildren(0,this.children.length);if(n)for(var i=0;i<r.length;++i)r[i].destroy(e)},a(e,[{key:"width",get:function{return this.scale.x*this.getLocalBounds.width},set:function(t){var e=this.getLocalBounds.width;this.scale.x=0!==e?t/e:1,this._width=t}},{key:"height",get:function{return this.scale.y*this.getLocalBounds.height},set:function(t){var e=this.getLocalBounds.height;this.scale.y=0!==e?t/e:1,this._height=t}}]),e}(l.default);n.default=c,c.prototype.containerUpdateTransform=c.prototype.updateTransform},{"../utils":124,"./DisplayObject":49}],49:[function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}n.__esModule=!0;var s=function{function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}},u=t("eventemitter3"),l=r(u),c=t("../const"),h=t("../settings"),d=r(h),p=t("./TransformStatic"),f=r(p),g=t("./Transform"),m=r(g),v=t("./Bounds"),y=r(v),_=t("../math"),b=function(t){function e{i(this,e);var n=o(this,t.call(this)),r=d.default.TRANSFORM_MODE===c.TRANSFORM_MODE.STATIC?f.default:m.default;return n.tempDisplayObjectParent=null,n.transform=new r,n.alpha=1,n.visible=!0,n.renderable=!0,n.parent=null,n.worldAlpha=1,n.filterArea=null,n._filters=null,n._enabledFilters=null,n._bounds=new y.default,n._boundsID=0,n._lastBoundsID=-1,n._boundsRect=null,n._localBoundsRect=null,n._mask=null,n._destroyed=!1,n}return a(e,t),e.prototype.updateTransform=function{this.transform.updateTransform(this.parent.transform),this.worldAlpha=this.alpha*this.parent.worldAlpha,this._bounds.updateID++},e.prototype._recursivePostUpdateTransform=function{this.parent?(this.parent._recursivePostUpdateTransform,this.transform.updateTransform(this.parent.transform)):this.transform.updateTransform(this._tempDisplayObjectParent.transform)},e.prototype.getBounds=function(t,e){return t||(this.parent?(this._recursivePostUpdateTransform,this.updateTransform):(this.parent=this._tempDisplayObjectParent,this.updateTransform,this.parent=null)),this._boundsID!==this._lastBoundsID&&this.calculateBounds,e||(this._boundsRect||(this._boundsRect=new _.Rectangle),e=this._boundsRect),this._bounds.getRectangle(e)},e.prototype.getLocalBounds=function(t){var e=this.transform,n=this.parent;this.parent=null,this.transform=this._tempDisplayObjectParent.transform,t||(this._localBoundsRect||(this._localBoundsRect=new _.Rectangle),t=this._localBoundsRect);var r=this.getBounds(!1,t);return this.parent=n,this.transform=e,r},e.prototype.toGlobal=function(t,e){return arguments.length>2&&void 0!==arguments[2]&&arguments[2]||(this._recursivePostUpdateTransform,this.parent?this.displayObjectUpdateTransform:(this.parent=this._tempDisplayObjectParent,this.displayObjectUpdateTransform,this.parent=null)),this.worldTransform.apply(t,e)},e.prototype.toLocal=function(t,e,n,r){return e&&(t=e.toGlobal(t,n,r)),r||(this._recursivePostUpdateTransform,this.parent?this.displayObjectUpdateTransform:(this.parent=this._tempDisplayObjectParent,this.displayObjectUpdateTransform,this.parent=null)),this.worldTransform.applyInverse(t,n)},e.prototype.renderWebGL=function(t){},e.prototype.renderCanvas=function(t){},e.prototype.setParent=function(t){if(!t||!t.addChild)throw new Error("setParent: Argument must be a Container");return t.addChild(this),t},e.prototype.setTransform=function{var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0,a=arguments.length>6&&void 0!==arguments[6]?arguments[6]:0,s=arguments.length>7&&void 0!==arguments[7]?arguments[7]:0,u=arguments.length>8&&void 0!==arguments[8]?arguments[8]:0;return this.position.x=t,this.position.y=e,this.scale.x=n||1,this.scale.y=r||1,this.rotation=i,this.skew.x=o,this.skew.y=a,this.pivot.x=s,this.pivot.y=u,this},e.prototype.destroy=function{this.removeAllListeners,this.parent&&this.parent.removeChild(this),this.transform=null,this.parent=null,this._bounds=null,this._currentBounds=null,this._mask=null,this.filterArea=null,this.interactive=!1,this.interactiveChildren=!1,this._destroyed=!0},s(e,[{key:"_tempDisplayObjectParent",get:function{return null===this.tempDisplayObjectParent&&(this.tempDisplayObjectParent=new e),this.tempDisplayObjectParent}},{key:"x",get:function{return this.position.x},set:function(t){this.transform.position.x=t}},{key:"y",get:function{return this.position.y},set:function(t){this.transform.position.y=t}},{key:"worldTransform",get:function{return this.transform.worldTransform}},{key:"localTransform",get:function{return this.transform.localTransform}},{key:"position",get:function{return this.transform.position},set:function(t){this.transform.position.copy(t)}},{key:"scale",get:function{return this.transform.scale},set:function(t){this.transform.scale.copy(t)}},{key:"pivot",get:function{return this.transform.pivot},set:function(t){this.transform.pivot.copy(t)}},{key:"skew",get:function{return this.transform.skew},set:function(t){this.transform.skew.copy(t)}},{key:"rotation",get:function{return this.transform.rotation},set:function(t){this.transform.rotation=t}},{key:"worldVisible",get:function{var t=this;do{if(!t.visible)return!1;t=t.parent}while(t);return!0}},{key:"mask",get:function{return this._mask},set:function(t){this._mask&&(this._mask.renderable=!0),this._mask=t,this._mask&&(this._mask.renderable=!1)}},{key:"filters",get:function{return this._filters&&this._filters.slice},set:function(t){this._filters=t&&t.slice}}]),e}(l.default);n.default=b,b.prototype.displayObjectUpdateTransform=b.prototype.updateTransform},{"../const":46,"../math":70,"../settings":101,"./Bounds":47,"./Transform":50,"./TransformStatic":52,eventemitter3:3}],50:[function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}n.__esModule=!0;var a=function{function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}},s=t("../math"),u=t("./TransformBase"),l=function(t){return t&&t.__esModule?t:{default:t}}(u),c=function(t){function e{r(this,e);var n=i(this,t.call(this));return n.position=new s.Point(0,0),n.scale=new s.Point(1,1),n.skew=new s.ObservablePoint(n.updateSkew,n,0,0),n.pivot=new s.Point(0,0),n._rotation=0,n._cx=1,n._sx=0,n._cy=0,n._sy=1,n}return o(e,t),e.prototype.updateSkew=function{this._cx=Math.cos(this._rotation+this.skew._y),this._sx=Math.sin(this._rotation+this.skew._y),this._cy=-Math.sin(this._rotation-this.skew._x),this._sy=Math.cos(this._rotation-this.skew._x)},e.prototype.updateLocalTransform=function{var t=this.localTransform;t.a=this._cx*this.scale.x,t.b=this._sx*this.scale.x,t.c=this._cy*this.scale.y,t.d=this._sy*this.scale.y,t.tx=this.position.x-(this.pivot.x*t.a+this.pivot.y*t.c),t.ty=this.position.y-(this.pivot.x*t.b+this.pivot.y*t.d)},e.prototype.updateTransform=function(t){var e=this.localTransform;e.a=this._cx*this.scale.x,e.b=this._sx*this.scale.x,e.c=this._cy*this.scale.y,e.d=this._sy*this.scale.y,e.tx=this.position.x-(this.pivot.x*e.a+this.pivot.y*e.c),e.ty=this.position.y-(this.pivot.x*e.b+this.pivot.y*e.d);var n=t.worldTransform,r=this.worldTransform;r.a=e.a*n.a+e.b*n.c,r.b=e.a*n.b+e.b*n.d,r.c=e.c*n.a+e.d*n.c,r.d=e.c*n.b+e.d*n.d,r.tx=e.tx*n.a+e.ty*n.c+n.tx,r.ty=e.tx*n.b+e.ty*n.d+n.ty,this._worldID++},e.prototype.setFromMatrix=function(t){t.decompose(this)},a(e,[{key:"rotation",get:function{return this._rotation},set:function(t){this._rotation=t,this.updateSkew}}]),e}(l.default);n.default=c},{"../math":70,"./TransformBase":51}],51:[function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}n.__esModule=!0;var i=t("../math"),o=function{function t{r(this,t),this.worldTransform=new i.Matrix,this.localTransform=new i.Matrix,this._worldID=0,this._parentID=0}return t.prototype.updateLocalTransform=function{},t.prototype.updateTransform=function(t){var e=t.worldTransform,n=this.worldTransform,r=this.localTransform;n.a=r.a*e.a+r.b*e.c,n.b=r.a*e.b+r.b*e.d,n.c=r.c*e.a+r.d*e.c,n.d=r.c*e.b+r.d*e.d,n.tx=r.tx*e.a+r.ty*e.c+e.tx,n.ty=r.tx*e.b+r.ty*e.d+e.ty,this._worldID++},t};n.default=o,o.prototype.updateWorldTransform=o.prototype.updateTransform,o.IDENTITY=new o},{"../math":70}],52:[function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}n.__esModule=!0;var a=function{function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}},s=t("../math"),u=t("./TransformBase"),l=function(t){return t&&t.__esModule?t:{default:t}}(u),c=function(t){function e{r(this,e);var n=i(this,t.call(this));return n.position=new s.ObservablePoint(n.onChange,n,0,0),n.scale=new s.ObservablePoint(n.onChange,n,1,1),n.pivot=new s.ObservablePoint(n.onChange,n,0,0),n.skew=new s.ObservablePoint(n.updateSkew,n,0,0),n._rotation=0,n._cx=1,n._sx=0,n._cy=0,n._sy=1,n._localID=0,n._currentLocalID=0,n}return o(e,t),e.prototype.onChange=function{this._localID++},e.prototype.updateSkew=function{this._cx=Math.cos(this._rotation+this.skew._y),this._sx=Math.sin(this._rotation+this.skew._y),this._cy=-Math.sin(this._rotation-this.skew._x),this._sy=Math.cos(this._rotation-this.skew._x),this._localID++},e.prototype.updateLocalTransform=function{var t=this.localTransform;this._localID!==this._currentLocalID&&(t.a=this._cx*this.scale._x,t.b=this._sx*this.scale._x,t.c=this._cy*this.scale._y,t.d=this._sy*this.scale._y,t.tx=this.position._x-(this.pivot._x*t.a+this.pivot._y*t.c),t.ty=this.position._y-(this.pivot._x*t.b+this.pivot._y*t.d),this._currentLocalID=this._localID,this._parentID=-1)},e.prototype.updateTransform=function(t){var e=this.localTransform;if(this._localID!==this._currentLocalID&&(e.a=this._cx*this.scale._x,e.b=this._sx*this.scale._x,e.c=this._cy*this.scale._y,e.d=this._sy*this.scale._y,e.tx=this.position._x-(this.pivot._x*e.a+this.pivot._y*e.c),e.ty=this.position._y-(this.pivot._x*e.b+this.pivot._y*e.d),this._currentLocalID=this._localID,this._parentID=-1),this._parentID!==t._worldID){var n=t.worldTransform,r=this.worldTransform;r.a=e.a*n.a+e.b*n.c,r.b=e.a*n.b+e.b*n.d,r.c=e.c*n.a+e.d*n.c,r.d=e.c*n.b+e.d*n.d,r.tx=e.tx*n.a+e.ty*n.c+n.tx,r.ty=e.tx*n.b+e.ty*n.d+n.ty,this._parentID=t._worldID,this._worldID++}},e.prototype.setFromMatrix=function(t){t.decompose(this),this._localID++},a(e,[{key:"rotation",get:function{return this._rotation},set:function(t){this._rotation=t,this.updateSkew}}]),e}(l.default);n.default=c},{"../math":70,"./TransformBase":51}],53:[function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}n.__esModule=!0;var s=t("../display/Container"),u=r(s),l=t("../textures/RenderTexture"),c=r(l),h=t("../textures/Texture"),d=r(h),p=t("./GraphicsData"),f=r(p),g=t("../sprites/Sprite"),m=r(g),v=t("../math"),y=t("../utils"),_=t("../const"),b=t("../display/Bounds"),x=r(b),w=t("./utils/bezierCurveTo"),T=r(w),S=t("../renderers/canvas/CanvasRenderer"),E=r(S),P=void 0,M=new v.Matrix,C=new v.Point,A=new Float32Array(4),O=new Float32Array(4),I=function(t){function e{var n=arguments.length>0&&void 0!==arguments[0]&&arguments[0];i(this,e);var r=o(this,t.call(this));return r.fillAlpha=1,r.lineWidth=0,r.nativeLines=n,r.lineColor=0,r.graphicsData=[],r.tint=16777215,r._prevTint=16777215,r.blendMode=_.BLEND_MODES.NORMAL,r.currentPath=null,r._webGL={},r.isMask=!1,r.boundsPadding=0,r._localBounds=new x.default,r.dirty=0,r.fastRectDirty=-1,r.clearDirty=0,r.boundsDirty=-1,r.cachedSpriteDirty=!1,r._spriteRect=null,r._fastRect=!1,r}return a(e,t),e.prototype.clone=function{var t=new e;t.renderable=this.renderable,t.fillAlpha=this.fillAlpha,t.lineWidth=this.lineWidth,t.lineColor=this.lineColor,t.tint=this.tint,t.blendMode=this.blendMode,t.isMask=this.isMask,t.boundsPadding=this.boundsPadding,t.dirty=0,t.cachedSpriteDirty=this.cachedSpriteDirty;for(var n=0;n<this.graphicsData.length;++n)t.graphicsData.push(this.graphicsData[n].clone);return t.currentPath=t.graphicsData[t.graphicsData.length-1],t.updateLocalBounds,t},e.prototype.lineStyle=function{var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;if(this.lineWidth=t,this.lineColor=e,this.lineAlpha=n,this.currentPath)if(this.currentPath.shape.points.length){var r=new v.Polygon(this.currentPath.shape.points.slice(-2));r.closed=!1,this.drawShape(r)}else this.currentPath.lineWidth=this.lineWidth,this.currentPath.lineColor=this.lineColor,this.currentPath.lineAlpha=this.lineAlpha;return this},e.prototype.moveTo=function(t,e){var n=new v.Polygon([t,e]);return n.closed=!1,this.drawShape(n),this},e.prototype.lineTo=function(t,e){return this.currentPath.shape.points.push(t,e),this.dirty++,this},e.prototype.quadraticCurveTo=function(t,e,n,r){this.currentPath?0===this.currentPath.shape.points.length&&(this.currentPath.shape.points=[0,0]):this.moveTo(0,0);var i=this.currentPath.shape.points,o=0,a=0;0===i.length&&this.moveTo(0,0);for(var s=i[i.length-2],u=i[i.length-1],l=1;l<=20;++l){var c=l/20;o=s+(t-s)*c,a=u+(e-u)*c,i.push(o+(t+(n-t)*c-o)*c,a+(e+(r-e)*c-a)*c)}return this.dirty++,this},e.prototype.bezierCurveTo=function(t,e,n,r,i,o){this.currentPath?0===this.currentPath.shape.points.length&&(this.currentPath.shape.points=[0,0]):this.moveTo(0,0);var a=this.currentPath.shape.points,s=a[a.length-2],u=a[a.length-1];return a.length-=2,(0,T.default)(s,u,t,e,n,r,i,o,a),this.dirty++,this},e.prototype.arcTo=function(t,e,n,r,i){this.currentPath?0===this.currentPath.shape.points.length&&this.currentPath.shape.points.push(t,e):this.moveTo(t,e);var o=this.currentPath.shape.points,a=o[o.length-2],s=o[o.length-1],u=s-e,l=a-t,c=r-e,h=n-t,d=Math.abs(u*h-l*c);if(d<1e-8||0===i)o[o.length-2]===t&&o[o.length-1]===e||o.push(t,e);else{var p=u*u+l*l,f=c*c+h*h,g=u*c+l*h,m=i*Math.sqrt(p)/d,v=i*Math.sqrt(f)/d,y=m*g/p,_=v*g/f,b=m*h+v*l,x=m*c+v*u,w=l*(v+y),T=u*(v+y),S=h*(m+_),E=c*(m+_),P=Math.atan2(T-x,w-b),M=Math.atan2(E-x,S-b);this.arc(b+t,x+e,i,P,M,l*c>h*u)}return this.dirty++,this},e.prototype.arc=function(t,e,n,r,i){var o=arguments.length>5&&void 0!==arguments[5]&&arguments[5];if(r===i)return this;!o&&i<=r?i+=2*Math.PI:o&&r<=i&&(r+=2*Math.PI);var a=i-r,s=40*Math.ceil(Math.abs(a)/(2*Math.PI));if(0===a)return this;var u=t+Math.cos(r)*n,l=e+Math.sin(r)*n,c=this.currentPath?this.currentPath.shape.points:null;c?c[c.length-2]===u&&c[c.length-1]===l||c.push(u,l):(this.moveTo(u,l),c=this.currentPath.shape.points);for(var h=a/(2*s),d=2*h,p=Math.cos(h),f=Math.sin(h),g=s-1,m=g%1/g,v=0;v<=g;++v){var y=v+m*v,_=h+r+d*y,b=Math.cos(_),x=-Math.sin(_);c.push((p*b+f*x)*n+t,(p*-x+f*b)*n+e)}return this.dirty++,this},e.prototype.beginFill=function{var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return this.filling=!0,this.fillColor=t,this.fillAlpha=e,this.currentPath&&this.currentPath.shape.points.length<=2&&(this.currentPath.fill=this.filling,this.currentPath.fillColor=this.fillColor,this.currentPath.fillAlpha=this.fillAlpha),this},e.prototype.endFill=function{return this.filling=!1,this.fillColor=null,this.fillAlpha=1,this},e.prototype.drawRect=function(t,e,n,r){return this.drawShape(new v.Rectangle(t,e,n,r)),this},e.prototype.drawRoundedRect=function(t,e,n,r,i){return this.drawShape(new v.RoundedRectangle(t,e,n,r,i)),this},e.prototype.drawCircle=function(t,e,n){return this.drawShape(new v.Circle(t,e,n)),this},e.prototype.drawEllipse=function(t,e,n,r){return this.drawShape(new v.Ellipse(t,e,n,r)),this},e.prototype.drawPolygon=function(t){var e=t,n=!0;if(e instanceof v.Polygon&&(n=e.closed,e=e.points),!Array.isArray(e)){e=new Array(arguments.length);for(var r=0;r<e.length;++r)e[r]=arguments[r]}var i=new v.Polygon(e);return i.closed=n,this.drawShape(i),this},e.prototype.clear=function{return(this.lineWidth||this.filling||this.graphicsData.length>0)&&(this.lineWidth=0,this.filling=!1,this.boundsDirty=-1,this.dirty++,this.clearDirty++,this.graphicsData.length=0),this.currentPath=null,this._spriteRect=null,this},e.prototype.isFastRect=function{return 1===this.graphicsData.length&&this.graphicsData[0].shape.type===_.SHAPES.RECT&&!this.graphicsData[0].lineWidth},e.prototype._renderWebGL=function(t){this.dirty!==this.fastRectDirty&&(this.fastRectDirty=this.dirty,this._fastRect=this.isFastRect),this._fastRect?this._renderSpriteRect(t):(t.setObjectRenderer(t.plugins.graphics),t.plugins.graphics.render(this))},e.prototype._renderSpriteRect=function(t){var e=this.graphicsData[0].shape;this._spriteRect||(this._spriteRect=new m.default(new d.default(d.default.WHITE)));var n=this._spriteRect;if(16777215===this.tint)n.tint=this.graphicsData[0].fillColor;else{var r=A,i=O;(0,y.hex2rgb)(this.graphicsData[0].fillColor,r),(0,y.hex2rgb)(this.tint,i),r[0]*=i[0],r[1]*=i[1],r[2]*=i[2],n.tint=(0,y.rgb2hex)(r)}n.alpha=this.graphicsData[0].fillAlpha,n.worldAlpha=this.worldAlpha*n.alpha,n.blendMode=this.blendMode,n._texture._frame.width=e.width,n._texture._frame.height=e.height,n.transform.worldTransform=this.transform.worldTransform,n.anchor.set(-e.x/e.width,-e.y/e.height),n._onAnchorUpdate,n._renderWebGL(t)},e.prototype._renderCanvas=function(t){!0!==this.isMask&&t.plugins.graphics.render(this)},e.prototype._calculateBounds=function{this.boundsDirty!==this.dirty&&(this.boundsDirty=this.dirty,this.updateLocalBounds,this.cachedSpriteDirty=!0);var t=this._localBounds;this._bounds.addFrame(this.transform,t.minX,t.minY,t.maxX,t.maxY)},e.prototype.containsPoint=function(t){this.worldTransform.applyInverse(t,C);for(var e=this.graphicsData,n=0;n<e.length;++n){var r=e[n];if(r.fill&&(r.shape&&r.shape.contains(C.x,C.y))){if(r.holes)for(var i=0;i<r.holes.length;i++){var o=r.holes[i];if(o.contains(C.x,C.y))return!1}return!0}}return!1},e.prototype.updateLocalBounds=function{var t=1/0,e=-1/0,n=1/0,r=-1/0;if(this.graphicsData.length)for(var i=0,o=0,a=0,s=0,u=0,l=0;l<this.graphicsData.length;l++){var c=this.graphicsData[l],h=c.type,d=c.lineWidth;if(i=c.shape,h===_.SHAPES.RECT||h===_.SHAPES.RREC)o=i.x-d/2,a=i.y-d/2,s=i.width+d,u=i.height+d,t=o<t?o:t,e=o+s>e?o+s:e,n=a<n?a:n,r=a+u>r?a+u:r;else if(h===_.SHAPES.CIRC)o=i.x,a=i.y,s=i.radius+d/2,u=i.radius+d/2,t=o-s<t?o-s:t,e=o+s>e?o+s:e,n=a-u<n?a-u:n,r=a+u>r?a+u:r;else if(h===_.SHAPES.ELIP)o=i.x,a=i.y,s=i.width+d/2,u=i.height+d/2,t=o-s<t?o-s:t,e=o+s>e?o+s:e,n=a-u<n?a-u:n,r=a+u>r?a+u:r;else for(var p=i.points,f=0,g=0,m=0,v=0,y=0,b=0,x=0,w=0,T=0;T+2<p.length;T+=2)o=p[T],a=p[T+1],f=p[T+2],g=p[T+3],m=Math.abs(f-o),v=Math.abs(g-a),u=d,(s=Math.sqrt(m*m+v*v))<1e-9||(y=(u/s*v+m)/2,b=(u/s*m+v)/2,x=(f+o)/2,w=(g+a)/2,t=x-y<t?x-y:t,e=x+y>e?x+y:e,n=w-b<n?w-b:n,r=w+b>r?w+b:r)}else t=0,e=0,n=0,r=0;var S=this.boundsPadding;this._localBounds.minX=t-S,this._localBounds.maxX=e+S,this._localBounds.minY=n-S,this._localBounds.maxY=r+S},e.prototype.drawShape=function(t){this.currentPath&&this.currentPath.shape.points.length<=2&&this.graphicsData.pop,this.currentPath=null;var e=new f.default(this.lineWidth,this.lineColor,this.lineAlpha,this.fillColor,this.fillAlpha,this.filling,this.nativeLines,t);return this.graphicsData.push(e),e.type===_.SHAPES.POLY&&(e.shape.closed=e.shape.closed||this.filling,this.currentPath=e),this.dirty++,e},e.prototype.generateCanvasTexture=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=this.getLocalBounds,r=c.default.create(n.width,n.height,t,e);P||(P=new E.default),this.transform.updateLocalTransform,this.transform.localTransform.copy(M),M.invert,M.tx-=n.x,M.ty-=n.y,P.render(this,r,!0,M);var i=d.default.fromCanvas(r.baseTexture._canvasRenderTarget.canvas,t,"graphics");return i.baseTexture.resolution=e,i.baseTexture.update,i},e.prototype.closePath=function{var t=this.currentPath;return t&&t.shape&&t.shape.close,this},e.prototype.addHole=function{var t=this.graphicsData.pop;return this.currentPath=this.graphicsData[this.graphicsData.length-1],this.currentPath.addHole(t.shape),this.currentPath=null,this},e.prototype.destroy=function(e){t.prototype.destroy.call(this,e);for(var n=0;n<this.graphicsData.length;++n)this.graphicsData[n].destroy;for(var r in this._webgl)for(var i=0;i<this._webgl[r].data.length;++i)this._webgl[r].data[i].destroy;this._spriteRect&&this._spriteRect.destroy,this.graphicsData=null,this.currentPath=null,this._webgl=null,this._localBounds=null},e}(u.default);n.default=I,I._SPRITE_TEXTURE=null},{"../const":46,"../display/Bounds":47,"../display/Container":48,"../math":70,"../renderers/canvas/CanvasRenderer":77,"../sprites/Sprite":102,"../textures/RenderTexture":113,"../textures/Texture":115,"../utils":124,"./GraphicsData":54,"./utils/bezierCurveTo":56}],54:[function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}n.__esModule=!0;var i=function{function t(e,n,i,o,a,s,u,l){r(this,t),this.lineWidth=e,this.nativeLines=u,this.lineColor=n,this.lineAlpha=i,this._lineTint=n,this.fillColor=o,this.fillAlpha=a,this._fillTint=o,this.fill=s,this.holes=[],this.shape=l,this.type=l.type}return t.prototype.clone=function{return new t(this.lineWidth,this.lineColor,this.lineAlpha,this.fillColor,this.fillAlpha,this.fill,this.nativeLines,this.shape)},t.prototype.addHole=function(t){this.holes.push(t)},t.prototype.destroy=function{this.shape=null,this.holes=null},t};n.default=i},{}],55:[function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}n.__esModule=!0;var i=t("../../renderers/canvas/CanvasRenderer"),o=function(t){return t&&t.__esModule?t:{default:t}}(i),a=t("../../const"),s=function{function t(e){r(this,t),this.renderer=e}return t.prototype.render=function(t){var e=this.renderer,n=e.context,r=t.worldAlpha,i=t.transform.worldTransform,o=e.resolution;this._prevTint!==this.tint&&(this.dirty=!0),n.setTransform(i.a*o,i.b*o,i.c*o,i.d*o,i.tx*o,i.ty*o),t.dirty&&(this.updateGraphicsTint(t),t.dirty=!1),e.setBlendMode(t.blendMode);for(var s=0;s<t.graphicsData.length;s++){var u=t.graphicsData[s],l=u.shape,c=u._fillTint,h=u._lineTint;if(n.lineWidth=u.lineWidth,u.type===a.SHAPES.POLY){n.beginPath,this.renderPolygon(l.points,l.closed,n);for(var d=0;d<u.holes.length;d++)this.renderPolygon(u.holes[d].points,!0,n);u.fill&&(n.globalAlpha=u.fillAlpha*r,n.fillStyle="#"+("00000"+(0|c).toString(16)).substr(-6),n.fill),u.lineWidth&&(n.globalAlpha=u.lineAlpha*r,n.strokeStyle="#"+("00000"+(0|h).toString(16)).substr(-6),n.stroke)}else if(u.type===a.SHAPES.RECT)(u.fillColor||0===u.fillColor)&&(n.globalAlpha=u.fillAlpha*r,n.fillStyle="#"+("00000"+(0|c).toString(16)).substr(-6),n.fillRect(l.x,l.y,l.width,l.height)),u.lineWidth&&(n.globalAlpha=u.lineAlpha*r,n.strokeStyle="#"+("00000"+(0|h).toString(16)).substr(-6),n.strokeRect(l.x,l.y,l.width,l.height));else if(u.type===a.SHAPES.CIRC)n.beginPath,n.arc(l.x,l.y,l.radius,0,2*Math.PI),n.closePath,u.fill&&(n.globalAlpha=u.fillAlpha*r,n.fillStyle="#"+("00000"+(0|c).toString(16)).substr(-6),n.fill),u.lineWidth&&(n.globalAlpha=u.lineAlpha*r,n.strokeStyle="#"+("00000"+(0|h).toString(16)).substr(-6),n.stroke);else if(u.type===a.SHAPES.ELIP){var p=2*l.width,f=2*l.height,g=l.x-p/2,m=l.y-f/2;n.beginPath;var v=p/2*.5522848,y=f/2*.5522848,_=g+p,b=m+f,x=g+p/2,w=m+f/2;n.moveTo(g,w),n.bezierCurveTo(g,w-y,x-v,m,x,m),n.bezierCurveTo(x+v,m,_,w-y,_,w),n.bezierCurveTo(_,w+y,x+v,b,x,b),n.bezierCurveTo(x-v,b,g,w+y,g,w),n.closePath,u.fill&&(n.globalAlpha=u.fillAlpha*r,n.fillStyle="#"+("00000"+(0|c).toString(16)).substr(-6),n.fill),u.lineWidth&&(n.globalAlpha=u.lineAlpha*r,n.strokeStyle="#"+("00000"+(0|h).toString(16)).substr(-6),n.stroke)}else if(u.type===a.SHAPES.RREC){var T=l.x,S=l.y,E=l.width,P=l.height,M=l.radius,C=Math.min(E,P)/2|0;M=M>C?C:M,n.beginPath,n.moveTo(T,S+M),n.lineTo(T,S+P-M),n.quadraticCurveTo(T,S+P,T+M,S+P),n.lineTo(T+E-M,S+P),n.quadraticCurveTo(T+E,S+P,T+E,S+P-M),n.lineTo(T+E,S+M),n.quadraticCurveTo(T+E,S,T+E-M,S),n.lineTo(T+M,S),n.quadraticCurveTo(T,S,T,S+M),n.closePath,(u.fillColor||0===u.fillColor)&&(n.globalAlpha=u.fillAlpha*r,n.fillStyle="#"+("00000"+(0|c).toString(16)).substr(-6),n.fill),u.lineWidth&&(n.globalAlpha=u.lineAlpha*r,n.strokeStyle="#"+("00000"+(0|h).toString(16)).substr(-6),n.stroke)}}},t.prototype.updateGraphicsTint=function(t){t._prevTint=t.tint;for(var e=(t.tint>>16&255)/255,n=(t.tint>>8&255)/255,r=(255&t.tint)/255,i=0;i<t.graphicsData.length;++i){var o=t.graphicsData[i],a=0|o.fillColor,s=0|o.lineColor;o._fillTint=((a>>16&255)/255*e*255<<16)+((a>>8&255)/255*n*255<<8)+(255&a)/255*r*255,o._lineTint=((s>>16&255)/255*e*255<<16)+((s>>8&255)/255*n*255<<8)+(255&s)/255*r*255}},t.prototype.renderPolygon=function(t,e,n){n.moveTo(t[0],t[1]);for(var r=1;r<t.length/2;++r)n.lineTo(t[2*r],t[2*r+1]);e&&n.closePath},t.prototype.destroy=function{this.renderer=null},t};n.default=s,o.default.registerPlugin("graphics",s)},{"../../const":46,"../../renderers/canvas/CanvasRenderer":77}],56:[function(t,e,n){"use strict";function r(t,e,n,r,i,o,a,s){var u=arguments.length>8&&void 0!==arguments[8]?arguments[8]:[],l=0,c=0,h=0,d=0,p=0;u.push(t,e);for(var f=1,g=0;f<=20;++f)g=f/20,l=1-g,c=l*l,h=c*l,d=g*g,p=d*g,u.push(h*t+3*c*g*n+3*l*d*i+p*a,h*e+3*c*g*r+3*l*d*o+p*s);return u}n.__esModule=!0,n.default=r},{}],57:[function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}n.__esModule=!0;var s=t("../../utils"),u=t("../../const"),l=t("../../renderers/webgl/utils/ObjectRenderer"),c=r(l),h=t("../../renderers/webgl/WebGLRenderer"),d=r(h),p=t("./WebGLGraphicsData"),f=r(p),g=t("./shaders/PrimitiveShader"),m=r(g),v=t("./utils/buildPoly"),y=r(v),_=t("./utils/buildRectangle"),b=r(_),x=t("./utils/buildRoundedRectangle"),w=r(x),T=t("./utils/buildCircle"),S=r(T),E=function(t){function e(n){i(this,e);var r=o(this,t.call(this,n));return r.graphicsDataPool=[],r.primitiveShader=null,r.gl=n.gl,r.CONTEXT_UID=0,r}return a(e,t),e.prototype.onContextChange=function{this.gl=this.renderer.gl,this.CONTEXT_UID=this.renderer.CONTEXT_UID,this.primitiveShader=new m.default(this.gl)},e.prototype.destroy=function{c.default.prototype.destroy.call(this);for(var t=0;t<this.graphicsDataPool.length;++t)this.graphicsDataPool[t].destroy;this.graphicsDataPool=null},e.prototype.render=function(t){var e=this.renderer,n=e.gl,r=void 0,i=t._webGL[this.CONTEXT_UID];i&&t.dirty===i.dirty||(this.updateGraphics(t),i=t._webGL[this.CONTEXT_UID]);var o=this.primitiveShader;e.bindShader(o),e.state.setBlendMode(t.blendMode);for(var a=0,u=i.data.length;a<u;a++){r=i.data[a];var l=r.shader;e.bindShader(l),l.uniforms.translationMatrix=t.transform.worldTransform.toArray(!0),l.uniforms.tint=(0,s.hex2rgb)(t.tint),l.uniforms.alpha=t.worldAlpha,e.bindVao(r.vao),r.nativeLines?n.drawArrays(n.LINES,0,r.points.length/6):r.vao.draw(n.TRIANGLE_STRIP,r.indices.length)}},e.prototype.updateGraphics=function(t){var e=this.renderer.gl,n=t._webGL[this.CONTEXT_UID];if(n||(n=t._webGL[this.CONTEXT_UID]={lastIndex:0,data:[],gl:e,clearDirty:-1,dirty:-1}),n.dirty=t.dirty,t.clearDirty!==n.clearDirty){n.clearDirty=t.clearDirty;for(var r=0;r<n.data.length;r++)this.graphicsDataPool.push(n.data[r]);n.data.length=0,n.lastIndex=0}for(var i=void 0,o=void 0,a=n.lastIndex;a<t.graphicsData.length;a++){var s=t.graphicsData[a];i=this.getWebGLData(n,0),s.nativeLines&&s.lineWidth&&(o=this.getWebGLData(n,0,!0),n.lastIndex++),s.type===u.SHAPES.POLY&&(0,y.default)(s,i,o),s.type===u.SHAPES.RECT?(0,b.default)(s,i,o):s.type===u.SHAPES.CIRC||s.type===u.SHAPES.ELIP?(0,S.default)(s,i,o):s.type===u.SHAPES.RREC&&(0,w.default)(s,i,o),n.lastIndex++}this.renderer.bindVao(null);for(var l=0;l<n.data.length;l++)i=n.data[l],i.dirty&&i.upload},e.prototype.getWebGLData=function(t,e,n){var r=t.data[t.data.length-1];return(!r||r.nativeLines!==n||r.points.length>32e4)&&(r=this.graphicsDataPool.pop||new f.default(this.renderer.gl,this.primitiveShader,this.renderer.state.attribsState),r.nativeLines=n,r.reset(e),t.data.push(r)),r.dirty=!0,r},e}(c.default);n.default=E,d.default.registerPlugin("graphics",E)},{"../../const":46,"../../renderers/webgl/WebGLRenderer":84,"../../renderers/webgl/utils/ObjectRenderer":94,"../../utils":124,"./WebGLGraphicsData":58,"./shaders/PrimitiveShader":59,"./utils/buildCircle":60,"./utils/buildPoly":62,"./utils/buildRectangle":63,"./utils/buildRoundedRectangle":64}],58:[function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}n.__esModule=!0;var i=t("pixi-gl-core"),o=function(t){return t&&t.__esModule?t:{default:t}}(i),a=function{function t(e,n,i){r(this,t),this.gl=e,this.color=[0,0,0],this.points=[],this.indices=[],this.buffer=o.default.GLBuffer.createVertexBuffer(e),this.indexBuffer=o.default.GLBuffer.createIndexBuffer(e),this.dirty=!0,this.nativeLines=!1,this.glPoints=null,this.glIndices=null,this.shader=n,this.vao=new o.default.VertexArrayObject(e,i).addIndex(this.indexBuffer).addAttribute(this.buffer,n.attributes.aVertexPosition,e.FLOAT,!1,24,0).addAttribute(this.buffer,n.attributes.aColor,e.FLOAT,!1,24,8)}return t.prototype.reset=function{this.points.length=0,this.indices.length=0},t.prototype.upload=function{this.glPoints=new Float32Array(this.points),this.buffer.upload(this.glPoints),this.glIndices=new Uint16Array(this.indices),this.indexBuffer.upload(this.glIndices),this.dirty=!1},t.prototype.destroy=function{this.color=null,this.points=null,this.indices=null,this.vao.destroy,this.buffer.destroy,this.indexBuffer.destroy,this.gl=null,this.buffer=null,this.indexBuffer=null,this.glPoints=null,this.glIndices=null},t};n.default=a},{"pixi-gl-core":15}],59:[function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}n.__esModule=!0;var a=t("../../../Shader"),s=function(t){return t&&t.__esModule?t:{default:t}}(a),u=function(t){function e(n){return r(this,e),i(this,t.call(this,n,["attribute vec2 aVertexPosition;","attribute vec4 aColor;","uniform mat3 translationMatrix;","uniform mat3 projectionMatrix;","uniform float alpha;","uniform vec3 tint;","varying vec4 vColor;","void main(void){","  gl_Position = vec4((projectionMatrix * translationMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);","   vColor = aColor * vec4(tint * alpha, alpha);","}"].join("\n"),["varying vec4 vColor;","void main(void){","   gl_FragColor = vColor;","}"].join("\n")))}return o(e,t),e}(s.default);n.default=u},{"../../../Shader":44}],60:[function(t,e,n){"use strict";function r(t,e,n){var r=t.shape,i=r.x,u=r.y,l=void 0,c=void 0;if(t.type===a.SHAPES.CIRC?(l=r.radius,c=r.radius):(l=r.width,c=r.height),0!==l&&0!==c){var h=Math.floor(30*Math.sqrt(r.radius))||Math.floor(15*Math.sqrt(r.width+r.height)),d=2*Math.PI/h;if(t.fill){var p=(0,s.hex2rgb)(t.fillColor),f=t.fillAlpha,g=p[0]*f,m=p[1]*f,v=p[2]*f,y=e.points,_=e.indices,b=y.length/6;_.push(b);for(var x=0;x<h+1;x++)y.push(i,u,g,m,v,f),y.push(i+Math.sin(d*x)*l,u+Math.cos(d*x)*c,g,m,v,f),_.push(b++,b++);_.push(b-1)}if(t.lineWidth){var w=t.points;t.points=[];for(var T=0;T<h+1;T++)t.points.push(i+Math.sin(d*T)*l,u+Math.cos(d*T)*c);(0,o.default)(t,e,n),t.points=w}}}n.__esModule=!0,n.default=r;var i=t("./buildLine"),o=function(t){return t&&t.__esModule?t:{default:t}}(i),a=t("../../../const"),s=t("../../../utils")},{"../../../const":46,"../../../utils":124,"./buildLine":61}],61:[function(t,e,n){"use strict";function r(t,e){var n=t.points;if(0!==n.length){var r=new o.Point(n[0],n[1]),i=new o.Point(n[n.length-2],n[n.length-1]);if(r.x===i.x&&r.y===i.y){n=n.slice,n.pop,n.pop,i=new o.Point(n[n.length-2],n[n.length-1]);var s=i.x+.5*(r.x-i.x),u=i.y+.5*(r.y-i.y);n.unshift(s,u),n.push(s,u)}var l=e.points,c=e.indices,h=n.length/2,d=n.length,p=l.length/6,f=t.lineWidth/2,g=(0,a.hex2rgb)(t.lineColor),m=t.lineAlpha,v=g[0]*m,y=g[1]*m,_=g[2]*m,b=n[0],x=n[1],w=n[2],T=n[3],S=0,E=0,P=-(x-T),M=b-w,C=0,A=0,O=0,I=0,k=Math.sqrt(P*P+M*M);P/=k,M/=k,P*=f,M*=f,l.push(b-P,x-M,v,y,_,m),l.push(b+P,x+M,v,y,_,m);for(var R=1;R<h-1;++R){b=n[2*(R-1)],x=n[2*(R-1)+1],w=n[2*R],T=n[2*R+1],S=n[2*(R+1)],E=n[2*(R+1)+1],P=-(x-T),M=b-w,k=Math.sqrt(P*P+M*M),P/=k,M/=k,P*=f,M*=f,C=-(T-E),A=w-S,k=Math.sqrt(C*C+A*A),C/=k,A/=k,C*=f,A*=f;var D=-M+x-(-M+T),L=-P+w-(-P+b),j=(-P+b)*(-M+T)-(-P+w)*(-M+x),B=-A+E-(-A+T),N=-C+w-(-C+S),F=(-C+S)*(-A+T)-(-C+w)*(-A+E),U=D*N-B*L;if(Math.abs(U)<.1)U+=10.1,l.push(w-P,T-M,v,y,_,m),l.push(w+P,T+M,v,y,_,m);else{var W=(L*F-N*j)/U,H=(B*j-D*F)/U;(W-w)*(W-w)+(H-T)*(H-T)>196*f*f?(O=P-C,I=M-A,k=Math.sqrt(O*O+I*I),O/=k,I/=k,O*=f,I*=f,l.push(w-O,T-I),l.push(v,y,_,m),l.push(w+O,T+I),l.push(v,y,_,m),l.push(w-O,T-I),l.push(v,y,_,m),d++):(l.push(W,H),l.push(v,y,_,m),l.push(w-(W-w),T-(H-T)),l.push(v,y,_,m))}}b=n[2*(h-2)],x=n[2*(h-2)+1],w=n[2*(h-1)],T=n[2*(h-1)+1],P=-(x-T),M=b-w,k=Math.sqrt(P*P+M*M),P/=k,M/=k,P*=f,M*=f,l.push(w-P,T-M),l.push(v,y,_,m),l.push(w+P,T+M),l.push(v,y,_,m),c.push(p);for(var z=0;z<d;++z)c.push(p++);c.push(p-1)}}function i(t,e){var n=0,r=t.points;if(0!==r.length){var i=e.points,o=r.length/2,s=(0,a.hex2rgb)(t.lineColor),u=t.lineAlpha,l=s[0]*u,c=s[1]*u,h=s[2]*u;for(n=1;n<o;n++){var d=r[2*(n-1)],p=r[2*(n-1)+1],f=r[2*n],g=r[2*n+1];i.push(d,p),i.push(l,c,h,u),i.push(f,g),i.push(l,c,h,u)}}}n.__esModule=!0,n.default=function(t,e,n){t.nativeLines?i(t,n):r(t,e)};var o=t("../../../math"),a=t("../../../utils")},{"../../../math":70,"../../../utils":124}],62:[function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e,n){t.points=t.shape.points.slice;var r=t.points;if(t.fill&&r.length>=6){for(var i=[],o=t.holes,u=0;u<o.length;u++){var c=o[u];i.push(r.length/2),r=r.concat(c.points)}var h=e.points,d=e.indices,p=r.length/2,f=(0,s.hex2rgb)(t.fillColor),g=t.fillAlpha,m=f[0]*g,v=f[1]*g,y=f[2]*g,_=(0,l.default)(r,i,2);if(!_)return;for(var b=h.length/6,x=0;x<_.length;x+=3)d.push(_[x]+b),d.push(_[x]+b),d.push(_[x+1]+b),d.push(_[x+2]+b),d.push(_[x+2]+b);for(var w=0;w<p;w++)h.push(r[2*w],r[2*w+1],m,v,y,g)}t.lineWidth>0&&(0,a.default)(t,e,n)}n.__esModule=!0,n.default=i;var o=t("./buildLine"),a=r(o),s=t("../../../utils"),u=t("earcut"),l=r(u)},{"../../../utils":124,"./buildLine":61,earcut:2}],63:[function(t,e,n){"use strict";function r(t,e,n){var r=t.shape,i=r.x,s=r.y,u=r.width,l=r.height;if(t.fill){var c=(0,a.hex2rgb)(t.fillColor),h=t.fillAlpha,d=c[0]*h,p=c[1]*h,f=c[2]*h,g=e.points,m=e.indices,v=g.length/6;g.push(i,s),g.push(d,p,f,h),g.push(i+u,s),g.push(d,p,f,h),g.push(i,s+l),g.push(d,p,f,h),g.push(i+u,s+l),g.push(d,p,f,h),m.push(v,v,v+1,v+2,v+3,v+3)}if(t.lineWidth){var y=t.points;t.points=[i,s,i+u,s,i+u,s+l,i,s+l,i,s],(0,o.default)(t,e,n),t.points=y}}n.__esModule=!0,n.default=r;var i=t("./buildLine"),o=function(t){return t&&t.__esModule?t:{default:t}}(i),a=t("../../../utils")},{"../../../utils":124,"./buildLine":61}],64:[function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e,n){var r=t.shape,i=r.x,o=r.y,s=r.width,l=r.height,d=r.radius,p=[];if(p.push(i,o+d),a(i,o+l-d,i,o+l,i+d,o+l,p),a(i+s-d,o+l,i+s,o+l,i+s,o+l-d,p),a(i+s,o+d,i+s,o,i+s-d,o,p),a(i+d,o,i,o,i,o+d+1e-10,p),t.fill){for(var f=(0,h.hex2rgb)(t.fillColor),g=t.fillAlpha,m=f[0]*g,v=f[1]*g,y=f[2]*g,_=e.points,b=e.indices,x=_.length/6,w=(0,u.default)(p,null,2),T=0,S=w.length;T<S;T+=3)b.push(w[T]+x),b.push(w[T]+x),b.push(w[T+1]+x),b.push(w[T+2]+x),b.push(w[T+2]+x);for(var E=0,P=p.length;E<P;E++)_.push(p[E],p[++E],m,v,y,g)}if(t.lineWidth){var M=t.points;t.points=p,(0,c.default)(t,e,n),t.points=M}}function o(t,e,n){return t+(e-t)*n}function a(t,e,n,r,i,a){for(var s=arguments.length>6&&void 0!==arguments[6]?arguments[6]:[],u=s,l=0,c=0,h=0,d=0,p=0,f=0,g=0,m=0;g<=20;++g)m=g/20,l=o(t,n,m),c=o(e,r,m),h=o(n,i,m),d=o(r,a,m),p=o(l,h,m),f=o(c,d,m),u.push(p,f);return u}n.__esModule=!0,n.default=i;var s=t("earcut"),u=r(s),l=t("./buildLine"),c=r(l),h=t("../../../utils")},{"../../../utils":124,"./buildLine":61,earcut:2}],65:[function(t,e,n){"use strict";function r(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}function i(t){return t&&t.__esModule?t:{default:t}}n.__esModule=!0,n.autoDetectRenderer=n.Application=n.Filter=n.SpriteMaskFilter=n.Quad=n.RenderTarget=n.ObjectRenderer=n.WebGLManager=n.Shader=n.CanvasRenderTarget=n.TextureUvs=n.VideoBaseTexture=n.BaseRenderTexture=n.RenderTexture=n.BaseTexture=n.Texture=n.Spritesheet=n.CanvasGraphicsRenderer=n.GraphicsRenderer=n.GraphicsData=n.Graphics=n.TextMetrics=n.TextStyle=n.Text=n.SpriteRenderer=n.CanvasTinter=n.CanvasSpriteRenderer=n.Sprite=n.TransformBase=n.TransformStatic=n.Transform=n.Container=n.DisplayObject=n.Bounds=n.glCore=n.WebGLRenderer=n.CanvasRenderer=n.ticker=n.utils=n.settings=void 0;var o=t("./const");Object.keys(o).forEach(function(t){"default"!==t&&"__esModule"!==t&&Object.defineProperty(n,t,{enumerable:!0,get:function{return o[t]}})});var a=t("./math");Object.keys(a).forEach(function(t){"default"!==t&&"__esModule"!==t&&Object.defineProperty(n,t,{enumerable:!0,get:function{return a[t]}})});var s=t("pixi-gl-core");Object.defineProperty(n,"glCore",{enumerable:!0,get:function{return i(s).default}});var u=t("./display/Bounds");Object.defineProperty(n,"Bounds",{enumerable:!0,get:function{return i(u).default}});var l=t("./display/DisplayObject");Object.defineProperty(n,"DisplayObject",{enumerable:!0,get:function{return i(l).default}});var c=t("./display/Container");Object.defineProperty(n,"Container",{enumerable:!0,get:function{return i(c).default}});var h=t("./display/Transform");Object.defineProperty(n,"Transform",{enumerable:!0,get:function{return i(h).default}});var d=t("./display/TransformStatic");Object.defineProperty(n,"TransformStatic",{enumerable:!0,get:function{return i(d).default}});var p=t("./display/TransformBase");Object.defineProperty(n,"TransformBase",{enumerable:!0,get:function{return i(p).default}});var f=t("./sprites/Sprite");Object.defineProperty(n,"Sprite",{enumerable:!0,get:function{return i(f).default}});var g=t("./sprites/canvas/CanvasSpriteRenderer");Object.defineProperty(n,"CanvasSpriteRenderer",{enumerable:!0,get:function{return i(g).default}});var m=t("./sprites/canvas/CanvasTinter");Object.defineProperty(n,"CanvasTinter",{enumerable:!0,get:function{return i(m).default}});var v=t("./sprites/webgl/SpriteRenderer");Object.defineProperty(n,"SpriteRenderer",{enumerable:!0,get:function{return i(v).default}});var y=t("./text/Text");Object.defineProperty(n,"Text",{enumerable:!0,get:function{return i(y).default}});var _=t("./text/TextStyle");Object.defineProperty(n,"TextStyle",{enumerable:!0,get:function{return i(_).default}});var b=t("./text/TextMetrics");Object.defineProperty(n,"TextMetrics",{enumerable:!0,get:function{return i(b).default}});var x=t("./graphics/Graphics");Object.defineProperty(n,"Graphics",{enumerable:!0,get:function{return i(x).default}});var w=t("./graphics/GraphicsData");Object.defineProperty(n,"GraphicsData",{enumerable:!0,get:function{return i(w).default}});var T=t("./graphics/webgl/GraphicsRenderer");Object.defineProperty(n,"GraphicsRenderer",{enumerable:!0,get:function{return i(T).default}});var S=t("./graphics/canvas/CanvasGraphicsRenderer");Object.defineProperty(n,"CanvasGraphicsRenderer",{enumerable:!0,get:function{return i(S).default}});var E=t("./textures/Spritesheet");Object.defineProperty(n,"Spritesheet",{enumerable:!0,get:function{return i(E).default}});var P=t("./textures/Texture");Object.defineProperty(n,"Texture",{enumerable:!0,get:function{return i(P).default}});var M=t("./textures/BaseTexture");Object.defineProperty(n,"BaseTexture",{enumerable:!0,get:function{return i(M).default}});var C=t("./textures/RenderTexture");Object.defineProperty(n,"RenderTexture",{enumerable:!0,get:function{return i(C).default}});var A=t("./textures/BaseRenderTexture");Object.defineProperty(n,"BaseRenderTexture",{enumerable:!0,get:function{return i(A).default}});var O=t("./textures/VideoBaseTexture");Object.defineProperty(n,"VideoBaseTexture",{enumerable:!0,get:function{return i(O).default}});var I=t("./textures/TextureUvs");Object.defineProperty(n,"TextureUvs",{enumerable:!0,get:function{return i(I).default}});var k=t("./renderers/canvas/utils/CanvasRenderTarget");Object.defineProperty(n,"CanvasRenderTarget",{enumerable:!0,get:function{return i(k).default}});var R=t("./Shader");Object.defineProperty(n,"Shader",{enumerable:!0,get:function{return i(R).default}});var D=t("./renderers/webgl/managers/WebGLManager");Object.defineProperty(n,"WebGLManager",{enumerable:!0,get:function{return i(D).default}});var L=t("./renderers/webgl/utils/ObjectRenderer");Object.defineProperty(n,"ObjectRenderer",{enumerable:!0,get:function{return i(L).default}});var j=t("./renderers/webgl/utils/RenderTarget");Object.defineProperty(n,"RenderTarget",{enumerable:!0,get:function{return i(j).default}});var B=t("./renderers/webgl/utils/Quad");Object.defineProperty(n,"Quad",{enumerable:!0,get:function{return i(B).default}});var N=t("./renderers/webgl/filters/spriteMask/SpriteMaskFilter");Object.defineProperty(n,"SpriteMaskFilter",{enumerable:!0,get:function{return i(N).default}});var F=t("./renderers/webgl/filters/Filter");Object.defineProperty(n,"Filter",{enumerable:!0,get:function{return i(F).default}});var U=t("./Application");Object.defineProperty(n,"Application",{enumerable:!0,get:function{return i(U).default}});var W=t("./autoDetectRenderer");Object.defineProperty(n,"autoDetectRenderer",{enumerable:!0,get:function{return W.autoDetectRenderer}});var H=t("./utils"),z=r(H),X=t("./ticker"),G=r(X),q=t("./settings"),V=i(q),Y=t("./renderers/canvas/CanvasRenderer"),K=i(Y),$=t("./renderers/webgl/WebGLRenderer"),J=i($);n.settings=V.default,n.utils=z,n.ticker=G,n.CanvasRenderer=K.default,n.WebGLRenderer=J.default},{"./Application":43,"./Shader":44,"./autoDetectRenderer":45,"./const":46,"./display/Bounds":47,"./display/Container":48,"./display/DisplayObject":49,"./display/Transform":50,"./display/TransformBase":51,"./display/TransformStatic":52,"./graphics/Graphics":53,"./graphics/GraphicsData":54,"./graphics/canvas/CanvasGraphicsRenderer":55,"./graphics/webgl/GraphicsRenderer":57,"./math":70,"./renderers/canvas/CanvasRenderer":77,"./renderers/canvas/utils/CanvasRenderTarget":79,"./renderers/webgl/WebGLRenderer":84,"./renderers/webgl/filters/Filter":86,"./renderers/webgl/filters/spriteMask/SpriteMaskFilter":89,"./renderers/webgl/managers/WebGLManager":93,"./renderers/webgl/utils/ObjectRenderer":94,"./renderers/webgl/utils/Quad":95,"./renderers/webgl/utils/RenderTarget":96,"./settings":101,"./sprites/Sprite":102,"./sprites/canvas/CanvasSpriteRenderer":103,"./sprites/canvas/CanvasTinter":104,"./sprites/webgl/SpriteRenderer":106,"./text/Text":108,"./text/TextMetrics":109,"./text/TextStyle":110,"./textures/BaseRenderTexture":111,"./textures/BaseTexture":112,"./textures/RenderTexture":113,"./textures/Spritesheet":114,"./textures/Texture":115,"./textures/TextureUvs":116,"./textures/VideoBaseTexture":117,"./ticker":120,"./utils":124,"pixi-gl-core":15}],66:[function(t,e,n){"use strict";function r(t){return t<0?-1:t>0?1:0}n.__esModule=!0;var i=t("./Matrix"),o=function(t){return t&&t.__esModule?t:{default:t}}(i),a=[1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1,0,1],s=[0,1,1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1],u=[0,-1,-1,-1,0,1,1,1,0,1,1,1,0,-1,-1,-1],l=[1,1,0,-1,-1,-1,0,1,-1,-1,0,1,1,1,0,-1],c=[],h=[];!function{for(var t=0;t<16;t++){var e=[];h.push(e);for(var n=0;n<16;n++)for(var i=r(a[t]*a[n]+u[t]*s[n]),d=r(s[t]*a[n]+l[t]*s[n]),p=r(a[t]*u[n]+u[t]*l[n]),f=r(s[t]*u[n]+l[t]*l[n]),g=0;g<16;g++)if(a[g]===i&&s[g]===d&&u[g]===p&&l[g]===f){e.push(g);break}}for(var m=0;m<16;m++){var v=new o.default;v.set(a[m],s[m],u[m],l[m],0,0),c.push(v)}};var d={E:0,SE:1,S:2,SW:3,W:4,NW:5,N:6,NE:7,MIRROR_VERTICAL:8,MIRROR_HORIZONTAL:12,uX:function(t){return a[t]},uY:function(t){return s[t]},vX:function(t){return u[t]},vY:function(t){return l[t]},inv:function(t){return 8&t?15&t:7&-t},add:function(t,e){return h[t][e]},sub:function(t,e){return h[t][d.inv(e)]},rotate180:function(t){return 4^t},isSwapWidthHeight:function(t){return 2==(3&t)},byDirection:function(t,e){return 2*Math.abs(t)<=Math.abs(e)?e>=0?d.S:d.N:2*Math.abs(e)<=Math.abs(t)?t>0?d.E:d.W:e>0?t>0?d.SE:d.SW:t>0?d.NE:d.NW},matrixAppendRotationInv:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,i=c[d.inv(e)];i.tx=n,i.ty=r,t.append(i)}};n.default=d},{"./Matrix":67}],67:[function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}n.__esModule=!0;var i=function{function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}},o=t("./Point"),a=function(t){return t&&t.__esModule?t:{default:t}}(o),s=function{function t{var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1,a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,s=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0;r(this,t),this.a=e,this.b=n,this.c=i,this.d=o,this.tx=a,this.ty=s,this.array=null}return t.prototype.fromArray=function(t){this.a=t[0],this.b=t[1],this.c=t[3],this.d=t[4],this.tx=t[2],this.ty=t[5]},t.prototype.set=function(t,e,n,r,i,o){return this.a=t,this.b=e,this.c=n,this.d=r,this.tx=i,this.ty=o,this},t.prototype.toArray=function(t,e){this.array||(this.array=new Float32Array(9));var n=e||this.array;return t?(n[0]=this.a,n[1]=this.b,n[2]=0,n[3]=this.c,n[4]=this.d,n[5]=0,n[6]=this.tx,n[7]=this.ty,n[8]=1):(n[0]=this.a,n[1]=this.c,n[2]=this.tx,n[3]=this.b,n[4]=this.d,n[5]=this.ty,n[6]=0,n[7]=0,n[8]=1),n},t.prototype.apply=function(t,e){e=e||new a.default;var n=t.x,r=t.y;return e.x=this.a*n+this.c*r+this.tx,e.y=this.b*n+this.d*r+this.ty,e},t.prototype.applyInverse=function(t,e){e=e||new a.default;var n=1/(this.a*this.d+this.c*-this.b),r=t.x,i=t.y;return e.x=this.d*n*r+-this.c*n*i+(this.ty*this.c-this.tx*this.d)*n,e.y=this.a*n*i+-this.b*n*r+(-this.ty*this.a+this.tx*this.b)*n,e},t.prototype.translate=function(t,e){return this.tx+=t,this.ty+=e,this},t.prototype.scale=function(t,e){return this.a*=t,this.d*=e,this.c*=t,this.b*=e,this.tx*=t,this.ty*=e,this},t.prototype.rotate=function(t){var e=Math.cos(t),n=Math.sin(t),r=this.a,i=this.c,o=this.tx;return this.a=r*e-this.b*n,this.b=r*n+this.b*e,this.c=i*e-this.d*n,this.d=i*n+this.d*e,this.tx=o*e-this.ty*n,this.ty=o*n+this.ty*e,this},t.prototype.append=function(t){var e=this.a,n=this.b,r=this.c,i=this.d;return this.a=t.a*e+t.b*r,this.b=t.a*n+t.b*i,this.c=t.c*e+t.d*r,this.d=t.c*n+t.d*i,this.tx=t.tx*e+t.ty*r+this.tx,this.ty=t.tx*n+t.ty*i+this.ty,this},t.prototype.setTransform=function(t,e,n,r,i,o,a,s,u){var l=Math.sin(a),c=Math.cos(a),h=Math.cos(u),d=Math.sin(u),p=-Math.sin(s),f=Math.cos(s),g=c*i,m=l*i,v=-l*o,y=c*o;return this.a=h*g+d*v,this.b=h*m+d*y,this.c=p*g+f*v,this.d=p*m+f*y,this.tx=t+(n*g+r*v),this.ty=e+(n*m+r*y),this},t.prototype.prepend=function(t){var e=this.tx;if(1!==t.a||0!==t.b||0!==t.c||1!==t.d){var n=this.a,r=this.c;this.a=n*t.a+this.b*t.c,this.b=n*t.b+this.b*t.d,this.c=r*t.a+this.d*t.c,this.d=r*t.b+this.d*t.d}return this.tx=e*t.a+this.ty*t.c+t.tx,this.ty=e*t.b+this.ty*t.d+t.ty,this},t.prototype.decompose=function(t){var e=this.a,n=this.b,r=this.c,i=this.d,o=-Math.atan2(-r,i),a=Math.atan2(n,e);return Math.abs(o+a)<1e-5?(t.rotation=a,e<0&&i>=0&&(t.rotation+=t.rotation<=0?Math.PI:-Math.PI),t.skew.x=t.skew.y=0):(t.skew.x=o,t.skew.y=a),t.scale.x=Math.sqrt(e*e+n*n),t.scale.y=Math.sqrt(r*r+i*i),t.position.x=this.tx,t.position.y=this.ty,t},t.prototype.invert=function{var t=this.a,e=this.b,n=this.c,r=this.d,i=this.tx,o=t*r-e*n;return this.a=r/o,this.b=-e/o,this.c=-n/o,this.d=t/o,this.tx=(n*this.ty-r*i)/o,this.ty=-(t*this.ty-e*i)/o,this},t.prototype.identity=function{return this.a=1,this.b=0,this.c=0,this.d=1,this.tx=0,this.ty=0,this},t.prototype.clone=function{var e=new t;return e.a=this.a,e.b=this.b,e.c=this.c,e.d=this.d,e.tx=this.tx,e.ty=this.ty,e},t.prototype.copy=function(t){return t.a=this.a,t.b=this.b,t.c=this.c,t.d=this.d,t.tx=this.tx,t.ty=this.ty,t},i(t,null,[{key:"IDENTITY",get:function{return new t}},{key:"TEMP_MATRIX",get:function{return new t}}]),t};n.default=s},{"./Point":69}],68:[function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}n.__esModule=!0;var i=function{function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}},o=function{function t(e,n){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;r(this,t),this._x=i,this._y=o,this.cb=e,this.scope=n}return t.prototype.set=function(t,e){var n=t||0,r=e||(0!==e?n:0);this._x===n&&this._y===r||(this._x=n,this._y=r,this.cb.call(this.scope))},t.prototype.copy=function(t){this._x===t.x&&this._y===t.y||(this._x=t.x,this._y=t.y,this.cb.call(this.scope))},i(t,[{key:"x",get:function{return this._x},set:function(t){this._x!==t&&(this._x=t,this.cb.call(this.scope))}},{key:"y",get:function{return this._y},set:function(t){this._y!==t&&(this._y=t,this.cb.call(this.scope))}}]),t};n.default=o},{}],69:[function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}n.__esModule=!0;var i=function{function t{var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;r(this,t),this.x=e,this.y=n}return t.prototype.clone=function{return new t(this.x,this.y)},t.prototype.copy=function(t){this.set(t.x,t.y)},t.prototype.equals=function(t){return t.x===this.x&&t.y===this.y},t.prototype.set=function(t,e){this.x=t||0,this.y=e||(0!==e?this.x:0)},t};n.default=i},{}],70:[function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}n.__esModule=!0;var i=t("./Point");Object.defineProperty(n,"Point",{enumerable:!0,get:function{return r(i).default}});var o=t("./ObservablePoint");Object.defineProperty(n,"ObservablePoint",{enumerable:!0,get:function{return r(o).default}});var a=t("./Matrix");Object.defineProperty(n,"Matrix",{enumerable:!0,get:function{return r(a).default}});var s=t("./GroupD8");Object.defineProperty(n,"GroupD8",{enumerable:!0,get:function{return r(s).default}});var u=t("./shapes/Circle");Object.defineProperty(n,"Circle",{enumerable:!0,get:function{return r(u).default}});var l=t("./shapes/Ellipse");Object.defineProperty(n,"Ellipse",{enumerable:!0,get:function{return r(l).default}});var c=t("./shapes/Polygon");Object.defineProperty(n,"Polygon",{enumerable:!0,get:function{return r(c).default}});var h=t("./shapes/Rectangle");Object.defineProperty(n,"Rectangle",{enumerable:!0,get:function{return r(h).default}});var d=t("./shapes/RoundedRectangle");Object.defineProperty(n,"RoundedRectangle",{enumerable:!0,get:function{return r(d).default}})},{"./GroupD8":66,"./Matrix":67,"./ObservablePoint":68,"./Point":69,"./shapes/Circle":71,"./shapes/Ellipse":72,"./shapes/Polygon":73,"./shapes/Rectangle":74,"./shapes/RoundedRectangle":75}],71:[function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}n.__esModule=!0;var i=t("./Rectangle"),o=function(t){return t&&t.__esModule?t:{default:t}}(i),a=t("../../const"),s=function{function t{var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;r(this,t),this.x=e,this.y=n,this.radius=i,this.type=a.SHAPES.CIRC}return t.prototype.clone=function{return new t(this.x,this.y,this.radius)},t.prototype.contains=function(t,e){if(this.radius<=0)return!1;var n=this.radius*this.radius,r=this.x-t,i=this.y-e;return r*=r,i*=i,r+i<=n},t.prototype.getBounds=function{return new o.default(this.x-this.radius,this.y-this.radius,2*this.radius,2*this.radius)},t};n.default=s},{"../../const":46,"./Rectangle":74}],72:[function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}n.__esModule=!0;var i=t("./Rectangle"),o=function(t){return t&&t.__esModule?t:{default:t}}(i),a=t("../../const"),s=function{function t{var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;r(this,t),this.x=e,this.y=n,this.width=i,this.height=o,this.type=a.SHAPES.ELIP}return t.prototype.clone=function{return new t(this.x,this.y,this.width,this.height)},t.prototype.contains=function(t,e){if(this.width<=0||this.height<=0)return!1;var n=(t-this.x)/this.width,r=(e-this.y)/this.height;return n*=n,r*=r,n+r<=1},t.prototype.getBounds=function{return new o.default(this.x-this.width,this.y-this.height,this.width,this.height)},t};n.default=s},{"../../const":46,"./Rectangle":74}],73:[function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}n.__esModule=!0;var i=t("../Point"),o=function(t){return t&&t.__esModule?t:{default:t}}(i),a=t("../../const"),s=function{function t{for(var e=arguments.length,n=Array(e),i=0;i<e;i++)n[i]=arguments[i];if(r(this,t),Array.isArray(n[0])&&(n=n[0]),n[0]instanceof o.default){for(var s=[],u=0,l=n.length;u<l;u++)s.push(n[u].x,n[u].y);n=s}this.closed=!0,this.points=n,this.type=a.SHAPES.POLY}return t.prototype.clone=function{return new t(this.points.slice)},t.prototype.close=function{var t=this.points;t[0]===t[t.length-2]&&t[1]===t[t.length-1]||t.push(t[0],t[1])},t.prototype.contains=function(t,e){for(var n=!1,r=this.points.length/2,i=0,o=r-1;i<r;o=i++){var a=this.points[2*i],s=this.points[2*i+1],u=this.points[2*o],l=this.points[2*o+1];s>e!=l>e&&t<(e-s)/(l-s)*(u-a)+a&&(n=!n)}return n},t};n.default=s},{"../../const":46,"../Point":69}],74:[function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}n.__esModule=!0;var i=function{function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}},o=t("../../const"),a=function{function t{var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;r(this,t),this.x=e,this.y=n,this.width=i,this.height=a,this.type=o.SHAPES.RECT}return t.prototype.clone=function{return new t(this.x,this.y,this.width,this.height)},t.prototype.copy=function(t){return this.x=t.x,this.y=t.y,this.width=t.width,this.height=t.height,this},t.prototype.contains=function(t,e){return!(this.width<=0||this.height<=0)&&(t>=this.x&&t<this.x+this.width&&e>=this.y&&e<this.y+this.height)},t.prototype.pad=function(t,e){t=t||0,e=e||(0!==e?t:0),this.x-=t,this.y-=e,this.width+=2*t,this.height+=2*e},t.prototype.fit=function(t){this.x<t.x&&(this.width+=this.x,this.width<0&&(this.width=0),this.x=t.x),this.y<t.y&&(this.height+=this.y,this.height<0&&(this.height=0),this.y=t.y),this.x+this.width>t.x+t.width&&(this.width=t.width-this.x,this.width<0&&(this.width=0)),this.y+this.height>t.y+t.height&&(this.height=t.height-this.y,this.height<0&&(this.height=0))},t.prototype.enlarge=function(t){var e=Math.min(this.x,t.x),n=Math.max(this.x+this.width,t.x+t.width),r=Math.min(this.y,t.y),i=Math.max(this.y+this.height,t.y+t.height);this.x=e,this.width=n-e,this.y=r,this.height=i-r},i(t,[{key:"left",get:function{return this.x}},{key:"right",get:function{return this.x+this.width}},{key:"top",get:function{return this.y}},{key:"bottom",get:function{return this.y+this.height}}],[{key:"EMPTY",get:function{return new t(0,0,0,0)}}]),t};n.default=a},{"../../const":46}],75:[function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}n.__esModule=!0;var i=t("../../const"),o=function{function t{var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:20;r(this,t),this.x=e,this.y=n,this.width=o,this.height=a,this.radius=s,this.type=i.SHAPES.RREC}return t.prototype.clone=function{return new t(this.x,this.y,this.width,this.height,this.radius)},t.prototype.contains=function(t,e){if(this.width<=0||this.height<=0)return!1;if(t>=this.x&&t<=this.x+this.width&&e>=this.y&&e<=this.y+this.height){if(e>=this.y+this.radius&&e<=this.y+this.height-this.radius||t>=this.x+this.radius&&t<=this.x+this.width-this.radius)return!0;var n=t-(this.x+this.radius),r=e-(this.y+this.radius),i=this.radius*this.radius;if(n*n+r*r<=i)return!0;if((n=t-(this.x+this.width-this.radius))*n+r*r<=i)return!0;if(r=e-(this.y+this.height-this.radius),n*n+r*r<=i)return!0;if((n=t-(this.x+this.radius))*n+r*r<=i)return!0}return!1},t};n.default=o},{"../../const":46}],76:[function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}n.__esModule=!0;var s=function{function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}},u=t("../utils"),l=t("../math"),c=t("../const"),h=t("../settings"),d=r(h),p=t("../display/Container"),f=r(p),g=t("../textures/RenderTexture"),m=r(g),v=t("eventemitter3"),y=r(v),_=new l.Matrix,b=function(t){function e(n,r,a,s){i(this,e);var h=o(this,t.call(this));return(0,u.sayHello)(n),"number"==typeof r&&(r=Object.assign({width:r,height:a||d.default.RENDER_OPTIONS.height},s)),r=Object.assign({},d.default.RENDER_OPTIONS,r),h.options=r,h.type=c.RENDERER_TYPE.UNKNOWN,h.screen=new l.Rectangle(0,0,r.width,r.height),h.view=r.view||document.createElement("canvas"),h.resolution=r.resolution||d.default.RESOLUTION,h.transparent=r.transparent,h.autoResize=r.autoResize||!1,h.blendModes=null,h.preserveDrawingBuffer=r.preserveDrawingBuffer,h.clearBeforeRender=r.clearBeforeRender,h.roundPixels=r.roundPixels,h._backgroundColor=0,h._backgroundColorRgba=[0,0,0,0],h._backgroundColorString="#000000",h.backgroundColor=r.backgroundColor||h._backgroundColor,h._tempDisplayObjectParent=new f.default,h._lastObjectRendered=h._tempDisplayObjectParent,h}return a(e,t),e.prototype.resize=function(t,e){this.screen.width=t,this.screen.height=e,this.view.width=t*this.resolution,this.view.height=e*this.resolution,this.autoResize&&(this.view.style.width=t+"px",this.view.style.height=e+"px")},e.prototype.generateTexture=function(t,e,n){var r=t.getLocalBounds,i=m.default.create(0|r.width,0|r.height,e,n);return _.tx=-r.x,_.ty=-r.y,this.render(t,i,!1,_,!0),i},e.prototype.destroy=function(t){t&&this.view.parentNode&&this.view.parentNode.removeChild(this.view),this.type=c.RENDERER_TYPE.UNKNOWN,this.view=null,this.screen=null,this.resolution=0,this.transparent=!1,this.autoResize=!1,this.blendModes=null,this.options=null,this.preserveDrawingBuffer=!1,this.clearBeforeRender=!1,this.roundPixels=!1,this._backgroundColor=0,this._backgroundColorRgba=null,this._backgroundColorString=null,this.backgroundColor=0,this._tempDisplayObjectParent=null,this._lastObjectRendered=null},s(e,[{key:"width",get:function{return this.view.width}},{key:"height",get:function{return this.view.height}},{key:"backgroundColor",get:function{return this._backgroundColor},set:function(t){this._backgroundColor=t,this._backgroundColorString=(0,u.hex2string)(t),(0,u.hex2rgb)(t,this._backgroundColorRgba)}}]),e}(y.default);n.default=b},{"../const":46,"../display/Container":48,"../math":70,"../settings":101,"../textures/RenderTexture":113,"../utils":124,eventemitter3:3}],77:[function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}n.__esModule=!0;var s=t("../SystemRenderer"),u=r(s),l=t("./utils/CanvasMaskManager"),c=r(l),h=t("./utils/CanvasRenderTarget"),d=r(h),p=t("./utils/mapCanvasBlendModesToPixi"),f=r(p),g=t("../../utils"),m=t("../../const"),v=t("../../settings"),y=r(v),_=function(t){function e(n,r,a){i(this,e);var s=o(this,t.call(this,"Canvas",n,r,a));return s.type=m.RENDERER_TYPE.CANVAS,s.rootContext=s.view.getContext("2d",{alpha:s.transparent}),s.refresh=!0,s.maskManager=new c.default(s),s.smoothProperty="imageSmoothingEnabled",s.rootContext.imageSmoothingEnabled||(s.rootContext.webkitImageSmoothingEnabled?s.smoothProperty="webkitImageSmoothingEnabled":s.rootContext.mozImageSmoothingEnabled?s.smoothProperty="mozImageSmoothingEnabled":s.rootContext.oImageSmoothingEnabled?s.smoothProperty="oImageSmoothingEnabled":s.rootContext.msImageSmoothingEnabled&&(s.smoothProperty="msImageSmoothingEnabled")),s.initPlugins,s.blendModes=(0,f.default),s._activeBlendMode=null,s.context=null,s.renderingToScreen=!1,s.resize(s.options.width,s.options.height),s}return a(e,t),e.prototype.render=function(t,e,n,r,i){if(this.view){this.renderingToScreen=!e,this.emit("prerender");var o=this.resolution;e?(e=e.baseTexture||e,e._canvasRenderTarget||(e._canvasRenderTarget=new d.default(e.width,e.height,e.resolution),e.source=e._canvasRenderTarget.canvas,e.valid=!0),this.context=e._canvasRenderTarget.context,this.resolution=e._canvasRenderTarget.resolution):this.context=this.rootContext;var a=this.context;if(e||(this._lastObjectRendered=t),!i){var s=t.parent,u=this._tempDisplayObjectParent.transform.worldTransform;r?(r.copy(u),this._tempDisplayObjectParent.transform._worldID=-1):u.identity,t.parent=this._tempDisplayObjectParent,t.updateTransform,t.parent=s}a.setTransform(1,0,0,1,0,0),a.globalAlpha=1,a.globalCompositeOperation=this.blendModes[m.BLEND_MODES.NORMAL],navigator.isCocoonJS&&this.view.screencanvas&&(a.fillStyle="black",a.clear),(void 0!==n?n:this.clearBeforeRender)&&this.renderingToScreen&&(this.transparent?a.clearRect(0,0,this.width,this.height):(a.fillStyle=this._backgroundColorString,a.fillRect(0,0,this.width,this.height)));var l=this.context;this.context=a,t.renderCanvas(this),this.context=l,this.resolution=o,this.emit("postrender")}},e.prototype.clear=function(t){var e=this.context;t=t||this._backgroundColorString,!this.transparent&&t?(e.fillStyle=t,e.fillRect(0,0,this.width,this.height)):e.clearRect(0,0,this.width,this.height)},e.prototype.setBlendMode=function(t){this._activeBlendMode!==t&&(this._activeBlendMode=t,this.context.globalCompositeOperation=this.blendModes[t])},e.prototype.destroy=function(e){this.destroyPlugins,t.prototype.destroy.call(this,e),this.context=null,this.refresh=!0,this.maskManager.destroy,this.maskManager=null,this.smoothProperty=null},e.prototype.resize=function(e,n){t.prototype.resize.call(this,e,n),this.smoothProperty&&(this.rootContext[this.smoothProperty]=y.default.SCALE_MODE===m.SCALE_MODES.LINEAR)},e}(u.default);n.default=_,g.pluginTarget.mixin(_)},{"../../const":46,"../../settings":101,"../../utils":124,"../SystemRenderer":76,"./utils/CanvasMaskManager":78,"./utils/CanvasRenderTarget":79,"./utils/mapCanvasBlendModesToPixi":81}],78:[function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}n.__esModule=!0;var i=t("../../../const"),o=function{function t(e){r(this,t),this.renderer=e}return t.prototype.pushMask=function(t){var e=this.renderer;e.context.save;var n=t.alpha,r=t.transform.worldTransform,i=e.resolution;e.context.setTransform(r.a*i,r.b*i,r.c*i,r.d*i,r.tx*i,r.ty*i),t._texture||(this.renderGraphicsShape(t),e.context.clip),t.worldAlpha=n},t.prototype.renderGraphicsShape=function(t){var e=this.renderer.context,n=t.graphicsData.length;if(0!==n){e.beginPath;for(var r=0;r<n;r++){var o=t.graphicsData[r],a=o.shape;if(o.type===i.SHAPES.POLY){var s=a.points;e.moveTo(s[0],s[1]);for(var u=1;u<s.length/2;u++)e.lineTo(s[2*u],s[2*u+1]);s[0]===s[s.length-2]&&s[1]===s[s.length-1]&&e.closePath}else if(o.type===i.SHAPES.RECT)e.rect(a.x,a.y,a.width,a.height),e.closePath;else if(o.type===i.SHAPES.CIRC)e.arc(a.x,a.y,a.radius,0,2*Math.PI),e.closePath;else if(o.type===i.SHAPES.ELIP){var l=2*a.width,c=2*a.height,h=a.x-l/2,d=a.y-c/2,p=l/2*.5522848,f=c/2*.5522848,g=h+l,m=d+c,v=h+l/2,y=d+c/2;e.moveTo(h,y),e.bezierCurveTo(h,y-f,v-p,d,v,d),e.bezierCurveTo(v+p,d,g,y-f,g,y),e.bezierCurveTo(g,y+f,v+p,m,v,m),e.bezierCurveTo(v-p,m,h,y+f,h,y),e.closePath}else if(o.type===i.SHAPES.RREC){var _=a.x,b=a.y,x=a.width,w=a.height,T=a.radius,S=Math.min(x,w)/2|0;T=T>S?S:T,e.moveTo(_,b+T),e.lineTo(_,b+w-T),e.quadraticCurveTo(_,b+w,_+T,b+w),e.lineTo(_+x-T,b+w),e.quadraticCurveTo(_+x,b+w,_+x,b+w-T),e.lineTo(_+x,b+T),e.quadraticCurveTo(_+x,b,_+x-T,b),e.lineTo(_+T,b),e.quadraticCurveTo(_,b,_,b+T),e.closePath}}}},t.prototype.popMask=function(t){t.context.restore},t.prototype.destroy=function{},t};n.default=o},{"../../../const":46}],79:[function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}n.__esModule=!0;var i=function{function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}},o=t("../../../settings"),a=function(t){return t&&t.__esModule?t:{default:t}}(o),s=function{function t(e,n,i){r(this,t),this.canvas=document.createElement("canvas"),this.context=this.canvas.getContext("2d"),this.resolution=i||a.default.RESOLUTION,this.resize(e,n)}return t.prototype.clear=function{this.context.setTransform(1,0,0,1,0,0),this.context.clearRect(0,0,this.canvas.width,this.canvas.height)},t.prototype.resize=function(t,e){this.canvas.width=t*this.resolution,this.canvas.height=e*this.resolution},t.prototype.destroy=function{this.context=null,this.canvas=null},i(t,[{key:"width",get:function{return this.canvas.width},set:function(t){this.canvas.width=t}},{key:"height",get:function{return this.canvas.height},set:function(t){this.canvas.height=t}}]),t};n.default=s},{"../../../settings":101}],80:[function(t,e,n){"use strict";function r(t){var e=document.createElement("canvas");e.width=6,e.height=1;var n=e.getContext("2d");return n.fillStyle=t,n.fillRect(0,0,6,1),e}function i{if("undefined"==typeof document)return!1;var t=r("#ff00ff"),e=r("#ffff00"),n=document.createElement("canvas");n.width=6,n.height=1;var i=n.getContext("2d");i.globalCompositeOperation="multiply",i.drawImage(t,0,0),i.drawImage(e,2,0);var o=i.getImageData(2,0,1,1);if(!o)return!1;var a=o.data;return 255===a[0]&&0===a[1]&&0===a[2]}n.__esModule=!0,n.default=i},{}],81:[function(t,e,n){"use strict";function r{var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return(0,a.default)?(t[i.BLEND_MODES.NORMAL]="source-over",t[i.BLEND_MODES.ADD]="lighter",t[i.BLEND_MODES.MULTIPLY]="multiply",t[i.BLEND_MODES.SCREEN]="screen",t[i.BLEND_MODES.OVERLAY]="overlay",t[i.BLEND_MODES.DARKEN]="darken",t[i.BLEND_MODES.LIGHTEN]="lighten",t[i.BLEND_MODES.COLOR_DODGE]="color-dodge",t[i.BLEND_MODES.COLOR_BURN]="color-burn",t[i.BLEND_MODES.HARD_LIGHT]="hard-light",t[i.BLEND_MODES.SOFT_LIGHT]="soft-light",t[i.BLEND_MODES.DIFFERENCE]="difference",t[i.BLEND_MODES.EXCLUSION]="exclusion",t[i.BLEND_MODES.HUE]="hue",t[i.BLEND_MODES.SATURATION]="saturate",t[i.BLEND_MODES.COLOR]="color",t[i.BLEND_MODES.LUMINOSITY]="luminosity"):(t[i.BLEND_MODES.NORMAL]="source-over",t[i.BLEND_MODES.ADD]="lighter",t[i.BLEND_MODES.MULTIPLY]="source-over",t[i.BLEND_MODES.SCREEN]="source-over",t[i.BLEND_MODES.OVERLAY]="source-over",t[i.BLEND_MODES.DARKEN]="source-over",t[i.BLEND_MODES.LIGHTEN]="source-over",t[i.BLEND_MODES.COLOR_DODGE]="source-over",t[i.BLEND_MODES.COLOR_BURN]="source-over",t[i.BLEND_MODES.HARD_LIGHT]="source-over",t[i.BLEND_MODES.SOFT_LIGHT]="source-over",t[i.BLEND_MODES.DIFFERENCE]="source-over",t[i.BLEND_MODES.EXCLUSION]="source-over",t[i.BLEND_MODES.HUE]="source-over",t[i.BLEND_MODES.SATURATION]="source-over",t[i.BLEND_MODES.COLOR]="source-over",t[i.BLEND_MODES.LUMINOSITY]="source-over"),t[i.BLEND_MODES.NORMAL_NPM]=t[i.BLEND_MODES.NORMAL],t[i.BLEND_MODES.ADD_NPM]=t[i.BLEND_MODES.ADD],t[i.BLEND_MODES.SCREEN_NPM]=t[i.BLEND_MODES.SCREEN],t}n.__esModule=!0,n.default=r;var i=t("../../../const"),o=t("./canUseNewCanvasBlendModes"),a=function(t){return t&&t.__esModule?t:{default:t}}(o)},{"../../../const":46,"./canUseNewCanvasBlendModes":80}],82:[function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}n.__esModule=!0;var i=t("../../const"),o=t("../../settings"),a=function(t){return t&&t.__esModule?t:{default:t}}(o),s=function{function t(e){r(this,t),this.renderer=e,this.count=0,this.checkCount=0,this.maxIdle=a.default.GC_MAX_IDLE,this.checkCountMax=a.default.GC_MAX_CHECK_COUNT,this.mode=a.default.GC_MODE}return t.prototype.update=function{this.count++,this.mode!==i.GC_MODES.MANUAL&&++this.checkCount>this.checkCountMax&&(this.checkCount=0,this.run)},t.prototype.run=function{for(var t=this.renderer.textureManager,e=t._managedTextures,n=!1,r=0;r<e.length;r++){var i=e[r];!i._glRenderTargets&&this.count-i.touched>this.maxIdle&&(t.destroyTexture(i,!0),e[r]=null,n=!0)}if(n){for(var o=0,a=0;a<e.length;a++)null!==e[a]&&(e[o++]=e[a]);e.length=o}},t.prototype.unload=function(t){var e=this.renderer.textureManager;t._texture&&t._texture._glRenderTargets&&e.destroyTexture(t._texture,!0);for(var n=t.children.length-1;n>=0;n--)this.unload(t.children[n])},t};n.default=s},{"../../const":46,"../../settings":101}],83:[function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}n.__esModule=!0;var i=t("pixi-gl-core"),o=t("../../const"),a=t("./utils/RenderTarget"),s=function(t){return t&&t.__esModule?t:{default:t}}(a),u=t("../../utils"),l=function{function t(e){r(this,t),this.renderer=e,this.gl=e.gl,this._managedTextures=[]}return t.prototype.bindTexture=function{},t.prototype.getTexture=function{},t.prototype.updateTexture=function(t,e){var n=this.gl,r=!!t._glRenderTargets;if(!t.hasLoaded)return null;var a=this.renderer.boundTextures;if(void 0===e){e=0;for(var u=0;u<a.length;++u)if(a[u]===t){e=u;break}}a[e]=t,n.activeTexture(n.TEXTURE0+e);var l=t._glTextures[this.renderer.CONTEXT_UID];if(l)r?t._glRenderTargets[this.renderer.CONTEXT_UID].resize(t.width,t.height):l.upload(t.source);else{if(r){var c=new s.default(this.gl,t.width,t.height,t.scaleMode,t.resolution);c.resize(t.width,t.height),t._glRenderTargets[this.renderer.CONTEXT_UID]=c,l=c.texture}else l=new i.GLTexture(this.gl,null,null,null,null),l.bind(e),l.premultiplyAlpha=!0,l.upload(t.source);t._glTextures[this.renderer.CONTEXT_UID]=l,t.on("update",this.updateTexture,this),t.on("dispose",this.destroyTexture,this),this._managedTextures.push(t),t.isPowerOfTwo?(t.mipmap&&l.enableMipmap,t.wrapMode===o.WRAP_MODES.CLAMP?l.enableWrapClamp:t.wrapMode===o.WRAP_MODES.REPEAT?l.enableWrapRepeat:l.enableWrapMirrorRepeat):l.enableWrapClamp,t.scaleMode===o.SCALE_MODES.NEAREST?l.enableNearestScaling:l.enableLinearScaling}return l},t.prototype.destroyTexture=function(t,e){if(t=t.baseTexture||t,t.hasLoaded&&t._glTextures[this.renderer.CONTEXT_UID]&&(this.renderer.unbindTexture(t),t._glTextures[this.renderer.CONTEXT_UID].destroy,t.off("update",this.updateTexture,this),t.off("dispose",this.destroyTexture,this),delete t._glTextures[this.renderer.CONTEXT_UID],!e)){var n=this._managedTextures.indexOf(t);-1!==n&&(0,u.removeItems)(this._managedTextures,n,1)}},t.prototype.removeAll=function{for(var t=0;t<this._managedTextures.length;++t){var e=this._managedTextures[t];e._glTextures[this.renderer.CONTEXT_UID]&&delete e._glTextures[this.renderer.CONTEXT_UID]}},t.prototype.destroy=function{for(var t=0;t<this._managedTextures.length;++t){var e=this._managedTextures[t];this.destroyTexture(e,!0),e.off("update",this.updateTexture,this),e.off("dispose",this.destroyTexture,this)}this._managedTextures=null},t};n.default=l},{"../../const":46,"../../utils":124,"./utils/RenderTarget":96,"pixi-gl-core":15}],84:[function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}n.__esModule=!0;var s=t("../SystemRenderer"),u=r(s),l=t("./managers/MaskManager"),c=r(l),h=t("./managers/StencilManager"),d=r(h),p=t("./managers/FilterManager"),f=r(p),g=t("./utils/RenderTarget"),m=r(g),v=t("./utils/ObjectRenderer"),y=r(v),_=t("./TextureManager"),b=r(_),x=t("../../textures/BaseTexture"),w=r(x),T=t("./TextureGarbageCollector"),S=r(T),E=t("./WebGLState"),P=r(E),M=t("./utils/mapWebGLDrawModesToPixi"),C=r(M),A=t("./utils/validateContext"),O=r(A),I=t("../../utils"),k=t("pixi-gl-core"),R=r(k),D=t("../../const"),L=0,j=function(t){function e(n,r,a){i(this,e);var s=o(this,t.call(this,"WebGL",n,r,a));return s.legacy=s.options.legacy,s.legacy&&(R.default.VertexArrayObject.FORCE_NATIVE=!0),s.type=D.RENDERER_TYPE.WEBGL,s.handleContextLost=s.handleContextLost.bind(s),s.handleContextRestored=s.handleContextRestored.bind(s),s.view.addEventListener("webglcontextlost",s.handleContextLost,!1),s.view.addEventListener("webglcontextrestored",s.handleContextRestored,!1),s._contextOptions={alpha:s.transparent,antialias:s.options.antialias,premultipliedAlpha:s.transparent&&"notMultiplied"!==s.transparent,stencil:!0,preserveDrawingBuffer:s.options.preserveDrawingBuffer},s._backgroundColorRgba[3]=s.transparent?0:1,s.maskManager=new c.default(s),s.stencilManager=new d.default(s),s.emptyRenderer=new y.default(s),s.currentRenderer=s.emptyRenderer,s.initPlugins,s.options.context&&(0,O.default)(s.options.context),s.gl=s.options.context||R.default.createContext(s.view,s._contextOptions),s.CONTEXT_UID=L++,s.state=new P.default(s.gl),s.renderingToScreen=!0,s.boundTextures=null,s._activeShader=null,s._activeVao=null,s._activeRenderTarget=null,s._initContext,s.filterManager=new f.default(s),s.drawModes=(0,C.default)(s.gl),s._nextTextureLocation=0,s.setBlendMode(0),s}return a(e,t),e.prototype._initContext=function{var t=this.gl;t.isContextLost&&t.getExtension("WEBGL_lose_context")&&t.getExtension("WEBGL_lose_context").restoreContext;var e=t.getParameter(t.MAX_TEXTURE_IMAGE_UNITS);this._activeShader=null,this._activeVao=null,this.boundTextures=new Array(e),this.emptyTextures=new Array(e),this.textureManager=new b.default(this),this.textureGC=new S.default(this),this.state.resetToDefault,this.rootRenderTarget=new m.default(t,this.width,this.height,null,this.resolution,!0),this.rootRenderTarget.clearColor=this._backgroundColorRgba,this.bindRenderTarget(this.rootRenderTarget);var n=new R.default.GLTexture.fromData(t,null,1,1),r={_glTextures:{}};r._glTextures[this.CONTEXT_UID]={};for(var i=0;i<e;i++){var o=new w.default;o._glTextures[this.CONTEXT_UID]=n,this.boundTextures[i]=r,this.emptyTextures[i]=o,this.bindTexture(null,i)}this.emit("context",t),this.resize(this.screen.width,this.screen.height)},e.prototype.render=function(t,e,n,r,i){if(this.renderingToScreen=!e,this.emit("prerender"),this.gl&&!this.gl.isContextLost){if(this._nextTextureLocation=0,e||(this._lastObjectRendered=t),!i){var o=t.parent;t.parent=this._tempDisplayObjectParent,t.updateTransform,t.parent=o}this.bindRenderTexture(e,r),this.currentRenderer.start,(void 0!==n?n:this.clearBeforeRender)&&this._activeRenderTarget.clear,t.renderWebGL(this),this.currentRenderer.flush,this.textureGC.update,this.emit("postrender")}},e.prototype.setObjectRenderer=function(t){this.currentRenderer!==t&&(this.currentRenderer.stop,this.currentRenderer=t,this.currentRenderer.start)},e.prototype.flush=function{this.setObjectRenderer(this.emptyRenderer)},e.prototype.resize=function(t,e){u.default.prototype.resize.call(this,t,e),this.rootRenderTarget.resize(t,e),this._activeRenderTarget===this.rootRenderTarget&&(this.rootRenderTarget.activate,this._activeShader&&(this._activeShader.uniforms.projectionMatrix=this.rootRenderTarget.projectionMatrix.toArray(!0)))},e.prototype.setBlendMode=function(t){this.state.setBlendMode(t)},e.prototype.clear=function(t){this._activeRenderTarget.clear(t)},e.prototype.setTransform=function(t){this._activeRenderTarget.transform=t},e.prototype.clearRenderTexture=function(t,e){var n=t.baseTexture,r=n._glRenderTargets[this.CONTEXT_UID];return r&&r.clear(e),this},e.prototype.bindRenderTexture=function(t,e){var n=void 0;if(t){var r=t.baseTexture;r._glRenderTargets[this.CONTEXT_UID]||this.textureManager.updateTexture(r,0),this.unbindTexture(r),n=r._glRenderTargets[this.CONTEXT_UID],n.setFrame(t.frame)}else n=this.rootRenderTarget;return n.transform=e,this.bindRenderTarget(n),this},e.prototype.bindRenderTarget=function(t){return t!==this._activeRenderTarget&&(this._activeRenderTarget=t,t.activate,this._activeShader&&(this._activeShader.uniforms.projectionMatrix=t.projectionMatrix.toArray(!0)),this.stencilManager.setMaskStack(t.stencilMaskStack)),this},e.prototype.bindShader=function(t,e){return this._activeShader!==t&&(this._activeShader=t,t.bind,!1!==e&&(t.uniforms.projectionMatrix=this._activeRenderTarget.projectionMatrix.toArray(!0))),this},e.prototype.bindTexture=function(t,e,n){if(t=t||this.emptyTextures[e],t=t.baseTexture||t,t.touched=this.textureGC.count,n)e=e||0;else{for(var r=0;r<this.boundTextures.length;r++)if(this.boundTextures[r]===t)return r;void 0===e&&(this._nextTextureLocation++,this._nextTextureLocation%=this.boundTextures.length,e=this.boundTextures.length-this._nextTextureLocation-1)}var i=this.gl,o=t._glTextures[this.CONTEXT_UID];return o?(this.boundTextures[e]=t,i.activeTexture(i.TEXTURE0+e),i.bindTexture(i.TEXTURE_2D,o.texture)):this.textureManager.updateTexture(t,e),e},e.prototype.unbindTexture=function(t){var e=this.gl;t=t.baseTexture||t;for(var n=0;n<this.boundTextures.length;n++)this.boundTextures[n]===t&&(this.boundTextures[n]=this.emptyTextures[n],e.activeTexture(e.TEXTURE0+n),e.bindTexture(e.TEXTURE_2D,this.emptyTextures[n]._glTextures[this.CONTEXT_UID].texture));return this},e.prototype.createVao=function{return new R.default.VertexArrayObject(this.gl,this.state.attribState)},e.prototype.bindVao=function(t){return this._activeVao===t?this:(t?t.bind:this._activeVao&&this._activeVao.unbind,this._activeVao=t,this)},e.prototype.reset=function{return this.setObjectRenderer(this.emptyRenderer),this._activeShader=null,this._activeRenderTarget=this.rootRenderTarget,this.rootRenderTarget.activate,this.state.resetToDefault,this},e.prototype.handleContextLost=function(t){t.preventDefault},e.prototype.handleContextRestored=function{this.textureManager.removeAll,this._initContext},e.prototype.destroy=function(e){this.destroyPlugins,this.view.removeEventListener("webglcontextlost",this.handleContextLost),this.view.removeEventListener("webglcontextrestored",this.handleContextRestored),this.textureManager.destroy,t.prototype.destroy.call(this,e),this.uid=0,this.maskManager.destroy,this.stencilManager.destroy,this.filterManager.destroy,this.maskManager=null,this.filterManager=null,this.textureManager=null,this.currentRenderer=null,this.handleContextLost=null,this.handleContextRestored=null,this._contextOptions=null,this.gl.useProgram(null),this.gl.getExtension("WEBGL_lose_context")&&this.gl.getExtension("WEBGL_lose_context").loseContext,this.gl=null},e}(u.default);n.default=j,I.pluginTarget.mixin(j)},{"../../const":46,"../../textures/BaseTexture":112,"../../utils":124,"../SystemRenderer":76,"./TextureGarbageCollector":82,"./TextureManager":83,"./WebGLState":85,"./managers/FilterManager":90,"./managers/MaskManager":91,"./managers/StencilManager":92,"./utils/ObjectRenderer":94,"./utils/RenderTarget":96,"./utils/mapWebGLDrawModesToPixi":99,"./utils/validateContext":100,"pixi-gl-core":15}],85:[function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}n.__esModule=!0;var i=t("./utils/mapWebGLBlendModesToPixi"),o=function(t){return t&&t.__esModule?t:{default:t}}(i),a=function{function t(e){r(this,t),this.activeState=new Uint8Array(16),this.defaultState=new Uint8Array(16),this.defaultState[0]=1,this.stackIndex=0,this.stack=[],this.gl=e,this.maxAttribs=e.getParameter(e.MAX_VERTEX_ATTRIBS),this.attribState={tempAttribState:new Array(this.maxAttribs),attribState:new Array(this.maxAttribs)},this.blendModes=(0,o.default)(e),this.nativeVaoExtension=e.getExtension("OES_vertex_array_object")||e.getExtension("MOZ_OES_vertex_array_object")||e.getExtension("WEBKIT_OES_vertex_array_object")}return t.prototype.push=function{var t=this.stack[this.stackIndex];t||(t=this.stack[this.stackIndex]=new Uint8Array(16)),++this.stackIndex;for(var e=0;e<this.activeState.length;e++)t[e]=this.activeState[e]},t.prototype.pop=function{var t=this.stack[--this.stackIndex];this.setState(t)},t.prototype.setState=function(t){this.setBlend(t[0]),this.setDepthTest(t[1]),this.setFrontFace(t[2]),this.setCullFace(t[3]),this.setBlendMode(t[4])},t.prototype.setBlend=function(t){t=t?1:0,this.activeState[0]!==t&&(this.activeState[0]=t,this.gl[t?"enable":"disable"](this.gl.BLEND))},t.prototype.setBlendMode=function(t){if(t!==this.activeState[4]){this.activeState[4]=t;var e=this.blendModes[t];2===e.length?this.gl.blendFunc(e[0],e[1]):this.gl.blendFuncSeparate(e[0],e[1],e[2],e[3])}},t.prototype.setDepthTest=function(t){t=t?1:0,this.activeState[1]!==t&&(this.activeState[1]=t,this.gl[t?"enable":"disable"](this.gl.DEPTH_TEST))},t.prototype.setCullFace=function(t){t=t?1:0,this.activeState[3]!==t&&(this.activeState[3]=t,this.gl[t?"enable":"disable"](this.gl.CULL_FACE))},t.prototype.setFrontFace=function(t){t=t?1:0,this.activeState[2]!==t&&(this.activeState[2]=t,this.gl.frontFace(this.gl[t?"CW":"CCW"]))},t.prototype.resetAttributes=function{for(var t=0;t<this.attribState.tempAttribState.length;t++)this.attribState.tempAttribState[t]=0;for(var e=0;e<this.attribState.attribState.length;e++)this.attribState.attribState[e]=0;for(var n=1;n<this.maxAttribs;n++)this.gl.disableVertexAttribArray(n)},t.prototype.resetToDefault=function{this.nativeVaoExtension&&this.nativeVaoExtension.bindVertexArrayOES(null),this.resetAttributes;for(var t=0;t<this.activeState.length;++t)this.activeState[t]=32;this.gl.pixelStorei(this.gl.UNPACK_FLIP_Y_WEBGL,!1),this.setState(this.defaultState)},t};n.default=a},{"./utils/mapWebGLBlendModesToPixi":98}],86:[function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}n.__esModule=!0;var o=function{function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}},a=t("./extractUniformsFromSrc"),s=r(a),u=t("../../../utils"),l=t("../../../const"),c=t("../../../settings"),h=r(c),d={},p=function{function t(e,n,r){i(this,t),this.vertexSrc=e||t.defaultVertexSrc,this.fragmentSrc=n||t.defaultFragmentSrc,this.blendMode=l.BLEND_MODES.NORMAL,this.uniformData=r||(0,s.default)(this.vertexSrc,this.fragmentSrc,"projectionMatrix|uSampler"),this.uniforms={};for(var o in this.uniformData)this.uniforms[o]=this.uniformData[o].value;this.glShaders={},d[this.vertexSrc+this.fragmentSrc]||(d[this.vertexSrc+this.fragmentSrc]=(0,u.uid)),this.glShaderKey=d[this.vertexSrc+this.fragmentSrc],this.padding=4,this.resolution=h.default.RESOLUTION,this.enabled=!0,this.autoFit=!0}return t.prototype.apply=function(t,e,n,r,i){t.applyFilter(this,e,n,r)},o(t,null,[{key:"defaultVertexSrc",get:function{return["attribute vec2 aVertexPosition;","attribute vec2 aTextureCoord;","uniform mat3 projectionMatrix;","uniform mat3 filterMatrix;","varying vec2 vTextureCoord;","varying vec2 vFilterCoord;","void main(void){","   gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);","   vFilterCoord = ( filterMatrix * vec3( aTextureCoord, 1.0)  ).xy;","   vTextureCoord = aTextureCoord ;","}"].join("\n")}},{key:"defaultFragmentSrc",get:function{return["varying vec2 vTextureCoord;","varying vec2 vFilterCoord;","uniform sampler2D uSampler;","uniform sampler2D filterSampler;","void main(void){","   vec4 masky = texture2D(filterSampler, vFilterCoord);","   vec4 sample = texture2D(uSampler, vTextureCoord);","   vec4 color;","   if(mod(vFilterCoord.x, 1.0) > 0.5)","   {","     color = vec4(1.0, 0.0, 0.0, 1.0);","   }","   else","   {","     color = vec4(0.0, 1.0, 0.0, 1.0);","   }","   gl_FragColor = mix(sample, masky, 0.5);","   gl_FragColor *= sample.a;","}"].join("\n")}}]),t};n.default=p},{"../../../const":46,"../../../settings":101,"../../../utils":124,"./extractUniformsFromSrc":87}],87:[function(t,e,n){"use strict";function r(t,e,n){var r=i(t),o=i(e);return Object.assign(r,o)}function i(t){for(var e=new RegExp("^(projectionMatrix|uSampler|filterArea|filterClamp)$"),n={},r=void 0,i=t.replace(/\s+/g," ").split(/\s*;\s*/),o=0;o<i.length;o++){var a=i[o].trim;if(a.indexOf("uniform")>-1){var u=a.split(" "),l=u[1],c=u[2],h=1;c.indexOf("[")>-1&&(r=c.split(/\[|]/),c=r[0],h*=Number(r[1])),c.match(e)||(n[c]={value:s(l,h),name:c,type:l})}}return n}n.__esModule=!0,n.default=r;var o=t("pixi-gl-core"),a=function(t){return t&&t.__esModule?t:{default:t}}(o),s=a.default.shader.defaultValue},{"pixi-gl-core":15}],88:[function(t,e,n){"use strict";function r(t,e,n){var r=t.identity;return r.translate(e.x/n.width,e.y/n.height),r.scale(n.width,n.height),r}function i(t,e,n){var r=t.identity;r.translate(e.x/n.width,e.y/n.height);var i=n.width/e.width,o=n.height/e.height;return r.scale(i,o),r}function o(t,e,n,r){var i=r.worldTransform.copy(a.Matrix.TEMP_MATRIX),o=r._texture.baseTexture,s=t.identity,u=n.height/n.width;s.translate(e.x/n.width,e.y/n.height),s.scale(1,u);var l=n.width/o.width,c=n.height/o.height;return i.tx/=o.width*l,i.ty/=o.width*l,i.invert,s.prepend(i),s.scale(1,1/u),s.scale(l,c),s.translate(r.anchor.x,r.anchor.y),s}n.__esModule=!0,n.calculateScreenSpaceMatrix=r,n.calculateNormalizedScreenSpaceMatrix=i,n.calculateSpriteMatrix=o;var a=t("../../../math")},{"../../../math":70}],89:[function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}n.__esModule=!0;var a=t("../Filter"),s=function(t){return t&&t.__esModule?t:{default:t}}(a),u=t("../../../../math"),l=(t("path"),function(t){function e(n){r(this,e);var o=new u.Matrix,a=i(this,t.call(this,"attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\nuniform mat3 otherMatrix;\n\nvarying vec2 vMaskCoord;\nvarying vec2 vTextureCoord;\n\nvoid main(void)\n{\n    gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n\n    vTextureCoord = aTextureCoord;\n    vMaskCoord = ( otherMatrix * vec3( aTextureCoord, 1.0)  ).xy;\n}\n","varying vec2 vMaskCoord;\nvarying vec2 vTextureCoord;\n\nuniform sampler2D uSampler;\nuniform float alpha;\nuniform sampler2D mask;\n\nvoid main(void)\n{\n    // check clip! this will stop the mask bleeding out from the edges\n   vec2 text = abs( vMaskCoord - 0.5 );\n    text = step(0.5, text);\n\n    float clip = 1.0 - max(text.y, text.x);\n    vec4 original = texture2D(uSampler, vTextureCoord);\n    vec4 masky = texture2D(mask, vMaskCoord);\n\n    original *= (masky.r * masky.a * alpha * clip);\n\n    gl_FragColor = original;\n}\n"));return n.renderable=!1,a.maskSprite=n,a.maskMatrix=o,a}return o(e,t),e.prototype.apply=function(t,e,n){var r=this.maskSprite;this.uniforms.mask=r._texture,this.uniforms.otherMatrix=t.calculateSpriteMatrix(this.maskMatrix,r),this.uniforms.alpha=r.worldAlpha,t.applyFilter(this,e,n)},e}(s.default));n.default=l},{"../../../../math":70,"../Filter":86,path:8}],90:[function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function a(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}n.__esModule=!0;var s=t("./WebGLManager"),u=r(s),l=t("../utils/RenderTarget"),c=r(l),h=t("../utils/Quad"),d=r(h),p=t("../../../math"),f=t("../../../Shader"),g=r(f),m=t("../filters/filterTransforms"),v=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(m),y=t("bit-twiddle"),_=r(y),b=function t{a(this,t),this.renderTarget=null,this.sourceFrame=new p.Rectangle,this.destinationFrame=new p.Rectangle,this.filters=[],this.target=null,this.resolution=1},x=function(t){function e(n){a(this,e);var r=i(this,t.call(this,n));return r.gl=r.renderer.gl,r.quad=new d.default(r.gl,n.state.attribState),r.shaderCache={},r.pool={},r.filterData=null,r}return o(e,t),e.prototype.pushFilter=function(t,e){var n=this.renderer,r=this.filterData;if(!r){r=this.renderer._activeRenderTarget.filterStack;var i=new b;i.sourceFrame=i.destinationFrame=this.renderer._activeRenderTarget.size,i.renderTarget=n._activeRenderTarget,this.renderer._activeRenderTarget.filterData=r={index:0,stack:[i]},this.filterData=r}var o=r.stack[++r.index];o||(o=r.stack[r.index]=new b);var a=e[0].resolution,s=0|e[0].padding,u=t.filterArea||t.getBounds(!0),l=o.sourceFrame,c=o.destinationFrame;l.x=(u.x*a|0)/a,l.y=(u.y*a|0)/a,l.width=(u.width*a|0)/a,l.height=(u.height*a|0)/a,r.stack[0].renderTarget.transform||e[0].autoFit&&l.fit(r.stack[0].destinationFrame),l.pad(s),c.width=l.width,c.height=l.height;var h=this.getPotRenderTarget(n.gl,l.width,l.height,a);o.target=t,o.filters=e,o.resolution=a,o.renderTarget=h,h.setFrame(c,l),n.bindRenderTarget(h),h.clear},e.prototype.popFilter=function{var t=this.filterData,e=t.stack[t.index-1],n=t.stack[t.index];this.quad.map(n.renderTarget.size,n.sourceFrame).upload;var r=n.filters;if(1===r.length)r[0].apply(this,n.renderTarget,e.renderTarget,!1,n),this.freePotRenderTarget(n.renderTarget);else{var i=n.renderTarget,o=this.getPotRenderTarget(this.renderer.gl,n.sourceFrame.width,n.sourceFrame.height,n.resolution);o.setFrame(n.destinationFrame,n.sourceFrame),o.clear;var a=0;for(a=0;a<r.length-1;++a){r[a].apply(this,i,o,!0,n);var s=i;i=o,o=s}r[a].apply(this,i,e.renderTarget,!1,n),this.freePotRenderTarget(i),this.freePotRenderTarget(o)}0===--t.index&&(this.filterData=null)},e.prototype.applyFilter=function(t,e,n,r){var i=this.renderer,o=i.gl,a=t.glShaders[i.CONTEXT_UID];a||(t.glShaderKey?(a=this.shaderCache[t.glShaderKey])||(a=new g.default(this.gl,t.vertexSrc,t.fragmentSrc),t.glShaders[i.CONTEXT_UID]=this.shaderCache[t.glShaderKey]=a):a=t.glShaders[i.CONTEXT_UID]=new g.default(this.gl,t.vertexSrc,t.fragmentSrc),i.bindVao(null),this.quad.initVao(a)),i.bindVao(this.quad.vao),i.bindRenderTarget(n),r&&(o.disable(o.SCISSOR_TEST),i.clear,o.enable(o.SCISSOR_TEST)),n===i.maskManager.scissorRenderTarget&&i.maskManager.pushScissorMask(null,i.maskManager.scissorData),i.bindShader(a);var s=this.renderer.emptyTextures[0];this.renderer.boundTextures[0]=s,this.syncUniforms(a,t),i.state.setBlendMode(t.blendMode),o.activeTexture(o.TEXTURE0),o.bindTexture(o.TEXTURE_2D,e.texture.texture),this.quad.vao.draw(this.renderer.gl.TRIANGLES,6,0),o.bindTexture(o.TEXTURE_2D,s._glTextures[this.renderer.CONTEXT_UID].texture)},e.prototype.syncUniforms=function(t,e){var n=e.uniformData,r=e.uniforms,i=1,o=void 0;if(t.uniforms.filterArea){o=this.filterData.stack[this.filterData.index];var a=t.uniforms.filterArea;a[0]=o.renderTarget.size.width,a[1]=o.renderTarget.size.height,a[2]=o.sourceFrame.x,a[3]=o.sourceFrame.y,t.uniforms.filterArea=a}if(t.uniforms.filterClamp){o=o||this.filterData.stack[this.filterData.index];var s=t.uniforms.filterClamp;s[0]=0,s[1]=0,s[2]=(o.sourceFrame.width-1)/o.renderTarget.size.width,s[3]=(o.sourceFrame.height-1)/o.renderTarget.size.height,t.uniforms.filterClamp=s}for(var u in n)if("sampler2D"===n[u].type&&0!==r[u]){if(r[u].baseTexture)t.uniforms[u]=this.renderer.bindTexture(r[u].baseTexture,i);else{t.uniforms[u]=i;var l=this.renderer.gl;this.renderer.boundTextures[i]=this.renderer.emptyTextures[i],l.activeTexture(l.TEXTURE0+i),r[u].texture.bind}i++}else if("mat3"===n[u].type)void 0!==r[u].a?t.uniforms[u]=r[u].toArray(!0):t.uniforms[u]=r[u];else if("vec2"===n[u].type)if(void 0!==r[u].x){var c=t.uniforms[u]||new Float32Array(2);c[0]=r[u].x,c[1]=r[u].y,t.uniforms[u]=c}else t.uniforms[u]=r[u];else"float"===n[u].type?t.uniforms.data[u].value!==n[u]&&(t.uniforms[u]=r[u]):t.uniforms[u]=r[u]},e.prototype.getRenderTarget=function(t,e){var n=this.filterData.stack[this.filterData.index],r=this.getPotRenderTarget(this.renderer.gl,n.sourceFrame.width,n.sourceFrame.height,e||n.resolution);return r.setFrame(n.destinationFrame,n.sourceFrame),r},e.prototype.returnRenderTarget=function(t){this.freePotRenderTarget(t)},e.prototype.calculateScreenSpaceMatrix=function(t){var e=this.filterData.stack[this.filterData.index];return v.calculateScreenSpaceMatrix(t,e.sourceFrame,e.renderTarget.size)},e.prototype.calculateNormalizedScreenSpaceMatrix=function(t){var e=this.filterData.stack[this.filterData.index];return v.calculateNormalizedScreenSpaceMatrix(t,e.sourceFrame,e.renderTarget.size,e.destinationFrame)},e.prototype.calculateSpriteMatrix=function(t,e){var n=this.filterData.stack[this.filterData.index];return v.calculateSpriteMatrix(t,n.sourceFrame,n.renderTarget.size,e)},e.prototype.destroy=function{this.shaderCache={},this.emptyPool},e.prototype.getPotRenderTarget=function(t,e,n,r){e=_.default.nextPow2(e*r),n=_.default.nextPow2(n*r);var i=(65535&e)<<16|65535&n;this.pool[i]||(this.pool[i]=[]);var o=this.pool[i].pop;if(!o){var a=this.renderer.boundTextures[0];t.activeTexture(t.TEXTURE0),o=new c.default(t,e,n,null,1),t.bindTexture(t.TEXTURE_2D,a._glTextures[this.renderer.CONTEXT_UID].texture)}return o.resolution=r,o.defaultFrame.width=o.size.width=e/r,o.defaultFrame.height=o.size.height=n/r,o},e.prototype.emptyPool=function{for(var t in this.pool){var e=this.pool[t];if(e)for(var n=0;n<e.length;n++)e[n].destroy(!0)}this.pool={}},e.prototype.freePotRenderTarget=function(t){var e=t.size.width*t.resolution,n=t.size.height*t.resolution,r=(65535&e)<<16|65535&n;this.pool[r].push(t)},e}(u.default);n.default=x},{"../../../Shader":44,"../../../math":70,"../filters/filterTransforms":88,"../utils/Quad":95,"../utils/RenderTarget":96,"./WebGLManager":93,"bit-twiddle":1}],91:[function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}n.__esModule=!0;var s=t("./WebGLManager"),u=r(s),l=t("../filters/spriteMask/SpriteMaskFilter"),c=r(l),h=function(t){function e(n){i(this,e);var r=o(this,t.call(this,n));return r.scissor=!1,r.scissorData=null,r.scissorRenderTarget=null,r.enableScissor=!0,r.alphaMaskPool=[],r.alphaMaskIndex=0,r}return a(e,t),e.prototype.pushMask=function(t,e){if(e.texture)this.pushSpriteMask(t,e);else if(this.enableScissor&&!this.scissor&&this.renderer._activeRenderTarget.root&&!this.renderer.stencilManager.stencilMaskStack.length&&e.isFastRect){var n=e.worldTransform,r=Math.atan2(n.b,n.a);r=Math.round(r*(180/Math.PI)),r%90?this.pushStencilMask(e):this.pushScissorMask(t,e)}else this.pushStencilMask(e)},e.prototype.popMask=function(t,e){e.texture?this.popSpriteMask(t,e):this.enableScissor&&!this.renderer.stencilManager.stencilMaskStack.length?this.popScissorMask(t,e):this.popStencilMask(t,e)},e.prototype.pushSpriteMask=function(t,e){var n=this.alphaMaskPool[this.alphaMaskIndex];n||(n=this.alphaMaskPool[this.alphaMaskIndex]=[new c.default(e)]),n[0].resolution=this.renderer.resolution,n[0].maskSprite=e,t.filterArea=e.getBounds(!0),this.renderer.filterManager.pushFilter(t,n),this.alphaMaskIndex++},e.prototype.popSpriteMask=function{this.renderer.filterManager.popFilter,this.alphaMaskIndex--},e.prototype.pushStencilMask=function(t){this.renderer.currentRenderer.stop,this.renderer.stencilManager.pushStencil(t)},e.prototype.popStencilMask=function{this.renderer.currentRenderer.stop,this.renderer.stencilManager.popStencil},e.prototype.pushScissorMask=function(t,e){e.renderable=!0;var n=this.renderer._activeRenderTarget,r=e.getBounds;r.fit(n.size),e.renderable=!1,this.renderer.gl.enable(this.renderer.gl.SCISSOR_TEST);var i=this.renderer.resolution;this.renderer.gl.scissor(r.x*i,(n.root?n.size.height-r.y-r.height:r.y)*i,r.width*i,r.height*i),this.scissorRenderTarget=n,this.scissorData=e,this.scissor=!0},e.prototype.popScissorMask=function{this.scissorRenderTarget=null,this.scissorData=null,this.scissor=!1;var t=this.renderer.gl;t.disable(t.SCISSOR_TEST)},e}(u.default);n.default=h},{"../filters/spriteMask/SpriteMaskFilter":89,"./WebGLManager":93}],92:[function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}n.__esModule=!0;var a=t("./WebGLManager"),s=function(t){return t&&t.__esModule?t:{default:t}}(a),u=function(t){function e(n){r(this,e);var o=i(this,t.call(this,n));return o.stencilMaskStack=null,o}return o(e,t),e.prototype.setMaskStack=function(t){this.stencilMaskStack=t;var e=this.renderer.gl;0===t.length?e.disable(e.STENCIL_TEST):e.enable(e.STENCIL_TEST)},e.prototype.pushStencil=function(t){this.renderer.setObjectRenderer(this.renderer.plugins.graphics),this.renderer._activeRenderTarget.attachStencilBuffer;var e=this.renderer.gl,n=this.stencilMaskStack;0===n.length&&(e.enable(e.STENCIL_TEST),e.clear(e.STENCIL_BUFFER_BIT),e.stencilFunc(e.ALWAYS,1,1)),n.push(t),e.colorMask(!1,!1,!1,!1),e.stencilOp(e.KEEP,e.KEEP,e.INCR),this.renderer.plugins.graphics.render(t),e.colorMask(!0,!0,!0,!0),e.stencilFunc(e.NOTEQUAL,0,n.length),e.stencilOp(e.KEEP,e.KEEP,e.KEEP)},e.prototype.popStencil=function{this.renderer.setObjectRenderer(this.renderer.plugins.graphics);var t=this.renderer.gl,e=this.stencilMaskStack,n=e.pop;0===e.length?t.disable(t.STENCIL_TEST):(t.colorMask(!1,!1,!1,!1),t.stencilOp(t.KEEP,t.KEEP,t.DECR),this.renderer.plugins.graphics.render(n),t.colorMask(!0,!0,!0,!0),t.stencilFunc(t.NOTEQUAL,0,e.length),t.stencilOp(t.KEEP,t.KEEP,t.KEEP))},e.prototype.destroy=function{s.default.prototype.destroy.call(this),this.stencilMaskStack.stencilStack=null},e}(s.default);n.default=u},{"./WebGLManager":93}],93:[function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}n.__esModule=!0;var i=function{function t(e){r(this,t),this.renderer=e,this.renderer.on("context",this.onContextChange,this)}return t.prototype.onContextChange=function{},t.prototype.destroy=function{this.renderer.off("context",this.onContextChange,this),this.renderer=null},t};n.default=i},{}],94:[function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}n.__esModule=!0;var a=t("../managers/WebGLManager"),s=function(t){return t&&t.__esModule?t:{default:t}}(a),u=function(t){function e{return r(this,e),i(this,t.apply(this,arguments))}return o(e,t),e.prototype.start=function{},e.prototype.stop=function{this.flush},e.prototype.flush=function{},e.prototype.render=function(t){},e}(s.default);n.default=u},{"../managers/WebGLManager":93}],95:[function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}n.__esModule=!0;var o=t("pixi-gl-core"),a=r(o),s=t("../../../utils/createIndicesForQuads"),u=r(s),l=function{function t(e,n){i(this,t),this.gl=e,this.vertices=new Float32Array([-1,-1,1,-1,1,1,-1,1]),this.uvs=new Float32Array([0,0,1,0,1,1,0,1]),this.interleaved=new Float32Array(16);for(var r=0;r<4;r++)this.interleaved[4*r]=this.vertices[2*r],this.interleaved[4*r+1]=this.vertices[2*r+1],this.interleaved[4*r+2]=this.uvs[2*r],this.interleaved[4*r+3]=this.uvs[2*r+1];this.indices=(0,u.default)(1),this.vertexBuffer=a.default.GLBuffer.createVertexBuffer(e,this.interleaved,e.STATIC_DRAW),this.indexBuffer=a.default.GLBuffer.createIndexBuffer(e,this.indices,e.STATIC_DRAW),this.vao=new a.default.VertexArrayObject(e,n)}return t.prototype.initVao=function(t){this.vao.clear.addIndex(this.indexBuffer).addAttribute(this.vertexBuffer,t.attributes.aVertexPosition,this.gl.FLOAT,!1,16,0).addAttribute(this.vertexBuffer,t.attributes.aTextureCoord,this.gl.FLOAT,!1,16,8)},t.prototype.map=function(t,e){var n=0,r=0;return this.uvs[0]=n,this.uvs[1]=r,this.uvs[2]=n+e.width/t.width,this.uvs[3]=r,this.uvs[4]=n+e.width/t.width,this.uvs[5]=r+e.height/t.height,this.uvs[6]=n,this.uvs[7]=r+e.height/t.height,n=e.x,r=e.y,this.vertices[0]=n,this.vertices[1]=r,this.vertices[2]=n+e.width,this.vertices[3]=r,this.vertices[4]=n+e.width,this.vertices[5]=r+e.height,this.vertices[6]=n,this.vertices[7]=r+e.height,this},t.prototype.upload=function{for(var t=0;t<4;t++)this.interleaved[4*t]=this.vertices[2*t],this.interleaved[4*t+1]=this.vertices[2*t+1],this.interleaved[4*t+2]=this.uvs[2*t],this.interleaved[4*t+3]=this.uvs[2*t+1];return this.vertexBuffer.upload(this.interleaved),this},t.prototype.destroy=function{var t=this.gl;t.deleteBuffer(this.vertexBuffer),t.deleteBuffer(this.indexBuffer)},t};n.default=l},{"../../../utils/createIndicesForQuads":122,"pixi-gl-core":15}],96:[function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}n.__esModule=!0;var i=t("../../../math"),o=t("../../../const"),a=t("../../../settings"),s=function(t){return t&&t.__esModule?t:{default:t}}(a),u=t("pixi-gl-core"),l=function{function t(e,n,a,l,c,h){r(this,t),this.gl=e,this.frameBuffer=null,this.texture=null,this.clearColor=[0,0,0,0],this.size=new i.Rectangle(0,0,1,1),this.resolution=c||s.default.RESOLUTION,this.projectionMatrix=new i.Matrix,this.transform=null,this.frame=null,this.defaultFrame=new i.Rectangle,this.destinationFrame=null,this.sourceFrame=null,this.stencilBuffer=null,this.stencilMaskStack=[],this.filterData=null,this.scaleMode=void 0!==l?l:s.default.SCALE_MODE,this.root=h,this.root?(this.frameBuffer=new u.GLFramebuffer(e,100,100),this.frameBuffer.framebuffer=null):(this.frameBuffer=u.GLFramebuffer.createRGBA(e,100,100),this.scaleMode===o.SCALE_MODES.NEAREST?this.frameBuffer.texture.enableNearestScaling:this.frameBuffer.texture.enableLinearScaling,this.texture=this.frameBuffer.texture),this.setFrame,this.resize(n,a)}return t.prototype.clear=function(t){var e=t||this.clearColor;this.frameBuffer.clear(e[0],e[1],e[2],e[3])},t.prototype.attachStencilBuffer=function{this.root||this.frameBuffer.enableStencil},t.prototype.setFrame=function(t,e){this.destinationFrame=t||this.destinationFrame||this.defaultFrame,this.sourceFrame=e||this.sourceFrame||this.destinationFrame},t.prototype.activate=function{var t=this.gl;this.frameBuffer.bind,this.calculateProjection(this.destinationFrame,this.sourceFrame),this.transform&&this.projectionMatrix.append(this.transform),this.destinationFrame!==this.sourceFrame?(t.enable(t.SCISSOR_TEST),t.scissor(0|this.destinationFrame.x,0|this.destinationFrame.y,this.destinationFrame.width*this.resolution|0,this.destinationFrame.height*this.resolution|0)):t.disable(t.SCISSOR_TEST),t.viewport(0|this.destinationFrame.x,0|this.destinationFrame.y,this.destinationFrame.width*this.resolution|0,this.destinationFrame.height*this.resolution|0)},t.prototype.calculateProjection=function(t,e){var n=this.projectionMatrix;e=e||t,n.identity,this.root?(n.a=1/t.width*2,n.d=-1/t.height*2,n.tx=-1-e.x*n.a,n.ty=1-e.y*n.d):(n.a=1/t.width*2,n.d=1/t.height*2,n.tx=-1-e.x*n.a,n.ty=-1-e.y*n.d)},t.prototype.resize=function(t,e){if(t|=0,e|=0,this.size.width!==t||this.size.height!==e){this.size.width=t,this.size.height=e,this.defaultFrame.width=t,this.defaultFrame.height=e,this.frameBuffer.resize(t*this.resolution,e*this.resolution);var n=this.frame||this.size;this.calculateProjection(n)}},t.prototype.destroy=function{this.frameBuffer.destroy,this.frameBuffer=null,this.texture=null},t};n.default=l},{"../../../const":46,"../../../math":70,"../../../settings":101,"pixi-gl-core":15}],97:[function(t,e,n){"use strict";function r(t,e){var n=!e;if(0===t)throw new Error("Invalid value of `0` passed to `checkMaxIfStatementsInShader`");if(n){var r=document.createElement("canvas");r.width=1,r.height=1,e=a.default.createContext(r)}for(var o=e.createShader(e.FRAGMENT_SHADER);;){var u=s.replace(/%forloop%/gi,i(t));if(e.shaderSource(o,u),e.compileShader(o),e.getShaderParameter(o,e.COMPILE_STATUS))break;t=t/2|0}return n&&e.getExtension("WEBGL_lose_context")&&e.getExtension("WEBGL_lose_context").loseContext,t}function i(t){for(var e="",n=0;n<t;++n)n>0&&(e+="\nelse "),n<t-1&&(e+="if(test == "+n+".0){}");return e}n.__esModule=!0,n.default=r;var o=t("pixi-gl-core"),a=function(t){return t&&t.__esModule?t:{default:t}}(o),s=["precision mediump float;","void main(void){","float test = 0.1;","%forloop%","gl_FragColor = vec4(0.0);","}"].join("\n")},{"pixi-gl-core":15}],98:[function(t,e,n){"use strict";function r(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return e[i.BLEND_MODES.NORMAL]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[i.BLEND_MODES.ADD]=[t.ONE,t.DST_ALPHA],e[i.BLEND_MODES.MULTIPLY]=[t.DST_COLOR,t.ONE_MINUS_SRC_ALPHA],e[i.BLEND_MODES.SCREEN]=[t.ONE,t.ONE_MINUS_SRC_COLOR],e[i.BLEND_MODES.OVERLAY]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[i.BLEND_MODES.DARKEN]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[i.BLEND_MODES.LIGHTEN]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[i.BLEND_MODES.COLOR_DODGE]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[i.BLEND_MODES.COLOR_BURN]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[i.BLEND_MODES.HARD_LIGHT]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[i.BLEND_MODES.SOFT_LIGHT]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[i.BLEND_MODES.DIFFERENCE]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[i.BLEND_MODES.EXCLUSION]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[i.BLEND_MODES.HUE]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[i.BLEND_MODES.SATURATION]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[i.BLEND_MODES.COLOR]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[i.BLEND_MODES.LUMINOSITY]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[i.BLEND_MODES.NORMAL_NPM]=[t.SRC_ALPHA,t.ONE_MINUS_SRC_ALPHA,t.ONE,t.ONE_MINUS_SRC_ALPHA],e[i.BLEND_MODES.ADD_NPM]=[t.SRC_ALPHA,t.DST_ALPHA,t.ONE,t.DST_ALPHA],e[i.BLEND_MODES.SCREEN_NPM]=[t.SRC_ALPHA,t.ONE_MINUS_SRC_COLOR,t.ONE,t.ONE_MINUS_SRC_COLOR],e}n.__esModule=!0,n.default=r;var i=t("../../../const")},{"../../../const":46}],99:[function(t,e,n){"use strict";function r(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e[i.DRAW_MODES.POINTS]=t.POINTS,e[i.DRAW_MODES.LINES]=t.LINES,e[i.DRAW_MODES.LINE_LOOP]=t.LINE_LOOP,e[i.DRAW_MODES.LINE_STRIP]=t.LINE_STRIP,e[i.DRAW_MODES.TRIANGLES]=t.TRIANGLES,e[i.DRAW_MODES.TRIANGLE_STRIP]=t.TRIANGLE_STRIP,e[i.DRAW_MODES.TRIANGLE_FAN]=t.TRIANGLE_FAN,e}n.__esModule=!0,n.default=r;var i=t("../../../const")},{"../../../const":46}],100:[function(t,e,n){"use strict";function r(t){t.getContextAttributes.stencil||console.warn("Provided WebGL context does not have a stencil buffer, masks may not render correctly")}n.__esModule=!0,n.default=r},{}],101:[function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}n.__esModule=!0;var i=t("./utils/maxRecommendedTextures"),o=r(i),a=t("./utils/canUploadSameBuffer"),s=r(a);n.default={TARGET_FPMS:.06,MIPMAP_TEXTURES:!0,RESOLUTION:1,FILTER_RESOLUTION:1,SPRITE_MAX_TEXTURES:(0,o.default)(32),SPRITE_BATCH_SIZE:4096,RETINA_PREFIX:/@([0-9\.]+)x/,RENDER_OPTIONS:{view:null,antialias:!1,forceFXAA:!1,autoResize:!1,transparent:!1,backgroundColor:0,clearBeforeRender:!0,preserveDrawingBuffer:!1,roundPixels:!1,width:800,height:600,legacy:!1},TRANSFORM_MODE:0,GC_MODE:0,GC_MAX_IDLE:3600,GC_MAX_CHECK_COUNT:600,WRAP_MODE:0,SCALE_MODE:0,PRECISION_VERTEX:"highp",PRECISION_FRAGMENT:"mediump",CAN_UPLOAD_SAME_BUFFER:(0,s.default)}},{"./utils/canUploadSameBuffer":121,"./utils/maxRecommendedTextures":126}],102:[function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}n.__esModule=!0;var s=function{function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}},u=t("../math"),l=t("../utils"),c=t("../const"),h=t("../textures/Texture"),d=r(h),p=t("../display/Container"),f=r(p),g=new u.Point,m=function(t){function e(n){i(this,e);var r=o(this,t.call(this));return r._anchor=new u.ObservablePoint(r._onAnchorUpdate,r),r._texture=null,r._width=0,r._height=0,r._tint=null,r._tintRGB=null,r.tint=16777215,r.blendMode=c.BLEND_MODES.NORMAL,r.shader=null,r.cachedTint=16777215,r.texture=n||d.default.EMPTY,r.vertexData=new Float32Array(8),r.vertexTrimmedData=null,r._transformID=-1,r._textureID=-1,r._transformTrimmedID=-1,r._textureTrimmedID=-1,r.pluginName="sprite",r}return a(e,t),e.prototype._onTextureUpdate=function{this._textureID=-1,this._textureTrimmedID=-1,this._width&&(this.scale.x=(0,l.sign)(this.scale.x)*this._width/this._texture.orig.width),this._height&&(this.scale.y=(0,l.sign)(this.scale.y)*this._height/this._texture.orig.height)},e.prototype._onAnchorUpdate=function{this._transformID=-1,this._transformTrimmedID=-1},e.prototype.calculateVertices=function{if(this._transformID!==this.transform._worldID||this._textureID!==this._texture._updateID){this._transformID=this.transform._worldID,this._textureID=this._texture._updateID;var t=this._texture,e=this.transform.worldTransform,n=e.a,r=e.b,i=e.c,o=e.d,a=e.tx,s=e.ty,u=this.vertexData,l=t.trim,c=t.orig,h=this._anchor,d=0,p=0,f=0,g=0;l?(p=l.x-h._x*c.width,d=p+l.width,g=l.y-h._y*c.height,f=g+l.height):(p=-h._x*c.width,d=p+c.width,g=-h._y*c.height,f=g+c.height),u[0]=n*p+i*g+a,u[1]=o*g+r*p+s,u[2]=n*d+i*g+a,u[3]=o*g+r*d+s,u[4]=n*d+i*f+a,u[5]=o*f+r*d+s,u[6]=n*p+i*f+a,u[7]=o*f+r*p+s}},e.prototype.calculateTrimmedVertices=function{if(this.vertexTrimmedData){if(this._transformTrimmedID===this.transform._worldID&&this._textureTrimmedID===this._texture._updateID)return}else this.vertexTrimmedData=new Float32Array(8);this._transformTrimmedID=this.transform._worldID,this._textureTrimmedID=this._texture._updateID;var t=this._texture,e=this.vertexTrimmedData,n=t.orig,r=this._anchor,i=this.transform.worldTransform,o=i.a,a=i.b,s=i.c,u=i.d,l=i.tx,c=i.ty,h=-r._x*n.width,d=h+n.width,p=-r._y*n.height,f=p+n.height;e[0]=o*h+s*p+l,e[1]=u*p+a*h+c,e[2]=o*d+s*p+l,e[3]=u*p+a*d+c,e[4]=o*d+s*f+l,e[5]=u*f+a*d+c,e[6]=o*h+s*f+l,e[7]=u*f+a*h+c},e.prototype._renderWebGL=function(t){this.calculateVertices,t.setObjectRenderer(t.plugins[this.pluginName]),t.plugins[this.pluginName].render(this)},e.prototype._renderCanvas=function(t){t.plugins[this.pluginName].render(this)},e.prototype._calculateBounds=function{var t=this._texture.trim,e=this._texture.orig;!t||t.width===e.width&&t.height===e.height?(this.calculateVertices,this._bounds.addQuad(this.vertexData)):(this.calculateTrimmedVertices,this._bounds.addQuad(this.vertexTrimmedData))},e.prototype.getLocalBounds=function(e){return 0===this.children.length?(this._bounds.minX=this._texture.orig.width*-this._anchor._x,this._bounds.minY=this._texture.orig.height*-this._anchor._y,this._bounds.maxX=this._texture.orig.width*(1-this._anchor._x),this._bounds.maxY=this._texture.orig.height*(1-this._anchor._x),e||(this._localBoundsRect||(this._localBoundsRect=new u.Rectangle),e=this._localBoundsRect),this._bounds.getRectangle(e)):t.prototype.getLocalBounds.call(this,e)},e.prototype.containsPoint=function(t){this.worldTransform.applyInverse(t,g);var e=this._texture.orig.width,n=this._texture.orig.height,r=-e*this.anchor.x,i=0;return g.x>r&&g.x<r+e&&(i=-n*this.anchor.y,g.y>i&&g.y<i+n)},e.prototype.destroy=function(e){if(t.prototype.destroy.call(this,e),this._anchor=null,"boolean"==typeof e?e:e&&e.texture){var n="boolean"==typeof e?e:e&&e.baseTexture;this._texture.destroy(!!n)}this._texture=null,this.shader=null},e.from=function(t){return new e(d.default.from(t))},e.fromFrame=function(t){var n=l.TextureCache[t];if(!n)throw new Error('The frameId "'+t+'" does not exist in the texture cache');return new e(n)},e.fromImage=function(t,n,r){return new e(d.default.fromImage(t,n,r))},s(e,[{key:"width",get:function{return Math.abs(this.scale.x)*this._texture.orig.width},set:function(t){var e=(0,l.sign)(this.scale.x)||1;this.scale.x=e*t/this._texture.orig.width,this._width=t}},{key:"height",get:function{return Math.abs(this.scale.y)*this._texture.orig.height},set:function(t){var e=(0,l.sign)(this.scale.y)||1;this.scale.y=e*t/this._texture.orig.height,this._height=t}},{key:"anchor",get:function{return this._anchor},set:function(t){this._anchor.copy(t)}},{key:"tint",get:function{return this._tint},set:function(t){this._tint=t,this._tintRGB=(t>>16)+(65280&t)+((255&t)<<16)}},{key:"texture",get:function{return this._texture},set:function(t){this._texture!==t&&(this._texture=t,this.cachedTint=16777215,this._textureID=-1,this._textureTrimmedID=-1,t&&(t.baseTexture.hasLoaded?this._onTextureUpdate:t.once("update",this._onTextureUpdate,this)))}}]),e}(f.default);n.default=m},{"../const":46,"../display/Container":48,"../math":70,"../textures/Texture":115,"../utils":124}],103:[function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}n.__esModule=!0;var o=t("../../renderers/canvas/CanvasRenderer"),a=r(o),s=t("../../const"),u=t("../../math"),l=t("./CanvasTinter"),c=r(l),h=new u.Matrix,d=function{function t(e){i(this,t),this.renderer=e}return t.prototype.render=function(t){var e=t._texture,n=this.renderer,r=e._frame.width,i=e._frame.height,o=t.transform.worldTransform,a=0,l=0;if(!(e.orig.width<=0||e.orig.height<=0)&&e.baseTexture.source&&(n.setBlendMode(t.blendMode),e.valid)){n.context.globalAlpha=t.worldAlpha;var d=e.baseTexture.scaleMode===s.SCALE_MODES.LINEAR;n.smoothProperty&&n.context[n.smoothProperty]!==d&&(n.context[n.smoothProperty]=d),e.trim?(a=e.trim.width/2+e.trim.x-t.anchor.x*e.orig.width,l=e.trim.height/2+e.trim.y-t.anchor.y*e.orig.height):(a=(.5-t.anchor.x)*e.orig.width,l=(.5-t.anchor.y)*e.orig.height),e.rotate&&(o.copy(h),o=h,u.GroupD8.matrixAppendRotationInv(o,e.rotate,a,l),a=0,l=0),a-=r/2,l-=i/2,n.roundPixels?(n.context.setTransform(o.a,o.b,o.c,o.d,o.tx*n.resolution|0,o.ty*n.resolution|0),a|=0,l|=0):n.context.setTransform(o.a,o.b,o.c,o.d,o.tx*n.resolution,o.ty*n.resolution);var p=e.baseTexture.resolution;16777215!==t.tint?(t.cachedTint===t.tint&&t.tintedTexture.tintId===t._texture._updateID||(t.cachedTint=t.tint,t.tintedTexture=c.default.getTintedTexture(t,t.tint)),n.context.drawImage(t.tintedTexture,0,0,r*p,i*p,a*n.resolution,l*n.resolution,r*n.resolution,i*n.resolution)):n.context.drawImage(e.baseTexture.source,e._frame.x*p,e._frame.y*p,r*p,i*p,a*n.resolution,l*n.resolution,r*n.resolution,i*n.resolution)}},t.prototype.destroy=function{this.renderer=null},t};n.default=d,a.default.registerPlugin("sprite",d)},{"../../const":46,"../../math":70,"../../renderers/canvas/CanvasRenderer":77,"./CanvasTinter":104}],104:[function(t,e,n){"use strict";n.__esModule=!0;var r=t("../../utils"),i=t("../../renderers/canvas/utils/canUseNewCanvasBlendModes"),o=function(t){return t&&t.__esModule?t:{default:t}}(i),a={getTintedTexture:function(t,e){var n=t._texture;e=a.roundColor(e);var r="#"+("00000"+(0|e).toString(16)).substr(-6);n.tintCache=n.tintCache||{};var i=n.tintCache[r],o=void 0;if(i){if(i.tintId===n._updateID)return n.tintCache[r];o=n.tintCache[r]}else o=a.canvas||document.createElement("canvas");if(a.tintMethod(n,e,o),o.tintId=n._updateID,a.convertTintToImage){var s=new Image;s.src=o.toDataURL,n.tintCache[r]=s}else n.tintCache[r]=o,a.canvas=null;return o},tintWithMultiply:function(t,e,n){var r=n.getContext("2d"),i=t._frame.clone,o=t.baseTexture.resolution;i.x*=o,i.y*=o,i.width*=o,i.height*=o,n.width=Math.ceil(i.width),n.height=Math.ceil(i.height),r.fillStyle="#"+("00000"+(0|e).toString(16)).substr(-6),r.fillRect(0,0,i.width,i.height),r.globalCompositeOperation="multiply",r.drawImage(t.baseTexture.source,i.x,i.y,i.width,i.height,0,0,i.width,i.height),r.globalCompositeOperation="destination-atop",r.drawImage(t.baseTexture.source,i.x,i.y,i.width,i.height,0,0,i.width,i.height)},tintWithOverlay:function(t,e,n){var r=n.getContext("2d"),i=t._frame.clone,o=t.baseTexture.resolution;i.x*=o,i.y*=o,i.width*=o,i.height*=o,n.width=Math.ceil(i.width),n.height=Math.ceil(i.height),r.globalCompositeOperation="copy",r.fillStyle="#"+("00000"+(0|e).toString(16)).substr(-6),r.fillRect(0,0,i.width,i.height),r.globalCompositeOperation="destination-atop",r.drawImage(t.baseTexture.source,i.x,i.y,i.width,i.height,0,0,i.width,i.height)},tintWithPerPixel:function(t,e,n){var i=n.getContext("2d"),o=t._frame.clone,a=t.baseTexture.resolution;o.x*=a,o.y*=a,o.width*=a,o.height*=a,n.width=Math.ceil(o.width),n.height=Math.ceil(o.height),i.globalCompositeOperation="copy",i.drawImage(t.baseTexture.source,o.x,o.y,o.width,o.height,0,0,o.width,o.height);for(var s=(0,r.hex2rgb)(e),u=s[0],l=s[1],c=s[2],h=i.getImageData(0,0,o.width,o.height),d=h.data,p=0;p<d.length;p+=4)d[p+0]*=u,d[p+1]*=l,d[p+2]*=c;i.putImageData(h,0,0)},roundColor:function(t){var e=a.cacheStepsPerColorChannel,n=(0,r.hex2rgb)(t);return n[0]=Math.min(255,n[0]/e*e),n[1]=Math.min(255,n[1]/e*e),n[2]=Math.min(255,n[2]/e*e),(0,r.rgb2hex)(n)},cacheStepsPerColorChannel:8,convertTintToImage:!1,canUseMultiply:(0,o.default),tintMethod:0};a.tintMethod=a.canUseMultiply?a.tintWithMultiply:a.tintWithPerPixel,n.default=a},{"../../renderers/canvas/utils/canUseNewCanvasBlendModes":80,"../../utils":124}],105:[function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}n.__esModule=!0;var i=function{function t(e){r(this,t),this.vertices=new ArrayBuffer(e),this.float32View=new Float32Array(this.vertices),this.uint32View=new Uint32Array(this.vertices)}return t.prototype.destroy=function{this.vertices=null,this.positions=null,this.uvs=null,this.colors=null},t};n.default=i},{}],106:[function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}n.__esModule=!0;var s=t("../../renderers/webgl/utils/ObjectRenderer"),u=r(s),l=t("../../renderers/webgl/WebGLRenderer"),c=r(l),h=t("../../utils/createIndicesForQuads"),d=r(h),p=t("./generateMultiTextureShader"),f=r(p),g=t("../../renderers/webgl/utils/checkMaxIfStatmentsInShader"),m=r(g),v=t("./BatchBuffer"),y=r(v),_=t("../../settings"),b=r(_),x=t("../../utils"),w=t("pixi-gl-core"),T=r(w),S=t("bit-twiddle"),E=r(S),P=0,M=0,C=function(t){function e(n){i(this,e);var r=o(this,t.call(this,n));r.vertSize=5,r.vertByteSize=4*r.vertSize,r.size=b.default.SPRITE_BATCH_SIZE,r.buffers=[];for(var a=1;a<=E.default.nextPow2(r.size);a*=2)r.buffers.push(new y.default(4*a*r.vertByteSize));r.indices=(0,d.default)(r.size),r.shader=null,r.currentIndex=0,r.groups=[];for(var s=0;s<r.size;s++)r.groups[s]={textures:[],textureCount:0,ids:[],size:0,start:0,blend:0};return r.sprites=[],r.vertexBuffers=[],r.vaos=[],r.vaoMax=2,r.vertexCount=0,r.renderer.on("prerender",r.onPrerender,r),r}return a(e,t),e.prototype.onContextChange=function{var t=this.renderer.gl;this.renderer.legacy?this.MAX_TEXTURES=1:(this.MAX_TEXTURES=Math.min(t.getParameter(t.MAX_TEXTURE_IMAGE_UNITS),b.default.SPRITE_MAX_TEXTURES),this.MAX_TEXTURES=(0,m.default)(this.MAX_TEXTURES,t)),this.shader=(0,f.default)(t,this.MAX_TEXTURES),this.indexBuffer=T.default.GLBuffer.createIndexBuffer(t,this.indices,t.STATIC_DRAW),this.renderer.bindVao(null);for(var e=this.shader.attributes,n=0;n<this.vaoMax;n++){var r=this.vertexBuffers[n]=T.default.GLBuffer.createVertexBuffer(t,null,t.STREAM_DRAW),i=this.renderer.createVao.addIndex(this.indexBuffer).addAttribute(r,e.aVertexPosition,t.FLOAT,!1,this.vertByteSize,0).addAttribute(r,e.aTextureCoord,t.UNSIGNED_SHORT,!0,this.vertByteSize,8).addAttribute(r,e.aColor,t.UNSIGNED_BYTE,!0,this.vertByteSize,12);e.aTextureId&&i.addAttribute(r,e.aTextureId,t.FLOAT,!1,this.vertByteSize,16),this.vaos[n]=i}this.vao=this.vaos[0],this.currentBlendMode=99999,this.boundTextures=new Array(this.MAX_TEXTURES)},e.prototype.onPrerender=function{this.vertexCount=0},e.prototype.render=function(t){this.currentIndex>=this.size&&this.flush,t._texture._uvs&&(this.sprites[this.currentIndex++]=t)},e.prototype.flush=function{if(0!==this.currentIndex){var t=this.renderer.gl,e=this.MAX_TEXTURES,n=E.default.nextPow2(this.currentIndex),r=E.default.log2(n),i=this.buffers[r],o=this.sprites,a=this.groups,s=i.float32View,u=i.uint32View,l=this.boundTextures,c=this.renderer.boundTextures,h=this.renderer.textureGC.count,d=0,p=void 0,f=void 0,g=1,m=0,v=a[0],y=void 0,_=void 0,w=x.premultiplyBlendMode[o[0]._texture.baseTexture.premultipliedAlpha?1:0][o[0].blendMode];v.textureCount=0,v.start=0,v.blend=w,P++;var S=void 0;for(S=0;S<e;++S)l[S]=c[S],l[S]._virtalBoundId=S;for(S=0;S<this.currentIndex;++S){var C=o[S];p=C._texture.baseTexture;var A=x.premultiplyBlendMode[Number(p.premultipliedAlpha)][C.blendMode];if(w!==A&&(w=A,f=null,m=e,P++),f!==p&&(f=p,p._enabled!==P)){if(m===e&&(P++,v.size=S-v.start,m=0,v=a[g++],v.blend=w,v.textureCount=0,v.start=S),p.touched=h,-1===p._virtalBoundId)for(var O=0;O<e;++O){var I=(O+M)%e,k=l[I];if(k._enabled!==P){M++,k._virtalBoundId=-1,p._virtalBoundId=I,l[I]=p;break}}p._enabled=P,v.textureCount++,v.ids[m]=p._virtalBoundId,v.textures[m++]=p}if(y=C.vertexData,_=C._texture._uvs.uvsUint32,this.renderer.roundPixels){var R=this.renderer.resolution;s[d]=(y[0]*R|0)/R,s[d+1]=(y[1]*R|0)/R,s[d+5]=(y[2]*R|0)/R,s[d+6]=(y[3]*R|0)/R,s[d+10]=(y[4]*R|0)/R,s[d+11]=(y[5]*R|0)/R,s[d+15]=(y[6]*R|0)/R,s[d+16]=(y[7]*R|0)/R}else s[d]=y[0],s[d+1]=y[1],s[d+5]=y[2],s[d+6]=y[3],s[d+10]=y[4],s[d+11]=y[5],s[d+15]=y[6],s[d+16]=y[7];u[d+2]=_[0],u[d+7]=_[1],u[d+12]=_[2],u[d+17]=_[3];var D=Math.min(C.worldAlpha,1),L=D<1&&p.premultipliedAlpha?(0,x.premultiplyTint)(C._tintRGB,D):C._tintRGB+(255*D<<24);u[d+3]=u[d+8]=u[d+13]=u[d+18]=L,s[d+4]=s[d+9]=s[d+14]=s[d+19]=p._virtalBoundId,d+=20}if(v.size=S-v.start,b.default.CAN_UPLOAD_SAME_BUFFER)this.vertexBuffers[this.vertexCount].upload(i.vertices,0,!0);else{if(this.vaoMax<=this.vertexCount){this.vaoMax++;var j=this.shader.attributes,B=this.vertexBuffers[this.vertexCount]=T.default.GLBuffer.createVertexBuffer(t,null,t.STREAM_DRAW),N=this.renderer.createVao.addIndex(this.indexBuffer).addAttribute(B,j.aVertexPosition,t.FLOAT,!1,this.vertByteSize,0).addAttribute(B,j.aTextureCoord,t.UNSIGNED_SHORT,!0,this.vertByteSize,8).addAttribute(B,j.aColor,t.UNSIGNED_BYTE,!0,this.vertByteSize,12);j.aTextureId&&N.addAttribute(B,j.aTextureId,t.FLOAT,!1,this.vertByteSize,16),this.vaos[this.vertexCount]=N}this.renderer.bindVao(this.vaos[this.vertexCount]),this.vertexBuffers[this.vertexCount].upload(i.vertices,0,!1),this.vertexCount++}for(S=0;S<e;++S)c[S]._virtalBoundId=-1;for(S=0;S<g;++S){for(var F=a[S],U=F.textureCount,W=0;W<U;W++)f=F.textures[W],c[F.ids[W]]!==f&&this.renderer.bindTexture(f,F.ids[W],!0),f._virtalBoundId=-1;this.renderer.state.setBlendMode(F.blend),t.drawElements(t.TRIANGLES,6*F.size,t.UNSIGNED_SHORT,6*F.start*2)}this.currentIndex=0}},e.prototype.start=function{this.renderer.bindShader(this.shader),b.default.CAN_UPLOAD_SAME_BUFFER&&(this.renderer.bindVao(this.vaos[this.vertexCount]),this.vertexBuffers[this.vertexCount].bind)},e.prototype.stop=function{this.flush},e.prototype.destroy=function{for(var e=0;e<this.vaoMax;e++)this.vertexBuffers[e]&&this.vertexBuffers[e].destroy,this.vaos[e]&&this.vaos[e].destroy;this.indexBuffer&&this.indexBuffer.destroy,this.renderer.off("prerender",this.onPrerender,this),t.prototype.destroy.call(this),this.shader&&(this.shader.destroy,this.shader=null),this.vertexBuffers=null,this.vaos=null,this.indexBuffer=null,this.indices=null,this.sprites=null;for(var n=0;n<this.buffers.length;++n)this.buffers[n].destroy},e}(u.default);n.default=C,c.default.registerPlugin("sprite",C)},{"../../renderers/webgl/WebGLRenderer":84,"../../renderers/webgl/utils/ObjectRenderer":94,"../../renderers/webgl/utils/checkMaxIfStatmentsInShader":97,"../../settings":101,"../../utils":124,"../../utils/createIndicesForQuads":122,"./BatchBuffer":105,"./generateMultiTextureShader":107,"bit-twiddle":1,"pixi-gl-core":15}],107:[function(t,e,n){"use strict";function r(t,e){var n=s;n=n.replace(/%count%/gi,e),n=n.replace(/%forloop%/gi,i(e));for(var r=new a.default(t,"precision highp float;\nattribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\nattribute vec4 aColor;\nattribute float aTextureId;\n\nuniform mat3 projectionMatrix;\n\nvarying vec2 vTextureCoord;\nvarying vec4 vColor;\nvarying float vTextureId;\n\nvoid main(void){\n    gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n\n    vTextureCoord = aTextureCoord;\n    vTextureId = aTextureId;\n    vColor = aColor;\n}\n",n),o=[],u=0;u<e;u++)o[u]=u;return r.bind,r.uniforms.uSamplers=o,r}function i(t){var e="";e+="\n",e+="\n";for(var n=0;n<t;n++)n>0&&(e+="\nelse "),n<t-1&&(e+="if(textureId == "+n+".0)"),e+="\n{",e+="\n\tcolor = texture2D(uSamplers["+n+"], vTextureCoord);",e+="\n}";return e+="\n",e+="\n"}n.__esModule=!0,n.default=r;var o=t("../../Shader"),a=function(t){return t&&t.__esModule?t:{default:t}}(o),s=(t("path"),["varying vec2 vTextureCoord;","varying vec4 vColor;","varying float vTextureId;","uniform sampler2D uSamplers[%count%];","void main(void){","vec4 color;","float textureId = floor(vTextureId+0.5);","%forloop%","gl_FragColor = color * vColor;","}"].join("\n"))},{"../../Shader":44,path:8}],108:[function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}n.__esModule=!0;var s=function{function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}},u=t("../sprites/Sprite"),l=r(u),c=t("../textures/Texture"),h=r(c),d=t("../math"),p=t("../utils"),f=t("../const"),g=t("../settings"),m=r(g),v=t("./TextStyle"),y=r(v),_=t("./TextMetrics"),b=r(_),x=t("../utils/trimCanvas"),w=r(x),T={texture:!0,children:!1,baseTexture:!0},S=function(t){function e(n,r,a){i(this,e),a=a||document.createElement("canvas"),a.width=3,a.height=3;var s=h.default.fromCanvas(a,m.default.SCALE_MODE,"text");s.orig=new d.Rectangle,s.trim=new d.Rectangle;var u=o(this,t.call(this,s));return h.default.addToCache(u._texture,u._texture.baseTexture.textureCacheIds[0]),u.canvas=a,u.context=u.canvas.getContext("2d"),u.resolution=m.default.RESOLUTION,u._text=null,u._style=null,u._styleListener=null,u._font="",u.text=n,u.style=r,u.localStyleID=-1,u}return a(e,t),e.prototype.updateText=function(t){var e=this._style;if(this.localStyleID!==e.styleID&&(this.dirty=!0,this.localStyleID=e.styleID),this.dirty||!t){this._font=this._style.toFontString;var n=this.context,r=b.default.measureText(this._text,this._style,this._style.wordWrap,this.canvas),i=r.width,o=r.height,a=r.lines,s=r.lineHeight,u=r.lineWidths,l=r.maxLineWidth,c=r.fontProperties;this.canvas.width=Math.ceil((i+2*e.padding)*this.resolution),this.canvas.height=Math.ceil((o+2*e.padding)*this.resolution),n.scale(this.resolution,this.resolution),n.clearRect(0,0,this.canvas.width,this.canvas.height),n.font=this._font,n.strokeStyle=e.stroke,n.lineWidth=e.strokeThickness,n.textBaseline=e.textBaseline,n.lineJoin=e.lineJoin,n.miterLimit=e.miterLimit;var h=void 0,d=void 0;if(e.dropShadow){n.shadowBlur=e.dropShadowBlur,n.globalAlpha=e.dropShadowAlpha,e.dropShadowBlur>0?n.shadowColor=e.dropShadowColor:n.fillStyle=e.dropShadowColor;for(var p=Math.cos(e.dropShadowAngle)*e.dropShadowDistance,f=Math.sin(e.dropShadowAngle)*e.dropShadowDistance,g=0;g<a.length;g++)h=e.strokeThickness/2,d=e.strokeThickness/2+g*s+c.ascent,"right"===e.align?h+=l-u[g]:"center"===e.align&&(h+=(l-u[g])/2),e.fill&&(this.drawLetterSpacing(a[g],h+p+e.padding,d+f+e.padding),e.stroke&&e.strokeThickness&&(n.strokeStyle=e.dropShadowColor,this.drawLetterSpacing(a[g],h+p+e.padding,d+f+e.padding,!0),n.strokeStyle=e.stroke))}n.shadowBlur=0,n.globalAlpha=1,n.fillStyle=this._generateFillStyle(e,a);for(var m=0;m<a.length;m++)h=e.strokeThickness/2,d=e.strokeThickness/2+m*s+c.ascent,"right"===e.align?h+=l-u[m]:"center"===e.align&&(h+=(l-u[m])/2),e.stroke&&e.strokeThickness&&this.drawLetterSpacing(a[m],h+e.padding,d+e.padding,!0),e.fill&&this.drawLetterSpacing(a[m],h+e.padding,d+e.padding);this.updateTexture}},e.prototype.drawLetterSpacing=function(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=this._style,o=i.letterSpacing;if(0===o)return void(r?this.context.strokeText(t,e,n):this.context.fillText(t,e,n));for(var a=String.prototype.split.call(t,""),s=e,u=0,l="";u<t.length;)l=a[u++],r?this.context.strokeText(l,s,n):this.context.fillText(l,s,n),s+=this.context.measureText(l).width+o},e.prototype.updateTexture=function{var t=this.canvas;if(this._style.trim){var e=(0,w.default)(t);t.width=e.width,t.height=e.height,this.context.putImageData(e.data,0,0)}var n=this._texture,r=this._style,i=r.trim?0:r.padding,o=n.baseTexture;o.hasLoaded=!0,o.resolution=this.resolution,o.realWidth=t.width,o.realHeight=t.height,o.width=t.width/this.resolution,o.height=t.height/this.resolution,n.trim.width=n._frame.width=t.width/this.resolution,n.trim.height=n._frame.height=t.height/this.resolution,n.trim.x=-i,n.trim.y=-i,n.orig.width=n._frame.width-2*i,n.orig.height=n._frame.height-2*i,this._onTextureUpdate,o.emit("update",o),this.dirty=!1},e.prototype.renderWebGL=function(e){this.resolution!==e.resolution&&(this.resolution=e.resolution,this.dirty=!0),this.updateText(!0),t.prototype.renderWebGL.call(this,e)},e.prototype._renderCanvas=function(e){this.resolution!==e.resolution&&(this.resolution=e.resolution,this.dirty=!0),this.updateText(!0),t.prototype._renderCanvas.call(this,e)},e.prototype.getLocalBounds=function(e){return this.updateText(!0),t.prototype.getLocalBounds.call(this,e)},e.prototype._calculateBounds=function{this.updateText(!0),this.calculateVertices,this._bounds.addQuad(this.vertexData)},e.prototype._onStyleChange=function{this.dirty=!0},e.prototype._generateFillStyle=function(t,e){if(!Array.isArray(t.fill))return t.fill;if(navigator.isCocoonJS)return t.fill[0];var n=void 0,r=void 0,i=void 0,o=void 0,a=this.canvas.width/this.resolution,s=this.canvas.height/this.resolution,u=t.fill.slice,l=t.fillGradientStops.slice;if(!l.length)for(var c=u.length+1,h=1;h<c;++h)l.push(h/c);if(u.unshift(t.fill[0]),l.unshift(0),u.push(t.fill[t.fill.length-1]),l.push(1),t.fillGradientType===f.TEXT_GRADIENT.LINEAR_VERTICAL){n=this.context.createLinearGradient(a/2,0,a/2,s),r=(u.length+1)*e.length,i=0;for(var d=0;d<e.length;d++){i+=1;for(var p=0;p<u.length;p++)o="number"==typeof l[p]?l[p]/e.length+d/e.length:i/r,n.addColorStop(o,u[p]),i++}}else{n=this.context.createLinearGradient(0,s/2,a,s/2),r=u.length+1,i=1;for(var g=0;g<u.length;g++)o="number"==typeof l[g]?l[g]:i/r,n.addColorStop(o,u[g]),i++}return n},e.prototype.destroy=function(e){"boolean"==typeof e&&(e={children:e}),e=Object.assign({},T,e),t.prototype.destroy.call(this,e),this.context=null,this.canvas=null,this._style=null},s(e,[{key:"width",get:function{return this.updateText(!0),Math.abs(this.scale.x)*this._texture.orig.width},set:function(t){this.updateText(!0);var e=(0,p.sign)(this.scale.x)||1;this.scale.x=e*t/this._texture.orig.width,this._width=t}},{key:"height",get:function{return this.updateText(!0),Math.abs(this.scale.y)*this._texture.orig.height},set:function(t){this.updateText(!0);var e=(0,p.sign)(this.scale.y)||1;this.scale.y=e*t/this._texture.orig.height,this._height=t}},{key:"style",get:function{return this._style},set:function(t){t=t||{},t instanceof y.default?this._style=t:this._style=new y.default(t),this.localStyleID=-1,this.dirty=!0}},{key:"text",get:function{return this._text},set:function(t){t=String(""===t||null===t||void 0===t?" ":t),this._text!==t&&(this._text=t,this.dirty=!0)}}]),e}(l.default);n.default=S},{"../const":46,"../math":70,"../settings":101,"../sprites/Sprite":102,"../textures/Texture":115,"../utils":124,"../utils/trimCanvas":129,"./TextMetrics":109,"./TextStyle":110}],109:[function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}n.__esModule=!0;var i=function{function t(e,n,i,o,a,s,u,l,c){r(this,t),this.text=e,this.style=n,this.width=i,this.height=o,this.lines=a,this.lineWidths=s,this.lineHeight=u,this.maxLineWidth=l,this.fontProperties=c}return t.measureText=function(e,n,r){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:t._canvas;r=r||n.wordWrap;var o=n.toFontString,a=t.measureFont(o),s=i.getContext("2d");s.font=o;for(var u=r?t.wordWrap(e,n,i):e,l=u.split(/(?:\r\n|\r|\n)/),c=new Array(l.length),h=0,d=0;d<l.length;d++){var p=s.measureText(l[d]).width+(l[d].length-1)*n.letterSpacing;c[d]=p,h=Math.max(h,p)}var f=h+n.strokeThickness;n.dropShadow&&(f+=n.dropShadowDistance);var g=n.lineHeight||a.fontSize+n.strokeThickness,m=Math.max(g,a.fontSize+n.strokeThickness)+(l.length-1)*g;return n.dropShadow&&(m+=n.dropShadowDistance),new t(e,n,f,m,l,c,g,h,a)},t.wordWrap=function(e,n){for(var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t._canvas,i=r.getContext("2d"),o="",a=e.split("\n"),s=n.wordWrapWidth,u={},l=0;l<a.length;l++){for(var c=s,h=a[l].split(" "),d=0;d<h.length;d++){var p=i.measureText(h[d]).width;if(n.breakWords&&p>s)for(var f=h[d].split(""),g=0;g<f.length;g++){var m=f[g],v=u[m];void 0===v&&(v=i.measureText(m).width,u[m]=v),v>c?(o+="\n"+m,c=s-v):(0===g&&(o+=" "),o+=m,c-=v)}else{var y=p+i.measureText(" ").width;0===d||y>c?(d>0&&(o+="\n"),o+=h[d],c=s-p):(c-=y,o+=" "+h[d])}}l<a.length-1&&(o+="\n")}return o},t.measureFont=function(e){if(t._fonts[e])return t._fonts[e];var n={},r=t._canvas,i=t._context;i.font=e;var o=Math.ceil(i.measureText("|MÉq").width),a=Math.ceil(i.measureText("M").width),s=2*a;a=1.4*a|0,r.width=o,r.height=s,i.fillStyle="#f00",i.fillRect(0,0,o,s),i.font=e,i.textBaseline="alphabetic",i.fillStyle="#000",i.fillText("|MÉq",0,a);var u=i.getImageData(0,0,o,s).data,l=u.length,c=4*o,h=0,d=0,p=!1;for(h=0;h<a;++h){for(var f=0;f<c;f+=4)if(255!==u[d+f]){p=!0;break}if(p)break;d+=c}for(n.ascent=a-h,d=l-c,p=!1,h=s;h>a;--h){for(var g=0;g<c;g+=4)if(255!==u[d+g]){p=!0;break}if(p)break;d-=c}return n.descent=h-a,n.fontSize=n.ascent+n.descent,t._fonts[e]=n,n},t};n.default=i;var o=document.createElement("canvas");o.width=o.height=10,i._canvas=o,i._context=o.getContext("2d"),i._fonts={}},{}],110:[function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t){return"number"==typeof t?(0,l.hex2string)(t):("string"==typeof t&&0===t.indexOf("0x")&&(t=t.replace("0x","#")),t)}function o(t){if(Array.isArray(t)){for(var e=0;e<t.length;++e)t[e]=i(t[e]);return t}return i(t)}function a(t,e){if(!Array.isArray(t)||!Array.isArray(e))return!1;if(t.length!==e.length)return!1;for(var n=0;n<t.length;++n)if(t[n]!==e[n])return!1;return!0}n.__esModule=!0;var s=function{function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}},u=t("../const"),l=t("../utils"),c={align:"left",breakWords:!1,dropShadow:!1,dropShadowAlpha:1,dropShadowAngle:Math.PI/6,dropShadowBlur:0,dropShadowColor:"#000000",dropShadowDistance:5,fill:"black",fillGradientType:u.TEXT_GRADIENT.LINEAR_VERTICAL,fillGradientStops:[],fontFamily:"Arial",fontSize:26,fontStyle:"normal",fontVariant:"normal",fontWeight:"normal",letterSpacing:0,lineHeight:0,lineJoin:"miter",miterLimit:10,padding:0,stroke:"black",strokeThickness:0,textBaseline:"alphabetic",trim:!1,wordWrap:!1,wordWrapWidth:100},h=function{function t(e){r(this,t),this.styleID=0,Object.assign(this,c,e)}return t.prototype.clone=function{var e={};for(var n in c)e[n]=this[n];return new t(e)},t.prototype.reset=function{Object.assign(this,c)},t.prototype.toFontString=function{var t="number"==typeof this.fontSize?this.fontSize+"px":this.fontSize,e=this.fontFamily;Array.isArray(this.fontFamily)||(e=this.fontFamily.split(","));for(var n=e.length-1;n>=0;n--){var r=e[n].trim;/([\"\'])[^\'\"]+\1/.test(r)||(r='"'+r+'"'),e[n]=r}return this.fontStyle+" "+this.fontVariant+" "+this.fontWeight+" "+t+" "+e.join(",")},s(t,[{key:"align",get:function{return this._align},set:function(t){this._align!==t&&(this._align=t,this.styleID++)}},{key:"breakWords",get:function{return this._breakWords},set:function(t){this._breakWords!==t&&(this._breakWords=t,this.styleID++)}},{key:"dropShadow",get:function{return this._dropShadow},set:function(t){this._dropShadow!==t&&(this._dropShadow=t,this.styleID++)}},{key:"dropShadowAlpha",get:function{return this._dropShadowAlpha},set:function(t){this._dropShadowAlpha!==t&&(this._dropShadowAlpha=t,this.styleID++)}},{key:"dropShadowAngle",get:function{return this._dropShadowAngle},set:function(t){this._dropShadowAngle!==t&&(this._dropShadowAngle=t,this.styleID++)}},{key:"dropShadowBlur",get:function{return this._dropShadowBlur},set:function(t){this._dropShadowBlur!==t&&(this._dropShadowBlur=t,this.styleID++)}},{key:"dropShadowColor",get:function{return this._dropShadowColor},set:function(t){var e=o(t);this._dropShadowColor!==e&&(this._dropShadowColor=e,this.styleID++)}},{key:"dropShadowDistance",get:function{return this._dropShadowDistance},set:function(t){this._dropShadowDistance!==t&&(this._dropShadowDistance=t,this.styleID++)}},{key:"fill",get:function{return this._fill},set:function(t){var e=o(t);this._fill!==e&&(this._fill=e,this.styleID++)}},{key:"fillGradientType",get:function{return this._fillGradientType},set:function(t){this._fillGradientType!==t&&(this._fillGradientType=t,this.styleID++)}},{key:"fillGradientStops",get:function{return this._fillGradientStops},set:function(t){a(this._fillGradientStops,t)||(this._fillGradientStops=t,this.styleID++)}},{key:"fontFamily",get:function{return this._fontFamily},set:function(t){this.fontFamily!==t&&(this._fontFamily=t,this.styleID++)}},{key:"fontSize",get:function{return this._fontSize},set:function(t){this._fontSize!==t&&(this._fontSize=t,this.styleID++)}},{key:"fontStyle",get:function{return this._fontStyle},set:function(t){this._fontStyle!==t&&(this._fontStyle=t,this.styleID++)}},{key:"fontVariant",get:function{return this._fontVariant},set:function(t){this._fontVariant!==t&&(this._fontVariant=t,this.styleID++)}},{key:"fontWeight",get:function{return this._fontWeight},set:function(t){this._fontWeight!==t&&(this._fontWeight=t,this.styleID++)}},{key:"letterSpacing",get:function{return this._letterSpacing},set:function(t){this._letterSpacing!==t&&(this._letterSpacing=t,this.styleID++)}},{key:"lineHeight",get:function{return this._lineHeight},set:function(t){this._lineHeight!==t&&(this._lineHeight=t,this.styleID++)}},{key:"lineJoin",get:function{return this._lineJoin},set:function(t){this._lineJoin!==t&&(this._lineJoin=t,this.styleID++)}},{key:"miterLimit",get:function{return this._miterLimit},set:function(t){this._miterLimit!==t&&(this._miterLimit=t,this.styleID++)}},{key:"padding",get:function{return this._padding},set:function(t){this._padding!==t&&(this._padding=t,this.styleID++)}},{key:"stroke",get:function{return this._stroke},set:function(t){var e=o(t);this._stroke!==e&&(this._stroke=e,this.styleID++)}},{key:"strokeThickness",get:function{return this._strokeThickness},set:function(t){this._strokeThickness!==t&&(this._strokeThickness=t,this.styleID++)}},{key:"textBaseline",get:function{return this._textBaseline},set:function(t){this._textBaseline!==t&&(this._textBaseline=t,this.styleID++)}},{key:"trim",get:function{return this._trim},set:function(t){this._trim!==t&&(this._trim=t,this.styleID++)}},{key:"wordWrap",get:function{return this._wordWrap},set:function(t){this._wordWrap!==t&&(this._wordWrap=t,this.styleID++)}},{key:"wordWrapWidth",get:function{return this._wordWrapWidth},set:function(t){this._wordWrapWidth!==t&&(this._wordWrapWidth=t,this.styleID++)}}]),t};n.default=h},{"../const":46,"../utils":124}],111:[function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}n.__esModule=!0;var s=t("./BaseTexture"),u=r(s),l=t("../settings"),c=r(l),h=function(t){function e{var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:100,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:100,a=arguments[2],s=arguments[3];i(this,e);var u=o(this,t.call(this,null,a));return u.resolution=s||c.default.RESOLUTION,u.width=n,u.height=r,u.realWidth=u.width*u.resolution,u.realHeight=u.height*u.resolution,u.scaleMode=void 0!==a?a:c.default.SCALE_MODE,u.hasLoaded=!0,u._glRenderTargets={},u._canvasRenderTarget=null,u.valid=!1,u}return a(e,t),e.prototype.resize=function(t,e){t===this.width&&e===this.height||(this.valid=t>0&&e>0,this.width=t,this.height=e,this.realWidth=this.width*this.resolution,this.realHeight=this.height*this.resolution,this.valid&&this.emit("update",this))},e.prototype.destroy=function{t.prototype.destroy.call(this,!0),this.renderer=null},e}(u.default);n.default=h},{"../settings":101,"./BaseTexture":112}],112:[function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}n.__esModule=!0;var s=t("../utils"),u=t("../settings"),l=r(u),c=t("eventemitter3"),h=r(c),d=t("../utils/determineCrossOrigin"),p=r(d),f=t("bit-twiddle"),g=r(f),m=function(t){function e(n,r,a){i(this,e);var u=o(this,t.call(this));return u.uid=(0,s.uid),u.touched=0,u.resolution=a||l.default.RESOLUTION,u.width=100,u.height=100,u.realWidth=100,u.realHeight=100,u.scaleMode=void 0!==r?r:l.default.SCALE_MODE,u.hasLoaded=!1,u.isLoading=!1,u.source=null,u.origSource=null,u.imageType=null,u.sourceScale=1,u.premultipliedAlpha=!0,u.imageUrl=null,u.isPowerOfTwo=!1,u.mipmap=l.default.MIPMAP_TEXTURES,u.wrapMode=l.default.WRAP_MODE,u._glTextures={},u._enabled=0,u._virtalBoundId=-1,u._destroyed=!1,u.textureCacheIds=[],n&&u.loadSource(n),u}return a(e,t),e.prototype.update=function{"svg"!==this.imageType&&(this.realWidth=this.source.naturalWidth||this.source.videoWidth||this.source.width,this.realHeight=this.source.naturalHeight||this.source.videoHeight||this.source.height,this._updateDimensions),this.emit("update",this)},e.prototype._updateDimensions=function{this.width=this.realWidth/this.resolution,this.height=this.realHeight/this.resolution,this.isPowerOfTwo=g.default.isPow2(this.realWidth)&&g.default.isPow2(this.realHeight)},e.prototype.loadSource=function(t){var e=this.isLoading;this.hasLoaded=!1,this.isLoading=!1,e&&this.source&&(this.source.onload=null,this.source.onerror=null);var n=!this.source;if(this.source=t,(t.src&&t.complete||t.getContext)&&t.width&&t.height)this._updateImageType,"svg"===this.imageType?this._loadSvgSource:this._sourceLoaded,n&&this.emit("loaded",this);else if(!t.getContext){this.isLoading=!0;var r=this;if(t.onload=function{if(r._updateImageType,t.onload=null,t.onerror=null,r.isLoading){if(r.isLoading=!1,r._sourceLoaded,"svg"===r.imageType)return void r._loadSvgSource;r.emit("loaded",r)}},t.onerror=function{t.onload=null,t.onerror=null,r.isLoading&&(r.isLoading=!1,r.emit("error",r))},t.complete&&t.src){if(t.onload=null,t.onerror=null,"svg"===r.imageType)return void r._loadSvgSource;this.isLoading=!1,t.width&&t.height?(this._sourceLoaded,e&&this.emit("loaded",this)):e&&this.emit("error",this)}}},e.prototype._updateImageType=function{if(this.imageUrl){var t=(0,s.decomposeDataUri)(this.imageUrl),e=void 0;if(t&&"image"===t.mediaType){var n=t.subType.split("+")[0];if(!(e=(0,s.getUrlFileExtension)("."+n)))throw new Error("Invalid image type in data URI.")}else(e=(0,s.getUrlFileExtension)(this.imageUrl))||(e="png");this.imageType=e}},e.prototype._loadSvgSource=function{if("svg"===this.imageType){var t=(0,s.decomposeDataUri)(this.imageUrl);t?this._loadSvgSourceUsingDataUri(t):this._loadSvgSourceUsingXhr}},e.prototype._loadSvgSourceUsingDataUri=function(t){var e=void 0;if("base64"===t.encoding){if(!atob)throw new Error("Your browser doesn't support base64 conversions.");e=atob(t.data)}else e=t.data;this._loadSvgSourceUsingString(e)},e.prototype._loadSvgSourceUsingXhr=function{var t=this,e=new XMLHttpRequest;e.onload=function{if(e.readyState!==e.DONE||200!==e.status)throw new Error("Failed to load SVG using XHR.");t._loadSvgSourceUsingString(e.response)},e.onerror=function{return t.emit("error",t)},e.open("GET",this.imageUrl,!0),e.send},e.prototype._loadSvgSourceUsingString=function(t){var n=(0,s.getSvgSize)(t),r=n.width,i=n.height;if(!r||!i)throw new Error("The SVG image must have width and height defined (in pixels), canvas API needs them.");this.realWidth=Math.round(r*this.sourceScale),this.realHeight=Math.round(i*this.sourceScale),this._updateDimensions;var o=document.createElement("canvas");o.width=this.realWidth,o.height=this.realHeight,o._pixiId="canvas_"+(0,s.uid),o.getContext("2d").drawImage(this.source,0,0,r,i,0,0,this.realWidth,this.realHeight),this.origSource=this.source,this.source=o,e.addToCache(this,o._pixiId),this.isLoading=!1,this._sourceLoaded,this.emit("loaded",this)},e.prototype._sourceLoaded=function{this.hasLoaded=!0,this.update},e.prototype.destroy=function{this.imageUrl&&(delete s.TextureCache[this.imageUrl],this.imageUrl=null,navigator.isCocoonJS||(this.source.src="")),this.source=null,this.dispose,e.removeFromCache(this),this.textureCacheIds=null,this._destroyed=!0},e.prototype.dispose=function{this.emit("dispose",this)},e.prototype.updateSourceImage=function(t){this.source.src=t,this.loadSource(this.source)},e.fromImage=function(t,n,r,i){var o=s.BaseTextureCache[t];if(!o){var a=new Image;void 0===n&&0!==t.indexOf("data:")?a.crossOrigin=(0,p.default)(t):n&&(a.crossOrigin="string"==typeof n?n:"anonymous"),o=new e(a,r),o.imageUrl=t,i&&(o.sourceScale=i),o.resolution=(0,s.getResolutionOfUrl)(t),a.src=t,e.addToCache(o,t)}return o},e.fromCanvas=function(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"canvas";t._pixiId||(t._pixiId=r+"_"+(0,s.uid));var i=s.BaseTextureCache[t._pixiId];return i||(i=new e(t,n),e.addToCache(i,t._pixiId)),i},e.from=function(t,n,r){if("string"==typeof t)return e.fromImage(t,void 0,n,r);if(t instanceof HTMLImageElement){var i=t.src,o=s.BaseTextureCache[i];return o||(o=new e(t,n),o.imageUrl=i,r&&(o.sourceScale=r),o.resolution=(0,s.getResolutionOfUrl)(i),e.addToCache(o,i)),o}return t instanceof HTMLCanvasElement?e.fromCanvas(t,n):t},e.addToCache=function(t,e){e&&(-1===t.textureCacheIds.indexOf(e)&&t.textureCacheIds.push(e),s.BaseTextureCache[e]&&console.warn("BaseTexture added to the cache with an id ["+e+"] that already had an entry"),s.BaseTextureCache[e]=t)},e.removeFromCache=function(t){if("string"==typeof t){var e=s.BaseTextureCache[t];if(e){var n=e.textureCacheIds.indexOf(t);return n>-1&&e.textureCacheIds.splice(n,1),delete s.BaseTextureCache[t],e}}else if(t&&t.textureCacheIds){for(var r=0;r<t.textureCacheIds.length;++r)delete s.BaseTextureCache[t.textureCacheIds[r]];return t.textureCacheIds.length=0,t}return null},e}(h.default);n.default=m},{"../settings":101,"../utils":124,"../utils/determineCrossOrigin":123,"bit-twiddle":1,eventemitter3:3}],113:[function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}n.__esModule=!0;var s=t("./BaseRenderTexture"),u=r(s),l=t("./Texture"),c=r(l),h=function(t){function e(n,r){i(this,e);var a=null;if(!(n instanceof u.default)){var s=arguments[1],l=arguments[2],c=arguments[3],h=arguments[4];console.warn("Please use RenderTexture.create("+s+", "+l+") instead of the ctor directly."),a=arguments[0],r=null,n=new u.default(s,l,c,h)}var d=o(this,t.call(this,n,r));return d.legacyRenderer=a,d.valid=!0,d._updateUvs,d}return a(e,t),e.prototype.resize=function(t,e,n){this.valid=t>0&&e>0,this._frame.width=this.orig.width=t,this._frame.height=this.orig.height=e,n||this.baseTexture.resize(t,e),this._updateUvs},e.create=function(t,n,r,i){return new e(new u.default(t,n,r,i))},e}(c.default);n.default=h},{"./BaseRenderTexture":111,"./Texture":115}],114:[function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}n.__esModule=!0;var i=function{function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}},o=t("../"),a=t("../utils"),s=function{function t(e,n){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;r(this,t),this.baseTexture=e,this.textures={},this.data=n,this.resolution=this._updateResolution(i||this.baseTexture.imageUrl),this._frames=this.data.frames,this._frameKeys=Object.keys(this._frames),this._batchIndex=0,this._callback=null}return i(t,null,[{key:"BATCH_SIZE",get:function{return 1e3}}]),t.prototype._updateResolution=function(t){var e=this.data.meta.scale,n=(0,a.getResolutionOfUrl)(t,null);return null===n&&(n=void 0!==e?parseFloat(e):1),1!==n&&(this.baseTexture.resolution=n,this.baseTexture.update),n},t.prototype.parse=function(e){this._batchIndex=0,this._callback=e,this._frameKeys.length<=t.BATCH_SIZE?(this._processFrames(0),this._parseComplete):this._nextBatch},t.prototype._processFrames=function(e){for(var n=e,r=t.BATCH_SIZE;n-e<r&&n<this._frameKeys.length;){var i=this._frameKeys[n],a=this._frames[i].frame;if(a){var s=null,u=null,l=new o.Rectangle(0,0,this._frames[i].sourceSize.w/this.resolution,this._frames[i].sourceSize.h/this.resolution);s=this._frames[i].rotated?new o.Rectangle(a.x/this.resolution,a.y/this.resolution,a.h/this.resolution,a.w/this.resolution):new o.Rectangle(a.x/this.resolution,a.y/this.resolution,a.w/this.resolution,a.h/this.resolution),this._frames[i].trimmed&&(u=new o.Rectangle(this._frames[i].spriteSourceSize.x/this.resolution,this._frames[i].spriteSourceSize.y/this.resolution,a.w/this.resolution,a.h/this.resolution)),this.textures[i]=new o.Texture(this.baseTexture,s,l,u,this._frames[i].rotated?2:0),o.Texture.addToCache(this.textures[i],i)}n++}},t.prototype._parseComplete=function{var t=this._callback;this._callback=null,this._batchIndex=0,t.call(this,this.textures)},t.prototype._nextBatch=function{var e=this;this._processFrames(this._batchIndex*t.BATCH_SIZE),this._batchIndex++,setTimeout(function{e._batchIndex*t.BATCH_SIZE<e._frameKeys.length?e._nextBatch:e._parseComplete},0)},t.prototype.destroy=function{var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];for(var e in this.textures)this.textures[e].destroy;this._frames=null,this._frameKeys=null,this.data=null,this.textures=null,t&&this.baseTexture.destroy,this.baseTexture=null},t};n.default=s},{"../":65,"../utils":124}],115:[function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function s(t){t.destroy=function{},t.on=function{},t.once=function{},t.emit=function{}}n.__esModule=!0;var u=function{function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}},l=t("./BaseTexture"),c=r(l),h=t("./VideoBaseTexture"),d=r(h),p=t("./TextureUvs"),f=r(p),g=t("eventemitter3"),m=r(g),v=t("../math"),y=t("../utils"),_=t("../settings"),b=r(_),x=function(t){function e(n,r,a,s,u){i(this,e);var l=o(this,t.call(this));if(l.noFrame=!1,r||(l.noFrame=!0,r=new v.Rectangle(0,0,1,1)),n instanceof e&&(n=n.baseTexture),l.baseTexture=n,l._frame=r,l.trim=s,l.valid=!1,l.requiresUpdate=!1,l._uvs=null,l.orig=a||r,l._rotate=Number(u||0),!0===u)l._rotate=2;else if(l._rotate%2!=0)throw new Error("attempt to use diamond-shaped UVs. If you are sure, set rotation manually");return n.hasLoaded?(l.noFrame&&(r=new v.Rectangle(0,0,n.width,n.height),n.on("update",l.onBaseTextureUpdated,l)),l.frame=r):n.once("loaded",l.onBaseTextureLoaded,l),l._updateID=0,l.transform=null,l.textureCacheIds=[],l}return a(e,t),e.prototype.update=function{this.baseTexture.update},e.prototype.onBaseTextureLoaded=function(t){this._updateID++,this.noFrame?this.frame=new v.Rectangle(0,0,t.width,t.height):this.frame=this._frame,this.baseTexture.on("update",this.onBaseTextureUpdated,this),this.emit("update",this)},e.prototype.onBaseTextureUpdated=function(t){this._updateID++,this._frame.width=t.width,this._frame.height=t.height,this.emit("update",this)},e.prototype.destroy=function(t){this.baseTexture&&(t&&(y.TextureCache[this.baseTexture.imageUrl]&&e.removeFromCache(this.baseTexture.imageUrl),this.baseTexture.destroy),this.baseTexture.off("update",this.onBaseTextureUpdated,this),this.baseTexture.off("loaded",this.onBaseTextureLoaded,this),this.baseTexture=null),this._frame=null,this._uvs=null,this.trim=null,this.orig=null,this.valid=!1,e.removeFromCache(this),this.textureCacheIds=null},e.prototype.clone=function{return new e(this.baseTexture,this.frame,this.orig,this.trim,this.rotate)},e.prototype._updateUvs=function{this._uvs||(this._uvs=new f.default),this._uvs.set(this._frame,this.baseTexture,this.rotate),this._updateID++},e.fromImage=function(t,n,r,i){var o=y.TextureCache[t];return o||(o=new e(c.default.fromImage(t,n,r,i)),e.addToCache(o,t)),o},e.fromFrame=function(t){var e=y.TextureCache[t];if(!e)throw new Error('The frameId "'+t+'" does not exist in the texture cache');return e},e.fromCanvas=function(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"canvas";return new e(c.default.fromCanvas(t,n,r))},e.fromVideo=function(t,n){return"string"==typeof t?e.fromVideoUrl(t,n):new e(d.default.fromVideo(t,n))},e.fromVideoUrl=function(t,n){return new e(d.default.fromUrl(t,n))},e.from=function(t){if("string"==typeof t){var n=y.TextureCache[t];if(!n){return null!==t.match(/\.(mp4|webm|ogg|h264|avi|mov)$/)?e.fromVideoUrl(t):e.fromImage(t)}return n}return t instanceof HTMLImageElement?new e(c.default.from(t)):t instanceof HTMLCanvasElement?e.fromCanvas(t,b.default.SCALE_MODE,"HTMLCanvasElement"):t instanceof HTMLVideoElement?e.fromVideo(t):t instanceof c.default?new e(t):t},e.fromLoader=function(t,n,r){var i=new c.default(t,void 0,(0,y.getResolutionOfUrl)(n)),o=new e(i);return i.imageUrl=n,r||(r=n),c.default.addToCache(o.baseTexture,r),e.addToCache(o,r),r!==n&&(c.default.addToCache(o.baseTexture,n),e.addToCache(o,n)),o},e.addToCache=function(t,e){e&&(-1===t.textureCacheIds.indexOf(e)&&t.textureCacheIds.push(e),y.TextureCache[e]&&console.warn("Texture added to the cache with an id ["+e+"] that already had an entry"),y.TextureCache[e]=t)},e.removeFromCache=function(t){if("string"==typeof t){var e=y.TextureCache[t];if(e){var n=e.textureCacheIds.indexOf(t);return n>-1&&e.textureCacheIds.splice(n,1),delete y.TextureCache[t],e}}else if(t&&t.textureCacheIds){for(var r=0;r<t.textureCacheIds.length;++r)delete y.TextureCache[t.textureCacheIds[r]];return t.textureCacheIds.length=0,t}return null},u(e,[{key:"frame",get:function{return this._frame},set:function(t){if(this._frame=t,this.noFrame=!1,t.x+t.width>this.baseTexture.width||t.y+t.height>this.baseTexture.height)throw new Error("Texture Error: frame does not fit inside the base Texture dimensions: X: "+t.x+" + "+t.width+" > "+this.baseTexture.width+" Y: "+t.y+" + "+t.height+" > "+this.baseTexture.height);this.valid=t&&t.width&&t.height&&this.baseTexture.hasLoaded,this.trim||this.rotate||(this.orig=t),this.valid&&this._updateUvs}},{key:"rotate",get:function{return this._rotate},set:function(t){this._rotate=t,this.valid&&this._updateUvs}},{key:"width",get:function{return this.orig.width}},{key:"height",get:function{return this.orig.height}}]),e}(m.default);n.default=x,x.EMPTY=new x(new c.default),s(x.EMPTY),s(x.EMPTY.baseTexture),x.WHITE=function{var t=document.createElement("canvas");t.width=10,t.height=10;var e=t.getContext("2d");return e.fillStyle="white",e.fillRect(0,0,10,10),new x(new c.default(t))},s(x.WHITE),s(x.WHITE.baseTexture)},{"../math":70,"../settings":101,"../utils":124,"./BaseTexture":112,"./TextureUvs":116,"./VideoBaseTexture":117,eventemitter3:3}],116:[function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}n.__esModule=!0;var i=t("../math/GroupD8"),o=function(t){return t&&t.__esModule?t:{default:t}}(i),a=function{function t{r(this,t),this.x0=0,this.y0=0,this.x1=1,this.y1=0,this.x2=1,this.y2=1,this.x3=0,this.y3=1,this.uvsUint32=new Uint32Array(4)}return t.prototype.set=function(t,e,n){var r=e.width,i=e.height;if(n){var a=t.width/2/r,s=t.height/2/i,u=t.x/r+a,l=t.y/i+s;n=o.default.add(n,o.default.NW),this.x0=u+a*o.default.uX(n),this.y0=l+s*o.default.uY(n),n=o.default.add(n,2),this.x1=u+a*o.default.uX(n),this.y1=l+s*o.default.uY(n),n=o.default.add(n,2),this.x2=u+a*o.default.uX(n),this.y2=l+s*o.default.uY(n),n=o.default.add(n,2),this.x3=u+a*o.default.uX(n),this.y3=l+s*o.default.uY(n)}else this.x0=t.x/r,this.y0=t.y/i,this.x1=(t.x+t.width)/r,this.y1=t.y/i,this.x2=(t.x+t.width)/r,this.y2=(t.y+t.height)/i,this.x3=t.x/r,this.y3=(t.y+t.height)/i;this.uvsUint32[0]=(65535*this.y0&65535)<<16|65535*this.x0&65535,this.uvsUint32[1]=(65535*this.y1&65535)<<16|65535*this.x1&65535,this.uvsUint32[2]=(65535*this.y2&65535)<<16|65535*this.x2&65535,this.uvsUint32[3]=(65535*this.y3&65535)<<16|65535*this.x3&65535},t};n.default=a},{"../math/GroupD8":66}],117:[function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function a(t,e){e||(e="video/"+t.substr(t.lastIndexOf(".")+1));var n=document.createElement("source");return n.src=t,n.type=e,n}n.__esModule=!0;var s=function{function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}},u=t("./BaseTexture"),l=function(t){return t&&t.__esModule?t:{default:t}}(u),c=t("../utils"),h=t("../ticker"),d=t("../const"),p=function(t){function e(n,o){if(r(this,e),!n)throw new Error("No video source element specified.");(n.readyState===n.HAVE_ENOUGH_DATA||n.readyState===n.HAVE_FUTURE_DATA)&&n.width&&n.height&&(n.complete=!0);var a=i(this,t.call(this,n,o));return a.width=n.videoWidth,a.height=n.videoHeight,a._autoUpdate=!0,a._isAutoUpdating=!1,a.autoPlay=!0,a.update=a.update.bind(a),a._onCanPlay=a._onCanPlay.bind(a),n.addEventListener("play",a._onPlayStart.bind(a)),n.addEventListener("pause",a._onPlayStop.bind(a)),a.hasLoaded=!1,a.__loaded=!1,a._isSourceReady?a._onCanPlay:(n.addEventListener("canplay",a._onCanPlay),n.addEventListener("canplaythrough",a._onCanPlay)),a}return o(e,t),e.prototype._isSourcePlaying=function{var t=this.source;return t.currentTime>0&&!1===t.paused&&!1===t.ended&&t.readyState>2},e.prototype._isSourceReady=function{return 3===this.source.readyState||4===this.source.readyState},e.prototype._onPlayStart=function{this.hasLoaded||this._onCanPlay,!this._isAutoUpdating&&this.autoUpdate&&(h.shared.add(this.update,this,d.UPDATE_PRIORITY.HIGH),this._isAutoUpdating=!0)},e.prototype._onPlayStop=function{this._isAutoUpdating&&(h.shared.remove(this.update,this),this._isAutoUpdating=!1)},e.prototype._onCanPlay=function{this.hasLoaded=!0,this.source&&(this.source.removeEventListener("canplay",this._onCanPlay),this.source.removeEventListener("canplaythrough",this._onCanPlay),this.width=this.source.videoWidth,this.height=this.source.videoHeight,this.__loaded||(this.__loaded=!0,this.emit("loaded",this)),this._isSourcePlaying?this._onPlayStart:this.autoPlay&&this.source.play)},e.prototype.destroy=function{this._isAutoUpdating&&h.shared.remove(this.update,this),this.source&&this.source._pixiId&&(l.default.removeFromCache(this.source._pixiId),delete this.source._pixiId),t.prototype.destroy.call(this)},e.fromVideo=function(t,n){t._pixiId||(t._pixiId="video_"+(0,c.uid));var r=c.BaseTextureCache[t._pixiId];return r||(r=new e(t,n),l.default.addToCache(r,t._pixiId)),r},e.fromUrl=function(t,n){var r=document.createElement("video");if(r.setAttribute("webkit-playsinline",""),r.setAttribute("playsinline",""),Array.isArray(t))for(var i=0;i<t.length;++i)r.appendChild(a(t[i].src||t[i],t[i].mime));else r.appendChild(a(t.src||t,t.mime));return r.load,e.fromVideo(r,n)},s(e,[{key:"autoUpdate",get:function{return this._autoUpdate},set:function(t){t!==this._autoUpdate&&(this._autoUpdate=t,!this._autoUpdate&&this._isAutoUpdating?(h.shared.remove(this.update,this),this._isAutoUpdating=!1):this._autoUpdate&&!this._isAutoUpdating&&(h.shared.add(this.update,this,d.UPDATE_PRIORITY.HIGH),this._isAutoUpdating=!0))}}]),e}(l.default);n.default=p,p.fromUrls=p.fromUrl},{"../const":46,"../ticker":120,"../utils":124,"./BaseTexture":112}],118:[function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}n.__esModule=!0;var o=function{function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}},a=t("../settings"),s=r(a),u=t("../const"),l=t("./TickerListener"),c=r(l),h=function{function t{var e=this;i(this,t),this._head=new c.default(null,null,1/0),this._requestId=null,this._maxElapsedMS=100,this.autoStart=!1,this.deltaTime=1,this.elapsedMS=1/s.default.TARGET_FPMS,this.lastTime=0,this.speed=1,this.started=!1,this._tick=function(t){e._requestId=null,e.started&&(e.update(t),e.started&&null===e._requestId&&e._head.next&&(e._requestId=requestAnimationFrame(e._tick)))}}return t.prototype._requestIfNeeded=function{null===this._requestId&&this._head.next&&(this.lastTime=performance.now,this._requestId=requestAnimationFrame(this._tick))},t.prototype._cancelIfNeeded=function{null!==this._requestId&&(cancelAnimationFrame(this._requestId),this._requestId=null)},t.prototype._startIfPossible=function{this.started?this._requestIfNeeded:this.autoStart&&this.start},t.prototype.add=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:u.UPDATE_PRIORITY.NORMAL;return this._addListener(new c.default(t,e,n))},t.prototype.addOnce=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:u.UPDATE_PRIORITY.NORMAL;return this._addListener(new c.default(t,e,n,!0))},t.prototype._addListener=function(t){var e=this._head.next,n=this._head;if(e){for(e;){if(t.priority>e.priority){t.connect(n);break}n=e,e=e.next}t.previous||t.connect(n)}else t.connect(n);return this._startIfPossible,this},t.prototype.remove=function(t,e){for(var n=this._head.next;n;)n=n.match(t,e)?n.destroy:n.next;return this._head.next||this._cancelIfNeeded,this},t.prototype.start=function{this.started||(this.started=!0,this._requestIfNeeded)},t.prototype.stop=function{this.started&&(this.started=!1,this._cancelIfNeeded)},t.prototype.destroy=function{this.stop;for(var t=this._head.next;t;)t=t.destroy(!0);this._head.destroy,this._head=null},t.prototype.update=function{var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:performance.now,e=void 0;if(t>this.lastTime){e=this.elapsedMS=t-this.lastTime,e>this._maxElapsedMS&&(e=this._maxElapsedMS),this.deltaTime=e*s.default.TARGET_FPMS*this.speed;for(var n=this._head,r=n.next;r;)r=r.emit(this.deltaTime);n.next||this._cancelIfNeeded}else this.deltaTime=this.elapsedMS=0;this.lastTime=t},o(t,[{key:"FPS",get:function{return 1e3/this.elapsedMS}},{key:"minFPS",get:function{return 1e3/this._maxElapsedMS},set:function(t){var e=Math.min(Math.max(0,t)/1e3,s.default.TARGET_FPMS);this._maxElapsedMS=1/e}}]),t};n.default=h},{"../const":46,"../settings":101,"./TickerListener":119}],119:[function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}n.__esModule=!0;var i=function{function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,o=arguments.length>3&&void 0!==arguments[3]&&arguments[3];r(this,t),this.fn=e,this.context=n,this.priority=i,this.once=o,this.next=null,this.previous=null,this._destroyed=!1}return t.prototype.match=function(t,e){return e=e||null,this.fn===t&&this.context===e},t.prototype.emit=function(t){this.fn&&(this.context?this.fn.call(this.context,t):this.fn(t));var e=this.next;return this.once&&this.destroy(!0),this._destroyed&&(this.next=null),e},t.prototype.connect=function(t){this.previous=t,t.next&&(t.next.previous=this),this.next=t.next,t.next=this},t.prototype.destroy=function{var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this._destroyed=!0,this.fn=null,this.context=null,this.previous&&(this.previous.next=this.next),this.next&&(this.next.previous=this.previous);var e=this.previous;return this.next=t?null:e,this.previous=null,e},t};n.default=i},{}],120:[function(t,e,n){"use strict";n.__esModule=!0,n.Ticker=n.shared=void 0;var r=t("./Ticker"),i=function(t){return t&&t.__esModule?t:{default:t}}(r),o=new i.default;o.autoStart=!0,o.destroy=function{},n.shared=o,n.Ticker=i.default},{"./Ticker":118}],121:[function(t,e,n){"use strict";function r{return!(!!navigator.platform&&/iPad|iPhone|iPod/.test(navigator.platform))}n.__esModule=!0,n.default=r},{}],122:[function(t,e,n){"use strict";function r(t){for(var e=6*t,n=new Uint16Array(e),r=0,i=0;r<e;r+=6,i+=4)n[r+0]=i+0,n[r+1]=i+1,n[r+2]=i+2,n[r+3]=i+0,n[r+4]=i+2,n[r+5]=i+3;return n}n.__esModule=!0,n.default=r},{}],123:[function(t,e,n){"use strict";function r(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:window.location;if(0===t.indexOf("data:"))return"";e=e||window.location,a||(a=document.createElement("a")),a.href=t,t=o.default.parse(a.href);var n=!t.port&&""===e.port||t.port===e.port;return t.hostname===e.hostname&&n&&t.protocol===e.protocol?"":"anonymous"}n.__esModule=!0,n.default=r;var i=t("url"),o=function(t){return t&&t.__esModule?t:{default:t}}(i),a=void 0},{url:38}],124:[function(t,e,n){"use strict";function r(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}function i(t){return t&&t.__esModule?t:{default:t}}function o{return++N}function a(t,e){return e=e||[],e[0]=(t>>16&255)/255,e[1]=(t>>8&255)/255,e[2]=(255&t)/255,e}function s(t){return t=t.toString(16),"#"+(t="000000".substr(0,6-t.length)+t)}function u(t){return(255*t[0]<<16)+(255*t[1]<<8)+(255*t[2]|0)}function l(t,e){var n=E.default.RETINA_PREFIX.exec(t);return n?parseFloat(n[1]):void 0!==e?e:1}function c(t){var e=T.DATA_URI.exec(t);if(e)return{mediaType:e[1]?e[1].toLowerCase:void 0,subType:e[2]?e[2].toLowerCase:void 0,encoding:e[3]?e[3].toLowerCase:void 0,data:e[4]}}function h(t){var e=T.URL_FILE_EXTENSION.exec(t);if(e)return e[1].toLowerCase}function d(t){var e=T.SVG_SIZE.exec(t),n={};return e&&(n[e[1]]=Math.round(parseFloat(e[3])),n[e[5]]=Math.round(parseFloat(e[7]))),n}function p{F=!0}function f(t){if(!F){if(navigator.userAgent.toLowerCase.indexOf("chrome")>-1){var e=["\n %c %c %c Pixi.js "+T.VERSION+" - ✰ "+t+" ✰ %c  %c  http://www.pixijs.com/  %c %c ♥%c♥%c♥ \n\n","background: #ff66a5; padding:5px 0;","background: #ff66a5; padding:5px 0;","color: #ff66a5; background: #030307; padding:5px 0;","background: #ff66a5; padding:5px 0;","background: #ffc3dc; padding:5px 0;","background: #ff66a5; padding:5px 0;","color: #ff2424; background: #fff; padding:5px 0;","color: #ff2424; background: #fff; padding:5px 0;","color: #ff2424; background: #fff; padding:5px 0;"];window.console.log.apply(console,e)}else window.console&&window.console.log("Pixi.js "+T.VERSION+" - "+t+" - http://www.pixijs.com/");F=!0}}function g{var t={stencil:!0,failIfMajorPerformanceCaveat:!0};try{if(!window.WebGLRenderingContext)return!1;var e=document.createElement("canvas"),n=e.getContext("webgl",t)||e.getContext("experimental-webgl",t),r=!(!n||!n.getContextAttributes.stencil);if(n){var i=n.getExtension("WEBGL_lose_context");i&&i.loseContext}return n=null,r}catch(t){return!1}}function m(t){return 0===t?0:t<0?-1:1}function v{var t=void 0;for(t in U)U[t].destroy;for(t in W)W[t].destroy}function y{var t=void 0;for(t in U)delete U[t];for(t in W)delete W[t]}function _(t,e){return H[e?1:0][t]}function b(t,e){if(1===e)return(255*e<<24)+t;if(0===e)return 0;var n=t>>16&255,r=t>>8&255,i=255&t;return n=n*e+.5|0,r=r*e+.5|0,i=i*e+.5|0,(255*e<<24)+(n<<16)+(r<<8)+i}function x(t,e,n,r){return n=n||new Float32Array(4),r||void 0===r?(n[0]=t[0]*e,n[1]=t[1]*e,n[2]=t[2]*e):(n[0]=t[0],n[1]=t[1],n[2]=t[2]),n[3]=e,n}function w(t,e,n,r){return n=n||new Float32Array(4),n[0]=(t>>16&255)/255,n[1]=(t>>8&255)/255,n[2]=(255&t)/255,(r||void 0===r)&&(n[0]*=e,n[1]*=e,n[2]*=e),n[3]=e,n}n.__esModule=!0,n.premultiplyBlendMode=n.BaseTextureCache=n.TextureCache=n.mixins=n.pluginTarget=n.EventEmitter=n.removeItems=n.isMobile=void 0,n.uid=o,n.hex2rgb=a,n.hex2string=s,n.rgb2hex=u,n.getResolutionOfUrl=l,n.decomposeDataUri=c,n.getUrlFileExtension=h,n.getSvgSize=d,n.skipHello=p,n.sayHello=f,n.isWebGLSupported=g,n.sign=m,n.destroyTextureCache=v,n.clearTextureCache=y,n.correctBlendMode=_,n.premultiplyTint=b,n.premultiplyRgba=x,n.premultiplyTintToRgba=w;var T=t("../const"),S=t("../settings"),E=i(S),P=t("eventemitter3"),M=i(P),C=t("./pluginTarget"),A=i(C),O=t("./mixin"),I=r(O),k=t("ismobilejs"),R=r(k),D=t("remove-array-items"),L=i(D),j=t("./mapPremultipliedBlendModes"),B=i(j),N=0,F=!1;n.isMobile=R,n.removeItems=L.default,n.EventEmitter=M.default,n.pluginTarget=A.default,n.mixins=I;var U=n.TextureCache=Object.create(null),W=n.BaseTextureCache=Object.create(null),H=n.premultiplyBlendMode=(0,B.default)},{"../const":46,"../settings":101,"./mapPremultipliedBlendModes":125,"./mixin":127,"./pluginTarget":128,eventemitter3:3,ismobilejs:4,"remove-array-items":31}],125:[function(t,e,n){"use strict";function r{for(var t=[],e=[],n=0;n<32;n++)t[n]=n,e[n]=n;t[i.BLEND_MODES.NORMAL_NPM]=i.BLEND_MODES.NORMAL,t[i.BLEND_MODES.ADD_NPM]=i.BLEND_MODES.ADD,t[i.BLEND_MODES.SCREEN_NPM]=i.BLEND_MODES.SCREEN,e[i.BLEND_MODES.NORMAL]=i.BLEND_MODES.NORMAL_NPM,e[i.BLEND_MODES.ADD]=i.BLEND_MODES.ADD_NPM,e[i.BLEND_MODES.SCREEN]=i.BLEND_MODES.SCREEN_NPM;var r=[];return r.push(e),r.push(t),r}n.__esModule=!0,n.default=r;var i=t("../const")},{"../const":46}],126:[function(t,e,n){"use strict";function r(t){return o.default.tablet||o.default.phone?4:t}n.__esModule=!0,n.default=r;var i=t("ismobilejs"),o=function(t){return t&&t.__esModule?t:{default:t}}(i)},{ismobilejs:4}],127:[function(t,e,n){"use strict";function r(t,e){if(t&&e)for(var n=Object.keys(e),r=0;r<n.length;++r){var i=n[r];Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(e,i))}}function i(t,e){a.push(t,e)}function o{for(var t=0;t<a.length;t+=2)r(a[t],a[t+1]);a.length=0}n.__esModule=!0,n.mixin=r,n.delayMixin=i,n.performMixins=o;var a=[]},{}],128:[function(t,e,n){"use strict";function r(t){t.__plugins={},t.registerPlugin=function(e,n){t.__plugins[e]=n},t.prototype.initPlugins=function{this.plugins=this.plugins||{};for(var e in t.__plugins)this.plugins[e]=new t.__plugins[e](this)},t.prototype.destroyPlugins=function{for(var t in this.plugins)this.plugins[t].destroy,this.plugins[t]=null;this.plugins=null}}n.__esModule=!0,n.default={mixin:function(t){r(t)}}},{}],129:[function(t,e,n){"use strict";function r(t){var e=t.width,n=t.height,r=t.getContext("2d"),i=r.getImageData(0,0,e,n),o=i.data,a=o.length,s={top:null,left:null,right:null,bottom:null},u=void 0,l=void 0,c=void 0;for(u=0;u<a;u+=4)0!==o[u+3]&&(l=u/4%e,c=(u/4/e),null===s.top&&(s.top=c),null===s.left?s.left=l:l<s.left&&(s.left=l),null===s.right?s.right=l+1:s.right<l&&(s.right=l+1),null===s.bottom?s.bottom=c:s.bottom<c&&(s.bottom=c));return e=s.right-s.left,n=s.bottom-s.top+1,{height:n,width:e,data:r.getImageData(s.left,s.top,e,n)}}n.__esModule=!0,n.default=r},{}],130:[function(t,e,n){"use strict";function r(t){var e=(new Error).stack;void 0===e?console.warn("Deprecation Warning: ",t):(e=e.split("\n").splice(3).join("\n"),console.groupCollapsed?(console.groupCollapsed("%cDeprecation Warning: %c%s","color:#614108;background:#fffbe6","font-weight:normal;color:#614108;background:#fffbe6",t),console.warn(e),console.groupEnd):(console.warn("Deprecation Warning: ",t),console.warn(e)))}function i(t){var e=t.mesh,n=t.particles,i=t.extras,o=t.filters,a=t.prepare,s=t.loaders,u=t.interaction;Object.defineProperties(t,{SpriteBatch:{get:function{throw new ReferenceError("SpriteBatch does not exist any more, please use the new ParticleContainer instead.")}},AssetLoader:{get:function{throw new ReferenceError("The loader system was overhauled in pixi v3, please see the new PIXI.loaders.Loader class.")}},Stage:{get:function{return r("You do not need to use a PIXI Stage any more, you can simply render any container."),t.Container}},DisplayObjectContainer:{get:function{return r("DisplayObjectContainer has been shortened to Container, please use Container from now on."),t.Container}},Strip:{get:function{return r("The Strip class has been renamed to Mesh and moved to mesh.Mesh, please use mesh.Mesh from now on."),e.Mesh}},Rope:{get:function{return r("The Rope class has been moved to mesh.Rope, please use mesh.Rope from now on."),e.Rope}},ParticleContainer:{get:function{return r("The ParticleContainer class has been moved to particles.ParticleContainer, please use particles.ParticleContainer from now on."),n.ParticleContainer}},MovieClip:{get:function{return r("The MovieClip class has been moved to extras.AnimatedSprite, please use extras.AnimatedSprite."),i.AnimatedSprite}},TilingSprite:{get:function{return r("The TilingSprite class has been moved to extras.TilingSprite, please use extras.TilingSprite from now on."),i.TilingSprite}},BitmapText:{get:function{return r("The BitmapText class has been moved to extras.BitmapText, please use extras.BitmapText from now on."),i.BitmapText}},blendModes:{get:function{return r("The blendModes has been moved to BLEND_MODES, please use BLEND_MODES from now on."),t.BLEND_MODES}},scaleModes:{get:function{return r("The scaleModes has been moved to SCALE_MODES, please use SCALE_MODES from now on."),t.SCALE_MODES}},BaseTextureCache:{get:function{return r("The BaseTextureCache class has been moved to utils.BaseTextureCache, please use utils.BaseTextureCache from now on."),t.utils.BaseTextureCache}},TextureCache:{get:function{return r("The TextureCache class has been moved to utils.TextureCache, please use utils.TextureCache from now on."),t.utils.TextureCache}},math:{get:function{return r("The math namespace is deprecated, please access members already accessible on PIXI."),t}},AbstractFilter:{get:function{return r("AstractFilter has been renamed to Filter, please use PIXI.Filter"),t.Filter}},TransformManual:{get:function{return r("TransformManual has been renamed to TransformBase, please update your pixi-spine"),t.TransformBase}},TARGET_FPMS:{get:function{return r("PIXI.TARGET_FPMS has been deprecated, please use PIXI.settings.TARGET_FPMS"),t.settings.TARGET_FPMS},set:function(e){r("PIXI.TARGET_FPMS has been deprecated, please use PIXI.settings.TARGET_FPMS"),t.settings.TARGET_FPMS=e}},FILTER_RESOLUTION:{get:function{return r("PIXI.FILTER_RESOLUTION has been deprecated, please use PIXI.settings.FILTER_RESOLUTION"),t.settings.FILTER_RESOLUTION},set:function(e){r("PIXI.FILTER_RESOLUTION has been deprecated, please use PIXI.settings.FILTER_RESOLUTION"),t.settings.FILTER_RESOLUTION=e}},RESOLUTION:{get:function{return r("PIXI.RESOLUTION has been deprecated, please use PIXI.settings.RESOLUTION"),t.settings.RESOLUTION},set:function(e){r("PIXI.RESOLUTION has been deprecated, please use PIXI.settings.RESOLUTION"),t.settings.RESOLUTION=e}},MIPMAP_TEXTURES:{get:function{return r("PIXI.MIPMAP_TEXTURES has been deprecated, please use PIXI.settings.MIPMAP_TEXTURES"),t.settings.MIPMAP_TEXTURES},set:function(e){r("PIXI.MIPMAP_TEXTURES has been deprecated, please use PIXI.settings.MIPMAP_TEXTURES"),t.settings.MIPMAP_TEXTURES=e}},SPRITE_BATCH_SIZE:{get:function{return r("PIXI.SPRITE_BATCH_SIZE has been deprecated, please use PIXI.settings.SPRITE_BATCH_SIZE"),t.settings.SPRITE_BATCH_SIZE},set:function(e){r("PIXI.SPRITE_BATCH_SIZE has been deprecated, please use PIXI.settings.SPRITE_BATCH_SIZE"),t.settings.SPRITE_BATCH_SIZE=e}},SPRITE_MAX_TEXTURES:{get:function{return r("PIXI.SPRITE_MAX_TEXTURES has been deprecated, please use PIXI.settings.SPRITE_MAX_TEXTURES"),t.settings.SPRITE_MAX_TEXTURES},set:function(e){r("PIXI.SPRITE_MAX_TEXTURES has been deprecated, please use PIXI.settings.SPRITE_MAX_TEXTURES"),t.settings.SPRITE_MAX_TEXTURES=e}},RETINA_PREFIX:{get:function{return r("PIXI.RETINA_PREFIX has been deprecated, please use PIXI.settings.RETINA_PREFIX"),t.settings.RETINA_PREFIX},set:function(e){r("PIXI.RETINA_PREFIX has been deprecated, please use PIXI.settings.RETINA_PREFIX"),t.settings.RETINA_PREFIX=e}},DEFAULT_RENDER_OPTIONS:{get:function{return r("PIXI.DEFAULT_RENDER_OPTIONS has been deprecated, please use PIXI.settings.DEFAULT_RENDER_OPTIONS"),t.settings.RENDER_OPTIONS}}});for(var l=[{parent:"TRANSFORM_MODE",target:"TRANSFORM_MODE"},{parent:"GC_MODES",target:"GC_MODE"},{parent:"WRAP_MODES",target:"WRAP_MODE"},{parent:"SCALE_MODES",target:"SCALE_MODE"},{parent:"PRECISION",target:"PRECISION_FRAGMENT"}],c=0;c<l.length;c++)!function(e){var n=l[e];Object.defineProperty(t[n.parent],"DEFAULT",{get:function{return r("PIXI."+n.parent+".DEFAULT has been deprecated, please use PIXI.settings."+n.target),t.settings[n.target]},set:function(e){r("PIXI."+n.parent+".DEFAULT has been deprecated, please use PIXI.settings."+n.target),t.settings[n.target]=e}})}(c);Object.defineProperties(t.settings,{PRECISION:{get:function{return r("PIXI.settings.PRECISION has been deprecated, please use PIXI.settings.PRECISION_FRAGMENT"),t.settings.PRECISION_FRAGMENT},set:function(e){r("PIXI.settings.PRECISION has been deprecated, please use PIXI.settings.PRECISION_FRAGMENT"),t.settings.PRECISION_FRAGMENT=e}}}),Object.defineProperties(i,{MovieClip:{get:function{return r("The MovieClip class has been renamed to AnimatedSprite, please use AnimatedSprite from now on."),i.AnimatedSprite}}}),t.DisplayObject.prototype.generateTexture=function(t,e,n){return r("generateTexture has moved to the renderer, please use renderer.generateTexture(displayObject)"),t.generateTexture(this,e,n)},t.Graphics.prototype.generateTexture=function(t,e){return r("graphics generate texture has moved to the renderer. Or to render a graphics to a texture using canvas please use generateCanvasTexture"),this.generateCanvasTexture(t,e)},t.RenderTexture.prototype.render=function(t,e,n,i){this.legacyRenderer.render(t,this,n,e,!i),r("RenderTexture.render is now deprecated, please use renderer.render(displayObject, renderTexture)")},t.RenderTexture.prototype.getImage=function(t){return r("RenderTexture.getImage is now deprecated, please use renderer.extract.image(target)"),this.legacyRenderer.extract.image(t)},t.RenderTexture.prototype.getBase64=function(t){return r("RenderTexture.getBase64 is now deprecated, please use renderer.extract.base64(target)"),this.legacyRenderer.extract.base64(t)},t.RenderTexture.prototype.getCanvas=function(t){return r("RenderTexture.getCanvas is now deprecated, please use renderer.extract.canvas(target)"),this.legacyRenderer.extract.canvas(t)},t.RenderTexture.prototype.getPixels=function(t){return r("RenderTexture.getPixels is now deprecated, please use renderer.extract.pixels(target)"),this.legacyRenderer.pixels(t)},t.Sprite.prototype.setTexture=function(t){this.texture=t,r("setTexture is now deprecated, please use the texture property, e.g : sprite.texture = texture;")},i.BitmapText.prototype.setText=function(t){this.text=t,r("setText is now deprecated, please use the text property, e.g : myBitmapText.text = 'my text';")},t.Text.prototype.setText=function(t){this.text=t,r("setText is now deprecated, please use the text property, e.g : myText.text = 'my text';")},t.Text.calculateFontProperties=function(e){return r("Text.calculateFontProperties is now deprecated, please use the TextMetrics.measureFont"),t.TextMetrics.measureFont(e)},Object.defineProperties(t.Text,{fontPropertiesCache:{get:function{return r("Text.fontPropertiesCache is deprecated"),t.TextMetrics._fonts}},fontPropertiesCanvas:{get:function{return r("Text.fontPropertiesCanvas is deprecated"),t.TextMetrics._canvas}},fontPropertiesContext:{get:function{return r("Text.fontPropertiesContext is deprecated"),t.TextMetrics._context}}}),t.Text.prototype.setStyle=function(t){this.style=t,r("setStyle is now deprecated, please use the style property, e.g : myText.style = style;")},t.Text.prototype.determineFontProperties=function(e){return r("determineFontProperties is now deprecated, please use TextMetrics.measureFont method"),t.TextMetrics.measureFont(e)},t.Text.getFontStyle=function(e){return r("getFontStyle is now deprecated, please use TextStyle.toFontString instead"),e=e||{},e instanceof t.TextStyle||(e=new t.TextStyle(e)),e.toFontString},Object.defineProperties(t.TextStyle.prototype,{font:{get:function{r("text style property 'font' is now deprecated, please use the 'fontFamily', 'fontSize', 'fontStyle', 'fontVariant' and 'fontWeight' properties from now on");var t="number"==typeof this._fontSize?this._fontSize+"px":this._fontSize;return this._fontStyle+" "+this._fontVariant+" "+this._fontWeight+" "+t+" "+this._fontFamily},set:function(t){r("text style property 'font' is now deprecated, please use the 'fontFamily','fontSize',fontStyle','fontVariant' and 'fontWeight' properties from now on"),t.indexOf("italic")>1?this._fontStyle="italic":t.indexOf("oblique")>-1?this._fontStyle="oblique":this._fontStyle="normal",t.indexOf("small-caps")>-1?this._fontVariant="small-caps":this._fontVariant="normal";var e=t.split(" "),n=-1;this._fontSize=26;for(var i=0;i<e.length;++i)if(e[i].match(/(px|pt|em|%)/)){n=i,this._fontSize=e[i];break}this._fontWeight="normal";for(var o=0;o<n;++o)if(e[o].match(/(bold|bolder|lighter|100|200|300|400|500|600|700|800|900)/)){this._fontWeight=e[o];break}if(n>-1&&n<e.length-1){this._fontFamily="";for(var a=n+1;a<e.length;++a)this._fontFamily+=e[a]+" ";this._fontFamily=this._fontFamily.slice(0,-1)}else this._fontFamily="Arial";this.styleID++}}}),t.Texture.prototype.setFrame=function(t){this.frame=t,r("setFrame is now deprecated, please use the frame property, e.g: myTexture.frame = frame;")},t.Texture.addTextureToCache=function(e,n){t.Texture.addToCache(e,n),r("Texture.addTextureToCache is deprecated, please use Texture.addToCache from now on.")},t.Texture.removeTextureFromCache=function(e){return r("Texture.removeTextureFromCache is deprecated, please use Texture.removeFromCache from now on. Be aware that Texture.removeFromCache does not automatically its BaseTexture from the BaseTextureCache. For that, use BaseTexture.removeFromCache"),t.BaseTexture.removeFromCache(e),t.Texture.removeFromCache(e)},Object.defineProperties(o,{AbstractFilter:{get:function{return r("AstractFilter has been renamed to Filter, please use PIXI.Filter"),t.AbstractFilter}},SpriteMaskFilter:{get:function{return r("filters.SpriteMaskFilter is an undocumented alias, please use SpriteMaskFilter from now on."),t.SpriteMaskFilter}}}),t.utils.uuid=function{return r("utils.uuid is deprecated, please use utils.uid from now on."),t.utils.uid},t.utils.canUseNewCanvasBlendModes=function{return r("utils.canUseNewCanvasBlendModes is deprecated, please use CanvasTinter.canUseMultiply from now on"),t.CanvasTinter.canUseMultiply};var h=!0;if(Object.defineProperty(t.utils,"_saidHello",{set:function(t){t&&(r("PIXI.utils._saidHello is deprecated, please use PIXI.utils.skipHello"),this.skipHello),h=t},get:function{return h}}),a.BasePrepare.prototype.register=function(t,e){return r("renderer.plugins.prepare.register is now deprecated, please use renderer.plugins.prepare.registerFindHook & renderer.plugins.prepare.registerUploadHook"),t&&this.registerFindHook(t),e&&this.registerUploadHook(e),this},Object.defineProperty(a.canvas,"UPLOADS_PER_FRAME",{set:function{r("PIXI.CanvasPrepare.UPLOADS_PER_FRAME has been removed. Please set renderer.plugins.prepare.limiter.maxItemsPerFrame on your renderer")},get:function{return r("PIXI.CanvasPrepare.UPLOADS_PER_FRAME has been removed. Please use renderer.plugins.prepare.limiter"),NaN}}),Object.defineProperty(a.webgl,"UPLOADS_PER_FRAME",{set:function{r("PIXI.WebGLPrepare.UPLOADS_PER_FRAME has been removed. Please set renderer.plugins.prepare.limiter.maxItemsPerFrame on your renderer")},get:function{return r("PIXI.WebGLPrepare.UPLOADS_PER_FRAME has been removed. Please use renderer.plugins.prepare.limiter"),NaN}}),s.Loader){var d=s.Resource,p=s.Loader;Object.defineProperties(d.prototype,{isJson:{get:function{return r("The isJson property is deprecated, please use `resource.type === Resource.TYPE.JSON`."),this.type===d.TYPE.JSON}},isXml:{get:function{return r("The isXml property is deprecated, please use `resource.type === Resource.TYPE.XML`."),this.type===d.TYPE.XML}},isImage:{get:function{return r("The isImage property is deprecated, please use `resource.type === Resource.TYPE.IMAGE`."),this.type===d.TYPE.IMAGE}},isAudio:{get:function{return r("The isAudio property is deprecated, please use `resource.type === Resource.TYPE.AUDIO`."),this.type===d.TYPE.AUDIO}},isVideo:{get:function{return r("The isVideo property is deprecated, please use `resource.type === Resource.TYPE.VIDEO`."),this.type===d.TYPE.VIDEO}}}),Object.defineProperties(p.prototype,{before:{get:function{return r("The before method is deprecated, please use pre."),this.pre}},after:{get:function{return r("The after method is deprecated, please use use."),this.use}}})}Object.defineProperty(u.interactiveTarget,"defaultCursor",{set:function(t){r("Property defaultCursor has been replaced with 'cursor'. "),this.cursor=t},get:function{return r("Property defaultCursor has been replaced with 'cursor'. "),this.cursor}}),Object.defineProperty(u.InteractionManager,"defaultCursorStyle",{set:function(t){r("Property defaultCursorStyle has been replaced with 'cursorStyles.default'. "),this.cursorStyles.default=t},get:function{return r("Property defaultCursorStyle has been replaced with 'cursorStyles.default'. "),this.cursorStyles.default}}),Object.defineProperty(u.InteractionManager,"currentCursorStyle",{set:function(t){r("Property currentCursorStyle has been removed.See the currentCursorMode property, which works differently."),this.currentCursorMode=t},get:function{return r("Property currentCursorStyle has been removed.See the currentCursorMode property, which works differently."),this.currentCursorMode}})}n.__esModule=!0,n.default=i},{}],131:[function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}n.__esModule=!0;var i=t("../../core"),o=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(i),a=new o.Rectangle,s=function{function t(e){r(this,t),this.renderer=e,e.extract=this}return t.prototype.image=function(t){var e=new Image;return e.src=this.base64(t),e},t.prototype.base64=function(t){return this.canvas(t).toDataURL},t.prototype.canvas=function(t){var e=this.renderer,n=void 0,r=void 0,i=void 0,s=void 0;t&&(s=t instanceof o.RenderTexture?t:e.generateTexture(t)),s?(n=s.baseTexture._canvasRenderTarget.context,r=s.baseTexture._canvasRenderTarget.resolution,i=s.frame):(n=e.rootContext,i=a,i.width=this.renderer.width,i.height=this.renderer.height);var u=i.width*r,l=i.height*r,c=new o.CanvasRenderTarget(u,l),h=n.getImageData(i.x*r,i.y*r,u,l);return c.context.putImageData(h,0,0),c.canvas},t.prototype.pixels=function(t){var e=this.renderer,n=void 0,r=void 0,i=void 0,s=void 0;return t&&(s=t instanceof o.RenderTexture?t:e.generateTexture(t)),s?(n=s.baseTexture._canvasRenderTarget.context,r=s.baseTexture._canvasRenderTarget.resolution,i=s.frame):(n=e.rootContext,i=a,i.width=e.width,i.height=e.height),n.getImageData(0,0,i.width*r,i.height*r).data},t.prototype.destroy=function{this.renderer.extract=null,this.renderer=null},t};n.default=s,o.CanvasRenderer.registerPlugin("extract",s)},{"../../core":65}],132:[function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}n.__esModule=!0;var i=t("./webgl/WebGLExtract");Object.defineProperty(n,"webgl",{enumerable:!0,get:function{return r(i).default}});var o=t("./canvas/CanvasExtract");Object.defineProperty(n,"canvas",{enumerable:!0,get:function{return r(o).default}})},{"./canvas/CanvasExtract":131,"./webgl/WebGLExtract":133}],133:[function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}n.__esModule=!0;var i=t("../../core"),o=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(i),a=new o.Rectangle,s=function{function t(e){r(this,t),this.renderer=e,e.extract=this}return t.prototype.image=function(t){var e=new Image;return e.src=this.base64(t),e},t.prototype.base64=function(t){return this.canvas(t).toDataURL},t.prototype.canvas=function(t){var e=this.renderer,n=void 0,r=void 0,i=void 0,s=!1,u=void 0;t&&(u=t instanceof o.RenderTexture?t:this.renderer.generateTexture(t)),u?(n=u.baseTexture._glRenderTargets[this.renderer.CONTEXT_UID],r=n.resolution,i=u.frame,s=!1):(n=this.renderer.rootRenderTarget,r=n.resolution,s=!0,i=a,i.width=n.size.width,i.height=n.size.height);var l=i.width*r,c=i.height*r,h=new o.CanvasRenderTarget(l,c);if(n){e.bindRenderTarget(n);var d=new Uint8Array(4*l*c),p=e.gl;p.readPixels(i.x*r,i.y*r,l,c,p.RGBA,p.UNSIGNED_BYTE,d);var f=h.context.getImageData(0,0,l,c);f.data.set(d),h.context.putImageData(f,0,0),s&&(h.context.scale(1,-1),h.context.drawImage(h.canvas,0,-c))}return h.canvas},t.prototype.pixels=function(t){var e=this.renderer,n=void 0,r=void 0,i=void 0,s=void 0;t&&(s=t instanceof o.RenderTexture?t:this.renderer.generateTexture(t)),s?(n=s.baseTexture._glRenderTargets[this.renderer.CONTEXT_UID],r=n.resolution,i=s.frame):(n=this.renderer.rootRenderTarget,r=n.resolution,i=a,i.width=n.size.width,i.height=n.size.height);var u=i.width*r,l=i.height*r,c=new Uint8Array(4*u*l);if(n){e.bindRenderTarget(n);var h=e.gl;h.readPixels(i.x*r,i.y*r,u,l,h.RGBA,h.UNSIGNED_BYTE,c)}return c},t.prototype.destroy=function{this.renderer.extract=null,this.renderer=null},t};n.default=s,o.WebGLRenderer.registerPlugin("extract",s)},{"../../core":65}],134:[function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}n.__esModule=!0;var a=function{function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}},s=t("../core"),u=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(s),l=function(t){function e(n,o){r(this,e);var a=i(this,t.call(this,n[0]instanceof u.Texture?n[0]:n[0].texture));return a._textures=null,a._durations=null,a.textures=n,a._autoUpdate=!1!==o,a.animationSpeed=1,a.loop=!0,a.onComplete=null,a.onFrameChange=null,a._currentTime=0,a.playing=!1,a}return o(e,t),e.prototype.stop=function{this.playing&&(this.playing=!1,this._autoUpdate&&u.ticker.shared.remove(this.update,this))},e.prototype.play=function{this.playing||(this.playing=!0,this._autoUpdate&&u.ticker.shared.add(this.update,this,u.UPDATE_PRIORITY.HIGH))},e.prototype.gotoAndStop=function(t){this.stop;var e=this.currentFrame;this._currentTime=t,e!==this.currentFrame&&this.updateTexture},e.prototype.gotoAndPlay=function(t){var e=this.currentFrame;this._currentTime=t,e!==this.currentFrame&&this.updateTexture,this.play},e.prototype.update=function(t){var e=this.animationSpeed*t,n=this.currentFrame;if(null!==this._durations){var r=this._currentTime%1*this._durations[this.currentFrame];for(r+=e/60*1e3;r<0;)this._currentTime--,r+=this._durations[this.currentFrame];var i=Math.sign(this.animationSpeed*t);for(this._currentTime=Math.floor(this._currentTime);r>=this._durations[this.currentFrame];)r-=this._durations[this.currentFrame]*i,this._currentTime+=i;this._currentTime+=r/this._durations[this.currentFrame]}else this._currentTime+=e;this._currentTime<0&&!this.loop?(this.gotoAndStop(0),this.onComplete&&this.onComplete):this._currentTime>=this._textures.length&&!this.loop?(this.gotoAndStop(this._textures.length-1),this.onComplete&&this.onComplete):n!==this.currentFrame&&this.updateTexture},e.prototype.updateTexture=function{this._texture=this._textures[this.currentFrame],this._textureID=-1,this.onFrameChange&&this.onFrameChange(this.currentFrame)},e.prototype.destroy=function(e){this.stop,t.prototype.destroy.call(this,e)},e.fromFrames=function(t){for(var n=[],r=0;r<t.length;++r)n.push(u.Texture.fromFrame(t[r]));return new e(n)},e.fromImages=function(t){for(var n=[],r=0;r<t.length;++r)n.push(u.Texture.fromImage(t[r]));return new e(n)},a(e,[{key:"totalFrames",get:function{return this._textures.length}},{key:"textures",get:function{return this._textures},set:function(t){if(t[0]instanceof u.Texture)this._textures=t,this._durations=null;else{this._textures=[],this._durations=[];for(var e=0;e<t.length;e++)this._textures.push(t[e].texture),this._durations.push(t[e].time)}this.gotoAndStop(0),this.updateTexture}},{key:"currentFrame",get:function{var t=Math.floor(this._currentTime)%this._textures.length;return t<0&&(t+=this._textures.length),t}}]),e}(u.Sprite);n.default=l},{"../core":65}],135:[function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}n.__esModule=!0;var s=function{function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}},u=t("../core"),l=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(u),c=t("../core/math/ObservablePoint"),h=r(c),d=t("../core/settings"),p=r(d),f=function(t){function e(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};i(this,e);var a=o(this,t.call(this));return a._textWidth=0,a._textHeight=0,a._glyphs=[],a._font={tint:void 0!==r.tint?r.tint:16777215,align:r.align||"left",name:null,size:0},a.font=r.font,a._text=n,a.maxWidth=0,a.maxLineHeight=0,a._anchor=new h.default(function{a.dirty=!0},a,0,0),a.dirty=!1,a.updateText,a}return a(e,t),e.prototype.updateText=function{for(var t=e.fonts[this._font.name],n=this._font.size/t.size,r=new l.Point,i=[],o=[],a=null,s=0,u=0,c=0,h=-1,d=0,p=0,f=0;f<this.text.length;f++){var g=this.text.charCodeAt(f);if(/(\s)/.test(this.text.charAt(f))&&(h=f,d=s),/(?:\r\n|\r|\n)/.test(this.text.charAt(f)))o.push(s),u=Math.max(u,s),c++,r.x=0,r.y+=t.lineHeight,a=null;else if(-1!==h&&this.maxWidth>0&&r.x*n>this.maxWidth)l.utils.removeItems(i,h,f-h),f=h,h=-1,o.push(d),u=Math.max(u,d),c++,r.x=0,r.y+=t.lineHeight,a=null;else{var m=t.chars[g];m&&(a&&m.kerning[a]&&(r.x+=m.kerning[a]),i.push({texture:m.texture,line:c,charCode:g,position:new l.Point(r.x+m.xOffset,r.y+m.yOffset)}),s=r.x+(m.texture.width+m.xOffset),r.x+=m.xAdvance,p=Math.max(p,m.yOffset+m.texture.height),a=g)}}o.push(s),u=Math.max(u,s);for(var v=[],y=0;y<=c;y++){var _=0;"right"===this._font.align?_=u-o[y]:"center"===this._font.align&&(_=(u-o[y])/2),v.push(_)}for(var b=i.length,x=this.tint,w=0;w<b;w++){var T=this._glyphs[w];T?T.texture=i[w].texture:(T=new l.Sprite(i[w].texture),this._glyphs.push(T)),T.position.x=(i[w].position.x+v[i[w].line])*n,T.position.y=i[w].position.y*n,T.scale.x=T.scale.y=n,T.tint=x,T.parent||this.addChild(T)}for(var S=b;S<this._glyphs.length;++S)this.removeChild(this._glyphs[S]);if(this._textWidth=u*n,this._textHeight=(r.y+t.lineHeight)*n,0!==this.anchor.x||0!==this.anchor.y)for(var E=0;E<b;E++)this._glyphs[E].x-=this._textWidth*this.anchor.x,this._glyphs[E].y-=this._textHeight*this.anchor.y;this.maxLineHeight=p*n},e.prototype.updateTransform=function{this.validate,this.containerUpdateTransform},e.prototype.getLocalBounds=function{return this.validate,t.prototype.getLocalBounds.call(this)},e.prototype.validate=function{this.dirty&&(this.updateText,this.dirty=!1)},e.registerFont=function(t,n){var r={},i=t.getElementsByTagName("info")[0],o=t.getElementsByTagName("common")[0],a=n.baseTexture.resolution||p.default.RESOLUTION;r.font=i.getAttribute("face"),r.size=parseInt(i.getAttribute("size"),10),r.lineHeight=parseInt(o.getAttribute("lineHeight"),10)/a,r.chars={};for(var s=t.getElementsByTagName("char"),u=0;u<s.length;u++){var c=s[u],h=parseInt(c.getAttribute("id"),10),d=new l.Rectangle(parseInt(c.getAttribute("x"),10)/a+n.frame.x/a,parseInt(c.getAttribute("y"),10)/a+n.frame.y/a,parseInt(c.getAttribute("width"),10)/a,parseInt(c.getAttribute("height"),10)/a);r.chars[h]={xOffset:parseInt(c.getAttribute("xoffset"),10)/a,yOffset:parseInt(c.getAttribute("yoffset"),10)/a,xAdvance:parseInt(c.getAttribute("xadvance"),10)/a,kerning:{},texture:new l.Texture(n.baseTexture,d)}}for(var f=t.getElementsByTagName("kerning"),g=0;g<f.length;g++){var m=f[g],v=parseInt(m.getAttribute("first"),10)/a,y=parseInt(m.getAttribute("second"),10)/a,_=parseInt(m.getAttribute("amount"),10)/a;r.chars[y]&&(r.chars[y].kerning[v]=_)}return e.fonts[r.font]=r,r},s(e,[{key:"tint",get:function{return this._font.tint},set:function(t){this._font.tint="number"==typeof t&&t>=0?t:16777215,this.dirty=!0}},{key:"align",get:function{return this._font.align},set:function(t){this._font.align=t||"left",this.dirty=!0}},{key:"anchor",get:function{return this._anchor},set:function(t){"number"==typeof t?this._anchor.set(t):this._anchor.copy(t)}},{key:"font",get:function{return this._font},set:function(t){t&&("string"==typeof t?(t=t.split(" "),this._font.name=1===t.length?t[0]:t.slice(1).join(" "),this._font.size=t.length>=2?parseInt(t[0],10):e.fonts[this._font.name].size):(this._font.name=t.name,this._font.size="number"==typeof t.size?t.size:parseInt(t.size,10)),this.dirty=!0)}},{key:"text",get:function{return this._text},set:function(t){t=t.toString||" ",this._text!==t&&(this._text=t,this.dirty=!0)}},{key:"textWidth",get:function{return this.validate,this._textWidth}},{key:"textHeight",get:function{return this.validate,this._textHeight}}]),e}(l.Container);n.default=f,f.fonts={}},{"../core":65,"../core/math/ObservablePoint":68,"../core/settings":101}],136:[function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}n.__esModule=!0;var i=function{function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}},o=t("../core/math/Matrix"),a=function(t){return t&&t.__esModule?t:{default:t}}(o),s=new a.default,u=function{function t(e,n){r(this,t),this._texture=e,this.mapCoord=new a.default,this.uClampFrame=new Float32Array(4),this.uClampOffset=new Float32Array(2),this._lastTextureID=-1,this.clampOffset=0,this.clampMargin=void 0===n?.5:n}return t.prototype.multiplyUvs=function(t,e){void 0===e&&(e=t);for(var n=this.mapCoord,r=0;r<t.length;r+=2){var i=t[r],o=t[r+1];e[r]=i*n.a+o*n.c+n.tx,e[r+1]=i*n.b+o*n.d+n.ty}return e},t.prototype.update=function(t){var e=this._texture;if(!e||!e.valid)return!1;if(!t&&this._lastTextureID===e._updateID)return!1;this._lastTextureID=e._updateID;var n=e._uvs;this.mapCoord.set(n.x1-n.x0,n.y1-n.y0,n.x3-n.x0,n.y3-n.y0,n.x0,n.y0);var r=e.orig,i=e.trim;i&&(s.set(r.width/i.width,0,0,r.height/i.height,-i.x/i.width,-i.y/i.height),this.mapCoord.append(s));var o=e.baseTexture,a=this.uClampFrame,u=this.clampMargin/o.resolution,l=this.clampOffset;return a[0]=(e._frame.x+u+l)/o.width,a[1]=(e._frame.y+u+l)/o.height,a[2]=(e._frame.x+e._frame.width-u+l)/o.width,a[3]=(e._frame.y+e._frame.height-u+l)/o.height,this.uClampOffset[0]=l/o.realWidth,this.uClampOffset[1]=l/o.realHeight,!0},i(t,[{key:"texture",get:function{return this._texture},set:function(t){this._texture=t,this._lastTextureID=-1}}]),t};n.default=u},{"../core/math/Matrix":67}],137:[function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}n.__esModule=!0;var s=function{function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}},u=t("../core"),l=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(u),c=t("../core/sprites/canvas/CanvasTinter"),h=r(c),d=t("./TextureTransform"),p=r(d),f=new l.Point,g=function(t){function e(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:100,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:100;i(this,e);var s=o(this,t.call(this,n));return s.tileTransform=new l.TransformStatic,s._width=r,s._height=a,s._canvasPattern=null,s.uvTransform=n.transform||new p.default(n),s.pluginName="tilingSprite",s.uvRespectAnchor=!1,s}return a(e,t),e.prototype._onTextureUpdate=function{this.uvTransform&&(this.uvTransform.texture=this._texture)},e.prototype._renderWebGL=function(t){var e=this._texture;e&&e.valid&&(this.tileTransform.updateLocalTransform,this.uvTransform.update,t.setObjectRenderer(t.plugins[this.pluginName]),t.plugins[this.pluginName].render(this))},e.prototype._renderCanvas=function(t){var e=this._texture;if(e.baseTexture.hasLoaded){var n=t.context,r=this.worldTransform,i=t.resolution,o=e.baseTexture,a=o.resolution,s=this.tilePosition.x/this.tileScale.x%e._frame.width*a,u=this.tilePosition.y/this.tileScale.y%e._frame.height*a;if(!this._canvasPattern){var c=new l.CanvasRenderTarget(e._frame.width,e._frame.height,a);16777215!==this.tint?(this.cachedTint!==this.tint&&(this.cachedTint=this.tint,this.tintedTexture=h.default.getTintedTexture(this,this.tint)),c.context.drawImage(this.tintedTexture,0,0)):c.context.drawImage(o.source,-e._frame.x,-e._frame.y),this._canvasPattern=c.context.createPattern(c.canvas,"repeat")}n.globalAlpha=this.worldAlpha,n.setTransform(r.a*i,r.b*i,r.c*i,r.d*i,r.tx*i,r.ty*i),t.setBlendMode(this.blendMode),n.fillStyle=this._canvasPattern,n.scale(this.tileScale.x/a,this.tileScale.y/a);var d=this.anchor.x*-this._width,p=this.anchor.y*-this._height;this.uvRespectAnchor?(n.translate(s,u),n.fillRect(-s+d,-u+p,this._width/this.tileScale.x*a,this._height/this.tileScale.y*a)):(n.translate(s+d,u+p),n.fillRect(-s,-u,this._width/this.tileScale.x*a,this._height/this.tileScale.y*a))}},e.prototype._calculateBounds=function{var t=this._width*-this._anchor._x,e=this._height*-this._anchor._y,n=this._width*(1-this._anchor._x),r=this._height*(1-this._anchor._y);this._bounds.addFrame(this.transform,t,e,n,r)},e.prototype.getLocalBounds=function(e){return 0===this.children.length?(this._bounds.minX=this._width*-this._anchor._x,this._bounds.minY=this._height*-this._anchor._y,this._bounds.maxX=this._width*(1-this._anchor._x),this._bounds.maxY=this._height*(1-this._anchor._x),e||(this._localBoundsRect||(this._localBoundsRect=new l.Rectangle),e=this._localBoundsRect),this._bounds.getRectangle(e)):t.prototype.getLocalBounds.call(this,e)},e.prototype.containsPoint=function(t){this.worldTransform.applyInverse(t,f);var e=this._width,n=this._height,r=-e*this.anchor._x;if(f.x>r&&f.x<r+e){var i=-n*this.anchor._y;if(f.y>i&&f.y<i+n)return!0}return!1},e.prototype.destroy=function(e){t.prototype.destroy.call(this,e),this.tileTransform=null,this.uvTransform=null},e.from=function(t,n,r){return new e(l.Texture.from(t),n,r)},e.fromFrame=function(t,n,r){var i=l.utils.TextureCache[t];if(!i)throw new Error('The frameId "'+t+'" does not exist in the texture cache '+this);return new e(i,n,r)},e.fromImage=function(t,n,r,i,o){return new e(l.Texture.fromImage(t,i,o),n,r)},s(e,[{key:"clampMargin",get:function{return this.uvTransform.clampMargin},set:function(t){this.uvTransform.clampMargin=t,this.uvTransform.update(!0)}},{key:"tileScale",get:function{return this.tileTransform.scale},set:function(t){this.tileTransform.scale.copy(t)}},{key:"tilePosition",get:function{return this.tileTransform.position},set:function(t){this.tileTransform.position.copy(t)}},{key:"width",get:function{return this._width},set:function(t){this._width=t}},{key:"height",get:function{return this._height},set:function(t){this._height=t}}]),e}(l.Sprite);n.default=g},{"../core":65,"../core/sprites/canvas/CanvasTinter":104,"./TextureTransform":136}],138:[function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var o=t("../core"),a=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(o),s=t("../core/textures/Texture"),u=r(s),l=t("../core/textures/BaseTexture"),c=r(l),h=t("../core/utils"),d=a.DisplayObject,p=new a.Matrix;d.prototype._cacheAsBitmap=!1,d.prototype._cacheData=!1;var f=function t{i(this,t),this.textureCacheId=null,this.originalRenderWebGL=null,this.originalRenderCanvas=null,this.originalCalculateBounds=null,this.originalGetLocalBounds=null,this.originalUpdateTransform=null,this.originalHitTest=null,this.originalDestroy=null,this.originalMask=null,this.originalFilterArea=null,this.sprite=null};Object.defineProperties(d.prototype,{cacheAsBitmap:{get:function{return this._cacheAsBitmap},set:function(t){if(this._cacheAsBitmap!==t){this._cacheAsBitmap=t;var e=void 0;t?(this._cacheData||(this._cacheData=new f),e=this._cacheData,e.originalRenderWebGL=this.renderWebGL,e.originalRenderCanvas=this.renderCanvas,e.originalUpdateTransform=this.updateTransform,e.originalCalculateBounds=this._calculateBounds,e.originalGetLocalBounds=this.getLocalBounds,e.originalDestroy=this.destroy,e.originalContainsPoint=this.containsPoint,e.originalMask=this._mask,e.originalFilterArea=this.filterArea,this.renderWebGL=this._renderCachedWebGL,this.renderCanvas=this._renderCachedCanvas,this.destroy=this._cacheAsBitmapDestroy):(e=this._cacheData,e.sprite&&this._destroyCachedDisplayObject,this.renderWebGL=e.originalRenderWebGL,this.renderCanvas=e.originalRenderCanvas,this._calculateBounds=e.originalCalculateBounds,this.getLocalBounds=e.originalGetLocalBounds,this.destroy=e.originalDestroy,this.updateTransform=e.originalUpdateTransform,this.containsPoint=e.originalContainsPoint,this._mask=e.originalMask,this.filterArea=e.originalFilterArea)}}}}),d.prototype._renderCachedWebGL=function(t){!this.visible||this.worldAlpha<=0||!this.renderable||(this._initCachedDisplayObject(t),this._cacheData.sprite._transformID=-1,this._cacheData.sprite.worldAlpha=this.worldAlpha,this._cacheData.sprite._renderWebGL(t))},d.prototype._initCachedDisplayObject=function(t){if(!this._cacheData||!this._cacheData.sprite){var e=this.alpha;this.alpha=1,t.currentRenderer.flush;var n=this.getLocalBounds.clone;if(this._filters){var r=this._filters[0].padding;n.pad(r)}var i=t._activeRenderTarget,o=t.filterManager.filterStack,s=a.RenderTexture.create(0|n.width,0|n.height),l="cacheAsBitmap_"+(0,h.uid);this._cacheData.textureCacheId=l,c.default.addToCache(s.baseTexture,l),u.default.addToCache(s,l);var d=p;d.tx=-n.x,d.ty=-n.y,this.transform.worldTransform.identity,this.renderWebGL=this._cacheData.originalRenderWebGL,t.render(this,s,!0,d,!0),t.bindRenderTarget(i),t.filterManager.filterStack=o,this.renderWebGL=this._renderCachedWebGL,this.updateTransform=this.displayObjectUpdateTransform,this._mask=null,this.filterArea=null;var f=new a.Sprite(s);f.transform.worldTransform=this.transform.worldTransform,f.anchor.x=-n.x/n.width,f.anchor.y=-n.y/n.height,f.alpha=e,f._bounds=this._bounds,this._calculateBounds=this._calculateCachedBounds,this.getLocalBounds=this._getCachedLocalBounds,this._cacheData.sprite=f,this.transform._parentID=-1,this.parent?this.updateTransform:(this.parent=t._tempDisplayObjectParent,this.updateTransform,this.parent=null),this.containsPoint=f.containsPoint.bind(f)}},d.prototype._renderCachedCanvas=function(t){!this.visible||this.worldAlpha<=0||!this.renderable||(this._initCachedDisplayObjectCanvas(t),this._cacheData.sprite.worldAlpha=this.worldAlpha,this._cacheData.sprite.renderCanvas(t))},d.prototype._initCachedDisplayObjectCanvas=function(t){if(!this._cacheData||!this._cacheData.sprite){var e=this.getLocalBounds,n=this.alpha;this.alpha=1;var r=t.context,i=a.RenderTexture.create(0|e.width,0|e.height),o="cacheAsBitmap_"+(0,h.uid);this._cacheData.textureCacheId=o,c.default.addToCache(i.baseTexture,o),u.default.addToCache(i,o);var s=p;this.transform.localTransform.copy(s),s.invert,s.tx-=e.x,s.ty-=e.y,this.renderCanvas=this._cacheData.originalRenderCanvas,t.render(this,i,!0,s,!1),t.context=r,this.renderCanvas=this._renderCachedCanvas,this._calculateBounds=this._calculateCachedBounds,this._mask=null,this.filterArea=null;var l=new a.Sprite(i);l.transform.worldTransform=this.transform.worldTransform,l.anchor.x=-e.x/e.width,l.anchor.y=-e.y/e.height,l._bounds=this._bounds,l.alpha=n,this.parent?this.updateTransform:(this.parent=t._tempDisplayObjectParent,this.updateTransform,this.parent=null),this.updateTransform=this.displayObjectUpdateTransform,this._cacheData.sprite=l,this.containsPoint=l.containsPoint.bind(l)}},d.prototype._calculateCachedBounds=function{this._cacheData.sprite._calculateBounds},d.prototype._getCachedLocalBounds=function{return this._cacheData.sprite.getLocalBounds},d.prototype._destroyCachedDisplayObject=function{this._cacheData.sprite._texture.destroy(!0),this._cacheData.sprite=null,c.default.removeFromCache(this._cacheData.textureCacheId),u.default.removeFromCache(this._cacheData.textureCacheId),this._cacheData.textureCacheId=null},d.prototype._cacheAsBitmapDestroy=function(t){this.cacheAsBitmap=!1,this.destroy(t)}},{"../core":65,"../core/textures/BaseTexture":112,"../core/textures/Texture":115,"../core/utils":124}],139:[function(t,e,n){"use strict";var r=t("../core"),i=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(r);i.DisplayObject.prototype.name=null,i.Container.prototype.getChildByName=function(t){for(var e=0;e<this.children.length;e++)if(this.children[e].name===t)return this.children[e];return null}},{"../core":65}],140:[function(t,e,n){"use strict";var r=t("../core"),i=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(r);i.DisplayObject.prototype.getGlobalPosition=function{var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new i.Point,e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return this.parent?this.parent.toGlobal(this.position,t,e):(t.x=this.position.x,t.y=this.position.y),t}},{"../core":65}],141:[function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}n.__esModule=!0,n.BitmapText=n.TilingSpriteRenderer=n.TilingSprite=n.TextureTransform=n.AnimatedSprite=void 0;var i=t("./AnimatedSprite");Object.defineProperty(n,"AnimatedSprite",{enumerable:!0,get:function{return r(i).default}});var o=t("./TextureTransform");Object.defineProperty(n,"TextureTransform",{enumerable:!0,get:function{return r(o).default}});var a=t("./TilingSprite");Object.defineProperty(n,"TilingSprite",{enumerable:!0,get:function{return r(a).default}});var s=t("./webgl/TilingSpriteRenderer");Object.defineProperty(n,"TilingSpriteRenderer",{enumerable:!0,get:function{return r(s).default}});var u=t("./BitmapText");Object.defineProperty(n,"BitmapText",{enumerable:!0,get:function{return r(u).default}}),t("./cacheAsBitmap"),t("./getChildByName"),t("./getGlobalPosition")},{"./AnimatedSprite":134,"./BitmapText":135,"./TextureTransform":136,"./TilingSprite":137,"./cacheAsBitmap":138,"./getChildByName":139,"./getGlobalPosition":140,"./webgl/TilingSpriteRenderer":142}],142:[function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}n.__esModule=!0;var a=t("../../core"),s=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(a),u=t("../../core/const"),l=(t("path"),new s.Matrix),c=function(t){function e(n){r(this,e);var o=i(this,t.call(this,n));return o.shader=null,o.simpleShader=null,o.quad=null,o}return o(e,t),e.prototype.onContextChange=function{var t=this.renderer.gl;this.shader=new s.Shader(t,"attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\nuniform mat3 translationMatrix;\nuniform mat3 uTransform;\n\nvarying vec2 vTextureCoord;\n\nvoid main(void)\n{\n   gl_Position = vec4((projectionMatrix * translationMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n\n    vTextureCoord = (uTransform * vec3(aTextureCoord, 1.0)).xy;\n}\n","varying vec2 vTextureCoord;\n\nuniform sampler2D uSampler;\nuniform vec4 uColor;\nuniform mat3 uMapCoord;\nuniform vec4 uClampFrame;\nuniform vec2 uClampOffset;\n\nvoid main(void)\n{\n    vec2 coord = mod(vTextureCoord - uClampOffset, vec2(1.0, 1.0)) + uClampOffset;\n    coord = (uMapCoord * vec3(coord, 1.0)).xy;\n    coord = clamp(coord, uClampFrame.xy, uClampFrame.zw);\n\n    vec4 sample = texture2D(uSampler, coord);\n    vec4 color = vec4(uColor.rgb * uColor.a, uColor.a);\n\n    gl_FragColor = sample * color ;\n}\n"),this.simpleShader=new s.Shader(t,"attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\nuniform mat3 translationMatrix;\nuniform mat3 uTransform;\n\nvarying vec2 vTextureCoord;\n\nvoid main(void)\n{\n    gl_Position = vec4((projectionMatrix * translationMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n\n    vTextureCoord = (uTransform * vec3(aTextureCoord, 1.0)).xy;\n}\n","varying vec2 vTextureCoord;\n\nuniform sampler2D uSampler;\nuniform vec4 uColor;\n\nvoid main(void)\n{\n    vec4 sample = texture2D(uSampler, vTextureCoord);\n    vec4 color = vec4(uColor.rgb * uColor.a, uColor.a);\n    gl_FragColor = sample * color;\n}\n"),this.renderer.bindVao(null),this.quad=new s.Quad(t,this.renderer.state.attribState),this.quad.initVao(this.shader)},e.prototype.render=function(t){var e=this.renderer,n=this.quad;e.bindVao(n.vao);var r=n.vertices;r[0]=r[6]=t._width*-t.anchor.x,r[1]=r[3]=t._height*-t.anchor.y,r[2]=r[4]=t._width*(1-t.anchor.x),r[5]=r[7]=t._height*(1-t.anchor.y),t.uvRespectAnchor&&(r=n.uvs,r[0]=r[6]=-t.anchor.x,r[1]=r[3]=-t.anchor.y,r[2]=r[4]=1-t.anchor.x,r[5]=r[7]=1-t.anchor.y),n.upload;var i=t._texture,o=i.baseTexture,a=t.tileTransform.localTransform,c=t.uvTransform,h=o.isPowerOfTwo&&i.frame.width===o.width&&i.frame.height===o.height;h&&(o._glTextures[e.CONTEXT_UID]?h=o.wrapMode!==u.WRAP_MODES.CLAMP:o.wrapMode===u.WRAP_MODES.CLAMP&&(o.wrapMode=u.WRAP_MODES.REPEAT));var d=h?this.simpleShader:this.shader;e.bindShader(d);var p=i.width,f=i.height,g=t._width,m=t._height;l.set(a.a*p/g,a.b*p/m,a.c*f/g,a.d*f/m,a.tx/g,a.ty/m),l.invert,h?l.prepend(c.mapCoord):(d.uniforms.uMapCoord=c.mapCoord.toArray(!0),d.uniforms.uClampFrame=c.uClampFrame,d.uniforms.uClampOffset=c.uClampOffset),d.uniforms.uTransform=l.toArray(!0),d.uniforms.uColor=s.utils.premultiplyTintToRgba(t.tint,t.worldAlpha,d.uniforms.uColor,o.premultiplyAlpha),d.uniforms.translationMatrix=t.transform.worldTransform.toArray(!0),d.uniforms.uSampler=e.bindTexture(i),e.setBlendMode(s.utils.correctBlendMode(t.blendMode,o.premultiplyAlpha)),n.vao.draw(this.renderer.gl.TRIANGLES,6,0)},e}(s.ObjectRenderer);n.default=c,s.WebGLRenderer.registerPlugin("tilingSprite",c)},{"../../core":65,"../../core/const":46,path:8}],143:[function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}n.__esModule=!0;var s=function{function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}},u=t("../../core"),l=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(u),c=t("./BlurXFilter"),h=r(c),d=t("./BlurYFilter"),p=r(d),f=function(t){function e(n,r,a,s){i(this,e);var u=o(this,t.call(this));return u.blurXFilter=new h.default(n,r,a,s),u.blurYFilter=new p.default(n,r,a,s),u.padding=0,u.resolution=a||l.settings.RESOLUTION,u.quality=r||4,u.blur=n||8,u}return a(e,t),e.prototype.apply=function(t,e,n){var r=t.getRenderTarget(!0);this.blurXFilter.apply(t,e,r,!0),this.blurYFilter.apply(t,r,n,!1),t.returnRenderTarget(r)},s(e,[{key:"blur",get:function{return this.blurXFilter.blur},set:function(t){this.blurXFilter.blur=this.blurYFilter.blur=t,this.padding=2*Math.max(Math.abs(this.blurXFilter.strength),Math.abs(this.blurYFilter.strength))}},{key:"quality",get:function{return this.blurXFilter.quality},set:function(t){this.blurXFilter.quality=this.blurYFilter.quality=t}},{key:"blurX",get:function{return this.blurXFilter.blur},set:function(t){this.blurXFilter.blur=t,this.padding=2*Math.max(Math.abs(this.blurXFilter.strength),Math.abs(this.blurYFilter.strength))}},{key:"blurY",get:function{return this.blurYFilter.blur},set:function(t){this.blurYFilter.blur=t,this.padding=2*Math.max(Math.abs(this.blurXFilter.strength),Math.abs(this.blurYFilter.strength))}}]),e}(l.Filter);n.default=f},{"../../core":65,"./BlurXFilter":144,"./BlurYFilter":145}],144:[function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}n.__esModule=!0;var s=function{function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}},u=t("../../core"),l=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(u),c=t("./generateBlurVertSource"),h=r(c),d=t("./generateBlurFragSource"),p=r(d),f=t("./getMaxBlurKernelSize"),g=r(f),m=function(t){function e(n,r,a,s){i(this,e),s=s||5;var u=(0,h.default)(s,!0),c=(0,p.default)(s),d=o(this,t.call(this,u,c));return d.resolution=a||l.settings.RESOLUTION,d._quality=0,d.quality=r||4,d.strength=n||8,d.firstRun=!0,d}return a(e,t),e.prototype.apply=function(t,e,n,r){if(this.firstRun){var i=t.renderer.gl,o=(0,g.default)(i);this.vertexSrc=(0,h.default)(o,!0),this.fragmentSrc=(0,p.default)(o),this.firstRun=!1}if(this.uniforms.strength=1/n.size.width*(n.size.width/e.size.width),this.uniforms.strength*=this.strength,this.uniforms.strength/=this.passes,1===this.passes)t.applyFilter(this,e,n,r);else{for(var a=t.getRenderTarget(!0),s=e,u=a,l=0;l<this.passes-1;l++){t.applyFilter(this,s,u,!0);var c=u;u=s,s=c}t.applyFilter(this,s,n,r),t.returnRenderTarget(a)}},s(e,[{key:"blur",get:function{return this.strength},set:function(t){this.padding=2*Math.abs(t),this.strength=t}},{key:"quality",get:function{return this._quality},set:function(t){this._quality=t,this.passes=t}}]),e}(l.Filter);n.default=m},{"../../core":65,"./generateBlurFragSource":146,"./generateBlurVertSource":147,"./getMaxBlurKernelSize":148}],145:[function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}n.__esModule=!0;var s=function{function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}},u=t("../../core"),l=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(u),c=t("./generateBlurVertSource"),h=r(c),d=t("./generateBlurFragSource"),p=r(d),f=t("./getMaxBlurKernelSize"),g=r(f),m=function(t){function e(n,r,a,s){i(this,e),s=s||5;var u=(0,h.default)(s,!1),c=(0,p.default)(s),d=o(this,t.call(this,u,c));return d.resolution=a||l.settings.RESOLUTION,d._quality=0,d.quality=r||4,d.strength=n||8,d.firstRun=!0,d}return a(e,t),e.prototype.apply=function(t,e,n,r){if(this.firstRun){var i=t.renderer.gl,o=(0,g.default)(i);this.vertexSrc=(0,h.default)(o,!1),this.fragmentSrc=(0,p.default)(o),this.firstRun=!1}if(this.uniforms.strength=1/n.size.height*(n.size.height/e.size.height),this.uniforms.strength*=this.strength,this.uniforms.strength/=this.passes,1===this.passes)t.applyFilter(this,e,n,r);else{for(var a=t.getRenderTarget(!0),s=e,u=a,l=0;l<this.passes-1;l++){t.applyFilter(this,s,u,!0);var c=u;u=s,s=c}t.applyFilter(this,s,n,r),t.returnRenderTarget(a)}},s(e,[{key:"blur",get:function{return this.strength},set:function(t){this.padding=2*Math.abs(t),this.strength=t}},{key:"quality",get:function{return this._quality},set:function(t){this._quality=t,this.passes=t}}]),e}(l.Filter);n.default=m},{"../../core":65,"./generateBlurFragSource":146,"./generateBlurVertSource":147,"./getMaxBlurKernelSize":148}],146:[function(t,e,n){"use strict";function r(t){for(var e=i[t],n=e.length,r=o,a="",s="gl_FragColor += texture2D(uSampler, vBlurTexCoords[%index%]) * %value%;",u=void 0,l=0;l<t;l++){var c=s.replace("%index%",l);u=l,l>=n&&(u=t-l-1),c=c.replace("%value%",e[u]),a+=c,a+="\n"}return r=r.replace("%blur%",a),r=r.replace("%size%",t)}n.__esModule=!0,n.default=r;var i={5:[.153388,.221461,.250301],7:[.071303,.131514,.189879,.214607],9:[.028532,.067234,.124009,.179044,.20236],11:[.0093,.028002,.065984,.121703,.175713,.198596],13:[.002406,.009255,.027867,.065666,.121117,.174868,.197641],15:[489e-6,.002403,.009246,.02784,.065602,.120999,.174697,.197448]},o=["varying vec2 vBlurTexCoords[%size%];","uniform sampler2D uSampler;","void main(void)","{","    gl_FragColor = vec4(0.0);","    %blur%","}"].join("\n")},{}],147:[function(t,e,n){"use strict";function r(t,e){var n=Math.ceil(t/2),r=i,o="",a=void 0;a=e?"vBlurTexCoords[%index%] = aTextureCoord + vec2(%sampleIndex% * strength, 0.0);":"vBlurTexCoords[%index%] = aTextureCoord + vec2(0.0, %sampleIndex% * strength);";for(var s=0;s<t;s++){var u=a.replace("%index%",s);u=u.replace("%sampleIndex%",s-(n-1)+".0"),o+=u,o+="\n"}return r=r.replace("%blur%",o),r=r.replace("%size%",t)}n.__esModule=!0,n.default=r;var i=["attribute vec2 aVertexPosition;","attribute vec2 aTextureCoord;","uniform float strength;","uniform mat3 projectionMatrix;","varying vec2 vBlurTexCoords[%size%];","void main(void)","{","gl_Position = vec4((projectionMatrix * vec3((aVertexPosition), 1.0)).xy, 0.0, 1.0);","%blur%","}"].join("\n")},{}],148:[function(t,e,n){"use strict";function r(t){for(var e=t.getParameter(t.MAX_VARYING_VECTORS),n=15;n>e;)n-=2;return n}n.__esModule=!0,n.default=r},{}],149:[function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}n.__esModule=!0;var a=function{function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}},s=t("../../core"),u=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(s),l=(t("path"),function(t){function e{r(this,e);var n=i(this,t.call(this,"attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\n\nvarying vec2 vTextureCoord;\n\nvoid main(void)\n{\n    gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n    vTextureCoord = aTextureCoord;\n}","varying vec2 vTextureCoord;\nuniform sampler2D uSampler;\nuniform float m[20];\nuniform float uAlpha;\n\nvoid main(void)\n{\n    vec4 c = texture2D(uSampler, vTextureCoord);\n\n    if (uAlpha == 0.0) {\n        gl_FragColor = c;\n        return;\n    }\n\n    // Un-premultiply alpha before applying the color matrix. See issue #3539.\n   if (c.a > 0.0) {\n      c.rgb /= c.a;\n    }\n\n    vec4 result;\n\n    result.r = (m[0] * c.r);\n        result.r += (m[1] * c.g);\n        result.r += (m[2] * c.b);\n        result.r += (m[3] * c.a);\n        result.r += m[4];\n\n    result.g = (m[5] * c.r);\n        result.g += (m[6] * c.g);\n        result.g += (m[7] * c.b);\n        result.g += (m[8] * c.a);\n        result.g += m[9];\n\n    result.b = (m[10] * c.r);\n       result.b += (m[11] * c.g);\n       result.b += (m[12] * c.b);\n       result.b += (m[13] * c.a);\n       result.b += m[14];\n\n    result.a = (m[15] * c.r);\n       result.a += (m[16] * c.g);\n       result.a += (m[17] * c.b);\n       result.a += (m[18] * c.a);\n       result.a += m[19];\n\n    vec3 rgb = mix(c.rgb, result.rgb, uAlpha);\n\n    // Premultiply alpha again.\n    rgb *= result.a;\n\n    gl_FragColor = vec4(rgb, result.a);\n}\n"));return n.uniforms.m=[1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0],n.alpha=1,n}return o(e,t),e.prototype._loadMatrix=function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=t;e&&(this._multiply(n,this.uniforms.m,t),n=this._colorMatrix(n)),this.uniforms.m=n},e.prototype._multiply=function(t,e,n){return t[0]=e[0]*n[0]+e[1]*n[5]+e[2]*n[10]+e[3]*n[15],t[1]=e[0]*n[1]+e[1]*n[6]+e[2]*n[11]+e[3]*n[16],t[2]=e[0]*n[2]+e[1]*n[7]+e[2]*n[12]+e[3]*n[17],t[3]=e[0]*n[3]+e[1]*n[8]+e[2]*n[13]+e[3]*n[18],t[4]=e[0]*n[4]+e[1]*n[9]+e[2]*n[14]+e[3]*n[19]+e[4],t[5]=e[5]*n[0]+e[6]*n[5]+e[7]*n[10]+e[8]*n[15],t[6]=e[5]*n[1]+e[6]*n[6]+e[7]*n[11]+e[8]*n[16],t[7]=e[5]*n[2]+e[6]*n[7]+e[7]*n[12]+e[8]*n[17],t[8]=e[5]*n[3]+e[6]*n[8]+e[7]*n[13]+e[8]*n[18],t[9]=e[5]*n[4]+e[6]*n[9]+e[7]*n[14]+e[8]*n[19]+e[9],t[10]=e[10]*n[0]+e[11]*n[5]+e[12]*n[10]+e[13]*n[15],t[11]=e[10]*n[1]+e[11]*n[6]+e[12]*n[11]+e[13]*n[16],t[12]=e[10]*n[2]+e[11]*n[7]+e[12]*n[12]+e[13]*n[17],t[13]=e[10]*n[3]+e[11]*n[8]+e[12]*n[13]+e[13]*n[18],t[14]=e[10]*n[4]+e[11]*n[9]+e[12]*n[14]+e[13]*n[19]+e[14],t[15]=e[15]*n[0]+e[16]*n[5]+e[17]*n[10]+e[18]*n[15],t[16]=e[15]*n[1]+e[16]*n[6]+e[17]*n[11]+e[18]*n[16],t[17]=e[15]*n[2]+e[16]*n[7]+e[17]*n[12]+e[18]*n[17],t[18]=e[15]*n[3]+e[16]*n[8]+e[17]*n[13]+e[18]*n[18],t[19]=e[15]*n[4]+e[16]*n[9]+e[17]*n[14]+e[18]*n[19]+e[19],t},e.prototype._colorMatrix=function(t){var e=new Float32Array(t);return e[4]/=255,e[9]/=255,e[14]/=255,e[19]/=255,e},e.prototype.brightness=function(t,e){var n=[t,0,0,0,0,0,t,0,0,0,0,0,t,0,0,0,0,0,1,0];this._loadMatrix(n,e)},e.prototype.greyscale=function(t,e){var n=[t,t,t,0,0,t,t,t,0,0,t,t,t,0,0,0,0,0,1,0];this._loadMatrix(n,e)},e.prototype.blackAndWhite=function(t){var e=[.3,.6,.1,0,0,.3,.6,.1,0,0,.3,.6,.1,0,0,0,0,0,1,0];this._loadMatrix(e,t)},e.prototype.hue=function(t,e){t=(t||0)/180*Math.PI;var n=Math.cos(t),r=Math.sin(t),i=Math.sqrt,o=1/3,a=i(o),s=n+(1-n)*o,u=o*(1-n)-a*r,l=o*(1-n)+a*r,c=o*(1-n)+a*r,h=n+o*(1-n),d=o*(1-n)-a*r,p=o*(1-n)-a*r,f=o*(1-n)+a*r,g=n+o*(1-n),m=[s,u,l,0,0,c,h,d,0,0,p,f,g,0,0,0,0,0,1,0];this._loadMatrix(m,e)},e.prototype.contrast=function(t,e){var n=(t||0)+1,r=-128*(n-1),i=[n,0,0,0,r,0,n,0,0,r,0,0,n,0,r,0,0,0,1,0];this._loadMatrix(i,e)},e.prototype.saturate=function{var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments[1],n=2*t/3+1,r=-.5*(n-1),i=[n,r,r,0,0,r,n,r,0,0,r,r,n,0,0,0,0,0,1,0];this._loadMatrix(i,e)},e.prototype.desaturate=function{this.saturate(-1)},e.prototype.negative=function(t){var e=[0,1,1,0,0,1,0,1,0,0,1,1,0,0,0,0,0,0,1,0];this._loadMatrix(e,t)},e.prototype.sepia=function(t){var e=[.393,.7689999,.18899999,0,0,.349,.6859999,.16799999,0,0,.272,.5339999,.13099999,0,0,0,0,0,1,0];this._loadMatrix(e,t)},e.prototype.technicolor=function(t){var e=[1.9125277891456083,-.8545344976951645,-.09155508482755585,0,11.793603434377337,-.3087833385928097,1.7658908555458428,-.10601743074722245,0,-70.35205161461398,-.231103377548616,-.7501899197440212,1.847597816108189,0,30.950940869491138,0,0,0,1,0];this._loadMatrix(e,t)},e.prototype.polaroid=function(t){var e=[1.438,-.062,-.062,0,0,-.122,1.378,-.122,0,0,-.016,-.016,1.483,0,0,0,0,0,1,0];this._loadMatrix(e,t)},e.prototype.toBGR=function(t){var e=[0,0,1,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,1,0];this._loadMatrix(e,t)},e.prototype.kodachrome=function(t){var e=[1.1285582396593525,-.3967382283601348,-.03992559172921793,0,63.72958762196502,-.16404339962244616,1.0835251566291304,-.05498805115633132,0,24.732407896706203,-.16786010706155763,-.5603416277695248,1.6014850761964943,0,35.62982807460946,0,0,0,1,0];this._loadMatrix(e,t)},e.prototype.browni=function(t){var e=[.5997023498159715,.34553243048391263,-.2708298674538042,0,47.43192855600873,-.037703249837783157,.8609577587992641,.15059552388459913,0,-36.96841498319127,.24113635128153335,-.07441037908422492,.44972182064877153,0,-7.562075277591283,0,0,0,1,0];this._loadMatrix(e,t)},e.prototype.vintage=function(t){var e=[.6279345635605994,.3202183420819367,-.03965408211312453,0,9.651285835294123,.02578397704808868,.6441188644374771,.03259127616149294,0,7.462829176470591,.0466055556782719,-.0851232987247891,.5241648018700465,0,5.159190588235296,0,0,0,1,0];this._loadMatrix(e,t)},e.prototype.colorTone=function(t,e,n,r,i){t=t||.2,e=e||.15,n=n||16770432,r=r||3375104;var o=(n>>16&255)/255,a=(n>>8&255)/255,s=(255&n)/255,u=(r>>16&255)/255,l=(r>>8&255)/255,c=(255&r)/255,h=[.3,.59,.11,0,0,o,a,s,t,0,u,l,c,e,0,o-u,a-l,s-c,0,0];this._loadMatrix(h,i)},e.prototype.night=function(t,e){t=t||.1;var n=[-2*t,-t,0,0,0,-t,0,t,0,0,0,t,2*t,0,0,0,0,0,1,0];this._loadMatrix(n,e)},e.prototype.predator=function(t,e){var n=[11.224130630493164*t,-4.794486999511719*t,-2.8746118545532227*t,0*t,.40342438220977783*t,-3.6330697536468506*t,9.193157196044922*t,-2.951810836791992*t,0*t,-1.316135048866272*t,-3.2184197902679443*t,-4.2375030517578125*t,7.476448059082031*t,0*t,.8044459223747253*t,0,0,0,1,0];this._loadMatrix(n,e)},e.prototype.lsd=function(t){var e=[2,-.4,.5,0,0,-.5,2,-.4,0,0,-.4,-.5,3,0,0,0,0,0,1,0];this._loadMatrix(e,t)},e.prototype.reset=function{var t=[1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0];this._loadMatrix(t,!1)},a(e,[{key:"matrix",get:function{return this.uniforms.m},set:function(t){this.uniforms.m=t}},{key:"alpha",get:function{return this.uniforms.uAlpha},set:function(t){this.uniforms.uAlpha=t}}]),e}(u.Filter));n.default=l,l.prototype.grayscale=l.prototype.greyscale},{"../../core":65,path:8}],150:[function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}n.__esModule=!0;var a=function{function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}},s=t("../../core"),u=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(s),l=(t("path"),function(t){function e(n,o){r(this,e);var a=new u.Matrix;n.renderable=!1;var s=i(this,t.call(this,"attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\nuniform mat3 filterMatrix;\n\nvarying vec2 vTextureCoord;\nvarying vec2 vFilterCoord;\n\nvoid main(void)\n{\n   gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n   vFilterCoord = ( filterMatrix * vec3( aTextureCoord, 1.0)  ).xy;\n   vTextureCoord = aTextureCoord;\n}","varying vec2 vFilterCoord;\nvarying vec2 vTextureCoord;\n\nuniform vec2 scale;\n\nuniform sampler2D uSampler;\nuniform sampler2D mapSampler;\n\nuniform vec4 filterClamp;\n\nvoid main(void)\n{\n   vec4 map =  texture2D(mapSampler, vFilterCoord);\n\n   map -= 0.5;\n   map.xy *= scale;\n\n   gl_FragColor = texture2D(uSampler, clamp(vec2(vTextureCoord.x + map.x, vTextureCoord.y + map.y), filterClamp.xy, filterClamp.zw));\n}\n"));return s.maskSprite=n,s.maskMatrix=a,s.uniforms.mapSampler=n._texture,s.uniforms.filterMatrix=a,s.uniforms.scale={x:1,y:1},null!==o&&void 0!==o||(o=20),s.scale=new u.Point(o,o),s}return o(e,t),e.prototype.apply=function(t,e,n){var r=1/n.destinationFrame.width*(n.size.width/e.size.width);this.uniforms.filterMatrix=t.calculateSpriteMatrix(this.maskMatrix,this.maskSprite),this.uniforms.scale.x=this.scale.x*r,this.uniforms.scale.y=this.scale.y*r,t.applyFilter(this,e,n)},a(e,[{key:"map",get:function{return this.uniforms.mapSampler},set:function(t){this.uniforms.mapSampler=t}}]),e}(u.Filter));n.default=l},{"../../core":65,path:8}],151:[function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}n.__esModule=!0;var a=t("../../core"),s=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(a),u=(t("path"),function(t){function e{return r(this,e),i(this,t.call(this,"\nattribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\n\nvarying vec2 v_rgbNW;\nvarying vec2 v_rgbNE;\nvarying vec2 v_rgbSW;\nvarying vec2 v_rgbSE;\nvarying vec2 v_rgbM;\n\nuniform vec4 filterArea;\n\nvarying vec2 vTextureCoord;\n\nvec2 mapCoord( vec2 coord )\n{\n    coord *= filterArea.xy;\n    coord += filterArea.zw;\n\n    return coord;\n}\n\nvec2 unmapCoord( vec2 coord )\n{\n    coord -= filterArea.zw;\n    coord /= filterArea.xy;\n\n    return coord;\n}\n\nvoid texcoords(vec2 fragCoord, vec2 resolution,\n               out vec2 v_rgbNW, out vec2 v_rgbNE,\n               out vec2 v_rgbSW, out vec2 v_rgbSE,\n               out vec2 v_rgbM) {\n    vec2 inverseVP = 1.0 / resolution.xy;\n    v_rgbNW = (fragCoord + vec2(-1.0, -1.0)) * inverseVP;\n    v_rgbNE = (fragCoord + vec2(1.0, -1.0)) * inverseVP;\n    v_rgbSW = (fragCoord + vec2(-1.0, 1.0)) * inverseVP;\n    v_rgbSE = (fragCoord + vec2(1.0, 1.0)) * inverseVP;\n    v_rgbM = vec2(fragCoord * inverseVP);\n}\n\nvoid main(void) {\n\n   gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n\n   vTextureCoord = aTextureCoord;\n\n   vec2 fragCoord = vTextureCoord * filterArea.xy;\n\n   texcoords(fragCoord, filterArea.xy, v_rgbNW, v_rgbNE, v_rgbSW, v_rgbSE, v_rgbM);\n}",'varying vec2 v_rgbNW;\nvarying vec2 v_rgbNE;\nvarying vec2 v_rgbSW;\nvarying vec2 v_rgbSE;\nvarying vec2 v_rgbM;\n\nvarying vec2 vTextureCoord;\nuniform sampler2D uSampler;\nuniform vec4 filterArea;\n\n/**\n Basic FXAA implementation based on the code on geeks3d.com with the\n modification that the texture2DLod stuff was removed since it\'s\n unsupported by WebGL.\n \n --\n \n From:\n https://github.com/mitsuhiko/webgl-meincraft\n \n Copyright (c) 2011 by Armin Ronacher.\n \n Some rights reserved.\n \n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are\n met:\n \n * Redistributions of source code must retain the above copyright\n notice, this list of conditions and the following disclaimer.\n \n * Redistributions in binary form must reproduce the above\n copyright notice, this list of conditions and the following\n disclaimer in the documentation and/or other materials provided\n with the distribution.\n \n * The names of the contributors may not be used to endorse or\n promote products derived from this software without specific\n prior written permission.\n \n THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n#ifndef FXAA_REDUCE_MIN\n#define FXAA_REDUCE_MIN  (1.0/ 128.0)\n#endif\n#ifndef FXAA_REDUCE_MUL\n#define FXAA_REDUCE_MUL   (1.0 / 8.0)\n#endif\n#ifndef FXAA_SPAN_MAX\n#define FXAA_SPAN_MAX     8.0\n#endif\n\n//optimized version for mobile, where dependent\n//texture reads can be a bottleneck\nvec4 fxaa(sampler2D tex, vec2 fragCoord, vec2 resolution,\n          vec2 v_rgbNW, vec2 v_rgbNE,\n          vec2 v_rgbSW, vec2 v_rgbSE,\n          vec2 v_rgbM) {\n    vec4 color;\n    mediump vec2 inverseVP = vec2(1.0 / resolution.x, 1.0 / resolution.y);\n    vec3 rgbNW = texture2D(tex, v_rgbNW).xyz;\n    vec3 rgbNE = texture2D(tex, v_rgbNE).xyz;\n    vec3 rgbSW = texture2D(tex, v_rgbSW).xyz;\n    vec3 rgbSE = texture2D(tex, v_rgbSE).xyz;\n    vec4 texColor = texture2D(tex, v_rgbM);\n    vec3 rgbM  = texColor.xyz;\n    vec3 luma = vec3(0.299, 0.587, 0.114);\n    float lumaNW = dot(rgbNW, luma);\n    float lumaNE = dot(rgbNE, luma);\n    float lumaSW = dot(rgbSW, luma);\n    float lumaSE = dot(rgbSE, luma);\n    float lumaM  = dot(rgbM,  luma);\n    float lumaMin = min(lumaM, min(min(lumaNW, lumaNE), min(lumaSW, lumaSE)));\n    float lumaMax = max(lumaM, max(max(lumaNW, lumaNE), max(lumaSW, lumaSE)));\n    \n    mediump vec2 dir;\n    dir.x = -((lumaNW + lumaNE) - (lumaSW + lumaSE));\n    dir.y =  ((lumaNW + lumaSW) - (lumaNE + lumaSE));\n    \n    float dirReduce = max((lumaNW + lumaNE + lumaSW + lumaSE) *\n                          (0.25 * FXAA_REDUCE_MUL), FXAA_REDUCE_MIN);\n    \n    float rcpDirMin = 1.0 / (min(abs(dir.x), abs(dir.y)) + dirReduce);\n    dir = min(vec2(FXAA_SPAN_MAX, FXAA_SPAN_MAX),\n              max(vec2(-FXAA_SPAN_MAX, -FXAA_SPAN_MAX),\n                  dir * rcpDirMin)) * inverseVP;\n    \n    vec3 rgbA = 0.5 * (\n                       texture2D(tex, fragCoord * inverseVP + dir * (1.0 / 3.0 - 0.5)).xyz +\n                       texture2D(tex, fragCoord * inverseVP + dir * (2.0 / 3.0 - 0.5)).xyz);\n    vec3 rgbB = rgbA * 0.5 + 0.25 * (\n                                     texture2D(tex, fragCoord * inverseVP + dir * -0.5).xyz +\n                                     texture2D(tex, fragCoord * inverseVP + dir * 0.5).xyz);\n    \n    float lumaB = dot(rgbB, luma);\n    if ((lumaB < lumaMin) || (lumaB > lumaMax))\n        color = vec4(rgbA, texColor.a);\n    else\n        color = vec4(rgbB, texColor.a);\n    return color;\n}\n\nvoid main {\n\n      vec2 fragCoord = vTextureCoord * filterArea.xy;\n\n      vec4 color;\n\n    color = fxaa(uSampler, fragCoord, filterArea.xy, v_rgbNW, v_rgbNE, v_rgbSW, v_rgbSE, v_rgbM);\n\n      gl_FragColor = color;\n}\n'))}return o(e,t),e}(s.Filter));n.default=u},{"../../core":65,path:8}],152:[function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}n.__esModule=!0;var i=t("./fxaa/FXAAFilter");Object.defineProperty(n,"FXAAFilter",{enumerable:!0,get:function{return r(i).default}});var o=t("./noise/NoiseFilter");Object.defineProperty(n,"NoiseFilter",{enumerable:!0,get:function{return r(o).default}});var a=t("./displacement/DisplacementFilter");Object.defineProperty(n,"DisplacementFilter",{enumerable:!0,get:function{return r(a).default}});var s=t("./blur/BlurFilter");Object.defineProperty(n,"BlurFilter",{enumerable:!0,get:function{return r(s).default}});var u=t("./blur/BlurXFilter");Object.defineProperty(n,"BlurXFilter",{enumerable:!0,get:function{return r(u).default}});var l=t("./blur/BlurYFilter");Object.defineProperty(n,"BlurYFilter",{enumerable:!0,get:function{return r(l).default}});var c=t("./colormatrix/ColorMatrixFilter");Object.defineProperty(n,"ColorMatrixFilter",{enumerable:!0,get:function{return r(c).default}});var h=t("./void/VoidFilter");Object.defineProperty(n,"VoidFilter",{enumerable:!0,get:function{return r(h).default}})},{"./blur/BlurFilter":143,"./blur/BlurXFilter":144,"./blur/BlurYFilter":145,"./colormatrix/ColorMatrixFilter":149,"./displacement/DisplacementFilter":150,"./fxaa/FXAAFilter":151,"./noise/NoiseFilter":153,"./void/VoidFilter":154}],153:[function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}n.__esModule=!0;var a=function{function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}},s=t("../../core"),u=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(s),l=(t("path"),function(t){function e{var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:.5,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Math.random;r(this,e);var a=i(this,t.call(this,"attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\n\nvarying vec2 vTextureCoord;\n\nvoid main(void)\n{\n    gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n    vTextureCoord = aTextureCoord;\n}","precision highp float;\n\nvarying vec2 vTextureCoord;\nvarying vec4 vColor;\n\nuniform float uNoise;\nuniform float uSeed;\nuniform sampler2D uSampler;\n\nfloat rand(vec2 co)\n{\n    return fract(sin(dot(co.xy, vec2(12.9898, 78.233))) * 43758.5453);\n}\n\nvoid main\n{\n    vec4 color = texture2D(uSampler, vTextureCoord);\n    float randomValue = rand(gl_FragCoord.xy * uSeed);\n    float diff = (randomValue - 0.5) * uNoise;\n\n    // Un-premultiply alpha before applying the color matrix. See issue #3539.\n   if (color.a > 0.0) {\n        color.rgb /= color.a;\n    }\n\n    color.r += diff;\n    color.g += diff;\n    color.b += diff;\n\n    // Premultiply alpha again.\n    color.rgb *= color.a;\n\n    gl_FragColor = color;\n}\n"));return a.noise=n,a.seed=o,a}return o(e,t),a(e,[{key:"noise",get:function{return this.uniforms.uNoise},set:function(t){this.uniforms.uNoise=t}},{key:"seed",get:function{return this.uniforms.uSeed},set:function(t){this.uniforms.uSeed=t}}]),e}(u.Filter));n.default=l},{"../../core":65,path:8}],154:[function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}n.__esModule=!0;var a=t("../../core"),s=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(a),u=(t("path"),function(t){function e{r(this,e);var n=i(this,t.call(this,"attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\n\nvarying vec2 vTextureCoord;\n\nvoid main(void)\n{\n    gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n    vTextureCoord = aTextureCoord;\n}","varying vec2 vTextureCoord;\n\nuniform sampler2D uSampler;\n\nvoid main(void)\n{\n   gl_FragColor = texture2D(uSampler, vTextureCoord);\n}\n"));return n.glShaderKey="void",n}return o(e,t),e}(s.Filter));n.default=u},{"../../core":65,path:8}],155:[function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}n.__esModule=!0;var i=function{function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}},o=t("../core"),a=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(o),s=function{function t{r(this,t),this.global=new a.Point,this.target=null,this.originalEvent=null,this.identifier=null,this.isPrimary=!1,this.button=0,this.buttons=0,this.width=0,this.height=0,this.tiltX=0,this.tiltY=0,this.pointerType=null,this.pressure=0,this.rotationAngle=0,this.twist=0,this.tangentialPressure=0}return t.prototype.getLocalPosition=function(t,e,n){return t.worldTransform.applyInverse(n||this.global,e)},t.prototype._copyEvent=function(t){t.isPrimary&&(this.isPrimary=!0),this.button=t.button,this.buttons=t.buttons,this.width=t.width,this.height=t.height,this.tiltX=t.tiltX,this.tiltY=t.tiltY,this.pointerType=t.pointerType,this.pressure=t.pressure,this.rotationAngle=t.rotationAngle,this.twist=t.twist||0,this.tangentialPressure=t.tangentialPressure||0},t.prototype._reset=function{this.isPrimary=!1},i(t,[{key:"pointerId",get:function{return this.identifier}}]),t};n.default=s},{"../core":65}],156:[function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}n.__esModule=!0;var i=function{function t{r(this,t),this.stopped=!1,this.target=null,this.currentTarget=null,this.type=null,this.data=null}return t.prototype.stopPropagation=function{this.stopped=!0},t.prototype._reset=function{this.stopped=!1,this.currentTarget=null,this.target=null},t};n.default=i},{}],157:[function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}n.__esModule=!0;var s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},u=t("../core"),l=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(u),c=t("./InteractionData"),h=r(c),d=t("./InteractionEvent"),p=r(d),f=t("./InteractionTrackingData"),g=r(f),m=t("eventemitter3"),v=r(m),y=t("./interactiveTarget"),_=r(y);l.utils.mixins.delayMixin(l.DisplayObject.prototype,_.default);var b="MOUSE",x={target:null,data:{global:null}},w=function(t){function e(n,r){i(this,e);var a=o(this,t.call(this));return r=r||{},a.renderer=n,a.autoPreventDefault=void 0===r.autoPreventDefault||r.autoPreventDefault,a.interactionFrequency=r.interactionFrequency||10,a.mouse=new h.default,a.mouse.identifier=b,a.mouse.global.set(-999999),a.activeInteractionData={},a.activeInteractionData[b]=a.mouse,a.interactionDataPool=[],a.eventData=new p.default,a.interactionDOMElement=null,a.moveWhenInside=!1,a.eventsAdded=!1,a.mouseOverRenderer=!1,a.supportsTouchEvents="ontouchstart"in window,a.supportsPointerEvents=!!window.PointerEvent,a.onPointerUp=a.onPointerUp.bind(a),a.processPointerUp=a.processPointerUp.bind(a),a.onPointerCancel=a.onPointerCancel.bind(a),a.processPointerCancel=a.processPointerCancel.bind(a),a.onPointerDown=a.onPointerDown.bind(a),a.processPointerDown=a.processPointerDown.bind(a),a.onPointerMove=a.onPointerMove.bind(a),a.processPointerMove=a.processPointerMove.bind(a),a.onPointerOut=a.onPointerOut.bind(a),a.processPointerOverOut=a.processPointerOverOut.bind(a),a.onPointerOver=a.onPointerOver.bind(a),a.cursorStyles={default:"inherit",pointer:"pointer"},a.currentCursorMode=null,a.cursor=null,a._tempPoint=new l.Point,a.resolution=1,a.setTargetElement(a.renderer.view,a.renderer.resolution),a}return a(e,t),e.prototype.hitTest=function(t,e){return x.target=null,x.data.global=t,e||(e=this.renderer._lastObjectRendered),this.processInteractive(x,e,null,!0),x.target},e.prototype.setTargetElement=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;this.removeEvents,this.interactionDOMElement=t,this.resolution=e,this.addEvents},e.prototype.addEvents=function{this.interactionDOMElement&&(l.ticker.shared.add(this.update,this,l.UPDATE_PRIORITY.INTERACTION),window.navigator.msPointerEnabled?(this.interactionDOMElement.style["-ms-content-zooming"]="none",this.interactionDOMElement.style["-ms-touch-action"]="none"):this.supportsPointerEvents&&(this.interactionDOMElement.style["touch-action"]="none"),this.supportsPointerEvents?(window.document.addEventListener("pointermove",this.onPointerMove,!0),this.interactionDOMElement.addEventListener("pointerdown",this.onPointerDown,!0),this.interactionDOMElement.addEventListener("pointerleave",this.onPointerOut,!0),this.interactionDOMElement.addEventListener("pointerover",this.onPointerOver,!0),window.addEventListener("pointercancel",this.onPointerCancel,!0),window.addEventListener("pointerup",this.onPointerUp,!0)):(window.document.addEventListener("mousemove",this.onPointerMove,!0),this.interactionDOMElement.addEventListener("mousedown",this.onPointerDown,!0),this.interactionDOMElement.addEventListener("mouseout",this.onPointerOut,!0),this.interactionDOMElement.addEventListener("mouseover",this.onPointerOver,!0),window.addEventListener("mouseup",this.onPointerUp,!0)),this.supportsTouchEvents&&(this.interactionDOMElement.addEventListener("touchstart",this.onPointerDown,!0),this.interactionDOMElement.addEventListener("touchcancel",this.onPointerCancel,!0),this.interactionDOMElement.addEventListener("touchend",this.onPointerUp,!0),this.interactionDOMElement.addEventListener("touchmove",this.onPointerMove,!0)),this.eventsAdded=!0)},e.prototype.removeEvents=function{this.interactionDOMElement&&(l.ticker.shared.remove(this.update,this),window.navigator.msPointerEnabled?(this.interactionDOMElement.style["-ms-content-zooming"]="",this.interactionDOMElement.style["-ms-touch-action"]=""):this.supportsPointerEvents&&(this.interactionDOMElement.style["touch-action"]=""),this.supportsPointerEvents?(window.document.removeEventListener("pointermove",this.onPointerMove,!0),this.interactionDOMElement.removeEventListener("pointerdown",this.onPointerDown,!0),this.interactionDOMElement.removeEventListener("pointerleave",this.onPointerOut,!0),this.interactionDOMElement.removeEventListener("pointerover",this.onPointerOver,!0),window.removeEventListener("pointercancel",this.onPointerCancel,!0),window.removeEventListener("pointerup",this.onPointerUp,!0)):(window.document.removeEventListener("mousemove",this.onPointerMove,!0),this.interactionDOMElement.removeEventListener("mousedown",this.onPointerDown,!0),this.interactionDOMElement.removeEventListener("mouseout",this.onPointerOut,!0),this.interactionDOMElement.removeEventListener("mouseover",this.onPointerOver,!0),window.removeEventListener("mouseup",this.onPointerUp,!0)),this.supportsTouchEvents&&(this.interactionDOMElement.removeEventListener("touchstart",this.onPointerDown,!0),this.interactionDOMElement.removeEventListener("touchcancel",this.onPointerCancel,!0),this.interactionDOMElement.removeEventListener("touchend",this.onPointerUp,!0),this.interactionDOMElement.removeEventListener("touchmove",this.onPointerMove,!0)),this.interactionDOMElement=null,this.eventsAdded=!1)},e.prototype.update=function(t){if(this._deltaTime+=t,!(this._deltaTime<this.interactionFrequency)&&(this._deltaTime=0,this.interactionDOMElement)){if(this.didMove)return void(this.didMove=!1);this.cursor=null;for(var e in this.activeInteractionData)if(this.activeInteractionData.hasOwnProperty(e)){var n=this.activeInteractionData[e];if(n.originalEvent&&"touch"!==n.pointerType){var r=this.configureInteractionEventForDOMEvent(this.eventData,n.originalEvent,n);this.processInteractive(r,this.renderer._lastObjectRendered,this.processPointerOverOut,!0)}}this.setCursorMode(this.cursor)}},e.prototype.setCursorMode=function(t){if(t=t||"default",this.currentCursorMode!==t){this.currentCursorMode=t;var e=this.cursorStyles[t];if(e)switch(void 0===e?"undefined":s(e)){case"string":this.interactionDOMElement.style.cursor=e;break;case"function":e(t);break;case"object":Object.assign(this.interactionDOMElement.style,e)}else"string"!=typeof t||Object.prototype.hasOwnProperty.call(this.cursorStyles,t)||(this.interactionDOMElement.style.cursor=t)}},e.prototype.dispatchEvent=function(t,e,n){n.stopped||(n.currentTarget=t,n.type=e,t.emit(e,n),t[e]&&t[e](n))},e.prototype.mapPositionToPoint=function(t,e,n){var r=void 0;r=this.interactionDOMElement.parentElement?this.interactionDOMElement.getBoundingClientRect:{x:0,y:0,width:0,height:0};var i=navigator.isCocoonJS?this.resolution:1/this.resolution;t.x=(e-r.left)*(this.interactionDOMElement.width/r.width)*i,t.y=(n-r.top)*(this.interactionDOMElement.height/r.height)*i},e.prototype.processInteractive=function(t,e,n,r,i){if(!e||!e.visible)return!1;var o=t.data.global;i=e.interactive||i;var a=!1,s=i;if(e.hitArea?s=!1:r&&e._mask&&(e._mask.containsPoint(o)||(r=!1)),e.interactiveChildren&&e.children)for(var u=e.children,l=u.length-1;l>=0;l--){var c=u[l],h=this.processInteractive(t,c,n,r,s);if(h){if(!c.parent)continue;s=!1,h&&(t.target&&(r=!1),a=!0)}}return i&&(r&&!t.target&&(e.hitArea?(e.worldTransform.applyInverse(o,this._tempPoint),e.hitArea.contains(this._tempPoint.x,this._tempPoint.y)&&(a=!0)):e.containsPoint&&e.containsPoint(o)&&(a=!0)),e.interactive&&(a&&!t.target&&(t.target=e),n&&n(t,e,!!a))),a},e.prototype.onPointerDown=function(t){if(!this.supportsTouchEvents||"touch"!==t.pointerType){var e=this.normalizeToPointerData(t);this.autoPreventDefault&&e[0].isNormalized&&t.preventDefault;for(var n=e.length,r=0;r<n;r++){var i=e[r],o=this.getInteractionDataForPointerId(i),a=this.configureInteractionEventForDOMEvent(this.eventData,i,o);if(a.data.originalEvent=t,this.processInteractive(a,this.renderer._lastObjectRendered,this.processPointerDown,!0),this.emit("pointerdown",a),"touch"===i.pointerType)this.emit("touchstart",a);else if("mouse"===i.pointerType||"pen"===i.pointerType){var s=2===i.button;this.emit(s?"rightdown":"mousedown",this.eventData)}}}},e.prototype.processPointerDown=function(t,e,n){var r=t.data,i=t.data.identifier;if(n)if(e.trackedPointers[i]||(e.trackedPointers[i]=new g.default(i)),this.dispatchEvent(e,"pointerdown",t),"touch"===r.pointerType)this.dispatchEvent(e,"touchstart",t);else if("mouse"===r.pointerType||"pen"===r.pointerType){var o=2===r.button;o?e.trackedPointers[i].rightDown=!0:e.trackedPointers[i].leftDown=!0,this.dispatchEvent(e,o?"rightdown":"mousedown",t)}},e.prototype.onPointerComplete=function(t,e,n){for(var r=this.normalizeToPointerData(t),i=r.length,o=t.target!==this.interactionDOMElement?"outside":"",a=0;a<i;a++){var s=r[a],u=this.getInteractionDataForPointerId(s),l=this.configureInteractionEventForDOMEvent(this.eventData,s,u);if(l.data.originalEvent=t,this.processInteractive(l,this.renderer._lastObjectRendered,n,e||!o),this.emit(e?"pointercancel":"pointerup"+o,l),"mouse"===s.pointerType||"pen"===s.pointerType){var c=2===s.button;this.emit(c?"rightup"+o:"mouseup"+o,l)}else"touch"===s.pointerType&&(this.emit(e?"touchcancel":"touchend"+o,l),this.releaseInteractionDataForPointerId(s.pointerId,u))}},e.prototype.onPointerCancel=function(t){this.supportsTouchEvents&&"touch"===t.pointerType||this.onPointerComplete(t,!0,this.processPointerCancel)},e.prototype.processPointerCancel=function(t,e){var n=t.data,r=t.data.identifier;void 0!==e.trackedPointers[r]&&(delete e.trackedPointers[r],this.dispatchEvent(e,"pointercancel",t),"touch"===n.pointerType&&this.dispatchEvent(e,"touchcancel",t))},e.prototype.onPointerUp=function(t){this.supportsTouchEvents&&"touch"===t.pointerType||this.onPointerComplete(t,!1,this.processPointerUp)},e.prototype.processPointerUp=function(t,e,n){var r=t.data,i=t.data.identifier,o=e.trackedPointers[i],a="touch"===r.pointerType;if("mouse"===r.pointerType||"pen"===r.pointerType){var s=2===r.button,u=g.default.FLAGS,l=s?u.RIGHT_DOWN:u.LEFT_DOWN,c=void 0!==o&&o.flags&l;n?(this.dispatchEvent(e,s?"rightup":"mouseup",t),c&&this.dispatchEvent(e,s?"rightclick":"click",t)):c&&this.dispatchEvent(e,s?"rightupoutside":"mouseupoutside",t),o&&(s?o.rightDown=!1:o.leftDown=!1)}n?(this.dispatchEvent(e,"pointerup",t),a&&this.dispatchEvent(e,"touchend",t),o&&(this.dispatchEvent(e,"pointertap",t),a&&(this.dispatchEvent(e,"tap",t),o.over=!1))):o&&(this.dispatchEvent(e,"pointerupoutside",t),a&&this.dispatchEvent(e,"touchendoutside",t)),o&&o.none&&delete e.trackedPointers[i]},e.prototype.onPointerMove=function(t){if(!this.supportsTouchEvents||"touch"!==t.pointerType){var e=this.normalizeToPointerData(t);"mouse"===e[0].pointerType&&(this.didMove=!0,this.cursor=null);for(var n=e.length,r=0;r<n;r++){var i=e[r],o=this.getInteractionDataForPointerId(i),a=this.configureInteractionEventForDOMEvent(this.eventData,i,o);a.data.originalEvent=t;var s="touch"!==i.pointerType||this.moveWhenInside;this.processInteractive(a,this.renderer._lastObjectRendered,this.processPointerMove,s),this.emit("pointermove",a),"touch"===i.pointerType&&this.emit("touchmove",a),"mouse"!==i.pointerType&&"pen"!==i.pointerType||this.emit("mousemove",a)}"mouse"===e[0].pointerType&&this.setCursorMode(this.cursor)}},e.prototype.processPointerMove=function(t,e,n){var r=t.data,i="touch"===r.pointerType,o="mouse"===r.pointerType||"pen"===r.pointerType;o&&this.processPointerOverOut(t,e,n),this.moveWhenInside&&!n||(this.dispatchEvent(e,"pointermove",t),i&&this.dispatchEvent(e,"touchmove",t),o&&this.dispatchEvent(e,"mousemove",t))},e.prototype.onPointerOut=function(t){if(!this.supportsTouchEvents||"touch"!==t.pointerType){var e=this.normalizeToPointerData(t),n=e[0];"mouse"===n.pointerType&&(this.mouseOverRenderer=!1,this.setCursorMode(null));var r=this.getInteractionDataForPointerId(n),i=this.configureInteractionEventForDOMEvent(this.eventData,n,r);i.data.originalEvent=n,this.processInteractive(i,this.renderer._lastObjectRendered,this.processPointerOverOut,!1),this.emit("pointerout",i),"mouse"===n.pointerType||"pen"===n.pointerType?this.emit("mouseout",i):this.releaseInteractionDataForPointerId(r.identifier)}},e.prototype.processPointerOverOut=function(t,e,n){var r=t.data,i=t.data.identifier,o="mouse"===r.pointerType||"pen"===r.pointerType,a=e.trackedPointers[i];n&&!a&&(a=e.trackedPointers[i]=new g.default(i)),void 0!==a&&(n&&this.mouseOverRenderer?(a.over||(a.over=!0,this.dispatchEvent(e,"pointerover",t),o&&this.dispatchEvent(e,"mouseover",t)),o&&null===this.cursor&&(this.cursor=e.cursor)):a.over&&(a.over=!1,this.dispatchEvent(e,"pointerout",this.eventData),o&&this.dispatchEvent(e,"mouseout",t),a.none&&delete e.trackedPointers[i]))},e.prototype.onPointerOver=function(t){var e=this.normalizeToPointerData(t),n=e[0],r=this.getInteractionDataForPointerId(n),i=this.configureInteractionEventForDOMEvent(this.eventData,n,r);i.data.originalEvent=n,"mouse"===n.pointerType&&(this.mouseOverRenderer=!0),this.emit("pointerover",i),"mouse"!==n.pointerType&&"pen"!==n.pointerType||this.emit("mouseover",i)},e.prototype.getInteractionDataForPointerId=function(t){var e=t.pointerId,n=void 0;return e===b||"mouse"===t.pointerType?n=this.mouse:this.activeInteractionData[e]?n=this.activeInteractionData[e]:(n=this.interactionDataPool.pop||new h.default,n.identifier=e,this.activeInteractionData[e]=n),n._copyEvent(t),n},e.prototype.releaseInteractionDataForPointerId=function(t){var e=this.activeInteractionData[t];e&&(delete this.activeInteractionData[t],e._reset,this.interactionDataPool.push(e))},e.prototype.configureInteractionEventForDOMEvent=function(t,e,n){return t.data=n,this.mapPositionToPoint(n.global,e.clientX,e.clientY),navigator.isCocoonJS&&"touch"===e.pointerType&&(n.global.x=n.global.x/this.resolution,n.global.y=n.global.y/this.resolution),"touch"===e.pointerType&&(e.globalX=n.global.x,e.globalY=n.global.y),n.originalEvent=e,t._reset,t},e.prototype.normalizeToPointerData=function(t){var e=[];if(this.supportsTouchEvents&&t instanceof TouchEvent)for(var n=0,r=t.changedTouches.length;n<r;n++){var i=t.changedTouches[n];void 0===i.button&&(i.button=t.touches.length?1:0),void 0===i.buttons&&(i.buttons=t.touches.length?1:0),void 0===i.isPrimary&&(i.isPrimary=1===t.touches.length&&"touchstart"===t.type),void 0===i.width&&(i.width=i.radiusX||1),void 0===i.height&&(i.height=i.radiusY||1),void 0===i.tiltX&&(i.tiltX=0),void 0===i.tiltY&&(i.tiltY=0),void 0===i.pointerType&&(i.pointerType="touch"),void 0===i.pointerId&&(i.pointerId=i.identifier||0),void 0===i.pressure&&(i.pressure=i.force||.5),i.twist=0,i.tangentialPressure=0,void 0===i.layerX&&(i.layerX=i.offsetX=i.clientX),void 0===i.layerY&&(i.layerY=i.offsetY=i.clientY),i.isNormalized=!0,e.push(i)}else!(t instanceof MouseEvent)||this.supportsPointerEvents&&t instanceof window.PointerEvent?e.push(t):(void 0===t.isPrimary&&(t.isPrimary=!0),void 0===t.width&&(t.width=1),void 0===t.height&&(t.height=1),void 0===t.tiltX&&(t.tiltX=0),void 0===t.tiltY&&(t.tiltY=0),void 0===t.pointerType&&(t.pointerType="mouse"),void 0===t.pointerId&&(t.pointerId=b),void 0===t.pressure&&(t.pressure=.5),t.twist=0,t.tangentialPressure=0,t.isNormalized=!0,e.push(t));return e},e.prototype.destroy=function{this.removeEvents,this.removeAllListeners,this.renderer=null,this.mouse=null,this.eventData=null,this.interactionDOMElement=null,this.onPointerDown=null,this.processPointerDown=null,this.onPointerUp=null,this.processPointerUp=null,this.onPointerCancel=null,this.processPointerCancel=null,this.onPointerMove=null,this.processPointerMove=null,this.onPointerOut=null,this.processPointerOverOut=null,this.onPointerOver=null,this._tempPoint=null},e}(v.default);n.default=w,l.WebGLRenderer.registerPlugin("interaction",w),l.CanvasRenderer.registerPlugin("interaction",w)},{"../core":65,"./InteractionData":155,"./InteractionEvent":156,"./InteractionTrackingData":158,"./interactiveTarget":160,eventemitter3:3}],158:[function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}n.__esModule=!0;var i=function{function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}},o=function{function t(e){r(this,t),this._pointerId=e,this._flags=t.FLAGS.NONE}return t.prototype._doSet=function(t,e){this._flags=e?this._flags|t:this._flags&~t},i(t,[{key:"pointerId",get:function{return this._pointerId}},{key:"flags",get:function{return this._flags},set:function(t){this._flags=t}},{key:"none",get:function{return this._flags===this.constructor.FLAGS.NONE}},{key:"over",get:function{return 0!=(this._flags&this.constructor.FLAGS.OVER)},set:function(t){this._doSet(this.constructor.FLAGS.OVER,t)}},{key:"rightDown",get:function{return 0!=(this._flags&this.constructor.FLAGS.RIGHT_DOWN)},set:function(t){this._doSet(this.constructor.FLAGS.RIGHT_DOWN,t)}},{key:"leftDown",get:function{return 0!=(this._flags&this.constructor.FLAGS.LEFT_DOWN)},set:function(t){this._doSet(this.constructor.FLAGS.LEFT_DOWN,t)}}]),t};n.default=o,o.FLAGS=Object.freeze({NONE:0,OVER:1,LEFT_DOWN:2,RIGHT_DOWN:4})},{}],159:[function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}n.__esModule=!0;var i=t("./InteractionData");Object.defineProperty(n,"InteractionData",{enumerable:!0,get:function{return r(i).default}});var o=t("./InteractionManager");Object.defineProperty(n,"InteractionManager",{enumerable:!0,get:function{return r(o).default}});var a=t("./interactiveTarget");Object.defineProperty(n,"interactiveTarget",{enumerable:!0,get:function{return r(a).default}})},{"./InteractionData":155,"./InteractionManager":157,"./interactiveTarget":160}],160:[function(t,e,n){"use strict";n.__esModule=!0,n.default={interactive:!1,interactiveChildren:!0,hitArea:null,get buttonMode{return"pointer"===this.cursor},set buttonMode(t){t?this.cursor="pointer":"pointer"===this.cursor&&(this.cursor=null)},cursor:null,get trackedPointers{return void 0===this._trackedPointers&&(this._trackedPointers={}),this._trackedPointers},_trackedPointers:void 0}},{}],161:[function(t,e,n){"use strict";function r(t,e){t.bitmapFont=u.BitmapText.registerFont(t.data,e)}n.__esModule=!0,n.parse=r,n.default=function{return function(t,e){if(!t.data||t.type!==s.Resource.TYPE.XML)return void e;if(0===t.data.getElementsByTagName("page").length||0===t.data.getElementsByTagName("info").length||null===t.data.getElementsByTagName("info")[0].getAttribute("face"))return void e;var n=t.isDataUrl?"":o.dirname(t.url);t.isDataUrl&&("."===n&&(n=""),this.baseUrl&&n&&("/"===this.baseUrl.charAt(this.baseUrl.length-1)&&(n+="/"),n=n.replace(this.baseUrl,""))),n&&"/"!==n.charAt(n.length-1)&&(n+="/");var i=n+t.data.getElementsByTagName("page")[0].getAttribute("file");if(a.utils.TextureCache[i])r(t,a.utils.TextureCache[i]),e;else{var u={crossOrigin:t.crossOrigin,loadType:s.Resource.LOAD_TYPE.IMAGE,metadata:t.metadata.imageMetadata,parentResource:t};this.add(t.name+"_image",i,u,function(n){r(t,n.texture),e})}}};var i=t("path"),o=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(i),a=t("../core"),s=t("resource-loader"),u=t("../extras")},{"../core":65,"../extras":141,path:8,"resource-loader":36}],162:[function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}n.__esModule=!0,n.shared=n.Resource=n.textureParser=n.getResourcePath=n.spritesheetParser=n.parseBitmapFontData=n.bitmapFontParser=n.Loader=void 0;var i=t("./bitmapFontParser");Object.defineProperty(n,"bitmapFontParser",{enumerable:!0,get:function{return r(i).default}}),Object.defineProperty(n,"parseBitmapFontData",{enumerable:!0,get:function{return i.parse}});var o=t("./spritesheetParser");Object.defineProperty(n,"spritesheetParser",{enumerable:!0,get:function{return r(o).default}}),Object.defineProperty(n,"getResourcePath",{enumerable:!0,get:function{return o.getResourcePath}});var a=t("./textureParser");Object.defineProperty(n,"textureParser",{enumerable:!0,get:function{return r(a).default}});var s=t("resource-loader");Object.defineProperty(n,"Resource",{enumerable:!0,get:function{return s.Resource}});var u=t("../core/Application"),l=r(u),c=t("./loader"),h=r(c);n.Loader=h.default;var d=new h.default;d.destroy=function{},n.shared=d;var p=l.default.prototype;p._loader=null,Object.defineProperty(p,"loader",{get:function{if(!this._loader){var t=this._options.sharedLoader;this._loader=t?d:new h.default}return this._loader}}),p._parentDestroy=p.destroy,p.destroy=function(t){this._loader&&(this._loader.destroy,this._loader=null),this._parentDestroy(t)}},{"../core/Application":43,"./bitmapFontParser":161,"./loader":163,"./spritesheetParser":164,"./textureParser":165,"resource-loader":36}],163:[function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}n.__esModule=!0;var s=t("resource-loader"),u=r(s),l=t("resource-loader/lib/middlewares/parsing/blob"),c=t("eventemitter3"),h=r(c),d=t("./textureParser"),p=r(d),f=t("./spritesheetParser"),g=r(f),m=t("./bitmapFontParser"),v=r(m),y=function(t){function e(n,r){i(this,e);var a=o(this,t.call(this,n,r));h.default.call(a);for(var s=0;s<e._pixiMiddleware.length;++s)a.use(e._pixiMiddleware[s]);return a.onStart.add(function(t){return a.emit("start",t)}),a.onProgress.add(function(t,e){return a.emit("progress",t,e)}),a.onError.add(function(t,e,n){return a.emit("error",t,e,n)}),a.onLoad.add(function(t,e){return a.emit("load",t,e)}),a.onComplete.add(function(t,e){return a.emit("complete",t,e)}),a}return a(e,t),e.addPixiMiddleware=function(t){e._pixiMiddleware.push(t)},e.prototype.destroy=function{this.removeAllListeners,this.reset},e}(u.default);n.default=y;for(var _ in h.default.prototype)y.prototype[_]=h.default.prototype[_];y._pixiMiddleware=[l.blobMiddlewareFactory,p.default,g.default,v.default];var b=u.default.Resource;b.setExtensionXhrType("fnt",b.XHR_RESPONSE_TYPE.DOCUMENT)},{"./bitmapFontParser":161,"./spritesheetParser":164,"./textureParser":165,eventemitter3:3,"resource-loader":36,"resource-loader/lib/middlewares/parsing/blob":37}],164:[function(t,e,n){"use strict";function r(t,e){return t.isDataUrl?t.data.meta.image:a.default.resolve(t.url.replace(e,""),t.data.meta.image)}n.__esModule=!0,n.default=function{return function(t,e){var n=t.name+"_image";if(!t.data||t.type!==i.Resource.TYPE.JSON||!t.data.frames||this.resources[n])return void e;var o={crossOrigin:t.crossOrigin,loadType:i.Resource.LOAD_TYPE.IMAGE,metadata:t.metadata.imageMetadata,parentResource:t},a=r(t,this.baseUrl);this.add(n,a,o,function(n){var r=new s.Spritesheet(n.texture.baseTexture,t.data,t.url);r.parse(function{t.spritesheet=r,t.textures=r.textures,e})})}},n.getResourcePath=r;var i=t("resource-loader"),o=t("url"),a=function(t){return t&&t.__esModule?t:{default:t}}(o),s=t("../core")},{"../core":65,"resource-loader":36,url:38}],165:[function(t,e,n){"use strict";n.__esModule=!0,n.default=function{return function(t,e){t.data&&t.type===r.Resource.TYPE.IMAGE&&(t.texture=o.default.fromLoader(t.data,t.url,t.name)),e}};var r=t("resource-loader"),i=t("../core/textures/Texture"),o=function(t){return t&&t.__esModule?t:{default:t}}(i)},{"../core/textures/Texture":115,"resource-loader":36}],166:[function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}n.__esModule=!0;var a=function{function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}},s=t("../core"),u=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(s),l=t("../extras/TextureTransform"),c=function(t){return t&&t.__esModule?t:{default:t}}(l),h=new u.Point,d=new u.Polygon,p=function(t){function e(n,o,a,s,l){r(this,e);var h=i(this,t.call(this));return h._texture=n,h.uvs=a||new Float32Array([0,0,1,0,1,1,0,1]),h.vertices=o||new Float32Array([0,0,100,0,100,100,0,100]),h.indices=s||new Uint16Array([0,1,3,2]),h.dirty=0,h.indexDirty=0,h.blendMode=u.BLEND_MODES.NORMAL,h.canvasPadding=0,h.drawMode=l||e.DRAW_MODES.TRIANGLE_MESH,h.shader=null,h.tintRgb=new Float32Array([1,1,1]),h._glDatas={},h._uvTransform=new c.default(n),h.uploadUvTransform=!1,h.pluginName="mesh",h}return o(e,t),e.prototype._renderWebGL=function(t){this.refresh,t.setObjectRenderer(t.plugins[this.pluginName]),t.plugins[this.pluginName].render(this)},e.prototype._renderCanvas=function(t){this.refresh,t.plugins[this.pluginName].render(this)},e.prototype._onTextureUpdate=function{this._uvTransform.texture=this._texture,this.refresh},e.prototype.multiplyUvs=function{this.uploadUvTransform||this._uvTransform.multiplyUvs(this.uvs)},e.prototype.refresh=function(t){this._uvTransform.update(t)&&this._refresh},e.prototype._refresh=function{},e.prototype._calculateBounds=function{this._bounds.addVertices(this.transform,this.vertices,0,this.vertices.length)},e.prototype.containsPoint=function(t){if(!this.getBounds.contains(t.x,t.y))return!1;this.worldTransform.applyInverse(t,h);for(var n=this.vertices,r=d.points,i=this.indices,o=this.indices.length,a=this.drawMode===e.DRAW_MODES.TRIANGLES?3:1,s=0;s+2<o;s+=a){var u=2*i[s],l=2*i[s+1],c=2*i[s+2];if(r[0]=n[u],r[1]=n[u+1],r[2]=n[l],r[3]=n[l+1],r[4]=n[c],r[5]=n[c+1],d.contains(h.x,h.y))return!0}return!1},a(e,[{key:"texture",get:function{return this._texture},set:function(t){this._texture!==t&&(this._texture=t,t&&(t.baseTexture.hasLoaded?this._onTextureUpdate:t.once("update",this._onTextureUpdate,this)))}},{key:"tint",get:function{return u.utils.rgb2hex(this.tintRgb)},set:function(t){this.tintRgb=u.utils.hex2rgb(t,this.tintRgb)}}]),e}(u.Container);n.default=p,p.DRAW_MODES={TRIANGLE_MESH:0,TRIANGLES:1}},{"../core":65,"../extras/TextureTransform":136}],167:[function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}n.__esModule=!0;var a=function{function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}},s=t("./Plane"),u=function(t){return t&&t.__esModule?t:{default:t}}(s),l=10,c=function(t){function e(n,o,a,s,u){r(this,e);var c=i(this,t.call(this,n,4,4));return c._origWidth=n.orig.width,c._origHeight=n.orig.height,c._width=c._origWidth,c._height=c._origHeight,c.leftWidth=void 0!==o?o:l,c.rightWidth=void 0!==s?s:l,c.topHeight=void 0!==a?a:l,c.bottomHeight=void 0!==u?u:l,c.refresh(!0),c}return o(e,t),e.prototype.updateHorizontalVertices=function{var t=this.vertices;t[9]=t[11]=t[13]=t[15]=this._topHeight,t[17]=t[19]=t[21]=t[23]=this._height-this._bottomHeight,t[25]=t[27]=t[29]=t[31]=this._height},e.prototype.updateVerticalVertices=function{var t=this.vertices;t[2]=t[10]=t[18]=t[26]=this._leftWidth,t[4]=t[12]=t[20]=t[28]=this._width-this._rightWidth,t[6]=t[14]=t[22]=t[30]=this._width},e.prototype._renderCanvas=function(t){var e=t.context;e.globalAlpha=this.worldAlpha;var n=this.worldTransform,r=t.resolution;t.roundPixels?e.setTransform(n.a*r,n.b*r,n.c*r,n.d*r,n.tx*r|0,n.ty*r|0):e.setTransform(n.a*r,n.b*r,n.c*r,n.d*r,n.tx*r,n.ty*r);var i=this._texture.baseTexture,o=i.source,a=i.width,s=i.height;this.drawSegment(e,o,a,s,0,1,10,11),this.drawSegment(e,o,a,s,2,3,12,13),this.drawSegment(e,o,a,s,4,5,14,15),this.drawSegment(e,o,a,s,8,9,18,19),this.drawSegment(e,o,a,s,10,11,20,21),this.drawSegment(e,o,a,s,12,13,22,23),this.drawSegment(e,o,a,s,16,17,26,27),this.drawSegment(e,o,a,s,18,19,28,29),this.drawSegment(e,o,a,s,20,21,30,31)},e.prototype.drawSegment=function(t,e,n,r,i,o,a,s){var u=this.uvs,l=this.vertices,c=(u[a]-u[i])*n,h=(u[s]-u[o])*r,d=l[a]-l[i],p=l[s]-l[o];c<1&&(c=1),h<1&&(h=1),d<1&&(d=1),p<1&&(p=1),t.drawImage(e,u[i]*n,u[o]*r,c,h,l[i],l[o],d,p)},e.prototype._refresh=function{t.prototype._refresh.call(this);var e=this.uvs,n=this._texture;this._origWidth=n.orig.width,this._origHeight=n.orig.height;var r=1/this._origWidth,i=1/this._origHeight;e[0]=e[8]=e[16]=e[24]=0,e[1]=e[3]=e[5]=e[7]=0,e[6]=e[14]=e[22]=e[30]=1,e[25]=e[27]=e[29]=e[31]=1,e[2]=e[10]=e[18]=e[26]=r*this._leftWidth,e[4]=e[12]=e[20]=e[28]=1-r*this._rightWidth,e[9]=e[11]=e[13]=e[15]=i*this._topHeight,e[17]=e[19]=e[21]=e[23]=1-i*this._bottomHeight,this.updateHorizontalVertices,this.updateVerticalVertices,this.dirty=!0,this.multiplyUvs},a(e,[{key:"width",get:function{return this._width},set:function(t){this._width=t,this._refresh}},{key:"height",get:function{return this._height},set:function(t){this._height=t,this._refresh}},{key:"leftWidth",get:function{return this._leftWidth},set:function(t){this._leftWidth=t,this._refresh}},{key:"rightWidth",get:function{return this._rightWidth},set:function(t){this._rightWidth=t,this._refresh}},{key:"topHeight",get:function{return this._topHeight},set:function(t){this._topHeight=t,this._refresh}},{key:"bottomHeight",get:function{return this._bottomHeight},set:function(t){this._bottomHeight=t,this._refresh}}]),e}(u.default);n.default=c},{"./Plane":168}],168:[function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}n.__esModule=!0;var a=t("./Mesh"),s=function(t){return t&&t.__esModule?t:{default:t}}(a),u=function(t){function e(n,o,a){r(this,e);var u=i(this,t.call(this,n));return u._ready=!0,u.verticesX=o||10,u.verticesY=a||10,u.drawMode=s.default.DRAW_MODES.TRIANGLES,u.refresh,u}return o(e,t),e.prototype._refresh=function{for(var t=this._texture,e=this.verticesX*this.verticesY,n=[],r=[],i=[],o=[],a=this.verticesX-1,s=this.verticesY-1,u=t.width/a,l=t.height/s,c=0;c<e;c++){var h=c%this.verticesX,d=c/this.verticesX|0;n.push(h*u,d*l),i.push(h/a,d/s)}for(var p=a*s,f=0;f<p;f++){var g=f%a,m=f/a|0,v=m*this.verticesX+g,y=m*this.verticesX+g+1,_=(m+1)*this.verticesX+g,b=(m+1)*this.verticesX+g+1;o.push(v,y,_),o.push(y,b,_)}this.vertices=new Float32Array(n),this.uvs=new Float32Array(i),this.colors=new Float32Array(r),this.indices=new Uint16Array(o),this.indexDirty=!0,this.multiplyUvs},e.prototype._onTextureUpdate=function{s.default.prototype._onTextureUpdate.call(this),this._ready&&this.refresh},e}(s.default);n.default=u},{"./Mesh":166}],169:[function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}n.__esModule=!0;var a=t("./Mesh"),s=function(t){return t&&t.__esModule?t:{default:t}}(a),u=function(t){function e(n,o){r(this,e);var a=i(this,t.call(this,n));return a.points=o,a.vertices=new Float32Array(4*o.length),a.uvs=new Float32Array(4*o.length),a.colors=new Float32Array(2*o.length),a.indices=new Uint16Array(2*o.length),a.autoUpdate=!0,a.refresh,a}return o(e,t),e.prototype._refresh=function{var t=this.points;if(!(t.length<1)&&this._texture._uvs){this.vertices.length/4!==t.length&&(this.vertices=new Float32Array(4*t.length),this.uvs=new Float32Array(4*t.length),this.colors=new Float32Array(2*t.length),this.indices=new Uint16Array(2*t.length));var e=this.uvs,n=this.indices,r=this.colors;e[0]=0,e[1]=0,e[2]=0,e[3]=1,r[0]=1,r[1]=1,n[0]=0,n[1]=1;for(var i=t.length,o=1;o<i;o++){var a=4*o,s=o/(i-1);e[a]=s,e[a+1]=0,e[a+2]=s,e[a+3]=1,a=2*o,r[a]=1,r[a+1]=1,a=2*o,n[a]=a,n[a+1]=a+1}this.dirty++,this.indexDirty++,this.multiplyUvs,this.refreshVertices}},e.prototype.refreshVertices=function{var t=this.points;if(!(t.length<1))for(var e=t[0],n=void 0,r=0,i=0,o=this.vertices,a=t.length,s=0;s<a;s++){var u=t[s],l=4*s;n=s<t.length-1?t[s+1]:u,i=-(n.x-e.x),r=n.y-e.y;var c=10*(1-s/(a-1));c>1&&(c=1);var h=Math.sqrt(r*r+i*i),d=this._texture.height/2;r/=h,i/=h,r*=d,i*=d,o[l]=u.x+r,o[l+1]=u.y+i,o[l+2]=u.x-r,o[l+3]=u.y-i,e=u}},e.prototype.updateTransform=function{this.autoUpdate&&this.refreshVertices,this.containerUpdateTransform},e}(s.default);n.default=u},{"./Mesh":166}],170:[function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}n.__esModule=!0;var i=t("../../core"),o=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(i),a=t("../Mesh"),s=function(t){return t&&t.__esModule?t:{default:t}}(a),u=function{function t(e){r(this,t),this.renderer=e}return t.prototype.render=function(t){var e=this.renderer,n=e.context,r=t.worldTransform,i=e.resolution;e.roundPixels?n.setTransform(r.a*i,r.b*i,r.c*i,r.d*i,r.tx*i|0,r.ty*i|0):n.setTransform(r.a*i,r.b*i,r.c*i,r.d*i,r.tx*i,r.ty*i),e.setBlendMode(t.blendMode),t.drawMode===s.default.DRAW_MODES.TRIANGLE_MESH?this._renderTriangleMesh(t):this._renderTriangles(t)},t.prototype._renderTriangleMesh=function(t){for(var e=t.vertices.length/2,n=0;n<e-2;n++){var r=2*n;this._renderDrawTriangle(t,r,r+2,r+4)}},t.prototype._renderTriangles=function(t){for(var e=t.indices,n=e.length,r=0;r<n;r+=3){var i=2*e[r],o=2*e[r+1],a=2*e[r+2];this._renderDrawTriangle(t,i,o,a)}},t.prototype._renderDrawTriangle=function(t,e,n,r){var i=this.renderer.context,o=t.uvs,a=t.vertices,s=t._texture;if(s.valid){var u=s.baseTexture,l=u.source,c=u.width,h=u.height,d=void 0,p=void 0,f=void 0,g=void 0,m=void 0,v=void 0;if(t.uploadUvTransform){var y=t._uvTransform.mapCoord;d=(o[e]*y.a+o[e+1]*y.c+y.tx)*u.width,p=(o[n]*y.a+o[n+1]*y.c+y.tx)*u.width,f=(o[r]*y.a+o[r+1]*y.c+y.tx)*u.width,g=(o[e]*y.b+o[e+1]*y.d+y.ty)*u.height,m=(o[n]*y.b+o[n+1]*y.d+y.ty)*u.height,v=(o[r]*y.b+o[r+1]*y.d+y.ty)*u.height}else d=o[e]*u.width,p=o[n]*u.width,f=o[r]*u.width,g=o[e+1]*u.height,m=o[n+1]*u.height,v=o[r+1]*u.height;var _=a[e],b=a[n],x=a[r],w=a[e+1],T=a[n+1],S=a[r+1];if(t.canvasPadding>0){var E=t.canvasPadding/t.worldTransform.a,P=t.canvasPadding/t.worldTransform.d,M=(_+b+x)/3,C=(w+T+S)/3,A=_-M,O=w-C,I=Math.sqrt(A*A+O*O);_=M+A/I*(I+E),w=C+O/I*(I+P),A=b-M,O=T-C,I=Math.sqrt(A*A+O*O),b=M+A/I*(I+E),T=C+O/I*(I+P),A=x-M,O=S-C,I=Math.sqrt(A*A+O*O),x=M+A/I*(I+E),S=C+O/I*(I+P)}i.save,i.beginPath,i.moveTo(_,w),i.lineTo(b,T),i.lineTo(x,S),i.closePath,i.clip;var k=d*m+g*f+p*v-m*f-g*p-d*v,R=_*m+g*x+b*v-m*x-g*b-_*v,D=d*b+_*f+p*x-b*f-_*p-d*x,L=d*m*x+g*b*f+_*p*v-_*m*f-g*p*x-d*b*v,j=w*m+g*S+T*v-m*S-g*T-w*v,B=d*T+w*f+p*S-T*f-w*p-d*S,N=d*m*S+g*T*f+w*p*v-w*m*f-g*p*S-d*T*v;i.transform(R/k,j/k,D/k,B/k,L/k,N/k),i.drawImage(l,0,0,c*u.resolution,h*u.resolution,0,0,c,h),i.restore}},t.prototype.renderMeshFlat=function(t){var e=this.renderer.context,n=t.vertices,r=n.length/2;e.beginPath;for(var i=1;i<r-2;++i){var o=2*i,a=n[o],s=n[o+1],u=n[o+2],l=n[o+3],c=n[o+4],h=n[o+5];e.moveTo(a,s),e.lineTo(u,l),e.lineTo(c,h)}e.fillStyle="#FF0000",e.fill,e.closePath},t.prototype.destroy=function{this.renderer=null},t};n.default=u,o.CanvasRenderer.registerPlugin("mesh",u)},{"../../core":65,"../Mesh":166}],171:[function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}n.__esModule=!0;var i=t("./Mesh");Object.defineProperty(n,"Mesh",{enumerable:!0,get:function{return r(i).default}});var o=t("./webgl/MeshRenderer");Object.defineProperty(n,"MeshRenderer",{enumerable:!0,get:function{return r(o).default}});var a=t("./canvas/CanvasMeshRenderer");Object.defineProperty(n,"CanvasMeshRenderer",{enumerable:!0,get:function{return r(a).default}});var s=t("./Plane");Object.defineProperty(n,"Plane",{enumerable:!0,get:function{return r(s).default}});var u=t("./NineSlicePlane");Object.defineProperty(n,"NineSlicePlane",{enumerable:!0,get:function{return r(u).default}});var l=t("./Rope");Object.defineProperty(n,"Rope",{enumerable:!0,get:function{return r(l).default}})},{"./Mesh":166,"./NineSlicePlane":167,"./Plane":168,"./Rope":169,"./canvas/CanvasMeshRenderer":170,"./webgl/MeshRenderer":172}],172:[function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}n.__esModule=!0;var s=t("../../core"),u=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(s),l=t("pixi-gl-core"),c=r(l),h=t("../Mesh"),d=r(h),p=(t("path"),u.Matrix.IDENTITY),f=function(t){function e(n){i(this,e);var r=o(this,t.call(this,n));return r.shader=null,r}return a(e,t),e.prototype.onContextChange=function{var t=this.renderer.gl;this.shader=new u.Shader(t,"attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\nuniform mat3 translationMatrix;\nuniform mat3 uTransform;\n\nvarying vec2 vTextureCoord;\n\nvoid main(void)\n{\n    gl_Position = vec4((projectionMatrix * translationMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n\n    vTextureCoord = (uTransform * vec3(aTextureCoord, 1.0)).xy;\n}\n","varying vec2 vTextureCoord;\nuniform vec4 uColor;\n\nuniform sampler2D uSampler;\n\nvoid main(void)\n{\n    gl_FragColor = texture2D(uSampler, vTextureCoord) * uColor;\n}\n")},e.prototype.render=function(t){var e=this.renderer,n=e.gl,r=t._texture;if(r.valid){var i=t._glDatas[e.CONTEXT_UID];i||(e.bindVao(null),i={shader:this.shader,vertexBuffer:c.default.GLBuffer.createVertexBuffer(n,t.vertices,n.STREAM_DRAW),uvBuffer:c.default.GLBuffer.createVertexBuffer(n,t.uvs,n.STREAM_DRAW),indexBuffer:c.default.GLBuffer.createIndexBuffer(n,t.indices,n.STATIC_DRAW),vao:null,dirty:t.dirty,indexDirty:t.indexDirty},i.vao=new c.default.VertexArrayObject(n).addIndex(i.indexBuffer).addAttribute(i.vertexBuffer,i.shader.attributes.aVertexPosition,n.FLOAT,!1,8,0).addAttribute(i.uvBuffer,i.shader.attributes.aTextureCoord,n.FLOAT,!1,8,0),t._glDatas[e.CONTEXT_UID]=i),e.bindVao(i.vao),t.dirty!==i.dirty&&(i.dirty=t.dirty,i.uvBuffer.upload(t.uvs)),t.indexDirty!==i.indexDirty&&(i.indexDirty=t.indexDirty,i.indexBuffer.upload(t.indices)),i.vertexBuffer.upload(t.vertices),e.bindShader(i.shader),i.shader.uniforms.uSampler=e.bindTexture(r),e.state.setBlendMode(u.utils.correctBlendMode(t.blendMode,r.baseTexture.premultiplyAlpha)),i.shader.uniforms.uTransform&&(t.uploadUvTransform?i.shader.uniforms.uTransform=t._uvTransform.mapCoord.toArray(!0):i.shader.uniforms.uTransform=p.toArray(!0)),i.shader.uniforms.translationMatrix=t.worldTransform.toArray(!0),i.shader.uniforms.uColor=u.utils.premultiplyRgba(t.tintRgb,t.worldAlpha,r.baseTexture.premultiplyAlpha);var o=t.drawMode===d.default.DRAW_MODES.TRIANGLE_MESH?n.TRIANGLE_STRIP:n.TRIANGLES;i.vao.draw(o,t.indices.length,0)}},e}(u.ObjectRenderer);n.default=f,u.WebGLRenderer.registerPlugin("mesh",f)},{"../../core":65,"../Mesh":166,path:8,"pixi-gl-core":15}],173:[function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}n.__esModule=!0;var a=function{function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}},s=t("../core"),u=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(s),l=t("../core/utils"),c=function(t){function e{var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1500,o=arguments[1],a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:16384;r(this,e);var s=i(this,t.call(this));return a>16384&&(a=16384),a>n&&(a=n),s._properties=[!1,!0,!1,!1,!1],s._maxSize=n,s._batchSize=a,s._glBuffers={},s._bufferToUpdate=0,s.interactiveChildren=!1,s.blendMode=u.BLEND_MODES.NORMAL,s.roundPixels=!0,s.baseTexture=null,s.setProperties(o),s._tint=0,s.tintRgb=new Float32Array(4),s.tint=16777215,s}return o(e,t),e.prototype.setProperties=function(t){t&&(this._properties[0]="scale"in t?!!t.scale:this._properties[0],this._properties[1]="position"in t?!!t.position:this._properties[1],this._properties[2]="rotation"in t?!!t.rotation:this._properties[2],this._properties[3]="uvs"in t?!!t.uvs:this._properties[3],this._properties[4]="alpha"in t?!!t.alpha:this._properties[4])},e.prototype.updateTransform=function{this.displayObjectUpdateTransform},e.prototype.renderWebGL=function(t){var e=this;this.visible&&!(this.worldAlpha<=0)&&this.children.length&&this.renderable&&(this.baseTexture||(this.baseTexture=this.children[0]._texture.baseTexture,this.baseTexture.hasLoaded||this.baseTexture.once("update",function{return e.onChildrenChange(0)})),t.setObjectRenderer(t.plugins.particle),t.plugins.particle.render(this))},e.prototype.onChildrenChange=function(t){var e=Math.floor(t/this._batchSize);e<this._bufferToUpdate&&(this._bufferToUpdate=e)},e.prototype.renderCanvas=function(t){if(this.visible&&!(this.worldAlpha<=0)&&this.children.length&&this.renderable){var e=t.context,n=this.worldTransform,r=!0,i=0,o=0,a=0,s=0,u=t.blendModes[this.blendMode];u!==e.globalCompositeOperation&&(e.globalCompositeOperation=u),e.globalAlpha=this.worldAlpha,this.displayObjectUpdateTransform;for(var l=0;l<this.children.length;++l){var c=this.children[l];if(c.visible){var h=c._texture.frame;if(e.globalAlpha=this.worldAlpha*c.alpha,c.rotation%(2*Math.PI)==0)r&&(e.setTransform(n.a,n.b,n.c,n.d,n.tx*t.resolution,n.ty*t.resolution),r=!1),i=c.anchor.x*(-h.width*c.scale.x)+c.position.x+.5,o=c.anchor.y*(-h.height*c.scale.y)+c.position.y+.5,a=h.width*c.scale.x,s=h.height*c.scale.y;else{r||(r=!0),c.displayObjectUpdateTransform;var d=c.worldTransform;t.roundPixels?e.setTransform(d.a,d.b,d.c,d.d,d.tx*t.resolution|0,d.ty*t.resolution|0):e.setTransform(d.a,d.b,d.c,d.d,d.tx*t.resolution,d.ty*t.resolution),i=c.anchor.x*-h.width+.5,o=c.anchor.y*-h.height+.5,a=h.width,s=h.height}var p=c._texture.baseTexture.resolution;e.drawImage(c._texture.baseTexture.source,h.x*p,h.y*p,h.width*p,h.height*p,i*t.resolution,o*t.resolution,a*t.resolution,s*t.resolution)}}}},e.prototype.destroy=function(e){if(t.prototype.destroy.call(this,e),this._buffers)for(var n=0;n<this._buffers.length;++n)this._buffers[n].destroy;this._properties=null,this._buffers=null},a(e,[{key:"tint",get:function{return this._tint},set:function(t){this._tint=t,(0,l.hex2rgb)(t,this.tintRgb)}}]),e}(u.Container);n.default=c},{"../core":65,"../core/utils":124}],174:[function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}n.__esModule=!0;var i=t("./ParticleContainer");Object.defineProperty(n,"ParticleContainer",{enumerable:!0,get:function{return r(i).default}});var o=t("./webgl/ParticleRenderer");Object.defineProperty(n,"ParticleRenderer",{enumerable:!0,get:function{return r(o).default}})},{"./ParticleContainer":173,"./webgl/ParticleRenderer":176}],175:[function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}n.__esModule=!0;var o=t("pixi-gl-core"),a=r(o),s=t("../../core/utils/createIndicesForQuads"),u=r(s),l=function{function t(e,n,r,o){i(this,t),this.gl=e,this.vertSize=2,this.vertByteSize=4*this.vertSize,this.size=o,this.dynamicProperties=[],this.staticProperties=[];for(var a=0;a<n.length;++a){var s=n[a];s={attribute:s.attribute,size:s.size,uploadFunction:s.uploadFunction,offset:s.offset},r[a]?this.dynamicProperties.push(s):this.staticProperties.push(s)}this.staticStride=0,this.staticBuffer=null,this.staticData=null,this.dynamicStride=0,this.dynamicBuffer=null,this.dynamicData=null,this.initBuffers}return t.prototype.initBuffers=function{var t=this.gl,e=0;this.indices=(0,u.default)(this.size),this.indexBuffer=a.default.GLBuffer.createIndexBuffer(t,this.indices,t.STATIC_DRAW),this.dynamicStride=0;for(var n=0;n<this.dynamicProperties.length;++n){var r=this.dynamicProperties[n];r.offset=e,e+=r.size,this.dynamicStride+=r.size}this.dynamicData=new Float32Array(this.size*this.dynamicStride*4),this.dynamicBuffer=a.default.GLBuffer.createVertexBuffer(t,this.dynamicData,t.STREAM_DRAW);var i=0;this.staticStride=0;for(var o=0;o<this.staticProperties.length;++o){var s=this.staticProperties[o];s.offset=i,i+=s.size,this.staticStride+=s.size}this.staticData=new Float32Array(this.size*this.staticStride*4),this.staticBuffer=a.default.GLBuffer.createVertexBuffer(t,this.staticData,t.STATIC_DRAW),this.vao=new a.default.VertexArrayObject(t).addIndex(this.indexBuffer);for(var l=0;l<this.dynamicProperties.length;++l){var c=this.dynamicProperties[l];this.vao.addAttribute(this.dynamicBuffer,c.attribute,t.FLOAT,!1,4*this.dynamicStride,4*c.offset)}for(var h=0;h<this.staticProperties.length;++h){var d=this.staticProperties[h];this.vao.addAttribute(this.staticBuffer,d.attribute,t.FLOAT,!1,4*this.staticStride,4*d.offset)}},t.prototype.uploadDynamic=function(t,e,n){for(var r=0;r<this.dynamicProperties.length;r++){var i=this.dynamicProperties[r];i.uploadFunction(t,e,n,this.dynamicData,this.dynamicStride,i.offset)}this.dynamicBuffer.upload},t.prototype.uploadStatic=function(t,e,n){for(var r=0;r<this.staticProperties.length;r++){var i=this.staticProperties[r];i.uploadFunction(t,e,n,this.staticData,this.staticStride,i.offset)}this.staticBuffer.upload},t.prototype.destroy=function{this.dynamicProperties=null,this.dynamicData=null,this.dynamicBuffer.destroy,this.staticProperties=null,this.staticData=null,this.staticBuffer.destroy},t};n.default=l},{"../../core/utils/createIndicesForQuads":122,"pixi-gl-core":15}],176:[function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}n.__esModule=!0;var s=t("../../core"),u=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(s),l=t("./ParticleShader"),c=r(l),h=t("./ParticleBuffer"),d=r(h),p=function(t){function e(n){i(this,e);var r=o(this,t.call(this,n));return r.shader=null,r.indexBuffer=null,r.properties=null,r.tempMatrix=new u.Matrix,r.CONTEXT_UID=0,r}return a(e,t),e.prototype.onContextChange=function{var t=this.renderer.gl;this.CONTEXT_UID=this.renderer.CONTEXT_UID,this.shader=new c.default(t),this.properties=[{attribute:this.shader.attributes.aVertexPosition,size:2,uploadFunction:this.uploadVertices,offset:0},{attribute:this.shader.attributes.aPositionCoord,size:2,uploadFunction:this.uploadPosition,offset:0},{attribute:this.shader.attributes.aRotation,size:1,uploadFunction:this.uploadRotation,offset:0},{attribute:this.shader.attributes.aTextureCoord,size:2,uploadFunction:this.uploadUvs,offset:0},{attribute:this.shader.attributes.aColor,size:1,uploadFunction:this.uploadAlpha,offset:0}]},e.prototype.start=function{this.renderer.bindShader(this.shader)},e.prototype.render=function(t){var e=t.children,n=t._maxSize,r=t._batchSize,i=this.renderer,o=e.length;if(0!==o){o>n&&(o=n);var a=t._glBuffers[i.CONTEXT_UID];a||(a=t._glBuffers[i.CONTEXT_UID]=this.generateBuffers(t));var s=e[0]._texture.baseTexture;this.renderer.setBlendMode(u.utils.correctBlendMode(t.blendMode,s.premultiplyAlpha));var l=i.gl,c=t.worldTransform.copy(this.tempMatrix);c.prepend(i._activeRenderTarget.projectionMatrix),this.shader.uniforms.projectionMatrix=c.toArray(!0),this.shader.uniforms.uColor=u.utils.premultiplyRgba(t.tintRgb,t.worldAlpha,s.premultiplyAlpha),this.shader.uniforms.uSampler=i.bindTexture(s);for(var h=0,d=0;h<o;h+=r,d+=1){var p=o-h;p>r&&(p=r);var f=a[d];f.uploadDynamic(e,h,p),t._bufferToUpdate===d&&(f.uploadStatic(e,h,p),t._bufferToUpdate=d+1),i.bindVao(f.vao),f.vao.draw(l.TRIANGLES,6*p)}}},e.prototype.generateBuffers=function(t){for(var e=this.renderer.gl,n=[],r=t._maxSize,i=t._batchSize,o=t._properties,a=0;a<r;a+=i)n.push(new d.default(e,this.properties,o,i));return n},e.prototype.uploadVertices=function(t,e,n,r,i,o){for(var a=0,s=0,u=0,l=0,c=0;c<n;++c){var h=t[e+c],d=h._texture,p=h.scale.x,f=h.scale.y,g=d.trim,m=d.orig;g?(s=g.x-h.anchor.x*m.width,a=s+g.width,l=g.y-h.anchor.y*m.height,u=l+g.height):(a=m.width*(1-h.anchor.x),s=m.width*-h.anchor.x,u=m.height*(1-h.anchor.y),l=m.height*-h.anchor.y),r[o]=s*p,r[o+1]=l*f,r[o+i]=a*p,r[o+i+1]=l*f,r[o+2*i]=a*p,r[o+2*i+1]=u*f,r[o+3*i]=s*p,r[o+3*i+1]=u*f,o+=4*i}},e.prototype.uploadPosition=function(t,e,n,r,i,o){for(var a=0;a<n;a++){var s=t[e+a].position;r[o]=s.x,r[o+1]=s.y,r[o+i]=s.x,r[o+i+1]=s.y,r[o+2*i]=s.x,r[o+2*i+1]=s.y,r[o+3*i]=s.x,r[o+3*i+1]=s.y,o+=4*i}},e.prototype.uploadRotation=function(t,e,n,r,i,o){for(var a=0;a<n;a++){var s=t[e+a].rotation;r[o]=s,r[o+i]=s,r[o+2*i]=s,r[o+3*i]=s,o+=4*i}},e.prototype.uploadUvs=function(t,e,n,r,i,o){for(var a=0;a<n;++a){var s=t[e+a]._texture._uvs;s?(r[o]=s.x0,r[o+1]=s.y0,r[o+i]=s.x1,r[o+i+1]=s.y1,r[o+2*i]=s.x2,r[o+2*i+1]=s.y2,r[o+3*i]=s.x3,r[o+3*i+1]=s.y3,o+=4*i):(r[o]=0,r[o+1]=0,r[o+i]=0,r[o+i+1]=0,r[o+2*i]=0,r[o+2*i+1]=0,r[o+3*i]=0,r[o+3*i+1]=0,o+=4*i)}},e.prototype.uploadAlpha=function(t,e,n,r,i,o){for(var a=0;a<n;a++){var s=t[e+a].alpha;r[o]=s,r[o+i]=s,r[o+2*i]=s,r[o+3*i]=s,o+=4*i}},e.prototype.destroy=function{this.renderer.gl&&this.renderer.gl.deleteBuffer(this.indexBuffer),t.prototype.destroy.call(this),this.shader.destroy,this.indices=null,this.tempMatrix=null},e}(u.ObjectRenderer);n.default=p,u.WebGLRenderer.registerPlugin("particle",p)},{"../../core":65,"./ParticleBuffer":175,"./ParticleShader":177}],177:[function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}n.__esModule=!0;var a=t("../../core/Shader"),s=function(t){return t&&t.__esModule?t:{default:t}}(a),u=function(t){function e(n){return r(this,e),i(this,t.call(this,n,["attribute vec2 aVertexPosition;","attribute vec2 aTextureCoord;","attribute float aColor;","attribute vec2 aPositionCoord;","attribute vec2 aScale;","attribute float aRotation;","uniform mat3 projectionMatrix;","varying vec2 vTextureCoord;","varying float vColor;","void main(void){","   vec2 v = aVertexPosition;","   v.x = (aVertexPosition.x) * cos(aRotation) - (aVertexPosition.y) * sin(aRotation);","   v.y = (aVertexPosition.x) * sin(aRotation) + (aVertexPosition.y) * cos(aRotation);","   v = v + aPositionCoord;","   gl_Position = vec4((projectionMatrix * vec3(v, 1.0)).xy, 0.0, 1.0);","   vTextureCoord = aTextureCoord;","   vColor = aColor;","}"].join("\n"),["varying vec2 vTextureCoord;","varying float vColor;","uniform sampler2D uSampler;","uniform vec4 uColor;","void main(void){","  vec4 color = texture2D(uSampler, vTextureCoord) * vColor * uColor;","  if (color.a == 0.0) discard;","  gl_FragColor = color;","}"].join("\n")))}return o(e,t),e}(s.default);n.default=u},{"../../core/Shader":44}],178:[function(t,e,n){"use strict";Math.sign||(Math.sign=function(t){return t=Number(t),0===t||isNaN(t)?t:t>0?1:-1})},{}],179:[function(t,e,n){"use strict";var r=t("object-assign"),i=function(t){return t&&t.__esModule?t:{default:t}}(r);Object.assign||(Object.assign=i.default)},{"object-assign":6}],180:[function(t,e,n){"use strict";t("./Object.assign"),t("./requestAnimationFrame"),t("./Math.sign"),window.ArrayBuffer||(window.ArrayBuffer=Array),window.Float32Array||(window.Float32Array=Array),window.Uint32Array||(window.Uint32Array=Array),window.Uint16Array||(window.Uint16Array=Array)},{"./Math.sign":178,"./Object.assign":179,"./requestAnimationFrame":181}],181:[function(t,n,r){(function(t){"use strict";if(Date.now&&Date.prototype.getTime||(Date.now=function{return(new Date).getTime}),!t.performance||!t.performance.now){var e=Date.now;t.performance||(t.performance={}),t.performance.now=function{return Date.now-e}}for(var n=Date.now,r=["ms","moz","webkit","o"],i=0;i<r.length&&!t.requestAnimationFrame;++i){var o=r[i];t.requestAnimationFrame=t[o+"RequestAnimationFrame"],t.cancelAnimationFrame=t[o+"CancelAnimationFrame"]||t[o+"CancelRequestAnimationFrame"]}t.requestAnimationFrame||(t.requestAnimationFrame=function(t){if("function"!=typeof t)throw new TypeError(t+"is not a function");var e=Date.now,r=16+n-e;return r<0&&(r=0),n=e,setTimeout(function{n=Date.now,t(performance.now)},r)}),t.cancelAnimationFrame||(t.cancelAnimationFrame=function(t){return clearTimeout(t)})}).call(this,void 0!==e?e:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],182:[function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){var n=!1;if(t&&t._textures&&t._textures.length)for(var r=0;r<t._textures.length;r++)if(t._textures[r]instanceof d.Texture){var i=t._textures[r].baseTexture;-1===e.indexOf(i)&&(e.push(i),n=!0)}return n}function o(t,e){return t instanceof d.BaseTexture&&(-1===e.indexOf(t)&&e.push(t),!0)}function a(t,e){if(t._texture&&t._texture instanceof d.Texture){var n=t._texture.baseTexture;return-1===e.indexOf(n)&&e.push(n),!0}return!1}function s(t,e){return e instanceof d.Text&&(e.updateText(!0),!0)}function u(t,e){if(e instanceof d.TextStyle){var n=e.toFontString;return d.TextMetrics.measureFont(n),!0}return!1}function l(t,e){if(t instanceof d.Text){-1===e.indexOf(t.style)&&e.push(t.style),-1===e.indexOf(t)&&e.push(t);var n=t._texture.baseTexture;return-1===e.indexOf(n)&&e.push(n),!0}return!1}function c(t,e){return t instanceof d.TextStyle&&(-1===e.indexOf(t)&&e.push(t),!0)}n.__esModule=!0;var h=t("../core"),d=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(h),p=t("./limiters/CountLimiter"),f=function(t){return t&&t.__esModule?t:{default:t}}(p),g=d.ticker.shared;d.settings.UPLOADS_PER_FRAME=4;var m=function{function t(e){var n=this;r(this,t),this.limiter=new f.default(d.settings.UPLOADS_PER_FRAME),this.renderer=e,this.uploadHookHelper=null,this.queue=[],this.addHooks=[],this.uploadHooks=[],this.completes=[],this.ticking=!1,this.delayedTick=function{n.queue&&n.prepareItems},this.registerFindHook(l),this.registerFindHook(c),this.registerFindHook(i),this.registerFindHook(o),this.registerFindHook(a),this.registerUploadHook(s),this.registerUploadHook(u)}return t.prototype.upload=function(t,e){"function"==typeof t&&(e=t,t=null),t&&this.add(t),this.queue.length?(e&&this.completes.push(e),this.ticking||(this.ticking=!0,g.addOnce(this.tick,this,d.UPDATE_PRIORITY.UTILITY))):e&&e},t.prototype.tick=function{setTimeout(this.delayedTick,0)},t.prototype.prepareItems=function{for(this.limiter.beginFrame;this.queue.length&&this.limiter.allowedToUpload;){var t=this.queue[0],e=!1;if(t&&!t._destroyed)for(var n=0,r=this.uploadHooks.length;n<r;n++)if(this.uploadHooks[n](this.uploadHookHelper,t)){this.queue.shift,e=!0;break}e||this.queue.shift}if(this.queue.length)g.addOnce(this.tick,this,d.UPDATE_PRIORITY.UTILITY);else{this.ticking=!1;var i=this.completes.slice(0);this.completes.length=0;for(var o=0,a=i.length;o<a;o++)i[o]}},t.prototype.registerFindHook=function(t){return t&&this.addHooks.push(t),this},t.prototype.registerUploadHook=function(t){return t&&this.uploadHooks.push(t),this},t.prototype.add=function(t){for(var e=0,n=this.addHooks.length;e<n&&!this.addHooks[e](t,this.queue);e++);if(t instanceof d.Container)for(var r=t.children.length-1;r>=0;r--)this.add(t.children[r]);return this},t.prototype.destroy=function{this.ticking&&g.remove(this.tick,this),this.ticking=!1,this.addHooks=null,this.uploadHooks=null,this.renderer=null,this.completes=null,this.queue=null,this.limiter=null,this.uploadHookHelper=null},t};n.default=m},{"../core":65,"./limiters/CountLimiter":185}],183:[function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function a(t,e){if(e instanceof u.BaseTexture){var n=e.source,r=0===n.width?t.canvas.width:Math.min(t.canvas.width,n.width),i=0===n.height?t.canvas.height:Math.min(t.canvas.height,n.height);return t.ctx.drawImage(n,0,0,r,i,0,0,t.canvas.width,t.canvas.height),!0}return!1}n.__esModule=!0;var s=t("../../core"),u=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(s),l=t("../BasePrepare"),c=function(t){return t&&t.__esModule?t:{default:t}}(l),h=16,d=function(t){function e(n){r(this,e);var o=i(this,t.call(this,n));return o.uploadHookHelper=o,o.canvas=document.createElement("canvas"),o.canvas.width=h,o.canvas.height=h,o.ctx=o.canvas.getContext("2d"),o.registerUploadHook(a),o}return o(e,t),e.prototype.destroy=function{t.prototype.destroy.call(this),this.ctx=null,this.canvas=null},e}(c.default);n.default=d,u.CanvasRenderer.registerPlugin("prepare",d)},{"../../core":65,"../BasePrepare":182}],184:[function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}n.__esModule=!0;var i=t("./webgl/WebGLPrepare");Object.defineProperty(n,"webgl",{enumerable:!0,get:function{return r(i).default}});var o=t("./canvas/CanvasPrepare");Object.defineProperty(n,"canvas",{enumerable:!0,get:function{return r(o).default}});var a=t("./BasePrepare");Object.defineProperty(n,"BasePrepare",{enumerable:!0,get:function{return r(a).default}});var s=t("./limiters/CountLimiter");Object.defineProperty(n,"CountLimiter",{enumerable:!0,get:function{return r(s).default}});var u=t("./limiters/TimeLimiter");Object.defineProperty(n,"TimeLimiter",{enumerable:!0,get:function{return r(u).default}})},{"./BasePrepare":182,"./canvas/CanvasPrepare":183,"./limiters/CountLimiter":185,"./limiters/TimeLimiter":186,"./webgl/WebGLPrepare":187}],185:[function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}n.__esModule=!0;var i=function{function t(e){r(this,t),this.maxItemsPerFrame=e,this.itemsLeft=0}return t.prototype.beginFrame=function{this.itemsLeft=this.maxItemsPerFrame},t.prototype.allowedToUpload=function{return this.itemsLeft-- >0},t};n.default=i},{}],186:[function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}n.__esModule=!0;var i=function{function t(e){r(this,t),this.maxMilliseconds=e,this.frameStart=0}return t.prototype.beginFrame=function{this.frameStart=Date.now},t.prototype.allowedToUpload=function{return Date.now-this.frameStart<this.maxMilliseconds},t};n.default=i},{}],187:[function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function a(t,e){return e instanceof c.BaseTexture&&(e._glTextures[t.CONTEXT_UID]||t.textureManager.updateTexture(e),!0)}function s(t,e){return e instanceof c.Graphics&&((e.dirty||e.clearDirty||!e._webGL[t.plugins.graphics.CONTEXT_UID])&&t.plugins.graphics.updateGraphics(e),!0)}function u(t,e){return t instanceof c.Graphics&&(e.push(t),!0)}n.__esModule=!0;var l=t("../../core"),c=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(l),h=t("../BasePrepare"),d=function(t){return t&&t.__esModule?t:{default:t}}(h),p=function(t){function e(n){r(this,e);var o=i(this,t.call(this,n));return o.uploadHookHelper=o.renderer,o.registerFindHook(u),o.registerUploadHook(a),o.registerUploadHook(s),o}return o(e,t),e}(d.default);n.default=p,c.WebGLRenderer.registerPlugin("prepare",p)},{"../../core":65,"../BasePrepare":182}],188:[function(t,n,r){(function(e){"use strict";function n(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}r.__esModule=!0,r.loader=r.prepare=r.particles=r.mesh=r.loaders=r.interaction=r.filters=r.extras=r.extract=r.accessibility=void 0;var i=t("./polyfill");Object.keys(i).forEach(function(t){"default"!==t&&"__esModule"!==t&&Object.defineProperty(r,t,{enumerable:!0,get:function{return i[t]}})});var o=t("./core");Object.keys(o).forEach(function(t){"default"!==t&&"__esModule"!==t&&Object.defineProperty(r,t,{enumerable:!0,get:function{return o[t]}})});var a=t("./deprecation"),s=function(t){return t&&t.__esModule?t:{default:t}}(a),u=t("./accessibility"),l=n(u),c=t("./extract"),h=n(c),d=t("./extras"),p=n(d),f=t("./filters"),g=n(f),m=t("./interaction"),v=n(m),y=t("./loaders"),_=n(y),b=t("./mesh"),x=n(b),w=t("./particles"),T=n(w),S=t("./prepare"),E=n(S);o.utils.mixins.performMixins;var P=_.shared||null;r.accessibility=l,r.extract=h,r.extras=p,r.filters=g,r.interaction=v,r.loaders=_,r.mesh=x,r.particles=T,r.prepare=E,r.loader=P,"function"==typeof s.default&&(0,s.default)(r),e.PIXI=r}).call(this,void 0!==e?e:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./accessibility":42,"./core":65,"./deprecation":130,"./extract":132,"./extras":141,"./filters":152,"./interaction":159,"./loaders":162,"./mesh":171,"./particles":174,"./polyfill":180,"./prepare":184}]},{},[188])(188)})}).call(e,n(9))},function(t,e,n){"use strict";function r(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var i,o=n(3),a=o.Anim,s=n(0),u=(i={},r(i,a.None,{mirror:!1,frames:[{time:.25,handLt:s.create(35,40),handRt:s.create(-35,40)}]}),r(i,a.Melee,{fists:{mirror:!0,frames:[{time:0,handLt:s.create(35,40),handRt:s.create(-35,40),doneFn:"playAnimSwingSound"},{time:o.items.fists.damageTime,handLt:s.create(5,85),handRt:s.create(-35,40),doneFn:"doMeleeCollision"},{time:o.items.fists.cooldownTime,handLt:s.create(35,40),handRt:s.create(-35,40)}]}}),i);t.exports=u},function(t,e,n){"use strict";function r{this.gameCanvas=i("#cvs"),this.nameInput=i("#player-name-input"),this.serverSelect=i("#server-select"),this.startBtn=i("#ui-start"),this.muteBtns=i(".btn-sound-toggle"),this.fullscreenBtns=i(".btn-fullscreen-toggle"),this.serverWarning=i("#server-warning"),this.startMenuWrapper=i("#start-menu-wrapper"),this.gameAreaWrapper=i("#game-area-wrapper"),this.pingTest=new d,this.audioManager=new a,this.firebaseManager=new s,this.leaderboard=new c,this.pixi=null,this.game=null,this.useLocalStorage=!0,this.config=this.loadConfig,this.storeConfig,this.onConfigModified,this.startSpinner=!1,this.startEnabled=!1,this.joinTimeout=0,this.menuMusicIdx=0,this.playedWindAmbience=!1,this.pingTest.start}var i=n(6),o=n(2);o.utils.skipHello;var a=n(21),s=n(22),u=n(23),l=n(12),c=n(24),h=(n(25),n(10)),d=n(26),p=n(27),f=window.location.protocol+"//web.archive.org/web/20180104035806/https://m1.surviv.io/",g=void 0!==l.getParameterByName("debug");r.prototype={onReady:function{var t=this.getConfig.bind(this);this.nameInput.val(this.getConfig("playerName")),i(this.serverSelect).find("option").each(function{this.selected=this.value==t("region")});var e=this.tryStartGame.bind(this);this.nameInput.maxLength=h.kNameMaxLen,this.nameInput.on("keypress",function(t){13===(t.which||t.keyCode)&&e}),this.startBtn.on("click",function{e});var n=function(t){for(var e=Object.keys(t),n=0;n<e.length;n++){var r=e[n],o=t[r],a=i("#server-opts").children('option[value="'+r+'"]');a.text(a.text+" ["+o+"]")}};!function t(e,r){var o=function{e+1<r&&setTimeout(function{t(e+1,r)},500)};i.ajax("/region_pops").done(function(t,e){t.err?o:n(t)}).fail(function(t){o})}(0,3),this.leaderboard.getLeaderboardData;for(var r=Object.keys(p),o=r.reduce(function(t,e){return t+parseInt(p[e].weight)},0),a=Math.random*o,s=0;a>p[r[s]].weight;)a-=p[r[s]].weight,s++;var u=p[r[s]];i("#btn-youtuber").attr("href",u.link).html(u.name),function(t,e,n){var r=void 0,i=t.getElementsByTagName(e)[0];t.getElementById(n)||(r=t.createElement(e),r.id=n,r.async=!0,r.src="https://web.archive.org/web/20180104035806/https://connect.facebook.net/en_US/sdk.js#xfbml=1&version=v2.11&appId=2370548662",i.parentNode.insertBefore(r,i))}(document,"script","facebook-jssdk");var c=this.setConfig.bind(this);if(this.muteBtns.on("click",function{c("muteAudio",!t("muteAudio"))}),i(".modal-settings-item").children("input").each(function{i(this).prop("checked",t(i(this).prop("id")))}),i(".modal-settings-item > input:checkbox").change(function{c(i(this).prop("id"),i(this).is(":checked"))}),this.fullscreenBtns.on("click",function{l.toggleFullScreen}),this.menuMusicIdx=this.audioManager.queueSound("menu_music",{channel:"ambient",fadeIn:!0,loop:!1}),this.showMenu,l.detectIE){var d='Please use the <a href="https://web.archive.org/web/20180104035806/https://www.google.com/chrome/browser/desktop/index.html" target="_blank">Chrome browser</a> for a better playing experience!';d+='  ¡Usa el <a href="https://web.archive.org/web/20180104035806/https://www.google.com/chrome/browser/desktop/index.html" target="_blank">navegador Chrome</a> para una mejor experiencia de juego!';var f=i("#modal-notification");f.find(".modal-settings-text").html(d),f.fadeIn(200)}},onLoad:function{var t=this,e=this.getConfigResolution;this.pixi=new o.Application({width:window.innerWidth,height:window.innerHeight,view:this.gameCanvas[0],antialias:!1,resolution:e}),this.pixi.ticker.add(this.update,this),u.preloadImages;var n=function{var e=t.audioManager.getQueuedInstance(t.menuMusicIdx);e&&t.audioManager.stopSound(e),t.audioManager.removeSound("audio/ambient/menu_music_01.mp3"),t.audioManager.registerSound("menu_music"),t.audioManager.isSoundPlaying(t.windInst)||t.playWindAmbience,t.hideMenu,t.game.loadConfig(t)},r=function{t.game.free,t.showMenu},i=function(e){t.game.free,t.showMenu,t.displayErrorMessage(e)};this.game=new u(this.pixi,this.audioManager,n,r,i),this.startEnabled=!0,this.firebaseManager.storeRendererType(this.pixi.renderer.type)},onResize:function{this.pixi&&this.pixi.renderer.resize(window.innerWidth,window.innerHeight),this.game&&this.game.initialized&&this.game.resize},onError:function(t,e,n,r,i){var o=["Message: "+t,"URL: "+e,"Line: "+n,"Column: "+r,"Error: "+JSON.stringify(i)].join(" - ");console.log("onError",o);var a=navigator.userAgent;this.firebaseManager.logWindowOnerror(o,a)},onConfigModified:function{var t=this.getConfig("muteAudio");t!=this.audioManager.mute&&(this.muteBtns.removeClass(t?"audio-on-icon":"audio-off-icon"),this.muteBtns.addClass(t?"audio-off-icon":"audio-on-icon"),this.audioManager.setMute(t));var e=this.getConfigResolution;this.pixi&&this.pixi.renderer.resolution!=e&&location.reload},loadConfig:function{var t=null;try{t=JSON.parse(localStorage.getItem("surviv_config"))}catch(t){console.log("Local storage disabled"),this.useLocalStorage=!1}return Object.assign({},{muteAudio:!1,highRes:!1,screenShake:!0,playerName:"",region:"na"},t||{})},storeConfig:function{this.useLocalStorage&&localStorage.setItem("surviv_config",JSON.stringify(this.config))},setConfig:function(t,e){this.config[t]=e,this.storeConfig,this.onConfigModified},getConfig:function(t){return this.config[t]},getConfigResolution:function{return this.getConfig("highRes")?2:1},showMenu:function{this.startMenuWrapper.css("display","flex"),this.gameAreaWrapper.css("opacity",0),this.hideErrorMessage,this.enablePlaySpinner(!1),i("body").removeClass("user-select-none"),this.gameAreaWrapper.css("display","block"),this.serverWarning.css("display","block")},hideMenu:function{this.startMenuWrapper.css("display","none"),this.gameAreaWrapper.css("opacity",1),this.hideErrorMessage,i("body").addClass("user-select-none")},enablePlaySpinner:function(t){this.startSpinner!=t&&(i("#ui-start").html(t?' ':"Play"),this.startSpinner=t),this.startEnabled=!t},displayErrorMessage:function(t){this.enablePlaySpinner(!1),this.serverWarning.html(t),this.serverWarning.css("opacity","1")},hideErrorMessage:function{this.serverWarning.css("opacity","0")},playWindAmbience:function{this.windInst=this.audioManager.playSound("ambient_wind_01",{channel:"ambient",fadeIn:!0,loop:!0})},tryStartGame:function{var t=this,e=(new Date).getTime;if(this.startEnabled&&!(e<this.joinTimeout)){this.joinTimeout=e+1e3,this.enablePlaySpinner(!0),this.hideErrorMessage;var n=this.nameInput.val.trim;n.length>h.kNameMaxLen&&(n=n.substring(0,h.kNameMaxLen));var r=this.serverSelect.find(":selected").val,o=l.getParameterByName("region");void 0!==o&&o.length>0&&(r=o),this.setConfig("playerName",n),this.setConfig("region",r);!function e(o,a){if(o+1>a)return void t.displayErrorMessage("Failed finding game.");var s=function{setTimeout(function{e(o+1,a)},500)},u=t.pingTest.getZones(r),c=l.getParameterByName("zone");void 0!==c&&c.length>0&&(u=[c]),g&&console.log("Zone prio:",u);var h={region:r,zones:u};i.ajax({type:"POST",url:f+"/find_game",data:JSON.stringify(h),contentType:"application/json; charset=utf-8",success:function(e,i){e.err?s:t.tryJoinGame(n,r,e)},failure:function(t){s}})}(0,3)}},tryJoinGame:function(t,e,n){for(var r="https:"==window.location.protocol,i=r?"wss:":"ws:",o=[],a=r?n.hosts:n.addrs,s=0;s<a.length;s++)o.push(function(t,e,n){return t+"//"+e+"/play?gameId="+n}(i,a[s],n.gameId));this.tryJoinGameImpl(t,e,n.zone,o)},tryJoinGameImpl:function(t,e,n,r){var i=this,o=function{i.tryJoinGameImpl(t,e,n,r)};if(!this.game)return void setTimeout(function{o},250);if(r.length>0){var a=r.shift;g&&console.log("Joining",e,n,a),this.game.tryJoinGame(t,a,o)}else this.displayErrorMessage("Failed joining server.")},update:function{var t=Math.min(this.pixi.ticker.elapsedMS/1e3,1/8);this.audioManager.update(t),this.firebaseManager.update(t);var e=this.audioManager.getQueuedInstance(this.menuMusicIdx);!e||this.audioManager.isSoundPlaying(e)||this.audioManager.isSoundPlaying(this.windInst)||this.playWindAmbience,this.audioManager.isSoundPlaying(e)&&this.game.playing&&this.audioManager.stopSound(e),this.game.initialized&&this.game.playing?this.game.update(t):this.pixi.renderer.backgroundColor=7378501}},function{var t=n(28);!function(t){var e=document.createElement("style");e.innerHTML=t.toString,document.body.appendChild(e)}(t)};var m=new r;i(document).ready(function{m.onReady}),window.addEventListener("load",function{m.onLoad}),window.addEventListener("resize",function{m.onResize}),window.onerror=function{m.onError.apply(m,arguments)}},function(t,e,n){"use strict";function r(t,e){this.particleBarn=t,this.audioManager=e,this.container=new i.Container,this.debug=new i.Graphics,this.bullets=[]}var i=n(2),o=n(3),a=n(8),s=n(13),u=n(1),l=n(4),c=n(0),h=n(7);r.prototype={addBullet:function(t){for(var e=null,n=0;n<this.bullets.length;n++)if(!this.bullets[n].alive&&!this.bullets[n].collided){e=this.bullets[n];break}e||(e={},e.alive=!1,e.container=new i.Container,e.container.pivot=new i.Point(14.5,0),e.container.visible=!1,this.container.addChild(e.container),e.bulletTrail=i.Sprite.fromImage("img/player/bullet-trail-02.svg"),e.bulletTrail.anchor=new i.Point(.5,.5),e.container.addChild(e.bulletTrail),this.bullets.push(e));var r=o.bullets[t.bulletType],a=1+t.varianceT*r.variance;e.alive=!0,e.isNew=!0,e.collided=!1,e.scale=1,e.playerId=t.playerId,e.startPos=c.copy(t.pos),e.pos=c.copy(t.pos),e.dir=c.copy(t.dir),e.speed=r.speed*a,e.distance=r.distance*a/Math.pow(o.bullet.reflectDistDecay,t.reflectCount),e.damageSelf=r.shrapnel||t.reflectCount>0,e.reflectCount=t.reflectCount,e.reflectObjId=t.reflectObjId,e.tracerColor=r.tracerColor,e.whizHeard=!1,e.whizInstance=null;var s=Math.atan2(e.dir.x,e.dir.y);e.container.rotation=s-Math.PI/2,e.bulletTrail.scale=new i.Point(r.tracerLength,r.tracerWidth),e.bulletTrail.tint=e.tracerColor,e.bulletTrail.alpha=r.tracerAlpha,e.reflectCount>0&&(e.bulletTrail.alpha*=.5),e.container.visible=!0},update:function(t,e,n,r,i,d){for(var p=e.getActivePlayerIds,f=0;f<this.bullets.length;f++){var g=this.bullets[f];if(g.collided&&(g.scale=Math.max(g.scale-6*t,0),g.scale<=0&&(g.collided=!1,g.container.visible=!1)),g.alive){var m=g.distance-c.length(c.sub(g.startPos,g.pos)),v=Math.min(m,t*g.speed),y=c.copy(g.pos);if(g.pos=c.add(g.pos,c.mul(g.dir,v)),d){var _=c.length(c.sub(r.pos,g.pos));g.whizHeard&&g.whizInstance?g.whizInstance=this.audioManager.updateSound(g.whizInstance,"sfx",g.pos,4):_<7.5&&!g.whizHeard&&g.playerId!=i&&(g.whizInstance=this.audioManager.playGroup("bullet_whiz",{soundPos:g.pos,fallOff:4}),g.whizHeard=!0)}for(var b=!1,x=null,w=null,T=Number.MAX_VALUE,S=n.obstaclePool.getPool,E=0;E<S.length;E++){var P=S[E];if(!(!P.active||P.dead||g.reflectCount>0&&P.__id==g.reflectObjId)){var M=s.intersectSegment(P.collider,y,g.pos);if(M){var C=c.length(c.sub(M.point,y));if(P.collidable&&C<T&&(T=C,x=P,w=M),!P.collidable){for(var A=Math.floor(l.random(1,2)),O=c.mul(M.normal,9.5),I=0;I<A;I++)O=c.rotate(O,(Math.random-.5)*Math.PI/3),this.particleBarn.addParticle(h.Defs[P.hitParticle],M.point,O);this.audioManager.playGroup(P.sound.bullet,{channel:"hits",soundPos:M.point})}}}}if(w){b=!0;var k=w,R=c.mul(k.normal,9.5);R=c.rotate(R,(Math.random-.5)*Math.PI/3),this.particleBarn.addParticle(h.Defs[x.hitParticle],k.point,R),this.audioManager.playGroup(x.sound.bullet,{channel:"hits",soundPos:k.point}),g.pos=k.point}for(var D=0;D<p.length&&!b;D++){var L=p[D],j=e.getPlayerById(L);if(!j.netData.dead&&(j.__id!=g.playerId||g.damageSelf)){var B=a.intersectSegmentCircle(y,g.pos,j.pos,o.player.radius);if(B){b=!0;var N=c.sub(B.point,j.pos);N.y*=-1,this.particleBarn.addParticle(h.Defs.bloodSplat,c.mul(N,1*r.ppu),c.create(0,0),1,1,j.container),this.audioManager.playGroup("player_bullet_hit",{soundPos:j.pos,fallOff:1}),g.pos=B.point;break}}}g.isNew=!1,(b||u.eqAbs(m,v))&&(g.collided=!0,g.alive=!1)}}},createBulletHit:function(t,e){var n=t.getPlayerById(e);n&&this.audioManager.playGroup("player_bullet_hit",{soundPos:n.pos,fallOff:1})},render:function(t,e){t.pixels(1);this.debug.clear;for(var n=0;n<this.bullets.length;n++){var r=this.bullets[n];if(r.alive||r.collided){var i=c.length(c.sub(r.pos,r.startPos)),o=t.pointToScreen(r.pos);r.container.x=o.x,r.container.y=o.y;var a=t.pixels(1),s=Math.min(15,i/2);r.container.scale.x=a*s*r.scale,r.container.scale.y=a,e&&(this.debug.lineStyle(2,16711680,1),this.debug.drawCircle(o.x,o.y,8))}}}},t.exports={BulletBarn:r}},function(t,e,n){"use strict";function r{this.pos={x:0,y:0},this.ppu=16,this.zoom=1.5,this.targetZoom=1.5,this.screenWidth=1,this.screenHeight=1,this.shakeEnabled=!0,this.shakeInt=0}var i=n(1),o=n(0);r.prototype={z:function{return this.ppu*this.zoom},pointToScreen:function(t){return{x:.5*this.screenWidth+(t.x-this.pos.x)*this.z,y:.5*this.screenHeight-(t.y-this.pos.y)*this.z}},screenToPoint:function(t){return{x:this.pos.x+(t.x-.5*this.screenWidth)/this.z,y:this.pos.y+(.5*this.screenHeight-t.y)/this.z}},pixels:function(t){return t*this.zoom},scaleToScreen:function(t){return t*this.z},setShakeEnabled:function(t){this.shakeEnabled=t},addShake:function(t,e){var n=o.length(o.sub(this.pos,t)),r=i.delerp(n,40,10)*e;this.shakeInt=Math.max(this.shakeInt,r)},applyShake:function{this.shakeEnabled&&(this.pos=o.add(this.pos,o.mul(o.randomUnit,this.shakeInt))),this.shakeInt=0}},t.exports=r},function(t,e,n){"use strict";function r{var t={fontFamily:"Arial",fontWeight:"bold",fontSize:24,align:"center",fill:16777215,stroke:0,strokeThickness:0,dropShadow:!0,dropShadowColor:"#000000",dropShadowBlur:1,dropShadowAngle:Math.PI/3,dropShadowDistance:1},e=new a.Text("test",t);return e.anchor=new a.Point(.5,.5),e.scale=new a.Point(.5,.5),e}function i(t){this.active=!1,this.ticker=0,this.pos=u.create(0,0),this.vel=u.create(0,0),this.container=new a.Container,t.display.addChild(this.container),this.sprite=a.Sprite.fromImage("img/gui/skull.svg"),this.sprite.anchor=new a.Point(.5,.5),this.sprite.scale=new a.Point(.4,.4),this.sprite.tint=5921370,this.container.addChild(this.sprite),this.nameText=r,this.nameText.anchor=new a.Point(.5,-1),this.nameText.tint=s.rgb2hex(s.hsv2rgb(0,0,.5)),this.container.addChild(this.nameText),this.container.visible=!1}function o{this.display=new a.Container,this.deadBodyPool=new l.Pool(i,this)}var a=(n(5),n(2)),s=(n(3),n(1),n(4)),u=n(0),l=n(11);i.prototype={init:function{},free:function{this.container.visible=!1},updateData:function(t,e){this.pos=u.copy(t.pos),this.vel=u.mul(t.hitDir,5.5),this.playerId=t.id,e&&(this.nameTextSet=!1,this.container.visible=!0)}},o.prototype={update:function(t,e,n){for(var r=this.deadBodyPool.getPool,i=0;i<r.length;i++){var o=r[i];if(o.active){o.vel=u.mul(o.vel,1/(1+2.5*t)),o.pos=u.add(o.pos,u.mul(o.vel,t)),o.nameTextSet||(o.nameTextSet=!0,o.nameText.text=e.getPlayerName(o.playerId));var a=n.pointToScreen(o.pos),s=n.pixels(1);o.container.x=a.x,o.container.y=a.y,o.container.scale.x=s,o.container.scale.y=s}}}},t.exports={DeadBodyBarn:o}},function(t,e,n){"use strict";function r{return JSON.parse(localStorage.getItem(c))||{}}function i(t,e){var n=r;return void 0!==n[t]?n[t]:e}function o(t,e){var n=r;n[t]=e,localStorage.setItem(c,JSON.stringify(n))}function a{this.enabled=!1,this.zoom=3.5,this.cull=i("cull",!1),this.debug=i("debug",!0),this.setEnabled(!1)}var s=n(6),u=(n(2),n(3),n(1)),l=(n(0),n(15)),c="surviv_editor";a.prototype={free:function{},setEnabled:function(t){var e=this;this.enabled=t,s("#ui-editor").css("display",t?"block":"none"),s("#ui-game").css("display",t?"none":"block"),s("#gameAreaWrapper").css("cursor",t?"default":"crosshair");var n=function(t){var n=s(" ",{type:"checkbox",value:"value",checked:e[t]});return n.on("click",function(r){r.stopPropagation,e[t]=n.prop("checked"),o(t,e[t])}),n};this.uiPos=s(" "),this.uiZoom=s(" "),this.uiCull=n("cull"),this.uiDebug=n("debug");var r=s("#ui-editor-info-list");r.empty,r.append(s("<li/>").append(this.uiPos)),r.append(s("<li/>").append(this.uiZoom));var i=s(" ",{html:"Cull: "});r.append(s("<li/>").append(i.append(this.uiCull)));var a=s(" ",{html:"Debug: "});r.append(s("<li/>").append(a.append(this.uiDebug)))},update:function(t,e,n,r){e.keyPressed(l.Key.Plus)&&(this.zoom-=1),e.keyPressed(l.Key.Minus)&&(this.zoom+=1),e.keyPressed(l.Key.Zero)&&(this.zoom=n.getScopeZoom),this.zoom=u.clamp(this.zoom,.5,50);var i=n.netData.pos.x.toFixed(2),o=n.netData.pos.y.toFixed(2);this.uiPos.html("Pos:  "+i+", "+o),this.uiZoom.html("Zoom: "+this.zoom)}},t.exports=a},function(t,e,n){"use strict";function r(t){this.active=!1}function i(t,e){this.particleBarn=t,this.audioManager=e,this.explosions=[],this.debug=new o.Graphics}var o=n(2),a=n(3),s=(n(8),n(1)),u=n(0),l=n(7),c={frag:{burst:{particle:"explosionBurst",scale:.75,sound:"explosion_01",time:0},shakeStr:.25,shakeDur:.35,lifetime:1},barrel:{burst:{particle:"explosionBurst",scale:1,sound:"explosion_01",time:0},shakeStr:.2,shakeDur:.35,lifetime:2}};r.prototype={init:function(t,e){var n=a.explosions[t].explosionType,r=c[n];this.active=!0,this.done=!1,this.type=t,this.pos=u.copy(e),this.ticker=0,this.lifetime=r.lifetime},free:function{this.active=!1},update:function(t,e,n,r){var i=a.explosions[this.type].explosionType,o=c[i];0==this.ticker&&(e.addParticle(l.Defs[o.burst.particle],this.pos,u.create(0,0),o.burst.scale,0,null),n.playSound(o.burst.sound,{channel:"sfx",soundPos:this.pos})),this.ticker+=t;var h=Math.min(this.ticker/o.shakeDur,1),d=s.lerp(h,o.shakeStr,0);r.addShake(this.pos,d),this.ticker>=this.lifetime&&(this.active=!1)},renderDebug:function(t,e){var n=a.explosions[this.type],r=e.pointToScreen(this.pos),i=e.scaleToScreen(n.rad.min),o=e.scaleToScreen(n.rad.max);t.lineStyle(2,16711680,1),t.drawCircle(r.x,r.y,i),t.lineStyle(2,16750848,1),t.drawCircle(r.x,r.y,o)}},i.prototype={addExplosion:function(t,e){for(var n=null,i=0;i<this.explosions.length;i++)if(!this.explosions[i].active){n=this.explosions[i];break}n||(n=new r(this),this.explosions.push(n)),n.init(t,e,this.audioManager)},update:function(t,e,n){for(var r=0;r<this.explosions.length;r++){var i=this.explosions[r];i.active&&(i.update(t,this.particleBarn,this.audioManager,n),i.active||i.free)}},render:function(t,e){this.debug.clear;for(var n=0;n<this.explosions.length;n++){var r=this.explosions[n];r.active&&(e&&r.renderDebug(this.debug,t))}}},t.exports={ExplosionBarn:i}},function(t,e,n){"use strict";function r(t){this.active=!1,this.startingCenter={x:0,y:0},this.currentCenter={x:0,y:0},this.targetCenter=0,this.startingWidth=0,this.targetWidth=0,this.currentWidth=0,this.timeThisWait=0,this.timeLeftWait=0,this.timeThisGas=0,this.timeLeftGas=0,this.display={mask:new i.Graphics,gas:new i.Graphics},this.context=t}var i=n(2),o=(n(3),n(1));n(10),n(4),n(0);r.prototype={free:function{for(var t in this.display)this.display.hasOwnProperty(t)&&this.display[t].destroy({children:!0,texture:!0})},updateGasData:function(t){this.active=t.active,this.startingCenter=t.startingCenter,this.targetCenter=t.targetCenter,this.startingWidth=t.startingWidth,this.targetWidth=t.targetWidth,this.timeThisWait=t.timeThisWait,this.timeThisGas=t.timeThisGas,this.timeLeftWait=t.timeLeftWait,this.timeLeftGas=t.timeLeftGas},updateTimeLeft:function(t){this.timeLeftWait=t.timeLeftWait,this.timeLeftGas=t.timeLeftGas},update:function{if(this.active&&this.timeLeftGas>0&&this.currentWidth!=this.targetWidth){var t=this.timeLeftGas/this.timeThisGas;this.currentWidth=Math.max(this.targetWidth,this.targetWidth+(this.startingWidth-this.targetWidth)*t),this.currentCenter={x:o.lerp(t,this.targetCenter.x,this.startingCenter.x),y:o.lerp(t,this.targetCenter.y,this.startingCenter.y)}}},render:function(t){if(this.display.gas.clear,this.active){var e=t.pointToScreen({x:this.currentCenter.x,y:this.currentCenter.y});if(this.context)this.context.beginPath,this.context.fillStyle="rgba(255, 0, 0, 0.6)",this.context.rect(0,0,t.screenWidth,t.screenHeight),this.context.arc(e.x,e.y,t.scaleToScreen(this.currentWidth),0,2*Math.PI,!0),this.context.fill;else{this.display.mask.clear,this.display.mask.beginFill(16777215,1),this.display.mask.drawRect(0,0,t.screenWidth,t.screenHeight),this.display.mask.endFill,this.display.mask.beginFill(0,0),this.display.mask.drawCircle(e.x,e.y,t.scaleToScreen(this.currentWidth)),this.display.mask.endFill;var n=this.display.gas;n.mask=this.display.mask,n.clear,n.beginFill(16711680,.6),n.drawRect(0,0,t.screenWidth,t.screenHeight),n.endFill}}}},t.exports=r},function(t,e,n){"use strict";function r(t){this.ticker=0,this.canvas=new o.Graphics,t.display.addChild(this.canvas),this.circleOuter=new o.Sprite.fromImage("img/loot/loot-circle-outer.svg"),this.circleOuter.anchor=new o.Point(.5,.5),this.circleOuter.tint=0,this.canvas.addChild(this.circleOuter),this.sprite=new o.Sprite,this.sprite.anchor=new o.Point(.5,.5),this.canvas.addChild(this.sprite)}function i{this.display=new o.Container,this.lootPool=new l.Pool(r,this),this.closestLoot=null}var o=n(2),a=n(3),s=n(1),u=n(0),l=n(11),c=n(4);r.prototype={init:function{this.ticker=0},free:function{this.canvas.visible=!1},updateData:function(t,e){if(this.data={pos:u.copy(t.pos),name:t.name,count:t.count},e){var n=a.items[t.name];if(this.sprite.texture=o.Texture.fromImage(n.lootImg.sprite),this.sprite.scale=new o.Point(n.lootImg.scale,n.lootImg.scale),this.sprite.tint=n.lootImg.tint,n.lootImg.border){this.circleOuter.visible=!0,this.circleOuter.scale=new o.Point(2.5*n.lootImg.scale,2.5*n.lootImg.scale);var r=a.items[n.ammo];if(void 0!=r){var i=r.lootImg.tint.toString(16);i=("000000"+i).slice(-6),this.circleOuter.tint=c.updateColor(75,i)}else this.circleOuter.tint=0}else this.circleOuter.visible=!1;this.canvas.visible=!0}}},i.prototype={update:function(t,e){this.closestLoot=null;for(var n=99999,r=this.lootPool.getPool,i=0;i<r.length;i++){var o=r[i];if(o.active){o.ticker+=t;var s=o.data.pos,l=a.items[o.data.name].rad+a.player.radius,c=u.sub(e,s),h=u.lengthSqr(c);h<l*l&&h<n&&(n=h,this.closestLoot=o)}}},render:function(t){for(var e=this.lootPool.getPool,n=0;n<e.length;n++){var r=e[n];if(r.active){var i=s.delerp(r.ticker,0,1),u=s.easeOutElastic(i,.75),l=t.pointToScreen(r.data.pos),c=t.pixels(u);r.canvas.position=new o.Point(l.x,l.y),r.canvas.scale=new o.Point(c,c);a.items[r.data.name]}}},getClosestLoot:function{return this.closestLoot}},t.exports={LootBarn:i}},function(t,e,n){"use strict";function r(t,e,n,r,i,o,a){t.pos=y.add(t.pos,e),t.rad*=r;var s=a.pointToScreen(t.pos),u=a.scaleToScreen(t.rad);o.lineStyle(2,i,1),o.drawCircle(s.x,s.y,u)}function i(t,e,n,r,i,o,a){var s=a.pointToScreen(t.min),u=a.pointToScreen(t.max),l={x:s.x,y:s.y,width:u.x-s.x,height:u.y-s.y};o.lineStyle(2,i,1),o.drawRect(l.x,l.y,l.width,l.height)}function o(t,e,n,o){t.type==p.Type.Aabb?i(t,y.create(0,0),0,1,e,n,o):r(t,y.create(0,0),0,1,e,n,o)}function a(t,e,n){t.moveTo(e.x,e.y),t.lineTo(n.x,n.y)}function s(t,e,n,r){var i=f.visualGridScale*f.mapGridScale,o=r.pointToScreen({x:0,y:0}),s=r.pointToScreen({x:e,y:0}),u=r.pointToScreen({x:0,y:n}),l=r.pointToScreen({x:e,y:n});t.background.clear,t.background.beginFill(8433481,1),t.background.drawRect(o.x,o.y,l.x-o.x,l.y-o.y),t.background.endFill,t.background.lineStyle(r.pixels(4),0,1),a(t.background,o,u),a(t.background,u,l),a(t.background,l,s),a(t.background,s,o),t.background.lineStyle(r.pixels(2),0,.15);for(var c=0;c<e;c+=i){var h=r.pointToScreen({x:c,y:0}),d=r.pointToScreen({x:c,y:n});a(t.background,h,d)}for(var p=0;p<n;p+=i){var g=r.pointToScreen({x:0,y:p}),m=r.pointToScreen({x:e,y:p});a(t.background,g,m)}}function u(t){this.map=t,this.sprite=new d.Sprite,this.sprite.anchor=new d.Point(.5,.5)}function l(t){this.map=t,this.sprites=[]}function c{}function h(t,e){this.particleBarn=t,this.audioManager=e,this.display={background:new d.Graphics,botObstacle:new d.Container,topObstacle:new d.Container,mapRender:new d.Container,txtRender:new d.Container,debug:new d.Graphics},this.mapTexture=null,this.obstaclePool=new _.Pool(u,this),this.lootSpawnerPool=new _.Pool(c,this),this.buildingPool=new _.Pool(l,this),this.deadObstacleIds=[],this.deadCeilingIds=[],this.gas={active:!1,startingCenter:{x:0,y:0},currentCenter:{x:0,y:0},targetCenter:0,startingWidth:0,targetWidth:0,currentWidth:0,timeThisWait:0,timeLeftWait:0,timeThisGas:0,timeLeftGas:0}}var d=n(2),p=(n(8),n(13)),f=n(3),g=n(47),m=n(14),v=n(4),y=n(0),_=n(11),b=n(7),x=(n(10),n(1));u.prototype={init:function{this.isNew=!1,this.smokeEmitter=null},free:function{this.sprite.parent&&this.sprite.parent.removeChild(this.sprite),this.smokeEmitter&&(this.smokeEmitter.stop,this.smokeEmitter=null)},updateData:function(t,e){var n=m.Defs[t.type];if(e&&(this.isNew=!0,this.exploded=-1!=this.map.deadObstacleIds.indexOf(this.__id),this.explodeParticle=n.explodeParticle,this.hitParticle=n.hitParticle,this.collidable=n.collidable,this.sound=n.sound),this.type=t.type,this.pos=y.copy(t.pos),this.rot=m.oriToRad(t.ori),this.scale=t.scale,this.healthT=t.healthT,this.imgScale=n.img.scale,this.collider=p.transform(n.collision,this.pos,this.rot,this.scale),this.dead=t.dead,void 0!==n.explosion&&!this.smokeEmitter&&this.healthT<.5&&!this.dead){var r=y.normalize(y.create(1,1));this.smokeEmitter=this.map.particleBarn.addEmitter("smoke",this.pos,r,1,99999)}var i=this.dead?n.img.residue:n.img.sprite,o=void 0!==i;(e||this.dead)&&(this.sprite.parent&&this.sprite.parent.removeChild(this.sprite),o&&(this.sprite.texture=d.Texture.fromImage(i),this.sprite.tint=n.img.tint,this.sprite.alpha=this.dead?.75:n.img.alpha,this.sprite.zIdx=this.dead?1:n.img.zIdx,this.sprite.zOrd=this.__id,this.map.addObstacleSprite(this.sprite))),this.sprite.visible=o},update:function(t,e,n){if(this.dead&&!this.exploded&&(this.map.deadObstacleIds.push(this.__id),this.exploded=!0,!this.isNew)){for(var r=Math.floor(v.random(5,11)),i=0;i<r;i++){var o=y.mul(y.randomUnit,v.random(5,15));e.addParticle(b.Defs[this.explodeParticle],this.pos,o)}n.playSound(this.sound.explode,{channel:"sfx",soundPos:this.pos}),this.smokeEmitter&&(this.smokeEmitter.stop,this.smokeEmitter=null)}this.isNew=!1}},l.prototype={init:function{this.components=[],this.isNew=!1,this.playedCeilingDeadFx=!1,this.residue=null},free:function{for(var t=0;t<this.sprites.length;t++){var e=this.sprites[t];e.active=!1,e.sprite.parent&&e.sprite.parent.removeChild(e.sprite)}this.components=[]},allocSprite:function{for(var t=0;t<this.sprites.length;t++){var e=this.sprites[t];if(!e.active)return e.active=!0,e.sprite}var n=new d.Sprite;return n.anchor=new d.Point(.5,.5),this.sprites.push({active:!0,sprite:n}),n},getComponent:function(t){for(var e=0;e<this.components.length;e++){var n=this.components[e];if(n.type==t)return n}return null},updateData:function(t,e){var n=m.Defs[t.type];if(this.type=t.type,this.pos=y.copy(t.pos),this.rot=m.oriToRad(t.ori),this.scale=t.scale,this.ceilingDead=t.ceilingDead,e){this.isNew=!0,this.playedCeilingDeadFx=-1!=this.map.deadCeilingIds.indexOf(this.__id);for(var r=0;r<n.components.length;r++){var i=n.components[r],o={};o.type=i.type,o.scale=this.scale*i.scale,o.rot=this.rot+m.oriToRad(i.ori),o.pos=y.add(this.pos,y.rotate(y.mul(i.pos,o.scale),o.rot)),o.collider=p.transform(i.collision,o.pos,o.rot,o.scale),i.scopeCollision&&(o.scopeCollider=p.transform(i.scopeCollision,o.pos,o.rot,o.scale)),o.spriteDef=i.img,o.targetAlpha=o.spriteDef.alpha,o.surface=i.surface,o.sprite=this.allocSprite,o.sprite.texture=d.Texture.fromImage(i.img.sprite),o.sprite.tint=i.img.tint,o.sprite.alpha=i.img.alpha,o.sprite.zIdx=i.img.zIdx,o.sprite.zOrd=100*this.__id+r,"ceiling"==i.type&&(o.explodeParticle=i.explodeParticle,o.numParticles=i.numParticles),this.components.push(o),this.map.addObstacleSprite(o.sprite)}}},update:function(t,e,n,r){if(this.ceilingDead&&!this.playedCeilingDeadFx&&(this.map.deadCeilingIds.push(this.__id),this.playedCeilingDeadFx=!0,!this.isNew)){for(var i=this.getComponent("ceiling"),o=p.toAabb(i.scopeCollider),a=i.numParticles,s=0;s<a;s++){var u=y.create(v.random(o.min.x,o.max.x),v.random(o.min.y,o.max.y)),l=y.mul(y.randomUnit,v.random(0,15));e.addParticle(b.Defs[i.explodeParticle],u,l)}n.playSound("ceiling_break_01",{channel:"sfx",soundPos:this.pos})}if(this.isNew=!1,this.ceilingDead&&!this.residue){var c=this.getComponent("floor");if(void 0!==c.spriteDef.residue){var h=c.spriteDef,f=this.allocSprite;f.texture=d.Texture.fromImage(h.residue),c.sprite.addChild(f),this.residue=f}}var g=this.getComponent("ceiling");if(g){var m=p.intersectCircle(g.collider,r,1e-4);g.targetAlpha=this.ceilingDead?0:m?0:g.spriteDef.alpha,g.sprite.alpha=x.lerp(12*t,g.sprite.alpha,g.targetAlpha)}},render:function(t,e){for(var n=0;n<this.components.length;n++){var r=this.components[n],i=r.sprite,a=t.pointToScreen(r.pos),s=t.pixels(r.scale*r.spriteDef.scale);if(i.x=a.x,i.y=a.y,i.scale.x=s,i.scale.y=s,i.rotation=-r.rot,e){var u=this.map.display.debug;"ceiling"==r.type?(o(r.collider,16776960,u,t),o(r.scopeCollider,255,u,t)):o(r.collider,16711935,u,t)}}if(e){o(p.transform(m.getBoundingCollider(this.type),this.pos,this.rot,this.scale),16711935,this.map.display.debug,t)}}},c.prototype={init:function{},free:function{},updateData:function(t,e){this.type=t.type,this.pos=y.copy(t.pos),this.scale=t.scale}},h.prototype={free:function{},setDims:function(t,e){this.width=t,this.height=e},getMapTexture:function{return this.mapTexture},addObstacleSprite:function(t){var e=t.zIdx<100?this.display.botObstacle:this.display.topObstacle;e.addChild(t),e.children.sort(function(t,e){return t.zIdx==e.zIdx?t.zOrd-e.zOrd:t.zIdx-e.zIdx})},update:function(t,e){for(var n=this.obstaclePool.getPool,r=0;r<n.length;r++){var i=n[r];i.active&&i.update(t,this.particleBarn,this.audioManager)}for(var o=this.buildingPool.getPool,a=0;a<o.length;a++){var s=o[a];s.active&&s.update(t,this.particleBarn,this.audioManager,e)}},render:function(t,e){this.display.debug.clear,s(this.display,this.width,this.height,t);for(var n=this.obstaclePool.getPool,r=0;r<n.length;r++){var i=n[r];if(i.active){var a=t.pointToScreen(i.pos),u=t.pixels(i.scale*i.imgScale);i.sprite.x=a.x,i.sprite.y=a.y,i.sprite.scale.x=u,i.sprite.scale.y=u,i.sprite.rotation=-i.rot,e&&o(i.collider,16776960,this.display.debug,t)}}for(var l=this.lootSpawnerPool.getPool,c=0;c<l.length;c++){var h=l[c];if(h.active){var d=m.Defs[h.type],p=t.pointToScreen(h.pos),f=t.scaleToScreen(d.radius*h.scale),g=this.display.background;g.lineStyle(t.pixels(2),d.img.tint,1),g.beginFill(d.img.tint,.25),g.drawCircle(p.x,p.y,f),g.endFill}}for(var v=this.buildingPool.getPool,y=0;y<v.length;y++){var _=v[y];_.active&&_.render(t,e)}},renderMap:function(t,e){var n=this.height/window.innerHeight,r=f.visualGridScale*f.mapGridScale,i={x:0,y:0},o={x:this.width,y:0},s={x:0,y:this.height},u={x:this.width,y:this.height},l=new d.Graphics;l.beginFill(8433481,1),l.drawRect(i.x,i.y,u.x-i.x,u.y-i.y),l.endFill,l.lineStyle(2*n,0,1),a(l,i,s),a(l,s,u),a(l,u,o),a(l,o,i),l.lineStyle(.5*n,0,.5);for(var c=0;c<this.width;c+=r){a(l,{x:c,y:0},{x:c,y:this.height})}for(var h=0;h<this.height;h+=r){a(l,{x:0,y:h},{x:this.width,y:h})}this.display.mapRender.addChild(l);for(var v=new d.Graphics,_=0;_<t.length;_++){var b=t[_],x=m.Defs[b.type],w=null;switch(x.type){case"obstacle":w=p.copy(x.collision);break;case"building":var T=m.getComponentByType(b.type,"ceiling");T&&(w=p.copy(T.scopeCollision)),w=p.transform(w,T.pos,m.oriToRad(T.ori),T.scale)}if(w){switch(w=p.transform(w,b.pos,m.oriToRad(b.ori),b.scale),v.beginFill(x.map.color,1),w.type){case p.Type.Circle:v.drawCircle(w.pos.x,this.height-w.pos.y,w.rad*x.map.scale);break;case p.Type.Aabb:var S=y.mul(y.sub(w.max,w.min),.5),E=y.add(w.min,S);S=y.mul(S,x.map.scale),v.drawRect(E.x-S.x,this.height-E.y-S.y,2*S.x,2*S.y)}v.endFill}}this.display.mapRender.addChild(v);for(var P=new d.Container,M=0;M<g.Places.length;M++){var C=g.Places[M],A=new d.TextStyle({fontFamily:"Arial",fontSize:22,fontWeight:"bold",fill:["#ffffff"],stroke:"#000000",strokeThickness:1,dropShadow:!0,dropShadowColor:"#000000",dropShadowBlur:1,dropShadowAngle:Math.PI/3,dropShadowDistance:1,wordWrap:!1,align:"center"}),O=new d.Text(C.name,A);O.x=C.pos.x/n,O.y=C.pos.y/n,O.alpha=.75,P.addChild(O)}this.display.txtRender.addChild(P);var I=window.innerHeight,k=new d.BaseRenderTexture(I,I,d.SCALE_MODES.LINEAR,2),R=new d.RenderTexture(k),D=new d.Sprite(R);this.display.mapRender.scale=new d.Point(I/this.height,I/this.height),e.render(this.display.mapRender,R,!0),e.render(this.display.txtRender,R,!1),this.mapTexture=D}},t.exports=h},function(t,e,n){"use strict";function r{this.active=!1,this.dirty=!1,this.container=new i.Graphics,this.container.alpha=0,this.clientData={label:"",duration:0,keepAlive:!1,elapsed:0,radius:35,lineWidth:8,fontWidth:24},this.timerBackground=i.Sprite.fromImage("img/gui/timer-background.svg"),this.timerBackground.anchor=new i.Point(.5,.5),this.timerBackground.scale=new i.Point(1,1),this.container.addChild(this.timerBackground),this.innerCircle=new i.Graphics,this.outerCircle=new i.Graphics,this.container.addChild(this.innerCircle,this.outerCircle),this.counterText=new i.Text,this.counterText.anchor=new i.Point(.5,.5);var t={fontFamily:"Arial, Helvetica, sans-serif",fontWeight:"bold",fontSize:this.clientData.fontWidth,align:"center",fill:16777215,stroke:0,strokeThickness:3};this.counterText.style=t,this.counterText.text=this.clientData.duration.toFixed(1),this.container.addChild(this.counterText),this.labelText=new i.Text,this.labelText.anchor=new i.Point(.5,.5);var e={fontFamily:"Arial, Helvetica, sans-serif",fontWeight:"100",fontSize:this.clientData.fontWidth,align:"center",fill:16777215};this.labelText.style=e,this.container.addChild(this.labelText),this.screenScaleFactor=1,this.callback=null}var i=n(2);n(3),n(4),n(0);r.prototype={init:function(t,e,n,r){this.active=!0,this.clientData={label:n,duration:e,keepAlive:r,elapsed:0,radius:35,lineWidth:8,fontWidth:24},this.labelText.text=this.clientData.duration.toFixed(1),this.callback=t,this.container.visible=!0,this.container.alpha=1},destroy:function{this.container.destroy({children:!0,texture:!0})},resize:function(t){this.screenScaleFactor=t},free:function(t){this.active=!1,t&&(this.container.visible=!1,this.container.clear)},update:function(t,e,n){if(!this.active)return void(this.container.alpha=this.clientData.keepAlive?1:0);this.clientData.elapsed+=t,this.clientData.elapsed=Math.min(this.clientData.elapsed,this.clientData.duration),(this.clientData.elapsed>=this.clientData.duration||e.dead)&&(this.render(n),this.free,this.callback&&this.callback(e))},render:function(t){if(this.active){this.container.clear,this.outerCircle.clear,this.counterText.text="",this.labelText.text="";var e=Math.min(this.clientData.elapsed/this.clientData.duration,1),n={x:t.screenWidth/2,y:t.screenHeight/3*this.screenScaleFactor},r=Math.min(e,1)*Math.PI*2-Math.PI/2;this.container.beginFill(0,.5),this.outerCircle.lineStyle(.75*this.clientData.lineWidth,16777215),this.outerCircle.arc(0,0,this.clientData.radius,-Math.PI/2,r,!1),this.counterText.text=Math.max(0,this.clientData.duration-this.clientData.elapsed).toFixed(1);var i=2.5*this.clientData.radius;this.labelText.position.y=i,this.labelText.text=this.clientData.label;var o=this.clientData.label.length*this.clientData.fontWidth*.6,a=1.5*this.clientData.fontWidth,s=0-o/2,u=i-a/2;this.container.drawRoundedRect(s,u,o,a,5),this.container.position={x:n.x,y:n.y}}}},t.exports={PieTimer:r}},function(t,e,n){"use strict";function r(t){this.container=new o.Container,t.display.addChild(this.container),this.backpack=o.Sprite.fromImage("img/player/circle-base.svg"),this.backpack.anchor=new o.Point(.5,.5),this.backpack.scale=new o.Point(.4,.4),this.container.addChild(this.backpack),this.skinType="outfitBase";var e=a.items[this.skinType];this.baseSpriteName=e.skinImg.baseSprite,this.sprite=o.Sprite.fromImage(this.baseSpriteName),this.sprite.anchor=new o.Point(.5,.5),this.sprite.scale=new o.Point(.5*e.skinImg.baseScale,.5*e.skinImg.baseScale),this.sprite.tint=e.skinImg.baseTint,this.container.addChild(this.sprite),this.gun=o.Sprite.fromImage("img/guns/gun-short.svg"),this.gun.anchor=new o.Point(.5,1),this.gun.scale=new o.Point(.5,.5),this.gun.pivot=new o.Point(0,110),this.container.addChild(this.gun),this.chest=o.Sprite.fromImage("img/player/armor-base.svg"),this.chest.anchor=new o.Point(.5,.5),this.chest.scale=new o.Point(.5,.5),this.container.addChild(this.chest),this.helmet=o.Sprite.fromImage("img/player/circle-base.svg"),this.helmet.anchor=new o.Point(.5,.5),this.helmet.scale=new o.Point(.3,.3),this.container.addChild(this.helmet),this.handSpriteName=e.skinImg.handSprite,this.hand_left_idle=new o.Point(35,40),this.hand_left=o.Sprite.fromImage(this.handSpriteName),this.hand_left.anchor=new o.Point(.5,.5),this.hand_left.scale=new o.Point(.35,.35),this.hand_left.pivot=this.hand_left_idle,this.hand_left.tint=e.skinImg.handTint,this.container.addChild(this.hand_left),this.hand_right_idle=new o.Point(-35,40),this.hand_right=o.Sprite.fromImage(this.handSpriteName),this.hand_right.anchor=new o.Point(.5,.5),this.hand_right.scale=new o.Point(.35,.35),this.hand_right.pivot=this.hand_right_idle,this.hand_right.tint=e.skinImg.handTint,this.container.addChild(this.hand_right),this.handLt=c.create(35,40),this.handRt=c.create(-35,40),this.gunHandLt=c.copy(this.handLt),this.gunHandRt=c.copy(this.handRt),this.gunTop=o.Sprite.fromImage("img/guns/gun-short.svg"),this.gunTop.anchor=new o.Point(.5,1),this.gunTop.scale=new o.Point(.5,.5),this.gunTop.pivot=new o.Point(0,110),this.gunTop.visible=!1,this.container.addChild(this.gunTop),this.anim={type:s.None,seq:0,frame:0,timer:0,duration:0},this.weapType="",this.weapSwapCooldown=0,this.playerSwitchCooldown=0,this.stepTicker=0,this.zoomFast=!1,this.playedDryFire=!1,this.netData={},this.localData={action:{type:a.actions.None}},this.pos=c.create(0,0),this.dir=c.create(1,0),this.scale=a.player.img.scale}function i(t){this.display=new o.Container,this.playerPool=new f.Pool(r,this),this.playerNames={},this.audioManager=t}var o=n(2),a=n(3),s=a.Anim,u=n(14),l=n(4),c=n(0),h=n(1),d=n(8),p=n(13),f=n(11),g=n(7),m=n(30);r.prototype={init:function{this.isNew=!1,this.wasInsideObstacle=!1,this.insideObstacleType="",this.lastInsideObstacleTime=0,this.playAnim(s.None,0)},free:function{this.container.x=0,this.container.y=0,this.container.visible=!1},updateData:function(t,e){this.isNew=e,this.netData={pos:c.copy(t.pos),dir:c.copy(t.dir),dead:t.dead,animType:t.animType,animSeq:t.animSeq,animPos:t.animPos,skin:t.skin,backpack:t.backpack,helmet:t.helmet,chest:t.chest,curWeapType:t.curWeapType},this.netData.animSeq!=this.anim.seq&&this.playAnim(this.netData.animType,this.netData.animSeq),e&&(this.container.visible=!0)},getScopeZoom:function{var t=this.localData.scopedBuilding?"1xscope":this.localData.curScope;return a.scopeZoomRadius[t]},getBagLevel:function{return a.items[this.netData.backpack].bagLevel},equippedWeaponType:function{return a.items[this.netData.curWeapType].type},hasWeaponInSlot:function(t){return""!==this.localData.weapons[t].name},setLocalData:function(t){var e=this.localData.curScope,n=this.localData;if(n.health=t.health,n.boost=t.boost,n.curWeapIdx=t.curWeapIdx,n.curScope=t.curScope,n.scopedBuilding=t.scopedBuilding,n.action={type:t.action.type},t.action.type!=a.actions.None&&(n.action.item=t.action.item,n.action.time=t.action.time,n.action.duration=t.action.duration),t.inventoryDirty){n.inventory=[];for(var r in a.bagSizes)a.bagSizes.hasOwnProperty(r)&&(n.inventory[r]=t.inventory[r])}if(t.weapsDirty){n.weapons=[];for(var i=0;i<a.WeaponSlot.Count;i++){var o={};o.name=t.weapons[i].name,o.ammo=t.weapons[i].ammo,n.weapons.push(o)}}this.localData.curScope!=e&&(this.zoomFast=!0),this.localData.scopedBuilding&&(this.zoomFast=!1)},updateSkin:function{var t=this.skinType,e=a.items[t].skinImg;this.baseSpriteName=e.baseSprite,this.sprite.texture=o.Texture.fromImage(this.baseSpriteName),this.sprite.tint=e.baseTint,this.sprite.scale=new o.Point(.5*e.baseScale,.5*e.baseScale),this.hand_left.tint=e.handTint,this.hand_right.tint=e.handTint},updateWeapon:function{var t=this.weapType,e=a.items[t];switch(e.type){case"gun":var n=e.worldImg;this.gun.texture=o.Texture.fromImage(n.sprite),this.gun.tint=n.tint,this.gun.scale.x=n.scale.x,this.gun.scale.y=n.scale.y,this.gun.pivot.x=0,this.gun.pivot.y=20,this.gun.visible=!0,n.sprite_top&&(this.gunTop.texture=o.Texture.fromImage(n.sprite_top),this.gunTop.tint=n.tint,this.gunTop.scale.x=n.scale.x,this.gunTop.scale.y=n.scale.y,this.gunTop.pivot.x=0,this.gunTop.pivot.y=20),this.gunTop.visible=void 0!==n.sprite_top,this.gunHandLt=c.create(-15,80+n.leftHandOffset),this.gunHandRt=c.create(-5,40),this.hand_left.visible=2==n.hands;break;case"melee":this.gun.visible=!1,this.gunTop.visible=!1,this.hand_left.visible=!0,this.hand_right.visible=!0}},playAnim:function(t,e){this.anim={type:t,seq:e,timer:0,fnFrame:0,mirror:Math.random<.5,startLt:c.copy(this.handLt),startRt:c.copy(this.handRt)}},updateAnim:function(t,e){this.anim.timer+=t;var n=m[this.anim.type];if(this.anim.type==s.Melee){var r=this.netData.curWeapType;if(void 0===n[r])return void this.playAnim(s.None,this.anim.seq);n=n[r]}for(var i=n.frames,o=this.anim.timer,a=-1,u=0;o>=i[u].time&&u<i.length-1;)o-=i[u].time,a++,u++;var l=Math.min(o/i[u].time,1),d=a>=0?i[a].handLt:this.anim.startLt,p=a>=0?i[a].handRt:this.anim.startRt,f=i[u].handLt,g=i[u].handRt;if(this.handLt=h.v2lerp(l,d,f),this.handRt=h.v2lerp(l,p,g),n.mirror&&this.anim.mirror){var v=c.copy(this.handLt);this.handLt=c.copy(this.handRt),this.handRt=c.copy(v),this.handLt.x*=-1,this.handRt.x*=-1}for(var y=u==i.length-1&&h.eqAbs(l,1),_=y?u:a;this.anim.fnFrame<=_;){var b=i[this.anim.fnFrame].doneFn;void 0!==b&&this[b](e),this.anim.fnFrame++}y&&this.playAnim(s.None,this.anim.seq)},playAnimSwingSound:function(t){var e=a.items[this.netData.curWeapType];void 0!==e.sound.swing&&t.audioManager.playSound(e.sound.swing,{channel:"sfx",soundPos:this.pos,fallOff:3})},doMeleeCollision:function(t){var e=a.items[this.netData.curWeapType];if("melee"!==e.type)return void console.log("Invalid melee item");for(var n=c.add(this.pos,c.mul(this.dir,e.rangeMult)),r=e.areaOfEffect,i=[],o=null,s=null,u=0,l=t.map.obstaclePool.getPool,h=0;h<l.length;h++){var f=l[h];if(!f.dead){var m=p.intersectCircle(f.collider,n,r);m&&m.pen>u&&(o=f,s=m,u=m.pen)}}if(o){var v=c.add(n,c.mul(this.dir,r-s.pen)),y=c.mul(this.dir,-7.5);y=c.rotate(y,(Math.random-.5)*Math.PI/3),i.push({pos:v,vel:y,particle:o.hitParticle,sound:o.sound.punch,soundFn:"playGroup"})}for(var _=t.playerBarn.playerPool.getPool,b=0;b<_.length;b++){var x=_[b];if(x.active&&(x.__id!=this.__id&&!x.netData.dead)){if(d.testCircleCircle(c.add(this.pos,c.mul(this.dir,e.rangeMult)),e.areaOfEffect,x.pos,a.player.radius)){var w=c.mul(this.dir,1);w=c.rotate(w,(Math.random-.5)*Math.PI/3),i.push({pos:x.pos,vel:w,particle:"bloodSplat",sound:"punch_hit_01",soundFn:"playSound"});break}}}for(var T=0;T<i.length;T++){var S=i[T];t.particleBarn.addParticle(g.Defs[S.particle],S.pos,S.vel),t.audioManager[S.soundFn](S.sound,{channel:"hits",soundPos:S.pos})}}},i.prototype={update:function(t,e,n,r,i,o){for(var s=this.playerPool.getPool,h=0;h<s.length;h++){var d=s[h];if(d.active){var f=d.__id==e,m=d.pos;d.pos=c.copy(d.netData.pos),d.dir=c.copy(d.netData.dir);for(var v=null,y=i.obstaclePool.getPool,_=0;_<y.length;_++){var b=y[_];if(!b.dead&&"bush_01"==b.type){var x=.25*a.player.radius;if(p.intersectCircle(b.collider,d.pos,x)){v=b;break}}}var w=null!=v;if(w&&(d.insideObstacleType=v.type),d.lastInsideObstacleTime-=t,d.wasInsideObstacle!=w&&d.lastInsideObstacleTime<0&&!d.isNew){var T=u.Defs[d.insideObstacleType];d.lastInsideObstacleTime=.2,this.audioManager.playSound(T.sound.enter,{channel:"sfx",soundPos:d.pos,falloff:1});for(var S=c.normalizeSafe(c.sub(m,d.pos),c.create(1,0)),E=w?1:-1,P=Math.floor(l.random(3,5)),M=0;M<P;M++){var C=c.mul(c.rotate(c.mul(S,E),(Math.random-.5)*Math.PI/1.5),l.random(6,8));n.addParticle(g.Defs[T.hitParticle],d.pos,C)}}d.wasInsideObstacle=w;var A=c.length(c.sub(m,d.pos));if(d.stepTicker+=A,d.stepTicker>4){d.stepTicker=0;var O=this.getGroundSurface(d.pos,i);this.audioManager.playGroup("footstep_"+O,{soundPos:d.pos,fallOff:3})}if(d.skinType!=d.netData.skin&&(d.skinType=d.netData.skin,d.updateSkin),d.weapSwapCooldown-=t,d.gunSwitchCooldown-=t,d.weapType!=d.netData.curWeapType&&(d.weapType=d.netData.curWeapType,d.updateWeapon),f){var I=d.localData.curWeapIdx,k=d.localData.weapons[I],R=a.items[k.name];if(!d.playedDryFire&&"gun"==d.equippedWeaponType&&(o.mousePressed||o.mouseDown&&"auto"==R.fireMode)&&0===d.localData.action.type){var D=d.localData.inventory[R.ammo],L=k.ammo;0===D&&0===L&&(this.audioManager.playSound(R.sound.empty),d.playedDryFire=!0)}o.mousePressed||o.mouseDown||(d.playedDryFire=!1)}if(f&&d.curWeapIdx!=d.localData.curWeapIdx&&(d.curWeapIdx=d.localData.curWeapIdx,d.weapSwapCooldown<0)){d.weapSwapCooldown=.25;var j=a.items[d.weapType];if("melee"==j.type)this.audioManager.playSound(j.sound.deploy,{channel:"sfx",soundPos:d.pos,fallOff:3});else if("gun"==j.type){var B="gun_switch_01";d.gunSwitchCooldown>0?B=j.sound.deploy:d.gunSwitchCooldown=a.player.freeSwitchCooldown,this.audioManager.stopLocalActionSound,this.audioManager.playSound(B,{channel:"activePlayer"})}}var N={playerBarn:this,map:i,audioManager:this.audioManager,particleBarn:n};d.updateAnim(t,N);var F="gun"==a.items[d.netData.curWeapType].type,U=F?d.gunHandLt:d.handLt,W=F?d.gunHandRt:d.handRt;d.hand_left.pivot.x=U.x,d.hand_left.pivot.y=U.y,d.hand_right.pivot.x=W.x,d.hand_right.pivot.y=W.y;var H=Math.atan2(d.dir.x,d.dir.y);d.hand_left.rotation=H,d.hand_right.rotation=H,d.gun.rotation=H,d.gunTop.rotation=H;var z=a.items[d.skinType],X="camo"==z.subtype,G=d.getBagLevel;if(G>0&&!X){var q=a.items[d.netData.backpack],V=G>0?.03*G+.4:0,Y=.75*d.backpack.width;d.backpack.tint=q.tint,d.backpack.scale.x=V,d.backpack.scale.y=V,d.backpack.pivot.x=d.dir.x*Y,d.backpack.pivot.y=d.dir.y*-Y,d.backpack.visible=!0}else d.backpack.visible=!1;if(""==d.netData.chest||X)d.chest.visible=!1;else{var K=a.items[d.netData.chest];d.chest.tint=K.tint,d.chest.visible=!0}if(""==d.netData.helmet||X)d.helmet.visible=!1;else{var $=a.items[d.netData.helmet],J=.5*d.helmet.width;d.helmet.pivot.x=d.dir.x*J,d.helmet.pivot.y=d.dir.y*-J,d.helmet.tint=$.tint,d.helmet.visible=!0}d.container.visible=!d.netData.dead,d.isNew=!1}}},render:function(t){for(var e=this.playerPool.getPool,n=0;n<e.length;n++){var r=e[n];if(r.active){var i=t.pointToScreen(r.pos),o=t.pixels(r.scale);r.container.x=i.x,r.container.y=i.y,r.container.scale.x=o,r.container.scale.y=o}}},getGroundSurface:function(t,e){for(var n="grass",r=e.buildingPool.getPool,i=0;i<r.length;i++){for(var o=r[i],a=!1,s=0;s<o.components.length;s++){var u=o.components[s];if("floor"==u.type&&(a=p.intersectCircle(u.collider,t,1e-4))&&(n=u.surface),"ceiling"==u.type&&(a=p.intersectCircle(u.scopeCollider,t,1e-4))){n=u.surface;break}}if(a)break}return n},getPlayerById:function(t){for(var e=this.playerPool.getPool,n=0;n<e.length;n++){var r=e[n];if(r.active&&r.__id===t)return r}},getActivePlayerIds:function{return this.playerPool.getPool.filter(function(t){return t.active}).map(function(t){return t.__id})},setPlayerName:function(t,e){this.playerNames[t]=e},getPlayerName:function(t){return this.playerNames[t]||"unknown"}},t.exports={PlayerBarn:i}},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var i=function{function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}},o=n(6),a=function{function t(e){r(this,t);var n=o(" ",{class:"ui-profiler-list"}),i=o(" ",{class:"ui-profiler-list-header",html:e});n.append(i);var a=o("<ul/>");n.append(a),o("#ui-profiler-top-left").append(n),this.elem=n}return i(t,[{key:"free",value:function{this.elem.remove,this.elem=null}},{key:"clear",value:function{this.elem.children("ul").first.empty}},{key:"add",value:function(t,e){var n=this.elem.children("ul").first,r=o("<li/>").append(o(" ",{class:"kv",html:t}));return void 0!==e&&r.append(o(" ",{class:"kv",html:e})),n.append(r),r}}]),t},s=function{function t{r(this,t),this.active=!1,this.host=""}return i(t,[{key:"start",value:function(t,e,n){var r=this;this.active=!0,this.ws=new WebSocket("ws://"+this.host+"/profiler?gameId="+t),this.ws.onerror=function(t){console.log("Profiler socket error",t),r.ws.close},this.ws.onopen=function{console.log("Connected to profiler server")},this.ws.onmessage=function(t){var e=JSON.parse(t.data);r.setServerProfile(e)},this.ws.onclose=function{console.log("Profiler socket closed")},e.showPanel(0),n.showPanel(2),this.statsFps=e,this.statsMem=n,this.clientUi=new a("CLIENT"),this.serverUi=new a("SERVER")}},{key:"stop",value:function{this.active&&(this.active=!1,this.ws.close,this.clientUi.free,this.serverUi.free,this.clientUi=null,this.serverUi=null)}},{key:"setClientProfile",value:function(t){this.clientUi.clear;var e=this.clientUi.add,n=o(" ").append(this.statsFps.dom).append(this.statsMem.dom);e.append(n),this.clientUi.add("--");for(var r=0;r<t.length;r++){var i=t[r],a=i.elapsed.toFixed(2),s="&nbsp".repeat(2*i.depth);this.clientUi.add(s+i.desc,a)}}},{key:"setServerProfile",value:function(t){var e=t.stats,n=t.prof;this.serverUi.clear,this.serverUi.add("Elapsed",e.elapsed.toFixed(2)+" ("+e.elapsedMax.toFixed(2)+") ms"),this.serverUi.add("Recv",(e.avgRecv/1024).toFixed(2)+" ("+(e.maxRecv/1024).toFixed(2)+") kbps"),this.serverUi.add("Send",(e.avgSend/1024).toFixed(2)+" ("+(e.maxSend/1024).toFixed(2)+") kbps"),this.serverUi.add("--");for(var r=0;r<n.length;r++){var i=n[r],o=i.elapsed.toFixed(2),a="&nbsp".repeat(2*i.depth);this.serverUi.add(a+i.desc,o)}}}]),t};t.exports=s},function(t,e,n){"use strict";var r={players:{m9_01:{name:"audio/guns/m9_01.mp3",volume:1,maxInstances:5},m9_reload_01:{name:"audio/guns/m9_reload_01.mp3",volume:1},m9_switch_01:{name:"audio/guns/m9_switch_01.mp3",volume:1},glock_01:{name:"audio/guns/glock_01.mp3",volume:1,maxInstances:5},glock_reload_01:{name:"audio/guns/glock_reload_01.mp3",volume:1},glock_switch_01:{name:"audio/guns/glock_switch_01.mp3",volume:1},ot38_01:{name:"audio/guns/ot38_01.mp3",volume:1,maxInstances:5},ot38_reload_01:{name:"audio/guns/ot38_reload_01.mp3",volume:1},ot38_switch_01:{name:"audio/guns/ot38_switch_01.mp3",volume:1},ak47_01:{name:"audio/guns/ak47_01.mp3",volume:1,maxInstances:5},ak47_reload_01:{name:"audio/guns/ak47_reload_01.mp3",volume:1},ak47_switch_01:{name:"audio/guns/ak47_switch_01.mp3",volume:1},dp28_01:{name:"audio/guns/dp28_01.mp3",volume:1,maxInstances:5},dp28_reload_01:{name:"audio/guns/dp28_reload_01.mp3",volume:1},dp28_switch_01:{name:"audio/guns/dp28_switch_01.mp3",volume:1},m870_01:{name:"audio/guns/m870_01.mp3",volume:1,maxInstances:5},m870_reload_01:{name:"audio/guns/m870_reload_01.mp3",volume:1},m870_cycle_01:{name:"audio/guns/m870_cycle_01.mp3",volume:1},m870_pull_01:{name:"audio/guns/m870_pull_01.mp3",volume:1},mp220_01:{name:"audio/guns/mp220_01.mp3",volume:1,maxInstances:5},mp220_reload_01:{name:"audio/guns/mp220_reload_01.mp3",volume:1},mp220_deploy_01:{name:"audio/guns/mp220_deploy_01.mp3",volume:1},saiga_01:{name:"audio/guns/saiga_01.mp3",volume:1,maxInstances:5},saiga_reload_01:{name:"audio/guns/saiga_reload_01.mp3",volume:1},saiga_switch_01:{name:"audio/guns/saiga_switch_01.mp3",volume:1},m39_01:{name:"audio/guns/m39_01.mp3",volume:1,maxInstances:5},m39_reload_01:{name:"audio/guns/m39_reload_01.mp3",volume:1},m39_switch_01:{name:"audio/guns/m39_switch_01.mp3",volume:1},mp5_01:{name:"audio/guns/mp5_01.mp3",volume:1,maxInstances:5},mp5_reload_01:{name:"audio/guns/mp5_reload_01.mp3",volume:1},mp5_switch_01:{name:"audio/guns/mp5_switch_01.mp3",volume:1},mac10_01:{name:"audio/guns/mac10_01.mp3",volume:1,maxInstances:5},mac10_reload_01:{name:"audio/guns/mac10_reload_01.mp3",volume:1},mac10_switch_01:{name:"audio/guns/mac10_switch_01.mp3",volume:1},mosin_01:{name:"audio/guns/mosin_01.mp3",volume:1,maxInstances:5},mosin_reload_01:{name:"audio/guns/mosin_reload_01.mp3",volume:1},mosin_cycle_01:{name:"audio/guns/mosin_cycle_01.mp3",volume:1},mosin_pull_01:{name:"audio/guns/mosin_pull_01.mp3",volume:1},empty_fire_01:{name:"audio/guns/empty_fire_01.mp3",volume:.9},empty_fire_02:{name:"audio/guns/empty_fire_02.mp3",volume:.9},gun_switch_01:{name:"audio/guns/gun_switch_01.mp3",volume:1}},hits:{stone_bullet_hit_01:{name:"audio/hits/stone_bullet_hit_01.mp3",volume:1,maxInstances:3},wood_bullet_hit_01:{name:"audio/hits/wood_bullet_hit_01.mp3",volume:1,maxInstances:3},wood_bullet_hit_02:{name:"audio/hits/wood_bullet_hit_02.mp3",volume:1,maxInstances:3},wood_bullet_hit_04:{name:"audio/hits/wood_bullet_hit_04.mp3",volume:1,maxInstances:3},bush_bullet_hit_01:{name:"audio/hits/bush_bullet_hit_01.mp3",volume:1,maxInstances:3},metal_bullet_hit_01:{name:"audio/hits/metal_bullet_hit_01.mp3",volume:1,maxInstances:3},metal_bullet_hit_02:{name:"audio/hits/metal_bullet_hit_02.mp3",volume:1,maxInstances:3},metal_bullet_hit_03:{name:"audio/hits/metal_bullet_hit_03.mp3",volume:1,maxInstances:3},metal_bullet_hit_04:{name:"audio/hits/metal_bullet_hit_04.mp3",volume:1,maxInstances:6},punch_hit_01:{name:"audio/hits/punch_hit_01.mp3",volume:1},player_bullet_hit_01:{name:"audio/hits/player_bullet_hit_01.mp3",volume:1,maxInstances:3},player_bullet_hit_02:{name:"audio/hits/player_bullet_hit_02.mp3",volume:1},plastic_bullet_hit_01:{name:"audio/hits/plastic_bullet_hit_01.mp3",volume:1,maxInstances:3},toilet_bullet_hit_01:{name:"audio/hits/toilet_bullet_hit_01.mp3",volume:1,maxInstances:3}},sfx:{crate_break_01:{name:"audio/sfx/crate_break_01.mp3",volume:1},crate_break_02:{name:"audio/sfx/crate_break_02.mp3",volume:1},tree_break_01:{name:"audio/sfx/tree_break_01.mp3",volume:1},bush_break_01:{name:"audio/sfx/bush_break_01.mp3",volume:1},bush_enter_01:{name:"audio/sfx/bush_enter_01.mp3",volume:1},barrel_break_01:{name:"audio/sfx/barrel_break_01.mp3",volume:1},stone_break_01:{name:"audio/sfx/stone_break_01.mp3",volume:1},wall_break_01:{name:"audio/sfx/wall_break_01.mp3",volume:1},ceiling_break_01:{name:"audio/sfx/ceiling_break_01.mp3",volume:1},toilet_break_01:{name:"audio/sfx/toilet_break_01.mp3",volume:1},footstep_grass_01:{name:"audio/sfx/footstep_grass_01.mp3",volume:1},footstep_grass_02:{name:"audio/sfx/footstep_grass_02.mp3",volume:1},footstep_metal_01:{name:"audio/sfx/footstep_metal_01.mp3",volume:1},footstep_metal_02:{name:"audio/sfx/footstep_metal_02.mp3",volume:1},footstep_metal_03:{name:"audio/sfx/footstep_metal_03.mp3",volume:1},footstep_wood_01:{name:"audio/sfx/footstep_wood_01.mp3",volume:1},footstep_wood_02:{name:"audio/sfx/footstep_wood_02.mp3",volume:1},footstep_wood_03:{name:"audio/sfx/footstep_wood_03.mp3",volume:1},punch_swing_01:{name:"audio/sfx/punch_swing_01.mp3",volume:1},bullet_whiz_01:{name:"audio/sfx/bullet_whiz_01.mp3",volume:1},bullet_whiz_02:{name:"audio/sfx/bullet_whiz_02.mp3",volume:1},bullet_whiz_03:{name:"audio/sfx/bullet_whiz_03.mp3",volume:1},frag_throw_01:{name:"audio/sfx/frag_throw_01.mp3",volume:1},frag_pin_01:{name:"audio/sfx/frag_pin_01.mp3",volume:1},frag_ground_01:{name:"audio/sfx/frag_ground_01.mp3",volume:1},explosion_01:{name:"audio/sfx/explosion_01.mp3",volume:1},stow_weapon_01:{name:"audio/ui/stow_weapon_01.mp3",volume:1}},ambient:{ambient_wind_01:{name:"audio/ambient/ambient_wind_01.mp3",volume:1},menu_music:{name:"audio/ambient/menu_music_01.mp3",volume:1}},ui:{ammo_pickup_01:{name:"audio/ui/ammo_pickup_01.mp3",volume:1},clothes_pickup_01:{name:"audio/ui/clothes_pickup_01.mp3",volume:1},helmet_pickup_01:{name:"audio/ui/helmet_pickup_01.mp3",volume:1},chest_pickup_01:{name:"audio/ui/chest_pickup_01.mp3",volume:1},gun_pickup_01:{name:"audio/ui/gun_pickup_01.mp3",volume:1},scope_pickup_01:{name:"audio/ui/scope_pickup_01.mp3",volume:1},pack_pickup_01:{name:"audio/ui/pack_pickup_01.mp3",volume:1},soda_pickup_01:{name:"audio/ui/soda_pickup_01.mp3",volume:1},pills_pickup_01:{name:"audio/ui/pills_pickup_01.mp3",volume:1},bandage_pickup_01:{name:"audio/ui/bandage_pickup_01.mp3",volume:1},healthkit_pickup_01:{name:"audio/ui/healthkit_pickup_01.mp3",volume:1},frag_pickup_01:{name:"audio/ui/frag_pickup_01.mp3",volume:1}}},i={footstep_grass:{channel:"sfx",sounds:["footstep_grass_01","footstep_grass_02"]},footstep_container:{channel:"sfx",sounds:["footstep_metal_03"]},footstep_warehouse:{channel:"sfx",sounds:["footstep_metal_01","footstep_metal_02"]},footstep_house:{channel:"sfx",sounds:["footstep_wood_02","footstep_wood_03"]},footstep_shack:{channel:"sfx",sounds:["footstep_wood_01"]},player_bullet_hit:{channel:"hits",sounds:["player_bullet_hit_01"]},wall_bullet:{channel:"hits",sounds:["metal_bullet_hit_01","metal_bullet_hit_03"]},wall_wood_bullet:{channel:"hits",sounds:["wood_bullet_hit_02"]},stone_bullet:{channel:"hits",sounds:["stone_bullet_hit_01"]},barrel_bullet:{channel:"hits",sounds:["metal_bullet_hit_03"]},silo_bullet:{channel:"hits",sounds:["metal_bullet_hit_04"]},toilet_bullet:{channel:"hits",sounds:["toilet_bullet_hit_01"]},wood_crate_bullet:{channel:"hits",sounds:["wood_bullet_hit_04"]},ammo_crate_bullet:{channel:"hits",sounds:["plastic_bullet_hit_01"]},bush_bullet:{channel:"hits",sounds:["bush_bullet_hit_01"]},tree_bullet:{channel:"hits",sounds:["wood_bullet_hit_01"]},player_bullet_grunt:{channel:"hits",sounds:["player_bullet_hit_02"]},bullet_whiz:{channel:"sfx",sounds:["bullet_whiz_01","bullet_whiz_02","bullet_whiz_03"]}},o={activePlayer:{volume:.5,maxRange:48,list:"players",name:"activePlayer"},otherPlayers:{volume:.5,maxRange:48,list:"players",name:"otherPlayers"},hits:{volume:.4,maxRange:48,list:"hits",name:"hits"},sfx:{volume:1,maxRange:48,list:"sfx",name:"sfx"},ambient:{volume:1,maxRange:1,list:"ambient",name:"ambient"},ui:{volume:.75,maxRange:1,list:"ui",name:"ui"}};t.exports={Sounds:r,Groups:i,Channels:o}},function(t,e,n){"use strict";var r=function t{function e(t){return i.appendChild(t.dom),t}function n(t){for(var e=0;e<i.children.length;e++)i.children[e].style.display=e===t?"block":"none";r=t}var r=0,i=document.createElement("div");i.style.cssText="display:inline-block;cursor:pointer;opacity:0.9;padding-right:8px",i.addEventListener("click",function(t){t.preventDefault,n(++r%i.children.length)},!1);var o=(performance||Date).now,a=o,s=0,u=e(new t.Panel("FPS","#0ff","#002")),l=e(new t.Panel("MS","#0f0","#020"));if(self.performance&&self.performance.memory)var c=e(new t.Panel("MB","#f08","#201"));return n(0),{REVISION:16,dom:i,addPanel:e,showPanel:n,begin:function{o=(performance||Date).now},end:function{s++;var t=(performance||Date).now;if(l.update(t-o,200),t>=a+1e3&&(u.update(1e3*s/(t-a),100),a=t,s=0,c)){var e=performance.memory;c.update(e.usedJSHeapSize/1048576,e.jsHeapSizeLimit/1048576)}return t},update:function{o=this.end},domElement:i,setMode:n}};r.Panel=function(t,e,n){var r=1/0,i=0,o=Math.round,a=o(window.devicePixelRatio||1),s=80*a,u=48*a,l=3*a,c=2*a,h=3*a,d=15*a,p=74*a,f=30*a,g=document.createElement("canvas");g.width=s,g.height=u,g.style.cssText="width:80px;height:48px";var m=g.getContext("2d");return m.font="bold "+9*a+"px Helvetica,Arial,sans-serif",m.textBaseline="top",m.fillStyle=n,m.fillRect(0,0,s,u),m.fillStyle=e,m.fillText(t,l,c),m.fillRect(h,d,p,f),m.fillStyle=n,m.globalAlpha=.9,m.fillRect(h,d,p,f),{dom:g,update:function(u,v){r=Math.min(r,u),i=Math.max(i,u),m.fillStyle=n,m.globalAlpha=1,m.fillRect(0,0,s,d),m.fillStyle=e,m.fillText(o(u)+" "+t+" ("+o(r)+"-"+o(i)+")",l,c),m.drawImage(g,h+a,d,p-a,f,h,d,p-a,f),m.fillRect(h+p-a,d,a,f),m.fillStyle=n,m.globalAlpha=.9,m.fillRect(h+p-a,d,a,o((1-u/v)*f))}}},t.exports={Stats:r}},function(t,e,n){"use strict";function r(t,e,n,r,i,c){var h=this;this.profiler=e,this.game=t,this.profiler=e,this.particleBarn=c,this.statsElem=a("#ui-stats"),this.statsLarge=a("#ui-stats-large"),this.statsSmall=a("#ui-stats-small"),this.statsInfo=a("#ui-stats-info-box"),this.statsAd=a("#ui-stats-ad-container"),this.killElem=a("#ui-kills"),this.killText=a("#ui-kill-text"),this.killCount=a("#ui-kill-count"),this.killTimeout=null,this.escMenuElem=a("#ui-game-menu"),this.escMenuDisplayed=!1,this.topCenter=a("#ui-top-center"),this.waitingForPlayers=!0,this.waitingText=a("#ui-waiting-text"),this.spectateOptions=a("#ui-spectate-options"),this.spectatedPlayerText=a("#ui-spectate-text"),this.spectatedPlayerName="",this.topRight=a("#ui-top-right"),this.interaction=a("#ui-interaction"),this.interactionPress=a("#ui-interaction-press"),this.interactionDescription=a("#ui-interaction-description"),this.bottomLeft=a("#ui-bottom-left"),this.bottomRight=a("#ui-bottom-right"),this.equippedAmmo=a("#ui-equipped-ammo"),this.prevEquippedAmmo=0,this.prevRemainingAmmo=0,this.prevEquippedWeapon="",this.currentClip=a("#ui-current-clip"),this.ammoDivider=a("#ui-ammo-divider"),this.remainingAmmo=a("#ui-remaining-ammo"),this.rightCenter=a("#ui-right-center"),this.medicalInteractive=a("#ui-medical-interactive"),this.healthBar=a("#ui-health-counter"),this.healthBarInner=a("#ui-health-actual"),this.healthBarDepleted=a("#ui-health-depleted"),this.boostBar=a("#ui-boost-counter"),this.leaderboard=a("#ui-leaderboard-contents"),this.playersAlive=a("#ui-players-alive"),this.announcement=a("#ui-announcement"),this.pickupMessage=a("#ui-pickup-message"),this.pickupTimeout=null,this.mapContainer=a("#ui-map-container"),this.mapContainerBottom=52,this.mapInfo=a("#ui-map-info"),this.mapInfoBottom=218,this.gasIcon=a("#ui-gas-icon"),this.gasIconVisible=!0,this.gasTimer=a("#ui-gas-timer"),this.mapMinimizeButton=a("#ui-map-minimize"),this.killFeed=a("#ui-killfeed-contents"),this.killFeedLinesMax=6,this.killFeedLineDuration=6,this.killFeedLines=[];for(var d=0;d<this.killFeedLinesMax;d++)this.killFeedLines[d]={div:null,timeAlive:0};this.boostSelectors=[];for(var p=0;p<s.player.boostBreakpoints.length;p++)this.boostSelectors[p]=this.boostBar.find("#ui-boost-counter-"+p).find(".ui-bar-inner");this.scopeSelectors={},this.lootSelectors={},this.weaponSelectors={},this.armorSelectors={},this.bottomCenterRight=a("#ui-bottom-center-right"),this.curAction={type:u.None},this.mouseUp=!1,a(".prop-event").on("mouseup",function(t){t.stopPropagation,h.mouseUp=!0}),this.useItem="",a(".ui-medical").on("click",function(t){t.stopPropagation,h.useItem=a(t.currentTarget).data("item")}),this.useScope="",a(document).on("click",".ui-zoom-inactive",function(t){t.stopPropagation,h.useScope=a(t.currentTarget).data("item")}),this.switchWeaponOne=!1,a("#ui-weapon-id-1").on("click",function(t){t.stopPropagation,h.switchWeaponOne=!0}),this.switchWeaponTwo=!1,a("#ui-weapon-id-2").on("click",function(t){t.stopPropagation,h.switchWeaponTwo=!0}),this.displayMapDirty=!1,this.displayMapClear=!1,a("#ui-map-expand").on("click",function(t){t.stopPropagation,h.displayMapLarge}),a("#ui-map-minimize").on("click",function(t){t.stopPropagation,h.toggleMiniMap}),a(document).on("keyup",function(t){76==t.which&&f.toggleFullScreen}),this.fullScreenButton=a("#btn-game-fullscreen"),this.fullScreenButton.click(function{h.toggleEscMenu}),this.resumeButton=a("#btn-game-resume"),this.resumeButton.click(function{h.toggleEscMenu}),this.spectateRestartButton=a("#ui-spec-restart"),this.quitGameButtons=a(".btn-quit"),this.quitGameButtons.click(function{h.resetKillfeed,h.game.gameOver=!0,h.game.onQuit}),this.healthRed=new o(255,0,0),this.healthDarkpink=new o(255,45,45),this.healthLightpink=new o(255,112,112),this.healthWhite=new o(255,255,255),this.healthGrey=new o(179,179,179),this.prevHealth=100,this.armorRed=new o(255,0,0),this.armorYellow=new o(255,125,48),this.armorGreen=new o(0,255,0),this.bagLevel=0,this.minimapDisplayed=!0,this.container=new l.Container,this.context=n,this.display={map:new l.Graphics,player:new l.Graphics,mapMask:new l.Graphics,zoneMask:new l.Graphics,circles:new l.Container,outerCircle:new l.Graphics,innerCircle:new l.Graphics,border:new l.Graphics,borderTop:new l.Graphics,zoneLine:new l.Graphics},this.container.addChild(this.display.map),this.container.addChild(this.display.circles),this.display.circles.addChild(this.display.outerCircle),this.display.circles.addChild(this.display.innerCircle),this.container.addChild(this.display.zoneLine),this.container.addChild(this.display.border),this.windowHeight=window.innerHeight,this.windowWidth=window.innerWidth,this.mapHeight=0,this.mapWidth=0,this.bigmapDisplayed=!1,this.mapCircleWidth=0,this.minimapMargin=16,this.minimapBorderWidth=4,this.minimapSize=256,this.minimapHeight=1600,this.minimapCircleWidth=4,this.screenScaleFactor=1,this.percentCurrentCenterX=0,this.percentCurrentCenterY=0,this.currentCenterWidth=0,this.percentTargetCenterX,this.percentTargetCenterY,this.targetCenterWidth,this.gas={active:!1},this.playerLineWidth=2,this.playerCircleWidth=8,this.playerMinimapSpriteX=16+this.minimapSize/2,this.playerMinimapSpriteY=this.windowHeight-this.minimapSize/2-16,this.mapSprite=l.Sprite.fromImage("img/gui/map_large.png"),this.mapSprite.anchor=new l.Point(.5,.5),this.display.map.addChild(this.mapSprite),this.targetCenter=null,this.targetCenterWidth=null,this.mapSpriteRenderX=0,this.mapSpriteRenderY=0,this.mapTextureFound=!1,this.mapTexture=null,this.playerOuter=l.Sprite.fromImage("img/gui/player-map-outer.svg"),this.playerOuter.anchor=new l.Point(.5,.5),this.playerOuterBaseScale=new l.Point(.3,.3),this.playerOuter.scale=this.playerOuterBaseScale,this.playerOuter.tint=16777215,this.container.addChild(this.playerOuter),this.player=l.Sprite.fromImage("img/player/player-base.svg"),this.player.anchor=new l.Point(.5,.5),this.playerBaseScale=new l.Point(.17,.17),this.player.scale=this.playerBaseScale,this.player.tint=16776960,this.container.addChild(this.player),this.localPos=new l.Point(0,0),this.audioManager=r,this.actionSoundInstance=!1,this.playerGruntCooldown=.75,this.playerGruntMinDamage=25,this.playerGruntTicker=0,this.muteButton=a("#ui-mute-ingame"),this.muteButtonImage=this.muteButton.find("img"),this.muteOffImg="img/gui/audio-off.svg",this.muteOnImg="img/gui/audio-on.svg";var g=this.audioManager.mute;this.muteButtonImage.attr("src",g?this.muteOffImg:this.muteOnImg),this.muteButton.on("click",function(t){t.stopPropagation;var e=h.audioManager.muteToggle;h.muteButtonImage.attr("src",e?h.muteOffImg:h.muteOnImg),e=null}),this.pieTimer=i,this.displayingStats=!1}function i(t,e,n,r){var i=t,o=e,a=i+(o-i)/n*r;return Math.floor(a)}function o(t,e,n){var r,i,o;!function(t,e,n){r=t,i=e,o=n}(t,e,n),this.getColors=function{return{r:r,g:i,b:o}}}var a=n(6),s=n(3),u=s.actions,l=n(2),c=n(10),h=n(0),d=n(1),p=(n(4),n(7),n(16)),f=n(12);r.prototype={free:function{this.clearUI,a(".prop-event").off("mouseup"),a(".ui-medical").off("click"),a(document).off("click",".ui-zoom-inactive"),a("#ui-weapon-id-1").off("click"),a("#ui-weapon-id-2").off("click"),a("#ui-map-expand").off("click"),a("#ui-map-minimize").off("click"),this.muteButton.off("click"),this.init},init:function{a(".ui-map-hidden").css("display","block"),this.spectateOptions.css("display","none")},update:function(t,e,n,r){var i=this,o=e.netData,a=e.localData;this.mapTextureFound||null!=this.mapTexture||(this.mapTexture=n.getMapTexture,null!=this.mapTexture&&(this.mapTextureFound=!0,this.display.map.removeChild(this.mapSprite),this.mapSprite=this.mapTexture,this.display.map.addChild(this.mapSprite),this.mapSprite.anchor=new l.Point(.5,.5),this.resize(this.windowWidth,this.windowHeight))),this.profiler.beginSample("loot");var c=null,h=r.getClosestLoot;if(null!==h&&e.localData.action.type==u.None&&!e.netData.dead){var f=!1,g=s.items[h.data.name],m=e.hasWeaponInSlot(s.WeaponSlot.Primary),v=e.hasWeaponInSlot(s.WeaponSlot.Secondary);m&&v&&"gun"!=e.equippedWeaponType&&"gun"==g.type&&(f=!0),f||(c=h)}if(this.displayLootInteraction(c),this.profiler.endSample,!o.dead){this.profiler.beginSample("weapons");for(var y=0;y<a.weapons.length;y++){var _=a.weapons[y].name,b=a.weapons[y].ammo;this.updateWeapon(_,b,y,a)}this.profiler.endSample,this.profiler.beginSample("armor");var x=""!=o.helmet?s.items[o.helmet].armorLevel:0;this.updateArmor(this.bottomCenterRight,"helmet",x,3,o.helmet);var w=""!=o.chest?s.items[o.chest].armorLevel:0;this.updateArmor(this.bottomCenterRight,"chest",w,3,o.chest),this.profiler.endSample}var T=s.items[o.backpack];this.updateLoot(T,this.rightCenter,"backpack",e.getBagLevel,3,T.lootImg.sprite);var S=this.bagLevel!=e.getBagLevel;this.bagLevel=e.getBagLevel,this.profiler.beginSample("inventory");for(var E in a.inventory){var P=s.items[E];if("heal"==P.type||"boost"==P.type){var M=a.inventory[E],C=s.bagSizes[E][e.getBagLevel];this.updateLoot(P,this.medicalInteractive,E,M,C,null,S)}else if("ammo"==P.type){var A=a.inventory[E],O=s.bagSizes[E][e.getBagLevel];this.updateLoot(P,this.rightCenter,E,A,O,null,S)}else if("scope"==P.type){var I=a.inventory[E];this.updateScope(this.topRight,E,I,a.curScope==E)}}this.updatePulseUI(t),this.profiler.endSample,this.profiler.beginSample("health"),this.updateHealth(t,a.health,o.dead),this.updateBoost(t,a.boost),this.profiler.endSample,null==h&&this.displayCancelInteraction;var k=a.action,R=d.eqAbs(d.clamp(k.time,0,k.duration),k.duration,.2);if(!(this.curAction.type==k.type&&this.curAction.item==k.item&&this.curAction.duration==k.duration||R||this.displayingStats)){this.curAction={type:k.type,item:k.item,time:k.time,duration:k.duration};var D=k.type!=u.Reload;if(this.pieTimer.free(D),this.actionSoundInstance&&(this.audioManager.stopSound(this.actionSoundInstance),this.actionSoundInstance=!1),k.type!=u.None){var L=s.items[k.item],j="",B=null,N=!1;switch(k.type){case u.Reload:j="Reloading",B=L.sound.reload,N="reload"==L.caseTiming;break;case u.UseItem:j="Using "+L.name,B=L.sound.use}if(B&&(this.actionSoundInstance=this.audioManager.playSound(B),this.audioManager.stopLocalActionSound),j.length>0&&this.pieTimer.init(function{i.curAction.type=u.None},this.curAction.duration-this.curAction.time,j,!1),N)for(var F=0;F<L.maxClip;F++){var U=F%2==0?-1:1,W=Math.PI+Math.PI/4*U;p.createCasingParticle(k.item,W,e.pos,e.dir,this.particleBarn)}}}if(this.profiler.beginSample("maps"),this.gas.active&&(this.percentCurrentCenterX=this.gas.currentCenter.x/n.width,this.percentCurrentCenterY=this.gas.currentCenter.y/n.height,this.currentCenterWidth=this.gas.currentWidth/n.width*this.mapSprite.width,this.percentTargetCenterX=this.gas.targetCenter.x/n.width,this.percentTargetCenterY=this.gas.targetCenter.y/n.height,this.targetCenterWidth=this.gas.targetWidth/n.width*this.mapSprite.width),this.bigmapDisplayed){var H=this.mapSprite.x-this.mapSprite.width/2+e.pos.x/n.width*this.mapSprite.width,z=this.mapSprite.y+this.mapSprite.height/2-e.pos.y/n.height*this.mapSprite.height;this.player.position=new l.Point(H,z),this.playerOuter.position=new l.Point(H,z)}else this.mapSprite.x=this.playerMinimapSpriteX+this.mapSprite.width/2-e.pos.x/n.width*this.mapSprite.width,this.mapSprite.y=this.playerMinimapSpriteY-this.mapSprite.height/2+e.pos.y/n.height*this.mapSprite.height;this.mapSpriteRenderX=this.mapSprite.x-this.mapSprite.width/2,this.mapSpriteRenderY=this.mapSprite.y+this.mapSprite.height/2,this.targetCenter={x:this.mapSpriteRenderX+this.percentTargetCenterX*this.mapSprite.width,y:this.mapSpriteRenderY-this.percentTargetCenterY*this.mapSprite.height},this.profiler.endSample;for(var X=0;X<this.killFeedLinesMax;X++){var G=this.killFeedLines[X];if(null!=G.div){G.timeAlive+=t;var q=G.div;G.timeAlive>=this.killFeedLineDuration&&"block"==q.css("display")?q.fadeOut(1e3):"none"==q.css("display")&&(q.remove,G.div=null,G.timeAlive=0)}}},hideAll:function{a("#ui-game").css("display","none")},showAll:function{a("#ui-game").css("display","block")},clearInputs:function{this.mouseUp=!1,this.useItem="",this.useScope="",this.switchWeaponOne=!1,this.switchWeaponTwo=!1},clearInventory:function{a(".ui-data-count").html("0").css({color:"#FFFFFF"});for(var t=1;t<3;t++)a("#ui-weapon-id-"+t).find(".ui-weapon-number").html(t);a(".ui-weapon-name").html(""),a(".ui-weapon-image").css("display","none"),a(".ui-weapon-switch").css("opacity",.6).css("background-color","rgba(0,0,0,0)"),this.currentClip.css("opacity",0),this.remainingAmmo.css("opacity",0),a(".ui-armor-counter").css("opacity",0),a(".ui-armor-counter-inner").css({height:"0%"}),a(".ui-zoom").css("display","none"),this.topRight.css("display","none")},resetKillfeed:function{for(var t=0;t<this.killFeedLinesMax;t++)this.killFeedLines[t]={div:null,timeAlive:0};this.killFeed.html("")},showKill:function(t,e,n,r,i){var o=this,a=i?e:"YOU";this.killText.text(a+" killed "+t+" with "+n),this.killCount.text(r+(r>1?" kills":" kill")),this.killTimeout&&clearTimeout(this.killTimeout),this.killElem.stop(!0),this.killElem.fadeIn(0),this.killTimeout=setTimeout(function{o.killElem.fadeOut(1e3)},6e3)},clearUI:function{this.pieTimer.free(!0),this.displayMapLarge(!0),this.displayMiniMap,this.resetKillfeed,this.resetLootImages,this.clearInventory,this.statsElem.hide,this.statsAd.hide,this.killElem.hide,this.toggleEscMenu(!0)},hideStats:function{this.displayingStats=!1,this.statsElem.hide},showStats:function(t){var e=this;this.toggleEscMenu(!0),t.type=t.type||"player",t.targetName=t.targetName||"",t.killerName=t.killerName||"",t.damageName=t.damageName||"",t.spectating=t.spectating||!1,t.suicide=t.suicide||!1,t.gameOver=t.gameOver||!1,t.stats=t.stats||{timeAlive:0,kills:0,rank:0},this.setSpectatedPlayerName(""),this.spectatedPlayerText.css("display",t.spectating?"none":"inline"),this.spectateRestartButton.css("display",t.spectating?"none":"inline");var n=2500,r="",i="",o=!1;switch(t.type){case"player":r=t.suicide?t.spectating?t.targetName+" killed themselves with "+t.damageName:"YOU killed YOURSELF with "+t.damageName:t.spectating?t.killerName+" killed "+t.targetName+" with "+t.damageName:t.killerName+" killed YOU with "+t.damageName,i=t.spectating?t.targetName+" died.":"You died.",this.clearInventory;break;case"gas":i=t.spectating?t.targetName+" died outside the safe zone.":"You died outside the safe zone.",this.clearInventory;break;case"victory":i=t.spectating?t.targetName+" won the game!":"Winner winner chicken dinner!",n=1e3,o=!0}this.pieTimer.free(!0),this.displayingStats=!0,this.statsSmall.html(r),this.statsLarge.html(i);var s=Math.floor(t.stats.timeAlive/3600),u=Math.floor(t.stats.timeAlive/60)%60,l=Math.floor(t.stats.timeAlive)%60,c="";s>0&&(c+=s+"h "),(s>0||u>0)&&(c+=u+"m "),c+=l+"s";var h=function(t,e){return a(" ",{class:"ui-stats-info"}).append(a(" ",{html:t})).append(a(" ",{html:e}))},d=a(" ",{class:"start-button menu-option",id:"ui-stats-restart",html:"Play New Game"});if(d.click(function{e.resetKillfeed,e.game.onQuit}),this.statsInfo.empty,this.statsInfo.append(h("Rank","#"+t.stats.rank)).append(h("Kills",""+t.stats.kills)).append(h("Survived",c)),this.statsInfo.append(d),t.gameOver||this.waitingForPlayers||o)d.css({position:"relative",width:225});else{var p=a(" ",{class:"start-button menu-option",id:"ui-stats-spectate",html:"Spectate"});p.click(function{e.game.beginSpectating}),this.statsInfo.append(p)}if(this.statsElem.stop,this.statsElem.delay(n).fadeIn(1e3),this.statsInfo.children.each(function(t,e){var r=a(e);r.hide,r.delay(n+750+400*t).fadeIn(1e3)}),this.statsAd.empty,!o){var f=' ';f+='<ins class="adsbygoogle" style="display:inline-block;width:300px;height:250px" data-ad-client="ca-pub-9768319988115495" data-ad-slot="8221176589"> ';this.statsAd.removeAttr("style"),this.statsAd.append(f),this.statsAd.append(" (adsbygoogle = window.adsbygoogle || []).push({});<\/script> "),this.statsAd.stop,this.statsAd.delay(n).fadeIn(1e3);var g=this.statsAd.find("#ad-block-stats-bottom");g.hide,g.delay(n).fadeIn(1e3)}},displaySpectateElements:function{this.scopeSelectors={},this.topRight.css("display","block"),this.spectateOptions.css("display","inline")},setSpectatedPlayerName:function(t){this.spectatedPlayerName!=t&&(this.spectatedPlayerText.find("#spectate-player").html(t),this.spectatedPlayerName=t)},updateKillFeed:function(t,e,n,r){for(var i=0,o=-1,s=0;s<this.killFeedLinesMax;s++){var u=this.killFeedLines[s];if(null==u.div){var l="";switch(t){case"player":var c=a(" ",{class:"killfeed-name",html:e}),h=a(" ",{class:"killfeed-name",html:n});l=c.add(" killed ").add(h).add(" with ").add(" "+r+" ");break;case"gas":l=a(" ",{class:"killfeed-name",html:n}).add(" died outside the safe zone ")}var d=a(" ",{class:"killfeed-div",html:l});return u.div=d,this.killFeed.children.each(function(t,e){var n=a(e);n.finish,n.animate({top:"+=35"},{queue:!0,duration:250},function{})}),void this.killFeed.prepend(d)}u.timeAlive>i&&(o=s,i=u.timeAlive)}if(o>=0){var p=this.killFeedLines[o];p.timeAlive=0,p.div.remove,p.div=null,this.updateKillFeed(t,e,n,r)}},updatePlayersAlive:function(t,e){this.playersAlive.html(t),this.playersAlive.removeClass("ui-players-alive-pulse")},displayMapLarge:function(t){this.bigmapDisplayed=!t&&!this.bigmapDisplayed,this.bigmapDisplayed?this.container.alpha=1:this.container.alpha=this.minimapDisplayed?1:0,a(".ui-map-hidden").css("display",this.bigmapDisplayed?"none":"block"),this.spectateOptions.css("display",!this.bigmapDisplayed&&this.game.spectating?"inline":"none"),this.resize(this.windowWidth,this.windowHeight)},toggleMiniMap:function{this.minimapDisplayed?this.hideMiniMap:this.displayMiniMap},hideMiniMap:function{this.bigmapDisplayed||(this.minimapDisplayed=!1,this.container.alpha=0,this.mapInfo.css("bottom","auto"))},displayMiniMap:function{this.bigmapDisplayed||(this.minimapDisplayed=!0,this.container.alpha=1,this.mapInfo.css("bottom",this.mapInfoBottom))},displayAnnouncement:function(t,e){var n="";switch(t){case c.GasMsgType.Warning:n="Red zone advances in";var r=Math.floor(e/60),i=e-60*r;n+=r>1?" "+r+" minutes":"",n+=1==r?" "+r+" minute":"",n+=i>0?" "+Math.floor(i)+" seconds":"",n+="!";break;case c.GasMsgType.Moving:n="Red zone advancing! Move to the safe zone."}n.length>0&&(this.announcement.html(n),this.announcement.fadeIn(400,function{setTimeout(function{a("#ui-announcement").fadeOut(800)},3e3)}))},displayPickupMessage:function(t){var e="";switch(t){case c.PickupMsgType.Full:e="Not enough space!";break;case c.PickupMsgType.AlreadyOwned:e="Item already owned!";break;case c.PickupMsgType.AlreadyEquipped:e="Item already equipped!";break;case c.PickupMsgType.BetterItemEquipped:e="Better item equipped!"}clearTimeout(this.pickupTimeout),this.pickupMessage.css("display","none"),this.pickupMessage.html(e).fadeIn(200),this.pickupTimeout=setTimeout(function{a("#ui-pickup-message").fadeOut(200)},3e3)},setWaitingForPlayers:function(t){this.waitingForPlayers=t,this.waitingText[0].style.display=t?"block":"none"},updateTimeLeft:function(t){var e=0;t.timeLeftWait>=0?(e=t.timeLeftWait,this.gasIconVisible||(this.mapInfo.removeClass("icon-pulse"),this.gasIcon.addClass("gas-icon").removeClass("danger-icon"),this.gasIconVisible=!0)):(e=t.timeLeftGas,this.gasIconVisible&&(this.mapInfo.addClass("icon-pulse"),this.gasIcon.addClass("danger-icon").removeClass("gas-icon"),this.gasIconVisible=!1));var n=Math.max(Math.floor(e/60),0),r=Math.max(Math.floor(e-60*n),0);r=r<10?"0"+r:r,this.gasTimer.html(n+":"+r)},render:function(t){if(this.gas.active&&(this.display.zoneMask.clear,this.context?this.renderCanvas(t):this.renderWebGL(t),this.display.innerCircle.clear,this.display.innerCircle.lineStyle(this.mapCircleWidth,16777215),this.display.innerCircle.beginFill(0,0),this.display.innerCircle.drawCircle(this.targetCenter.x,this.targetCenter.y,this.targetCenterWidth,this.targetCenterWidth),this.display.innerCircle.endFill,this.display.zoneLine.clear,!this.bigmapDisplayed&&null!=this.targetCenter&&null!=this.targetCenterWidth)){var e=1;h.length(h.sub(this.player.position,this.targetCenter))<this.targetCenterWidth&&(e=.5),this.display.zoneLine.lineStyle(this.playerLineWidth,65280,e).moveTo(this.playerMinimapSpriteX,this.playerMinimapSpriteY).lineTo(this.targetCenter.x,this.targetCenter.y)}},renderWebGL:function(t,e,n){this.display.outerCircle.clear,this.display.zoneMask.beginFill(16777215,1),this.display.zoneMask.drawRect(0,0,t.screenWidth,t.screenHeight),this.display.zoneMask.endFill,this.display.zoneMask.beginFill(0,0),this.display.zoneMask.drawCircle(this.mapSpriteRenderX+this.percentCurrentCenterX*this.mapSprite.width,this.mapSpriteRenderY-this.percentCurrentCenterY*this.mapSprite.height,this.currentCenterWidth),this.display.zoneMask.endFill,this.display.zoneMask.mask=this.display.mapMask,this.display.outerCircle.mask=this.display.zoneMask,this.display.outerCircle.beginFill(0,.6),this.display.outerCircle.drawRect(0,0,t.screenWidth,t.screenHeight),this.display.outerCircle.endFill},renderCanvas:function(t,e,n){if(this.context.save,this.context.beginPath,this.bigmapDisplayed)this.context.rect(this.mapSprite.x-this.mapSprite.width/2,this.mapSprite.y-this.mapSprite.height/2,this.mapSprite.width,this.mapSprite.height);else{if(!this.minimapDisplayed)return;var r=this.minimapSize*this.screenScaleFactor;this.context.rect(this.minimapMargin,this.windowHeight-r-this.minimapMargin,r,r)}this.context.closePath,this.context.clip,this.context.beginPath,this.context.fillStyle="rgba(0, 0, 0, 0.6)",this.context.rect(0,0,t.screenWidth,t.screenHeight),this.context.arc(this.mapSpriteRenderX+this.percentCurrentCenterX*this.mapSprite.width,this.mapSpriteRenderY-this.percentCurrentCenterY*this.mapSprite.height,this.currentCenterWidth,0,2*Math.PI,!0),this.context.fill,this.context.restore},updateGasCircles:function(t){t.active&&(this.gas=t)},updateHealth:function(t,e,n){this.playerGruntTicker-=t;var r=.01*e*400;r=n?0:Math.max(r,1),this.prevHealth!=r&&this.healthBarInner.css("width",r),r>0?(this.healthBarDepleted.css("width",r),this.prevHealth-r>4*this.playerGruntMinDamage&&this.prevHealth>r&&this.playerGruntTicker<=0&&(this.audioManager.playGroup("player_bullet_grunt"),this.playerGruntTicker=this.playerGruntCooldown)):this.healthBarDepleted.css("display","none"),this.prevHealth=r;var o=e,a=this.healthRed,s=this.healthDarkpink;if(o>25){d.eqAbs(o,100,.2)?(a=this.healthGrey,s=this.healthGrey):d.eqAbs(o,75,.2)||o>=75?(a=this.healthWhite,s=this.healthWhite):(a=this.healthDarkpink,s=this.healthLightpink);var u=a.getColors,l=s.getColors,c=i(u.r,l.r,45,o),h=i(u.g,l.g,45,o),p=i(u.b,l.b,45,o);this.healthBarInner.css({backgroundColor:"rgba("+c+","+h+","+p+",1)"}),this.healthBarInner.removeClass("ui-bar-danger")}else this.healthBarInner.addClass("ui-bar-danger")},updateBoost:function(t,e){if(e>0){this.boostBar.css("opacity",1);var n=s.player.boostBreakpoints,r=n.reduce(function(t,e){return t+e},0);r*=98.5;for(var i=e/100*r,o=0,a=0,u=0;u<n.length;u++){var l=98.5*n[u],c=this.boostSelectors[u],h=c.width;a+=h;var d=i-a;if(a<i&&h<l){c.width(Math.min(h+t*d*3,l));break}i<o+l&&c.width(i-o),o+=l}}else this.boostBar.css("opacity",0)},updateScope:function(t,e,n,r){void 0==this.scopeSelectors[e]&&(this.scopeSelectors[e]={dataChild:a(t).find("[data-item="+e+"]"),prevCount:0});var i=this.scopeSelectors[e].dataChild;this.scopeSelectors[e].prevCount!=n&&(i.css("display",n>0?"inline-block":"none"),this.scopeSelectors[e].prevCount=n),r&&i.hasClass("ui-zoom-inactive")&&(i.addClass("ui-zoom-active"),i.removeClass("ui-zoom-inactive")),!r&&i.hasClass("ui-zoom-active")&&(i.addClass("ui-zoom-inactive"),i.removeClass("ui-zoom-active"))},updatePulseDef:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(e.dataImageTicker+=t,e.dataImageTicker<=1&&!r){var i=Math.min(e.dataImageTicker,1),o=d.delerp(i,0,1),a=1+.5*(1-d.easeOutElastic(o,.75)),s=e.dataImageWidth*a;e.dataImage.css({width:s,height:s,marginRight:n?(e.dataImageWidth-s)/2:"auto"}),e.dataImageOverlay&&e.dataImageOverlay.css({width:s,height:s,marginRight:(e.dataImageWidth-s)/2})}else e.dataImageWidthSet&&!r||(e.dataImage.css({width:e.dataImageWidth,height:e.dataImageWidth,marginRight:n?0:"auto"}),e.dataImageWidthSet=!0)},updatePulseUI:function(t){for(var e in this.lootSelectors){var n=this.lootSelectors[e];this.updatePulseDef(t,n,!0)}for(var r in this.armorSelectors){var i=this.armorSelectors[r];this.updatePulseDef(t,i)}},resetLootImages:function{for(var t in this.lootSelectors){var e=this.lootSelectors[t];this.updatePulseDef(0,e,!0,!0)}for(var n in this.armorSelectors){var r=this.armorSelectors[n];this.updatePulseDef(0,r,!1,!0)}},updateLoot:function(t,e,n,r,i,o,s){void 0==this.lootSelectors[n]&&(this.lootSelectors[n]={dataCount:a(e).find("[data-item="+n+"]").find(".ui-data-count"),dataImage:a(e).find("[data-item="+n+"]").find(".ui-loot-image"),dataImageOverlay:a(e).find("[data-item="+n+"]").find(".ui-loot-overlay"),dataImageWidth:parseInt(a(e).find("[data-item="+n+"]").find(".ui-loot-image").css("width")),dataImageTicker:1,dataImageWidthSet:!0,tooltipTitle:a(e).find("[data-item="+n+"]").find(".tooltip-title"),tooltipDesc:a(e).find("[data-item="+n+"]").find(".tooltip-description")});var u=this.lootSelectors[n].dataCount,l=this.lootSelectors[n].dataImage,c=this.lootSelectors[n].tooltipTitle,h=this.lootSelectors[n].tooltipDesc;if(this.lootSelectors[n].prevCount!=r||s){var d=r==i?"#ff9900":"#FFFFFF";u.html(r).css({color:d}),this.lootSelectors[n].prevCount<r&&(this.lootSelectors[n].dataImageTicker=0,this.lootSelectors[n].dataImageWidthSet=!1),this.lootSelectors[n].prevCount=r,c&&h&&null!=o&&(c.html(t.name),h.html(t.desc))}o!=l.attr("src")&&null!=o&&l.attr("src",o)},updateArmor:function(t,e,n,r,i){var o=null;void 0==this.armorSelectors[e]&&(this.armorSelectors[e]={dataChild:a(t).find("[data-item="+e+"]"),dataCount:a(t).find("[data-item="+e+"]").find(".ui-armor-counter-inner"),armorLevel:a(t).find("[data-item="+e+"]").find(".ui-armor-level"),dataImage:a(t).find("[data-item="+e+"]").find(".ui-loot-image"),dataImageWidth:parseInt(a(t).find("[data-item="+e+"]").find(".ui-loot-image").css("width")),dataImageTicker:1,rawLevel:0});var u=this.armorSelectors[e].dataChild,l=(this.armorSelectors[e].dataCount,this.armorSelectors[e].armorLevel),c=this.armorSelectors[e].dataImage;if(this.armorSelectors[e].rawLevel!=n&&i){this.armorSelectors[e].dataImageTicker=0,this.armorSelectors[e].rawLevel=n,o=s.items[i];var h=n==r?"#ff9900":"#FFFFFF";l.html("Lvl. "+n).css("color",h);var d=c.attr("src"),p=o.lootImg.sprite;p!=d&&c.attr("src",p),u.css("opacity",1)}},updateWeapon:function(t,e,n,r){var i=r.curWeapIdx,o=n+1;void 0==this.weaponSelectors[o]&&(this.weaponSelectors[o]={weaponId:this.bottomRight.find("#ui-weapon-id-"+o),weaponName:this.bottomRight.find("#ui-weapon-id-"+o).find(".ui-weapon-name"),weaponNumber:this.bottomRight.find("#ui-weapon-id-"+o).find(".ui-weapon-number"),weaponImage:this.bottomRight.find("#ui-weapon-id-"+o).find(".ui-weapon-image")});var a=this.weaponSelectors[o].weaponId,u=this.weaponSelectors[o].weaponName,l=this.weaponSelectors[o].weaponNumber,c=this.weaponSelectors[o].weaponImage,h=""!==t?s.items[t]:null,d="gun"==s.WeaponType[n];if(null!==h&&d){var p=h.name,f=h.lootImg.sprite;a.is(":visible");u.html!==p&&(u.html(p),l.html(o),c.attr("src",f),c.css("display","inline"));var g=n==i;g&&.6==a.css("opacity")?(a.stop(!0),a.css("background-color","rgba(0,0,0,0.4)"),a.animate({opacity:1,width:200},200,function{a.animate({width:160},250)})):g||1!=a.css("opacity")||(a.stop(!0),a.css("background-color","rgba(0,0,0,0.0)"),a.animate({opacity:.6,width:160},200,function{}))}if(n==i){var m=0;null!=h&&d&&(m=r.inventory[h.ammo]),this.prevEquippedWeapon==t&&this.prevEquippedAmmo==e&&this.prevRemainingAmmo==m||(this.currentClip.html(e).css("color",e>0?"white":"red"),this.currentClip.html(e),this.remainingAmmo.html(m),this.currentClip.css("color",e>0?"white":"red"),this.currentClip.css("opacity",d?1:0),this.remainingAmmo.css("opacity",d&&m>0?1:0)),this.prevRemainingAmmo=m,this.prevEquippedWeapon=t,this.prevEquippedAmmo=e}},resize:function(t,e){if(this.display.outerCircle.clear,this.display.innerCircle.clear,this.display.border.clear,this.display.mapMask.clear,this.mapCircleWidth=e/500,this.windowHeight=e,this.windowWidth=t,this.screenScaleFactor=Math.min(1,d.clamp(this.windowWidth/1280,.75,1)*d.clamp(this.windowHeight/1024,.75,1)),this.pieTimer.resize(this.screenScaleFactor),this.bigmapDisplayed)this.display.circles.mask=null,this.mapSprite.width=e,this.mapSprite.height=e,this.mapSprite.x=t/2,this.mapSprite.y=e/2,this.display.mapMask.beginFill(16777215,1),this.display.mapMask.drawRect(this.mapSprite.x-this.mapSprite.width/2,this.mapSprite.y-this.mapSprite.height/2,this.mapSprite.width,this.mapSprite.height),this.display.mapMask.endFill,this.display.circles.mask=this.display.mapMask,this.player.scale=this.playerBaseScale,this.playerOuter.scale=this.playerOuterBaseScale;else{var n=Math.min(this.minimapHeight,this.minimapHeight*this.screenScaleFactor),r=this.minimapSize*this.screenScaleFactor;this.minimapCircleWidth=4*this.screenScaleFactor,this.mapSprite.width=n,this.mapSprite.height=n;var i={zoom:this.screenScaleFactor};"WebkitTransform"in document.body.style?i={"-webkit-transform":"scale("+this.screenScaleFactor+")"}:"transform"in document.body.style&&(i={transform:"scale("+this.screenScaleFactor+")"}),this.mapContainer.css(i),this.mapContainer.css("bottom",this.mapContainerBottom*this.screenScaleFactor),this.playerMinimapSpriteX=16+r/2,this.playerMinimapSpriteY=this.windowHeight-r/2-16,this.player.scale=h.mul(this.playerBaseScale,this.screenScaleFactor),this.player.position=new l.Point(this.playerMinimapSpriteX,this.playerMinimapSpriteY),this.playerOuter.scale=h.mul(this.playerOuterBaseScale,this.screenScaleFactor),this.playerOuter.position=new l.Point(this.playerMinimapSpriteX,this.playerMinimapSpriteY),this.display.border.lineStyle(this.minimapBorderWidth,0),this.display.border.beginFill(0,0),this.display.border.drawRect(this.minimapMargin+this.minimapBorderWidth/2,this.windowHeight-r-this.minimapMargin+this.minimapBorderWidth/2,r-4,r-4),this.display.border.endFill,this.display.mapMask.beginFill(16777215,1),this.display.mapMask.drawRect(this.minimapMargin,this.windowHeight-r-this.minimapMargin,r,r),this.display.mapMask.endFill,this.display.map.beginFill(7378501,1),this.display.map.drawRect(this.minimapMargin,this.windowHeight-r-this.minimapMargin,r,r),this.display.map.endFill,this.display.map.mask=this.display.mapMask,this.display.zoneLine.mask=this.display.mapMask,this.display.circles.mask=this.display.mapMask}},toggleEscMenu:function{var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(!this.displayingStats){if(this.escMenuDisplayed||t)return this.escMenuDisplayed=!1,void this.escMenuElem.css("display","none");if(this.bigmapDisplayed)return void this.displayMapLarge(!0);this.escMenuDisplayed=!0,this.escMenuElem.css("display","block")}},displayLootInteraction:function(t){if(null!==t){var e=s.items[t.data.name];this.interaction.show,this.interactionPress.html("F");var n="weapon"==e.type||"backpack"==e.type?"Equip ":"";n+=e.name,t.data.count>1&&(n+=" ("+t.data.count+")"),this.interactionDescription.html(n)}else this.interaction.hide},displayCancelInteraction:function{if(this.curAction.type==u.UseItem){this.interaction.show,this.interactionPress.html("X");this.interactionDescription.html("Cancel")}else this.interaction.hide}},t.exports={UiManager:r}},function(t,e,n){"use strict";(function(e){!function(n){function r(t,e){return o(t,e,!1)}function i(t,e){return o(t,e,!0)}function o(t,e,n){if(0===e)return"";var r=0,i=[],o=!0,a=!!e;for(e||(e=Math.floor((t._length-t._index)/8));r<e;){var s=t.readUint8;if(0===s&&(o=!1,!a))break;o&&i.push(s),r++}var u=String.fromCharCode.apply(null,i);if(!n)return u;try{return decodeURIComponent(escape(u))}catch(t){return u}}function a(t,e,n){for(var r=n||e.length+1,i=0;i<r;i++)t.writeUint8(i<e.length?e.charCodeAt(i):0)}function s(t,e,n){for(var r=u(e),i=n||r.length+1,o=0;o<i;o++)t.writeUint8(o<r.length?r[o]:0)}function u(t){var e,n,r=[];for(e=0;e<t.length;e++)n=t.charCodeAt(e),n<=127?r.push(n):n<=2047?(r.push(n>>6|192),r.push(63&n|128)):n<=65535?(r.push(n>>12|224),r.push(n>>6&63|128),r.push(63&n|128)):(r.push(n>>18|240),r.push(n>>12&63|128),r.push(n>>6&63|128),r.push(63&n|128));return r}var l=function(t,n,r){if(!(t instanceof ArrayBuffer||void 0!==e&&t instanceof e))throw new Error("Must specify a valid ArrayBuffer or Buffer.");n=n||0,r=r||t.byteLength||t.length,this._view=void 0!==e?t instanceof e?t.slice(n,n+r):e.from(t,n,r):new Uint8Array(t,n,r)};l._scratch=new DataView(new ArrayBuffer(8)),Object.defineProperty(l.prototype,"buffer",{get:function{return e.from(this._view.buffer)},enumerable:!0,configurable:!1}),Object.defineProperty(l.prototype,"byteLength",{get:function{return this._view.length},enumerable:!0,configurable:!1}),l.prototype._setBit=function(t,e){e?this._view[t>>3]|=1<<(7&t):this._view[t>>3]&=~(1<<(7&t))},l.prototype.getBits=function(t,e,n){var r=8*this._view.length-t;if(e>r)throw new Error("Cannot get "+e+" bit(s) from offset "+t+", "+r+" available");for(var i=0,o=0;o<e;){var a=e-o,s=7&t,u=this._view[t>>3],l=Math.min(a,8-s);i|=(u>>s&(1<<l)-1)<<o,t+=l,o+=l}return n?(32!==e&&i&1<<e-1&&(i|=-1^(1<<e)-1),i):i>>>0},l.prototype.setBits=function(t,e,n){var r=8*this._view.length-t;if(n>r)throw new Error("Cannot set "+n+" bit(s) from offset "+t+", "+r+" available");for(var i=0;i<n;){var o;n-i>=8&&0==(7&t)?(this._view[t>>3]=255&e,o=8):(this._setBit(t,1&e),o=1),e>>=o,t+=o,i+=o}},l.prototype.getBoolean=function(t){return 0!==this.getBits(t,1,!1)},l.prototype.getInt8=function(t){return this.getBits(t,8,!0)},l.prototype.getUint8=function(t){return this.getBits(t,8,!1)},l.prototype.getInt16=function(t){return this.getBits(t,16,!0)},l.prototype.getUint16=function(t){return this.getBits(t,16,!1)},l.prototype.getInt32=function(t){return this.getBits(t,32,!0)},l.prototype.getUint32=function(t){return this.getBits(t,32,!1)},l.prototype.getFloat32=function(t){return l._scratch.setUint32(0,this.getUint32(t)),l._scratch.getFloat32(0)},l.prototype.getFloat64=function(t){return l._scratch.setUint32(0,this.getUint32(t)),l._scratch.setUint32(4,this.getUint32(t+32)),l._scratch.getFloat64(0)},l.prototype.setBoolean=function(t,e){this.setBits(t,e?1:0,1)},l.prototype.setInt8=l.prototype.setUint8=function(t,e){this.setBits(t,e,8)},l.prototype.setInt16=l.prototype.setUint16=function(t,e){this.setBits(t,e,16)},l.prototype.setInt32=l.prototype.setUint32=function(t,e){this.setBits(t,e,32)},l.prototype.setFloat32=function(t,e){l._scratch.setFloat32(0,e),this.setBits(t,l._scratch.getUint32(0),32)},l.prototype.setFloat64=function(t,e){l._scratch.setFloat64(0,e),this.setBits(t,l._scratch.getUint32(0),32),this.setBits(t+32,l._scratch.getUint32(4),32)},l.prototype.getArrayBuffer=function(t,e){for(var n=new Uint8Array(e),r=0;r<e;r++)n[r]=this.getUint8(t+8*r);return n};var c=function(t,e){return function{if(this._index+e>this._length)throw new Error("Trying to read past the end of the stream");var n=this._view[t](this._index);return this._index+=e,n}},h=function(t,e){return function(n){this._view[t](this._index,n),this._index+=e}},d=function(t,n,r){var i=t instanceof ArrayBuffer||void 0!==e&&t instanceof e;if(!(t instanceof l||i))throw new Error("Must specify a valid BitView, ArrayBuffer or Buffer");this._view=i?new l(t,n,r):t,this._index=0,this._startIndex=0,this._length=8*this._view.byteLength};Object.defineProperty(d.prototype,"index",{get:function{return this._index-this._startIndex},set:function(t){this._index=t+this._startIndex},enumerable:!0,configurable:!0}),Object.defineProperty(d.prototype,"length",{get:function{return this._length-this._startIndex},set:function(t){this._length=t+this._startIndex},enumerable:!0,configurable:!0}),Object.defineProperty(d.prototype,"bitsLeft",{get:function{return this._length-this._index},enumerable:!0,configurable:!0}),Object.defineProperty(d.prototype,"byteIndex",{get:function{return Math.ceil(this._index/8)},set:function(t){this._index=8*t},enumerable:!0,configurable:!0}),Object.defineProperty(d.prototype,"buffer",{get:function{return this._view.buffer},enumerable:!0,configurable:!1}),Object.defineProperty(d.prototype,"view",{get:function{return this._view},enumerable:!0,configurable:!1}),d.prototype.readBits=function(t,e){var n=this._view.getBits(this._index,t,e);return this._index+=t,n},d.prototype.writeBits=function(t,e){this._view.setBits(this._index,t,e),this._index+=e},d.prototype.readBoolean=c("getBoolean",1),d.prototype.readInt8=c("getInt8",8),d.prototype.readUint8=c("getUint8",8),d.prototype.readInt16=c("getInt16",16),d.prototype.readUint16=c("getUint16",16),d.prototype.readInt32=c("getInt32",32),d.prototype.readUint32=c("getUint32",32),d.prototype.readFloat32=c("getFloat32",32),d.prototype.readFloat64=c("getFloat64",64),d.prototype.writeBoolean=h("setBoolean",1),d.prototype.writeInt8=h("setInt8",8),d.prototype.writeUint8=h("setUint8",8),d.prototype.writeInt16=h("setInt16",16),d.prototype.writeUint16=h("setUint16",16),d.prototype.writeInt32=h("setInt32",32),d.prototype.writeUint32=h("setUint32",32),d.prototype.writeFloat32=h("setFloat32",32),d.prototype.writeFloat64=h("setFloat64",64),d.prototype.readASCIIString=function(t){return r(this,t)},d.prototype.readUTF8String=function(t){return i(this,t)},d.prototype.writeASCIIString=function(t,e){a(this,t,e)},d.prototype.writeUTF8String=function(t,e){s(this,t,e)},d.prototype.readBitStream=function(t){var e=new d(this._view);return e._startIndex=this._index,e._index=this._index,e.length=t,this._index+=t,e},d.prototype.writeBitStream=function(t,e){e||(e=t.bitsLeft);for(var n;e>0;)n=Math.min(e,32),this.writeBits(t.readBits(n),n),e-=n},d.prototype.readArrayBuffer=function(t){var e=this._view.getArrayBuffer(this._index,t);return this._index+=8*t,e},d.prototype.writeArrayBuffer=function(t,e){this.writeBitStream(new d(t),8*e)},t.exports={BitView:l,BitStream:d}}}).call(e,n(18).Buffer)},function(t,e,n){"use strict";t.exports={Places:[{name:"The Killpit",pos:{x:230.4,y:307.2}},{name:"Sweatbath",pos:{x:409.6,y:76.8}},{name:"Tarkhany",pos:{x:76.8,y:51.2}},{name:"Ytyk-Kyuyol",pos:{x:102.4,y:204.8}},{name:"Cordial Creek",pos:{x:384,y:435.2}},{name:"Pineapple",pos:{x:76.8,y:409.6}},{name:"Fowl Forest",pos:{x:342.8,y:230.4}},{name:"Ranchito Pollo",pos:{x:245.5,y:106.1}}]}},function(t,e,n){"use strict";function r{this.samples={},this.stack=[],this.order=0}var i=n(19),o=n(55);r.prototype={beginSample:function(t){this.stack.push({desc:t,start:o,depth:this.stack.length,order:this.order++})},endSample:function{var t=this.stack.pop,e=this.samples[t.desc]||{desc:t.desc,depth:t.depth,order:t.order,elapsed:0};e.elapsed+=o-t.start,this.samples[t.desc]=e},flush:function{var t=i.valuesIn(this.samples);return this.samples={},this.stack=[],this.order=0,t}},r.avgSamples=function(t){for(var e={},n=0;n<t.length;n++){var r=t[n],o=e[r.desc]||{desc:r.desc,order:r.order,depth:r.depth,count:0,elapsed:0};o.count++,o.elapsed+=r.elapsed,e[r.desc]=o}for(var a in e){var s=e[a];s.count>0&&(s.elapsed/=s.count)}return i.valuesIn(e).sort(function(t,e){return t.order-e.order})},t.exports=r},function(t,e,n){"use strict";function r(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");return"="===t[e-2]?2:"="===t[e-1]?1:0}function i(t){return 3*t.length/4-r(t)}function o(t){var e,n,i,o,a,s=t.length;o=r(t),a=new h(3*s/4-o),n=o>0?s-4:s;var u=0;for(e=0;e<n;e+=4)i=c[t.charCodeAt(e)]<<18|c[t.charCodeAt(e+1)]<<12|c[t.charCodeAt(e+2)]<<6|c[t.charCodeAt(e+3)],a[u++]=i>>16&255,a[u++]=i>>8&255,a[u++]=255&i;return 2===o?(i=c[t.charCodeAt(e)]<<2|c[t.charCodeAt(e+1)]>>4,a[u++]=255&i):1===o&&(i=c[t.charCodeAt(e)]<<10|c[t.charCodeAt(e+1)]<<4|c[t.charCodeAt(e+2)]>>2,a[u++]=i>>8&255,a[u++]=255&i),a}function a(t){return l[t>>18&63]+l[t>>12&63]+l[t>>6&63]+l[63&t]}function s(t,e,n){for(var r,i=[],o=e;o<n;o+=3)r=(t[o]<<16)+(t[o+1]<<8)+t[o+2],i.push(a(r));return i.join("")}function u(t){for(var e,n=t.length,r=n%3,i="",o=[],a=0,u=n-r;a<u;a+=16383)o.push(s(t,a,a+16383>u?u:a+16383));return 1===r?(e=t[n-1],i+=l[e>>2],i+=l[e<<4&63],i+="=="):2===r&&(e=(t[n-2]<<8)+t[n-1],i+=l[e>>10],i+=l[e>>4&63],i+=l[e<<2&63],i+="="),o.push(i),o.join("")}e.byteLength=i,e.toByteArray=o,e.fromByteArray=u;for(var l=[],c=[],h="undefined"!=typeof Uint8Array?Uint8Array:Array,d="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",p=0,f=d.length;p<f;++p)l[p]=d[p],c[d.charCodeAt(p)]=p;c["-".charCodeAt(0)]=62,c["_".charCodeAt(0)]=63},function(t,e){function n(t,e){var n=t[1]||"",i=t[3];if(!i)return n;if(e&&"function"==typeof btoa){var o=r(i);return[n].concat(i.sources.map(function(t){return"/*# sourceURL="+i.sourceRoot+t+" */"})).concat([o]).join("\n")}return[n].join("\n")}function r(t){return"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(t))))+" */"}t.exports=function(t){var e=[];return e.toString=function{return this.map(function(e){var r=n(e,t);return e[2]?"@media "+e[2]+"{"+r+"}":r}).join("")},e.i=function(t,n){"string"==typeof t&&(t=null,t,"");for(var r={},i=0;i<this.length;i++){var o=this[i][0];"number"==typeof o&&(r[o]=!0)}for(i=0;i<t.length;i++){var a=t[i];"number"==typeof a[0]&&r[a[0]]||(n&&!a[2]?a[2]=n:n&&(a[2]="("+a[2]+") and ("+n+")"),e.push(a))}},e}},function(t,e){e.read=function(t,e,n,r,i){var o,a,s=8*i-r-1,u=(1<<s)-1,l=u>>1,c=-7,h=n?i-1:0,d=n?-1:1,p=t[e+h];for(h+=d,o=p&(1<<-c)-1,p>>=-c,c+=s;c>0;o=256*o+t[e+h],h+=d,c-=8);for(a=o&(1<<-c)-1,o>>=-c,c+=r;c>0;a=256*a+t[e+h],h+=d,c-=8);if(0===o)o=1-l;else{if(o===u)return a?NaN:1/0*(p?-1:1);a+=Math.pow(2,r),o-=l}return(p?-1:1)*a*Math.pow(2,o-r)},e.write=function(t,e,n,r,i,o){var a,s,u,l=8*o-i-1,c=(1<<l)-1,h=c>>1,d=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=r?0:o-1,f=r?1:-1,g=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(s=isNaN(e)?1:0,a=c):(a=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-a))<1&&(a--,u*=2),e+=a+h>=1?d/u:d*Math.pow(2,1-h),e*u>=2&&(a++,u/=2),a+h>=c?(s=0,a=c):a+h>=1?(s=(e*u-1)*Math.pow(2,i),a+=h):(s=e*Math.pow(2,h-1)*Math.pow(2,i),a=0));i>=8;t[n+p]=255&s,p+=f,s/=256,i-=8);for(a=a<<i|s,l+=i;l>0;t[n+p]=255&a,p+=f,a/=256,l-=8);t[n+p-f]|=128*g}},function(t,e){(function{/*! this.createjs=this.createjs||{},function{var t=createjs.SoundJS=createjs.SoundJS||{};t.version="NEXT",t.buildDate="Thu, 12 Oct 2017 16:33:45 GMT"},this.createjs=this.createjs||{},createjs.extend=function(t,e){"use strict";function n{this.constructor=t}return n.prototype=e.prototype,t.prototype=new n},this.createjs=this.createjs||{},createjs.promote=function(t,e){"use strict";var n=t.prototype,r=Object.getPrototypeOf&&Object.getPrototypeOf(n)||n.__proto__;if(r){n[(e+="_")+"constructor"]=r.constructor;for(var i in r)n.hasOwnProperty(i)&&"function"==typeof r[i]&&(n[e+i]=r[i])}return t},this.createjs=this.createjs||{},createjs.deprecate=function(t,e){"use strict";return function{var n="Deprecated property or method '"+e+"'. See docs for info.";return console&&(console.warn?console.warn(n):console.log(n)),t&&t.apply(this,arguments)}},this.createjs=this.createjs||{},createjs.indexOf=function(t,e){"use strict";for(var n=0,r=t.length;n<r;n++)if(e===t[n])return n;return-1},this.createjs=this.createjs||{},function{"use strict";createjs.proxy=function(t,e){var n=Array.prototype.slice.call(arguments,2);return function{return t.apply(e,Array.prototype.slice.call(arguments,0).concat(n))}}},this.createjs=this.createjs||{},function{"use strict";function t{throw"BrowserDetect cannot be instantiated"}var e=t.agent=window.navigator.userAgent;t.isWindowPhone=e.indexOf("IEMobile")>-1||e.indexOf("Windows Phone")>-1,t.isFirefox=e.indexOf("Firefox")>-1,t.isOpera=null!=window.opera,t.isChrome=e.indexOf("Chrome")>-1,t.isIOS=(e.indexOf("iPod")>-1||e.indexOf("iPhone")>-1||e.indexOf("iPad")>-1)&&!t.isWindowPhone,t.isAndroid=e.indexOf("Android")>-1&&!t.isWindowPhone,t.isBlackberry=e.indexOf("Blackberry")>-1,createjs.BrowserDetect=t},this.createjs=this.createjs||{},function{"use strict";function t{this._listeners=null,this._captureListeners=null}var e=t.prototype;t.initialize=function(t){t.addEventListener=e.addEventListener,t.on=e.on,t.removeEventListener=t.off=e.removeEventListener,t.removeAllEventListeners=e.removeAllEventListeners,t.hasEventListener=e.hasEventListener,t.dispatchEvent=e.dispatchEvent,t._dispatchEvent=e._dispatchEvent,t.willTrigger=e.willTrigger},e.addEventListener=function(t,e,n){var r;r=n?this._captureListeners=this._captureListeners||{}:this._listeners=this._listeners||{};var i=r[t];return i&&this.removeEventListener(t,e,n),i=r[t],i?i.push(e):r[t]=[e],e},e.on=function(t,e,n,r,i,o){return e.handleEvent&&(n=n||e,e=e.handleEvent),n=n||this,this.addEventListener(t,function(t){e.call(n,t,i),r&&t.remove},o)},e.removeEventListener=function(t,e,n){var r=n?this._captureListeners:this._listeners;if(r){var i=r[t];if(i)for(var o=0,a=i.length;o<a;o++)if(i[o]==e){1==a?delete r[t]:i.splice(o,1);break}}},e.off=e.removeEventListener,e.removeAllEventListeners=function(t){t?(this._listeners&&delete this._listeners[t],this._captureListeners&&delete this._captureListeners[t]):this._listeners=this._captureListeners=null},e.dispatchEvent=function(t,e,n){if("string"==typeof t){var r=this._listeners;if(!(e||r&&r[t]))return!0;t=new createjs.Event(t,e,n)}else t.target&&t.clone&&(t=t.clone);try{t.target=this}catch(t){}if(t.bubbles&&this.parent){for(var i=this,o=[i];i.parent;)o.push(i=i.parent);var a,s=o.length;for(a=s-1;a>=0&&!t.propagationStopped;a--)o[a]._dispatchEvent(t,1+(0==a));for(a=1;a<s&&!t.propagationStopped;a++)o[a]._dispatchEvent(t,3)}else this._dispatchEvent(t,2);return!t.defaultPrevented},e.hasEventListener=function(t){var e=this._listeners,n=this._captureListeners;return!!(e&&e[t]||n&&n[t])},e.willTrigger=function(t){for(var e=this;e;){if(e.hasEventListener(t))return!0;e=e.parent}return!1},e.toString=function{return"[EventDispatcher]"},e._dispatchEvent=function(t,e){var n,r,i=e<=2?this._captureListeners:this._listeners;if(t&&i&&(r=i[t.type])&&(n=r.length)){try{t.currentTarget=this}catch(t){}try{t.eventPhase=0|e}catch(t){}t.removed=!1,r=r.slice;for(var o=0;o<n&&!t.immediatePropagationStopped;o++){var a=r[o];a.handleEvent?a.handleEvent(t):a(t),t.removed&&(this.off(t.type,a,1==e),t.removed=!1)}}2===e&&this._dispatchEvent(t,2.1)},createjs.EventDispatcher=t},this.createjs=this.createjs||{},function{"use strict";function t(t,e,n){this.type=t,this.target=null,this.currentTarget=null,this.eventPhase=0,this.bubbles=!!e,this.cancelable=!!n,this.timeStamp=(new Date).getTime,this.defaultPrevented=!1,this.propagationStopped=!1,this.immediatePropagationStopped=!1,this.removed=!1}var e=t.prototype;e.preventDefault=function{this.defaultPrevented=this.cancelable&&!0},e.stopPropagation=function{this.propagationStopped=!0},e.stopImmediatePropagation=function{this.immediatePropagationStopped=this.propagationStopped=!0},e.remove=function{this.removed=!0},e.clone=function{return new t(this.type,this.bubbles,this.cancelable)},e.set=function(t){for(var e in t)this[e]=t[e];return this},e.toString=function{return"[Event (type="+this.type+")]"},createjs.Event=t},this.createjs=this.createjs||{},function{"use strict";function t(t,e,n){this.Event_constructor("error"),this.title=t,this.message=e,this.data=n}createjs.extend(t,createjs.Event).clone=function{return new createjs.ErrorEvent(this.title,this.message,this.data)},createjs.ErrorEvent=createjs.promote(t,"Event")},this.createjs=this.createjs||{},function(t){"use strict";function e(t,e){this.Event_constructor("progress"),this.loaded=t,this.total=null==e?1:e,this.progress=0==e?0:this.loaded/this.total}createjs.extend(e,createjs.Event).clone=function{return new createjs.ProgressEvent(this.loaded,this.total)},createjs.ProgressEvent=createjs.promote(e,"Event")}(window),this.createjs=this.createjs||{},function{"use strict";function t{this.src=null,this.type=null,this.id=null,this.maintainOrder=!1,this.callback=null,this.data=null,this.method=createjs.Methods.GET,this.values=null,this.headers=null,this.withCredentials=!1,this.mimeType=null,this.crossOrigin=null,this.loadTimeout=n.LOAD_TIMEOUT_DEFAULT}var e=t.prototype={},n=t;n.LOAD_TIMEOUT_DEFAULT=8e3,n.create=function(e){if("string"==typeof e){var r=new t;return r.src=e,r}if(e instanceof n)return e;if(e instanceof Object&&e.src)return null==e.loadTimeout&&(e.loadTimeout=n.LOAD_TIMEOUT_DEFAULT),e;throw new Error("Type not recognized.")},e.set=function(t){for(var e in t)this[e]=t[e];return this},createjs.LoadItem=n},this.createjs=this.createjs||{},function{var t={};t.POST="POST",t.GET="GET",createjs.Methods=t},this.createjs=this.createjs||{},function{var t={};t.BINARY="binary",t.CSS="css",t.FONT="font",t.FONTCSS="fontcss",t.IMAGE="image",t.JAVASCRIPT="javascript",t.JSON="json",t.JSONP="jsonp",t.MANIFEST="manifest",t.SOUND="sound",t.VIDEO="video",t.SPRITESHEET="spritesheet",t.SVG="svg",t.TEXT="text",t.XML="xml",createjs.Types=t},function{var t={};t.a=function{return t.el("a")},t.svg=function{return t.el("svg")},t.object=function{return t.el("object")},t.image=function{return t.el("image")},t.img=function{return t.el("img")},t.style=function{return t.el("style")},t.link=function{return t.el("link")},t.script=function{return t.el("script")},t.audio=function{return t.el("audio")},t.video=function{return t.el("video")},t.text=function(t){return document.createTextNode(t)},t.el=function(t){return document.createElement(t)},createjs.Elements=t},function{var t={container:null};t.appendToHead=function(e){t.getHead.appendChild(e)},t.appendToBody=function(e){if(null==t.container){t.container=document.createElement("div"),t.container.id="preloadjs-container";var n=t.container.style;n.visibility="hidden",n.position="absolute",n.width=t.container.style.height="10px",n.overflow="hidden",n.transform=n.msTransform=n.webkitTransform=n.oTransform="translate(-10px, -10px)",t.getBody.appendChild(t.container)}t.container.appendChild(e)},t.getHead=function{return document.head||document.getElementsByTagName("head")[0]},t.getBody=function{return document.body||document.getElementsByTagName("body")[0]},t.removeChild=function(t){t.parent&&t.parent.removeChild(t)},t.isImageTag=function(t){return t instanceof HTMLImageElement},t.isAudioTag=function(t){return!!window.HTMLAudioElement&&t instanceof HTMLAudioElement},t.isVideoTag=function(t){return!!window.HTMLVideoElement&&t instanceof HTMLVideoElement},createjs.DomUtils=t},function{var t={};t.isBinary=function(t){switch(t){case createjs.Types.IMAGE:case createjs.Types.BINARY:return!0;default:return!1}},t.isText=function(t){switch(t){case createjs.Types.TEXT:case createjs.Types.JSON:case createjs.Types.MANIFEST:case createjs.Types.XML:case createjs.Types.CSS:case createjs.Types.SVG:case createjs.Types.JAVASCRIPT:case createjs.Types.SPRITESHEET:return!0;default:return!1}},t.getTypeByExtension=function(t){if(null==t)return createjs.Types.TEXT;switch(t.toLowerCase){case"jpeg":case"jpg":case"gif":case"png":case"webp":case"bmp":return createjs.Types.IMAGE;case"ogg":case"mp3":case"webm":return createjs.Types.SOUND;case"mp4":case"webm":case"ts":return createjs.Types.VIDEO;case"json":return createjs.Types.JSON;case"xml":return createjs.Types.XML;case"css":return createjs.Types.CSS;case"js":return createjs.Types.JAVASCRIPT;case"svg":return createjs.Types.SVG;default:return createjs.Types.TEXT}},createjs.RequestUtils=t},function{var t={};t.ABSOLUTE_PATT=/^(?:\w+:)?\/{2}/i,t.RELATIVE_PATT=/^[.\/]*?\//i,t.EXTENSION_PATT=/\/?[^\/]+\.(\w{1,5})$/i,t.parseURI=function(e){var n={absolute:!1,relative:!1,protocol:null,hostname:null,port:null,pathname:null,search:null,hash:null,host:null};if(null==e)return n;var r=createjs.Elements.a;r.href=e;for(var i in n)i in r&&(n[i]=r[i]);var o=e.indexOf("?");o>-1&&(e=e.substr(0,o));var a;return t.ABSOLUTE_PATT.test(e)?n.absolute=!0:t.RELATIVE_PATT.test(e)&&(n.relative=!0),(a=e.match(t.EXTENSION_PATT))&&(n.extension=a[1].toLowerCase),n},t.formatQueryString=function(t,e){if(null==t)throw new Error("You must specify data.");var n=[];for(var r in t)n.push(r+"="+escape(t[r]));return e&&(n=n.concat(e)),n.join("&")},t.buildURI=function(t,e){if(null==e)return t;var n=[],r=t.indexOf("?");if(-1!=r){var i=t.slice(r+1);n=n.concat(i.split("&"))}return-1!=r?t.slice(0,r)+"?"+this.formatQueryString(e,n):t+"?"+this.formatQueryString(e,n)},t.isCrossDomain=function(t){var e=createjs.Elements.a;e.href=t.src;var n=createjs.Elements.a;return n.href=location.href,""!=e.hostname&&(e.port!=n.port||e.protocol!=n.protocol||e.hostname!=n.hostname)},t.isLocal=function(t){var e=createjs.Elements.a;return e.href=t.src,""==e.hostname&&"file:"==e.protocol},createjs.URLUtils=t},this.createjs=this.createjs||{},function{"use strict";function t(t,e,n){this.EventDispatcher_constructor,this.loaded=!1,this.canceled=!1,this.progress=0,this.type=n,this.resultFormatter=null,this._item=t?createjs.LoadItem.create(t):null,this._preferXHR=e,this._result=null,this._rawResult=null,this._loadedItems=null,this._tagSrcAttribute=null,this._tag=null}var e=createjs.extend(t,createjs.EventDispatcher),n=t;try{Object.defineProperties(n,{POST:{get:createjs.deprecate(function{return createjs.Methods.POST},"AbstractLoader.POST")},GET:{get:createjs.deprecate(function{return createjs.Methods.GET},"AbstractLoader.GET")},BINARY:{get:createjs.deprecate(function{return createjs.Types.BINARY},"AbstractLoader.BINARY")},CSS:{get:createjs.deprecate(function{return createjs.Types.CSS},"AbstractLoader.CSS")},FONT:{get:createjs.deprecate(function{return createjs.Types.FONT},"AbstractLoader.FONT")},FONTCSS:{get:createjs.deprecate(function{return createjs.Types.FONTCSS},"AbstractLoader.FONTCSS")},IMAGE:{get:createjs.deprecate(function{return createjs.Types.IMAGE},"AbstractLoader.IMAGE")},JAVASCRIPT:{get:createjs.deprecate(function{return createjs.Types.JAVASCRIPT},"AbstractLoader.JAVASCRIPT")},JSON:{get:createjs.deprecate(function{return createjs.Types.JSON},"AbstractLoader.JSON")},JSONP:{get:createjs.deprecate(function{return createjs.Types.JSONP},"AbstractLoader.JSONP")},MANIFEST:{get:createjs.deprecate(function{return createjs.Types.MANIFEST},"AbstractLoader.MANIFEST")},SOUND:{get:createjs.deprecate(function{return createjs.Types.SOUND},"AbstractLoader.SOUND")},VIDEO:{get:createjs.deprecate(function{return createjs.Types.VIDEO},"AbstractLoader.VIDEO")},SPRITESHEET:{get:createjs.deprecate(function{return createjs.Types.SPRITESHEET},"AbstractLoader.SPRITESHEET")},SVG:{get:createjs.deprecate(function{return createjs.Types.SVG},"AbstractLoader.SVG")},TEXT:{get:createjs.deprecate(function{return createjs.Types.TEXT},"AbstractLoader.TEXT")},XML:{get:createjs.deprecate(function{return createjs.Types.XML},"AbstractLoader.XML")}})}catch(t){}e.getItem=function{return this._item},e.getResult=function(t){return t?this._rawResult:this._result},e.getTag=function{return this._tag},e.setTag=function(t){this._tag=t},e.load=function{this._createRequest,this._request.on("complete",this,this),this._request.on("progress",this,this),this._request.on("loadStart",this,this),this._request.on("abort",this,this),this._request.on("timeout",this,this),this._request.on("error",this,this);var t=new createjs.Event("initialize");t.loader=this._request,this.dispatchEvent(t),this._request.load},e.cancel=function{this.canceled=!0,this.destroy},e.destroy=function{this._request&&(this._request.removeAllEventListeners,this._request.destroy),this._request=null,this._item=null,this._rawResult=null,this._result=null,this._loadItems=null,this.removeAllEventListeners},e.getLoadedItems=function{return this._loadedItems},e._createRequest=function{this._preferXHR?this._request=new createjs.XHRRequest(this._item):this._request=new createjs.TagRequest(this._item,this._tag||this._createTag,this._tagSrcAttribute)},e._createTag=function(t){return null},e._sendLoadStart=function{this._isCanceled||this.dispatchEvent("loadstart")},e._sendProgress=function(t){if(!this._isCanceled){var e=null;"number"==typeof t?(this.progress=t,e=new createjs.ProgressEvent(this.progress)):(e=t,this.progress=t.loaded/t.total,e.progress=this.progress,(isNaN(this.progress)||this.progress==1/0)&&(this.progress=0)),this.hasEventListener("progress")&&this.dispatchEvent(e)}},e._sendComplete=function{if(!this._isCanceled){this.loaded=!0;var t=new createjs.Event("complete");t.rawResult=this._rawResult,null!=this._result&&(t.result=this._result),this.dispatchEvent(t)}},e._sendError=function(t){!this._isCanceled&&this.hasEventListener("error")&&(null==t&&(t=new createjs.ErrorEvent("PRELOAD_ERROR_EMPTY")),this.dispatchEvent(t))},e._isCanceled=function{return!(null!=window.createjs&&!this.canceled)},e.resultFormatter=null,e.handleEvent=function(t){switch(t.type){case"complete":this._rawResult=t.target._response;var e=this.resultFormatter&&this.resultFormatter(this);e instanceof Function?e.call(this,createjs.proxy(this._resultFormatSuccess,this),createjs.proxy(this._resultFormatFailed,this)):(this._result=e||this._rawResult,this._sendComplete);break;case"progress":this._sendProgress(t);break;case"error":this._sendError(t);break;case"loadstart":this._sendLoadStart;break;case"abort":case"timeout":this._isCanceled||this.dispatchEvent(new createjs.ErrorEvent("PRELOAD_"+t.type.toUpperCase+"_ERROR"))}},e._resultFormatSuccess=function(t){this._result=t,this._sendComplete},e._resultFormatFailed=function(t){this._sendError(t)},e.toString=function{return"[PreloadJS AbstractLoader]"},createjs.AbstractLoader=createjs.promote(t,"EventDispatcher")},this.createjs=this.createjs||{},function{"use strict";function t(t,e,n){this.AbstractLoader_constructor(t,e,n),this.resultFormatter=this._formatResult,this._tagSrcAttribute="src",this.on("initialize",this._updateXHR,this)}var e=createjs.extend(t,createjs.AbstractLoader);e.load=function{this._tag||(this._tag=this._createTag(this._item.src)),this._tag.preload="auto",this._tag.load,this.AbstractLoader_load},e._createTag=function{},e._createRequest=function{this._preferXHR?this._request=new createjs.XHRRequest(this._item):this._request=new createjs.MediaTagRequest(this._item,this._tag||this._createTag,this._tagSrcAttribute)},e._updateXHR=function(t){t.loader.setResponseType&&t.loader.setResponseType("blob")},e._formatResult=function(t){if(this._tag.removeEventListener&&this._tag.removeEventListener("canplaythrough",this._loadedHandler),this._tag.onstalled=null,this._preferXHR){var e=window.URL||window.webkitURL,n=t.getResult(!0);t.getTag.src=e.createObjectURL(n)}return t.getTag},createjs.AbstractMediaLoader=createjs.promote(t,"AbstractLoader")},this.createjs=this.createjs||{},function{"use strict";var t=function(t){this._item=t},e=createjs.extend(t,createjs.EventDispatcher);e.load=function{},e.destroy=function{},e.cancel=function{},createjs.AbstractRequest=createjs.promote(t,"EventDispatcher")},this.createjs=this.createjs||{},function{"use strict";function t(t,e,n){this.AbstractRequest_constructor(t),this._tag=e,this._tagSrcAttribute=n,this._loadedHandler=createjs.proxy(this._handleTagComplete,this),this._addedToDOM=!1}var e=createjs.extend(t,createjs.AbstractRequest);e.load=function{this._tag.onload=createjs.proxy(this._handleTagComplete,this),this._tag.onreadystatechange=createjs.proxy(this._handleReadyStateChange,this),this._tag.onerror=createjs.proxy(this._handleError,this);var t=new createjs.Event("initialize");t.loader=this._tag,this.dispatchEvent(t),this._loadTimeout=setTimeout(createjs.proxy(this._handleTimeout,this),this._item.loadTimeout),this._tag[this._tagSrcAttribute]=this._item.src,null==this._tag.parentNode&&(createjs.DomUtils.appendToBody(this._tag),this._addedToDOM=!0)},e.destroy=function{this._clean,this._tag=null,this.AbstractRequest_destroy},e._handleReadyStateChange=function{clearTimeout(this._loadTimeout);var t=this._tag;"loaded"!=t.readyState&&"complete"!=t.readyState||this._handleTagComplete},e._handleError=function{this._clean,this.dispatchEvent("error")},e._handleTagComplete=function{this._rawResult=this._tag,this._result=this.resultFormatter&&this.resultFormatter(this)||this._rawResult,this._clean,this.dispatchEvent("complete")},e._handleTimeout=function{this._clean,this.dispatchEvent(new createjs.Event("timeout"))},e._clean=function{this._tag.onload=null,this._tag.onreadystatechange=null,this._tag.onerror=null,this._addedToDOM&&null!=this._tag.parentNode&&this._tag.parentNode.removeChild(this._tag),clearTimeout(this._loadTimeout)},e._handleStalled=function{},createjs.TagRequest=createjs.promote(t,"AbstractRequest")},this.createjs=this.createjs||{},function{"use strict";function t(t,e,n){this.AbstractRequest_constructor(t),this._tag=e,this._tagSrcAttribute=n,this._loadedHandler=createjs.proxy(this._handleTagComplete,this)}var e=createjs.extend(t,createjs.TagRequest);e.load=function{var t=createjs.proxy(this._handleStalled,this);this._stalledCallback=t;var e=createjs.proxy(this._handleProgress,this);this._handleProgress=e,this._tag.addEventListener("stalled",t),this._tag.addEventListener("progress",e),this._tag.addEventListener&&this._tag.addEventListener("canplaythrough",this._loadedHandler,!1),this.TagRequest_load},e._handleReadyStateChange=function{clearTimeout(this._loadTimeout);var t=this._tag;"loaded"!=t.readyState&&"complete"!=t.readyState||this._handleTagComplete},e._handleStalled=function{},e._handleProgress=function(t){if(t&&!(t.loaded>0&&0==t.total)){var e=new createjs.ProgressEvent(t.loaded,t.total);this.dispatchEvent(e)}},e._clean=function{this._tag.removeEventListener&&this._tag.removeEventListener("canplaythrough",this._loadedHandler),this._tag.removeEventListener("stalled",this._stalledCallback),this._tag.removeEventListener("progress",this._progressCallback),this.TagRequest__clean},createjs.MediaTagRequest=createjs.promote(t,"TagRequest")},this.createjs=this.createjs||{},function{"use strict";function t(t){this.AbstractRequest_constructor(t),this._request=null,this._loadTimeout=null,this._xhrLevel=1,this._response=null,this._rawResponse=null,this._canceled=!1,this._handleLoadStartProxy=createjs.proxy(this._handleLoadStart,this),this._handleProgressProxy=createjs.proxy(this._handleProgress,this),this._handleAbortProxy=createjs.proxy(this._handleAbort,this),this._handleErrorProxy=createjs.proxy(this._handleError,this),this._handleTimeoutProxy=createjs.proxy(this._handleTimeout,this),this._handleLoadProxy=createjs.proxy(this._handleLoad,this),this._handleReadyStateChangeProxy=createjs.proxy(this._handleReadyStateChange,this),this._createXHR(t)}var e=createjs.extend(t,createjs.AbstractRequest);t.ACTIVEX_VERSIONS=["Msxml2.XMLHTTP.6.0","Msxml2.XMLHTTP.5.0","Msxml2.XMLHTTP.4.0","MSXML2.XMLHTTP.3.0","MSXML2.XMLHTTP","Microsoft.XMLHTTP"],e.getResult=function(t){return t&&this._rawResponse?this._rawResponse:this._response},e.cancel=function{this.canceled=!0,this._clean,this._request.abort},e.load=function{if(null==this._request)return void this._handleError;null!=this._request.addEventListener?(this._request.addEventListener("loadstart",this._handleLoadStartProxy,!1),this._request.addEventListener("progress",this._handleProgressProxy,!1),this._request.addEventListener("abort",this._handleAbortProxy,!1),this._request.addEventListener("error",this._handleErrorProxy,!1),this._request.addEventListener("timeout",this._handleTimeoutProxy,!1),this._request.addEventListener("load",this._handleLoadProxy,!1),this._request.addEventListener("readystatechange",this._handleReadyStateChangeProxy,!1)):(this._request.onloadstart=this._handleLoadStartProxy,this._request.onprogress=this._handleProgressProxy,this._request.onabort=this._handleAbortProxy,this._request.onerror=this._handleErrorProxy,this._request.ontimeout=this._handleTimeoutProxy,this._request.onload=this._handleLoadProxy,this._request.onreadystatechange=this._handleReadyStateChangeProxy),1==this._xhrLevel&&(this._loadTimeout=setTimeout(createjs.proxy(this._handleTimeout,this),this._item.loadTimeout));try{this._item.values?this._request.send(createjs.URLUtils.formatQueryString(this._item.values)):this._request.send}catch(t){this.dispatchEvent(new createjs.ErrorEvent("XHR_SEND",null,t))}},e.setResponseType=function(t){"blob"===t&&(t=window.URL?"blob":"arraybuffer",this._responseType=t),this._request.responseType=t},e.getAllResponseHeaders=function{return this._request.getAllResponseHeaders instanceof Function?this._request.getAllResponseHeaders:null},e.getResponseHeader=function(t){return this._request.getResponseHeader instanceof Function?this._request.getResponseHeader(t):null},e._handleProgress=function(t){if(t&&!(t.loaded>0&&0==t.total)){var e=new createjs.ProgressEvent(t.loaded,t.total);this.dispatchEvent(e)}},e._handleLoadStart=function(t){clearTimeout(this._loadTimeout),this.dispatchEvent("loadstart")},e._handleAbort=function(t){this._clean,this.dispatchEvent(new createjs.ErrorEvent("XHR_ABORTED",null,t))},e._handleError=function(t){this._clean,this.dispatchEvent(new createjs.ErrorEvent(t.message))},e._handleReadyStateChange=function(t){4==this._request.readyState&&this._handleLoad},e._handleLoad=function(t){if(!this.loaded){this.loaded=!0;var e=this._checkError;if(e)return void this._handleError(e);if(this._response=this._getResponse,"arraybuffer"===this._responseType)try{this._response=new Blob([this._response])}catch(t){if(window.BlobBuilder=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder||window.MSBlobBuilder,"TypeError"===t.name&&window.BlobBuilder){var n=new BlobBuilder;n.append(this._response),this._response=n.getBlob}}this._clean,this.dispatchEvent(new createjs.Event("complete"))}},e._handleTimeout=function(t){this._clean,this.dispatchEvent(new createjs.ErrorEvent("PRELOAD_TIMEOUT",null,t))},e._checkError=function{var t=parseInt(this._request.status);return t>=400&&t<=599?new Error(t):0==t&&/^https?:/.test(location.protocol)?new Error(0):null},e._getResponse=function{if(null!=this._response)return this._response;if(null!=this._request.response)return this._request.response;try{if(null!=this._request.responseText)return this._request.responseText}catch(t){}try{if(null!=this._request.responseXML)return this._request.responseXML}catch(t){}return null},e._createXHR=function(t){var e=createjs.URLUtils.isCrossDomain(t),n={},r=null;if(window.XMLHttpRequest)r=new XMLHttpRequest,e&&void 0===r.withCredentials&&window.XDomainRequest&&(r=new XDomainRequest);else{for(var i=0,o=s.ACTIVEX_VERSIONS.length;i<o;i++){var a=s.ACTIVEX_VERSIONS[i];try{r=new ActiveXObject(a);break}catch(t){}}if(null==r)return!1}null==t.mimeType&&createjs.RequestUtils.isText(t.type)&&(t.mimeType="text/plain; charset=utf-8"),t.mimeType&&r.overrideMimeType&&r.overrideMimeType(t.mimeType),this._xhrLevel="string"==typeof r.responseType?2:1;var u=null;if(u=t.method==createjs.Methods.GET?createjs.URLUtils.buildURI(t.src,t.values):t.src,r.open(t.method||createjs.Methods.GET,u,!0),e&&r instanceof XMLHttpRequest&&1==this._xhrLevel&&(n.Origin=location.origin),t.values&&t.method==createjs.Methods.POST&&(n["Content-Type"]="application/x-www-form-urlencoded"),e||n["X-Requested-With"]||(n["X-Requested-With"]="XMLHttpRequest"),t.headers)for(var l in t.headers)n[l]=t.headers[l];for(l in n)r.setRequestHeader(l,n[l]);return r instanceof XMLHttpRequest&&void 0!==t.withCredentials&&(r.withCredentials=t.withCredentials),this._request=r,!0},e._clean=function{clearTimeout(this._loadTimeout),null!=this._request.removeEventListener?(this._request.removeEventListener("loadstart",this._handleLoadStartProxy),this._request.removeEventListener("progress",this._handleProgressProxy),this._request.removeEventListener("abort",this._handleAbortProxy),this._request.removeEventListener("error",this._handleErrorProxy),this._request.removeEventListener("timeout",this._handleTimeoutProxy),this._request.removeEventListener("load",this._handleLoadProxy),this._request.removeEventListener("readystatechange",this._handleReadyStateChangeProxy)):(this._request.onloadstart=null,this._request.onprogress=null,this._request.onabort=null,this._request.onerror=null,this._request.ontimeout=null,this._request.onload=null,this._request.onreadystatechange=null)},e.toString=function{return"[PreloadJS XHRRequest]"},createjs.XHRRequest=createjs.promote(t,"AbstractRequest")},this.createjs=this.createjs||{},function{"use strict";function t(t,e){this.AbstractMediaLoader_constructor(t,e,createjs.Types.SOUND),createjs.DomUtils.isAudioTag(t)?this._tag=t:createjs.DomUtils.isAudioTag(t.src)?this._tag=t:createjs.DomUtils.isAudioTag(t.tag)&&(this._tag=createjs.DomUtils.isAudioTag(t)?t:t.src),null!=this._tag&&(this._preferXHR=!1)}var e=createjs.extend(t,createjs.AbstractMediaLoader);t.canLoadItem=function(t){return t.type==createjs.Types.SOUND},e._createTag=function(t){var e=createjs.Elements.audio;return e.autoplay=!1,e.preload="none",e.src=t,e},createjs.SoundLoader=createjs.promote(t,"AbstractMediaLoader")},this.createjs=this.createjs||{},function{"use strict";var t=function{this.interrupt=null,this.delay=null,this.offset=null,this.loop=null,this.volume=null,this.pan=null,this.startTime=null,this.duration=null},e=t.prototype={},n=t;n.create=function(t){if("string"==typeof t)return console&&(console.warn||console.log)("Deprecated behaviour. Sound.play takes a configuration object instead of individual arguments. See docs for info."),(new createjs.PlayPropsConfig).set({interrupt:t});if(null==t||t instanceof n||t instanceof Object)return(new createjs.PlayPropsConfig).set(t);if(null==t)throw new Error("PlayProps configuration not recognized.")},e.set=function(t){if(null!=t)for(var e in t)this[e]=t[e];return this},e.toString=function{return"[PlayPropsConfig]"},createjs.PlayPropsConfig=n},this.createjs=this.createjs||{},function{"use strict";function t{throw"Sound cannot be instantiated"}function e(t,e){this.init(t,e)}var n=t;n.INTERRUPT_ANY="any",n.INTERRUPT_EARLY="early",n.INTERRUPT_LATE="late",n.INTERRUPT_NONE="none",n.PLAY_INITED="playInited",n.PLAY_SUCCEEDED="playSucceeded",n.PLAY_INTERRUPTED="playInterrupted",n.PLAY_FINISHED="playFinished",n.PLAY_FAILED="playFailed",n.SUPPORTED_EXTENSIONS=["mp3","ogg","opus","mpeg","wav","m4a","mp4","aiff","wma","mid","webm"],n.EXTENSION_MAP={m4a:"mp4"},n.FILE_PATTERN=/^(?:(\w+:)\/{2}(\w+(?:\.\w+)*\/?))?([\/.]*?(?:[^?]+)?\/)?((?:[^\/?]+)\.(\w+))(?:\?(\S+)?)?$/,n.defaultInterruptBehavior=n.INTERRUPT_NONE,n.alternateExtensions=[],n.activePlugin=null,n._masterVolume=1,n._getMasterVolume=function{return this._masterVolume},n.getVolume=createjs.deprecate(n._getMasterVolume,"Sound.getVolume"),n._setMasterVolume=function(t){if(null!=Number(t)&&(t=Math.max(0,Math.min(1,t)),n._masterVolume=t,!this.activePlugin||!this.activePlugin.setVolume||!this.activePlugin.setVolume(t)))for(var e=this._instances,r=0,i=e.length;r<i;r++)e[r].setMasterVolume(t)},n.setVolume=createjs.deprecate(n._setMasterVolume,"Sound.setVolume"),n._masterMute=!1,n._getMute=function{return this._masterMute},n.getMute=createjs.deprecate(n._getMute,"Sound.getMute"),n._setMute=function(t){if(null!=t&&(this._masterMute=t,!this.activePlugin||!this.activePlugin.setMute||!this.activePlugin.setMute(t)))for(var e=this._instances,n=0,r=e.length;n<r;n++)e[n].setMasterMute(t)},n.setMute=createjs.deprecate(n._setMute,"Sound.setMute"),n._getCapabilities=function{return null==n.activePlugin?null:n.activePlugin._capabilities},n.getCapabilities=createjs.deprecate(n._getCapabilities,"Sound.getCapabilities"),Object.defineProperties(n,{volume:{get:n._getMasterVolume,set:n._setMasterVolume},muted:{get:n._getMute,set:n._setMute},capabilities:{get:n._getCapabilities}}),n._pluginsRegistered=!1,n._lastID=0,n._instances=[],n._idHash={},n._preloadHash={},n._defaultPlayPropsHash={},n.addEventListener=null,n.removeEventListener=null,n.removeAllEventListeners=null,n.dispatchEvent=null,n.hasEventListener=null,n._listeners=null,createjs.EventDispatcher.initialize(n),n.getPreloadHandlers=function{return{callback:createjs.proxy(n.initLoad,n),types:["sound"],extensions:n.SUPPORTED_EXTENSIONS}},n._handleLoadComplete=function(t){var e=t.target.getItem.src;if(n._preloadHash[e])for(var r=0,i=n._preloadHash[e].length;r<i;r++){var o=n._preloadHash[e][r];if(n._preloadHash[e][r]=!0,n.hasEventListener("fileload")){var t=new createjs.Event("fileload");t.src=o.src,t.id=o.id,t.data=o.data,t.sprite=o.sprite,n.dispatchEvent(t)}}},n._handleLoadError=function(t){var e=t.target.getItem.src;if(n._preloadHash[e])for(var r=0,i=n._preloadHash[e].length;r<i;r++){var o=n._preloadHash[e][r];if(n._preloadHash[e][r]=!1,n.hasEventListener("fileerror")){var t=new createjs.Event("fileerror");t.src=o.src,t.id=o.id,t.data=o.data,t.sprite=o.sprite,n.dispatchEvent(t)}}},n._registerPlugin=function(t){return!!t.isSupported&&(n.activePlugin=new t,!0)},n.registerPlugins=function(t){n._pluginsRegistered=!0;for(var e=0,r=t.length;e<r;e++)if(n._registerPlugin(t[e]))return!0;return!1},n.initializeDefaultPlugins=function{return null!=n.activePlugin||!n._pluginsRegistered&&!!n.registerPlugins([createjs.WebAudioPlugin,createjs.HTMLAudioPlugin])},n.isReady=function{return null!=n.activePlugin},n.initLoad=function(t){return"video"==t.type||n._registerSound(t)},n._registerSound=function(t){if(!n.initializeDefaultPlugins)return!1;var r;if(t.src instanceof Object?(r=n._parseSrc(t.src),r.src=t.path+r.src):r=n._parsePath(t.src),null==r)return!1;t.src=r.src,t.type="sound";var i=t.data,o=null;if(null!=i&&(isNaN(i.channels)?isNaN(i)||(o=parseInt(i)):o=parseInt(i.channels),i.audioSprite))for(var a,s=i.audioSprite.length;s--;)a=i.audioSprite[s],n._idHash[a.id]={src:t.src,startTime:parseInt(a.startTime),duration:parseInt(a.duration)},a.defaultPlayProps&&(n._defaultPlayPropsHash[a.id]=createjs.PlayPropsConfig.create(a.defaultPlayProps));null!=t.id&&(n._idHash[t.id]={src:t.src});var u=n.activePlugin.register(t);return e.create(t.src,o),null!=i&&isNaN(i)?t.data.channels=o||e.maxPerChannel:t.data=o||e.maxPerChannel,u.type&&(t.type=u.type),t.defaultPlayProps&&(n._defaultPlayPropsHash[t.src]=createjs.PlayPropsConfig.create(t.defaultPlayProps)),u},n.registerSound=function(t,e,r,i,o){var a={src:t,id:e,data:r,defaultPlayProps:o};t instanceof Object&&t.src&&(i=e,a=t),a=createjs.LoadItem.create(a),a.path=i,null==i||a.src instanceof Object||(a.src=i+a.src);var s=n._registerSound(a);if(!s)return!1;if(n._preloadHash[a.src]||(n._preloadHash[a.src]=[]),n._preloadHash[a.src].push(a),1==n._preloadHash[a.src].length)s.on("complete",this._handleLoadComplete,this),s.on("error",this._handleLoadError,this),n.activePlugin.preload(s);else if(1==n._preloadHash[a.src][0])return!0;return a},n.registerSounds=function(t,e){var n=[];t.path&&(e?e+=t.path:e=t.path,t=t.manifest);for(var r=0,i=t.length;r<i;r++)n[r]=createjs.Sound.registerSound(t[r].src,t[r].id,t[r].data,e,t[r].defaultPlayProps);return n},n.removeSound=function(t,r){if(null==n.activePlugin)return!1;t instanceof Object&&t.src&&(t=t.src);var i;if(t instanceof Object?i=n._parseSrc(t):(t=n._getSrcById(t).src,i=n._parsePath(t)),null==i)return!1;t=i.src,null!=r&&(t=r+t);for(var o in n._idHash)n._idHash[o].src==t&&delete n._idHash[o];return e.removeSrc(t),delete n._preloadHash[t],n.activePlugin.removeSound(t),!0},n.removeSounds=function(t,e){var n=[];t.path&&(e?e+=t.path:e=t.path,t=t.manifest);for(var r=0,i=t.length;r<i;r++)n[r]=createjs.Sound.removeSound(t[r].src,e);return n},n.removeAllSounds=function{n._idHash={},n._preloadHash={},e.removeAll,n.activePlugin&&n.activePlugin.removeAllSounds},n.loadComplete=function(t){if(!n.isReady)return!1;var e=n._parsePath(t);return t=e?n._getSrcById(e.src).src:n._getSrcById(t).src,void 0!=n._preloadHash[t]&&1==n._preloadHash[t][0]},n._parsePath=function(t){"string"!=typeof t&&(t=t.toString);var e=t.match(n.FILE_PATTERN);if(null==e)return!1;for(var r=e[4],i=e[5],o=n.capabilities,a=0;!o[i];)if(i=n.alternateExtensions[a++],a>n.alternateExtensions.length)return null;return t=t.replace("."+e[5],"."+i),{name:r,src:t,extension:i}},n._parseSrc=function(t){var e={name:void 0,src:void 0,extension:void 0},r=n.capabilities;for(var i in t)if(t.hasOwnProperty(i)&&r[i]){e.src=t[i],e.extension=i;break}if(!e.src)return!1;var o=e.src.lastIndexOf("/");return e.name=-1!=o?e.src.slice(o+1):e.src,e},n.play=function(t,e){var r=createjs.PlayPropsConfig.create(e),i=n.createInstance(t,r.startTime,r.duration);return n._playInstance(i,r)||i._playFailed,i},n.createInstance=function(t,r,i){if(!n.initializeDefaultPlugins)return new createjs.DefaultSoundInstance(t,r,i);var o=n._defaultPlayPropsHash[t];t=n._getSrcById(t);var a=n._parsePath(t.src),s=null;return null!=a&&null!=a.src?(e.create(a.src),null==r&&(r=t.startTime),s=n.activePlugin.create(a.src,r,i||t.duration),(o=o||n._defaultPlayPropsHash[a.src])&&s.applyPlayProps(o)):s=new createjs.DefaultSoundInstance(t,r,i),s.uniqueId=n._lastID++,s},n.stop=function{for(var t=this._instances,e=t.length;e--;)t[e].stop},n.setDefaultPlayProps=function(t,e){t=n._getSrcById(t),n._defaultPlayPropsHash[n._parsePath(t.src).src]=createjs.PlayPropsConfig.create(e)},n.getDefaultPlayProps=function(t){return t=n._getSrcById(t),n._defaultPlayPropsHash[n._parsePath(t.src).src]},n._playInstance=function(t,e){var r=n._defaultPlayPropsHash[t.src]||{};if(null==e.interrupt&&(e.interrupt=r.interrupt||n.defaultInterruptBehavior),null==e.delay&&(e.delay=r.delay||0),null==e.offset&&(e.offset=t.position),null==e.loop&&(e.loop=t.loop),null==e.volume&&(e.volume=t.volume),null==e.pan&&(e.pan=t.pan),0==e.delay){if(!n._beginPlaying(t,e))return!1}else{var i=setTimeout(function{n._beginPlaying(t,e)},e.delay);t.delayTimeoutId=i}return this._instances.push(t),!0},n._beginPlaying=function(t,n){if(!e.add(t,n.interrupt))return!1;if(!t._beginPlaying(n)){var r=createjs.indexOf(this._instances,t);return r>-1&&this._instances.splice(r,1),!1}return!0},n._getSrcById=function(t){return n._idHash[t]||{src:t}},n._playFinished=function(t){e.remove(t);var n=createjs.indexOf(this._instances,t);n>-1&&this._instances.splice(n,1)},createjs.Sound=t,e.channels={},e.create=function(t,n){return null==e.get(t)&&(e.channels[t]=new e(t,n),!0)},e.removeSrc=function(t){var n=e.get(t);return null!=n&&(n._removeAll,delete e.channels[t],!0)},e.removeAll=function{for(var t in e.channels)e.channels[t]._removeAll;e.channels={}},e.add=function(t,n){var r=e.get(t.src);return null!=r&&r._add(t,n)},e.remove=function(t){var n=e.get(t.src);return null!=n&&(n._remove(t),!0)},e.maxPerChannel=function{return r.maxDefault},e.get=function(t){return e.channels[t]};var r=e.prototype;r.constructor=e,r.src=null,r.max=null,r.maxDefault=100,r.length=0,r.init=function(t,e){this.src=t,this.max=e||this.maxDefault,-1==this.max&&(this.max=this.maxDefault),this._instances=[]},r._get=function(t){return this._instances[t]},r._add=function(t,e){return!!this._getSlot(e,t)&&(this._instances.push(t),this.length++,!0)},r._remove=function(t){var e=createjs.indexOf(this._instances,t);return-1!=e&&(this._instances.splice(e,1),this.length--,!0)},r._removeAll=function{for(var t=this.length-1;t>=0;t--)this._instances[t].stop},r._getSlot=function(e,n){var r,i;if(e!=t.INTERRUPT_NONE&&null==(i=this._get(0)))return!0;for(var o=0,a=this.max;o<a;o++){if(null==(r=this._get(o)))return!0;if(r.playState==t.PLAY_FINISHED||r.playState==t.PLAY_INTERRUPTED||r.playState==t.PLAY_FAILED){i=r;break}e!=t.INTERRUPT_NONE&&((e==t.INTERRUPT_EARLY&&r.position<i.position||e==t.INTERRUPT_LATE&&r.position>i.position)&&(i=r))}return null!=i&&(i._interrupt,this._remove(i),!0)},r.toString=function{return"[Sound SoundChannel]"}},this.createjs=this.createjs||{},function{"use strict";var t=function(t,e,n,r){this.EventDispatcher_constructor,this.src=t,this.uniqueId=-1,this.playState=null,this.delayTimeoutId=null,this._volume=1,Object.defineProperty(this,"volume",{get:this._getVolume,set:this._setVolume}),this.getVolume=createjs.deprecate(this._getVolume,"AbstractSoundInstance.getVolume"),this.setVolume=createjs.deprecate(this._setVolume,"AbstractSoundInstance.setVolume"),this._pan=0,Object.defineProperty(this,"pan",{get:this._getPan,set:this._setPan}),this.getPan=createjs.deprecate(this._getPan,"AbstractSoundInstance.getPan"),this.setPan=createjs.deprecate(this._setPan,"AbstractSoundInstance.setPan"),this._startTime=Math.max(0,e||0),Object.defineProperty(this,"startTime",{get:this._getStartTime,set:this._setStartTime}),this.getStartTime=createjs.deprecate(this._getStartTime,"AbstractSoundInstance.getStartTime"),this.setStartTime=createjs.deprecate(this._setStartTime,"AbstractSoundInstance.setStartTime"),this._duration=Math.max(0,n||0),Object.defineProperty(this,"duration",{get:this._getDuration,set:this._setDuration}),this.getDuration=createjs.deprecate(this._getDuration,"AbstractSoundInstance.getDuration"),this.setDuration=createjs.deprecate(this._setDuration,"AbstractSoundInstance.setDuration"),this._playbackResource=null,Object.defineProperty(this,"playbackResource",{get:this._getPlaybackResource,set:this._setPlaybackResource}),!1!==r&&!0!==r&&this._setPlaybackResource(r),this.getPlaybackResource=createjs.deprecate(this._getPlaybackResource,"AbstractSoundInstance.getPlaybackResource"),this.setPlaybackResource=createjs.deprecate(this._setPlaybackResource,"AbstractSoundInstance.setPlaybackResource"),this._position=0,Object.defineProperty(this,"position",{get:this._getPosition,set:this._setPosition}),this.getPosition=createjs.deprecate(this._getPosition,"AbstractSoundInstance.getPosition"),this.setPosition=createjs.deprecate(this._setPosition,"AbstractSoundInstance.setPosition"),this._loop=0,Object.defineProperty(this,"loop",{get:this._getLoop,set:this._setLoop}),this.getLoop=createjs.deprecate(this._getLoop,"AbstractSoundInstance.getLoop"),this.setLoop=createjs.deprecate(this._setLoop,"AbstractSoundInstance.setLoop"),this._muted=!1,Object.defineProperty(this,"muted",{get:this._getMuted,set:this._setMuted}),this.getMuted=createjs.deprecate(this._getMuted,"AbstractSoundInstance.getMuted"),this.setMuted=createjs.deprecate(this._setMuted,"AbstractSoundInstance.setMuted"),this._paused=!1,Object.defineProperty(this,"paused",{get:this._getPaused,set:this._setPaused}),this.getPaused=createjs.deprecate(this._getPaused,"AbstractSoundInstance.getPaused"),this.setPaused=createjs.deprecate(this._setPaused,"AbstractSoundInstance.setPaused")},e=createjs.extend(t,createjs.EventDispatcher);e.play=function(t){var e=createjs.PlayPropsConfig.create(t);return this.playState==createjs.Sound.PLAY_SUCCEEDED?(this.applyPlayProps(e),void(this._paused&&this._setPaused(!1))):(this._cleanUp,createjs.Sound._playInstance(this,e),this)},e.stop=function{return this._position=0,this._paused=!1,this._handleStop,this._cleanUp,this.playState=createjs.Sound.PLAY_FINISHED,this},e.destroy=function{this._cleanUp,this.src=null,this.playbackResource=null,this.removeAllEventListeners},e.applyPlayProps=function(t){return null!=t.offset&&this._setPosition(t.offset),null!=t.loop&&this._setLoop(t.loop),null!=t.volume&&this._setVolume(t.volume),null!=t.pan&&this._setPan(t.pan),null!=t.startTime&&(this._setStartTime(t.startTime),this._setDuration(t.duration)),this},e.toString=function{return"[AbstractSoundInstance]"},e._getPaused=function{return this._paused},e._setPaused=function(t){if(!(!0!==t&&!1!==t||this._paused==t||1==t&&this.playState!=createjs.Sound.PLAY_SUCCEEDED))return this._paused=t,t?this._pause:this._resume,clearTimeout(this.delayTimeoutId),this},e._setVolume=function(t){return t==this._volume?this:(this._volume=Math.max(0,Math.min(1,t)),this._muted||this._updateVolume,this)},e._getVolume=function{return this._volume},e._setMuted=function(t){if(!0===t||!1===t)return this._muted=t,this._updateVolume,this},e._getMuted=function{return this._muted},e._setPan=function(t){return t==this._pan?this:(this._pan=Math.max(-1,Math.min(1,t)),this._updatePan,this)},e._getPan=function{return this._pan},e._getPosition=function{return this._paused||this.playState!=createjs.Sound.PLAY_SUCCEEDED||(this._position=this._calculateCurrentPosition),this._position},e._setPosition=function(t){return this._position=Math.max(0,t),this.playState==createjs.Sound.PLAY_SUCCEEDED&&this._updatePosition,this},e._getStartTime=function{return this._startTime},e._setStartTime=function(t){return t==this._startTime?this:(this._startTime=Math.max(0,t||0),this._updateStartTime,this)},e._getDuration=function{return this._duration},e._setDuration=function(t){return t==this._duration?this:(this._duration=Math.max(0,t||0),this._updateDuration,this)},e._setPlaybackResource=function(t){return this._playbackResource=t,0==this._duration&&this._playbackResource&&this._setDurationFromSource,this},e._getPlaybackResource=function{return this._playbackResource},e._getLoop=function{return this._loop},e._setLoop=function(t){null!=this._playbackResource&&(0!=this._loop&&0==t?this._removeLooping(t):0==this._loop&&0!=t&&this._addLooping(t)),this._loop=t},e._sendEvent=function(t){var e=new createjs.Event(t);this.dispatchEvent(e)},e._cleanUp=function{clearTimeout(this.delayTimeoutId),this._handleCleanUp,this._paused=!1,createjs.Sound._playFinished(this)},e._interrupt=function{this._cleanUp,this.playState=createjs.Sound.PLAY_INTERRUPTED,this._sendEvent("interrupted")},e._beginPlaying=function(t){return this._setPosition(t.offset),this._setLoop(t.loop),this._setVolume(t.volume),this._setPan(t.pan),null!=t.startTime&&(this._setStartTime(t.startTime),this._setDuration(t.duration)),null!=this._playbackResource&&this._position<this._duration?(this._paused=!1,this._handleSoundReady,this.playState=createjs.Sound.PLAY_SUCCEEDED,this._sendEvent("succeeded"),!0):(this._playFailed,!1)},e._playFailed=function{this._cleanUp,this.playState=createjs.Sound.PLAY_FAILED,this._sendEvent("failed")},e._handleSoundComplete=function(t){if(this._position=0,0!=this._loop)return this._loop--,this._handleLoop,void this._sendEvent("loop");this._cleanUp,this.playState=createjs.Sound.PLAY_FINISHED,this._sendEvent("complete")},e._handleSoundReady=function{},e._updateVolume=function{},e._updatePan=function{},e._updateStartTime=function{},e._updateDuration=function{},e._setDurationFromSource=function{},e._calculateCurrentPosition=function{},e._updatePosition=function{},e._removeLooping=function(t){},e._addLooping=function(t){},e._pause=function{},e._resume=function{},e._handleStop=function{},e._handleCleanUp=function{},e._handleLoop=function{},createjs.AbstractSoundInstance=createjs.promote(t,"EventDispatcher"),createjs.DefaultSoundInstance=createjs.AbstractSoundInstance},this.createjs=this.createjs||{},function{"use strict";var t=function{this._capabilities=null,this._loaders={},this._audioSources={},this._soundInstances={},this._volume=1,this._loaderClass,this._soundInstanceClass},e=t.prototype;t._capabilities=null,t.isSupported=function{return!0},e.register=function(t){var e=this._loaders[t.src];return e&&!e.canceled?this._loaders[t.src]:(this._audioSources[t.src]=!0,this._soundInstances[t.src]=[],e=new this._loaderClass(t),e.on("complete",this._handlePreloadComplete,this),this._loaders[t.src]=e,e)},e.preload=function(t){t.on("error",this._handlePreloadError,this),t.load},e.isPreloadStarted=function(t){return null!=this._audioSources[t]},e.isPreloadComplete=function(t){return!(null==this._audioSources[t]||1==this._audioSources[t])},e.removeSound=function(t){if(this._soundInstances[t]){for(var e=this._soundInstances[t].length;e--;){this._soundInstances[t][e].destroy}delete this._soundInstances[t],delete this._audioSources[t],this._loaders[t]&&this._loaders[t].destroy,delete this._loaders[t]}},e.removeAllSounds=function{for(var t in this._audioSources)this.removeSound(t)},e.create=function(t,e,n){this.isPreloadStarted(t)||this.preload(this.register(t));var r=new this._soundInstanceClass(t,e,n,this._audioSources[t]);return this._soundInstances[t]&&this._soundInstances[t].push(r),r.setMasterVolume&&r.setMasterVolume(createjs.Sound.volume),r.setMasterMute&&r.setMasterMute(createjs.Sound.muted),r},e.setVolume=function(t){return this._volume=t,this._updateVolume,!0},e.getVolume=function{return this._volume},e.setMute=function(t){return this._updateVolume,!0},e.toString=function{return"[AbstractPlugin]"},e._handlePreloadComplete=function(t){var e=t.target.getItem.src,n=t.result,r=this._soundInstances[e];if(this._audioSources[e]=n,null!=r&&r.length>0)for(var i=0,o=r.length;i<o;i++)r[i].playbackResource=n;this._soundInstances[e]=null},e._handlePreloadError=function(t){},e._updateVolume=function{},createjs.AbstractPlugin=t},this.createjs=this.createjs||{},function{"use strict";function t(t){this.AbstractLoader_constructor(t,!0,createjs.Types.SOUND)}var e=createjs.extend(t,createjs.AbstractLoader);t.context=null,e.toString=function{return"[WebAudioLoader]"},e._createRequest=function{this._request=new createjs.XHRRequest(this._item,!1),this._request.setResponseType("arraybuffer")},e._sendComplete=function(e){t.context.decodeAudioData(this._rawResult,createjs.proxy(this._handleAudioDecoded,this),createjs.proxy(this._sendError,this))},e._handleAudioDecoded=function(t){this._result=t,this.AbstractLoader__sendComplete},createjs.WebAudioLoader=createjs.promote(t,"AbstractLoader")},this.createjs=this.createjs||{},function{"use strict";function t(t,e,r,i){this.AbstractSoundInstance_constructor(t,e,r,i),this.gainNode=n.context.createGain,this.panNode=n.context.createPanner,this.panNode.panningModel=n._panningModel,this.panNode.connect(this.gainNode),this._updatePan,this.sourceNode=null,this._soundCompleteTimeout=null,this._sourceNodeNext=null,this._playbackStartTime=0,this._endedHandler=createjs.proxy(this._handleSoundComplete,this)}var e=createjs.extend(t,createjs.AbstractSoundInstance),n=t;n.context=null,n._scratchBuffer=null,n.destinationNode=null,n._panningModel="equalpower",e.destroy=function{this.AbstractSoundInstance_destroy,this.panNode.disconnect(0),this.panNode=null,this.gainNode.disconnect(0),this.gainNode=null},e.toString=function{return"[WebAudioSoundInstance]"},e._updatePan=function{this.panNode.setPosition(this._pan,0,-.5)},e._removeLooping=function(t){this._sourceNodeNext=this._cleanUpAudioNode(this._sourceNodeNext)},e._addLooping=function(t){this.playState==createjs.Sound.PLAY_SUCCEEDED&&(this._sourceNodeNext=this._createAndPlayAudioNode(this._playbackStartTime,0))},e._setDurationFromSource=function{this._duration=1e3*this.playbackResource.duration},e._handleCleanUp=function{this.sourceNode&&this.playState==createjs.Sound.PLAY_SUCCEEDED&&(this.sourceNode=this._cleanUpAudioNode(this.sourceNode),this._sourceNodeNext=this._cleanUpAudioNode(this._sourceNodeNext)),0!=this.gainNode.numberOfOutputs&&this.gainNode.disconnect(0),clearTimeout(this._soundCompleteTimeout),this._playbackStartTime=0},e._cleanUpAudioNode=function(t){if(t){if(t.stop(0),t.disconnect(0),createjs.BrowserDetect.isIOS)try{t.buffer=n._scratchBuffer}catch(t){}t=null}return t},e._handleSoundReady=function(t){this.gainNode.connect(n.destinationNode);var e=.001*this._duration,r=Math.min(.001*Math.max(0,this._position),e);this.sourceNode=this._createAndPlayAudioNode(n.context.currentTime-e,r),this._playbackStartTime=this.sourceNode.startTime-r,this._soundCompleteTimeout=setTimeout(this._endedHandler,1e3*(e-r)),0!=this._loop&&(this._sourceNodeNext=this._createAndPlayAudioNode(this._playbackStartTime,0))},e._createAndPlayAudioNode=function(t,e){var r=n.context.createBufferSource;r.buffer=this.playbackResource,r.connect(this.panNode);var i=.001*this._duration;return r.startTime=t+i,r.start(r.startTime,e+.001*this._startTime,i-e),r},e._pause=function{this._position=1e3*(n.context.currentTime-this._playbackStartTime),this.sourceNode=this._cleanUpAudioNode(this.sourceNode),this._sourceNodeNext=this._cleanUpAudioNode(this._sourceNodeNext),0!=this.gainNode.numberOfOutputs&&this.gainNode.disconnect(0),clearTimeout(this._soundCompleteTimeout)},e._resume=function{this._handleSoundReady},e._updateVolume=function{var t=this._muted?0:this._volume;t!=this.gainNode.gain.value&&(this.gainNode.gain.value=t)},e._calculateCurrentPosition=function{return 1e3*(n.context.currentTime-this._playbackStartTime)},e._updatePosition=function{this.sourceNode=this._cleanUpAudioNode(this.sourceNode),this._sourceNodeNext=this._cleanUpAudioNode(this._sourceNodeNext),clearTimeout(this._soundCompleteTimeout),this._paused||this._handleSoundReady},e._handleLoop=function{this._cleanUpAudioNode(this.sourceNode),this.sourceNode=this._sourceNodeNext,this._playbackStartTime=this.sourceNode.startTime,this._sourceNodeNext=this._createAndPlayAudioNode(this._playbackStartTime,0),this._soundCompleteTimeout=setTimeout(this._endedHandler,this._duration)},e._updateDuration=function{this.playState==createjs.Sound.PLAY_SUCCEEDED&&(this._pause,this._resume)},createjs.WebAudioSoundInstance=createjs.promote(t,"AbstractSoundInstance")},this.createjs=this.createjs||{},function{"use strict";function t{this.AbstractPlugin_constructor,this._panningModel=n._panningModel,this.context=n.context,this.dynamicsCompressorNode=this.context.createDynamicsCompressor,this.dynamicsCompressorNode.connect(this.context.destination),this.gainNode=this.context.createGain,this.gainNode.connect(this.dynamicsCompressorNode),createjs.WebAudioSoundInstance.destinationNode=this.gainNode,this._capabilities=n._capabilities,this._loaderClass=createjs.WebAudioLoader,this._soundInstanceClass=createjs.WebAudioSoundInstance,this._addPropsToClasses}var e=createjs.extend(t,createjs.AbstractPlugin),n=t;n._capabilities=null,n._panningModel="equalpower",n.context=null,n._scratchBuffer=null,n._unlocked=!1,n.DEFAULT_SAMPLE_RATE=44100,n.isSupported=function{var t=createjs.BrowserDetect.isIOS||createjs.BrowserDetect.isAndroid||createjs.BrowserDetect.isBlackberry;return!("file:"==location.protocol&&!t&&!this._isFileXHRSupported)&&(n._generateCapabilities,null!=n.context)},n.playEmptySound=function{if(null!=n.context){var t=n.context.createBufferSource;t.buffer=n._scratchBuffer,t.connect(n.context.destination),t.start(0,0,0)}},n._isFileXHRSupported=function{var t=!0,e=new XMLHttpRequest;try{e.open("GET","WebAudioPluginTest.fail",!1)}catch(e){return t=!1}e.onerror=function{t=!1},e.onload=function{t=404==this.status||200==this.status||0==this.status&&""!=this.response};try{e.send}catch(e){t=!1}return t},n._generateCapabilities=function{if(null==n._capabilities){var t=document.createElement("audio");if(null==t.canPlayType)return null;if(null==n.context&&(n.context=n._createAudioContext,null==n.context))return null;null==n._scratchBuffer&&(n._scratchBuffer=n.context.createBuffer(1,1,22050)),n._compatibilitySetUp,"ontouchstart"in window&&"running"!=n.context.state&&(n._unlock,document.addEventListener("mousedown",n._unlock,!0),document.addEventListener("touchstart",n._unlock,!0),document.addEventListener("touchend",n._unlock,!0)),n._capabilities={panning:!0,volume:!0,tracks:-1};for(var e=createjs.Sound.SUPPORTED_EXTENSIONS,r=createjs.Sound.EXTENSION_MAP,i=0,o=e.length;i<o;i++){var a=e[i],s=r[a]||a;n._capabilities[a]="no"!=t.canPlayType("audio/"+a)&&""!=t.canPlayType("audio/"+a)||"no"!=t.canPlayType("audio/"+s)&&""!=t.canPlayType("audio/"+s)}n.context.destination.numberOfChannels<2&&(n._capabilities.panning=!1)}},n._createAudioContext=function{var t=window.AudioContext||window.webkitAudioContext;if(null==t)return null;var e=new t;if(/(iPhone|iPad)/i.test(navigator.userAgent)&&e.sampleRate!==n.DEFAULT_SAMPLE_RATE){var r=e.createBuffer(1,1,n.DEFAULT_SAMPLE_RATE),i=e.createBufferSource;i.buffer=r,i.connect(e.destination),i.start(0),i.disconnect,e.close,e=new t}return e},n._compatibilitySetUp=function{if(n._panningModel="equalpower",!n.context.createGain){n.context.createGain=n.context.createGainNode;var t=n.context.createBufferSource;t.__proto__.start=t.__proto__.noteGrainOn,t.__proto__.stop=t.__proto__.noteOff,n._panningModel=0}},n._unlock=function{n._unlocked||(n.playEmptySound,"running"==n.context.state&&(document.removeEventListener("mousedown",n._unlock,!0),document.removeEventListener("touchend",n._unlock,!0),document.removeEventListener("touchstart",n._unlock,!0),n._unlocked=!0))},e.toString=function{return"[WebAudioPlugin]"},e._addPropsToClasses=function{var t=this._soundInstanceClass;t.context=this.context,t._scratchBuffer=n._scratchBuffer,t.destinationNode=this.gainNode,t._panningModel=this._panningModel,this._loaderClass.context=this.context},e._updateVolume=function{var t=createjs.Sound._masterMute?0:this._volume;t!=this.gainNode.gain.value&&(this.gainNode.gain.value=t)},createjs.WebAudioPlugin=createjs.promote(t,"AbstractPlugin")},this.createjs=this.createjs||{},function{"use strict";function t{throw"HTMLAudioTagPool cannot be instantiated"}function e(t){this._tags=[]}var n=t;n._tags={},n._tagPool=new e,n._tagUsed={},n.get=function(t){var e=n._tags[t];return null==e?(e=n._tags[t]=n._tagPool.get,e.src=t):n._tagUsed[t]?(e=n._tagPool.get,e.src=t):n._tagUsed[t]=!0,e},n.set=function(t,e){e==n._tags[t]?n._tagUsed[t]=!1:n._tagPool.set(e)},n.remove=function(t){var e=n._tags[t];return null!=e&&(n._tagPool.set(e),delete n._tags[t],delete n._tagUsed[t],!0)},n.getDuration=function(t){var e=n._tags[t];return null!=e&&e.duration?1e3*e.duration:0},createjs.HTMLAudioTagPool=t;var r=e.prototype;r.constructor=e,r.get=function{var t;return t=0==this._tags.length?this._createTag:this._tags.pop,null==t.parentNode&&document.body.appendChild(t),t},r.set=function(t){-1==createjs.indexOf(this._tags,t)&&(this._tags.src=null,this._tags.push(t))},r.toString=function{return"[TagPool]"},r._createTag=function{var t=document.createElement("audio");return t.autoplay=!1,t.preload="none",t}},this.createjs=this.createjs||{},function{"use strict";function t(t,e,n,r){this.AbstractSoundInstance_constructor(t,e,n,r),this._audioSpriteStopTime=null,this._delayTimeoutId=null,this._endedHandler=createjs.proxy(this._handleSoundComplete,this),this._readyHandler=createjs.proxy(this._handleTagReady,this),this._stalledHandler=createjs.proxy(this._playFailed,this),this._audioSpriteEndHandler=createjs.proxy(this._handleAudioSpriteLoop,this),this._loopHandler=createjs.proxy(this._handleSoundComplete,this),n?this._audioSpriteStopTime=.001*(e+n):this._duration=createjs.HTMLAudioTagPool.getDuration(this.src)}var e=createjs.extend(t,createjs.AbstractSoundInstance);e.setMasterVolume=function(t){this._updateVolume},e.setMasterMute=function(t){this._updateVolume},e.toString=function{return"[HTMLAudioSoundInstance]"},e._removeLooping=function{null!=this._playbackResource&&(this._playbackResource.loop=!1,this._playbackResource.removeEventListener(createjs.HTMLAudioPlugin._AUDIO_SEEKED,this._loopHandler,!1))},e._addLooping=function{null==this._playbackResource||this._audioSpriteStopTime||(this._playbackResource.addEventListener(createjs.HTMLAudioPlugin._AUDIO_SEEKED,this._loopHandler,!1),this._playbackResource.loop=!0)},e._handleCleanUp=function{var t=this._playbackResource;if(null!=t){t.pause,t.loop=!1,t.removeEventListener(createjs.HTMLAudioPlugin._AUDIO_ENDED,this._endedHandler,!1),t.removeEventListener(createjs.HTMLAudioPlugin._AUDIO_READY,this._readyHandler,!1),t.removeEventListener(createjs.HTMLAudioPlugin._AUDIO_STALLED,this._stalledHandler,!1),t.removeEventListener(createjs.HTMLAudioPlugin._AUDIO_SEEKED,this._loopHandler,!1),t.removeEventListener(createjs.HTMLAudioPlugin._TIME_UPDATE,this._audioSpriteEndHandler,!1);try{t.currentTime=this._startTime}catch(t){}createjs.HTMLAudioTagPool.set(this.src,t),this._playbackResource=null}},e._beginPlaying=function(t){return this._playbackResource=createjs.HTMLAudioTagPool.get(this.src),this.AbstractSoundInstance__beginPlaying(t)},e._handleSoundReady=function(t){if(4!==this._playbackResource.readyState){var e=this._playbackResource;return e.addEventListener(createjs.HTMLAudioPlugin._AUDIO_READY,this._readyHandler,!1),e.addEventListener(createjs.HTMLAudioPlugin._AUDIO_STALLED,this._stalledHandler,!1),e.preload="auto",void e.load}this._updateVolume,this._playbackResource.currentTime=.001*(this._startTime+this._position),this._audioSpriteStopTime?this._playbackResource.addEventListener(createjs.HTMLAudioPlugin._TIME_UPDATE,this._audioSpriteEndHandler,!1):(this._playbackResource.addEventListener(createjs.HTMLAudioPlugin._AUDIO_ENDED,this._endedHandler,!1),0!=this._loop&&(this._playbackResource.addEventListener(createjs.HTMLAudioPlugin._AUDIO_SEEKED,this._loopHandler,!1),this._playbackResource.loop=!0)),this._playbackResource.play},e._handleTagReady=function(t){this._playbackResource.removeEventListener(createjs.HTMLAudioPlugin._AUDIO_READY,this._readyHandler,!1),this._playbackResource.removeEventListener(createjs.HTMLAudioPlugin._AUDIO_STALLED,this._stalledHandler,!1),this._handleSoundReady},e._pause=function{this._playbackResource.pause},e._resume=function{this._playbackResource.play},e._updateVolume=function{if(null!=this._playbackResource){var t=this._muted||createjs.Sound._masterMute?0:this._volume*createjs.Sound._masterVolume;t!=this._playbackResource.volume&&(this._playbackResource.volume=t)}},e._calculateCurrentPosition=function{return 1e3*this._playbackResource.currentTime-this._startTime},e._updatePosition=function{this._playbackResource.removeEventListener(createjs.HTMLAudioPlugin._AUDIO_SEEKED,this._loopHandler,!1),this._playbackResource.addEventListener(createjs.HTMLAudioPlugin._AUDIO_SEEKED,this._handleSetPositionSeek,!1);try{this._playbackResource.currentTime=.001*(this._position+this._startTime)}catch(t){this._handleSetPositionSeek(null)}},e._handleSetPositionSeek=function(t){null!=this._playbackResource&&(this._playbackResource.removeEventListener(createjs.HTMLAudioPlugin._AUDIO_SEEKED,this._handleSetPositionSeek,!1),this._playbackResource.addEventListener(createjs.HTMLAudioPlugin._AUDIO_SEEKED,this._loopHandler,!1))},e._handleAudioSpriteLoop=function(t){this._playbackResource.currentTime<=this._audioSpriteStopTime||(this._playbackResource.pause,0==this._loop?this._handleSoundComplete(null):(this._position=0,this._loop--,this._playbackResource.currentTime=.001*this._startTime,this._paused||this._playbackResource.play,this._sendEvent("loop")))},e._handleLoop=function(t){0==this._loop&&(this._playbackResource.loop=!1,this._playbackResource.removeEventListener(createjs.HTMLAudioPlugin._AUDIO_SEEKED,this._loopHandler,!1))},e._updateStartTime=function{this._audioSpriteStopTime=.001*(this._startTime+this._duration),this.playState==createjs.Sound.PLAY_SUCCEEDED&&(this._playbackResource.removeEventListener(createjs.HTMLAudioPlugin._AUDIO_ENDED,this._endedHandler,!1),this._playbackResource.addEventListener(createjs.HTMLAudioPlugin._TIME_UPDATE,this._audioSpriteEndHandler,!1))},e._updateDuration=function{this._audioSpriteStopTime=.001*(this._startTime+this._duration),this.playState==createjs.Sound.PLAY_SUCCEEDED&&(this._playbackResource.removeEventListener(createjs.HTMLAudioPlugin._AUDIO_ENDED,this._endedHandler,!1),this._playbackResource.addEventListener(createjs.HTMLAudioPlugin._TIME_UPDATE,this._audioSpriteEndHandler,!1))},e._setDurationFromSource=function{this._duration=createjs.HTMLAudioTagPool.getDuration(this.src),this._playbackResource=null},createjs.HTMLAudioSoundInstance=createjs.promote(t,"AbstractSoundInstance")},this.createjs=this.createjs||{},function{"use strict";function t{this.AbstractPlugin_constructor,this._capabilities=n._capabilities,this._loaderClass=createjs.SoundLoader,this._soundInstanceClass=createjs.HTMLAudioSoundInstance}var e=createjs.extend(t,createjs.AbstractPlugin),n=t;n.MAX_INSTANCES=30,n._AUDIO_READY="canplaythrough",n._AUDIO_ENDED="ended",n._AUDIO_SEEKED="seeked",n._AUDIO_STALLED="stalled",n._TIME_UPDATE="timeupdate",n._capabilities=null,n.isSupported=function{return n._generateCapabilities,null!=n._capabilities},n._generateCapabilities=function{if(null==n._capabilities){var t=document.createElement("audio");if(null==t.canPlayType)return null;n._capabilities={panning:!1,volume:!0,tracks:-1};for(var e=createjs.Sound.SUPPORTED_EXTENSIONS,r=createjs.Sound.EXTENSION_MAP,i=0,o=e.length;i<o;i++){var a=e[i],s=r[a]||a;n._capabilities[a]="no"!=t.canPlayType("audio/"+a)&&""!=t.canPlayType("audio/"+a)||"no"!=t.canPlayType("audio/"+s)&&""!=t.canPlayType("audio/"+s)}}},e.register=function(t){var e=createjs.HTMLAudioTagPool.get(t.src),n=this.AbstractPlugin_register(t);return n.setTag(e),n},e.removeSound=function(t){this.AbstractPlugin_removeSound(t),createjs.HTMLAudioTagPool.remove(t)},e.create=function(t,e,n){var r=this.AbstractPlugin_create(t,e,n);return r.playbackResource=null,r},e.toString=function{return"[HTMLAudioPlugin]"},e.setVolume=e.getVolume=e.setMute=null,createjs.HTMLAudioPlugin=createjs.promote(t,"AbstractPlugin")},t.exports=createjs}).call(window)},function(t,e){"function"==typeof Object.create?t.exports=function(t,e){t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})}:t.exports=function(t,e){t.super_=e;var n=function{};n.prototype=e.prototype,t.prototype=new n,t.prototype.constructor=t}},function(t,e){var n={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==n.call(t)}},function(t,e,n){(function(e){(function{var n,r,i,o,a,s;"undefined"!=typeof performance&&null!==performance&&performance.now?t.exports=function{return performance.now}:void 0!==e&&null!==e&&e.hrtime?(t.exports=function{return(n-a)/1e6},r=e.hrtime,n=function{var t;return t=r,1e9*t[0]+t[1]},o=n,s=1e9*e.uptime,a=o-s):Date.now?(t.exports=function{return Date.now-i},i=Date.now):(t.exports=function{return(new Date).getTime-i},i=(new Date).getTime)}).call(this)}).call(e,n(20))},function(t,e){t.exports=function(t){return t&&"object"==typeof t&&"function"==typeof t.copy&&"function"==typeof t.fill&&"function"==typeof t.readUInt8}},function(t,e,n){(function(t,r){function i(t,n){var r={seen:[],stylize:a};return arguments.length>=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),g(n)?r.showHidden=n:n&&e._extend(r,n),x(r.showHidden)&&(r.showHidden=!1),x(r.depth)&&(r.depth=2),x(r.colors)&&(r.colors=!1),x(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=o),u(r,t,r.depth)}function o(t,e){var n=i.styles[e];return n?"�["+i.colors[n][0]+"m"+t+"�["+i.colors[n][1]+"m":t}function a(t,e){return t}function s(t){var e={};return t.forEach(function(t,n){e[t]=!0}),e}function u(t,n,r){if(t.customInspect&&n&&P(n.inspect)&&n.inspect!==e.inspect&&(!n.constructor||n.constructor.prototype!==n)){var i=n.inspect(r,t);return _(i)||(i=u(t,i,r)),i}var o=l(t,n);if(o)return o;var a=Object.keys(n),g=s(a);if(t.showHidden&&(a=Object.getOwnPropertyNames(n)),E(n)&&(a.indexOf("message")>=0||a.indexOf("description")>=0))return c(n);if(0===a.length){if(P(n)){var m=n.name?": "+n.name:"";return t.stylize("[Function"+m+"]","special")}if(w(n))return t.stylize(RegExp.prototype.toString.call(n),"regexp");if(S(n))return t.stylize(Date.prototype.toString.call(n),"date");if(E(n))return c(n)}var v="",y=!1,b=["{","}"];if(f(n)&&(y=!0,b=["[","]"]),P(n)){v=" [Function"+(n.name?": "+n.name:"")+"]"}if(w(n)&&(v=" "+RegExp.prototype.toString.call(n)),S(n)&&(v=" "+Date.prototype.toUTCString.call(n)),E(n)&&(v=" "+c(n)),0===a.length&&(!y||0==n.length))return b[0]+v+b[1];if(r<0)return w(n)?t.stylize(RegExp.prototype.toString.call(n),"regexp"):t.stylize("[Object]","special");t.seen.push(n);var x;return x=y?h(t,n,r,g,a):a.map(function(e){return d(t,n,r,g,e,y)}),t.seen.pop,p(x,v,b)}function l(t,e){if(x(e))return t.stylize("undefined","undefined");if(_(e)){var n="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return t.stylize(n,"string")}return y(e)?t.stylize(""+e,"number"):g(e)?t.stylize(""+e,"boolean"):m(e)?t.stylize("null","null"):void 0}function c(t){return"["+Error.prototype.toString.call(t)+"]"}function h(t,e,n,r,i){for(var o=[],a=0,s=e.length;a<s;++a)I(e,String(a))?o.push(d(t,e,n,r,String(a),!0)):o.push("");return i.forEach(function(i){i.match(/^\d+$/)||o.push(d(t,e,n,r,i,!0))}),o}function d(t,e,n,r,i,o){var a,s,l;if(l=Object.getOwnPropertyDescriptor(e,i)||{value:e[i]},l.get?s=l.set?t.stylize("[Getter/Setter]","special"):t.stylize("[Getter]","special"):l.set&&(s=t.stylize("[Setter]","special")),I(r,i)||(a="["+i+"]"),s||(t.seen.indexOf(l.value)<0?(s=m(n)?u(t,l.value,null):u(t,l.value,n-1),s.indexOf("\n")>-1&&(s=o?s.split("\n").map(function(t){return" "+t}).join("\n").substr(2):"\n"+s.split("\n").map(function(t){return"   "+t}).join("\n"))):s=t.stylize("[Circular]","special")),x(a)){if(o&&i.match(/^\d+$/))return s;a=JSON.stringify(""+i),a.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(a=a.substr(1,a.length-2),a=t.stylize(a,"name")):(a=a.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),a=t.stylize(a,"string"))}return a+": "+s}function p(t,e,n){var r=0;return t.reduce(function(t,e){return r++,e.indexOf("\n")>=0&&r++,t+e.replace(/\u001b\[\d\d?m/g,"").length+1},0)>60?n[0]+(""===e?"":e+"\n ")+" "+t.join(",\n  ")+" "+n[1]:n[0]+e+" "+t.join(", ")+" "+n[1]}function f(t){return Array.isArray(t)}function g(t){return"boolean"==typeof t}function m(t){return null===t}function v(t){return null==t}function y(t){return"number"==typeof t}function _(t){return"string"==typeof t}function b(t){return"symbol"==typeof t}function x(t){return void 0===t}function w(t){return T(t)&&"[object RegExp]"===C(t)}function T(t){return"object"==typeof t&&null!==t}function S(t){return T(t)&&"[object Date]"===C(t)}function E(t){return T(t)&&("[object Error]"===C(t)||t instanceof Error)}function P(t){return"function"==typeof t}function M(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||void 0===t}function C(t){return Object.prototype.toString.call(t)}function A(t){return t<10?"0"+t.toString(10):t.toString(10)}function O{var t=new Date,e=[A(t.getHours),A(t.getMinutes),A(t.getSeconds)].join(":");return[t.getDate,L[t.getMonth],e].join(" ")}function I(t,e){return Object.prototype.hasOwnProperty.call(t,e)}var k=/%[sdj%]/g;e.format=function(t){if(!_(t)){for(var e=[],n=0;n<arguments.length;n++)e.push(i(arguments[n]));return e.join(" ")}for(var n=1,r=arguments,o=r.length,a=String(t).replace(k,function(t){if("%%"===t)return"%";if(n>=o)return t;switch(t){case"%s":return String(r[n++]);case"%d":return Number(r[n++]);case"%j":try{return JSON.stringify(r[n++])}catch(t){return"[Circular]"}default:return t}}),s=r[n];n<o;s=r[++n])m(s)||!T(s)?a+=" "+s:a+=" "+i(s);return a},e.deprecate=function(n,i){function o{if(!a){if(r.throwDeprecation)throw new Error(i);r.traceDeprecation?console.trace(i):console.error(i),a=!0}return n.apply(this,arguments)}if(x(t.process))return function{return e.deprecate(n,i).apply(this,arguments)};if(!0===r.noDeprecation)return n;var a=!1;return o};var R,D={};e.debuglog=function(t){if(x(R)&&(R=n.i({NODE_ENV:"production"}).NODE_DEBUG||""),t=t.toUpperCase,!D[t])if(new RegExp("\\b"+t+"\\b","i").test(R)){var i=r.pid;D[t]=function{var n=e.format.apply(e,arguments);console.error("%s %d: %s",t,i,n)}}else D[t]=function{};return D[t]},e.inspect=i,i.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},i.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},e.isArray=f,e.isBoolean=g,e.isNull=m,e.isNullOrUndefined=v,e.isNumber=y,e.isString=_,e.isSymbol=b,e.isUndefined=x,e.isRegExp=w,e.isObject=T,e.isDate=S,e.isError=E,e.isFunction=P,e.isPrimitive=M,e.isBuffer=n(56);var L=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];e.log=function{console.log("%s - %s",O,e.format.apply(e,arguments))},e.inherits=n(53),e._extend=function(t,e){if(!e||!T(e))return t;for(var n=Object.keys(e),r=n.length;r--;)t[n[r]]=e[n[r]];return t}}).call(e,n(9),n(20))},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function{},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function{return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function{return t.i}}),t.webpackPolyfill=1),t}}]); //# sourceMappingURL=app_ea91a5d4.js.map
 * The buffer module from node.js,for the browser.**@author Feross Aboukhadijeh<feross@feross.org><http:*@license MIT*/
 * SoundJS
 * Visit http://createjs.com/ for documentation, updates and examples.
 * Copyright (c) 2010 gskinner.com, inc.
 * Permission is hereby granted, free of charge, to any person
 * obtaining a copy of this software and associated documentation
 * files (the "Software"), to deal in the Software without
 * restriction, including without limitation the rights to use,
 * copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the
 * Software is furnished to do so, subject to the following
 * conditions:
 * The above copyright notice and this permission notice shall be
 * included in all copies or substantial portions of the Software.
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
 * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
 * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
 * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
 * OTHER DEALINGS IN THE SOFTWARE.
 * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
 * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
 * OTHER DEALINGS IN THE SOFTWARE.