All Downloads are FREE. Search and download functionalities are using the official Maven repository.

view.lib.player.js Maven / Gradle / Ivy

!function(t){function e(e){for(var r,i,o=e[0],s=e[1],a=0,u=[];a 

0/0
0/0
 
'},"/XPn":function(t){t.exports={cgPlayer:{gameInformation:"Informations sur la partie :",outputStream:"Sortie standard :",errorStream:"Sortie d'erreur :",gameParameters:"Paramètres de la partie :",speed:"VITESSE",quality:"QUALITÉ",ToolTipIcons:{options:"Options",replay:"Revoir et partager",fullscreen:"Plein écran",extract:"Extraire"},share:"Partager ce replay"}}},"14ch":function(t,e){t.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA0AAAAMCAYAAAC5tzfZAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyZpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMDY3IDc5LjE1Nzc0NywgMjAxNS8wMy8zMC0yMzo0MDo0MiAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTUgKFdpbmRvd3MpIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOjc5M0FFRjVDNUQxNTExRTVBMzEwQkFBQjJGMEUyM0RGIiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOjc5M0FFRjVENUQxNTExRTVBMzEwQkFBQjJGMEUyM0RGIj4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6NzkzQUVGNUE1RDE1MTFFNUEzMTBCQUFCMkYwRTIzREYiIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6NzkzQUVGNUI1RDE1MTFFNUEzMTBCQUFCMkYwRTIzREYiLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz4P5XNmAAAAe0lEQVR42mL8//8/AxowAOIiIGZkwA56WbAIXgDitUBcg0MjDxMO0zYCcQsQ/8cmiUsTTOM+UjXFArEzlP2fGE0gDflQ9kQMp4JCDw3HAvEZKI5FEvcH4tNAbEOsBmSN1qRogGEmUjWAMYjwI0UDTJMQEK8iVgMIAwQYANRiBg5b26e2AAAAAElFTkSuQmCC"},"1TEc":function(t,e){(function(t,e){function r(t,e,n,i){r._super_.call(this),this.reset(t,e,n,i)}function n(t,e,r,i){n._super_.call(this),this.x=t,this.y=e,this.width=r,this.height=i}function i(t,e){i._super_.call(this),this.x=t,this.y=e}function o(t,e,r){o._super_.call(this),this.x=t,this.y=e,this.radius=r,this.angle=0,this.center={x:this.x,y:this.y}}function s(t,e,r,n,i){s._super_.call(this),r-t>=0?(this.x1=t,this.y1=e,this.x2=r,this.y2=n):(this.x1=r,this.y1=n,this.x2=t,this.y2=e),this.dx=this.x2-this.x1,this.dy=this.y2-this.y1,this.minx=Math.min(this.x1,this.x2),this.miny=Math.min(this.y1,this.y2),this.maxx=Math.max(this.x1,this.x2),this.maxy=Math.max(this.y1,this.y2),this.dot=this.x2*this.y1-this.x1*this.y2,this.xxyy=this.dx*this.dx+this.dy*this.dy,this.gradient=this.getGradient(),this.length=this.getLength(),this.direction=Y.Util.initValue(i,">")}function a(){this.vector=new Y.Vector2D(0,0),this.random=0,this.crossType="dead",this.alert=!0}function l(t,e){l._super_.call(this,t,e),this.gl=this.element.getContext("experimental-webgl",{antialias:!0,stencil:!1,depth:!1}),this.gl||alert("Sorry your browser do not suppest WebGL!"),this.initVar(),this.setMaxRadius(),this.initShaders(),this.initBuffers(),this.gl.blendEquation(this.gl.FUNC_ADD),this.gl.blendFunc(this.gl.SRC_ALPHA,this.gl.ONE_MINUS_SRC_ALPHA),this.gl.enable(this.gl.BLEND)}function u(t,e,r){u._super_.call(this,t,e),this.context=this.element.getContext("2d"),this.imageData=null,this.rectangle=null,this.rectangle=r,this.createImageData(r)}function h(t,e){h._super_.call(this,t,e),this.stroke=null,this.context=this.element.getContext("2d"),this.bufferCache={}}function c(t,e,r){c._super_.call(this,t,e),this.stroke=r}function p(t,e){p._super_.call(this,t,e),this.stroke=null}function d(t,e,r){this.proton=t,this.element=e,this.stroke=r}function f(t,e,r){this.element=r,this.type=Y.Util.initValue(t,"canvas"),this.proton=e,this.renderer=this.getRenderer()}function g(e,r,n){this.mouseTarget=Y.Util.initValue(e,t),this.ease=Y.Util.initValue(r,.7),this._allowEmitting=!1,this.initEventHandler(),g._super_.call(this,n)}function v(t){this.selfBehaviours=[],v._super_.call(this,t)}function m(t){this.initializes=[],this.particles=[],this.behaviours=[],this.emitTime=0,this.emitTotalTimes=-1,this.damping=.006,this.bindEmitter=!0,this.rate=new Y.Rate(1,.1),m._super_.call(this,t),this.id="emitter_"+m.ID++}function y(t,e,r,n){y._super_.call(this,r,n),this.distanceVec=new Y.Vector2D,this.centerPoint=Y.Util.initValue(t,new Y.Vector2D),this.force=Y.Util.initValue(this.normalizeValue(e),100),this.name="GravityWell"}function x(t,e,r,n){x._super_.call(this,r,n),this.reset(t,e),this.name="Color"}function b(t,e,r,n,i){b._super_.call(this,n,i),this.reset(t,e,r),this.name="Rotate"}function _(t,e,r,n){_._super_.call(this,r,n),this.reset(t,e),this.name="Scale"}function T(t,e,r,n){T._super_.call(this,r,n),this.reset(t,e),this.name="Alpha"}function w(t,e,r,n){w._super_.call(this,r,n),this.reset(t,e),this.name="CrossZone"}function E(t,e,r,n,i){E._super_.call(this,n,i),this.reset(t,e,r),this.name="Collision"}function S(t,e,r){S._super_.call(this,0,t,e,r),this.name="Gravity"}function A(t,e,r,n,i){A._super_.call(this,t,e,r,n,i),this.force*=-1,this.name="Repulsion"}function C(t,e,r,n,i){C._super_.call(this,n,i),this.reset(t,e,r),this.time=0,this.name="RandomDrift"}function M(t,e,r,n,i){M._super_.call(this,n,i),this.targetPosition=Y.Util.initValue(t,new Y.Vector2D),this.radius=Y.Util.initValue(r,1e3),this.force=Y.Util.initValue(this.normalizeValue(e),100),this.radiusSq=this.radius*this.radius,this.attractionForce=new Y.Vector2D,this.lengthSq=0,this.name="Attraction"}function R(t,e,r,n){R._super_.call(this,r,n),this.force=this.normalizeForce(new Y.Vector2D(t,e)),this.name="Force"}function O(t,e,r){O._super_.call(this),this.image=this.setSpanValue(t),this.w=Y.Util.initValue(e,20),this.h=Y.Util.initValue(r,this.w)}function P(t,e,r){P._super_.call(this),this.radius=Y.Util.setSpanValue(t,e,r)}function D(t,e,r){D._super_.call(this),this.massPan=Y.Util.setSpanValue(t,e,r)}function I(t,e,r){I._super_.call(this),this.rPan=Y.Util.setSpanValue(t),this.thaPan=Y.Util.setSpanValue(e),this.type=Y.Util.initValue(r,"vector")}function L(t){L._super_.call(this),this.zone=Y.Util.initValue(t,new Y.PointZone)}function F(t,e,r){F._super_.call(this),this.lifePan=Y.Util.setSpanValue(t,e,r)}function B(){}function k(t,e){this.numPan=Y.Util.initValue(t,1),this.timePan=Y.Util.initValue(e,1),this.numPan=Y.Util.setSpanValue(this.numPan),this.timePan=Y.Util.setSpanValue(this.timePan),this.startTime=0,this.nextTime=0,this.init()}function N(t,e){this.id="Behaviour_"+N.id++,this.life=Y.Util.initValue(t,1/0),this.easing=Y.ease.setEasingByName(e),this.age=0,this.energy=1,this.dead=!1,this.parents=[],this.name="Behaviour"}function $(t,e,r,n){this.x=t,this.y=e,this.width=r,this.height=n,this.bottom=this.y+this.height,this.right=this.x+this.width}function U(t){Y.Util.isArray(t)?this.colorArr=t:this.colorArr=[t]}function j(t,e,r){this.isArray=!1,Y.Util.isArray(t)?(this.isArray=!0,this.a=t):(this.a=Y.Util.initValue(t,1),this.b=Y.Util.initValue(e,this.a),this.center=Y.Util.initValue(r,!1))}function G(t,e){this.proParticleCount=Y.Util.initValue(t,0),this.releaseTime=Y.Util.initValue(e,-1),this.poolList=[],this.timeoutID=0;for(var r=0;r0&&(this.timeoutID=setTimeout(this.release,this.releaseTime/1e3))}function W(t){this.id="particle_"+W.ID++,this.reset(!0),Y.Util.setPrototypeByObject(this,t)}function V(){this.mats=[],this.size=0;for(var t=0;t<20;t++)this.mats.push(Y.Mat3.create([0,0,0,0,0,0,0,0,0]))}function z(){this.initialize()}function Y(t,e){this.proParticleCount=Y.Util.initValue(t,Y.POOL_MAX),this.integrationType=Y.Util.initValue(e,Y.EULER),this.emitters=[],this.renderers=[],this.time=0,this.oldTime=0,Y.pool=new Y.ParticlePool(this.proParticleCount),Y.integrator=new Y.NumericalIntegration(this.integrationType)}Y.POOL_MAX=1e3,Y.TIME_STEP=60,Y.MEASURE=100,Y.EULER="euler",Y.RK2="runge-kutta2",Y.RK4="runge-kutta4",Y.VERLET="verlet",Y.PARTICLE_CREATED="partilcleCreated",Y.PARTICLE_UPDATE="partilcleUpdate",Y.PARTICLE_SLEEP="particleSleep",Y.PARTICLE_DEAD="partilcleDead",Y.PROTON_UPDATE="protonUpdate",Y.PROTON_UPDATE_AFTER="protonUpdateAfter",Y.EMITTER_ADDED="emitterAdded",Y.EMITTER_REMOVED="emitterRemoved",Y.amendChangeTabsBug=!0,Y.TextureBuffer={},Y.TextureCanvasBuffer={},Y.prototype={addRender:function(t){t.proton=this,this.renderers.push(t.proton)},addEmitter:function(t){this.emitters.push(t),t.parent=this,this.dispatchEvent(new Y.Event({type:Y.EMITTER_ADDED,emitter:t}))},removeEmitter:function(t){var e=this.emitters.indexOf(t);this.emitters.splice(e,1),t.parent=null,this.dispatchEvent(new Y.Event({type:Y.EMITTER_REMOVED,emitter:t}))},update:function(){this.dispatchEvent(new Y.Event({type:Y.PROTON_UPDATE})),this.oldTime||(this.oldTime=(new Date).getTime());var t=(new Date).getTime();if(this.elapsed=(t-this.oldTime)/1e3,Y.amendChangeTabsBug&&this.amendChangeTabsBug(),this.oldTime=t,this.elapsed>0)for(var e=0;e.5&&(this.oldTime=(new Date).getTime(),this.elapsed=0)},getCount:function(){for(var t=0,e=this.emitters.length,r=0;r>e;return t+1},makeTranslation:function(t,e){return[1,0,0,0,1,0,t,e,1]},makeRotation:function(t){var e=Math.cos(t),r=Math.sin(t);return[e,-r,0,r,e,0,0,0,1]},makeScale:function(t,e){return[t,0,0,0,e,0,0,0,1]},matrixMultiply:function(t,e){var r=t[0],n=t[1],i=t[2],o=t[3],s=t[4],a=t[5],l=t[6],u=t[7],h=t[8],c=e[0],p=e[1],d=e[2],f=e[3],g=e[4],v=e[5],m=e[6],y=e[7],x=e[8];return[r*c+n*f+i*m,r*p+n*g+i*y,r*d+n*v+i*x,o*c+s*f+a*m,o*p+s*g+a*y,o*d+s*v+a*x,l*c+u*f+h*m,l*p+u*g+h*y,l*d+u*v+h*x]}};Y.WebGLUtil=q;var Z=Z||{createCanvas:function(t,e,r,n){var i=document.createElement("canvas"),o=n||"absolute";return i.id=t,i.width=e,i.height=r,i.style.position=o,i.style.opacity=0,this.transformDom(i,-500,-500,0,0),i},transformDom:function(t,e,r,n,i){t.style.WebkitTransform="translate("+e+"px, "+r+"px) scale("+n+") rotate("+i+"deg)",t.style.MozTransform="translate("+e+"px, "+r+"px) scale("+n+") rotate("+i+"deg)",t.style.OTransform="translate("+e+"px, "+r+"px) scale("+n+") rotate("+i+"deg)",t.style.msTransform="translate("+e+"px, "+r+"px) scale("+n+") rotate("+i+"deg)",t.style.transform="translate("+e+"px, "+r+"px) scale("+n+") rotate("+i+"deg)"}};Y.DomUtil=Z,V.prototype.set=function(t,e){0==e?Y.Mat3.set(t,this.mats[0]):Y.Mat3.multiply(this.mats[e-1],t,this.mats[e]),this.size=Math.max(this.size,e+1)},V.prototype.push=function(t){0==this.size?Y.Mat3.set(t,this.mats[0]):Y.Mat3.multiply(this.mats[this.size-1],t,this.mats[this.size]),this.size++},V.prototype.pop=function(){this.size>0&&this.size--},V.prototype.top=function(){return this.mats[this.size-1]},Y.MStack=V,W.ID=0,W.prototype={getDirection:function(){return Math.atan2(this.v.x,-this.v.y)*(180/Math.PI)},reset:function(t){return this.life=1/0,this.age=0,this.energy=1,this.dead=!1,this.sleep=!1,this.target=null,this.sprite=null,this.parent=null,this.mass=1,this.radius=10,this.alpha=1,this.scale=1,this.rotation=0,this.color=null,this.easing=Y.ease.setEasingByName(Y.easeLinear),t?(this.transform={},this.p=new Y.Vector2D,this.v=new Y.Vector2D,this.a=new Y.Vector2D,this.old={p:new Y.Vector2D,v:new Y.Vector2D,a:new Y.Vector2D},this.behaviours=[]):(Y.Util.destroyObject(this.transform),this.p.set(0,0),this.v.set(0,0),this.a.set(0,0),this.old.p.set(0,0),this.old.v.set(0,0),this.old.a.set(0,0),this.removeAllBehaviours()),this.transform.rgb={r:255,g:255,b:255},this},update:function(t,e){if(!this.sleep){this.age+=t;var r,n=this.behaviours.length;for(r=0;r=this.life)this.destory();else{var i=this.easing(this.age/this.life);this.energy=Math.max(1-i,0)}},addBehaviour:function(t){this.behaviours.push(t),t.hasOwnProperty("parents")&&t.parents.push(this),t.initialize(this)},addBehaviours:function(t){var e,r=t.length;for(e=0;e-1&&((t=this.behaviours.splice(e,1)).parents=null)},removeAllBehaviours:function(){Y.Util.destroyArray(this.behaviours)},destory:function(){this.removeAllBehaviours(),this.energy=0,this.dead=!0,this.parent=null}},Y.Particle=W,G.prototype={create:function(t){return t?new newTypeParticle:new Y.Particle},getCount:function(){return this.poolList.length},add:function(){return this.poolList.push(this.create())},get:function(){return 0===this.poolList.length?this.create():this.poolList.pop().reset()},set:function(t){if(this.poolList.length0?Math.PI/2:this.y<0?-Math.PI/2:void 0},getComponent:function(t){switch(t){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+t)}},copy:function(t){return this.x=t.x,this.y=t.y,this},add:function(t,r){return r!==e?this.addVectors(t,r):(this.x+=t.x,this.y+=t.y,this)},addXY:function(t,e){return this.x+=t,this.y+=e,this},addVectors:function(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this},addScalar:function(t){return this.x+=t,this.y+=t,this},sub:function(t,r){return r!==e?this.subVectors(t,r):(this.x-=t.x,this.y-=t.y,this)},subVectors:function(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this},multiplyScalar:function(t){return this.x*=t,this.y*=t,this},divideScalar:function(t){return 0!==t?(this.x/=t,this.y/=t):this.set(0,0),this},min:function(t){return this.x>t.x&&(this.x=t.x),this.y>t.y&&(this.y=t.y),this},max:function(t){return this.xe.x&&(this.x=e.x),this.ye.y&&(this.y=e.y),this},negate:function(){return this.multiplyScalar(-1)},dot:function(t){return this.x*t.x+this.y*t.y},lengthSq:function(){return this.x*this.x+this.y*this.y},length:function(){return Math.sqrt(this.x*this.x+this.y*this.y)},normalize:function(){return this.divideScalar(this.length())},distanceTo:function(t){return Math.sqrt(this.distanceToSquared(t))},rotate:function(t){var e=this.x,r=this.y;return this.x=e*Math.cos(t)+r*Math.sin(t),this.y=-e*Math.sin(t)+r*Math.cos(t),this},distanceToSquared:function(t){var e=this.x-t.x,r=this.y-t.y;return e*e+r*r},setLength:function(t){var e=this.length();return 0!==e&&t!==e&&this.multiplyScalar(t/e),this},lerp:function(t,e){return this.x+=(t.x-this.x)*e,this.y+=(t.y-this.y)*e,this},equals:function(t){return t.x===this.x&&t.y===this.y},toArray:function(){return[this.x,this.y]},clear:function(){return this.x=0,this.y=0,this},clone:function(){return new Y.Vector2D(this.x,this.y)}},Y.Vector2D=K;var tt=function(t,e){this.r=Math.abs(t)||0,this.tha=e||0};tt.prototype={set:function(t,e){return this.r=t,this.tha=e,this},setR:function(t){return this.r=t,this},setTha:function(t){return this.tha=t,this},copy:function(t){return this.r=t.r,this.tha=t.tha,this},toVector:function(){return new Y.Vector2D(this.getX(),this.getY())},getX:function(){return this.r*Math.sin(this.tha)},getY:function(){return-this.r*Math.cos(this.tha)},normalize:function(){return this.r=1,this},equals:function(t){return t.r===this.r&&t.tha===this.tha},toArray:function(){return[this.r,this.tha]},clear:function(){return this.r=0,this.tha=0,this},clone:function(){return new Y.Polar2D(this.r,this.tha)}},Y.Polar2D=tt,j.prototype={getValue:function(t){return this.isArray?this.a[Math.floor(this.a.length*Math.random())]:this.center?Y.MathUtils.randomFloating(this.a,this.b,t):Y.MathUtils.randomAToB(this.a,this.b,t)}},Y.Span=j,Y.getSpan=function(t,e,r){return new Y.Span(t,e,r)},Y.Util.inherits(U,Y.Span),U.prototype.getValue=function(){var t=this.colorArr[Math.floor(this.colorArr.length*Math.random())];return"random"==t||"Random"==t?Y.MathUtils.randomColor():t},Y.ColorSpan=U,$.prototype={contains:function(t,e){return t<=this.right&&t>=this.x&&e<=this.bottom&&e>=this.y}},Y.Rectangle=$;var et=et||{create:function(t){var e=new Float32Array(9);return t&&this.set(t,e),e},set:function(t,e){for(var r=0;r<9;r++)e[r]=t[r];return e},multiply:function(t,e,r){var n=t[0],i=t[1],o=t[2],s=t[3],a=t[4],l=t[6],u=t[7],h=e[0],c=e[1],p=e[2],d=e[3],f=e[4],g=e[6],v=e[7];return r[0]=h*n+c*s,r[1]=h*i+c*a,r[2]=o*p,r[3]=d*n+f*s,r[4]=d*i+f*a,r[6]=g*n+v*s+l,r[7]=g*i+v*a+u,r},inverse:function(t,e){var r,n=t[0],i=t[1],o=t[3],s=t[4],a=t[6],l=t[7],u=s,h=-o,c=l*o-s*a;return r=1/(n*u+i*h),e[0]=u*r,e[1]=-i*r,e[3]=h*r,e[4]=n*r,e[6]=c*r,e[7]=(-l*n+i*a)*r,e},multiplyVec2:function(t,e,r){var n=e[0],i=e[1];return r[0]=n*t[0]+i*t[3]+t[6],r[1]=n*t[1]+i*t[4]+t[7],r}};Y.Mat3=et,N.id=0,N.prototype={reset:function(t,e){this.life=Y.Util.initValue(t,1/0),this.easing=Y.Util.initValue(e,Y.ease.setEasingByName(Y.easeLinear))},normalizeForce:function(t){return t.multiplyScalar(Y.MEASURE)},normalizeValue:function(t){return t*Y.MEASURE},initialize:function(t){},applyBehaviour:function(t,e,r){if(this.age+=e,this.age>=this.life||this.dead)this.energy=0,this.dead=!0,this.destory();else{var n=this.easing(t.age/t.life);this.energy=Math.max(1-n,0)}},destory:function(){var t,e=this.parents.length;for(t=0;t=this.nextTime?(this.startTime=0,this.nextTime=this.timePan.getValue(),1==this.numPan.b?this.numPan.getValue(!1)>.5?1:0:this.numPan.getValue(!0)):0}},Y.Rate=k,B.prototype.reset=function(){},B.prototype.init=function(t,e){e?this.initialize(e):this.initialize(t)},B.prototype.initialize=function(t){},Y.Initialize=B;var rt={initialize:function(t,e,r){var n,i=r.length;for(n=0;n4e-6&&this.lengthSq=this.delay&&(t.a.addXY(Y.MathUtils.randomAToB(-this.panFoce.x,this.panFoce.x),Y.MathUtils.randomAToB(-this.panFoce.y,this.panFoce.y)),this.time=0)},Y.RandomDrift=C,Y.Util.inherits(A,Y.Attraction),A.prototype.reset=function(t,e,r,n,i){A._super_.prototype.reset.call(this,t,e,r,n,i),this.force*=-1},Y.Repulsion=A,Y.Util.inherits(S,Y.Force),S.prototype.reset=function(t,e,r){S._super_.prototype.reset.call(this,0,t,e,r)},Y.Gravity=S,Y.G=S,Y.Util.inherits(E,Y.Behaviour),E.prototype.reset=function(t,e,r,n,i){this.emitter=Y.Util.initValue(t,null),this.mass=Y.Util.initValue(e,!0),this.callback=Y.Util.initValue(r,null),this.collisionPool=[],this.delta=new Y.Vector2D,n&&E._super_.prototype.reset.call(this,n,i)},E.prototype.applyBehaviour=function(t,e,r){for(var n,i,o,s,a,l=this.emitter?this.emitter.particles.slice(r):this.pool.slice(r),u=l.length,h=0;h-1&&this.initializes.splice(e,1)},m.prototype.removeInitializers=function(){Y.Util.destroyArray(this.initializes)},m.prototype.addBehaviour=function(){var t,e=arguments.length;for(t=0;t-1&&this.behaviours.splice(e,1)},m.prototype.removeAllBehaviours=function(){Y.Util.destroyArray(this.behaviours)},m.prototype.integrate=function(t){var e=1-this.damping;Y.integrator.integrate(this,t,e);var r,n=this.particles.length;for(r=0;r=this.life||this.dead)&&this.destroy(),this.emitting(t),this.integrate(t),r=this.particles.length-1;r>=0;r--)(e=this.particles[r]).dead&&(Y.pool.set(e),this.particles.splice(r,1),this.dispatchEvent(new Y.Event({type:Y.PARTICLE_DEAD,particle:e})))},m.prototype.setupParticle=function(t,e,r){var n=this.initializes,i=this.behaviours;e&&(n=e instanceof Array?e:[e]),r&&(i=r instanceof Array?r:[r]),Y.InitializeUtil.initialize(this,t,n),t.addBehaviours(i),t.parent=this,this.particles.push(t)},m.prototype.destroy=function(){this.dead=!0,this.emitTotalTimes=-1,0==this.particles.length&&(this.removeInitializers(),this.removeAllBehaviours(),this.parent&&this.parent.removeEmitter(this))},Y.Emitter=m,Y.Util.inherits(v,Y.Emitter),v.prototype.addSelfBehaviour=function(){var t,e=arguments.length;for(t=0;t-1&&this.selfBehaviours.splice(e,1)},v.prototype.update=function(t){if(v._super_.prototype.update.call(this,t),!this.sleep){var e,r=this.selfBehaviours.length;for(e=0;ethis.element.width||r<0||r>this.elementwidth)){var o=4*((r>>0)*t.width+(e>>0));t.data[o]=i.r,t.data[o+1]=i.g,t.data[o+2]=i.b,t.data[o+3]=255*n.alpha}},u.prototype.onParticleDead=function(t){},Y.PixelRender=u,Y.Util.inherits(l,Y.BaseRender),l.prototype.resize=function(t,e){this.umat[4]=-2,this.umat[7]=1,this.smat[0]=1/t,this.smat[4]=1/e,this.mstack.set(this.umat,0),this.mstack.set(this.smat,1),this.gl.viewport(0,0,t,e),this.element.width=t,this.element.height=e},l.prototype.setMaxRadius=function(t){this.circleCanvasURL=this.createCircle(t)},l.prototype.getVertexShader=function(){return["uniform vec2 viewport;","attribute vec2 aVertexPosition;","attribute vec2 aTextureCoord;","uniform mat3 tMat;","varying vec2 vTextureCoord;","varying float alpha;","void main() {","vec3 v = tMat * vec3(aVertexPosition, 1.0);","gl_Position = vec4(v.x, v.y, 0, 1);","vTextureCoord = aTextureCoord;","alpha = tMat[0][2];","}"].join("\n")},l.prototype.getFragmentShader=function(){return["precision mediump float;","varying vec2 vTextureCoord;","varying float alpha;","uniform sampler2D uSampler;","uniform vec4 color;","uniform bool useTexture;","uniform vec3 uColor;","void main() {","vec4 textureColor = texture2D(uSampler, vTextureCoord);","gl_FragColor = textureColor * vec4(uColor, 1.0);","gl_FragColor.w *= alpha;","}"].join("\n")},l.prototype.initVar=function(){this.mstack=new Y.MStack,this.umat=Y.Mat3.create([2,0,1,0,-2,0,-1,1,1]),this.smat=Y.Mat3.create([.01,0,1,0,.01,0,0,0,1]),this.texturebuffers={}},l.prototype.start=function(){l._super_.prototype.start.call(this),this.resize(this.element.width,this.element.height)},l.prototype.blendEquation=function(t){this.gl.blendEquation(this.gl[t])},l.prototype.blendFunc=function(t,e){this.gl.blendFunc(this.gl[t],this.gl[e])},l.prototype.getShader=function(t,e,r){var n;return n=r?t.createShader(t.FRAGMENT_SHADER):t.createShader(t.VERTEX_SHADER),t.shaderSource(n,e),t.compileShader(n),t.getShaderParameter(n,t.COMPILE_STATUS)?n:(alert(t.getShaderInfoLog(n)),null)},l.prototype.initShaders=function(){var t=this.getShader(this.gl,this.getFragmentShader(),!0),e=this.getShader(this.gl,this.getVertexShader(),!1);this.sprogram=this.gl.createProgram(),this.gl.attachShader(this.sprogram,e),this.gl.attachShader(this.sprogram,t),this.gl.linkProgram(this.sprogram),this.gl.getProgramParameter(this.sprogram,this.gl.LINK_STATUS)||alert("Could not initialise shaders"),this.gl.useProgram(this.sprogram),this.sprogram.vpa=this.gl.getAttribLocation(this.sprogram,"aVertexPosition"),this.sprogram.tca=this.gl.getAttribLocation(this.sprogram,"aTextureCoord"),this.gl.enableVertexAttribArray(this.sprogram.tca),this.gl.enableVertexAttribArray(this.sprogram.vpa),this.sprogram.tMatUniform=this.gl.getUniformLocation(this.sprogram,"tMat"),this.sprogram.samplerUniform=this.gl.getUniformLocation(this.sprogram,"uSampler"),this.sprogram.useTex=this.gl.getUniformLocation(this.sprogram,"useTexture"),this.sprogram.color=this.gl.getUniformLocation(this.sprogram,"uColor"),this.gl.uniform1i(this.sprogram.useTex,1)},l.prototype.initBuffers=function(){this.unitIBuffer=this.gl.createBuffer(),this.gl.bindBuffer(this.gl.ELEMENT_ARRAY_BUFFER,this.unitIBuffer);this.gl.bufferData(this.gl.ELEMENT_ARRAY_BUFFER,new Uint16Array([0,3,1,0,2,3]),this.gl.STATIC_DRAW);for(var t=[],e=0;e<100;e++)t.push(e);for(idx=new Uint16Array(t),this.unitI33=this.gl.createBuffer(),this.gl.bindBuffer(this.gl.ELEMENT_ARRAY_BUFFER,this.unitI33),this.gl.bufferData(this.gl.ELEMENT_ARRAY_BUFFER,idx,this.gl.STATIC_DRAW),t=[],e=0;e<100;e++)t.push(e,e+1,e+2);idx=new Uint16Array(t),this.stripBuffer=this.gl.createBuffer(),this.gl.bindBuffer(this.gl.ELEMENT_ARRAY_BUFFER,this.stripBuffer),this.gl.bufferData(this.gl.ELEMENT_ARRAY_BUFFER,idx,this.gl.STATIC_DRAW)},l.prototype.createCircle=function(t){this.circleCanvasRadius=Y.WebGLUtil.nhpot(Y.Util.initValue(t,32));var e=Y.DomUtil.createCanvas("circle_canvas",2*this.circleCanvasRadius,2*this.circleCanvasRadius),r=e.getContext("2d");return r.beginPath(),r.arc(this.circleCanvasRadius,this.circleCanvasRadius,this.circleCanvasRadius,0,2*Math.PI,!0),r.closePath(),r.fillStyle="#FFF",r.fill(),e.toDataURL()},l.prototype.setImgInCanvas=function(t){var e=t.target.width,r=t.target.height,n=Y.WebGLUtil.nhpot(t.target.width),i=Y.WebGLUtil.nhpot(t.target.height),o=t.target.width/n,s=t.target.height/i;this.texturebuffers[t.transform.src]||(this.texturebuffers[t.transform.src]=[this.gl.createTexture(),this.gl.createBuffer(),this.gl.createBuffer()]),t.transform.texture=this.texturebuffers[t.transform.src][0],t.transform.vcBuffer=this.texturebuffers[t.transform.src][1],t.transform.tcBuffer=this.texturebuffers[t.transform.src][2],this.gl.bindBuffer(this.gl.ARRAY_BUFFER,t.transform.tcBuffer),this.gl.bufferData(this.gl.ARRAY_BUFFER,new Float32Array([0,0,o,0,0,s,s,s]),this.gl.STATIC_DRAW),this.gl.bindBuffer(this.gl.ARRAY_BUFFER,t.transform.vcBuffer),this.gl.bufferData(this.gl.ARRAY_BUFFER,new Float32Array([0,0,e,0,0,r,e,r]),this.gl.STATIC_DRAW);var a=t.transform.canvas.getContext("2d").getImageData(0,0,n,i);this.gl.bindTexture(this.gl.TEXTURE_2D,t.transform.texture),this.gl.texImage2D(this.gl.TEXTURE_2D,0,this.gl.RGBA,this.gl.RGBA,this.gl.UNSIGNED_BYTE,a),this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_MAG_FILTER,this.gl.LINEAR),this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_MIN_FILTER,this.gl.LINEAR_MIPMAP_NEAREST),this.gl.generateMipmap(this.gl.TEXTURE_2D),t.transform.textureLoaded=!0,t.transform.textureWidth=e,t.transform.textureHeight=r},l.prototype.setStroke=function(t,e){},l.prototype.onProtonUpdate=function(){},l.prototype.onParticleCreated=function(t){var e=this;t.transform.textureLoaded=!1,t.transform.tmat=Y.Mat3.create(),t.transform.tmat[8]=1,t.transform.imat=Y.Mat3.create(),t.transform.imat[8]=1,t.target?Y.Util.getImage(t.target,t,!0,function(t){e.setImgInCanvas.call(e,t),t.transform.oldScale=1}):Y.Util.getImage(this.circleCanvasURL,t,!0,function(t){e.setImgInCanvas.call(e,t),t.transform.oldScale=t.radius/e.circleCanvasRadius})},l.prototype.onParticleUpdate=function(t){t.transform.textureLoaded&&(this.updateMatrix(t),this.gl.uniform3f(this.sprogram.color,t.transform.rgb.r/255,t.transform.rgb.g/255,t.transform.rgb.b/255),this.gl.uniformMatrix3fv(this.sprogram.tMatUniform,!1,this.mstack.top()),this.gl.bindBuffer(this.gl.ARRAY_BUFFER,t.transform.vcBuffer),this.gl.vertexAttribPointer(this.sprogram.vpa,2,this.gl.FLOAT,!1,0,0),this.gl.bindBuffer(this.gl.ARRAY_BUFFER,t.transform.tcBuffer),this.gl.vertexAttribPointer(this.sprogram.tca,2,this.gl.FLOAT,!1,0,0),this.gl.bindTexture(this.gl.TEXTURE_2D,t.transform.texture),this.gl.uniform1i(this.sprogram.samplerUniform,0),this.gl.bindBuffer(this.gl.ELEMENT_ARRAY_BUFFER,this.unitIBuffer),this.gl.drawElements(this.gl.TRIANGLES,6,this.gl.UNSIGNED_SHORT,0),this.mstack.pop())},l.prototype.onParticleDead=function(t){},l.prototype.updateMatrix=function(t){var e=Y.WebGLUtil.makeTranslation(-t.transform.textureWidth/2,-t.transform.textureHeight/2),r=Y.WebGLUtil.makeTranslation(t.p.x,t.p.y),n=t.rotation*(Math.PI/180),i=Y.WebGLUtil.makeRotation(n),o=t.scale*t.transform.oldScale,s=Y.WebGLUtil.makeScale(o,o),a=Y.WebGLUtil.matrixMultiply(e,s);a=Y.WebGLUtil.matrixMultiply(a,i),a=Y.WebGLUtil.matrixMultiply(a,r),Y.Mat3.inverse(a,t.transform.imat),a[2]=t.alpha,this.mstack.push(a)},Y.WebGLRender=l,a.prototype={getPosition:function(){},crossing:function(t){}},Y.Zone=a,Y.Util.inherits(s,Y.Zone),s.prototype.getPosition=function(){return this.random=Math.random(),this.vector.x=this.x1+this.random*this.length*Math.cos(this.gradient),this.vector.y=this.y1+this.random*this.length*Math.sin(this.gradient),this.vector},s.prototype.getDirection=function(t,e){var r=this.dy,n=-this.dx;return(r*t+n*e+this.dot)*(0==n?1:n)>0},s.prototype.getDistance=function(t,e){return(this.dy*t+-this.dx*e+this.dot)/Math.sqrt(this.xxyy)},s.prototype.getSymmetric=function(t){var e=t.getGradient(),r=2*(this.getGradient()-e),n=t.x,i=t.y;return t.x=n*Math.cos(r)-i*Math.sin(r),t.y=n*Math.sin(r)+i*Math.cos(r),t},s.prototype.getGradient=function(){return Math.atan2(this.dy,this.dx)},s.prototype.getRange=function(t,e){Math.abs(this.getGradient())<=Math.PI/4?t.p.xthis.minx&&e():t.p.ythis.miny&&e()},s.prototype.getLength=function(){return Math.sqrt(this.dx*this.dx+this.dy*this.dy)},s.prototype.crossing=function(t){var e=this;"dead"==this.crossType?">"==this.direction||"R"==this.direction||"right"==this.direction||"down"==this.direction?this.getRange(t,function(){e.getDirection(t.p.x,t.p.y)&&(t.dead=!0)}):this.getRange(t,function(){e.getDirection(t.p.x,t.p.y)||(t.dead=!0)}):"bound"==this.crossType?this.getRange(t,function(){e.getDistance(t.p.x,t.p.y)<=t.radius&&(0==e.dx?t.v.x*=-1:0==e.dy?t.v.y*=-1:e.getSymmetric(t.v))}):"cross"==this.crossType&&this.alert&&(alert("Sorry lineZone does not support cross method"),this.alert=!1)},Y.LineZone=s,Y.Util.inherits(o,Y.Zone),o.prototype.getPosition=function(){return this.random=Math.random(),this.angle=2*Math.PI*Math.random(),this.vector.x=this.x+this.random*this.radius*Math.cos(this.angle),this.vector.y=this.y+this.random*this.radius*Math.sin(this.angle),this.vector},o.prototype.setCenter=function(t,e){this.center.x=t,this.center.y=e},o.prototype.crossing=function(t){var e=t.p.distanceTo(this.center);"dead"==this.crossType?e-t.radius>this.radius&&(t.dead=!0):"bound"==this.crossType?e+t.radius>=this.radius&&this.getSymmetric(t):"cross"==this.crossType&&this.alert&&(alert("Sorry CircleZone does not support cross method"),this.alert=!1)},o.prototype.getSymmetric=function(t){var e=t.v.getGradient(),r=2*(this.getGradient(t)-e),n=t.v.x,i=t.v.y;t.v.x=n*Math.cos(r)-i*Math.sin(r),t.v.y=n*Math.sin(r)+i*Math.cos(r)},o.prototype.getGradient=function(t){return-Math.PI/2+Math.atan2(t.p.y-this.center.y,t.p.x-this.center.x)},Y.CircleZone=o,Y.Util.inherits(i,Y.Zone),i.prototype.getPosition=function(){return this.vector.x=this.x,this.vector.y=this.y,this.vector},i.prototype.crossing=function(t){this.alert&&(alert("Sorry PointZone does not support crossing method"),this.alert=!1)},Y.PointZone=i,Y.Util.inherits(n,Y.Zone),n.prototype.getPosition=function(){return this.vector.x=this.x+Math.random()*this.width,this.vector.y=this.y+Math.random()*this.height,this.vector},n.prototype.crossing=function(t){"dead"==this.crossType?(t.p.x+t.radiusthis.x+this.width&&(t.dead=!0),t.p.y+t.radiusthis.y+this.height&&(t.dead=!0)):"bound"==this.crossType?(t.p.x-t.radiusthis.x+this.width&&(t.p.x=this.x+this.width-t.radius,t.v.x*=-1),t.p.y-t.radiusthis.y+this.height&&(t.p.y=this.y+this.height-t.radius,t.v.y*=-1)):"cross"==this.crossType&&(t.p.x+t.radiusthis.x+this.width&&t.v.x>=0&&(t.p.x=this.x-t.radius),t.p.y+t.radiusthis.y+this.height&&t.v.y>=0&&(t.p.y=this.y-t.radius))},Y.RectZone=n,Y.Util.inherits(r,Y.Zone),r.prototype.reset=function(t,e,r,n){this.imageData=t,this.x=Y.Util.initValue(e,0),this.y=Y.Util.initValue(r,0),this.d=Y.Util.initValue(n,2),this.vectors=[],this.setVectors()},r.prototype.setVectors=function(){var t,e,r=this.imageData.width,n=this.imageData.height;for(t=0;t>0)*r+(t>>0));this.imageData.data[i+3]>0&&this.vectors.push({x:t+this.x,y:e+this.y})}return this.vector},r.prototype.getBound=function(t,e){var r=4*((e>>0)*this.imageData.width+(t>>0));return this.imageData.data[r+3]>0},r.prototype.getPosition=function(){return this.vector.copy(this.vectors[Math.floor(Math.random()*this.vectors.length)])},r.prototype.getColor=function(t,e){t-=this.x;var r=4*(((e-=this.y)>>0)*this.imageData.width+(t>>0));return{r:this.imageData.data[r],g:this.imageData.data[r+1],b:this.imageData.data[r+2],a:this.imageData.data[r+3]}},r.prototype.crossing=function(t){"dead"==this.crossType?this.getBound(t.p.x-this.x,t.p.y-this.y)?t.dead=!0:t.dead=!1:"bound"==this.crossType&&(this.getBound(t.p.x-this.x,t.p.y-this.y)||t.v.negate())},Y.ImageZone=r;var it=function(){if(t.console&&t.console.log){var e=arguments;if("string"==typeof arguments[0])if(0==arguments[0].indexOf("+")){var r=parseInt(arguments[0]);it.once0)-(t<0)},r.abs=function(t){var e=t>>31;return(t^e)-e},r.min=function(t,e){return e^(t^e)&-(t65535)<<4,e|=r=((t>>>=e)>255)<<3,e|=r=((t>>>=r)>15)<<2,(e|=r=((t>>>=r)>3)<<1)|(t>>>=r)>>1},r.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},r.popCount=function(t){return 16843009*((t=(858993459&(t-=t>>>1&1431655765))+(t>>>2&858993459))+(t>>>4)&252645135)>>>24},r.countTrailingZeros=n,r.nextPow2=function(t){return t+=0===t,--t,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,1+(t|=t>>>16)},r.prevPow2=function(t){return t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,(t|=t>>>16)-(t>>>1)},r.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 r=e,n=e,i=7;for(r>>>=1;r;r>>>=1)n<<=1,n|=1&r,--i;t[e]=n<>>8&255]<<16|i[t>>>16&255]<<8|i[t>>>24&255]},r.interleave2=function(t,e){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t&=65535)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e&=65535)|e<<8))|e<<4))|e<<2))|e<<1))<<1},r.deinterleave2=function(t,e){return(t=65535&((t=16711935&((t=252645135&((t=858993459&((t=t>>>e&1431655765)|t>>>1))|t>>>2))|t>>>4))|t>>>16))<<16>>16},r.interleave3=function(t,e,r){return t=1227133513&((t=3272356035&((t=251719695&((t=4278190335&((t&=1023)|t<<16))|t<<8))|t<<4))|t<<2),(t|=(e=1227133513&((e=3272356035&((e=251719695&((e=4278190335&((e&=1023)|e<<16))|e<<8))|e<<4))|e<<2))<<1)|(r=1227133513&((r=3272356035&((r=251719695&((r=4278190335&((r&=1023)|r<<16))|r<<8))|r<<4))|r<<2))<<2},r.deinterleave3=function(t,e){return(t=1023&((t=4278190335&((t=251719695&((t=3272356035&((t=t>>>e&1227133513)|t>>>2))|t>>>4))|t>>>8))|t>>>16))<<22>>22},r.nextCombination=function(t){var e=t|t-1;return e+1|(~e&-~e)-1>>>n(t)+1}},{}],2:[function(t,e,r){"use strict";function n(t,e,r){r=r||2;var n,o,a,l,u,h,p,d=e&&e.length,f=d?e[0]*r:t.length,g=i(t,0,f,r,!0),v=[];if(!g||g.next===g.prev)return v;if(d&&(g=c(t,e,g,r)),t.length>80*r){n=a=t[0],o=l=t[1];for(var m=r;ma&&(a=u),h>l&&(l=h);p=0!==(p=Math.max(a-n,l-o))?1/p:0}return s(g,v,r,n,o,p),v}function i(t,e,r,n,i){var o,s;if(i===A(t,e,r,n)>0)for(o=e;o=e;o-=n)s=w(o,t[o],t[o+1],s);return s&&x(s,s.next)&&(E(s),s=s.next),s}function o(t,e){if(!t)return t;e||(e=t);var r,n=t;do{if(r=!1,n.steiner||!x(n,n.next)&&0!==y(n.prev,n,n.next))n=n.next;else{if(E(n),(n=e=n.prev)===n.next)break;r=!0}}while(r||n!==e);return e}function s(t,e,r,n,i,c,p){if(t){!p&&c&&function(t,e,r,n){var i=t;do{null===i.z&&(i.z=f(i.x,i.y,e,r,n)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next}while(i!==t);i.prevZ.nextZ=null,i.prevZ=null,function(t){var e,r,n,i,o,s,a,l,u=1;do{for(r=t,t=null,o=null,s=0;r;){for(s++,n=r,a=0,e=0;e0||l>0&&n;)0!==a&&(0===l||!n||r.z<=n.z)?(i=r,r=r.nextZ,a--):(i=n,n=n.nextZ,l--),o?o.nextZ=i:t=i,i.prevZ=o,o=i;r=n}o.nextZ=null,u*=2}while(s>1)}(i)}(t,n,i,c);for(var d,g,v=t;t.prev!==t.next;)if(d=t.prev,g=t.next,c?l(t,n,i,c):a(t))e.push(d.i/r),e.push(t.i/r),e.push(g.i/r),E(t),t=g.next,v=g.next;else if((t=g)===v){p?1===p?s(t=u(t,e,r),e,r,n,i,c,2):2===p&&h(t,e,r,n,i,c):s(o(t),e,r,n,i,c,1);break}}}function a(t){var e=t.prev,r=t,n=t.next;if(y(e,r,n)>=0)return!1;for(var i=t.next.next;i!==t.prev;){if(v(e.x,e.y,r.x,r.y,n.x,n.y,i.x,i.y)&&y(i.prev,i,i.next)>=0)return!1;i=i.next}return!0}function l(t,e,r,n){var i=t.prev,o=t,s=t.next;if(y(i,o,s)>=0)return!1;for(var a=i.xo.x?i.x>s.x?i.x:s.x:o.x>s.x?o.x:s.x,h=i.y>o.y?i.y>s.y?i.y:s.y:o.y>s.y?o.y:s.y,c=f(a,l,e,r,n),p=f(u,h,e,r,n),d=t.prevZ,g=t.nextZ;d&&d.z>=c&&g&&g.z<=p;){if(d!==t.prev&&d!==t.next&&v(i.x,i.y,o.x,o.y,s.x,s.y,d.x,d.y)&&y(d.prev,d,d.next)>=0)return!1;if(d=d.prevZ,g!==t.prev&&g!==t.next&&v(i.x,i.y,o.x,o.y,s.x,s.y,g.x,g.y)&&y(g.prev,g,g.next)>=0)return!1;g=g.nextZ}for(;d&&d.z>=c;){if(d!==t.prev&&d!==t.next&&v(i.x,i.y,o.x,o.y,s.x,s.y,d.x,d.y)&&y(d.prev,d,d.next)>=0)return!1;d=d.prevZ}for(;g&&g.z<=p;){if(g!==t.prev&&g!==t.next&&v(i.x,i.y,o.x,o.y,s.x,s.y,g.x,g.y)&&y(g.prev,g,g.next)>=0)return!1;g=g.nextZ}return!0}function u(t,e,r){var n=t;do{var i=n.prev,o=n.next.next;!x(i,o)&&b(i,n,n.next,o)&&_(i,o)&&_(o,i)&&(e.push(i.i/r),e.push(n.i/r),e.push(o.i/r),E(n),E(n.next),n=t=o),n=n.next}while(n!==t);return n}function h(t,e,r,n,i,a){var l=t;do{for(var u=l.next.next;u!==l.prev;){if(l.i!==u.i&&m(l,u)){var h=T(l,u);return l=o(l,l.next),h=o(h,h.next),s(l,e,r,n,i,a),void s(h,e,r,n,i,a)}u=u.next}l=l.next}while(l!==t)}function c(t,e,r,n){var s,a,l,u,h,c=[];for(s=0,a=e.length;s=n.next.y&&n.next.y!==n.y){var a=n.x+(o-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(a<=i&&a>s){if(s=a,a===i){if(o===n.y)return n;if(o===n.next.y)return n.next}r=n.x=n.x&&n.x>=h&&i!==n.x&&v(or.x)&&_(n,t)&&(r=n,p=l),n=n.next;return r}(t,e)){var r=T(e,t);o(r,r.next)}}function f(t,e,r,n,i){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-r)*i)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-n)*i)|e<<8))|e<<4))|e<<2))|e<<1))<<1}function g(t){var e=t,r=t;do{e.x=0&&(t-s)*(n-a)-(r-s)*(e-a)>=0&&(r-s)*(o-a)-(i-s)*(n-a)>=0}function m(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!function(t,e){var r=t;do{if(r.i!==t.i&&r.next.i!==t.i&&r.i!==e.i&&r.next.i!==e.i&&b(r,r.next,t,e))return!0;r=r.next}while(r!==t);return!1}(t,e)&&_(t,e)&&_(e,t)&&function(t,e){var r=t,n=!1,i=(t.x+e.x)/2,o=(t.y+e.y)/2;do{r.y>o!=r.next.y>o&&r.next.y!==r.y&&i<(r.next.x-r.x)*(o-r.y)/(r.next.y-r.y)+r.x&&(n=!n),r=r.next}while(r!==t);return n}(t,e)}function y(t,e,r){return(e.y-t.y)*(r.x-e.x)-(e.x-t.x)*(r.y-e.y)}function x(t,e){return t.x===e.x&&t.y===e.y}function b(t,e,r,n){return!!(x(t,e)&&x(r,n)||x(t,n)&&x(r,e))||y(t,e,r)>0!=y(t,e,n)>0&&y(r,n,t)>0!=y(r,n,e)>0}function _(t,e){return y(t.prev,t,t.next)<0?y(t,e,t.next)>=0&&y(t,t.prev,e)>=0:y(t,e,t.prev)<0||y(t,t.next,e)<0}function T(t,e){var r=new S(t.i,t.x,t.y),n=new S(e.i,e.x,e.y),i=t.next,o=e.prev;return t.next=e,e.prev=t,r.next=i,i.prev=r,n.next=r,r.prev=n,o.next=n,n.prev=o,n}function w(t,e,r,n){var i=new S(t,e,r);return n?(i.next=n.next,i.prev=n,n.next.prev=i,n.next=i):(i.prev=i,i.next=i),i}function E(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 S(t,e,r){this.i=t,this.x=e,this.y=r,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function A(t,e,r,n){for(var i=0,o=e,s=r-n;o0&&(n+=t[i-1].length,r.holes.push(n))}return r}},{}],3:[function(t,e,r){"use strict";function n(){}function i(t,e,r){this.fn=t,this.context=e,this.once=r||!1}function o(){this._events=new n,this._eventsCount=0}var s=Object.prototype.hasOwnProperty,a="~";Object.create&&(n.prototype=Object.create(null),(new n).__proto__||(a=!1)),o.prototype.eventNames=function(){var t,e,r=[];if(0===this._eventsCount)return r;for(e in t=this._events)s.call(t,e)&&r.push(a?e.slice(1):e);return Object.getOwnPropertySymbols?r.concat(Object.getOwnPropertySymbols(t)):r},o.prototype.listeners=function(t,e){var r=a?a+t:t,n=this._events[r];if(e)return!!n;if(!n)return[];if(n.fn)return[n.fn];for(var i=0,o=n.length,s=new Array(o);i=0;n--){var i=t[n];"."===i?t.splice(n,1):".."===i?(t.splice(n,1),r++):r&&(t.splice(n,1),r--)}if(e)for(;r--;r)t.unshift("..");return t}function n(t,e){if(t.filter)return t.filter(e);for(var r=[],n=0;n=-1&&!i;o--){var s=o>=0?arguments[o]:t.cwd();if("string"!=typeof s)throw new TypeError("Arguments to path.resolve must be strings");s&&(r=s+"/"+r,i="/"===s.charAt(0))}return r=e(n(r.split("/"),function(t){return!!t}),!i).join("/"),(i?"/":"")+r||"."},r.normalize=function(t){var i=r.isAbsolute(t),o="/"===s(t,-1);return(t=e(n(t.split("/"),function(t){return!!t}),!i).join("/"))||i||(t="."),t&&o&&(t+="/"),(i?"/":"")+t},r.isAbsolute=function(t){return"/"===t.charAt(0)},r.join=function(){var t=Array.prototype.slice.call(arguments,0);return r.normalize(n(t,function(t,e){if("string"!=typeof t)throw new TypeError("Arguments to path.join must be strings");return t}).join("/"))},r.relative=function(t,e){function n(t){for(var e=0;e=0&&""===t[r];r--);return e>r?[]:t.slice(e,r-e+1)}t=r.resolve(t).substr(1),e=r.resolve(e).substr(1);for(var i=n(t.split("/")),o=n(e.split("/")),s=Math.min(i.length,o.length),a=s,l=0;l=t.byteLength?n.bufferSubData(this.type,e,t):n.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,r){return new i(t,t.ARRAY_BUFFER,e,r)},i.createIndexBuffer=function(t,e,r){return new i(t,t.ELEMENT_ARRAY_BUFFER,e,r)},i.create=function(t,e,r,n){return new i(t,e,r,n)},i.prototype.destroy=function(){this.gl.deleteBuffer(this.buffer)},e.exports=i},{}],10:[function(t,e,r){var n=t("./GLTexture"),i=function(t,e,r){this.gl=t,this.framebuffer=t.createFramebuffer(),this.stencil=null,this.texture=null,this.width=e||100,this.height=r||100};i.prototype.enableTexture=function(t){var e=this.gl;this.texture=t||new n(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,r,n){this.bind();var i=this.gl;i.clearColor(t,e,r,n),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 r=this.gl;this.width=t,this.height=e,this.texture&&this.texture.uploadData(null,t,e),this.stencil&&(r.bindRenderbuffer(r.RENDERBUFFER,this.stencil),r.renderbufferStorage(r.RENDERBUFFER,r.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,r,o){var s=n.fromData(t,null,e,r);s.enableNearestScaling(),s.enableWrapClamp();var a=new i(t,e,r);return a.enableTexture(s),a.unbind(),a},i.createFloat32=function(t,e,r,o){var s=new n.fromData(t,o,e,r);s.enableNearestScaling(),s.enableWrapClamp();var a=new i(t,e,r);return a.enableTexture(s),a.unbind(),a},e.exports=i},{"./GLTexture":12}],11:[function(t,e,r){var n=t("./shader/compileProgram"),i=t("./shader/extractAttributes"),o=t("./shader/extractUniforms"),s=t("./shader/setPrecision"),a=t("./shader/generateUniformAccessObject"),l=function(t,e,r,l,u){this.gl=t,l&&(e=s(e,l),r=s(r,l)),this.program=n(t,e,r,u),this.attributes=i(t,this.program),this.uniformData=o(t,this.program),this.uniforms=a(t,this.uniformData)};l.prototype.bind=function(){return this.gl.useProgram(this.program),this},l.prototype.destroy=function(){this.attributes=null,this.uniformData=null,this.uniforms=null,this.gl.deleteProgram(this.program)},e.exports=l},{"./shader/compileProgram":17,"./shader/extractAttributes":19,"./shader/extractUniforms":20,"./shader/generateUniformAccessObject":21,"./shader/setPrecision":25}],12:[function(t,e,r){var n=function(t,e,r,n,i){this.gl=t,this.texture=t.createTexture(),this.mipmap=!1,this.premultiplyAlpha=!1,this.width=e||-1,this.height=r||-1,this.format=n||t.RGBA,this.type=i||t.UNSIGNED_BYTE};n.prototype.upload=function(t){this.bind();var e=this.gl;e.pixelStorei(e.UNPACK_PREMULTIPLY_ALPHA_WEBGL,this.premultiplyAlpha);var r=t.videoWidth||t.width,n=t.videoHeight||t.height;n!==this.height||r!==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=r,this.height=n};var i=!1;n.prototype.uploadData=function(t,e,r){this.bind();var n=this.gl;if(t instanceof Float32Array){if(!i){if(!n.getExtension("OES_texture_float"))throw new Error("floating point textures not available");i=!0}this.type=n.FLOAT}else this.type=this.type||n.UNSIGNED_BYTE;n.pixelStorei(n.UNPACK_PREMULTIPLY_ALPHA_WEBGL,this.premultiplyAlpha),e!==this.width||r!==this.height?n.texImage2D(n.TEXTURE_2D,0,this.format,e,r,0,this.format,this.type,t||null):n.texSubImage2D(n.TEXTURE_2D,0,0,0,e,r,this.format,this.type,t||null),this.width=e,this.height=r},n.prototype.bind=function(t){var e=this.gl;void 0!==t&&e.activeTexture(e.TEXTURE0+t),e.bindTexture(e.TEXTURE_2D,this.texture)},n.prototype.unbind=function(){var t=this.gl;t.bindTexture(t.TEXTURE_2D,null)},n.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)},n.prototype.magFilter=function(t){var e=this.gl;this.bind(),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,t?e.LINEAR:e.NEAREST)},n.prototype.enableMipmap=function(){var t=this.gl;this.bind(),this.mipmap=!0,t.generateMipmap(t.TEXTURE_2D)},n.prototype.enableLinearScaling=function(){this.minFilter(!0),this.magFilter(!0)},n.prototype.enableNearestScaling=function(){this.minFilter(!1),this.magFilter(!1)},n.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)},n.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)},n.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)},n.prototype.destroy=function(){this.gl.deleteTexture(this.texture)},n.fromSource=function(t,e,r){var i=new n(t);return i.premultiplyAlpha=r||!1,i.upload(e),i},n.fromData=function(t,e,r,i){var o=new n(t);return o.uploadData(e,r,i),o},e.exports=n},{}],13:[function(t,e,r){function n(t,e){if(this.nativeVaoExtension=null,n.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 r=t.getParameter(t.MAX_VERTEX_ATTRIBS);this.nativeState={tempAttribState:new Array(r),attribState:new Array(r)}}this.gl=t,this.attributes=[],this.indexBuffer=null,this.dirty=!1}var i=t("./setVertexAttribArrays");n.prototype.constructor=n,e.exports=n,n.FORCE_NATIVE=!1,n.prototype.bind=function(){if(this.nativeVao){if(this.nativeVaoExtension.bindVertexArrayOES(this.nativeVao),this.dirty)return this.dirty=!1,this.activate(),this;this.indexBuffer&&this.indexBuffer.bind()}else this.activate();return this},n.prototype.unbind=function(){return this.nativeVao&&this.nativeVaoExtension.bindVertexArrayOES(null),this},n.prototype.activate=function(){for(var t=this.gl,e=null,r=0;r1)for(var r=1;r1&&(n=r[0]+"@",t=r[1]),t=t.replace(O,"."),n+o(t.split("."),e).join(".")}function a(t){for(var e,r,n=[],i=0,o=t.length;i=55296&&e<=56319&&i65535&&(e+=L((t-=65536)>>>10&1023|55296),t=56320|1023&t),e+=L(t)}).join("")}function u(t){return t-48<10?t-22:t-65<26?t-65:t-97<26?t-97:b}function h(t,e){return t+22+75*(t<26)-((0!=e)<<5)}function c(t,e,r){var n=0;for(t=r?I(t/E):t>>1,t+=I(t/e);t>D*T>>1;n+=b)t=I(t/D);return I(n+(D+1)*t/(t+w))}function p(t){var e,r,n,o,s,a,h,p,d,f,g=[],v=t.length,m=0,y=A,w=S;for((r=t.lastIndexOf(C))<0&&(r=0),n=0;n=128&&i("not-basic"),g.push(t.charCodeAt(n));for(o=r>0?r+1:0;o=v&&i("invalid-input"),((p=u(t.charCodeAt(o++)))>=b||p>I((x-m)/a))&&i("overflow"),m+=p*a,!(p<(d=h<=w?_:h>=w+T?T:h-w));h+=b)a>I(x/(f=b-d))&&i("overflow"),a*=f;e=g.length+1,w=c(m-s,e,0==s),I(m/e)>x-y&&i("overflow"),y+=I(m/e),m%=e,g.splice(m++,0,y)}return l(g)}function d(t){var e,r,n,o,s,l,u,p,d,f,g,v,m,y,w,E=[];for(t=a(t),v=t.length,e=A,r=0,s=S,l=0;l=e&&gI((x-r)/(m=n+1))&&i("overflow"),r+=(u-e)*m,e=u,l=0;lx&&i("overflow"),g==e){for(p=r,d=b;!(p<(f=d<=s?_:d>=s+T?T:d-s));d+=b)w=p-f,y=b-f,E.push(L(h(f+w%y,0))),p=I(w/y);E.push(L(h(p,0))),s=c(r,m,n==o),r=0,++n}++r,++e}return E.join("")}var f="object"==typeof n&&n&&!n.nodeType&&n,g="object"==typeof r&&r&&!r.nodeType&&r,v="object"==typeof t&&t;v.global!==v&&v.window!==v&&v.self!==v||(e=v);var m,y,x=2147483647,b=36,_=1,T=26,w=38,E=700,S=72,A=128,C="-",M=/^xn--/,R=/[^\x20-\x7E]/,O=/[\x2E\u3002\uFF0E\uFF61]/g,P={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},D=b-_,I=Math.floor,L=String.fromCharCode;if(m={version:"1.4.1",ucs2:{decode:a,encode:l},decode:p,encode:d,toASCII:function(t){return s(t,function(t){return R.test(t)?"xn--"+d(t):t})},toUnicode:function(t){return s(t,function(t){return M.test(t)?p(t.slice(4).toLowerCase()):t})}},f&&g)if(r.exports==f)g.exports=m;else for(y in m)m.hasOwnProperty(y)&&(f[y]=m[y]);else e.punycode=m}(this)}).call(this,void 0!==e?e:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],28:[function(t,e,r){"use strict";function n(t,e){return Object.prototype.hasOwnProperty.call(t,e)}e.exports=function(t,e,r,o){e=e||"&",r=r||"=";var s={};if("string"!=typeof t||0===t.length)return s;var a=/\+/g;t=t.split(e);var l=1e3;o&&"number"==typeof o.maxKeys&&(l=o.maxKeys);var u=t.length;l>0&&u>l&&(u=l);for(var h=0;h=0?(c=g.substr(0,v),p=g.substr(v+1)):(c=g,p=""),d=decodeURIComponent(c),f=decodeURIComponent(p),n(s,d)?i(s[d])?s[d].push(f):s[d]=[s[d],f]:s[d]=f}return s};var i=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)}},{}],29:[function(t,e,r){"use strict";function n(t,e){if(t.map)return t.map(e);for(var r=[],n=0;n=i||0===r)){var o=i-(r=e+r>i?i-e:r);for(n=e;n0&&void 0!==arguments[0]?arguments[0]:"",n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10;(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")})(this,t),this.baseUrl=r,this.progress=0,this.loading=!1,this.defaultQueryString="",this._beforeMiddleware=[],this._afterMiddleware=[],this._resourcesParsing=[],this._boundLoadResource=function(t,r){return e._loadResource(t,r)},this._queue=c.queue(this._boundLoadResource,n),this._queue.pause(),this.resources={},this.onProgress=new a.default,this.onError=new a.default,this.onLoad=new a.default,this.onStart=new a.default,this.onComplete=new a.default;for(var i=0;i0||e.responseType===t.XHR_RESPONSE_TYPE.BUFFER)?n=200:1223===n&&(n=204),2==(n/100|0)){if(this.xhrType===t.XHR_RESPONSE_TYPE.TEXT)this.data=r,this.type=t.TYPE.TEXT;else if(this.xhrType===t.XHR_RESPONSE_TYPE.JSON)try{this.data=JSON.parse(r),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(r,"text/xml")}else{var o=document.createElement("div");o.innerHTML=r,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||r;this.complete()}else this.abort("["+e.status+"] "+e.statusText+": "+e.responseURL)},t.prototype._determineCrossOrigin=function(t,e){if(0===t.indexOf("data:"))return"";if(window.origin!==window.location.origin)return"anonymous";e=e||window.location,d||(d=document.createElement("a")),d.href=t;var r=!(t=(0,u.default)(d.href,{strictMode:!0})).port&&""===e.port||t.port===e.port,n=t.protocol?t.protocol+":":"";return t.host===e.hostname&&r&&n===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 r=t.indexOf("/");e=t.substring(r+1,t.indexOf(";",r))}else{var n=t.indexOf("?"),i=t.indexOf("#"),o=Math.min(n>-1?n:t.length,i>-1?i:t.length);t=t.substring(0,o),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"}},a(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}();f.STATUS_FLAGS={NONE:0,DATA_URL:1,COMPLETE:2,LOADING:4},f.TYPE={UNKNOWN:0,JSON:1,XML:2,IMAGE:3,AUDIO:4,VIDEO:5,TEXT:6},f.LOAD_TYPE={XHR:1,IMAGE:2,AUDIO:3,VIDEO:4},f.XHR_RESPONSE_TYPE={DEFAULT:"text",BUFFER:"arraybuffer",BLOB:"blob",DOCUMENT:"document",JSON:"json",TEXT:"text"},f._loadTypeMap={gif:f.LOAD_TYPE.IMAGE,png:f.LOAD_TYPE.IMAGE,bmp:f.LOAD_TYPE.IMAGE,jpg:f.LOAD_TYPE.IMAGE,jpeg:f.LOAD_TYPE.IMAGE,tif:f.LOAD_TYPE.IMAGE,tiff:f.LOAD_TYPE.IMAGE,webp:f.LOAD_TYPE.IMAGE,tga:f.LOAD_TYPE.IMAGE,svg:f.LOAD_TYPE.IMAGE,"svg+xml":f.LOAD_TYPE.IMAGE,mp3:f.LOAD_TYPE.AUDIO,ogg:f.LOAD_TYPE.AUDIO,wav:f.LOAD_TYPE.AUDIO,mp4:f.LOAD_TYPE.VIDEO,webm:f.LOAD_TYPE.VIDEO},f._xhrTypeMap={xhtml:f.XHR_RESPONSE_TYPE.DOCUMENT,html:f.XHR_RESPONSE_TYPE.DOCUMENT,htm:f.XHR_RESPONSE_TYPE.DOCUMENT,xml:f.XHR_RESPONSE_TYPE.DOCUMENT,tmx:f.XHR_RESPONSE_TYPE.DOCUMENT,svg:f.XHR_RESPONSE_TYPE.DOCUMENT,tsx:f.XHR_RESPONSE_TYPE.DOCUMENT,gif:f.XHR_RESPONSE_TYPE.BLOB,png:f.XHR_RESPONSE_TYPE.BLOB,bmp:f.XHR_RESPONSE_TYPE.BLOB,jpg:f.XHR_RESPONSE_TYPE.BLOB,jpeg:f.XHR_RESPONSE_TYPE.BLOB,tif:f.XHR_RESPONSE_TYPE.BLOB,tiff:f.XHR_RESPONSE_TYPE.BLOB,webp:f.XHR_RESPONSE_TYPE.BLOB,tga:f.XHR_RESPONSE_TYPE.BLOB,json:f.XHR_RESPONSE_TYPE.JSON,text:f.XHR_RESPONSE_TYPE.TEXT,txt:f.XHR_RESPONSE_TYPE.TEXT,ttf:f.XHR_RESPONSE_TYPE.BUFFER,otf:f.XHR_RESPONSE_TYPE.BUFFER},f.EMPTY_GIF="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==",void 0!==e&&(e.exports.default=f)},{"mini-signals":5,"parse-uri":7}],34:[function(t,e,r){"use strict";function n(){}function i(t){return function(){if(null===t)throw new Error("Callback was already called.");var e=t;t=null,e.apply(this,arguments)}}r.__esModule=!0,r.eachSeries=function(t,e,r,n){var i=0,o=t.length;!function s(a){a||i===o?r&&r(a):n?setTimeout(function(){e(t[i++],s)},1):e(t[i++],s)}()},r.queue=function(t,e){function r(t,e,r){if(null!=r&&"function"!=typeof r)throw new Error("task callback must be a function");if(a.started=!0,null==t&&a.idle())setTimeout(function(){return a.drain()},1);else{var i={data:t,callback:"function"==typeof r?r:n};e?a._tasks.unshift(i):a._tasks.push(i),setTimeout(function(){return a.process()},1)}}function o(t){return function(){s-=1,t.callback.apply(t,arguments),null!=arguments[0]&&a.error(arguments[0],t.data),s<=a.concurrency-a.buffer&&a.unsaturated(),a.idle()&&a.drain(),a.process()}}if(null==e)e=1;else if(0===e)throw new Error("Concurrency must not be zero");var s=0,a={_tasks:[],concurrency:e,saturated:n,unsaturated:n,buffer:e/4,empty:n,drain:n,error:n,started:!1,paused:!1,push:function(t,e){r(t,!1,e)},kill:function(){s=0,a.drain=n,a.started=!1,a._tasks=[]},unshift:function(t,e){r(t,!0,e)},process:function(){for(;!a.paused&&s>2,o[1]=(3&n[0])<<4|n[1]>>4,o[2]=(15&n[1])<<2|n[2]>>6,o[3]=63&n[2],r-(t.length-1)){case 2:o[3]=64,o[2]=64;break;case 1:o[3]=64}for(var a=0;a",'"',"`"," ","\r","\n","\t"]),c=["'"].concat(h),p=["%","/","?",";","#"].concat(c),d=["/","?","#"],f=/^[+a-z0-9A-Z_-]{0,63}$/,g=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,v={javascript:!0,"javascript:":!0},m={javascript:!0,"javascript:":!0},y={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},x=t("querystring");n.prototype.parse=function(t,e,r){if(!s.isString(t))throw new TypeError("Parameter 'url' must be a string, not "+typeof t);var n=t.indexOf("?"),i=-1!==n&&n127?I+="x":I+=D[L];if(!I.match(f)){var B=O.slice(0,S),k=O.slice(S+1),N=D.match(g);N&&(B.push(N[1]),k.unshift(N[2])),k.length&&(h="/"+k.join(".")+h),this.hostname=B.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),R||(this.hostname=o.toASCII(this.hostname));var $=this.port?":"+this.port:"",U=this.hostname||"";this.host=U+$,this.href+=this.host,R&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==h[0]&&(h="/"+h))}if(!v[T])for(var S=0,P=c.length;S0)&&r.host.split("@");S&&(r.auth=S.shift(),r.host=r.hostname=S.shift())}return r.search=t.search,r.query=t.query,s.isNull(r.pathname)&&s.isNull(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.href=r.format(),r}if(!w.length)return r.pathname=null,r.search?r.path="/"+r.search:r.path=null,r.href=r.format(),r;for(var A=w.slice(-1)[0],C=(r.host||t.host||w.length>1)&&("."===A||".."===A)||""===A,M=0,R=w.length;R>=0;R--)"."===(A=w[R])?w.splice(R,1):".."===A?(w.splice(R,1),M++):M&&(w.splice(R,1),M--);if(!_&&!T)for(;M--;M)w.unshift("..");!_||""===w[0]||w[0]&&"/"===w[0].charAt(0)||w.unshift(""),C&&"/"!==w.join("/").substr(-1)&&w.push("");var O=""===w[0]||w[0]&&"/"===w[0].charAt(0);if(E){r.hostname=r.host=O?"":w.length?w.shift():"";var S=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@");S&&(r.auth=S.shift(),r.host=r.hostname=S.shift())}return(_=_||r.host&&w.length)&&!O&&w.unshift(""),w.length?r.pathname=w.join("/"):(r.pathname=null,r.path=null),s.isNull(r.pathname)&&s.isNull(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.auth=t.auth||r.auth,r.slashes=r.slashes||t.slashes,r.href=r.format(),r},n.prototype.parseHost=function(){var t=this.host,e=l.exec(t);e&&(":"!==(e=e[0])&&(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,r){"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,r){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}r.__esModule=!0;var i=t("../core"),o=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}(i),s=t("ismobilejs"),a=n(s),l=t("./accessibleTarget"),u=n(l);o.utils.mixins.delayMixin(o.DisplayObject.prototype,u.default);var h=100,c=0,p=0,d=2,f=function(){function t(e){(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")})(this,t),!a.default.tablet&&!a.default.phone||navigator.isCocoonJS||this.createTouchHook();var r=document.createElement("div");r.style.width=h+"px",r.style.height=h+"px",r.style.position="absolute",r.style.top=c+"px",r.style.left=p+"px",r.style.zIndex=d,this.div=r,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,!0),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,r=0;rthis.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")).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=d,e.style.borderStyle="none",navigator.userAgent.toLowerCase().indexOf("chrome")>-1?e.setAttribute("aria-live","off"):e.setAttribute("aria-live","polite"),navigator.userAgent.match(/rv:.*Gecko\//)?e.setAttribute("aria-relevant","additions"):e.setAttribute("aria-relevant","text"),e.addEventListener("click",this._onClick.bind(this)),e.addEventListener("focus",this._onFocus.bind(this)),e.addEventListener("focusout",this._onFocusOut.bind(this))),t.accessibleTitle&&null!==t.accessibleTitle?e.title=t.accessibleTitle:t.accessibleHint&&null!==t.accessibleHint||(e.title="displayObject "+t.tabIndex),t.accessibleHint&&null!==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){t.target.getAttribute("aria-live","off")||t.target.setAttribute("aria-live","assertive");var e=this.renderer.plugins.interaction;e.dispatchEvent(t.target.displayObject,"mouseover",e.eventData)},t.prototype._onFocusOut=function(t){t.target.getAttribute("aria-live","off")||t.target.setAttribute("aria-live","polite");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(t){0===t.movementX&&0===t.movementY||this.deactivate()},t.prototype.destroy=function(){this.div=null;for(var t=0;t]*(?:\s(width|height)=('|")(\d*(?:\.\d+)?)(?:px)?('|"))[^>]*(?:\s(width|height)=('|")(\d*(?:\.\d+)?)(?:px)?('|"))[^>]*>/i,r.SHAPES={POLY:0,RECT:1,CIRC:2,ELIP:3,RREC:4},r.PRECISION={LOW:"lowp",MEDIUM:"mediump",HIGH:"highp"},r.TRANSFORM_MODE={STATIC:0,DYNAMIC:1},r.TEXT_GRADIENT={LINEAR_VERTICAL:0,LINEAR_HORIZONTAL:1},r.UPDATE_PRIORITY={INTERACTION:50,HIGH:25,NORMAL:0,LOW:-25,UTILITY:-50}},{}],47:[function(t,e,r){"use strict";r.__esModule=!0;var n=t("../math"),i=function(){function t(){(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")})(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?n.Rectangle.EMPTY:((t=t||new n.Rectangle(0,0,1,1)).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,r=this.minY,n=this.maxX,i=this.maxY,o=t[0],s=t[1];e=on?o:n,i=s>i?s:i,o=t[2],s=t[3],e=on?o:n,i=s>i?s:i,o=t[4],s=t[5],e=on?o:n,i=s>i?s:i,o=t[6],s=t[7],e=on?o:n,i=s>i?s:i,this.minX=e,this.minY=r,this.maxX=n,this.maxY=i},t.prototype.addFrame=function(t,e,r,n,i){var o=t.worldTransform,s=o.a,a=o.b,l=o.c,u=o.d,h=o.tx,c=o.ty,p=this.minX,d=this.minY,f=this.maxX,g=this.maxY,v=s*e+l*r+h,m=a*e+u*r+c;p=vf?v:f,g=m>g?m:g,p=(v=s*n+l*r+h)f?v:f,g=m>g?m:g,p=(v=s*e+l*i+h)f?v:f,g=m>g?m:g,p=(v=s*n+l*i+h)f?v:f,g=m>g?m:g,this.minX=p,this.minY=d,this.maxX=f,this.maxY=g},t.prototype.addVertices=function(t,e,r,n){for(var i=t.worldTransform,o=i.a,s=i.b,a=i.c,l=i.d,u=i.tx,h=i.ty,c=this.minX,p=this.minY,d=this.maxX,f=this.maxY,g=r;gd?y:d,f=x>f?x:f}this.minX=c,this.minY=p,this.maxX=d,this.maxY=f},t.prototype.addBounds=function(t){var e=this.minX,r=this.minY,n=this.maxX,i=this.maxY;this.minX=t.minXn?t.maxX:n,this.maxY=t.maxY>i?t.maxY:i},t.prototype.addBoundsMask=function(t,e){var r=t.minX>e.minX?t.minX:e.minX,n=t.minY>e.minY?t.minY:e.minY,i=t.maxXl?i:l,this.maxY=o>u?o:u}},t.prototype.addBoundsArea=function(t,e){var r=t.minX>e.x?t.minX:e.x,n=t.minY>e.y?t.minY:e.y,i=t.maxXl?i:l,this.maxY=o>u?o:u}},t}();r.default=i},{"../math":70}],48:[function(t,e,r){"use strict";r.__esModule=!0;var n=function(){function t(t,e){for(var r=0;r1)for(var r=0;rthis.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 r=this.getChildIndex(t),n=this.getChildIndex(e);this.children[r]=e,this.children[n]=t,this.onChildrenChange(r=this.children.length)throw new Error("The index "+e+" supplied is out of bounds "+this.children.length);var r=this.getChildIndex(t);(0,i.removeItems)(this.children,r,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 r=0;r0&&void 0!==arguments[0]?arguments[0]:0,e=arguments[1],r=t,n="number"==typeof e?e:this.children.length,i=n-r,o=void 0;if(i>0&&i<=n){o=this.children.splice(r,i);for(var s=0;s2&&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,r,n){return e&&(t=e.toGlobal(t,r,n)),n||(this._recursivePostUpdateTransform(),this.parent?this.displayObjectUpdateTransform():(this.parent=this._tempDisplayObjectParent,this.displayObjectUpdateTransform(),this.parent=null)),this.worldTransform.applyInverse(t,r)},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,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,n=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,s=arguments.length>6&&void 0!==arguments[6]?arguments[6]:0,a=arguments.length>7&&void 0!==arguments[7]?arguments[7]:0,l=arguments.length>8&&void 0!==arguments[8]?arguments[8]:0;return this.position.x=t,this.position.y=e,this.scale.x=r||1,this.scale.y=n||1,this.rotation=i,this.skew.x=o,this.skew.y=s,this.pivot.x=a,this.pivot.y=l,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},i(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.isMask=!1),this._mask=t,this._mask&&(this._mask.renderable=!1,this._mask.isMask=!0)}},{key:"filters",get:function(){return this._filters&&this._filters.slice()},set:function(t){this._filters=t&&t.slice()}}]),e}(s.default);r.default=m,m.prototype.displayObjectUpdateTransform=m.prototype.updateTransform},{"../const":46,"../math":70,"../settings":101,"./Bounds":47,"./Transform":50,"./TransformStatic":52,eventemitter3:3}],50:[function(t,e,r){"use strict";r.__esModule=!0;var n=function(){function t(t,e){for(var r=0;r0&&void 0!==arguments[0]&&arguments[0];!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var n=function(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}(this,t.call(this));return n.fillAlpha=1,n.lineWidth=0,n.nativeLines=r,n.lineColor=0,n.lineAlignment=.5,n.graphicsData=[],n.tint=16777215,n._prevTint=16777215,n.blendMode=v.BLEND_MODES.NORMAL,n.currentPath=null,n._webGL={},n.isMask=!1,n.boundsPadding=0,n._localBounds=new y.default,n.dirty=0,n.fastRectDirty=-1,n.clearDirty=0,n.boundsDirty=-1,n.cachedSpriteDirty=!1,n._spriteRect=null,n._fastRect=!1,n._prevRectTint=null,n._prevRectFillColor=null,n}return function(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)}(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.lineAlignment=this.lineAlignment,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 r=0;re.CURVES.maxSegments&&(r=e.CURVES.maxSegments),r},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,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:.5;if(this.lineWidth=t,this.lineColor=e,this.lineAlpha=r,this.lineAlignment=n,this.currentPath)if(this.currentPath.shape.points.length){var i=new f.Polygon(this.currentPath.shape.points.slice(-2));i.closed=!1,this.drawShape(i)}else this.currentPath.lineWidth=this.lineWidth,this.currentPath.lineColor=this.lineColor,this.currentPath.lineAlpha=this.lineAlpha,this.currentPath.lineAlignment=this.lineAlignment;return this},e.prototype.moveTo=function(t,e){var r=new f.Polygon([t,e]);return r.closed=!1,this.drawShape(r),this},e.prototype.lineTo=function(t,e){var r=this.currentPath.shape.points,n=r[r.length-2],i=r[r.length-1];return n===t&&i===e||(r.push(t,e),this.dirty++),this},e.prototype.quadraticCurveTo=function(t,r,n,i){this.currentPath?0===this.currentPath.shape.points.length&&(this.currentPath.shape.points=[0,0]):this.moveTo(0,0);var o=this.currentPath.shape.points,s=0,a=0;0===o.length&&this.moveTo(0,0);for(var l=o[o.length-2],u=o[o.length-1],h=e.CURVES.adaptive?this._segmentsCount(this._quadraticCurveLength(l,u,t,r,n,i)):20,c=1;c<=h;++c){var p=c/h;s=l+(t-l)*p,a=u+(r-u)*p,o.push(s+(t+(n-t)*p-s)*p,a+(r+(i-r)*p-a)*p)}return this.dirty++,this},e.prototype.bezierCurveTo=function(t,r,n,i,o,s){this.currentPath?0===this.currentPath.shape.points.length&&(this.currentPath.shape.points=[0,0]):this.moveTo(0,0);var a=this.currentPath.shape.points,l=a[a.length-2],u=a[a.length-1];a.length-=2;var h=e.CURVES.adaptive?this._segmentsCount(this._bezierCurveLength(l,u,t,r,n,i,o,s)):20;return(0,b.default)(l,u,t,r,n,i,o,s,h,a),this.dirty++,this},e.prototype.arcTo=function(t,e,r,n,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,s=o[o.length-2],a=o[o.length-1],l=a-e,u=s-t,h=n-e,c=r-t,p=Math.abs(l*c-u*h);if(p<1e-8||0===i)o[o.length-2]===t&&o[o.length-1]===e||o.push(t,e);else{var d=l*l+u*u,f=h*h+c*c,g=l*h+u*c,v=i*Math.sqrt(d)/p,m=i*Math.sqrt(f)/p,y=v*g/d,x=m*g/f,b=v*c+m*u,_=v*h+m*l,T=u*(m+y),w=l*(m+y),E=c*(v+x),S=h*(v+x),A=Math.atan2(w-_,T-b),C=Math.atan2(S-_,E-b);this.arc(b+t,_+e,i,A,C,u*h>c*l)}return this.dirty++,this},e.prototype.arc=function(t,r,n,i,o){var s=arguments.length>5&&void 0!==arguments[5]&&arguments[5];if(i===o)return this;!s&&o<=i?o+=v.PI_2:s&&i<=o&&(i+=v.PI_2);var a=o-i,l=e.CURVES.adaptive?this._segmentsCount(Math.abs(a)*n):40*Math.ceil(Math.abs(a)/v.PI_2);if(0===a)return this;var u=t+Math.cos(i)*n,h=r+Math.sin(i)*n,c=this.currentPath?this.currentPath.shape.points:null;if(c){var p=Math.abs(c[c.length-2]-u),d=Math.abs(c[c.length-1]-h);p<.001&&d<.001||c.push(u,h)}else this.moveTo(u,h),c=this.currentPath.shape.points;for(var f=a/(2*l),g=2*f,m=Math.cos(f),y=Math.sin(f),x=l-1,b=x%1/x,_=0;_<=x;++_){var T=_+b*_,w=f+i+g*T,E=Math.cos(w),S=-Math.sin(w);c.push((m*E+y*S)*n+t,(m*-S+y*E)*n+r)}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,r,n){return this.drawShape(new f.Rectangle(t,e,r,n)),this},e.prototype.drawRoundedRect=function(t,e,r,n,i){return this.drawShape(new f.RoundedRectangle(t,e,r,n,i)),this},e.prototype.drawCircle=function(t,e,r){return this.drawShape(new f.Circle(t,e,r)),this},e.prototype.drawEllipse=function(t,e,r,n){return this.drawShape(new f.Ellipse(t,e,r,n)),this},e.prototype.drawPolygon=function(t){var e=t,r=!0;if(e instanceof f.Polygon&&(r=e.closed,e=e.points),!Array.isArray(e)){e=new Array(arguments.length);for(var n=0;n5&&void 0!==arguments[5]?arguments[5]:0;i=i||n/2;for(var s=-1*Math.PI/2+o,a=2*r,l=v.PI_2/a,u=[],h=0;h0)&&(this.lineWidth=0,this.lineAlignment=.5,this.filling=!1,this.boundsDirty=-1,this.canvasTintDirty=-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===v.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 d.default(new u.default(u.default.WHITE)));var r=this._spriteRect,n=this.graphicsData[0].fillColor;if(16777215===this.tint)r.tint=n;else if(this.tint!==this._prevRectTint||n!==this._prevRectFillColor){var i=A,o=C;(0,g.hex2rgb)(n,i),(0,g.hex2rgb)(this.tint,o),i[0]*=o[0],i[1]*=o[1],i[2]*=o[2],r.tint=(0,g.rgb2hex)(i),this._prevRectTint=this.tint,this._prevRectFillColor=n}r.alpha=this.graphicsData[0].fillAlpha,r.worldAlpha=this.worldAlpha*r.alpha,r.blendMode=this.blendMode,r._texture._frame.width=e.width,r._texture._frame.height=e.height,r.transform.worldTransform=this.transform.worldTransform,r.anchor.set(-e.x/e.width,-e.y/e.height),r._onAnchorUpdate(),r._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,S);for(var e=this.graphicsData,r=0;re?o+a:e,r=sn?s+l:n;else if(c===v.SHAPES.CIRC)o=i.x,s=i.y,a=i.radius+f,l=i.radius+f,t=o-ae?o+a:e,r=s-ln?s+l:n;else if(c===v.SHAPES.ELIP)o=i.x,s=i.y,a=i.width+f,l=i.height+f,t=o-ae?o+a:e,r=s-ln?s+l:n;else for(var g=i.points,m=0,y=0,x=0,b=0,_=0,T=0,w=0,E=0,S=0;S+2e?w+_:e,r=(E=(y+s)/2)-(T=(l/a*x+b)/2)n?E+T:n)}else t=0,e=0,r=0,n=0;var A=this.boundsPadding;this._localBounds.minX=t-A,this._localBounds.maxX=e+A,this._localBounds.minY=r-A,this._localBounds.maxY=n+A},e.prototype.drawShape=function(t){this.currentPath&&this.currentPath.shape.points.length<=2&&this.graphicsData.pop(),this.currentPath=null;var e=new c.default(this.lineWidth,this.lineColor,this.lineAlpha,this.fillColor,this.fillAlpha,this.filling,this.nativeLines,t,this.lineAlignment);return this.graphicsData.push(e),e.type===v.SHAPES.POLY&&(e.shape.closed=e.shape.closed,this.currentPath=e),this.dirty++,e},e.prototype.generateCanvasTexture=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,r=this.getLocalBounds(),n=a.default.create(r.width,r.height,t,e);w||(w=new T.default),this.transform.updateLocalTransform(),this.transform.localTransform.copy(E),E.invert(),E.tx-=r.x,E.ty-=r.y,w.render(this,n,!0,E);var i=u.default.fromCanvas(n.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 r=0;r0){f=0;for(var m=0;m=2;_-=2)r.lineTo(p[_],p[_+1]);d[y].closed&&r.closePath()}}l.fill&&(r.globalAlpha=l.fillAlpha*n,r.fillStyle="#"+("00000"+(0|h).toString(16)).substr(-6),r.fill()),l.lineWidth&&(r.globalAlpha=l.lineAlpha*n,r.strokeStyle="#"+("00000"+(0|c).toString(16)).substr(-6),r.stroke())}else if(l.type===o.SHAPES.RECT)(l.fillColor||0===l.fillColor)&&(r.globalAlpha=l.fillAlpha*n,r.fillStyle="#"+("00000"+(0|h).toString(16)).substr(-6),r.fillRect(u.x,u.y,u.width,u.height)),l.lineWidth&&(r.globalAlpha=l.lineAlpha*n,r.strokeStyle="#"+("00000"+(0|c).toString(16)).substr(-6),r.strokeRect(u.x,u.y,u.width,u.height));else if(l.type===o.SHAPES.CIRC)r.beginPath(),r.arc(u.x,u.y,u.radius,0,2*Math.PI),r.closePath(),l.fill&&(r.globalAlpha=l.fillAlpha*n,r.fillStyle="#"+("00000"+(0|h).toString(16)).substr(-6),r.fill()),l.lineWidth&&(r.globalAlpha=l.lineAlpha*n,r.strokeStyle="#"+("00000"+(0|c).toString(16)).substr(-6),r.stroke());else if(l.type===o.SHAPES.ELIP){var T=2*u.width,w=2*u.height,E=u.x-T/2,S=u.y-w/2;r.beginPath();var A=T/2*.5522848,C=w/2*.5522848,M=E+T,R=S+w,O=E+T/2,P=S+w/2;r.moveTo(E,P),r.bezierCurveTo(E,P-C,O-A,S,O,S),r.bezierCurveTo(O+A,S,M,P-C,M,P),r.bezierCurveTo(M,P+C,O+A,R,O,R),r.bezierCurveTo(O-A,R,E,P+C,E,P),r.closePath(),l.fill&&(r.globalAlpha=l.fillAlpha*n,r.fillStyle="#"+("00000"+(0|h).toString(16)).substr(-6),r.fill()),l.lineWidth&&(r.globalAlpha=l.lineAlpha*n,r.strokeStyle="#"+("00000"+(0|c).toString(16)).substr(-6),r.stroke())}else if(l.type===o.SHAPES.RREC){var D=u.x,I=u.y,L=u.width,F=u.height,B=u.radius,k=Math.min(L,F)/2|0;B=B>k?k:B,r.beginPath(),r.moveTo(D,I+B),r.lineTo(D,I+F-B),r.quadraticCurveTo(D,I+F,D+B,I+F),r.lineTo(D+L-B,I+F),r.quadraticCurveTo(D+L,I+F,D+L,I+F-B),r.lineTo(D+L,I+B),r.quadraticCurveTo(D+L,I,D+L-B,I),r.lineTo(D+B,I),r.quadraticCurveTo(D,I,D,I+B),r.closePath(),(l.fillColor||0===l.fillColor)&&(r.globalAlpha=l.fillAlpha*n,r.fillStyle="#"+("00000"+(0|h).toString(16)).substr(-6),r.fill()),l.lineWidth&&(r.globalAlpha=l.lineAlpha*n,r.strokeStyle="#"+("00000"+(0|c).toString(16)).substr(-6),r.stroke())}}},t.prototype.updateGraphicsTint=function(t){t._prevTint=t.tint,t.canvasTintDirty=t.dirty;for(var e=(t.tint>>16&255)/255,r=(t.tint>>8&255)/255,n=(255&t.tint)/255,i=0;i>16&255)/255*e*255<<16)+((s>>8&255)/255*r*255<<8)+(255&s)/255*n*255,o._lineTint=((a>>16&255)/255*e*255<<16)+((a>>8&255)/255*r*255<<8)+(255&a)/255*n*255}},t.prototype.renderPolygon=function(t,e,r){r.moveTo(t[0],t[1]);for(var n=1;n9&&void 0!==arguments[9]?arguments[9]:[],h=0,c=0,p=0,d=0,f=0;u.push(t,e);for(var g=1,v=0;g<=l;++g)p=(c=(h=1-(v=g/l))*h)*h,f=(d=v*v)*v,u.push(p*t+3*c*v*r+3*h*d*i+f*s,p*e+3*c*v*n+3*h*d*o+f*a);return u}},{}],57:[function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}r.__esModule=!0;var i=t("../../utils"),o=t("../../const"),s=t("../../renderers/webgl/utils/ObjectRenderer"),a=n(s),l=t("../../renderers/webgl/WebGLRenderer"),u=n(l),h=t("./WebGLGraphicsData"),c=n(h),p=t("./shaders/PrimitiveShader"),d=n(p),f=t("./utils/buildPoly"),g=n(f),v=t("./utils/buildRectangle"),m=n(v),y=t("./utils/buildRoundedRectangle"),x=n(y),b=t("./utils/buildCircle"),_=n(b),T=function(t){function e(r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var n=function(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}(this,t.call(this,r));return n.graphicsDataPool=[],n.primitiveShader=null,n.gl=r.gl,n.CONTEXT_UID=0,n}return function(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)}(e,t),e.prototype.onContextChange=function(){this.gl=this.renderer.gl,this.CONTEXT_UID=this.renderer.CONTEXT_UID,this.primitiveShader=new d.default(this.gl)},e.prototype.destroy=function(){a.default.prototype.destroy.call(this);for(var t=0;t32e4)&&((n=this.graphicsDataPool.pop()||new c.default(this.renderer.gl,this.primitiveShader,this.renderer.state.attribsState)).nativeLines=r,n.reset(e),t.data.push(n)),n.dirty=!0,n},e}(a.default);r.default=T,u.default.registerPlugin("graphics",T)},{"../../const":46,"../../renderers/webgl/WebGLRenderer":84,"../../renderers/webgl/utils/ObjectRenderer":94,"../../utils":125,"./WebGLGraphicsData":58,"./shaders/PrimitiveShader":59,"./utils/buildCircle":60,"./utils/buildPoly":62,"./utils/buildRectangle":63,"./utils/buildRoundedRectangle":64}],58:[function(t,e,r){"use strict";r.__esModule=!0;var n=t("pixi-gl-core"),i=function(t){return t&&t.__esModule?t:{default:t}}(n),o=function(){function t(e,r,n){(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")})(this,t),this.gl=e,this.color=[0,0,0],this.points=[],this.indices=[],this.buffer=i.default.GLBuffer.createVertexBuffer(e),this.indexBuffer=i.default.GLBuffer.createIndexBuffer(e),this.dirty=!0,this.nativeLines=!1,this.glPoints=null,this.glIndices=null,this.shader=r,this.vao=new i.default.VertexArrayObject(e,n).addIndex(this.indexBuffer).addAttribute(this.buffer,r.attributes.aVertexPosition,e.FLOAT,!1,24,0).addAttribute(this.buffer,r.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}();r.default=o},{"pixi-gl-core":15}],59:[function(t,e,r){"use strict";r.__esModule=!0;var n=t("../../../Shader"),i=function(t){return t&&t.__esModule?t:{default:t}}(n),o=function(t){function e(r){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(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}(this,t.call(this,r,["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 function(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)}(e,t),e}(i.default);r.default=o},{"../../../Shader":44}],60:[function(t,e,r){"use strict";r.__esModule=!0,r.default=function(t,e,r){var n=t.shape,a=n.x,l=n.y,u=void 0,h=void 0;if(t.type===o.SHAPES.CIRC?(u=n.radius,h=n.radius):(u=n.width,h=n.height),0!==u&&0!==h){var c=Math.floor(30*Math.sqrt(n.radius))||Math.floor(15*Math.sqrt(n.width+n.height)),p=2*Math.PI/c;if(t.fill){var d=(0,s.hex2rgb)(t.fillColor),f=t.fillAlpha,g=d[0]*f,v=d[1]*f,m=d[2]*f,y=e.points,x=e.indices,b=y.length/6;x.push(b);for(var _=0;_196*f*f?(O=A-M,P=C-R,D=Math.sqrt(O*O+P*P),O/=D,P/=D,O*=f,P*=f,u.push(T-O*L,w-P*L),u.push(m,y,x,v),u.push(T+O*F,w+P*F),u.push(m,y,x,v),u.push(T-O*F*L,w-P*L),u.push(m,y,x,v),p++):(u.push(T+(V-T)*L,w+(z-w)*L),u.push(m,y,x,v),u.push(T-(V-T)*F,w-(z-w)*F),u.push(m,y,x,v))}}b=r[2*(c-2)],_=r[2*(c-2)+1],T=r[2*(c-1)],w=r[2*(c-1)+1],A=-(_-w),C=b-T,D=Math.sqrt(A*A+C*C),A/=D,C/=D,A*=f,C*=f,u.push(T-A*L,w-C*L),u.push(m,y,x,v),u.push(T+A*F,w+C*F),u.push(m,y,x,v),h.push(d);for(var Y=0;Y=6){for(var i=[],a=t.holes,u=0;u0&&(0,o.default)(t,e,r)};var i=t("./buildLine"),o=n(i),s=t("../../../utils"),a=t("earcut"),l=n(a)},{"../../../utils":125,"./buildLine":61,earcut:2}],63:[function(t,e,r){"use strict";r.__esModule=!0,r.default=function(t,e,r){var n=t.shape,s=n.x,a=n.y,l=n.width,u=n.height;if(t.fill){var h=(0,o.hex2rgb)(t.fillColor),c=t.fillAlpha,p=h[0]*c,d=h[1]*c,f=h[2]*c,g=e.points,v=e.indices,m=g.length/6;g.push(s,a),g.push(p,d,f,c),g.push(s+l,a),g.push(p,d,f,c),g.push(s,a+u),g.push(p,d,f,c),g.push(s+l,a+u),g.push(p,d,f,c),v.push(m,m,m+1,m+2,m+3,m+3)}if(t.lineWidth){var y=t.points;t.points=[s,a,s+l,a,s+l,a+u,s,a+u,s,a],(0,i.default)(t,e,r),t.points=y}};var n=t("./buildLine"),i=function(t){return t&&t.__esModule?t:{default:t}}(n),o=t("../../../utils")},{"../../../utils":125,"./buildLine":61}],64:[function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}function i(t,e,r){return t+(e-t)*r}function o(t,e,r,n,o,s){for(var a=arguments.length>6&&void 0!==arguments[6]?arguments[6]:[],l=a,u=0,h=0,c=0,p=0,d=0,f=0,g=0,v=0;g<=20;++g)u=i(t,r,v=g/20),h=i(e,n,v),c=i(r,o,v),p=i(n,s,v),d=i(u,c,v),f=i(h,p,v),l.push(d,f);return l}r.__esModule=!0,r.default=function(t,e,r){var n=t.shape,i=n.x,s=n.y,l=n.width,c=n.height,p=n.radius,d=[];if(d.push(i+p,s),o(i+l-p,s,i+l,s,i+l,s+p,d),o(i+l,s+c-p,i+l,s+c,i+l-p,s+c,d),o(i+p,s+c,i,s+c,i,s+c-p,d),o(i,s+p,i,s,i+p+1e-10,s,d),t.fill){for(var f=(0,h.hex2rgb)(t.fillColor),g=t.fillAlpha,v=f[0]*g,m=f[1]*g,y=f[2]*g,x=e.points,b=e.indices,_=x.length/6,T=(0,a.default)(d,null,2),w=0,E=T.length;w0?1:0}r.__esModule=!0;var i=t("./Matrix"),o=function(t){return t&&t.__esModule?t:{default:t}}(i),s=[1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1,0,1],a=[0,1,1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1],l=[0,-1,-1,-1,0,1,1,1,0,1,1,1,0,-1,-1,-1],u=[1,1,0,-1,-1,-1,0,1,-1,-1,0,1,1,1,0,-1],h=[],c=[];!function(){for(var t=0;t<16;t++){var e=[];c.push(e);for(var r=0;r<16;r++)for(var i=n(s[t]*s[r]+l[t]*a[r]),p=n(a[t]*s[r]+u[t]*a[r]),d=n(s[t]*l[r]+l[t]*u[r]),f=n(a[t]*l[r]+u[t]*u[r]),g=0;g<16;g++)if(s[g]===i&&a[g]===p&&l[g]===d&&u[g]===f){e.push(g);break}}for(var v=0;v<16;v++){var m=new o.default;m.set(s[v],a[v],l[v],u[v],0,0),h.push(m)}}();var p={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 s[t]},uY:function(t){return a[t]},vX:function(t){return l[t]},vY:function(t){return u[t]},inv:function(t){return 8&t?15&t:7&-t},add:function(t,e){return c[t][e]},sub:function(t,e){return c[t][p.inv(e)]},rotate180:function(t){return 4^t},isVertical:function(t){return 2==(3&t)},byDirection:function(t,e){return 2*Math.abs(t)<=Math.abs(e)?e>=0?p.S:p.N:2*Math.abs(e)<=Math.abs(t)?t>0?p.E:p.W:e>0?t>0?p.SE:p.SW:t>0?p.NE:p.NW},matrixAppendRotationInv:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,i=h[p.inv(e)];i.tx=r,i.ty=n,t.append(i)}};r.default=p},{"./Matrix":67}],67:[function(t,e,r){"use strict";r.__esModule=!0;var n=function(){function t(t,e){for(var r=0;r0&&void 0!==arguments[0]?arguments[0]:1,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,s=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0;(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")})(this,t),this.a=e,this.b=r,this.c=n,this.d=i,this.tx=o,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,r,n,i,o){return this.a=t,this.b=e,this.c=r,this.d=n,this.tx=i,this.ty=o,this},t.prototype.toArray=function(t,e){this.array||(this.array=new Float32Array(9));var r=e||this.array;return t?(r[0]=this.a,r[1]=this.b,r[2]=0,r[3]=this.c,r[4]=this.d,r[5]=0,r[6]=this.tx,r[7]=this.ty,r[8]=1):(r[0]=this.a,r[1]=this.c,r[2]=this.tx,r[3]=this.b,r[4]=this.d,r[5]=this.ty,r[6]=0,r[7]=0,r[8]=1),r},t.prototype.apply=function(t,e){e=e||new o.default;var r=t.x,n=t.y;return e.x=this.a*r+this.c*n+this.tx,e.y=this.b*r+this.d*n+this.ty,e},t.prototype.applyInverse=function(t,e){e=e||new o.default;var r=1/(this.a*this.d+this.c*-this.b),n=t.x,i=t.y;return e.x=this.d*r*n+-this.c*r*i+(this.ty*this.c-this.tx*this.d)*r,e.y=this.a*r*i+-this.b*r*n+(-this.ty*this.a+this.tx*this.b)*r,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),r=Math.sin(t),n=this.a,i=this.c,o=this.tx;return this.a=n*e-this.b*r,this.b=n*r+this.b*e,this.c=i*e-this.d*r,this.d=i*r+this.d*e,this.tx=o*e-this.ty*r,this.ty=o*r+this.ty*e,this},t.prototype.append=function(t){var e=this.a,r=this.b,n=this.c,i=this.d;return this.a=t.a*e+t.b*n,this.b=t.a*r+t.b*i,this.c=t.c*e+t.d*n,this.d=t.c*r+t.d*i,this.tx=t.tx*e+t.ty*n+this.tx,this.ty=t.tx*r+t.ty*i+this.ty,this},t.prototype.setTransform=function(t,e,r,n,i,o,s,a,l){return this.a=Math.cos(s+l)*i,this.b=Math.sin(s+l)*i,this.c=-Math.sin(s-a)*o,this.d=Math.cos(s-a)*o,this.tx=t-(r*this.a+n*this.c),this.ty=e-(r*this.b+n*this.d),this},t.prototype.prepend=function(t){var e=this.tx;if(1!==t.a||0!==t.b||0!==t.c||1!==t.d){var r=this.a,n=this.c;this.a=r*t.a+this.b*t.c,this.b=r*t.b+this.b*t.d,this.c=n*t.a+this.d*t.c,this.d=n*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,r=this.b,n=this.c,i=this.d,o=-Math.atan2(-n,i),a=Math.atan2(r,e),l=Math.abs(o+a);return l<1e-5||Math.abs(s.PI_2-l)<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.rotation=0,t.skew.x=o,t.skew.y=a),t.scale.x=Math.sqrt(e*e+r*r),t.scale.y=Math.sqrt(n*n+i*i),t.position.x=this.tx,t.position.y=this.ty,t},t.prototype.invert=function(){var t=this.a,e=this.b,r=this.c,n=this.d,i=this.tx,o=t*n-e*r;return this.a=n/o,this.b=-e/o,this.c=-r/o,this.d=t/o,this.tx=(r*this.ty-n*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},n(t,null,[{key:"IDENTITY",get:function(){return new t}},{key:"TEMP_MATRIX",get:function(){return new t}}]),t}();r.default=a},{"../const":46,"./Point":69}],68:[function(t,e,r){"use strict";r.__esModule=!0;var n=function(){function t(t,e){for(var r=0;r2&&void 0!==arguments[2]?arguments[2]:0,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")})(this,t),this._x=n,this._y=i,this.cb=e,this.scope=r}return t.prototype.clone=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return new t(e||this.cb,r||this.scope,this._x,this._y)},t.prototype.set=function(t,e){var r=t||0,n=e||(0!==e?r:0);this._x===r&&this._y===n||(this._x=r,this._y=n,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))},t.prototype.equals=function(t){return t.x===this._x&&t.y===this._y},n(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}();r.default=i},{}],69:[function(t,e,r){"use strict";r.__esModule=!0;var n=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")})(this,t),this.x=e,this.y=r}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}();r.default=n},{}],70:[function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}r.__esModule=!0;var i=t("./Point");Object.defineProperty(r,"Point",{enumerable:!0,get:function(){return n(i).default}});var o=t("./ObservablePoint");Object.defineProperty(r,"ObservablePoint",{enumerable:!0,get:function(){return n(o).default}});var s=t("./Matrix");Object.defineProperty(r,"Matrix",{enumerable:!0,get:function(){return n(s).default}});var a=t("./GroupD8");Object.defineProperty(r,"GroupD8",{enumerable:!0,get:function(){return n(a).default}});var l=t("./shapes/Circle");Object.defineProperty(r,"Circle",{enumerable:!0,get:function(){return n(l).default}});var u=t("./shapes/Ellipse");Object.defineProperty(r,"Ellipse",{enumerable:!0,get:function(){return n(u).default}});var h=t("./shapes/Polygon");Object.defineProperty(r,"Polygon",{enumerable:!0,get:function(){return n(h).default}});var c=t("./shapes/Rectangle");Object.defineProperty(r,"Rectangle",{enumerable:!0,get:function(){return n(c).default}});var p=t("./shapes/RoundedRectangle");Object.defineProperty(r,"RoundedRectangle",{enumerable:!0,get:function(){return n(p).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,r){"use strict";r.__esModule=!0;var n=t("./Rectangle"),i=function(t){return t&&t.__esModule?t:{default:t}}(n),o=t("../../const"),s=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")})(this,t),this.x=e,this.y=r,this.radius=n,this.type=o.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 r=this.radius*this.radius,n=this.x-t,i=this.y-e;return(n*=n)+(i*=i)<=r},t.prototype.getBounds=function(){return new i.default(this.x-this.radius,this.y-this.radius,2*this.radius,2*this.radius)},t}();r.default=s},{"../../const":46,"./Rectangle":74}],72:[function(t,e,r){"use strict";r.__esModule=!0;var n=t("./Rectangle"),i=function(t){return t&&t.__esModule?t:{default:t}}(n),o=t("../../const"),s=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")})(this,t),this.x=e,this.y=r,this.width=n,this.height=i,this.type=o.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 r=(t-this.x)/this.width,n=(e-this.y)/this.height;return(r*=r)+(n*=n)<=1},t.prototype.getBounds=function(){return new i.default(this.x-this.width,this.y-this.height,this.width,this.height)},t}();r.default=s},{"../../const":46,"./Rectangle":74}],73:[function(t,e,r){"use strict";r.__esModule=!0;var n=t("../Point"),i=function(t){return t&&t.__esModule?t:{default:t}}(n),o=t("../../const"),s=function(){function t(){for(var e=arguments.length,r=Array(e),n=0;ne!=u>e&&t<(e-a)/(u-a)*(l-s)+s&&(r=!r)}return r},t}();r.default=s},{"../../const":46,"../Point":69}],74:[function(t,e,r){"use strict";r.__esModule=!0;var n=function(){function t(t,e){for(var r=0;r0&&void 0!==arguments[0]?arguments[0]:0,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")})(this,t),this.x=Number(e),this.y=Number(r),this.width=Number(n),this.height=Number(o),this.type=i.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.y&&et.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),r=Math.max(this.x+this.width,t.x+t.width),n=Math.min(this.y,t.y),i=Math.max(this.y+this.height,t.y+t.height);this.x=e,this.width=r-e,this.y=n,this.height=i-n},t.prototype.ceil=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.001,r=Math.ceil((this.x+this.width-e)*t)/t,n=Math.ceil((this.y+this.height-e)*t)/t;this.x=Math.floor((this.x+e)*t)/t,this.y=Math.floor((this.y+e)*t)/t,this.width=r-this.x,this.height=n-this.y},n(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}();r.default=o},{"../../const":46}],75:[function(t,e,r){"use strict";r.__esModule=!0;var n=t("../../const"),i=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,r=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,s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:20;(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")})(this,t),this.x=e,this.y=r,this.width=i,this.height=o,this.radius=s,this.type=n.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 r=t-(this.x+this.radius),n=e-(this.y+this.radius),i=this.radius*this.radius;if(r*r+n*n<=i)return!0;if((r=t-(this.x+this.width-this.radius))*r+n*n<=i)return!0;if(n=e-(this.y+this.height-this.radius),r*r+n*n<=i)return!0;if((r=t-(this.x+this.radius))*r+n*n<=i)return!0}return!1},t}();r.default=i},{"../../const":46}],76:[function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}r.__esModule=!0;var i=function(){function t(t,e){for(var r=0;r0){u=0;for(var p=0;p=2;v-=2)e.lineTo(a[v],a[v+1])}}}else if(o.type===n.SHAPES.RECT)e.rect(s.x,s.y,s.width,s.height),e.closePath();else if(o.type===n.SHAPES.CIRC)e.arc(s.x,s.y,s.radius,0,2*Math.PI),e.closePath();else if(o.type===n.SHAPES.ELIP){var m=2*s.width,y=2*s.height,x=s.x-m/2,b=s.y-y/2,_=m/2*.5522848,T=y/2*.5522848,w=x+m,E=b+y,S=x+m/2,A=b+y/2;e.moveTo(x,A),e.bezierCurveTo(x,A-T,S-_,b,S,b),e.bezierCurveTo(S+_,b,w,A-T,w,A),e.bezierCurveTo(w,A+T,S+_,E,S,E),e.bezierCurveTo(S-_,E,x,A+T,x,A),e.closePath()}else if(o.type===n.SHAPES.RREC){var C=s.x,M=s.y,R=s.width,O=s.height,P=s.radius,D=Math.min(R,O)/2|0;P=P>D?D:P,e.moveTo(C,M+P),e.lineTo(C,M+O-P),e.quadraticCurveTo(C,M+O,C+P,M+O),e.lineTo(C+R-P,M+O),e.quadraticCurveTo(C+R,M+O,C+R,M+O-P),e.lineTo(C+R,M+P),e.quadraticCurveTo(C+R,M,C+R-P,M),e.lineTo(C+P,M),e.quadraticCurveTo(C,M,C,M+P),e.closePath()}}}},t.prototype.popMask=function(t){t.context.restore(),t.invalidateBlendMode()},t.prototype.destroy=function(){},t}();r.default=i},{"../../../const":46}],79:[function(t,e,r){"use strict";r.__esModule=!0;var n=function(){function t(t,e){for(var r=0;r0&&void 0!==arguments[0]?arguments[0]:[];return(0,o.default)()?(t[n.BLEND_MODES.NORMAL]="source-over",t[n.BLEND_MODES.ADD]="lighter",t[n.BLEND_MODES.MULTIPLY]="multiply",t[n.BLEND_MODES.SCREEN]="screen",t[n.BLEND_MODES.OVERLAY]="overlay",t[n.BLEND_MODES.DARKEN]="darken",t[n.BLEND_MODES.LIGHTEN]="lighten",t[n.BLEND_MODES.COLOR_DODGE]="color-dodge",t[n.BLEND_MODES.COLOR_BURN]="color-burn",t[n.BLEND_MODES.HARD_LIGHT]="hard-light",t[n.BLEND_MODES.SOFT_LIGHT]="soft-light",t[n.BLEND_MODES.DIFFERENCE]="difference",t[n.BLEND_MODES.EXCLUSION]="exclusion",t[n.BLEND_MODES.HUE]="hue",t[n.BLEND_MODES.SATURATION]="saturate",t[n.BLEND_MODES.COLOR]="color",t[n.BLEND_MODES.LUMINOSITY]="luminosity"):(t[n.BLEND_MODES.NORMAL]="source-over",t[n.BLEND_MODES.ADD]="lighter",t[n.BLEND_MODES.MULTIPLY]="source-over",t[n.BLEND_MODES.SCREEN]="source-over",t[n.BLEND_MODES.OVERLAY]="source-over",t[n.BLEND_MODES.DARKEN]="source-over",t[n.BLEND_MODES.LIGHTEN]="source-over",t[n.BLEND_MODES.COLOR_DODGE]="source-over",t[n.BLEND_MODES.COLOR_BURN]="source-over",t[n.BLEND_MODES.HARD_LIGHT]="source-over",t[n.BLEND_MODES.SOFT_LIGHT]="source-over",t[n.BLEND_MODES.DIFFERENCE]="source-over",t[n.BLEND_MODES.EXCLUSION]="source-over",t[n.BLEND_MODES.HUE]="source-over",t[n.BLEND_MODES.SATURATION]="source-over",t[n.BLEND_MODES.COLOR]="source-over",t[n.BLEND_MODES.LUMINOSITY]="source-over"),t[n.BLEND_MODES.NORMAL_NPM]=t[n.BLEND_MODES.NORMAL],t[n.BLEND_MODES.ADD_NPM]=t[n.BLEND_MODES.ADD],t[n.BLEND_MODES.SCREEN_NPM]=t[n.BLEND_MODES.SCREEN],t};var n=t("../../../const"),i=t("./canUseNewCanvasBlendModes"),o=function(t){return t&&t.__esModule?t:{default:t}}(i)},{"../../../const":46,"./canUseNewCanvasBlendModes":80}],82:[function(t,e,r){"use strict";r.__esModule=!0;var n=t("../../const"),i=t("../../settings"),o=function(t){return t&&t.__esModule?t:{default:t}}(i),s=function(){function t(e){(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")})(this,t),this.renderer=e,this.count=0,this.checkCount=0,this.maxIdle=o.default.GC_MAX_IDLE,this.checkCountMax=o.default.GC_MAX_CHECK_COUNT,this.mode=o.default.GC_MODE}return t.prototype.update=function(){this.count++,this.mode!==n.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,r=!1,n=0;nthis.maxIdle&&(t.destroyTexture(i,!0),e[n]=null,r=!0)}if(r){for(var o=0,s=0;s=0;r--)this.unload(t.children[r])},t}();r.default=s},{"../../const":46,"../../settings":101}],83:[function(t,e,r){"use strict";r.__esModule=!0;var n=t("pixi-gl-core"),i=t("../../const"),o=t("./utils/RenderTarget"),s=function(t){return t&&t.__esModule?t:{default:t}}(o),a=t("../../utils"),l=function(){function t(e){(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")})(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 r=this.gl,o=!!t._glRenderTargets;if(!t.hasLoaded)return null;var a=this.renderer.boundTextures;if(void 0===e){e=0;for(var l=0;l 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}();r.default=p},{"../../../const":46,"../../../settings":101,"../../../utils":125,"./extractUniformsFromSrc":87}],87:[function(t,e,r){"use strict";function n(t){for(var e=new RegExp("^(projectionMatrix|uSampler|filterArea|filterClamp)$"),r={},n=void 0,i=t.replace(/\s+/g," ").split(/\s*;\s*/),o=0;o-1){var l=a.split(" "),u=l[1],h=l[2],c=1;h.indexOf("[")>-1&&(n=h.split(/\[|]/),h=n[0],c*=Number(n[1])),h.match(e)||(r[h]={value:s(u,c),name:h,type:u})}}return r}r.__esModule=!0,r.default=function(t,e,r){var i=n(t),o=n(e);return Object.assign(i,o)};var i=t("pixi-gl-core"),o=function(t){return t&&t.__esModule?t:{default:t}}(i),s=o.default.shader.defaultValue},{"pixi-gl-core":15}],88:[function(t,e,r){"use strict";r.__esModule=!0,r.calculateScreenSpaceMatrix=function(t,e,r){var n=t.identity();return n.translate(e.x/r.width,e.y/r.height),n.scale(r.width,r.height),n},r.calculateNormalizedScreenSpaceMatrix=function(t,e,r){var n=t.identity();n.translate(e.x/r.width,e.y/r.height);var i=r.width/e.width,o=r.height/e.height;return n.scale(i,o),n},r.calculateSpriteMatrix=function(t,e,r,i){var o=i._texture.orig,s=t.set(r.width,0,0,r.height,e.x,e.y),a=i.worldTransform.copy(n.Matrix.TEMP_MATRIX);return a.invert(),s.prepend(a),s.scale(1/o.width,1/o.height),s.translate(i.anchor.x,i.anchor.y),s};var n=t("../../../math")},{"../../../math":70}],89:[function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}r.__esModule=!0;var i=t("../Filter"),o=n(i),s=t("../../../../math"),a=(t("path"),t("../../../../textures/TextureMatrix")),l=n(a),u=function(t){function e(r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var n=new s.Matrix,i=function(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}(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 sampler2D mask;\nuniform float alpha;\nuniform vec4 maskClamp;\n\nvoid main(void)\n{\n float clip = step(3.5,\n step(maskClamp.x, vMaskCoord.x) +\n step(maskClamp.y, vMaskCoord.y) +\n step(vMaskCoord.x, maskClamp.z) +\n step(vMaskCoord.y, maskClamp.w));\n\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 r.renderable=!1,i.maskSprite=r,i.maskMatrix=n,i}return function(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)}(e,t),e.prototype.apply=function(t,e,r){var n=this.maskSprite,i=this.maskSprite.texture;i.valid&&(i.transform||(i.transform=new l.default(i,0)),i.transform.update(),this.uniforms.mask=i,this.uniforms.otherMatrix=t.calculateSpriteMatrix(this.maskMatrix,n).prepend(i.transform.mapCoord),this.uniforms.alpha=n.worldAlpha,this.uniforms.maskClamp=i.transform.uClampFrame,t.applyFilter(this,e,r))},e}(o.default);r.default=u},{"../../../../math":70,"../../../../textures/TextureMatrix":116,"../Filter":86,path:8}],90:[function(t,e,r){"use strict";function n(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")}r.__esModule=!0;var o=t("./WebGLManager"),s=n(o),a=t("../utils/RenderTarget"),l=n(a),u=t("../utils/Quad"),h=n(u),c=t("../../../math"),p=t("../../../Shader"),d=n(p),f=t("../filters/filterTransforms"),g=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}(f),v=t("bit-twiddle"),m=n(v),y=function(){function t(){i(this,t),this.renderTarget=null,this.target=null,this.resolution=1,this.sourceFrame=new c.Rectangle,this.destinationFrame=new c.Rectangle,this.filters=[]}return t.prototype.clear=function(){this.filters=null,this.target=null,this.renderTarget=null},t}(),x=function(t){function e(r){i(this,e);var n=function(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}(this,t.call(this,r));return n.gl=n.renderer.gl,n.quad=new h.default(n.gl,r.state.attribState),n.shaderCache={},n.pool={},n.filterData=null,n.managedFilters=[],n.renderer.on("prerender",n.onPrerender,n),n._screenWidth=r.view.width,n._screenHeight=r.view.height,n}return function(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)}(e,t),e.prototype.pushFilter=function(t,e){var r=this.renderer,n=this.filterData;if(!n){n=this.renderer._activeRenderTarget.filterStack;var i=new y;i.sourceFrame=i.destinationFrame=this.renderer._activeRenderTarget.size,i.renderTarget=r._activeRenderTarget,this.renderer._activeRenderTarget.filterData=n={index:0,stack:[i]},this.filterData=n}var o=n.stack[++n.index],s=n.stack[0].destinationFrame;o||(o=n.stack[n.index]=new y);var a=t.filterArea&&0===t.filterArea.x&&0===t.filterArea.y&&t.filterArea.width===r.screen.width&&t.filterArea.height===r.screen.height,l=e[0].resolution,u=0|e[0].padding,h=a?r.screen:t.filterArea||t.getBounds(!0),c=o.sourceFrame,p=o.destinationFrame;c.x=(h.x*l|0)/l,c.y=(h.y*l|0)/l,c.width=(h.width*l|0)/l,c.height=(h.height*l|0)/l,a||(n.stack[0].renderTarget.transform||e[0].autoFit&&c.fit(s),c.pad(u)),p.width=c.width,p.height=c.height;var d=this.getPotRenderTarget(r.gl,c.width,c.height,l);o.target=t,o.filters=e,o.resolution=l,o.renderTarget=d,d.setFrame(p,c),r.bindRenderTarget(d),d.clear()},e.prototype.popFilter=function(){var t=this.filterData,e=t.stack[t.index-1],r=t.stack[t.index];this.quad.map(r.renderTarget.size,r.sourceFrame).upload();var n=r.filters;if(1===n.length)n[0].apply(this,r.renderTarget,e.renderTarget,!1,r),this.freePotRenderTarget(r.renderTarget);else{var i=r.renderTarget,o=this.getPotRenderTarget(this.renderer.gl,r.sourceFrame.width,r.sourceFrame.height,r.resolution);o.setFrame(r.destinationFrame,r.sourceFrame),o.clear();var s=0;for(s=0;s0&&void 0!==arguments[0]&&arguments[0],e=this.renderer,r=this.managedFilters;e.off("prerender",this.onPrerender,this);for(var n=0;n0&&(e+="\nelse "),r1&&void 0!==arguments[1]?arguments[1]:[];return e[n.BLEND_MODES.NORMAL]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[n.BLEND_MODES.ADD]=[t.ONE,t.DST_ALPHA],e[n.BLEND_MODES.MULTIPLY]=[t.DST_COLOR,t.ONE_MINUS_SRC_ALPHA],e[n.BLEND_MODES.SCREEN]=[t.ONE,t.ONE_MINUS_SRC_COLOR],e[n.BLEND_MODES.OVERLAY]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[n.BLEND_MODES.DARKEN]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[n.BLEND_MODES.LIGHTEN]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[n.BLEND_MODES.COLOR_DODGE]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[n.BLEND_MODES.COLOR_BURN]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[n.BLEND_MODES.HARD_LIGHT]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[n.BLEND_MODES.SOFT_LIGHT]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[n.BLEND_MODES.DIFFERENCE]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[n.BLEND_MODES.EXCLUSION]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[n.BLEND_MODES.HUE]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[n.BLEND_MODES.SATURATION]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[n.BLEND_MODES.COLOR]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[n.BLEND_MODES.LUMINOSITY]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[n.BLEND_MODES.NORMAL_NPM]=[t.SRC_ALPHA,t.ONE_MINUS_SRC_ALPHA,t.ONE,t.ONE_MINUS_SRC_ALPHA],e[n.BLEND_MODES.ADD_NPM]=[t.SRC_ALPHA,t.DST_ALPHA,t.ONE,t.DST_ALPHA],e[n.BLEND_MODES.SCREEN_NPM]=[t.SRC_ALPHA,t.ONE_MINUS_SRC_COLOR,t.ONE,t.ONE_MINUS_SRC_COLOR],e};var n=t("../../../const")},{"../../../const":46}],99:[function(t,e,r){"use strict";r.__esModule=!0,r.default=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e[n.DRAW_MODES.POINTS]=t.POINTS,e[n.DRAW_MODES.LINES]=t.LINES,e[n.DRAW_MODES.LINE_LOOP]=t.LINE_LOOP,e[n.DRAW_MODES.LINE_STRIP]=t.LINE_STRIP,e[n.DRAW_MODES.TRIANGLES]=t.TRIANGLES,e[n.DRAW_MODES.TRIANGLE_STRIP]=t.TRIANGLE_STRIP,e[n.DRAW_MODES.TRIANGLE_FAN]=t.TRIANGLE_FAN,e};var n=t("../../../const")},{"../../../const":46}],100:[function(t,e,r){"use strict";r.__esModule=!0,r.default=function(t){t.getContextAttributes().stencil||console.warn("Provided WebGL context does not have a stencil buffer, masks may not render correctly")}},{}],101:[function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}r.__esModule=!0;var i=t("./utils/maxRecommendedTextures"),o=n(i),s=t("./utils/canUploadSameBuffer"),a=n(s);r.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,a.default)(),MESH_CANVAS_PADDING:0}},{"./utils/canUploadSameBuffer":122,"./utils/maxRecommendedTextures":127}],102:[function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}r.__esModule=!0;var i=function(){function t(t,e){for(var r=0;r=n&&p.x=i&&p.y>16)+(65280&t)+((255&t)<<16)}},{key:"texture",get:function(){return this._texture},set:function(t){this._texture!==t&&(this._texture=t||u.default.EMPTY,this.cachedTint=16777215,this._textureID=-1,this._textureTrimmedID=-1,t&&(t.baseTexture.hasLoaded?this._onTextureUpdate():t.once("update",this._onTextureUpdate,this)))}}]),e}(c.default);r.default=d},{"../const":46,"../display/Container":48,"../math":70,"../textures/Texture":115,"../utils":125}],103:[function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}r.__esModule=!0;var i=t("../../renderers/canvas/CanvasRenderer"),o=n(i),s=t("../../const"),a=t("../../math"),l=t("./CanvasTinter"),u=n(l),h=new a.Matrix,c=function(){function t(e){(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")})(this,t),this.renderer=e}return t.prototype.render=function(t){var e=t._texture,r=this.renderer,n=e._frame.width,i=e._frame.height,o=t.transform.worldTransform,l=0,c=0;if(!(e.orig.width<=0||e.orig.height<=0)&&e.baseTexture.source&&(r.setBlendMode(t.blendMode),e.valid)){r.context.globalAlpha=t.worldAlpha;var p=e.baseTexture.scaleMode===s.SCALE_MODES.LINEAR;r.smoothProperty&&r.context[r.smoothProperty]!==p&&(r.context[r.smoothProperty]=p),e.trim?(l=e.trim.width/2+e.trim.x-t.anchor.x*e.orig.width,c=e.trim.height/2+e.trim.y-t.anchor.y*e.orig.height):(l=(.5-t.anchor.x)*e.orig.width,c=(.5-t.anchor.y)*e.orig.height),e.rotate&&(o.copy(h),o=h,a.GroupD8.matrixAppendRotationInv(o,e.rotate,l,c),l=0,c=0),l-=n/2,c-=i/2,r.roundPixels?(r.context.setTransform(o.a,o.b,o.c,o.d,o.tx*r.resolution|0,o.ty*r.resolution|0),l|=0,c|=0):r.context.setTransform(o.a,o.b,o.c,o.d,o.tx*r.resolution,o.ty*r.resolution);var d=e.baseTexture.resolution;16777215!==t.tint?(t.cachedTint===t.tint&&t.tintedTexture.tintId===t._texture._updateID||(t.cachedTint=t.tint,t.tintedTexture=u.default.getTintedTexture(t,t.tint)),r.context.drawImage(t.tintedTexture,0,0,n*d,i*d,l*r.resolution,c*r.resolution,n*r.resolution,i*r.resolution)):r.context.drawImage(e.baseTexture.source,e._frame.x*d,e._frame.y*d,n*d,i*d,l*r.resolution,c*r.resolution,n*r.resolution,i*r.resolution)}},t.prototype.destroy=function(){this.renderer=null},t}();r.default=c,o.default.registerPlugin("sprite",c)},{"../../const":46,"../../math":70,"../../renderers/canvas/CanvasRenderer":77,"./CanvasTinter":104}],104:[function(t,e,r){"use strict";r.__esModule=!0;var n=t("../../utils"),i=t("../../renderers/canvas/utils/canUseNewCanvasBlendModes"),o=function(t){return t&&t.__esModule?t:{default:t}}(i),s={getTintedTexture:function(t,e){var r=t._texture,n="#"+("00000"+(0|(e=s.roundColor(e))).toString(16)).substr(-6);r.tintCache=r.tintCache||{};var i=r.tintCache[n],o=void 0;if(i){if(i.tintId===r._updateID)return r.tintCache[n];o=r.tintCache[n]}else o=s.canvas||document.createElement("canvas");if(s.tintMethod(r,e,o),o.tintId=r._updateID,s.convertTintToImage){var a=new Image;a.src=o.toDataURL(),r.tintCache[n]=a}else r.tintCache[n]=o,s.canvas=null;return o},tintWithMultiply:function(t,e,r){var n=r.getContext("2d"),i=t._frame.clone(),o=t.baseTexture.resolution;i.x*=o,i.y*=o,i.width*=o,i.height*=o,r.width=Math.ceil(i.width),r.height=Math.ceil(i.height),n.save(),n.fillStyle="#"+("00000"+(0|e).toString(16)).substr(-6),n.fillRect(0,0,i.width,i.height),n.globalCompositeOperation="multiply",n.drawImage(t.baseTexture.source,i.x,i.y,i.width,i.height,0,0,i.width,i.height),n.globalCompositeOperation="destination-atop",n.drawImage(t.baseTexture.source,i.x,i.y,i.width,i.height,0,0,i.width,i.height),n.restore()},tintWithOverlay:function(t,e,r){var n=r.getContext("2d"),i=t._frame.clone(),o=t.baseTexture.resolution;i.x*=o,i.y*=o,i.width*=o,i.height*=o,r.width=Math.ceil(i.width),r.height=Math.ceil(i.height),n.save(),n.globalCompositeOperation="copy",n.fillStyle="#"+("00000"+(0|e).toString(16)).substr(-6),n.fillRect(0,0,i.width,i.height),n.globalCompositeOperation="destination-atop",n.drawImage(t.baseTexture.source,i.x,i.y,i.width,i.height,0,0,i.width,i.height),n.restore()},tintWithPerPixel:function(t,e,r){var i=r.getContext("2d"),o=t._frame.clone(),s=t.baseTexture.resolution;o.x*=s,o.y*=s,o.width*=s,o.height*=s,r.width=Math.ceil(o.width),r.height=Math.ceil(o.height),i.save(),i.globalCompositeOperation="copy",i.drawImage(t.baseTexture.source,o.x,o.y,o.width,o.height,0,0,o.width,o.height),i.restore();for(var a=(0,n.hex2rgb)(e),l=a[0],u=a[1],h=a[2],c=i.getImageData(0,0,o.width,o.height),p=c.data,d=0;d=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,r=T.default.nextPow2(this.currentIndex),n=T.default.log2(r),i=this.buffers[n],o=this.sprites,s=this.groups,a=i.float32View,l=i.uint32View,u=this.boundTextures,h=this.renderer.boundTextures,c=this.renderer.textureGC.count,p=0,d=void 0,f=void 0,g=1,v=0,x=s[0],_=void 0,S=void 0,A=y.premultiplyBlendMode[o[0]._texture.baseTexture.premultipliedAlpha?1:0][o[0].blendMode];x.textureCount=0,x.start=0,x.blend=A,w++;var C=void 0;for(C=0;C0&&(e+="\nelse "),r0&&(r.shadowColor=e.dropShadowColor);for(var d=Math.cos(e.dropShadowAngle)*e.dropShadowDistance,f=Math.sin(e.dropShadowAngle)*e.dropShadowDistance,g=0;g3&&void 0!==arguments[3]&&arguments[3],i=this._style,o=i.letterSpacing;if(0!==o)for(var s=String.prototype.split.call(t,""),a=e,l=0,u="";l3&&void 0!==arguments[3]?arguments[3]:t._canvas;n=null==n?r.wordWrap:n;var o=r.toFontString(),s=t.measureFont(o),a=i.getContext("2d");a.font=o;for(var l=n?t.wordWrap(e,r,i):e,u=l.split(/(?:\r\n|\r|\n)/),h=new Array(u.length),c=0,p=0;p2&&void 0!==arguments[2]?arguments[2]:t._canvas,i=n.getContext("2d"),o=0,s="",a="",l={},u=r.letterSpacing,h=r.whiteSpace,c=t.collapseSpaces(h),p=t.collapseNewlines(h),d=!c,f=r.wordWrapWidth+u,g=t.tokenize(e),v=0;vf)if(""!==s&&(a+=t.addLine(s),s="",o=0),t.canBreakWords(m,r.breakWords))for(var _=m.split(""),T=0;T<_.length;T++){for(var w=_[T],E=1;_[T+E];){var S=_[T+E],A=w[w.length-1];if(t.canBreakChars(A,S,m,T,r.breakWords))break;w+=S,E++}T+=w.length-1;var C=t.getFromCache(w,u,l,i);C+o>f&&(a+=t.addLine(s),d=!1,s="",o=0),s+=w,o+=C}else{s.length>0&&(a+=t.addLine(s),s="",o=0);var M=v===g.length-1;a+=t.addLine(m,!M),d=!1,s="",o=0}else b+o>f&&(d=!1,a+=t.addLine(s),s="",o=0),(s.length>0||!t.isBreakingSpace(m)||d)&&(s+=m,o+=b)}return a+=t.addLine(s,!1)},t.addLine=function(e){var r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return e=t.trimRight(e),e=r?e+"\n":e},t.getFromCache=function(t,e,r,n){var i=r[t];if(void 0===i){var o=t.length*e;i=n.measureText(t).width+o,r[t]=i}return i},t.collapseSpaces=function(t){return"normal"===t||"pre-line"===t},t.collapseNewlines=function(t){return"normal"===t},t.trimRight=function(e){if("string"!=typeof e)return"";for(var r=e.length-1;r>=0;r--){var n=e[r];if(!t.isBreakingSpace(n))break;e=e.slice(0,-1)}return e},t.isNewline=function(e){return"string"==typeof e&&t._newlines.indexOf(e.charCodeAt(0))>=0},t.isBreakingSpace=function(e){return"string"==typeof e&&t._breakingSpaces.indexOf(e.charCodeAt(0))>=0},t.tokenize=function(e){var r=[],n="";if("string"!=typeof e)return r;for(var i=0;ia;--p){for(var v=0;v0&&void 0!==arguments[0]?arguments[0]:"";e?delete t._fonts[e]:t._fonts={}},t}();r.default=n;var i=document.createElement("canvas");i.width=i.height=10,n._canvas=i,n._context=i.getContext("2d"),n._fonts={},n.METRICS_STRING="|Éq",n.BASELINE_SYMBOL="M",n.BASELINE_MULTIPLIER=1.4,n._newlines=[10,13],n._breakingSpaces=[9,32,8192,8193,8194,8195,8196,8197,8198,8200,8201,8202,8287,12288]},{}],110:[function(t,e,r){"use strict";function n(t){return"number"==typeof t?(0,l.hex2string)(t):("string"==typeof t&&0===t.indexOf("0x")&&(t=t.replace("0x","#")),t)}function i(t){if(Array.isArray(t)){for(var e=0;e=0;r--){var n=e[r].trim();!/([\"\'])[^\'\"]+\1/.test(n)&&h.indexOf(n)<0&&(n='"'+n+'"'),e[r]=n}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=i(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=i(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){(function(t,e){if(!Array.isArray(t)||!Array.isArray(e))return!1;if(t.length!==e.length)return!1;for(var r=0;r0&&void 0!==arguments[0]?arguments[0]:100,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:100,i=arguments[2],o=arguments[3];!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var s=function(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}(this,t.call(this,null,i));return s.resolution=o||a.default.RESOLUTION,s.width=Math.ceil(r),s.height=Math.ceil(n),s.realWidth=s.width*s.resolution,s.realHeight=s.height*s.resolution,s.scaleMode=void 0!==i?i:a.default.SCALE_MODE,s.hasLoaded=!0,s._glRenderTargets={},s._canvasRenderTarget=null,s.valid=!1,s}return function(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)}(e,t),e.prototype.resize=function(t,e){t=Math.ceil(t),e=Math.ceil(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}(o.default);r.default=l},{"../settings":101,"./BaseTexture":112}],112:[function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}r.__esModule=!0;var i=t("../utils"),o=t("../settings"),s=n(o),a=t("eventemitter3"),l=n(a),u=t("../utils/determineCrossOrigin"),h=n(u),c=t("bit-twiddle"),p=n(c),d=function(t){function e(r,n,o){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var a=function(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}(this,t.call(this));return a.uid=(0,i.uid)(),a.touched=0,a.resolution=o||s.default.RESOLUTION,a.width=100,a.height=100,a.realWidth=100,a.realHeight=100,a.scaleMode=void 0!==n?n:s.default.SCALE_MODE,a.hasLoaded=!1,a.isLoading=!1,a.source=null,a.origSource=null,a.imageType=null,a.sourceScale=1,a.premultipliedAlpha=!0,a.imageUrl=null,a.isPowerOfTwo=!1,a.mipmap=s.default.MIPMAP_TEXTURES,a.wrapMode=s.default.WRAP_MODE,a._glTextures={},a._enabled=0,a._virtalBoundId=-1,a._destroyed=!1,a.textureCacheIds=[],r&&a.loadSource(r),a}return function(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)}(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=p.default.isPow2(this.realWidth)&&p.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 r=!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(),r&&this.emit("loaded",this);else if(!t.getContext){this.isLoading=!0;var n=this;if(t.onload=function(){if(n._updateImageType(),t.onload=null,t.onerror=null,n.isLoading){if(n.isLoading=!1,n._sourceLoaded(),"svg"===n.imageType)return void n._loadSvgSource();n.emit("loaded",n)}},t.onerror=function(){t.onload=null,t.onerror=null,n.isLoading&&(n.isLoading=!1,n.emit("error",n))},t.complete&&t.src){if(t.onload=null,t.onerror=null,"svg"===n.imageType)return void n._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,i.decomposeDataUri)(this.imageUrl),e=void 0;if(t&&"image"===t.mediaType){var r=t.subType.split("+")[0];if(!(e=(0,i.getUrlFileExtension)("."+r)))throw new Error("Invalid image type in data URI.")}else(e=(0,i.getUrlFileExtension)(this.imageUrl))||(e="png");this.imageType=e}},e.prototype._loadSvgSource=function(){if("svg"===this.imageType){var t=(0,i.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 r=(0,i.getSvgSize)(t),n=r.width,o=r.height;if(!n||!o)throw new Error("The SVG image must have width and height defined (in pixels), canvas API needs them.");this.realWidth=Math.round(n*this.sourceScale),this.realHeight=Math.round(o*this.sourceScale),this._updateDimensions();var s=document.createElement("canvas");s.width=this.realWidth,s.height=this.realHeight,s._pixiId="canvas_"+(0,i.uid)(),s.getContext("2d").drawImage(this.source,0,0,n,o,0,0,this.realWidth,this.realHeight),this.origSource=this.source,this.source=s,e.addToCache(this,s._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 i.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,r,n,o){var s=i.BaseTextureCache[t];if(!s){var a=new Image;void 0===r&&0!==t.indexOf("data:")?a.crossOrigin=(0,h.default)(t):r&&(a.crossOrigin="string"==typeof r?r:"anonymous"),(s=new e(a,n)).imageUrl=t,o&&(s.sourceScale=o),s.resolution=(0,i.getResolutionOfUrl)(t),a.src=t,e.addToCache(s,t)}return s},e.fromCanvas=function(t,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"canvas";t._pixiId||(t._pixiId=n+"_"+(0,i.uid)());var o=i.BaseTextureCache[t._pixiId];return o||(o=new e(t,r),e.addToCache(o,t._pixiId)),o},e.from=function(t,r,n){if("string"==typeof t)return e.fromImage(t,void 0,r,n);if(t instanceof HTMLImageElement){var o=t.src,s=i.BaseTextureCache[o];return s||((s=new e(t,r)).imageUrl=o,n&&(s.sourceScale=n),s.resolution=(0,i.getResolutionOfUrl)(o),e.addToCache(s,o)),s}return t instanceof HTMLCanvasElement?e.fromCanvas(t,r):t},e.addToCache=function(t,e){e&&(-1===t.textureCacheIds.indexOf(e)&&t.textureCacheIds.push(e),i.BaseTextureCache[e]=t)},e.removeFromCache=function(t){if("string"==typeof t){var e=i.BaseTextureCache[t];if(e){var r=e.textureCacheIds.indexOf(t);return r>-1&&e.textureCacheIds.splice(r,1),delete i.BaseTextureCache[t],e}}else if(t&&t.textureCacheIds){for(var n=0;n0&&e>0,this._frame.width=this.orig.width=t,this._frame.height=this.orig.height=e,r||this.baseTexture.resize(t,e),this._updateUvs()},e.create=function(t,r,n,i){return new e(new o.default(t,r,n,i))},e}(a.default);r.default=l},{"./BaseRenderTexture":111,"./Texture":115}],114:[function(t,e,r){"use strict";r.__esModule=!0;var n=function(){function t(t,e){for(var r=0;r2&&void 0!==arguments[2]?arguments[2]:null;(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")})(this,t),this.baseTexture=e,this.textures={},this.animations={},this.data=r,this.resolution=this._updateResolution(n||this.baseTexture.imageUrl),this._frames=this.data.frames,this._frameKeys=Object.keys(this._frames),this._batchIndex=0,this._callback=null}return n(t,null,[{key:"BATCH_SIZE",get:function(){return 1e3}}]),t.prototype._updateResolution=function(t){var e=this.data.meta.scale,r=(0,o.getResolutionOfUrl)(t,null);return null===r&&(r=void 0!==e?parseFloat(e):1),1!==r&&(this.baseTexture.resolution=r,this.baseTexture.update()),r},t.prototype.parse=function(e){this._batchIndex=0,this._callback=e,this._frameKeys.length<=t.BATCH_SIZE?(this._processFrames(0),this._processAnimations(),this._parseComplete()):this._nextBatch()},t.prototype._processFrames=function(e){for(var r=e,n=t.BATCH_SIZE,o=this.baseTexture.sourceScale;r-e=r.length)break;o=r[i++]}else{if((i=r.next()).done)break;o=i.value}var s=o;this.animations[e].push(this.textures[s])}}},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_SIZE0&&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}();r.default=s},{"../":65,"../utils":125}],115:[function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}function i(t){t.destroy=function(){},t.on=function(){},t.once=function(){},t.emit=function(){}}r.__esModule=!0;var o=function(){function t(t,e){for(var r=0;r2&&void 0!==arguments[2]?arguments[2]:"canvas";return new e(a.default.fromCanvas(t,r,n))},e.fromVideo=function(t,r,n,i){return"string"==typeof t?e.fromVideoUrl(t,r,n,i):new e(u.default.fromVideo(t,r,i))},e.fromVideoUrl=function(t,r,n,i){return new e(u.default.fromUrl(t,r,n,i))},e.from=function(t){if("string"==typeof t){var r=g.TextureCache[t];return r||(null!==t.match(/\.(mp4|webm|ogg|h264|avi|mov)$/)?e.fromVideoUrl(t):e.fromImage(t))}return t instanceof HTMLImageElement?new e(a.default.from(t)):t instanceof HTMLCanvasElement?e.fromCanvas(t,m.default.SCALE_MODE,"HTMLCanvasElement"):t instanceof HTMLVideoElement?e.fromVideo(t):t instanceof a.default?new e(t):t},e.fromLoader=function(t,r,n){var i=new a.default(t,void 0,(0,g.getResolutionOfUrl)(r)),o=new e(i);return i.imageUrl=r,n||(n=r),a.default.addToCache(o.baseTexture,n),e.addToCache(o,n),n!==r&&(a.default.addToCache(o.baseTexture,r),e.addToCache(o,r)),o},e.addToCache=function(t,e){e&&(-1===t.textureCacheIds.indexOf(e)&&t.textureCacheIds.push(e),g.TextureCache[e]=t)},e.removeFromCache=function(t){if("string"==typeof t){var e=g.TextureCache[t];if(e){var r=e.textureCacheIds.indexOf(t);return r>-1&&e.textureCacheIds.splice(r,1),delete g.TextureCache[t],e}}else if(t&&t.textureCacheIds){for(var n=0;nthis.baseTexture.width,s=r+i>this.baseTexture.height;if(o||s){var a=o&&s?"and":"or",l="X: "+e+" + "+n+" = "+(e+n)+" > "+this.baseTexture.width,u="Y: "+r+" + "+i+" = "+(r+i)+" > "+this.baseTexture.height;throw new Error("Texture Error: frame does not fit inside the base Texture dimensions: "+l+" "+a+" "+u)}this.valid=n&&i&&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}(d.default);r.default=y,y.EMPTY=new y(new a.default),i(y.EMPTY),i(y.EMPTY.baseTexture),y.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 y(new a.default(t))}(),i(y.WHITE),i(y.WHITE.baseTexture)},{"../math":70,"../settings":101,"../utils":125,"./BaseTexture":112,"./TextureUvs":117,"./VideoBaseTexture":118,eventemitter3:3}],116:[function(t,e,r){"use strict";r.__esModule=!0;var n=function(){function t(t,e){for(var r=0;r2&&void 0!==arguments[2])||arguments[2];if(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),!r)throw new Error("No video source element specified.");(r.readyState===r.HAVE_ENOUGH_DATA||r.readyState===r.HAVE_FUTURE_DATA)&&r.width&&r.height&&(r.complete=!0);var o=function(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}(this,t.call(this,r,n));return o.width=r.videoWidth,o.height=r.videoHeight,o._autoUpdate=!0,o._isAutoUpdating=!1,o.autoPlay=i,o.update=o.update.bind(o),o._onCanPlay=o._onCanPlay.bind(o),r.addEventListener("play",o._onPlayStart.bind(o)),r.addEventListener("pause",o._onPlayStop.bind(o)),o.hasLoaded=!1,o.__loaded=!1,o._isSourceReady()?o._onCanPlay():(r.addEventListener("canplay",o._onCanPlay),r.addEventListener("canplaythrough",o._onCanPlay)),o}return function(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)}(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&&(u.shared.add(this.update,this,h.UPDATE_PRIORITY.HIGH),this._isAutoUpdating=!0)},e.prototype._onPlayStop=function(){this._isAutoUpdating&&(u.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&&u.shared.remove(this.update,this),this.source&&this.source._pixiId&&(a.default.removeFromCache(this.source._pixiId),delete this.source._pixiId,this.source.pause(),this.source.src="",this.source.load()),t.prototype.destroy.call(this)},e.fromVideo=function(t,r,n){t._pixiId||(t._pixiId="video_"+(0,l.uid)());var i=l.BaseTextureCache[t._pixiId];return i||(i=new e(t,r,n),a.default.addToCache(i,t._pixiId)),i},e.fromUrl=function(t,r,n,o){var s=document.createElement("video");s.setAttribute("webkit-playsinline",""),s.setAttribute("playsinline","");var a=Array.isArray(t)?t[0].src||t[0]:t.src||t;if(void 0===n&&0!==a.indexOf("data:")?s.crossOrigin=(0,p.default)(a):n&&(s.crossOrigin="string"==typeof n?n:"anonymous"),Array.isArray(t))for(var l=0;l2&&void 0!==arguments[2]?arguments[2]:a.UPDATE_PRIORITY.NORMAL;return this._addListener(new u.default(t,e,r))},t.prototype.addOnce=function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:a.UPDATE_PRIORITY.NORMAL;return this._addListener(new u.default(t,e,r,!0))},t.prototype._addListener=function(t){var e=this._head.next,r=this._head;if(e){for(;e;){if(t.priority>e.priority){t.connect(r);break}r=e,e=e.next}t.previous||t.connect(r)}else t.connect(r);return this._startIfPossible(),this},t.prototype.remove=function(t,e){for(var r=this._head.next;r;)r=r.match(t,e)?r.destroy():r.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)>this._maxElapsedMS&&(e=this._maxElapsedMS),this.deltaTime=e*s.default.TARGET_FPMS*this.speed;for(var r=this._head,n=r.next;n;)n=n.emit(this.deltaTime);r.next||this._cancelIfNeeded()}else this.deltaTime=this.elapsedMS=0;this.lastTime=t},i(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}();r.default=h},{"../const":46,"../settings":101,"./TickerListener":120}],120:[function(t,e,r){"use strict";r.__esModule=!0;var n=function(){function t(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,i=arguments.length>3&&void 0!==arguments[3]&&arguments[3];(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")})(this,t),this.fn=e,this.context=r,this.priority=n,this.once=i,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.next;return this.next=t?null:e,this.previous=null,e},t}();r.default=n},{}],121:[function(t,e,r){"use strict";r.__esModule=!0,r.Ticker=r.shared=void 0;var n=t("./Ticker"),i=function(t){return t&&t.__esModule?t:{default:t}}(n),o=new i.default;o.autoStart=!0,o.destroy=function(){},r.shared=o,r.Ticker=i.default},{"./Ticker":119}],122:[function(t,e,r){"use strict";r.__esModule=!0,r.default=function(){return!(navigator.platform&&/iPad|iPhone|iPod/.test(navigator.platform))}},{}],123:[function(t,e,r){"use strict";r.__esModule=!0,r.default=function(t){for(var e=6*t,r=new Uint16Array(e),n=0,i=0;n1&&void 0!==arguments[1]?arguments[1]:window.location;if(0===t.indexOf("data:"))return"";e=e||window.location,o||(o=document.createElement("a")),o.href=t;var r=!(t=i.default.parse(o.href)).port&&""===e.port||t.port===e.port;return t.hostname===e.hostname&&r&&t.protocol===e.protocol?"":"anonymous"};var n=t("url"),i=function(t){return t&&t.__esModule?t:{default:t}}(n),o=void 0},{url:38}],125:[function(t,e,r){"use strict";function n(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}function i(t){return t&&t.__esModule?t:{default:t}}r.__esModule=!0,r.premultiplyBlendMode=r.BaseTextureCache=r.TextureCache=r.earcut=r.mixins=r.pluginTarget=r.EventEmitter=r.removeItems=r.isMobile=void 0,r.uid=function(){return++T},r.hex2rgb=function(t,e){return(e=e||[])[0]=(t>>16&255)/255,e[1]=(t>>8&255)/255,e[2]=(255&t)/255,e},r.hex2string=function(t){return t=t.toString(16),"#"+(t="000000".substr(0,6-t.length)+t)},r.rgb2hex=function(t){return(255*t[0]<<16)+(255*t[1]<<8)+(255*t[2]|0)},r.getResolutionOfUrl=function(t,e){var r=a.default.RETINA_PREFIX.exec(t);return r?parseFloat(r[1]):void 0!==e?e:1},r.decomposeDataUri=function(t){var e=o.DATA_URI.exec(t);if(e)return{mediaType:e[1]?e[1].toLowerCase():void 0,subType:e[2]?e[2].toLowerCase():void 0,charset:e[3]?e[3].toLowerCase():void 0,encoding:e[4]?e[4].toLowerCase():void 0,data:e[5]}},r.getUrlFileExtension=function(t){var e=o.URL_FILE_EXTENSION.exec(t);if(e)return e[1].toLowerCase()},r.getSvgSize=function(t){var e=o.SVG_SIZE.exec(t),r={};return e&&(r[e[1]]=Math.round(parseFloat(e[3])),r[e[5]]=Math.round(parseFloat(e[7]))),r},r.skipHello=function(){w=!0},r.sayHello=function(t){if(!w){if(navigator.userAgent.toLowerCase().indexOf("chrome")>-1){var e=["\n %c %c %c PixiJS "+o.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("PixiJS "+o.VERSION+" - "+t+" - http://www.pixijs.com/");w=!0}},r.isWebGLSupported=function(){var t={stencil:!0,failIfMajorPerformanceCaveat:!0};try{if(!window.WebGLRenderingContext)return!1;var e=document.createElement("canvas"),r=e.getContext("webgl",t)||e.getContext("experimental-webgl",t),n=!(!r||!r.getContextAttributes().stencil);if(r){var i=r.getExtension("WEBGL_lose_context");i&&i.loseContext()}return r=null,n}catch(t){return!1}},r.sign=function(t){return 0===t?0:t<0?-1:1},r.destroyTextureCache=function(){var t=void 0;for(t in E)E[t].destroy();for(t in S)S[t].destroy()},r.clearTextureCache=function(){var t=void 0;for(t in E)delete E[t];for(t in S)delete S[t]},r.correctBlendMode=function(t,e){return A[e?1:0][t]},r.premultiplyTint=function(t,e){if(1===e)return(255*e<<24)+t;if(0===e)return 0;var r=t>>16&255,n=t>>8&255,i=255&t;return(255*e<<24)+((r=r*e+.5|0)<<16)+((n=n*e+.5|0)<<8)+(i=i*e+.5|0)},r.premultiplyRgba=function(t,e,r,n){return r=r||new Float32Array(4),n||void 0===n?(r[0]=t[0]*e,r[1]=t[1]*e,r[2]=t[2]*e):(r[0]=t[0],r[1]=t[1],r[2]=t[2]),r[3]=e,r},r.premultiplyTintToRgba=function(t,e,r,n){return(r=r||new Float32Array(4))[0]=(t>>16&255)/255,r[1]=(t>>8&255)/255,r[2]=(255&t)/255,(n||void 0===n)&&(r[0]*=e,r[1]*=e,r[2]*=e),r[3]=e,r};var o=t("../const"),s=t("../settings"),a=i(s),l=t("eventemitter3"),u=i(l),h=t("./pluginTarget"),c=i(h),p=t("./mixin"),d=n(p),f=t("ismobilejs"),g=n(f),v=t("remove-array-items"),m=i(v),y=t("./mapPremultipliedBlendModes"),x=i(y),b=t("earcut"),_=i(b),T=0,w=!1;r.isMobile=g,r.removeItems=m.default,r.EventEmitter=u.default,r.pluginTarget=c.default,r.mixins=d,r.earcut=_.default;var E=r.TextureCache=Object.create(null),S=r.BaseTextureCache=Object.create(null),A=r.premultiplyBlendMode=(0,x.default)()},{"../const":46,"../settings":101,"./mapPremultipliedBlendModes":126,"./mixin":128,"./pluginTarget":129,earcut:2,eventemitter3:3,ismobilejs:4,"remove-array-items":31}],126:[function(t,e,r){"use strict";r.__esModule=!0,r.default=function(){for(var t=[],e=[],r=0;r<32;r++)t[r]=r,e[r]=r;t[n.BLEND_MODES.NORMAL_NPM]=n.BLEND_MODES.NORMAL,t[n.BLEND_MODES.ADD_NPM]=n.BLEND_MODES.ADD,t[n.BLEND_MODES.SCREEN_NPM]=n.BLEND_MODES.SCREEN,e[n.BLEND_MODES.NORMAL]=n.BLEND_MODES.NORMAL_NPM,e[n.BLEND_MODES.ADD]=n.BLEND_MODES.ADD_NPM,e[n.BLEND_MODES.SCREEN]=n.BLEND_MODES.SCREEN_NPM;var i=[];return i.push(e),i.push(t),i};var n=t("../const")},{"../const":46}],127:[function(t,e,r){"use strict";r.__esModule=!0,r.default=function(t){return i.default.tablet||i.default.phone?4:t};var n=t("ismobilejs"),i=function(t){return t&&t.__esModule?t:{default:t}}(n)},{ismobilejs:4}],128:[function(t,e,r){"use strict";function n(t,e){if(t&&e)for(var r=Object.keys(e),n=0;n1?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(" "),r=-1;this._fontSize=26;for(var i=0;i-1&&r=this._durations[this.currentFrame];)n-=this._durations[this.currentFrame]*i,this._currentTime+=i;this._currentTime+=n/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()):r!==this.currentFrame&&(this.loop&&this.onLoop&&(this.animationSpeed>0&&this.currentFramer&&this.onLoop()),this.updateTexture())},e.prototype.updateTexture=function(){this._texture=this._textures[this.currentFrame],this._textureID=-1,this.cachedTint=16777215,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 r=[],n=0;n1&&void 0!==arguments[1]?arguments[1]:{};!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var i=function(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}(this,t.call(this));return i._textWidth=0,i._textHeight=0,i._glyphs=[],i._font={tint:void 0!==n.tint?n.tint:16777215,align:n.align||"left",name:null,size:0},i.font=n.font,i._text=r,i._maxWidth=0,i._maxLineHeight=0,i._letterSpacing=0,i._anchor=new l.default(function(){i.dirty=!0},i,0,0),i.dirty=!1,i.updateText(),i}return function(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)}(e,t),e.prototype.updateText=function(){for(var t=e.fonts[this._font.name],r=this._font.size/t.size,n=new s.Point,i=[],o=[],a=this.text.replace(/(?:\r\n|\r)/g,"\n"),l=a.length,u=this._maxWidth*t.size/this._font.size,h=null,c=0,p=0,d=0,f=-1,g=0,v=0,m=0,y=0;y0&&n.x>u&&(++v,s.utils.removeItems(i,1+f-v,1+y-f),y=f,f=-1,o.push(g),p=Math.max(p,g),d++,n.x=0,n.y+=t.lineHeight,h=null))}else o.push(c),p=Math.max(p,c),++d,++v,n.x=0,n.y+=t.lineHeight,h=null}var T=a.charAt(a.length-1);"\r"!==T&&"\n"!==T&&(/(?:\s)/.test(T)&&(c=g),o.push(c),p=Math.max(p,c));for(var w=[],E=0;E<=d;E++){var S=0;"right"===this._font.align?S=p-o[E]:"center"===this._font.align&&(S=(p-o[E])/2),w.push(S)}for(var A=i.length,C=this.tint,M=0;M=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:"maxWidth",get:function(){return this._maxWidth},set:function(t){this._maxWidth!==t&&(this._maxWidth=t,this.dirty=!0)}},{key:"maxLineHeight",get:function(){return this.validate(),this._maxLineHeight}},{key:"textWidth",get:function(){return this.validate(),this._textWidth}},{key:"letterSpacing",get:function(){return this._letterSpacing},set:function(t){this._letterSpacing!==t&&(this._letterSpacing=t,this.dirty=!0)}},{key:"textHeight",get:function(){return this.validate(),this._textHeight}}]),e}(s.Container);r.default=p,p.fonts={}},{"../core":65,"../core/math/ObservablePoint":68,"../core/settings":101,"../core/utils":125}],137:[function(t,e,r){"use strict";r.__esModule=!0;var n=function(){function t(t,e){for(var r=0;r1&&void 0!==arguments[1]?arguments[1]:100,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:100;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var s=function(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}(this,t.call(this,r));return s.tileTransform=new o.TransformStatic,s._width=n,s._height=i,s._canvasPattern=null,s.uvTransform=r.transform||new o.TextureMatrix(r),s.pluginName="tilingSprite",s.uvRespectAnchor=!1,s}return function(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)}(e,t),e.prototype._onTextureUpdate=function(){this.uvTransform&&(this.uvTransform.texture=this._texture),this.cachedTint=16777215},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 r=t.context,n=this.worldTransform,i=t.resolution,s=2===e.rotate,l=e.baseTexture,u=l.resolution,h=this.tilePosition.x/this.tileScale.x%e.orig.width*u,c=this.tilePosition.y/this.tileScale.y%e.orig.height*u;if(this._textureID!==this._texture._updateID||this.cachedTint!==this.tint){this._textureID=this._texture._updateID;var p=new o.CanvasRenderTarget(e.orig.width,e.orig.height,u);if(16777215!==this.tint)this.tintedTexture=a.default.getTintedTexture(this,this.tint),p.context.drawImage(this.tintedTexture,0,0);else{var d=e._frame.x*u,f=e._frame.y*u,g=e._frame.width*u,v=e._frame.height*u,m=(e.trim?e.trim.width:e.orig.width)*u,y=(e.trim?e.trim.height:e.orig.height)*u,x=(e.trim?e.trim.x:0)*u,b=(e.trim?e.trim.y:0)*u;s?(p.context.rotate(-Math.PI/2),p.context.translate(-y,0),p.context.drawImage(l.source,d,f,g,v,-b,x,y,m)):p.context.drawImage(l.source,d,f,g,v,x,b,m,y)}this.cachedTint=this.tint,this._canvasPattern=p.context.createPattern(p.canvas,"repeat")}r.globalAlpha=this.worldAlpha,r.setTransform(n.a*i,n.b*i,n.c*i,n.d*i,n.tx*i,n.ty*i),t.setBlendMode(this.blendMode),r.fillStyle=this._canvasPattern,r.scale(this.tileScale.x/u,this.tileScale.y/u);var _=this.anchor.x*-this._width*u,T=this.anchor.y*-this._height*u;this.uvRespectAnchor?(r.translate(h,c),r.fillRect(-h+_,-c+T,this._width/this.tileScale.x*u,this._height/this.tileScale.y*u)):(r.translate(h+_,c+T),r.fillRect(-h,-c,this._width/this.tileScale.x*u,this._height/this.tileScale.y*u))}},e.prototype._calculateBounds=function(){var t=this._width*-this._anchor._x,e=this._height*-this._anchor._y,r=this._width*(1-this._anchor._x),n=this._height*(1-this._anchor._y);this._bounds.addFrame(this.transform,t,e,r,n)},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._y),e||(this._localBoundsRect||(this._localBoundsRect=new o.Rectangle),e=this._localBoundsRect),this._bounds.getRectangle(e)):t.prototype.getLocalBounds.call(this,e)},e.prototype.containsPoint=function(t){this.worldTransform.applyInverse(t,l);var e=this._width,r=this._height,n=-e*this.anchor._x;if(l.x>=n&&l.x=i&&l.y0&&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,r){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}r.__esModule=!0,r.BitmapText=r.TilingSpriteRenderer=r.TilingSprite=r.AnimatedSprite=void 0;var i=t("./AnimatedSprite");Object.defineProperty(r,"AnimatedSprite",{enumerable:!0,get:function(){return n(i).default}});var o=t("./TilingSprite");Object.defineProperty(r,"TilingSprite",{enumerable:!0,get:function(){return n(o).default}});var s=t("./webgl/TilingSpriteRenderer");Object.defineProperty(r,"TilingSpriteRenderer",{enumerable:!0,get:function(){return n(s).default}});var a=t("./BitmapText");Object.defineProperty(r,"BitmapText",{enumerable:!0,get:function(){return n(a).default}}),t("./cacheAsBitmap"),t("./getChildByName"),t("./getGlobalPosition")},{"./AnimatedSprite":135,"./BitmapText":136,"./TilingSprite":137,"./cacheAsBitmap":138,"./getChildByName":139,"./getGlobalPosition":140,"./webgl/TilingSpriteRenderer":142}],142:[function(t,e,r){"use strict";r.__esModule=!0;var n=t("../../core"),i=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}(n),o=t("../../core/const"),s=(t("path"),new i.Matrix),a=function(t){function e(r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var n=function(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}(this,t.call(this,r));return n.shader=null,n.simpleShader=null,n.quad=null,n}return function(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)}(e,t),e.prototype.onContextChange=function(){var t=this.renderer.gl;this.shader=new i.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 gl_FragColor = sample * uColor;\n}\n"),this.simpleShader=new i.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 gl_FragColor = sample * uColor;\n}\n"),this.renderer.bindVao(null),this.quad=new i.Quad(t,this.renderer.state.attribState),this.quad.initVao(this.shader)},e.prototype.render=function(t){var e=this.renderer,r=this.quad;e.bindVao(r.vao);var n=r.vertices;n[0]=n[6]=t._width*-t.anchor.x,n[1]=n[3]=t._height*-t.anchor.y,n[2]=n[4]=t._width*(1-t.anchor.x),n[5]=n[7]=t._height*(1-t.anchor.y),t.uvRespectAnchor&&((n=r.uvs)[0]=n[6]=-t.anchor.x,n[1]=n[3]=-t.anchor.y,n[2]=n[4]=1-t.anchor.x,n[5]=n[7]=1-t.anchor.y),r.upload();var a=t._texture,l=a.baseTexture,u=t.tileTransform.localTransform,h=t.uvTransform,c=l.isPowerOfTwo&&a.frame.width===l.width&&a.frame.height===l.height;c&&(l._glTextures[e.CONTEXT_UID]?c=l.wrapMode!==o.WRAP_MODES.CLAMP:l.wrapMode===o.WRAP_MODES.CLAMP&&(l.wrapMode=o.WRAP_MODES.REPEAT));var p=c?this.simpleShader:this.shader;e.bindShader(p);var d=a.width,f=a.height,g=t._width,v=t._height;s.set(u.a*d/g,u.b*d/v,u.c*f/g,u.d*f/v,u.tx/g,u.ty/v),s.invert(),c?s.prepend(h.mapCoord):(p.uniforms.uMapCoord=h.mapCoord.toArray(!0),p.uniforms.uClampFrame=h.uClampFrame,p.uniforms.uClampOffset=h.uClampOffset),p.uniforms.uTransform=s.toArray(!0),p.uniforms.uColor=i.utils.premultiplyTintToRgba(t.tint,t.worldAlpha,p.uniforms.uColor,l.premultipliedAlpha),p.uniforms.translationMatrix=t.transform.worldTransform.toArray(!0),p.uniforms.uSampler=e.bindTexture(a),e.setBlendMode(i.utils.correctBlendMode(t.blendMode,l.premultipliedAlpha)),r.vao.draw(this.renderer.gl.TRIANGLES,6,0)},e}(i.ObjectRenderer);r.default=a,i.WebGLRenderer.registerPlugin("tilingSprite",a)},{"../../core":65,"../../core/const":46,path:8}],143:[function(t,e,r){"use strict";r.__esModule=!0;var n=function(){function t(t,e){for(var r=0;r0&&void 0!==arguments[0]?arguments[0]:1;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var n=function(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}(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;\nuniform float uAlpha;\n\nvoid main(void)\n{\n gl_FragColor = texture2D(uSampler, vTextureCoord) * uAlpha;\n}\n"));return n.alpha=r,n.glShaderKey="alpha",n}return function(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)}(e,t),n(e,[{key:"alpha",get:function(){return this.uniforms.uAlpha},set:function(t){this.uniforms.uAlpha=t}}]),e}(o.Filter));r.default=s},{"../../core":65,path:8}],144:[function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}r.__esModule=!0;var i=function(){function t(t,e){for(var r=0;r=r&&(a=t-l-1),u=u.replace("%value%",e[a]),s+=u,s+="\n"}return o=(o=o.replace("%blur%",s)).replace("%size%",t)};var n={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]},i=["varying vec2 vBlurTexCoords[%size%];","uniform sampler2D uSampler;","void main(void)","{"," gl_FragColor = vec4(0.0);"," %blur%","}"].join("\n")},{}],148:[function(t,e,r){"use strict";r.__esModule=!0,r.default=function(t,e){var r=Math.ceil(t/2),i=n,o="",s=void 0;s=e?"vBlurTexCoords[%index%] = aTextureCoord + vec2(%sampleIndex% * strength, 0.0);":"vBlurTexCoords[%index%] = aTextureCoord + vec2(0.0, %sampleIndex% * strength);";for(var a=0;ae;)r-=2;return r}},{}],150:[function(t,e,r){"use strict";r.__esModule=!0;var n=function(){function t(t,e){for(var r=0;r 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 r.uniforms.m=[1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0],r.alpha=1,r}return function(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)}(e,t),e.prototype._loadMatrix=function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=t;e&&(this._multiply(r,this.uniforms.m,t),r=this._colorMatrix(r)),this.uniforms.m=r},e.prototype._multiply=function(t,e,r){return t[0]=e[0]*r[0]+e[1]*r[5]+e[2]*r[10]+e[3]*r[15],t[1]=e[0]*r[1]+e[1]*r[6]+e[2]*r[11]+e[3]*r[16],t[2]=e[0]*r[2]+e[1]*r[7]+e[2]*r[12]+e[3]*r[17],t[3]=e[0]*r[3]+e[1]*r[8]+e[2]*r[13]+e[3]*r[18],t[4]=e[0]*r[4]+e[1]*r[9]+e[2]*r[14]+e[3]*r[19]+e[4],t[5]=e[5]*r[0]+e[6]*r[5]+e[7]*r[10]+e[8]*r[15],t[6]=e[5]*r[1]+e[6]*r[6]+e[7]*r[11]+e[8]*r[16],t[7]=e[5]*r[2]+e[6]*r[7]+e[7]*r[12]+e[8]*r[17],t[8]=e[5]*r[3]+e[6]*r[8]+e[7]*r[13]+e[8]*r[18],t[9]=e[5]*r[4]+e[6]*r[9]+e[7]*r[14]+e[8]*r[19]+e[9],t[10]=e[10]*r[0]+e[11]*r[5]+e[12]*r[10]+e[13]*r[15],t[11]=e[10]*r[1]+e[11]*r[6]+e[12]*r[11]+e[13]*r[16],t[12]=e[10]*r[2]+e[11]*r[7]+e[12]*r[12]+e[13]*r[17],t[13]=e[10]*r[3]+e[11]*r[8]+e[12]*r[13]+e[13]*r[18],t[14]=e[10]*r[4]+e[11]*r[9]+e[12]*r[14]+e[13]*r[19]+e[14],t[15]=e[15]*r[0]+e[16]*r[5]+e[17]*r[10]+e[18]*r[15],t[16]=e[15]*r[1]+e[16]*r[6]+e[17]*r[11]+e[18]*r[16],t[17]=e[15]*r[2]+e[16]*r[7]+e[17]*r[12]+e[18]*r[17],t[18]=e[15]*r[3]+e[16]*r[8]+e[17]*r[13]+e[18]*r[18],t[19]=e[15]*r[4]+e[16]*r[9]+e[17]*r[14]+e[18]*r[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 r=[t,0,0,0,0,0,t,0,0,0,0,0,t,0,0,0,0,0,1,0];this._loadMatrix(r,e)},e.prototype.greyscale=function(t,e){var r=[t,t,t,0,0,t,t,t,0,0,t,t,t,0,0,0,0,0,1,0];this._loadMatrix(r,e)},e.prototype.blackAndWhite=function(t){this._loadMatrix([.3,.6,.1,0,0,.3,.6,.1,0,0,.3,.6,.1,0,0,0,0,0,1,0],t)},e.prototype.hue=function(t,e){t=(t||0)/180*Math.PI;var r=Math.cos(t),n=Math.sin(t),i=Math.sqrt,o=1/3,s=i(o),a=r+(1-r)*o,l=o*(1-r)-s*n,u=o*(1-r)+s*n,h=o*(1-r)+s*n,c=r+o*(1-r),p=o*(1-r)-s*n,d=o*(1-r)-s*n,f=o*(1-r)+s*n,g=r+o*(1-r),v=[a,l,u,0,0,h,c,p,0,0,d,f,g,0,0,0,0,0,1,0];this._loadMatrix(v,e)},e.prototype.contrast=function(t,e){var r=(t||0)+1,n=-.5*(r-1),i=[r,0,0,0,n,0,r,0,0,n,0,0,r,0,n,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],r=2*t/3+1,n=-.5*(r-1),i=[r,n,n,0,0,n,r,n,0,0,n,n,r,0,0,0,0,0,1,0];this._loadMatrix(i,e)},e.prototype.desaturate=function(){this.saturate(-1)},e.prototype.negative=function(t){this._loadMatrix([-1,0,0,1,0,0,-1,0,1,0,0,0,-1,1,0,0,0,0,1,0],t)},e.prototype.sepia=function(t){this._loadMatrix([.393,.7689999,.18899999,0,0,.349,.6859999,.16799999,0,0,.272,.5339999,.13099999,0,0,0,0,0,1,0],t)},e.prototype.technicolor=function(t){this._loadMatrix([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],t)},e.prototype.polaroid=function(t){this._loadMatrix([1.438,-.062,-.062,0,0,-.122,1.378,-.122,0,0,-.016,-.016,1.483,0,0,0,0,0,1,0],t)},e.prototype.toBGR=function(t){this._loadMatrix([0,0,1,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,1,0],t)},e.prototype.kodachrome=function(t){this._loadMatrix([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],t)},e.prototype.browni=function(t){this._loadMatrix([.5997023498159715,.34553243048391263,-.2708298674538042,0,47.43192855600873,-.037703249837783157,.8609577587992641,.15059552388459913,0,-36.96841498319127,.24113635128153335,-.07441037908422492,.44972182064877153,0,-7.562075277591283,0,0,0,1,0],t)},e.prototype.vintage=function(t){this._loadMatrix([.6279345635605994,.3202183420819367,-.03965408211312453,0,9.651285835294123,.02578397704808868,.6441188644374771,.03259127616149294,0,7.462829176470591,.0466055556782719,-.0851232987247891,.5241648018700465,0,5.159190588235296,0,0,0,1,0],t)},e.prototype.colorTone=function(t,e,r,n,i){var o=((r=r||16770432)>>16&255)/255,s=(r>>8&255)/255,a=(255&r)/255,l=((n=n||3375104)>>16&255)/255,u=(n>>8&255)/255,h=(255&n)/255,c=[.3,.59,.11,0,0,o,s,a,t=t||.2,0,l,u,h,e=e||.15,0,o-l,s-u,a-h,0,0];this._loadMatrix(c,i)},e.prototype.night=function(t,e){var r=[-2*(t=t||.1),-t,0,0,0,-t,0,t,0,0,0,t,2*t,0,0,0,0,0,1,0];this._loadMatrix(r,e)},e.prototype.predator=function(t,e){var r=[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(r,e)},e.prototype.lsd=function(t){this._loadMatrix([2,-.4,.5,0,0,-.5,2,-.4,0,0,-.4,-.5,3,0,0,0,0,0,1,0],t)},e.prototype.reset=function(){this._loadMatrix([1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0],!1)},n(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}(o.Filter));r.default=s,s.prototype.grayscale=s.prototype.greyscale},{"../../core":65,path:8}],151:[function(t,e,r){"use strict";r.__esModule=!0;var n=function(){function t(t,e){for(var r=0;r 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 function(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)}(e,t),e}(i.Filter));r.default=o},{"../../core":65,path:8}],153:[function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}r.__esModule=!0;var i=t("./fxaa/FXAAFilter");Object.defineProperty(r,"FXAAFilter",{enumerable:!0,get:function(){return n(i).default}});var o=t("./noise/NoiseFilter");Object.defineProperty(r,"NoiseFilter",{enumerable:!0,get:function(){return n(o).default}});var s=t("./displacement/DisplacementFilter");Object.defineProperty(r,"DisplacementFilter",{enumerable:!0,get:function(){return n(s).default}});var a=t("./blur/BlurFilter");Object.defineProperty(r,"BlurFilter",{enumerable:!0,get:function(){return n(a).default}});var l=t("./blur/BlurXFilter");Object.defineProperty(r,"BlurXFilter",{enumerable:!0,get:function(){return n(l).default}});var u=t("./blur/BlurYFilter");Object.defineProperty(r,"BlurYFilter",{enumerable:!0,get:function(){return n(u).default}});var h=t("./colormatrix/ColorMatrixFilter");Object.defineProperty(r,"ColorMatrixFilter",{enumerable:!0,get:function(){return n(h).default}});var c=t("./alpha/AlphaFilter");Object.defineProperty(r,"AlphaFilter",{enumerable:!0,get:function(){return n(c).default}})},{"./alpha/AlphaFilter":143,"./blur/BlurFilter":144,"./blur/BlurXFilter":145,"./blur/BlurYFilter":146,"./colormatrix/ColorMatrixFilter":150,"./displacement/DisplacementFilter":151,"./fxaa/FXAAFilter":152,"./noise/NoiseFilter":154}],154:[function(t,e,r){"use strict";r.__esModule=!0;var n=function(){function t(t,e){for(var r=0;r0&&void 0!==arguments[0]?arguments[0]:.5,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Math.random();!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var i=function(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}(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 i.noise=r,i.seed=n,i}return function(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)}(e,t),n(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}(o.Filter));r.default=s},{"../../core":65,path:8}],155:[function(t,e,r){"use strict";r.__esModule=!0;var n=function(){function t(t,e){for(var r=0;r1&&void 0!==arguments[1]?arguments[1]:1;this.removeEvents(),this.interactionDOMElement=t,this.resolution=e,this.addEvents()},e.prototype.addEvents=function(){this.interactionDOMElement&&(s.ticker.shared.add(this.update,this,s.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&&(s.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=0;h--){var c=u[h],p=this.processInteractive(t,c,r,n,a);if(p){if(!c.parent)continue;a=!1,p&&(t.target&&(n=!1),s=!0)}}return i&&(n&&!t.target&&!e.hitArea&&e.containsPoint&&e.containsPoint(o)&&(s=!0),e.interactive&&(s&&!t.target&&(t.target=e),r&&r(t,e,!!s))),s},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 r=e.length,n=0;ne?1:this._height/e;t[9]=t[11]=t[13]=t[15]=this._topHeight*r,t[17]=t[19]=t[21]=t[23]=this._height-this._bottomHeight*r,t[25]=t[27]=t[29]=t[31]=this._height},e.prototype.updateVerticalVertices=function(){var t=this.vertices,e=this._leftWidth+this._rightWidth,r=this._width>e?1:this._width/e;t[2]=t[10]=t[18]=t[26]=this._leftWidth*r,t[4]=t[12]=t[20]=t[28]=this._width-this._rightWidth*r,t[6]=t[14]=t[22]=t[30]=this._width},e.prototype._renderCanvas=function(t){var e=t.context;e.globalAlpha=this.worldAlpha,t.setBlendMode(this.blendMode);var r=this.worldTransform,n=t.resolution;t.roundPixels?e.setTransform(r.a*n,r.b*n,r.c*n,r.d*n,r.tx*n|0,r.ty*n|0):e.setTransform(r.a*n,r.b*n,r.c*n,r.d*n,r.tx*n,r.ty*n);var i=this._texture.baseTexture,o=i.source,s=i.width*i.resolution,a=i.height*i.resolution;this.drawSegment(e,o,s,a,0,1,10,11),this.drawSegment(e,o,s,a,2,3,12,13),this.drawSegment(e,o,s,a,4,5,14,15),this.drawSegment(e,o,s,a,8,9,18,19),this.drawSegment(e,o,s,a,10,11,20,21),this.drawSegment(e,o,s,a,12,13,22,23),this.drawSegment(e,o,s,a,16,17,26,27),this.drawSegment(e,o,s,a,18,19,28,29),this.drawSegment(e,o,s,a,20,21,30,31)},e.prototype.drawSegment=function(t,e,r,n,i,o,s,a){var l=this.uvs,u=this.vertices,h=(l[s]-l[i])*r,c=(l[a]-l[o])*n,p=u[s]-u[i],d=u[a]-u[o];h<1&&(h=1),c<1&&(c=1),p<1&&(p=1),d<1&&(d=1),t.drawImage(e,l[i]*r,l[o]*n,h,c,u[i],u[o],p,d)},e.prototype._refresh=function(){t.prototype._refresh.call(this);var e=this.uvs,r=this._texture;this._origWidth=r.orig.width,this._origHeight=r.orig.height;var n=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]=n*this._leftWidth,e[4]=e[12]=e[20]=e[28]=1-n*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++,this.multiplyUvs()},n(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}(o.default);r.default=a},{"./Plane":168}],168:[function(t,e,r){"use strict";r.__esModule=!0;var n=t("./Mesh"),i=function(t){return t&&t.__esModule?t:{default:t}}(n),o=function(t){function e(r,n,o){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var s=function(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}(this,t.call(this,r));return s._ready=!0,s.verticesX=n||10,s.verticesY=o||10,s.drawMode=i.default.DRAW_MODES.TRIANGLES,s.refresh(),s}return function(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)}(e,t),e.prototype._refresh=function(){for(var t=this._texture,e=this.verticesX*this.verticesY,r=[],n=[],i=[],o=this.verticesX-1,s=this.verticesY-1,a=t.width/o,l=t.height/s,u=0;u1&&(h=1);var c=Math.sqrt(n*n+i*i),p=this._texture.height/2;n/=c,i/=c,n*=p,i*=p,o[u]=l.x+n,o[u+1]=l.y+i,o[u+2]=l.x-n,o[u+3]=l.y-i,e=l}},e.prototype.updateTransform=function(){this.autoUpdate&&this.refreshVertices(),this.containerUpdateTransform()},e}(i.default);r.default=o},{"./Mesh":166}],170:[function(t,e,r){"use strict";r.__esModule=!0;var n=t("../../core"),i=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}(n),o=t("../Mesh"),s=function(t){return t&&t.__esModule?t:{default:t}}(o),a=function(){function t(e){(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")})(this,t),this.renderer=e}return t.prototype.render=function(t){var e=this.renderer,r=e.context,n=t.worldTransform,i=e.resolution;e.roundPixels?r.setTransform(n.a*i,n.b*i,n.c*i,n.d*i,n.tx*i|0,n.ty*i|0):r.setTransform(n.a*i,n.b*i,n.c*i,n.d*i,n.tx*i,n.ty*i),e.context.globalAlpha=t.worldAlpha,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,r=0;r0){var A=S/Math.abs(t.worldTransform.a),C=S/Math.abs(t.worldTransform.d),M=(x+b+_)/3,R=(T+w+E)/3,O=x-M,P=T-R,D=Math.sqrt(O*O+P*P);x=M+O/D*(D+A),T=R+P/D*(D+C),O=b-M,P=w-R,D=Math.sqrt(O*O+P*P),b=M+O/D*(D+A),w=R+P/D*(D+C),O=_-M,P=E-R,D=Math.sqrt(O*O+P*P),_=M+O/D*(D+A),E=R+P/D*(D+C)}i.save(),i.beginPath(),i.moveTo(x,T),i.lineTo(b,w),i.lineTo(_,E),i.closePath(),i.clip();var I=p*v+g*f+d*m-v*f-g*d-p*m,L=x*v+g*_+b*m-v*_-g*b-x*m,F=p*b+x*f+d*_-b*f-x*d-p*_,B=p*v*_+g*b*f+x*d*m-x*v*f-g*d*_-p*b*m,k=T*v+g*E+w*m-v*E-g*w-T*m,N=p*w+T*f+d*E-w*f-T*d-p*E,$=p*v*E+g*w*f+T*d*m-T*v*f-g*d*E-p*w*m;i.transform(L/I,k/I,F/I,N/I,B/I,$/I),i.drawImage(u,0,0,h*l.resolution,c*l.resolution,0,0,h,c),i.restore(),this.renderer.invalidateBlendMode()}},t.prototype.renderMeshFlat=function(t){var e=this.renderer.context,r=t.vertices,n=r.length/2;e.beginPath();for(var i=1;i0&&void 0!==arguments[0]?arguments[0]:1500,n=arguments[1],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:16384,s=arguments.length>3&&void 0!==arguments[3]&&arguments[3];!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var a=function(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}(this,t.call(this));return i>16384&&(i=16384),i>r&&(i=r),a._properties=[!1,!0,!1,!1,!1],a._maxSize=r,a._batchSize=i,a._glBuffers={},a._bufferUpdateIDs=[],a._updateID=0,a.interactiveChildren=!1,a.blendMode=o.BLEND_MODES.NORMAL,a.autoResize=s,a.roundPixels=!0,a.baseTexture=null,a.setProperties(n),a._tint=0,a.tintRgb=new Float32Array(4),a.tint=16777215,a}return function(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)}(e,t),e.prototype.setProperties=function(t){t&&(this._properties[0]="vertices"in t||"scale"in t?!!t.vertices||!!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]="tint"in t||"alpha"in t?!!t.tint||!!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){for(var e=Math.floor(t/this._batchSize);this._bufferUpdateIDs.lengthr&&(s=r);var a=t._glBuffers[i.CONTEXT_UID];a||(a=t._glBuffers[i.CONTEXT_UID]=this.generateBuffers(t));var l=e[0]._texture.baseTexture;this.renderer.setBlendMode(o.utils.correctBlendMode(t.blendMode,l.premultipliedAlpha));var u=i.gl,h=t.worldTransform.copy(this.tempMatrix);h.prepend(i._activeRenderTarget.projectionMatrix),this.shader.uniforms.projectionMatrix=h.toArray(!0),this.shader.uniforms.uColor=o.utils.premultiplyRgba(t.tintRgb,t.worldAlpha,this.shader.uniforms.uColor,l.premultipliedAlpha),this.shader.uniforms.uSampler=i.bindTexture(l);for(var c=!1,p=0,d=0;pn&&(f=n),d>=a.length){if(!t.autoResize)break;a.push(this._generateOneMoreBuffer(t))}var g=a[d];g.uploadDynamic(e,p,f);var v=t._bufferUpdateIDs[d]||0;(c=c||g._updateID0?1:-1})},{}],179:[function(t,e,r){"use strict";Number.isInteger||(Number.isInteger=function(t){return"number"==typeof t&&isFinite(t)&&Math.floor(t)===t})},{}],180:[function(t,e,r){"use strict";var n=t("object-assign"),i=function(t){return t&&t.__esModule?t:{default:t}}(n);Object.assign||(Object.assign=i.default)},{"object-assign":6}],181:[function(t,e,r){"use strict";t("./Object.assign"),t("./requestAnimationFrame"),t("./Math.sign"),t("./Number.isInteger"),window.ArrayBuffer||(window.ArrayBuffer=Array),window.Float32Array||(window.Float32Array=Array),window.Uint32Array||(window.Uint32Array=Array),window.Uint16Array||(window.Uint16Array=Array)},{"./Math.sign":178,"./Number.isInteger":179,"./Object.assign":180,"./requestAnimationFrame":182}],182:[function(t,r,n){(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 r=Date.now(),n=["ms","moz","webkit","o"],i=0;i=0;n--)this.add(t.children[n]);return this},t.prototype.destroy=function(){this.ticking&&f.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}();r.default=g},{"../core":65,"./limiters/CountLimiter":186}],184:[function(t,e,r){"use strict";function n(t,e){if(e instanceof o.BaseTexture){var r=e.source,n=0===r.width?t.canvas.width:Math.min(t.canvas.width,r.width),i=0===r.height?t.canvas.height:Math.min(t.canvas.height,r.height);return t.ctx.drawImage(r,0,0,n,i,0,0,t.canvas.width,t.canvas.height),!0}return!1}r.__esModule=!0;var i=t("../../core"),o=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}(i),s=t("../BasePrepare"),a=function(t){return t&&t.__esModule?t:{default:t}}(s),l=16,u=function(t){function e(r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var i=function(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}(this,t.call(this,r));return i.uploadHookHelper=i,i.canvas=document.createElement("canvas"),i.canvas.width=l,i.canvas.height=l,i.ctx=i.canvas.getContext("2d"),i.registerUploadHook(n),i}return function(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)}(e,t),e.prototype.destroy=function(){t.prototype.destroy.call(this),this.ctx=null,this.canvas=null},e}(a.default);r.default=u,o.CanvasRenderer.registerPlugin("prepare",u)},{"../../core":65,"../BasePrepare":183}],185:[function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}r.__esModule=!0;var i=t("./webgl/WebGLPrepare");Object.defineProperty(r,"webgl",{enumerable:!0,get:function(){return n(i).default}});var o=t("./canvas/CanvasPrepare");Object.defineProperty(r,"canvas",{enumerable:!0,get:function(){return n(o).default}});var s=t("./BasePrepare");Object.defineProperty(r,"BasePrepare",{enumerable:!0,get:function(){return n(s).default}});var a=t("./limiters/CountLimiter");Object.defineProperty(r,"CountLimiter",{enumerable:!0,get:function(){return n(a).default}});var l=t("./limiters/TimeLimiter");Object.defineProperty(r,"TimeLimiter",{enumerable:!0,get:function(){return n(l).default}})},{"./BasePrepare":183,"./canvas/CanvasPrepare":184,"./limiters/CountLimiter":186,"./limiters/TimeLimiter":187,"./webgl/WebGLPrepare":188}],186:[function(t,e,r){"use strict";r.__esModule=!0;var n=function(){function t(e){(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")})(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}();r.default=n},{}],187:[function(t,e,r){"use strict";r.__esModule=!0;var n=function(){function t(e){(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")})(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.frameStart1)for(var r=1;r0&&e-1 in t)}w.fn=w.prototype={jquery:"3.3.1",constructor:w,length:0,toArray:function(){return l.call(this)},get:function(t){return null==t?l.call(this):t<0?this[t+this.length]:this[t]},pushStack:function(t){var e=w.merge(this.constructor(),t);return e.prevObject=this,e},each:function(t){return w.each(this,t)},map:function(t){return this.pushStack(w.map(this,function(e,r){return t.call(e,r,e)}))},slice:function(){return this.pushStack(l.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(t){var e=this.length,r=+t+(t<0?e:0);return this.pushStack(r>=0&&r+~]|"+B+")"+B+"*"),V=new RegExp("="+B+"*([^\\]'\"]*?)"+B+"*\\]","g"),z=new RegExp($),Y=new RegExp("^"+k+"$"),X={ID:new RegExp("^#("+k+")"),CLASS:new RegExp("^\\.("+k+")"),TAG:new RegExp("^("+k+"|[*])"),ATTR:new RegExp("^"+N),PSEUDO:new RegExp("^"+$),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+B+"*(even|odd|(([+-]|)(\\d*)n|)"+B+"*(?:([+-]|)"+B+"*(\\d+)|))"+B+"*\\)|)","i"),bool:new RegExp("^(?:"+F+")$","i"),needsContext:new RegExp("^"+B+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+B+"*((?:-\\d)?\\d*)"+B+"*\\)|)(?=[^-]|$)","i")},H=/^(?:input|select|textarea|button)$/i,q=/^h\d$/i,Z=/^[^{]+\{\s*\[native \w/,Q=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,J=/[+~]/,K=new RegExp("\\\\([\\da-f]{1,6}"+B+"?|("+B+")|.)","ig"),tt=function(t,e,r){var n="0x"+e-65536;return n!=n||r?e:n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320)},et=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,rt=function(t,e){return e?"\0"===t?"�":t.slice(0,-1)+"\\"+t.charCodeAt(t.length-1).toString(16)+" ":"\\"+t},nt=function(){p()},it=yt(function(t){return!0===t.disabled&&("form"in t||"label"in t)},{dir:"parentNode",next:"legend"});try{D.apply(R=I.call(_.childNodes),_.childNodes),R[_.childNodes.length].nodeType}catch(t){D={apply:R.length?function(t,e){P.apply(t,I.call(e))}:function(t,e){for(var r=t.length,n=0;t[r++]=e[n++];);t.length=r-1}}}function ot(t,e,n,i){var o,a,u,h,c,f,m,y=e&&e.ownerDocument,T=e?e.nodeType:9;if(n=n||[],"string"!=typeof t||!t||1!==T&&9!==T&&11!==T)return n;if(!i&&((e?e.ownerDocument||e:_)!==d&&p(e),e=e||d,g)){if(11!==T&&(c=Q.exec(t)))if(o=c[1]){if(9===T){if(!(u=e.getElementById(o)))return n;if(u.id===o)return n.push(u),n}else if(y&&(u=y.getElementById(o))&&x(e,u)&&u.id===o)return n.push(u),n}else{if(c[2])return D.apply(n,e.getElementsByTagName(t)),n;if((o=c[3])&&r.getElementsByClassName&&e.getElementsByClassName)return D.apply(n,e.getElementsByClassName(o)),n}if(r.qsa&&!A[t+" "]&&(!v||!v.test(t))){if(1!==T)y=e,m=t;else if("object"!==e.nodeName.toLowerCase()){for((h=e.getAttribute("id"))?h=h.replace(et,rt):e.setAttribute("id",h=b),a=(f=s(t)).length;a--;)f[a]="#"+h+" "+mt(f[a]);m=f.join(","),y=J.test(t)&>(e.parentNode)||e}if(m)try{return D.apply(n,y.querySelectorAll(m)),n}catch(t){}finally{h===b&&e.removeAttribute("id")}}}return l(t.replace(j,"$1"),e,n,i)}function st(){var t=[];return function e(r,i){return t.push(r+" ")>n.cacheLength&&delete e[t.shift()],e[r+" "]=i}}function at(t){return t[b]=!0,t}function lt(t){var e=d.createElement("fieldset");try{return!!t(e)}catch(t){return!1}finally{e.parentNode&&e.parentNode.removeChild(e),e=null}}function ut(t,e){for(var r=t.split("|"),i=r.length;i--;)n.attrHandle[r[i]]=e}function ht(t,e){var r=e&&t,n=r&&1===t.nodeType&&1===e.nodeType&&t.sourceIndex-e.sourceIndex;if(n)return n;if(r)for(;r=r.nextSibling;)if(r===e)return-1;return t?1:-1}function ct(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function pt(t){return function(e){var r=e.nodeName.toLowerCase();return("input"===r||"button"===r)&&e.type===t}}function dt(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&it(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function ft(t){return at(function(e){return e=+e,at(function(r,n){for(var i,o=t([],r.length,e),s=o.length;s--;)r[i=o[s]]&&(r[i]=!(n[i]=r[i]))})})}function gt(t){return t&&void 0!==t.getElementsByTagName&&t}for(e in r=ot.support={},o=ot.isXML=function(t){var e=t&&(t.ownerDocument||t).documentElement;return!!e&&"HTML"!==e.nodeName},p=ot.setDocument=function(t){var e,i,s=t?t.ownerDocument||t:_;return s!==d&&9===s.nodeType&&s.documentElement?(f=(d=s).documentElement,g=!o(d),_!==d&&(i=d.defaultView)&&i.top!==i&&(i.addEventListener?i.addEventListener("unload",nt,!1):i.attachEvent&&i.attachEvent("onunload",nt)),r.attributes=lt(function(t){return t.className="i",!t.getAttribute("className")}),r.getElementsByTagName=lt(function(t){return t.appendChild(d.createComment("")),!t.getElementsByTagName("*").length}),r.getElementsByClassName=Z.test(d.getElementsByClassName),r.getById=lt(function(t){return f.appendChild(t).id=b,!d.getElementsByName||!d.getElementsByName(b).length}),r.getById?(n.filter.ID=function(t){var e=t.replace(K,tt);return function(t){return t.getAttribute("id")===e}},n.find.ID=function(t,e){if(void 0!==e.getElementById&&g){var r=e.getElementById(t);return r?[r]:[]}}):(n.filter.ID=function(t){var e=t.replace(K,tt);return function(t){var r=void 0!==t.getAttributeNode&&t.getAttributeNode("id");return r&&r.value===e}},n.find.ID=function(t,e){if(void 0!==e.getElementById&&g){var r,n,i,o=e.getElementById(t);if(o){if((r=o.getAttributeNode("id"))&&r.value===t)return[o];for(i=e.getElementsByName(t),n=0;o=i[n++];)if((r=o.getAttributeNode("id"))&&r.value===t)return[o]}return[]}}),n.find.TAG=r.getElementsByTagName?function(t,e){return void 0!==e.getElementsByTagName?e.getElementsByTagName(t):r.qsa?e.querySelectorAll(t):void 0}:function(t,e){var r,n=[],i=0,o=e.getElementsByTagName(t);if("*"===t){for(;r=o[i++];)1===r.nodeType&&n.push(r);return n}return o},n.find.CLASS=r.getElementsByClassName&&function(t,e){if(void 0!==e.getElementsByClassName&&g)return e.getElementsByClassName(t)},m=[],v=[],(r.qsa=Z.test(d.querySelectorAll))&&(lt(function(t){f.appendChild(t).innerHTML="",t.querySelectorAll("[msallowcapture^='']").length&&v.push("[*^$]="+B+"*(?:''|\"\")"),t.querySelectorAll("[selected]").length||v.push("\\["+B+"*(?:value|"+F+")"),t.querySelectorAll("[id~="+b+"-]").length||v.push("~="),t.querySelectorAll(":checked").length||v.push(":checked"),t.querySelectorAll("a#"+b+"+*").length||v.push(".#.+[+~]")}),lt(function(t){t.innerHTML="";var e=d.createElement("input");e.setAttribute("type","hidden"),t.appendChild(e).setAttribute("name","D"),t.querySelectorAll("[name=d]").length&&v.push("name"+B+"*[*^$|!~]?="),2!==t.querySelectorAll(":enabled").length&&v.push(":enabled",":disabled"),f.appendChild(t).disabled=!0,2!==t.querySelectorAll(":disabled").length&&v.push(":enabled",":disabled"),t.querySelectorAll("*,:x"),v.push(",.*:")})),(r.matchesSelector=Z.test(y=f.matches||f.webkitMatchesSelector||f.mozMatchesSelector||f.oMatchesSelector||f.msMatchesSelector))&<(function(t){r.disconnectedMatch=y.call(t,"*"),y.call(t,"[s!='']:x"),m.push("!=",$)}),v=v.length&&new RegExp(v.join("|")),m=m.length&&new RegExp(m.join("|")),e=Z.test(f.compareDocumentPosition),x=e||Z.test(f.contains)?function(t,e){var r=9===t.nodeType?t.documentElement:t,n=e&&e.parentNode;return t===n||!(!n||1!==n.nodeType||!(r.contains?r.contains(n):t.compareDocumentPosition&&16&t.compareDocumentPosition(n)))}:function(t,e){if(e)for(;e=e.parentNode;)if(e===t)return!0;return!1},C=e?function(t,e){if(t===e)return c=!0,0;var n=!t.compareDocumentPosition-!e.compareDocumentPosition;return n||(1&(n=(t.ownerDocument||t)===(e.ownerDocument||e)?t.compareDocumentPosition(e):1)||!r.sortDetached&&e.compareDocumentPosition(t)===n?t===d||t.ownerDocument===_&&x(_,t)?-1:e===d||e.ownerDocument===_&&x(_,e)?1:h?L(h,t)-L(h,e):0:4&n?-1:1)}:function(t,e){if(t===e)return c=!0,0;var r,n=0,i=t.parentNode,o=e.parentNode,s=[t],a=[e];if(!i||!o)return t===d?-1:e===d?1:i?-1:o?1:h?L(h,t)-L(h,e):0;if(i===o)return ht(t,e);for(r=t;r=r.parentNode;)s.unshift(r);for(r=e;r=r.parentNode;)a.unshift(r);for(;s[n]===a[n];)n++;return n?ht(s[n],a[n]):s[n]===_?-1:a[n]===_?1:0},d):d},ot.matches=function(t,e){return ot(t,null,null,e)},ot.matchesSelector=function(t,e){if((t.ownerDocument||t)!==d&&p(t),e=e.replace(V,"='$1']"),r.matchesSelector&&g&&!A[e+" "]&&(!m||!m.test(e))&&(!v||!v.test(e)))try{var n=y.call(t,e);if(n||r.disconnectedMatch||t.document&&11!==t.document.nodeType)return n}catch(t){}return ot(e,d,null,[t]).length>0},ot.contains=function(t,e){return(t.ownerDocument||t)!==d&&p(t),x(t,e)},ot.attr=function(t,e){(t.ownerDocument||t)!==d&&p(t);var i=n.attrHandle[e.toLowerCase()],o=i&&M.call(n.attrHandle,e.toLowerCase())?i(t,e,!g):void 0;return void 0!==o?o:r.attributes||!g?t.getAttribute(e):(o=t.getAttributeNode(e))&&o.specified?o.value:null},ot.escape=function(t){return(t+"").replace(et,rt)},ot.error=function(t){throw new Error("Syntax error, unrecognized expression: "+t)},ot.uniqueSort=function(t){var e,n=[],i=0,o=0;if(c=!r.detectDuplicates,h=!r.sortStable&&t.slice(0),t.sort(C),c){for(;e=t[o++];)e===t[o]&&(i=n.push(o));for(;i--;)t.splice(n[i],1)}return h=null,t},i=ot.getText=function(t){var e,r="",n=0,o=t.nodeType;if(o){if(1===o||9===o||11===o){if("string"==typeof t.textContent)return t.textContent;for(t=t.firstChild;t;t=t.nextSibling)r+=i(t)}else if(3===o||4===o)return t.nodeValue}else for(;e=t[n++];)r+=i(e);return r},(n=ot.selectors={cacheLength:50,createPseudo:at,match:X,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(t){return t[1]=t[1].replace(K,tt),t[3]=(t[3]||t[4]||t[5]||"").replace(K,tt),"~="===t[2]&&(t[3]=" "+t[3]+" "),t.slice(0,4)},CHILD:function(t){return t[1]=t[1].toLowerCase(),"nth"===t[1].slice(0,3)?(t[3]||ot.error(t[0]),t[4]=+(t[4]?t[5]+(t[6]||1):2*("even"===t[3]||"odd"===t[3])),t[5]=+(t[7]+t[8]||"odd"===t[3])):t[3]&&ot.error(t[0]),t},PSEUDO:function(t){var e,r=!t[6]&&t[2];return X.CHILD.test(t[0])?null:(t[3]?t[2]=t[4]||t[5]||"":r&&z.test(r)&&(e=s(r,!0))&&(e=r.indexOf(")",r.length-e)-r.length)&&(t[0]=t[0].slice(0,e),t[2]=r.slice(0,e)),t.slice(0,3))}},filter:{TAG:function(t){var e=t.replace(K,tt).toLowerCase();return"*"===t?function(){return!0}:function(t){return t.nodeName&&t.nodeName.toLowerCase()===e}},CLASS:function(t){var e=E[t+" "];return e||(e=new RegExp("(^|"+B+")"+t+"("+B+"|$)"))&&E(t,function(t){return e.test("string"==typeof t.className&&t.className||void 0!==t.getAttribute&&t.getAttribute("class")||"")})},ATTR:function(t,e,r){return function(n){var i=ot.attr(n,t);return null==i?"!="===e:!e||(i+="","="===e?i===r:"!="===e?i!==r:"^="===e?r&&0===i.indexOf(r):"*="===e?r&&i.indexOf(r)>-1:"$="===e?r&&i.slice(-r.length)===r:"~="===e?(" "+i.replace(U," ")+" ").indexOf(r)>-1:"|="===e&&(i===r||i.slice(0,r.length+1)===r+"-"))}},CHILD:function(t,e,r,n,i){var o="nth"!==t.slice(0,3),s="last"!==t.slice(-4),a="of-type"===e;return 1===n&&0===i?function(t){return!!t.parentNode}:function(e,r,l){var u,h,c,p,d,f,g=o!==s?"nextSibling":"previousSibling",v=e.parentNode,m=a&&e.nodeName.toLowerCase(),y=!l&&!a,x=!1;if(v){if(o){for(;g;){for(p=e;p=p[g];)if(a?p.nodeName.toLowerCase()===m:1===p.nodeType)return!1;f=g="only"===t&&!f&&"nextSibling"}return!0}if(f=[s?v.firstChild:v.lastChild],s&&y){for(x=(d=(u=(h=(c=(p=v)[b]||(p[b]={}))[p.uniqueID]||(c[p.uniqueID]={}))[t]||[])[0]===T&&u[1])&&u[2],p=d&&v.childNodes[d];p=++d&&p&&p[g]||(x=d=0)||f.pop();)if(1===p.nodeType&&++x&&p===e){h[t]=[T,d,x];break}}else if(y&&(x=d=(u=(h=(c=(p=e)[b]||(p[b]={}))[p.uniqueID]||(c[p.uniqueID]={}))[t]||[])[0]===T&&u[1]),!1===x)for(;(p=++d&&p&&p[g]||(x=d=0)||f.pop())&&((a?p.nodeName.toLowerCase()!==m:1!==p.nodeType)||!++x||(y&&((h=(c=p[b]||(p[b]={}))[p.uniqueID]||(c[p.uniqueID]={}))[t]=[T,x]),p!==e)););return(x-=i)===n||x%n==0&&x/n>=0}}},PSEUDO:function(t,e){var r,i=n.pseudos[t]||n.setFilters[t.toLowerCase()]||ot.error("unsupported pseudo: "+t);return i[b]?i(e):i.length>1?(r=[t,t,"",e],n.setFilters.hasOwnProperty(t.toLowerCase())?at(function(t,r){for(var n,o=i(t,e),s=o.length;s--;)t[n=L(t,o[s])]=!(r[n]=o[s])}):function(t){return i(t,0,r)}):i}},pseudos:{not:at(function(t){var e=[],r=[],n=a(t.replace(j,"$1"));return n[b]?at(function(t,e,r,i){for(var o,s=n(t,null,i,[]),a=t.length;a--;)(o=s[a])&&(t[a]=!(e[a]=o))}):function(t,i,o){return e[0]=t,n(e,null,o,r),e[0]=null,!r.pop()}}),has:at(function(t){return function(e){return ot(t,e).length>0}}),contains:at(function(t){return t=t.replace(K,tt),function(e){return(e.textContent||e.innerText||i(e)).indexOf(t)>-1}}),lang:at(function(t){return Y.test(t||"")||ot.error("unsupported lang: "+t),t=t.replace(K,tt).toLowerCase(),function(e){var r;do{if(r=g?e.lang:e.getAttribute("xml:lang")||e.getAttribute("lang"))return(r=r.toLowerCase())===t||0===r.indexOf(t+"-")}while((e=e.parentNode)&&1===e.nodeType);return!1}}),target:function(e){var r=t.location&&t.location.hash;return r&&r.slice(1)===e.id},root:function(t){return t===f},focus:function(t){return t===d.activeElement&&(!d.hasFocus||d.hasFocus())&&!!(t.type||t.href||~t.tabIndex)},enabled:dt(!1),disabled:dt(!0),checked:function(t){var e=t.nodeName.toLowerCase();return"input"===e&&!!t.checked||"option"===e&&!!t.selected},selected:function(t){return t.parentNode&&t.parentNode.selectedIndex,!0===t.selected},empty:function(t){for(t=t.firstChild;t;t=t.nextSibling)if(t.nodeType<6)return!1;return!0},parent:function(t){return!n.pseudos.empty(t)},header:function(t){return q.test(t.nodeName)},input:function(t){return H.test(t.nodeName)},button:function(t){var e=t.nodeName.toLowerCase();return"input"===e&&"button"===t.type||"button"===e},text:function(t){var e;return"input"===t.nodeName.toLowerCase()&&"text"===t.type&&(null==(e=t.getAttribute("type"))||"text"===e.toLowerCase())},first:ft(function(){return[0]}),last:ft(function(t,e){return[e-1]}),eq:ft(function(t,e,r){return[r<0?r+e:r]}),even:ft(function(t,e){for(var r=0;r=0;)t.push(n);return t}),gt:ft(function(t,e,r){for(var n=r<0?r+e:r;++n1?function(e,r,n){for(var i=t.length;i--;)if(!t[i](e,r,n))return!1;return!0}:t[0]}function bt(t,e,r,n,i){for(var o,s=[],a=0,l=t.length,u=null!=e;a-1&&(o[u]=!(s[u]=c))}}else m=bt(m===s?m.splice(f,m.length):m),i?i(null,s,m,l):D.apply(s,m)})}function Tt(t){for(var e,r,i,o=t.length,s=n.relative[t[0].type],a=s||n.relative[" "],l=s?1:0,h=yt(function(t){return t===e},a,!0),c=yt(function(t){return L(e,t)>-1},a,!0),p=[function(t,r,n){var i=!s&&(n||r!==u)||((e=r).nodeType?h(t,r,n):c(t,r,n));return e=null,i}];l1&&xt(p),l>1&&mt(t.slice(0,l-1).concat({value:" "===t[l-2].type?"*":""})).replace(j,"$1"),r,l0,i=t.length>0,o=function(o,s,a,l,h){var c,f,v,m=0,y="0",x=o&&[],b=[],_=u,w=o||i&&n.find.TAG("*",h),E=T+=null==_?1:Math.random()||.1,S=w.length;for(h&&(u=s===d||s||h);y!==S&&null!=(c=w[y]);y++){if(i&&c){for(f=0,s||c.ownerDocument===d||(p(c),a=!g);v=t[f++];)if(v(c,s||d,a)){l.push(c);break}h&&(T=E)}r&&((c=!v&&c)&&m--,o&&x.push(c))}if(m+=y,r&&y!==m){for(f=0;v=e[f++];)v(x,b,s,a);if(o){if(m>0)for(;y--;)x[y]||b[y]||(b[y]=O.call(l));b=bt(b)}D.apply(l,b),h&&!o&&b.length>0&&m+e.length>1&&ot.uniqueSort(l)}return h&&(T=E,u=_),x};return r?at(o):o}(o,i))).selector=t}return a},l=ot.select=function(t,e,r,i){var o,l,u,h,c,p="function"==typeof t&&t,d=!i&&s(t=p.selector||t);if(r=r||[],1===d.length){if((l=d[0]=d[0].slice(0)).length>2&&"ID"===(u=l[0]).type&&9===e.nodeType&&g&&n.relative[l[1].type]){if(!(e=(n.find.ID(u.matches[0].replace(K,tt),e)||[])[0]))return r;p&&(e=e.parentNode),t=t.slice(l.shift().value.length)}for(o=X.needsContext.test(t)?0:l.length;o--&&(u=l[o],!n.relative[h=u.type]);)if((c=n.find[h])&&(i=c(u.matches[0].replace(K,tt),J.test(l[0].type)&>(e.parentNode)||e))){if(l.splice(o,1),!(t=i.length&&mt(l)))return D.apply(r,i),r;break}}return(p||a(t,d))(i,e,!g,r,!e||J.test(t)&>(e.parentNode)||e),r},r.sortStable=b.split("").sort(C).join("")===b,r.detectDuplicates=!!c,p(),r.sortDetached=lt(function(t){return 1&t.compareDocumentPosition(d.createElement("fieldset"))}),lt(function(t){return t.innerHTML="","#"===t.firstChild.getAttribute("href")})||ut("type|href|height|width",function(t,e,r){if(!r)return t.getAttribute(e,"type"===e.toLowerCase()?1:2)}),r.attributes&<(function(t){return t.innerHTML="",t.firstChild.setAttribute("value",""),""===t.firstChild.getAttribute("value")})||ut("value",function(t,e,r){if(!r&&"input"===t.nodeName.toLowerCase())return t.defaultValue}),lt(function(t){return null==t.getAttribute("disabled")})||ut(F,function(t,e,r){var n;if(!r)return!0===t[e]?e.toLowerCase():(n=t.getAttributeNode(e))&&n.specified?n.value:null}),ot}(r);w.find=A,w.expr=A.selectors,w.expr[":"]=w.expr.pseudos,w.uniqueSort=w.unique=A.uniqueSort,w.text=A.getText,w.isXMLDoc=A.isXML,w.contains=A.contains,w.escapeSelector=A.escape;var C=function(t,e,r){for(var n=[],i=void 0!==r;(t=t[e])&&9!==t.nodeType;)if(1===t.nodeType){if(i&&w(t).is(r))break;n.push(t)}return n},M=function(t,e){for(var r=[];t;t=t.nextSibling)1===t.nodeType&&t!==e&&r.push(t);return r},R=w.expr.match.needsContext;function O(t,e){return t.nodeName&&t.nodeName.toLowerCase()===e.toLowerCase()}var P=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function D(t,e,r){return y(e)?w.grep(t,function(t,n){return!!e.call(t,n,t)!==r}):e.nodeType?w.grep(t,function(t){return t===e!==r}):"string"!=typeof e?w.grep(t,function(t){return c.call(e,t)>-1!==r}):w.filter(e,t,r)}w.filter=function(t,e,r){var n=e[0];return r&&(t=":not("+t+")"),1===e.length&&1===n.nodeType?w.find.matchesSelector(n,t)?[n]:[]:w.find.matches(t,w.grep(e,function(t){return 1===t.nodeType}))},w.fn.extend({find:function(t){var e,r,n=this.length,i=this;if("string"!=typeof t)return this.pushStack(w(t).filter(function(){for(e=0;e1?w.uniqueSort(r):r},filter:function(t){return this.pushStack(D(this,t||[],!1))},not:function(t){return this.pushStack(D(this,t||[],!0))},is:function(t){return!!D(this,"string"==typeof t&&R.test(t)?w(t):t||[],!1).length}});var I,L=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(w.fn.init=function(t,e,r){var n,i;if(!t)return this;if(r=r||I,"string"==typeof t){if(!(n="<"===t[0]&&">"===t[t.length-1]&&t.length>=3?[null,t,null]:L.exec(t))||!n[1]&&e)return!e||e.jquery?(e||r).find(t):this.constructor(e).find(t);if(n[1]){if(e=e instanceof w?e[0]:e,w.merge(this,w.parseHTML(n[1],e&&e.nodeType?e.ownerDocument||e:s,!0)),P.test(n[1])&&w.isPlainObject(e))for(n in e)y(this[n])?this[n](e[n]):this.attr(n,e[n]);return this}return(i=s.getElementById(n[2]))&&(this[0]=i,this.length=1),this}return t.nodeType?(this[0]=t,this.length=1,this):y(t)?void 0!==r.ready?r.ready(t):t(w):w.makeArray(t,this)}).prototype=w.fn,I=w(s);var F=/^(?:parents|prev(?:Until|All))/,B={children:!0,contents:!0,next:!0,prev:!0};function k(t,e){for(;(t=t[e])&&1!==t.nodeType;);return t}w.fn.extend({has:function(t){var e=w(t,this),r=e.length;return this.filter(function(){for(var t=0;t-1:1===r.nodeType&&w.find.matchesSelector(r,t))){o.push(r);break}return this.pushStack(o.length>1?w.uniqueSort(o):o)},index:function(t){return t?"string"==typeof t?c.call(w(t),this[0]):c.call(this,t.jquery?t[0]:t):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(t,e){return this.pushStack(w.uniqueSort(w.merge(this.get(),w(t,e))))},addBack:function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}}),w.each({parent:function(t){var e=t.parentNode;return e&&11!==e.nodeType?e:null},parents:function(t){return C(t,"parentNode")},parentsUntil:function(t,e,r){return C(t,"parentNode",r)},next:function(t){return k(t,"nextSibling")},prev:function(t){return k(t,"previousSibling")},nextAll:function(t){return C(t,"nextSibling")},prevAll:function(t){return C(t,"previousSibling")},nextUntil:function(t,e,r){return C(t,"nextSibling",r)},prevUntil:function(t,e,r){return C(t,"previousSibling",r)},siblings:function(t){return M((t.parentNode||{}).firstChild,t)},children:function(t){return M(t.firstChild)},contents:function(t){return O(t,"iframe")?t.contentDocument:(O(t,"template")&&(t=t.content||t),w.merge([],t.childNodes))}},function(t,e){w.fn[t]=function(r,n){var i=w.map(this,e,r);return"Until"!==t.slice(-5)&&(n=r),n&&"string"==typeof n&&(i=w.filter(n,i)),this.length>1&&(B[t]||w.uniqueSort(i),F.test(t)&&i.reverse()),this.pushStack(i)}});var N=/[^\x20\t\r\n\f]+/g;function $(t){return t}function U(t){throw t}function j(t,e,r,n){var i;try{t&&y(i=t.promise)?i.call(t).done(e).fail(r):t&&y(i=t.then)?i.call(t,e,r):e.apply(void 0,[t].slice(n))}catch(t){r.apply(void 0,[t])}}w.Callbacks=function(t){t="string"==typeof t?function(t){var e={};return w.each(t.match(N)||[],function(t,r){e[r]=!0}),e}(t):w.extend({},t);var e,r,n,i,o=[],s=[],a=-1,l=function(){for(i=i||t.once,n=e=!0;s.length;a=-1)for(r=s.shift();++a-1;)o.splice(r,1),r<=a&&a--}),this},has:function(t){return t?w.inArray(t,o)>-1:o.length>0},empty:function(){return o&&(o=[]),this},disable:function(){return i=s=[],o=r="",this},disabled:function(){return!o},lock:function(){return i=s=[],r||e||(o=r=""),this},locked:function(){return!!i},fireWith:function(t,r){return i||(r=[t,(r=r||[]).slice?r.slice():r],s.push(r),e||l()),this},fire:function(){return u.fireWith(this,arguments),this},fired:function(){return!!n}};return u},w.extend({Deferred:function(t){var e=[["notify","progress",w.Callbacks("memory"),w.Callbacks("memory"),2],["resolve","done",w.Callbacks("once memory"),w.Callbacks("once memory"),0,"resolved"],["reject","fail",w.Callbacks("once memory"),w.Callbacks("once memory"),1,"rejected"]],n="pending",i={state:function(){return n},always:function(){return o.done(arguments).fail(arguments),this},catch:function(t){return i.then(null,t)},pipe:function(){var t=arguments;return w.Deferred(function(r){w.each(e,function(e,n){var i=y(t[n[4]])&&t[n[4]];o[n[1]](function(){var t=i&&i.apply(this,arguments);t&&y(t.promise)?t.promise().progress(r.notify).done(r.resolve).fail(r.reject):r[n[0]+"With"](this,i?[t]:arguments)})}),t=null}).promise()},then:function(t,n,i){var o=0;function s(t,e,n,i){return function(){var a=this,l=arguments,u=function(){var r,u;if(!(t=o&&(n!==U&&(a=void 0,l=[r]),e.rejectWith(a,l))}};t?h():(w.Deferred.getStackHook&&(h.stackTrace=w.Deferred.getStackHook()),r.setTimeout(h))}}return w.Deferred(function(r){e[0][3].add(s(0,r,y(i)?i:$,r.notifyWith)),e[1][3].add(s(0,r,y(t)?t:$)),e[2][3].add(s(0,r,y(n)?n:U))}).promise()},promise:function(t){return null!=t?w.extend(t,i):i}},o={};return w.each(e,function(t,r){var s=r[2],a=r[5];i[r[1]]=s.add,a&&s.add(function(){n=a},e[3-t][2].disable,e[3-t][3].disable,e[0][2].lock,e[0][3].lock),s.add(r[3].fire),o[r[0]]=function(){return o[r[0]+"With"](this===o?void 0:this,arguments),this},o[r[0]+"With"]=s.fireWith}),i.promise(o),t&&t.call(o,o),o},when:function(t){var e=arguments.length,r=e,n=Array(r),i=l.call(arguments),o=w.Deferred(),s=function(t){return function(r){n[t]=this,i[t]=arguments.length>1?l.call(arguments):r,--e||o.resolveWith(n,i)}};if(e<=1&&(j(t,o.done(s(r)).resolve,o.reject,!e),"pending"===o.state()||y(i[r]&&i[r].then)))return o.then();for(;r--;)j(i[r],s(r),o.reject);return o.promise()}});var G=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;w.Deferred.exceptionHook=function(t,e){r.console&&r.console.warn&&t&&G.test(t.name)&&r.console.warn("jQuery.Deferred exception: "+t.message,t.stack,e)},w.readyException=function(t){r.setTimeout(function(){throw t})};var W=w.Deferred();function V(){s.removeEventListener("DOMContentLoaded",V),r.removeEventListener("load",V),w.ready()}w.fn.ready=function(t){return W.then(t).catch(function(t){w.readyException(t)}),this},w.extend({isReady:!1,readyWait:1,ready:function(t){(!0===t?--w.readyWait:w.isReady)||(w.isReady=!0,!0!==t&&--w.readyWait>0||W.resolveWith(s,[w]))}}),w.ready.then=W.then,"complete"===s.readyState||"loading"!==s.readyState&&!s.documentElement.doScroll?r.setTimeout(w.ready):(s.addEventListener("DOMContentLoaded",V),r.addEventListener("load",V));var z=function(t,e,r,n,i,o,s){var a=0,l=t.length,u=null==r;if("object"===T(r))for(a in i=!0,r)z(t,e,a,r[a],!0,o,s);else if(void 0!==n&&(i=!0,y(n)||(s=!0),u&&(s?(e.call(t,n),e=null):(u=e,e=function(t,e,r){return u.call(w(t),r)})),e))for(;a1,null,!0)},removeData:function(t){return this.each(function(){K.remove(this,t)})}}),w.extend({queue:function(t,e,r){var n;if(t)return e=(e||"fx")+"queue",n=J.get(t,e),r&&(!n||Array.isArray(r)?n=J.access(t,e,w.makeArray(r)):n.push(r)),n||[]},dequeue:function(t,e){e=e||"fx";var r=w.queue(t,e),n=r.length,i=r.shift(),o=w._queueHooks(t,e);"inprogress"===i&&(i=r.shift(),n--),i&&("fx"===e&&r.unshift("inprogress"),delete o.stop,i.call(t,function(){w.dequeue(t,e)},o)),!n&&o&&o.empty.fire()},_queueHooks:function(t,e){var r=e+"queueHooks";return J.get(t,r)||J.access(t,r,{empty:w.Callbacks("once memory").add(function(){J.remove(t,[e+"queue",r])})})}}),w.fn.extend({queue:function(t,e){var r=2;return"string"!=typeof t&&(e=t,t="fx",r--),arguments.length\x20\t\r\n\f]+)/i,ft=/^$|^module$|\/(?:java|ecma)script/i,gt={option:[1,""],thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};function vt(t,e){var r;return r=void 0!==t.getElementsByTagName?t.getElementsByTagName(e||"*"):void 0!==t.querySelectorAll?t.querySelectorAll(e||"*"):[],void 0===e||e&&O(t,e)?w.merge([t],r):r}function mt(t,e){for(var r=0,n=t.length;r-1)i&&i.push(o);else if(u=w.contains(o.ownerDocument,o),s=vt(c.appendChild(o),"script"),u&&mt(s),r)for(h=0;o=s[h++];)ft.test(o.type||"")&&r.push(o);return c}yt=s.createDocumentFragment().appendChild(s.createElement("div")),(xt=s.createElement("input")).setAttribute("type","radio"),xt.setAttribute("checked","checked"),xt.setAttribute("name","t"),yt.appendChild(xt),m.checkClone=yt.cloneNode(!0).cloneNode(!0).lastChild.checked,yt.innerHTML="",m.noCloneChecked=!!yt.cloneNode(!0).lastChild.defaultValue;var Tt=s.documentElement,wt=/^key/,Et=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,St=/^([^.]*)(?:\.(.+)|)/;function At(){return!0}function Ct(){return!1}function Mt(){try{return s.activeElement}catch(t){}}function Rt(t,e,r,n,i,o){var s,a;if("object"==typeof e){for(a in"string"!=typeof r&&(n=n||r,r=void 0),e)Rt(t,a,r,n,e[a],o);return t}if(null==n&&null==i?(i=r,n=r=void 0):null==i&&("string"==typeof r?(i=n,n=void 0):(i=n,n=r,r=void 0)),!1===i)i=Ct;else if(!i)return t;return 1===o&&(s=i,(i=function(t){return w().off(t),s.apply(this,arguments)}).guid=s.guid||(s.guid=w.guid++)),t.each(function(){w.event.add(this,e,i,n,r)})}w.event={global:{},add:function(t,e,r,n,i){var o,s,a,l,u,h,c,p,d,f,g,v=J.get(t);if(v)for(r.handler&&(r=(o=r).handler,i=o.selector),i&&w.find.matchesSelector(Tt,i),r.guid||(r.guid=w.guid++),(l=v.events)||(l=v.events={}),(s=v.handle)||(s=v.handle=function(e){return void 0!==w&&w.event.triggered!==e.type?w.event.dispatch.apply(t,arguments):void 0}),u=(e=(e||"").match(N)||[""]).length;u--;)d=g=(a=St.exec(e[u])||[])[1],f=(a[2]||"").split(".").sort(),d&&(c=w.event.special[d]||{},d=(i?c.delegateType:c.bindType)||d,c=w.event.special[d]||{},h=w.extend({type:d,origType:g,data:n,handler:r,guid:r.guid,selector:i,needsContext:i&&w.expr.match.needsContext.test(i),namespace:f.join(".")},o),(p=l[d])||((p=l[d]=[]).delegateCount=0,c.setup&&!1!==c.setup.call(t,n,f,s)||t.addEventListener&&t.addEventListener(d,s)),c.add&&(c.add.call(t,h),h.handler.guid||(h.handler.guid=r.guid)),i?p.splice(p.delegateCount++,0,h):p.push(h),w.event.global[d]=!0)},remove:function(t,e,r,n,i){var o,s,a,l,u,h,c,p,d,f,g,v=J.hasData(t)&&J.get(t);if(v&&(l=v.events)){for(u=(e=(e||"").match(N)||[""]).length;u--;)if(d=g=(a=St.exec(e[u])||[])[1],f=(a[2]||"").split(".").sort(),d){for(c=w.event.special[d]||{},p=l[d=(n?c.delegateType:c.bindType)||d]||[],a=a[2]&&new RegExp("(^|\\.)"+f.join("\\.(?:.*\\.|)")+"(\\.|$)"),s=o=p.length;o--;)h=p[o],!i&&g!==h.origType||r&&r.guid!==h.guid||a&&!a.test(h.namespace)||n&&n!==h.selector&&("**"!==n||!h.selector)||(p.splice(o,1),h.selector&&p.delegateCount--,c.remove&&c.remove.call(t,h));s&&!p.length&&(c.teardown&&!1!==c.teardown.call(t,f,v.handle)||w.removeEvent(t,d,v.handle),delete l[d])}else for(d in l)w.event.remove(t,d+e[u],r,n,!0);w.isEmptyObject(l)&&J.remove(t,"handle events")}},dispatch:function(t){var e,r,n,i,o,s,a=w.event.fix(t),l=new Array(arguments.length),u=(J.get(this,"events")||{})[a.type]||[],h=w.event.special[a.type]||{};for(l[0]=a,e=1;e=1))for(;u!==this;u=u.parentNode||this)if(1===u.nodeType&&("click"!==t.type||!0!==u.disabled)){for(o=[],s={},r=0;r-1:w.find(i,this,null,[u]).length),s[i]&&o.push(n);o.length&&a.push({elem:u,handlers:o})}return u=this,l\x20\t\r\n\f]*)[^>]*)\/>/gi,Pt=/\s*$/g;function Lt(t,e){return O(t,"table")&&O(11!==e.nodeType?e:e.firstChild,"tr")&&w(t).children("tbody")[0]||t}function Ft(t){return t.type=(null!==t.getAttribute("type"))+"/"+t.type,t}function Bt(t){return"true/"===(t.type||"").slice(0,5)?t.type=t.type.slice(5):t.removeAttribute("type"),t}function kt(t,e){var r,n,i,o,s,a,l,u;if(1===e.nodeType){if(J.hasData(t)&&(o=J.access(t),s=J.set(e,o),u=o.events))for(i in delete s.handle,s.events={},u)for(r=0,n=u[i].length;r1&&"string"==typeof f&&!m.checkClone&&Dt.test(f))return t.each(function(i){var o=t.eq(i);g&&(e[0]=f.call(this,i,o.html())),Nt(o,e,r,n)});if(p&&(o=(i=_t(e,t[0].ownerDocument,!1,t,n)).firstChild,1===i.childNodes.length&&(i=o),o||n)){for(a=(s=w.map(vt(i,"script"),Ft)).length;c")},clone:function(t,e,r){var n,i,o,s,a,l,u,h=t.cloneNode(!0),c=w.contains(t.ownerDocument,t);if(!(m.noCloneChecked||1!==t.nodeType&&11!==t.nodeType||w.isXMLDoc(t)))for(s=vt(h),n=0,i=(o=vt(t)).length;n0&&mt(s,!c&&vt(t,"script")),h},cleanData:function(t){for(var e,r,n,i=w.event.special,o=0;void 0!==(r=t[o]);o++)if(Z(r)){if(e=r[J.expando]){if(e.events)for(n in e.events)i[n]?w.event.remove(r,n):w.removeEvent(r,n,e.handle);r[J.expando]=void 0}r[K.expando]&&(r[K.expando]=void 0)}}}),w.fn.extend({detach:function(t){return $t(this,t,!0)},remove:function(t){return $t(this,t)},text:function(t){return z(this,function(t){return void 0===t?w.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 Nt(this,arguments,function(t){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||Lt(this,t).appendChild(t)})},prepend:function(){return Nt(this,arguments,function(t){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var e=Lt(this,t);e.insertBefore(t,e.firstChild)}})},before:function(){return Nt(this,arguments,function(t){this.parentNode&&this.parentNode.insertBefore(t,this)})},after:function(){return Nt(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&&(w.cleanData(vt(t,!1)),t.textContent="");return this},clone:function(t,e){return t=null!=t&&t,e=null==e?t:e,this.map(function(){return w.clone(this,t,e)})},html:function(t){return z(this,function(t){var e=this[0]||{},r=0,n=this.length;if(void 0===t&&1===e.nodeType)return e.innerHTML;if("string"==typeof t&&!Pt.test(t)&&!gt[(dt.exec(t)||["",""])[1].toLowerCase()]){t=w.htmlPrefilter(t);try{for(;r=0&&(l+=Math.max(0,Math.ceil(t["offset"+e[0].toUpperCase()+e.slice(1)]-o-l-a-.5))),l}function te(t,e,r){var n=jt(t),i=Wt(t,e,n),o="border-box"===w.css(t,"boxSizing",!1,n),s=o;if(Ut.test(i)){if(!r)return i;i="auto"}return s=s&&(m.boxSizingReliable()||i===t.style[e]),("auto"===i||!parseFloat(i)&&"inline"===w.css(t,"display",!1,n))&&(i=t["offset"+e[0].toUpperCase()+e.slice(1)],s=!0),(i=parseFloat(i)||0)+Kt(t,e,r||(o?"border":"content"),s,n,i)+"px"}function ee(t,e,r,n,i){return new ee.prototype.init(t,e,r,n,i)}w.extend({cssHooks:{opacity:{get:function(t,e){if(e){var r=Wt(t,"opacity");return""===r?"1":r}}}},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:{},style:function(t,e,r,n){if(t&&3!==t.nodeType&&8!==t.nodeType&&t.style){var i,o,s,a=q(e),l=Yt.test(e),u=t.style;if(l||(e=Qt(a)),s=w.cssHooks[e]||w.cssHooks[a],void 0===r)return s&&"get"in s&&void 0!==(i=s.get(t,!1,n))?i:u[e];"string"===(o=typeof r)&&(i=it.exec(r))&&i[1]&&(r=lt(t,e,i),o="number"),null!=r&&r==r&&("number"===o&&(r+=i&&i[3]||(w.cssNumber[a]?"":"px")),m.clearCloneStyle||""!==r||0!==e.indexOf("background")||(u[e]="inherit"),s&&"set"in s&&void 0===(r=s.set(t,r,n))||(l?u.setProperty(e,r):u[e]=r))}},css:function(t,e,r,n){var i,o,s,a=q(e);return Yt.test(e)||(e=Qt(a)),(s=w.cssHooks[e]||w.cssHooks[a])&&"get"in s&&(i=s.get(t,!0,r)),void 0===i&&(i=Wt(t,e,n)),"normal"===i&&e in Ht&&(i=Ht[e]),""===r||r?(o=parseFloat(i),!0===r||isFinite(o)?o||0:i):i}}),w.each(["height","width"],function(t,e){w.cssHooks[e]={get:function(t,r,n){if(r)return!zt.test(w.css(t,"display"))||t.getClientRects().length&&t.getBoundingClientRect().width?te(t,e,n):at(t,Xt,function(){return te(t,e,n)})},set:function(t,r,n){var i,o=jt(t),s="border-box"===w.css(t,"boxSizing",!1,o),a=n&&Kt(t,e,n,s,o);return s&&m.scrollboxSize()===o.position&&(a-=Math.ceil(t["offset"+e[0].toUpperCase()+e.slice(1)]-parseFloat(o[e])-Kt(t,e,"border",!1,o)-.5)),a&&(i=it.exec(r))&&"px"!==(i[3]||"px")&&(t.style[e]=r,r=w.css(t,e)),Jt(0,r,a)}}}),w.cssHooks.marginLeft=Vt(m.reliableMarginLeft,function(t,e){if(e)return(parseFloat(Wt(t,"marginLeft"))||t.getBoundingClientRect().left-at(t,{marginLeft:0},function(){return t.getBoundingClientRect().left}))+"px"}),w.each({margin:"",padding:"",border:"Width"},function(t,e){w.cssHooks[t+e]={expand:function(r){for(var n=0,i={},o="string"==typeof r?r.split(" "):[r];n<4;n++)i[t+ot[n]+e]=o[n]||o[n-2]||o[0];return i}},"margin"!==t&&(w.cssHooks[t+e].set=Jt)}),w.fn.extend({css:function(t,e){return z(this,function(t,e,r){var n,i,o={},s=0;if(Array.isArray(e)){for(n=jt(t),i=e.length;s1)}}),w.Tween=ee,ee.prototype={constructor:ee,init:function(t,e,r,n,i,o){this.elem=t,this.prop=r,this.easing=i||w.easing._default,this.options=e,this.start=this.now=this.cur(),this.end=n,this.unit=o||(w.cssNumber[r]?"":"px")},cur:function(){var t=ee.propHooks[this.prop];return t&&t.get?t.get(this):ee.propHooks._default.get(this)},run:function(t){var e,r=ee.propHooks[this.prop];return this.options.duration?this.pos=e=w.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),r&&r.set?r.set(this):ee.propHooks._default.set(this),this}},ee.prototype.init.prototype=ee.prototype,ee.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=w.css(t.elem,t.prop,""))&&"auto"!==e?e:0},set:function(t){w.fx.step[t.prop]?w.fx.step[t.prop](t):1!==t.elem.nodeType||null==t.elem.style[w.cssProps[t.prop]]&&!w.cssHooks[t.prop]?t.elem[t.prop]=t.now:w.style(t.elem,t.prop,t.now+t.unit)}}},ee.propHooks.scrollTop=ee.propHooks.scrollLeft={set:function(t){t.elem.nodeType&&t.elem.parentNode&&(t.elem[t.prop]=t.now)}},w.easing={linear:function(t){return t},swing:function(t){return.5-Math.cos(t*Math.PI)/2},_default:"swing"},w.fx=ee.prototype.init,w.fx.step={};var re,ne,ie=/^(?:toggle|show|hide)$/,oe=/queueHooks$/;function se(){ne&&(!1===s.hidden&&r.requestAnimationFrame?r.requestAnimationFrame(se):r.setTimeout(se,w.fx.interval),w.fx.tick())}function ae(){return r.setTimeout(function(){re=void 0}),re=Date.now()}function le(t,e){var r,n=0,i={height:t};for(e=e?1:0;n<4;n+=2-e)i["margin"+(r=ot[n])]=i["padding"+r]=t;return e&&(i.opacity=i.width=t),i}function ue(t,e,r){for(var n,i=(he.tweeners[e]||[]).concat(he.tweeners["*"]),o=0,s=i.length;o1)},removeAttr:function(t){return this.each(function(){w.removeAttr(this,t)})}}),w.extend({attr:function(t,e,r){var n,i,o=t.nodeType;if(3!==o&&8!==o&&2!==o)return void 0===t.getAttribute?w.prop(t,e,r):(1===o&&w.isXMLDoc(t)||(i=w.attrHooks[e.toLowerCase()]||(w.expr.match.bool.test(e)?ce:void 0)),void 0!==r?null===r?void w.removeAttr(t,e):i&&"set"in i&&void 0!==(n=i.set(t,r,e))?n:(t.setAttribute(e,r+""),r):i&&"get"in i&&null!==(n=i.get(t,e))?n:null==(n=w.find.attr(t,e))?void 0:n)},attrHooks:{type:{set:function(t,e){if(!m.radioValue&&"radio"===e&&O(t,"input")){var r=t.value;return t.setAttribute("type",e),r&&(t.value=r),e}}}},removeAttr:function(t,e){var r,n=0,i=e&&e.match(N);if(i&&1===t.nodeType)for(;r=i[n++];)t.removeAttribute(r)}}),ce={set:function(t,e,r){return!1===e?w.removeAttr(t,r):t.setAttribute(r,r),r}},w.each(w.expr.match.bool.source.match(/\w+/g),function(t,e){var r=pe[e]||w.find.attr;pe[e]=function(t,e,n){var i,o,s=e.toLowerCase();return n||(o=pe[s],pe[s]=i,i=null!=r(t,e,n)?s:null,pe[s]=o),i}});var de=/^(?:input|select|textarea|button)$/i,fe=/^(?:a|area)$/i;function ge(t){return(t.match(N)||[]).join(" ")}function ve(t){return t.getAttribute&&t.getAttribute("class")||""}function me(t){return Array.isArray(t)?t:"string"==typeof t&&t.match(N)||[]}w.fn.extend({prop:function(t,e){return z(this,w.prop,t,e,arguments.length>1)},removeProp:function(t){return this.each(function(){delete this[w.propFix[t]||t]})}}),w.extend({prop:function(t,e,r){var n,i,o=t.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&w.isXMLDoc(t)||(e=w.propFix[e]||e,i=w.propHooks[e]),void 0!==r?i&&"set"in i&&void 0!==(n=i.set(t,r,e))?n:t[e]=r:i&&"get"in i&&null!==(n=i.get(t,e))?n:t[e]},propHooks:{tabIndex:{get:function(t){var e=w.find.attr(t,"tabindex");return e?parseInt(e,10):de.test(t.nodeName)||fe.test(t.nodeName)&&t.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),m.optSelected||(w.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)}}),w.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){w.propFix[this.toLowerCase()]=this}),w.fn.extend({addClass:function(t){var e,r,n,i,o,s,a,l=0;if(y(t))return this.each(function(e){w(this).addClass(t.call(this,e,ve(this)))});if((e=me(t)).length)for(;r=this[l++];)if(i=ve(r),n=1===r.nodeType&&" "+ge(i)+" "){for(s=0;o=e[s++];)n.indexOf(" "+o+" ")<0&&(n+=o+" ");i!==(a=ge(n))&&r.setAttribute("class",a)}return this},removeClass:function(t){var e,r,n,i,o,s,a,l=0;if(y(t))return this.each(function(e){w(this).removeClass(t.call(this,e,ve(this)))});if(!arguments.length)return this.attr("class","");if((e=me(t)).length)for(;r=this[l++];)if(i=ve(r),n=1===r.nodeType&&" "+ge(i)+" "){for(s=0;o=e[s++];)for(;n.indexOf(" "+o+" ")>-1;)n=n.replace(" "+o+" "," ");i!==(a=ge(n))&&r.setAttribute("class",a)}return this},toggleClass:function(t,e){var r=typeof t,n="string"===r||Array.isArray(t);return"boolean"==typeof e&&n?e?this.addClass(t):this.removeClass(t):y(t)?this.each(function(r){w(this).toggleClass(t.call(this,r,ve(this),e),e)}):this.each(function(){var e,i,o,s;if(n)for(i=0,o=w(this),s=me(t);e=s[i++];)o.hasClass(e)?o.removeClass(e):o.addClass(e);else void 0!==t&&"boolean"!==r||((e=ve(this))&&J.set(this,"__className__",e),this.setAttribute&&this.setAttribute("class",e||!1===t?"":J.get(this,"__className__")||""))})},hasClass:function(t){var e,r,n=0;for(e=" "+t+" ";r=this[n++];)if(1===r.nodeType&&(" "+ge(ve(r))+" ").indexOf(e)>-1)return!0;return!1}});var ye=/\r/g;w.fn.extend({val:function(t){var e,r,n,i=this[0];return arguments.length?(n=y(t),this.each(function(r){var i;1===this.nodeType&&(null==(i=n?t.call(this,r,w(this).val()):t)?i="":"number"==typeof i?i+="":Array.isArray(i)&&(i=w.map(i,function(t){return null==t?"":t+""})),(e=w.valHooks[this.type]||w.valHooks[this.nodeName.toLowerCase()])&&"set"in e&&void 0!==e.set(this,i,"value")||(this.value=i))})):i?(e=w.valHooks[i.type]||w.valHooks[i.nodeName.toLowerCase()])&&"get"in e&&void 0!==(r=e.get(i,"value"))?r:"string"==typeof(r=i.value)?r.replace(ye,""):null==r?"":r:void 0}}),w.extend({valHooks:{option:{get:function(t){var e=w.find.attr(t,"value");return null!=e?e:ge(w.text(t))}},select:{get:function(t){var e,r,n,i=t.options,o=t.selectedIndex,s="select-one"===t.type,a=s?null:[],l=s?o+1:i.length;for(n=o<0?l:s?o:0;n-1)&&(r=!0);return r||(t.selectedIndex=-1),o}}}}),w.each(["radio","checkbox"],function(){w.valHooks[this]={set:function(t,e){if(Array.isArray(e))return t.checked=w.inArray(w(t).val(),e)>-1}},m.checkOn||(w.valHooks[this].get=function(t){return null===t.getAttribute("value")?"on":t.value})}),m.focusin="onfocusin"in r;var xe=/^(?:focusinfocus|focusoutblur)$/,be=function(t){t.stopPropagation()};w.extend(w.event,{trigger:function(t,e,n,i){var o,a,l,u,h,c,p,d,g=[n||s],v=f.call(t,"type")?t.type:t,m=f.call(t,"namespace")?t.namespace.split("."):[];if(a=d=l=n=n||s,3!==n.nodeType&&8!==n.nodeType&&!xe.test(v+w.event.triggered)&&(v.indexOf(".")>-1&&(m=v.split("."),v=m.shift(),m.sort()),h=v.indexOf(":")<0&&"on"+v,(t=t[w.expando]?t:new w.Event(v,"object"==typeof t&&t)).isTrigger=i?2:3,t.namespace=m.join("."),t.rnamespace=t.namespace?new RegExp("(^|\\.)"+m.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=void 0,t.target||(t.target=n),e=null==e?[t]:w.makeArray(e,[t]),p=w.event.special[v]||{},i||!p.trigger||!1!==p.trigger.apply(n,e))){if(!i&&!p.noBubble&&!x(n)){for(u=p.delegateType||v,xe.test(u+v)||(a=a.parentNode);a;a=a.parentNode)g.push(a),l=a;l===(n.ownerDocument||s)&&g.push(l.defaultView||l.parentWindow||r)}for(o=0;(a=g[o++])&&!t.isPropagationStopped();)d=a,t.type=o>1?u:p.bindType||v,(c=(J.get(a,"events")||{})[t.type]&&J.get(a,"handle"))&&c.apply(a,e),(c=h&&a[h])&&c.apply&&Z(a)&&(t.result=c.apply(a,e),!1===t.result&&t.preventDefault());return t.type=v,i||t.isDefaultPrevented()||p._default&&!1!==p._default.apply(g.pop(),e)||!Z(n)||h&&y(n[v])&&!x(n)&&((l=n[h])&&(n[h]=null),w.event.triggered=v,t.isPropagationStopped()&&d.addEventListener(v,be),n[v](),t.isPropagationStopped()&&d.removeEventListener(v,be),w.event.triggered=void 0,l&&(n[h]=l)),t.result}},simulate:function(t,e,r){var n=w.extend(new w.Event,r,{type:t,isSimulated:!0});w.event.trigger(n,null,e)}}),w.fn.extend({trigger:function(t,e){return this.each(function(){w.event.trigger(t,e,this)})},triggerHandler:function(t,e){var r=this[0];if(r)return w.event.trigger(t,e,r,!0)}}),m.focusin||w.each({focus:"focusin",blur:"focusout"},function(t,e){var r=function(t){w.event.simulate(e,t.target,w.event.fix(t))};w.event.special[e]={setup:function(){var n=this.ownerDocument||this,i=J.access(n,e);i||n.addEventListener(t,r,!0),J.access(n,e,(i||0)+1)},teardown:function(){var n=this.ownerDocument||this,i=J.access(n,e)-1;i?J.access(n,e,i):(n.removeEventListener(t,r,!0),J.remove(n,e))}}});var _e=r.location,Te=Date.now(),we=/\?/;w.parseXML=function(t){var e;if(!t||"string"!=typeof t)return null;try{e=(new r.DOMParser).parseFromString(t,"text/xml")}catch(t){e=void 0}return e&&!e.getElementsByTagName("parsererror").length||w.error("Invalid XML: "+t),e};var Ee=/\[\]$/,Se=/\r?\n/g,Ae=/^(?:submit|button|image|reset|file)$/i,Ce=/^(?:input|select|textarea|keygen)/i;function Me(t,e,r,n){var i;if(Array.isArray(e))w.each(e,function(e,i){r||Ee.test(t)?n(t,i):Me(t+"["+("object"==typeof i&&null!=i?e:"")+"]",i,r,n)});else if(r||"object"!==T(e))n(t,e);else for(i in e)Me(t+"["+i+"]",e[i],r,n)}w.param=function(t,e){var r,n=[],i=function(t,e){var r=y(e)?e():e;n[n.length]=encodeURIComponent(t)+"="+encodeURIComponent(null==r?"":r)};if(Array.isArray(t)||t.jquery&&!w.isPlainObject(t))w.each(t,function(){i(this.name,this.value)});else for(r in t)Me(r,t[r],e,i);return n.join("&")},w.fn.extend({serialize:function(){return w.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var t=w.prop(this,"elements");return t?w.makeArray(t):this}).filter(function(){var t=this.type;return this.name&&!w(this).is(":disabled")&&Ce.test(this.nodeName)&&!Ae.test(t)&&(this.checked||!pt.test(t))}).map(function(t,e){var r=w(this).val();return null==r?null:Array.isArray(r)?w.map(r,function(t){return{name:e.name,value:t.replace(Se,"\r\n")}}):{name:e.name,value:r.replace(Se,"\r\n")}}).get()}});var Re=/%20/g,Oe=/#.*$/,Pe=/([?&])_=[^&]*/,De=/^(.*?):[ \t]*([^\r\n]*)$/gm,Ie=/^(?:GET|HEAD)$/,Le=/^\/\//,Fe={},Be={},ke="*/".concat("*"),Ne=s.createElement("a");function $e(t){return function(e,r){"string"!=typeof e&&(r=e,e="*");var n,i=0,o=e.toLowerCase().match(N)||[];if(y(r))for(;n=o[i++];)"+"===n[0]?(n=n.slice(1)||"*",(t[n]=t[n]||[]).unshift(r)):(t[n]=t[n]||[]).push(r)}}function Ue(t,e,r,n){var i={},o=t===Be;function s(a){var l;return i[a]=!0,w.each(t[a]||[],function(t,a){var u=a(e,r,n);return"string"!=typeof u||o||i[u]?o?!(l=u):void 0:(e.dataTypes.unshift(u),s(u),!1)}),l}return s(e.dataTypes[0])||!i["*"]&&s("*")}function je(t,e){var r,n,i=w.ajaxSettings.flatOptions||{};for(r in e)void 0!==e[r]&&((i[r]?t:n||(n={}))[r]=e[r]);return n&&w.extend(!0,t,n),t}Ne.href=_e.href,w.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:_e.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(_e.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":ke,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":w.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(t,e){return e?je(je(t,w.ajaxSettings),e):je(w.ajaxSettings,t)},ajaxPrefilter:$e(Fe),ajaxTransport:$e(Be),ajax:function(t,e){"object"==typeof t&&(e=t,t=void 0),e=e||{};var n,i,o,a,l,u,h,c,p,d,f=w.ajaxSetup({},e),g=f.context||f,v=f.context&&(g.nodeType||g.jquery)?w(g):w.event,m=w.Deferred(),y=w.Callbacks("once memory"),x=f.statusCode||{},b={},_={},T="canceled",E={readyState:0,getResponseHeader:function(t){var e;if(h){if(!a)for(a={};e=De.exec(o);)a[e[1].toLowerCase()]=e[2];e=a[t.toLowerCase()]}return null==e?null:e},getAllResponseHeaders:function(){return h?o:null},setRequestHeader:function(t,e){return null==h&&(t=_[t.toLowerCase()]=_[t.toLowerCase()]||t,b[t]=e),this},overrideMimeType:function(t){return null==h&&(f.mimeType=t),this},statusCode:function(t){var e;if(t)if(h)E.always(t[E.status]);else for(e in t)x[e]=[x[e],t[e]];return this},abort:function(t){var e=t||T;return n&&n.abort(e),S(0,e),this}};if(m.promise(E),f.url=((t||f.url||_e.href)+"").replace(Le,_e.protocol+"//"),f.type=e.method||e.type||f.method||f.type,f.dataTypes=(f.dataType||"*").toLowerCase().match(N)||[""],null==f.crossDomain){u=s.createElement("a");try{u.href=f.url,u.href=u.href,f.crossDomain=Ne.protocol+"//"+Ne.host!=u.protocol+"//"+u.host}catch(t){f.crossDomain=!0}}if(f.data&&f.processData&&"string"!=typeof f.data&&(f.data=w.param(f.data,f.traditional)),Ue(Fe,f,e,E),h)return E;for(p in(c=w.event&&f.global)&&0==w.active++&&w.event.trigger("ajaxStart"),f.type=f.type.toUpperCase(),f.hasContent=!Ie.test(f.type),i=f.url.replace(Oe,""),f.hasContent?f.data&&f.processData&&0===(f.contentType||"").indexOf("application/x-www-form-urlencoded")&&(f.data=f.data.replace(Re,"+")):(d=f.url.slice(i.length),f.data&&(f.processData||"string"==typeof f.data)&&(i+=(we.test(i)?"&":"?")+f.data,delete f.data),!1===f.cache&&(i=i.replace(Pe,"$1"),d=(we.test(i)?"&":"?")+"_="+Te+++d),f.url=i+d),f.ifModified&&(w.lastModified[i]&&E.setRequestHeader("If-Modified-Since",w.lastModified[i]),w.etag[i]&&E.setRequestHeader("If-None-Match",w.etag[i])),(f.data&&f.hasContent&&!1!==f.contentType||e.contentType)&&E.setRequestHeader("Content-Type",f.contentType),E.setRequestHeader("Accept",f.dataTypes[0]&&f.accepts[f.dataTypes[0]]?f.accepts[f.dataTypes[0]]+("*"!==f.dataTypes[0]?", "+ke+"; q=0.01":""):f.accepts["*"]),f.headers)E.setRequestHeader(p,f.headers[p]);if(f.beforeSend&&(!1===f.beforeSend.call(g,E,f)||h))return E.abort();if(T="abort",y.add(f.complete),E.done(f.success),E.fail(f.error),n=Ue(Be,f,e,E)){if(E.readyState=1,c&&v.trigger("ajaxSend",[E,f]),h)return E;f.async&&f.timeout>0&&(l=r.setTimeout(function(){E.abort("timeout")},f.timeout));try{h=!1,n.send(b,S)}catch(t){if(h)throw t;S(-1,t)}}else S(-1,"No Transport");function S(t,e,s,a){var u,p,d,b,_,T=e;h||(h=!0,l&&r.clearTimeout(l),n=void 0,o=a||"",E.readyState=t>0?4:0,u=t>=200&&t<300||304===t,s&&(b=function(t,e,r){for(var n,i,o,s,a=t.contents,l=t.dataTypes;"*"===l[0];)l.shift(),void 0===n&&(n=t.mimeType||e.getResponseHeader("Content-Type"));if(n)for(i in a)if(a[i]&&a[i].test(n)){l.unshift(i);break}if(l[0]in r)o=l[0];else{for(i in r){if(!l[0]||t.converters[i+" "+l[0]]){o=i;break}s||(s=i)}o=o||s}if(o)return o!==l[0]&&l.unshift(o),r[o]}(f,E,s)),b=function(t,e,r,n){var i,o,s,a,l,u={},h=t.dataTypes.slice();if(h[1])for(s in t.converters)u[s.toLowerCase()]=t.converters[s];for(o=h.shift();o;)if(t.responseFields[o]&&(r[t.responseFields[o]]=e),!l&&n&&t.dataFilter&&(e=t.dataFilter(e,t.dataType)),l=o,o=h.shift())if("*"===o)o=l;else if("*"!==l&&l!==o){if(!(s=u[l+" "+o]||u["* "+o]))for(i in u)if((a=i.split(" "))[1]===o&&(s=u[l+" "+a[0]]||u["* "+a[0]])){!0===s?s=u[i]:!0!==u[i]&&(o=a[0],h.unshift(a[1]));break}if(!0!==s)if(s&&t.throws)e=s(e);else try{e=s(e)}catch(t){return{state:"parsererror",error:s?t:"No conversion from "+l+" to "+o}}}return{state:"success",data:e}}(f,b,E,u),u?(f.ifModified&&((_=E.getResponseHeader("Last-Modified"))&&(w.lastModified[i]=_),(_=E.getResponseHeader("etag"))&&(w.etag[i]=_)),204===t||"HEAD"===f.type?T="nocontent":304===t?T="notmodified":(T=b.state,p=b.data,u=!(d=b.error))):(d=T,!t&&T||(T="error",t<0&&(t=0))),E.status=t,E.statusText=(e||T)+"",u?m.resolveWith(g,[p,T,E]):m.rejectWith(g,[E,T,d]),E.statusCode(x),x=void 0,c&&v.trigger(u?"ajaxSuccess":"ajaxError",[E,f,u?p:d]),y.fireWith(g,[E,T]),c&&(v.trigger("ajaxComplete",[E,f]),--w.active||w.event.trigger("ajaxStop")))}return E},getJSON:function(t,e,r){return w.get(t,e,r,"json")},getScript:function(t,e){return w.get(t,void 0,e,"script")}}),w.each(["get","post"],function(t,e){w[e]=function(t,r,n,i){return y(r)&&(i=i||n,n=r,r=void 0),w.ajax(w.extend({url:t,type:e,dataType:i,data:r,success:n},w.isPlainObject(t)&&t))}}),w._evalUrl=function(t){return w.ajax({url:t,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,throws:!0})},w.fn.extend({wrapAll:function(t){var e;return this[0]&&(y(t)&&(t=t.call(this[0])),e=w(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 y(t)?this.each(function(e){w(this).wrapInner(t.call(this,e))}):this.each(function(){var e=w(this),r=e.contents();r.length?r.wrapAll(t):e.append(t)})},wrap:function(t){var e=y(t);return this.each(function(r){w(this).wrapAll(e?t.call(this,r):t)})},unwrap:function(t){return this.parent(t).not("body").each(function(){w(this).replaceWith(this.childNodes)}),this}}),w.expr.pseudos.hidden=function(t){return!w.expr.pseudos.visible(t)},w.expr.pseudos.visible=function(t){return!!(t.offsetWidth||t.offsetHeight||t.getClientRects().length)},w.ajaxSettings.xhr=function(){try{return new r.XMLHttpRequest}catch(t){}};var Ge={0:200,1223:204},We=w.ajaxSettings.xhr();m.cors=!!We&&"withCredentials"in We,m.ajax=We=!!We,w.ajaxTransport(function(t){var e,n;if(m.cors||We&&!t.crossDomain)return{send:function(i,o){var s,a=t.xhr();if(a.open(t.type,t.url,t.async,t.username,t.password),t.xhrFields)for(s in t.xhrFields)a[s]=t.xhrFields[s];for(s in t.mimeType&&a.overrideMimeType&&a.overrideMimeType(t.mimeType),t.crossDomain||i["X-Requested-With"]||(i["X-Requested-With"]="XMLHttpRequest"),i)a.setRequestHeader(s,i[s]);e=function(t){return function(){e&&(e=n=a.onload=a.onerror=a.onabort=a.ontimeout=a.onreadystatechange=null,"abort"===t?a.abort():"error"===t?"number"!=typeof a.status?o(0,"error"):o(a.status,a.statusText):o(Ge[a.status]||a.status,a.statusText,"text"!==(a.responseType||"text")||"string"!=typeof a.responseText?{binary:a.response}:{text:a.responseText},a.getAllResponseHeaders()))}},a.onload=e(),n=a.onerror=a.ontimeout=e("error"),void 0!==a.onabort?a.onabort=n:a.onreadystatechange=function(){4===a.readyState&&r.setTimeout(function(){e&&n()})},e=e("abort");try{a.send(t.hasContent&&t.data||null)}catch(t){if(e)throw t}},abort:function(){e&&e()}}}),w.ajaxPrefilter(function(t){t.crossDomain&&(t.contents.script=!1)}),w.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 w.globalEval(t),t}}}),w.ajaxPrefilter("script",function(t){void 0===t.cache&&(t.cache=!1),t.crossDomain&&(t.type="GET")}),w.ajaxTransport("script",function(t){var e,r;if(t.crossDomain)return{send:function(n,i){e=w("