@esotericsoftware/spine-core
Version:
The official Spine Runtimes for the web.
1 lines • 191 kB
JavaScript
"use strict";var Pn=class{array=[];add(t){const e=this.contains(t);return this.array[t|0]=t|0,!e}contains(t){return this.array[t|0]!==void 0}remove(t){this.array[t|0]=void 0}clear(){this.array.length=0}},Os=class{entries={};size=0;add(t){const e=this.entries[t];return this.entries[t]=!0,e?!1:(this.size++,!0)}addAll(t){const e=this.size;for(let s=0,n=t.length;s<n;s++)this.add(t[s]);return e!==this.size}contains(t){return this.entries[t]}clear(){this.entries={},this.size=0}},_=class Ct{constructor(e=0,s=0,n=0,i=0){this.r=e,this.g=s,this.b=n,this.a=i}static WHITE=new Ct(1,1,1,1);static RED=new Ct(1,0,0,1);static GREEN=new Ct(0,1,0,1);static BLUE=new Ct(0,0,1,1);static MAGENTA=new Ct(1,0,1,1);set(e,s,n,i){return this.r=e,this.g=s,this.b=n,this.a=i,this.clamp()}setFromColor(e){return this.r=e.r,this.g=e.g,this.b=e.b,this.a=e.a,this}setFromString(e){return e=e.charAt(0)==="#"?e.substr(1):e,this.r=parseInt(e.substr(0,2),16)/255,this.g=parseInt(e.substr(2,2),16)/255,this.b=parseInt(e.substr(4,2),16)/255,this.a=e.length!==8?1:parseInt(e.substr(6,2),16)/255,this}add(e,s,n,i){return this.r+=e,this.g+=s,this.b+=n,this.a+=i,this.clamp()}clamp(){return this.r<0?this.r=0:this.r>1&&(this.r=1),this.g<0?this.g=0:this.g>1&&(this.g=1),this.b<0?this.b=0:this.b>1&&(this.b=1),this.a<0?this.a=0:this.a>1&&(this.a=1),this}static rgba8888ToColor(e,s){e.r=((s&4278190080)>>>24)/255,e.g=((s&16711680)>>>16)/255,e.b=((s&65280)>>>8)/255,e.a=(s&255)/255}static rgb888ToColor(e,s){e.r=((s&16711680)>>>16)/255,e.g=((s&65280)>>>8)/255,e.b=(s&255)/255}toRgb888(){const e=s=>`0${(s*255).toString(16)}`.slice(-2);return+`0x${e(this.r)}${e(this.g)}${e(this.b)}`}static fromString(e,s=new Ct){return s.setFromString(e)}},V=class ct{static epsilon=1e-5;static epsilon2=ct.epsilon*ct.epsilon;static PI=3.1415927;static PI2=ct.PI*2;static invPI2=1/ct.PI2;static radiansToDegrees=180/ct.PI;static radDeg=ct.radiansToDegrees;static degreesToRadians=ct.PI/180;static degRad=ct.degreesToRadians;static clamp(e,s,n){return e<s?s:e>n?n:e}static cosDeg(e){return Math.cos(e*ct.degRad)}static sinDeg(e){return Math.sin(e*ct.degRad)}static atan2Deg(e,s){return Math.atan2(e,s)*ct.radDeg}static signum(e){return e>0?1:e<0?-1:0}static toInt(e){return e>0?Math.floor(e):Math.ceil(e)}static cbrt(e){const s=Math.pow(Math.abs(e),.3333333333333333);return e<0?-s:s}static randomTriangular(e,s){return ct.randomTriangularWith(e,s,(e+s)*.5)}static randomTriangularWith(e,s,n){const i=Math.random(),r=s-e;return i<=(n-e)/r?e+Math.sqrt(i*r*(n-e)):s-Math.sqrt((1-i)*r*(s-n))}static isPowerOfTwo(e){return e&&(e&e-1)===0}},Bt=class Rt{static linear=new class extends Rt{applyInternal(e){return e}};static smooth=new class extends Rt{applyInternal(e){return e*e*(3-2*e)}};static slowFast=new class extends Rt{applyInternal(e){return e*e}};static fastSlow=new class extends Rt{applyInternal(e){return(e-1)*(e-1)*-1+1}};static circle=new class extends Rt{applyInternal(e){return e<=.5?(e*=2,(1-Math.sqrt(1-e*e))/2):(e--,e*=2,(Math.sqrt(1-e*e)+1)/2)}};apply(e,s,n){return s===void 0||n===void 0?this.applyInternal(e):e+(s-e)*this.applyInternal(n)}},Ns=class extends Bt{power=2;constructor(t){super(),this.power=t}applyInternal(t){return t<=.5?Math.pow(t*2,this.power)/2:Math.pow((t-1)*2,this.power)/(this.power%2===0?-2:2)+1}},En=class extends Ns{constructor(t){super(t)}applyInternal(t){return Math.pow(t-1,this.power)*(this.power%2===0?-1:1)+1}},B=class Vt{static SUPPORTS_TYPED_ARRAYS=typeof Float32Array<"u";static arrayCopy(e,s,n,i,r){for(let o=s,c=i;o<s+r;o++,c++)n[c]=e[o]}static arrayFill(e,s,n,i){for(let r=s;r<n;r++)e[r]=i}static setArraySize(e,s,n=0){const i=e.length;if(i===s)return e;if(e.length=s,i<s)for(let r=i;r<s;r++)e[r]=n;return e}static ensureArrayCapacity(e,s,n=0){return e.length>=s?e:Vt.setArraySize(e,s,n)}static newArray(e,s){const n=[];for(let i=0;i<e;i++)n[i]=s;return n}static newFloatArray(e){if(Vt.SUPPORTS_TYPED_ARRAYS)return new Float32Array(e);{const s=[];for(let n=0;n<s.length;n++)s[n]=0;return s}}static newShortArray(e){if(Vt.SUPPORTS_TYPED_ARRAYS)return new Int16Array(e);{const s=[];for(let n=0;n<s.length;n++)s[n]=0;return s}}static toFloatArray(e){return Vt.SUPPORTS_TYPED_ARRAYS?new Float32Array(e):e}static toSinglePrecision(e){return Vt.SUPPORTS_TYPED_ARRAYS?Math.fround(e):e}static webkit602BugfixHelper(e){}static contains(e,s,n=!0){for(let i=0;i<e.length;i++)if(e[i]===s)return!0;return!1}static enumValue(e,s){return e[s[0].toUpperCase()+s.slice(1)]}},Xn=class{static logBones(t){for(let e=0;e<t.bones.length;e++){const s=t.bones[e].appliedPose;console.log(`${s.bone.data.name}, ${s.a}, ${s.b}, ${s.c}, ${s.d}, ${s.worldX}, ${s.worldY}`)}}},Ot=class{items=[];instantiator;constructor(t){this.instantiator=t}obtain(){return this.items.length>0?this.items.pop():this.instantiator()}free(t){t.reset?.(),this.items.push(t)}freeAll(t){for(let e=0;e<t.length;e++)this.free(t[e])}clear(){this.items.length=0}},Ie=class{constructor(t=0,e=0){this.x=t,this.y=e}set(t,e){return this.x=t,this.y=e,this}length(){const t=this.x,e=this.y;return Math.sqrt(t*t+e*e)}normalize(){const t=this.length();return t!==0&&(this.x/=t,this.y/=t),this}},Rn=class{maxDelta=.064;framesPerSecond=0;delta=0;totalTime=0;lastTime=Date.now()/1e3;frameCount=0;frameTime=0;update(){const t=Date.now()/1e3;this.delta=t-this.lastTime,this.frameTime+=this.delta,this.totalTime+=this.delta,this.delta>this.maxDelta&&(this.delta=this.maxDelta),this.lastTime=t,this.frameCount++,this.frameTime>1&&(this.framesPerSecond=this.frameCount/this.frameTime,this.frameTime=0,this.frameCount=0)}},Vn=class{values;addedValues=0;lastValue=0;mean=0;dirty=!0;constructor(t=32){this.values=new Array(t)}hasEnoughData(){return this.addedValues>=this.values.length}addValue(t){this.addedValues<this.values.length&&this.addedValues++,this.values[this.lastValue++]=t,this.lastValue>this.values.length-1&&(this.lastValue=0),this.dirty=!0}getMean(){if(this.hasEnoughData()){if(this.dirty){let t=0;for(let e=0;e<this.values.length;e++)t+=this.values[e];this.mean=t/this.values.length,this.dirty=!1}return this.mean}return 0}},Ds=class{_image;constructor(t){this._image=t}getImage(){return this._image}},Jt=(t=>(t[t.Nearest=9728]="Nearest",t[t.Linear=9729]="Linear",t[t.MipMap=9987]="MipMap",t[t.MipMapNearestNearest=9984]="MipMapNearestNearest",t[t.MipMapLinearNearest=9985]="MipMapLinearNearest",t[t.MipMapNearestLinear=9986]="MipMapNearestLinear",t[t.MipMapLinearLinear=9987]="MipMapLinearLinear",t))(Jt||{}),Us=(t=>(t[t.MirroredRepeat=33648]="MirroredRepeat",t[t.ClampToEdge=33071]="ClampToEdge",t[t.Repeat=10497]="Repeat",t))(Us||{}),$s=class{texture;u=0;v=0;u2=0;v2=0;width=0;height=0;degrees=0;offsetX=0;offsetY=0;originalWidth=0;originalHeight=0},Ln=class extends Ds{setFilters(t,e){}setWraps(t,e){}dispose(){}},Ae=class{pages=[];regions=[];constructor(t){const e=new Bn(t),s=new Array(4),n={};n.size=a=>{a.width=parseInt(s[1]),a.height=parseInt(s[2])},n.format=()=>{},n.filter=a=>{a.minFilter=B.enumValue(Jt,s[1]),a.magFilter=B.enumValue(Jt,s[2])},n.repeat=a=>{s[1].indexOf("x")!==-1&&(a.uWrap=10497),s[1].indexOf("y")!==-1&&(a.vWrap=10497)},n.pma=a=>{a.pma=s[1]==="true"};var i={};i.xy=a=>{a.x=parseInt(s[1]),a.y=parseInt(s[2])},i.size=a=>{a.width=parseInt(s[1]),a.height=parseInt(s[2])},i.bounds=a=>{a.x=parseInt(s[1]),a.y=parseInt(s[2]),a.width=parseInt(s[3]),a.height=parseInt(s[4])},i.offset=a=>{a.offsetX=parseInt(s[1]),a.offsetY=parseInt(s[2])},i.orig=a=>{a.originalWidth=parseInt(s[1]),a.originalHeight=parseInt(s[2])},i.offsets=a=>{a.offsetX=parseInt(s[1]),a.offsetY=parseInt(s[2]),a.originalWidth=parseInt(s[3]),a.originalHeight=parseInt(s[4])},i.rotate=a=>{const h=s[1];h==="true"?a.degrees=90:h!=="false"&&(a.degrees=parseInt(h))},i.index=a=>{a.index=parseInt(s[1])};let r=e.readLine();for(;r&&r.trim().length===0;)r=e.readLine();for(;!(!r||r.trim().length===0||e.readEntry(s,r)===0);)r=e.readLine();let o=null,c=null,l=null;for(;r!==null;)if(r.trim().length===0)o=null,r=e.readLine();else if(o){const a=new Ce(o,r);for(;;){const h=e.readEntry(s,r=e.readLine());if(h===0)break;const d=i[s[0]];if(d)d(a);else{c||(c=[]),l||(l=[]),c.push(s[0]);const m=[];for(let u=0;u<h;u++)m.push(parseInt(s[u+1]));l.push(m)}}a.originalWidth===0&&a.originalHeight===0&&(a.originalWidth=a.width,a.originalHeight=a.height),c&&c.length>0&&l&&l.length>0&&(a.names=c,a.values=l,c=null,l=null),a.u=a.x/o.width,a.v=a.y/o.height,a.degrees===90?(a.u2=(a.x+a.height)/o.width,a.v2=(a.y+a.width)/o.height):(a.u2=(a.x+a.width)/o.width,a.v2=(a.y+a.height)/o.height),this.regions.push(a)}else{for(o=new qs(r.trim());e.readEntry(s,r=e.readLine())!==0;){const a=n[s[0]];a&&a(o)}this.pages.push(o)}}findRegion(t){for(let e=0;e<this.regions.length;e++)if(this.regions[e].name===t)return this.regions[e];return null}setTextures(t,e=""){for(const s of this.pages)s.setTexture(t.get(e+s.name))}dispose(){for(let t=0;t<this.pages.length;t++)this.pages[t].texture?.dispose()}},Bn=class{lines;index=0;constructor(t){this.lines=t.split(/\r\n|\r|\n/)}readLine(){return this.index>=this.lines.length?null:this.lines[this.index++]}readEntry(t,e){if(!e||(e=e.trim(),e.length===0))return 0;const s=e.indexOf(":");if(s===-1)return 0;t[0]=e.substr(0,s).trim();for(let n=1,i=s+1;;n++){const r=e.indexOf(",",i);if(r===-1)return t[n]=e.substr(i).trim(),n;if(t[n]=e.substr(i,r-i).trim(),i=r+1,n===4)return 4}}},qs=class{name;minFilter=9728;magFilter=9728;uWrap=33071;vWrap=33071;texture=null;width=0;height=0;pma=!1;regions=[];constructor(t){this.name=t}setTexture(t){this.texture=t,t.setFilters(this.minFilter,this.magFilter),t.setWraps(this.uWrap,this.vWrap);for(const e of this.regions)e.texture=t}},Ce=class extends $s{page;name;x=0;y=0;offsetX=0;offsetY=0;originalWidth=0;originalHeight=0;index=0;degrees=0;names=null;values=null;constructor(t,e){super(),this.page=t,this.name=e,t.regions.push(this)}},Ye=class bn{static empty=[];name;timelineAttachment;timelineSlots=bn.empty;constructor(e){if(!e)throw new Error("name cannot be null.");this.name=e,this.timelineAttachment=this}isTimelineActive(e,s,n){let i=e[s];if(i.bone.isActive()){const r=(n?i.getAppliedPose():i.getPose()).getAttachment();if(r!=null&&r.timelineAttachment===this)return!0}for(let r=0,o=this.timelineSlots.length;r<o;r++){if(i=e[this.timelineSlots[r]],!i.bone.isActive())continue;const c=(n?i.getAppliedPose():i.getPose()).getAttachment();if(c!=null&&c.timelineAttachment===this)return!0}return!1}},bt=class xn extends Ye{static nextID=0;id=xn.nextID++;bones=null;vertices=[];worldVerticesLength=0;constructor(e){super(e)}computeWorldVertices(e,s,n,i,r,o,c){i=o+(i>>1)*c;const l=s.appliedPose.deform;let a=this.vertices;const h=this.bones;if(!h){l.length>0&&(a=l);const f=s.bone.appliedPose,p=f.worldX,g=f.worldY,b=f.a,x=f.b,w=f.c,v=f.d;for(let y=n,S=o;S<i;y+=2,S+=c){const T=a[y],A=a[y+1];r[S]=T*b+A*x+p,r[S+1]=T*w+A*v+g}return}let d=0,m=0;for(let f=0;f<n;f+=2){const p=h[d];d+=p+1,m+=p}const u=e.bones;if(l.length===0)for(let f=o,p=m*3;f<i;f+=c){let g=0,b=0,x=h[d++];for(x+=d;d<x;d++,p+=3){const w=u[h[d]].appliedPose,v=a[p],y=a[p+1],S=a[p+2];g+=(v*w.a+y*w.b+w.worldX)*S,b+=(v*w.c+y*w.d+w.worldY)*S}r[f]=g,r[f+1]=b}else{const f=l;for(let p=o,g=m*3,b=m<<1;p<i;p+=c){let x=0,w=0,v=h[d++];for(v+=d;d<v;d++,g+=3,b+=2){const y=u[h[d]].appliedPose,S=a[g]+f[b],T=a[g+1]+f[b+1],A=a[g+2];x+=(S*y.a+T*y.b+y.worldX)*A,w+=(S*y.c+T*y.d+y.worldY)*A}r[p]=x,r[p+1]=w}}}copyTo(e){this.bones?(e.bones=[],B.arrayCopy(this.bones,0,e.bones,0,this.bones.length)):e.bones=null,this.vertices&&(e.vertices=B.newFloatArray(this.vertices.length),B.arrayCopy(this.vertices,0,e.vertices,0,this.vertices.length)),e.worldVerticesLength=this.worldVerticesLength,e.timelineAttachment=this.timelineAttachment,e.timelineSlots=this.timelineSlots}},St=class Xs extends bt{sequence;regionUVs=[];triangles=[];hullLength=0;path;color=new _(1,1,1,1);sourceMesh=null;edges=[];width=0;height=0;tempColor=new _(0,0,0,0);constructor(e,s){super(e),this.sequence=s}copy(){if(this.sourceMesh)return this.newLinkedMesh();const e=new Xs(this.name,this.sequence.copy());return e.path=this.path,e.color.setFromColor(this.color),this.copyTo(e),e.regionUVs=[],B.arrayCopy(this.regionUVs,0,e.regionUVs,0,this.regionUVs.length),e.triangles=[],B.arrayCopy(this.triangles,0,e.triangles,0,this.triangles.length),e.hullLength=this.hullLength,this.edges&&(e.edges=[],B.arrayCopy(this.edges,0,e.edges,0,this.edges.length)),e.width=this.width,e.height=this.height,e}updateSequence(){this.sequence.update(this)}getSourceMesh(){return this.sourceMesh}setSourceMesh(e){this.sourceMesh=e,e&&(this.bones=e.bones,this.vertices=e.vertices,this.worldVerticesLength=e.worldVerticesLength,this.regionUVs=e.regionUVs,this.triangles=e.triangles,this.hullLength=e.hullLength,this.worldVerticesLength=e.worldVerticesLength,this.edges=e.edges,this.width=e.width,this.height=e.height)}newLinkedMesh(){const e=new Xs(this.name,this.sequence.copy());return e.timelineAttachment=this.timelineAttachment,e.path=this.path,e.color.setFromColor(this.color),e.setSourceMesh(this.sourceMesh?this.sourceMesh:this),e.updateSequence(),e}static computeUVs(e,s,n){if(!e)throw new Error("Region not set.");const i=n.length;let r=e.u,o=e.v,c=0,l=0;if(e instanceof Ce){const a=e.page,h=a.width,d=a.height;switch(e.degrees){case 90:r-=(e.originalHeight-e.offsetY-e.height)/h,o-=(e.originalWidth-e.offsetX-e.width)/d,c=e.originalHeight/h,l=e.originalWidth/d;for(let m=0;m<i;m+=2)n[m]=r+s[m+1]*c,n[m+1]=o+(1-s[m])*l;return;case 180:r-=(e.originalWidth-e.offsetX-e.width)/h,o-=e.offsetY/d,c=e.originalWidth/h,l=e.originalHeight/d;for(let m=0;m<i;m+=2)n[m]=r+(1-s[m])*c,n[m+1]=o+(1-s[m+1])*l;return;case 270:r-=e.offsetY/h,o-=e.offsetX/d,c=e.originalHeight/h,l=e.originalWidth/d;for(let m=0;m<i;m+=2)n[m]=r+(1-s[m+1])*c,n[m+1]=o+s[m]*l;return;default:r-=e.offsetX/h,o-=(e.originalHeight-e.offsetY-e.height)/d,c=e.originalWidth/h,l=e.originalHeight/d}}else e?(c=e.u2-r,l=e.v2-o):(r=o=0,c=l=1);for(let a=0;a<i;a+=2)n[a]=r+s[a]*c,n[a+1]=o+s[a+1]*l}},Ft=class wn extends Ye{sequence;x=0;y=0;scaleX=1;scaleY=1;rotation=0;width=0;height=0;path;color=new _(1,1,1,1);tempColor=new _(1,1,1,1);constructor(e,s){super(e),this.sequence=s}copy(){const e=new wn(this.name,this.sequence.copy());return e.path=this.path,e.x=this.x,e.y=this.y,e.scaleX=this.scaleX,e.scaleY=this.scaleY,e.rotation=this.rotation,e.width=this.width,e.height=this.height,e.color.setFromColor(this.color),e}computeWorldVertices(e,s,n,i,r){const o=e.bone.appliedPose,c=o.worldX,l=o.worldY,a=o.a,h=o.b,d=o.c,m=o.d;let u=s[0],f=s[1];n[i]=u*a+f*h+c,n[i+1]=u*d+f*m+l,i+=r,u=s[2],f=s[3],n[i]=u*a+f*h+c,n[i+1]=u*d+f*m+l,i+=r,u=s[4],f=s[5],n[i]=u*a+f*h+c,n[i+1]=u*d+f*m+l,i+=r,u=s[6],f=s[7],n[i]=u*a+f*h+c,n[i+1]=u*d+f*m+l}getOffsets(e){return this.sequence.offsets[this.sequence.resolveIndex(e)]}updateSequence(){this.sequence.update(this)}static computeUVs(e,s,n,i,r,o,c,l,a,h){if(!e)throw new Error("Region not set.");const d=c/e.originalWidth*i,m=l/e.originalHeight*r,u=-c/2*i+e.offsetX*d,f=-l/2*r+e.offsetY*m,p=u+e.width*d,g=f+e.height*m,b=o*V.degRad,x=Math.cos(b),w=Math.sin(b),v=u*x+s,y=u*w,S=f*x+n,T=f*w,A=p*x+s,Y=p*w,I=g*x+n,M=g*w;a[0]=v-T,a[1]=S+y,a[2]=v-M,a[3]=I+y,a[4]=A-M,a[5]=I+Y,a[6]=A-T,a[7]=S+Y,e==null?(h[0]=0,h[1]=0,h[2]=0,h[3]=1,h[4]=1,h[5]=1,h[6]=1,h[7]=0):(h[1]=e.v2,h[2]=e.u,h[5]=e.v,h[6]=e.u2,e.degrees===90?(h[0]=e.u2,h[3]=e.v2,h[4]=e.u,h[7]=e.v):(h[0]=e.u,h[3]=e.v,h[4]=e.u2,h[7]=e.v2))}static X1=0;static Y1=1;static C1R=2;static C1G=3;static C1B=4;static C1A=5;static U1=6;static V1=7;static X2=8;static Y2=9;static C2R=10;static C2G=11;static C2B=12;static C2A=13;static U2=14;static V2=15;static X3=16;static Y3=17;static C3R=18;static C3G=19;static C3B=20;static C3A=21;static U3=22;static V3=23;static X4=24;static Y4=25;static C4R=26;static C4G=27;static C4B=28;static C4A=29;static U4=30;static V4=31},Nt=class ve{static _nextID=0;id=ve.nextID();regions;pathSuffix;uvs;offsets;start=0;digits=0;setupIndex=0;constructor(e,s){this.regions=new Array(e),this.pathSuffix=s}copy(){const e=this.regions.length,s=new ve(e,this.pathSuffix);if(B.arrayCopy(this.regions,0,s.regions,0,e),s.start=this.start,s.digits=this.digits,s.setupIndex=this.setupIndex,this.uvs!=null){const n=this.uvs[0].length;s.uvs=[];for(let i=0;i<e;i++)s.uvs[i]=B.newFloatArray(n),B.arrayCopy(this.uvs[i],0,s.uvs[i],0,n)}if(this.offsets!=null){s.offsets=[];for(let n=0;n<e;n++)s.offsets[n]=[],B.arrayCopy(this.offsets[n],0,s.offsets[n],0,8)}return s}update(e){const s=this.regions.length;if(e instanceof Ft){this.uvs=[],this.offsets=[];for(let n=0;n<s;n++)this.uvs[n]=B.newFloatArray(8),this.offsets[n]=[],Ft.computeUVs(this.regions[n],e.x,e.y,e.scaleX,e.scaleY,e.rotation,e.width,e.height,this.offsets[n],this.uvs[n])}else if(e instanceof St){const n=e.regionUVs;this.uvs=[],this.offsets=void 0;for(let i=0;i<s;i++)this.uvs[i]=B.newFloatArray(n.length),St.computeUVs(this.regions[i],n,this.uvs[i])}}resolveIndex(e){let s=e.sequenceIndex;return s===-1&&(s=this.setupIndex),s>=this.regions.length&&(s=this.regions.length-1),s}getUVs(e){return this.uvs[e]}hasPathSuffix(){return this.pathSuffix}getPath(e,s){if(!this.pathSuffix)return e;let n=e;const i=(this.start+s).toString();for(let r=this.digits-i.length;r>0;r--)n+="0";return n+=i,n}static nextID(){return ve._nextID++}},Me=(t=>(t[t.hold=0]="hold",t[t.once=1]="once",t[t.loop=2]="loop",t[t.pingpong=3]="pingpong",t[t.onceReverse=4]="onceReverse",t[t.loopReverse=5]="loopReverse",t[t.pingpongReverse=6]="pingpongReverse",t))(Me||{}),Fe=[0,1,2,3,4,5,6],Zt=class{name;timelines=[];timelineIds;bones;color=new _(1,1,1,1);duration;constructor(t,e,s){if(!t)throw new Error("name cannot be null.");this.name=t,this.duration=s,this.timelineIds=new Os,this.bones=[],this.setTimelines(e)}setTimelines(t){if(!t)throw new Error("timelines cannot be null.");this.timelines=t;const e=t.length;this.timelineIds.clear(),this.bones.length=0;const s=new Set,n=t;for(let i=0;i<e;i++){const r=n[i];this.timelineIds.addAll(r.propertyIds),Hs(r)&&s.add(r.boneIndex)&&this.bones.push(r.boneIndex)}}hasTimeline(t){for(let e=0;e<t.length;e++)if(this.timelineIds.contains(t[e]))return!0;return!1}apply(t,e,s,n,i,r,o,c,l,a){if(!t)throw new Error("skeleton cannot be null.");n&&this.duration!==0&&(s%=this.duration,e>0&&(e%=this.duration));const h=this.timelines;for(let d=0,m=h.length;d<m;d++)h[d].apply(t,e,s,i,r,o,c,l,a)}},zs=(t=>(t[t.current=0]="current",t[t.setup=1]="setup",t[t.first=2]="first",t))(zs||{}),_s=(t=>(t[t.rotate=0]="rotate",t[t.x=1]="x",t[t.y=2]="y",t[t.scaleX=3]="scaleX",t[t.scaleY=4]="scaleY",t[t.shearX=5]="shearX",t[t.shearY=6]="shearY",t[t.inherit=7]="inherit",t[t.rgb=8]="rgb",t[t.alpha=9]="alpha",t[t.rgb2=10]="rgb2",t[t.attachment=11]="attachment",t[t.deform=12]="deform",t[t.event=13]="event",t[t.drawOrder=14]="drawOrder",t[t.drawOrderFolder=15]="drawOrderFolder",t[t.ikConstraint=16]="ikConstraint",t[t.transformConstraint=17]="transformConstraint",t[t.pathConstraintPosition=18]="pathConstraintPosition",t[t.pathConstraintSpacing=19]="pathConstraintSpacing",t[t.pathConstraintMix=20]="pathConstraintMix",t[t.physicsConstraintInertia=21]="physicsConstraintInertia",t[t.physicsConstraintStrength=22]="physicsConstraintStrength",t[t.physicsConstraintDamping=23]="physicsConstraintDamping",t[t.physicsConstraintMass=24]="physicsConstraintMass",t[t.physicsConstraintWind=25]="physicsConstraintWind",t[t.physicsConstraintGravity=26]="physicsConstraintGravity",t[t.physicsConstraintMix=27]="physicsConstraintMix",t[t.physicsConstraintReset=28]="physicsConstraintReset",t[t.sequence=29]="sequence",t[t.sliderTime=30]="sliderTime",t[t.sliderMix=31]="sliderMix",t))(_s||{}),Z=class{propertyIds;frames;additive=!1;instant=!1;constructor(t,...e){this.propertyIds=e,this.frames=B.newFloatArray(t*this.getFrameEntries())}getPropertyIds(){return this.propertyIds}getFrameEntries(){return 1}getFrameCount(){return this.frames.length/this.getFrameEntries()}getDuration(){return this.frames[this.frames.length-this.getFrameEntries()]}static search(t,e,s=1){const n=t.length;for(let i=s;i<n;i+=s)if(t[i]>e)return i-s;return n-s}};function Ws(t){return typeof t=="object"&&t!==null&&typeof t.slotIndex=="number"}var xt=class extends Z{curves;constructor(t,e,...s){super(t,...s),this.curves=B.newFloatArray(t+e*18),this.curves[t-1]=1}setLinear(t){this.curves[t]=0}setStepped(t){this.curves[t]=1}shrink(t){const e=this.getFrameCount()+t*18;if(this.curves.length>e){const s=B.newFloatArray(e);B.arrayCopy(this.curves,0,s,0,e),this.curves=s}}setBezier(t,e,s,n,i,r,o,c,l,a,h){const d=this.curves;let m=this.getFrameCount()+t*18;s===0&&(d[e]=2+m);const u=(n-r*2+c)*.03,f=(i-o*2+l)*.03,p=((r-c)*3-n+a)*.006,g=((o-l)*3-i+h)*.006;let b=u*2+p,x=f*2+g,w=(r-n)*.3+u+p*.16666667,v=(o-i)*.3+f+g*.16666667,y=n+w,S=i+v;for(let T=m+18;m<T;m+=2)d[m]=y,d[m+1]=S,w+=b,v+=x,b+=p,x+=g,y+=w,S+=v}getBezierValue(t,e,s,n){const i=this.curves;if(i[n]>t){const l=this.frames[e],a=this.frames[e+s];return a+(t-l)/(i[n]-l)*(i[n+1]-a)}const r=n+18;for(n+=2;n<r;n+=2)if(i[n]>=t){const l=i[n-2],a=i[n-1];return a+(t-l)/(i[n]-l)*(i[n+1]-a)}e+=this.getFrameEntries();const o=i[r-2],c=i[r-1];return c+(t-o)/(this.frames[e]-o)*(this.frames[e+s]-c)}},Dt=class jt extends xt{constructor(e,s,n){super(e,s,n)}getFrameEntries(){return 2}setFrame(e,s,n){e<<=1,this.frames[e]=s,this.frames[e+1]=n}getCurveValue(e){const s=this.frames;let n=s.length-2;for(let r=2;r<=n;r+=2)if(s[r]>e){n=r-2;break}const i=this.curves[n>>1];switch(i){case 0:{const r=s[n],o=s[n+1];return o+(e-r)/(s[n+2]-r)*(s[n+2+1]-o)}case 1:return s[n+1]}return this.getBezierValue(e,n,1,i-2)}getRelativeValue(e,s,n,i,r,o){if(e<this.frames[0])return jt.beforeFirstKey(n,s,r,o);const c=this.getCurveValue(e);return n===1?o+c*s:r+(i?c:c+o-r)*s}getAbsoluteValue(e,s,n,i,r,o,c){return c===void 0?this.getAbsoluteValue1(e,s,n,i,r,o):this.getAbsoluteValue2(e,s,n,i,r,o,c)}getAbsoluteValue1(e,s,n,i,r,o){if(e<this.frames[0])return jt.beforeFirstKey(n,s,r,o);const c=this.getCurveValue(e);return n===1?o+(i?c:c-o)*s:r+(i?c:c-r)*s}getAbsoluteValue2(e,s,n,i,r,o,c){return e<this.frames[0]?jt.beforeFirstKey(n,s,r,o):n===1?o+(i?c:c-o)*s:r+(i?c:c-r)*s}getScaleValue(e,s,n,i,r,o,c){if(e<this.frames[0])return jt.beforeFirstKey(n,s,o,c);const l=this.getCurveValue(e)*c;if(s===1&&!i)return l;let a=n===1?c:o;return i?a+(l-c)*s:r?a+(Math.abs(l)*Math.sign(a)-a)*s:(a=Math.abs(a)*Math.sign(l),a+(l-a)*s)}static beforeFirstKey(e,s,n,i){switch(e){case 1:return i;case 2:return n+(i-n)*s;case 0:return n}}};function Hs(t){return typeof t=="object"&&t!==null&&typeof t.boneIndex=="number"}var wt=class extends Dt{boneIndex;constructor(t,e,s,n){super(t,e,`${n}|${s}`),this.boneIndex=s,this.additive=!0}apply(t,e,s,n,i,r,o,c,l){const a=t.bones[this.boneIndex];a.active&&this.apply1(l?a.appliedPose:a.pose,a.data.setupPose,s,i,r,o,c)}},Qt=class extends xt{boneIndex;constructor(t,e,s,n,i){super(t,e,`${n}|${s}`,`${i}|${s}`),this.boneIndex=s,this.additive=!0}getFrameEntries(){return 3}setFrame(t,e,s,n){t*=3,this.frames[t]=e,this.frames[t+1]=s,this.frames[t+2]=n}apply(t,e,s,n,i,r,o,c,l){const a=t.bones[this.boneIndex];a.active&&this.apply1(l?a.appliedPose:a.pose,a.data.setupPose,s,i,r,o,c)}},Ut=class extends wt{constructor(t,e,s){super(t,e,s,0)}apply1(t,e,s,n,i,r,o){t.rotation=this.getRelativeValue(s,n,i,r,t.rotation,e.rotation)}},ke=class extends Qt{constructor(t,e,s){super(t,e,s,1,2)}apply1(t,e,s,n,i,r,o){const c=this.frames;if(s<c[0]){switch(i){case 1:t.x=e.x,t.y=e.y;break;case 2:t.x+=(e.x-t.x)*n,t.y+=(e.y-t.y)*n;break}return}let l=0,a=0;const h=Z.search(c,s,3),d=this.curves[h/3];switch(d){case 0:{const m=c[h];l=c[h+1],a=c[h+2];const u=(s-m)/(c[h+3]-m);l+=(c[h+3+1]-l)*u,a+=(c[h+3+2]-a)*u;break}case 1:l=c[h+1],a=c[h+2];break;default:l=this.getBezierValue(s,h,1,d-2),a=this.getBezierValue(s,h,2,d+18-2)}i===1?(t.x=e.x+l*n,t.y=e.y+a*n):r?(t.x+=l*n,t.y+=a*n):(t.x+=(e.x+l-t.x)*n,t.y+=(e.y+a-t.y)*n)}},Pe=class extends wt{constructor(t,e,s){super(t,e,s,1)}apply1(t,e,s,n,i,r,o){t.x=this.getRelativeValue(s,n,i,r,t.x,e.x)}},Ee=class extends wt{constructor(t,e,s){super(t,e,s,2)}apply1(t,e,s,n,i,r,o){t.y=this.getRelativeValue(s,n,i,r,t.y,e.y)}},Xe=class extends Qt{constructor(t,e,s){super(t,e,s,3,4)}apply1(t,e,s,n,i,r,o){const c=this.frames;if(s<c[0]){switch(i){case 1:t.scaleX=e.scaleX,t.scaleY=e.scaleY;break;case 2:t.scaleX+=(e.scaleX-t.scaleX)*n,t.scaleY+=(e.scaleY-t.scaleY)*n;break}return}let l,a;const h=Z.search(c,s,3),d=this.curves[h/3];switch(d){case 0:{const m=c[h];l=c[h+1],a=c[h+2];const u=(s-m)/(c[h+3]-m);l+=(c[h+3+1]-l)*u,a+=(c[h+3+2]-a)*u;break}case 1:l=c[h+1],a=c[h+2];break;default:l=this.getBezierValue(s,h,1,d-2),a=this.getBezierValue(s,h,2,d+18-2)}if(l*=e.scaleX,a*=e.scaleY,n===1&&!r)t.scaleX=l,t.scaleY=a;else{let m=0,u=0;i===1?(m=e.scaleX,u=e.scaleY):(m=t.scaleX,u=t.scaleY),r?(t.scaleX=m+(l-e.scaleX)*n,t.scaleY=u+(a-e.scaleY)*n):o?(t.scaleX=m+(Math.abs(l)*Math.sign(m)-m)*n,t.scaleY=u+(Math.abs(a)*Math.sign(u)-u)*n):(m=Math.abs(m)*Math.sign(l),u=Math.abs(u)*Math.sign(a),t.scaleX=m+(l-m)*n,t.scaleY=u+(a-u)*n)}}},Re=class extends wt{constructor(t,e,s){super(t,e,s,3)}apply1(t,e,s,n,i,r,o){t.scaleX=this.getScaleValue(s,n,i,r,o,t.scaleX,e.scaleX)}},Ve=class extends wt{constructor(t,e,s){super(t,e,s,4)}apply1(t,e,s,n,i,r,o){t.scaleY=this.getScaleValue(s,n,i,r,o,t.scaleY,e.scaleY)}},Le=class extends Qt{constructor(t,e,s){super(t,e,s,5,6)}apply1(t,e,s,n,i,r,o){const c=this.frames;if(s<c[0]){switch(i){case 1:t.shearX=e.shearX,t.shearY=e.shearY;break;case 2:t.shearX+=(e.shearX-t.shearX)*n,t.shearY+=(e.shearY-t.shearY)*n;break}return}let l=0,a=0;const h=Z.search(c,s,3),d=this.curves[h/3];switch(d){case 0:{const m=c[h];l=c[h+1],a=c[h+2];const u=(s-m)/(c[h+3]-m);l+=(c[h+3+1]-l)*u,a+=(c[h+3+2]-a)*u;break}case 1:l=c[h+1],a=c[h+2];break;default:l=this.getBezierValue(s,h,1,d-2),a=this.getBezierValue(s,h,2,d+18-2)}i===1?(t.shearX=e.shearX+l*n,t.shearY=e.shearY+a*n):r?(t.shearX+=l*n,t.shearY+=a*n):(t.shearX+=(e.shearX+l-t.shearX)*n,t.shearY+=(e.shearY+a-t.shearY)*n)}},Be=class extends wt{constructor(t,e,s){super(t,e,s,5)}apply1(t,e,s,n,i,r,o){t.shearX=this.getRelativeValue(s,n,i,r,t.shearX,e.shearX)}},Oe=class extends wt{constructor(t,e,s){super(t,e,s,6)}apply1(t,e,s,n,i,r,o){t.shearY=this.getRelativeValue(s,n,i,r,t.shearY,e.shearY)}},Ne=class extends Z{boneIndex;constructor(t,e){super(t,`7|${e}`),this.boneIndex=e,this.instant=!0}getFrameEntries(){return 2}setFrame(t,e,s){t*=2,this.frames[t]=e,this.frames[t+1]=s}apply(t,e,s,n,i,r,o,c,l){const a=t.bones[this.boneIndex];if(!a.active)return;const h=l?a.appliedPose:a.pose;if(c)r!==0&&(h.inherit=a.data.setupPose.inherit);else{const d=this.frames;s<d[0]?r!==0&&(h.inherit=a.data.setupPose.inherit):h.inherit=this.frames[Z.search(d,s,2)+1]}}},$t=class extends xt{slotIndex;constructor(t,e,s,...n){super(t,e,...n),this.slotIndex=s}apply(t,e,s,n,i,r,o,c,l){const a=t.slots[this.slotIndex];a.bone.active&&this.apply1(a,l?a.appliedPose:a.pose,s,i,r,o)}},De=class extends $t{constructor(t,e,s){super(t,e,s,`8|${s}`,`9|${s}`)}getFrameEntries(){return 5}setFrame(t,e,s,n,i,r){t*=5,this.frames[t]=e,this.frames[t+1]=s,this.frames[t+2]=n,this.frames[t+3]=i,this.frames[t+4]=r}apply1(t,e,s,n,i,r){const o=e.color,c=this.frames;if(s<c[0]){const f=t.data.setupPose.color;switch(i){case 1:o.setFromColor(f);break;case 2:o.add((f.r-o.r)*n,(f.g-o.g)*n,(f.b-o.b)*n,(f.a-o.a)*n);break}return}let l=0,a=0,h=0,d=0;const m=Z.search(c,s,5),u=this.curves[m/5];switch(u){case 0:{const f=c[m];l=c[m+1],a=c[m+2],h=c[m+3],d=c[m+4];const p=(s-f)/(c[m+5]-f);l+=(c[m+5+1]-l)*p,a+=(c[m+5+2]-a)*p,h+=(c[m+5+3]-h)*p,d+=(c[m+5+4]-d)*p;break}case 1:l=c[m+1],a=c[m+2],h=c[m+3],d=c[m+4];break;default:l=this.getBezierValue(s,m,1,u-2),a=this.getBezierValue(s,m,2,u+18-2),h=this.getBezierValue(s,m,3,u+36-2),d=this.getBezierValue(s,m,4,u+54-2)}if(n===1)o.set(l,a,h,d);else if(i===1){const f=t.data.setupPose.color;o.set(f.r+(l-f.r)*n,f.g+(a-f.g)*n,f.b+(h-f.b)*n,f.a+(d-f.a)*n)}else o.add((l-o.r)*n,(a-o.g)*n,(h-o.b)*n,(d-o.a)*n)}},Ue=class extends $t{constructor(t,e,s){super(t,e,s,`8|${s}`)}getFrameEntries(){return 4}setFrame(t,e,s,n,i){t<<=2,this.frames[t]=e,this.frames[t+1]=s,this.frames[t+2]=n,this.frames[t+3]=i}apply1(t,e,s,n,i,r){const o=e.color;let c=0,l=0,a=0;const h=this.frames;if(s<h[0]){const u=t.data.setupPose.color;switch(i){case 1:{o.r=u.r,o.g=u.g,o.b=u.b;break}case 2:{o.r+=(u.r-o.r)*n,o.g+=(u.g-o.g)*n,o.b+=(u.b-o.b)*n;break}}return}const d=Z.search(h,s,4),m=this.curves[d>>2];switch(m){case 0:{const u=h[d];c=h[d+1],l=h[d+2],a=h[d+3];const f=(s-u)/(h[d+4]-u);c+=(h[d+4+1]-c)*f,l+=(h[d+4+2]-l)*f,a+=(h[d+4+3]-a)*f;break}case 1:c=h[d+1],l=h[d+2],a=h[d+3];break;default:c=this.getBezierValue(s,d,1,m-2),l=this.getBezierValue(s,d,2,m+18-2),a=this.getBezierValue(s,d,3,m+36-2)}if(n!==1)if(i===1){const u=t.data.setupPose.color;c=u.r+(c-u.r)*n,l=u.g+(l-u.g)*n,a=u.b+(a-u.b)*n}else c=o.r+(c-o.r)*n,l=o.g+(l-o.g)*n,a=o.b+(a-o.b)*n;o.r=c<0?0:c>1?1:c,o.g=l<0?0:l>1?1:l,o.b=a<0?0:a>1?1:a}},$e=class extends Dt{slotIndex=0;constructor(t,e,s){super(t,e,`9|${s}`),this.slotIndex=s}apply(t,e,s,n,i,r,o,c,l){const a=t.slots[this.slotIndex];if(!a.bone.active)return;const h=(l?a.appliedPose:a.pose).color;let d=0;const m=this.frames;if(s<m[0]){const u=a.data.setupPose.color.a;switch(r){case 1:h.a=u;break;case 2:h.a+=(u-h.a)*i;break}return}if(d=this.getCurveValue(s),i!==1)if(r===1){const u=a.data.setupPose.color;d=u.a+(d-u.a)*i}else d=h.a+(d-h.a)*i;h.a=d<0?0:d>1?1:d}},qe=class extends $t{constructor(t,e,s){super(t,e,s,`8|${s}`,`9|${s}`,`10|${s}`)}getFrameEntries(){return 8}setFrame(t,e,s,n,i,r,o,c,l){t<<=3,this.frames[t]=e,this.frames[t+1]=s,this.frames[t+2]=n,this.frames[t+3]=i,this.frames[t+4]=r,this.frames[t+5]=o,this.frames[t+6]=c,this.frames[t+7]=l}apply1(t,e,s,n,i,r){const o=e.color,c=e.darkColor;let l=0,a=0,h=0;const d=this.frames;if(s<d[0]){const x=t.data.setupPose,w=x.color,v=x.darkColor;switch(i){case 1:{o.setFromColor(w),c.r=v.r,c.g=v.g,c.b=v.b;break}case 2:{o.add((w.r-o.r)*n,(w.g-o.g)*n,(w.b-o.b)*n,(w.a-o.a)*n),c.r+=(v.r-c.r)*n,c.g+=(v.g-c.g)*n,c.b+=(v.b-c.b)*n;break}}return}let m=0,u=0,f=0,p=0;const g=Z.search(d,s,8),b=this.curves[g>>3];switch(b){case 0:{const x=d[g];m=d[g+1],u=d[g+2],f=d[g+3],p=d[g+4],l=d[g+5],a=d[g+6],h=d[g+7];const w=(s-x)/(d[g+8]-x);m+=(d[g+8+1]-m)*w,u+=(d[g+8+2]-u)*w,f+=(d[g+8+3]-f)*w,p+=(d[g+8+4]-p)*w,l+=(d[g+8+5]-l)*w,a+=(d[g+8+6]-a)*w,h+=(d[g+8+7]-h)*w;break}case 1:m=d[g+1],u=d[g+2],f=d[g+3],p=d[g+4],l=d[g+5],a=d[g+6],h=d[g+7];break;default:m=this.getBezierValue(s,g,1,b-2),u=this.getBezierValue(s,g,2,b+18-2),f=this.getBezierValue(s,g,3,b+36-2),p=this.getBezierValue(s,g,4,b+54-2),l=this.getBezierValue(s,g,5,b+72-2),a=this.getBezierValue(s,g,6,b+90-2),h=this.getBezierValue(s,g,7,b+108-2)}if(n===1)o.set(m,u,f,p);else if(i===1){const x=t.data.setupPose;let w=x.color;o.set(w.r+(m-w.r)*n,w.g+(u-w.g)*n,w.b+(f-w.b)*n,w.a+(p-w.a)*n),w=x.darkColor,l=w.r+(l-w.r)*n,a=w.g+(a-w.g)*n,h=w.b+(h-w.b)*n}else o.add((m-o.r)*n,(u-o.g)*n,(f-o.b)*n,(p-o.a)*n),l=c.r+(l-c.r)*n,a=c.g+(a-c.g)*n,h=c.b+(h-c.b)*n;c.r=l<0?0:l>1?1:l,c.g=a<0?0:a>1?1:a,c.b=h<0?0:h>1?1:h}},ze=class extends $t{constructor(t,e,s){super(t,e,s,`8|${s}`,`10|${s}`)}getFrameEntries(){return 7}setFrame(t,e,s,n,i,r,o,c){t*=7,this.frames[t]=e,this.frames[t+1]=s,this.frames[t+2]=n,this.frames[t+3]=i,this.frames[t+4]=r,this.frames[t+5]=o,this.frames[t+6]=c}apply1(t,e,s,n,i,r){const o=e.color,c=e.darkColor;let l=0,a=0,h=0,d=0,m=0,u=0;const f=this.frames;if(s<f[0]){const b=t.data.setupPose,x=b.color,w=b.darkColor;switch(i){case 1:o.r=x.r,o.g=x.g,o.b=x.b,c.r=w.r,c.g=w.g,c.b=w.b;break;case 2:o.r+=(x.r-o.r)*n,o.g+=(x.g-o.g)*n,o.b+=(x.b-o.b)*n,c.r+=(w.r-c.r)*n,c.g+=(w.g-c.g)*n,c.b+=(w.b-c.b)*n;break}return}const p=Z.search(f,s,7),g=this.curves[p/7];switch(g){case 0:{const b=f[p];l=f[p+1],a=f[p+2],h=f[p+3],d=f[p+4],m=f[p+5],u=f[p+6];const x=(s-b)/(f[p+7]-b);l+=(f[p+7+1]-l)*x,a+=(f[p+7+2]-a)*x,h+=(f[p+7+3]-h)*x,d+=(f[p+7+4]-d)*x,m+=(f[p+7+5]-m)*x,u+=(f[p+7+6]-u)*x;break}case 1:l=f[p+1],a=f[p+2],h=f[p+3],d=f[p+4],m=f[p+5],u=f[p+6];break;default:l=this.getBezierValue(s,p,1,g-2),a=this.getBezierValue(s,p,2,g+18-2),h=this.getBezierValue(s,p,3,g+36-2),d=this.getBezierValue(s,p,4,g+54-2),m=this.getBezierValue(s,p,5,g+72-2),u=this.getBezierValue(s,p,6,g+90-2)}if(n!==1)if(i===1){const b=t.data.setupPose;let x=b.color;l=x.r+(l-x.r)*n,a=x.g+(a-x.g)*n,h=x.b+(h-x.b)*n,x=b.darkColor,d=x.r+(d-x.r)*n,m=x.g+(m-x.g)*n,u=x.b+(u-x.b)*n}else l=o.r+(l-o.r)*n,a=o.g+(a-o.g)*n,h=o.b+(h-o.b)*n,d=c.r+(d-c.r)*n,m=c.g+(m-c.g)*n,u=c.b+(u-c.b)*n;o.r=l<0?0:l>1?1:l,o.g=a<0?0:a>1?1:a,o.b=h<0?0:h>1?1:h,c.r=d<0?0:d>1?1:d,c.g=m<0?0:m>1?1:m,c.b=u<0?0:u>1?1:u}},kt=class extends Z{slotIndex=0;attachmentNames;constructor(t,e){super(t,`11|${e}`),this.slotIndex=e,this.attachmentNames=new Array(t),this.instant=!0}getFrameCount(){return this.frames.length}setFrame(t,e,s){this.frames[t]=e,this.attachmentNames[t]=s}apply(t,e,s,n,i,r,o,c,l){const a=t.slots[this.slotIndex];if(!a.bone.active)return;const h=l?a.appliedPose:a.pose;c||s<this.frames[0]?r!==0&&this.setAttachment(t,h,a.data.attachmentName):this.setAttachment(t,h,this.attachmentNames[Z.search(this.frames,s)])}setAttachment(t,e,s){e.setAttachment(s?t.getAttachment(this.slotIndex,s):null)}},_e=class extends xt{slotIndex;attachment;vertices;constructor(t,e,s,n){super(t,e,`12|${s}|${n.id}`),this.slotIndex=s,this.attachment=n,this.vertices=new Array(t),this.additive=!0}getFrameCount(){return this.frames.length}setFrame(t,e,s){this.frames[t]=e,this.vertices[t]=s}setBezier(t,e,s,n,i,r,o,c,l,a,h){const d=this.curves;let m=this.getFrameCount()+t*18;s===0&&(d[e]=2+m);const u=(n-r*2+c)*.03,f=l*.03-o*.06,p=((r-c)*3-n+a)*.006,g=(o-l+.33333333)*.018;let b=u*2+p,x=f*2+g,w=(r-n)*.3+u+p*.16666667,v=o*.3+f+g*.16666667,y=n+w,S=v;for(let T=m+18;m<T;m+=2)d[m]=y,d[m+1]=S,w+=b,v+=x,b+=p,x+=g,y+=w,S+=v}getCurvePercent(t,e){const s=this.curves;let n=s[e];switch(n){case 0:{const c=this.frames[e];return(t-c)/(this.frames[e+this.getFrameEntries()]-c)}case 1:return 0}if(n-=2,s[n]>t){const c=this.frames[e];return s[n+1]*(t-c)/(s[n]-c)}const i=n+18;for(n+=2;n<i;n+=2)if(s[n]>=t){const c=s[n-2],l=s[n-1];return l+(t-c)/(s[n]-c)*(s[n+1]-l)}const r=s[i-2],o=s[i-1];return o+(1-o)*(t-r)/(this.frames[e+this.getFrameEntries()]-r)}apply(t,e,s,n,i,r,o,c,l){const a=t.slots;if(!this.attachment.isTimelineActive(a,this.slotIndex,l))return;const h=this.attachment.timelineSlots,d=this.frames;if(s<d[0]){this.applyBeforeFirst(a[this.slotIndex],l,i,r);for(const g of h)this.applyBeforeFirst(a[g],l,i,r);return}let m,u,f;if(s>=d[d.length-1])f=0,m=this.vertices[d.length-1],u=null;else{const g=Z.search(d,s);f=this.getCurvePercent(s,g),m=this.vertices[g],u=this.vertices[g+1]}const p=this.vertices[0].length;this.applyToSlot(a[this.slotIndex],l,m,u,f,p,i,r,o);for(const g of h)this.applyToSlot(a[g],l,m,u,f,p,i,r,o)}applyBeforeFirst(t,e,s,n){if(!t.bone.active)return;const i=e?t.appliedPose:t.pose;if(i.attachment==null||i.attachment.timelineAttachment!==this.attachment)return;const r=i.deform;switch(r.length===0&&(n=1),n){case 1:r.length=0;break;case 2:{if(s===1){r.length=0;return}const o=this.vertices[0].length;r.length=o;const c=r,l=i.attachment;if(l.bones===null){const a=l.vertices;for(let h=0;h<o;h++)c[h]+=(a[h]-c[h])*s}else{s=1-s;for(let a=0;a<o;a++)c[a]*=s}}}}applyToSlot(t,e,s,n,i,r,o,c,l){if(!t.bone.active)return;const a=e?t.appliedPose:t.pose;if(a.attachment===null||a.attachment.timelineAttachment!==this.attachment)return;const h=a.attachment,d=a.deform;d.length===0&&(c=1);const m=c===1;if(d.length=r,n===null)if(o===1)if(l&&!m)if(h.bones)for(let u=0;u<r;u++)d[u]+=s[u];else{const u=h.vertices;for(let f=0;f<r;f++)d[f]+=s[f]-u[f]}else B.arrayCopy(s,0,d,0,r);else if(m)if(h.bones)for(let u=0;u<r;u++)d[u]=s[u]*o;else{const u=h.vertices;for(let f=0;f<r;f++){const p=u[f];d[f]=p+(s[f]-p)*o}}else if(l)if(h.bones)for(let u=0;u<r;u++)d[u]+=s[u]*o;else{const u=h.vertices;for(let f=0;f<r;f++)d[f]+=(s[f]-u[f])*o}else for(let u=0;u<r;u++)d[u]+=(s[u]-d[u])*o;else if(o===1)if(l&&!m)if(h.bones)for(let u=0;u<r;u++){const f=s[u];d[u]+=f+(n[u]-f)*i}else{const u=h.vertices;for(let f=0;f<r;f++){const p=s[f];d[f]+=p+(n[f]-p)*i-u[f]}}else if(i===0)B.arrayCopy(s,0,d,0,r);else for(let u=0;u<r;u++){const f=s[u];d[u]=f+(n[u]-f)*i}else if(m)if(h.bones)for(let u=0;u<r;u++){const f=s[u];d[u]=(f+(n[u]-f)*i)*o}else{const u=h.vertices;for(let f=0;f<r;f++){const p=s[f],g=u[f];d[f]=g+(p+(n[f]-p)*i-g)*o}}else if(l)if(h.bones)for(let u=0;u<r;u++){const f=s[u];d[u]+=(f+(n[u]-f)*i)*o}else{const u=h.vertices;for(let f=0;f<r;f++){const p=s[f];d[f]+=(p+(n[f]-p)*i-u[f])*o}}else for(let u=0;u<r;u++){const f=s[u];d[u]+=(f+(n[u]-f)*i-d[u])*o}}},We=class vt extends Z{static ENTRIES=3;static MODE=1;static DELAY=2;slotIndex;attachment;constructor(e,s,n){super(e,`29|${s}|${n.sequence.id}`),this.slotIndex=s,this.attachment=n,this.instant=!0}getFrameEntries(){return vt.ENTRIES}getSlotIndex(){return this.slotIndex}getAttachment(){return this.attachment}setFrame(e,s,n,i,r){const o=this.frames;e*=vt.ENTRIES,o[e]=s,o[e+vt.MODE]=n|i<<4,o[e+vt.DELAY]=r}apply(e,s,n,i,r,o,c,l,a){const h=e.slots;if(!this.attachment.isTimelineActive(h,this.slotIndex,a))return;const d=this.attachment.timelineSlots,m=this.frames;if(l||n<m[0]){if(o!==0){this.setupPose(h[this.slotIndex],a);for(const b of d)this.setupPose(h[b],a)}return}const u=Z.search(m,n,vt.ENTRIES),f=m[u],p=m[u+vt.MODE],g=m[u+vt.DELAY];this.applyToSlot(h[this.slotIndex],a,n,f,p,g);for(const b of d)this.applyToSlot(h[b],a,n,f,p,g)}setupPose(e,s){if(!e.bone.active)return;const n=s?e.appliedPose:e.pose;n.attachment===null||n.attachment.timelineAttachment!==this.attachment||(n.sequenceIndex=-1)}applyToSlot(e,s,n,i,r,o){if(!e.bone.active)return;const c=s?e.appliedPose:e.pose;if(c.attachment===null||c.attachment.timelineAttachment!==this.attachment)return;let l=r>>4,a=c.attachment.sequence.regions.length;const h=Fe[r&15];if(h!==0)switch(l+=(n-i)/o+1e-5|0,h){case 1:l=Math.min(a-1,l);break;case 2:l%=a;break;case 3:{const d=(a<<1)-2;l=d===0?0:l%d,l>=a&&(l=d-l);break}case 4:l=Math.max(a-1-l,0);break;case 5:l=a-1-l%a;break;case 6:{const d=(a<<1)-2;l=d===0?0:(l+a-1)%d,l>=a&&(l=d-l)}}c.sequenceIndex=l}},te=class yn extends Z{static propertyIds=["13"];events;constructor(e){super(e,...yn.propertyIds),this.events=new Array(e),this.instant=!0}getFrameCount(){return this.frames.length}setFrame(e,s){this.frames[e]=s.time,this.events[e]=s}apply(e,s,n,i,r,o,c,l,a){if(!i)return;const h=this.frames,d=this.frames.length;if(s>n)this.apply(null,s,Number.MAX_VALUE,i,0,o,!1,!1,!1),s=-1;else if(s>=h[d-1])return;if(n<h[0])return;let m=0;if(s<h[0])m=0;else{m=Z.search(h,s)+1;const u=h[m];for(;m>0&&h[m-1]===u;)m--}for(;m<d&&n>=h[m];m++)i.push(this.events[m])}},Tt=class Rs extends Z{static propertyID="14";static propertyIds=[Rs.propertyID];drawOrders;constructor(e){super(e,...Rs.propertyIds),this.drawOrders=new Array(e),this.instant=!0}getFrameCount(){return this.frames.length}setFrame(e,s,n){this.frames[e]=s,this.drawOrders[e]=n}apply(e,s,n,i,r,o,c,l,a){const h=a?e.drawOrder.appliedPose:e.drawOrder.pose,d=e.slots;if(l||n<this.frames[0]){o!==0&&B.arrayCopy(d,0,h,0,e.slots.length);return}const m=this.drawOrders[Z.search(this.frames,n)];if(!m)B.arrayCopy(d,0,h,0,e.slots.length);else for(let u=0,f=m.length;u<f;u++)h[u]=d[m[u]]}},qt=class Vs extends Z{static propertyID="15";slots;inFolder;drawOrders;constructor(e,s,n){super(e,...Vs.propertyIds(s)),this.slots=s,this.drawOrders=new Array(e),this.inFolder=new Array(n);for(const i of s)this.inFolder[i]=!0;this.instant=!0}static propertyIds(e){const s=e.length,n=new Array(s);for(let i=0;i<s;i++)n[i]=`${Vs.propertyID}|${e[i]}`;return n}getFrameCount(){return this.frames.length}getSlots(){return this.slots}getDrawOrders(){return this.drawOrders}setFrame(e,s,n){this.frames[e]=s,this.drawOrders[e]=n}apply(e,s,n,i,r,o,c,l,a){const h=a?e.drawOrder.appliedPose:e.drawOrder.pose,d=e.slots;if(l||n<this.frames[0])o!==0&&this.setup(h,d);else{const m=this.drawOrders[Z.search(this.frames,n)];if(!m)this.setup(h,d);else{const u=this.inFolder,f=this.slots;for(let p=0,g=0,b=f.length;!(u[h[p].data.index]&&(h[p]=d[f[m[g]]],++g===b));p++);}}}setup(e,s){const{inFolder:n,slots:i}=this;for(let r=0,o=0,c=i.length;!(n[e[r].data.index]&&(e[r]=s[i[o]],++o===c));r++);}};function Gs(t){return typeof t=="object"&&t!==null&&typeof t.constraintIndex=="number"}var He=class extends xt{constraintIndex=0;constructor(t,e,s){super(t,e,`16|${s}`),this.constraintIndex=s}getFrameEntries(){return 6}setFrame(t,e,s,n,i,r,o){t*=6,this.frames[t]=e,this.frames[t+1]=s,this.frames[t+2]=n,this.frames[t+3]=i,this.frames[t+4]=r?1:0,this.frames[t+5]=o?1:0}apply(t,e,s,n,i,r,o,c,l){const a=t.constraints[this.constraintIndex];if(!a.active)return;const h=l?a.appliedPose:a.pose,d=this.frames;if(s<d[0]){const b=a.data.setupPose;switch(r){case 1:{h.mix=b.mix,h.softness=b.softness,h.bendDirection=b.bendDirection,h.compress=b.compress,h.stretch=b.stretch;break}case 2:{h.mix+=(b.mix-h.mix)*i,h.softness+=(b.softness-h.softness)*i,h.bendDirection=b.bendDirection,h.compress=b.compress,h.stretch=b.stretch;break}}return}let m=0,u=0;const f=Z.search(d,s,6),p=this.curves[f/6];switch(p){case 0:{const b=d[f];m=d[f+1],u=d[f+2];const x=(s-b)/(d[f+6]-b);m+=(d[f+6+1]-m)*x,u+=(d[f+6+2]-u)*x;break}case 1:m=d[f+1],u=d[f+2];break;default:m=this.getBezierValue(s,f,1,p-2),u=this.getBezierValue(s,f,2,p+18-2)}const g=r===1?a.data.setupPose:h;h.mix=g.mix+(m-g.mix)*i,h.softness=g.softness+(u-g.softness)*i,c?r===1&&(h.bendDirection=g.bendDirection,h.compress=g.compress,h.stretch=g.stretch):(h.bendDirection=d[f+3],h.compress=d[f+4]!==0,h.stretch=d[f+5]!==0)}},Ge=class extends xt{constraintIndex=0;constructor(t,e,s){super(t,e,`17|${s}`),this.constraintIndex=s,this.additive=!0}getFrameEntries(){return 7}setFrame(t,e,s,n,i,r,o,c){const l=this.frames;t*=7,l[t]=e,l[t+1]=s,l[t+2]=n,l[t+3]=i,l[t+4]=r,l[t+5]=o,l[t+6]=c}apply(t,e,s,n,i,r,o,c,l){const a=t.constraints[this.constraintIndex];if(!a.active)return;const h=l?a.appliedPose:a.pose,d=this.frames;if(s<d[0]){const y=a.data.setupPose;switch(r){case 1:{h.mixRotate=y.mixRotate,h.mixX=y.mixX,h.mixY=y.mixY,h.mixScaleX=y.mixScaleX,h.mixScaleY=y.mixScaleY,h.mixShearY=y.mixShearY;break}case 2:{h.mixRotate+=(y.mixRotate-h.mixRotate)*i,h.mixX+=(y.mixX-h.mixX)*i,h.mixY+=(y.mixY-h.mixY)*i,h.mixScaleX+=(y.mixScaleX-h.mixScaleX)*i,h.mixScaleY+=(y.mixScaleY-h.mixScaleY)*i,h.mixShearY+=(y.mixShearY-h.mixShearY)*i;break}}return}let m,u,f,p,g,b;const x=Z.search(d,s,7),w=this.curves[x/7];switch(w){case 0:{const y=d[x];m=d[x+1],u=d[x+2],f=d[x+3],p=d[x+4],g=d[x+5],b=d[x+6];const S=(s-y)/(d[x+7]-y);m+=(d[x+7+1]-m)*S,u+=(d[x+7+2]-u)*S,f+=(d[x+7+3]-f)*S,p+=(d[x+7+4]-p)*S,g+=(d[x+7+5]-g)*S,b+=(d[x+7+6]-b)*S;break}case 1:m=d[x+1],u=d[x+2],f=d[x+3],p=d[x+4],g=d[x+5],b=d[x+6];break;default:m=this.getBezierValue(s,x,1,w-2),u=this.getBezierValue(s,x,2,w+18-2),f=this.getBezierValue(s,x,3,w+36-2),p=this.getBezierValue(s,x,4,w+54-2),g=this.getBezierValue(s,x,5,w+72-2),b=this.getBezierValue(s,x,6,w+90-2)}const v=r===1?a.data.setupPose:h;o?(h.mixRotate=v.mixRotate+m*i,h.mixX=v.mixX+u*i,h.mixY=v.mixY+f*i,h.mixScaleX=v.mixScaleX+p*i,h.mixScaleY=v.mixScaleY+g*i,h.mixShearY=v.mixShearY+b*i):(h.mixRotate=v.mixRotate+(m-v.mixRotate)*i,h.mixX=v.mixX+(u-v.mixX)*i,h.mixY=v.mixY+(f-v.mixY)*i,h.mixScaleX=v.mixScaleX+(p-v.mixScaleX)*i,h.mixScaleY=v.mixScaleY+(g-v.mixScaleY)*i,h.mixShearY=v.mixShearY+(b-v.mixShearY)*i)}},Pt=class extends Dt{constraintIndex;constructor(t,e,s,n){super(t,e,`${n}|${s}`),this.constraintIndex=s}},je=class extends Pt{constructor(t,e,s){super(t,e,s,18),this.additive=!0}apply(t,e,s,n,i,r,o,c,l){const a=t.constraints[this.constraintIndex];if(a.active){const h=l?a.appliedPose:a.pose;h.position=this.getAbsoluteValue(s,i,r,o,h.position,a.data.setupPose.position)}}},Ke=class extends Pt{constructor(t,e,s){super(t,e,s,19)}apply(t,e,s,n,i,r,o,c,l){const a=t.constraints[this.constraintIndex];if(a.active){const h=l?a.appliedPose:a.pose;h.spacing=this.getAbsoluteValue(s,i,r,!1,h.spacing,a.data.setupPose.spacing)}}},Je=class extends xt{constraintIndex;constructor(t,e,s){super(t,e,`20|${s}`),this.constraintIndex=s}getFrameEntries(){return 4}setFrame(t,e,s,n,i){const r=this.frames;t<<=2,r[t]=e,r[t+1]=s,r[t+2]=n,r[t+3]=i}apply(t,e,s,n,i,r,o,c,l){const a=t.constraints[this.constraintIndex];if(!a.active)return;const h=l?a.appliedPose:a.pose,d=this.frames;if(s<d[0]){const x=a.data.setupPose;switch(r){case 1:{h.mixRotate=x.mixRotate,h.mixX=x.mixX,h.mixY=x.mixY;break}case 2:{h.mixRotate+=(x.mixRotate-h.mixRotate)*i,h.mixX+=(x.mixX-h.mixX)*i,h.mixY+=(x.mixY-h.mixY)*i;break}}return}let m,u,f;const p=Z.search(d,s,4),g=this.curves[p>>2];switch(g){case 0:{const x=d[p];m=d[p+1],u=d[p+2],f=d[p+3];const w=(s-x)/(d[p+4]-x);m+=(d[p+4+1]-m)*w,u+=(d[p+4+2]-u)*w,f+=(d[p+4+3]-f)*w;break}case 1:m=d[p+1],u=d[p+2],f=d[p+3];break;default:m=this.getBezierValue(s,p,1,g-2),u=this.getBezierValue(s,p,2,g+18-2),f=this.getBezierValue(s,p,3,g+36-2)}const b=r===1?a.data.setupPose:h;o?(h.mixRotate=b.mixRotate+m*i,h.mixX=b.mixX+u*i,h.mixY=b.mixY+f*i):(h.mixRotate=b.mixRotate+(m-b.mixRotate)*i,h.mixX=b.mixX+(u-b.mixX)*i,h.mixY=b.mixY+(f-b.mixY)*i)}},pt=class extends Pt{constructor(t,e,s,n){super(t,e,s,n)}apply(t,e,s,n,i,r,o,c,l){if(o&&!this.additive&&(o=!1),this.constraintIndex===-1){const a=s>=this.frames[0]?this.getCurveValue(s):0,h=t.physics;for(const d of h)if(d.active&&this.global(d.data)){const m=l?d.appliedPose:d.pose;this.set(m,this.getAbsoluteValue(s,i,r,o,this.get(m),this.get(d.data.setupPose),a))}}else{const a=t.constraints[this.constraintIndex];if(a.active){const h=l?a.appliedPose:a.pose;this.set(h,this.getAbsoluteValue(s,i,r,o,this.get(h),this.get(a.data.setupPose)))}}}},Ze=class extends pt{constructor(t,e,s){super(t,e,s,21)}get(t){return t.inertia}set(t,e){t.inertia=e}global(t){return t.inertiaGlobal}},Qe=class extends pt{constructor(t,e,s){super(t,e,s,22)}get(t){return t.strength}set(t,e){t.strength=e}global(t){return t.strengthGlobal}},ts=class extends pt{constructor(t,e,s){super(t,e,s,23)}get(t){return t.damping}set(t,e){t.damping=e}global(t){return t.dampingGlobal}},es=class extends pt{constructor(t,e,s){super(t,e,s,24)}get(t){return 1/t.massInverse}set(t,e){t.massInverse=1/e}global(t){return t.massGlobal}},ss=class extends pt{constructor(t,e,s){super(t,e,s,25),this.additive=!0}get(t){return t.wind}set(t,e){t.wind=e}global(t){return t.windGlobal}},ns=class extends pt{constructor(t,e,s){super(t,e,s,26),this.additive=!0}get(t){return t.gravity}set(t,e){t.gravity=e}global(t){return t.gravityGlobal}},is=class extends pt{constructor(t,e,s){super(t,e,s,27)}get(t){return t.mix}set(t,e){t.mix=e}global(t){return t.mixGlobal}},rs=class vn extends Z{static propertyIds=["28"];constraintIndex;constructor(e,s){super(e,...vn.propertyIds),this.constraintIndex=s,this.instant=!0}getFrameCount(){return this.frames.length}setFrame(e,s){this.frames[e]=s}apply(e,s,n,i,r,o,c,l,a){let h;if(this.constraintIndex!==-1&&(h=e.constraints[this.constraintIndex],!h.active))return;const d=this.frames;if(s>n)this.apply(e,s,Number.MAX_VALUE,[],r,o,!1,!1,!1),s=-1;else if(s>=d[d.length-1])return;if(!(n<d[0])&&(s<d[0]||n>=d[Z.search(d,s)+1]))if(h!=null)h.reset(e);else for(const m of e.physics)m.active&&m.reset(e)}},as=class extends Pt{constructor(t,e,s){super(t,e,s,30)}apply(t,e,s,n,i,r,o,c,l){const a=t.constraints[this.constraintIndex];if(a.active){const h=l?a.appliedPose:a.pose;h.time=this.getAbsoluteValue(s,i,r,o,h.time,a.data.setupPose.time)}}},os=class extends Pt{constructor(t,e,s){super(t,e,s,31),this.additive=!0}apply(t,e,s,n,i,r,o,c,l){const a=t.constraints[this.constraintIndex];if(a.active){const h=l?a.appliedPose:a.pose;h.mix=this.getAbsoluteValue(s,i,r,o,h.mix,a.data.setupPose.mix)}}},On=class Ls{static emptyAnimation=new Zt("<empty>",[],0);data;tracks=[];timeScale=1;unkeyedState=0;events=[];listeners=[];queue=new Ks(this);propertyIds=new Map;animationsChanged=!1;trackEntryPool=new Ot(()=>new js);constructor(e){this.data=e}update(e){e*=this.timeScale;const s=this.tracks;for(let n=0,i=s.length;n<i;n++){const r=s[n];if(!r)continue;r.animationLast=r.nextAnimationLast,r.trackLast=r.nextTrackLast;let o=e*r.timeScale;if(r.delay>0){if(r.delay-=o,r.delay>0)continue;o=-r.delay,r.delay=0}let c=r.next;if(c){const l=r.trackLast-c.delay;if(l>=0){for(c.delay=0,c.trackTime+=r.timeScale===0?0:(l/r.timeScale+e)*c.timeScale,r.trackTime+=o,this.setTrack(n,c,!0);c.mixingFrom;)c.mixTime+=e,c=c.mixingFrom;continue}}else if(r.trackLast>=r.trackEnd&&!r.mixingFrom){s[n]=null,this.queue.end(r),this.clearNext(r);continue}if(r.mixingFrom&&this.updateMixingFrom(r,e)){let l=r.mixingFrom;for(r.mixingFrom=null,l&&(l.mixingTo=null);l;)this.queue.end(l),l=l.mixingFrom}r.trackTime+=o}this.queue.drain()}updateMixingFrom(e,s){const n=e.mixingFrom;if(!n)return!0;const i=this.updateMixingFrom(n,s);if(n.animationLast=n.nextAnimationLast,n.trackLast=n.nextTrackLast,e.nextTrackLast!==-1&&e.mixTime>=e.mixDuration){if(n.totalAlpha===0||e.mixDuration===0){if(e.mixingFrom=n.mixingFrom,n.mixingFrom!=null&&(n.mixingFrom.mixingTo=e),n.totalAlpha===0)for(let r=e;r.mixingTo!=null;r=r.mixingTo)r.keepHold=!0;this.queue.end(n)}return i}return n.trackTime+=s*n.timeScale,e.mixTime+=s,!1}apply(e){if(!e)throw new Error("skeleton cannot be null.");this.animationsChanged&&this._animationsChanged();const s=this.events,n=this.tracks;let i=!1;for(let c=0,l=n.length;c<l;c++){const a=n[c];if(!a||a.delay>0)continue;i=!0;let h=a.alpha;a.mixingFrom?h*=this.applyMixingFrom(a,e):a.trackTime>=a.trackEnd&&!a.next&&(h=0);let d=a.animationLast,m=a.getAnimationTime(),u=m,f=s;a.reverse&&(u=a.animation.duration-u,f=null);const p=a.animation.timelines,g=p.length;if(c===0&&h===1)for(let b=0;b<g;b++){B.webkit602BugfixHelper(h);const x=p[b];x instanceof kt?this.applyAttachmentTimeline(x,e,u,1,!0):x.apply(e,d,u,f,h,1,!1,!1,!1)}else{const b=a.timelineMode,x=h>=a.alphaAttachmentThreshold,w=a.additive,v=w||a.shortestRotation,y=!v&&a.timelinesRotation.length!==g<<1;y&&(a.timelinesRotation.length=g<<1);for(let S=0;S<g;S++){const T=p[S],A=b[S]&hs;!v&&T instanceof Ut?this.applyRotateTimeline(T,e,u,h,A,a.timelinesRotation,S<<1,y):T instanceof kt?this