HN||s===XN&&m>WN)return 1;for(;;){z=u-g,a[c]+1=P?(ne=j[a[c]-P],G=N[a[c]-P]):(ne=96,G=0),E=1<>g)+y]=z<<24|ne<<16|G|0;while(y!==0);for(E=1<>=1;if(E!==0?(v&=E-1,v+=E):v=0,c++,--k[u]===0){if(u===f)break;u=e[t+a[c]]}if(u>d&&(v&w)!==T){for(g===0&&(g=d),C+=h,_=u-g,p=1<<_;_+gHN||s===XN&&m>WN)return 1;T=v&w,n[T]=d<<24|_<<16|C-r|0}}return v!==0&&(n[C+v]=u-g<<24|64<<16|0),o.bits=d,0};var ld=t$;const i$=0,$U=1,QU=2,{Z_FINISH:KN,Z_BLOCK:s$,Z_TREES:up,Z_OK:Uu,Z_STREAM_END:n$,Z_NEED_DICT:r$,Z_STREAM_ERROR:Dn,Z_DATA_ERROR:ZU,Z_MEM_ERROR:JU,Z_BUF_ERROR:a$,Z_DEFLATED:qN}=XU,y0=16180,$N=16181,QN=16182,ZN=16183,JN=16184,eP=16185,tP=16186,iP=16187,sP=16188,nP=16189,Lm=16190,Kr=16191,Zy=16192,rP=16193,Jy=16194,aP=16195,oP=16196,lP=16197,uP=16198,hp=16199,cp=16200,hP=16201,cP=16202,fP=16203,dP=16204,_P=16205,eT=16206,gP=16207,pP=16208,Dt=16209,e4=16210,t4=16211,o$=852,l$=592,u$=15,h$=u$,mP=s=>(s>>>24&255)+(s>>>8&65280)+((s&65280)<<8)+((s&255)<<24);function c$(){this.strm=null,this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Uint16Array(320),this.work=new Uint16Array(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}const qu=s=>{if(!s)return 1;const e=s.state;return!e||e.strm!==s||e.modet4?1:0},i4=s=>{if(qu(s))return Dn;const e=s.state;return s.total_in=s.total_out=e.total=0,s.msg="",e.wrap&&(s.adler=e.wrap&1),e.mode=y0,e.last=0,e.havedict=0,e.flags=-1,e.dmax=32768,e.head=null,e.hold=0,e.bits=0,e.lencode=e.lendyn=new Int32Array(o$),e.distcode=e.distdyn=new Int32Array(l$),e.sane=1,e.back=-1,Uu},s4=s=>{if(qu(s))return Dn;const e=s.state;return e.wsize=0,e.whave=0,e.wnext=0,i4(s)},n4=(s,e)=>{let t;if(qu(s))return Dn;const i=s.state;return e<0?(t=0,e=-e):(t=(e>>4)+5,e<48&&(e&=15)),e&&(e<8||e>15)?Dn:(i.window!==null&&i.wbits!==e&&(i.window=null),i.wrap=t,i.wbits=e,s4(s))},r4=(s,e)=>{if(!s)return Dn;const t=new c$;s.state=t,t.strm=s,t.window=null,t.mode=y0;const i=n4(s,e);return i!==Uu&&(s.state=null),i},f$=s=>r4(s,h$);let vP=!0,tT,iT;const d$=s=>{if(vP){tT=new Int32Array(512),iT=new Int32Array(32);let e=0;for(;e<144;)s.lens[e++]=8;for(;e<256;)s.lens[e++]=9;for(;e<280;)s.lens[e++]=7;for(;e<288;)s.lens[e++]=8;for(ld($U,s.lens,0,288,tT,0,s.work,{bits:9}),e=0;e<32;)s.lens[e++]=5;ld(QU,s.lens,0,32,iT,0,s.work,{bits:5}),vP=!1}s.lencode=tT,s.lenbits=9,s.distcode=iT,s.distbits=5},a4=(s,e,t,i)=>{let n;const r=s.state;return r.window===null&&(r.wsize=1<=r.wsize?(r.window.set(e.subarray(t-r.wsize,t),0),r.wnext=0,r.whave=r.wsize):(n=r.wsize-r.wnext,n>i&&(n=i),r.window.set(e.subarray(t-i,t-i+n),r.wnext),i-=n,i?(r.window.set(e.subarray(t-i,t),0),r.wnext=i,r.whave=r.wsize):(r.wnext+=n,r.wnext===r.wsize&&(r.wnext=0),r.whave{let t,i,n,r,a,o,l,u,c,h,f,d,_,g,p=0,m,v,E,y,T,w,C,N;const P=new Uint8Array(4);let k,L;const j=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(qu(s)||!s.output||!s.input&&s.avail_in!==0)return Dn;t=s.state,t.mode===Kr&&(t.mode=Zy),a=s.next_out,n=s.output,l=s.avail_out,r=s.next_in,i=s.input,o=s.avail_in,u=t.hold,c=t.bits,h=o,f=l,N=Uu;e:for(;;)switch(t.mode){case y0:if(t.wrap===0){t.mode=Zy;break}for(;c<16;){if(o===0)break e;o--,u+=i[r++]<>>8&255,t.check=lr(t.check,P,2,0),u=0,c=0,t.mode=$N;break}if(t.head&&(t.head.done=!1),!(t.wrap&1)||(((u&255)<<8)+(u>>8))%31){s.msg="incorrect header check",t.mode=Dt;break}if((u&15)!==qN){s.msg="unknown compression method",t.mode=Dt;break}if(u>>>=4,c-=4,C=(u&15)+8,t.wbits===0&&(t.wbits=C),C>15||C>t.wbits){s.msg="invalid window size",t.mode=Dt;break}t.dmax=1<>8&1),t.flags&512&&t.wrap&4&&(P[0]=u&255,P[1]=u>>>8&255,t.check=lr(t.check,P,2,0)),u=0,c=0,t.mode=QN;case QN:for(;c<32;){if(o===0)break e;o--,u+=i[r++]<>>8&255,P[2]=u>>>16&255,P[3]=u>>>24&255,t.check=lr(t.check,P,4,0)),u=0,c=0,t.mode=ZN;case ZN:for(;c<16;){if(o===0)break e;o--,u+=i[r++]<>8),t.flags&512&&t.wrap&4&&(P[0]=u&255,P[1]=u>>>8&255,t.check=lr(t.check,P,2,0)),u=0,c=0,t.mode=JN;case JN:if(t.flags&1024){for(;c<16;){if(o===0)break e;o--,u+=i[r++]<>>8&255,t.check=lr(t.check,P,2,0)),u=0,c=0}else t.head&&(t.head.extra=null);t.mode=eP;case eP:if(t.flags&1024&&(d=t.length,d>o&&(d=o),d&&(t.head&&(C=t.head.extra_len-t.length,t.head.extra||(t.head.extra=new Uint8Array(t.head.extra_len)),t.head.extra.set(i.subarray(r,r+d),C)),t.flags&512&&t.wrap&4&&(t.check=lr(t.check,i,d,r)),o-=d,r+=d,t.length-=d),t.length))break e;t.length=0,t.mode=tP;case tP:if(t.flags&2048){if(o===0)break e;d=0;do C=i[r+d++],t.head&&C&&t.length<65536&&(t.head.name+=String.fromCharCode(C));while(C&&d>9&1,t.head.done=!0),s.adler=t.check=0,t.mode=Kr;break;case nP:for(;c<32;){if(o===0)break e;o--,u+=i[r++]<>>=c&7,c-=c&7,t.mode=eT;break}for(;c<3;){if(o===0)break e;o--,u+=i[r++]<>>=1,c-=1,u&3){case 0:t.mode=rP;break;case 1:if(d$(t),t.mode=hp,e===up){u>>>=2,c-=2;break e}break;case 2:t.mode=oP;break;case 3:s.msg="invalid block type",t.mode=Dt}u>>>=2,c-=2;break;case rP:for(u>>>=c&7,c-=c&7;c<32;){if(o===0)break e;o--,u+=i[r++]<>>16^65535)){s.msg="invalid stored block lengths",t.mode=Dt;break}if(t.length=u&65535,u=0,c=0,t.mode=Jy,e===up)break e;case Jy:t.mode=aP;case aP:if(d=t.length,d){if(d>o&&(d=o),d>l&&(d=l),d===0)break e;n.set(i.subarray(r,r+d),a),o-=d,r+=d,l-=d,a+=d,t.length-=d;break}t.mode=Kr;break;case oP:for(;c<14;){if(o===0)break e;o--,u+=i[r++]<>>=5,c-=5,t.ndist=(u&31)+1,u>>>=5,c-=5,t.ncode=(u&15)+4,u>>>=4,c-=4,t.nlen>286||t.ndist>30){s.msg="too many length or distance symbols",t.mode=Dt;break}t.have=0,t.mode=lP;case lP:for(;t.have>>=3,c-=3}for(;t.have<19;)t.lens[j[t.have++]]=0;if(t.lencode=t.lendyn,t.lenbits=7,k={bits:t.lenbits},N=ld(i$,t.lens,0,19,t.lencode,0,t.work,k),t.lenbits=k.bits,N){s.msg="invalid code lengths set",t.mode=Dt;break}t.have=0,t.mode=uP;case uP:for(;t.have>>24,v=p>>>16&255,E=p&65535,!(m<=c);){if(o===0)break e;o--,u+=i[r++]<>>=m,c-=m,t.lens[t.have++]=E;else{if(E===16){for(L=m+2;c>>=m,c-=m,t.have===0){s.msg="invalid bit length repeat",t.mode=Dt;break}C=t.lens[t.have-1],d=3+(u&3),u>>>=2,c-=2}else if(E===17){for(L=m+3;c>>=m,c-=m,C=0,d=3+(u&7),u>>>=3,c-=3}else{for(L=m+7;c>>=m,c-=m,C=0,d=11+(u&127),u>>>=7,c-=7}if(t.have+d>t.nlen+t.ndist){s.msg="invalid bit length repeat",t.mode=Dt;break}for(;d--;)t.lens[t.have++]=C}}if(t.mode===Dt)break;if(t.lens[256]===0){s.msg="invalid code -- missing end-of-block",t.mode=Dt;break}if(t.lenbits=9,k={bits:t.lenbits},N=ld($U,t.lens,0,t.nlen,t.lencode,0,t.work,k),t.lenbits=k.bits,N){s.msg="invalid literal/lengths set",t.mode=Dt;break}if(t.distbits=6,t.distcode=t.distdyn,k={bits:t.distbits},N=ld(QU,t.lens,t.nlen,t.ndist,t.distcode,0,t.work,k),t.distbits=k.bits,N){s.msg="invalid distances set",t.mode=Dt;break}if(t.mode=hp,e===up)break e;case hp:t.mode=cp;case cp:if(o>=6&&l>=258){s.next_out=a,s.avail_out=l,s.next_in=r,s.avail_in=o,t.hold=u,t.bits=c,$q(s,f),a=s.next_out,n=s.output,l=s.avail_out,r=s.next_in,i=s.input,o=s.avail_in,u=t.hold,c=t.bits,t.mode===Kr&&(t.back=-1);break}for(t.back=0;p=t.lencode[u&(1<>>24,v=p>>>16&255,E=p&65535,!(m<=c);){if(o===0)break e;o--,u+=i[r++]<>y)],m=p>>>24,v=p>>>16&255,E=p&65535,!(y+m<=c);){if(o===0)break e;o--,u+=i[r++]<>>=y,c-=y,t.back+=y}if(u>>>=m,c-=m,t.back+=m,t.length=E,v===0){t.mode=_P;break}if(v&32){t.back=-1,t.mode=Kr;break}if(v&64){s.msg="invalid literal/length code",t.mode=Dt;break}t.extra=v&15,t.mode=hP;case hP:if(t.extra){for(L=t.extra;c>>=t.extra,c-=t.extra,t.back+=t.extra}t.was=t.length,t.mode=cP;case cP:for(;p=t.distcode[u&(1<>>24,v=p>>>16&255,E=p&65535,!(m<=c);){if(o===0)break e;o--,u+=i[r++]<>y)],m=p>>>24,v=p>>>16&255,E=p&65535,!(y+m<=c);){if(o===0)break e;o--,u+=i[r++]<>>=y,c-=y,t.back+=y}if(u>>>=m,c-=m,t.back+=m,v&64){s.msg="invalid distance code",t.mode=Dt;break}t.offset=E,t.extra=v&15,t.mode=fP;case fP:if(t.extra){for(L=t.extra;c>>=t.extra,c-=t.extra,t.back+=t.extra}if(t.offset>t.dmax){s.msg="invalid distance too far back",t.mode=Dt;break}t.mode=dP;case dP:if(l===0)break e;if(d=f-l,t.offset>d){if(d=t.offset-d,d>t.whave&&t.sane){s.msg="invalid distance too far back",t.mode=Dt;break}d>t.wnext?(d-=t.wnext,_=t.wsize-d):_=t.wnext-d,d>t.length&&(d=t.length),g=t.window}else g=n,_=a-t.offset,d=t.length;d>l&&(d=l),l-=d,t.length-=d;do n[a++]=g[_++];while(--d);t.length===0&&(t.mode=cp);break;case _P:if(l===0)break e;n[a++]=t.length,l--,t.mode=cp;break;case eT:if(t.wrap){for(;c<32;){if(o===0)break e;o--,u|=i[r++]<{if(qu(s))return Dn;let e=s.state;return e.window&&(e.window=null),s.state=null,Uu},p$=(s,e)=>{if(qu(s))return Dn;const t=s.state;return t.wrap&2?(t.head=e,e.done=!1,Uu):Dn},m$=(s,e)=>{const t=e.length;let i,n,r;return qu(s)||(i=s.state,i.wrap!==0&&i.mode!==Lm)?Dn:i.mode===Lm&&(n=1,n=eR(n,e,t,0),n!==i.check)?ZU:(r=a4(s,e,t,t),r?(i.mode=e4,JU):(i.havedict=1,Uu))};var v$=s4,E$=n4,y$=i4,T$=f$,I$=r4,R$=_$,S$=g$,b$=p$,A$=m$,O$="pako inflate (from Nodeca project)",da={inflateReset:v$,inflateReset2:E$,inflateResetKeep:y$,inflateInit:T$,inflateInit2:I$,inflate:R$,inflateEnd:S$,inflateGetHeader:b$,inflateSetDictionary:A$,inflateInfo:O$};function w$(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}var C$=w$;const o4=Object.prototype.toString,{Z_NO_FLUSH:M$,Z_FINISH:N$,Z_OK:L_,Z_STREAM_END:sT,Z_NEED_DICT:nT,Z_STREAM_ERROR:P$,Z_DATA_ERROR:EP,Z_MEM_ERROR:k$}=XU;function T0(s){this.options=KU.assign({chunkSize:1024*64,windowBits:15,to:""},s||{});const e=this.options;e.raw&&e.windowBits>=0&&e.windowBits<16&&(e.windowBits=-e.windowBits,e.windowBits===0&&(e.windowBits=-15)),e.windowBits>=0&&e.windowBits<16&&!(s&&s.windowBits)&&(e.windowBits+=32),e.windowBits>15&&e.windowBits<48&&(e.windowBits&15||(e.windowBits|=15)),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new Kq,this.strm.avail_out=0;let t=da.inflateInit2(this.strm,e.windowBits);if(t!==L_)throw new Error(tR[t]);if(this.header=new C$,da.inflateGetHeader(this.strm,this.header),e.dictionary&&(typeof e.dictionary=="string"?e.dictionary=iR.string2buf(e.dictionary):o4.call(e.dictionary)==="[object ArrayBuffer]"&&(e.dictionary=new Uint8Array(e.dictionary)),e.raw&&(t=da.inflateSetDictionary(this.strm,e.dictionary),t!==L_)))throw new Error(tR[t])}T0.prototype.push=function(s,e){const t=this.strm,i=this.options.chunkSize,n=this.options.dictionary;let r,a,o;if(this.ended)return!1;for(e===~~e?a=e:a=e===!0?N$:M$,o4.call(s)==="[object ArrayBuffer]"?t.input=new Uint8Array(s):t.input=s,t.next_in=0,t.avail_in=t.input.length;;){for(t.avail_out===0&&(t.output=new Uint8Array(i),t.next_out=0,t.avail_out=i),r=da.inflate(t,a),r===nT&&n&&(r=da.inflateSetDictionary(t,n),r===L_?r=da.inflate(t,a):r===EP&&(r=nT));t.avail_in>0&&r===sT&&t.state.wrap>0&&s[t.next_in]!==0;)da.inflateReset(t),r=da.inflate(t,a);switch(r){case P$:case EP:case nT:case k$:return this.onEnd(r),this.ended=!0,!1}if(o=t.avail_out,t.next_out&&(t.avail_out===0||r===sT))if(this.options.to==="string"){let l=iR.utf8border(t.output,t.next_out),u=t.next_out-l,c=iR.buf2string(t.output,l);t.next_out=u,t.avail_out=i-u,u&&t.output.set(t.output.subarray(l,l+u),0),this.onData(c)}else this.onData(t.output.length===t.next_out?t.output:t.output.subarray(0,t.next_out));if(!(r===L_&&o===0)){if(r===sT)return r=da.inflateEnd(this.strm),this.onEnd(r),this.ended=!0,!0;if(t.avail_in===0)break}}return!0};T0.prototype.onData=function(s){this.chunks.push(s)};T0.prototype.onEnd=function(s){s===L_&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=KU.flattenChunks(this.chunks)),this.chunks=[],this.err=s,this.msg=this.strm.msg};function x$(s,e){const t=new T0(e);if(t.push(s),t.err)throw t.msg||tR[t.err];return t.result}var D$=x$,L$={inflate:D$};const{inflate:U$}=L$;var yP=U$;const u1=class u1{constructor(e){this._jsonFile=null,this._image=null,this._imageData=null,this._baseTexture=null,this.parse(e)}parse(e){const t=new E0(e);let i=t.readShort();for(;i>0;){const n=t.readShort(),r=t.readBytes(n).toString(),a=t.readInt(),o=t.readBytes(a);if(r.endsWith(".json")){const l=yP(o.toArrayBuffer());this._jsonFile=JSON.parse(u1.TEXT_DECODER.decode(l))}else{const l=yP(o.toArrayBuffer()),u=HU(l);this._baseTexture=new pt("data:image/png;base64,"+u)}i--}}get jsonFile(){return this._jsonFile}get baseTexture(){return this._baseTexture}};u1.TEXT_DECODER=new TextDecoder("utf-8");let Um=u1;class F$ extends pf{constructor(e){super(`attribute vec2 aVertexPosition;
+ attribute vec2 aTextureCoord;
+
+ uniform mat3 projectionMatrix;
+
+ varying vec2 vTextureCoord;
+
+ void main(void)
+ {
+ gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);
+ vTextureCoord = aTextureCoord;
+ }`,`varying vec2 vTextureCoord;
+ uniform sampler2D uSampler;
+
+ uniform float gamma;
+ uniform float contrast;
+ uniform float saturation;
+ uniform float brightness;
+ uniform float red;
+ uniform float green;
+ uniform float blue;
+ uniform float alpha;
+
+ void main(void)
+ {
+ vec4 c = texture2D(uSampler, vTextureCoord);
+
+ if (c.a > 0.0) {
+ c.rgb /= c.a;
+
+ vec3 rgb = pow(c.rgb, vec3(1. / gamma));
+ rgb = mix(vec3(.5), mix(vec3(dot(vec3(.2125, .7154, .0721), rgb)), rgb, saturation), contrast);
+ rgb.r *= red;
+ rgb.g *= green;
+ rgb.b *= blue;
+ c.rgb = rgb * brightness;
+
+ c.rgb *= c.a;
+ }
+
+ gl_FragColor = c * alpha;
+ }`),this.gamma=1,this.saturation=1,this.contrast=1,this.brightness=1,this.red=1,this.green=1,this.blue=1,this.alpha=1,Object.assign(this,e)}apply(e,t,i,n){this.uniforms.gamma=Math.max(this.gamma,1e-4),this.uniforms.saturation=this.saturation,this.uniforms.contrast=this.contrast,this.uniforms.brightness=this.brightness,this.uniforms.red=this.red,this.uniforms.green=this.green,this.uniforms.blue=this.blue,this.uniforms.alpha=this.alpha,e.applyFilter(this,t,i,n)}}const B$=`
+attribute vec2 aVertexPosition;
+attribute vec2 aTextureCoord;
+uniform mat3 projectionMatrix;
+varying vec2 vTextureCoord;
+void main(void)
+{
+ gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);
+ vTextureCoord = aTextureCoord;
+}`,G$=`
+varying vec2 vTextureCoord;
+uniform sampler2D uSampler;
+uniform sampler2D mask;
+uniform int fromChannel;
+uniform int toChannel;
+
+void main(void) {
+ vec4 maskColor = texture2D(mask, vTextureCoord);
+ vec4 currentColor = texture2D(uSampler, vTextureCoord);
+ vec4 adjusted = currentColor;
+
+ if(maskColor.r == 0.0 && maskColor.g == 0.0 && maskColor.b == 0.0)
+ {
+ adjusted.a = 0.0;
+ }
+
+ gl_FragColor = vec4(adjusted.r, adjusted.g, adjusted.b, adjusted.a);
+}`,Wh=class Wh extends pf{constructor(e,t,i){super(B$,G$,{mask:e.castToBaseTexture(),fromChannel:t,toChannel:i})}};Wh.CHANNEL_RED=0,Wh.CHANNEL_GREEN=1,Wh.CHANNEL_BLUE=2,Wh.CHANNEL_ALPHA=3;let TP=Wh;/*!
+ * @pixi/display - v6.5.10
+ * Compiled Thu, 06 Jul 2023 15:25:11 UTC
+ *
+ * @pixi/display is licensed under the MIT License.
+ * http://www.opensource.org/licenses/mit-license
+ */de.SORTABLE_CHILDREN=!1;var Fm=function(){function s(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0,this.rect=null,this.updateID=-1}return s.prototype.isEmpty=function(){return this.minX>this.maxX||this.minY>this.maxY},s.prototype.clear=function(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0},s.prototype.getRectangle=function(e){return this.minX>this.maxX||this.minY>this.maxY?ve.EMPTY:(e=e||new ve(0,0,1,1),e.x=this.minX,e.y=this.minY,e.width=this.maxX-this.minX,e.height=this.maxY-this.minY,e)},s.prototype.addPoint=function(e){this.minX=Math.min(this.minX,e.x),this.maxX=Math.max(this.maxX,e.x),this.minY=Math.min(this.minY,e.y),this.maxY=Math.max(this.maxY,e.y)},s.prototype.addPointMatrix=function(e,t){var i=e.a,n=e.b,r=e.c,a=e.d,o=e.tx,l=e.ty,u=i*t.x+r*t.y+o,c=n*t.x+a*t.y+l;this.minX=Math.min(this.minX,u),this.maxX=Math.max(this.maxX,u),this.minY=Math.min(this.minY,c),this.maxY=Math.max(this.maxY,c)},s.prototype.addQuad=function(e){var t=this.minX,i=this.minY,n=this.maxX,r=this.maxY,a=e[0],o=e[1];t=an?a:n,r=o>r?o:r,a=e[2],o=e[3],t=an?a:n,r=o>r?o:r,a=e[4],o=e[5],t=an?a:n,r=o>r?o:r,a=e[6],o=e[7],t=an?a:n,r=o>r?o:r,this.minX=t,this.minY=i,this.maxX=n,this.maxY=r},s.prototype.addFrame=function(e,t,i,n,r){this.addFrameMatrix(e.worldTransform,t,i,n,r)},s.prototype.addFrameMatrix=function(e,t,i,n,r){var a=e.a,o=e.b,l=e.c,u=e.d,c=e.tx,h=e.ty,f=this.minX,d=this.minY,_=this.maxX,g=this.maxY,p=a*t+l*i+c,m=o*t+u*i+h;f=p_?p:_,g=m>g?m:g,p=a*n+l*i+c,m=o*n+u*i+h,f=p_?p:_,g=m>g?m:g,p=a*t+l*r+c,m=o*t+u*r+h,f=p_?p:_,g=m>g?m:g,p=a*n+l*r+c,m=o*n+u*r+h,f=p_?p:_,g=m>g?m:g,this.minX=f,this.minY=d,this.maxX=_,this.maxY=g},s.prototype.addVertexData=function(e,t,i){for(var n=this.minX,r=this.minY,a=this.maxX,o=this.maxY,l=t;la?u:a,o=c>o?c:o}this.minX=n,this.minY=r,this.maxX=a,this.maxY=o},s.prototype.addVertices=function(e,t,i,n){this.addVerticesMatrix(e.worldTransform,t,i,n)},s.prototype.addVerticesMatrix=function(e,t,i,n,r,a){r===void 0&&(r=0),a===void 0&&(a=r);for(var o=e.a,l=e.b,u=e.c,c=e.d,h=e.tx,f=e.ty,d=this.minX,_=this.minY,g=this.maxX,p=this.maxY,m=i;mn?e.maxX:n,this.maxY=e.maxY>r?e.maxY:r},s.prototype.addBoundsMask=function(e,t){var i=e.minX>t.minX?e.minX:t.minX,n=e.minY>t.minY?e.minY:t.minY,r=e.maxXu?r:u,this.maxY=a>c?a:c}},s.prototype.addBoundsMatrix=function(e,t){this.addFrameMatrix(t,e.minX,e.minY,e.maxX,e.maxY)},s.prototype.addBoundsArea=function(e,t){var i=e.minX>t.x?e.minX:t.x,n=e.minY>t.y?e.minY:t.y,r=e.maxXu?r:u,this.maxY=a>c?a:c}},s.prototype.pad=function(e,t){e===void 0&&(e=0),t===void 0&&(t=e),this.isEmpty()||(this.minX-=e,this.maxX+=e,this.minY-=t,this.maxY+=t)},s.prototype.addFramePad=function(e,t,i,n,r,a){e-=r,t-=a,i+=r,n+=a,this.minX=this.minXi?this.maxX:i,this.minY=this.minYn?this.maxY:n},s}();/*! *****************************************************************************
+Copyright (c) Microsoft Corporation.
+
+Permission to use, copy, modify, and/or distribute this software for any
+purpose with or without fee is hereby granted.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
+REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
+INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
+LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
+OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+PERFORMANCE OF THIS SOFTWARE.
+***************************************************************************** */var sR=function(s,e){return sR=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)i.hasOwnProperty(n)&&(t[n]=i[n])},sR(s,e)};function bw(s,e){sR(s,e);function t(){this.constructor=s}s.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)}var _i=function(s){bw(e,s);function e(){var t=s.call(this)||this;return t.tempDisplayObjectParent=null,t.transform=new AU,t.alpha=1,t.visible=!0,t.renderable=!0,t.cullable=!1,t.cullArea=null,t.parent=null,t.worldAlpha=1,t._lastSortedIndex=0,t._zIndex=0,t.filterArea=null,t.filters=null,t._enabledFilters=null,t._bounds=new Fm,t._localBounds=null,t._boundsID=0,t._boundsRect=null,t._localBoundsRect=null,t._mask=null,t._maskRefCount=0,t._destroyed=!1,t.isSprite=!1,t.isMask=!1,t}return e.mixin=function(t){for(var i=Object.keys(t),n=0;n1)for(var r=0;rthis.children.length)throw new Error(t+"addChildAt: The index "+i+" supplied is out of bounds "+this.children.length);return t.parent&&t.parent.removeChild(t),t.parent=this,this.sortDirty=!0,t.transform._parentID=-1,this.children.splice(i,0,t),this._boundsID++,this.onChildrenChange(i),t.emit("added",this),this.emit("childAdded",t,this,i),t},e.prototype.swapChildren=function(t,i){if(t!==i){var n=this.getChildIndex(t),r=this.getChildIndex(i);this.children[n]=i,this.children[r]=t,this.onChildrenChange(n